@claudiolabs/claudin 1.1.2 → 1.1.4

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 (914) hide show
  1. package/README.md +28 -24
  2. package/dist/chunks/AgentTool-1.1.4-3bagecge.mjs +1 -0
  3. package/dist/chunks/App-1.1.4-4g3dh0nx.mjs +1 -0
  4. package/dist/chunks/ApproveApiKey-1.1.4-jxeaz5zn.mjs +1 -0
  5. package/dist/chunks/AssistantSessionChooser-1.1.4-9w92vdx4.mjs +1 -0
  6. package/dist/chunks/AutoModeOptInDialog-1.1.4-x17tymwk.mjs +1 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-1.1.4-7fg80a35.mjs +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.4-094y677a.mjs +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-1.1.4-y4jsq70q.mjs +1 -0
  10. package/dist/chunks/DiffDialog-1.1.4-wwr5yxnw.mjs +7 -0
  11. package/dist/chunks/Doctor-1.1.4-6z4qt6jr.mjs +1 -0
  12. package/dist/chunks/ExplorerDialog-1.1.4-e5w2phrt.mjs +6 -0
  13. package/dist/chunks/Grove-1.1.4-yj7xbcnq.mjs +1 -0
  14. package/dist/chunks/ITermBackend-1.1.4-rgme07qr.mjs +1 -0
  15. package/dist/chunks/InvalidConfigDialog-1.1.4-nyd8ja4h.mjs +1 -0
  16. package/dist/chunks/InvalidSettingsDialog-1.1.4-899r2pfm.mjs +1 -0
  17. package/dist/chunks/MigrationDialog-1.1.4-749tfrvg.mjs +1 -0
  18. package/dist/chunks/Onboarding-1.1.4-f019rkkj.mjs +1 -0
  19. package/dist/chunks/ProviderManager-1.1.4-9239x3zp.mjs +1 -0
  20. package/dist/chunks/REPL-1.1.4-9nb68maq.mjs +1 -0
  21. package/dist/chunks/ResumeConversation-1.1.4-7sr86ks3.mjs +1 -0
  22. package/dist/chunks/SnapshotUpdateDialog-1.1.4-av1tzhr1.mjs +1 -0
  23. package/dist/chunks/TeleportProgress-1.1.4-s1g49h7t.mjs +1 -0
  24. package/dist/chunks/TeleportRepoMismatchDialog-1.1.4-xq8vmgey.mjs +1 -0
  25. package/dist/chunks/TeleportResumeWrapper-1.1.4-nh55ntyd.mjs +1 -0
  26. package/dist/chunks/TmuxBackend-1.1.4-5gtjmz82.mjs +9 -0
  27. package/dist/chunks/ToolSearchTool-1.1.4-wk88hvrf.mjs +1 -0
  28. package/dist/chunks/TrustDialog-1.1.4-zvk6f63e.mjs +1 -0
  29. package/dist/chunks/activeProvider-1.1.4-3st8cbec.mjs +1 -0
  30. package/dist/chunks/add-dir-1.1.4-09gsa25v.mjs +1 -0
  31. package/dist/chunks/agentTypes-1.1.4-ee7w7dt5.mjs +1 -0
  32. package/dist/chunks/agents-1.1.4-8k4mrjt7.mjs +110 -0
  33. package/dist/chunks/agents-1.1.4-w929h9g2.mjs +3 -0
  34. package/dist/chunks/api-1.1.4-p7hbrnd7.mjs +1 -0
  35. package/dist/chunks/asciicast-1.1.4-7e877hqq.mjs +1 -0
  36. package/dist/chunks/assistant-1.1.4-jq08j7n1.mjs +1 -0
  37. package/dist/chunks/auth-1.1.4-d8jp870f.mjs +1 -0
  38. package/dist/chunks/auth-1.1.4-pjxgyew6.mjs +1 -0
  39. package/dist/chunks/autoMode-1.1.4-ar2t9451.mjs +48 -0
  40. package/dist/chunks/autoUpdater-1.1.4-6ywqc8jc.mjs +1 -0
  41. package/dist/chunks/backgroundHousekeeping-1.1.4-ymj2akh8.mjs +1 -0
  42. package/dist/chunks/branch-1.1.4-m28a3gah.mjs +4 -0
  43. package/dist/chunks/bridge-1.1.4-n515vy2d.mjs +2 -0
  44. package/dist/chunks/bridgeConfig-1.1.4-p3jq4sh0.mjs +1 -0
  45. package/dist/chunks/bridgeEnabled-1.1.4-0mda1at6.mjs +1 -0
  46. package/dist/chunks/bridgeMain-1.1.4-pya2apxm.mjs +88 -0
  47. package/dist/chunks/bridgePointer-1.1.4-qw0te2bm.mjs +1 -0
  48. package/dist/chunks/btw-1.1.4-fyx7t7q6.mjs +1 -0
  49. package/dist/chunks/buddy-1.1.4-hg600pq6.mjs +3 -0
  50. package/dist/chunks/cacache-1.1.4-ezqx7zp6.mjs +1 -0
  51. package/dist/chunks/cache-probe-1.1.4-zq67w2hp.mjs +21 -0
  52. package/dist/chunks/cacheStats-1.1.4-w4g7f1sd.mjs +4 -0
  53. package/dist/chunks/caches-1.1.4-smgwny8k.mjs +1 -0
  54. package/dist/chunks/claudeDesktop-1.1.4-09az178f.mjs +1 -0
  55. package/dist/chunks/claudemd-1.1.4-zkyggtev.mjs +1 -0
  56. package/dist/chunks/clear-1.1.4-jpcr7zvx.mjs +1 -0
  57. package/dist/chunks/clearTerminal-1.1.4-ncdjyhkh.mjs +1 -0
  58. package/dist/chunks/cli-1.1.4-081g3k6v.mjs +2 -0
  59. package/dist/chunks/cli-1.1.4-08dh9fvb.mjs +2 -0
  60. package/dist/chunks/cli-1.1.4-0a20jx5n.mjs +18 -0
  61. package/dist/chunks/cli-1.1.4-0earmzgk.mjs +12 -0
  62. package/dist/chunks/cli-1.1.4-0efkjzrt.mjs +18 -0
  63. package/dist/chunks/cli-1.1.4-0k0btfq4.mjs +2 -0
  64. package/dist/chunks/cli-1.1.4-0nxqjpe0.mjs +133 -0
  65. package/dist/chunks/cli-1.1.4-0r232fpm.mjs +2 -0
  66. package/dist/chunks/cli-1.1.4-0smy947g.mjs +2 -0
  67. package/dist/chunks/cli-1.1.4-0wp3qgzs.mjs +2 -0
  68. package/dist/chunks/cli-1.1.4-114zcxgj.mjs +2 -0
  69. package/dist/chunks/cli-1.1.4-17x2wrkx.mjs +2 -0
  70. package/dist/chunks/cli-1.1.4-181vbtfh.mjs +2 -0
  71. package/dist/chunks/cli-1.1.4-1bd9da9p.mjs +4 -0
  72. package/dist/chunks/cli-1.1.4-1f9d29qw.mjs +2 -0
  73. package/dist/chunks/cli-1.1.4-1gz31tm3.mjs +2 -0
  74. package/dist/chunks/cli-1.1.4-1kfdt9jy.mjs +2 -0
  75. package/dist/chunks/cli-1.1.4-2sdcr2b4.mjs +2 -0
  76. package/dist/chunks/cli-1.1.4-31av4ynk.mjs +2 -0
  77. package/dist/chunks/cli-1.1.4-3556r6d1.mjs +2 -0
  78. package/dist/chunks/cli-1.1.4-3d01w53d.mjs +2 -0
  79. package/dist/chunks/cli-1.1.4-3yy14yyg.mjs +2 -0
  80. package/dist/chunks/cli-1.1.4-3zzdhas7.mjs +2 -0
  81. package/dist/chunks/cli-1.1.4-40z19hth.mjs +2 -0
  82. package/dist/chunks/cli-1.1.4-4cg8jz3d.mjs +2 -0
  83. package/dist/chunks/cli-1.1.4-4esthaz8.mjs +21 -0
  84. package/dist/chunks/cli-1.1.4-4qsk7zj5.mjs +2 -0
  85. package/dist/chunks/cli-1.1.4-4tywpfrb.mjs +3 -0
  86. package/dist/chunks/cli-1.1.4-4yte7brd.mjs +25 -0
  87. package/dist/chunks/cli-1.1.4-50ktv3m1.mjs +2 -0
  88. package/dist/chunks/cli-1.1.4-53fvpymg.mjs +6 -0
  89. package/dist/chunks/cli-1.1.4-56nffz3p.mjs +17 -0
  90. package/dist/chunks/cli-1.1.4-5dc9c513.mjs +3 -0
  91. package/dist/chunks/cli-1.1.4-5ebh6981.mjs +2 -0
  92. package/dist/chunks/cli-1.1.4-5g0b74dj.mjs +2 -0
  93. package/dist/chunks/cli-1.1.4-5hz878ns.mjs +2 -0
  94. package/dist/chunks/cli-1.1.4-64y9aspn.mjs +2 -0
  95. package/dist/chunks/cli-1.1.4-6c3fshef.mjs +202 -0
  96. package/dist/chunks/cli-1.1.4-6c5tryej.mjs +2 -0
  97. package/dist/chunks/cli-1.1.4-6eacj91j.mjs +2 -0
  98. package/dist/chunks/cli-1.1.4-6f472s2j.mjs +2 -0
  99. package/dist/chunks/cli-1.1.4-6h6yt6jp.mjs +2 -0
  100. package/dist/chunks/cli-1.1.4-6raycx0k.mjs +2 -0
  101. package/dist/chunks/cli-1.1.4-6rkzmmby.mjs +2 -0
  102. package/dist/chunks/cli-1.1.4-6z69geef.mjs +5649 -0
  103. package/dist/chunks/cli-1.1.4-788c63fn.mjs +7 -0
  104. package/dist/chunks/cli-1.1.4-79y1pxkd.mjs +4 -0
  105. package/dist/chunks/cli-1.1.4-83vy9tsv.mjs +2 -0
  106. package/dist/chunks/cli-1.1.4-8hmaxd0s.mjs +2 -0
  107. package/dist/chunks/cli-1.1.4-8hr73xp2.mjs +2 -0
  108. package/dist/chunks/cli-1.1.4-8kx358k9.mjs +2 -0
  109. package/dist/chunks/cli-1.1.4-8rzb4wqq.mjs +4 -0
  110. package/dist/chunks/cli-1.1.4-99ept1n4.mjs +2 -0
  111. package/dist/chunks/cli-1.1.4-9cw2608s.mjs +2 -0
  112. package/dist/chunks/cli-1.1.4-9ms3b4tc.mjs +2 -0
  113. package/dist/chunks/cli-1.1.4-9tej4g5v.mjs +2 -0
  114. package/dist/chunks/cli-1.1.4-9x9a885k.mjs +17 -0
  115. package/dist/chunks/cli-1.1.4-a4fsxp91.mjs +2 -0
  116. package/dist/chunks/cli-1.1.4-aj4f4c5s.mjs +24 -0
  117. package/dist/chunks/cli-1.1.4-axp071a4.mjs +2 -0
  118. package/dist/chunks/cli-1.1.4-bhazhxsz.mjs +1 -0
  119. package/dist/chunks/cli-1.1.4-bnk38sjx.mjs +2 -0
  120. package/dist/chunks/cli-1.1.4-bx7r8yn5.mjs +2 -0
  121. package/dist/chunks/cli-1.1.4-bxd06hws.mjs +2 -0
  122. package/dist/chunks/cli-1.1.4-bxtvw0wr.mjs +2 -0
  123. package/dist/chunks/cli-1.1.4-c7a7aezt.mjs +2 -0
  124. package/dist/chunks/cli-1.1.4-cjw4z35m.mjs +2 -0
  125. package/dist/chunks/cli-1.1.4-ck3xhtdn.mjs +2 -0
  126. package/dist/chunks/cli-1.1.4-ckmk4b1r.mjs +2 -0
  127. package/dist/chunks/cli-1.1.4-cknrfh5p.mjs +6 -0
  128. package/dist/chunks/cli-1.1.4-cp707f4g.mjs +2 -0
  129. package/dist/chunks/cli-1.1.4-cst0a515.mjs +3 -0
  130. package/dist/chunks/cli-1.1.4-cwnt4by7.mjs +2 -0
  131. package/dist/chunks/cli-1.1.4-cyy7hkcy.mjs +2 -0
  132. package/dist/chunks/cli-1.1.4-d5vhgtz3.mjs +2 -0
  133. package/dist/chunks/cli-1.1.4-d8mes9hb.mjs +2 -0
  134. package/dist/chunks/cli-1.1.4-da50kprz.mjs +2 -0
  135. package/dist/chunks/cli-1.1.4-dapq2czd.mjs +3 -0
  136. package/dist/chunks/cli-1.1.4-dnypqpw6.mjs +3 -0
  137. package/dist/chunks/cli-1.1.4-dwez6b01.mjs +2 -0
  138. package/dist/chunks/cli-1.1.4-e73hv9nk.mjs +4 -0
  139. package/dist/chunks/cli-1.1.4-edegax48.mjs +2 -0
  140. package/dist/chunks/cli-1.1.4-ekbns70t.mjs +2 -0
  141. package/dist/chunks/cli-1.1.4-esw78wsd.mjs +2 -0
  142. package/dist/chunks/cli-1.1.4-etajychz.mjs +2 -0
  143. package/dist/chunks/cli-1.1.4-evye603x.mjs +5 -0
  144. package/dist/chunks/cli-1.1.4-ewczzrrj.mjs +24 -0
  145. package/dist/chunks/cli-1.1.4-f0ysrk67.mjs +2 -0
  146. package/dist/chunks/cli-1.1.4-f7y4b0px.mjs +2 -0
  147. package/dist/chunks/cli-1.1.4-fa18654s.mjs +2 -0
  148. package/dist/chunks/cli-1.1.4-fap2565a.mjs +15 -0
  149. package/dist/chunks/cli-1.1.4-fejb0548.mjs +2 -0
  150. package/dist/chunks/cli-1.1.4-ffgmpsez.mjs +133 -0
  151. package/dist/chunks/cli-1.1.4-fk420f57.mjs +16 -0
  152. package/dist/chunks/cli-1.1.4-g21fhx9n.mjs +9 -0
  153. package/dist/chunks/cli-1.1.4-g6nryz17.mjs +2 -0
  154. package/dist/chunks/cli-1.1.4-g8kh8f9a.mjs +2 -0
  155. package/dist/chunks/cli-1.1.4-gag1dbkn.mjs +2 -0
  156. package/dist/chunks/cli-1.1.4-gc3kgy7y.mjs +2 -0
  157. package/dist/chunks/cli-1.1.4-gey397p1.mjs +2 -0
  158. package/dist/chunks/cli-1.1.4-gfbktjpn.mjs +2 -0
  159. package/dist/chunks/cli-1.1.4-ghf3bx8w.mjs +20 -0
  160. package/dist/chunks/cli-1.1.4-gpskbg68.mjs +2 -0
  161. package/dist/chunks/cli-1.1.4-h2a0peqc.mjs +18 -0
  162. package/dist/chunks/cli-1.1.4-h3nq6gg2.mjs +12 -0
  163. package/dist/chunks/cli-1.1.4-h4pjzspp.mjs +58 -0
  164. package/dist/chunks/cli-1.1.4-ha2bfn8a.mjs +2 -0
  165. package/dist/chunks/cli-1.1.4-hbx9ye2g.mjs +2 -0
  166. package/dist/chunks/cli-1.1.4-hcp2cxz5.mjs +25 -0
  167. package/dist/chunks/cli-1.1.4-hdwdbbzk.mjs +2 -0
  168. package/dist/chunks/cli-1.1.4-hmg1r8h3.mjs +12 -0
  169. package/dist/chunks/cli-1.1.4-hzx821eq.mjs +4 -0
  170. package/dist/chunks/cli-1.1.4-j2khf9zj.mjs +2 -0
  171. package/dist/chunks/cli-1.1.4-ja9ebt3p.mjs +2 -0
  172. package/dist/chunks/cli-1.1.4-jbsj8fj7.mjs +2 -0
  173. package/dist/chunks/cli-1.1.4-je9x0pvr.mjs +2 -0
  174. package/dist/chunks/cli-1.1.4-jeyegjk6.mjs +2 -0
  175. package/dist/chunks/cli-1.1.4-jf48e5ft.mjs +24 -0
  176. package/dist/chunks/cli-1.1.4-jn9kbkbv.mjs +2 -0
  177. package/dist/chunks/cli-1.1.4-jscqx4px.mjs +2 -0
  178. package/dist/chunks/cli-1.1.4-k65j1mxk.mjs +9 -0
  179. package/dist/chunks/cli-1.1.4-k6ebhyp0.mjs +2 -0
  180. package/dist/chunks/cli-1.1.4-kcm529kx.mjs +2 -0
  181. package/dist/chunks/cli-1.1.4-m11fz0v8.mjs +2 -0
  182. package/dist/chunks/cli-1.1.4-m312ygm6.mjs +2 -0
  183. package/dist/chunks/cli-1.1.4-m3gsmnfa.mjs +2 -0
  184. package/dist/chunks/cli-1.1.4-m3hgkj60.mjs +2 -0
  185. package/dist/chunks/cli-1.1.4-memqhcjv.mjs +2 -0
  186. package/dist/chunks/cli-1.1.4-mjhchkyc.mjs +50 -0
  187. package/dist/chunks/cli-1.1.4-mjtadp4r.mjs +2 -0
  188. package/dist/chunks/cli-1.1.4-mkk6fe3z.mjs +2 -0
  189. package/dist/chunks/cli-1.1.4-mvy2zgjw.mjs +3 -0
  190. package/dist/chunks/cli-1.1.4-my1g33fn.mjs +3 -0
  191. package/dist/chunks/cli-1.1.4-mzzr964a.mjs +67 -0
  192. package/dist/chunks/cli-1.1.4-n1e8vyg8.mjs +2 -0
  193. package/dist/chunks/cli-1.1.4-ncmgrms7.mjs +2 -0
  194. package/dist/chunks/cli-1.1.4-nh3sscxn.mjs +59 -0
  195. package/dist/chunks/cli-1.1.4-nkf9c3yn.mjs +5 -0
  196. package/dist/chunks/cli-1.1.4-nmjtqjhh.mjs +2 -0
  197. package/dist/chunks/cli-1.1.4-p2223zcm.mjs +2 -0
  198. package/dist/chunks/cli-1.1.4-p7tcq8ah.mjs +6 -0
  199. package/dist/chunks/cli-1.1.4-p7xh8tgn.mjs +2 -0
  200. package/dist/chunks/cli-1.1.4-p81w8zaj.mjs +8 -0
  201. package/dist/chunks/cli-1.1.4-phjb22vy.mjs +2 -0
  202. package/dist/chunks/cli-1.1.4-phv78vpk.mjs +2 -0
  203. package/dist/chunks/cli-1.1.4-pq6xvrw7.mjs +15 -0
  204. package/dist/chunks/cli-1.1.4-q0acv376.mjs +3 -0
  205. package/dist/chunks/cli-1.1.4-q6cngbfg.mjs +2 -0
  206. package/dist/chunks/cli-1.1.4-qe35eyha.mjs +6 -0
  207. package/dist/chunks/cli-1.1.4-qecgken2.mjs +2 -0
  208. package/dist/chunks/cli-1.1.4-qf46ypfr.mjs +2 -0
  209. package/dist/chunks/cli-1.1.4-qjgn7a4a.mjs +2 -0
  210. package/dist/chunks/cli-1.1.4-rc28sjtd.mjs +4 -0
  211. package/dist/chunks/cli-1.1.4-rh4x4rv5.mjs +2 -0
  212. package/dist/chunks/cli-1.1.4-rhexcyth.mjs +2 -0
  213. package/dist/chunks/cli-1.1.4-rmpkkwfr.mjs +42 -0
  214. package/dist/chunks/cli-1.1.4-rqwqskb2.mjs +2 -0
  215. package/dist/chunks/cli-1.1.4-rv3se129.mjs +2 -0
  216. package/dist/chunks/cli-1.1.4-rwz7t3ph.mjs +2 -0
  217. package/dist/chunks/cli-1.1.4-s26ny46b.mjs +4 -0
  218. package/dist/chunks/cli-1.1.4-scm26s6m.mjs +34 -0
  219. package/dist/chunks/cli-1.1.4-shrznr3s.mjs +2 -0
  220. package/dist/chunks/cli-1.1.4-sm3xmtbn.mjs +6 -0
  221. package/dist/chunks/cli-1.1.4-smjkhzzj.mjs +4 -0
  222. package/dist/chunks/cli-1.1.4-ss2jxen1.mjs +2 -0
  223. package/dist/chunks/cli-1.1.4-te2372tc.mjs +2 -0
  224. package/dist/chunks/cli-1.1.4-tmrxfcjm.mjs +2 -0
  225. package/dist/chunks/cli-1.1.4-tsspgj1c.mjs +2 -0
  226. package/dist/chunks/cli-1.1.4-v67jx2fw.mjs +2 -0
  227. package/dist/chunks/cli-1.1.4-v85q5z49.mjs +3 -0
  228. package/dist/chunks/cli-1.1.4-vajq2dgc.mjs +4 -0
  229. package/dist/chunks/cli-1.1.4-vcg96p1c.mjs +2 -0
  230. package/dist/chunks/cli-1.1.4-vdd43cyp.mjs +2 -0
  231. package/dist/chunks/cli-1.1.4-vgk1xqxb.mjs +2 -0
  232. package/dist/chunks/cli-1.1.4-vjfpgnyr.mjs +2 -0
  233. package/dist/chunks/cli-1.1.4-vk7mw9e1.mjs +39 -0
  234. package/dist/chunks/cli-1.1.4-vpkm2gfp.mjs +4 -0
  235. package/dist/chunks/cli-1.1.4-vq2bkg07.mjs +2 -0
  236. package/dist/chunks/cli-1.1.4-vye1xark.mjs +2 -0
  237. package/dist/chunks/cli-1.1.4-w06xm7pk.mjs +2 -0
  238. package/dist/chunks/cli-1.1.4-w11nd4na.mjs +2 -0
  239. package/dist/chunks/cli-1.1.4-w4b4vhj9.mjs +2 -0
  240. package/dist/chunks/cli-1.1.4-wqxnhcfg.mjs +2 -0
  241. package/dist/chunks/cli-1.1.4-ws4wcqma.mjs +2 -0
  242. package/dist/chunks/cli-1.1.4-wt23b5bp.mjs +2 -0
  243. package/dist/chunks/cli-1.1.4-wtcyy8sp.mjs +4 -0
  244. package/dist/chunks/cli-1.1.4-wx5t4xvj.mjs +3 -0
  245. package/dist/chunks/cli-1.1.4-x6hb06sj.mjs +2 -0
  246. package/dist/chunks/cli-1.1.4-x8m7spde.mjs +2 -0
  247. package/dist/chunks/cli-1.1.4-x90d3r95.mjs +2 -0
  248. package/dist/chunks/cli-1.1.4-xdqj8a4v.mjs +45 -0
  249. package/dist/chunks/cli-1.1.4-xxe2ztwq.mjs +2 -0
  250. package/dist/chunks/cli-1.1.4-y94ewbpk.mjs +2 -0
  251. package/dist/chunks/cli-1.1.4-ymrjsf78.mjs +2 -0
  252. package/dist/chunks/cli-1.1.4-yncbc1sd.mjs +2 -0
  253. package/dist/chunks/cli-1.1.4-yprszvr2.mjs +2 -0
  254. package/dist/chunks/cli-1.1.4-yz3t1wmd.mjs +2 -0
  255. package/dist/chunks/cli-1.1.4-z6qrcsfa.mjs +2 -0
  256. package/dist/chunks/cli-1.1.4-z8f8hc8t.mjs +12 -0
  257. package/dist/chunks/cli-1.1.4-z9z0gn83.mjs +15 -0
  258. package/dist/chunks/cli-1.1.4-zavkgdrm.mjs +2 -0
  259. package/dist/chunks/cli-1.1.4-zc29khqe.mjs +3 -0
  260. package/dist/chunks/cli-1.1.4-zp0vvhas.mjs +3 -0
  261. package/dist/chunks/client-1.1.4-pb5ebapt.mjs +1 -0
  262. package/dist/chunks/color-1.1.4-f1seyygj.mjs +1 -0
  263. package/dist/chunks/compact-1.1.4-2a7cwaxp.mjs +3 -0
  264. package/dist/chunks/config-1.1.4-j2wjnxkk.mjs +1 -0
  265. package/dist/chunks/config-1.1.4-jb46a3qp.mjs +1 -0
  266. package/dist/chunks/constants-1.1.4-cspjb06k.mjs +1 -0
  267. package/dist/chunks/context-1.1.4-dmyt4w9f.mjs +1 -0
  268. package/dist/chunks/context-noninteractive-1.1.4-ckp0m156.mjs +1 -0
  269. package/dist/chunks/conversation-1.1.4-2grxgxr1.mjs +1 -0
  270. package/dist/chunks/copilotHeaders-1.1.4-chappesc.mjs +1 -0
  271. package/dist/chunks/copy-1.1.4-7hw0khh4.mjs +9 -0
  272. package/dist/chunks/cost-1.1.4-kqvvdsab.mjs +1 -0
  273. package/dist/chunks/createSSHSession-1.1.4-ezqvt66q.mjs +1 -0
  274. package/dist/chunks/createSession-1.1.4-739bg1q2.mjs +1 -0
  275. package/dist/chunks/debug-1.1.4-4v8k6t8p.mjs +1 -0
  276. package/dist/chunks/defaultActionDeps-1.1.4-07fhy4qs.mjs +1446 -0
  277. package/dist/chunks/desktop-1.1.4-z8nhvfc9.mjs +1 -0
  278. package/dist/chunks/detectRepository-1.1.4-qs08vv7k.mjs +1 -0
  279. package/dist/chunks/detection-1.1.4-knvchyz7.mjs +1 -0
  280. package/dist/chunks/diff-1.1.4-9k603anv.mjs +1 -0
  281. package/dist/chunks/doctor-1.1.4-76x4k1e3.mjs +1 -0
  282. package/dist/chunks/doctorDiagnostic-1.1.4-dw4gjch2.mjs +1 -0
  283. package/dist/chunks/earlyInput-1.1.4-wmn2wrxh.mjs +1 -0
  284. package/dist/chunks/effort-1.1.4-2bfyta5f.mjs +13 -0
  285. package/dist/chunks/engine-1.1.4-ds4tzxqb.mjs +1 -0
  286. package/dist/chunks/envLessBridgeConfig-1.1.4-k2f2p556.mjs +1 -0
  287. package/dist/chunks/envUtils-1.1.4-h0e2k0kk.mjs +1 -0
  288. package/dist/chunks/environmentSelection-1.1.4-zgvjnc3b.mjs +1 -0
  289. package/dist/chunks/environments-1.1.4-vvw6w76p.mjs +1 -0
  290. package/dist/chunks/errors-1.1.4-k81rbfst.mjs +1 -0
  291. package/dist/chunks/exampleCommands-1.1.4-7d1r2j0f.mjs +1 -0
  292. package/dist/chunks/execFileNoThrow-1.1.4-txkdgph9.mjs +1 -0
  293. package/dist/chunks/exit-1.1.4-nmtqhsmh.mjs +1 -0
  294. package/dist/chunks/explorer-1.1.4-z2tjcn1k.mjs +1 -0
  295. package/dist/chunks/export-1.1.4-sqtrqjrr.mjs +2 -0
  296. package/dist/chunks/extra-usage-1.1.4-9vjje6h3.mjs +1 -0
  297. package/dist/chunks/extra-usage-noninteractive-1.1.4-x9nwrrw4.mjs +1 -0
  298. package/dist/chunks/fast-1.1.4-2jebnd2f.mjs +1 -0
  299. package/dist/chunks/feedback-1.1.4-axgmd5k0.mjs +14 -0
  300. package/dist/chunks/firstPartyEventLogger-1.1.4-ftjf0rjy.mjs +1 -0
  301. package/dist/chunks/git-1.1.4-ress16mq.mjs +1 -0
  302. package/dist/chunks/githubModelsCredentials-1.1.4-dvpz9d06.mjs +1 -0
  303. package/dist/chunks/goal-1.1.4-d5hgcz3t.mjs +4 -0
  304. package/dist/chunks/grove-1.1.4-ag51yh4b.mjs +1 -0
  305. package/dist/chunks/growthbook-1.1.4-2khgq1sm.mjs +1 -0
  306. package/dist/chunks/headless-1.1.4-833q6qkz.mjs +2 -0
  307. package/dist/chunks/heapdump-1.1.4-d7hqys06.mjs +6 -0
  308. package/dist/chunks/help-1.1.4-35bcy608.mjs +1 -0
  309. package/dist/chunks/hookChains-1.1.4-fcp2d666.mjs +3 -0
  310. package/dist/chunks/hooks-1.1.4-h1zy1fdm.mjs +1 -0
  311. package/dist/chunks/hooks-1.1.4-mwnf6vn4.mjs +79 -0
  312. package/dist/chunks/ide-1.1.4-5bagw4sy.mjs +3 -0
  313. package/dist/chunks/image-processor-napi-1.1.4-rfdtmnfq.mjs +1 -0
  314. package/dist/chunks/inboundAttachments-1.1.4-kj5ne7t9.mjs +1 -0
  315. package/dist/chunks/index-1.1.4-0mcg1bj0.mjs +1 -0
  316. package/dist/chunks/index-1.1.4-0tamkcjt.mjs +1 -0
  317. package/dist/chunks/index-1.1.4-2czk0cj2.mjs +2 -0
  318. package/dist/chunks/index-1.1.4-4pzf6k4d.mjs +1 -0
  319. package/dist/chunks/index-1.1.4-5ff5qxrs.mjs +1 -0
  320. package/dist/chunks/index-1.1.4-6gmnecfx.mjs +1 -0
  321. package/dist/chunks/index-1.1.4-6xgr5zyz.mjs +1 -0
  322. package/dist/chunks/index-1.1.4-9yayje25.mjs +1 -0
  323. package/dist/chunks/index-1.1.4-ekp3k254.mjs +1 -0
  324. package/dist/chunks/index-1.1.4-g4bsry7f.mjs +1 -0
  325. package/dist/chunks/index-1.1.4-gfbrd9p0.mjs +1 -0
  326. package/dist/chunks/index-1.1.4-jk66219f.mjs +30 -0
  327. package/dist/chunks/index-1.1.4-m5859ars.mjs +5 -0
  328. package/dist/chunks/index-1.1.4-m5kxdznq.mjs +1 -0
  329. package/dist/chunks/index-1.1.4-mr07jhdc.mjs +1 -0
  330. package/dist/chunks/index-1.1.4-mw4k6wk5.mjs +17 -0
  331. package/dist/chunks/index-1.1.4-nx0c7851.mjs +9 -0
  332. package/dist/chunks/index-1.1.4-p4az8jd4.mjs +9 -0
  333. package/dist/chunks/index-1.1.4-s48qa1fv.mjs +1 -0
  334. package/dist/chunks/index-1.1.4-svjv72c1.mjs +1 -0
  335. package/dist/chunks/index-1.1.4-tjmw2wk0.mjs +1 -0
  336. package/dist/chunks/index-1.1.4-v1z11db7.mjs +1 -0
  337. package/dist/chunks/index-1.1.4-wkgybs2k.mjs +2 -0
  338. package/dist/chunks/init-1.1.4-gggf2npg.mjs +1 -0
  339. package/dist/chunks/initReplBridge-1.1.4-0sk4h8a1.mjs +1 -0
  340. package/dist/chunks/ink-1.1.4-vw46vbtt.mjs +1 -0
  341. package/dist/chunks/insights-1.1.4-vjtfwa5p.mjs +870 -0
  342. package/dist/chunks/install-1.1.4-2ckjxcbg.mjs +1 -0
  343. package/dist/chunks/install-github-app-1.1.4-e0tfdyjj.mjs +149 -0
  344. package/dist/chunks/install-slack-app-1.1.4-j30f897r.mjs +1 -0
  345. package/dist/chunks/instrumentation-1.1.4-3dd1n7rj.mjs +1 -0
  346. package/dist/chunks/interactiveHelpers-1.1.4-mz31r39t.mjs +1 -0
  347. package/dist/chunks/keybindings-1.1.4-3rx2vnv0.mjs +2 -0
  348. package/dist/chunks/knowledge-1.1.4-c30znbjx.mjs +2 -0
  349. package/dist/chunks/latestVersionCache-1.1.4-ftdcy7g4.mjs +1 -0
  350. package/dist/chunks/loadAgentsDir-1.1.4-mqdb78s1.mjs +1 -0
  351. package/dist/chunks/loadPluginHooks-1.1.4-72qxyq0t.mjs +1 -0
  352. package/dist/chunks/loadPluginHooks-1.1.4-b0wchh9x.mjs +1 -0
  353. package/dist/chunks/log-1.1.4-2xexxfy0.mjs +1 -0
  354. package/dist/chunks/main-1.1.4-wapb45da.mjs +1 -0
  355. package/dist/chunks/managedEnv-1.1.4-qyy8p7f2.mjs +1 -0
  356. package/dist/chunks/mcp-1.1.4-h54pt8v1.mjs +1 -0
  357. package/dist/chunks/mcp-1.1.4-rc4pdtng.mjs +4 -0
  358. package/dist/chunks/mcp-1.1.4-yfnk4mfe.mjs +17 -0
  359. package/dist/chunks/mcpb-1.1.4-cw5mvq0x.mjs +1 -0
  360. package/dist/chunks/memory-1.1.4-eqm9fevt.mjs +72 -0
  361. package/dist/chunks/model-1.1.4-v0jfcnn8.mjs +2 -0
  362. package/dist/chunks/model-1.1.4-x8a7yhj1.mjs +1 -0
  363. package/dist/chunks/node-1.1.4-zfc18psp.mjs +12 -0
  364. package/dist/chunks/oauth-1.1.4-8spjkywn.mjs +1 -0
  365. package/dist/chunks/openaiShim-1.1.4-k4q3wjsg.mjs +14 -0
  366. package/dist/chunks/output-style-1.1.4-36tkstrg.mjs +1 -0
  367. package/dist/chunks/package-2VNCXFNY-1.1.4-b7m4p873.mjs +1 -0
  368. package/dist/chunks/parseConnectUrl-1.1.4-g49z58pt.mjs +1 -0
  369. package/dist/chunks/parser-1.1.4-f8fmbx75.mjs +1 -0
  370. package/dist/chunks/passes-1.1.4-fps8mejy.mjs +1 -0
  371. package/dist/chunks/permissions-1.1.4-38svh1zd.mjs +3 -0
  372. package/dist/chunks/permissions-1.1.4-4g141c3c.mjs +1 -0
  373. package/dist/chunks/plan-1.1.4-66evqh4y.mjs +1 -0
  374. package/dist/chunks/plist-1.1.4-fx2qbcnp.mjs +1 -0
  375. package/dist/chunks/plugin-1.1.4-jjtcjgyk.mjs +29 -0
  376. package/dist/chunks/pluginStartupCheck-1.1.4-fhbmfyn5.mjs +1 -0
  377. package/dist/chunks/plugins-1.1.4-thxg4cdf.mjs +9 -0
  378. package/dist/chunks/preActionHook-1.1.4-042npmm1.mjs +2 -0
  379. package/dist/chunks/print-1.1.4-fxrwvp78.mjs +57 -0
  380. package/dist/chunks/privacy-settings-1.1.4-mmhqzkda.mjs +1 -0
  381. package/dist/chunks/process-1.1.4-pjq03ry2.mjs +1 -0
  382. package/dist/chunks/processBashCommand-1.1.4-1f4rqd6y.mjs +1 -0
  383. package/dist/chunks/processSlashCommand-1.1.4-rpcrfdgr.mjs +9 -0
  384. package/dist/chunks/prompt-1.1.4-29b0dwtk.mjs +1 -0
  385. package/dist/chunks/prompt-1.1.4-r7wxvh91.mjs +1 -0
  386. package/dist/chunks/prompts-1.1.4-26y972y6.mjs +1 -0
  387. package/dist/chunks/protocolHandler-1.1.4-7zfqar8j.mjs +13 -0
  388. package/dist/chunks/provider-1.1.4-g97havfk.mjs +2 -0
  389. package/dist/chunks/providerProfiles-1.1.4-v8yppf0j.mjs +1 -0
  390. package/dist/chunks/providerValidation-1.1.4-sr2vhead.mjs +6 -0
  391. package/dist/chunks/rate-limit-options-1.1.4-bndvfd35.mjs +1 -0
  392. package/dist/chunks/registerSubcommands-1.1.4-abyv44kq.mjs +34 -0
  393. package/dist/chunks/registry-1.1.4-2dkk6scg.mjs +1 -0
  394. package/dist/chunks/release-notes-1.1.4-0aqxbex3.mjs +5 -0
  395. package/dist/chunks/reload-plugins-1.1.4-gat28fq4.mjs +2 -0
  396. package/dist/chunks/remote-env-1.1.4-sn5rdvx2.mjs +1 -0
  397. package/dist/chunks/remoteBridgeCore-1.1.4-pd63jnee.mjs +1 -0
  398. package/dist/chunks/remoteSession-1.1.4-0wk0yffw.mjs +1 -0
  399. package/dist/chunks/rename-1.1.4-r9a1zc1y.mjs +1 -0
  400. package/dist/chunks/replBridgeHandle-1.1.4-rb9fzpda.mjs +1 -0
  401. package/dist/chunks/replLauncher-1.1.4-cvcyz94s.mjs +1 -0
  402. package/dist/chunks/resume-1.1.4-3qy136p1.mjs +2 -0
  403. package/dist/chunks/rewind-1.1.4-c9gdxp13.mjs +1 -0
  404. package/dist/chunks/rootOptions-1.1.4-6zd74fce.mjs +1 -0
  405. package/dist/chunks/runWorkflowHeadless-1.1.4-mvj2fn0p.mjs +10 -0
  406. package/dist/chunks/sandbox-adapter-1.1.4-j6cfgrhj.mjs +1 -0
  407. package/dist/chunks/sandbox-toggle-1.1.4-4a59zac7.mjs +1 -0
  408. package/dist/chunks/session-1.1.4-5504ewv9.mjs +2 -0
  409. package/dist/chunks/sessionDiscovery-1.1.4-0jmcbvvb.mjs +1 -0
  410. package/dist/chunks/sessionFileAccessHooks-1.1.4-bkw8bzvd.mjs +1 -0
  411. package/dist/chunks/sessionStorage-1.1.4-jrxy5nwv.mjs +1 -0
  412. package/dist/chunks/settings-1.1.4-x2nhddwq.mjs +1 -0
  413. package/dist/chunks/setup-1.1.4-kaet4ypb.mjs +5 -0
  414. package/dist/chunks/sinks-1.1.4-9g0pah73.mjs +1 -0
  415. package/dist/chunks/skills-1.1.4-0p66nwxp.mjs +1 -0
  416. package/dist/chunks/startupProfiler-1.1.4-8jnqyvyn.mjs +1 -0
  417. package/dist/chunks/startupUpdateCheck-1.1.4-98n3b718.mjs +1 -0
  418. package/dist/chunks/state-1.1.4-rm5651xg.mjs +1 -0
  419. package/dist/chunks/stats-1.1.4-e1vedz6r.mjs +6 -0
  420. package/dist/chunks/status-1.1.4-v47t86mv.mjs +1 -0
  421. package/dist/chunks/stickers-1.1.4-5d457j1w.mjs +1 -0
  422. package/dist/chunks/subprocessEnv-1.1.4-svxhss0m.mjs +1 -0
  423. package/dist/chunks/tasks-1.1.4-cvza9kpf.mjs +1 -0
  424. package/dist/chunks/teamHelpers-1.1.4-v21fjxgf.mjs +1 -0
  425. package/dist/chunks/teammateModeSnapshot-1.1.4-8075wryx.mjs +1 -0
  426. package/dist/chunks/teleport-1.1.4-6rxc18rz.mjs +1 -0
  427. package/dist/chunks/terminalSetup-1.1.4-sd7720mx.mjs +1 -0
  428. package/dist/chunks/theme-1.1.4-6pphnv8h.mjs +1 -0
  429. package/dist/chunks/thinkback-1.1.4-wd6fcgyw.mjs +1 -0
  430. package/dist/chunks/thinkback-play-1.1.4-ydvvq4y6.mjs +1 -0
  431. package/dist/chunks/toolPool-1.1.4-v050m5b8.mjs +1 -0
  432. package/dist/chunks/toolSearch-1.1.4-wg2kk5a2.mjs +1 -0
  433. package/dist/chunks/tools-1.1.4-g181kv47.mjs +1 -0
  434. package/dist/chunks/trustedDevice-1.1.4-tdeqsy06.mjs +1 -0
  435. package/dist/chunks/turndown.cjs-1.1.4-sj3ajz7z.mjs +69 -0
  436. package/dist/chunks/types-1.1.4-ggcwt1pq.mjs +1 -0
  437. package/dist/chunks/ultrareviewCommand-1.1.4-nrnrb8c3.mjs +4 -0
  438. package/dist/chunks/update-1.1.4-z8g0pneq.mjs +72 -0
  439. package/dist/chunks/upgrade-1.1.4-e34ebc9z.mjs +1 -0
  440. package/dist/chunks/upload-1.1.4-2av9969z.mjs +7 -0
  441. package/dist/chunks/upstreamproxy-1.1.4-e3t0n54y.mjs +14 -0
  442. package/dist/chunks/url-handler-napi-1.1.4-hghknwdd.mjs +1 -0
  443. package/dist/chunks/usage-1.1.4-wc38b22t.mjs +1 -0
  444. package/dist/chunks/util-1.1.4-re2ggpra.mjs +1 -0
  445. package/dist/chunks/utils-1.1.4-xzem7sm6.mjs +1 -0
  446. package/dist/chunks/vim-1.1.4-ybw4ky04.mjs +1 -0
  447. package/dist/chunks/watchLoop-1.1.4-mshcfcqq.mjs +13 -0
  448. package/dist/chunks/watcher-1.1.4-fbr5em87.mjs +1 -0
  449. package/dist/chunks/wiki-1.1.4-hddnvztx.mjs +132 -0
  450. package/dist/chunks/workflows-1.1.4-5zm6r9s5.mjs +1 -0
  451. package/dist/chunks/worktree-1.1.4-6xqk6k5z.mjs +1 -0
  452. package/dist/chunks/worktreeModeEnabled-1.1.4-axxnvhc8.mjs +1 -0
  453. package/dist/chunks/wrapper-1.1.4-y14g4zah.mjs +7 -0
  454. package/dist/cli.mjs +2 -2
  455. package/package.json +9 -9
  456. package/dist/chunks/AgentTool-1.1.2-6zb8pht6.mjs +0 -1
  457. package/dist/chunks/App-1.1.2-8j8hmwy9.mjs +0 -1
  458. package/dist/chunks/ApproveApiKey-1.1.2-ejb1881w.mjs +0 -1
  459. package/dist/chunks/AssistantSessionChooser-1.1.2-y7hdgasp.mjs +0 -1
  460. package/dist/chunks/AutoModeOptInDialog-1.1.2-b2ckdy5h.mjs +0 -1
  461. package/dist/chunks/BypassPermissionsModeDialog-1.1.2-nk59yp5m.mjs +0 -1
  462. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.2-t6wsf59z.mjs +0 -1
  463. package/dist/chunks/ConsoleOAuthFlow-1.1.2-ehy8cjkp.mjs +0 -1
  464. package/dist/chunks/DiffDialog-1.1.2-2834m4pm.mjs +0 -7
  465. package/dist/chunks/Doctor-1.1.2-rrjcjsbd.mjs +0 -1
  466. package/dist/chunks/ExplorerDialog-1.1.2-a4eqp58y.mjs +0 -6
  467. package/dist/chunks/Grove-1.1.2-e07ta9pa.mjs +0 -1
  468. package/dist/chunks/ITermBackend-1.1.2-mdqpkv6t.mjs +0 -1
  469. package/dist/chunks/InvalidConfigDialog-1.1.2-fwghx005.mjs +0 -1
  470. package/dist/chunks/InvalidSettingsDialog-1.1.2-47vmakv0.mjs +0 -1
  471. package/dist/chunks/MigrationDialog-1.1.2-tphw5gq9.mjs +0 -1
  472. package/dist/chunks/Onboarding-1.1.2-a645a6a2.mjs +0 -1
  473. package/dist/chunks/ProviderManager-1.1.2-48xvht72.mjs +0 -1
  474. package/dist/chunks/REPL-1.1.2-a2z2r0kz.mjs +0 -1
  475. package/dist/chunks/ResumeConversation-1.1.2-avb3zbsn.mjs +0 -1
  476. package/dist/chunks/SnapshotUpdateDialog-1.1.2-r8c624d9.mjs +0 -1
  477. package/dist/chunks/TeleportProgress-1.1.2-1mmfypbv.mjs +0 -1
  478. package/dist/chunks/TeleportRepoMismatchDialog-1.1.2-ky4az8t9.mjs +0 -1
  479. package/dist/chunks/TeleportResumeWrapper-1.1.2-w72b36j1.mjs +0 -1
  480. package/dist/chunks/TmuxBackend-1.1.2-ejx4rvac.mjs +0 -9
  481. package/dist/chunks/ToolSearchTool-1.1.2-5m2ekdy4.mjs +0 -1
  482. package/dist/chunks/TrustDialog-1.1.2-b7q0fb2j.mjs +0 -1
  483. package/dist/chunks/activeProvider-1.1.2-j0pztex4.mjs +0 -1
  484. package/dist/chunks/add-dir-1.1.2-fzpmgh1h.mjs +0 -1
  485. package/dist/chunks/agentTypes-1.1.2-vr9770fz.mjs +0 -1
  486. package/dist/chunks/agents-1.1.2-n6dejn00.mjs +0 -3
  487. package/dist/chunks/agents-1.1.2-rxkey856.mjs +0 -110
  488. package/dist/chunks/api-1.1.2-fpd74byc.mjs +0 -1
  489. package/dist/chunks/asciicast-1.1.2-0nvcvhqa.mjs +0 -1
  490. package/dist/chunks/assistant-1.1.2-ywzgwzmt.mjs +0 -1
  491. package/dist/chunks/auth-1.1.2-cg0svgv7.mjs +0 -1
  492. package/dist/chunks/auth-1.1.2-s45hhsck.mjs +0 -1
  493. package/dist/chunks/autoMode-1.1.2-6q0pp71h.mjs +0 -48
  494. package/dist/chunks/autoUpdater-1.1.2-bnwzvzbf.mjs +0 -1
  495. package/dist/chunks/backgroundHousekeeping-1.1.2-meh5zm3k.mjs +0 -1
  496. package/dist/chunks/branch-1.1.2-exyc66rb.mjs +0 -4
  497. package/dist/chunks/bridge-1.1.2-zvk3eymq.mjs +0 -2
  498. package/dist/chunks/bridgeConfig-1.1.2-mr20ypjr.mjs +0 -1
  499. package/dist/chunks/bridgeEnabled-1.1.2-s41251vp.mjs +0 -1
  500. package/dist/chunks/bridgeMain-1.1.2-tse9m0x8.mjs +0 -88
  501. package/dist/chunks/bridgePointer-1.1.2-grjrm008.mjs +0 -1
  502. package/dist/chunks/btw-1.1.2-6xz6s5f3.mjs +0 -1
  503. package/dist/chunks/buddy-1.1.2-zsy6mntg.mjs +0 -3
  504. package/dist/chunks/cacache-1.1.2-pr00fyac.mjs +0 -1
  505. package/dist/chunks/cache-probe-1.1.2-dd1ch184.mjs +0 -21
  506. package/dist/chunks/cacheStats-1.1.2-xnm7ts60.mjs +0 -4
  507. package/dist/chunks/caches-1.1.2-s4tektt8.mjs +0 -1
  508. package/dist/chunks/claudeDesktop-1.1.2-krejmvza.mjs +0 -1
  509. package/dist/chunks/claudemd-1.1.2-g1dwsxtx.mjs +0 -1
  510. package/dist/chunks/clear-1.1.2-5fz98qqy.mjs +0 -1
  511. package/dist/chunks/clearTerminal-1.1.2-heqmh2ay.mjs +0 -1
  512. package/dist/chunks/cli-1.1.2-00hggnnf.mjs +0 -9
  513. package/dist/chunks/cli-1.1.2-06gbqkw3.mjs +0 -2
  514. package/dist/chunks/cli-1.1.2-06wg9ep0.mjs +0 -2
  515. package/dist/chunks/cli-1.1.2-0q8k3447.mjs +0 -2
  516. package/dist/chunks/cli-1.1.2-10g0wy7w.mjs +0 -2
  517. package/dist/chunks/cli-1.1.2-12xajsdg.mjs +0 -2
  518. package/dist/chunks/cli-1.1.2-1a35rnqk.mjs +0 -2
  519. package/dist/chunks/cli-1.1.2-1kqxt2v2.mjs +0 -2
  520. package/dist/chunks/cli-1.1.2-1rh7zj2h.mjs +0 -133
  521. package/dist/chunks/cli-1.1.2-1v80dsr5.mjs +0 -2
  522. package/dist/chunks/cli-1.1.2-1z8yre0p.mjs +0 -2
  523. package/dist/chunks/cli-1.1.2-22w1aakd.mjs +0 -17
  524. package/dist/chunks/cli-1.1.2-26xrf159.mjs +0 -2
  525. package/dist/chunks/cli-1.1.2-2d3dw4nn.mjs +0 -25
  526. package/dist/chunks/cli-1.1.2-2rf4g79b.mjs +0 -3
  527. package/dist/chunks/cli-1.1.2-2vzy6fgr.mjs +0 -4
  528. package/dist/chunks/cli-1.1.2-2x9dcdpq.mjs +0 -2
  529. package/dist/chunks/cli-1.1.2-2ya2s94w.mjs +0 -15
  530. package/dist/chunks/cli-1.1.2-2ygaa01s.mjs +0 -3
  531. package/dist/chunks/cli-1.1.2-312r29db.mjs +0 -2
  532. package/dist/chunks/cli-1.1.2-38rgkyw3.mjs +0 -2
  533. package/dist/chunks/cli-1.1.2-39xjjhsf.mjs +0 -24
  534. package/dist/chunks/cli-1.1.2-3mhsnff4.mjs +0 -2
  535. package/dist/chunks/cli-1.1.2-3mpy81rn.mjs +0 -2
  536. package/dist/chunks/cli-1.1.2-3v91jtm9.mjs +0 -2
  537. package/dist/chunks/cli-1.1.2-3vhc8676.mjs +0 -2
  538. package/dist/chunks/cli-1.1.2-3w0nbdtc.mjs +0 -2
  539. package/dist/chunks/cli-1.1.2-45nwkmpy.mjs +0 -2
  540. package/dist/chunks/cli-1.1.2-4d1hhyqs.mjs +0 -2
  541. package/dist/chunks/cli-1.1.2-4e3xrjth.mjs +0 -2
  542. package/dist/chunks/cli-1.1.2-4skhxaf4.mjs +0 -6
  543. package/dist/chunks/cli-1.1.2-4x5wz1xq.mjs +0 -67
  544. package/dist/chunks/cli-1.1.2-51pdt76x.mjs +0 -2
  545. package/dist/chunks/cli-1.1.2-526csky8.mjs +0 -2
  546. package/dist/chunks/cli-1.1.2-5dbzz1pp.mjs +0 -12
  547. package/dist/chunks/cli-1.1.2-5pe3b93k.mjs +0 -25
  548. package/dist/chunks/cli-1.1.2-5w2m33hk.mjs +0 -2
  549. package/dist/chunks/cli-1.1.2-5wfgzqgc.mjs +0 -2
  550. package/dist/chunks/cli-1.1.2-61nmeckv.mjs +0 -4
  551. package/dist/chunks/cli-1.1.2-63p3yvzk.mjs +0 -2
  552. package/dist/chunks/cli-1.1.2-64bjkwj9.mjs +0 -2
  553. package/dist/chunks/cli-1.1.2-6cj9ggma.mjs +0 -5638
  554. package/dist/chunks/cli-1.1.2-6kq0hmvj.mjs +0 -2
  555. package/dist/chunks/cli-1.1.2-6r2ybktd.mjs +0 -18
  556. package/dist/chunks/cli-1.1.2-79hm6s3a.mjs +0 -7
  557. package/dist/chunks/cli-1.1.2-7fe75jd9.mjs +0 -2
  558. package/dist/chunks/cli-1.1.2-7fjx7f8d.mjs +0 -2
  559. package/dist/chunks/cli-1.1.2-7jcscwh5.mjs +0 -2
  560. package/dist/chunks/cli-1.1.2-7m5zhsrs.mjs +0 -2
  561. package/dist/chunks/cli-1.1.2-7q8cqbtc.mjs +0 -2
  562. package/dist/chunks/cli-1.1.2-7swa79jc.mjs +0 -24
  563. package/dist/chunks/cli-1.1.2-7xwayv2p.mjs +0 -20
  564. package/dist/chunks/cli-1.1.2-8d3m4zhf.mjs +0 -2
  565. package/dist/chunks/cli-1.1.2-8fsex5c8.mjs +0 -2
  566. package/dist/chunks/cli-1.1.2-8trsbckp.mjs +0 -2
  567. package/dist/chunks/cli-1.1.2-8wc2wcne.mjs +0 -3
  568. package/dist/chunks/cli-1.1.2-94nsdbgk.mjs +0 -2
  569. package/dist/chunks/cli-1.1.2-96wg2gfk.mjs +0 -2
  570. package/dist/chunks/cli-1.1.2-99rcxvch.mjs +0 -2
  571. package/dist/chunks/cli-1.1.2-9ash84j3.mjs +0 -2
  572. package/dist/chunks/cli-1.1.2-9ke8m3ex.mjs +0 -2
  573. package/dist/chunks/cli-1.1.2-9rh5p8p5.mjs +0 -2
  574. package/dist/chunks/cli-1.1.2-a69xymn7.mjs +0 -2
  575. package/dist/chunks/cli-1.1.2-a9n9p929.mjs +0 -2
  576. package/dist/chunks/cli-1.1.2-aav0ncfm.mjs +0 -2
  577. package/dist/chunks/cli-1.1.2-ad1q4yds.mjs +0 -4
  578. package/dist/chunks/cli-1.1.2-aq3e6kg7.mjs +0 -2
  579. package/dist/chunks/cli-1.1.2-ax711ayq.mjs +0 -2
  580. package/dist/chunks/cli-1.1.2-b850wzhk.mjs +0 -2
  581. package/dist/chunks/cli-1.1.2-b9tdyfz3.mjs +0 -21
  582. package/dist/chunks/cli-1.1.2-bhjzjkag.mjs +0 -4
  583. package/dist/chunks/cli-1.1.2-bvvn3mfz.mjs +0 -2
  584. package/dist/chunks/cli-1.1.2-cs3wpy5m.mjs +0 -2
  585. package/dist/chunks/cli-1.1.2-d0dmaqaz.mjs +0 -2
  586. package/dist/chunks/cli-1.1.2-d3vc56eg.mjs +0 -4
  587. package/dist/chunks/cli-1.1.2-d9r7gv39.mjs +0 -2
  588. package/dist/chunks/cli-1.1.2-dg1134n2.mjs +0 -2
  589. package/dist/chunks/cli-1.1.2-dgw89jzs.mjs +0 -4
  590. package/dist/chunks/cli-1.1.2-e9bnprf3.mjs +0 -2
  591. package/dist/chunks/cli-1.1.2-efe0402v.mjs +0 -2
  592. package/dist/chunks/cli-1.1.2-em7hye78.mjs +0 -4
  593. package/dist/chunks/cli-1.1.2-eqyyfzzp.mjs +0 -2
  594. package/dist/chunks/cli-1.1.2-evsw8rmv.mjs +0 -2
  595. package/dist/chunks/cli-1.1.2-f5bj8nyg.mjs +0 -2
  596. package/dist/chunks/cli-1.1.2-f8pc3h46.mjs +0 -16
  597. package/dist/chunks/cli-1.1.2-fcjvcn8t.mjs +0 -2
  598. package/dist/chunks/cli-1.1.2-fmrgtbj6.mjs +0 -2
  599. package/dist/chunks/cli-1.1.2-fnfay3zd.mjs +0 -2
  600. package/dist/chunks/cli-1.1.2-fnp913tz.mjs +0 -2
  601. package/dist/chunks/cli-1.1.2-fq7w78vq.mjs +0 -2
  602. package/dist/chunks/cli-1.1.2-fs1t9yw3.mjs +0 -15
  603. package/dist/chunks/cli-1.1.2-fwcddg2k.mjs +0 -3
  604. package/dist/chunks/cli-1.1.2-g3dcz46h.mjs +0 -2
  605. package/dist/chunks/cli-1.1.2-g3ms995y.mjs +0 -2
  606. package/dist/chunks/cli-1.1.2-g9cs3fkf.mjs +0 -24
  607. package/dist/chunks/cli-1.1.2-gb52rdfa.mjs +0 -2
  608. package/dist/chunks/cli-1.1.2-gb58q1j1.mjs +0 -2
  609. package/dist/chunks/cli-1.1.2-gdcv810d.mjs +0 -2
  610. package/dist/chunks/cli-1.1.2-gqdaxfvm.mjs +0 -2
  611. package/dist/chunks/cli-1.1.2-gtjv8yhc.mjs +0 -2
  612. package/dist/chunks/cli-1.1.2-gvwc8kmd.mjs +0 -6
  613. package/dist/chunks/cli-1.1.2-gws9nr18.mjs +0 -9
  614. package/dist/chunks/cli-1.1.2-gxzwceae.mjs +0 -2
  615. package/dist/chunks/cli-1.1.2-gy0p2qqf.mjs +0 -4
  616. package/dist/chunks/cli-1.1.2-h2avr3ya.mjs +0 -2
  617. package/dist/chunks/cli-1.1.2-h9csstnw.mjs +0 -2
  618. package/dist/chunks/cli-1.1.2-hpx774ph.mjs +0 -3
  619. package/dist/chunks/cli-1.1.2-hzaqg545.mjs +0 -17
  620. package/dist/chunks/cli-1.1.2-j9n5qd1w.mjs +0 -2
  621. package/dist/chunks/cli-1.1.2-jpgqkhxd.mjs +0 -59
  622. package/dist/chunks/cli-1.1.2-js4s7tq5.mjs +0 -2
  623. package/dist/chunks/cli-1.1.2-jv9f8r52.mjs +0 -3
  624. package/dist/chunks/cli-1.1.2-jxkffay4.mjs +0 -2
  625. package/dist/chunks/cli-1.1.2-k077a0s0.mjs +0 -2
  626. package/dist/chunks/cli-1.1.2-k3tsqm2p.mjs +0 -2
  627. package/dist/chunks/cli-1.1.2-k4bpvm06.mjs +0 -2
  628. package/dist/chunks/cli-1.1.2-k61a86d8.mjs +0 -3
  629. package/dist/chunks/cli-1.1.2-kahqzzrg.mjs +0 -2
  630. package/dist/chunks/cli-1.1.2-kav702qr.mjs +0 -2
  631. package/dist/chunks/cli-1.1.2-kcfzd7n8.mjs +0 -2
  632. package/dist/chunks/cli-1.1.2-kkgf4hyc.mjs +0 -3
  633. package/dist/chunks/cli-1.1.2-kq402xqd.mjs +0 -2
  634. package/dist/chunks/cli-1.1.2-m0529q09.mjs +0 -45
  635. package/dist/chunks/cli-1.1.2-m2ar3b2y.mjs +0 -18
  636. package/dist/chunks/cli-1.1.2-m4ksha3b.mjs +0 -2
  637. package/dist/chunks/cli-1.1.2-m7d5acdw.mjs +0 -2
  638. package/dist/chunks/cli-1.1.2-ma8mh6tb.mjs +0 -2
  639. package/dist/chunks/cli-1.1.2-mnp59g5q.mjs +0 -12
  640. package/dist/chunks/cli-1.1.2-mr55880g.mjs +0 -2
  641. package/dist/chunks/cli-1.1.2-mtztdv5m.mjs +0 -2
  642. package/dist/chunks/cli-1.1.2-n2f8jkwd.mjs +0 -2
  643. package/dist/chunks/cli-1.1.2-n2k1y1rv.mjs +0 -2
  644. package/dist/chunks/cli-1.1.2-nd5g2z1v.mjs +0 -2
  645. package/dist/chunks/cli-1.1.2-nskkg1h5.mjs +0 -5
  646. package/dist/chunks/cli-1.1.2-p8amxd73.mjs +0 -4
  647. package/dist/chunks/cli-1.1.2-pbtymf0g.mjs +0 -2
  648. package/dist/chunks/cli-1.1.2-pgt1vydc.mjs +0 -2
  649. package/dist/chunks/cli-1.1.2-qg5xbb38.mjs +0 -2
  650. package/dist/chunks/cli-1.1.2-qge4zbeg.mjs +0 -2
  651. package/dist/chunks/cli-1.1.2-qm56km1n.mjs +0 -4
  652. package/dist/chunks/cli-1.1.2-qxjs641v.mjs +0 -2
  653. package/dist/chunks/cli-1.1.2-r32per66.mjs +0 -2
  654. package/dist/chunks/cli-1.1.2-r39g5zy8.mjs +0 -2
  655. package/dist/chunks/cli-1.1.2-re4qc97z.mjs +0 -6
  656. package/dist/chunks/cli-1.1.2-rm27fqp7.mjs +0 -2
  657. package/dist/chunks/cli-1.1.2-rp3kb2k1.mjs +0 -2
  658. package/dist/chunks/cli-1.1.2-rwfksv3e.mjs +0 -8
  659. package/dist/chunks/cli-1.1.2-rx0kctyq.mjs +0 -15
  660. package/dist/chunks/cli-1.1.2-ryw7gagg.mjs +0 -2
  661. package/dist/chunks/cli-1.1.2-s2xde2xb.mjs +0 -2
  662. package/dist/chunks/cli-1.1.2-s6et33a5.mjs +0 -2
  663. package/dist/chunks/cli-1.1.2-s76jqr70.mjs +0 -2
  664. package/dist/chunks/cli-1.1.2-sd7xc4s3.mjs +0 -2
  665. package/dist/chunks/cli-1.1.2-sdra9y0x.mjs +0 -34
  666. package/dist/chunks/cli-1.1.2-se3yz188.mjs +0 -2
  667. package/dist/chunks/cli-1.1.2-sk8gpfnw.mjs +0 -2
  668. package/dist/chunks/cli-1.1.2-sxp48xhs.mjs +0 -133
  669. package/dist/chunks/cli-1.1.2-t4aw8heb.mjs +0 -2
  670. package/dist/chunks/cli-1.1.2-t9knn0qp.mjs +0 -2
  671. package/dist/chunks/cli-1.1.2-tepjwp3h.mjs +0 -2
  672. package/dist/chunks/cli-1.1.2-thb8wh7v.mjs +0 -2
  673. package/dist/chunks/cli-1.1.2-tk5pscqh.mjs +0 -12
  674. package/dist/chunks/cli-1.1.2-tkr9thek.mjs +0 -6
  675. package/dist/chunks/cli-1.1.2-tn2dw7tr.mjs +0 -2
  676. package/dist/chunks/cli-1.1.2-tyx76ya3.mjs +0 -2
  677. package/dist/chunks/cli-1.1.2-v4dexj9m.mjs +0 -2
  678. package/dist/chunks/cli-1.1.2-v5aq687d.mjs +0 -4
  679. package/dist/chunks/cli-1.1.2-vdnvxk7d.mjs +0 -2
  680. package/dist/chunks/cli-1.1.2-vdtd8tyw.mjs +0 -3
  681. package/dist/chunks/cli-1.1.2-vedfryrw.mjs +0 -39
  682. package/dist/chunks/cli-1.1.2-vkw3t6e1.mjs +0 -2
  683. package/dist/chunks/cli-1.1.2-vn5a5kng.mjs +0 -2
  684. package/dist/chunks/cli-1.1.2-vqhs2nfg.mjs +0 -2
  685. package/dist/chunks/cli-1.1.2-w39dxwaq.mjs +0 -5
  686. package/dist/chunks/cli-1.1.2-w6e54y3j.mjs +0 -2
  687. package/dist/chunks/cli-1.1.2-wd7anmzt.mjs +0 -2
  688. package/dist/chunks/cli-1.1.2-wfh9694n.mjs +0 -42
  689. package/dist/chunks/cli-1.1.2-whyrn26g.mjs +0 -2
  690. package/dist/chunks/cli-1.1.2-wtjpdxah.mjs +0 -2
  691. package/dist/chunks/cli-1.1.2-wz2q0wq7.mjs +0 -2
  692. package/dist/chunks/cli-1.1.2-x6tg8d4f.mjs +0 -58
  693. package/dist/chunks/cli-1.1.2-x7pdyv4r.mjs +0 -3
  694. package/dist/chunks/cli-1.1.2-x7qa1qq3.mjs +0 -50
  695. package/dist/chunks/cli-1.1.2-xbpjh8ph.mjs +0 -2
  696. package/dist/chunks/cli-1.1.2-xpf1bbmk.mjs +0 -2
  697. package/dist/chunks/cli-1.1.2-xrfe457w.mjs +0 -2
  698. package/dist/chunks/cli-1.1.2-y2eet2t4.mjs +0 -2
  699. package/dist/chunks/cli-1.1.2-y8dhsas4.mjs +0 -12
  700. package/dist/chunks/cli-1.1.2-yajs5n37.mjs +0 -18
  701. package/dist/chunks/cli-1.1.2-yh44qbw4.mjs +0 -2
  702. package/dist/chunks/cli-1.1.2-yj8m159m.mjs +0 -2
  703. package/dist/chunks/cli-1.1.2-z2m1x4a9.mjs +0 -2
  704. package/dist/chunks/cli-1.1.2-z31tqg0s.mjs +0 -202
  705. package/dist/chunks/cli-1.1.2-z56w3mhn.mjs +0 -3
  706. package/dist/chunks/cli-1.1.2-z7ha6v3f.mjs +0 -2
  707. package/dist/chunks/cli-1.1.2-ze70ftw0.mjs +0 -1
  708. package/dist/chunks/cli-1.1.2-zm6bk4ph.mjs +0 -2
  709. package/dist/chunks/cli-1.1.2-zn8nzq9g.mjs +0 -2
  710. package/dist/chunks/cli-1.1.2-zv4bhn4s.mjs +0 -6
  711. package/dist/chunks/cli-1.1.2-zy0pbg7t.mjs +0 -3
  712. package/dist/chunks/cli-1.1.2-zy7bxchk.mjs +0 -2
  713. package/dist/chunks/cli-1.1.2-zy8c0mk4.mjs +0 -2
  714. package/dist/chunks/cli-1.1.2-zzd75gm6.mjs +0 -2
  715. package/dist/chunks/client-1.1.2-cfb4as3w.mjs +0 -1
  716. package/dist/chunks/color-1.1.2-1sf55h7k.mjs +0 -1
  717. package/dist/chunks/compact-1.1.2-dd3f57yj.mjs +0 -3
  718. package/dist/chunks/config-1.1.2-6bc1gc6c.mjs +0 -1
  719. package/dist/chunks/config-1.1.2-p9t1wpdw.mjs +0 -1
  720. package/dist/chunks/constants-1.1.2-tkm4c60r.mjs +0 -1
  721. package/dist/chunks/context-1.1.2-rw4msk80.mjs +0 -1
  722. package/dist/chunks/context-noninteractive-1.1.2-c5hbr649.mjs +0 -1
  723. package/dist/chunks/conversation-1.1.2-h9dvper4.mjs +0 -1
  724. package/dist/chunks/copilotHeaders-1.1.2-nv81crna.mjs +0 -1
  725. package/dist/chunks/copy-1.1.2-hr7v2mx9.mjs +0 -9
  726. package/dist/chunks/cost-1.1.2-hdy89g4q.mjs +0 -1
  727. package/dist/chunks/createSSHSession-1.1.2-6v2x5eg0.mjs +0 -1
  728. package/dist/chunks/createSession-1.1.2-ygyb7e8j.mjs +0 -1
  729. package/dist/chunks/debug-1.1.2-wk2d9rj6.mjs +0 -1
  730. package/dist/chunks/defaultActionDeps-1.1.2-gjp00h29.mjs +0 -1446
  731. package/dist/chunks/desktop-1.1.2-egp65wej.mjs +0 -1
  732. package/dist/chunks/detectRepository-1.1.2-qh9nf9kg.mjs +0 -1
  733. package/dist/chunks/detection-1.1.2-02zpqkt2.mjs +0 -1
  734. package/dist/chunks/diff-1.1.2-29snp7ez.mjs +0 -1
  735. package/dist/chunks/doctor-1.1.2-b321t9z0.mjs +0 -1
  736. package/dist/chunks/doctorDiagnostic-1.1.2-214xq5kx.mjs +0 -1
  737. package/dist/chunks/earlyInput-1.1.2-n8b9n8hj.mjs +0 -1
  738. package/dist/chunks/effort-1.1.2-42pxj2ke.mjs +0 -13
  739. package/dist/chunks/engine-1.1.2-071c5ycx.mjs +0 -1
  740. package/dist/chunks/envLessBridgeConfig-1.1.2-90nzxgap.mjs +0 -1
  741. package/dist/chunks/envUtils-1.1.2-rdsjbb4f.mjs +0 -1
  742. package/dist/chunks/environmentSelection-1.1.2-eeacbnpj.mjs +0 -1
  743. package/dist/chunks/environments-1.1.2-e0a09brc.mjs +0 -1
  744. package/dist/chunks/errors-1.1.2-1fp0w76h.mjs +0 -1
  745. package/dist/chunks/exampleCommands-1.1.2-prrwcbkh.mjs +0 -1
  746. package/dist/chunks/execFileNoThrow-1.1.2-61na3ack.mjs +0 -1
  747. package/dist/chunks/exit-1.1.2-eh7t4pcy.mjs +0 -1
  748. package/dist/chunks/explorer-1.1.2-7brsg8bj.mjs +0 -1
  749. package/dist/chunks/export-1.1.2-2m0sfme0.mjs +0 -2
  750. package/dist/chunks/extra-usage-1.1.2-akf4qvp0.mjs +0 -1
  751. package/dist/chunks/extra-usage-noninteractive-1.1.2-ysbmggsv.mjs +0 -1
  752. package/dist/chunks/fast-1.1.2-43wzezv3.mjs +0 -1
  753. package/dist/chunks/feedback-1.1.2-92k099e0.mjs +0 -14
  754. package/dist/chunks/firstPartyEventLogger-1.1.2-ksq42qwt.mjs +0 -1
  755. package/dist/chunks/git-1.1.2-fgm2kpjd.mjs +0 -1
  756. package/dist/chunks/githubModelsCredentials-1.1.2-vj6dwy2c.mjs +0 -1
  757. package/dist/chunks/goal-1.1.2-hnd6dfnz.mjs +0 -4
  758. package/dist/chunks/grove-1.1.2-74zq9th4.mjs +0 -1
  759. package/dist/chunks/growthbook-1.1.2-x4pfbgm2.mjs +0 -1
  760. package/dist/chunks/headless-1.1.2-rhab73x2.mjs +0 -2
  761. package/dist/chunks/heapdump-1.1.2-a698r5c6.mjs +0 -6
  762. package/dist/chunks/help-1.1.2-er6xvvy0.mjs +0 -1
  763. package/dist/chunks/hookChains-1.1.2-yh3dmw0j.mjs +0 -3
  764. package/dist/chunks/hooks-1.1.2-63zxxjj9.mjs +0 -79
  765. package/dist/chunks/hooks-1.1.2-ez3kc0p2.mjs +0 -1
  766. package/dist/chunks/ide-1.1.2-je812srr.mjs +0 -3
  767. package/dist/chunks/image-processor-napi-1.1.2-xe8n5srr.mjs +0 -1
  768. package/dist/chunks/inboundAttachments-1.1.2-qywwkc7m.mjs +0 -1
  769. package/dist/chunks/index-1.1.2-3evh58r7.mjs +0 -1
  770. package/dist/chunks/index-1.1.2-69bhefzj.mjs +0 -1
  771. package/dist/chunks/index-1.1.2-7kya3jrk.mjs +0 -1
  772. package/dist/chunks/index-1.1.2-7sphewt0.mjs +0 -5
  773. package/dist/chunks/index-1.1.2-947wna4y.mjs +0 -1
  774. package/dist/chunks/index-1.1.2-95c20hmc.mjs +0 -1
  775. package/dist/chunks/index-1.1.2-9xdx0kw2.mjs +0 -1
  776. package/dist/chunks/index-1.1.2-bvpaf73z.mjs +0 -2
  777. package/dist/chunks/index-1.1.2-dkvq5y5c.mjs +0 -1
  778. package/dist/chunks/index-1.1.2-ebc3q9cn.mjs +0 -9
  779. package/dist/chunks/index-1.1.2-htmnqkfh.mjs +0 -1
  780. package/dist/chunks/index-1.1.2-kdaazhrb.mjs +0 -1
  781. package/dist/chunks/index-1.1.2-kzzb5289.mjs +0 -1
  782. package/dist/chunks/index-1.1.2-madt9yt1.mjs +0 -1
  783. package/dist/chunks/index-1.1.2-mvhaw48f.mjs +0 -2
  784. package/dist/chunks/index-1.1.2-pzx0977r.mjs +0 -1
  785. package/dist/chunks/index-1.1.2-r1zg7fm1.mjs +0 -1
  786. package/dist/chunks/index-1.1.2-s1rqf88d.mjs +0 -1
  787. package/dist/chunks/index-1.1.2-t2gvqgcr.mjs +0 -1
  788. package/dist/chunks/index-1.1.2-thaazk19.mjs +0 -17
  789. package/dist/chunks/index-1.1.2-wey7e6ag.mjs +0 -30
  790. package/dist/chunks/index-1.1.2-y8ab1zbc.mjs +0 -1
  791. package/dist/chunks/index-1.1.2-zzrwyq5p.mjs +0 -9
  792. package/dist/chunks/init-1.1.2-85zbvgkj.mjs +0 -1
  793. package/dist/chunks/initReplBridge-1.1.2-de5jg8xg.mjs +0 -1
  794. package/dist/chunks/ink-1.1.2-dqpj9964.mjs +0 -1
  795. package/dist/chunks/insights-1.1.2-y73zf53m.mjs +0 -870
  796. package/dist/chunks/install-1.1.2-89hhj53e.mjs +0 -1
  797. package/dist/chunks/install-github-app-1.1.2-qvppzny7.mjs +0 -149
  798. package/dist/chunks/install-slack-app-1.1.2-3h092m6m.mjs +0 -1
  799. package/dist/chunks/instrumentation-1.1.2-knbaf11q.mjs +0 -1
  800. package/dist/chunks/interactiveHelpers-1.1.2-1ef73k1d.mjs +0 -1
  801. package/dist/chunks/keybindings-1.1.2-k2t8cv4v.mjs +0 -2
  802. package/dist/chunks/knowledge-1.1.2-ssv0qdb3.mjs +0 -2
  803. package/dist/chunks/latestVersionCache-1.1.2-hjg7gvvk.mjs +0 -1
  804. package/dist/chunks/loadAgentsDir-1.1.2-s1ff144v.mjs +0 -1
  805. package/dist/chunks/loadPluginHooks-1.1.2-byf6cjm1.mjs +0 -1
  806. package/dist/chunks/loadPluginHooks-1.1.2-yvdv9pjd.mjs +0 -1
  807. package/dist/chunks/log-1.1.2-8cc3djq5.mjs +0 -1
  808. package/dist/chunks/main-1.1.2-th8b6kt4.mjs +0 -1
  809. package/dist/chunks/managedEnv-1.1.2-z470j86z.mjs +0 -1
  810. package/dist/chunks/mcp-1.1.2-86tk8ay8.mjs +0 -1
  811. package/dist/chunks/mcp-1.1.2-g64z89y6.mjs +0 -17
  812. package/dist/chunks/mcp-1.1.2-snaa1cjv.mjs +0 -4
  813. package/dist/chunks/mcpb-1.1.2-4mdrmbnx.mjs +0 -1
  814. package/dist/chunks/memory-1.1.2-habj4cwz.mjs +0 -72
  815. package/dist/chunks/model-1.1.2-vdjmatpe.mjs +0 -1
  816. package/dist/chunks/model-1.1.2-y4qnzr5d.mjs +0 -2
  817. package/dist/chunks/node-1.1.2-msn09mvf.mjs +0 -12
  818. package/dist/chunks/oauth-1.1.2-95md8es8.mjs +0 -1
  819. package/dist/chunks/openaiShim-1.1.2-swxk5w2d.mjs +0 -14
  820. package/dist/chunks/output-style-1.1.2-gk5rwyf3.mjs +0 -1
  821. package/dist/chunks/package-2VNCXFNY-1.1.2-t2qeqjq8.mjs +0 -1
  822. package/dist/chunks/parseConnectUrl-1.1.2-kh0kdj72.mjs +0 -1
  823. package/dist/chunks/parser-1.1.2-bq2yyqcn.mjs +0 -1
  824. package/dist/chunks/passes-1.1.2-z98me43k.mjs +0 -1
  825. package/dist/chunks/permissions-1.1.2-4q31d83k.mjs +0 -3
  826. package/dist/chunks/permissions-1.1.2-yj6ep04t.mjs +0 -1
  827. package/dist/chunks/plan-1.1.2-aq6tkcvx.mjs +0 -1
  828. package/dist/chunks/plist-1.1.2-wtdpfgrq.mjs +0 -1
  829. package/dist/chunks/plugin-1.1.2-9h7564kc.mjs +0 -29
  830. package/dist/chunks/pluginStartupCheck-1.1.2-xs7cvmve.mjs +0 -1
  831. package/dist/chunks/plugins-1.1.2-gktqysmr.mjs +0 -9
  832. package/dist/chunks/preActionHook-1.1.2-zbm0ahc2.mjs +0 -2
  833. package/dist/chunks/print-1.1.2-9xz8kk84.mjs +0 -57
  834. package/dist/chunks/privacy-settings-1.1.2-9w8bvgmp.mjs +0 -1
  835. package/dist/chunks/process-1.1.2-4ha9kngp.mjs +0 -1
  836. package/dist/chunks/processBashCommand-1.1.2-t1abzpg8.mjs +0 -1
  837. package/dist/chunks/processSlashCommand-1.1.2-krgryjdy.mjs +0 -9
  838. package/dist/chunks/prompt-1.1.2-exabd70s.mjs +0 -1
  839. package/dist/chunks/prompt-1.1.2-qbhgy60q.mjs +0 -1
  840. package/dist/chunks/prompts-1.1.2-z5xqs93q.mjs +0 -1
  841. package/dist/chunks/protocolHandler-1.1.2-jzdef7t2.mjs +0 -13
  842. package/dist/chunks/provider-1.1.2-q784s7t1.mjs +0 -2
  843. package/dist/chunks/providerProfiles-1.1.2-hgq6ezmt.mjs +0 -1
  844. package/dist/chunks/providerValidation-1.1.2-6svgbwp4.mjs +0 -6
  845. package/dist/chunks/rate-limit-options-1.1.2-pdk8r710.mjs +0 -1
  846. package/dist/chunks/registerSubcommands-1.1.2-ja3famgz.mjs +0 -34
  847. package/dist/chunks/registry-1.1.2-bteqae43.mjs +0 -1
  848. package/dist/chunks/release-notes-1.1.2-m864etmn.mjs +0 -5
  849. package/dist/chunks/reload-plugins-1.1.2-xgc8eghm.mjs +0 -2
  850. package/dist/chunks/remote-env-1.1.2-jy20nnyn.mjs +0 -1
  851. package/dist/chunks/remoteBridgeCore-1.1.2-wrzz2zme.mjs +0 -1
  852. package/dist/chunks/remoteSession-1.1.2-2ms5x1xn.mjs +0 -1
  853. package/dist/chunks/rename-1.1.2-99a39m1m.mjs +0 -1
  854. package/dist/chunks/replBridgeHandle-1.1.2-6qx7my8a.mjs +0 -1
  855. package/dist/chunks/replLauncher-1.1.2-8aq6b75y.mjs +0 -1
  856. package/dist/chunks/resume-1.1.2-n0d6rgp7.mjs +0 -2
  857. package/dist/chunks/rewind-1.1.2-4mrqvf42.mjs +0 -1
  858. package/dist/chunks/rootOptions-1.1.2-3vma1kzy.mjs +0 -1
  859. package/dist/chunks/runWorkflowHeadless-1.1.2-qpb0brgp.mjs +0 -10
  860. package/dist/chunks/sandbox-adapter-1.1.2-985g3rtd.mjs +0 -1
  861. package/dist/chunks/sandbox-toggle-1.1.2-h5bx372x.mjs +0 -1
  862. package/dist/chunks/session-1.1.2-q3ahqvyx.mjs +0 -2
  863. package/dist/chunks/sessionDiscovery-1.1.2-qcyr8b8w.mjs +0 -1
  864. package/dist/chunks/sessionFileAccessHooks-1.1.2-2y6b014f.mjs +0 -1
  865. package/dist/chunks/sessionStorage-1.1.2-6vk4ryr3.mjs +0 -1
  866. package/dist/chunks/settings-1.1.2-nf07eg97.mjs +0 -1
  867. package/dist/chunks/setup-1.1.2-5f344krn.mjs +0 -5
  868. package/dist/chunks/sinks-1.1.2-xq2d5k0p.mjs +0 -1
  869. package/dist/chunks/skills-1.1.2-2e8x03xz.mjs +0 -1
  870. package/dist/chunks/startupProfiler-1.1.2-vbw0t7zn.mjs +0 -1
  871. package/dist/chunks/startupUpdateCheck-1.1.2-7xtv2jhz.mjs +0 -1
  872. package/dist/chunks/state-1.1.2-4stfxgxw.mjs +0 -1
  873. package/dist/chunks/stats-1.1.2-x2men93c.mjs +0 -6
  874. package/dist/chunks/status-1.1.2-k6342tq7.mjs +0 -1
  875. package/dist/chunks/stickers-1.1.2-m2ee29wd.mjs +0 -1
  876. package/dist/chunks/subprocessEnv-1.1.2-gfsm4m3z.mjs +0 -1
  877. package/dist/chunks/tasks-1.1.2-52bgwvvk.mjs +0 -1
  878. package/dist/chunks/teamHelpers-1.1.2-fcfqve0r.mjs +0 -1
  879. package/dist/chunks/teammateModeSnapshot-1.1.2-s2qw8rtp.mjs +0 -1
  880. package/dist/chunks/teleport-1.1.2-mxjmy1bj.mjs +0 -1
  881. package/dist/chunks/terminalSetup-1.1.2-376p31n2.mjs +0 -1
  882. package/dist/chunks/theme-1.1.2-vhrm8pkz.mjs +0 -1
  883. package/dist/chunks/thinkback-1.1.2-2k5azpda.mjs +0 -1
  884. package/dist/chunks/thinkback-play-1.1.2-w3xe66qy.mjs +0 -1
  885. package/dist/chunks/toolPool-1.1.2-th0e7c3p.mjs +0 -1
  886. package/dist/chunks/toolSearch-1.1.2-5vbh7tfs.mjs +0 -1
  887. package/dist/chunks/tools-1.1.2-0tdzn87s.mjs +0 -1
  888. package/dist/chunks/trustedDevice-1.1.2-s31a3mdh.mjs +0 -1
  889. package/dist/chunks/turndown.cjs-1.1.2-aj5hafxn.mjs +0 -69
  890. package/dist/chunks/types-1.1.2-vst16v9y.mjs +0 -1
  891. package/dist/chunks/ultrareviewCommand-1.1.2-3tcemmrp.mjs +0 -4
  892. package/dist/chunks/update-1.1.2-7daxbkja.mjs +0 -72
  893. package/dist/chunks/upgrade-1.1.2-paz816ha.mjs +0 -1
  894. package/dist/chunks/upload-1.1.2-tb2wafs2.mjs +0 -7
  895. package/dist/chunks/upstreamproxy-1.1.2-k3w1snzk.mjs +0 -14
  896. package/dist/chunks/url-handler-napi-1.1.2-2w62pdbp.mjs +0 -1
  897. package/dist/chunks/usage-1.1.2-xa0p51ga.mjs +0 -1
  898. package/dist/chunks/util-1.1.2-790z163z.mjs +0 -1
  899. package/dist/chunks/utils-1.1.2-vs0h9jny.mjs +0 -1
  900. package/dist/chunks/vim-1.1.2-c8e520z8.mjs +0 -1
  901. package/dist/chunks/watchLoop-1.1.2-e4ehn07s.mjs +0 -13
  902. package/dist/chunks/watcher-1.1.2-731rkpjz.mjs +0 -1
  903. package/dist/chunks/wiki-1.1.2-zbc6h2h9.mjs +0 -132
  904. package/dist/chunks/workflows-1.1.2-g3w76nrf.mjs +0 -1
  905. package/dist/chunks/worktree-1.1.2-7nptnzv3.mjs +0 -1
  906. package/dist/chunks/worktreeModeEnabled-1.1.2-kgnb2ck1.mjs +0 -1
  907. package/dist/chunks/wrapper-1.1.2-3pstqzgw.mjs +0 -7
  908. /package/dist/chunks/{cli-1.1.2-8t8veykp.mjs → cli-1.1.4-1f3p70jj.mjs} +0 -0
  909. /package/dist/chunks/{cli-1.1.2-3vyt3jw9.mjs → cli-1.1.4-ez4xtmvg.mjs} +0 -0
  910. /package/dist/chunks/{cli-1.1.2-6jbsqbdw.mjs → cli-1.1.4-gp99zrz4.mjs} +0 -0
  911. /package/dist/chunks/{cli-1.1.2-btgmqahb.mjs → cli-1.1.4-gpvz5jfv.mjs} +0 -0
  912. /package/dist/chunks/{cli-1.1.2-6d3jf0sj.mjs → cli-1.1.4-n0dzwv49.mjs} +0 -0
  913. /package/dist/chunks/{cli-1.1.2-r4rfggdk.mjs → cli-1.1.4-q1mcaeav.mjs} +0 -0
  914. /package/dist/chunks/{cli-1.1.2-pgz05ddc.mjs → cli-1.1.4-tg5t7jrb.mjs} +0 -0
@@ -1,202 +0,0 @@
1
- import{uha as Q6,zha as JB}from"./cli-1.1.2-bhjzjkag.mjs";import{Hha as fq,Jha as t2,Kha as Kk}from"./cli-1.1.2-gdcv810d.mjs";import{Uha as s1,eia as Iq}from"./cli-1.1.2-7jcscwh5.mjs";import{Aia as I,Bia as t1,hia as Iz,kia as _P,qia as Uq,uia as AO,via as gV,xia as G,yia as hq,zia as r0}from"./cli-1.1.2-4x5wz1xq.mjs";import{Eia as t,Gia as Z1,Qia as Sz,hja as MP}from"./cli-1.1.2-s76jqr70.mjs";import{ija as lW,qja as bL,rja as nW}from"./cli-1.1.2-qge4zbeg.mjs";import{sja as s0,vja as VW}from"./cli-1.1.2-whyrn26g.mjs";import{$ja as Z0,Aja as kQ,Bja as _q,Cja as Jw,Dja as $U,Eja as wO,Fja as UQ,Gja as z_,Hja as FU,Ija as mO,Jja as N7,Kja as DU,Lja as wU,Mja as iO,Nja as kU,Oja as aO,Pja as zU,Qja as vO,Rja as MQ,Sja as A_,Tja as NU,Uja as oO,Vja as xU,Wja as sO,Zja as M7,_ja as m,aka as HJ,bka as pL,dka as R0,eka as O1,hka as N,lka as M0,vka as E,yja as _6,yka as K1}from"./cli-1.1.2-re4qc97z.mjs";import{Pka as _5,Uka as yz,Wka as W0,Xka as n2,_ka as BW,ala as o1}from"./cli-1.1.2-dgw89jzs.mjs";import{dla as G0,gla as q0,hla as OB,ila as V6,qla as o0}from"./cli-1.1.2-gxzwceae.mjs";import{Ama as L_,Apa as BB,Bma as BQ,Cma as R_,Dla as Lq,Dma as x7,Ela as dO,Ema as dU,Fma as RQ,Gma as D_,Hma as YB,Ima as HB,Jma as GB,Kma as KB,Lma as UB,Loa as IB,Mma as WB,Mpa as FL,Nla as w7,Nma as e6,Ola as UU,Oma as VB,Pla as zq,Qla as cO,Rla as IU,Rma as XW,Sla as lO,Tla as f4,Ula as HQ,Vqa as z2,Zla as OU,_la as nO,ana as q2,bna as L4,bpa as GJ,dpa as KJ,eoa as wQ,fma as k7,gma as WU,lpa as vz,npa as Cz,rla as vU,sla as tO,tma as _Q,uma as F_,upa as yW,xma as g4,yma as GQ,zma as KQ}from"./cli-1.1.2-s2xde2xb.mjs";import{Wqa as O7,Xqa as QU,era as LU,fra as PO,gra as e0,hra as h4,ira as jU,jra as pO,sra as u,tra as I1}from"./cli-1.1.2-9rh5p8p5.mjs";import{Asa as NP,Bsa as O4,Csa as c,Dsa as bq,Esa as B,Fsa as Y0,Gsa as m2,Hsa as u2}from"./cli-1.1.2-10g0wy7w.mjs";var jX=c((hP,TX)=>{TX.exports=AX;AX.sync=mz;var FX=Y0("fs");function gz(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 X=0;X<J.length;X++){var Q=J[X].toLowerCase();if(Q&&Z.substr(-Q.length).toLowerCase()===Q)return!0}return!1}function DX(Z,q,J){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return gz(q,J)}function AX(Z,q,J){FX.stat(Z,function(X,Q){J(X,X?!1:DX(Q,Z,q))})}function mz(Z,q){return DX(FX.statSync(Z),Z,q)}});var NX=c((fP,kX)=>{kX.exports=OX;OX.sync=uz;var IX=Y0("fs");function OX(Z,q,J){IX.stat(Z,function(X,Q){J(X,X?!1:wX(Q,q))})}function uz(Z,q){return wX(IX.statSync(Z),q)}function wX(Z,q){return Z.isFile()&&pz(Z,q)}function pz(Z,q){var{mode:J,uid:X,gid:Q}=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),U=parseInt("001",8),W=H|K,V=J&U||J&K&&Q===Y||J&H&&X===$||J&W&&$===0;return V}});var EX=c((mP,xX)=>{var gP=Y0("fs"),b4;if(process.platform==="win32"||global.TESTING_WINDOWS)b4=jX();else b4=NX();xX.exports=c5;c5.sync=dz;function c5(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(X,Q){c5(Z,q||{},function($,Y){if($)Q($);else X(Y)})})}b4(Z,q||{},function(X,Q){if(X){if(X.code==="EACCES"||q&&q.ignoreErrors)X=null,Q=!1}J(X,Q)})}function dz(Z,q){try{return b4.sync(Z,q||{})}catch(J){if(q&&q.ignoreErrors||J.code==="EACCES")return!1;else throw J}}});var hX=c((uP,bX)=>{var V2=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",PX=Y0("path"),cz=V2?";":":",vX=EX(),CX=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),yX=(Z,q)=>{let J=q.colon||cz,X=Z.match(/\//)||V2&&Z.match(/\\/)?[""]:[...V2?[process.cwd()]:[],...(q.path||process.env.PATH||"").split(J)],Q=V2?q.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",$=V2?Q.split(J):[""];if(V2){if(Z.indexOf(".")!==-1&&$[0]!=="")$.unshift("")}return{pathEnv:X,pathExt:$,pathExtExe:Q}},SX=(Z,q,J)=>{if(typeof q==="function")J=q,q={};if(!q)q={};let{pathEnv:X,pathExt:Q,pathExtExe:$}=yX(Z,q),Y=[],H=(U)=>new Promise((W,V)=>{if(U===X.length)return q.all&&Y.length?W(Y):V(CX(Z));let L=X[U],z=/^".*"$/.test(L)?L.slice(1,-1):L,_=PX.join(z,Z),R=!z&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+_:_;W(K(R,U,0))}),K=(U,W,V)=>new Promise((L,z)=>{if(V===Q.length)return L(H(W+1));let _=Q[V];vX(U+_,{pathExt:$},(R,M)=>{if(!R&&M)if(q.all)Y.push(U+_);else return L(U+_);return L(K(U,W,V+1))})});return J?H(0).then((U)=>J(null,U),J):H(0)},lz=(Z,q)=>{q=q||{};let{pathEnv:J,pathExt:X,pathExtExe:Q}=yX(Z,q),$=[];for(let Y=0;Y<J.length;Y++){let H=J[Y],K=/^".*"$/.test(H)?H.slice(1,-1):H,U=PX.join(K,Z),W=!K&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+U:U;for(let V=0;V<X.length;V++){let L=W+X[V];try{if(vX.sync(L,{pathExt:Q}))if(q.all)$.push(L);else return L}catch(z){}}}if(q.all&&$.length)return $;if(q.nothrow)return null;throw CX(Z)};bX.exports=SX;SX.sync=lz});var gX=c((pP,l5)=>{var fX=(Z={})=>{let q=Z.env||process.env;if((Z.platform||process.platform)!=="win32")return"PATH";return Object.keys(q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"};l5.exports=fX;l5.exports.default=fX});var dX=c((dP,pX)=>{var mX=Y0("path"),nz=hX(),iz=gX();function uX(Z,q){let J=Z.options.env||process.env,X=process.cwd(),Q=Z.options.cwd!=null,$=Q&&process.chdir!==void 0&&!process.chdir.disabled;if($)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=nz.sync(Z.command,{path:J[iz({env:J})],pathExt:q?mX.delimiter:void 0})}catch(H){}finally{if($)process.chdir(X)}if(Y)Y=mX.resolve(Q?Z.options.cwd:"",Y);return Y}function az(Z){return uX(Z)||uX(Z,!0)}pX.exports=az});var cX=c((rz,i5)=>{var n5=/([()\][%!^"`<>&|;, *?])/g;function oz(Z){return Z=Z.replace(n5,"^$1"),Z}function sz(Z,q){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(n5,"^$1"),q)Z=Z.replace(n5,"^$1");return Z}rz.command=oz;rz.argument=sz});var nX=c((cP,lX)=>{lX.exports=/^#!(.*)/});var aX=c((lP,iX)=>{var Z_=nX();iX.exports=(Z="")=>{let q=Z.match(Z_);if(!q)return null;let[J,X]=q[0].replace(/#! ?/,"").split(" "),Q=J.split("/").pop();if(Q==="env")return X;return X?`${Q} ${X}`:Q}});var sX=c((nP,oX)=>{var a5=Y0("fs"),q_=aX();function J_(Z){let J=Buffer.alloc(150),X;try{X=a5.openSync(Z,"r"),a5.readSync(X,J,0,150,0),a5.closeSync(X)}catch(Q){}return q_(J.toString())}oX.exports=J_});var ZQ=c((iP,eX)=>{var X_=Y0("path"),rX=dX(),tX=cX(),Q_=sX(),$_=process.platform==="win32",Y_=/\.(?:com|exe)$/i,H_=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function G_(Z){Z.file=rX(Z);let q=Z.file&&Q_(Z.file);if(q)return Z.args.unshift(Z.file),Z.command=q,rX(Z);return Z.file}function K_(Z){if(!$_)return Z;let q=G_(Z),J=!Y_.test(q);if(Z.options.forceShell||J){let X=H_.test(q);Z.command=X_.normalize(Z.command),Z.command=tX.command(Z.command),Z.args=Z.args.map(($)=>tX.argument($,X));let Q=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${Q}"`],Z.command=process.env.comspec||"cmd.exe",Z.options.windowsVerbatimArguments=!0}return Z}function U_(Z,q,J){if(q&&!Array.isArray(q))J=q,q=null;q=q?q.slice(0):[],J=Object.assign({},J);let X={command:Z,args:q,options:J,file:void 0,original:{command:Z,args:q}};return J.shell?X:K_(X)}eX.exports=U_});var XQ=c((aP,JQ)=>{var o5=process.platform==="win32";function s5(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 W_(Z,q){if(!o5)return;let J=Z.emit;Z.emit=function(X,Q){if(X==="exit"){let $=qQ(Q,q);if($)return J.call(Z,"error",$)}return J.apply(Z,arguments)}}function qQ(Z,q){if(o5&&Z===1&&!q.file)return s5(q.original,"spawn");return null}function V_(Z,q){if(o5&&Z===1&&!q.file)return s5(q.original,"spawnSync");return null}JQ.exports={hookChildProcess:W_,verifyENOENT:qQ,verifyENOENTSync:V_,notFoundError:s5}});var YQ=c((oP,B2)=>{var QQ=Y0("child_process"),r5=ZQ(),t5=XQ();function $Q(Z,q,J){let X=r5(Z,q,J),Q=QQ.spawn(X.command,X.args,X.options);return t5.hookChildProcess(Q,X),Q}function B_(Z,q,J){let X=r5(Z,q,J),Q=QQ.spawnSync(X.command,X.args,X.options);return Q.error=Q.error||t5.verifyENOENTSync(Q.status,X),Q}B2.exports=$Q;B2.exports.spawn=$Q;B2.exports.sync=B_;B2.exports._parse=r5;B2.exports._enoent=t5});function __(Z,q,J,X){if(!e0(Z))return Z;q=g4(q,Z);var Q=-1,$=q.length,Y=$-1,H=Z;while(H!=null&&++Q<$){var K=KQ(q[Q]),U=J;if(K==="__proto__"||K==="constructor"||K==="prototype")return Z;if(Q!=Y){var W=H[K];if(U=X?X(W,K,H):void 0,U===void 0)U=e0(W)?W:f4(q[Q+1])?[]:{}}UQ(H,K,U),H=H[K]}return Z}var WQ;var VQ=B(()=>{z_();GQ();HQ();h4();L_();WQ=__});function M_(Z,q,J){var X=-1,Q=q.length,$={};while(++X<Q){var Y=q[X],H=BQ(Z,Y);if(J(H,Y))WQ($,g4(Y,Z),H)}return $}var LQ;var zQ=B(()=>{R_();VQ();GQ();LQ=M_});function T_(Z,q){if(Z==null)return{};var J=_Q(MQ(Z),function(X){return[X]});return q=RQ(q),LQ(Z,J,function(X,Q){return q(X,Q[0])})}var e5;var FQ=B(()=>{F_();D_();zQ();A_();e5=T_});function DQ(Z){let q=Z.slice(Z.lastIndexOf(".")).toLowerCase();return j_.has(q)}function AQ(Z){let q=Math.min(Z.length,I_),J=0;for(let X=0;X<q;X++){let Q=Z[X];if(Q===0)return!0;if(Q<32&&Q!==9&&Q!==10&&Q!==13)J++}return J/q>0.1}var j_,I_=8192;var TQ=B(()=>{j_=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 O_}from"path";function H0(Z,q,J){let X=w_();if(!X)return;let Q={timestamp:new Date().toISOString(),level:Z,event:q,data:J??{}},$=N(),Y=m(Q)+`
2
- `;try{$.appendFileSync(X,Y)}catch{try{$.mkdirSync(O_(X)),$.appendFileSync(X,Y)}catch{}}}function w_(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function zv(Z,q,J){let X=Date.now();H0("info",`${Z}_started`);try{let Q=await q(),$=J?J(Q):{};return H0("info",`${Z}_completed`,{duration_ms:Date.now()-X,...$}),Q}catch(Q){throw H0("error",`${Z}_failed`,{duration_ms:Date.now()-X}),Q}}var L6=B(()=>{M0();R0()});import{readFile as k_}from"fs/promises";import{join as N_}from"path";async function z6(Z,q,J,X){try{let Q=await k_(N_(Z,"config"),"utf-8");return x_(Q,q,J,X)}catch{return null}}function x_(Z,q,J,X){let Q=Z.split(`
3
- `),$=q.toLowerCase(),Y=X.toLowerCase(),H=!1;for(let K of Q){let U=K.trim();if(U.length===0||U[0]==="#"||U[0]===";")continue;if(U[0]==="["){H=C_(U,$,J);continue}if(!H)continue;let W=E_(U);if(W&&W.key.toLowerCase()===Y)return W.value}return null}function E_(Z){let q=0;while(q<Z.length&&y_(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 X=P_(Z,q);return{key:J,value:X}}function P_(Z,q){let J="",X=!1,Q=q;while(Q<Z.length){let $=Z[Q];if(!X&&($==="#"||$===";"))break;if($==='"'){X=!X,Q++;continue}if($==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(X){switch(Y){case"n":J+=`
4
- `;break;case"t":J+="\t";break;case"b":J+="\b";break;case'"':J+='"';break;case"\\":J+="\\";break;default:J+=Y;break}Q+=2;continue}if(Y==="\\"){J+="\\",Q+=2;continue}}J+=$,Q++}if(!X)J=v_(J);return J}function v_(Z){let q=Z.length;while(q>0&&(Z[q-1]===" "||Z[q-1]==="\t"))q--;return Z.slice(0,q)}function C_(Z,q,J){let X=1;while(X<Z.length&&Z[X]!=="]"&&Z[X]!==" "&&Z[X]!=="\t"&&Z[X]!=='"')X++;if(Z.slice(1,X).toLowerCase()!==q)return!1;if(J===null)return X<Z.length&&Z[X]==="]";while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;if(X>=Z.length||Z[X]!=='"')return!1;X++;let $="";while(X<Z.length&&Z[X]!=='"'){if(Z[X]==="\\"&&X+1<Z.length){let Y=Z[X+1];if(Y==="\\"||Y==='"'){$+=Y,X+=2;continue}$+=Y,X+=2;continue}$+=Z[X],X++}if(X>=Z.length||Z[X]!=='"')return!1;if(X++,X>=Z.length||Z[X]!=="]")return!1;return $===J}function y_(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var jQ=()=>{};import{unwatchFile as IQ,watchFile as S_}from"fs";import{readdir as b_,readFile as v1,stat as NQ}from"fs/promises";import{join as w0,resolve as m4}from"path";function Nv(){L2.clear()}async function S0(Z){let q=m4(Z??t()),J=L2.get(q);if(J!==void 0)return J;let X=R2(q);if(!X)return L2.set(q,null),null;let Q=w0(X,".git");try{if((await NQ(Q)).isFile()){let Y=(await v1(Q,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),K=m4(X,H);return L2.set(q,K),K}}return L2.set(q,Q),Q}catch{return L2.set(q,null),null}}function u4(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 Z3(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function R6(Z){try{let q=(await v1(w0(Z,"HEAD"),"utf-8")).trim();if(q.startsWith("ref:")){let J=q.slice(4).trim();if(J.startsWith("refs/heads/")){let Q=J.slice(11);if(!u4(Q))return null;return{type:"branch",name:Q}}if(!u4(J))return null;let X=await _2(Z,J);return X?{type:"detached",sha:X}:{type:"detached",sha:""}}if(!Z3(q))return null;return{type:"detached",sha:q}}catch{return null}}async function _2(Z,q){let J=await OQ(Z,q);if(J)return J;let X=await C1(Z);if(X&&X!==Z)return OQ(X,q);return null}async function OQ(Z,q){try{let J=(await v1(w0(Z,q),"utf-8")).trim();if(J.startsWith("ref:")){let X=J.slice(4).trim();if(!u4(X))return null;return _2(Z,X)}if(!Z3(J))return null;return J}catch{}try{let J=await v1(w0(Z,"packed-refs"),"utf-8");for(let X of J.split(`
5
- `)){if(X.startsWith("#")||X.startsWith("^"))continue;let Q=X.indexOf(" ");if(Q===-1)continue;if(X.slice(Q+1)===q){let $=X.slice(0,Q);return Z3($)?$:null}}}catch{}return null}async function C1(Z){try{let q=(await v1(w0(Z,"commondir"),"utf-8")).trim();return m4(Z,q)}catch{return null}}async function h_(Z,q,J){try{let X=(await v1(w0(Z,q),"utf-8")).trim();if(X.startsWith("ref:")){let Q=X.slice(4).trim();if(Q.startsWith(J)){let $=Q.slice(J.length);if(!u4($))return null;return $}}}catch{}return null}class xQ{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 S0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await C1(this.gitDir),this.watchPath(w0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(w0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),_6(async()=>{this.stopWatching()})}watchPath(Z,q){this.watchedPaths.push(Z),S_(Z,{interval:f_},q)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await R6(this.gitDir),q=this.commonDir??this.gitDir,J=Z?.type==="branch"?w0(q,"refs","heads",Z.name):null;if(J===this.branchRefPath)return;if(this.branchRefPath)IQ(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((X)=>X!==this.branchRefPath);if(this.branchRefPath=J,!J)return;this.watchPath(J,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await wQ(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)IQ(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 X=await q(),Q=this.cache.get(Z);if(Q&&!Q.dirty)Q.value=X;if(!Q)this.cache.set(Z,{value:X,dirty:!1,compute:q});return X}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function g_(){let Z=await S0();if(!Z)return"HEAD";let q=await R6(Z);if(!q)return"HEAD";return q.type==="branch"?q.name:"HEAD"}async function m_(){let Z=await S0();if(!Z)return"";let q=await R6(Z);if(!q)return"";if(q.type==="branch")return await _2(Z,`refs/heads/${q.name}`)??"";return q.sha}async function u_(){let Z=await S0();if(!Z)return null;let q=await z6(Z,"remote","origin","url");if(q)return q;let J=await C1(Z);if(J&&J!==Z)return z6(J,"remote","origin","url");return null}async function p_(){let Z=await S0();if(!Z)return"main";let q=await C1(Z)??Z,J=await h_(q,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(J)return J;for(let X of["main","master"])if(await _2(q,`refs/remotes/origin/${X}`))return X;return"main"}function EQ(){return p4.get("branch",g_)}function PQ(){return p4.get("head",m_)}function vQ(){return p4.get("remoteUrl",u_)}function CQ(){return p4.get("defaultBranch",p_)}async function xv(Z){let q=await S0(Z);if(!q)return null;let J=await R6(q);if(!J)return null;if(J.type==="branch")return _2(q,`refs/heads/${J.name}`);return J.sha}async function Ev(Z){let q;try{let X=(await v1(w0(Z,".git"),"utf-8")).trim();if(!X.startsWith("gitdir:"))return null;q=m4(Z,X.slice(7).trim())}catch{return null}let J=await R6(q);if(!J)return null;if(J.type==="branch")return _2(q,`refs/heads/${J.name}`);return J.sha}async function Pv(Z){let q=await S0(Z);if(!q)return null;let J=await z6(q,"remote","origin","url");if(J)return J;let X=await C1(q);if(X&&X!==q)return z6(X,"remote","origin","url");return null}async function yQ(){let Z=await S0();if(!Z)return!1;let q=await C1(Z)??Z;try{return await NQ(w0(q,"shallow")),!0}catch{return!1}}async function SQ(){try{let Z=await S0();if(!Z)return 0;let q=await C1(Z)??Z;return(await b_(w0(q,"worktrees"))).length+1}catch{return 1}}var L2,f_=1000,p4;var bQ=B(()=>{z2();kQ();Z1();M6();jQ();L2=new Map;p4=new xQ});import{tracingChannel as d_,channel as c_}from"node:diagnostics_channel";var U0,F6,l_,q3=()=>U0.hasSubscribers||F6.hasSubscribers,fQ,hQ,n_=(Z,q,J,X)=>{typeof hQ.emitWarning=="function"?hQ.emitWarning(Z,q,J,X):console.error(`[${J}] ${q}: ${Z}`)},i_=(Z)=>!fQ.has(Z),R1=(Z)=>!!Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),gQ=(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?d4:null:null,d4,a_=class Z{heap;length;static#J=!1;static create(q){let J=gQ(q);if(!J)return[];Z.#J=!0;let X=new Z(q,J);return Z.#J=!1,X}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]}},mQ;var uQ=B(()=>{U0=c_("lru-cache:metrics"),F6=d_("lru-cache"),l_=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,fQ=new Set,hQ=typeof process=="object"&&process?process:{},d4=class extends Array{constructor(Z){super(Z),this.fill(0)}},mQ=class Z{#J;#X;#q;#Y;#G;#V;#A;#_;get perf(){return this.#_}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;#z;#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.#Q(J),backgroundFetch:(J,X,Q,$)=>q.#m(J,X,Q,$),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.#X}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:X,ttlResolution:Q=1,ttlAutopurge:$,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:K,dispose:U,onInsert:W,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:z,maxSize:_=0,maxEntrySize:R=0,sizeCalculation:M,fetchMethod:F,memoMethod:k,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:j,ignoreFetchAbort:A,backgroundFetchSize:b=1,perf:w}=q;if(this.backgroundFetchSize=b,w!==void 0&&typeof w?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#_=w??l_,J!==0&&!R1(J))throw TypeError("max option must be a nonnegative integer");let x=J?gQ(J):Array;if(!x)throw Error("invalid max value: "+J);if(this.#J=J,this.#X=_,this.maxEntrySize=R||this.#X,this.sizeCalculation=M,this.sizeCalculation){if(!this.#X&&!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 x(J),this.#R=new x(J),this.#B=0,this.#U=0,this.#j=a_.create(J),this.#H=0,this.#T=0,typeof U=="function"&&(this.#q=U),typeof W=="function"&&(this.#Y=W),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.#z=!!this.#G,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!z,this.noDeleteOnFetchRejection=!!D,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!j,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#X!==0&&!R1(this.#X))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(Q)||Q===0?Q:1,this.ttlAutopurge=!!$,this.ttl=X||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.#X===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#J&&!this.#X){let P="LRU_CACHE_UNBOUNDED";i_(P)&&(fQ.add(P),n_("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",P,Z))}}getRemainingTTL(q){return this.#K.has(q)?1/0:0}#u(){let q=new d4(this.#J),J=new d4(this.#J);this.#M=q,this.#O=J;let X=this.ttlAutopurge?Array.from({length:this.#J}):void 0;this.#F=X,this.#p=(K,U,W=this.#_.now())=>{J[K]=U!==0?W:0,q[K]=U,Q(K,U)},this.#C=(K)=>{J[K]=q[K]!==0?this.#_.now():0,Q(K,q[K])};let Q=this.ttlAutopurge?(K,U)=>{if(X?.[K]&&(clearTimeout(X[K]),X[K]=void 0),U&&U!==0&&X){let W=setTimeout(()=>{this.#D(K)?(this.#x(this.#$[K],"expire"),X[K]=void 0):Q(K,H(K))},U+1);W.unref&&W.unref(),X[K]=W}}:()=>{};this.#E=(K,U)=>{if(q[U]){let W=q[U],V=J[U];if(!W||!V)return;K.ttl=W,K.start=V,K.now=$||Y();let L=K.now-V;K.remainingTTL=W-L}};let $=0,Y=()=>{let K=this.#_.now();if(this.ttlResolution>0){$=K;let U=setTimeout(()=>$=0,this.ttlResolution);U.unref&&U.unref()}return K};this.getRemainingTTL=(K)=>{let U=this.#K.get(K);return U===void 0?0:H(U)};let H=(K)=>{let U=q[K],W=J[K];if(!U||!W)return 1/0;let V=($||Y())-W;return U-V};this.#D=(K)=>{let U=J[K],W=q[K];return!!W&&!!U&&($||Y())-U>W}}#C=()=>{};#E=()=>{};#p=()=>{};#D=()=>!1;#a(){let q=new d4(this.#J);this.#T=0,this.#I=q,this.#y=(J)=>{this.#T-=q[J],q[J]=0},this.#d=(J,X,Q,$)=>{if(!R1(Q)){if(this.#Q(X))return this.backgroundFetchSize;if($){if(typeof $!="function")throw TypeError("sizeCalculation must be a function");if(Q=$(X,J),!R1(Q))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 Q},this.#f=(J,X,Q)=>{if(q[J]=X,this.#X){let $=this.#X-q[J];for(;this.#T>$;)this.#g(!0)}this.#T+=q[J],Q&&(Q.entrySize=X,Q.totalCalculatedSize=this.#T)}}#y=(q)=>{};#f=(q,J,X)=>{};#d=(q,J,X,Q)=>{if(X||Q)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.#Q(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.#Q(this.#Z[q])&&(yield[this.#$[q],this.#Z[q]])}*keys(){for(let q of this.#k()){let J=this.#$[q];J!==void 0&&!this.#Q(this.#Z[q])&&(yield J)}}*rkeys(){for(let q of this.#N()){let J=this.#$[q];J!==void 0&&!this.#Q(this.#Z[q])&&(yield J)}}*values(){for(let q of this.#k())this.#Z[q]!==void 0&&!this.#Q(this.#Z[q])&&(yield this.#Z[q])}*rvalues(){for(let q of this.#N())this.#Z[q]!==void 0&&!this.#Q(this.#Z[q])&&(yield this.#Z[q])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(q,J={}){for(let X of this.#k()){let Q=this.#Z[X],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($!==void 0&&q($,this.#$[X],this))return this.#S(this.#$[X],J)}}forEach(q,J=this){for(let X of this.#k()){let Q=this.#Z[X],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&q.call(J,$,this.#$[X],this)}}rforEach(q,J=this){for(let X of this.#N()){let Q=this.#Z[X],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&q.call(J,$,this.#$[X],this)}}purgeStale(){let q=!1;for(let J of this.#N({allowStale:!0}))this.#D(J)&&(this.#x(this.#$[J],"expire"),q=!0);return q}info(q){let J=this.#K.get(q);if(J===void 0)return;let X=this.#Z[J],Q=this.#Q(X)?X.__staleWhileFetching:X;if(Q===void 0)return;let $={value:Q};if(this.#M&&this.#O){let Y=this.#M[J],H=this.#O[J];if(Y&&H){let K=Y-(this.#_.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 X=this.#$[J],Q=this.#Z[J],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($===void 0||X===void 0)continue;let Y={value:$};if(this.#M&&this.#O){Y.ttl=this.#M[J];let H=this.#_.now()-this.#O[J];Y.start=Math.floor(Date.now()-H)}this.#I&&(Y.size=this.#I[J]),q.unshift([X,Y])}return q}load(q){this.clear();for(let[J,X]of q){if(X.start){let Q=Date.now()-X.start;X.start=this.#_.now()-Q}this.#P(J,X.value,X)}}set(q,J,X={}){let{status:Q=U0.hasSubscribers?{}:void 0}=X;X.status=Q,Q&&(Q.op="set",Q.key=q,J!==void 0&&(Q.value=J),Q.cache=this);let $=this.#P(q,J,X);return Q&&U0.hasSubscribers&&U0.publish(Q),$}#P(q,J,X,Q){let{ttl:$=this.ttl,start:Y,noDisposeOnSet:H=this.noDisposeOnSet,sizeCalculation:K=this.sizeCalculation,status:U}=X,W=this.#Q(J);if(J===void 0)return U&&(U.set="deleted"),this.delete(q),this;let{noUpdateTTL:V=this.noUpdateTTL}=X;U&&!W&&(U.value=J);let L=this.#d(q,J,X.size||0,K,U);if(this.maxEntrySize&&L>this.maxEntrySize)return this.#x(q,"set"),U&&(U.set="miss",U.maxEntrySizeExceeded=!0),this;let z=this.#H===0?void 0:this.#K.get(q);if(z===void 0)z=this.#H===0?this.#U:this.#j.length!==0?this.#j.pop():this.#H===this.#J?this.#g(!1):this.#H,this.#$[z]=q,this.#Z[z]=J,this.#K.set(q,z),this.#L[this.#U]=z,this.#R[z]=this.#U,this.#U=z,this.#H++,this.#f(z,L,U),U&&(U.set="add"),V=!1,this.#v&&!W&&this.#Y?.(J,q,"add");else{this.#b(z);let _=this.#Z[z];if(J!==_){if(!H)if(this.#Q(_)){_!==Q&&_.__abortController.abort(Error("replaced"));let{__staleWhileFetching:R}=_;R!==void 0&&R!==J&&(this.#w&&this.#q?.(R,q,"set"),this.#z&&this.#W?.push([R,q,"set"]))}else this.#w&&this.#q?.(_,q,"set"),this.#z&&this.#W?.push([_,q,"set"]);if(this.#y(z),this.#f(z,L,U),this.#Z[z]=J,!W){let R=_&&this.#Q(_)?_.__staleWhileFetching:_,M=R===void 0?"add":J!==R?"replace":"update";U&&(U.set=M,R!==void 0&&(U.oldValue=R)),this.#v&&this.onInsert?.(J,q,M)}}else W||(U&&(U.set="update"),this.#v&&this.onInsert?.(J,q,"update"))}if($!==0&&!this.#M&&this.#u(),this.#M&&(V||this.#p(z,$,Y),U&&this.#E(U,z)),!H&&this.#z&&this.#W){let _=this.#W,R;for(;R=_?.shift();)this.#G?.(...R)}return this}pop(){try{for(;this.#H;){let q=this.#Z[this.#B];if(this.#g(!0),this.#Q(q)){if(q.__staleWhileFetching)return q.__staleWhileFetching}else if(q!==void 0)return q}}finally{if(this.#z&&this.#W){let q=this.#W,J;for(;J=q?.shift();)this.#G?.(...J)}}}#g(q){let J=this.#B,X=this.#$[J],Q=this.#Z[J],$=this.#Q(Q);$&&Q.__abortController.abort(Error("evicted"));let Y=$?Q.__staleWhileFetching:Q;return(this.#w||this.#z)&&Y!==void 0&&(this.#w&&this.#q?.(Y,X,"evict"),this.#z&&this.#W?.push([Y,X,"evict"])),this.#y(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(X),this.#H--,J}has(q,J={}){let{status:X=U0.hasSubscribers?{}:void 0}=J;J.status=X,X&&(X.op="has",X.key=q,X.cache=this);let Q=this.#o(q,J);return U0.hasSubscribers&&U0.publish(X),Q}#o(q,J={}){let{updateAgeOnHas:X=this.updateAgeOnHas,status:Q}=J,$=this.#K.get(q);if($!==void 0){let Y=this.#Z[$];if(this.#Q(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D($))Q&&(Q.has="stale",this.#E(Q,$));else return X&&this.#C($),Q&&(Q.has="hit",this.#E(Q,$)),!0}else Q&&(Q.has="miss");return!1}peek(q,J={}){let{status:X=q3()?{}:void 0}=J;X&&(X.op="peek",X.key=q,X.cache=this),J.status=X;let Q=this.#s(q,J);return U0.hasSubscribers&&U0.publish(X),Q}#s(q,J){let{status:X,allowStale:Q=this.allowStale}=J,$=this.#K.get(q);if($===void 0||!Q&&this.#D($)){X&&(X.peek=$===void 0?"miss":"stale");return}let Y=this.#Z[$],H=this.#Q(Y)?Y.__staleWhileFetching:Y;return X&&(H!==void 0?(X.peek="hit",X.value=H):X.peek="miss"),H}#m(q,J,X,Q){let $=J===void 0?void 0:this.#Z[J];if(this.#Q($))return $;let Y=new AbortController,{signal:H}=X;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let K={signal:Y.signal,options:X,context:Q},U=(R,M=!1)=>{let{aborted:F}=Y.signal,k=X.ignoreFetchAbort&&R!==void 0,D=X.ignoreFetchAbort||!!(X.allowStaleOnFetchAbort&&R!==void 0);if(X.status&&(F&&!M?(X.status.fetchAborted=!0,X.status.fetchError=Y.signal.reason,k&&(X.status.fetchAbortIgnored=!0)):X.status.fetchResolved=!0),F&&!k&&!M)return V(Y.signal.reason,D);let O=z,T=this.#Z[J];return(T===z||T===void 0&&k&&M)&&(R===void 0?O.__staleWhileFetching!==void 0?this.#Z[J]=O.__staleWhileFetching:this.#x(q,"fetch"):(X.status&&(X.status.fetchUpdated=!0),this.#P(q,R,K.options,O))),R},W=(R)=>(X.status&&(X.status.fetchRejected=!0,X.status.fetchError=R),V(R,!1)),V=(R,M)=>{let{aborted:F}=Y.signal,k=F&&X.allowStaleOnFetchAbort,D=k||X.allowStaleOnFetchRejection,O=D||X.noDeleteOnFetchRejection,T=z;if(this.#Z[J]===z&&(!O||!M&&T.__staleWhileFetching===void 0?this.#x(q,"fetch"):k||(this.#Z[J]=T.__staleWhileFetching)),D)return X.status&&T.__staleWhileFetching!==void 0&&(X.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw R},L=(R,M)=>{let F=this.#V?.(q,$,K);Y.signal.addEventListener("abort",()=>{(!X.ignoreFetchAbort||X.allowStaleOnFetchAbort)&&(R(void 0),X.allowStaleOnFetchAbort&&(R=(k)=>U(k,!0)))}),F&&F instanceof Promise?F.then((k)=>R(k===void 0?void 0:k),M):F!==void 0&&R(F)};X.status&&(X.status.fetchDispatched=!0);let z=new Promise(L).then(U,W),_=Object.assign(z,{__abortController:Y,__staleWhileFetching:$,__returned:void 0});return J===void 0?(this.#P(q,_,{...K.options,status:void 0}),J=this.#K.get(q)):this.#Z[J]=_,_}#Q(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 X=F6.hasSubscribers,{status:Q=q3()?{}:void 0}=J;J.status=Q,Q&&J.context&&(Q.context=J.context);let $=this.#l(q,J);return Q&&X&&(Q.trace=!0,F6.tracePromise(()=>$,Q).catch(()=>{})),$}async#l(q,J={}){let{allowStale:X=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:K=0,sizeCalculation:U=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:z=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:R,forceRefresh:M=!1,status:F,signal:k}=J;if(F&&(F.op="fetch",F.key=q,M&&(F.forceRefresh=!0),F.cache=this),!this.#h)return F&&(F.fetch="get"),this.#S(q,{allowStale:X,updateAgeOnGet:Q,noDeleteOnStaleGet:$,status:F});let D={allowStale:X,updateAgeOnGet:Q,noDeleteOnStaleGet:$,ttl:Y,noDisposeOnSet:H,size:K,sizeCalculation:U,noUpdateTTL:W,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:_,ignoreFetchAbort:z,status:F,signal:k},O=this.#K.get(q);if(O===void 0){F&&(F.fetch="miss");let T=this.#m(q,O,D,R);return T.__returned=T}else{let T=this.#Z[O];if(this.#Q(T)){let w=X&&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(!M&&!j)return F&&(F.fetch="hit"),this.#b(O),Q&&this.#C(O),F&&this.#E(F,O),T;let A=this.#m(q,O,D,R),b=A.__staleWhileFetching!==void 0&&X;return F&&(F.fetch=j?"stale":"refresh",b&&j&&(F.returnedStale=!0)),b?A.__staleWhileFetching:A.__returned=A}}forceFetch(q,J={}){let X=F6.hasSubscribers,{status:Q=q3()?{}:void 0}=J;J.status=Q,Q&&J.context&&(Q.context=J.context);let $=this.#r(q,J);return Q&&X&&(Q.trace=!0,F6.tracePromise(()=>$,Q).catch(()=>{})),$}async#r(q,J={}){let X=await this.#l(q,J);if(X===void 0)throw Error("fetch() returned undefined");return X}memo(q,J={}){let{status:X=U0.hasSubscribers?{}:void 0}=J;J.status=X,X&&(X.op="memo",X.key=q,J.context&&(X.context=J.context),X.cache=this);let Q=this.#t(q,J);return X&&(X.value=Q),U0.hasSubscribers&&U0.publish(X),Q}#t(q,J={}){let X=this.#A;if(!X)throw Error("no memoMethod provided to constructor");let{context:Q,status:$,forceRefresh:Y,...H}=J;$&&Y&&($.forceRefresh=!0);let K=this.#S(q,H),U=Y||K===void 0;if($&&($.memo=U?"miss":"hit",U||($.value=K)),!U)return K;let W=X(q,K,{options:H,context:Q});return $&&($.value=W),this.#P(q,W,H),W}get(q,J={}){let{status:X=U0.hasSubscribers?{}:void 0}=J;J.status=X,X&&(X.op="get",X.key=q,X.cache=this);let Q=this.#S(q,J);return X&&(Q!==void 0&&(X.value=Q),U0.hasSubscribers&&U0.publish(X)),Q}#S(q,J={}){let{allowStale:X=this.allowStale,updateAgeOnGet:Q=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],U=this.#Q(K);return Y&&this.#E(Y,H),this.#D(H)?U?(Y&&(Y.get="stale-fetching"),X&&K.__staleWhileFetching!==void 0?(Y&&(Y.returnedStale=!0),K.__staleWhileFetching):void 0):($||this.#x(q,"expire"),Y&&(Y.get="stale"),X?(Y&&(Y.returnedStale=!0),K):void 0):(Y&&(Y.get=U?"fetching":"hit"),this.#b(H),Q&&this.#C(H),U?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.#x(q,"delete")}#x(q,J){U0.hasSubscribers&&U0.publish({op:"delete",delete:J,key:q,cache:this});let X=!1;if(this.#H!==0){let Q=this.#K.get(q);if(Q!==void 0)if(this.#F?.[Q]&&(clearTimeout(this.#F[Q]),this.#F[Q]=void 0),X=!0,this.#H===1)this.#i(J);else{this.#y(Q);let $=this.#Z[Q];if(this.#Q($)?$.__abortController.abort(Error("deleted")):(this.#w||this.#z)&&(this.#w&&this.#q?.($,q,J),this.#z&&this.#W?.push([$,q,J])),this.#K.delete(q),this.#$[Q]=void 0,this.#Z[Q]=void 0,Q===this.#U)this.#U=this.#R[Q];else if(Q===this.#B)this.#B=this.#L[Q];else{let Y=this.#R[Q];this.#L[Y]=this.#L[Q];let H=this.#L[Q];this.#R[H]=this.#R[Q]}this.#H--,this.#j.push(Q)}}if(this.#z&&this.#W?.length){let Q=this.#W,$;for(;$=Q?.shift();)this.#G?.(...$)}return X}clear(){return this.#i("delete")}#i(q){for(let J of this.#N({allowStale:!0})){let X=this.#Z[J];if(this.#Q(X))X.__abortController.abort(Error("deleted"));else{let Q=this.#$[J];this.#w&&this.#q?.(X,Q,q),this.#z&&this.#W?.push([X,Q,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.#z&&this.#W){let J=this.#W,X;for(;X=J?.shift();)this.#G?.(...X)}}}});function gv(Z,q=300000){let J=new Map,X=new Map,Q=async(...$)=>{let Y=m($),H=J.get(Y),K=Date.now();if(!H){let U=X.get(Y);if(U)return U;let W=Z(...$);X.set(Y,W);try{let V=await W;if(X.get(Y)===W)J.set(Y,{value:V,timestamp:K,refreshing:!1});return V}finally{if(X.get(Y)===W)X.delete(Y)}}if(H&&K-H.timestamp>q&&!H.refreshing){H.refreshing=!0;let U=H;return Z(...$).then((W)=>{if(J.get(Y)===U)J.set(Y,{value:W,timestamp:Date.now(),refreshing:!1})}).catch((W)=>{if(S(W),J.get(Y)===U)J.delete(Y)}),H.value}return J.get(Y).value};return Q.cache={clear:()=>{J.clear(),X.clear()}},Q}function M1(Z,q,J=100){let X=new mQ({max:J}),Q=(...$)=>{let Y=q(...$),H=X.get(Y);if(H!==void 0)return H;let K=Z(...$);return X.set(Y,K),K};return Q.cache={clear:()=>X.clear(),size:()=>X.size,delete:($)=>X.delete($),get:($)=>X.peek($),has:($)=>X.has($)},Q}var c4=B(()=>{uQ();k0();R0()});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 q1=()=>{};import{fileURLToPath as o_}from"node:url";var M2=(Z,q)=>{let J=X3(s_(Z));if(typeof J!=="string")throw TypeError(`${q} must be a string or a file URL: ${J}.`);return J},s_=(Z)=>J3(Z)?Z.toString():Z,J3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,X3=(Z)=>Z instanceof URL?o_(Z):Z;var F2=()=>{};var l4=(Z,q=[],J={})=>{let X=M2(Z,"First argument"),[Q,$]=e(q)?[[],q]:[q,J];if(!Array.isArray(Q))throw TypeError(`Second argument must be either an array of arguments or an options object: ${Q}`);if(Q.some((K)=>typeof K==="object"&&K!==null))throw TypeError(`Second argument must be an array of strings: ${Q}`);let Y=Q.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[X,Y,{__proto__:null,...$}]};var Q3=B(()=>{q1();F2()});import{StringDecoder as r_}from"node:string_decoder";var pQ,dQ=(Z)=>pQ.call(Z)==="[object ArrayBuffer]",J0=(Z)=>pQ.call(Z)==="[object Uint8Array]",J1=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),t_,cQ=(Z)=>t_.encode(Z),e_,n4=(Z)=>e_.decode(Z),lQ=(Z,q)=>{return ZR(Z,q).join("")},ZR=(Z,q)=>{if(q==="utf8"&&Z.every(($)=>typeof $==="string"))return Z;let J=new r_(q),X=Z.map(($)=>typeof $==="string"?cQ($):$).map(($)=>J.write($)),Q=J.end();return Q===""?X:[...X,Q]},D6=(Z)=>{if(Z.length===1&&J0(Z[0]))return Z[0];return $3(qR(Z))},qR=(Z)=>Z.map((q)=>typeof q==="string"?cQ(q):q),$3=(Z)=>{let q=new Uint8Array(JR(Z)),J=0;for(let X of Z)q.set(X,J),J+=X.length;return q},JR=(Z)=>{let q=0;for(let J of Z)q+=J.length;return q};var T0=B(()=>{({toString:pQ}=Object.prototype),t_=new TextEncoder,e_=new TextDecoder});import{ChildProcess as XR}from"node:child_process";var oQ=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),sQ=(Z,q)=>{let J=[];for(let[$,Y]of Z.entries())J=QR({templates:Z,expressions:q,tokens:J,index:$,template:Y});if(J.length===0)throw TypeError("Template script must not be empty");let[X,...Q]=J;return[X,Q,{}]},QR=({templates:Z,expressions:q,tokens:J,index:X,template:Q})=>{if(Q===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[X]}`);let{nextTokens:$,leadingWhitespaces:Y,trailingWhitespaces:H}=$R(Q,Z.raw[X]),K=iQ(J,$,Y);if(X===q.length)return K;let U=q[X],W=Array.isArray(U)?U.map((V)=>aQ(V)):[aQ(U)];return iQ(K,W,H)},$R=(Z,q)=>{if(q.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let J=[],X=0,Q=nQ.has(q[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let K=q[H];if(nQ.has(K)){if(X!==Y)J.push(Z.slice(X,Y));X=Y+1}else if(K==="\\"){let U=q[H+1];if(U===`
6
- `)Y-=1,H+=1;else if(U==="u"&&q[H+2]==="{")H=q.indexOf("}",H+3);else H+=YR[U]??1}}let $=X===Z.length;if(!$)J.push(Z.slice(X));return{nextTokens:J,leadingWhitespaces:Q,trailingWhitespaces:$}},nQ,YR,iQ=(Z,q,J)=>J||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q[0]}`,...q.slice(1)],aQ=(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 HR(Z);if(Z instanceof XR||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`)},HR=({stdout:Z})=>{if(typeof Z==="string")return Z;if(J0(Z))return n4(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 rQ=B(()=>{q1();T0();nQ=new Set([" ","\t","\r",`
7
- `]),YR={x:3,u:5}});import Y3 from"node:process";var b0=(Z)=>i4.includes(Z),i4,N0,a4=(Z)=>N0[Z]??`stdio[${Z}]`;var X1=B(()=>{i4=[Y3.stdin,Y3.stdout,Y3.stderr],N0=["stdin","stdout","stderr"]});import{debuglog as GR}from"node:util";var eQ=(Z)=>{let q={...Z};for(let J of K3)q[J]=H3(Z,J);return q},H3=(Z,q)=>{let J=KR(Z),X=Array.from({length:J+1}),Q=UR(Z[q],X,q,J);return zR(Q,q)},KR=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,N0.length):N0.length,UR=(Z,q,J,X)=>e(Z)?WR(Z,q,J,X):q.fill(Z),WR=(Z,q,J,X)=>{for(let Q of Object.keys(Z).sort(VR))for(let $ of BR(Q,J,X))q[$]=Z[Q];return q},VR=(Z,q)=>tQ(Z)<tQ(q)?1:-1,tQ=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},BR=(Z,q,J)=>{if(Z==="ipc")return[J];let X=G3(Z);if(X===void 0||X===0)throw TypeError(`"${q}.${Z}" is invalid.
8
- It must be "${q}.stdout", "${q}.stderr", "${q}.all", "${q}.ipc", or "${q}.fd3", "${q}.fd4" (and so on).`);if(X!=="all"&&X>=J)throw TypeError(`"${q}.${Z}" is invalid: that file descriptor does not exist.
9
- Please set the "stdio" option to ensure that file descriptor exists.`);return X==="all"?[1,2]:[X]},G3=(Z)=>{if(Z==="all")return Z;if(N0.includes(Z))return N0.indexOf(Z);let q=LR.exec(Z);if(q!==null)return Number(q.groups.fdNumber)},LR,zR=(Z,q)=>Z.map((J)=>J===void 0?RR[q]:J),_R,RR,K3,Q1=(Z,q)=>q==="ipc"?Z.at(-1):Z[q];var $1=B(()=>{q1();X1();LR=/^fd(?<fdNumber>\d+)$/,_R=GR("execa").enabled?"full":"none",RR={lines:!1,buffer:!0,maxBuffer:1e8,verbose:_R,stripFinalNewline:!0},K3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var D2=({verbose:Z},q)=>U3(Z,q)!=="none",A2=({verbose:Z},q)=>!["none","short"].includes(U3(Z,q)),Z$=({verbose:Z},q)=>{let J=U3(Z,q);return o4(J)?J:void 0},U3=(Z,q)=>q===void 0?MR(Z):Q1(Z,q),MR=(Z)=>Z.find((q)=>o4(q))??s4.findLast((q)=>Z.includes(q)),o4=(Z)=>typeof Z==="function",s4;var F1=B(()=>{$1();s4=["none","short","full"]});import{platform as FR}from"node:process";import{stripVTControlCharacters as DR}from"node:util";var q$=(Z,q)=>{let J=[Z,...q],X=J.join(" "),Q=J.map(($)=>wR(J$($))).join(" ");return{command:X,escapedCommand:Q}},A6=(Z)=>DR(Z).split(`
10
- `).map((q)=>J$(q)).join(`
11
- `),J$=(Z)=>Z.replaceAll(jR,(q)=>AR(q)),AR=(Z)=>{let q=IR[Z];if(q!==void 0)return q;let J=Z.codePointAt(0),X=J.toString(16);return J<=OR?`\\u${X.padStart(4,"0")}`:`\\U${X}`},TR=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},jR,IR,OR=65535,wR=(Z)=>{if(kR.test(Z))return Z;return FR==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},kR;var r4=B(()=>{jR=TR(),IR={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},kR=/^[\w\-./]+$/});import X$ from"node:process";function W3(){let{env:Z}=X$,{TERM:q,TERM_PROGRAM:J}=Z;if(X$.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 Q$=()=>{};var $$,Y$,NR,xR,ER,PR,vR,t4,BC;var H$=B(()=>{Q$();$$={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:"╱"},Y$={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:"⅒"},NR={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"},xR={...$$,...Y$},ER={...$$,...NR},PR=W3(),vR=PR?xR:ER,t4=vR,BC=Object.entries(Y$)});import CR from"node:tty";var yR,y=(Z,q)=>{if(!yR)return(Q)=>Q;let J=`\x1B[${Z}m`,X=`\x1B[${q}m`;return(Q)=>{let $=Q+"",Y=$.indexOf(X);if(Y===-1)return J+$+X;let H=J,K=0,W=(q===22?X:"")+J;while(Y!==-1)H+=$.slice(K,Y)+W,K=Y+X.length,Y=$.indexOf(X,K);return H+=$.slice(K)+X,H}},_C,G$,RC,MC,FC,DC,AC,TC,jC,IC,OC,wC,kC,NC,xC,EC,PC,e4,vC,CC,yC,SC,bC,hC,fC,gC,mC,K$,uC,U$,pC,dC,cC,lC,nC,iC,aC,oC,sC,rC,tC;var W$=B(()=>{yR=CR?.WriteStream?.prototype?.hasColors?.()??!1,_C=y(0,0),G$=y(1,22),RC=y(2,22),MC=y(3,23),FC=y(4,24),DC=y(53,55),AC=y(7,27),TC=y(8,28),jC=y(9,29),IC=y(30,39),OC=y(31,39),wC=y(32,39),kC=y(33,39),NC=y(34,39),xC=y(35,39),EC=y(36,39),PC=y(37,39),e4=y(90,39),vC=y(40,49),CC=y(41,49),yC=y(42,49),SC=y(43,49),bC=y(44,49),hC=y(45,49),fC=y(46,49),gC=y(47,49),mC=y(100,49),K$=y(91,39),uC=y(92,39),U$=y(93,39),pC=y(94,39),dC=y(95,39),cC=y(96,39),lC=y(97,39),nC=y(101,49),iC=y(102,49),aC=y(103,49),oC=y(104,49),sC=y(105,49),rC=y(106,49),tC=y(107,49)});var V$=B(()=>{W$()});var z$=({type:Z,message:q,timestamp:J,piped:X,commandId:Q,result:{failed:$=!1}={},options:{reject:Y=!0}})=>{let H=SR(J),K=bR[Z]({failed:$,reject:Y,piped:X}),U=hR[Z]({reject:Y});return`${e4(`[${H}]`)} ${e4(`[${Q}]`)} ${U(K)} ${U(q)}`},SR=(Z)=>`${Z8(Z.getHours(),2)}:${Z8(Z.getMinutes(),2)}:${Z8(Z.getSeconds(),2)}.${Z8(Z.getMilliseconds(),3)}`,Z8=(Z,q)=>String(Z).padStart(q,"0"),B$=({failed:Z,reject:q})=>{if(!Z)return t4.tick;return q?t4.cross:t4.warning},bR,L$=(Z)=>Z,hR;var _$=B(()=>{H$();V$();bR={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:B$,duration:B$},hR={command:()=>G$,output:()=>L$,ipc:()=>L$,error:({reject:Z})=>Z?K$:U$,duration:()=>e4}});var R$=(Z,q,J)=>{let X=Z$(q,J);return Z.map(({verboseLine:Q,verboseObject:$})=>fR(Q,$,X)).filter((Q)=>Q!==void 0).map((Q)=>gR(Q)).join("")},fR=(Z,q,J)=>{if(J===void 0)return Z;let X=J(Z,q);if(typeof X==="string")return X},gR=(Z)=>Z.endsWith(`
12
- `)?Z:`${Z}
13
- `;var M$=B(()=>{F1()});import{inspect as mR}from"node:util";var c0=({type:Z,verboseMessage:q,fdNumber:J,verboseInfo:X,result:Q})=>{let $=uR({type:Z,result:Q,verboseInfo:X}),Y=pR(q,$),H=R$(Y,X,J);if(H!=="")console.warn(H.slice(0,-1))},uR=({type:Z,result:q,verboseInfo:J})=>{let{escapedCommand:X,commandId:Q,rawOptions:$}=J,{piped:Y=!1,...H}=$;return{type:Z,escapedCommand:X,commandId:`${Q}`,timestamp:new Date,piped:Y,result:q,options:H}},pR=(Z,q)=>Z.split(`
14
- `).map((J)=>dR({...q,message:J})),dR=(Z)=>{return{verboseLine:z$(Z),verboseObject:Z}},q8=(Z)=>{let q=typeof Z==="string"?Z:mR(Z);return A6(q).replaceAll("\t",()=>" ".repeat(cR))},cR=2;var T2=B(()=>{r4();_$();M$()});var F$=(Z,q)=>{if(!D2(q))return;c0({type:"command",verboseMessage:Z,verboseInfo:q})};var D$=B(()=>{F1();T2()});var A$=(Z,q,J)=>{iR(Z);let X=lR(Z);return{verbose:Z,escapedCommand:q,commandId:X,rawOptions:J}},lR=(Z)=>D2({verbose:Z})?nR++:void 0,nR=0n,iR=(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(!s4.includes(q)&&!o4(q)){let J=s4.map((X)=>`'${X}'`).join(", ");throw TypeError(`The "verbose" option must not be ${q}. Allowed values are: ${J} or a function.`)}}};var T$=B(()=>{F1()});import{hrtime as j$}from"node:process";var J8=()=>j$.bigint(),V3=(Z)=>Number(j$.bigint()-Z)/1e6;var X8=()=>{};var Q8=(Z,q,J)=>{let X=J8(),{command:Q,escapedCommand:$}=q$(Z,q),Y=H3(J,"verbose"),H=A$(Y,$,{...J});return F$($,H),{command:Q,escapedCommand:$,startTime:X,verboseInfo:H}};var B3=B(()=>{D$();T$();X8();r4();$1()});function $8(Z={}){let{env:q=process.env,platform:J=process.platform}=Z;if(J!=="win32")return"PATH";return Object.keys(q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"}var I$=()=>{};var O$=()=>{};import{promisify as aR}from"node:util";import{execFile as oR,execFileSync as Ey}from"node:child_process";import w$ from"node:path";import{fileURLToPath as sR}from"node:url";function Y8(Z){return Z instanceof URL?sR(Z):Z}function k$(Z){return{*[Symbol.iterator](){let q=w$.resolve(Y8(Z)),J;while(J!==q)yield q,J=q,q=w$.resolve(q,"..")}}}var Cy;var N$=B(()=>{O$();Cy=aR(oR)});import H8 from"node:process";import y1 from"node:path";var rR=({cwd:Z=H8.cwd(),path:q=H8.env[$8()],preferLocal:J=!0,execPath:X=H8.execPath,addExecPath:Q=!0}={})=>{let $=y1.resolve(Y8(Z)),Y=[],H=q.split(y1.delimiter);if(J)tR(Y,H,$);if(Q)eR(Y,H,X,$);return q===""||q===y1.delimiter?`${Y.join(y1.delimiter)}${q}`:[...Y,q].join(y1.delimiter)},tR=(Z,q,J)=>{for(let X of k$(J)){let Q=y1.join(X,"node_modules/.bin");if(!q.includes(Q))Z.push(Q)}},eR=(Z,q,J,X)=>{let Q=y1.resolve(X,Y8(J),"..");if(!q.includes(Q))Z.push(Q)},x$=({env:Z=H8.env,...q}={})=>{Z={...Z};let J=$8({env:Z});return q.path=Z[J],Z[J]=rR(q),Z};var E$=B(()=>{I$();N$()});var P$=(Z,q,J)=>{let X=J?K8:G8,Q=Z instanceof l0?{}:{cause:Z};return new X(q,Q)},l0,v$=(Z,q)=>{Object.defineProperties(Z.prototype,{name:{value:q,writable:!0,enumerable:!1,configurable:!0},[y$]:{value:!0,writable:!1,enumerable:!1,configurable:!1}})},C$=(Z)=>U8(Z)&&(y$ in Z),y$,U8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",G8,K8;var S1=B(()=>{l0=class l0 extends Error{};y$=Symbol("isExecaError");G8=class G8 extends Error{};v$(G8,G8.name);K8=class K8 extends Error{};v$(K8,K8.name)});var S$=()=>{let Z=L3-b$+1;return Array.from({length:Z},ZM)},ZM=(Z,q)=>({name:`SIGRT${q+1}`,number:b$+q,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),b$=34,L3=64;var z3=()=>{};var h$;var f$=B(()=>{h$=[{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 qM}from"node:os";var _3=()=>{let Z=S$();return[...h$,...Z].map(JM)},JM=({name:Z,number:q,description:J,action:X,forced:Q=!1,standard:$})=>{let{signals:{[Z]:Y}}=qM,H=Y!==void 0;return{name:Z,number:H?Y:q,description:J,supported:H,action:X,forced:Q,standard:$}};var g$=B(()=>{f$();z3()});import{constants as XM}from"node:os";var QM=()=>{let Z=_3();return Object.fromEntries(Z.map($M))},$M=({name:Z,number:q,description:J,supported:X,action:Q,forced:$,standard:Y})=>[Z,{name:Z,number:q,description:J,supported:X,action:Q,forced:$,standard:Y}],m$,YM=()=>{let Z=_3(),q=L3+1,J=Array.from({length:q},(X,Q)=>HM(Q,Z));return Object.assign({},...J)},HM=(Z,q)=>{let J=GM(Z,q);if(J===void 0)return{};let{name:X,description:Q,supported:$,action:Y,forced:H,standard:K}=J;return{[Z]:{name:X,number:Z,description:Q,supported:$,action:Y,forced:H,standard:K}}},GM=(Z,q)=>{let J=q.find(({name:X})=>XM.signals[X]===Z);if(J!==void 0)return J;return q.find((X)=>X.number===Z)},ry;var u$=B(()=>{z3();g$();m$=QM(),ry=YM()});import{constants as T6}from"node:os";var d$=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return l$(Z,"option `killSignal`")},c$=(Z)=>Z===0?Z:l$(Z,"`subprocess.kill()`'s argument"),l$=(Z,q)=>{if(Number.isInteger(Z))return KM(Z,q);if(typeof Z==="string")return WM(Z,q);throw TypeError(`Invalid ${q} ${String(Z)}: it must be a string or an integer.
15
- ${R3()}`)},KM=(Z,q)=>{if(p$.has(Z))return p$.get(Z);throw TypeError(`Invalid ${q} ${Z}: this signal integer does not exist.
16
- ${R3()}`)},UM=()=>new Map(Object.entries(T6.signals).reverse().map(([Z,q])=>[q,Z])),p$,WM=(Z,q)=>{if(Z in T6.signals)return Z;if(Z.toUpperCase()in T6.signals)throw TypeError(`Invalid ${q} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${q} '${Z}': this signal name does not exist.
17
- ${R3()}`)},R3=()=>`Available signal names: ${VM()}.
18
- Available signal numbers: ${BM()}.`,VM=()=>Object.keys(T6.signals).sort().map((Z)=>`'${Z}'`).join(", "),BM=()=>[...new Set(Object.values(T6.signals).sort((Z,q)=>Z-q))].join(", "),W8=(Z)=>m$[Z].description;var j6=B(()=>{u$();p$=UM()});import{setTimeout as LM}from"node:timers/promises";var n$=(Z)=>{if(Z===!1)return Z;if(Z===!0)return zM;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},zM=5000,i$=({kill:Z,options:{forceKillAfterDelay:q,killSignal:J},onInternalError:X,context:Q,controller:$},Y,H)=>{let{signal:K,error:U}=_M(Y,H,J);RM(U,X);let W=Z(K);return MM({kill:Z,signal:K,forceKillAfterDelay:q,killSignal:J,killResult:W,context:Q,controller:$}),W},_M=(Z,q,J)=>{let[X=J,Q]=U8(Z)?[void 0,Z]:[Z,q];if(typeof X!=="string"&&!Number.isInteger(X))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(X)}`);if(Q!==void 0&&!U8(Q))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${Q}`);return{signal:c$(X),error:Q}},RM=(Z,q)=>{if(Z!==void 0)q.reject(Z)},MM=async({kill:Z,signal:q,forceKillAfterDelay:J,killSignal:X,killResult:Q,context:$,controller:Y})=>{if(q===X&&Q)M3({kill:Z,forceKillAfterDelay:J,context:$,controllerSignal:Y.signal})},M3=async({kill:Z,forceKillAfterDelay:q,context:J,controllerSignal:X})=>{if(q===!1)return;try{if(await LM(q,void 0,{signal:X}),Z("SIGKILL"))J.isForcefullyTerminated??=!0}catch{}};var V8=B(()=>{S1();j6()});import{once as FM}from"node:events";var B8=async(Z,q)=>{if(!Z.aborted)await FM(Z,"abort",{signal:q})};var F3=()=>{};var a$=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},o$=({kill:Z,cancelSignal:q,gracefulCancel:J,context:X,controller:Q})=>q===void 0||J?[]:[DM(Z,q,X,Q)],DM=async(Z,q,J,{signal:X})=>{throw await B8(q,X),J.terminationReason??="cancel",Z(),q.reason};var D3=B(()=>{F3()});var j2=({methodName:Z,isSubprocess:q,ipc:J,isConnected:X})=>{AM(Z,q,J),A3(Z,q,X)},AM=(Z,q,J)=>{if(!J)throw Error(`${h0(Z,q)} can only be used if the \`ipc\` option is \`true\`.`)},A3=(Z,q,J)=>{if(!J)throw Error(`${h0(Z,q)} cannot be used: the ${D1(q)} has already exited or disconnected.`)},s$=(Z)=>{throw Error(`${h0("getOneMessage",Z)} could not complete: the ${D1(Z)} exited or disconnected.`)},r$=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${D1(Z)} is sending a message too, instead of listening to incoming messages.
19
- This can be fixed by both sending a message and listening to incoming messages at the same time:
20
-
21
- const [receivedMessage] = await Promise.all([
22
- ${h0("getOneMessage",Z)},
23
- ${h0("sendMessage",Z,"message, {strict: true}")},
24
- ]);`)},L8=(Z,q)=>Error(`${h0("sendMessage",q)} failed when sending an acknowledgment response to the ${D1(q)}.`,{cause:Z}),t$=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${D1(Z)} is not listening to incoming messages.`)},e$=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${D1(Z)} exited without listening to incoming messages.`)},Z9=()=>Error(`\`cancelSignal\` aborted: the ${D1(!0)} disconnected.`),q9=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},J9=({error:Z,methodName:q,isSubprocess:J})=>{if(Z.code==="EPIPE")throw Error(`${h0(q,J)} cannot be used: the ${D1(J)} is disconnecting.`,{cause:Z})},X9=({error:Z,methodName:q,isSubprocess:J,message:X})=>{if(TM(Z))throw Error(`${h0(q,J)}'s argument type is invalid: the message cannot be serialized: ${String(X)}.`,{cause:Z})},TM=({code:Z,message:q})=>jM.has(Z)||IM.some((J)=>q.includes(J)),jM,IM,h0=(Z,q,J="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${OM(q)}${Z}(${J})`,OM=(Z)=>Z?"":"subprocess.",D1=(Z)=>Z?"parent process":"subprocess",I2=(Z)=>{if(Z.connected)Z.disconnect()};var O2=B(()=>{jM=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),IM=["could not be cloned","circular structure","call stack size exceeded"]});var n0=()=>{let Z={},q=new Promise((J,X)=>{Object.assign(Z,{resolve:J,reject:X})});return Object.assign(q,Z)};var w2=()=>{};import{addAbortListener as wM}from"node:events";var b1=(Z,q,J)=>{let X=Z.getMaxListeners();if(X===0||X===1/0)return;Z.setMaxListeners(X+q),wM(J,()=>{Z.setMaxListeners(Z.getMaxListeners()-q)})};var z8=()=>{};var _8=(Z,q)=>{if(q)T3(Z)},T3=(Z)=>{Z.refCounted()},R8=(Z,q)=>{if(q)j3(Z)},j3=(Z)=>{Z.unrefCounted()},Q9=(Z,q)=>{if(!q)return;j3(Z),j3(Z)},$9=(Z,q)=>{if(!q)return;T3(Z),T3(Z)};var I6=()=>{};import{once as kM}from"node:events";import{scheduler as NM}from"node:timers/promises";var Y9=async({anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:X},Q)=>{if(U9(Q)||V9(Q))return;if(!M8.has(Z))M8.set(Z,[]);let $=M8.get(Z);if($.push(Q),$.length>1)return;while($.length>0){await W9(Z,X,Q),await NM.yield();let Y=await K9({wrappedMessage:$[0],anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:X});$.shift(),X.emit("message",Y),X.emit("message:done")}},H9=async({anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:X,boundOnMessage:Q})=>{I3();let $=M8.get(Z);while($?.length>0)await kM(X,"message:done");Z.removeListener("message",Q),$9(q,J),X.connected=!1,X.emit("disconnect")},M8;var G9=B(()=>{O6();I6();F8();D8();M8=new WeakMap});import{EventEmitter as xM}from"node:events";var A1=(Z,q,J)=>{if(A8.has(Z))return A8.get(Z);let X=new xM;return X.connected=!0,A8.set(Z,X),EM({ipcEmitter:X,anyProcess:Z,channel:q,isSubprocess:J}),X},A8,EM=({ipcEmitter:Z,anyProcess:q,channel:J,isSubprocess:X})=>{let Q=Y9.bind(void 0,{anyProcess:q,channel:J,isSubprocess:X,ipcEmitter:Z});q.on("message",Q),q.once("disconnect",H9.bind(void 0,{anyProcess:q,channel:J,isSubprocess:X,ipcEmitter:Z,boundOnMessage:Q})),Q9(J,X)},T8=(Z)=>{let q=A8.get(Z);return q===void 0?Z.channel!==void 0&&Z.channel!==null:q.connected};var w6=B(()=>{G9();I6();A8=new WeakMap});import{once as PM}from"node:events";var B9=({anyProcess:Z,channel:q,isSubprocess:J,message:X,strict:Q})=>{if(!Q)return X;let $=A1(Z,q,J),Y=O8(Z,$);return{id:vM++,type:I8,message:X,hasListeners:Y}},vM=0n,L9=(Z,q)=>{if(q?.type!==I8||q.hasListeners)return;for(let{id:J}of Z)if(J!==void 0)j8[J].resolve({isDeadlock:!0,hasListeners:!1})},K9=async({wrappedMessage:Z,anyProcess:q,channel:J,isSubprocess:X,ipcEmitter:Q})=>{if(Z?.type!==I8||!q.connected)return Z;let{id:$,message:Y}=Z,H={id:$,type:_9,message:O8(q,Q)};try{await k2({anyProcess:q,channel:J,isSubprocess:X,ipc:!0},H)}catch(K){Q.emit("strict:error",K)}return Y},U9=(Z)=>{if(Z?.type!==_9)return!1;let{id:q,message:J}=Z;return j8[q]?.resolve({isDeadlock:!1,hasListeners:J}),!0},z9=async(Z,q,J)=>{if(Z?.type!==I8)return;let X=n0();j8[Z.id]=X;let Q=new AbortController;try{let{isDeadlock:$,hasListeners:Y}=await Promise.race([X,CM(q,J,Q)]);if($)r$(J);if(!Y)t$(J)}finally{Q.abort(),delete j8[Z.id]}},j8,CM=async(Z,q,{signal:J})=>{b1(Z,1,J),await PM(Z,"disconnect",{signal:J}),e$(q)},I8="execa:ipc:request",_9="execa:ipc:response";var F8=B(()=>{w2();z8();k6();O2();w6();O6();j8={}});var M9=(Z,q,J)=>{if(!N6.has(Z))N6.set(Z,new Set);let X=N6.get(Z),Q=n0(),$=J?q.id:void 0,Y={onMessageSent:Q,id:$};return X.add(Y),{outgoingMessages:X,outgoingMessage:Y}},F9=({outgoingMessages:Z,outgoingMessage:q})=>{Z.delete(q),q.onMessageSent.resolve()},W9=async(Z,q,J)=>{while(!O8(Z,q)&&N6.get(Z)?.size>0){let X=[...N6.get(Z)];L9(X,J),await Promise.all(X.map(({onMessageSent:Q})=>Q))}},N6,D9,A9=(Z,q)=>{D9.set(Z,q)},O8=(Z,q)=>q.listenerCount("message")>yM(Z),yM=(Z)=>R9(Z)!==void 0&&!Q1(R9(Z).buffer,"ipc")?1:0,R9=(Z)=>D9.get(Z);var O6=B(()=>{w2();$1();F8();N6=new WeakMap,D9=new WeakMap});import{promisify as SM}from"node:util";var k2=({anyProcess:Z,channel:q,isSubprocess:J,ipc:X},Q,{strict:$=!1}={})=>{return j2({methodName:"sendMessage",isSubprocess:J,ipc:X,isConnected:Z.connected}),bM({anyProcess:Z,channel:q,methodName:"sendMessage",isSubprocess:J,message:Q,strict:$})},bM=async({anyProcess:Z,channel:q,methodName:J,isSubprocess:X,message:Q,strict:$})=>{let Y=B9({anyProcess:Z,channel:q,isSubprocess:X,message:Q,strict:$}),H=M9(Z,Y,$);try{await w3({anyProcess:Z,methodName:J,isSubprocess:X,wrappedMessage:Y,message:Q})}catch(K){throw I2(Z),K}finally{F9(H)}},w3=async({anyProcess:Z,methodName:q,isSubprocess:J,wrappedMessage:X,message:Q})=>{let $=hM(Z);try{await Promise.all([z9(X,Z,J),$(X)])}catch(Y){throw J9({error:Y,methodName:q,isSubprocess:J}),X9({error:Y,methodName:q,isSubprocess:J,message:Q}),Y}},hM=(Z)=>{if(O3.has(Z))return O3.get(Z);let q=SM(Z.send.bind(Z));return O3.set(Z,q),q},O3;var k6=B(()=>{O2();O6();F8();O3=new WeakMap});import{scheduler as fM}from"node:timers/promises";var j9=(Z,q)=>{return A3("cancelSignal",!1,Z.connected),w3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:O9,message:q},message:q})},I9=async({anyProcess:Z,channel:q,isSubprocess:J,ipc:X})=>{return await gM({anyProcess:Z,channel:q,isSubprocess:J,ipc:X}),k3.signal},gM=async({anyProcess:Z,channel:q,isSubprocess:J,ipc:X})=>{if(T9)return;if(T9=!0,!X){q9();return}if(q===null){I3();return}A1(Z,q,J),await fM.yield()},T9=!1,V9=(Z)=>{if(Z?.type!==O9)return!1;return k3.abort(Z.message),!0},O9="execa:ipc:cancel",I3=()=>{k3.abort(Z9())},k3;var D8=B(()=>{k6();w6();O2();k3=new AbortController});var w9=({gracefulCancel:Z,cancelSignal:q,ipc:J,serialization:X})=>{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(X==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},k9=({subprocess:Z,kill:q,cancelSignal:J,gracefulCancel:X,forceKillAfterDelay:Q,context:$,controller:Y})=>X?[mM({subprocess:Z,kill:q,cancelSignal:J,forceKillAfterDelay:Q,context:$,controller:Y})]:[],mM=async({subprocess:Z,kill:q,cancelSignal:J,forceKillAfterDelay:X,context:Q,controller:{signal:$}})=>{await B8(J,$);let Y=uM(J);throw await j9(Z,Y),M3({kill:q,forceKillAfterDelay:X,context:Q,controllerSignal:$}),Q.terminationReason??="gracefulCancel",J.reason},uM=({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 N3=B(()=>{F3();D8();V8()});import{setTimeout as pM}from"node:timers/promises";var N9=({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})`)},x9=(Z,q,J,X)=>q===0||q===void 0?[]:[dM(Z,q,J,X)],dM=async(Z,q,J,{signal:X})=>{throw await pM(q,void 0,{signal:X}),J.terminationReason??="timeout",Z(),new l0};var x3=B(()=>{S1()});import{execPath as cM,execArgv as lM}from"node:process";import E9 from"node:path";var P9=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},v9=(Z,q,{node:J=!1,nodePath:X=cM,nodeOptions:Q=lM.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=M2(X,'The "nodePath" option'),U=E9.resolve($,K),W={__proto__:null,shell:!1,...H,nodePath:U,node:J,cwd:$};if(!J)return[Z,q,W];if(E9.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[U,[...Q,Z,...q],{__proto__:null,ipc:!0,...W,shell:!1}]};var E3=B(()=>{F2()});import{serialize as nM}from"node:v8";var C9=({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`.");oM[J](Z)},iM=(Z)=>{try{nM(Z)}catch(q){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:q})}},aM=(Z)=>{try{JSON.stringify(Z)}catch(q){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:q})}},oM,y9=async(Z,q,J)=>{if(q===void 0)return;await k2({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:J},q)};var P3=B(()=>{k6();oM={advanced:iM,json:aM}});var b9=({encoding:Z})=>{if(v3.has(Z))return;let q=rM(Z);if(q!==void 0)throw TypeError(`Invalid option \`encoding: ${w8(Z)}\`.
25
- Please rename it to ${w8(q)}.`);let J=[...v3].map((X)=>w8(X)).join(", ");throw TypeError(`Invalid option \`encoding: ${w8(Z)}\`.
26
- Please rename it to one of: ${J}.`)},sM,j0,v3,rM=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let q=Z.toLowerCase();if(q in S9)return S9[q];if(v3.has(q))return q},S9,w8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var h1=B(()=>{sM=new Set(["utf8","utf16le"]),j0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),v3=sM.union(j0),S9={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import C3 from"node:fs";import E6 from"node:path";import x6 from"node:process";function ZF(Z,q){if(typeof Z!=="string"||Z.length===0)throw TypeError("Expected a non-empty string.");let{cwd:J=x6.cwd(),path:X=x6.env.PATH??(f1?x6.env.Path:void 0)??"",pathExt:Q=x6.env.PATHEXT||eM}=q;return{cwd:J,searchPath:X,pathExt:Q}}function qF(Z,q){let J=q.split(E6.delimiter).filter(Boolean),X=E6.extname(Z).toLowerCase();if(X!==""&&J.some((Q)=>Q.toLowerCase()===X))return["",...J];return J}function*JF(Z,{cwd:q,searchPath:J,pathExt:X}){let Q=f1?qF(Z,X):[""];if(tM.test(Z)){let Y=E6.resolve(q,Z);for(let H of Q)yield Y+H;return}let $=[...f1?[q]:[],...J.split(E6.delimiter)];for(let Y of $){let H=f1&&Y.length>1&&Y.startsWith('"')&&Y.endsWith('"')?Y.slice(1,-1):Y;if(H==="")continue;let K=E6.resolve(q,H,Z);for(let U of Q)yield K+U}}function XF(Z){let q;try{q=C3.statSync(Z)}catch(J){return f1&&J.code==="EACCES"}if(!q.isFile())return!1;if(f1)return!0;try{return C3.accessSync(Z,C3.constants.X_OK),!0}catch{return!1}}function h9(Z,q={}){let J=ZF(Z,q);for(let X of JF(Z,J))if(XF(X))return X;return}var f1,tM,eM=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC";var f9=B(()=>{f1=x6.platform==="win32",tM=f1?/[\/\\]/v:/\//v});function y3(Z={}){let{env:q=process.env,platform:J=process.platform}=Z;if(J!=="win32")return"PATH";return Object.keys(q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"}var g9=()=>{};import{openSync as QF,readSync as $F,closeSync as YF}from"node:fs";import{Buffer as HF}from"node:buffer";import GF from"node:path";import b3 from"node:process";var p9=(Z,q,J)=>{let X={file:Z,commandArguments:[...q],options:J};if(J.shell||b3.platform!=="win32")return X;return WF(X)},KF,UF,WF=(Z)=>{let q=VF(Z);if(q!==void 0&&KF.test(q))return Z;for(let Y of[Z.file,...Z.commandArguments])RF(Y);let J=q!==void 0&&UF.test(q),X=S3(GF.normalize(Z.file)),Q=Z.commandArguments.map((Y)=>DF(Y,J)),$=`"${[X,...Q].join(" ")}"`;return Z.options.windowsVerbatimArguments=!0,{file:b3.env.comspec||"cmd.exe",commandArguments:["/d","/s","/c",$],options:Z.options}},VF=(Z)=>{let q=m9(Z),J=q!==void 0&&BF(q);if(!J)return q;return Z.commandArguments.unshift(q),Z.file=J,m9(Z)},m9=(Z)=>{let q=Z.options.env||b3.env;return h9(Z.file,{cwd:Z.options.cwd,path:q[y3({env:q})]})},u9=150,BF=(Z)=>{let q=HF.alloc(u9);try{let J=QF(Z,"r");try{$F(J,q,0,u9,0)}finally{YF(J)}}catch{return}return zF(q.toString())},LF,zF=(Z)=>{let q=Z.match(LF)?.groups.line.trim();if(!q)return;let[J,X]=q.split(" "),Q=J.split("/").at(-1);if(Q==="env")return X;return X?`${Q} ${X}`:Q},_F,RF=(Z)=>{if(_F.test(Z))throw TypeError(`The command and its arguments cannot contain a line break on Windows without a shell.
27
- This would allow a command injection with \`cmd.exe\`.
28
- Invalid value: ${JSON.stringify(`${Z}`)}`)},MF,S3=(Z)=>Z.replaceAll(MF,"^$&"),FF,DF=(Z,q)=>{let J=`${Z}`.replaceAll(FF,(Q,$,Y)=>{let H=Y[$+Q.length];return H==='"'||H===void 0?Q.repeat(2):Q}).replaceAll('"',"\\\""),X=S3(`"${J}"`);return q?S3(X):X};var d9=B(()=>{f9();g9();KF=/\.(?:com|exe)$/i,UF=/\.(?:bat|cmd)$/i,LF=/^#!(?<line>.*)/,_F=/[\n\r]/,MF=/[()\][%!^"`<>&|;, *?]/g,FF=/\\+/g});import{statSync as AF}from"node:fs";import TF from"node:path";import jF from"node:process";var c9=(Z=l9())=>{let q=M2(Z,'The "cwd" option');return TF.resolve(q)},l9=()=>{try{return jF.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
29
- ${Z.message}`,Z}},n9=(Z,q)=>{if(q===l9())return Z;let J;try{J=AF(q)}catch(X){return`The "cwd" option is invalid: ${q}.
30
- ${X.message}
31
- ${Z}`}if(!J.isDirectory())return`The "cwd" option is not a directory: ${q}.
32
- ${Z}`;return Z};var h3=B(()=>{F2()});import IF from"node:path";import i9 from"node:process";var k8=(Z,q,J)=>{let X={__proto__:null,...J};X.cwd=c9(X.cwd);let[Q,$,Y]=v9(Z,q,X),{file:H,commandArguments:K,options:U}=p9(Q,$,Y),W=eQ(U),V=OF(W);if(N9(V),b9(V),C9(V),a$(V),w9(V),V.shell=X3(V.shell),V.env=wF(V),V.killSignal=d$(V.killSignal),V.forceKillAfterDelay=n$(V.forceKillAfterDelay),V.lines=V.lines.map((L,z)=>L&&!j0.has(V.encoding)&&V.buffer[z]),i9.platform==="win32"&&IF.basename(H,".exe")==="cmd")K.unshift("/q");return{file:H,commandArguments:K,options:V}},OF=({extendEnv:Z=!0,preferLocal:q=!1,cwd:J,localDir:X=J,encoding:Q="utf8",reject:$=!0,cleanup:Y=!0,killDescendants:H=!1,all:K=!1,windowsHide:U=!0,killSignal:W="SIGTERM",forceKillAfterDelay:V=!0,gracefulCancel:L=!1,ipcInput:z,ipc:_=z!==void 0||L,serialization:R="advanced",...M})=>({__proto__:null,...M,extendEnv:Z,preferLocal:q,cwd:J,localDirectory:X,encoding:Q,reject:$,cleanup:Y,killDescendants:H,all:K,windowsHide:U,killSignal:W,forceKillAfterDelay:V,gracefulCancel:L,ipcInput:z,ipc:_,serialization:R}),wF=({env:Z,extendEnv:q,preferLocal:J,node:X,localDirectory:Q,nodePath:$})=>{let Y=q?{...i9.env,...Z}:Z;if(J||X)return x$({env:Y,cwd:Q,execPath:$,preferLocal:J,addExecPath:X});return Y};var f3=B(()=>{E$();V8();j6();D3();N3();x3();E3();P3();h1();d9();h3();F2();$1()});var N8=(Z,q,J)=>J.shell&&q.length>0?[[Z,...q].join(" "),[],J]:[Z,q,J];var g3=()=>{};function N2(Z){if(typeof Z==="string")return kF(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return NF(Z)}var kF=(Z)=>Z.at(-1)===a9?Z.slice(0,Z.at(-2)===o9?-2:-1):Z,NF=(Z)=>Z.at(-1)===xF?Z.subarray(0,Z.at(-2)===EF?-2:-1):Z,a9=`
33
- `,xF,o9="\r",EF;var m3=B(()=>{xF=a9.codePointAt(0),EF=o9.codePointAt(0)});function f0(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 u3(Z,{checkOpen:q=!0}={}){return f0(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 g1(Z,{checkOpen:q=!0}={}){return f0(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 p3(Z,q){return u3(Z,q)&&g1(Z,q)}var m1=()=>{};class s9{#J;#X;#q=!1;#Y=void 0;constructor(Z,q){this.#J=Z,this.#X=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.#X){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 r9(){return this[d3].next()}function t9(Z){return this[d3].return(Z)}function c3({preventCancel:Z=!1}={}){let q=this.getReader(),J=new s9(q,Z),X=Object.create(vF);return X[d3]=J,X}var PF,d3,vF;var e9=B(()=>{PF=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);d3=Symbol();Object.defineProperty(r9,"name",{value:"next"});Object.defineProperty(t9,"name",{value:"return"});vF=Object.create(PF,{next:{enumerable:!0,configurable:!0,writable:!0,value:r9},return:{enumerable:!0,configurable:!0,writable:!0,value:t9}})});var ZY=()=>{};var qY=B(()=>{e9();ZY()});var JY=(Z)=>{if(g1(Z,{checkOpen:!1})&&P6.on!==void 0)return yF(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(CF.call(Z)==="[object ReadableStream]")return c3.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},CF,yF=async function*(Z){let q=new AbortController,J={};SF(Z,q,J);try{for await(let[X]of P6.on(Z,"data",{signal:q.signal}))yield X}catch(X){if(J.error!==void 0)throw J.error;else if(!q.signal.aborted)throw X}finally{Z.destroy()}},SF=async(Z,q,J)=>{try{await P6.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(X){J.error=X}finally{q.abort()}},P6;var l3=B(()=>{m1();qY();({toString:CF}=Object.prototype),P6={}});var x2=async(Z,{init:q,convertChunk:J,getSize:X,truncateChunk:Q,addChunk:$,getFinalChunk:Y,finalize:H},{maxBuffer:K=Number.POSITIVE_INFINITY}={})=>{let U=JY(Z),W=q();W.length=0;try{for await(let V of U){let L=hF(V),z=J[L](V,W);$Y({convertedChunk:z,state:W,getSize:X,truncateChunk:Q,addChunk:$,maxBuffer:K})}return bF({state:W,convertChunk:J,getSize:X,truncateChunk:Q,addChunk:$,getFinalChunk:Y,maxBuffer:K}),H(W)}catch(V){let L=typeof V==="object"&&V!==null?V:Error(V);throw L.bufferedData=H(W),L}},bF=({state:Z,getSize:q,truncateChunk:J,addChunk:X,getFinalChunk:Q,maxBuffer:$})=>{let Y=Q(Z);if(Y!==void 0)$Y({convertedChunk:Y,state:Z,getSize:q,truncateChunk:J,addChunk:X,maxBuffer:$})},$Y=({convertedChunk:Z,state:q,getSize:J,truncateChunk:X,addChunk:Q,maxBuffer:$})=>{let Y=J(Z),H=q.length+Y;if(H<=$){XY(Z,q,Q,H);return}let K=X(Z,$-q.length);if(K!==void 0)XY(K,q,Q,$);throw new Y1},XY=(Z,q,J,X)=>{q.contents=J(Z,q,X),q.length=X},hF=(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=QY.call(Z);if(J==="[object ArrayBuffer]")return"arrayBuffer";if(J==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&QY.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},QY,Y1;var v6=B(()=>{l3();({toString:QY}=Object.prototype);Y1=class Y1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var H1=(Z)=>Z,C6=()=>{return},x8=({contents:Z})=>Z,E8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},P8=(Z)=>Z.length;var v8=()=>{};async function C8(Z,q){return x2(Z,uF,q)}var fF=()=>({contents:[]}),gF=()=>1,mF=(Z,{contents:q})=>{return q.push(Z),q},uF;var YY=B(()=>{v6();v8();uF={init:fF,convertChunk:{string:H1,buffer:H1,arrayBuffer:H1,dataView:H1,typedArray:H1,others:H1},getSize:gF,truncateChunk:C6,addChunk:mF,getFinalChunk:C6,finalize:x8}});async function y8(Z,q){return x2(Z,sF,q)}var pF=()=>({contents:new ArrayBuffer(0)}),dF=(Z)=>cF.encode(Z),cF,HY=(Z)=>new Uint8Array(Z),GY=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),lF=(Z,q)=>Z.slice(0,q),nF=(Z,{contents:q,length:J},X)=>{let Q=WY()?aF(q,X):iF(q,X);return new Uint8Array(Q).set(Z,J),Q},iF=(Z,q)=>{if(q<=Z.byteLength)return Z;let J=new ArrayBuffer(UY(q));return new Uint8Array(J).set(new Uint8Array(Z),0),J},aF=(Z,q)=>{if(q<=Z.maxByteLength)return Z.resize(q),Z;let J=new ArrayBuffer(q,{maxByteLength:UY(q)});return new Uint8Array(J).set(new Uint8Array(Z),0),J},UY=(Z)=>KY**Math.ceil(Math.log(Z)/Math.log(KY)),KY=2,oF=({contents:Z,length:q})=>WY()?Z:Z.slice(0,q),WY=()=>("resize"in ArrayBuffer.prototype),sF;var VY=B(()=>{v6();v8();cF=new TextEncoder,sF={init:pF,convertChunk:{string:dF,buffer:HY,arrayBuffer:HY,dataView:GY,typedArray:GY,others:E8},getSize:P8,truncateChunk:lF,addChunk:nF,getFinalChunk:C6,finalize:oF}});async function b8(Z,q){return x2(Z,qD,q)}var rF=()=>({contents:"",textDecoder:new TextDecoder}),S8=(Z,{textDecoder:q})=>q.decode(Z,{stream:!0}),tF=(Z,{contents:q})=>q+Z,eF=(Z,q)=>Z.slice(0,q),ZD=({textDecoder:Z})=>{let q=Z.decode();return q===""?void 0:q},qD;var BY=B(()=>{v6();v8();qD={init:rF,convertChunk:{string:H1,buffer:S8,arrayBuffer:S8,dataView:S8,typedArray:S8,others:E8},getSize:P8,truncateChunk:eF,addChunk:tF,getFinalChunk:ZD,finalize:x8}});var LY=B(()=>{YY();VY();BY();v6()});import{on as JD}from"node:events";import{finished as XD}from"node:stream/promises";var h8=B(()=>{l3();LY();Object.assign(P6,{on:JD,finished:XD})});var zY=({error:Z,stream:q,readableObjectMode:J,lines:X,encoding:Q,fdNumber:$})=>{if(!(Z instanceof Y1))throw Z;if($==="all")return Z;let Y=QD(J,X,Q);throw Z.maxBufferInfo={fdNumber:$,unit:Y},q.destroy(),Z},QD=(Z,q,J)=>{if(Z)return"objects";if(q)return"lines";if(J==="buffer")return"bytes";return"characters"},_Y=(Z,q,J)=>{if(q.length!==J)return;let X=new Y1;throw X.maxBufferInfo={fdNumber:"ipc"},X},RY=(Z,q)=>{let{streamName:J,threshold:X,unit:Q}=$D(Z,q);return`Command's ${J} was larger than ${X} ${Q}`},$D=(Z,q)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:q[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:J,unit:X}}=Z;delete Z.maxBufferInfo;let Q=Q1(q,J);if(J==="ipc")return{streamName:"IPC output",threshold:Q,unit:"messages"};return{streamName:a4(J),threshold:Q,unit:X}},MY=(Z,q,J)=>Z?.code==="ENOBUFS"&&q!==null&&q.some((X)=>X!==null&&X.length>f8(J)),FY=(Z,q,J)=>{if(!q)return Z;let X=f8(J);return Z.length>X?Z.slice(0,X):Z},f8=([,Z])=>Z;var u1=B(()=>{h8();X1();$1()});import{inspect as YD}from"node:util";var AY=({stdio:Z,all:q,ipcOutput:J,originalError:X,signal:Q,signalDescription:$,exitCode:Y,escapedCommand:H,timedOut:K,isCanceled:U,isGracefullyCanceled:W,isMaxBuffer:V,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_,maxBuffer:R,timeout:M,cwd:F})=>{let k=X?.code,D=HD({originalError:X,timedOut:K,timeout:M,isMaxBuffer:V,maxBuffer:R,errorCode:k,signal:Q,signalDescription:$,exitCode:Y,isCanceled:U,isGracefullyCanceled:W,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_}),O=KD(X,F),T=O===void 0?"":`
34
- ${O}`,j=`${D}: ${H}${T}`,A=q===void 0?[Z[2],Z[1]]:[q],b=[j,...A,...Z.slice(3),J.map((w)=>UD(w)).join(`
35
- `)].map((w)=>A6(N2(WD(w)))).filter(Boolean).join(`
36
-
37
- `);return{originalMessage:O,shortMessage:j,message:b}},HD=({originalError:Z,timedOut:q,timeout:J,isMaxBuffer:X,maxBuffer:Q,errorCode:$,signal:Y,signalDescription:H,exitCode:K,isCanceled:U,isGracefullyCanceled:W,isForcefullyTerminated:V,forceKillAfterDelay:L,killSignal:z})=>{let _=GD(V,L);if(q)return`Command timed out after ${J} milliseconds${_}`;if(W){if(Y===void 0)return`Command was gracefully canceled with exit code ${K}`;return V?`Command was gracefully canceled${_}`:`Command was gracefully canceled with ${Y} (${H})`}if(U)return`Command was canceled${_}`;if(X)return`${RY(Z,Q)}${_}`;if($!==void 0)return`Command failed with ${$}${_}`;if(V)return`Command was killed with ${z} (${W8(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"},GD=(Z,q)=>Z?` and was forcefully terminated after ${q} milliseconds`:"",KD=(Z,q)=>{if(Z instanceof l0)return;let J=C$(Z)?Z.originalMessage:String(Z?.message??Z),X=A6(n9(J,q));return X===""?void 0:X},UD=(Z)=>typeof Z==="string"?Z:YD(Z),WD=(Z)=>Array.isArray(Z)?Z.map((q)=>N2(DY(q))).filter(Boolean).join(`
38
- `):DY(Z),DY=(Z)=>{if(typeof Z==="string")return Z;if(J0(Z))return n4(Z);return""};var TY=B(()=>{m3();T0();h3();r4();u1();j6();S1()});var g8=({command:Z,escapedCommand:q,stdio:J,all:X,ipcOutput:Q,options:{cwd:$},startTime:Y})=>jY({command:Z,escapedCommand:q,cwd:$,durationMs:V3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:J[1],stderr:J[2],all:X,stdio:J,ipcOutput:Q,pipedFrom:[]}),E2=({error:Z,command:q,escapedCommand:J,fileDescriptors:X,options:Q,startTime:$,isSync:Y})=>y6({error:Z,command:q,escapedCommand:J,startTime:$,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:X.length}),ipcOutput:[],options:Q,isSync:Y}),y6=({error:Z,command:q,escapedCommand:J,startTime:X,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:U,signal:W,stdio:V,all:L,ipcOutput:z,options:{timeoutDuration:_,timeout:R=_,forceKillAfterDelay:M,killSignal:F,cwd:k,maxBuffer:D},isSync:O})=>{let{exitCode:T,signal:j,signalDescription:A}=BD(U,W),{originalMessage:b,shortMessage:w,message:x}=AY({stdio:V,all:L,ipcOutput:z,originalError:Z,signal:j,signalDescription:A,exitCode:T,escapedCommand:J,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,forceKillAfterDelay:M,killSignal:F,maxBuffer:D,timeout:R,cwd:k}),P=P$(Z,x,O);return Object.assign(P,VD({error:P,command:q,escapedCommand:J,startTime:X,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:T,signal:j,signalDescription:A,stdio:V,all:L,ipcOutput:z,cwd:k,originalMessage:b,shortMessage:w})),P},VD=({error:Z,command:q,escapedCommand:J,startTime:X,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:U,signal:W,signalDescription:V,stdio:L,all:z,ipcOutput:_,cwd:R,originalMessage:M,shortMessage:F})=>jY({shortMessage:F,originalMessage:M,command:q,escapedCommand:J,cwd:R,durationMs:V3(X),failed:!0,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isTerminated:W!==void 0,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:U,signal:W,signalDescription:V,code:Z.cause?.code,stdout:L[1],stderr:L[2],all:z,stdio:L,ipcOutput:_,pipedFrom:[]}),jY=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,q])=>q!==void 0)),BD=(Z,q)=>{let J=Z===null?void 0:Z,X=q===null?void 0:q,Q=X===void 0?void 0:W8(q);return{exitCode:J,signal:X,signalDescription:Q}};var S6=B(()=>{j6();X8();S1();TY()});function LD(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(IY(Z*1000)%1000),nanoseconds:Math.trunc(IY(Z*1e6)%1000)}}function zD(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 n3(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return LD(Z);break}case"bigint":return zD(Z)}throw TypeError("Expected a finite number or bigint")}var IY=(Z)=>Number.isFinite(Z)?Z:0;var OY=()=>{};function i3(Z,q){let J=typeof Z==="bigint";if(!J&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");q={...q};let X=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 Q=[],$=(W,V)=>{let L=Math.floor(W*10**V+MD);return(Math.round(L)/10**V).toFixed(V)},Y=(W,V,L,z)=>{if((Q.length===0||!q.colonNotation)&&_D(W)&&!(q.colonNotation&&L==="m"))return;if(z??=String(W),q.colonNotation){let _=z.includes(".")?z.split(".")[0].length:z.length,R=Q.length>0?2:1;z="0".repeat(Math.max(0,R-_))+z}else z+=q.verbose?" "+RD(V,W):L;Q.push(z)},H=n3(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 W=Number(H.seconds),V=Number(H.milliseconds),L=Number(H.microseconds),z=Number(H.nanoseconds);if(Y(W,"second","s"),q.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(L,"microsecond","µs"),Y(z,"nanosecond","ns");else{let _=V+L/1000+z/1e6,R=typeof q.millisecondsDecimalDigits==="number"?q.millisecondsDecimalDigits:0,M=_>=1?Math.round(_):Math.ceil(_),F=R?_.toFixed(R):M;Y(Number.parseFloat(F),"millisecond","ms",F)}}else{let W=(J?Number(Z%FD):Z)/1000%60,V=typeof q.secondsDecimalDigits==="number"?q.secondsDecimalDigits:1,L=$(W,V),z=q.keepDecimalsOnWholeSeconds?L:L.replace(/\.0+$/,"");Y(Number.parseFloat(z),"second","s",z)}if(Q.length===0)return X+"0"+(q.verbose?" milliseconds":"ms");let U=q.colonNotation?":":" ";if(typeof q.unitCount==="number")Q=Q.slice(0,Math.max(q.unitCount,1));return X+Q.join(U)}var _D=(Z)=>Z===0||Z===0n,RD=(Z,q)=>q===1||q===1n?Z:`${Z}s`,MD=0.0000001,FD;var wY=B(()=>{OY();FD=24n*60n*60n*1000n});var kY=(Z,q)=>{if(Z.failed)c0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:q,result:Z})};var NY=B(()=>{T2()});var xY=(Z,q)=>{if(!D2(q))return;kY(Z,q),DD(Z,q)},DD=(Z,q)=>{let J=`(done in ${i3(Z.durationMs)})`;c0({type:"duration",verboseMessage:J,verboseInfo:q,result:Z})};var EY=B(()=>{wY();F1();T2();NY()});var P2=(Z,q,{reject:J})=>{if(xY(Z,q),Z.failed&&J)throw Z;return Z};var m8=B(()=>{EY()});var a3=(Z,q)=>{if(p1(Z))return"asyncGenerator";if(SY(Z))return"generator";if(u8(Z))return"fileUrl";if(OD(Z))return"filePath";if(xD(Z))return"webStream";if(f0(Z,{checkOpen:!1}))return"native";if(J0(Z))return"uint8Array";if(ED(Z))return"asyncIterable";if(PD(Z))return"iterable";if(s3(Z))return CY({transform:Z},q);if(ID(Z))return AD(Z,q);return"native"},AD=(Z,q)=>{if(p3(Z.transform,{checkOpen:!1}))return TD(Z,q);if(s3(Z.transform))return CY(Z,q);return jD(Z,q)},TD=(Z,q)=>{return yY(Z,q,"Duplex stream"),"duplex"},CY=(Z,q)=>{return yY(Z,q,"web TransformStream"),"webTransform"},yY=({final:Z,binary:q,objectMode:J},X,Q)=>{PY(Z,`${X}.final`,Q),PY(q,`${X}.binary`,Q),b6(J,`${X}.objectMode`)},PY=(Z,q,J)=>{if(Z!==void 0)throw TypeError(`The \`${q}\` option can only be defined when using a generator, not a ${J}.`)},jD=({transform:Z,final:q,binary:J,objectMode:X},Q)=>{if(Z!==void 0&&!vY(Z))throw TypeError(`The \`${Q}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(p3(q,{checkOpen:!1}))throw TypeError(`The \`${Q}.final\` option must not be a Duplex stream.`);if(s3(q))throw TypeError(`The \`${Q}.final\` option must not be a web TransformStream.`);if(q!==void 0&&!vY(q))throw TypeError(`The \`${Q}.final\` option must be a generator.`);return b6(J,`${Q}.binary`),b6(X,`${Q}.objectMode`),p1(Z)||p1(q)?"asyncGenerator":"generator"},b6=(Z,q)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${q}\` option must use a boolean.`)},vY=(Z)=>p1(Z)||SY(Z),p1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",SY=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",ID=(Z)=>e(Z)&&(Z.transform!==void 0||Z.final!==void 0),u8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",bY=(Z)=>u8(Z)&&Z.protocol!=="file:",OD=(Z)=>e(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((q)=>wD.has(q))&&o3(Z.file),wD,o3=(Z)=>typeof Z==="string",h6=(Z)=>e(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((q)=>kD.has(q))&&("value"in Z),kD,hY=(Z,q)=>Z==="native"&&typeof q==="string"&&!ND.has(q),ND,fY=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",p8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",xD=(Z)=>fY(Z)||p8(Z),s3=(Z)=>fY(Z?.readable)&&p8(Z?.writable),ED=(Z)=>gY(Z)&&typeof Z[Symbol.asyncIterator]==="function",PD=(Z)=>gY(Z)&&typeof Z[Symbol.iterator]==="function",gY=(Z)=>typeof Z==="object"&&Z!==null,x0,d8,r3,mY,uY,T1;var L0=B(()=>{m1();q1();T0();wD=new Set(["file","append"]),kD=new Set(["value","input"]),ND=new Set(["ipc","ignore","inherit","overlapped","pipe"]),x0=new Set(["generator","asyncGenerator","duplex","webTransform"]),d8=new Set(["fileUrl","filePath","fileNumber"]),r3=new Set(["fileUrl","filePath"]),mY=new Set([...r3,"webStream","nodeStream"]),uY=new Set(["webTransform","duplex"]),T1={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 t3=(Z,q,J,X)=>X==="output"?vD(Z,q,J):CD(Z,q,J),vD=(Z,q,J)=>{let X=q!==0&&J[q-1].value.readableObjectMode;return{writableObjectMode:X,readableObjectMode:Z??X}},CD=(Z,q,J)=>{let X=q===0?Z===!0:J[q-1].value.readableObjectMode,Q=q!==J.length-1&&(Z??X);return{writableObjectMode:X,readableObjectMode:Q}},pY=(Z,q)=>{let J=Z.findLast(({type:X})=>x0.has(X));if(J===void 0)return!1;return q==="input"?J.value.writableObjectMode:J.value.readableObjectMode};var e3=B(()=>{L0()});var dY=(Z,q,J,X)=>[...Z.filter(({type:Q})=>!x0.has(Q)),...yD(Z,q,J,X)],yD=(Z,q,J,{encoding:X})=>{let Q=Z.filter(({type:Y})=>x0.has(Y)),$=Array.from({length:Q.length});for(let[Y,H]of Object.entries(Q))$[Y]=SD({stdioItem:H,index:Number(Y),newTransforms:$,optionName:q,direction:J,encoding:X});return gD($,J)},SD=({stdioItem:Z,stdioItem:{type:q},index:J,newTransforms:X,optionName:Q,direction:$,encoding:Y})=>{if(q==="duplex")return bD({stdioItem:Z,optionName:Q});if(q==="webTransform")return hD({stdioItem:Z,index:J,newTransforms:X,direction:$});return fD({stdioItem:Z,index:J,newTransforms:X,direction:$,encoding:Y})},bD=({stdioItem:Z,optionName:q})=>{let{value:J}=Z,{transform:X}=J,{writableObjectMode:Q,readableObjectMode:$}=X,{objectMode:Y=$}=J;if(Y&&!$)throw TypeError(`The \`${q}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Y&&$)throw TypeError(`The \`${q}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:X,writableObjectMode:Q,readableObjectMode:$}}},hD=({stdioItem:Z,stdioItem:{value:q},index:J,newTransforms:X,direction:Q})=>{let{transform:$,objectMode:Y}=e(q)?q:{transform:q},{writableObjectMode:H,readableObjectMode:K}=t3(Y,J,X,Q);return{...Z,value:{transform:$,writableObjectMode:H,readableObjectMode:K}}},fD=({stdioItem:Z,stdioItem:{value:q},index:J,newTransforms:X,direction:Q,encoding:$})=>{let{transform:Y,final:H,binary:K=!1,preserveNewlines:U=!1,objectMode:W}=e(q)?q:{transform:q},V=K||j0.has($),{writableObjectMode:L,readableObjectMode:z}=t3(W,J,X,Q);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:U,writableObjectMode:L,readableObjectMode:z}}},gD=(Z,q)=>q==="input"?Z.reverse():Z;var cY=B(()=>{q1();h1();L0();e3()});import ZZ from"node:process";var lY=(Z,q,J)=>{let X=Z.map((Q)=>mD(Q,q));if(X.includes("input")&&X.includes("output"))throw TypeError(`The \`${J}\` option must not be an array of both readable and writable values.`);return X.find(Boolean)??cD},mD=(Z,q)=>pD[q]??uD(Z),uD=({type:Z,value:q,direction:J,optionName:X})=>{let Q=nY[Z](q);if(J==="input"&&Q==="output")throw TypeError(`The \`${X}\` option is invalid: \`input: true\` cannot be used with a writable value, which is always an output.`);return J??Q},pD,v2=()=>{return},qZ=()=>"input",nY,dD=(Z)=>{if([0,ZZ.stdin].includes(Z))return"input";if([1,2,ZZ.stdout,ZZ.stderr].includes(Z))return"output"},cD="output";var iY=B(()=>{m1();L0();pD=["input","output","output"],nY={generator:v2,asyncGenerator:v2,fileUrl:v2,filePath:v2,iterable:qZ,asyncIterable:qZ,uint8Array:qZ,webStream:(Z)=>p8(Z)?"output":"input",nodeStream(Z){if(!g1(Z,{checkOpen:!1}))return"output";return u3(Z,{checkOpen:!1})?void 0:"input"},webTransform:v2,duplex:v2,native(Z){let q=dD(Z);if(q!==void 0)return q;if(f0(Z,{checkOpen:!1}))return nY.nodeStream(Z)}}});var aY=(Z,q)=>q?[...Z,"ipc"]:Z;var oY=()=>{};var tY=({stdio:Z,ipc:q,buffer:J,...X},Q,$)=>{let Y=iD(Z,X).map((H,K)=>eY(H,K));return lD(Y),$?oD(Y,J,Q):aY(Y,q)},lD=(Z)=>{if(Z.some((q)=>nD(q)))throw Error("The `ipc: true` option must be used instead of `stdio: 'ipc'`.")},nD=(Z)=>{if(Array.isArray(Z))return Z.some((q)=>sY(q));return sY(Z)},sY=(Z)=>{if(h6(Z))return Z.value==="ipc";return Z==="ipc"},iD=(Z,q)=>{if(Z===void 0)return N0.map((X)=>q[X]);if(aD(q))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${N0.map((X)=>`\`${X}\``).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,N0.length);return Array.from({length:J},(X,Q)=>Z[Q])},aD=(Z)=>N0.some((q)=>Z[q]!==void 0),eY=(Z,q)=>{if(Array.isArray(Z))return Z.map((J)=>eY(J,q));if(Z===null||Z===void 0)return q>=N0.length?"ignore":"pipe";return Z},oD=(Z,q,J)=>Z.map((X,Q)=>!q[Q]&&Q!==0&&!A2(J,Q)&&sD(X,Q)?"ignore":X),sD=(Z,q)=>rY(Z,q)||Array.isArray(Z)&&Z.every((J)=>rY(J,q)),rY=(Z,q)=>Z==="pipe"||rD(Z,q),rD=(Z,q)=>h6(Z)&&Z.value==="pipe"&&(Z.input===void 0||Z.input===!1||tD(q,Z.input)),tD=(Z,q)=>q===!0&&(Z===1||Z===2);var ZH=B(()=>{X1();oY();F1();L0()});var l8=(Z,q="stdin")=>{let{options:X,fileDescriptors:Q}=i0.get(Z),$=qH(Q,q,!0),Y=Z.stdio[$];if(Y===null)throw TypeError(JH($,q,X,!0));return Y},C2=(Z,q="stdout")=>{let{options:X,fileDescriptors:Q}=i0.get(Z),$=qH(Q,q,!1),Y=$==="all"?Z.all:Z.stdio[$];if(Y===null||Y===void 0)throw TypeError(JH($,q,X,!1));return Y},i0,qH=(Z,q,J)=>{let X=eD(q,J);return ZA(X,q,J,Z),X},eD=(Z,q)=>{let J=G3(Z);if(J!==void 0)return J;let{validOptions:X,defaultValue:Q}=q?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${f6(q)}" must not be "${Z}".
39
- It must be ${X} or "fd3", "fd4" (and so on).
40
- It is optional and defaults to "${Q}".`)},ZA=(Z,q,J,X)=>{let Q=X[XH(Z)];if(Q===void 0)throw TypeError(`"${f6(J)}" must not be ${q}. That file descriptor does not exist.
41
- Please set the "stdio" option to ensure that file descriptor exists.`);if(Q.direction==="input"&&!J)throw TypeError(`"${f6(J)}" must not be ${q}. It must be a readable stream, not writable.`);if(Q.direction!=="input"&&J)throw TypeError(`"${f6(J)}" must not be ${q}. It must be a writable stream, not readable.
42
- If you meant to use it as input, please set its "stdio" option to \`{value: 'pipe', input: true}\`.`)},JH=(Z,q,J,X)=>{if(Z==="all"&&!J.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:Q,optionValue:$}=qA(Z,J);return`The "${Q}: ${c8($)}" option is incompatible with using "${f6(X)}: ${c8(q)}".
43
- Please set this option with "pipe" instead.`},qA=(Z,{stdin:q,stdout:J,stderr:X,stdio:Q})=>{let $=XH(Z);if($===0&&q!==void 0)return{optionName:"stdin",optionValue:q};if($===1&&J!==void 0)return{optionName:"stdout",optionValue:J};if($===2&&X!==void 0)return{optionName:"stderr",optionValue:X};return{optionName:`stdio[${$}]`,optionValue:Q[$]}},XH=(Z)=>Z==="all"?1:Z,f6=(Z)=>Z?"to":"from",c8=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var j1=B(()=>{$1();i0=new WeakMap});import{readFileSync as JA}from"node:fs";import XA from"node:tty";var $H=({stdioItem:Z,stdioItem:{type:q},isStdioArray:J,fdNumber:X,direction:Q,isSync:$})=>{if(!J||q!=="native")return Z;return $?QA({stdioItem:Z,fdNumber:X,direction:Q}):HA({stdioItem:Z,fdNumber:X})},QA=({stdioItem:Z,stdioItem:{value:q,optionName:J},fdNumber:X,direction:Q})=>{let $=$A({value:q,optionName:J,fdNumber:X,direction:Q});if($!==void 0)return $;if(f0(q,{checkOpen:!1}))throw TypeError(`The \`${J}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},$A=({value:Z,optionName:q,fdNumber:J,direction:X})=>{let Q=YA(Z,J);if(Q===void 0)return;if(X==="output")return{type:"fileNumber",value:Q,optionName:q};if(XA.isatty(Q))throw TypeError(`The \`${q}: ${c8(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:J1(JA(Q)),optionName:q}},YA=(Z,q)=>{if(Z==="inherit")return q;if(typeof Z==="number")return Z;let J=i4.indexOf(Z);if(J!==-1)return J},HA=({stdioItem:Z,stdioItem:{value:q,optionName:J},fdNumber:X})=>{if(q==="inherit")return{type:"nodeStream",value:QH(X,q,J),optionName:J};if(typeof q==="number")return{type:"nodeStream",value:QH(q,q,J),optionName:J};if(f0(q,{checkOpen:!1}))return{type:"nodeStream",value:q,optionName:J};return Z},QH=(Z,q,J)=>{let X=i4[Z];if(X===void 0)throw TypeError(`The \`${J}: ${q}\` option is invalid: no such standard stream.`);return X};var YH=B(()=>{m1();X1();T0();j1()});var HH=({input:Z,inputFile:q},J)=>J===0?[...GA(Z),...UA(q)]:[],GA=(Z)=>Z===void 0?[]:[{type:KA(Z),value:Z,optionName:"input"}],KA=(Z)=>{if(g1(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.")},UA=(Z)=>Z===void 0?[]:[{...WA(Z),optionName:"inputFile"}],WA=(Z)=>{if(u8(Z))return{type:"fileUrl",value:Z};if(o3(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var GH=B(()=>{m1();T0();L0()});var KH=(Z)=>Z.filter((q,J)=>Z.every((X,Q)=>!VA(q,X)||J>=Q||q.type==="generator"||q.type==="asyncGenerator")),VA=(Z,q)=>Z.value===q.value&&Z.direction===q.direction,UH=({stdioItem:{type:Z,value:q,optionName:J},direction:X,fileDescriptors:Q,isSync:$})=>{let Y=BA(Q,Z);if(Y.length===0)return;if($){LA({otherStdioItems:Y,type:Z,value:q,optionName:J,direction:X});return}if(mY.has(Z))return WH({otherStdioItems:Y,type:Z,value:q,optionName:J,direction:X});if(uY.has(Z))_A({otherStdioItems:Y,type:Z,value:q,optionName:J})},BA=(Z,q)=>Z.flatMap(({direction:J,stdioItems:X})=>X.filter((Q)=>Q.type===q).map((Q)=>({...Q,direction:J}))),LA=({otherStdioItems:Z,type:q,value:J,optionName:X,direction:Q})=>{if(r3.has(q))WH({otherStdioItems:Z,type:q,value:J,optionName:X,direction:Q})},WH=({otherStdioItems:Z,type:q,value:J,optionName:X,direction:Q})=>{let $=Z.filter((H)=>zA(H,J));if($.length===0)return;let Y=$.find((H)=>H.direction!==Q);return VH(Y,X,q),Q==="output"?$[0].stream:void 0},zA=({type:Z,value:q},J)=>{if(Z==="filePath")return q.file===J.file;if(Z==="fileUrl")return q.href===J.href;return q===J},_A=({otherStdioItems:Z,type:q,value:J,optionName:X})=>{let Q=Z.find(({value:{transform:$}})=>$===J.transform);VH(Q,X,q)},VH=(Z,q,J)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${q}\` options must not target ${T1[J]} that is the same.`)};var BH=B(()=>{L0()});var n8=(Z,q,J,X)=>{let $=tY(q,J,X).map((H,K)=>RA({stdioOption:H,fdNumber:K,options:q,isSync:X})),Y=NA({initialFileDescriptors:$,addProperties:Z,options:q,isSync:X});return q.stdio=Y.map(({stdioItems:H})=>PA(H)),Y},RA=({stdioOption:Z,fdNumber:q,options:J,isSync:X})=>{let Q=a4(q),{stdioItems:$,isStdioArray:Y}=MA({stdioOption:Z,fdNumber:q,options:J,optionName:Q}),H=lY($,q,Q),K=$.map((V)=>$H({stdioItem:V,isStdioArray:Y,fdNumber:q,direction:H,isSync:X})),U=dY(K,Q,H,J),W=pY(U,H);return kA(U,W),{direction:H,objectMode:W,stdioItems:U}},MA=({stdioOption:Z,fdNumber:q,options:J,optionName:X})=>{let Q=Array.isArray(Z)?Z:[Z],$=HH(J,q),Y=[...FA(Q.map((U)=>AA(U,X)),$),...$],H=KH(Y),K=H.length>1;return jA(H,K,X),OA(H),{stdioItems:H,isStdioArray:K}},FA=(Z,q)=>q.length>0&&DA(Z)?[]:Z,DA=(Z)=>Z.length===1&&Z[0].type==="native"&&Z[0].value==="inherit",AA=(Z,q)=>{if(h6(Z))return TA(Z,q);return{type:a3(Z,q),value:Z,optionName:q}},TA=({value:Z,input:q},J)=>{return b6(q,`${J}.input`),{type:a3(Z,J),value:Z,direction:q?"input":void 0,optionName:J}},jA=(Z,q,J)=>{if(Z.length===0)throw TypeError(`The \`${J}\` option must not be an empty array.`);if(!q)return;for(let{value:X,optionName:Q}of Z)if(IA.has(X))throw Error(`The \`${Q}\` option must not include \`${X}\`.`)},IA,OA=(Z)=>{for(let q of Z)wA(q)},wA=({type:Z,value:q,optionName:J})=>{if(bY(q))throw TypeError(`The \`${J}: URL\` option must use the \`file:\` scheme.
44
- For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(hY(Z,q))throw TypeError(`The \`${J}: { file: '...' }\` option must be used instead of \`${J}: '...'\`.`)},kA=(Z,q)=>{if(!q)return;let J=Z.find(({type:X})=>d8.has(X));if(J!==void 0)throw TypeError(`The \`${J.optionName}\` option cannot use both files and transforms in objectMode.`)},NA=({initialFileDescriptors:Z,addProperties:q,options:J,isSync:X})=>{let Q=[];try{for(let $ of Z)Q.push(xA({fileDescriptor:$,fileDescriptors:Q,addProperties:q,options:J,isSync:X}));return Q}catch($){throw JZ(Q),$}},xA=({fileDescriptor:{direction:Z,objectMode:q,stdioItems:J},fileDescriptors:X,addProperties:Q,options:$,isSync:Y})=>{let H=J.map((K)=>EA({stdioItem:K,addProperties:Q,direction:Z,options:$,fileDescriptors:X,isSync:Y}));return{direction:Z,objectMode:q,stdioItems:H}},EA=({stdioItem:Z,addProperties:q,direction:J,options:X,fileDescriptors:Q,isSync:$})=>{let Y=UH({stdioItem:Z,direction:J,fileDescriptors:Q,isSync:$});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...q[J][Z.type](Z,X)}},JZ=(Z)=>{for(let{stdioItems:q}of Z)for(let{stream:J}of q)if(J!==void 0&&!b0(J))J.destroy()},PA=(Z)=>{if(Z.length>1)return Z.some(({value:X})=>X==="overlapped")?"overlapped":"pipe";let[{type:q,value:J}]=Z;return q==="native"?J:"pipe"};var i8=B(()=>{X1();cY();e3();L0();iY();ZH();YH();GH();BH();IA=new Set(["ignore"])});import{readFileSync as LH}from"node:fs";var _H=(Z,q)=>n8(CA,Z,q,!0),a0=({type:Z,optionName:q})=>{MH(q,T1[Z])},RH=({optionName:Z,value:q})=>{if(q==="overlapped")MH(Z,`"${q}"`);return{}},vA=(Z)=>{let{optionName:q,value:J}=Z;if(J==="pipe"&&q!=="stdin")throw TypeError(`Only the \`stdin\` option, not \`${q}\`, can be an input pipe with synchronous methods.`);return RH(Z)},MH=(Z,q)=>{throw TypeError(`The \`${Z}\` option cannot be ${q} with synchronous methods.`)},zH,CA;var FH=B(()=>{T0();i8();L0();zH={generator(){},asyncGenerator:a0,webStream:a0,nodeStream:a0,webTransform:a0,duplex:a0,asyncIterable:a0,native:RH},CA={input:{...zH,native:vA,fileUrl:({value:Z})=>({contents:[J1(LH(Z))]}),filePath:({value:{file:Z}})=>({contents:[J1(LH(Z))]}),fileNumber:a0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...zH,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:q}})=>({path:Z,append:q}),fileNumber:({value:Z})=>({path:Z}),iterable:a0,string:a0,uint8Array:a0}}});var G1=(Z,{stripFinalNewline:q},J)=>XZ(q,J)&&Z!==void 0&&!Array.isArray(Z)?N2(Z):Z,XZ=(Z,q)=>q==="all"?Z[1]||Z[2]:Z[q];var g6=B(()=>{m3()});var a8=(Z,q,J,X)=>Z||J?void 0:AH(q,X),$Z=(Z,q,J)=>J?Z.flatMap((X)=>DH(X,q)):DH(Z,q),DH=(Z,q)=>{let{transform:J,final:X}=AH(q,{});return[...J(Z),...X()]},AH=(Z,q)=>{return q.previousChunks="",{transform:yA.bind(void 0,q,Z),final:bA.bind(void 0,q)}},yA=function*(Z,q,J){if(typeof J!=="string"){yield J;return}let{previousChunks:X}=Z,Q=-1;for(let $=0;$<J.length;$+=1){if(J[$]!==`
45
- `)continue;let Y=SA(J,$,q,Z),H=J.slice(Q+1,$+1-Y);if(X.length>0)H=QZ(X,H),X="";yield H,Q=$}if(Q!==J.length-1)X=QZ(X,J.slice(Q+1));Z.previousChunks=X},SA=(Z,q,J,X)=>{if(J)return 0;return X.isWindowsNewline=q!==0&&Z[q-1]==="\r",X.isWindowsNewline?2:1},bA=function*({previousChunks:Z}){if(Z.length>0)yield Z},TH=({binary:Z,preserveNewlines:q,readableObjectMode:J,state:X})=>Z||q||J?void 0:{transform:hA.bind(void 0,X)},hA=function*({isWindowsNewline:Z=!1},q){let{unixNewline:J,windowsNewline:X,LF:Q,concatBytes:$}=typeof q==="string"?fA:mA;if(q.at(-1)===Q){yield q;return}yield $(q,Z?X:J)},QZ=(Z,q)=>`${Z}${q}`,fA,gA=(Z,q)=>{let J=new Uint8Array(Z.length+q.length);return J.set(Z,0),J.set(q,Z.length),J},mA;var o8=B(()=>{fA={windowsNewline:`\r
46
- `,unixNewline:`
47
- `,LF:`
48
- `,concatBytes:QZ},mA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:gA}});import{Buffer as uA}from"node:buffer";var jH=(Z,q)=>Z?void 0:pA.bind(void 0,q),pA=function*(Z,q){if(typeof q!=="string"&&!J0(q)&&!uA.isBuffer(q))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof q}.`);yield q},IH=(Z,q)=>Z?dA.bind(void 0,q):cA.bind(void 0,q),dA=function*(Z,q){OH(Z,q),yield q},cA=function*(Z,q){if(OH(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},OH=(Z,q)=>{if(q===null||q===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${q}\`.
49
- Instead, \`yield\` should either be called with a value, or not be called at all. For example:
50
- if (condition) { yield value; }`)};var wH=B(()=>{T0()});import{Buffer as lA}from"node:buffer";import{StringDecoder as nA}from"node:string_decoder";var s8=(Z,q,J)=>{if(J)return;if(Z)return{transform:iA.bind(void 0,new TextEncoder)};let X=new nA(q);return{transform:aA.bind(void 0,X),final:oA.bind(void 0,X)}},iA=function*(Z,q){if(lA.isBuffer(q))yield J1(q);else if(typeof q==="string")yield Z.encode(q);else yield q},aA=function*(Z,q){yield J0(q)?Z.write(q):q},oA=function*(Z){let q=Z.end();if(q!=="")yield q};var YZ=B(()=>{T0()});import{callbackify as kH}from"node:util";var HZ,r8=async function*(Z,q,J){if(J===q.length){yield Z;return}let{transform:X=rA}=q[J];for await(let Q of X(Z))yield*r8(Q,q,J+1)},NH=async function*(Z){for(let[q,{final:J}]of Object.entries(Z))yield*sA(J,Number(q),Z)},sA=async function*(Z,q,J){if(Z===void 0)return;for await(let X of Z())yield*r8(X,J,q+1)},xH,rA=function*(Z){yield Z};var EH=B(()=>{HZ=kH(async(Z,q,J,X)=>{q.currentIterable=Z(...J);try{for await(let Q of q.currentIterable)X.push(Q)}finally{delete q.currentIterable}}),xH=kH(async({currentIterable:Z},q)=>{if(Z!==void 0){await(q?Z.throw(q):Z.return());return}if(q)throw q})});var GZ=(Z,q,J,X)=>{try{for(let Q of Z(...q))J.push(Q);X()}catch(Q){X(Q)}},PH=(Z,q)=>[...q.flatMap((J)=>[...d1(J,Z,0)]),...m6(Z)],d1=function*(Z,q,J){if(J===q.length){yield Z;return}let{transform:X=eA}=q[J];for(let Q of X(Z))yield*d1(Q,q,J+1)},m6=function*(Z){for(let[q,{final:J}]of Object.entries(Z))yield*tA(J,Number(q),Z)},tA=function*(Z,q,J){if(Z===void 0)return;for(let X of Z())yield*d1(X,J,q+1)},eA=function*(Z){yield Z};var KZ=()=>{};import{Transform as ZT,getDefaultHighWaterMark as vH}from"node:stream";var UZ=({value:Z,value:{transform:q,final:J,writableObjectMode:X,readableObjectMode:Q},optionName:$},{encoding:Y})=>{let H={},K=CH(Z,Y,$),U=p1(q),W=p1(J),V=U?HZ.bind(void 0,r8,H):GZ.bind(void 0,d1),L=U||W?HZ.bind(void 0,NH,H):GZ.bind(void 0,m6),z=U||W?xH.bind(void 0,H):void 0;return{stream:new ZT({writableObjectMode:X,writableHighWaterMark:vH(X),readableObjectMode:Q,readableHighWaterMark:vH(Q),transform(R,M,F){V([R,K,0],this,F)},flush(R){L([K],this,R)},destroy:z})}},t8=(Z,q,J,X)=>{let Q=q.filter(({type:Y})=>Y==="generator"),$=X?Q.reverse():Q;for(let{value:Y,optionName:H}of $){let K=CH(Y,J,H);Z=PH(K,Z)}return Z},CH=({transform:Z,final:q,binary:J,writableObjectMode:X,readableObjectMode:Q,preserveNewlines:$},Y,H)=>{let K={};return[{transform:jH(X,H)},s8(J,Y,X),a8(J,$,X,K),{transform:Z,final:q},{transform:IH(Q,H)},TH({binary:J,preserveNewlines:$,readableObjectMode:Q,state:K})].filter(Boolean)};var e8=B(()=>{L0();o8();wH();YZ();EH();KZ()});var yH=(Z,q)=>{for(let J of qT(Z))JT(Z,J,q)},qT=(Z)=>new Set(Object.entries(Z).filter(([,{direction:q}])=>q==="input").map(([q])=>Number(q))),JT=(Z,q,J)=>{let{stdioItems:X}=Z[q],Q=X.filter(({contents:H})=>H!==void 0);if(Q.length===0)return;if(q!==0){let[{type:H,optionName:K}]=Q;throw TypeError(`Only the \`stdin\` option, not \`${K}\`, can be ${T1[H]} with synchronous methods.`)}let Y=Q.map(({contents:H})=>H).map((H)=>XT(H,X));J.input=D6(Y)},XT=(Z,q)=>{let J=t8(Z,q,"utf8",!0);return QT(J),D6(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 SH=B(()=>{e8();T0();L0()});var Z7=({stdioItems:Z,encoding:q,verboseInfo:J,fdNumber:X})=>X!=="all"&&A2(J,X)&&!j0.has(q)&&$T(X)&&(Z.some(({type:Q,value:$})=>Q==="native"&&YT.has($))||Z.every(({type:Q})=>x0.has(Q))),$T=(Z)=>Z===1||Z===2,YT,bH=async(Z,q,J,X)=>{for await(let Q of Z)if(!HT(q))fH(Q,J,X)},hH=(Z,q,J)=>{for(let X of Z)fH(X,q,J)},HT=(Z)=>Z._readableState.pipes.length>0,fH=(Z,q,J)=>{let X=q8(Z);c0({type:"output",verboseMessage:X,fdNumber:q,verboseInfo:J})};var WZ=B(()=>{h1();L0();T2();F1();YT=new Set(["pipe","overlapped"])});import{writeFileSync as GT,appendFileSync as KT}from"node:fs";var gH=({fileDescriptors:Z,syncResult:{output:q},options:J,isMaxBuffer:X,verboseInfo:Q})=>{if(q===null)return{output:Array.from({length:3})};let $={},Y=new Set;return{output:q.map((K,U)=>UT({result:K,fileDescriptors:Z,fdNumber:U,state:$,outputFiles:Y,isMaxBuffer:X,verboseInfo:Q},J)),...$}},UT=({result:Z,fileDescriptors:q,fdNumber:J,state:X,outputFiles:Q,isMaxBuffer:$,verboseInfo:Y},{buffer:H,encoding:K,lines:U,stripFinalNewline:W,maxBuffer:V})=>{if(Z===null)return;let L=FY(Z,$,V),z=J1(L),{stdioItems:_,objectMode:R}=q[J],M=WT([z],_,K,X),{serializedResult:F,finalResult:k=F}=VT({chunks:M,objectMode:R,encoding:K,lines:U,stripFinalNewline:W,fdNumber:J});BT({serializedResult:F,fdNumber:J,state:X,verboseInfo:Y,encoding:K,stdioItems:_,objectMode:R});let D=H[J]?k:void 0;try{if(X.error===void 0)LT(F,_,Q);return D}catch(O){return X.error=O,D}},WT=(Z,q,J,X)=>{try{return t8(Z,q,J,!1)}catch(Q){return X.error=Q,Z}},VT=({chunks:Z,objectMode:q,encoding:J,lines:X,stripFinalNewline:Q,fdNumber:$})=>{if(q)return{serializedResult:Z};if(J==="buffer")return{serializedResult:D6(Z)};let Y=lQ(Z,J);if(X[$])return{serializedResult:Y,finalResult:$Z(Y,!Q[$],q)};return{serializedResult:Y}},BT=({serializedResult:Z,fdNumber:q,state:J,verboseInfo:X,encoding:Q,stdioItems:$,objectMode:Y})=>{if(!Z7({stdioItems:$,encoding:Q,verboseInfo:X,fdNumber:q}))return;let H=$Z(Z,!1,Y);try{hH(H,q,X)}catch(K){J.error??=K}},LT=(Z,q,J)=>{let X=q.filter(({type:Q})=>d8.has(Q));for(let{path:Q,append:$}of X){let Y=typeof Q==="string"?Q:Q.toString();if($||J.has(Y))KT(Q,Z);else J.add(Y),GT(Q,Z)}};var mH=B(()=>{WZ();e8();o8();T0();L0();u1()});var uH=([,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,G1(q,J,"all")];if(Array.isArray(q))return[G1(Z,J,"all"),...q];if(J0(Z)&&J0(q))return $3([Z,q]);return`${Z}${q}`};var pH=B(()=>{T0();g6()});import{once as VZ}from"node:events";var dH=async(Z,q)=>{let[J,X]=await zT(Z);return q.isForcefullyTerminated??=!1,[J,X]},zT=async(Z)=>{let[q,J]=await Promise.allSettled([VZ(Z,"spawn"),VZ(Z,"exit")]);if(q.status==="rejected")return[];return J.status==="rejected"?cH(Z):J.value},cH=async(Z)=>{try{return await VZ(Z,"exit")}catch{return cH(Z)}},lH=async(Z)=>{let[q,J]=await Z;if(!_T(q,J)&&BZ(q,J))throw new l0;return[q,J]},_T=(Z,q)=>Z===void 0&&q===void 0,BZ=(Z,q)=>Z!==0||q!==null;var LZ=B(()=>{S1()});var nH=({error:Z,status:q,signal:J,output:X},{maxBuffer:Q})=>{let $=RT(Z,q,J),Y=$?.code==="ETIMEDOUT",H=MY($,X,Q);return{resultError:$,exitCode:q,signal:J,timedOut:Y,isMaxBuffer:H}},RT=(Z,q,J)=>{if(Z!==void 0)return Z;return BZ(q,J)?new l0:void 0};var iH=B(()=>{S1();u1();LZ()});import{spawnSync as MT}from"node:child_process";var aH=(Z,q,J)=>{let{file:X,commandArguments:Q,command:$,escapedCommand:Y,startTime:H,verboseInfo:K,options:U,fileDescriptors:W}=FT(Z,q,J),V=TT({file:X,commandArguments:Q,options:U,command:$,escapedCommand:Y,verboseInfo:K,fileDescriptors:W,startTime:H});return P2(V,K,U)},FT=(Z,q,J)=>{let{command:X,escapedCommand:Q,startTime:$,verboseInfo:Y}=Q8(Z,q,J),H=DT(J),{file:K,commandArguments:U,options:W}=k8(Z,q,H);AT(W);let V=_H(W,Y);return{file:K,commandArguments:U,command:X,escapedCommand:Q,startTime:$,verboseInfo:Y,options:W,fileDescriptors:V}},DT=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,AT=({ipc:Z,ipcInput:q,detached:J,cancelSignal:X,killDescendants:Q})=>{if(q)u6("ipcInput");if(Z)u6("ipc: true");if(J)u6("detached: true");if(Q)u6("killDescendants: true");if(X)u6("cancelSignal")},u6=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},TT=({file:Z,commandArguments:q,options:J,command:X,escapedCommand:Q,verboseInfo:$,fileDescriptors:Y,startTime:H})=>{let K=jT({file:Z,commandArguments:q,options:J,command:X,escapedCommand:Q,fileDescriptors:Y,startTime:H});if(K.failed)return K;let{resultError:U,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z}=nH(K,J),{output:_,error:R=U}=gH({fileDescriptors:Y,syncResult:K,options:J,isMaxBuffer:z,verboseInfo:$}),M=_.map((k,D)=>G1(k,J,D)),F=G1(uH(_,J),J,"all");return OT({error:R,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z,stdio:M,all:F,options:J,command:X,escapedCommand:Q,startTime:H})},jT=({file:Z,commandArguments:q,options:J,command:X,escapedCommand:Q,fileDescriptors:$,startTime:Y})=>{try{yH($,J);let H=IT(J);return MT(...N8(Z,q,H))}catch(H){return E2({error:H,command:X,escapedCommand:Q,fileDescriptors:$,options:J,startTime:Y,isSync:!0})}},IT=({encoding:Z,maxBuffer:q,...J})=>({...J,encoding:"buffer",maxBuffer:f8(q)}),OT=({error:Z,exitCode:q,signal:J,timedOut:X,isMaxBuffer:Q,stdio:$,all:Y,options:H,command:K,escapedCommand:U,startTime:W})=>Z===void 0?g8({command:K,escapedCommand:U,stdio:$,all:Y,ipcOutput:[],options:H,startTime:W}):y6({error:Z,command:K,escapedCommand:U,timedOut:X,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:Q,isForcefullyTerminated:!1,exitCode:q,signal:J,stdio:$,all:Y,ipcOutput:[],options:H,startTime:W,isSync:!0});var oH=B(()=>{B3();f3();g3();S6();m8();FH();g6();SH();mH();u1();pH();iH()});import{once as zZ,on as wT}from"node:events";var _Z,sH=({anyProcess:Z,channel:q,isSubprocess:J,ipc:X},Q={})=>{let{reference:$=!0,filter:Y}=Q,{signal:H}=Q[_Z]??{};return j2({methodName:"getOneMessage",isSubprocess:J,ipc:X,isConnected:T8(Z)}),kT({anyProcess:Z,channel:q,isSubprocess:J,filter:Y,reference:$,signal:H})},kT=async({anyProcess:Z,channel:q,isSubprocess:J,filter:X,reference:Q,signal:$})=>{_8(q,Q);let Y=A1(Z,q,J),H=new AbortController;NT($,H);try{return await Promise.race([xT(Y,X,H),ET(Y,J,H),PT(Y,J,H)])}catch(K){throw I2(Z),K}finally{H.abort(),R8(q,Q)}},NT=(Z,q)=>{if(Z===void 0)return;if(Z.aborted){q.abort();return}Z.addEventListener("abort",()=>{q.abort()},{once:!0,signal:q.signal})},xT=async(Z,q,{signal:J})=>{if(q===void 0){let[X]=await zZ(Z,"message",{signal:J});return X}for await(let[X]of wT(Z,"message",{signal:J}))if(q(X))return X},ET=async(Z,q,{signal:J})=>{await zZ(Z,"disconnect",{signal:J}),s$(q)},PT=async(Z,q,{signal:J})=>{let[X]=await zZ(Z,"strict:error",{signal:J});throw L8(X,q)};var RZ=B(()=>{O2();w6();I6();_Z=Symbol("internalGetOneMessageOptions")});import{once as tH,on as vT}from"node:events";var MZ,eH=(Z,q={})=>{let{reference:J=!0}=q,{signal:X,shouldAwait:Q=!Z.isSubprocess}=q[MZ]??{};return FZ({...Z,shouldAwait:Q,reference:J,signal:X})},FZ=({anyProcess:Z,waitProcess:q=Z,channel:J,isSubprocess:X,ipc:Q,shouldAwait:$,reference:Y,signal:H})=>{j2({methodName:"getEachMessage",isSubprocess:X,ipc:Q,isConnected:T8(Z)}),_8(J,Y);let K=A1(Z,J,X),U=new AbortController,W={};return CT(H,U),yT(Z,K,U),ST({ipcEmitter:K,isSubprocess:X,controller:U,state:W}),bT({anyProcess:Z,waitProcess:q,channel:J,ipcEmitter:K,isSubprocess:X,shouldAwait:$,controller:U,state:W,reference:Y})},CT=(Z,q)=>{if(Z===void 0)return;if(Z.aborted){q.abort();return}Z.addEventListener("abort",()=>{q.abort()},{once:!0,signal:q.signal})},yT=async(Z,q,J)=>{try{await tH(q,"disconnect",{signal:J.signal}),J.abort()}catch{}},ST=async({ipcEmitter:Z,isSubprocess:q,controller:J,state:X})=>{try{let[Q]=await tH(Z,"strict:error",{signal:J.signal});X.error=L8(Q,q),J.abort()}catch{}},bT=async function*({anyProcess:Z,waitProcess:q,channel:J,ipcEmitter:X,isSubprocess:Q,shouldAwait:$,controller:Y,state:H,reference:K}){try{for await(let[U]of vT(X,"message",{signal:Y.signal}))rH(H),yield U}catch{rH(H)}finally{if(Y.abort(),R8(J,K),!Q)I2(Z);if($)await q}},rH=({error:Z})=>{if(Z)throw Z};var q7=B(()=>{O2();w6();I6();MZ=Symbol("internalGetEachMessageOptions")});import ZG from"node:process";var qG=(Z,q,{ipc:J})=>{Object.assign(Z,XG(q,!1,J,Z))},JG=()=>{let Z=ZG,q=!0,J=ZG.channel!==void 0;return{...XG(Z,!0,J),getCancelSignal:I9.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:J})}},XG=(Z,q,J,X=Z)=>({sendMessage:k2.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J}),getOneMessage:sH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J}),getEachMessage:eH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J,waitProcess:X})});var DZ=B(()=>{k6();RZ();q7();D8()});import{ChildProcess as hT}from"node:child_process";import{PassThrough as fT,Readable as $G,Writable as YG,Duplex as HG}from"node:stream";var GG=({error:Z,command:q,escapedCommand:J,fileDescriptors:X,options:Q,startTime:$,verboseInfo:Y})=>{JZ(X);let H=new hT,K=gT(H,X),U=E2({error:Z,command:q,escapedCommand:J,fileDescriptors:X,options:Q,startTime:$,isSync:!1}),W=dT(U,Y,Q);return{subprocess:H,promise:W,all:Q.all?K:void 0,convertedStreams:{readable:KG,writable:UG,duplex:WG,readableStream:mT,writableStream:uT,transformStream:pT,iterable:QG,[Symbol.asyncIterator]:QG}}},gT=(Z,q)=>{let J=p6(),X=p6(),Q=p6(),$=Array.from({length:q.length-3},p6),Y=p6(),H=[J,X,Q,...$];return Object.assign(Z,{stdin:J,stdout:X,stderr:Q,stdio:H}),Y},p6=()=>{let Z=new fT;return Z.end(),Z},KG=()=>new $G({read(){}}),UG=()=>new YG({write(){}}),WG=()=>new HG({read(){},write(){}}),mT=()=>$G.toWeb(KG()),uT=()=>YG.toWeb(UG()),pT=()=>HG.toWeb(WG()),QG=async function*(){},dT=async(Z,q,J)=>P2(Z,q,J);var VG=B(()=>{i8();S6();m8()});import{createReadStream as BG,createWriteStream as LG}from"node:fs";import{Buffer as cT}from"node:buffer";import{Readable as d6,Writable as lT,Duplex as nT}from"node:stream";var _G=(Z,q)=>n8(iT,Z,q,!1),c6=({type:Z,optionName:q})=>{throw TypeError(`The \`${q}\` option cannot be ${T1[Z]}.`)},zG,iT;var RG=B(()=>{e8();i8();L0();zG={fileNumber:c6,generator:UZ,asyncGenerator:UZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:q,readableObjectMode:J}}){let X=q||J;return{stream:nT.fromWeb(Z,{objectMode:X})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},iT={input:{...zG,fileUrl:({value:Z})=>({stream:BG(Z)}),filePath:({value:{file:Z}})=>({stream:BG(Z)}),webStream:({value:Z})=>({stream:d6.fromWeb(Z)}),iterable:({value:Z})=>({stream:d6.from(Z)}),asyncIterable:({value:Z})=>({stream:d6.from(Z)}),string:({value:Z})=>({stream:d6.from(Z)}),uint8Array:({value:Z})=>({stream:d6.from(cT.from(Z))})},output:{...zG,fileUrl:({value:Z})=>({stream:LG(Z)}),filePath:({value:{file:Z,append:q}})=>({stream:LG(Z,q?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:lT.fromWeb(Z)}),iterable:c6,asyncIterable:c6,string:c6,uint8Array:c6}}});import{on as aT,once as MG}from"node:events";import{PassThrough as oT,getDefaultHighWaterMark as sT}from"node:stream";import{finished as AG}from"node:stream/promises";function c1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let Q of Z)AZ(Q);let q=Z.some(({readableObjectMode:Q})=>Q),J=rT(Z,q),X=new TG({objectMode:q,writableHighWaterMark:J,readableHighWaterMark:J});for(let Q of Z)X.add(Q);return X}var rT=(Z,q)=>{if(Z.length===0)return sT(q);let J=Z.filter(({readableObjectMode:X})=>X===q).map(({readableHighWaterMark:X})=>X);return Math.max(...J)},TG,tT=async(Z,q,J)=>{J7(Z,FG);let X=new AbortController;try{await Promise.race([eT(Z,X),Zj(Z,q,J,X)])}finally{X.abort(),J7(Z,-FG)}},eT=async(Z,{signal:q})=>{try{await AG(Z,{signal:q,cleanup:!0})}catch(J){throw jG(Z,J),J}},Zj=async(Z,q,J,{signal:X})=>{for await(let[Q]of aT(Z,"unpipe",{signal:X}))if(q.has(Q))Q.emit(J)},AZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},qj=async({passThroughStream:Z,stream:q,streams:J,ended:X,aborted:Q,onFinished:$,unpipeEvent:Y})=>{J7(Z,DG);let H=new AbortController;try{await Promise.race([Jj($,q,H),Xj({passThroughStream:Z,stream:q,streams:J,ended:X,aborted:Q,controller:H}),Qj({stream:q,streams:J,ended:X,aborted:Q,unpipeEvent:Y,controller:H})])}finally{H.abort(),J7(Z,-DG)}if(J.size>0&&J.size===X.size+Q.size)if(X.size===0&&Q.size>0)TZ(Z);else $j(Z)},Jj=async(Z,q,{signal:J})=>{try{if(await Z,!J.aborted)TZ(q)}catch(X){if(!J.aborted)jG(q,X)}},Xj=async({passThroughStream:Z,stream:q,streams:J,ended:X,aborted:Q,controller:{signal:$}})=>{try{if(await AG(q,{signal:$,cleanup:!0,readable:!0,writable:!1}),J.has(q))X.add(q)}catch(Y){if($.aborted||!J.has(q))return;if(IG(Y))Q.add(q);else OG(Z,Y)}},Qj=async({stream:Z,streams:q,ended:J,aborted:X,unpipeEvent:Q,controller:{signal:$}})=>{if(await MG(Z,Q,{signal:$}),!Z.readable)return MG($,"abort",{signal:$});q.delete(Z),J.delete(Z),X.delete(Z)},$j=(Z)=>{if(Z.writable)Z.end()},jG=(Z,q)=>{if(IG(q))TZ(Z);else OG(Z,q)},IG=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",TZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},OG=(Z,q)=>{if(!Z.destroyed)Z.once("error",Yj),Z.destroy(q)},Yj=()=>{},J7=(Z,q)=>{let J=Z.getMaxListeners();if(J!==0&&J!==Number.POSITIVE_INFINITY)Z.setMaxListeners(J+q)},FG=2,DG=1;var X7=B(()=>{TG=class TG extends oT{#J=new Set([]);#X=new Set([]);#q=new Set([]);#Y;#G=Symbol("unpipe");#V=new WeakMap;add(Z){if(AZ(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.#X,aborted:this.#q,onFinished:this.#Y,unpipeEvent:this.#G});this.#V.set(Z,q),Z.pipe(this,{end:!1})}async remove(Z){if(AZ(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 wG}from"node:stream/promises";var y2=(Z,q)=>{Z.pipe(q),Hj(Z,q),Gj(Z,q)},Hj=async(Z,q)=>{if(b0(Z)||b0(q))return;try{await wG(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}jZ(q)},jZ=(Z)=>{if(Z.writable)Z.end()},Gj=async(Z,q)=>{if(b0(Z)||b0(q))return;try{await wG(q,{cleanup:!0,readable:!1,writable:!0})}catch{}IZ(Z)},IZ=(Z)=>{if(Z.readable)Z.destroy()};var Q7=B(()=>{X1()});var kG=(Z,q,J)=>{let X=new Map;for(let[Q,{stdioItems:$,direction:Y}]of Object.entries(q)){let H=$.filter(({type:U})=>x0.has(U));for(let{stream:U}of H)Kj(Z,U,Y,Q);let K=$.filter(({type:U})=>!x0.has(U));for(let{stream:U}of K)Wj({subprocess:Z,stream:U,direction:Y,fdNumber:Q,pipeGroups:X,controller:J})}for(let[Q,$]of X){let Y=$.length===1?$[0]:c1($);y2(Y,Q)}},Kj=(Z,q,J,X)=>{if(J==="output")y2(Z.stdio[X],q);else y2(q,Z.stdio[X]);let Q=Uj[X];if(Q!==void 0)Z[Q]=q;Z.stdio[X]=q},Uj,Wj=({subprocess:Z,stream:q,direction:J,fdNumber:X,pipeGroups:Q,controller:$})=>{if(q===void 0)return;Vj(q,$);let[Y,H]=J==="output"?[q,Z.stdio[X]]:[Z.stdio[X],q],K=Q.get(Y)??[];Q.set(Y,[...K,H])},Vj=(Z,{signal:q})=>{if(b0(Z))b1(Z,Bj,q)},Bj=2;var NG=B(()=>{X7();X1();z8();L0();Q7();Uj=["stdin","stdout","stderr"]});import $7 from"node:process";import{execFile as Lj}from"node:child_process";import xG from"node:path/win32";var EG,PG=(Z)=>Z.killDescendants&&!EG?{...Z,detached:!0}:Z,vG=(Z,{killDescendants:q})=>{if(!q)return Z.kill.bind(Z);return(EG?_j:zj).bind(void 0,Z)},zj=(Z,q)=>{if(Z.pid===void 0)return!1;try{return $7.kill(-Z.pid,q)}catch{return Z.kill(q)}},_j=(Z,q)=>{if(Z.pid===void 0)return!1;let J=Rj();if(J===void 0)return Z.kill(q);return Lj(J,["/pid",`${Z.pid}`,"/T","/F"],(X)=>{if(X)Z.kill(q)}),!0},Rj=()=>{let Z=[$7.env.SystemRoot,$7.env.windir].find((q)=>q&&Mj(q));return Z===void 0?void 0:xG.join(Z,"System32","taskkill.exe")},Mj=(Z)=>{let{root:q}=xG.parse(Z);return/^[a-z]:[/\\]/i.test(q)};var CG=B(()=>{EG=$7.platform==="win32"});var l1;var yG=B(()=>{l1=[];l1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")l1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")l1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class SG{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(wZ[OZ])return wZ[OZ];Fj(wZ,OZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,q){this.listeners[Z].push(q)}removeListener(Z,q){let J=this.listeners[Z],X=J.indexOf(q);if(X===-1)return;if(X===0&&J.length===1)J.length=0;else J.splice(X,1)}emit(Z,q,J){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let X=!1;for(let Q of this.listeners[Z])X=Q(q,J)===!0||X;if(Z==="exit")X=this.emit("afterExit",q,J)||X;return X}}class NZ{}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",OZ,wZ,Fj,Dj=(Z)=>{return{onExit(q,J){return Z.onExit(q,J)},load(){return Z.load()},unload(){return Z.unload()}}},bG,hG,kZ,fG,em,Zu;var gG=B(()=>{yG();OZ=Symbol.for("signal-exit emitter"),wZ=globalThis,Fj=Object.defineProperty.bind(Object);bG=class bG extends NZ{onExit(){return()=>{}}load(){}unload(){}};hG=class hG extends NZ{#J=kZ.platform==="win32"?"SIGINT":"SIGHUP";#X=new SG;#q;#Y;#G;#V={};#A=!1;constructor(Z){super();this.#q=Z,this.#V={};for(let q of l1)this.#V[q]=()=>{let J=this.#q.listeners(q),{count:X}=this.#X,Q=Z;if(typeof Q.__signal_exit_emitter__==="object"&&typeof Q.__signal_exit_emitter__.count==="number")X+=Q.__signal_exit_emitter__.count;if(J.length===X){this.unload();let $=this.#X.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.#X.on(J,Z),()=>{if(this.#X.removeListener(J,Z),this.#X.listeners.exit.length===0&&this.#X.listeners.afterExit.length===0)this.unload()}}load(){if(this.#A)return;this.#A=!0,this.#X.count+=1;for(let Z of l1)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)}}unload(){if(!this.#A)return;this.#A=!1,l1.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.#X.count-=1}#_(Z){if(!Y7(this.#q))return 0;return this.#q.exitCode=Z||0,this.#X.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 X=J.call(this.#q,Z,...q);return this.#X.emit("exit",this.#q.exitCode,null),X}else return J.call(this.#q,Z,...q)}};kZ=globalThis.process,{onExit:fG,load:em,unload:Zu}=Dj(Y7(kZ)?new hG(kZ):new bG)});import{addAbortListener as Aj}from"node:events";var mG=(Z,{cleanup:q,detached:J},{signal:X})=>{if(!q||J)return;let Q=fG(()=>{Z()});Aj(X,()=>{Q()})};var uG=B(()=>{gG()});var H7=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),l6=(Z,q,J)=>{let X=Z[J];if(!X.has(q))X.set(q,[]);let Q=X.get(q),$=n0();return Q.push($),{resolve:$.resolve.bind($),promises:Q}},S2=async({resolve:Z,promises:q},J)=>{Z();let[X]=await Promise.race([Promise.allSettled([!0,J]),Promise.all([!1,...q])]);return!X};var n6=B(()=>{w2()});import{on as Tj}from"node:events";import{getDefaultHighWaterMark as jj}from"node:stream";var G7=({subprocessStdout:Z,subprocess:q,binary:J,shouldEncode:X,encoding:Q,preserveNewlines:$})=>{let Y=new AbortController;return Ij(q,Y),dG({stream:Z,controller:Y,binary:J,shouldEncode:!Z.readableObjectMode&&X,encoding:Q,shouldSplit:!Z.readableObjectMode,preserveNewlines:$})},Ij=async(Z,q)=>{try{await Z}catch{}finally{q.abort()}},xZ=({stream:Z,onStreamEnd:q,lines:J,encoding:X,stripFinalNewline:Q,allMixed:$})=>{let Y=new AbortController;Oj(q,Y,Z);let H=Z.readableObjectMode&&!$;return dG({stream:Z,controller:Y,binary:X==="buffer",shouldEncode:!H,encoding:X,shouldSplit:!H&&J,preserveNewlines:!Q})},Oj=async(Z,q,J)=>{try{await Z}catch{J.destroy()}finally{q.abort()}},dG=({stream:Z,controller:q,binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y})=>{let H=Tj(Z,"data",{signal:q.signal,highWaterMark:pG,highWatermark:pG});return wj({onStdoutChunk:H,controller:q,binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y})},EZ,pG,wj=async function*({onStdoutChunk:Z,controller:q,binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y}){let H=kj({binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y});try{for await(let[K]of Z)yield*d1(K,H,0)}catch(K){if(!q.signal.aborted)throw K}finally{yield*m6(H)}},kj=({binary:Z,shouldEncode:q,encoding:J,shouldSplit:X,preserveNewlines:Q})=>[s8(Z,J,!q),a8(Z,Q,!X,{})].filter(Boolean);var K7=B(()=>{YZ();o8();KZ();EZ=jj(!0),pG=EZ});var b2=(Z,q,{from:J,binary:X=!1,preserveNewlines:Q=!1}={})=>{let $=X||j0.has(q),Y=C2(Z,J),H=G7({subprocessStdout:Y,subprocess:Z,binary:$,shouldEncode:!0,encoding:q,preserveNewlines:Q});return Nj(H,Y,Z)},Nj=async function*(Z,q,J){try{yield*Z}finally{if(q.readable)q.destroy();await J}};var PZ=B(()=>{h1();j1();K7()});import{finished as xj}from"node:stream/promises";var i6=async(Z,q,J,{isSameDirection:X,stopOnExit:Q=!1}={})=>{let $=Ej(Z,J),Y=new AbortController;try{await Promise.race([...Q?[J.exitPromise]:[],xj(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!$.stdinCleanedUp)Cj(H,q,J,X)}finally{Y.abort()}},Ej=(Z,{originalStreams:q,subprocess:J})=>{let[X]=q,Q={stdinCleanedUp:!1};if(Z===X)Pj(Z,J,Q);return Q},Pj=(Z,q,J)=>{let{_destroy:X}=Z;Z._destroy=(...Q)=>{vj(q,J),X.call(Z,...Q)}},vj=({exitCode:Z,signalCode:q},J)=>{if(Z!==null||q!==null)J.stdinCleanedUp=!0},Cj=(Z,q,J,X)=>{if(!yj(Z,q,J,X))throw Z},yj=(Z,q,J,X=!0)=>{if(J.propagating)return cG(Z)||h2(Z);return J.propagating=!0,vZ(J,q)===X?cG(Z):h2(Z)},vZ=({fileDescriptors:Z},q)=>q!=="all"&&Z[q].direction==="input",h2=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",cG=(Z)=>Z?.code==="EPIPE";var a6=()=>{};import{finished as lG}from"node:stream/promises";var CZ=async(Z)=>{if(Z===void 0)return;try{await yZ(Z)}catch{}},nG=async(Z)=>{if(Z===void 0)return;try{await SZ(Z)}catch{}},yZ=async(Z)=>{await lG(Z,{cleanup:!0,readable:!1,writable:!0})},SZ=async(Z)=>{await lG(Z,{cleanup:!0,readable:!0,writable:!1})},U7=async(Z,q)=>{if(await Z,q)throw q},W7=(Z,q,J)=>{if(J&&!h2(J))Z.destroy(J);else if(q)Z.destroy()};var bZ=B(()=>{a6()});import{Readable as Sj}from"node:stream";import{callbackify as bj}from"node:util";var V7=({subprocess:Z,concurrentStreams:q,encoding:J},{from:X,binary:Q=!0,preserveNewlines:$=!0}={})=>{let Y=Q||j0.has(J),{subprocessStdout:H,waitReadableDestroy:K}=hZ(Z,X,q),{readableEncoding:U,readableObjectMode:W,readableHighWaterMark:V}=fZ(H,Y),{read:L,onStdoutDataDone:z}=gZ({subprocessStdout:H,subprocess:Z,binary:Y,encoding:J,preserveNewlines:$}),_=new Sj({read:L,destroy:bj(uZ.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:K})),highWaterMark:V,objectMode:W,encoding:U});return mZ({subprocessStdout:H,onStdoutDataDone:z,readable:_,subprocess:Z}),_},hZ=(Z,q,J)=>{let X=C2(Z,q),Q=l6(J,X,"readableDestroy");return{subprocessStdout:X,waitReadableDestroy:Q}},fZ=({readableEncoding:Z,readableObjectMode:q,readableHighWaterMark:J},X)=>X?{readableEncoding:Z,readableObjectMode:q,readableHighWaterMark:J}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:EZ},gZ=({subprocessStdout:Z,subprocess:q,binary:J,encoding:X,preserveNewlines:Q})=>{let $=n0(),Y=G7({subprocessStdout:Z,subprocess:q,binary:J,shouldEncode:!J,encoding:X,preserveNewlines:Q});return{read(){hj(this,Y,$)},onStdoutDataDone:$}},hj=async(Z,q,J)=>{try{let{value:X,done:Q}=await q.next();if(Q)J.resolve();else Z.push(X)}catch{}},mZ=async({subprocessStdout:Z,onStdoutDataDone:q,readable:J,subprocess:X,subprocessStdin:Q})=>{try{if(await SZ(Z),await X,await CZ(Q),await q,J.readable)J.push(null)}catch($){await CZ(Q),iG(J,await fj(X,$))}},fj=async(Z,q)=>{if(q.code!=="ERR_STREAM_PREMATURE_CLOSE")return q;try{await Z}catch(J){return J}return q},uZ=async({subprocessStdout:Z,subprocess:q,waitReadableDestroy:J},X)=>{if(!await S2(J,q))return;iG(Z,X),await U7(q,X)},iG=(Z,q)=>{W7(Z,Z.readable,q)};var B7=B(()=>{h1();j1();K7();w2();n6();bZ()});import{Readable as gj,Writable as mj,Duplex as uj}from"node:stream";var L7=(Z,q)=>gj.toWeb(Z.readable(q)),aG=(Z,q)=>mj.toWeb(Z.writable(q)),oG=(Z,q)=>uj.toWeb(Z.duplex(q));var pZ=()=>{};var rG=({source:Z,sourcePromise:q,boundOptions:J,createNested:X},...Q)=>{let $=J8(),{destination:Y,destinationStream:H,destinationError:K,from:U,unpipeSignal:W}=pj(J,X,Q),{sourceStream:V,sourceError:L}=cj(Z,U),{options:z,fileDescriptors:_}=i0.get(Z);return{sourcePromise:q,sourceStream:V,sourceOptions:z,sourceError:L,destination:Y,destinationStream:H,destinationError:K,unpipeSignal:W,fileDescriptors:_,startTime:$}},pj=(Z,q,J)=>{try{let{destination:X,pipeOptions:{from:Q,to:$,unpipeSignal:Y}={}}=dj(Z,q,...J),H=l8(X,$);return{destination:X,destinationStream:H,from:Q,unpipeSignal:Y}}catch(X){return{destinationError:X}}},dj=(Z,q,J,...X)=>{if(Array.isArray(J))return{destination:q(sG,Z)(J,...X),pipeOptions:Z};if(typeof J==="string"||J instanceof URL||J3(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[Q,$,Y]=l4(J,...X);return{destination:q(sG)(Q,$,Y),pipeOptions:Y}}if(i0.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:X[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${J}`)},sG=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),cj=(Z,q)=>{try{return{sourceStream:C2(Z,q)}}catch(J){return{sourceError:J}}};var tG=B(()=>{Q3();X8();j1();F2()});var ZK=({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:X,fileDescriptors:Q,sourceOptions:$,startTime:Y})=>{let H=lj({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:X});if(H!==void 0)throw dZ({error:H,fileDescriptors:Q,sourceOptions:$,startTime:Y})},lj=({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:X})=>{if(q!==void 0&&X!==void 0)return X;if(X!==void 0)return IZ(Z),X;if(q!==void 0)return jZ(J),q},dZ=({error:Z,fileDescriptors:q,sourceOptions:J,startTime:X})=>E2({error:Z,command:eG,escapedCommand:eG,fileDescriptors:q,options:J,startTime:X,isSync:!1}),eG="source.pipe(destination)";var cZ=B(()=>{S6();Q7()});var qK=async(Z)=>{let[{status:q,reason:J,value:X=J},{status:Q,reason:$,value:Y=$}]=await Z;if(!Y.pipedFrom.includes(X))Y.pipedFrom.push(X);if(Q==="rejected")throw Y;if(q==="rejected")throw X;return Y};var JK=()=>{};import{finished as nj}from"node:stream/promises";var XK=(Z,q,J)=>{let X=z7.has(q)?aj(Z,q):ij(Z,q);return b1(Z,sj,J.signal),b1(q,rj,J.signal),oj(q),X},ij=(Z,q)=>{let J=c1([Z]);return y2(J,q),z7.set(q,J),J},aj=(Z,q)=>{let J=z7.get(q);return J.add(Z),J},oj=async(Z)=>{try{await nj(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}z7.delete(Z)},z7,sj=2,rj=1;var QK=B(()=>{X7();z8();Q7();z7=new WeakMap});import{aborted as tj}from"node:util";var $K=(Z,q)=>Z===void 0?[]:[ej(Z,q)],ej=async(Z,{sourceStream:q,mergedStream:J,fileDescriptors:X,sourceOptions:Q,startTime:$})=>{await tj(Z,q),await J.remove(q);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw dZ({error:Y,fileDescriptors:X,sourceOptions:Q,startTime:$})};var YK=B(()=>{cZ()});var _7=(Z,...q)=>{if(e(q[0]))return _7.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...q[0]}});let{destination:J,...X}=rG(Z,...q),Q=new AbortController,$=VI({...X,destination:J,pipeFailureController:Q});return $.pipe=_7.bind(void 0,{...Z,source:J,sourcePromise:$,boundOptions:{}}),ZI($,J,Q.signal),$},ZI=(Z,q,J)=>{if(q===void 0)return;qI(Z,q),$I(Z,q,J)},qI=(Z,q)=>{let J=i0.get(q);i0.set(Z,J),Z.stdio=q.stdio,Z.all=q.all;let{options:{encoding:X}}=J,Q=H7();Z[Symbol.asyncIterator]=b2.bind(void 0,Z,X,{}),Z.iterable=b2.bind(void 0,Z,X),Z.readable=XI.bind(void 0,Z,{subprocess:Z,concurrentStreams:Q,encoding:X}),Z.readableStream=L7.bind(void 0,Z),JI(Z,q)},JI=(Z,q)=>{if(q.all===void 0){Z.all=void 0;return}Object.defineProperty(Z,"all",{get(){HK(Z,q.all);let J=Z.readable({from:"all"});return HK(Z,J),J},enumerable:!0,configurable:!0})},HK=(Z,q)=>{Object.defineProperty(Z,"all",{value:q,writable:!0,enumerable:!0,configurable:!0})},XI=(Z,q,...J)=>{let X=V7(q,...J);return QI(Z,X),X},QI=async(Z,q)=>{try{await Z}catch(J){q.destroy(J)}},$I=(Z,q,J)=>{Z.sendMessage=q.sendMessage,Z.getOneMessage=YI.bind(void 0,q,J),Z.getEachMessage=KI.bind(void 0,Z,q,J)},YI=(Z,q,...J)=>{let X=new AbortController,Q=Z.getOneMessage(...GK(J,X.signal,_Z));return HI(q,Q,X)},HI=async(Z,q,J)=>{try{return await Promise.race([q,GI(Z,J.signal)])}finally{J.abort()}},GI=(Z,q)=>new Promise((J,X)=>{if(Z.aborted){X(Z.reason);return}Z.addEventListener("abort",()=>{X(Z.reason)},{once:!0,signal:q})}),KI=(Z,q,J,...X)=>{let Q=new AbortController,$=q.getEachMessage(...GK(X,Q.signal,MZ));return WI(J,Q),UI(Z,$,Q)},UI=async function*(Z,q,J){try{yield*q}finally{J.abort(),await Z}},GK=(Z,q,J)=>{if(Z[0]===null)return Z;let[X]=Z;return[{...X,[J]:{signal:q,shouldAwait:!1}}]},WI=(Z,q)=>{if(Z.aborted){q.abort();return}Z.addEventListener("abort",()=>{q.abort()},{once:!0,signal:q.signal})},VI=async({sourcePromise:Z,sourceStream:q,sourceOptions:J,sourceError:X,destination:Q,destinationStream:$,destinationError:Y,unpipeSignal:H,fileDescriptors:K,startTime:U,pipeFailureController:W})=>{let V=new AbortController;try{let L=BI(Z,Q);ZK({sourceStream:q,sourceError:X,destinationStream:$,destinationError:Y,fileDescriptors:K,sourceOptions:J,startTime:U});let z=XK(q,$,V);return await Promise.race([qK(L),...$K(H,{sourceStream:q,mergedStream:z,sourceOptions:J,fileDescriptors:K,startTime:U})])}catch(L){throw W.abort(L),L}finally{V.abort()}},BI=(Z,q)=>Promise.allSettled([Z,q]);var KK=B(()=>{q1();j1();n6();PZ();B7();pZ();RZ();q7();tG();cZ();JK();QK();YK()});import{setImmediate as LI}from"node:timers/promises";var UK=async({stream:Z,onStreamEnd:q,fdNumber:J,encoding:X,buffer:Q,maxBuffer:$,lines:Y,allMixed:H,stripFinalNewline:K,verboseInfo:U,streamInfo:W})=>{let V=zI({stream:Z,onStreamEnd:q,fdNumber:J,encoding:X,allMixed:H,verboseInfo:U,streamInfo:W});if(!Q){await Promise.all([_I(Z),V]);return}let L=XZ(K,J),z=xZ({stream:Z,onStreamEnd:q,lines:Y,encoding:X,stripFinalNewline:L,allMixed:H}),[_]=await Promise.all([RI({stream:Z,iterable:z,fdNumber:J,encoding:X,maxBuffer:$,lines:Y}),V]);return _},zI=async({stream:Z,onStreamEnd:q,fdNumber:J,encoding:X,allMixed:Q,verboseInfo:$,streamInfo:{fileDescriptors:Y}})=>{if(!Z7({stdioItems:Y[J]?.stdioItems,encoding:X,verboseInfo:$,fdNumber:J}))return;let H=xZ({stream:Z,onStreamEnd:q,lines:!0,encoding:X,stripFinalNewline:!0,allMixed:Q});await bH(H,Z,J,$)},_I=async(Z)=>{if(await LI(),Z.readableFlowing===null)Z.resume()},RI=async({stream:Z,stream:{readableObjectMode:q},iterable:J,fdNumber:X,encoding:Q,maxBuffer:$,lines:Y})=>{try{if(q||Y)return await C8(J,{maxBuffer:$});if(Q==="buffer")return new Uint8Array(await y8(J,{maxBuffer:$}));return await b8(J,{maxBuffer:$})}catch(H){return WK(zY({error:H,stream:Z,readableObjectMode:q,lines:Y,encoding:Q,fdNumber:X}))}},lZ=async(Z)=>{try{return await Z}catch(q){return WK(q)}},WK=({bufferedData:Z})=>dQ(Z)?new Uint8Array(Z):Z;var nZ=B(()=>{h8();T0();WZ();K7();u1();g6()});var VK=({subprocess:Z,encoding:q,buffer:J,maxBuffer:X,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((K,U)=>iZ({stream:K,fdNumber:U,encoding:q,buffer:J[U],maxBuffer:X[U],lines:Q[U],allMixed:!1,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})),iZ=async({stream:Z,fdNumber:q,encoding:J,buffer:X,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:U})=>{if(!Z)return;let W=i6(Z,q,U);if(vZ(U,q)){await W;return}let[V]=await Promise.all([UK({stream:Z,onStreamEnd:W,fdNumber:q,encoding:J,buffer:X,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:U}),W]);return V};var aZ=B(()=>{nZ();a6()});var BK=({stdout:Z,stderr:q},{all:J})=>J&&(Z||q)?c1([Z,q].filter(Boolean)):void 0,LK=({subprocess:Z,all:q,encoding:J,buffer:X,maxBuffer:Q,lines:$,stripFinalNewline:Y,verboseInfo:H,streamInfo:K})=>iZ({...MI(Z,q,X),fdNumber:"all",encoding:J,maxBuffer:Q[1]+Q[2],lines:$[1]||$[2],allMixed:FI(Z,q),stripFinalNewline:Y,verboseInfo:H,streamInfo:K}),MI=({stdout:Z,stderr:q},J,[,X,Q])=>{let $=X||Q;if(!$)return{stream:J,buffer:$};if(!X)return{stream:q,buffer:$};if(!Q)return{stream:Z,buffer:$};return{stream:J,buffer:$}},FI=({stdout:Z,stderr:q},J)=>J&&Z&&q&&Z.readableObjectMode!==q.readableObjectMode;var oZ=B(()=>{X7();aZ()});var zK=(Z)=>A2(Z,"ipc"),_K=(Z,q)=>{let J=q8(Z);c0({type:"ipc",verboseMessage:J,fdNumber:"ipc",verboseInfo:q})};var RK=B(()=>{T2();F1()});var MK=async({subprocess:Z,buffer:q,maxBuffer:J,ipc:X,ipcOutput:Q,verboseInfo:$})=>{if(!X)return Q;let Y=zK($),H=Q1(q,"ipc"),K=Q1(J,"ipc");for await(let U of FZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:X,shouldAwait:!1,reference:!0})){if(H)_Y(Z,Q,K),Q.push(U);if(Y)_K(U,$)}return Q},FK=async(Z,q)=>{return await Promise.allSettled([Z]),q};var DK=B(()=>{u1();RK();$1();q7()});import{once as DI}from"node:events";var AK=async({subprocess:Z,kill:q,all:J,options:{encoding:X,buffer:Q,maxBuffer:$,lines:Y,timeoutDuration:H,cancelSignal:K,gracefulCancel:U,forceKillAfterDelay:W,stripFinalNewline:V,ipc:L,ipcInput:z},context:_,verboseInfo:R,fileDescriptors:M,originalStreams:F,onInternalError:k,controller:D})=>{let O=dH(Z,_),T={originalStreams:F,fileDescriptors:M,subprocess:Z,exitPromise:O,propagating:!1},j=VK({subprocess:Z,encoding:X,buffer:Q,maxBuffer:$,lines:Y,stripFinalNewline:V,verboseInfo:R,streamInfo:T}),A=LK({subprocess:Z,all:J,encoding:X,buffer:Q,maxBuffer:$,lines:Y,stripFinalNewline:V,verboseInfo:R,streamInfo:T}),b=[],w=MK({subprocess:Z,buffer:Q,maxBuffer:$,ipc:L,ipcOutput:b,verboseInfo:R}),x=AI(F,Z,T),P=TI(M,T);try{return await Promise.race([Promise.all([{},lH(O),Promise.all(j),A,w,y9(Z,z,L),...x,...P]),k,jI(Z,D),...x9(q,H,_,D),...o$({kill:q,cancelSignal:K,gracefulCancel:U,context:_,controller:D}),...k9({subprocess:Z,kill:q,cancelSignal:K,gracefulCancel:U,forceKillAfterDelay:W,context:_,controller:D})])}catch(f){return _.terminationReason??="other",Promise.all([{error:f},O,Promise.all(j.map((i)=>lZ(i))),lZ(A),FK(w,b),Promise.allSettled(x),Promise.allSettled(P)])}},AI=(Z,q,J)=>Z.map((X,Q)=>X===q.stdio[Q]?void 0:i6(X,Q,J)),TI=(Z,q)=>Z.flatMap(({stdioItems:J},X)=>J.filter(({value:Q,stream:$=Q})=>f0($,{checkOpen:!1})&&!b0($)).map(({type:Q,value:$,stream:Y=$})=>i6(Y,X,q,{isSameDirection:x0.has(Q),stopOnExit:Q==="native"}))),jI=async(Z,{signal:q})=>{let[J]=await DI(Z,"error",{signal:q});throw J};var TK=B(()=>{m1();x3();D3();N3();X1();L0();nZ();DK();P3();oZ();aZ();LZ();a6()});import{Writable as II}from"node:stream";import{callbackify as jK}from"node:util";var IK=({subprocess:Z,concurrentStreams:q},{to:J}={})=>{let{subprocessStdin:X,waitWritableFinal:Q,waitWritableDestroy:$}=sZ(Z,J,q),Y=new II({...rZ(X,Z,Q),destroy:jK(eZ.bind(void 0,{subprocessStdin:X,subprocess:Z,waitWritableFinal:Q,waitWritableDestroy:$})),highWaterMark:X.writableHighWaterMark,objectMode:X.writableObjectMode});return tZ(X,Y,void 0,Z),Y},sZ=(Z,q,J)=>{let X=l8(Z,q),Q=l6(J,X,"writableFinal"),$=l6(J,X,"writableDestroy");return{subprocessStdin:X,waitWritableFinal:Q,waitWritableDestroy:$}},rZ=(Z,q,J)=>({write:OI.bind(void 0,Z),final:jK(wI.bind(void 0,Z,q,J))}),OI=(Z,q,J,X)=>{if(Z.write(q,J))X();else Z.once("drain",X)},wI=async(Z,q,J)=>{if(!await S2(J,q))return;if(Z.writable)Z.end();await q},tZ=async(Z,q,J,X)=>{try{if(await yZ(Z),await X,q.writable)q.end()}catch(Q){await nG(J),OK(q,await kI(X,Q))}},kI=async(Z,q)=>{if(!NI(q))return q;try{await Z}catch(J){return J}return q},NI=(Z)=>Z===void 0||h2(Z),eZ=async({subprocessStdin:Z,subprocess:q,waitWritableFinal:J,waitWritableDestroy:X},Q)=>{if(await S2(J,q),await S2(X,q))OK(Z,Q),await U7(q,Q)},OK=(Z,q)=>{W7(Z,Z.writable,q)};var Zq=B(()=>{j1();a6();n6();bZ()});import{Duplex as xI}from"node:stream";import{callbackify as EI}from"node:util";var wK=({subprocess:Z,concurrentStreams:q,encoding:J},{from:X,to:Q,binary:$=!0,preserveNewlines:Y=!0}={})=>{let H=$||j0.has(J),{subprocessStdout:K,waitReadableDestroy:U}=hZ(Z,X,q),{subprocessStdin:W,waitWritableFinal:V,waitWritableDestroy:L}=sZ(Z,Q,q),{readableEncoding:z,readableObjectMode:_,readableHighWaterMark:R}=fZ(K,H),{read:M,onStdoutDataDone:F}=gZ({subprocessStdout:K,subprocess:Z,binary:H,encoding:J,preserveNewlines:Y}),k=new xI({read:M,...rZ(W,Z,V),destroy:EI(PI.bind(void 0,{subprocessStdout:K,subprocessStdin:W,subprocess:Z,waitReadableDestroy:U,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:R,writableHighWaterMark:W.writableHighWaterMark,readableObjectMode:_,writableObjectMode:W.writableObjectMode,encoding:z});return mZ({subprocessStdout:K,onStdoutDataDone:F,readable:k,subprocess:Z,subprocessStdin:W}),tZ(W,k,K,Z),k},PI=async({subprocessStdout:Z,subprocessStdin:q,subprocess:J,waitReadableDestroy:X,waitWritableFinal:Q,waitWritableDestroy:$},Y)=>{await Promise.all([uZ({subprocessStdout:Z,subprocess:J,waitReadableDestroy:X},Y),eZ({subprocessStdin:q,subprocess:J,waitWritableFinal:Q,waitWritableDestroy:$},Y)])};var kK=B(()=>{h1();B7();Zq()});var NK=(Z,{encoding:q})=>{let J=H7();Z.readable=V7.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:q}),Z.writable=IK.bind(void 0,{subprocess:Z,concurrentStreams:J}),Z.duplex=wK.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:q}),Z.readableStream=L7.bind(void 0,Z),Z.writableStream=aG.bind(void 0,Z),Z.transformStream=oG.bind(void 0,Z),Z.iterable=b2.bind(void 0,Z,q),Z[Symbol.asyncIterator]=b2.bind(void 0,Z,q,{})};var xK=B(()=>{n6();B7();Zq();kK();pZ();PZ()});var EK=(Z,q)=>Object.assign(Z,q);var PK=()=>{};import{setMaxListeners as vI}from"node:events";import{spawn as CI}from"node:child_process";var vK=(Z,q,J,X)=>{let{file:Q,commandArguments:$,command:Y,escapedCommand:H,startTime:K,verboseInfo:U,options:W,fileDescriptors:V}=yI(Z,q,J),{subprocess:L,promise:z,kill:_,all:R,convertedStreams:M}=bI({file:Q,commandArguments:$,options:W,startTime:K,verboseInfo:U,command:Y,escapedCommand:H,fileDescriptors:V}),F=hI({promise:z,nodeChildProcess:L,kill:_,all:R,convertedStreams:M,options:W});return F.pipe=_7.bind(void 0,{source:F,sourcePromise:z,boundOptions:{},createNested:X}),i0.set(F,{options:W,fileDescriptors:V}),F},yI=(Z,q,J)=>{let{command:X,escapedCommand:Q,startTime:$,verboseInfo:Y}=Q8(Z,q,J),{file:H,commandArguments:K,options:U}=k8(Z,q,J),W=SI(U),V=_G(W,Y);return{file:H,commandArguments:K,command:X,escapedCommand:Q,startTime:$,verboseInfo:Y,options:W,fileDescriptors:V}},SI=({timeout:Z,signal:q,...J})=>{if(q!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...J,timeoutDuration:Z}},bI=({file:Z,commandArguments:q,options:J,startTime:X,verboseInfo:Q,command:$,escapedCommand:Y,fileDescriptors:H})=>{let K;try{K=CI(...N8(Z,q,PG(J)))}catch(M){return GG({error:M,command:$,escapedCommand:Y,fileDescriptors:H,options:J,startTime:X,verboseInfo:Q})}let U=new AbortController;vI(1/0,U.signal);let W=[...K.stdio];kG(K,H,U),A9(K,J);let V={},L=n0(),z=i$.bind(void 0,{kill:vG(K,J),options:J,onInternalError:L,context:V,controller:U});mG(z,J,U);let _=BK(K,J),R=gI({subprocess:K,kill:z,all:_,options:J,startTime:X,verboseInfo:Q,fileDescriptors:H,originalStreams:W,command:$,escapedCommand:Y,context:V,onInternalError:L,controller:U});return{subprocess:K,promise:R,kill:z,all:_}},hI=({promise:Z,nodeChildProcess:q,kill:J,all:X,convertedStreams:Q,options:$})=>{let Y=EK(Z,fI(q,X));if(Y.kill=J??Y.kill,Q===void 0)NK(Y,$);else Object.assign(Y,Q);return qG(Y,q,$),Y},fI=(Z,q)=>({nodeChildProcess:Z,pid:Z.pid,stdin:Z.stdin,stdout:Z.stdout,stderr:Z.stderr,stdio:Z.stdio,all:q,kill:Z.kill.bind(Z)}),gI=async({subprocess:Z,kill:q,all:J,options:X,startTime:Q,verboseInfo:$,fileDescriptors:Y,originalStreams:H,command:K,escapedCommand:U,context:W,onInternalError:V,controller:L})=>{let[z,[_,R],M,F,k]=await AK({subprocess:Z,kill:q,all:J,options:X,context:W,verboseInfo:$,fileDescriptors:Y,originalStreams:H,onInternalError:V,controller:L});L.abort(),V.resolve();let D=M.map((j,A)=>G1(j,X,A)),O=G1(F,X,"all"),T=mI({errorInfo:z,exitCode:_,signal:R,stdio:D,all:O,ipcOutput:k,context:W,options:X,command:K,escapedCommand:U,startTime:Q});return P2(T,$,X)},mI=({errorInfo:Z,exitCode:q,signal:J,stdio:X,all:Q,ipcOutput:$,context:Y,options:H,command:K,escapedCommand:U,startTime:W})=>("error"in Z)?y6({error:Z.error,command:K,escapedCommand:U,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof Y1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:q,signal:J,stdio:X,all:Q,ipcOutput:$,options:H,startTime:W,isSync:!1}):g8({command:K,escapedCommand:U,stdio:X,all:Q,ipcOutput:$,options:H,startTime:W});var CK=B(()=>{h8();B3();f3();j1();g3();DZ();O6();S6();m8();VG();RG();g6();NG();V8();CG();uG();KK();oZ();TK();xK();w2();PK()});var R7=(Z,q)=>{let J={__proto__:null,...Z},X=Object.fromEntries(Object.entries(q).map(([Q,$])=>[Q,uI(Q,J[Q],$)]));return{...J,...X}},uI=(Z,q,J)=>{if(pI.has(Z)&&e(q)&&e(J))return{...q,...J};return J},pI;var yK=B(()=>{q1();$1();pI=new Set(["env",...K3])});var f2=(Z,q,J,X)=>{let Q=(Y,H,K)=>f2(Y,H,J,K),$=(...Y)=>dI({mapArguments:Z,deepOptions:J,boundOptions:q,setBoundExeca:X,createNested:Q},...Y);if(X!==void 0)X($,Q,q);return $},dI=({mapArguments:Z,deepOptions:q={},boundOptions:J={},setBoundExeca:X,createNested:Q},$,...Y)=>{if(e($))return Q(Z,R7(J,$),X);let{file:H,commandArguments:K,options:U,isSync:W}=cI({mapArguments:Z,firstArgument:$,nextArguments:Y,deepOptions:q,boundOptions:J});return W?aH(H,K,U):vK(H,K,U,Q)},cI=({mapArguments:Z,firstArgument:q,nextArguments:J,deepOptions:X,boundOptions:Q})=>{let $=oQ(q)?sQ(q,J):[q,...J],[Y,H,K]=l4(...$),U=R7(R7(X,Q),K),{options:W=U,isSync:V=!1}=Z({options:U});return{file:Y,commandArguments:H,options:W,isSync:V}};var SK=B(()=>{q1();Q3();rQ();oH();CK();yK()});var bK=(Z,q,J)=>{Z.sync=q(lI,J),Z.s=Z.sync},hK=({options:Z})=>fK(Z),lI=({options:Z})=>({...fK(Z),isSync:!0}),fK=(Z)=>({options:{...nI(Z),...Z}}),nI=({input:Z,inputFile:q,stdio:J})=>Z===void 0&&q===void 0&&J===void 0?{stdin:"inherit"}:{},gK;var mK=B(()=>{gK={preferLocal:!0}});var qq,E0,Zc,qc,Jc,Xc,Qc,$c;var g2=B(()=>{SK();E3();mK();DZ();qq=f2(()=>({})),E0=f2(()=>({isSync:!0})),Zc=f2(P9),qc=f2(hK,{},gK,bK),{sendMessage:Jc,getOneMessage:Xc,getEachMessage:Qc,getCancelSignal:$c}=JG()});import{execSync as iI}from"child_process";function p2(Z,q){let X=[];try{const J=m2(X,M7`execSync: ${Z.slice(0,100)}`,0);return iI(Z,q)}catch(Q){var $=Q,Y=1}finally{u2(X,$,Y)}}var Jq=B(()=>{R0()});async function aI(Z){if(process.platform==="win32"){let J=await qq(`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 qq(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(q.exitCode!==0||!q.stdout)return null;return q.stdout.trim()}function oI(Z){if(process.platform==="win32")try{return p2(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return p2(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var Xq,uK,F7;var D7=B(()=>{g2();Jq();Xq=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,uK=Xq?async(Z)=>Xq(Z):aI,F7=Xq??oI});import{createHash as sI}from"crypto";import{readFileSync as Qq,realpathSync as pK,statSync as dK}from"fs";import{open as rI,readdir as tI,readFile as eI,realpath as cK,stat as sK}from"fs/promises";import{basename as ZO,dirname as $q,join as F0,resolve as T7,sep as lK}from"path";function qO(){function Z(q){let J=nK(q);return J===rK?null:J}return Z.cache=nK.cache,Z}function JO(){function Z(q){let J=R2(q);if(!J)return null;return Yq(J)}return Z.cache=Yq.cache,Z}function XO(Z){let q=new Set,J=[];for(let X of Z){if(!X||q.has(X))continue;q.add(X),J.push(X)}return J}function xc(Z,q){return XO([n1(Z),...q.map((J)=>n1(J))])}async function Ec(Z,q){let J=q?.maxDepth??3,X=q?.maxDirs??1500,Q=[],$=0,Y=async(K)=>{try{return await sK(F0(K,".git")),!0}catch{return!1}},H=async(K,U)=>{if(U>J||$>=X)return;let W;try{W=await tI(K,{withFileTypes:!0})}catch{return}for(let V of W){if($>=X)return;if(!V.isDirectory())continue;if(V.name.startsWith(".")||QO.has(V.name))continue;let L=F0(K,V.name);if($++,await Y(L)){Q.push(Yq(L.normalize("NFC")));continue}await H(L,U+1)}};return await H(Z,1),Q}function Pc(Z){return S0(Z)}async function vc(){let Z=t(),q=R2(Z);if(!q)return!1;try{let[J,X]=await Promise.all([cK(Z),cK(q)]);return J===X}catch{return Z===q}}function GO(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 X=q.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(X&&X[1]&&X[2]){let Q=X[1],$=X[2];if(_O(Q)&&$.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`${Q}/${$}`.toLowerCase()}return null}async function yc(){let Z=await Hq();if(!Z)return null;let q=GO(Z);if(!q)return null;return sI("sha256").update(q).digest("hex").substring(0,16)}async function gc(){try{let[Z,q,J,X,Q,$]=await Promise.all([YO(),HO(),Hq(),KO(),UO(),VO()]);return{commitHash:Z,branchName:q,remoteUrl:J,isHeadOnRemote:X,isClean:Q,worktreeCount:$}}catch(Z){return null}}async function mc(){let{parseGitRemote:Z}=await import("./detectRepository-1.1.2-qh9nf9kg.mjs"),q=await Hq();if(!q)return E("Local GitHub repo: unknown"),null;let J=Z(q);if(J&&J.host==="github.com"){let X=`${J.owner}/${J.name}`;return E(`Local GitHub repo: ${X}`),X}return E("Local GitHub repo: unknown"),null}async function LO(){let{stdout:Z,code:q}=await a(o(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(q===0&&Z.trim())return Z.trim();let{stdout:J,code:X}=await a(o(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(X===0){let $=J.match(/HEAD branch: (\S+)/);if($&&$[1])return`origin/${$[1]}`}let Q=["origin/main","origin/staging","origin/master"];for(let $ of Q){let{code:Y}=await a(o(),["rev-parse","--verify",$],{preserveOutputOnError:!1});if(Y===0)return $}return null}function zO(){return yQ()}async function A7(){let{stdout:Z,code:q}=await a(o(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),J=Z.trim();if(q!==0||!J)return[];let X=J.split(`
51
- `).filter(Boolean),Q=[],$=0;for(let Y of X){if(Q.length>=oK){E(`Untracked file capture: reached max file count (${oK})`);break}if(DQ(Y))continue;try{let K=(await sK(Y)).size;if(K>iK){E(`Untracked file capture: skipping ${Y} (exceeds ${iK} bytes)`);continue}if($+K>aK){E(`Untracked file capture: reached total size limit (${aK} bytes)`);break}if(K===0){Q.push({path:Y,content:""});continue}let U=Math.min(BO,K),W=await rI(Y,"r");try{let V=Buffer.alloc(U),{bytesRead:L}=await W.read(V,0,U,0),z=V.subarray(0,L);if(AQ(z))continue;let _;if(K<=U)_=z.toString("utf-8");else _=await eI(Y,"utf-8");Q.push({path:Y,content:_}),$+=K}finally{await W.close()}}catch(H){E(`Failed to read untracked file ${Y}: ${H}`)}}return Q}async function uc(){try{if(!await $O())return null;if(await zO()){E("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:z},_]=await Promise.all([a(o(),["diff","HEAD"]),A7()]);return{remote_base_sha:null,remote_base:null,patch:z||"",untracked_files:_,format_patch:null,head_sha:null,branch_name:null}}let q=await LO();if(!q){E("No remote found, using HEAD-only mode for issue");let[{stdout:z},_]=await Promise.all([a(o(),["diff","HEAD"]),A7()]);return{remote_base_sha:null,remote_base:null,patch:z||"",untracked_files:_,format_patch:null,head_sha:null,branch_name:null}}let{stdout:J,code:X}=await a(o(),["merge-base","HEAD",q],{preserveOutputOnError:!1});if(X!==0||!J.trim()){E("Merge-base failed, using HEAD-only mode for issue");let[{stdout:z},_]=await Promise.all([a(o(),["diff","HEAD"]),A7()]);return{remote_base_sha:null,remote_base:null,patch:z||"",untracked_files:_,format_patch:null,head_sha:null,branch_name:null}}let Q=J.trim(),[{stdout:$},Y,{stdout:H,code:K},{stdout:U},{stdout:W}]=await Promise.all([a(o(),["diff",Q]),A7(),a(o(),["format-patch",`${Q}..HEAD`,"--stdout"]),a(o(),["rev-parse","HEAD"]),a(o(),["rev-parse","--abbrev-ref","HEAD"])]),V=null;if(K===0&&H&&H.trim())V=H;let L=W?.trim();return{remote_base_sha:Q,remote_base:q,patch:$||"",untracked_files:Y,format_patch:V,head_sha:U?.trim()||null,branch_name:L&&L!=="HEAD"?L:null}}catch(Z){return S(Z),null}}function _O(Z){let q=Z.split(":")[0]??"";return q==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(q)}function pc(){let Z=N(),q=t(),J=F0(q,".git");try{let X=Z.statSync(J);if(X.isFile())return!1;if(X.isDirectory()){let Q=F0(J,"HEAD");try{if(Z.statSync(Q).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 rK,nK,R2,Yq,n1,QO,o,$O,tK=async(Z)=>{return R2(Z)!==null},YO=async()=>{return PQ()},HO=async(Z)=>{if(Z){let{stdout:q,code:J}=await i1(o(),["--no-optional-locks","rev-parse","--abbrev-ref","HEAD"],{cwd:Z,timeout:5000,preserveOutputOnError:!1});return J===0?q.trim():""}return EQ()},Cc=async()=>{return CQ()},Hq=async()=>{return vQ()},KO=async()=>{let{code:Z}=await a(o(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},Sc=async()=>{let{stdout:Z,code:q}=await a(o(),["--no-optional-locks","rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1,useCwd:!0});return q===0&&parseInt(Z.trim(),10)>0},bc=async(Z)=>{let q=["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{stdout:J,code:X}=Z?await i1(o(),q,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await a(o(),q,{preserveOutputOnError:!1,useCwd:!0});if(X!==0)return{ahead:0,behind:0};let Q=J.trim().split(/\s+/);if(Q.length!==2)return{ahead:0,behind:0};let $=parseInt(Q[0],10),Y=parseInt(Q[1],10);return{ahead:Number.isFinite(Y)?Y:0,behind:Number.isFinite($)?$:0}},UO=async(Z)=>{let q=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)q.push("-uno");let{stdout:J}=await a(o(),q,{preserveOutputOnError:!1});return J.trim().length===0},hc=async()=>{let{stdout:Z}=await a(o(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
52
- `).map((q)=>q.trim().split(" ",2)[1]?.trim()).filter((q)=>typeof q==="string")},WO=async(Z)=>{let q=["--no-optional-locks","status","--porcelain"],{stdout:J}=Z?await i1(o(),q,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await a(o(),q,{preserveOutputOnError:!1}),X=[],Q=[];return J.trim().split(`
53
- `).filter(($)=>$.length>0).forEach(($)=>{let Y=$.substring(0,2),H=$.substring(2).trim();if(Y==="??")Q.push(H);else if(H)X.push(H)}),{tracked:X,untracked:Q}},VO=async()=>{return SQ()},fc=async(Z)=>{try{let q=Z||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:J}=await WO();if(J.length>0){let{code:Q}=await a(o(),["add",...J],{preserveOutputOnError:!1});if(Q!==0)return!1}let{code:X}=await a(o(),["stash","push","--message",q],{preserveOutputOnError:!1});return X===0}catch(q){return!1}},iK=524288000,aK=5368709120,oK=20000,BO=65536;var M6=B(()=>{I1();TQ();Z1();K1();L6();j7();M0();bQ();k0();c4();D7();rK=Symbol("git-root-not-found"),nK=M1((Z)=>{let q=Date.now();H0("info","find_git_root_started");let J=T7(Z),X=J.substring(0,J.indexOf(lK)+1)||lK,Q=0;while(J!==X){try{let Y=F0(J,".git");Q++;let H=dK(Y);if(H.isDirectory()||H.isFile())return H0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:Q,found:!0}),J.normalize("NFC")}catch{}let $=$q(J);if($===J)break;J=$}try{let $=F0(X,".git");Q++;let Y=dK($);if(Y.isDirectory()||Y.isFile())return H0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:Q,found:!0}),X.normalize("NFC")}catch{}return H0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:Q,found:!1}),rK},(Z)=>Z,50),R2=qO();Yq=M1((Z)=>{try{let q=Qq(F0(Z,".git"),"utf-8").trim();if(!q.startsWith("gitdir:"))return Z;let J=T7(Z,q.slice(7).trim()),X=T7(J,Qq(F0(J,"commondir"),"utf-8").trim());if(T7($q(J))!==F0(X,"worktrees"))return Z;if(pK(Qq(F0(J,"gitdir"),"utf-8").trim())!==F0(pK(Z),".git"))return Z;if(ZO(X)!==".git")return X.normalize("NFC");return $q(X).normalize("NFC")}catch{return Z}},(Z)=>Z,50),n1=JO();QO=new Set(["node_modules",".git","dist","build","out","target","vendor","coverage",".next",".turbo",".cache",".venv","venv","__pycache__"]);o=u(()=>{return F7("git")||"git"}),$O=u(async()=>{let Z=Date.now();H0("info","is_git_check_started");let q=R2(t())!==null;return H0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:q}),q})});import{readdir as lc,readFile as RO}from"fs/promises";import{release as MO}from"os";var sc,g0,rc,tc;var d2=B(()=>{I1();M0();k0();sc=["macos","wsl"],g0=u(()=>{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){S(Z)}return"linux"}return"unknown"}catch(Z){return S(Z),"unknown"}}),rc=u(()=>{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){S(Z);return}}),tc=u(async()=>{if(process.platform!=="linux")return;let Z={linuxKernel:MO()};try{let q=await RO("/etc/os-release","utf8");for(let J of q.split(`
54
- `)){let X=J.match(/^(ID|VERSION_ID)=(.*)$/);if(X&&X[1]&&X[2]){let Q=X[2].replace(/^"|"$/g,"");if(X[1]==="ID")Z.linuxDistroId=Q;else Z.linuxDistroVersion=Q}}}catch{}return Z})});import*as c2 from"path";import*as eK from"path/win32";function Gq(Z){try{return p2(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function FO(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(Gq(J))return J}try{let J=p2(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
55
- `).filter(Boolean),X=t().toLowerCase();for(let Q of J){let $=c2.resolve(Q).toLowerCase();if(c2.dirname($).toLowerCase()===X||$.startsWith(X+c2.sep)){E(`Skipping potentially malicious executable in current directory: ${Q}`);continue}return Q}return null}catch{return null}}function Yl(){if(g0()==="windows"){let Z=DO();process.env.SHELL=Z,E(`Using bash path: "${Z}"`)}}var DO,Hl,ZU;var qU=B(()=>{I1();Z1();K1();Jq();c4();d2();DO=u(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(Gq(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=FO("git");if(Z){let q=eK.join(Z,"..","..","bin","bash.exe");if(Gq(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)}),Hl=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),ZU=M1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let q=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(q){let X=q[1].toUpperCase(),Q=Z.slice(("/cygdrive/"+q[1]).length);return X+":"+(Q||"\\").replace(/\//g,"\\")}let J=Z.match(/^\/([A-Za-z])(\/|$)/);if(J){let X=J[1].toUpperCase(),Q=Z.slice(2);return X+":"+(Q||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as JU}from"os";import{dirname as XU,isAbsolute as TO,join as jO,normalize as Kq,relative as IO,resolve as OO}from"path";function Wq(Z,q){let J=q??t()??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 X=Z.trim();if(!X)return Kq(J).normalize("NFC");if(X==="~")return JU().normalize("NFC");if(X.startsWith("~/"))return jO(JU(),X.slice(2)).normalize("NFC");let Q=X;if(g0()==="windows"&&X.match(/^\/[a-z]\//i))try{Q=ZU(X)}catch{Q=X}if(TO(Q))return Kq(Q).normalize("NFC");return OO(J,Q).normalize("NFC")}function zl(Z){let q=IO(t(),Z);return q.startsWith("..")?Z:q}function _l(Z){let q=Wq(Z);if(q.startsWith("\\\\")||q.startsWith("//"))return XU(q);try{if(N().statSync(q).isDirectory())return q}catch{}return XU(q)}function Rl(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function a1(Z){return Kq(Z).replace(/\\/g,"/")}var I7=B(()=>{Z1();M0();d2();qU();AO()});function kO(Z,q,J){if(J!==void 0&&!O7(Z[q],J)||J===void 0&&!(q in Z))$U(Z,q,J)}var o6;var Vq=B(()=>{wO();QU();o6=kO});function NO(Z){return function(q,J,X){var Q=-1,$=Object(q),Y=X(q),H=Y.length;while(H--){var K=Y[Z?H:++Q];if(J($[K],K,$)===!1)break}return q}}var YU;var HU=B(()=>{YU=NO});var xO,GU;var KU=B(()=>{HU();xO=YU(),GU=xO});function EO(Z){return w7(Z)&&k7(Z)}var VU;var BU=B(()=>{WU();UU();VU=EO});function fO(Z){if(!w7(Z)||LU(Z)!=CO)return!1;var q=zU(Z);if(q===null)return!0;var J=bO.call(q,"constructor")&&q.constructor;return typeof J=="function"&&J instanceof J&&_U.call(J)==hO}var CO="[object Object]",yO,SO,_U,bO,hO,RU;var MU=B(()=>{PO();vO();UU();yO=Function.prototype,SO=Object.prototype,_U=yO.toString,bO=SO.hasOwnProperty,hO=_U.call(Object);RU=fO});function gO(Z,q){if(q==="constructor"&&typeof Z[q]==="function")return;if(q=="__proto__")return;return Z[q]}var s6;var Bq=B(()=>{s6=gO});function uO(Z){return FU(Z,N7(Z))}var AU;var TU=B(()=>{mO();DU();AU=uO});function rO(Z,q,J,X,Q,$,Y){var H=s6(Z,J),K=s6(q,J),U=Y.get(K);if(U){o6(Z,J,U);return}var W=$?$(H,K,J+"",Z,q,Y):void 0,V=W===void 0;if(V){var L=Lq(K),z=!L&&IU(K),_=!L&&!z&&OU(K);if(W=K,L||z||_)if(Lq(H))W=H;else if(VU(H))W=kU(H);else if(z)V=!1,W=wU(K,!0);else if(_)V=!1,W=NU(K,!0);else W=[];else if(RU(K)||zq(K)){if(W=H,zq(H))W=AU(H);else if(!e0(H)||jU(H))W=xU(K)}else V=!1}if(V)Y.set(K,W),Q(W,K,X,$,Y),Y.delete(K);o6(Z,J,W)}var EU;var PU=B(()=>{Vq();iO();oO();aO();sO();cO();dO();BU();lO();pO();h4();MU();nO();Bq();TU();EU=rO});function CU(Z,q,J,X,Q){if(Z===q)return;GU(q,function($,Y){if(Q||(Q=new vU),e0($))EU(Z,q,Y,J,CU,X,Q);else{var H=X?X(s6(Z,Y),$,Y+"",Z,q,Q):void 0;if(H===void 0)H=$;o6(Z,Y,H)}},N7)}var yU;var SU=B(()=>{tO();Vq();KU();PU();h4();DU();Bq();yU=CU});function eO(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 bU;var hU=B(()=>{bU=eO});function Zw(Z,q,J){return q=fU(q===void 0?Z.length-1:q,0),function(){var X=arguments,Q=-1,$=fU(X.length-q,0),Y=Array($);while(++Q<$)Y[Q]=X[q+Q];Q=-1;var H=Array(q+1);while(++Q<q)H[Q]=X[Q];return H[q]=J(Y),bU(Z,this,H)}}var fU,gU;var mU=B(()=>{hU();fU=Math.max;gU=Zw});function qw(Z){return function(){return Z}}var uU;var pU=B(()=>{uU=qw});var Xw,cU;var lU=B(()=>{pU();Jw();dU();Xw=!_q?x7:function(Z,q){return _q(Z,"toString",{configurable:!0,enumerable:!1,value:uU(q),writable:!0})},cU=Xw});function Hw(Z){var q=0,J=0;return function(){var X=Yw(),Q=$w-(X-J);if(J=X,Q>0){if(++q>=Qw)return arguments[0]}else q=0;return Z.apply(void 0,arguments)}}var Qw=800,$w=16,Yw,nU;var iU=B(()=>{Yw=Date.now;nU=Hw});var Gw,aU;var oU=B(()=>{lU();iU();Gw=nU(cU),aU=Gw});function Kw(Z,q){return aU(gU(Z,q,x7),Z+"")}var sU;var rU=B(()=>{dU();mU();oU();sU=Kw});function Uw(Z,q,J){if(!e0(J))return!1;var X=typeof q;if(X=="number"?k7(J)&&f4(q,J.length):X=="string"&&(q in J))return O7(J[q],Z);return!1}var tU;var eU=B(()=>{QU();WU();HQ();h4();tU=Uw});function Ww(Z){return sU(function(q,J){var X=-1,Q=J.length,$=Q>1?J[Q-1]:void 0,Y=Q>2?J[2]:void 0;if($=Z.length>3&&typeof $=="function"?(Q--,$):void 0,Y&&tU(J[0],J[1],Y))$=Q<3?void 0:$,Q=1;q=Object(q);while(++X<Q){var H=J[X];if(H)Z(q,H,X,$)}return q})}var ZW;var qW=B(()=>{rU();eU();ZW=Ww});var Vw,U1;var JW=B(()=>{SU();qW();Vw=ZW(function(Z,q,J,X){yU(Z,q,J,X)}),U1=Vw});function Rq(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 Mq(Z){let q=0,J=0;for(let X=0;X<Z.length;X++)if(Z[X]===`
56
- `)if(X>0&&Z[X-1]==="\r")q++;else J++;return q>J?"CRLF":"LF"}function Bw(Z){let q=N(),{resolvedPath:J,isSymlink:X}=O1(q,Z);if(X)E(`Reading through symlink: ${Z} -> ${J}`);let Q=Rq(J),$=q.readFileSync(J,{encoding:Q}),Y=Mq($.slice(0,4096));return{content:$.replaceAll(`\r
57
- `,`
58
- `),encoding:Q,lineEndings:Y}}function W1(Z){return Bw(Z).content}var r6=B(()=>{K1();M0()});function P0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var E7=()=>{};import{join as Lw}from"path";function cn(Z){t6=Z}function ln(){t6=null,Fq=void 0}function nn(Z){return Fq=Z,Z}function _w(){return Lw(G0(),zw)}function Rw(){try{let Z=W1(_w()),q=Z0(P0(Z));if(!q||typeof q!=="object"||Array.isArray(q))return null;return q}catch{return null}}function P7(){if(Fq!==!0)return null;if(t6)return t6;let Z=Rw();if(Z)return t6=Z,e6(),Z;return null}var zw="remote-settings.json",t6=null,Fq;var QW=B(()=>{o0();r6();E7();XW();R0()});function on(Z,q){return Z.flatMap((J,X)=>X?[q(X),J]:[J])}function Dq(Z,q){let J=0;for(let X of Z)J+=+!!q(X);return J}function $W(Z){return[...new Set(Z)]}var Aq=()=>{};class YW{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 X=this.cache.get(Z);if(X&&X.mtime===J.mtimeMs)return{content:X.content,encoding:X.encoding};let Q=GW(Z),$=q.readFileSync(Z,{encoding:Q}).replaceAll(`\r
59
- `,`
60
- `);if(J.size<=this.maxEntryBytes){if(this.cache.set(Z,{content:$,encoding:Q,mtime:J.mtimeMs}),this.cache.size>this.maxCacheSize){let Y=this.cache.keys().next().value;if(Y)this.cache.delete(Y)}}return{content:$,encoding:Q}}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 Tq;var HW=B(()=>{v7();M0();Tq=new YW});import{chmodSync as Mw,writeFileSync as KW}from"fs";import{realpath as Fw,stat as LW}from"fs/promises";import{homedir as zW}from"os";import{basename as jq,dirname as C7,extname as UW,isAbsolute as Dw,join as l2,normalize as Aw,relative as _W,resolve as Tw,sep as Z4}from"path";async function zi(Z){try{return await LW(Z),!0}catch{return!1}}function _i(Z){try{return N().readFileSync(Z,{encoding:"utf8"})}catch(q){return S(q),null}}function Ri(Z){let q=N();return Math.floor(q.statSync(Z).mtimeMs)}async function Mi(Z){let q=await N().stat(Z);return Math.floor(q.mtimeMs)}function Fi(Z,q,J,X){let Q=q;if(X==="CRLF")Q=q.replaceAll(`\r
61
- `,`
62
- `).split(`
63
- `).join(`\r
64
- `);i2(Z,Q,{encoding:J}),Tq.invalidate(Z)}function GW(Z){try{let q=N(),{resolvedPath:J}=O1(q,Z);return Rq(J)}catch(q){if(BW(q))E(`detectFileEncoding failed for expected reason: ${q.code}`,{level:"debug"});else S(q);return"utf8"}}function Di(Z,q="utf8"){try{let J=N(),{resolvedPath:X}=O1(J,Z),{buffer:Q,bytesRead:$}=J.readSync(X,{length:4096}),Y=Q.toString(q,0,$);return Mq(Y)}catch(J){return S(J),"LF"}}function Ai(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(q)=>" ".repeat(q.length))}function Iw(Z){let q=Z?Wq(Z):void 0,J=q?_W(t(),q):void 0;return{absolutePath:q,relativePath:J}}function Ti(Z){let{relativePath:q}=Iw(Z);if(q&&!q.startsWith(".."))return q;let J=zW();if(Z.startsWith(J+Z4))return"~"+Z.slice(J.length);return Z}function ji(Z){let q=N();try{let J=C7(Z),X=jq(Z,UW(Z)),Y=q.readdirSync(J).filter((H)=>jq(H.name,UW(H.name))===X&&l2(J,H.name)!==Z)[0];if(Y)return Y.name;return}catch(J){if(!n2(J))S(J);return}}async function Oi(Z){let q=t(),J=C7(q),X=Z;try{let H=await Fw(C7(Z));X=l2(H,jq(Z))}catch{}let Q=J===Z4?Z4:J+Z4;if(!X.startsWith(Q)||X.startsWith(q+Z4)||X===q)return;let $=_W(J,X),Y=l2(q,$);try{return await LW(Y),Y}catch{return}}function Ow(){return!s1("tengu_compact_line_prefix_killswitch",!1)}function wi({content:Z,startLine:q}){if(!Z)return"";let J=Z.split(/\r?\n/);if(Ow())return J.map((X,Q)=>`${Q+q}→${X}`).join(`
65
- `);return J.map((X,Q)=>{let $=String(Q+q);if($.length>=6)return`${$}→${X}`;return`${$.padStart(6," ")}→${X}`}).join(`
66
- `)}function ki(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function Ni(Z){try{return N().isDirEmptySync(Z)}catch(q){return n2(q)}}function xi(Z){let{content:q}=Tq.readFile(Z);return q}function i2(Z,q,J={encoding:"utf-8"}){let X=N(),Q=Z;try{let K=X.readlinkSync(Z);Q=Dw(K)?K:Tw(C7(Z),K),E(`Writing through symlink: ${Z} -> ${Q}`)}catch{}let $=`${Q}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=X.statSync(Q).mode,H=!0,E(`Preserving file permissions: ${Y.toString(8)}`)}catch(K){if(!n2(K))throw K;if(J.mode!==void 0)Y=J.mode,E(`Setting permissions for new file: ${Y.toString(8)}`)}try{E(`Writing to temp file: ${$}`);let K={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)K.mode=J.mode;if(KW($,q,K),E(`Temp file written successfully, size: ${q.length} bytes`),H&&Y!==void 0)Mw($,Y),E("Applied original permissions to temp file");E(`Renaming ${$} to ${Q}`),X.renameSync($,Q),E(`File ${Q} written atomically`)}catch(K){E(`Failed to write file atomically: ${K}`,{level:"error"}),s0("tengu_atomic_write_error",{});try{E(`Cleaning up temp file: ${$}`),X.unlinkSync($)}catch(U){E(`Failed to clean up temp file: ${U}`)}E(`Falling back to non-atomic write for ${Q}`);try{let U={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)U.mode=J.mode;KW(Q,q,U),E(`File ${Q} written successfully with non-atomic fallback`)}catch(U){throw E(`Non-atomic write also failed: ${U}`),U}}}function Ei(){let Z=g0(),q=zW();if(Z==="macos")return l2(q,"Desktop");if(Z==="windows"){let X=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(X){let $=`/mnt/c${X.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=l2("/mnt/c/Users",Y.name,"Desktop");if(N().existsSync(H))return H}}catch(Q){S(Q)}}let J=l2(q,"Desktop");if(N().existsSync(J))return J;return q}function Pi(Z,q=jw){try{return N().statSync(Z).size<=q}catch{return!1}}function WW(Z){let q=Aw(Z);if(g0()==="windows")q=q.replace(/\//g,"\\").toLowerCase();return q}function vi(Z,q){return WW(Z)===WW(q)}var jw=262144,Ii="Note: your current working directory is";var v7=B(()=>{VW();Iq();Z1();K1();o1();r6();HW();M0();k0();I7();d2()});import{appendFile as ww,mkdir as kw,readFile as Nw,writeFile as xw}from"fs/promises";import{homedir as Ew}from"os";import{dirname as Pw,join as vw}from"path";async function Cw(Z,q){let{code:J}=await i1("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:q});return J===0}function yw(){return vw(Ew(),".config","git","ignore")}async function RW(Z,q=t()){try{if(!await tK(q))return;let J=`**/${Z}`,X=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await Cw(X,q))return;let Q=yw(),$=Pw(Q);await kw($,{recursive:!0});try{if((await Nw(Q,{encoding:"utf-8"})).includes(J))return;await ww(Q,`
67
- ${J}
68
- `)}catch(Y){if(W0(Y)==="ENOENT")await xw(Q,`${J}
69
- `,"utf-8");else throw Y}}catch(J){S(J)}}var MW=B(()=>{Z1();o1();j7();M6();k0()});function J4(Z,q=!1){let J=Z.length,X=0,Q="",$=0,Y=16,H=0,K=0,U=0,W=0,V=0;function L(D,O){let T=0,j=0;while(T<D||!O){let A=Z.charCodeAt(X);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;X++,T++}if(T<D)j=-1;return j}function z(D){X=D,Q="",$=0,Y=16,V=0}function _(){let D=X;if(Z.charCodeAt(X)===48)X++;else{X++;while(X<Z.length&&a2(Z.charCodeAt(X)))X++}if(X<Z.length&&Z.charCodeAt(X)===46)if(X++,X<Z.length&&a2(Z.charCodeAt(X))){X++;while(X<Z.length&&a2(Z.charCodeAt(X)))X++}else return V=3,Z.substring(D,X);let O=X;if(X<Z.length&&(Z.charCodeAt(X)===69||Z.charCodeAt(X)===101)){if(X++,X<Z.length&&Z.charCodeAt(X)===43||Z.charCodeAt(X)===45)X++;if(X<Z.length&&a2(Z.charCodeAt(X))){X++;while(X<Z.length&&a2(Z.charCodeAt(X)))X++;O=X}else V=3}return Z.substring(D,O)}function R(){let D="",O=X;while(!0){if(X>=J){D+=Z.substring(O,X),V=2;break}let T=Z.charCodeAt(X);if(T===34){D+=Z.substring(O,X),X++;break}if(T===92){if(D+=Z.substring(O,X),X++,X>=J){V=2;break}switch(Z.charCodeAt(X++)){case 34:D+='"';break;case 92:D+="\\";break;case 47:D+="/";break;case 98:D+="\b";break;case 102:D+="\f";break;case 110:D+=`
70
- `;break;case 114:D+="\r";break;case 116:D+="\t";break;case 117:let A=L(4,!0);if(A>=0)D+=String.fromCharCode(A);else V=4;break;default:V=5}O=X;continue}if(T>=0&&T<=31)if(q4(T)){D+=Z.substring(O,X),V=2;break}else V=6;X++}return D}function M(){if(Q="",V=0,$=X,K=H,W=U,X>=J)return $=J,Y=17;let D=Z.charCodeAt(X);if(Oq(D)){do X++,Q+=String.fromCharCode(D),D=Z.charCodeAt(X);while(Oq(D));return Y=15}if(q4(D)){if(X++,Q+=String.fromCharCode(D),D===13&&Z.charCodeAt(X)===10)X++,Q+=`
71
- `;return H++,U=X,Y=14}switch(D){case 123:return X++,Y=1;case 125:return X++,Y=2;case 91:return X++,Y=3;case 93:return X++,Y=4;case 58:return X++,Y=6;case 44:return X++,Y=5;case 34:return X++,Q=R(),Y=10;case 47:let O=X-1;if(Z.charCodeAt(X+1)===47){X+=2;while(X<J){if(q4(Z.charCodeAt(X)))break;X++}return Q=Z.substring(O,X),Y=12}if(Z.charCodeAt(X+1)===42){X+=2;let T=J-1,j=!1;while(X<T){let A=Z.charCodeAt(X);if(A===42&&Z.charCodeAt(X+1)===47){X+=2,j=!0;break}if(X++,q4(A)){if(A===13&&Z.charCodeAt(X)===10)X++;H++,U=X}}if(!j)X++,V=1;return Q=Z.substring(O,X),Y=13}return Q+=String.fromCharCode(D),X++,Y=16;case 45:if(Q+=String.fromCharCode(D),X++,X===J||!a2(Z.charCodeAt(X)))return Y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Q+=_(),Y=11;default:while(X<J&&F(D))X++,D=Z.charCodeAt(X);if($!==X){switch(Q=Z.substring($,X),Q){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return Q+=String.fromCharCode(D),X++,Y=16}}function F(D){if(Oq(D)||q4(D))return!1;switch(D){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function k(){let D;do D=M();while(D>=12&&D<=15);return D}return{setPosition:z,getPosition:()=>X,scan:q?k:M,getToken:()=>Y,getTokenValue:()=>Q,getTokenOffset:()=>$,getTokenLength:()=>X-$,getTokenStartLine:()=>K,getTokenStartCharacter:()=>$-W,getTokenError:()=>V}}function Oq(Z){return Z===32||Z===9}function q4(Z){return Z===10||Z===13}function a2(Z){return Z>=48&&Z<=57}var FW;var y7=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"})(FW||(FW={}))});var I0,wq,DW;var AW=B(()=>{I0=Array(20).fill(0).map((Z,q)=>{return" ".repeat(q)}),wq={" ":{"\n":Array(200).fill(0).map((Z,q)=>{return`
72
- `+" ".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
73
- `+" ".repeat(q)})},"\t":{"\n":Array(200).fill(0).map((Z,q)=>{return`
74
- `+"\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
75
- `+"\t".repeat(q)})}},DW=[`
76
- `,"\r",`\r
77
- `]});function kq(Z,q,J){let X,Q,$,Y,H;if(q){Y=q.offset,H=Y+q.length,$=Y;while($>0&&!X4(Z,$-1))$--;let T=H;while(T<Z.length&&!X4(Z,T))T++;Q=Z.substring($,T),X=bw(Q,J)}else Q=Z,X=0,$=0,Y=0,H=Z.length;let K=hw(J,Z),U=DW.includes(K),W=0,V=0,L;if(J.insertSpaces)L=I0[J.tabSize||4]??o2(I0[1],J.tabSize||4);else L="\t";let z=L==="\t"?"\t":" ",_=J4(Q,!1),R=!1;function M(){if(W>1)return o2(K,W)+o2(L,X+V);let T=L.length*(X+V);if(!U||T>wq[z][K].length)return K+o2(L,X+V);if(T<=0)return K;return wq[z][K][T]}function F(){let T=_.scan();W=0;while(T===15||T===14){if(T===14&&J.keepLines)W+=1;else if(T===14)W=1;T=_.scan()}return R=T===16||_.getTokenError()!==0,T}let k=[];function D(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&&W>0)D(o2(K,W),0,0);if(O!==17){let T=_.getTokenOffset()+$,j=L.length*X<20&&J.insertSpaces?I0[L.length*X]:o2(L,X);D(j,$,T)}while(O!==17){let T=_.getTokenOffset()+_.getTokenLength()+$,j=F(),A="",b=!1;while(W===0&&(j===12||j===13)){let x=_.getTokenOffset()+$;D(I0[1],T,x),T=_.getTokenOffset()+_.getTokenLength()+$,b=j===12,A=b?M():"",j=F()}if(j===2){if(O!==1)V--;if(J.keepLines&&W>0||!J.keepLines&&O!==1)A=M();else if(J.keepLines)A=I0[1]}else if(j===4){if(O!==3)V--;if(J.keepLines&&W>0||!J.keepLines&&O!==3)A=M();else if(J.keepLines)A=I0[1]}else{switch(O){case 3:case 1:if(V++,J.keepLines&&W>0||!J.keepLines)A=M();else A=I0[1];break;case 5:if(J.keepLines&&W>0||!J.keepLines)A=M();else A=I0[1];break;case 12:A=M();break;case 13:if(W>0)A=M();else if(!b)A=I0[1];break;case 6:if(J.keepLines&&W>0)A=M();else if(!b)A=I0[1];break;case 10:if(J.keepLines&&W>0)A=M();else if(j===6&&!b)A="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(J.keepLines&&W>0)A=M();else if((j===12||j===13)&&!b)A=I0[1];else if(j!==5&&j!==17)R=!0;break;case 16:R=!0;break}if(W>0&&(j===12||j===13))A=M()}if(j===17)if(J.keepLines&&W>0)A=M();else A=J.insertFinalNewline?K:"";let w=_.getTokenOffset()+$;D(A,T,w),O=j}return k}function o2(Z,q){let J="";for(let X=0;X<q;X++)J+=Z;return J}function bw(Z,q){let J=0,X=0,Q=q.tabSize||4;while(J<Z.length){let $=Z.charAt(J);if($===I0[1])X++;else if($==="\t")X+=Q;else break;J++}return Math.floor(X/Q)}function hw(Z,q){for(let J=0;J<q.length;J++){let X=q.charAt(J);if(X==="\r"){if(J+1<q.length&&q.charAt(J+1)===`
78
- `)return`\r
79
- `;return"\r"}else if(X===`
80
- `)return`
81
- `}return Z&&Z.eol||`
82
- `}function X4(Z,q){return`\r
83
- `.indexOf(Z.charAt(q))!==-1}var Nq=B(()=>{y7();AW()});function TW(Z,q=[],J=Q4.DEFAULT){let X=null,Q=[],$=[];function Y(K){if(Array.isArray(Q))Q.push(K);else if(X!==null)Q[X]=K}return Eq(Z,{onObjectBegin:()=>{let K={};Y(K),$.push(Q),Q=K,X=null},onObjectProperty:(K)=>{X=K},onObjectEnd:()=>{Q=$.pop()},onArrayBegin:()=>{let K=[];Y(K),$.push(Q),Q=K,X=null},onArrayEnd:()=>{Q=$.pop()},onLiteralValue:Y,onError:(K,U,W)=>{q.push({error:K,offset:U,length:W})}},J),Q[0]}function xq(Z,q=[],J=Q4.DEFAULT){let X={type:"array",offset:-1,length:-1,children:[],parent:void 0};function Q(K){if(X.type==="property")X.length=K-X.offset,X=X.parent}function $(K){return X.children.push(K),K}Eq(Z,{onObjectBegin:(K)=>{X=$({type:"object",offset:K,length:-1,parent:X,children:[]})},onObjectProperty:(K,U,W)=>{X=$({type:"property",offset:U,length:-1,parent:X,children:[]}),X.children.push({type:"string",value:K,offset:U,length:W,parent:X})},onObjectEnd:(K,U)=>{Q(K+U),X.length=K+U-X.offset,X=X.parent,Q(K+U)},onArrayBegin:(K,U)=>{X=$({type:"array",offset:K,length:-1,parent:X,children:[]})},onArrayEnd:(K,U)=>{X.length=K+U-X.offset,X=X.parent,Q(K+U)},onLiteralValue:(K,U,W)=>{$({type:gw(K),offset:U,length:W,parent:X,value:K}),Q(U+W)},onSeparator:(K,U,W)=>{if(X.type==="property"){if(K===":")X.colonOffset=U;else if(K===",")Q(U)}},onError:(K,U,W)=>{q.push({error:K,offset:U,length:W})}},J);let H=X.children[0];if(H)delete H.parent;return H}function S7(Z,q){if(!Z)return;let J=Z;for(let X of q)if(typeof X==="string"){if(J.type!=="object"||!Array.isArray(J.children))return;let Q=!1;for(let $ of J.children)if(Array.isArray($.children)&&$.children[0].value===X&&$.children.length===2){J=$.children[1],Q=!0;break}if(!Q)return}else{let Q=X;if(J.type!=="array"||Q<0||!Array.isArray(J.children)||Q>=J.children.length)return;J=J.children[Q]}return J}function Eq(Z,q,J=Q4.DEFAULT){let X=J4(Z,!1),Q=[],$=0;function Y(v){return v?()=>$===0&&v(X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter()):()=>!0}function H(v){return v?(C)=>$===0&&v(C,X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter()):()=>!0}function K(v){return v?(C)=>$===0&&v(C,X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter(),()=>Q.slice()):()=>!0}function U(v){return v?()=>{if($>0)$++;else if(v(X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter(),()=>Q.slice())===!1)$=1}:()=>!0}function W(v){return v?()=>{if($>0)$--;if($===0)v(X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter())}:()=>!0}let V=U(q.onObjectBegin),L=K(q.onObjectProperty),z=W(q.onObjectEnd),_=U(q.onArrayBegin),R=W(q.onArrayEnd),M=K(q.onLiteralValue),F=H(q.onSeparator),k=Y(q.onComment),D=H(q.onError),O=J&&J.disallowComments,T=J&&J.allowTrailingComma;function j(){while(!0){let v=X.scan();switch(X.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(v){case 12:case 13:if(O)A(10);else k();break;case 16:A(1);break;case 15:case 14:break;default:return v}}}function A(v,C=[],d=[]){if(D(v),C.length+d.length>0){let g=X.getToken();while(g!==17){if(C.indexOf(g)!==-1){j();break}else if(d.indexOf(g)!==-1)break;g=j()}}}function b(v){let C=X.getTokenValue();if(v)M(C);else L(C),Q.push(C);return j(),!0}function w(){switch(X.getToken()){case 11:let v=X.getTokenValue(),C=Number(v);if(isNaN(C))A(2),C=0;M(C);break;case 7:M(null);break;case 8:M(!0);break;case 9:M(!1);break;default:return!1}return j(),!0}function x(){if(X.getToken()!==10)return A(3,[],[2,5]),!1;if(b(!1),X.getToken()===6){if(F(":"),j(),!i())A(4,[],[2,5])}else A(5,[],[2,5]);return Q.pop(),!0}function P(){V(),j();let v=!1;while(X.getToken()!==2&&X.getToken()!==17){if(X.getToken()===5){if(!v)A(4,[],[]);if(F(","),j(),X.getToken()===2&&T)break}else if(v)A(6,[],[]);if(!x())A(4,[],[2,5]);v=!0}if(z(),X.getToken()!==2)A(7,[2],[]);else j();return!0}function f(){_(),j();let v=!0,C=!1;while(X.getToken()!==4&&X.getToken()!==17){if(X.getToken()===5){if(!C)A(4,[],[]);if(F(","),j(),X.getToken()===4&&T)break}else if(C)A(6,[],[]);if(v)Q.push(0),v=!1;else Q[Q.length-1]++;if(!i())A(4,[],[4,5]);C=!0}if(R(),!v)Q.pop();if(X.getToken()!==4)A(8,[4],[]);else j();return!0}function i(){switch(X.getToken()){case 3:return f();case 1:return P();case 10:return b(!0);default:return w()}}if(j(),X.getToken()===17){if(J.allowEmptyContent)return!0;return A(4,[],[]),!1}if(!i())return A(4,[],[]),!1;if(X.getToken()!==17)A(9,[],[]);return!0}function gw(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 Q4;var Pq=B(()=>{y7();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(Q4||(Q4={}))});function jW(Z,q,J,X){let Q=q.slice(),Y=xq(Z,[]),H=void 0,K=void 0;while(Q.length>0)if(K=Q.pop(),H=S7(Y,Q),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 r1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(J)},X)}else if(H.type==="object"&&typeof K==="string"&&Array.isArray(H.children)){let U=S7(H,[K]);if(U!==void 0)if(J===void 0){if(!U.parent)throw Error("Malformed AST");let W=H.children.indexOf(U.parent),V,L=U.parent.offset+U.parent.length;if(W>0){let z=H.children[W-1];V=z.offset+z.length}else if(V=H.offset+1,H.children.length>1)L=H.children[1].offset;return r1(Z,{offset:V,length:L-V,content:""},X)}else return r1(Z,{offset:U.offset,length:U.length,content:JSON.stringify(J)},X);else{if(J===void 0)return[];let W=`${JSON.stringify(K)}: ${JSON.stringify(J)}`,V=X.getInsertionIndex?X.getInsertionIndex(H.children.map((z)=>z.children[0].value)):H.children.length,L;if(V>0){let z=H.children[V-1];L={offset:z.offset+z.length,length:0,content:","+W}}else if(H.children.length===0)L={offset:H.offset+1,length:0,content:W};else L={offset:H.offset+1,length:0,content:W+","};return r1(Z,L,X)}}else if(H.type==="array"&&typeof K==="number"&&Array.isArray(H.children)){let U=K;if(U===-1){let W=`${JSON.stringify(J)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:W};else{let L=H.children[H.children.length-1];V={offset:L.offset+L.length,length:0,content:","+W}}return r1(Z,V,X)}else if(J===void 0&&H.children.length>=0){let W=K,V=H.children[W],L;if(H.children.length===1)L={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===W){let z=H.children[W-1],_=z.offset+z.length,R=H.offset+H.length;L={offset:_,length:R-2-_,content:""}}else L={offset:V.offset,length:H.children[W+1].offset-V.offset,content:""};return r1(Z,L,X)}else if(J!==void 0){let W,V=`${JSON.stringify(J)}`;if(!X.isArrayInsertion&&H.children.length>K){let L=H.children[K];W={offset:L.offset,length:L.length,content:V}}else if(H.children.length===0||K===0)W={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let L=K>H.children.length?H.children.length:K,z=H.children[L-1];W={offset:z.offset+z.length,length:0,content:","+V}}return r1(Z,W,X)}else throw Error(`Can not ${J===void 0?"remove":X.isArrayInsertion?"insert":"modify"} Array index ${U} as length is not sufficient`)}else throw Error(`Can not add ${typeof K!=="number"?"index":"property"} to parent of type ${H.type}`)}function r1(Z,q,J){if(!J.formattingOptions)return[q];let X=b7(Z,q),Q=q.offset,$=q.offset+q.content.length;if(q.length===0||q.content.length===0){while(Q>0&&!X4(X,Q-1))Q--;while($<X.length&&!X4(X,$))$++}let Y=kq(X,{offset:Q,length:$-Q},{...J.formattingOptions,keepLines:!1});for(let K=Y.length-1;K>=0;K--){let U=Y[K];X=b7(X,U),Q=Math.min(Q,U.offset),$=Math.max($,U.offset+U.length),$+=U.content.length-U.length}let H=Z.length-(X.length-$)-Q;return[{offset:Q,length:H,content:X.substring(Q,$)}]}function b7(Z,q){return Z.substring(0,q.offset)+q.content+Z.substring(q.offset+q.length)}var IW=B(()=>{Nq();Pq()});function NW(Z,q,J,X){return jW(Z,q,J,X)}function xW(Z,q){let J=q.slice(0).sort((Q,$)=>{let Y=Q.offset-$.offset;if(Y===0)return Q.length-$.length;return Y}),X=Z.length;for(let Q=J.length-1;Q>=0;Q--){let $=J[Q];if($.offset+$.length<=X)Z=b7(Z,$);else throw Error("Overlapping edit");X=$.offset}return Z}var OW,wW,vq,kW;var EW=B(()=>{Nq();IW();y7();Pq();(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"})(OW||(OW={}));(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"})(wW||(wW={}));vq=TW;(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"})(kW||(kW={}))});import{open as pw,readFile as dw,stat as cw}from"fs/promises";function vW(Z,q){try{return{ok:!0,value:JSON.parse(P0(Z))}}catch(J){if(q)S(J);return{ok:!1}}}function Ha(Z){if(!Z)return null;try{return vq(P0(Z))}catch(q){return S(q),null}}function nw(Z){let q=CW,J=Z.length,X=q(Z);if(!X.error||X.done||X.read>=J)return X.values;let{values:Q,read:$}=X;while($<J){let Y=typeof Z==="string"?Z.indexOf(`
84
- `,$):Z.indexOf(10,$);if(Y===-1)break;$=Y+1;let H=q(Z,$);if(H.values.length>0)Q=Q.concat(H.values);if(!H.error||H.done||H.read>=J)break;$=H.read}return Q}function iw(Z){let q=Z.length,J=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)J=3;let X=[];while(J<q){let Q=Z.indexOf(10,J);if(Q===-1)Q=q;let $=Z.toString("utf8",J,Q).trim();if(J=Q+1,!$)continue;try{X.push(JSON.parse($))}catch{}}return X}function aw(Z){let q=P0(Z),J=q.length,X=0,Q=[];while(X<J){let $=q.indexOf(`
85
- `,X);if($===-1)$=J;let Y=q.substring(X,$).trim();if(X=$+1,!Y)continue;try{Q.push(JSON.parse(Y))}catch{}}return Q}function Cq(Z){if(CW)return nw(Z);if(typeof Z==="string")return aw(Z);return iw(Z)}async function Ga(Z){let H=[];try{let{size:q}=await cw(Z);if(q<=$4)return Cq(await dw(Z));const J=m2(H,await pw(Z,"r"),1);let X=Buffer.allocUnsafe($4);let Q=0;let $=q-$4;while(Q<$4){let{bytesRead:L}=await J.read(X,Q,$4-Q,$+Q);if(L===0)break;Q+=L}let Y=X.indexOf(10);if(Y!==-1&&Y<Q-1)return Cq(X.subarray(Y+1,Q));return Cq(X.subarray(0,Q))}catch(K){var U=K,W=1}finally{var V=u2(H,U,W);V&&await V}}function Ka(Z,q){try{if(!Z||Z.trim()==="")return m([q],null,4);let J=P0(Z),X=vq(J);if(Array.isArray(X)){let Q=X.length,H=NW(J,Q===0?[0]:[Q],q,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let K=[...X,q];return m(K,null,4)}return xW(J,H)}else return m([q],null,4)}catch(J){return S(J),m([q],null,4)}}var lw=8192,PW,m0,CW,$4=104857600;var h7=B(()=>{EW();E7();k0();c4();R0();PW=M1(vW,(Z)=>Z,50),m0=Object.assign(function(q,J=!0){if(!q)return null;let X=q.length>lw?vW(q,J):PW(q,J);return X.ok?X.value:null},{cache:PW.cache});CW=(()=>{if(typeof Bun>"u")return!1;let q=Bun.JSONL;if(!q?.parseChunk)return!1;return q.parseChunk})()});function La(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 za(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 _a(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 Ra(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 Ma(Z){if(Z==="")return[];let q=Z.split(",").map((X)=>X.trim()),J=[];for(let X of q)switch(X){case"user":J.push("userSettings");break;case"project":J.push("projectSettings");break;case"local":J.push("localSettings");break;default:throw Error(`Invalid setting source: ${X}. Valid options are: user, project, local`)}return J}function Y4(){let Z=yW(),q=new Set(Z);return q.add("policySettings"),q.add("flagSettings"),Array.from(q)}function Fa(Z){return Y4().includes(Z)}var Ba,Da,SW="https://json.schemastore.org/claude-code-settings.json";var yq=B(()=>{z2();Ba=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];Da=["localSettings","projectSettings","userSettings"]});function bW(Z){f7.set(Z,Date.now())}function Ta(Z,q){let J=f7.get(Z);if(J!==void 0&&Date.now()-J<q)return f7.delete(Z),!0;return!1}function ja(){f7.clear()}var f7;var hW=B(()=>{f7=new Map});import{join as ow}from"path";var w1,H4;var g7=B(()=>{I1();d2();w1=u(function(){switch(g0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),H4=u(function(){return ow(w1(),"managed-settings.d")})});var sw,rw,fW;var gW=B(()=>{r0();t1();sw=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()),rw=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()),fW=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:sw(),filesystem:rw(),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())});import{realpathSync as tw}from"fs";function mW(){return process.versions.bun!==void 0}function Ca(){let Z=process.argv[1]||"";if(Z&&!ew.test(Z))return Z;let q=process.execPath||"";if(!q)return Z;try{return tw(q)}catch{return q}}function ya(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var ew;var uW=B(()=>{ew=/(^|[/\\])(\$bunfs|~BUN)[/\\]/i});function pW(Z,q){return{cmd:F7(Z)??Z,args:q}}var dW=B(()=>{D7()});import{dirname as Zk,join as cW}from"path";async function s2(Z){try{return!!await uK(Z)}catch{return!1}}function $k(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function Hk(){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 Yk)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(aW())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 aW(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function na(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return r2.platform}var z0,qk,Jk,Xk,iW,Qk,Yk,Gk,r2;var Sq=B(()=>{I1();nW();uW();o0();dW();M0();D7();z0=u(()=>{let Z=lW(),q=G0(),J=cW(q,`config${Z}.json`);if(!N().existsSync(J)){let Q=process.env.CLAUDIN_CONFIG_DIR?q:Zk(q),$=cW(Q,`.claudin${Z}.json`);if(N().existsSync($))return $}return J}),qk=u(async()=>{try{let{default:Z}=await import("./index-1.1.2-95c20hmc.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});Jk=u(async()=>{let Z=[];if(await s2("npm"))Z.push("npm");if(await s2("yarn"))Z.push("yarn");if(await s2("pnpm"))Z.push("pnpm");return Z}),Xk=u(async()=>{let Z=[];if(await s2("bun"))Z.push("bun");if(await s2("deno"))Z.push("deno");if(await s2("node"))Z.push("node");return Z}),iW=u(()=>{try{return N().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),Qk=u(()=>{try{if(!iW())return!1;let{cmd:Z}=pW("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});Yk=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];Gk=u(()=>{if(q0(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(q0(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(q0(process.env.RENDER))return"render";if(q0(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(q0(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(q0(process.env.GITHUB_ACTIONS))return"github-actions";if(q0(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(q0(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(N().existsSync("/.dockerenv"))return"docker"}catch{}if(r2.platform==="darwin")return"unknown-darwin";if(r2.platform==="linux")return"unknown-linux";if(r2.platform==="win32")return"unknown-win32";return"unknown"});r2={hasInternetAccess:qk,isCI:q0(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:Hk(),isSSH:aW,getPackageManagers:Jk,getRuntimes:Xk,isRunningWithBun:u(mW),isWslEnvironment:iW,isNpmFromWindowsPath:Qk,isConductor:$k,detectDeploymentEnvironment:Gk}});var oa,sa="∙",ra="✻",ta="↑",ea="↓",Zo="↯",qo="○",Jo="◐",Xo="●",Qo="◎",$o="◉",Yo="◍",Ho="▶",oW="⏸",Go="↻",Ko="◇",Uo="◆",Wo="※",Vo="▎",Bo,Lo="·✔︎·",zo="×";var sW=B(()=>{Sq();oa=r2.platform==="darwin"?"⏺":"●",Bo=["·|·","·/·","·—·","·\\·"]});var Dk={};bq(Dk,{toExternalPermissionMode:()=>Bk,permissionModeTitle:()=>zk,permissionModeSymbol:()=>Mk,permissionModeShortTitle:()=>Rk,permissionModeSchema:()=>Uk,permissionModeFromString:()=>Lk,isExternalPermissionMode:()=>Vk,isDefaultMode:()=>_k,getModeColor:()=>Fk,externalPermissionModeSchema:()=>Wk,PERMISSION_MODES:()=>t2,EXTERNAL_PERMISSION_MODES:()=>fq});function Vk(Z){return Z!=="auto"}function G4(Z){return rW[Z]??rW.default}function Bk(Z){return G4(Z).external}function Lk(Z){return t2.includes(Z)?Z:"default"}function zk(Z){return G4(Z).title}function _k(Z){return Z==="default"||Z===void 0}function Rk(Z){return G4(Z).shortTitle}function Mk(Z){return G4(Z).symbol}function Fk(Z){return G4(Z).color}var Uk,Wk,rW;var tW=B(()=>{r0();sW();Kk();t1();Uk=I(()=>hq.enum(t2)),Wk=I(()=>hq.enum(fq)),rW={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:oW,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 eW=()=>{};var ZV;var qV=B(()=>{eW();ZV=["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 JV=()=>{};var XV=()=>{};var QV=B(()=>{qV();JV();XV()});var $V,ko="bash";var YV=B(()=>{$V=["bash","powershell"]});function Ak(){let Z=G.object({type:G.literal("command").describe("Shell command hook type"),command:G.string().describe("Shell command to execute"),if:m7(),shell:G.enum($V).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:m7(),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:m7(),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")}),X=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:m7(),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:X}}var m7,HV,GV,e1;var u7=B(()=>{QV();r0();t1();YV();m7=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.'));HV=I(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:q,AgentHookSchema:J,HttpHookSchema:X}=Ak();return G.discriminatedUnion("type",[Z,q,J,X])}),GV=I(()=>G.object({matcher:G.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:G.array(HV()).describe("List of hooks to execute when the matcher matches")})),e1=I(()=>G.partialRecord(G.enum(ZV),G.array(GV())))});var bo,ho,Tk,jk,KV,Ik,Ok,wk,kk,Nk,xk,Ek,p7,fo;var UV=B(()=>{r0();t1();bo=I(()=>G.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),ho=I(()=>G.enum(["stdio","sse","sse-ide","http","ws","sdk"])),Tk=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()})),jk=I(()=>G.boolean()),KV=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:jk().optional()})),Ik=I(()=>G.object({type:G.literal("sse"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional(),oauth:KV().optional()})),Ok=I(()=>G.object({type:G.literal("sse-ide"),url:G.string(),ideName:G.string(),ideRunningInWindows:G.boolean().optional()})),wk=I(()=>G.object({type:G.literal("ws-ide"),url:G.string(),ideName:G.string(),authToken:G.string().optional(),ideRunningInWindows:G.boolean().optional()})),kk=I(()=>G.object({type:G.literal("http"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional(),oauth:KV().optional()})),Nk=I(()=>G.object({type:G.literal("ws"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional()})),xk=I(()=>G.object({type:G.literal("sdk"),name:G.string()})),Ek=I(()=>G.object({type:G.literal("claudeai-proxy"),url:G.string(),id:G.string()})),p7=I(()=>G.union([Tk(),Ik(),Ok(),wk(),kk(),Nk(),xk(),Ek()])),fo=I(()=>G.object({mcpServers:G.record(G.string(),p7())}))});function lo(Z,q){let J=Z.toLowerCase();return q.autoUpdate??(c7.has(J)&&!Pk.has(J))}function yk(Z){if(c7.has(Z.toLowerCase()))return!1;if(Ck.test(Z))return!0;return vk.test(Z)}function Sk(Z){let q=Z.trim(),J=bk.exec(q);if(J)return J[1].toLowerCase()==="github.com"&&J[2].toLowerCase()===e2;try{let X=new URL(q);if(X.protocol!=="https:"&&X.protocol!=="ssh:")return!1;if(X.hostname.toLowerCase()!=="github.com")return!1;return X.pathname.split("/").filter(Boolean)[0]?.toLowerCase()===e2}catch{return!1}}function no(Z,q){let J=Z.toLowerCase();if(!c7.has(J))return null;if(q.source==="github"){if(!(q.repo||"").toLowerCase().startsWith(`${e2}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${e2}/' can use this name.`;return null}if(q.source==="git"&&q.url){if(Sk(q.url))return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${e2}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${e2}' organization.`}function ao(Z){return typeof Z==="string"&&Z.startsWith("./")}function oo(Z){return Z.source==="file"||Z.source==="directory"}var c7,Pk,vk,Ck,e2="anthropics",bk,V1,Z6,WV,mq,uq,LV,pq,hk,io,fk,gk,mk,uk,pk,dk,VV,ck,lk,zV,nk,ik,BV,ak,_V,ok,sk,K4,gq,RV,rk,tk,so,d7,ek,ZN,ro,qN,JN,XN,QN,$N,to,YN,eo;var MV=B(()=>{r0();u7();UV();t1();c7=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),Pk=new Set(["knowledge-work-plugins"]);vk=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,Ck=/[^\u0020-\u007E]/;bk=/^git@([^:]+):([^/]+)\//i;V1=I(()=>G.string().startsWith("./")),Z6=I(()=>V1().endsWith(".json")),WV=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")])),mq=I(()=>V1().endsWith(".md")),uq=I(()=>G.union([mq(),V1()])),LV=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)=>!yk(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'})),pq=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")})),hk=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:pq().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(ZN()).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.`)})),io=I(()=>G.object({description:G.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:G.lazy(()=>e1()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),fk=I(()=>G.object({hooks:G.union([Z6().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(()=>e1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),G.array(G.union([Z6().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(()=>e1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),gk=I(()=>G.object({source:uq().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'})),mk=I(()=>G.object({commands:G.union([uq().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(uq().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(),gk()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),uk=I(()=>G.object({agents:G.union([mq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),G.array(mq().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")])})),pk=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")])})),dk=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")])})),VV=I(()=>G.string().min(1)),ck=I(()=>G.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),lk=I(()=>G.object({mcpServers:G.union([Z6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),WV().describe("Path or URL to MCPB file containing MCP server configuration"),G.record(G.string(),p7()).describe("MCP server configurations keyed by server name"),G.array(G.union([Z6().describe("Path to MCP servers configuration file"),WV().describe("Path or URL to MCPB file"),G.record(G.string(),p7()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),zV=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()),nk=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"),zV()).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).")})),ik=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(),zV()).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.")})),BV=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(VV()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:G.record(ck(),VV()).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")})),ak=I(()=>G.object({lspServers:G.union([Z6().describe("Path to .lsp.json configuration file relative to plugin root"),G.record(G.string(),BV()).describe("LSP server configurations keyed by server name"),G.array(G.union([Z6().describe("Path to LSP configuration file"),G.record(G.string(),BV()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),_V=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")),ok=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)")})),sk=I(()=>G.object({...hk().shape,...fk().partial().shape,...mk().partial().shape,...uk().partial().shape,...pk().partial().shape,...dk().partial().shape,...ik().partial().shape,...lk().partial().shape,...ak().partial().shape,...ok().partial().shape,...nk().partial().shape})),K4=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:_V().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:LV().refine((Z)=>!c7.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(rk()).describe("Plugin entries declared inline in settings.json"),owner:pq().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).")])),gq=I(()=>G.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),RV=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:_V().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:gq().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:gq().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:gq().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.")])),rk=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:RV().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.'}));tk=I(()=>sk().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:RV().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.")})),so=I(()=>G.object({name:LV(),owner:pq().describe("Marketplace maintainer or curator information"),plugins:G.array(tk()).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.")})),d7=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")),ek=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,ZN=I(()=>G.union([G.string().regex(ek,"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)])),ro=I(()=>G.union([d7(),G.object({id:d7().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")})])),qN=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)")})),JN=I(()=>G.object({version:G.literal(1).describe("Schema version 1"),plugins:G.record(d7(),qN()).describe("Map of plugin IDs to their installation metadata")})),XN=I(()=>G.enum(["managed","user","project","local"])),QN=I(()=>G.object({scope:XN().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")})),$N=I(()=>G.object({version:G.literal(2).describe("Schema version 2"),plugins:G.record(d7(),G.array(QN())).describe("Map of plugin IDs to arrays of installation entries")})),to=I(()=>G.union([JN(),$N()])),YN=I(()=>G.object({source:K4().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")})),eo=I(()=>G.record(G.string(),YN()))});function qs(Z){return Z.startsWith("claude.ai ")}function l7(Z){let q=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))q=q.replace(/_+/g,"_").replace(/^_|_$/g,"");return q}var FV=()=>{};function DV(Z){let q=Z.split("__"),[J,X,...Q]=q;if(J!=="mcp"||!X)return null;let $=Q.length>0?Q.join("__"):void 0;return{serverName:X,toolName:$}}function HN(Z){return`mcp__${l7(Z)}__`}function GN(Z,q){return`${HN(Z)}${l7(q)}`}function Qs(Z){return Z.mcpInfo?GN(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function $s(Z,q){let J=`mcp__${l7(q)}__`;return Z.replace(J,"")}function Ys(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 AV=B(()=>{FV()});var TV="Agent",Gs="Task",Ks;var jV=B(()=>{Ks=new Set(["Explore","Plan","WebResearcher","WebResearcherManager"])});var dq="TaskOutput";var IV=()=>{};var OV="TaskStop",Vs=`
86
- - Stops a running background task by its ID
87
- - Takes a task_id parameter identifying the task to stop
88
- - Returns a success or failure status
89
- - Use this tool when you need to terminate a long-running task
90
- `;var wV=()=>{};function q6(Z){return Object.hasOwn(cq,Z)?cq[Z]:Z}function Rs(Z){let q=[];for(let[J,X]of Object.entries(cq))if(X===Z)q.push(J);return q}function KN(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function UN(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function kV(Z){let q=WN(Z,"(");if(q===-1)return{toolName:q6(Z)};let J=VN(Z,")");if(J===-1||J<=q)return{toolName:q6(Z)};if(J!==Z.length-1)return{toolName:q6(Z)};let X=Z.substring(0,q),Q=Z.substring(q+1,J);if(!X)return{toolName:q6(Z)};if(Q===""||Q==="*")return{toolName:q6(X)};let $=UN(Q);return{toolName:q6(X),ruleContent:$}}function Ms(Z){if(!Z.ruleContent)return Z.toolName;let q=KN(Z.ruleContent);return`${Z.toolName}(${q})`}function WN(Z,q){for(let J=0;J<Z.length;J++)if(Z[J]===q){let X=0,Q=J-1;while(Q>=0&&Z[Q]==="\\")X++,Q--;if(X%2===0)return J}return-1}function VN(Z,q){for(let J=Z.length-1;J>=0;J--)if(Z[J]===q){let X=0,Q=J-1;while(Q>=0&&Z[Q]==="\\")X++,Q--;if(X%2===0)return J}return-1}var cq;var NV=B(()=>{jV();IV();wV();cq={Task:TV,KillShell:OV,AgentOutputTool:dq,BashOutputTool:dq,...{}}});function Ds(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xV(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function EV(Z,q,J=q+"s"){return Z===1?q:J}function As(Z){let q=Z.indexOf(`
91
- `);return q===-1?Z:Z.slice(0,q)}function Ts(Z,q,J=0){let X=0,Q=Z.indexOf(q,J);while(Q!==-1)X++,Q=Z.indexOf(q,Q+1);return X}function js(Z){return Z.replace(/[0-9]/g,(q)=>String.fromCharCode(q.charCodeAt(0)-65248))}function Is(Z){return Z.replace(/\u3000/g," ")}function Os(Z,q=",",J=PV){let Q="";for(let $ of Z){let Y=Q?q:"",H=Y+$;if(Q.length+H.length<=J)Q+=H;else{let K=J-Q.length-Y.length-14;if(K>0)Q+=Y+$.slice(0,K)+"...[truncated]";else Q+="...[truncated]";return Q}}return Q}class BN{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=PV){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+`
92
- ... [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 ws(Z,q){let J=Z.split(`
93
- `);if(J.length<=q)return Z;return J.slice(0,q).join(`
94
- `)+"…"}var PV=33554432;var lq=()=>{};function vV(Z){return nq.filePatternTools.includes(Z)}function CV(Z){return nq.bashPrefixTools.includes(Z)}function yV(Z){return nq.customValidation[Z]}var nq;var SV=B(()=>{nq={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 bV(Z,q){let J=0,X=q-1;while(X>=0&&Z[X]==="\\")J++,X--;return J%2!==0}function iq(Z,q){let J=0;for(let X=0;X<Z.length;X++)if(Z[X]===q&&!bV(Z,X))J++;return J}function LN(Z){for(let q=0;q<Z.length-1;q++)if(Z[q]==="("&&Z[q+1]===")"){if(!bV(Z,q))return!0}return!1}function aq(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let q=iq(Z,"("),J=iq(Z,")");if(q!==J)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(LN(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 X=kV(Z),Q=DV(X.toolName);if(Q){if(X.ruleContent!==void 0||iq(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${X.toolName}" without parentheses, or use "mcp__${Q.serverName}__*" for all tools`,examples:[`mcp__${Q.serverName}`,`mcp__${Q.serverName}__*`,Q.toolName&&Q.toolName!=="*"?`mcp__${Q.serverName}__${Q.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!X.toolName||X.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(X.toolName[0]!==X.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${xV(String(X.toolName))}"`};let $=yV(X.toolName);if($&&X.ruleContent!==void 0){let Y=$(X.ruleContent);if(!Y.valid)return Y}if(CV(X.toolName)&&X.ruleContent!==void 0){let Y=X.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(vV(X.toolName)&&X.ruleContent!==void 0){let Y=X.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:[`${X.toolName}(*.ts) - matches .ts files`,`${X.toolName}(src/**) - matches all files in src`,`${X.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:[`${X.toolName}(*.js) - all .js files`,`${X.toolName}(src/*) - all files directly in src`,`${X.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var n7;var oq=B(()=>{r0();AV();t1();NV();lq();SV();n7=I(()=>G.string().superRefine((Z,q)=>{let J=aq(Z);if(!J.valid){let X=J.error;if(J.suggestion)X+=`. ${J.suggestion}`;if(J.examples&&J.examples.length>0)X+=`. Examples: ${J.examples.join(", ")}`;q.addIssue({code:G.ZodIssueCode.custom,message:X,params:{received:Z}})}}))});function hs(Z){if(!Z||typeof Z!=="object")return null;let q=sq.safeParse(Z);if(!q.success)return null;if(!q.data.enabled)return null;return q.data}var sq;var hV=B(()=>{r0();sq=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 rs(Z){return"serverName"in Z&&Z.serverName!==void 0}function ts(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function es(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var zN,_N,RN,MN,FN,fV,v0;var U4=B(()=>{r0();gW();o0();t1();tW();MV();yq();oq();u7();u7();hV();Aq();zN=I(()=>G.record(G.string(),G.coerce.string())),_N=I(()=>G.object({allow:G.array(n7()).optional().describe("List of permission rules for allowed operations"),deny:G.array(n7()).optional().describe("List of permission rules for denied operations"),ask:G.array(n7()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:G.enum(t2).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()),RN=I(()=>G.object({source:K4().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")})),MN=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 Dq([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"'})),FN=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 Dq([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"'})),fV=["skills","agents","hooks","mcp"],v0=I(()=>G.object({$schema:G.literal(SW).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)"),...q0(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:zN().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:_N().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(MN()).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(FN()).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:e1().optional().describe("Custom commands to run before/after tool executions"),autoFix:sq.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)=>fV.includes(q)):Z,G.union([G.boolean(),G.array(G.enum(fV))])).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(),RN()).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(K4()).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(K4()).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:fW().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 .claudin/plans/ in the project root."),...{},...{},...{},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/."),autoMemoryProjectLocal:G.boolean().optional().describe("When true (the default), auto-memory for a git project defaults to <project>/.claudin/memory/ instead of the global ~/.claudin/projects/<sanitized-cwd>/memory/. Set to false to force the legacy global-only location. Ignored if set in projectSettings for security, same as autoMemoryDirectory."),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 rq(){let Z=gV(v0(),{unrepresentable:"any"});return m(Z,null,2)}var mV=B(()=>{r0();R0();U4()});function uV(Z){let q=DN.find((X)=>X.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((X)=>`"${X}"`).join(", ")}`;if(!J.docLink&&Z.path){let X=Z.path.split(".")[0];if(X)J.docLink=AN[X]}return J}var DN,AN;var pV=B(()=>{DN=[{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'}}],AN={}});function dV(Z){return Z.code==="invalid_type"}function cV(Z){return Z.code==="invalid_value"}function TN(Z){return Z.code==="unrecognized_keys"}function lV(Z){return Z.code==="too_small"}function tq(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function nV(Z){let q=Z.match(/received (\w+)/);return q?q[1]:void 0}function J6(Z,q){return Z.issues.map((J)=>{let X=J.path.map(String).join("."),Q=J.message,$,Y,H,K,U;if(cV(J))Y=J.values.map((V)=>String(V)),H=Y.join(" | "),K=void 0,U=void 0;else if(dV(J)){H=J.expected;let V=nV(J.message);K=V??tq(J.input),U=V??tq(J.input)}else if(lV(J))H=String(J.minimum);else if(J.code==="custom"&&"params"in J)K=J.params.received,U=K;let W=uV({path:X,code:J.code,expected:H,received:K,enumValues:Y,message:J.message,value:K});if(cV(J))$=Y?.map((V)=>`"${V}"`).join(", "),Q=`Invalid value. Expected one of: ${$}`;else if(dV(J)){let V=nV(J.message)??tq(J.input);if(J.expected==="object"&&V==="null"&&X==="")Q="Invalid or malformed JSON";else Q=`Expected ${J.expected}, but received ${V}`}else if(TN(J)){let V=J.keys.join(", ");Q=`Unrecognized ${EV(J.keys.length,"field")}: ${V}`}else if(lV(J))Q=`Number must be greater than or equal to ${J.minimum}`,$=String(J.minimum);return{file:q,path:X,message:Q,expected:$,invalidValue:U,suggestion:W?.suggestion,docLink:W?.docLink}})}function Br(Z){try{let q=Z0(Z),J=v0().strict().safeParse(q);if(J.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
95
- `+J6(J.error,"settings").map(($)=>`- ${$.path}: ${$.message}`).join(`
96
- `),fullSchema:rq()}}catch(q){return{isValid:!1,error:`Invalid JSON: ${q instanceof Error?q.message:"Unknown parsing error"}`,fullSchema:rq()}}}function i7(Z,q){if(!Z||typeof Z!=="object")return[];let J=Z;if(!J.permissions||typeof J.permissions!=="object")return[];let X=J.permissions,Q=[];for(let $ of["allow","deny","ask"]){let Y=X[$];if(!Array.isArray(Y))continue;X[$]=Y.filter((H)=>{if(typeof H!=="string")return Q.push({file:q,path:`permissions.${$}`,message:`Non-string value in ${$} array was removed`,invalidValue:H}),!1;let K=aq(H);if(!K.valid){let U=`Invalid permission rule "${H}" was skipped`;if(K.error)U+=`: ${K.error}`;if(K.suggestion)U+=`. ${K.suggestion}`;return Q.push({file:q,path:`permissions.${$}`,message:U,invalidValue:H}),!1}return!0})}return Q}var eq=B(()=>{R0();lq();oq();mV();U4();pV()});import{userInfo as jN}from"os";function rV(){let Z="";try{Z=jN().username}catch{}let q=[];if(Z)q.push({path:`/Library/Managed Preferences/${Z}/${iV}.plist`,label:"per-user managed preferences"});return q.push({path:`/Library/Managed Preferences/${iV}.plist`,label:"device-level managed preferences"}),q}var iV="com.anthropic.claudecode",a7="HKLM\\SOFTWARE\\Policies\\ClaudeCode",o7="HKCU\\SOFTWARE\\Policies\\ClaudeCode",X6="Settings",aV="/usr/bin/plutil",oV,sV=5000;var ZJ=B(()=>{oV=["-convert","json","-o","-","--"]});import{execFile as IN}from"child_process";import{existsSync as ON}from"fs";function qJ(Z,q){return new Promise((J)=>{IN(Z,q,{encoding:"utf-8",timeout:sV},(X,Q)=>{J({stdout:Q??"",code:X?1:0})})})}function s7(){return(async()=>{if(process.platform==="darwin"){let Z=rV(),J=(await Promise.all(Z.map(async({path:X,label:Q})=>{if(!ON(X))return{stdout:"",label:Q,ok:!1};let{stdout:$,code:Y}=await qJ(aV,[...oV,X]);return{stdout:$,label:Q,ok:Y===0&&!!$}}))).find((X)=>X.ok);return{plistStdouts:J?[{stdout:J.stdout,label:J.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,q]=await Promise.all([qJ("reg",["query",a7,"/v",X6]),qJ("reg",["query",o7,"/v",X6])]);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 Dr(){if(JJ)return;JJ=s7()}function tV(){return JJ}var JJ=null;var eV=B(()=>{ZJ()});import{join as ZB}from"path";function wN(){if(r7)return;r7=(async()=>{Q6("mdm_load_start");let Z=Date.now(),q=tV()??s7(),{mdm:J,hkcu:X}=XB(await q);QJ=J,$J=X,Q6("mdm_load_end");let Q=Date.now()-Z;if(E(`MDM settings load completed in ${Q}ms`),Object.keys(J.settings).length>0){E(`MDM settings found: ${Object.keys(J.settings).join(", ")}`);try{H0("info","mdm_settings_loaded",{duration_ms:Q,key_count:Object.keys(J.settings).length,error_count:J.errors.length})}catch{}}})()}async function yr(){if(!r7)wN();await r7}function t7(){return QJ??B1}function e7(){return $J??B1}function Sr(Z,q){QJ=Z,$J=q}async function br(){let Z=await s7();return XB(Z)}function XJ(Z,q){let J=m0(Z,!1);if(!J||typeof J!=="object")return{settings:{},errors:[]};let X=i7(J,q),Q=v0().safeParse(J);if(!Q.success){let $=J6(Q.error,q);return{settings:{},errors:[...X,...$]}}return{settings:Q.data,errors:X}}function qB(Z,q="Settings"){let J=Z.split(/\r?\n/),X=q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Q=new RegExp(`^\\s+${X}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let $ of J){let Y=$.match(Q);if(Y&&Y[1])return Y[1].trimEnd()}return null}function XB(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:q,label:J}=Z.plistStdouts[0],X=XJ(q,J);if(Object.keys(X.settings).length>0)return{mdm:X,hkcu:B1}}if(Z.hklmStdout){let q=qB(Z.hklmStdout);if(q){let J=XJ(q,`Registry: ${a7}\\${X6}`);if(Object.keys(J.settings).length>0)return{mdm:J,hkcu:B1}}}if(kN())return{mdm:B1,hkcu:B1};if(Z.hkcuStdout){let q=qB(Z.hkcuStdout);if(q){let J=XJ(q,`Registry: ${o7}\\${X6}`);return{mdm:B1,hkcu:J}}}return{mdm:B1,hkcu:B1}}function kN(){try{let Z=ZB(w1(),"managed-settings.json"),q=W1(Z),J=m0(q,!1);if(J&&typeof J==="object"&&Object.keys(J).length>0)return!0}catch{}try{let Z=H4(),q=N().readdirSync(Z);for(let J of q){if(!(J.isFile()||J.isSymbolicLink())||!J.name.endsWith(".json")||J.name.startsWith("."))continue;try{let X=W1(ZB(Z,J.name)),Q=m0(X,!1);if(Q&&typeof Q==="object"&&Object.keys(Q).length>0)return!0}catch{}}}catch{}return!1}var B1,QJ=null,$J=null,r7=null;var QB=B(()=>{K1();L6();r6();M0();h7();JB();g7();U4();eq();ZJ();eV();B1=Object.freeze({settings:{},errors:[]})});import{dirname as LB,join as Z5,resolve as W4}from"path";function UJ(){return Z5(w1(),"managed-settings.json")}function WJ(){let Z=[],q={},J=!1,{settings:X,errors:Q}=V4(UJ());if(Z.push(...Q),X&&Object.keys(X).length>0)q=U1(q,X,Z2),J=!0;let $=H4();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:U}=V4(Z5($,H));if(Z.push(...U),K&&Object.keys(K).length>0)q=U1(q,K,Z2),J=!0}}catch(Y){let H=W0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")S(Y)}return{settings:J?q:null,errors:Z}}function Ut(){let{settings:Z}=V4(UJ()),q=!!Z&&Object.keys(Z).length>0,J=!1,X=H4();try{J=N().readdirSync(X).some((Q)=>(Q.isFile()||Q.isSymbolicLink())&&Q.name.endsWith(".json")&&!Q.name.startsWith("."))}catch{}return{hasBase:q,hasDropIns:J}}function zB(Z,q){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")E(`Broken symlink or missing file encountered for settings.json at path: ${q}`);else S(Z)}function V4(Z){let q=UB(Z);if(q)return{settings:q.settings?HJ(q.settings):null,errors:q.errors};let J=NN(Z);return WB(Z,J),{settings:J.settings?HJ(J.settings):null,errors:J.errors}}function NN(Z){try{let{resolvedPath:q}=O1(N(),Z),J=W1(q);if(J.trim()==="")return{settings:{},errors:[]};let X=m0(J,!1),Q=i7(X,Z),$=v0().safeParse(X);if(!$.success){let Y=J6($.error,Z);return{settings:null,errors:[...Q,...Y]}}return{settings:$.data,errors:Q}}catch(q){return zB(q,Z),{settings:null,errors:[]}}}function $B(Z){switch(Z){case"userSettings":return W4(G0());case"policySettings":case"projectSettings":case"localSettings":return W4(q2());case"flagSettings":{let q=GJ();return q?LB(W4(q)):W4(q2())}}}function xN(){if(BB()||q0(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function q5(Z){switch(Z){case"userSettings":return Z5($B(Z),xN());case"projectSettings":case"localSettings":return Z5($B(Z),_B(Z));case"policySettings":return UJ();case"flagSettings":return GJ()}}function _B(Z){switch(Z){case"projectSettings":return".claudin/settings.json";case"localSettings":return".claudin/settings.local.json"}}function p(Z){let q=GB(Z);if(q!==void 0)return q;let J=RB(Z);return KB(Z,J),J}function RB(Z){if(Z==="policySettings"){let X=P7();if(X&&Object.keys(X).length>0)return X;let Q=t7();if(Object.keys(Q.settings).length>0)return Q.settings;let{settings:$}=WJ();if($)return $;let Y=e7();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let q=q5(Z),{settings:J}=q?V4(q):{settings:null};if(Z==="flagSettings"){let X=KJ();if(X){let Q=v0().safeParse(X);if(Q.success)return U1(J||{},Q.data,Z2)}}return J}function Wt(){let Z=P7();if(Z&&Object.keys(Z).length>0)return"remote";let q=t7();if(Object.keys(q.settings).length>0)return g0()==="macos"?"plist":"hklm";let{settings:J}=WJ();if(J)return"file";let X=e7();if(Object.keys(X.settings).length>0)return"hkcu";return null}function Vt(Z,q){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let J=q5(Z);if(!J)return{error:null};try{N().mkdirSync(LB(J));let X=RB(Z);if(!X){let $=null;try{$=W1(J)}catch(Y){if(!n2(Y))throw Y}if($!==null){let Y=m0($);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${J}`)};if(Y&&typeof Y==="object")X=Y,E(`Using raw settings from ${J} due to validation failure`)}}let Q=U1(X||{},q,($,Y,H,K)=>{if(Y===void 0&&K&&typeof H==="string"){delete K[H];return}if(Array.isArray(Y))return Y;return});if(bW(J),i2(J,m(Q,null,2)+`
97
- `),e6(),Z==="localSettings")RW(_B("localSettings"),q2())}catch(X){let Q=Error(`Failed to read raw settings from ${J}: ${X}`);return S(Q),{error:Q}}return{error:null}}function EN(Z,q){return $W([...Z,...q])}function Z2(Z,q){if(Array.isArray(Z)&&Array.isArray(q))return EN(Z,q);return}function Bt(Z){let q=v0().strip().parse(Z),J=["permissions","sandbox","hooks"],X=[],Q={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=Q[$];if(H){for(let K of Object.keys(Y))if(H.has(K))X.push(`${$}.${K}`)}}else X.push($);return X.sort()}function PN(){if(YJ)return{settings:{},errors:[]};let Z=Date.now();Q6("loadSettingsFromDisk_start"),H0("info","settings_load_started"),YJ=!0;try{let q=VB(),J={};if(q)J=U1(J,q,Z2);let X=[],Q=new Set,$=new Set;for(let Y of Y4()){if(Y==="policySettings"){let K=null,U=[],W=P7();if(W&&Object.keys(W).length>0){let V=v0().safeParse(W);if(V.success)K=V.data;else U.push(...J6(V.error,"remote managed settings"))}if(!K){let V=t7();if(Object.keys(V.settings).length>0)K=V.settings;U.push(...V.errors)}if(!K){let{settings:V,errors:L}=WJ();if(V)K=V;U.push(...L)}if(!K){let V=e7();if(Object.keys(V.settings).length>0)K=V.settings;U.push(...V.errors)}if(K)J=U1(J,K,Z2);for(let V of U){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),X.push(V)}continue}let H=q5(Y);if(H){let K=W4(H);if(!$.has(K)){$.add(K);let{settings:U,errors:W}=V4(H);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),X.push(V)}if(U)J=U1(J,U,Z2)}}if(Y==="flagSettings"){let K=KJ();if(K){let U=v0().safeParse(K);if(U.success)J=U1(J,U.data,Z2)}}}return H0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:$.size,error_count:X.length}),{settings:J,errors:X}}finally{YJ=!1}}function J5(){let{settings:Z}=vN();return Z||{}}function zt(){e6();let Z=[];for(let q of Y4()){let J=p(q);if(J&&Object.keys(J).length>0)Z.push({source:q,settings:J})}return{effective:J5(),sources:Z}}function vN(){let Z=YB();if(Z!==null)return Z;let q=PN();return Q6("loadSettingsFromDisk_end"),HB(q),q}function _t(){return!!(p("userSettings")?.skipDangerousModePermissionPrompt||p("localSettings")?.skipDangerousModePermissionPrompt||p("flagSettings")?.skipDangerousModePermissionPrompt||p("policySettings")?.skipDangerousModePermissionPrompt)}function Rt(){return!!(p("userSettings")?.permissions?.allowBypassPermissionsMode||p("localSettings")?.permissions?.allowBypassPermissionsMode||p("flagSettings")?.permissions?.allowBypassPermissionsMode||p("policySettings")?.permissions?.allowBypassPermissionsMode)}function Mt(){{let Z=p("userSettings")?.skipAutoPermissionPrompt,q=p("localSettings")?.skipAutoPermissionPrompt,J=p("flagSettings")?.skipAutoPermissionPrompt,X=p("policySettings")?.skipAutoPermissionPrompt,Q=!!(Z||q||J||X);return E(`[auto-mode] hasAutoModeOptIn=${Q} skipAutoPermissionPrompt: user=${Z} local=${q} flag=${J} policy=${X}`),Q}return!1}function Ft(){return p("policySettings")?.useAutoModeDuringPlan!==!1&&p("flagSettings")?.useAutoModeDuringPlan!==!1&&p("userSettings")?.useAutoModeDuringPlan!==!1&&p("localSettings")?.useAutoModeDuringPlan!==!1}function Dt(){{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=[],X=[];for(let Q of["userSettings","localSettings","flagSettings","policySettings"]){let $=p(Q);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)X.push(...Y.data.environment)}}if(q.length>0||J.length>0||X.length>0)return{...q.length>0&&{allow:q},...J.length>0&&{soft_deny:J},...X.length>0&&{environment:X}}}return}function At(Z){for(let q of Y4()){if(q==="policySettings")continue;let J=q5(q);if(!J)continue;try{let{resolvedPath:X}=O1(N(),J),Q=W1(X);if(!Q.trim())continue;let $=m0(Q,!1);if($&&typeof $==="object"&&Z in $)return!0}catch(X){zB(X,J)}}return!1}var YJ=!1,Lt;var MB=B(()=>{JW();r0();z2();QW();Aq();K1();L6();o0();o1();v7();r6();M0();MW();h7();k0();d2();R0();JB();yq();hW();g7();QB();XW();U4();eq();Lt=J5});import{cpSync as CN,readFileSync as yN,readdirSync as SN}from"fs";import{join as bN}from"path";function AB(Z,q){if(Z===q)return;if(DB(q))return;if(!DB(Z))return;try{CN(Z,q,{recursive:!0,force:!1,errorOnExist:!1})}catch(J){S(Error(`Failed to migrate auto-memory from ${Z} to ${q}: ${J instanceof Error?J.message:String(J)}`))}}function DB(Z){try{if(yN(bN(Z,FB),"utf-8").trim())return!0}catch{}try{return SN(Z,{withFileTypes:!0}).some((q)=>q.isFile()&&q.name.endsWith(".md")&&q.name!==FB)}catch{return!1}}var FB="MEMORY.md";var TB=B(()=>{k0()});import{chmodSync as hN}from"fs";import{homedir as fN}from"os";import{isAbsolute as gN,join as B4,normalize as VJ,sep as X5}from"path";function wB(){let Z=process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY;if(q0(Z))return!1;if(OB(Z))return!0;if(q0(process.env.CLAUDE_CODE_SIMPLE))return!1;if(q0(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let q=J5();if(q.autoMemoryEnabled!==void 0)return q.autoMemoryEnabled;return!0}function mt(){if(!s1("tengu_passport_quail",!1))return!1;return!IB()||s1("tengu_slate_thimble",!1)}function mN(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return G0()}function kB(Z,q){if(!Z)return;let J=Z;if(q&&(J.startsWith("~/")||J.startsWith("~\\"))){let Q=J.slice(2),$=VJ(Q||".");if($==="."||$==="..")return;J=B4(fN(),Q)}let X=VJ(J).replace(/[/\\]+$/,"");if(!gN(X)||X.length<3||/^[A-Za-z]:$/.test(X)||X.startsWith("\\\\")||X.startsWith("//")||X.includes("\x00"))return;return(X+X5).normalize("NFC")}function NB(){return kB(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function pN(){let Z=p("policySettings")?.autoMemoryDirectory??p("flagSettings")?.autoMemoryDirectory??p("localSettings")?.autoMemoryDirectory??p("userSettings")?.autoMemoryDirectory;return kB(Z,!0)}function ut(){return NB()!==void 0}function dN(){return(p("policySettings")?.autoMemoryProjectLocal??p("flagSettings")?.autoMemoryProjectLocal??p("localSettings")?.autoMemoryProjectLocal??p("userSettings")?.autoMemoryProjectLocal)!==!1}function cN(){return n1(L4())??L4()}function xB(){return B4(z4(),uN)}function pt(Z){return VJ(Z).startsWith(z4())}var jB="memory",uN="MEMORY.md",z4;var BJ=B(()=>{I1();z2();Iq();o0();M6();k0();I7();MB();M0();TB();z4=u(()=>{let Z=NB()??pN();if(Z)return Z;let q=B4(mN(),"projects"),J=(B4(q,Uq(cN()),jB)+X5).normalize("NFC");if(!dN())return J;let X=n1(L4());if(!X)return J;let Q=(B4(X,".claudin",jB)+X5).normalize("NFC");try{N().mkdirSync(Q,{mode:448})}catch(Y){return S(Y),J}let $=!1;try{let Y=N().realpathSync(X),H=N().realpathSync(Q);if($=H===Y||H.startsWith(Y+X5),!$)S(Error(`Auto-memory directory escapes project root via symlink: ${Q} -> ${H}`))}catch(Y){S(Y)}if(!$)return J;try{hN(Q,448)}catch{}return AB(J,Q),Q},()=>L4())});var PB=c((ct,EB)=>{var k1=Y0("constants"),lN=process.cwd,Q5=null,nN=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!Q5)Q5=lN.call(process);return Q5};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if($5=process.chdir,process.chdir=function(Z){Q5=null,$5.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,$5)}var $5;EB.exports=iN;function iN(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=X(Z.chmod),Z.fchmod=X(Z.fchmod),Z.lchmod=X(Z.lchmod),Z.chownSync=Y(Z.chownSync),Z.fchownSync=Y(Z.fchownSync),Z.lchownSync=Y(Z.lchownSync),Z.chmodSync=Q(Z.chmodSync),Z.fchmodSync=Q(Z.fchmodSync),Z.lchmodSync=Q(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(W,V,L){if(L)process.nextTick(L)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(W,V,L,z){if(z)process.nextTick(z)},Z.lchownSync=function(){};if(nN==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(W){function V(L,z,_){var R=Date.now(),M=0;W(L,z,function F(k){if(k&&(k.code==="EACCES"||k.code==="EPERM"||k.code==="EBUSY")&&Date.now()-R<60000){if(setTimeout(function(){Z.stat(z,function(D,O){if(D&&D.code==="ENOENT")W(L,z,F);else _(k)})},M),M<100)M+=10;return}if(_)_(k)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,W);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(W){function V(L,z,_,R,M,F){var k;if(F&&typeof F==="function"){var D=0;k=function(O,T,j){if(O&&O.code==="EAGAIN"&&D<10)return D++,W.call(Z,L,z,_,R,M,k);F.apply(this,arguments)}}return W.call(Z,L,z,_,R,M,k)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,W);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(W){return function(V,L,z,_,R){var M=0;while(!0)try{return W.call(Z,V,L,z,_,R)}catch(F){if(F.code==="EAGAIN"&&M<10){M++;continue}throw F}}}(Z.readSync);function q(W){W.lchmod=function(V,L,z){W.open(V,k1.O_WRONLY|k1.O_SYMLINK,L,function(_,R){if(_){if(z)z(_);return}W.fchmod(R,L,function(M){W.close(R,function(F){if(z)z(M||F)})})})},W.lchmodSync=function(V,L){var z=W.openSync(V,k1.O_WRONLY|k1.O_SYMLINK,L),_=!0,R;try{R=W.fchmodSync(z,L),_=!1}finally{if(_)try{W.closeSync(z)}catch(M){}else W.closeSync(z)}return R}}function J(W){if(k1.hasOwnProperty("O_SYMLINK")&&W.futimes)W.lutimes=function(V,L,z,_){W.open(V,k1.O_SYMLINK,function(R,M){if(R){if(_)_(R);return}W.futimes(M,L,z,function(F){W.close(M,function(k){if(_)_(F||k)})})})},W.lutimesSync=function(V,L,z){var _=W.openSync(V,k1.O_SYMLINK),R,M=!0;try{R=W.futimesSync(_,L,z),M=!1}finally{if(M)try{W.closeSync(_)}catch(F){}else W.closeSync(_)}return R};else if(W.futimes)W.lutimes=function(V,L,z,_){if(_)process.nextTick(_)},W.lutimesSync=function(){}}function X(W){if(!W)return W;return function(V,L,z){return W.call(Z,V,L,function(_){if(U(_))_=null;if(z)z.apply(this,arguments)})}}function Q(W){if(!W)return W;return function(V,L){try{return W.call(Z,V,L)}catch(z){if(!U(z))throw z}}}function $(W){if(!W)return W;return function(V,L,z,_){return W.call(Z,V,L,z,function(R){if(U(R))R=null;if(_)_.apply(this,arguments)})}}function Y(W){if(!W)return W;return function(V,L,z){try{return W.call(Z,V,L,z)}catch(_){if(!U(_))throw _}}}function H(W){if(!W)return W;return function(V,L,z){if(typeof L==="function")z=L,L=null;function _(R,M){if(M){if(M.uid<0)M.uid+=4294967296;if(M.gid<0)M.gid+=4294967296}if(z)z.apply(this,arguments)}return L?W.call(Z,V,L,_):W.call(Z,V,_)}}function K(W){if(!W)return W;return function(V,L){var z=L?W.call(Z,V,L):W.call(Z,V);if(z){if(z.uid<0)z.uid+=4294967296;if(z.gid<0)z.gid+=4294967296}return z}}function U(W){if(!W)return!0;if(W.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(W.code==="EINVAL"||W.code==="EPERM")return!0}return!1}}});var yB=c((lt,CB)=>{var vB=Y0("stream").Stream;CB.exports=aN;function aN(Z){return{ReadStream:q,WriteStream:J};function q(X,Q){if(!(this instanceof q))return new q(X,Q);vB.call(this);var $=this;this.path=X,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,Q=Q||{};var Y=Object.keys(Q);for(var H=0,K=Y.length;H<K;H++){var U=Y[H];this[U]=Q[U]}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(W,V){if(W){$.emit("error",W),$.readable=!1;return}$.fd=V,$.emit("open",V),$._read()})}function J(X,Q){if(!(this instanceof J))return new J(X,Q);vB.call(this),this.path=X,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Q=Q||{};var $=Object.keys(Q);for(var Y=0,H=$.length;Y<H;Y++){var K=$[Y];this[K]=Q[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 bB=c((nt,SB)=>{SB.exports=sN;var oN=Object.getPrototypeOf||function(Z){return Z.__proto__};function sN(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var q={__proto__:oN(Z)};else var q=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(J){Object.defineProperty(q,J,Object.getOwnPropertyDescriptor(Z,J))}),q}});var MJ=c((it,RJ)=>{var s=Y0("fs"),rN=PB(),tN=yB(),eN=bB(),Y5=Y0("util"),V0,G5;if(typeof Symbol==="function"&&typeof Symbol.for==="function")V0=Symbol.for("graceful-fs.queue"),G5=Symbol.for("graceful-fs.previous");else V0="___graceful-fs.queue",G5="___graceful-fs.previous";function Zx(){}function fB(Z,q){Object.defineProperty(Z,V0,{get:function(){return q}})}var J2=Zx;if(Y5.debuglog)J2=Y5.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))J2=function(){var Z=Y5.format.apply(Y5,arguments);Z="GFS4: "+Z.split(/\n/).join(`
98
- GFS4: `),console.error(Z)};if(!s[V0]){if(LJ=global[V0]||[],fB(s,LJ),s.close=function(Z){function q(J,X){return Z.call(s,J,function(Q){if(!Q)hB();if(typeof X==="function")X.apply(this,arguments)})}return Object.defineProperty(q,G5,{value:Z}),q}(s.close),s.closeSync=function(Z){function q(J){Z.apply(s,arguments),hB()}return Object.defineProperty(q,G5,{value:Z}),q}(s.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){J2(s[V0]),Y0("assert").equal(s[V0].length,0)})}var LJ;if(!global[V0])fB(global,s[V0]);RJ.exports=zJ(eN(s));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched)RJ.exports=zJ(s),s.__patched=!0;function zJ(Z){rN(Z),Z.gracefulify=zJ,Z.createReadStream=T,Z.createWriteStream=j;var q=Z.readFile;Z.readFile=J;function J(w,x,P){if(typeof x==="function")P=x,x=null;return f(w,x,P);function f(i,v,C,d){return q(i,v,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))$6([f,[i,v,C],g,d||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var X=Z.writeFile;Z.writeFile=Q;function Q(w,x,P,f){if(typeof P==="function")f=P,P=null;return i(w,x,P,f);function i(v,C,d,g,K0){return X(v,C,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))$6([i,[v,C,d,g],l,K0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var $=Z.appendFile;if($)Z.appendFile=Y;function Y(w,x,P,f){if(typeof P==="function")f=P,P=null;return i(w,x,P,f);function i(v,C,d,g,K0){return $(v,C,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))$6([i,[v,C,d,g],l,K0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=K;function K(w,x,P,f){if(typeof P==="function")f=P,P=0;return i(w,x,P,f);function i(v,C,d,g,K0){return H(v,C,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))$6([i,[v,C,d,g],l,K0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var U=Z.readdir;Z.readdir=V;var W=/^v[0-5]\./;function V(w,x,P){if(typeof x==="function")P=x,x=null;var f=W.test(process.version)?function(C,d,g,K0){return U(C,i(C,d,g,K0))}:function(C,d,g,K0){return U(C,d,i(C,d,g,K0))};return f(w,x,P);function i(v,C,d,g){return function(K0,l){if(K0&&(K0.code==="EMFILE"||K0.code==="ENFILE"))$6([f,[v,C,d],K0,g||Date.now(),Date.now()]);else{if(l&&l.sort)l.sort();if(typeof d==="function")d.call(this,K0,l)}}}}if(process.version.substr(0,4)==="v0.8"){var L=tN(Z);F=L.ReadStream,D=L.WriteStream}var z=Z.ReadStream;if(z)F.prototype=Object.create(z.prototype),F.prototype.open=k;var _=Z.WriteStream;if(_)D.prototype=Object.create(_.prototype),D.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 D},set:function(w){D=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 M=D;Object.defineProperty(Z,"FileWriteStream",{get:function(){return M},set:function(w){M=w},enumerable:!0,configurable:!0});function F(w,x){if(this instanceof F)return z.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function k(){var w=this;b(w.path,w.flags,w.mode,function(x,P){if(x){if(w.autoClose)w.destroy();w.emit("error",x)}else w.fd=P,w.emit("open",P),w.read()})}function D(w,x){if(this instanceof D)return _.apply(this,arguments),this;else return D.apply(Object.create(D.prototype),arguments)}function O(){var w=this;b(w.path,w.flags,w.mode,function(x,P){if(x)w.destroy(),w.emit("error",x);else w.fd=P,w.emit("open",P)})}function T(w,x){return new Z.ReadStream(w,x)}function j(w,x){return new Z.WriteStream(w,x)}var A=Z.open;Z.open=b;function b(w,x,P,f){if(typeof P==="function")f=P,P=null;return i(w,x,P,f);function i(v,C,d,g,K0){return A(v,C,d,function(l,bP){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))$6([i,[v,C,d,g],l,K0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}return Z}function $6(Z){J2("ENQUEUE",Z[0].name,Z[1]),s[V0].push(Z),_J()}var H5;function hB(){var Z=Date.now();for(var q=0;q<s[V0].length;++q)if(s[V0][q].length>2)s[V0][q][3]=Z,s[V0][q][4]=Z;_J()}function _J(){if(clearTimeout(H5),H5=void 0,s[V0].length===0)return;var Z=s[V0].shift(),q=Z[0],J=Z[1],X=Z[2],Q=Z[3],$=Z[4];if(Q===void 0)J2("RETRY",q.name,J),q.apply(null,J);else if(Date.now()-Q>=60000){J2("TIMEOUT",q.name,J);var Y=J.pop();if(typeof Y==="function")Y.call(null,X)}else{var H=Date.now()-$,K=Math.max($-Q,1),U=Math.min(K*1.2,100);if(H>=U)J2("RETRY",q.name,J),q.apply(null,J.concat([Q]));else s[V0].push(Z)}if(H5===void 0)H5=setTimeout(_J,0)}});var mB=c((at,gB)=>{function C0(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)}gB.exports=C0;C0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};C0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};C0.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 X=this,Q=setTimeout(function(){if(X._attempts++,X._operationTimeoutCb){if(X._timeout=setTimeout(function(){X._operationTimeoutCb(X._attempts)},X._operationTimeout),X._options.unref)X._timeout.unref()}X._fn(X._attempts)},J);if(this._options.unref)Q.unref();return!0};C0.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)};C0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};C0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};C0.prototype.start=C0.prototype.try;C0.prototype.errors=function(){return this._errors};C0.prototype.attempts=function(){return this._attempts};C0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},q=null,J=0;for(var X=0;X<this._errors.length;X++){var Q=this._errors[X],$=Q.message,Y=(Z[$]||0)+1;if(Z[$]=Y,Y>=J)q=Q,J=Y}return q}});var pB=c((Jx)=>{var qx=mB();Jx.operation=function(Z){var q=Jx.timeouts(Z);return new qx(q,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};Jx.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 X=[];for(var Q=0;Q<q.retries;Q++)X.push(this.createTimeout(Q,q));if(Z&&Z.forever&&!X.length)X.push(this.createTimeout(Q,q));return X.sort(function($,Y){return $-Y}),X};Jx.createTimeout=function(Z,q){var J=q.randomize?Math.random()+1:1,X=Math.round(J*q.minTimeout*Math.pow(q.factor,Z));return X=Math.min(X,q.maxTimeout),X};Jx.wrap=function(Z,q,J){if(q instanceof Array)J=q,q=null;if(!J){J=[];for(var X in Z)if(typeof Z[X]==="function")J.push(X)}for(var Q=0;Q<J.length;Q++){var $=J[Q],Y=Z[$];Z[$]=function(K){var U=Jx.operation(q),W=Array.prototype.slice.call(arguments,1),V=W.pop();W.push(function(L){if(U.retry(L))return;if(L)arguments[0]=U.mainError();V.apply(this,arguments)}),U.attempt(function(){K.apply(Z,W)})}.bind(Z,Y),Z[$].options=q}}});var dB=c((st,K5)=>{K5.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")K5.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")K5.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var cB=c((rt,H6)=>{var n=global.process,X2=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(!X2(n))H6.exports=function(){return function(){}};else{if(FJ=Y0("assert"),Q2=dB(),DJ=/^win/i.test(n.platform),Y6=Y0("events"),typeof Y6!=="function")Y6=Y6.EventEmitter;if(n.__signal_exit_emitter__)X0=n.__signal_exit_emitter__;else X0=n.__signal_exit_emitter__=new Y6,X0.count=0,X0.emitted={};if(!X0.infinite)X0.setMaxListeners(1/0),X0.infinite=!0;H6.exports=function(Z,q){if(!X2(global.process))return function(){};if(FJ.equal(typeof Z,"function","a callback must be provided for exit handler"),$2===!1)U5();var J="exit";if(q&&q.alwaysLast)J="afterexit";var X=function(){if(X0.removeListener(J,Z),X0.listeners("exit").length===0&&X0.listeners("afterexit").length===0)_4()};return X0.on(J,Z),X},_4=function(){if(!$2||!X2(global.process))return;$2=!1,Q2.forEach(function(q){try{n.removeListener(q,R4[q])}catch(J){}}),n.emit=M4,n.reallyExit=W5,X0.count-=1},H6.exports.unload=_4,N1=function(q,J,X){if(X0.emitted[q])return;X0.emitted[q]=!0,X0.emit(q,J,X)},R4={},Q2.forEach(function(Z){R4[Z]=function(){if(!X2(global.process))return;var J=n.listeners(Z);if(J.length===X0.count){if(_4(),N1("exit",null,Z),N1("afterexit",null,Z),DJ&&Z==="SIGHUP")Z="SIGINT";n.kill(n.pid,Z)}}}),H6.exports.signals=function(){return Q2},$2=!1,U5=function(){if($2||!X2(global.process))return;$2=!0,X0.count+=1,Q2=Q2.filter(function(q){try{return n.on(q,R4[q]),!0}catch(J){return!1}}),n.emit=TJ,n.reallyExit=AJ},H6.exports.load=U5,W5=n.reallyExit,AJ=function(q){if(!X2(global.process))return;n.exitCode=q||0,N1("exit",n.exitCode,null),N1("afterexit",n.exitCode,null),W5.call(n,n.exitCode)},M4=n.emit,TJ=function(q,J){if(q==="exit"&&X2(global.process)){if(J!==void 0)n.exitCode=J;var X=M4.apply(this,arguments);return N1("exit",n.exitCode,null),N1("afterexit",n.exitCode,null),X}else return M4.apply(this,arguments)}}var FJ,Q2,DJ,Y6,X0,_4,N1,R4,$2,U5,W5,AJ,M4,TJ});var nB=c((Gx,jJ)=>{var lB=Symbol();function Yx(Z,q,J){let X=q[lB];if(X)return q.stat(Z,($,Y)=>{if($)return J($);J(null,Y.mtime,X)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);q.utimes(Z,Q,Q,($)=>{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,lB,{value:K}),J(null,H.mtime,K)})})}function Hx(Z){let q=Date.now();if(Z==="s")q=Math.ceil(q/1000)*1000;return new Date(q)}Gx.probe=Yx;Gx.getMtime=Hx});var rB=c((Rx,D4)=>{var Wx=Y0("path"),wJ=MJ(),Vx=pB(),Bx=cB(),iB=nB(),L1={};function F4(Z,q){return q.lockfilePath||`${Z}.lock`}function kJ(Z,q,J){if(!q.realpath)return J(null,Wx.resolve(Z));q.fs.realpath(Z,J)}function OJ(Z,q,J){let X=F4(Z,q);q.fs.mkdir(X,(Q)=>{if(!Q)return iB.probe(X,q.fs,($,Y,H)=>{if($)return q.fs.rmdir(X,()=>{}),J($);J(null,Y,H)});if(Q.code!=="EEXIST")return J(Q);if(q.stale<=0)return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));q.fs.stat(X,($,Y)=>{if($){if($.code==="ENOENT")return OJ(Z,{...q,stale:0},J);return J($)}if(!aB(Y,q))return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));oB(Z,q,(H)=>{if(H)return J(H);OJ(Z,{...q,stale:0},J)})})})}function aB(Z,q){return Z.mtime.getTime()<Date.now()-q.stale}function oB(Z,q,J){q.fs.rmdir(F4(Z,q),(X)=>{if(X&&X.code!=="ENOENT")return J(X);J()})}function V5(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,(X,Q)=>{let $=J.lastUpdate+q.stale<Date.now();if(X){if(X.code==="ENOENT"||$)return IJ(Z,J,Object.assign(X,{code:"ECOMPROMISED"}));return J.updateDelay=1000,V5(Z,q)}if(J.mtime.getTime()!==Q.mtime.getTime())return IJ(Z,J,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=iB.getMtime(J.mtimePrecision);q.fs.utimes(J.lockfilePath,H,H,(K)=>{let U=J.lastUpdate+q.stale<Date.now();if(J.released)return;if(K){if(K.code==="ENOENT"||U)return IJ(Z,J,Object.assign(K,{code:"ECOMPROMISED"}));return J.updateDelay=1000,V5(Z,q)}J.mtime=H,J.lastUpdate=Date.now(),J.updateDelay=null,V5(Z,q)})})},J.updateDelay),J.updateTimeout.unref)J.updateTimeout.unref()}function IJ(Z,q,J){if(q.released=!0,q.updateTimeout)clearTimeout(q.updateTimeout);if(L1[Z]===q)delete L1[Z];q.options.onCompromised(J)}function Lx(Z,q,J){q={stale:1e4,update:null,realpath:!0,retries:0,fs:wJ,onCompromised:(X)=>{throw X},...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),kJ(Z,q,(X,Q)=>{if(X)return J(X);let $=Vx.operation(q.retries);$.attempt(()=>{OJ(Q,q,(Y,H,K)=>{if($.retry(Y))return;if(Y)return J($.mainError());let U=L1[Q]={lockfilePath:F4(Q,q),mtime:H,mtimePrecision:K,options:q,lastUpdate:Date.now()};V5(Q,q),J(null,(W)=>{if(U.released)return W&&W(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));sB(Q,{...q,realpath:!1},W)})})})})}function sB(Z,q,J){q={fs:wJ,realpath:!0,...q},kJ(Z,q,(X,Q)=>{if(X)return J(X);let $=L1[Q];if(!$)return J(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));$.updateTimeout&&clearTimeout($.updateTimeout),$.released=!0,delete L1[Q],oB(Q,q,J)})}function zx(Z,q,J){q={stale:1e4,realpath:!0,fs:wJ,...q},q.stale=Math.max(q.stale||0,2000),kJ(Z,q,(X,Q)=>{if(X)return J(X);q.fs.stat(F4(Q,q),($,Y)=>{if($)return $.code==="ENOENT"?J(null,!1):J($);return J(null,!aB(Y,q))})})}function _x(){return L1}Bx(()=>{for(let Z in L1){let q=L1[Z].options;try{q.fs.rmdirSync(F4(Z,q))}catch(J){}}});Rx.lock=Lx;Rx.unlock=sB;Rx.check=zx;Rx.getLocks=_x});var eB=c((tt,tB)=>{var Tx=MJ();function jx(Z){let q=["mkdir","realpath","stat","rmdir","utimes"],J={...Z};return q.forEach((X)=>{J[X]=(...Q)=>{let $=Q.pop(),Y;try{Y=Z[`${X}Sync`](...Q)}catch(H){return $(H)}$(null,Y)}}),J}function Ix(Z){return(...q)=>new Promise((J,X)=>{q.push((Q,$)=>{if(Q)X(Q);else J($)}),Z(...q)})}function Ox(Z){return(...q)=>{let J,X;if(q.push((Q,$)=>{J=Q,X=$}),Z(...q),J)throw J;return X}}function wx(Z){if(Z={...Z},Z.fs=jx(Z.fs||Tx),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}tB.exports={toPromise:Ix,toSync:Ox,toSyncOptions:wx}});var qL=c((et,x1)=>{var G6=rB(),{toPromise:B5,toSync:L5,toSyncOptions:NJ}=eB();async function ZL(Z,q){let J=await B5(G6.lock)(Z,q);return B5(J)}function kx(Z,q){let J=L5(G6.lock)(Z,NJ(q));return L5(J)}function Nx(Z,q){return B5(G6.unlock)(Z,q)}function xx(Z,q){return L5(G6.unlock)(Z,NJ(q))}function Ex(Z,q){return B5(G6.check)(Z,q)}function Px(Z,q){return L5(G6.check)(Z,NJ(q))}x1.exports=ZL;x1.exports.lock=ZL;x1.exports.unlock=Nx;x1.exports.lockSync=kx;x1.exports.unlockSync=xx;x1.exports.check=Ex;x1.exports.checkSync=Px});function EJ(){if(!xJ)xJ=qL();return xJ}function Ze(Z,q){return EJ().lock(Z,q)}function JL(Z,q){return EJ().lockSync(Z,q)}function qe(Z,q){return EJ().check(Z,q)}var xJ;var XL=()=>{};function A4(Z){if(Z===void 0)return!1;let q=Z.trim().toLowerCase();return q==="0"||q==="false"||q==="no"||q==="off"||q===""}function Cx(){let Z=process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC,q=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&A4(Z)||q!==void 0&&A4(q)){if(process.env.DISABLE_TELEMETRY&&!A4(process.env.DISABLE_TELEMETRY))return"no-telemetry";return"default"}return"essential-traffic"}function PJ(){return Cx()==="essential-traffic"}function vJ(){if(!PJ())return null;let Z=process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&!A4(Z))return"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";let q=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(q!==void 0&&!A4(q))return"ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC";return"claudin-default"}function QL(){let Z=vJ();return Z==="claudin-default"?null:Z}var CJ=()=>{};import{dirname as yx,join as $L}from"path";function HL(Z){return[$L(Z,z5),$L(Z,YL)]}function Sx(Z,q){let[J,X]=HL(Z);return q(J)?J:X}function bx(Z,q){return HL(Z).some((J)=>q(J))}function Qe(Z,q){let J=Z;while(!0){if(bx(J,q))return Sx(J,q);let X=yx(J);if(X===J)return null;J=X}}function $e(Z){return Z===z5||Z===YL}var z5="AGENTS.md",YL="CLAUDE.md";var GL=()=>{};var hx,fx;var KL=B(()=>{hx=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","os_native","notifications_disabled"],fx=["normal","vim"]});var _L={};bq(_L,{validateTeamMemWritePath:()=>nx,validateTeamMemKey:()=>ix,isTeamMemoryEnabled:()=>VL,isTeamMemPath:()=>zL,isTeamMemLikelyGitIgnored:()=>lx,isTeamMemFile:()=>ax,getTeamMemPath:()=>j4,getTeamMemEntrypoint:()=>px,PathTraversalError:()=>_0});import{readFileSync as gx}from"fs";import{lstat as mx,realpath as WL}from"fs/promises";import{dirname as UL,join as T4,resolve as yJ,sep as SJ}from"path";function ux(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 VL(){if(!wB())return!1;return s1("tengu_herring_clock",!0)}function j4(){return(T4(z4(),"team")+SJ).normalize("NFC")}function px(){return T4(z4(),"team","MEMORY.md")}async function BL(Z){let q=[],J=Z;for(let X=UL(J);J!==X;X=UL(J))try{let Q=await WL(J);return q.length===0?Q:T4(Q,...q.reverse())}catch(Q){let $=W0(Q);if($==="ENOENT")try{if((await mx(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(X.length+SJ.length)),J=X}return Z}async function LL(Z){let q;try{q=await WL(j4().replace(/[/\\]+$/,""))}catch(J){let X=W0(J);if(X==="ENOENT"||X==="ENOTDIR")return!0;return!1}if(Z===q)return!0;return Z.startsWith(q+SJ)}function zL(Z){let q=yJ(Z),J=j4();return q.startsWith(J)}async function nx(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path: "${Z}"`);let q=yJ(Z),J=j4();if(!q.startsWith(J))throw new _0(`Path escapes team memory directory: "${Z}"`);let X=await BL(q);if(!await LL(X))throw new _0(`Path escapes team memory directory via symlink: "${Z}"`);return q}async function ix(Z){ux(Z);let q=j4(),J=T4(q,Z),X=yJ(J);if(!X.startsWith(q))throw new _0(`Key escapes team memory directory: "${Z}"`);let Q=await BL(X);if(!await LL(Q))throw new _0(`Key escapes team memory directory via symlink: "${Z}"`);return X}function ax(Z){return VL()&&zL(Z)}var _0,dx,cx,lx;var RL=B(()=>{I1();Iq();o1();BJ();_0=class _0 extends Error{constructor(Z){super(Z);this.name="PathTraversalError"}};dx=/^\/?\.claudin\/?$/,cx=/^!\/?\.claudin\/memory\/team\/?/,lx=u((Z)=>{try{let q=gx(T4(Z,".gitignore"),"utf-8"),J=!1;for(let X of q.split(`
99
- `)){let Q=X.trim();if(!Q||Q.startsWith("#"))continue;if(dx.test(Q))J=!0;else if(cx.test(Q))J=!1}return J}catch{return!1}})});import{randomBytes as ox}from"crypto";import{unwatchFile as sx,watchFile as rx}from"fs";import{basename as T5,dirname as j5,join as D0,resolve as M5}from"path";function z1(){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,workflowsDefaultBackground:!1}}function ue(Z){return ex.includes(Z)}function pe(){DL=!1}function de(){return DL||=qE()}function qE(){if(FL())return!0;let Z=Q0(),q=dJ();if(Z.projects?.[q]?.hasTrustDialogAccepted)return!0;let X=a1(t());while(!0){if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let $=a1(M5(X,".."));if($===X)break;X=$}return!1}function ce(Z){let q=Q0(),J=a1(M5(Z));while(!0){if(q.projects?.[J]?.hasTrustDialogAccepted)return!0;let X=a1(M5(J,".."));if(X===J)return!1;J=X}}function le(){return}function ne(){return}function ie(Z){return ZE.includes(Z)}function O5(Z){let q=t0.config;if(!q)return!1;let J=q.oauthAccount!==void 0&&Z.oauthAccount===void 0,X=q.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return J||X}function AL(Z){return gJ.add(Z),()=>gJ.delete(Z)}function F5(){for(let Z of gJ)try{Z()}catch{}}function mJ(Z){return{...Z,projects:QE(Z.projects)}}function A0(Z){let q=null;try{if(jL(z0(),z1,(X)=>{let Q=Z(X);if(Q===X)return X;return q=mJ(Q),q})&&q)D5(q),F5()}catch(J){let X=W0(J);if(X==="EACCES"||X==="EPERM"||X==="EROFS"){E(`Skipping global config write due to permission error: ${J}`,{level:"error"});return}E(`Failed to save config with lock: ${J}`,{level:"error"});let Q=H2(z0(),z1);if(O5(Q)){E("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),s0("tengu_config_auth_loss_prevented",{});return}let $=Z(Q);if($===Q)return;q=mJ($),TL(z0(),q,I5),D5(q),F5()}}function ae(){return pJ}function XE(){let Z=I4+R5;if(Z>0)s0("tengu_config_cache_stats",{cache_hits:I4,cache_misses:R5,hit_rate:I4/Z});I4=0,R5=0}function uJ(Z){if(Z.installMethod!==void 0)return Z;let q=Z,J="unknown",X=Z.autoUpdates??!0;switch(q.autoUpdaterStatus){case"migrated":J="local";break;case"installed":J="native";break;case"disabled":X=!1;break;case"enabled":case"no_permissions":case"not_configured":J="global";break;case void 0:break}return{...Z,installMethod:J,autoUpdates:X}}function QE(Z){if(!Z)return Z;let q={},J=!1;for(let[X,Q]of Object.entries(Z)){let $=Q;if($.history!==void 0){J=!0;let{history:Y,...H}=$;q[X]=H}else q[X]=Q}return J?q:Z}function YE(){if(fJ)return;fJ=!0;let Z=z0();rx(Z,{interval:$E,persistent:!1},(q)=>{if(q.mtimeMs<=t0.mtime)return;N().readFile(Z,{encoding:"utf-8"}).then((J)=>{if(q.mtimeMs<=t0.mtime)return;let X=m0(P0(J));if(X===null||typeof X!=="object")return;t0={config:uJ({...z1(),...X}),mtime:q.mtimeMs},E1={mtime:q.mtimeMs,size:q.size}}).catch(()=>{})}),_6(async()=>{sx(Z),fJ=!1})}function D5(Z){t0={config:Z,mtime:Date.now()},E1=null}function Q0(){if(t0.config)return I4++,t0.config;R5++;try{let Z=null;try{Z=N().statSync(z0())}catch{}let q=uJ(H2(z0(),z1));return t0={config:q,mtime:Z?.mtimeMs??Date.now()},E1=Z?{mtime:Z.mtimeMs,size:Z.size}:null,YE(),q}catch{return uJ(H2(z0(),z1))}}function se(){let Z=Q0().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function re(Z){let q=Q0();if(q.customApiKeyResponses?.approved?.includes(Z))return"approved";if(q.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function TL(Z,q,J){let X=j5(Z);N().mkdirSync(X);let $=e5(q,(Y,H)=>m(Y)!==m(J[H]));if(i2(Z,m($,null,2),{encoding:"utf-8",mode:384}),Z===z0())pJ++}function jL(Z,q,J){let X=q(),Q=j5(Z),$=N();$.mkdirSync(Q);let Y;try{let H=`${Z}.lock`,K=Date.now();Y=JL(Z,{lockfilePath:H,onCompromised:(z)=>{E(`Config lock compromised: ${z}`,{level:"error"})}});let U=Date.now()-K;if(U>100)E("Lock acquisition took longer than expected - another Claude instance may be running"),s0("tengu_config_lock_contention",{lock_time_ms:U});if(E1&&Z===z0())try{let z=$.statSync(Z);if(z.mtimeMs!==E1.mtime||z.size!==E1.size)s0("tengu_config_stale_write",{read_mtime:E1.mtime,write_mtime:z.mtimeMs,read_size:E1.size,write_size:z.size})}catch(z){if(W0(z)!=="ENOENT")throw z}let W=H2(Z,q);if(Z===z0()&&O5(W))return E("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claudin/config.json. See GH #3117.",{level:"error"}),s0("tengu_config_auth_loss_prevented",{}),!1;let V=J(W);if(V===W)return!1;let L=e5(V,(z,_)=>m(z)!==m(X[_]));try{let z=T5(Z),_=w5();try{$.mkdirSync(_)}catch(j){if(W0(j)!=="EEXIST")throw j}let R=60000,M=$.readdirStringSync(_).filter((j)=>j.startsWith(`${z}.backup.`)).sort().reverse(),F=M[0],k=F?Number(F.split(".backup.").pop()):0,D=Number.isNaN(k)||Date.now()-k>=R,O=HE(Z),T=D&&O;if(T){let j=D0(_,`${z}.backup.${Date.now()}`);$.copyFileSync(Z,j)}if(O){let A=T?$.readdirStringSync(_).filter((b)=>b.startsWith(`${z}.backup.`)).sort().reverse():M;for(let b of A.slice(5))try{$.unlinkSync(D0(_,b))}catch{}}}catch(z){if(W0(z)!=="ENOENT")E(`Failed to backup config: ${z}`,{level:"error"})}if(i2(Z,m(L,null,2),{encoding:"utf-8",mode:384}),Z===z0())pJ++;return!0}finally{if(Y)Y()}}function te(){return A5}function ee(){if(A5)return;let Z=Date.now();H0("info","enable_configs_started"),A5=!0,H2(z0(),z1,!0),H0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function w5(){return D0(G0(),"backups")}function ML(Z){let q=N(),J=T5(Z),X=w5();try{let Y=q.readdirStringSync(X).filter((H)=>H.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return D0(X,Y)}catch{}let Q=j5(Z);try{let Y=q.readdirStringSync(Q).filter((K)=>K.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return D0(Q,Y);let H=`${Z}.backup`;try{return q.statSync(H),H}catch{}}catch{}return null}function HE(Z){let q=N();try{return Z0(P0(q.readFileSync(Z,{encoding:"utf-8"}))),!0}catch{return!1}}function GE(Z,q){let J=N(),X=T5(Z),Q=new Set;for(let $ of[w5(),j5(Z)]){let Y;try{Y=J.readdirStringSync($).filter((H)=>H.startsWith(`${X}.backup.`)).sort().reverse()}catch{continue}for(let H of Y){let K=D0($,H);if(Q.has(K))continue;Q.add(K);try{let U=Z0(P0(J.readFileSync(K,{encoding:"utf-8"})));return{config:{...q(),...U},backupPath:K}}catch{}}}return null}function H2(Z,q,J){if(!A5)throw Error("Config accessed before allowed.");let X=N();try{let Q=X.readFileSync(Z,{encoding:"utf-8"});try{let $=Z0(P0(Q));return{...q(),...$}}catch($){let Y=$ instanceof Error?$.message:String($);throw new _5(Y,Z,q())}}catch(Q){if(W0(Q)==="ENOENT"){let Y=ML(Z);if(Y)process.stderr.write(`
100
- Claude configuration file not found at: ${Z}
101
- A backup file exists at: ${Y}
102
- You can manually restore it by running: cp "${Y}" "${Z}"
103
-
104
- `);return q()}if(Q instanceof _5&&J)throw Q;if(Q instanceof _5){if(E(`Config file corrupted, resetting to defaults: ${Q.message}`,{level:"error"}),!bJ){bJ=!0;try{S(Q);let _=!1;try{X.statSync(`${Z}.backup`),_=!0}catch{}s0("tengu_config_parse_error",{has_backup:_})}finally{bJ=!1}}process.stderr.write(`
105
- Claude configuration file at ${Z} is corrupted: ${Q.message}
106
- `);let Y=T5(Z),H=w5();try{X.mkdirSync(H)}catch(_){if(W0(_)!=="EEXIST")throw _}let K=X.readdirStringSync(H).filter((_)=>_.startsWith(`${Y}.corrupted.`)),U,W=!1,V=X.readFileSync(Z,{encoding:"utf-8"});for(let _ of K)try{let R=X.readFileSync(D0(H,_),{encoding:"utf-8"});if(V===R){W=!0;break}}catch{}if(!W){U=D0(H,`${Y}.corrupted.${Date.now()}`);try{X.copyFileSync(Z,U),E(`Corrupted config backed up to: ${U}`,{level:"error"})}catch{}}let L=GE(Z,q);if(L){if(U)process.stderr.write(`The corrupted file has been backed up to: ${U}
107
- `);let _=!1;try{X.copyFileSync(L.backupPath,Z),_=!0}catch{}return process.stderr.write(_?`Recovered configuration from backup: ${L.backupPath}
108
-
109
- `:`Recovered configuration from backup (in memory): ${L.backupPath}
110
-
111
- `),L.config}let z=ML(Z);if(U)process.stderr.write(`The corrupted file has been backed up to: ${U}
112
- `);else if(W)process.stderr.write(`The corrupted file has already been backed up.
113
- `);if(z)process.stderr.write(`A backup file exists at: ${z}
114
- You can manually restore it by running: cp "${z}" "${Z}"
115
-
116
- `);else process.stderr.write(`
117
- `)}return q()}}function dJ(){let Z=q2(),q=Y2.get(Z);if(q!==void 0)return Y2.delete(Z),Y2.set(Z,q),q;let J=n1(Z),X=J?a1(J):a1(M5(Z));if(Y2.size>=KE){let Q=Y2.keys().next().value;if(Q!==void 0)Y2.delete(Q)}return Y2.set(Z,X),X}function k5(){let Z=dJ(),q=Q0();if(!q.projects)return K6;let J=q.projects[Z]??K6;if(typeof J.allowedTools==="string")J.allowedTools=m0(J.allowedTools)??[];return J}function cJ(Z){let q=dJ(),J=null;try{if(jL(z0(),z1,(Q)=>{let $=Q.projects?.[q]??K6,Y=Z($);if(Y===$)return Q;return J={...Q,projects:{...Q.projects,[q]:Y}},J})&&J)D5(J),F5()}catch(X){E(`Failed to save config with lock: ${X}`,{level:"error"});let Q=H2(z0(),z1);if(O5(Q)){E("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),s0("tengu_config_auth_loss_prevented",{});return}let $=Q.projects?.[q]??K6,Y=Z($);if(Y===$)return;J={...Q,projects:{...Q.projects,[q]:Y}},TL(z0(),J,I5),D5(J),F5()}}function UE(){return WE()!==null}function Z00(){return UE()&&!q0(process.env.FORCE_AUTOUPDATE_PLUGINS)}function q00(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function WE(Z){if(q0(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let q=Z?.ignoreClaudinDefaultPrivacy?QL():vJ();if(q)return{type:"env",envVar:q};let J=Q0();if(J.autoUpdates===!1&&(J.installMethod!=="native"||J.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function J00(){let Z=Q0();if(Z.userID)return Z.userID;let q=ox(32).toString("hex");return A0((J)=>({...J,userID:q})),q}function X00(){if(!Q0().firstStartTime){let q=new Date().toISOString();A0((J)=>({...J,firstStartTime:J.firstStartTime??q}))}}function Q00(Z){let q=q2();switch(Z){case"User":return D0(G0(),"CLAUDE.md");case"Local":return D0(q,"CLAUDE.local.md");case"Project":return D0(q,z5);case"Managed":return D0(w1(),"CLAUDE.md");case"AutoMem":return xB()}return tx.getTeamMemEntrypoint()}function $00(){return D0(w1(),".claudin","rules")}function Y00(){return D0(G0(),"rules")}function U00(Z){t0.config=Z,t0.mtime=Z?Date.now():0}var tx,bJ=!1,K6,me,I5,ex,ZE,DL=!1,JE,hJ,gJ,t0,E1=null,I4=0,R5=0,pJ=0,oe=20,$E=1000,fJ=!1,A5=!1,KE=32,Y2,H00,G00,K00;var lJ=B(()=>{FQ();z2();BJ();VW();Z1();kQ();K1();L6();Sq();o0();o1();v7();M0();M6();h7();E7();XL();k0();I7();CJ();g7();GL();R0();KL();tx=(RL(),O4(_L)),K6={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},me=["off","compact","full"];I5=z1(),ex=["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","renderFrameRate","permissionExplainerEnabled","prStatusFooterEnabled","prStatusHosts","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled","autoBackgroundAgentsEnabled","repeatedFailureHintEnabled","workflowsDefaultBackground","oauthBrowser","inlineImagesMode"];ZE=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"];JE={...I5,autoUpdates:!1,knowledgeGraphEnabled:!0};hJ={...K6};gJ=new Set;t0={config:null,mtime:0};_6(async()=>{XE()});Y2=new Map;H00=H2,G00=O5,K00=mJ});function N5(Z){return Z.split(/[;,]/).map((q)=>q.trim()).filter((q)=>q.length>0)}function IL(Z){let q=N5(Z);return q.length>0?q[0]:Z.trim()}var nJ=()=>{};import{randomBytes as VE}from"crypto";function U6(Z){return Z?.trim()??""}function B0(Z){let q=U6(Z);return q.length>0?q:void 0}function BE(Z){return U6(Z).replace(/\/+$/,"")}function LE(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function zE(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function _E(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let q={};for(let[J,X]of Object.entries(Z)){let Q=U6(J),$=typeof X==="string"?X.trim():"";if(Q.length>0&&$.length>0)q[Q]=$}return Object.keys(q).length>0?q:void 0}function RE(Z){if(!Z||typeof Z!=="object")return;let q={},J=B0(Z.codexAuthPath);if(J)q.codexAuthPath=J;let X=B0(Z.codexAccountId);if(X)q.codexAccountId=X;let Q=B0(Z.githubToken);if(Q)q.githubToken=Q;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 U=_E(Z.customHeaders);if(U)q.customHeaders=U;let W=zE(Z.reasoningEffort);if(W)q.reasoningEffort=W;return Object.keys(q).length>0?q:void 0}function xL(Z){let q=U6(Z.id),J=U6(Z.name),X=LE(Z.provider),Q=BE(Z.baseUrl),$=U6(Z.model);if(!q||!J||!Q||X!=="anthropic"&&!$)return null;let H={id:q,name:J,provider:X,baseUrl:Q,model:$,apiKey:B0(Z.apiKey)},K=RE(Z.extras);if(K)H.extras=K;return H}function ME(Z){let q=new Set,J=[];for(let X of Z??[]){let Q=xL(X);if(!Q||q.has(Q.id))continue;q.add(Q.id),J.push(Q)}return J}function FE(){return`provider_${VE(6).toString("hex")}`}function EL(Z,q=FE()){return xL({id:q,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function PL(Z,q=Q0()){return q.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function R00(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"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:OL,model:wL,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:OL,model:wL,apiKey:"",requiresApiKey:!1}}}function u0(Z=Q0()){return ME(Z.providerProfiles)}function M00(Z=Q0()){return u0(Z).length>0}function _1(Z=Q0()){let q=u0(Z);if(q.length===0)return;let J=B0(k5().activeProviderProfileId);if(J){let Q=q.find(($)=>$.id===J);if(Q)return Q}let X=B0(Z.activeProviderProfileId);return q.find((Q)=>Q.id===X)??q[0]}function F00(){let Z=B0(k5().activeProviderProfileId);if(!Z)return;return u0().some((J)=>J.id===Z)?Z:void 0}function DE(){return B0(k5().activeProviderProfileId)}function D00(){return DE()!==void 0}function AE(){return B0(Q0().activeProviderProfileId)}function A00(Z,q){let J=EL(Z);if(!J)return null;let X=q?.makeActive??!0;if(A0((Q)=>{let Y=[...u0(Q),J],H=B0(Q.activeProviderProfileId),K=X||!H||!Y.some((U)=>U.id===H)?J.id:H;return{...Q,providerProfiles:Y,activeProviderProfileId:K}}),AE()===J.id)jE(J.id),OE();return J}function T00(Z,q){let J=EL(q,Z);if(!J)return null;let X=!1;if(A0((Q)=>{let $=u0(Q),Y=$.findIndex((L)=>L.id===Z);if(Y<0)return Q;X=!0;let H=[...$];H[Y]=J;let K={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete K[Z];let U=B0(Q.activeProviderProfileId),W=U&&H.some((L)=>L.id===U)?U:H[0]?.id;return{...Q,providerProfiles:H,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:K,openaiAdditionalModelOptionsCache:W===Z?[]:Q.openaiAdditionalModelOptionsCache}}),!X)return null;return J}function j00(Z){let q=B0(Z);if(!q)return null;let J=_1();if(!J)return null;if(N5(J.model).includes(q))return J;A0(($)=>{let Y=u0($),H=Y.findIndex((V)=>V.id===J.id);if(H<0)return $;let K=Y[H];if(K.model===q)return $;let U=[...Y];U[H]={...K,model:q};let W={...$.openaiAdditionalModelOptionsCacheByProfile??{}};return delete W[J.id],{...$,providerProfiles:U,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:[]}});let Q=_1();if(!Q||Q.id!==J.id)return null;return Q}function I00(){let Z=_1();if(!Z)return;A0((q)=>{let J=u0(q),X=J.findIndex((H)=>H.id===Z.id);if(X<0)return q;let Q=J[X];if(!Q.model)return q;let $=[...J];$[X]={...Q,model:""};let Y={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete Y[Z.id],{...q,providerProfiles:$,openaiAdditionalModelOptionsCacheByProfile:Y,openaiAdditionalModelOptionsCache:[]}})}function TE(Z){let q=N5(Z.model);if(q.length===0)return[];return q.map((J)=>({value:J,label:J,description:`Provider: ${Z.name}`}))}function iJ(Z,q){let J=TE(Z);return{openaiAdditionalModelOptionsCache:J.length>0?J:PL(Z.id,q),openaiAdditionalModelOptionsCacheByProfile:{...q.openaiAdditionalModelOptionsCacheByProfile??{},[Z.id]:J.length>0?J:q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[]}}}function jE(Z){let q=Q0(),X=u0(q).find((Q)=>Q.id===Z);if(!X)return null;return A0((Q)=>({...Q,activeProviderProfileId:Z,...iJ(X,Q)})),X}function O00(Z){if(Z===null){cJ(($)=>({...$,activeProviderProfileId:void 0,activeModelForProject:void 0,activeModelForProjectProfileId:void 0}));let Q=_1();if(Q)kL(Q);return null}let J=u0().find((Q)=>Q.id===Z);if(!J)return null;let X=!1;if(cJ((Q)=>{if(!u0().some((H)=>H.id===Z))return X=!0,Q;let Y={...Q,activeProviderProfileId:Z};if(Q.activeProviderProfileId!==Z)Y.activeModelForProject=void 0,Y.activeModelForProjectProfileId=void 0;return Y}),X)return null;return kL(J),J}function kL(Z){let q=Q0(),J=iJ(Z,q),X=q.openaiAdditionalModelOptionsCache??[],Q=q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[],$=J.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[];if(NL(X,J.openaiAdditionalModelOptionsCache??[])&&NL(Q,$))return;A0((Y)=>({...Y,...iJ(Z,Y)}))}function NL(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 IE(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 X=[];return{projects:Object.fromEntries(Object.entries(Z).map(([$,Y])=>{let H=J(Y);if(H!==void 0){let{activeProviderProfileId:K,activeModelForProject:U,activeModelForProjectProfileId:W,...V}=Y;return X.push({path:$,activeProviderProfileId:H,activeModelForProject:U??void 0}),[$,V]}return[$,Y]})),stripped:X}}function w00(Z){let q=!1,J;return A0((X)=>{let Q=u0(X);if(!Q.find((L)=>L.id===Z))return X;q=!0;let Y=Q.filter((L)=>L.id!==Z),H=B0(X.activeProviderProfileId),U=!H||H===Z||!Y.some((L)=>L.id===H)?Y[0]?.id:H;if(U)J=Y.find((L)=>L.id===U)??Y[0];let W={...X.openaiAdditionalModelOptionsCacheByProfile??{}};delete W[Z];let{projects:V}=IE(X.projects,(L)=>L===Z);return{...X,providerProfiles:Y,activeProviderProfileId:U,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:U?PL(U,{...X,openaiAdditionalModelOptionsCacheByProfile:W}):[],projects:V}}),{removed:q,activeProfileId:J?.id}}function k00(Z=Q0()){let q=_1(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 N00(Z){let q=_1();if(!q){A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z}));return}A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...J.openaiAdditionalModelOptionsCacheByProfile??{},[q.id]:Z}}))}function OE(){let Z=_1();if(!Z){A0((q)=>({...q,openaiAdditionalModelOptionsCache:[]}));return}A0((q)=>{let J={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete J[Z.id],{...q,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:J}})}var OL="http://localhost:11434/v1",wL="llama3.1:8b";var vL=B(()=>{lJ();nJ()});function x5(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 X=Z.read(),Q=Z.update(J);if(Q.success){if(X===null)q.delete();return Q}let $=q.update(J);if($.success){if(X!==null)Z.delete();return{success:!0,warning:$.warning}}return{success:!1}},delete(){let J=Z.delete(),X=q.delete();return J||X}}}var CL=()=>{};function E5(Z,q,J=10*SL*yL){let U=[];try{let X;if(q===void 0)X={};else if(q instanceof AbortSignal)X={abortSignal:q,timeout:J};else X=q;let{abortSignal:Q,timeout:$=10*SL*yL,input:Y,stdio:H=["ignore","pipe","pipe"]}=X;Q?.throwIfAborted();const K=m2(U,M7`exec: ${Z.slice(0,200)}`,0);try{let z=E0(Z,{env:process.env,maxBuffer:1e6,timeout:$,cwd:t(),stdio:H,shell:!0,reject:!1,input:Y});if(!z.stdout)return null;return z.stdout.trim()||null}catch{return null}}catch(W){var V=W,L=1}finally{u2(U,V,L)}}var yL=1000,SL=60;var aJ=B(()=>{g2();Z1();R0()});import{createHash as wE}from"crypto";import{userInfo as kE}from"os";function G2(Z=""){let q=G0(),X=!process.env.CLAUDIN_CONFIG_DIR?"":`-${wE("sha256").update(q).digest("hex").substring(0,8)}`;return`Claude Code${bL().OAUTH_FILE_SUFFIX}${Z}${X}`}function w4(Z=""){return G2(Z)}function O0(){try{return process.env.USER||kE().username}catch{return"claude-code-user"}}function sJ(){$0.cache={data:null,cachedAt:0},$0.generation++,$0.readInFlight=null}function m00(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 p0="-credentials",oJ=30000,$0;var P5=B(()=>{nW();o0();$0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function xE(){try{let Z=w4(p0),q=O0(),{stdout:J,code:X}=await a("security",["find-generic-password","-a",q,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(X===0&&J)return Z0(J.trim())}catch(Z){}return null}function a00(){if(W6!==void 0)return W6;if(process.platform!=="darwin")return W6=!1,!1;try{W6=E0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{W6=!1}return W6}var NE=4032,rJ,W6;var hL=B(()=>{g2();K1();j7();aJ();R0();P5();rJ={name:"keychain",read(){let Z=$0.cache;if(Date.now()-Z.cachedAt<oJ)return Z.data;try{let q=w4(p0),J=O0(),X=E5(`security find-generic-password -a "${J}" -w -s "${q}"`);if(X){let Q=Z0(X);return $0.cache={data:Q,cachedAt:Date.now()},Q}}catch(q){}if(Z.data!==null)return E("[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=xE().then((X)=>{if(q===$0.generation){if(X===null&&Z.data!==null)E("[keychain] readAsync failed; serving stale cache",{level:"warn"});let Q=X??Z.data;return $0.cache={data:Q,cachedAt:Date.now()},$0.readInFlight=null,Q}return X});return $0.readInFlight=J,J},update(Z){sJ();try{let q=w4(p0),J=O0(),X=m(Z),Q=Buffer.from(X,"utf-8").toString("hex"),$=`add-generic-password -U -a "${J}" -s "${q}" -X "${Q}"
118
- `,Y;if($.length<=NE)Y=E0("security",["-i"],{input:$,stdio:["pipe","pipe","pipe"],reject:!1});else E(`Keychain payload (${X.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=E0("security",["add-generic-password","-U","-a",J,"-s",q,"-X",Q],{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(){sJ();try{let Z=w4(p0),q=O0();return E5(`security delete-generic-password -a "${q}" -s "${Z}"`),!0}catch(Z){return!1}}}});var tJ;var fL=B(()=>{g2();R0();P5();tJ={name:"libsecret",read(){try{let Z=O0(),q=G2(p0),J=E0("secret-tool",["lookup","service",q,"account",Z],{reject:!1});if(J.exitCode===0&&J.stdout)return Z0(J.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let q=O0(),J=G2(p0),X=m(Z);return{success:E0("secret-tool",["store","--label",J,"service",J,"account",q],{input:X,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=O0(),q=G2(p0);return E0("secret-tool",["clear","service",q,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as EE}from"path";function k4(Z){return Z.replace(/'/g,"''")}function v5(){return G2(p0)}function gL(){return`${v5()}:${O0()}`}function eJ(){let Z=v5().replace(/[^a-zA-Z0-9._-]/g,"_");return EE(G0(),`${Z}.secure.dpapi`)}function N4(Z,q){try{return E0("powershell.exe",["-Command",Z],{input:q?.input,reject:!1})}catch{return null}}function PE(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 mL(){let Z=v5().replace(/"/g,'`"'),q=O0().replace(/"/g,'`"'),J=`
119
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
120
- try {
121
- $vault = New-Object Windows.Security.Credentials.PasswordVault
122
- $cred = $vault.Retrieve("${Z}", "${q}")
123
- $cred.FillPassword()
124
- [Console]::Out.Write($cred.Password)
125
- } catch {
126
- exit 1
127
- }
128
- `,X=N4(J);if(X?.exitCode===0&&X.stdout)try{return Z0(X.stdout)}catch{return null}return null}var ZX;var uL=B(()=>{g2();o0();R0();P5();ZX={name:"credential-locker-dpapi",read(){let Z=k4(eJ()),q=k4(gL()),J=`
129
- try {
130
- Add-Type -AssemblyName System.Security
131
- $path = '${Z}'
132
- if (!(Test-Path -LiteralPath $path)) {
133
- exit 1
134
- }
135
-
136
- $protectedBase64 = [System.IO.File]::ReadAllText(
137
- $path,
138
- [System.Text.Encoding]::UTF8
139
- ).Trim()
140
- if (-not $protectedBase64) {
141
- exit 1
142
- }
143
-
144
- $protectedBytes = [Convert]::FromBase64String($protectedBase64)
145
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${q}')
146
- $bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
147
- $protectedBytes,
148
- $entropyBytes,
149
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
150
- )
151
- [Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
152
- } catch {
153
- exit 1
154
- }
155
- `,X=N4(J);if(X?.exitCode===0&&X.stdout)try{return Z0(X.stdout)}catch{return mL()}return mL()},async readAsync(){return this.read()},update(Z){let q=k4(eJ()),J=k4(gL()),X=m(Z),Q=`
156
- try {
157
- Add-Type -AssemblyName System.Security
158
- $path = '${q}'
159
- $directory = [System.IO.Path]::GetDirectoryName($path)
160
- if ($directory) {
161
- [System.IO.Directory]::CreateDirectory($directory) | Out-Null
162
- }
163
-
164
- $payload = [Console]::In.ReadToEnd()
165
- $bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
166
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${J}')
167
- $protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
168
- $bytes,
169
- $entropyBytes,
170
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
171
- )
172
- $protectedBase64 = [Convert]::ToBase64String($protectedBytes)
173
- [System.IO.File]::WriteAllText(
174
- $path,
175
- $protectedBase64,
176
- [System.Text.Encoding]::UTF8
177
- )
178
- } catch {
179
- Write-Error $_.Exception.Message
180
- exit 1
181
- }
182
- `,$=N4(Q,{input:X});if($?.exitCode===0)return{success:!0};return{success:!1,warning:PE($,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let q=`
183
- try {
184
- $path = '${k4(eJ())}'
185
- if (Test-Path -LiteralPath $path) {
186
- Remove-Item -LiteralPath $path -Force
187
- }
188
- } catch {
189
- exit 1
190
- }
191
- `,J=N4(q),X=v5().replace(/"/g,'`"'),Q=O0().replace(/"/g,'`"'),$=`
192
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
193
- try {
194
- $vault = New-Object Windows.Security.Credentials.PasswordVault
195
- $cred = $vault.Retrieve("${X}", "${Q}")
196
- $vault.Remove($cred)
197
- } catch {
198
- exit 0
199
- }
200
- `,Y=N4($);return(J?.exitCode??1)===0}}});import{chmodSync as vE}from"fs";import{join as CE}from"path";function C5(){let Z=G0(),q=".credentials.json";return{storageDir:Z,storagePath:CE(Z,".credentials.json")}}var x4;var dL=B(()=>{o0();o1();M0();R0();x4={name:"plaintext",read(){let{storagePath:Z}=C5();try{let q=N().readFileSync(Z,{encoding:"utf8"});return Z0(q)}catch{return null}},async readAsync(){let{storagePath:Z}=C5();try{let q=await N().readFile(Z,{encoding:"utf8"});return Z0(q)}catch{return null}},update(Z){try{let{storageDir:q,storagePath:J}=C5();try{N().mkdirSync(q)}catch(X){if(W0(X)!=="EEXIST")throw X}return pL(J,m(Z),{encoding:"utf8",flush:!1}),vE(J,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=C5();try{return N().unlinkSync(Z),!0}catch(q){if(W0(q)==="ENOENT")return!0;return!1}}}});function cL(Z){let q=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return q?x5(rJ,x4):rJ;if(process.platform==="linux")return q?x5(tJ,x4):tJ;if(process.platform==="win32")return q?x5(ZX,x4):ZX;return q?x4:yE}var yE;var lL=B(()=>{CL();hL();fL();uL();dL();yE={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 h(Z){if(typeof Z!=="string")return;let q=Z.trim();return q?q:void 0}function qX(Z=process.env){return h(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function T10(Z=process.env){let q=h(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 JX(Z){let q=Z.split(".");if(q.length<2)return;try{let J=q[1].replace(/-/g,"+").replace(/_/g,"/"),X=J+"=".repeat((4-J.length%4)%4),Q=Buffer.from(X,"base64").toString("utf8"),$=JSON.parse(Q);return $&&typeof $==="object"?$:void 0}catch{return}}function d0(Z){if(!Z)return;let q=JX(Z),J=q?.["https://api.openai.com/auth"]&&typeof q["https://api.openai.com/auth"]==="object"?q["https://api.openai.com/auth"]:void 0,X=J?.organizations,Q=Array.isArray(X)&&X.length>0&&typeof X[0]==="object"?X[0].id:void 0;return h(J?.chatgpt_account_id??q?.["https://api.openai.com/auth.chatgpt_account_id"]??q?.chatgpt_account_id??Q)??void 0}function j10(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 iL(Z){let q=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:qX(),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 X=await J.json(),Q=h(X.access_token);if(!Q)throw Error("Codex API key exchange completed, but no API key token was returned.");return Q}var F10="https://auth.openai.com",nL="https://auth.openai.com/oauth/token",D10="openid profile email offline_access api.connectors.read api.connectors.invoke",A10="codex_cli_rs";var XX=()=>{};function b5(){return cL({allowPlainTextFallback:!0})}function aL(Z){if(!Z)return;let J=JX(Z)?.exp;if(typeof J==="number"&&Number.isFinite(J))return J*1000;return}function P4(Z){if(!Z||typeof Z!=="object")return;let q=Z,J=h(q.apiKey),X=h(q.accessToken);if(!X)return;let Q=h(q.refreshToken),$=h(q.idToken),Y=h(q.accountId)??d0($)??d0(X),H=h(q.profileId),K=typeof q.lastRefreshAt==="number"&&Number.isFinite(q.lastRefreshAt)?q.lastRefreshAt:void 0,U=typeof q.lastRefreshFailureAt==="number"&&Number.isFinite(q.lastRefreshFailureAt)?q.lastRefreshFailureAt:void 0;return{apiKey:J,accessToken:X,refreshToken:Q,idToken:$,accountId:Y,profileId:H,lastRefreshAt:K,lastRefreshFailureAt:U}}function hE(Z){let q=aL(Z.accessToken)??aL(Z.idToken);if(q===void 0)return!1;return q<=Date.now()+SE}function oL(Z,q=Date.now()){let J=Math.max(Z.lastRefreshFailureAt??0,S5??0);if(!J)return!1;return q-J<bE}function fE(Z,q){if(!q.trim())return`Codex token refresh failed with status ${Z}.`;try{let J=JSON.parse(q),X=J.error&&typeof J.error==="object"?J.error:void 0,Q=h(X?.code??J.code),$=h(X?.message??J.error_description)??q.trim();return Q?`Codex token refresh failed (${Q}): ${$}`:`Codex token refresh failed with status ${Z}: ${$}`}catch{return`Codex token refresh failed with status ${Z}: ${q.trim()}`}}function sL(){if(V6())return;try{let Z=b5().read();return P4(Z?.codex)}catch{return}}async function gE(){if(V6())return;try{let Z=await b5().readAsync();return P4(Z?.codex)}catch{return}}function rL(Z,q=Date.now()){return oL(Z,q)}function tL(Z){if(V6())return{success:!1,warning:"Bare mode: secure storage is disabled."};let q=P4(Z);if(!q)return{success:!1,warning:"Codex credentials are incomplete."};let J=b5(),X=J.read()||{},Q=P4(X[y5]),$={...X,[y5]:{...q,profileId:q.profileId??Q?.profileId,lastRefreshAt:q.lastRefreshAt??Date.now()}},Y=J.update($);if(Y.success)S5=P4($[y5])?.lastRefreshFailureAt??null;return Y}function mE(Z,q){if(!tL({...Z,lastRefreshFailureAt:q}).success)S5=q}function E10(){if(V6())return{success:!0};let Z=b5(),J={...Z.read()||{}};delete J[y5];let X=Z.update(J);if(X.success)S5=null;return X}async function P10(Z){if(V6())return{refreshed:!1};if(v4()?.apiKey?.trim())return{refreshed:!1};let q=await gE();if(!q)return{refreshed:!1};if(!q.refreshToken)return{refreshed:!1,credentials:q};if(!Z?.force&&!hE(q))return{refreshed:!1,credentials:q};if(oL(q))return{refreshed:!1,credentials:q};if(E4)return E4;return E4=(async()=>{let J=Date.now();try{let X=new URLSearchParams({client_id:qX(),grant_type:"refresh_token",refresh_token:q.refreshToken}),Q=await fetch(nL,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:X,signal:AbortSignal.timeout(15000)});if(!Q.ok){let W=await Q.text().catch(()=>"");throw Error(fE(Q.status,W))}let $=await Q.json(),Y=h($.access_token);if(!Y)throw Error("Codex token refresh succeeded without a new access token.");let H={accessToken:Y,refreshToken:h($.refresh_token)??q.refreshToken,idToken:h($.id_token)??q.idToken,accountId:d0($.id_token)??d0($.access_token)??q.accountId,lastRefreshAt:Date.now()},K=H.idToken??q.idToken;if(K)H.apiKey=await iL(K).catch((W)=>{E(`[codex] id-token → API-key exchange failed; falling back to access_token bearer: ${W instanceof Error?W.message:String(W)}`,{level:"warn"});return});let U=tL(H);if(!U.success)throw Error(U.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:H}}catch(X){throw mE(q,J),X}finally{E4=null}})(),E4}var y5="codex",SE=60000,bE=60000,E4=null,S5=null;var eL=B(()=>{K2();K1();o0();lL();XX()});import{existsSync as uE,readFileSync as pE}from"node:fs";import{isIP as dE}from"node:net";import{homedir as cE}from"node:os";import{join as Zz}from"node:path";function m10(Z){if(!Z)return!1;try{let{hostname:q}=new URL(Z);return q==="api.x.ai"}catch{return!1}}function u10(Z){if(!Z)return!1;try{let{hostname:q,pathname:J}=new URL(Z);return q==="api.kimi.com"&&J.startsWith("/coding")}catch{return!1}}function aE(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 oE(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 YX(Z){if(!Z)return;let q=Z.trim();if(!q)return;if(q==="undefined")return;return q}function QX(Z,q){for(let J of q){let X=Z,Q=!0;for(let Y of J){if(!X||typeof X!=="object"||!(Y in X)){Q=!1;break}X=X[Y]}if(!Q)continue;let $=h(X);if($)return $}return}function sE(Z){if(!Z)return;let q=Z.trim().toLowerCase();if(q==="low"||q==="medium"||q==="high"||q==="xhigh"||q==="max")return q;return}function qz(Z){let q=Z.trim(),J=q.indexOf("?");if(J===-1){let U=q.toLowerCase(),W=f5[U];if(W)return{raw:q,baseModel:W.model,reasoning:W.reasoningEffort?{effort:W.reasoningEffort}:void 0};return{raw:q,baseModel:q}}let X=q.slice(0,J).trim(),Q=new URLSearchParams(q.slice(J+1)),$=X.toLowerCase(),Y=f5[$],H=Y?.model??X,K=sE(Q.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:q,baseModel:H,reasoning:typeof K==="string"?{effort:K}:K}}function Yz(Z){let q=Z.trim().toLowerCase();return(q.split("?",1)[0]??q)in f5}function HX(Z){let q=Z.trim().toLowerCase(),J=q.split("?",1)[0]??q;return nE.has(J)}function Hz(Z){return HX(Z)}function rE(Z,q){let J=YX(q);return QP(J)||!J&&Yz(Z)}function qP(Z){let q=Z.trim().toLowerCase();if(q.includes("codex"))return!0;let J=tE.exec(q);if(!J)return!1;if(Number(J[1])<5)return!1;if(q.startsWith("gpt-5-mini"))return!1;return!0}function Gz(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(iE.has(q)||q==="0.0.0.0")return!0;if(q.endsWith(".local"))return!0;let X=dE(q);if(X===4)return Number.parseInt(q.split(".",1)[0]??"",10)===127||aE(q);if(X===6)return oE(q);return!1}catch{return!1}}function h5(Z){return Z.replace(GX,"")}function JP(Z){let q=h5(Z);if(!q||q==="/")return"/v1";if(q.toLowerCase().endsWith("/v1"))return q;return`${q}/v1`}function XP(Z){try{let q=new URL(Z),J=q.hostname.toLowerCase(),X=q.pathname.toLowerCase();if(q.port==="11434")return!0;return J.includes("ollama")||X.includes("ollama")}catch{return!1}}function p10(Z){if(!Gz(Z))return[];try{let q=new URL(Z),J=h5(q.toString()),X=new Set([J]),Q=[],$=(K,U)=>{let W=new URL(q.toString());W.hostname=K,W.pathname=U,W.search="",W.hash="";let V=h5(W.toString());if(X.has(V))return;X.add(V),Q.push(V)},Y=JP(q.pathname);if(Y!==h5(q.pathname))$(q.hostname,Y);let H=q.hostname.toLowerCase().replace(ZP,"");if(H==="localhost"||H==="::1")$("127.0.0.1",q.pathname||"/"),$("127.0.0.1",Y);return Q}catch{return[]}}function d10(Z){if(!Z.hasTools)return!1;if(!Gz(Z.baseUrl))return!1;return XP(Z.baseUrl)}function QP(Z){if(!Z)return!1;try{let q=new URL(Z);return q.hostname==="chatgpt.com"&&q.pathname.replace(GX,"")==="/backend-api/codex"}catch{return!1}}function $P(Z){let q=Z.split("?",1)[0]??Z,J=q.includes(":")?q.split(":",2)[1].trim():q.trim();if(!J||J.toLowerCase()==="copilot")return $z;let X=J.indexOf("/");if(X!==-1)return J.slice(X+1);return J}function Jz(Z){let q=Z.split("?",1)[0]??Z,J=q.includes(":")?q.split(":",2)[1].trim():q.trim();if(!J||J.toLowerCase()==="copilot")return $z;return J}function Qz(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 KX(Z){let q=Kz(),X=q?.transport==="github_copilot",Q=q?.model?.trim(),$=YX(q?.baseUrl),Y=Z?.model?.trim()||Q||Z?.fallbackModel?.trim()||(X?"github:copilot":"gpt-4o"),H=qz(Y),K=YX(Z?.baseUrl),U=K??$,V=X&&Yz(Y)&&U&&Qz(U)==="custom"?void 0:U,L=K??V,z=Q??"",R=HX(z)?qz(z).baseModel:null,M=Boolean(Z?.model)&&Boolean(R)&&H.baseModel===R,F=HX(Y)||M,D=!X&&F&&!(L&&L!==$X)?lE:L,O=X?Qz(L):"custom",T=X&&O==="copilot",j=X&&O==="models",A=X&&O==="custom",b=X?Jz(Y):Y,w=rE(Y,D)||T&&qP(b)?"codex_responses":"chat_completions",x=T?$P(H.baseModel):j||A?Jz(H.baseModel):H.baseModel,P=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(q?.extras?.reasoningEffort?{effort:q.extras.reasoningEffort}:void 0);return{transport:w,requestedModel:Y,resolvedModel:x,baseUrl:(D??(T&&w==="codex_responses"?Xz:X?Xz:$X)).replace(GX,""),reasoning:P}}function c10(Z){if(KX({model:Z}).transport==="codex_responses")return!0;return Kz()?.transport==="github_copilot"}function Kz(){try{let{tryGetActiveProvider:Z}=(K2(),O4(C4));return Z()}catch{return null}}function l10(){let Z=null;try{let{tryGetActiveProvider:X}=(K2(),O4(C4));Z=X()}catch{Z=null}let q=Z?.transport;if(q!=="openai_compat"&&q!=="codex_responses"){if(!q||q==="anthropic")return"firstParty";return null}let J=KX();if(J.transport!=="chat_completions")return null;return`openai:${J.baseUrl.toLowerCase()}`}function n10(){let Z=KX();if(Z.transport!=="chat_completions")return!1;let q=Z.baseUrl.toLowerCase();try{return new URL(q).hostname==="api.openai.com"}catch{return q===$X}}function Uz(Z=process.env){let q=UX();if(q)return q;let J=h(Z.CODEX_AUTH_JSON_PATH);if(J)return J;let X=h(Z.CODEX_HOME);if(X)return Zz(X,"auth.json");return Zz(cE(),".codex","auth.json")}function UX(){try{let{tryGetActiveProvider:Z}=(K2(),O4(C4));return h(Z()?.extras?.codexAuthPath)}catch{return}}function WX(){try{let{tryGetActiveProvider:Z}=(K2(),O4(C4));return h(Z()?.extras?.codexAccountId)}catch{return}}function Wz(Z){if(!uE(Z))return;try{let q=pE(Z,"utf8"),J=JSON.parse(q);return J&&typeof J==="object"?J:void 0}catch{return}}function Vz(Z){let{authJson:q,authPath:J,envAccountId:X}=Z;if(!q)return{apiKey:"",authPath:J,source:Z.missingSource??"none"};let Q=QX(q,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),$=QX(q,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=X??QX(q,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??d0(Q)??d0($);if(!Q)return{apiKey:"",accountId:Y,authPath:J,source:Z.missingSource??"none"};return{apiKey:Q,accountId:Y,authPath:J,source:"auth.json"}}function Bz(Z){let{storedCredentials:q,envAccountId:J}=Z;return{apiKey:q.apiKey??q.accessToken,accountId:J??q.accountId??d0(q.idToken)??d0(q.accessToken),source:"secure-storage"}}function g5(Z,q){let J=h(Z.CODEX_API_KEY),Q=WX()??h(Z.CODEX_ACCOUNT_ID)??h(Z.CHATGPT_ACCOUNT_ID);if(J)return{apiKey:J,accountId:Q??d0(J),source:"env"};let $=UX();if(!Boolean($??h(Z.CODEX_AUTH_JSON_PATH)??h(Z.CODEX_HOME))&&q?.explicitAuthPathOnly)return{apiKey:"",accountId:Q,source:"none"};let H=Uz(Z),K=Wz(H);return Vz({authJson:K,authPath:H,envAccountId:Q})}function i10(Z){let q=Z?.env??process.env,J=g5(q,{explicitAuthPathOnly:!0}),X=Boolean(UX()??h(q.CODEX_AUTH_JSON_PATH)??h(q.CODEX_HOME)),Q=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(X||J.source==="env"||J.source==="auth.json")return J;if(Z?.storedCredentials?.accessToken)return Bz({storedCredentials:Z.storedCredentials,envAccountId:WX()??h(q.CODEX_ACCOUNT_ID)??h(q.CHATGPT_ACCOUNT_ID)});if(Q)return g5(q);return YP(q)}function YP(Z=process.env){let q=WX()??h(Z.CODEX_ACCOUNT_ID)??h(Z.CHATGPT_ACCOUNT_ID),J=g5(Z,{explicitAuthPathOnly:!0});if(J.source==="env"||J.source==="auth.json"||J.authPath)return J;let X=sL();if(X?.accessToken){let Q=Bz({storedCredentials:X,envAccountId:q});if(!(!Q.accountId||rL(X)))return Q;let Y=Uz(Z),H=Wz(Y),K=Vz({authJson:H,authPath:Y,envAccountId:q});if(K.apiKey)return{...K,accountId:K.accountId??Q.accountId};return Q}return g5(Z)}function HP(Z){let q=Z.trim().toLowerCase(),X=q.split("?",1)[0]??q;return f5[X]?.reasoningEffort}function a10(Z){let q=Z.trim().toLowerCase(),J=q.split("?",1)[0]??q;if(J==="gpt-5.3-codex-spark"||J==="codexspark")return!1;if(HP(J)!==void 0)return!0;return eE.test(J)}var $X="https://api.openai.com/v1",lE="https://chatgpt.com/backend-api/codex",g10="https://api.x.ai/v1",$z="gpt-4o",f5,nE,iE,tE,eE,GX,ZP,Xz="https://api.githubcopilot.com";var Lz=B(()=>{eL();XX();f5={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.6":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-sol":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-terra":{model:"gpt-5.6-terra",reasoningEffort:"high"},"gpt-5.6-luna":{model:"gpt-5.6-luna",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"}},nE=new Set(["codexplan","codexspark"]),iE=new Set(["localhost","127.0.0.1","::1"]);tE=/^gpt-(\d+)/,eE=/^gpt-5(?:[.-]|$)/,GX=/\/+$/,ZP=/^\[|\]$/g});var C4={};bq(C4,{tryGetActiveProvider:()=>v4,invalidateActiveProviderCache:()=>WP,getActiveProvider:()=>_z,_peekActiveProviderCacheForTesting:()=>VP,ActiveProviderNotConfiguredError:()=>m5});function GP(){if(zz)return;zz=!0,AL(()=>{U2=null})}function KP(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(Hz(q))return"codex_responses";return"openai_compat"}}}function UP(Z){let q=IL(Z.model);return{transport:KP(Z,q),baseUrl:Z.baseUrl,model:q,apiKey:Z.apiKey,extras:Z.extras,name:Z.name}}function _z(){if(GP(),U2)return U2;let Z=_1(Q0());if(!Z)throw new m5;return U2=UP(Z),U2}function v4(){try{return _z()}catch(Z){if(Z instanceof m5)return null;throw Z}}function WP(){U2=null}function VP(){return U2}var m5,U2=null,zz=!1;var K2=B(()=>{lJ();vL();nJ();Lz();m5=class m5 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function Rz(Z){return Z.sort((q,J)=>{let X=J.modified.getTime()-q.modified.getTime();if(X!==0)return X;return J.created.getTime()-q.created.getTime()})}var Mz=()=>{};function Fz(Z){if(typeof Z!=="string")return!1;let q=Z.trim();return q!==""&&q!=="."&&q!==".."&&!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("\x00")}function VX(Z){if(typeof Z!=="string")throw TypeError("Expected a string");if(!Fz(Z))throw Error(`Unsafe filename: ${JSON.stringify(Z)}`)}var q20;var Dz=B(()=>{q20=Object.freeze([""," ",".",".."," .",". "," ..",".. ","../","../foo","foo/../bar","foo/bar","foo\\bar","foo\x00bar"])});import r from"node:path";import Az from"node:os";import BX from"node:process";function zX(Z,{suffix:q="nodejs"}={}){if(VX(Z),q)Z+=`-${q}`;if(VX(Z),BX.platform==="darwin")return BP(Z);if(BX.platform==="win32")return LP(Z);return zP(Z)}var P1,LX,B6,BP=(Z)=>{let q=r.join(P1,"Library");return{data:r.join(q,"Application Support",Z),config:r.join(q,"Preferences",Z),cache:r.join(q,"Caches",Z),log:r.join(q,"Logs",Z),temp:r.join(LX,Z)}},LP=(Z)=>{let q=B6.APPDATA||r.join(P1,"AppData","Roaming"),J=B6.LOCALAPPDATA||r.join(P1,"AppData","Local");return{data:r.join(J,Z,"Data"),config:r.join(q,Z,"Config"),cache:r.join(J,Z,"Cache"),log:r.join(J,Z,"Log"),temp:r.join(LX,Z)}},zP=(Z)=>{let q=r.basename(P1);return{data:r.join(B6.XDG_DATA_HOME||r.join(P1,".local","share"),Z),config:r.join(B6.XDG_CONFIG_HOME||r.join(P1,".config"),Z),cache:r.join(B6.XDG_CACHE_HOME||r.join(P1,".cache"),Z),log:r.join(B6.XDG_STATE_HOME||r.join(P1,".local","state"),Z),temp:r.join(LX,q,Z)}};var Tz=B(()=>{Dz();P1=Az.homedir(),LX=Az.tmpdir(),{env:B6}=BX});import{join as u5}from"path";function Oz(Z){let q=Z.replace(/[^a-zA-Z0-9]/g,"-");if(q.length<=jz)return q;return`${q.slice(0,jz)}-${Math.abs(Iz(Z)).toString(36)}`}function d5(Z){return Oz(Z)}var p5,jz=200,wz;var kz=B(()=>{Tz();M0();_P();p5=zX("claude-cli");wz={baseLogs:()=>u5(p5.cache,d5(N().cwd())),errors:()=>u5(p5.cache,d5(N().cwd()),"errors"),messages:()=>u5(p5.cache,d5(N().cwd()),"messages"),mcpLogs:(Z)=>u5(p5.cache,d5(N().cwd()),`mcp-logs-${Oz(Z)}`)}});function xz(Z){return Z.replace(Nz,"").trim()||Z}function Ez(Z){return Z.replace(Nz,"").trim()}function B20(Z){return Z.replace(RP,"").trim()}var Nz,RP;var Pz=B(()=>{Nz=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;RP=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});import{readdir as FP,readFile as DP,stat as AP}from"fs/promises";import{join as TP}from"path";function k20(Z,q){let J=Z.firstPrompt?.startsWith(`<${Sz}>`),X=Z.firstPrompt?Ez(Z.firstPrompt):"",Q=X&&!J,$=Z.agentName||Z.customTitle||Z.summary||(Q?X:void 0)||q||(J?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return xz($).trim()}function jP(Z){return Z.toISOString().replace(/[:.]/g,"-")}function OP(Z){if(y4.length>=IP)y4.shift();y4.push(Z)}function N20(Z){if(y0!==null)return;if(y0=Z,W2.length>0){let q=[...W2];W2.length=0;for(let J of q)switch(J.type){case"error":y0.logError(J.error);break;case"mcpError":y0.logMCPError(J.serverName,J.error);break;case"mcpDebug":y0.logMCPDebug(J.serverName,J.message);break}}}function S(Z){let q=yz(Z);try{let J=v4()?.transport;if(J==="bedrock"||J==="vertex"||J==="foundry"||process.env.DISABLE_ERROR_REPORTING||PJ())return;let Q={error:q.stack||q.message,timestamp:new Date().toISOString()};if(OP(Q),y0===null){W2.push({type:"error",error:q});return}y0.logError(q)}catch{}}function E20(){return[...y4]}function wP(){return kP(wz.errors())}async function P20(Z){return(await wP())[Z]||null}async function kP(Z){let q;try{q=await FP(Z,{withFileTypes:!0})}catch{return S(Error(`No logs found at ${Z}`)),[]}let J=await Promise.all(q.map(async(X,Q)=>{let $=TP(Z,X.name),Y=await DP($,{encoding:"utf8"}),H=Z0(Y),K=H[0],U=H[H.length-1],W=K?.type==="user"&&typeof K?.message?.content==="string"?K?.message?.content:"No prompt",V=await AP($),L=$.includes("sidechain"),z=jP(V.mtime);return{date:z,fullPath:$,messages:H,value:Q,created:_X(K?.timestamp||z),modified:U?.timestamp?_X(U.timestamp):_X(z),firstPrompt:W.split(`
201
- `)[0]?.slice(0,50)+(W.length>50?"…":"")||"No prompt",messageCount:H.length,isSidechain:L}}));return Rz(J.filter((X)=>X!==null)).map((X,Q)=>({...X,value:Q}))}function _X(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 v20(Z,q){try{if(y0===null){W2.push({type:"mcpError",serverName:Z,error:q});return}y0.logMCPError(Z,q)}catch{}}function C20(Z,q){try{if(y0===null){W2.push({type:"mcpDebug",serverName:Z,message:q});return}y0.logMCPDebug(Z,q)}catch{}}function y20(Z,q){if(!q||!q.startsWith("repl_main_thread"))return;let{messages:J,...X}=Z;vz(X),Cz(null)}function S20(){y0=null,W2.length=0,y4=[]}var IP=100,y4,W2,y0=null,x20;var k0=B(()=>{I1();z2();K2();MP();Mz();kz();Pz();o1();CJ();R0();y4=[];W2=[];x20=u(()=>{return process.argv.includes("--hard-fail")})});import bz from"node:path";function EP(Z){return Z.includes(bz.sep)||Z.includes("/")||bz.isAbsolute(Z)}function PP(Z){let q=Z.trim();if(!q)return"Unsafe executable: empty command";if(S4.test(q))return"Unsafe executable: control characters are not allowed";if(!EP(q)&&!xP.test(q))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function vP(Z){for(let q of Z)if(S4.test(q))return"Unsafe argument: control characters are not allowed";return null}function CP(Z){if(!Z)return null;if(S4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function yP(Z){if(!Z)return{};for(let[q,J]of Object.entries(Z)){if(S4.test(q))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof J==="string"&&S4.test(J))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function SP(Z,q){if(typeof Z.signal==="string")return Z.signal;return String(q)}function a(Z,q,J={timeout:10*MX*RX,preserveOutputOnError:!0,useCwd:!0}){return i1(Z,q,{abortSignal:J.abortSignal,timeout:J.timeout,preserveOutputOnError:J.preserveOutputOnError,cwd:J.useCwd?t():void 0,env:J.env,stdin:J.stdin,input:J.input})}function i1(Z,q,{abortSignal:J,timeout:X=10*MX*RX,preserveOutputOnError:Q=!0,cwd:$,env:Y,maxBuffer:H=hz,stdin:K,input:U}={timeout:10*MX*RX,preserveOutputOnError:!0,maxBuffer:hz}){let W=PP(Z);if(W)return Promise.resolve({stdout:"",stderr:"",code:1,error:W});let V=vP(q);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=CP($);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let z=yP(Y);if(z.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:z.error});return new Promise((_)=>{let R=U!==void 0?"pipe":K??"pipe",M=fz.spawn(Z,q,{cwd:$,env:z.value,shell:!1,signal:J,stdio:[R,"pipe","pipe"]}),F=!1,k="",D="",O=0,T,j=!1,A=(x)=>{if(F)return;F=!0,_(x)},b=(x,P)=>{let f=typeof x==="string"?x:x.toString("utf8");if(O+=Buffer.byteLength(f,"utf8"),O>H){M.kill(),A({stdout:Q?k:"",stderr:Q?D:"",code:1,error:"maxBuffer exceeded"});return}if(P==="stdout")k+=f;else D+=f};M.stdout?.on("data",(x)=>b(x,"stdout")),M.stderr?.on("data",(x)=>b(x,"stderr")),M.once("spawn",()=>{if(R==="pipe"&&M.stdin)if(U!==void 0)M.stdin.end(U);else M.stdin.end()}),M.once("error",(x)=>{S(x),A({stdout:"",stderr:"",code:1,error:x.message})});let w=X>0?setTimeout(()=>{j=!0,M.kill()},X):void 0;M.once("close",(x,P)=>{if(w)clearTimeout(w);T=P??void 0;let f=x??1;if(j){A({stdout:Q?k:"",stderr:Q?D:"",code:f,error:`Command timed out after ${X}ms`});return}if(f!==0){if(Q)A({stdout:k,stderr:D,code:f,error:SP({signal:T},f)});else A({stdout:"",stderr:"",code:f});return}A({stdout:k,stderr:D,code:0})})})}var fz,RX=1000,MX=60,hz=1e6,S4,xP;var j7=B(()=>{Z1();k0();aJ();fz=NP(YQ(),1),S4=/[\0\r\n]/,xP=/^[A-Za-z0-9_.-]+$/});
202
- export{Dr as r_,eV as s_,p0 as t_,w4 as u_,O0 as v_,sJ as w_,m00 as x_,P5 as y_,t4 as z_,H$ as A_,fG as B_,gG as C_,qq as D_,g2 as E_,WQ as F_,VQ as G_,e5 as H_,FQ as I_,DQ as J_,TQ as K_,H0 as L_,zv as M_,L6 as N_,YQ as O_,E5 as P_,a as Q_,i1 as R_,j7 as S_,z6 as T_,jQ as U_,Nv as V_,S0 as W_,_2 as X_,C1 as Y_,xv as Z_,Ev as __,Pv as $_,bQ as a$,mQ as b$,uQ as c$,gv as d$,M1 as e$,c4 as f$,p2 as g$,Jq as h$,uK as i$,F7 as j$,D7 as k$,R2 as l$,n1 as m$,XO as n$,xc as o$,Ec as p$,o as q$,$O as r$,Pc as s$,vc as t$,tK as u$,YO as v$,HO as w$,Cc as x$,Hq as y$,GO as z$,yc as A$,KO as B$,Sc as C$,bc as D$,UO as E$,hc as F$,WO as G$,VO as H$,fc as I$,gc as J$,mc as K$,LO as L$,uc as M$,pc as N$,M6 as O$,sc as P$,g0 as Q$,d2 as R$,Yl as S$,DO as T$,Hl as U$,ZU as V$,qU as W$,Wq as X$,zl as Y$,_l as Z$,Rl as _$,I7 as $$,GU as aaa,KU as baa,RU as caa,MU as daa,gU as eaa,mU as faa,aU as gaa,oU as haa,Rq as iaa,Bw as jaa,W1 as kaa,r6 as laa,cn as maa,ln as naa,nn as oaa,_w as paa,P7 as qaa,QW as raa,on as saa,Dq as taa,$W as uaa,Aq as vaa,Tq as waa,HW as xaa,zi as yaa,jw as zaa,_i as Aaa,Ri as Baa,Mi as Caa,Fi as Daa,GW as Eaa,Di as Faa,Ai as Gaa,Ti as Haa,ji as Iaa,Ii as Jaa,Oi as Kaa,Ow as Laa,wi as Maa,ki as Naa,Ni as Oaa,xi as Paa,i2 as Qaa,Ei as Raa,Pi as Saa,WW as Taa,vi as Uaa,v7 as Vaa,Cw as Waa,RW as Xaa,MW as Yaa,m0 as Zaa,Ha as _aa,Cq as $aa,Ga as aba,Ka as bba,h7 as cba,Ba as dba,La as eba,za as fba,_a as gba,Ra as hba,Ma as iba,Y4 as jba,Fa as kba,Da as lba,yq as mba,Ta as nba,ja as oba,hW as pba,w1 as qba,H4 as rba,g7 as sba,mW as tba,Ca as uba,ya as vba,uW as wba,pW as xba,dW as yba,z0 as zba,Yk as Aba,r2 as Bba,na as Cba,Sq as Dba,oa as Eba,sa as Fba,ra as Gba,ta as Hba,ea as Iba,Zo as Jba,qo as Kba,Jo as Lba,Xo as Mba,Qo as Nba,$o as Oba,Yo as Pba,Ho as Qba,oW as Rba,Go as Sba,Ko as Tba,Uo as Uba,Wo as Vba,Vo as Wba,Bo as Xba,Lo as Yba,zo as Zba,sW as _ba,Uk as $ba,Wk as aca,Vk as bca,Bk as cca,Lk as dca,zk as eca,_k as fca,Mk as gca,Fk as hca,Dk as ica,tW as jca,ZV as kca,qV as lca,QV as mca,ko as nca,YV as oca,e1 as pca,bo as qca,Tk as rca,p7 as sca,fo as tca,UV as uca,c7 as vca,lo as wca,no as xca,io as yca,BV as zca,sk as Aca,ao as Bca,oo as Cca,tk as Dca,so as Eca,d7 as Fca,JN as Gca,$N as Hca,eo as Ica,MV as Jca,qs as Kca,l7 as Lca,FV as Mca,DV as Nca,HN as Oca,GN as Pca,Qs as Qca,$s as Rca,Ys as Sca,AV as Tca,TV as Uca,Gs as Vca,Ks as Wca,jV as Xca,dq as Yca,IV as Zca,OV as _ca,Vs as $ca,wV as ada,q6 as bda,Rs as cda,kV as dda,Ms as eda,NV as fda,Ds as gda,xV as hda,EV as ida,As as jda,Ts as kda,js as lda,Is as mda,Os as nda,BN as oda,ws as pda,lq as qda,hs as rda,hV as sda,fV as tda,v0 as uda,rs as vda,ts as wda,es as xda,U4 as yda,Br as zda,eq as Ada,yr as Bda,t7 as Cda,e7 as Dda,Sr as Eda,br as Fda,QB as Gda,WJ as Hda,Ut as Ida,V4 as Jda,$B as Kda,q5 as Lda,_B as Mda,p as Nda,Wt as Oda,Vt as Pda,Z2 as Qda,Bt as Rda,J5 as Sda,Lt as Tda,zt as Uda,vN as Vda,_t as Wda,Rt as Xda,Mt as Yda,Ft as Zda,Dt as _da,At as $da,MB as aea,wB as bea,mt as cea,mN as dea,ut as eea,z4 as fea,xB as gea,pt as hea,BJ as iea,Ze as jea,qe as kea,XL as lea,PJ as mea,CJ as nea,z5 as oea,HL as pea,Sx as qea,Qe as rea,$e as sea,GL as tea,hx as uea,fx as vea,_0 as wea,VL as xea,j4 as yea,lx as zea,ix as Aea,ax as Bea,_L as Cea,RL as Dea,me as Eea,I5 as Fea,ex as Gea,ue as Hea,ZE as Iea,pe as Jea,de as Kea,ce as Lea,le as Mea,ne as Nea,ie as Oea,AL as Pea,A0 as Qea,ae as Rea,oe as Sea,Q0 as Tea,se as Uea,re as Vea,te as Wea,ee as Xea,dJ as Yea,k5 as Zea,cJ as _ea,UE as $ea,Z00 as afa,q00 as bfa,WE as cfa,J00 as dfa,X00 as efa,Q00 as ffa,$00 as gfa,Y00 as hfa,H00 as ifa,G00 as jfa,K00 as kfa,U00 as lfa,lJ as mfa,N5 as nfa,IL as ofa,nJ as pfa,R00 as qfa,u0 as rfa,M00 as sfa,_1 as tfa,F00 as ufa,DE as vfa,D00 as wfa,AE as xfa,A00 as yfa,T00 as zfa,j00 as Afa,I00 as Bfa,TE as Cfa,jE as Dfa,O00 as Efa,IE as Ffa,w00 as Gfa,k00 as Hfa,N00 as Ifa,OE as Jfa,vL as Kfa,a00 as Lfa,hL as Mfa,cL as Nfa,lL as Ofa,F10 as Pfa,D10 as Qfa,A10 as Rfa,h as Sfa,qX as Tfa,T10 as Ufa,d0 as Vfa,j10 as Wfa,iL as Xfa,XX as Yfa,gE as Zfa,tL as _fa,E10 as $fa,P10 as aga,eL as bga,$X as cga,lE as dga,g10 as ega,m10 as fga,u10 as gga,Gz as hga,p10 as iga,d10 as jga,QP as kga,Qz as lga,KX as mga,c10 as nga,l10 as oga,n10 as pga,i10 as qga,YP as rga,HP as sga,a10 as tga,Lz as uga,m5 as vga,_z as wga,v4 as xga,WP as yga,VP as zga,K2 as Aga,Rz as Bga,Mz as Cga,wz as Dga,kz as Ega,xz as Fga,Ez as Gga,B20 as Hga,Pz as Iga,k20 as Jga,jP as Kga,N20 as Lga,S as Mga,E20 as Nga,wP as Oga,P20 as Pga,v20 as Qga,C20 as Rga,y20 as Sga,S20 as Tga,k0 as Uga};