@claudiolabs/claudin 0.7.0 → 0.7.2

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 (893) hide show
  1. package/README.md +1 -0
  2. package/dist/chunks/AgentTool-0.7.2-9q9cf0s2.mjs +1 -0
  3. package/dist/chunks/App-0.7.2-1yazneaj.mjs +1 -0
  4. package/dist/chunks/ApproveApiKey-0.7.2-r6n7yk1e.mjs +1 -0
  5. package/dist/chunks/AssistantSessionChooser-0.7.2-bq8tfzkt.mjs +1 -0
  6. package/dist/chunks/AutoModeOptInDialog-0.7.2-exq70cpt.mjs +1 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-0.7.2-4wq8e6bg.mjs +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.7.2-tfd9bwks.mjs +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-0.7.2-x4nff112.mjs +1 -0
  10. package/dist/chunks/DiffDialog-0.7.2-rynq65x0.mjs +7 -0
  11. package/dist/chunks/Doctor-0.7.2-47kvka8v.mjs +1 -0
  12. package/dist/chunks/ExplorerDialog-0.7.2-whxpmm57.mjs +6 -0
  13. package/dist/chunks/Grove-0.7.2-xd5sc9zj.mjs +1 -0
  14. package/dist/chunks/ITermBackend-0.7.2-d9gvx90g.mjs +1 -0
  15. package/dist/chunks/InvalidConfigDialog-0.7.2-caf92zwe.mjs +1 -0
  16. package/dist/chunks/InvalidSettingsDialog-0.7.2-4ahhegj6.mjs +1 -0
  17. package/dist/chunks/MigrationDialog-0.7.2-j7wxkhr6.mjs +1 -0
  18. package/dist/chunks/Onboarding-0.7.2-4rq70qsr.mjs +1 -0
  19. package/dist/chunks/ProviderManager-0.7.2-gjmzm35c.mjs +1 -0
  20. package/dist/chunks/REPL-0.7.2-a8j6n2qa.mjs +1 -0
  21. package/dist/chunks/ResumeConversation-0.7.2-84wvvrx5.mjs +1 -0
  22. package/dist/chunks/SnapshotUpdateDialog-0.7.2-wk0qx8j6.mjs +1 -0
  23. package/dist/chunks/TeleportProgress-0.7.2-dj8zvkv5.mjs +1 -0
  24. package/dist/chunks/TeleportRepoMismatchDialog-0.7.2-ey2mmrd3.mjs +1 -0
  25. package/dist/chunks/TeleportResumeWrapper-0.7.2-j4vtrwzz.mjs +1 -0
  26. package/dist/chunks/TmuxBackend-0.7.2-en2ev5fc.mjs +9 -0
  27. package/dist/chunks/ToolSearchTool-0.7.2-qkk7a91f.mjs +1 -0
  28. package/dist/chunks/TrustDialog-0.7.2-eh3tqgea.mjs +1 -0
  29. package/dist/chunks/activeProvider-0.7.2-53s4g0s8.mjs +1 -0
  30. package/dist/chunks/add-dir-0.7.2-p09yjmj7.mjs +1 -0
  31. package/dist/chunks/agents-0.7.2-0m73ejzs.mjs +3 -0
  32. package/dist/chunks/agents-0.7.2-a1zpb02y.mjs +110 -0
  33. package/dist/chunks/api-0.7.2-gwy9gs1j.mjs +1 -0
  34. package/dist/chunks/asciicast-0.7.2-5vqep6sv.mjs +1 -0
  35. package/dist/chunks/assistant-0.7.2-txvf934b.mjs +1 -0
  36. package/dist/chunks/auth-0.7.2-02q30rsb.mjs +1 -0
  37. package/dist/chunks/auth-0.7.2-x29x49yh.mjs +1 -0
  38. package/dist/chunks/autoMode-0.7.2-5jnc8v33.mjs +48 -0
  39. package/dist/chunks/autoUpdater-0.7.2-pdqvbd3c.mjs +1 -0
  40. package/dist/chunks/backgroundHousekeeping-0.7.2-1m4w90vq.mjs +1 -0
  41. package/dist/chunks/branch-0.7.2-wgyhx41x.mjs +4 -0
  42. package/dist/chunks/bridge-0.7.2-f4ryhejx.mjs +2 -0
  43. package/dist/chunks/bridgeConfig-0.7.2-g6w4rghz.mjs +1 -0
  44. package/dist/chunks/bridgeEnabled-0.7.2-5aspb655.mjs +1 -0
  45. package/dist/chunks/bridgeMain-0.7.2-fey03cj7.mjs +88 -0
  46. package/dist/chunks/bridgePointer-0.7.2-8k41syzc.mjs +1 -0
  47. package/dist/chunks/btw-0.7.2-syxbtnxj.mjs +1 -0
  48. package/dist/chunks/buddy-0.7.2-gge72j8t.mjs +3 -0
  49. package/dist/chunks/cacache-0.7.2-gztwvvrm.mjs +1 -0
  50. package/dist/chunks/cache-probe-0.7.2-1gytt4j5.mjs +21 -0
  51. package/dist/chunks/cacheStats-0.7.2-sd9n48k1.mjs +4 -0
  52. package/dist/chunks/caches-0.7.2-cqzt5zwn.mjs +1 -0
  53. package/dist/chunks/claudeDesktop-0.7.2-7pna3peh.mjs +1 -0
  54. package/dist/chunks/claudemd-0.7.2-n2d9tbz6.mjs +1 -0
  55. package/dist/chunks/clear-0.7.2-v59pskrm.mjs +1 -0
  56. package/dist/chunks/clearTerminal-0.7.2-p4d7q5b7.mjs +1 -0
  57. package/dist/chunks/cli-0.7.2-0cmw1f4j.mjs +2 -0
  58. package/dist/chunks/cli-0.7.2-0mj25tns.mjs +2 -0
  59. package/dist/chunks/cli-0.7.2-0v8f8cx4.mjs +2 -0
  60. package/dist/chunks/cli-0.7.2-19vhaz2c.mjs +2 -0
  61. package/dist/chunks/cli-0.7.2-1a4j9k2f.mjs +2 -0
  62. package/dist/chunks/cli-0.7.2-1aerk8aa.mjs +2 -0
  63. package/dist/chunks/cli-0.7.2-1rwkghr2.mjs +2 -0
  64. package/dist/chunks/cli-0.7.2-21mtjks8.mjs +15 -0
  65. package/dist/chunks/cli-0.7.2-23xjb2nt.mjs +2 -0
  66. package/dist/chunks/cli-0.7.2-26rzbaez.mjs +2 -0
  67. package/dist/chunks/cli-0.7.2-29hh46ve.mjs +3 -0
  68. package/dist/chunks/cli-0.7.2-2dbmqwyn.mjs +2 -0
  69. package/dist/chunks/cli-0.7.2-2rj33835.mjs +6 -0
  70. package/dist/chunks/cli-0.7.2-31k7gjq7.mjs +2 -0
  71. package/dist/chunks/cli-0.7.2-358vh55m.mjs +2 -0
  72. package/dist/chunks/cli-0.7.2-3cc67r6d.mjs +2 -0
  73. package/dist/chunks/cli-0.7.2-3frg7csa.mjs +2 -0
  74. package/dist/chunks/cli-0.7.2-3s2zd715.mjs +3 -0
  75. package/dist/chunks/cli-0.7.2-3synxf81.mjs +2 -0
  76. package/dist/chunks/cli-0.7.2-40f37y02.mjs +2 -0
  77. package/dist/chunks/cli-0.7.2-40xymk1q.mjs +2 -0
  78. package/dist/chunks/cli-0.7.2-437jawbh.mjs +2 -0
  79. package/dist/chunks/cli-0.7.2-43d0yq0h.mjs +2 -0
  80. package/dist/chunks/cli-0.7.2-44rzmsbx.mjs +2 -0
  81. package/dist/chunks/cli-0.7.2-4d6z9fdj.mjs +2 -0
  82. package/dist/chunks/cli-0.7.2-4g4d682x.mjs +3 -0
  83. package/dist/chunks/cli-0.7.2-520tgkhw.mjs +5438 -0
  84. package/dist/chunks/cli-0.7.2-53qayxqk.mjs +2 -0
  85. package/dist/chunks/cli-0.7.2-5415yrkc.mjs +2 -0
  86. package/dist/chunks/cli-0.7.2-55ye29jy.mjs +2 -0
  87. package/dist/chunks/cli-0.7.2-5750g5et.mjs +2 -0
  88. package/dist/chunks/cli-0.7.2-59wm2srd.mjs +2 -0
  89. package/dist/chunks/cli-0.7.2-5aka4emf.mjs +133 -0
  90. package/dist/chunks/cli-0.7.2-5ca5nqtj.mjs +4 -0
  91. package/dist/chunks/cli-0.7.2-5e72m61f.mjs +25 -0
  92. package/dist/chunks/cli-0.7.2-5ff63f31.mjs +4 -0
  93. package/dist/chunks/cli-0.7.2-5gqht4d7.mjs +2 -0
  94. package/dist/chunks/cli-0.7.2-5qd0bn5g.mjs +193 -0
  95. package/dist/chunks/cli-0.7.2-5tacs42k.mjs +2 -0
  96. package/dist/chunks/cli-0.7.2-5y498dyr.mjs +2 -0
  97. package/dist/chunks/cli-0.7.2-5y75zyrv.mjs +15 -0
  98. package/dist/chunks/cli-0.7.2-5yrman6f.mjs +2 -0
  99. package/dist/chunks/cli-0.7.2-60exfzc0.mjs +2 -0
  100. package/dist/chunks/cli-0.7.2-65v6wt4g.mjs +2 -0
  101. package/dist/chunks/cli-0.7.2-68dn8am7.mjs +2 -0
  102. package/dist/chunks/cli-0.7.2-6pjgt9bx.mjs +2 -0
  103. package/dist/chunks/cli-0.7.2-6zd4a6yh.mjs +12 -0
  104. package/dist/chunks/cli-0.7.2-7dh7rk2t.mjs +2 -0
  105. package/dist/chunks/cli-0.7.2-7rjfehxm.mjs +2 -0
  106. package/dist/chunks/cli-0.7.2-7xfph0pz.mjs +2 -0
  107. package/dist/chunks/cli-0.7.2-81s45w7r.mjs +2 -0
  108. package/dist/chunks/cli-0.7.2-828f420c.mjs +7 -0
  109. package/dist/chunks/cli-0.7.2-83dd0h2c.mjs +2 -0
  110. package/dist/chunks/cli-0.7.2-88h70xrj.mjs +50 -0
  111. package/dist/chunks/cli-0.7.2-894093rv.mjs +2 -0
  112. package/dist/chunks/cli-0.7.2-89wj5h3q.mjs +2 -0
  113. package/dist/chunks/cli-0.7.2-8pfcc363.mjs +12 -0
  114. package/dist/chunks/cli-0.7.2-8qd7xft9.mjs +16 -0
  115. package/dist/chunks/cli-0.7.2-9156j3vm.mjs +6 -0
  116. package/dist/chunks/cli-0.7.2-9328ezjz.mjs +3 -0
  117. package/dist/chunks/cli-0.7.2-9953mwyy.mjs +2 -0
  118. package/dist/chunks/cli-0.7.2-99am4r15.mjs +4 -0
  119. package/dist/chunks/cli-0.7.2-9kn29b9a.mjs +4 -0
  120. package/dist/chunks/cli-0.7.2-9ry87dm1.mjs +2 -0
  121. package/dist/chunks/cli-0.7.2-9vr6ts7b.mjs +2 -0
  122. package/dist/chunks/cli-0.7.2-a5svqzyj.mjs +2 -0
  123. package/dist/chunks/cli-0.7.2-a6q1amed.mjs +2 -0
  124. package/dist/chunks/cli-0.7.2-a9324x4q.mjs +8 -0
  125. package/dist/chunks/cli-0.7.2-aaxbm02p.mjs +2 -0
  126. package/dist/chunks/cli-0.7.2-apg4ptg9.mjs +2 -0
  127. package/dist/chunks/cli-0.7.2-atsd6734.mjs +2 -0
  128. package/dist/chunks/cli-0.7.2-avk3azcp.mjs +2 -0
  129. package/dist/chunks/cli-0.7.2-aye3y5eg.mjs +2 -0
  130. package/dist/chunks/cli-0.7.2-b0v1mt53.mjs +2 -0
  131. package/dist/chunks/cli-0.7.2-bd97qyyb.mjs +2 -0
  132. package/dist/chunks/cli-0.7.2-bdnz1mnz.mjs +21 -0
  133. package/dist/chunks/cli-0.7.2-bjk14f5p.mjs +2 -0
  134. package/dist/chunks/cli-0.7.2-bmz47g1t.mjs +18 -0
  135. package/dist/chunks/cli-0.7.2-bttmh4fa.mjs +4 -0
  136. package/dist/chunks/cli-0.7.2-ccy16hvg.mjs +2 -0
  137. package/dist/chunks/cli-0.7.2-chg4zqj2.mjs +2 -0
  138. package/dist/chunks/cli-0.7.2-cjhzamwx.mjs +2 -0
  139. package/dist/chunks/cli-0.7.2-cqh66sd8.mjs +2 -0
  140. package/dist/chunks/cli-0.7.2-cqqj8v1e.mjs +6 -0
  141. package/dist/chunks/cli-0.7.2-czgmcj2j.mjs +2 -0
  142. package/dist/chunks/cli-0.7.2-dggndd24.mjs +2 -0
  143. package/dist/chunks/cli-0.7.2-drxj7wsn.mjs +2 -0
  144. package/dist/chunks/cli-0.7.2-ds7h4ntr.mjs +2 -0
  145. package/dist/chunks/cli-0.7.2-dxm2c139.mjs +24 -0
  146. package/dist/chunks/cli-0.7.2-dzt53r0y.mjs +2 -0
  147. package/dist/chunks/cli-0.7.2-e6dtw86q.mjs +2 -0
  148. package/dist/chunks/cli-0.7.2-ec60dmtg.mjs +2 -0
  149. package/dist/chunks/cli-0.7.2-edf740pd.mjs +5 -0
  150. package/dist/chunks/cli-0.7.2-eey9qnsc.mjs +2 -0
  151. package/dist/chunks/cli-0.7.2-eyjs1wq5.mjs +2 -0
  152. package/dist/chunks/cli-0.7.2-f4nt233k.mjs +3 -0
  153. package/dist/chunks/cli-0.7.2-fcadqwem.mjs +1 -0
  154. package/dist/chunks/cli-0.7.2-fkp8v4sr.mjs +2 -0
  155. package/dist/chunks/cli-0.7.2-g3k7m45h.mjs +12 -0
  156. package/dist/chunks/cli-0.7.2-g6cqgcyf.mjs +2 -0
  157. package/dist/chunks/cli-0.7.2-gar34ch2.mjs +4 -0
  158. package/dist/chunks/cli-0.7.2-gn8ff3x2.mjs +2 -0
  159. package/dist/chunks/cli-0.7.2-gssxkynf.mjs +2 -0
  160. package/dist/chunks/cli-0.7.2-gx0r7hs8.mjs +2 -0
  161. package/dist/chunks/cli-0.7.2-gysw8esj.mjs +2 -0
  162. package/dist/chunks/cli-0.7.2-h248q4gt.mjs +2 -0
  163. package/dist/chunks/cli-0.7.2-h3jq0nx1.mjs +2 -0
  164. package/dist/chunks/cli-0.7.2-h7m849rt.mjs +2 -0
  165. package/dist/chunks/cli-0.7.2-h903zfjz.mjs +2 -0
  166. package/dist/chunks/cli-0.7.2-hbmczrch.mjs +9 -0
  167. package/dist/chunks/cli-0.7.2-he1hdn59.mjs +18 -0
  168. package/dist/chunks/cli-0.7.2-hspcdhd7.mjs +2 -0
  169. package/dist/chunks/cli-0.7.2-hv1z3had.mjs +3 -0
  170. package/dist/chunks/cli-0.7.2-hvk7rgt3.mjs +2 -0
  171. package/dist/chunks/cli-0.7.2-j029dkan.mjs +3 -0
  172. package/dist/chunks/cli-0.7.2-j0s33kp5.mjs +2 -0
  173. package/dist/chunks/cli-0.7.2-j3vx2jqw.mjs +2 -0
  174. package/dist/chunks/cli-0.7.2-jbhdwhp3.mjs +2 -0
  175. package/dist/chunks/cli-0.7.2-jc7jm1vm.mjs +2 -0
  176. package/dist/chunks/cli-0.7.2-jkt40yfs.mjs +2 -0
  177. package/dist/chunks/cli-0.7.2-jn2497vh.mjs +2 -0
  178. package/dist/chunks/cli-0.7.2-jv6k1kz6.mjs +2 -0
  179. package/dist/chunks/cli-0.7.2-k40k933y.mjs +24 -0
  180. package/dist/chunks/cli-0.7.2-k6jnr159.mjs +2 -0
  181. package/dist/chunks/cli-0.7.2-k9qpm29e.mjs +2 -0
  182. package/dist/chunks/cli-0.7.2-kyd7mrxn.mjs +2 -0
  183. package/dist/chunks/cli-0.7.2-mapkx1gt.mjs +2 -0
  184. package/dist/chunks/cli-0.7.2-mg2tmjs3.mjs +12 -0
  185. package/dist/chunks/cli-0.7.2-mja3g8j0.mjs +2 -0
  186. package/dist/chunks/cli-0.7.2-mp7jnva5.mjs +15 -0
  187. package/dist/chunks/cli-0.7.2-mqv265gk.mjs +42 -0
  188. package/dist/chunks/cli-0.7.2-mw93dmjz.mjs +3 -0
  189. package/dist/chunks/cli-0.7.2-n1ncm3tc.mjs +2 -0
  190. package/dist/chunks/cli-0.7.2-n8kpba5n.mjs +2 -0
  191. package/dist/chunks/cli-0.7.2-ndt224p1.mjs +2 -0
  192. package/dist/chunks/cli-0.7.2-nf346apq.mjs +18 -0
  193. package/dist/chunks/cli-0.7.2-ngdtr2fz.mjs +2 -0
  194. package/dist/chunks/cli-0.7.2-nkafymh4.mjs +3 -0
  195. package/dist/chunks/cli-0.7.2-nxtag6y2.mjs +45 -0
  196. package/dist/chunks/cli-0.7.2-p42bcqhs.mjs +3 -0
  197. package/dist/chunks/cli-0.7.2-pbaedfkk.mjs +67 -0
  198. package/dist/chunks/cli-0.7.2-pjavf176.mjs +2 -0
  199. package/dist/chunks/cli-0.7.2-pm05qj0a.mjs +4 -0
  200. package/dist/chunks/cli-0.7.2-ppaeptkd.mjs +2 -0
  201. package/dist/chunks/cli-0.7.2-q2pk22xv.mjs +2 -0
  202. package/dist/chunks/cli-0.7.2-q85af7gm.mjs +2 -0
  203. package/dist/chunks/cli-0.7.2-q88h44qv.mjs +17 -0
  204. package/dist/chunks/cli-0.7.2-qdapr4dz.mjs +2 -0
  205. package/dist/chunks/cli-0.7.2-qf8435qy.mjs +2 -0
  206. package/dist/chunks/cli-0.7.2-qftw5wyw.mjs +5 -0
  207. package/dist/chunks/cli-0.7.2-qr706n52.mjs +10 -0
  208. package/dist/chunks/cli-0.7.2-qsx52bst.mjs +2 -0
  209. package/dist/chunks/cli-0.7.2-r1502pen.mjs +2 -0
  210. package/dist/chunks/cli-0.7.2-r26ghgw6.mjs +5 -0
  211. package/dist/chunks/cli-0.7.2-r7x165sf.mjs +17 -0
  212. package/dist/chunks/cli-0.7.2-rn3w4y3r.mjs +2 -0
  213. package/dist/chunks/cli-0.7.2-s0av8fr2.mjs +2 -0
  214. package/dist/chunks/cli-0.7.2-s3r1krp7.mjs +2 -0
  215. package/dist/chunks/cli-0.7.2-s41x7s9w.mjs +133 -0
  216. package/dist/chunks/cli-0.7.2-se4w3qaw.mjs +2 -0
  217. package/dist/chunks/cli-0.7.2-sjrnxjfp.mjs +2 -0
  218. package/dist/chunks/cli-0.7.2-sr9m45tm.mjs +2 -0
  219. package/dist/chunks/cli-0.7.2-t1wtmnh8.mjs +2 -0
  220. package/dist/chunks/cli-0.7.2-tds456xt.mjs +34 -0
  221. package/dist/chunks/cli-0.7.2-tf3mc20k.mjs +4 -0
  222. package/dist/chunks/cli-0.7.2-twx01hwg.mjs +2 -0
  223. package/dist/chunks/cli-0.7.2-tx2rxhrx.mjs +3 -0
  224. package/dist/chunks/cli-0.7.2-tytdzgnc.mjs +2 -0
  225. package/dist/chunks/cli-0.7.2-tz5zv753.mjs +6 -0
  226. package/dist/chunks/cli-0.7.2-tzc6qkph.mjs +3 -0
  227. package/dist/chunks/cli-0.7.2-vb0ja1yz.mjs +2 -0
  228. package/dist/chunks/cli-0.7.2-vgq7ce31.mjs +4 -0
  229. package/dist/chunks/cli-0.7.2-vqvfxb9x.mjs +2 -0
  230. package/dist/chunks/cli-0.7.2-vvbp0ycp.mjs +2 -0
  231. package/dist/chunks/cli-0.7.2-vx10940a.mjs +2 -0
  232. package/dist/chunks/cli-0.7.2-vx90v3pr.mjs +2 -0
  233. package/dist/chunks/cli-0.7.2-w07ksegr.mjs +2 -0
  234. package/dist/chunks/cli-0.7.2-waas8a1p.mjs +2 -0
  235. package/dist/chunks/cli-0.7.2-wahbzckp.mjs +58 -0
  236. package/dist/chunks/cli-0.7.2-whm7dq8a.mjs +2 -0
  237. package/dist/chunks/cli-0.7.2-wk3m6ndw.mjs +2 -0
  238. package/dist/chunks/cli-0.7.2-wmz88sxe.mjs +2 -0
  239. package/dist/chunks/cli-0.7.2-xced0m7v.mjs +2 -0
  240. package/dist/chunks/cli-0.7.2-xkbkgc1x.mjs +2 -0
  241. package/dist/chunks/cli-0.7.2-xmf0q5j5.mjs +39 -0
  242. package/dist/chunks/cli-0.7.2-xpw13d73.mjs +59 -0
  243. package/dist/chunks/cli-0.7.2-xtj79p8n.mjs +2 -0
  244. package/dist/chunks/cli-0.7.2-xwmd0gap.mjs +2 -0
  245. package/dist/chunks/cli-0.7.2-xzq4nj1z.mjs +2 -0
  246. package/dist/chunks/cli-0.7.2-ydcqkbay.mjs +20 -0
  247. package/dist/chunks/cli-0.7.2-yeym3pfk.mjs +4 -0
  248. package/dist/chunks/cli-0.7.2-ygx94a70.mjs +2 -0
  249. package/dist/chunks/cli-0.7.2-ymes9mpn.mjs +2 -0
  250. package/dist/chunks/cli-0.7.2-ze0wyhxh.mjs +2 -0
  251. package/dist/chunks/cli-0.7.2-zevvxkk3.mjs +2 -0
  252. package/dist/chunks/cli-0.7.2-zjn5drn1.mjs +3 -0
  253. package/dist/chunks/cli-0.7.2-zva1j44t.mjs +2 -0
  254. package/dist/chunks/cli-0.7.2-zvq6jw19.mjs +2 -0
  255. package/dist/chunks/client-0.7.2-5ayk0kpq.mjs +1 -0
  256. package/dist/chunks/color-0.7.2-qwk7wwhg.mjs +1 -0
  257. package/dist/chunks/compact-0.7.2-1htfptdq.mjs +3 -0
  258. package/dist/chunks/config-0.7.2-5qhqvs6r.mjs +1 -0
  259. package/dist/chunks/config-0.7.2-m4pjdgrd.mjs +1 -0
  260. package/dist/chunks/constants-0.7.2-pkxz3zw1.mjs +1 -0
  261. package/dist/chunks/context-0.7.2-sbj7xgcd.mjs +1 -0
  262. package/dist/chunks/context-noninteractive-0.7.2-0e342zm8.mjs +1 -0
  263. package/dist/chunks/conversation-0.7.2-8w1wm1xe.mjs +1 -0
  264. package/dist/chunks/copilotHeaders-0.7.2-qkkqpxf3.mjs +1 -0
  265. package/dist/chunks/copy-0.7.2-edx6f8tb.mjs +9 -0
  266. package/dist/chunks/cost-0.7.2-8arxgyd6.mjs +1 -0
  267. package/dist/chunks/createSSHSession-0.7.2-3n718ymh.mjs +1 -0
  268. package/dist/chunks/createSession-0.7.2-hm9d0q01.mjs +1 -0
  269. package/dist/chunks/debug-0.7.2-ngrc7p4e.mjs +1 -0
  270. package/dist/chunks/defaultActionDeps-0.7.2-dftsz493.mjs +1446 -0
  271. package/dist/chunks/desktop-0.7.2-vt6ymh81.mjs +1 -0
  272. package/dist/chunks/detectRepository-0.7.2-xgsqcqxv.mjs +1 -0
  273. package/dist/chunks/detection-0.7.2-m6c0amh8.mjs +1 -0
  274. package/dist/chunks/diff-0.7.2-7np6da8n.mjs +1 -0
  275. package/dist/chunks/doctor-0.7.2-spqx634t.mjs +1 -0
  276. package/dist/chunks/doctorDiagnostic-0.7.2-81rdywyn.mjs +1 -0
  277. package/dist/chunks/earlyInput-0.7.2-b7j7hx34.mjs +1 -0
  278. package/dist/chunks/effort-0.7.2-1jd0yvy3.mjs +10 -0
  279. package/dist/chunks/envLessBridgeConfig-0.7.2-x5wybzrg.mjs +1 -0
  280. package/dist/chunks/envUtils-0.7.2-srtr0ybx.mjs +1 -0
  281. package/dist/chunks/environmentSelection-0.7.2-drjpcqg5.mjs +1 -0
  282. package/dist/chunks/environments-0.7.2-c51gb5sh.mjs +1 -0
  283. package/dist/chunks/errors-0.7.2-4mfat7g5.mjs +1 -0
  284. package/dist/chunks/exampleCommands-0.7.2-c8b6smyk.mjs +1 -0
  285. package/dist/chunks/exit-0.7.2-0b21e2f4.mjs +1 -0
  286. package/dist/chunks/explorer-0.7.2-b2qgsg4r.mjs +1 -0
  287. package/dist/chunks/export-0.7.2-j6tnta5r.mjs +2 -0
  288. package/dist/chunks/extra-usage-0.7.2-8xrddgmh.mjs +1 -0
  289. package/dist/chunks/extra-usage-noninteractive-0.7.2-vzzkmfzw.mjs +1 -0
  290. package/dist/chunks/fast-0.7.2-kfcnj6wq.mjs +1 -0
  291. package/dist/chunks/feedback-0.7.2-cmhc12wj.mjs +14 -0
  292. package/dist/chunks/firstPartyEventLogger-0.7.2-pa49ax22.mjs +1 -0
  293. package/dist/chunks/git-0.7.2-9f7gvn9h.mjs +1 -0
  294. package/dist/chunks/githubModelsCredentials-0.7.2-qy1mhzsm.mjs +1 -0
  295. package/dist/chunks/goal-0.7.2-t9vq2zc6.mjs +4 -0
  296. package/dist/chunks/grove-0.7.2-9sxczf29.mjs +1 -0
  297. package/dist/chunks/growthbook-0.7.2-ch3yc64n.mjs +1 -0
  298. package/dist/chunks/headless-0.7.2-9kh4ecvm.mjs +2 -0
  299. package/dist/chunks/heapdump-0.7.2-jrxgec1e.mjs +6 -0
  300. package/dist/chunks/help-0.7.2-mkkkzv97.mjs +1 -0
  301. package/dist/chunks/hookChains-0.7.2-4rsz02te.mjs +3 -0
  302. package/dist/chunks/hooks-0.7.2-mpa8g97z.mjs +1 -0
  303. package/dist/chunks/hooks-0.7.2-yaybnthb.mjs +79 -0
  304. package/dist/chunks/ide-0.7.2-a5p1wn0n.mjs +3 -0
  305. package/dist/chunks/image-processor-napi-0.7.2-c971ey5m.mjs +1 -0
  306. package/dist/chunks/inboundAttachments-0.7.2-vkae77ac.mjs +1 -0
  307. package/dist/chunks/index-0.7.2-4qr2yjjg.mjs +1 -0
  308. package/dist/chunks/index-0.7.2-5mfmhd35.mjs +1 -0
  309. package/dist/chunks/index-0.7.2-62g62r4p.mjs +1 -0
  310. package/dist/chunks/index-0.7.2-7b6mkd4g.mjs +9 -0
  311. package/dist/chunks/index-0.7.2-87jrdmn3.mjs +2 -0
  312. package/dist/chunks/index-0.7.2-9h4tsef1.mjs +1 -0
  313. package/dist/chunks/index-0.7.2-9mk9g3c3.mjs +1 -0
  314. package/dist/chunks/index-0.7.2-a3w6at2z.mjs +1 -0
  315. package/dist/chunks/index-0.7.2-b296et1z.mjs +1 -0
  316. package/dist/chunks/index-0.7.2-c22bn4q9.mjs +1 -0
  317. package/dist/chunks/index-0.7.2-dn8m3dh3.mjs +9 -0
  318. package/dist/chunks/index-0.7.2-f8swc4mv.mjs +30 -0
  319. package/dist/chunks/index-0.7.2-fdsptfbt.mjs +17 -0
  320. package/dist/chunks/index-0.7.2-g2vfnmjs.mjs +1 -0
  321. package/dist/chunks/index-0.7.2-hjcptpaz.mjs +1 -0
  322. package/dist/chunks/index-0.7.2-hts44hhf.mjs +2 -0
  323. package/dist/chunks/index-0.7.2-k2y0b0h3.mjs +1 -0
  324. package/dist/chunks/index-0.7.2-nhtpksxs.mjs +5 -0
  325. package/dist/chunks/index-0.7.2-p5a52s17.mjs +1 -0
  326. package/dist/chunks/index-0.7.2-r0zwxc1g.mjs +1 -0
  327. package/dist/chunks/index-0.7.2-vfyvycvc.mjs +1 -0
  328. package/dist/chunks/index-0.7.2-vw5e1spt.mjs +1 -0
  329. package/dist/chunks/index-0.7.2-xp0gpx8w.mjs +1 -0
  330. package/dist/chunks/init-0.7.2-mdhax55g.mjs +1 -0
  331. package/dist/chunks/initReplBridge-0.7.2-sq5dka9e.mjs +1 -0
  332. package/dist/chunks/ink-0.7.2-xhfkzs8w.mjs +1 -0
  333. package/dist/chunks/insights-0.7.2-hnzbcbwt.mjs +870 -0
  334. package/dist/chunks/install-0.7.2-f33pbxz0.mjs +1 -0
  335. package/dist/chunks/install-github-app-0.7.2-rysxaqa4.mjs +149 -0
  336. package/dist/chunks/install-slack-app-0.7.2-nsg858f1.mjs +1 -0
  337. package/dist/chunks/instrumentation-0.7.2-6t0dw394.mjs +1 -0
  338. package/dist/chunks/interactiveHelpers-0.7.2-wqr53tgp.mjs +1 -0
  339. package/dist/chunks/keybindings-0.7.2-b6yhemd9.mjs +2 -0
  340. package/dist/chunks/knowledge-0.7.2-94b972dr.mjs +2 -0
  341. package/dist/chunks/latestVersionCache-0.7.2-1e9h6ycx.mjs +1 -0
  342. package/dist/chunks/loadAgentsDir-0.7.2-d3vy1hjh.mjs +1 -0
  343. package/dist/chunks/loadPluginHooks-0.7.2-9bdtab1f.mjs +1 -0
  344. package/dist/chunks/loadPluginHooks-0.7.2-v002c6d9.mjs +1 -0
  345. package/dist/chunks/log-0.7.2-n28x7jf3.mjs +1 -0
  346. package/dist/chunks/main-0.7.2-bbgx9tzn.mjs +1 -0
  347. package/dist/chunks/managedEnv-0.7.2-c7gnfsz5.mjs +1 -0
  348. package/dist/chunks/mcp-0.7.2-nakq1rhg.mjs +1 -0
  349. package/dist/chunks/mcp-0.7.2-v40gxs87.mjs +17 -0
  350. package/dist/chunks/mcp-0.7.2-wtmt0vpe.mjs +4 -0
  351. package/dist/chunks/mcpb-0.7.2-k7z7aa64.mjs +1 -0
  352. package/dist/chunks/memory-0.7.2-1hfh6410.mjs +3 -0
  353. package/dist/chunks/model-0.7.2-c8esc658.mjs +1 -0
  354. package/dist/chunks/model-0.7.2-sjw6chpt.mjs +2 -0
  355. package/dist/chunks/node-0.7.2-2bm5bpwx.mjs +12 -0
  356. package/dist/chunks/oauth-0.7.2-ze80cmtw.mjs +1 -0
  357. package/dist/chunks/openaiShim-0.7.2-qwqrcmfv.mjs +14 -0
  358. package/dist/chunks/output-style-0.7.2-mhfyzz5h.mjs +1 -0
  359. package/dist/chunks/package-GCDC7LJR-0.7.2-d271461v.mjs +1 -0
  360. package/dist/chunks/parseConnectUrl-0.7.2-5c6xzn22.mjs +1 -0
  361. package/dist/chunks/parser-0.7.2-ekqc81n3.mjs +1 -0
  362. package/dist/chunks/passes-0.7.2-dyr0j4xs.mjs +1 -0
  363. package/dist/chunks/permissions-0.7.2-ap5ve9y3.mjs +3 -0
  364. package/dist/chunks/permissions-0.7.2-pqbpv219.mjs +1 -0
  365. package/dist/chunks/plan-0.7.2-3qcvkebx.mjs +1 -0
  366. package/dist/chunks/plist-0.7.2-sfrs3sb5.mjs +1 -0
  367. package/dist/chunks/plugin-0.7.2-23zzkpzp.mjs +29 -0
  368. package/dist/chunks/pluginStartupCheck-0.7.2-hdbd4vjf.mjs +1 -0
  369. package/dist/chunks/plugins-0.7.2-8b79cq4h.mjs +9 -0
  370. package/dist/chunks/preActionHook-0.7.2-denqn35e.mjs +2 -0
  371. package/dist/chunks/print-0.7.2-k3jvb8xp.mjs +57 -0
  372. package/dist/chunks/privacy-settings-0.7.2-2a25e9zd.mjs +1 -0
  373. package/dist/chunks/process-0.7.2-bydxzc10.mjs +1 -0
  374. package/dist/chunks/processBashCommand-0.7.2-n8zeggtq.mjs +1 -0
  375. package/dist/chunks/processSlashCommand-0.7.2-8bkqmvyg.mjs +9 -0
  376. package/dist/chunks/prompt-0.7.2-xcyvamqv.mjs +1 -0
  377. package/dist/chunks/prompt-0.7.2-zgvfvr40.mjs +1 -0
  378. package/dist/chunks/prompts-0.7.2-v3chnzw2.mjs +1 -0
  379. package/dist/chunks/protocolHandler-0.7.2-pcar7hdp.mjs +13 -0
  380. package/dist/chunks/provider-0.7.2-amg0a8yq.mjs +2 -0
  381. package/dist/chunks/providerProfiles-0.7.2-nwbz4k4w.mjs +1 -0
  382. package/dist/chunks/providerValidation-0.7.2-acwg3yzh.mjs +6 -0
  383. package/dist/chunks/rate-limit-options-0.7.2-spv7s8hs.mjs +1 -0
  384. package/dist/chunks/registerSubcommands-0.7.2-7g1dds0b.mjs +34 -0
  385. package/dist/chunks/registry-0.7.2-kv34xe3p.mjs +1 -0
  386. package/dist/chunks/release-notes-0.7.2-amerc2cj.mjs +5 -0
  387. package/dist/chunks/reload-plugins-0.7.2-tx1872h3.mjs +2 -0
  388. package/dist/chunks/remote-env-0.7.2-hq2w0qkg.mjs +1 -0
  389. package/dist/chunks/remoteBridgeCore-0.7.2-5stcs58w.mjs +1 -0
  390. package/dist/chunks/remoteSession-0.7.2-zwc7cra7.mjs +1 -0
  391. package/dist/chunks/rename-0.7.2-gk2b22q0.mjs +1 -0
  392. package/dist/chunks/replBridgeHandle-0.7.2-17phx9ww.mjs +1 -0
  393. package/dist/chunks/replLauncher-0.7.2-th0j1erj.mjs +1 -0
  394. package/dist/chunks/resume-0.7.2-xmxzptvs.mjs +2 -0
  395. package/dist/chunks/rewind-0.7.2-bvjnkrk2.mjs +1 -0
  396. package/dist/chunks/rootOptions-0.7.2-2cy9mmwc.mjs +1 -0
  397. package/dist/chunks/sandbox-adapter-0.7.2-h0xxevv6.mjs +1 -0
  398. package/dist/chunks/sandbox-toggle-0.7.2-qhhmmtft.mjs +1 -0
  399. package/dist/chunks/session-0.7.2-c8me3g3x.mjs +2 -0
  400. package/dist/chunks/sessionDiscovery-0.7.2-3k39j4tc.mjs +1 -0
  401. package/dist/chunks/sessionFileAccessHooks-0.7.2-rv6etkhg.mjs +1 -0
  402. package/dist/chunks/sessionStorage-0.7.2-97nxk3y6.mjs +1 -0
  403. package/dist/chunks/settings-0.7.2-xc200363.mjs +1 -0
  404. package/dist/chunks/setup-0.7.2-c982wyvz.mjs +5 -0
  405. package/dist/chunks/sinks-0.7.2-95rk1mrs.mjs +1 -0
  406. package/dist/chunks/skills-0.7.2-6gdq6xgn.mjs +1 -0
  407. package/dist/chunks/startupProfiler-0.7.2-bx988amf.mjs +1 -0
  408. package/dist/chunks/startupUpdateCheck-0.7.2-n1cjfry1.mjs +1 -0
  409. package/dist/chunks/state-0.7.2-p9tevca2.mjs +1 -0
  410. package/dist/chunks/stats-0.7.2-8xhdefb7.mjs +6 -0
  411. package/dist/chunks/status-0.7.2-fh89jm1g.mjs +1 -0
  412. package/dist/chunks/stickers-0.7.2-8p2fssw5.mjs +1 -0
  413. package/dist/chunks/subprocessEnv-0.7.2-rxrfb67k.mjs +1 -0
  414. package/dist/chunks/tasks-0.7.2-e27mj4dh.mjs +1 -0
  415. package/dist/chunks/teamHelpers-0.7.2-m3z5pcdz.mjs +1 -0
  416. package/dist/chunks/teammateModeSnapshot-0.7.2-p7amb3d6.mjs +1 -0
  417. package/dist/chunks/teleport-0.7.2-5esyfq9r.mjs +1 -0
  418. package/dist/chunks/terminalSetup-0.7.2-yscmphsc.mjs +1 -0
  419. package/dist/chunks/theme-0.7.2-1zmsca02.mjs +1 -0
  420. package/dist/chunks/thinkback-0.7.2-17ff2vy3.mjs +1 -0
  421. package/dist/chunks/thinkback-play-0.7.2-mdnape3r.mjs +1 -0
  422. package/dist/chunks/toolPool-0.7.2-jbgwb4kh.mjs +1 -0
  423. package/dist/chunks/toolSearch-0.7.2-c6qby1zz.mjs +1 -0
  424. package/dist/chunks/tools-0.7.2-b04qyzf8.mjs +1 -0
  425. package/dist/chunks/trustedDevice-0.7.2-jz3zmc03.mjs +1 -0
  426. package/dist/chunks/turndown.cjs-0.7.2-bj6egxgk.mjs +69 -0
  427. package/dist/chunks/types-0.7.2-fsjvv1kt.mjs +1 -0
  428. package/dist/chunks/ultrareviewCommand-0.7.2-w2fbj23d.mjs +4 -0
  429. package/dist/chunks/update-0.7.2-4ccgmd4p.mjs +86 -0
  430. package/dist/chunks/upgrade-0.7.2-d7h7vmqn.mjs +1 -0
  431. package/dist/chunks/upload-0.7.2-p6je053d.mjs +7 -0
  432. package/dist/chunks/upstreamproxy-0.7.2-sjmkdjb8.mjs +14 -0
  433. package/dist/chunks/url-handler-napi-0.7.2-snjwvzje.mjs +1 -0
  434. package/dist/chunks/usage-0.7.2-2k2m3v75.mjs +1 -0
  435. package/dist/chunks/util-0.7.2-n4vdasdr.mjs +1 -0
  436. package/dist/chunks/utils-0.7.2-bmqt59ff.mjs +1 -0
  437. package/dist/chunks/vim-0.7.2-bd15xeza.mjs +1 -0
  438. package/dist/chunks/watcher-0.7.2-pjzeng3k.mjs +1 -0
  439. package/dist/chunks/wiki-0.7.2-2a655hhv.mjs +132 -0
  440. package/dist/chunks/worktree-0.7.2-gs72mnyb.mjs +1 -0
  441. package/dist/chunks/worktreeModeEnabled-0.7.2-gqtz9ha6.mjs +1 -0
  442. package/dist/chunks/wrapper-0.7.2-j420s6rc.mjs +7 -0
  443. package/dist/claudin-vscode.vsix +0 -0
  444. package/dist/cli.mjs +2 -2
  445. package/package.json +3 -1
  446. package/dist/chunks/AgentTool-0.7.0-9peg6t20.mjs +0 -1
  447. package/dist/chunks/App-0.7.0-q5hygb50.mjs +0 -1
  448. package/dist/chunks/ApproveApiKey-0.7.0-pdj2vakp.mjs +0 -1
  449. package/dist/chunks/AssistantSessionChooser-0.7.0-190csm4h.mjs +0 -1
  450. package/dist/chunks/AutoModeOptInDialog-0.7.0-khhh5rz9.mjs +0 -1
  451. package/dist/chunks/BypassPermissionsModeDialog-0.7.0-4n7jcjsf.mjs +0 -1
  452. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.7.0-vf636a5p.mjs +0 -1
  453. package/dist/chunks/ConsoleOAuthFlow-0.7.0-z9h5bckg.mjs +0 -1
  454. package/dist/chunks/DiffDialog-0.7.0-3kqmdg48.mjs +0 -7
  455. package/dist/chunks/Doctor-0.7.0-gep401wn.mjs +0 -1
  456. package/dist/chunks/ExplorerDialog-0.7.0-2t408ngs.mjs +0 -6
  457. package/dist/chunks/Grove-0.7.0-3knq53k5.mjs +0 -1
  458. package/dist/chunks/ITermBackend-0.7.0-by807q13.mjs +0 -1
  459. package/dist/chunks/InvalidConfigDialog-0.7.0-maxj2b37.mjs +0 -1
  460. package/dist/chunks/InvalidSettingsDialog-0.7.0-2atqejbc.mjs +0 -1
  461. package/dist/chunks/MigrationDialog-0.7.0-wqtqgs70.mjs +0 -1
  462. package/dist/chunks/Onboarding-0.7.0-xe2s643k.mjs +0 -1
  463. package/dist/chunks/ProviderManager-0.7.0-4tbbvacv.mjs +0 -1
  464. package/dist/chunks/REPL-0.7.0-tvn2epfh.mjs +0 -1
  465. package/dist/chunks/ResumeConversation-0.7.0-6ycqmhh2.mjs +0 -1
  466. package/dist/chunks/SnapshotUpdateDialog-0.7.0-xwjwtj2z.mjs +0 -1
  467. package/dist/chunks/TeleportProgress-0.7.0-mwbsjw08.mjs +0 -1
  468. package/dist/chunks/TeleportRepoMismatchDialog-0.7.0-szdbz9rf.mjs +0 -1
  469. package/dist/chunks/TeleportResumeWrapper-0.7.0-sg1whfhh.mjs +0 -1
  470. package/dist/chunks/TmuxBackend-0.7.0-jdkh4z1a.mjs +0 -9
  471. package/dist/chunks/ToolSearchTool-0.7.0-f557bcbq.mjs +0 -1
  472. package/dist/chunks/TrustDialog-0.7.0-gfmvgcwc.mjs +0 -1
  473. package/dist/chunks/activeProvider-0.7.0-vvs597t9.mjs +0 -1
  474. package/dist/chunks/add-dir-0.7.0-tqy1qj7k.mjs +0 -1
  475. package/dist/chunks/agents-0.7.0-7mz67ymz.mjs +0 -110
  476. package/dist/chunks/agents-0.7.0-rzfq4nj1.mjs +0 -3
  477. package/dist/chunks/api-0.7.0-3ddtm43n.mjs +0 -1
  478. package/dist/chunks/asciicast-0.7.0-4hfhh3bz.mjs +0 -1
  479. package/dist/chunks/assistant-0.7.0-hq9qp39j.mjs +0 -1
  480. package/dist/chunks/auth-0.7.0-j0ecrgmw.mjs +0 -1
  481. package/dist/chunks/auth-0.7.0-q33dw9jq.mjs +0 -1
  482. package/dist/chunks/autoMode-0.7.0-jt8mnf1a.mjs +0 -48
  483. package/dist/chunks/autoUpdater-0.7.0-pk6cxrr5.mjs +0 -1
  484. package/dist/chunks/backgroundHousekeeping-0.7.0-n50bjkpa.mjs +0 -1
  485. package/dist/chunks/branch-0.7.0-2nvgp1ch.mjs +0 -4
  486. package/dist/chunks/bridge-0.7.0-n76zrpx7.mjs +0 -2
  487. package/dist/chunks/bridgeConfig-0.7.0-wavdtzat.mjs +0 -1
  488. package/dist/chunks/bridgeEnabled-0.7.0-eqjw3fax.mjs +0 -1
  489. package/dist/chunks/bridgeMain-0.7.0-7n73zfpq.mjs +0 -88
  490. package/dist/chunks/bridgePointer-0.7.0-49x6tn3y.mjs +0 -1
  491. package/dist/chunks/btw-0.7.0-d2cavbgh.mjs +0 -1
  492. package/dist/chunks/buddy-0.7.0-3r0qt58d.mjs +0 -3
  493. package/dist/chunks/cacache-0.7.0-tsq5tf6t.mjs +0 -1
  494. package/dist/chunks/cache-probe-0.7.0-521yf1je.mjs +0 -21
  495. package/dist/chunks/cacheStats-0.7.0-xrpkvgry.mjs +0 -4
  496. package/dist/chunks/caches-0.7.0-khrzrs38.mjs +0 -1
  497. package/dist/chunks/claudeDesktop-0.7.0-9vm9zdzp.mjs +0 -1
  498. package/dist/chunks/claudemd-0.7.0-06x6wykt.mjs +0 -1
  499. package/dist/chunks/clear-0.7.0-0hkt8avg.mjs +0 -1
  500. package/dist/chunks/clearTerminal-0.7.0-np2er6we.mjs +0 -1
  501. package/dist/chunks/cli-0.7.0-0bzz8t89.mjs +0 -2
  502. package/dist/chunks/cli-0.7.0-0cp32djm.mjs +0 -2
  503. package/dist/chunks/cli-0.7.0-0hzevdxp.mjs +0 -8
  504. package/dist/chunks/cli-0.7.0-0r9dgw51.mjs +0 -3
  505. package/dist/chunks/cli-0.7.0-0vdrrv1g.mjs +0 -2
  506. package/dist/chunks/cli-0.7.0-154gmfg4.mjs +0 -2
  507. package/dist/chunks/cli-0.7.0-15wmymmf.mjs +0 -2
  508. package/dist/chunks/cli-0.7.0-19swb9c9.mjs +0 -2
  509. package/dist/chunks/cli-0.7.0-1b6xe3b3.mjs +0 -3
  510. package/dist/chunks/cli-0.7.0-1evcxwvq.mjs +0 -9
  511. package/dist/chunks/cli-0.7.0-1tb38zvv.mjs +0 -2
  512. package/dist/chunks/cli-0.7.0-1vvj7vh2.mjs +0 -4
  513. package/dist/chunks/cli-0.7.0-21zw08ne.mjs +0 -4
  514. package/dist/chunks/cli-0.7.0-24z25c8v.mjs +0 -2
  515. package/dist/chunks/cli-0.7.0-252v8s5n.mjs +0 -20
  516. package/dist/chunks/cli-0.7.0-29zphpz9.mjs +0 -2
  517. package/dist/chunks/cli-0.7.0-2cdwx892.mjs +0 -3
  518. package/dist/chunks/cli-0.7.0-2etvr47t.mjs +0 -24
  519. package/dist/chunks/cli-0.7.0-2nytysyy.mjs +0 -2
  520. package/dist/chunks/cli-0.7.0-383nrwhr.mjs +0 -18
  521. package/dist/chunks/cli-0.7.0-3fnqxks0.mjs +0 -5
  522. package/dist/chunks/cli-0.7.0-3knzsvn6.mjs +0 -2
  523. package/dist/chunks/cli-0.7.0-3n9nagt9.mjs +0 -2
  524. package/dist/chunks/cli-0.7.0-3stm3k7p.mjs +0 -12
  525. package/dist/chunks/cli-0.7.0-3xtc467b.mjs +0 -2
  526. package/dist/chunks/cli-0.7.0-48ycf0c3.mjs +0 -2
  527. package/dist/chunks/cli-0.7.0-48yfvx4w.mjs +0 -2
  528. package/dist/chunks/cli-0.7.0-49k0drxj.mjs +0 -2
  529. package/dist/chunks/cli-0.7.0-4d58csqr.mjs +0 -2
  530. package/dist/chunks/cli-0.7.0-4s9f320h.mjs +0 -2
  531. package/dist/chunks/cli-0.7.0-4t41vxc0.mjs +0 -2
  532. package/dist/chunks/cli-0.7.0-4z8583dp.mjs +0 -2
  533. package/dist/chunks/cli-0.7.0-4z9nwzzv.mjs +0 -2
  534. package/dist/chunks/cli-0.7.0-4zvtjdd8.mjs +0 -2
  535. package/dist/chunks/cli-0.7.0-5df67dbk.mjs +0 -2
  536. package/dist/chunks/cli-0.7.0-5fx679he.mjs +0 -2
  537. package/dist/chunks/cli-0.7.0-5ktz31fq.mjs +0 -67
  538. package/dist/chunks/cli-0.7.0-5yvefnpr.mjs +0 -3
  539. package/dist/chunks/cli-0.7.0-68mgyfr7.mjs +0 -2
  540. package/dist/chunks/cli-0.7.0-6v89j1h0.mjs +0 -2
  541. package/dist/chunks/cli-0.7.0-747esby6.mjs +0 -2
  542. package/dist/chunks/cli-0.7.0-7c24mbsm.mjs +0 -2
  543. package/dist/chunks/cli-0.7.0-7g132rdj.mjs +0 -5420
  544. package/dist/chunks/cli-0.7.0-83nm3wtf.mjs +0 -2
  545. package/dist/chunks/cli-0.7.0-89798mg3.mjs +0 -2
  546. package/dist/chunks/cli-0.7.0-8begebnr.mjs +0 -3
  547. package/dist/chunks/cli-0.7.0-8p56ked8.mjs +0 -2
  548. package/dist/chunks/cli-0.7.0-8qwe028y.mjs +0 -2
  549. package/dist/chunks/cli-0.7.0-9jzkqcfv.mjs +0 -16
  550. package/dist/chunks/cli-0.7.0-9mk6sjcz.mjs +0 -4
  551. package/dist/chunks/cli-0.7.0-9p8vefz6.mjs +0 -18
  552. package/dist/chunks/cli-0.7.0-a088q8ep.mjs +0 -2
  553. package/dist/chunks/cli-0.7.0-a0dt04a7.mjs +0 -2
  554. package/dist/chunks/cli-0.7.0-a7rry8ha.mjs +0 -2
  555. package/dist/chunks/cli-0.7.0-ad4z1hfv.mjs +0 -50
  556. package/dist/chunks/cli-0.7.0-aewz8nz4.mjs +0 -2
  557. package/dist/chunks/cli-0.7.0-apkk9390.mjs +0 -3
  558. package/dist/chunks/cli-0.7.0-asw5nd1q.mjs +0 -2
  559. package/dist/chunks/cli-0.7.0-avczxk44.mjs +0 -2
  560. package/dist/chunks/cli-0.7.0-avw5kb07.mjs +0 -2
  561. package/dist/chunks/cli-0.7.0-ba1xb8x3.mjs +0 -4
  562. package/dist/chunks/cli-0.7.0-bacjkqga.mjs +0 -2
  563. package/dist/chunks/cli-0.7.0-bn0k1nzk.mjs +0 -2
  564. package/dist/chunks/cli-0.7.0-cb16hgkh.mjs +0 -2
  565. package/dist/chunks/cli-0.7.0-cjxpqpns.mjs +0 -3
  566. package/dist/chunks/cli-0.7.0-ct2kfpct.mjs +0 -2
  567. package/dist/chunks/cli-0.7.0-cwxeffcg.mjs +0 -2
  568. package/dist/chunks/cli-0.7.0-d56bajvn.mjs +0 -2
  569. package/dist/chunks/cli-0.7.0-d5bt2ahd.mjs +0 -2
  570. package/dist/chunks/cli-0.7.0-d6h4eqtj.mjs +0 -2
  571. package/dist/chunks/cli-0.7.0-d8vr3j93.mjs +0 -2
  572. package/dist/chunks/cli-0.7.0-dem9bmt6.mjs +0 -2
  573. package/dist/chunks/cli-0.7.0-dpaewdhn.mjs +0 -2
  574. package/dist/chunks/cli-0.7.0-dszmq0g3.mjs +0 -2
  575. package/dist/chunks/cli-0.7.0-dtxyc2mt.mjs +0 -2
  576. package/dist/chunks/cli-0.7.0-dxnyr5rv.mjs +0 -2
  577. package/dist/chunks/cli-0.7.0-dyhamqem.mjs +0 -2
  578. package/dist/chunks/cli-0.7.0-e1esnrzt.mjs +0 -42
  579. package/dist/chunks/cli-0.7.0-e1mycvjk.mjs +0 -2
  580. package/dist/chunks/cli-0.7.0-e39zcyhp.mjs +0 -4
  581. package/dist/chunks/cli-0.7.0-e6mves6r.mjs +0 -2
  582. package/dist/chunks/cli-0.7.0-eayr3nfv.mjs +0 -2
  583. package/dist/chunks/cli-0.7.0-ecwta6mh.mjs +0 -2
  584. package/dist/chunks/cli-0.7.0-eddwmcdn.mjs +0 -2
  585. package/dist/chunks/cli-0.7.0-es6y6s82.mjs +0 -12
  586. package/dist/chunks/cli-0.7.0-ewbn59cm.mjs +0 -2
  587. package/dist/chunks/cli-0.7.0-ewcemx0m.mjs +0 -2
  588. package/dist/chunks/cli-0.7.0-f62gcsfa.mjs +0 -2
  589. package/dist/chunks/cli-0.7.0-f7mqc27p.mjs +0 -6
  590. package/dist/chunks/cli-0.7.0-ffy8few4.mjs +0 -3
  591. package/dist/chunks/cli-0.7.0-ft5gef81.mjs +0 -2
  592. package/dist/chunks/cli-0.7.0-ftjagwyg.mjs +0 -2
  593. package/dist/chunks/cli-0.7.0-fxv77y2t.mjs +0 -12
  594. package/dist/chunks/cli-0.7.0-g2ekvm09.mjs +0 -6
  595. package/dist/chunks/cli-0.7.0-g46gs4dx.mjs +0 -2
  596. package/dist/chunks/cli-0.7.0-g5qxznar.mjs +0 -2
  597. package/dist/chunks/cli-0.7.0-gafgf0er.mjs +0 -2
  598. package/dist/chunks/cli-0.7.0-gkssrwr6.mjs +0 -34
  599. package/dist/chunks/cli-0.7.0-h6kfhzzd.mjs +0 -193
  600. package/dist/chunks/cli-0.7.0-hmjg8yfx.mjs +0 -2
  601. package/dist/chunks/cli-0.7.0-hrtdae85.mjs +0 -6
  602. package/dist/chunks/cli-0.7.0-hxf1ckjt.mjs +0 -12
  603. package/dist/chunks/cli-0.7.0-hxph4t80.mjs +0 -2
  604. package/dist/chunks/cli-0.7.0-j4jzhywr.mjs +0 -3
  605. package/dist/chunks/cli-0.7.0-je29e78f.mjs +0 -2
  606. package/dist/chunks/cli-0.7.0-jmsrj8j2.mjs +0 -4
  607. package/dist/chunks/cli-0.7.0-jvkyhn8x.mjs +0 -2
  608. package/dist/chunks/cli-0.7.0-k3qqc7gx.mjs +0 -2
  609. package/dist/chunks/cli-0.7.0-k7w5n7pe.mjs +0 -2
  610. package/dist/chunks/cli-0.7.0-kkpf8bhn.mjs +0 -2
  611. package/dist/chunks/cli-0.7.0-kngw06pw.mjs +0 -4
  612. package/dist/chunks/cli-0.7.0-kp7f47zq.mjs +0 -2
  613. package/dist/chunks/cli-0.7.0-kpfe5dkw.mjs +0 -2
  614. package/dist/chunks/cli-0.7.0-kr6jdp53.mjs +0 -133
  615. package/dist/chunks/cli-0.7.0-kw0wp8vs.mjs +0 -2
  616. package/dist/chunks/cli-0.7.0-kw554ntj.mjs +0 -3
  617. package/dist/chunks/cli-0.7.0-m07xma4d.mjs +0 -2
  618. package/dist/chunks/cli-0.7.0-m6ysmj08.mjs +0 -39
  619. package/dist/chunks/cli-0.7.0-mea2neea.mjs +0 -133
  620. package/dist/chunks/cli-0.7.0-mn3gdwp2.mjs +0 -17
  621. package/dist/chunks/cli-0.7.0-mnbdk339.mjs +0 -3
  622. package/dist/chunks/cli-0.7.0-n0s94kev.mjs +0 -2
  623. package/dist/chunks/cli-0.7.0-n0twknfk.mjs +0 -2
  624. package/dist/chunks/cli-0.7.0-na9s209m.mjs +0 -2
  625. package/dist/chunks/cli-0.7.0-p96azep2.mjs +0 -7
  626. package/dist/chunks/cli-0.7.0-p9c7eask.mjs +0 -2
  627. package/dist/chunks/cli-0.7.0-p9q4x3f1.mjs +0 -59
  628. package/dist/chunks/cli-0.7.0-pbs0cx53.mjs +0 -2
  629. package/dist/chunks/cli-0.7.0-petmjdha.mjs +0 -2
  630. package/dist/chunks/cli-0.7.0-pf2fr5cc.mjs +0 -4
  631. package/dist/chunks/cli-0.7.0-pfcabga3.mjs +0 -2
  632. package/dist/chunks/cli-0.7.0-ppqzq0zp.mjs +0 -2
  633. package/dist/chunks/cli-0.7.0-q5sbn5b2.mjs +0 -4
  634. package/dist/chunks/cli-0.7.0-q70ex7jy.mjs +0 -2
  635. package/dist/chunks/cli-0.7.0-qeg8v19s.mjs +0 -2
  636. package/dist/chunks/cli-0.7.0-qftredzy.mjs +0 -2
  637. package/dist/chunks/cli-0.7.0-qmckaxpm.mjs +0 -2
  638. package/dist/chunks/cli-0.7.0-r8g195r8.mjs +0 -15
  639. package/dist/chunks/cli-0.7.0-rmprwgax.mjs +0 -2
  640. package/dist/chunks/cli-0.7.0-rnahtcw9.mjs +0 -5
  641. package/dist/chunks/cli-0.7.0-rxhbb3ca.mjs +0 -2
  642. package/dist/chunks/cli-0.7.0-s0b5jjrj.mjs +0 -2
  643. package/dist/chunks/cli-0.7.0-s14kw5d6.mjs +0 -2
  644. package/dist/chunks/cli-0.7.0-s4at7t0q.mjs +0 -2
  645. package/dist/chunks/cli-0.7.0-s8rt9fpg.mjs +0 -2
  646. package/dist/chunks/cli-0.7.0-s9hgep30.mjs +0 -3
  647. package/dist/chunks/cli-0.7.0-sbwhas5a.mjs +0 -18
  648. package/dist/chunks/cli-0.7.0-tcxmyk2w.mjs +0 -2
  649. package/dist/chunks/cli-0.7.0-tjpp46xm.mjs +0 -2
  650. package/dist/chunks/cli-0.7.0-tvwks6zm.mjs +0 -2
  651. package/dist/chunks/cli-0.7.0-twxrndmz.mjs +0 -4
  652. package/dist/chunks/cli-0.7.0-v6ceqq5f.mjs +0 -2
  653. package/dist/chunks/cli-0.7.0-v7hc34ad.mjs +0 -2
  654. package/dist/chunks/cli-0.7.0-v92q5ffm.mjs +0 -2
  655. package/dist/chunks/cli-0.7.0-vf7bbn80.mjs +0 -5
  656. package/dist/chunks/cli-0.7.0-vfzbn5qv.mjs +0 -2
  657. package/dist/chunks/cli-0.7.0-vp89ypch.mjs +0 -24
  658. package/dist/chunks/cli-0.7.0-vvb9pc7x.mjs +0 -3
  659. package/dist/chunks/cli-0.7.0-vzpjsnyh.mjs +0 -2
  660. package/dist/chunks/cli-0.7.0-vzvrhx5c.mjs +0 -2
  661. package/dist/chunks/cli-0.7.0-w0nw2kkk.mjs +0 -17
  662. package/dist/chunks/cli-0.7.0-wb82h4c2.mjs +0 -2
  663. package/dist/chunks/cli-0.7.0-wf8v2b4s.mjs +0 -15
  664. package/dist/chunks/cli-0.7.0-wgy69726.mjs +0 -2
  665. package/dist/chunks/cli-0.7.0-wm0enq59.mjs +0 -2
  666. package/dist/chunks/cli-0.7.0-wntkecma.mjs +0 -2
  667. package/dist/chunks/cli-0.7.0-wspeyepj.mjs +0 -2
  668. package/dist/chunks/cli-0.7.0-wvpty7mm.mjs +0 -2
  669. package/dist/chunks/cli-0.7.0-wxynfqax.mjs +0 -2
  670. package/dist/chunks/cli-0.7.0-wzjrm1a0.mjs +0 -2
  671. package/dist/chunks/cli-0.7.0-x1xdxk52.mjs +0 -2
  672. package/dist/chunks/cli-0.7.0-x2vc8nds.mjs +0 -2
  673. package/dist/chunks/cli-0.7.0-xb864qfd.mjs +0 -2
  674. package/dist/chunks/cli-0.7.0-xfxprc47.mjs +0 -2
  675. package/dist/chunks/cli-0.7.0-xpzg1xfc.mjs +0 -2
  676. package/dist/chunks/cli-0.7.0-xvjaw51n.mjs +0 -15
  677. package/dist/chunks/cli-0.7.0-y003ay15.mjs +0 -2
  678. package/dist/chunks/cli-0.7.0-y6nkrrpn.mjs +0 -2
  679. package/dist/chunks/cli-0.7.0-ybdk9aq6.mjs +0 -21
  680. package/dist/chunks/cli-0.7.0-ybwa4x6g.mjs +0 -2
  681. package/dist/chunks/cli-0.7.0-ycew6bek.mjs +0 -2
  682. package/dist/chunks/cli-0.7.0-ye6sm33j.mjs +0 -2
  683. package/dist/chunks/cli-0.7.0-ytqbgtvc.mjs +0 -2
  684. package/dist/chunks/cli-0.7.0-yts7snkm.mjs +0 -45
  685. package/dist/chunks/cli-0.7.0-yw6r7fw4.mjs +0 -58
  686. package/dist/chunks/cli-0.7.0-z15a5zq0.mjs +0 -2
  687. package/dist/chunks/cli-0.7.0-z7sydqy8.mjs +0 -2
  688. package/dist/chunks/cli-0.7.0-z93va7tf.mjs +0 -2
  689. package/dist/chunks/cli-0.7.0-zd1q68sv.mjs +0 -2
  690. package/dist/chunks/cli-0.7.0-zdbaf370.mjs +0 -10
  691. package/dist/chunks/cli-0.7.0-zf3jaceq.mjs +0 -2
  692. package/dist/chunks/cli-0.7.0-zh93d2ez.mjs +0 -2
  693. package/dist/chunks/cli-0.7.0-zjfpqpke.mjs +0 -1
  694. package/dist/chunks/cli-0.7.0-zmfejrs2.mjs +0 -25
  695. package/dist/chunks/cli-0.7.0-zn444tdk.mjs +0 -2
  696. package/dist/chunks/cli-0.7.0-zqv149an.mjs +0 -6
  697. package/dist/chunks/cli-0.7.0-zscdr61q.mjs +0 -2
  698. package/dist/chunks/cli-0.7.0-ztc21898.mjs +0 -2
  699. package/dist/chunks/client-0.7.0-mxq1x2gd.mjs +0 -1
  700. package/dist/chunks/color-0.7.0-q8kx1h5f.mjs +0 -1
  701. package/dist/chunks/compact-0.7.0-wej8t29a.mjs +0 -3
  702. package/dist/chunks/config-0.7.0-1vqyzdss.mjs +0 -1
  703. package/dist/chunks/config-0.7.0-29b2exhr.mjs +0 -1
  704. package/dist/chunks/constants-0.7.0-cwe25jjg.mjs +0 -1
  705. package/dist/chunks/context-0.7.0-wzkh0ek3.mjs +0 -1
  706. package/dist/chunks/context-noninteractive-0.7.0-3knrv7yy.mjs +0 -1
  707. package/dist/chunks/conversation-0.7.0-5gwkat1n.mjs +0 -1
  708. package/dist/chunks/copilotHeaders-0.7.0-k7qbvwa0.mjs +0 -1
  709. package/dist/chunks/copy-0.7.0-g9547w2e.mjs +0 -9
  710. package/dist/chunks/cost-0.7.0-g07zzraf.mjs +0 -1
  711. package/dist/chunks/createSSHSession-0.7.0-x69ccesr.mjs +0 -1
  712. package/dist/chunks/createSession-0.7.0-eythrhrd.mjs +0 -1
  713. package/dist/chunks/debug-0.7.0-grf8etmz.mjs +0 -1
  714. package/dist/chunks/defaultActionDeps-0.7.0-3msvjhye.mjs +0 -1367
  715. package/dist/chunks/desktop-0.7.0-qv2bt4fq.mjs +0 -1
  716. package/dist/chunks/detectRepository-0.7.0-8kzz057x.mjs +0 -1
  717. package/dist/chunks/detection-0.7.0-d8z59p8p.mjs +0 -1
  718. package/dist/chunks/diff-0.7.0-wx4fgtnt.mjs +0 -1
  719. package/dist/chunks/doctor-0.7.0-dzm456q1.mjs +0 -1
  720. package/dist/chunks/doctorDiagnostic-0.7.0-jysj36mx.mjs +0 -1
  721. package/dist/chunks/earlyInput-0.7.0-31tzwhjp.mjs +0 -1
  722. package/dist/chunks/effort-0.7.0-w94qsmp1.mjs +0 -10
  723. package/dist/chunks/envLessBridgeConfig-0.7.0-2vzfvw7j.mjs +0 -1
  724. package/dist/chunks/envUtils-0.7.0-wak5qkkv.mjs +0 -1
  725. package/dist/chunks/environmentSelection-0.7.0-xe6h6x4v.mjs +0 -1
  726. package/dist/chunks/environments-0.7.0-cdxqsbrp.mjs +0 -1
  727. package/dist/chunks/errors-0.7.0-hrt3tamp.mjs +0 -1
  728. package/dist/chunks/exampleCommands-0.7.0-v49vtt40.mjs +0 -1
  729. package/dist/chunks/exit-0.7.0-xpc13d1z.mjs +0 -1
  730. package/dist/chunks/explorer-0.7.0-yy3jawy1.mjs +0 -1
  731. package/dist/chunks/export-0.7.0-689scwyv.mjs +0 -2
  732. package/dist/chunks/extra-usage-0.7.0-675a7x8f.mjs +0 -1
  733. package/dist/chunks/extra-usage-noninteractive-0.7.0-2h542mq6.mjs +0 -1
  734. package/dist/chunks/fast-0.7.0-dwxy8xan.mjs +0 -1
  735. package/dist/chunks/feedback-0.7.0-kms98grz.mjs +0 -14
  736. package/dist/chunks/firstPartyEventLogger-0.7.0-5gy0hbjg.mjs +0 -1
  737. package/dist/chunks/git-0.7.0-bsn50mym.mjs +0 -1
  738. package/dist/chunks/githubModelsCredentials-0.7.0-f9n1jk8g.mjs +0 -1
  739. package/dist/chunks/goal-0.7.0-ben8pbys.mjs +0 -4
  740. package/dist/chunks/grove-0.7.0-5vca5g43.mjs +0 -1
  741. package/dist/chunks/growthbook-0.7.0-ged09pjv.mjs +0 -1
  742. package/dist/chunks/headless-0.7.0-6gxn4ya0.mjs +0 -2
  743. package/dist/chunks/heapdump-0.7.0-jbnb1enq.mjs +0 -6
  744. package/dist/chunks/help-0.7.0-s11djcbq.mjs +0 -1
  745. package/dist/chunks/hookChains-0.7.0-q104805z.mjs +0 -3
  746. package/dist/chunks/hooks-0.7.0-3tzcnyt1.mjs +0 -1
  747. package/dist/chunks/hooks-0.7.0-m0qzy27a.mjs +0 -79
  748. package/dist/chunks/ide-0.7.0-rqh7pczf.mjs +0 -3
  749. package/dist/chunks/image-processor-napi-0.7.0-t874vmrb.mjs +0 -1
  750. package/dist/chunks/inboundAttachments-0.7.0-9h4k1v8p.mjs +0 -1
  751. package/dist/chunks/index-0.7.0-0pb4fykd.mjs +0 -1
  752. package/dist/chunks/index-0.7.0-339ebzg3.mjs +0 -1
  753. package/dist/chunks/index-0.7.0-3qc9y7vs.mjs +0 -1
  754. package/dist/chunks/index-0.7.0-8xaka5b5.mjs +0 -1
  755. package/dist/chunks/index-0.7.0-aghbrz36.mjs +0 -1
  756. package/dist/chunks/index-0.7.0-asx0vcnp.mjs +0 -1
  757. package/dist/chunks/index-0.7.0-at8f760s.mjs +0 -2
  758. package/dist/chunks/index-0.7.0-aw15r8m5.mjs +0 -1
  759. package/dist/chunks/index-0.7.0-b95077ct.mjs +0 -1
  760. package/dist/chunks/index-0.7.0-etmdkstm.mjs +0 -1
  761. package/dist/chunks/index-0.7.0-fhnz63fp.mjs +0 -1
  762. package/dist/chunks/index-0.7.0-fx8935ev.mjs +0 -5
  763. package/dist/chunks/index-0.7.0-hwyk7tea.mjs +0 -30
  764. package/dist/chunks/index-0.7.0-nb6m1jch.mjs +0 -1
  765. package/dist/chunks/index-0.7.0-p4n8wp5y.mjs +0 -9
  766. package/dist/chunks/index-0.7.0-rbb0bwpy.mjs +0 -1
  767. package/dist/chunks/index-0.7.0-rq05kg71.mjs +0 -17
  768. package/dist/chunks/index-0.7.0-vk7vxjae.mjs +0 -1
  769. package/dist/chunks/index-0.7.0-wjsr1d6k.mjs +0 -2
  770. package/dist/chunks/index-0.7.0-x03pfhyx.mjs +0 -9
  771. package/dist/chunks/index-0.7.0-y22a1z29.mjs +0 -1
  772. package/dist/chunks/index-0.7.0-yx3335f1.mjs +0 -1
  773. package/dist/chunks/index-0.7.0-zsw19y1x.mjs +0 -1
  774. package/dist/chunks/init-0.7.0-f0taef1q.mjs +0 -1
  775. package/dist/chunks/initReplBridge-0.7.0-wcvxy8w8.mjs +0 -1
  776. package/dist/chunks/ink-0.7.0-xpha78d8.mjs +0 -1
  777. package/dist/chunks/insights-0.7.0-x0rwvydg.mjs +0 -870
  778. package/dist/chunks/install-0.7.0-ncp2pec7.mjs +0 -1
  779. package/dist/chunks/install-github-app-0.7.0-trt9558z.mjs +0 -149
  780. package/dist/chunks/install-slack-app-0.7.0-kjz97cdh.mjs +0 -1
  781. package/dist/chunks/instrumentation-0.7.0-bey09njh.mjs +0 -1
  782. package/dist/chunks/interactiveHelpers-0.7.0-1qs1kree.mjs +0 -1
  783. package/dist/chunks/keybindings-0.7.0-ekf19qhh.mjs +0 -2
  784. package/dist/chunks/knowledge-0.7.0-adck5x26.mjs +0 -2
  785. package/dist/chunks/latestVersionCache-0.7.0-ark5pmnp.mjs +0 -1
  786. package/dist/chunks/loadAgentsDir-0.7.0-5ae7wa3t.mjs +0 -1
  787. package/dist/chunks/loadPluginHooks-0.7.0-vhwhvb6f.mjs +0 -1
  788. package/dist/chunks/loadPluginHooks-0.7.0-xb4qdrg0.mjs +0 -1
  789. package/dist/chunks/log-0.7.0-6mtk9ch7.mjs +0 -1
  790. package/dist/chunks/main-0.7.0-v0y4hrdm.mjs +0 -1
  791. package/dist/chunks/managedEnv-0.7.0-n64hpsst.mjs +0 -1
  792. package/dist/chunks/mcp-0.7.0-2j3bkwz5.mjs +0 -1
  793. package/dist/chunks/mcp-0.7.0-rqwvyycg.mjs +0 -4
  794. package/dist/chunks/mcp-0.7.0-t0pqt6hy.mjs +0 -17
  795. package/dist/chunks/mcpb-0.7.0-wmg0861b.mjs +0 -1
  796. package/dist/chunks/memory-0.7.0-gfe3p8h2.mjs +0 -3
  797. package/dist/chunks/model-0.7.0-anb8mgtp.mjs +0 -2
  798. package/dist/chunks/model-0.7.0-jxz0n7g1.mjs +0 -1
  799. package/dist/chunks/node-0.7.0-4sagcnk2.mjs +0 -12
  800. package/dist/chunks/oauth-0.7.0-n3tj8amn.mjs +0 -1
  801. package/dist/chunks/openaiShim-0.7.0-9bq5572t.mjs +0 -14
  802. package/dist/chunks/output-style-0.7.0-wmxwqrx6.mjs +0 -1
  803. package/dist/chunks/package-GCDC7LJR-0.7.0-fke68t3z.mjs +0 -1
  804. package/dist/chunks/parseConnectUrl-0.7.0-p5aq0xy4.mjs +0 -1
  805. package/dist/chunks/parser-0.7.0-a4qhvrn9.mjs +0 -1
  806. package/dist/chunks/passes-0.7.0-4wxjh63r.mjs +0 -1
  807. package/dist/chunks/permissions-0.7.0-cth9pb19.mjs +0 -3
  808. package/dist/chunks/permissions-0.7.0-nxre3gew.mjs +0 -1
  809. package/dist/chunks/plan-0.7.0-0t3hxxwf.mjs +0 -1
  810. package/dist/chunks/plist-0.7.0-ptbkp7b8.mjs +0 -1
  811. package/dist/chunks/plugin-0.7.0-4zewdh7s.mjs +0 -29
  812. package/dist/chunks/pluginStartupCheck-0.7.0-3zvpdbjz.mjs +0 -1
  813. package/dist/chunks/plugins-0.7.0-dyrrfzzb.mjs +0 -9
  814. package/dist/chunks/preActionHook-0.7.0-agzbsqyv.mjs +0 -2
  815. package/dist/chunks/print-0.7.0-m81z10rw.mjs +0 -57
  816. package/dist/chunks/privacy-settings-0.7.0-qvrhcvbv.mjs +0 -1
  817. package/dist/chunks/process-0.7.0-4rnq2g80.mjs +0 -1
  818. package/dist/chunks/processBashCommand-0.7.0-htmch7xm.mjs +0 -1
  819. package/dist/chunks/processSlashCommand-0.7.0-gj7mbd0a.mjs +0 -9
  820. package/dist/chunks/prompt-0.7.0-2d4qsrq9.mjs +0 -1
  821. package/dist/chunks/prompt-0.7.0-rkefqrwh.mjs +0 -1
  822. package/dist/chunks/prompts-0.7.0-ty3k4n75.mjs +0 -1
  823. package/dist/chunks/protocolHandler-0.7.0-aqsa4ph2.mjs +0 -13
  824. package/dist/chunks/provider-0.7.0-yw5h323y.mjs +0 -2
  825. package/dist/chunks/providerProfiles-0.7.0-vdm0m870.mjs +0 -1
  826. package/dist/chunks/providerValidation-0.7.0-rtzpgzra.mjs +0 -6
  827. package/dist/chunks/rate-limit-options-0.7.0-dqtjdpft.mjs +0 -1
  828. package/dist/chunks/registerSubcommands-0.7.0-r5wmbkz9.mjs +0 -34
  829. package/dist/chunks/registry-0.7.0-jjaxz6ve.mjs +0 -1
  830. package/dist/chunks/release-notes-0.7.0-h6me5mww.mjs +0 -5
  831. package/dist/chunks/reload-plugins-0.7.0-vtr0cnwe.mjs +0 -2
  832. package/dist/chunks/remote-env-0.7.0-h013vass.mjs +0 -1
  833. package/dist/chunks/remoteBridgeCore-0.7.0-fmh34c6f.mjs +0 -1
  834. package/dist/chunks/remoteSession-0.7.0-40yqbh78.mjs +0 -1
  835. package/dist/chunks/rename-0.7.0-wqs6kjb7.mjs +0 -1
  836. package/dist/chunks/replBridgeHandle-0.7.0-d192ahyh.mjs +0 -1
  837. package/dist/chunks/replLauncher-0.7.0-gtmcyxgm.mjs +0 -1
  838. package/dist/chunks/resume-0.7.0-6cy3j2e8.mjs +0 -2
  839. package/dist/chunks/rewind-0.7.0-kepxqnvs.mjs +0 -1
  840. package/dist/chunks/rootOptions-0.7.0-00ekm71j.mjs +0 -1
  841. package/dist/chunks/sandbox-adapter-0.7.0-env8r2gg.mjs +0 -1
  842. package/dist/chunks/sandbox-toggle-0.7.0-wk296sbw.mjs +0 -1
  843. package/dist/chunks/session-0.7.0-qbmq7k37.mjs +0 -2
  844. package/dist/chunks/sessionDiscovery-0.7.0-xf03hmpk.mjs +0 -1
  845. package/dist/chunks/sessionFileAccessHooks-0.7.0-gw8qw3zp.mjs +0 -1
  846. package/dist/chunks/sessionStorage-0.7.0-vcyz3dw7.mjs +0 -1
  847. package/dist/chunks/settings-0.7.0-3k9dr8ys.mjs +0 -1
  848. package/dist/chunks/setup-0.7.0-9ync2tk7.mjs +0 -5
  849. package/dist/chunks/sinks-0.7.0-g1bwkwh0.mjs +0 -1
  850. package/dist/chunks/skills-0.7.0-hjdx42cr.mjs +0 -1
  851. package/dist/chunks/startupProfiler-0.7.0-b32wtvbf.mjs +0 -1
  852. package/dist/chunks/startupUpdateCheck-0.7.0-m55han8a.mjs +0 -1
  853. package/dist/chunks/state-0.7.0-g9nbt1zn.mjs +0 -1
  854. package/dist/chunks/stats-0.7.0-429ntw0k.mjs +0 -6
  855. package/dist/chunks/status-0.7.0-h19n5a31.mjs +0 -1
  856. package/dist/chunks/stickers-0.7.0-q34hs61c.mjs +0 -1
  857. package/dist/chunks/subprocessEnv-0.7.0-gz4xjdce.mjs +0 -1
  858. package/dist/chunks/tasks-0.7.0-e2rrgr6x.mjs +0 -1
  859. package/dist/chunks/teamHelpers-0.7.0-jss9q0ak.mjs +0 -1
  860. package/dist/chunks/teammateModeSnapshot-0.7.0-c7ekrdae.mjs +0 -1
  861. package/dist/chunks/teleport-0.7.0-n0h6pqs8.mjs +0 -1
  862. package/dist/chunks/terminalSetup-0.7.0-ycw8nd2k.mjs +0 -1
  863. package/dist/chunks/theme-0.7.0-2dzcdk7a.mjs +0 -1
  864. package/dist/chunks/thinkback-0.7.0-9xhfd6ab.mjs +0 -1
  865. package/dist/chunks/thinkback-play-0.7.0-yqj7b8tt.mjs +0 -1
  866. package/dist/chunks/toolPool-0.7.0-xes3fby4.mjs +0 -1
  867. package/dist/chunks/toolSearch-0.7.0-wkaae53k.mjs +0 -1
  868. package/dist/chunks/tools-0.7.0-7qjq03x9.mjs +0 -1
  869. package/dist/chunks/trustedDevice-0.7.0-0jcs8sag.mjs +0 -1
  870. package/dist/chunks/turndown.cjs-0.7.0-evvr9k3e.mjs +0 -69
  871. package/dist/chunks/types-0.7.0-7t30qdm7.mjs +0 -1
  872. package/dist/chunks/ultrareviewCommand-0.7.0-mt2gyqrs.mjs +0 -4
  873. package/dist/chunks/update-0.7.0-d79xsjyx.mjs +0 -86
  874. package/dist/chunks/upgrade-0.7.0-29j99fm4.mjs +0 -1
  875. package/dist/chunks/upload-0.7.0-c88xwfr6.mjs +0 -7
  876. package/dist/chunks/upstreamproxy-0.7.0-qha2t9zm.mjs +0 -14
  877. package/dist/chunks/url-handler-napi-0.7.0-d2khwe8w.mjs +0 -1
  878. package/dist/chunks/usage-0.7.0-fz211dwp.mjs +0 -1
  879. package/dist/chunks/util-0.7.0-kre9h9qa.mjs +0 -1
  880. package/dist/chunks/utils-0.7.0-vw4eq452.mjs +0 -1
  881. package/dist/chunks/vim-0.7.0-2tzpxf7d.mjs +0 -1
  882. package/dist/chunks/watcher-0.7.0-dbb0csvt.mjs +0 -1
  883. package/dist/chunks/wiki-0.7.0-etkhyz2p.mjs +0 -132
  884. package/dist/chunks/worktree-0.7.0-ntn0xdnq.mjs +0 -1
  885. package/dist/chunks/worktreeModeEnabled-0.7.0-h5ak3bk5.mjs +0 -1
  886. package/dist/chunks/wrapper-0.7.0-zvn0r75t.mjs +0 -7
  887. /package/dist/chunks/{cli-0.7.0-z555y4ap.mjs → cli-0.7.2-1xbehmgb.mjs} +0 -0
  888. /package/dist/chunks/{cli-0.7.0-jt2afswt.mjs → cli-0.7.2-5c89p68w.mjs} +0 -0
  889. /package/dist/chunks/{cli-0.7.0-brqbb2d5.mjs → cli-0.7.2-796x24s1.mjs} +0 -0
  890. /package/dist/chunks/{cli-0.7.0-m9eza7ry.mjs → cli-0.7.2-b9pdb0nv.mjs} +0 -0
  891. /package/dist/chunks/{cli-0.7.0-5vszg5ys.mjs → cli-0.7.2-d5fbych4.mjs} +0 -0
  892. /package/dist/chunks/{cli-0.7.0-59h7jbfm.mjs → cli-0.7.2-q9twb2tn.mjs} +0 -0
  893. /package/dist/chunks/{cli-0.7.0-76wj8x34.mjs → cli-0.7.2-yppcb6em.mjs} +0 -0
@@ -0,0 +1,193 @@
1
+ import{_ea as o6,dfa as aW}from"./cli-0.7.2-5ca5nqtj.mjs";import{lfa as Vq,nfa as c6,ofa as hI}from"./cli-0.7.2-7rjfehxm.mjs";import{Kfa as Q3,yfa as S1}from"./cli-0.7.2-twx01hwg.mjs";import{$fa as EW,Nfa as BL,Qfa as EN,Wfa as d5,_fa as s_,bga as G,cga as Wq,dga as n0,ega as I,fga as g1}from"./cli-0.7.2-pbaedfkk.mjs";import{Nga as yN,iga as r,jga as q1,uga as IL}from"./cli-0.7.2-dzt53r0y.mjs";import{Oga as bU,Wga as OB,Xga as hU}from"./cli-0.7.2-0v8f8cx4.mjs";import{$ga as D$,Yga as l0}from"./cli-0.7.2-kyd7mrxn.mjs";import{$ha as x,Aha as Oz,Dha as j4,Eha as m,Fha as q0,Gha as Cq,Hha as EB,Jha as z0,Kha as F1,Nha as N,Rha as D0,cha as Y4,cia as Z1,eha as GB,fha as o5,gha as Ez,hha as BX,iha as qz,jha as nQ,kha as E_,lha as kX,mha as _z,nha as x4,oha as NX,pha as CX,qha as Tz,rha as SX,sha as jz,tha as jX,uha as Hz,vha as ZX,wha as h_,xha as bX,yha as Iz,zha as hX}from"./cli-0.7.2-cqqj8v1e.mjs";import{Aia as W0,Bia as F6,Eia as A$,Gia as C1,tia as t7,yia as jL}from"./cli-0.7.2-bttmh4fa.mjs";import{Jia as G0,Mia as Z0,Nia as VV,Oia as X2,Wia as c0}from"./cli-0.7.2-wk3m6ndw.mjs";import{Dja as yX,Eja as Az,Fma as Sq,Gka as t1,Hka as h7,Hma as bq,Ila as EL,Lja as P4,Mja as FX,Pma as AL,Rma as TL,Xia as mX,Yia as kz,Yma as d$,Zja as tQ,_ja as S_,bka as T4,cka as cQ,cna as $V,dka as lQ,eka as x_,fka as oQ,gka as y_,hja as i5,hka as E4,ija as Mz,ika as rX,jka as eQ,kka as b_,lka as tW,mka as eW,nka as ZV,nma as WV,oka as qV,ona as HB,pka as JV,qka as QV,rja as N4,rka as _2,sja as MX,ska as XV,tja as a5,uja as Fz,vja as vX,vka as W$,wja as Dz,xja as A4,xoa as j6,yja as dQ}from"./cli-0.7.2-5yrman6f.mjs";import{Ioa as TX,Joa as Yz,Koa as e0,Loa as D4,Moa as EX,Noa as Rz,Woa as d,Xoa as v1,yoa as k4,zoa as VX}from"./cli-0.7.2-bd97qyyb.mjs";import{cqa as oY,dqa as $4,eqa as p,fqa as Uq,gqa as B,hqa as H0,iqa as L6,jqa as _6}from"./cli-0.7.2-5tacs42k.mjs";function eJ(Z){let q=Z.slice(Z.lastIndexOf(".")).toLowerCase();return rL.has(q)}function ZQ(Z){let q=Math.min(Z.length,tL),J=0;for(let Q=0;Q<q;Q++){let X=Z[Q];if(X===0)return!0;if(X<32&&X!==9&&X!==10&&X!==13)J++}return J/q>0.1}var rL,tL=8192;var qQ=B(()=>{rL=new Set([".png",".jpg",".jpeg",".gif",".bmp",".ico",".webp",".tiff",".tif",".mp4",".mov",".avi",".mkv",".webm",".wmv",".flv",".m4v",".mpeg",".mpg",".mp3",".wav",".ogg",".flac",".aac",".m4a",".wma",".aiff",".opus",".zip",".tar",".gz",".bz2",".7z",".rar",".xz",".z",".tgz",".iso",".exe",".dll",".so",".dylib",".bin",".o",".a",".obj",".lib",".app",".msi",".deb",".rpm",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odt",".ods",".odp",".ttf",".otf",".woff",".woff2",".eot",".pyc",".pyo",".class",".jar",".war",".ear",".node",".wasm",".rlib",".sqlite",".sqlite3",".db",".mdb",".idx",".psd",".ai",".eps",".sketch",".fig",".xd",".blend",".3ds",".max",".swf",".fla",".lockb",".dat",".data"])});import{dirname as eL}from"path";function Y0(Z,q,J){let Q=Z_();if(!Q)return;let X={timestamp:new Date().toISOString(),level:Z,event:q,data:J??{}},$=N(),Y=m(X)+`
2
+ `;try{$.appendFileSync(Q,Y)}catch{try{$.mkdirSync(eL(Q)),$.appendFileSync(Q,Y)}catch{}}}function Z_(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function gP(Z,q,J){let Q=Date.now();Y0("info",`${Z}_started`);try{let X=await q(),$=J?J(X):{};return Y0("info",`${Z}_completed`,{duration_ms:Date.now()-Q,...$}),X}catch(X){throw Y0("error",`${Z}_failed`,{duration_ms:Date.now()-Q}),X}}var K2=B(()=>{D0();z0()});var YQ=p((mP,$Q)=>{$Q.exports=XQ;XQ.sync=J_;var JQ=H0("fs");function q_(Z,q){var J=q.pathExt!==void 0?q.pathExt:process.env.PATHEXT;if(!J)return!0;if(J=J.split(";"),J.indexOf("")!==-1)return!0;for(var Q=0;Q<J.length;Q++){var X=J[Q].toLowerCase();if(X&&Z.substr(-X.length).toLowerCase()===X)return!0}return!1}function QQ(Z,q,J){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return q_(q,J)}function XQ(Z,q,J){JQ.stat(Z,function(Q,X){J(Q,Q?!1:QQ(X,Z,q))})}function J_(Z,q){return QQ(JQ.statSync(Z),Z,q)}});var WQ=p((uP,UQ)=>{UQ.exports=GQ;GQ.sync=Q_;var HQ=H0("fs");function GQ(Z,q,J){HQ.stat(Z,function(Q,X){J(Q,Q?!1:KQ(X,q))})}function Q_(Z,q){return KQ(HQ.statSync(Z),q)}function KQ(Z,q){return Z.isFile()&&X_(Z,q)}function X_(Z,q){var{mode:J,uid:Q,gid:X}=Z,$=q.uid!==void 0?q.uid:process.getuid&&process.getuid(),Y=q.gid!==void 0?q.gid:process.getgid&&process.getgid(),H=parseInt("100",8),K=parseInt("010",8),W=parseInt("001",8),U=H|K,V=J&W||J&K&&X===Y||J&H&&Q===$||J&U&&$===0;return V}});var BQ=p((dP,VQ)=>{var pP=H0("fs"),F4;if(process.platform==="win32"||global.TESTING_WINDOWS)F4=YQ();else F4=WQ();VQ.exports=N5;N5.sync=$_;function N5(Z,q,J){if(typeof q==="function")J=q,q={};if(!J){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(Q,X){N5(Z,q||{},function($,Y){if($)X($);else Q(Y)})})}F4(Z,q||{},function(Q,X){if(Q){if(Q.code==="EACCES"||q&&q.ignoreErrors)Q=null,X=!1}J(Q,X)})}function $_(Z,q){try{return F4.sync(Z,q||{})}catch(J){if(q&&q.ignoreErrors||J.code==="EACCES")return!1;else throw J}}});var DQ=p((cP,FQ)=>{var W6=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",LQ=H0("path"),Y_=W6?";":":",_Q=BQ(),zQ=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),RQ=(Z,q)=>{let J=q.colon||Y_,Q=Z.match(/\//)||W6&&Z.match(/\\/)?[""]:[...W6?[process.cwd()]:[],...(q.path||process.env.PATH||"").split(J)],X=W6?q.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",$=W6?X.split(J):[""];if(W6){if(Z.indexOf(".")!==-1&&$[0]!=="")$.unshift("")}return{pathEnv:Q,pathExt:$,pathExtExe:X}},MQ=(Z,q,J)=>{if(typeof q==="function")J=q,q={};if(!q)q={};let{pathEnv:Q,pathExt:X,pathExtExe:$}=RQ(Z,q),Y=[],H=(W)=>new Promise((U,V)=>{if(W===Q.length)return q.all&&Y.length?U(Y):V(zQ(Z));let L=Q[W],_=/^".*"$/.test(L)?L.slice(1,-1):L,z=LQ.join(_,Z),R=!_&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+z:z;U(K(R,W,0))}),K=(W,U,V)=>new Promise((L,_)=>{if(V===X.length)return L(H(U+1));let z=X[V];_Q(W+z,{pathExt:$},(R,D)=>{if(!R&&D)if(q.all)Y.push(W+z);else return L(W+z);return L(K(W,U,V+1))})});return J?H(0).then((W)=>J(null,W),J):H(0)},H_=(Z,q)=>{q=q||{};let{pathEnv:J,pathExt:Q,pathExtExe:X}=RQ(Z,q),$=[];for(let Y=0;Y<J.length;Y++){let H=J[Y],K=/^".*"$/.test(H)?H.slice(1,-1):H,W=LQ.join(K,Z),U=!K&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+W:W;for(let V=0;V<Q.length;V++){let L=U+Q[V];try{if(_Q.sync(L,{pathExt:X}))if(q.all)$.push(L);else return L}catch(_){}}}if(q.all&&$.length)return $;if(q.nothrow)return null;throw zQ(Z)};FQ.exports=MQ;MQ.sync=H_});var TQ=p((lP,P5)=>{var AQ=(Z={})=>{let q=Z.env||process.env;if((Z.platform||process.platform)!=="win32")return"PATH";return Object.keys(q).reverse().find((Q)=>Q.toUpperCase()==="PATH")||"Path"};P5.exports=AQ;P5.exports.default=AQ});var wQ=p((nP,OQ)=>{var jQ=H0("path"),G_=DQ(),K_=TQ();function IQ(Z,q){let J=Z.options.env||process.env,Q=process.cwd(),X=Z.options.cwd!=null,$=X&&process.chdir!==void 0&&!process.chdir.disabled;if($)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=G_.sync(Z.command,{path:J[K_({env:J})],pathExt:q?jQ.delimiter:void 0})}catch(H){}finally{if($)process.chdir(Q)}if(Y)Y=jQ.resolve(X?Z.options.cwd:"",Y);return Y}function U_(Z){return IQ(Z)||IQ(Z,!0)}OQ.exports=U_});var kQ=p((B_,E5)=>{var x5=/([()\][%!^"`<>&|;, *?])/g;function W_(Z){return Z=Z.replace(x5,"^$1"),Z}function V_(Z,q){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(x5,"^$1"),q)Z=Z.replace(x5,"^$1");return Z}B_.command=W_;B_.argument=V_});var PQ=p((iP,NQ)=>{NQ.exports=/^#!(.*)/});var EQ=p((aP,xQ)=>{var z_=PQ();xQ.exports=(Z="")=>{let q=Z.match(z_);if(!q)return null;let[J,Q]=q[0].replace(/#! ?/,"").split(" "),X=J.split("/").pop();if(X==="env")return Q;return Q?`${X} ${Q}`:X}});var yQ=p((oP,vQ)=>{var v5=H0("fs"),R_=EQ();function M_(Z){let J=Buffer.alloc(150),Q;try{Q=v5.openSync(Z,"r"),v5.readSync(Q,J,0,150,0),v5.closeSync(Q)}catch(X){}return R_(J.toString())}vQ.exports=M_});var hQ=p((sP,bQ)=>{var F_=H0("path"),CQ=wQ(),SQ=kQ(),D_=yQ(),A_=process.platform==="win32",T_=/\.(?:com|exe)$/i,j_=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function I_(Z){Z.file=CQ(Z);let q=Z.file&&D_(Z.file);if(q)return Z.args.unshift(Z.file),Z.command=q,CQ(Z);return Z.file}function O_(Z){if(!A_)return Z;let q=I_(Z),J=!T_.test(q);if(Z.options.forceShell||J){let Q=j_.test(q);Z.command=F_.normalize(Z.command),Z.command=SQ.command(Z.command),Z.args=Z.args.map(($)=>SQ.argument($,Q));let X=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${X}"`],Z.command=process.env.comspec||"cmd.exe",Z.options.windowsVerbatimArguments=!0}return Z}function w_(Z,q,J){if(q&&!Array.isArray(q))J=q,q=null;q=q?q.slice(0):[],J=Object.assign({},J);let Q={command:Z,args:q,options:J,file:void 0,original:{command:Z,args:q}};return J.shell?Q:O_(Q)}bQ.exports=w_});var mQ=p((rP,fQ)=>{var y5=process.platform==="win32";function C5(Z,q){return Object.assign(Error(`${q} ${Z.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${q} ${Z.command}`,path:Z.command,spawnargs:Z.args})}function k_(Z,q){if(!y5)return;let J=Z.emit;Z.emit=function(Q,X){if(Q==="exit"){let $=gQ(X,q);if($)return J.call(Z,"error",$)}return J.apply(Z,arguments)}}function gQ(Z,q){if(y5&&Z===1&&!q.file)return C5(q.original,"spawn");return null}function N_(Z,q){if(y5&&Z===1&&!q.file)return C5(q.original,"spawnSync");return null}fQ.exports={hookChildProcess:k_,verifyENOENT:gQ,verifyENOENTSync:N_,notFoundError:C5}});var h5=p((tP,V6)=>{var uQ=H0("child_process"),S5=hQ(),b5=mQ();function pQ(Z,q,J){let Q=S5(Z,q,J),X=uQ.spawn(Q.command,Q.args,Q.options);return b5.hookChildProcess(X,Q),X}function P_(Z,q,J){let Q=S5(Z,q,J),X=uQ.spawnSync(Q.command,Q.args,Q.options);return X.error=X.error||b5.verifyENOENTSync(X.status,Q),X}V6.exports=pQ;V6.exports.spawn=pQ;V6.exports.sync=P_;V6.exports._parse=S5;V6.exports._enoent=b5});function v_(Z,q,J,Q){if(!e0(Z))return Z;q=T4(q,Z);var X=-1,$=q.length,Y=$-1,H=Z;while(H!=null&&++X<$){var K=lQ(q[X]),W=J;if(K==="__proto__"||K==="constructor"||K==="prototype")return Z;if(X!=Y){var U=H[K];if(W=Q?Q(U,K,H):void 0,W===void 0)W=e0(U)?U:A4(q[X+1])?[]:{}}nQ(H,K,W),H=H[K]}return Z}var iQ;var aQ=B(()=>{E_();cQ();dQ();D4();x_();iQ=v_});function C_(Z,q,J){var Q=-1,X=q.length,$={};while(++Q<X){var Y=q[Q],H=oQ(Z,Y);if(J(H,Y))iQ($,T4(Y,Z),H)}return $}var sQ;var rQ=B(()=>{y_();aQ();cQ();sQ=C_});function g_(Z,q){if(Z==null)return{};var J=tQ(ZX(Z),function(Q){return[Q]});return q=eQ(q),sQ(Z,J,function(Q,X){return q(Q,X[0])})}var g5;var qX=B(()=>{S_();b_();rQ();h_();g5=g_});import{readdir as _x,readFile as f_}from"fs/promises";import{release as m_}from"os";var Dx,y0,Ax,Tx;var B6=B(()=>{v1();D0();p0();Dx=["macos","wsl"],y0=d(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){f(Z)}return"linux"}return"unknown"}catch(Z){return f(Z),"unknown"}}),Ax=d(()=>{if(process.platform!=="linux")return;try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"}),q=Z.match(/WSL(\d+)/i);if(q&&q[1])return q[1];if(Z.toLowerCase().includes("microsoft"))return"1";return}catch(Z){f(Z);return}}),Tx=d(async()=>{if(process.platform!=="linux")return;let Z={linuxKernel:m_()};try{let q=await f_("/etc/os-release","utf8");for(let J of q.split(`
3
+ `)){let Q=J.match(/^(ID|VERSION_ID)=(.*)$/);if(Q&&Q[1]&&Q[2]){let X=Q[2].replace(/^"|"$/g,"");if(Q[1]==="ID")Z.linuxDistroId=X;else Z.linuxDistroVersion=X}}}catch{}return Z})});import{execSync as u_}from"child_process";function z6(Z,q){let Q=[];try{const J=L6(Q,j4`execSync: ${Z.slice(0,100)}`,0);return u_(Z,q)}catch(X){var $=X,Y=1}finally{_6(Q,$,Y)}}var f5=B(()=>{z0()});import{tracingChannel as p_,channel as d_}from"node:diagnostics_channel";var U0,U2,c_,m5=()=>U0.hasSubscribers||U2.hasSubscribers,QX,JX,l_=(Z,q,J,Q)=>{typeof JX.emitWarning=="function"?JX.emitWarning(Z,q,J,Q):console.error(`[${J}] ${q}: ${Z}`)},n_=(Z)=>!QX.has(Z),R1=(Z)=>!!Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),XX=(Z)=>R1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?I4:null:null,I4,i_=class Z{heap;length;static#J=!1;static create(q){let J=XX(q);if(!J)return[];Z.#J=!0;let Q=new Z(q,J);return Z.#J=!1,Q}constructor(q,J){if(!Z.#J)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new J(q),this.length=0}push(q){this.heap[this.length++]=q}pop(){return this.heap[--this.length]}},$X;var YX=B(()=>{U0=d_("lru-cache:metrics"),U2=p_("lru-cache"),c_=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,QX=new Set,JX=typeof process=="object"&&process?process:{},I4=class extends Array{constructor(Z){super(Z),this.fill(0)}},$X=class Z{#J;#Q;#q;#Y;#G;#V;#A;#z;get perf(){return this.#z}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#H;#T;#K;#$;#Z;#L;#R;#B;#U;#j;#W;#I;#O;#M;#F;#w;#h;#_;#v;static unsafeExposeInternals(q){return{starts:q.#O,ttls:q.#M,autopurgeTimers:q.#F,sizes:q.#I,keyMap:q.#K,keyList:q.#$,valList:q.#Z,next:q.#L,prev:q.#R,get head(){return q.#B},get tail(){return q.#U},free:q.#j,isBackgroundFetch:(J)=>q.#X(J),backgroundFetch:(J,Q,X,$)=>q.#m(J,Q,X,$),moveToTail:(J)=>q.#b(J),indexes:(J)=>q.#k(J),rindexes:(J)=>q.#N(J),isStale:(J)=>q.#D(J)}}get max(){return this.#J}get maxSize(){return this.#Q}get calculatedSize(){return this.#T}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#A}get dispose(){return this.#q}get onInsert(){return this.#Y}get disposeAfter(){return this.#G}constructor(q){let{max:J=0,ttl:Q,ttlResolution:X=1,ttlAutopurge:$,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:K,dispose:W,onInsert:U,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:_,maxSize:z=0,maxEntrySize:R=0,sizeCalculation:D,fetchMethod:F,memoMethod:k,noDeleteOnFetchRejection:M,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:j,ignoreFetchAbort:A,backgroundFetchSize:g=1,perf:w}=q;if(this.backgroundFetchSize=g,w!==void 0&&typeof w?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#z=w??c_,J!==0&&!R1(J))throw TypeError("max option must be a nonnegative integer");let P=J?XX(J):Array;if(!P)throw Error("invalid max value: "+J);if(this.#J=J,this.#Q=z,this.maxEntrySize=R||this.#Q,this.sizeCalculation=D,this.sizeCalculation){if(!this.#Q&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(k!==void 0&&typeof k!="function")throw TypeError("memoMethod must be a function if defined");if(this.#A=k,F!==void 0&&typeof F!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=F,this.#h=!!F,this.#K=new Map,this.#$=Array.from({length:J}).fill(void 0),this.#Z=Array.from({length:J}).fill(void 0),this.#L=new P(J),this.#R=new P(J),this.#B=0,this.#U=0,this.#j=i_.create(J),this.#H=0,this.#T=0,typeof W=="function"&&(this.#q=W),typeof U=="function"&&(this.#Y=U),typeof V=="function"?(this.#G=V,this.#W=[]):(this.#G=void 0,this.#W=void 0),this.#w=!!this.#q,this.#v=!!this.#Y,this.#_=!!this.#G,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!M,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!j,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#Q!==0&&!R1(this.#Q))throw TypeError("maxSize must be a positive integer if specified");if(!R1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#a()}if(this.allowStale=!!K,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=R1(X)||X===0?X:1,this.ttlAutopurge=!!$,this.ttl=Q||0,this.ttl){if(!R1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#u()}if(this.#J===0&&this.ttl===0&&this.#Q===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#J&&!this.#Q){let v="LRU_CACHE_UNBOUNDED";n_(v)&&(QX.add(v),l_("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",v,Z))}}getRemainingTTL(q){return this.#K.has(q)?1/0:0}#u(){let q=new I4(this.#J),J=new I4(this.#J);this.#M=q,this.#O=J;let Q=this.ttlAutopurge?Array.from({length:this.#J}):void 0;this.#F=Q,this.#p=(H,K,W=this.#z.now())=>{J[H]=K!==0?W:0,q[H]=K,X(H,K)},this.#y=(H)=>{J[H]=q[H]!==0?this.#z.now():0,X(H,q[H])};let X=this.ttlAutopurge?(H,K)=>{if(Q?.[H]&&(clearTimeout(Q[H]),Q[H]=void 0),K&&K!==0&&Q){let W=setTimeout(()=>{this.#D(H)&&this.#P(this.#$[H],"expire")},K+1);W.unref&&W.unref(),Q[H]=W}}:()=>{};this.#x=(H,K)=>{if(q[K]){let W=q[K],U=J[K];if(!W||!U)return;H.ttl=W,H.start=U,H.now=$||Y();let V=H.now-U;H.remainingTTL=W-V}};let $=0,Y=()=>{let H=this.#z.now();if(this.ttlResolution>0){$=H;let K=setTimeout(()=>$=0,this.ttlResolution);K.unref&&K.unref()}return H};this.getRemainingTTL=(H)=>{let K=this.#K.get(H);if(K===void 0)return 0;let W=q[K],U=J[K];if(!W||!U)return 1/0;let V=($||Y())-U;return W-V},this.#D=(H)=>{let K=J[H],W=q[H];return!!W&&!!K&&($||Y())-K>W}}#y=()=>{};#x=()=>{};#p=()=>{};#D=()=>!1;#a(){let q=new I4(this.#J);this.#T=0,this.#I=q,this.#C=(J)=>{this.#T-=q[J],q[J]=0},this.#d=(J,Q,X,$)=>{if(!R1(X)){if(this.#X(Q))return this.backgroundFetchSize;if($){if(typeof $!="function")throw TypeError("sizeCalculation must be a function");if(X=$(Q,J),!R1(X))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return X},this.#g=(J,Q,X)=>{if(q[J]=Q,this.#Q){let $=this.#Q-q[J];for(;this.#T>$;)this.#f(!0)}this.#T+=q[J],X&&(X.entrySize=Q,X.totalCalculatedSize=this.#T)}}#C=(q)=>{};#g=(q,J,Q)=>{};#d=(q,J,Q,X)=>{if(Q||X)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:q=this.allowStale}={}){if(this.#H)for(let J=this.#U;this.#c(J)&&((q||!this.#D(J))&&(yield J),J!==this.#B);)J=this.#R[J]}*#N({allowStale:q=this.allowStale}={}){if(this.#H)for(let J=this.#B;this.#c(J)&&((q||!this.#D(J))&&(yield J),J!==this.#U);)J=this.#L[J]}#c(q){return q!==void 0&&this.#K.get(this.#$[q])===q}*entries(){for(let q of this.#k())this.#Z[q]!==void 0&&this.#$[q]!==void 0&&!this.#X(this.#Z[q])&&(yield[this.#$[q],this.#Z[q]])}*rentries(){for(let q of this.#N())this.#Z[q]!==void 0&&this.#$[q]!==void 0&&!this.#X(this.#Z[q])&&(yield[this.#$[q],this.#Z[q]])}*keys(){for(let q of this.#k()){let J=this.#$[q];J!==void 0&&!this.#X(this.#Z[q])&&(yield J)}}*rkeys(){for(let q of this.#N()){let J=this.#$[q];J!==void 0&&!this.#X(this.#Z[q])&&(yield J)}}*values(){for(let q of this.#k())this.#Z[q]!==void 0&&!this.#X(this.#Z[q])&&(yield this.#Z[q])}*rvalues(){for(let q of this.#N())this.#Z[q]!==void 0&&!this.#X(this.#Z[q])&&(yield this.#Z[q])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(q,J={}){for(let Q of this.#k()){let X=this.#Z[Q],$=this.#X(X)?X.__staleWhileFetching:X;if($!==void 0&&q($,this.#$[Q],this))return this.#S(this.#$[Q],J)}}forEach(q,J=this){for(let Q of this.#k()){let X=this.#Z[Q],$=this.#X(X)?X.__staleWhileFetching:X;$!==void 0&&q.call(J,$,this.#$[Q],this)}}rforEach(q,J=this){for(let Q of this.#N()){let X=this.#Z[Q],$=this.#X(X)?X.__staleWhileFetching:X;$!==void 0&&q.call(J,$,this.#$[Q],this)}}purgeStale(){let q=!1;for(let J of this.#N({allowStale:!0}))this.#D(J)&&(this.#P(this.#$[J],"expire"),q=!0);return q}info(q){let J=this.#K.get(q);if(J===void 0)return;let Q=this.#Z[J],X=this.#X(Q)?Q.__staleWhileFetching:Q;if(X===void 0)return;let $={value:X};if(this.#M&&this.#O){let Y=this.#M[J],H=this.#O[J];if(Y&&H){let K=Y-(this.#z.now()-H);$.ttl=K,$.start=Date.now()}}return this.#I&&($.size=this.#I[J]),$}dump(){let q=[];for(let J of this.#k({allowStale:!0})){let Q=this.#$[J],X=this.#Z[J],$=this.#X(X)?X.__staleWhileFetching:X;if($===void 0||Q===void 0)continue;let Y={value:$};if(this.#M&&this.#O){Y.ttl=this.#M[J];let H=this.#z.now()-this.#O[J];Y.start=Math.floor(Date.now()-H)}this.#I&&(Y.size=this.#I[J]),q.unshift([Q,Y])}return q}load(q){this.clear();for(let[J,Q]of q){if(Q.start){let X=Date.now()-Q.start;Q.start=this.#z.now()-X}this.#E(J,Q.value,Q)}}set(q,J,Q={}){let{status:X=U0.hasSubscribers?{}:void 0}=Q;Q.status=X,X&&(X.op="set",X.key=q,J!==void 0&&(X.value=J),X.cache=this);let $=this.#E(q,J,Q);return X&&U0.hasSubscribers&&U0.publish(X),$}#E(q,J,Q,X){let{ttl:$=this.ttl,start:Y,noDisposeOnSet:H=this.noDisposeOnSet,sizeCalculation:K=this.sizeCalculation,status:W}=Q,U=this.#X(J);if(J===void 0)return W&&(W.set="deleted"),this.delete(q),this;let{noUpdateTTL:V=this.noUpdateTTL}=Q;W&&!U&&(W.value=J);let L=this.#d(q,J,Q.size||0,K,W);if(this.maxEntrySize&&L>this.maxEntrySize)return this.#P(q,"set"),W&&(W.set="miss",W.maxEntrySizeExceeded=!0),this;let _=this.#H===0?void 0:this.#K.get(q);if(_===void 0)_=this.#H===0?this.#U:this.#j.length!==0?this.#j.pop():this.#H===this.#J?this.#f(!1):this.#H,this.#$[_]=q,this.#Z[_]=J,this.#K.set(q,_),this.#L[this.#U]=_,this.#R[_]=this.#U,this.#U=_,this.#H++,this.#g(_,L,W),W&&(W.set="add"),V=!1,this.#v&&!U&&this.#Y?.(J,q,"add");else{this.#b(_);let z=this.#Z[_];if(J!==z){if(!H)if(this.#X(z)){z!==X&&z.__abortController.abort(Error("replaced"));let{__staleWhileFetching:R}=z;R!==void 0&&R!==J&&(this.#w&&this.#q?.(R,q,"set"),this.#_&&this.#W?.push([R,q,"set"]))}else this.#w&&this.#q?.(z,q,"set"),this.#_&&this.#W?.push([z,q,"set"]);if(this.#C(_),this.#g(_,L,W),this.#Z[_]=J,!U){let R=z&&this.#X(z)?z.__staleWhileFetching:z,D=R===void 0?"add":J!==R?"replace":"update";W&&(W.set=D,R!==void 0&&(W.oldValue=R)),this.#v&&this.onInsert?.(J,q,D)}}else U||(W&&(W.set="update"),this.#v&&this.onInsert?.(J,q,"update"))}if($!==0&&!this.#M&&this.#u(),this.#M&&(V||this.#p(_,$,Y),W&&this.#x(W,_)),!H&&this.#_&&this.#W){let z=this.#W,R;for(;R=z?.shift();)this.#G?.(...R)}return this}pop(){try{for(;this.#H;){let q=this.#Z[this.#B];if(this.#f(!0),this.#X(q)){if(q.__staleWhileFetching)return q.__staleWhileFetching}else if(q!==void 0)return q}}finally{if(this.#_&&this.#W){let q=this.#W,J;for(;J=q?.shift();)this.#G?.(...J)}}}#f(q){let J=this.#B,Q=this.#$[J],X=this.#Z[J],$=this.#X(X);$&&X.__abortController.abort(Error("evicted"));let Y=$?X.__staleWhileFetching:X;return(this.#w||this.#_)&&Y!==void 0&&(this.#w&&this.#q?.(Y,Q,"evict"),this.#_&&this.#W?.push([Y,Q,"evict"])),this.#C(J),this.#F?.[J]&&(clearTimeout(this.#F[J]),this.#F[J]=void 0),q&&(this.#$[J]=void 0,this.#Z[J]=void 0,this.#j.push(J)),this.#H===1?(this.#B=this.#U=0,this.#j.length=0):this.#B=this.#L[J],this.#K.delete(Q),this.#H--,J}has(q,J={}){let{status:Q=U0.hasSubscribers?{}:void 0}=J;J.status=Q,Q&&(Q.op="has",Q.key=q,Q.cache=this);let X=this.#o(q,J);return U0.hasSubscribers&&U0.publish(Q),X}#o(q,J={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:X}=J,$=this.#K.get(q);if($!==void 0){let Y=this.#Z[$];if(this.#X(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D($))X&&(X.has="stale",this.#x(X,$));else return Q&&this.#y($),X&&(X.has="hit",this.#x(X,$)),!0}else X&&(X.has="miss");return!1}peek(q,J={}){let{status:Q=m5()?{}:void 0}=J;Q&&(Q.op="peek",Q.key=q,Q.cache=this),J.status=Q;let X=this.#s(q,J);return U0.hasSubscribers&&U0.publish(Q),X}#s(q,J){let{status:Q,allowStale:X=this.allowStale}=J,$=this.#K.get(q);if($===void 0||!X&&this.#D($)){Q&&(Q.peek=$===void 0?"miss":"stale");return}let Y=this.#Z[$],H=this.#X(Y)?Y.__staleWhileFetching:Y;return Q&&(H!==void 0?(Q.peek="hit",Q.value=H):Q.peek="miss"),H}#m(q,J,Q,X){let $=J===void 0?void 0:this.#Z[J];if(this.#X($))return $;let Y=new AbortController,{signal:H}=Q;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let K={signal:Y.signal,options:Q,context:X},W=(R,D=!1)=>{let{aborted:F}=Y.signal,k=Q.ignoreFetchAbort&&R!==void 0,M=Q.ignoreFetchAbort||!!(Q.allowStaleOnFetchAbort&&R!==void 0);if(Q.status&&(F&&!D?(Q.status.fetchAborted=!0,Q.status.fetchError=Y.signal.reason,k&&(Q.status.fetchAbortIgnored=!0)):Q.status.fetchResolved=!0),F&&!k&&!D)return V(Y.signal.reason,M);let O=_,T=this.#Z[J];return(T===_||T===void 0&&k&&D)&&(R===void 0?O.__staleWhileFetching!==void 0?this.#Z[J]=O.__staleWhileFetching:this.#P(q,"fetch"):(Q.status&&(Q.status.fetchUpdated=!0),this.#E(q,R,K.options,O))),R},U=(R)=>(Q.status&&(Q.status.fetchRejected=!0,Q.status.fetchError=R),V(R,!1)),V=(R,D)=>{let{aborted:F}=Y.signal,k=F&&Q.allowStaleOnFetchAbort,M=k||Q.allowStaleOnFetchRejection,O=M||Q.noDeleteOnFetchRejection,T=_;if(this.#Z[J]===_&&(!O||!D&&T.__staleWhileFetching===void 0?this.#P(q,"fetch"):k||(this.#Z[J]=T.__staleWhileFetching)),M)return Q.status&&T.__staleWhileFetching!==void 0&&(Q.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw R},L=(R,D)=>{let F=this.#V?.(q,$,K);Y.signal.addEventListener("abort",()=>{(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort)&&(R(void 0),Q.allowStaleOnFetchAbort&&(R=(k)=>W(k,!0)))}),F&&F instanceof Promise?F.then((k)=>R(k===void 0?void 0:k),D):F!==void 0&&R(F)};Q.status&&(Q.status.fetchDispatched=!0);let _=new Promise(L).then(W,U),z=Object.assign(_,{__abortController:Y,__staleWhileFetching:$,__returned:void 0});return J===void 0?(this.#E(q,z,{...K.options,status:void 0}),J=this.#K.get(q)):this.#Z[J]=z,z}#X(q){if(!this.#h)return!1;let J=q;return!!J&&J instanceof Promise&&J.hasOwnProperty("__staleWhileFetching")&&J.__abortController instanceof AbortController}fetch(q,J={}){let Q=U2.hasSubscribers,{status:X=m5()?{}:void 0}=J;J.status=X,X&&J.context&&(X.context=J.context);let $=this.#l(q,J);return X&&Q&&(X.trace=!0,U2.tracePromise(()=>$,X).catch(()=>{})),$}async#l(q,J={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:X=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:K=0,sizeCalculation:W=this.sizeCalculation,noUpdateTTL:U=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:z=this.allowStaleOnFetchAbort,context:R,forceRefresh:D=!1,status:F,signal:k}=J;if(F&&(F.op="fetch",F.key=q,D&&(F.forceRefresh=!0),F.cache=this),!this.#h)return F&&(F.fetch="get"),this.#S(q,{allowStale:Q,updateAgeOnGet:X,noDeleteOnStaleGet:$,status:F});let M={allowStale:Q,updateAgeOnGet:X,noDeleteOnStaleGet:$,ttl:Y,noDisposeOnSet:H,size:K,sizeCalculation:W,noUpdateTTL:U,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:z,ignoreFetchAbort:_,status:F,signal:k},O=this.#K.get(q);if(O===void 0){F&&(F.fetch="miss");let T=this.#m(q,O,M,R);return T.__returned=T}else{let T=this.#Z[O];if(this.#X(T)){let w=Q&&T.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",w&&(F.returnedStale=!0)),w?T.__staleWhileFetching:T.__returned=T}let j=this.#D(O);if(!D&&!j)return F&&(F.fetch="hit"),this.#b(O),X&&this.#y(O),F&&this.#x(F,O),T;let A=this.#m(q,O,M,R),g=A.__staleWhileFetching!==void 0&&Q;return F&&(F.fetch=j?"stale":"refresh",g&&j&&(F.returnedStale=!0)),g?A.__staleWhileFetching:A.__returned=A}}forceFetch(q,J={}){let Q=U2.hasSubscribers,{status:X=m5()?{}:void 0}=J;J.status=X,X&&J.context&&(X.context=J.context);let $=this.#r(q,J);return X&&Q&&(X.trace=!0,U2.tracePromise(()=>$,X).catch(()=>{})),$}async#r(q,J={}){let Q=await this.#l(q,J);if(Q===void 0)throw Error("fetch() returned undefined");return Q}memo(q,J={}){let{status:Q=U0.hasSubscribers?{}:void 0}=J;J.status=Q,Q&&(Q.op="memo",Q.key=q,J.context&&(Q.context=J.context),Q.cache=this);let X=this.#t(q,J);return Q&&(Q.value=X),U0.hasSubscribers&&U0.publish(Q),X}#t(q,J={}){let Q=this.#A;if(!Q)throw Error("no memoMethod provided to constructor");let{context:X,status:$,forceRefresh:Y,...H}=J;$&&Y&&($.forceRefresh=!0);let K=this.#S(q,H),W=Y||K===void 0;if($&&($.memo=W?"miss":"hit",W||($.value=K)),!W)return K;let U=Q(q,K,{options:H,context:X});return $&&($.value=U),this.#E(q,U,H),U}get(q,J={}){let{status:Q=U0.hasSubscribers?{}:void 0}=J;J.status=Q,Q&&(Q.op="get",Q.key=q,Q.cache=this);let X=this.#S(q,J);return Q&&(X!==void 0&&(Q.value=X),U0.hasSubscribers&&U0.publish(Q)),X}#S(q,J={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:X=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,status:Y}=J,H=this.#K.get(q);if(H===void 0){Y&&(Y.get="miss");return}let K=this.#Z[H],W=this.#X(K);return Y&&this.#x(Y,H),this.#D(H)?W?(Y&&(Y.get="stale-fetching"),Q&&K.__staleWhileFetching!==void 0?(Y&&(Y.returnedStale=!0),K.__staleWhileFetching):void 0):($||this.#P(q,"expire"),Y&&(Y.get="stale"),Q?(Y&&(Y.returnedStale=!0),K):void 0):(Y&&(Y.get=W?"fetching":"hit"),this.#b(H),X&&this.#y(H),W?K.__staleWhileFetching:K)}#n(q,J){this.#R[J]=q,this.#L[q]=J}#b(q){q!==this.#U&&(q===this.#B?this.#B=this.#L[q]:this.#n(this.#R[q],this.#L[q]),this.#n(this.#U,q),this.#U=q)}delete(q){return this.#P(q,"delete")}#P(q,J){U0.hasSubscribers&&U0.publish({op:"delete",delete:J,key:q,cache:this});let Q=!1;if(this.#H!==0){let X=this.#K.get(q);if(X!==void 0)if(this.#F?.[X]&&(clearTimeout(this.#F?.[X]),this.#F[X]=void 0),Q=!0,this.#H===1)this.#i(J);else{this.#C(X);let $=this.#Z[X];if(this.#X($)?$.__abortController.abort(Error("deleted")):(this.#w||this.#_)&&(this.#w&&this.#q?.($,q,J),this.#_&&this.#W?.push([$,q,J])),this.#K.delete(q),this.#$[X]=void 0,this.#Z[X]=void 0,X===this.#U)this.#U=this.#R[X];else if(X===this.#B)this.#B=this.#L[X];else{let Y=this.#R[X];this.#L[Y]=this.#L[X];let H=this.#L[X];this.#R[H]=this.#R[X]}this.#H--,this.#j.push(X)}}if(this.#_&&this.#W?.length){let X=this.#W,$;for(;$=X?.shift();)this.#G?.(...$)}return Q}clear(){return this.#i("delete")}#i(q){for(let J of this.#N({allowStale:!0})){let Q=this.#Z[J];if(this.#X(Q))Q.__abortController.abort(Error("deleted"));else{let X=this.#$[J];this.#w&&this.#q?.(Q,X,q),this.#_&&this.#W?.push([Q,X,q])}}if(this.#K.clear(),this.#Z.fill(void 0),this.#$.fill(void 0),this.#M&&this.#O){this.#M.fill(0),this.#O.fill(0);for(let J of this.#F??[])J!==void 0&&clearTimeout(J);this.#F?.fill(void 0)}if(this.#I&&this.#I.fill(0),this.#B=0,this.#U=0,this.#j.length=0,this.#T=0,this.#H=0,this.#_&&this.#W){let J=this.#W,Q;for(;Q=J?.shift();)this.#G?.(...Q)}}}});function Cx(Z,q=300000){let J=new Map,Q=new Map,X=async(...$)=>{let Y=m($),H=J.get(Y),K=Date.now();if(!H){let W=Q.get(Y);if(W)return W;let U=Z(...$);Q.set(Y,U);try{let V=await U;if(Q.get(Y)===U)J.set(Y,{value:V,timestamp:K,refreshing:!1});return V}finally{if(Q.get(Y)===U)Q.delete(Y)}}if(H&&K-H.timestamp>q&&!H.refreshing){H.refreshing=!0;let W=H;return Z(...$).then((U)=>{if(J.get(Y)===W)J.set(Y,{value:U,timestamp:Date.now(),refreshing:!1})}).catch((U)=>{if(f(U),J.get(Y)===W)J.delete(Y)}),H.value}return J.get(Y).value};return X.cache={clear:()=>{J.clear(),Q.clear()}},X}function M1(Z,q,J=100){let Q=new $X({max:J}),X=(...$)=>{let Y=q(...$),H=Q.get(Y);if(H!==void 0)return H;let K=Z(...$);return Q.set(Y,K),K};return X.cache={clear:()=>Q.clear(),size:()=>Q.size,delete:($)=>Q.delete($),get:($)=>Q.peek($),has:($)=>Q.has($)},X}var O4=B(()=>{YX();p0();z0()});import*as R6 from"path";import*as HX from"path/win32";function u5(Z){try{return z6(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function a_(Z){if(Z==="git"){let q=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let J of q)if(u5(J))return J}try{let J=z6(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
4
+ `).filter(Boolean),Q=r().toLowerCase();for(let X of J){let $=R6.resolve(X).toLowerCase();if(R6.dirname($).toLowerCase()===Q||$.startsWith(Q+R6.sep)){x(`Skipping potentially malicious executable in current directory: ${X}`);continue}return X}return null}catch{return null}}function px(){if(y0()==="windows"){let Z=o_();process.env.SHELL=Z,x(`Using bash path: "${Z}"`)}}var o_,dx,GX;var KX=B(()=>{v1();q1();Z1();f5();O4();B6();o_=d(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(u5(process.env.CLAUDE_CODE_GIT_BASH_PATH))return process.env.CLAUDE_CODE_GIT_BASH_PATH;console.error(`Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "${process.env.CLAUDE_CODE_GIT_BASH_PATH}"`),process.exit(1)}let Z=a_("git");if(Z){let q=HX.join(Z,"..","..","bin","bash.exe");if(u5(q))return q}console.error("Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe"),process.exit(1)}),dx=M1((Z)=>{if(Z.startsWith("\\\\"))return Z.replace(/\\/g,"/");let q=Z.match(/^([A-Za-z]):[/\\]/);if(q)return"/"+q[1].toLowerCase()+Z.slice(2).replace(/\\/g,"/");return Z.replace(/\\/g,"/")},(Z)=>Z,500),GX=M1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let q=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(q){let Q=q[1].toUpperCase(),X=Z.slice(("/cygdrive/"+q[1]).length);return Q+":"+(X||"\\").replace(/\//g,"\\")}let J=Z.match(/^\/([A-Za-z])(\/|$)/);if(J){let Q=J[1].toUpperCase(),X=Z.slice(2);return Q+":"+(X||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as UX}from"os";import{dirname as WX,isAbsolute as r_,join as t_,normalize as p5,relative as e_,resolve as Zz}from"path";function c5(Z,q){let J=q??r()??N().cwd();if(typeof Z!=="string")throw TypeError(`Path must be a string, received ${typeof Z}`);if(typeof J!=="string")throw TypeError(`Base directory must be a string, received ${typeof J}`);if(Z.includes("\x00")||J.includes("\x00"))throw Error("Path contains null bytes");let Q=Z.trim();if(!Q)return p5(J).normalize("NFC");if(Q==="~")return UX().normalize("NFC");if(Q.startsWith("~/"))return t_(UX(),Q.slice(2)).normalize("NFC");let X=Q;if(y0()==="windows"&&Q.match(/^\/[a-z]\//i))try{X=GX(Q)}catch{X=Q}if(r_(X))return p5(X).normalize("NFC");return Zz(J,X).normalize("NFC")}function rx(Z){let q=e_(r(),Z);return q.startsWith("..")?Z:q}function tx(Z){let q=c5(Z);if(q.startsWith("\\\\")||q.startsWith("//"))return WX(q);try{if(N().statSync(q).isDirectory())return q}catch{}return WX(q)}function ex(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function y1(Z){return p5(Z).replace(/\\/g,"/")}var w4=B(()=>{q1();D0();B6();KX();s_()});function Jz(Z,q,J){if(J!==void 0&&!k4(Z[q],J)||J===void 0&&!(q in Z))BX(Z,q,J)}var W2;var l5=B(()=>{qz();VX();W2=Jz});function Qz(Z){return function(q,J,Q){var X=-1,$=Object(q),Y=Q(q),H=Y.length;while(H--){var K=Y[Z?H:++X];if(J($[K],K,$)===!1)break}return q}}var LX;var _X=B(()=>{LX=Qz});var Xz,zX;var RX=B(()=>{_X();Xz=LX(),zX=Xz});function $z(Z){return N4(Z)&&P4(Z)}var DX;var AX=B(()=>{FX();MX();DX=$z});function Bz(Z){if(!N4(Z)||TX(Z)!=Gz)return!1;var q=jX(Z);if(q===null)return!0;var J=Wz.call(q,"constructor")&&q.constructor;return typeof J=="function"&&J instanceof J&&IX.call(J)==Vz}var Gz="[object Object]",Kz,Uz,IX,Wz,Vz,OX;var wX=B(()=>{Yz();Hz();MX();Kz=Function.prototype,Uz=Object.prototype,IX=Kz.toString,Wz=Uz.hasOwnProperty,Vz=IX.call(Object);OX=Bz});function Lz(Z,q){if(q==="constructor"&&typeof Z[q]==="function")return;if(q=="__proto__")return;return Z[q]}var V2;var n5=B(()=>{V2=Lz});function zz(Z){return kX(Z,x4(Z))}var PX;var xX=B(()=>{_z();NX();PX=zz});function wz(Z,q,J,Q,X,$,Y){var H=V2(Z,J),K=V2(q,J),W=Y.get(K);if(W){W2(Z,J,W);return}var U=$?$(H,K,J+"",Z,q,Y):void 0,V=U===void 0;if(V){var L=i5(K),_=!L&&vX(K),z=!L&&!_&&yX(K);if(U=K,L||_||z)if(i5(H))U=H;else if(DX(H))U=SX(H);else if(_)V=!1,U=CX(K,!0);else if(z)V=!1,U=bX(K,!0);else U=[];else if(OX(K)||a5(K)){if(U=H,a5(H))U=PX(H);else if(!e0(H)||EX(H))U=hX(K)}else V=!1}if(V)Y.set(K,U),X(U,K,Q,$,Y),Y.delete(K);W2(Z,J,U)}var gX;var fX=B(()=>{l5();Tz();Iz();jz();Oz();Fz();Mz();AX();Dz();Rz();D4();wX();Az();n5();xX();gX=wz});function uX(Z,q,J,Q,X){if(Z===q)return;zX(q,function($,Y){if(X||(X=new mX),e0($))gX(Z,q,Y,J,uX,Q,X);else{var H=Q?Q(V2(Z,Y),$,Y+"",Z,q,X):void 0;if(H===void 0)H=$;W2(Z,Y,H)}},x4)}var pX;var dX=B(()=>{kz();l5();RX();fX();D4();NX();n5();pX=uX});function Nz(Z,q,J){switch(J.length){case 0:return Z.call(q);case 1:return Z.call(q,J[0]);case 2:return Z.call(q,J[0],J[1]);case 3:return Z.call(q,J[0],J[1],J[2])}return Z.apply(q,J)}var cX;var lX=B(()=>{cX=Nz});function Pz(Z,q,J){return q=nX(q===void 0?Z.length-1:q,0),function(){var Q=arguments,X=-1,$=nX(Q.length-q,0),Y=Array($);while(++X<$)Y[X]=Q[q+X];X=-1;var H=Array(q+1);while(++X<q)H[X]=Q[X];return H[q]=J(Y),cX(Z,this,H)}}var nX,iX;var aX=B(()=>{lX();nX=Math.max;iX=Pz});function xz(Z){return function(){return Z}}var oX;var sX=B(()=>{oX=xz});var vz,tX;var eX=B(()=>{sX();Ez();rX();vz=!o5?E4:function(Z,q){return o5(Z,"toString",{configurable:!0,enumerable:!1,value:oX(q),writable:!0})},tX=vz});function bz(Z){var q=0,J=0;return function(){var Q=Sz(),X=Cz-(Q-J);if(J=Q,X>0){if(++q>=yz)return arguments[0]}else q=0;return Z.apply(void 0,arguments)}}var yz=800,Cz=16,Sz,Z$;var q$=B(()=>{Sz=Date.now;Z$=bz});var hz,J$;var Q$=B(()=>{eX();q$();hz=Z$(tX),J$=hz});function gz(Z,q){return J$(iX(Z,q,E4),Z+"")}var X$;var $$=B(()=>{rX();aX();Q$();X$=gz});function fz(Z,q,J){if(!e0(J))return!1;var Q=typeof q;if(Q=="number"?P4(J)&&A4(q,J.length):Q=="string"&&(q in J))return k4(J[q],Z);return!1}var Y$;var H$=B(()=>{VX();FX();dQ();D4();Y$=fz});function mz(Z){return X$(function(q,J){var Q=-1,X=J.length,$=X>1?J[X-1]:void 0,Y=X>2?J[2]:void 0;if($=Z.length>3&&typeof $=="function"?(X--,$):void 0,Y&&Y$(J[0],J[1],Y))$=X<3?void 0:$,X=1;q=Object(q);while(++Q<X){var H=J[Q];if(H)Z(q,H,Q,$)}return q})}var G$;var K$=B(()=>{$$();H$();G$=mz});var uz,J1;var U$=B(()=>{dX();K$();uz=G$(function(Z,q,J,Q){pX(Z,q,J,Q)}),J1=uz});function s5(Z){let{buffer:q,bytesRead:J}=N().readSync(Z,{length:4096});if(J===0)return"utf8";if(J>=2){if(q[0]===255&&q[1]===254)return"utf16le"}if(J>=3&&q[0]===239&&q[1]===187&&q[2]===191)return"utf8";return"utf8"}function r5(Z){let q=0,J=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===`
5
+ `)if(Q>0&&Z[Q-1]==="\r")q++;else J++;return q>J?"CRLF":"LF"}function pz(Z){let q=N(),{resolvedPath:J,isSymlink:Q}=F1(q,Z);if(Q)x(`Reading through symlink: ${Z} -> ${J}`);let X=s5(J),$=q.readFileSync(J,{encoding:X}),Y=r5($.slice(0,4096));return{content:$.replaceAll(`\r
6
+ `,`
7
+ `),encoding:X,lineEndings:Y}}function Q1(Z){return pz(Z).content}var B2=B(()=>{Z1();D0()});function d0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var v4=()=>{};import{join as dz}from"path";function wv(Z){L2=Z}function kv(){L2=null,t5=void 0}function Nv(Z){return t5=Z,Z}function lz(){return dz(G0(),cz)}function nz(){try{let Z=Q1(lz()),q=q0(d0(Z));if(!q||typeof q!=="object"||Array.isArray(q))return null;return q}catch{return null}}function y4(){if(t5!==!0)return null;if(L2)return L2;let Z=nz();if(Z)return L2=Z,_2(),Z;return null}var cz="remote-settings.json",L2=null,t5;var V$=B(()=>{c0();B2();v4();W$();z0()});function xv(Z,q){return Z.flatMap((J,Q)=>Q?[q(Q),J]:[J])}function e5(Z,q){let J=0;for(let Q of Z)J+=+!!q(Q);return J}function B$(Z){return[...new Set(Z)]}var Z3=()=>{};class L${cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let q=N(),J;try{J=q.statSync(Z)}catch(Y){throw this.cache.delete(Z),Y}let Q=this.cache.get(Z);if(Q&&Q.mtime===J.mtimeMs)return{content:Q.content,encoding:Q.encoding};let X=z$(Z),$=q.readFileSync(Z,{encoding:X}).replaceAll(`\r
8
+ `,`
9
+ `);if(J.size<=this.maxEntryBytes){if(this.cache.set(Z,{content:$,encoding:X,mtime:J.mtimeMs}),this.cache.size>this.maxCacheSize){let Y=this.cache.keys().next().value;if(Y)this.cache.delete(Y)}}return{content:$,encoding:X}}clear(){this.cache.clear()}invalidate(Z){this.cache.delete(Z)}getStats(){return{size:this.cache.size,entries:Array.from(this.cache.keys())}}get size(){return this.cache.size}}var q3;var _$=B(()=>{C4();D0();q3=new L$});import{chmodSync as iz,writeFileSync as R$}from"fs";import{realpath as az,stat as T$}from"fs/promises";import{homedir as j$}from"os";import{basename as J3,dirname as S4,extname as M$,isAbsolute as oz,join as M6,normalize as sz,relative as I$,resolve as rz,sep as z2}from"path";async function sv(Z){try{return await T$(Z),!0}catch{return!1}}function rv(Z){try{return N().readFileSync(Z,{encoding:"utf8"})}catch(q){return f(q),null}}function tv(Z){let q=N();return Math.floor(q.statSync(Z).mtimeMs)}async function ev(Z){let q=await N().stat(Z);return Math.floor(q.mtimeMs)}function Zy(Z,q,J,Q){let X=q;if(Q==="CRLF")X=q.replaceAll(`\r
10
+ `,`
11
+ `).split(`
12
+ `).join(`\r
13
+ `);D6(Z,X,{encoding:J}),q3.invalidate(Z)}function z$(Z){try{let q=N(),{resolvedPath:J}=F1(q,Z);return s5(J)}catch(q){if(A$(q))x(`detectFileEncoding failed for expected reason: ${q.code}`,{level:"debug"});else f(q);return"utf8"}}function qy(Z,q="utf8"){try{let J=N(),{resolvedPath:Q}=F1(J,Z),{buffer:X,bytesRead:$}=J.readSync(Q,{length:4096}),Y=X.toString(q,0,$);return r5(Y)}catch(J){return f(J),"LF"}}function Jy(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(q)=>" ".repeat(q.length))}function ez(Z){let q=Z?c5(Z):void 0,J=q?I$(r(),q):void 0;return{absolutePath:q,relativePath:J}}function Qy(Z){let{relativePath:q}=ez(Z);if(q&&!q.startsWith(".."))return q;let J=j$();if(Z.startsWith(J+z2))return"~"+Z.slice(J.length);return Z}function Xy(Z){let q=N();try{let J=S4(Z),Q=J3(Z,M$(Z)),Y=q.readdirSync(J).filter((H)=>J3(H.name,M$(H.name))===Q&&M6(J,H.name)!==Z)[0];if(Y)return Y.name;return}catch(J){if(!F6(J))f(J);return}}async function Yy(Z){let q=r(),J=S4(q),Q=Z;try{let H=await az(S4(Z));Q=M6(H,J3(Z))}catch{}let X=J===z2?z2:J+z2;if(!Q.startsWith(X)||Q.startsWith(q+z2)||Q===q)return;let $=I$(J,Q),Y=M6(q,$);try{return await T$(Y),Y}catch{return}}function ZR(){return!S1("tengu_compact_line_prefix_killswitch",!1)}function Hy({content:Z,startLine:q}){if(!Z)return"";let J=Z.split(/\r?\n/);if(ZR())return J.map((Q,X)=>`${X+q}→${Q}`).join(`
14
+ `);return J.map((Q,X)=>{let $=String(X+q);if($.length>=6)return`${$}→${Q}`;return`${$.padStart(6," ")}→${Q}`}).join(`
15
+ `)}function Gy(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function Ky(Z){try{return N().isDirEmptySync(Z)}catch(q){return F6(q)}}function Uy(Z){let{content:q}=q3.readFile(Z);return q}function D6(Z,q,J={encoding:"utf-8"}){let Q=N(),X=Z;try{let K=Q.readlinkSync(Z);X=oz(K)?K:rz(S4(Z),K),x(`Writing through symlink: ${Z} -> ${X}`)}catch{}let $=`${X}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=Q.statSync(X).mode,H=!0,x(`Preserving file permissions: ${Y.toString(8)}`)}catch(K){if(!F6(K))throw K;if(J.mode!==void 0)Y=J.mode,x(`Setting permissions for new file: ${Y.toString(8)}`)}try{x(`Writing to temp file: ${$}`);let K={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)K.mode=J.mode;if(R$($,q,K),x(`Temp file written successfully, size: ${q.length} bytes`),H&&Y!==void 0)iz($,Y),x("Applied original permissions to temp file");x(`Renaming ${$} to ${X}`),Q.renameSync($,X),x(`File ${X} written atomically`)}catch(K){x(`Failed to write file atomically: ${K}`,{level:"error"}),l0("tengu_atomic_write_error",{});try{x(`Cleaning up temp file: ${$}`),Q.unlinkSync($)}catch(W){x(`Failed to clean up temp file: ${W}`)}x(`Falling back to non-atomic write for ${X}`);try{let W={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)W.mode=J.mode;R$(X,q,W),x(`File ${X} written successfully with non-atomic fallback`)}catch(W){throw x(`Non-atomic write also failed: ${W}`),W}}}function Wy(){let Z=y0(),q=j$();if(Z==="macos")return M6(q,"Desktop");if(Z==="windows"){let Q=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(Q){let $=`/mnt/c${Q.replace(/^[A-Z]:/,"")}/Desktop`;if(N().existsSync($))return $}try{let $=N().readdirSync("/mnt/c/Users");for(let Y of $){if(Y.name==="Public"||Y.name==="Default"||Y.name==="Default User"||Y.name==="All Users")continue;let H=M6("/mnt/c/Users",Y.name,"Desktop");if(N().existsSync(H))return H}}catch(X){f(X)}}let J=M6(q,"Desktop");if(N().existsSync(J))return J;return q}function Vy(Z,q=tz){try{return N().statSync(Z).size<=q}catch{return!1}}function F$(Z){let q=sz(Z);if(y0()==="windows")q=q.replace(/\//g,"\\").toLowerCase();return q}function By(Z,q){return F$(Z)===F$(q)}var tz=262144,$y="Note: your current working directory is";var C4=B(()=>{D$();Q3();q1();Z1();C1();B2();_$();D0();p0();w4();B6()});import{appendFile as qR,mkdir as JR,readFile as QR,writeFile as XR}from"fs/promises";import{homedir as $R}from"os";import{dirname as YR,join as HR}from"path";async function GR(Z,q){let{code:J}=await b1("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:q});return J===0}function KR(){return HR($R(),".config","git","ignore")}async function w$(Z,q=r()){try{if(!await O$(q))return;let J=`**/${Z}`,Q=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await GR(Q,q))return;let X=KR(),$=YR(X);await JR($,{recursive:!0});try{if((await QR(X,{encoding:"utf-8"})).includes(J))return;await qR(X,`
16
+ ${J}
17
+ `)}catch(Y){if(W0(Y)==="ENOENT")await XR(X,`${J}
18
+ `,"utf-8");else throw Y}}catch(J){f(J)}}var k$=B(()=>{q1();C1();b4();R2();p0()});function F2(Z,q=!1){let J=Z.length,Q=0,X="",$=0,Y=16,H=0,K=0,W=0,U=0,V=0;function L(M,O){let T=0,j=0;while(T<M||!O){let A=Z.charCodeAt(Q);if(A>=48&&A<=57)j=j*16+A-48;else if(A>=65&&A<=70)j=j*16+A-65+10;else if(A>=97&&A<=102)j=j*16+A-97+10;else break;Q++,T++}if(T<M)j=-1;return j}function _(M){Q=M,X="",$=0,Y=16,V=0}function z(){let M=Q;if(Z.charCodeAt(Q)===48)Q++;else{Q++;while(Q<Z.length&&A6(Z.charCodeAt(Q)))Q++}if(Q<Z.length&&Z.charCodeAt(Q)===46)if(Q++,Q<Z.length&&A6(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&A6(Z.charCodeAt(Q)))Q++}else return V=3,Z.substring(M,Q);let O=Q;if(Q<Z.length&&(Z.charCodeAt(Q)===69||Z.charCodeAt(Q)===101)){if(Q++,Q<Z.length&&Z.charCodeAt(Q)===43||Z.charCodeAt(Q)===45)Q++;if(Q<Z.length&&A6(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&A6(Z.charCodeAt(Q)))Q++;O=Q}else V=3}return Z.substring(M,O)}function R(){let M="",O=Q;while(!0){if(Q>=J){M+=Z.substring(O,Q),V=2;break}let T=Z.charCodeAt(Q);if(T===34){M+=Z.substring(O,Q),Q++;break}if(T===92){if(M+=Z.substring(O,Q),Q++,Q>=J){V=2;break}switch(Z.charCodeAt(Q++)){case 34:M+='"';break;case 92:M+="\\";break;case 47:M+="/";break;case 98:M+="\b";break;case 102:M+="\f";break;case 110:M+=`
19
+ `;break;case 114:M+="\r";break;case 116:M+="\t";break;case 117:let A=L(4,!0);if(A>=0)M+=String.fromCharCode(A);else V=4;break;default:V=5}O=Q;continue}if(T>=0&&T<=31)if(M2(T)){M+=Z.substring(O,Q),V=2;break}else V=6;Q++}return M}function D(){if(X="",V=0,$=Q,K=H,U=W,Q>=J)return $=J,Y=17;let M=Z.charCodeAt(Q);if(X3(M)){do Q++,X+=String.fromCharCode(M),M=Z.charCodeAt(Q);while(X3(M));return Y=15}if(M2(M)){if(Q++,X+=String.fromCharCode(M),M===13&&Z.charCodeAt(Q)===10)Q++,X+=`
20
+ `;return H++,W=Q,Y=14}switch(M){case 123:return Q++,Y=1;case 125:return Q++,Y=2;case 91:return Q++,Y=3;case 93:return Q++,Y=4;case 58:return Q++,Y=6;case 44:return Q++,Y=5;case 34:return Q++,X=R(),Y=10;case 47:let O=Q-1;if(Z.charCodeAt(Q+1)===47){Q+=2;while(Q<J){if(M2(Z.charCodeAt(Q)))break;Q++}return X=Z.substring(O,Q),Y=12}if(Z.charCodeAt(Q+1)===42){Q+=2;let T=J-1,j=!1;while(Q<T){let A=Z.charCodeAt(Q);if(A===42&&Z.charCodeAt(Q+1)===47){Q+=2,j=!0;break}if(Q++,M2(A)){if(A===13&&Z.charCodeAt(Q)===10)Q++;H++,W=Q}}if(!j)Q++,V=1;return X=Z.substring(O,Q),Y=13}return X+=String.fromCharCode(M),Q++,Y=16;case 45:if(X+=String.fromCharCode(M),Q++,Q===J||!A6(Z.charCodeAt(Q)))return Y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return X+=z(),Y=11;default:while(Q<J&&F(M))Q++,M=Z.charCodeAt(Q);if($!==Q){switch(X=Z.substring($,Q),X){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return X+=String.fromCharCode(M),Q++,Y=16}}function F(M){if(X3(M)||M2(M))return!1;switch(M){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function k(){let M;do M=D();while(M>=12&&M<=15);return M}return{setPosition:_,getPosition:()=>Q,scan:q?k:D,getToken:()=>Y,getTokenValue:()=>X,getTokenOffset:()=>$,getTokenLength:()=>Q-$,getTokenStartLine:()=>K,getTokenStartCharacter:()=>$-U,getTokenError:()=>V}}function X3(Z){return Z===32||Z===9}function M2(Z){return Z===10||Z===13}function A6(Z){return Z>=48&&Z<=57}var N$;var h4=B(()=>{(function(Z){Z[Z.lineFeed=10]="lineFeed",Z[Z.carriageReturn=13]="carriageReturn",Z[Z.space=32]="space",Z[Z._0=48]="_0",Z[Z._1=49]="_1",Z[Z._2=50]="_2",Z[Z._3=51]="_3",Z[Z._4=52]="_4",Z[Z._5=53]="_5",Z[Z._6=54]="_6",Z[Z._7=55]="_7",Z[Z._8=56]="_8",Z[Z._9=57]="_9",Z[Z.a=97]="a",Z[Z.b=98]="b",Z[Z.c=99]="c",Z[Z.d=100]="d",Z[Z.e=101]="e",Z[Z.f=102]="f",Z[Z.g=103]="g",Z[Z.h=104]="h",Z[Z.i=105]="i",Z[Z.j=106]="j",Z[Z.k=107]="k",Z[Z.l=108]="l",Z[Z.m=109]="m",Z[Z.n=110]="n",Z[Z.o=111]="o",Z[Z.p=112]="p",Z[Z.q=113]="q",Z[Z.r=114]="r",Z[Z.s=115]="s",Z[Z.t=116]="t",Z[Z.u=117]="u",Z[Z.v=118]="v",Z[Z.w=119]="w",Z[Z.x=120]="x",Z[Z.y=121]="y",Z[Z.z=122]="z",Z[Z.A=65]="A",Z[Z.B=66]="B",Z[Z.C=67]="C",Z[Z.D=68]="D",Z[Z.E=69]="E",Z[Z.F=70]="F",Z[Z.G=71]="G",Z[Z.H=72]="H",Z[Z.I=73]="I",Z[Z.J=74]="J",Z[Z.K=75]="K",Z[Z.L=76]="L",Z[Z.M=77]="M",Z[Z.N=78]="N",Z[Z.O=79]="O",Z[Z.P=80]="P",Z[Z.Q=81]="Q",Z[Z.R=82]="R",Z[Z.S=83]="S",Z[Z.T=84]="T",Z[Z.U=85]="U",Z[Z.V=86]="V",Z[Z.W=87]="W",Z[Z.X=88]="X",Z[Z.Y=89]="Y",Z[Z.Z=90]="Z",Z[Z.asterisk=42]="asterisk",Z[Z.backslash=92]="backslash",Z[Z.closeBrace=125]="closeBrace",Z[Z.closeBracket=93]="closeBracket",Z[Z.colon=58]="colon",Z[Z.comma=44]="comma",Z[Z.dot=46]="dot",Z[Z.doubleQuote=34]="doubleQuote",Z[Z.minus=45]="minus",Z[Z.openBrace=123]="openBrace",Z[Z.openBracket=91]="openBracket",Z[Z.plus=43]="plus",Z[Z.slash=47]="slash",Z[Z.formFeed=12]="formFeed",Z[Z.tab=9]="tab"})(N$||(N$={}))});var A0,$3,P$;var x$=B(()=>{A0=Array(20).fill(0).map((Z,q)=>{return" ".repeat(q)}),$3={" ":{"\n":Array(200).fill(0).map((Z,q)=>{return`
21
+ `+" ".repeat(q)}),"\r":Array(200).fill(0).map((Z,q)=>{return"\r"+" ".repeat(q)}),"\r\n":Array(200).fill(0).map((Z,q)=>{return`\r
22
+ `+" ".repeat(q)})},"\t":{"\n":Array(200).fill(0).map((Z,q)=>{return`
23
+ `+"\t".repeat(q)}),"\r":Array(200).fill(0).map((Z,q)=>{return"\r"+"\t".repeat(q)}),"\r\n":Array(200).fill(0).map((Z,q)=>{return`\r
24
+ `+"\t".repeat(q)})}},P$=[`
25
+ `,"\r",`\r
26
+ `]});function Y3(Z,q,J){let Q,X,$,Y,H;if(q){Y=q.offset,H=Y+q.length,$=Y;while($>0&&!D2(Z,$-1))$--;let T=H;while(T<Z.length&&!D2(Z,T))T++;X=Z.substring($,T),Q=WR(X,J)}else X=Z,Q=0,$=0,Y=0,H=Z.length;let K=VR(J,Z),W=P$.includes(K),U=0,V=0,L;if(J.insertSpaces)L=A0[J.tabSize||4]??T6(A0[1],J.tabSize||4);else L="\t";let _=L==="\t"?"\t":" ",z=F2(X,!1),R=!1;function D(){if(U>1)return T6(K,U)+T6(L,Q+V);let T=L.length*(Q+V);if(!W||T>$3[_][K].length)return K+T6(L,Q+V);if(T<=0)return K;return $3[_][K][T]}function F(){let T=z.scan();U=0;while(T===15||T===14){if(T===14&&J.keepLines)U+=1;else if(T===14)U=1;T=z.scan()}return R=T===16||z.getTokenError()!==0,T}let k=[];function M(T,j,A){if(!R&&(!q||j<H&&A>Y)&&Z.substring(j,A)!==T)k.push({offset:j,length:A-j,content:T})}let O=F();if(J.keepLines&&U>0)M(T6(K,U),0,0);if(O!==17){let T=z.getTokenOffset()+$,j=L.length*Q<20&&J.insertSpaces?A0[L.length*Q]:T6(L,Q);M(j,$,T)}while(O!==17){let T=z.getTokenOffset()+z.getTokenLength()+$,j=F(),A="",g=!1;while(U===0&&(j===12||j===13)){let P=z.getTokenOffset()+$;M(A0[1],T,P),T=z.getTokenOffset()+z.getTokenLength()+$,g=j===12,A=g?D():"",j=F()}if(j===2){if(O!==1)V--;if(J.keepLines&&U>0||!J.keepLines&&O!==1)A=D();else if(J.keepLines)A=A0[1]}else if(j===4){if(O!==3)V--;if(J.keepLines&&U>0||!J.keepLines&&O!==3)A=D();else if(J.keepLines)A=A0[1]}else{switch(O){case 3:case 1:if(V++,J.keepLines&&U>0||!J.keepLines)A=D();else A=A0[1];break;case 5:if(J.keepLines&&U>0||!J.keepLines)A=D();else A=A0[1];break;case 12:A=D();break;case 13:if(U>0)A=D();else if(!g)A=A0[1];break;case 6:if(J.keepLines&&U>0)A=D();else if(!g)A=A0[1];break;case 10:if(J.keepLines&&U>0)A=D();else if(j===6&&!g)A="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(J.keepLines&&U>0)A=D();else if((j===12||j===13)&&!g)A=A0[1];else if(j!==5&&j!==17)R=!0;break;case 16:R=!0;break}if(U>0&&(j===12||j===13))A=D()}if(j===17)if(J.keepLines&&U>0)A=D();else A=J.insertFinalNewline?K:"";let w=z.getTokenOffset()+$;M(A,T,w),O=j}return k}function T6(Z,q){let J="";for(let Q=0;Q<q;Q++)J+=Z;return J}function WR(Z,q){let J=0,Q=0,X=q.tabSize||4;while(J<Z.length){let $=Z.charAt(J);if($===A0[1])Q++;else if($==="\t")Q+=X;else break;J++}return Math.floor(Q/X)}function VR(Z,q){for(let J=0;J<q.length;J++){let Q=q.charAt(J);if(Q==="\r"){if(J+1<q.length&&q.charAt(J+1)===`
27
+ `)return`\r
28
+ `;return"\r"}else if(Q===`
29
+ `)return`
30
+ `}return Z&&Z.eol||`
31
+ `}function D2(Z,q){return`\r
32
+ `.indexOf(Z.charAt(q))!==-1}var H3=B(()=>{h4();x$()});function E$(Z,q=[],J=A2.DEFAULT){let Q=null,X=[],$=[];function Y(K){if(Array.isArray(X))X.push(K);else if(Q!==null)X[Q]=K}return K3(Z,{onObjectBegin:()=>{let K={};Y(K),$.push(X),X=K,Q=null},onObjectProperty:(K)=>{Q=K},onObjectEnd:()=>{X=$.pop()},onArrayBegin:()=>{let K=[];Y(K),$.push(X),X=K,Q=null},onArrayEnd:()=>{X=$.pop()},onLiteralValue:Y,onError:(K,W,U)=>{q.push({error:K,offset:W,length:U})}},J),X[0]}function G3(Z,q=[],J=A2.DEFAULT){let Q={type:"array",offset:-1,length:-1,children:[],parent:void 0};function X(K){if(Q.type==="property")Q.length=K-Q.offset,Q=Q.parent}function $(K){return Q.children.push(K),K}K3(Z,{onObjectBegin:(K)=>{Q=$({type:"object",offset:K,length:-1,parent:Q,children:[]})},onObjectProperty:(K,W,U)=>{Q=$({type:"property",offset:W,length:-1,parent:Q,children:[]}),Q.children.push({type:"string",value:K,offset:W,length:U,parent:Q})},onObjectEnd:(K,W)=>{X(K+W),Q.length=K+W-Q.offset,Q=Q.parent,X(K+W)},onArrayBegin:(K,W)=>{Q=$({type:"array",offset:K,length:-1,parent:Q,children:[]})},onArrayEnd:(K,W)=>{Q.length=K+W-Q.offset,Q=Q.parent,X(K+W)},onLiteralValue:(K,W,U)=>{$({type:LR(K),offset:W,length:U,parent:Q,value:K}),X(W+U)},onSeparator:(K,W,U)=>{if(Q.type==="property"){if(K===":")Q.colonOffset=W;else if(K===",")X(W)}},onError:(K,W,U)=>{q.push({error:K,offset:W,length:U})}},J);let H=Q.children[0];if(H)delete H.parent;return H}function g4(Z,q){if(!Z)return;let J=Z;for(let Q of q)if(typeof Q==="string"){if(J.type!=="object"||!Array.isArray(J.children))return;let X=!1;for(let $ of J.children)if(Array.isArray($.children)&&$.children[0].value===Q&&$.children.length===2){J=$.children[1],X=!0;break}if(!X)return}else{let X=Q;if(J.type!=="array"||X<0||!Array.isArray(J.children)||X>=J.children.length)return;J=J.children[X]}return J}function K3(Z,q,J=A2.DEFAULT){let Q=F2(Z,!1),X=[],$=0;function Y(E){return E?()=>$===0&&E(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function H(E){return E?(y)=>$===0&&E(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function K(E){return E?(y)=>$===0&&E(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>X.slice()):()=>!0}function W(E){return E?()=>{if($>0)$++;else if(E(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>X.slice())===!1)$=1}:()=>!0}function U(E){return E?()=>{if($>0)$--;if($===0)E(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter())}:()=>!0}let V=W(q.onObjectBegin),L=K(q.onObjectProperty),_=U(q.onObjectEnd),z=W(q.onArrayBegin),R=U(q.onArrayEnd),D=K(q.onLiteralValue),F=H(q.onSeparator),k=Y(q.onComment),M=H(q.onError),O=J&&J.disallowComments,T=J&&J.allowTrailingComma;function j(){while(!0){let E=Q.scan();switch(Q.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:if(!O)A(11);break;case 2:A(12);break;case 6:A(16);break}switch(E){case 12:case 13:if(O)A(10);else k();break;case 16:A(1);break;case 15:case 14:break;default:return E}}}function A(E,y=[],u=[]){if(M(E),y.length+u.length>0){let h=Q.getToken();while(h!==17){if(y.indexOf(h)!==-1){j();break}else if(u.indexOf(h)!==-1)break;h=j()}}}function g(E){let y=Q.getTokenValue();if(E)D(y);else L(y),X.push(y);return j(),!0}function w(){switch(Q.getToken()){case 11:let E=Q.getTokenValue(),y=Number(E);if(isNaN(y))A(2),y=0;D(y);break;case 7:D(null);break;case 8:D(!0);break;case 9:D(!1);break;default:return!1}return j(),!0}function P(){if(Q.getToken()!==10)return A(3,[],[2,5]),!1;if(g(!1),Q.getToken()===6){if(F(":"),j(),!t())A(4,[],[2,5])}else A(5,[],[2,5]);return X.pop(),!0}function v(){V(),j();let E=!1;while(Q.getToken()!==2&&Q.getToken()!==17){if(Q.getToken()===5){if(!E)A(4,[],[]);if(F(","),j(),Q.getToken()===2&&T)break}else if(E)A(6,[],[]);if(!P())A(4,[],[2,5]);E=!0}if(_(),Q.getToken()!==2)A(7,[2],[]);else j();return!0}function b(){z(),j();let E=!0,y=!1;while(Q.getToken()!==4&&Q.getToken()!==17){if(Q.getToken()===5){if(!y)A(4,[],[]);if(F(","),j(),Q.getToken()===4&&T)break}else if(y)A(6,[],[]);if(E)X.push(0),E=!1;else X[X.length-1]++;if(!t())A(4,[],[4,5]);y=!0}if(R(),!E)X.pop();if(Q.getToken()!==4)A(8,[4],[]);else j();return!0}function t(){switch(Q.getToken()){case 3:return b();case 1:return v();case 10:return g(!0);default:return w()}}if(j(),Q.getToken()===17){if(J.allowEmptyContent)return!0;return A(4,[],[]),!1}if(!t())return A(4,[],[]),!1;if(Q.getToken()!==17)A(9,[],[]);return!0}function LR(Z){switch(typeof Z){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(!Z)return"null";else if(Array.isArray(Z))return"array";return"object"}default:return"null"}}var A2;var U3=B(()=>{h4();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(A2||(A2={}))});function v$(Z,q,J,Q){let X=q.slice(),Y=G3(Z,[]),H=void 0,K=void 0;while(X.length>0)if(K=X.pop(),H=g4(Y,X),H===void 0&&J!==void 0)if(typeof K==="string")J={[K]:J};else J=[J];else break;if(!H){if(J===void 0)throw Error("Can not delete in empty document");return h1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(J)},Q)}else if(H.type==="object"&&typeof K==="string"&&Array.isArray(H.children)){let W=g4(H,[K]);if(W!==void 0)if(J===void 0){if(!W.parent)throw Error("Malformed AST");let U=H.children.indexOf(W.parent),V,L=W.parent.offset+W.parent.length;if(U>0){let _=H.children[U-1];V=_.offset+_.length}else if(V=H.offset+1,H.children.length>1)L=H.children[1].offset;return h1(Z,{offset:V,length:L-V,content:""},Q)}else return h1(Z,{offset:W.offset,length:W.length,content:JSON.stringify(J)},Q);else{if(J===void 0)return[];let U=`${JSON.stringify(K)}: ${JSON.stringify(J)}`,V=Q.getInsertionIndex?Q.getInsertionIndex(H.children.map((_)=>_.children[0].value)):H.children.length,L;if(V>0){let _=H.children[V-1];L={offset:_.offset+_.length,length:0,content:","+U}}else if(H.children.length===0)L={offset:H.offset+1,length:0,content:U};else L={offset:H.offset+1,length:0,content:U+","};return h1(Z,L,Q)}}else if(H.type==="array"&&typeof K==="number"&&Array.isArray(H.children)){let W=K;if(W===-1){let U=`${JSON.stringify(J)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:U};else{let L=H.children[H.children.length-1];V={offset:L.offset+L.length,length:0,content:","+U}}return h1(Z,V,Q)}else if(J===void 0&&H.children.length>=0){let U=K,V=H.children[U],L;if(H.children.length===1)L={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===U){let _=H.children[U-1],z=_.offset+_.length,R=H.offset+H.length;L={offset:z,length:R-2-z,content:""}}else L={offset:V.offset,length:H.children[U+1].offset-V.offset,content:""};return h1(Z,L,Q)}else if(J!==void 0){let U,V=`${JSON.stringify(J)}`;if(!Q.isArrayInsertion&&H.children.length>K){let L=H.children[K];U={offset:L.offset,length:L.length,content:V}}else if(H.children.length===0||K===0)U={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let L=K>H.children.length?H.children.length:K,_=H.children[L-1];U={offset:_.offset+_.length,length:0,content:","+V}}return h1(Z,U,Q)}else throw Error(`Can not ${J===void 0?"remove":Q.isArrayInsertion?"insert":"modify"} Array index ${W} as length is not sufficient`)}else throw Error(`Can not add ${typeof K!=="number"?"index":"property"} to parent of type ${H.type}`)}function h1(Z,q,J){if(!J.formattingOptions)return[q];let Q=f4(Z,q),X=q.offset,$=q.offset+q.content.length;if(q.length===0||q.content.length===0){while(X>0&&!D2(Q,X-1))X--;while($<Q.length&&!D2(Q,$))$++}let Y=Y3(Q,{offset:X,length:$-X},{...J.formattingOptions,keepLines:!1});for(let K=Y.length-1;K>=0;K--){let W=Y[K];Q=f4(Q,W),X=Math.min(X,W.offset),$=Math.max($,W.offset+W.length),$+=W.content.length-W.length}let H=Z.length-(Q.length-$)-X;return[{offset:X,length:H,content:Q.substring(X,$)}]}function f4(Z,q){return Z.substring(0,q.offset)+q.content+Z.substring(q.offset+q.length)}var y$=B(()=>{H3();U3()});function h$(Z,q,J,Q){return v$(Z,q,J,Q)}function g$(Z,q){let J=q.slice(0).sort((X,$)=>{let Y=X.offset-$.offset;if(Y===0)return X.length-$.length;return Y}),Q=Z.length;for(let X=J.length-1;X>=0;X--){let $=J[X];if($.offset+$.length<=Q)Z=f4(Z,$);else throw Error("Overlapping edit");Q=$.offset}return Z}var C$,S$,W3,b$;var f$=B(()=>{H3();y$();h4();U3();(function(Z){Z[Z.None=0]="None",Z[Z.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",Z[Z.UnexpectedEndOfString=2]="UnexpectedEndOfString",Z[Z.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",Z[Z.InvalidUnicode=4]="InvalidUnicode",Z[Z.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",Z[Z.InvalidCharacter=6]="InvalidCharacter"})(C$||(C$={}));(function(Z){Z[Z.OpenBraceToken=1]="OpenBraceToken",Z[Z.CloseBraceToken=2]="CloseBraceToken",Z[Z.OpenBracketToken=3]="OpenBracketToken",Z[Z.CloseBracketToken=4]="CloseBracketToken",Z[Z.CommaToken=5]="CommaToken",Z[Z.ColonToken=6]="ColonToken",Z[Z.NullKeyword=7]="NullKeyword",Z[Z.TrueKeyword=8]="TrueKeyword",Z[Z.FalseKeyword=9]="FalseKeyword",Z[Z.StringLiteral=10]="StringLiteral",Z[Z.NumericLiteral=11]="NumericLiteral",Z[Z.LineCommentTrivia=12]="LineCommentTrivia",Z[Z.BlockCommentTrivia=13]="BlockCommentTrivia",Z[Z.LineBreakTrivia=14]="LineBreakTrivia",Z[Z.Trivia=15]="Trivia",Z[Z.Unknown=16]="Unknown",Z[Z.EOF=17]="EOF"})(S$||(S$={}));W3=E$;(function(Z){Z[Z.InvalidSymbol=1]="InvalidSymbol",Z[Z.InvalidNumberFormat=2]="InvalidNumberFormat",Z[Z.PropertyNameExpected=3]="PropertyNameExpected",Z[Z.ValueExpected=4]="ValueExpected",Z[Z.ColonExpected=5]="ColonExpected",Z[Z.CommaExpected=6]="CommaExpected",Z[Z.CloseBraceExpected=7]="CloseBraceExpected",Z[Z.CloseBracketExpected=8]="CloseBracketExpected",Z[Z.EndOfFileExpected=9]="EndOfFileExpected",Z[Z.InvalidCommentToken=10]="InvalidCommentToken",Z[Z.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",Z[Z.UnexpectedEndOfString=12]="UnexpectedEndOfString",Z[Z.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",Z[Z.InvalidUnicode=14]="InvalidUnicode",Z[Z.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",Z[Z.InvalidCharacter=16]="InvalidCharacter"})(b$||(b$={}))});import{open as RR,readFile as MR,stat as FR}from"fs/promises";function u$(Z,q){try{return{ok:!0,value:JSON.parse(d0(Z))}}catch(J){if(q)f(J);return{ok:!1}}}function py(Z){if(!Z)return null;try{return W3(d0(Z))}catch(q){return f(q),null}}function AR(Z){let q=p$,J=Z.length,Q=q(Z);if(!Q.error||Q.done||Q.read>=J)return Q.values;let{values:X,read:$}=Q;while($<J){let Y=typeof Z==="string"?Z.indexOf(`
33
+ `,$):Z.indexOf(10,$);if(Y===-1)break;$=Y+1;let H=q(Z,$);if(H.values.length>0)X=X.concat(H.values);if(!H.error||H.done||H.read>=J)break;$=H.read}return X}function TR(Z){let q=Z.length,J=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)J=3;let Q=[];while(J<q){let X=Z.indexOf(10,J);if(X===-1)X=q;let $=Z.toString("utf8",J,X).trim();if(J=X+1,!$)continue;try{Q.push(JSON.parse($))}catch{}}return Q}function jR(Z){let q=d0(Z),J=q.length,Q=0,X=[];while(Q<J){let $=q.indexOf(`
34
+ `,Q);if($===-1)$=J;let Y=q.substring(Q,$).trim();if(Q=$+1,!Y)continue;try{X.push(JSON.parse(Y))}catch{}}return X}function V3(Z){if(p$)return AR(Z);if(typeof Z==="string")return jR(Z);return TR(Z)}async function dy(Z){let H=[];try{let{size:q}=await FR(Z);if(q<=T2)return V3(await MR(Z));const J=L6(H,await RR(Z,"r"),1);let Q=Buffer.allocUnsafe(T2);let X=0;let $=q-T2;while(X<T2){let{bytesRead:L}=await J.read(Q,X,T2-X,$+X);if(L===0)break;X+=L}let Y=Q.indexOf(10);if(Y!==-1&&Y<X-1)return V3(Q.subarray(Y+1,X));return V3(Q.subarray(0,X))}catch(K){var W=K,U=1}finally{var V=_6(H,W,U);V&&await V}}function cy(Z,q){try{if(!Z||Z.trim()==="")return m([q],null,4);let J=d0(Z),Q=W3(J);if(Array.isArray(Q)){let X=Q.length,H=h$(J,X===0?[0]:[X],q,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let K=[...Q,q];return m(K,null,4)}return g$(J,H)}else return m([q],null,4)}catch(J){return f(J),m([q],null,4)}}var DR=8192,m$,C0,p$,T2=104857600;var m4=B(()=>{f$();v4();p0();O4();z0();m$=M1(u$,(Z)=>Z,50),C0=Object.assign(function(q,J=!0){if(!q)return null;let Q=q.length>DR?u$(q,J):m$(q,J);return Q.ok?Q.value:null},{cache:m$.cache});p$=(()=>{if(typeof Bun>"u")return!1;let q=Bun.JSONL;if(!q?.parseChunk)return!1;return q.parseChunk})()});function oy(Z){switch(Z){case"userSettings":return"user";case"projectSettings":return"project";case"localSettings":return"project, gitignored";case"flagSettings":return"cli flag";case"policySettings":return"managed"}}function sy(Z){switch(Z){case"userSettings":return"User";case"projectSettings":return"Project";case"localSettings":return"Local";case"flagSettings":return"Flag";case"policySettings":return"Managed";case"plugin":return"Plugin";case"bundled":case"built-in":return"Built-in"}}function ry(Z){switch(Z){case"userSettings":return"user settings";case"projectSettings":return"shared project settings";case"localSettings":return"project local settings";case"flagSettings":return"command line arguments";case"policySettings":return"enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"command configuration";case"session":return"current session"}}function ty(Z){switch(Z){case"userSettings":return"User settings";case"projectSettings":return"Shared project settings";case"localSettings":return"Project local settings";case"flagSettings":return"Command line arguments";case"policySettings":return"Enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"Command configuration";case"session":return"Current session"}}function ey(Z){if(Z==="")return[];let q=Z.split(",").map((Q)=>Q.trim()),J=[];for(let Q of q)switch(Q){case"user":J.push("userSettings");break;case"project":J.push("projectSettings");break;case"local":J.push("localSettings");break;default:throw Error(`Invalid setting source: ${Q}. Valid options are: user, project, local`)}return J}function j2(){let Z=d$(),q=new Set(Z);return q.add("policySettings"),q.add("flagSettings"),Array.from(q)}function ZC(Z){return j2().includes(Z)}var ay,qC,c$="https://json.schemastore.org/claude-code-settings.json";var B3=B(()=>{j6();ay=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];qC=["localSettings","projectSettings","userSettings"]});function l$(Z){u4.set(Z,Date.now())}function QC(Z,q){let J=u4.get(Z);if(J!==void 0&&Date.now()-J<q)return u4.delete(Z),!0;return!1}function XC(){u4.clear()}var u4;var n$=B(()=>{u4=new Map});import{join as IR}from"path";var D1,I2;var p4=B(()=>{v1();B6();D1=d(function(){switch(y0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),I2=d(function(){return IR(D1(),"managed-settings.d")})});var OR,wR,i$;var a$=B(()=>{n0();g1();OR=I(()=>G.object({allowedDomains:G.array(G.string()).optional(),allowManagedDomainsOnly:G.boolean().optional().describe("When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."),allowUnixSockets:G.array(G.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:G.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:G.boolean().optional(),httpProxyPort:G.number().optional(),socksProxyPort:G.number().optional()}).optional()),wR=I(()=>G.object({allowWrite:G.array(G.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:G.array(G.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:G.array(G.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:G.array(G.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths."),allowManagedReadPathsOnly:G.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used.")}).optional()),i$=I(()=>G.object({enabled:G.boolean().optional(),failIfUnavailable:G.boolean().optional().describe("Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies, unsupported platform, or platform not in enabledPlatforms). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate."),autoAllowBashIfSandboxed:G.boolean().optional(),allowUnsandboxedCommands:G.boolean().optional().describe("Allow trusted, user-initiated commands to run outside the sandbox. When false, sandbox override requests are ignored and all commands must run sandboxed. Default: true."),network:OR(),filesystem:wR(),ignoreViolations:G.record(G.string(),G.array(G.string())).optional(),enableWeakerNestedSandbox:G.boolean().optional(),enableWeakerNetworkIsolation:G.boolean().optional().describe("macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. "+"**Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false"),excludedCommands:G.array(G.string()).optional(),ripgrep:G.object({command:G.string(),args:G.array(G.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});function o$(){return process.versions.bun!==void 0}function BC(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var s$=()=>{};function e(Z){if(typeof Z!=="object"||Z===null)return!1;let q=Object.getPrototypeOf(Z);return(q===null||q===Object.prototype||Object.getPrototypeOf(q)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}var X1=()=>{};import{fileURLToPath as kR}from"node:url";var I6=(Z,q)=>{let J=_3(NR(Z));if(typeof J!=="string")throw TypeError(`${q} must be a string or a file URL: ${J}.`);return J},NR=(Z)=>L3(Z)?Z.toString():Z,L3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,_3=(Z)=>Z instanceof URL?kR(Z):Z;var O6=()=>{};var d4=(Z,q=[],J={})=>{let Q=I6(Z,"First argument"),[X,$]=e(q)?[[],q]:[q,J];if(!Array.isArray(X))throw TypeError(`Second argument must be either an array of arguments or an options object: ${X}`);if(X.some((K)=>typeof K==="object"&&K!==null))throw TypeError(`Second argument must be an array of strings: ${X}`);let Y=X.map(String),H=Y.find((K)=>K.includes("\x00"));if(H!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${H}`);if(!e($))throw TypeError(`Last argument must be an options object: ${$}`);return[Q,Y,$]};var z3=B(()=>{X1();O6()});import{StringDecoder as PR}from"node:string_decoder";var r$,t$=(Z)=>r$.call(Z)==="[object ArrayBuffer]",J0=(Z)=>r$.call(Z)==="[object Uint8Array]",$1=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),xR,e$=(Z)=>xR.encode(Z),ER,c4=(Z)=>ER.decode(Z),Z9=(Z,q)=>{return vR(Z,q).join("")},vR=(Z,q)=>{if(q==="utf8"&&Z.every(($)=>typeof $==="string"))return Z;let J=new PR(q),Q=Z.map(($)=>typeof $==="string"?e$($):$).map(($)=>J.write($)),X=J.end();return X===""?Q:[...Q,X]},O2=(Z)=>{if(Z.length===1&&J0(Z[0]))return Z[0];return R3(yR(Z))},yR=(Z)=>Z.map((q)=>typeof q==="string"?e$(q):q),R3=(Z)=>{let q=new Uint8Array(CR(Z)),J=0;for(let Q of Z)q.set(Q,J),J+=Q.length;return q},CR=(Z)=>{let q=0;for(let J of Z)q+=J.length;return q};var T0=B(()=>{({toString:r$}=Object.prototype),xR=new TextEncoder,ER=new TextDecoder});import{ChildProcess as SR}from"node:child_process";var X9=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),$9=(Z,q)=>{let J=[];for(let[$,Y]of Z.entries())J=bR({templates:Z,expressions:q,tokens:J,index:$,template:Y});if(J.length===0)throw TypeError("Template script must not be empty");let[Q,...X]=J;return[Q,X,{}]},bR=({templates:Z,expressions:q,tokens:J,index:Q,template:X})=>{if(X===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[Q]}`);let{nextTokens:$,leadingWhitespaces:Y,trailingWhitespaces:H}=hR(X,Z.raw[Q]),K=J9(J,$,Y);if(Q===q.length)return K;let W=q[Q],U=Array.isArray(W)?W.map((V)=>Q9(V)):[Q9(W)];return J9(K,U,H)},hR=(Z,q)=>{if(q.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let J=[],Q=0,X=q9.has(q[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let K=q[H];if(q9.has(K)){if(Q!==Y)J.push(Z.slice(Q,Y));Q=Y+1}else if(K==="\\"){let W=q[H+1];if(W===`
35
+ `)Y-=1,H+=1;else if(W==="u"&&q[H+2]==="{")H=q.indexOf("}",H+3);else H+=gR[W]??1}}let $=Q===Z.length;if(!$)J.push(Z.slice(Q));return{nextTokens:J,leadingWhitespaces:X,trailingWhitespaces:$}},q9,gR,J9=(Z,q,J)=>J||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q[0]}`,...q.slice(1)],Q9=(Z)=>{let q=typeof Z;if(q==="string")return Z;if(q==="number")return String(Z);if(e(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return fR(Z);if(Z instanceof SR||Object.prototype.toString.call(Z)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${q}" in template expression`)},fR=({stdout:Z})=>{if(typeof Z==="string")return Z;if(J0(Z))return c4(Z);if(Z===void 0)throw TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);throw TypeError(`Unexpected "${typeof Z}" stdout in template expression`)};var Y9=B(()=>{X1();T0();q9=new Set([" ","\t","\r",`
36
+ `]),gR={x:3,u:5}});import M3 from"node:process";var S0=(Z)=>l4.includes(Z),l4,w0,n4=(Z)=>w0[Z]??`stdio[${Z}]`;var Y1=B(()=>{l4=[M3.stdin,M3.stdout,M3.stderr],w0=["stdin","stdout","stderr"]});import{debuglog as mR}from"node:util";var G9=(Z)=>{let q={...Z};for(let J of A3)q[J]=F3(Z,J);return q},F3=(Z,q)=>{let J=Array.from({length:uR(Z)+1}),Q=pR(Z[q],J,q);return iR(Q,q)},uR=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,w0.length):w0.length,pR=(Z,q,J)=>e(Z)?dR(Z,q,J):q.fill(Z),dR=(Z,q,J)=>{for(let Q of Object.keys(Z).sort(cR))for(let X of lR(Q,J,q))q[X]=Z[Q];return q},cR=(Z,q)=>H9(Z)<H9(q)?1:-1,H9=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},lR=(Z,q,J)=>{if(Z==="ipc")return[J.length-1];let Q=D3(Z);if(Q===void 0||Q===0)throw TypeError(`"${q}.${Z}" is invalid.
37
+ It must be "${q}.stdout", "${q}.stderr", "${q}.all", "${q}.ipc", or "${q}.fd3", "${q}.fd4" (and so on).`);if(Q>=J.length)throw TypeError(`"${q}.${Z}" is invalid: that file descriptor does not exist.
38
+ Please set the "stdio" option to ensure that file descriptor exists.`);return Q==="all"?[1,2]:[Q]},D3=(Z)=>{if(Z==="all")return Z;if(w0.includes(Z))return w0.indexOf(Z);let q=nR.exec(Z);if(q!==null)return Number(q[1])},nR,iR=(Z,q)=>Z.map((J)=>J===void 0?oR[q]:J),aR,oR,A3,H1=(Z,q)=>q==="ipc"?Z.at(-1):Z[q];var G1=B(()=>{X1();Y1();nR=/^fd(\d+)$/,aR=mR("execa").enabled?"full":"none",oR={lines:!1,buffer:!0,maxBuffer:1e8,verbose:aR,stripFinalNewline:!0},A3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var w6=({verbose:Z},q)=>T3(Z,q)!=="none",k6=({verbose:Z},q)=>!["none","short"].includes(T3(Z,q)),K9=({verbose:Z},q)=>{let J=T3(Z,q);return i4(J)?J:void 0},T3=(Z,q)=>q===void 0?sR(Z):H1(Z,q),sR=(Z)=>Z.find((q)=>i4(q))??a4.findLast((q)=>Z.includes(q)),i4=(Z)=>typeof Z==="function",a4;var A1=B(()=>{G1();a4=["none","short","full"]});import{platform as rR}from"node:process";import{stripVTControlCharacters as tR}from"node:util";var U9=(Z,q)=>{let J=[Z,...q],Q=J.join(" "),X=J.map(($)=>XM(W9($))).join(" ");return{command:Q,escapedCommand:X}},w2=(Z)=>tR(Z).split(`
39
+ `).map((q)=>W9(q)).join(`
40
+ `),W9=(Z)=>Z.replaceAll(qM,(q)=>eR(q)),eR=(Z)=>{let q=JM[Z];if(q!==void 0)return q;let J=Z.codePointAt(0),Q=J.toString(16);return J<=QM?`\\u${Q.padStart(4,"0")}`:`\\U${Q}`},ZM=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},qM,JM,QM=65535,XM=(Z)=>{if($M.test(Z))return Z;return rR==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},$M;var o4=B(()=>{qM=ZM(),JM={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},$M=/^[\w./-]+$/});import V9 from"node:process";function j3(){let{env:Z}=V9,{TERM:q,TERM_PROGRAM:J}=Z;if(V9.platform!=="win32")return q!=="linux";return Boolean(Z.WT_SESSION)||Boolean(Z.TERMINUS_SUBLIME)||Z.ConEmuTask==="{cmd::Cmder}"||J==="Terminus-Sublime"||J==="vscode"||q==="xterm-256color"||q==="alacritty"||q==="rxvt-unicode"||q==="rxvt-unicode-256color"||Z.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var B9=()=>{};var L9,_9,YM,HM,GM,KM,UM,s4,uC;var z9=B(()=>{B9();L9={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},_9={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},YM={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},HM={...L9,..._9},GM={...L9,...YM},KM=j3(),UM=KM?HM:GM,s4=UM,uC=Object.entries(_9)});import WM from"node:tty";var VM,C=(Z,q)=>{if(!VM)return(X)=>X;let J=`\x1B[${Z}m`,Q=`\x1B[${q}m`;return(X)=>{let $=X+"",Y=$.indexOf(Q);if(Y===-1)return J+$+Q;let H=J,K=0,U=(q===22?Q:"")+J;while(Y!==-1)H+=$.slice(K,Y)+U,K=Y+Q.length,Y=$.indexOf(Q,K);return H+=$.slice(K)+Q,H}},cC,R9,lC,nC,iC,aC,oC,sC,rC,tC,eC,ZS,qS,JS,QS,XS,$S,r4,YS,HS,GS,KS,US,WS,VS,BS,LS,M9,_S,F9,zS,RS,MS,FS,DS,AS,TS,jS,IS,OS,wS;var D9=B(()=>{VM=WM?.WriteStream?.prototype?.hasColors?.()??!1,cC=C(0,0),R9=C(1,22),lC=C(2,22),nC=C(3,23),iC=C(4,24),aC=C(53,55),oC=C(7,27),sC=C(8,28),rC=C(9,29),tC=C(30,39),eC=C(31,39),ZS=C(32,39),qS=C(33,39),JS=C(34,39),QS=C(35,39),XS=C(36,39),$S=C(37,39),r4=C(90,39),YS=C(40,49),HS=C(41,49),GS=C(42,49),KS=C(43,49),US=C(44,49),WS=C(45,49),VS=C(46,49),BS=C(47,49),LS=C(100,49),M9=C(91,39),_S=C(92,39),F9=C(93,39),zS=C(94,39),RS=C(95,39),MS=C(96,39),FS=C(97,39),DS=C(101,49),AS=C(102,49),TS=C(103,49),jS=C(104,49),IS=C(105,49),OS=C(106,49),wS=C(107,49)});var A9=B(()=>{D9()});var I9=({type:Z,message:q,timestamp:J,piped:Q,commandId:X,result:{failed:$=!1}={},options:{reject:Y=!0}})=>{let H=BM(J),K=LM[Z]({failed:$,reject:Y,piped:Q}),W=_M[Z]({reject:Y});return`${r4(`[${H}]`)} ${r4(`[${X}]`)} ${W(K)} ${W(q)}`},BM=(Z)=>`${t4(Z.getHours(),2)}:${t4(Z.getMinutes(),2)}:${t4(Z.getSeconds(),2)}.${t4(Z.getMilliseconds(),3)}`,t4=(Z,q)=>String(Z).padStart(q,"0"),T9=({failed:Z,reject:q})=>{if(!Z)return s4.tick;return q?s4.cross:s4.warning},LM,j9=(Z)=>Z,_M;var O9=B(()=>{z9();A9();LM={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:T9,duration:T9},_M={command:()=>R9,output:()=>j9,ipc:()=>j9,error:({reject:Z})=>Z?M9:F9,duration:()=>r4}});var w9=(Z,q,J)=>{let Q=K9(q,J);return Z.map(({verboseLine:X,verboseObject:$})=>zM(X,$,Q)).filter((X)=>X!==void 0).map((X)=>RM(X)).join("")},zM=(Z,q,J)=>{if(J===void 0)return Z;let Q=J(Z,q);if(typeof Q==="string")return Q},RM=(Z)=>Z.endsWith(`
41
+ `)?Z:`${Z}
42
+ `;var k9=B(()=>{A1()});import{inspect as MM}from"node:util";var i0=({type:Z,verboseMessage:q,fdNumber:J,verboseInfo:Q,result:X})=>{let $=FM({type:Z,result:X,verboseInfo:Q}),Y=DM(q,$),H=w9(Y,Q,J);if(H!=="")console.warn(H.slice(0,-1))},FM=({type:Z,result:q,verboseInfo:{escapedCommand:J,commandId:Q,rawOptions:{piped:X=!1,...$}}})=>({type:Z,escapedCommand:J,commandId:`${Q}`,timestamp:new Date,piped:X,result:q,options:$}),DM=(Z,q)=>Z.split(`
43
+ `).map((J)=>AM({...q,message:J})),AM=(Z)=>{return{verboseLine:I9(Z),verboseObject:Z}},e4=(Z)=>{let q=typeof Z==="string"?Z:MM(Z);return w2(q).replaceAll("\t"," ".repeat(TM))},TM=2;var N6=B(()=>{o4();O9();k9()});var N9=(Z,q)=>{if(!w6(q))return;i0({type:"command",verboseMessage:Z,verboseInfo:q})};var P9=B(()=>{A1();N6()});var x9=(Z,q,J)=>{OM(Z);let Q=jM(Z);return{verbose:Z,escapedCommand:q,commandId:Q,rawOptions:J}},jM=(Z)=>w6({verbose:Z})?IM++:void 0,IM=0n,OM=(Z)=>{for(let q of Z){if(q===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(q===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!a4.includes(q)&&!i4(q)){let J=a4.map((Q)=>`'${Q}'`).join(", ");throw TypeError(`The "verbose" option must not be ${q}. Allowed values are: ${J} or a function.`)}}};var E9=B(()=>{A1()});import{hrtime as v9}from"node:process";var Z8=()=>v9.bigint(),I3=(Z)=>Number(v9.bigint()-Z)/1e6;var q8=()=>{};var J8=(Z,q,J)=>{let Q=Z8(),{command:X,escapedCommand:$}=U9(Z,q),Y=F3(J,"verbose"),H=x9(Y,$,{...J});return N9($,H),{command:X,escapedCommand:$,startTime:Q,verboseInfo:H}};var O3=B(()=>{P9();E9();q8();o4();G1()});function Q8(Z={}){let{env:q=process.env,platform:J=process.platform}=Z;if(J!=="win32")return"PATH";return Object.keys(q).reverse().find((Q)=>Q.toUpperCase()==="PATH")||"Path"}var y9=()=>{};var C9=()=>{};import{promisify as wM}from"node:util";import{execFile as kM,execFileSync as Xb}from"node:child_process";import S9 from"node:path";import{fileURLToPath as NM}from"node:url";function X8(Z){return Z instanceof URL?NM(Z):Z}function b9(Z){return{*[Symbol.iterator](){let q=S9.resolve(X8(Z)),J;while(J!==q)yield q,J=q,q=S9.resolve(q,"..")}}}var Hb;var h9=B(()=>{C9();Hb=wM(kM)});import $8 from"node:process";import f1 from"node:path";var PM=({cwd:Z=$8.cwd(),path:q=$8.env[Q8()],preferLocal:J=!0,execPath:Q=$8.execPath,addExecPath:X=!0}={})=>{let $=f1.resolve(X8(Z)),Y=[],H=q.split(f1.delimiter);if(J)xM(Y,H,$);if(X)EM(Y,H,Q,$);return q===""||q===f1.delimiter?`${Y.join(f1.delimiter)}${q}`:[...Y,q].join(f1.delimiter)},xM=(Z,q,J)=>{for(let Q of b9(J)){let X=f1.join(Q,"node_modules/.bin");if(!q.includes(X))Z.push(X)}},EM=(Z,q,J,Q)=>{let X=f1.resolve(Q,X8(J),"..");if(!q.includes(X))Z.push(X)},g9=({env:Z=$8.env,...q}={})=>{Z={...Z};let J=Q8({env:Z});return q.path=Z[J],Z[J]=PM(q),Z};var f9=B(()=>{y9();h9()});var m9=(Z,q,J)=>{let Q=J?H8:Y8,X=Z instanceof a0?{}:{cause:Z};return new Q(q,X)},a0,u9=(Z,q)=>{Object.defineProperty(Z.prototype,"name",{value:q,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,d9,{value:!0,writable:!1,enumerable:!1,configurable:!1})},p9=(Z)=>G8(Z)&&(d9 in Z),d9,G8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",Y8,H8;var m1=B(()=>{a0=class a0 extends Error{};d9=Symbol("isExecaError");Y8=class Y8 extends Error{};u9(Y8,Y8.name);H8=class H8 extends Error{};u9(H8,H8.name)});var c9=()=>{let Z=w3-l9+1;return Array.from({length:Z},vM)},vM=(Z,q)=>({name:`SIGRT${q+1}`,number:l9+q,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),l9=34,w3=64;var k3=()=>{};var n9;var i9=B(()=>{n9=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]});import{constants as yM}from"node:os";var N3=()=>{let Z=c9();return[...n9,...Z].map(CM)},CM=({name:Z,number:q,description:J,action:Q,forced:X=!1,standard:$})=>{let{signals:{[Z]:Y}}=yM,H=Y!==void 0;return{name:Z,number:H?Y:q,description:J,supported:H,action:Q,forced:X,standard:$}};var a9=B(()=>{i9();k3()});import{constants as SM}from"node:os";var bM=()=>{let Z=N3();return Object.fromEntries(Z.map(hM))},hM=({name:Z,number:q,description:J,supported:Q,action:X,forced:$,standard:Y})=>[Z,{name:Z,number:q,description:J,supported:Q,action:X,forced:$,standard:Y}],o9,gM=()=>{let Z=N3(),q=w3+1,J=Array.from({length:q},(Q,X)=>fM(X,Z));return Object.assign({},...J)},fM=(Z,q)=>{let J=mM(Z,q);if(J===void 0)return{};let{name:Q,description:X,supported:$,action:Y,forced:H,standard:K}=J;return{[Z]:{name:Q,number:Z,description:X,supported:$,action:Y,forced:H,standard:K}}},mM=(Z,q)=>{let J=q.find(({name:Q})=>SM.signals[Q]===Z);if(J!==void 0)return J;return q.find((Q)=>Q.number===Z)},Ob;var s9=B(()=>{k3();a9();o9=bM(),Ob=gM()});import{constants as k2}from"node:os";var t9=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return ZY(Z,"option `killSignal`")},e9=(Z)=>Z===0?Z:ZY(Z,"`subprocess.kill()`'s argument"),ZY=(Z,q)=>{if(Number.isInteger(Z))return uM(Z,q);if(typeof Z==="string")return dM(Z,q);throw TypeError(`Invalid ${q} ${String(Z)}: it must be a string or an integer.
44
+ ${P3()}`)},uM=(Z,q)=>{if(r9.has(Z))return r9.get(Z);throw TypeError(`Invalid ${q} ${Z}: this signal integer does not exist.
45
+ ${P3()}`)},pM=()=>new Map(Object.entries(k2.signals).reverse().map(([Z,q])=>[q,Z])),r9,dM=(Z,q)=>{if(Z in k2.signals)return Z;if(Z.toUpperCase()in k2.signals)throw TypeError(`Invalid ${q} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${q} '${Z}': this signal name does not exist.
46
+ ${P3()}`)},P3=()=>`Available signal names: ${cM()}.
47
+ Available signal numbers: ${lM()}.`,cM=()=>Object.keys(k2.signals).sort().map((Z)=>`'${Z}'`).join(", "),lM=()=>[...new Set(Object.values(k2.signals).sort((Z,q)=>Z-q))].join(", "),K8=(Z)=>o9[Z].description;var N2=B(()=>{s9();r9=pM()});import{setTimeout as nM}from"node:timers/promises";var qY=(Z)=>{if(Z===!1)return Z;if(Z===!0)return iM;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},iM=5000,JY=({kill:Z,options:{forceKillAfterDelay:q,killSignal:J},onInternalError:Q,context:X,controller:$},Y,H)=>{let{signal:K,error:W}=aM(Y,H,J);oM(W,Q);let U=Z(K);return sM({kill:Z,signal:K,forceKillAfterDelay:q,killSignal:J,killResult:U,context:X,controller:$}),U},aM=(Z,q,J)=>{let[Q=J,X]=G8(Z)?[void 0,Z]:[Z,q];if(typeof Q!=="string"&&!Number.isInteger(Q))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(Q)}`);if(X!==void 0&&!G8(X))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${X}`);return{signal:e9(Q),error:X}},oM=(Z,q)=>{if(Z!==void 0)q.reject(Z)},sM=async({kill:Z,signal:q,forceKillAfterDelay:J,killSignal:Q,killResult:X,context:$,controller:Y})=>{if(q===Q&&X)x3({kill:Z,forceKillAfterDelay:J,context:$,controllerSignal:Y.signal})},x3=async({kill:Z,forceKillAfterDelay:q,context:J,controllerSignal:Q})=>{if(q===!1)return;try{if(await nM(q,void 0,{signal:Q}),Z("SIGKILL"))J.isForcefullyTerminated??=!0}catch{}};var U8=B(()=>{m1();N2()});import{once as rM}from"node:events";var W8=async(Z,q)=>{if(!Z.aborted)await rM(Z,"abort",{signal:q})};var E3=()=>{};var QY=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},XY=({subprocess:Z,cancelSignal:q,gracefulCancel:J,context:Q,controller:X})=>q===void 0||J?[]:[tM(Z,q,Q,X)],tM=async(Z,q,J,{signal:Q})=>{throw await W8(q,Q),J.terminationReason??="cancel",Z.kill(),q.reason};var v3=B(()=>{E3()});var P6=({methodName:Z,isSubprocess:q,ipc:J,isConnected:Q})=>{eM(Z,q,J),y3(Z,q,Q)},eM=(Z,q,J)=>{if(!J)throw Error(`${b0(Z,q)} can only be used if the \`ipc\` option is \`true\`.`)},y3=(Z,q,J)=>{if(!J)throw Error(`${b0(Z,q)} cannot be used: the ${T1(q)} has already exited or disconnected.`)},$Y=(Z)=>{throw Error(`${b0("getOneMessage",Z)} could not complete: the ${T1(Z)} exited or disconnected.`)},YY=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${T1(Z)} is sending a message too, instead of listening to incoming messages.
48
+ This can be fixed by both sending a message and listening to incoming messages at the same time:
49
+
50
+ const [receivedMessage] = await Promise.all([
51
+ ${b0("getOneMessage",Z)},
52
+ ${b0("sendMessage",Z,"message, {strict: true}")},
53
+ ]);`)},V8=(Z,q)=>Error(`${b0("sendMessage",q)} failed when sending an acknowledgment response to the ${T1(q)}.`,{cause:Z}),HY=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${T1(Z)} is not listening to incoming messages.`)},GY=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${T1(Z)} exited without listening to incoming messages.`)},KY=()=>Error(`\`cancelSignal\` aborted: the ${T1(!0)} disconnected.`),UY=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},WY=({error:Z,methodName:q,isSubprocess:J})=>{if(Z.code==="EPIPE")throw Error(`${b0(q,J)} cannot be used: the ${T1(J)} is disconnecting.`,{cause:Z})},VY=({error:Z,methodName:q,isSubprocess:J,message:Q})=>{if(ZF(Z))throw Error(`${b0(q,J)}'s argument type is invalid: the message cannot be serialized: ${String(Q)}.`,{cause:Z})},ZF=({code:Z,message:q})=>qF.has(Z)||JF.some((J)=>q.includes(J)),qF,JF,b0=(Z,q,J="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${QF(q)}${Z}(${J})`,QF=(Z)=>Z?"":"subprocess.",T1=(Z)=>Z?"parent process":"subprocess",x6=(Z)=>{if(Z.connected)Z.disconnect()};var E6=B(()=>{qF=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),JF=["could not be cloned","circular structure","call stack size exceeded"]});var o0=()=>{let Z={},q=new Promise((J,Q)=>{Object.assign(Z,{resolve:J,reject:Q})});return Object.assign(q,Z)};var v6=()=>{};var L8=(Z,q="stdin")=>{let{options:Q,fileDescriptors:X}=s0.get(Z),$=BY(X,q,!0),Y=Z.stdio[$];if(Y===null)throw TypeError(LY($,q,Q,!0));return Y},y6=(Z,q="stdout")=>{let{options:Q,fileDescriptors:X}=s0.get(Z),$=BY(X,q,!1),Y=$==="all"?Z.all:Z.stdio[$];if(Y===null||Y===void 0)throw TypeError(LY($,q,Q,!1));return Y},s0,BY=(Z,q,J)=>{let Q=XF(q,J);return $F(Q,q,J,Z),Q},XF=(Z,q)=>{let J=D3(Z);if(J!==void 0)return J;let{validOptions:Q,defaultValue:X}=q?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${P2(q)}" must not be "${Z}".
54
+ It must be ${Q} or "fd3", "fd4" (and so on).
55
+ It is optional and defaults to "${X}".`)},$F=(Z,q,J,Q)=>{let X=Q[_Y(Z)];if(X===void 0)throw TypeError(`"${P2(J)}" must not be ${q}. That file descriptor does not exist.
56
+ Please set the "stdio" option to ensure that file descriptor exists.`);if(X.direction==="input"&&!J)throw TypeError(`"${P2(J)}" must not be ${q}. It must be a readable stream, not writable.`);if(X.direction!=="input"&&J)throw TypeError(`"${P2(J)}" must not be ${q}. It must be a writable stream, not readable.`)},LY=(Z,q,J,Q)=>{if(Z==="all"&&!J.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:X,optionValue:$}=YF(Z,J);return`The "${X}: ${B8($)}" option is incompatible with using "${P2(Q)}: ${B8(q)}".
57
+ Please set this option with "pipe" instead.`},YF=(Z,{stdin:q,stdout:J,stderr:Q,stdio:X})=>{let $=_Y(Z);if($===0&&q!==void 0)return{optionName:"stdin",optionValue:q};if($===1&&J!==void 0)return{optionName:"stdout",optionValue:J};if($===2&&Q!==void 0)return{optionName:"stderr",optionValue:Q};return{optionName:`stdio[${$}]`,optionValue:X[$]}},_Y=(Z)=>Z==="all"?1:Z,P2=(Z)=>Z?"to":"from",B8=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var j1=B(()=>{G1();s0=new WeakMap});import{addAbortListener as HF}from"node:events";var u1=(Z,q,J)=>{let Q=Z.getMaxListeners();if(Q===0||Q===Number.POSITIVE_INFINITY)return;Z.setMaxListeners(Q+q),HF(J,()=>{Z.setMaxListeners(Z.getMaxListeners()-q)})};var _8=()=>{};var z8=(Z,q)=>{if(q)C3(Z)},C3=(Z)=>{Z.refCounted()},R8=(Z,q)=>{if(q)S3(Z)},S3=(Z)=>{Z.unrefCounted()},zY=(Z,q)=>{if(q)S3(Z),S3(Z)},RY=(Z,q)=>{if(q)C3(Z),C3(Z)};var x2=()=>{};import{once as GF}from"node:events";import{scheduler as KF}from"node:timers/promises";var MY=async({anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:Q},X)=>{if(TY(X)||IY(X))return;if(!M8.has(Z))M8.set(Z,[]);let $=M8.get(Z);if($.push(X),$.length>1)return;while($.length>0){await jY(Z,Q,X),await KF.yield();let Y=await AY({wrappedMessage:$[0],anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:Q});$.shift(),Q.emit("message",Y),Q.emit("message:done")}},FY=async({anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:Q,boundOnMessage:X})=>{b3();let $=M8.get(Z);while($?.length>0)await GF(Q,"message:done");Z.removeListener("message",X),RY(q,J),Q.connected=!1,Q.emit("disconnect")},M8;var DY=B(()=>{D8();x2();F8();A8();M8=new WeakMap});import{EventEmitter as UF}from"node:events";var I1=(Z,q,J)=>{if(T8.has(Z))return T8.get(Z);let Q=new UF;return Q.connected=!0,T8.set(Z,Q),WF({ipcEmitter:Q,anyProcess:Z,channel:q,isSubprocess:J}),Q},T8,WF=({ipcEmitter:Z,anyProcess:q,channel:J,isSubprocess:Q})=>{let X=MY.bind(void 0,{anyProcess:q,channel:J,isSubprocess:Q,ipcEmitter:Z});q.on("message",X),q.once("disconnect",FY.bind(void 0,{anyProcess:q,channel:J,isSubprocess:Q,ipcEmitter:Z,boundOnMessage:X})),zY(J,Q)},j8=(Z)=>{let q=T8.get(Z);return q===void 0?Z.channel!==null:q.connected};var E2=B(()=>{DY();x2();T8=new WeakMap});import{once as VF}from"node:events";var OY=({anyProcess:Z,channel:q,isSubprocess:J,message:Q,strict:X})=>{if(!X)return Q;let $=I1(Z,q,J),Y=w8(Z,$);return{id:BF++,type:O8,message:Q,hasListeners:Y}},BF=0n,wY=(Z,q)=>{if(q?.type!==O8||q.hasListeners)return;for(let{id:J}of Z)if(J!==void 0)I8[J].resolve({isDeadlock:!0,hasListeners:!1})},AY=async({wrappedMessage:Z,anyProcess:q,channel:J,isSubprocess:Q,ipcEmitter:X})=>{if(Z?.type!==O8||!q.connected)return Z;let{id:$,message:Y}=Z,H={id:$,type:NY,message:w8(q,X)};try{await k8({anyProcess:q,channel:J,isSubprocess:Q,ipc:!0},H)}catch(K){X.emit("strict:error",K)}return Y},TY=(Z)=>{if(Z?.type!==NY)return!1;let{id:q,message:J}=Z;return I8[q]?.resolve({isDeadlock:!1,hasListeners:J}),!0},kY=async(Z,q,J)=>{if(Z?.type!==O8)return;let Q=o0();I8[Z.id]=Q;let X=new AbortController;try{let{isDeadlock:$,hasListeners:Y}=await Promise.race([Q,LF(q,J,X)]);if($)YY(J);if(!Y)HY(J)}finally{X.abort(),delete I8[Z.id]}},I8,LF=async(Z,q,{signal:J})=>{u1(Z,1,J),await VF(Z,"disconnect",{signal:J}),GY(q)},O8="execa:ipc:request",NY="execa:ipc:response";var F8=B(()=>{v6();_8();N8();E6();E2();D8();I8={}});var PY=(Z,q,J)=>{if(!v2.has(Z))v2.set(Z,new Set);let Q=v2.get(Z),X=o0(),$=J?q.id:void 0,Y={onMessageSent:X,id:$};return Q.add(Y),{outgoingMessages:Q,outgoingMessage:Y}},xY=({outgoingMessages:Z,outgoingMessage:q})=>{Z.delete(q),q.onMessageSent.resolve()},jY=async(Z,q,J)=>{while(!w8(Z,q)&&v2.get(Z)?.size>0){let Q=[...v2.get(Z)];wY(Q,J),await Promise.all(Q.map(({onMessageSent:X})=>X))}},v2,w8=(Z,q)=>q.listenerCount("message")>_F(Z),_F=(Z)=>s0.has(Z)&&!H1(s0.get(Z).options.buffer,"ipc")?1:0;var D8=B(()=>{v6();G1();j1();F8();v2=new WeakMap});import{promisify as zF}from"node:util";var k8=({anyProcess:Z,channel:q,isSubprocess:J,ipc:Q},X,{strict:$=!1}={})=>{return P6({methodName:"sendMessage",isSubprocess:J,ipc:Q,isConnected:Z.connected}),RF({anyProcess:Z,channel:q,methodName:"sendMessage",isSubprocess:J,message:X,strict:$})},RF=async({anyProcess:Z,channel:q,methodName:J,isSubprocess:Q,message:X,strict:$})=>{let Y=OY({anyProcess:Z,channel:q,isSubprocess:Q,message:X,strict:$}),H=PY(Z,Y,$);try{await g3({anyProcess:Z,methodName:J,isSubprocess:Q,wrappedMessage:Y,message:X})}catch(K){throw x6(Z),K}finally{xY(H)}},g3=async({anyProcess:Z,methodName:q,isSubprocess:J,wrappedMessage:Q,message:X})=>{let $=MF(Z);try{await Promise.all([kY(Q,Z,J),$(Q)])}catch(Y){throw WY({error:Y,methodName:q,isSubprocess:J}),VY({error:Y,methodName:q,isSubprocess:J,message:X}),Y}},MF=(Z)=>{if(h3.has(Z))return h3.get(Z);let q=zF(Z.send.bind(Z));return h3.set(Z,q),q},h3;var N8=B(()=>{E6();D8();F8();h3=new WeakMap});import{scheduler as FF}from"node:timers/promises";var vY=(Z,q)=>{return y3("cancelSignal",!1,Z.connected),g3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:CY,message:q},message:q})},yY=async({anyProcess:Z,channel:q,isSubprocess:J,ipc:Q})=>{return await DF({anyProcess:Z,channel:q,isSubprocess:J,ipc:Q}),f3.signal},DF=async({anyProcess:Z,channel:q,isSubprocess:J,ipc:Q})=>{if(EY)return;if(EY=!0,!Q){UY();return}if(q===null){b3();return}I1(Z,q,J),await FF.yield()},EY=!1,IY=(Z)=>{if(Z?.type!==CY)return!1;return f3.abort(Z.message),!0},CY="execa:ipc:cancel",b3=()=>{f3.abort(KY())},f3;var A8=B(()=>{N8();E2();E6();f3=new AbortController});var SY=({gracefulCancel:Z,cancelSignal:q,ipc:J,serialization:Q})=>{if(!Z)return;if(q===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!J)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(Q==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},bY=({subprocess:Z,cancelSignal:q,gracefulCancel:J,forceKillAfterDelay:Q,context:X,controller:$})=>J?[AF({subprocess:Z,cancelSignal:q,forceKillAfterDelay:Q,context:X,controller:$})]:[],AF=async({subprocess:Z,cancelSignal:q,forceKillAfterDelay:J,context:Q,controller:{signal:X}})=>{await W8(q,X);let $=TF(q);throw await vY(Z,$),x3({kill:Z.kill,forceKillAfterDelay:J,context:Q,controllerSignal:X}),Q.terminationReason??="gracefulCancel",q.reason},TF=({reason:Z})=>{if(!(Z instanceof DOMException))return Z;let q=Error(Z.message);return Object.defineProperty(q,"stack",{value:Z.stack,enumerable:!1,configurable:!0,writable:!0}),q};var m3=B(()=>{E3();A8();U8()});import{setTimeout as jF}from"node:timers/promises";var hY=({timeout:Z})=>{if(Z!==void 0&&(!Number.isFinite(Z)||Z<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`)},gY=(Z,q,J,Q)=>q===0||q===void 0?[]:[IF(Z,q,J,Q)],IF=async(Z,q,J,{signal:Q})=>{throw await jF(q,void 0,{signal:Q}),J.terminationReason??="timeout",Z.kill(),new a0};var u3=B(()=>{m1()});import{execPath as OF,execArgv as wF}from"node:process";import fY from"node:path";var mY=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},uY=(Z,q,{node:J=!1,nodePath:Q=OF,nodeOptions:X=wF.filter((K)=>!K.startsWith("--inspect")),cwd:$,execPath:Y,...H})=>{if(Y!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let K=I6(Q,'The "nodePath" option'),W=fY.resolve($,K),U={...H,nodePath:W,node:J,cwd:$};if(!J)return[Z,q,U];if(fY.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[W,[...X,Z,...q],{ipc:!0,...U,shell:!1}]};var p3=B(()=>{O6()});import{serialize as kF}from"node:v8";var pY=({ipcInput:Z,ipc:q,serialization:J})=>{if(Z===void 0)return;if(!q)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");xF[J](Z)},NF=(Z)=>{try{kF(Z)}catch(q){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:q})}},PF=(Z)=>{try{JSON.stringify(Z)}catch(q){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:q})}},xF,dY=async(Z,q)=>{if(q===void 0)return;await Z.sendMessage(q)};var d3=B(()=>{xF={advanced:NF,json:PF}});var lY=({encoding:Z})=>{if(c3.has(Z))return;let q=vF(Z);if(q!==void 0)throw TypeError(`Invalid option \`encoding: ${P8(Z)}\`.
58
+ Please rename it to ${P8(q)}.`);let J=[...c3].map((Q)=>P8(Q)).join(", ");throw TypeError(`Invalid option \`encoding: ${P8(Z)}\`.
59
+ Please rename it to one of: ${J}.`)},EF,j0,c3,vF=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let q=Z.toLowerCase();if(q in cY)return cY[q];if(c3.has(q))return q},cY,P8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var p1=B(()=>{EF=new Set(["utf8","utf16le"]),j0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),c3=new Set([...EF,...j0]),cY={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import{statSync as yF}from"node:fs";import CF from"node:path";import SF from"node:process";var nY=(Z=iY())=>{let q=I6(Z,'The "cwd" option');return CF.resolve(q)},iY=()=>{try{return SF.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
60
+ ${Z.message}`,Z}},aY=(Z,q)=>{if(q===iY())return Z;let J;try{J=yF(q)}catch(Q){return`The "cwd" option is invalid: ${q}.
61
+ ${Q.message}
62
+ ${Z}`}if(!J.isDirectory())return`The "cwd" option is not a directory: ${q}.
63
+ ${Z}`;return Z};var l3=B(()=>{O6()});import bF from"node:path";import sY from"node:process";var rY,x8=(Z,q,J)=>{J.cwd=nY(J.cwd);let[Q,X,$]=uY(Z,q,J),{command:Y,args:H,options:K}=rY.default._parse(Q,X,$),W=G9(K),U=hF(W);if(hY(U),lY(U),pY(U),QY(U),SY(U),U.shell=_3(U.shell),U.env=gF(U),U.killSignal=t9(U.killSignal),U.forceKillAfterDelay=qY(U.forceKillAfterDelay),U.lines=U.lines.map((V,L)=>V&&!j0.has(U.encoding)&&U.buffer[L]),sY.platform==="win32"&&bF.basename(Y,".exe")==="cmd")H.unshift("/q");return{file:Y,commandArguments:H,options:U}},hF=({extendEnv:Z=!0,preferLocal:q=!1,cwd:J,localDir:Q=J,encoding:X="utf8",reject:$=!0,cleanup:Y=!0,all:H=!1,windowsHide:K=!0,killSignal:W="SIGTERM",forceKillAfterDelay:U=!0,gracefulCancel:V=!1,ipcInput:L,ipc:_=L!==void 0||V,serialization:z="advanced",...R})=>({...R,extendEnv:Z,preferLocal:q,cwd:J,localDirectory:Q,encoding:X,reject:$,cleanup:Y,all:H,windowsHide:K,killSignal:W,forceKillAfterDelay:U,gracefulCancel:V,ipcInput:L,ipc:_,serialization:z}),gF=({env:Z,extendEnv:q,preferLocal:J,node:Q,localDirectory:X,nodePath:$})=>{let Y=q?{...sY.env,...Z}:Z;if(J||Q)return g9({env:Y,cwd:X,execPath:$,preferLocal:J,addExecPath:Q});return Y};var n3=B(()=>{f9();U8();N2();v3();m3();u3();p3();d3();p1();l3();O6();G1();rY=oY(h5(),1)});var E8=(Z,q,J)=>J.shell&&q.length>0?[[Z,...q].join(" "),[],J]:[Z,q,J];var i3=()=>{};function C6(Z){if(typeof Z==="string")return fF(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return mF(Z)}var fF=(Z)=>Z.at(-1)===tY?Z.slice(0,Z.at(-2)===eY?-2:-1):Z,mF=(Z)=>Z.at(-1)===uF?Z.subarray(0,Z.at(-2)===pF?-2:-1):Z,tY=`
64
+ `,uF,eY="\r",pF;var a3=B(()=>{uF=tY.codePointAt(0),pF=eY.codePointAt(0)});function h0(Z,{checkOpen:q=!0}={}){return Z!==null&&typeof Z==="object"&&(Z.writable||Z.readable||!q||Z.writable===void 0&&Z.readable===void 0)&&typeof Z.pipe==="function"}function o3(Z,{checkOpen:q=!0}={}){return h0(Z,{checkOpen:q})&&(Z.writable||!q)&&typeof Z.write==="function"&&typeof Z.end==="function"&&typeof Z.writable==="boolean"&&typeof Z.writableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function d1(Z,{checkOpen:q=!0}={}){return h0(Z,{checkOpen:q})&&(Z.readable||!q)&&typeof Z.read==="function"&&typeof Z.readable==="boolean"&&typeof Z.readableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function s3(Z,q){return o3(Z,q)&&d1(Z,q)}var c1=()=>{};class ZH{#J;#Q;#q=!1;#Y=void 0;constructor(Z,q){this.#J=Z,this.#Q=q}next(){let Z=()=>this.#G();return this.#Y=this.#Y?this.#Y.then(Z,Z):Z(),this.#Y}return(Z){let q=()=>this.#V(Z);return this.#Y?this.#Y.then(q,q):q()}async#G(){if(this.#q)return{done:!0,value:void 0};let Z;try{Z=await this.#J.read()}catch(q){throw this.#Y=void 0,this.#q=!0,this.#J.releaseLock(),q}return Z.done&&(this.#Y=void 0,this.#q=!0,this.#J.releaseLock()),Z}async#V(Z){if(this.#q)return{done:!0,value:Z};if(this.#q=!0,!this.#Q){let q=this.#J.cancel(Z);return this.#J.releaseLock(),await q,{done:!0,value:Z}}return this.#J.releaseLock(),{done:!0,value:Z}}}function qH(){return this[r3].next()}function JH(Z){return this[r3].return(Z)}function t3({preventCancel:Z=!1}={}){let q=this.getReader(),J=new ZH(q,Z),Q=Object.create(cF);return Q[r3]=J,Q}var dF,r3,cF;var QH=B(()=>{dF=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);r3=Symbol();Object.defineProperty(qH,"name",{value:"next"});Object.defineProperty(JH,"name",{value:"return"});cF=Object.create(dF,{next:{enumerable:!0,configurable:!0,writable:!0,value:qH},return:{enumerable:!0,configurable:!0,writable:!0,value:JH}})});var XH=()=>{};var $H=B(()=>{QH();XH()});var YH=(Z)=>{if(d1(Z,{checkOpen:!1})&&y2.on!==void 0)return nF(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(lF.call(Z)==="[object ReadableStream]")return t3.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},lF,nF=async function*(Z){let q=new AbortController,J={};iF(Z,q,J);try{for await(let[Q]of y2.on(Z,"data",{signal:q.signal}))yield Q}catch(Q){if(J.error!==void 0)throw J.error;else if(!q.signal.aborted)throw Q}finally{Z.destroy()}},iF=async(Z,q,J)=>{try{await y2.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(Q){J.error=Q}finally{q.abort()}},y2;var e3=B(()=>{c1();$H();({toString:lF}=Object.prototype),y2={}});var S6=async(Z,{init:q,convertChunk:J,getSize:Q,truncateChunk:X,addChunk:$,getFinalChunk:Y,finalize:H},{maxBuffer:K=Number.POSITIVE_INFINITY}={})=>{let W=YH(Z),U=q();U.length=0;try{for await(let V of W){let L=oF(V),_=J[L](V,U);KH({convertedChunk:_,state:U,getSize:Q,truncateChunk:X,addChunk:$,maxBuffer:K})}return aF({state:U,convertChunk:J,getSize:Q,truncateChunk:X,addChunk:$,getFinalChunk:Y,maxBuffer:K}),H(U)}catch(V){let L=typeof V==="object"&&V!==null?V:Error(V);throw L.bufferedData=H(U),L}},aF=({state:Z,getSize:q,truncateChunk:J,addChunk:Q,getFinalChunk:X,maxBuffer:$})=>{let Y=X(Z);if(Y!==void 0)KH({convertedChunk:Y,state:Z,getSize:q,truncateChunk:J,addChunk:Q,maxBuffer:$})},KH=({convertedChunk:Z,state:q,getSize:J,truncateChunk:Q,addChunk:X,maxBuffer:$})=>{let Y=J(Z),H=q.length+Y;if(H<=$){HH(Z,q,X,H);return}let K=Q(Z,$-q.length);if(K!==void 0)HH(K,q,X,$);throw new K1},HH=(Z,q,J,Q)=>{q.contents=J(Z,q,Q),q.length=Q},oF=(Z)=>{let q=typeof Z;if(q==="string")return"string";if(q!=="object"||Z===null)return"others";if(globalThis.Buffer?.isBuffer(Z))return"buffer";let J=GH.call(Z);if(J==="[object ArrayBuffer]")return"arrayBuffer";if(J==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&GH.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},GH,K1;var C2=B(()=>{e3();({toString:GH}=Object.prototype);K1=class K1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var U1=(Z)=>Z,S2=()=>{return},v8=({contents:Z})=>Z,y8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},C8=(Z)=>Z.length;var S8=()=>{};async function b8(Z,q){return S6(Z,eF,q)}var sF=()=>({contents:[]}),rF=()=>1,tF=(Z,{contents:q})=>{return q.push(Z),q},eF;var UH=B(()=>{C2();S8();eF={init:sF,convertChunk:{string:U1,buffer:U1,arrayBuffer:U1,dataView:U1,typedArray:U1,others:U1},getSize:rF,truncateChunk:S2,addChunk:tF,getFinalChunk:S2,finalize:v8}});async function h8(Z,q){return S6(Z,GD,q)}var ZD=()=>({contents:new ArrayBuffer(0)}),qD=(Z)=>JD.encode(Z),JD,WH=(Z)=>new Uint8Array(Z),VH=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),QD=(Z,q)=>Z.slice(0,q),XD=(Z,{contents:q,length:J},Q)=>{let X=_H()?YD(q,Q):$D(q,Q);return new Uint8Array(X).set(Z,J),X},$D=(Z,q)=>{if(q<=Z.byteLength)return Z;let J=new ArrayBuffer(LH(q));return new Uint8Array(J).set(new Uint8Array(Z),0),J},YD=(Z,q)=>{if(q<=Z.maxByteLength)return Z.resize(q),Z;let J=new ArrayBuffer(q,{maxByteLength:LH(q)});return new Uint8Array(J).set(new Uint8Array(Z),0),J},LH=(Z)=>BH**Math.ceil(Math.log(Z)/Math.log(BH)),BH=2,HD=({contents:Z,length:q})=>_H()?Z:Z.slice(0,q),_H=()=>("resize"in ArrayBuffer.prototype),GD;var zH=B(()=>{C2();S8();JD=new TextEncoder,GD={init:ZD,convertChunk:{string:qD,buffer:WH,arrayBuffer:WH,dataView:VH,typedArray:VH,others:y8},getSize:C8,truncateChunk:QD,addChunk:XD,getFinalChunk:S2,finalize:HD}});async function f8(Z,q){return S6(Z,BD,q)}var KD=()=>({contents:"",textDecoder:new TextDecoder}),g8=(Z,{textDecoder:q})=>q.decode(Z,{stream:!0}),UD=(Z,{contents:q})=>q+Z,WD=(Z,q)=>Z.slice(0,q),VD=({textDecoder:Z})=>{let q=Z.decode();return q===""?void 0:q},BD;var RH=B(()=>{C2();S8();BD={init:KD,convertChunk:{string:U1,buffer:g8,arrayBuffer:g8,dataView:g8,typedArray:g8,others:y8},getSize:C8,truncateChunk:WD,addChunk:UD,getFinalChunk:VD,finalize:v8}});var MH=B(()=>{UH();zH();RH();C2()});import{on as LD}from"node:events";import{finished as _D}from"node:stream/promises";var m8=B(()=>{e3();MH();Object.assign(y2,{on:LD,finished:_D})});var FH=({error:Z,stream:q,readableObjectMode:J,lines:Q,encoding:X,fdNumber:$})=>{if(!(Z instanceof K1))throw Z;if($==="all")return Z;let Y=zD(J,Q,X);throw Z.maxBufferInfo={fdNumber:$,unit:Y},q.destroy(),Z},zD=(Z,q,J)=>{if(Z)return"objects";if(q)return"lines";if(J==="buffer")return"bytes";return"characters"},DH=(Z,q,J)=>{if(q.length!==J)return;let Q=new K1;throw Q.maxBufferInfo={fdNumber:"ipc"},Q},AH=(Z,q)=>{let{streamName:J,threshold:Q,unit:X}=RD(Z,q);return`Command's ${J} was larger than ${Q} ${X}`},RD=(Z,q)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:q[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:J,unit:Q}}=Z;delete Z.maxBufferInfo;let X=H1(q,J);if(J==="ipc")return{streamName:"IPC output",threshold:X,unit:"messages"};return{streamName:n4(J),threshold:X,unit:Q}},TH=(Z,q,J)=>Z?.code==="ENOBUFS"&&q!==null&&q.some((Q)=>Q!==null&&Q.length>u8(J)),jH=(Z,q,J)=>{if(!q)return Z;let Q=u8(J);return Z.length>Q?Z.slice(0,Q):Z},u8=([,Z])=>Z;var l1=B(()=>{m8();Y1();G1()});import{inspect as MD}from"node:util";var OH=({stdio:Z,all:q,ipcOutput:J,originalError:Q,signal:X,signalDescription:$,exitCode:Y,escapedCommand:H,timedOut:K,isCanceled:W,isGracefullyCanceled:U,isMaxBuffer:V,isForcefullyTerminated:L,forceKillAfterDelay:_,killSignal:z,maxBuffer:R,timeout:D,cwd:F})=>{let k=Q?.code,M=FD({originalError:Q,timedOut:K,timeout:D,isMaxBuffer:V,maxBuffer:R,errorCode:k,signal:X,signalDescription:$,exitCode:Y,isCanceled:W,isGracefullyCanceled:U,isForcefullyTerminated:L,forceKillAfterDelay:_,killSignal:z}),O=AD(Q,F),T=O===void 0?"":`
65
+ ${O}`,j=`${M}: ${H}${T}`,A=q===void 0?[Z[2],Z[1]]:[q],g=[j,...A,...Z.slice(3),J.map((w)=>TD(w)).join(`
66
+ `)].map((w)=>w2(C6(jD(w)))).filter(Boolean).join(`
67
+
68
+ `);return{originalMessage:O,shortMessage:j,message:g}},FD=({originalError:Z,timedOut:q,timeout:J,isMaxBuffer:Q,maxBuffer:X,errorCode:$,signal:Y,signalDescription:H,exitCode:K,isCanceled:W,isGracefullyCanceled:U,isForcefullyTerminated:V,forceKillAfterDelay:L,killSignal:_})=>{let z=DD(V,L);if(q)return`Command timed out after ${J} milliseconds${z}`;if(U){if(Y===void 0)return`Command was gracefully canceled with exit code ${K}`;return V?`Command was gracefully canceled${z}`:`Command was gracefully canceled with ${Y} (${H})`}if(W)return`Command was canceled${z}`;if(Q)return`${AH(Z,X)}${z}`;if($!==void 0)return`Command failed with ${$}${z}`;if(V)return`Command was killed with ${_} (${K8(_)})${z}`;if(Y!==void 0)return`Command was killed with ${Y} (${H})`;if(K!==void 0)return`Command failed with exit code ${K}`;return"Command failed"},DD=(Z,q)=>Z?` and was forcefully terminated after ${q} milliseconds`:"",AD=(Z,q)=>{if(Z instanceof a0)return;let J=p9(Z)?Z.originalMessage:String(Z?.message??Z),Q=w2(aY(J,q));return Q===""?void 0:Q},TD=(Z)=>typeof Z==="string"?Z:MD(Z),jD=(Z)=>Array.isArray(Z)?Z.map((q)=>C6(IH(q))).filter(Boolean).join(`
69
+ `):IH(Z),IH=(Z)=>{if(typeof Z==="string")return Z;if(J0(Z))return c4(Z);return""};var wH=B(()=>{a3();T0();l3();o4();l1();N2();m1()});var p8=({command:Z,escapedCommand:q,stdio:J,all:Q,ipcOutput:X,options:{cwd:$},startTime:Y})=>kH({command:Z,escapedCommand:q,cwd:$,durationMs:I3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:J[1],stderr:J[2],all:Q,stdio:J,ipcOutput:X,pipedFrom:[]}),b6=({error:Z,command:q,escapedCommand:J,fileDescriptors:Q,options:X,startTime:$,isSync:Y})=>b2({error:Z,command:q,escapedCommand:J,startTime:$,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:Q.length}),ipcOutput:[],options:X,isSync:Y}),b2=({error:Z,command:q,escapedCommand:J,startTime:Q,timedOut:X,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:U,stdio:V,all:L,ipcOutput:_,options:{timeoutDuration:z,timeout:R=z,forceKillAfterDelay:D,killSignal:F,cwd:k,maxBuffer:M},isSync:O})=>{let{exitCode:T,signal:j,signalDescription:A}=OD(W,U),{originalMessage:g,shortMessage:w,message:P}=OH({stdio:V,all:L,ipcOutput:_,originalError:Z,signal:j,signalDescription:A,exitCode:T,escapedCommand:J,timedOut:X,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,forceKillAfterDelay:D,killSignal:F,maxBuffer:M,timeout:R,cwd:k}),v=m9(Z,P,O);return Object.assign(v,ID({error:v,command:q,escapedCommand:J,startTime:Q,timedOut:X,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:T,signal:j,signalDescription:A,stdio:V,all:L,ipcOutput:_,cwd:k,originalMessage:g,shortMessage:w})),v},ID=({error:Z,command:q,escapedCommand:J,startTime:Q,timedOut:X,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:U,signalDescription:V,stdio:L,all:_,ipcOutput:z,cwd:R,originalMessage:D,shortMessage:F})=>kH({shortMessage:F,originalMessage:D,command:q,escapedCommand:J,cwd:R,durationMs:I3(Q),failed:!0,timedOut:X,isCanceled:$,isGracefullyCanceled:Y,isTerminated:U!==void 0,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:U,signalDescription:V,code:Z.cause?.code,stdout:L[1],stderr:L[2],all:_,stdio:L,ipcOutput:z,pipedFrom:[]}),kH=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,q])=>q!==void 0)),OD=(Z,q)=>{let J=Z===null?void 0:Z,Q=q===null?void 0:q,X=Q===void 0?void 0:K8(q);return{exitCode:J,signal:Q,signalDescription:X}};var h2=B(()=>{N2();q8();m1();wH()});function wD(Z){return{days:Math.trunc(Z/86400000),hours:Math.trunc(Z/3600000%24),minutes:Math.trunc(Z/60000%60),seconds:Math.trunc(Z/1000%60),milliseconds:Math.trunc(Z%1000),microseconds:Math.trunc(NH(Z*1000)%1000),nanoseconds:Math.trunc(NH(Z*1e6)%1000)}}function kD(Z){return{days:Z/86400000n,hours:Z/3600000n%24n,minutes:Z/60000n%60n,seconds:Z/1000n%60n,milliseconds:Z%1000n,microseconds:0n,nanoseconds:0n}}function ZZ(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return wD(Z);break}case"bigint":return kD(Z)}throw TypeError("Expected a finite number or bigint")}var NH=(Z)=>Number.isFinite(Z)?Z:0;var PH=()=>{};function qZ(Z,q){let J=typeof Z==="bigint";if(!J&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");q={...q};let Q=Z<0?"-":"";if(Z=Z<0?-Z:Z,q.colonNotation)q.compact=!1,q.formatSubMilliseconds=!1,q.separateMilliseconds=!1,q.verbose=!1;if(q.compact)q.unitCount=1,q.secondsDecimalDigits=0,q.millisecondsDecimalDigits=0;let X=[],$=(U,V)=>{let L=Math.floor(U*10**V+xD);return(Math.round(L)/10**V).toFixed(V)},Y=(U,V,L,_)=>{if((X.length===0||!q.colonNotation)&&ND(U)&&!(q.colonNotation&&L==="m"))return;if(_??=String(U),q.colonNotation){let z=_.includes(".")?_.split(".")[0].length:_.length,R=X.length>0?2:1;_="0".repeat(Math.max(0,R-z))+_}else _+=q.verbose?" "+PD(V,U):L;X.push(_)},H=ZZ(Z),K=BigInt(H.days);if(q.hideYearAndDays)Y(BigInt(K)*24n+BigInt(H.hours),"hour","h");else{if(q.hideYear)Y(K,"day","d");else Y(K/365n,"year","y"),Y(K%365n,"day","d");Y(Number(H.hours),"hour","h")}if(Y(Number(H.minutes),"minute","m"),!q.hideSeconds)if(q.separateMilliseconds||q.formatSubMilliseconds||!q.colonNotation&&Z<1000&&!q.subSecondsAsDecimals){let U=Number(H.seconds),V=Number(H.milliseconds),L=Number(H.microseconds),_=Number(H.nanoseconds);if(Y(U,"second","s"),q.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(L,"microsecond","µs"),Y(_,"nanosecond","ns");else{let z=V+L/1000+_/1e6,R=typeof q.millisecondsDecimalDigits==="number"?q.millisecondsDecimalDigits:0,D=z>=1?Math.round(z):Math.ceil(z),F=R?z.toFixed(R):D;Y(Number.parseFloat(F),"millisecond","ms",F)}}else{let U=(J?Number(Z%ED):Z)/1000%60,V=typeof q.secondsDecimalDigits==="number"?q.secondsDecimalDigits:1,L=$(U,V),_=q.keepDecimalsOnWholeSeconds?L:L.replace(/\.0+$/,"");Y(Number.parseFloat(_),"second","s",_)}if(X.length===0)return Q+"0"+(q.verbose?" milliseconds":"ms");let W=q.colonNotation?":":" ";if(typeof q.unitCount==="number")X=X.slice(0,Math.max(q.unitCount,1));return Q+X.join(W)}var ND=(Z)=>Z===0||Z===0n,PD=(Z,q)=>q===1||q===1n?Z:`${Z}s`,xD=0.0000001,ED;var xH=B(()=>{PH();ED=24n*60n*60n*1000n});var EH=(Z,q)=>{if(Z.failed)i0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:q,result:Z})};var vH=B(()=>{N6()});var yH=(Z,q)=>{if(!w6(q))return;EH(Z,q),vD(Z,q)},vD=(Z,q)=>{let J=`(done in ${qZ(Z.durationMs)})`;i0({type:"duration",verboseMessage:J,verboseInfo:q,result:Z})};var CH=B(()=>{xH();A1();N6();vH()});var h6=(Z,q,{reject:J})=>{if(yH(Z,q),Z.failed&&J)throw Z;return Z};var d8=B(()=>{CH()});var hH=(Z,q)=>{if(n1(Z))return"asyncGenerator";if(mH(Z))return"generator";if(c8(Z))return"fileUrl";if(hD(Z))return"filePath";if(mD(Z))return"webStream";if(h0(Z,{checkOpen:!1}))return"native";if(J0(Z))return"uint8Array";if(uD(Z))return"asyncIterable";if(pD(Z))return"iterable";if(XZ(Z))return gH({transform:Z},q);if(bD(Z))return yD(Z,q);return"native"},yD=(Z,q)=>{if(s3(Z.transform,{checkOpen:!1}))return CD(Z,q);if(XZ(Z.transform))return gH(Z,q);return SD(Z,q)},CD=(Z,q)=>{return fH(Z,q,"Duplex stream"),"duplex"},gH=(Z,q)=>{return fH(Z,q,"web TransformStream"),"webTransform"},fH=({final:Z,binary:q,objectMode:J},Q,X)=>{SH(Z,`${Q}.final`,X),SH(q,`${Q}.binary`,X),JZ(J,`${Q}.objectMode`)},SH=(Z,q,J)=>{if(Z!==void 0)throw TypeError(`The \`${q}\` option can only be defined when using a generator, not a ${J}.`)},SD=({transform:Z,final:q,binary:J,objectMode:Q},X)=>{if(Z!==void 0&&!bH(Z))throw TypeError(`The \`${X}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(s3(q,{checkOpen:!1}))throw TypeError(`The \`${X}.final\` option must not be a Duplex stream.`);if(XZ(q))throw TypeError(`The \`${X}.final\` option must not be a web TransformStream.`);if(q!==void 0&&!bH(q))throw TypeError(`The \`${X}.final\` option must be a generator.`);return JZ(J,`${X}.binary`),JZ(Q,`${X}.objectMode`),n1(Z)||n1(q)?"asyncGenerator":"generator"},JZ=(Z,q)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${q}\` option must use a boolean.`)},bH=(Z)=>n1(Z)||mH(Z),n1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",mH=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",bD=(Z)=>e(Z)&&(Z.transform!==void 0||Z.final!==void 0),c8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",uH=(Z)=>c8(Z)&&Z.protocol!=="file:",hD=(Z)=>e(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((q)=>gD.has(q))&&QZ(Z.file),gD,QZ=(Z)=>typeof Z==="string",pH=(Z,q)=>Z==="native"&&typeof q==="string"&&!fD.has(q),fD,dH=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",l8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",mD=(Z)=>dH(Z)||l8(Z),XZ=(Z)=>dH(Z?.readable)&&l8(Z?.writable),uD=(Z)=>cH(Z)&&typeof Z[Symbol.asyncIterator]==="function",pD=(Z)=>cH(Z)&&typeof Z[Symbol.iterator]==="function",cH=(Z)=>typeof Z==="object"&&Z!==null,k0,n8,$Z,lH,nH,O1;var R0=B(()=>{c1();X1();T0();gD=new Set(["file","append"]),fD=new Set(["ipc","ignore","inherit","overlapped","pipe"]),k0=new Set(["generator","asyncGenerator","duplex","webTransform"]),n8=new Set(["fileUrl","filePath","fileNumber"]),$Z=new Set(["fileUrl","filePath"]),lH=new Set([...$Z,"webStream","nodeStream"]),nH=new Set(["webTransform","duplex"]),O1={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"}});var YZ=(Z,q,J,Q)=>Q==="output"?dD(Z,q,J):cD(Z,q,J),dD=(Z,q,J)=>{let Q=q!==0&&J[q-1].value.readableObjectMode;return{writableObjectMode:Q,readableObjectMode:Z??Q}},cD=(Z,q,J)=>{let Q=q===0?Z===!0:J[q-1].value.readableObjectMode,X=q!==J.length-1&&(Z??Q);return{writableObjectMode:Q,readableObjectMode:X}},iH=(Z,q)=>{let J=Z.findLast(({type:Q})=>k0.has(Q));if(J===void 0)return!1;return q==="input"?J.value.writableObjectMode:J.value.readableObjectMode};var HZ=B(()=>{R0()});var aH=(Z,q,J,Q)=>[...Z.filter(({type:X})=>!k0.has(X)),...lD(Z,q,J,Q)],lD=(Z,q,J,{encoding:Q})=>{let X=Z.filter(({type:Y})=>k0.has(Y)),$=Array.from({length:X.length});for(let[Y,H]of Object.entries(X))$[Y]=nD({stdioItem:H,index:Number(Y),newTransforms:$,optionName:q,direction:J,encoding:Q});return sD($,J)},nD=({stdioItem:Z,stdioItem:{type:q},index:J,newTransforms:Q,optionName:X,direction:$,encoding:Y})=>{if(q==="duplex")return iD({stdioItem:Z,optionName:X});if(q==="webTransform")return aD({stdioItem:Z,index:J,newTransforms:Q,direction:$});return oD({stdioItem:Z,index:J,newTransforms:Q,direction:$,encoding:Y})},iD=({stdioItem:Z,stdioItem:{value:{transform:q,transform:{writableObjectMode:J,readableObjectMode:Q},objectMode:X=Q}},optionName:$})=>{if(X&&!Q)throw TypeError(`The \`${$}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!X&&Q)throw TypeError(`The \`${$}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:q,writableObjectMode:J,readableObjectMode:Q}}},aD=({stdioItem:Z,stdioItem:{value:q},index:J,newTransforms:Q,direction:X})=>{let{transform:$,objectMode:Y}=e(q)?q:{transform:q},{writableObjectMode:H,readableObjectMode:K}=YZ(Y,J,Q,X);return{...Z,value:{transform:$,writableObjectMode:H,readableObjectMode:K}}},oD=({stdioItem:Z,stdioItem:{value:q},index:J,newTransforms:Q,direction:X,encoding:$})=>{let{transform:Y,final:H,binary:K=!1,preserveNewlines:W=!1,objectMode:U}=e(q)?q:{transform:q},V=K||j0.has($),{writableObjectMode:L,readableObjectMode:_}=YZ(U,J,Q,X);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:W,writableObjectMode:L,readableObjectMode:_}}},sD=(Z,q)=>q==="input"?Z.reverse():Z;var oH=B(()=>{X1();p1();R0();HZ()});import GZ from"node:process";var sH=(Z,q,J)=>{let Q=Z.map((X)=>rD(X,q));if(Q.includes("input")&&Q.includes("output"))throw TypeError(`The \`${J}\` option must not be an array of both readable and writable values.`);return Q.find(Boolean)??ZA},rD=({type:Z,value:q},J)=>tD[J]??rH[Z](q),tD,g6=()=>{return},KZ=()=>"input",rH,eD=(Z)=>{if([0,GZ.stdin].includes(Z))return"input";if([1,2,GZ.stdout,GZ.stderr].includes(Z))return"output"},ZA="output";var tH=B(()=>{c1();R0();tD=["input","output","output"],rH={generator:g6,asyncGenerator:g6,fileUrl:g6,filePath:g6,iterable:KZ,asyncIterable:KZ,uint8Array:KZ,webStream:(Z)=>l8(Z)?"output":"input",nodeStream(Z){if(!d1(Z,{checkOpen:!1}))return"output";return o3(Z,{checkOpen:!1})?void 0:"input"},webTransform:g6,duplex:g6,native(Z){let q=eD(Z);if(q!==void 0)return q;if(h0(Z,{checkOpen:!1}))return rH.nodeStream(Z)}}});var eH=(Z,q)=>q&&!Z.includes("ipc")?[...Z,"ipc"]:Z;var ZG=()=>{};var qG=({stdio:Z,ipc:q,buffer:J,...Q},X,$)=>{let Y=qA(Z,Q).map((H,K)=>JG(H,K));return $?QA(Y,J,X):eH(Y,q)},qA=(Z,q)=>{if(Z===void 0)return w0.map((Q)=>q[Q]);if(JA(q))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${w0.map((Q)=>`\`${Q}\``).join(", ")}`);if(typeof Z==="string")return[Z,Z,Z];if(!Array.isArray(Z))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof Z}\``);let J=Math.max(Z.length,w0.length);return Array.from({length:J},(Q,X)=>Z[X])},JA=(Z)=>w0.some((q)=>Z[q]!==void 0),JG=(Z,q)=>{if(Array.isArray(Z))return Z.map((J)=>JG(J,q));if(Z===null||Z===void 0)return q>=w0.length?"ignore":"pipe";return Z},QA=(Z,q,J)=>Z.map((Q,X)=>!q[X]&&X!==0&&!k6(J,X)&&XA(Q)?"ignore":Q),XA=(Z)=>Z==="pipe"||Array.isArray(Z)&&Z.every((q)=>q==="pipe");var QG=B(()=>{Y1();ZG();A1()});import{readFileSync as $A}from"node:fs";import YA from"node:tty";var $G=({stdioItem:Z,stdioItem:{type:q},isStdioArray:J,fdNumber:Q,direction:X,isSync:$})=>{if(!J||q!=="native")return Z;return $?HA({stdioItem:Z,fdNumber:Q,direction:X}):UA({stdioItem:Z,fdNumber:Q})},HA=({stdioItem:Z,stdioItem:{value:q,optionName:J},fdNumber:Q,direction:X})=>{let $=GA({value:q,optionName:J,fdNumber:Q,direction:X});if($!==void 0)return $;if(h0(q,{checkOpen:!1}))throw TypeError(`The \`${J}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},GA=({value:Z,optionName:q,fdNumber:J,direction:Q})=>{let X=KA(Z,J);if(X===void 0)return;if(Q==="output")return{type:"fileNumber",value:X,optionName:q};if(YA.isatty(X))throw TypeError(`The \`${q}: ${B8(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:$1($A(X)),optionName:q}},KA=(Z,q)=>{if(Z==="inherit")return q;if(typeof Z==="number")return Z;let J=l4.indexOf(Z);if(J!==-1)return J},UA=({stdioItem:Z,stdioItem:{value:q,optionName:J},fdNumber:Q})=>{if(q==="inherit")return{type:"nodeStream",value:XG(Q,q,J),optionName:J};if(typeof q==="number")return{type:"nodeStream",value:XG(q,q,J),optionName:J};if(h0(q,{checkOpen:!1}))return{type:"nodeStream",value:q,optionName:J};return Z},XG=(Z,q,J)=>{let Q=l4[Z];if(Q===void 0)throw TypeError(`The \`${J}: ${q}\` option is invalid: no such standard stream.`);return Q};var YG=B(()=>{c1();Y1();T0();j1()});var HG=({input:Z,inputFile:q},J)=>J===0?[...WA(Z),...BA(q)]:[],WA=(Z)=>Z===void 0?[]:[{type:VA(Z),value:Z,optionName:"input"}],VA=(Z)=>{if(d1(Z,{checkOpen:!1}))return"nodeStream";if(typeof Z==="string")return"string";if(J0(Z))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},BA=(Z)=>Z===void 0?[]:[{...LA(Z),optionName:"inputFile"}],LA=(Z)=>{if(c8(Z))return{type:"fileUrl",value:Z};if(QZ(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var GG=B(()=>{c1();T0();R0()});var KG=(Z)=>Z.filter((q,J)=>Z.every((Q,X)=>q.value!==Q.value||J>=X||q.type==="generator"||q.type==="asyncGenerator")),UG=({stdioItem:{type:Z,value:q,optionName:J},direction:Q,fileDescriptors:X,isSync:$})=>{let Y=_A(X,Z);if(Y.length===0)return;if($){zA({otherStdioItems:Y,type:Z,value:q,optionName:J,direction:Q});return}if(lH.has(Z))return WG({otherStdioItems:Y,type:Z,value:q,optionName:J,direction:Q});if(nH.has(Z))MA({otherStdioItems:Y,type:Z,value:q,optionName:J})},_A=(Z,q)=>Z.flatMap(({direction:J,stdioItems:Q})=>Q.filter((X)=>X.type===q).map((X)=>({...X,direction:J}))),zA=({otherStdioItems:Z,type:q,value:J,optionName:Q,direction:X})=>{if($Z.has(q))WG({otherStdioItems:Z,type:q,value:J,optionName:Q,direction:X})},WG=({otherStdioItems:Z,type:q,value:J,optionName:Q,direction:X})=>{let $=Z.filter((H)=>RA(H,J));if($.length===0)return;let Y=$.find((H)=>H.direction!==X);return VG(Y,Q,q),X==="output"?$[0].stream:void 0},RA=({type:Z,value:q},J)=>{if(Z==="filePath")return q.file===J.file;if(Z==="fileUrl")return q.href===J.href;return q===J},MA=({otherStdioItems:Z,type:q,value:J,optionName:Q})=>{let X=Z.find(({value:{transform:$}})=>$===J.transform);VG(X,Q,q)},VG=(Z,q,J)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${q}\` options must not target ${O1[J]} that is the same.`)};var BG=B(()=>{R0()});var i8=(Z,q,J,Q)=>{let $=qG(q,J,Q).map((H,K)=>FA({stdioOption:H,fdNumber:K,options:q,isSync:Q})),Y=kA({initialFileDescriptors:$,addProperties:Z,options:q,isSync:Q});return q.stdio=Y.map(({stdioItems:H})=>xA(H)),Y},FA=({stdioOption:Z,fdNumber:q,options:J,isSync:Q})=>{let X=n4(q),{stdioItems:$,isStdioArray:Y}=DA({stdioOption:Z,fdNumber:q,options:J,optionName:X}),H=sH($,q,X),K=$.map((V)=>$G({stdioItem:V,isStdioArray:Y,fdNumber:q,direction:H,isSync:Q})),W=aH(K,X,H,J),U=iH(W,H);return wA(W,U),{direction:H,objectMode:U,stdioItems:W}},DA=({stdioOption:Z,fdNumber:q,options:J,optionName:Q})=>{let $=[...(Array.isArray(Z)?Z:[Z]).map((K)=>AA(K,Q)),...HG(J,q)],Y=KG($),H=Y.length>1;return TA(Y,H,Q),IA(Y),{stdioItems:Y,isStdioArray:H}},AA=(Z,q)=>({type:hH(Z,q),value:Z,optionName:q}),TA=(Z,q,J)=>{if(Z.length===0)throw TypeError(`The \`${J}\` option must not be an empty array.`);if(!q)return;for(let{value:Q,optionName:X}of Z)if(jA.has(Q))throw Error(`The \`${X}\` option must not include \`${Q}\`.`)},jA,IA=(Z)=>{for(let q of Z)OA(q)},OA=({type:Z,value:q,optionName:J})=>{if(uH(q))throw TypeError(`The \`${J}: URL\` option must use the \`file:\` scheme.
70
+ For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(pH(Z,q))throw TypeError(`The \`${J}: { file: '...' }\` option must be used instead of \`${J}: '...'\`.`)},wA=(Z,q)=>{if(!q)return;let J=Z.find(({type:Q})=>n8.has(Q));if(J!==void 0)throw TypeError(`The \`${J.optionName}\` option cannot use both files and transforms in objectMode.`)},kA=({initialFileDescriptors:Z,addProperties:q,options:J,isSync:Q})=>{let X=[];try{for(let $ of Z)X.push(NA({fileDescriptor:$,fileDescriptors:X,addProperties:q,options:J,isSync:Q}));return X}catch($){throw UZ(X),$}},NA=({fileDescriptor:{direction:Z,objectMode:q,stdioItems:J},fileDescriptors:Q,addProperties:X,options:$,isSync:Y})=>{let H=J.map((K)=>PA({stdioItem:K,addProperties:X,direction:Z,options:$,fileDescriptors:Q,isSync:Y}));return{direction:Z,objectMode:q,stdioItems:H}},PA=({stdioItem:Z,addProperties:q,direction:J,options:Q,fileDescriptors:X,isSync:$})=>{let Y=UG({stdioItem:Z,direction:J,fileDescriptors:X,isSync:$});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...q[J][Z.type](Z,Q)}},UZ=(Z)=>{for(let{stdioItems:q}of Z)for(let{stream:J}of q)if(J!==void 0&&!S0(J))J.destroy()},xA=(Z)=>{if(Z.length>1)return Z.some(({value:Q})=>Q==="overlapped")?"overlapped":"pipe";let[{type:q,value:J}]=Z;return q==="native"?J:"pipe"};var a8=B(()=>{Y1();oH();HZ();R0();tH();QG();YG();GG();BG();jA=new Set(["ignore","ipc"])});import{readFileSync as LG}from"node:fs";var zG=(Z,q)=>i8(vA,Z,q,!0),r0=({type:Z,optionName:q})=>{RG(q,O1[Z])},EA=({optionName:Z,value:q})=>{if(q==="ipc"||q==="overlapped")RG(Z,`"${q}"`);return{}},RG=(Z,q)=>{throw TypeError(`The \`${Z}\` option cannot be ${q} with synchronous methods.`)},_G,vA;var MG=B(()=>{T0();a8();R0();_G={generator(){},asyncGenerator:r0,webStream:r0,nodeStream:r0,webTransform:r0,duplex:r0,asyncIterable:r0,native:EA},vA={input:{..._G,fileUrl:({value:Z})=>({contents:[$1(LG(Z))]}),filePath:({value:{file:Z}})=>({contents:[$1(LG(Z))]}),fileNumber:r0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{..._G,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:q}})=>({path:Z,append:q}),fileNumber:({value:Z})=>({path:Z}),iterable:r0,string:r0,uint8Array:r0}}});var W1=(Z,{stripFinalNewline:q},J)=>WZ(q,J)&&Z!==void 0&&!Array.isArray(Z)?C6(Z):Z,WZ=(Z,q)=>q==="all"?Z[1]||Z[2]:Z[q];var g2=B(()=>{a3()});var o8=(Z,q,J,Q)=>Z||J?void 0:DG(q,Q),BZ=(Z,q,J)=>J?Z.flatMap((Q)=>FG(Q,q)):FG(Z,q),FG=(Z,q)=>{let{transform:J,final:Q}=DG(q,{});return[...J(Z),...Q()]},DG=(Z,q)=>{return q.previousChunks="",{transform:yA.bind(void 0,q,Z),final:SA.bind(void 0,q)}},yA=function*(Z,q,J){if(typeof J!=="string"){yield J;return}let{previousChunks:Q}=Z,X=-1;for(let $=0;$<J.length;$+=1)if(J[$]===`
71
+ `){let Y=CA(J,$,q,Z),H=J.slice(X+1,$+1-Y);if(Q.length>0)H=VZ(Q,H),Q="";yield H,X=$}if(X!==J.length-1)Q=VZ(Q,J.slice(X+1));Z.previousChunks=Q},CA=(Z,q,J,Q)=>{if(J)return 0;return Q.isWindowsNewline=q!==0&&Z[q-1]==="\r",Q.isWindowsNewline?2:1},SA=function*({previousChunks:Z}){if(Z.length>0)yield Z},AG=({binary:Z,preserveNewlines:q,readableObjectMode:J,state:Q})=>Z||q||J?void 0:{transform:bA.bind(void 0,Q)},bA=function*({isWindowsNewline:Z=!1},q){let{unixNewline:J,windowsNewline:Q,LF:X,concatBytes:$}=typeof q==="string"?hA:fA;if(q.at(-1)===X){yield q;return}yield $(q,Z?Q:J)},VZ=(Z,q)=>`${Z}${q}`,hA,gA=(Z,q)=>{let J=new Uint8Array(Z.length+q.length);return J.set(Z,0),J.set(q,Z.length),J},fA;var s8=B(()=>{hA={windowsNewline:`\r
72
+ `,unixNewline:`
73
+ `,LF:`
74
+ `,concatBytes:VZ},fA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:gA}});import{Buffer as mA}from"node:buffer";var TG=(Z,q)=>Z?void 0:uA.bind(void 0,q),uA=function*(Z,q){if(typeof q!=="string"&&!J0(q)&&!mA.isBuffer(q))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof q}.`);yield q},jG=(Z,q)=>Z?pA.bind(void 0,q):dA.bind(void 0,q),pA=function*(Z,q){IG(Z,q),yield q},dA=function*(Z,q){if(IG(Z,q),typeof q!=="string"&&!J0(q))throw TypeError(`The \`${Z}\` option's function must yield a string or an Uint8Array, not ${typeof q}.`);yield q},IG=(Z,q)=>{if(q===null||q===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${q}\`.
75
+ Instead, \`yield\` should either be called with a value, or not be called at all. For example:
76
+ if (condition) { yield value; }`)};var OG=B(()=>{T0()});import{Buffer as cA}from"node:buffer";import{StringDecoder as lA}from"node:string_decoder";var r8=(Z,q,J)=>{if(J)return;if(Z)return{transform:nA.bind(void 0,new TextEncoder)};let Q=new lA(q);return{transform:iA.bind(void 0,Q),final:aA.bind(void 0,Q)}},nA=function*(Z,q){if(cA.isBuffer(q))yield $1(q);else if(typeof q==="string")yield Z.encode(q);else yield q},iA=function*(Z,q){yield J0(q)?Z.write(q):q},aA=function*(Z){let q=Z.end();if(q!=="")yield q};var LZ=B(()=>{T0()});import{callbackify as wG}from"node:util";var _Z,t8=async function*(Z,q,J){if(J===q.length){yield Z;return}let{transform:Q=sA}=q[J];for await(let X of Q(Z))yield*t8(X,q,J+1)},kG=async function*(Z){for(let[q,{final:J}]of Object.entries(Z))yield*oA(J,Number(q),Z)},oA=async function*(Z,q,J){if(Z===void 0)return;for await(let Q of Z())yield*t8(Q,J,q+1)},NG,sA=function*(Z){yield Z};var PG=B(()=>{_Z=wG(async(Z,q,J,Q)=>{q.currentIterable=Z(...J);try{for await(let X of q.currentIterable)Q.push(X)}finally{delete q.currentIterable}}),NG=wG(async({currentIterable:Z},q)=>{if(Z!==void 0){await(q?Z.throw(q):Z.return());return}if(q)throw q})});var zZ=(Z,q,J,Q)=>{try{for(let X of Z(...q))J.push(X);Q()}catch(X){Q(X)}},xG=(Z,q)=>[...q.flatMap((J)=>[...i1(J,Z,0)]),...f2(Z)],i1=function*(Z,q,J){if(J===q.length){yield Z;return}let{transform:Q=tA}=q[J];for(let X of Q(Z))yield*i1(X,q,J+1)},f2=function*(Z){for(let[q,{final:J}]of Object.entries(Z))yield*rA(J,Number(q),Z)},rA=function*(Z,q,J){if(Z===void 0)return;for(let Q of Z())yield*i1(Q,J,q+1)},tA=function*(Z){yield Z};var RZ=()=>{};import{Transform as eA,getDefaultHighWaterMark as EG}from"node:stream";var MZ=({value:Z,value:{transform:q,final:J,writableObjectMode:Q,readableObjectMode:X},optionName:$},{encoding:Y})=>{let H={},K=vG(Z,Y,$),W=n1(q),U=n1(J),V=W?_Z.bind(void 0,t8,H):zZ.bind(void 0,i1),L=W||U?_Z.bind(void 0,kG,H):zZ.bind(void 0,f2),_=W||U?NG.bind(void 0,H):void 0;return{stream:new eA({writableObjectMode:Q,writableHighWaterMark:EG(Q),readableObjectMode:X,readableHighWaterMark:EG(X),transform(R,D,F){V([R,K,0],this,F)},flush(R){L([K],this,R)},destroy:_})}},e8=(Z,q,J,Q)=>{let X=q.filter(({type:Y})=>Y==="generator"),$=Q?X.reverse():X;for(let{value:Y,optionName:H}of $){let K=vG(Y,J,H);Z=xG(K,Z)}return Z},vG=({transform:Z,final:q,binary:J,writableObjectMode:Q,readableObjectMode:X,preserveNewlines:$},Y,H)=>{let K={};return[{transform:TG(Q,H)},r8(J,Y,Q),o8(J,$,Q,K),{transform:Z,final:q},{transform:jG(X,H)},AG({binary:J,preserveNewlines:$,readableObjectMode:X,state:K})].filter(Boolean)};var Z7=B(()=>{R0();s8();OG();LZ();PG();RZ()});var yG=(Z,q)=>{for(let J of ZT(Z))qT(Z,J,q)},ZT=(Z)=>new Set(Object.entries(Z).filter(([,{direction:q}])=>q==="input").map(([q])=>Number(q))),qT=(Z,q,J)=>{let{stdioItems:Q}=Z[q],X=Q.filter(({contents:H})=>H!==void 0);if(X.length===0)return;if(q!==0){let[{type:H,optionName:K}]=X;throw TypeError(`Only the \`stdin\` option, not \`${K}\`, can be ${O1[H]} with synchronous methods.`)}let Y=X.map(({contents:H})=>H).map((H)=>JT(H,Q));J.input=O2(Y)},JT=(Z,q)=>{let J=e8(Z,q,"utf8",!0);return QT(J),O2(J)},QT=(Z)=>{let q=Z.find((J)=>typeof J!=="string"&&!J0(J));if(q!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${q}.`)};var CG=B(()=>{Z7();T0();R0()});var q7=({stdioItems:Z,encoding:q,verboseInfo:J,fdNumber:Q})=>Q!=="all"&&k6(J,Q)&&!j0.has(q)&&XT(Q)&&(Z.some(({type:X,value:$})=>X==="native"&&$T.has($))||Z.every(({type:X})=>k0.has(X))),XT=(Z)=>Z===1||Z===2,$T,SG=async(Z,q,J,Q)=>{for await(let X of Z)if(!YT(q))hG(X,J,Q)},bG=(Z,q,J)=>{for(let Q of Z)hG(Q,q,J)},YT=(Z)=>Z._readableState.pipes.length>0,hG=(Z,q,J)=>{let Q=e4(Z);i0({type:"output",verboseMessage:Q,fdNumber:q,verboseInfo:J})};var FZ=B(()=>{p1();R0();N6();A1();$T=new Set(["pipe","overlapped"])});import{writeFileSync as HT,appendFileSync as GT}from"node:fs";var gG=({fileDescriptors:Z,syncResult:{output:q},options:J,isMaxBuffer:Q,verboseInfo:X})=>{if(q===null)return{output:Array.from({length:3})};let $={},Y=new Set([]);return{output:q.map((K,W)=>KT({result:K,fileDescriptors:Z,fdNumber:W,state:$,outputFiles:Y,isMaxBuffer:Q,verboseInfo:X},J)),...$}},KT=({result:Z,fileDescriptors:q,fdNumber:J,state:Q,outputFiles:X,isMaxBuffer:$,verboseInfo:Y},{buffer:H,encoding:K,lines:W,stripFinalNewline:U,maxBuffer:V})=>{if(Z===null)return;let L=jH(Z,$,V),_=$1(L),{stdioItems:z,objectMode:R}=q[J],D=UT([_],z,K,Q),{serializedResult:F,finalResult:k=F}=WT({chunks:D,objectMode:R,encoding:K,lines:W,stripFinalNewline:U,fdNumber:J});VT({serializedResult:F,fdNumber:J,state:Q,verboseInfo:Y,encoding:K,stdioItems:z,objectMode:R});let M=H[J]?k:void 0;try{if(Q.error===void 0)BT(F,z,X);return M}catch(O){return Q.error=O,M}},UT=(Z,q,J,Q)=>{try{return e8(Z,q,J,!1)}catch(X){return Q.error=X,Z}},WT=({chunks:Z,objectMode:q,encoding:J,lines:Q,stripFinalNewline:X,fdNumber:$})=>{if(q)return{serializedResult:Z};if(J==="buffer")return{serializedResult:O2(Z)};let Y=Z9(Z,J);if(Q[$])return{serializedResult:Y,finalResult:BZ(Y,!X[$],q)};return{serializedResult:Y}},VT=({serializedResult:Z,fdNumber:q,state:J,verboseInfo:Q,encoding:X,stdioItems:$,objectMode:Y})=>{if(!q7({stdioItems:$,encoding:X,verboseInfo:Q,fdNumber:q}))return;let H=BZ(Z,!1,Y);try{bG(H,q,Q)}catch(K){J.error??=K}},BT=(Z,q,J)=>{for(let{path:Q,append:X}of q.filter(({type:$})=>n8.has($))){let $=typeof Q==="string"?Q:Q.toString();if(X||J.has($))GT(Q,Z);else J.add($),HT(Q,Z)}};var fG=B(()=>{FZ();Z7();s8();T0();R0();l1()});var mG=([,Z,q],J)=>{if(!J.all)return;if(Z===void 0)return q;if(q===void 0)return Z;if(Array.isArray(Z))return Array.isArray(q)?[...Z,...q]:[...Z,W1(q,J,"all")];if(Array.isArray(q))return[W1(Z,J,"all"),...q];if(J0(Z)&&J0(q))return R3([Z,q]);return`${Z}${q}`};var uG=B(()=>{T0();g2()});import{once as DZ}from"node:events";var pG=async(Z,q)=>{let[J,Q]=await LT(Z);return q.isForcefullyTerminated??=!1,[J,Q]},LT=async(Z)=>{let[q,J]=await Promise.allSettled([DZ(Z,"spawn"),DZ(Z,"exit")]);if(q.status==="rejected")return[];return J.status==="rejected"?dG(Z):J.value},dG=async(Z)=>{try{return await DZ(Z,"exit")}catch{return dG(Z)}},cG=async(Z)=>{let[q,J]=await Z;if(!_T(q,J)&&AZ(q,J))throw new a0;return[q,J]},_T=(Z,q)=>Z===void 0&&q===void 0,AZ=(Z,q)=>Z!==0||q!==null;var TZ=B(()=>{m1()});var lG=({error:Z,status:q,signal:J,output:Q},{maxBuffer:X})=>{let $=zT(Z,q,J),Y=$?.code==="ETIMEDOUT",H=TH($,Q,X);return{resultError:$,exitCode:q,signal:J,timedOut:Y,isMaxBuffer:H}},zT=(Z,q,J)=>{if(Z!==void 0)return Z;return AZ(q,J)?new a0:void 0};var nG=B(()=>{m1();l1();TZ()});import{spawnSync as RT}from"node:child_process";var iG=(Z,q,J)=>{let{file:Q,commandArguments:X,command:$,escapedCommand:Y,startTime:H,verboseInfo:K,options:W,fileDescriptors:U}=MT(Z,q,J),V=AT({file:Q,commandArguments:X,options:W,command:$,escapedCommand:Y,verboseInfo:K,fileDescriptors:U,startTime:H});return h6(V,K,W)},MT=(Z,q,J)=>{let{command:Q,escapedCommand:X,startTime:$,verboseInfo:Y}=J8(Z,q,J),H=FT(J),{file:K,commandArguments:W,options:U}=x8(Z,q,H);DT(U);let V=zG(U,Y);return{file:K,commandArguments:W,command:Q,escapedCommand:X,startTime:$,verboseInfo:Y,options:U,fileDescriptors:V}},FT=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,DT=({ipc:Z,ipcInput:q,detached:J,cancelSignal:Q})=>{if(q)J7("ipcInput");if(Z)J7("ipc: true");if(J)J7("detached: true");if(Q)J7("cancelSignal")},J7=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},AT=({file:Z,commandArguments:q,options:J,command:Q,escapedCommand:X,verboseInfo:$,fileDescriptors:Y,startTime:H})=>{let K=TT({file:Z,commandArguments:q,options:J,command:Q,escapedCommand:X,fileDescriptors:Y,startTime:H});if(K.failed)return K;let{resultError:W,exitCode:U,signal:V,timedOut:L,isMaxBuffer:_}=lG(K,J),{output:z,error:R=W}=gG({fileDescriptors:Y,syncResult:K,options:J,isMaxBuffer:_,verboseInfo:$}),D=z.map((k,M)=>W1(k,J,M)),F=W1(mG(z,J),J,"all");return IT({error:R,exitCode:U,signal:V,timedOut:L,isMaxBuffer:_,stdio:D,all:F,options:J,command:Q,escapedCommand:X,startTime:H})},TT=({file:Z,commandArguments:q,options:J,command:Q,escapedCommand:X,fileDescriptors:$,startTime:Y})=>{try{yG($,J);let H=jT(J);return RT(...E8(Z,q,H))}catch(H){return b6({error:H,command:Q,escapedCommand:X,fileDescriptors:$,options:J,startTime:Y,isSync:!0})}},jT=({encoding:Z,maxBuffer:q,...J})=>({...J,encoding:"buffer",maxBuffer:u8(q)}),IT=({error:Z,exitCode:q,signal:J,timedOut:Q,isMaxBuffer:X,stdio:$,all:Y,options:H,command:K,escapedCommand:W,startTime:U})=>Z===void 0?p8({command:K,escapedCommand:W,stdio:$,all:Y,ipcOutput:[],options:H,startTime:U}):b2({error:Z,command:K,escapedCommand:W,timedOut:Q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:X,isForcefullyTerminated:!1,exitCode:q,signal:J,stdio:$,all:Y,ipcOutput:[],options:H,startTime:U,isSync:!0});var aG=B(()=>{O3();n3();i3();h2();d8();MG();g2();CG();fG();l1();uG();nG()});import{once as jZ,on as OT}from"node:events";var oG=({anyProcess:Z,channel:q,isSubprocess:J,ipc:Q},{reference:X=!0,filter:$}={})=>{return P6({methodName:"getOneMessage",isSubprocess:J,ipc:Q,isConnected:j8(Z)}),wT({anyProcess:Z,channel:q,isSubprocess:J,filter:$,reference:X})},wT=async({anyProcess:Z,channel:q,isSubprocess:J,filter:Q,reference:X})=>{z8(q,X);let $=I1(Z,q,J),Y=new AbortController;try{return await Promise.race([kT($,Q,Y),NT($,J,Y),PT($,J,Y)])}catch(H){throw x6(Z),H}finally{Y.abort(),R8(q,X)}},kT=async(Z,q,{signal:J})=>{if(q===void 0){let[Q]=await jZ(Z,"message",{signal:J});return Q}for await(let[Q]of OT(Z,"message",{signal:J}))if(q(Q))return Q},NT=async(Z,q,{signal:J})=>{await jZ(Z,"disconnect",{signal:J}),$Y(q)},PT=async(Z,q,{signal:J})=>{let[Q]=await jZ(Z,"strict:error",{signal:J});throw V8(Q,q)};var sG=B(()=>{E6();E2();x2()});import{once as tG,on as xT}from"node:events";var eG=({anyProcess:Z,channel:q,isSubprocess:J,ipc:Q},{reference:X=!0}={})=>IZ({anyProcess:Z,channel:q,isSubprocess:J,ipc:Q,shouldAwait:!J,reference:X}),IZ=({anyProcess:Z,channel:q,isSubprocess:J,ipc:Q,shouldAwait:X,reference:$})=>{P6({methodName:"getEachMessage",isSubprocess:J,ipc:Q,isConnected:j8(Z)}),z8(q,$);let Y=I1(Z,q,J),H=new AbortController,K={};return ET(Z,Y,H),vT({ipcEmitter:Y,isSubprocess:J,controller:H,state:K}),yT({anyProcess:Z,channel:q,ipcEmitter:Y,isSubprocess:J,shouldAwait:X,controller:H,state:K,reference:$})},ET=async(Z,q,J)=>{try{await tG(q,"disconnect",{signal:J.signal}),J.abort()}catch{}},vT=async({ipcEmitter:Z,isSubprocess:q,controller:J,state:Q})=>{try{let[X]=await tG(Z,"strict:error",{signal:J.signal});Q.error=V8(X,q),J.abort()}catch{}},yT=async function*({anyProcess:Z,channel:q,ipcEmitter:J,isSubprocess:Q,shouldAwait:X,controller:$,state:Y,reference:H}){try{for await(let[K]of xT(J,"message",{signal:$.signal}))rG(Y),yield K}catch{rG(Y)}finally{if($.abort(),R8(q,H),!Q)x6(Z);if(X)await Z}},rG=({error:Z})=>{if(Z)throw Z};var OZ=B(()=>{E6();E2();x2()});import ZK from"node:process";var qK=(Z,{ipc:q})=>{Object.assign(Z,QK(Z,!1,q))},JK=()=>{let Z=ZK,q=!0,J=ZK.channel!==void 0;return{...QK(Z,!0,J),getCancelSignal:yY.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:J})}},QK=(Z,q,J)=>({sendMessage:k8.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J}),getOneMessage:oG.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J}),getEachMessage:eG.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J})});var wZ=B(()=>{N8();sG();OZ();A8()});import{ChildProcess as CT}from"node:child_process";import{PassThrough as ST,Readable as bT,Writable as hT,Duplex as gT}from"node:stream";var XK=({error:Z,command:q,escapedCommand:J,fileDescriptors:Q,options:X,startTime:$,verboseInfo:Y})=>{UZ(Q);let H=new CT;fT(H,Q),Object.assign(H,{readable:mT,writable:uT,duplex:pT});let K=b6({error:Z,command:q,escapedCommand:J,fileDescriptors:Q,options:X,startTime:$,isSync:!1}),W=dT(K,Y,X);return{subprocess:H,promise:W}},fT=(Z,q)=>{let J=m2(),Q=m2(),X=m2(),$=Array.from({length:q.length-3},m2),Y=m2(),H=[J,Q,X,...$];Object.assign(Z,{stdin:J,stdout:Q,stderr:X,all:Y,stdio:H})},m2=()=>{let Z=new ST;return Z.end(),Z},mT=()=>new bT({read(){}}),uT=()=>new hT({write(){}}),pT=()=>new gT({read(){},write(){}}),dT=async(Z,q,J)=>h6(Z,q,J);var $K=B(()=>{a8();h2();d8()});import{createReadStream as YK,createWriteStream as HK}from"node:fs";import{Buffer as cT}from"node:buffer";import{Readable as u2,Writable as lT,Duplex as nT}from"node:stream";var KK=(Z,q)=>i8(iT,Z,q,!1),p2=({type:Z,optionName:q})=>{throw TypeError(`The \`${q}\` option cannot be ${O1[Z]}.`)},GK,iT;var UK=B(()=>{Z7();a8();R0();GK={fileNumber:p2,generator:MZ,asyncGenerator:MZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:q,readableObjectMode:J}}){let Q=q||J;return{stream:nT.fromWeb(Z,{objectMode:Q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},iT={input:{...GK,fileUrl:({value:Z})=>({stream:YK(Z)}),filePath:({value:{file:Z}})=>({stream:YK(Z)}),webStream:({value:Z})=>({stream:u2.fromWeb(Z)}),iterable:({value:Z})=>({stream:u2.from(Z)}),asyncIterable:({value:Z})=>({stream:u2.from(Z)}),string:({value:Z})=>({stream:u2.from(Z)}),uint8Array:({value:Z})=>({stream:u2.from(cT.from(Z))})},output:{...GK,fileUrl:({value:Z})=>({stream:HK(Z)}),filePath:({value:{file:Z,append:q}})=>({stream:HK(Z,q?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:lT.fromWeb(Z)}),iterable:p2,asyncIterable:p2,string:p2,uint8Array:p2}}});import{on as aT,once as WK}from"node:events";import{PassThrough as oT,getDefaultHighWaterMark as sT}from"node:stream";import{finished as LK}from"node:stream/promises";function a1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let X of Z)kZ(X);let q=Z.some(({readableObjectMode:X})=>X),J=rT(Z,q),Q=new _K({objectMode:q,writableHighWaterMark:J,readableHighWaterMark:J});for(let X of Z)Q.add(X);return Q}var rT=(Z,q)=>{if(Z.length===0)return sT(q);let J=Z.filter(({readableObjectMode:Q})=>Q===q).map(({readableHighWaterMark:Q})=>Q);return Math.max(...J)},_K,tT=async(Z,q,J)=>{Q7(Z,VK);let Q=new AbortController;try{await Promise.race([eT(Z,Q),Zj(Z,q,J,Q)])}finally{Q.abort(),Q7(Z,-VK)}},eT=async(Z,{signal:q})=>{try{await LK(Z,{signal:q,cleanup:!0})}catch(J){throw zK(Z,J),J}},Zj=async(Z,q,J,{signal:Q})=>{for await(let[X]of aT(Z,"unpipe",{signal:Q}))if(q.has(X))X.emit(J)},kZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},qj=async({passThroughStream:Z,stream:q,streams:J,ended:Q,aborted:X,onFinished:$,unpipeEvent:Y})=>{Q7(Z,BK);let H=new AbortController;try{await Promise.race([Jj($,q,H),Qj({passThroughStream:Z,stream:q,streams:J,ended:Q,aborted:X,controller:H}),Xj({stream:q,streams:J,ended:Q,aborted:X,unpipeEvent:Y,controller:H})])}finally{H.abort(),Q7(Z,-BK)}if(J.size>0&&J.size===Q.size+X.size)if(Q.size===0&&X.size>0)NZ(Z);else $j(Z)},Jj=async(Z,q,{signal:J})=>{try{if(await Z,!J.aborted)NZ(q)}catch(Q){if(!J.aborted)zK(q,Q)}},Qj=async({passThroughStream:Z,stream:q,streams:J,ended:Q,aborted:X,controller:{signal:$}})=>{try{if(await LK(q,{signal:$,cleanup:!0,readable:!0,writable:!1}),J.has(q))Q.add(q)}catch(Y){if($.aborted||!J.has(q))return;if(RK(Y))X.add(q);else MK(Z,Y)}},Xj=async({stream:Z,streams:q,ended:J,aborted:Q,unpipeEvent:X,controller:{signal:$}})=>{if(await WK(Z,X,{signal:$}),!Z.readable)return WK($,"abort",{signal:$});q.delete(Z),J.delete(Z),Q.delete(Z)},$j=(Z)=>{if(Z.writable)Z.end()},zK=(Z,q)=>{if(RK(q))NZ(Z);else MK(Z,q)},RK=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",NZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},MK=(Z,q)=>{if(!Z.destroyed)Z.once("error",Yj),Z.destroy(q)},Yj=()=>{},Q7=(Z,q)=>{let J=Z.getMaxListeners();if(J!==0&&J!==Number.POSITIVE_INFINITY)Z.setMaxListeners(J+q)},VK=2,BK=1;var X7=B(()=>{_K=class _K extends oT{#J=new Set([]);#Q=new Set([]);#q=new Set([]);#Y;#G=Symbol("unpipe");#V=new WeakMap;add(Z){if(kZ(Z),this.#J.has(Z))return;this.#J.add(Z),this.#Y??=tT(this,this.#J,this.#G);let q=qj({passThroughStream:this,stream:Z,streams:this.#J,ended:this.#Q,aborted:this.#q,onFinished:this.#Y,unpipeEvent:this.#G});this.#V.set(Z,q),Z.pipe(this,{end:!1})}async remove(Z){if(kZ(Z),!this.#J.has(Z))return!1;let q=this.#V.get(Z);if(q===void 0)return!1;return this.#V.delete(Z),Z.unpipe(this),await q,!0}}});import{finished as FK}from"node:stream/promises";var f6=(Z,q)=>{Z.pipe(q),Hj(Z,q),Gj(Z,q)},Hj=async(Z,q)=>{if(S0(Z)||S0(q))return;try{await FK(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}PZ(q)},PZ=(Z)=>{if(Z.writable)Z.end()},Gj=async(Z,q)=>{if(S0(Z)||S0(q))return;try{await FK(q,{cleanup:!0,readable:!1,writable:!0})}catch{}xZ(Z)},xZ=(Z)=>{if(Z.readable)Z.destroy()};var $7=B(()=>{Y1()});var DK=(Z,q,J)=>{let Q=new Map;for(let[X,{stdioItems:$,direction:Y}]of Object.entries(q)){for(let{stream:H}of $.filter(({type:K})=>k0.has(K)))Kj(Z,H,Y,X);for(let{stream:H}of $.filter(({type:K})=>!k0.has(K)))Wj({subprocess:Z,stream:H,direction:Y,fdNumber:X,pipeGroups:Q,controller:J})}for(let[X,$]of Q.entries()){let Y=$.length===1?$[0]:a1($);f6(Y,X)}},Kj=(Z,q,J,Q)=>{if(J==="output")f6(Z.stdio[Q],q);else f6(q,Z.stdio[Q]);let X=Uj[Q];if(X!==void 0)Z[X]=q;Z.stdio[Q]=q},Uj,Wj=({subprocess:Z,stream:q,direction:J,fdNumber:Q,pipeGroups:X,controller:$})=>{if(q===void 0)return;Vj(q,$);let[Y,H]=J==="output"?[q,Z.stdio[Q]]:[Z.stdio[Q],q],K=X.get(Y)??[];X.set(Y,[...K,H])},Vj=(Z,{signal:q})=>{if(S0(Z))u1(Z,Bj,q)},Bj=2;var AK=B(()=>{X7();Y1();_8();R0();$7();Uj=["stdin","stdout","stderr"]});var o1;var TK=B(()=>{o1=[];o1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")o1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")o1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class jK{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(vZ[EZ])return vZ[EZ];Lj(vZ,EZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,q){this.listeners[Z].push(q)}removeListener(Z,q){let J=this.listeners[Z],Q=J.indexOf(q);if(Q===-1)return;if(Q===0&&J.length===1)J.length=0;else J.splice(Q,1)}emit(Z,q,J){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let Q=!1;for(let X of this.listeners[Z])Q=X(q,J)===!0||Q;if(Z==="exit")Q=this.emit("afterExit",q,J)||Q;return Q}}class CZ{}var Y7=(Z)=>!!Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function",EZ,vZ,Lj,_j=(Z)=>{return{onExit(q,J){return Z.onExit(q,J)},load(){return Z.load()},unload(){return Z.unload()}}},IK,OK,yZ,wK,Kp,Up;var kK=B(()=>{TK();EZ=Symbol.for("signal-exit emitter"),vZ=globalThis,Lj=Object.defineProperty.bind(Object);IK=class IK extends CZ{onExit(){return()=>{}}load(){}unload(){}};OK=class OK extends CZ{#J=yZ.platform==="win32"?"SIGINT":"SIGHUP";#Q=new jK;#q;#Y;#G;#V={};#A=!1;constructor(Z){super();this.#q=Z,this.#V={};for(let q of o1)this.#V[q]=()=>{let J=this.#q.listeners(q),{count:Q}=this.#Q,X=Z;if(typeof X.__signal_exit_emitter__==="object"&&typeof X.__signal_exit_emitter__.count==="number")Q+=X.__signal_exit_emitter__.count;if(J.length===Q){this.unload();let $=this.#Q.emit("exit",null,q),Y=q==="SIGHUP"?this.#J:q;if(!$)Z.kill(Z.pid,Y)}};this.#G=Z.reallyExit,this.#Y=Z.emit}onExit(Z,q){if(!Y7(this.#q))return()=>{};if(this.#A===!1)this.load();let J=q?.alwaysLast?"afterExit":"exit";return this.#Q.on(J,Z),()=>{if(this.#Q.removeListener(J,Z),this.#Q.listeners.exit.length===0&&this.#Q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#A)return;this.#A=!0,this.#Q.count+=1;for(let Z of o1)try{let q=this.#V[Z];if(q)this.#q.on(Z,q)}catch(q){}this.#q.emit=(Z,...q)=>{return this.#H(Z,...q)},this.#q.reallyExit=(Z)=>{return this.#z(Z)}}unload(){if(!this.#A)return;this.#A=!1,o1.forEach((Z)=>{let q=this.#V[Z];if(!q)throw Error("Listener not defined for signal: "+Z);try{this.#q.removeListener(Z,q)}catch(J){}}),this.#q.emit=this.#Y,this.#q.reallyExit=this.#G,this.#Q.count-=1}#z(Z){if(!Y7(this.#q))return 0;return this.#q.exitCode=Z||0,this.#Q.emit("exit",this.#q.exitCode,null),this.#G.call(this.#q,this.#q.exitCode)}#H(Z,...q){let J=this.#Y;if(Z==="exit"&&Y7(this.#q)){if(typeof q[0]==="number")this.#q.exitCode=q[0];let Q=J.call(this.#q,Z,...q);return this.#Q.emit("exit",this.#q.exitCode,null),Q}else return J.call(this.#q,Z,...q)}};yZ=globalThis.process,{onExit:wK,load:Kp,unload:Up}=_j(Y7(yZ)?new OK(yZ):new IK)});import{addAbortListener as zj}from"node:events";var NK=(Z,{cleanup:q,detached:J},{signal:Q})=>{if(!q||J)return;let X=wK(()=>{Z.kill()});zj(Q,()=>{X()})};var PK=B(()=>{kK()});var EK=({source:Z,sourcePromise:q,boundOptions:J,createNested:Q},...X)=>{let $=Z8(),{destination:Y,destinationStream:H,destinationError:K,from:W,unpipeSignal:U}=Rj(J,Q,X),{sourceStream:V,sourceError:L}=Fj(Z,W),{options:_,fileDescriptors:z}=s0.get(Z);return{sourcePromise:q,sourceStream:V,sourceOptions:_,sourceError:L,destination:Y,destinationStream:H,destinationError:K,unpipeSignal:U,fileDescriptors:z,startTime:$}},Rj=(Z,q,J)=>{try{let{destination:Q,pipeOptions:{from:X,to:$,unpipeSignal:Y}={}}=Mj(Z,q,...J),H=L8(Q,$);return{destination:Q,destinationStream:H,from:X,unpipeSignal:Y}}catch(Q){return{destinationError:Q}}},Mj=(Z,q,J,...Q)=>{if(Array.isArray(J))return{destination:q(xK,Z)(J,...Q),pipeOptions:Z};if(typeof J==="string"||J instanceof URL||L3(J)){if(Object.keys(Z).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[X,$,Y]=d4(J,...Q);return{destination:q(xK)(X,$,Y),pipeOptions:Y}}if(s0.has(J)){if(Object.keys(Z).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:J,pipeOptions:Q[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${J}`)},xK=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),Fj=(Z,q)=>{try{return{sourceStream:y6(Z,q)}}catch(J){return{sourceError:J}}};var vK=B(()=>{z3();q8();j1();O6()});var CK=({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:Q,fileDescriptors:X,sourceOptions:$,startTime:Y})=>{let H=Dj({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:Q});if(H!==void 0)throw SZ({error:H,fileDescriptors:X,sourceOptions:$,startTime:Y})},Dj=({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:Q})=>{if(q!==void 0&&Q!==void 0)return Q;if(Q!==void 0)return xZ(Z),Q;if(q!==void 0)return PZ(J),q},SZ=({error:Z,fileDescriptors:q,sourceOptions:J,startTime:Q})=>b6({error:Z,command:yK,escapedCommand:yK,fileDescriptors:q,options:J,startTime:Q,isSync:!1}),yK="source.pipe(destination)";var bZ=B(()=>{h2();$7()});var SK=async(Z)=>{let[{status:q,reason:J,value:Q=J},{status:X,reason:$,value:Y=$}]=await Z;if(!Y.pipedFrom.includes(Q))Y.pipedFrom.push(Q);if(X==="rejected")throw Y;if(q==="rejected")throw Q;return Y};var bK=()=>{};import{finished as Aj}from"node:stream/promises";var hK=(Z,q,J)=>{let Q=H7.has(q)?jj(Z,q):Tj(Z,q);return u1(Z,Oj,J.signal),u1(q,wj,J.signal),Ij(q),Q},Tj=(Z,q)=>{let J=a1([Z]);return f6(J,q),H7.set(q,J),J},jj=(Z,q)=>{let J=H7.get(q);return J.add(Z),J},Ij=async(Z)=>{try{await Aj(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}H7.delete(Z)},H7,Oj=2,wj=1;var gK=B(()=>{X7();_8();$7();H7=new WeakMap});import{aborted as kj}from"node:util";var fK=(Z,q)=>Z===void 0?[]:[Nj(Z,q)],Nj=async(Z,{sourceStream:q,mergedStream:J,fileDescriptors:Q,sourceOptions:X,startTime:$})=>{await kj(Z,q),await J.remove(q);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw SZ({error:Y,fileDescriptors:Q,sourceOptions:X,startTime:$})};var mK=B(()=>{bZ()});var G7=(Z,...q)=>{if(e(q[0]))return G7.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...q[0]}});let{destination:J,...Q}=EK(Z,...q),X=Pj({...Q,destination:J});return X.pipe=G7.bind(void 0,{...Z,source:J,sourcePromise:X,boundOptions:{}}),X},Pj=async({sourcePromise:Z,sourceStream:q,sourceOptions:J,sourceError:Q,destination:X,destinationStream:$,destinationError:Y,unpipeSignal:H,fileDescriptors:K,startTime:W})=>{let U=xj(Z,X);CK({sourceStream:q,sourceError:Q,destinationStream:$,destinationError:Y,fileDescriptors:K,sourceOptions:J,startTime:W});let V=new AbortController;try{let L=hK(q,$,V);return await Promise.race([SK(U),...fK(H,{sourceStream:q,mergedStream:L,sourceOptions:J,fileDescriptors:K,startTime:W})])}finally{V.abort()}},xj=(Z,q)=>Promise.allSettled([Z,q]);var uK=B(()=>{X1();vK();bZ();bK();gK();mK()});import{on as Ej}from"node:events";import{getDefaultHighWaterMark as vj}from"node:stream";var K7=({subprocessStdout:Z,subprocess:q,binary:J,shouldEncode:Q,encoding:X,preserveNewlines:$})=>{let Y=new AbortController;return yj(q,Y),dK({stream:Z,controller:Y,binary:J,shouldEncode:!Z.readableObjectMode&&Q,encoding:X,shouldSplit:!Z.readableObjectMode,preserveNewlines:$})},yj=async(Z,q)=>{try{await Z}catch{}finally{q.abort()}},hZ=({stream:Z,onStreamEnd:q,lines:J,encoding:Q,stripFinalNewline:X,allMixed:$})=>{let Y=new AbortController;Cj(q,Y,Z);let H=Z.readableObjectMode&&!$;return dK({stream:Z,controller:Y,binary:Q==="buffer",shouldEncode:!H,encoding:Q,shouldSplit:!H&&J,preserveNewlines:!X})},Cj=async(Z,q,J)=>{try{await Z}catch{J.destroy()}finally{q.abort()}},dK=({stream:Z,controller:q,binary:J,shouldEncode:Q,encoding:X,shouldSplit:$,preserveNewlines:Y})=>{let H=Ej(Z,"data",{signal:q.signal,highWaterMark:pK,highWatermark:pK});return Sj({onStdoutChunk:H,controller:q,binary:J,shouldEncode:Q,encoding:X,shouldSplit:$,preserveNewlines:Y})},gZ,pK,Sj=async function*({onStdoutChunk:Z,controller:q,binary:J,shouldEncode:Q,encoding:X,shouldSplit:$,preserveNewlines:Y}){let H=bj({binary:J,shouldEncode:Q,encoding:X,shouldSplit:$,preserveNewlines:Y});try{for await(let[K]of Z)yield*i1(K,H,0)}catch(K){if(!q.signal.aborted)throw K}finally{yield*f2(H)}},bj=({binary:Z,shouldEncode:q,encoding:J,shouldSplit:Q,preserveNewlines:X})=>[r8(Z,J,!q),o8(Z,X,!Q,{})].filter(Boolean);var U7=B(()=>{LZ();s8();RZ();gZ=vj(!0),pK=gZ});import{setImmediate as hj}from"node:timers/promises";var cK=async({stream:Z,onStreamEnd:q,fdNumber:J,encoding:Q,buffer:X,maxBuffer:$,lines:Y,allMixed:H,stripFinalNewline:K,verboseInfo:W,streamInfo:U})=>{let V=gj({stream:Z,onStreamEnd:q,fdNumber:J,encoding:Q,allMixed:H,verboseInfo:W,streamInfo:U});if(!X){await Promise.all([fj(Z),V]);return}let L=WZ(K,J),_=hZ({stream:Z,onStreamEnd:q,lines:Y,encoding:Q,stripFinalNewline:L,allMixed:H}),[z]=await Promise.all([mj({stream:Z,iterable:_,fdNumber:J,encoding:Q,maxBuffer:$,lines:Y}),V]);return z},gj=async({stream:Z,onStreamEnd:q,fdNumber:J,encoding:Q,allMixed:X,verboseInfo:$,streamInfo:{fileDescriptors:Y}})=>{if(!q7({stdioItems:Y[J]?.stdioItems,encoding:Q,verboseInfo:$,fdNumber:J}))return;let H=hZ({stream:Z,onStreamEnd:q,lines:!0,encoding:Q,stripFinalNewline:!0,allMixed:X});await SG(H,Z,J,$)},fj=async(Z)=>{if(await hj(),Z.readableFlowing===null)Z.resume()},mj=async({stream:Z,stream:{readableObjectMode:q},iterable:J,fdNumber:Q,encoding:X,maxBuffer:$,lines:Y})=>{try{if(q||Y)return await b8(J,{maxBuffer:$});if(X==="buffer")return new Uint8Array(await h8(J,{maxBuffer:$}));return await f8(J,{maxBuffer:$})}catch(H){return lK(FH({error:H,stream:Z,readableObjectMode:q,lines:Y,encoding:X,fdNumber:Q}))}},fZ=async(Z)=>{try{return await Z}catch(q){return lK(q)}},lK=({bufferedData:Z})=>t$(Z)?new Uint8Array(Z):Z;var mZ=B(()=>{m8();T0();FZ();U7();l1();g2()});import{finished as uj}from"node:stream/promises";var d2=async(Z,q,J,{isSameDirection:Q,stopOnExit:X=!1}={})=>{let $=pj(Z,J),Y=new AbortController;try{await Promise.race([...X?[J.exitPromise]:[],uj(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!$.stdinCleanedUp)lj(H,q,J,Q)}finally{Y.abort()}},pj=(Z,{originalStreams:[q],subprocess:J})=>{let Q={stdinCleanedUp:!1};if(Z===q)dj(Z,J,Q);return Q},dj=(Z,q,J)=>{let{_destroy:Q}=Z;Z._destroy=(...X)=>{cj(q,J),Q.call(Z,...X)}},cj=({exitCode:Z,signalCode:q},J)=>{if(Z!==null||q!==null)J.stdinCleanedUp=!0},lj=(Z,q,J,Q)=>{if(!nj(Z,q,J,Q))throw Z},nj=(Z,q,J,Q=!0)=>{if(J.propagating)return nK(Z)||W7(Z);return J.propagating=!0,uZ(J,q)===Q?nK(Z):W7(Z)},uZ=({fileDescriptors:Z},q)=>q!=="all"&&Z[q].direction==="input",W7=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",nK=(Z)=>Z?.code==="EPIPE";var V7=()=>{};var iK=({subprocess:Z,encoding:q,buffer:J,maxBuffer:Q,lines:X,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((K,W)=>pZ({stream:K,fdNumber:W,encoding:q,buffer:J[W],maxBuffer:Q[W],lines:X[W],allMixed:!1,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})),pZ=async({stream:Z,fdNumber:q,encoding:J,buffer:Q,maxBuffer:X,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W})=>{if(!Z)return;let U=d2(Z,q,W);if(uZ(W,q)){await U;return}let[V]=await Promise.all([cK({stream:Z,onStreamEnd:U,fdNumber:q,encoding:J,buffer:Q,maxBuffer:X,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W}),U]);return V};var dZ=B(()=>{mZ();V7()});var aK=({stdout:Z,stderr:q},{all:J})=>J&&(Z||q)?a1([Z,q].filter(Boolean)):void 0,oK=({subprocess:Z,encoding:q,buffer:J,maxBuffer:Q,lines:X,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>pZ({...ij(Z,J),fdNumber:"all",encoding:q,maxBuffer:Q[1]+Q[2],lines:X[1]||X[2],allMixed:aj(Z),stripFinalNewline:$,verboseInfo:Y,streamInfo:H}),ij=({stdout:Z,stderr:q,all:J},[,Q,X])=>{let $=Q||X;if(!$)return{stream:J,buffer:$};if(!Q)return{stream:q,buffer:$};if(!X)return{stream:Z,buffer:$};return{stream:J,buffer:$}},aj=({all:Z,stdout:q,stderr:J})=>Z&&q&&J&&q.readableObjectMode!==J.readableObjectMode;var cZ=B(()=>{X7();dZ()});var sK=(Z)=>k6(Z,"ipc"),rK=(Z,q)=>{let J=e4(Z);i0({type:"ipc",verboseMessage:J,fdNumber:"ipc",verboseInfo:q})};var tK=B(()=>{N6();A1()});var eK=async({subprocess:Z,buffer:q,maxBuffer:J,ipc:Q,ipcOutput:X,verboseInfo:$})=>{if(!Q)return X;let Y=sK($),H=H1(q,"ipc"),K=H1(J,"ipc");for await(let W of IZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:Q,shouldAwait:!1,reference:!0})){if(H)DH(Z,X,K),X.push(W);if(Y)rK(W,$)}return X},ZU=async(Z,q)=>{return await Promise.allSettled([Z]),q};var qU=B(()=>{l1();tK();G1();OZ()});import{once as oj}from"node:events";var JU=async({subprocess:Z,options:{encoding:q,buffer:J,maxBuffer:Q,lines:X,timeoutDuration:$,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,stripFinalNewline:W,ipc:U,ipcInput:V},context:L,verboseInfo:_,fileDescriptors:z,originalStreams:R,onInternalError:D,controller:F})=>{let k=pG(Z,L),M={originalStreams:R,fileDescriptors:z,subprocess:Z,exitPromise:k,propagating:!1},O=iK({subprocess:Z,encoding:q,buffer:J,maxBuffer:Q,lines:X,stripFinalNewline:W,verboseInfo:_,streamInfo:M}),T=oK({subprocess:Z,encoding:q,buffer:J,maxBuffer:Q,lines:X,stripFinalNewline:W,verboseInfo:_,streamInfo:M}),j=[],A=eK({subprocess:Z,buffer:J,maxBuffer:Q,ipc:U,ipcOutput:j,verboseInfo:_}),g=sj(R,Z,M),w=rj(z,M);try{return await Promise.race([Promise.all([{},cG(k),Promise.all(O),T,A,dY(Z,V),...g,...w]),D,tj(Z,F),...gY(Z,$,L,F),...XY({subprocess:Z,cancelSignal:Y,gracefulCancel:H,context:L,controller:F}),...bY({subprocess:Z,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,context:L,controller:F})])}catch(P){return L.terminationReason??="other",Promise.all([{error:P},k,Promise.all(O.map((v)=>fZ(v))),fZ(T),ZU(A,j),Promise.allSettled(g),Promise.allSettled(w)])}},sj=(Z,q,J)=>Z.map((Q,X)=>Q===q.stdio[X]?void 0:d2(Q,X,J)),rj=(Z,q)=>Z.flatMap(({stdioItems:J},Q)=>J.filter(({value:X,stream:$=X})=>h0($,{checkOpen:!1})&&!S0($)).map(({type:X,value:$,stream:Y=$})=>d2(Y,Q,q,{isSameDirection:k0.has(X),stopOnExit:X==="native"}))),tj=async(Z,{signal:q})=>{let[J]=await oj(Z,"error",{signal:q});throw J};var QU=B(()=>{c1();u3();v3();m3();Y1();R0();mZ();qU();d3();cZ();dZ();TZ();V7()});var XU=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),c2=(Z,q,J)=>{let Q=Z[J];if(!Q.has(q))Q.set(q,[]);let X=Q.get(q),$=o0();return X.push($),{resolve:$.resolve.bind($),promises:X}},m6=async({resolve:Z,promises:q},J)=>{Z();let[Q]=await Promise.race([Promise.allSettled([!0,J]),Promise.all([!1,...q])]);return!Q};var B7=B(()=>{v6()});import{finished as $U}from"node:stream/promises";var lZ=async(Z)=>{if(Z===void 0)return;try{await nZ(Z)}catch{}},YU=async(Z)=>{if(Z===void 0)return;try{await iZ(Z)}catch{}},nZ=async(Z)=>{await $U(Z,{cleanup:!0,readable:!1,writable:!0})},iZ=async(Z)=>{await $U(Z,{cleanup:!0,readable:!0,writable:!1})},L7=async(Z,q)=>{if(await Z,q)throw q},_7=(Z,q,J)=>{if(J&&!W7(J))Z.destroy(J);else if(q)Z.destroy()};var aZ=B(()=>{V7()});import{Readable as ej}from"node:stream";import{callbackify as ZI}from"node:util";var HU=({subprocess:Z,concurrentStreams:q,encoding:J},{from:Q,binary:X=!0,preserveNewlines:$=!0}={})=>{let Y=X||j0.has(J),{subprocessStdout:H,waitReadableDestroy:K}=oZ(Z,Q,q),{readableEncoding:W,readableObjectMode:U,readableHighWaterMark:V}=sZ(H,Y),{read:L,onStdoutDataDone:_}=rZ({subprocessStdout:H,subprocess:Z,binary:Y,encoding:J,preserveNewlines:$}),z=new ej({read:L,destroy:ZI(eZ.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:K})),highWaterMark:V,objectMode:U,encoding:W});return tZ({subprocessStdout:H,onStdoutDataDone:_,readable:z,subprocess:Z}),z},oZ=(Z,q,J)=>{let Q=y6(Z,q),X=c2(J,Q,"readableDestroy");return{subprocessStdout:Q,waitReadableDestroy:X}},sZ=({readableEncoding:Z,readableObjectMode:q,readableHighWaterMark:J},Q)=>Q?{readableEncoding:Z,readableObjectMode:q,readableHighWaterMark:J}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:gZ},rZ=({subprocessStdout:Z,subprocess:q,binary:J,encoding:Q,preserveNewlines:X})=>{let $=o0(),Y=K7({subprocessStdout:Z,subprocess:q,binary:J,shouldEncode:!J,encoding:Q,preserveNewlines:X});return{read(){qI(this,Y,$)},onStdoutDataDone:$}},qI=async(Z,q,J)=>{try{let{value:Q,done:X}=await q.next();if(X)J.resolve();else Z.push(Q)}catch{}},tZ=async({subprocessStdout:Z,onStdoutDataDone:q,readable:J,subprocess:Q,subprocessStdin:X})=>{try{if(await iZ(Z),await Q,await lZ(X),await q,J.readable)J.push(null)}catch($){await lZ(X),GU(J,$)}},eZ=async({subprocessStdout:Z,subprocess:q,waitReadableDestroy:J},Q)=>{if(await m6(J,q))GU(Z,Q),await L7(q,Q)},GU=(Z,q)=>{_7(Z,Z.readable,q)};var Zq=B(()=>{p1();j1();U7();v6();B7();aZ()});import{Writable as JI}from"node:stream";import{callbackify as KU}from"node:util";var UU=({subprocess:Z,concurrentStreams:q},{to:J}={})=>{let{subprocessStdin:Q,waitWritableFinal:X,waitWritableDestroy:$}=qq(Z,J,q),Y=new JI({...Jq(Q,Z,X),destroy:KU(Xq.bind(void 0,{subprocessStdin:Q,subprocess:Z,waitWritableFinal:X,waitWritableDestroy:$})),highWaterMark:Q.writableHighWaterMark,objectMode:Q.writableObjectMode});return Qq(Q,Y),Y},qq=(Z,q,J)=>{let Q=L8(Z,q),X=c2(J,Q,"writableFinal"),$=c2(J,Q,"writableDestroy");return{subprocessStdin:Q,waitWritableFinal:X,waitWritableDestroy:$}},Jq=(Z,q,J)=>({write:QI.bind(void 0,Z),final:KU(XI.bind(void 0,Z,q,J))}),QI=(Z,q,J,Q)=>{if(Z.write(q,J))Q();else Z.once("drain",Q)},XI=async(Z,q,J)=>{if(await m6(J,q)){if(Z.writable)Z.end();await q}},Qq=async(Z,q,J)=>{try{if(await nZ(Z),q.writable)q.end()}catch(Q){await YU(J),WU(q,Q)}},Xq=async({subprocessStdin:Z,subprocess:q,waitWritableFinal:J,waitWritableDestroy:Q},X)=>{if(await m6(J,q),await m6(Q,q))WU(Z,X),await L7(q,X)},WU=(Z,q)=>{_7(Z,Z.writable,q)};var $q=B(()=>{j1();B7();aZ()});import{Duplex as $I}from"node:stream";import{callbackify as YI}from"node:util";var VU=({subprocess:Z,concurrentStreams:q,encoding:J},{from:Q,to:X,binary:$=!0,preserveNewlines:Y=!0}={})=>{let H=$||j0.has(J),{subprocessStdout:K,waitReadableDestroy:W}=oZ(Z,Q,q),{subprocessStdin:U,waitWritableFinal:V,waitWritableDestroy:L}=qq(Z,X,q),{readableEncoding:_,readableObjectMode:z,readableHighWaterMark:R}=sZ(K,H),{read:D,onStdoutDataDone:F}=rZ({subprocessStdout:K,subprocess:Z,binary:H,encoding:J,preserveNewlines:Y}),k=new $I({read:D,...Jq(U,Z,V),destroy:YI(HI.bind(void 0,{subprocessStdout:K,subprocessStdin:U,subprocess:Z,waitReadableDestroy:W,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:R,writableHighWaterMark:U.writableHighWaterMark,readableObjectMode:z,writableObjectMode:U.writableObjectMode,encoding:_});return tZ({subprocessStdout:K,onStdoutDataDone:F,readable:k,subprocess:Z,subprocessStdin:U}),Qq(U,k,K),k},HI=async({subprocessStdout:Z,subprocessStdin:q,subprocess:J,waitReadableDestroy:Q,waitWritableFinal:X,waitWritableDestroy:$},Y)=>{await Promise.all([eZ({subprocessStdout:Z,subprocess:J,waitReadableDestroy:Q},Y),Xq({subprocessStdin:q,subprocess:J,waitWritableFinal:X,waitWritableDestroy:$},Y)])};var BU=B(()=>{p1();Zq();$q()});var Yq=(Z,q,{from:J,binary:Q=!1,preserveNewlines:X=!1}={})=>{let $=Q||j0.has(q),Y=y6(Z,J),H=K7({subprocessStdout:Y,subprocess:Z,binary:$,shouldEncode:!0,encoding:q,preserveNewlines:X});return GI(H,Y,Z)},GI=async function*(Z,q,J){try{yield*Z}finally{if(q.readable)q.destroy();await J}};var LU=B(()=>{p1();j1();U7()});var _U=(Z,{encoding:q})=>{let J=XU();Z.readable=HU.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:q}),Z.writable=UU.bind(void 0,{subprocess:Z,concurrentStreams:J}),Z.duplex=VU.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:q}),Z.iterable=Yq.bind(void 0,Z,q),Z[Symbol.asyncIterator]=Yq.bind(void 0,Z,q,{})};var zU=B(()=>{B7();Zq();$q();BU();LU()});var RU=(Z,q)=>{for(let[J,Q]of UI){let X=Q.value.bind(q);Reflect.defineProperty(Z,J,{...Q,value:X})}},KI,UI;var MU=B(()=>{KI=(async()=>{})().constructor.prototype,UI=["then","catch","finally"].map((Z)=>[Z,Reflect.getOwnPropertyDescriptor(KI,Z)])});import{setMaxListeners as WI}from"node:events";import{spawn as VI}from"node:child_process";var FU=(Z,q,J,Q)=>{let{file:X,commandArguments:$,command:Y,escapedCommand:H,startTime:K,verboseInfo:W,options:U,fileDescriptors:V}=BI(Z,q,J),{subprocess:L,promise:_}=_I({file:X,commandArguments:$,options:U,startTime:K,verboseInfo:W,command:Y,escapedCommand:H,fileDescriptors:V});return L.pipe=G7.bind(void 0,{source:L,sourcePromise:_,boundOptions:{},createNested:Q}),RU(L,_),s0.set(L,{options:U,fileDescriptors:V}),L},BI=(Z,q,J)=>{let{command:Q,escapedCommand:X,startTime:$,verboseInfo:Y}=J8(Z,q,J),{file:H,commandArguments:K,options:W}=x8(Z,q,J),U=LI(W),V=KK(U,Y);return{file:H,commandArguments:K,command:Q,escapedCommand:X,startTime:$,verboseInfo:Y,options:U,fileDescriptors:V}},LI=({timeout:Z,signal:q,...J})=>{if(q!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...J,timeoutDuration:Z}},_I=({file:Z,commandArguments:q,options:J,startTime:Q,verboseInfo:X,command:$,escapedCommand:Y,fileDescriptors:H})=>{let K;try{K=VI(...E8(Z,q,J))}catch(z){return XK({error:z,command:$,escapedCommand:Y,fileDescriptors:H,options:J,startTime:Q,verboseInfo:X})}let W=new AbortController;WI(Number.POSITIVE_INFINITY,W.signal);let U=[...K.stdio];DK(K,H,W),NK(K,J,W);let V={},L=o0();K.kill=JY.bind(void 0,{kill:K.kill.bind(K),options:J,onInternalError:L,context:V,controller:W}),K.all=aK(K,J),_U(K,J),qK(K,J);let _=zI({subprocess:K,options:J,startTime:Q,verboseInfo:X,fileDescriptors:H,originalStreams:U,command:$,escapedCommand:Y,context:V,onInternalError:L,controller:W});return{subprocess:K,promise:_}},zI=async({subprocess:Z,options:q,startTime:J,verboseInfo:Q,fileDescriptors:X,originalStreams:$,command:Y,escapedCommand:H,context:K,onInternalError:W,controller:U})=>{let[V,[L,_],z,R,D]=await JU({subprocess:Z,options:q,context:K,verboseInfo:Q,fileDescriptors:X,originalStreams:$,onInternalError:W,controller:U});U.abort(),W.resolve();let F=z.map((O,T)=>W1(O,q,T)),k=W1(R,q,"all"),M=RI({errorInfo:V,exitCode:L,signal:_,stdio:F,all:k,ipcOutput:D,context:K,options:q,command:Y,escapedCommand:H,startTime:J});return h6(M,Q,q)},RI=({errorInfo:Z,exitCode:q,signal:J,stdio:Q,all:X,ipcOutput:$,context:Y,options:H,command:K,escapedCommand:W,startTime:U})=>("error"in Z)?b2({error:Z.error,command:K,escapedCommand:W,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof K1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:q,signal:J,stdio:Q,all:X,ipcOutput:$,options:H,startTime:U,isSync:!1}):p8({command:K,escapedCommand:W,stdio:Q,all:X,ipcOutput:$,options:H,startTime:U});var DU=B(()=>{m8();O3();n3();j1();i3();wZ();h2();d8();$K();UK();g2();AK();U8();PK();uK();cZ();QU();zU();v6();MU()});var z7=(Z,q)=>{let J=Object.fromEntries(Object.entries(q).map(([Q,X])=>[Q,MI(Q,Z[Q],X)]));return{...Z,...J}},MI=(Z,q,J)=>{if(FI.has(Z)&&e(q)&&e(J))return{...q,...J};return J},FI;var AU=B(()=>{X1();G1();FI=new Set(["env",...A3])});var w1=(Z,q,J,Q)=>{let X=(Y,H,K)=>w1(Y,H,J,K),$=(...Y)=>DI({mapArguments:Z,deepOptions:J,boundOptions:q,setBoundExeca:Q,createNested:X},...Y);if(Q!==void 0)Q($,X,q);return $},DI=({mapArguments:Z,deepOptions:q={},boundOptions:J={},setBoundExeca:Q,createNested:X},$,...Y)=>{if(e($))return X(Z,z7(J,$),Q);let{file:H,commandArguments:K,options:W,isSync:U}=AI({mapArguments:Z,firstArgument:$,nextArguments:Y,deepOptions:q,boundOptions:J});return U?iG(H,K,W):FU(H,K,W,X)},AI=({mapArguments:Z,firstArgument:q,nextArguments:J,deepOptions:Q,boundOptions:X})=>{let $=X9(q)?$9(q,J):[q,...J],[Y,H,K]=d4(...$),W=z7(z7(Q,X),K),{file:U=Y,commandArguments:V=H,options:L=W,isSync:_=!1}=Z({file:Y,commandArguments:H,options:W});return{file:U,commandArguments:V,options:L,isSync:_}};var TU=B(()=>{X1();z3();Y9();aG();DU();AU()});var jU=({file:Z,commandArguments:q})=>OU(Z,q),IU=({file:Z,commandArguments:q})=>({...OU(Z,q),isSync:!0}),OU=(Z,q)=>{if(q.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${Z} ${q}.`);let[J,...Q]=TI(Z);return{file:J,commandArguments:Q}},TI=(Z)=>{if(typeof Z!=="string")throw TypeError(`The command must be a string: ${String(Z)}.`);let q=Z.trim();if(q==="")return[];let J=[];for(let Q of q.split(jI)){let X=J.at(-1);if(X&&X.endsWith("\\"))J[J.length-1]=`${X.slice(0,-1)} ${Q}`;else J.push(Q)}return J},jI;var wU=B(()=>{jI=/ +/g});var kU=(Z,q,J)=>{Z.sync=q(II,J),Z.s=Z.sync},NU=({options:Z})=>PU(Z),II=({options:Z})=>({...PU(Z),isSync:!0}),PU=(Z)=>({options:{...OI(Z),...Z}}),OI=({input:Z,inputFile:q,stdio:J})=>Z===void 0&&q===void 0&&J===void 0?{stdin:"inherit"}:{},xU;var EU=B(()=>{xU={preferLocal:!0}});var Hq,N0,ec,Zl,ql,Jl,Ql,Xl,$l,Yl;var u6=B(()=>{TU();wU();p3();EU();wZ();Hq=w1(()=>({})),N0=w1(()=>({isSync:!0})),ec=w1(jU),Zl=w1(IU),ql=w1(mY),Jl=w1(NU,{},xU,kU),{sendMessage:Ql,getOneMessage:Xl,getEachMessage:$l,getCancelSignal:Yl}=JK()});async function wI(Z){if(process.platform==="win32"){let J=await Hq(`where.exe ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(J.exitCode!==0||!J.stdout)return null;return J.stdout.trim().split(/\r?\n/)[0]||null}let q=await Hq(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(q.exitCode!==0||!q.stdout)return null;return q.stdout.trim()}function kI(Z){if(process.platform==="win32")try{return z6(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return z6(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var Gq,vU,R7;var M7=B(()=>{u6();f5();Gq=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,vU=Gq?async(Z)=>Gq(Z):wI,R7=Gq??kI});function yU(Z,q){return{cmd:R7(Z)??Z,args:q}}var CU=B(()=>{M7()});import{dirname as NI,join as SU}from"path";async function p6(Z){try{return!!await vU(Z)}catch{return!1}}function yI(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function SI(){if(process.env.CURSOR_TRACE_ID)return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("cursor"))return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("windsurf"))return"windsurf";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("antigravity"))return"antigravity";let Z=process.env.__CFBundleIdentifier?.toLowerCase();if(Z?.includes("vscodium"))return"codium";if(Z?.includes("windsurf"))return"windsurf";if(Z?.includes("com.google.android.studio"))return"androidstudio";if(Z){for(let q of CI)if(Z.includes(q))return q}if(process.env.VisualStudioVersion)return"visualstudio";if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"){if(process.platform==="darwin")return"pycharm";return"pycharm"}if(process.env.TERM==="xterm-ghostty")return"ghostty";if(process.env.TERM?.includes("kitty"))return"kitty";if(process.env.TERM_PROGRAM)return process.env.TERM_PROGRAM;if(process.env.TMUX)return"tmux";if(process.env.STY)return"screen";if(process.env.KONSOLE_VERSION)return"konsole";if(process.env.GNOME_TERMINAL_SERVICE)return"gnome-terminal";if(process.env.XTERM_VERSION)return"xterm";if(process.env.VTE_VERSION)return"vte-based";if(process.env.TERMINATOR_UUID)return"terminator";if(process.env.KITTY_WINDOW_ID)return"kitty";if(process.env.ALACRITTY_LOG)return"alacritty";if(process.env.TILIX_ID)return"tilix";if(process.env.WT_SESSION)return"windows-terminal";if(process.env.SESSIONNAME&&process.env.TERM==="cygwin")return"cygwin";if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return"conemu";if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(fU())return"ssh-session";if(process.env.TERM){let q=process.env.TERM;if(q.includes("alacritty"))return"alacritty";if(q.includes("rxvt"))return"rxvt";if(q.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}function fU(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function Al(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return d6.platform}var L0,PI,xI,EI,gU,vI,CI,bI,d6;var Kq=B(()=>{v1();hU();s$();c0();CU();D0();M7();L0=d(()=>{let Z=bU(),q=G0(),J=SU(q,`config${Z}.json`);if(!N().existsSync(J)){let X=process.env.CLAUDIN_CONFIG_DIR?q:NI(q),$=SU(X,`.claudin${Z}.json`);if(N().existsSync($))return $}return J}),PI=d(async()=>{try{let{default:Z}=await import("./index-0.7.2-r0zwxc1g.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});xI=d(async()=>{let Z=[];if(await p6("npm"))Z.push("npm");if(await p6("yarn"))Z.push("yarn");if(await p6("pnpm"))Z.push("pnpm");return Z}),EI=d(async()=>{let Z=[];if(await p6("bun"))Z.push("bun");if(await p6("deno"))Z.push("deno");if(await p6("node"))Z.push("node");return Z}),gU=d(()=>{try{return N().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),vI=d(()=>{try{if(!gU())return!1;let{cmd:Z}=yU("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});CI=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];bI=d(()=>{if(Z0(process.env.CODESPACES))return"codespaces";if(process.env.GITPOD_WORKSPACE_ID)return"gitpod";if(process.env.REPL_ID||process.env.REPL_SLUG)return"replit";if(process.env.PROJECT_DOMAIN)return"glitch";if(Z0(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(Z0(process.env.RENDER))return"render";if(Z0(process.env.NETLIFY))return"netlify";if(process.env.DYNO)return"heroku";if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return"fly.io";if(Z0(process.env.CF_PAGES))return"cloudflare-pages";if(process.env.DENO_DEPLOYMENT_ID)return"deno-deploy";if(process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_FARGATE")return"aws-fargate";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_EC2")return"aws-ecs";try{if(N().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase().startsWith("ec2"))return"aws-ec2"}catch{}if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if(Z0(process.env.GITHUB_ACTIONS))return"github-actions";if(Z0(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(Z0(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(N().existsSync("/.dockerenv"))return"docker"}catch{}if(d6.platform==="darwin")return"unknown-darwin";if(d6.platform==="linux")return"unknown-linux";if(d6.platform==="win32")return"unknown-win32";return"unknown"});d6={hasInternetAccess:PI,isCI:Z0(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:SI(),isSSH:fU,getPackageManagers:xI,getRuntimes:EI,isRunningWithBun:d(o$),isWslEnvironment:gU,isNpmFromWindowsPath:vI,isConductor:yI,detectDeploymentEnvironment:bI}});var Il,Ol="∙",wl="✻",kl="↑",Nl="↓",Pl="↯",xl="○",El="◐",vl="●",yl="◎",Cl="◉",Sl="◍",bl="▶",mU="⏸",hl="↻",gl="◇",fl="◆",ml="※",ul="▎",pl,dl="·✔︎·",cl="×";var uU=B(()=>{Kq();Il=d6.platform==="darwin"?"⏺":"●",pl=["·|·","·/·","·—·","·\\·"]});var aI={};Uq(aI,{toExternalPermissionMode:()=>uI,permissionModeTitle:()=>dI,permissionModeSymbol:()=>nI,permissionModeShortTitle:()=>lI,permissionModeSchema:()=>gI,permissionModeFromString:()=>pI,isExternalPermissionMode:()=>mI,isDefaultMode:()=>cI,getModeColor:()=>iI,externalPermissionModeSchema:()=>fI,PERMISSION_MODES:()=>c6,EXTERNAL_PERMISSION_MODES:()=>Vq});function mI(Z){return Z!=="auto"}function l2(Z){return pU[Z]??pU.default}function uI(Z){return l2(Z).external}function pI(Z){return c6.includes(Z)?Z:"default"}function dI(Z){return l2(Z).title}function cI(Z){return Z==="default"||Z===void 0}function lI(Z){return l2(Z).shortTitle}function nI(Z){return l2(Z).symbol}function iI(Z){return l2(Z).color}var gI,fI,pU;var dU=B(()=>{n0();uU();hI();g1();gI=I(()=>Wq.enum(c6)),fI=I(()=>Wq.enum(Vq)),pU={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:mU,color:"planMode",external:"plan"},acceptEdits:{title:"Accept edits",shortTitle:"Accept",symbol:"⏵⏵",color:"autoAccept",external:"acceptEdits"},bypassPermissions:{title:"Bypass Permissions",shortTitle:"Bypass",symbol:"⏵⏵",color:"error",external:"bypassPermissions"},dontAsk:{title:"Don't Ask",shortTitle:"DontAsk",symbol:"⏵⏵",color:"error",external:"dontAsk"},...{auto:{title:"Auto mode",shortTitle:"Auto",symbol:"⏵⏵",color:"warning",external:"default"}}}});var cU=()=>{};var lU;var nU=B(()=>{cU();lU=["PreToolUse","PostToolUse","PostToolUseFailure","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","StopFailure","SubagentStart","SubagentStop","PreCompact","PostCompact","PermissionRequest","PermissionDenied","Setup","TeammateIdle","TaskCreated","TaskCompleted","Elicitation","ElicitationResult","ConfigChange","WorktreeCreate","WorktreeRemove","InstructionsLoaded","CwdChanged","FileChanged"]});var iU=()=>{};var aU=()=>{};var oU=B(()=>{nU();iU();aU()});var sU,Jn="bash";var rU=B(()=>{sU=["bash","powershell"]});function oI(){let Z=G.object({type:G.literal("command").describe("Shell command hook type"),command:G.string().describe("Shell command to execute"),if:F7(),shell:G.enum(sU).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:G.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:G.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:G.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.")}),q=G.object({type:G.literal("prompt").describe("LLM prompt hook type"),prompt:G.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:F7(),timeout:G.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:G.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-5"). If not specified, uses the default small fast model.'),statusMessage:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution")}),J=G.object({type:G.literal("http").describe("HTTP hook type"),url:G.string().url().describe("URL to POST the hook input JSON to"),if:F7(),timeout:G.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:G.record(G.string(),G.string()).optional().describe('Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., "Authorization": "Bearer $MY_TOKEN"). Only variables listed in allowedEnvVars will be interpolated.'),allowedEnvVars:G.array(G.string()).optional().describe("Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work."),statusMessage:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution")}),Q=G.object({type:G.literal("agent").describe("Agentic verifier hook type"),prompt:G.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:F7(),timeout:G.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:G.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-5"). If not specified, uses Haiku.'),statusMessage:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:q,HttpHookSchema:J,AgentHookSchema:Q}}var F7,tU,eU,s1;var D7=B(()=>{oU();n0();g1();rU();F7=I(()=>G.string().optional().describe('Permission rule syntax to filter when this hook runs (e.g., "Bash(git *)"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.'));tU=I(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:q,AgentHookSchema:J,HttpHookSchema:Q}=oI();return G.discriminatedUnion("type",[Z,q,J,Q])}),eU=I(()=>G.object({matcher:G.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:G.array(tU()).describe("List of hooks to execute when the matcher matches")})),s1=I(()=>G.partialRecord(G.enum(lU),G.array(eU())))});var Wn,Vn,sI,rI,ZW,tI,eI,ZO,qO,JO,QO,XO,A7,Bn;var qW=B(()=>{n0();g1();Wn=I(()=>G.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),Vn=I(()=>G.enum(["stdio","sse","sse-ide","http","ws","sdk"])),sI=I(()=>G.object({type:G.literal("stdio").optional(),command:G.string().min(1,"Command cannot be empty"),args:G.array(G.string()).default([]),env:G.record(G.string(),G.string()).optional()})),rI=I(()=>G.boolean()),ZW=I(()=>G.object({clientId:G.string().optional(),callbackPort:G.number().int().positive().optional(),authServerMetadataUrl:G.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional(),xaa:rI().optional()})),tI=I(()=>G.object({type:G.literal("sse"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional(),oauth:ZW().optional()})),eI=I(()=>G.object({type:G.literal("sse-ide"),url:G.string(),ideName:G.string(),ideRunningInWindows:G.boolean().optional()})),ZO=I(()=>G.object({type:G.literal("ws-ide"),url:G.string(),ideName:G.string(),authToken:G.string().optional(),ideRunningInWindows:G.boolean().optional()})),qO=I(()=>G.object({type:G.literal("http"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional(),oauth:ZW().optional()})),JO=I(()=>G.object({type:G.literal("ws"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional()})),QO=I(()=>G.object({type:G.literal("sdk"),name:G.string()})),XO=I(()=>G.object({type:G.literal("claudeai-proxy"),url:G.string(),id:G.string()})),A7=I(()=>G.union([sI(),tI(),eI(),ZO(),qO(),JO(),QO(),XO()])),Bn=I(()=>G.object({mcpServers:G.record(G.string(),A7())}))});function Fn(Z,q){let J=Z.toLowerCase();return q.autoUpdate??(I7.has(J)&&!$O.has(J))}function GO(Z){if(I7.has(Z.toLowerCase()))return!1;if(HO.test(Z))return!0;return YO.test(Z)}function Dn(Z,q){let J=Z.toLowerCase();if(!I7.has(J))return null;if(q.source==="github"){if(!(q.repo||"").toLowerCase().startsWith(`${T7}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${T7}/' can use this name.`;return null}if(q.source==="git"&&q.url){let Q=q.url.toLowerCase(),X=Q.includes("github.com/anthropics/"),$=Q.includes("git@github.com:anthropics/");if(X||$)return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${T7}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${T7}' organization.`}function Tn(Z){return typeof Z==="string"&&Z.startsWith("./")}function jn(Z){return Z.source==="file"||Z.source==="directory"}var I7,$O,YO,HO,T7="anthropics",V1,l6,JW,Lq,_q,$W,zq,KO,An,UO,WO,VO,BO,LO,_O,QW,zO,RO,YW,MO,FO,XW,DO,HW,AO,TO,n2,Bq,GW,jO,IO,In,j7,OO,wO,On,kO,NO,PO,xO,EO,wn,vO,kn;var KW=B(()=>{n0();D7();qW();g1();I7=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),$O=new Set(["knowledge-work-plugins"]);YO=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,HO=/[^\u0020-\u007E]/;V1=I(()=>G.string().startsWith("./")),l6=I(()=>V1().endsWith(".json")),JW=I(()=>G.union([V1().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB file path must end with .mcpb or .dxt"}).describe("Path to MCPB file relative to plugin root"),G.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),Lq=I(()=>V1().endsWith(".md")),_q=I(()=>G.union([Lq(),V1()])),$W=I(()=>G.string().min(1,"Marketplace must have a name").refine((Z)=>!Z.includes(" "),{message:'Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")'}).refine((Z)=>!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("..")&&Z!==".",{message:'Marketplace name cannot contain path separators (/ or \\), ".." sequences, or be "."'}).refine((Z)=>!GO(Z),{message:"Marketplace name impersonates an official Anthropic/Claude marketplace"}).refine((Z)=>Z.toLowerCase()!=="inline",{message:'Marketplace name "inline" is reserved for --plugin-dir session plugins'}).refine((Z)=>Z.toLowerCase()!=="builtin",{message:'Marketplace name "builtin" is reserved for built-in plugins'})),zq=I(()=>G.object({name:G.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:G.string().optional().describe("Contact email for support or feedback"),url:G.string().optional().describe("Website, GitHub profile, or organization URL")})),KO=I(()=>G.object({name:G.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier for the plugin, used for namespacing (prefer kebab-case)"),version:G.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:G.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:zq().optional().describe("Information about the plugin creator or maintainer"),homepage:G.string().url().optional().describe("Plugin homepage or documentation URL"),repository:G.string().optional().describe("Source code repository URL"),license:G.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:G.array(G.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:G.array(wO()).optional().describe(`Plugins that must be enabled for this plugin to function. Bare names (no "@marketplace") are resolved against the declaring plugin's own marketplace.`)})),An=I(()=>G.object({description:G.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:G.lazy(()=>s1()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),UO=I(()=>G.object({hooks:G.union([l6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),G.lazy(()=>s1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),G.array(G.union([l6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),G.lazy(()=>s1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),WO=I(()=>G.object({source:_q().optional().describe("Path to command markdown file, relative to plugin root"),content:G.string().optional().describe("Inline markdown content for the command"),description:G.string().optional().describe("Command description override"),argumentHint:G.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:G.string().optional().describe("Default model for this command"),allowedTools:G.array(G.string()).optional().describe("Tools allowed when command runs")}).refine((Z)=>Z.source&&!Z.content||!Z.source&&Z.content,{message:'Command must have either "source" (file path) or "content" (inline markdown), but not both'})),VO=I(()=>G.object({commands:G.union([_q().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root"),G.array(_q().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional command files or skill directories"),G.record(G.string(),WO()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),BO=I(()=>G.object({agents:G.union([Lq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),G.array(Lq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional agent files")])})),LO=I(()=>G.object({skills:G.union([V1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),G.array(V1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional skill directories")])})),_O=I(()=>G.object({outputStyles:G.union([V1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root"),G.array(V1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional output styles directories or files")])})),QW=I(()=>G.string().min(1)),zO=I(()=>G.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),RO=I(()=>G.object({mcpServers:G.union([l6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),JW().describe("Path or URL to MCPB file containing MCP server configuration"),G.record(G.string(),A7()).describe("MCP server configurations keyed by server name"),G.array(G.union([l6().describe("Path to MCP servers configuration file"),JW().describe("Path or URL to MCPB file"),G.record(G.string(),A7()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),YW=I(()=>G.object({type:G.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:G.string().describe("Human-readable label shown in the config dialog"),description:G.string().describe("Help text shown beneath the field in the config dialog"),required:G.boolean().optional().describe("If true, validation fails when this field is empty"),default:G.union([G.string(),G.number(),G.boolean(),G.array(G.string())]).optional().describe("Default value used when the user provides nothing"),multiple:G.boolean().optional().describe("For string type: allow an array of strings"),sensitive:G.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:G.number().optional().describe("Minimum value (number type only)"),max:G.number().optional().describe("Maximum value (number type only)")}).strict()),MO=I(()=>G.object({userConfig:G.record(G.string().regex(/^[A-Za-z_]\w*$/,"Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDE_PLUGIN_OPTION_<KEY> env vars in hooks"),YW()).optional().describe("User-configurable values this plugin needs. Prompted at enable time. Non-sensitive values saved to settings.json; sensitive values to secure storage (macOS keychain or .credentials.json). Available as ${user_config.KEY} in MCP/LSP server config, hook commands, and (non-sensitive only) skill/agent content. "+"Note: sensitive values share a single keychain entry with OAuth tokens — keep "+"secret counts small to stay under the ~2KB stdin-safe limit (see INC-3028).")})),FO=I(()=>G.object({channels:G.array(G.object({server:G.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:G.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:G.record(G.string(),YW()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")}).strict()).describe("Channels this plugin provides. Each entry declares an MCP server as a message channel and optionally specifies user configuration to prompt for at enable time.")})),XW=I(()=>G.strictObject({command:G.string().min(1).refine((Z)=>{if(Z.includes(" ")&&!Z.startsWith("/"))return!1;return!0},{message:"Command should not contain spaces. Use args array for arguments."}).describe('Command to execute the LSP server (e.g., "typescript-language-server")'),args:G.array(QW()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:G.record(zO(),QW()).refine((Z)=>Object.keys(Z).length>0,{message:"extensionToLanguage must have at least one mapping"}).describe("Mapping from file extension to LSP language ID. File extensions and languages are derived from this mapping."),transport:G.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:G.record(G.string(),G.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:G.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:G.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:G.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:G.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:G.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:G.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:G.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),DO=I(()=>G.object({lspServers:G.union([l6().describe("Path to .lsp.json configuration file relative to plugin root"),G.record(G.string(),XW()).describe("LSP server configurations keyed by server name"),G.array(G.union([l6().describe("Path to LSP configuration file"),G.record(G.string(),XW()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),HW=I(()=>G.string().refine((Z)=>!Z.includes("..")&&!Z.includes("//"),"Package name cannot contain path traversal patterns").refine((Z)=>{let q=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,J=/^[a-z0-9][a-z0-9-._]*$/;return q.test(Z)||J.test(Z)},"Invalid npm package name format")),AO=I(()=>G.object({settings:G.record(G.string(),G.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),TO=I(()=>G.object({...KO().shape,...UO().partial().shape,...VO().partial().shape,...BO().partial().shape,...LO().partial().shape,..._O().partial().shape,...FO().partial().shape,...RO().partial().shape,...DO().partial().shape,...AO().partial().shape,...MO().partial().shape})),n2=I(()=>G.discriminatedUnion("source",[G.object({source:G.literal("url"),url:G.string().url().describe("Direct URL to marketplace.json file"),headers:G.record(G.string(),G.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),G.object({source:G.literal("github"),repo:G.string().describe("GitHub repository in owner/repo format"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:G.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:G.array(G.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),G.object({source:G.literal("git"),url:G.string().describe("Full git repository URL"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:G.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:G.array(G.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),G.object({source:G.literal("npm"),package:HW().describe("NPM package containing marketplace.json")}),G.object({source:G.literal("file"),path:G.string().describe("Local file path to marketplace.json")}),G.object({source:G.literal("directory"),path:G.string().describe("Local directory containing .claude-plugin/marketplace.json")}),G.object({source:G.literal("hostPattern"),hostPattern:G.string().describe('Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against "github.com". For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\\.mycompany\\.com$").')}),G.object({source:G.literal("pathPattern"),pathPattern:G.string().describe('Regex pattern matched against the .path field of file and directory sources. Use in strictKnownMarketplaces to allow filesystem-based marketplaces alongside hostPattern restrictions for network sources. Use ".*" to allow all filesystem paths, or a narrower pattern (e.g., "^/opt/approved/") to restrict to specific directories.')}),G.object({source:G.literal("settings"),name:$W().refine((Z)=>!I7.has(Z.toLowerCase()),{message:"Reserved official marketplace names cannot be used with settings sources. validateOfficialNameSource only accepts github/git sources from anthropics/* for these names; a settings source would be rejected after loadAndCacheMarketplace has already written to disk with cleanupNeeded=false."}).describe("Marketplace name. Must match the extraKnownMarketplaces key (enforced); the synthetic manifest is written under this name. Same validation "+"as PluginMarketplaceSchema plus reserved-name rejection — "+"validateOfficialNameSource runs after the disk write, too late to clean up."),plugins:G.array(jO()).describe("Plugin entries declared inline in settings.json"),owner:zq().optional()}).describe("Inline marketplace manifest defined directly in settings.json. The reconciler writes a synthetic marketplace.json to the cache; diffMarketplaces detects edits via isEqual on the stored source (the plugins array is inside this object, so edits surface as sourceChanged).")])),Bq=I(()=>G.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),GW=I(()=>G.union([V1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),G.object({source:G.literal("npm"),package:HW().or(G.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:G.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:G.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),G.object({source:G.literal("pip"),package:G.string().describe("Python package name as it appears on PyPI"),version:G.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:G.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),G.object({source:G.literal("url"),url:G.string().describe("Full git repository URL (https:// or git@)"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Bq().optional().describe("Specific commit SHA to use")}),G.object({source:G.literal("github"),repo:G.string().describe("GitHub repository in owner/repo format"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Bq().optional().describe("Specific commit SHA to use")}),G.object({source:G.literal("git-subdir"),url:G.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:G.string().min(1).describe('Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.'),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Bq().optional().describe("Specific commit SHA to use")}).describe("Plugin located in a subdirectory of a larger repository (monorepo). Only the specified subdirectory is materialized; the rest of the repo is not downloaded.")])),jO=I(()=>G.object({name:G.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Plugin name as it appears in the target repository"),source:GW().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against."),description:G.string().optional(),version:G.string().optional(),strict:G.boolean().optional()}).refine((Z)=>typeof Z.source!=="string",{message:'Plugins in a settings-sourced marketplace must use remote sources (github, git-subdir, npm, url, pip). Relative-path sources like "./foo" have no marketplace repository to resolve against.'}));IO=I(()=>TO().partial().extend({name:G.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier matching the plugin name"),source:GW().describe("Where to fetch the plugin from"),category:G.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:G.array(G.string()).optional().describe("Tags for searchability and discovery"),strict:G.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),In=I(()=>G.object({name:$W(),owner:zq().describe("Marketplace maintainer or curator information"),plugins:G.array(IO()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:G.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:G.object({pluginRoot:G.string().optional().describe("Base path for relative plugin sources"),version:G.string().optional().describe("Marketplace version"),description:G.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:G.array(G.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")})),j7=I(()=>G.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),OO=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,wO=I(()=>G.union([G.string().regex(OO,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),G.object({name:G.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:G.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),On=I(()=>G.union([j7(),G.object({id:j7().describe('Plugin identifier (e.g., "formatter@tools")'),version:G.string().optional().describe('Version constraint (e.g., "^2.0.0")'),required:G.boolean().optional().describe("If true, cannot be disabled"),config:G.record(G.string(),G.unknown()).optional().describe("Plugin-specific configuration")})])),kO=I(()=>G.object({version:G.string().describe("Currently installed version"),installedAt:G.string().describe("ISO 8601 timestamp of installation"),lastUpdated:G.string().optional().describe("ISO 8601 timestamp of last update"),installPath:G.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:G.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),NO=I(()=>G.object({version:G.literal(1).describe("Schema version 1"),plugins:G.record(j7(),kO()).describe("Map of plugin IDs to their installation metadata")})),PO=I(()=>G.enum(["managed","user","project","local"])),xO=I(()=>G.object({scope:PO().describe("Installation scope"),projectPath:G.string().optional().describe("Project path (required for project/local scopes)"),installPath:G.string().describe("Absolute path to the versioned plugin directory"),version:G.string().optional().describe("Currently installed version"),installedAt:G.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:G.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:G.string().optional().describe("Git commit SHA for git-based plugins")})),EO=I(()=>G.object({version:G.literal(2).describe("Schema version 2"),plugins:G.record(j7(),G.array(xO())).describe("Map of plugin IDs to arrays of installation entries")})),wn=I(()=>G.union([NO(),EO()])),vO=I(()=>G.object({source:n2().describe("Where to fetch the marketplace from"),installLocation:G.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:G.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:G.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),kn=I(()=>G.record(G.string(),vO()))});function Pn(Z){return Z.startsWith("claude.ai ")}function O7(Z){let q=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))q=q.replace(/_+/g,"_").replace(/^_|_$/g,"");return q}var UW=()=>{};function WW(Z){let q=Z.split("__"),[J,Q,...X]=q;if(J!=="mcp"||!Q)return null;let $=X.length>0?X.join("__"):void 0;return{serverName:Q,toolName:$}}function yO(Z){return`mcp__${O7(Z)}__`}function CO(Z,q){return`${yO(Z)}${O7(q)}`}function vn(Z){return Z.mcpInfo?CO(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function yn(Z,q){let J=`mcp__${O7(q)}__`;return Z.replace(J,"")}function Cn(Z){let q=Z.replace(/\s*\(MCP\)\s*$/,"");q=q.trim();let J=q.indexOf(" - ");if(J!==-1)return q.substring(J+3).trim();return q}var VW=B(()=>{UW()});var BW="Agent",bn="Task",hn;var LW=B(()=>{hn=new Set(["Explore","Plan","WebResearcher","WebResearcherManager"])});var Rq="TaskOutput";var _W=()=>{};var zW="TaskStop",mn=`
77
+ - Stops a running background task by its ID
78
+ - Takes a task_id parameter identifying the task to stop
79
+ - Returns a success or failure status
80
+ - Use this tool when you need to terminate a long-running task
81
+ `;var RW=()=>{};function n6(Z){return MW[Z]??Z}function ln(Z){let q=[];for(let[J,Q]of Object.entries(MW))if(Q===Z)q.push(J);return q}function SO(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function bO(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function FW(Z){let q=hO(Z,"(");if(q===-1)return{toolName:n6(Z)};let J=gO(Z,")");if(J===-1||J<=q)return{toolName:n6(Z)};if(J!==Z.length-1)return{toolName:n6(Z)};let Q=Z.substring(0,q),X=Z.substring(q+1,J);if(!Q)return{toolName:n6(Z)};if(X===""||X==="*")return{toolName:n6(Q)};let $=bO(X);return{toolName:n6(Q),ruleContent:$}}function nn(Z){if(!Z.ruleContent)return Z.toolName;let q=SO(Z.ruleContent);return`${Z.toolName}(${q})`}function hO(Z,q){for(let J=0;J<Z.length;J++)if(Z[J]===q){let Q=0,X=J-1;while(X>=0&&Z[X]==="\\")Q++,X--;if(Q%2===0)return J}return-1}function gO(Z,q){for(let J=Z.length-1;J>=0;J--)if(Z[J]===q){let Q=0,X=J-1;while(X>=0&&Z[X]==="\\")Q++,X--;if(Q%2===0)return J}return-1}var MW;var DW=B(()=>{LW();_W();RW();MW={Task:BW,KillShell:zW,AgentOutputTool:Rq,BashOutputTool:Rq,...{}}});function on(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function AW(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function TW(Z,q,J=q+"s"){return Z===1?q:J}function sn(Z){let q=Z.indexOf(`
82
+ `);return q===-1?Z:Z.slice(0,q)}function rn(Z,q,J=0){let Q=0,X=Z.indexOf(q,J);while(X!==-1)Q++,X=Z.indexOf(q,X+1);return Q}function tn(Z){return Z.replace(/[0-9]/g,(q)=>String.fromCharCode(q.charCodeAt(0)-65248))}function en(Z){return Z.replace(/\u3000/g," ")}function Zi(Z,q=",",J=jW){let X="";for(let $ of Z){let Y=X?q:"",H=Y+$;if(X.length+H.length<=J)X+=H;else{let K=J-X.length-Y.length-14;if(K>0)X+=Y+$.slice(0,K)+"...[truncated]";else X+="...[truncated]";return X}}return X}class fO{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=jW){this.maxSize=Z}append(Z){let q=typeof Z==="string"?Z:Z.toString();if(this.totalBytesReceived+=q.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+q.length>this.maxSize){let J=this.maxSize-this.content.length;if(J>0)this.content+=q.slice(0,J);this.isTruncated=!0}else this.content+=q}toString(){if(!this.isTruncated)return this.content;let Z=this.totalBytesReceived-this.maxSize,q=Math.round(Z/1024);return this.content+`
83
+ ... [output truncated - ${q}KB removed]`}clear(){this.content="",this.isTruncated=!1,this.totalBytesReceived=0}get length(){return this.content.length}get truncated(){return this.isTruncated}get totalBytes(){return this.totalBytesReceived}}function qi(Z,q){let J=Z.split(`
84
+ `);if(J.length<=q)return Z;return J.slice(0,q).join(`
85
+ `)+"…"}var jW=33554432;var Mq=()=>{};function IW(Z){return Fq.filePatternTools.includes(Z)}function OW(Z){return Fq.bashPrefixTools.includes(Z)}function wW(Z){return Fq.customValidation[Z]}var Fq;var kW=B(()=>{Fq={filePatternTools:["Read","Write","Edit","Glob","NotebookRead","NotebookEdit"],bashPrefixTools:["Bash"],customValidation:{WebSearch:(Z)=>{if(Z.includes("*")||Z.includes("?"))return{valid:!1,error:"WebSearch does not support wildcards",suggestion:"Use exact search terms without * or ?",examples:["WebSearch(claude ai)","WebSearch(typescript tutorial)"]};return{valid:!0}},WebFetch:(Z)=>{if(Z.includes("://")||Z.startsWith("http"))return{valid:!1,error:"WebFetch permissions use domain format, not URLs",suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:github.com)"]};if(!Z.startsWith("domain:"))return{valid:!1,error:'WebFetch permissions must use "domain:" prefix',suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:*.google.com)"]};return{valid:!0}}}}});function NW(Z,q){let J=0,Q=q-1;while(Q>=0&&Z[Q]==="\\")J++,Q--;return J%2!==0}function Dq(Z,q){let J=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===q&&!NW(Z,Q))J++;return J}function mO(Z){for(let q=0;q<Z.length-1;q++)if(Z[q]==="("&&Z[q+1]===")"){if(!NW(Z,q))return!0}return!1}function Aq(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let q=Dq(Z,"("),J=Dq(Z,")");if(q!==J)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(mO(Z)){let Y=Z.substring(0,Z.indexOf("("));if(!Y)return{valid:!1,error:"Empty parentheses with no tool name",suggestion:"Specify a tool name before the parentheses"};return{valid:!1,error:"Empty parentheses",suggestion:`Either specify a pattern or use just "${Y}" without parentheses`,examples:[`${Y}`,`${Y}(some-pattern)`]}}let Q=FW(Z),X=WW(Q.toolName);if(X){if(Q.ruleContent!==void 0||Dq(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${Q.toolName}" without parentheses, or use "mcp__${X.serverName}__*" for all tools`,examples:[`mcp__${X.serverName}`,`mcp__${X.serverName}__*`,X.toolName&&X.toolName!=="*"?`mcp__${X.serverName}__${X.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!Q.toolName||Q.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(Q.toolName[0]!==Q.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${AW(String(Q.toolName))}"`};let $=wW(Q.toolName);if($&&Q.ruleContent!==void 0){let Y=$(Q.ruleContent);if(!Y.valid)return Y}if(OW(Q.toolName)&&Q.ruleContent!==void 0){let Y=Q.ruleContent;if(Y.includes(":*")&&!Y.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(Y===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if(IW(Q.toolName)&&Q.ruleContent!==void 0){let Y=Q.ruleContent;if(Y.includes(":*"))return{valid:!1,error:'The ":*" syntax is only for Bash prefix rules',suggestion:'Use glob patterns like "*" or "**" for file matching',examples:[`${Q.toolName}(*.ts) - matches .ts files`,`${Q.toolName}(src/**) - matches all files in src`,`${Q.toolName}(**/*.test.ts) - matches test files`]};if(Y.includes("*")&&!Y.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!Y.includes("**"))return{valid:!1,error:"Wildcard placement might be incorrect",suggestion:"Wildcards are typically used at path boundaries",examples:[`${Q.toolName}(*.js) - all .js files`,`${Q.toolName}(src/*) - all files directly in src`,`${Q.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var w7;var Tq=B(()=>{n0();VW();g1();DW();Mq();kW();w7=I(()=>G.string().superRefine((Z,q)=>{let J=Aq(Z);if(!J.valid){let Q=J.error;if(J.suggestion)Q+=`. ${J.suggestion}`;if(J.examples&&J.examples.length>0)Q+=`. Examples: ${J.examples.join(", ")}`;q.addIssue({code:G.ZodIssueCode.custom,message:Q,params:{received:Z}})}}))});function Vi(Z){if(!Z||typeof Z!=="object")return null;let q=jq.safeParse(Z);if(!q.success)return null;if(!q.data.enabled)return null;return q.data}var jq;var PW=B(()=>{n0();jq=G.object({enabled:G.boolean().describe("Whether auto-fix is enabled"),lint:G.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:G.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:G.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:G.number().int().min(1000).max(300000).default(30000).describe("Timeout in ms for each lint/test command (default: 30000)")}).refine((Z)=>!Z.enabled||Z.lint!==void 0||Z.test!==void 0,{message:'At least one of "lint" or "test" must be set when enabled'})});function wi(Z){return"serverName"in Z&&Z.serverName!==void 0}function ki(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function Ni(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var uO,pO,dO,cO,lO,xW,P0;var i2=B(()=>{n0();a$();c0();g1();dU();KW();B3();Tq();D7();D7();PW();Z3();uO=I(()=>G.record(G.string(),G.coerce.string())),pO=I(()=>G.object({allow:G.array(w7()).optional().describe("List of permission rules for allowed operations"),deny:G.array(w7()).optional().describe("List of permission rules for denied operations"),ask:G.array(w7()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:G.enum(c6).optional().describe("Default permission mode when Claude Code needs access"),disableBypassPermissionsMode:G.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:G.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:G.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:G.array(G.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),dO=I(()=>G.object({source:n2().describe("Where to fetch the marketplace from"),installLocation:G.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:G.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),cO=I(()=>G.object({serverName:G.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that users are allowed to configure"),serverCommand:G.array(G.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for allowed stdio servers"),serverUrl:G.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return e5([Z.serverName!==void 0,Z.serverCommand!==void 0,Z.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),lO=I(()=>G.object({serverName:G.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that is explicitly blocked"),serverCommand:G.array(G.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for blocked stdio servers"),serverUrl:G.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return e5([Z.serverName!==void 0,Z.serverCommand!==void 0,Z.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),xW=["skills","agents","hooks","mcp"],P0=I(()=>G.object({$schema:G.literal(c$).optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:G.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:G.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:G.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:G.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),...Z0(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:G.object({issuer:G.string().url().describe("IdP issuer URL for OIDC discovery"),clientId:G.string().describe("Claude Code's client_id registered at the IdP"),callbackPort:G.number().int().positive().optional().describe("Fixed loopback callback port for the IdP OIDC login. Only needed if the IdP does not honor RFC 8252 port-any matching.")}).optional().describe("XAA (SEP-990) IdP connection. Configure once; all XAA-enabled MCP servers reuse this.")}:{},fileSuggestion:G.object({type:G.literal("command"),command:G.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:G.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:G.number().nonnegative().int().optional().describe("Number of days to retain chat transcripts (default: 30). Setting to 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."),env:uO().optional().describe("Environment variables to set for Claude Code sessions"),attribution:G.object({commit:G.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:G.string().optional().describe("Attribution text for pull request descriptions. Empty string hides attribution.")}).optional().describe("Customize attribution text for commits and PRs. Each field defaults to the standard Claude Code attribution if not set."),includeGitInstructions:G.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:pO().optional().describe("Tool usage permissions configuration"),model:G.string().optional().describe("Override the default model used by Claude Code"),availableModels:G.array(G.string()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'),modelOverrides:G.record(G.string(),G.string()).optional().describe('Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.'),enableAllProjectMcpServers:G.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:G.array(G.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:G.array(G.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:G.array(cO()).optional().describe("Enterprise allowlist of MCP servers that can be used. Applies to all scopes including enterprise servers from managed-mcp.json. If undefined, all servers are allowed. If empty array, no servers are allowed. Denylist takes precedence - if a server is on both lists, it is denied."),deniedMcpServers:G.array(lO()).optional().describe("Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied."),hooks:s1().optional().describe("Custom commands to run before/after tool executions"),autoFix:jq.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:G.object({symlinkDirectories:G.array(G.string()).optional().describe('Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"'),sparsePaths:G.array(G.string()).optional().describe("Directories to include when creating worktrees, via git sparse-checkout (cone mode). "+"Dramatically faster in large monorepos — only the listed paths are written to disk."),baseRef:G.enum(["fresh","head"]).optional().describe('Base ref for new worktrees. "fresh" (default) branches from origin/<default-branch>; "head" branches from the current local HEAD.')}).optional().describe("Git worktree configuration for --worktree flag."),lsp:G.object({enabled:G.boolean().optional(),diagnosticsTimeoutMs:G.number().min(100).max(5000).optional().describe("Per-edit diagnostic injection timeout in ms (default 1500, min 100, max 5000). After FileEdit/FileWrite, Claudin waits up to this duration for the LSP server to publish diagnostics so they can be attached to the same turn.")}).optional().describe("LSP subsystem configuration. Set enabled:false to disable the entire LSP subsystem (default: true). Set diagnosticsTimeoutMs to tune per-edit diagnostic injection (default 1500). LSP servers themselves are provided exclusively by enabled plugins (.lsp.json)."),disableAllHooks:G.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:G.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:G.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:G.array(G.string()).optional().describe('Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).'),httpHookAllowedEnvVars:G.array(G.string()).optional().describe("Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers)."),allowManagedPermissionRulesOnly:G.boolean().optional().describe("When true (and set in managed settings), only permission rules (allow/deny/ask) from managed settings are respected. User, project, local, and CLI argument permission rules are ignored."),allowManagedMcpServersOnly:G.boolean().optional().describe("When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies."),strictPluginOnlyCustomization:G.preprocess((Z)=>Array.isArray(Z)?Z.filter((q)=>xW.includes(q)):Z,G.union([G.boolean(),G.array(G.enum(xW))])).optional().catch(void 0).describe('When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. '+"Composes with strictKnownMarketplaces for end-to-end admin control — plugins gated by "+"marketplace allowlist, everything else blocked here."),statusLine:G.object({type:G.literal("command"),command:G.string(),padding:G.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:G.record(G.string(),G.union([G.array(G.string()),G.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:G.record(G.string(),dO()).check((Z)=>{for(let[q,J]of Object.entries(Z.value))if(J.source.source==="settings"&&J.source.name!==q)Z.issues.push({code:"custom",input:J.source.name,path:[q,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${q}" but source.name "${J.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claudin/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:G.array(n2()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. "+"Note: this is a policy gate only — it does NOT register marketplaces. "+"To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),blockedMarketplaces:G.array(n2()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem."),forceLoginMethod:G.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:G.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:G.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:G.string().optional().describe("Controls the output style for assistant responses"),language:G.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:G.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:i$().optional(),feedbackSurveyRate:G.number().min(0).max(1).optional().describe("Probability (0–1) that the session quality survey appears when eligible. 0.05 is a reasonable starting point."),spinnerTipsEnabled:G.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:G.object({mode:G.enum(["append","replace"]),verbs:G.array(G.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:G.object({excludeDefault:G.boolean().optional(),tips:G.array(G.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:G.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:G.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:G.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:G.enum(["low","medium","high","xhigh","max","adaptive"]).optional().catch(void 0).describe("Persisted effort level for supported models. 'adaptive' sends no effort field so the model scales per request."),codingLoopXhighDefault:G.boolean().optional().catch(void 0).describe("When true, defaults effort to xhigh for Opus 4.8 (coding/high-autonomy loops). Overrides the medium default for Pro/Max/Team and ultrathink. Opus 4.8 only; other models are unaffected. Defaults to false."),advisorModel:G.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:G.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:G.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:G.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:G.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:G.string().optional().describe("Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model."),companyAnnouncements:G.array(G.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:G.record(G.string(),G.object({mcpServers:G.record(G.string(),G.record(G.string(),G.union([G.string(),G.number(),G.boolean(),G.array(G.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:G.record(G.string(),G.union([G.string(),G.number(),G.boolean(),G.array(G.string())])).optional().describe("Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.")})).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"),remote:G.object({defaultEnvironmentId:G.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:G.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),...{},minimumVersion:G.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:G.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"),...{},...{},...{},channelsEnabled:G.boolean().optional().describe("Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels."),allowedChannelPlugins:G.array(G.object({marketplace:G.string(),plugin:G.string()})).optional().describe("Teams/Enterprise allowlist of channel plugins. When set, "+"replaces the default Anthropic allowlist — admins decide which "+"plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true."),...{},prefersReducedMotion:G.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:G.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:G.string().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."),autoDreamEnabled:G.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:G.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:G.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:G.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:G.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:G.object({allow:G.array(G.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:G.array(G.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:G.array(G.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:G.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:G.array(G.object({id:G.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:G.string().describe("Display name for the SSH connection"),sshHost:G.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:G.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:G.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:G.string().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.")})).optional().describe("SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members."),claudeMdExcludes:G.array(G.string()).optional().describe('Glob patterns or absolute paths of AGENTS.md/CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/AGENTS.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'),pluginTrustMessage:G.string().optional().describe('Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").')}).passthrough())});function Iq(){let Z=EW(P0(),{unrepresentable:"any"});return m(Z,null,2)}var vW=B(()=>{n0();z0();i2()});function yW(Z){let q=nO.find((Q)=>Q.matches(Z));if(!q)return null;let J={...q.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!J.suggestion)J.suggestion=`Valid values: ${Z.enumValues.map((Q)=>`"${Q}"`).join(", ")}`;if(!J.docLink&&Z.path){let Q=Z.path.split(".")[0];if(Q)J.docLink=iO[Q]}return J}var nO,iO;var CW=B(()=>{nO=[{matches:(Z)=>Z.path==="permissions.defaultMode"&&Z.code==="invalid_value",tip:{suggestion:'Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)'}},{matches:(Z)=>Z.path==="apiKeyHelper"&&Z.code==="invalid_type",tip:{suggestion:'Provide a shell command that outputs your API key to stdout. The script should output only the API key. Example: "/bin/generate_temp_api_key.sh"'}},{matches:(Z)=>Z.path==="cleanupPeriodDays"&&Z.code==="too_small"&&Z.expected==="0",tip:{suggestion:"Must be 0 or greater. Set a positive number for days to retain transcripts (default is 30). Setting 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."}},{matches:(Z)=>Z.path.startsWith("env.")&&Z.code==="invalid_type",tip:{suggestion:'Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"'}},{matches:(Z)=>(Z.path==="permissions.allow"||Z.path==="permissions.deny")&&Z.code==="invalid_type"&&Z.expected==="array",tip:{suggestion:'Permission rules must be in an array. Format: ["Tool(specifier)"]. Examples: ["Bash(npm run build)", "Edit(docs/**)", "Read(~/.zshrc)"]. Use * for wildcards.'}},{matches:(Z)=>Z.path.includes("hooks")&&Z.code==="invalid_type",tip:{suggestion:'Hooks use a matcher + hooks array. The matcher is a string: a tool name ("Bash"), pipe-separated list ("Edit|Write"), or empty to match all. Example: {"PostToolUse": [{"matcher": "Edit|Write", "hooks": [{"type": "command", "command": "echo Done"}]}]}'}},{matches:(Z)=>Z.code==="invalid_type"&&Z.expected==="boolean",tip:{suggestion:'Use true or false without quotes. Example: "includeGitInstructions": true'}},{matches:(Z)=>Z.code==="unrecognized_keys",tip:{suggestion:"Check for typos or refer to the documentation for valid fields"}},{matches:(Z)=>Z.code==="invalid_value"&&Z.enumValues!==void 0,tip:{suggestion:void 0}},{matches:(Z)=>Z.code==="invalid_type"&&Z.expected==="object"&&Z.received===null&&Z.path==="",tip:{suggestion:"Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error."}},{matches:(Z)=>Z.path==="permissions.additionalDirectories"&&Z.code==="invalid_type",tip:{suggestion:'Must be an array of directory paths. Example: ["~/projects", "/tmp/workspace"]. You can also use --add-dir flag or /add-dir command'}}],iO={}});function SW(Z){return Z.code==="invalid_type"}function bW(Z){return Z.code==="invalid_value"}function aO(Z){return Z.code==="unrecognized_keys"}function hW(Z){return Z.code==="too_small"}function Oq(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function gW(Z){let q=Z.match(/received (\w+)/);return q?q[1]:void 0}function i6(Z,q){return Z.issues.map((J)=>{let Q=J.path.map(String).join("."),X=J.message,$,Y,H,K,W;if(bW(J))Y=J.values.map((V)=>String(V)),H=Y.join(" | "),K=void 0,W=void 0;else if(SW(J)){H=J.expected;let V=gW(J.message);K=V??Oq(J.input),W=V??Oq(J.input)}else if(hW(J))H=String(J.minimum);else if(J.code==="custom"&&"params"in J)K=J.params.received,W=K;let U=yW({path:Q,code:J.code,expected:H,received:K,enumValues:Y,message:J.message,value:K});if(bW(J))$=Y?.map((V)=>`"${V}"`).join(", "),X=`Invalid value. Expected one of: ${$}`;else if(SW(J)){let V=gW(J.message)??Oq(J.input);if(J.expected==="object"&&V==="null"&&Q==="")X="Invalid or malformed JSON";else X=`Expected ${J.expected}, but received ${V}`}else if(aO(J)){let V=J.keys.join(", ");X=`Unrecognized ${TW(J.keys.length,"field")}: ${V}`}else if(hW(J))X=`Number must be greater than or equal to ${J.minimum}`,$=String(J.minimum);return{file:q,path:Q,message:X,expected:$,invalidValue:W,suggestion:U?.suggestion,docLink:U?.docLink}})}function pi(Z){try{let q=q0(Z),J=P0().strict().safeParse(q);if(J.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
86
+ `+i6(J.error,"settings").map(($)=>`- ${$.path}: ${$.message}`).join(`
87
+ `),fullSchema:Iq()}}catch(q){return{isValid:!1,error:`Invalid JSON: ${q instanceof Error?q.message:"Unknown parsing error"}`,fullSchema:Iq()}}}function k7(Z,q){if(!Z||typeof Z!=="object")return[];let J=Z;if(!J.permissions||typeof J.permissions!=="object")return[];let Q=J.permissions,X=[];for(let $ of["allow","deny","ask"]){let Y=Q[$];if(!Array.isArray(Y))continue;Q[$]=Y.filter((H)=>{if(typeof H!=="string")return X.push({file:q,path:`permissions.${$}`,message:`Non-string value in ${$} array was removed`,invalidValue:H}),!1;let K=Aq(H);if(!K.valid){let W=`Invalid permission rule "${H}" was skipped`;if(K.error)W+=`: ${K.error}`;if(K.suggestion)W+=`. ${K.suggestion}`;return X.push({file:q,path:`permissions.${$}`,message:W,invalidValue:H}),!1}return!0})}return X}var wq=B(()=>{z0();Mq();Tq();vW();i2();CW()});import{userInfo as oO}from"os";function dW(){let Z="";try{Z=oO().username}catch{}let q=[];if(Z)q.push({path:`/Library/Managed Preferences/${Z}/${fW}.plist`,label:"per-user managed preferences"});return q.push({path:`/Library/Managed Preferences/${fW}.plist`,label:"device-level managed preferences"}),q}var fW="com.anthropic.claudecode",N7="HKLM\\SOFTWARE\\Policies\\ClaudeCode",P7="HKCU\\SOFTWARE\\Policies\\ClaudeCode",a6="Settings",mW="/usr/bin/plutil",uW,pW=5000;var kq=B(()=>{uW=["-convert","json","-o","-","--"]});import{execFile as sO}from"child_process";import{existsSync as rO}from"fs";function Nq(Z,q){return new Promise((J)=>{sO(Z,q,{encoding:"utf-8",timeout:pW},(Q,X)=>{J({stdout:X??"",code:Q?1:0})})})}function x7(){return(async()=>{if(process.platform==="darwin"){let Z=dW(),J=(await Promise.all(Z.map(async({path:Q,label:X})=>{if(!rO(Q))return{stdout:"",label:X,ok:!1};let{stdout:$,code:Y}=await Nq(mW,[...uW,Q]);return{stdout:$,label:X,ok:Y===0&&!!$}}))).find((Q)=>Q.ok);return{plistStdouts:J?[{stdout:J.stdout,label:J.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,q]=await Promise.all([Nq("reg",["query",N7,"/v",a6]),Nq("reg",["query",P7,"/v",a6])]);return{plistStdouts:null,hklmStdout:Z.code===0?Z.stdout:null,hkcuStdout:q.code===0?q.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function oi(){if(Pq)return;Pq=x7()}function cW(){return Pq}var Pq=null;var lW=B(()=>{kq()});import{join as nW}from"path";function tO(){if(E7)return;E7=(async()=>{o6("mdm_load_start");let Z=Date.now(),q=cW()??x7(),{mdm:J,hkcu:Q}=oW(await q);Eq=J,vq=Q,o6("mdm_load_end");let X=Date.now()-Z;if(x(`MDM settings load completed in ${X}ms`),Object.keys(J.settings).length>0){x(`MDM settings found: ${Object.keys(J.settings).join(", ")}`);try{Y0("info","mdm_settings_loaded",{duration_ms:X,key_count:Object.keys(J.settings).length,error_count:J.errors.length})}catch{}}})()}async function Ka(){if(!E7)tO();await E7}function v7(){return Eq??B1}function y7(){return vq??B1}function Ua(Z,q){Eq=Z,vq=q}async function Wa(){let Z=await x7();return oW(Z)}function xq(Z,q){let J=C0(Z,!1);if(!J||typeof J!=="object")return{settings:{},errors:[]};let Q=k7(J,q),X=P0().safeParse(J);if(!X.success){let $=i6(X.error,q);return{settings:{},errors:[...Q,...$]}}return{settings:X.data,errors:Q}}function iW(Z,q="Settings"){let J=Z.split(/\r?\n/),Q=q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),X=new RegExp(`^\\s+${Q}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let $ of J){let Y=$.match(X);if(Y&&Y[1])return Y[1].trimEnd()}return null}function oW(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:q,label:J}=Z.plistStdouts[0],Q=xq(q,J);if(Object.keys(Q.settings).length>0)return{mdm:Q,hkcu:B1}}if(Z.hklmStdout){let q=iW(Z.hklmStdout);if(q){let J=xq(q,`Registry: ${N7}\\${a6}`);if(Object.keys(J.settings).length>0)return{mdm:J,hkcu:B1}}}if(eO())return{mdm:B1,hkcu:B1};if(Z.hkcuStdout){let q=iW(Z.hkcuStdout);if(q){let J=xq(q,`Registry: ${P7}\\${a6}`);return{mdm:B1,hkcu:J}}}return{mdm:B1,hkcu:B1}}function eO(){try{let Z=nW(D1(),"managed-settings.json"),q=Q1(Z),J=C0(q,!1);if(J&&typeof J==="object"&&Object.keys(J).length>0)return!0}catch{}try{let Z=I2(),q=N().readdirSync(Z);for(let J of q){if(!(J.isFile()||J.isSymbolicLink())||!J.name.endsWith(".json")||J.name.startsWith("."))continue;try{let Q=Q1(nW(Z,J.name)),X=C0(Q,!1);if(X&&typeof X==="object"&&Object.keys(X).length>0)return!0}catch{}}}catch{}return!1}var B1,Eq=null,vq=null,E7=null;var sW=B(()=>{Z1();K2();B2();D0();m4();aW();p4();i2();wq();kq();lW();B1=Object.freeze({settings:{},errors:[]})});import{dirname as YV,join as C7,resolve as a2}from"path";function hq(){return C7(D1(),"managed-settings.json")}function gq(){let Z=[],q={},J=!1,{settings:Q,errors:X}=o2(hq());if(Z.push(...X),Q&&Object.keys(Q).length>0)q=J1(q,Q,r1),J=!0;let $=I2();try{let Y=N().readdirSync($).filter((H)=>(H.isFile()||H.isSymbolicLink())&&H.name.endsWith(".json")&&!H.name.startsWith(".")).map((H)=>H.name).sort();for(let H of Y){let{settings:K,errors:W}=o2(C7($,H));if(Z.push(...W),K&&Object.keys(K).length>0)q=J1(q,K,r1),J=!0}}catch(Y){let H=W0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")f(Y)}return{settings:J?q:null,errors:Z}}function fa(){let{settings:Z}=o2(hq()),q=!!Z&&Object.keys(Z).length>0,J=!1,Q=I2();try{J=N().readdirSync(Q).some((X)=>(X.isFile()||X.isSymbolicLink())&&X.name.endsWith(".json")&&!X.name.startsWith("."))}catch{}return{hasBase:q,hasDropIns:J}}function HV(Z,q){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")x(`Broken symlink or missing file encountered for settings.json at path: ${q}`);else f(Z)}function o2(Z){let q=JV(Z);if(q)return{settings:q.settings?Cq(q.settings):null,errors:q.errors};let J=Zw(Z);return QV(Z,J),{settings:J.settings?Cq(J.settings):null,errors:J.errors}}function Zw(Z){try{let{resolvedPath:q}=F1(N(),Z),J=Q1(q);if(J.trim()==="")return{settings:{},errors:[]};let Q=C0(J,!1),X=k7(Q,Z),$=P0().safeParse(Q);if(!$.success){let Y=i6($.error,Z);return{settings:null,errors:[...X,...Y]}}return{settings:$.data,errors:X}}catch(q){return HV(q,Z),{settings:null,errors:[]}}}function rW(Z){switch(Z){case"userSettings":return a2(G0());case"policySettings":case"projectSettings":case"localSettings":return a2(t1());case"flagSettings":{let q=Sq();return q?YV(a2(q)):a2(t1())}}}function qw(){if($V()||Z0(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function S7(Z){switch(Z){case"userSettings":return C7(rW(Z),qw());case"projectSettings":case"localSettings":return C7(rW(Z),GV(Z));case"policySettings":return hq();case"flagSettings":return Sq()}}function GV(Z){switch(Z){case"projectSettings":return".claudin/settings.json";case"localSettings":return".claudin/settings.local.json"}}function n(Z){let q=ZV(Z);if(q!==void 0)return q;let J=KV(Z);return qV(Z,J),J}function KV(Z){if(Z==="policySettings"){let Q=y4();if(Q&&Object.keys(Q).length>0)return Q;let X=v7();if(Object.keys(X.settings).length>0)return X.settings;let{settings:$}=gq();if($)return $;let Y=y7();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let q=S7(Z),{settings:J}=q?o2(q):{settings:null};if(Z==="flagSettings"){let Q=bq();if(Q){let X=P0().safeParse(Q);if(X.success)return J1(J||{},X.data,r1)}}return J}function ma(){let Z=y4();if(Z&&Object.keys(Z).length>0)return"remote";let q=v7();if(Object.keys(q.settings).length>0)return y0()==="macos"?"plist":"hklm";let{settings:J}=gq();if(J)return"file";let Q=y7();if(Object.keys(Q.settings).length>0)return"hkcu";return null}function ua(Z,q){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let J=S7(Z);if(!J)return{error:null};try{N().mkdirSync(YV(J));let Q=KV(Z);if(!Q){let $=null;try{$=Q1(J)}catch(Y){if(!F6(Y))throw Y}if($!==null){let Y=C0($);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${J}`)};if(Y&&typeof Y==="object")Q=Y,x(`Using raw settings from ${J} due to validation failure`)}}let X=J1(Q||{},q,($,Y,H,K)=>{if(Y===void 0&&K&&typeof H==="string"){delete K[H];return}if(Array.isArray(Y))return Y;return});if(l$(J),D6(J,m(X,null,2)+`
88
+ `),_2(),Z==="localSettings")w$(GV("localSettings"),t1())}catch(Q){let X=Error(`Failed to read raw settings from ${J}: ${Q}`);return f(X),{error:X}}return{error:null}}function Jw(Z,q){return B$([...Z,...q])}function r1(Z,q){if(Array.isArray(Z)&&Array.isArray(q))return Jw(Z,q);return}function pa(Z){let q=P0().strip().parse(Z),J=["permissions","sandbox","hooks"],Q=[],X={permissions:new Set(["allow","deny","ask","defaultMode","disableBypassPermissionsMode","allowBypassPermissionsMode","disableAutoMode","additionalDirectories"]),sandbox:new Set(["enabled","failIfUnavailable","allowUnsandboxedCommands","network","filesystem","ignoreViolations","excludedCommands","autoAllowBashIfSandboxed","enableWeakerNestedSandbox","enableWeakerNetworkIsolation","ripgrep"]),hooks:new Set(["PreToolUse","PostToolUse","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStop","PreCompact","PostCompact","TeammateIdle","TaskCreated","TaskCompleted"])};for(let $ of Object.keys(q))if(J.includes($)&&q[$]&&typeof q[$]==="object"){let Y=q[$],H=X[$];if(H){for(let K of Object.keys(Y))if(H.has(K))Q.push(`${$}.${K}`)}}else Q.push($);return Q.sort()}function Qw(){if(yq)return{settings:{},errors:[]};let Z=Date.now();o6("loadSettingsFromDisk_start"),Y0("info","settings_load_started"),yq=!0;try{let q=XV(),J={};if(q)J=J1(J,q,r1);let Q=[],X=new Set,$=new Set;for(let Y of j2()){if(Y==="policySettings"){let K=null,W=[],U=y4();if(U&&Object.keys(U).length>0){let V=P0().safeParse(U);if(V.success)K=V.data;else W.push(...i6(V.error,"remote managed settings"))}if(!K){let V=v7();if(Object.keys(V.settings).length>0)K=V.settings;W.push(...V.errors)}if(!K){let{settings:V,errors:L}=gq();if(V)K=V;W.push(...L)}if(!K){let V=y7();if(Object.keys(V.settings).length>0)K=V.settings;W.push(...V.errors)}if(K)J=J1(J,K,r1);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!X.has(L))X.add(L),Q.push(V)}continue}let H=S7(Y);if(H){let K=a2(H);if(!$.has(K)){$.add(K);let{settings:W,errors:U}=o2(H);for(let V of U){let L=`${V.file}:${V.path}:${V.message}`;if(!X.has(L))X.add(L),Q.push(V)}if(W)J=J1(J,W,r1)}}if(Y==="flagSettings"){let K=bq();if(K){let W=P0().safeParse(K);if(W.success)J=J1(J,W.data,r1)}}}return Y0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:$.size,error_count:Q.length}),{settings:J,errors:Q}}finally{yq=!1}}function b7(){let{settings:Z}=Xw();return Z||{}}function ca(){_2();let Z=[];for(let q of j2()){let J=n(q);if(J&&Object.keys(J).length>0)Z.push({source:q,settings:J})}return{effective:b7(),sources:Z}}function Xw(){let Z=tW();if(Z!==null)return Z;let q=Qw();return o6("loadSettingsFromDisk_end"),eW(q),q}function la(){return!!(n("userSettings")?.skipDangerousModePermissionPrompt||n("localSettings")?.skipDangerousModePermissionPrompt||n("flagSettings")?.skipDangerousModePermissionPrompt||n("policySettings")?.skipDangerousModePermissionPrompt)}function na(){return!!(n("userSettings")?.permissions?.allowBypassPermissionsMode||n("localSettings")?.permissions?.allowBypassPermissionsMode||n("flagSettings")?.permissions?.allowBypassPermissionsMode||n("policySettings")?.permissions?.allowBypassPermissionsMode)}function ia(){{let Z=n("userSettings")?.skipAutoPermissionPrompt,q=n("localSettings")?.skipAutoPermissionPrompt,J=n("flagSettings")?.skipAutoPermissionPrompt,Q=n("policySettings")?.skipAutoPermissionPrompt,X=!!(Z||q||J||Q);return x(`[auto-mode] hasAutoModeOptIn=${X} skipAutoPermissionPrompt: user=${Z} local=${q} flag=${J} policy=${Q}`),X}return!1}function aa(){return n("policySettings")?.useAutoModeDuringPlan!==!1&&n("flagSettings")?.useAutoModeDuringPlan!==!1&&n("userSettings")?.useAutoModeDuringPlan!==!1&&n("localSettings")?.useAutoModeDuringPlan!==!1}function oa(){{let Z=G.object({allow:G.array(G.string()).optional(),soft_deny:G.array(G.string()).optional(),deny:G.array(G.string()).optional(),environment:G.array(G.string()).optional()}),q=[],J=[],Q=[];for(let X of["userSettings","localSettings","flagSettings","policySettings"]){let $=n(X);if(!$)continue;let Y=Z.safeParse($.autoMode);if(Y.success){if(Y.data.allow)q.push(...Y.data.allow);if(Y.data.soft_deny)J.push(...Y.data.soft_deny);if(Y.data.environment)Q.push(...Y.data.environment)}}if(q.length>0||J.length>0||Q.length>0)return{...q.length>0&&{allow:q},...J.length>0&&{soft_deny:J},...Q.length>0&&{environment:Q}}}return}function sa(Z){for(let q of j2()){if(q==="policySettings")continue;let J=S7(q);if(!J)continue;try{let{resolvedPath:Q}=F1(N(),J),X=Q1(Q);if(!X.trim())continue;let $=C0(X,!1);if($&&typeof $==="object"&&Z in $)return!0}catch(Q){HV(Q,J)}}return!1}var yq=!1,da;var UV=B(()=>{U$();n0();j6();V$();Z3();Z1();K2();c0();C1();C4();B2();D0();k$();m4();p0();B6();z0();aW();B3();n$();p4();sW();W$();i2();wq();da=b7});import{homedir as $w}from"os";import{isAbsolute as Yw,join as g7,normalize as fq,sep as BV}from"path";function LV(){let Z=process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY;if(Z0(Z))return!1;if(VV(Z))return!0;if(Z0(process.env.CLAUDE_CODE_SIMPLE))return!1;if(Z0(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let q=b7();if(q.autoMemoryEnabled!==void 0)return q.autoMemoryEnabled;return!0}function Ho(){if(!S1("tengu_passport_quail",!1))return!1;return!WV()||S1("tengu_slate_thimble",!1)}function Hw(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return G0()}function _V(Z,q){if(!Z)return;let J=Z;if(q&&(J.startsWith("~/")||J.startsWith("~\\"))){let X=J.slice(2),$=fq(X||".");if($==="."||$==="..")return;J=g7($w(),X)}let Q=fq(J).replace(/[/\\]+$/,"");if(!Yw(Q)||Q.length<3||/^[A-Za-z]:$/.test(Q)||Q.startsWith("\\\\")||Q.startsWith("//")||Q.includes("\x00"))return;return(Q+BV).normalize("NFC")}function zV(){return _V(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function Uw(){let Z=n("policySettings")?.autoMemoryDirectory??n("flagSettings")?.autoMemoryDirectory??n("localSettings")?.autoMemoryDirectory??n("userSettings")?.autoMemoryDirectory;return _V(Z,!0)}function Go(){return zV()!==void 0}function Ww(){return s6(h7())??h7()}function RV(){return g7(s2(),Kw)}function Ko(Z){return fq(Z).startsWith(s2())}var Gw="memory",Kw="MEMORY.md",s2;var mq=B(()=>{v1();j6();Q3();c0();R2();w4();UV();s2=d(()=>{let Z=zV()??Uw();if(Z)return Z;let q=g7(Hw(),"projects");return(g7(q,d5(Ww()),Gw)+BV).normalize("NFC")},()=>h7())});var FV=p((Wo,MV)=>{var k1=H0("constants"),Vw=process.cwd,f7=null,Bw=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!f7)f7=Vw.call(process);return f7};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(m7=process.chdir,process.chdir=function(Z){f7=null,m7.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,m7)}var m7;MV.exports=Lw;function Lw(Z){if(k1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))q(Z);if(!Z.lutimes)J(Z);if(Z.chown=$(Z.chown),Z.fchown=$(Z.fchown),Z.lchown=$(Z.lchown),Z.chmod=Q(Z.chmod),Z.fchmod=Q(Z.fchmod),Z.lchmod=Q(Z.lchmod),Z.chownSync=Y(Z.chownSync),Z.fchownSync=Y(Z.fchownSync),Z.lchownSync=Y(Z.lchownSync),Z.chmodSync=X(Z.chmodSync),Z.fchmodSync=X(Z.fchmodSync),Z.lchmodSync=X(Z.lchmodSync),Z.stat=H(Z.stat),Z.fstat=H(Z.fstat),Z.lstat=H(Z.lstat),Z.statSync=K(Z.statSync),Z.fstatSync=K(Z.fstatSync),Z.lstatSync=K(Z.lstatSync),Z.chmod&&!Z.lchmod)Z.lchmod=function(U,V,L){if(L)process.nextTick(L)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(U,V,L,_){if(_)process.nextTick(_)},Z.lchownSync=function(){};if(Bw==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(U){function V(L,_,z){var R=Date.now(),D=0;U(L,_,function F(k){if(k&&(k.code==="EACCES"||k.code==="EPERM"||k.code==="EBUSY")&&Date.now()-R<60000){if(setTimeout(function(){Z.stat(_,function(M,O){if(M&&M.code==="ENOENT")U(L,_,F);else z(k)})},D),D<100)D+=10;return}if(z)z(k)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,U);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(U){function V(L,_,z,R,D,F){var k;if(F&&typeof F==="function"){var M=0;k=function(O,T,j){if(O&&O.code==="EAGAIN"&&M<10)return M++,U.call(Z,L,_,z,R,D,k);F.apply(this,arguments)}}return U.call(Z,L,_,z,R,D,k)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,U);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(U){return function(V,L,_,z,R){var D=0;while(!0)try{return U.call(Z,V,L,_,z,R)}catch(F){if(F.code==="EAGAIN"&&D<10){D++;continue}throw F}}}(Z.readSync);function q(U){U.lchmod=function(V,L,_){U.open(V,k1.O_WRONLY|k1.O_SYMLINK,L,function(z,R){if(z){if(_)_(z);return}U.fchmod(R,L,function(D){U.close(R,function(F){if(_)_(D||F)})})})},U.lchmodSync=function(V,L){var _=U.openSync(V,k1.O_WRONLY|k1.O_SYMLINK,L),z=!0,R;try{R=U.fchmodSync(_,L),z=!1}finally{if(z)try{U.closeSync(_)}catch(D){}else U.closeSync(_)}return R}}function J(U){if(k1.hasOwnProperty("O_SYMLINK")&&U.futimes)U.lutimes=function(V,L,_,z){U.open(V,k1.O_SYMLINK,function(R,D){if(R){if(z)z(R);return}U.futimes(D,L,_,function(F){U.close(D,function(k){if(z)z(F||k)})})})},U.lutimesSync=function(V,L,_){var z=U.openSync(V,k1.O_SYMLINK),R,D=!0;try{R=U.futimesSync(z,L,_),D=!1}finally{if(D)try{U.closeSync(z)}catch(F){}else U.closeSync(z)}return R};else if(U.futimes)U.lutimes=function(V,L,_,z){if(z)process.nextTick(z)},U.lutimesSync=function(){}}function Q(U){if(!U)return U;return function(V,L,_){return U.call(Z,V,L,function(z){if(W(z))z=null;if(_)_.apply(this,arguments)})}}function X(U){if(!U)return U;return function(V,L){try{return U.call(Z,V,L)}catch(_){if(!W(_))throw _}}}function $(U){if(!U)return U;return function(V,L,_,z){return U.call(Z,V,L,_,function(R){if(W(R))R=null;if(z)z.apply(this,arguments)})}}function Y(U){if(!U)return U;return function(V,L,_){try{return U.call(Z,V,L,_)}catch(z){if(!W(z))throw z}}}function H(U){if(!U)return U;return function(V,L,_){if(typeof L==="function")_=L,L=null;function z(R,D){if(D){if(D.uid<0)D.uid+=4294967296;if(D.gid<0)D.gid+=4294967296}if(_)_.apply(this,arguments)}return L?U.call(Z,V,L,z):U.call(Z,V,z)}}function K(U){if(!U)return U;return function(V,L){var _=L?U.call(Z,V,L):U.call(Z,V);if(_){if(_.uid<0)_.uid+=4294967296;if(_.gid<0)_.gid+=4294967296}return _}}function W(U){if(!U)return!0;if(U.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(U.code==="EINVAL"||U.code==="EPERM")return!0}return!1}}});var TV=p((Vo,AV)=>{var DV=H0("stream").Stream;AV.exports=_w;function _w(Z){return{ReadStream:q,WriteStream:J};function q(Q,X){if(!(this instanceof q))return new q(Q,X);DV.call(this);var $=this;this.path=Q,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,X=X||{};var Y=Object.keys(X);for(var H=0,K=Y.length;H<K;H++){var W=Y[H];this[W]=X[W]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){$._read()});return}Z.open(this.path,this.flags,this.mode,function(U,V){if(U){$.emit("error",U),$.readable=!1;return}$.fd=V,$.emit("open",V),$._read()})}function J(Q,X){if(!(this instanceof J))return new J(Q,X);DV.call(this),this.path=Q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,X=X||{};var $=Object.keys(X);for(var Y=0,H=$.length;Y<H;Y++){var K=$[Y];this[K]=X[K]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=Z.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var IV=p((Bo,jV)=>{jV.exports=Rw;var zw=Object.getPrototypeOf||function(Z){return Z.__proto__};function Rw(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var q={__proto__:zw(Z)};else var q=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(J){Object.defineProperty(q,J,Object.getOwnPropertyDescriptor(Z,J))}),q}});var lq=p((Lo,cq)=>{var i=H0("fs"),Mw=FV(),Fw=TV(),Dw=IV(),u7=H0("util"),V0,d7;if(typeof Symbol==="function"&&typeof Symbol.for==="function")V0=Symbol.for("graceful-fs.queue"),d7=Symbol.for("graceful-fs.previous");else V0="___graceful-fs.queue",d7="___graceful-fs.previous";function Aw(){}function wV(Z,q){Object.defineProperty(Z,V0,{get:function(){return q}})}var e1=Aw;if(u7.debuglog)e1=u7.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))e1=function(){var Z=u7.format.apply(u7,arguments);Z="GFS4: "+Z.split(/\n/).join(`
89
+ GFS4: `),console.error(Z)};if(!i[V0]){if(uq=global[V0]||[],wV(i,uq),i.close=function(Z){function q(J,Q){return Z.call(i,J,function(X){if(!X)OV();if(typeof Q==="function")Q.apply(this,arguments)})}return Object.defineProperty(q,d7,{value:Z}),q}(i.close),i.closeSync=function(Z){function q(J){Z.apply(i,arguments),OV()}return Object.defineProperty(q,d7,{value:Z}),q}(i.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){e1(i[V0]),H0("assert").equal(i[V0].length,0)})}var uq;if(!global[V0])wV(global,i[V0]);cq.exports=pq(Dw(i));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched)cq.exports=pq(i),i.__patched=!0;function pq(Z){Mw(Z),Z.gracefulify=pq,Z.createReadStream=T,Z.createWriteStream=j;var q=Z.readFile;Z.readFile=J;function J(w,P,v){if(typeof P==="function")v=P,P=null;return b(w,P,v);function b(t,E,y,u){return q(t,E,function(h){if(h&&(h.code==="EMFILE"||h.code==="ENFILE"))r6([b,[t,E,y],h,u||Date.now(),Date.now()]);else if(typeof y==="function")y.apply(this,arguments)})}}var Q=Z.writeFile;Z.writeFile=X;function X(w,P,v,b){if(typeof v==="function")b=v,v=null;return t(w,P,v,b);function t(E,y,u,h,K0){return Q(E,y,u,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))r6([t,[E,y,u,h],c,K0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var $=Z.appendFile;if($)Z.appendFile=Y;function Y(w,P,v,b){if(typeof v==="function")b=v,v=null;return t(w,P,v,b);function t(E,y,u,h,K0){return $(E,y,u,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))r6([t,[E,y,u,h],c,K0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=K;function K(w,P,v,b){if(typeof v==="function")b=v,v=0;return t(w,P,v,b);function t(E,y,u,h,K0){return H(E,y,u,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))r6([t,[E,y,u,h],c,K0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var W=Z.readdir;Z.readdir=V;var U=/^v[0-5]\./;function V(w,P,v){if(typeof P==="function")v=P,P=null;var b=U.test(process.version)?function(y,u,h,K0){return W(y,t(y,u,h,K0))}:function(y,u,h,K0){return W(y,u,t(y,u,h,K0))};return b(w,P,v);function t(E,y,u,h){return function(K0,c){if(K0&&(K0.code==="EMFILE"||K0.code==="ENFILE"))r6([b,[E,y,u],K0,h||Date.now(),Date.now()]);else{if(c&&c.sort)c.sort();if(typeof u==="function")u.call(this,K0,c)}}}}if(process.version.substr(0,4)==="v0.8"){var L=Fw(Z);F=L.ReadStream,M=L.WriteStream}var _=Z.ReadStream;if(_)F.prototype=Object.create(_.prototype),F.prototype.open=k;var z=Z.WriteStream;if(z)M.prototype=Object.create(z.prototype),M.prototype.open=O;Object.defineProperty(Z,"ReadStream",{get:function(){return F},set:function(w){F=w},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return M},set:function(w){M=w},enumerable:!0,configurable:!0});var R=F;Object.defineProperty(Z,"FileReadStream",{get:function(){return R},set:function(w){R=w},enumerable:!0,configurable:!0});var D=M;Object.defineProperty(Z,"FileWriteStream",{get:function(){return D},set:function(w){D=w},enumerable:!0,configurable:!0});function F(w,P){if(this instanceof F)return _.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function k(){var w=this;g(w.path,w.flags,w.mode,function(P,v){if(P){if(w.autoClose)w.destroy();w.emit("error",P)}else w.fd=v,w.emit("open",v),w.read()})}function M(w,P){if(this instanceof M)return z.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function O(){var w=this;g(w.path,w.flags,w.mode,function(P,v){if(P)w.destroy(),w.emit("error",P);else w.fd=v,w.emit("open",v)})}function T(w,P){return new Z.ReadStream(w,P)}function j(w,P){return new Z.WriteStream(w,P)}var A=Z.open;Z.open=g;function g(w,P,v,b){if(typeof v==="function")b=v,v=null;return t(w,P,v,b);function t(E,y,u,h,K0){return A(E,y,u,function(c,yP){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))r6([t,[E,y,u,h],c,K0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}return Z}function r6(Z){e1("ENQUEUE",Z[0].name,Z[1]),i[V0].push(Z),dq()}var p7;function OV(){var Z=Date.now();for(var q=0;q<i[V0].length;++q)if(i[V0][q].length>2)i[V0][q][3]=Z,i[V0][q][4]=Z;dq()}function dq(){if(clearTimeout(p7),p7=void 0,i[V0].length===0)return;var Z=i[V0].shift(),q=Z[0],J=Z[1],Q=Z[2],X=Z[3],$=Z[4];if(X===void 0)e1("RETRY",q.name,J),q.apply(null,J);else if(Date.now()-X>=60000){e1("TIMEOUT",q.name,J);var Y=J.pop();if(typeof Y==="function")Y.call(null,Q)}else{var H=Date.now()-$,K=Math.max($-X,1),W=Math.min(K*1.2,100);if(H>=W)e1("RETRY",q.name,J),q.apply(null,J.concat([X]));else i[V0].push(Z)}if(p7===void 0)p7=setTimeout(dq,0)}});var NV=p((_o,kV)=>{function x0(Z,q){if(typeof q==="boolean")q={forever:q};if(this._originalTimeouts=JSON.parse(JSON.stringify(Z)),this._timeouts=Z,this._options=q||{},this._maxRetryTime=q&&q.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}kV.exports=x0;x0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};x0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};x0.prototype.retry=function(Z){if(this._timeout)clearTimeout(this._timeout);if(!Z)return!1;var q=new Date().getTime();if(Z&&q-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(Z);var J=this._timeouts.shift();if(J===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),J=this._timeouts.shift();else return!1;var Q=this,X=setTimeout(function(){if(Q._attempts++,Q._operationTimeoutCb){if(Q._timeout=setTimeout(function(){Q._operationTimeoutCb(Q._attempts)},Q._operationTimeout),Q._options.unref)Q._timeout.unref()}Q._fn(Q._attempts)},J);if(this._options.unref)X.unref();return!0};x0.prototype.attempt=function(Z,q){if(this._fn=Z,q){if(q.timeout)this._operationTimeout=q.timeout;if(q.cb)this._operationTimeoutCb=q.cb}var J=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){J._operationTimeoutCb()},J._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};x0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};x0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};x0.prototype.start=x0.prototype.try;x0.prototype.errors=function(){return this._errors};x0.prototype.attempts=function(){return this._attempts};x0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},q=null,J=0;for(var Q=0;Q<this._errors.length;Q++){var X=this._errors[Q],$=X.message,Y=(Z[$]||0)+1;if(Z[$]=Y,Y>=J)q=X,J=Y}return q}});var xV=p((jw)=>{var Tw=NV();jw.operation=function(Z){var q=jw.timeouts(Z);return new Tw(q,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};jw.timeouts=function(Z){if(Z instanceof Array)return[].concat(Z);var q={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var J in Z)q[J]=Z[J];if(q.minTimeout>q.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Q=[];for(var X=0;X<q.retries;X++)Q.push(this.createTimeout(X,q));if(Z&&Z.forever&&!Q.length)Q.push(this.createTimeout(X,q));return Q.sort(function($,Y){return $-Y}),Q};jw.createTimeout=function(Z,q){var J=q.randomize?Math.random()+1:1,Q=Math.round(J*q.minTimeout*Math.pow(q.factor,Z));return Q=Math.min(Q,q.maxTimeout),Q};jw.wrap=function(Z,q,J){if(q instanceof Array)J=q,q=null;if(!J){J=[];for(var Q in Z)if(typeof Z[Q]==="function")J.push(Q)}for(var X=0;X<J.length;X++){var $=J[X],Y=Z[$];Z[$]=function(K){var W=jw.operation(q),U=Array.prototype.slice.call(arguments,1),V=U.pop();U.push(function(L){if(W.retry(L))return;if(L)arguments[0]=W.mainError();V.apply(this,arguments)}),W.attempt(function(){K.apply(Z,U)})}.bind(Z,Y),Z[$].options=q}}});var EV=p((Ro,c7)=>{c7.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")c7.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")c7.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var vV=p((Mo,e6)=>{var l=global.process,Z6=function(Z){return Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function"};if(!Z6(l))e6.exports=function(){return function(){}};else{if(nq=H0("assert"),q6=EV(),iq=/^win/i.test(l.platform),t6=H0("events"),typeof t6!=="function")t6=t6.EventEmitter;if(l.__signal_exit_emitter__)Q0=l.__signal_exit_emitter__;else Q0=l.__signal_exit_emitter__=new t6,Q0.count=0,Q0.emitted={};if(!Q0.infinite)Q0.setMaxListeners(1/0),Q0.infinite=!0;e6.exports=function(Z,q){if(!Z6(global.process))return function(){};if(nq.equal(typeof Z,"function","a callback must be provided for exit handler"),J6===!1)l7();var J="exit";if(q&&q.alwaysLast)J="afterexit";var Q=function(){if(Q0.removeListener(J,Z),Q0.listeners("exit").length===0&&Q0.listeners("afterexit").length===0)r2()};return Q0.on(J,Z),Q},r2=function(){if(!J6||!Z6(global.process))return;J6=!1,q6.forEach(function(q){try{l.removeListener(q,t2[q])}catch(J){}}),l.emit=e2,l.reallyExit=n7,Q0.count-=1},e6.exports.unload=r2,N1=function(q,J,Q){if(Q0.emitted[q])return;Q0.emitted[q]=!0,Q0.emit(q,J,Q)},t2={},q6.forEach(function(Z){t2[Z]=function(){if(!Z6(global.process))return;var J=l.listeners(Z);if(J.length===Q0.count){if(r2(),N1("exit",null,Z),N1("afterexit",null,Z),iq&&Z==="SIGHUP")Z="SIGINT";l.kill(l.pid,Z)}}}),e6.exports.signals=function(){return q6},J6=!1,l7=function(){if(J6||!Z6(global.process))return;J6=!0,Q0.count+=1,q6=q6.filter(function(q){try{return l.on(q,t2[q]),!0}catch(J){return!1}}),l.emit=oq,l.reallyExit=aq},e6.exports.load=l7,n7=l.reallyExit,aq=function(q){if(!Z6(global.process))return;l.exitCode=q||0,N1("exit",l.exitCode,null),N1("afterexit",l.exitCode,null),n7.call(l,l.exitCode)},e2=l.emit,oq=function(q,J){if(q==="exit"&&Z6(global.process)){if(J!==void 0)l.exitCode=J;var Q=e2.apply(this,arguments);return N1("exit",l.exitCode,null),N1("afterexit",l.exitCode,null),Q}else return e2.apply(this,arguments)}}var nq,q6,iq,t6,Q0,r2,N1,t2,J6,l7,n7,aq,e2,oq});var CV=p((Pw,sq)=>{var yV=Symbol();function kw(Z,q,J){let Q=q[yV];if(Q)return q.stat(Z,($,Y)=>{if($)return J($);J(null,Y.mtime,Q)});let X=new Date(Math.ceil(Date.now()/1000)*1000+5);q.utimes(Z,X,X,($)=>{if($)return J($);q.stat(Z,(Y,H)=>{if(Y)return J(Y);let K=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(q,yV,{value:K}),J(null,H.mtime,K)})})}function Nw(Z){let q=Date.now();if(Z==="s")q=Math.ceil(q/1000)*1000;return new Date(q)}Pw.probe=kw;Pw.getMtime=Nw});var fV=p((gw,q4)=>{var vw=H0("path"),eq=lq(),yw=xV(),Cw=vV(),SV=CV(),L1={};function Z4(Z,q){return q.lockfilePath||`${Z}.lock`}function ZJ(Z,q,J){if(!q.realpath)return J(null,vw.resolve(Z));q.fs.realpath(Z,J)}function tq(Z,q,J){let Q=Z4(Z,q);q.fs.mkdir(Q,(X)=>{if(!X)return SV.probe(Q,q.fs,($,Y,H)=>{if($)return q.fs.rmdir(Q,()=>{}),J($);J(null,Y,H)});if(X.code!=="EEXIST")return J(X);if(q.stale<=0)return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));q.fs.stat(Q,($,Y)=>{if($){if($.code==="ENOENT")return tq(Z,{...q,stale:0},J);return J($)}if(!bV(Y,q))return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));hV(Z,q,(H)=>{if(H)return J(H);tq(Z,{...q,stale:0},J)})})})}function bV(Z,q){return Z.mtime.getTime()<Date.now()-q.stale}function hV(Z,q,J){q.fs.rmdir(Z4(Z,q),(Q)=>{if(Q&&Q.code!=="ENOENT")return J(Q);J()})}function i7(Z,q){let J=L1[Z];if(J.updateTimeout)return;if(J.updateDelay=J.updateDelay||q.update,J.updateTimeout=setTimeout(()=>{J.updateTimeout=null,q.fs.stat(J.lockfilePath,(Q,X)=>{let $=J.lastUpdate+q.stale<Date.now();if(Q){if(Q.code==="ENOENT"||$)return rq(Z,J,Object.assign(Q,{code:"ECOMPROMISED"}));return J.updateDelay=1000,i7(Z,q)}if(J.mtime.getTime()!==X.mtime.getTime())return rq(Z,J,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=SV.getMtime(J.mtimePrecision);q.fs.utimes(J.lockfilePath,H,H,(K)=>{let W=J.lastUpdate+q.stale<Date.now();if(J.released)return;if(K){if(K.code==="ENOENT"||W)return rq(Z,J,Object.assign(K,{code:"ECOMPROMISED"}));return J.updateDelay=1000,i7(Z,q)}J.mtime=H,J.lastUpdate=Date.now(),J.updateDelay=null,i7(Z,q)})})},J.updateDelay),J.updateTimeout.unref)J.updateTimeout.unref()}function rq(Z,q,J){if(q.released=!0,q.updateTimeout)clearTimeout(q.updateTimeout);if(L1[Z]===q)delete L1[Z];q.options.onCompromised(J)}function Sw(Z,q,J){q={stale:1e4,update:null,realpath:!0,retries:0,fs:eq,onCompromised:(Q)=>{throw Q},...q},q.retries=q.retries||0,q.retries=typeof q.retries==="number"?{retries:q.retries}:q.retries,q.stale=Math.max(q.stale||0,2000),q.update=q.update==null?q.stale/2:q.update||0,q.update=Math.max(Math.min(q.update,q.stale/2),1000),ZJ(Z,q,(Q,X)=>{if(Q)return J(Q);let $=yw.operation(q.retries);$.attempt(()=>{tq(X,q,(Y,H,K)=>{if($.retry(Y))return;if(Y)return J($.mainError());let W=L1[X]={lockfilePath:Z4(X,q),mtime:H,mtimePrecision:K,options:q,lastUpdate:Date.now()};i7(X,q),J(null,(U)=>{if(W.released)return U&&U(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));gV(X,{...q,realpath:!1},U)})})})})}function gV(Z,q,J){q={fs:eq,realpath:!0,...q},ZJ(Z,q,(Q,X)=>{if(Q)return J(Q);let $=L1[X];if(!$)return J(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));$.updateTimeout&&clearTimeout($.updateTimeout),$.released=!0,delete L1[X],hV(X,q,J)})}function bw(Z,q,J){q={stale:1e4,realpath:!0,fs:eq,...q},q.stale=Math.max(q.stale||0,2000),ZJ(Z,q,(Q,X)=>{if(Q)return J(Q);q.fs.stat(Z4(X,q),($,Y)=>{if($)return $.code==="ENOENT"?J(null,!1):J($);return J(null,!bV(Y,q))})})}function hw(){return L1}Cw(()=>{for(let Z in L1){let q=L1[Z].options;try{q.fs.rmdirSync(Z4(Z,q))}catch(J){}}});gw.lock=Sw;gw.unlock=gV;gw.check=bw;gw.getLocks=hw});var uV=p((Fo,mV)=>{var dw=lq();function cw(Z){let q=["mkdir","realpath","stat","rmdir","utimes"],J={...Z};return q.forEach((Q)=>{J[Q]=(...X)=>{let $=X.pop(),Y;try{Y=Z[`${Q}Sync`](...X)}catch(H){return $(H)}$(null,Y)}}),J}function lw(Z){return(...q)=>new Promise((J,Q)=>{q.push((X,$)=>{if(X)Q(X);else J($)}),Z(...q)})}function nw(Z){return(...q)=>{let J,Q;if(q.push((X,$)=>{J=X,Q=$}),Z(...q),J)throw J;return Q}}function iw(Z){if(Z={...Z},Z.fs=cw(Z.fs||dw),typeof Z.retries==="number"&&Z.retries>0||Z.retries&&typeof Z.retries.retries==="number"&&Z.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return Z}mV.exports={toPromise:lw,toSync:nw,toSyncOptions:iw}});var dV=p((Do,P1)=>{var Z2=fV(),{toPromise:a7,toSync:o7,toSyncOptions:qJ}=uV();async function pV(Z,q){let J=await a7(Z2.lock)(Z,q);return a7(J)}function aw(Z,q){let J=o7(Z2.lock)(Z,qJ(q));return o7(J)}function ow(Z,q){return a7(Z2.unlock)(Z,q)}function sw(Z,q){return o7(Z2.unlock)(Z,qJ(q))}function rw(Z,q){return a7(Z2.check)(Z,q)}function tw(Z,q){return o7(Z2.check)(Z,qJ(q))}P1.exports=pV;P1.exports.lock=pV;P1.exports.unlock=ow;P1.exports.lockSync=aw;P1.exports.unlockSync=sw;P1.exports.check=rw;P1.exports.checkSync=tw});function QJ(){if(!JJ)JJ=dV();return JJ}function Ao(Z,q){return QJ().lock(Z,q)}function cV(Z,q){return QJ().lockSync(Z,q)}function To(Z,q){return QJ().check(Z,q)}var JJ;var lV=()=>{};function J4(Z){if(Z===void 0)return!1;let q=Z.trim().toLowerCase();return q==="0"||q==="false"||q==="no"||q==="off"||q===""}function Zk(){let Z=process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC,q=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&J4(Z)||q!==void 0&&J4(q)){if(process.env.DISABLE_TELEMETRY&&!J4(process.env.DISABLE_TELEMETRY))return"no-telemetry";return"default"}return"essential-traffic"}function XJ(){return Zk()==="essential-traffic"}function $J(){if(!XJ())return null;let Z=process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&!J4(Z))return"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";let q=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(q!==void 0&&!J4(q))return"ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC";return"claudin-default"}function nV(){let Z=$J();return Z==="claudin-default"?null:Z}var YJ=()=>{};import{dirname as qk,join as iV}from"path";function oV(Z){return[iV(Z,s7),iV(Z,aV)]}function Jk(Z,q){let[J,Q]=oV(Z);return q(J)?J:Q}function Qk(Z,q){return oV(Z).some((J)=>q(J))}function Oo(Z,q){let J=Z;while(!0){if(Qk(J,q))return Jk(J,q);let Q=qk(J);if(Q===J)return null;J=Q}}function wo(Z){return Z===s7||Z===aV}var s7="AGENTS.md",aV="CLAUDE.md";var sV=()=>{};var Xk,$k;var rV=B(()=>{Xk=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","os_native","notifications_disabled"],$k=["normal","vim"]});var XB={};Uq(XB,{validateTeamMemWritePath:()=>Kk,validateTeamMemKey:()=>Uk,isTeamMemoryEnabled:()=>ZB,isTeamMemPath:()=>QB,isTeamMemFile:()=>Wk,getTeamMemPath:()=>Q4,getTeamMemEntrypoint:()=>Gk,PathTraversalError:()=>_0});import{lstat as Yk,realpath as eV}from"fs/promises";import{dirname as tV,join as r7,resolve as HJ,sep as GJ}from"path";function Hk(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path key: "${Z}"`);let q;try{q=decodeURIComponent(Z)}catch{q=Z}if(q!==Z&&(q.includes("..")||q.includes("/")))throw new _0(`URL-encoded traversal in path key: "${Z}"`);let J=Z.normalize("NFKC");if(J!==Z&&(J.includes("..")||J.includes("/")||J.includes("\\")||J.includes("\x00")))throw new _0(`Unicode-normalized traversal in path key: "${Z}"`);if(Z.includes("\\"))throw new _0(`Backslash in path key: "${Z}"`);if(Z.startsWith("/"))throw new _0(`Absolute path key: "${Z}"`);return Z}function ZB(){if(!LV())return!1;return S1("tengu_herring_clock",!0)}function Q4(){return(r7(s2(),"team")+GJ).normalize("NFC")}function Gk(){return r7(s2(),"team","MEMORY.md")}async function qB(Z){let q=[],J=Z;for(let Q=tV(J);J!==Q;Q=tV(J))try{let X=await eV(J);return q.length===0?X:r7(X,...q.reverse())}catch(X){let $=W0(X);if($==="ENOENT")try{if((await Yk(J)).isSymbolicLink())throw new _0(`Dangling symlink detected (target does not exist): "${J}"`)}catch(Y){if(Y instanceof _0)throw Y}else if($==="ELOOP")throw new _0(`Symlink loop detected in path: "${J}"`);else if($!=="ENOTDIR"&&$!=="ENAMETOOLONG")throw new _0(`Cannot verify path containment (${$}): "${J}"`);q.push(J.slice(Q.length+GJ.length)),J=Q}return Z}async function JB(Z){let q;try{q=await eV(Q4().replace(/[/\\]+$/,""))}catch(J){let Q=W0(J);if(Q==="ENOENT"||Q==="ENOTDIR")return!0;return!1}if(Z===q)return!0;return Z.startsWith(q+GJ)}function QB(Z){let q=HJ(Z),J=Q4();return q.startsWith(J)}async function Kk(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path: "${Z}"`);let q=HJ(Z),J=Q4();if(!q.startsWith(J))throw new _0(`Path escapes team memory directory: "${Z}"`);let Q=await qB(q);if(!await JB(Q))throw new _0(`Path escapes team memory directory via symlink: "${Z}"`);return q}async function Uk(Z){Hk(Z);let q=Q4(),J=r7(q,Z),Q=HJ(J);if(!Q.startsWith(q))throw new _0(`Key escapes team memory directory: "${Z}"`);let X=await qB(Q);if(!await JB(X))throw new _0(`Key escapes team memory directory via symlink: "${Z}"`);return Q}function Wk(Z){return ZB()&&QB(Z)}var _0;var $B=B(()=>{Q3();C1();mq();_0=class _0 extends Error{constructor(Z){super(Z);this.name="PathTraversalError"}}});import{randomBytes as Vk}from"crypto";import{unwatchFile as Bk,watchFile as Lk}from"fs";import{basename as _J,dirname as zJ,join as I0,resolve as Z5}from"path";function _1(){return{numStartups:0,installMethod:void 0,autoUpdates:void 0,theme:"dark",preferredNotifChannel:"auto",verbose:!1,editorMode:"normal",autoCompactEnabled:!0,collapseSubagentProgress:!0,summarizeSubagentResult:!1,thinkingHistoryRedactionEnabled:!0,narrationHistoryRedactionEnabled:!0,toolResultSummarizerEnabled:!0,showTurnDuration:!0,showCacheStats:"compact",hasSeenTasksHint:!1,hasUsedStash:!1,hasUsedBackgroundTask:!1,queuedCommandUpHintCount:0,diffTool:"auto",customApiKeyResponses:{approved:[],rejected:[]},env:{},tipsHistory:{},memoryUsageCount:0,promptQueueUseCount:0,btwUseCount:0,todoFeatureEnabled:!0,showExpandedTodos:!1,messageIdleNotifThresholdMs:60000,autoConnectIde:!1,autoInstallIdeExtension:!0,fileCheckpointingEnabled:!0,terminalProgressBarEnabled:!0,cachedStatsigGates:{},cachedDynamicConfigs:{},cachedGrowthBookFeatures:{},respectGitignore:!0,copyFullResponse:!1,providerProfiles:[],openaiAdditionalModelOptionsCacheByProfile:{},knowledgeGraphEnabled:!0,inlineImagesMode:"auto",autoBackgroundAgentsEnabled:!1}}function Hs(Z){return zk.includes(Z)}function Gs(){KB=!1}function Ks(){return KB||=Mk()}function Mk(){if(HB())return!0;let Z=X0(),q=FJ();if(Z.projects?.[q]?.hasTrustDialogAccepted)return!0;let Q=y1(r());while(!0){if(Z.projects?.[Q]?.hasTrustDialogAccepted)return!0;let $=y1(Z5(Q,".."));if($===Q)break;Q=$}return!1}function Us(Z){let q=X0(),J=y1(Z5(Z));while(!0){if(q.projects?.[J]?.hasTrustDialogAccepted)return!0;let Q=y1(Z5(J,".."));if(Q===J)return!1;J=Q}}function Ws(){return}function Vs(){return}function Bs(Z){return Rk.includes(Z)}function $5(Z){let q=t0.config;if(!q)return!1;let J=q.oauthAccount!==void 0&&Z.oauthAccount===void 0,Q=q.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return J||Q}function UB(Z){return VJ.add(Z),()=>VJ.delete(Z)}function q5(){for(let Z of VJ)try{Z()}catch{}}function BJ(Z){return{...Z,projects:Ak(Z.projects)}}function M0(Z){let q=null;try{if(VB(L0(),_1,(Q)=>{let X=Z(Q);if(X===Q)return Q;return q=BJ(X),q})&&q)J5(q),q5()}catch(J){let Q=W0(J);if(Q==="EACCES"||Q==="EPERM"||Q==="EROFS"){x(`Skipping global config write due to permission error: ${J}`,{level:"error"});return}x(`Failed to save config with lock: ${J}`,{level:"error"});let X=X6(L0(),_1);if($5(X)){x("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),l0("tengu_config_auth_loss_prevented",{});return}let $=Z(X);if($===X)return;q=BJ($),WB(L0(),q,X5),J5(q),q5()}}function Ls(){return RJ}function Dk(){let Z=X4+e7;if(Z>0)l0("tengu_config_cache_stats",{cache_hits:X4,cache_misses:e7,hit_rate:X4/Z});X4=0,e7=0}function LJ(Z){if(Z.installMethod!==void 0)return Z;let q=Z,J="unknown",Q=Z.autoUpdates??!0;switch(q.autoUpdaterStatus){case"migrated":J="local";break;case"installed":J="native";break;case"disabled":Q=!1;break;case"enabled":case"no_permissions":case"not_configured":J="global";break;case void 0:break}return{...Z,installMethod:J,autoUpdates:Q}}function Ak(Z){if(!Z)return Z;let q={},J=!1;for(let[Q,X]of Object.entries(Z)){let $=X;if($.history!==void 0){J=!0;let{history:Y,...H}=$;q[Q]=H}else q[Q]=X}return J?q:Z}function jk(){if(WJ)return;WJ=!0;let Z=L0();Lk(Z,{interval:Tk,persistent:!1},(q)=>{if(q.mtimeMs<=t0.mtime)return;N().readFile(Z,{encoding:"utf-8"}).then((J)=>{if(q.mtimeMs<=t0.mtime)return;let Q=C0(d0(J));if(Q===null||typeof Q!=="object")return;t0={config:LJ({..._1(),...Q}),mtime:q.mtimeMs},x1={mtime:q.mtimeMs,size:q.size}}).catch(()=>{})}),Y4(async()=>{Bk(Z),WJ=!1})}function J5(Z){t0={config:Z,mtime:Date.now()},x1=null}function X0(){if(t0.config)return X4++,t0.config;e7++;try{let Z=null;try{Z=N().statSync(L0())}catch{}let q=LJ(X6(L0(),_1));return t0={config:q,mtime:Z?.mtimeMs??Date.now()},x1=Z?{mtime:Z.mtimeMs,size:Z.size}:null,jk(),q}catch{return LJ(X6(L0(),_1))}}function zs(){let Z=X0().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function Rs(Z){let q=X0();if(q.customApiKeyResponses?.approved?.includes(Z))return"approved";if(q.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function WB(Z,q,J){let Q=zJ(Z);N().mkdirSync(Q);let $=g5(q,(Y,H)=>m(Y)!==m(J[H]));if(D6(Z,m($,null,2),{encoding:"utf-8",mode:384}),Z===L0())RJ++}function VB(Z,q,J){let Q=q(),X=zJ(Z),$=N();$.mkdirSync(X);let Y;try{let H=`${Z}.lock`,K=Date.now();Y=cV(Z,{lockfilePath:H,onCompromised:(_)=>{x(`Config lock compromised: ${_}`,{level:"error"})}});let W=Date.now()-K;if(W>100)x("Lock acquisition took longer than expected - another Claude instance may be running"),l0("tengu_config_lock_contention",{lock_time_ms:W});if(x1&&Z===L0())try{let _=$.statSync(Z);if(_.mtimeMs!==x1.mtime||_.size!==x1.size)l0("tengu_config_stale_write",{read_mtime:x1.mtime,write_mtime:_.mtimeMs,read_size:x1.size,write_size:_.size})}catch(_){if(W0(_)!=="ENOENT")throw _}let U=X6(Z,q);if(Z===L0()&&$5(U))return x("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claudin/config.json. See GH #3117.",{level:"error"}),l0("tengu_config_auth_loss_prevented",{}),!1;let V=J(U);if(V===U)return!1;let L=g5(V,(_,z)=>m(_)!==m(Q[z]));try{let _=_J(Z),z=MJ();try{$.mkdirSync(z)}catch(j){if(W0(j)!=="EEXIST")throw j}let R=60000,D=$.readdirStringSync(z).filter((j)=>j.startsWith(`${_}.backup.`)).sort().reverse(),F=D[0],k=F?Number(F.split(".backup.").pop()):0,M=Number.isNaN(k)||Date.now()-k>=R;if(M){let j=I0(z,`${_}.backup.${Date.now()}`);$.copyFileSync(Z,j)}let O=5,T=M?$.readdirStringSync(z).filter((j)=>j.startsWith(`${_}.backup.`)).sort().reverse():D;for(let j of T.slice(O))try{$.unlinkSync(I0(z,j))}catch{}}catch(_){if(W0(_)!=="ENOENT")x(`Failed to backup config: ${_}`,{level:"error"})}if(D6(Z,m(L,null,2),{encoding:"utf-8",mode:384}),Z===L0())RJ++;return!0}finally{if(Y)Y()}}function Ms(){return Q5}function Fs(){if(Q5)return;let Z=Date.now();Y0("info","enable_configs_started"),Q5=!0,X6(L0(),_1,!0),Y0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function MJ(){return I0(G0(),"backups")}function YB(Z){let q=N(),J=_J(Z),Q=MJ();try{let Y=q.readdirStringSync(Q).filter((H)=>H.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return I0(Q,Y)}catch{}let X=zJ(Z);try{let Y=q.readdirStringSync(X).filter((K)=>K.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return I0(X,Y);let H=`${Z}.backup`;try{return q.statSync(H),H}catch{}}catch{}return null}function X6(Z,q,J){if(!Q5)throw Error("Config accessed before allowed.");let Q=N();try{let X=Q.readFileSync(Z,{encoding:"utf-8"});try{let $=q0(d0(X));return{...q(),...$}}catch($){let Y=$ instanceof Error?$.message:String($);throw new t7(Y,Z,q())}}catch(X){if(W0(X)==="ENOENT"){let Y=YB(Z);if(Y)process.stderr.write(`
90
+ Claude configuration file not found at: ${Z}
91
+ A backup file exists at: ${Y}
92
+ You can manually restore it by running: cp "${Y}" "${Z}"
93
+
94
+ `);return q()}if(X instanceof t7&&J)throw X;if(X instanceof t7){if(x(`Config file corrupted, resetting to defaults: ${X.message}`,{level:"error"}),!KJ){KJ=!0;try{f(X);let _=!1;try{Q.statSync(`${Z}.backup`),_=!0}catch{}l0("tengu_config_parse_error",{has_backup:_})}finally{KJ=!1}}process.stderr.write(`
95
+ Claude configuration file at ${Z} is corrupted: ${X.message}
96
+ `);let Y=_J(Z),H=MJ();try{Q.mkdirSync(H)}catch(_){if(W0(_)!=="EEXIST")throw _}let K=Q.readdirStringSync(H).filter((_)=>_.startsWith(`${Y}.corrupted.`)),W,U=!1,V=Q.readFileSync(Z,{encoding:"utf-8"});for(let _ of K)try{let z=Q.readFileSync(I0(H,_),{encoding:"utf-8"});if(V===z){U=!0;break}}catch{}if(!U){W=I0(H,`${Y}.corrupted.${Date.now()}`);try{Q.copyFileSync(Z,W),x(`Corrupted config backed up to: ${W}`,{level:"error"})}catch{}}let L=YB(Z);if(W)process.stderr.write(`The corrupted file has been backed up to: ${W}
97
+ `);else if(U)process.stderr.write(`The corrupted file has already been backed up.
98
+ `);if(L)process.stderr.write(`A backup file exists at: ${L}
99
+ You can manually restore it by running: cp "${L}" "${Z}"
100
+
101
+ `);else process.stderr.write(`
102
+ `)}return q()}}function FJ(){let Z=t1(),q=Q6.get(Z);if(q!==void 0)return Q6.delete(Z),Q6.set(Z,q),q;let J=s6(Z),Q=J?y1(J):y1(Z5(Z));if(Q6.size>=Ik){let X=Q6.keys().next().value;if(X!==void 0)Q6.delete(X)}return Q6.set(Z,Q),Q}function Y5(){let Z=FJ(),q=X0();if(!q.projects)return q2;let J=q.projects[Z]??q2;if(typeof J.allowedTools==="string")J.allowedTools=C0(J.allowedTools)??[];return J}function DJ(Z){let q=FJ(),J=null;try{if(VB(L0(),_1,(X)=>{let $=X.projects?.[q]??q2,Y=Z($);if(Y===$)return X;return J={...X,projects:{...X.projects,[q]:Y}},J})&&J)J5(J),q5()}catch(Q){x(`Failed to save config with lock: ${Q}`,{level:"error"});let X=X6(L0(),_1);if($5(X)){x("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),l0("tengu_config_auth_loss_prevented",{});return}let $=X.projects?.[q]??q2,Y=Z($);if(Y===$)return;J={...X,projects:{...X.projects,[q]:Y}},WB(L0(),J,X5),J5(J),q5()}}function Ok(){return wk()!==null}function Ds(){return Ok()&&!Z0(process.env.FORCE_AUTOUPDATE_PLUGINS)}function As(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function wk(Z){if(Z0(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let q=Z?.ignoreClaudinDefaultPrivacy?nV():$J();if(q)return{type:"env",envVar:q};let J=X0();if(J.autoUpdates===!1&&(J.installMethod!=="native"||J.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function Ts(){let Z=X0();if(Z.userID)return Z.userID;let q=Vk(32).toString("hex");return M0((J)=>({...J,userID:q})),q}function js(){if(!X0().firstStartTime){let q=new Date().toISOString();M0((J)=>({...J,firstStartTime:J.firstStartTime??q}))}}function Is(Z){let q=t1();switch(Z){case"User":return I0(G0(),"CLAUDE.md");case"Local":return I0(q,"CLAUDE.local.md");case"Project":return I0(q,s7);case"Managed":return I0(D1(),"CLAUDE.md");case"AutoMem":return RV()}return _k.getTeamMemEntrypoint()}function Os(){return I0(D1(),".claudin","rules")}function ws(){return I0(G0(),"rules")}function xs(Z){t0.config=Z,t0.mtime=Z?Date.now():0}var _k,KJ=!1,q2,Ys,X5,zk,Rk,KB=!1,Fk,UJ,VJ,t0,x1=null,X4=0,e7=0,RJ=0,_s=20,Tk=1000,WJ=!1,Q5=!1,Ik=32,Q6,ks,Ns,Ps;var AJ=B(()=>{qX();j6();mq();D$();q1();GB();Z1();K2();Kq();c0();C1();C4();D0();R2();m4();v4();lV();p0();w4();YJ();p4();sV();z0();rV();_k=($B(),$4(XB)),q2={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},Ys=["off","compact","full"];X5=_1(),zk=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","narrationHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","copyFullResponse","copyOnSelect","flickerFreeMode","permissionExplainerEnabled","prStatusFooterEnabled","prStatusHosts","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled","autoBackgroundAgentsEnabled","oauthBrowser","inlineImagesMode"];Rk=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"];Fk={...X5,autoUpdates:!1,knowledgeGraphEnabled:!0};UJ={...q2};VJ=new Set;t0={config:null,mtime:0};Y4(async()=>{Dk()});Q6=new Map;ks=X6,Ns=$5,Ps=BJ});function H5(Z){return Z.split(/[;,]/).map((q)=>q.trim()).filter((q)=>q.length>0)}function BB(Z){let q=H5(Z);return q.length>0?q[0]:Z.trim()}var TJ=()=>{};import{randomBytes as kk}from"crypto";function J2(Z){return Z?.trim()??""}function B0(Z){let q=J2(Z);return q.length>0?q:void 0}function Nk(Z){return J2(Z).replace(/\/+$/,"")}function Pk(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function xk(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function Ek(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let q={};for(let[J,Q]of Object.entries(Z)){let X=J2(J),$=typeof Q==="string"?Q.trim():"";if(X.length>0&&$.length>0)q[X]=$}return Object.keys(q).length>0?q:void 0}function vk(Z){if(!Z||typeof Z!=="object")return;let q={},J=B0(Z.codexAuthPath);if(J)q.codexAuthPath=J;let Q=B0(Z.codexAccountId);if(Q)q.codexAccountId=Q;let X=B0(Z.githubToken);if(X)q.githubToken=X;let $=B0(Z.awsRegion);if($)q.awsRegion=$;let Y=B0(Z.gcpProject);if(Y)q.gcpProject=Y;let H=B0(Z.gcpRegion);if(H)q.gcpRegion=H;let K=B0(Z.azureResource);if(K)q.azureResource=K;let W=Ek(Z.customHeaders);if(W)q.customHeaders=W;let U=xk(Z.reasoningEffort);if(U)q.reasoningEffort=U;return Object.keys(q).length>0?q:void 0}function MB(Z){let q=J2(Z.id),J=J2(Z.name),Q=Pk(Z.provider),X=Nk(Z.baseUrl),$=J2(Z.model);if(!q||!J||!X||Q!=="anthropic"&&!$)return null;let H={id:q,name:J,provider:Q,baseUrl:X,model:$,apiKey:B0(Z.apiKey)},K=vk(Z.extras);if(K)H.extras=K;return H}function yk(Z){let q=new Set,J=[];for(let Q of Z??[]){let X=MB(Q);if(!X||q.has(X.id))continue;q.add(X.id),J.push(X)}return J}function Ck(){return`provider_${kk(6).toString("hex")}`}function FB(Z,q=Ck()){return MB({id:q,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function DB(Z,q=X0()){return q.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function hs(Z){switch(Z){case"anthropic":return{provider:"anthropic",name:"Anthropic",baseUrl:"https://api.anthropic.com",model:"",apiKey:"",requiresApiKey:!0};case"openai":return{provider:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"gpt-5.4",apiKey:"",requiresApiKey:!0};case"kimi-code":return{provider:"openai",name:"Moonshot AI - Kimi Code",baseUrl:"https://api.kimi.com/coding/v1",model:"kimi-for-coding",apiKey:"",requiresApiKey:!0};case"moonshotai":return{provider:"openai",name:"Moonshot AI - API",baseUrl:"https://api.moonshot.ai/v1",model:"kimi-k2.5",apiKey:"",requiresApiKey:!0};case"deepseek":return{provider:"openai",name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-v4-flash, deepseek-v4-pro, deepseek-chat, deepseek-reasoner",apiKey:"",requiresApiKey:!0};case"gemini":return{provider:"gemini",name:"Google Gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",model:"gemini-3-flash-preview",apiKey:"",requiresApiKey:!0};case"mistral":return{provider:"mistral",name:"Mistral",baseUrl:"https://api.mistral.ai/v1",model:"devstral-latest",apiKey:"",requiresApiKey:!0};case"together":return{provider:"openai",name:"Together AI",baseUrl:"https://api.together.xyz/v1",model:"Qwen/Qwen3.5-9B",apiKey:"",requiresApiKey:!0};case"groq":return{provider:"openai",name:"Groq",baseUrl:"https://api.groq.com/openai/v1",model:"llama-3.3-70b-versatile",apiKey:"",requiresApiKey:!0};case"azure-openai":return{provider:"openai",name:"Azure OpenAI",baseUrl:"https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1",model:"YOUR-DEPLOYMENT-NAME",apiKey:"",requiresApiKey:!0};case"openrouter":return{provider:"openai",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",model:"openai/gpt-5-mini",apiKey:"",requiresApiKey:!0};case"lmstudio":return{provider:"openai",name:"LM Studio",baseUrl:"http://localhost:1234/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"dashscope-cn":return{provider:"openai",name:"Alibaba Coding Plan (China)",baseUrl:"https://coding.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"dashscope-intl":return{provider:"openai",name:"Alibaba Coding Plan",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"custom":return{provider:"openai",name:"Custom OpenAI-compatible",baseUrl:LB,model:_B,apiKey:"",requiresApiKey:!1};case"nvidia-nim":return{provider:"openai",name:"NVIDIA NIM",baseUrl:"https://integrate.api.nvidia.com/v1",model:"nvidia/llama-3.1-nemotron-70b-instruct",apiKey:"",requiresApiKey:!0};case"minimax":return{provider:"openai",name:"MiniMax",baseUrl:"https://api.minimax.io/v1",model:"MiniMax-M2.5",apiKey:"",requiresApiKey:!0};case"atomic-chat":return{provider:"openai",name:"Atomic Chat",baseUrl:"http://127.0.0.1:1337/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"bankr":return{provider:"openai",name:"Bankr",baseUrl:"https://llm.bankr.bot/v1",model:"claude-opus-4.6",apiKey:"",requiresApiKey:!0};case"bedrock":return{provider:"bedrock",name:"AWS Bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"vertex":return{provider:"vertex",name:"Google Vertex AI",baseUrl:"https://us-central1-aiplatform.googleapis.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"foundry":return{provider:"foundry",name:"Azure AI Foundry",baseUrl:"https://YOUR-RESOURCE-NAME.services.ai.azure.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"opencode-zen":return{provider:"openai",name:"OpenCode Zen",baseUrl:"https://opencode.ai/zen/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"opencode-go":return{provider:"openai",name:"OpenCode GO",baseUrl:"https://opencode.ai/zen/go/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"zai":return{provider:"openai",name:"Z.AI (GLM Coding Plan)",baseUrl:"https://api.z.ai/api/coding/paas/v4",model:"glm-5.2",apiKey:"",requiresApiKey:!0};case"cloudflare-workers-ai":return{provider:"openai",name:"Cloudflare Workers AI",baseUrl:"https://api.cloudflare.com/client/v4/accounts/YOUR-ACCOUNT-ID/ai/v1",model:"@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"cloudflare-ai-gateway":return{provider:"openai",name:"Cloudflare AI Gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/YOUR-ACCOUNT-ID/default/compat",model:"workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:LB,model:_B,apiKey:"",requiresApiKey:!1}}}function g0(Z=X0()){return yk(Z.providerProfiles)}function gs(Z=X0()){return g0(Z).length>0}function z1(Z=X0()){let q=g0(Z);if(q.length===0)return;let J=B0(Y5().activeProviderProfileId);if(J){let X=q.find(($)=>$.id===J);if(X)return X}let Q=B0(Z.activeProviderProfileId);return q.find((X)=>X.id===Q)??q[0]}function fs(){let Z=B0(Y5().activeProviderProfileId);if(!Z)return;return g0().some((J)=>J.id===Z)?Z:void 0}function Sk(){return B0(Y5().activeProviderProfileId)}function ms(){return Sk()!==void 0}function bk(){return B0(X0().activeProviderProfileId)}function us(Z,q){let J=FB(Z);if(!J)return null;let Q=q?.makeActive??!0;if(M0((X)=>{let Y=[...g0(X),J],H=B0(X.activeProviderProfileId),K=Q||!H||!Y.some((W)=>W.id===H)?J.id:H;return{...X,providerProfiles:Y,activeProviderProfileId:K}}),bk()===J.id)gk(J.id),mk();return J}function ps(Z,q){let J=FB(q,Z);if(!J)return null;let Q=!1;if(M0((X)=>{let $=g0(X),Y=$.findIndex((L)=>L.id===Z);if(Y<0)return X;Q=!0;let H=[...$];H[Y]=J;let K={...X.openaiAdditionalModelOptionsCacheByProfile??{}};delete K[Z];let W=B0(X.activeProviderProfileId),U=W&&H.some((L)=>L.id===W)?W:H[0]?.id;return{...X,providerProfiles:H,activeProviderProfileId:U,openaiAdditionalModelOptionsCacheByProfile:K,openaiAdditionalModelOptionsCache:U===Z?[]:X.openaiAdditionalModelOptionsCache}}),!Q)return null;return J}function ds(Z){let q=B0(Z);if(!q)return null;let J=z1();if(!J)return null;if(H5(J.model).includes(q))return J;M0(($)=>{let Y=g0($),H=Y.findIndex((U)=>U.id===J.id);if(H<0)return $;let K=Y[H];if(K.model===q)return $;let W=[...Y];return W[H]={...K,model:q},{...$,providerProfiles:W}});let X=z1();if(!X||X.id!==J.id)return null;return X}function cs(){let Z=z1();if(!Z)return;M0((q)=>{let J=g0(q),Q=J.findIndex((Y)=>Y.id===Z.id);if(Q<0)return q;let X=J[Q];if(!X.model)return q;let $=[...J];return $[Q]={...X,model:""},{...q,providerProfiles:$}})}function hk(Z){let q=H5(Z.model);if(q.length===0)return[];return q.map((J)=>({value:J,label:J,description:`Provider: ${Z.name}`}))}function jJ(Z,q){let J=hk(Z);return{openaiAdditionalModelOptionsCache:J.length>0?J:DB(Z.id,q),openaiAdditionalModelOptionsCacheByProfile:{...q.openaiAdditionalModelOptionsCacheByProfile??{},[Z.id]:J.length>0?J:q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[]}}}function gk(Z){let q=X0(),Q=g0(q).find((X)=>X.id===Z);if(!Q)return null;return M0((X)=>({...X,activeProviderProfileId:Z,...jJ(Q,X)})),Q}function ls(Z){if(Z===null){DJ(($)=>({...$,activeProviderProfileId:void 0,activeModelForProject:void 0}));let X=z1();if(X)zB(X);return null}let J=g0().find((X)=>X.id===Z);if(!J)return null;let Q=!1;if(DJ((X)=>{if(!g0().some((H)=>H.id===Z))return Q=!0,X;let Y={...X,activeProviderProfileId:Z};if(X.activeProviderProfileId!==Z)Y.activeModelForProject=void 0;return Y}),Q)return null;return zB(J),J}function zB(Z){let q=X0(),J=jJ(Z,q),Q=q.openaiAdditionalModelOptionsCache??[],X=q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[],$=J.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[];if(RB(Q,J.openaiAdditionalModelOptionsCache??[])&&RB(X,$))return;M0((Y)=>({...Y,...jJ(Z,Y)}))}function RB(Z,q){if(Z.length!==q.length)return!1;for(let J=0;J<Z.length;J++)if(Z[J]!==q[J])return!1;return!0}function fk(Z,q){if(!Z)return{projects:Z,stripped:[]};let J=($)=>{let Y=$?.activeProviderProfileId;return Y!=null&&q(Y)?Y:void 0};if(!Object.values(Z).some(($)=>J($)!==void 0))return{projects:Z,stripped:[]};let Q=[];return{projects:Object.fromEntries(Object.entries(Z).map(([$,Y])=>{let H=J(Y);if(H!==void 0){let{activeProviderProfileId:K,activeModelForProject:W,...U}=Y;return Q.push({path:$,activeProviderProfileId:H,activeModelForProject:W??void 0}),[$,U]}return[$,Y]})),stripped:Q}}function ns(Z){let q=!1,J;return M0((Q)=>{let X=g0(Q);if(!X.find((L)=>L.id===Z))return Q;q=!0;let Y=X.filter((L)=>L.id!==Z),H=B0(Q.activeProviderProfileId),W=!H||H===Z||!Y.some((L)=>L.id===H)?Y[0]?.id:H;if(W)J=Y.find((L)=>L.id===W)??Y[0];let U={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete U[Z];let{projects:V}=fk(Q.projects,(L)=>L===Z);return{...Q,providerProfiles:Y,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:U,openaiAdditionalModelOptionsCache:W?DB(W,{...Q,openaiAdditionalModelOptionsCacheByProfile:U}):[],projects:V}}),{removed:q,activeProfileId:J?.id}}function is(Z=X0()){let q=z1(Z);if(!q)return Z.openaiAdditionalModelOptionsCache??[];let J=Z.openaiAdditionalModelOptionsCacheByProfile?.[q.id];if(J)return J;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function as(Z){let q=z1();if(!q){M0((J)=>({...J,openaiAdditionalModelOptionsCache:Z}));return}M0((J)=>({...J,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...J.openaiAdditionalModelOptionsCacheByProfile??{},[q.id]:Z}}))}function mk(){let Z=z1();if(!Z){M0((q)=>({...q,openaiAdditionalModelOptionsCache:[]}));return}M0((q)=>{let J={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete J[Z.id],{...q,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:J}})}var LB="http://localhost:11434/v1",_B="llama3.1:8b";var AB=B(()=>{AJ();TJ()});function G5(Z,q){return{name:`${Z.name}-with-${q.name}-fallback`,read(){let J=Z.read();if(J!==null&&J!==void 0)return J;return q.read()||{}},async readAsync(){let J=await Z.readAsync();if(J!==null&&J!==void 0)return J;return await q.readAsync()||{}},update(J){let Q=Z.read(),X=Z.update(J);if(X.success){if(Q===null)q.delete();return X}let $=q.update(J);if($.success){if(Q!==null)Z.delete();return{success:!0,warning:$.warning}}return{success:!1}},delete(){let J=Z.delete(),Q=q.delete();return J||Q}}}var TB=()=>{};function K5(Z,q,J=10*IB*jB){let W=[];try{let Q;if(q===void 0)Q={};else if(q instanceof AbortSignal)Q={abortSignal:q,timeout:J};else Q=q;let{abortSignal:X,timeout:$=10*IB*jB,input:Y,stdio:H=["ignore","pipe","pipe"]}=Q;X?.throwIfAborted();const K=L6(W,j4`exec: ${Z.slice(0,200)}`,0);try{let _=N0(Z,{env:process.env,maxBuffer:1e6,timeout:$,cwd:r(),stdio:H,shell:!0,reject:!1,input:Y});if(!_.stdout)return null;return _.stdout.trim()||null}catch{return null}}catch(U){var V=U,L=1}finally{_6(W,V,L)}}var jB=1000,IB=60;var IJ=B(()=>{u6();q1();z0()});import{createHash as uk}from"crypto";import{userInfo as pk}from"os";function $6(Z=""){let q=G0(),Q=!process.env.CLAUDIN_CONFIG_DIR?"":`-${uk("sha256").update(q).digest("hex").substring(0,8)}`;return`Claude Code${OB().OAUTH_FILE_SUFFIX}${Z}${Q}`}function H4(Z=""){return $6(Z)}function O0(){try{return process.env.USER||pk().username}catch{return"claude-code-user"}}function wJ(){$0.cache={data:null,cachedAt:0},$0.generation++,$0.readInFlight=null}function Yr(Z){if($0.cache.cachedAt!==0)return;let q=null;if(Z)try{q=JSON.parse(Z)}catch{return}$0.cache={data:q,cachedAt:Date.now()}}var f0="-credentials",OJ=30000,$0;var U5=B(()=>{hU();c0();$0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function ck(){try{let Z=H4(f0),q=O0(),{stdout:J,code:Q}=await a("security",["find-generic-password","-a",q,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(Q===0&&J)return q0(J.trim())}catch(Z){}return null}function Lr(){if(Q2!==void 0)return Q2;if(process.platform!=="darwin")return Q2=!1,!1;try{Q2=N0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{Q2=!1}return Q2}var dk=4032,kJ,Q2;var wB=B(()=>{u6();Z1();b4();IJ();z0();U5();kJ={name:"keychain",read(){let Z=$0.cache;if(Date.now()-Z.cachedAt<OJ)return Z.data;try{let q=H4(f0),J=O0(),Q=K5(`security find-generic-password -a "${J}" -w -s "${q}"`);if(Q){let X=q0(Q);return $0.cache={data:X,cachedAt:Date.now()},X}}catch(q){}if(Z.data!==null)return x("[keychain] read failed; serving stale cache",{level:"warn"}),$0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return $0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=$0.cache;if(Date.now()-Z.cachedAt<OJ)return Z.data;if($0.readInFlight)return $0.readInFlight;let q=$0.generation,J=ck().then((Q)=>{if(q===$0.generation){if(Q===null&&Z.data!==null)x("[keychain] readAsync failed; serving stale cache",{level:"warn"});let X=Q??Z.data;return $0.cache={data:X,cachedAt:Date.now()},$0.readInFlight=null,X}return Q});return $0.readInFlight=J,J},update(Z){wJ();try{let q=H4(f0),J=O0(),Q=m(Z),X=Buffer.from(Q,"utf-8").toString("hex"),$=`add-generic-password -U -a "${J}" -s "${q}" -X "${X}"
103
+ `,Y;if($.length<=dk)Y=N0("security",["-i"],{input:$,stdio:["pipe","pipe","pipe"],reject:!1});else x(`Keychain payload (${Q.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=N0("security",["add-generic-password","-U","-a",J,"-s",q,"-X",X],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return $0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(q){return{success:!1}}},delete(){wJ();try{let Z=H4(f0),q=O0();return K5(`security delete-generic-password -a "${q}" -s "${Z}"`),!0}catch(Z){return!1}}}});var NJ;var kB=B(()=>{u6();z0();U5();NJ={name:"libsecret",read(){try{let Z=O0(),q=$6(f0),J=N0("secret-tool",["lookup","service",q,"account",Z],{reject:!1});if(J.exitCode===0&&J.stdout)return q0(J.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let q=O0(),J=$6(f0),Q=m(Z);return{success:N0("secret-tool",["store","--label",J,"service",J,"account",q],{input:Q,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=O0(),q=$6(f0);return N0("secret-tool",["clear","service",q,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as lk}from"path";function G4(Z){return Z.replace(/'/g,"''")}function W5(){return $6(f0)}function NB(){return`${W5()}:${O0()}`}function PJ(){let Z=W5().replace(/[^a-zA-Z0-9._-]/g,"_");return lk(G0(),`${Z}.secure.dpapi`)}function K4(Z,q){try{return N0("powershell.exe",["-Command",Z],{input:q?.input,reject:!1})}catch{return null}}function nk(Z,q){let J=Z?.stderr?.trim();if(J)return J;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${q} (exit code ${Z.exitCode}).`;return q}function PB(){let Z=W5().replace(/"/g,'`"'),q=O0().replace(/"/g,'`"'),J=`
104
+ Add-Type -AssemblyName System.Runtime.WindowsRuntime
105
+ try {
106
+ $vault = New-Object Windows.Security.Credentials.PasswordVault
107
+ $cred = $vault.Retrieve("${Z}", "${q}")
108
+ $cred.FillPassword()
109
+ [Console]::Out.Write($cred.Password)
110
+ } catch {
111
+ exit 1
112
+ }
113
+ `,Q=K4(J);if(Q?.exitCode===0&&Q.stdout)try{return q0(Q.stdout)}catch{return null}return null}var xJ;var xB=B(()=>{u6();c0();z0();U5();xJ={name:"credential-locker-dpapi",read(){let Z=G4(PJ()),q=G4(NB()),J=`
114
+ try {
115
+ Add-Type -AssemblyName System.Security
116
+ $path = '${Z}'
117
+ if (!(Test-Path -LiteralPath $path)) {
118
+ exit 1
119
+ }
120
+
121
+ $protectedBase64 = [System.IO.File]::ReadAllText(
122
+ $path,
123
+ [System.Text.Encoding]::UTF8
124
+ ).Trim()
125
+ if (-not $protectedBase64) {
126
+ exit 1
127
+ }
128
+
129
+ $protectedBytes = [Convert]::FromBase64String($protectedBase64)
130
+ $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${q}')
131
+ $bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
132
+ $protectedBytes,
133
+ $entropyBytes,
134
+ [System.Security.Cryptography.DataProtectionScope]::CurrentUser
135
+ )
136
+ [Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
137
+ } catch {
138
+ exit 1
139
+ }
140
+ `,Q=K4(J);if(Q?.exitCode===0&&Q.stdout)try{return q0(Q.stdout)}catch{return PB()}return PB()},async readAsync(){return this.read()},update(Z){let q=G4(PJ()),J=G4(NB()),Q=m(Z),X=`
141
+ try {
142
+ Add-Type -AssemblyName System.Security
143
+ $path = '${q}'
144
+ $directory = [System.IO.Path]::GetDirectoryName($path)
145
+ if ($directory) {
146
+ [System.IO.Directory]::CreateDirectory($directory) | Out-Null
147
+ }
148
+
149
+ $payload = [Console]::In.ReadToEnd()
150
+ $bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
151
+ $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${J}')
152
+ $protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
153
+ $bytes,
154
+ $entropyBytes,
155
+ [System.Security.Cryptography.DataProtectionScope]::CurrentUser
156
+ )
157
+ $protectedBase64 = [Convert]::ToBase64String($protectedBytes)
158
+ [System.IO.File]::WriteAllText(
159
+ $path,
160
+ $protectedBase64,
161
+ [System.Text.Encoding]::UTF8
162
+ )
163
+ } catch {
164
+ Write-Error $_.Exception.Message
165
+ exit 1
166
+ }
167
+ `,$=K4(X,{input:Q});if($?.exitCode===0)return{success:!0};return{success:!1,warning:nk($,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let q=`
168
+ try {
169
+ $path = '${G4(PJ())}'
170
+ if (Test-Path -LiteralPath $path) {
171
+ Remove-Item -LiteralPath $path -Force
172
+ }
173
+ } catch {
174
+ exit 1
175
+ }
176
+ `,J=K4(q),Q=W5().replace(/"/g,'`"'),X=O0().replace(/"/g,'`"'),$=`
177
+ Add-Type -AssemblyName System.Runtime.WindowsRuntime
178
+ try {
179
+ $vault = New-Object Windows.Security.Credentials.PasswordVault
180
+ $cred = $vault.Retrieve("${Q}", "${X}")
181
+ $vault.Remove($cred)
182
+ } catch {
183
+ exit 0
184
+ }
185
+ `,Y=K4($);return(J?.exitCode??1)===0}}});import{chmodSync as ik}from"fs";import{join as ak}from"path";function V5(){let Z=G0(),q=".credentials.json";return{storageDir:Z,storagePath:ak(Z,".credentials.json")}}var U4;var vB=B(()=>{c0();C1();D0();z0();U4={name:"plaintext",read(){let{storagePath:Z}=V5();try{let q=N().readFileSync(Z,{encoding:"utf8"});return q0(q)}catch{return null}},async readAsync(){let{storagePath:Z}=V5();try{let q=await N().readFile(Z,{encoding:"utf8"});return q0(q)}catch{return null}},update(Z){try{let{storageDir:q,storagePath:J}=V5();try{N().mkdirSync(q)}catch(Q){if(W0(Q)!=="EEXIST")throw Q}return EB(J,m(Z),{encoding:"utf8",flush:!1}),ik(J,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=V5();try{return N().unlinkSync(Z),!0}catch(q){if(W0(q)==="ENOENT")return!0;return!1}}}});function yB(Z){let q=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return q?G5(kJ,U4):kJ;if(process.platform==="linux")return q?G5(NJ,U4):NJ;if(process.platform==="win32")return q?G5(xJ,U4):xJ;return q?U4:ok}var ok;var CB=B(()=>{TB();wB();kB();xB();vB();ok={name:"unavailable-secure-storage",read:()=>null,readAsync:async()=>null,update:()=>({success:!1,warning:"Secure storage is unavailable on this platform without plaintext fallback."}),delete:()=>!0}});function S(Z){if(typeof Z!=="string")return;let q=Z.trim();return q?q:void 0}function EJ(Z=process.env){return S(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function pr(Z=process.env){let q=S(Z.CODEX_OAUTH_CALLBACK_PORT);if(!q)return 1455;let J=Number.parseInt(q,10);if(Number.isInteger(J)&&J>=0&&J<=65535)return J;return 1455}function vJ(Z){let q=Z.split(".");if(q.length<2)return;try{let J=q[1].replace(/-/g,"+").replace(/_/g,"/"),Q=J+"=".repeat((4-J.length%4)%4),X=Buffer.from(Q,"base64").toString("utf8"),$=JSON.parse(X);return $&&typeof $==="object"?$:void 0}catch{return}}function m0(Z){if(!Z)return;let q=vJ(Z),J=q?.["https://api.openai.com/auth"]&&typeof q["https://api.openai.com/auth"]==="object"?q["https://api.openai.com/auth"]:void 0,Q=J?.organizations,X=Array.isArray(Q)&&Q.length>0&&typeof Q[0]==="object"?Q[0].id:void 0;return S(J?.chatgpt_account_id??q?.["https://api.openai.com/auth.chatgpt_account_id"]??q?.chatgpt_account_id??X)??void 0}function dr(Z){return Z.replace(/[&<>"']/g,(q)=>{switch(q){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&#39;";default:return q}})}async function bB(Z){let q=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:EJ(),requested_token:"openai-api-key",subject_token:Z,subject_token_type:"urn:ietf:params:oauth:token-type:id_token"}),J=await fetch("https://auth.openai.com/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:q,signal:AbortSignal.timeout(15000)});if(!J.ok){let $=await J.text().catch(()=>"");throw Error($.trim()?`Codex API key exchange failed (${J.status}): ${$.trim()}`:`Codex API key exchange failed with status ${J.status}.`)}let Q=await J.json(),X=S(Q.access_token);if(!X)throw Error("Codex API key exchange completed, but no API key token was returned.");return X}var fr="https://auth.openai.com",SB="https://auth.openai.com/oauth/token",mr="openid profile email offline_access api.connectors.read api.connectors.invoke",ur="codex_cli_rs";var yJ=()=>{};function _5(){return yB({allowPlainTextFallback:!0})}function hB(Z){if(!Z)return;let J=vJ(Z)?.exp;if(typeof J==="number"&&Number.isFinite(J))return J*1000;return}function V4(Z){if(!Z||typeof Z!=="object")return;let q=Z,J=S(q.apiKey),Q=S(q.accessToken);if(!Q)return;let X=S(q.refreshToken),$=S(q.idToken),Y=S(q.accountId)??m0($)??m0(Q),H=S(q.profileId),K=typeof q.lastRefreshAt==="number"&&Number.isFinite(q.lastRefreshAt)?q.lastRefreshAt:void 0,W=typeof q.lastRefreshFailureAt==="number"&&Number.isFinite(q.lastRefreshFailureAt)?q.lastRefreshFailureAt:void 0;return{apiKey:J,accessToken:Q,refreshToken:X,idToken:$,accountId:Y,profileId:H,lastRefreshAt:K,lastRefreshFailureAt:W}}function tk(Z){let q=hB(Z.accessToken)??hB(Z.idToken);if(q===void 0)return!1;return q<=Date.now()+sk}function gB(Z,q=Date.now()){let J=Math.max(Z.lastRefreshFailureAt??0,L5??0);if(!J)return!1;return q-J<rk}function ek(Z,q){if(!q.trim())return`Codex token refresh failed with status ${Z}.`;try{let J=JSON.parse(q),Q=J.error&&typeof J.error==="object"?J.error:void 0,X=S(Q?.code??J.code),$=S(Q?.message??J.error_description)??q.trim();return X?`Codex token refresh failed (${X}): ${$}`:`Codex token refresh failed with status ${Z}: ${$}`}catch{return`Codex token refresh failed with status ${Z}: ${q.trim()}`}}function fB(){if(X2())return;try{let Z=_5().read();return V4(Z?.codex)}catch{return}}async function ZN(){if(X2())return;try{let Z=await _5().readAsync();return V4(Z?.codex)}catch{return}}function mB(Z,q=Date.now()){return gB(Z,q)}function uB(Z){if(X2())return{success:!1,warning:"Bare mode: secure storage is disabled."};let q=V4(Z);if(!q)return{success:!1,warning:"Codex credentials are incomplete."};let J=_5(),Q=J.read()||{},X=V4(Q[B5]),$={...Q,[B5]:{...q,profileId:q.profileId??X?.profileId,lastRefreshAt:q.lastRefreshAt??Date.now()}},Y=J.update($);if(Y.success)L5=V4($[B5])?.lastRefreshFailureAt??null;return Y}function qN(Z,q){if(!uB({...Z,lastRefreshFailureAt:q}).success)L5=q}function sr(){if(X2())return{success:!0};let Z=_5(),J={...Z.read()||{}};delete J[B5];let Q=Z.update(J);if(Q.success)L5=null;return Q}async function rr(Z){if(X2())return{refreshed:!1};if(B4()?.apiKey?.trim())return{refreshed:!1};let q=await ZN();if(!q)return{refreshed:!1};if(!q.refreshToken)return{refreshed:!1,credentials:q};if(!Z?.force&&!tk(q))return{refreshed:!1,credentials:q};if(gB(q))return{refreshed:!1,credentials:q};if(W4)return W4;return W4=(async()=>{let J=Date.now();try{let Q=new URLSearchParams({client_id:EJ(),grant_type:"refresh_token",refresh_token:q.refreshToken}),X=await fetch(SB,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:Q,signal:AbortSignal.timeout(15000)});if(!X.ok){let U=await X.text().catch(()=>"");throw Error(ek(X.status,U))}let $=await X.json(),Y=S($.access_token);if(!Y)throw Error("Codex token refresh succeeded without a new access token.");let H={accessToken:Y,refreshToken:S($.refresh_token)??q.refreshToken,idToken:S($.id_token)??q.idToken,accountId:m0($.id_token)??m0($.access_token)??q.accountId,lastRefreshAt:Date.now()},K=H.idToken??q.idToken;if(K)H.apiKey=await bB(K).catch((U)=>{x(`[codex] id-token → API-key exchange failed; falling back to access_token bearer: ${U instanceof Error?U.message:String(U)}`,{level:"warn"});return});let W=uB(H);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:H}}catch(Q){throw qN(q,J),Q}finally{W4=null}})(),W4}var B5="codex",sk=60000,rk=60000,W4=null,L5=null;var pB=B(()=>{Y6();Z1();c0();CB();yJ()});import{existsSync as JN,readFileSync as QN}from"node:fs";import{isIP as XN}from"node:net";import{homedir as $N}from"node:os";import{join as dB}from"node:path";function Yt(Z){if(!Z)return!1;try{let{hostname:q}=new URL(Z);return q==="api.x.ai"}catch{return!1}}function KN(Z){let q=Z.split(".").map((J)=>Number.parseInt(J,10));if(q.length!==4||q.some((J)=>Number.isNaN(J)))return!1;return q[0]===10||q[0]===172&&q[1]>=16&&q[1]<=31||q[0]===192&&q[1]===168}function UN(Z){let q=Z.split(":",1)[0];if(!q)return!1;let J=Number.parseInt(q,16);if(Number.isNaN(J))return!1;return(J&65024)===64512||(J&65472)===65152}function bJ(Z){if(!Z)return;let q=Z.trim();if(!q)return;if(q==="undefined")return;return q}function CJ(Z,q){for(let J of q){let Q=Z,X=!0;for(let Y of J){if(!Q||typeof Q!=="object"||!(Y in Q)){X=!1;break}Q=Q[Y]}if(!X)continue;let $=S(Q);if($)return $}return}function WN(Z){if(!Z)return;let q=Z.trim().toLowerCase();if(q==="low"||q==="medium"||q==="high"||q==="xhigh")return q;return}function cB(Z){let q=Z.trim(),J=q.indexOf("?");if(J===-1){let W=q.toLowerCase(),U=R5[W];if(U)return{raw:q,baseModel:U.model,reasoning:U.reasoningEffort?{effort:U.reasoningEffort}:void 0};return{raw:q,baseModel:q}}let Q=q.slice(0,J).trim(),X=new URLSearchParams(q.slice(J+1)),$=Q.toLowerCase(),Y=R5[$],H=Y?.model??Q,K=WN(X.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:q,baseModel:H,reasoning:typeof K==="string"?{effort:K}:K}}function oB(Z){let q=Z.trim().toLowerCase();return(q.split("?",1)[0]??q)in R5}function hJ(Z){let q=Z.trim().toLowerCase(),J=q.split("?",1)[0]??q;return HN.has(J)}function sB(Z){return hJ(Z)}function VN(Z,q){let J=bJ(q);return FN(J)||!J&&oB(Z)}function zN(Z){let q=Z.trim().toLowerCase();if(q.includes("codex"))return!0;let J=BN.exec(q);if(!J)return!1;if(Number(J[1])<5)return!1;if(q.startsWith("gpt-5-mini"))return!1;return!0}function rB(Z){if(!Z)return!1;try{let q=new URL(Z).hostname.toLowerCase();if(q.startsWith("[")&&q.endsWith("]"))q=q.slice(1,-1);let J=q.indexOf("%25");if(J!==-1)q=q.slice(0,J);if(GN.has(q)||q==="0.0.0.0")return!0;if(q.endsWith(".local"))return!0;let Q=XN(q);if(Q===4)return Number.parseInt(q.split(".",1)[0]??"",10)===127||KN(q);if(Q===6)return UN(q);return!1}catch{return!1}}function z5(Z){return Z.replace(gJ,"")}function RN(Z){let q=z5(Z);if(!q||q==="/")return"/v1";if(q.toLowerCase().endsWith("/v1"))return q;return`${q}/v1`}function MN(Z){try{let q=new URL(Z),J=q.hostname.toLowerCase(),Q=q.pathname.toLowerCase();if(q.port==="11434")return!0;return J.includes("ollama")||Q.includes("ollama")}catch{return!1}}function Ht(Z){if(!rB(Z))return[];try{let q=new URL(Z),J=z5(q.toString()),Q=new Set([J]),X=[],$=(K,W)=>{let U=new URL(q.toString());U.hostname=K,U.pathname=W,U.search="",U.hash="";let V=z5(U.toString());if(Q.has(V))return;Q.add(V),X.push(V)},Y=RN(q.pathname);if(Y!==z5(q.pathname))$(q.hostname,Y);let H=q.hostname.toLowerCase().replace(_N,"");if(H==="localhost"||H==="::1")$("127.0.0.1",q.pathname||"/"),$("127.0.0.1",Y);return X}catch{return[]}}function Gt(Z){if(!Z.hasTools)return!1;if(!rB(Z.baseUrl))return!1;return MN(Z.baseUrl)}function FN(Z){if(!Z)return!1;try{let q=new URL(Z);return q.hostname==="chatgpt.com"&&q.pathname.replace(gJ,"")==="/backend-api/codex"}catch{return!1}}function DN(Z){let q=Z.split("?",1)[0]??Z,J=q.includes(":")?q.split(":",2)[1].trim():q.trim();if(!J||J.toLowerCase()==="copilot")return aB;let Q=J.indexOf("/");if(Q!==-1)return J.slice(Q+1);return J}function lB(Z){let q=Z.split("?",1)[0]??Z,J=q.includes(":")?q.split(":",2)[1].trim():q.trim();if(!J||J.toLowerCase()==="copilot")return aB;return J}function iB(Z){if(!Z)return"copilot";try{let q=new URL(Z).hostname.toLowerCase();if(q==="api.githubcopilot.com"||q.endsWith(".githubcopilot.com")||q.startsWith("copilot-api."))return"copilot";if(q==="models.github.ai"||q.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function tB(Z){let q=null;try{let{tryGetActiveProvider:b}=(Y6(),$4(L4));q=b()}catch{q=null}let Q=q?.transport==="github_copilot",X=q?.model?.trim(),$=bJ(q?.baseUrl),Y=Z?.model?.trim()||X||Z?.fallbackModel?.trim()||(Q?"github:copilot":"gpt-4o"),H=cB(Y),K=bJ(Z?.baseUrl),W=K??$,V=Q&&oB(Y)&&W&&iB(W)==="custom"?void 0:W,L=K??V,_=X??"",R=hJ(_)?cB(_).baseModel:null,D=Boolean(Z?.model)&&Boolean(R)&&H.baseModel===R,F=hJ(Y)||D,M=!Q&&F&&!(L&&L!==SJ)?YN:L,O=Q?iB(L):"custom",T=Q&&O==="copilot",j=Q&&O==="models",A=Q&&O==="custom",g=Q?lB(Y):Y,w=VN(Y,M)||T&&zN(g)?"codex_responses":"chat_completions",P=T?DN(H.baseModel):j||A?lB(H.baseModel):H.baseModel,v=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(q?.extras?.reasoningEffort?{effort:q.extras.reasoningEffort}:void 0);return{transport:w,requestedModel:Y,resolvedModel:P,baseUrl:(M??(T&&w==="codex_responses"?nB:Q?nB:SJ)).replace(gJ,""),reasoning:v}}function Kt(){let Z=null;try{let{tryGetActiveProvider:Q}=(Y6(),$4(L4));Z=Q()}catch{Z=null}let q=Z?.transport;if(q!=="openai_compat"&&q!=="codex_responses"){if(!q||q==="anthropic")return"firstParty";return null}let J=tB();if(J.transport!=="chat_completions")return null;return`openai:${J.baseUrl.toLowerCase()}`}function Ut(){let Z=tB();if(Z.transport!=="chat_completions")return!1;let q=Z.baseUrl.toLowerCase();return q.includes("api.openai.com")||q===SJ}function eB(Z=process.env){let q=fJ();if(q)return q;let J=S(Z.CODEX_AUTH_JSON_PATH);if(J)return J;let Q=S(Z.CODEX_HOME);if(Q)return dB(Q,"auth.json");return dB($N(),".codex","auth.json")}function fJ(){try{let{tryGetActiveProvider:Z}=(Y6(),$4(L4));return S(Z()?.extras?.codexAuthPath)}catch{return}}function mJ(){try{let{tryGetActiveProvider:Z}=(Y6(),$4(L4));return S(Z()?.extras?.codexAccountId)}catch{return}}function ZL(Z){if(!JN(Z))return;try{let q=QN(Z,"utf8"),J=JSON.parse(q);return J&&typeof J==="object"?J:void 0}catch{return}}function qL(Z){let{authJson:q,authPath:J,envAccountId:Q}=Z;if(!q)return{apiKey:"",authPath:J,source:Z.missingSource??"none"};let X=CJ(q,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),$=CJ(q,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=Q??CJ(q,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??m0(X)??m0($);if(!X)return{apiKey:"",accountId:Y,authPath:J,source:Z.missingSource??"none"};return{apiKey:X,accountId:Y,authPath:J,source:"auth.json"}}function JL(Z){let{storedCredentials:q,envAccountId:J}=Z;return{apiKey:q.apiKey??q.accessToken,accountId:J??q.accountId??m0(q.idToken)??m0(q.accessToken),source:"secure-storage"}}function M5(Z,q){let J=S(Z.CODEX_API_KEY),X=mJ()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID);if(J)return{apiKey:J,accountId:X??m0(J),source:"env"};let $=fJ();if(!Boolean($??S(Z.CODEX_AUTH_JSON_PATH)??S(Z.CODEX_HOME))&&q?.explicitAuthPathOnly)return{apiKey:"",accountId:X,source:"none"};let H=eB(Z),K=ZL(H);return qL({authJson:K,authPath:H,envAccountId:X})}function Wt(Z){let q=Z?.env??process.env,J=M5(q,{explicitAuthPathOnly:!0}),Q=Boolean(fJ()??S(q.CODEX_AUTH_JSON_PATH)??S(q.CODEX_HOME)),X=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(Q||J.source==="env"||J.source==="auth.json")return J;if(Z?.storedCredentials?.accessToken)return JL({storedCredentials:Z.storedCredentials,envAccountId:mJ()??S(q.CODEX_ACCOUNT_ID)??S(q.CHATGPT_ACCOUNT_ID)});if(X)return M5(q);return AN(q)}function AN(Z=process.env){let q=mJ()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID),J=M5(Z,{explicitAuthPathOnly:!0});if(J.source==="env"||J.source==="auth.json"||J.authPath)return J;let Q=fB();if(Q?.accessToken){let X=JL({storedCredentials:Q,envAccountId:q});if(!(!X.accountId||mB(Q)))return X;let Y=eB(Z),H=ZL(Y),K=qL({authJson:H,authPath:Y,envAccountId:q});if(K.apiKey)return{...K,accountId:K.accountId??X.accountId};return X}return M5(Z)}function TN(Z){let q=Z.trim().toLowerCase(),Q=q.split("?",1)[0]??q;return R5[Q]?.reasoningEffort}function Vt(Z){let q=Z.trim().toLowerCase(),J=q.split("?",1)[0]??q;if(J==="gpt-5.3-codex-spark"||J==="codexspark")return!1;if(TN(J)!==void 0)return!0;return LN.test(J)}var SJ="https://api.openai.com/v1",YN="https://chatgpt.com/backend-api/codex",$t="https://api.x.ai/v1",aB="gpt-4o",R5,HN,GN,BN,LN,gJ,_N,nB="https://api.githubcopilot.com";var QL=B(()=>{pB();yJ();R5={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.5":{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.4":{model:"gpt-5.4",reasoningEffort:"high"},"gpt-5.3-codex":{model:"gpt-5.3-codex",reasoningEffort:"high"},"gpt-5.3-codex-spark":{model:"gpt-5.3-codex-spark"},codexspark:{model:"gpt-5.3-codex-spark"},"gpt-5.2-codex":{model:"gpt-5.2-codex",reasoningEffort:"high"},"gpt-5.1-codex-max":{model:"gpt-5.1-codex-max",reasoningEffort:"high"},"gpt-5.1-codex-mini":{model:"gpt-5.1-codex-mini"},"gpt-5.5-mini":{model:"gpt-5.5-mini",reasoningEffort:"medium"},"gpt-5.4-mini":{model:"gpt-5.4-mini",reasoningEffort:"medium"},"gpt-5.2":{model:"gpt-5.2",reasoningEffort:"medium"}},HN=new Set(["codexplan","codexspark"]),GN=new Set(["localhost","127.0.0.1","::1"]);BN=/^gpt-(\d+)/,LN=/^gpt-5(?:[.-]|$)/,gJ=/\/+$/,_N=/^\[|\]$/g});var L4={};Uq(L4,{tryGetActiveProvider:()=>B4,invalidateActiveProviderCache:()=>wN,getActiveProvider:()=>$L,_peekActiveProviderCacheForTesting:()=>kN,ActiveProviderNotConfiguredError:()=>F5});function jN(){if(XL)return;XL=!0,UB(()=>{H6=null})}function IN(Z,q){switch(Z.provider){case"anthropic":return"anthropic";case"gemini":return"gemini";case"mistral":return"mistral";case"bedrock":return"bedrock";case"vertex":return"vertex";case"foundry":return"foundry";case"openai":default:{if(Z.extras?.githubToken)return"github_copilot";if(sB(q))return"codex_responses";return"openai_compat"}}}function ON(Z){let q=BB(Z.model);return{transport:IN(Z,q),baseUrl:Z.baseUrl,model:q,apiKey:Z.apiKey,extras:Z.extras,name:Z.name}}function $L(){if(jN(),H6)return H6;let Z=z1(X0());if(!Z)throw new F5;return H6=ON(Z),H6}function B4(){try{return $L()}catch(Z){if(Z instanceof F5)return null;throw Z}}function wN(){H6=null}function kN(){return H6}var F5,H6=null,XL=!1;var Y6=B(()=>{AJ();AB();TJ();QL();F5=class F5 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function YL(Z){return Z.sort((q,J)=>{let Q=J.modified.getTime()-q.modified.getTime();if(Q!==0)return Q;return J.created.getTime()-q.created.getTime()})}var HL=()=>{};function GL(Z){if(typeof Z!=="string")return!1;let q=Z.trim();return q!==""&&q!=="."&&q!==".."&&!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("\x00")}function uJ(Z){if(typeof Z!=="string")throw TypeError("Expected a string");if(!GL(Z))throw Error(`Unsafe filename: ${JSON.stringify(Z)}`)}var Ft;var KL=B(()=>{Ft=Object.freeze([""," ",".",".."," .",". "," ..",".. ","../","../foo","foo/../bar","foo/bar","foo\\bar","foo\x00bar"])});import o from"node:path";import UL from"node:os";import pJ from"node:process";function cJ(Z,{suffix:q="nodejs"}={}){if(uJ(Z),q)Z+=`-${q}`;if(uJ(Z),pJ.platform==="darwin")return NN(Z);if(pJ.platform==="win32")return PN(Z);return xN(Z)}var E1,dJ,$2,NN=(Z)=>{let q=o.join(E1,"Library");return{data:o.join(q,"Application Support",Z),config:o.join(q,"Preferences",Z),cache:o.join(q,"Caches",Z),log:o.join(q,"Logs",Z),temp:o.join(dJ,Z)}},PN=(Z)=>{let q=$2.APPDATA||o.join(E1,"AppData","Roaming"),J=$2.LOCALAPPDATA||o.join(E1,"AppData","Local");return{data:o.join(J,Z,"Data"),config:o.join(q,Z,"Config"),cache:o.join(J,Z,"Cache"),log:o.join(J,Z,"Log"),temp:o.join(dJ,Z)}},xN=(Z)=>{let q=o.basename(E1);return{data:o.join($2.XDG_DATA_HOME||o.join(E1,".local","share"),Z),config:o.join($2.XDG_CONFIG_HOME||o.join(E1,".config"),Z),cache:o.join($2.XDG_CACHE_HOME||o.join(E1,".cache"),Z),log:o.join($2.XDG_STATE_HOME||o.join(E1,".local","state"),Z),temp:o.join(dJ,q,Z)}};var WL=B(()=>{KL();E1=UL.homedir(),dJ=UL.tmpdir(),{env:$2}=pJ});import{join as D5}from"path";function LL(Z){let q=Z.replace(/[^a-zA-Z0-9]/g,"-");if(q.length<=VL)return q;return`${q.slice(0,VL)}-${Math.abs(BL(Z)).toString(36)}`}function T5(Z){return LL(Z)}var A5,VL=200,_L;var zL=B(()=>{WL();D0();EN();A5=cJ("claude-cli");_L={baseLogs:()=>D5(A5.cache,T5(N().cwd())),errors:()=>D5(A5.cache,T5(N().cwd()),"errors"),messages:()=>D5(A5.cache,T5(N().cwd()),"messages"),mcpLogs:(Z)=>D5(A5.cache,T5(N().cwd()),`mcp-logs-${LL(Z)}`)}});function ML(Z){return Z.replace(RL,"").trim()||Z}function FL(Z){return Z.replace(RL,"").trim()}function Et(Z){return Z.replace(vN,"").trim()}var RL,vN;var DL=B(()=>{RL=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;vN=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});import{readdir as CN,readFile as SN,stat as bN}from"fs/promises";import{join as hN}from"path";function lt(Z,q){let J=Z.firstPrompt?.startsWith(`<${IL}>`),Q=Z.firstPrompt?FL(Z.firstPrompt):"",X=Q&&!J,$=Z.agentName||Z.customTitle||Z.summary||(X?Q:void 0)||q||(J?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return ML($).trim()}function gN(Z){return Z.toISOString().replace(/[:.]/g,"-")}function mN(Z){if(_4.length>=fN)_4.shift();_4.push(Z)}function nt(Z){if(E0!==null)return;if(E0=Z,G6.length>0){let q=[...G6];G6.length=0;for(let J of q)switch(J.type){case"error":E0.logError(J.error);break;case"mcpError":E0.logMCPError(J.serverName,J.error);break;case"mcpDebug":E0.logMCPDebug(J.serverName,J.message);break}}}function f(Z){let q=jL(Z);try{let J=B4()?.transport;if(J==="bedrock"||J==="vertex"||J==="foundry"||process.env.DISABLE_ERROR_REPORTING||XJ())return;let X={error:q.stack||q.message,timestamp:new Date().toISOString()};if(mN(X),E0===null){G6.push({type:"error",error:q});return}E0.logError(q)}catch{}}function at(){return[..._4]}function uN(){return pN(_L.errors())}async function ot(Z){return(await uN())[Z]||null}async function pN(Z){let q;try{q=await CN(Z,{withFileTypes:!0})}catch{return f(Error(`No logs found at ${Z}`)),[]}let J=await Promise.all(q.map(async(Q,X)=>{let $=hN(Z,Q.name),Y=await SN($,{encoding:"utf8"}),H=q0(Y),K=H[0],W=H[H.length-1],U=K?.type==="user"&&typeof K?.message?.content==="string"?K?.message?.content:"No prompt",V=await bN($),L=$.includes("sidechain"),_=gN(V.mtime);return{date:_,fullPath:$,messages:H,value:X,created:lJ(K?.timestamp||_),modified:W?.timestamp?lJ(W.timestamp):lJ(_),firstPrompt:U.split(`
186
+ `)[0]?.slice(0,50)+(U.length>50?"…":"")||"No prompt",messageCount:H.length,isSidechain:L}}));return YL(J.filter((Q)=>Q!==null)).map((Q,X)=>({...Q,value:X}))}function lJ(Z){let q=Z.split(/\D+/);return new Date(Date.UTC(parseInt(q[0],10),parseInt(q[1],10)-1,parseInt(q[2],10),parseInt(q[3],10),parseInt(q[4],10),parseInt(q[5],10),parseInt(q[6],10)))}function st(Z,q){try{if(E0===null){G6.push({type:"mcpError",serverName:Z,error:q});return}E0.logMCPError(Z,q)}catch{}}function rt(Z,q){try{if(E0===null){G6.push({type:"mcpDebug",serverName:Z,message:q});return}E0.logMCPDebug(Z,q)}catch{}}function tt(Z,q){if(!q||!q.startsWith("repl_main_thread"))return;let{messages:J,...Q}=Z;AL(Q),TL(null)}function et(){E0=null,G6.length=0,_4=[]}var fN=100,_4,G6,E0=null,it;var p0=B(()=>{v1();j6();Y6();yN();HL();zL();DL();C1();YJ();z0();_4=[];G6=[];it=d(()=>{return process.argv.includes("--hard-fail")})});import OL from"node:path";function cN(Z){return Z.includes(OL.sep)||Z.includes("/")||OL.isAbsolute(Z)}function lN(Z){let q=Z.trim();if(!q)return"Unsafe executable: empty command";if(z4.test(q))return"Unsafe executable: control characters are not allowed";if(!cN(q)&&!dN.test(q))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function nN(Z){for(let q of Z)if(z4.test(q))return"Unsafe argument: control characters are not allowed";return null}function iN(Z){if(!Z)return null;if(z4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function aN(Z){if(!Z)return{};for(let[q,J]of Object.entries(Z)){if(z4.test(q))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof J==="string"&&z4.test(J))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function oN(Z,q){if(typeof Z.signal==="string")return Z.signal;return String(q)}function a(Z,q,J={timeout:10*iJ*nJ,preserveOutputOnError:!0,useCwd:!0}){return b1(Z,q,{abortSignal:J.abortSignal,timeout:J.timeout,preserveOutputOnError:J.preserveOutputOnError,cwd:J.useCwd?r():void 0,env:J.env,stdin:J.stdin,input:J.input})}function b1(Z,q,{abortSignal:J,timeout:Q=10*iJ*nJ,preserveOutputOnError:X=!0,cwd:$,env:Y,maxBuffer:H=wL,stdin:K,input:W}={timeout:10*iJ*nJ,preserveOutputOnError:!0,maxBuffer:wL}){let U=lN(Z);if(U)return Promise.resolve({stdout:"",stderr:"",code:1,error:U});let V=nN(q);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=iN($);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let _=aN(Y);if(_.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:_.error});return new Promise((z)=>{let R=W!==void 0?"pipe":K??"pipe",D=kL.spawn(Z,q,{cwd:$,env:_.value,shell:!1,signal:J,stdio:[R,"pipe","pipe"]}),F=!1,k="",M="",O=0,T,j=!1,A=(P)=>{if(F)return;F=!0,z(P)},g=(P,v)=>{let b=typeof P==="string"?P:P.toString("utf8");if(O+=Buffer.byteLength(b,"utf8"),O>H){D.kill(),A({stdout:X?k:"",stderr:X?M:"",code:1,error:"maxBuffer exceeded"});return}if(v==="stdout")k+=b;else M+=b};D.stdout?.on("data",(P)=>g(P,"stdout")),D.stderr?.on("data",(P)=>g(P,"stderr")),D.once("spawn",()=>{if(R==="pipe"&&D.stdin)if(W!==void 0)D.stdin.end(W);else D.stdin.end()}),D.once("error",(P)=>{f(P),A({stdout:"",stderr:"",code:1,error:P.message})});let w=Q>0?setTimeout(()=>{j=!0,D.kill()},Q):void 0;D.once("close",(P,v)=>{if(w)clearTimeout(w);T=v??void 0;let b=P??1;if(j){A({stdout:X?k:"",stderr:X?M:"",code:b,error:`Command timed out after ${Q}ms`});return}if(b!==0){if(X)A({stdout:k,stderr:M,code:b,error:oN({signal:T},b)});else A({stdout:"",stderr:"",code:b});return}A({stdout:k,stderr:M,code:0})})})}var kL,nJ=1000,iJ=60,wL=1e6,z4,dN;var b4=B(()=>{q1();p0();IJ();kL=oY(h5(),1),z4=/[\0\r\n]/,dN=/^[A-Za-z0-9_.-]+$/});import{readFile as sN}from"fs/promises";import{join as rN}from"path";async function R4(Z,q,J,Q){try{let X=await sN(rN(Z,"config"),"utf-8");return tN(X,q,J,Q)}catch{return null}}function tN(Z,q,J,Q){let X=Z.split(`
187
+ `),$=q.toLowerCase(),Y=Q.toLowerCase(),H=!1;for(let K of X){let W=K.trim();if(W.length===0||W[0]==="#"||W[0]===";")continue;if(W[0]==="["){H=JP(W,$,J);continue}if(!H)continue;let U=eN(W);if(U&&U.key.toLowerCase()===Y)return U.value}return null}function eN(Z){let q=0;while(q<Z.length&&QP(Z[q]))q++;if(q===0)return null;let J=Z.slice(0,q);while(q<Z.length&&(Z[q]===" "||Z[q]==="\t"))q++;if(q>=Z.length||Z[q]!=="=")return null;q++;while(q<Z.length&&(Z[q]===" "||Z[q]==="\t"))q++;let Q=ZP(Z,q);return{key:J,value:Q}}function ZP(Z,q){let J="",Q=!1,X=q;while(X<Z.length){let $=Z[X];if(!Q&&($==="#"||$===";"))break;if($==='"'){Q=!Q,X++;continue}if($==="\\"&&X+1<Z.length){let Y=Z[X+1];if(Q){switch(Y){case"n":J+=`
188
+ `;break;case"t":J+="\t";break;case"b":J+="\b";break;case'"':J+='"';break;case"\\":J+="\\";break;default:J+=Y;break}X+=2;continue}if(Y==="\\"){J+="\\",X+=2;continue}}J+=$,X++}if(!Q)J=qP(J);return J}function qP(Z){let q=Z.length;while(q>0&&(Z[q-1]===" "||Z[q-1]==="\t"))q--;return Z.slice(0,q)}function JP(Z,q,J){let Q=1;while(Q<Z.length&&Z[Q]!=="]"&&Z[Q]!==" "&&Z[Q]!=="\t"&&Z[Q]!=='"')Q++;if(Z.slice(1,Q).toLowerCase()!==q)return!1;if(J===null)return Q<Z.length&&Z[Q]==="]";while(Q<Z.length&&(Z[Q]===" "||Z[Q]==="\t"))Q++;if(Q>=Z.length||Z[Q]!=='"')return!1;Q++;let $="";while(Q<Z.length&&Z[Q]!=='"'){if(Z[Q]==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(Y==="\\"||Y==='"'){$+=Y,Q+=2;continue}$+=Y,Q+=2;continue}$+=Z[Q],Q++}if(Q>=Z.length||Z[Q]!=='"')return!1;if(Q++,Q>=Z.length||Z[Q]!=="]")return!1;return $===J}function QP(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var NL=()=>{};import{unwatchFile as PL,watchFile as XP}from"fs";import{readdir as $P,readFile as K6,stat as vL}from"fs/promises";import{join as v0,resolve as j5}from"path";function Re(){Y2.clear()}async function u0(Z){let q=j5(Z??r()),J=Y2.get(q);if(J!==void 0)return J;let Q=G2(q);if(!Q)return Y2.set(q,null),null;let X=v0(Q,".git");try{if((await vL(X)).isFile()){let Y=(await K6(X,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),K=j5(Q,H);return Y2.set(q,K),K}}return Y2.set(q,X),X}catch{return Y2.set(q,null),null}}function I5(Z){if(!Z||Z.startsWith("-")||Z.startsWith("/"))return!1;if(Z.includes(".."))return!1;if(Z.split("/").some((q)=>q==="."||q===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(Z))return!1;return!0}function aJ(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function M4(Z){try{let q=(await K6(v0(Z,"HEAD"),"utf-8")).trim();if(q.startsWith("ref:")){let J=q.slice(4).trim();if(J.startsWith("refs/heads/")){let X=J.slice(11);if(!I5(X))return null;return{type:"branch",name:X}}if(!I5(J))return null;let Q=await H2(Z,J);return Q?{type:"detached",sha:Q}:{type:"detached",sha:""}}if(!aJ(q))return null;return{type:"detached",sha:q}}catch{return null}}async function H2(Z,q){let J=await xL(Z,q);if(J)return J;let Q=await U6(Z);if(Q&&Q!==Z)return xL(Q,q);return null}async function xL(Z,q){try{let J=(await K6(v0(Z,q),"utf-8")).trim();if(J.startsWith("ref:")){let Q=J.slice(4).trim();if(!I5(Q))return null;return H2(Z,Q)}if(!aJ(J))return null;return J}catch{}try{let J=await K6(v0(Z,"packed-refs"),"utf-8");for(let Q of J.split(`
189
+ `)){if(Q.startsWith("#")||Q.startsWith("^"))continue;let X=Q.indexOf(" ");if(X===-1)continue;if(Q.slice(X+1)===q){let $=Q.slice(0,X);return aJ($)?$:null}}}catch{}return null}async function U6(Z){try{let q=(await K6(v0(Z,"commondir"),"utf-8")).trim();return j5(Z,q)}catch{return null}}async function YP(Z,q,J){try{let Q=(await K6(v0(Z,q),"utf-8")).trim();if(Q.startsWith("ref:")){let X=Q.slice(4).trim();if(X.startsWith(J)){let $=X.slice(J.length);if(!I5($))return null;return $}}}catch{}return null}class yL{gitDir=null;commonDir=null;initialized=!1;initPromise=null;watchedPaths=[];branchRefPath=null;cache=new Map;async ensureStarted(){if(this.initialized)return;if(this.initPromise)return this.initPromise;return this.initPromise=this.start(),this.initPromise}async start(){if(this.gitDir=await u0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await U6(this.gitDir),this.watchPath(v0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(v0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),Y4(async()=>{this.stopWatching()})}watchPath(Z,q){this.watchedPaths.push(Z),XP(Z,{interval:HP},q)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await M4(this.gitDir),q=this.commonDir??this.gitDir,J=Z?.type==="branch"?v0(q,"refs","heads",Z.name):null;if(J===this.branchRefPath)return;if(this.branchRefPath)PL(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((Q)=>Q!==this.branchRefPath);if(this.branchRefPath=J,!J)return;this.watchPath(J,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await EL(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)PL(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,q){await this.ensureStarted();let J=this.cache.get(Z);if(J&&!J.dirty)return J.value;if(J)J.dirty=!1;let Q=await q(),X=this.cache.get(Z);if(X&&!X.dirty)X.value=Q;if(!X)this.cache.set(Z,{value:Q,dirty:!1,compute:q});return Q}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function GP(){let Z=await u0();if(!Z)return"HEAD";let q=await M4(Z);if(!q)return"HEAD";return q.type==="branch"?q.name:"HEAD"}async function KP(){let Z=await u0();if(!Z)return"";let q=await M4(Z);if(!q)return"";if(q.type==="branch")return await H2(Z,`refs/heads/${q.name}`)??"";return q.sha}async function UP(){let Z=await u0();if(!Z)return null;let q=await R4(Z,"remote","origin","url");if(q)return q;let J=await U6(Z);if(J&&J!==Z)return R4(J,"remote","origin","url");return null}async function WP(){let Z=await u0();if(!Z)return"main";let q=await U6(Z)??Z,J=await YP(q,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(J)return J;for(let Q of["main","master"])if(await H2(q,`refs/remotes/origin/${Q}`))return Q;return"main"}function CL(){return O5.get("branch",GP)}function SL(){return O5.get("head",KP)}function bL(){return O5.get("remoteUrl",UP)}function hL(){return O5.get("defaultBranch",WP)}async function Me(Z){let q=await u0(Z);if(!q)return null;let J=await M4(q);if(!J)return null;if(J.type==="branch")return H2(q,`refs/heads/${J.name}`);return J.sha}async function Fe(Z){let q;try{let Q=(await K6(v0(Z,".git"),"utf-8")).trim();if(!Q.startsWith("gitdir:"))return null;q=j5(Z,Q.slice(7).trim())}catch{return null}let J=await M4(q);if(!J)return null;if(J.type==="branch")return H2(q,`refs/heads/${J.name}`);return J.sha}async function De(Z){let q=await u0(Z);if(!q)return null;let J=await R4(q,"remote","origin","url");if(J)return J;let Q=await U6(q);if(Q&&Q!==q)return R4(Q,"remote","origin","url");return null}async function gL(){let Z=await u0();if(!Z)return!1;let q=await U6(Z)??Z;try{return await vL(v0(q,"shallow")),!0}catch{return!1}}async function fL(){try{let Z=await u0();if(!Z)return 0;let q=await U6(Z)??Z;return(await $P(v0(q,"worktrees"))).length+1}catch{return 1}}var Y2,HP=1000,O5;var mL=B(()=>{j6();GB();q1();R2();NL();Y2=new Map;O5=new yL});import{createHash as VP}from"crypto";import{readFileSync as oJ,realpathSync as uL,statSync as pL}from"fs";import{open as BP,readdir as LP,readFile as _P,realpath as dL,stat as oL}from"fs/promises";import{basename as zP,dirname as sJ,join as F0,resolve as k5,sep as cL}from"path";function RP(){function Z(q){let J=lL(q);return J===sL?null:J}return Z.cache=lL.cache,Z}function MP(){function Z(q){let J=G2(q);if(!J)return null;return rJ(J)}return Z.cache=rJ.cache,Z}function FP(Z){let q=new Set,J=[];for(let Q of Z){if(!Q||q.has(Q))continue;q.add(Q),J.push(Q)}return J}function he(Z,q){return FP([s6(Z),...q.map((J)=>s6(J))])}async function ge(Z,q){let J=q?.maxDepth??3,Q=q?.maxDirs??1500,X=[],$=0,Y=async(K)=>{try{return await oL(F0(K,".git")),!0}catch{return!1}},H=async(K,W)=>{if(W>J||$>=Q)return;let U;try{U=await LP(K,{withFileTypes:!0})}catch{return}for(let V of U){if($>=Q)return;if(!V.isDirectory())continue;if(V.name.startsWith(".")||DP.has(V.name))continue;let L=F0(K,V.name);if($++,await Y(L)){X.push(rJ(L.normalize("NFC")));continue}await H(L,W+1)}};return await H(Z,1),X}function fe(Z){return u0(Z)}async function me(){let Z=r(),q=G2(Z);if(!q)return!1;try{let[J,Q]=await Promise.all([dL(Z),dL(q)]);return J===Q}catch{return Z===q}}function IP(Z){let q=Z.trim();if(!q)return null;let J=q.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(J&&J[1]&&J[2])return`${J[1]}/${J[2]}`.toLowerCase();let Q=q.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(Q&&Q[1]&&Q[2]){let X=Q[1],$=Q[2];if(vP(X)&&$.startsWith("git/")){let Y=$.slice(4),H=Y.split("/");if(H.length>=3&&H[0].includes("."))return Y.toLowerCase();return`github.com/${Y}`.toLowerCase()}return`${X}/${$}`.toLowerCase()}return null}async function pe(){let Z=await tJ();if(!Z)return null;let q=IP(Z);if(!q)return null;return VP("sha256").update(q).digest("hex").substring(0,16)}async function ie(){try{let[Z,q,J,Q,X,$]=await Promise.all([TP(),jP(),tJ(),OP(),wP(),NP()]);return{commitHash:Z,branchName:q,remoteUrl:J,isHeadOnRemote:Q,isClean:X,worktreeCount:$}}catch(Z){return null}}async function ae(){let{parseGitRemote:Z}=await import("./detectRepository-0.7.2-xgsqcqxv.mjs"),q=await tJ();if(!q)return x("Local GitHub repo: unknown"),null;let J=Z(q);if(J&&J.host==="github.com"){let Q=`${J.owner}/${J.name}`;return x(`Local GitHub repo: ${Q}`),Q}return x("Local GitHub repo: unknown"),null}async function xP(){let{stdout:Z,code:q}=await a(s(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(q===0&&Z.trim())return Z.trim();let{stdout:J,code:Q}=await a(s(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(Q===0){let $=J.match(/HEAD branch: (\S+)/);if($&&$[1])return`origin/${$[1]}`}let X=["origin/main","origin/staging","origin/master"];for(let $ of X){let{code:Y}=await a(s(),["rev-parse","--verify",$],{preserveOutputOnError:!1});if(Y===0)return $}return null}function EP(){return gL()}async function w5(){let{stdout:Z,code:q}=await a(s(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),J=Z.trim();if(q!==0||!J)return[];let Q=J.split(`
190
+ `).filter(Boolean),X=[],$=0;for(let Y of Q){if(X.length>=aL){x(`Untracked file capture: reached max file count (${aL})`);break}if(eJ(Y))continue;try{let K=(await oL(Y)).size;if(K>nL){x(`Untracked file capture: skipping ${Y} (exceeds ${nL} bytes)`);continue}if($+K>iL){x(`Untracked file capture: reached total size limit (${iL} bytes)`);break}if(K===0){X.push({path:Y,content:""});continue}let W=Math.min(PP,K),U=await BP(Y,"r");try{let V=Buffer.alloc(W),{bytesRead:L}=await U.read(V,0,W,0),_=V.subarray(0,L);if(ZQ(_))continue;let z;if(K<=W)z=_.toString("utf-8");else z=await _P(Y,"utf-8");X.push({path:Y,content:z}),$+=K}finally{await U.close()}}catch(H){x(`Failed to read untracked file ${Y}: ${H}`)}}return X}async function oe(){try{if(!await AP())return null;if(await EP()){x("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(s(),["diff","HEAD"]),w5()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let q=await xP();if(!q){x("No remote found, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(s(),["diff","HEAD"]),w5()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let{stdout:J,code:Q}=await a(s(),["merge-base","HEAD",q],{preserveOutputOnError:!1});if(Q!==0||!J.trim()){x("Merge-base failed, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(s(),["diff","HEAD"]),w5()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let X=J.trim(),[{stdout:$},Y,{stdout:H,code:K},{stdout:W},{stdout:U}]=await Promise.all([a(s(),["diff",X]),w5(),a(s(),["format-patch",`${X}..HEAD`,"--stdout"]),a(s(),["rev-parse","HEAD"]),a(s(),["rev-parse","--abbrev-ref","HEAD"])]),V=null;if(K===0&&H&&H.trim())V=H;let L=U?.trim();return{remote_base_sha:X,remote_base:q,patch:$||"",untracked_files:Y,format_patch:V,head_sha:W?.trim()||null,branch_name:L&&L!=="HEAD"?L:null}}catch(Z){return f(Z),null}}function vP(Z){let q=Z.split(":")[0]??"";return q==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(q)}function se(){let Z=N(),q=r(),J=F0(q,".git");try{let Q=Z.statSync(J);if(Q.isFile())return!1;if(Q.isDirectory()){let X=F0(J,"HEAD");try{if(Z.statSync(X).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(F0(q,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(F0(q,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(F0(q,"refs")).isDirectory())return!0}catch{}return!1}var sL,lL,G2,rJ,s6,DP,s,AP,O$=async(Z)=>{return G2(Z)!==null},TP=async()=>{return SL()},jP=async(Z)=>{if(Z){let{stdout:q,code:J}=await b1(s(),["--no-optional-locks","rev-parse","--abbrev-ref","HEAD"],{cwd:Z,timeout:5000,preserveOutputOnError:!1});return J===0?q.trim():""}return CL()},ue=async()=>{return hL()},tJ=async()=>{return bL()},OP=async()=>{let{code:Z}=await a(s(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},de=async()=>{let{stdout:Z,code:q}=await a(s(),["--no-optional-locks","rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1,useCwd:!0});return q===0&&parseInt(Z.trim(),10)>0},ce=async(Z)=>{let q=["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{stdout:J,code:Q}=Z?await b1(s(),q,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await a(s(),q,{preserveOutputOnError:!1,useCwd:!0});if(Q!==0)return{ahead:0,behind:0};let X=J.trim().split(/\s+/);if(X.length!==2)return{ahead:0,behind:0};let $=parseInt(X[0],10),Y=parseInt(X[1],10);return{ahead:Number.isFinite(Y)?Y:0,behind:Number.isFinite($)?$:0}},wP=async(Z)=>{let q=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)q.push("-uno");let{stdout:J}=await a(s(),q,{preserveOutputOnError:!1});return J.trim().length===0},le=async()=>{let{stdout:Z}=await a(s(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
191
+ `).map((q)=>q.trim().split(" ",2)[1]?.trim()).filter((q)=>typeof q==="string")},kP=async(Z)=>{let q=["--no-optional-locks","status","--porcelain"],{stdout:J}=Z?await b1(s(),q,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await a(s(),q,{preserveOutputOnError:!1}),Q=[],X=[];return J.trim().split(`
192
+ `).filter(($)=>$.length>0).forEach(($)=>{let Y=$.substring(0,2),H=$.substring(2).trim();if(Y==="??")X.push(H);else if(H)Q.push(H)}),{tracked:Q,untracked:X}},NP=async()=>{return fL()},ne=async(Z)=>{try{let q=Z||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:J}=await kP();if(J.length>0){let{code:X}=await a(s(),["add",...J],{preserveOutputOnError:!1});if(X!==0)return!1}let{code:Q}=await a(s(),["stash","push","--message",q],{preserveOutputOnError:!1});return Q===0}catch(q){return!1}},nL=524288000,iL=5368709120,aL=20000,PP=65536;var R2=B(()=>{v1();qQ();q1();Z1();K2();b4();D0();mL();p0();O4();M7();sL=Symbol("git-root-not-found"),lL=M1((Z)=>{let q=Date.now();Y0("info","find_git_root_started");let J=k5(Z),Q=J.substring(0,J.indexOf(cL)+1)||cL,X=0;while(J!==Q){try{let Y=F0(J,".git");X++;let H=pL(Y);if(H.isDirectory()||H.isFile())return Y0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:X,found:!0}),J.normalize("NFC")}catch{}let $=sJ(J);if($===J)break;J=$}try{let $=F0(Q,".git");X++;let Y=pL($);if(Y.isDirectory()||Y.isFile())return Y0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:X,found:!0}),Q.normalize("NFC")}catch{}return Y0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:X,found:!1}),sL},(Z)=>Z,50),G2=RP();rJ=M1((Z)=>{try{let q=oJ(F0(Z,".git"),"utf-8").trim();if(!q.startsWith("gitdir:"))return Z;let J=k5(Z,q.slice(7).trim()),Q=k5(J,oJ(F0(J,"commondir"),"utf-8").trim());if(k5(sJ(J))!==F0(Q,"worktrees"))return Z;if(uL(oJ(F0(J,"gitdir"),"utf-8").trim())!==F0(uL(Z),".git"))return Z;if(zP(Q)!==".git")return Q.normalize("NFC");return sJ(Q).normalize("NFC")}catch{return Z}},(Z)=>Z,50),s6=MP();DP=new Set(["node_modules",".git","dist","build","out","target","vendor","coverage",".next",".turbo",".cache",".venv","venv","__pycache__"]);s=d(()=>{return R7("git")||"git"}),AP=d(async()=>{let Z=Date.now();Y0("info","is_git_check_started");let q=G2(r())!==null;return Y0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:q}),q})});
193
+ export{oi as a8,lW as b8,f0 as c8,H4 as d8,O0 as e8,wJ as f8,Yr as g8,U5 as h8,s4 as i8,z9 as j8,h5 as k8,wK as l8,kK as m8,Hq as n8,u6 as o8,iQ as p8,aQ as q8,g5 as r8,qX as s8,eJ as t8,qQ as u8,Y0 as v8,gP as w8,K2 as x8,K5 as y8,a as z8,b1 as A8,b4 as B8,R4 as C8,NL as D8,Re as E8,u0 as F8,H2 as G8,U6 as H8,Me as I8,Fe as J8,De as K8,mL as L8,$X as M8,YX as N8,Cx as O8,M1 as P8,O4 as Q8,z6 as R8,f5 as S8,vU as T8,R7 as U8,M7 as V8,G2 as W8,s6 as X8,FP as Y8,he as Z8,ge as _8,s as $8,AP as a9,fe as b9,me as c9,O$ as d9,TP as e9,jP as f9,ue as g9,tJ as h9,IP as i9,pe as j9,OP as k9,de as l9,ce as m9,wP as n9,le as o9,kP as p9,NP as q9,ne as r9,ie as s9,ae as t9,xP as u9,oe as v9,se as w9,R2 as x9,Dx as y9,y0 as z9,B6 as A9,px as B9,o_ as C9,dx as D9,GX as E9,KX as F9,c5 as G9,rx as H9,tx as I9,ex as J9,w4 as K9,zX as L9,RX as M9,OX as N9,wX as O9,iX as P9,aX as Q9,J$ as R9,Q$ as S9,s5 as T9,pz as U9,Q1 as V9,B2 as W9,wv as X9,kv as Y9,Nv as Z9,lz as _9,y4 as $9,V$ as a_,xv as b_,e5 as c_,B$ as d_,Z3 as e_,q3 as f_,_$ as g_,sv as h_,tz as i_,rv as j_,tv as k_,ev as l_,Zy as m_,z$ as n_,qy as o_,Jy as p_,Qy as q_,Xy as r_,$y as s_,Yy as t_,ZR as u_,Hy as v_,Gy as w_,Ky as x_,Uy as y_,D6 as z_,Wy as A_,Vy as B_,F$ as C_,By as D_,C4 as E_,GR as F_,k$ as G_,C0 as H_,py as I_,V3 as J_,dy as K_,cy as L_,m4 as M_,ay as N_,oy as O_,sy as P_,ry as Q_,ty as R_,ey as S_,j2 as T_,ZC as U_,qC as V_,B3 as W_,QC as X_,XC as Y_,n$ as Z_,D1 as __,I2 as $_,p4 as a$,o$ as b$,BC as c$,s$ as d$,yU as e$,CU as f$,L0 as g$,CI as h$,d6 as i$,Al as j$,Kq as k$,Il as l$,Ol as m$,wl as n$,kl as o$,Nl as p$,Pl as q$,xl as r$,El as s$,vl as t$,yl as u$,Cl as v$,Sl as w$,bl as x$,mU as y$,hl as z$,gl as A$,fl as B$,ml as C$,ul as D$,pl as E$,dl as F$,cl as G$,uU as H$,gI as I$,fI as J$,mI as K$,uI as L$,pI as M$,dI as N$,cI as O$,nI as P$,iI as Q$,aI as R$,dU as S$,lU as T$,nU as U$,oU as V$,Jn as W$,rU as X$,s1 as Y$,Wn as Z$,sI as _$,A7 as $$,Bn as aaa,qW as baa,I7 as caa,Fn as daa,Dn as eaa,An as faa,XW as gaa,TO as haa,Tn as iaa,jn as jaa,IO as kaa,In as laa,j7 as maa,NO as naa,EO as oaa,kn as paa,KW as qaa,Pn as raa,O7 as saa,UW as taa,WW as uaa,yO as vaa,CO as waa,vn as xaa,yn as yaa,Cn as zaa,VW as Aaa,BW as Baa,bn as Caa,hn as Daa,LW as Eaa,Rq as Faa,_W as Gaa,zW as Haa,mn as Iaa,RW as Jaa,n6 as Kaa,ln as Laa,FW as Maa,nn as Naa,DW as Oaa,on as Paa,AW as Qaa,TW as Raa,sn as Saa,rn as Taa,tn as Uaa,en as Vaa,Zi as Waa,fO as Xaa,qi as Yaa,Mq as Zaa,Vi as _aa,PW as $aa,xW as aba,P0 as bba,wi as cba,ki as dba,Ni as eba,i2 as fba,pi as gba,wq as hba,Ka as iba,v7 as jba,y7 as kba,Ua as lba,Wa as mba,sW as nba,gq as oba,fa as pba,o2 as qba,rW as rba,S7 as sba,GV as tba,n as uba,ma as vba,ua as wba,r1 as xba,pa as yba,b7 as zba,da as Aba,ca as Bba,Xw as Cba,la as Dba,na as Eba,ia as Fba,aa as Gba,oa as Hba,sa as Iba,UV as Jba,LV as Kba,Ho as Lba,Hw as Mba,Go as Nba,s2 as Oba,RV as Pba,Ko as Qba,mq as Rba,Ao as Sba,To as Tba,lV as Uba,XJ as Vba,YJ as Wba,s7 as Xba,oV as Yba,Jk as Zba,Oo as _ba,wo as $ba,sV as aca,Xk as bca,$k as cca,_0 as dca,ZB as eca,Q4 as fca,Uk as gca,Wk as hca,XB as ica,$B as jca,Ys as kca,X5 as lca,zk as mca,Hs as nca,Rk as oca,Gs as pca,Ks as qca,Us as rca,Ws as sca,Vs as tca,Bs as uca,UB as vca,M0 as wca,Ls as xca,_s as yca,X0 as zca,zs as Aca,Rs as Bca,Ms as Cca,Fs as Dca,FJ as Eca,Y5 as Fca,DJ as Gca,Ok as Hca,Ds as Ica,As as Jca,wk as Kca,Ts as Lca,js as Mca,Is as Nca,Os as Oca,ws as Pca,ks as Qca,Ns as Rca,Ps as Sca,xs as Tca,AJ as Uca,H5 as Vca,BB as Wca,TJ as Xca,hs as Yca,g0 as Zca,gs as _ca,z1 as $ca,fs as ada,Sk as bda,ms as cda,bk as dda,us as eda,ps as fda,ds as gda,cs as hda,hk as ida,gk as jda,ls as kda,fk as lda,ns as mda,is as nda,as as oda,mk as pda,AB as qda,Lr as rda,wB as sda,yB as tda,CB as uda,fr as vda,mr as wda,ur as xda,S as yda,EJ as zda,pr as Ada,m0 as Bda,dr as Cda,bB as Dda,yJ as Eda,ZN as Fda,uB as Gda,sr as Hda,rr as Ida,pB as Jda,SJ as Kda,YN as Lda,$t as Mda,Yt as Nda,rB as Oda,Ht as Pda,Gt as Qda,FN as Rda,iB as Sda,tB as Tda,Kt as Uda,Ut as Vda,Wt as Wda,AN as Xda,TN as Yda,Vt as Zda,QL as _da,F5 as $da,$L as aea,B4 as bea,wN as cea,kN as dea,Y6 as eea,YL as fea,HL as gea,_L as hea,zL as iea,ML as jea,FL as kea,Et as lea,DL as mea,lt as nea,gN as oea,nt as pea,f as qea,at as rea,uN as sea,ot as tea,st as uea,rt as vea,tt as wea,et as xea,p0 as yea};