@claudiolabs/claudin 0.5.8 → 0.5.9
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.
- package/dist/chunks/AgentTool-0.5.9-560de9d1.mjs +1 -0
- package/dist/chunks/App-0.5.9-zsap2q4b.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.5.9-8zgzn0jw.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-0.5.9-92f16280.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-0.5.9-708dpq05.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.5.9-thv5358f.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.5.9-h0dan6qh.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.5.9-35ajv7zw.mjs +1 -0
- package/dist/chunks/DiffDialog-0.5.9-2gfy103v.mjs +3 -0
- package/dist/chunks/Doctor-0.5.9-wjw0w0c1.mjs +1 -0
- package/dist/chunks/Grove-0.5.9-hty0xzar.mjs +1 -0
- package/dist/chunks/ITermBackend-0.5.9-pch1zyqn.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-0.5.9-xjp9bdct.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.5.9-t4wkfdrh.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.5.9-12p8z825.mjs +1 -0
- package/dist/chunks/Onboarding-0.5.9-d02fdy7a.mjs +1 -0
- package/dist/chunks/ProviderManager-0.5.9-2h6pym7f.mjs +1 -0
- package/dist/chunks/REPL-0.5.9-fn63chv9.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.5.9-wdc0fys1.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-0.5.9-ty7tvdf3.mjs +1 -0
- package/dist/chunks/TeleportProgress-0.5.9-th2cx2b2.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.5.9-gqyef6wv.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.5.9-e4b9wj1z.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.5.9-xx7btmxb.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.5.9-7h9j8zft.mjs +1 -0
- package/dist/chunks/TrustDialog-0.5.9-y0bxcnzx.mjs +1 -0
- package/dist/chunks/activeProvider-0.5.9-bqhnxdga.mjs +1 -0
- package/dist/chunks/add-dir-0.5.9-t52c4h9t.mjs +1 -0
- package/dist/chunks/agents-0.5.9-b270304w.mjs +110 -0
- package/dist/chunks/agents-0.5.9-h9dw36cp.mjs +3 -0
- package/dist/chunks/api-0.5.9-jnhtend7.mjs +1 -0
- package/dist/chunks/asciicast-0.5.9-hrjx2e4n.mjs +1 -0
- package/dist/chunks/assistant-0.5.9-ap4j82na.mjs +1 -0
- package/dist/chunks/auth-0.5.9-cna7nxzb.mjs +1 -0
- package/dist/chunks/auth-0.5.9-q8ejya3n.mjs +1 -0
- package/dist/chunks/autoMode-0.5.9-w9j324dc.mjs +48 -0
- package/dist/chunks/autoUpdater-0.5.9-3x3xcjhq.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-0.5.9-ngzjz5nf.mjs +1 -0
- package/dist/chunks/branch-0.5.9-4389y3jh.mjs +4 -0
- package/dist/chunks/bridgePointer-0.5.9-ph0vdzcm.mjs +1 -0
- package/dist/chunks/btw-0.5.9-kq7dda47.mjs +1 -0
- package/dist/chunks/buddy-0.5.9-3s5bz133.mjs +3 -0
- package/dist/chunks/cacache-0.5.9-k02nazjg.mjs +1 -0
- package/dist/chunks/cache-probe-0.5.9-vdfe8hkq.mjs +21 -0
- package/dist/chunks/cacheStats-0.5.9-89wd0xyf.mjs +4 -0
- package/dist/chunks/caches-0.5.9-kg4820wg.mjs +1 -0
- package/dist/chunks/claudeDesktop-0.5.9-7pt2wjt1.mjs +1 -0
- package/dist/chunks/claudemd-0.5.9-bhqwq7vs.mjs +1 -0
- package/dist/chunks/clear-0.5.9-5mg9gs8a.mjs +1 -0
- package/dist/chunks/clearTerminal-0.5.9-esamq102.mjs +1 -0
- package/dist/chunks/cli-0.5.9-00ms6tt7.mjs +4 -0
- package/dist/chunks/cli-0.5.9-02vwh5bc.mjs +2 -0
- package/dist/chunks/cli-0.5.9-0a5jxqra.mjs +58 -0
- package/dist/chunks/cli-0.5.9-0b1wx67c.mjs +193 -0
- package/dist/chunks/cli-0.5.9-0becvd5f.mjs +2 -0
- package/dist/chunks/cli-0.5.9-0w46b370.mjs +3 -0
- package/dist/chunks/cli-0.5.9-10ar539r.mjs +2 -0
- package/dist/chunks/cli-0.5.9-12gj3v8y.mjs +12 -0
- package/dist/chunks/cli-0.5.9-1ktmgzhb.mjs +15 -0
- package/dist/chunks/cli-0.5.9-1qkhnqnk.mjs +4 -0
- package/dist/chunks/cli-0.5.9-1y9n9z2h.mjs +2 -0
- package/dist/chunks/cli-0.5.9-1zc8qwr4.mjs +2 -0
- package/dist/chunks/cli-0.5.9-248na0hf.mjs +2 -0
- package/dist/chunks/cli-0.5.9-2fcyavah.mjs +17 -0
- package/dist/chunks/cli-0.5.9-2jfbm2es.mjs +12 -0
- package/dist/chunks/cli-0.5.9-2txnqxd1.mjs +2 -0
- package/dist/chunks/cli-0.5.9-31f5vjyq.mjs +2 -0
- package/dist/chunks/cli-0.5.9-32fpvgpt.mjs +2 -0
- package/dist/chunks/cli-0.5.9-371mb3zf.mjs +4 -0
- package/dist/chunks/cli-0.5.9-3bsjckc3.mjs +2 -0
- package/dist/chunks/cli-0.5.9-3s1c44tz.mjs +2 -0
- package/dist/chunks/cli-0.5.9-41dpv5z9.mjs +2 -0
- package/dist/chunks/cli-0.5.9-42t3s85x.mjs +2 -0
- package/dist/chunks/cli-0.5.9-4aga12a5.mjs +2 -0
- package/dist/chunks/cli-0.5.9-4fdad25z.mjs +3 -0
- package/dist/chunks/cli-0.5.9-4m738pn1.mjs +25 -0
- package/dist/chunks/cli-0.5.9-4s8nynfd.mjs +2 -0
- package/dist/chunks/cli-0.5.9-4t8b91eb.mjs +4 -0
- package/dist/chunks/cli-0.5.9-4w9169na.mjs +3 -0
- package/dist/chunks/cli-0.5.9-5ah34c4c.mjs +39 -0
- package/dist/chunks/cli-0.5.9-5e3fhttm.mjs +2 -0
- package/dist/chunks/cli-0.5.9-5hzwn715.mjs +2 -0
- package/dist/chunks/cli-0.5.9-5s8vtyx6.mjs +4 -0
- package/dist/chunks/cli-0.5.9-5vdqnecb.mjs +4 -0
- package/dist/chunks/cli-0.5.9-5vj7cvdr.mjs +2 -0
- package/dist/chunks/cli-0.5.9-5ykvr12k.mjs +2 -0
- package/dist/chunks/cli-0.5.9-610r4gbg.mjs +2 -0
- package/dist/chunks/cli-0.5.9-637n1msd.mjs +15 -0
- package/dist/chunks/cli-0.5.9-671nz4d9.mjs +2 -0
- package/dist/chunks/cli-0.5.9-68rmtj23.mjs +2 -0
- package/dist/chunks/cli-0.5.9-6rrqt96f.mjs +2 -0
- package/dist/chunks/cli-0.5.9-72tax9cd.mjs +2 -0
- package/dist/chunks/cli-0.5.9-77nxjft3.mjs +2 -0
- package/dist/chunks/cli-0.5.9-7bq8wzr3.mjs +18 -0
- package/dist/chunks/cli-0.5.9-7hcka84h.mjs +2 -0
- package/dist/chunks/cli-0.5.9-7qcan18n.mjs +2 -0
- package/dist/chunks/cli-0.5.9-8h1qpeef.mjs +2 -0
- package/dist/chunks/cli-0.5.9-8kfemzbn.mjs +2 -0
- package/dist/chunks/cli-0.5.9-8ndgy03m.mjs +4 -0
- package/dist/chunks/cli-0.5.9-91gjew0x.mjs +3 -0
- package/dist/chunks/cli-0.5.9-9fgjryqc.mjs +2 -0
- package/dist/chunks/cli-0.5.9-9rrpczqk.mjs +17 -0
- package/dist/chunks/cli-0.5.9-a720c6hc.mjs +9 -0
- package/dist/chunks/cli-0.5.9-ajbjmz51.mjs +2 -0
- package/dist/chunks/cli-0.5.9-an1j3dqv.mjs +2 -0
- package/dist/chunks/cli-0.5.9-ap6gvqkx.mjs +67 -0
- package/dist/chunks/cli-0.5.9-apc46v07.mjs +15 -0
- package/dist/chunks/cli-0.5.9-awa1dtdz.mjs +2 -0
- package/dist/chunks/cli-0.5.9-b4t4xfpb.mjs +2 -0
- package/dist/chunks/cli-0.5.9-b4xgpen1.mjs +5 -0
- package/dist/chunks/cli-0.5.9-bax4dxrj.mjs +2 -0
- package/dist/chunks/cli-0.5.9-bc0wvx5b.mjs +2 -0
- package/dist/chunks/cli-0.5.9-bfn7177j.mjs +2 -0
- package/dist/chunks/cli-0.5.9-bp09b2xm.mjs +2 -0
- package/dist/chunks/cli-0.5.9-bv3m0yb8.mjs +2 -0
- package/dist/chunks/cli-0.5.9-bwdsfdf6.mjs +2 -0
- package/dist/chunks/cli-0.5.9-c54d94sv.mjs +2 -0
- package/dist/chunks/cli-0.5.9-c91t0fys.mjs +2 -0
- package/dist/chunks/cli-0.5.9-cbgfqb0x.mjs +2 -0
- package/dist/chunks/cli-0.5.9-cy4sm0c2.mjs +2 -0
- package/dist/chunks/cli-0.5.9-d5rn9c6v.mjs +12 -0
- package/dist/chunks/cli-0.5.9-d66wktpd.mjs +2 -0
- package/dist/chunks/cli-0.5.9-d89n2ccx.mjs +2 -0
- package/dist/chunks/cli-0.5.9-da0mspn4.mjs +2 -0
- package/dist/chunks/cli-0.5.9-dszssq6z.mjs +2 -0
- package/dist/chunks/cli-0.5.9-dtbcqw2e.mjs +2 -0
- package/dist/chunks/cli-0.5.9-e1gk7v9y.mjs +2 -0
- package/dist/chunks/cli-0.5.9-e4sr85eg.mjs +2 -0
- package/dist/chunks/cli-0.5.9-e5ex267m.mjs +2 -0
- package/dist/chunks/cli-0.5.9-e7gc5p54.mjs +2 -0
- package/dist/chunks/cli-0.5.9-eagw660r.mjs +2 -0
- package/dist/chunks/cli-0.5.9-ehe0yr95.mjs +26 -0
- package/dist/chunks/cli-0.5.9-ejmv1n9p.mjs +3 -0
- package/dist/chunks/cli-0.5.9-ek649arf.mjs +6 -0
- package/dist/chunks/cli-0.5.9-ezc11axw.mjs +2 -0
- package/dist/chunks/cli-0.5.9-ezpjdejw.mjs +2 -0
- package/dist/chunks/cli-0.5.9-f9jt7awn.mjs +2 -0
- package/dist/chunks/cli-0.5.9-fn6ees65.mjs +2 -0
- package/dist/chunks/cli-0.5.9-fv4jrdef.mjs +2 -0
- package/dist/chunks/cli-0.5.9-g6qpvmj4.mjs +133 -0
- package/dist/chunks/cli-0.5.9-g9kt9aw7.mjs +2 -0
- package/dist/chunks/cli-0.5.9-ga0kqnkz.mjs +5 -0
- package/dist/chunks/cli-0.5.9-gbq794tt.mjs +2 -0
- package/dist/chunks/cli-0.5.9-gcsba93g.mjs +18 -0
- package/dist/chunks/cli-0.5.9-ghbax09k.mjs +2 -0
- package/dist/chunks/cli-0.5.9-gk1vb8nn.mjs +2 -0
- package/dist/chunks/cli-0.5.9-gp0bq7wk.mjs +2 -0
- package/dist/chunks/cli-0.5.9-gr8zgxwx.mjs +2 -0
- package/dist/chunks/cli-0.5.9-grgf8g99.mjs +2 -0
- package/dist/chunks/cli-0.5.9-h5d0zxek.mjs +3 -0
- package/dist/chunks/cli-0.5.9-h6nmz5e3.mjs +2 -0
- package/dist/chunks/cli-0.5.9-h7gh7ym5.mjs +24 -0
- package/dist/chunks/cli-0.5.9-h836a3wa.mjs +2 -0
- package/dist/chunks/cli-0.5.9-hg2qm56h.mjs +4 -0
- package/dist/chunks/cli-0.5.9-hpq0xehd.mjs +2 -0
- package/dist/chunks/cli-0.5.9-hwet4kvx.mjs +2 -0
- package/dist/chunks/cli-0.5.9-j2d1jct8.mjs +2 -0
- package/dist/chunks/cli-0.5.9-j8629kcy.mjs +2 -0
- package/dist/chunks/cli-0.5.9-j9ns2awb.mjs +8 -0
- package/dist/chunks/cli-0.5.9-jd8be7cd.mjs +6 -0
- package/dist/chunks/cli-0.5.9-jdzavz2g.mjs +2 -0
- package/dist/chunks/cli-0.5.9-jjtdefqj.mjs +2 -0
- package/dist/chunks/cli-0.5.9-jk4rx6zt.mjs +4 -0
- package/dist/chunks/cli-0.5.9-jnhyr1zg.mjs +2 -0
- package/dist/chunks/cli-0.5.9-jsxqd90d.mjs +3 -0
- package/dist/chunks/cli-0.5.9-k3prcbg9.mjs +2 -0
- package/dist/chunks/cli-0.5.9-k47s77hf.mjs +2 -0
- package/dist/chunks/cli-0.5.9-k6qxbj0d.mjs +42 -0
- package/dist/chunks/cli-0.5.9-k9yedz53.mjs +5262 -0
- package/dist/chunks/cli-0.5.9-kfpgp09g.mjs +6 -0
- package/dist/chunks/cli-0.5.9-knc0w8sn.mjs +2 -0
- package/dist/chunks/cli-0.5.9-krvpcgvw.mjs +2 -0
- package/dist/chunks/cli-0.5.9-ktxeg6my.mjs +2 -0
- package/dist/chunks/cli-0.5.9-m1y4hmzs.mjs +2 -0
- package/dist/chunks/cli-0.5.9-mcezkpp8.mjs +2 -0
- package/dist/chunks/cli-0.5.9-mhz9wt6a.mjs +2 -0
- package/dist/chunks/cli-0.5.9-mk69z06z.mjs +2 -0
- package/dist/chunks/cli-0.5.9-mmvtbr39.mjs +2 -0
- package/dist/chunks/cli-0.5.9-mpqmy7zw.mjs +2 -0
- package/dist/chunks/cli-0.5.9-n08gkgng.mjs +21 -0
- package/dist/chunks/cli-0.5.9-ncjg30aq.mjs +3 -0
- package/dist/chunks/cli-0.5.9-nct7sarc.mjs +2 -0
- package/dist/chunks/cli-0.5.9-nfhfsnw6.mjs +2 -0
- package/dist/chunks/cli-0.5.9-nk3pacrn.mjs +5 -0
- package/dist/chunks/cli-0.5.9-nvf5kfmq.mjs +9 -0
- package/dist/chunks/cli-0.5.9-ppr1420k.mjs +2 -0
- package/dist/chunks/cli-0.5.9-q3wvc7qb.mjs +2 -0
- package/dist/chunks/cli-0.5.9-q69vj08a.mjs +2 -0
- package/dist/chunks/cli-0.5.9-q7a4xcwy.mjs +3 -0
- package/dist/chunks/cli-0.5.9-q9ne4r9p.mjs +50 -0
- package/dist/chunks/cli-0.5.9-qddf6zq9.mjs +2 -0
- package/dist/chunks/cli-0.5.9-qexy3mqr.mjs +59 -0
- package/dist/chunks/cli-0.5.9-qvvxrm93.mjs +3 -0
- package/dist/chunks/cli-0.5.9-qy6qkzwb.mjs +2 -0
- package/dist/chunks/cli-0.5.9-r9d405kc.mjs +2 -0
- package/dist/chunks/cli-0.5.9-rbjjfytb.mjs +2 -0
- package/dist/chunks/cli-0.5.9-rh5280xq.mjs +2 -0
- package/dist/chunks/cli-0.5.9-rhycyvwn.mjs +2 -0
- package/dist/chunks/cli-0.5.9-rjdhjn49.mjs +20 -0
- package/dist/chunks/cli-0.5.9-rm62v7hr.mjs +34 -0
- package/dist/chunks/cli-0.5.9-rpgjj6qg.mjs +2 -0
- package/dist/chunks/cli-0.5.9-rv2328c4.mjs +2 -0
- package/dist/chunks/cli-0.5.9-s2jh3scf.mjs +3 -0
- package/dist/chunks/cli-0.5.9-sd34jmva.mjs +2 -0
- package/dist/chunks/cli-0.5.9-sjcz03eb.mjs +2 -0
- package/dist/chunks/cli-0.5.9-ss870bda.mjs +2 -0
- package/dist/chunks/cli-0.5.9-syr6nffj.mjs +2 -0
- package/dist/chunks/cli-0.5.9-t2fy8t5r.mjs +45 -0
- package/dist/chunks/cli-0.5.9-tav5jmz1.mjs +2 -0
- package/dist/chunks/cli-0.5.9-tbz9s4h3.mjs +2 -0
- package/dist/chunks/cli-0.5.9-tj6dt3d6.mjs +2 -0
- package/dist/chunks/cli-0.5.9-tke5evvm.mjs +2 -0
- package/dist/chunks/cli-0.5.9-v1srrn02.mjs +2 -0
- package/dist/chunks/cli-0.5.9-v5mkedy5.mjs +16 -0
- package/dist/chunks/cli-0.5.9-v69cq6f1.mjs +2 -0
- package/dist/chunks/cli-0.5.9-ve2b6kmp.mjs +2 -0
- package/dist/chunks/cli-0.5.9-vkt9t3z8.mjs +133 -0
- package/dist/chunks/cli-0.5.9-w1g3tgzh.mjs +2 -0
- package/dist/chunks/cli-0.5.9-wc5gt1zw.mjs +2 -0
- package/dist/chunks/cli-0.5.9-whf5zybr.mjs +2 -0
- package/dist/chunks/cli-0.5.9-wjvc994v.mjs +2 -0
- package/dist/chunks/cli-0.5.9-wkhmkyaq.mjs +2 -0
- package/dist/chunks/cli-0.5.9-wrndf987.mjs +2 -0
- package/dist/chunks/cli-0.5.9-xbvqph1k.mjs +2 -0
- package/dist/chunks/cli-0.5.9-xcexsk79.mjs +2 -0
- package/dist/chunks/cli-0.5.9-xge969yd.mjs +2 -0
- package/dist/chunks/cli-0.5.9-xn1qcye7.mjs +2 -0
- package/dist/chunks/cli-0.5.9-xn369es1.mjs +2 -0
- package/dist/chunks/cli-0.5.9-xz1pg47z.mjs +10 -0
- package/dist/chunks/cli-0.5.9-yazhwsgb.mjs +4 -0
- package/dist/chunks/cli-0.5.9-yh7f5m4w.mjs +2 -0
- package/dist/chunks/cli-0.5.9-yqn35x2d.mjs +2 -0
- package/dist/chunks/cli-0.5.9-ysvsqcpa.mjs +2 -0
- package/dist/chunks/cli-0.5.9-ywc7arzn.mjs +2 -0
- package/dist/chunks/cli-0.5.9-z87j725g.mjs +2 -0
- package/dist/chunks/cli-0.5.9-zb26tq1c.mjs +2 -0
- package/dist/chunks/cli-0.5.9-zerpef2t.mjs +1 -0
- package/dist/chunks/cli-0.5.9-zeskcndd.mjs +24 -0
- package/dist/chunks/cli-0.5.9-zqgkcx3g.mjs +2 -0
- package/dist/chunks/cli-0.5.9-zrcz538q.mjs +2 -0
- package/dist/chunks/cli-0.5.9-zwpt90q9.mjs +7 -0
- package/dist/chunks/client-0.5.9-bhc7ghsr.mjs +1 -0
- package/dist/chunks/color-0.5.9-5722xdf4.mjs +1 -0
- package/dist/chunks/compact-0.5.9-4cf807hc.mjs +3 -0
- package/dist/chunks/config-0.5.9-936tss5g.mjs +1 -0
- package/dist/chunks/config-0.5.9-kk16cygb.mjs +1 -0
- package/dist/chunks/context-0.5.9-b0afgp2c.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.5.9-wj6fxcsj.mjs +1 -0
- package/dist/chunks/conversation-0.5.9-rtntf81h.mjs +1 -0
- package/dist/chunks/copy-0.5.9-93t8z0wz.mjs +9 -0
- package/dist/chunks/cost-0.5.9-2csvd1ae.mjs +1 -0
- package/dist/chunks/createSSHSession-0.5.9-0aqkvqad.mjs +1 -0
- package/dist/chunks/createSession-0.5.9-j9xdpffh.mjs +1 -0
- package/dist/chunks/debug-0.5.9-kd9n32y2.mjs +1 -0
- package/dist/chunks/defaultActionDeps-0.5.9-1f7mkn9m.mjs +1177 -0
- package/dist/chunks/desktop-0.5.9-ce65mt7y.mjs +1 -0
- package/dist/chunks/detectRepository-0.5.9-4nd76hbs.mjs +1 -0
- package/dist/chunks/detection-0.5.9-mpgxg1d5.mjs +1 -0
- package/dist/chunks/diff-0.5.9-89ny0sp6.mjs +1 -0
- package/dist/chunks/doctor-0.5.9-e8bxsm2r.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-0.5.9-kwncc3yh.mjs +1 -0
- package/dist/chunks/earlyInput-0.5.9-cxrgrx2e.mjs +1 -0
- package/dist/chunks/effort-0.5.9-dbgsjfep.mjs +10 -0
- package/dist/chunks/envUtils-0.5.9-59e9sq5q.mjs +1 -0
- package/dist/chunks/environmentSelection-0.5.9-5tjt9mkd.mjs +1 -0
- package/dist/chunks/environments-0.5.9-ebm4yp6e.mjs +1 -0
- package/dist/chunks/errors-0.5.9-xp1e5xqp.mjs +1 -0
- package/dist/chunks/exampleCommands-0.5.9-dxv2wpk4.mjs +1 -0
- package/dist/chunks/exit-0.5.9-q7cpk25k.mjs +1 -0
- package/dist/chunks/export-0.5.9-1dpbp185.mjs +2 -0
- package/dist/chunks/extra-usage-0.5.9-ctd5dnsr.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.5.9-hbmbvzb5.mjs +1 -0
- package/dist/chunks/fast-0.5.9-wagaw91z.mjs +1 -0
- package/dist/chunks/feedback-0.5.9-x37szs13.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-0.5.9-g8st730b.mjs +1 -0
- package/dist/chunks/git-0.5.9-zxdvsyxq.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.5.9-mp51r114.mjs +1 -0
- package/dist/chunks/grove-0.5.9-grafpqtx.mjs +1 -0
- package/dist/chunks/growthbook-0.5.9-mr1nyz65.mjs +1 -0
- package/dist/chunks/headless-0.5.9-pxnbg1dh.mjs +2 -0
- package/dist/chunks/heapdump-0.5.9-58bmar8y.mjs +6 -0
- package/dist/chunks/help-0.5.9-x6ds3za0.mjs +1 -0
- package/dist/chunks/hookChains-0.5.9-1sz7vw7t.mjs +3 -0
- package/dist/chunks/hooks-0.5.9-4mjp8k78.mjs +1 -0
- package/dist/chunks/hooks-0.5.9-n14e2a57.mjs +79 -0
- package/dist/chunks/ide-0.5.9-gk5tarwc.mjs +3 -0
- package/dist/chunks/image-processor-napi-0.5.9-eept9e9s.mjs +1 -0
- package/dist/chunks/index-0.5.9-0n7mpzrj.mjs +17 -0
- package/dist/chunks/index-0.5.9-3ng34e8n.mjs +2 -0
- package/dist/chunks/index-0.5.9-4b9dgj2z.mjs +9 -0
- package/dist/chunks/index-0.5.9-4fzd2pns.mjs +1 -0
- package/dist/chunks/index-0.5.9-6awv6fyn.mjs +1 -0
- package/dist/chunks/index-0.5.9-6cbrcdyh.mjs +1 -0
- package/dist/chunks/index-0.5.9-725p0eby.mjs +1 -0
- package/dist/chunks/index-0.5.9-85ep6547.mjs +30 -0
- package/dist/chunks/index-0.5.9-8h5ceajb.mjs +1 -0
- package/dist/chunks/index-0.5.9-8ws7n6wv.mjs +5 -0
- package/dist/chunks/index-0.5.9-b3jm65x4.mjs +1 -0
- package/dist/chunks/index-0.5.9-cjjbeyt8.mjs +1 -0
- package/dist/chunks/index-0.5.9-gnac3s48.mjs +1 -0
- package/dist/chunks/index-0.5.9-m68jcsx2.mjs +1 -0
- package/dist/chunks/index-0.5.9-n91crv8a.mjs +1 -0
- package/dist/chunks/index-0.5.9-npkfayxd.mjs +1 -0
- package/dist/chunks/index-0.5.9-pbzzad7t.mjs +9 -0
- package/dist/chunks/index-0.5.9-thp631gs.mjs +1 -0
- package/dist/chunks/index-0.5.9-xcy5t1fw.mjs +1 -0
- package/dist/chunks/index-0.5.9-y07jxja1.mjs +1 -0
- package/dist/chunks/index-0.5.9-yjkfcf2g.mjs +2 -0
- package/dist/chunks/index-0.5.9-zb346057.mjs +1 -0
- package/dist/chunks/init-0.5.9-cmszfh8j.mjs +1 -0
- package/dist/chunks/initReplBridge-0.5.9-y2j594wz.mjs +1 -0
- package/dist/chunks/ink-0.5.9-km3f0tv6.mjs +1 -0
- package/dist/chunks/insights-0.5.9-fevx72ve.mjs +870 -0
- package/dist/chunks/install-0.5.9-6m05dpsa.mjs +1 -0
- package/dist/chunks/install-github-app-0.5.9-91syqpey.mjs +149 -0
- package/dist/chunks/install-slack-app-0.5.9-9rqmjej1.mjs +1 -0
- package/dist/chunks/instrumentation-0.5.9-55dt6kkh.mjs +1 -0
- package/dist/chunks/interactiveHelpers-0.5.9-47bhz9at.mjs +1 -0
- package/dist/chunks/keybindings-0.5.9-y134m89v.mjs +2 -0
- package/dist/chunks/knowledge-0.5.9-d1m7e2b4.mjs +2 -0
- package/dist/chunks/latestVersionCache-0.5.9-69z169gq.mjs +1 -0
- package/dist/chunks/loadAgentsDir-0.5.9-vtemqv8c.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.5.9-xxp0pj2x.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.5.9-zgq2s8sm.mjs +1 -0
- package/dist/chunks/log-0.5.9-8aszszjb.mjs +1 -0
- package/dist/chunks/main-0.5.9-cjg2h8yb.mjs +1 -0
- package/dist/chunks/managedEnv-0.5.9-nq2mbery.mjs +1 -0
- package/dist/chunks/mcp-0.5.9-g39bj87f.mjs +17 -0
- package/dist/chunks/mcp-0.5.9-h1sdm6zb.mjs +4 -0
- package/dist/chunks/mcp-0.5.9-vpwsq0wd.mjs +1 -0
- package/dist/chunks/mcpb-0.5.9-pavmx8mm.mjs +1 -0
- package/dist/chunks/memory-0.5.9-se036fe4.mjs +3 -0
- package/dist/chunks/mobile-0.5.9-57ycqdp3.mjs +2 -0
- package/dist/chunks/model-0.5.9-4e6fc1m4.mjs +1 -0
- package/dist/chunks/model-0.5.9-k0m86zrn.mjs +2 -0
- package/dist/chunks/node-0.5.9-ftk6pxmx.mjs +12 -0
- package/dist/chunks/oauth-0.5.9-bytwte72.mjs +1 -0
- package/dist/chunks/openaiShim-0.5.9-f9gdeama.mjs +14 -0
- package/dist/chunks/output-style-0.5.9-1wbqsbc0.mjs +1 -0
- package/dist/chunks/package-D6422PQU-0.5.9-4gkr65dy.mjs +1 -0
- package/dist/chunks/parseConnectUrl-0.5.9-d0t88r4n.mjs +1 -0
- package/dist/chunks/parser-0.5.9-j1kdtn15.mjs +1 -0
- package/dist/chunks/passes-0.5.9-w08t80rc.mjs +1 -0
- package/dist/chunks/permissions-0.5.9-mzx7w14f.mjs +3 -0
- package/dist/chunks/plan-0.5.9-trs5gepx.mjs +1 -0
- package/dist/chunks/plist-0.5.9-rzpv4ecn.mjs +1 -0
- package/dist/chunks/plugin-0.5.9-x1xsznkk.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.5.9-qwkp82xp.mjs +1 -0
- package/dist/chunks/plugins-0.5.9-8yj1w6bf.mjs +9 -0
- package/dist/chunks/preActionHook-0.5.9-130eb4bx.mjs +2 -0
- package/dist/chunks/print-0.5.9-fm0q92d1.mjs +57 -0
- package/dist/chunks/privacy-settings-0.5.9-vhjhbccg.mjs +1 -0
- package/dist/chunks/process-0.5.9-syp1y7ym.mjs +1 -0
- package/dist/chunks/processBashCommand-0.5.9-admb0s9z.mjs +1 -0
- package/dist/chunks/processSlashCommand-0.5.9-x5wmbzr0.mjs +9 -0
- package/dist/chunks/prompt-0.5.9-6s763n7m.mjs +1 -0
- package/dist/chunks/prompt-0.5.9-fg1exp0e.mjs +1 -0
- package/dist/chunks/prompts-0.5.9-a6jrpexy.mjs +1 -0
- package/dist/chunks/protocolHandler-0.5.9-5920qvb2.mjs +13 -0
- package/dist/chunks/provider-0.5.9-ew50s03j.mjs +2 -0
- package/dist/chunks/providerProfiles-0.5.9-ygv5pxbq.mjs +1 -0
- package/dist/chunks/providerValidation-0.5.9-pebvjkk0.mjs +6 -0
- package/dist/chunks/rate-limit-options-0.5.9-p39mhxr9.mjs +1 -0
- package/dist/chunks/registerSubcommands-0.5.9-5576rw9k.mjs +34 -0
- package/dist/chunks/registry-0.5.9-tkmx5qgm.mjs +1 -0
- package/dist/chunks/release-notes-0.5.9-cmf1033z.mjs +5 -0
- package/dist/chunks/reload-plugins-0.5.9-ynqb4wwm.mjs +2 -0
- package/dist/chunks/remote-env-0.5.9-ddnwx90m.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-0.5.9-br32ecze.mjs +1 -0
- package/dist/chunks/remoteSession-0.5.9-9ee3jy2n.mjs +1 -0
- package/dist/chunks/rename-0.5.9-h0npjxhv.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.5.9-4tjg5rct.mjs +1 -0
- package/dist/chunks/replLauncher-0.5.9-y4zkk3hb.mjs +1 -0
- package/dist/chunks/resume-0.5.9-5n9z570h.mjs +2 -0
- package/dist/chunks/rewind-0.5.9-cawzh2f5.mjs +1 -0
- package/dist/chunks/rootOptions-0.5.9-z7hher7x.mjs +1 -0
- package/dist/chunks/sandbox-adapter-0.5.9-m8dy3vak.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.5.9-d7hfb9dw.mjs +1 -0
- package/dist/chunks/session-0.5.9-spjfzb60.mjs +2 -0
- package/dist/chunks/sessionDiscovery-0.5.9-k8tw4apd.mjs +1 -0
- package/dist/chunks/sessionFileAccessHooks-0.5.9-kzd77836.mjs +1 -0
- package/dist/chunks/sessionStorage-0.5.9-5eaxh9e1.mjs +1 -0
- package/dist/chunks/settings-0.5.9-9y9yx2ep.mjs +1 -0
- package/dist/chunks/setup-0.5.9-cbnsjaz6.mjs +5 -0
- package/dist/chunks/sinks-0.5.9-3kes56y2.mjs +1 -0
- package/dist/chunks/skills-0.5.9-816ec23f.mjs +1 -0
- package/dist/chunks/startupProfiler-0.5.9-j5rdws5r.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-0.5.9-wgd2amqq.mjs +1 -0
- package/dist/chunks/state-0.5.9-ssv90pdf.mjs +1 -0
- package/dist/chunks/stats-0.5.9-09jq1eez.mjs +6 -0
- package/dist/chunks/status-0.5.9-zm23czy4.mjs +1 -0
- package/dist/chunks/stickers-0.5.9-df1ha62e.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.5.9-4bh9v7rk.mjs +1 -0
- package/dist/chunks/tasks-0.5.9-75eaj64t.mjs +1 -0
- package/dist/chunks/teamHelpers-0.5.9-a239c7as.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.5.9-gpfpnhg1.mjs +1 -0
- package/dist/chunks/teleport-0.5.9-jq0cm2ce.mjs +1 -0
- package/dist/chunks/terminalSetup-0.5.9-zscy8b5b.mjs +1 -0
- package/dist/chunks/theme-0.5.9-crkb4a1t.mjs +1 -0
- package/dist/chunks/thinkback-0.5.9-bqzpccev.mjs +1 -0
- package/dist/chunks/thinkback-play-0.5.9-avsgpz11.mjs +1 -0
- package/dist/chunks/toolPool-0.5.9-9k94r61g.mjs +1 -0
- package/dist/chunks/toolSearch-0.5.9-qm8rqvys.mjs +1 -0
- package/dist/chunks/tools-0.5.9-e5fa6xh1.mjs +1 -0
- package/dist/chunks/trustedDevice-0.5.9-dhpwn40g.mjs +1 -0
- package/dist/chunks/turndown.cjs-0.5.9-bwat06c0.mjs +69 -0
- package/dist/chunks/ultrareviewCommand-0.5.9-qfz8shw1.mjs +4 -0
- package/dist/chunks/update-0.5.9-yv6acwy6.mjs +86 -0
- package/dist/chunks/upgrade-0.5.9-3xpmapbj.mjs +1 -0
- package/dist/chunks/upstreamproxy-0.5.9-ebc62ytm.mjs +14 -0
- package/dist/chunks/url-handler-napi-0.5.9-ejbmjrv9.mjs +1 -0
- package/dist/chunks/usage-0.5.9-ze5694v0.mjs +1 -0
- package/dist/chunks/util-0.5.9-8517xr6w.mjs +1 -0
- package/dist/chunks/utils-0.5.9-tq5p3g26.mjs +1 -0
- package/dist/chunks/vim-0.5.9-3pwhv6s4.mjs +1 -0
- package/dist/chunks/watcher-0.5.9-ft2b96h8.mjs +1 -0
- package/dist/chunks/wiki-0.5.9-f96c34xg.mjs +132 -0
- package/dist/chunks/worktree-0.5.9-p28ne51h.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.5.9-4tgvrvd2.mjs +1 -0
- package/dist/chunks/wrapper-0.5.9-asjtntyw.mjs +7 -0
- package/dist/claudin-vscode.vsix +0 -0
- package/dist/cli.mjs +2 -2
- package/package.json +24 -24
- package/dist/chunks/AgentTool-0.5.8-161prcqd.mjs +0 -1
- package/dist/chunks/App-0.5.8-s4939y9q.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.5.8-kyzt3tyh.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-0.5.8-0fws1s48.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.5.8-v373fzha.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.5.8-pbv15kg8.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.5.8-rmcm4b5v.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.5.8-q3djee4h.mjs +0 -1
- package/dist/chunks/DiffDialog-0.5.8-1gvdqrt3.mjs +0 -3
- package/dist/chunks/Doctor-0.5.8-5k5vqf8q.mjs +0 -1
- package/dist/chunks/Grove-0.5.8-g2xzefay.mjs +0 -1
- package/dist/chunks/ITermBackend-0.5.8-j209yx9z.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.5.8-98nc303h.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.5.8-p5qzw710.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.5.8-gp57r21r.mjs +0 -1
- package/dist/chunks/Onboarding-0.5.8-m0r6a4s2.mjs +0 -1
- package/dist/chunks/ProviderManager-0.5.8-6tfnxyse.mjs +0 -1
- package/dist/chunks/REPL-0.5.8-sf0q46pa.mjs +0 -1
- package/dist/chunks/ResumeConversation-0.5.8-0j8mw0eh.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-0.5.8-13b725ee.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.5.8-3fxrymde.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.5.8-1dqx0hnb.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-0.5.8-84pek3s7.mjs +0 -1
- package/dist/chunks/TmuxBackend-0.5.8-rcwm1j6z.mjs +0 -9
- package/dist/chunks/ToolSearchTool-0.5.8-fp493kvp.mjs +0 -1
- package/dist/chunks/TrustDialog-0.5.8-j0h8y92c.mjs +0 -1
- package/dist/chunks/activeProvider-0.5.8-y1zsxh1g.mjs +0 -1
- package/dist/chunks/add-dir-0.5.8-sz3kyvkz.mjs +0 -1
- package/dist/chunks/agents-0.5.8-cm3hzc60.mjs +0 -3
- package/dist/chunks/agents-0.5.8-qg1s69va.mjs +0 -110
- package/dist/chunks/api-0.5.8-pcde65dc.mjs +0 -1
- package/dist/chunks/asciicast-0.5.8-tgmb7g4m.mjs +0 -1
- package/dist/chunks/assistant-0.5.8-4mak6nq9.mjs +0 -1
- package/dist/chunks/auth-0.5.8-70ks8nc4.mjs +0 -1
- package/dist/chunks/auth-0.5.8-82vx5hkw.mjs +0 -1
- package/dist/chunks/autoMode-0.5.8-xjwjh2k5.mjs +0 -48
- package/dist/chunks/autoUpdater-0.5.8-rf164ggm.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-0.5.8-ak5ca2cx.mjs +0 -1
- package/dist/chunks/branch-0.5.8-n82xbsmg.mjs +0 -4
- package/dist/chunks/bridgePointer-0.5.8-m7nwe7sd.mjs +0 -1
- package/dist/chunks/btw-0.5.8-0yftty6m.mjs +0 -1
- package/dist/chunks/buddy-0.5.8-4dvkprbs.mjs +0 -3
- package/dist/chunks/cacache-0.5.8-vj95fs26.mjs +0 -1
- package/dist/chunks/cache-probe-0.5.8-944hef3p.mjs +0 -21
- package/dist/chunks/cacheStats-0.5.8-jdya51jg.mjs +0 -4
- package/dist/chunks/caches-0.5.8-xkrjxp25.mjs +0 -1
- package/dist/chunks/claudeDesktop-0.5.8-fpb40wzd.mjs +0 -1
- package/dist/chunks/claudemd-0.5.8-eyztrzk8.mjs +0 -1
- package/dist/chunks/clear-0.5.8-kgvzdkgq.mjs +0 -1
- package/dist/chunks/clearTerminal-0.5.8-xv1faw7c.mjs +0 -1
- package/dist/chunks/cli-0.5.8-01yjahnz.mjs +0 -2
- package/dist/chunks/cli-0.5.8-07dyymev.mjs +0 -2
- package/dist/chunks/cli-0.5.8-0a4sdrgm.mjs +0 -2
- package/dist/chunks/cli-0.5.8-0bys4xae.mjs +0 -2
- package/dist/chunks/cli-0.5.8-0cmtavcs.mjs +0 -2
- package/dist/chunks/cli-0.5.8-0dkx0fh2.mjs +0 -2
- package/dist/chunks/cli-0.5.8-0hybhk72.mjs +0 -2
- package/dist/chunks/cli-0.5.8-0we2hm7d.mjs +0 -2
- package/dist/chunks/cli-0.5.8-1bp61y3p.mjs +0 -2
- package/dist/chunks/cli-0.5.8-1gm5vdye.mjs +0 -2
- package/dist/chunks/cli-0.5.8-1heha1zs.mjs +0 -2
- package/dist/chunks/cli-0.5.8-1x4w18nq.mjs +0 -2
- package/dist/chunks/cli-0.5.8-20gjzt7v.mjs +0 -2
- package/dist/chunks/cli-0.5.8-221e7v67.mjs +0 -2
- package/dist/chunks/cli-0.5.8-23ep6z70.mjs +0 -2
- package/dist/chunks/cli-0.5.8-2bq72da9.mjs +0 -2
- package/dist/chunks/cli-0.5.8-2f1ewq8w.mjs +0 -2
- package/dist/chunks/cli-0.5.8-2g8p9sae.mjs +0 -2
- package/dist/chunks/cli-0.5.8-2nr7eh5e.mjs +0 -2
- package/dist/chunks/cli-0.5.8-396k3ymm.mjs +0 -25
- package/dist/chunks/cli-0.5.8-3a6g7wmx.mjs +0 -58
- package/dist/chunks/cli-0.5.8-3fnpjffd.mjs +0 -2
- package/dist/chunks/cli-0.5.8-3ndh3gtc.mjs +0 -2
- package/dist/chunks/cli-0.5.8-3p5h46hv.mjs +0 -2
- package/dist/chunks/cli-0.5.8-3qjtx8w8.mjs +0 -2
- package/dist/chunks/cli-0.5.8-3y8x0dx3.mjs +0 -2
- package/dist/chunks/cli-0.5.8-3zg1gkde.mjs +0 -2
- package/dist/chunks/cli-0.5.8-402vctdy.mjs +0 -2
- package/dist/chunks/cli-0.5.8-42eyjvs8.mjs +0 -2
- package/dist/chunks/cli-0.5.8-4hvxb5dp.mjs +0 -5286
- package/dist/chunks/cli-0.5.8-4jrb4x7b.mjs +0 -9
- package/dist/chunks/cli-0.5.8-4mn881k7.mjs +0 -2
- package/dist/chunks/cli-0.5.8-4n26wzd5.mjs +0 -2
- package/dist/chunks/cli-0.5.8-4rgg1zqd.mjs +0 -6
- package/dist/chunks/cli-0.5.8-4xn4yjaa.mjs +0 -8
- package/dist/chunks/cli-0.5.8-4yyy85fr.mjs +0 -2
- package/dist/chunks/cli-0.5.8-510vqc09.mjs +0 -4
- package/dist/chunks/cli-0.5.8-57qan5v8.mjs +0 -2
- package/dist/chunks/cli-0.5.8-5a9k7mja.mjs +0 -2
- package/dist/chunks/cli-0.5.8-5bdfv4z2.mjs +0 -2
- package/dist/chunks/cli-0.5.8-5gzkph9c.mjs +0 -2
- package/dist/chunks/cli-0.5.8-5h92528m.mjs +0 -4
- package/dist/chunks/cli-0.5.8-5zqpfyqq.mjs +0 -2
- package/dist/chunks/cli-0.5.8-60e57smp.mjs +0 -2
- package/dist/chunks/cli-0.5.8-665mfjfq.mjs +0 -5
- package/dist/chunks/cli-0.5.8-69frkjjq.mjs +0 -2
- package/dist/chunks/cli-0.5.8-69swpyae.mjs +0 -2
- package/dist/chunks/cli-0.5.8-6epmns99.mjs +0 -2
- package/dist/chunks/cli-0.5.8-6nc6hmng.mjs +0 -3
- package/dist/chunks/cli-0.5.8-6t480jt6.mjs +0 -2
- package/dist/chunks/cli-0.5.8-6tfvmmwd.mjs +0 -2
- package/dist/chunks/cli-0.5.8-78y711gq.mjs +0 -7
- package/dist/chunks/cli-0.5.8-7fm71y20.mjs +0 -2
- package/dist/chunks/cli-0.5.8-7t6q11qp.mjs +0 -3
- package/dist/chunks/cli-0.5.8-7teqphwt.mjs +0 -2
- package/dist/chunks/cli-0.5.8-7w4sv41z.mjs +0 -2
- package/dist/chunks/cli-0.5.8-7wzh55d5.mjs +0 -2
- package/dist/chunks/cli-0.5.8-8b40nd32.mjs +0 -3
- package/dist/chunks/cli-0.5.8-8c0hade9.mjs +0 -2
- package/dist/chunks/cli-0.5.8-8h4z9e0a.mjs +0 -2
- package/dist/chunks/cli-0.5.8-8jfx4hd4.mjs +0 -24
- package/dist/chunks/cli-0.5.8-8jzc3wsz.mjs +0 -2
- package/dist/chunks/cli-0.5.8-8n05q2cg.mjs +0 -4
- package/dist/chunks/cli-0.5.8-903jgg2t.mjs +0 -2
- package/dist/chunks/cli-0.5.8-959n5v33.mjs +0 -44
- package/dist/chunks/cli-0.5.8-96p83b7z.mjs +0 -2
- package/dist/chunks/cli-0.5.8-99pnpzq7.mjs +0 -2
- package/dist/chunks/cli-0.5.8-9ffdsmw1.mjs +0 -2
- package/dist/chunks/cli-0.5.8-9fpm1ms3.mjs +0 -2
- package/dist/chunks/cli-0.5.8-9jzc13yp.mjs +0 -2
- package/dist/chunks/cli-0.5.8-a03sqccb.mjs +0 -2
- package/dist/chunks/cli-0.5.8-at01jfw3.mjs +0 -2
- package/dist/chunks/cli-0.5.8-axp2p1sa.mjs +0 -2
- package/dist/chunks/cli-0.5.8-bfynw1rm.mjs +0 -2
- package/dist/chunks/cli-0.5.8-bhc8vwxd.mjs +0 -2
- package/dist/chunks/cli-0.5.8-bjqx8j31.mjs +0 -67
- package/dist/chunks/cli-0.5.8-bnqvgx16.mjs +0 -18
- package/dist/chunks/cli-0.5.8-brnwv1s4.mjs +0 -2
- package/dist/chunks/cli-0.5.8-bv6qegpr.mjs +0 -2
- package/dist/chunks/cli-0.5.8-bv8mzvsr.mjs +0 -2
- package/dist/chunks/cli-0.5.8-bwsasv3j.mjs +0 -12
- package/dist/chunks/cli-0.5.8-cc6m9nm7.mjs +0 -2
- package/dist/chunks/cli-0.5.8-cctz1t07.mjs +0 -2
- package/dist/chunks/cli-0.5.8-cgt1fvs7.mjs +0 -2
- package/dist/chunks/cli-0.5.8-chb0m9py.mjs +0 -17
- package/dist/chunks/cli-0.5.8-chdp8e1b.mjs +0 -15
- package/dist/chunks/cli-0.5.8-cm551a1y.mjs +0 -2
- package/dist/chunks/cli-0.5.8-cv8hrynt.mjs +0 -2
- package/dist/chunks/cli-0.5.8-d3t3qcax.mjs +0 -2
- package/dist/chunks/cli-0.5.8-dn2c6x2n.mjs +0 -2
- package/dist/chunks/cli-0.5.8-dtn5ax3v.mjs +0 -2
- package/dist/chunks/cli-0.5.8-e5dnz0q6.mjs +0 -2
- package/dist/chunks/cli-0.5.8-e6gpyhnf.mjs +0 -39
- package/dist/chunks/cli-0.5.8-edf7e65a.mjs +0 -2
- package/dist/chunks/cli-0.5.8-eq34z9xf.mjs +0 -133
- package/dist/chunks/cli-0.5.8-erk0zvwn.mjs +0 -3
- package/dist/chunks/cli-0.5.8-et8r95zv.mjs +0 -15
- package/dist/chunks/cli-0.5.8-etf1n11s.mjs +0 -2
- package/dist/chunks/cli-0.5.8-ex39bk3p.mjs +0 -3
- package/dist/chunks/cli-0.5.8-f0cc21nk.mjs +0 -34
- package/dist/chunks/cli-0.5.8-f1znt77k.mjs +0 -2
- package/dist/chunks/cli-0.5.8-f54hhqdn.mjs +0 -4
- package/dist/chunks/cli-0.5.8-fbja9vc0.mjs +0 -2
- package/dist/chunks/cli-0.5.8-fhebd13f.mjs +0 -12
- package/dist/chunks/cli-0.5.8-fmyr9f7x.mjs +0 -18
- package/dist/chunks/cli-0.5.8-fr90cgpy.mjs +0 -4
- package/dist/chunks/cli-0.5.8-gf6svxra.mjs +0 -27
- package/dist/chunks/cli-0.5.8-gm4jqzfs.mjs +0 -2
- package/dist/chunks/cli-0.5.8-gnw67m2e.mjs +0 -3
- package/dist/chunks/cli-0.5.8-gp6x9qmw.mjs +0 -2
- package/dist/chunks/cli-0.5.8-gr2yrqhs.mjs +0 -21
- package/dist/chunks/cli-0.5.8-haddssvq.mjs +0 -17
- package/dist/chunks/cli-0.5.8-he3sfaey.mjs +0 -2
- package/dist/chunks/cli-0.5.8-hkfwdsmy.mjs +0 -2
- package/dist/chunks/cli-0.5.8-hz85a3w7.mjs +0 -2
- package/dist/chunks/cli-0.5.8-j5n54z7y.mjs +0 -2
- package/dist/chunks/cli-0.5.8-j5nn8m2r.mjs +0 -2
- package/dist/chunks/cli-0.5.8-jcm5hsqp.mjs +0 -6
- package/dist/chunks/cli-0.5.8-je6yq94p.mjs +0 -2
- package/dist/chunks/cli-0.5.8-jjmb10ns.mjs +0 -10
- package/dist/chunks/cli-0.5.8-jtqyf6nz.mjs +0 -9
- package/dist/chunks/cli-0.5.8-kbjtm14d.mjs +0 -2
- package/dist/chunks/cli-0.5.8-kdatn7ch.mjs +0 -2
- package/dist/chunks/cli-0.5.8-kmzftyt4.mjs +0 -2
- package/dist/chunks/cli-0.5.8-m3186fr3.mjs +0 -5
- package/dist/chunks/cli-0.5.8-m7f68vhz.mjs +0 -2
- package/dist/chunks/cli-0.5.8-m9yn90fe.mjs +0 -4
- package/dist/chunks/cli-0.5.8-mf9m22v5.mjs +0 -2
- package/dist/chunks/cli-0.5.8-mgzx32hk.mjs +0 -3
- package/dist/chunks/cli-0.5.8-ntjmzc72.mjs +0 -4
- package/dist/chunks/cli-0.5.8-nwe7yne9.mjs +0 -59
- package/dist/chunks/cli-0.5.8-p2n1sz9e.mjs +0 -2
- package/dist/chunks/cli-0.5.8-p596xr80.mjs +0 -2
- package/dist/chunks/cli-0.5.8-p72phgsn.mjs +0 -2
- package/dist/chunks/cli-0.5.8-p84q1yp2.mjs +0 -2
- package/dist/chunks/cli-0.5.8-p9vc4jd4.mjs +0 -2
- package/dist/chunks/cli-0.5.8-pbvqqyq3.mjs +0 -133
- package/dist/chunks/cli-0.5.8-pmsd92jp.mjs +0 -2
- package/dist/chunks/cli-0.5.8-ppmhyhcf.mjs +0 -2
- package/dist/chunks/cli-0.5.8-pwcy1yf9.mjs +0 -2
- package/dist/chunks/cli-0.5.8-qdnr3r07.mjs +0 -2
- package/dist/chunks/cli-0.5.8-qf19nfhv.mjs +0 -193
- package/dist/chunks/cli-0.5.8-qgd7he6r.mjs +0 -3
- package/dist/chunks/cli-0.5.8-qrbzvxe2.mjs +0 -2
- package/dist/chunks/cli-0.5.8-qvy0n26p.mjs +0 -2
- package/dist/chunks/cli-0.5.8-r3r9r1x8.mjs +0 -2
- package/dist/chunks/cli-0.5.8-r3zjfgs5.mjs +0 -2
- package/dist/chunks/cli-0.5.8-r88abafr.mjs +0 -15
- package/dist/chunks/cli-0.5.8-rddkqxh8.mjs +0 -16
- package/dist/chunks/cli-0.5.8-rjn66mdx.mjs +0 -4
- package/dist/chunks/cli-0.5.8-rtmc93gs.mjs +0 -2
- package/dist/chunks/cli-0.5.8-rvxqss4v.mjs +0 -12
- package/dist/chunks/cli-0.5.8-s3j6qsck.mjs +0 -3
- package/dist/chunks/cli-0.5.8-s7px34xg.mjs +0 -2
- package/dist/chunks/cli-0.5.8-sbqgh2ca.mjs +0 -2
- package/dist/chunks/cli-0.5.8-t3x9v2fr.mjs +0 -2
- package/dist/chunks/cli-0.5.8-tc6ssmvg.mjs +0 -2
- package/dist/chunks/cli-0.5.8-tknpvwjq.mjs +0 -24
- package/dist/chunks/cli-0.5.8-tp8vvk8a.mjs +0 -4
- package/dist/chunks/cli-0.5.8-v274erpp.mjs +0 -2
- package/dist/chunks/cli-0.5.8-v5gbzf09.mjs +0 -2
- package/dist/chunks/cli-0.5.8-vax2sw0y.mjs +0 -2
- package/dist/chunks/cli-0.5.8-vck50j66.mjs +0 -2
- package/dist/chunks/cli-0.5.8-vhpgdwvb.mjs +0 -45
- package/dist/chunks/cli-0.5.8-w36atn94.mjs +0 -2
- package/dist/chunks/cli-0.5.8-w75qbypx.mjs +0 -2
- package/dist/chunks/cli-0.5.8-w7g735pf.mjs +0 -2
- package/dist/chunks/cli-0.5.8-was67jgw.mjs +0 -2
- package/dist/chunks/cli-0.5.8-wcjp9e8f.mjs +0 -50
- package/dist/chunks/cli-0.5.8-wcyjzsha.mjs +0 -2
- package/dist/chunks/cli-0.5.8-wdyh9mqa.mjs +0 -3
- package/dist/chunks/cli-0.5.8-wkcmqhde.mjs +0 -2
- package/dist/chunks/cli-0.5.8-wm9jby2t.mjs +0 -2
- package/dist/chunks/cli-0.5.8-wtz636rz.mjs +0 -20
- package/dist/chunks/cli-0.5.8-x8fzgqvs.mjs +0 -2
- package/dist/chunks/cli-0.5.8-x9q7q10d.mjs +0 -2
- package/dist/chunks/cli-0.5.8-xs1gy1tk.mjs +0 -6
- package/dist/chunks/cli-0.5.8-xvf56w0z.mjs +0 -2
- package/dist/chunks/cli-0.5.8-xwpp4ts7.mjs +0 -2
- package/dist/chunks/cli-0.5.8-xwzk13b3.mjs +0 -2
- package/dist/chunks/cli-0.5.8-yfpy2mmj.mjs +0 -2
- package/dist/chunks/cli-0.5.8-ywfvs57d.mjs +0 -2
- package/dist/chunks/cli-0.5.8-z14ncgt9.mjs +0 -2
- package/dist/chunks/cli-0.5.8-z3ev1ken.mjs +0 -3
- package/dist/chunks/cli-0.5.8-z447z8t0.mjs +0 -2
- package/dist/chunks/cli-0.5.8-zervw1k3.mjs +0 -5
- package/dist/chunks/cli-0.5.8-zf5yzqn5.mjs +0 -1
- package/dist/chunks/cli-0.5.8-zhydxkm6.mjs +0 -2
- package/dist/chunks/cli-0.5.8-zkn5gecs.mjs +0 -2
- package/dist/chunks/cli-0.5.8-zy590bkh.mjs +0 -2
- package/dist/chunks/client-0.5.8-9axd4w58.mjs +0 -1
- package/dist/chunks/color-0.5.8-resv1z9m.mjs +0 -1
- package/dist/chunks/compact-0.5.8-4rtxsg5x.mjs +0 -3
- package/dist/chunks/config-0.5.8-1j4xyj57.mjs +0 -1
- package/dist/chunks/config-0.5.8-ettscama.mjs +0 -1
- package/dist/chunks/context-0.5.8-fpg3fcmt.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.5.8-zaspwvjm.mjs +0 -1
- package/dist/chunks/conversation-0.5.8-hfvm0eqb.mjs +0 -1
- package/dist/chunks/copy-0.5.8-wzb7pjzr.mjs +0 -9
- package/dist/chunks/cost-0.5.8-f2m9t7ye.mjs +0 -1
- package/dist/chunks/createSSHSession-0.5.8-615sh7tx.mjs +0 -1
- package/dist/chunks/createSession-0.5.8-v7srm5ea.mjs +0 -1
- package/dist/chunks/debug-0.5.8-c84dbamw.mjs +0 -1
- package/dist/chunks/defaultActionDeps-0.5.8-b94dtwtd.mjs +0 -1177
- package/dist/chunks/desktop-0.5.8-46z10hnt.mjs +0 -1
- package/dist/chunks/detectRepository-0.5.8-rwc4rjfg.mjs +0 -1
- package/dist/chunks/detection-0.5.8-hydnvzf4.mjs +0 -1
- package/dist/chunks/diff-0.5.8-p7d54hn7.mjs +0 -1
- package/dist/chunks/doctor-0.5.8-894mdsxc.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-0.5.8-c12xcayk.mjs +0 -1
- package/dist/chunks/earlyInput-0.5.8-fwa1r2va.mjs +0 -1
- package/dist/chunks/effort-0.5.8-7gcwya2k.mjs +0 -10
- package/dist/chunks/envUtils-0.5.8-20c2f8v3.mjs +0 -1
- package/dist/chunks/environmentSelection-0.5.8-t6hzsc8z.mjs +0 -1
- package/dist/chunks/environments-0.5.8-fcp8bfe3.mjs +0 -1
- package/dist/chunks/errors-0.5.8-ev3jqbjj.mjs +0 -1
- package/dist/chunks/exampleCommands-0.5.8-d38qs6k2.mjs +0 -1
- package/dist/chunks/exit-0.5.8-f5v7cstg.mjs +0 -1
- package/dist/chunks/export-0.5.8-a8fg7991.mjs +0 -2
- package/dist/chunks/extra-usage-0.5.8-r5qs5fjk.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.5.8-f8mch55k.mjs +0 -1
- package/dist/chunks/fast-0.5.8-5yfvbb7d.mjs +0 -1
- package/dist/chunks/feedback-0.5.8-j9xstj5q.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-0.5.8-tmpw0mgj.mjs +0 -1
- package/dist/chunks/git-0.5.8-vvd1b8x0.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.5.8-de9f7e7s.mjs +0 -1
- package/dist/chunks/grove-0.5.8-rewcpbks.mjs +0 -1
- package/dist/chunks/growthbook-0.5.8-tt3wbrct.mjs +0 -1
- package/dist/chunks/headless-0.5.8-h1tn9ee3.mjs +0 -2
- package/dist/chunks/heapdump-0.5.8-e0vshas9.mjs +0 -6
- package/dist/chunks/help-0.5.8-mhhgyvqz.mjs +0 -1
- package/dist/chunks/hookChains-0.5.8-ewzfdp91.mjs +0 -3
- package/dist/chunks/hooks-0.5.8-mgp708m9.mjs +0 -1
- package/dist/chunks/hooks-0.5.8-p1mz2zy1.mjs +0 -79
- package/dist/chunks/ide-0.5.8-pzfhr27w.mjs +0 -3
- package/dist/chunks/image-processor-napi-0.5.8-1skckgt6.mjs +0 -1
- package/dist/chunks/index-0.5.8-0dkn7rr7.mjs +0 -9
- package/dist/chunks/index-0.5.8-26yrjbk0.mjs +0 -1
- package/dist/chunks/index-0.5.8-5cr4y9wx.mjs +0 -1
- package/dist/chunks/index-0.5.8-5mgzpm7c.mjs +0 -1
- package/dist/chunks/index-0.5.8-b4p3af9y.mjs +0 -1
- package/dist/chunks/index-0.5.8-b7tvbbzv.mjs +0 -2
- package/dist/chunks/index-0.5.8-bk6ejev9.mjs +0 -1
- package/dist/chunks/index-0.5.8-cmyhdm8s.mjs +0 -9
- package/dist/chunks/index-0.5.8-egkksjaj.mjs +0 -1
- package/dist/chunks/index-0.5.8-hr8aqgvc.mjs +0 -1
- package/dist/chunks/index-0.5.8-jf20nzsg.mjs +0 -1
- package/dist/chunks/index-0.5.8-m6exk6z6.mjs +0 -30
- package/dist/chunks/index-0.5.8-mpm6xxk3.mjs +0 -5
- package/dist/chunks/index-0.5.8-nt058ay0.mjs +0 -1
- package/dist/chunks/index-0.5.8-qdwcg9cv.mjs +0 -10
- package/dist/chunks/index-0.5.8-rdk757cq.mjs +0 -1
- package/dist/chunks/index-0.5.8-red1reev.mjs +0 -1
- package/dist/chunks/index-0.5.8-rehfpmcw.mjs +0 -1
- package/dist/chunks/index-0.5.8-s3k17n65.mjs +0 -1
- package/dist/chunks/index-0.5.8-xpaaycp7.mjs +0 -1
- package/dist/chunks/index-0.5.8-ydqh8xbm.mjs +0 -2
- package/dist/chunks/index-0.5.8-yp0fpaqf.mjs +0 -1
- package/dist/chunks/init-0.5.8-kmfn7vay.mjs +0 -1
- package/dist/chunks/initReplBridge-0.5.8-f9ezc1jk.mjs +0 -1
- package/dist/chunks/ink-0.5.8-y01565nf.mjs +0 -1
- package/dist/chunks/insights-0.5.8-mwq5z31x.mjs +0 -870
- package/dist/chunks/install-0.5.8-se0j5qte.mjs +0 -1
- package/dist/chunks/install-github-app-0.5.8-zqhhg1fw.mjs +0 -149
- package/dist/chunks/install-slack-app-0.5.8-9qpwy0z9.mjs +0 -1
- package/dist/chunks/instrumentation-0.5.8-gbnaaqp3.mjs +0 -1
- package/dist/chunks/interactiveHelpers-0.5.8-wrn95m3j.mjs +0 -1
- package/dist/chunks/keybindings-0.5.8-j070t67n.mjs +0 -2
- package/dist/chunks/knowledge-0.5.8-fhr55cqh.mjs +0 -2
- package/dist/chunks/latestVersionCache-0.5.8-rmkxtaea.mjs +0 -1
- package/dist/chunks/loadAgentsDir-0.5.8-f3j27p5s.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.5.8-7401ty3k.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.5.8-yhhkejwz.mjs +0 -1
- package/dist/chunks/log-0.5.8-78h0x7qg.mjs +0 -1
- package/dist/chunks/main-0.5.8-4ddjgz4x.mjs +0 -1
- package/dist/chunks/managedEnv-0.5.8-rxnh3nhr.mjs +0 -1
- package/dist/chunks/mcp-0.5.8-9ts7qrcv.mjs +0 -4
- package/dist/chunks/mcp-0.5.8-hhnpsgvh.mjs +0 -17
- package/dist/chunks/mcp-0.5.8-md6hzter.mjs +0 -1
- package/dist/chunks/mcpb-0.5.8-ebcb4nn4.mjs +0 -1
- package/dist/chunks/memory-0.5.8-ph5hb81n.mjs +0 -3
- package/dist/chunks/mobile-0.5.8-f04nmet1.mjs +0 -2
- package/dist/chunks/model-0.5.8-aqzt03nd.mjs +0 -1
- package/dist/chunks/model-0.5.8-nmcrv393.mjs +0 -2
- package/dist/chunks/oauth-0.5.8-n75mrvf3.mjs +0 -1
- package/dist/chunks/openaiShim-0.5.8-95kwrgpv.mjs +0 -14
- package/dist/chunks/output-style-0.5.8-zy932aj1.mjs +0 -1
- package/dist/chunks/package-APBHZ5F3-0.5.8-c4xw21z8.mjs +0 -1
- package/dist/chunks/parseConnectUrl-0.5.8-0dgzrde4.mjs +0 -1
- package/dist/chunks/parser-0.5.8-g6wgq5z2.mjs +0 -1
- package/dist/chunks/passes-0.5.8-jkdncmr5.mjs +0 -1
- package/dist/chunks/permissions-0.5.8-tesg1fmt.mjs +0 -3
- package/dist/chunks/plan-0.5.8-4h4wazbm.mjs +0 -1
- package/dist/chunks/plist-0.5.8-ygsvkws5.mjs +0 -1
- package/dist/chunks/plugin-0.5.8-meszp93t.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-0.5.8-8c49aq53.mjs +0 -1
- package/dist/chunks/plugins-0.5.8-zh9wq5by.mjs +0 -9
- package/dist/chunks/preActionHook-0.5.8-r8zrjby2.mjs +0 -2
- package/dist/chunks/print-0.5.8-dbcfsrdg.mjs +0 -57
- package/dist/chunks/privacy-settings-0.5.8-zj36f0ve.mjs +0 -1
- package/dist/chunks/process-0.5.8-1yf78q4y.mjs +0 -1
- package/dist/chunks/processBashCommand-0.5.8-pdnzd9ry.mjs +0 -1
- package/dist/chunks/processSlashCommand-0.5.8-kmv9fs8d.mjs +0 -9
- package/dist/chunks/prompt-0.5.8-aa1v4zh0.mjs +0 -1
- package/dist/chunks/prompt-0.5.8-wabf0exz.mjs +0 -1
- package/dist/chunks/prompts-0.5.8-n865vxaw.mjs +0 -1
- package/dist/chunks/protocolHandler-0.5.8-6k7ma4yf.mjs +0 -13
- package/dist/chunks/provider-0.5.8-qsr51mc2.mjs +0 -2
- package/dist/chunks/providerProfiles-0.5.8-he8tbnf5.mjs +0 -1
- package/dist/chunks/providerValidation-0.5.8-6cjh43zv.mjs +0 -6
- package/dist/chunks/rate-limit-options-0.5.8-pvbwwt4v.mjs +0 -1
- package/dist/chunks/registerSubcommands-0.5.8-8jq52atf.mjs +0 -34
- package/dist/chunks/registry-0.5.8-ynn6qxq6.mjs +0 -1
- package/dist/chunks/release-notes-0.5.8-yydjz710.mjs +0 -5
- package/dist/chunks/reload-plugins-0.5.8-64ybz2n4.mjs +0 -2
- package/dist/chunks/remote-env-0.5.8-1f4tf3ch.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-0.5.8-qnrtc8aw.mjs +0 -1
- package/dist/chunks/remoteSession-0.5.8-kxsfx9gd.mjs +0 -1
- package/dist/chunks/rename-0.5.8-j4c6dg9n.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.5.8-w33fvpqt.mjs +0 -1
- package/dist/chunks/replLauncher-0.5.8-7jzc54fq.mjs +0 -1
- package/dist/chunks/resume-0.5.8-373epwyd.mjs +0 -2
- package/dist/chunks/rewind-0.5.8-b9qe0mwn.mjs +0 -1
- package/dist/chunks/rootOptions-0.5.8-h1ddt4ry.mjs +0 -1
- package/dist/chunks/sandbox-adapter-0.5.8-ma6nv5dg.mjs +0 -1
- package/dist/chunks/sandbox-toggle-0.5.8-1cc5m303.mjs +0 -1
- package/dist/chunks/session-0.5.8-rxft524k.mjs +0 -2
- package/dist/chunks/sessionDiscovery-0.5.8-r4eg8g3r.mjs +0 -1
- package/dist/chunks/sessionFileAccessHooks-0.5.8-jm3bmvt7.mjs +0 -1
- package/dist/chunks/sessionStorage-0.5.8-kfghwskw.mjs +0 -1
- package/dist/chunks/settings-0.5.8-qxr7dgzb.mjs +0 -1
- package/dist/chunks/setup-0.5.8-769vnffz.mjs +0 -5
- package/dist/chunks/sinks-0.5.8-jcq0kgny.mjs +0 -1
- package/dist/chunks/skills-0.5.8-5qxr2p94.mjs +0 -1
- package/dist/chunks/startupProfiler-0.5.8-cpbf91zs.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-0.5.8-bctkpcea.mjs +0 -1
- package/dist/chunks/state-0.5.8-cppqmrbf.mjs +0 -1
- package/dist/chunks/stats-0.5.8-zcfm59db.mjs +0 -6
- package/dist/chunks/status-0.5.8-5v4y485z.mjs +0 -1
- package/dist/chunks/stickers-0.5.8-9gr6e2xg.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.5.8-wf4cta06.mjs +0 -1
- package/dist/chunks/tasks-0.5.8-30z30sqv.mjs +0 -1
- package/dist/chunks/teamHelpers-0.5.8-vcng2y7m.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.5.8-48p5p451.mjs +0 -1
- package/dist/chunks/teleport-0.5.8-650m4rks.mjs +0 -1
- package/dist/chunks/terminalSetup-0.5.8-ew1ax86g.mjs +0 -1
- package/dist/chunks/theme-0.5.8-7a06760x.mjs +0 -1
- package/dist/chunks/thinkback-0.5.8-xrvqhj8w.mjs +0 -1
- package/dist/chunks/thinkback-play-0.5.8-vkpn13f3.mjs +0 -1
- package/dist/chunks/toolPool-0.5.8-ntbr808f.mjs +0 -1
- package/dist/chunks/toolSearch-0.5.8-ybxz2f7f.mjs +0 -1
- package/dist/chunks/tools-0.5.8-egnmkxt7.mjs +0 -1
- package/dist/chunks/trustedDevice-0.5.8-422swdjw.mjs +0 -1
- package/dist/chunks/turndown.cjs-0.5.8-tkat2x5p.mjs +0 -69
- package/dist/chunks/ultrareviewCommand-0.5.8-e7b2408n.mjs +0 -4
- package/dist/chunks/update-0.5.8-a285y5j4.mjs +0 -86
- package/dist/chunks/upgrade-0.5.8-8nxejvyv.mjs +0 -1
- package/dist/chunks/upstreamproxy-0.5.8-6a2g1s50.mjs +0 -14
- package/dist/chunks/url-handler-napi-0.5.8-83a2qhsf.mjs +0 -1
- package/dist/chunks/usage-0.5.8-9dha8gsc.mjs +0 -1
- package/dist/chunks/util-0.5.8-c7zdhrd1.mjs +0 -1
- package/dist/chunks/utils-0.5.8-e8pfjkrb.mjs +0 -1
- package/dist/chunks/vim-0.5.8-pgsav8je.mjs +0 -1
- package/dist/chunks/watcher-0.5.8-w3q8518m.mjs +0 -1
- package/dist/chunks/wiki-0.5.8-1sa2h258.mjs +0 -132
- package/dist/chunks/worktree-0.5.8-59wmpecg.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.5.8-pexygrty.mjs +0 -1
- package/dist/chunks/wrapper-0.5.8-kmv5mk0m.mjs +0 -7
- /package/dist/chunks/{cli-0.5.8-j77twbsq.mjs → cli-0.5.9-4yxntpxv.mjs} +0 -0
- /package/dist/chunks/{cli-0.5.8-kegk7gdp.mjs → cli-0.5.9-x9tg4bxs.mjs} +0 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import{Uca as a6,Zca as cW}from"./cli-0.5.9-5vdqnecb.mjs";import{Ada as O,Bda as h1,hda as WL,kda as kN,qda as p7,uda as a_,vda as kW,xda as K,yda as WX,zda as n0}from"./cli-0.5.9-ap6gvqkx.mjs";import{Lda as S1,Xda as q3}from"./cli-0.5.9-7hcka84h.mjs";import{$da as Z1,Dea as xN,_da as s,kea as TL}from"./cli-0.5.9-31f5vjyq.mjs";import{Eea as EG,Mea as jB,Nea as vG}from"./cli-0.5.9-tav5jmz1.mjs";import{Oea as l0,Qea as _$}from"./cli-0.5.9-4s8nynfd.mjs";import{$ea as x_,Cfa as N,Gfa as F0,Qfa as P,Tea as Q4,Tfa as M1,Vea as YB,Wea as a7,Xea as xz,Yea as KJ,Zea as e_,_ea as uQ,afa as TJ,bfa as Bz,cfa as k4,dfa as jJ,efa as xJ,ffa as Dz,gfa as PJ,hfa as Az,ifa as MJ,jfa as $z,kfa as oQ,lfa as S_,mfa as EJ,nfa as Tz,ofa as vJ,pfa as jz,sfa as D4,tfa as m,ufa as X0,vfa as yX,wfa as xB,yfa as z0,zfa as F1}from"./cli-0.5.9-ek649arf.mjs";import{cga as r5,hga as AL,jga as W0,kga as M6,nga as z$,pga as C1}from"./cli-0.5.9-yazhwsgb.mjs";import{Fga as c0,sga as K0,vga as e,wga as KV,xga as q2}from"./cli-0.5.9-eagw660r.mjs";import{$ha as eW,Aka as DL,Gga as SJ,Hga as Iz,Hka as f$,Iha as iQ,Jha as y_,Mha as F4,Nha as gQ,Nka as XV,Oha as mQ,Pha as N_,Qha as cQ,Rha as E_,Sga as n7,Sha as N4,Tga as zz,Tha as nJ,Uha as aQ,Vha as C_,Wha as aW,Wka as $B,Xha as oW,Yha as sW,Yja as HV,Zha as rW,_ha as tW,aha as I4,aia as B2,ama as T6,bha as BJ,bia as ZV,cha as i7,dha as Rz,eha as kJ,eia as Y$,fha as Mz,gha as M4,hha as fQ,mha as NJ,nha as Fz,oka as CX,pia as r1,qia as S5,qka as SX,rja as xL,uha as w4,vha as LJ,yka as FL}from"./cli-0.5.9-3bsjckc3.mjs";import{Ama as v1,bma as O4,cma as HJ,lma as RJ,mma as Jz,nma as e0,oma as R4,pma as wJ,qma as _z,zma as d}from"./cli-0.5.9-dtbcqw2e.mjs";import{Hna as cY,Ina as q4,Jna as p,Kna as GX,Lna as B,Mna as H0,Nna as B6,Ona as L6}from"./cli-0.5.9-ysvsqcpa.mjs";function aq(Z){let X=Z.slice(Z.lastIndexOf(".")).toLowerCase();return oL.has(X)}function oq(Z){let X=Math.min(Z.length,sL),q=0;for(let Q=0;Q<X;Q++){let J=Z[Q];if(J===0)return!0;if(J<32&&J!==9&&J!==10&&J!==13)q++}return q/X>0.1}var oL,sL=8192;var sq=B(()=>{oL=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 rL}from"path";function Y0(Z,X,q){let Q=tL();if(!Q)return;let J={timestamp:new Date().toISOString(),level:Z,event:X,data:q??{}},$=N(),Y=m(J)+`
|
|
2
|
+
`;try{$.appendFileSync(Q,Y)}catch{try{$.mkdirSync(rL(Q)),$.appendFileSync(Q,Y)}catch{}}}function tL(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function vx(Z,X,q){let Q=Date.now();Y0("info",`${Z}_started`);try{let J=await X(),$=q?q(J):{};return Y0("info",`${Z}_completed`,{duration_ms:Date.now()-Q,...$}),J}catch(J){throw Y0("error",`${Z}_failed`,{duration_ms:Date.now()-Q}),J}}var H2=B(()=>{F0();z0()});var XQ=p((Cx,ZQ)=>{ZQ.exports=eq;eq.sync=Z_;var rq=H0("fs");function eL(Z,X){var q=X.pathExt!==void 0?X.pathExt:process.env.PATHEXT;if(!q)return!0;if(q=q.split(";"),q.indexOf("")!==-1)return!0;for(var Q=0;Q<q.length;Q++){var J=q[Q].toLowerCase();if(J&&Z.substr(-J.length).toLowerCase()===J)return!0}return!1}function tq(Z,X,q){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return eL(X,q)}function eq(Z,X,q){rq.stat(Z,function(Q,J){q(Q,Q?!1:tq(J,Z,X))})}function Z_(Z,X){return tq(rq.statSync(Z),Z,X)}});var YQ=p((Sx,$Q)=>{$Q.exports=QQ;QQ.sync=X_;var qQ=H0("fs");function QQ(Z,X,q){qQ.stat(Z,function(Q,J){q(Q,Q?!1:JQ(J,X))})}function X_(Z,X){return JQ(qQ.statSync(Z),X)}function JQ(Z,X){return Z.isFile()&&q_(Z,X)}function q_(Z,X){var{mode:q,uid:Q,gid:J}=Z,$=X.uid!==void 0?X.uid:process.getuid&&process.getuid(),Y=X.gid!==void 0?X.gid:process.getgid&&process.getgid(),H=parseInt("100",8),U=parseInt("010",8),W=parseInt("001",8),G=H|U,V=q&W||q&U&&J===Y||q&H&&Q===$||q&G&&$===0;return V}});var KQ=p((hx,HQ)=>{var bx=H0("fs"),z4;if(process.platform==="win32"||global.TESTING_WINDOWS)z4=XQ();else z4=YQ();HQ.exports=k7;k7.sync=Q_;function k7(Z,X,q){if(typeof X==="function")q=X,X={};if(!q){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(Q,J){k7(Z,X||{},function($,Y){if($)J($);else Q(Y)})})}z4(Z,X||{},function(Q,J){if(Q){if(Q.code==="EACCES"||X&&X.ignoreErrors)Q=null,J=!1}q(Q,J)})}function Q_(Z,X){try{return z4.sync(Z,X||{})}catch(q){if(X&&X.ignoreErrors||q.code==="EACCES")return!1;else throw q}}});var _Q=p((fx,LQ)=>{var G6=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",UQ=H0("path"),J_=G6?";":":",GQ=KQ(),WQ=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),VQ=(Z,X)=>{let q=X.colon||J_,Q=Z.match(/\//)||G6&&Z.match(/\\/)?[""]:[...G6?[process.cwd()]:[],...(X.path||process.env.PATH||"").split(q)],J=G6?X.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",$=G6?J.split(q):[""];if(G6){if(Z.indexOf(".")!==-1&&$[0]!=="")$.unshift("")}return{pathEnv:Q,pathExt:$,pathExtExe:J}},BQ=(Z,X,q)=>{if(typeof X==="function")q=X,X={};if(!X)X={};let{pathEnv:Q,pathExt:J,pathExtExe:$}=VQ(Z,X),Y=[],H=(W)=>new Promise((G,V)=>{if(W===Q.length)return X.all&&Y.length?G(Y):V(WQ(Z));let _=Q[W],L=/^".*"$/.test(_)?_.slice(1,-1):_,z=UQ.join(L,Z),R=!L&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+z:z;G(U(R,W,0))}),U=(W,G,V)=>new Promise((_,L)=>{if(V===J.length)return _(H(G+1));let z=J[V];GQ(W+z,{pathExt:$},(R,D)=>{if(!R&&D)if(X.all)Y.push(W+z);else return _(W+z);return _(U(W,G,V+1))})});return q?H(0).then((W)=>q(null,W),q):H(0)},$_=(Z,X)=>{X=X||{};let{pathEnv:q,pathExt:Q,pathExtExe:J}=VQ(Z,X),$=[];for(let Y=0;Y<q.length;Y++){let H=q[Y],U=/^".*"$/.test(H)?H.slice(1,-1):H,W=UQ.join(U,Z),G=!U&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+W:W;for(let V=0;V<Q.length;V++){let _=G+Q[V];try{if(GQ.sync(_,{pathExt:J}))if(X.all)$.push(_);else return _}catch(L){}}}if(X.all&&$.length)return $;if(X.nothrow)return null;throw WQ(Z)};LQ.exports=BQ;BQ.sync=$_});var RQ=p((gx,N7)=>{var zQ=(Z={})=>{let X=Z.env||process.env;if((Z.platform||process.platform)!=="win32")return"PATH";return Object.keys(X).reverse().find((Q)=>Q.toUpperCase()==="PATH")||"Path"};N7.exports=zQ;N7.exports.default=zQ});var AQ=p((mx,DQ)=>{var MQ=H0("path"),Y_=_Q(),H_=RQ();function FQ(Z,X){let q=Z.options.env||process.env,Q=process.cwd(),J=Z.options.cwd!=null,$=J&&process.chdir!==void 0&&!process.chdir.disabled;if($)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=Y_.sync(Z.command,{path:q[H_({env:q})],pathExt:X?MQ.delimiter:void 0})}catch(H){}finally{if($)process.chdir(Q)}if(Y)Y=MQ.resolve(J?Z.options.cwd:"",Y);return Y}function K_(Z){return FQ(Z)||FQ(Z,!0)}DQ.exports=K_});var TQ=p((W_,P7)=>{var x7=/([()\][%!^"`<>&|;, *?])/g;function U_(Z){return Z=Z.replace(x7,"^$1"),Z}function G_(Z,X){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(x7,"^$1"),X)Z=Z.replace(x7,"^$1");return Z}W_.command=U_;W_.argument=G_});var OQ=p((ux,jQ)=>{jQ.exports=/^#!(.*)/});var wQ=p((px,IQ)=>{var L_=OQ();IQ.exports=(Z="")=>{let X=Z.match(L_);if(!X)return null;let[q,Q]=X[0].replace(/#! ?/,"").split(" "),J=q.split("/").pop();if(J==="env")return Q;return Q?`${J} ${Q}`:J}});var NQ=p((dx,kQ)=>{var E7=H0("fs"),__=wQ();function z_(Z){let q=Buffer.alloc(150),Q;try{Q=E7.openSync(Z,"r"),E7.readSync(Q,q,0,150,0),E7.closeSync(Q)}catch(J){}return __(q.toString())}kQ.exports=z_});var vQ=p((cx,EQ)=>{var R_=H0("path"),xQ=AQ(),PQ=TQ(),M_=NQ(),F_=process.platform==="win32",D_=/\.(?:com|exe)$/i,A_=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function T_(Z){Z.file=xQ(Z);let X=Z.file&&M_(Z.file);if(X)return Z.args.unshift(Z.file),Z.command=X,xQ(Z);return Z.file}function j_(Z){if(!F_)return Z;let X=T_(Z),q=!D_.test(X);if(Z.options.forceShell||q){let Q=A_.test(X);Z.command=R_.normalize(Z.command),Z.command=PQ.command(Z.command),Z.args=Z.args.map(($)=>PQ.argument($,Q));let J=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${J}"`],Z.command=process.env.comspec||"cmd.exe",Z.options.windowsVerbatimArguments=!0}return Z}function O_(Z,X,q){if(X&&!Array.isArray(X))q=X,X=null;X=X?X.slice(0):[],q=Object.assign({},q);let Q={command:Z,args:X,options:q,file:void 0,original:{command:Z,args:X}};return q.shell?Q:j_(Q)}EQ.exports=O_});var SQ=p((lx,CQ)=>{var v7=process.platform==="win32";function y7(Z,X){return Object.assign(Error(`${X} ${Z.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${X} ${Z.command}`,path:Z.command,spawnargs:Z.args})}function I_(Z,X){if(!v7)return;let q=Z.emit;Z.emit=function(Q,J){if(Q==="exit"){let $=yQ(J,X);if($)return q.call(Z,"error",$)}return q.apply(Z,arguments)}}function yQ(Z,X){if(v7&&Z===1&&!X.file)return y7(X.original,"spawn");return null}function w_(Z,X){if(v7&&Z===1&&!X.file)return y7(X.original,"spawnSync");return null}CQ.exports={hookChildProcess:I_,verifyENOENT:yQ,verifyENOENTSync:w_,notFoundError:y7}});var b7=p((nx,W6)=>{var bQ=H0("child_process"),C7=vQ(),S7=SQ();function hQ(Z,X,q){let Q=C7(Z,X,q),J=bQ.spawn(Q.command,Q.args,Q.options);return S7.hookChildProcess(J,Q),J}function k_(Z,X,q){let Q=C7(Z,X,q),J=bQ.spawnSync(Q.command,Q.args,Q.options);return J.error=J.error||S7.verifyENOENTSync(J.status,Q),J}W6.exports=hQ;W6.exports.spawn=hQ;W6.exports.sync=k_;W6.exports._parse=C7;W6.exports._enoent=S7});function P_(Z,X,q,Q){if(!e0(Z))return Z;X=F4(X,Z);var J=-1,$=X.length,Y=$-1,H=Z;while(H!=null&&++J<$){var U=mQ(X[J]),W=q;if(U==="__proto__"||U==="constructor"||U==="prototype")return Z;if(J!=Y){var G=H[U];if(W=Q?Q(G,U,H):void 0,W===void 0)W=e0(G)?G:M4(X[J+1])?[]:{}}uQ(H,U,W),H=H[U]}return Z}var pQ;var dQ=B(()=>{x_();gQ();fQ();R4();N_();pQ=P_});function v_(Z,X,q){var Q=-1,J=X.length,$={};while(++Q<J){var Y=X[Q],H=cQ(Z,Y);if(q(H,Y))pQ($,F4(Y,Z),H)}return $}var lQ;var nQ=B(()=>{E_();dQ();gQ();lQ=v_});function b_(Z,X){if(Z==null)return{};var q=iQ(oQ(Z),function(Q){return[Q]});return X=aQ(X),lQ(Z,q,function(Q,J){return X(Q,J[0])})}var h7;var sQ=B(()=>{y_();C_();nQ();S_();h7=b_});import{readdir as UP,readFile as h_}from"fs/promises";import{release as f_}from"os";var LP,y0,_P,zP;var V6=B(()=>{v1();F0();p0();LP=["macos","wsl"],y0=d(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){g(Z)}return"linux"}return"unknown"}catch(Z){return g(Z),"unknown"}}),_P=d(()=>{if(process.platform!=="linux")return;try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"}),X=Z.match(/WSL(\d+)/i);if(X&&X[1])return X[1];if(Z.toLowerCase().includes("microsoft"))return"1";return}catch(Z){g(Z);return}}),zP=d(async()=>{if(process.platform!=="linux")return;let Z={linuxKernel:f_()};try{let X=await h_("/etc/os-release","utf8");for(let q of X.split(`
|
|
3
|
+
`)){let Q=q.match(/^(ID|VERSION_ID)=(.*)$/);if(Q&&Q[1]&&Q[2]){let J=Q[2].replace(/^"|"$/g,"");if(Q[1]==="ID")Z.linuxDistroId=J;else Z.linuxDistroVersion=J}}}catch{}return Z})});import{execSync as g_}from"child_process";function _6(Z,X){let Q=[];try{const q=B6(Q,D4`execSync: ${Z.slice(0,100)}`,0);return g_(Z,X)}catch(J){var $=J,Y=1}finally{L6(Q,$,Y)}}var f7=B(()=>{z0()});import{tracingChannel as m_,channel as u_}from"node:diagnostics_channel";var G0,K2,p_,g7=()=>G0.hasSubscribers||K2.hasSubscribers,tQ,rQ,d_=(Z,X,q,Q)=>{typeof rQ.emitWarning=="function"?rQ.emitWarning(Z,X,q,Q):console.error(`[${q}] ${X}: ${Z}`)},c_=(Z)=>!tQ.has(Z),z1=(Z)=>!!Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),eQ=(Z)=>z1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?A4:null:null,A4,l_=class Z{heap;length;static#q=!1;static create(X){let q=eQ(X);if(!q)return[];Z.#q=!0;let Q=new Z(X,q);return Z.#q=!1,Q}constructor(X,q){if(!Z.#q)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new q(X),this.length=0}push(X){this.heap[this.length++]=X}pop(){return this.heap[--this.length]}},ZJ;var XJ=B(()=>{G0=u_("lru-cache:metrics"),K2=m_("lru-cache"),p_=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,tQ=new Set,rQ=typeof process=="object"&&process?process:{},A4=class extends Array{constructor(Z){super(Z),this.fill(0)}},ZJ=class Z{#q;#Q;#X;#Y;#K;#V;#A;#z;get perf(){return this.#z}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#H;#T;#U;#$;#Z;#L;#R;#B;#G;#j;#W;#O;#I;#M;#F;#w;#h;#_;#v;static unsafeExposeInternals(X){return{starts:X.#I,ttls:X.#M,autopurgeTimers:X.#F,sizes:X.#O,keyMap:X.#U,keyList:X.#$,valList:X.#Z,next:X.#L,prev:X.#R,get head(){return X.#B},get tail(){return X.#G},free:X.#j,isBackgroundFetch:(q)=>X.#J(q),backgroundFetch:(q,Q,J,$)=>X.#m(q,Q,J,$),moveToTail:(q)=>X.#b(q),indexes:(q)=>X.#k(q),rindexes:(q)=>X.#N(q),isStale:(q)=>X.#D(q)}}get max(){return this.#q}get maxSize(){return this.#Q}get calculatedSize(){return this.#T}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#A}get dispose(){return this.#X}get onInsert(){return this.#Y}get disposeAfter(){return this.#K}constructor(X){let{max:q=0,ttl:Q,ttlResolution:J=1,ttlAutopurge:$,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:U,dispose:W,onInsert:G,disposeAfter:V,noDisposeOnSet:_,noUpdateTTL:L,maxSize:z=0,maxEntrySize:R=0,sizeCalculation:D,fetchMethod:M,memoMethod:k,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:I,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:j,ignoreFetchAbort:A,backgroundFetchSize:f=1,perf:w}=X;if(this.backgroundFetchSize=f,w!==void 0&&typeof w?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#z=w??p_,q!==0&&!z1(q))throw TypeError("max option must be a nonnegative integer");let x=q?eQ(q):Array;if(!x)throw Error("invalid max value: "+q);if(this.#q=q,this.#Q=z,this.maxEntrySize=R||this.#Q,this.sizeCalculation=D,this.sizeCalculation){if(!this.#Q&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(k!==void 0&&typeof k!="function")throw TypeError("memoMethod must be a function if defined");if(this.#A=k,M!==void 0&&typeof M!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=M,this.#h=!!M,this.#U=new Map,this.#$=Array.from({length:q}).fill(void 0),this.#Z=Array.from({length:q}).fill(void 0),this.#L=new x(q),this.#R=new x(q),this.#B=0,this.#G=0,this.#j=l_.create(q),this.#H=0,this.#T=0,typeof W=="function"&&(this.#X=W),typeof G=="function"&&(this.#Y=G),typeof V=="function"?(this.#K=V,this.#W=[]):(this.#K=void 0,this.#W=void 0),this.#w=!!this.#X,this.#v=!!this.#Y,this.#_=!!this.#K,this.noDisposeOnSet=!!_,this.noUpdateTTL=!!L,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!j,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#Q!==0&&!z1(this.#Q))throw TypeError("maxSize must be a positive integer if specified");if(!z1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#a()}if(this.allowStale=!!U,this.noDeleteOnStaleGet=!!I,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=z1(J)||J===0?J:1,this.ttlAutopurge=!!$,this.ttl=Q||0,this.ttl){if(!z1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#u()}if(this.#q===0&&this.ttl===0&&this.#Q===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#q&&!this.#Q){let v="LRU_CACHE_UNBOUNDED";c_(v)&&(tQ.add(v),d_("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",v,Z))}}getRemainingTTL(X){return this.#U.has(X)?1/0:0}#u(){let X=new A4(this.#q),q=new A4(this.#q);this.#M=X,this.#I=q;let Q=this.ttlAutopurge?Array.from({length:this.#q}):void 0;this.#F=Q,this.#p=(H,U,W=this.#z.now())=>{q[H]=U!==0?W:0,X[H]=U,J(H,U)},this.#y=(H)=>{q[H]=X[H]!==0?this.#z.now():0,J(H,X[H])};let J=this.ttlAutopurge?(H,U)=>{if(Q?.[H]&&(clearTimeout(Q[H]),Q[H]=void 0),U&&U!==0&&Q){let W=setTimeout(()=>{this.#D(H)&&this.#x(this.#$[H],"expire")},U+1);W.unref&&W.unref(),Q[H]=W}}:()=>{};this.#P=(H,U)=>{if(X[U]){let W=X[U],G=q[U];if(!W||!G)return;H.ttl=W,H.start=G,H.now=$||Y();let V=H.now-G;H.remainingTTL=W-V}};let $=0,Y=()=>{let H=this.#z.now();if(this.ttlResolution>0){$=H;let U=setTimeout(()=>$=0,this.ttlResolution);U.unref&&U.unref()}return H};this.getRemainingTTL=(H)=>{let U=this.#U.get(H);if(U===void 0)return 0;let W=X[U],G=q[U];if(!W||!G)return 1/0;let V=($||Y())-G;return W-V},this.#D=(H)=>{let U=q[H],W=X[H];return!!W&&!!U&&($||Y())-U>W}}#y=()=>{};#P=()=>{};#p=()=>{};#D=()=>!1;#a(){let X=new A4(this.#q);this.#T=0,this.#O=X,this.#C=(q)=>{this.#T-=X[q],X[q]=0},this.#d=(q,Q,J,$)=>{if(!z1(J)){if(this.#J(Q))return this.backgroundFetchSize;if($){if(typeof $!="function")throw TypeError("sizeCalculation must be a function");if(J=$(Q,q),!z1(J))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 J},this.#f=(q,Q,J)=>{if(X[q]=Q,this.#Q){let $=this.#Q-X[q];for(;this.#T>$;)this.#g(!0)}this.#T+=X[q],J&&(J.entrySize=Q,J.totalCalculatedSize=this.#T)}}#C=(X)=>{};#f=(X,q,Q)=>{};#d=(X,q,Q,J)=>{if(Q||J)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:X=this.allowStale}={}){if(this.#H)for(let q=this.#G;this.#c(q)&&((X||!this.#D(q))&&(yield q),q!==this.#B);)q=this.#R[q]}*#N({allowStale:X=this.allowStale}={}){if(this.#H)for(let q=this.#B;this.#c(q)&&((X||!this.#D(q))&&(yield q),q!==this.#G);)q=this.#L[q]}#c(X){return X!==void 0&&this.#U.get(this.#$[X])===X}*entries(){for(let X of this.#k())this.#Z[X]!==void 0&&this.#$[X]!==void 0&&!this.#J(this.#Z[X])&&(yield[this.#$[X],this.#Z[X]])}*rentries(){for(let X of this.#N())this.#Z[X]!==void 0&&this.#$[X]!==void 0&&!this.#J(this.#Z[X])&&(yield[this.#$[X],this.#Z[X]])}*keys(){for(let X of this.#k()){let q=this.#$[X];q!==void 0&&!this.#J(this.#Z[X])&&(yield q)}}*rkeys(){for(let X of this.#N()){let q=this.#$[X];q!==void 0&&!this.#J(this.#Z[X])&&(yield q)}}*values(){for(let X of this.#k())this.#Z[X]!==void 0&&!this.#J(this.#Z[X])&&(yield this.#Z[X])}*rvalues(){for(let X of this.#N())this.#Z[X]!==void 0&&!this.#J(this.#Z[X])&&(yield this.#Z[X])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(X,q={}){for(let Q of this.#k()){let J=this.#Z[Q],$=this.#J(J)?J.__staleWhileFetching:J;if($!==void 0&&X($,this.#$[Q],this))return this.#S(this.#$[Q],q)}}forEach(X,q=this){for(let Q of this.#k()){let J=this.#Z[Q],$=this.#J(J)?J.__staleWhileFetching:J;$!==void 0&&X.call(q,$,this.#$[Q],this)}}rforEach(X,q=this){for(let Q of this.#N()){let J=this.#Z[Q],$=this.#J(J)?J.__staleWhileFetching:J;$!==void 0&&X.call(q,$,this.#$[Q],this)}}purgeStale(){let X=!1;for(let q of this.#N({allowStale:!0}))this.#D(q)&&(this.#x(this.#$[q],"expire"),X=!0);return X}info(X){let q=this.#U.get(X);if(q===void 0)return;let Q=this.#Z[q],J=this.#J(Q)?Q.__staleWhileFetching:Q;if(J===void 0)return;let $={value:J};if(this.#M&&this.#I){let Y=this.#M[q],H=this.#I[q];if(Y&&H){let U=Y-(this.#z.now()-H);$.ttl=U,$.start=Date.now()}}return this.#O&&($.size=this.#O[q]),$}dump(){let X=[];for(let q of this.#k({allowStale:!0})){let Q=this.#$[q],J=this.#Z[q],$=this.#J(J)?J.__staleWhileFetching:J;if($===void 0||Q===void 0)continue;let Y={value:$};if(this.#M&&this.#I){Y.ttl=this.#M[q];let H=this.#z.now()-this.#I[q];Y.start=Math.floor(Date.now()-H)}this.#O&&(Y.size=this.#O[q]),X.unshift([Q,Y])}return X}load(X){this.clear();for(let[q,Q]of X){if(Q.start){let J=Date.now()-Q.start;Q.start=this.#z.now()-J}this.#E(q,Q.value,Q)}}set(X,q,Q={}){let{status:J=G0.hasSubscribers?{}:void 0}=Q;Q.status=J,J&&(J.op="set",J.key=X,q!==void 0&&(J.value=q),J.cache=this);let $=this.#E(X,q,Q);return J&&G0.hasSubscribers&&G0.publish(J),$}#E(X,q,Q,J){let{ttl:$=this.ttl,start:Y,noDisposeOnSet:H=this.noDisposeOnSet,sizeCalculation:U=this.sizeCalculation,status:W}=Q,G=this.#J(q);if(q===void 0)return W&&(W.set="deleted"),this.delete(X),this;let{noUpdateTTL:V=this.noUpdateTTL}=Q;W&&!G&&(W.value=q);let _=this.#d(X,q,Q.size||0,U,W);if(this.maxEntrySize&&_>this.maxEntrySize)return this.#x(X,"set"),W&&(W.set="miss",W.maxEntrySizeExceeded=!0),this;let L=this.#H===0?void 0:this.#U.get(X);if(L===void 0)L=this.#H===0?this.#G:this.#j.length!==0?this.#j.pop():this.#H===this.#q?this.#g(!1):this.#H,this.#$[L]=X,this.#Z[L]=q,this.#U.set(X,L),this.#L[this.#G]=L,this.#R[L]=this.#G,this.#G=L,this.#H++,this.#f(L,_,W),W&&(W.set="add"),V=!1,this.#v&&!G&&this.#Y?.(q,X,"add");else{this.#b(L);let z=this.#Z[L];if(q!==z){if(!H)if(this.#J(z)){z!==J&&z.__abortController.abort(Error("replaced"));let{__staleWhileFetching:R}=z;R!==void 0&&R!==q&&(this.#w&&this.#X?.(R,X,"set"),this.#_&&this.#W?.push([R,X,"set"]))}else this.#w&&this.#X?.(z,X,"set"),this.#_&&this.#W?.push([z,X,"set"]);if(this.#C(L),this.#f(L,_,W),this.#Z[L]=q,!G){let R=z&&this.#J(z)?z.__staleWhileFetching:z,D=R===void 0?"add":q!==R?"replace":"update";W&&(W.set=D,R!==void 0&&(W.oldValue=R)),this.#v&&this.onInsert?.(q,X,D)}}else G||(W&&(W.set="update"),this.#v&&this.onInsert?.(q,X,"update"))}if($!==0&&!this.#M&&this.#u(),this.#M&&(V||this.#p(L,$,Y),W&&this.#P(W,L)),!H&&this.#_&&this.#W){let z=this.#W,R;for(;R=z?.shift();)this.#K?.(...R)}return this}pop(){try{for(;this.#H;){let X=this.#Z[this.#B];if(this.#g(!0),this.#J(X)){if(X.__staleWhileFetching)return X.__staleWhileFetching}else if(X!==void 0)return X}}finally{if(this.#_&&this.#W){let X=this.#W,q;for(;q=X?.shift();)this.#K?.(...q)}}}#g(X){let q=this.#B,Q=this.#$[q],J=this.#Z[q],$=this.#J(J);$&&J.__abortController.abort(Error("evicted"));let Y=$?J.__staleWhileFetching:J;return(this.#w||this.#_)&&Y!==void 0&&(this.#w&&this.#X?.(Y,Q,"evict"),this.#_&&this.#W?.push([Y,Q,"evict"])),this.#C(q),this.#F?.[q]&&(clearTimeout(this.#F[q]),this.#F[q]=void 0),X&&(this.#$[q]=void 0,this.#Z[q]=void 0,this.#j.push(q)),this.#H===1?(this.#B=this.#G=0,this.#j.length=0):this.#B=this.#L[q],this.#U.delete(Q),this.#H--,q}has(X,q={}){let{status:Q=G0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="has",Q.key=X,Q.cache=this);let J=this.#o(X,q);return G0.hasSubscribers&&G0.publish(Q),J}#o(X,q={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:J}=q,$=this.#U.get(X);if($!==void 0){let Y=this.#Z[$];if(this.#J(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D($))J&&(J.has="stale",this.#P(J,$));else return Q&&this.#y($),J&&(J.has="hit",this.#P(J,$)),!0}else J&&(J.has="miss");return!1}peek(X,q={}){let{status:Q=g7()?{}:void 0}=q;Q&&(Q.op="peek",Q.key=X,Q.cache=this),q.status=Q;let J=this.#s(X,q);return G0.hasSubscribers&&G0.publish(Q),J}#s(X,q){let{status:Q,allowStale:J=this.allowStale}=q,$=this.#U.get(X);if($===void 0||!J&&this.#D($)){Q&&(Q.peek=$===void 0?"miss":"stale");return}let Y=this.#Z[$],H=this.#J(Y)?Y.__staleWhileFetching:Y;return Q&&(H!==void 0?(Q.peek="hit",Q.value=H):Q.peek="miss"),H}#m(X,q,Q,J){let $=q===void 0?void 0:this.#Z[q];if(this.#J($))return $;let Y=new AbortController,{signal:H}=Q;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let U={signal:Y.signal,options:Q,context:J},W=(R,D=!1)=>{let{aborted:M}=Y.signal,k=Q.ignoreFetchAbort&&R!==void 0,F=Q.ignoreFetchAbort||!!(Q.allowStaleOnFetchAbort&&R!==void 0);if(Q.status&&(M&&!D?(Q.status.fetchAborted=!0,Q.status.fetchError=Y.signal.reason,k&&(Q.status.fetchAbortIgnored=!0)):Q.status.fetchResolved=!0),M&&!k&&!D)return V(Y.signal.reason,F);let I=L,T=this.#Z[q];return(T===L||T===void 0&&k&&D)&&(R===void 0?I.__staleWhileFetching!==void 0?this.#Z[q]=I.__staleWhileFetching:this.#x(X,"fetch"):(Q.status&&(Q.status.fetchUpdated=!0),this.#E(X,R,U.options,I))),R},G=(R)=>(Q.status&&(Q.status.fetchRejected=!0,Q.status.fetchError=R),V(R,!1)),V=(R,D)=>{let{aborted:M}=Y.signal,k=M&&Q.allowStaleOnFetchAbort,F=k||Q.allowStaleOnFetchRejection,I=F||Q.noDeleteOnFetchRejection,T=L;if(this.#Z[q]===L&&(!I||!D&&T.__staleWhileFetching===void 0?this.#x(X,"fetch"):k||(this.#Z[q]=T.__staleWhileFetching)),F)return Q.status&&T.__staleWhileFetching!==void 0&&(Q.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw R},_=(R,D)=>{let M=this.#V?.(X,$,U);Y.signal.addEventListener("abort",()=>{(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort)&&(R(void 0),Q.allowStaleOnFetchAbort&&(R=(k)=>W(k,!0)))}),M&&M instanceof Promise?M.then((k)=>R(k===void 0?void 0:k),D):M!==void 0&&R(M)};Q.status&&(Q.status.fetchDispatched=!0);let L=new Promise(_).then(W,G),z=Object.assign(L,{__abortController:Y,__staleWhileFetching:$,__returned:void 0});return q===void 0?(this.#E(X,z,{...U.options,status:void 0}),q=this.#U.get(X)):this.#Z[q]=z,z}#J(X){if(!this.#h)return!1;let q=X;return!!q&&q instanceof Promise&&q.hasOwnProperty("__staleWhileFetching")&&q.__abortController instanceof AbortController}fetch(X,q={}){let Q=K2.hasSubscribers,{status:J=g7()?{}:void 0}=q;q.status=J,J&&q.context&&(J.context=q.context);let $=this.#l(X,q);return J&&Q&&(J.trace=!0,K2.tracePromise(()=>$,J).catch(()=>{})),$}async#l(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:J=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:U=0,sizeCalculation:W=this.sizeCalculation,noUpdateTTL:G=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:_=this.allowStaleOnFetchRejection,ignoreFetchAbort:L=this.ignoreFetchAbort,allowStaleOnFetchAbort:z=this.allowStaleOnFetchAbort,context:R,forceRefresh:D=!1,status:M,signal:k}=q;if(M&&(M.op="fetch",M.key=X,D&&(M.forceRefresh=!0),M.cache=this),!this.#h)return M&&(M.fetch="get"),this.#S(X,{allowStale:Q,updateAgeOnGet:J,noDeleteOnStaleGet:$,status:M});let F={allowStale:Q,updateAgeOnGet:J,noDeleteOnStaleGet:$,ttl:Y,noDisposeOnSet:H,size:U,sizeCalculation:W,noUpdateTTL:G,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:z,ignoreFetchAbort:L,status:M,signal:k},I=this.#U.get(X);if(I===void 0){M&&(M.fetch="miss");let T=this.#m(X,I,F,R);return T.__returned=T}else{let T=this.#Z[I];if(this.#J(T)){let w=Q&&T.__staleWhileFetching!==void 0;return M&&(M.fetch="inflight",w&&(M.returnedStale=!0)),w?T.__staleWhileFetching:T.__returned=T}let j=this.#D(I);if(!D&&!j)return M&&(M.fetch="hit"),this.#b(I),J&&this.#y(I),M&&this.#P(M,I),T;let A=this.#m(X,I,F,R),f=A.__staleWhileFetching!==void 0&&Q;return M&&(M.fetch=j?"stale":"refresh",f&&j&&(M.returnedStale=!0)),f?A.__staleWhileFetching:A.__returned=A}}forceFetch(X,q={}){let Q=K2.hasSubscribers,{status:J=g7()?{}:void 0}=q;q.status=J,J&&q.context&&(J.context=q.context);let $=this.#r(X,q);return J&&Q&&(J.trace=!0,K2.tracePromise(()=>$,J).catch(()=>{})),$}async#r(X,q={}){let Q=await this.#l(X,q);if(Q===void 0)throw Error("fetch() returned undefined");return Q}memo(X,q={}){let{status:Q=G0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="memo",Q.key=X,q.context&&(Q.context=q.context),Q.cache=this);let J=this.#t(X,q);return Q&&(Q.value=J),G0.hasSubscribers&&G0.publish(Q),J}#t(X,q={}){let Q=this.#A;if(!Q)throw Error("no memoMethod provided to constructor");let{context:J,status:$,forceRefresh:Y,...H}=q;$&&Y&&($.forceRefresh=!0);let U=this.#S(X,H),W=Y||U===void 0;if($&&($.memo=W?"miss":"hit",W||($.value=U)),!W)return U;let G=Q(X,U,{options:H,context:J});return $&&($.value=G),this.#E(X,G,H),G}get(X,q={}){let{status:Q=G0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="get",Q.key=X,Q.cache=this);let J=this.#S(X,q);return Q&&(J!==void 0&&(Q.value=J),G0.hasSubscribers&&G0.publish(Q)),J}#S(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:J=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,status:Y}=q,H=this.#U.get(X);if(H===void 0){Y&&(Y.get="miss");return}let U=this.#Z[H],W=this.#J(U);return Y&&this.#P(Y,H),this.#D(H)?W?(Y&&(Y.get="stale-fetching"),Q&&U.__staleWhileFetching!==void 0?(Y&&(Y.returnedStale=!0),U.__staleWhileFetching):void 0):($||this.#x(X,"expire"),Y&&(Y.get="stale"),Q?(Y&&(Y.returnedStale=!0),U):void 0):(Y&&(Y.get=W?"fetching":"hit"),this.#b(H),J&&this.#y(H),W?U.__staleWhileFetching:U)}#n(X,q){this.#R[q]=X,this.#L[X]=q}#b(X){X!==this.#G&&(X===this.#B?this.#B=this.#L[X]:this.#n(this.#R[X],this.#L[X]),this.#n(this.#G,X),this.#G=X)}delete(X){return this.#x(X,"delete")}#x(X,q){G0.hasSubscribers&&G0.publish({op:"delete",delete:q,key:X,cache:this});let Q=!1;if(this.#H!==0){let J=this.#U.get(X);if(J!==void 0)if(this.#F?.[J]&&(clearTimeout(this.#F?.[J]),this.#F[J]=void 0),Q=!0,this.#H===1)this.#i(q);else{this.#C(J);let $=this.#Z[J];if(this.#J($)?$.__abortController.abort(Error("deleted")):(this.#w||this.#_)&&(this.#w&&this.#X?.($,X,q),this.#_&&this.#W?.push([$,X,q])),this.#U.delete(X),this.#$[J]=void 0,this.#Z[J]=void 0,J===this.#G)this.#G=this.#R[J];else if(J===this.#B)this.#B=this.#L[J];else{let Y=this.#R[J];this.#L[Y]=this.#L[J];let H=this.#L[J];this.#R[H]=this.#R[J]}this.#H--,this.#j.push(J)}}if(this.#_&&this.#W?.length){let J=this.#W,$;for(;$=J?.shift();)this.#K?.(...$)}return Q}clear(){return this.#i("delete")}#i(X){for(let q of this.#N({allowStale:!0})){let Q=this.#Z[q];if(this.#J(Q))Q.__abortController.abort(Error("deleted"));else{let J=this.#$[q];this.#w&&this.#X?.(Q,J,X),this.#_&&this.#W?.push([Q,J,X])}}if(this.#U.clear(),this.#Z.fill(void 0),this.#$.fill(void 0),this.#M&&this.#I){this.#M.fill(0),this.#I.fill(0);for(let q of this.#F??[])q!==void 0&&clearTimeout(q);this.#F?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#B=0,this.#G=0,this.#j.length=0,this.#T=0,this.#H=0,this.#_&&this.#W){let q=this.#W,Q;for(;Q=q?.shift();)this.#K?.(...Q)}}}});function NP(Z,X=300000){let q=new Map,Q=new Map,J=async(...$)=>{let Y=m($),H=q.get(Y),U=Date.now();if(!H){let W=Q.get(Y);if(W)return W;let G=Z(...$);Q.set(Y,G);try{let V=await G;if(Q.get(Y)===G)q.set(Y,{value:V,timestamp:U,refreshing:!1});return V}finally{if(Q.get(Y)===G)Q.delete(Y)}}if(H&&U-H.timestamp>X&&!H.refreshing){H.refreshing=!0;let W=H;return Z(...$).then((G)=>{if(q.get(Y)===W)q.set(Y,{value:G,timestamp:Date.now(),refreshing:!1})}).catch((G)=>{if(g(G),q.get(Y)===W)q.delete(Y)}),H.value}return q.get(Y).value};return J.cache={clear:()=>{q.clear(),Q.clear()}},J}function R1(Z,X,q=100){let Q=new ZJ({max:q}),J=(...$)=>{let Y=X(...$),H=Q.get(Y);if(H!==void 0)return H;let U=Z(...$);return Q.set(Y,U),U};return J.cache={clear:()=>Q.clear(),size:()=>Q.size,delete:($)=>Q.delete($),get:($)=>Q.peek($),has:($)=>Q.has($)},J}var T4=B(()=>{XJ();p0();z0()});import*as z6 from"path";import*as qJ from"path/win32";function m7(Z){try{return _6(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function n_(Z){if(Z==="git"){let X=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let q of X)if(m7(q))return q}try{let q=_6(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
|
|
4
|
+
`).filter(Boolean),Q=s().toLowerCase();for(let J of q){let $=z6.resolve(J).toLowerCase();if(z6.dirname($).toLowerCase()===Q||$.startsWith(Q+z6.sep)){P(`Skipping potentially malicious executable in current directory: ${J}`);continue}return J}return null}catch{return null}}function bP(){if(y0()==="windows"){let Z=i_();process.env.SHELL=Z,P(`Using bash path: "${Z}"`)}}var i_,hP,QJ;var JJ=B(()=>{v1();Z1();M1();f7();T4();V6();i_=d(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(m7(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=n_("git");if(Z){let X=qJ.join(Z,"..","..","bin","bash.exe");if(m7(X))return X}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)}),hP=R1((Z)=>{if(Z.startsWith("\\\\"))return Z.replace(/\\/g,"/");let X=Z.match(/^([A-Za-z]):[/\\]/);if(X)return"/"+X[1].toLowerCase()+Z.slice(2).replace(/\\/g,"/");return Z.replace(/\\/g,"/")},(Z)=>Z,500),QJ=R1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let X=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(X){let Q=X[1].toUpperCase(),J=Z.slice(("/cygdrive/"+X[1]).length);return Q+":"+(J||"\\").replace(/\//g,"\\")}let q=Z.match(/^\/([A-Za-z])(\/|$)/);if(q){let Q=q[1].toUpperCase(),J=Z.slice(2);return Q+":"+(J||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as $J}from"os";import{dirname as YJ,isAbsolute as o_,join as s_,normalize as u7,relative as r_,resolve as t_}from"path";function d7(Z,X){let q=X??s()??N().cwd();if(typeof Z!=="string")throw TypeError(`Path must be a string, received ${typeof Z}`);if(typeof q!=="string")throw TypeError(`Base directory must be a string, received ${typeof q}`);if(Z.includes("\x00")||q.includes("\x00"))throw Error("Path contains null bytes");let Q=Z.trim();if(!Q)return u7(q).normalize("NFC");if(Q==="~")return $J().normalize("NFC");if(Q.startsWith("~/"))return s_($J(),Q.slice(2)).normalize("NFC");let J=Q;if(y0()==="windows"&&Q.match(/^\/[a-z]\//i))try{J=QJ(Q)}catch{J=Q}if(o_(J))return u7(J).normalize("NFC");return t_(q,J).normalize("NFC")}function lP(Z){let X=r_(s(),Z);return X.startsWith("..")?Z:X}function nP(Z){let X=d7(Z);if(X.startsWith("\\\\")||X.startsWith("//"))return YJ(X);try{if(N().statSync(X).isDirectory())return X}catch{}return YJ(X)}function iP(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function y1(Z){return u7(Z).replace(/\\/g,"/")}var j4=B(()=>{Z1();F0();V6();JJ();a_()});function Zz(Z,X,q){if(q!==void 0&&!O4(Z[X],q)||q===void 0&&!(X in Z))KJ(Z,X,q)}var U2;var c7=B(()=>{e_();HJ();U2=Zz});function Xz(Z){return function(X,q,Q){var J=-1,$=Object(X),Y=Q(X),H=Y.length;while(H--){var U=Y[Z?H:++J];if(q($[U],U,$)===!1)break}return X}}var UJ;var GJ=B(()=>{UJ=Xz});var qz,WJ;var VJ=B(()=>{GJ();qz=UJ(),WJ=qz});function Qz(Z){return I4(Z)&&w4(Z)}var _J;var zJ=B(()=>{LJ();BJ();_J=Qz});function Wz(Z){if(!I4(Z)||RJ(Z)!=Yz)return!1;var X=MJ(Z);if(X===null)return!0;var q=Uz.call(X,"constructor")&&X.constructor;return typeof q=="function"&&q instanceof q&&FJ.call(q)==Gz}var Yz="[object Object]",Hz,Kz,FJ,Uz,Gz,DJ;var AJ=B(()=>{Jz();$z();BJ();Hz=Function.prototype,Kz=Object.prototype,FJ=Hz.toString,Uz=Kz.hasOwnProperty,Gz=FJ.call(Object);DJ=Wz});function Vz(Z,X){if(X==="constructor"&&typeof Z[X]==="function")return;if(X=="__proto__")return;return Z[X]}var G2;var l7=B(()=>{G2=Vz});function Lz(Z){return TJ(Z,k4(Z))}var OJ;var IJ=B(()=>{Bz();jJ();OJ=Lz});function Oz(Z,X,q,Q,J,$,Y){var H=G2(Z,q),U=G2(X,q),W=Y.get(U);if(W){U2(Z,q,W);return}var G=$?$(H,U,q+"",Z,X,Y):void 0,V=G===void 0;if(V){var _=n7(U),L=!_&&kJ(U),z=!_&&!L&&NJ(U);if(G=U,_||L||z)if(n7(H))G=H;else if(_J(H))G=PJ(H);else if(L)V=!1,G=xJ(U,!0);else if(z)V=!1,G=EJ(U,!0);else G=[];else if(DJ(U)||i7(U)){if(G=H,i7(H))G=OJ(H);else if(!e0(H)||wJ(H))G=vJ(U)}else V=!1}if(V)Y.set(U,G),J(G,U,Q,$,Y),Y.delete(U);U2(Z,q,G)}var yJ;var CJ=B(()=>{c7();Dz();Tz();Az();jz();Rz();zz();zJ();Mz();_z();R4();AJ();Fz();l7();IJ();yJ=Oz});function bJ(Z,X,q,Q,J){if(Z===X)return;WJ(X,function($,Y){if(J||(J=new SJ),e0($))yJ(Z,X,Y,q,bJ,Q,J);else{var H=Q?Q(G2(Z,Y),$,Y+"",Z,X,J):void 0;if(H===void 0)H=$;U2(Z,Y,H)}},k4)}var hJ;var fJ=B(()=>{Iz();c7();VJ();CJ();R4();jJ();l7();hJ=bJ});function wz(Z,X,q){switch(q.length){case 0:return Z.call(X);case 1:return Z.call(X,q[0]);case 2:return Z.call(X,q[0],q[1]);case 3:return Z.call(X,q[0],q[1],q[2])}return Z.apply(X,q)}var gJ;var mJ=B(()=>{gJ=wz});function kz(Z,X,q){return X=uJ(X===void 0?Z.length-1:X,0),function(){var Q=arguments,J=-1,$=uJ(Q.length-X,0),Y=Array($);while(++J<$)Y[J]=Q[X+J];J=-1;var H=Array(X+1);while(++J<X)H[J]=Q[J];return H[X]=q(Y),gJ(Z,this,H)}}var uJ,pJ;var dJ=B(()=>{mJ();uJ=Math.max;pJ=kz});function Nz(Z){return function(){return Z}}var cJ;var lJ=B(()=>{cJ=Nz});var Pz,iJ;var aJ=B(()=>{lJ();xz();nJ();Pz=!a7?N4:function(Z,X){return a7(Z,"toString",{configurable:!0,enumerable:!1,value:cJ(X),writable:!0})},iJ=Pz});function Cz(Z){var X=0,q=0;return function(){var Q=yz(),J=vz-(Q-q);if(q=Q,J>0){if(++X>=Ez)return arguments[0]}else X=0;return Z.apply(void 0,arguments)}}var Ez=800,vz=16,yz,oJ;var sJ=B(()=>{yz=Date.now;oJ=Cz});var Sz,rJ;var tJ=B(()=>{aJ();sJ();Sz=oJ(iJ),rJ=Sz});function bz(Z,X){return rJ(pJ(Z,X,N4),Z+"")}var eJ;var Z$=B(()=>{nJ();dJ();tJ();eJ=bz});function hz(Z,X,q){if(!e0(q))return!1;var Q=typeof X;if(Q=="number"?w4(q)&&M4(X,q.length):Q=="string"&&(X in q))return O4(q[X],Z);return!1}var X$;var q$=B(()=>{HJ();LJ();fQ();R4();X$=hz});function fz(Z){return eJ(function(X,q){var Q=-1,J=q.length,$=J>1?q[J-1]:void 0,Y=J>2?q[2]:void 0;if($=Z.length>3&&typeof $=="function"?(J--,$):void 0,Y&&X$(q[0],q[1],Y))$=J<3?void 0:$,J=1;X=Object(X);while(++Q<J){var H=q[Q];if(H)Z(X,H,Q,$)}return X})}var Q$;var J$=B(()=>{Z$();q$();Q$=fz});var gz,X1;var $$=B(()=>{fJ();J$();gz=Q$(function(Z,X,q,Q){hJ(Z,X,q,Q)}),X1=gz});function o7(Z){let{buffer:X,bytesRead:q}=N().readSync(Z,{length:4096});if(q===0)return"utf8";if(q>=2){if(X[0]===255&&X[1]===254)return"utf16le"}if(q>=3&&X[0]===239&&X[1]===187&&X[2]===191)return"utf8";return"utf8"}function s7(Z){let X=0,q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===`
|
|
5
|
+
`)if(Q>0&&Z[Q-1]==="\r")X++;else q++;return X>q?"CRLF":"LF"}function mz(Z){let X=N(),{resolvedPath:q,isSymlink:Q}=F1(X,Z);if(Q)P(`Reading through symlink: ${Z} -> ${q}`);let J=o7(q),$=X.readFileSync(q,{encoding:J}),Y=s7($.slice(0,4096));return{content:$.replaceAll(`\r
|
|
6
|
+
`,`
|
|
7
|
+
`),encoding:J,lineEndings:Y}}function q1(Z){return mz(Z).content}var W2=B(()=>{M1();F0()});function d0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var x4=()=>{};import{join as uz}from"path";function Dv(Z){V2=Z}function Av(){V2=null,r7=void 0}function Tv(Z){return r7=Z,Z}function dz(){return uz(K0(),pz)}function cz(){try{let Z=q1(dz()),X=X0(d0(Z));if(!X||typeof X!=="object"||Array.isArray(X))return null;return X}catch{return null}}function P4(){if(r7!==!0)return null;if(V2)return V2;let Z=cz();if(Z)return V2=Z,B2(),Z;return null}var pz="remote-settings.json",V2=null,r7;var H$=B(()=>{c0();W2();x4();Y$();z0()});function Ov(Z,X){return Z.flatMap((q,Q)=>Q?[X(Q),q]:[q])}function t7(Z,X){let q=0;for(let Q of Z)q+=+!!X(Q);return q}function K$(Z){return[...new Set(Z)]}var e7=()=>{};class U${cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let X=N(),q;try{q=X.statSync(Z)}catch(Y){throw this.cache.delete(Z),Y}let Q=this.cache.get(Z);if(Q&&Q.mtime===q.mtimeMs)return{content:Q.content,encoding:Q.encoding};let J=W$(Z),$=X.readFileSync(Z,{encoding:J}).replaceAll(`\r
|
|
8
|
+
`,`
|
|
9
|
+
`);if(q.size<=this.maxEntryBytes){if(this.cache.set(Z,{content:$,encoding:J,mtime:q.mtimeMs}),this.cache.size>this.maxCacheSize){let Y=this.cache.keys().next().value;if(Y)this.cache.delete(Y)}}return{content:$,encoding:J}}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 Z3;var G$=B(()=>{E4();F0();Z3=new U$});import{chmodSync as lz,writeFileSync as V$}from"fs";import{realpath as nz,stat as R$}from"fs/promises";import{homedir as M$}from"os";import{basename as X3,dirname as v4,extname as B$,isAbsolute as iz,join as R6,normalize as az,relative as F$,resolve as oz,sep as L2}from"path";async function cv(Z){try{return await R$(Z),!0}catch{return!1}}function lv(Z){try{return N().readFileSync(Z,{encoding:"utf8"})}catch(X){return g(X),null}}function nv(Z){let X=N();return Math.floor(X.statSync(Z).mtimeMs)}async function iv(Z){let X=await N().stat(Z);return Math.floor(X.mtimeMs)}function av(Z,X,q,Q){let J=X;if(Q==="CRLF")J=X.replaceAll(`\r
|
|
10
|
+
`,`
|
|
11
|
+
`).split(`
|
|
12
|
+
`).join(`\r
|
|
13
|
+
`);F6(Z,J,{encoding:q}),Z3.invalidate(Z)}function W$(Z){try{let X=N(),{resolvedPath:q}=F1(X,Z);return o7(q)}catch(X){if(z$(X))P(`detectFileEncoding failed for expected reason: ${X.code}`,{level:"debug"});else g(X);return"utf8"}}function ov(Z,X="utf8"){try{let q=N(),{resolvedPath:Q}=F1(q,Z),{buffer:J,bytesRead:$}=q.readSync(Q,{length:4096}),Y=J.toString(X,0,$);return s7(Y)}catch(q){return g(q),"LF"}}function sv(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(X)=>" ".repeat(X.length))}function rz(Z){let X=Z?d7(Z):void 0,q=X?F$(s(),X):void 0;return{absolutePath:X,relativePath:q}}function rv(Z){let{relativePath:X}=rz(Z);if(X&&!X.startsWith(".."))return X;let q=M$();if(Z.startsWith(q+L2))return"~"+Z.slice(q.length);return Z}function tv(Z){let X=N();try{let q=v4(Z),Q=X3(Z,B$(Z)),Y=X.readdirSync(q).filter((H)=>X3(H.name,B$(H.name))===Q&&R6(q,H.name)!==Z)[0];if(Y)return Y.name;return}catch(q){if(!M6(q))g(q);return}}async function Zy(Z){let X=s(),q=v4(X),Q=Z;try{let H=await nz(v4(Z));Q=R6(H,X3(Z))}catch{}let J=q===L2?L2:q+L2;if(!Q.startsWith(J)||Q.startsWith(X+L2)||Q===X)return;let $=F$(q,Q),Y=R6(X,$);try{return await R$(Y),Y}catch{return}}function tz(){return!S1("tengu_compact_line_prefix_killswitch",!1)}function Xy({content:Z,startLine:X}){if(!Z)return"";let q=Z.split(/\r?\n/);if(tz())return q.map((Q,J)=>`${J+X}→${Q}`).join(`
|
|
14
|
+
`);return q.map((Q,J)=>{let $=String(J+X);if($.length>=6)return`${$}→${Q}`;return`${$.padStart(6," ")}→${Q}`}).join(`
|
|
15
|
+
`)}function qy(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function Qy(Z){try{return N().isDirEmptySync(Z)}catch(X){return M6(X)}}function Jy(Z){let{content:X}=Z3.readFile(Z);return X}function F6(Z,X,q={encoding:"utf-8"}){let Q=N(),J=Z;try{let U=Q.readlinkSync(Z);J=iz(U)?U:oz(v4(Z),U),P(`Writing through symlink: ${Z} -> ${J}`)}catch{}let $=`${J}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=Q.statSync(J).mode,H=!0,P(`Preserving file permissions: ${Y.toString(8)}`)}catch(U){if(!M6(U))throw U;if(q.mode!==void 0)Y=q.mode,P(`Setting permissions for new file: ${Y.toString(8)}`)}try{P(`Writing to temp file: ${$}`);let U={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)U.mode=q.mode;if(V$($,X,U),P(`Temp file written successfully, size: ${X.length} bytes`),H&&Y!==void 0)lz($,Y),P("Applied original permissions to temp file");P(`Renaming ${$} to ${J}`),Q.renameSync($,J),P(`File ${J} written atomically`)}catch(U){P(`Failed to write file atomically: ${U}`,{level:"error"}),l0("tengu_atomic_write_error",{});try{P(`Cleaning up temp file: ${$}`),Q.unlinkSync($)}catch(W){P(`Failed to clean up temp file: ${W}`)}P(`Falling back to non-atomic write for ${J}`);try{let W={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)W.mode=q.mode;V$(J,X,W),P(`File ${J} written successfully with non-atomic fallback`)}catch(W){throw P(`Non-atomic write also failed: ${W}`),W}}}function $y(){let Z=y0(),X=M$();if(Z==="macos")return R6(X,"Desktop");if(Z==="windows"){let Q=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(Q){let $=`/mnt/c${Q.replace(/^[A-Z]:/,"")}/Desktop`;if(N().existsSync($))return $}try{let $=N().readdirSync("/mnt/c/Users");for(let Y of $){if(Y.name==="Public"||Y.name==="Default"||Y.name==="Default User"||Y.name==="All Users")continue;let H=R6("/mnt/c/Users",Y.name,"Desktop");if(N().existsSync(H))return H}}catch(J){g(J)}}let q=R6(X,"Desktop");if(N().existsSync(q))return q;return X}function Yy(Z,X=sz){try{return N().statSync(Z).size<=X}catch{return!1}}function L$(Z){let X=az(Z);if(y0()==="windows")X=X.replace(/\//g,"\\").toLowerCase();return X}function Hy(Z,X){return L$(Z)===L$(X)}var sz=262144,ev="Note: your current working directory is";var E4=B(()=>{_$();q3();Z1();M1();C1();W2();G$();F0();p0();j4();V6()});import{appendFile as ez,mkdir as ZR,readFile as XR,writeFile as qR}from"fs/promises";import{homedir as QR}from"os";import{dirname as JR,join as $R}from"path";async function YR(Z,X){let{code:q}=await Q3("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:X});return q===0}function HR(){return $R(QR(),".config","git","ignore")}async function A$(Z,X=s()){try{if(!await D$(X))return;let q=`**/${Z}`,Q=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await YR(Q,X))return;let J=HR(),$=JR(J);await ZR($,{recursive:!0});try{if((await XR(J,{encoding:"utf-8"})).includes(q))return;await ez(J,`
|
|
16
|
+
${q}
|
|
17
|
+
`)}catch(Y){if(W0(Y)==="ENOENT")await qR(J,`${q}
|
|
18
|
+
`,"utf-8");else throw Y}}catch(q){g(q)}}var T$=B(()=>{Z1();C1();y4();_2();p0()});function R2(Z,X=!1){let q=Z.length,Q=0,J="",$=0,Y=16,H=0,U=0,W=0,G=0,V=0;function _(F,I){let T=0,j=0;while(T<F||!I){let A=Z.charCodeAt(Q);if(A>=48&&A<=57)j=j*16+A-48;else if(A>=65&&A<=70)j=j*16+A-65+10;else if(A>=97&&A<=102)j=j*16+A-97+10;else break;Q++,T++}if(T<F)j=-1;return j}function L(F){Q=F,J="",$=0,Y=16,V=0}function z(){let F=Q;if(Z.charCodeAt(Q)===48)Q++;else{Q++;while(Q<Z.length&&D6(Z.charCodeAt(Q)))Q++}if(Q<Z.length&&Z.charCodeAt(Q)===46)if(Q++,Q<Z.length&&D6(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&D6(Z.charCodeAt(Q)))Q++}else return V=3,Z.substring(F,Q);let I=Q;if(Q<Z.length&&(Z.charCodeAt(Q)===69||Z.charCodeAt(Q)===101)){if(Q++,Q<Z.length&&Z.charCodeAt(Q)===43||Z.charCodeAt(Q)===45)Q++;if(Q<Z.length&&D6(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&D6(Z.charCodeAt(Q)))Q++;I=Q}else V=3}return Z.substring(F,I)}function R(){let F="",I=Q;while(!0){if(Q>=q){F+=Z.substring(I,Q),V=2;break}let T=Z.charCodeAt(Q);if(T===34){F+=Z.substring(I,Q),Q++;break}if(T===92){if(F+=Z.substring(I,Q),Q++,Q>=q){V=2;break}switch(Z.charCodeAt(Q++)){case 34:F+='"';break;case 92:F+="\\";break;case 47:F+="/";break;case 98:F+="\b";break;case 102:F+="\f";break;case 110:F+=`
|
|
19
|
+
`;break;case 114:F+="\r";break;case 116:F+="\t";break;case 117:let A=_(4,!0);if(A>=0)F+=String.fromCharCode(A);else V=4;break;default:V=5}I=Q;continue}if(T>=0&&T<=31)if(z2(T)){F+=Z.substring(I,Q),V=2;break}else V=6;Q++}return F}function D(){if(J="",V=0,$=Q,U=H,G=W,Q>=q)return $=q,Y=17;let F=Z.charCodeAt(Q);if(J3(F)){do Q++,J+=String.fromCharCode(F),F=Z.charCodeAt(Q);while(J3(F));return Y=15}if(z2(F)){if(Q++,J+=String.fromCharCode(F),F===13&&Z.charCodeAt(Q)===10)Q++,J+=`
|
|
20
|
+
`;return H++,W=Q,Y=14}switch(F){case 123:return Q++,Y=1;case 125:return Q++,Y=2;case 91:return Q++,Y=3;case 93:return Q++,Y=4;case 58:return Q++,Y=6;case 44:return Q++,Y=5;case 34:return Q++,J=R(),Y=10;case 47:let I=Q-1;if(Z.charCodeAt(Q+1)===47){Q+=2;while(Q<q){if(z2(Z.charCodeAt(Q)))break;Q++}return J=Z.substring(I,Q),Y=12}if(Z.charCodeAt(Q+1)===42){Q+=2;let T=q-1,j=!1;while(Q<T){let A=Z.charCodeAt(Q);if(A===42&&Z.charCodeAt(Q+1)===47){Q+=2,j=!0;break}if(Q++,z2(A)){if(A===13&&Z.charCodeAt(Q)===10)Q++;H++,W=Q}}if(!j)Q++,V=1;return J=Z.substring(I,Q),Y=13}return J+=String.fromCharCode(F),Q++,Y=16;case 45:if(J+=String.fromCharCode(F),Q++,Q===q||!D6(Z.charCodeAt(Q)))return Y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return J+=z(),Y=11;default:while(Q<q&&M(F))Q++,F=Z.charCodeAt(Q);if($!==Q){switch(J=Z.substring($,Q),J){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return J+=String.fromCharCode(F),Q++,Y=16}}function M(F){if(J3(F)||z2(F))return!1;switch(F){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function k(){let F;do F=D();while(F>=12&&F<=15);return F}return{setPosition:L,getPosition:()=>Q,scan:X?k:D,getToken:()=>Y,getTokenValue:()=>J,getTokenOffset:()=>$,getTokenLength:()=>Q-$,getTokenStartLine:()=>U,getTokenStartCharacter:()=>$-G,getTokenError:()=>V}}function J3(Z){return Z===32||Z===9}function z2(Z){return Z===10||Z===13}function D6(Z){return Z>=48&&Z<=57}var j$;var C4=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"})(j$||(j$={}))});var D0,$3,O$;var I$=B(()=>{D0=Array(20).fill(0).map((Z,X)=>{return" ".repeat(X)}),$3={" ":{"\n":Array(200).fill(0).map((Z,X)=>{return`
|
|
21
|
+
`+" ".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+" ".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
|
|
22
|
+
`+" ".repeat(X)})},"\t":{"\n":Array(200).fill(0).map((Z,X)=>{return`
|
|
23
|
+
`+"\t".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+"\t".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
|
|
24
|
+
`+"\t".repeat(X)})}},O$=[`
|
|
25
|
+
`,"\r",`\r
|
|
26
|
+
`]});function Y3(Z,X,q){let Q,J,$,Y,H;if(X){Y=X.offset,H=Y+X.length,$=Y;while($>0&&!M2(Z,$-1))$--;let T=H;while(T<Z.length&&!M2(Z,T))T++;J=Z.substring($,T),Q=UR(J,q)}else J=Z,Q=0,$=0,Y=0,H=Z.length;let U=GR(q,Z),W=O$.includes(U),G=0,V=0,_;if(q.insertSpaces)_=D0[q.tabSize||4]??A6(D0[1],q.tabSize||4);else _="\t";let L=_==="\t"?"\t":" ",z=R2(J,!1),R=!1;function D(){if(G>1)return A6(U,G)+A6(_,Q+V);let T=_.length*(Q+V);if(!W||T>$3[L][U].length)return U+A6(_,Q+V);if(T<=0)return U;return $3[L][U][T]}function M(){let T=z.scan();G=0;while(T===15||T===14){if(T===14&&q.keepLines)G+=1;else if(T===14)G=1;T=z.scan()}return R=T===16||z.getTokenError()!==0,T}let k=[];function F(T,j,A){if(!R&&(!X||j<H&&A>Y)&&Z.substring(j,A)!==T)k.push({offset:j,length:A-j,content:T})}let I=M();if(q.keepLines&&G>0)F(A6(U,G),0,0);if(I!==17){let T=z.getTokenOffset()+$,j=_.length*Q<20&&q.insertSpaces?D0[_.length*Q]:A6(_,Q);F(j,$,T)}while(I!==17){let T=z.getTokenOffset()+z.getTokenLength()+$,j=M(),A="",f=!1;while(G===0&&(j===12||j===13)){let x=z.getTokenOffset()+$;F(D0[1],T,x),T=z.getTokenOffset()+z.getTokenLength()+$,f=j===12,A=f?D():"",j=M()}if(j===2){if(I!==1)V--;if(q.keepLines&&G>0||!q.keepLines&&I!==1)A=D();else if(q.keepLines)A=D0[1]}else if(j===4){if(I!==3)V--;if(q.keepLines&&G>0||!q.keepLines&&I!==3)A=D();else if(q.keepLines)A=D0[1]}else{switch(I){case 3:case 1:if(V++,q.keepLines&&G>0||!q.keepLines)A=D();else A=D0[1];break;case 5:if(q.keepLines&&G>0||!q.keepLines)A=D();else A=D0[1];break;case 12:A=D();break;case 13:if(G>0)A=D();else if(!f)A=D0[1];break;case 6:if(q.keepLines&&G>0)A=D();else if(!f)A=D0[1];break;case 10:if(q.keepLines&&G>0)A=D();else if(j===6&&!f)A="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(q.keepLines&&G>0)A=D();else if((j===12||j===13)&&!f)A=D0[1];else if(j!==5&&j!==17)R=!0;break;case 16:R=!0;break}if(G>0&&(j===12||j===13))A=D()}if(j===17)if(q.keepLines&&G>0)A=D();else A=q.insertFinalNewline?U:"";let w=z.getTokenOffset()+$;F(A,T,w),I=j}return k}function A6(Z,X){let q="";for(let Q=0;Q<X;Q++)q+=Z;return q}function UR(Z,X){let q=0,Q=0,J=X.tabSize||4;while(q<Z.length){let $=Z.charAt(q);if($===D0[1])Q++;else if($==="\t")Q+=J;else break;q++}return Math.floor(Q/J)}function GR(Z,X){for(let q=0;q<X.length;q++){let Q=X.charAt(q);if(Q==="\r"){if(q+1<X.length&&X.charAt(q+1)===`
|
|
27
|
+
`)return`\r
|
|
28
|
+
`;return"\r"}else if(Q===`
|
|
29
|
+
`)return`
|
|
30
|
+
`}return Z&&Z.eol||`
|
|
31
|
+
`}function M2(Z,X){return`\r
|
|
32
|
+
`.indexOf(Z.charAt(X))!==-1}var H3=B(()=>{C4();I$()});function w$(Z,X=[],q=F2.DEFAULT){let Q=null,J=[],$=[];function Y(U){if(Array.isArray(J))J.push(U);else if(Q!==null)J[Q]=U}return U3(Z,{onObjectBegin:()=>{let U={};Y(U),$.push(J),J=U,Q=null},onObjectProperty:(U)=>{Q=U},onObjectEnd:()=>{J=$.pop()},onArrayBegin:()=>{let U=[];Y(U),$.push(J),J=U,Q=null},onArrayEnd:()=>{J=$.pop()},onLiteralValue:Y,onError:(U,W,G)=>{X.push({error:U,offset:W,length:G})}},q),J[0]}function K3(Z,X=[],q=F2.DEFAULT){let Q={type:"array",offset:-1,length:-1,children:[],parent:void 0};function J(U){if(Q.type==="property")Q.length=U-Q.offset,Q=Q.parent}function $(U){return Q.children.push(U),U}U3(Z,{onObjectBegin:(U)=>{Q=$({type:"object",offset:U,length:-1,parent:Q,children:[]})},onObjectProperty:(U,W,G)=>{Q=$({type:"property",offset:W,length:-1,parent:Q,children:[]}),Q.children.push({type:"string",value:U,offset:W,length:G,parent:Q})},onObjectEnd:(U,W)=>{J(U+W),Q.length=U+W-Q.offset,Q=Q.parent,J(U+W)},onArrayBegin:(U,W)=>{Q=$({type:"array",offset:U,length:-1,parent:Q,children:[]})},onArrayEnd:(U,W)=>{Q.length=U+W-Q.offset,Q=Q.parent,J(U+W)},onLiteralValue:(U,W,G)=>{$({type:VR(U),offset:W,length:G,parent:Q,value:U}),J(W+G)},onSeparator:(U,W,G)=>{if(Q.type==="property"){if(U===":")Q.colonOffset=W;else if(U===",")J(W)}},onError:(U,W,G)=>{X.push({error:U,offset:W,length:G})}},q);let H=Q.children[0];if(H)delete H.parent;return H}function S4(Z,X){if(!Z)return;let q=Z;for(let Q of X)if(typeof Q==="string"){if(q.type!=="object"||!Array.isArray(q.children))return;let J=!1;for(let $ of q.children)if(Array.isArray($.children)&&$.children[0].value===Q&&$.children.length===2){q=$.children[1],J=!0;break}if(!J)return}else{let J=Q;if(q.type!=="array"||J<0||!Array.isArray(q.children)||J>=q.children.length)return;q=q.children[J]}return q}function U3(Z,X,q=F2.DEFAULT){let Q=R2(Z,!1),J=[],$=0;function Y(E){return E?()=>$===0&&E(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function H(E){return E?(y)=>$===0&&E(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function U(E){return E?(y)=>$===0&&E(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>J.slice()):()=>!0}function W(E){return E?()=>{if($>0)$++;else if(E(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>J.slice())===!1)$=1}:()=>!0}function G(E){return E?()=>{if($>0)$--;if($===0)E(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter())}:()=>!0}let V=W(X.onObjectBegin),_=U(X.onObjectProperty),L=G(X.onObjectEnd),z=W(X.onArrayBegin),R=G(X.onArrayEnd),D=U(X.onLiteralValue),M=H(X.onSeparator),k=Y(X.onComment),F=H(X.onError),I=q&&q.disallowComments,T=q&&q.allowTrailingComma;function j(){while(!0){let E=Q.scan();switch(Q.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:if(!I)A(11);break;case 2:A(12);break;case 6:A(16);break}switch(E){case 12:case 13:if(I)A(10);else k();break;case 16:A(1);break;case 15:case 14:break;default:return E}}}function A(E,y=[],u=[]){if(F(E),y.length+u.length>0){let h=Q.getToken();while(h!==17){if(y.indexOf(h)!==-1){j();break}else if(u.indexOf(h)!==-1)break;h=j()}}}function f(E){let y=Q.getTokenValue();if(E)D(y);else _(y),J.push(y);return j(),!0}function w(){switch(Q.getToken()){case 11:let E=Q.getTokenValue(),y=Number(E);if(isNaN(y))A(2),y=0;D(y);break;case 7:D(null);break;case 8:D(!0);break;case 9:D(!1);break;default:return!1}return j(),!0}function x(){if(Q.getToken()!==10)return A(3,[],[2,5]),!1;if(f(!1),Q.getToken()===6){if(M(":"),j(),!r())A(4,[],[2,5])}else A(5,[],[2,5]);return J.pop(),!0}function v(){V(),j();let E=!1;while(Q.getToken()!==2&&Q.getToken()!==17){if(Q.getToken()===5){if(!E)A(4,[],[]);if(M(","),j(),Q.getToken()===2&&T)break}else if(E)A(6,[],[]);if(!x())A(4,[],[2,5]);E=!0}if(L(),Q.getToken()!==2)A(7,[2],[]);else j();return!0}function b(){z(),j();let E=!0,y=!1;while(Q.getToken()!==4&&Q.getToken()!==17){if(Q.getToken()===5){if(!y)A(4,[],[]);if(M(","),j(),Q.getToken()===4&&T)break}else if(y)A(6,[],[]);if(E)J.push(0),E=!1;else J[J.length-1]++;if(!r())A(4,[],[4,5]);y=!0}if(R(),!E)J.pop();if(Q.getToken()!==4)A(8,[4],[]);else j();return!0}function r(){switch(Q.getToken()){case 3:return b();case 1:return v();case 10:return f(!0);default:return w()}}if(j(),Q.getToken()===17){if(q.allowEmptyContent)return!0;return A(4,[],[]),!1}if(!r())return A(4,[],[]),!1;if(Q.getToken()!==17)A(9,[],[]);return!0}function VR(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 F2;var G3=B(()=>{C4();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(F2||(F2={}))});function k$(Z,X,q,Q){let J=X.slice(),Y=K3(Z,[]),H=void 0,U=void 0;while(J.length>0)if(U=J.pop(),H=S4(Y,J),H===void 0&&q!==void 0)if(typeof U==="string")q={[U]:q};else q=[q];else break;if(!H){if(q===void 0)throw Error("Can not delete in empty document");return b1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(q)},Q)}else if(H.type==="object"&&typeof U==="string"&&Array.isArray(H.children)){let W=S4(H,[U]);if(W!==void 0)if(q===void 0){if(!W.parent)throw Error("Malformed AST");let G=H.children.indexOf(W.parent),V,_=W.parent.offset+W.parent.length;if(G>0){let L=H.children[G-1];V=L.offset+L.length}else if(V=H.offset+1,H.children.length>1)_=H.children[1].offset;return b1(Z,{offset:V,length:_-V,content:""},Q)}else return b1(Z,{offset:W.offset,length:W.length,content:JSON.stringify(q)},Q);else{if(q===void 0)return[];let G=`${JSON.stringify(U)}: ${JSON.stringify(q)}`,V=Q.getInsertionIndex?Q.getInsertionIndex(H.children.map((L)=>L.children[0].value)):H.children.length,_;if(V>0){let L=H.children[V-1];_={offset:L.offset+L.length,length:0,content:","+G}}else if(H.children.length===0)_={offset:H.offset+1,length:0,content:G};else _={offset:H.offset+1,length:0,content:G+","};return b1(Z,_,Q)}}else if(H.type==="array"&&typeof U==="number"&&Array.isArray(H.children)){let W=U;if(W===-1){let G=`${JSON.stringify(q)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:G};else{let _=H.children[H.children.length-1];V={offset:_.offset+_.length,length:0,content:","+G}}return b1(Z,V,Q)}else if(q===void 0&&H.children.length>=0){let G=U,V=H.children[G],_;if(H.children.length===1)_={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===G){let L=H.children[G-1],z=L.offset+L.length,R=H.offset+H.length;_={offset:z,length:R-2-z,content:""}}else _={offset:V.offset,length:H.children[G+1].offset-V.offset,content:""};return b1(Z,_,Q)}else if(q!==void 0){let G,V=`${JSON.stringify(q)}`;if(!Q.isArrayInsertion&&H.children.length>U){let _=H.children[U];G={offset:_.offset,length:_.length,content:V}}else if(H.children.length===0||U===0)G={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let _=U>H.children.length?H.children.length:U,L=H.children[_-1];G={offset:L.offset+L.length,length:0,content:","+V}}return b1(Z,G,Q)}else throw Error(`Can not ${q===void 0?"remove":Q.isArrayInsertion?"insert":"modify"} Array index ${W} as length is not sufficient`)}else throw Error(`Can not add ${typeof U!=="number"?"index":"property"} to parent of type ${H.type}`)}function b1(Z,X,q){if(!q.formattingOptions)return[X];let Q=b4(Z,X),J=X.offset,$=X.offset+X.content.length;if(X.length===0||X.content.length===0){while(J>0&&!M2(Q,J-1))J--;while($<Q.length&&!M2(Q,$))$++}let Y=Y3(Q,{offset:J,length:$-J},{...q.formattingOptions,keepLines:!1});for(let U=Y.length-1;U>=0;U--){let W=Y[U];Q=b4(Q,W),J=Math.min(J,W.offset),$=Math.max($,W.offset+W.length),$+=W.content.length-W.length}let H=Z.length-(Q.length-$)-J;return[{offset:J,length:H,content:Q.substring(J,$)}]}function b4(Z,X){return Z.substring(0,X.offset)+X.content+Z.substring(X.offset+X.length)}var N$=B(()=>{H3();G3()});function v$(Z,X,q,Q){return k$(Z,X,q,Q)}function y$(Z,X){let q=X.slice(0).sort((J,$)=>{let Y=J.offset-$.offset;if(Y===0)return J.length-$.length;return Y}),Q=Z.length;for(let J=q.length-1;J>=0;J--){let $=q[J];if($.offset+$.length<=Q)Z=b4(Z,$);else throw Error("Overlapping edit");Q=$.offset}return Z}var x$,P$,W3,E$;var C$=B(()=>{H3();N$();C4();G3();(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"})(x$||(x$={}));(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"})(P$||(P$={}));W3=w$;(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"})(E$||(E$={}))});import{open as _R,readFile as zR,stat as RR}from"fs/promises";function b$(Z,X){try{return{ok:!0,value:JSON.parse(d0(Z))}}catch(q){if(X)g(q);return{ok:!1}}}function by(Z){if(!Z)return null;try{return W3(d0(Z))}catch(X){return g(X),null}}function FR(Z){let X=h$,q=Z.length,Q=X(Z);if(!Q.error||Q.done||Q.read>=q)return Q.values;let{values:J,read:$}=Q;while($<q){let Y=typeof Z==="string"?Z.indexOf(`
|
|
33
|
+
`,$):Z.indexOf(10,$);if(Y===-1)break;$=Y+1;let H=X(Z,$);if(H.values.length>0)J=J.concat(H.values);if(!H.error||H.done||H.read>=q)break;$=H.read}return J}function DR(Z){let X=Z.length,q=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)q=3;let Q=[];while(q<X){let J=Z.indexOf(10,q);if(J===-1)J=X;let $=Z.toString("utf8",q,J).trim();if(q=J+1,!$)continue;try{Q.push(JSON.parse($))}catch{}}return Q}function AR(Z){let X=d0(Z),q=X.length,Q=0,J=[];while(Q<q){let $=X.indexOf(`
|
|
34
|
+
`,Q);if($===-1)$=q;let Y=X.substring(Q,$).trim();if(Q=$+1,!Y)continue;try{J.push(JSON.parse(Y))}catch{}}return J}function V3(Z){if(h$)return FR(Z);if(typeof Z==="string")return AR(Z);return DR(Z)}async function hy(Z){let H=[];try{let{size:X}=await RR(Z);if(X<=D2)return V3(await zR(Z));const q=B6(H,await _R(Z,"r"),1);let Q=Buffer.allocUnsafe(D2);let J=0;let $=X-D2;while(J<D2){let{bytesRead:_}=await q.read(Q,J,D2-J,$+J);if(_===0)break;J+=_}let Y=Q.indexOf(10);if(Y!==-1&&Y<J-1)return V3(Q.subarray(Y+1,J));return V3(Q.subarray(0,J))}catch(U){var W=U,G=1}finally{var V=L6(H,W,G);V&&await V}}function fy(Z,X){try{if(!Z||Z.trim()==="")return m([X],null,4);let q=d0(Z),Q=W3(q);if(Array.isArray(Q)){let J=Q.length,H=v$(q,J===0?[0]:[J],X,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let U=[...Q,X];return m(U,null,4)}return y$(q,H)}else return m([X],null,4)}catch(q){return g(q),m([X],null,4)}}var MR=8192,S$,C0,h$,D2=104857600;var h4=B(()=>{C$();x4();p0();T4();z0();S$=R1(b$,(Z)=>Z,50),C0=Object.assign(function(X,q=!0){if(!X)return null;let Q=X.length>MR?b$(X,q):S$(X,q);return Q.ok?Q.value:null},{cache:S$.cache});h$=(()=>{if(typeof Bun>"u")return!1;let X=Bun.JSONL;if(!X?.parseChunk)return!1;return X.parseChunk})()});function dy(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 cy(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 ly(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 ny(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 iy(Z){if(Z==="")return[];let X=Z.split(",").map((Q)=>Q.trim()),q=[];for(let Q of X)switch(Q){case"user":q.push("userSettings");break;case"project":q.push("projectSettings");break;case"local":q.push("localSettings");break;default:throw Error(`Invalid setting source: ${Q}. Valid options are: user, project, local`)}return q}function A2(){let Z=f$(),X=new Set(Z);return X.add("policySettings"),X.add("flagSettings"),Array.from(X)}function ay(Z){return A2().includes(Z)}var py,oy,g$="https://json.schemastore.org/claude-code-settings.json";var B3=B(()=>{T6();py=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];oy=["localSettings","projectSettings","userSettings"]});function m$(Z){f4.set(Z,Date.now())}function ry(Z,X){let q=f4.get(Z);if(q!==void 0&&Date.now()-q<X)return f4.delete(Z),!0;return!1}function ty(){f4.clear()}var f4;var u$=B(()=>{f4=new Map});import{join as TR}from"path";var D1,T2;var g4=B(()=>{v1();V6();D1=d(function(){switch(y0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),T2=d(function(){return TR(D1(),"managed-settings.d")})});var jR,OR,p$;var d$=B(()=>{n0();h1();jR=O(()=>K.object({allowedDomains:K.array(K.string()).optional(),allowManagedDomainsOnly:K.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:K.array(K.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:K.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:K.boolean().optional(),httpProxyPort:K.number().optional(),socksProxyPort:K.number().optional()}).optional()),OR=O(()=>K.object({allowWrite:K.array(K.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:K.array(K.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:K.array(K.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:K.array(K.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths."),allowManagedReadPathsOnly:K.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used.")}).optional()),p$=O(()=>K.object({enabled:K.boolean().optional(),failIfUnavailable:K.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:K.boolean().optional(),allowUnsandboxedCommands:K.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:jR(),filesystem:OR(),ignoreViolations:K.record(K.string(),K.array(K.string())).optional(),enableWeakerNestedSandbox:K.boolean().optional(),enableWeakerNetworkIsolation:K.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:K.array(K.string()).optional(),ripgrep:K.object({command:K.string(),args:K.array(K.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});function c$(){return process.versions.bun!==void 0}function HC(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var l$=()=>{};function t(Z){if(typeof Z!=="object"||Z===null)return!1;let X=Object.getPrototypeOf(Z);return(X===null||X===Object.prototype||Object.getPrototypeOf(X)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}var Q1=()=>{};import{fileURLToPath as IR}from"node:url";var j6=(Z,X)=>{let q=_3(wR(Z));if(typeof q!=="string")throw TypeError(`${X} must be a string or a file URL: ${q}.`);return q},wR=(Z)=>L3(Z)?Z.toString():Z,L3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,_3=(Z)=>Z instanceof URL?IR(Z):Z;var O6=()=>{};var m4=(Z,X=[],q={})=>{let Q=j6(Z,"First argument"),[J,$]=t(X)?[[],X]:[X,q];if(!Array.isArray(J))throw TypeError(`Second argument must be either an array of arguments or an options object: ${J}`);if(J.some((U)=>typeof U==="object"&&U!==null))throw TypeError(`Second argument must be an array of strings: ${J}`);let Y=J.map(String),H=Y.find((U)=>U.includes("\x00"));if(H!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${H}`);if(!t($))throw TypeError(`Last argument must be an options object: ${$}`);return[Q,Y,$]};var z3=B(()=>{Q1();O6()});import{StringDecoder as kR}from"node:string_decoder";var n$,i$=(Z)=>n$.call(Z)==="[object ArrayBuffer]",q0=(Z)=>n$.call(Z)==="[object Uint8Array]",J1=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),NR,a$=(Z)=>NR.encode(Z),xR,u4=(Z)=>xR.decode(Z),o$=(Z,X)=>{return PR(Z,X).join("")},PR=(Z,X)=>{if(X==="utf8"&&Z.every(($)=>typeof $==="string"))return Z;let q=new kR(X),Q=Z.map(($)=>typeof $==="string"?a$($):$).map(($)=>q.write($)),J=q.end();return J===""?Q:[...Q,J]},j2=(Z)=>{if(Z.length===1&&q0(Z[0]))return Z[0];return R3(ER(Z))},ER=(Z)=>Z.map((X)=>typeof X==="string"?a$(X):X),R3=(Z)=>{let X=new Uint8Array(vR(Z)),q=0;for(let Q of Z)X.set(Q,q),q+=Q.length;return X},vR=(Z)=>{let X=0;for(let q of Z)X+=q.length;return X};var A0=B(()=>{({toString:n$}=Object.prototype),NR=new TextEncoder,xR=new TextDecoder});import{ChildProcess as yR}from"node:child_process";var e$=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),Z9=(Z,X)=>{let q=[];for(let[$,Y]of Z.entries())q=CR({templates:Z,expressions:X,tokens:q,index:$,template:Y});if(q.length===0)throw TypeError("Template script must not be empty");let[Q,...J]=q;return[Q,J,{}]},CR=({templates:Z,expressions:X,tokens:q,index:Q,template:J})=>{if(J===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[Q]}`);let{nextTokens:$,leadingWhitespaces:Y,trailingWhitespaces:H}=SR(J,Z.raw[Q]),U=r$(q,$,Y);if(Q===X.length)return U;let W=X[Q],G=Array.isArray(W)?W.map((V)=>t$(V)):[t$(W)];return r$(U,G,H)},SR=(Z,X)=>{if(X.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let q=[],Q=0,J=s$.has(X[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let U=X[H];if(s$.has(U)){if(Q!==Y)q.push(Z.slice(Q,Y));Q=Y+1}else if(U==="\\"){let W=X[H+1];if(W===`
|
|
35
|
+
`)Y-=1,H+=1;else if(W==="u"&&X[H+2]==="{")H=X.indexOf("}",H+3);else H+=bR[W]??1}}let $=Q===Z.length;if(!$)q.push(Z.slice(Q));return{nextTokens:q,leadingWhitespaces:J,trailingWhitespaces:$}},s$,bR,r$=(Z,X,q)=>q||Z.length===0||X.length===0?[...Z,...X]:[...Z.slice(0,-1),`${Z.at(-1)}${X[0]}`,...X.slice(1)],t$=(Z)=>{let X=typeof Z;if(X==="string")return Z;if(X==="number")return String(Z);if(t(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return hR(Z);if(Z instanceof yR||Object.prototype.toString.call(Z)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${X}" in template expression`)},hR=({stdout:Z})=>{if(typeof Z==="string")return Z;if(q0(Z))return u4(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 X9=B(()=>{Q1();A0();s$=new Set([" ","\t","\r",`
|
|
36
|
+
`]),bR={x:3,u:5}});import M3 from"node:process";var S0=(Z)=>p4.includes(Z),p4,I0,d4=(Z)=>I0[Z]??`stdio[${Z}]`;var $1=B(()=>{p4=[M3.stdin,M3.stdout,M3.stderr],I0=["stdin","stdout","stderr"]});import{debuglog as fR}from"node:util";var Q9=(Z)=>{let X={...Z};for(let q of A3)X[q]=F3(Z,q);return X},F3=(Z,X)=>{let q=Array.from({length:gR(Z)+1}),Q=mR(Z[X],q,X);return lR(Q,X)},gR=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,I0.length):I0.length,mR=(Z,X,q)=>t(Z)?uR(Z,X,q):X.fill(Z),uR=(Z,X,q)=>{for(let Q of Object.keys(Z).sort(pR))for(let J of dR(Q,q,X))X[J]=Z[Q];return X},pR=(Z,X)=>q9(Z)<q9(X)?1:-1,q9=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},dR=(Z,X,q)=>{if(Z==="ipc")return[q.length-1];let Q=D3(Z);if(Q===void 0||Q===0)throw TypeError(`"${X}.${Z}" is invalid.
|
|
37
|
+
It must be "${X}.stdout", "${X}.stderr", "${X}.all", "${X}.ipc", or "${X}.fd3", "${X}.fd4" (and so on).`);if(Q>=q.length)throw TypeError(`"${X}.${Z}" is invalid: that file descriptor does not exist.
|
|
38
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);return Q==="all"?[1,2]:[Q]},D3=(Z)=>{if(Z==="all")return Z;if(I0.includes(Z))return I0.indexOf(Z);let X=cR.exec(Z);if(X!==null)return Number(X[1])},cR,lR=(Z,X)=>Z.map((q)=>q===void 0?iR[X]:q),nR,iR,A3,Y1=(Z,X)=>X==="ipc"?Z.at(-1):Z[X];var H1=B(()=>{Q1();$1();cR=/^fd(\d+)$/,nR=fR("execa").enabled?"full":"none",iR={lines:!1,buffer:!0,maxBuffer:1e8,verbose:nR,stripFinalNewline:!0},A3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var I6=({verbose:Z},X)=>T3(Z,X)!=="none",w6=({verbose:Z},X)=>!["none","short"].includes(T3(Z,X)),J9=({verbose:Z},X)=>{let q=T3(Z,X);return c4(q)?q:void 0},T3=(Z,X)=>X===void 0?aR(Z):Y1(Z,X),aR=(Z)=>Z.find((X)=>c4(X))??l4.findLast((X)=>Z.includes(X)),c4=(Z)=>typeof Z==="function",l4;var A1=B(()=>{H1();l4=["none","short","full"]});import{platform as oR}from"node:process";import{stripVTControlCharacters as sR}from"node:util";var $9=(Z,X)=>{let q=[Z,...X],Q=q.join(" "),J=q.map(($)=>qM(Y9($))).join(" ");return{command:Q,escapedCommand:J}},O2=(Z)=>sR(Z).split(`
|
|
39
|
+
`).map((X)=>Y9(X)).join(`
|
|
40
|
+
`),Y9=(Z)=>Z.replaceAll(eR,(X)=>rR(X)),rR=(Z)=>{let X=ZM[Z];if(X!==void 0)return X;let q=Z.codePointAt(0),Q=q.toString(16);return q<=XM?`\\u${Q.padStart(4,"0")}`:`\\U${Q}`},tR=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},eR,ZM,XM=65535,qM=(Z)=>{if(QM.test(Z))return Z;return oR==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},QM;var n4=B(()=>{eR=tR(),ZM={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},QM=/^[\w./-]+$/});import H9 from"node:process";function j3(){let{env:Z}=H9,{TERM:X,TERM_PROGRAM:q}=Z;if(H9.platform!=="win32")return X!=="linux";return Boolean(Z.WT_SESSION)||Boolean(Z.TERMINUS_SUBLIME)||Z.ConEmuTask==="{cmd::Cmder}"||q==="Terminus-Sublime"||q==="vscode"||X==="xterm-256color"||X==="alacritty"||X==="rxvt-unicode"||X==="rxvt-unicode-256color"||Z.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var K9=()=>{};var U9,G9,JM,$M,YM,HM,KM,i4,SC;var W9=B(()=>{K9();U9={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:"╱"},G9={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:"⅒"},JM={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"},$M={...U9,...G9},YM={...U9,...JM},HM=j3(),KM=HM?$M:YM,i4=KM,SC=Object.entries(G9)});import UM from"node:tty";var GM,C=(Z,X)=>{if(!GM)return(J)=>J;let q=`\x1B[${Z}m`,Q=`\x1B[${X}m`;return(J)=>{let $=J+"",Y=$.indexOf(Q);if(Y===-1)return q+$+Q;let H=q,U=0,G=(X===22?Q:"")+q;while(Y!==-1)H+=$.slice(U,Y)+G,U=Y+Q.length,Y=$.indexOf(Q,U);return H+=$.slice(U)+Q,H}},fC,V9,gC,mC,uC,pC,dC,cC,lC,nC,iC,aC,oC,sC,rC,tC,eC,a4,ZS,XS,qS,QS,JS,$S,YS,HS,KS,B9,US,L9,GS,WS,VS,BS,LS,_S,zS,RS,MS,FS,DS;var _9=B(()=>{GM=UM?.WriteStream?.prototype?.hasColors?.()??!1,fC=C(0,0),V9=C(1,22),gC=C(2,22),mC=C(3,23),uC=C(4,24),pC=C(53,55),dC=C(7,27),cC=C(8,28),lC=C(9,29),nC=C(30,39),iC=C(31,39),aC=C(32,39),oC=C(33,39),sC=C(34,39),rC=C(35,39),tC=C(36,39),eC=C(37,39),a4=C(90,39),ZS=C(40,49),XS=C(41,49),qS=C(42,49),QS=C(43,49),JS=C(44,49),$S=C(45,49),YS=C(46,49),HS=C(47,49),KS=C(100,49),B9=C(91,39),US=C(92,39),L9=C(93,39),GS=C(94,39),WS=C(95,39),VS=C(96,39),BS=C(97,39),LS=C(101,49),_S=C(102,49),zS=C(103,49),RS=C(104,49),MS=C(105,49),FS=C(106,49),DS=C(107,49)});var z9=B(()=>{_9()});var F9=({type:Z,message:X,timestamp:q,piped:Q,commandId:J,result:{failed:$=!1}={},options:{reject:Y=!0}})=>{let H=WM(q),U=VM[Z]({failed:$,reject:Y,piped:Q}),W=BM[Z]({reject:Y});return`${a4(`[${H}]`)} ${a4(`[${J}]`)} ${W(U)} ${W(X)}`},WM=(Z)=>`${o4(Z.getHours(),2)}:${o4(Z.getMinutes(),2)}:${o4(Z.getSeconds(),2)}.${o4(Z.getMilliseconds(),3)}`,o4=(Z,X)=>String(Z).padStart(X,"0"),R9=({failed:Z,reject:X})=>{if(!Z)return i4.tick;return X?i4.cross:i4.warning},VM,M9=(Z)=>Z,BM;var D9=B(()=>{W9();z9();VM={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:R9,duration:R9},BM={command:()=>V9,output:()=>M9,ipc:()=>M9,error:({reject:Z})=>Z?B9:L9,duration:()=>a4}});var A9=(Z,X,q)=>{let Q=J9(X,q);return Z.map(({verboseLine:J,verboseObject:$})=>LM(J,$,Q)).filter((J)=>J!==void 0).map((J)=>_M(J)).join("")},LM=(Z,X,q)=>{if(q===void 0)return Z;let Q=q(Z,X);if(typeof Q==="string")return Q},_M=(Z)=>Z.endsWith(`
|
|
41
|
+
`)?Z:`${Z}
|
|
42
|
+
`;var T9=B(()=>{A1()});import{inspect as zM}from"node:util";var i0=({type:Z,verboseMessage:X,fdNumber:q,verboseInfo:Q,result:J})=>{let $=RM({type:Z,result:J,verboseInfo:Q}),Y=MM(X,$),H=A9(Y,Q,q);if(H!=="")console.warn(H.slice(0,-1))},RM=({type:Z,result:X,verboseInfo:{escapedCommand:q,commandId:Q,rawOptions:{piped:J=!1,...$}}})=>({type:Z,escapedCommand:q,commandId:`${Q}`,timestamp:new Date,piped:J,result:X,options:$}),MM=(Z,X)=>Z.split(`
|
|
43
|
+
`).map((q)=>FM({...X,message:q})),FM=(Z)=>{return{verboseLine:F9(Z),verboseObject:Z}},s4=(Z)=>{let X=typeof Z==="string"?Z:zM(Z);return O2(X).replaceAll("\t"," ".repeat(DM))},DM=2;var k6=B(()=>{n4();D9();T9()});var j9=(Z,X)=>{if(!I6(X))return;i0({type:"command",verboseMessage:Z,verboseInfo:X})};var O9=B(()=>{A1();k6()});var I9=(Z,X,q)=>{jM(Z);let Q=AM(Z);return{verbose:Z,escapedCommand:X,commandId:Q,rawOptions:q}},AM=(Z)=>I6({verbose:Z})?TM++:void 0,TM=0n,jM=(Z)=>{for(let X of Z){if(X===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(X===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!l4.includes(X)&&!c4(X)){let q=l4.map((Q)=>`'${Q}'`).join(", ");throw TypeError(`The "verbose" option must not be ${X}. Allowed values are: ${q} or a function.`)}}};var w9=B(()=>{A1()});import{hrtime as k9}from"node:process";var r4=()=>k9.bigint(),O3=(Z)=>Number(k9.bigint()-Z)/1e6;var t4=()=>{};var e4=(Z,X,q)=>{let Q=r4(),{command:J,escapedCommand:$}=$9(Z,X),Y=F3(q,"verbose"),H=I9(Y,$,{...q});return j9($,H),{command:J,escapedCommand:$,startTime:Q,verboseInfo:H}};var I3=B(()=>{O9();w9();t4();n4();H1()});function Z8(Z={}){let{env:X=process.env,platform:q=process.platform}=Z;if(q!=="win32")return"PATH";return Object.keys(X).reverse().find((Q)=>Q.toUpperCase()==="PATH")||"Path"}var N9=()=>{};var x9=()=>{};import{promisify as OM}from"node:util";import{execFile as IM,execFileSync as tS}from"node:child_process";import P9 from"node:path";import{fileURLToPath as wM}from"node:url";function X8(Z){return Z instanceof URL?wM(Z):Z}function E9(Z){return{*[Symbol.iterator](){let X=P9.resolve(X8(Z)),q;while(q!==X)yield X,q=X,X=P9.resolve(X,"..")}}}var Xb;var v9=B(()=>{x9();Xb=OM(IM)});import q8 from"node:process";import f1 from"node:path";var kM=({cwd:Z=q8.cwd(),path:X=q8.env[Z8()],preferLocal:q=!0,execPath:Q=q8.execPath,addExecPath:J=!0}={})=>{let $=f1.resolve(X8(Z)),Y=[],H=X.split(f1.delimiter);if(q)NM(Y,H,$);if(J)xM(Y,H,Q,$);return X===""||X===f1.delimiter?`${Y.join(f1.delimiter)}${X}`:[...Y,X].join(f1.delimiter)},NM=(Z,X,q)=>{for(let Q of E9(q)){let J=f1.join(Q,"node_modules/.bin");if(!X.includes(J))Z.push(J)}},xM=(Z,X,q,Q)=>{let J=f1.resolve(Q,X8(q),"..");if(!X.includes(J))Z.push(J)},y9=({env:Z=q8.env,...X}={})=>{Z={...Z};let q=Z8({env:Z});return X.path=Z[q],Z[q]=kM(X),Z};var C9=B(()=>{N9();v9()});var S9=(Z,X,q)=>{let Q=q?J8:Q8,J=Z instanceof a0?{}:{cause:Z};return new Q(X,J)},a0,b9=(Z,X)=>{Object.defineProperty(Z.prototype,"name",{value:X,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,f9,{value:!0,writable:!1,enumerable:!1,configurable:!1})},h9=(Z)=>$8(Z)&&(f9 in Z),f9,$8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",Q8,J8;var g1=B(()=>{a0=class a0 extends Error{};f9=Symbol("isExecaError");Q8=class Q8 extends Error{};b9(Q8,Q8.name);J8=class J8 extends Error{};b9(J8,J8.name)});var g9=()=>{let Z=w3-m9+1;return Array.from({length:Z},PM)},PM=(Z,X)=>({name:`SIGRT${X+1}`,number:m9+X,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),m9=34,w3=64;var k3=()=>{};var u9;var p9=B(()=>{u9=[{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 EM}from"node:os";var N3=()=>{let Z=g9();return[...u9,...Z].map(vM)},vM=({name:Z,number:X,description:q,action:Q,forced:J=!1,standard:$})=>{let{signals:{[Z]:Y}}=EM,H=Y!==void 0;return{name:Z,number:H?Y:X,description:q,supported:H,action:Q,forced:J,standard:$}};var d9=B(()=>{p9();k3()});import{constants as yM}from"node:os";var CM=()=>{let Z=N3();return Object.fromEntries(Z.map(SM))},SM=({name:Z,number:X,description:q,supported:Q,action:J,forced:$,standard:Y})=>[Z,{name:Z,number:X,description:q,supported:Q,action:J,forced:$,standard:Y}],c9,bM=()=>{let Z=N3(),X=w3+1,q=Array.from({length:X},(Q,J)=>hM(J,Z));return Object.assign({},...q)},hM=(Z,X)=>{let q=fM(Z,X);if(q===void 0)return{};let{name:Q,description:J,supported:$,action:Y,forced:H,standard:U}=q;return{[Z]:{name:Q,number:Z,description:J,supported:$,action:Y,forced:H,standard:U}}},fM=(Z,X)=>{let q=X.find(({name:Q})=>yM.signals[Q]===Z);if(q!==void 0)return q;return X.find((Q)=>Q.number===Z)},Fb;var l9=B(()=>{k3();d9();c9=CM(),Fb=bM()});import{constants as I2}from"node:os";var i9=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return o9(Z,"option `killSignal`")},a9=(Z)=>Z===0?Z:o9(Z,"`subprocess.kill()`'s argument"),o9=(Z,X)=>{if(Number.isInteger(Z))return gM(Z,X);if(typeof Z==="string")return uM(Z,X);throw TypeError(`Invalid ${X} ${String(Z)}: it must be a string or an integer.
|
|
44
|
+
${x3()}`)},gM=(Z,X)=>{if(n9.has(Z))return n9.get(Z);throw TypeError(`Invalid ${X} ${Z}: this signal integer does not exist.
|
|
45
|
+
${x3()}`)},mM=()=>new Map(Object.entries(I2.signals).reverse().map(([Z,X])=>[X,Z])),n9,uM=(Z,X)=>{if(Z in I2.signals)return Z;if(Z.toUpperCase()in I2.signals)throw TypeError(`Invalid ${X} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${X} '${Z}': this signal name does not exist.
|
|
46
|
+
${x3()}`)},x3=()=>`Available signal names: ${pM()}.
|
|
47
|
+
Available signal numbers: ${dM()}.`,pM=()=>Object.keys(I2.signals).sort().map((Z)=>`'${Z}'`).join(", "),dM=()=>[...new Set(Object.values(I2.signals).sort((Z,X)=>Z-X))].join(", "),Y8=(Z)=>c9[Z].description;var w2=B(()=>{l9();n9=mM()});import{setTimeout as cM}from"node:timers/promises";var s9=(Z)=>{if(Z===!1)return Z;if(Z===!0)return lM;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},lM=5000,r9=({kill:Z,options:{forceKillAfterDelay:X,killSignal:q},onInternalError:Q,context:J,controller:$},Y,H)=>{let{signal:U,error:W}=nM(Y,H,q);iM(W,Q);let G=Z(U);return aM({kill:Z,signal:U,forceKillAfterDelay:X,killSignal:q,killResult:G,context:J,controller:$}),G},nM=(Z,X,q)=>{let[Q=q,J]=$8(Z)?[void 0,Z]:[Z,X];if(typeof Q!=="string"&&!Number.isInteger(Q))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(Q)}`);if(J!==void 0&&!$8(J))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${J}`);return{signal:a9(Q),error:J}},iM=(Z,X)=>{if(Z!==void 0)X.reject(Z)},aM=async({kill:Z,signal:X,forceKillAfterDelay:q,killSignal:Q,killResult:J,context:$,controller:Y})=>{if(X===Q&&J)P3({kill:Z,forceKillAfterDelay:q,context:$,controllerSignal:Y.signal})},P3=async({kill:Z,forceKillAfterDelay:X,context:q,controllerSignal:Q})=>{if(X===!1)return;try{if(await cM(X,void 0,{signal:Q}),Z("SIGKILL"))q.isForcefullyTerminated??=!0}catch{}};var H8=B(()=>{g1();w2()});import{once as oM}from"node:events";var K8=async(Z,X)=>{if(!Z.aborted)await oM(Z,"abort",{signal:X})};var E3=()=>{};var t9=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},e9=({subprocess:Z,cancelSignal:X,gracefulCancel:q,context:Q,controller:J})=>X===void 0||q?[]:[sM(Z,X,Q,J)],sM=async(Z,X,q,{signal:Q})=>{throw await K8(X,Q),q.terminationReason??="cancel",Z.kill(),X.reason};var v3=B(()=>{E3()});var N6=({methodName:Z,isSubprocess:X,ipc:q,isConnected:Q})=>{rM(Z,X,q),y3(Z,X,Q)},rM=(Z,X,q)=>{if(!q)throw Error(`${b0(Z,X)} can only be used if the \`ipc\` option is \`true\`.`)},y3=(Z,X,q)=>{if(!q)throw Error(`${b0(Z,X)} cannot be used: the ${T1(X)} has already exited or disconnected.`)},ZY=(Z)=>{throw Error(`${b0("getOneMessage",Z)} could not complete: the ${T1(Z)} exited or disconnected.`)},XY=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${T1(Z)} is sending a message too, instead of listening to incoming messages.
|
|
48
|
+
This can be fixed by both sending a message and listening to incoming messages at the same time:
|
|
49
|
+
|
|
50
|
+
const [receivedMessage] = await Promise.all([
|
|
51
|
+
${b0("getOneMessage",Z)},
|
|
52
|
+
${b0("sendMessage",Z,"message, {strict: true}")},
|
|
53
|
+
]);`)},U8=(Z,X)=>Error(`${b0("sendMessage",X)} failed when sending an acknowledgment response to the ${T1(X)}.`,{cause:Z}),qY=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${T1(Z)} is not listening to incoming messages.`)},QY=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${T1(Z)} exited without listening to incoming messages.`)},JY=()=>Error(`\`cancelSignal\` aborted: the ${T1(!0)} disconnected.`),$Y=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},YY=({error:Z,methodName:X,isSubprocess:q})=>{if(Z.code==="EPIPE")throw Error(`${b0(X,q)} cannot be used: the ${T1(q)} is disconnecting.`,{cause:Z})},HY=({error:Z,methodName:X,isSubprocess:q,message:Q})=>{if(tM(Z))throw Error(`${b0(X,q)}'s argument type is invalid: the message cannot be serialized: ${String(Q)}.`,{cause:Z})},tM=({code:Z,message:X})=>eM.has(Z)||ZF.some((q)=>X.includes(q)),eM,ZF,b0=(Z,X,q="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${XF(X)}${Z}(${q})`,XF=(Z)=>Z?"":"subprocess.",T1=(Z)=>Z?"parent process":"subprocess",x6=(Z)=>{if(Z.connected)Z.disconnect()};var P6=B(()=>{eM=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),ZF=["could not be cloned","circular structure","call stack size exceeded"]});var o0=()=>{let Z={},X=new Promise((q,Q)=>{Object.assign(Z,{resolve:q,reject:Q})});return Object.assign(X,Z)};var E6=()=>{};var W8=(Z,X="stdin")=>{let{options:Q,fileDescriptors:J}=s0.get(Z),$=KY(J,X,!0),Y=Z.stdio[$];if(Y===null)throw TypeError(UY($,X,Q,!0));return Y},v6=(Z,X="stdout")=>{let{options:Q,fileDescriptors:J}=s0.get(Z),$=KY(J,X,!1),Y=$==="all"?Z.all:Z.stdio[$];if(Y===null||Y===void 0)throw TypeError(UY($,X,Q,!1));return Y},s0,KY=(Z,X,q)=>{let Q=qF(X,q);return QF(Q,X,q,Z),Q},qF=(Z,X)=>{let q=D3(Z);if(q!==void 0)return q;let{validOptions:Q,defaultValue:J}=X?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${k2(X)}" must not be "${Z}".
|
|
54
|
+
It must be ${Q} or "fd3", "fd4" (and so on).
|
|
55
|
+
It is optional and defaults to "${J}".`)},QF=(Z,X,q,Q)=>{let J=Q[GY(Z)];if(J===void 0)throw TypeError(`"${k2(q)}" must not be ${X}. That file descriptor does not exist.
|
|
56
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);if(J.direction==="input"&&!q)throw TypeError(`"${k2(q)}" must not be ${X}. It must be a readable stream, not writable.`);if(J.direction!=="input"&&q)throw TypeError(`"${k2(q)}" must not be ${X}. It must be a writable stream, not readable.`)},UY=(Z,X,q,Q)=>{if(Z==="all"&&!q.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:J,optionValue:$}=JF(Z,q);return`The "${J}: ${G8($)}" option is incompatible with using "${k2(Q)}: ${G8(X)}".
|
|
57
|
+
Please set this option with "pipe" instead.`},JF=(Z,{stdin:X,stdout:q,stderr:Q,stdio:J})=>{let $=GY(Z);if($===0&&X!==void 0)return{optionName:"stdin",optionValue:X};if($===1&&q!==void 0)return{optionName:"stdout",optionValue:q};if($===2&&Q!==void 0)return{optionName:"stderr",optionValue:Q};return{optionName:`stdio[${$}]`,optionValue:J[$]}},GY=(Z)=>Z==="all"?1:Z,k2=(Z)=>Z?"to":"from",G8=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var j1=B(()=>{H1();s0=new WeakMap});import{addAbortListener as $F}from"node:events";var m1=(Z,X,q)=>{let Q=Z.getMaxListeners();if(Q===0||Q===Number.POSITIVE_INFINITY)return;Z.setMaxListeners(Q+X),$F(q,()=>{Z.setMaxListeners(Z.getMaxListeners()-X)})};var V8=()=>{};var B8=(Z,X)=>{if(X)C3(Z)},C3=(Z)=>{Z.refCounted()},L8=(Z,X)=>{if(X)S3(Z)},S3=(Z)=>{Z.unrefCounted()},WY=(Z,X)=>{if(X)S3(Z),S3(Z)},VY=(Z,X)=>{if(X)C3(Z),C3(Z)};var N2=()=>{};import{once as YF}from"node:events";import{scheduler as HF}from"node:timers/promises";var BY=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q},J)=>{if(RY(J)||FY(J))return;if(!_8.has(Z))_8.set(Z,[]);let $=_8.get(Z);if($.push(J),$.length>1)return;while($.length>0){await MY(Z,Q,J),await HF.yield();let Y=await zY({wrappedMessage:$[0],anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q});$.shift(),Q.emit("message",Y),Q.emit("message:done")}},LY=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q,boundOnMessage:J})=>{b3();let $=_8.get(Z);while($?.length>0)await YF(Q,"message:done");Z.removeListener("message",J),VY(X,q),Q.connected=!1,Q.emit("disconnect")},_8;var _Y=B(()=>{R8();N2();z8();M8();_8=new WeakMap});import{EventEmitter as KF}from"node:events";var O1=(Z,X,q)=>{if(F8.has(Z))return F8.get(Z);let Q=new KF;return Q.connected=!0,F8.set(Z,Q),UF({ipcEmitter:Q,anyProcess:Z,channel:X,isSubprocess:q}),Q},F8,UF=({ipcEmitter:Z,anyProcess:X,channel:q,isSubprocess:Q})=>{let J=BY.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z});X.on("message",J),X.once("disconnect",LY.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z,boundOnMessage:J})),WY(q,Q)},D8=(Z)=>{let X=F8.get(Z);return X===void 0?Z.channel!==null:X.connected};var x2=B(()=>{_Y();N2();F8=new WeakMap});import{once as GF}from"node:events";var DY=({anyProcess:Z,channel:X,isSubprocess:q,message:Q,strict:J})=>{if(!J)return Q;let $=O1(Z,X,q),Y=j8(Z,$);return{id:WF++,type:T8,message:Q,hasListeners:Y}},WF=0n,AY=(Z,X)=>{if(X?.type!==T8||X.hasListeners)return;for(let{id:q}of Z)if(q!==void 0)A8[q].resolve({isDeadlock:!0,hasListeners:!1})},zY=async({wrappedMessage:Z,anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:J})=>{if(Z?.type!==T8||!X.connected)return Z;let{id:$,message:Y}=Z,H={id:$,type:jY,message:j8(X,J)};try{await O8({anyProcess:X,channel:q,isSubprocess:Q,ipc:!0},H)}catch(U){J.emit("strict:error",U)}return Y},RY=(Z)=>{if(Z?.type!==jY)return!1;let{id:X,message:q}=Z;return A8[X]?.resolve({isDeadlock:!1,hasListeners:q}),!0},TY=async(Z,X,q)=>{if(Z?.type!==T8)return;let Q=o0();A8[Z.id]=Q;let J=new AbortController;try{let{isDeadlock:$,hasListeners:Y}=await Promise.race([Q,VF(X,q,J)]);if($)XY(q);if(!Y)qY(q)}finally{J.abort(),delete A8[Z.id]}},A8,VF=async(Z,X,{signal:q})=>{m1(Z,1,q),await GF(Z,"disconnect",{signal:q}),QY(X)},T8="execa:ipc:request",jY="execa:ipc:response";var z8=B(()=>{E6();V8();I8();P6();x2();R8();A8={}});var OY=(Z,X,q)=>{if(!P2.has(Z))P2.set(Z,new Set);let Q=P2.get(Z),J=o0(),$=q?X.id:void 0,Y={onMessageSent:J,id:$};return Q.add(Y),{outgoingMessages:Q,outgoingMessage:Y}},IY=({outgoingMessages:Z,outgoingMessage:X})=>{Z.delete(X),X.onMessageSent.resolve()},MY=async(Z,X,q)=>{while(!j8(Z,X)&&P2.get(Z)?.size>0){let Q=[...P2.get(Z)];AY(Q,q),await Promise.all(Q.map(({onMessageSent:J})=>J))}},P2,j8=(Z,X)=>X.listenerCount("message")>BF(Z),BF=(Z)=>s0.has(Z)&&!Y1(s0.get(Z).options.buffer,"ipc")?1:0;var R8=B(()=>{E6();H1();j1();z8();P2=new WeakMap});import{promisify as LF}from"node:util";var O8=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},J,{strict:$=!1}={})=>{return N6({methodName:"sendMessage",isSubprocess:q,ipc:Q,isConnected:Z.connected}),_F({anyProcess:Z,channel:X,methodName:"sendMessage",isSubprocess:q,message:J,strict:$})},_F=async({anyProcess:Z,channel:X,methodName:q,isSubprocess:Q,message:J,strict:$})=>{let Y=DY({anyProcess:Z,channel:X,isSubprocess:Q,message:J,strict:$}),H=OY(Z,Y,$);try{await f3({anyProcess:Z,methodName:q,isSubprocess:Q,wrappedMessage:Y,message:J})}catch(U){throw x6(Z),U}finally{IY(H)}},f3=async({anyProcess:Z,methodName:X,isSubprocess:q,wrappedMessage:Q,message:J})=>{let $=zF(Z);try{await Promise.all([TY(Q,Z,q),$(Q)])}catch(Y){throw YY({error:Y,methodName:X,isSubprocess:q}),HY({error:Y,methodName:X,isSubprocess:q,message:J}),Y}},zF=(Z)=>{if(h3.has(Z))return h3.get(Z);let X=LF(Z.send.bind(Z));return h3.set(Z,X),X},h3;var I8=B(()=>{P6();R8();z8();h3=new WeakMap});import{scheduler as RF}from"node:timers/promises";var kY=(Z,X)=>{return y3("cancelSignal",!1,Z.connected),f3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:xY,message:X},message:X})},NY=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{return await MF({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q}),g3.signal},MF=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{if(wY)return;if(wY=!0,!Q){$Y();return}if(X===null){b3();return}O1(Z,X,q),await RF.yield()},wY=!1,FY=(Z)=>{if(Z?.type!==xY)return!1;return g3.abort(Z.message),!0},xY="execa:ipc:cancel",b3=()=>{g3.abort(JY())},g3;var M8=B(()=>{I8();x2();P6();g3=new AbortController});var PY=({gracefulCancel:Z,cancelSignal:X,ipc:q,serialization:Q})=>{if(!Z)return;if(X===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!q)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(Q==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},EY=({subprocess:Z,cancelSignal:X,gracefulCancel:q,forceKillAfterDelay:Q,context:J,controller:$})=>q?[FF({subprocess:Z,cancelSignal:X,forceKillAfterDelay:Q,context:J,controller:$})]:[],FF=async({subprocess:Z,cancelSignal:X,forceKillAfterDelay:q,context:Q,controller:{signal:J}})=>{await K8(X,J);let $=DF(X);throw await kY(Z,$),P3({kill:Z.kill,forceKillAfterDelay:q,context:Q,controllerSignal:J}),Q.terminationReason??="gracefulCancel",X.reason},DF=({reason:Z})=>{if(!(Z instanceof DOMException))return Z;let X=Error(Z.message);return Object.defineProperty(X,"stack",{value:Z.stack,enumerable:!1,configurable:!0,writable:!0}),X};var m3=B(()=>{E3();M8();H8()});import{setTimeout as AF}from"node:timers/promises";var vY=({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})`)},yY=(Z,X,q,Q)=>X===0||X===void 0?[]:[TF(Z,X,q,Q)],TF=async(Z,X,q,{signal:Q})=>{throw await AF(X,void 0,{signal:Q}),q.terminationReason??="timeout",Z.kill(),new a0};var u3=B(()=>{g1()});import{execPath as jF,execArgv as OF}from"node:process";import CY from"node:path";var SY=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},bY=(Z,X,{node:q=!1,nodePath:Q=jF,nodeOptions:J=OF.filter((U)=>!U.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 U=j6(Q,'The "nodePath" option'),W=CY.resolve($,U),G={...H,nodePath:W,node:q,cwd:$};if(!q)return[Z,X,G];if(CY.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[W,[...J,Z,...X],{ipc:!0,...G,shell:!1}]};var p3=B(()=>{O6()});import{serialize as IF}from"node:v8";var hY=({ipcInput:Z,ipc:X,serialization:q})=>{if(Z===void 0)return;if(!X)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");NF[q](Z)},wF=(Z)=>{try{IF(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:X})}},kF=(Z)=>{try{JSON.stringify(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:X})}},NF,fY=async(Z,X)=>{if(X===void 0)return;await Z.sendMessage(X)};var d3=B(()=>{NF={advanced:wF,json:kF}});var mY=({encoding:Z})=>{if(c3.has(Z))return;let X=PF(Z);if(X!==void 0)throw TypeError(`Invalid option \`encoding: ${w8(Z)}\`.
|
|
58
|
+
Please rename it to ${w8(X)}.`);let q=[...c3].map((Q)=>w8(Q)).join(", ");throw TypeError(`Invalid option \`encoding: ${w8(Z)}\`.
|
|
59
|
+
Please rename it to one of: ${q}.`)},xF,T0,c3,PF=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let X=Z.toLowerCase();if(X in gY)return gY[X];if(c3.has(X))return X},gY,w8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var u1=B(()=>{xF=new Set(["utf8","utf16le"]),T0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),c3=new Set([...xF,...T0]),gY={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import{statSync as EF}from"node:fs";import vF from"node:path";import yF from"node:process";var uY=(Z=pY())=>{let X=j6(Z,'The "cwd" option');return vF.resolve(X)},pY=()=>{try{return yF.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
|
|
60
|
+
${Z.message}`,Z}},dY=(Z,X)=>{if(X===pY())return Z;let q;try{q=EF(X)}catch(Q){return`The "cwd" option is invalid: ${X}.
|
|
61
|
+
${Q.message}
|
|
62
|
+
${Z}`}if(!q.isDirectory())return`The "cwd" option is not a directory: ${X}.
|
|
63
|
+
${Z}`;return Z};var l3=B(()=>{O6()});import CF from"node:path";import lY from"node:process";var nY,k8=(Z,X,q)=>{q.cwd=uY(q.cwd);let[Q,J,$]=bY(Z,X,q),{command:Y,args:H,options:U}=nY.default._parse(Q,J,$),W=Q9(U),G=SF(W);if(vY(G),mY(G),hY(G),t9(G),PY(G),G.shell=_3(G.shell),G.env=bF(G),G.killSignal=i9(G.killSignal),G.forceKillAfterDelay=s9(G.forceKillAfterDelay),G.lines=G.lines.map((V,_)=>V&&!T0.has(G.encoding)&&G.buffer[_]),lY.platform==="win32"&&CF.basename(Y,".exe")==="cmd")H.unshift("/q");return{file:Y,commandArguments:H,options:G}},SF=({extendEnv:Z=!0,preferLocal:X=!1,cwd:q,localDir:Q=q,encoding:J="utf8",reject:$=!0,cleanup:Y=!0,all:H=!1,windowsHide:U=!0,killSignal:W="SIGTERM",forceKillAfterDelay:G=!0,gracefulCancel:V=!1,ipcInput:_,ipc:L=_!==void 0||V,serialization:z="advanced",...R})=>({...R,extendEnv:Z,preferLocal:X,cwd:q,localDirectory:Q,encoding:J,reject:$,cleanup:Y,all:H,windowsHide:U,killSignal:W,forceKillAfterDelay:G,gracefulCancel:V,ipcInput:_,ipc:L,serialization:z}),bF=({env:Z,extendEnv:X,preferLocal:q,node:Q,localDirectory:J,nodePath:$})=>{let Y=X?{...lY.env,...Z}:Z;if(q||Q)return y9({env:Y,cwd:J,execPath:$,preferLocal:q,addExecPath:Q});return Y};var n3=B(()=>{C9();H8();w2();v3();m3();u3();p3();d3();u1();l3();O6();H1();nY=cY(b7(),1)});var N8=(Z,X,q)=>q.shell&&X.length>0?[[Z,...X].join(" "),[],q]:[Z,X,q];var i3=()=>{};function y6(Z){if(typeof Z==="string")return hF(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return fF(Z)}var hF=(Z)=>Z.at(-1)===iY?Z.slice(0,Z.at(-2)===aY?-2:-1):Z,fF=(Z)=>Z.at(-1)===gF?Z.subarray(0,Z.at(-2)===mF?-2:-1):Z,iY=`
|
|
64
|
+
`,gF,aY="\r",mF;var a3=B(()=>{gF=iY.codePointAt(0),mF=aY.codePointAt(0)});function h0(Z,{checkOpen:X=!0}={}){return Z!==null&&typeof Z==="object"&&(Z.writable||Z.readable||!X||Z.writable===void 0&&Z.readable===void 0)&&typeof Z.pipe==="function"}function o3(Z,{checkOpen:X=!0}={}){return h0(Z,{checkOpen:X})&&(Z.writable||!X)&&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 p1(Z,{checkOpen:X=!0}={}){return h0(Z,{checkOpen:X})&&(Z.readable||!X)&&typeof Z.read==="function"&&typeof Z.readable==="boolean"&&typeof Z.readableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function s3(Z,X){return o3(Z,X)&&p1(Z,X)}var d1=()=>{};class oY{#q;#Q;#X=!1;#Y=void 0;constructor(Z,X){this.#q=Z,this.#Q=X}next(){let Z=()=>this.#K();return this.#Y=this.#Y?this.#Y.then(Z,Z):Z(),this.#Y}return(Z){let X=()=>this.#V(Z);return this.#Y?this.#Y.then(X,X):X()}async#K(){if(this.#X)return{done:!0,value:void 0};let Z;try{Z=await this.#q.read()}catch(X){throw this.#Y=void 0,this.#X=!0,this.#q.releaseLock(),X}return Z.done&&(this.#Y=void 0,this.#X=!0,this.#q.releaseLock()),Z}async#V(Z){if(this.#X)return{done:!0,value:Z};if(this.#X=!0,!this.#Q){let X=this.#q.cancel(Z);return this.#q.releaseLock(),await X,{done:!0,value:Z}}return this.#q.releaseLock(),{done:!0,value:Z}}}function sY(){return this[r3].next()}function rY(Z){return this[r3].return(Z)}function t3({preventCancel:Z=!1}={}){let X=this.getReader(),q=new oY(X,Z),Q=Object.create(pF);return Q[r3]=q,Q}var uF,r3,pF;var tY=B(()=>{uF=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);r3=Symbol();Object.defineProperty(sY,"name",{value:"next"});Object.defineProperty(rY,"name",{value:"return"});pF=Object.create(uF,{next:{enumerable:!0,configurable:!0,writable:!0,value:sY},return:{enumerable:!0,configurable:!0,writable:!0,value:rY}})});var eY=()=>{};var ZH=B(()=>{tY();eY()});var XH=(Z)=>{if(p1(Z,{checkOpen:!1})&&E2.on!==void 0)return cF(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(dF.call(Z)==="[object ReadableStream]")return t3.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},dF,cF=async function*(Z){let X=new AbortController,q={};lF(Z,X,q);try{for await(let[Q]of E2.on(Z,"data",{signal:X.signal}))yield Q}catch(Q){if(q.error!==void 0)throw q.error;else if(!X.signal.aborted)throw Q}finally{Z.destroy()}},lF=async(Z,X,q)=>{try{await E2.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(Q){q.error=Q}finally{X.abort()}},E2;var e3=B(()=>{d1();ZH();({toString:dF}=Object.prototype),E2={}});var C6=async(Z,{init:X,convertChunk:q,getSize:Q,truncateChunk:J,addChunk:$,getFinalChunk:Y,finalize:H},{maxBuffer:U=Number.POSITIVE_INFINITY}={})=>{let W=XH(Z),G=X();G.length=0;try{for await(let V of W){let _=iF(V),L=q[_](V,G);JH({convertedChunk:L,state:G,getSize:Q,truncateChunk:J,addChunk:$,maxBuffer:U})}return nF({state:G,convertChunk:q,getSize:Q,truncateChunk:J,addChunk:$,getFinalChunk:Y,maxBuffer:U}),H(G)}catch(V){let _=typeof V==="object"&&V!==null?V:Error(V);throw _.bufferedData=H(G),_}},nF=({state:Z,getSize:X,truncateChunk:q,addChunk:Q,getFinalChunk:J,maxBuffer:$})=>{let Y=J(Z);if(Y!==void 0)JH({convertedChunk:Y,state:Z,getSize:X,truncateChunk:q,addChunk:Q,maxBuffer:$})},JH=({convertedChunk:Z,state:X,getSize:q,truncateChunk:Q,addChunk:J,maxBuffer:$})=>{let Y=q(Z),H=X.length+Y;if(H<=$){qH(Z,X,J,H);return}let U=Q(Z,$-X.length);if(U!==void 0)qH(U,X,J,$);throw new K1},qH=(Z,X,q,Q)=>{X.contents=q(Z,X,Q),X.length=Q},iF=(Z)=>{let X=typeof Z;if(X==="string")return"string";if(X!=="object"||Z===null)return"others";if(globalThis.Buffer?.isBuffer(Z))return"buffer";let q=QH.call(Z);if(q==="[object ArrayBuffer]")return"arrayBuffer";if(q==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&QH.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},QH,K1;var v2=B(()=>{e3();({toString:QH}=Object.prototype);K1=class K1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var U1=(Z)=>Z,y2=()=>{return},x8=({contents:Z})=>Z,P8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},E8=(Z)=>Z.length;var v8=()=>{};async function y8(Z,X){return C6(Z,rF,X)}var aF=()=>({contents:[]}),oF=()=>1,sF=(Z,{contents:X})=>{return X.push(Z),X},rF;var $H=B(()=>{v2();v8();rF={init:aF,convertChunk:{string:U1,buffer:U1,arrayBuffer:U1,dataView:U1,typedArray:U1,others:U1},getSize:oF,truncateChunk:y2,addChunk:sF,getFinalChunk:y2,finalize:x8}});async function C8(Z,X){return C6(Z,YD,X)}var tF=()=>({contents:new ArrayBuffer(0)}),eF=(Z)=>ZD.encode(Z),ZD,YH=(Z)=>new Uint8Array(Z),HH=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),XD=(Z,X)=>Z.slice(0,X),qD=(Z,{contents:X,length:q},Q)=>{let J=GH()?JD(X,Q):QD(X,Q);return new Uint8Array(J).set(Z,q),J},QD=(Z,X)=>{if(X<=Z.byteLength)return Z;let q=new ArrayBuffer(UH(X));return new Uint8Array(q).set(new Uint8Array(Z),0),q},JD=(Z,X)=>{if(X<=Z.maxByteLength)return Z.resize(X),Z;let q=new ArrayBuffer(X,{maxByteLength:UH(X)});return new Uint8Array(q).set(new Uint8Array(Z),0),q},UH=(Z)=>KH**Math.ceil(Math.log(Z)/Math.log(KH)),KH=2,$D=({contents:Z,length:X})=>GH()?Z:Z.slice(0,X),GH=()=>("resize"in ArrayBuffer.prototype),YD;var WH=B(()=>{v2();v8();ZD=new TextEncoder,YD={init:tF,convertChunk:{string:eF,buffer:YH,arrayBuffer:YH,dataView:HH,typedArray:HH,others:P8},getSize:E8,truncateChunk:XD,addChunk:qD,getFinalChunk:y2,finalize:$D}});async function b8(Z,X){return C6(Z,WD,X)}var HD=()=>({contents:"",textDecoder:new TextDecoder}),S8=(Z,{textDecoder:X})=>X.decode(Z,{stream:!0}),KD=(Z,{contents:X})=>X+Z,UD=(Z,X)=>Z.slice(0,X),GD=({textDecoder:Z})=>{let X=Z.decode();return X===""?void 0:X},WD;var VH=B(()=>{v2();v8();WD={init:HD,convertChunk:{string:U1,buffer:S8,arrayBuffer:S8,dataView:S8,typedArray:S8,others:P8},getSize:E8,truncateChunk:UD,addChunk:KD,getFinalChunk:GD,finalize:x8}});var BH=B(()=>{$H();WH();VH();v2()});import{on as VD}from"node:events";import{finished as BD}from"node:stream/promises";var h8=B(()=>{e3();BH();Object.assign(E2,{on:VD,finished:BD})});var LH=({error:Z,stream:X,readableObjectMode:q,lines:Q,encoding:J,fdNumber:$})=>{if(!(Z instanceof K1))throw Z;if($==="all")return Z;let Y=LD(q,Q,J);throw Z.maxBufferInfo={fdNumber:$,unit:Y},X.destroy(),Z},LD=(Z,X,q)=>{if(Z)return"objects";if(X)return"lines";if(q==="buffer")return"bytes";return"characters"},_H=(Z,X,q)=>{if(X.length!==q)return;let Q=new K1;throw Q.maxBufferInfo={fdNumber:"ipc"},Q},zH=(Z,X)=>{let{streamName:q,threshold:Q,unit:J}=_D(Z,X);return`Command's ${q} was larger than ${Q} ${J}`},_D=(Z,X)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:X[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:q,unit:Q}}=Z;delete Z.maxBufferInfo;let J=Y1(X,q);if(q==="ipc")return{streamName:"IPC output",threshold:J,unit:"messages"};return{streamName:d4(q),threshold:J,unit:Q}},RH=(Z,X,q)=>Z?.code==="ENOBUFS"&&X!==null&&X.some((Q)=>Q!==null&&Q.length>f8(q)),MH=(Z,X,q)=>{if(!X)return Z;let Q=f8(q);return Z.length>Q?Z.slice(0,Q):Z},f8=([,Z])=>Z;var c1=B(()=>{h8();$1();H1()});import{inspect as zD}from"node:util";var DH=({stdio:Z,all:X,ipcOutput:q,originalError:Q,signal:J,signalDescription:$,exitCode:Y,escapedCommand:H,timedOut:U,isCanceled:W,isGracefullyCanceled:G,isMaxBuffer:V,isForcefullyTerminated:_,forceKillAfterDelay:L,killSignal:z,maxBuffer:R,timeout:D,cwd:M})=>{let k=Q?.code,F=RD({originalError:Q,timedOut:U,timeout:D,isMaxBuffer:V,maxBuffer:R,errorCode:k,signal:J,signalDescription:$,exitCode:Y,isCanceled:W,isGracefullyCanceled:G,isForcefullyTerminated:_,forceKillAfterDelay:L,killSignal:z}),I=FD(Q,M),T=I===void 0?"":`
|
|
65
|
+
${I}`,j=`${F}: ${H}${T}`,A=X===void 0?[Z[2],Z[1]]:[X],f=[j,...A,...Z.slice(3),q.map((w)=>DD(w)).join(`
|
|
66
|
+
`)].map((w)=>O2(y6(AD(w)))).filter(Boolean).join(`
|
|
67
|
+
|
|
68
|
+
`);return{originalMessage:I,shortMessage:j,message:f}},RD=({originalError:Z,timedOut:X,timeout:q,isMaxBuffer:Q,maxBuffer:J,errorCode:$,signal:Y,signalDescription:H,exitCode:U,isCanceled:W,isGracefullyCanceled:G,isForcefullyTerminated:V,forceKillAfterDelay:_,killSignal:L})=>{let z=MD(V,_);if(X)return`Command timed out after ${q} milliseconds${z}`;if(G){if(Y===void 0)return`Command was gracefully canceled with exit code ${U}`;return V?`Command was gracefully canceled${z}`:`Command was gracefully canceled with ${Y} (${H})`}if(W)return`Command was canceled${z}`;if(Q)return`${zH(Z,J)}${z}`;if($!==void 0)return`Command failed with ${$}${z}`;if(V)return`Command was killed with ${L} (${Y8(L)})${z}`;if(Y!==void 0)return`Command was killed with ${Y} (${H})`;if(U!==void 0)return`Command failed with exit code ${U}`;return"Command failed"},MD=(Z,X)=>Z?` and was forcefully terminated after ${X} milliseconds`:"",FD=(Z,X)=>{if(Z instanceof a0)return;let q=h9(Z)?Z.originalMessage:String(Z?.message??Z),Q=O2(dY(q,X));return Q===""?void 0:Q},DD=(Z)=>typeof Z==="string"?Z:zD(Z),AD=(Z)=>Array.isArray(Z)?Z.map((X)=>y6(FH(X))).filter(Boolean).join(`
|
|
69
|
+
`):FH(Z),FH=(Z)=>{if(typeof Z==="string")return Z;if(q0(Z))return u4(Z);return""};var AH=B(()=>{a3();A0();l3();n4();c1();w2();g1()});var g8=({command:Z,escapedCommand:X,stdio:q,all:Q,ipcOutput:J,options:{cwd:$},startTime:Y})=>TH({command:Z,escapedCommand:X,cwd:$,durationMs:O3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:q[1],stderr:q[2],all:Q,stdio:q,ipcOutput:J,pipedFrom:[]}),S6=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:J,startTime:$,isSync:Y})=>C2({error:Z,command:X,escapedCommand:q,startTime:$,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:Q.length}),ipcOutput:[],options:J,isSync:Y}),C2=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:J,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:W,signal:G,stdio:V,all:_,ipcOutput:L,options:{timeoutDuration:z,timeout:R=z,forceKillAfterDelay:D,killSignal:M,cwd:k,maxBuffer:F},isSync:I})=>{let{exitCode:T,signal:j,signalDescription:A}=jD(W,G),{originalMessage:f,shortMessage:w,message:x}=DH({stdio:V,all:_,ipcOutput:L,originalError:Z,signal:j,signalDescription:A,exitCode:T,escapedCommand:q,timedOut:J,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,forceKillAfterDelay:D,killSignal:M,maxBuffer:F,timeout:R,cwd:k}),v=S9(Z,x,I);return Object.assign(v,TD({error:v,command:X,escapedCommand:q,startTime:Q,timedOut:J,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:T,signal:j,signalDescription:A,stdio:V,all:_,ipcOutput:L,cwd:k,originalMessage:f,shortMessage:w})),v},TD=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:J,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:W,signal:G,signalDescription:V,stdio:_,all:L,ipcOutput:z,cwd:R,originalMessage:D,shortMessage:M})=>TH({shortMessage:M,originalMessage:D,command:X,escapedCommand:q,cwd:R,durationMs:O3(Q),failed:!0,timedOut:J,isCanceled:$,isGracefullyCanceled:Y,isTerminated:G!==void 0,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:W,signal:G,signalDescription:V,code:Z.cause?.code,stdout:_[1],stderr:_[2],all:L,stdio:_,ipcOutput:z,pipedFrom:[]}),TH=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0)),jD=(Z,X)=>{let q=Z===null?void 0:Z,Q=X===null?void 0:X,J=Q===void 0?void 0:Y8(X);return{exitCode:q,signal:Q,signalDescription:J}};var S2=B(()=>{w2();t4();g1();AH()});function OD(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(jH(Z*1000)%1000),nanoseconds:Math.trunc(jH(Z*1e6)%1000)}}function ID(Z){return{days:Z/86400000n,hours:Z/3600000n%24n,minutes:Z/60000n%60n,seconds:Z/1000n%60n,milliseconds:Z%1000n,microseconds:0n,nanoseconds:0n}}function ZZ(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return OD(Z);break}case"bigint":return ID(Z)}throw TypeError("Expected a finite number or bigint")}var jH=(Z)=>Number.isFinite(Z)?Z:0;var OH=()=>{};function XZ(Z,X){let q=typeof Z==="bigint";if(!q&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");X={...X};let Q=Z<0?"-":"";if(Z=Z<0?-Z:Z,X.colonNotation)X.compact=!1,X.formatSubMilliseconds=!1,X.separateMilliseconds=!1,X.verbose=!1;if(X.compact)X.unitCount=1,X.secondsDecimalDigits=0,X.millisecondsDecimalDigits=0;let J=[],$=(G,V)=>{let _=Math.floor(G*10**V+ND);return(Math.round(_)/10**V).toFixed(V)},Y=(G,V,_,L)=>{if((J.length===0||!X.colonNotation)&&wD(G)&&!(X.colonNotation&&_==="m"))return;if(L??=String(G),X.colonNotation){let z=L.includes(".")?L.split(".")[0].length:L.length,R=J.length>0?2:1;L="0".repeat(Math.max(0,R-z))+L}else L+=X.verbose?" "+kD(V,G):_;J.push(L)},H=ZZ(Z),U=BigInt(H.days);if(X.hideYearAndDays)Y(BigInt(U)*24n+BigInt(H.hours),"hour","h");else{if(X.hideYear)Y(U,"day","d");else Y(U/365n,"year","y"),Y(U%365n,"day","d");Y(Number(H.hours),"hour","h")}if(Y(Number(H.minutes),"minute","m"),!X.hideSeconds)if(X.separateMilliseconds||X.formatSubMilliseconds||!X.colonNotation&&Z<1000&&!X.subSecondsAsDecimals){let G=Number(H.seconds),V=Number(H.milliseconds),_=Number(H.microseconds),L=Number(H.nanoseconds);if(Y(G,"second","s"),X.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(_,"microsecond","µs"),Y(L,"nanosecond","ns");else{let z=V+_/1000+L/1e6,R=typeof X.millisecondsDecimalDigits==="number"?X.millisecondsDecimalDigits:0,D=z>=1?Math.round(z):Math.ceil(z),M=R?z.toFixed(R):D;Y(Number.parseFloat(M),"millisecond","ms",M)}}else{let G=(q?Number(Z%xD):Z)/1000%60,V=typeof X.secondsDecimalDigits==="number"?X.secondsDecimalDigits:1,_=$(G,V),L=X.keepDecimalsOnWholeSeconds?_:_.replace(/\.0+$/,"");Y(Number.parseFloat(L),"second","s",L)}if(J.length===0)return Q+"0"+(X.verbose?" milliseconds":"ms");let W=X.colonNotation?":":" ";if(typeof X.unitCount==="number")J=J.slice(0,Math.max(X.unitCount,1));return Q+J.join(W)}var wD=(Z)=>Z===0||Z===0n,kD=(Z,X)=>X===1||X===1n?Z:`${Z}s`,ND=0.0000001,xD;var IH=B(()=>{OH();xD=24n*60n*60n*1000n});var wH=(Z,X)=>{if(Z.failed)i0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:X,result:Z})};var kH=B(()=>{k6()});var NH=(Z,X)=>{if(!I6(X))return;wH(Z,X),PD(Z,X)},PD=(Z,X)=>{let q=`(done in ${XZ(Z.durationMs)})`;i0({type:"duration",verboseMessage:q,verboseInfo:X,result:Z})};var xH=B(()=>{IH();A1();k6();kH()});var b6=(Z,X,{reject:q})=>{if(NH(Z,X),Z.failed&&q)throw Z;return Z};var m8=B(()=>{xH()});var vH=(Z,X)=>{if(l1(Z))return"asyncGenerator";if(SH(Z))return"generator";if(u8(Z))return"fileUrl";if(SD(Z))return"filePath";if(fD(Z))return"webStream";if(h0(Z,{checkOpen:!1}))return"native";if(q0(Z))return"uint8Array";if(gD(Z))return"asyncIterable";if(mD(Z))return"iterable";if(JZ(Z))return yH({transform:Z},X);if(CD(Z))return ED(Z,X);return"native"},ED=(Z,X)=>{if(s3(Z.transform,{checkOpen:!1}))return vD(Z,X);if(JZ(Z.transform))return yH(Z,X);return yD(Z,X)},vD=(Z,X)=>{return CH(Z,X,"Duplex stream"),"duplex"},yH=(Z,X)=>{return CH(Z,X,"web TransformStream"),"webTransform"},CH=({final:Z,binary:X,objectMode:q},Q,J)=>{PH(Z,`${Q}.final`,J),PH(X,`${Q}.binary`,J),qZ(q,`${Q}.objectMode`)},PH=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${X}\` option can only be defined when using a generator, not a ${q}.`)},yD=({transform:Z,final:X,binary:q,objectMode:Q},J)=>{if(Z!==void 0&&!EH(Z))throw TypeError(`The \`${J}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(s3(X,{checkOpen:!1}))throw TypeError(`The \`${J}.final\` option must not be a Duplex stream.`);if(JZ(X))throw TypeError(`The \`${J}.final\` option must not be a web TransformStream.`);if(X!==void 0&&!EH(X))throw TypeError(`The \`${J}.final\` option must be a generator.`);return qZ(q,`${J}.binary`),qZ(Q,`${J}.objectMode`),l1(Z)||l1(X)?"asyncGenerator":"generator"},qZ=(Z,X)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${X}\` option must use a boolean.`)},EH=(Z)=>l1(Z)||SH(Z),l1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",SH=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",CD=(Z)=>t(Z)&&(Z.transform!==void 0||Z.final!==void 0),u8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",bH=(Z)=>u8(Z)&&Z.protocol!=="file:",SD=(Z)=>t(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>bD.has(X))&&QZ(Z.file),bD,QZ=(Z)=>typeof Z==="string",hH=(Z,X)=>Z==="native"&&typeof X==="string"&&!hD.has(X),hD,fH=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",p8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",fD=(Z)=>fH(Z)||p8(Z),JZ=(Z)=>fH(Z?.readable)&&p8(Z?.writable),gD=(Z)=>gH(Z)&&typeof Z[Symbol.asyncIterator]==="function",mD=(Z)=>gH(Z)&&typeof Z[Symbol.iterator]==="function",gH=(Z)=>typeof Z==="object"&&Z!==null,w0,d8,$Z,mH,uH,I1;var R0=B(()=>{d1();Q1();A0();bD=new Set(["file","append"]),hD=new Set(["ipc","ignore","inherit","overlapped","pipe"]),w0=new Set(["generator","asyncGenerator","duplex","webTransform"]),d8=new Set(["fileUrl","filePath","fileNumber"]),$Z=new Set(["fileUrl","filePath"]),mH=new Set([...$Z,"webStream","nodeStream"]),uH=new Set(["webTransform","duplex"]),I1={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"}});var YZ=(Z,X,q,Q)=>Q==="output"?uD(Z,X,q):pD(Z,X,q),uD=(Z,X,q)=>{let Q=X!==0&&q[X-1].value.readableObjectMode;return{writableObjectMode:Q,readableObjectMode:Z??Q}},pD=(Z,X,q)=>{let Q=X===0?Z===!0:q[X-1].value.readableObjectMode,J=X!==q.length-1&&(Z??Q);return{writableObjectMode:Q,readableObjectMode:J}},pH=(Z,X)=>{let q=Z.findLast(({type:Q})=>w0.has(Q));if(q===void 0)return!1;return X==="input"?q.value.writableObjectMode:q.value.readableObjectMode};var HZ=B(()=>{R0()});var dH=(Z,X,q,Q)=>[...Z.filter(({type:J})=>!w0.has(J)),...dD(Z,X,q,Q)],dD=(Z,X,q,{encoding:Q})=>{let J=Z.filter(({type:Y})=>w0.has(Y)),$=Array.from({length:J.length});for(let[Y,H]of Object.entries(J))$[Y]=cD({stdioItem:H,index:Number(Y),newTransforms:$,optionName:X,direction:q,encoding:Q});return aD($,q)},cD=({stdioItem:Z,stdioItem:{type:X},index:q,newTransforms:Q,optionName:J,direction:$,encoding:Y})=>{if(X==="duplex")return lD({stdioItem:Z,optionName:J});if(X==="webTransform")return nD({stdioItem:Z,index:q,newTransforms:Q,direction:$});return iD({stdioItem:Z,index:q,newTransforms:Q,direction:$,encoding:Y})},lD=({stdioItem:Z,stdioItem:{value:{transform:X,transform:{writableObjectMode:q,readableObjectMode:Q},objectMode:J=Q}},optionName:$})=>{if(J&&!Q)throw TypeError(`The \`${$}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!J&&Q)throw TypeError(`The \`${$}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:X,writableObjectMode:q,readableObjectMode:Q}}},nD=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:J})=>{let{transform:$,objectMode:Y}=t(X)?X:{transform:X},{writableObjectMode:H,readableObjectMode:U}=YZ(Y,q,Q,J);return{...Z,value:{transform:$,writableObjectMode:H,readableObjectMode:U}}},iD=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:J,encoding:$})=>{let{transform:Y,final:H,binary:U=!1,preserveNewlines:W=!1,objectMode:G}=t(X)?X:{transform:X},V=U||T0.has($),{writableObjectMode:_,readableObjectMode:L}=YZ(G,q,Q,J);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:W,writableObjectMode:_,readableObjectMode:L}}},aD=(Z,X)=>X==="input"?Z.reverse():Z;var cH=B(()=>{Q1();u1();R0();HZ()});import KZ from"node:process";var lH=(Z,X,q)=>{let Q=Z.map((J)=>oD(J,X));if(Q.includes("input")&&Q.includes("output"))throw TypeError(`The \`${q}\` option must not be an array of both readable and writable values.`);return Q.find(Boolean)??tD},oD=({type:Z,value:X},q)=>sD[q]??nH[Z](X),sD,h6=()=>{return},UZ=()=>"input",nH,rD=(Z)=>{if([0,KZ.stdin].includes(Z))return"input";if([1,2,KZ.stdout,KZ.stderr].includes(Z))return"output"},tD="output";var iH=B(()=>{d1();R0();sD=["input","output","output"],nH={generator:h6,asyncGenerator:h6,fileUrl:h6,filePath:h6,iterable:UZ,asyncIterable:UZ,uint8Array:UZ,webStream:(Z)=>p8(Z)?"output":"input",nodeStream(Z){if(!p1(Z,{checkOpen:!1}))return"output";return o3(Z,{checkOpen:!1})?void 0:"input"},webTransform:h6,duplex:h6,native(Z){let X=rD(Z);if(X!==void 0)return X;if(h0(Z,{checkOpen:!1}))return nH.nodeStream(Z)}}});var aH=(Z,X)=>X&&!Z.includes("ipc")?[...Z,"ipc"]:Z;var oH=()=>{};var sH=({stdio:Z,ipc:X,buffer:q,...Q},J,$)=>{let Y=eD(Z,Q).map((H,U)=>rH(H,U));return $?XA(Y,q,J):aH(Y,X)},eD=(Z,X)=>{if(Z===void 0)return I0.map((Q)=>X[Q]);if(ZA(X))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${I0.map((Q)=>`\`${Q}\``).join(", ")}`);if(typeof Z==="string")return[Z,Z,Z];if(!Array.isArray(Z))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof Z}\``);let q=Math.max(Z.length,I0.length);return Array.from({length:q},(Q,J)=>Z[J])},ZA=(Z)=>I0.some((X)=>Z[X]!==void 0),rH=(Z,X)=>{if(Array.isArray(Z))return Z.map((q)=>rH(q,X));if(Z===null||Z===void 0)return X>=I0.length?"ignore":"pipe";return Z},XA=(Z,X,q)=>Z.map((Q,J)=>!X[J]&&J!==0&&!w6(q,J)&&qA(Q)?"ignore":Q),qA=(Z)=>Z==="pipe"||Array.isArray(Z)&&Z.every((X)=>X==="pipe");var tH=B(()=>{$1();oH();A1()});import{readFileSync as QA}from"node:fs";import JA from"node:tty";var ZK=({stdioItem:Z,stdioItem:{type:X},isStdioArray:q,fdNumber:Q,direction:J,isSync:$})=>{if(!q||X!=="native")return Z;return $?$A({stdioItem:Z,fdNumber:Q,direction:J}):KA({stdioItem:Z,fdNumber:Q})},$A=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q,direction:J})=>{let $=YA({value:X,optionName:q,fdNumber:Q,direction:J});if($!==void 0)return $;if(h0(X,{checkOpen:!1}))throw TypeError(`The \`${q}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},YA=({value:Z,optionName:X,fdNumber:q,direction:Q})=>{let J=HA(Z,q);if(J===void 0)return;if(Q==="output")return{type:"fileNumber",value:J,optionName:X};if(JA.isatty(J))throw TypeError(`The \`${X}: ${G8(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:J1(QA(J)),optionName:X}},HA=(Z,X)=>{if(Z==="inherit")return X;if(typeof Z==="number")return Z;let q=p4.indexOf(Z);if(q!==-1)return q},KA=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q})=>{if(X==="inherit")return{type:"nodeStream",value:eH(Q,X,q),optionName:q};if(typeof X==="number")return{type:"nodeStream",value:eH(X,X,q),optionName:q};if(h0(X,{checkOpen:!1}))return{type:"nodeStream",value:X,optionName:q};return Z},eH=(Z,X,q)=>{let Q=p4[Z];if(Q===void 0)throw TypeError(`The \`${q}: ${X}\` option is invalid: no such standard stream.`);return Q};var XK=B(()=>{d1();$1();A0();j1()});var qK=({input:Z,inputFile:X},q)=>q===0?[...UA(Z),...WA(X)]:[],UA=(Z)=>Z===void 0?[]:[{type:GA(Z),value:Z,optionName:"input"}],GA=(Z)=>{if(p1(Z,{checkOpen:!1}))return"nodeStream";if(typeof Z==="string")return"string";if(q0(Z))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},WA=(Z)=>Z===void 0?[]:[{...VA(Z),optionName:"inputFile"}],VA=(Z)=>{if(u8(Z))return{type:"fileUrl",value:Z};if(QZ(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var QK=B(()=>{d1();A0();R0()});var JK=(Z)=>Z.filter((X,q)=>Z.every((Q,J)=>X.value!==Q.value||q>=J||X.type==="generator"||X.type==="asyncGenerator")),$K=({stdioItem:{type:Z,value:X,optionName:q},direction:Q,fileDescriptors:J,isSync:$})=>{let Y=BA(J,Z);if(Y.length===0)return;if($){LA({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});return}if(mH.has(Z))return YK({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});if(uH.has(Z))zA({otherStdioItems:Y,type:Z,value:X,optionName:q})},BA=(Z,X)=>Z.flatMap(({direction:q,stdioItems:Q})=>Q.filter((J)=>J.type===X).map((J)=>({...J,direction:q}))),LA=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:J})=>{if($Z.has(X))YK({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:J})},YK=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:J})=>{let $=Z.filter((H)=>_A(H,q));if($.length===0)return;let Y=$.find((H)=>H.direction!==J);return HK(Y,Q,X),J==="output"?$[0].stream:void 0},_A=({type:Z,value:X},q)=>{if(Z==="filePath")return X.file===q.file;if(Z==="fileUrl")return X.href===q.href;return X===q},zA=({otherStdioItems:Z,type:X,value:q,optionName:Q})=>{let J=Z.find(({value:{transform:$}})=>$===q.transform);HK(J,Q,X)},HK=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${X}\` options must not target ${I1[q]} that is the same.`)};var KK=B(()=>{R0()});var c8=(Z,X,q,Q)=>{let $=sH(X,q,Q).map((H,U)=>RA({stdioOption:H,fdNumber:U,options:X,isSync:Q})),Y=IA({initialFileDescriptors:$,addProperties:Z,options:X,isSync:Q});return X.stdio=Y.map(({stdioItems:H})=>NA(H)),Y},RA=({stdioOption:Z,fdNumber:X,options:q,isSync:Q})=>{let J=d4(X),{stdioItems:$,isStdioArray:Y}=MA({stdioOption:Z,fdNumber:X,options:q,optionName:J}),H=lH($,X,J),U=$.map((V)=>ZK({stdioItem:V,isStdioArray:Y,fdNumber:X,direction:H,isSync:Q})),W=dH(U,J,H,q),G=pH(W,H);return OA(W,G),{direction:H,objectMode:G,stdioItems:W}},MA=({stdioOption:Z,fdNumber:X,options:q,optionName:Q})=>{let $=[...(Array.isArray(Z)?Z:[Z]).map((U)=>FA(U,Q)),...qK(q,X)],Y=JK($),H=Y.length>1;return DA(Y,H,Q),TA(Y),{stdioItems:Y,isStdioArray:H}},FA=(Z,X)=>({type:vH(Z,X),value:Z,optionName:X}),DA=(Z,X,q)=>{if(Z.length===0)throw TypeError(`The \`${q}\` option must not be an empty array.`);if(!X)return;for(let{value:Q,optionName:J}of Z)if(AA.has(Q))throw Error(`The \`${J}\` option must not include \`${Q}\`.`)},AA,TA=(Z)=>{for(let X of Z)jA(X)},jA=({type:Z,value:X,optionName:q})=>{if(bH(X))throw TypeError(`The \`${q}: URL\` option must use the \`file:\` scheme.
|
|
70
|
+
For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(hH(Z,X))throw TypeError(`The \`${q}: { file: '...' }\` option must be used instead of \`${q}: '...'\`.`)},OA=(Z,X)=>{if(!X)return;let q=Z.find(({type:Q})=>d8.has(Q));if(q!==void 0)throw TypeError(`The \`${q.optionName}\` option cannot use both files and transforms in objectMode.`)},IA=({initialFileDescriptors:Z,addProperties:X,options:q,isSync:Q})=>{let J=[];try{for(let $ of Z)J.push(wA({fileDescriptor:$,fileDescriptors:J,addProperties:X,options:q,isSync:Q}));return J}catch($){throw GZ(J),$}},wA=({fileDescriptor:{direction:Z,objectMode:X,stdioItems:q},fileDescriptors:Q,addProperties:J,options:$,isSync:Y})=>{let H=q.map((U)=>kA({stdioItem:U,addProperties:J,direction:Z,options:$,fileDescriptors:Q,isSync:Y}));return{direction:Z,objectMode:X,stdioItems:H}},kA=({stdioItem:Z,addProperties:X,direction:q,options:Q,fileDescriptors:J,isSync:$})=>{let Y=$K({stdioItem:Z,direction:q,fileDescriptors:J,isSync:$});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...X[q][Z.type](Z,Q)}},GZ=(Z)=>{for(let{stdioItems:X}of Z)for(let{stream:q}of X)if(q!==void 0&&!S0(q))q.destroy()},NA=(Z)=>{if(Z.length>1)return Z.some(({value:Q})=>Q==="overlapped")?"overlapped":"pipe";let[{type:X,value:q}]=Z;return X==="native"?q:"pipe"};var l8=B(()=>{$1();cH();HZ();R0();iH();tH();XK();QK();KK();AA=new Set(["ignore","ipc"])});import{readFileSync as UK}from"node:fs";var WK=(Z,X)=>c8(PA,Z,X,!0),r0=({type:Z,optionName:X})=>{VK(X,I1[Z])},xA=({optionName:Z,value:X})=>{if(X==="ipc"||X==="overlapped")VK(Z,`"${X}"`);return{}},VK=(Z,X)=>{throw TypeError(`The \`${Z}\` option cannot be ${X} with synchronous methods.`)},GK,PA;var BK=B(()=>{A0();l8();R0();GK={generator(){},asyncGenerator:r0,webStream:r0,nodeStream:r0,webTransform:r0,duplex:r0,asyncIterable:r0,native:xA},PA={input:{...GK,fileUrl:({value:Z})=>({contents:[J1(UK(Z))]}),filePath:({value:{file:Z}})=>({contents:[J1(UK(Z))]}),fileNumber:r0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...GK,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:X}})=>({path:Z,append:X}),fileNumber:({value:Z})=>({path:Z}),iterable:r0,string:r0,uint8Array:r0}}});var G1=(Z,{stripFinalNewline:X},q)=>WZ(X,q)&&Z!==void 0&&!Array.isArray(Z)?y6(Z):Z,WZ=(Z,X)=>X==="all"?Z[1]||Z[2]:Z[X];var b2=B(()=>{a3()});var n8=(Z,X,q,Q)=>Z||q?void 0:_K(X,Q),BZ=(Z,X,q)=>q?Z.flatMap((Q)=>LK(Q,X)):LK(Z,X),LK=(Z,X)=>{let{transform:q,final:Q}=_K(X,{});return[...q(Z),...Q()]},_K=(Z,X)=>{return X.previousChunks="",{transform:EA.bind(void 0,X,Z),final:yA.bind(void 0,X)}},EA=function*(Z,X,q){if(typeof q!=="string"){yield q;return}let{previousChunks:Q}=Z,J=-1;for(let $=0;$<q.length;$+=1)if(q[$]===`
|
|
71
|
+
`){let Y=vA(q,$,X,Z),H=q.slice(J+1,$+1-Y);if(Q.length>0)H=VZ(Q,H),Q="";yield H,J=$}if(J!==q.length-1)Q=VZ(Q,q.slice(J+1));Z.previousChunks=Q},vA=(Z,X,q,Q)=>{if(q)return 0;return Q.isWindowsNewline=X!==0&&Z[X-1]==="\r",Q.isWindowsNewline?2:1},yA=function*({previousChunks:Z}){if(Z.length>0)yield Z},zK=({binary:Z,preserveNewlines:X,readableObjectMode:q,state:Q})=>Z||X||q?void 0:{transform:CA.bind(void 0,Q)},CA=function*({isWindowsNewline:Z=!1},X){let{unixNewline:q,windowsNewline:Q,LF:J,concatBytes:$}=typeof X==="string"?SA:hA;if(X.at(-1)===J){yield X;return}yield $(X,Z?Q:q)},VZ=(Z,X)=>`${Z}${X}`,SA,bA=(Z,X)=>{let q=new Uint8Array(Z.length+X.length);return q.set(Z,0),q.set(X,Z.length),q},hA;var i8=B(()=>{SA={windowsNewline:`\r
|
|
72
|
+
`,unixNewline:`
|
|
73
|
+
`,LF:`
|
|
74
|
+
`,concatBytes:VZ},hA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:bA}});import{Buffer as fA}from"node:buffer";var RK=(Z,X)=>Z?void 0:gA.bind(void 0,X),gA=function*(Z,X){if(typeof X!=="string"&&!q0(X)&&!fA.isBuffer(X))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof X}.`);yield X},MK=(Z,X)=>Z?mA.bind(void 0,X):uA.bind(void 0,X),mA=function*(Z,X){FK(Z,X),yield X},uA=function*(Z,X){if(FK(Z,X),typeof X!=="string"&&!q0(X))throw TypeError(`The \`${Z}\` option's function must yield a string or an Uint8Array, not ${typeof X}.`);yield X},FK=(Z,X)=>{if(X===null||X===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${X}\`.
|
|
75
|
+
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
76
|
+
if (condition) { yield value; }`)};var DK=B(()=>{A0()});import{Buffer as pA}from"node:buffer";import{StringDecoder as dA}from"node:string_decoder";var a8=(Z,X,q)=>{if(q)return;if(Z)return{transform:cA.bind(void 0,new TextEncoder)};let Q=new dA(X);return{transform:lA.bind(void 0,Q),final:nA.bind(void 0,Q)}},cA=function*(Z,X){if(pA.isBuffer(X))yield J1(X);else if(typeof X==="string")yield Z.encode(X);else yield X},lA=function*(Z,X){yield q0(X)?Z.write(X):X},nA=function*(Z){let X=Z.end();if(X!=="")yield X};var LZ=B(()=>{A0()});import{callbackify as AK}from"node:util";var _Z,o8=async function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=aA}=X[q];for await(let J of Q(Z))yield*o8(J,X,q+1)},TK=async function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*iA(q,Number(X),Z)},iA=async function*(Z,X,q){if(Z===void 0)return;for await(let Q of Z())yield*o8(Q,q,X+1)},jK,aA=function*(Z){yield Z};var OK=B(()=>{_Z=AK(async(Z,X,q,Q)=>{X.currentIterable=Z(...q);try{for await(let J of X.currentIterable)Q.push(J)}finally{delete X.currentIterable}}),jK=AK(async({currentIterable:Z},X)=>{if(Z!==void 0){await(X?Z.throw(X):Z.return());return}if(X)throw X})});var zZ=(Z,X,q,Q)=>{try{for(let J of Z(...X))q.push(J);Q()}catch(J){Q(J)}},IK=(Z,X)=>[...X.flatMap((q)=>[...n1(q,Z,0)]),...h2(Z)],n1=function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=sA}=X[q];for(let J of Q(Z))yield*n1(J,X,q+1)},h2=function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*oA(q,Number(X),Z)},oA=function*(Z,X,q){if(Z===void 0)return;for(let Q of Z())yield*n1(Q,q,X+1)},sA=function*(Z){yield Z};var RZ=()=>{};import{Transform as rA,getDefaultHighWaterMark as wK}from"node:stream";var MZ=({value:Z,value:{transform:X,final:q,writableObjectMode:Q,readableObjectMode:J},optionName:$},{encoding:Y})=>{let H={},U=kK(Z,Y,$),W=l1(X),G=l1(q),V=W?_Z.bind(void 0,o8,H):zZ.bind(void 0,n1),_=W||G?_Z.bind(void 0,TK,H):zZ.bind(void 0,h2),L=W||G?jK.bind(void 0,H):void 0;return{stream:new rA({writableObjectMode:Q,writableHighWaterMark:wK(Q),readableObjectMode:J,readableHighWaterMark:wK(J),transform(R,D,M){V([R,U,0],this,M)},flush(R){_([U],this,R)},destroy:L})}},s8=(Z,X,q,Q)=>{let J=X.filter(({type:Y})=>Y==="generator"),$=Q?J.reverse():J;for(let{value:Y,optionName:H}of $){let U=kK(Y,q,H);Z=IK(U,Z)}return Z},kK=({transform:Z,final:X,binary:q,writableObjectMode:Q,readableObjectMode:J,preserveNewlines:$},Y,H)=>{let U={};return[{transform:RK(Q,H)},a8(q,Y,Q),n8(q,$,Q,U),{transform:Z,final:X},{transform:MK(J,H)},zK({binary:q,preserveNewlines:$,readableObjectMode:J,state:U})].filter(Boolean)};var r8=B(()=>{R0();i8();DK();LZ();OK();RZ()});var NK=(Z,X)=>{for(let q of tA(Z))eA(Z,q,X)},tA=(Z)=>new Set(Object.entries(Z).filter(([,{direction:X}])=>X==="input").map(([X])=>Number(X))),eA=(Z,X,q)=>{let{stdioItems:Q}=Z[X],J=Q.filter(({contents:H})=>H!==void 0);if(J.length===0)return;if(X!==0){let[{type:H,optionName:U}]=J;throw TypeError(`Only the \`stdin\` option, not \`${U}\`, can be ${I1[H]} with synchronous methods.`)}let Y=J.map(({contents:H})=>H).map((H)=>ZT(H,Q));q.input=j2(Y)},ZT=(Z,X)=>{let q=s8(Z,X,"utf8",!0);return XT(q),j2(q)},XT=(Z)=>{let X=Z.find((q)=>typeof q!=="string"&&!q0(q));if(X!==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: ${X}.`)};var xK=B(()=>{r8();A0();R0()});var t8=({stdioItems:Z,encoding:X,verboseInfo:q,fdNumber:Q})=>Q!=="all"&&w6(q,Q)&&!T0.has(X)&&qT(Q)&&(Z.some(({type:J,value:$})=>J==="native"&&QT.has($))||Z.every(({type:J})=>w0.has(J))),qT=(Z)=>Z===1||Z===2,QT,PK=async(Z,X,q,Q)=>{for await(let J of Z)if(!JT(X))vK(J,q,Q)},EK=(Z,X,q)=>{for(let Q of Z)vK(Q,X,q)},JT=(Z)=>Z._readableState.pipes.length>0,vK=(Z,X,q)=>{let Q=s4(Z);i0({type:"output",verboseMessage:Q,fdNumber:X,verboseInfo:q})};var FZ=B(()=>{u1();R0();k6();A1();QT=new Set(["pipe","overlapped"])});import{writeFileSync as $T,appendFileSync as YT}from"node:fs";var yK=({fileDescriptors:Z,syncResult:{output:X},options:q,isMaxBuffer:Q,verboseInfo:J})=>{if(X===null)return{output:Array.from({length:3})};let $={},Y=new Set([]);return{output:X.map((U,W)=>HT({result:U,fileDescriptors:Z,fdNumber:W,state:$,outputFiles:Y,isMaxBuffer:Q,verboseInfo:J},q)),...$}},HT=({result:Z,fileDescriptors:X,fdNumber:q,state:Q,outputFiles:J,isMaxBuffer:$,verboseInfo:Y},{buffer:H,encoding:U,lines:W,stripFinalNewline:G,maxBuffer:V})=>{if(Z===null)return;let _=MH(Z,$,V),L=J1(_),{stdioItems:z,objectMode:R}=X[q],D=KT([L],z,U,Q),{serializedResult:M,finalResult:k=M}=UT({chunks:D,objectMode:R,encoding:U,lines:W,stripFinalNewline:G,fdNumber:q});GT({serializedResult:M,fdNumber:q,state:Q,verboseInfo:Y,encoding:U,stdioItems:z,objectMode:R});let F=H[q]?k:void 0;try{if(Q.error===void 0)WT(M,z,J);return F}catch(I){return Q.error=I,F}},KT=(Z,X,q,Q)=>{try{return s8(Z,X,q,!1)}catch(J){return Q.error=J,Z}},UT=({chunks:Z,objectMode:X,encoding:q,lines:Q,stripFinalNewline:J,fdNumber:$})=>{if(X)return{serializedResult:Z};if(q==="buffer")return{serializedResult:j2(Z)};let Y=o$(Z,q);if(Q[$])return{serializedResult:Y,finalResult:BZ(Y,!J[$],X)};return{serializedResult:Y}},GT=({serializedResult:Z,fdNumber:X,state:q,verboseInfo:Q,encoding:J,stdioItems:$,objectMode:Y})=>{if(!t8({stdioItems:$,encoding:J,verboseInfo:Q,fdNumber:X}))return;let H=BZ(Z,!1,Y);try{EK(H,X,Q)}catch(U){q.error??=U}},WT=(Z,X,q)=>{for(let{path:Q,append:J}of X.filter(({type:$})=>d8.has($))){let $=typeof Q==="string"?Q:Q.toString();if(J||q.has($))YT(Q,Z);else q.add($),$T(Q,Z)}};var CK=B(()=>{FZ();r8();i8();A0();R0();c1()});var SK=([,Z,X],q)=>{if(!q.all)return;if(Z===void 0)return X;if(X===void 0)return Z;if(Array.isArray(Z))return Array.isArray(X)?[...Z,...X]:[...Z,G1(X,q,"all")];if(Array.isArray(X))return[G1(Z,q,"all"),...X];if(q0(Z)&&q0(X))return R3([Z,X]);return`${Z}${X}`};var bK=B(()=>{A0();b2()});import{once as DZ}from"node:events";var hK=async(Z,X)=>{let[q,Q]=await VT(Z);return X.isForcefullyTerminated??=!1,[q,Q]},VT=async(Z)=>{let[X,q]=await Promise.allSettled([DZ(Z,"spawn"),DZ(Z,"exit")]);if(X.status==="rejected")return[];return q.status==="rejected"?fK(Z):q.value},fK=async(Z)=>{try{return await DZ(Z,"exit")}catch{return fK(Z)}},gK=async(Z)=>{let[X,q]=await Z;if(!BT(X,q)&&AZ(X,q))throw new a0;return[X,q]},BT=(Z,X)=>Z===void 0&&X===void 0,AZ=(Z,X)=>Z!==0||X!==null;var TZ=B(()=>{g1()});var mK=({error:Z,status:X,signal:q,output:Q},{maxBuffer:J})=>{let $=LT(Z,X,q),Y=$?.code==="ETIMEDOUT",H=RH($,Q,J);return{resultError:$,exitCode:X,signal:q,timedOut:Y,isMaxBuffer:H}},LT=(Z,X,q)=>{if(Z!==void 0)return Z;return AZ(X,q)?new a0:void 0};var uK=B(()=>{g1();c1();TZ()});import{spawnSync as _T}from"node:child_process";var pK=(Z,X,q)=>{let{file:Q,commandArguments:J,command:$,escapedCommand:Y,startTime:H,verboseInfo:U,options:W,fileDescriptors:G}=zT(Z,X,q),V=FT({file:Q,commandArguments:J,options:W,command:$,escapedCommand:Y,verboseInfo:U,fileDescriptors:G,startTime:H});return b6(V,U,W)},zT=(Z,X,q)=>{let{command:Q,escapedCommand:J,startTime:$,verboseInfo:Y}=e4(Z,X,q),H=RT(q),{file:U,commandArguments:W,options:G}=k8(Z,X,H);MT(G);let V=WK(G,Y);return{file:U,commandArguments:W,command:Q,escapedCommand:J,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},RT=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,MT=({ipc:Z,ipcInput:X,detached:q,cancelSignal:Q})=>{if(X)e8("ipcInput");if(Z)e8("ipc: true");if(q)e8("detached: true");if(Q)e8("cancelSignal")},e8=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},FT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:J,verboseInfo:$,fileDescriptors:Y,startTime:H})=>{let U=DT({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:J,fileDescriptors:Y,startTime:H});if(U.failed)return U;let{resultError:W,exitCode:G,signal:V,timedOut:_,isMaxBuffer:L}=mK(U,q),{output:z,error:R=W}=yK({fileDescriptors:Y,syncResult:U,options:q,isMaxBuffer:L,verboseInfo:$}),D=z.map((k,F)=>G1(k,q,F)),M=G1(SK(z,q),q,"all");return TT({error:R,exitCode:G,signal:V,timedOut:_,isMaxBuffer:L,stdio:D,all:M,options:q,command:Q,escapedCommand:J,startTime:H})},DT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:J,fileDescriptors:$,startTime:Y})=>{try{NK($,q);let H=AT(q);return _T(...N8(Z,X,H))}catch(H){return S6({error:H,command:Q,escapedCommand:J,fileDescriptors:$,options:q,startTime:Y,isSync:!0})}},AT=({encoding:Z,maxBuffer:X,...q})=>({...q,encoding:"buffer",maxBuffer:f8(X)}),TT=({error:Z,exitCode:X,signal:q,timedOut:Q,isMaxBuffer:J,stdio:$,all:Y,options:H,command:U,escapedCommand:W,startTime:G})=>Z===void 0?g8({command:U,escapedCommand:W,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G}):C2({error:Z,command:U,escapedCommand:W,timedOut:Q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:J,isForcefullyTerminated:!1,exitCode:X,signal:q,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G,isSync:!0});var dK=B(()=>{I3();n3();i3();S2();m8();BK();b2();xK();CK();c1();bK();uK()});import{once as jZ,on as jT}from"node:events";var cK=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},{reference:J=!0,filter:$}={})=>{return N6({methodName:"getOneMessage",isSubprocess:q,ipc:Q,isConnected:D8(Z)}),OT({anyProcess:Z,channel:X,isSubprocess:q,filter:$,reference:J})},OT=async({anyProcess:Z,channel:X,isSubprocess:q,filter:Q,reference:J})=>{B8(X,J);let $=O1(Z,X,q),Y=new AbortController;try{return await Promise.race([IT($,Q,Y),wT($,q,Y),kT($,q,Y)])}catch(H){throw x6(Z),H}finally{Y.abort(),L8(X,J)}},IT=async(Z,X,{signal:q})=>{if(X===void 0){let[Q]=await jZ(Z,"message",{signal:q});return Q}for await(let[Q]of jT(Z,"message",{signal:q}))if(X(Q))return Q},wT=async(Z,X,{signal:q})=>{await jZ(Z,"disconnect",{signal:q}),ZY(X)},kT=async(Z,X,{signal:q})=>{let[Q]=await jZ(Z,"strict:error",{signal:q});throw U8(Q,X)};var lK=B(()=>{P6();x2();N2()});import{once as iK,on as NT}from"node:events";var aK=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},{reference:J=!0}={})=>OZ({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q,shouldAwait:!q,reference:J}),OZ=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q,shouldAwait:J,reference:$})=>{N6({methodName:"getEachMessage",isSubprocess:q,ipc:Q,isConnected:D8(Z)}),B8(X,$);let Y=O1(Z,X,q),H=new AbortController,U={};return xT(Z,Y,H),PT({ipcEmitter:Y,isSubprocess:q,controller:H,state:U}),ET({anyProcess:Z,channel:X,ipcEmitter:Y,isSubprocess:q,shouldAwait:J,controller:H,state:U,reference:$})},xT=async(Z,X,q)=>{try{await iK(X,"disconnect",{signal:q.signal}),q.abort()}catch{}},PT=async({ipcEmitter:Z,isSubprocess:X,controller:q,state:Q})=>{try{let[J]=await iK(Z,"strict:error",{signal:q.signal});Q.error=U8(J,X),q.abort()}catch{}},ET=async function*({anyProcess:Z,channel:X,ipcEmitter:q,isSubprocess:Q,shouldAwait:J,controller:$,state:Y,reference:H}){try{for await(let[U]of NT(q,"message",{signal:$.signal}))nK(Y),yield U}catch{nK(Y)}finally{if($.abort(),L8(X,H),!Q)x6(Z);if(J)await Z}},nK=({error:Z})=>{if(Z)throw Z};var IZ=B(()=>{P6();x2();N2()});import oK from"node:process";var sK=(Z,{ipc:X})=>{Object.assign(Z,tK(Z,!1,X))},rK=()=>{let Z=oK,X=!0,q=oK.channel!==void 0;return{...tK(Z,!0,q),getCancelSignal:NY.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:q})}},tK=(Z,X,q)=>({sendMessage:O8.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getOneMessage:cK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getEachMessage:aK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q})});var wZ=B(()=>{I8();lK();IZ();M8()});import{ChildProcess as vT}from"node:child_process";import{PassThrough as yT,Readable as CT,Writable as ST,Duplex as bT}from"node:stream";var eK=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:J,startTime:$,verboseInfo:Y})=>{GZ(Q);let H=new vT;hT(H,Q),Object.assign(H,{readable:fT,writable:gT,duplex:mT});let U=S6({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:J,startTime:$,isSync:!1}),W=uT(U,Y,J);return{subprocess:H,promise:W}},hT=(Z,X)=>{let q=f2(),Q=f2(),J=f2(),$=Array.from({length:X.length-3},f2),Y=f2(),H=[q,Q,J,...$];Object.assign(Z,{stdin:q,stdout:Q,stderr:J,all:Y,stdio:H})},f2=()=>{let Z=new yT;return Z.end(),Z},fT=()=>new CT({read(){}}),gT=()=>new ST({write(){}}),mT=()=>new bT({read(){},write(){}}),uT=async(Z,X,q)=>b6(Z,X,q);var ZU=B(()=>{l8();S2();m8()});import{createReadStream as XU,createWriteStream as qU}from"node:fs";import{Buffer as pT}from"node:buffer";import{Readable as g2,Writable as dT,Duplex as cT}from"node:stream";var JU=(Z,X)=>c8(lT,Z,X,!1),m2=({type:Z,optionName:X})=>{throw TypeError(`The \`${X}\` option cannot be ${I1[Z]}.`)},QU,lT;var $U=B(()=>{r8();l8();R0();QU={fileNumber:m2,generator:MZ,asyncGenerator:MZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:X,readableObjectMode:q}}){let Q=X||q;return{stream:cT.fromWeb(Z,{objectMode:Q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},lT={input:{...QU,fileUrl:({value:Z})=>({stream:XU(Z)}),filePath:({value:{file:Z}})=>({stream:XU(Z)}),webStream:({value:Z})=>({stream:g2.fromWeb(Z)}),iterable:({value:Z})=>({stream:g2.from(Z)}),asyncIterable:({value:Z})=>({stream:g2.from(Z)}),string:({value:Z})=>({stream:g2.from(Z)}),uint8Array:({value:Z})=>({stream:g2.from(pT.from(Z))})},output:{...QU,fileUrl:({value:Z})=>({stream:qU(Z)}),filePath:({value:{file:Z,append:X}})=>({stream:qU(Z,X?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:dT.fromWeb(Z)}),iterable:m2,asyncIterable:m2,string:m2,uint8Array:m2}}});import{on as nT,once as YU}from"node:events";import{PassThrough as iT,getDefaultHighWaterMark as aT}from"node:stream";import{finished as UU}from"node:stream/promises";function i1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let J of Z)kZ(J);let X=Z.some(({readableObjectMode:J})=>J),q=oT(Z,X),Q=new GU({objectMode:X,writableHighWaterMark:q,readableHighWaterMark:q});for(let J of Z)Q.add(J);return Q}var oT=(Z,X)=>{if(Z.length===0)return aT(X);let q=Z.filter(({readableObjectMode:Q})=>Q===X).map(({readableHighWaterMark:Q})=>Q);return Math.max(...q)},GU,sT=async(Z,X,q)=>{Z5(Z,HU);let Q=new AbortController;try{await Promise.race([rT(Z,Q),tT(Z,X,q,Q)])}finally{Q.abort(),Z5(Z,-HU)}},rT=async(Z,{signal:X})=>{try{await UU(Z,{signal:X,cleanup:!0})}catch(q){throw WU(Z,q),q}},tT=async(Z,X,q,{signal:Q})=>{for await(let[J]of nT(Z,"unpipe",{signal:Q}))if(X.has(J))J.emit(q)},kZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},eT=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:J,onFinished:$,unpipeEvent:Y})=>{Z5(Z,KU);let H=new AbortController;try{await Promise.race([Zj($,X,H),Xj({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:J,controller:H}),qj({stream:X,streams:q,ended:Q,aborted:J,unpipeEvent:Y,controller:H})])}finally{H.abort(),Z5(Z,-KU)}if(q.size>0&&q.size===Q.size+J.size)if(Q.size===0&&J.size>0)NZ(Z);else Qj(Z)},Zj=async(Z,X,{signal:q})=>{try{if(await Z,!q.aborted)NZ(X)}catch(Q){if(!q.aborted)WU(X,Q)}},Xj=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:J,controller:{signal:$}})=>{try{if(await UU(X,{signal:$,cleanup:!0,readable:!0,writable:!1}),q.has(X))Q.add(X)}catch(Y){if($.aborted||!q.has(X))return;if(VU(Y))J.add(X);else BU(Z,Y)}},qj=async({stream:Z,streams:X,ended:q,aborted:Q,unpipeEvent:J,controller:{signal:$}})=>{if(await YU(Z,J,{signal:$}),!Z.readable)return YU($,"abort",{signal:$});X.delete(Z),q.delete(Z),Q.delete(Z)},Qj=(Z)=>{if(Z.writable)Z.end()},WU=(Z,X)=>{if(VU(X))NZ(Z);else BU(Z,X)},VU=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",NZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},BU=(Z,X)=>{if(!Z.destroyed)Z.once("error",Jj),Z.destroy(X)},Jj=()=>{},Z5=(Z,X)=>{let q=Z.getMaxListeners();if(q!==0&&q!==Number.POSITIVE_INFINITY)Z.setMaxListeners(q+X)},HU=2,KU=1;var X5=B(()=>{GU=class GU extends iT{#q=new Set([]);#Q=new Set([]);#X=new Set([]);#Y;#K=Symbol("unpipe");#V=new WeakMap;add(Z){if(kZ(Z),this.#q.has(Z))return;this.#q.add(Z),this.#Y??=sT(this,this.#q,this.#K);let X=eT({passThroughStream:this,stream:Z,streams:this.#q,ended:this.#Q,aborted:this.#X,onFinished:this.#Y,unpipeEvent:this.#K});this.#V.set(Z,X),Z.pipe(this,{end:!1})}async remove(Z){if(kZ(Z),!this.#q.has(Z))return!1;let X=this.#V.get(Z);if(X===void 0)return!1;return this.#V.delete(Z),Z.unpipe(this),await X,!0}}});import{finished as LU}from"node:stream/promises";var f6=(Z,X)=>{Z.pipe(X),$j(Z,X),Yj(Z,X)},$j=async(Z,X)=>{if(S0(Z)||S0(X))return;try{await LU(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}xZ(X)},xZ=(Z)=>{if(Z.writable)Z.end()},Yj=async(Z,X)=>{if(S0(Z)||S0(X))return;try{await LU(X,{cleanup:!0,readable:!1,writable:!0})}catch{}PZ(Z)},PZ=(Z)=>{if(Z.readable)Z.destroy()};var q5=B(()=>{$1()});var _U=(Z,X,q)=>{let Q=new Map;for(let[J,{stdioItems:$,direction:Y}]of Object.entries(X)){for(let{stream:H}of $.filter(({type:U})=>w0.has(U)))Hj(Z,H,Y,J);for(let{stream:H}of $.filter(({type:U})=>!w0.has(U)))Uj({subprocess:Z,stream:H,direction:Y,fdNumber:J,pipeGroups:Q,controller:q})}for(let[J,$]of Q.entries()){let Y=$.length===1?$[0]:i1($);f6(Y,J)}},Hj=(Z,X,q,Q)=>{if(q==="output")f6(Z.stdio[Q],X);else f6(X,Z.stdio[Q]);let J=Kj[Q];if(J!==void 0)Z[J]=X;Z.stdio[Q]=X},Kj,Uj=({subprocess:Z,stream:X,direction:q,fdNumber:Q,pipeGroups:J,controller:$})=>{if(X===void 0)return;Gj(X,$);let[Y,H]=q==="output"?[X,Z.stdio[Q]]:[Z.stdio[Q],X],U=J.get(Y)??[];J.set(Y,[...U,H])},Gj=(Z,{signal:X})=>{if(S0(Z))m1(Z,Wj,X)},Wj=2;var zU=B(()=>{X5();$1();V8();R0();q5();Kj=["stdin","stdout","stderr"]});var a1;var RU=B(()=>{a1=[];a1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")a1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")a1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class MU{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(vZ[EZ])return vZ[EZ];Vj(vZ,EZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,X){this.listeners[Z].push(X)}removeListener(Z,X){let q=this.listeners[Z],Q=q.indexOf(X);if(Q===-1)return;if(Q===0&&q.length===1)q.length=0;else q.splice(Q,1)}emit(Z,X,q){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let Q=!1;for(let J of this.listeners[Z])Q=J(X,q)===!0||Q;if(Z==="exit")Q=this.emit("afterExit",X,q)||Q;return Q}}class CZ{}var Q5=(Z)=>!!Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function",EZ,vZ,Vj,Bj=(Z)=>{return{onExit(X,q){return Z.onExit(X,q)},load(){return Z.load()},unload(){return Z.unload()}}},FU,DU,yZ,AU,Qp,Jp;var TU=B(()=>{RU();EZ=Symbol.for("signal-exit emitter"),vZ=globalThis,Vj=Object.defineProperty.bind(Object);FU=class FU extends CZ{onExit(){return()=>{}}load(){}unload(){}};DU=class DU extends CZ{#q=yZ.platform==="win32"?"SIGINT":"SIGHUP";#Q=new MU;#X;#Y;#K;#V={};#A=!1;constructor(Z){super();this.#X=Z,this.#V={};for(let X of a1)this.#V[X]=()=>{let q=this.#X.listeners(X),{count:Q}=this.#Q,J=Z;if(typeof J.__signal_exit_emitter__==="object"&&typeof J.__signal_exit_emitter__.count==="number")Q+=J.__signal_exit_emitter__.count;if(q.length===Q){this.unload();let $=this.#Q.emit("exit",null,X),Y=X==="SIGHUP"?this.#q:X;if(!$)Z.kill(Z.pid,Y)}};this.#K=Z.reallyExit,this.#Y=Z.emit}onExit(Z,X){if(!Q5(this.#X))return()=>{};if(this.#A===!1)this.load();let q=X?.alwaysLast?"afterExit":"exit";return this.#Q.on(q,Z),()=>{if(this.#Q.removeListener(q,Z),this.#Q.listeners.exit.length===0&&this.#Q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#A)return;this.#A=!0,this.#Q.count+=1;for(let Z of a1)try{let X=this.#V[Z];if(X)this.#X.on(Z,X)}catch(X){}this.#X.emit=(Z,...X)=>{return this.#H(Z,...X)},this.#X.reallyExit=(Z)=>{return this.#z(Z)}}unload(){if(!this.#A)return;this.#A=!1,a1.forEach((Z)=>{let X=this.#V[Z];if(!X)throw Error("Listener not defined for signal: "+Z);try{this.#X.removeListener(Z,X)}catch(q){}}),this.#X.emit=this.#Y,this.#X.reallyExit=this.#K,this.#Q.count-=1}#z(Z){if(!Q5(this.#X))return 0;return this.#X.exitCode=Z||0,this.#Q.emit("exit",this.#X.exitCode,null),this.#K.call(this.#X,this.#X.exitCode)}#H(Z,...X){let q=this.#Y;if(Z==="exit"&&Q5(this.#X)){if(typeof X[0]==="number")this.#X.exitCode=X[0];let Q=q.call(this.#X,Z,...X);return this.#Q.emit("exit",this.#X.exitCode,null),Q}else return q.call(this.#X,Z,...X)}};yZ=globalThis.process,{onExit:AU,load:Qp,unload:Jp}=Bj(Q5(yZ)?new DU(yZ):new FU)});import{addAbortListener as Lj}from"node:events";var jU=(Z,{cleanup:X,detached:q},{signal:Q})=>{if(!X||q)return;let J=AU(()=>{Z.kill()});Lj(Q,()=>{J()})};var OU=B(()=>{TU()});var wU=({source:Z,sourcePromise:X,boundOptions:q,createNested:Q},...J)=>{let $=r4(),{destination:Y,destinationStream:H,destinationError:U,from:W,unpipeSignal:G}=_j(q,Q,J),{sourceStream:V,sourceError:_}=Rj(Z,W),{options:L,fileDescriptors:z}=s0.get(Z);return{sourcePromise:X,sourceStream:V,sourceOptions:L,sourceError:_,destination:Y,destinationStream:H,destinationError:U,unpipeSignal:G,fileDescriptors:z,startTime:$}},_j=(Z,X,q)=>{try{let{destination:Q,pipeOptions:{from:J,to:$,unpipeSignal:Y}={}}=zj(Z,X,...q),H=W8(Q,$);return{destination:Q,destinationStream:H,from:J,unpipeSignal:Y}}catch(Q){return{destinationError:Q}}},zj=(Z,X,q,...Q)=>{if(Array.isArray(q))return{destination:X(IU,Z)(q,...Q),pipeOptions:Z};if(typeof q==="string"||q instanceof URL||L3(q)){if(Object.keys(Z).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[J,$,Y]=m4(q,...Q);return{destination:X(IU)(J,$,Y),pipeOptions:Y}}if(s0.has(q)){if(Object.keys(Z).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:q,pipeOptions:Q[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${q}`)},IU=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),Rj=(Z,X)=>{try{return{sourceStream:v6(Z,X)}}catch(q){return{sourceError:q}}};var kU=B(()=>{z3();t4();j1();O6()});var xU=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q,fileDescriptors:J,sourceOptions:$,startTime:Y})=>{let H=Mj({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q});if(H!==void 0)throw SZ({error:H,fileDescriptors:J,sourceOptions:$,startTime:Y})},Mj=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q})=>{if(X!==void 0&&Q!==void 0)return Q;if(Q!==void 0)return PZ(Z),Q;if(X!==void 0)return xZ(q),X},SZ=({error:Z,fileDescriptors:X,sourceOptions:q,startTime:Q})=>S6({error:Z,command:NU,escapedCommand:NU,fileDescriptors:X,options:q,startTime:Q,isSync:!1}),NU="source.pipe(destination)";var bZ=B(()=>{S2();q5()});var PU=async(Z)=>{let[{status:X,reason:q,value:Q=q},{status:J,reason:$,value:Y=$}]=await Z;if(!Y.pipedFrom.includes(Q))Y.pipedFrom.push(Q);if(J==="rejected")throw Y;if(X==="rejected")throw Q;return Y};var EU=()=>{};import{finished as Fj}from"node:stream/promises";var vU=(Z,X,q)=>{let Q=J5.has(X)?Aj(Z,X):Dj(Z,X);return m1(Z,jj,q.signal),m1(X,Oj,q.signal),Tj(X),Q},Dj=(Z,X)=>{let q=i1([Z]);return f6(q,X),J5.set(X,q),q},Aj=(Z,X)=>{let q=J5.get(X);return q.add(Z),q},Tj=async(Z)=>{try{await Fj(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}J5.delete(Z)},J5,jj=2,Oj=1;var yU=B(()=>{X5();V8();q5();J5=new WeakMap});import{aborted as Ij}from"node:util";var CU=(Z,X)=>Z===void 0?[]:[wj(Z,X)],wj=async(Z,{sourceStream:X,mergedStream:q,fileDescriptors:Q,sourceOptions:J,startTime:$})=>{await Ij(Z,X),await q.remove(X);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw SZ({error:Y,fileDescriptors:Q,sourceOptions:J,startTime:$})};var SU=B(()=>{bZ()});var $5=(Z,...X)=>{if(t(X[0]))return $5.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...X[0]}});let{destination:q,...Q}=wU(Z,...X),J=kj({...Q,destination:q});return J.pipe=$5.bind(void 0,{...Z,source:q,sourcePromise:J,boundOptions:{}}),J},kj=async({sourcePromise:Z,sourceStream:X,sourceOptions:q,sourceError:Q,destination:J,destinationStream:$,destinationError:Y,unpipeSignal:H,fileDescriptors:U,startTime:W})=>{let G=Nj(Z,J);xU({sourceStream:X,sourceError:Q,destinationStream:$,destinationError:Y,fileDescriptors:U,sourceOptions:q,startTime:W});let V=new AbortController;try{let _=vU(X,$,V);return await Promise.race([PU(G),...CU(H,{sourceStream:X,mergedStream:_,sourceOptions:q,fileDescriptors:U,startTime:W})])}finally{V.abort()}},Nj=(Z,X)=>Promise.allSettled([Z,X]);var bU=B(()=>{Q1();kU();bZ();EU();yU();SU()});import{on as xj}from"node:events";import{getDefaultHighWaterMark as Pj}from"node:stream";var Y5=({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:Q,encoding:J,preserveNewlines:$})=>{let Y=new AbortController;return Ej(X,Y),fU({stream:Z,controller:Y,binary:q,shouldEncode:!Z.readableObjectMode&&Q,encoding:J,shouldSplit:!Z.readableObjectMode,preserveNewlines:$})},Ej=async(Z,X)=>{try{await Z}catch{}finally{X.abort()}},hZ=({stream:Z,onStreamEnd:X,lines:q,encoding:Q,stripFinalNewline:J,allMixed:$})=>{let Y=new AbortController;vj(X,Y,Z);let H=Z.readableObjectMode&&!$;return fU({stream:Z,controller:Y,binary:Q==="buffer",shouldEncode:!H,encoding:Q,shouldSplit:!H&&q,preserveNewlines:!J})},vj=async(Z,X,q)=>{try{await Z}catch{q.destroy()}finally{X.abort()}},fU=({stream:Z,controller:X,binary:q,shouldEncode:Q,encoding:J,shouldSplit:$,preserveNewlines:Y})=>{let H=xj(Z,"data",{signal:X.signal,highWaterMark:hU,highWatermark:hU});return yj({onStdoutChunk:H,controller:X,binary:q,shouldEncode:Q,encoding:J,shouldSplit:$,preserveNewlines:Y})},fZ,hU,yj=async function*({onStdoutChunk:Z,controller:X,binary:q,shouldEncode:Q,encoding:J,shouldSplit:$,preserveNewlines:Y}){let H=Cj({binary:q,shouldEncode:Q,encoding:J,shouldSplit:$,preserveNewlines:Y});try{for await(let[U]of Z)yield*n1(U,H,0)}catch(U){if(!X.signal.aborted)throw U}finally{yield*h2(H)}},Cj=({binary:Z,shouldEncode:X,encoding:q,shouldSplit:Q,preserveNewlines:J})=>[a8(Z,q,!X),n8(Z,J,!Q,{})].filter(Boolean);var H5=B(()=>{LZ();i8();RZ();fZ=Pj(!0),hU=fZ});import{setImmediate as Sj}from"node:timers/promises";var gU=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,buffer:J,maxBuffer:$,lines:Y,allMixed:H,stripFinalNewline:U,verboseInfo:W,streamInfo:G})=>{let V=bj({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:H,verboseInfo:W,streamInfo:G});if(!J){await Promise.all([hj(Z),V]);return}let _=WZ(U,q),L=hZ({stream:Z,onStreamEnd:X,lines:Y,encoding:Q,stripFinalNewline:_,allMixed:H}),[z]=await Promise.all([fj({stream:Z,iterable:L,fdNumber:q,encoding:Q,maxBuffer:$,lines:Y}),V]);return z},bj=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:J,verboseInfo:$,streamInfo:{fileDescriptors:Y}})=>{if(!t8({stdioItems:Y[q]?.stdioItems,encoding:Q,verboseInfo:$,fdNumber:q}))return;let H=hZ({stream:Z,onStreamEnd:X,lines:!0,encoding:Q,stripFinalNewline:!0,allMixed:J});await PK(H,Z,q,$)},hj=async(Z)=>{if(await Sj(),Z.readableFlowing===null)Z.resume()},fj=async({stream:Z,stream:{readableObjectMode:X},iterable:q,fdNumber:Q,encoding:J,maxBuffer:$,lines:Y})=>{try{if(X||Y)return await y8(q,{maxBuffer:$});if(J==="buffer")return new Uint8Array(await C8(q,{maxBuffer:$}));return await b8(q,{maxBuffer:$})}catch(H){return mU(LH({error:H,stream:Z,readableObjectMode:X,lines:Y,encoding:J,fdNumber:Q}))}},gZ=async(Z)=>{try{return await Z}catch(X){return mU(X)}},mU=({bufferedData:Z})=>i$(Z)?new Uint8Array(Z):Z;var mZ=B(()=>{h8();A0();FZ();H5();c1();b2()});import{finished as gj}from"node:stream/promises";var u2=async(Z,X,q,{isSameDirection:Q,stopOnExit:J=!1}={})=>{let $=mj(Z,q),Y=new AbortController;try{await Promise.race([...J?[q.exitPromise]:[],gj(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!$.stdinCleanedUp)dj(H,X,q,Q)}finally{Y.abort()}},mj=(Z,{originalStreams:[X],subprocess:q})=>{let Q={stdinCleanedUp:!1};if(Z===X)uj(Z,q,Q);return Q},uj=(Z,X,q)=>{let{_destroy:Q}=Z;Z._destroy=(...J)=>{pj(X,q),Q.call(Z,...J)}},pj=({exitCode:Z,signalCode:X},q)=>{if(Z!==null||X!==null)q.stdinCleanedUp=!0},dj=(Z,X,q,Q)=>{if(!cj(Z,X,q,Q))throw Z},cj=(Z,X,q,Q=!0)=>{if(q.propagating)return uU(Z)||K5(Z);return q.propagating=!0,uZ(q,X)===Q?uU(Z):K5(Z)},uZ=({fileDescriptors:Z},X)=>X!=="all"&&Z[X].direction==="input",K5=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",uU=(Z)=>Z?.code==="EPIPE";var U5=()=>{};var pU=({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:J,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((U,W)=>pZ({stream:U,fdNumber:W,encoding:X,buffer:q[W],maxBuffer:Q[W],lines:J[W],allMixed:!1,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})),pZ=async({stream:Z,fdNumber:X,encoding:q,buffer:Q,maxBuffer:J,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:W})=>{if(!Z)return;let G=u2(Z,X,W);if(uZ(W,X)){await G;return}let[V]=await Promise.all([gU({stream:Z,onStreamEnd:G,fdNumber:X,encoding:q,buffer:Q,maxBuffer:J,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:W}),G]);return V};var dZ=B(()=>{mZ();U5()});var dU=({stdout:Z,stderr:X},{all:q})=>q&&(Z||X)?i1([Z,X].filter(Boolean)):void 0,cU=({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:J,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>pZ({...lj(Z,q),fdNumber:"all",encoding:X,maxBuffer:Q[1]+Q[2],lines:J[1]||J[2],allMixed:nj(Z),stripFinalNewline:$,verboseInfo:Y,streamInfo:H}),lj=({stdout:Z,stderr:X,all:q},[,Q,J])=>{let $=Q||J;if(!$)return{stream:q,buffer:$};if(!Q)return{stream:X,buffer:$};if(!J)return{stream:Z,buffer:$};return{stream:q,buffer:$}},nj=({all:Z,stdout:X,stderr:q})=>Z&&X&&q&&X.readableObjectMode!==q.readableObjectMode;var cZ=B(()=>{X5();dZ()});var lU=(Z)=>w6(Z,"ipc"),nU=(Z,X)=>{let q=s4(Z);i0({type:"ipc",verboseMessage:q,fdNumber:"ipc",verboseInfo:X})};var iU=B(()=>{k6();A1()});var aU=async({subprocess:Z,buffer:X,maxBuffer:q,ipc:Q,ipcOutput:J,verboseInfo:$})=>{if(!Q)return J;let Y=lU($),H=Y1(X,"ipc"),U=Y1(q,"ipc");for await(let W of OZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:Q,shouldAwait:!1,reference:!0})){if(H)_H(Z,J,U),J.push(W);if(Y)nU(W,$)}return J},oU=async(Z,X)=>{return await Promise.allSettled([Z]),X};var sU=B(()=>{c1();iU();H1();IZ()});import{once as ij}from"node:events";var rU=async({subprocess:Z,options:{encoding:X,buffer:q,maxBuffer:Q,lines:J,timeoutDuration:$,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:U,stripFinalNewline:W,ipc:G,ipcInput:V},context:_,verboseInfo:L,fileDescriptors:z,originalStreams:R,onInternalError:D,controller:M})=>{let k=hK(Z,_),F={originalStreams:R,fileDescriptors:z,subprocess:Z,exitPromise:k,propagating:!1},I=pU({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:J,stripFinalNewline:W,verboseInfo:L,streamInfo:F}),T=cU({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:J,stripFinalNewline:W,verboseInfo:L,streamInfo:F}),j=[],A=aU({subprocess:Z,buffer:q,maxBuffer:Q,ipc:G,ipcOutput:j,verboseInfo:L}),f=aj(R,Z,F),w=oj(z,F);try{return await Promise.race([Promise.all([{},gK(k),Promise.all(I),T,A,fY(Z,V),...f,...w]),D,sj(Z,M),...yY(Z,$,_,M),...e9({subprocess:Z,cancelSignal:Y,gracefulCancel:H,context:_,controller:M}),...EY({subprocess:Z,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:U,context:_,controller:M})])}catch(x){return _.terminationReason??="other",Promise.all([{error:x},k,Promise.all(I.map((v)=>gZ(v))),gZ(T),oU(A,j),Promise.allSettled(f),Promise.allSettled(w)])}},aj=(Z,X,q)=>Z.map((Q,J)=>Q===X.stdio[J]?void 0:u2(Q,J,q)),oj=(Z,X)=>Z.flatMap(({stdioItems:q},Q)=>q.filter(({value:J,stream:$=J})=>h0($,{checkOpen:!1})&&!S0($)).map(({type:J,value:$,stream:Y=$})=>u2(Y,Q,X,{isSameDirection:w0.has(J),stopOnExit:J==="native"}))),sj=async(Z,{signal:X})=>{let[q]=await ij(Z,"error",{signal:X});throw q};var tU=B(()=>{d1();u3();v3();m3();$1();R0();mZ();sU();d3();cZ();dZ();TZ();U5()});var eU=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),p2=(Z,X,q)=>{let Q=Z[q];if(!Q.has(X))Q.set(X,[]);let J=Q.get(X),$=o0();return J.push($),{resolve:$.resolve.bind($),promises:J}},g6=async({resolve:Z,promises:X},q)=>{Z();let[Q]=await Promise.race([Promise.allSettled([!0,q]),Promise.all([!1,...X])]);return!Q};var G5=B(()=>{E6()});import{finished as ZG}from"node:stream/promises";var lZ=async(Z)=>{if(Z===void 0)return;try{await nZ(Z)}catch{}},XG=async(Z)=>{if(Z===void 0)return;try{await iZ(Z)}catch{}},nZ=async(Z)=>{await ZG(Z,{cleanup:!0,readable:!1,writable:!0})},iZ=async(Z)=>{await ZG(Z,{cleanup:!0,readable:!0,writable:!1})},W5=async(Z,X)=>{if(await Z,X)throw X},V5=(Z,X,q)=>{if(q&&!K5(q))Z.destroy(q);else if(X)Z.destroy()};var aZ=B(()=>{U5()});import{Readable as rj}from"node:stream";import{callbackify as tj}from"node:util";var qG=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,binary:J=!0,preserveNewlines:$=!0}={})=>{let Y=J||T0.has(q),{subprocessStdout:H,waitReadableDestroy:U}=oZ(Z,Q,X),{readableEncoding:W,readableObjectMode:G,readableHighWaterMark:V}=sZ(H,Y),{read:_,onStdoutDataDone:L}=rZ({subprocessStdout:H,subprocess:Z,binary:Y,encoding:q,preserveNewlines:$}),z=new rj({read:_,destroy:tj(eZ.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:U})),highWaterMark:V,objectMode:G,encoding:W});return tZ({subprocessStdout:H,onStdoutDataDone:L,readable:z,subprocess:Z}),z},oZ=(Z,X,q)=>{let Q=v6(Z,X),J=p2(q,Q,"readableDestroy");return{subprocessStdout:Q,waitReadableDestroy:J}},sZ=({readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q},Q)=>Q?{readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:fZ},rZ=({subprocessStdout:Z,subprocess:X,binary:q,encoding:Q,preserveNewlines:J})=>{let $=o0(),Y=Y5({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:!q,encoding:Q,preserveNewlines:J});return{read(){ej(this,Y,$)},onStdoutDataDone:$}},ej=async(Z,X,q)=>{try{let{value:Q,done:J}=await X.next();if(J)q.resolve();else Z.push(Q)}catch{}},tZ=async({subprocessStdout:Z,onStdoutDataDone:X,readable:q,subprocess:Q,subprocessStdin:J})=>{try{if(await iZ(Z),await Q,await lZ(J),await X,q.readable)q.push(null)}catch($){await lZ(J),QG(q,$)}},eZ=async({subprocessStdout:Z,subprocess:X,waitReadableDestroy:q},Q)=>{if(await g6(q,X))QG(Z,Q),await W5(X,Q)},QG=(Z,X)=>{V5(Z,Z.readable,X)};var ZX=B(()=>{u1();j1();H5();E6();G5();aZ()});import{Writable as ZO}from"node:stream";import{callbackify as JG}from"node:util";var $G=({subprocess:Z,concurrentStreams:X},{to:q}={})=>{let{subprocessStdin:Q,waitWritableFinal:J,waitWritableDestroy:$}=XX(Z,q,X),Y=new ZO({...qX(Q,Z,J),destroy:JG(JX.bind(void 0,{subprocessStdin:Q,subprocess:Z,waitWritableFinal:J,waitWritableDestroy:$})),highWaterMark:Q.writableHighWaterMark,objectMode:Q.writableObjectMode});return QX(Q,Y),Y},XX=(Z,X,q)=>{let Q=W8(Z,X),J=p2(q,Q,"writableFinal"),$=p2(q,Q,"writableDestroy");return{subprocessStdin:Q,waitWritableFinal:J,waitWritableDestroy:$}},qX=(Z,X,q)=>({write:XO.bind(void 0,Z),final:JG(qO.bind(void 0,Z,X,q))}),XO=(Z,X,q,Q)=>{if(Z.write(X,q))Q();else Z.once("drain",Q)},qO=async(Z,X,q)=>{if(await g6(q,X)){if(Z.writable)Z.end();await X}},QX=async(Z,X,q)=>{try{if(await nZ(Z),X.writable)X.end()}catch(Q){await XG(q),YG(X,Q)}},JX=async({subprocessStdin:Z,subprocess:X,waitWritableFinal:q,waitWritableDestroy:Q},J)=>{if(await g6(q,X),await g6(Q,X))YG(Z,J),await W5(X,J)},YG=(Z,X)=>{V5(Z,Z.writable,X)};var $X=B(()=>{j1();G5();aZ()});import{Duplex as QO}from"node:stream";import{callbackify as JO}from"node:util";var HG=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,to:J,binary:$=!0,preserveNewlines:Y=!0}={})=>{let H=$||T0.has(q),{subprocessStdout:U,waitReadableDestroy:W}=oZ(Z,Q,X),{subprocessStdin:G,waitWritableFinal:V,waitWritableDestroy:_}=XX(Z,J,X),{readableEncoding:L,readableObjectMode:z,readableHighWaterMark:R}=sZ(U,H),{read:D,onStdoutDataDone:M}=rZ({subprocessStdout:U,subprocess:Z,binary:H,encoding:q,preserveNewlines:Y}),k=new QO({read:D,...qX(G,Z,V),destroy:JO($O.bind(void 0,{subprocessStdout:U,subprocessStdin:G,subprocess:Z,waitReadableDestroy:W,waitWritableFinal:V,waitWritableDestroy:_})),readableHighWaterMark:R,writableHighWaterMark:G.writableHighWaterMark,readableObjectMode:z,writableObjectMode:G.writableObjectMode,encoding:L});return tZ({subprocessStdout:U,onStdoutDataDone:M,readable:k,subprocess:Z,subprocessStdin:G}),QX(G,k,U),k},$O=async({subprocessStdout:Z,subprocessStdin:X,subprocess:q,waitReadableDestroy:Q,waitWritableFinal:J,waitWritableDestroy:$},Y)=>{await Promise.all([eZ({subprocessStdout:Z,subprocess:q,waitReadableDestroy:Q},Y),JX({subprocessStdin:X,subprocess:q,waitWritableFinal:J,waitWritableDestroy:$},Y)])};var KG=B(()=>{u1();ZX();$X()});var YX=(Z,X,{from:q,binary:Q=!1,preserveNewlines:J=!1}={})=>{let $=Q||T0.has(X),Y=v6(Z,q),H=Y5({subprocessStdout:Y,subprocess:Z,binary:$,shouldEncode:!0,encoding:X,preserveNewlines:J});return YO(H,Y,Z)},YO=async function*(Z,X,q){try{yield*Z}finally{if(X.readable)X.destroy();await q}};var UG=B(()=>{u1();j1();H5()});var GG=(Z,{encoding:X})=>{let q=eU();Z.readable=qG.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.writable=$G.bind(void 0,{subprocess:Z,concurrentStreams:q}),Z.duplex=HG.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.iterable=YX.bind(void 0,Z,X),Z[Symbol.asyncIterator]=YX.bind(void 0,Z,X,{})};var WG=B(()=>{G5();ZX();$X();KG();UG()});var VG=(Z,X)=>{for(let[q,Q]of KO){let J=Q.value.bind(X);Reflect.defineProperty(Z,q,{...Q,value:J})}},HO,KO;var BG=B(()=>{HO=(async()=>{})().constructor.prototype,KO=["then","catch","finally"].map((Z)=>[Z,Reflect.getOwnPropertyDescriptor(HO,Z)])});import{setMaxListeners as UO}from"node:events";import{spawn as GO}from"node:child_process";var LG=(Z,X,q,Q)=>{let{file:J,commandArguments:$,command:Y,escapedCommand:H,startTime:U,verboseInfo:W,options:G,fileDescriptors:V}=WO(Z,X,q),{subprocess:_,promise:L}=BO({file:J,commandArguments:$,options:G,startTime:U,verboseInfo:W,command:Y,escapedCommand:H,fileDescriptors:V});return _.pipe=$5.bind(void 0,{source:_,sourcePromise:L,boundOptions:{},createNested:Q}),VG(_,L),s0.set(_,{options:G,fileDescriptors:V}),_},WO=(Z,X,q)=>{let{command:Q,escapedCommand:J,startTime:$,verboseInfo:Y}=e4(Z,X,q),{file:H,commandArguments:U,options:W}=k8(Z,X,q),G=VO(W),V=JU(G,Y);return{file:H,commandArguments:U,command:Q,escapedCommand:J,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},VO=({timeout:Z,signal:X,...q})=>{if(X!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...q,timeoutDuration:Z}},BO=({file:Z,commandArguments:X,options:q,startTime:Q,verboseInfo:J,command:$,escapedCommand:Y,fileDescriptors:H})=>{let U;try{U=GO(...N8(Z,X,q))}catch(z){return eK({error:z,command:$,escapedCommand:Y,fileDescriptors:H,options:q,startTime:Q,verboseInfo:J})}let W=new AbortController;UO(Number.POSITIVE_INFINITY,W.signal);let G=[...U.stdio];_U(U,H,W),jU(U,q,W);let V={},_=o0();U.kill=r9.bind(void 0,{kill:U.kill.bind(U),options:q,onInternalError:_,context:V,controller:W}),U.all=dU(U,q),GG(U,q),sK(U,q);let L=LO({subprocess:U,options:q,startTime:Q,verboseInfo:J,fileDescriptors:H,originalStreams:G,command:$,escapedCommand:Y,context:V,onInternalError:_,controller:W});return{subprocess:U,promise:L}},LO=async({subprocess:Z,options:X,startTime:q,verboseInfo:Q,fileDescriptors:J,originalStreams:$,command:Y,escapedCommand:H,context:U,onInternalError:W,controller:G})=>{let[V,[_,L],z,R,D]=await rU({subprocess:Z,options:X,context:U,verboseInfo:Q,fileDescriptors:J,originalStreams:$,onInternalError:W,controller:G});G.abort(),W.resolve();let M=z.map((I,T)=>G1(I,X,T)),k=G1(R,X,"all"),F=_O({errorInfo:V,exitCode:_,signal:L,stdio:M,all:k,ipcOutput:D,context:U,options:X,command:Y,escapedCommand:H,startTime:q});return b6(F,Q,X)},_O=({errorInfo:Z,exitCode:X,signal:q,stdio:Q,all:J,ipcOutput:$,context:Y,options:H,command:U,escapedCommand:W,startTime:G})=>("error"in Z)?C2({error:Z.error,command:U,escapedCommand:W,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof K1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:X,signal:q,stdio:Q,all:J,ipcOutput:$,options:H,startTime:G,isSync:!1}):g8({command:U,escapedCommand:W,stdio:Q,all:J,ipcOutput:$,options:H,startTime:G});var _G=B(()=>{h8();I3();n3();j1();i3();wZ();S2();m8();ZU();$U();b2();zU();H8();OU();bU();cZ();tU();WG();E6();BG()});var B5=(Z,X)=>{let q=Object.fromEntries(Object.entries(X).map(([Q,J])=>[Q,zO(Q,Z[Q],J)]));return{...Z,...q}},zO=(Z,X,q)=>{if(RO.has(Z)&&t(X)&&t(q))return{...X,...q};return q},RO;var zG=B(()=>{Q1();H1();RO=new Set(["env",...A3])});var w1=(Z,X,q,Q)=>{let J=(Y,H,U)=>w1(Y,H,q,U),$=(...Y)=>MO({mapArguments:Z,deepOptions:q,boundOptions:X,setBoundExeca:Q,createNested:J},...Y);if(Q!==void 0)Q($,J,X);return $},MO=({mapArguments:Z,deepOptions:X={},boundOptions:q={},setBoundExeca:Q,createNested:J},$,...Y)=>{if(t($))return J(Z,B5(q,$),Q);let{file:H,commandArguments:U,options:W,isSync:G}=FO({mapArguments:Z,firstArgument:$,nextArguments:Y,deepOptions:X,boundOptions:q});return G?pK(H,U,W):LG(H,U,W,J)},FO=({mapArguments:Z,firstArgument:X,nextArguments:q,deepOptions:Q,boundOptions:J})=>{let $=e$(X)?Z9(X,q):[X,...q],[Y,H,U]=m4(...$),W=B5(B5(Q,J),U),{file:G=Y,commandArguments:V=H,options:_=W,isSync:L=!1}=Z({file:Y,commandArguments:H,options:W});return{file:G,commandArguments:V,options:_,isSync:L}};var RG=B(()=>{Q1();z3();X9();dK();_G();zG()});var MG=({file:Z,commandArguments:X})=>DG(Z,X),FG=({file:Z,commandArguments:X})=>({...DG(Z,X),isSync:!0}),DG=(Z,X)=>{if(X.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${Z} ${X}.`);let[q,...Q]=DO(Z);return{file:q,commandArguments:Q}},DO=(Z)=>{if(typeof Z!=="string")throw TypeError(`The command must be a string: ${String(Z)}.`);let X=Z.trim();if(X==="")return[];let q=[];for(let Q of X.split(AO)){let J=q.at(-1);if(J&&J.endsWith("\\"))q[q.length-1]=`${J.slice(0,-1)} ${Q}`;else q.push(Q)}return q},AO;var AG=B(()=>{AO=/ +/g});var TG=(Z,X,q)=>{Z.sync=X(TO,q),Z.s=Z.sync},jG=({options:Z})=>OG(Z),TO=({options:Z})=>({...OG(Z),isSync:!0}),OG=(Z)=>({options:{...jO(Z),...Z}}),jO=({input:Z,inputFile:X,stdio:q})=>Z===void 0&&X===void 0&&q===void 0?{stdin:"inherit"}:{},IG;var wG=B(()=>{IG={preferLocal:!0}});var HX,k0,ic,ac,oc,sc,rc,tc,ec,Zl;var m6=B(()=>{RG();AG();p3();wG();wZ();HX=w1(()=>({})),k0=w1(()=>({isSync:!0})),ic=w1(MG),ac=w1(FG),oc=w1(SY),sc=w1(jG,{},IG,TG),{sendMessage:rc,getOneMessage:tc,getEachMessage:ec,getCancelSignal:Zl}=rK()});async function OO(Z){if(process.platform==="win32"){let q=await HX(`where.exe ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(q.exitCode!==0||!q.stdout)return null;return q.stdout.trim().split(/\r?\n/)[0]||null}let X=await HX(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(X.exitCode!==0||!X.stdout)return null;return X.stdout.trim()}function IO(Z){if(process.platform==="win32")try{return _6(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return _6(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var KX,kG,L5;var _5=B(()=>{m6();f7();KX=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,kG=KX?async(Z)=>KX(Z):OO,L5=KX??IO});function NG(Z,X){return{cmd:L5(Z)??Z,args:X}}var xG=B(()=>{_5()});import{dirname as wO,join as PG}from"path";async function u6(Z){try{return!!await kG(Z)}catch{return!1}}function EO(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function yO(){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 X of vO)if(Z.includes(X))return X}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(CG())return"ssh-session";if(process.env.TERM){let X=process.env.TERM;if(X.includes("alacritty"))return"alacritty";if(X.includes("rxvt"))return"rxvt";if(X.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}function CG(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function _l(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return p6.platform}var L0,kO,NO,xO,yG,PO,vO,CO,p6;var UX=B(()=>{v1();vG();l$();c0();xG();F0();_5();L0=d(()=>{let Z=EG(),X=K0(),q=PG(X,`config${Z}.json`);if(!N().existsSync(q)){let J=process.env.CLAUDIN_CONFIG_DIR?X:wO(X),$=PG(J,`.claudin${Z}.json`);if(N().existsSync($))return $}return q}),kO=d(async()=>{try{let{default:Z}=await import("./index-0.5.9-8h5ceajb.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});NO=d(async()=>{let Z=[];if(await u6("npm"))Z.push("npm");if(await u6("yarn"))Z.push("yarn");if(await u6("pnpm"))Z.push("pnpm");return Z}),xO=d(async()=>{let Z=[];if(await u6("bun"))Z.push("bun");if(await u6("deno"))Z.push("deno");if(await u6("node"))Z.push("node");return Z}),yG=d(()=>{try{return N().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),PO=d(()=>{try{if(!yG())return!1;let{cmd:Z}=NG("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});vO=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];CO=d(()=>{if(e(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(e(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(e(process.env.RENDER))return"render";if(e(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(e(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(e(process.env.GITHUB_ACTIONS))return"github-actions";if(e(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(e(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(N().existsSync("/.dockerenv"))return"docker"}catch{}if(p6.platform==="darwin")return"unknown-darwin";if(p6.platform==="linux")return"unknown-linux";if(p6.platform==="win32")return"unknown-win32";return"unknown"});p6={hasInternetAccess:kO,isCI:e(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:yO(),isSSH:CG,getPackageManagers:NO,getRuntimes:xO,isRunningWithBun:d(c$),isWslEnvironment:yG,isNpmFromWindowsPath:PO,isConductor:EO,detectDeploymentEnvironment:CO}});var Ml,Fl="∙",Dl="✻",Al="↑",Tl="↓",jl="↯",Ol="○",Il="◐",wl="●",kl="◉",Nl="◍",xl="▶",SG="⏸",Pl="↻",El="◇",vl="◆",yl="※",Cl="▎",Sl="·✔︎·",bl="×";var bG=B(()=>{UX();Ml=p6.platform==="darwin"?"⏺":"●"});var z5,SO,d6;var hG=B(()=>{z5=["acceptEdits","bypassPermissions","default","dontAsk","plan"],SO=[...z5,"auto"],d6=SO});var nO={};GX(nO,{toExternalPermissionMode:()=>gO,permissionModeTitle:()=>uO,permissionModeSymbol:()=>cO,permissionModeShortTitle:()=>dO,permissionModeSchema:()=>bO,permissionModeFromString:()=>mO,isExternalPermissionMode:()=>fO,isDefaultMode:()=>pO,getModeColor:()=>lO,externalPermissionModeSchema:()=>hO,PERMISSION_MODES:()=>d6,EXTERNAL_PERMISSION_MODES:()=>z5});function fO(Z){return Z!=="auto"}function d2(Z){return fG[Z]??fG.default}function gO(Z){return d2(Z).external}function mO(Z){return d6.includes(Z)?Z:"default"}function uO(Z){return d2(Z).title}function pO(Z){return Z==="default"||Z===void 0}function dO(Z){return d2(Z).shortTitle}function cO(Z){return d2(Z).symbol}function lO(Z){return d2(Z).color}var bO,hO,fG;var gG=B(()=>{n0();bG();hG();h1();bO=O(()=>WX.enum(d6)),hO=O(()=>WX.enum(z5)),fG={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:SG,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 mG=()=>{};var uG;var pG=B(()=>{mG();uG=["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 dG=()=>{};var cG=()=>{};var lG=B(()=>{pG();dG();cG()});var nG,ol="bash";var iG=B(()=>{nG=["bash","powershell"]});function iO(){let Z=K.object({type:K.literal("command").describe("Shell command hook type"),command:K.string().describe("Shell command to execute"),if:R5(),shell:K.enum(nG).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:K.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:K.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.")}),X=K.object({type:K.literal("prompt").describe("LLM prompt hook type"),prompt:K.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:R5(),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:K.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-4-6"). If not specified, uses the default small fast model.'),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")}),q=K.object({type:K.literal("http").describe("HTTP hook type"),url:K.string().url().describe("URL to POST the hook input JSON to"),if:R5(),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:K.record(K.string(),K.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:K.array(K.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:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")}),Q=K.object({type:K.literal("agent").describe("Agentic verifier hook type"),prompt:K.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:R5(),timeout:K.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:K.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-4-6"). If not specified, uses Haiku.'),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:X,HttpHookSchema:q,AgentHookSchema:Q}}var R5,aG,oG,o1;var M5=B(()=>{lG();n0();h1();iG();R5=O(()=>K.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.'));aG=O(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:X,AgentHookSchema:q,HttpHookSchema:Q}=iO();return K.discriminatedUnion("type",[Z,X,q,Q])}),oG=O(()=>K.object({matcher:K.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:K.array(aG()).describe("List of hooks to execute when the matcher matches")})),o1=O(()=>K.partialRecord(K.enum(uG),K.array(oG())))});var Jn,$n,aO,oO,sG,sO,rO,tO,eO,ZI,XI,qI,F5,Yn;var rG=B(()=>{n0();h1();Jn=O(()=>K.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),$n=O(()=>K.enum(["stdio","sse","sse-ide","http","ws","sdk"])),aO=O(()=>K.object({type:K.literal("stdio").optional(),command:K.string().min(1,"Command cannot be empty"),args:K.array(K.string()).default([]),env:K.record(K.string(),K.string()).optional()})),oO=O(()=>K.boolean()),sG=O(()=>K.object({clientId:K.string().optional(),callbackPort:K.number().int().positive().optional(),authServerMetadataUrl:K.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional(),xaa:oO().optional()})),sO=O(()=>K.object({type:K.literal("sse"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:sG().optional()})),rO=O(()=>K.object({type:K.literal("sse-ide"),url:K.string(),ideName:K.string(),ideRunningInWindows:K.boolean().optional()})),tO=O(()=>K.object({type:K.literal("ws-ide"),url:K.string(),ideName:K.string(),authToken:K.string().optional(),ideRunningInWindows:K.boolean().optional()})),eO=O(()=>K.object({type:K.literal("http"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:sG().optional()})),ZI=O(()=>K.object({type:K.literal("ws"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional()})),XI=O(()=>K.object({type:K.literal("sdk"),name:K.string()})),qI=O(()=>K.object({type:K.literal("claudeai-proxy"),url:K.string(),id:K.string()})),F5=O(()=>K.union([aO(),sO(),rO(),tO(),eO(),ZI(),XI(),qI()])),Yn=O(()=>K.object({mcpServers:K.record(K.string(),F5())}))});function Vn(Z,X){let q=Z.toLowerCase();return X.autoUpdate??(T5.has(q)&&!QI.has(q))}function YI(Z){if(T5.has(Z.toLowerCase()))return!1;if($I.test(Z))return!0;return JI.test(Z)}function Bn(Z,X){let q=Z.toLowerCase();if(!T5.has(q))return null;if(X.source==="github"){if(!(X.repo||"").toLowerCase().startsWith(`${D5}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${D5}/' can use this name.`;return null}if(X.source==="git"&&X.url){let Q=X.url.toLowerCase(),J=Q.includes("github.com/anthropics/"),$=Q.includes("git@github.com:anthropics/");if(J||$)return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${D5}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${D5}' organization.`}function _n(Z){return typeof Z==="string"&&Z.startsWith("./")}function zn(Z){return Z.source==="file"||Z.source==="directory"}var T5,QI,JI,$I,D5="anthropics",W1,c6,tG,BX,LX,XW,_X,HI,Ln,KI,UI,GI,WI,VI,BI,eG,LI,_I,qW,zI,RI,ZW,MI,QW,FI,DI,c2,VX,JW,AI,TI,Rn,A5,jI,OI,Mn,II,wI,kI,NI,xI,Fn,PI,Dn;var $W=B(()=>{n0();M5();rG();h1();T5=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),QI=new Set(["knowledge-work-plugins"]);JI=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,$I=/[^\u0020-\u007E]/;W1=O(()=>K.string().startsWith("./")),c6=O(()=>W1().endsWith(".json")),tG=O(()=>K.union([W1().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"),K.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),BX=O(()=>W1().endsWith(".md")),LX=O(()=>K.union([BX(),W1()])),XW=O(()=>K.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)=>!YI(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'})),_X=O(()=>K.object({name:K.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:K.string().optional().describe("Contact email for support or feedback"),url:K.string().optional().describe("Website, GitHub profile, or organization URL")})),HI=O(()=>K.object({name:K.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:K.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:K.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:_X().optional().describe("Information about the plugin creator or maintainer"),homepage:K.string().url().optional().describe("Plugin homepage or documentation URL"),repository:K.string().optional().describe("Source code repository URL"),license:K.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:K.array(K.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:K.array(OI()).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.`)})),Ln=O(()=>K.object({description:K.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:K.lazy(()=>o1()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),KI=O(()=>K.object({hooks:K.union([c6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),K.lazy(()=>o1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),K.array(K.union([c6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),K.lazy(()=>o1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),UI=O(()=>K.object({source:LX().optional().describe("Path to command markdown file, relative to plugin root"),content:K.string().optional().describe("Inline markdown content for the command"),description:K.string().optional().describe("Command description override"),argumentHint:K.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:K.string().optional().describe("Default model for this command"),allowedTools:K.array(K.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'})),GI=O(()=>K.object({commands:K.union([LX().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"),K.array(LX().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"),K.record(K.string(),UI()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),WI=O(()=>K.object({agents:K.union([BX().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),K.array(BX().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")])})),VI=O(()=>K.object({skills:K.union([W1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),K.array(W1().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")])})),BI=O(()=>K.object({outputStyles:K.union([W1().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"),K.array(W1().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")])})),eG=O(()=>K.string().min(1)),LI=O(()=>K.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),_I=O(()=>K.object({mcpServers:K.union([c6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),tG().describe("Path or URL to MCPB file containing MCP server configuration"),K.record(K.string(),F5()).describe("MCP server configurations keyed by server name"),K.array(K.union([c6().describe("Path to MCP servers configuration file"),tG().describe("Path or URL to MCPB file"),K.record(K.string(),F5()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),qW=O(()=>K.object({type:K.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:K.string().describe("Human-readable label shown in the config dialog"),description:K.string().describe("Help text shown beneath the field in the config dialog"),required:K.boolean().optional().describe("If true, validation fails when this field is empty"),default:K.union([K.string(),K.number(),K.boolean(),K.array(K.string())]).optional().describe("Default value used when the user provides nothing"),multiple:K.boolean().optional().describe("For string type: allow an array of strings"),sensitive:K.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:K.number().optional().describe("Minimum value (number type only)"),max:K.number().optional().describe("Maximum value (number type only)")}).strict()),zI=O(()=>K.object({userConfig:K.record(K.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"),qW()).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).")})),RI=O(()=>K.object({channels:K.array(K.object({server:K.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:K.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:K.record(K.string(),qW()).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.")})),ZW=O(()=>K.strictObject({command:K.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:K.array(eG()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:K.record(LI(),eG()).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:K.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:K.record(K.string(),K.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:K.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:K.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:K.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:K.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:K.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:K.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:K.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),MI=O(()=>K.object({lspServers:K.union([c6().describe("Path to .lsp.json configuration file relative to plugin root"),K.record(K.string(),ZW()).describe("LSP server configurations keyed by server name"),K.array(K.union([c6().describe("Path to LSP configuration file"),K.record(K.string(),ZW()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),QW=O(()=>K.string().refine((Z)=>!Z.includes("..")&&!Z.includes("//"),"Package name cannot contain path traversal patterns").refine((Z)=>{let X=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,q=/^[a-z0-9][a-z0-9-._]*$/;return X.test(Z)||q.test(Z)},"Invalid npm package name format")),FI=O(()=>K.object({settings:K.record(K.string(),K.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),DI=O(()=>K.object({...HI().shape,...KI().partial().shape,...GI().partial().shape,...WI().partial().shape,...VI().partial().shape,...BI().partial().shape,...RI().partial().shape,..._I().partial().shape,...MI().partial().shape,...FI().partial().shape,...zI().partial().shape})),c2=O(()=>K.discriminatedUnion("source",[K.object({source:K.literal("url"),url:K.string().url().describe("Direct URL to marketplace.json file"),headers:K.record(K.string(),K.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),K.object({source:K.literal("github"),repo:K.string().describe("GitHub repository in owner/repo format"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:K.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:K.array(K.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.')}),K.object({source:K.literal("git"),url:K.string().describe("Full git repository URL"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:K.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:K.array(K.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.')}),K.object({source:K.literal("npm"),package:QW().describe("NPM package containing marketplace.json")}),K.object({source:K.literal("file"),path:K.string().describe("Local file path to marketplace.json")}),K.object({source:K.literal("directory"),path:K.string().describe("Local directory containing .claude-plugin/marketplace.json")}),K.object({source:K.literal("hostPattern"),hostPattern:K.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$").')}),K.object({source:K.literal("pathPattern"),pathPattern:K.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.')}),K.object({source:K.literal("settings"),name:XW().refine((Z)=>!T5.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:K.array(AI()).describe("Plugin entries declared inline in settings.json"),owner:_X().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).")])),VX=O(()=>K.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),JW=O(()=>K.union([W1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),K.object({source:K.literal("npm"),package:QW().or(K.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:K.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:K.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),K.object({source:K.literal("pip"),package:K.string().describe("Python package name as it appears on PyPI"),version:K.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:K.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),K.object({source:K.literal("url"),url:K.string().describe("Full git repository URL (https:// or git@)"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:VX().optional().describe("Specific commit SHA to use")}),K.object({source:K.literal("github"),repo:K.string().describe("GitHub repository in owner/repo format"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:VX().optional().describe("Specific commit SHA to use")}),K.object({source:K.literal("git-subdir"),url:K.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:K.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:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:VX().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.")])),AI=O(()=>K.object({name:K.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:JW().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against."),description:K.string().optional(),version:K.string().optional(),strict:K.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.'}));TI=O(()=>DI().partial().extend({name:K.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:JW().describe("Where to fetch the plugin from"),category:K.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:K.array(K.string()).optional().describe("Tags for searchability and discovery"),strict:K.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),Rn=O(()=>K.object({name:XW(),owner:_X().describe("Marketplace maintainer or curator information"),plugins:K.array(TI()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:K.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:K.object({pluginRoot:K.string().optional().describe("Base path for relative plugin sources"),version:K.string().optional().describe("Marketplace version"),description:K.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:K.array(K.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")})),A5=O(()=>K.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),jI=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,OI=O(()=>K.union([K.string().regex(jI,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),K.object({name:K.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:K.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),Mn=O(()=>K.union([A5(),K.object({id:A5().describe('Plugin identifier (e.g., "formatter@tools")'),version:K.string().optional().describe('Version constraint (e.g., "^2.0.0")'),required:K.boolean().optional().describe("If true, cannot be disabled"),config:K.record(K.string(),K.unknown()).optional().describe("Plugin-specific configuration")})])),II=O(()=>K.object({version:K.string().describe("Currently installed version"),installedAt:K.string().describe("ISO 8601 timestamp of installation"),lastUpdated:K.string().optional().describe("ISO 8601 timestamp of last update"),installPath:K.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:K.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),wI=O(()=>K.object({version:K.literal(1).describe("Schema version 1"),plugins:K.record(A5(),II()).describe("Map of plugin IDs to their installation metadata")})),kI=O(()=>K.enum(["managed","user","project","local"])),NI=O(()=>K.object({scope:kI().describe("Installation scope"),projectPath:K.string().optional().describe("Project path (required for project/local scopes)"),installPath:K.string().describe("Absolute path to the versioned plugin directory"),version:K.string().optional().describe("Currently installed version"),installedAt:K.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:K.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:K.string().optional().describe("Git commit SHA for git-based plugins")})),xI=O(()=>K.object({version:K.literal(2).describe("Schema version 2"),plugins:K.record(A5(),K.array(NI())).describe("Map of plugin IDs to arrays of installation entries")})),Fn=O(()=>K.union([wI(),xI()])),PI=O(()=>K.object({source:c2().describe("Where to fetch the marketplace from"),installLocation:K.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:K.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:K.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Dn=O(()=>K.record(K.string(),PI()))});function Tn(Z){return Z.startsWith("claude.ai ")}function j5(Z){let X=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))X=X.replace(/_+/g,"_").replace(/^_|_$/g,"");return X}var YW=()=>{};function HW(Z){let X=Z.split("__"),[q,Q,...J]=X;if(q!=="mcp"||!Q)return null;let $=J.length>0?J.join("__"):void 0;return{serverName:Q,toolName:$}}function EI(Z){return`mcp__${j5(Z)}__`}function vI(Z,X){return`${EI(Z)}${j5(X)}`}function In(Z){return Z.mcpInfo?vI(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function wn(Z,X){let q=`mcp__${j5(X)}__`;return Z.replace(q,"")}function kn(Z){let X=Z.replace(/\s*\(MCP\)\s*$/,"");X=X.trim();let q=X.indexOf(" - ");if(q!==-1)return X.substring(q+3).trim();return X}var KW=B(()=>{YW()});var UW="Agent",xn="Task",Pn;var GW=B(()=>{Pn=new Set(["Explore","Plan","WebResearcher","WebResearcherManager"])});var zX="TaskOutput";var WW=()=>{};var VW="TaskStop",yn=`
|
|
77
|
+
- Stops a running background task by its ID
|
|
78
|
+
- Takes a task_id parameter identifying the task to stop
|
|
79
|
+
- Returns a success or failure status
|
|
80
|
+
- Use this tool when you need to terminate a long-running task
|
|
81
|
+
`;var BW=()=>{};function l6(Z){return LW[Z]??Z}function fn(Z){let X=[];for(let[q,Q]of Object.entries(LW))if(Q===Z)X.push(q);return X}function yI(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function CI(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function _W(Z){let X=SI(Z,"(");if(X===-1)return{toolName:l6(Z)};let q=bI(Z,")");if(q===-1||q<=X)return{toolName:l6(Z)};if(q!==Z.length-1)return{toolName:l6(Z)};let Q=Z.substring(0,X),J=Z.substring(X+1,q);if(!Q)return{toolName:l6(Z)};if(J===""||J==="*")return{toolName:l6(Q)};let $=CI(J);return{toolName:l6(Q),ruleContent:$}}function gn(Z){if(!Z.ruleContent)return Z.toolName;let X=yI(Z.ruleContent);return`${Z.toolName}(${X})`}function SI(Z,X){for(let q=0;q<Z.length;q++)if(Z[q]===X){let Q=0,J=q-1;while(J>=0&&Z[J]==="\\")Q++,J--;if(Q%2===0)return q}return-1}function bI(Z,X){for(let q=Z.length-1;q>=0;q--)if(Z[q]===X){let Q=0,J=q-1;while(J>=0&&Z[J]==="\\")Q++,J--;if(Q%2===0)return q}return-1}var LW;var zW=B(()=>{GW();WW();BW();LW={Task:UW,KillShell:VW,AgentOutputTool:zX,BashOutputTool:zX,...{}}});function un(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function RW(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function MW(Z,X,q=X+"s"){return Z===1?X:q}function pn(Z){let X=Z.indexOf(`
|
|
82
|
+
`);return X===-1?Z:Z.slice(0,X)}function dn(Z,X,q=0){let Q=0,J=Z.indexOf(X,q);while(J!==-1)Q++,J=Z.indexOf(X,J+1);return Q}function cn(Z){return Z.replace(/[0-9]/g,(X)=>String.fromCharCode(X.charCodeAt(0)-65248))}function ln(Z){return Z.replace(/\u3000/g," ")}function nn(Z,X=",",q=FW){let J="";for(let $ of Z){let Y=J?X:"",H=Y+$;if(J.length+H.length<=q)J+=H;else{let U=q-J.length-Y.length-14;if(U>0)J+=Y+$.slice(0,U)+"...[truncated]";else J+="...[truncated]";return J}}return J}class hI{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=FW){this.maxSize=Z}append(Z){let X=typeof Z==="string"?Z:Z.toString();if(this.totalBytesReceived+=X.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+X.length>this.maxSize){let q=this.maxSize-this.content.length;if(q>0)this.content+=X.slice(0,q);this.isTruncated=!0}else this.content+=X}toString(){if(!this.isTruncated)return this.content;let Z=this.totalBytesReceived-this.maxSize,X=Math.round(Z/1024);return this.content+`
|
|
83
|
+
... [output truncated - ${X}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 an(Z,X){let q=Z.split(`
|
|
84
|
+
`);if(q.length<=X)return Z;return q.slice(0,X).join(`
|
|
85
|
+
`)+"…"}var FW=33554432;var RX=()=>{};function DW(Z){return MX.filePatternTools.includes(Z)}function AW(Z){return MX.bashPrefixTools.includes(Z)}function TW(Z){return MX.customValidation[Z]}var MX;var jW=B(()=>{MX={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 OW(Z,X){let q=0,Q=X-1;while(Q>=0&&Z[Q]==="\\")q++,Q--;return q%2!==0}function FX(Z,X){let q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===X&&!OW(Z,Q))q++;return q}function fI(Z){for(let X=0;X<Z.length-1;X++)if(Z[X]==="("&&Z[X+1]===")"){if(!OW(Z,X))return!0}return!1}function DX(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let X=FX(Z,"("),q=FX(Z,")");if(X!==q)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(fI(Z)){let Y=Z.substring(0,Z.indexOf("("));if(!Y)return{valid:!1,error:"Empty parentheses with no tool name",suggestion:"Specify a tool name before the parentheses"};return{valid:!1,error:"Empty parentheses",suggestion:`Either specify a pattern or use just "${Y}" without parentheses`,examples:[`${Y}`,`${Y}(some-pattern)`]}}let Q=_W(Z),J=HW(Q.toolName);if(J){if(Q.ruleContent!==void 0||FX(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${Q.toolName}" without parentheses, or use "mcp__${J.serverName}__*" for all tools`,examples:[`mcp__${J.serverName}`,`mcp__${J.serverName}__*`,J.toolName&&J.toolName!=="*"?`mcp__${J.serverName}__${J.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!Q.toolName||Q.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(Q.toolName[0]!==Q.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${RW(String(Q.toolName))}"`};let $=TW(Q.toolName);if($&&Q.ruleContent!==void 0){let Y=$(Q.ruleContent);if(!Y.valid)return Y}if(AW(Q.toolName)&&Q.ruleContent!==void 0){let Y=Q.ruleContent;if(Y.includes(":*")&&!Y.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(Y===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if(DW(Q.toolName)&&Q.ruleContent!==void 0){let Y=Q.ruleContent;if(Y.includes(":*"))return{valid:!1,error:'The ":*" syntax is only for Bash prefix rules',suggestion:'Use glob patterns like "*" or "**" for file matching',examples:[`${Q.toolName}(*.ts) - matches .ts files`,`${Q.toolName}(src/**) - matches all files in src`,`${Q.toolName}(**/*.test.ts) - matches test files`]};if(Y.includes("*")&&!Y.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!Y.includes("**"))return{valid:!1,error:"Wildcard placement might be incorrect",suggestion:"Wildcards are typically used at path boundaries",examples:[`${Q.toolName}(*.js) - all .js files`,`${Q.toolName}(src/*) - all files directly in src`,`${Q.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var O5;var AX=B(()=>{n0();KW();h1();zW();RX();jW();O5=O(()=>K.string().superRefine((Z,X)=>{let q=DX(Z);if(!q.valid){let Q=q.error;if(q.suggestion)Q+=`. ${q.suggestion}`;if(q.examples&&q.examples.length>0)Q+=`. Examples: ${q.examples.join(", ")}`;X.addIssue({code:K.ZodIssueCode.custom,message:Q,params:{received:Z}})}}))});function $i(Z){if(!Z||typeof Z!=="object")return null;let X=TX.safeParse(Z);if(!X.success)return null;if(!X.data.enabled)return null;return X.data}var TX;var IW=B(()=>{n0();TX=K.object({enabled:K.boolean().describe("Whether auto-fix is enabled"),lint:K.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:K.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:K.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:K.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 Fi(Z){return"serverName"in Z&&Z.serverName!==void 0}function Di(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function Ai(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var gI,mI,uI,pI,dI,wW,N0;var l2=B(()=>{n0();d$();c0();h1();gG();$W();B3();AX();M5();M5();IW();e7();gI=O(()=>K.record(K.string(),K.coerce.string())),mI=O(()=>K.object({allow:K.array(O5()).optional().describe("List of permission rules for allowed operations"),deny:K.array(O5()).optional().describe("List of permission rules for denied operations"),ask:K.array(O5()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:K.enum(d6).optional().describe("Default permission mode when Claude Code needs access"),disableBypassPermissionsMode:K.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:K.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:K.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:K.array(K.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),uI=O(()=>K.object({source:c2().describe("Where to fetch the marketplace from"),installLocation:K.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:K.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),pI=O(()=>K.object({serverName:K.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:K.array(K.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:K.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return t7([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"'})),dI=O(()=>K.object({serverName:K.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:K.array(K.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:K.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return t7([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"'})),wW=["skills","agents","hooks","mcp"],N0=O(()=>K.object({$schema:K.literal(g$).optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:K.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:K.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:K.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:K.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),...e(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:K.object({issuer:K.string().url().describe("IdP issuer URL for OIDC discovery"),clientId:K.string().describe("Claude Code's client_id registered at the IdP"),callbackPort:K.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:K.object({type:K.literal("command"),command:K.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:K.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:K.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:gI().optional().describe("Environment variables to set for Claude Code sessions"),attribution:K.object({commit:K.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:K.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:K.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:mI().optional().describe("Tool usage permissions configuration"),model:K.string().optional().describe("Override the default model used by Claude Code"),availableModels:K.array(K.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:K.record(K.string(),K.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:K.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:K.array(K.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:K.array(K.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:K.array(pI()).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:K.array(dI()).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:o1().optional().describe("Custom commands to run before/after tool executions"),autoFix:TX.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:K.object({symlinkDirectories:K.array(K.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:K.array(K.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:K.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:K.object({enabled:K.boolean().optional(),diagnosticsTimeoutMs:K.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.")}).catchall(K.object({disabled:K.boolean().optional(),command:K.array(K.string()).min(1).optional(),extensions:K.array(K.string()).optional()})).optional().describe("LSP server configuration. Set enabled:false to disable the entire LSP subsystem (default: true). Set diagnosticsTimeoutMs to tune per-edit diagnostic injection (default 1500). Other keys = server names. Set disabled:true to disable a built-in server. Set command to override or add a server."),disableAllHooks:K.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:K.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:K.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:K.array(K.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:K.array(K.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:K.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:K.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:K.preprocess((Z)=>Array.isArray(Z)?Z.filter((X)=>wW.includes(X)):Z,K.union([K.boolean(),K.array(K.enum(wW))])).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:K.object({type:K.literal("command"),command:K.string(),padding:K.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:K.record(K.string(),K.union([K.array(K.string()),K.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:K.record(K.string(),uI()).check((Z)=>{for(let[X,q]of Object.entries(Z.value))if(q.source.source==="settings"&&q.source.name!==X)Z.issues.push({code:"custom",input:q.source.name,path:[X,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${X}" but source.name "${q.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:K.array(c2()).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:K.array(c2()).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:K.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:K.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:K.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:K.string().optional().describe("Controls the output style for assistant responses"),language:K.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:K.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:p$().optional(),feedbackSurveyRate:K.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:K.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:K.object({mode:K.enum(["append","replace"]),verbs:K.array(K.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:K.object({excludeDefault:K.boolean().optional(),tips:K.array(K.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:K.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:K.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:K.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:K.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:K.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:K.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:K.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:K.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:K.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:K.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:K.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:K.array(K.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:K.record(K.string(),K.object({mcpServers:K.record(K.string(),K.record(K.string(),K.union([K.string(),K.number(),K.boolean(),K.array(K.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:K.record(K.string(),K.union([K.string(),K.number(),K.boolean(),K.array(K.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:K.object({defaultEnvironmentId:K.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:K.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),...{},minimumVersion:K.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:K.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"),...{},...{},...{},channelsEnabled:K.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:K.array(K.object({marketplace:K.string(),plugin:K.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:K.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:K.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:K.string().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."),autoDreamEnabled:K.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:K.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:K.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:K.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:K.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:K.object({allow:K.array(K.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:K.array(K.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:K.array(K.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:K.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:K.array(K.object({id:K.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:K.string().describe("Display name for the SSH connection"),sshHost:K.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:K.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:K.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:K.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:K.array(K.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:K.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 jX(){let Z=kW(N0(),{unrepresentable:"any"});return m(Z,null,2)}var NW=B(()=>{n0();z0();l2()});function xW(Z){let X=cI.find((Q)=>Q.matches(Z));if(!X)return null;let q={...X.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!q.suggestion)q.suggestion=`Valid values: ${Z.enumValues.map((Q)=>`"${Q}"`).join(", ")}`;if(!q.docLink&&Z.path){let Q=Z.path.split(".")[0];if(Q)q.docLink=lI[Q]}return q}var cI,lI;var PW=B(()=>{cI=[{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'}}],lI={}});function EW(Z){return Z.code==="invalid_type"}function vW(Z){return Z.code==="invalid_value"}function nI(Z){return Z.code==="unrecognized_keys"}function yW(Z){return Z.code==="too_small"}function OX(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function CW(Z){let X=Z.match(/received (\w+)/);return X?X[1]:void 0}function n6(Z,X){return Z.issues.map((q)=>{let Q=q.path.map(String).join("."),J=q.message,$,Y,H,U,W;if(vW(q))Y=q.values.map((V)=>String(V)),H=Y.join(" | "),U=void 0,W=void 0;else if(EW(q)){H=q.expected;let V=CW(q.message);U=V??OX(q.input),W=V??OX(q.input)}else if(yW(q))H=String(q.minimum);else if(q.code==="custom"&&"params"in q)U=q.params.received,W=U;let G=xW({path:Q,code:q.code,expected:H,received:U,enumValues:Y,message:q.message,value:U});if(vW(q))$=Y?.map((V)=>`"${V}"`).join(", "),J=`Invalid value. Expected one of: ${$}`;else if(EW(q)){let V=CW(q.message)??OX(q.input);if(q.expected==="object"&&V==="null"&&Q==="")J="Invalid or malformed JSON";else J=`Expected ${q.expected}, but received ${V}`}else if(nI(q)){let V=q.keys.join(", ");J=`Unrecognized ${MW(q.keys.length,"field")}: ${V}`}else if(yW(q))J=`Number must be greater than or equal to ${q.minimum}`,$=String(q.minimum);return{file:X,path:Q,message:J,expected:$,invalidValue:W,suggestion:G?.suggestion,docLink:G?.docLink}})}function Si(Z){try{let X=X0(Z),q=N0().strict().safeParse(X);if(q.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
|
|
86
|
+
`+n6(q.error,"settings").map(($)=>`- ${$.path}: ${$.message}`).join(`
|
|
87
|
+
`),fullSchema:jX()}}catch(X){return{isValid:!1,error:`Invalid JSON: ${X instanceof Error?X.message:"Unknown parsing error"}`,fullSchema:jX()}}}function I5(Z,X){if(!Z||typeof Z!=="object")return[];let q=Z;if(!q.permissions||typeof q.permissions!=="object")return[];let Q=q.permissions,J=[];for(let $ of["allow","deny","ask"]){let Y=Q[$];if(!Array.isArray(Y))continue;Q[$]=Y.filter((H)=>{if(typeof H!=="string")return J.push({file:X,path:`permissions.${$}`,message:`Non-string value in ${$} array was removed`,invalidValue:H}),!1;let U=DX(H);if(!U.valid){let W=`Invalid permission rule "${H}" was skipped`;if(U.error)W+=`: ${U.error}`;if(U.suggestion)W+=`. ${U.suggestion}`;return J.push({file:X,path:`permissions.${$}`,message:W,invalidValue:H}),!1}return!0})}return J}var IX=B(()=>{z0();RX();AX();NW();l2();PW()});import{userInfo as iI}from"os";function gW(){let Z="";try{Z=iI().username}catch{}let X=[];if(Z)X.push({path:`/Library/Managed Preferences/${Z}/${SW}.plist`,label:"per-user managed preferences"});return X.push({path:`/Library/Managed Preferences/${SW}.plist`,label:"device-level managed preferences"}),X}var SW="com.anthropic.claudecode",w5="HKLM\\SOFTWARE\\Policies\\ClaudeCode",k5="HKCU\\SOFTWARE\\Policies\\ClaudeCode",i6="Settings",bW="/usr/bin/plutil",hW,fW=5000;var wX=B(()=>{hW=["-convert","json","-o","-","--"]});import{execFile as aI}from"child_process";import{existsSync as oI}from"fs";function kX(Z,X){return new Promise((q)=>{aI(Z,X,{encoding:"utf-8",timeout:fW},(Q,J)=>{q({stdout:J??"",code:Q?1:0})})})}function N5(){return(async()=>{if(process.platform==="darwin"){let Z=gW(),q=(await Promise.all(Z.map(async({path:Q,label:J})=>{if(!oI(Q))return{stdout:"",label:J,ok:!1};let{stdout:$,code:Y}=await kX(bW,[...hW,Q]);return{stdout:$,label:J,ok:Y===0&&!!$}}))).find((Q)=>Q.ok);return{plistStdouts:q?[{stdout:q.stdout,label:q.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,X]=await Promise.all([kX("reg",["query",w5,"/v",i6]),kX("reg",["query",k5,"/v",i6])]);return{plistStdouts:null,hklmStdout:Z.code===0?Z.stdout:null,hkcuStdout:X.code===0?X.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function pi(){if(NX)return;NX=N5()}function mW(){return NX}var NX=null;var uW=B(()=>{wX()});import{join as pW}from"path";function sI(){if(x5)return;x5=(async()=>{a6("mdm_load_start");let Z=Date.now(),X=mW()??N5(),{mdm:q,hkcu:Q}=lW(await X);PX=q,EX=Q,a6("mdm_load_end");let J=Date.now()-Z;if(P(`MDM settings load completed in ${J}ms`),Object.keys(q.settings).length>0){P(`MDM settings found: ${Object.keys(q.settings).join(", ")}`);try{Y0("info","mdm_settings_loaded",{duration_ms:J,key_count:Object.keys(q.settings).length,error_count:q.errors.length})}catch{}}})()}async function qa(){if(!x5)sI();await x5}function P5(){return PX??V1}function E5(){return EX??V1}function Qa(Z,X){PX=Z,EX=X}async function Ja(){let Z=await N5();return lW(Z)}function xX(Z,X){let q=C0(Z,!1);if(!q||typeof q!=="object")return{settings:{},errors:[]};let Q=I5(q,X),J=N0().safeParse(q);if(!J.success){let $=n6(J.error,X);return{settings:{},errors:[...Q,...$]}}return{settings:J.data,errors:Q}}function dW(Z,X="Settings"){let q=Z.split(/\r?\n/),Q=X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),J=new RegExp(`^\\s+${Q}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let $ of q){let Y=$.match(J);if(Y&&Y[1])return Y[1].trimEnd()}return null}function lW(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:X,label:q}=Z.plistStdouts[0],Q=xX(X,q);if(Object.keys(Q.settings).length>0)return{mdm:Q,hkcu:V1}}if(Z.hklmStdout){let X=dW(Z.hklmStdout);if(X){let q=xX(X,`Registry: ${w5}\\${i6}`);if(Object.keys(q.settings).length>0)return{mdm:q,hkcu:V1}}}if(rI())return{mdm:V1,hkcu:V1};if(Z.hkcuStdout){let X=dW(Z.hkcuStdout);if(X){let q=xX(X,`Registry: ${k5}\\${i6}`);return{mdm:V1,hkcu:q}}}return{mdm:V1,hkcu:V1}}function rI(){try{let Z=pW(D1(),"managed-settings.json"),X=q1(Z),q=C0(X,!1);if(q&&typeof q==="object"&&Object.keys(q).length>0)return!0}catch{}try{let Z=T2(),X=N().readdirSync(Z);for(let q of X){if(!(q.isFile()||q.isSymbolicLink())||!q.name.endsWith(".json")||q.name.startsWith("."))continue;try{let Q=q1(pW(Z,q.name)),J=C0(Q,!1);if(J&&typeof J==="object"&&Object.keys(J).length>0)return!0}catch{}}}catch{}return!1}var V1,PX=null,EX=null,x5=null;var nW=B(()=>{M1();H2();W2();F0();h4();cW();g4();l2();IX();wX();uW();V1=Object.freeze({settings:{},errors:[]})});import{dirname as qV,join as v5,resolve as n2}from"path";function bX(){return v5(D1(),"managed-settings.json")}function hX(){let Z=[],X={},q=!1,{settings:Q,errors:J}=i2(bX());if(Z.push(...J),Q&&Object.keys(Q).length>0)X=X1(X,Q,s1),q=!0;let $=T2();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:U,errors:W}=i2(v5($,H));if(Z.push(...W),U&&Object.keys(U).length>0)X=X1(X,U,s1),q=!0}}catch(Y){let H=W0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")g(Y)}return{settings:q?X:null,errors:Z}}function va(){let{settings:Z}=i2(bX()),X=!!Z&&Object.keys(Z).length>0,q=!1,Q=T2();try{q=N().readdirSync(Q).some((J)=>(J.isFile()||J.isSymbolicLink())&&J.name.endsWith(".json")&&!J.name.startsWith("."))}catch{}return{hasBase:X,hasDropIns:q}}function QV(Z,X){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")P(`Broken symlink or missing file encountered for settings.json at path: ${X}`);else g(Z)}function i2(Z){let X=tW(Z);if(X)return{settings:X.settings?yX(X.settings):null,errors:X.errors};let q=tI(Z);return eW(Z,q),{settings:q.settings?yX(q.settings):null,errors:q.errors}}function tI(Z){try{let{resolvedPath:X}=F1(N(),Z),q=q1(X);if(q.trim()==="")return{settings:{},errors:[]};let Q=C0(q,!1),J=I5(Q,Z),$=N0().safeParse(Q);if(!$.success){let Y=n6($.error,Z);return{settings:null,errors:[...J,...Y]}}return{settings:$.data,errors:J}}catch(X){return QV(X,Z),{settings:null,errors:[]}}}function iW(Z){switch(Z){case"userSettings":return n2(K0());case"policySettings":case"projectSettings":case"localSettings":return n2(r1());case"flagSettings":{let X=CX();return X?qV(n2(X)):n2(r1())}}}function eI(){if(XV()||e(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function y5(Z){switch(Z){case"userSettings":return v5(iW(Z),eI());case"projectSettings":case"localSettings":return v5(iW(Z),JV(Z));case"policySettings":return bX();case"flagSettings":return CX()}}function JV(Z){switch(Z){case"projectSettings":return".claudin/settings.json";case"localSettings":return".claudin/settings.local.json"}}function n(Z){let X=sW(Z);if(X!==void 0)return X;let q=$V(Z);return rW(Z,q),q}function $V(Z){if(Z==="policySettings"){let Q=P4();if(Q&&Object.keys(Q).length>0)return Q;let J=P5();if(Object.keys(J.settings).length>0)return J.settings;let{settings:$}=hX();if($)return $;let Y=E5();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let X=y5(Z),{settings:q}=X?i2(X):{settings:null};if(Z==="flagSettings"){let Q=SX();if(Q){let J=N0().safeParse(Q);if(J.success)return X1(q||{},J.data,s1)}}return q}function ya(){let Z=P4();if(Z&&Object.keys(Z).length>0)return"remote";let X=P5();if(Object.keys(X.settings).length>0)return y0()==="macos"?"plist":"hklm";let{settings:q}=hX();if(q)return"file";let Q=E5();if(Object.keys(Q.settings).length>0)return"hkcu";return null}function Ca(Z,X){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let q=y5(Z);if(!q)return{error:null};try{N().mkdirSync(qV(q));let Q=$V(Z);if(!Q){let $=null;try{$=q1(q)}catch(Y){if(!M6(Y))throw Y}if($!==null){let Y=C0($);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${q}`)};if(Y&&typeof Y==="object")Q=Y,P(`Using raw settings from ${q} due to validation failure`)}}let J=X1(Q||{},X,($,Y,H,U)=>{if(Y===void 0&&U&&typeof H==="string"){delete U[H];return}if(Array.isArray(Y))return Y;return});if(m$(q),F6(q,m(J,null,2)+`
|
|
88
|
+
`),B2(),Z==="localSettings")A$(JV("localSettings"),r1())}catch(Q){let J=Error(`Failed to read raw settings from ${q}: ${Q}`);return g(J),{error:J}}return{error:null}}function Zw(Z,X){return K$([...Z,...X])}function s1(Z,X){if(Array.isArray(Z)&&Array.isArray(X))return Zw(Z,X);return}function Sa(Z){let X=N0().strip().parse(Z),q=["permissions","sandbox","hooks"],Q=[],J={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(X))if(q.includes($)&&X[$]&&typeof X[$]==="object"){let Y=X[$],H=J[$];if(H){for(let U of Object.keys(Y))if(H.has(U))Q.push(`${$}.${U}`)}}else Q.push($);return Q.sort()}function Xw(){if(vX)return{settings:{},errors:[]};let Z=Date.now();a6("loadSettingsFromDisk_start"),Y0("info","settings_load_started"),vX=!0;try{let X=ZV(),q={};if(X)q=X1(q,X,s1);let Q=[],J=new Set,$=new Set;for(let Y of A2()){if(Y==="policySettings"){let U=null,W=[],G=P4();if(G&&Object.keys(G).length>0){let V=N0().safeParse(G);if(V.success)U=V.data;else W.push(...n6(V.error,"remote managed settings"))}if(!U){let V=P5();if(Object.keys(V.settings).length>0)U=V.settings;W.push(...V.errors)}if(!U){let{settings:V,errors:_}=hX();if(V)U=V;W.push(..._)}if(!U){let V=E5();if(Object.keys(V.settings).length>0)U=V.settings;W.push(...V.errors)}if(U)q=X1(q,U,s1);for(let V of W){let _=`${V.file}:${V.path}:${V.message}`;if(!J.has(_))J.add(_),Q.push(V)}continue}let H=y5(Y);if(H){let U=n2(H);if(!$.has(U)){$.add(U);let{settings:W,errors:G}=i2(H);for(let V of G){let _=`${V.file}:${V.path}:${V.message}`;if(!J.has(_))J.add(_),Q.push(V)}if(W)q=X1(q,W,s1)}}if(Y==="flagSettings"){let U=SX();if(U){let W=N0().safeParse(U);if(W.success)q=X1(q,W.data,s1)}}}return Y0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:$.size,error_count:Q.length}),{settings:q,errors:Q}}finally{vX=!1}}function C5(){let{settings:Z}=qw();return Z||{}}function ha(){B2();let Z=[];for(let X of A2()){let q=n(X);if(q&&Object.keys(q).length>0)Z.push({source:X,settings:q})}return{effective:C5(),sources:Z}}function qw(){let Z=aW();if(Z!==null)return Z;let X=Xw();return a6("loadSettingsFromDisk_end"),oW(X),X}function fa(){return!!(n("userSettings")?.skipDangerousModePermissionPrompt||n("localSettings")?.skipDangerousModePermissionPrompt||n("flagSettings")?.skipDangerousModePermissionPrompt||n("policySettings")?.skipDangerousModePermissionPrompt)}function ga(){return!!(n("userSettings")?.permissions?.allowBypassPermissionsMode||n("localSettings")?.permissions?.allowBypassPermissionsMode||n("flagSettings")?.permissions?.allowBypassPermissionsMode||n("policySettings")?.permissions?.allowBypassPermissionsMode)}function ma(){{let Z=n("userSettings")?.skipAutoPermissionPrompt,X=n("localSettings")?.skipAutoPermissionPrompt,q=n("flagSettings")?.skipAutoPermissionPrompt,Q=n("policySettings")?.skipAutoPermissionPrompt,J=!!(Z||X||q||Q);return P(`[auto-mode] hasAutoModeOptIn=${J} skipAutoPermissionPrompt: user=${Z} local=${X} flag=${q} policy=${Q}`),J}return!1}function ua(){return n("policySettings")?.useAutoModeDuringPlan!==!1&&n("flagSettings")?.useAutoModeDuringPlan!==!1&&n("userSettings")?.useAutoModeDuringPlan!==!1&&n("localSettings")?.useAutoModeDuringPlan!==!1}function pa(){{let Z=K.object({allow:K.array(K.string()).optional(),soft_deny:K.array(K.string()).optional(),deny:K.array(K.string()).optional(),environment:K.array(K.string()).optional()}),X=[],q=[],Q=[];for(let J of["userSettings","localSettings","flagSettings","policySettings"]){let $=n(J);if(!$)continue;let Y=Z.safeParse($.autoMode);if(Y.success){if(Y.data.allow)X.push(...Y.data.allow);if(Y.data.soft_deny)q.push(...Y.data.soft_deny);if(Y.data.environment)Q.push(...Y.data.environment)}}if(X.length>0||q.length>0||Q.length>0)return{...X.length>0&&{allow:X},...q.length>0&&{soft_deny:q},...Q.length>0&&{environment:Q}}}return}function da(Z){for(let X of A2()){if(X==="policySettings")continue;let q=y5(X);if(!q)continue;try{let{resolvedPath:Q}=F1(N(),q),J=q1(Q);if(!J.trim())continue;let $=C0(J,!1);if($&&typeof $==="object"&&Z in $)return!0}catch(Q){QV(Q,q)}}return!1}var vX=!1,ba;var YV=B(()=>{$$();n0();T6();H$();e7();M1();H2();c0();C1();E4();W2();F0();T$();h4();p0();V6();z0();cW();B3();u$();g4();nW();Y$();l2();IX();ba=C5});import{homedir as Qw}from"os";import{isAbsolute as Jw,join as b5,normalize as fX,sep as UV}from"path";function GV(){let Z=process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY;if(e(Z))return!1;if(KV(Z))return!0;if(e(process.env.CLAUDE_CODE_SIMPLE))return!1;if(e(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let X=C5();if(X.autoMemoryEnabled!==void 0)return X.autoMemoryEnabled;return!0}function Zo(){if(!S1("tengu_passport_quail",!1))return!1;return!HV()||S1("tengu_slate_thimble",!1)}function $w(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return K0()}function WV(Z,X){if(!Z)return;let q=Z;if(X&&(q.startsWith("~/")||q.startsWith("~\\"))){let J=q.slice(2),$=fX(J||".");if($==="."||$==="..")return;q=b5(Qw(),J)}let Q=fX(q).replace(/[/\\]+$/,"");if(!Jw(Q)||Q.length<3||/^[A-Za-z]:$/.test(Q)||Q.startsWith("\\\\")||Q.startsWith("//")||Q.includes("\x00"))return;return(Q+UV).normalize("NFC")}function VV(){return WV(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function Kw(){let Z=n("policySettings")?.autoMemoryDirectory??n("flagSettings")?.autoMemoryDirectory??n("localSettings")?.autoMemoryDirectory??n("userSettings")?.autoMemoryDirectory;return WV(Z,!0)}function Xo(){return VV()!==void 0}function Uw(){return h5(S5())??S5()}function BV(){return b5(a2(),Hw)}function qo(Z){return fX(Z).startsWith(a2())}var Yw="memory",Hw="MEMORY.md",a2;var gX=B(()=>{v1();T6();q3();c0();_2();j4();YV();a2=d(()=>{let Z=VV()??Kw();if(Z)return Z;let X=b5($w(),"projects");return(b5(X,p7(Uw()),Yw)+UV).normalize("NFC")},()=>S5())});var _V=p((Jo,LV)=>{var k1=H0("constants"),Gw=process.cwd,f5=null,Ww=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!f5)f5=Gw.call(process);return f5};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(g5=process.chdir,process.chdir=function(Z){f5=null,g5.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,g5)}var g5;LV.exports=Vw;function Vw(Z){if(k1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))X(Z);if(!Z.lutimes)q(Z);if(Z.chown=$(Z.chown),Z.fchown=$(Z.fchown),Z.lchown=$(Z.lchown),Z.chmod=Q(Z.chmod),Z.fchmod=Q(Z.fchmod),Z.lchmod=Q(Z.lchmod),Z.chownSync=Y(Z.chownSync),Z.fchownSync=Y(Z.fchownSync),Z.lchownSync=Y(Z.lchownSync),Z.chmodSync=J(Z.chmodSync),Z.fchmodSync=J(Z.fchmodSync),Z.lchmodSync=J(Z.lchmodSync),Z.stat=H(Z.stat),Z.fstat=H(Z.fstat),Z.lstat=H(Z.lstat),Z.statSync=U(Z.statSync),Z.fstatSync=U(Z.fstatSync),Z.lstatSync=U(Z.lstatSync),Z.chmod&&!Z.lchmod)Z.lchmod=function(G,V,_){if(_)process.nextTick(_)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(G,V,_,L){if(L)process.nextTick(L)},Z.lchownSync=function(){};if(Ww==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(G){function V(_,L,z){var R=Date.now(),D=0;G(_,L,function M(k){if(k&&(k.code==="EACCES"||k.code==="EPERM"||k.code==="EBUSY")&&Date.now()-R<60000){if(setTimeout(function(){Z.stat(L,function(F,I){if(F&&F.code==="ENOENT")G(_,L,M);else z(k)})},D),D<100)D+=10;return}if(z)z(k)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,G);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(G){function V(_,L,z,R,D,M){var k;if(M&&typeof M==="function"){var F=0;k=function(I,T,j){if(I&&I.code==="EAGAIN"&&F<10)return F++,G.call(Z,_,L,z,R,D,k);M.apply(this,arguments)}}return G.call(Z,_,L,z,R,D,k)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,G);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(G){return function(V,_,L,z,R){var D=0;while(!0)try{return G.call(Z,V,_,L,z,R)}catch(M){if(M.code==="EAGAIN"&&D<10){D++;continue}throw M}}}(Z.readSync);function X(G){G.lchmod=function(V,_,L){G.open(V,k1.O_WRONLY|k1.O_SYMLINK,_,function(z,R){if(z){if(L)L(z);return}G.fchmod(R,_,function(D){G.close(R,function(M){if(L)L(D||M)})})})},G.lchmodSync=function(V,_){var L=G.openSync(V,k1.O_WRONLY|k1.O_SYMLINK,_),z=!0,R;try{R=G.fchmodSync(L,_),z=!1}finally{if(z)try{G.closeSync(L)}catch(D){}else G.closeSync(L)}return R}}function q(G){if(k1.hasOwnProperty("O_SYMLINK")&&G.futimes)G.lutimes=function(V,_,L,z){G.open(V,k1.O_SYMLINK,function(R,D){if(R){if(z)z(R);return}G.futimes(D,_,L,function(M){G.close(D,function(k){if(z)z(M||k)})})})},G.lutimesSync=function(V,_,L){var z=G.openSync(V,k1.O_SYMLINK),R,D=!0;try{R=G.futimesSync(z,_,L),D=!1}finally{if(D)try{G.closeSync(z)}catch(M){}else G.closeSync(z)}return R};else if(G.futimes)G.lutimes=function(V,_,L,z){if(z)process.nextTick(z)},G.lutimesSync=function(){}}function Q(G){if(!G)return G;return function(V,_,L){return G.call(Z,V,_,function(z){if(W(z))z=null;if(L)L.apply(this,arguments)})}}function J(G){if(!G)return G;return function(V,_){try{return G.call(Z,V,_)}catch(L){if(!W(L))throw L}}}function $(G){if(!G)return G;return function(V,_,L,z){return G.call(Z,V,_,L,function(R){if(W(R))R=null;if(z)z.apply(this,arguments)})}}function Y(G){if(!G)return G;return function(V,_,L){try{return G.call(Z,V,_,L)}catch(z){if(!W(z))throw z}}}function H(G){if(!G)return G;return function(V,_,L){if(typeof _==="function")L=_,_=null;function z(R,D){if(D){if(D.uid<0)D.uid+=4294967296;if(D.gid<0)D.gid+=4294967296}if(L)L.apply(this,arguments)}return _?G.call(Z,V,_,z):G.call(Z,V,z)}}function U(G){if(!G)return G;return function(V,_){var L=_?G.call(Z,V,_):G.call(Z,V);if(L){if(L.uid<0)L.uid+=4294967296;if(L.gid<0)L.gid+=4294967296}return L}}function W(G){if(!G)return!0;if(G.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(G.code==="EINVAL"||G.code==="EPERM")return!0}return!1}}});var MV=p(($o,RV)=>{var zV=H0("stream").Stream;RV.exports=Bw;function Bw(Z){return{ReadStream:X,WriteStream:q};function X(Q,J){if(!(this instanceof X))return new X(Q,J);zV.call(this);var $=this;this.path=Q,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,J=J||{};var Y=Object.keys(J);for(var H=0,U=Y.length;H<U;H++){var W=Y[H];this[W]=J[W]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){$._read()});return}Z.open(this.path,this.flags,this.mode,function(G,V){if(G){$.emit("error",G),$.readable=!1;return}$.fd=V,$.emit("open",V),$._read()})}function q(Q,J){if(!(this instanceof q))return new q(Q,J);zV.call(this),this.path=Q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,J=J||{};var $=Object.keys(J);for(var Y=0,H=$.length;Y<H;Y++){var U=$[Y];this[U]=J[U]}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 DV=p((Yo,FV)=>{FV.exports=_w;var Lw=Object.getPrototypeOf||function(Z){return Z.__proto__};function _w(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var X={__proto__:Lw(Z)};else var X=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(q){Object.defineProperty(X,q,Object.getOwnPropertyDescriptor(Z,q))}),X}});var cX=p((Ho,dX)=>{var i=H0("fs"),zw=_V(),Rw=MV(),Mw=DV(),m5=H0("util"),V0,p5;if(typeof Symbol==="function"&&typeof Symbol.for==="function")V0=Symbol.for("graceful-fs.queue"),p5=Symbol.for("graceful-fs.previous");else V0="___graceful-fs.queue",p5="___graceful-fs.previous";function Fw(){}function TV(Z,X){Object.defineProperty(Z,V0,{get:function(){return X}})}var t1=Fw;if(m5.debuglog)t1=m5.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))t1=function(){var Z=m5.format.apply(m5,arguments);Z="GFS4: "+Z.split(/\n/).join(`
|
|
89
|
+
GFS4: `),console.error(Z)};if(!i[V0]){if(mX=global[V0]||[],TV(i,mX),i.close=function(Z){function X(q,Q){return Z.call(i,q,function(J){if(!J)AV();if(typeof Q==="function")Q.apply(this,arguments)})}return Object.defineProperty(X,p5,{value:Z}),X}(i.close),i.closeSync=function(Z){function X(q){Z.apply(i,arguments),AV()}return Object.defineProperty(X,p5,{value:Z}),X}(i.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){t1(i[V0]),H0("assert").equal(i[V0].length,0)})}var mX;if(!global[V0])TV(global,i[V0]);dX.exports=uX(Mw(i));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched)dX.exports=uX(i),i.__patched=!0;function uX(Z){zw(Z),Z.gracefulify=uX,Z.createReadStream=T,Z.createWriteStream=j;var X=Z.readFile;Z.readFile=q;function q(w,x,v){if(typeof x==="function")v=x,x=null;return b(w,x,v);function b(r,E,y,u){return X(r,E,function(h){if(h&&(h.code==="EMFILE"||h.code==="ENFILE"))o6([b,[r,E,y],h,u||Date.now(),Date.now()]);else if(typeof y==="function")y.apply(this,arguments)})}}var Q=Z.writeFile;Z.writeFile=J;function J(w,x,v,b){if(typeof v==="function")b=v,v=null;return r(w,x,v,b);function r(E,y,u,h,U0){return Q(E,y,u,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))o6([r,[E,y,u,h],c,U0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var $=Z.appendFile;if($)Z.appendFile=Y;function Y(w,x,v,b){if(typeof v==="function")b=v,v=null;return r(w,x,v,b);function r(E,y,u,h,U0){return $(E,y,u,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))o6([r,[E,y,u,h],c,U0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=U;function U(w,x,v,b){if(typeof v==="function")b=v,v=0;return r(w,x,v,b);function r(E,y,u,h,U0){return H(E,y,u,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))o6([r,[E,y,u,h],c,U0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var W=Z.readdir;Z.readdir=V;var G=/^v[0-5]\./;function V(w,x,v){if(typeof x==="function")v=x,x=null;var b=G.test(process.version)?function(y,u,h,U0){return W(y,r(y,u,h,U0))}:function(y,u,h,U0){return W(y,u,r(y,u,h,U0))};return b(w,x,v);function r(E,y,u,h){return function(U0,c){if(U0&&(U0.code==="EMFILE"||U0.code==="ENFILE"))o6([b,[E,y,u],U0,h||Date.now(),Date.now()]);else{if(c&&c.sort)c.sort();if(typeof u==="function")u.call(this,U0,c)}}}}if(process.version.substr(0,4)==="v0.8"){var _=Rw(Z);M=_.ReadStream,F=_.WriteStream}var L=Z.ReadStream;if(L)M.prototype=Object.create(L.prototype),M.prototype.open=k;var z=Z.WriteStream;if(z)F.prototype=Object.create(z.prototype),F.prototype.open=I;Object.defineProperty(Z,"ReadStream",{get:function(){return M},set:function(w){M=w},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return F},set:function(w){F=w},enumerable:!0,configurable:!0});var R=M;Object.defineProperty(Z,"FileReadStream",{get:function(){return R},set:function(w){R=w},enumerable:!0,configurable:!0});var D=F;Object.defineProperty(Z,"FileWriteStream",{get:function(){return D},set:function(w){D=w},enumerable:!0,configurable:!0});function M(w,x){if(this instanceof M)return L.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function k(){var w=this;f(w.path,w.flags,w.mode,function(x,v){if(x){if(w.autoClose)w.destroy();w.emit("error",x)}else w.fd=v,w.emit("open",v),w.read()})}function F(w,x){if(this instanceof F)return z.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function I(){var w=this;f(w.path,w.flags,w.mode,function(x,v){if(x)w.destroy(),w.emit("error",x);else w.fd=v,w.emit("open",v)})}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=f;function f(w,x,v,b){if(typeof v==="function")b=v,v=null;return r(w,x,v,b);function r(E,y,u,h,U0){return A(E,y,u,function(c,kx){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))o6([r,[E,y,u,h],c,U0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}return Z}function o6(Z){t1("ENQUEUE",Z[0].name,Z[1]),i[V0].push(Z),pX()}var u5;function AV(){var Z=Date.now();for(var X=0;X<i[V0].length;++X)if(i[V0][X].length>2)i[V0][X][3]=Z,i[V0][X][4]=Z;pX()}function pX(){if(clearTimeout(u5),u5=void 0,i[V0].length===0)return;var Z=i[V0].shift(),X=Z[0],q=Z[1],Q=Z[2],J=Z[3],$=Z[4];if(J===void 0)t1("RETRY",X.name,q),X.apply(null,q);else if(Date.now()-J>=60000){t1("TIMEOUT",X.name,q);var Y=q.pop();if(typeof Y==="function")Y.call(null,Q)}else{var H=Date.now()-$,U=Math.max($-J,1),W=Math.min(U*1.2,100);if(H>=W)t1("RETRY",X.name,q),X.apply(null,q.concat([J]));else i[V0].push(Z)}if(u5===void 0)u5=setTimeout(pX,0)}});var OV=p((Ko,jV)=>{function x0(Z,X){if(typeof X==="boolean")X={forever:X};if(this._originalTimeouts=JSON.parse(JSON.stringify(Z)),this._timeouts=Z,this._options=X||{},this._maxRetryTime=X&&X.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)}jV.exports=x0;x0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};x0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};x0.prototype.retry=function(Z){if(this._timeout)clearTimeout(this._timeout);if(!Z)return!1;var X=new Date().getTime();if(Z&&X-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(Z);var q=this._timeouts.shift();if(q===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),q=this._timeouts.shift();else return!1;var Q=this,J=setTimeout(function(){if(Q._attempts++,Q._operationTimeoutCb){if(Q._timeout=setTimeout(function(){Q._operationTimeoutCb(Q._attempts)},Q._operationTimeout),Q._options.unref)Q._timeout.unref()}Q._fn(Q._attempts)},q);if(this._options.unref)J.unref();return!0};x0.prototype.attempt=function(Z,X){if(this._fn=Z,X){if(X.timeout)this._operationTimeout=X.timeout;if(X.cb)this._operationTimeoutCb=X.cb}var q=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){q._operationTimeoutCb()},q._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};x0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};x0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};x0.prototype.start=x0.prototype.try;x0.prototype.errors=function(){return this._errors};x0.prototype.attempts=function(){return this._attempts};x0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},X=null,q=0;for(var Q=0;Q<this._errors.length;Q++){var J=this._errors[Q],$=J.message,Y=(Z[$]||0)+1;if(Z[$]=Y,Y>=q)X=J,q=Y}return X}});var wV=p((Aw)=>{var Dw=OV();Aw.operation=function(Z){var X=Aw.timeouts(Z);return new Dw(X,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};Aw.timeouts=function(Z){if(Z instanceof Array)return[].concat(Z);var X={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var q in Z)X[q]=Z[q];if(X.minTimeout>X.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Q=[];for(var J=0;J<X.retries;J++)Q.push(this.createTimeout(J,X));if(Z&&Z.forever&&!Q.length)Q.push(this.createTimeout(J,X));return Q.sort(function($,Y){return $-Y}),Q};Aw.createTimeout=function(Z,X){var q=X.randomize?Math.random()+1:1,Q=Math.round(q*X.minTimeout*Math.pow(X.factor,Z));return Q=Math.min(Q,X.maxTimeout),Q};Aw.wrap=function(Z,X,q){if(X instanceof Array)q=X,X=null;if(!q){q=[];for(var Q in Z)if(typeof Z[Q]==="function")q.push(Q)}for(var J=0;J<q.length;J++){var $=q[J],Y=Z[$];Z[$]=function(U){var W=Aw.operation(X),G=Array.prototype.slice.call(arguments,1),V=G.pop();G.push(function(_){if(W.retry(_))return;if(_)arguments[0]=W.mainError();V.apply(this,arguments)}),W.attempt(function(){U.apply(Z,G)})}.bind(Z,Y),Z[$].options=X}}});var kV=p((Go,d5)=>{d5.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")d5.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")d5.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var NV=p((Wo,r6)=>{var l=global.process,e1=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(!e1(l))r6.exports=function(){return function(){}};else{if(lX=H0("assert"),Z6=kV(),nX=/^win/i.test(l.platform),s6=H0("events"),typeof s6!=="function")s6=s6.EventEmitter;if(l.__signal_exit_emitter__)Q0=l.__signal_exit_emitter__;else Q0=l.__signal_exit_emitter__=new s6,Q0.count=0,Q0.emitted={};if(!Q0.infinite)Q0.setMaxListeners(1/0),Q0.infinite=!0;r6.exports=function(Z,X){if(!e1(global.process))return function(){};if(lX.equal(typeof Z,"function","a callback must be provided for exit handler"),X6===!1)c5();var q="exit";if(X&&X.alwaysLast)q="afterexit";var Q=function(){if(Q0.removeListener(q,Z),Q0.listeners("exit").length===0&&Q0.listeners("afterexit").length===0)o2()};return Q0.on(q,Z),Q},o2=function(){if(!X6||!e1(global.process))return;X6=!1,Z6.forEach(function(X){try{l.removeListener(X,s2[X])}catch(q){}}),l.emit=r2,l.reallyExit=l5,Q0.count-=1},r6.exports.unload=o2,N1=function(X,q,Q){if(Q0.emitted[X])return;Q0.emitted[X]=!0,Q0.emit(X,q,Q)},s2={},Z6.forEach(function(Z){s2[Z]=function(){if(!e1(global.process))return;var q=l.listeners(Z);if(q.length===Q0.count){if(o2(),N1("exit",null,Z),N1("afterexit",null,Z),nX&&Z==="SIGHUP")Z="SIGINT";l.kill(l.pid,Z)}}}),r6.exports.signals=function(){return Z6},X6=!1,c5=function(){if(X6||!e1(global.process))return;X6=!0,Q0.count+=1,Z6=Z6.filter(function(X){try{return l.on(X,s2[X]),!0}catch(q){return!1}}),l.emit=aX,l.reallyExit=iX},r6.exports.load=c5,l5=l.reallyExit,iX=function(X){if(!e1(global.process))return;l.exitCode=X||0,N1("exit",l.exitCode,null),N1("afterexit",l.exitCode,null),l5.call(l,l.exitCode)},r2=l.emit,aX=function(X,q){if(X==="exit"&&e1(global.process)){if(q!==void 0)l.exitCode=q;var Q=r2.apply(this,arguments);return N1("exit",l.exitCode,null),N1("afterexit",l.exitCode,null),Q}else return r2.apply(this,arguments)}}var lX,Z6,nX,s6,Q0,o2,N1,s2,X6,c5,l5,iX,r2,aX});var PV=p((kw,oX)=>{var xV=Symbol();function Iw(Z,X,q){let Q=X[xV];if(Q)return X.stat(Z,($,Y)=>{if($)return q($);q(null,Y.mtime,Q)});let J=new Date(Math.ceil(Date.now()/1000)*1000+5);X.utimes(Z,J,J,($)=>{if($)return q($);X.stat(Z,(Y,H)=>{if(Y)return q(Y);let U=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(X,xV,{value:U}),q(null,H.mtime,U)})})}function ww(Z){let X=Date.now();if(Z==="s")X=Math.ceil(X/1000)*1000;return new Date(X)}kw.probe=Iw;kw.getMtime=ww});var SV=p((bw,e2)=>{var Pw=H0("path"),tX=cX(),Ew=wV(),vw=NV(),EV=PV(),B1={};function t2(Z,X){return X.lockfilePath||`${Z}.lock`}function eX(Z,X,q){if(!X.realpath)return q(null,Pw.resolve(Z));X.fs.realpath(Z,q)}function rX(Z,X,q){let Q=t2(Z,X);X.fs.mkdir(Q,(J)=>{if(!J)return EV.probe(Q,X.fs,($,Y,H)=>{if($)return X.fs.rmdir(Q,()=>{}),q($);q(null,Y,H)});if(J.code!=="EEXIST")return q(J);if(X.stale<=0)return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));X.fs.stat(Q,($,Y)=>{if($){if($.code==="ENOENT")return rX(Z,{...X,stale:0},q);return q($)}if(!vV(Y,X))return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));yV(Z,X,(H)=>{if(H)return q(H);rX(Z,{...X,stale:0},q)})})})}function vV(Z,X){return Z.mtime.getTime()<Date.now()-X.stale}function yV(Z,X,q){X.fs.rmdir(t2(Z,X),(Q)=>{if(Q&&Q.code!=="ENOENT")return q(Q);q()})}function n5(Z,X){let q=B1[Z];if(q.updateTimeout)return;if(q.updateDelay=q.updateDelay||X.update,q.updateTimeout=setTimeout(()=>{q.updateTimeout=null,X.fs.stat(q.lockfilePath,(Q,J)=>{let $=q.lastUpdate+X.stale<Date.now();if(Q){if(Q.code==="ENOENT"||$)return sX(Z,q,Object.assign(Q,{code:"ECOMPROMISED"}));return q.updateDelay=1000,n5(Z,X)}if(q.mtime.getTime()!==J.mtime.getTime())return sX(Z,q,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=EV.getMtime(q.mtimePrecision);X.fs.utimes(q.lockfilePath,H,H,(U)=>{let W=q.lastUpdate+X.stale<Date.now();if(q.released)return;if(U){if(U.code==="ENOENT"||W)return sX(Z,q,Object.assign(U,{code:"ECOMPROMISED"}));return q.updateDelay=1000,n5(Z,X)}q.mtime=H,q.lastUpdate=Date.now(),q.updateDelay=null,n5(Z,X)})})},q.updateDelay),q.updateTimeout.unref)q.updateTimeout.unref()}function sX(Z,X,q){if(X.released=!0,X.updateTimeout)clearTimeout(X.updateTimeout);if(B1[Z]===X)delete B1[Z];X.options.onCompromised(q)}function yw(Z,X,q){X={stale:1e4,update:null,realpath:!0,retries:0,fs:tX,onCompromised:(Q)=>{throw Q},...X},X.retries=X.retries||0,X.retries=typeof X.retries==="number"?{retries:X.retries}:X.retries,X.stale=Math.max(X.stale||0,2000),X.update=X.update==null?X.stale/2:X.update||0,X.update=Math.max(Math.min(X.update,X.stale/2),1000),eX(Z,X,(Q,J)=>{if(Q)return q(Q);let $=Ew.operation(X.retries);$.attempt(()=>{rX(J,X,(Y,H,U)=>{if($.retry(Y))return;if(Y)return q($.mainError());let W=B1[J]={lockfilePath:t2(J,X),mtime:H,mtimePrecision:U,options:X,lastUpdate:Date.now()};n5(J,X),q(null,(G)=>{if(W.released)return G&&G(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));CV(J,{...X,realpath:!1},G)})})})})}function CV(Z,X,q){X={fs:tX,realpath:!0,...X},eX(Z,X,(Q,J)=>{if(Q)return q(Q);let $=B1[J];if(!$)return q(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));$.updateTimeout&&clearTimeout($.updateTimeout),$.released=!0,delete B1[J],yV(J,X,q)})}function Cw(Z,X,q){X={stale:1e4,realpath:!0,fs:tX,...X},X.stale=Math.max(X.stale||0,2000),eX(Z,X,(Q,J)=>{if(Q)return q(Q);X.fs.stat(t2(J,X),($,Y)=>{if($)return $.code==="ENOENT"?q(null,!1):q($);return q(null,!vV(Y,X))})})}function Sw(){return B1}vw(()=>{for(let Z in B1){let X=B1[Z].options;try{X.fs.rmdirSync(t2(Z,X))}catch(q){}}});bw.lock=yw;bw.unlock=CV;bw.check=Cw;bw.getLocks=Sw});var hV=p((Vo,bV)=>{var uw=cX();function pw(Z){let X=["mkdir","realpath","stat","rmdir","utimes"],q={...Z};return X.forEach((Q)=>{q[Q]=(...J)=>{let $=J.pop(),Y;try{Y=Z[`${Q}Sync`](...J)}catch(H){return $(H)}$(null,Y)}}),q}function dw(Z){return(...X)=>new Promise((q,Q)=>{X.push((J,$)=>{if(J)Q(J);else q($)}),Z(...X)})}function cw(Z){return(...X)=>{let q,Q;if(X.push((J,$)=>{q=J,Q=$}),Z(...X),q)throw q;return Q}}function lw(Z){if(Z={...Z},Z.fs=pw(Z.fs||uw),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}bV.exports={toPromise:dw,toSync:cw,toSyncOptions:lw}});var gV=p((Bo,x1)=>{var t6=SV(),{toPromise:i5,toSync:a5,toSyncOptions:Zq}=hV();async function fV(Z,X){let q=await i5(t6.lock)(Z,X);return i5(q)}function nw(Z,X){let q=a5(t6.lock)(Z,Zq(X));return a5(q)}function iw(Z,X){return i5(t6.unlock)(Z,X)}function aw(Z,X){return a5(t6.unlock)(Z,Zq(X))}function ow(Z,X){return i5(t6.check)(Z,X)}function sw(Z,X){return a5(t6.check)(Z,Zq(X))}x1.exports=fV;x1.exports.lock=fV;x1.exports.unlock=iw;x1.exports.lockSync=nw;x1.exports.unlockSync=aw;x1.exports.check=ow;x1.exports.checkSync=sw});function qq(){if(!Xq)Xq=gV();return Xq}function Lo(Z,X){return qq().lock(Z,X)}function mV(Z,X){return qq().lockSync(Z,X)}function _o(Z,X){return qq().check(Z,X)}var Xq;var uV=()=>{};function tw(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"essential-traffic";if(process.env.DISABLE_TELEMETRY)return"no-telemetry";return"default"}function pV(){return tw()==="essential-traffic"}function dV(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";return null}var Qq=()=>{};import{dirname as ew,join as cV}from"path";function nV(Z){return[cV(Z,o5),cV(Z,lV)]}function Zk(Z,X){let[q,Q]=nV(Z);return X(q)?q:Q}function Xk(Z,X){return nV(Z).some((q)=>X(q))}function Mo(Z,X){let q=Z;while(!0){if(Xk(q,X))return Zk(q,X);let Q=ew(q);if(Q===q)return null;q=Q}}function Fo(Z){return Z===o5||Z===lV}var o5="AGENTS.md",lV="CLAUDE.md";var iV=()=>{};var qk,Qk;var aV=B(()=>{qk=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","os_native","notifications_disabled"],Qk=["normal","vim"]});var XB={};GX(XB,{validateTeamMemWritePath:()=>Hk,validateTeamMemKey:()=>Kk,isTeamMemoryEnabled:()=>rV,isTeamMemPath:()=>ZB,isTeamMemFile:()=>Uk,getTeamMemPath:()=>Z4,getTeamMemEntrypoint:()=>Yk,PathTraversalError:()=>_0});import{lstat as Jk,realpath as sV}from"fs/promises";import{dirname as oV,join as s5,resolve as Jq,sep as $q}from"path";function $k(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path key: "${Z}"`);let X;try{X=decodeURIComponent(Z)}catch{X=Z}if(X!==Z&&(X.includes("..")||X.includes("/")))throw new _0(`URL-encoded traversal in path key: "${Z}"`);let q=Z.normalize("NFKC");if(q!==Z&&(q.includes("..")||q.includes("/")||q.includes("\\")||q.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 rV(){if(!GV())return!1;return S1("tengu_herring_clock",!0)}function Z4(){return(s5(a2(),"team")+$q).normalize("NFC")}function Yk(){return s5(a2(),"team","MEMORY.md")}async function tV(Z){let X=[],q=Z;for(let Q=oV(q);q!==Q;Q=oV(q))try{let J=await sV(q);return X.length===0?J:s5(J,...X.reverse())}catch(J){let $=W0(J);if($==="ENOENT")try{if((await Jk(q)).isSymbolicLink())throw new _0(`Dangling symlink detected (target does not exist): "${q}"`)}catch(Y){if(Y instanceof _0)throw Y}else if($==="ELOOP")throw new _0(`Symlink loop detected in path: "${q}"`);else if($!=="ENOTDIR"&&$!=="ENAMETOOLONG")throw new _0(`Cannot verify path containment (${$}): "${q}"`);X.push(q.slice(Q.length+$q.length)),q=Q}return Z}async function eV(Z){let X;try{X=await sV(Z4().replace(/[/\\]+$/,""))}catch(q){let Q=W0(q);if(Q==="ENOENT"||Q==="ENOTDIR")return!0;return!1}if(Z===X)return!0;return Z.startsWith(X+$q)}function ZB(Z){let X=Jq(Z),q=Z4();return X.startsWith(q)}async function Hk(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path: "${Z}"`);let X=Jq(Z),q=Z4();if(!X.startsWith(q))throw new _0(`Path escapes team memory directory: "${Z}"`);let Q=await tV(X);if(!await eV(Q))throw new _0(`Path escapes team memory directory via symlink: "${Z}"`);return X}async function Kk(Z){$k(Z);let X=Z4(),q=s5(X,Z),Q=Jq(q);if(!Q.startsWith(X))throw new _0(`Key escapes team memory directory: "${Z}"`);let J=await tV(Q);if(!await eV(J))throw new _0(`Key escapes team memory directory via symlink: "${Z}"`);return Q}function Uk(Z){return rV()&&ZB(Z)}var _0;var qB=B(()=>{q3();C1();gX();_0=class _0 extends Error{constructor(Z){super(Z);this.name="PathTraversalError"}}});import{randomBytes as Gk}from"crypto";import{unwatchFile as Wk,watchFile as Vk}from"fs";import{basename as Wq,dirname as Vq,join as j0,resolve as e5}from"path";function L1(){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:!0}}function Zs(Z){return Lk.includes(Z)}function Xs(){HB=!1}function qs(){return HB||=zk()}function zk(){if($B())return!0;let Z=J0(),X=_q();if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let Q=y1(s());while(!0){if(Z.projects?.[Q]?.hasTrustDialogAccepted)return!0;let $=y1(e5(Q,".."));if($===Q)break;Q=$}return!1}function Qs(Z){let X=J0(),q=y1(e5(Z));while(!0){if(X.projects?.[q]?.hasTrustDialogAccepted)return!0;let Q=y1(e5(q,".."));if(Q===q)return!1;q=Q}}function Js(){return}function $s(){return}function Ys(Z){return _k.includes(Z)}function J7(Z){let X=t0.config;if(!X)return!1;let q=X.oauthAccount!==void 0&&Z.oauthAccount===void 0,Q=X.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return q||Q}function KB(Z){return Uq.add(Z),()=>Uq.delete(Z)}function Z7(){for(let Z of Uq)try{Z()}catch{}}function M0(Z){let X=null;try{if(GB(L0(),L1,(Q)=>{let J=Z(Q);if(J===Q)return Q;return X={...J,projects:QB(Q.projects)},X})&&X)X7(X),Z7()}catch(q){let Q=W0(q);if(Q==="EACCES"||Q==="EPERM"||Q==="EROFS"){P(`Skipping global config write due to permission error: ${q}`,{level:"error"});return}P(`Failed to save config with lock: ${q}`,{level:"error"});let J=Q6(L0(),L1);if(J7(J)){P("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),l0("tengu_config_auth_loss_prevented",{});return}let $=Z(J);if($===J)return;X={...$,projects:QB(J.projects)},UB(L0(),X,Q7),X7(X),Z7()}}function Hs(){return Bq}function Mk(){let Z=X4+t5;if(Z>0)l0("tengu_config_cache_stats",{cache_hits:X4,cache_misses:t5,hit_rate:X4/Z});X4=0,t5=0}function Gq(Z){if(Z.installMethod!==void 0)return Z;let X=Z,q="unknown",Q=Z.autoUpdates??!0;switch(X.autoUpdaterStatus){case"migrated":q="local";break;case"installed":q="native";break;case"disabled":Q=!1;break;case"enabled":case"no_permissions":case"not_configured":q="global";break;case void 0:break}return{...Z,installMethod:q,autoUpdates:Q}}function QB(Z){if(!Z)return Z;let X={},q=!1;for(let[Q,J]of Object.entries(Z)){let $=J;if($.history!==void 0){q=!0;let{history:Y,...H}=$;X[Q]=H}else X[Q]=J}return q?X:Z}function Dk(){if(Kq)return;Kq=!0;let Z=L0();Vk(Z,{interval:Fk,persistent:!1},(X)=>{if(X.mtimeMs<=t0.mtime)return;N().readFile(Z,{encoding:"utf-8"}).then((q)=>{if(X.mtimeMs<=t0.mtime)return;let Q=C0(d0(q));if(Q===null||typeof Q!=="object")return;t0={config:Gq({...L1(),...Q}),mtime:X.mtimeMs},P1={mtime:X.mtimeMs,size:X.size}}).catch(()=>{})}),Q4(async()=>{Wk(Z),Kq=!1})}function X7(Z){t0={config:Z,mtime:Date.now()},P1=null}function J0(){if(t0.config)return X4++,t0.config;t5++;try{let Z=null;try{Z=N().statSync(L0())}catch{}let X=Gq(Q6(L0(),L1));return t0={config:X,mtime:Z?.mtimeMs??Date.now()},P1=Z?{mtime:Z.mtimeMs,size:Z.size}:null,Dk(),X}catch{return Gq(Q6(L0(),L1))}}function Us(){let Z=J0().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function Gs(Z){let X=J0();if(X.customApiKeyResponses?.approved?.includes(Z))return"approved";if(X.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function UB(Z,X,q){let Q=Vq(Z);N().mkdirSync(Q);let $=h7(X,(Y,H)=>m(Y)!==m(q[H]));if(F6(Z,m($,null,2),{encoding:"utf-8",mode:384}),Z===L0())Bq++}function GB(Z,X,q){let Q=X(),J=Vq(Z),$=N();$.mkdirSync(J);let Y;try{let H=`${Z}.lock`,U=Date.now();Y=mV(Z,{lockfilePath:H,onCompromised:(L)=>{P(`Config lock compromised: ${L}`,{level:"error"})}});let W=Date.now()-U;if(W>100)P("Lock acquisition took longer than expected - another Claude instance may be running"),l0("tengu_config_lock_contention",{lock_time_ms:W});if(P1&&Z===L0())try{let L=$.statSync(Z);if(L.mtimeMs!==P1.mtime||L.size!==P1.size)l0("tengu_config_stale_write",{read_mtime:P1.mtime,write_mtime:L.mtimeMs,read_size:P1.size,write_size:L.size})}catch(L){if(W0(L)!=="ENOENT")throw L}let G=Q6(Z,X);if(Z===L0()&&J7(G))return P("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claudin/config.json. See GH #3117.",{level:"error"}),l0("tengu_config_auth_loss_prevented",{}),!1;let V=q(G);if(V===G)return!1;let _=h7(V,(L,z)=>m(L)!==m(Q[z]));try{let L=Wq(Z),z=Lq();try{$.mkdirSync(z)}catch(j){if(W0(j)!=="EEXIST")throw j}let R=60000,D=$.readdirStringSync(z).filter((j)=>j.startsWith(`${L}.backup.`)).sort().reverse(),M=D[0],k=M?Number(M.split(".backup.").pop()):0,F=Number.isNaN(k)||Date.now()-k>=R;if(F){let j=j0(z,`${L}.backup.${Date.now()}`);$.copyFileSync(Z,j)}let I=5,T=F?$.readdirStringSync(z).filter((j)=>j.startsWith(`${L}.backup.`)).sort().reverse():D;for(let j of T.slice(I))try{$.unlinkSync(j0(z,j))}catch{}}catch(L){if(W0(L)!=="ENOENT")P(`Failed to backup config: ${L}`,{level:"error"})}if(F6(Z,m(_,null,2),{encoding:"utf-8",mode:384}),Z===L0())Bq++;return!0}finally{if(Y)Y()}}function Ws(){return q7}function Vs(){if(q7)return;let Z=Date.now();Y0("info","enable_configs_started"),q7=!0,Q6(L0(),L1,!0),Y0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function Lq(){return j0(K0(),"backups")}function JB(Z){let X=N(),q=Wq(Z),Q=Lq();try{let Y=X.readdirStringSync(Q).filter((H)=>H.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return j0(Q,Y)}catch{}let J=Vq(Z);try{let Y=X.readdirStringSync(J).filter((U)=>U.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return j0(J,Y);let H=`${Z}.backup`;try{return X.statSync(H),H}catch{}}catch{}return null}function Q6(Z,X,q){if(!q7)throw Error("Config accessed before allowed.");let Q=N();try{let J=Q.readFileSync(Z,{encoding:"utf-8"});try{let $=X0(d0(J));return{...X(),...$}}catch($){let Y=$ instanceof Error?$.message:String($);throw new r5(Y,Z,X())}}catch(J){if(W0(J)==="ENOENT"){let Y=JB(Z);if(Y)process.stderr.write(`
|
|
90
|
+
Claude configuration file not found at: ${Z}
|
|
91
|
+
A backup file exists at: ${Y}
|
|
92
|
+
You can manually restore it by running: cp "${Y}" "${Z}"
|
|
93
|
+
|
|
94
|
+
`);return X()}if(J instanceof r5&&q)throw J;if(J instanceof r5){if(P(`Config file corrupted, resetting to defaults: ${J.message}`,{level:"error"}),!Yq){Yq=!0;try{g(J);let L=!1;try{Q.statSync(`${Z}.backup`),L=!0}catch{}l0("tengu_config_parse_error",{has_backup:L})}finally{Yq=!1}}process.stderr.write(`
|
|
95
|
+
Claude configuration file at ${Z} is corrupted: ${J.message}
|
|
96
|
+
`);let Y=Wq(Z),H=Lq();try{Q.mkdirSync(H)}catch(L){if(W0(L)!=="EEXIST")throw L}let U=Q.readdirStringSync(H).filter((L)=>L.startsWith(`${Y}.corrupted.`)),W,G=!1,V=Q.readFileSync(Z,{encoding:"utf-8"});for(let L of U)try{let z=Q.readFileSync(j0(H,L),{encoding:"utf-8"});if(V===z){G=!0;break}}catch{}if(!G){W=j0(H,`${Y}.corrupted.${Date.now()}`);try{Q.copyFileSync(Z,W),P(`Corrupted config backed up to: ${W}`,{level:"error"})}catch{}}let _=JB(Z);if(W)process.stderr.write(`The corrupted file has been backed up to: ${W}
|
|
97
|
+
`);else if(G)process.stderr.write(`The corrupted file has already been backed up.
|
|
98
|
+
`);if(_)process.stderr.write(`A backup file exists at: ${_}
|
|
99
|
+
You can manually restore it by running: cp "${_}" "${Z}"
|
|
100
|
+
|
|
101
|
+
`);else process.stderr.write(`
|
|
102
|
+
`)}return X()}}function _q(){let Z=r1(),X=q6.get(Z);if(X!==void 0)return q6.delete(Z),q6.set(Z,X),X;let q=h5(Z),Q=q?y1(q):y1(e5(Z));if(q6.size>=Ak){let J=q6.keys().next().value;if(J!==void 0)q6.delete(J)}return q6.set(Z,Q),Q}function $7(){let Z=_q(),X=J0();if(!X.projects)return e6;let q=X.projects[Z]??e6;if(typeof q.allowedTools==="string")q.allowedTools=C0(q.allowedTools)??[];return q}function zq(Z){let X=_q(),q=null;try{if(GB(L0(),L1,(J)=>{let $=J.projects?.[X]??e6,Y=Z($);if(Y===$)return J;return q={...J,projects:{...J.projects,[X]:Y}},q})&&q)X7(q),Z7()}catch(Q){P(`Failed to save config with lock: ${Q}`,{level:"error"});let J=Q6(L0(),L1);if(J7(J)){P("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),l0("tengu_config_auth_loss_prevented",{});return}let $=J.projects?.[X]??e6,Y=Z($);if(Y===$)return;q={...J,projects:{...J.projects,[X]:Y}},UB(L0(),q,Q7),X7(q),Z7()}}function Tk(){return jk()!==null}function Bs(){return Tk()&&!e(process.env.FORCE_AUTOUPDATE_PLUGINS)}function Ls(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function jk(){if(e(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let Z=dV();if(Z)return{type:"env",envVar:Z};let X=J0();if(X.autoUpdates===!1&&(X.installMethod!=="native"||X.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function _s(){let Z=J0();if(Z.userID)return Z.userID;let X=Gk(32).toString("hex");return M0((q)=>({...q,userID:X})),X}function zs(){if(!J0().firstStartTime){let X=new Date().toISOString();M0((q)=>({...q,firstStartTime:q.firstStartTime??X}))}}function Rs(Z){let X=r1();switch(Z){case"User":return j0(K0(),"CLAUDE.md");case"Local":return j0(X,"CLAUDE.local.md");case"Project":return j0(X,o5);case"Managed":return j0(D1(),"CLAUDE.md");case"AutoMem":return BV()}return Bk.getTeamMemEntrypoint()}function Ms(){return j0(D1(),".claudin","rules")}function Fs(){return j0(K0(),"rules")}function Ts(Z){t0.config=Z,t0.mtime=Z?Date.now():0}var Bk,Yq=!1,e6,eo,Q7,Lk,_k,HB=!1,Rk,Hq,Uq,t0,P1=null,X4=0,t5=0,Bq=0,Ks=20,Fk=1000,Kq=!1,q7=!1,Ak=32,q6,Ds,As;var Rq=B(()=>{sQ();T6();gX();_$();Z1();YB();M1();H2();UX();c0();C1();E4();F0();_2();h4();x4();uV();p0();j4();Qq();g4();iV();z0();aV();Bk=(qB(),q4(XB)),e6={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},eo=["off","compact","full"];Q7=L1(),Lk=["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","lspRecommendationDisabled","lspRecommendationNeverPlugins","lspRecommendationIgnoredCount","lspWorkspaceEditConfirmThreshold","lspWorkspaceEditMaxFiles","lspWorkspaceEditMaxBytes","copyFullResponse","copyOnSelect","flickerFreeMode","permissionExplainerEnabled","prStatusFooterEnabled","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled","autoBackgroundAgentsEnabled","inlineImagesMode"];_k=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"];Rk={...Q7,autoUpdates:!1,knowledgeGraphEnabled:!0};Hq={...e6};Uq=new Set;t0={config:null,mtime:0};Q4(async()=>{Mk()});q6=new Map;Ds=Q6,As=J7});function Y7(Z){return Z.split(/[;,]/).map((X)=>X.trim()).filter((X)=>X.length>0)}function WB(Z){let X=Y7(Z);return X.length>0?X[0]:Z.trim()}var Mq=()=>{};import{randomBytes as Ok}from"crypto";function Z2(Z){return Z?.trim()??""}function B0(Z){let X=Z2(Z);return X.length>0?X:void 0}function Ik(Z){return Z2(Z).replace(/\/+$/,"")}function wk(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function kk(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function Nk(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let X={};for(let[q,Q]of Object.entries(Z)){let J=Z2(q),$=typeof Q==="string"?Q.trim():"";if(J.length>0&&$.length>0)X[J]=$}return Object.keys(X).length>0?X:void 0}function xk(Z){if(!Z||typeof Z!=="object")return;let X={},q=B0(Z.codexAuthPath);if(q)X.codexAuthPath=q;let Q=B0(Z.codexAccountId);if(Q)X.codexAccountId=Q;let J=B0(Z.githubToken);if(J)X.githubToken=J;let $=B0(Z.awsRegion);if($)X.awsRegion=$;let Y=B0(Z.gcpProject);if(Y)X.gcpProject=Y;let H=B0(Z.gcpRegion);if(H)X.gcpRegion=H;let U=B0(Z.azureResource);if(U)X.azureResource=U;let W=Nk(Z.customHeaders);if(W)X.customHeaders=W;let G=kk(Z.reasoningEffort);if(G)X.reasoningEffort=G;return Object.keys(X).length>0?X:void 0}function zB(Z){let X=Z2(Z.id),q=Z2(Z.name),Q=wk(Z.provider),J=Ik(Z.baseUrl),$=Z2(Z.model);if(!X||!q||!J||Q!=="anthropic"&&!$)return null;let H={id:X,name:q,provider:Q,baseUrl:J,model:$,apiKey:B0(Z.apiKey)},U=xk(Z.extras);if(U)H.extras=U;return H}function Pk(Z){let X=new Set,q=[];for(let Q of Z??[]){let J=zB(Q);if(!J||X.has(J.id))continue;X.add(J.id),q.push(J)}return q}function Ek(){return`provider_${Ok(6).toString("hex")}`}function RB(Z,X=Ek()){return zB({id:X,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function MB(Z,X=J0()){return X.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function xs(Z){switch(Z){case"anthropic":return{provider:"anthropic",name:"Anthropic",baseUrl:"https://api.anthropic.com",model:"",apiKey:"",requiresApiKey:!0};case"openai":return{provider:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"gpt-5.4",apiKey:"",requiresApiKey:!0};case"kimi-code":return{provider:"openai",name:"Moonshot AI - Kimi Code",baseUrl:"https://api.kimi.com/coding/v1",model:"kimi-for-coding",apiKey:"",requiresApiKey:!0};case"moonshotai":return{provider:"openai",name:"Moonshot AI - API",baseUrl:"https://api.moonshot.ai/v1",model:"kimi-k2.5",apiKey:"",requiresApiKey:!0};case"deepseek":return{provider:"openai",name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-v4-flash, deepseek-v4-pro, deepseek-chat, deepseek-reasoner",apiKey:"",requiresApiKey:!0};case"gemini":return{provider:"gemini",name:"Google Gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",model:"gemini-3-flash-preview",apiKey:"",requiresApiKey:!0};case"mistral":return{provider:"mistral",name:"Mistral",baseUrl:"https://api.mistral.ai/v1",model:"devstral-latest",apiKey:"",requiresApiKey:!0};case"together":return{provider:"openai",name:"Together AI",baseUrl:"https://api.together.xyz/v1",model:"Qwen/Qwen3.5-9B",apiKey:"",requiresApiKey:!0};case"groq":return{provider:"openai",name:"Groq",baseUrl:"https://api.groq.com/openai/v1",model:"llama-3.3-70b-versatile",apiKey:"",requiresApiKey:!0};case"azure-openai":return{provider:"openai",name:"Azure OpenAI",baseUrl:"https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1",model:"YOUR-DEPLOYMENT-NAME",apiKey:"",requiresApiKey:!0};case"openrouter":return{provider:"openai",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",model:"openai/gpt-5-mini",apiKey:"",requiresApiKey:!0};case"lmstudio":return{provider:"openai",name:"LM Studio",baseUrl:"http://localhost:1234/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"dashscope-cn":return{provider:"openai",name:"Alibaba Coding Plan (China)",baseUrl:"https://coding.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"dashscope-intl":return{provider:"openai",name:"Alibaba Coding Plan",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"custom":return{provider:"openai",name:"Custom OpenAI-compatible",baseUrl:VB,model:BB,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"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:VB,model:BB,apiKey:"",requiresApiKey:!1}}}function f0(Z=J0()){return Pk(Z.providerProfiles)}function Ps(Z=J0()){return f0(Z).length>0}function _1(Z=J0()){let X=f0(Z);if(X.length===0)return;let q=B0($7().activeProviderProfileId);if(q){let J=X.find(($)=>$.id===q);if(J)return J}let Q=B0(Z.activeProviderProfileId);return X.find((J)=>J.id===Q)??X[0]}function Es(){let Z=B0($7().activeProviderProfileId);if(!Z)return;return f0().some((q)=>q.id===Z)?Z:void 0}function vk(){return B0($7().activeProviderProfileId)}function vs(){return vk()!==void 0}function yk(){return B0(J0().activeProviderProfileId)}function ys(Z,X){let q=RB(Z);if(!q)return null;let Q=X?.makeActive??!0;if(M0((J)=>{let Y=[...f0(J),q],H=B0(J.activeProviderProfileId),U=Q||!H||!Y.some((W)=>W.id===H)?q.id:H;return{...J,providerProfiles:Y,activeProviderProfileId:U}}),yk()===q.id)Sk(q.id),bk();return q}function Cs(Z,X){let q=RB(X,Z);if(!q)return null;let Q=!1;if(M0((J)=>{let $=f0(J),Y=$.findIndex((_)=>_.id===Z);if(Y<0)return J;Q=!0;let H=[...$];H[Y]=q;let U={...J.openaiAdditionalModelOptionsCacheByProfile??{}};delete U[Z];let W=B0(J.activeProviderProfileId),G=W&&H.some((_)=>_.id===W)?W:H[0]?.id;return{...J,providerProfiles:H,activeProviderProfileId:G,openaiAdditionalModelOptionsCacheByProfile:U,openaiAdditionalModelOptionsCache:G===Z?[]:J.openaiAdditionalModelOptionsCache}}),!Q)return null;return q}function Ss(Z){let X=B0(Z);if(!X)return null;let q=_1();if(!q)return null;if(Y7(q.model).includes(X))return q;M0(($)=>{let Y=f0($),H=Y.findIndex((G)=>G.id===q.id);if(H<0)return $;let U=Y[H];if(U.model===X)return $;let W=[...Y];return W[H]={...U,model:X},{...$,providerProfiles:W}});let J=_1();if(!J||J.id!==q.id)return null;return J}function bs(){let Z=_1();if(!Z)return;M0((X)=>{let q=f0(X),Q=q.findIndex((Y)=>Y.id===Z.id);if(Q<0)return X;let J=q[Q];if(!J.model)return X;let $=[...q];return $[Q]={...J,model:""},{...X,providerProfiles:$}})}function Ck(Z){let X=Y7(Z.model);if(X.length===0)return[];return X.map((q)=>({value:q,label:q,description:`Provider: ${Z.name}`}))}function Fq(Z,X){let q=Ck(Z);return{openaiAdditionalModelOptionsCache:q.length>0?q:MB(Z.id,X),openaiAdditionalModelOptionsCacheByProfile:{...X.openaiAdditionalModelOptionsCacheByProfile??{},[Z.id]:q.length>0?q:X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[]}}}function Sk(Z){let X=J0(),Q=f0(X).find((J)=>J.id===Z);if(!Q)return null;return M0((J)=>({...J,activeProviderProfileId:Z,...Fq(Q,J)})),Q}function hs(Z){if(Z===null){zq(($)=>({...$,activeProviderProfileId:void 0,activeModelForProject:void 0}));let J=_1();if(J)LB(J);return null}let q=f0().find((J)=>J.id===Z);if(!q)return null;let Q=!1;if(zq((J)=>{if(!f0().some((H)=>H.id===Z))return Q=!0,J;let Y={...J,activeProviderProfileId:Z};if(J.activeProviderProfileId!==Z)Y.activeModelForProject=void 0;return Y}),Q)return null;return LB(q),q}function LB(Z){let X=J0(),q=Fq(Z,X),Q=X.openaiAdditionalModelOptionsCache??[],J=X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[],$=q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[];if(_B(Q,q.openaiAdditionalModelOptionsCache??[])&&_B(J,$))return;M0((Y)=>({...Y,...Fq(Z,Y)}))}function _B(Z,X){if(Z.length!==X.length)return!1;for(let q=0;q<Z.length;q++)if(Z[q]!==X[q])return!1;return!0}function fs(Z){let X=!1,q;return M0((Q)=>{let J=f0(Q);if(!J.find((L)=>L.id===Z))return Q;X=!0;let Y=J.filter((L)=>L.id!==Z),H=B0(Q.activeProviderProfileId),W=!H||H===Z||!Y.some((L)=>L.id===H)?Y[0]?.id:H;if(W)q=Y.find((L)=>L.id===W)??Y[0];let G={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete G[Z];let _=(Q.projects?Object.values(Q.projects).some((L)=>L?.activeProviderProfileId===Z):!1)&&Q.projects?Object.fromEntries(Object.entries(Q.projects).map(([L,z])=>{if(z?.activeProviderProfileId===Z){let{activeProviderProfileId:R,activeModelForProject:D,...M}=z;return[L,M]}return[L,z]})):Q.projects;return{...Q,providerProfiles:Y,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:G,openaiAdditionalModelOptionsCache:W?MB(W,{...Q,openaiAdditionalModelOptionsCacheByProfile:G}):[],projects:_}}),{removed:X,activeProfileId:q?.id}}function gs(Z=J0()){let X=_1(Z);if(!X)return Z.openaiAdditionalModelOptionsCache??[];let q=Z.openaiAdditionalModelOptionsCacheByProfile?.[X.id];if(q)return q;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function ms(Z){let X=_1();if(!X){M0((q)=>({...q,openaiAdditionalModelOptionsCache:Z}));return}M0((q)=>({...q,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...q.openaiAdditionalModelOptionsCacheByProfile??{},[X.id]:Z}}))}function bk(){let Z=_1();if(!Z){M0((X)=>({...X,openaiAdditionalModelOptionsCache:[]}));return}M0((X)=>{let q={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete q[Z.id],{...X,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:q}})}var VB="http://localhost:11434/v1",BB="llama3.1:8b";var FB=B(()=>{Rq();Mq()});function H7(Z,X){return{name:`${Z.name}-with-${X.name}-fallback`,read(){let q=Z.read();if(q!==null&&q!==void 0)return q;return X.read()||{}},async readAsync(){let q=await Z.readAsync();if(q!==null&&q!==void 0)return q;return await X.readAsync()||{}},update(q){let Q=Z.read(),J=Z.update(q);if(J.success){if(Q===null)X.delete();return J}let $=X.update(q);if($.success){if(Q!==null)Z.delete();return{success:!0,warning:$.warning}}return{success:!1}},delete(){let q=Z.delete(),Q=X.delete();return q||Q}}}var DB=()=>{};function K7(Z,X,q=10*TB*AB){let W=[];try{let Q;if(X===void 0)Q={};else if(X instanceof AbortSignal)Q={abortSignal:X,timeout:q};else Q=X;let{abortSignal:J,timeout:$=10*TB*AB,input:Y,stdio:H=["ignore","pipe","pipe"]}=Q;J?.throwIfAborted();const U=B6(W,D4`exec: ${Z.slice(0,200)}`,0);try{let L=k0(Z,{env:process.env,maxBuffer:1e6,timeout:$,cwd:s(),stdio:H,shell:!0,reject:!1,input:Y});if(!L.stdout)return null;return L.stdout.trim()||null}catch{return null}}catch(G){var V=G,_=1}finally{L6(W,V,_)}}var AB=1000,TB=60;var Dq=B(()=>{m6();Z1();z0()});import{createHash as hk}from"crypto";import{userInfo as fk}from"os";function J6(Z=""){let X=K0(),Q=!process.env.CLAUDIN_CONFIG_DIR?"":`-${hk("sha256").update(X).digest("hex").substring(0,8)}`;return`Claude Code${jB().OAUTH_FILE_SUFFIX}${Z}${Q}`}function J4(Z=""){return J6(Z)}function O0(){try{return process.env.USER||fk().username}catch{return"claude-code-user"}}function Tq(){$0.cache={data:null,cachedAt:0},$0.generation++,$0.readInFlight=null}function ts(Z){if($0.cache.cachedAt!==0)return;let X=null;if(Z)try{X=JSON.parse(Z)}catch{return}$0.cache={data:X,cachedAt:Date.now()}}var g0="-credentials",Aq=30000,$0;var U7=B(()=>{vG();c0();$0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function mk(){try{let Z=J4(g0),X=O0(),{stdout:q,code:Q}=await a("security",["find-generic-password","-a",X,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(Q===0&&q)return X0(q.trim())}catch(Z){}return null}function Yr(){if(X2!==void 0)return X2;if(process.platform!=="darwin")return X2=!1,!1;try{X2=k0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{X2=!1}return X2}var gk=4032,jq,X2;var OB=B(()=>{m6();M1();y4();Dq();z0();U7();jq={name:"keychain",read(){let Z=$0.cache;if(Date.now()-Z.cachedAt<Aq)return Z.data;try{let X=J4(g0),q=O0(),Q=K7(`security find-generic-password -a "${q}" -w -s "${X}"`);if(Q){let J=X0(Q);return $0.cache={data:J,cachedAt:Date.now()},J}}catch(X){}if(Z.data!==null)return P("[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<Aq)return Z.data;if($0.readInFlight)return $0.readInFlight;let X=$0.generation,q=mk().then((Q)=>{if(X===$0.generation){if(Q===null&&Z.data!==null)P("[keychain] readAsync failed; serving stale cache",{level:"warn"});let J=Q??Z.data;return $0.cache={data:J,cachedAt:Date.now()},$0.readInFlight=null,J}return Q});return $0.readInFlight=q,q},update(Z){Tq();try{let X=J4(g0),q=O0(),Q=m(Z),J=Buffer.from(Q,"utf-8").toString("hex"),$=`add-generic-password -U -a "${q}" -s "${X}" -X "${J}"
|
|
103
|
+
`,Y;if($.length<=gk)Y=k0("security",["-i"],{input:$,stdio:["pipe","pipe","pipe"],reject:!1});else P(`Keychain payload (${Q.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=k0("security",["add-generic-password","-U","-a",q,"-s",X,"-X",J],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return $0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(X){return{success:!1}}},delete(){Tq();try{let Z=J4(g0),X=O0();return K7(`security delete-generic-password -a "${X}" -s "${Z}"`),!0}catch(Z){return!1}}}});var Oq;var IB=B(()=>{m6();z0();U7();Oq={name:"libsecret",read(){try{let Z=O0(),X=J6(g0),q=k0("secret-tool",["lookup","service",X,"account",Z],{reject:!1});if(q.exitCode===0&&q.stdout)return X0(q.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let X=O0(),q=J6(g0),Q=m(Z);return{success:k0("secret-tool",["store","--label",q,"service",q,"account",X],{input:Q,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=O0(),X=J6(g0);return k0("secret-tool",["clear","service",X,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as uk}from"path";function $4(Z){return Z.replace(/'/g,"''")}function G7(){return J6(g0)}function wB(){return`${G7()}:${O0()}`}function Iq(){let Z=G7().replace(/[^a-zA-Z0-9._-]/g,"_");return uk(K0(),`${Z}.secure.dpapi`)}function Y4(Z,X){try{return k0("powershell.exe",["-Command",Z],{input:X?.input,reject:!1})}catch{return null}}function pk(Z,X){let q=Z?.stderr?.trim();if(q)return q;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${X} (exit code ${Z.exitCode}).`;return X}function kB(){let Z=G7().replace(/"/g,'`"'),X=O0().replace(/"/g,'`"'),q=`
|
|
104
|
+
Add-Type -AssemblyName System.Runtime.WindowsRuntime
|
|
105
|
+
try {
|
|
106
|
+
$vault = New-Object Windows.Security.Credentials.PasswordVault
|
|
107
|
+
$cred = $vault.Retrieve("${Z}", "${X}")
|
|
108
|
+
$cred.FillPassword()
|
|
109
|
+
[Console]::Out.Write($cred.Password)
|
|
110
|
+
} catch {
|
|
111
|
+
exit 1
|
|
112
|
+
}
|
|
113
|
+
`,Q=Y4(q);if(Q?.exitCode===0&&Q.stdout)try{return X0(Q.stdout)}catch{return null}return null}var wq;var NB=B(()=>{m6();c0();z0();U7();wq={name:"credential-locker-dpapi",read(){let Z=$4(Iq()),X=$4(wB()),q=`
|
|
114
|
+
try {
|
|
115
|
+
Add-Type -AssemblyName System.Security
|
|
116
|
+
$path = '${Z}'
|
|
117
|
+
if (!(Test-Path -LiteralPath $path)) {
|
|
118
|
+
exit 1
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
$protectedBase64 = [System.IO.File]::ReadAllText(
|
|
122
|
+
$path,
|
|
123
|
+
[System.Text.Encoding]::UTF8
|
|
124
|
+
).Trim()
|
|
125
|
+
if (-not $protectedBase64) {
|
|
126
|
+
exit 1
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
$protectedBytes = [Convert]::FromBase64String($protectedBase64)
|
|
130
|
+
$entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${X}')
|
|
131
|
+
$bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
|
|
132
|
+
$protectedBytes,
|
|
133
|
+
$entropyBytes,
|
|
134
|
+
[System.Security.Cryptography.DataProtectionScope]::CurrentUser
|
|
135
|
+
)
|
|
136
|
+
[Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
|
|
137
|
+
} catch {
|
|
138
|
+
exit 1
|
|
139
|
+
}
|
|
140
|
+
`,Q=Y4(q);if(Q?.exitCode===0&&Q.stdout)try{return X0(Q.stdout)}catch{return kB()}return kB()},async readAsync(){return this.read()},update(Z){let X=$4(Iq()),q=$4(wB()),Q=m(Z),J=`
|
|
141
|
+
try {
|
|
142
|
+
Add-Type -AssemblyName System.Security
|
|
143
|
+
$path = '${X}'
|
|
144
|
+
$directory = [System.IO.Path]::GetDirectoryName($path)
|
|
145
|
+
if ($directory) {
|
|
146
|
+
[System.IO.Directory]::CreateDirectory($directory) | Out-Null
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
$payload = [Console]::In.ReadToEnd()
|
|
150
|
+
$bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
|
|
151
|
+
$entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${q}')
|
|
152
|
+
$protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
|
|
153
|
+
$bytes,
|
|
154
|
+
$entropyBytes,
|
|
155
|
+
[System.Security.Cryptography.DataProtectionScope]::CurrentUser
|
|
156
|
+
)
|
|
157
|
+
$protectedBase64 = [Convert]::ToBase64String($protectedBytes)
|
|
158
|
+
[System.IO.File]::WriteAllText(
|
|
159
|
+
$path,
|
|
160
|
+
$protectedBase64,
|
|
161
|
+
[System.Text.Encoding]::UTF8
|
|
162
|
+
)
|
|
163
|
+
} catch {
|
|
164
|
+
Write-Error $_.Exception.Message
|
|
165
|
+
exit 1
|
|
166
|
+
}
|
|
167
|
+
`,$=Y4(J,{input:Q});if($?.exitCode===0)return{success:!0};return{success:!1,warning:pk($,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let X=`
|
|
168
|
+
try {
|
|
169
|
+
$path = '${$4(Iq())}'
|
|
170
|
+
if (Test-Path -LiteralPath $path) {
|
|
171
|
+
Remove-Item -LiteralPath $path -Force
|
|
172
|
+
}
|
|
173
|
+
} catch {
|
|
174
|
+
exit 1
|
|
175
|
+
}
|
|
176
|
+
`,q=Y4(X),Q=G7().replace(/"/g,'`"'),J=O0().replace(/"/g,'`"'),$=`
|
|
177
|
+
Add-Type -AssemblyName System.Runtime.WindowsRuntime
|
|
178
|
+
try {
|
|
179
|
+
$vault = New-Object Windows.Security.Credentials.PasswordVault
|
|
180
|
+
$cred = $vault.Retrieve("${Q}", "${J}")
|
|
181
|
+
$vault.Remove($cred)
|
|
182
|
+
} catch {
|
|
183
|
+
exit 0
|
|
184
|
+
}
|
|
185
|
+
`,Y=Y4($);return(q?.exitCode??1)===0}}});import{chmodSync as dk}from"fs";import{join as ck}from"path";function W7(){let Z=K0(),X=".credentials.json";return{storageDir:Z,storagePath:ck(Z,".credentials.json")}}var H4;var PB=B(()=>{c0();C1();F0();z0();H4={name:"plaintext",read(){let{storagePath:Z}=W7();try{let X=N().readFileSync(Z,{encoding:"utf8"});return X0(X)}catch{return null}},async readAsync(){let{storagePath:Z}=W7();try{let X=await N().readFile(Z,{encoding:"utf8"});return X0(X)}catch{return null}},update(Z){try{let{storageDir:X,storagePath:q}=W7();try{N().mkdirSync(X)}catch(Q){if(W0(Q)!=="EEXIST")throw Q}return xB(q,m(Z),{encoding:"utf8",flush:!1}),dk(q,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=W7();try{return N().unlinkSync(Z),!0}catch(X){if(W0(X)==="ENOENT")return!0;return!1}}}});function EB(Z){let X=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return X?H7(jq,H4):jq;if(process.platform==="linux")return X?H7(Oq,H4):Oq;if(process.platform==="win32")return X?H7(wq,H4):wq;return X?H4:lk}var lk;var vB=B(()=>{DB();OB();IB();NB();PB();lk={name:"unavailable-secure-storage",read:()=>null,readAsync:async()=>null,update:()=>({success:!1,warning:"Secure storage is unavailable on this platform without plaintext fallback."}),delete:()=>!0}});function S(Z){if(typeof Z!=="string")return;let X=Z.trim();return X?X:void 0}function kq(Z=process.env){return S(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function Cr(Z=process.env){let X=S(Z.CODEX_OAUTH_CALLBACK_PORT);if(!X)return 1455;let q=Number.parseInt(X,10);if(Number.isInteger(q)&&q>=0&&q<=65535)return q;return 1455}function Nq(Z){let X=Z.split(".");if(X.length<2)return;try{let q=X[1].replace(/-/g,"+").replace(/_/g,"/"),Q=q+"=".repeat((4-q.length%4)%4),J=Buffer.from(Q,"base64").toString("utf8"),$=JSON.parse(J);return $&&typeof $==="object"?$:void 0}catch{return}}function m0(Z){if(!Z)return;let X=Nq(Z),q=X?.["https://api.openai.com/auth"]&&typeof X["https://api.openai.com/auth"]==="object"?X["https://api.openai.com/auth"]:void 0;return S(q?.chatgpt_account_id??X?.["https://api.openai.com/auth.chatgpt_account_id"]??X?.chatgpt_account_id)??void 0}function Sr(Z){return Z.replace(/[&<>"']/g,(X)=>{switch(X){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"'":return"'";default:return X}})}async function CB(Z){let X=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:kq(),requested_token:"openai-api-key",subject_token:Z,subject_token_type:"urn:ietf:params:oauth:token-type:id_token"}),q=await fetch("https://auth.openai.com/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:X,signal:AbortSignal.timeout(15000)});if(!q.ok){let $=await q.text().catch(()=>"");throw Error($.trim()?`Codex API key exchange failed (${q.status}): ${$.trim()}`:`Codex API key exchange failed with status ${q.status}.`)}let Q=await q.json(),J=S(Q.access_token);if(!J)throw Error("Codex API key exchange completed, but no API key token was returned.");return J}var Er="https://auth.openai.com",yB="https://auth.openai.com/oauth/token",vr="openid profile email offline_access api.connectors.read api.connectors.invoke",yr="codex_cli_rs";var xq=()=>{};function L7(){return EB({allowPlainTextFallback:!0})}function SB(Z){if(!Z)return;let q=Nq(Z)?.exp;if(typeof q==="number"&&Number.isFinite(q))return q*1000;return}function U4(Z){if(!Z||typeof Z!=="object")return;let X=Z,q=S(X.apiKey),Q=S(X.accessToken);if(!Q)return;let J=S(X.refreshToken),$=S(X.idToken),Y=S(X.accountId)??m0($)??m0(Q),H=S(X.profileId),U=typeof X.lastRefreshAt==="number"&&Number.isFinite(X.lastRefreshAt)?X.lastRefreshAt:void 0,W=typeof X.lastRefreshFailureAt==="number"&&Number.isFinite(X.lastRefreshFailureAt)?X.lastRefreshFailureAt:void 0;return{apiKey:q,accessToken:Q,refreshToken:J,idToken:$,accountId:Y,profileId:H,lastRefreshAt:U,lastRefreshFailureAt:W}}function ak(Z){let X=SB(Z.accessToken)??SB(Z.idToken);if(X===void 0)return!1;return X<=Date.now()+nk}function bB(Z,X=Date.now()){let q=Math.max(Z.lastRefreshFailureAt??0,B7??0);if(!q)return!1;return X-q<ik}function ok(Z,X){if(!X.trim())return`Codex token refresh failed with status ${Z}.`;try{let q=JSON.parse(X),Q=q.error&&typeof q.error==="object"?q.error:void 0,J=S(Q?.code??q.code),$=S(Q?.message??q.error_description)??X.trim();return J?`Codex token refresh failed (${J}): ${$}`:`Codex token refresh failed with status ${Z}: ${$}`}catch{return`Codex token refresh failed with status ${Z}: ${X.trim()}`}}function hB(){if(q2())return;try{let Z=L7().read();return U4(Z?.codex)}catch{return}}async function sk(){if(q2())return;try{let Z=await L7().readAsync();return U4(Z?.codex)}catch{return}}function fB(Z,X=Date.now()){return bB(Z,X)}function gB(Z){if(q2())return{success:!1,warning:"Bare mode: secure storage is disabled."};let X=U4(Z);if(!X)return{success:!1,warning:"Codex credentials are incomplete."};let q=L7(),Q=q.read()||{},J=U4(Q[V7]),$={...Q,[V7]:{...X,profileId:X.profileId??J?.profileId,lastRefreshAt:X.lastRefreshAt??Date.now()}},Y=q.update($);if(Y.success)B7=U4($[V7])?.lastRefreshFailureAt??null;return Y}function rk(Z,X){if(!gB({...Z,lastRefreshFailureAt:X}).success)B7=X}function ur(){if(q2())return{success:!0};let Z=L7(),q={...Z.read()||{}};delete q[V7];let Q=Z.update(q);if(Q.success)B7=null;return Q}async function pr(Z){if(q2())return{refreshed:!1};if(G4()?.apiKey?.trim())return{refreshed:!1};let X=await sk();if(!X)return{refreshed:!1};if(!X.refreshToken)return{refreshed:!1,credentials:X};if(!Z?.force&&!ak(X))return{refreshed:!1,credentials:X};if(!Z?.force&&bB(X))return{refreshed:!1,credentials:X};if(K4)return K4;return K4=(async()=>{let q=Date.now();try{let Q=new URLSearchParams({client_id:kq(),grant_type:"refresh_token",refresh_token:X.refreshToken}),J=await fetch(yB,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:Q,signal:AbortSignal.timeout(15000)});if(!J.ok){let G=await J.text().catch(()=>"");throw Error(ok(J.status,G))}let $=await J.json(),Y=S($.access_token);if(!Y)throw Error("Codex token refresh succeeded without a new access token.");let H={accessToken:Y,refreshToken:S($.refresh_token)??X.refreshToken,idToken:S($.id_token)??X.idToken,accountId:m0($.id_token)??m0($.access_token)??X.accountId,lastRefreshAt:Date.now()},U=H.idToken??X.idToken;if(U)H.apiKey=await CB(U).catch(()=>{return});let W=gB(H);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:H}}catch(Q){throw rk(X,q),Q}finally{K4=null}})(),K4}var V7="codex",nk=60000,ik=60000,K4=null,B7=null;var mB=B(()=>{$6();c0();vB();xq()});import{existsSync as tk,readFileSync as ek}from"node:fs";import{isIP as ZN}from"node:net";import{homedir as XN}from"node:os";import{join as uB}from"node:path";function $N(Z){let X=Z.split(".").map((q)=>Number.parseInt(q,10));if(X.length!==4||X.some((q)=>Number.isNaN(q)))return!1;return X[0]===10||X[0]===172&&X[1]>=16&&X[1]<=31||X[0]===192&&X[1]===168}function YN(Z){let X=Z.split(":",1)[0];if(!X)return!1;let q=Number.parseInt(X,16);if(Number.isNaN(q))return!1;return(q&65024)===64512||(q&65472)===65152}function vq(Z){if(!Z)return;let X=Z.trim();if(!X)return;if(X==="undefined")return;return X}function Pq(Z,X){for(let q of X){let Q=Z,J=!0;for(let Y of q){if(!Q||typeof Q!=="object"||!(Y in Q)){J=!1;break}Q=Q[Y]}if(!J)continue;let $=S(Q);if($)return $}return}function HN(Z){if(!Z)return;let X=Z.trim().toLowerCase();if(X==="low"||X==="medium"||X==="high"||X==="xhigh")return X;return}function pB(Z){let X=Z.trim(),q=X.indexOf("?");if(q===-1){let W=X.toLowerCase(),G=z7[W];if(G)return{raw:X,baseModel:G.model,reasoning:G.reasoningEffort?{effort:G.reasoningEffort}:void 0};return{raw:X,baseModel:X}}let Q=X.slice(0,q).trim(),J=new URLSearchParams(X.slice(q+1)),$=Q.toLowerCase(),Y=z7[$],H=Y?.model??Q,U=HN(J.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:X,baseModel:H,reasoning:typeof U==="string"?{effort:U}:U}}function iB(Z){let X=Z.trim().toLowerCase();return(X.split("?",1)[0]??X)in z7}function yq(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;return QN.has(q)}function aB(Z){return yq(Z)}function KN(Z,X){let q=vq(X);return _N(q)||!q&&iB(Z)}function VN(Z){let X=Z.trim().toLowerCase();if(X.includes("codex"))return!0;let q=UN.exec(X);if(!q)return!1;if(Number(q[1])<5)return!1;if(X.startsWith("gpt-5-mini"))return!1;return!0}function oB(Z){if(!Z)return!1;try{let X=new URL(Z).hostname.toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);let q=X.indexOf("%25");if(q!==-1)X=X.slice(0,q);if(JN.has(X)||X==="0.0.0.0")return!0;if(X.endsWith(".local"))return!0;let Q=ZN(X);if(Q===4)return Number.parseInt(X.split(".",1)[0]??"",10)===127||$N(X);if(Q===6)return YN(X);return!1}catch{return!1}}function _7(Z){return Z.replace(Cq,"")}function BN(Z){let X=_7(Z);if(!X||X==="/")return"/v1";if(X.toLowerCase().endsWith("/v1"))return X;return`${X}/v1`}function LN(Z){try{let X=new URL(Z),q=X.hostname.toLowerCase(),Q=X.pathname.toLowerCase();if(X.port==="11434")return!0;return q.includes("ollama")||Q.includes("ollama")}catch{return!1}}function sr(Z){if(!oB(Z))return[];try{let X=new URL(Z),q=_7(X.toString()),Q=new Set([q]),J=[],$=(U,W)=>{let G=new URL(X.toString());G.hostname=U,G.pathname=W,G.search="",G.hash="";let V=_7(G.toString());if(Q.has(V))return;Q.add(V),J.push(V)},Y=BN(X.pathname);if(Y!==_7(X.pathname))$(X.hostname,Y);let H=X.hostname.toLowerCase().replace(WN,"");if(H==="localhost"||H==="::1")$("127.0.0.1",X.pathname||"/"),$("127.0.0.1",Y);return J}catch{return[]}}function rr(Z){if(!Z.hasTools)return!1;if(!oB(Z.baseUrl))return!1;return LN(Z.baseUrl)}function _N(Z){if(!Z)return!1;try{let X=new URL(Z);return X.hostname==="chatgpt.com"&&X.pathname.replace(Cq,"")==="/backend-api/codex"}catch{return!1}}function zN(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return nB;let Q=q.indexOf("/");if(Q!==-1)return q.slice(Q+1);return q}function dB(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return nB;return q}function lB(Z){if(!Z)return"copilot";try{let X=new URL(Z).hostname.toLowerCase();if(X==="api.githubcopilot.com")return"copilot";if(X==="models.github.ai"||X.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function sB(Z){let X=null;try{let{tryGetActiveProvider:b}=($6(),q4(W4));X=b()}catch{X=null}let Q=X?.transport==="github_copilot",J=X?.model?.trim(),$=vq(X?.baseUrl),Y=Z?.model?.trim()||J||Z?.fallbackModel?.trim()||(Q?"github:copilot":"gpt-4o"),H=pB(Y),U=vq(Z?.baseUrl),W=U??$,V=Q&&iB(Y)&&W&&lB(W)==="custom"?void 0:W,_=U??V,L=J??"",R=yq(L)?pB(L).baseModel:null,D=Boolean(Z?.model)&&Boolean(R)&&H.baseModel===R,M=yq(Y)||D,F=!Q&&M&&!(_&&_!==Eq)?qN:_,I=Q?lB(_):"custom",T=Q&&I==="copilot",j=Q&&I==="models",A=Q&&I==="custom",f=Q?dB(Y):Y,w=KN(Y,F)||T&&VN(f)?"codex_responses":"chat_completions",x=T?zN(H.baseModel):j||A?dB(H.baseModel):H.baseModel,v=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(X?.extras?.reasoningEffort?{effort:X.extras.reasoningEffort}:void 0);return{transport:w,requestedModel:Y,resolvedModel:x,baseUrl:(F??(T&&w==="codex_responses"?cB:Q?cB:Eq)).replace(Cq,""),reasoning:v}}function tr(){let Z=null;try{let{tryGetActiveProvider:Q}=($6(),q4(W4));Z=Q()}catch{Z=null}let X=Z?.transport;if(X!=="openai_compat"&&X!=="codex_responses"){if(!X||X==="anthropic")return"firstParty";return null}let q=sB();if(q.transport!=="chat_completions")return null;return`openai:${q.baseUrl.toLowerCase()}`}function er(){let Z=sB();if(Z.transport!=="chat_completions")return!1;let X=Z.baseUrl.toLowerCase();return X.includes("api.openai.com")||X===Eq}function rB(Z=process.env){let X=Sq();if(X)return X;let q=S(Z.CODEX_AUTH_JSON_PATH);if(q)return q;let Q=S(Z.CODEX_HOME);if(Q)return uB(Q,"auth.json");return uB(XN(),".codex","auth.json")}function Sq(){try{let{tryGetActiveProvider:Z}=($6(),q4(W4));return S(Z()?.extras?.codexAuthPath)}catch{return}}function bq(){try{let{tryGetActiveProvider:Z}=($6(),q4(W4));return S(Z()?.extras?.codexAccountId)}catch{return}}function tB(Z){if(!tk(Z))return;try{let X=ek(Z,"utf8"),q=JSON.parse(X);return q&&typeof q==="object"?q:void 0}catch{return}}function eB(Z){let{authJson:X,authPath:q,envAccountId:Q}=Z;if(!X)return{apiKey:"",authPath:q,source:Z.missingSource??"none"};let J=Pq(X,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),$=Pq(X,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=Q??Pq(X,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??m0(J)??m0($);if(!J)return{apiKey:"",accountId:Y,authPath:q,source:Z.missingSource??"none"};return{apiKey:J,accountId:Y,authPath:q,source:"auth.json"}}function ZL(Z){let{storedCredentials:X,envAccountId:q}=Z;return{apiKey:X.apiKey??X.accessToken,accountId:q??X.accountId??m0(X.idToken)??m0(X.accessToken),source:"secure-storage"}}function R7(Z,X){let q=S(Z.CODEX_API_KEY),J=bq()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID);if(q)return{apiKey:q,accountId:J??m0(q),source:"env"};let $=Sq();if(!Boolean($??S(Z.CODEX_AUTH_JSON_PATH)??S(Z.CODEX_HOME))&&X?.explicitAuthPathOnly)return{apiKey:"",accountId:J,source:"none"};let H=rB(Z),U=tB(H);return eB({authJson:U,authPath:H,envAccountId:J})}function Zt(Z){let X=Z?.env??process.env,q=R7(X,{explicitAuthPathOnly:!0}),Q=Boolean(Sq()??S(X.CODEX_AUTH_JSON_PATH)??S(X.CODEX_HOME)),J=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(Q||q.source==="env"||q.source==="auth.json")return q;if(Z?.storedCredentials?.accessToken)return ZL({storedCredentials:Z.storedCredentials,envAccountId:bq()??S(X.CODEX_ACCOUNT_ID)??S(X.CHATGPT_ACCOUNT_ID)});if(J)return R7(X);return RN(X)}function RN(Z=process.env){let X=bq()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID),q=R7(Z,{explicitAuthPathOnly:!0});if(q.source==="env"||q.source==="auth.json"||q.authPath)return q;let Q=hB();if(Q?.accessToken){let J=ZL({storedCredentials:Q,envAccountId:X});if(!(!J.accountId||fB(Q)))return J;let Y=rB(Z),H=tB(Y),U=eB({authJson:H,authPath:Y,envAccountId:X});if(U.apiKey)return{...U,accountId:U.accountId??J.accountId};return J}return R7(Z)}function MN(Z){let X=Z.trim().toLowerCase(),Q=X.split("?",1)[0]??X;return z7[Q]?.reasoningEffort}function Xt(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;if(q==="gpt-5.3-codex-spark"||q==="codexspark")return!1;if(MN(q)!==void 0)return!0;return GN.test(q)}var Eq="https://api.openai.com/v1",qN="https://chatgpt.com/backend-api/codex",nB="gpt-4o",z7,QN,JN,UN,GN,Cq,WN,cB="https://api.githubcopilot.com";var XL=B(()=>{mB();xq();z7={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.5":{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.4":{model:"gpt-5.4",reasoningEffort:"high"},"gpt-5.3-codex":{model:"gpt-5.3-codex",reasoningEffort:"high"},"gpt-5.3-codex-spark":{model:"gpt-5.3-codex-spark"},codexspark:{model:"gpt-5.3-codex-spark"},"gpt-5.2-codex":{model:"gpt-5.2-codex",reasoningEffort:"high"},"gpt-5.1-codex-max":{model:"gpt-5.1-codex-max",reasoningEffort:"high"},"gpt-5.1-codex-mini":{model:"gpt-5.1-codex-mini"},"gpt-5.5-mini":{model:"gpt-5.5-mini",reasoningEffort:"medium"},"gpt-5.4-mini":{model:"gpt-5.4-mini",reasoningEffort:"medium"},"gpt-5.2":{model:"gpt-5.2",reasoningEffort:"medium"}},QN=new Set(["codexplan","codexspark"]),JN=new Set(["localhost","127.0.0.1","::1"]);UN=/^gpt-(\d+)/,GN=/^gpt-5(?:[.-]|$)/,Cq=/\/+$/,WN=/^\[|\]$/g});var W4={};GX(W4,{tryGetActiveProvider:()=>G4,invalidateActiveProviderCache:()=>TN,getActiveProvider:()=>QL,_peekActiveProviderCacheForTesting:()=>jN,ActiveProviderNotConfiguredError:()=>M7});function FN(){if(qL)return;qL=!0,KB(()=>{Y6=null})}function DN(Z,X){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(aB(X))return"codex_responses";return"openai_compat"}}}function AN(Z){let X=WB(Z.model);return{transport:DN(Z,X),baseUrl:Z.baseUrl,model:X,apiKey:Z.apiKey,extras:Z.extras,name:Z.name}}function QL(){if(FN(),Y6)return Y6;let Z=_1(J0());if(!Z)throw new M7;return Y6=AN(Z),Y6}function G4(){try{return QL()}catch(Z){if(Z instanceof M7)return null;throw Z}}function TN(){Y6=null}function jN(){return Y6}var M7,Y6=null,qL=!1;var $6=B(()=>{Rq();FB();Mq();XL();M7=class M7 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function JL(Z){return Z.sort((X,q)=>{let Q=q.modified.getTime()-X.modified.getTime();if(Q!==0)return Q;return q.created.getTime()-X.created.getTime()})}var $L=()=>{};function YL(Z){if(typeof Z!=="string")return!1;let X=Z.trim();return X!==""&&X!=="."&&X!==".."&&!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("\x00")}function hq(Z){if(typeof Z!=="string")throw TypeError("Expected a string");if(!YL(Z))throw Error(`Unsafe filename: ${JSON.stringify(Z)}`)}var Kt;var HL=B(()=>{Kt=Object.freeze([""," ",".",".."," .",". "," ..",".. ","../","../foo","foo/../bar","foo/bar","foo\\bar","foo\x00bar"])});import o from"node:path";import KL from"node:os";import fq from"node:process";function mq(Z,{suffix:X="nodejs"}={}){if(hq(Z),X)Z+=`-${X}`;if(hq(Z),fq.platform==="darwin")return ON(Z);if(fq.platform==="win32")return IN(Z);return wN(Z)}var E1,gq,Q2,ON=(Z)=>{let X=o.join(E1,"Library");return{data:o.join(X,"Application Support",Z),config:o.join(X,"Preferences",Z),cache:o.join(X,"Caches",Z),log:o.join(X,"Logs",Z),temp:o.join(gq,Z)}},IN=(Z)=>{let X=Q2.APPDATA||o.join(E1,"AppData","Roaming"),q=Q2.LOCALAPPDATA||o.join(E1,"AppData","Local");return{data:o.join(q,Z,"Data"),config:o.join(X,Z,"Config"),cache:o.join(q,Z,"Cache"),log:o.join(q,Z,"Log"),temp:o.join(gq,Z)}},wN=(Z)=>{let X=o.basename(E1);return{data:o.join(Q2.XDG_DATA_HOME||o.join(E1,".local","share"),Z),config:o.join(Q2.XDG_CONFIG_HOME||o.join(E1,".config"),Z),cache:o.join(Q2.XDG_CACHE_HOME||o.join(E1,".cache"),Z),log:o.join(Q2.XDG_STATE_HOME||o.join(E1,".local","state"),Z),temp:o.join(gq,X,Z)}};var UL=B(()=>{HL();E1=KL.homedir(),gq=KL.tmpdir(),{env:Q2}=fq});import{join as F7}from"path";function VL(Z){let X=Z.replace(/[^a-zA-Z0-9]/g,"-");if(X.length<=GL)return X;return`${X.slice(0,GL)}-${Math.abs(WL(Z)).toString(36)}`}function A7(Z){return VL(Z)}var D7,GL=200,BL;var LL=B(()=>{UL();F0();kN();D7=mq("claude-cli");BL={baseLogs:()=>F7(D7.cache,A7(N().cwd())),errors:()=>F7(D7.cache,A7(N().cwd()),"errors"),messages:()=>F7(D7.cache,A7(N().cwd()),"messages"),mcpLogs:(Z)=>F7(D7.cache,A7(N().cwd()),`mcp-logs-${VL(Z)}`)}});function zL(Z){return Z.replace(_L,"").trim()||Z}function RL(Z){return Z.replace(_L,"").trim()}function Dt(Z){return Z.replace(NN,"").trim()}var _L,NN;var ML=B(()=>{_L=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;NN=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});import{readdir as PN,readFile as EN,stat as vN}from"fs/promises";import{join as yN}from"path";function Ct(Z,X){let q=Z.firstPrompt?.startsWith(`<${TL}>`),Q=Z.firstPrompt?RL(Z.firstPrompt):"",J=Q&&!q,$=Z.agentName||Z.customTitle||Z.summary||(J?Q:void 0)||X||(q?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return zL($).trim()}function CN(Z){return Z.toISOString().replace(/[:.]/g,"-")}function bN(Z){if(V4.length>=SN)V4.shift();V4.push(Z)}function St(Z){if(P0!==null)return;if(P0=Z,H6.length>0){let X=[...H6];H6.length=0;for(let q of X)switch(q.type){case"error":P0.logError(q.error);break;case"mcpError":P0.logMCPError(q.serverName,q.error);break;case"mcpDebug":P0.logMCPDebug(q.serverName,q.message);break}}}function g(Z){let X=AL(Z);try{let q=G4()?.transport;if(q==="bedrock"||q==="vertex"||q==="foundry"||process.env.DISABLE_ERROR_REPORTING||pV())return;let J={error:X.stack||X.message,timestamp:new Date().toISOString()};if(bN(J),P0===null){H6.push({type:"error",error:X});return}P0.logError(X)}catch{}}function ht(){return[...V4]}function hN(){return fN(BL.errors())}async function ft(Z){return(await hN())[Z]||null}async function fN(Z){let X;try{X=await PN(Z,{withFileTypes:!0})}catch{return g(Error(`No logs found at ${Z}`)),[]}let q=await Promise.all(X.map(async(Q,J)=>{let $=yN(Z,Q.name),Y=await EN($,{encoding:"utf8"}),H=X0(Y),U=H[0],W=H[H.length-1],G=U?.type==="user"&&typeof U?.message?.content==="string"?U?.message?.content:"No prompt",V=await vN($),_=$.includes("sidechain"),L=CN(V.mtime);return{date:L,fullPath:$,messages:H,value:J,created:uq(U?.timestamp||L),modified:W?.timestamp?uq(W.timestamp):uq(L),firstPrompt:G.split(`
|
|
186
|
+
`)[0]?.slice(0,50)+(G.length>50?"…":"")||"No prompt",messageCount:H.length,isSidechain:_}}));return JL(q.filter((Q)=>Q!==null)).map((Q,J)=>({...Q,value:J}))}function uq(Z){let X=Z.split(/\D+/);return new Date(Date.UTC(parseInt(X[0],10),parseInt(X[1],10)-1,parseInt(X[2],10),parseInt(X[3],10),parseInt(X[4],10),parseInt(X[5],10),parseInt(X[6],10)))}function gt(Z,X){try{if(P0===null){H6.push({type:"mcpError",serverName:Z,error:X});return}P0.logMCPError(Z,X)}catch{}}function mt(Z,X){try{if(P0===null){H6.push({type:"mcpDebug",serverName:Z,message:X});return}P0.logMCPDebug(Z,X)}catch{}}function ut(Z,X){if(!X||!X.startsWith("repl_main_thread"))return;let{messages:q,...Q}=Z;FL(Q),DL(null)}function pt(){P0=null,H6.length=0,V4=[]}var SN=100,V4,H6,P0=null,bt;var p0=B(()=>{v1();T6();$6();xN();$L();LL();ML();C1();Qq();z0();V4=[];H6=[];bt=d(()=>{return process.argv.includes("--hard-fail")})});import jL from"node:path";function mN(Z){return Z.includes(jL.sep)||Z.includes("/")||jL.isAbsolute(Z)}function uN(Z){let X=Z.trim();if(!X)return"Unsafe executable: empty command";if(B4.test(X))return"Unsafe executable: control characters are not allowed";if(!mN(X)&&!gN.test(X))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function pN(Z){for(let X of Z)if(B4.test(X))return"Unsafe argument: control characters are not allowed";return null}function dN(Z){if(!Z)return null;if(B4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function cN(Z){if(!Z)return{};for(let[X,q]of Object.entries(Z)){if(B4.test(X))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof q==="string"&&B4.test(q))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function lN(Z,X){if(typeof Z.signal==="string")return Z.signal;return String(X)}function a(Z,X,q={timeout:10*dq*pq,preserveOutputOnError:!0,useCwd:!0}){return Q3(Z,X,{abortSignal:q.abortSignal,timeout:q.timeout,preserveOutputOnError:q.preserveOutputOnError,cwd:q.useCwd?s():void 0,env:q.env,stdin:q.stdin,input:q.input})}function Q3(Z,X,{abortSignal:q,timeout:Q=10*dq*pq,preserveOutputOnError:J=!0,cwd:$,env:Y,maxBuffer:H=OL,stdin:U,input:W}={timeout:10*dq*pq,preserveOutputOnError:!0,maxBuffer:OL}){let G=uN(Z);if(G)return Promise.resolve({stdout:"",stderr:"",code:1,error:G});let V=pN(X);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let _=dN($);if(_)return Promise.resolve({stdout:"",stderr:"",code:1,error:_});let L=cN(Y);if(L.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:L.error});return new Promise((z)=>{let R=W!==void 0?"pipe":U??"pipe",D=IL.spawn(Z,X,{cwd:$,env:L.value,shell:!1,signal:q,stdio:[R,"pipe","pipe"]}),M=!1,k="",F="",I=0,T,j=!1,A=(x)=>{if(M)return;M=!0,z(x)},f=(x,v)=>{let b=typeof x==="string"?x:x.toString("utf8");if(I+=Buffer.byteLength(b,"utf8"),I>H){D.kill(),A({stdout:J?k:"",stderr:J?F:"",code:1,error:"maxBuffer exceeded"});return}if(v==="stdout")k+=b;else F+=b};D.stdout?.on("data",(x)=>f(x,"stdout")),D.stderr?.on("data",(x)=>f(x,"stderr")),D.once("spawn",()=>{if(R==="pipe"&&D.stdin)if(W!==void 0)D.stdin.end(W);else D.stdin.end()}),D.once("error",(x)=>{g(x),A({stdout:"",stderr:"",code:1,error:x.message})});let w=Q>0?setTimeout(()=>{j=!0,D.kill()},Q):void 0;D.once("close",(x,v)=>{if(w)clearTimeout(w);T=v??void 0;let b=x??1;if(j){A({stdout:J?k:"",stderr:J?F:"",code:b,error:`Command timed out after ${Q}ms`});return}if(b!==0){if(J)A({stdout:k,stderr:F,code:b,error:lN({signal:T},b)});else A({stdout:"",stderr:"",code:b});return}A({stdout:k,stderr:F,code:0})})})}var IL,pq=1000,dq=60,OL=1e6,B4,gN;var y4=B(()=>{Z1();p0();Dq();IL=cY(b7(),1),B4=/[\0\r\n]/,gN=/^[A-Za-z0-9_.-]+$/});import{readFile as nN}from"fs/promises";import{join as iN}from"path";async function L4(Z,X,q,Q){try{let J=await nN(iN(Z,"config"),"utf-8");return aN(J,X,q,Q)}catch{return null}}function aN(Z,X,q,Q){let J=Z.split(`
|
|
187
|
+
`),$=X.toLowerCase(),Y=Q.toLowerCase(),H=!1;for(let U of J){let W=U.trim();if(W.length===0||W[0]==="#"||W[0]===";")continue;if(W[0]==="["){H=tN(W,$,q);continue}if(!H)continue;let G=oN(W);if(G&&G.key.toLowerCase()===Y)return G.value}return null}function oN(Z){let X=0;while(X<Z.length&&eN(Z[X]))X++;if(X===0)return null;let q=Z.slice(0,X);while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;if(X>=Z.length||Z[X]!=="=")return null;X++;while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;let Q=sN(Z,X);return{key:q,value:Q}}function sN(Z,X){let q="",Q=!1,J=X;while(J<Z.length){let $=Z[J];if(!Q&&($==="#"||$===";"))break;if($==='"'){Q=!Q,J++;continue}if($==="\\"&&J+1<Z.length){let Y=Z[J+1];if(Q){switch(Y){case"n":q+=`
|
|
188
|
+
`;break;case"t":q+="\t";break;case"b":q+="\b";break;case'"':q+='"';break;case"\\":q+="\\";break;default:q+=Y;break}J+=2;continue}if(Y==="\\"){q+="\\",J+=2;continue}}q+=$,J++}if(!Q)q=rN(q);return q}function rN(Z){let X=Z.length;while(X>0&&(Z[X-1]===" "||Z[X-1]==="\t"))X--;return Z.slice(0,X)}function tN(Z,X,q){let Q=1;while(Q<Z.length&&Z[Q]!=="]"&&Z[Q]!==" "&&Z[Q]!=="\t"&&Z[Q]!=='"')Q++;if(Z.slice(1,Q).toLowerCase()!==X)return!1;if(q===null)return Q<Z.length&&Z[Q]==="]";while(Q<Z.length&&(Z[Q]===" "||Z[Q]==="\t"))Q++;if(Q>=Z.length||Z[Q]!=='"')return!1;Q++;let $="";while(Q<Z.length&&Z[Q]!=='"'){if(Z[Q]==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(Y==="\\"||Y==='"'){$+=Y,Q+=2;continue}$+=Y,Q+=2;continue}$+=Z[Q],Q++}if(Q>=Z.length||Z[Q]!=='"')return!1;if(Q++,Q>=Z.length||Z[Q]!=="]")return!1;return $===q}function eN(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var wL=()=>{};import{unwatchFile as kL,watchFile as Zx}from"fs";import{readdir as Xx,readFile as K6,stat as PL}from"fs/promises";import{join as E0,resolve as T7}from"path";function Ye(){J2.clear()}async function u0(Z){let X=T7(Z??s()),q=J2.get(X);if(q!==void 0)return q;let Q=Y2(X);if(!Q)return J2.set(X,null),null;let J=E0(Q,".git");try{if((await PL(J)).isFile()){let Y=(await K6(J,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),U=T7(Q,H);return J2.set(X,U),U}}return J2.set(X,J),J}catch{return J2.set(X,null),null}}function j7(Z){if(!Z||Z.startsWith("-")||Z.startsWith("/"))return!1;if(Z.includes(".."))return!1;if(Z.split("/").some((X)=>X==="."||X===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(Z))return!1;return!0}function cq(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function _4(Z){try{let X=(await K6(E0(Z,"HEAD"),"utf-8")).trim();if(X.startsWith("ref:")){let q=X.slice(4).trim();if(q.startsWith("refs/heads/")){let J=q.slice(11);if(!j7(J))return null;return{type:"branch",name:J}}if(!j7(q))return null;let Q=await $2(Z,q);return Q?{type:"detached",sha:Q}:{type:"detached",sha:""}}if(!cq(X))return null;return{type:"detached",sha:X}}catch{return null}}async function $2(Z,X){let q=await NL(Z,X);if(q)return q;let Q=await U6(Z);if(Q&&Q!==Z)return NL(Q,X);return null}async function NL(Z,X){try{let q=(await K6(E0(Z,X),"utf-8")).trim();if(q.startsWith("ref:")){let Q=q.slice(4).trim();if(!j7(Q))return null;return $2(Z,Q)}if(!cq(q))return null;return q}catch{}try{let q=await K6(E0(Z,"packed-refs"),"utf-8");for(let Q of q.split(`
|
|
189
|
+
`)){if(Q.startsWith("#")||Q.startsWith("^"))continue;let J=Q.indexOf(" ");if(J===-1)continue;if(Q.slice(J+1)===X){let $=Q.slice(0,J);return cq($)?$:null}}}catch{}return null}async function U6(Z){try{let X=(await K6(E0(Z,"commondir"),"utf-8")).trim();return T7(Z,X)}catch{return null}}async function qx(Z,X,q){try{let Q=(await K6(E0(Z,X),"utf-8")).trim();if(Q.startsWith("ref:")){let J=Q.slice(4).trim();if(J.startsWith(q)){let $=J.slice(q.length);if(!j7($))return null;return $}}}catch{}return null}class EL{gitDir=null;commonDir=null;initialized=!1;initPromise=null;watchedPaths=[];branchRefPath=null;cache=new Map;async ensureStarted(){if(this.initialized)return;if(this.initPromise)return this.initPromise;return this.initPromise=this.start(),this.initPromise}async start(){if(this.gitDir=await u0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await U6(this.gitDir),this.watchPath(E0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(E0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),Q4(async()=>{this.stopWatching()})}watchPath(Z,X){this.watchedPaths.push(Z),Zx(Z,{interval:Qx},X)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await _4(this.gitDir),X=this.commonDir??this.gitDir,q=Z?.type==="branch"?E0(X,"refs","heads",Z.name):null;if(q===this.branchRefPath)return;if(this.branchRefPath)kL(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((Q)=>Q!==this.branchRefPath);if(this.branchRefPath=q,!q)return;this.watchPath(q,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await xL(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)kL(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,X){await this.ensureStarted();let q=this.cache.get(Z);if(q&&!q.dirty)return q.value;if(q)q.dirty=!1;let Q=await X(),J=this.cache.get(Z);if(J&&!J.dirty)J.value=Q;if(!J)this.cache.set(Z,{value:Q,dirty:!1,compute:X});return Q}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function Jx(){let Z=await u0();if(!Z)return"HEAD";let X=await _4(Z);if(!X)return"HEAD";return X.type==="branch"?X.name:"HEAD"}async function $x(){let Z=await u0();if(!Z)return"";let X=await _4(Z);if(!X)return"";if(X.type==="branch")return await $2(Z,`refs/heads/${X.name}`)??"";return X.sha}async function Yx(){let Z=await u0();if(!Z)return null;let X=await L4(Z,"remote","origin","url");if(X)return X;let q=await U6(Z);if(q&&q!==Z)return L4(q,"remote","origin","url");return null}async function Hx(){let Z=await u0();if(!Z)return"main";let X=await U6(Z)??Z,q=await qx(X,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(q)return q;for(let Q of["main","master"])if(await $2(X,`refs/remotes/origin/${Q}`))return Q;return"main"}function vL(){return O7.get("branch",Jx)}function yL(){return O7.get("head",$x)}function CL(){return O7.get("remoteUrl",Yx)}function SL(){return O7.get("defaultBranch",Hx)}async function He(Z){let X=await u0(Z);if(!X)return null;let q=await _4(X);if(!q)return null;if(q.type==="branch")return $2(X,`refs/heads/${q.name}`);return q.sha}async function Ke(Z){let X;try{let Q=(await K6(E0(Z,".git"),"utf-8")).trim();if(!Q.startsWith("gitdir:"))return null;X=T7(Z,Q.slice(7).trim())}catch{return null}let q=await _4(X);if(!q)return null;if(q.type==="branch")return $2(X,`refs/heads/${q.name}`);return q.sha}async function Ue(Z){let X=await u0(Z);if(!X)return null;let q=await L4(X,"remote","origin","url");if(q)return q;let Q=await U6(X);if(Q&&Q!==X)return L4(Q,"remote","origin","url");return null}async function bL(){let Z=await u0();if(!Z)return!1;let X=await U6(Z)??Z;try{return await PL(E0(X,"shallow")),!0}catch{return!1}}async function hL(){try{let Z=await u0();if(!Z)return 0;let X=await U6(Z)??Z;return(await Xx(E0(X,"worktrees"))).length+1}catch{return 1}}var J2,Qx=1000,O7;var fL=B(()=>{T6();YB();Z1();_2();wL();J2=new Map;O7=new EL});import{createHash as Kx}from"crypto";import{readFileSync as lq,realpathSync as gL,statSync as mL}from"fs";import{open as Ux,readFile as Gx,realpath as uL,stat as Wx}from"fs/promises";import{basename as Vx,dirname as nq,join as v0,resolve as w7,sep as pL}from"path";function Bx(){function Z(X){let q=dL(X);return q===aL?null:q}return Z.cache=dL.cache,Z}function Lx(){function Z(X){let q=Y2(X);if(!q)return null;return cL(q)}return Z.cache=cL.cache,Z}function we(Z){return u0(Z)}async function ke(){let Z=s(),X=Y2(Z);if(!X)return!1;try{let[q,Q]=await Promise.all([uL(Z),uL(X)]);return q===Q}catch{return Z===X}}function Mx(Z){let X=Z.trim();if(!X)return null;let q=X.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(q&&q[1]&&q[2])return`${q[1]}/${q[2]}`.toLowerCase();let Q=X.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(Q&&Q[1]&&Q[2]){let J=Q[1],$=Q[2];if(wx(J)&&$.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`${J}/${$}`.toLowerCase()}return null}async function xe(){let Z=await iq();if(!Z)return null;let X=Mx(Z);if(!X)return null;return Kx("sha256").update(X).digest("hex").substring(0,16)}async function Ce(){try{let[Z,X,q,Q,J,$]=await Promise.all([zx(),Rx(),iq(),Fx(),Dx(),Tx()]);return{commitHash:Z,branchName:X,remoteUrl:q,isHeadOnRemote:Q,isClean:J,worktreeCount:$}}catch(Z){return null}}async function Se(){let{parseGitRemote:Z}=await import("./detectRepository-0.5.9-4nd76hbs.mjs"),X=await iq();if(!X)return P("Local GitHub repo: unknown"),null;let q=Z(X);if(q&&q.host==="github.com"){let Q=`${q.owner}/${q.name}`;return P(`Local GitHub repo: ${Q}`),Q}return P("Local GitHub repo: unknown"),null}async function Ox(){let{stdout:Z,code:X}=await a(Z0(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(X===0&&Z.trim())return Z.trim();let{stdout:q,code:Q}=await a(Z0(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(Q===0){let $=q.match(/HEAD branch: (\S+)/);if($&&$[1])return`origin/${$[1]}`}let J=["origin/main","origin/staging","origin/master"];for(let $ of J){let{code:Y}=await a(Z0(),["rev-parse","--verify",$],{preserveOutputOnError:!1});if(Y===0)return $}return null}function Ix(){return bL()}async function I7(){let{stdout:Z,code:X}=await a(Z0(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),q=Z.trim();if(X!==0||!q)return[];let Q=q.split(`
|
|
190
|
+
`).filter(Boolean),J=[],$=0;for(let Y of Q){if(J.length>=iL){P(`Untracked file capture: reached max file count (${iL})`);break}if(aq(Y))continue;try{let U=(await Wx(Y)).size;if(U>lL){P(`Untracked file capture: skipping ${Y} (exceeds ${lL} bytes)`);continue}if($+U>nL){P(`Untracked file capture: reached total size limit (${nL} bytes)`);break}if(U===0){J.push({path:Y,content:""});continue}let W=Math.min(jx,U),G=await Ux(Y,"r");try{let V=Buffer.alloc(W),{bytesRead:_}=await G.read(V,0,W,0),L=V.subarray(0,_);if(oq(L))continue;let z;if(U<=W)z=L.toString("utf-8");else z=await Gx(Y,"utf-8");J.push({path:Y,content:z}),$+=U}finally{await G.close()}}catch(H){P(`Failed to read untracked file ${Y}: ${H}`)}}return J}async function be(){try{if(!await _x())return null;if(await Ix()){P("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:L},z]=await Promise.all([a(Z0(),["diff","HEAD"]),I7()]);return{remote_base_sha:null,remote_base:null,patch:L||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let X=await Ox();if(!X){P("No remote found, using HEAD-only mode for issue");let[{stdout:L},z]=await Promise.all([a(Z0(),["diff","HEAD"]),I7()]);return{remote_base_sha:null,remote_base:null,patch:L||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let{stdout:q,code:Q}=await a(Z0(),["merge-base","HEAD",X],{preserveOutputOnError:!1});if(Q!==0||!q.trim()){P("Merge-base failed, using HEAD-only mode for issue");let[{stdout:L},z]=await Promise.all([a(Z0(),["diff","HEAD"]),I7()]);return{remote_base_sha:null,remote_base:null,patch:L||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let J=q.trim(),[{stdout:$},Y,{stdout:H,code:U},{stdout:W},{stdout:G}]=await Promise.all([a(Z0(),["diff",J]),I7(),a(Z0(),["format-patch",`${J}..HEAD`,"--stdout"]),a(Z0(),["rev-parse","HEAD"]),a(Z0(),["rev-parse","--abbrev-ref","HEAD"])]),V=null;if(U===0&&H&&H.trim())V=H;let _=G?.trim();return{remote_base_sha:J,remote_base:X,patch:$||"",untracked_files:Y,format_patch:V,head_sha:W?.trim()||null,branch_name:_&&_!=="HEAD"?_:null}}catch(Z){return g(Z),null}}function wx(Z){let X=Z.split(":")[0]??"";return X==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(X)}function he(){let Z=N(),X=s(),q=v0(X,".git");try{let Q=Z.statSync(q);if(Q.isFile())return!1;if(Q.isDirectory()){let J=v0(q,"HEAD");try{if(Z.statSync(J).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(v0(X,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(v0(X,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(v0(X,"refs")).isDirectory())return!0}catch{}return!1}var aL,dL,Y2,cL,h5,Z0,_x,D$=async(Z)=>{return Y2(Z)!==null},zx=async()=>{return yL()},Rx=async()=>{return vL()},Ne=async()=>{return SL()},iq=async()=>{return CL()},Fx=async()=>{let{code:Z}=await a(Z0(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},Pe=async()=>{let{stdout:Z,code:X}=await a(Z0(),["--no-optional-locks","rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1,useCwd:!0});return X===0&&parseInt(Z.trim(),10)>0},Ee=async()=>{let{stdout:Z,code:X}=await a(Z0(),["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{preserveOutputOnError:!1,useCwd:!0});if(X!==0)return{ahead:0,behind:0};let q=Z.trim().split(/\s+/);if(q.length!==2)return{ahead:0,behind:0};let Q=parseInt(q[0],10),J=parseInt(q[1],10);return{ahead:Number.isFinite(J)?J:0,behind:Number.isFinite(Q)?Q:0}},Dx=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)X.push("-uno");let{stdout:q}=await a(Z0(),X,{preserveOutputOnError:!1});return q.trim().length===0},ve=async()=>{let{stdout:Z}=await a(Z0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
|
|
191
|
+
`).map((X)=>X.trim().split(" ",2)[1]?.trim()).filter((X)=>typeof X==="string")},Ax=async()=>{let{stdout:Z}=await a(Z0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1}),X=[],q=[];return Z.trim().split(`
|
|
192
|
+
`).filter((Q)=>Q.length>0).forEach((Q)=>{let J=Q.substring(0,2),$=Q.substring(2).trim();if(J==="??")q.push($);else if($)X.push($)}),{tracked:X,untracked:q}},Tx=async()=>{return hL()},ye=async(Z)=>{try{let X=Z||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:q}=await Ax();if(q.length>0){let{code:J}=await a(Z0(),["add",...q],{preserveOutputOnError:!1});if(J!==0)return!1}let{code:Q}=await a(Z0(),["stash","push","--message",X],{preserveOutputOnError:!1});return Q===0}catch(X){return!1}},lL=524288000,nL=5368709120,iL=20000,jx=65536;var _2=B(()=>{v1();sq();Z1();M1();H2();y4();F0();fL();p0();T4();_5();aL=Symbol("git-root-not-found"),dL=R1((Z)=>{let X=Date.now();Y0("info","find_git_root_started");let q=w7(Z),Q=q.substring(0,q.indexOf(pL)+1)||pL,J=0;while(q!==Q){try{let Y=v0(q,".git");J++;let H=mL(Y);if(H.isDirectory()||H.isFile())return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:J,found:!0}),q.normalize("NFC")}catch{}let $=nq(q);if($===q)break;q=$}try{let $=v0(Q,".git");J++;let Y=mL($);if(Y.isDirectory()||Y.isFile())return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:J,found:!0}),Q.normalize("NFC")}catch{}return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:J,found:!1}),aL},(Z)=>Z,50),Y2=Bx();cL=R1((Z)=>{try{let X=lq(v0(Z,".git"),"utf-8").trim();if(!X.startsWith("gitdir:"))return Z;let q=w7(Z,X.slice(7).trim()),Q=w7(q,lq(v0(q,"commondir"),"utf-8").trim());if(w7(nq(q))!==v0(Q,"worktrees"))return Z;if(gL(lq(v0(q,"gitdir"),"utf-8").trim())!==v0(gL(Z),".git"))return Z;if(Vx(Q)!==".git")return Q.normalize("NFC");return nq(Q).normalize("NFC")}catch{return Z}},(Z)=>Z,50),h5=Lx();Z0=d(()=>{return L5("git")||"git"}),_x=d(async()=>{let Z=Date.now();Y0("info","is_git_check_started");let X=Y2(s())!==null;return Y0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:X}),X})});
|
|
193
|
+
export{pi as c6,uW as d6,g0 as e6,J4 as f6,O0 as g6,Tq as h6,ts as i6,U7 as j6,i4 as k6,W9 as l6,b7 as m6,AU as n6,TU as o6,HX as p6,m6 as q6,pQ as r6,dQ as s6,h7 as t6,sQ as u6,aq as v6,sq as w6,Y0 as x6,vx as y6,H2 as z6,K7 as A6,a as B6,Q3 as C6,y4 as D6,L4 as E6,wL as F6,Ye as G6,u0 as H6,$2 as I6,U6 as J6,He as K6,Ke as L6,Ue as M6,fL as N6,ZJ as O6,XJ as P6,NP as Q6,R1 as R6,T4 as S6,_6 as T6,f7 as U6,kG as V6,L5 as W6,_5 as X6,Y2 as Y6,h5 as Z6,Z0 as _6,_x as $6,we as a7,ke as b7,D$ as c7,zx as d7,Rx as e7,Ne as f7,iq as g7,Mx as h7,xe as i7,Fx as j7,Pe as k7,Ee as l7,Dx as m7,ve as n7,Ax as o7,Tx as p7,ye as q7,Ce as r7,Se as s7,Ox as t7,be as u7,he as v7,_2 as w7,LP as x7,y0 as y7,V6 as z7,bP as A7,i_ as B7,hP as C7,QJ as D7,JJ as E7,d7 as F7,lP as G7,nP as H7,iP as I7,j4 as J7,WJ as K7,VJ as L7,DJ as M7,AJ as N7,pJ as O7,dJ as P7,rJ as Q7,tJ as R7,o7 as S7,mz as T7,q1 as U7,W2 as V7,Dv as W7,Av as X7,Tv as Y7,dz as Z7,P4 as _7,H$ as $7,Ov as a8,t7 as b8,K$ as c8,e7 as d8,Z3 as e8,G$ as f8,cv as g8,sz as h8,lv as i8,nv as j8,iv as k8,av as l8,W$ as m8,ov as n8,sv as o8,rv as p8,tv as q8,ev as r8,Zy as s8,tz as t8,Xy as u8,qy as v8,Qy as w8,Jy as x8,$y as y8,Yy as z8,L$ as A8,Hy as B8,E4 as C8,YR as D8,T$ as E8,C0 as F8,by as G8,V3 as H8,hy as I8,fy as J8,h4 as K8,py as L8,dy as M8,cy as N8,ly as O8,ny as P8,iy as Q8,A2 as R8,ay as S8,oy as T8,B3 as U8,ry as V8,ty as W8,u$ as X8,D1 as Y8,T2 as Z8,g4 as _8,c$ as $8,HC as a9,l$ as b9,NG as c9,xG as d9,L0 as e9,vO as f9,p6 as g9,_l as h9,UX as i9,Ml as j9,Fl as k9,Dl as l9,Al as m9,Tl as n9,jl as o9,Ol as p9,Il as q9,wl as r9,kl as s9,Nl as t9,xl as u9,SG as v9,Pl as w9,El as x9,vl as y9,yl as z9,Cl as A9,Sl as B9,bl as C9,bG as D9,d6 as E9,hG as F9,bO as G9,hO as H9,fO as I9,gO as J9,mO as K9,uO as L9,pO as M9,cO as N9,lO as O9,nO as P9,gG as Q9,uG as R9,pG as S9,lG as T9,ol as U9,iG as V9,o1 as W9,Jn as X9,aO as Y9,F5 as Z9,Yn as _9,rG as $9,T5 as a_,Vn as b_,Bn as c_,Ln as d_,ZW as e_,DI as f_,_n as g_,zn as h_,TI as i_,Rn as j_,A5 as k_,wI as l_,xI as m_,Dn as n_,$W as o_,Tn as p_,j5 as q_,YW as r_,HW as s_,EI as t_,vI as u_,In as v_,wn as w_,kn as x_,KW as y_,UW as z_,xn as A_,Pn as B_,GW as C_,zX as D_,WW as E_,VW as F_,yn as G_,BW as H_,l6 as I_,fn as J_,_W as K_,gn as L_,zW as M_,un as N_,RW as O_,MW as P_,pn as Q_,dn as R_,cn as S_,ln as T_,nn as U_,hI as V_,an as W_,RX as X_,$i as Y_,IW as Z_,wW as __,N0 as $_,Fi as a$,Di as b$,Ai as c$,l2 as d$,Si as e$,IX as f$,qa as g$,P5 as h$,E5 as i$,Qa as j$,Ja as k$,nW as l$,hX as m$,va as n$,i2 as o$,iW as p$,y5 as q$,JV as r$,n as s$,ya as t$,Ca as u$,s1 as v$,Sa as w$,C5 as x$,ba as y$,ha as z$,qw as A$,fa as B$,ga as C$,ma as D$,ua as E$,pa as F$,da as G$,YV as H$,GV as I$,Zo as J$,$w as K$,Xo as L$,a2 as M$,BV as N$,qo as O$,gX as P$,Lo as Q$,_o as R$,uV as S$,pV as T$,Qq as U$,o5 as V$,nV as W$,Zk as X$,Mo as Y$,Fo as Z$,iV as _$,qk as $$,Qk as aaa,_0 as baa,rV as caa,Z4 as daa,Kk as eaa,Uk as faa,XB as gaa,qB as haa,eo as iaa,Q7 as jaa,Lk as kaa,Zs as laa,_k as maa,Xs as naa,qs as oaa,Qs as paa,Js as qaa,$s as raa,Ys as saa,KB as taa,M0 as uaa,Hs as vaa,Ks as waa,J0 as xaa,Us as yaa,Gs as zaa,Ws as Aaa,Vs as Baa,_q as Caa,$7 as Daa,zq as Eaa,Tk as Faa,Bs as Gaa,Ls as Haa,jk as Iaa,_s as Jaa,zs as Kaa,Rs as Laa,Ms as Maa,Fs as Naa,Ds as Oaa,As as Paa,Ts as Qaa,Rq as Raa,Y7 as Saa,WB as Taa,Mq as Uaa,xs as Vaa,f0 as Waa,Ps as Xaa,_1 as Yaa,Es as Zaa,vk as _aa,vs as $aa,yk as aba,ys as bba,Cs as cba,Ss as dba,bs as eba,Ck as fba,Sk as gba,hs as hba,fs as iba,gs as jba,ms as kba,bk as lba,FB as mba,Yr as nba,OB as oba,EB as pba,vB as qba,Er as rba,vr as sba,yr as tba,S as uba,kq as vba,Cr as wba,m0 as xba,Sr as yba,CB as zba,xq as Aba,sk as Bba,gB as Cba,ur as Dba,pr as Eba,mB as Fba,Eq as Gba,qN as Hba,oB as Iba,sr as Jba,rr as Kba,_N as Lba,lB as Mba,sB as Nba,tr as Oba,er as Pba,Zt as Qba,RN as Rba,MN as Sba,Xt as Tba,XL as Uba,M7 as Vba,QL as Wba,G4 as Xba,TN as Yba,jN as Zba,$6 as _ba,JL as $ba,$L as aca,BL as bca,LL as cca,zL as dca,RL as eca,Dt as fca,ML as gca,Ct as hca,CN as ica,St as jca,g as kca,ht as lca,hN as mca,ft as nca,gt as oca,mt as pca,ut as qca,pt as rca,p0 as sca};
|