@claudiolabs/claudin 1.1.30 → 1.1.31
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-1.1.31-6e06310w.mjs +1 -0
- package/dist/chunks/App-1.1.31-bp57fthj.mjs +1 -0
- package/dist/chunks/ApproveApiKey-1.1.31-ptx7r5x2.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-1.1.31-0d22j8k7.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-1.1.31-v2cfafqt.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.31-a8e8ar2n.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-1.1.31-zq76tmk2.mjs +1 -0
- package/dist/chunks/DiffDialog-1.1.31-r1mknqwv.mjs +6 -0
- package/dist/chunks/Doctor-1.1.31-t4n9k4nc.mjs +1 -0
- package/dist/chunks/ExplorerDialog-1.1.31-41a3c01z.mjs +6 -0
- package/dist/chunks/ITermBackend-1.1.31-y9f8hq45.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-1.1.31-xpdggxkf.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-1.1.31-0bg1r1g6.mjs +1 -0
- package/dist/chunks/MigrationDialog-1.1.31-w8fpbc16.mjs +1 -0
- package/dist/chunks/Onboarding-1.1.31-23zjjspn.mjs +1 -0
- package/dist/chunks/ProviderManager-1.1.31-504qgqkc.mjs +1 -0
- package/dist/chunks/REPL-1.1.31-nyzbwycm.mjs +1 -0
- package/dist/chunks/ResumeConversation-1.1.31-dqkxr7bz.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-1.1.31-htqfbpbp.mjs +1 -0
- package/dist/chunks/TeleportProgress-1.1.31-27h2np2z.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.31-41nwynfk.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-1.1.31-ea5827ce.mjs +1 -0
- package/dist/chunks/TmuxBackend-1.1.31-jvrhermf.mjs +9 -0
- package/dist/chunks/ToolSearchTool-1.1.31-c0sya3fj.mjs +1 -0
- package/dist/chunks/TrustDialog-1.1.31-28w5033t.mjs +1 -0
- package/dist/chunks/activeProvider-1.1.31-dbrkwgfw.mjs +1 -0
- package/dist/chunks/add-dir-1.1.31-r6x72g59.mjs +1 -0
- package/dist/chunks/agentTypes-1.1.31-kb6srdzm.mjs +1 -0
- package/dist/chunks/agents-1.1.31-1jetdejb.mjs +110 -0
- package/dist/chunks/agents-1.1.31-mfr4h93c.mjs +3 -0
- package/dist/chunks/api-1.1.31-hp3y91t9.mjs +1 -0
- package/dist/chunks/asciicast-1.1.31-t0xrwnqn.mjs +1 -0
- package/dist/chunks/auth-1.1.31-76rswxwe.mjs +1 -0
- package/dist/chunks/auth-1.1.31-yhv86kw0.mjs +1 -0
- package/dist/chunks/autoMode-1.1.31-qma18egk.mjs +52 -0
- package/dist/chunks/autoModeSetup-1.1.31-egrmqsva.mjs +44 -0
- package/dist/chunks/autoUpdater-1.1.31-417m125q.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-1.1.31-e5emh88x.mjs +1 -0
- package/dist/chunks/branch-1.1.31-bxrg1svq.mjs +4 -0
- package/dist/chunks/bridge-1.1.31-1rsj352r.mjs +2 -0
- package/dist/chunks/bridgeConfig-1.1.31-r9vnvw71.mjs +1 -0
- package/dist/chunks/bridgeEnabled-1.1.31-d9mxn4g0.mjs +1 -0
- package/dist/chunks/bridgeMain-1.1.31-7sf093b0.mjs +88 -0
- package/dist/chunks/bridgePointer-1.1.31-n1t53nem.mjs +1 -0
- package/dist/chunks/btw-1.1.31-skw1dhb5.mjs +1 -0
- package/dist/chunks/buddy-1.1.31-wtmggn5p.mjs +3 -0
- package/dist/chunks/cache-probe-1.1.31-pgss169p.mjs +21 -0
- package/dist/chunks/cacheStats-1.1.31-af3nkg2b.mjs +4 -0
- package/dist/chunks/caches-1.1.31-yvqtsfx3.mjs +1 -0
- package/dist/chunks/cd-1.1.31-9t47yj0z.mjs +3 -0
- package/dist/chunks/claudeDesktop-1.1.31-b7a99nfq.mjs +1 -0
- package/dist/chunks/claudemd-1.1.31-h72v8r12.mjs +1 -0
- package/dist/chunks/clear-1.1.31-ndp0q9t9.mjs +1 -0
- package/dist/chunks/clearTerminal-1.1.31-d6d2q7kn.mjs +1 -0
- package/dist/chunks/cli-1.1.31-03xjvk1e.mjs +3 -0
- package/dist/chunks/cli-1.1.31-0fnqd3bq.mjs +25 -0
- package/dist/chunks/cli-1.1.31-0mmyq6jx.mjs +2 -0
- package/dist/chunks/cli-1.1.31-0yagz4xw.mjs +2 -0
- package/dist/chunks/cli-1.1.31-1192t9cm.mjs +2 -0
- package/dist/chunks/cli-1.1.31-13cx7z8n.mjs +60 -0
- package/dist/chunks/cli-1.1.31-1dv9ay7v.mjs +2 -0
- package/dist/chunks/cli-1.1.31-1q4btmra.mjs +2 -0
- package/dist/chunks/cli-1.1.31-1qw0s3a8.mjs +2 -0
- package/dist/chunks/cli-1.1.31-1wxttnqr.mjs +2 -0
- package/dist/chunks/cli-1.1.31-2csxt0x3.mjs +2 -0
- package/dist/chunks/cli-1.1.31-2ffqcy85.mjs +2 -0
- package/dist/chunks/cli-1.1.31-2j93x895.mjs +24 -0
- package/dist/chunks/cli-1.1.31-2mfapzkq.mjs +2 -0
- package/dist/chunks/cli-1.1.31-2pdbmb7w.mjs +3 -0
- package/dist/chunks/cli-1.1.31-2zvm1tgs.mjs +2 -0
- package/dist/chunks/cli-1.1.31-312b3zf6.mjs +2 -0
- package/dist/chunks/cli-1.1.31-32mahfs2.mjs +2 -0
- package/dist/chunks/cli-1.1.31-3dy87m85.mjs +2 -0
- package/dist/chunks/cli-1.1.31-3ehzwm1n.mjs +2 -0
- package/dist/chunks/cli-1.1.31-3jzsv5dy.mjs +2 -0
- package/dist/chunks/cli-1.1.31-3s51hvv0.mjs +2 -0
- package/dist/chunks/cli-1.1.31-3zy5yd1t.mjs +133 -0
- package/dist/chunks/cli-1.1.31-44jshpbd.mjs +2 -0
- package/dist/chunks/cli-1.1.31-4awnya8e.mjs +2 -0
- package/dist/chunks/cli-1.1.31-4cp1xkaj.mjs +2 -0
- package/dist/chunks/cli-1.1.31-4ja5kbt5.mjs +4 -0
- package/dist/chunks/cli-1.1.31-4tneme0y.mjs +2 -0
- package/dist/chunks/cli-1.1.31-528vtf9a.mjs +2 -0
- package/dist/chunks/cli-1.1.31-52wt9w8w.mjs +15 -0
- package/dist/chunks/cli-1.1.31-556xnzb4.mjs +2 -0
- package/dist/chunks/cli-1.1.31-562nqgh7.mjs +2 -0
- package/dist/chunks/cli-1.1.31-58anwssk.mjs +2 -0
- package/dist/chunks/cli-1.1.31-5ab9cpbt.mjs +3 -0
- package/dist/chunks/cli-1.1.31-5kgkq6vm.mjs +2 -0
- package/dist/chunks/cli-1.1.31-5ma2m26d.mjs +2 -0
- package/dist/chunks/cli-1.1.31-5tgfa7xy.mjs +2 -0
- package/dist/chunks/cli-1.1.31-5xd2j6e7.mjs +2 -0
- package/dist/chunks/cli-1.1.31-612bpjx6.mjs +2 -0
- package/dist/chunks/cli-1.1.31-619zan4w.mjs +2 -0
- package/dist/chunks/cli-1.1.31-6m1k9909.mjs +2 -0
- package/dist/chunks/cli-1.1.31-6pxakyvg.mjs +2 -0
- package/dist/chunks/cli-1.1.31-6qm466ss.mjs +2 -0
- package/dist/chunks/cli-1.1.31-706cv7fx.mjs +2 -0
- package/dist/chunks/cli-1.1.31-7692zxpg.mjs +2 -0
- package/dist/chunks/cli-1.1.31-774jqp88.mjs +2 -0
- package/dist/chunks/cli-1.1.31-777381m0.mjs +34 -0
- package/dist/chunks/cli-1.1.31-7hmq6k3a.mjs +26 -0
- package/dist/chunks/cli-1.1.31-7wdp9ve5.mjs +3 -0
- package/dist/chunks/cli-1.1.31-8bcb1d1y.mjs +2 -0
- package/dist/chunks/cli-1.1.31-8esfq0f2.mjs +2 -0
- package/dist/chunks/cli-1.1.31-8h9zps1d.mjs +2 -0
- package/dist/chunks/cli-1.1.31-8sw4prf8.mjs +22 -0
- package/dist/chunks/cli-1.1.31-8syj0cmx.mjs +2 -0
- package/dist/chunks/cli-1.1.31-9493f46x.mjs +9 -0
- package/dist/chunks/cli-1.1.31-978dpg39.mjs +2 -0
- package/dist/chunks/cli-1.1.31-9a1gsrx2.mjs +24 -0
- package/dist/chunks/cli-1.1.31-9adq5rjd.mjs +2 -0
- package/dist/chunks/cli-1.1.31-9d5v98td.mjs +2 -0
- package/dist/chunks/cli-1.1.31-9e4vtbvh.mjs +3 -0
- package/dist/chunks/cli-1.1.31-9efpx64n.mjs +20 -0
- package/dist/chunks/cli-1.1.31-9gf60j86.mjs +2 -0
- package/dist/chunks/cli-1.1.31-9gzbwjb8.mjs +2 -0
- package/dist/chunks/cli-1.1.31-9m6ef5kb.mjs +2 -0
- package/dist/chunks/cli-1.1.31-9m6gmh2w.mjs +2 -0
- package/dist/chunks/cli-1.1.31-9x9gaa7g.mjs +2 -0
- package/dist/chunks/cli-1.1.31-a4vvez04.mjs +2 -0
- package/dist/chunks/cli-1.1.31-a5wav9hq.mjs +2 -0
- package/dist/chunks/cli-1.1.31-a611zwj5.mjs +10 -0
- package/dist/chunks/cli-1.1.31-adnn5x8c.mjs +16 -0
- package/dist/chunks/cli-1.1.31-afzdmcrq.mjs +2 -0
- package/dist/chunks/cli-1.1.31-ahbyaapz.mjs +12 -0
- package/dist/chunks/cli-1.1.31-aqm3wayg.mjs +2 -0
- package/dist/chunks/cli-1.1.31-b2pt6rsc.mjs +2 -0
- package/dist/chunks/cli-1.1.31-b7258j1y.mjs +2 -0
- package/dist/chunks/cli-1.1.31-b8rbgfhm.mjs +2 -0
- package/dist/chunks/cli-1.1.31-bdt0j0zj.mjs +4 -0
- package/dist/chunks/cli-1.1.31-bfsa3dvr.mjs +2 -0
- package/dist/chunks/cli-1.1.31-bx3e5rv6.mjs +3 -0
- package/dist/chunks/cli-1.1.31-c17g88x0.mjs +9 -0
- package/dist/chunks/cli-1.1.31-c9707zjx.mjs +63 -0
- package/dist/chunks/cli-1.1.31-can8wyac.mjs +2 -0
- package/dist/chunks/cli-1.1.31-cpay8r5h.mjs +2 -0
- package/dist/chunks/cli-1.1.31-cpeph4zm.mjs +6 -0
- package/dist/chunks/cli-1.1.31-d9sxj86f.mjs +2 -0
- package/dist/chunks/cli-1.1.31-dc4fq4s3.mjs +2 -0
- package/dist/chunks/cli-1.1.31-dctwr6q4.mjs +5 -0
- package/dist/chunks/cli-1.1.31-dcyx3536.mjs +39 -0
- package/dist/chunks/cli-1.1.31-dhecyw04.mjs +3 -0
- package/dist/chunks/cli-1.1.31-dmghye74.mjs +4 -0
- package/dist/chunks/cli-1.1.31-ek449yjc.mjs +6 -0
- package/dist/chunks/cli-1.1.31-emhqeb1g.mjs +2 -0
- package/dist/chunks/cli-1.1.31-eqfmzrxc.mjs +2 -0
- package/dist/chunks/cli-1.1.31-eqvc58gw.mjs +2 -0
- package/dist/chunks/cli-1.1.31-ewhwdszf.mjs +2 -0
- package/dist/chunks/cli-1.1.31-f1zfyp44.mjs +2 -0
- package/dist/chunks/cli-1.1.31-f2abkvxa.mjs +4 -0
- package/dist/chunks/cli-1.1.31-fbdr0297.mjs +2 -0
- package/dist/chunks/cli-1.1.31-fdjs93ba.mjs +2 -0
- package/dist/chunks/cli-1.1.31-fdk7yhs0.mjs +2 -0
- package/dist/chunks/cli-1.1.31-fjdb444f.mjs +7 -0
- package/dist/chunks/cli-1.1.31-fk787pkf.mjs +15 -0
- package/dist/chunks/cli-1.1.31-fpqqpyrw.mjs +3 -0
- package/dist/chunks/cli-1.1.31-fr8t4a7n.mjs +2 -0
- package/dist/chunks/cli-1.1.31-fy2x8k7r.mjs +2 -0
- package/dist/chunks/cli-1.1.31-g41zancj.mjs +3 -0
- package/dist/chunks/cli-1.1.31-g58b1jfa.mjs +5473 -0
- package/dist/chunks/cli-1.1.31-ggtvemxf.mjs +2 -0
- package/dist/chunks/cli-1.1.31-gk7te1jt.mjs +2 -0
- package/dist/chunks/cli-1.1.31-gq54djk0.mjs +2 -0
- package/dist/chunks/cli-1.1.31-h102y1at.mjs +8 -0
- package/dist/chunks/cli-1.1.31-h1sv3apa.mjs +4 -0
- package/dist/chunks/cli-1.1.31-h41m4yrw.mjs +2 -0
- package/dist/chunks/cli-1.1.31-h5a78vp8.mjs +2 -0
- package/dist/chunks/cli-1.1.31-hfdt80w2.mjs +50 -0
- package/dist/chunks/cli-1.1.31-hk88wxhm.mjs +2 -0
- package/dist/chunks/cli-1.1.31-hpxjvh3j.mjs +3 -0
- package/dist/chunks/cli-1.1.31-hvnwvzhh.mjs +58 -0
- package/dist/chunks/cli-1.1.31-j0fbn8aw.mjs +2 -0
- package/dist/chunks/cli-1.1.31-jfj1gvgy.mjs +2 -0
- package/dist/chunks/cli-1.1.31-jh2sb5nk.mjs +42 -0
- package/dist/chunks/cli-1.1.31-jnyr50hq.mjs +2 -0
- package/dist/chunks/cli-1.1.31-jwa8f70w.mjs +2 -0
- package/dist/chunks/cli-1.1.31-jyzz7q1c.mjs +2 -0
- package/dist/chunks/cli-1.1.31-k0zfy1nt.mjs +2 -0
- package/dist/chunks/cli-1.1.31-kfw3q4sp.mjs +133 -0
- package/dist/chunks/cli-1.1.31-kp8hq72m.mjs +2 -0
- package/dist/chunks/cli-1.1.31-kzh4darh.mjs +2 -0
- package/dist/chunks/cli-1.1.31-m5w2d13z.mjs +2 -0
- package/dist/chunks/cli-1.1.31-m9yqg6jg.mjs +2 -0
- package/dist/chunks/cli-1.1.31-mcekc48f.mjs +2 -0
- package/dist/chunks/cli-1.1.31-mtcbc6g3.mjs +4 -0
- package/dist/chunks/cli-1.1.31-n130x03f.mjs +2 -0
- package/dist/chunks/cli-1.1.31-n305h9qd.mjs +25 -0
- package/dist/chunks/cli-1.1.31-n4g6s1bz.mjs +2 -0
- package/dist/chunks/cli-1.1.31-n5vytp0f.mjs +2 -0
- package/dist/chunks/cli-1.1.31-nh2cfavp.mjs +2 -0
- package/dist/chunks/cli-1.1.31-njfyxwfr.mjs +2 -0
- package/dist/chunks/cli-1.1.31-nvecb8c6.mjs +2 -0
- package/dist/chunks/cli-1.1.31-nyvjx813.mjs +24 -0
- package/dist/chunks/cli-1.1.31-nyvz0ev8.mjs +5 -0
- package/dist/chunks/cli-1.1.31-p99fz46k.mjs +206 -0
- package/dist/chunks/cli-1.1.31-pb50hb6v.mjs +12 -0
- package/dist/chunks/cli-1.1.31-pg2ntz9b.mjs +17 -0
- package/dist/chunks/cli-1.1.31-pgde5349.mjs +2 -0
- package/dist/chunks/cli-1.1.31-pp98t7k8.mjs +2 -0
- package/dist/chunks/cli-1.1.31-ptvddvjv.mjs +2 -0
- package/dist/chunks/cli-1.1.31-pzz7j17y.mjs +3 -0
- package/dist/chunks/cli-1.1.31-q67trvk0.mjs +2 -0
- package/dist/chunks/cli-1.1.31-q6k8ems6.mjs +21 -0
- package/dist/chunks/cli-1.1.31-qj8vksz8.mjs +2 -0
- package/dist/chunks/cli-1.1.31-qq0sng13.mjs +2 -0
- package/dist/chunks/cli-1.1.31-qsftejzk.mjs +2 -0
- package/dist/chunks/cli-1.1.31-qv6x2hht.mjs +2 -0
- package/dist/chunks/cli-1.1.31-qyztdyg2.mjs +2 -0
- package/dist/chunks/cli-1.1.31-r5g0ns02.mjs +2 -0
- package/dist/chunks/cli-1.1.31-r7jps0tn.mjs +3 -0
- package/dist/chunks/cli-1.1.31-rqyqyvdn.mjs +2 -0
- package/dist/chunks/cli-1.1.31-rspa4dsq.mjs +6 -0
- package/dist/chunks/cli-1.1.31-rw3xn3tc.mjs +4 -0
- package/dist/chunks/cli-1.1.31-s1a6vw53.mjs +2 -0
- package/dist/chunks/cli-1.1.31-s1vgm3hb.mjs +2 -0
- package/dist/chunks/cli-1.1.31-s246tb6v.mjs +15 -0
- package/dist/chunks/cli-1.1.31-satbt91m.mjs +18 -0
- package/dist/chunks/cli-1.1.31-sc82f8hw.mjs +6 -0
- package/dist/chunks/cli-1.1.31-sn0x975f.mjs +24 -0
- package/dist/chunks/cli-1.1.31-sn2bmgwr.mjs +2 -0
- package/dist/chunks/cli-1.1.31-t2y2tkme.mjs +2 -0
- package/dist/chunks/cli-1.1.31-t6m64e0q.mjs +6 -0
- package/dist/chunks/cli-1.1.31-t96rrv1m.mjs +2 -0
- package/dist/chunks/cli-1.1.31-tc6xppyr.mjs +2 -0
- package/dist/chunks/cli-1.1.31-tctd36c8.mjs +2 -0
- package/dist/chunks/cli-1.1.31-thhdw5e1.mjs +2 -0
- package/dist/chunks/cli-1.1.31-v02fpzs5.mjs +2 -0
- package/dist/chunks/cli-1.1.31-v7nswcm8.mjs +2 -0
- package/dist/chunks/cli-1.1.31-var05xaf.mjs +2 -0
- package/dist/chunks/cli-1.1.31-vbch5rht.mjs +2 -0
- package/dist/chunks/cli-1.1.31-vf004w21.mjs +2 -0
- package/dist/chunks/cli-1.1.31-vhstdnfa.mjs +7 -0
- package/dist/chunks/cli-1.1.31-vphyv007.mjs +2 -0
- package/dist/chunks/cli-1.1.31-vpkbqj90.mjs +4 -0
- package/dist/chunks/cli-1.1.31-vr977n4j.mjs +2 -0
- package/dist/chunks/cli-1.1.31-w0vfcfhs.mjs +2 -0
- package/dist/chunks/cli-1.1.31-w225x38q.mjs +2 -0
- package/dist/chunks/cli-1.1.31-war7w6d7.mjs +2 -0
- package/dist/chunks/cli-1.1.31-wba64b2s.mjs +2 -0
- package/dist/chunks/cli-1.1.31-wfv9e9p4.mjs +2 -0
- package/dist/chunks/cli-1.1.31-wmt8ywr9.mjs +2 -0
- package/dist/chunks/cli-1.1.31-wnpf6e90.mjs +2 -0
- package/dist/chunks/cli-1.1.31-x1wr5k0p.mjs +2 -0
- package/dist/chunks/cli-1.1.31-x96s38b0.mjs +2 -0
- package/dist/chunks/cli-1.1.31-xqdypd2k.mjs +6 -0
- package/dist/chunks/cli-1.1.31-xv09f0k4.mjs +2 -0
- package/dist/chunks/cli-1.1.31-yte5f9f9.mjs +45 -0
- package/dist/chunks/cli-1.1.31-yz72mhbg.mjs +2 -0
- package/dist/chunks/cli-1.1.31-z3s1pnd3.mjs +1 -0
- package/dist/chunks/cli-1.1.31-z6qe8e42.mjs +2 -0
- package/dist/chunks/cli-1.1.31-z7hdz84q.mjs +17 -0
- package/dist/chunks/cli-1.1.31-zsjs5eq0.mjs +2 -0
- package/dist/chunks/cli-1.1.31-zvbpmw2y.mjs +2 -0
- package/dist/chunks/cli-1.1.31-zy7nrvt9.mjs +2 -0
- package/dist/chunks/cli-1.1.31-zzd4cheh.mjs +2 -0
- package/dist/chunks/client-1.1.31-3bn971t2.mjs +1 -0
- package/dist/chunks/color-1.1.31-n3q45hw4.mjs +1 -0
- package/dist/chunks/compact-1.1.31-zkekkcjq.mjs +3 -0
- package/dist/chunks/config-1.1.31-1t6yz96k.mjs +1 -0
- package/dist/chunks/config-1.1.31-enwx50r9.mjs +1 -0
- package/dist/chunks/constants-1.1.31-5peb81d1.mjs +1 -0
- package/dist/chunks/context-1.1.31-9crzemp8.mjs +1 -0
- package/dist/chunks/context-noninteractive-1.1.31-twqynyp7.mjs +1 -0
- package/dist/chunks/conversation-1.1.31-yw2es9kq.mjs +1 -0
- package/dist/chunks/copilotHeaders-1.1.31-axfr0ar5.mjs +1 -0
- package/dist/chunks/copy-1.1.31-y97hza01.mjs +9 -0
- package/dist/chunks/cost-1.1.31-wtp1fp62.mjs +1 -0
- package/dist/chunks/createSSHSession-1.1.31-tsfe2dea.mjs +1 -0
- package/dist/chunks/createSession-1.1.31-pddv01ds.mjs +1 -0
- package/dist/chunks/debug-1.1.31-5awffxcd.mjs +1 -0
- package/dist/chunks/defaultActionDeps-1.1.31-6a742vb3.mjs +1480 -0
- package/dist/chunks/desktop-1.1.31-zq54hfwy.mjs +2 -0
- package/dist/chunks/detectRepository-1.1.31-s6pe6c1x.mjs +1 -0
- package/dist/chunks/detection-1.1.31-zss1hfbq.mjs +1 -0
- package/dist/chunks/diff-1.1.31-ksj17xmk.mjs +1 -0
- package/dist/chunks/doctor-1.1.31-v4djfk2w.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-1.1.31-gs3rsn7y.mjs +1 -0
- package/dist/chunks/earlyInput-1.1.31-s1vpzgtx.mjs +1 -0
- package/dist/chunks/effort-1.1.31-6z9vjdd8.mjs +13 -0
- package/dist/chunks/engine-1.1.31-rv1fs549.mjs +1 -0
- package/dist/chunks/envLessBridgeConfig-1.1.31-5p5f4zyz.mjs +1 -0
- package/dist/chunks/envUtils-1.1.31-ntcm9cr0.mjs +1 -0
- package/dist/chunks/environmentSelection-1.1.31-hh2weytc.mjs +1 -0
- package/dist/chunks/environments-1.1.31-yvgyx900.mjs +1 -0
- package/dist/chunks/errors-1.1.31-n434b94a.mjs +1 -0
- package/dist/chunks/exampleCommands-1.1.31-gntd6p22.mjs +1 -0
- package/dist/chunks/execFileNoThrow-1.1.31-s2n0jxqw.mjs +1 -0
- package/dist/chunks/exit-1.1.31-rgrjhztt.mjs +1 -0
- package/dist/chunks/explorer-1.1.31-cyken2c0.mjs +1 -0
- package/dist/chunks/export-1.1.31-nmjy9qp1.mjs +2 -0
- package/dist/chunks/fast-1.1.31-58c4aeze.mjs +1 -0
- package/dist/chunks/feedback-1.1.31-m0vj61dd.mjs +16 -0
- package/dist/chunks/git-1.1.31-9ytjvad9.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-1.1.31-7pk651pz.mjs +1 -0
- package/dist/chunks/goal-1.1.31-2a9eh1dv.mjs +4 -0
- package/dist/chunks/headless-1.1.31-btcvy308.mjs +2 -0
- package/dist/chunks/heapdump-1.1.31-3d2namke.mjs +6 -0
- package/dist/chunks/help-1.1.31-sewrb4nb.mjs +1 -0
- package/dist/chunks/hookChains-1.1.31-72mrrs9j.mjs +3 -0
- package/dist/chunks/hooks-1.1.31-0gf2fwcn.mjs +1 -0
- package/dist/chunks/hooks-1.1.31-t1v6dwz6.mjs +79 -0
- package/dist/chunks/ide-1.1.31-rfvpxf98.mjs +3 -0
- package/dist/chunks/image-processor-napi-1.1.31-6m3111th.mjs +1 -0
- package/dist/chunks/import-1.1.31-n4khxgen.mjs +261 -0
- package/dist/chunks/inboundAttachments-1.1.31-js74nw49.mjs +1 -0
- package/dist/chunks/index-1.1.31-1d2w0stv.mjs +1 -0
- package/dist/chunks/index-1.1.31-7xyvb71n.mjs +1 -0
- package/dist/chunks/index-1.1.31-b35axgfq.mjs +1 -0
- package/dist/chunks/index-1.1.31-bb3ds6px.mjs +5 -0
- package/dist/chunks/index-1.1.31-d8kmfk8g.mjs +1 -0
- package/dist/chunks/index-1.1.31-djqjbcj1.mjs +1 -0
- package/dist/chunks/index-1.1.31-fbcpgjqr.mjs +1 -0
- package/dist/chunks/index-1.1.31-fzj8sx04.mjs +1 -0
- package/dist/chunks/index-1.1.31-h4jmtajm.mjs +9 -0
- package/dist/chunks/index-1.1.31-hxatxhrm.mjs +1 -0
- package/dist/chunks/index-1.1.31-jjp83m1j.mjs +1 -0
- package/dist/chunks/index-1.1.31-jk9pvxkr.mjs +1 -0
- package/dist/chunks/index-1.1.31-jy33bsc3.mjs +2 -0
- package/dist/chunks/index-1.1.31-kdnrzq4a.mjs +1 -0
- package/dist/chunks/index-1.1.31-kv3bfsq2.mjs +23 -0
- package/dist/chunks/index-1.1.31-mxjtqbfj.mjs +1 -0
- package/dist/chunks/index-1.1.31-p8xpgawg.mjs +1 -0
- package/dist/chunks/index-1.1.31-phw15bz8.mjs +1 -0
- package/dist/chunks/index-1.1.31-pr2zcv22.mjs +30 -0
- package/dist/chunks/index-1.1.31-q75y58jp.mjs +2 -0
- package/dist/chunks/index-1.1.31-qhsyqcg4.mjs +1 -0
- package/dist/chunks/index-1.1.31-tzvhzkcd.mjs +1 -0
- package/dist/chunks/index-1.1.31-wgdk68t3.mjs +9 -0
- package/dist/chunks/init-1.1.31-4ayzds5h.mjs +2 -0
- package/dist/chunks/initReplBridge-1.1.31-ebns690c.mjs +1 -0
- package/dist/chunks/ink-1.1.31-rx0229yp.mjs +1 -0
- package/dist/chunks/insights-1.1.31-t8z4k64x.mjs +870 -0
- package/dist/chunks/install-1.1.31-fvw0rbqj.mjs +1 -0
- package/dist/chunks/install-github-app-1.1.31-zmtxtda9.mjs +149 -0
- package/dist/chunks/install-slack-app-1.1.31-j04t1paw.mjs +1 -0
- package/dist/chunks/interactiveHelpers-1.1.31-xq2br8z8.mjs +1 -0
- package/dist/chunks/keybindings-1.1.31-a0dfh2gb.mjs +2 -0
- package/dist/chunks/knowledge-1.1.31-g087p4dy.mjs +2 -0
- package/dist/chunks/latestVersionCache-1.1.31-vyesmh7x.mjs +1 -0
- package/dist/chunks/loadAgentsDir-1.1.31-39mbd67g.mjs +1 -0
- package/dist/chunks/loadPluginHooks-1.1.31-7pnfkxj8.mjs +1 -0
- package/dist/chunks/log-1.1.31-75wjvmg7.mjs +1 -0
- package/dist/chunks/main-1.1.31-htavj2vh.mjs +1 -0
- package/dist/chunks/managedEnv-1.1.31-3t5j20s3.mjs +1 -0
- package/dist/chunks/mcp-1.1.31-g8q13cfk.mjs +1 -0
- package/dist/chunks/mcp-1.1.31-gnbrx51d.mjs +17 -0
- package/dist/chunks/mcp-1.1.31-tb2yw0fm.mjs +4 -0
- package/dist/chunks/mcpb-1.1.31-an4y7m57.mjs +1 -0
- package/dist/chunks/memory-1.1.31-6ebsap62.mjs +77 -0
- package/dist/chunks/model-1.1.31-dfs178qb.mjs +1 -0
- package/dist/chunks/model-1.1.31-yjsxjv0f.mjs +2 -0
- package/dist/chunks/node-1.1.31-4gqzhhpj.mjs +15 -0
- package/dist/chunks/node-1.1.31-bknsrjhq.mjs +1 -0
- package/dist/chunks/oauth-1.1.31-0dfgbykp.mjs +1 -0
- package/dist/chunks/openaiShim-1.1.31-bx5cgqc0.mjs +14 -0
- package/dist/chunks/output-style-1.1.31-fqg3pscb.mjs +1 -0
- package/dist/chunks/package-D2QZMRW7-1.1.31-tbwnz9re.mjs +1 -0
- package/dist/chunks/parseConnectUrl-1.1.31-htt07xve.mjs +1 -0
- package/dist/chunks/parser-1.1.31-22dqq9cd.mjs +1 -0
- package/dist/chunks/permissions-1.1.31-2jt71rmf.mjs +1 -0
- package/dist/chunks/permissions-1.1.31-8eevgx6v.mjs +3 -0
- package/dist/chunks/plan-1.1.31-sgds3thc.mjs +1 -0
- package/dist/chunks/plist-1.1.31-50ff60z2.mjs +1 -0
- package/dist/chunks/plugin-1.1.31-j5n91qc0.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-1.1.31-28rvz0zj.mjs +1 -0
- package/dist/chunks/plugins-1.1.31-cq05wg0h.mjs +9 -0
- package/dist/chunks/preActionHook-1.1.31-xmrm67ge.mjs +2 -0
- package/dist/chunks/print-1.1.31-4n5d0cdk.mjs +57 -0
- package/dist/chunks/process-1.1.31-7c3jtep7.mjs +1 -0
- package/dist/chunks/processBashCommand-1.1.31-ycb3ehgr.mjs +1 -0
- package/dist/chunks/processSlashCommand-1.1.31-0bwjc7n4.mjs +9 -0
- package/dist/chunks/prompt-1.1.31-1krmkgep.mjs +1 -0
- package/dist/chunks/prompt-1.1.31-vsft6hz3.mjs +1 -0
- package/dist/chunks/prompts-1.1.31-jp2k44tp.mjs +1 -0
- package/dist/chunks/protocolHandler-1.1.31-yc5dejjn.mjs +13 -0
- package/dist/chunks/provider-1.1.31-sba30ytt.mjs +2 -0
- package/dist/chunks/providerProfiles-1.1.31-8g3p4ntd.mjs +1 -0
- package/dist/chunks/providerValidation-1.1.31-rnj0xtqw.mjs +6 -0
- package/dist/chunks/registerSubcommands-1.1.31-rtx2e9wp.mjs +26 -0
- package/dist/chunks/registry-1.1.31-ecyhakd2.mjs +1 -0
- package/dist/chunks/release-notes-1.1.31-gf017wax.mjs +5 -0
- package/dist/chunks/reload-plugins-1.1.31-de7agwmx.mjs +2 -0
- package/dist/chunks/remote-env-1.1.31-x3aaeh2d.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-1.1.31-37k3bw33.mjs +1 -0
- package/dist/chunks/remoteSession-1.1.31-tkas2k4z.mjs +1 -0
- package/dist/chunks/rename-1.1.31-4q58stc8.mjs +1 -0
- package/dist/chunks/replBridgeHandle-1.1.31-64getkgv.mjs +1 -0
- package/dist/chunks/replLauncher-1.1.31-0n74v295.mjs +1 -0
- package/dist/chunks/resume-1.1.31-btzfzzf4.mjs +2 -0
- package/dist/chunks/rewind-1.1.31-9m2a508m.mjs +1 -0
- package/dist/chunks/rootOptions-1.1.31-bftj813f.mjs +1 -0
- package/dist/chunks/runWorkflowHeadless-1.1.31-tra2r0dx.mjs +10 -0
- package/dist/chunks/sandbox-adapter-1.1.31-6nyy2rag.mjs +1 -0
- package/dist/chunks/sandbox-toggle-1.1.31-h1n35f5k.mjs +1 -0
- package/dist/chunks/session-1.1.31-xb800b9s.mjs +2 -0
- package/dist/chunks/sessionFileAccessHooks-1.1.31-gkkyesrj.mjs +1 -0
- package/dist/chunks/sessionStorage-1.1.31-s7gez2t6.mjs +1 -0
- package/dist/chunks/settings-1.1.31-w7zfpg83.mjs +1 -0
- package/dist/chunks/setup-1.1.31-b6kjgetf.mjs +12 -0
- package/dist/chunks/sinks-1.1.31-g9n7r1nh.mjs +1 -0
- package/dist/chunks/skills-1.1.31-ag9r3asv.mjs +1 -0
- package/dist/chunks/startupProfiler-1.1.31-h19httmy.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-1.1.31-f3g7de65.mjs +1 -0
- package/dist/chunks/state-1.1.31-tbc1c6c2.mjs +1 -0
- package/dist/chunks/stats-1.1.31-71xjrkax.mjs +1 -0
- package/dist/chunks/status-1.1.31-n65g11nc.mjs +1 -0
- package/dist/chunks/stickers-1.1.31-eze0atpf.mjs +1 -0
- package/dist/chunks/subprocessEnv-1.1.31-r788gbdf.mjs +1 -0
- package/dist/chunks/tasks-1.1.31-tbc0x51m.mjs +1 -0
- package/dist/chunks/teamHelpers-1.1.31-yt18sjr2.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-1.1.31-f3bgkc7m.mjs +1 -0
- package/dist/chunks/teleport-1.1.31-4mvcqr5j.mjs +1 -0
- package/dist/chunks/terminalSetup-1.1.31-y574v0gj.mjs +1 -0
- package/dist/chunks/theme-1.1.31-2nth8fxb.mjs +1 -0
- package/dist/chunks/thinkback-1.1.31-yt5309kx.mjs +1 -0
- package/dist/chunks/thinkback-play-1.1.31-n61vtr8q.mjs +1 -0
- package/dist/chunks/toolPool-1.1.31-2wrjcf13.mjs +1 -0
- package/dist/chunks/toolSearch-1.1.31-vr7hen30.mjs +1 -0
- package/dist/chunks/tools-1.1.31-xgrxwk7j.mjs +1 -0
- package/dist/chunks/trustedDevice-1.1.31-ad2f2kvj.mjs +1 -0
- package/dist/chunks/turndown.cjs-1.1.31-mtgg85tg.mjs +69 -0
- package/dist/chunks/types-1.1.31-ery244ea.mjs +1 -0
- package/dist/chunks/ultrareviewCommand-1.1.31-fs3fn2qp.mjs +4 -0
- package/dist/chunks/update-1.1.31-j79f7es2.mjs +72 -0
- package/dist/chunks/upload-1.1.31-ehqzz7x7.mjs +7 -0
- package/dist/chunks/upstreamproxy-1.1.31-z70ctdj3.mjs +14 -0
- package/dist/chunks/url-handler-napi-1.1.31-e0hbcnyw.mjs +1 -0
- package/dist/chunks/usage-1.1.31-qgmy1ktr.mjs +1 -0
- package/dist/chunks/util-1.1.31-jy81jvt3.mjs +1 -0
- package/dist/chunks/utils-1.1.31-3jpj59nn.mjs +1 -0
- package/dist/chunks/vim-1.1.31-wbbckx93.mjs +1 -0
- package/dist/chunks/watchLoop-1.1.31-v994wq2d.mjs +13 -0
- package/dist/chunks/watcher-1.1.31-zr0darq0.mjs +1 -0
- package/dist/chunks/wiki-1.1.31-7gcn31zm.mjs +132 -0
- package/dist/chunks/workflows-1.1.31-ek8twhyg.mjs +1 -0
- package/dist/chunks/worktree-1.1.31-krxr11er.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-1.1.31-m3t752mj.mjs +1 -0
- package/dist/chunks/wrapper-1.1.31-037s1v4h.mjs +7 -0
- package/dist/cli.mjs +2 -2
- package/package.json +9 -9
- package/dist/chunks/AgentTool-1.1.30-3wq8zzaa.mjs +0 -1
- package/dist/chunks/App-1.1.30-ywb53g2c.mjs +0 -1
- package/dist/chunks/ApproveApiKey-1.1.30-wtpe9n8e.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-1.1.30-776xks64.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-1.1.30-bjm91hx0.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-1.1.30-rcy7msd9.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.30-bexsqxcb.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-1.1.30-jfhq3h4z.mjs +0 -1
- package/dist/chunks/DiffDialog-1.1.30-kqds97f2.mjs +0 -6
- package/dist/chunks/Doctor-1.1.30-48qzfckm.mjs +0 -1
- package/dist/chunks/ExplorerDialog-1.1.30-tfv4wc5m.mjs +0 -6
- package/dist/chunks/ITermBackend-1.1.30-z31ecx5v.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-1.1.30-f17w1kzx.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-1.1.30-fzajgngq.mjs +0 -1
- package/dist/chunks/MigrationDialog-1.1.30-15c4h452.mjs +0 -1
- package/dist/chunks/Onboarding-1.1.30-xajg2p3r.mjs +0 -1
- package/dist/chunks/ProviderManager-1.1.30-8jrhxd1r.mjs +0 -1
- package/dist/chunks/REPL-1.1.30-74pzzw1d.mjs +0 -1
- package/dist/chunks/ResumeConversation-1.1.30-8bmshptz.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-1.1.30-v5fnwt30.mjs +0 -1
- package/dist/chunks/TeleportProgress-1.1.30-v55nsv7g.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.30-2hg56v1b.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-1.1.30-r2hwd3a6.mjs +0 -1
- package/dist/chunks/TmuxBackend-1.1.30-y6hny4s2.mjs +0 -9
- package/dist/chunks/ToolSearchTool-1.1.30-cq18pvam.mjs +0 -1
- package/dist/chunks/TrustDialog-1.1.30-qp3cr0fk.mjs +0 -1
- package/dist/chunks/activeProvider-1.1.30-ydaqb760.mjs +0 -1
- package/dist/chunks/add-dir-1.1.30-gta8twv0.mjs +0 -1
- package/dist/chunks/agentTypes-1.1.30-rxcmv28v.mjs +0 -1
- package/dist/chunks/agents-1.1.30-d5hxfnnt.mjs +0 -3
- package/dist/chunks/agents-1.1.30-q3f25044.mjs +0 -110
- package/dist/chunks/api-1.1.30-30hng0e4.mjs +0 -1
- package/dist/chunks/asciicast-1.1.30-mhcedd5b.mjs +0 -1
- package/dist/chunks/assistant-1.1.30-1zxsr09t.mjs +0 -1
- package/dist/chunks/auth-1.1.30-mmymct98.mjs +0 -1
- package/dist/chunks/auth-1.1.30-ntfwzwxz.mjs +0 -1
- package/dist/chunks/autoMode-1.1.30-9jd1avyj.mjs +0 -52
- package/dist/chunks/autoModeSetup-1.1.30-8cnp296z.mjs +0 -44
- package/dist/chunks/autoUpdater-1.1.30-f0wbf5ha.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-1.1.30-b7t4y9th.mjs +0 -1
- package/dist/chunks/branch-1.1.30-x77nhthz.mjs +0 -4
- package/dist/chunks/bridge-1.1.30-scfmh172.mjs +0 -2
- package/dist/chunks/bridgeConfig-1.1.30-8hd92b6p.mjs +0 -1
- package/dist/chunks/bridgeEnabled-1.1.30-n5c6p8kd.mjs +0 -1
- package/dist/chunks/bridgeMain-1.1.30-9cpc29zx.mjs +0 -88
- package/dist/chunks/bridgePointer-1.1.30-gsa0eerc.mjs +0 -1
- package/dist/chunks/btw-1.1.30-gyh84rd1.mjs +0 -1
- package/dist/chunks/buddy-1.1.30-vzfs4xt1.mjs +0 -3
- package/dist/chunks/cache-probe-1.1.30-qjppzj5p.mjs +0 -21
- package/dist/chunks/cacheStats-1.1.30-w1c0ekr4.mjs +0 -4
- package/dist/chunks/caches-1.1.30-6rye5cdg.mjs +0 -1
- package/dist/chunks/cd-1.1.30-tn402589.mjs +0 -3
- package/dist/chunks/claudeDesktop-1.1.30-sm5ncwqz.mjs +0 -1
- package/dist/chunks/claudemd-1.1.30-36eyf63s.mjs +0 -1
- package/dist/chunks/clear-1.1.30-p5p9kp96.mjs +0 -1
- package/dist/chunks/clearTerminal-1.1.30-nrdembs6.mjs +0 -1
- package/dist/chunks/cli-1.1.30-053d5ph7.mjs +0 -2
- package/dist/chunks/cli-1.1.30-092dkm0p.mjs +0 -2
- package/dist/chunks/cli-1.1.30-0e0e9msg.mjs +0 -17
- package/dist/chunks/cli-1.1.30-0fz758j0.mjs +0 -2
- package/dist/chunks/cli-1.1.30-0qcyzbs1.mjs +0 -2
- package/dist/chunks/cli-1.1.30-0yafp3ky.mjs +0 -2
- package/dist/chunks/cli-1.1.30-1j4dyr5r.mjs +0 -2
- package/dist/chunks/cli-1.1.30-1k2bwved.mjs +0 -3
- package/dist/chunks/cli-1.1.30-1qczaqkt.mjs +0 -2
- package/dist/chunks/cli-1.1.30-1wfffyq2.mjs +0 -2
- package/dist/chunks/cli-1.1.30-1xmhk219.mjs +0 -2
- package/dist/chunks/cli-1.1.30-1ybfyckn.mjs +0 -2
- package/dist/chunks/cli-1.1.30-1zsgv3yp.mjs +0 -2
- package/dist/chunks/cli-1.1.30-2af3eeg6.mjs +0 -2
- package/dist/chunks/cli-1.1.30-2cmsx74f.mjs +0 -26
- package/dist/chunks/cli-1.1.30-2hw4vdpg.mjs +0 -2
- package/dist/chunks/cli-1.1.30-2pqs37e0.mjs +0 -3
- package/dist/chunks/cli-1.1.30-2y4yj9sd.mjs +0 -2
- package/dist/chunks/cli-1.1.30-2yd2af56.mjs +0 -50
- package/dist/chunks/cli-1.1.30-2zq3aea6.mjs +0 -2
- package/dist/chunks/cli-1.1.30-322advqh.mjs +0 -4
- package/dist/chunks/cli-1.1.30-3b1nw95m.mjs +0 -2
- package/dist/chunks/cli-1.1.30-3c6j35rs.mjs +0 -2
- package/dist/chunks/cli-1.1.30-3x86c2pa.mjs +0 -24
- package/dist/chunks/cli-1.1.30-489cr054.mjs +0 -2
- package/dist/chunks/cli-1.1.30-4d90v0pd.mjs +0 -6
- package/dist/chunks/cli-1.1.30-4kytbyxq.mjs +0 -15
- package/dist/chunks/cli-1.1.30-4t03vay7.mjs +0 -2
- package/dist/chunks/cli-1.1.30-4wqfr0ya.mjs +0 -2
- package/dist/chunks/cli-1.1.30-4zrfbe17.mjs +0 -2
- package/dist/chunks/cli-1.1.30-51kze0eh.mjs +0 -2
- package/dist/chunks/cli-1.1.30-569esepc.mjs +0 -60
- package/dist/chunks/cli-1.1.30-57b410qh.mjs +0 -25
- package/dist/chunks/cli-1.1.30-5cc6nada.mjs +0 -2
- package/dist/chunks/cli-1.1.30-5f76gnk2.mjs +0 -2
- package/dist/chunks/cli-1.1.30-5j2mdj81.mjs +0 -2
- package/dist/chunks/cli-1.1.30-5pn20fxz.mjs +0 -2
- package/dist/chunks/cli-1.1.30-5r9pakw5.mjs +0 -2
- package/dist/chunks/cli-1.1.30-63ndyxgm.mjs +0 -2
- package/dist/chunks/cli-1.1.30-6eaj3n76.mjs +0 -9
- package/dist/chunks/cli-1.1.30-6phpx599.mjs +0 -2
- package/dist/chunks/cli-1.1.30-6pp4z5px.mjs +0 -2
- package/dist/chunks/cli-1.1.30-7a064pfm.mjs +0 -2
- package/dist/chunks/cli-1.1.30-7bdj31x8.mjs +0 -2
- package/dist/chunks/cli-1.1.30-7dtpd1ra.mjs +0 -2
- package/dist/chunks/cli-1.1.30-7h45a0x6.mjs +0 -6
- package/dist/chunks/cli-1.1.30-7ma427qh.mjs +0 -8
- package/dist/chunks/cli-1.1.30-7q8f7mp7.mjs +0 -2
- package/dist/chunks/cli-1.1.30-84cemtwn.mjs +0 -4
- package/dist/chunks/cli-1.1.30-87zsgch6.mjs +0 -21
- package/dist/chunks/cli-1.1.30-8a5gwcde.mjs +0 -2
- package/dist/chunks/cli-1.1.30-8e36e2c1.mjs +0 -2
- package/dist/chunks/cli-1.1.30-8hcc4gax.mjs +0 -15
- package/dist/chunks/cli-1.1.30-8t3c3a4k.mjs +0 -20
- package/dist/chunks/cli-1.1.30-8vr9ea9g.mjs +0 -2
- package/dist/chunks/cli-1.1.30-8zyep40e.mjs +0 -2
- package/dist/chunks/cli-1.1.30-902jyjpx.mjs +0 -2
- package/dist/chunks/cli-1.1.30-917y0q4m.mjs +0 -2
- package/dist/chunks/cli-1.1.30-92t0b3hs.mjs +0 -2
- package/dist/chunks/cli-1.1.30-94vhzqcd.mjs +0 -2
- package/dist/chunks/cli-1.1.30-9685r12p.mjs +0 -2
- package/dist/chunks/cli-1.1.30-9h8mm4pg.mjs +0 -2
- package/dist/chunks/cli-1.1.30-9m8jc7as.mjs +0 -4
- package/dist/chunks/cli-1.1.30-9rn8qz9x.mjs +0 -2
- package/dist/chunks/cli-1.1.30-9s9qp1m7.mjs +0 -2
- package/dist/chunks/cli-1.1.30-a1phf5vm.mjs +0 -2
- package/dist/chunks/cli-1.1.30-a2ww16zh.mjs +0 -2
- package/dist/chunks/cli-1.1.30-a2xctbvc.mjs +0 -18
- package/dist/chunks/cli-1.1.30-amecp2v0.mjs +0 -3
- package/dist/chunks/cli-1.1.30-aqvjv0jh.mjs +0 -4
- package/dist/chunks/cli-1.1.30-aw93z4yt.mjs +0 -2
- package/dist/chunks/cli-1.1.30-b1mqmct7.mjs +0 -4
- package/dist/chunks/cli-1.1.30-bfqnz691.mjs +0 -2
- package/dist/chunks/cli-1.1.30-bgrp9j3q.mjs +0 -2
- package/dist/chunks/cli-1.1.30-bwdw42tf.mjs +0 -24
- package/dist/chunks/cli-1.1.30-bzjamz5p.mjs +0 -2
- package/dist/chunks/cli-1.1.30-c0b5kmhr.mjs +0 -2
- package/dist/chunks/cli-1.1.30-c2e2yeaj.mjs +0 -2
- package/dist/chunks/cli-1.1.30-c44kpd39.mjs +0 -2
- package/dist/chunks/cli-1.1.30-c70p43p6.mjs +0 -133
- package/dist/chunks/cli-1.1.30-c9xtenrd.mjs +0 -2
- package/dist/chunks/cli-1.1.30-ca1a9ntm.mjs +0 -2
- package/dist/chunks/cli-1.1.30-cb34mrvh.mjs +0 -2
- package/dist/chunks/cli-1.1.30-cgcdnarw.mjs +0 -2
- package/dist/chunks/cli-1.1.30-cjetc80p.mjs +0 -2
- package/dist/chunks/cli-1.1.30-cwc68erm.mjs +0 -2
- package/dist/chunks/cli-1.1.30-d3n6dp6r.mjs +0 -2
- package/dist/chunks/cli-1.1.30-d8chymja.mjs +0 -2
- package/dist/chunks/cli-1.1.30-d9sphwgb.mjs +0 -3
- package/dist/chunks/cli-1.1.30-dbbhdfn1.mjs +0 -2
- package/dist/chunks/cli-1.1.30-dv38qw87.mjs +0 -3
- package/dist/chunks/cli-1.1.30-dy1jvt4f.mjs +0 -2
- package/dist/chunks/cli-1.1.30-e0fcx44n.mjs +0 -2
- package/dist/chunks/cli-1.1.30-e15hq24m.mjs +0 -2
- package/dist/chunks/cli-1.1.30-eg5krttf.mjs +0 -2
- package/dist/chunks/cli-1.1.30-ehk76t59.mjs +0 -2
- package/dist/chunks/cli-1.1.30-em031y3s.mjs +0 -2
- package/dist/chunks/cli-1.1.30-endh0hmx.mjs +0 -2
- package/dist/chunks/cli-1.1.30-ensp6hjk.mjs +0 -2
- package/dist/chunks/cli-1.1.30-erqva8zn.mjs +0 -2
- package/dist/chunks/cli-1.1.30-etnn22zf.mjs +0 -2
- package/dist/chunks/cli-1.1.30-f6tarbyn.mjs +0 -2
- package/dist/chunks/cli-1.1.30-f8qnd0hw.mjs +0 -20
- package/dist/chunks/cli-1.1.30-f9cckkn6.mjs +0 -7
- package/dist/chunks/cli-1.1.30-f9tp1b8r.mjs +0 -6
- package/dist/chunks/cli-1.1.30-fa5djn9v.mjs +0 -2
- package/dist/chunks/cli-1.1.30-facztg9n.mjs +0 -133
- package/dist/chunks/cli-1.1.30-fct5wt67.mjs +0 -2
- package/dist/chunks/cli-1.1.30-fm4mj7wy.mjs +0 -2
- package/dist/chunks/cli-1.1.30-fpa799y4.mjs +0 -3
- package/dist/chunks/cli-1.1.30-fzan6qjf.mjs +0 -2
- package/dist/chunks/cli-1.1.30-g17zgmea.mjs +0 -3
- package/dist/chunks/cli-1.1.30-g3qd3ec3.mjs +0 -2
- package/dist/chunks/cli-1.1.30-g4c9mx6r.mjs +0 -2
- package/dist/chunks/cli-1.1.30-g9qsgq1r.mjs +0 -2
- package/dist/chunks/cli-1.1.30-gdmbygdz.mjs +0 -2
- package/dist/chunks/cli-1.1.30-gev0f31f.mjs +0 -24
- package/dist/chunks/cli-1.1.30-gk8x7f6m.mjs +0 -2
- package/dist/chunks/cli-1.1.30-gncy6j5b.mjs +0 -2
- package/dist/chunks/cli-1.1.30-gv4z21b9.mjs +0 -4
- package/dist/chunks/cli-1.1.30-gvp1pabq.mjs +0 -2
- package/dist/chunks/cli-1.1.30-h5yj1axw.mjs +0 -6
- package/dist/chunks/cli-1.1.30-h9pfkdf2.mjs +0 -2
- package/dist/chunks/cli-1.1.30-ha9qd4n4.mjs +0 -2
- package/dist/chunks/cli-1.1.30-he73pyqy.mjs +0 -2
- package/dist/chunks/cli-1.1.30-hncb22wm.mjs +0 -2
- package/dist/chunks/cli-1.1.30-hxy861gq.mjs +0 -2
- package/dist/chunks/cli-1.1.30-j29r8pgr.mjs +0 -4
- package/dist/chunks/cli-1.1.30-j2wahkcp.mjs +0 -6
- package/dist/chunks/cli-1.1.30-j46p2me4.mjs +0 -3
- package/dist/chunks/cli-1.1.30-jb34rbbt.mjs +0 -7
- package/dist/chunks/cli-1.1.30-jevxd0jk.mjs +0 -2
- package/dist/chunks/cli-1.1.30-jgxnrbme.mjs +0 -2
- package/dist/chunks/cli-1.1.30-jvqc1jfc.mjs +0 -2
- package/dist/chunks/cli-1.1.30-jyvb3jrk.mjs +0 -3
- package/dist/chunks/cli-1.1.30-kx2svwf6.mjs +0 -2
- package/dist/chunks/cli-1.1.30-kzbhw1mf.mjs +0 -2
- package/dist/chunks/cli-1.1.30-m5fx6y02.mjs +0 -2
- package/dist/chunks/cli-1.1.30-m5ta5zwh.mjs +0 -2
- package/dist/chunks/cli-1.1.30-m62yy9h8.mjs +0 -2
- package/dist/chunks/cli-1.1.30-mebteknr.mjs +0 -206
- package/dist/chunks/cli-1.1.30-mef66hvr.mjs +0 -10
- package/dist/chunks/cli-1.1.30-mgj06132.mjs +0 -2
- package/dist/chunks/cli-1.1.30-mpmg84pk.mjs +0 -3
- package/dist/chunks/cli-1.1.30-mz5a585j.mjs +0 -9
- package/dist/chunks/cli-1.1.30-n306djbd.mjs +0 -2
- package/dist/chunks/cli-1.1.30-naaxghkh.mjs +0 -2
- package/dist/chunks/cli-1.1.30-nhfsct38.mjs +0 -2
- package/dist/chunks/cli-1.1.30-p3m6d618.mjs +0 -2
- package/dist/chunks/cli-1.1.30-p63h2njx.mjs +0 -42
- package/dist/chunks/cli-1.1.30-p6bsj13y.mjs +0 -2
- package/dist/chunks/cli-1.1.30-pc2wp50b.mjs +0 -5504
- package/dist/chunks/cli-1.1.30-pc6nevmd.mjs +0 -2
- package/dist/chunks/cli-1.1.30-pez1sh7w.mjs +0 -2
- package/dist/chunks/cli-1.1.30-pg6jbgcq.mjs +0 -12
- package/dist/chunks/cli-1.1.30-pgx35gqd.mjs +0 -2
- package/dist/chunks/cli-1.1.30-pw08jvvr.mjs +0 -3
- package/dist/chunks/cli-1.1.30-pzp496y6.mjs +0 -2
- package/dist/chunks/cli-1.1.30-q00wdmf9.mjs +0 -2
- package/dist/chunks/cli-1.1.30-q51sf5gk.mjs +0 -2
- package/dist/chunks/cli-1.1.30-q8sd13v9.mjs +0 -2
- package/dist/chunks/cli-1.1.30-q8xgmv1x.mjs +0 -39
- package/dist/chunks/cli-1.1.30-qcwzchrc.mjs +0 -2
- package/dist/chunks/cli-1.1.30-qdnzwgr7.mjs +0 -2
- package/dist/chunks/cli-1.1.30-qjdmnkfj.mjs +0 -2
- package/dist/chunks/cli-1.1.30-qm4vn98q.mjs +0 -2
- package/dist/chunks/cli-1.1.30-qn71nvqn.mjs +0 -2
- package/dist/chunks/cli-1.1.30-qykdr3bk.mjs +0 -2
- package/dist/chunks/cli-1.1.30-r4ap6bq3.mjs +0 -4
- package/dist/chunks/cli-1.1.30-rdbwn1xc.mjs +0 -2
- package/dist/chunks/cli-1.1.30-rdgv4qpw.mjs +0 -2
- package/dist/chunks/cli-1.1.30-s27erhy7.mjs +0 -2
- package/dist/chunks/cli-1.1.30-s2b0zbj0.mjs +0 -1
- package/dist/chunks/cli-1.1.30-s7f7x42j.mjs +0 -2
- package/dist/chunks/cli-1.1.30-sdxgwxfm.mjs +0 -2
- package/dist/chunks/cli-1.1.30-sgm7bcet.mjs +0 -58
- package/dist/chunks/cli-1.1.30-sr3wnzt7.mjs +0 -17
- package/dist/chunks/cli-1.1.30-syea4bx7.mjs +0 -2
- package/dist/chunks/cli-1.1.30-t27wxks6.mjs +0 -6
- package/dist/chunks/cli-1.1.30-tc8vq728.mjs +0 -15
- package/dist/chunks/cli-1.1.30-tcz89gqa.mjs +0 -2
- package/dist/chunks/cli-1.1.30-tt85hxby.mjs +0 -25
- package/dist/chunks/cli-1.1.30-ty0pw373.mjs +0 -24
- package/dist/chunks/cli-1.1.30-vcexen3n.mjs +0 -2
- package/dist/chunks/cli-1.1.30-vda14n5e.mjs +0 -2
- package/dist/chunks/cli-1.1.30-vf6wrqmh.mjs +0 -2
- package/dist/chunks/cli-1.1.30-vhh5kt6v.mjs +0 -2
- package/dist/chunks/cli-1.1.30-vrgnzjd2.mjs +0 -2
- package/dist/chunks/cli-1.1.30-w9wdamqc.mjs +0 -34
- package/dist/chunks/cli-1.1.30-wfs29rd9.mjs +0 -12
- package/dist/chunks/cli-1.1.30-wgmdrp34.mjs +0 -2
- package/dist/chunks/cli-1.1.30-wjx6yhry.mjs +0 -2
- package/dist/chunks/cli-1.1.30-wmpgbhw0.mjs +0 -16
- package/dist/chunks/cli-1.1.30-x76str7r.mjs +0 -3
- package/dist/chunks/cli-1.1.30-x8wzmxay.mjs +0 -2
- package/dist/chunks/cli-1.1.30-x960htw5.mjs +0 -2
- package/dist/chunks/cli-1.1.30-xhk0n48x.mjs +0 -2
- package/dist/chunks/cli-1.1.30-xqb55m51.mjs +0 -2
- package/dist/chunks/cli-1.1.30-xrrzhx6s.mjs +0 -5
- package/dist/chunks/cli-1.1.30-xxvagrpc.mjs +0 -2
- package/dist/chunks/cli-1.1.30-y1pn2vb5.mjs +0 -2
- package/dist/chunks/cli-1.1.30-ycv7a9hg.mjs +0 -2
- package/dist/chunks/cli-1.1.30-ygdwz4ed.mjs +0 -4
- package/dist/chunks/cli-1.1.30-yt59tc1t.mjs +0 -2
- package/dist/chunks/cli-1.1.30-yw5qpt76.mjs +0 -2
- package/dist/chunks/cli-1.1.30-yy92v8yq.mjs +0 -63
- package/dist/chunks/cli-1.1.30-z1e7k65a.mjs +0 -5
- package/dist/chunks/cli-1.1.30-z9xfs5zq.mjs +0 -2
- package/dist/chunks/cli-1.1.30-zfz29t3v.mjs +0 -3
- package/dist/chunks/cli-1.1.30-zj3nk96z.mjs +0 -2
- package/dist/chunks/cli-1.1.30-zm2e2zvb.mjs +0 -2
- package/dist/chunks/cli-1.1.30-zpss0nht.mjs +0 -3
- package/dist/chunks/cli-1.1.30-zxkfqcvj.mjs +0 -2
- package/dist/chunks/cli-1.1.30-zych8w4z.mjs +0 -45
- package/dist/chunks/client-1.1.30-6xd07jrd.mjs +0 -1
- package/dist/chunks/color-1.1.30-yhxh49s0.mjs +0 -1
- package/dist/chunks/compact-1.1.30-wxxb111z.mjs +0 -3
- package/dist/chunks/config-1.1.30-4gdp5w7v.mjs +0 -1
- package/dist/chunks/config-1.1.30-s02sv9vf.mjs +0 -1
- package/dist/chunks/constants-1.1.30-g1xm727k.mjs +0 -1
- package/dist/chunks/context-1.1.30-pepgc836.mjs +0 -1
- package/dist/chunks/context-noninteractive-1.1.30-ahdmm09h.mjs +0 -1
- package/dist/chunks/conversation-1.1.30-93marv3a.mjs +0 -1
- package/dist/chunks/copilotHeaders-1.1.30-ypx3j03s.mjs +0 -1
- package/dist/chunks/copy-1.1.30-bsfx33za.mjs +0 -9
- package/dist/chunks/cost-1.1.30-rhgx2a0h.mjs +0 -1
- package/dist/chunks/createSSHSession-1.1.30-p5qve4c1.mjs +0 -1
- package/dist/chunks/createSession-1.1.30-rwvvv9na.mjs +0 -1
- package/dist/chunks/debug-1.1.30-j1zw0q5b.mjs +0 -1
- package/dist/chunks/defaultActionDeps-1.1.30-5gkcnqp5.mjs +0 -1481
- package/dist/chunks/desktop-1.1.30-rwbfgek7.mjs +0 -1
- package/dist/chunks/detectRepository-1.1.30-2xwvggy6.mjs +0 -1
- package/dist/chunks/detection-1.1.30-kkar89w6.mjs +0 -1
- package/dist/chunks/diff-1.1.30-t1r0x9g4.mjs +0 -1
- package/dist/chunks/doctor-1.1.30-cvqts45f.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-1.1.30-smg0046q.mjs +0 -1
- package/dist/chunks/earlyInput-1.1.30-cpx4e858.mjs +0 -1
- package/dist/chunks/effort-1.1.30-jdxyeqz7.mjs +0 -13
- package/dist/chunks/engine-1.1.30-8qhtasfe.mjs +0 -1
- package/dist/chunks/envLessBridgeConfig-1.1.30-jnz4sy6x.mjs +0 -1
- package/dist/chunks/envUtils-1.1.30-y5dyaydm.mjs +0 -1
- package/dist/chunks/environmentSelection-1.1.30-w1z47qad.mjs +0 -1
- package/dist/chunks/environments-1.1.30-sjscvfn9.mjs +0 -1
- package/dist/chunks/errors-1.1.30-7cmbc98j.mjs +0 -1
- package/dist/chunks/exampleCommands-1.1.30-jx9hvt2q.mjs +0 -1
- package/dist/chunks/execFileNoThrow-1.1.30-dqrsra7k.mjs +0 -1
- package/dist/chunks/exit-1.1.30-m2yzbcth.mjs +0 -1
- package/dist/chunks/explorer-1.1.30-5tat30es.mjs +0 -1
- package/dist/chunks/export-1.1.30-545a0v8x.mjs +0 -2
- package/dist/chunks/extra-usage-1.1.30-5k9b4t6b.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-1.1.30-h5fqbtg3.mjs +0 -1
- package/dist/chunks/fast-1.1.30-91wr1vy4.mjs +0 -1
- package/dist/chunks/feedback-1.1.30-36xrb399.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-1.1.30-be1ke8r3.mjs +0 -1
- package/dist/chunks/git-1.1.30-sxa8xf85.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-1.1.30-m7a8kdwg.mjs +0 -1
- package/dist/chunks/goal-1.1.30-71sj2735.mjs +0 -4
- package/dist/chunks/growthbook-1.1.30-rx44zvrq.mjs +0 -1
- package/dist/chunks/headless-1.1.30-h98t9mfb.mjs +0 -2
- package/dist/chunks/heapdump-1.1.30-82m1rvjw.mjs +0 -6
- package/dist/chunks/help-1.1.30-vnsg1001.mjs +0 -1
- package/dist/chunks/hookChains-1.1.30-tc5ff3xr.mjs +0 -3
- package/dist/chunks/hooks-1.1.30-2sctf45c.mjs +0 -79
- package/dist/chunks/hooks-1.1.30-707b390t.mjs +0 -1
- package/dist/chunks/ide-1.1.30-e8neepsj.mjs +0 -3
- package/dist/chunks/image-processor-napi-1.1.30-gcqgfeec.mjs +0 -1
- package/dist/chunks/import-1.1.30-g0p9rj63.mjs +0 -261
- package/dist/chunks/inboundAttachments-1.1.30-a5p4ftqg.mjs +0 -1
- package/dist/chunks/index-1.1.30-00d73fwg.mjs +0 -1
- package/dist/chunks/index-1.1.30-0sdck5q1.mjs +0 -9
- package/dist/chunks/index-1.1.30-38597fv3.mjs +0 -5
- package/dist/chunks/index-1.1.30-3z58evcj.mjs +0 -1
- package/dist/chunks/index-1.1.30-5k081eyt.mjs +0 -1
- package/dist/chunks/index-1.1.30-8n15b4e3.mjs +0 -2
- package/dist/chunks/index-1.1.30-9nx8fm72.mjs +0 -1
- package/dist/chunks/index-1.1.30-9zfyk995.mjs +0 -23
- package/dist/chunks/index-1.1.30-ba27qy75.mjs +0 -1
- package/dist/chunks/index-1.1.30-cddndqaa.mjs +0 -1
- package/dist/chunks/index-1.1.30-cnbcr7zp.mjs +0 -1
- package/dist/chunks/index-1.1.30-f65yg5kz.mjs +0 -9
- package/dist/chunks/index-1.1.30-fwvhky1a.mjs +0 -1
- package/dist/chunks/index-1.1.30-hmnpjmd5.mjs +0 -1
- package/dist/chunks/index-1.1.30-nemv1gaj.mjs +0 -1
- package/dist/chunks/index-1.1.30-pnpy7v0s.mjs +0 -1
- package/dist/chunks/index-1.1.30-q4x054c8.mjs +0 -2
- package/dist/chunks/index-1.1.30-racdqjba.mjs +0 -1
- package/dist/chunks/index-1.1.30-scb66j47.mjs +0 -1
- package/dist/chunks/index-1.1.30-tfz6950h.mjs +0 -30
- package/dist/chunks/index-1.1.30-tx381qq5.mjs +0 -1
- package/dist/chunks/index-1.1.30-w4zhj1qd.mjs +0 -1
- package/dist/chunks/index-1.1.30-xxh224ea.mjs +0 -1
- package/dist/chunks/init-1.1.30-txzpz2vm.mjs +0 -1
- package/dist/chunks/initReplBridge-1.1.30-hkrhwfr3.mjs +0 -1
- package/dist/chunks/ink-1.1.30-av1t4b54.mjs +0 -1
- package/dist/chunks/insights-1.1.30-nbs0zndp.mjs +0 -870
- package/dist/chunks/install-1.1.30-kd3vnaat.mjs +0 -1
- package/dist/chunks/install-github-app-1.1.30-ea78ytf6.mjs +0 -149
- package/dist/chunks/install-slack-app-1.1.30-v2q1py01.mjs +0 -1
- package/dist/chunks/instrumentation-1.1.30-20686d7h.mjs +0 -1
- package/dist/chunks/interactiveHelpers-1.1.30-rd0zzjyp.mjs +0 -1
- package/dist/chunks/keybindings-1.1.30-157aap7w.mjs +0 -2
- package/dist/chunks/knowledge-1.1.30-4mcx1txk.mjs +0 -2
- package/dist/chunks/latestVersionCache-1.1.30-65qvjpys.mjs +0 -1
- package/dist/chunks/loadAgentsDir-1.1.30-nfrca2zv.mjs +0 -1
- package/dist/chunks/loadPluginHooks-1.1.30-wa8regkc.mjs +0 -1
- package/dist/chunks/log-1.1.30-nh81h0jz.mjs +0 -1
- package/dist/chunks/main-1.1.30-87zf4enf.mjs +0 -1
- package/dist/chunks/managedEnv-1.1.30-p38nd6r6.mjs +0 -1
- package/dist/chunks/mcp-1.1.30-egynhffm.mjs +0 -17
- package/dist/chunks/mcp-1.1.30-gaz9mgmq.mjs +0 -4
- package/dist/chunks/mcp-1.1.30-r6q89d8c.mjs +0 -1
- package/dist/chunks/mcpb-1.1.30-qxpx83j6.mjs +0 -1
- package/dist/chunks/memory-1.1.30-72gbfb3b.mjs +0 -77
- package/dist/chunks/model-1.1.30-7nsbqqvm.mjs +0 -2
- package/dist/chunks/model-1.1.30-f7d6dbt2.mjs +0 -1
- package/dist/chunks/node-1.1.30-nbnhkya6.mjs +0 -15
- package/dist/chunks/node-1.1.30-vaaf7x0g.mjs +0 -1
- package/dist/chunks/oauth-1.1.30-g201gbyg.mjs +0 -1
- package/dist/chunks/openaiShim-1.1.30-rz4xax1e.mjs +0 -14
- package/dist/chunks/output-style-1.1.30-ms4eck90.mjs +0 -1
- package/dist/chunks/package-D2QZMRW7-1.1.30-08c7mgpt.mjs +0 -1
- package/dist/chunks/parseConnectUrl-1.1.30-bd7ade4m.mjs +0 -1
- package/dist/chunks/parser-1.1.30-qe7n0vnw.mjs +0 -1
- package/dist/chunks/passes-1.1.30-3cz64bpa.mjs +0 -1
- package/dist/chunks/permissions-1.1.30-28z7ax7g.mjs +0 -3
- package/dist/chunks/permissions-1.1.30-vgtb4qf9.mjs +0 -1
- package/dist/chunks/plan-1.1.30-s865r5b5.mjs +0 -1
- package/dist/chunks/plist-1.1.30-pxa62mce.mjs +0 -1
- package/dist/chunks/plugin-1.1.30-6apj9sf8.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-1.1.30-gmcab9kx.mjs +0 -1
- package/dist/chunks/plugins-1.1.30-40c7sagf.mjs +0 -9
- package/dist/chunks/preActionHook-1.1.30-q2g48qsk.mjs +0 -2
- package/dist/chunks/print-1.1.30-drvg0v0c.mjs +0 -57
- package/dist/chunks/process-1.1.30-f6y2msx6.mjs +0 -1
- package/dist/chunks/processBashCommand-1.1.30-5bzgcejg.mjs +0 -1
- package/dist/chunks/processSlashCommand-1.1.30-2bwd1kpt.mjs +0 -9
- package/dist/chunks/prompt-1.1.30-9rbbx5vr.mjs +0 -1
- package/dist/chunks/prompt-1.1.30-phmv317m.mjs +0 -1
- package/dist/chunks/prompts-1.1.30-1myv5ewh.mjs +0 -1
- package/dist/chunks/protocolHandler-1.1.30-d6jkd0dk.mjs +0 -13
- package/dist/chunks/provider-1.1.30-cwkzb2t8.mjs +0 -2
- package/dist/chunks/providerProfiles-1.1.30-qe0y7b6e.mjs +0 -1
- package/dist/chunks/providerValidation-1.1.30-rzg2nkx3.mjs +0 -6
- package/dist/chunks/rate-limit-options-1.1.30-4q04y9f7.mjs +0 -1
- package/dist/chunks/registerSubcommands-1.1.30-k3ar1dyg.mjs +0 -26
- package/dist/chunks/registry-1.1.30-epdyxcsa.mjs +0 -1
- package/dist/chunks/release-notes-1.1.30-k11yp5hh.mjs +0 -5
- package/dist/chunks/reload-plugins-1.1.30-n7qhqqr3.mjs +0 -2
- package/dist/chunks/remote-env-1.1.30-f8e03jpx.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-1.1.30-fqankvvx.mjs +0 -1
- package/dist/chunks/remoteSession-1.1.30-fc5x1bz4.mjs +0 -1
- package/dist/chunks/rename-1.1.30-vw8eyfha.mjs +0 -1
- package/dist/chunks/replBridgeHandle-1.1.30-bagtg7fm.mjs +0 -1
- package/dist/chunks/replLauncher-1.1.30-318vaq80.mjs +0 -1
- package/dist/chunks/resume-1.1.30-jrj1wpvj.mjs +0 -2
- package/dist/chunks/rewind-1.1.30-z97mdn25.mjs +0 -1
- package/dist/chunks/rootOptions-1.1.30-ybrgmmyy.mjs +0 -1
- package/dist/chunks/runWorkflowHeadless-1.1.30-w3gn8w75.mjs +0 -10
- package/dist/chunks/sandbox-adapter-1.1.30-4rd9w5by.mjs +0 -1
- package/dist/chunks/sandbox-toggle-1.1.30-zmtfq25w.mjs +0 -1
- package/dist/chunks/session-1.1.30-sbykpbav.mjs +0 -2
- package/dist/chunks/sessionDiscovery-1.1.30-dd680nx7.mjs +0 -1
- package/dist/chunks/sessionFileAccessHooks-1.1.30-4rhdr018.mjs +0 -1
- package/dist/chunks/sessionStorage-1.1.30-cwb5a83p.mjs +0 -1
- package/dist/chunks/settings-1.1.30-xxee6nzb.mjs +0 -1
- package/dist/chunks/setup-1.1.30-p2wwqw6v.mjs +0 -12
- package/dist/chunks/sinks-1.1.30-phkc3yep.mjs +0 -1
- package/dist/chunks/skills-1.1.30-vsg5twx1.mjs +0 -1
- package/dist/chunks/startupProfiler-1.1.30-wa0xbx1z.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-1.1.30-9cgnvwtt.mjs +0 -1
- package/dist/chunks/state-1.1.30-ge0kb9gr.mjs +0 -1
- package/dist/chunks/stats-1.1.30-n5w7ehyg.mjs +0 -1
- package/dist/chunks/status-1.1.30-snsvg4xb.mjs +0 -1
- package/dist/chunks/stickers-1.1.30-7ffpw08c.mjs +0 -1
- package/dist/chunks/subprocessEnv-1.1.30-5efpmhgz.mjs +0 -1
- package/dist/chunks/tasks-1.1.30-ykgkx7d8.mjs +0 -1
- package/dist/chunks/teamHelpers-1.1.30-cjjzmnj6.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-1.1.30-e2mh88ze.mjs +0 -1
- package/dist/chunks/teleport-1.1.30-9y1akw6m.mjs +0 -1
- package/dist/chunks/terminalSetup-1.1.30-mwbzfrfc.mjs +0 -1
- package/dist/chunks/theme-1.1.30-9dqykgv2.mjs +0 -1
- package/dist/chunks/thinkback-1.1.30-3pbzqt97.mjs +0 -1
- package/dist/chunks/thinkback-play-1.1.30-83akae4q.mjs +0 -1
- package/dist/chunks/toolPool-1.1.30-3kvrwtxa.mjs +0 -1
- package/dist/chunks/toolSearch-1.1.30-s60zcj4t.mjs +0 -1
- package/dist/chunks/tools-1.1.30-by0ddhf4.mjs +0 -1
- package/dist/chunks/trustedDevice-1.1.30-ecq2hfrc.mjs +0 -1
- package/dist/chunks/turndown.cjs-1.1.30-m5hyejns.mjs +0 -69
- package/dist/chunks/types-1.1.30-mrv5q877.mjs +0 -1
- package/dist/chunks/ultrareviewCommand-1.1.30-5etzjedp.mjs +0 -4
- package/dist/chunks/update-1.1.30-ax60cy72.mjs +0 -72
- package/dist/chunks/upgrade-1.1.30-hrny7f12.mjs +0 -1
- package/dist/chunks/upload-1.1.30-s0z8kw2s.mjs +0 -7
- package/dist/chunks/upstreamproxy-1.1.30-tkvbafsh.mjs +0 -14
- package/dist/chunks/url-handler-napi-1.1.30-enhczdhm.mjs +0 -1
- package/dist/chunks/usage-1.1.30-ew9dakf2.mjs +0 -1
- package/dist/chunks/util-1.1.30-knp77fm5.mjs +0 -1
- package/dist/chunks/utils-1.1.30-74ykpfac.mjs +0 -1
- package/dist/chunks/vim-1.1.30-y01vnb23.mjs +0 -1
- package/dist/chunks/watchLoop-1.1.30-sjecqqx4.mjs +0 -13
- package/dist/chunks/watcher-1.1.30-qnfq5sma.mjs +0 -1
- package/dist/chunks/wiki-1.1.30-qddcp6x2.mjs +0 -132
- package/dist/chunks/workflows-1.1.30-j5wcb76g.mjs +0 -1
- package/dist/chunks/worktree-1.1.30-m6gvqkc9.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-1.1.30-nma5ggmd.mjs +0 -1
- package/dist/chunks/wrapper-1.1.30-c8vm3try.mjs +0 -7
- /package/dist/chunks/{cli-1.1.30-vxh27fdj.mjs → cli-1.1.31-d930nxk6.mjs} +0 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import{uia as L6,yia as oB}from"./cli-1.1.31-vpkbqj90.mjs";import{Gia as Fq,Hia as K6,Iia as Jx}from"./cli-1.1.31-1wxttnqr.mjs";import{$ia as t0,Jia as mz,Mia as Fv,Sia as yX,Xia as sw,Yia as vB,_ia as K,aja as I,bja as K2}from"./cli-1.1.31-c9707zjx.mjs";import{Ija as Av,eja as Z0,gja as G1,qja as rz}from"./cli-1.1.31-5tgfa7xy.mjs";import{Jja as qG,Rja as tL,Sja as QG}from"./cli-1.1.31-h5a78vp8.mjs";import{$ja as ak,Aka as M0,Bka as O1,Eka as k,Ika as F0,Ska as P,Vja as K4,Vka as g0,Xja as YG,Yja as Bq,Zja as IN,_ja as EW,aka as j$,bka as C_,cka as lW,dka as KN,eka as z5,fka as nW,gka as tW,hka as zN,ika as eW,jka as _N,kka as uW,lka as ZN,mka as E$,nka as m_,oka as ZV,pka as RN,qka as XV,rka as MN,uka as y7,vka as m,wka as X0,xka as uq,yka as $z}from"./cli-1.1.31-t6m64e0q.mjs";import{kla as Z5,pla as sz,rla as U0,sla as e2,vla as DG,xla as I1}from"./cli-1.1.31-dmghye74.mjs";import{Ala as $0,Dla as Q0,Ela as ML,Fla as M6,Lla as s0}from"./cli-1.1.31-wba64b2s.mjs";import{$ma as B5,$pa as az,Fma as $V,Gma as DN,Gpa as pq,Hna as x$,Ina as f_,Ipa as dq,Lna as e4,Mna as A$,Nna as T$,Ona as y_,Pna as O$,Qna as b_,Qpa as CV,Rma as Wq,Rna as _5,Roa as YW,Sma as WN,Sna as zV,Tna as P$,Una as g_,Wpa as YL,Yqa as v1,ana as bW,bna as Vq,bqa as oz,cna as VN,dna as sW,dpa as eB,ena as BN,epa as ZL,fna as t4,fpa as XL,gna as D$,gpa as qL,hpa as QL,ipa as $L,jpa as O4,kpa as JL,lna as rW,mna as LN,npa as xV,opa as RL,tna as L5,una as hW,wqa as kW,xma as y1,yma as C4}from"./cli-1.1.31-b8rbgfhm.mjs";import{Zqa as V5,_qa as PW,hra as mW,ira as ek,jra as e0,kra as r4,lra as oW,mra as GN,vra as u,wra as j1}from"./cli-1.1.31-thhdw5e1.mjs";import{hsa as Ev,isa as g4,jsa as c,ksa as Mq,lsa as B,msa as H0,nsa as F2,osa as D2}from"./cli-1.1.31-qj8vksz8.mjs";var yQ=c((mv,vQ)=>{vQ.exports=EQ;EQ.sync=q_;var xQ=H0("fs");function X_(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 $=q[Q].toLowerCase();if($&&Z.substr(-$.length).toLowerCase()===$)return!0}return!1}function PQ(Z,X,q){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return X_(X,q)}function EQ(Z,X,q){xQ.stat(Z,function(Q,$){q(Q,Q?!1:PQ($,Z,X))})}function q_(Z,X){return PQ(xQ.statSync(Z),Z,X)}});var fQ=c((uv,hQ)=>{hQ.exports=SQ;SQ.sync=Q_;var CQ=H0("fs");function SQ(Z,X,q){CQ.stat(Z,function(Q,$){q(Q,Q?!1:bQ($,X))})}function Q_(Z,X){return bQ(CQ.statSync(Z),X)}function bQ(Z,X){return Z.isFile()&&$_(Z,X)}function $_(Z,X){var{mode:q,uid:Q,gid:$}=Z,J=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),G=parseInt("001",8),W=H|U,V=q&G||q&U&&$===Y||q&H&&Q===J||q&W&&J===0;return V}});var mQ=c((dv,gQ)=>{var pv=H0("fs"),s4;if(process.platform==="win32"||global.TESTING_WINDOWS)s4=yQ();else s4=fQ();gQ.exports=X3;X3.sync=J_;function X3(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,$){X3(Z,X||{},function(J,Y){if(J)$(J);else Q(Y)})})}s4(Z,X||{},function(Q,$){if(Q){if(Q.code==="EACCES"||X&&X.ignoreErrors)Q=null,$=!1}q(Q,$)})}function J_(Z,X){try{return s4.sync(Z,X||{})}catch(q){if(X&&X.ignoreErrors||q.code==="EACCES")return!1;else throw q}}});var iQ=c((cv,nQ)=>{var z2=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",uQ=H0("path"),Y_=z2?";":":",pQ=mQ(),dQ=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),cQ=(Z,X)=>{let q=X.colon||Y_,Q=Z.match(/\//)||z2&&Z.match(/\\/)?[""]:[...z2?[process.cwd()]:[],...(X.path||process.env.PATH||"").split(q)],$=z2?X.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",J=z2?$.split(q):[""];if(z2){if(Z.indexOf(".")!==-1&&J[0]!=="")J.unshift("")}return{pathEnv:Q,pathExt:J,pathExtExe:$}},lQ=(Z,X,q)=>{if(typeof X==="function")q=X,X={};if(!X)X={};let{pathEnv:Q,pathExt:$,pathExtExe:J}=cQ(Z,X),Y=[],H=(G)=>new Promise((W,V)=>{if(G===Q.length)return X.all&&Y.length?W(Y):V(dQ(Z));let L=Q[G],z=/^".*"$/.test(L)?L.slice(1,-1):L,_=uQ.join(z,Z),R=!z&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+_:_;W(U(R,G,0))}),U=(G,W,V)=>new Promise((L,z)=>{if(V===$.length)return L(H(W+1));let _=$[V];pQ(G+_,{pathExt:J},(R,M)=>{if(!R&&M)if(X.all)Y.push(G+_);else return L(G+_);return L(U(G,W,V+1))})});return q?H(0).then((G)=>q(null,G),q):H(0)},H_=(Z,X)=>{X=X||{};let{pathEnv:q,pathExt:Q,pathExtExe:$}=cQ(Z,X),J=[];for(let Y=0;Y<q.length;Y++){let H=q[Y],U=/^".*"$/.test(H)?H.slice(1,-1):H,G=uQ.join(U,Z),W=!U&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+G:G;for(let V=0;V<Q.length;V++){let L=W+Q[V];try{if(pQ.sync(L,{pathExt:$}))if(X.all)J.push(L);else return L}catch(z){}}}if(X.all&&J.length)return J;if(X.nothrow)return null;throw dQ(Z)};nQ.exports=lQ;lQ.sync=H_});var oQ=c((lv,q3)=>{var aQ=(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"};q3.exports=aQ;q3.exports.default=aQ});var eQ=c((nv,tQ)=>{var sQ=H0("path"),K_=iQ(),U_=oQ();function rQ(Z,X){let q=Z.options.env||process.env,Q=process.cwd(),$=Z.options.cwd!=null,J=$&&process.chdir!==void 0&&!process.chdir.disabled;if(J)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=K_.sync(Z.command,{path:q[U_({env:q})],pathExt:X?sQ.delimiter:void 0})}catch(H){}finally{if(J)process.chdir(Q)}if(Y)Y=sQ.resolve($?Z.options.cwd:"",Y);return Y}function G_(Z){return rQ(Z)||rQ(Z,!0)}tQ.exports=G_});var Z$=c((B_,$3)=>{var Q3=/([()\][%!^"`<>&|;, *?])/g;function W_(Z){return Z=Z.replace(Q3,"^$1"),Z}function V_(Z,X){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(Q3,"^$1"),X)Z=Z.replace(Q3,"^$1");return Z}B_.command=W_;B_.argument=V_});var q$=c((iv,X$)=>{X$.exports=/^#!(.*)/});var $$=c((av,Q$)=>{var __=q$();Q$.exports=(Z="")=>{let X=Z.match(__);if(!X)return null;let[q,Q]=X[0].replace(/#! ?/,"").split(" "),$=q.split("/").pop();if($==="env")return Q;return Q?`${$} ${Q}`:$}});var Y$=c((ov,J$)=>{var J3=H0("fs"),R_=$$();function M_(Z){let q=Buffer.alloc(150),Q;try{Q=J3.openSync(Z,"r"),J3.readSync(Q,q,0,150,0),J3.closeSync(Q)}catch($){}return R_(q.toString())}J$.exports=M_});var G$=c((sv,U$)=>{var F_=H0("path"),H$=eQ(),K$=Z$(),D_=Y$(),A_=process.platform==="win32",T_=/\.(?:com|exe)$/i,j_=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function I_(Z){Z.file=H$(Z);let X=Z.file&&D_(Z.file);if(X)return Z.args.unshift(Z.file),Z.command=X,H$(Z);return Z.file}function w_(Z){if(!A_)return Z;let X=I_(Z),q=!T_.test(X);if(Z.options.forceShell||q){let Q=j_.test(X);Z.command=F_.normalize(Z.command),Z.command=K$.command(Z.command),Z.args=Z.args.map((J)=>K$.argument(J,Q));let $=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${$}"`],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:w_(Q)}U$.exports=O_});var B$=c((rv,V$)=>{var Y3=process.platform==="win32";function H3(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 k_(Z,X){if(!Y3)return;let q=Z.emit;Z.emit=function(Q,$){if(Q==="exit"){let J=W$($,X);if(J)return q.call(Z,"error",J)}return q.apply(Z,arguments)}}function W$(Z,X){if(Y3&&Z===1&&!X.file)return H3(X.original,"spawn");return null}function N_(Z,X){if(Y3&&Z===1&&!X.file)return H3(X.original,"spawnSync");return null}V$.exports={hookChildProcess:k_,verifyENOENT:W$,verifyENOENTSync:N_,notFoundError:H3}});var _$=c((tv,_2)=>{var L$=H0("child_process"),K3=G$(),U3=B$();function z$(Z,X,q){let Q=K3(Z,X,q),$=L$.spawn(Q.command,Q.args,Q.options);return U3.hookChildProcess($,Q),$}function x_(Z,X,q){let Q=K3(Z,X,q),$=L$.spawnSync(Q.command,Q.args,Q.options);return $.error=$.error||U3.verifyENOENTSync($.status,Q),$}_2.exports=z$;_2.exports.spawn=z$;_2.exports.sync=x_;_2.exports._parse=K3;_2.exports._enoent=U3});var P_;var R$=B(()=>{P_=["off","compact","full"]});function O0(){return{numStartups:0,installMethod:void 0,autoUpdates:void 0,theme:"dark",preferredNotifChannel:"auto",verbose:!1,editorMode:"normal",autoCompactEnabled:!0,collapseSubagentProgress:!0,summarizeSubagentResult:!1,thinkingHistoryRedactionEnabled:!0,narrationHistoryRedactionEnabled:!0,toolResultSummarizerEnabled:!0,showTurnDuration:!0,showCacheStats:"compact",hasSeenTasksHint:!1,hasUsedStash:!1,hasUsedBackgroundTask:!1,queuedCommandUpHintCount:0,diffTool:"auto",customApiKeyResponses:{approved:[],rejected:[]},env:{},tipsHistory:{},memoryUsageCount:0,promptQueueUseCount:0,btwUseCount:0,todoFeatureEnabled:!0,showExpandedTodos:!1,messageIdleNotifThresholdMs:60000,autoConnectIde:!1,autoInstallIdeExtension:!0,fileCheckpointingEnabled:!0,terminalProgressBarEnabled:!0,cachedStatsigGates:{},cachedDynamicConfigs:{},cachedGrowthBookFeatures:{},respectGitignore:!0,copyFullResponse:!1,providerProfiles:[],openaiAdditionalModelOptionsCacheByProfile:{},knowledgeGraphEnabled:!0,inlineImagesMode:"auto",autoBackgroundAgentsEnabled:!1,workflowsDefaultBackground:!1}}function E_(Z){return M$.includes(Z)}function v_(Z){return F$.includes(Z)}var b1,h1,M$,F$;var D6=B(()=>{b1={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1};h1=O0(),M$=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","narrationHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","copyFullResponse","copyOnSelect","flickerFreeMode","renderFrameRate","permissionExplainerEnabled","prStatusFooterEnabled","prStatusHosts","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled","bashOutputFilterCapEnabled","autoBackgroundAgentsEnabled","repeatedFailureHintEnabled","workflowsDefaultBackground","oauthBrowser","inlineImagesMode"];F$=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"]});function S_(Z,X,q,Q){if(!e0(Z))return Z;X=e4(X,Z);var $=-1,J=X.length,Y=J-1,H=Z;while(H!=null&&++$<J){var U=T$(X[$]),G=q;if(U==="__proto__"||U==="constructor"||U==="prototype")return Z;if($!=Y){var W=H[U];if(G=Q?Q(W,U,H):void 0,G===void 0)G=e0(W)?W:t4(X[$+1])?[]:{}}j$(H,U,G),H=H[U]}return Z}var I$;var w$=B(()=>{C_();A$();D$();r4();y_();I$=S_});function h_(Z,X,q){var Q=-1,$=X.length,J={};while(++Q<$){var Y=X[Q],H=O$(Z,Y);if(q(H,Y))I$(J,e4(Y,Z),H)}return J}var k$;var N$=B(()=>{b_();w$();A$();k$=h_});function u_(Z,X){if(Z==null)return{};var q=x$(E$(Z),function(Q){return[Q]});return X=P$(X),k$(Z,q,function(Q,$){return X(Q,$[0])})}var G3;var v$=B(()=>{f_();g_();N$();m_();G3=u_});function T6(Z,X=!1){let q=Z.length,Q=0,$="",J=0,Y=16,H=0,U=0,G=0,W=0,V=0;function L(D,w){let T=0,j=0;while(T<D||!w){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<D)j=-1;return j}function z(D){Q=D,$="",J=0,Y=16,V=0}function _(){let D=Q;if(Z.charCodeAt(Q)===48)Q++;else{Q++;while(Q<Z.length&&R2(Z.charCodeAt(Q)))Q++}if(Q<Z.length&&Z.charCodeAt(Q)===46)if(Q++,Q<Z.length&&R2(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&R2(Z.charCodeAt(Q)))Q++}else return V=3,Z.substring(D,Q);let w=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&&R2(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&R2(Z.charCodeAt(Q)))Q++;w=Q}else V=3}return Z.substring(D,w)}function R(){let D="",w=Q;while(!0){if(Q>=q){D+=Z.substring(w,Q),V=2;break}let T=Z.charCodeAt(Q);if(T===34){D+=Z.substring(w,Q),Q++;break}if(T===92){if(D+=Z.substring(w,Q),Q++,Q>=q){V=2;break}switch(Z.charCodeAt(Q++)){case 34:D+='"';break;case 92:D+="\\";break;case 47:D+="/";break;case 98:D+="\b";break;case 102:D+="\f";break;case 110:D+=`
|
|
2
|
+
`;break;case 114:D+="\r";break;case 116:D+="\t";break;case 117:let A=L(4,!0);if(A>=0)D+=String.fromCharCode(A);else V=4;break;default:V=5}w=Q;continue}if(T>=0&&T<=31)if(A6(T)){D+=Z.substring(w,Q),V=2;break}else V=6;Q++}return D}function M(){if($="",V=0,J=Q,U=H,W=G,Q>=q)return J=q,Y=17;let D=Z.charCodeAt(Q);if(W3(D)){do Q++,$+=String.fromCharCode(D),D=Z.charCodeAt(Q);while(W3(D));return Y=15}if(A6(D)){if(Q++,$+=String.fromCharCode(D),D===13&&Z.charCodeAt(Q)===10)Q++,$+=`
|
|
3
|
+
`;return H++,G=Q,Y=14}switch(D){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++,$=R(),Y=10;case 47:let w=Q-1;if(Z.charCodeAt(Q+1)===47){Q+=2;while(Q<q){if(A6(Z.charCodeAt(Q)))break;Q++}return $=Z.substring(w,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++,A6(A)){if(A===13&&Z.charCodeAt(Q)===10)Q++;H++,G=Q}}if(!j)Q++,V=1;return $=Z.substring(w,Q),Y=13}return $+=String.fromCharCode(D),Q++,Y=16;case 45:if($+=String.fromCharCode(D),Q++,Q===q||!R2(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 $+=_(),Y=11;default:while(Q<q&&F(D))Q++,D=Z.charCodeAt(Q);if(J!==Q){switch($=Z.substring(J,Q),$){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return $+=String.fromCharCode(D),Q++,Y=16}}function F(D){if(W3(D)||A6(D))return!1;switch(D){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function N(){let D;do D=M();while(D>=12&&D<=15);return D}return{setPosition:z,getPosition:()=>Q,scan:X?N:M,getToken:()=>Y,getTokenValue:()=>$,getTokenOffset:()=>J,getTokenLength:()=>Q-J,getTokenStartLine:()=>U,getTokenStartCharacter:()=>J-W,getTokenError:()=>V}}function W3(Z){return Z===32||Z===9}function A6(Z){return Z===10||Z===13}function R2(Z){return Z>=48&&Z<=57}var y$;var Z8=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"})(y$||(y$={}))});var A0,V3,C$;var S$=B(()=>{A0=Array(20).fill(0).map((Z,X)=>{return" ".repeat(X)}),V3={" ":{"\n":Array(200).fill(0).map((Z,X)=>{return`
|
|
4
|
+
`+" ".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
|
|
5
|
+
`+" ".repeat(X)})},"\t":{"\n":Array(200).fill(0).map((Z,X)=>{return`
|
|
6
|
+
`+"\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
|
|
7
|
+
`+"\t".repeat(X)})}},C$=[`
|
|
8
|
+
`,"\r",`\r
|
|
9
|
+
`]});function B3(Z,X,q){let Q,$,J,Y,H;if(X){Y=X.offset,H=Y+X.length,J=Y;while(J>0&&!j6(Z,J-1))J--;let T=H;while(T<Z.length&&!j6(Z,T))T++;$=Z.substring(J,T),Q=d_($,q)}else $=Z,Q=0,J=0,Y=0,H=Z.length;let U=c_(q,Z),G=C$.includes(U),W=0,V=0,L;if(q.insertSpaces)L=A0[q.tabSize||4]??M2(A0[1],q.tabSize||4);else L="\t";let z=L==="\t"?"\t":" ",_=T6($,!1),R=!1;function M(){if(W>1)return M2(U,W)+M2(L,Q+V);let T=L.length*(Q+V);if(!G||T>V3[z][U].length)return U+M2(L,Q+V);if(T<=0)return U;return V3[z][U][T]}function F(){let T=_.scan();W=0;while(T===15||T===14){if(T===14&&q.keepLines)W+=1;else if(T===14)W=1;T=_.scan()}return R=T===16||_.getTokenError()!==0,T}let N=[];function D(T,j,A){if(!R&&(!X||j<H&&A>Y)&&Z.substring(j,A)!==T)N.push({offset:j,length:A-j,content:T})}let w=F();if(q.keepLines&&W>0)D(M2(U,W),0,0);if(w!==17){let T=_.getTokenOffset()+J,j=L.length*Q<20&&q.insertSpaces?A0[L.length*Q]:M2(L,Q);D(j,J,T)}while(w!==17){let T=_.getTokenOffset()+_.getTokenLength()+J,j=F(),A="",b=!1;while(W===0&&(j===12||j===13)){let x=_.getTokenOffset()+J;D(A0[1],T,x),T=_.getTokenOffset()+_.getTokenLength()+J,b=j===12,A=b?M():"",j=F()}if(j===2){if(w!==1)V--;if(q.keepLines&&W>0||!q.keepLines&&w!==1)A=M();else if(q.keepLines)A=A0[1]}else if(j===4){if(w!==3)V--;if(q.keepLines&&W>0||!q.keepLines&&w!==3)A=M();else if(q.keepLines)A=A0[1]}else{switch(w){case 3:case 1:if(V++,q.keepLines&&W>0||!q.keepLines)A=M();else A=A0[1];break;case 5:if(q.keepLines&&W>0||!q.keepLines)A=M();else A=A0[1];break;case 12:A=M();break;case 13:if(W>0)A=M();else if(!b)A=A0[1];break;case 6:if(q.keepLines&&W>0)A=M();else if(!b)A=A0[1];break;case 10:if(q.keepLines&&W>0)A=M();else if(j===6&&!b)A="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(q.keepLines&&W>0)A=M();else if((j===12||j===13)&&!b)A=A0[1];else if(j!==5&&j!==17)R=!0;break;case 16:R=!0;break}if(W>0&&(j===12||j===13))A=M()}if(j===17)if(q.keepLines&&W>0)A=M();else A=q.insertFinalNewline?U:"";let O=_.getTokenOffset()+J;D(A,T,O),w=j}return N}function M2(Z,X){let q="";for(let Q=0;Q<X;Q++)q+=Z;return q}function d_(Z,X){let q=0,Q=0,$=X.tabSize||4;while(q<Z.length){let J=Z.charAt(q);if(J===A0[1])Q++;else if(J==="\t")Q+=$;else break;q++}return Math.floor(Q/$)}function c_(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)===`
|
|
10
|
+
`)return`\r
|
|
11
|
+
`;return"\r"}else if(Q===`
|
|
12
|
+
`)return`
|
|
13
|
+
`}return Z&&Z.eol||`
|
|
14
|
+
`}function j6(Z,X){return`\r
|
|
15
|
+
`.indexOf(Z.charAt(X))!==-1}var L3=B(()=>{Z8();S$()});function b$(Z,X=[],q=I6.DEFAULT){let Q=null,$=[],J=[];function Y(U){if(Array.isArray($))$.push(U);else if(Q!==null)$[Q]=U}return _3(Z,{onObjectBegin:()=>{let U={};Y(U),J.push($),$=U,Q=null},onObjectProperty:(U)=>{Q=U},onObjectEnd:()=>{$=J.pop()},onArrayBegin:()=>{let U=[];Y(U),J.push($),$=U,Q=null},onArrayEnd:()=>{$=J.pop()},onLiteralValue:Y,onError:(U,G,W)=>{X.push({error:U,offset:G,length:W})}},q),$[0]}function z3(Z,X=[],q=I6.DEFAULT){let Q={type:"array",offset:-1,length:-1,children:[],parent:void 0};function $(U){if(Q.type==="property")Q.length=U-Q.offset,Q=Q.parent}function J(U){return Q.children.push(U),U}_3(Z,{onObjectBegin:(U)=>{Q=J({type:"object",offset:U,length:-1,parent:Q,children:[]})},onObjectProperty:(U,G,W)=>{Q=J({type:"property",offset:G,length:-1,parent:Q,children:[]}),Q.children.push({type:"string",value:U,offset:G,length:W,parent:Q})},onObjectEnd:(U,G)=>{$(U+G),Q.length=U+G-Q.offset,Q=Q.parent,$(U+G)},onArrayBegin:(U,G)=>{Q=J({type:"array",offset:U,length:-1,parent:Q,children:[]})},onArrayEnd:(U,G)=>{Q.length=U+G-Q.offset,Q=Q.parent,$(U+G)},onLiteralValue:(U,G,W)=>{J({type:n_(U),offset:G,length:W,parent:Q,value:U}),$(G+W)},onSeparator:(U,G,W)=>{if(Q.type==="property"){if(U===":")Q.colonOffset=G;else if(U===",")$(G)}},onError:(U,G,W)=>{X.push({error:U,offset:G,length:W})}},q);let H=Q.children[0];if(H)delete H.parent;return H}function X8(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 $=!1;for(let J of q.children)if(Array.isArray(J.children)&&J.children[0].value===Q&&J.children.length===2){q=J.children[1],$=!0;break}if(!$)return}else{let $=Q;if(q.type!=="array"||$<0||!Array.isArray(q.children)||$>=q.children.length)return;q=q.children[$]}return q}function _3(Z,X,q=I6.DEFAULT){let Q=T6(Z,!1),$=[],J=0;function Y(v){return v?()=>J===0&&v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function H(v){return v?(y)=>J===0&&v(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function U(v){return v?(y)=>J===0&&v(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>$.slice()):()=>!0}function G(v){return v?()=>{if(J>0)J++;else if(v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>$.slice())===!1)J=1}:()=>!0}function W(v){return v?()=>{if(J>0)J--;if(J===0)v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter())}:()=>!0}let V=G(X.onObjectBegin),L=U(X.onObjectProperty),z=W(X.onObjectEnd),_=G(X.onArrayBegin),R=W(X.onArrayEnd),M=U(X.onLiteralValue),F=H(X.onSeparator),N=Y(X.onComment),D=H(X.onError),w=q&&q.disallowComments,T=q&&q.allowTrailingComma;function j(){while(!0){let v=Q.scan();switch(Q.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:if(!w)A(11);break;case 2:A(12);break;case 6:A(16);break}switch(v){case 12:case 13:if(w)A(10);else N();break;case 16:A(1);break;case 15:case 14:break;default:return v}}}function A(v,y=[],d=[]){if(D(v),y.length+d.length>0){let g=Q.getToken();while(g!==17){if(y.indexOf(g)!==-1){j();break}else if(d.indexOf(g)!==-1)break;g=j()}}}function b(v){let y=Q.getTokenValue();if(v)M(y);else L(y),$.push(y);return j(),!0}function O(){switch(Q.getToken()){case 11:let v=Q.getTokenValue(),y=Number(v);if(isNaN(y))A(2),y=0;M(y);break;case 7:M(null);break;case 8:M(!0);break;case 9:M(!1);break;default:return!1}return j(),!0}function x(){if(Q.getToken()!==10)return A(3,[],[2,5]),!1;if(b(!1),Q.getToken()===6){if(F(":"),j(),!i())A(4,[],[2,5])}else A(5,[],[2,5]);return $.pop(),!0}function E(){V(),j();let v=!1;while(Q.getToken()!==2&&Q.getToken()!==17){if(Q.getToken()===5){if(!v)A(4,[],[]);if(F(","),j(),Q.getToken()===2&&T)break}else if(v)A(6,[],[]);if(!x())A(4,[],[2,5]);v=!0}if(z(),Q.getToken()!==2)A(7,[2],[]);else j();return!0}function f(){_(),j();let v=!0,y=!1;while(Q.getToken()!==4&&Q.getToken()!==17){if(Q.getToken()===5){if(!y)A(4,[],[]);if(F(","),j(),Q.getToken()===4&&T)break}else if(y)A(6,[],[]);if(v)$.push(0),v=!1;else $[$.length-1]++;if(!i())A(4,[],[4,5]);y=!0}if(R(),!v)$.pop();if(Q.getToken()!==4)A(8,[4],[]);else j();return!0}function i(){switch(Q.getToken()){case 3:return f();case 1:return E();case 10:return b(!0);default:return O()}}if(j(),Q.getToken()===17){if(q.allowEmptyContent)return!0;return A(4,[],[]),!1}if(!i())return A(4,[],[]),!1;if(Q.getToken()!==17)A(9,[],[]);return!0}function n_(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 I6;var R3=B(()=>{Z8();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(I6||(I6={}))});function h$(Z,X,q,Q){let $=X.slice(),Y=z3(Z,[]),H=void 0,U=void 0;while($.length>0)if(U=$.pop(),H=X8(Y,$),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 f1(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 G=X8(H,[U]);if(G!==void 0)if(q===void 0){if(!G.parent)throw Error("Malformed AST");let W=H.children.indexOf(G.parent),V,L=G.parent.offset+G.parent.length;if(W>0){let z=H.children[W-1];V=z.offset+z.length}else if(V=H.offset+1,H.children.length>1)L=H.children[1].offset;return f1(Z,{offset:V,length:L-V,content:""},Q)}else return f1(Z,{offset:G.offset,length:G.length,content:JSON.stringify(q)},Q);else{if(q===void 0)return[];let W=`${JSON.stringify(U)}: ${JSON.stringify(q)}`,V=Q.getInsertionIndex?Q.getInsertionIndex(H.children.map((z)=>z.children[0].value)):H.children.length,L;if(V>0){let z=H.children[V-1];L={offset:z.offset+z.length,length:0,content:","+W}}else if(H.children.length===0)L={offset:H.offset+1,length:0,content:W};else L={offset:H.offset+1,length:0,content:W+","};return f1(Z,L,Q)}}else if(H.type==="array"&&typeof U==="number"&&Array.isArray(H.children)){let G=U;if(G===-1){let W=`${JSON.stringify(q)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:W};else{let L=H.children[H.children.length-1];V={offset:L.offset+L.length,length:0,content:","+W}}return f1(Z,V,Q)}else if(q===void 0&&H.children.length>=0){let W=U,V=H.children[W],L;if(H.children.length===1)L={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===W){let z=H.children[W-1],_=z.offset+z.length,R=H.offset+H.length;L={offset:_,length:R-2-_,content:""}}else L={offset:V.offset,length:H.children[W+1].offset-V.offset,content:""};return f1(Z,L,Q)}else if(q!==void 0){let W,V=`${JSON.stringify(q)}`;if(!Q.isArrayInsertion&&H.children.length>U){let L=H.children[U];W={offset:L.offset,length:L.length,content:V}}else if(H.children.length===0||U===0)W={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let L=U>H.children.length?H.children.length:U,z=H.children[L-1];W={offset:z.offset+z.length,length:0,content:","+V}}return f1(Z,W,Q)}else throw Error(`Can not ${q===void 0?"remove":Q.isArrayInsertion?"insert":"modify"} Array index ${G} as length is not sufficient`)}else throw Error(`Can not add ${typeof U!=="number"?"index":"property"} to parent of type ${H.type}`)}function f1(Z,X,q){if(!q.formattingOptions)return[X];let Q=q8(Z,X),$=X.offset,J=X.offset+X.content.length;if(X.length===0||X.content.length===0){while($>0&&!j6(Q,$-1))$--;while(J<Q.length&&!j6(Q,J))J++}let Y=B3(Q,{offset:$,length:J-$},{...q.formattingOptions,keepLines:!1});for(let U=Y.length-1;U>=0;U--){let G=Y[U];Q=q8(Q,G),$=Math.min($,G.offset),J=Math.max(J,G.offset+G.length),J+=G.content.length-G.length}let H=Z.length-(Q.length-J)-$;return[{offset:$,length:H,content:Q.substring($,J)}]}function q8(Z,X){return Z.substring(0,X.offset)+X.content+Z.substring(X.offset+X.length)}var f$=B(()=>{L3();R3()});function p$(Z,X,q,Q){return h$(Z,X,q,Q)}function d$(Z,X){let q=X.slice(0).sort(($,J)=>{let Y=$.offset-J.offset;if(Y===0)return $.length-J.length;return Y}),Q=Z.length;for(let $=q.length-1;$>=0;$--){let J=q[$];if(J.offset+J.length<=Q)Z=q8(Z,J);else throw Error("Overlapping edit");Q=J.offset}return Z}var g$,m$,M3,u$;var c$=B(()=>{L3();f$();Z8();R3();(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"})(g$||(g$={}));(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"})(m$||(m$={}));M3=b$;(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"})(u$||(u$={}))});function T0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var w6=()=>{};import{tracingChannel as o_,channel as s_}from"node:diagnostics_channel";var V0,O6,r_,F3=()=>V0.hasSubscribers||O6.hasSubscribers,n$,l$,t_=(Z,X,q,Q)=>{typeof l$.emitWarning=="function"?l$.emitWarning(Z,X,q,Q):console.error(`[${q}] ${X}: ${Z}`)},e_=(Z)=>!n$.has(Z),_1=(Z)=>!!Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),i$=(Z)=>_1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?Q8:null:null,Q8,ZR=class Z{heap;length;static#q=!1;static create(X){let q=i$(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]}},a$;var o$=B(()=>{V0=s_("lru-cache:metrics"),O6=o_("lru-cache"),r_=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,n$=new Set,l$=typeof process=="object"&&process?process:{},Q8=class extends Array{constructor(Z){super(Z),this.fill(0)}},a$=class Z{#q;#Q;#X;#Y;#K;#V;#A;#_;get perf(){return this.#_}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#H;#T;#U;#J;#Z;#L;#R;#B;#G;#j;#W;#I;#w;#M;#F;#O;#h;#z;#v;static unsafeExposeInternals(X){return{starts:X.#w,ttls:X.#M,autopurgeTimers:X.#F,sizes:X.#I,keyMap:X.#U,keyList:X.#J,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.#$(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:$=1,ttlAutopurge:J,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:U,dispose:G,onInsert:W,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:z,maxSize:_=0,maxEntrySize:R=0,sizeCalculation:M,fetchMethod:F,memoMethod:N,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:j,ignoreFetchAbort:A,backgroundFetchSize:b=1,perf:O}=X;if(this.backgroundFetchSize=b,O!==void 0&&typeof O?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#_=O??r_,q!==0&&!_1(q))throw TypeError("max option must be a nonnegative integer");let x=q?i$(q):Array;if(!x)throw Error("invalid max value: "+q);if(this.#q=q,this.#Q=_,this.maxEntrySize=R||this.#Q,this.sizeCalculation=M,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(N!==void 0&&typeof N!="function")throw TypeError("memoMethod must be a function if defined");if(this.#A=N,F!==void 0&&typeof F!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=F,this.#h=!!F,this.#U=new Map,this.#J=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=ZR.create(q),this.#H=0,this.#T=0,typeof G=="function"&&(this.#X=G),typeof W=="function"&&(this.#Y=W),typeof V=="function"?(this.#K=V,this.#W=[]):(this.#K=void 0,this.#W=void 0),this.#O=!!this.#X,this.#v=!!this.#Y,this.#z=!!this.#K,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!z,this.noDeleteOnFetchRejection=!!D,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!j,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#Q!==0&&!_1(this.#Q))throw TypeError("maxSize must be a positive integer if specified");if(!_1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#a()}if(this.allowStale=!!U,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=_1($)||$===0?$:1,this.ttlAutopurge=!!J,this.ttl=Q||0,this.ttl){if(!_1(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 E="LRU_CACHE_UNBOUNDED";e_(E)&&(n$.add(E),t_("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",E,Z))}}getRemainingTTL(X){return this.#U.has(X)?1/0:0}#u(){let X=new Q8(this.#q),q=new Q8(this.#q);this.#M=X,this.#w=q;let Q=this.ttlAutopurge?Array.from({length:this.#q}):void 0;this.#F=Q,this.#p=(U,G,W=this.#_.now())=>{q[U]=G!==0?W:0,X[U]=G,$(U,G)},this.#y=(U)=>{q[U]=X[U]!==0?this.#_.now():0,$(U,X[U])};let $=this.ttlAutopurge?(U,G)=>{if(Q?.[U]&&(clearTimeout(Q[U]),Q[U]=void 0),G&&G!==0&&Q){let W=setTimeout(()=>{this.#D(U)?(this.#x(this.#J[U],"expire"),Q[U]=void 0):$(U,H(U))},G+1);W.unref&&W.unref(),Q[U]=W}}:()=>{};this.#P=(U,G)=>{if(X[G]){let W=X[G],V=q[G];if(!W||!V)return;U.ttl=W,U.start=V,U.now=J||Y();let L=U.now-V;U.remainingTTL=W-L}};let J=0,Y=()=>{let U=this.#_.now();if(this.ttlResolution>0){J=U;let G=setTimeout(()=>J=0,this.ttlResolution);G.unref&&G.unref()}return U};this.getRemainingTTL=(U)=>{let G=this.#U.get(U);return G===void 0?0:H(G)};let H=(U)=>{let G=X[U],W=q[U];if(!G||!W)return 1/0;let V=(J||Y())-W;return G-V};this.#D=(U)=>{let G=q[U],W=X[U];return!!W&&!!G&&(J||Y())-G>W}}#y=()=>{};#P=()=>{};#p=()=>{};#D=()=>!1;#a(){let X=new Q8(this.#q);this.#T=0,this.#I=X,this.#C=(q)=>{this.#T-=X[q],X[q]=0},this.#d=(q,Q,$,J)=>{if(!_1($)){if(this.#$(Q))return this.backgroundFetchSize;if(J){if(typeof J!="function")throw TypeError("sizeCalculation must be a function");if($=J(Q,q),!_1($))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 $},this.#f=(q,Q,$)=>{if(X[q]=Q,this.#Q){let J=this.#Q-X[q];for(;this.#T>J;)this.#g(!0)}this.#T+=X[q],$&&($.entrySize=Q,$.totalCalculatedSize=this.#T)}}#C=(X)=>{};#f=(X,q,Q)=>{};#d=(X,q,Q,$)=>{if(Q||$)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.#J[X])===X}*entries(){for(let X of this.#k())this.#Z[X]!==void 0&&this.#J[X]!==void 0&&!this.#$(this.#Z[X])&&(yield[this.#J[X],this.#Z[X]])}*rentries(){for(let X of this.#N())this.#Z[X]!==void 0&&this.#J[X]!==void 0&&!this.#$(this.#Z[X])&&(yield[this.#J[X],this.#Z[X]])}*keys(){for(let X of this.#k()){let q=this.#J[X];q!==void 0&&!this.#$(this.#Z[X])&&(yield q)}}*rkeys(){for(let X of this.#N()){let q=this.#J[X];q!==void 0&&!this.#$(this.#Z[X])&&(yield q)}}*values(){for(let X of this.#k())this.#Z[X]!==void 0&&!this.#$(this.#Z[X])&&(yield this.#Z[X])}*rvalues(){for(let X of this.#N())this.#Z[X]!==void 0&&!this.#$(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 $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;if(J!==void 0&&X(J,this.#J[Q],this))return this.#S(this.#J[Q],q)}}forEach(X,q=this){for(let Q of this.#k()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;J!==void 0&&X.call(q,J,this.#J[Q],this)}}rforEach(X,q=this){for(let Q of this.#N()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;J!==void 0&&X.call(q,J,this.#J[Q],this)}}purgeStale(){let X=!1;for(let q of this.#N({allowStale:!0}))this.#D(q)&&(this.#x(this.#J[q],"expire"),X=!0);return X}info(X){let q=this.#U.get(X);if(q===void 0)return;let Q=this.#Z[q],$=this.#$(Q)?Q.__staleWhileFetching:Q;if($===void 0)return;let J={value:$};if(this.#M&&this.#w){let Y=this.#M[q],H=this.#w[q];if(Y&&H){let U=Y-(this.#_.now()-H);J.ttl=U,J.start=Date.now()}}return this.#I&&(J.size=this.#I[q]),J}dump(){let X=[];for(let q of this.#k({allowStale:!0})){let Q=this.#J[q],$=this.#Z[q],J=this.#$($)?$.__staleWhileFetching:$;if(J===void 0||Q===void 0)continue;let Y={value:J};if(this.#M&&this.#w){Y.ttl=this.#M[q];let H=this.#_.now()-this.#w[q];Y.start=Math.floor(Date.now()-H)}this.#I&&(Y.size=this.#I[q]),X.unshift([Q,Y])}return X}load(X){this.clear();for(let[q,Q]of X){if(Q.start){let $=Date.now()-Q.start;Q.start=this.#_.now()-$}this.#E(q,Q.value,Q)}}set(X,q,Q={}){let{status:$=V0.hasSubscribers?{}:void 0}=Q;Q.status=$,$&&($.op="set",$.key=X,q!==void 0&&($.value=q),$.cache=this);let J=this.#E(X,q,Q);return $&&V0.hasSubscribers&&V0.publish($),J}#E(X,q,Q,$){let{ttl:J=this.ttl,start:Y,noDisposeOnSet:H=this.noDisposeOnSet,sizeCalculation:U=this.sizeCalculation,status:G}=Q,W=this.#$(q);if(q===void 0)return G&&(G.set="deleted"),this.delete(X),this;let{noUpdateTTL:V=this.noUpdateTTL}=Q;G&&!W&&(G.value=q);let L=this.#d(X,q,Q.size||0,U,G);if(this.maxEntrySize&&L>this.maxEntrySize)return this.#x(X,"set"),G&&(G.set="miss",G.maxEntrySizeExceeded=!0),this;let z=this.#H===0?void 0:this.#U.get(X);if(z===void 0)z=this.#H===0?this.#G:this.#j.length!==0?this.#j.pop():this.#H===this.#q?this.#g(!1):this.#H,this.#J[z]=X,this.#Z[z]=q,this.#U.set(X,z),this.#L[this.#G]=z,this.#R[z]=this.#G,this.#G=z,this.#H++,this.#f(z,L,G),G&&(G.set="add"),V=!1,this.#v&&!W&&this.#Y?.(q,X,"add");else{this.#b(z);let _=this.#Z[z];if(q!==_){if(!H)if(this.#$(_)){_!==$&&_.__abortController.abort(Error("replaced"));let{__staleWhileFetching:R}=_;R!==void 0&&R!==q&&(this.#O&&this.#X?.(R,X,"set"),this.#z&&this.#W?.push([R,X,"set"]))}else this.#O&&this.#X?.(_,X,"set"),this.#z&&this.#W?.push([_,X,"set"]);if(this.#C(z),this.#f(z,L,G),this.#Z[z]=q,!W){let R=_&&this.#$(_)?_.__staleWhileFetching:_,M=R===void 0?"add":q!==R?"replace":"update";G&&(G.set=M,R!==void 0&&(G.oldValue=R)),this.#v&&this.onInsert?.(q,X,M)}}else W||(G&&(G.set="update"),this.#v&&this.onInsert?.(q,X,"update"))}if(J!==0&&!this.#M&&this.#u(),this.#M&&(V||this.#p(z,J,Y),G&&this.#P(G,z)),!H&&this.#z&&this.#W){let _=this.#W,R;for(;R=_?.shift();)this.#K?.(...R)}return this}pop(){try{for(;this.#H;){let X=this.#Z[this.#B];if(this.#g(!0),this.#$(X)){if(X.__staleWhileFetching)return X.__staleWhileFetching}else if(X!==void 0)return X}}finally{if(this.#z&&this.#W){let X=this.#W,q;for(;q=X?.shift();)this.#K?.(...q)}}}#g(X){let q=this.#B,Q=this.#J[q],$=this.#Z[q],J=this.#$($);J&&$.__abortController.abort(Error("evicted"));let Y=J?$.__staleWhileFetching:$;return(this.#O||this.#z)&&Y!==void 0&&(this.#O&&this.#X?.(Y,Q,"evict"),this.#z&&this.#W?.push([Y,Q,"evict"])),this.#C(q),this.#F?.[q]&&(clearTimeout(this.#F[q]),this.#F[q]=void 0),X&&(this.#J[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=V0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="has",Q.key=X,Q.cache=this);let $=this.#o(X,q);return V0.hasSubscribers&&V0.publish(Q),$}#o(X,q={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:$}=q,J=this.#U.get(X);if(J!==void 0){let Y=this.#Z[J];if(this.#$(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D(J))$&&($.has="stale",this.#P($,J));else return Q&&this.#y(J),$&&($.has="hit",this.#P($,J)),!0}else $&&($.has="miss");return!1}peek(X,q={}){let{status:Q=F3()?{}:void 0}=q;Q&&(Q.op="peek",Q.key=X,Q.cache=this),q.status=Q;let $=this.#s(X,q);return V0.hasSubscribers&&V0.publish(Q),$}#s(X,q){let{status:Q,allowStale:$=this.allowStale}=q,J=this.#U.get(X);if(J===void 0||!$&&this.#D(J)){Q&&(Q.peek=J===void 0?"miss":"stale");return}let Y=this.#Z[J],H=this.#$(Y)?Y.__staleWhileFetching:Y;return Q&&(H!==void 0?(Q.peek="hit",Q.value=H):Q.peek="miss"),H}#m(X,q,Q,$){let J=q===void 0?void 0:this.#Z[q];if(this.#$(J))return J;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:$},G=(R,M=!1)=>{let{aborted:F}=Y.signal,N=Q.ignoreFetchAbort&&R!==void 0,D=Q.ignoreFetchAbort||!!(Q.allowStaleOnFetchAbort&&R!==void 0);if(Q.status&&(F&&!M?(Q.status.fetchAborted=!0,Q.status.fetchError=Y.signal.reason,N&&(Q.status.fetchAbortIgnored=!0)):Q.status.fetchResolved=!0),F&&!N&&!M)return V(Y.signal.reason,D);let w=z,T=this.#Z[q];return(T===z||T===void 0&&N&&M)&&(R===void 0?w.__staleWhileFetching!==void 0?this.#Z[q]=w.__staleWhileFetching:this.#x(X,"fetch"):(Q.status&&(Q.status.fetchUpdated=!0),this.#E(X,R,U.options,w))),R},W=(R)=>(Q.status&&(Q.status.fetchRejected=!0,Q.status.fetchError=R),V(R,!1)),V=(R,M)=>{let{aborted:F}=Y.signal,N=F&&Q.allowStaleOnFetchAbort,D=N||Q.allowStaleOnFetchRejection,w=D||Q.noDeleteOnFetchRejection,T=z;if(this.#Z[q]===z&&(!w||!M&&T.__staleWhileFetching===void 0?this.#x(X,"fetch"):N||(this.#Z[q]=T.__staleWhileFetching)),D)return Q.status&&T.__staleWhileFetching!==void 0&&(Q.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw R},L=(R,M)=>{let F=this.#V?.(X,J,U);Y.signal.addEventListener("abort",()=>{(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort)&&(R(void 0),Q.allowStaleOnFetchAbort&&(R=(N)=>G(N,!0)))}),F&&F instanceof Promise?F.then((N)=>R(N===void 0?void 0:N),M):F!==void 0&&R(F)};Q.status&&(Q.status.fetchDispatched=!0);let z=new Promise(L).then(G,W),_=Object.assign(z,{__abortController:Y,__staleWhileFetching:J,__returned:void 0});return q===void 0?(this.#E(X,_,{...U.options,status:void 0}),q=this.#U.get(X)):this.#Z[q]=_,_}#$(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=O6.hasSubscribers,{status:$=F3()?{}:void 0}=q;q.status=$,$&&q.context&&($.context=q.context);let J=this.#l(X,q);return $&&Q&&($.trace=!0,O6.tracePromise(()=>J,$).catch(()=>{})),J}async#l(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:$=this.updateAgeOnGet,noDeleteOnStaleGet:J=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:U=0,sizeCalculation:G=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:z=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:R,forceRefresh:M=!1,status:F,signal:N}=q;if(F&&(F.op="fetch",F.key=X,M&&(F.forceRefresh=!0),F.cache=this),!this.#h)return F&&(F.fetch="get"),this.#S(X,{allowStale:Q,updateAgeOnGet:$,noDeleteOnStaleGet:J,status:F});let D={allowStale:Q,updateAgeOnGet:$,noDeleteOnStaleGet:J,ttl:Y,noDisposeOnSet:H,size:U,sizeCalculation:G,noUpdateTTL:W,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:_,ignoreFetchAbort:z,status:F,signal:N},w=this.#U.get(X);if(w===void 0){F&&(F.fetch="miss");let T=this.#m(X,w,D,R);return T.__returned=T}else{let T=this.#Z[w];if(this.#$(T)){let O=Q&&T.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",O&&(F.returnedStale=!0)),O?T.__staleWhileFetching:T.__returned=T}let j=this.#D(w);if(!M&&!j)return F&&(F.fetch="hit"),this.#b(w),$&&this.#y(w),F&&this.#P(F,w),T;let A=this.#m(X,w,D,R),b=A.__staleWhileFetching!==void 0&&Q;return F&&(F.fetch=j?"stale":"refresh",b&&j&&(F.returnedStale=!0)),b?A.__staleWhileFetching:A.__returned=A}}forceFetch(X,q={}){let Q=O6.hasSubscribers,{status:$=F3()?{}:void 0}=q;q.status=$,$&&q.context&&($.context=q.context);let J=this.#r(X,q);return $&&Q&&($.trace=!0,O6.tracePromise(()=>J,$).catch(()=>{})),J}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=V0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="memo",Q.key=X,q.context&&(Q.context=q.context),Q.cache=this);let $=this.#t(X,q);return Q&&(Q.value=$),V0.hasSubscribers&&V0.publish(Q),$}#t(X,q={}){let Q=this.#A;if(!Q)throw Error("no memoMethod provided to constructor");let{context:$,status:J,forceRefresh:Y,...H}=q;J&&Y&&(J.forceRefresh=!0);let U=this.#S(X,H),G=Y||U===void 0;if(J&&(J.memo=G?"miss":"hit",G||(J.value=U)),!G)return U;let W=Q(X,U,{options:H,context:$});return J&&(J.value=W),this.#E(X,W,H),W}get(X,q={}){let{status:Q=V0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="get",Q.key=X,Q.cache=this);let $=this.#S(X,q);return Q&&($!==void 0&&(Q.value=$),V0.hasSubscribers&&V0.publish(Q)),$}#S(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:$=this.updateAgeOnGet,noDeleteOnStaleGet:J=this.noDeleteOnStaleGet,status:Y}=q,H=this.#U.get(X);if(H===void 0){Y&&(Y.get="miss");return}let U=this.#Z[H],G=this.#$(U);return Y&&this.#P(Y,H),this.#D(H)?G?(Y&&(Y.get="stale-fetching"),Q&&U.__staleWhileFetching!==void 0?(Y&&(Y.returnedStale=!0),U.__staleWhileFetching):void 0):(J||this.#x(X,"expire"),Y&&(Y.get="stale"),Q?(Y&&(Y.returnedStale=!0),U):void 0):(Y&&(Y.get=G?"fetching":"hit"),this.#b(H),$&&this.#y(H),G?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){V0.hasSubscribers&&V0.publish({op:"delete",delete:q,key:X,cache:this});let Q=!1;if(this.#H!==0){let $=this.#U.get(X);if($!==void 0)if(this.#F?.[$]&&(clearTimeout(this.#F[$]),this.#F[$]=void 0),Q=!0,this.#H===1)this.#i(q);else{this.#C($);let J=this.#Z[$];if(this.#$(J)?J.__abortController.abort(Error("deleted")):(this.#O||this.#z)&&(this.#O&&this.#X?.(J,X,q),this.#z&&this.#W?.push([J,X,q])),this.#U.delete(X),this.#J[$]=void 0,this.#Z[$]=void 0,$===this.#G)this.#G=this.#R[$];else if($===this.#B)this.#B=this.#L[$];else{let Y=this.#R[$];this.#L[Y]=this.#L[$];let H=this.#L[$];this.#R[H]=this.#R[$]}this.#H--,this.#j.push($)}}if(this.#z&&this.#W?.length){let $=this.#W,J;for(;J=$?.shift();)this.#K?.(...J)}return Q}clear(){return this.#i("delete")}#i(X){for(let q of this.#N({allowStale:!0})){let Q=this.#Z[q];if(this.#$(Q))Q.__abortController.abort(Error("deleted"));else{let $=this.#J[q];this.#O&&this.#X?.(Q,$,X),this.#z&&this.#W?.push([Q,$,X])}}if(this.#U.clear(),this.#Z.fill(void 0),this.#J.fill(void 0),this.#M&&this.#w){this.#M.fill(0),this.#w.fill(0);for(let q of this.#F??[])q!==void 0&&clearTimeout(q);this.#F?.fill(void 0)}if(this.#I&&this.#I.fill(0),this.#B=0,this.#G=0,this.#j.length=0,this.#T=0,this.#H=0,this.#z&&this.#W){let q=this.#W,Q;for(;Q=q?.shift();)this.#K?.(...Q)}}}});function Sy(Z,X=300000){let q=new Map,Q=new Map,$=async(...J)=>{let Y=m(J),H=q.get(Y),U=Date.now();if(!H){let G=Q.get(Y);if(G)return G;let W=Z(...J);Q.set(Y,W);try{let V=await W;if(Q.get(Y)===W)q.set(Y,{value:V,timestamp:U,refreshing:!1});return V}finally{if(Q.get(Y)===W)Q.delete(Y)}}if(H&&U-H.timestamp>X&&!H.refreshing){H.refreshing=!0;let G=H;return Z(...J).then((W)=>{if(q.get(Y)===G)q.set(Y,{value:W,timestamp:Date.now(),refreshing:!1})}).catch((W)=>{if(S(W),q.get(Y)===G)q.delete(Y)}),H.value}return q.get(Y).value};return $.cache={clear:()=>{q.clear(),Q.clear()}},$}function R1(Z,X,q=100){let Q=new a$({max:q}),$=(...J)=>{let Y=X(...J),H=Q.get(Y);if(H!==void 0)return H;let U=Z(...J);return Q.set(Y,U),U};return $.cache={clear:()=>Q.clear(),size:()=>Q.size,delete:(J)=>Q.delete(J),get:(J)=>Q.peek(J),has:(J)=>Q.has(J)},$}var $8=B(()=>{o$();k0();M0()});import{open as XR,readFile as qR,stat as QR}from"fs/promises";function r$(Z,X){try{return{ok:!0,value:JSON.parse(T0(Z))}}catch(q){if(X)S(q);return{ok:!1}}}function dy(Z){if(!Z)return null;try{return M3(T0(Z))}catch(X){return S(X),null}}function JR(Z){let X=t$,q=Z.length,Q=X(Z);if(!Q.error||Q.done||Q.read>=q)return Q.values;let{values:$,read:J}=Q;while(J<q){let Y=typeof Z==="string"?Z.indexOf(`
|
|
16
|
+
`,J):Z.indexOf(10,J);if(Y===-1)break;J=Y+1;let H=X(Z,J);if(H.values.length>0)$=$.concat(H.values);if(!H.error||H.done||H.read>=q)break;J=H.read}return $}function YR(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 $=Z.indexOf(10,q);if($===-1)$=X;let J=Z.toString("utf8",q,$).trim();if(q=$+1,!J)continue;try{Q.push(JSON.parse(J))}catch{}}return Q}function HR(Z){let X=T0(Z),q=X.length,Q=0,$=[];while(Q<q){let J=X.indexOf(`
|
|
17
|
+
`,Q);if(J===-1)J=q;let Y=X.substring(Q,J).trim();if(Q=J+1,!Y)continue;try{$.push(JSON.parse(Y))}catch{}}return $}function D3(Z){if(t$)return JR(Z);if(typeof Z==="string")return HR(Z);return YR(Z)}async function cy(Z){let H=[];try{let{size:X}=await QR(Z);if(X<=k6)return D3(await qR(Z));const q=F2(H,await XR(Z,"r"),1);let Q=Buffer.allocUnsafe(k6);let $=0;let J=X-k6;while($<k6){let{bytesRead:L}=await q.read(Q,$,k6-$,J+$);if(L===0)break;$+=L}let Y=Q.indexOf(10);if(Y!==-1&&Y<$-1)return D3(Q.subarray(Y+1,$));return D3(Q.subarray(0,$))}catch(U){var G=U,W=1}finally{var V=D2(H,G,W);V&&await V}}function ly(Z,X){try{if(!Z||Z.trim()==="")return m([X],null,4);let q=T0(Z),Q=M3(q);if(Array.isArray(Q)){let $=Q.length,H=p$(q,$===0?[0]:[$],X,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let U=[...Q,X];return m(U,null,4)}return d$(q,H)}else return m([X],null,4)}catch(q){return S(q),m([X],null,4)}}var $R=8192,s$,N0,t$,k6=104857600;var N6=B(()=>{c$();w6();k0();$8();M0();s$=R1(r$,(Z)=>Z,50),N0=Object.assign(function(X,q=!0){if(!X)return null;let Q=X.length>$R?r$(X,q):s$(X,q);return Q.ok?Q.value:null},{cache:s$.cache});t$=(()=>{if(typeof Bun>"u")return!1;let X=Bun.JSONL;if(!X?.parseChunk)return!1;return X.parseChunk})()});import{realpathSync as KR}from"fs";function e$(){return process.versions.bun!==void 0}function oy(){let Z=process.argv[1]||"";if(Z&&!UR.test(Z))return Z;let X=process.execPath||"";if(!X)return Z;try{return KR(X)}catch{return X}}function sy(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var UR;var ZJ=B(()=>{UR=/(^|[/\\])(\$bunfs|~BUN)[/\\]/i});function e(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 Z1=()=>{};import{fileURLToPath as GR}from"node:url";var A2=(Z,X)=>{let q=T3(WR(Z));if(typeof q!=="string")throw TypeError(`${X} must be a string or a file URL: ${q}.`);return q},WR=(Z)=>A3(Z)?Z.toString():Z,A3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,T3=(Z)=>Z instanceof URL?GR(Z):Z;var T2=()=>{};var J8=(Z,X=[],q={})=>{let Q=A2(Z,"First argument"),[$,J]=e(X)?[[],X]:[X,q];if(!Array.isArray($))throw TypeError(`Second argument must be either an array of arguments or an options object: ${$}`);if($.some((U)=>typeof U==="object"&&U!==null))throw TypeError(`Second argument must be an array of strings: ${$}`);let Y=$.map(String),H=Y.find((U)=>U.includes("\x00"));if(H!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${H}`);if(!e(J))throw TypeError(`Last argument must be an options object: ${J}`);return[Q,Y,{__proto__:null,...J}]};var j3=B(()=>{Z1();T2()});import{StringDecoder as VR}from"node:string_decoder";var XJ,qJ=(Z)=>XJ.call(Z)==="[object ArrayBuffer]",q0=(Z)=>XJ.call(Z)==="[object Uint8Array]",X1=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),BR,QJ=(Z)=>BR.encode(Z),LR,Y8=(Z)=>LR.decode(Z),$J=(Z,X)=>{return zR(Z,X).join("")},zR=(Z,X)=>{if(X==="utf8"&&Z.every((J)=>typeof J==="string"))return Z;let q=new VR(X),Q=Z.map((J)=>typeof J==="string"?QJ(J):J).map((J)=>q.write(J)),$=q.end();return $===""?Q:[...Q,$]},x6=(Z)=>{if(Z.length===1&&q0(Z[0]))return Z[0];return I3(_R(Z))},_R=(Z)=>Z.map((X)=>typeof X==="string"?QJ(X):X),I3=(Z)=>{let X=new Uint8Array(RR(Z)),q=0;for(let Q of Z)X.set(Q,q),q+=Q.length;return X},RR=(Z)=>{let X=0;for(let q of Z)X+=q.length;return X};var j0=B(()=>{({toString:XJ}=Object.prototype),BR=new TextEncoder,LR=new TextDecoder});import{ChildProcess as MR}from"node:child_process";var KJ=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),UJ=(Z,X)=>{let q=[];for(let[J,Y]of Z.entries())q=FR({templates:Z,expressions:X,tokens:q,index:J,template:Y});if(q.length===0)throw TypeError("Template script must not be empty");let[Q,...$]=q;return[Q,$,{}]},FR=({templates:Z,expressions:X,tokens:q,index:Q,template:$})=>{if($===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[Q]}`);let{nextTokens:J,leadingWhitespaces:Y,trailingWhitespaces:H}=DR($,Z.raw[Q]),U=YJ(q,J,Y);if(Q===X.length)return U;let G=X[Q],W=Array.isArray(G)?G.map((V)=>HJ(V)):[HJ(G)];return YJ(U,W,H)},DR=(Z,X)=>{if(X.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let q=[],Q=0,$=JJ.has(X[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let U=X[H];if(JJ.has(U)){if(Q!==Y)q.push(Z.slice(Q,Y));Q=Y+1}else if(U==="\\"){let G=X[H+1];if(G===`
|
|
18
|
+
`)Y-=1,H+=1;else if(G==="u"&&X[H+2]==="{")H=X.indexOf("}",H+3);else H+=AR[G]??1}}let J=Q===Z.length;if(!J)q.push(Z.slice(Q));return{nextTokens:q,leadingWhitespaces:$,trailingWhitespaces:J}},JJ,AR,YJ=(Z,X,q)=>q||Z.length===0||X.length===0?[...Z,...X]:[...Z.slice(0,-1),`${Z.at(-1)}${X[0]}`,...X.slice(1)],HJ=(Z)=>{let X=typeof Z;if(X==="string")return Z;if(X==="number")return String(Z);if(e(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return TR(Z);if(Z instanceof MR||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`)},TR=({stdout:Z})=>{if(typeof Z==="string")return Z;if(q0(Z))return Y8(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 GJ=B(()=>{Z1();j0();JJ=new Set([" ","\t","\r",`
|
|
19
|
+
`]),AR={x:3,u:5}});import w3 from"node:process";var b0=(Z)=>H8.includes(Z),H8,x0,K8=(Z)=>x0[Z]??`stdio[${Z}]`;var q1=B(()=>{H8=[w3.stdin,w3.stdout,w3.stderr],x0=["stdin","stdout","stderr"]});import{debuglog as jR}from"node:util";var VJ=(Z)=>{let X={...Z};for(let q of N3)X[q]=O3(Z,q);return X},O3=(Z,X)=>{let q=IR(Z),Q=Array.from({length:q+1}),$=wR(Z[X],Q,X,q);return PR($,X)},IR=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,x0.length):x0.length,wR=(Z,X,q,Q)=>e(Z)?OR(Z,X,q,Q):X.fill(Z),OR=(Z,X,q,Q)=>{for(let $ of Object.keys(Z).sort(kR))for(let J of NR($,q,Q))X[J]=Z[$];return X},kR=(Z,X)=>WJ(Z)<WJ(X)?1:-1,WJ=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},NR=(Z,X,q)=>{if(Z==="ipc")return[q];let Q=k3(Z);if(Q===void 0||Q===0)throw TypeError(`"${X}.${Z}" is invalid.
|
|
20
|
+
It must be "${X}.stdout", "${X}.stderr", "${X}.all", "${X}.ipc", or "${X}.fd3", "${X}.fd4" (and so on).`);if(Q!=="all"&&Q>=q)throw TypeError(`"${X}.${Z}" is invalid: that file descriptor does not exist.
|
|
21
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);return Q==="all"?[1,2]:[Q]},k3=(Z)=>{if(Z==="all")return Z;if(x0.includes(Z))return x0.indexOf(Z);let X=xR.exec(Z);if(X!==null)return Number(X.groups.fdNumber)},xR,PR=(Z,X)=>Z.map((q)=>q===void 0?vR[X]:q),ER,vR,N3,Q1=(Z,X)=>X==="ipc"?Z.at(-1):Z[X];var $1=B(()=>{Z1();q1();xR=/^fd(?<fdNumber>\d+)$/,ER=jR("execa").enabled?"full":"none",vR={lines:!1,buffer:!0,maxBuffer:1e8,verbose:ER,stripFinalNewline:!0},N3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var j2=({verbose:Z},X)=>x3(Z,X)!=="none",I2=({verbose:Z},X)=>!["none","short"].includes(x3(Z,X)),BJ=({verbose:Z},X)=>{let q=x3(Z,X);return U8(q)?q:void 0},x3=(Z,X)=>X===void 0?yR(Z):Q1(Z,X),yR=(Z)=>Z.find((X)=>U8(X))??G8.findLast((X)=>Z.includes(X)),U8=(Z)=>typeof Z==="function",G8;var M1=B(()=>{$1();G8=["none","short","full"]});import{platform as CR}from"node:process";import{stripVTControlCharacters as SR}from"node:util";var LJ=(Z,X)=>{let q=[Z,...X],Q=q.join(" "),$=q.map((J)=>uR(zJ(J))).join(" ");return{command:Q,escapedCommand:$}},P6=(Z)=>SR(Z).split(`
|
|
22
|
+
`).map((X)=>zJ(X)).join(`
|
|
23
|
+
`),zJ=(Z)=>Z.replaceAll(fR,(X)=>bR(X)),bR=(Z)=>{let X=gR[Z];if(X!==void 0)return X;let q=Z.codePointAt(0),Q=q.toString(16);return q<=mR?`\\u${Q.padStart(4,"0")}`:`\\U${Q}`},hR=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},fR,gR,mR=65535,uR=(Z)=>{if(pR.test(Z))return Z;return CR==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},pR;var W8=B(()=>{fR=hR(),gR={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},pR=/^[\w\-./]+$/});import _J from"node:process";function P3(){let{env:Z}=_J,{TERM:X,TERM_PROGRAM:q}=Z;if(_J.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 RJ=()=>{};var MJ,FJ,dR,cR,lR,nR,iR,V8,IC;var DJ=B(()=>{RJ();MJ={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:"╱"},FJ={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:"⅒"},dR={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"},cR={...MJ,...FJ},lR={...MJ,...dR},nR=P3(),iR=nR?cR:lR,V8=iR,IC=Object.entries(FJ)});import aR from"node:tty";var oR,C=(Z,X)=>{if(!oR)return($)=>$;let q=`\x1B[${Z}m`,Q=`\x1B[${X}m`;return($)=>{let J=$+"",Y=J.indexOf(Q);if(Y===-1)return q+J+Q;let H=q,U=0,W=(X===22?Q:"")+q;while(Y!==-1)H+=J.slice(U,Y)+W,U=Y+Q.length,Y=J.indexOf(Q,U);return H+=J.slice(U)+Q,H}},kC,AJ,NC,xC,PC,EC,vC,yC,CC,SC,bC,hC,fC,gC,mC,uC,pC,B8,dC,cC,lC,nC,iC,aC,oC,sC,rC,TJ,tC,jJ,eC,ZS,XS,qS,QS,$S,JS,YS,HS,KS,US;var IJ=B(()=>{oR=aR?.WriteStream?.prototype?.hasColors?.()??!1,kC=C(0,0),AJ=C(1,22),NC=C(2,22),xC=C(3,23),PC=C(4,24),EC=C(53,55),vC=C(7,27),yC=C(8,28),CC=C(9,29),SC=C(30,39),bC=C(31,39),hC=C(32,39),fC=C(33,39),gC=C(34,39),mC=C(35,39),uC=C(36,39),pC=C(37,39),B8=C(90,39),dC=C(40,49),cC=C(41,49),lC=C(42,49),nC=C(43,49),iC=C(44,49),aC=C(45,49),oC=C(46,49),sC=C(47,49),rC=C(100,49),TJ=C(91,39),tC=C(92,39),jJ=C(93,39),eC=C(94,39),ZS=C(95,39),XS=C(96,39),qS=C(97,39),QS=C(101,49),$S=C(102,49),JS=C(103,49),YS=C(104,49),HS=C(105,49),KS=C(106,49),US=C(107,49)});var wJ=B(()=>{IJ()});var NJ=({type:Z,message:X,timestamp:q,piped:Q,commandId:$,result:{failed:J=!1}={},options:{reject:Y=!0}})=>{let H=sR(q),U=rR[Z]({failed:J,reject:Y,piped:Q}),G=tR[Z]({reject:Y});return`${B8(`[${H}]`)} ${B8(`[${$}]`)} ${G(U)} ${G(X)}`},sR=(Z)=>`${L8(Z.getHours(),2)}:${L8(Z.getMinutes(),2)}:${L8(Z.getSeconds(),2)}.${L8(Z.getMilliseconds(),3)}`,L8=(Z,X)=>String(Z).padStart(X,"0"),OJ=({failed:Z,reject:X})=>{if(!Z)return V8.tick;return X?V8.cross:V8.warning},rR,kJ=(Z)=>Z,tR;var xJ=B(()=>{DJ();wJ();rR={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:OJ,duration:OJ},tR={command:()=>AJ,output:()=>kJ,ipc:()=>kJ,error:({reject:Z})=>Z?TJ:jJ,duration:()=>B8}});var PJ=(Z,X,q)=>{let Q=BJ(X,q);return Z.map(({verboseLine:$,verboseObject:J})=>eR($,J,Q)).filter(($)=>$!==void 0).map(($)=>ZM($)).join("")},eR=(Z,X,q)=>{if(q===void 0)return Z;let Q=q(Z,X);if(typeof Q==="string")return Q},ZM=(Z)=>Z.endsWith(`
|
|
24
|
+
`)?Z:`${Z}
|
|
25
|
+
`;var EJ=B(()=>{M1()});import{inspect as XM}from"node:util";var l0=({type:Z,verboseMessage:X,fdNumber:q,verboseInfo:Q,result:$})=>{let J=qM({type:Z,result:$,verboseInfo:Q}),Y=QM(X,J),H=PJ(Y,Q,q);if(H!=="")console.warn(H.slice(0,-1))},qM=({type:Z,result:X,verboseInfo:q})=>{let{escapedCommand:Q,commandId:$,rawOptions:J}=q,{piped:Y=!1,...H}=J;return{type:Z,escapedCommand:Q,commandId:`${$}`,timestamp:new Date,piped:Y,result:X,options:H}},QM=(Z,X)=>Z.split(`
|
|
26
|
+
`).map((q)=>$M({...X,message:q})),$M=(Z)=>{return{verboseLine:NJ(Z),verboseObject:Z}},z8=(Z)=>{let X=typeof Z==="string"?Z:XM(Z);return P6(X).replaceAll("\t",()=>" ".repeat(JM))},JM=2;var w2=B(()=>{W8();xJ();EJ()});var vJ=(Z,X)=>{if(!j2(X))return;l0({type:"command",verboseMessage:Z,verboseInfo:X})};var yJ=B(()=>{M1();w2()});var CJ=(Z,X,q)=>{KM(Z);let Q=YM(Z);return{verbose:Z,escapedCommand:X,commandId:Q,rawOptions:q}},YM=(Z)=>j2({verbose:Z})?HM++:void 0,HM=0n,KM=(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(!G8.includes(X)&&!U8(X)){let q=G8.map((Q)=>`'${Q}'`).join(", ");throw TypeError(`The "verbose" option must not be ${X}. Allowed values are: ${q} or a function.`)}}};var SJ=B(()=>{M1()});import{hrtime as bJ}from"node:process";var _8=()=>bJ.bigint(),E3=(Z)=>Number(bJ.bigint()-Z)/1e6;var R8=()=>{};var M8=(Z,X,q)=>{let Q=_8(),{command:$,escapedCommand:J}=LJ(Z,X),Y=O3(q,"verbose"),H=CJ(Y,J,{...q});return vJ(J,H),{command:$,escapedCommand:J,startTime:Q,verboseInfo:H}};var v3=B(()=>{yJ();SJ();R8();W8();$1()});function F8(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 hJ=()=>{};var fJ=()=>{};import{promisify as UM}from"node:util";import{execFile as GM,execFileSync as uS}from"node:child_process";import gJ from"node:path";import{fileURLToPath as WM}from"node:url";function D8(Z){return Z instanceof URL?WM(Z):Z}function mJ(Z){return{*[Symbol.iterator](){let X=gJ.resolve(D8(Z)),q;while(q!==X)yield X,q=X,X=gJ.resolve(X,"..")}}}var cS;var uJ=B(()=>{fJ();cS=UM(GM)});import A8 from"node:process";import g1 from"node:path";var VM=({cwd:Z=A8.cwd(),path:X=A8.env[F8()],preferLocal:q=!0,execPath:Q=A8.execPath,addExecPath:$=!0}={})=>{let J=g1.resolve(D8(Z)),Y=[],H=X.split(g1.delimiter);if(q)BM(Y,H,J);if($)LM(Y,H,Q,J);return X===""||X===g1.delimiter?`${Y.join(g1.delimiter)}${X}`:[...Y,X].join(g1.delimiter)},BM=(Z,X,q)=>{for(let Q of mJ(q)){let $=g1.join(Q,"node_modules/.bin");if(!X.includes($))Z.push($)}},LM=(Z,X,q,Q)=>{let $=g1.resolve(Q,D8(q),"..");if(!X.includes($))Z.push($)},pJ=({env:Z=A8.env,...X}={})=>{Z={...Z};let q=F8({env:Z});return X.path=Z[q],Z[q]=VM(X),Z};var dJ=B(()=>{hJ();uJ()});var cJ=(Z,X,q)=>{let Q=q?j8:T8,$=Z instanceof n0?{}:{cause:Z};return new Q(X,$)},n0,lJ=(Z,X)=>{Object.defineProperties(Z.prototype,{name:{value:X,writable:!0,enumerable:!1,configurable:!0},[iJ]:{value:!0,writable:!1,enumerable:!1,configurable:!1}})},nJ=(Z)=>I8(Z)&&(iJ in Z),iJ,I8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",T8,j8;var m1=B(()=>{n0=class n0 extends Error{};iJ=Symbol("isExecaError");T8=class T8 extends Error{};lJ(T8,T8.name);j8=class j8 extends Error{};lJ(j8,j8.name)});var aJ=()=>{let Z=y3-oJ+1;return Array.from({length:Z},zM)},zM=(Z,X)=>({name:`SIGRT${X+1}`,number:oJ+X,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),oJ=34,y3=64;var C3=()=>{};var sJ;var rJ=B(()=>{sJ=[{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 _M}from"node:os";var S3=()=>{let Z=aJ();return[...sJ,...Z].map(RM)},RM=({name:Z,number:X,description:q,action:Q,forced:$=!1,standard:J})=>{let{signals:{[Z]:Y}}=_M,H=Y!==void 0;return{name:Z,number:H?Y:X,description:q,supported:H,action:Q,forced:$,standard:J}};var tJ=B(()=>{rJ();C3()});import{constants as MM}from"node:os";var FM=()=>{let Z=S3();return Object.fromEntries(Z.map(DM))},DM=({name:Z,number:X,description:q,supported:Q,action:$,forced:J,standard:Y})=>[Z,{name:Z,number:X,description:q,supported:Q,action:$,forced:J,standard:Y}],eJ,AM=()=>{let Z=S3(),X=y3+1,q=Array.from({length:X},(Q,$)=>TM($,Z));return Object.assign({},...q)},TM=(Z,X)=>{let q=jM(Z,X);if(q===void 0)return{};let{name:Q,description:$,supported:J,action:Y,forced:H,standard:U}=q;return{[Z]:{name:Q,number:Z,description:$,supported:J,action:Y,forced:H,standard:U}}},jM=(Z,X)=>{let q=X.find(({name:Q})=>MM.signals[Q]===Z);if(q!==void 0)return q;return X.find((Q)=>Q.number===Z)},Kb;var Z9=B(()=>{C3();tJ();eJ=FM(),Kb=AM()});import{constants as E6}from"node:os";var q9=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return $9(Z,"option `killSignal`")},Q9=(Z)=>Z===0?Z:$9(Z,"`subprocess.kill()`'s argument"),$9=(Z,X)=>{if(Number.isInteger(Z))return IM(Z,X);if(typeof Z==="string")return OM(Z,X);throw TypeError(`Invalid ${X} ${String(Z)}: it must be a string or an integer.
|
|
27
|
+
${b3()}`)},IM=(Z,X)=>{if(X9.has(Z))return X9.get(Z);throw TypeError(`Invalid ${X} ${Z}: this signal integer does not exist.
|
|
28
|
+
${b3()}`)},wM=()=>new Map(Object.entries(E6.signals).reverse().map(([Z,X])=>[X,Z])),X9,OM=(Z,X)=>{if(Z in E6.signals)return Z;if(Z.toUpperCase()in E6.signals)throw TypeError(`Invalid ${X} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${X} '${Z}': this signal name does not exist.
|
|
29
|
+
${b3()}`)},b3=()=>`Available signal names: ${kM()}.
|
|
30
|
+
Available signal numbers: ${NM()}.`,kM=()=>Object.keys(E6.signals).sort().map((Z)=>`'${Z}'`).join(", "),NM=()=>[...new Set(Object.values(E6.signals).sort((Z,X)=>Z-X))].join(", "),w8=(Z)=>eJ[Z].description;var v6=B(()=>{Z9();X9=wM()});import{setTimeout as xM}from"node:timers/promises";var J9=(Z)=>{if(Z===!1)return Z;if(Z===!0)return PM;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},PM=5000,Y9=({kill:Z,options:{forceKillAfterDelay:X,killSignal:q},onInternalError:Q,context:$,controller:J},Y,H)=>{let{signal:U,error:G}=EM(Y,H,q);vM(G,Q);let W=Z(U);return yM({kill:Z,signal:U,forceKillAfterDelay:X,killSignal:q,killResult:W,context:$,controller:J}),W},EM=(Z,X,q)=>{let[Q=q,$]=I8(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($!==void 0&&!I8($))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${$}`);return{signal:Q9(Q),error:$}},vM=(Z,X)=>{if(Z!==void 0)X.reject(Z)},yM=async({kill:Z,signal:X,forceKillAfterDelay:q,killSignal:Q,killResult:$,context:J,controller:Y})=>{if(X===Q&&$)h3({kill:Z,forceKillAfterDelay:q,context:J,controllerSignal:Y.signal})},h3=async({kill:Z,forceKillAfterDelay:X,context:q,controllerSignal:Q})=>{if(X===!1)return;try{if(await xM(X,void 0,{signal:Q}),Z("SIGKILL"))q.isForcefullyTerminated??=!0}catch{}};var O8=B(()=>{m1();v6()});import{once as CM}from"node:events";var k8=async(Z,X)=>{if(!Z.aborted)await CM(Z,"abort",{signal:X})};var f3=()=>{};var H9=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},K9=({kill:Z,cancelSignal:X,gracefulCancel:q,context:Q,controller:$})=>X===void 0||q?[]:[SM(Z,X,Q,$)],SM=async(Z,X,q,{signal:Q})=>{throw await k8(X,Q),q.terminationReason??="cancel",Z(),X.reason};var g3=B(()=>{f3()});var O2=({methodName:Z,isSubprocess:X,ipc:q,isConnected:Q})=>{bM(Z,X,q),m3(Z,X,Q)},bM=(Z,X,q)=>{if(!q)throw Error(`${h0(Z,X)} can only be used if the \`ipc\` option is \`true\`.`)},m3=(Z,X,q)=>{if(!q)throw Error(`${h0(Z,X)} cannot be used: the ${F1(X)} has already exited or disconnected.`)},U9=(Z)=>{throw Error(`${h0("getOneMessage",Z)} could not complete: the ${F1(Z)} exited or disconnected.`)},G9=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${F1(Z)} is sending a message too, instead of listening to incoming messages.
|
|
31
|
+
This can be fixed by both sending a message and listening to incoming messages at the same time:
|
|
32
|
+
|
|
33
|
+
const [receivedMessage] = await Promise.all([
|
|
34
|
+
${h0("getOneMessage",Z)},
|
|
35
|
+
${h0("sendMessage",Z,"message, {strict: true}")},
|
|
36
|
+
]);`)},N8=(Z,X)=>Error(`${h0("sendMessage",X)} failed when sending an acknowledgment response to the ${F1(X)}.`,{cause:Z}),W9=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${F1(Z)} is not listening to incoming messages.`)},V9=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${F1(Z)} exited without listening to incoming messages.`)},B9=()=>Error(`\`cancelSignal\` aborted: the ${F1(!0)} disconnected.`),L9=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},z9=({error:Z,methodName:X,isSubprocess:q})=>{if(Z.code==="EPIPE")throw Error(`${h0(X,q)} cannot be used: the ${F1(q)} is disconnecting.`,{cause:Z})},_9=({error:Z,methodName:X,isSubprocess:q,message:Q})=>{if(hM(Z))throw Error(`${h0(X,q)}'s argument type is invalid: the message cannot be serialized: ${String(Q)}.`,{cause:Z})},hM=({code:Z,message:X})=>fM.has(Z)||gM.some((q)=>X.includes(q)),fM,gM,h0=(Z,X,q="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${mM(X)}${Z}(${q})`,mM=(Z)=>Z?"":"subprocess.",F1=(Z)=>Z?"parent process":"subprocess",k2=(Z)=>{if(Z.connected)Z.disconnect()};var N2=B(()=>{fM=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),gM=["could not be cloned","circular structure","call stack size exceeded"]});var i0=()=>{let Z={},X=new Promise((q,Q)=>{Object.assign(Z,{resolve:q,reject:Q})});return Object.assign(X,Z)};var x2=()=>{};import{addAbortListener as uM}from"node:events";var u1=(Z,X,q)=>{let Q=Z.getMaxListeners();if(Q===0||Q===1/0)return;Z.setMaxListeners(Q+X),uM(q,()=>{Z.setMaxListeners(Z.getMaxListeners()-X)})};var x8=()=>{};var P8=(Z,X)=>{if(X)u3(Z)},u3=(Z)=>{Z.refCounted()},E8=(Z,X)=>{if(X)p3(Z)},p3=(Z)=>{Z.unrefCounted()},R9=(Z,X)=>{if(!X)return;p3(Z),p3(Z)},M9=(Z,X)=>{if(!X)return;u3(Z),u3(Z)};var y6=()=>{};import{once as pM}from"node:events";import{scheduler as dM}from"node:timers/promises";var F9=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q},$)=>{if(j9($)||w9($))return;if(!v8.has(Z))v8.set(Z,[]);let J=v8.get(Z);if(J.push($),J.length>1)return;while(J.length>0){await I9(Z,Q,$),await dM.yield();let Y=await T9({wrappedMessage:J[0],anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q});J.shift(),Q.emit("message",Y),Q.emit("message:done")}},D9=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q,boundOnMessage:$})=>{d3();let J=v8.get(Z);while(J?.length>0)await pM(Q,"message:done");Z.removeListener("message",$),M9(X,q),Q.connected=!1,Q.emit("disconnect")},v8;var A9=B(()=>{C6();y6();y8();C8();v8=new WeakMap});import{EventEmitter as cM}from"node:events";var D1=(Z,X,q)=>{if(S8.has(Z))return S8.get(Z);let Q=new cM;return Q.connected=!0,S8.set(Z,Q),lM({ipcEmitter:Q,anyProcess:Z,channel:X,isSubprocess:q}),Q},S8,lM=({ipcEmitter:Z,anyProcess:X,channel:q,isSubprocess:Q})=>{let $=F9.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z});X.on("message",$),X.once("disconnect",D9.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z,boundOnMessage:$})),R9(q,Q)},b8=(Z)=>{let X=S8.get(Z);return X===void 0?Z.channel!==void 0&&Z.channel!==null:X.connected};var S6=B(()=>{A9();y6();S8=new WeakMap});import{once as nM}from"node:events";var O9=({anyProcess:Z,channel:X,isSubprocess:q,message:Q,strict:$})=>{if(!$)return Q;let J=D1(Z,X,q),Y=g8(Z,J);return{id:iM++,type:f8,message:Q,hasListeners:Y}},iM=0n,k9=(Z,X)=>{if(X?.type!==f8||X.hasListeners)return;for(let{id:q}of Z)if(q!==void 0)h8[q].resolve({isDeadlock:!0,hasListeners:!1})},T9=async({wrappedMessage:Z,anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:$})=>{if(Z?.type!==f8||!X.connected)return Z;let{id:J,message:Y}=Z,H={id:J,type:x9,message:g8(X,$)};try{await P2({anyProcess:X,channel:q,isSubprocess:Q,ipc:!0},H)}catch(U){$.emit("strict:error",U)}return Y},j9=(Z)=>{if(Z?.type!==x9)return!1;let{id:X,message:q}=Z;return h8[X]?.resolve({isDeadlock:!1,hasListeners:q}),!0},N9=async(Z,X,q)=>{if(Z?.type!==f8)return;let Q=i0();h8[Z.id]=Q;let $=new AbortController;try{let{isDeadlock:J,hasListeners:Y}=await Promise.race([Q,aM(X,q,$)]);if(J)G9(q);if(!Y)W9(q)}finally{$.abort(),delete h8[Z.id]}},h8,aM=async(Z,X,{signal:q})=>{u1(Z,1,q),await nM(Z,"disconnect",{signal:q}),V9(X)},f8="execa:ipc:request",x9="execa:ipc:response";var y8=B(()=>{x2();x8();b6();N2();S6();C6();h8={}});var E9=(Z,X,q)=>{if(!h6.has(Z))h6.set(Z,new Set);let Q=h6.get(Z),$=i0(),J=q?X.id:void 0,Y={onMessageSent:$,id:J};return Q.add(Y),{outgoingMessages:Q,outgoingMessage:Y}},v9=({outgoingMessages:Z,outgoingMessage:X})=>{Z.delete(X),X.onMessageSent.resolve()},I9=async(Z,X,q)=>{while(!g8(Z,X)&&h6.get(Z)?.size>0){let Q=[...h6.get(Z)];k9(Q,q),await Promise.all(Q.map(({onMessageSent:$})=>$))}},h6,y9,C9=(Z,X)=>{y9.set(Z,X)},g8=(Z,X)=>X.listenerCount("message")>oM(Z),oM=(Z)=>P9(Z)!==void 0&&!Q1(P9(Z).buffer,"ipc")?1:0,P9=(Z)=>y9.get(Z);var C6=B(()=>{x2();$1();y8();h6=new WeakMap,y9=new WeakMap});import{promisify as sM}from"node:util";var P2=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},$,{strict:J=!1}={})=>{return O2({methodName:"sendMessage",isSubprocess:q,ipc:Q,isConnected:Z.connected}),rM({anyProcess:Z,channel:X,methodName:"sendMessage",isSubprocess:q,message:$,strict:J})},rM=async({anyProcess:Z,channel:X,methodName:q,isSubprocess:Q,message:$,strict:J})=>{let Y=O9({anyProcess:Z,channel:X,isSubprocess:Q,message:$,strict:J}),H=E9(Z,Y,J);try{await l3({anyProcess:Z,methodName:q,isSubprocess:Q,wrappedMessage:Y,message:$})}catch(U){throw k2(Z),U}finally{v9(H)}},l3=async({anyProcess:Z,methodName:X,isSubprocess:q,wrappedMessage:Q,message:$})=>{let J=tM(Z);try{await Promise.all([N9(Q,Z,q),J(Q)])}catch(Y){throw z9({error:Y,methodName:X,isSubprocess:q}),_9({error:Y,methodName:X,isSubprocess:q,message:$}),Y}},tM=(Z)=>{if(c3.has(Z))return c3.get(Z);let X=sM(Z.send.bind(Z));return c3.set(Z,X),X},c3;var b6=B(()=>{N2();C6();y8();c3=new WeakMap});import{scheduler as eM}from"node:timers/promises";var b9=(Z,X)=>{return m3("cancelSignal",!1,Z.connected),l3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:f9,message:X},message:X})},h9=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{return await ZF({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q}),n3.signal},ZF=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{if(S9)return;if(S9=!0,!Q){L9();return}if(X===null){d3();return}D1(Z,X,q),await eM.yield()},S9=!1,w9=(Z)=>{if(Z?.type!==f9)return!1;return n3.abort(Z.message),!0},f9="execa:ipc:cancel",d3=()=>{n3.abort(B9())},n3;var C8=B(()=>{b6();S6();N2();n3=new AbortController});var g9=({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.")},m9=({subprocess:Z,kill:X,cancelSignal:q,gracefulCancel:Q,forceKillAfterDelay:$,context:J,controller:Y})=>Q?[XF({subprocess:Z,kill:X,cancelSignal:q,forceKillAfterDelay:$,context:J,controller:Y})]:[],XF=async({subprocess:Z,kill:X,cancelSignal:q,forceKillAfterDelay:Q,context:$,controller:{signal:J}})=>{await k8(q,J);let Y=qF(q);throw await b9(Z,Y),h3({kill:X,forceKillAfterDelay:Q,context:$,controllerSignal:J}),$.terminationReason??="gracefulCancel",q.reason},qF=({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 i3=B(()=>{f3();C8();O8()});import{setTimeout as QF}from"node:timers/promises";var u9=({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})`)},p9=(Z,X,q,Q)=>X===0||X===void 0?[]:[$F(Z,X,q,Q)],$F=async(Z,X,q,{signal:Q})=>{throw await QF(X,void 0,{signal:Q}),q.terminationReason??="timeout",Z(),new n0};var a3=B(()=>{m1()});import{execPath as JF,execArgv as YF}from"node:process";import d9 from"node:path";var c9=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},l9=(Z,X,{node:q=!1,nodePath:Q=JF,nodeOptions:$=YF.filter((U)=>!U.startsWith("--inspect")),cwd:J,execPath:Y,...H})=>{if(Y!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let U=A2(Q,'The "nodePath" option'),G=d9.resolve(J,U),W={__proto__:null,shell:!1,...H,nodePath:G,node:q,cwd:J};if(!q)return[Z,X,W];if(d9.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[G,[...$,Z,...X],{__proto__:null,ipc:!0,...W,shell:!1}]};var o3=B(()=>{T2()});import{serialize as HF}from"node:v8";var n9=({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`.");GF[q](Z)},KF=(Z)=>{try{HF(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:X})}},UF=(Z)=>{try{JSON.stringify(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:X})}},GF,i9=async(Z,X,q)=>{if(X===void 0)return;await P2({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:q},X)};var s3=B(()=>{b6();GF={advanced:KF,json:UF}});var o9=({encoding:Z})=>{if(r3.has(Z))return;let X=VF(Z);if(X!==void 0)throw TypeError(`Invalid option \`encoding: ${m8(Z)}\`.
|
|
37
|
+
Please rename it to ${m8(X)}.`);let q=[...r3].map((Q)=>m8(Q)).join(", ");throw TypeError(`Invalid option \`encoding: ${m8(Z)}\`.
|
|
38
|
+
Please rename it to one of: ${q}.`)},WF,I0,r3,VF=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let X=Z.toLowerCase();if(X in a9)return a9[X];if(r3.has(X))return X},a9,m8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var p1=B(()=>{WF=new Set(["utf8","utf16le"]),I0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),r3=WF.union(I0),a9={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import t3 from"node:fs";import g6 from"node:path";import f6 from"node:process";function zF(Z,X){if(typeof Z!=="string"||Z.length===0)throw TypeError("Expected a non-empty string.");let{cwd:q=f6.cwd(),path:Q=f6.env.PATH??(d1?f6.env.Path:void 0)??"",pathExt:$=f6.env.PATHEXT||LF}=X;return{cwd:q,searchPath:Q,pathExt:$}}function _F(Z,X){let q=X.split(g6.delimiter).filter(Boolean),Q=g6.extname(Z).toLowerCase();if(Q!==""&&q.some(($)=>$.toLowerCase()===Q))return["",...q];return q}function*RF(Z,{cwd:X,searchPath:q,pathExt:Q}){let $=d1?_F(Z,Q):[""];if(BF.test(Z)){let Y=g6.resolve(X,Z);for(let H of $)yield Y+H;return}let J=[...d1?[X]:[],...q.split(g6.delimiter)];for(let Y of J){let H=d1&&Y.length>1&&Y.startsWith('"')&&Y.endsWith('"')?Y.slice(1,-1):Y;if(H==="")continue;let U=g6.resolve(X,H,Z);for(let G of $)yield U+G}}function MF(Z){let X;try{X=t3.statSync(Z)}catch(q){return d1&&q.code==="EACCES"}if(!X.isFile())return!1;if(d1)return!0;try{return t3.accessSync(Z,t3.constants.X_OK),!0}catch{return!1}}function u8(Z,X={}){let q=zF(Z,X);for(let Q of RF(Z,q))if(MF(Q))return Q;return}var d1,BF,LF=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC";var s9=B(()=>{d1=f6.platform==="win32",BF=d1?/[\/\\]/v:/\//v});import{openSync as FF,readSync as DF,closeSync as AF}from"node:fs";import{Buffer as TF}from"node:buffer";import E2 from"node:path";import v2 from"node:process";var e9=(Z,X,q)=>{let Q={file:Z,commandArguments:[...X],options:q};if(q.shell||v2.platform!=="win32")return Q;return wF(Q)},jF,IF,wF=(Z)=>{let X=OF(Z);if(X!==void 0&&jF.test(X)){if(Z.options.argv0===void 0)Z.options.argv0=Z.file;return Z.file=X,Z}for(let Y of[Z.file,...Z.commandArguments])CF(Y);let q=X!==void 0&&IF.test(X),Q=e3(E2.normalize(X??Z.file)),$=Z.commandArguments.map((Y)=>hF(Y,q)),J=`"${[Q,...$].join(" ")}"`;return Z.options.windowsVerbatimArguments=!0,{file:v2.env.comspec||"cmd.exe",commandArguments:["/d","/s","/c",J],options:Z.options}},OF=(Z)=>{let X=r9(Z),q=X!==void 0&&PF(X);if(!q)return X;return Z.commandArguments.unshift(X),Z.file=q,r9(Z)},r9=(Z)=>{let X=Z.options.env||v2.env,q=Z.options.cwd??v2.cwd(),Q=m6(X,"PATHEXT"),$=E2.extname(Z.file),J=$===""?Q:`${$}${E2.delimiter}${Q??""}`;if(kF(Z.file))return u8(E2.resolve(q,Z.file),{cwd:q,pathExt:J});let Y=m6(X,"PATH")??m6(v2.env,"PATH")??"",H={cwd:q,path:Y,pathExt:J};return NF(X)?u8(Z.file,H):xF(Z.file,H)},kF=(Z)=>Z.includes("/")||Z.includes("\\")||Z.includes(":"),NF=(Z)=>m6(v2.env,"NODEFAULTCURRENTDIRECTORYINEXEPATH")===void 0&&m6(Z,"NODEFAULTCURRENTDIRECTORYINEXEPATH")===void 0,xF=(Z,{cwd:X,path:q,pathExt:Q})=>{for(let $ of q.split(E2.delimiter)){let J=$.length>1&&$.startsWith('"')&&$.endsWith('"')?$.slice(1,-1):$;if(J==="")continue;let Y=u8(E2.resolve(X,J,Z),{cwd:X,pathExt:Q});if(Y!==void 0)return Y}},m6=(Z,X)=>{let q=Object.keys(Z).sort().find((Q)=>Q.toUpperCase()===X);return q===void 0?void 0:Z[q]},t9=150,PF=(Z)=>{let X=TF.alloc(t9);try{let q=FF(Z,"r");try{DF(q,X,0,t9,0)}finally{AF(q)}}catch{return}return vF(X.toString())},EF,vF=(Z)=>{let X=Z.match(EF)?.groups.line.trim();if(!X)return;let[q,Q]=X.split(" "),$=q.split("/").at(-1);if($==="env")return Q;return Q?`${$} ${Q}`:$},yF,CF=(Z)=>{if(yF.test(Z))throw TypeError(`The command and its arguments cannot contain a line break on Windows without a shell.
|
|
39
|
+
This would allow a command injection with \`cmd.exe\`.
|
|
40
|
+
Invalid value: ${JSON.stringify(`${Z}`)}`)},SF,e3=(Z)=>Z.replaceAll(SF,"^$&"),bF,hF=(Z,X)=>{let q=`${Z}`.replaceAll(bF,($,J,Y)=>{let H=Y[J+$.length];return H==='"'||H===void 0?$.repeat(2):$}).replaceAll('"',"\\\""),Q=e3(`"${q}"`);return X?e3(Q):Q};var ZY=B(()=>{s9();jF=/\.(?:com|exe)$/i,IF=/\.(?:bat|cmd)$/i,EF=/^#!(?<line>.*)/,yF=/[\n\r]/,SF=/[()\][%!^"`<>&|;, *?]/g,bF=/\\+/g});import{statSync as fF}from"node:fs";import gF from"node:path";import mF from"node:process";var XY=(Z=qY())=>{let X=A2(Z,'The "cwd" option');return gF.resolve(X)},qY=()=>{try{return mF.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
|
|
41
|
+
${Z.message}`,Z}},QY=(Z,X)=>{if(X===qY())return Z;let q;try{q=fF(X)}catch(Q){return`The "cwd" option is invalid: ${X}.
|
|
42
|
+
${Q.message}
|
|
43
|
+
${Z}`}if(!q.isDirectory())return`The "cwd" option is not a directory: ${X}.
|
|
44
|
+
${Z}`;return Z};var ZZ=B(()=>{T2()});import uF from"node:path";import $Y from"node:process";var pF,p8=(Z,X,q)=>{let Q={__proto__:null,...q};Q.cwd=XY(Q.cwd);let[$,J,Y]=l9(Z,X,Q),H=VJ(Y),U=dF(H);U.env=cF(U);let{file:G,commandArguments:W}=e9($,J,U);if(u9(U),o9(U),n9(U),H9(U),g9(U),U.shell=T3(U.shell),U.killSignal=q9(U.killSignal),U.forceKillAfterDelay=J9(U.forceKillAfterDelay),U.lines=U.lines.map((V,L)=>V&&!I0.has(U.encoding)&&U.buffer[L]),$Y.platform==="win32"&&pF.test(uF.basename(G)))W.unshift("/q");return{file:G,commandArguments:W,options:U}},dF=({extendEnv:Z=!0,preferLocal:X=!1,cwd:q,localDir:Q=q,encoding:$="utf8",reject:J=!0,cleanup:Y=!0,killDescendants:H=!1,all:U=!1,windowsHide:G=!0,killSignal:W="SIGTERM",forceKillAfterDelay:V=!0,gracefulCancel:L=!1,ipcInput:z,ipc:_=z!==void 0||L,serialization:R="advanced",...M})=>({__proto__:null,...M,extendEnv:Z,preferLocal:X,cwd:q,localDirectory:Q,encoding:$,reject:J,cleanup:Y,killDescendants:H,all:U,windowsHide:G,killSignal:W,forceKillAfterDelay:V,gracefulCancel:L,ipcInput:z,ipc:_,serialization:R}),cF=({env:Z,extendEnv:X,preferLocal:q,node:Q,localDirectory:$,nodePath:J})=>{let Y=X?{...$Y.env,...Z}:Z;if(q||Q)return pJ({env:Y,cwd:$,execPath:J,preferLocal:q,addExecPath:Q});return Y};var XZ=B(()=>{dJ();O8();v6();g3();i3();a3();o3();s3();p1();ZY();ZZ();T2();$1();pF=/^cmd(?:\.exe)?$/i});var d8=(Z,X,q)=>q.shell&&X.length>0?[[Z,...X].join(" "),[],q]:[Z,X,q];var qZ=()=>{};function y2(Z){if(typeof Z==="string")return lF(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return nF(Z)}var lF=(Z)=>Z.at(-1)===JY?Z.slice(0,Z.at(-2)===YY?-2:-1):Z,nF=(Z)=>Z.at(-1)===iF?Z.subarray(0,Z.at(-2)===aF?-2:-1):Z,JY=`
|
|
45
|
+
`,iF,YY="\r",aF;var QZ=B(()=>{iF=JY.codePointAt(0),aF=YY.codePointAt(0)});function f0(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 $Z(Z,{checkOpen:X=!0}={}){return f0(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 c1(Z,{checkOpen:X=!0}={}){return f0(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 JZ(Z,X){return $Z(Z,X)&&c1(Z,X)}var l1=()=>{};class HY{#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 KY(){return this[YZ].next()}function UY(Z){return this[YZ].return(Z)}function HZ({preventCancel:Z=!1}={}){let X=this.getReader(),q=new HY(X,Z),Q=Object.create(sF);return Q[YZ]=q,Q}var oF,YZ,sF;var GY=B(()=>{oF=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);YZ=Symbol();Object.defineProperty(KY,"name",{value:"next"});Object.defineProperty(UY,"name",{value:"return"});sF=Object.create(oF,{next:{enumerable:!0,configurable:!0,writable:!0,value:KY},return:{enumerable:!0,configurable:!0,writable:!0,value:UY}})});var WY=()=>{};var VY=B(()=>{GY();WY()});var BY=(Z)=>{if(c1(Z,{checkOpen:!1})&&u6.on!==void 0)return tF(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(rF.call(Z)==="[object ReadableStream]")return HZ.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},rF,tF=async function*(Z){let X=new AbortController,q={};eF(Z,X,q);try{for await(let[Q]of u6.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()}},eF=async(Z,X,q)=>{try{await u6.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(Q){q.error=Q}finally{X.abort()}},u6;var KZ=B(()=>{l1();VY();({toString:rF}=Object.prototype),u6={}});var C2=async(Z,{init:X,convertChunk:q,getSize:Q,truncateChunk:$,addChunk:J,getFinalChunk:Y,finalize:H},{maxBuffer:U=Number.POSITIVE_INFINITY}={})=>{let G=BY(Z),W=X();W.length=0;try{for await(let V of G){let L=XD(V),z=q[L](V,W);_Y({convertedChunk:z,state:W,getSize:Q,truncateChunk:$,addChunk:J,maxBuffer:U})}return ZD({state:W,convertChunk:q,getSize:Q,truncateChunk:$,addChunk:J,getFinalChunk:Y,maxBuffer:U}),H(W)}catch(V){let L=typeof V==="object"&&V!==null?V:Error(V);throw L.bufferedData=H(W),L}},ZD=({state:Z,getSize:X,truncateChunk:q,addChunk:Q,getFinalChunk:$,maxBuffer:J})=>{let Y=$(Z);if(Y!==void 0)_Y({convertedChunk:Y,state:Z,getSize:X,truncateChunk:q,addChunk:Q,maxBuffer:J})},_Y=({convertedChunk:Z,state:X,getSize:q,truncateChunk:Q,addChunk:$,maxBuffer:J})=>{let Y=q(Z),H=X.length+Y;if(H<=J){LY(Z,X,$,H);return}let U=Q(Z,J-X.length);if(U!==void 0)LY(U,X,$,J);throw new J1},LY=(Z,X,q,Q)=>{X.contents=q(Z,X,Q),X.length=Q},XD=(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=zY.call(Z);if(q==="[object ArrayBuffer]")return"arrayBuffer";if(q==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&zY.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},zY,J1;var p6=B(()=>{KZ();({toString:zY}=Object.prototype);J1=class J1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var Y1=(Z)=>Z,d6=()=>{return},c8=({contents:Z})=>Z,l8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},n8=(Z)=>Z.length;var i8=()=>{};async function a8(Z,X){return C2(Z,JD,X)}var qD=()=>({contents:[]}),QD=()=>1,$D=(Z,{contents:X})=>{return X.push(Z),X},JD;var RY=B(()=>{p6();i8();JD={init:qD,convertChunk:{string:Y1,buffer:Y1,arrayBuffer:Y1,dataView:Y1,typedArray:Y1,others:Y1},getSize:QD,truncateChunk:d6,addChunk:$D,getFinalChunk:d6,finalize:c8}});async function o8(Z,X){return C2(Z,LD,X)}var YD=()=>({contents:new ArrayBuffer(0)}),HD=(Z)=>KD.encode(Z),KD,MY=(Z)=>new Uint8Array(Z),FY=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),UD=(Z,X)=>Z.slice(0,X),GD=(Z,{contents:X,length:q},Q)=>{let $=TY()?VD(X,Q):WD(X,Q);return new Uint8Array($).set(Z,q),$},WD=(Z,X)=>{if(X<=Z.byteLength)return Z;let q=new ArrayBuffer(AY(X));return new Uint8Array(q).set(new Uint8Array(Z),0),q},VD=(Z,X)=>{if(X<=Z.maxByteLength)return Z.resize(X),Z;let q=new ArrayBuffer(X,{maxByteLength:AY(X)});return new Uint8Array(q).set(new Uint8Array(Z),0),q},AY=(Z)=>DY**Math.ceil(Math.log(Z)/Math.log(DY)),DY=2,BD=({contents:Z,length:X})=>TY()?Z:Z.slice(0,X),TY=()=>("resize"in ArrayBuffer.prototype),LD;var jY=B(()=>{p6();i8();KD=new TextEncoder,LD={init:YD,convertChunk:{string:HD,buffer:MY,arrayBuffer:MY,dataView:FY,typedArray:FY,others:l8},getSize:n8,truncateChunk:UD,addChunk:GD,getFinalChunk:d6,finalize:BD}});async function r8(Z,X){return C2(Z,FD,X)}var zD=()=>({contents:"",textDecoder:new TextDecoder}),s8=(Z,{textDecoder:X})=>X.decode(Z,{stream:!0}),_D=(Z,{contents:X})=>X+Z,RD=(Z,X)=>Z.slice(0,X),MD=({textDecoder:Z})=>{let X=Z.decode();return X===""?void 0:X},FD;var IY=B(()=>{p6();i8();FD={init:zD,convertChunk:{string:Y1,buffer:s8,arrayBuffer:s8,dataView:s8,typedArray:s8,others:l8},getSize:n8,truncateChunk:RD,addChunk:_D,getFinalChunk:MD,finalize:c8}});var wY=B(()=>{RY();jY();IY();p6()});import{on as DD}from"node:events";import{finished as AD}from"node:stream/promises";var t8=B(()=>{KZ();wY();Object.assign(u6,{on:DD,finished:AD})});var OY=({error:Z,stream:X,readableObjectMode:q,lines:Q,encoding:$,fdNumber:J})=>{if(!(Z instanceof J1))throw Z;if(J==="all")return Z;let Y=TD(q,Q,$);throw Z.maxBufferInfo={fdNumber:J,unit:Y},X.destroy(),Z},TD=(Z,X,q)=>{if(Z)return"objects";if(X)return"lines";if(q==="buffer")return"bytes";return"characters"},kY=(Z,X,q)=>{if(X.length!==q)return;let Q=new J1;throw Q.maxBufferInfo={fdNumber:"ipc"},Q},NY=(Z,X)=>{let{streamName:q,threshold:Q,unit:$}=jD(Z,X);return`Command's ${q} was larger than ${Q} ${$}`},jD=(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 $=Q1(X,q);if(q==="ipc")return{streamName:"IPC output",threshold:$,unit:"messages"};return{streamName:K8(q),threshold:$,unit:Q}},xY=(Z,X,q)=>Z?.code==="ENOBUFS"&&X!==null&&X.some((Q)=>Q!==null&&Q.length>e8(q)),PY=(Z,X,q)=>{if(!X)return Z;let Q=e8(q);return Z.length>Q?Z.slice(0,Q):Z},e8=([,Z])=>Z;var n1=B(()=>{t8();q1();$1()});import{inspect as ID}from"node:util";var vY=({stdio:Z,all:X,ipcOutput:q,originalError:Q,signal:$,signalDescription:J,exitCode:Y,escapedCommand:H,timedOut:U,isCanceled:G,isGracefullyCanceled:W,isMaxBuffer:V,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_,maxBuffer:R,timeout:M,cwd:F})=>{let N=Q?.code,D=wD({originalError:Q,timedOut:U,timeout:M,isMaxBuffer:V,maxBuffer:R,errorCode:N,signal:$,signalDescription:J,exitCode:Y,isCanceled:G,isGracefullyCanceled:W,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_}),w=kD(Q,F),T=w===void 0?"":`
|
|
46
|
+
${w}`,j=`${D}: ${H}${T}`,A=X===void 0?[Z[2],Z[1]]:[X],b=[j,...A,...Z.slice(3),q.map((O)=>ND(O)).join(`
|
|
47
|
+
`)].map((O)=>P6(y2(xD(O)))).filter(Boolean).join(`
|
|
48
|
+
|
|
49
|
+
`);return{originalMessage:w,shortMessage:j,message:b}},wD=({originalError:Z,timedOut:X,timeout:q,isMaxBuffer:Q,maxBuffer:$,errorCode:J,signal:Y,signalDescription:H,exitCode:U,isCanceled:G,isGracefullyCanceled:W,isForcefullyTerminated:V,forceKillAfterDelay:L,killSignal:z})=>{let _=OD(V,L);if(X)return`Command timed out after ${q} milliseconds${_}`;if(W){if(Y===void 0)return`Command was gracefully canceled with exit code ${U}`;return V?`Command was gracefully canceled${_}`:`Command was gracefully canceled with ${Y} (${H})`}if(G)return`Command was canceled${_}`;if(Q)return`${NY(Z,$)}${_}`;if(J!==void 0)return`Command failed with ${J}${_}`;if(V)return`Command was killed with ${z} (${w8(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"},OD=(Z,X)=>Z?` and was forcefully terminated after ${X} milliseconds`:"",kD=(Z,X)=>{if(Z instanceof n0)return;let q=nJ(Z)?Z.originalMessage:String(Z?.message??Z),Q=P6(QY(q,X));return Q===""?void 0:Q},ND=(Z)=>typeof Z==="string"?Z:ID(Z),xD=(Z)=>Array.isArray(Z)?Z.map((X)=>y2(EY(X))).filter(Boolean).join(`
|
|
50
|
+
`):EY(Z),EY=(Z)=>{if(typeof Z==="string")return Z;if(q0(Z))return Y8(Z);return""};var yY=B(()=>{QZ();j0();ZZ();W8();n1();v6();m1()});var Z7=({command:Z,escapedCommand:X,stdio:q,all:Q,ipcOutput:$,options:{cwd:J},startTime:Y})=>CY({command:Z,escapedCommand:X,cwd:J,durationMs:E3(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:$,pipedFrom:[]}),S2=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,isSync:Y})=>c6({error:Z,command:X,escapedCommand:q,startTime:J,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:Q.length}),ipcOutput:[],options:$,isSync:Y}),c6=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,stdio:V,all:L,ipcOutput:z,options:{timeoutDuration:_,timeout:R=_,forceKillAfterDelay:M,killSignal:F,cwd:N,maxBuffer:D},isSync:w})=>{let{exitCode:T,signal:j,signalDescription:A}=ED(G,W),{originalMessage:b,shortMessage:O,message:x}=vY({stdio:V,all:L,ipcOutput:z,originalError:Z,signal:j,signalDescription:A,exitCode:T,escapedCommand:q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,forceKillAfterDelay:M,killSignal:F,maxBuffer:D,timeout:R,cwd:N}),E=cJ(Z,x,w);return Object.assign(E,PD({error:E,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:T,signal:j,signalDescription:A,stdio:V,all:L,ipcOutput:z,cwd:N,originalMessage:b,shortMessage:O})),E},PD=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,signalDescription:V,stdio:L,all:z,ipcOutput:_,cwd:R,originalMessage:M,shortMessage:F})=>CY({shortMessage:F,originalMessage:M,command:X,escapedCommand:q,cwd:R,durationMs:E3(Q),failed:!0,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isTerminated:W!==void 0,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,signalDescription:V,code:Z.cause?.code,stdout:L[1],stderr:L[2],all:z,stdio:L,ipcOutput:_,pipedFrom:[]}),CY=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0)),ED=(Z,X)=>{let q=Z===null?void 0:Z,Q=X===null?void 0:X,$=Q===void 0?void 0:w8(X);return{exitCode:q,signal:Q,signalDescription:$}};var l6=B(()=>{v6();R8();m1();yY()});function vD(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(SY(Z*1000)%1000),nanoseconds:Math.trunc(SY(Z*1e6)%1000)}}function yD(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 UZ(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return vD(Z);break}case"bigint":return yD(Z)}throw TypeError("Expected a finite number or bigint")}var SY=(Z)=>Number.isFinite(Z)?Z:0;var bY=()=>{};function GZ(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=(W,V)=>{let L=Math.floor(W*10**V+bD);return(Math.round(L)/10**V).toFixed(V)},Y=(W,V,L,z)=>{if(($.length===0||!X.colonNotation)&&CD(W)&&!(X.colonNotation&&L==="m"))return;if(z??=String(W),X.colonNotation){let _=z.includes(".")?z.split(".")[0].length:z.length,R=$.length>0?2:1;z="0".repeat(Math.max(0,R-_))+z}else z+=X.verbose?" "+SD(V,W):L;$.push(z)},H=UZ(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 W=Number(H.seconds),V=Number(H.milliseconds),L=Number(H.microseconds),z=Number(H.nanoseconds);if(Y(W,"second","s"),X.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(L,"microsecond","µs"),Y(z,"nanosecond","ns");else{let _=V+L/1000+z/1e6,R=typeof X.millisecondsDecimalDigits==="number"?X.millisecondsDecimalDigits:0,M=_>=1?Math.round(_):Math.ceil(_),F=R?_.toFixed(R):M;Y(Number.parseFloat(F),"millisecond","ms",F)}}else{let W=(q?Number(Z%hD):Z)/1000%60,V=typeof X.secondsDecimalDigits==="number"?X.secondsDecimalDigits:1,L=J(W,V),z=X.keepDecimalsOnWholeSeconds?L:L.replace(/\.0+$/,"");Y(Number.parseFloat(z),"second","s",z)}if($.length===0)return Q+"0"+(X.verbose?" milliseconds":"ms");let G=X.colonNotation?":":" ";if(typeof X.unitCount==="number")$=$.slice(0,Math.max(X.unitCount,1));return Q+$.join(G)}var CD=(Z)=>Z===0||Z===0n,SD=(Z,X)=>X===1||X===1n?Z:`${Z}s`,bD=0.0000001,hD;var hY=B(()=>{bY();hD=24n*60n*60n*1000n});var fY=(Z,X)=>{if(Z.failed)l0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:X,result:Z})};var gY=B(()=>{w2()});var mY=(Z,X)=>{if(!j2(X))return;fY(Z,X),fD(Z,X)},fD=(Z,X)=>{let q=`(done in ${GZ(Z.durationMs)})`;l0({type:"duration",verboseMessage:q,verboseInfo:X,result:Z})};var uY=B(()=>{hY();M1();w2();gY()});var b2=(Z,X,{reject:q})=>{if(mY(Z,X),Z.failed&&q)throw Z;return Z};var X7=B(()=>{uY()});var WZ=(Z,X)=>{if(i1(Z))return"asyncGenerator";if(nY(Z))return"generator";if(q7(Z))return"fileUrl";if(dD(Z))return"filePath";if(iD(Z))return"webStream";if(f0(Z,{checkOpen:!1}))return"native";if(q0(Z))return"uint8Array";if(aD(Z))return"asyncIterable";if(oD(Z))return"iterable";if(BZ(Z))return cY({transform:Z},X);if(pD(Z))return gD(Z,X);return"native"},gD=(Z,X)=>{if(JZ(Z.transform,{checkOpen:!1}))return mD(Z,X);if(BZ(Z.transform))return cY(Z,X);return uD(Z,X)},mD=(Z,X)=>{return lY(Z,X,"Duplex stream"),"duplex"},cY=(Z,X)=>{return lY(Z,X,"web TransformStream"),"webTransform"},lY=({final:Z,binary:X,objectMode:q},Q,$)=>{pY(Z,`${Q}.final`,$),pY(X,`${Q}.binary`,$),n6(q,`${Q}.objectMode`)},pY=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${X}\` option can only be defined when using a generator, not a ${q}.`)},uD=({transform:Z,final:X,binary:q,objectMode:Q},$)=>{if(Z!==void 0&&!dY(Z))throw TypeError(`The \`${$}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(JZ(X,{checkOpen:!1}))throw TypeError(`The \`${$}.final\` option must not be a Duplex stream.`);if(BZ(X))throw TypeError(`The \`${$}.final\` option must not be a web TransformStream.`);if(X!==void 0&&!dY(X))throw TypeError(`The \`${$}.final\` option must be a generator.`);return n6(q,`${$}.binary`),n6(Q,`${$}.objectMode`),i1(Z)||i1(X)?"asyncGenerator":"generator"},n6=(Z,X)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${X}\` option must use a boolean.`)},dY=(Z)=>i1(Z)||nY(Z),i1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",nY=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",pD=(Z)=>e(Z)&&(Z.transform!==void 0||Z.final!==void 0),q7=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",iY=(Z)=>q7(Z)&&Z.protocol!=="file:",dD=(Z)=>e(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>cD.has(X))&&VZ(Z.file),cD,VZ=(Z)=>typeof Z==="string",i6=(Z)=>e(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>lD.has(X))&&("value"in Z),lD,aY=(Z,X)=>Z==="native"&&typeof X==="string"&&!nD.has(X),nD,oY=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",Q7=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",iD=(Z)=>oY(Z)||Q7(Z),BZ=(Z)=>oY(Z?.readable)&&Q7(Z?.writable),aD=(Z)=>sY(Z)&&typeof Z[Symbol.asyncIterator]==="function",oD=(Z)=>sY(Z)&&typeof Z[Symbol.iterator]==="function",sY=(Z)=>typeof Z==="object"&&Z!==null,P0,$7,LZ,rY,tY,A1;var z0=B(()=>{l1();Z1();j0();cD=new Set(["file","append"]),lD=new Set(["value","input"]),nD=new Set(["ipc","ignore","inherit","overlapped","pipe"]),P0=new Set(["generator","asyncGenerator","duplex","webTransform"]),$7=new Set(["fileUrl","filePath","fileNumber"]),LZ=new Set(["fileUrl","filePath"]),rY=new Set([...LZ,"webStream","nodeStream"]),tY=new Set(["webTransform","duplex"]),A1={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 zZ=(Z,X,q,Q)=>Q==="output"?sD(Z,X,q):rD(Z,X,q),sD=(Z,X,q)=>{let Q=X!==0&&q[X-1].value.readableObjectMode;return{writableObjectMode:Q,readableObjectMode:Z??Q}},rD=(Z,X,q)=>{let Q=X===0?Z===!0:q[X-1].value.readableObjectMode,$=X!==q.length-1&&(Z??Q);return{writableObjectMode:Q,readableObjectMode:$}},eY=(Z,X)=>{let q=Z.findLast(({type:Q})=>P0.has(Q));if(q===void 0)return!1;return X==="input"?q.value.writableObjectMode:q.value.readableObjectMode};var _Z=B(()=>{z0()});var ZH=(Z,X,q,Q)=>[...Z.filter(({type:$})=>!P0.has($)),...tD(Z,X,q,Q)],tD=(Z,X,q,{encoding:Q})=>{let $=Z.filter(({type:Y})=>P0.has(Y)),J=Array.from({length:$.length});for(let[Y,H]of Object.entries($))J[Y]=eD({stdioItem:H,index:Number(Y),newTransforms:J,optionName:X,direction:q,encoding:Q});return QA(J,q)},eD=({stdioItem:Z,stdioItem:{type:X},index:q,newTransforms:Q,optionName:$,direction:J,encoding:Y})=>{if(X==="duplex")return ZA({stdioItem:Z,optionName:$});if(X==="webTransform")return XA({stdioItem:Z,index:q,newTransforms:Q,direction:J});return qA({stdioItem:Z,index:q,newTransforms:Q,direction:J,encoding:Y})},ZA=({stdioItem:Z,optionName:X})=>{let{value:q}=Z,{transform:Q}=q,{writableObjectMode:$,readableObjectMode:J}=Q,{objectMode:Y=J}=q;if(Y&&!J)throw TypeError(`The \`${X}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Y&&J)throw TypeError(`The \`${X}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:Q,writableObjectMode:$,readableObjectMode:J}}},XA=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:$})=>{let{transform:J,objectMode:Y}=e(X)?X:{transform:X},{writableObjectMode:H,readableObjectMode:U}=zZ(Y,q,Q,$);return{...Z,value:{transform:J,writableObjectMode:H,readableObjectMode:U}}},qA=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:$,encoding:J})=>{let{transform:Y,final:H,binary:U=!1,preserveNewlines:G=!1,objectMode:W}=e(X)?X:{transform:X},V=U||I0.has(J),{writableObjectMode:L,readableObjectMode:z}=zZ(W,q,Q,$);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:G,writableObjectMode:L,readableObjectMode:z}}},QA=(Z,X)=>X==="input"?Z.reverse():Z;var XH=B(()=>{Z1();p1();z0();_Z()});import RZ from"node:process";var qH=(Z,X,q)=>{let Q=Z.map(($)=>$A($,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)??KA},$A=(Z,X)=>YA[X]??JA(Z),JA=({type:Z,value:X,direction:q,optionName:Q})=>{let $=QH[Z](X);if(q==="input"&&$==="output")throw TypeError(`The \`${Q}\` option is invalid: \`input: true\` cannot be used with a writable value, which is always an output.`);return q??$},YA,h2=()=>{return},MZ=()=>"input",QH,HA=(Z)=>{if([0,RZ.stdin].includes(Z))return"input";if([1,2,RZ.stdout,RZ.stderr].includes(Z))return"output"},KA="output";var $H=B(()=>{l1();z0();YA=["input","output","output"],QH={generator:h2,asyncGenerator:h2,fileUrl:h2,filePath:h2,iterable:MZ,asyncIterable:MZ,uint8Array:MZ,webStream:(Z)=>Q7(Z)?"output":"input",nodeStream(Z){if(!c1(Z,{checkOpen:!1}))return"output";return $Z(Z,{checkOpen:!1})?void 0:"input"},webTransform:h2,duplex:h2,native(Z){let X=HA(Z);if(X!==void 0)return X;if(f0(Z,{checkOpen:!1}))return QH.nodeStream(Z)}}});var JH=(Z,X)=>X?[...Z,"ipc"]:Z;var YH=()=>{};var UH=({stdio:Z,ipc:X,buffer:q,...Q},$,J)=>{let Y=WA(Z,Q).map((H,U)=>GH(H,U));return UA(Y),J?BA(Y,q,$):JH(Y,X)},UA=(Z)=>{if(Z.some((X)=>GA(X)))throw Error("The `ipc: true` option must be used instead of `stdio: 'ipc'`.")},GA=(Z)=>{if(Array.isArray(Z))return Z.some((X)=>HH(X));return HH(Z)},HH=(Z)=>{if(i6(Z))return Z.value==="ipc";return Z==="ipc"},WA=(Z,X)=>{if(Z===void 0)return x0.map((Q)=>X[Q]);if(VA(X))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${x0.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,x0.length);return Array.from({length:q},(Q,$)=>Z[$])},VA=(Z)=>x0.some((X)=>Z[X]!==void 0),GH=(Z,X)=>{if(Array.isArray(Z))return Z.map((q)=>GH(q,X));if(Z===null||Z===void 0)return X>=x0.length?"ignore":"pipe";return Z},BA=(Z,X,q)=>Z.map((Q,$)=>!X[$]&&$!==0&&!I2(q,$)&&LA(Q,$)?"ignore":Q),LA=(Z,X)=>KH(Z,X)||Array.isArray(Z)&&Z.every((q)=>KH(q,X)),KH=(Z,X)=>Z==="pipe"||zA(Z,X),zA=(Z,X)=>i6(Z)&&Z.value==="pipe"&&(Z.input===void 0||Z.input===!1||_A(X,Z.input)),_A=(Z,X)=>X===!0&&(Z===1||Z===2);var WH=B(()=>{q1();YH();M1();z0()});var Y7=(Z,X="stdin")=>{let{options:Q,fileDescriptors:$}=a0.get(Z),J=VH($,X,!0),Y=Z.stdio[J];if(Y===null)throw TypeError(BH(J,X,Q,!0));return Y},f2=(Z,X="stdout")=>{let{options:Q,fileDescriptors:$}=a0.get(Z),J=VH($,X,!1),Y=J==="all"?Z.all:Z.stdio[J];if(Y===null||Y===void 0)throw TypeError(BH(J,X,Q,!1));return Y},a0,VH=(Z,X,q)=>{let Q=RA(X,q);return MA(Q,X,q,Z),Q},RA=(Z,X)=>{let q=k3(Z);if(q!==void 0)return q;let{validOptions:Q,defaultValue:$}=X?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${a6(X)}" must not be "${Z}".
|
|
51
|
+
It must be ${Q} or "fd3", "fd4" (and so on).
|
|
52
|
+
It is optional and defaults to "${$}".`)},MA=(Z,X,q,Q)=>{let $=Q[LH(Z)];if($===void 0)throw TypeError(`"${a6(q)}" must not be ${X}. That file descriptor does not exist.
|
|
53
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);if($.direction==="input"&&!q)throw TypeError(`"${a6(q)}" must not be ${X}. It must be a readable stream, not writable.`);if($.direction!=="input"&&q)throw TypeError(`"${a6(q)}" must not be ${X}. It must be a writable stream, not readable.
|
|
54
|
+
If you meant to use it as input, please set its "stdio" option to \`{value: 'pipe', input: true}\`.`)},BH=(Z,X,q,Q)=>{if(Z==="all"&&!q.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:$,optionValue:J}=FA(Z,q);return`The "${$}: ${J7(J)}" option is incompatible with using "${a6(Q)}: ${J7(X)}".
|
|
55
|
+
Please set this option with "pipe" instead.`},FA=(Z,{stdin:X,stdout:q,stderr:Q,stdio:$})=>{let J=LH(Z);if(J===0&&X!==void 0)return{optionName:"stdin",optionValue:X};if(J===1&&q!==void 0)return{optionName:"stdout",optionValue:q};if(J===2&&Q!==void 0)return{optionName:"stderr",optionValue:Q};return{optionName:`stdio[${J}]`,optionValue:$[J]}},LH=(Z)=>Z==="all"?1:Z,a6=(Z)=>Z?"to":"from",J7=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var T1=B(()=>{$1();a0=new WeakMap});import{readFileSync as DA}from"node:fs";import AA from"node:tty";var _H=({stdioItem:Z,stdioItem:{type:X},isStdioArray:q,fdNumber:Q,direction:$,isSync:J})=>{if(!q||X!=="native")return Z;return J?TA({stdioItem:Z,fdNumber:Q,direction:$}):wA({stdioItem:Z,fdNumber:Q})},TA=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q,direction:$})=>{let J=jA({value:X,optionName:q,fdNumber:Q,direction:$});if(J!==void 0)return J;if(f0(X,{checkOpen:!1}))throw TypeError(`The \`${q}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},jA=({value:Z,optionName:X,fdNumber:q,direction:Q})=>{let $=IA(Z,q);if($===void 0)return;if(Q==="output")return{type:"fileNumber",value:$,optionName:X};if(AA.isatty($))throw TypeError(`The \`${X}: ${J7(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:X1(DA($)),optionName:X}},IA=(Z,X)=>{if(Z==="inherit")return X;if(typeof Z==="number")return Z;let q=H8.indexOf(Z);if(q!==-1)return q},wA=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q})=>{if(X==="inherit")return{type:"nodeStream",value:zH(Q,X,q),optionName:q};if(typeof X==="number")return{type:"nodeStream",value:zH(X,X,q),optionName:q};if(f0(X,{checkOpen:!1}))return{type:"nodeStream",value:X,optionName:q};return Z},zH=(Z,X,q)=>{let Q=H8[Z];if(Q===void 0)throw TypeError(`The \`${q}: ${X}\` option is invalid: no such standard stream.`);return Q};var RH=B(()=>{l1();q1();j0();T1()});var MH=({input:Z,inputFile:X},q)=>q===0?[...OA(Z),...NA(X)]:[],OA=(Z)=>Z===void 0?[]:[{type:kA(Z),value:Z,optionName:"input"}],kA=(Z)=>{if(c1(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.")},NA=(Z)=>Z===void 0?[]:[{...xA(Z),optionName:"inputFile"}],xA=(Z)=>{if(q7(Z))return{type:"fileUrl",value:Z};if(VZ(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var FH=B(()=>{l1();j0();z0()});var DH=(Z)=>Z.filter((X,q)=>Z.every((Q,$)=>!PA(X,Q)||q>=$||X.type==="generator"||X.type==="asyncGenerator")),PA=(Z,X)=>Z.value===X.value&&Z.direction===X.direction,AH=({stdioItem:{type:Z,value:X,optionName:q},direction:Q,fileDescriptors:$,isSync:J})=>{let Y=EA($,Z);if(Y.length===0)return;if(J){vA({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});return}if(rY.has(Z))return TH({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});if(tY.has(Z))CA({otherStdioItems:Y,type:Z,value:X,optionName:q})},EA=(Z,X)=>Z.flatMap(({direction:q,stdioItems:Q})=>Q.filter(($)=>$.type===X).map(($)=>({...$,direction:q}))),vA=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})=>{if(LZ.has(X))TH({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})},TH=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})=>{let J=Z.filter((H)=>yA(H,q));if(J.length===0)return;let Y=J.find((H)=>H.direction!==$);return jH(Y,Q,X),$==="output"?J[0].stream:void 0},yA=({type:Z,value:X},q)=>{if(Z==="filePath")return X.file===q.file;if(Z==="fileUrl")return X.href===q.href;return X===q},CA=({otherStdioItems:Z,type:X,value:q,optionName:Q})=>{let $=Z.find(({value:{transform:J}})=>J===q.transform);jH($,Q,X)},jH=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${X}\` options must not target ${A1[q]} that is the same.`)};var IH=B(()=>{z0()});var H7=(Z,X,q,Q)=>{let J=UH(X,q,Q).map((H,U)=>SA({stdioOption:H,fdNumber:U,options:X,isSync:Q})),Y=nA({initialFileDescriptors:J,addProperties:Z,options:X,isSync:Q});return X.stdio=Y.map(({stdioItems:H})=>oA(H)),Y},SA=({stdioOption:Z,fdNumber:X,options:q,isSync:Q})=>{let $=K8(X),{stdioItems:J,isStdioArray:Y}=bA({stdioOption:Z,fdNumber:X,options:q,optionName:$}),H=qH(J,X,$),U=J.map((V)=>_H({stdioItem:V,isStdioArray:Y,fdNumber:X,direction:H,isSync:Q})),G=ZH(U,$,H,q),W=eY(G,H);return lA(G,W),{direction:H,objectMode:W,stdioItems:G}},bA=({stdioOption:Z,fdNumber:X,options:q,optionName:Q})=>{let $=Array.isArray(Z)?Z:[Z],J=MH(q,X),Y=[...hA($.map((G)=>gA(G,Q)),J),...J],H=DH(Y),U=H.length>1;return uA(H,U,Q),dA(H),{stdioItems:H,isStdioArray:U}},hA=(Z,X)=>X.length>0&&fA(Z)?[]:Z,fA=(Z)=>Z.length===1&&Z[0].type==="native"&&Z[0].value==="inherit",gA=(Z,X)=>{if(i6(Z))return mA(Z,X);return{type:WZ(Z,X),value:Z,optionName:X}},mA=({value:Z,input:X},q)=>{return n6(X,`${q}.input`),{type:WZ(Z,q),value:Z,direction:X?"input":void 0,optionName:q}},uA=(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:$}of Z)if(pA.has(Q))throw Error(`The \`${$}\` option must not include \`${Q}\`.`)},pA,dA=(Z)=>{for(let X of Z)cA(X)},cA=({type:Z,value:X,optionName:q})=>{if(iY(X))throw TypeError(`The \`${q}: URL\` option must use the \`file:\` scheme.
|
|
56
|
+
For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(aY(Z,X))throw TypeError(`The \`${q}: { file: '...' }\` option must be used instead of \`${q}: '...'\`.`)},lA=(Z,X)=>{if(!X)return;let q=Z.find(({type:Q})=>$7.has(Q));if(q!==void 0)throw TypeError(`The \`${q.optionName}\` option cannot use both files and transforms in objectMode.`)},nA=({initialFileDescriptors:Z,addProperties:X,options:q,isSync:Q})=>{let $=[];try{for(let J of Z)$.push(iA({fileDescriptor:J,fileDescriptors:$,addProperties:X,options:q,isSync:Q}));return $}catch(J){throw FZ($),J}},iA=({fileDescriptor:{direction:Z,objectMode:X,stdioItems:q},fileDescriptors:Q,addProperties:$,options:J,isSync:Y})=>{let H=q.map((U)=>aA({stdioItem:U,addProperties:$,direction:Z,options:J,fileDescriptors:Q,isSync:Y}));return{direction:Z,objectMode:X,stdioItems:H}},aA=({stdioItem:Z,addProperties:X,direction:q,options:Q,fileDescriptors:$,isSync:J})=>{let Y=AH({stdioItem:Z,direction:q,fileDescriptors:$,isSync:J});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...X[q][Z.type](Z,Q)}},FZ=(Z)=>{for(let{stdioItems:X}of Z)for(let{stream:q}of X)if(q!==void 0&&!b0(q))q.destroy()},oA=(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 K7=B(()=>{q1();XH();_Z();z0();$H();WH();RH();FH();IH();pA=new Set(["ignore"])});import{readFileSync as wH}from"node:fs";var kH=(Z,X)=>H7(rA,Z,X,!0),o0=({type:Z,optionName:X})=>{xH(X,A1[Z])},NH=({optionName:Z,value:X})=>{if(X==="overlapped")xH(Z,`"${X}"`);return{}},sA=(Z)=>{let{optionName:X,value:q}=Z;if(q==="pipe"&&X!=="stdin")throw TypeError(`Only the \`stdin\` option, not \`${X}\`, can be an input pipe with synchronous methods.`);return NH(Z)},xH=(Z,X)=>{throw TypeError(`The \`${Z}\` option cannot be ${X} with synchronous methods.`)},OH,rA;var PH=B(()=>{j0();K7();z0();OH={generator(){},asyncGenerator:o0,webStream:o0,nodeStream:o0,webTransform:o0,duplex:o0,asyncIterable:o0,native:NH},rA={input:{...OH,native:sA,fileUrl:({value:Z})=>({contents:[X1(wH(Z))]}),filePath:({value:{file:Z}})=>({contents:[X1(wH(Z))]}),fileNumber:o0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...OH,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:X}})=>({path:Z,append:X}),fileNumber:({value:Z})=>({path:Z}),iterable:o0,string:o0,uint8Array:o0}}});var H1=(Z,{stripFinalNewline:X},q)=>DZ(X,q)&&Z!==void 0&&!Array.isArray(Z)?y2(Z):Z,DZ=(Z,X)=>X==="all"?Z[1]||Z[2]:Z[X];var o6=B(()=>{QZ()});var U7=(Z,X,q,Q)=>Z||q?void 0:vH(X,Q),TZ=(Z,X,q)=>q?Z.flatMap((Q)=>EH(Q,X)):EH(Z,X),EH=(Z,X)=>{let{transform:q,final:Q}=vH(X,{});return[...q(Z),...Q()]},vH=(Z,X)=>{return X.previousChunks="",{transform:tA.bind(void 0,X,Z),final:ZT.bind(void 0,X)}},tA=function*(Z,X,q){if(typeof q!=="string"){yield q;return}let{previousChunks:Q}=Z,$=-1;for(let J=0;J<q.length;J+=1){if(q[J]!==`
|
|
57
|
+
`)continue;let Y=eA(q,J,X,Z),H=q.slice($+1,J+1-Y);if(Q.length>0)H=AZ(Q,H),Q="";yield H,$=J}if($!==q.length-1)Q=AZ(Q,q.slice($+1));Z.previousChunks=Q},eA=(Z,X,q,Q)=>{if(q)return 0;return Q.isWindowsNewline=X!==0&&Z[X-1]==="\r",Q.isWindowsNewline?2:1},ZT=function*({previousChunks:Z}){if(Z.length>0)yield Z},yH=({binary:Z,preserveNewlines:X,readableObjectMode:q,state:Q})=>Z||X||q?void 0:{transform:XT.bind(void 0,Q)},XT=function*({isWindowsNewline:Z=!1},X){let{unixNewline:q,windowsNewline:Q,LF:$,concatBytes:J}=typeof X==="string"?qT:$T;if(X.at(-1)===$){yield X;return}yield J(X,Z?Q:q)},AZ=(Z,X)=>`${Z}${X}`,qT,QT=(Z,X)=>{let q=new Uint8Array(Z.length+X.length);return q.set(Z,0),q.set(X,Z.length),q},$T;var G7=B(()=>{qT={windowsNewline:`\r
|
|
58
|
+
`,unixNewline:`
|
|
59
|
+
`,LF:`
|
|
60
|
+
`,concatBytes:AZ},$T={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:QT}});import{Buffer as JT}from"node:buffer";var CH=(Z,X)=>Z?void 0:YT.bind(void 0,X),YT=function*(Z,X){if(typeof X!=="string"&&!q0(X)&&!JT.isBuffer(X))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof X}.`);yield X},SH=(Z,X)=>Z?HT.bind(void 0,X):KT.bind(void 0,X),HT=function*(Z,X){bH(Z,X),yield X},KT=function*(Z,X){if(bH(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},bH=(Z,X)=>{if(X===null||X===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${X}\`.
|
|
61
|
+
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
62
|
+
if (condition) { yield value; }`)};var hH=B(()=>{j0()});import{Buffer as UT}from"node:buffer";import{StringDecoder as GT}from"node:string_decoder";var W7=(Z,X,q)=>{if(q)return;if(Z)return{transform:WT.bind(void 0,new TextEncoder)};let Q=new GT(X);return{transform:VT.bind(void 0,Q),final:BT.bind(void 0,Q)}},WT=function*(Z,X){if(UT.isBuffer(X))yield X1(X);else if(typeof X==="string")yield Z.encode(X);else yield X},VT=function*(Z,X){yield q0(X)?Z.write(X):X},BT=function*(Z){let X=Z.end();if(X!=="")yield X};var jZ=B(()=>{j0()});import{callbackify as fH}from"node:util";var IZ,V7=async function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=zT}=X[q];for await(let $ of Q(Z))yield*V7($,X,q+1)},gH=async function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*LT(q,Number(X),Z)},LT=async function*(Z,X,q){if(Z===void 0)return;for await(let Q of Z())yield*V7(Q,q,X+1)},mH,zT=function*(Z){yield Z};var uH=B(()=>{IZ=fH(async(Z,X,q,Q)=>{X.currentIterable=Z(...q);try{for await(let $ of X.currentIterable)Q.push($)}finally{delete X.currentIterable}}),mH=fH(async({currentIterable:Z},X)=>{if(Z!==void 0){await(X?Z.throw(X):Z.return());return}if(X)throw X})});var wZ=(Z,X,q,Q)=>{try{for(let $ of Z(...X))q.push($);Q()}catch($){Q($)}},pH=(Z,X)=>[...X.flatMap((q)=>[...a1(q,Z,0)]),...s6(Z)],a1=function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=RT}=X[q];for(let $ of Q(Z))yield*a1($,X,q+1)},s6=function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*_T(q,Number(X),Z)},_T=function*(Z,X,q){if(Z===void 0)return;for(let Q of Z())yield*a1(Q,q,X+1)},RT=function*(Z){yield Z};var OZ=()=>{};import{Transform as MT,getDefaultHighWaterMark as dH}from"node:stream";var kZ=({value:Z,value:{transform:X,final:q,writableObjectMode:Q,readableObjectMode:$},optionName:J},{encoding:Y})=>{let H={},U=cH(Z,Y,J),G=i1(X),W=i1(q),V=G?IZ.bind(void 0,V7,H):wZ.bind(void 0,a1),L=G||W?IZ.bind(void 0,gH,H):wZ.bind(void 0,s6),z=G||W?mH.bind(void 0,H):void 0;return{stream:new MT({writableObjectMode:Q,writableHighWaterMark:dH(Q),readableObjectMode:$,readableHighWaterMark:dH($),transform(R,M,F){V([R,U,0],this,F)},flush(R){L([U],this,R)},destroy:z})}},B7=(Z,X,q,Q)=>{let $=X.filter(({type:Y})=>Y==="generator"),J=Q?$.reverse():$;for(let{value:Y,optionName:H}of J){let U=cH(Y,q,H);Z=pH(U,Z)}return Z},cH=({transform:Z,final:X,binary:q,writableObjectMode:Q,readableObjectMode:$,preserveNewlines:J},Y,H)=>{let U={};return[{transform:CH(Q,H)},W7(q,Y,Q),U7(q,J,Q,U),{transform:Z,final:X},{transform:SH($,H)},yH({binary:q,preserveNewlines:J,readableObjectMode:$,state:U})].filter(Boolean)};var L7=B(()=>{z0();G7();hH();jZ();uH();OZ()});var lH=(Z,X)=>{for(let q of FT(Z))DT(Z,q,X)},FT=(Z)=>new Set(Object.entries(Z).filter(([,{direction:X}])=>X==="input").map(([X])=>Number(X))),DT=(Z,X,q)=>{let{stdioItems:Q}=Z[X],$=Q.filter(({contents:H})=>H!==void 0);if($.length===0)return;if(X!==0){let[{type:H,optionName:U}]=$;throw TypeError(`Only the \`stdin\` option, not \`${U}\`, can be ${A1[H]} with synchronous methods.`)}let Y=$.map(({contents:H})=>H).map((H)=>AT(H,Q));q.input=x6(Y)},AT=(Z,X)=>{let q=B7(Z,X,"utf8",!0);return TT(q),x6(q)},TT=(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 nH=B(()=>{L7();j0();z0()});var z7=({stdioItems:Z,encoding:X,verboseInfo:q,fdNumber:Q})=>Q!=="all"&&I2(q,Q)&&!I0.has(X)&&jT(Q)&&(Z.some(({type:$,value:J})=>$==="native"&&IT.has(J))||Z.every(({type:$})=>P0.has($))),jT=(Z)=>Z===1||Z===2,IT,iH=async(Z,X,q,Q)=>{for await(let $ of Z)if(!wT(X))oH($,q,Q)},aH=(Z,X,q)=>{for(let Q of Z)oH(Q,X,q)},wT=(Z)=>Z._readableState.pipes.length>0,oH=(Z,X,q)=>{let Q=z8(Z);l0({type:"output",verboseMessage:Q,fdNumber:X,verboseInfo:q})};var NZ=B(()=>{p1();z0();w2();M1();IT=new Set(["pipe","overlapped"])});import{writeFileSync as OT,appendFileSync as kT}from"node:fs";var sH=({fileDescriptors:Z,syncResult:{output:X},options:q,isMaxBuffer:Q,verboseInfo:$})=>{if(X===null)return{output:Array.from({length:3})};let J={},Y=new Set;return{output:X.map((U,G)=>NT({result:U,fileDescriptors:Z,fdNumber:G,state:J,outputFiles:Y,isMaxBuffer:Q,verboseInfo:$},q)),...J}},NT=({result:Z,fileDescriptors:X,fdNumber:q,state:Q,outputFiles:$,isMaxBuffer:J,verboseInfo:Y},{buffer:H,encoding:U,lines:G,stripFinalNewline:W,maxBuffer:V})=>{if(Z===null)return;let L=PY(Z,J,V),z=X1(L),{stdioItems:_,objectMode:R}=X[q],M=xT([z],_,U,Q),{serializedResult:F,finalResult:N=F}=PT({chunks:M,objectMode:R,encoding:U,lines:G,stripFinalNewline:W,fdNumber:q});ET({serializedResult:F,fdNumber:q,state:Q,verboseInfo:Y,encoding:U,stdioItems:_,objectMode:R});let D=H[q]?N:void 0;try{if(Q.error===void 0)vT(F,_,$);return D}catch(w){return Q.error=w,D}},xT=(Z,X,q,Q)=>{try{return B7(Z,X,q,!1)}catch($){return Q.error=$,Z}},PT=({chunks:Z,objectMode:X,encoding:q,lines:Q,stripFinalNewline:$,fdNumber:J})=>{if(X)return{serializedResult:Z};if(q==="buffer")return{serializedResult:x6(Z)};let Y=$J(Z,q);if(Q[J])return{serializedResult:Y,finalResult:TZ(Y,!$[J],X)};return{serializedResult:Y}},ET=({serializedResult:Z,fdNumber:X,state:q,verboseInfo:Q,encoding:$,stdioItems:J,objectMode:Y})=>{if(!z7({stdioItems:J,encoding:$,verboseInfo:Q,fdNumber:X}))return;let H=TZ(Z,!1,Y);try{aH(H,X,Q)}catch(U){q.error??=U}},vT=(Z,X,q)=>{let Q=X.filter(({type:$})=>$7.has($));for(let{path:$,append:J}of Q){let Y=typeof $==="string"?$:$.toString();if(J||q.has(Y))kT($,Z);else q.add(Y),OT($,Z)}};var rH=B(()=>{NZ();L7();G7();j0();z0();n1()});var tH=([,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,H1(X,q,"all")];if(Array.isArray(X))return[H1(Z,q,"all"),...X];if(q0(Z)&&q0(X))return I3([Z,X]);return`${Z}${X}`};var eH=B(()=>{j0();o6()});import{once as xZ}from"node:events";var ZK=async(Z,X)=>{let[q,Q]=await yT(Z);return X.isForcefullyTerminated??=!1,[q,Q]},yT=async(Z)=>{let[X,q]=await Promise.allSettled([xZ(Z,"spawn"),xZ(Z,"exit")]);if(X.status==="rejected")return[];return q.status==="rejected"?XK(Z):q.value},XK=async(Z)=>{try{return await xZ(Z,"exit")}catch{return XK(Z)}},qK=async(Z)=>{let[X,q]=await Z;if(!CT(X,q)&&PZ(X,q))throw new n0;return[X,q]},CT=(Z,X)=>Z===void 0&&X===void 0,PZ=(Z,X)=>Z!==0||X!==null;var EZ=B(()=>{m1()});var QK=({error:Z,status:X,signal:q,output:Q},{maxBuffer:$})=>{let J=ST(Z,X,q),Y=J?.code==="ETIMEDOUT",H=xY(J,Q,$);return{resultError:J,exitCode:X,signal:q,timedOut:Y,isMaxBuffer:H}},ST=(Z,X,q)=>{if(Z!==void 0)return Z;return PZ(X,q)?new n0:void 0};var $K=B(()=>{m1();n1();EZ()});import{spawnSync as bT}from"node:child_process";var JK=(Z,X,q)=>{let{file:Q,commandArguments:$,command:J,escapedCommand:Y,startTime:H,verboseInfo:U,options:G,fileDescriptors:W}=hT(Z,X,q),V=mT({file:Q,commandArguments:$,options:G,command:J,escapedCommand:Y,verboseInfo:U,fileDescriptors:W,startTime:H});return b2(V,U,G)},hT=(Z,X,q)=>{let{command:Q,escapedCommand:$,startTime:J,verboseInfo:Y}=M8(Z,X,q),H=fT(q),{file:U,commandArguments:G,options:W}=p8(Z,X,H);gT(W);let V=kH(W,Y);return{file:U,commandArguments:G,command:Q,escapedCommand:$,startTime:J,verboseInfo:Y,options:W,fileDescriptors:V}},fT=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,gT=({ipc:Z,ipcInput:X,detached:q,cancelSignal:Q,killDescendants:$})=>{if(X)r6("ipcInput");if(Z)r6("ipc: true");if(q)r6("detached: true");if($)r6("killDescendants: true");if(Q)r6("cancelSignal")},r6=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},mT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,verboseInfo:J,fileDescriptors:Y,startTime:H})=>{let U=uT({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,fileDescriptors:Y,startTime:H});if(U.failed)return U;let{resultError:G,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z}=QK(U,q),{output:_,error:R=G}=sH({fileDescriptors:Y,syncResult:U,options:q,isMaxBuffer:z,verboseInfo:J}),M=_.map((N,D)=>H1(N,q,D)),F=H1(tH(_,q),q,"all");return dT({error:R,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z,stdio:M,all:F,options:q,command:Q,escapedCommand:$,startTime:H})},uT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,fileDescriptors:J,startTime:Y})=>{try{lH(J,q);let H=pT(q);return bT(...d8(Z,X,H))}catch(H){return S2({error:H,command:Q,escapedCommand:$,fileDescriptors:J,options:q,startTime:Y,isSync:!0})}},pT=({encoding:Z,maxBuffer:X,...q})=>({...q,encoding:"buffer",maxBuffer:e8(X)}),dT=({error:Z,exitCode:X,signal:q,timedOut:Q,isMaxBuffer:$,stdio:J,all:Y,options:H,command:U,escapedCommand:G,startTime:W})=>Z===void 0?Z7({command:U,escapedCommand:G,stdio:J,all:Y,ipcOutput:[],options:H,startTime:W}):c6({error:Z,command:U,escapedCommand:G,timedOut:Q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:$,isForcefullyTerminated:!1,exitCode:X,signal:q,stdio:J,all:Y,ipcOutput:[],options:H,startTime:W,isSync:!0});var YK=B(()=>{v3();XZ();qZ();l6();X7();PH();o6();nH();rH();n1();eH();$K()});import{once as vZ,on as cT}from"node:events";var yZ,HK=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},$={})=>{let{reference:J=!0,filter:Y}=$,{signal:H}=$[yZ]??{};return O2({methodName:"getOneMessage",isSubprocess:q,ipc:Q,isConnected:b8(Z)}),lT({anyProcess:Z,channel:X,isSubprocess:q,filter:Y,reference:J,signal:H})},lT=async({anyProcess:Z,channel:X,isSubprocess:q,filter:Q,reference:$,signal:J})=>{P8(X,$);let Y=D1(Z,X,q),H=new AbortController;nT(J,H);try{return await Promise.race([iT(Y,Q,H),aT(Y,q,H),oT(Y,q,H)])}catch(U){throw k2(Z),U}finally{H.abort(),E8(X,$)}},nT=(Z,X)=>{if(Z===void 0)return;if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},iT=async(Z,X,{signal:q})=>{if(X===void 0){let[Q]=await vZ(Z,"message",{signal:q});return Q}for await(let[Q]of cT(Z,"message",{signal:q}))if(X(Q))return Q},aT=async(Z,X,{signal:q})=>{await vZ(Z,"disconnect",{signal:q}),U9(X)},oT=async(Z,X,{signal:q})=>{let[Q]=await vZ(Z,"strict:error",{signal:q});throw N8(Q,X)};var CZ=B(()=>{N2();S6();y6();yZ=Symbol("internalGetOneMessageOptions")});import{once as UK,on as sT}from"node:events";var SZ,GK=(Z,X={})=>{let{reference:q=!0}=X,{signal:Q,shouldAwait:$=!Z.isSubprocess}=X[SZ]??{};return bZ({...Z,shouldAwait:$,reference:q,signal:Q})},bZ=({anyProcess:Z,waitProcess:X=Z,channel:q,isSubprocess:Q,ipc:$,shouldAwait:J,reference:Y,signal:H})=>{O2({methodName:"getEachMessage",isSubprocess:Q,ipc:$,isConnected:b8(Z)}),P8(q,Y);let U=D1(Z,q,Q),G=new AbortController,W={};return rT(H,G),tT(Z,U,G),eT({ipcEmitter:U,isSubprocess:Q,controller:G,state:W}),Zj({anyProcess:Z,waitProcess:X,channel:q,ipcEmitter:U,isSubprocess:Q,shouldAwait:J,controller:G,state:W,reference:Y})},rT=(Z,X)=>{if(Z===void 0)return;if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},tT=async(Z,X,q)=>{try{await UK(X,"disconnect",{signal:q.signal}),q.abort()}catch{}},eT=async({ipcEmitter:Z,isSubprocess:X,controller:q,state:Q})=>{try{let[$]=await UK(Z,"strict:error",{signal:q.signal});Q.error=N8($,X),q.abort()}catch{}},Zj=async function*({anyProcess:Z,waitProcess:X,channel:q,ipcEmitter:Q,isSubprocess:$,shouldAwait:J,controller:Y,state:H,reference:U}){try{for await(let[G]of sT(Q,"message",{signal:Y.signal}))KK(H),yield G}catch{KK(H)}finally{if(Y.abort(),E8(q,U),!$)k2(Z);if(J)await X}},KK=({error:Z})=>{if(Z)throw Z};var _7=B(()=>{N2();S6();y6();SZ=Symbol("internalGetEachMessageOptions")});import WK from"node:process";var VK=(Z,X,{ipc:q})=>{Object.assign(Z,LK(X,!1,q,Z))},BK=()=>{let Z=WK,X=!0,q=WK.channel!==void 0;return{...LK(Z,!0,q),getCancelSignal:h9.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:q})}},LK=(Z,X,q,Q=Z)=>({sendMessage:P2.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getOneMessage:HK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getEachMessage:GK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q,waitProcess:Q})});var hZ=B(()=>{b6();CZ();_7();C8()});import{ChildProcess as Xj}from"node:child_process";import{PassThrough as qj,Readable as _K,Writable as RK,Duplex as MK}from"node:stream";var FK=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,verboseInfo:Y})=>{FZ(Q);let H=new Xj,U=Qj(H,Q),G=S2({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,isSync:!1}),W=Hj(G,Y,$);return{subprocess:H,promise:W,all:$.all?U:void 0,convertedStreams:{readable:DK,writable:AK,duplex:TK,readableStream:$j,writableStream:Jj,transformStream:Yj,iterable:zK,[Symbol.asyncIterator]:zK}}},Qj=(Z,X)=>{let q=t6(),Q=t6(),$=t6(),J=Array.from({length:X.length-3},t6),Y=t6(),H=[q,Q,$,...J];return Object.assign(Z,{stdin:q,stdout:Q,stderr:$,stdio:H}),Y},t6=()=>{let Z=new qj;return Z.end(),Z},DK=()=>new _K({read(){}}),AK=()=>new RK({write(){}}),TK=()=>new MK({read(){},write(){}}),$j=()=>_K.toWeb(DK()),Jj=()=>RK.toWeb(AK()),Yj=()=>MK.toWeb(TK()),zK=async function*(){},Hj=async(Z,X,q)=>b2(Z,X,q);var jK=B(()=>{K7();l6();X7()});import{createReadStream as IK,createWriteStream as wK}from"node:fs";import{Buffer as Kj}from"node:buffer";import{Readable as e6,Writable as Uj,Duplex as Gj}from"node:stream";var kK=(Z,X)=>H7(Wj,Z,X,!1),Z4=({type:Z,optionName:X})=>{throw TypeError(`The \`${X}\` option cannot be ${A1[Z]}.`)},OK,Wj;var NK=B(()=>{L7();K7();z0();OK={fileNumber:Z4,generator:kZ,asyncGenerator:kZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:X,readableObjectMode:q}}){let Q=X||q;return{stream:Gj.fromWeb(Z,{objectMode:Q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},Wj={input:{...OK,fileUrl:({value:Z})=>({stream:IK(Z)}),filePath:({value:{file:Z}})=>({stream:IK(Z)}),webStream:({value:Z})=>({stream:e6.fromWeb(Z)}),iterable:({value:Z})=>({stream:e6.from(Z)}),asyncIterable:({value:Z})=>({stream:e6.from(Z)}),string:({value:Z})=>({stream:e6.from(Z)}),uint8Array:({value:Z})=>({stream:e6.from(Kj.from(Z))})},output:{...OK,fileUrl:({value:Z})=>({stream:wK(Z)}),filePath:({value:{file:Z,append:X}})=>({stream:wK(Z,X?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:Uj.fromWeb(Z)}),iterable:Z4,asyncIterable:Z4,string:Z4,uint8Array:Z4}}});import{on as Vj,once as xK}from"node:events";import{PassThrough as Bj,getDefaultHighWaterMark as Lj}from"node:stream";import{finished as vK}from"node:stream/promises";function o1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let $ of Z)fZ($);let X=Z.some(({readableObjectMode:$})=>$),q=zj(Z,X),Q=new yK({objectMode:X,writableHighWaterMark:q,readableHighWaterMark:q});for(let $ of Z)Q.add($);return Q}var zj=(Z,X)=>{if(Z.length===0)return Lj(X);let q=Z.filter(({readableObjectMode:Q})=>Q===X).map(({readableHighWaterMark:Q})=>Q);return Math.max(...q)},yK,_j=async(Z,X,q)=>{R7(Z,PK);let Q=new AbortController;try{await Promise.race([Rj(Z,Q),Mj(Z,X,q,Q)])}finally{Q.abort(),R7(Z,-PK)}},Rj=async(Z,{signal:X})=>{try{await vK(Z,{signal:X,cleanup:!0})}catch(q){throw CK(Z,q),q}},Mj=async(Z,X,q,{signal:Q})=>{for await(let[$]of Vj(Z,"unpipe",{signal:Q}))if(X.has($))$.emit(q)},fZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},Fj=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,onFinished:J,unpipeEvent:Y})=>{R7(Z,EK);let H=new AbortController;try{await Promise.race([Dj(J,X,H),Aj({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,controller:H}),Tj({stream:X,streams:q,ended:Q,aborted:$,unpipeEvent:Y,controller:H})])}finally{H.abort(),R7(Z,-EK)}if(q.size>0&&q.size===Q.size+$.size)if(Q.size===0&&$.size>0)gZ(Z);else jj(Z)},Dj=async(Z,X,{signal:q})=>{try{if(await Z,!q.aborted)gZ(X)}catch(Q){if(!q.aborted)CK(X,Q)}},Aj=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,controller:{signal:J}})=>{try{if(await vK(X,{signal:J,cleanup:!0,readable:!0,writable:!1}),q.has(X))Q.add(X)}catch(Y){if(J.aborted||!q.has(X))return;if(SK(Y))$.add(X);else bK(Z,Y)}},Tj=async({stream:Z,streams:X,ended:q,aborted:Q,unpipeEvent:$,controller:{signal:J}})=>{if(await xK(Z,$,{signal:J}),!Z.readable)return xK(J,"abort",{signal:J});X.delete(Z),q.delete(Z),Q.delete(Z)},jj=(Z)=>{if(Z.writable)Z.end()},CK=(Z,X)=>{if(SK(X))gZ(Z);else bK(Z,X)},SK=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",gZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},bK=(Z,X)=>{if(!Z.destroyed)Z.once("error",Ij),Z.destroy(X)},Ij=()=>{},R7=(Z,X)=>{let q=Z.getMaxListeners();if(q!==0&&q!==Number.POSITIVE_INFINITY)Z.setMaxListeners(q+X)},PK=2,EK=1;var M7=B(()=>{yK=class yK extends Bj{#q=new Set([]);#Q=new Set([]);#X=new Set([]);#Y;#K=Symbol("unpipe");#V=new WeakMap;add(Z){if(fZ(Z),this.#q.has(Z))return;this.#q.add(Z),this.#Y??=_j(this,this.#q,this.#K);let X=Fj({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(fZ(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 hK}from"node:stream/promises";var g2=(Z,X)=>{Z.pipe(X),wj(Z,X),Oj(Z,X)},wj=async(Z,X)=>{if(b0(Z)||b0(X))return;try{await hK(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}mZ(X)},mZ=(Z)=>{if(Z.writable)Z.end()},Oj=async(Z,X)=>{if(b0(Z)||b0(X))return;try{await hK(X,{cleanup:!0,readable:!1,writable:!0})}catch{}uZ(Z)},uZ=(Z)=>{if(Z.readable)Z.destroy()};var F7=B(()=>{q1()});var fK=(Z,X,q)=>{let Q=new Map;for(let[$,{stdioItems:J,direction:Y}]of Object.entries(X)){let H=J.filter(({type:G})=>P0.has(G));for(let{stream:G}of H)kj(Z,G,Y,$);let U=J.filter(({type:G})=>!P0.has(G));for(let{stream:G}of U)xj({subprocess:Z,stream:G,direction:Y,fdNumber:$,pipeGroups:Q,controller:q})}for(let[$,J]of Q){let Y=J.length===1?J[0]:o1(J);g2(Y,$)}},kj=(Z,X,q,Q)=>{if(q==="output")g2(Z.stdio[Q],X);else g2(X,Z.stdio[Q]);let $=Nj[Q];if($!==void 0)Z[$]=X;Z.stdio[Q]=X},Nj,xj=({subprocess:Z,stream:X,direction:q,fdNumber:Q,pipeGroups:$,controller:J})=>{if(X===void 0)return;Pj(X,J);let[Y,H]=q==="output"?[X,Z.stdio[Q]]:[Z.stdio[Q],X],U=$.get(Y)??[];$.set(Y,[...U,H])},Pj=(Z,{signal:X})=>{if(b0(Z))u1(Z,Ej,X)},Ej=2;var gK=B(()=>{M7();q1();x8();z0();F7();Nj=["stdin","stdout","stderr"]});import D7 from"node:process";import{execFile as vj}from"node:child_process";import mK from"node:path/win32";var uK,pK=(Z)=>Z.killDescendants&&!uK?{...Z,detached:!0}:Z,dK=(Z,{killDescendants:X})=>{if(!X)return Z.kill.bind(Z);return(uK?Cj:yj).bind(void 0,Z)},yj=(Z,X)=>{if(Z.pid===void 0)return!1;try{return D7.kill(-Z.pid,X)}catch{return Z.kill(X)}},Cj=(Z,X)=>{if(Z.pid===void 0)return!1;let q=Sj();if(q===void 0)return Z.kill(X);return vj(q,["/pid",`${Z.pid}`,"/T","/F"],(Q)=>{if(Q)Z.kill(X)}),!0},Sj=()=>{let Z=[D7.env.SystemRoot,D7.env.windir].find((X)=>X&&bj(X));return Z===void 0?void 0:mK.join(Z,"System32","taskkill.exe")},bj=(Z)=>{let{root:X}=mK.parse(Z);return/^[a-z]:[/\\]/i.test(X)};var cK=B(()=>{uK=D7.platform==="win32"});var s1;var lK=B(()=>{s1=[];s1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")s1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")s1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class nK{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(dZ[pZ])return dZ[pZ];hj(dZ,pZ,{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 $ of this.listeners[Z])Q=$(X,q)===!0||Q;if(Z==="exit")Q=this.emit("afterExit",X,q)||Q;return Q}}class lZ{}var A7=(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",pZ,dZ,hj,fj=(Z)=>{return{onExit(X,q){return Z.onExit(X,q)},load(){return Z.load()},unload(){return Z.unload()}}},iK,aK,cZ,oK,Kp,Up;var sK=B(()=>{lK();pZ=Symbol.for("signal-exit emitter"),dZ=globalThis,hj=Object.defineProperty.bind(Object);iK=class iK extends lZ{onExit(){return()=>{}}load(){}unload(){}};aK=class aK extends lZ{#q=cZ.platform==="win32"?"SIGINT":"SIGHUP";#Q=new nK;#X;#Y;#K;#V={};#A=!1;constructor(Z){super();this.#X=Z,this.#V={};for(let X of s1)this.#V[X]=()=>{let q=this.#X.listeners(X),{count:Q}=this.#Q,$=Z;if(typeof $.__signal_exit_emitter__==="object"&&typeof $.__signal_exit_emitter__.count==="number")Q+=$.__signal_exit_emitter__.count;if(q.length===Q){this.unload();let J=this.#Q.emit("exit",null,X),Y=X==="SIGHUP"?this.#q:X;if(!J)Z.kill(Z.pid,Y)}};this.#K=Z.reallyExit,this.#Y=Z.emit}onExit(Z,X){if(!A7(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 s1)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)}}unload(){if(!this.#A)return;this.#A=!1,s1.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){if(!A7(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"&&A7(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)}};cZ=globalThis.process,{onExit:oK,load:Kp,unload:Up}=fj(A7(cZ)?new aK(cZ):new iK)});import{addAbortListener as gj}from"node:events";var rK=(Z,{cleanup:X,detached:q},{signal:Q})=>{if(!X||q)return;let $=oK(()=>{Z()});gj(Q,()=>{$()})};var tK=B(()=>{sK()});var T7=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),X4=(Z,X,q)=>{let Q=Z[q];if(!Q.has(X))Q.set(X,[]);let $=Q.get(X),J=i0();return $.push(J),{resolve:J.resolve.bind(J),promises:$}},m2=async({resolve:Z,promises:X},q)=>{Z();let[Q]=await Promise.race([Promise.allSettled([!0,q]),Promise.all([!1,...X])]);return!Q};var q4=B(()=>{x2()});import{on as mj}from"node:events";import{getDefaultHighWaterMark as uj}from"node:stream";var j7=({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:Q,encoding:$,preserveNewlines:J})=>{let Y=new AbortController;return pj(X,Y),ZU({stream:Z,controller:Y,binary:q,shouldEncode:!Z.readableObjectMode&&Q,encoding:$,shouldSplit:!Z.readableObjectMode,preserveNewlines:J})},pj=async(Z,X)=>{try{await Z}catch{}finally{X.abort()}},nZ=({stream:Z,onStreamEnd:X,lines:q,encoding:Q,stripFinalNewline:$,allMixed:J})=>{let Y=new AbortController;dj(X,Y,Z);let H=Z.readableObjectMode&&!J;return ZU({stream:Z,controller:Y,binary:Q==="buffer",shouldEncode:!H,encoding:Q,shouldSplit:!H&&q,preserveNewlines:!$})},dj=async(Z,X,q)=>{try{await Z}catch{q.destroy()}finally{X.abort()}},ZU=({stream:Z,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y})=>{let H=mj(Z,"data",{signal:X.signal,highWaterMark:eK,highWatermark:eK});return cj({onStdoutChunk:H,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y})},iZ,eK,cj=async function*({onStdoutChunk:Z,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y}){let H=lj({binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y});try{for await(let[U]of Z)yield*a1(U,H,0)}catch(U){if(!X.signal.aborted)throw U}finally{yield*s6(H)}},lj=({binary:Z,shouldEncode:X,encoding:q,shouldSplit:Q,preserveNewlines:$})=>[W7(Z,q,!X),U7(Z,$,!Q,{})].filter(Boolean);var I7=B(()=>{jZ();G7();OZ();iZ=uj(!0),eK=iZ});var u2=(Z,X,{from:q,binary:Q=!1,preserveNewlines:$=!1}={})=>{let J=Q||I0.has(X),Y=f2(Z,q),H=j7({subprocessStdout:Y,subprocess:Z,binary:J,shouldEncode:!0,encoding:X,preserveNewlines:$});return nj(H,Y,Z)},nj=async function*(Z,X,q){try{yield*Z}finally{if(X.readable)X.destroy();await q}};var aZ=B(()=>{p1();T1();I7()});import{finished as ij}from"node:stream/promises";var Q4=async(Z,X,q,{isSameDirection:Q,stopOnExit:$=!1}={})=>{let J=aj(Z,q),Y=new AbortController;try{await Promise.race([...$?[q.exitPromise]:[],ij(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!J.stdinCleanedUp)rj(H,X,q,Q)}finally{Y.abort()}},aj=(Z,{originalStreams:X,subprocess:q})=>{let[Q]=X,$={stdinCleanedUp:!1};if(Z===Q)oj(Z,q,$);return $},oj=(Z,X,q)=>{let{_destroy:Q}=Z;Z._destroy=(...$)=>{sj(X,q),Q.call(Z,...$)}},sj=({exitCode:Z,signalCode:X},q)=>{if(Z!==null||X!==null)q.stdinCleanedUp=!0},rj=(Z,X,q,Q)=>{if(!tj(Z,X,q,Q))throw Z},tj=(Z,X,q,Q=!0)=>{if(q.propagating)return XU(Z)||p2(Z);return q.propagating=!0,oZ(q,X)===Q?XU(Z):p2(Z)},oZ=({fileDescriptors:Z},X)=>X!=="all"&&Z[X].direction==="input",p2=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",XU=(Z)=>Z?.code==="EPIPE";var $4=()=>{};import{finished as qU}from"node:stream/promises";var sZ=async(Z)=>{if(Z===void 0)return;try{await rZ(Z)}catch{}},QU=async(Z)=>{if(Z===void 0)return;try{await tZ(Z)}catch{}},rZ=async(Z)=>{await qU(Z,{cleanup:!0,readable:!1,writable:!0})},tZ=async(Z)=>{await qU(Z,{cleanup:!0,readable:!0,writable:!1})},w7=async(Z,X)=>{if(await Z,X)throw X},O7=(Z,X,q)=>{if(q&&!p2(q))Z.destroy(q);else if(X)Z.destroy()};var eZ=B(()=>{$4()});import{Readable as ej}from"node:stream";import{callbackify as ZI}from"node:util";var k7=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,binary:$=!0,preserveNewlines:J=!0}={})=>{let Y=$||I0.has(q),{subprocessStdout:H,waitReadableDestroy:U}=ZX(Z,Q,X),{readableEncoding:G,readableObjectMode:W,readableHighWaterMark:V}=XX(H,Y),{read:L,onStdoutDataDone:z}=qX({subprocessStdout:H,subprocess:Z,binary:Y,encoding:q,preserveNewlines:J}),_=new ej({read:L,destroy:ZI($X.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:U})),highWaterMark:V,objectMode:W,encoding:G});return QX({subprocessStdout:H,onStdoutDataDone:z,readable:_,subprocess:Z}),_},ZX=(Z,X,q)=>{let Q=f2(Z,X),$=X4(q,Q,"readableDestroy");return{subprocessStdout:Q,waitReadableDestroy:$}},XX=({readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q},Q)=>Q?{readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:iZ},qX=({subprocessStdout:Z,subprocess:X,binary:q,encoding:Q,preserveNewlines:$})=>{let J=i0(),Y=j7({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:!q,encoding:Q,preserveNewlines:$});return{read(){XI(this,Y,J)},onStdoutDataDone:J}},XI=async(Z,X,q)=>{try{let{value:Q,done:$}=await X.next();if($)q.resolve();else Z.push(Q)}catch{}},QX=async({subprocessStdout:Z,onStdoutDataDone:X,readable:q,subprocess:Q,subprocessStdin:$})=>{try{if(await tZ(Z),await Q,await sZ($),await X,q.readable)q.push(null)}catch(J){await sZ($),$U(q,await qI(Q,J))}},qI=async(Z,X)=>{if(X.code!=="ERR_STREAM_PREMATURE_CLOSE")return X;try{await Z}catch(q){return q}return X},$X=async({subprocessStdout:Z,subprocess:X,waitReadableDestroy:q},Q)=>{if(!await m2(q,X))return;$U(Z,Q),await w7(X,Q)},$U=(Z,X)=>{O7(Z,Z.readable,X)};var N7=B(()=>{p1();T1();I7();x2();q4();eZ()});import{Readable as QI,Writable as $I,Duplex as JI}from"node:stream";var x7=(Z,X)=>QI.toWeb(Z.readable(X)),JU=(Z,X)=>$I.toWeb(Z.writable(X)),YU=(Z,X)=>JI.toWeb(Z.duplex(X));var JX=()=>{};var KU=({source:Z,sourcePromise:X,boundOptions:q,createNested:Q},...$)=>{let J=_8(),{destination:Y,destinationStream:H,destinationError:U,from:G,unpipeSignal:W}=YI(q,Q,$),{sourceStream:V,sourceError:L}=KI(Z,G),{options:z,fileDescriptors:_}=a0.get(Z);return{sourcePromise:X,sourceStream:V,sourceOptions:z,sourceError:L,destination:Y,destinationStream:H,destinationError:U,unpipeSignal:W,fileDescriptors:_,startTime:J}},YI=(Z,X,q)=>{try{let{destination:Q,pipeOptions:{from:$,to:J,unpipeSignal:Y}={}}=HI(Z,X,...q),H=Y7(Q,J);return{destination:Q,destinationStream:H,from:$,unpipeSignal:Y}}catch(Q){return{destinationError:Q}}},HI=(Z,X,q,...Q)=>{if(Array.isArray(q))return{destination:X(HU,Z)(q,...Q),pipeOptions:Z};if(typeof q==="string"||q instanceof URL||A3(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]=J8(q,...Q);return{destination:X(HU)($,J,Y),pipeOptions:Y}}if(a0.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}`)},HU=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),KI=(Z,X)=>{try{return{sourceStream:f2(Z,X)}}catch(q){return{sourceError:q}}};var UU=B(()=>{j3();R8();T1();T2()});var WU=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q,fileDescriptors:$,sourceOptions:J,startTime:Y})=>{let H=UI({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q});if(H!==void 0)throw YX({error:H,fileDescriptors:$,sourceOptions:J,startTime:Y})},UI=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q})=>{if(X!==void 0&&Q!==void 0)return Q;if(Q!==void 0)return uZ(Z),Q;if(X!==void 0)return mZ(q),X},YX=({error:Z,fileDescriptors:X,sourceOptions:q,startTime:Q})=>S2({error:Z,command:GU,escapedCommand:GU,fileDescriptors:X,options:q,startTime:Q,isSync:!1}),GU="source.pipe(destination)";var HX=B(()=>{l6();F7()});var VU=async(Z)=>{let[{status:X,reason:q,value:Q=q},{status:$,reason:J,value:Y=J}]=await Z;if(!Y.pipedFrom.includes(Q))Y.pipedFrom.push(Q);if($==="rejected")throw Y;if(X==="rejected")throw Q;return Y};var BU=()=>{};import{finished as GI}from"node:stream/promises";var LU=(Z,X,q)=>{let Q=P7.has(X)?VI(Z,X):WI(Z,X);return u1(Z,LI,q.signal),u1(X,zI,q.signal),BI(X),Q},WI=(Z,X)=>{let q=o1([Z]);return g2(q,X),P7.set(X,q),q},VI=(Z,X)=>{let q=P7.get(X);return q.add(Z),q},BI=async(Z)=>{try{await GI(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}P7.delete(Z)},P7,LI=2,zI=1;var zU=B(()=>{M7();x8();F7();P7=new WeakMap});import{aborted as _I}from"node:util";var _U=(Z,X)=>Z===void 0?[]:[RI(Z,X)],RI=async(Z,{sourceStream:X,mergedStream:q,fileDescriptors:Q,sourceOptions:$,startTime:J})=>{await _I(Z,X),await q.remove(X);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw YX({error:Y,fileDescriptors:Q,sourceOptions:$,startTime:J})};var RU=B(()=>{HX()});var E7=(Z,...X)=>{if(e(X[0]))return E7.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...X[0]}});let{destination:q,...Q}=KU(Z,...X),$=new AbortController,J=PI({...Q,destination:q,pipeFailureController:$});return J.pipe=E7.bind(void 0,{...Z,source:q,sourcePromise:J,boundOptions:{}}),MI(J,q,$.signal),J},MI=(Z,X,q)=>{if(X===void 0)return;FI(Z,X),jI(Z,X,q)},FI=(Z,X)=>{let q=a0.get(X);a0.set(Z,q),Z.stdio=X.stdio,Z.all=X.all;let{options:{encoding:Q}}=q,$=T7();Z[Symbol.asyncIterator]=u2.bind(void 0,Z,Q,{}),Z.iterable=u2.bind(void 0,Z,Q),Z.readable=AI.bind(void 0,Z,{subprocess:Z,concurrentStreams:$,encoding:Q}),Z.readableStream=x7.bind(void 0,Z),DI(Z,X)},DI=(Z,X)=>{if(X.all===void 0){Z.all=void 0;return}Object.defineProperty(Z,"all",{get(){MU(Z,X.all);let q=Z.readable({from:"all"});return MU(Z,q),q},enumerable:!0,configurable:!0})},MU=(Z,X)=>{Object.defineProperty(Z,"all",{value:X,writable:!0,enumerable:!0,configurable:!0})},AI=(Z,X,...q)=>{let Q=k7(X,...q);return TI(Z,Q),Q},TI=async(Z,X)=>{try{await Z}catch(q){X.destroy(q)}},jI=(Z,X,q)=>{Z.sendMessage=X.sendMessage,Z.getOneMessage=II.bind(void 0,X,q),Z.getEachMessage=kI.bind(void 0,Z,X,q)},II=(Z,X,...q)=>{let Q=new AbortController,$=Z.getOneMessage(...FU(q,Q.signal,yZ));return wI(X,$,Q)},wI=async(Z,X,q)=>{try{return await Promise.race([X,OI(Z,q.signal)])}finally{q.abort()}},OI=(Z,X)=>new Promise((q,Q)=>{if(Z.aborted){Q(Z.reason);return}Z.addEventListener("abort",()=>{Q(Z.reason)},{once:!0,signal:X})}),kI=(Z,X,q,...Q)=>{let $=new AbortController,J=X.getEachMessage(...FU(Q,$.signal,SZ));return xI(q,$),NI(Z,J,$)},NI=async function*(Z,X,q){try{yield*X}finally{q.abort(),await Z}},FU=(Z,X,q)=>{if(Z[0]===null)return Z;let[Q]=Z;return[{...Q,[q]:{signal:X,shouldAwait:!1}}]},xI=(Z,X)=>{if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},PI=async({sourcePromise:Z,sourceStream:X,sourceOptions:q,sourceError:Q,destination:$,destinationStream:J,destinationError:Y,unpipeSignal:H,fileDescriptors:U,startTime:G,pipeFailureController:W})=>{let V=new AbortController;try{let L=EI(Z,$);WU({sourceStream:X,sourceError:Q,destinationStream:J,destinationError:Y,fileDescriptors:U,sourceOptions:q,startTime:G});let z=LU(X,J,V);return await Promise.race([VU(L),..._U(H,{sourceStream:X,mergedStream:z,sourceOptions:q,fileDescriptors:U,startTime:G})])}catch(L){throw W.abort(L),L}finally{V.abort()}},EI=(Z,X)=>Promise.allSettled([Z,X]);var DU=B(()=>{Z1();T1();q4();aZ();N7();JX();CZ();_7();UU();HX();BU();zU();RU()});import{setImmediate as vI}from"node:timers/promises";var AU=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,buffer:$,maxBuffer:J,lines:Y,allMixed:H,stripFinalNewline:U,verboseInfo:G,streamInfo:W})=>{let V=yI({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:H,verboseInfo:G,streamInfo:W});if(!$){await Promise.all([CI(Z),V]);return}let L=DZ(U,q),z=nZ({stream:Z,onStreamEnd:X,lines:Y,encoding:Q,stripFinalNewline:L,allMixed:H}),[_]=await Promise.all([SI({stream:Z,iterable:z,fdNumber:q,encoding:Q,maxBuffer:J,lines:Y}),V]);return _},yI=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:$,verboseInfo:J,streamInfo:{fileDescriptors:Y}})=>{if(!z7({stdioItems:Y[q]?.stdioItems,encoding:Q,verboseInfo:J,fdNumber:q}))return;let H=nZ({stream:Z,onStreamEnd:X,lines:!0,encoding:Q,stripFinalNewline:!0,allMixed:$});await iH(H,Z,q,J)},CI=async(Z)=>{if(await vI(),Z.readableFlowing===null)Z.resume()},SI=async({stream:Z,stream:{readableObjectMode:X},iterable:q,fdNumber:Q,encoding:$,maxBuffer:J,lines:Y})=>{try{if(X||Y)return await a8(q,{maxBuffer:J});if($==="buffer")return new Uint8Array(await o8(q,{maxBuffer:J}));return await r8(q,{maxBuffer:J})}catch(H){return TU(OY({error:H,stream:Z,readableObjectMode:X,lines:Y,encoding:$,fdNumber:Q}))}},KX=async(Z)=>{try{return await Z}catch(X){return TU(X)}},TU=({bufferedData:Z})=>qJ(Z)?new Uint8Array(Z):Z;var UX=B(()=>{t8();j0();NZ();I7();n1();o6()});var jU=({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:$,stripFinalNewline:J,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((U,G)=>GX({stream:U,fdNumber:G,encoding:X,buffer:q[G],maxBuffer:Q[G],lines:$[G],allMixed:!1,stripFinalNewline:J,verboseInfo:Y,streamInfo:H})),GX=async({stream:Z,fdNumber:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:G})=>{if(!Z)return;let W=Q4(Z,X,G);if(oZ(G,X)){await W;return}let[V]=await Promise.all([AU({stream:Z,onStreamEnd:W,fdNumber:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:G}),W]);return V};var WX=B(()=>{UX();$4()});var IU=({stdout:Z,stderr:X},{all:q})=>q&&(Z||X)?o1([Z,X].filter(Boolean)):void 0,wU=({subprocess:Z,all:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,stripFinalNewline:Y,verboseInfo:H,streamInfo:U})=>GX({...bI(Z,X,Q),fdNumber:"all",encoding:q,maxBuffer:$[1]+$[2],lines:J[1]||J[2],allMixed:hI(Z,X),stripFinalNewline:Y,verboseInfo:H,streamInfo:U}),bI=({stdout:Z,stderr:X},q,[,Q,$])=>{let J=Q||$;if(!J)return{stream:q,buffer:J};if(!Q)return{stream:X,buffer:J};if(!$)return{stream:Z,buffer:J};return{stream:q,buffer:J}},hI=({stdout:Z,stderr:X},q)=>q&&Z&&X&&Z.readableObjectMode!==X.readableObjectMode;var VX=B(()=>{M7();WX()});var OU=(Z)=>I2(Z,"ipc"),kU=(Z,X)=>{let q=z8(Z);l0({type:"ipc",verboseMessage:q,fdNumber:"ipc",verboseInfo:X})};var NU=B(()=>{w2();M1()});var xU=async({subprocess:Z,buffer:X,maxBuffer:q,ipc:Q,ipcOutput:$,verboseInfo:J})=>{if(!Q)return $;let Y=OU(J),H=Q1(X,"ipc"),U=Q1(q,"ipc");for await(let G of bZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:Q,shouldAwait:!1,reference:!0})){if(H)kY(Z,$,U),$.push(G);if(Y)kU(G,J)}return $},PU=async(Z,X)=>{return await Promise.allSettled([Z]),X};var EU=B(()=>{n1();NU();$1();_7()});import{once as fI}from"node:events";var vU=async({subprocess:Z,kill:X,all:q,options:{encoding:Q,buffer:$,maxBuffer:J,lines:Y,timeoutDuration:H,cancelSignal:U,gracefulCancel:G,forceKillAfterDelay:W,stripFinalNewline:V,ipc:L,ipcInput:z},context:_,verboseInfo:R,fileDescriptors:M,originalStreams:F,onInternalError:N,controller:D})=>{let w=ZK(Z,_),T={originalStreams:F,fileDescriptors:M,subprocess:Z,exitPromise:w,propagating:!1},j=jU({subprocess:Z,encoding:Q,buffer:$,maxBuffer:J,lines:Y,stripFinalNewline:V,verboseInfo:R,streamInfo:T}),A=wU({subprocess:Z,all:q,encoding:Q,buffer:$,maxBuffer:J,lines:Y,stripFinalNewline:V,verboseInfo:R,streamInfo:T}),b=[],O=xU({subprocess:Z,buffer:$,maxBuffer:J,ipc:L,ipcOutput:b,verboseInfo:R}),x=gI(F,Z,T),E=mI(M,T);try{return await Promise.race([Promise.all([{},qK(w),Promise.all(j),A,O,i9(Z,z,L),...x,...E]),N,uI(Z,D),...p9(X,H,_,D),...K9({kill:X,cancelSignal:U,gracefulCancel:G,context:_,controller:D}),...m9({subprocess:Z,kill:X,cancelSignal:U,gracefulCancel:G,forceKillAfterDelay:W,context:_,controller:D})])}catch(f){return _.terminationReason??="other",Promise.all([{error:f},w,Promise.all(j.map((i)=>KX(i))),KX(A),PU(O,b),Promise.allSettled(x),Promise.allSettled(E)])}},gI=(Z,X,q)=>Z.map((Q,$)=>Q===X.stdio[$]?void 0:Q4(Q,$,q)),mI=(Z,X)=>Z.flatMap(({stdioItems:q},Q)=>q.filter(({value:$,stream:J=$})=>f0(J,{checkOpen:!1})&&!b0(J)).map(({type:$,value:J,stream:Y=J})=>Q4(Y,Q,X,{isSameDirection:P0.has($),stopOnExit:$==="native"}))),uI=async(Z,{signal:X})=>{let[q]=await fI(Z,"error",{signal:X});throw q};var yU=B(()=>{l1();a3();g3();i3();q1();z0();UX();EU();s3();VX();WX();EZ();$4()});import{Writable as pI}from"node:stream";import{callbackify as CU}from"node:util";var SU=({subprocess:Z,concurrentStreams:X},{to:q}={})=>{let{subprocessStdin:Q,waitWritableFinal:$,waitWritableDestroy:J}=BX(Z,q,X),Y=new pI({...LX(Q,Z,$),destroy:CU(_X.bind(void 0,{subprocessStdin:Q,subprocess:Z,waitWritableFinal:$,waitWritableDestroy:J})),highWaterMark:Q.writableHighWaterMark,objectMode:Q.writableObjectMode});return zX(Q,Y,void 0,Z),Y},BX=(Z,X,q)=>{let Q=Y7(Z,X),$=X4(q,Q,"writableFinal"),J=X4(q,Q,"writableDestroy");return{subprocessStdin:Q,waitWritableFinal:$,waitWritableDestroy:J}},LX=(Z,X,q)=>({write:dI.bind(void 0,Z),final:CU(cI.bind(void 0,Z,X,q))}),dI=(Z,X,q,Q)=>{if(Z.write(X,q))Q();else Z.once("drain",Q)},cI=async(Z,X,q)=>{if(!await m2(q,X))return;if(Z.writable)Z.end();await X},zX=async(Z,X,q,Q)=>{try{if(await rZ(Z),await Q,X.writable)X.end()}catch($){await QU(q),bU(X,await lI(Q,$))}},lI=async(Z,X)=>{if(!nI(X))return X;try{await Z}catch(q){return q}return X},nI=(Z)=>Z===void 0||p2(Z),_X=async({subprocessStdin:Z,subprocess:X,waitWritableFinal:q,waitWritableDestroy:Q},$)=>{if(await m2(q,X),await m2(Q,X))bU(Z,$),await w7(X,$)},bU=(Z,X)=>{O7(Z,Z.writable,X)};var RX=B(()=>{T1();$4();q4();eZ()});import{Duplex as iI}from"node:stream";import{callbackify as aI}from"node:util";var hU=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,to:$,binary:J=!0,preserveNewlines:Y=!0}={})=>{let H=J||I0.has(q),{subprocessStdout:U,waitReadableDestroy:G}=ZX(Z,Q,X),{subprocessStdin:W,waitWritableFinal:V,waitWritableDestroy:L}=BX(Z,$,X),{readableEncoding:z,readableObjectMode:_,readableHighWaterMark:R}=XX(U,H),{read:M,onStdoutDataDone:F}=qX({subprocessStdout:U,subprocess:Z,binary:H,encoding:q,preserveNewlines:Y}),N=new iI({read:M,...LX(W,Z,V),destroy:aI(oI.bind(void 0,{subprocessStdout:U,subprocessStdin:W,subprocess:Z,waitReadableDestroy:G,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:R,writableHighWaterMark:W.writableHighWaterMark,readableObjectMode:_,writableObjectMode:W.writableObjectMode,encoding:z});return QX({subprocessStdout:U,onStdoutDataDone:F,readable:N,subprocess:Z,subprocessStdin:W}),zX(W,N,U,Z),N},oI=async({subprocessStdout:Z,subprocessStdin:X,subprocess:q,waitReadableDestroy:Q,waitWritableFinal:$,waitWritableDestroy:J},Y)=>{await Promise.all([$X({subprocessStdout:Z,subprocess:q,waitReadableDestroy:Q},Y),_X({subprocessStdin:X,subprocess:q,waitWritableFinal:$,waitWritableDestroy:J},Y)])};var fU=B(()=>{p1();N7();RX()});var gU=(Z,{encoding:X})=>{let q=T7();Z.readable=k7.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.writable=SU.bind(void 0,{subprocess:Z,concurrentStreams:q}),Z.duplex=hU.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.readableStream=x7.bind(void 0,Z),Z.writableStream=JU.bind(void 0,Z),Z.transformStream=YU.bind(void 0,Z),Z.iterable=u2.bind(void 0,Z,X),Z[Symbol.asyncIterator]=u2.bind(void 0,Z,X,{})};var mU=B(()=>{q4();N7();RX();fU();JX();aZ()});var uU=(Z,X)=>Object.assign(Z,X);var pU=()=>{};import{setMaxListeners as sI}from"node:events";import{spawn as rI}from"node:child_process";var dU=(Z,X,q,Q)=>{let{file:$,commandArguments:J,command:Y,escapedCommand:H,startTime:U,verboseInfo:G,options:W,fileDescriptors:V}=tI(Z,X,q),{subprocess:L,promise:z,kill:_,all:R,convertedStreams:M}=Zw({file:$,commandArguments:J,options:W,startTime:U,verboseInfo:G,command:Y,escapedCommand:H,fileDescriptors:V}),F=Xw({promise:z,nodeChildProcess:L,kill:_,all:R,convertedStreams:M,options:W});return F.pipe=E7.bind(void 0,{source:F,sourcePromise:z,boundOptions:{},createNested:Q}),a0.set(F,{options:W,fileDescriptors:V}),F},tI=(Z,X,q)=>{let{command:Q,escapedCommand:$,startTime:J,verboseInfo:Y}=M8(Z,X,q),{file:H,commandArguments:U,options:G}=p8(Z,X,q),W=eI(G),V=kK(W,Y);return{file:H,commandArguments:U,command:Q,escapedCommand:$,startTime:J,verboseInfo:Y,options:W,fileDescriptors:V}},eI=({timeout:Z,signal:X,...q})=>{if(X!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...q,timeoutDuration:Z}},Zw=({file:Z,commandArguments:X,options:q,startTime:Q,verboseInfo:$,command:J,escapedCommand:Y,fileDescriptors:H})=>{let U;try{U=rI(...d8(Z,X,pK(q)))}catch(M){return FK({error:M,command:J,escapedCommand:Y,fileDescriptors:H,options:q,startTime:Q,verboseInfo:$})}let G=new AbortController;sI(1/0,G.signal);let W=[...U.stdio];fK(U,H,G),C9(U,q);let V={},L=i0(),z=Y9.bind(void 0,{kill:dK(U,q),options:q,onInternalError:L,context:V,controller:G});rK(z,q,G);let _=IU(U,q),R=Qw({subprocess:U,kill:z,all:_,options:q,startTime:Q,verboseInfo:$,fileDescriptors:H,originalStreams:W,command:J,escapedCommand:Y,context:V,onInternalError:L,controller:G});return{subprocess:U,promise:R,kill:z,all:_}},Xw=({promise:Z,nodeChildProcess:X,kill:q,all:Q,convertedStreams:$,options:J})=>{let Y=uU(Z,qw(X,Q));if(Y.kill=q??Y.kill,$===void 0)gU(Y,J);else Object.assign(Y,$);return VK(Y,X,J),Y},qw=(Z,X)=>({nodeChildProcess:Z,pid:Z.pid,stdin:Z.stdin,stdout:Z.stdout,stderr:Z.stderr,stdio:Z.stdio,all:X,kill:Z.kill.bind(Z)}),Qw=async({subprocess:Z,kill:X,all:q,options:Q,startTime:$,verboseInfo:J,fileDescriptors:Y,originalStreams:H,command:U,escapedCommand:G,context:W,onInternalError:V,controller:L})=>{let[z,[_,R],M,F,N]=await vU({subprocess:Z,kill:X,all:q,options:Q,context:W,verboseInfo:J,fileDescriptors:Y,originalStreams:H,onInternalError:V,controller:L});L.abort(),V.resolve();let D=M.map((j,A)=>H1(j,Q,A)),w=H1(F,Q,"all"),T=$w({errorInfo:z,exitCode:_,signal:R,stdio:D,all:w,ipcOutput:N,context:W,options:Q,command:U,escapedCommand:G,startTime:$});return b2(T,J,Q)},$w=({errorInfo:Z,exitCode:X,signal:q,stdio:Q,all:$,ipcOutput:J,context:Y,options:H,command:U,escapedCommand:G,startTime:W})=>("error"in Z)?c6({error:Z.error,command:U,escapedCommand:G,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof J1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:X,signal:q,stdio:Q,all:$,ipcOutput:J,options:H,startTime:W,isSync:!1}):Z7({command:U,escapedCommand:G,stdio:Q,all:$,ipcOutput:J,options:H,startTime:W});var cU=B(()=>{t8();v3();XZ();T1();qZ();hZ();C6();l6();X7();jK();NK();o6();gK();O8();cK();tK();DU();VX();yU();mU();x2();pU()});var v7=(Z,X)=>{let q={__proto__:null,...Z},Q=Object.fromEntries(Object.entries(X).map(([$,J])=>[$,Jw($,q[$],J)]));return{...q,...Q}},Jw=(Z,X,q)=>{if(Yw.has(Z)&&e(X)&&e(q))return{...X,...q};return q},Yw;var lU=B(()=>{Z1();$1();Yw=new Set(["env",...N3])});var d2=(Z,X,q,Q)=>{let $=(Y,H,U)=>d2(Y,H,q,U),J=(...Y)=>Hw({mapArguments:Z,deepOptions:q,boundOptions:X,setBoundExeca:Q,createNested:$},...Y);if(Q!==void 0)Q(J,$,X);return J},Hw=({mapArguments:Z,deepOptions:X={},boundOptions:q={},setBoundExeca:Q,createNested:$},J,...Y)=>{if(e(J))return $(Z,v7(q,J),Q);let{file:H,commandArguments:U,options:G,isSync:W}=Kw({mapArguments:Z,firstArgument:J,nextArguments:Y,deepOptions:X,boundOptions:q});return W?JK(H,U,G):dU(H,U,G,$)},Kw=({mapArguments:Z,firstArgument:X,nextArguments:q,deepOptions:Q,boundOptions:$})=>{let J=KJ(X)?UJ(X,q):[X,...q],[Y,H,U]=J8(...J),G=v7(v7(Q,$),U),{options:W=G,isSync:V=!1}=Z({options:G});return{file:Y,commandArguments:H,options:W,isSync:V}};var nU=B(()=>{Z1();j3();GJ();YK();cU();lU()});var iU=(Z,X,q)=>{Z.sync=X(Uw,q),Z.s=Z.sync},aU=({options:Z})=>oU(Z),Uw=({options:Z})=>({...oU(Z),isSync:!0}),oU=(Z)=>({options:{...Gw(Z),...Z}}),Gw=({input:Z,inputFile:X,stdio:q})=>Z===void 0&&X===void 0&&q===void 0?{stdin:"inherit"}:{},sU;var rU=B(()=>{sU={preferLocal:!0}});var MX,E0,Ul,Gl,Wl,Vl,Bl,Ll;var c2=B(()=>{nU();o3();rU();hZ();MX=d2(()=>({})),E0=d2(()=>({isSync:!0})),Ul=d2(c9),Gl=d2(aU,{},sU,iU),{sendMessage:Wl,getOneMessage:Vl,getEachMessage:Bl,getCancelSignal:Ll}=BK()});import{execSync as Ww}from"child_process";function l2(Z,X){let Q=[];try{const q=F2(Q,y7`execSync: ${Z.slice(0,100)}`,0);return Ww(Z,X)}catch($){var J=$,Y=1}finally{D2(Q,J,Y)}}var FX=B(()=>{M0()});async function Vw(Z){if(process.platform==="win32"){let q=await MX(`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 MX(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(X.exitCode!==0||!X.stdout)return null;return X.stdout.trim()}function Bw(Z){if(process.platform==="win32")try{return l2(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return l2(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var DX,tU,C7;var S7=B(()=>{c2();FX();DX=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,tU=DX?async(Z)=>DX(Z):Vw,C7=DX??Bw});function eU(Z,X){return{cmd:C7(Z)??Z,args:X}}var ZG=B(()=>{S7()});import{dirname as Lw,join as XG}from"path";async function n2(Z){try{return!!await tU(Z)}catch{return!1}}function Fw(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function Aw(){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 Dw)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(JG())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 JG(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function yl(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return i2.platform}var K0,zw,_w,Rw,$G,Mw,Dw,Tw,i2;var J4=B(()=>{j1();QG();ZJ();s0();ZG();F0();S7();K0=u(()=>{let Z=qG(),X=$0(),q=XG(X,`config${Z}.json`);if(!k().existsSync(q)){let $=process.env.CLAUDIN_CONFIG_DIR?X:Lw(X),J=XG($,`.claudin${Z}.json`);if(k().existsSync(J))return J}return q}),zw=u(async()=>{try{let{default:Z}=await import("./index-1.1.31-fzj8sx04.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});_w=u(async()=>{let Z=[];if(await n2("npm"))Z.push("npm");if(await n2("yarn"))Z.push("yarn");if(await n2("pnpm"))Z.push("pnpm");return Z}),Rw=u(async()=>{let Z=[];if(await n2("bun"))Z.push("bun");if(await n2("deno"))Z.push("deno");if(await n2("node"))Z.push("node");return Z}),$G=u(()=>{try{return k().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),Mw=u(()=>{try{if(!$G())return!1;let{cmd:Z}=eU("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});Dw=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];Tw=u(()=>{if(Q0(process.env.CODESPACES))return"codespaces";if(process.env.GITPOD_WORKSPACE_ID)return"gitpod";if(process.env.REPL_ID||process.env.REPL_SLUG)return"replit";if(process.env.PROJECT_DOMAIN)return"glitch";if(Q0(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(Q0(process.env.RENDER))return"render";if(Q0(process.env.NETLIFY))return"netlify";if(process.env.DYNO)return"heroku";if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return"fly.io";if(Q0(process.env.CF_PAGES))return"cloudflare-pages";if(process.env.DENO_DEPLOYMENT_ID)return"deno-deploy";if(process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_FARGATE")return"aws-fargate";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_EC2")return"aws-ecs";try{if(k().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase().startsWith("ec2"))return"aws-ec2"}catch{}if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if(Q0(process.env.GITHUB_ACTIONS))return"github-actions";if(Q0(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(Q0(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(k().existsSync("/.dockerenv"))return"docker"}catch{}if(i2.platform==="darwin")return"unknown-darwin";if(i2.platform==="linux")return"unknown-linux";if(i2.platform==="win32")return"unknown-win32";return"unknown"});i2={hasInternetAccess:zw,isCI:Q0(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:Aw(),isSSH:JG,getPackageManagers:_w,getRuntimes:Rw,isRunningWithBun:u(e$),isWslEnvironment:$G,isNpmFromWindowsPath:Mw,isConductor:Fw,detectDeploymentEnvironment:Tw}});import{unwatchFile as jw,watchFile as Iw}from"fs";function Ow(){return}function a2(Z){let X=r0.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 kX(Z){return TX.add(Z),()=>TX.delete(Z)}function Y4(){for(let Z of TX)try{Z()}catch{}}function jX(Z){return{...Z,projects:xw(Z.projects)}}function _0(Z){let X=null;try{if(f7(K0(),O0,(Q)=>{let $=Z(Q);if($===Q)return Q;return X=jX($),X})&&X)H4(X),Y4()}catch(q){let Q=U0(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 $=K1(K0(),O0);if(a2($)){P("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"});return}let J=Z($);if(J===$)return;X=jX(J),h7(K0(),X,h1),H4(X),Y4()}}function Nw(){let Z=IX+wX;IX=0,wX=0}function OX(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 xw(Z){if(!Z)return Z;let X={},q=!1;for(let[Q,$]of Object.entries(Z)){let J=$;if(J.history!==void 0){q=!0;let{history:Y,...H}=J;X[Q]=H}else X[Q]=$}return q?X:Z}function Ew(){if(AX)return;AX=!0;let Z=K0();Iw(Z,{interval:Pw,persistent:!1},(X)=>{if(X.mtimeMs<=r0.mtime)return;k().readFile(Z,{encoding:"utf-8"}).then((q)=>{if(X.mtimeMs<=r0.mtime)return;let Q=N0(T0(q));if(Q===null||typeof Q!=="object")return;r0={config:OX({...O0(),...Q}),mtime:X.mtimeMs},b7({mtime:X.mtimeMs,size:X.size})}).catch(()=>{})}),K4(async()=>{jw(Z),AX=!1})}function H4(Z){r0={config:Z,mtime:Date.now()},b7(null)}function a(){if(r0.config)return IX++,r0.config;wX++;try{let Z=null;try{Z=k().statSync(K0())}catch{}let X=OX(K1(K0(),O0));return r0={config:X,mtime:Z?.mtimeMs??Date.now()},b7(Z?{mtime:Z.mtimeMs,size:Z.size}:null),Ew(),X}catch{return OX(K1(K0(),O0))}}function vw(){let Z=a().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function yw(Z){let X=a();if(X.customApiKeyResponses?.approved?.includes(Z))return"approved";if(X.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function hw(Z){r0.config=Z,r0.mtime=Z?Date.now():0}var ww,TX,r0,IX=0,wX=0,kw=20,Pw=1000,AX=!1,Cw,Sw,bw;var o2=B(()=>{D6();g7();YG();N6();w6();g0();J4();I1();F0();ww={...h1,autoUpdates:!1,knowledgeGraphEnabled:!0};TX=new Set;r0={config:null,mtime:0};K4(async()=>{Nw()});Cw=K1,Sw=a2,bw=jX});import{dirname as fw}from"path";function G0(Z,X,q){let Q=gw();if(!Q)return;let $={timestamp:new Date().toISOString(),level:Z,event:X,data:q??{}},J=k(),Y=m($)+`
|
|
63
|
+
`;try{J.appendFileSync(Q,Y)}catch{try{J.mkdirSync(fw(Q)),J.appendFileSync(Q,Y)}catch{}}}function gw(){return process.env.CLAUDIN_DIAGNOSTICS_FILE}async function ol(Z,X,q){let Q=Date.now();G0("info",`${Z}_started`);try{let $=await X(),J=q?q($):{};return G0("info",`${Z}_completed`,{duration_ms:Date.now()-Q,...J}),$}catch($){throw G0("error",`${Z}_failed`,{duration_ms:Date.now()-Q}),$}}var U4=B(()=>{F0();M0()});import{readFileSync as mw}from"node:fs";import{homedir as uw}from"node:os";import{join as pw}from"node:path";function dw(){if(w1!==void 0)return;try{let Z=process.env.CLAUDE_FEATURE_FLAGS_FILE??pw(uw(),".claudin","feature-flags.json"),X=JSON.parse(mw(Z,"utf-8"));w1=X!==null&&typeof X==="object"&&!Array.isArray(X)?X:null}catch{w1=null}}function r1(Z,X){if(dw(),Object.hasOwn(KG,Z))return KG[Z];if(w1!==null&&w1!==void 0&&Object.hasOwn(w1,Z))return w1[Z];if(Object.hasOwn(HG,Z))return HG[Z];return X}function t1(Z,X){return r1(Z,X)}function Zn(Z,X,q){return r1(Z,X)}async function Xn(Z,X){return r1(Z,X)}function qn(Z){return Boolean(r1(Z,!1))}async function Qn(Z){return Boolean(r1(Z,!1))}async function $n(Z){return!1}function Jn(Z,X){return r1(Z,X)}async function Yn(Z,X){return r1(Z,X)}function Kn(){}function Un(){w1=void 0}function Gn(Z){return cw}var HG,KG,w1,Hn=async()=>null,cw=()=>{};var m7=B(()=>{HG={tengu_sedge_lantern:!0,tengu_passport_quail:!0,tengu_coral_fern:!0,tengu_bramble_lintel:15,tengu_glacier_2xr:!0},KG={tengu_disable_bypass_permissions_mode:!1}});function NX(Z){let{buffer:X,bytesRead:q}=k().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 xX(Z){let X=0,q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===`
|
|
64
|
+
`)if(Q>0&&Z[Q-1]==="\r")X++;else q++;return X>q?"CRLF":"LF"}function lw(Z){let X=k(),{resolvedPath:q,isSymlink:Q}=O1(X,Z);if(Q)P(`Reading through symlink: ${Z} -> ${q}`);let $=NX(q),J=X.readFileSync(q,{encoding:$}),Y=xX(J.slice(0,4096));return{content:J.replaceAll(`\r
|
|
65
|
+
`,`
|
|
66
|
+
`),encoding:$,lineEndings:Y}}function U1(Z){return lw(Z).content}var G4=B(()=>{g0();F0()});class UG{cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let X=k(),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 $=WG(Z),J=X.readFileSync(Z,{encoding:$}).replaceAll(`\r
|
|
67
|
+
`,`
|
|
68
|
+
`);if(q.size<=this.maxEntryBytes){if(this.cache.set(Z,{content:J,encoding:$,mtime:q.mtimeMs}),this.cache.size>this.maxCacheSize){let Y=this.cache.keys().next().value;if(Y)this.cache.delete(Y)}}return{content:J,encoding:$}}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 PX;var GG=B(()=>{u7();F0();PX=new UG});import{readdir as Fn,readFile as nw}from"fs/promises";import{release as iw}from"os";var In,m0,wn,On;var s2=B(()=>{j1();F0();k0();In=["macos","wsl"],m0=u(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=k().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){S(Z)}return"linux"}return"unknown"}catch(Z){return S(Z),"unknown"}}),wn=u(()=>{if(process.platform!=="linux")return;try{let Z=k().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){S(Z);return}}),On=u(async()=>{if(process.platform!=="linux")return;let Z={linuxKernel:iw()};try{let X=await nw("/etc/os-release","utf8");for(let q of X.split(`
|
|
69
|
+
`)){let Q=q.match(/^(ID|VERSION_ID)=(.*)$/);if(Q&&Q[1]&&Q[2]){let $=Q[2].replace(/^"|"$/g,"");if(Q[1]==="ID")Z.linuxDistroId=$;else Z.linuxDistroVersion=$}}}catch{}return Z})});import*as r2 from"path";import*as VG from"path/win32";function EX(Z){try{return l2(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function aw(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(EX(q))return q}try{let q=l2(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
|
|
70
|
+
`).filter(Boolean),Q=Z0().toLowerCase();for(let $ of q){let J=r2.resolve($).toLowerCase();if(r2.dirname(J).toLowerCase()===Q||J.startsWith(Q+r2.sep)){P(`Skipping potentially malicious executable in current directory: ${$}`);continue}return $}return null}catch{return null}}function Cn(){if(m0()==="windows"){let Z=ow();process.env.SHELL=Z,P(`Using bash path: "${Z}"`)}}var ow,Sn,BG;var LG=B(()=>{j1();G1();g0();FX();$8();s2();ow=u(()=>{if(process.env.CLAUDIN_GIT_BASH_PATH){if(EX(process.env.CLAUDIN_GIT_BASH_PATH))return process.env.CLAUDIN_GIT_BASH_PATH;console.error(`Claudin was unable to find CLAUDIN_GIT_BASH_PATH path "${process.env.CLAUDIN_GIT_BASH_PATH}"`),process.exit(1)}let Z=aw("git");if(Z){let X=VG.join(Z,"..","..","bin","bash.exe");if(EX(X))return X}console.error("Claudin 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: CLAUDIN_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe"),process.exit(1)}),Sn=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),BG=R1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let X=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(X){let Q=X[1].toUpperCase(),$=Z.slice(("/cygdrive/"+X[1]).length);return Q+":"+($||"\\").replace(/\//g,"\\")}let q=Z.match(/^\/([A-Za-z])(\/|$)/);if(q){let Q=q[1].toUpperCase(),$=Z.slice(2);return Q+":"+($||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as zG}from"os";import{dirname as _G,isAbsolute as rw,join as tw,normalize as vX,relative as ew,resolve as ZO}from"path";function CX(Z,X){let q=X??Z0()??k().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 vX(q).normalize("NFC");if(Q==="~")return zG().normalize("NFC");if(Q.startsWith("~/"))return tw(zG(),Q.slice(2)).normalize("NFC");let $=Q;if(m0()==="windows"&&Q.match(/^\/[a-z]\//i))try{$=BG(Q)}catch{$=Q}if(rw($))return vX($).normalize("NFC");return ZO(q,$).normalize("NFC")}function dn(Z){let X=ew(Z0(),Z);return X.startsWith("..")?Z:X}function cn(Z){let X=CX(Z);if(X.startsWith("\\\\")||X.startsWith("//"))return _G(X);try{if(k().statSync(X).isDirectory())return X}catch{}return _G(X)}function ln(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function k1(Z){return vX(Z).replace(/\\/g,"/")}var W4=B(()=>{G1();F0();s2();LG();sw()});import{chmodSync as XO,writeFileSync as RG}from"fs";import{realpath as qO,stat as AG}from"fs/promises";import{homedir as TG}from"os";import{basename as SX,dirname as p7,extname as MG,isAbsolute as QO,join as t2,normalize as $O,relative as jG,resolve as JO,sep as V4}from"path";async function Ui(Z){try{return await AG(Z),!0}catch{return!1}}function Gi(Z){try{return k().readFileSync(Z,{encoding:"utf8"})}catch(X){return S(X),null}}function Wi(Z){let X=k();return Math.floor(X.statSync(Z).mtimeMs)}async function Vi(Z){let X=await k().stat(Z);return Math.floor(X.mtimeMs)}function Bi(Z,X,q,Q){let $=X;if(Q==="CRLF")$=X.replaceAll(`\r
|
|
71
|
+
`,`
|
|
72
|
+
`).split(`
|
|
73
|
+
`).join(`\r
|
|
74
|
+
`);Z6(Z,$,{encoding:q}),PX.invalidate(Z)}function WG(Z){try{let X=k(),{resolvedPath:q}=O1(X,Z);return NX(q)}catch(X){if(DG(X))P(`detectFileEncoding failed for expected reason: ${X.code}`,{level:"debug"});else S(X);return"utf8"}}function Li(Z,X="utf8"){try{let q=k(),{resolvedPath:Q}=O1(q,Z),{buffer:$,bytesRead:J}=q.readSync(Q,{length:4096}),Y=$.toString(X,0,J);return xX(Y)}catch(q){return S(q),"LF"}}function zi(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(X)=>" ".repeat(X.length))}function HO(Z){let X=Z?CX(Z):void 0,q=X?jG(Z0(),X):void 0;return{absolutePath:X,relativePath:q}}function _i(Z){let{relativePath:X}=HO(Z);if(X&&!X.startsWith(".."))return X;let q=TG();if(Z.startsWith(q+V4))return"~"+Z.slice(q.length);return Z}function Ri(Z){let X=k();try{let q=p7(Z),Q=SX(Z,MG(Z)),Y=X.readdirSync(q).filter((H)=>SX(H.name,MG(H.name))===Q&&t2(q,H.name)!==Z)[0];if(Y)return Y.name;return}catch(q){if(!e2(q))S(q);return}}async function Fi(Z){let X=Z0(),q=p7(X),Q=Z;try{let H=await qO(p7(Z));Q=t2(H,SX(Z))}catch{}let $=q===V4?V4:q+V4;if(!Q.startsWith($)||Q.startsWith(X+V4)||Q===X)return;let J=jG(q,Q),Y=t2(X,J);try{return await AG(Y),Y}catch{return}}function KO(){return!t1("tengu_compact_line_prefix_killswitch",!1)}function Di({content:Z,startLine:X}){if(!Z)return"";let q=Z.split(/\r?\n/);if(KO())return q.map((Q,$)=>`${$+X}→${Q}`).join(`
|
|
75
|
+
`);return q.map((Q,$)=>{let J=String($+X);if(J.length>=6)return`${J}→${Q}`;return`${J.padStart(6," ")}→${Q}`}).join(`
|
|
76
|
+
`)}function Ai(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function Ti(Z){try{return k().isDirEmptySync(Z)}catch(X){return e2(X)}}function ji(Z){let{content:X}=PX.readFile(Z);return X}function Z6(Z,X,q={encoding:"utf-8"}){let Q=k(),$=Z;try{let U=Q.readlinkSync(Z);$=QO(U)?U:JO(p7(Z),U),P(`Writing through symlink: ${Z} -> ${$}`)}catch{}let J=`${$}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=Q.statSync($).mode,H=!0,P(`Preserving file permissions: ${Y.toString(8)}`)}catch(U){if(!e2(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: ${J}`);let U={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)U.mode=q.mode;if(RG(J,X,U),P(`Temp file written successfully, size: ${X.length} bytes`),H&&Y!==void 0)XO(J,Y),P("Applied original permissions to temp file");P(`Renaming ${J} to ${$}`),Q.renameSync(J,$),P(`File ${$} written atomically`)}catch(U){P(`Failed to write file atomically: ${U}`,{level:"error"});try{P(`Cleaning up temp file: ${J}`),Q.unlinkSync(J)}catch(G){P(`Failed to clean up temp file: ${G}`)}P(`Falling back to non-atomic write for ${$}`);try{let G={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)G.mode=q.mode;RG($,X,G),P(`File ${$} written successfully with non-atomic fallback`)}catch(G){throw P(`Non-atomic write also failed: ${G}`),G}}}function Ii(){let Z=m0(),X=TG();if(Z==="macos")return t2(X,"Desktop");if(Z==="windows"){let Q=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(Q){let J=`/mnt/c${Q.replace(/^[A-Z]:/,"")}/Desktop`;if(k().existsSync(J))return J}try{let J=k().readdirSync("/mnt/c/Users");for(let Y of J){if(Y.name==="Public"||Y.name==="Default"||Y.name==="Default User"||Y.name==="All Users")continue;let H=t2("/mnt/c/Users",Y.name,"Desktop");if(k().existsSync(H))return H}}catch($){S($)}}let q=t2(X,"Desktop");if(k().existsSync(q))return q;return X}function wi(Z,X=YO){try{return k().statSync(Z).size<=X}catch{return!1}}function FG(Z){let X=$O(Z);if(m0()==="windows")X=X.replace(/\//g,"\\").toLowerCase();return X}function Oi(Z,X){return FG(Z)===FG(X)}var YO=262144,Mi="Note: your current working directory is";var u7=B(()=>{m7();G1();g0();I1();G4();GG();F0();k0();W4();s2()});var wG=c((Ni,IG)=>{var N1=H0("constants"),UO=process.cwd,d7=null,GO=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!d7)d7=UO.call(process);return d7};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(c7=process.chdir,process.chdir=function(Z){d7=null,c7.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,c7)}var c7;IG.exports=WO;function WO(Z){if(N1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))X(Z);if(!Z.lutimes)q(Z);if(Z.chown=J(Z.chown),Z.fchown=J(Z.fchown),Z.lchown=J(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=$(Z.chmodSync),Z.fchmodSync=$(Z.fchmodSync),Z.lchmodSync=$(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(W,V,L){if(L)process.nextTick(L)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(W,V,L,z){if(z)process.nextTick(z)},Z.lchownSync=function(){};if(GO==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(W){function V(L,z,_){var R=Date.now(),M=0;W(L,z,function F(N){if(N&&(N.code==="EACCES"||N.code==="EPERM"||N.code==="EBUSY")&&Date.now()-R<60000){if(setTimeout(function(){Z.stat(z,function(D,w){if(D&&D.code==="ENOENT")W(L,z,F);else _(N)})},M),M<100)M+=10;return}if(_)_(N)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,W);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(W){function V(L,z,_,R,M,F){var N;if(F&&typeof F==="function"){var D=0;N=function(w,T,j){if(w&&w.code==="EAGAIN"&&D<10)return D++,W.call(Z,L,z,_,R,M,N);F.apply(this,arguments)}}return W.call(Z,L,z,_,R,M,N)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,W);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(W){return function(V,L,z,_,R){var M=0;while(!0)try{return W.call(Z,V,L,z,_,R)}catch(F){if(F.code==="EAGAIN"&&M<10){M++;continue}throw F}}}(Z.readSync);function X(W){W.lchmod=function(V,L,z){W.open(V,N1.O_WRONLY|N1.O_SYMLINK,L,function(_,R){if(_){if(z)z(_);return}W.fchmod(R,L,function(M){W.close(R,function(F){if(z)z(M||F)})})})},W.lchmodSync=function(V,L){var z=W.openSync(V,N1.O_WRONLY|N1.O_SYMLINK,L),_=!0,R;try{R=W.fchmodSync(z,L),_=!1}finally{if(_)try{W.closeSync(z)}catch(M){}else W.closeSync(z)}return R}}function q(W){if(N1.hasOwnProperty("O_SYMLINK")&&W.futimes)W.lutimes=function(V,L,z,_){W.open(V,N1.O_SYMLINK,function(R,M){if(R){if(_)_(R);return}W.futimes(M,L,z,function(F){W.close(M,function(N){if(_)_(F||N)})})})},W.lutimesSync=function(V,L,z){var _=W.openSync(V,N1.O_SYMLINK),R,M=!0;try{R=W.futimesSync(_,L,z),M=!1}finally{if(M)try{W.closeSync(_)}catch(F){}else W.closeSync(_)}return R};else if(W.futimes)W.lutimes=function(V,L,z,_){if(_)process.nextTick(_)},W.lutimesSync=function(){}}function Q(W){if(!W)return W;return function(V,L,z){return W.call(Z,V,L,function(_){if(G(_))_=null;if(z)z.apply(this,arguments)})}}function $(W){if(!W)return W;return function(V,L){try{return W.call(Z,V,L)}catch(z){if(!G(z))throw z}}}function J(W){if(!W)return W;return function(V,L,z,_){return W.call(Z,V,L,z,function(R){if(G(R))R=null;if(_)_.apply(this,arguments)})}}function Y(W){if(!W)return W;return function(V,L,z){try{return W.call(Z,V,L,z)}catch(_){if(!G(_))throw _}}}function H(W){if(!W)return W;return function(V,L,z){if(typeof L==="function")z=L,L=null;function _(R,M){if(M){if(M.uid<0)M.uid+=4294967296;if(M.gid<0)M.gid+=4294967296}if(z)z.apply(this,arguments)}return L?W.call(Z,V,L,_):W.call(Z,V,_)}}function U(W){if(!W)return W;return function(V,L){var z=L?W.call(Z,V,L):W.call(Z,V);if(z){if(z.uid<0)z.uid+=4294967296;if(z.gid<0)z.gid+=4294967296}return z}}function G(W){if(!W)return!0;if(W.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(W.code==="EINVAL"||W.code==="EPERM")return!0}return!1}}});var NG=c((xi,kG)=>{var OG=H0("stream").Stream;kG.exports=VO;function VO(Z){return{ReadStream:X,WriteStream:q};function X(Q,$){if(!(this instanceof X))return new X(Q,$);OG.call(this);var J=this;this.path=Q,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,$=$||{};var Y=Object.keys($);for(var H=0,U=Y.length;H<U;H++){var G=Y[H];this[G]=$[G]}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(){J._read()});return}Z.open(this.path,this.flags,this.mode,function(W,V){if(W){J.emit("error",W),J.readable=!1;return}J.fd=V,J.emit("open",V),J._read()})}function q(Q,$){if(!(this instanceof q))return new q(Q,$);OG.call(this),this.path=Q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,$=$||{};var J=Object.keys($);for(var Y=0,H=J.length;Y<H;Y++){var U=J[Y];this[U]=$[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 PG=c((Pi,xG)=>{xG.exports=LO;var BO=Object.getPrototypeOf||function(Z){return Z.__proto__};function LO(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var X={__proto__:BO(Z)};else var X=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(q){Object.defineProperty(X,q,Object.getOwnPropertyDescriptor(Z,q))}),X}});var mX=c((Ei,gX)=>{var o=H0("fs"),zO=wG(),_O=NG(),RO=PG(),l7=H0("util"),B0,i7;if(typeof Symbol==="function"&&typeof Symbol.for==="function")B0=Symbol.for("graceful-fs.queue"),i7=Symbol.for("graceful-fs.previous");else B0="___graceful-fs.queue",i7="___graceful-fs.previous";function MO(){}function vG(Z,X){Object.defineProperty(Z,B0,{get:function(){return X}})}var e1=MO;if(l7.debuglog)e1=l7.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))e1=function(){var Z=l7.format.apply(l7,arguments);Z="GFS4: "+Z.split(/\n/).join(`
|
|
77
|
+
GFS4: `),console.error(Z)};if(!o[B0]){if(bX=global[B0]||[],vG(o,bX),o.close=function(Z){function X(q,Q){return Z.call(o,q,function($){if(!$)EG();if(typeof Q==="function")Q.apply(this,arguments)})}return Object.defineProperty(X,i7,{value:Z}),X}(o.close),o.closeSync=function(Z){function X(q){Z.apply(o,arguments),EG()}return Object.defineProperty(X,i7,{value:Z}),X}(o.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){e1(o[B0]),H0("assert").equal(o[B0].length,0)})}var bX;if(!global[B0])vG(global,o[B0]);gX.exports=hX(RO(o));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!o.__patched)gX.exports=hX(o),o.__patched=!0;function hX(Z){zO(Z),Z.gracefulify=hX,Z.createReadStream=T,Z.createWriteStream=j;var X=Z.readFile;Z.readFile=q;function q(O,x,E){if(typeof x==="function")E=x,x=null;return f(O,x,E);function f(i,v,y,d){return X(i,v,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))X6([f,[i,v,y],g,d||Date.now(),Date.now()]);else if(typeof y==="function")y.apply(this,arguments)})}}var Q=Z.writeFile;Z.writeFile=$;function $(O,x,E,f){if(typeof E==="function")f=E,E=null;return i(O,x,E,f);function i(v,y,d,g,W0){return Q(v,y,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))X6([i,[v,y,d,g],l,W0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var J=Z.appendFile;if(J)Z.appendFile=Y;function Y(O,x,E,f){if(typeof E==="function")f=E,E=null;return i(O,x,E,f);function i(v,y,d,g,W0){return J(v,y,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))X6([i,[v,y,d,g],l,W0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=U;function U(O,x,E,f){if(typeof E==="function")f=E,E=0;return i(O,x,E,f);function i(v,y,d,g,W0){return H(v,y,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))X6([i,[v,y,d,g],l,W0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var G=Z.readdir;Z.readdir=V;var W=/^v[0-5]\./;function V(O,x,E){if(typeof x==="function")E=x,x=null;var f=W.test(process.version)?function(y,d,g,W0){return G(y,i(y,d,g,W0))}:function(y,d,g,W0){return G(y,d,i(y,d,g,W0))};return f(O,x,E);function i(v,y,d,g){return function(W0,l){if(W0&&(W0.code==="EMFILE"||W0.code==="ENFILE"))X6([f,[v,y,d],W0,g||Date.now(),Date.now()]);else{if(l&&l.sort)l.sort();if(typeof d==="function")d.call(this,W0,l)}}}}if(process.version.substr(0,4)==="v0.8"){var L=_O(Z);F=L.ReadStream,D=L.WriteStream}var z=Z.ReadStream;if(z)F.prototype=Object.create(z.prototype),F.prototype.open=N;var _=Z.WriteStream;if(_)D.prototype=Object.create(_.prototype),D.prototype.open=w;Object.defineProperty(Z,"ReadStream",{get:function(){return F},set:function(O){F=O},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return D},set:function(O){D=O},enumerable:!0,configurable:!0});var R=F;Object.defineProperty(Z,"FileReadStream",{get:function(){return R},set:function(O){R=O},enumerable:!0,configurable:!0});var M=D;Object.defineProperty(Z,"FileWriteStream",{get:function(){return M},set:function(O){M=O},enumerable:!0,configurable:!0});function F(O,x){if(this instanceof F)return z.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function N(){var O=this;b(O.path,O.flags,O.mode,function(x,E){if(x){if(O.autoClose)O.destroy();O.emit("error",x)}else O.fd=E,O.emit("open",E),O.read()})}function D(O,x){if(this instanceof D)return _.apply(this,arguments),this;else return D.apply(Object.create(D.prototype),arguments)}function w(){var O=this;b(O.path,O.flags,O.mode,function(x,E){if(x)O.destroy(),O.emit("error",x);else O.fd=E,O.emit("open",E)})}function T(O,x){return new Z.ReadStream(O,x)}function j(O,x){return new Z.WriteStream(O,x)}var A=Z.open;Z.open=b;function b(O,x,E,f){if(typeof E==="function")f=E,E=null;return i(O,x,E,f);function i(v,y,d,g,W0){return A(v,y,d,function(l,gv){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))X6([i,[v,y,d,g],l,W0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}return Z}function X6(Z){e1("ENQUEUE",Z[0].name,Z[1]),o[B0].push(Z),fX()}var n7;function EG(){var Z=Date.now();for(var X=0;X<o[B0].length;++X)if(o[B0][X].length>2)o[B0][X][3]=Z,o[B0][X][4]=Z;fX()}function fX(){if(clearTimeout(n7),n7=void 0,o[B0].length===0)return;var Z=o[B0].shift(),X=Z[0],q=Z[1],Q=Z[2],$=Z[3],J=Z[4];if($===void 0)e1("RETRY",X.name,q),X.apply(null,q);else if(Date.now()-$>=60000){e1("TIMEOUT",X.name,q);var Y=q.pop();if(typeof Y==="function")Y.call(null,Q)}else{var H=Date.now()-J,U=Math.max(J-$,1),G=Math.min(U*1.2,100);if(H>=G)e1("RETRY",X.name,q),X.apply(null,q.concat([$]));else o[B0].push(Z)}if(n7===void 0)n7=setTimeout(fX,0)}});var CG=c((vi,yG)=>{function v0(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)}yG.exports=v0;v0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};v0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};v0.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,$=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)$.unref();return!0};v0.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)};v0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};v0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};v0.prototype.start=v0.prototype.try;v0.prototype.errors=function(){return this._errors};v0.prototype.attempts=function(){return this._attempts};v0.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 $=this._errors[Q],J=$.message,Y=(Z[J]||0)+1;if(Z[J]=Y,Y>=q)X=$,q=Y}return X}});var bG=c((DO)=>{var FO=CG();DO.operation=function(Z){var X=DO.timeouts(Z);return new FO(X,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};DO.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 $=0;$<X.retries;$++)Q.push(this.createTimeout($,X));if(Z&&Z.forever&&!Q.length)Q.push(this.createTimeout($,X));return Q.sort(function(J,Y){return J-Y}),Q};DO.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};DO.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 $=0;$<q.length;$++){var J=q[$],Y=Z[J];Z[J]=function(U){var G=DO.operation(X),W=Array.prototype.slice.call(arguments,1),V=W.pop();W.push(function(L){if(G.retry(L))return;if(L)arguments[0]=G.mainError();V.apply(this,arguments)}),G.attempt(function(){U.apply(Z,W)})}.bind(Z,Y),Z[J].options=X}}});var hG=c((Ci,a7)=>{a7.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")a7.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")a7.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var fG=c((Si,Q6)=>{var n=global.process,Z2=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(!Z2(n))Q6.exports=function(){return function(){}};else{if(uX=H0("assert"),X2=hG(),pX=/^win/i.test(n.platform),q6=H0("events"),typeof q6!=="function")q6=q6.EventEmitter;if(n.__signal_exit_emitter__)J0=n.__signal_exit_emitter__;else J0=n.__signal_exit_emitter__=new q6,J0.count=0,J0.emitted={};if(!J0.infinite)J0.setMaxListeners(1/0),J0.infinite=!0;Q6.exports=function(Z,X){if(!Z2(global.process))return function(){};if(uX.equal(typeof Z,"function","a callback must be provided for exit handler"),q2===!1)o7();var q="exit";if(X&&X.alwaysLast)q="afterexit";var Q=function(){if(J0.removeListener(q,Z),J0.listeners("exit").length===0&&J0.listeners("afterexit").length===0)B4()};return J0.on(q,Z),Q},B4=function(){if(!q2||!Z2(global.process))return;q2=!1,X2.forEach(function(X){try{n.removeListener(X,L4[X])}catch(q){}}),n.emit=z4,n.reallyExit=s7,J0.count-=1},Q6.exports.unload=B4,x1=function(X,q,Q){if(J0.emitted[X])return;J0.emitted[X]=!0,J0.emit(X,q,Q)},L4={},X2.forEach(function(Z){L4[Z]=function(){if(!Z2(global.process))return;var q=n.listeners(Z);if(q.length===J0.count){if(B4(),x1("exit",null,Z),x1("afterexit",null,Z),pX&&Z==="SIGHUP")Z="SIGINT";n.kill(n.pid,Z)}}}),Q6.exports.signals=function(){return X2},q2=!1,o7=function(){if(q2||!Z2(global.process))return;q2=!0,J0.count+=1,X2=X2.filter(function(X){try{return n.on(X,L4[X]),!0}catch(q){return!1}}),n.emit=cX,n.reallyExit=dX},Q6.exports.load=o7,s7=n.reallyExit,dX=function(X){if(!Z2(global.process))return;n.exitCode=X||0,x1("exit",n.exitCode,null),x1("afterexit",n.exitCode,null),s7.call(n,n.exitCode)},z4=n.emit,cX=function(X,q){if(X==="exit"&&Z2(global.process)){if(q!==void 0)n.exitCode=q;var Q=z4.apply(this,arguments);return x1("exit",n.exitCode,null),x1("afterexit",n.exitCode,null),Q}else return z4.apply(this,arguments)}}var uX,X2,pX,q6,J0,B4,x1,L4,q2,o7,s7,dX,z4,cX});var mG=c((OO,lX)=>{var gG=Symbol();function IO(Z,X,q){let Q=X[gG];if(Q)return X.stat(Z,(J,Y)=>{if(J)return q(J);q(null,Y.mtime,Q)});let $=new Date(Math.ceil(Date.now()/1000)*1000+5);X.utimes(Z,$,$,(J)=>{if(J)return q(J);X.stat(Z,(Y,H)=>{if(Y)return q(Y);let U=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(X,gG,{value:U}),q(null,H.mtime,U)})})}function wO(Z){let X=Date.now();if(Z==="s")X=Math.ceil(X/1000)*1000;return new Date(X)}OO.probe=IO;OO.getMtime=wO});var lG=c((SO,R4)=>{var xO=H0("path"),aX=mX(),PO=bG(),EO=fG(),uG=mG(),W1={};function _4(Z,X){return X.lockfilePath||`${Z}.lock`}function oX(Z,X,q){if(!X.realpath)return q(null,xO.resolve(Z));X.fs.realpath(Z,q)}function iX(Z,X,q){let Q=_4(Z,X);X.fs.mkdir(Q,($)=>{if(!$)return uG.probe(Q,X.fs,(J,Y,H)=>{if(J)return X.fs.rmdir(Q,()=>{}),q(J);q(null,Y,H)});if($.code!=="EEXIST")return q($);if(X.stale<=0)return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));X.fs.stat(Q,(J,Y)=>{if(J){if(J.code==="ENOENT")return iX(Z,{...X,stale:0},q);return q(J)}if(!pG(Y,X))return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));dG(Z,X,(H)=>{if(H)return q(H);iX(Z,{...X,stale:0},q)})})})}function pG(Z,X){return Z.mtime.getTime()<Date.now()-X.stale}function dG(Z,X,q){X.fs.rmdir(_4(Z,X),(Q)=>{if(Q&&Q.code!=="ENOENT")return q(Q);q()})}function r7(Z,X){let q=W1[Z];if(q.updateTimeout)return;if(q.updateDelay=q.updateDelay||X.update,q.updateTimeout=setTimeout(()=>{q.updateTimeout=null,X.fs.stat(q.lockfilePath,(Q,$)=>{let J=q.lastUpdate+X.stale<Date.now();if(Q){if(Q.code==="ENOENT"||J)return nX(Z,q,Object.assign(Q,{code:"ECOMPROMISED"}));return q.updateDelay=1000,r7(Z,X)}if(q.mtime.getTime()!==$.mtime.getTime())return nX(Z,q,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=uG.getMtime(q.mtimePrecision);X.fs.utimes(q.lockfilePath,H,H,(U)=>{let G=q.lastUpdate+X.stale<Date.now();if(q.released)return;if(U){if(U.code==="ENOENT"||G)return nX(Z,q,Object.assign(U,{code:"ECOMPROMISED"}));return q.updateDelay=1000,r7(Z,X)}q.mtime=H,q.lastUpdate=Date.now(),q.updateDelay=null,r7(Z,X)})})},q.updateDelay),q.updateTimeout.unref)q.updateTimeout.unref()}function nX(Z,X,q){if(X.released=!0,X.updateTimeout)clearTimeout(X.updateTimeout);if(W1[Z]===X)delete W1[Z];X.options.onCompromised(q)}function vO(Z,X,q){X={stale:1e4,update:null,realpath:!0,retries:0,fs:aX,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),oX(Z,X,(Q,$)=>{if(Q)return q(Q);let J=PO.operation(X.retries);J.attempt(()=>{iX($,X,(Y,H,U)=>{if(J.retry(Y))return;if(Y)return q(J.mainError());let G=W1[$]={lockfilePath:_4($,X),mtime:H,mtimePrecision:U,options:X,lastUpdate:Date.now()};r7($,X),q(null,(W)=>{if(G.released)return W&&W(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));cG($,{...X,realpath:!1},W)})})})})}function cG(Z,X,q){X={fs:aX,realpath:!0,...X},oX(Z,X,(Q,$)=>{if(Q)return q(Q);let J=W1[$];if(!J)return q(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));J.updateTimeout&&clearTimeout(J.updateTimeout),J.released=!0,delete W1[$],dG($,X,q)})}function yO(Z,X,q){X={stale:1e4,realpath:!0,fs:aX,...X},X.stale=Math.max(X.stale||0,2000),oX(Z,X,(Q,$)=>{if(Q)return q(Q);X.fs.stat(_4($,X),(J,Y)=>{if(J)return J.code==="ENOENT"?q(null,!1):q(J);return q(null,!pG(Y,X))})})}function CO(){return W1}EO(()=>{for(let Z in W1){let X=W1[Z].options;try{X.fs.rmdirSync(_4(Z,X))}catch(q){}}});SO.lock=vO;SO.unlock=cG;SO.check=yO;SO.getLocks=CO});var iG=c((bi,nG)=>{var mO=mX();function uO(Z){let X=["mkdir","realpath","stat","rmdir","utimes"],q={...Z};return X.forEach((Q)=>{q[Q]=(...$)=>{let J=$.pop(),Y;try{Y=Z[`${Q}Sync`](...$)}catch(H){return J(H)}J(null,Y)}}),q}function pO(Z){return(...X)=>new Promise((q,Q)=>{X.push(($,J)=>{if($)Q($);else q(J)}),Z(...X)})}function dO(Z){return(...X)=>{let q,Q;if(X.push(($,J)=>{q=$,Q=J}),Z(...X),q)throw q;return Q}}function cO(Z){if(Z={...Z},Z.fs=uO(Z.fs||mO),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}nG.exports={toPromise:pO,toSync:dO,toSyncOptions:cO}});var oG=c((hi,P1)=>{var $6=lG(),{toPromise:t7,toSync:e7,toSyncOptions:sX}=iG();async function aG(Z,X){let q=await t7($6.lock)(Z,X);return t7(q)}function lO(Z,X){let q=e7($6.lock)(Z,sX(X));return e7(q)}function nO(Z,X){return t7($6.unlock)(Z,X)}function iO(Z,X){return e7($6.unlock)(Z,sX(X))}function aO(Z,X){return t7($6.check)(Z,X)}function oO(Z,X){return e7($6.check)(Z,sX(X))}P1.exports=aG;P1.exports.lock=aG;P1.exports.unlock=nO;P1.exports.lockSync=lO;P1.exports.unlockSync=iO;P1.exports.check=aO;P1.exports.checkSync=oO});function tX(){if(!rX)rX=oG();return rX}function fi(Z,X){return tX().lock(Z,X)}function sG(Z,X){return tX().lockSync(Z,X)}function gi(Z,X){return tX().check(Z,X)}var rX;var rG=()=>{};import{basename as q5,dirname as Q5,join as E1}from"path";function rO(){return Zq}function b7(Z){eG=Z}function h7(Z,X,q){let Q=Q5(Z);k().mkdirSync(Q);let J=G3(X,(Y,H)=>m(Y)!==m(q[H]));if(Z6(Z,m(J,null,2),{encoding:"utf-8",mode:384}),Z===K0())Zq++}function f7(Z,X,q){let Q=X(),$=Q5(Z),J=k();J.mkdirSync($);let Y;try{let H=`${Z}.lock`,U=Date.now();if(Y=sG(Z,{lockfilePath:H,onCompromised:(z)=>{P(`Config lock compromised: ${z}`,{level:"error"})}}),Date.now()-U>100)P("Lock acquisition took longer than expected - another Claude instance may be running");if(eG&&Z===K0())try{let z=J.statSync(Z)}catch(z){if(U0(z)!=="ENOENT")throw z}let W=K1(Z,X);if(Z===K0()&&a2(W))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"}),!1;let V=q(W);if(V===W)return!1;let L=G3(V,(z,_)=>m(z)!==m(Q[_]));try{let z=q5(Z),_=$5();try{J.mkdirSync(_)}catch(j){if(U0(j)!=="EEXIST")throw j}let R=60000,M=J.readdirStringSync(_).filter((j)=>j.startsWith(`${z}.backup.`)).sort().reverse(),F=M[0],N=F?Number(F.split(".backup.").pop()):0,D=Number.isNaN(N)||Date.now()-N>=R,w=Zk(Z),T=D&&w;if(T){let j=E1(_,`${z}.backup.${Date.now()}`);J.copyFileSync(Z,j)}if(w){let A=T?J.readdirStringSync(_).filter((b)=>b.startsWith(`${z}.backup.`)).sort().reverse():M;for(let b of A.slice(5))try{J.unlinkSync(E1(_,b))}catch{}}}catch(z){if(U0(z)!=="ENOENT")P(`Failed to backup config: ${z}`,{level:"error"})}if(Z6(Z,m(L,null,2),{encoding:"utf-8",mode:384}),Z===K0())Zq++;return!0}finally{if(Y)Y()}}function tO(){return X5}function eO(){if(X5)return;let Z=Date.now();G0("info","enable_configs_started"),X5=!0,K1(K0(),O0,!0),G0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function $5(){return E1($0(),"backups")}function tG(Z){let X=k(),q=q5(Z),Q=$5();try{let Y=X.readdirStringSync(Q).filter((H)=>H.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return E1(Q,Y)}catch{}let $=Q5(Z);try{let Y=X.readdirStringSync($).filter((U)=>U.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return E1($,Y);let H=`${Z}.backup`;try{return X.statSync(H),H}catch{}}catch{}return null}function Zk(Z){let X=k();try{return X0(T0(X.readFileSync(Z,{encoding:"utf-8"}))),!0}catch{return!1}}function Xk(Z,X){let q=k(),Q=q5(Z),$=new Set;for(let J of[$5(),Q5(Z)]){let Y;try{Y=q.readdirStringSync(J).filter((H)=>H.startsWith(`${Q}.backup.`)).sort().reverse()}catch{continue}for(let H of Y){let U=E1(J,H);if($.has(U))continue;$.add(U);try{let G=X0(T0(q.readFileSync(U,{encoding:"utf-8"})));return{config:{...X(),...G},backupPath:U}}catch{}}}return null}function K1(Z,X,q){if(!X5)throw Error("Config accessed before allowed.");let Q=k();try{let $=Q.readFileSync(Z,{encoding:"utf-8"});try{let J=X0(T0($));return{...X(),...J}}catch(J){let Y=J instanceof Error?J.message:String(J);throw new Z5(Y,Z,X())}}catch($){if(U0($)==="ENOENT"){let Y=tG(Z);if(Y)process.stderr.write(`
|
|
78
|
+
Claude configuration file not found at: ${Z}
|
|
79
|
+
A backup file exists at: ${Y}
|
|
80
|
+
You can manually restore it by running: cp "${Y}" "${Z}"
|
|
81
|
+
|
|
82
|
+
`);return X()}if($ instanceof Z5&&q)throw $;if($ instanceof Z5){if(P(`Config file corrupted, resetting to defaults: ${$.message}`,{level:"error"}),!eX){eX=!0;try{S($);let _=!1;try{Q.statSync(`${Z}.backup`),_=!0}catch{}}finally{eX=!1}}process.stderr.write(`
|
|
83
|
+
Claude configuration file at ${Z} is corrupted: ${$.message}
|
|
84
|
+
`);let Y=q5(Z),H=$5();try{Q.mkdirSync(H)}catch(_){if(U0(_)!=="EEXIST")throw _}let U=Q.readdirStringSync(H).filter((_)=>_.startsWith(`${Y}.corrupted.`)),G,W=!1,V=Q.readFileSync(Z,{encoding:"utf-8"});for(let _ of U)try{let R=Q.readFileSync(E1(H,_),{encoding:"utf-8"});if(V===R){W=!0;break}}catch{}if(!W){G=E1(H,`${Y}.corrupted.${Date.now()}`);try{Q.copyFileSync(Z,G),P(`Corrupted config backed up to: ${G}`,{level:"error"})}catch{}}let L=Xk(Z,X);if(L){if(G)process.stderr.write(`The corrupted file has been backed up to: ${G}
|
|
85
|
+
`);let _=!1;try{Q.copyFileSync(L.backupPath,Z),_=!0}catch{}return process.stderr.write(_?`Recovered configuration from backup: ${L.backupPath}
|
|
86
|
+
|
|
87
|
+
`:`Recovered configuration from backup (in memory): ${L.backupPath}
|
|
88
|
+
|
|
89
|
+
`),L.config}let z=tG(Z);if(G)process.stderr.write(`The corrupted file has been backed up to: ${G}
|
|
90
|
+
`);else if(W)process.stderr.write(`The corrupted file has already been backed up.
|
|
91
|
+
`);if(z)process.stderr.write(`A backup file exists at: ${z}
|
|
92
|
+
You can manually restore it by running: cp "${z}" "${Z}"
|
|
93
|
+
|
|
94
|
+
`);else process.stderr.write(`
|
|
95
|
+
`)}return X()}}var eX=!1,eG=null,Zq=0,X5=!1;var g7=B(()=>{v$();D6();o2();g0();U4();J4();s0();I1();u7();F0();w6();rG();k0();M0()});function ZW(Z){let X=Z.slice(Z.lastIndexOf(".")).toLowerCase();return qk.has(X)}function XW(Z){let X=Math.min(Z.length,Qk),q=0;for(let Q=0;Q<X;Q++){let $=Z[Q];if($===0)return!0;if($<32&&$!==9&&$!==10&&$!==13)q++}return q/X>0.1}var qk,Qk=8192;var qW=B(()=>{qk=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{readFile as $k}from"fs/promises";import{join as Jk}from"path";async function M4(Z,X,q,Q){try{let $=await $k(Jk(Z,"config"),"utf-8");return Yk($,X,q,Q)}catch{return null}}function Yk(Z,X,q,Q){let $=Z.split(`
|
|
96
|
+
`),J=X.toLowerCase(),Y=Q.toLowerCase(),H=!1;for(let U of $){let G=U.trim();if(G.length===0||G[0]==="#"||G[0]===";")continue;if(G[0]==="["){H=Gk(G,J,q);continue}if(!H)continue;let W=Hk(G);if(W&&W.key.toLowerCase()===Y)return W.value}return null}function Hk(Z){let X=0;while(X<Z.length&&Wk(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=Kk(Z,X);return{key:q,value:Q}}function Kk(Z,X){let q="",Q=!1,$=X;while($<Z.length){let J=Z[$];if(!Q&&(J==="#"||J===";"))break;if(J==='"'){Q=!Q,$++;continue}if(J==="\\"&&$+1<Z.length){let Y=Z[$+1];if(Q){switch(Y){case"n":q+=`
|
|
97
|
+
`;break;case"t":q+="\t";break;case"b":q+="\b";break;case'"':q+='"';break;case"\\":q+="\\";break;default:q+=Y;break}$+=2;continue}if(Y==="\\"){q+="\\",$+=2;continue}}q+=J,$++}if(!Q)q=Uk(q);return q}function Uk(Z){let X=Z.length;while(X>0&&(Z[X-1]===" "||Z[X-1]==="\t"))X--;return Z.slice(0,X)}function Gk(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 J="";while(Q<Z.length&&Z[Q]!=='"'){if(Z[Q]==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(Y==="\\"||Y==='"'){J+=Y,Q+=2;continue}J+=Y,Q+=2;continue}J+=Z[Q],Q++}if(Q>=Z.length||Z[Q]!=='"')return!1;if(Q++,Q>=Z.length||Z[Q]!=="]")return!1;return J===q}function Wk(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var QW=()=>{};import{unwatchFile as $W,watchFile as Vk}from"fs";import{readdir as Bk,readFile as Q2,stat as HW}from"fs/promises";import{join as y0,resolve as J5}from"path";function Ba(){J6.clear()}async function u0(Z){let X=J5(Z??Z0()),q=J6.get(X);if(q!==void 0)return q;let Q=H6(X);if(!Q)return J6.set(X,null),null;let $=y0(Q,".git");try{if((await HW($)).isFile()){let Y=(await Q2($,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),U=J5(Q,H);return J6.set(X,U),U}}return J6.set(X,$),$}catch{return J6.set(X,null),null}}function Y5(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 Xq(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function F4(Z){try{let X=(await Q2(y0(Z,"HEAD"),"utf-8")).trim();if(X.startsWith("ref:")){let q=X.slice(4).trim();if(q.startsWith("refs/heads/")){let $=q.slice(11);if(!Y5($))return null;return{type:"branch",name:$}}if(!Y5(q))return null;let Q=await Y6(Z,q);return Q?{type:"detached",sha:Q}:{type:"detached",sha:""}}if(!Xq(X))return null;return{type:"detached",sha:X}}catch{return null}}async function Y6(Z,X){let q=await JW(Z,X);if(q)return q;let Q=await $2(Z);if(Q&&Q!==Z)return JW(Q,X);return null}async function JW(Z,X){try{let q=(await Q2(y0(Z,X),"utf-8")).trim();if(q.startsWith("ref:")){let Q=q.slice(4).trim();if(!Y5(Q))return null;return Y6(Z,Q)}if(!Xq(q))return null;return q}catch{}try{let q=await Q2(y0(Z,"packed-refs"),"utf-8");for(let Q of q.split(`
|
|
98
|
+
`)){if(Q.startsWith("#")||Q.startsWith("^"))continue;let $=Q.indexOf(" ");if($===-1)continue;if(Q.slice($+1)===X){let J=Q.slice(0,$);return Xq(J)?J:null}}}catch{}return null}async function $2(Z){try{let X=(await Q2(y0(Z,"commondir"),"utf-8")).trim();return J5(Z,X)}catch{return null}}async function Lk(Z,X,q){try{let Q=(await Q2(y0(Z,X),"utf-8")).trim();if(Q.startsWith("ref:")){let $=Q.slice(4).trim();if($.startsWith(q)){let J=$.slice(q.length);if(!Y5(J))return null;return J}}}catch{}return null}class KW{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 $2(this.gitDir),this.watchPath(y0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(y0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),K4(async()=>{this.stopWatching()})}watchPath(Z,X){this.watchedPaths.push(Z),Vk(Z,{interval:zk},X)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await F4(this.gitDir),X=this.commonDir??this.gitDir,q=Z?.type==="branch"?y0(X,"refs","heads",Z.name):null;if(q===this.branchRefPath)return;if(this.branchRefPath)$W(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 YW(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)$W(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(),$=this.cache.get(Z);if($&&!$.dirty)$.value=Q;if(!$)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 _k(){let Z=await u0();if(!Z)return"HEAD";let X=await F4(Z);if(!X)return"HEAD";return X.type==="branch"?X.name:"HEAD"}async function Rk(){let Z=await u0();if(!Z)return"";let X=await F4(Z);if(!X)return"";if(X.type==="branch")return await Y6(Z,`refs/heads/${X.name}`)??"";return X.sha}async function Mk(){let Z=await u0();if(!Z)return null;let X=await M4(Z,"remote","origin","url");if(X)return X;let q=await $2(Z);if(q&&q!==Z)return M4(q,"remote","origin","url");return null}async function Fk(){let Z=await u0();if(!Z)return"main";let X=await $2(Z)??Z,q=await Lk(X,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(q)return q;for(let Q of["main","master"])if(await Y6(X,`refs/remotes/origin/${Q}`))return Q;return"main"}function UW(){return H5.get("branch",_k)}function GW(){return H5.get("head",Rk)}function WW(){return H5.get("remoteUrl",Mk)}function VW(){return H5.get("defaultBranch",Fk)}async function La(Z){let X=await u0(Z);if(!X)return null;let q=await F4(X);if(!q)return null;if(q.type==="branch")return Y6(X,`refs/heads/${q.name}`);return q.sha}async function za(Z){let X;try{let Q=(await Q2(y0(Z,".git"),"utf-8")).trim();if(!Q.startsWith("gitdir:"))return null;X=J5(Z,Q.slice(7).trim())}catch{return null}let q=await F4(X);if(!q)return null;if(q.type==="branch")return Y6(X,`refs/heads/${q.name}`);return q.sha}async function _a(Z){let X=await u0(Z);if(!X)return null;let q=await M4(X,"remote","origin","url");if(q)return q;let Q=await $2(X);if(Q&&Q!==X)return M4(Q,"remote","origin","url");return null}async function BW(){let Z=await u0();if(!Z)return!1;let X=await $2(Z)??Z;try{return await HW(y0(X,"shallow")),!0}catch{return!1}}async function LW(){try{let Z=await u0();if(!Z)return 0;let X=await $2(Z)??Z;return(await Bk(y0(X,"worktrees"))).length+1}catch{return 1}}var J6,zk=1000,H5;var zW=B(()=>{v1();YG();G1();D4();QW();J6=new Map;H5=new KW});import{createHash as Dk}from"crypto";import{readFileSync as qq,realpathSync as _W,statSync as RW}from"fs";import{open as Ak,readdir as Tk,readFile as jk,realpath as MW,stat as IW}from"fs/promises";import{basename as Ik,dirname as Qq,join as D0,resolve as U5,sep as FW}from"path";function wk(){function Z(X){let q=DW(X);return q===wW?null:q}return Z.cache=DW.cache,Z}function Ok(){function Z(X){let q=H6(X);if(!q)return null;return $q(q)}return Z.cache=$q.cache,Z}function kk(Z){let X=new Set,q=[];for(let Q of Z){if(!Q||X.has(Q))continue;X.add(Q),q.push(Q)}return q}function ya(Z,X){return kk([J2(Z),...X.map((q)=>J2(q))])}async function Ca(Z,X){let q=X?.maxDepth??3,Q=X?.maxDirs??1500,$=[],J=0,Y=async(U)=>{try{return await IW(D0(U,".git")),!0}catch{return!1}},H=async(U,G)=>{if(G>q||J>=Q)return;let W;try{W=await Tk(U,{withFileTypes:!0})}catch{return}for(let V of W){if(J>=Q)return;if(!V.isDirectory())continue;if(V.name.startsWith(".")||Nk.has(V.name))continue;let L=D0(U,V.name);if(J++,await Y(L)){$.push($q(L.normalize("NFC")));continue}await H(L,G+1)}};return await H(Z,1),$}function Sa(Z){return u0(Z)}async function ba(){let Z=Z0(),X=H6(Z);if(!X)return!1;try{let[q,Q]=await Promise.all([MW(Z),MW(X)]);return q===Q}catch{return Z===X}}function vk(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 $=Q[1],J=Q[2];if(mk($)&&J.startsWith("git/")){let Y=J.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 fa(){let Z=await Jq();if(!Z)return null;let X=vk(Z);if(!X)return null;return Dk("sha256").update(X).digest("hex").substring(0,16)}async function da(){try{let[Z,X,q,Q,$,J]=await Promise.all([Pk(),Ek(),Jq(),yk(),Ck(),bk()]);return{commitHash:Z,branchName:X,remoteUrl:q,isHeadOnRemote:Q,isClean:$,worktreeCount:J}}catch(Z){return null}}async function ca(){let{parseGitRemote:Z}=await import("./detectRepository-1.1.31-s6pe6c1x.mjs"),X=await Jq();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 fk(){let{stdout:Z,code:X}=await s(r(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(X===0&&Z.trim())return Z.trim();let{stdout:q,code:Q}=await s(r(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(Q===0){let J=q.match(/HEAD branch: (\S+)/);if(J&&J[1])return`origin/${J[1]}`}let $=["origin/main","origin/staging","origin/master"];for(let J of $){let{code:Y}=await s(r(),["rev-parse","--verify",J],{preserveOutputOnError:!1});if(Y===0)return J}return null}function gk(){return BW()}async function K5(){let{stdout:Z,code:X}=await s(r(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),q=Z.trim();if(X!==0||!q)return[];let Q=q.split(`
|
|
99
|
+
`).filter(Boolean),$=[],J=0;for(let Y of Q){if($.length>=jW){P(`Untracked file capture: reached max file count (${jW})`);break}if(ZW(Y))continue;try{let U=(await IW(Y)).size;if(U>AW){P(`Untracked file capture: skipping ${Y} (exceeds ${AW} bytes)`);continue}if(J+U>TW){P(`Untracked file capture: reached total size limit (${TW} bytes)`);break}if(U===0){$.push({path:Y,content:""});continue}let G=Math.min(hk,U),W=await Ak(Y,"r");try{let V=Buffer.alloc(G),{bytesRead:L}=await W.read(V,0,G,0),z=V.subarray(0,L);if(XW(z))continue;let _;if(U<=G)_=z.toString("utf-8");else _=await jk(Y,"utf-8");$.push({path:Y,content:_}),J+=U}finally{await W.close()}}catch(H){P(`Failed to read untracked file ${Y}: ${H}`)}}return $}async function la(){try{if(!await xk())return null;if(await gk()){P("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:z},_]=await Promise.all([s(r(),["diff","HEAD"]),K5()]);return{remote_base_sha:null,remote_base:null,patch:z||"",untracked_files:_,format_patch:null,head_sha:null,branch_name:null}}let X=await fk();if(!X){P("No remote found, using HEAD-only mode for issue");let[{stdout:z},_]=await Promise.all([s(r(),["diff","HEAD"]),K5()]);return{remote_base_sha:null,remote_base:null,patch:z||"",untracked_files:_,format_patch:null,head_sha:null,branch_name:null}}let{stdout:q,code:Q}=await s(r(),["merge-base","HEAD",X],{preserveOutputOnError:!1});if(Q!==0||!q.trim()){P("Merge-base failed, using HEAD-only mode for issue");let[{stdout:z},_]=await Promise.all([s(r(),["diff","HEAD"]),K5()]);return{remote_base_sha:null,remote_base:null,patch:z||"",untracked_files:_,format_patch:null,head_sha:null,branch_name:null}}let $=q.trim(),[{stdout:J},Y,{stdout:H,code:U},{stdout:G},{stdout:W}]=await Promise.all([s(r(),["diff",$]),K5(),s(r(),["format-patch",`${$}..HEAD`,"--stdout"]),s(r(),["rev-parse","HEAD"]),s(r(),["rev-parse","--abbrev-ref","HEAD"])]),V=null;if(U===0&&H&&H.trim())V=H;let L=W?.trim();return{remote_base_sha:$,remote_base:X,patch:J||"",untracked_files:Y,format_patch:V,head_sha:G?.trim()||null,branch_name:L&&L!=="HEAD"?L:null}}catch(Z){return S(Z),null}}function mk(Z){let X=Z.split(":")[0]??"";return X==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(X)}function na(){let Z=k(),X=Z0(),q=D0(X,".git");try{let Q=Z.statSync(q);if(Q.isFile())return!1;if(Q.isDirectory()){let $=D0(q,"HEAD");try{if(Z.statSync($).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(D0(X,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(D0(X,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(D0(X,"refs")).isDirectory())return!0}catch{}return!1}var wW,DW,H6,$q,J2,Nk,r,xk,OW=async(Z)=>{return H6(Z)!==null},Pk=async()=>{return GW()},Ek=async(Z)=>{if(Z){let{stdout:X,code:q}=await Y2(r(),["--no-optional-locks","rev-parse","--abbrev-ref","HEAD"],{cwd:Z,timeout:5000,preserveOutputOnError:!1});return q===0?X.trim():""}return UW()},ha=async()=>{return VW()},Jq=async()=>{return WW()},yk=async()=>{let{code:Z}=await s(r(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},ga=async()=>{let{stdout:Z,code:X}=await s(r(),["--no-optional-locks","rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1,useCwd:!0});return X===0&&parseInt(Z.trim(),10)>0},ma=async(Z)=>{let X=["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{stdout:q,code:Q}=Z?await Y2(r(),X,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await s(r(),X,{preserveOutputOnError:!1,useCwd:!0});if(Q!==0)return{ahead:0,behind:0};let $=q.trim().split(/\s+/);if($.length!==2)return{ahead:0,behind:0};let J=parseInt($[0],10),Y=parseInt($[1],10);return{ahead:Number.isFinite(Y)?Y:0,behind:Number.isFinite(J)?J:0}},Ck=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)X.push("-uno");let{stdout:q}=await s(r(),X,{preserveOutputOnError:!1});return q.trim().length===0},ua=async()=>{let{stdout:Z}=await s(r(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
|
|
100
|
+
`).map((X)=>X.trim().split(" ",2)[1]?.trim()).filter((X)=>typeof X==="string")},Sk=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"],{stdout:q}=Z?await Y2(r(),X,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await s(r(),X,{preserveOutputOnError:!1}),Q=[],$=[];return q.trim().split(`
|
|
101
|
+
`).filter((J)=>J.length>0).forEach((J)=>{let Y=J.substring(0,2),H=J.substring(2).trim();if(Y==="??")$.push(H);else if(H)Q.push(H)}),{tracked:Q,untracked:$}},bk=async()=>{return LW()},pa=async(Z)=>{try{let X=Z||`Claudin auto-stash - ${new Date().toISOString()}`,{untracked:q}=await Sk();if(q.length>0){let{code:$}=await s(r(),["add",...q],{preserveOutputOnError:!1});if($!==0)return!1}let{code:Q}=await s(r(),["stash","push","--message",X],{preserveOutputOnError:!1});return Q===0}catch(X){return!1}},AW=524288000,TW=5368709120,jW=20000,hk=65536;var D4=B(()=>{j1();qW();G1();g0();U4();G5();F0();zW();k0();$8();S7();wW=Symbol("git-root-not-found"),DW=R1((Z)=>{let X=Date.now();G0("info","find_git_root_started");let q=U5(Z),Q=q.substring(0,q.indexOf(FW)+1)||FW,$=0;while(q!==Q){try{let Y=D0(q,".git");$++;let H=RW(Y);if(H.isDirectory()||H.isFile())return G0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!0}),q.normalize("NFC")}catch{}let J=Qq(q);if(J===q)break;q=J}try{let J=D0(Q,".git");$++;let Y=RW(J);if(Y.isDirectory()||Y.isFile())return G0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!0}),Q.normalize("NFC")}catch{}return G0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!1}),wW},(Z)=>Z,50),H6=wk();$q=R1((Z)=>{try{let X=qq(D0(Z,".git"),"utf-8").trim();if(!X.startsWith("gitdir:"))return Z;let q=U5(Z,X.slice(7).trim()),Q=U5(q,qq(D0(q,"commondir"),"utf-8").trim());if(U5(Qq(q))!==D0(Q,"worktrees"))return Z;if(_W(qq(D0(q,"gitdir"),"utf-8").trim())!==D0(_W(Z),".git"))return Z;if(Ik(Q)!==".git")return Q.normalize("NFC");return Qq(Q).normalize("NFC")}catch{return Z}},(Z)=>Z,50),J2=Ok();Nk=new Set(["node_modules",".git","dist","build","out","target","vendor","coverage",".next",".turbo",".cache",".venv","venv","__pycache__"]);r=u(()=>{return C7("git")||"git"}),xk=u(async()=>{let Z=Date.now();G0("info","is_git_check_started");let X=H6(Z0())!==null;return G0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:X}),X})});import{resolve as uk}from"path";function pk(){return}function A4(){let Z=y1(),X=H2.get(Z);if(X!==void 0)return H2.delete(Z),H2.set(Z,X),X;let q=J2(Z),Q=q?k1(q):k1(uk(Z));if(H2.size>=dk){let $=H2.keys().next().value;if($!==void 0)H2.delete($)}return H2.set(Z,Q),Q}function T4(){let Z=A4(),X=a();if(!X.projects)return b1;let q=X.projects[Z]??b1;if(typeof q.allowedTools==="string")q.allowedTools=N0(q.allowedTools)??[];return q}function W5(Z){let X=A4(),q=null;try{if(f7(K0(),O0,($)=>{let J=$.projects?.[X]??b1,Y=Z(J);if(Y===J)return $;return q={...$,projects:{...$.projects,[X]:Y}},q})&&q)H4(q),Y4()}catch(Q){P(`Failed to save config with lock: ${Q}`,{level:"error"});let $=K1(K0(),O0);if(a2($)){P("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"});return}let J=$.projects?.[X]??b1,Y=Z(J);if(Y===J)return;q={...$,projects:{...$.projects,[X]:Y}},h7(K0(),q,h1),H4(q),Y4()}}var Yq,dk=32,H2;var Hq=B(()=>{v1();D6();g7();o2();N6();g0();J4();W4();D4();Yq={...b1};H2=new Map});import{resolve as Kq}from"path";function ck(){NW=!1}function lk(){return NW||=nk()}function nk(){if(kW())return!0;let Z=a(),X=A4();if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let Q=k1(Z0());while(!0){if(Z.projects?.[Q]?.hasTrustDialogAccepted)return!0;let J=k1(Kq(Q,".."));if(J===Q)break;Q=J}return!1}function ik(Z){let X=a(),q=k1(Kq(Z));while(!0){if(X.projects?.[q]?.hasTrustDialogAccepted)return!0;let Q=k1(Kq(q,".."));if(Q===q)return!1;q=Q}}var NW=!1;var xW=B(()=>{v1();o2();Hq();G1();W4()});function ok(Z,X,q){if(q!==void 0&&!V5(Z[X],q)||q===void 0&&!(X in Z))EW(Z,X,q)}var j4;var Uq=B(()=>{ak();PW();j4=ok});function sk(Z){return function(X,q,Q){var $=-1,J=Object(X),Y=Q(X),H=Y.length;while(H--){var U=Y[Z?H:++$];if(q(J[U],U,J)===!1)break}return X}}var vW;var yW=B(()=>{vW=sk});var rk,CW;var SW=B(()=>{yW();rk=vW(),CW=rk});function tk(Z){return B5(Z)&&L5(Z)}var fW;var gW=B(()=>{hW();bW();fW=tk});function YN(Z){if(!B5(Z)||mW(Z)!=XN)return!1;var X=uW(Z);if(X===null)return!0;var q=$N.call(X,"constructor")&&X.constructor;return typeof q=="function"&&q instanceof q&&pW.call(q)==JN}var XN="[object Object]",qN,QN,pW,$N,JN,dW;var cW=B(()=>{ek();ZN();bW();qN=Function.prototype,QN=Object.prototype,pW=qN.toString,$N=QN.hasOwnProperty,JN=pW.call(Object);dW=YN});function HN(Z,X){if(X==="constructor"&&typeof Z[X]==="function")return;if(X=="__proto__")return;return Z[X]}var I4;var Gq=B(()=>{I4=HN});function UN(Z){return lW(Z,z5(Z))}var iW;var aW=B(()=>{KN();nW();iW=UN});function FN(Z,X,q,Q,$,J,Y){var H=I4(Z,q),U=I4(X,q),G=Y.get(U);if(G){j4(Z,q,G);return}var W=J?J(H,U,q+"",Z,X,Y):void 0,V=W===void 0;if(V){var L=Wq(U),z=!L&&sW(U),_=!L&&!z&&rW(U);if(W=U,L||z||_)if(Wq(H))W=H;else if(fW(H))W=eW(H);else if(z)V=!1,W=tW(U,!0);else if(_)V=!1,W=ZV(U,!0);else W=[];else if(dW(U)||Vq(U)){if(W=H,Vq(H))W=iW(H);else if(!e0(H)||oW(H))W=XV(U)}else V=!1}if(V)Y.set(U,W),$(W,U,Q,J,Y),Y.delete(U);j4(Z,q,W)}var qV;var QV=B(()=>{Uq();zN();RN();_N();MN();VN();WN();gW();BN();GN();r4();cW();LN();Gq();aW();qV=FN});function JV(Z,X,q,Q,$){if(Z===X)return;CW(X,function(J,Y){if($||($=new $V),e0(J))qV(Z,X,Y,q,JV,Q,$);else{var H=Q?Q(I4(Z,Y),J,Y+"",Z,X,$):void 0;if(H===void 0)H=J;j4(Z,Y,H)}},z5)}var YV;var HV=B(()=>{DN();Uq();SW();QV();r4();nW();Gq();YV=JV});function AN(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 KV;var UV=B(()=>{KV=AN});function TN(Z,X,q){return X=GV(X===void 0?Z.length-1:X,0),function(){var Q=arguments,$=-1,J=GV(Q.length-X,0),Y=Array(J);while(++$<J)Y[$]=Q[X+$];$=-1;var H=Array(X+1);while(++$<X)H[$]=Q[$];return H[X]=q(Y),KV(Z,this,H)}}var GV,WV;var VV=B(()=>{UV();GV=Math.max;WV=TN});function jN(Z){return function(){return Z}}var BV;var LV=B(()=>{BV=jN});var wN,_V;var RV=B(()=>{LV();IN();zV();wN=!Bq?_5:function(Z,X){return Bq(Z,"toString",{configurable:!0,enumerable:!1,value:BV(X),writable:!0})},_V=wN});function xN(Z){var X=0,q=0;return function(){var Q=NN(),$=kN-(Q-q);if(q=Q,$>0){if(++X>=ON)return arguments[0]}else X=0;return Z.apply(void 0,arguments)}}var ON=800,kN=16,NN,MV;var FV=B(()=>{NN=Date.now;MV=xN});var PN,DV;var AV=B(()=>{RV();FV();PN=MV(_V),DV=PN});function EN(Z,X){return DV(WV(Z,X,_5),Z+"")}var TV;var jV=B(()=>{zV();VV();AV();TV=EN});function vN(Z,X,q){if(!e0(q))return!1;var Q=typeof X;if(Q=="number"?L5(q)&&t4(X,q.length):Q=="string"&&(X in q))return V5(q[X],Z);return!1}var IV;var wV=B(()=>{PW();hW();D$();r4();IV=vN});function yN(Z){return TV(function(X,q){var Q=-1,$=q.length,J=$>1?q[$-1]:void 0,Y=$>2?q[2]:void 0;if(J=Z.length>3&&typeof J=="function"?($--,J):void 0,Y&&IV(q[0],q[1],Y))J=$<3?void 0:J,$=1;X=Object(X);while(++Q<$){var H=q[Q];if(H)Z(X,H,Q,J)}return X})}var OV;var kV=B(()=>{jV();wV();OV=yN});var CN,V1;var NV=B(()=>{HV();kV();CN=OV(function(Z,X,q,Q){YV(Z,X,q,Q)}),V1=CN});import{join as SN}from"path";function ys(Z){w4=Z}function Cs(){w4=null,Lq=void 0}function Ss(Z){return Lq=Z,Z}function hN(){return SN($0(),bN)}function fN(){try{let Z=U1(hN()),X=X0(T0(Z));if(!X||typeof X!=="object"||Array.isArray(X))return null;return X}catch{return null}}function R5(){if(Lq!==!0)return null;if(w4)return w4;let Z=fN();if(Z)return w4=Z,O4(),Z;return null}var bN="remote-settings.json",w4=null,Lq;var PV=B(()=>{s0();G4();w6();xV();M0()});function hs(Z,X){return Z.flatMap((q,Q)=>Q?[X(Q),q]:[q])}function zq(Z,X){let q=0;for(let Q of Z)q+=+!!X(Q);return q}function EV(Z){return[...new Set(Z)]}var _q=()=>{};import{appendFile as gN,mkdir as mN,readFile as uN,writeFile as pN}from"fs/promises";import{homedir as dN}from"os";import{dirname as cN,join as lN}from"path";async function nN(Z,X){let{code:q}=await Y2("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:X});return q===0}function iN(){return lN(dN(),".config","git","ignore")}async function vV(Z,X=Z0()){try{if(!await OW(X))return;let q=`**/${Z}`,Q=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await nN(Q,X))return;let $=iN(),J=cN($);await mN(J,{recursive:!0});try{if((await uN($,{encoding:"utf-8"})).includes(q))return;await gN($,`
|
|
102
|
+
${q}
|
|
103
|
+
`)}catch(Y){if(U0(Y)==="ENOENT")await pN($,`${q}
|
|
104
|
+
`,"utf-8");else throw Y}}catch(q){S(q)}}var yV=B(()=>{G1();I1();G5();D4();k0()});function ss(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 rs(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 ts(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 es(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 Zr(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 k4(){let Z=CV(),X=new Set(Z);return X.add("policySettings"),X.add("flagSettings"),Array.from(X)}function Xr(Z){return k4().includes(Z)}var os,qr,SV="https://json.schemastore.org/claude-code-settings.json";var Rq=B(()=>{v1();os=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];qr=["localSettings","projectSettings","userSettings"]});function bV(Z){M5.set(Z,Date.now())}function $r(Z,X){let q=M5.get(Z);if(q!==void 0&&Date.now()-q<X)return M5.delete(Z),!0;return!1}function Jr(){M5.clear()}var M5;var hV=B(()=>{M5=new Map});function fV(Z){let X=[],q=[];for(let Q of Z){if(typeof Q!=="string"||Q.trim().length===0){q.push({entry:String(Q??""),reason:"empty"});continue}if(Q.length>1e4){q.push({entry:Q,reason:"too-long"});continue}if(aN.test(Q)){q.push({entry:Q,reason:"control-characters"});continue}if(oN.test(Q)){q.push({entry:Q,reason:"invisible-characters"});continue}if(sN.test(Q)){q.push({entry:Q,reason:"settings-token"});continue}if(X.length>=200){q.push({entry:Q,reason:"over-entry-cap"});continue}X.push(Q.trim())}return{entries:X,dropped:q}}function Kr(Z){return Z.some((X)=>X.trim()==="$defaults")}function Zx(Z,X){if(Z.length===0)return[...X];let q=[],Q=!1;for(let $ of Z){if($.trim()==="$defaults"){if(!Q)q.push(...X),Q=!0;continue}q.push($)}return q}function Ur(Z){let X=[],q=[];for(let Q of Z){let $=Q.trim();if(rN.test($)||tN.test($)||eN.test($)){q.push({entry:Q,reason:"too-broad"});continue}X.push(Q)}return{entries:X,dropped:q}}function Xx(Z){return Z.split(`
|
|
105
|
+
`).map((X)=>X.trim()).filter((X)=>X.startsWith("- ")).map((X)=>X.slice(2))}function Gr(Z,X){if(Z.length===0)return X;let q=Zx(Z,Xx(X));if(q.length===0)return"";return`
|
|
106
|
+
${q.map((Q)=>`- ${Q}`).join(`
|
|
107
|
+
`)}
|
|
108
|
+
`}function gV(Z){switch(Z){case"empty":return"empty entry";case"control-characters":return"contains control characters";case"invisible-characters":return"contains invisible or bidirectional characters";case"settings-token":return"contains a settings delimiter token";case"too-long":return"longer than 10000 characters";case"over-entry-cap":return"beyond the 200-entry limit";case"too-broad":return"too broad for auto mode to honor safely"}}var Hr="$defaults",aN,oN,sN,rN,tN,eN;var mV=B(()=>{aN=/[\u0000-\u001F\u007F-\u009F]/,oN=/[\p{Cf}\p{Zl}\p{Zp}\u2028\u2029\uFE00-\uFE0F]|[\u{E0100}-\u{E01EF}]/u,sN=/<\/?settings_/i,rN=/^[A-Za-z_][A-Za-z0-9_]*\((\*|:\*|\s*)\)$/,tN=/^(Bash|PowerShell)\(\s*(sh|bash|zsh|dash|ksh|fish|curl|wget|eval|python3?|node|perl|ruby|env|xargs|sudo|doas|pwsh|powershell)\b[^)]*\*[^)]*\)$/i,eN=/^(?:allow\s+)?(?:any|all|every)\s+(?:tool\s+calls?|tool\s+uses?|commands?|bash\s+commands?|shell\s+commands?|actions?|operations?)\b/i});import{join as qx}from"path";var C1,N4;var F5=B(()=>{j1();s2();C1=u(function(){switch(m0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),N4=u(function(){return qx(C1(),"managed-settings.d")})});var Qx,$x,uV;var pV=B(()=>{t0();K2();Qx=I(()=>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()),$x=I(()=>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()),uV=I(()=>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:Qx(),filesystem:$x(),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())});var Dr,Ar="∙",Tr="✻",jr="↑",Ir="↓",wr="↯",Or="○",kr="◐",Nr="●",xr="◎",Pr="◉",Er="◍",vr="▶",dV="⏸",yr="↻",Cr="◇",Sr="◆",br="※",hr="▎",fr,gr="·✔︎·",mr="×";var cV=B(()=>{J4();Dr=i2.platform==="darwin"?"⏺":"●",fr=["·|·","·/·","·—·","·\\·"]});var zx={};Mq(zx,{toExternalPermissionMode:()=>Ux,permissionModeTitle:()=>Wx,permissionModeSymbol:()=>Bx,permissionModeSchema:()=>Yx,permissionModeFromString:()=>Gx,isExternalPermissionMode:()=>Kx,isDefaultMode:()=>Vx,getModeColor:()=>Lx,externalPermissionModeSchema:()=>Hx,PERMISSION_MODES:()=>K6,EXTERNAL_PERMISSION_MODES:()=>Fq});function Kx(Z){return Z!=="auto"}function D5(Z){return lV[Z]??lV.default}function Ux(Z){return D5(Z).external}function Gx(Z){return K6.includes(Z)?Z:"default"}function Wx(Z){return D5(Z).title}function Vx(Z){return Z==="default"||Z===void 0}function Bx(Z){return D5(Z).symbol}function Lx(Z){return D5(Z).color}var Yx,Hx,lV;var nV=B(()=>{t0();cV();Jx();K2();Yx=I(()=>K.enum(K6)),Hx=I(()=>K.enum(Fq)),lV={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:dV,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 iV=()=>{};var aV;var oV=B(()=>{iV();aV=["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 sV=()=>{};var rV=()=>{};var tV=B(()=>{oV();sV();rV()});var eV,tr="bash";var ZB=B(()=>{eV=["bash","powershell"]});function _x(){let Z=K.object({type:K.literal("command").describe("Shell command hook type"),command:K.string().describe("Shell command to execute"),if:A5(),shell:K.enum(eV).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."),interactive:K.boolean().optional().describe("If true, stdin stays open after the input JSON so the hook can ask the user a question (the prompt protocol). Leave it off for an ordinary hook: it reads its input to EOF, and an stdin left open blocks it until its timeout.")}),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:A5(),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-5"). 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:A5(),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:A5(),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-5"). 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 A5,Rx,Mx,U2;var T5=B(()=>{tV();t0();K2();ZB();A5=I(()=>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.'));Rx=I(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:X,AgentHookSchema:q,HttpHookSchema:Q}=_x();return K.discriminatedUnion("type",[Z,X,q,Q])}),Mx=I(()=>K.object({matcher:K.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:K.array(Rx()).describe("List of hooks to execute when the matcher matches")})),U2=I(()=>K.partialRecord(K.enum(aV),K.array(Mx())))});var Ht,Kt,Fx,XB,Dx,Ax,Tx,jx,Ix,wx,Ox,j5,Ut;var qB=B(()=>{t0();K2();Ht=I(()=>K.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),Kt=I(()=>K.enum(["stdio","sse","sse-ide","http","ws","sdk"])),Fx=I(()=>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()})),XB=I(()=>K.object({clientId:K.string().optional(),callbackPort:K.number().int().positive().optional(),authServerMetadataUrl:K.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional()})),Dx=I(()=>K.object({type:K.literal("sse"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:XB().optional()})),Ax=I(()=>K.object({type:K.literal("sse-ide"),url:K.string(),ideName:K.string(),ideRunningInWindows:K.boolean().optional()})),Tx=I(()=>K.object({type:K.literal("ws-ide"),url:K.string(),ideName:K.string(),authToken:K.string().optional(),ideRunningInWindows:K.boolean().optional()})),jx=I(()=>K.object({type:K.literal("http"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:XB().optional()})),Ix=I(()=>K.object({type:K.literal("ws"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional()})),wx=I(()=>K.object({type:K.literal("sdk"),name:K.string()})),Ox=I(()=>K.object({type:K.literal("claudeai-proxy"),url:K.string(),id:K.string()})),j5=I(()=>K.union([Fx(),Dx(),Ax(),Tx(),jx(),Ix(),wx(),Ox()])),Ut=I(()=>K.object({mcpServers:K.record(K.string(),j5())}))});function zt(Z,X){let q=Z.toLowerCase();return X.autoUpdate??(I5.has(q)&&!kx.has(q))}function Px(Z){if(I5.has(Z.toLowerCase()))return!1;if(xx.test(Z))return!0;return Nx.test(Z)}function Ex(Z){let X=Z.trim(),q=vx.exec(X);if(q)return q[1].toLowerCase()==="github.com"&&q[2].toLowerCase()===U6;try{let Q=new URL(X);if(Q.protocol!=="https:"&&Q.protocol!=="ssh:")return!1;if(Q.hostname.toLowerCase()!=="github.com")return!1;return Q.pathname.split("/").filter(Boolean)[0]?.toLowerCase()===U6}catch{return!1}}function _t(Z,X){let q=Z.toLowerCase();if(!I5.has(q))return null;if(X.source==="github"){if(!(X.repo||"").toLowerCase().startsWith(`${U6}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${U6}/' can use this name.`;return null}if(X.source==="git"&&X.url){if(Ex(X.url))return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${U6}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${U6}' organization.`}function Mt(Z){return typeof Z==="string"&&Z.startsWith("./")}function Ft(Z){return Z.source==="file"||Z.source==="directory"}var I5,kx,Nx,xx,U6="anthropics",vx,B1,G6,QB,Aq,Tq,YB,jq,yx,Rt,Cx,Sx,bx,hx,fx,gx,$B,mx,ux,HB,px,dx,JB,cx,KB,lx,nx,x4,Dq,UB,ix,ax,Dt,GB,ox,sx,rx,At,tx,ex,Tt,ZP,jt;var WB=B(()=>{t0();T5();qB();K2();I5=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),kx=new Set(["knowledge-work-plugins"]);Nx=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,xx=/[^\u0020-\u007E]/;vx=/^git@([^:]+):([^/]+)\//i;B1=I(()=>K.string().startsWith("./")),G6=I(()=>B1().endsWith(".json")),QB=I(()=>K.union([B1().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")])),Aq=I(()=>B1().endsWith(".md")),Tq=I(()=>K.union([Aq(),B1()])),YB=I(()=>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)=>!Px(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'})),jq=I(()=>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")})),yx=I(()=>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:jq().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(sx()).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.`)})),Rt=I(()=>K.object({description:K.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:K.lazy(()=>U2()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),Cx=I(()=>K.object({hooks:K.union([G6().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(()=>U2()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),K.array(K.union([G6().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(()=>U2()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),Sx=I(()=>K.object({source:Tq().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'})),bx=I(()=>K.object({commands:K.union([Tq().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(Tq().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(),Sx()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),hx=I(()=>K.object({agents:K.union([Aq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),K.array(Aq().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")])})),fx=I(()=>K.object({skills:K.union([B1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),K.array(B1().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")])})),gx=I(()=>K.object({outputStyles:K.union([B1().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(B1().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")])})),$B=I(()=>K.string().min(1)),mx=I(()=>K.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),ux=I(()=>K.object({mcpServers:K.union([G6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),QB().describe("Path or URL to MCPB file containing MCP server configuration"),K.record(K.string(),j5()).describe("MCP server configurations keyed by server name"),K.array(K.union([G6().describe("Path to MCP servers configuration file"),QB().describe("Path or URL to MCPB file"),K.record(K.string(),j5()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),HB=I(()=>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()),px=I(()=>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 CLAUDIN_PLUGIN_OPTION_<KEY> env vars in hooks"),HB()).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).")})),dx=I(()=>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(),HB()).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.")})),JB=I(()=>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($B()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:K.record(mx(),$B()).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")})),cx=I(()=>K.object({lspServers:K.union([G6().describe("Path to .lsp.json configuration file relative to plugin root"),K.record(K.string(),JB()).describe("LSP server configurations keyed by server name"),K.array(K.union([G6().describe("Path to LSP configuration file"),K.record(K.string(),JB()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),KB=I(()=>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")),lx=I(()=>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)")})),nx=I(()=>K.object({...yx().shape,...Cx().partial().shape,...bx().partial().shape,...hx().partial().shape,...fx().partial().shape,...gx().partial().shape,...dx().partial().shape,...ux().partial().shape,...cx().partial().shape,...lx().partial().shape,...px().partial().shape})),x4=I(()=>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:KB().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:YB().refine((Z)=>!I5.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(ix()).describe("Plugin entries declared inline in settings.json"),owner:jq().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).")])),Dq=I(()=>K.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),UB=I(()=>K.union([B1().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:KB().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:Dq().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:Dq().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:Dq().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.")])),ix=I(()=>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:UB().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.'}));ax=I(()=>nx().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:UB().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.")})),Dt=I(()=>K.object({name:YB(),owner:jq().describe("Marketplace maintainer or curator information"),plugins:K.array(ax()).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.")})),GB=I(()=>K.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),ox=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,sx=I(()=>K.union([K.string().regex(ox,"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)])),rx=I(()=>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)")})),At=I(()=>K.object({version:K.literal(1).describe("Schema version 1"),plugins:K.record(GB(),rx()).describe("Map of plugin IDs to their installation metadata")})),tx=I(()=>K.enum(["managed","user","project","local"])),ex=I(()=>K.object({scope:tx().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")})),Tt=I(()=>K.object({version:K.literal(2).describe("Schema version 2"),plugins:K.record(GB(),K.array(ex())).describe("Map of plugin IDs to arrays of installation entries")})),ZP=I(()=>K.object({source:x4().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")})),jt=I(()=>K.record(K.string(),ZP()))});function wt(Z){return Z.startsWith("claude.ai ")}function w5(Z){let X=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))X=X.replace(/_+/g,"_").replace(/^_|_$/g,"");return X}var VB=()=>{};function BB(Z){let X=Z.split("__"),[q,Q,...$]=X;if(q!=="mcp"||!Q)return null;let J=$.length>0?$.join("__"):void 0;return{serverName:Q,toolName:J}}function XP(Z){return`mcp__${w5(Z)}__`}function qP(Z,X){return`${XP(Z)}${w5(X)}`}function Nt(Z){return Z.mcpInfo?qP(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function xt(Z,X){let q=`mcp__${w5(X)}__`;return Z.replace(q,"")}function Pt(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 LB=B(()=>{VB()});var zB="Agent",vt="Task",yt;var _B=B(()=>{yt=new Set(["Plan","WebResearcher","WebResearcherManager"])});var Iq="TaskOutput";var RB=()=>{};var MB="TaskStop",bt=`
|
|
109
|
+
- Stops a running background task by its ID
|
|
110
|
+
- Takes a task_id parameter identifying the task to stop
|
|
111
|
+
- Returns a success or failure status
|
|
112
|
+
- Use this tool when you need to terminate a long-running task
|
|
113
|
+
`;var FB=()=>{};function W6(Z){return Object.hasOwn(wq,Z)?wq[Z]:Z}function ut(Z){let X=[];for(let[q,Q]of Object.entries(wq))if(Q===Z)X.push(q);return X}function QP(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function $P(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function DB(Z){let X=JP(Z,"(");if(X===-1)return{toolName:W6(Z)};let q=YP(Z,")");if(q===-1||q<=X)return{toolName:W6(Z)};if(q!==Z.length-1)return{toolName:W6(Z)};let Q=Z.substring(0,X),$=Z.substring(X+1,q);if(!Q)return{toolName:W6(Z)};if($===""||$==="*")return{toolName:W6(Q)};let J=$P($);return{toolName:W6(Q),ruleContent:J}}function pt(Z){if(!Z.ruleContent)return Z.toolName;let X=QP(Z.ruleContent);return`${Z.toolName}(${X})`}function JP(Z,X){for(let q=0;q<Z.length;q++)if(Z[q]===X){let Q=0,$=q-1;while($>=0&&Z[$]==="\\")Q++,$--;if(Q%2===0)return q}return-1}function YP(Z,X){for(let q=Z.length-1;q>=0;q--)if(Z[q]===X){let Q=0,$=q-1;while($>=0&&Z[$]==="\\")Q++,$--;if(Q%2===0)return q}return-1}var wq;var AB=B(()=>{_B();RB();FB();wq={Task:zB,KillShell:MB,AgentOutputTool:Iq,BashOutputTool:Iq}});function ct(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function TB(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function jB(Z,X,q=X+"s"){return Z===1?X:q}function lt(Z){let X=Z.indexOf(`
|
|
114
|
+
`);return X===-1?Z:Z.slice(0,X)}function nt(Z,X,q=0){let Q=0,$=Z.indexOf(X,q);while($!==-1)Q++,$=Z.indexOf(X,$+1);return Q}function it(Z){return Z.replace(/[0-9]/g,(X)=>String.fromCharCode(X.charCodeAt(0)-65248))}function at(Z){return Z.replace(/\u3000/g," ")}function ot(Z,X=",",q=IB){let $="";for(let J of Z){let Y=$?X:"",H=Y+J;if($.length+H.length<=q)$+=H;else{let U=q-$.length-Y.length-14;if(U>0)$+=Y+J.slice(0,U)+"...[truncated]";else $+="...[truncated]";return $}}return $}class HP{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=IB){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+`
|
|
115
|
+
... [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 st(Z,X){let q=Z.split(`
|
|
116
|
+
`);if(q.length<=X)return Z;return q.slice(0,X).join(`
|
|
117
|
+
`)+"…"}var IB=33554432;var Oq=()=>{};function wB(Z){return O5.filePatternTools.includes(Z)}function OB(Z){return O5.bashPrefixTools.includes(Z)}function kB(Z){return Object.hasOwn(O5.customValidation,Z)?O5.customValidation[Z]:void 0}var O5;var NB=B(()=>{O5={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 xB(Z,X){let q=0,Q=X-1;while(Q>=0&&Z[Q]==="\\")q++,Q--;return q%2!==0}function kq(Z,X){let q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===X&&!xB(Z,Q))q++;return q}function KP(Z){for(let X=0;X<Z.length-1;X++)if(Z[X]==="("&&Z[X+1]===")"){if(!xB(Z,X))return!0}return!1}function Nq(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let X=kq(Z,"("),q=kq(Z,")");if(X!==q)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(KP(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=DB(Z),$=BB(Q.toolName);if($){if(Q.ruleContent!==void 0||kq(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${Q.toolName}" without parentheses, or use "mcp__${$.serverName}__*" for all tools`,examples:[`mcp__${$.serverName}`,`mcp__${$.serverName}__*`,$.toolName&&$.toolName!=="*"?`mcp__${$.serverName}__${$.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 "${TB(String(Q.toolName))}"`};let J=kB(Q.toolName);if(J&&Q.ruleContent!==void 0){let Y=J(Q.ruleContent);if(!Y.valid)return Y}if(OB(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(wB(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 k5;var xq=B(()=>{t0();LB();K2();AB();Oq();NB();k5=I(()=>K.string().superRefine((Z,X)=>{let q=Nq(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 He(Z){if(!Z||typeof Z!=="object")return null;let X=Pq.safeParse(Z);if(!X.success)return null;if(!X.data.enabled)return null;return X.data}var Pq;var PB=B(()=>{t0();Pq=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 De(Z){return"serverName"in Z&&Z.serverName!==void 0}function Ae(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function Te(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var UP,GP,WP,VP,BP,EB,C0;var P4=B(()=>{t0();pV();K2();nV();WB();Rq();xq();T5();T5();PB();_q();UP=I(()=>K.record(K.string(),K.coerce.string())),GP=I(()=>K.object({allow:K.array(k5()).optional().describe("List of permission rules for allowed operations"),deny:K.array(k5()).optional().describe("List of permission rules for denied operations"),ask:K.array(k5()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:K.enum(K6).optional().describe("Default permission mode when Claudin 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()),WP=I(()=>K.object({source:x4().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")})),VP=I(()=>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 zq([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"'})),BP=I(()=>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 zq([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"'})),EB=["skills","agents","hooks","mcp"],C0=I(()=>K.object({$schema:K.literal(SV).optional().describe("JSON Schema reference for Claudin 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)"),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:UP().optional().describe("Environment variables to set for Claudin 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 Claudin 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:GP().optional().describe("Tool usage permissions configuration"),model:K.string().optional().describe("Override the default model used by Claudin"),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(VP()).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(BP()).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:U2().optional().describe("Custom commands to run before/after tool executions"),autoFix:Pq.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.")}).optional().describe("LSP subsystem configuration. Set enabled:false to disable the entire LSP subsystem (default: true). Set diagnosticsTimeoutMs to tune per-edit diagnostic injection (default 1500). LSP servers themselves are provided exclusively by enabled plugins (.lsp.json)."),disableAllHooks: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)=>EB.includes(X)):Z,K.union([K.boolean(),K.array(K.enum(EB))])).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(),WP()).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(x4()).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(x4()).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:uV().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 .claudin/plans/ in the project root."),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/."),autoMemoryProjectLocal:K.boolean().optional().describe("When true (the default), auto-memory for a git project defaults to <project>/.claudin/memory/ instead of the global ~/.claudin/projects/<sanitized-cwd>/memory/. Set to false to force the legacy global-only location. Ignored if set in projectSettings for security, same as autoMemoryDirectory."),autoDreamEnabled: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 Eq(){let Z=vB(C0(),{unrepresentable:"any"});return m(Z,null,2)}var yB=B(()=>{t0();M0();P4()});function CB(Z){let X=LP.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=zP[Q]}return q}var LP,zP;var SB=B(()=>{LP=[{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'}}],zP={}});function bB(Z){return Z.code==="invalid_type"}function hB(Z){return Z.code==="invalid_value"}function _P(Z){return Z.code==="unrecognized_keys"}function fB(Z){return Z.code==="too_small"}function vq(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function gB(Z){let X=Z.match(/received (\w+)/);return X?X[1]:void 0}function V6(Z,X){return Z.issues.map((q)=>{let Q=q.path.map(String).join("."),$=q.message,J,Y,H,U,G;if(hB(q))Y=q.values.map((V)=>String(V)),H=Y.join(" | "),U=void 0,G=void 0;else if(bB(q)){H=q.expected;let V=gB(q.message);U=V??vq(q.input),G=V??vq(q.input)}else if(fB(q))H=String(q.minimum);else if(q.code==="custom"&&"params"in q)U=q.params.received,G=U;let W=CB({path:Q,code:q.code,expected:H,received:U,enumValues:Y,message:q.message,value:U});if(hB(q))J=Y?.map((V)=>`"${V}"`).join(", "),$=`Invalid value. Expected one of: ${J}`;else if(bB(q)){let V=gB(q.message)??vq(q.input);if(q.expected==="object"&&V==="null"&&Q==="")$="Invalid or malformed JSON";else $=`Expected ${q.expected}, but received ${V}`}else if(_P(q)){let V=q.keys.join(", ");$=`Unrecognized ${jB(q.keys.length,"field")}: ${V}`}else if(fB(q))$=`Number must be greater than or equal to ${q.minimum}`,J=String(q.minimum);return{file:X,path:Q,message:$,expected:J,invalidValue:G,suggestion:W?.suggestion,docLink:W?.docLink}})}function be(Z){try{let X=X0(Z),q=C0().strict().safeParse(X);if(q.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
|
|
118
|
+
`+V6(q.error,"settings").map((J)=>`- ${J.path}: ${J.message}`).join(`
|
|
119
|
+
`),fullSchema:Eq()}}catch(X){return{isValid:!1,error:`Invalid JSON: ${X instanceof Error?X.message:"Unknown parsing error"}`,fullSchema:Eq()}}}function N5(Z,X){if(!Z||typeof Z!=="object")return[];let q=Z;if(!q.permissions||typeof q.permissions!=="object")return[];let Q=q.permissions,$=[];for(let J of["allow","deny","ask"]){let Y=Q[J];if(!Array.isArray(Y))continue;Q[J]=Y.filter((H)=>{if(typeof H!=="string")return $.push({file:X,path:`permissions.${J}`,message:`Non-string value in ${J} array was removed`,invalidValue:H}),!1;let U=Nq(H);if(!U.valid){let G=`Invalid permission rule "${H}" was skipped`;if(U.error)G+=`: ${U.error}`;if(U.suggestion)G+=`. ${U.suggestion}`;return $.push({file:X,path:`permissions.${J}`,message:G,invalidValue:H}),!1}return!0})}return $}var yq=B(()=>{M0();Oq();xq();yB();P4();SB()});import{userInfo as RP}from"os";function cB(){let Z="";try{Z=RP().username}catch{}let X=[];if(Z)X.push({path:`/Library/Managed Preferences/${Z}/${mB}.plist`,label:"per-user managed preferences"});return X.push({path:`/Library/Managed Preferences/${mB}.plist`,label:"device-level managed preferences"}),X}var mB="com.anthropic.claudecode",x5="HKLM\\SOFTWARE\\Policies\\ClaudeCode",P5="HKCU\\SOFTWARE\\Policies\\ClaudeCode",B6="Settings",uB="/usr/bin/plutil",pB,dB=5000;var Cq=B(()=>{pB=["-convert","json","-o","-","--"]});import{execFile as MP}from"child_process";import{existsSync as FP}from"fs";function Sq(Z,X){return new Promise((q)=>{MP(Z,X,{encoding:"utf-8",timeout:dB},(Q,$)=>{q({stdout:$??"",code:Q?1:0})})})}function E5(){return(async()=>{if(process.platform==="darwin"){let Z=cB(),q=(await Promise.all(Z.map(async({path:Q,label:$})=>{if(!FP(Q))return{stdout:"",label:$,ok:!1};let{stdout:J,code:Y}=await Sq(uB,[...pB,Q]);return{stdout:J,label:$,ok:Y===0&&!!J}}))).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([Sq("reg",["query",x5,"/v",B6]),Sq("reg",["query",P5,"/v",B6])]);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 de(){if(bq)return;bq=E5()}function lB(){return bq}var bq=null;var nB=B(()=>{Cq()});import{join as iB}from"path";function DP(){if(v5)return;v5=(async()=>{L6("mdm_load_start");let Z=Date.now(),X=lB()??E5(),{mdm:q,hkcu:Q}=sB(await X);fq=q,gq=Q,L6("mdm_load_end");let $=Date.now()-Z;if(P(`MDM settings load completed in ${$}ms`),Object.keys(q.settings).length>0){P(`MDM settings found: ${Object.keys(q.settings).join(", ")}`);try{G0("info","mdm_settings_loaded",{duration_ms:$,key_count:Object.keys(q.settings).length,error_count:q.errors.length})}catch{}}})()}async function Q00(){if(!v5)DP();await v5}function y5(){return fq??L1}function C5(){return gq??L1}function $00(Z,X){fq=Z,gq=X}async function J00(){let Z=await E5();return sB(Z)}function hq(Z,X){let q=N0(Z,!1);if(!q||typeof q!=="object")return{settings:{},errors:[]};let Q=N5(q,X),$=C0().safeParse(q);if(!$.success){let J=V6($.error,X);return{settings:{},errors:[...Q,...J]}}return{settings:$.data,errors:Q}}function aB(Z,X="Settings"){let q=Z.split(/\r?\n/),Q=X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),$=new RegExp(`^\\s+${Q}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let J of q){let Y=J.match($);if(Y&&Y[1])return Y[1].trimEnd()}return null}function sB(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:X,label:q}=Z.plistStdouts[0],Q=hq(X,q);if(Object.keys(Q.settings).length>0)return{mdm:Q,hkcu:L1}}if(Z.hklmStdout){let X=aB(Z.hklmStdout);if(X){let q=hq(X,`Registry: ${x5}\\${B6}`);if(Object.keys(q.settings).length>0)return{mdm:q,hkcu:L1}}}if(AP())return{mdm:L1,hkcu:L1};if(Z.hkcuStdout){let X=aB(Z.hkcuStdout);if(X){let q=hq(X,`Registry: ${P5}\\${B6}`);return{mdm:L1,hkcu:q}}}return{mdm:L1,hkcu:L1}}function AP(){try{let Z=iB(C1(),"managed-settings.json"),X=U1(Z),q=N0(X,!1);if(q&&typeof q==="object"&&Object.keys(q).length>0)return!0}catch{}try{let Z=N4(),X=k().readdirSync(Z);for(let q of X){if(!(q.isFile()||q.isSymbolicLink())||!q.name.endsWith(".json")||q.name.startsWith("."))continue;try{let Q=U1(iB(Z,q.name)),$=N0(Q,!1);if($&&typeof $==="object"&&Object.keys($).length>0)return!0}catch{}}}catch{}return!1}var L1,fq=null,gq=null,v5=null;var rB=B(()=>{g0();U4();G4();F0();N6();oB();F5();P4();yq();Cq();nB();L1=Object.freeze({settings:{},errors:[]})});import{dirname as HL,join as S5,resolve as E4}from"path";function cq(){return S5(C1(),"managed-settings.json")}function lq(){let Z=[],X={},q=!1,{settings:Q,errors:$}=v4(cq());if(Z.push(...$),Q&&Object.keys(Q).length>0)X=V1(X,Q,G2),q=!0;let J=N4();try{let Y=k().readdirSync(J).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:G}=v4(S5(J,H));if(Z.push(...G),U&&Object.keys(U).length>0)X=V1(X,U,G2),q=!0}}catch(Y){let H=U0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")S(Y)}return{settings:q?X:null,errors:Z}}function C00(){let{settings:Z}=v4(cq()),X=!!Z&&Object.keys(Z).length>0,q=!1,Q=N4();try{q=k().readdirSync(Q).some(($)=>($.isFile()||$.isSymbolicLink())&&$.name.endsWith(".json")&&!$.name.startsWith("."))}catch{}return{hasBase:X,hasDropIns:q}}function KL(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 S(Z)}function v4(Z){let X=QL(Z);if(X)return{settings:X.settings?uq(X.settings):null,errors:X.errors};let q=TP(Z);return $L(Z,q),{settings:q.settings?uq(q.settings):null,errors:q.errors}}function TP(Z){try{let{resolvedPath:X}=O1(k(),Z),q=U1(X);if(q.trim()==="")return{settings:{},errors:[]};let Q=N0(q,!1),$=N5(Q,Z),J=C0().safeParse(Q);if(!J.success){let Y=V6(J.error,Z);return{settings:null,errors:[...$,...Y]}}return{settings:J.data,errors:$}}catch(X){return KL(X,Z),{settings:null,errors:[]}}}function tB(Z){switch(Z){case"userSettings":return E4($0());case"policySettings":case"projectSettings":case"localSettings":return E4(y1());case"flagSettings":{let X=pq();return X?HL(E4(X)):E4(y1())}}}function jP(){if(YL()||Q0(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function b5(Z){switch(Z){case"userSettings":return S5(tB(Z),jP());case"projectSettings":case"localSettings":return S5(tB(Z),UL(Z));case"policySettings":return cq();case"flagSettings":return pq()}}function UL(Z){switch(Z){case"projectSettings":return".claudin/settings.json";case"localSettings":return".claudin/settings.local.json"}}function p(Z){let X=XL(Z);if(X!==void 0)return X;let q=GL(Z);return qL(Z,q),q}function GL(Z){if(Z==="policySettings"){let Q=R5();if(Q&&Object.keys(Q).length>0)return Q;let $=y5();if(Object.keys($.settings).length>0)return $.settings;let{settings:J}=lq();if(J)return J;let Y=C5();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let X=b5(Z),{settings:q}=X?v4(X):{settings:null};if(Z==="flagSettings"){let Q=dq();if(Q){let $=C0().safeParse(Q);if($.success)return V1(q||{},$.data,G2)}}return q}function S00(){let Z=R5();if(Z&&Object.keys(Z).length>0)return"remote";let X=y5();if(Object.keys(X.settings).length>0)return m0()==="macos"?"plist":"hklm";let{settings:q}=lq();if(q)return"file";let Q=C5();if(Object.keys(Q.settings).length>0)return"hkcu";return null}function b00(Z,X){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let q=b5(Z);if(!q)return{error:null};try{k().mkdirSync(HL(q));let Q=GL(Z);if(!Q){let J=null;try{J=U1(q)}catch(Y){if(!e2(Y))throw Y}if(J!==null){let Y=N0(J);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 $=V1(Q||{},X,(J,Y,H,U)=>{if(Y===void 0&&U&&typeof H==="string"){delete U[H];return}if(Array.isArray(Y))return Y;return});if(bV(q),Z6(q,m($,null,2)+`
|
|
120
|
+
`),O4(),Z==="localSettings")vV(UL("localSettings"),y1())}catch(Q){let $=Error(`Failed to read raw settings from ${q}: ${Q}`);return S($),{error:$}}return{error:null}}function IP(Z,X){return EV([...Z,...X])}function G2(Z,X){if(Array.isArray(Z)&&Array.isArray(X))return IP(Z,X);return}function h00(Z){let X=C0().strip().parse(Z),q=["permissions","sandbox","hooks"],Q=[],$={permissions:new Set(["allow","deny","ask","defaultMode","disableBypassPermissionsMode","allowBypassPermissionsMode","disableAutoMode","additionalDirectories"]),sandbox:new Set(["enabled","failIfUnavailable","allowUnsandboxedCommands","network","filesystem","ignoreViolations","excludedCommands","autoAllowBashIfSandboxed","enableWeakerNestedSandbox","enableWeakerNetworkIsolation","ripgrep"]),hooks:new Set(["PreToolUse","PostToolUse","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStop","PreCompact","PostCompact","TeammateIdle","TaskCreated","TaskCompleted"])};for(let J of Object.keys(X))if(q.includes(J)&&X[J]&&typeof X[J]==="object"){let Y=X[J],H=$[J];if(H){for(let U of Object.keys(Y))if(H.has(U))Q.push(`${J}.${U}`)}}else Q.push(J);return Q.sort()}function wP(){if(mq)return{settings:{},errors:[]};let Z=Date.now();L6("loadSettingsFromDisk_start"),G0("info","settings_load_started"),mq=!0;try{let X=JL(),q={};if(X)q=V1(q,X,G2);let Q=[],$=new Set,J=new Set;for(let Y of k4()){if(Y==="policySettings"){let U=null,G=[],W=R5();if(W&&Object.keys(W).length>0){let V=C0().safeParse(W);if(V.success)U=V.data;else G.push(...V6(V.error,"remote managed settings"))}if(!U){let V=y5();if(Object.keys(V.settings).length>0)U=V.settings;G.push(...V.errors)}if(!U){let{settings:V,errors:L}=lq();if(V)U=V;G.push(...L)}if(!U){let V=C5();if(Object.keys(V.settings).length>0)U=V.settings;G.push(...V.errors)}if(U)q=V1(q,U,G2);for(let V of G){let L=`${V.file}:${V.path}:${V.message}`;if(!$.has(L))$.add(L),Q.push(V)}continue}let H=b5(Y);if(H){let U=E4(H);if(!J.has(U)){J.add(U);let{settings:G,errors:W}=v4(H);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!$.has(L))$.add(L),Q.push(V)}if(G)q=V1(q,G,G2)}}if(Y==="flagSettings"){let U=dq();if(U){let G=C0().safeParse(U);if(G.success)q=V1(q,G.data,G2)}}}return G0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:J.size,error_count:Q.length}),{settings:q,errors:Q}}finally{mq=!1}}function nq(){let{settings:Z}=OP();return Z||{}}function f00(){O4();let Z=[];for(let X of k4()){let q=p(X);if(q&&Object.keys(q).length>0)Z.push({source:X,settings:q})}return{effective:nq(),sources:Z}}function OP(){let Z=eB();if(Z!==null)return Z;let X=wP();return L6("loadSettingsFromDisk_end"),ZL(X),X}function g00(){return!!(p("userSettings")?.skipDangerousModePermissionPrompt||p("localSettings")?.skipDangerousModePermissionPrompt||p("flagSettings")?.skipDangerousModePermissionPrompt||p("policySettings")?.skipDangerousModePermissionPrompt)}function m00(){return!!(p("userSettings")?.permissions?.allowBypassPermissionsMode||p("localSettings")?.permissions?.allowBypassPermissionsMode||p("flagSettings")?.permissions?.allowBypassPermissionsMode||p("policySettings")?.permissions?.allowBypassPermissionsMode)}function u00(){{let Z=p("userSettings")?.skipAutoPermissionPrompt,X=p("localSettings")?.skipAutoPermissionPrompt,q=p("flagSettings")?.skipAutoPermissionPrompt,Q=p("policySettings")?.skipAutoPermissionPrompt,$=!!(Z||X||q||Q);return P(`[auto-mode] hasAutoModeOptIn=${$} skipAutoPermissionPrompt: user=${Z} local=${X} flag=${q} policy=${Q}`),$}return!1}function p00(){return p("policySettings")?.useAutoModeDuringPlan!==!1&&p("flagSettings")?.useAutoModeDuringPlan!==!1&&p("userSettings")?.useAutoModeDuringPlan!==!1&&p("localSettings")?.useAutoModeDuringPlan!==!1}function d00(){return kP().config}function kP(){return EP(p)}function EP(Z){let X=[],q=[],Q=[],$=[],J=(U,G,W)=>{if(!W)return;let V=fV(W);G.push(...V.entries);for(let L of V.dropped)$.push({section:U,entry:L.entry,reason:gV(L.reason)})};for(let U of NP){let G=Z(U);if(!G)continue;let W=PP.safeParse(G.autoMode);if(W.success)J("allow",X,W.data.allow),J("soft_deny",q,W.data.soft_deny),J("environment",Q,W.data.environment)}let Y=[];for(let U of xP){let G=Z(U);if(!G)continue;let W=G.autoMode;if(W&&typeof W==="object")Y.push(U)}return{config:X.length>0||q.length>0||Q.length>0?{...X.length>0&&{allow:X},...q.length>0&&{soft_deny:q},...Q.length>0&&{environment:Q}}:void 0,dropped:$,ignoredSources:Y}}function c00(Z){for(let X of k4()){if(X==="policySettings")continue;let q=b5(X);if(!q)continue;try{let{resolvedPath:Q}=O1(k(),q),$=U1(Q);if(!$.trim())continue;let J=N0($,!1);if(J&&typeof J==="object"&&Z in J)return!0}catch(Q){KL(Q,q)}}return!1}var mq=!1,NP,xP,PP;var WL=B(()=>{NV();t0();v1();PV();_q();g0();U4();s0();I1();u7();G4();F0();yV();N6();k0();s2();M0();oB();Rq();hV();mV();F5();rB();xV();P4();yq();NP=["userSettings","flagSettings","policySettings"],xP=["projectSettings","localSettings"],PP=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()})});import{cpSync as vP,readFileSync as yP,readdirSync as CP}from"fs";import{join as SP}from"path";function LL(Z,X){if(Z===X)return;if(BL(X))return;if(!BL(Z))return;try{vP(Z,X,{recursive:!0,force:!1,errorOnExist:!1})}catch(q){S(Error(`Failed to migrate auto-memory from ${Z} to ${X}: ${q instanceof Error?q.message:String(q)}`))}}function BL(Z){try{if(yP(SP(Z,VL),"utf-8").trim())return!0}catch{}try{return CP(Z,{withFileTypes:!0}).some((X)=>X.isFile()&&X.name.endsWith(".md")&&X.name!==VL)}catch{return!1}}var VL="MEMORY.md";var zL=B(()=>{k0()});import{chmodSync as bP}from"fs";import{homedir as hP}from"os";import{isAbsolute as fP,join as y4,normalize as iq,sep as h5}from"path";function FL(){let Z=process.env.CLAUDIN_DISABLE_AUTO_MEMORY;if(Q0(Z))return!1;if(ML(Z))return!0;if(Q0(process.env.CLAUDIN_SIMPLE))return!1;if(Q0(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let X=nq();if(X.autoMemoryEnabled!==void 0)return X.autoMemoryEnabled;return!0}function U10(){if(!t1("tengu_passport_quail",!1))return!1;return!RL()||t1("tengu_slate_thimble",!1)}function gP(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return $0()}function DL(Z,X){if(!Z)return;let q=Z;if(X&&(q.startsWith("~/")||q.startsWith("~\\"))){let $=q.slice(2),J=iq($||".");if(J==="."||J==="..")return;q=y4(hP(),$)}let Q=iq(q).replace(/[/\\]+$/,"");if(!fP(Q)||Q.length<3||/^[A-Za-z]:$/.test(Q)||Q.startsWith("\\\\")||Q.startsWith("//")||Q.includes("\x00"))return;return(Q+h5).normalize("NFC")}function AL(){return DL(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function uP(){let Z=p("policySettings")?.autoMemoryDirectory??p("flagSettings")?.autoMemoryDirectory??p("localSettings")?.autoMemoryDirectory??p("userSettings")?.autoMemoryDirectory;return DL(Z,!0)}function G10(){return AL()!==void 0}function pP(){return(p("policySettings")?.autoMemoryProjectLocal??p("flagSettings")?.autoMemoryProjectLocal??p("localSettings")?.autoMemoryProjectLocal??p("userSettings")?.autoMemoryProjectLocal)!==!1}function dP(){return J2(C4())??C4()}function TL(){return y4(S4(),mP)}function W10(Z){return iq(Z).startsWith(S4())}var _L="memory",mP="MEMORY.md",S4;var aq=B(()=>{j1();v1();m7();s0();D4();k0();W4();WL();F0();zL();S4=u(()=>{let Z=AL()??uP();if(Z)return Z;let X=y4(gP(),"projects"),q=(y4(X,yX(dP()),_L)+h5).normalize("NFC");if(!pP())return q;let Q=J2(C4());if(!Q)return q;let $=(y4(Q,".claudin",_L)+h5).normalize("NFC");try{k().mkdirSync($,{mode:448})}catch(Y){return S(Y),q}let J=!1;try{let Y=k().realpathSync(Q),H=k().realpathSync($);if(J=H===Y||H.startsWith(Y+h5),!J)S(Error(`Auto-memory directory escapes project root via symlink: ${$} -> ${H}`))}catch(Y){S(Y)}if(!J)return q;try{bP($,448)}catch{}return LL(q,$),$},()=>C4())});function b4(Z){if(Z===void 0)return!1;let X=Z.trim().toLowerCase();return X==="0"||X==="false"||X==="no"||X==="off"||X===""}function cP(){let Z=process.env.CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC,X=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&b4(Z)||X!==void 0&&b4(X)){if(process.env.DISABLE_TELEMETRY&&!b4(process.env.DISABLE_TELEMETRY))return"no-telemetry";return"default"}return"essential-traffic"}function oq(){return cP()==="essential-traffic"}function sq(){if(!oq())return null;let Z=process.env.CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&!b4(Z))return"CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC";let X=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(X!==void 0&&!b4(X))return"ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC";return"claudin-default"}function jL(){let Z=sq();return Z==="claudin-default"?null:Z}var rq=()=>{};import{dirname as lP,join as IL}from"path";function OL(Z){return[IL(Z,f5),IL(Z,wL)]}function nP(Z,X){let[q,Q]=OL(Z);return X(q)?q:Q}function iP(Z,X){return OL(Z).some((q)=>X(q))}function z10(Z,X){let q=Z;while(!0){if(iP(q,X))return nP(q,X);let Q=lP(q);if(Q===q)return null;q=Q}}function _10(Z){return Z===f5||Z===wL}var f5="AGENTS.md",wL="CLAUDE.md";var kL=()=>{};var CL={};Mq(CL,{validateTeamMemWritePath:()=>XE,validateTeamMemKey:()=>qE,isTeamMemoryEnabled:()=>PL,isTeamMemPath:()=>yL,isTeamMemLikelyGitIgnored:()=>ZE,isTeamMemFile:()=>QE,getTeamMemPath:()=>f4,getTeamMemEntrypoint:()=>rP,PathTraversalError:()=>R0});import{readFileSync as aP}from"fs";import{lstat as oP,realpath as xL}from"fs/promises";import{dirname as NL,join as h4,resolve as tq,sep as eq}from"path";function sP(Z){if(Z.includes("\x00"))throw new R0(`Null byte in path key: "${Z}"`);let X;try{X=decodeURIComponent(Z)}catch{X=Z}if(X!==Z&&(X.includes("..")||X.includes("/")))throw new R0(`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 R0(`Unicode-normalized traversal in path key: "${Z}"`);if(Z.includes("\\"))throw new R0(`Backslash in path key: "${Z}"`);if(Z.startsWith("/"))throw new R0(`Absolute path key: "${Z}"`);return Z}function PL(){if(!FL())return!1;return t1("tengu_herring_clock",!0)}function f4(){return(h4(S4(),"team")+eq).normalize("NFC")}function rP(){return h4(S4(),"team","MEMORY.md")}async function EL(Z){let X=[],q=Z;for(let Q=NL(q);q!==Q;Q=NL(q))try{let $=await xL(q);return X.length===0?$:h4($,...X.reverse())}catch($){let J=U0($);if(J==="ENOENT")try{if((await oP(q)).isSymbolicLink())throw new R0(`Dangling symlink detected (target does not exist): "${q}"`)}catch(Y){if(Y instanceof R0)throw Y}else if(J==="ELOOP")throw new R0(`Symlink loop detected in path: "${q}"`);else if(J!=="ENOTDIR"&&J!=="ENAMETOOLONG")throw new R0(`Cannot verify path containment (${J}): "${q}"`);X.push(q.slice(Q.length+eq.length)),q=Q}return Z}async function vL(Z){let X;try{X=await xL(f4().replace(/[/\\]+$/,""))}catch(q){let Q=U0(q);if(Q==="ENOENT"||Q==="ENOTDIR")return!0;return!1}if(Z===X)return!0;return Z.startsWith(X+eq)}function yL(Z){let X=tq(Z),q=f4();return X.startsWith(q)}async function XE(Z){if(Z.includes("\x00"))throw new R0(`Null byte in path: "${Z}"`);let X=tq(Z),q=f4();if(!X.startsWith(q))throw new R0(`Path escapes team memory directory: "${Z}"`);let Q=await EL(X);if(!await vL(Q))throw new R0(`Path escapes team memory directory via symlink: "${Z}"`);return X}async function qE(Z){sP(Z);let X=f4(),q=h4(X,Z),Q=tq(q);if(!Q.startsWith(X))throw new R0(`Key escapes team memory directory: "${Z}"`);let $=await EL(Q);if(!await vL($))throw new R0(`Key escapes team memory directory via symlink: "${Z}"`);return Q}function QE(Z){return PL()&&yL(Z)}var R0,tP,eP,ZE;var SL=B(()=>{j1();m7();I1();aq();R0=class R0 extends Error{constructor(Z){super(Z);this.name="PathTraversalError"}};tP=/^\/?\.claudin\/?$/,eP=/^!\/?\.claudin\/memory\/team\/?/,ZE=u((Z)=>{try{let X=aP(h4(Z,".gitignore"),"utf-8"),q=!1;for(let Q of X.split(`
|
|
121
|
+
`)){let $=Q.trim();if(!$||$.startsWith("#"))continue;if(tP.test($))q=!0;else if(eP.test($))q=!1}return q}catch{return!1}})});import{randomBytes as $E}from"crypto";import{join as z6}from"path";function bL(){return hL()!==null}function YE(){return bL()&&!Q0(process.env.FORCE_AUTOUPDATE_PLUGINS)}function HE(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function hL(Z){if(Q0(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let X=Z?.ignoreClaudinDefaultPrivacy?jL():sq();if(X)return{type:"env",envVar:X};let q=a();if(q.autoUpdates===!1&&(q.installMethod!=="native"||q.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function KE(){let Z=a();if(Z.userID)return Z.userID;let X=$E(32).toString("hex");return _0((q)=>({...q,userID:X})),X}function UE(){if(!a().firstStartTime){let X=new Date().toISOString();_0((q)=>({...q,firstStartTime:q.firstStartTime??X}))}}function GE(Z){let X=y1();switch(Z){case"User":return z6($0(),"CLAUDE.md");case"Local":return z6(X,"CLAUDE.local.md");case"Project":return z6(X,f5);case"Managed":return z6(C1(),"CLAUDE.md");case"AutoMem":return TL()}return JE.getTeamMemEntrypoint()}function WE(){return z6(C1(),".claudin","rules")}function VE(){return z6($0(),"rules")}var JE;var fL=B(()=>{v1();aq();s0();rq();o2();F5();kL();JE=(SL(),g4(CL))});var BE,LE;var gL=B(()=>{BE=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","os_native","notifications_disabled"],LE=["normal","vim"]});var ZQ=B(()=>{R$();D6();g7();o2();Hq();xW();fL();gL()});function g5(Z){return Z.split(/[;,]/).map((X)=>X.trim()).filter((X)=>X.length>0)}function mL(Z){let X=g5(Z);return X.length>0?X[0]:Z.trim()}var XQ=()=>{};import{randomBytes as zE}from"crypto";function _6(Z){return Z?.trim()??""}function L0(Z){let X=_6(Z);return X.length>0?X:void 0}function _E(Z){return _6(Z).replace(/\/+$/,"")}function RE(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function ME(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function FE(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let X={};for(let[q,Q]of Object.entries(Z)){let $=_6(q),J=typeof Q==="string"?Q.trim():"";if($.length>0&&J.length>0)X[$]=J}return Object.keys(X).length>0?X:void 0}function DE(Z){if(!Z||typeof Z!=="object")return;let X={},q=L0(Z.codexAuthPath);if(q)X.codexAuthPath=q;let Q=L0(Z.codexAccountId);if(Q)X.codexAccountId=Q;let $=L0(Z.githubToken);if($)X.githubToken=$;let J=L0(Z.awsRegion);if(J)X.awsRegion=J;let Y=L0(Z.gcpProject);if(Y)X.gcpProject=Y;let H=L0(Z.gcpRegion);if(H)X.gcpRegion=H;let U=L0(Z.azureResource);if(U)X.azureResource=U;let G=FE(Z.customHeaders);if(G)X.customHeaders=G;let W=ME(Z.reasoningEffort);if(W)X.reasoningEffort=W;return Object.keys(X).length>0?X:void 0}function lL(Z){let X=_6(Z.id),q=_6(Z.name),Q=RE(Z.provider),$=_E(Z.baseUrl),J=_6(Z.model);if(!X||!q||!$||Q!=="anthropic"&&!J)return null;let H={id:X,name:q,provider:Q,baseUrl:$,model:J,apiKey:L0(Z.apiKey)},U=DE(Z.extras);if(U)H.extras=U;return H}function AE(Z){let X=new Set,q=[];for(let Q of Z??[]){let $=lL(Q);if(!$||X.has($.id))continue;X.add($.id),q.push($)}return q}function TE(){return`provider_${zE(6).toString("hex")}`}function nL(Z,X=TE()){return lL({id:X,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function iL(Z,X=a()){return X.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function o10(Z){switch(Z){case"anthropic":return{provider:"anthropic",name:"Anthropic",baseUrl:"https://api.anthropic.com",model:"",apiKey:"",requiresApiKey:!0};case"openai":return{provider:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"gpt-5.4",apiKey:"",requiresApiKey:!0};case"moonshotai":return{provider:"openai",name:"Moonshot AI - API",baseUrl:"https://api.moonshot.ai/v1",model:"kimi-k2.5",apiKey:"",requiresApiKey:!0};case"deepseek":return{provider:"openai",name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-v4-flash, deepseek-v4-pro, deepseek-chat, deepseek-reasoner",apiKey:"",requiresApiKey:!0};case"gemini":return{provider:"gemini",name:"Google Gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",model:"gemini-3-flash-preview",apiKey:"",requiresApiKey:!0};case"mistral":return{provider:"mistral",name:"Mistral",baseUrl:"https://api.mistral.ai/v1",model:"devstral-latest",apiKey:"",requiresApiKey:!0};case"together":return{provider:"openai",name:"Together AI",baseUrl:"https://api.together.xyz/v1",model:"Qwen/Qwen3.5-9B",apiKey:"",requiresApiKey:!0};case"groq":return{provider:"openai",name:"Groq",baseUrl:"https://api.groq.com/openai/v1",model:"llama-3.3-70b-versatile",apiKey:"",requiresApiKey:!0};case"azure-openai":return{provider:"openai",name:"Azure OpenAI",baseUrl:"https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1",model:"YOUR-DEPLOYMENT-NAME",apiKey:"",requiresApiKey:!0};case"openrouter":return{provider:"openai",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",model:"openai/gpt-5-mini",apiKey:"",requiresApiKey:!0};case"lmstudio":return{provider:"openai",name:"LM Studio",baseUrl:"http://localhost:1234/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"dashscope-cn":return{provider:"openai",name:"Alibaba Coding Plan (China)",baseUrl:"https://coding.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"dashscope-intl":return{provider:"openai",name:"Alibaba Coding Plan",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"custom":return{provider:"openai",name:"Custom OpenAI-compatible",baseUrl:uL,model:pL,apiKey:"",requiresApiKey:!1};case"nvidia-nim":return{provider:"openai",name:"NVIDIA NIM",baseUrl:"https://integrate.api.nvidia.com/v1",model:"nvidia/llama-3.1-nemotron-70b-instruct",apiKey:"",requiresApiKey:!0};case"minimax":return{provider:"openai",name:"MiniMax",baseUrl:"https://api.minimax.io/v1",model:"MiniMax-M2.5",apiKey:"",requiresApiKey:!0};case"atomic-chat":return{provider:"openai",name:"Atomic Chat",baseUrl:"http://127.0.0.1:1337/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"bankr":return{provider:"openai",name:"Bankr",baseUrl:"https://llm.bankr.bot/v1",model:"claude-opus-4.6",apiKey:"",requiresApiKey:!0};case"bedrock":return{provider:"bedrock",name:"AWS Bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"vertex":return{provider:"vertex",name:"Google Vertex AI",baseUrl:"https://us-central1-aiplatform.googleapis.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"foundry":return{provider:"foundry",name:"Azure AI Foundry",baseUrl:"https://YOUR-RESOURCE-NAME.services.ai.azure.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"opencode-zen":return{provider:"openai",name:"OpenCode Zen",baseUrl:"https://opencode.ai/zen/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"opencode-go":return{provider:"openai",name:"OpenCode GO",baseUrl:"https://opencode.ai/zen/go/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"zai":return{provider:"openai",name:"Z.AI (GLM Coding Plan)",baseUrl:"https://api.z.ai/api/coding/paas/v4",model:"glm-5.2",apiKey:"",requiresApiKey:!0};case"cloudflare-workers-ai":return{provider:"openai",name:"Cloudflare Workers AI",baseUrl:"https://api.cloudflare.com/client/v4/accounts/YOUR-ACCOUNT-ID/ai/v1",model:"@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"cloudflare-ai-gateway":return{provider:"openai",name:"Cloudflare AI Gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/YOUR-ACCOUNT-ID/default/compat",model:"workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:uL,model:pL,apiKey:"",requiresApiKey:!1}}}function p0(Z=a()){return AE(Z.providerProfiles)}function s10(Z=a()){return p0(Z).length>0}function z1(Z=a()){let X=p0(Z);if(X.length===0)return;let q=L0(T4().activeProviderProfileId);if(q){let $=X.find((J)=>J.id===q);if($)return $}let Q=L0(Z.activeProviderProfileId);return X.find(($)=>$.id===Q)??X[0]}function r10(){let Z=L0(T4().activeProviderProfileId);if(!Z)return;return p0().some((q)=>q.id===Z)?Z:void 0}function jE(){return L0(T4().activeProviderProfileId)}function t10(){return jE()!==void 0}function IE(){return L0(a().activeProviderProfileId)}function e10(Z,X){let q=nL(Z);if(!q)return null;let Q=X?.makeActive??!0;if(_0(($)=>{let Y=[...p0($),q],H=L0($.activeProviderProfileId),U=Q||!H||!Y.some((G)=>G.id===H)?q.id:H;return{...$,providerProfiles:Y,activeProviderProfileId:U}}),IE()===q.id)OE(q.id),NE();return q}function Z20(Z,X){let q=nL(X,Z);if(!q)return null;let Q=!1;if(_0(($)=>{let J=p0($),Y=J.findIndex((L)=>L.id===Z);if(Y<0)return $;Q=!0;let H=[...J];H[Y]=q;let U={...$.openaiAdditionalModelOptionsCacheByProfile??{}};delete U[Z];let G=L0($.activeProviderProfileId),W=G&&H.some((L)=>L.id===G)?G:H[0]?.id;return{...$,providerProfiles:H,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:U,openaiAdditionalModelOptionsCache:W===Z?[]:$.openaiAdditionalModelOptionsCache}}),!Q)return null;return q}function X20(Z){let X=L0(Z);if(!X)return null;let q=z1();if(!q)return null;if(g5(q.model).includes(X))return q;_0((J)=>{let Y=p0(J),H=Y.findIndex((V)=>V.id===q.id);if(H<0)return J;let U=Y[H];if(U.model===X)return J;let G=[...Y];G[H]={...U,model:X};let W={...J.openaiAdditionalModelOptionsCacheByProfile??{}};return delete W[q.id],{...J,providerProfiles:G,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:[]}});let $=z1();if(!$||$.id!==q.id)return null;return $}function q20(){let Z=z1();if(!Z)return;_0((X)=>{let q=p0(X),Q=q.findIndex((H)=>H.id===Z.id);if(Q<0)return X;let $=q[Q];if(!$.model)return X;let J=[...q];J[Q]={...$,model:""};let Y={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete Y[Z.id],{...X,providerProfiles:J,openaiAdditionalModelOptionsCacheByProfile:Y,openaiAdditionalModelOptionsCache:[]}})}function wE(Z){let X=g5(Z.model);if(X.length===0)return[];return X.map((q)=>({value:q,label:q,description:`Provider: ${Z.name}`}))}function qQ(Z,X){let q=wE(Z);return{openaiAdditionalModelOptionsCache:q.length>0?q:iL(Z.id,X),openaiAdditionalModelOptionsCacheByProfile:{...X.openaiAdditionalModelOptionsCacheByProfile??{},[Z.id]:q.length>0?q:X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[]}}}function OE(Z){let X=a(),Q=p0(X).find(($)=>$.id===Z);if(!Q)return null;return _0(($)=>({...$,activeProviderProfileId:Z,...qQ(Q,$)})),Q}function Q20(Z){if(Z===null){W5((J)=>({...J,activeProviderProfileId:void 0,activeModelForProject:void 0,activeModelForProjectProfileId:void 0}));let $=z1();if($)dL($);return null}let q=p0().find(($)=>$.id===Z);if(!q)return null;let Q=!1;if(W5(($)=>{if(!p0().some((H)=>H.id===Z))return Q=!0,$;let Y={...$,activeProviderProfileId:Z};if($.activeProviderProfileId!==Z)Y.activeModelForProject=void 0,Y.activeModelForProjectProfileId=void 0;return Y}),Q)return null;return dL(q),q}function dL(Z){let X=a(),q=qQ(Z,X),Q=X.openaiAdditionalModelOptionsCache??[],$=X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[],J=q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[];if(cL(Q,q.openaiAdditionalModelOptionsCache??[])&&cL($,J))return;_0((Y)=>({...Y,...qQ(Z,Y)}))}function cL(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 kE(Z,X){if(!Z)return{projects:Z,stripped:[]};let q=(J)=>{let Y=J?.activeProviderProfileId;return Y!=null&&X(Y)?Y:void 0};if(!Object.values(Z).some((J)=>q(J)!==void 0))return{projects:Z,stripped:[]};let Q=[];return{projects:Object.fromEntries(Object.entries(Z).map(([J,Y])=>{let H=q(Y);if(H!==void 0){let{activeProviderProfileId:U,activeModelForProject:G,activeModelForProjectProfileId:W,...V}=Y;return Q.push({path:J,activeProviderProfileId:H,activeModelForProject:G??void 0}),[J,V]}return[J,Y]})),stripped:Q}}function $20(Z){let X=!1,q;return _0((Q)=>{let $=p0(Q);if(!$.find((L)=>L.id===Z))return Q;X=!0;let Y=$.filter((L)=>L.id!==Z),H=L0(Q.activeProviderProfileId),G=!H||H===Z||!Y.some((L)=>L.id===H)?Y[0]?.id:H;if(G)q=Y.find((L)=>L.id===G)??Y[0];let W={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete W[Z];let{projects:V}=kE(Q.projects,(L)=>L===Z);return{...Q,providerProfiles:Y,activeProviderProfileId:G,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:G?iL(G,{...Q,openaiAdditionalModelOptionsCacheByProfile:W}):[],projects:V}}),{removed:X,activeProfileId:q?.id}}function J20(Z=a()){let X=z1(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 Y20(Z){let X=z1();if(!X){_0((q)=>({...q,openaiAdditionalModelOptionsCache:Z}));return}_0((q)=>({...q,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...q.openaiAdditionalModelOptionsCacheByProfile??{},[X.id]:Z}}))}function NE(){let Z=z1();if(!Z){_0((X)=>({...X,openaiAdditionalModelOptionsCache:[]}));return}_0((X)=>{let q={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete q[Z.id],{...X,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:q}})}var uL="http://localhost:11434/v1",pL="llama3.1:8b";var aL=B(()=>{ZQ();XQ()});function m5(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(),$=Z.update(q);if($.success){if(Q===null)X.delete();return $}let J=X.update(q);if(J.success){if(Q!==null)Z.delete();return{success:!0,warning:J.warning}}return{success:!1}},delete(){let q=Z.delete(),Q=X.delete();return q||Q}}}var oL=()=>{};function u5(Z,X,q=10*rL*sL){let G=[];try{let Q;if(X===void 0)Q={};else if(X instanceof AbortSignal)Q={abortSignal:X,timeout:q};else Q=X;let{abortSignal:$,timeout:J=10*rL*sL,input:Y,stdio:H=["ignore","pipe","pipe"]}=Q;$?.throwIfAborted();const U=F2(G,y7`exec: ${Z.slice(0,200)}`,0);try{let z=E0(Z,{env:process.env,maxBuffer:1e6,timeout:J,cwd:Z0(),stdio:H,shell:!0,reject:!1,input:Y});if(!z.stdout)return null;return z.stdout.trim()||null}catch{return null}}catch(W){var V=W,L=1}finally{D2(G,V,L)}}var sL=1000,rL=60;var QQ=B(()=>{c2();G1();M0()});import{createHash as xE}from"crypto";import{userInfo as PE}from"os";function W2(Z=""){let X=$0(),Q=!process.env.CLAUDIN_CONFIG_DIR?"":`-${xE("sha256").update(X).digest("hex").substring(0,8)}`;return`Claude Code${tL().OAUTH_FILE_SUFFIX}${Z}${Q}`}function m4(Z=""){return W2(Z)}function w0(){try{return process.env.USER||PE().username}catch{return"claude-code-user"}}function JQ(){Y0.cache={data:null,cachedAt:0},Y0.generation++,Y0.readInFlight=null}function M20(Z){if(Y0.cache.cachedAt!==0)return;let X=null;if(Z)try{X=JSON.parse(Z)}catch{return}Y0.cache={data:X,cachedAt:Date.now()}}var d0="-credentials",$Q=30000,Y0;var p5=B(()=>{QG();s0();Y0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function vE(){try{let Z=m4(d0),X=w0(),{stdout:q,code:Q}=await s("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 O20(){if(R6!==void 0)return R6;if(process.platform!=="darwin")return R6=!1,!1;try{R6=E0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{R6=!1}return R6}var EE=4032,YQ,R6;var eL=B(()=>{c2();g0();G5();QQ();M0();p5();YQ={name:"keychain",read(){let Z=Y0.cache;if(Date.now()-Z.cachedAt<$Q)return Z.data;try{let X=m4(d0),q=w0(),Q=u5(`security find-generic-password -a "${q}" -w -s "${X}"`);if(Q){let $=X0(Q);return Y0.cache={data:$,cachedAt:Date.now()},$}}catch(X){}if(Z.data!==null)return P("[keychain] read failed; serving stale cache",{level:"warn"}),Y0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return Y0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=Y0.cache;if(Date.now()-Z.cachedAt<$Q)return Z.data;if(Y0.readInFlight)return Y0.readInFlight;let X=Y0.generation,q=vE().then((Q)=>{if(X===Y0.generation){if(Q===null&&Z.data!==null)P("[keychain] readAsync failed; serving stale cache",{level:"warn"});let $=Q??Z.data;return Y0.cache={data:$,cachedAt:Date.now()},Y0.readInFlight=null,$}return Q});return Y0.readInFlight=q,q},update(Z){JQ();try{let X=m4(d0),q=w0(),Q=m(Z),$=Buffer.from(Q,"utf-8").toString("hex"),J=`add-generic-password -U -a "${q}" -s "${X}" -X "${$}"
|
|
122
|
+
`,Y;if(J.length<=EE)Y=E0("security",["-i"],{input:J,stdio:["pipe","pipe","pipe"],reject:!1});else P(`Keychain payload (${Q.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=E0("security",["add-generic-password","-U","-a",q,"-s",X,"-X",$],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return Y0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(X){return{success:!1}}},delete(){JQ();try{let Z=m4(d0),X=w0();return u5(`security delete-generic-password -a "${X}" -s "${Z}"`),!0}catch(Z){return!1}}}});var HQ;var Zz=B(()=>{c2();M0();p5();HQ={name:"libsecret",read(){try{let Z=w0(),X=W2(d0),q=E0("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=w0(),q=W2(d0),Q=m(Z);return{success:E0("secret-tool",["store","--label",q,"service",q,"account",X],{input:Q,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=w0(),X=W2(d0);return E0("secret-tool",["clear","service",X,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as yE}from"path";function u4(Z){return Z.replace(/'/g,"''")}function d5(){return W2(d0)}function Xz(){return`${d5()}:${w0()}`}function KQ(){let Z=d5().replace(/[^a-zA-Z0-9._-]/g,"_");return yE($0(),`${Z}.secure.dpapi`)}function p4(Z,X){try{return E0("powershell.exe",["-Command",Z],{input:X?.input,reject:!1})}catch{return null}}function UQ(Z){return typeof Z==="string"?Z:""}function CE(Z,X){let q=UQ(Z?.stderr).trim();if(q)return q;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${X} (exit code ${Z.exitCode}).`;return X}function qz(){let Z=d5().replace(/"/g,'`"'),X=w0().replace(/"/g,'`"'),q=`
|
|
123
|
+
Add-Type -AssemblyName System.Runtime.WindowsRuntime
|
|
124
|
+
try {
|
|
125
|
+
$vault = New-Object Windows.Security.Credentials.PasswordVault
|
|
126
|
+
$cred = $vault.Retrieve("${Z}", "${X}")
|
|
127
|
+
$cred.FillPassword()
|
|
128
|
+
[Console]::Out.Write($cred.Password)
|
|
129
|
+
} catch {
|
|
130
|
+
exit 1
|
|
131
|
+
}
|
|
132
|
+
`,Q=p4(q);if(Q?.exitCode===0&&Q.stdout)try{return X0(UQ(Q.stdout))}catch{return null}return null}var GQ;var Qz=B(()=>{c2();s0();M0();p5();GQ={name:"credential-locker-dpapi",read(){let Z=u4(KQ()),X=u4(Xz()),q=`
|
|
133
|
+
try {
|
|
134
|
+
Add-Type -AssemblyName System.Security
|
|
135
|
+
$path = '${Z}'
|
|
136
|
+
if (!(Test-Path -LiteralPath $path)) {
|
|
137
|
+
exit 1
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
$protectedBase64 = [System.IO.File]::ReadAllText(
|
|
141
|
+
$path,
|
|
142
|
+
[System.Text.Encoding]::UTF8
|
|
143
|
+
).Trim()
|
|
144
|
+
if (-not $protectedBase64) {
|
|
145
|
+
exit 1
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
$protectedBytes = [Convert]::FromBase64String($protectedBase64)
|
|
149
|
+
$entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${X}')
|
|
150
|
+
$bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
|
|
151
|
+
$protectedBytes,
|
|
152
|
+
$entropyBytes,
|
|
153
|
+
[System.Security.Cryptography.DataProtectionScope]::CurrentUser
|
|
154
|
+
)
|
|
155
|
+
[Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
|
|
156
|
+
} catch {
|
|
157
|
+
exit 1
|
|
158
|
+
}
|
|
159
|
+
`,Q=p4(q);if(Q?.exitCode===0&&Q.stdout)try{return X0(UQ(Q.stdout))}catch{return qz()}return qz()},async readAsync(){return this.read()},update(Z){let X=u4(KQ()),q=u4(Xz()),Q=m(Z),$=`
|
|
160
|
+
try {
|
|
161
|
+
Add-Type -AssemblyName System.Security
|
|
162
|
+
$path = '${X}'
|
|
163
|
+
$directory = [System.IO.Path]::GetDirectoryName($path)
|
|
164
|
+
if ($directory) {
|
|
165
|
+
[System.IO.Directory]::CreateDirectory($directory) | Out-Null
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
$payload = [Console]::In.ReadToEnd()
|
|
169
|
+
$bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
|
|
170
|
+
$entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${q}')
|
|
171
|
+
$protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
|
|
172
|
+
$bytes,
|
|
173
|
+
$entropyBytes,
|
|
174
|
+
[System.Security.Cryptography.DataProtectionScope]::CurrentUser
|
|
175
|
+
)
|
|
176
|
+
$protectedBase64 = [Convert]::ToBase64String($protectedBytes)
|
|
177
|
+
[System.IO.File]::WriteAllText(
|
|
178
|
+
$path,
|
|
179
|
+
$protectedBase64,
|
|
180
|
+
[System.Text.Encoding]::UTF8
|
|
181
|
+
)
|
|
182
|
+
} catch {
|
|
183
|
+
Write-Error $_.Exception.Message
|
|
184
|
+
exit 1
|
|
185
|
+
}
|
|
186
|
+
`,J=p4($,{input:Q});if(J?.exitCode===0)return{success:!0};return{success:!1,warning:CE(J,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let X=`
|
|
187
|
+
try {
|
|
188
|
+
$path = '${u4(KQ())}'
|
|
189
|
+
if (Test-Path -LiteralPath $path) {
|
|
190
|
+
Remove-Item -LiteralPath $path -Force
|
|
191
|
+
}
|
|
192
|
+
} catch {
|
|
193
|
+
exit 1
|
|
194
|
+
}
|
|
195
|
+
`,q=p4(X),Q=d5().replace(/"/g,'`"'),$=w0().replace(/"/g,'`"'),J=`
|
|
196
|
+
Add-Type -AssemblyName System.Runtime.WindowsRuntime
|
|
197
|
+
try {
|
|
198
|
+
$vault = New-Object Windows.Security.Credentials.PasswordVault
|
|
199
|
+
$cred = $vault.Retrieve("${Q}", "${$}")
|
|
200
|
+
$vault.Remove($cred)
|
|
201
|
+
} catch {
|
|
202
|
+
exit 0
|
|
203
|
+
}
|
|
204
|
+
`,Y=p4(J);return(q?.exitCode??1)===0}}});import{chmodSync as SE}from"fs";import{join as bE}from"path";function c5(){let Z=$0(),X=".credentials.json";return{storageDir:Z,storagePath:bE(Z,".credentials.json")}}var d4;var Jz=B(()=>{s0();I1();F0();M0();d4={name:"plaintext",read(){let{storagePath:Z}=c5();try{let X=k().readFileSync(Z,{encoding:"utf8"});return X0(X)}catch{return null}},async readAsync(){let{storagePath:Z}=c5();try{let X=await k().readFile(Z,{encoding:"utf8"});return X0(X)}catch{return null}},update(Z){try{let{storageDir:X,storagePath:q}=c5();try{k().mkdirSync(X)}catch(Q){if(U0(Q)!=="EEXIST")throw Q}return $z(q,m(Z),{encoding:"utf8",flush:!1}),SE(q,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=c5();try{return k().unlinkSync(Z),!0}catch(X){if(U0(X)==="ENOENT")return!0;return!1}}}});function Yz(Z){let X=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return X?m5(YQ,d4):YQ;if(process.platform==="linux")return X?m5(HQ,d4):HQ;if(process.platform==="win32")return X?m5(GQ,d4):GQ;return X?d4:hE}var hE;var Hz=B(()=>{oL();eL();Zz();Qz();Jz();hE={name:"unavailable-secure-storage",read:()=>null,readAsync:async()=>null,update:()=>({success:!1,warning:"Secure storage is unavailable on this platform without plaintext fallback."}),delete:()=>!0}});function h(Z){if(typeof Z!=="string")return;let X=Z.trim();return X?X:void 0}function WQ(Z=process.env){return h(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function Z60(Z=process.env){let X=h(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 VQ(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),$=Buffer.from(Q,"base64").toString("utf8"),J=JSON.parse($);return J&&typeof J==="object"?J:void 0}catch{return}}function c0(Z){if(!Z)return;let X=VQ(Z),q=X?.["https://api.openai.com/auth"]&&typeof X["https://api.openai.com/auth"]==="object"?X["https://api.openai.com/auth"]:void 0,Q=q?.organizations,$=Array.isArray(Q)&&Q.length>0&&typeof Q[0]==="object"?Q[0].id:void 0;return h(q?.chatgpt_account_id??X?.["https://api.openai.com/auth.chatgpt_account_id"]??X?.chatgpt_account_id??$)??void 0}function X60(Z){return Z.replace(/[&<>"']/g,(X)=>{switch(X){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"'":return"'";default:return X}})}async function Uz(Z){let X=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:WQ(),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 J=await q.text().catch(()=>"");throw Error(J.trim()?`Codex API key exchange failed (${q.status}): ${J.trim()}`:`Codex API key exchange failed with status ${q.status}.`)}let Q=await q.json(),$=h(Q.access_token);if(!$)throw Error("Codex API key exchange completed, but no API key token was returned.");return $}var r20="https://auth.openai.com",Kz="https://auth.openai.com/oauth/token",t20="openid profile email offline_access api.connectors.read api.connectors.invoke",e20="codex_cli_rs";var BQ=()=>{};function i5(){return Yz({allowPlainTextFallback:!0})}function Gz(Z){if(!Z)return;let q=VQ(Z)?.exp;if(typeof q==="number"&&Number.isFinite(q))return q*1000;return}function l4(Z){if(!Z||typeof Z!=="object")return;let X=Z,q=h(X.apiKey),Q=h(X.accessToken);if(!Q)return;let $=h(X.refreshToken),J=h(X.idToken),Y=h(X.accountId)??c0(J)??c0(Q),H=h(X.profileId),U=typeof X.lastRefreshAt==="number"&&Number.isFinite(X.lastRefreshAt)?X.lastRefreshAt:void 0,G=typeof X.lastRefreshFailureAt==="number"&&Number.isFinite(X.lastRefreshFailureAt)?X.lastRefreshFailureAt:void 0;return{apiKey:q,accessToken:Q,refreshToken:$,idToken:J,accountId:Y,profileId:H,lastRefreshAt:U,lastRefreshFailureAt:G}}function mE(Z){let X=Gz(Z.accessToken)??Gz(Z.idToken);if(X===void 0)return!1;return X<=Date.now()+fE}function Wz(Z,X=Date.now()){let q=Math.max(Z.lastRefreshFailureAt??0,n5??0);if(!q)return!1;return X-q<gE}function uE(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,$=h(Q?.code??q.code),J=h(Q?.message??q.error_description)??X.trim();return $?`Codex token refresh failed (${$}): ${J}`:`Codex token refresh failed with status ${Z}: ${J}`}catch{return`Codex token refresh failed with status ${Z}: ${X.trim()}`}}function Vz(){if(M6())return;try{let Z=i5().read();return l4(Z?.codex)}catch{return}}async function pE(){if(M6())return;try{let Z=await i5().readAsync();return l4(Z?.codex)}catch{return}}function Bz(Z,X=Date.now()){return Wz(Z,X)}function Lz(Z){if(M6())return{success:!1,warning:"Bare mode: secure storage is disabled."};let X=l4(Z);if(!X)return{success:!1,warning:"Codex credentials are incomplete."};let q=i5(),Q=q.read()||{},$=l4(Q[l5]),J={...Q,[l5]:{...X,profileId:X.profileId??$?.profileId,lastRefreshAt:X.lastRefreshAt??Date.now()}},Y=q.update(J);if(Y.success)n5=l4(J[l5])?.lastRefreshFailureAt??null;return Y}function dE(Z,X){if(!Lz({...Z,lastRefreshFailureAt:X}).success)n5=X}function K60(){if(M6())return{success:!0};let Z=i5(),q={...Z.read()||{}};delete q[l5];let Q=Z.update(q);if(Q.success)n5=null;return Q}async function U60(Z){if(M6())return{refreshed:!1};if(n4()?.apiKey?.trim())return{refreshed:!1};let X=await pE();if(!X)return{refreshed:!1};let q=X.refreshToken;if(!q)return{refreshed:!1,credentials:X};if(!Z?.force&&!mE(X))return{refreshed:!1,credentials:X};if(Wz(X))return{refreshed:!1,credentials:X};if(c4)return c4;return c4=(async()=>{let Q=Date.now();try{let $=new URLSearchParams({client_id:WQ(),grant_type:"refresh_token",refresh_token:q}),J=await fetch(Kz,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:$,signal:AbortSignal.timeout(15000)});if(!J.ok){let V=await J.text().catch(()=>"");throw Error(uE(J.status,V))}let Y=await J.json(),H=h(Y.access_token);if(!H)throw Error("Codex token refresh succeeded without a new access token.");let U={accessToken:H,refreshToken:h(Y.refresh_token)??X.refreshToken,idToken:h(Y.id_token)??X.idToken,accountId:c0(Y.id_token)??c0(Y.access_token)??X.accountId,lastRefreshAt:Date.now()},G=U.idToken??X.idToken;if(G)U.apiKey=await Uz(G).catch((V)=>{P(`[codex] id-token → API-key exchange failed; falling back to access_token bearer: ${V instanceof Error?V.message:String(V)}`,{level:"warn"});return});let W=Lz(U);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:U}}catch($){throw dE(X,Q),$}finally{c4=null}})(),c4}var l5="codex",fE=60000,gE=60000,c4=null,n5=null;var zz=B(()=>{V2();g0();s0();Hz();BQ()});import{existsSync as cE,readFileSync as lE}from"node:fs";import{isIP as nE}from"node:net";import{homedir as iE}from"node:os";import{join as _z}from"node:path";function M60(Z){if(!Z)return!1;try{let{hostname:X}=new URL(Z);return X==="api.x.ai"}catch{return!1}}function F60(Z){if(!Z)return!1;try{let{hostname:X,pathname:q}=new URL(Z);return X==="api.kimi.com"&&q.startsWith("/coding")}catch{return!1}}function rE(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 tE(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 _Q(Z){if(!Z)return;let X=Z.trim();if(!X)return;if(X==="undefined")return;return X}function LQ(Z,X){for(let q of X){let Q=Z,$=!0;for(let Y of q){if(!Q||typeof Q!=="object"||!(Y in Q)){$=!1;break}Q=Q[Y]}if(!$)continue;let J=h(Q);if(J)return J}return}function eE(Z){if(!Z)return;let X=Z.trim().toLowerCase();if(X==="low"||X==="medium"||X==="high"||X==="xhigh"||X==="max")return X;return}function Rz(Z){let X=Z.trim(),q=X.indexOf("?");if(q===-1){let G=X.toLowerCase(),W=o5[G];if(W)return{raw:X,baseModel:W.model,reasoning:W.reasoningEffort?{effort:W.reasoningEffort}:void 0};return{raw:X,baseModel:X}}let Q=X.slice(0,q).trim(),$=new URLSearchParams(X.slice(q+1)),J=Q.toLowerCase(),Y=o5[J],H=Y?.model??Q,U=eE($.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:X,baseModel:H,reasoning:typeof U==="string"?{effort:U}:U}}function Tz(Z){let X=Z.trim().toLowerCase();return(X.split("?",1)[0]??X)in o5}function RQ(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;return oE.has(q)}function jz(Z){return RQ(Z)}function Zv(Z,X){let q=_Q(X);return Hv(q)||!q&&Tz(Z)}function $v(Z){let X=Z.trim().toLowerCase();if(X.includes("codex"))return!0;let q=Xv.exec(X);if(!q)return!1;if(Number(q[1])<5)return!1;if(X.startsWith("gpt-5-mini"))return!1;return!0}function Iz(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(sE.has(X)||X==="0.0.0.0")return!0;if(X.endsWith(".local"))return!0;let Q=nE(X);if(Q===4)return Number.parseInt(X.split(".",1)[0]??"",10)===127||rE(X);if(Q===6)return tE(X);return!1}catch{return!1}}function a5(Z){return Z.replace(MQ,"")}function Jv(Z){let X=a5(Z);if(!X||X==="/")return"/v1";if(X.toLowerCase().endsWith("/v1"))return X;return`${X}/v1`}function Yv(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 D60(Z){if(!Iz(Z))return[];try{let X=new URL(Z),q=a5(X.toString()),Q=new Set([q]),$=[],J=(U,G)=>{let W=new URL(X.toString());W.hostname=U,W.pathname=G,W.search="",W.hash="";let V=a5(W.toString());if(Q.has(V))return;Q.add(V),$.push(V)},Y=Jv(X.pathname);if(Y!==a5(X.pathname))J(X.hostname,Y);let H=X.hostname.toLowerCase().replace(Qv,"");if(H==="localhost"||H==="::1")J("127.0.0.1",X.pathname||"/"),J("127.0.0.1",Y);return $}catch{return[]}}function A60(Z){if(!Z.hasTools)return!1;if(!Iz(Z.baseUrl))return!1;return Yv(Z.baseUrl)}function Hv(Z){if(!Z)return!1;try{let X=new URL(Z);return X.hostname==="chatgpt.com"&&X.pathname.replace(MQ,"")==="/backend-api/codex"}catch{return!1}}function Kv(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return Az;let Q=q.indexOf("/");if(Q!==-1)return q.slice(Q+1);return q}function Mz(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return Az;return q}function Dz(Z){if(!Z)return"copilot";try{let X=new URL(Z).hostname.toLowerCase();if(X==="api.githubcopilot.com"||X.endsWith(".githubcopilot.com")||X.startsWith("copilot-api."))return"copilot";if(X==="models.github.ai"||X.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function FQ(Z){let X=wz(),Q=X?.transport==="github_copilot",$=X?.model?.trim(),J=_Q(X?.baseUrl),Y=Z?.model?.trim()||$||Z?.fallbackModel?.trim()||(Q?"github:copilot":"gpt-4o"),H=Rz(Y),U=_Q(Z?.baseUrl),G=U??J,V=Q&&Tz(Y)&&G&&Dz(G)==="custom"?void 0:G,L=U??V,z=$??"",R=RQ(z)?Rz(z).baseModel:null,M=Boolean(Z?.model)&&Boolean(R)&&H.baseModel===R,F=RQ(Y)||M,D=!Q&&F&&!(L&&L!==zQ)?aE:L,w=Q?Dz(L):"custom",T=Q&&w==="copilot",j=Q&&w==="models",A=Q&&w==="custom",b=Q?Mz(Y):Y,O=Zv(Y,D)||T&&$v(b)?"codex_responses":"chat_completions",x=T?Kv(H.baseModel):j||A?Mz(H.baseModel):H.baseModel,E=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(X?.extras?.reasoningEffort?{effort:X.extras.reasoningEffort}:void 0);return{transport:O,requestedModel:Y,resolvedModel:x,baseUrl:(D??(T&&O==="codex_responses"?Fz:Q?Fz:zQ)).replace(MQ,""),reasoning:E}}function T60(Z){if(FQ({model:Z}).transport==="codex_responses")return!0;return wz()?.transport==="github_copilot"}function wz(){try{let{tryGetActiveProvider:Z}=(V2(),g4(i4));return Z()}catch{return null}}function j60(){let Z=null;try{let{tryGetActiveProvider:Q}=(V2(),g4(i4));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=FQ();if(q.transport!=="chat_completions")return null;return`openai:${q.baseUrl.toLowerCase()}`}function I60(){let Z=FQ();if(Z.transport!=="chat_completions")return!1;let X=Z.baseUrl.toLowerCase();try{return new URL(X).hostname==="api.openai.com"}catch{return X===zQ}}function Oz(Z=process.env){let X=DQ();if(X)return X;let q=h(Z.CODEX_AUTH_JSON_PATH);if(q)return q;let Q=h(Z.CODEX_HOME);if(Q)return _z(Q,"auth.json");return _z(iE(),".codex","auth.json")}function DQ(){try{let{tryGetActiveProvider:Z}=(V2(),g4(i4));return h(Z()?.extras?.codexAuthPath)}catch{return}}function AQ(){try{let{tryGetActiveProvider:Z}=(V2(),g4(i4));return h(Z()?.extras?.codexAccountId)}catch{return}}function kz(Z){if(!cE(Z))return;try{let X=lE(Z,"utf8"),q=JSON.parse(X);return q&&typeof q==="object"?q:void 0}catch{return}}function Nz(Z){let{authJson:X,authPath:q,envAccountId:Q}=Z;if(!X)return{apiKey:"",authPath:q,source:Z.missingSource??"none"};let $=LQ(X,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),J=LQ(X,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=Q??LQ(X,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??c0($)??c0(J);if(!$)return{apiKey:"",accountId:Y,authPath:q,source:Z.missingSource??"none"};return{apiKey:$,accountId:Y,authPath:q,source:"auth.json"}}function xz(Z){let{storedCredentials:X,envAccountId:q}=Z;return{apiKey:X.apiKey??X.accessToken,accountId:q??X.accountId??c0(X.idToken)??c0(X.accessToken),source:"secure-storage"}}function s5(Z,X){let q=h(Z.CODEX_API_KEY),$=AQ()??h(Z.CODEX_ACCOUNT_ID)??h(Z.CHATGPT_ACCOUNT_ID);if(q)return{apiKey:q,accountId:$??c0(q),source:"env"};let J=DQ();if(!Boolean(J??h(Z.CODEX_AUTH_JSON_PATH)??h(Z.CODEX_HOME))&&X?.explicitAuthPathOnly)return{apiKey:"",accountId:$,source:"none"};let H=Oz(Z),U=kz(H);return Nz({authJson:U,authPath:H,envAccountId:$})}function w60(Z){let X=Z?.env??process.env,q=s5(X,{explicitAuthPathOnly:!0}),Q=Boolean(DQ()??h(X.CODEX_AUTH_JSON_PATH)??h(X.CODEX_HOME)),$=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(Q||q.source==="env"||q.source==="auth.json")return q;if(Z?.storedCredentials?.accessToken)return xz({storedCredentials:Z.storedCredentials,envAccountId:AQ()??h(X.CODEX_ACCOUNT_ID)??h(X.CHATGPT_ACCOUNT_ID)});if($)return s5(X);return Uv(X)}function Uv(Z=process.env){let X=AQ()??h(Z.CODEX_ACCOUNT_ID)??h(Z.CHATGPT_ACCOUNT_ID),q=s5(Z,{explicitAuthPathOnly:!0});if(q.source==="env"||q.source==="auth.json"||q.authPath)return q;let Q=Vz();if(Q?.accessToken){let $=xz({storedCredentials:Q,envAccountId:X});if(!(!$.accountId||Bz(Q)))return $;let Y=Oz(Z),H=kz(Y),U=Nz({authJson:H,authPath:Y,envAccountId:X});if(U.apiKey)return{...U,accountId:U.accountId??$.accountId};return $}return s5(Z)}function Gv(Z){let X=Z.trim().toLowerCase(),Q=X.split("?",1)[0]??X;return o5[Q]?.reasoningEffort}function O60(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;if(q==="gpt-5.3-codex-spark"||q==="codexspark")return!1;if(Gv(q)!==void 0)return!0;return qv.test(q)}var zQ="https://api.openai.com/v1",aE="https://chatgpt.com/backend-api/codex",R60="https://api.x.ai/v1",Az="gpt-4o",o5,oE,sE,Xv,qv,MQ,Qv,Fz="https://api.githubcopilot.com";var Pz=B(()=>{zz();BQ();o5={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.6":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-sol":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-terra":{model:"gpt-5.6-terra",reasoningEffort:"high"},"gpt-5.6-luna":{model:"gpt-5.6-luna",reasoningEffort:"high"},"gpt-5.5":{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.4":{model:"gpt-5.4",reasoningEffort:"high"},"gpt-5.3-codex":{model:"gpt-5.3-codex",reasoningEffort:"high"},"gpt-5.3-codex-spark":{model:"gpt-5.3-codex-spark"},codexspark:{model:"gpt-5.3-codex-spark"},"gpt-5.2-codex":{model:"gpt-5.2-codex",reasoningEffort:"high"},"gpt-5.1-codex-max":{model:"gpt-5.1-codex-max",reasoningEffort:"high"},"gpt-5.1-codex-mini":{model:"gpt-5.1-codex-mini"},"gpt-5.5-mini":{model:"gpt-5.5-mini",reasoningEffort:"medium"},"gpt-5.4-mini":{model:"gpt-5.4-mini",reasoningEffort:"medium"},"gpt-5.2":{model:"gpt-5.2",reasoningEffort:"medium"}},oE=new Set(["codexplan","codexspark"]),sE=new Set(["localhost","127.0.0.1","::1"]);Xv=/^gpt-(\d+)/,qv=/^gpt-5(?:[.-]|$)/,MQ=/\/+$/,Qv=/^\[|\]$/g});var i4={};Mq(i4,{tryGetActiveProvider:()=>n4,invalidateActiveProviderCache:()=>Lv,getActiveProvider:()=>vz,_peekActiveProviderCacheForTesting:()=>zv,ActiveProviderNotConfiguredError:()=>r5});function Wv(){if(Ez)return;Ez=!0,kX(()=>{B2=null})}function Vv(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(jz(X))return"codex_responses";return"openai_compat"}}}function Bv(Z){let X=mL(Z.model);return{transport:Vv(Z,X),baseUrl:Z.baseUrl,model:X,apiKey:Z.apiKey,extras:Z.extras,name:Z.name}}function vz(){if(Wv(),B2)return B2;let Z=z1(a());if(!Z)throw new r5;return B2=Bv(Z),B2}function n4(){try{return vz()}catch(Z){if(Z instanceof r5)return null;throw Z}}function Lv(){B2=null}function zv(){return B2}var r5,B2=null,Ez=!1;var V2=B(()=>{ZQ();aL();XQ();Pz();r5=class r5 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function yz(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 Cz=()=>{};function Sz(Z){if(typeof Z!=="string")return!1;let X=Z.trim();return X!==""&&X!=="."&&X!==".."&&!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("\x00")}function TQ(Z){if(typeof Z!=="string")throw TypeError("Expected a string");if(!Sz(Z))throw Error(`Unsafe filename: ${JSON.stringify(Z)}`)}var y60;var bz=B(()=>{y60=Object.freeze([""," ",".",".."," .",". "," ..",".. ","../","../foo","foo/../bar","foo/bar","foo\\bar","foo\x00bar"])});import t from"node:path";import hz from"node:os";import jQ from"node:process";function wQ(Z,{suffix:X="nodejs"}={}){if(TQ(Z),X)Z+=`-${X}`;if(TQ(Z),jQ.platform==="darwin")return _v(Z);if(jQ.platform==="win32")return Rv(Z);return Mv(Z)}var S1,IQ,F6,_v=(Z)=>{let X=t.join(S1,"Library");return{data:t.join(X,"Application Support",Z),config:t.join(X,"Preferences",Z),cache:t.join(X,"Caches",Z),log:t.join(X,"Logs",Z),temp:t.join(IQ,Z)}},Rv=(Z)=>{let X=F6.APPDATA||t.join(S1,"AppData","Roaming"),q=F6.LOCALAPPDATA||t.join(S1,"AppData","Local");return{data:t.join(q,Z,"Data"),config:t.join(X,Z,"Config"),cache:t.join(q,Z,"Cache"),log:t.join(q,Z,"Log"),temp:t.join(IQ,Z)}},Mv=(Z)=>{let X=t.basename(S1);return{data:t.join(F6.XDG_DATA_HOME||t.join(S1,".local","share"),Z),config:t.join(F6.XDG_CONFIG_HOME||t.join(S1,".config"),Z),cache:t.join(F6.XDG_CACHE_HOME||t.join(S1,".cache"),Z),log:t.join(F6.XDG_STATE_HOME||t.join(S1,".local","state"),Z),temp:t.join(IQ,X,Z)}};var fz=B(()=>{bz();S1=hz.homedir(),IQ=hz.tmpdir(),{env:F6}=jQ});import{join as t5}from"path";function uz(Z){let X=Z.replace(/[^a-zA-Z0-9]/g,"-");if(X.length<=gz)return X;return`${X.slice(0,gz)}-${Math.abs(mz(Z)).toString(36)}`}function Z3(Z){return uz(Z)}var e5,gz=200,pz;var dz=B(()=>{fz();F0();Fv();e5=wQ("claude-cli");pz={baseLogs:()=>t5(e5.cache,Z3(k().cwd())),errors:()=>t5(e5.cache,Z3(k().cwd()),"errors"),messages:()=>t5(e5.cache,Z3(k().cwd()),"messages"),mcpLogs:(Z)=>t5(e5.cache,Z3(k().cwd()),`mcp-logs-${uz(Z)}`)}});function lz(Z){return Z.replace(cz,"").trim()||Z}function nz(Z){return Z.replace(cz,"").trim()}function l60(Z){return Z.replace(Dv,"").trim()}var cz,Dv;var iz=B(()=>{cz=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;Dv=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});import{readdir as Tv,readFile as jv,stat as Iv}from"fs/promises";import{join as wv}from"path";function J40(Z,X){let q=Z.firstPrompt?.startsWith(`<${rz}>`),Q=Z.firstPrompt?nz(Z.firstPrompt):"",$=Q&&!q,J=Z.agentName||Z.customTitle||Z.summary||($?Q:void 0)||X||(q?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return lz(J).trim()}function Ov(Z){return Z.toISOString().replace(/[:.]/g,"-")}function Nv(Z){if(a4.length>=kv)a4.shift();a4.push(Z)}function Y40(Z){if(S0!==null)return;if(S0=Z,L2.length>0){let X=[...L2];L2.length=0;for(let q of X)switch(q.type){case"error":S0.logError(q.error);break;case"mcpError":S0.logMCPError(q.serverName,q.error);break;case"mcpDebug":S0.logMCPDebug(q.serverName,q.message);break}}}function S(Z){let X=sz(Z);try{let q=n4()?.transport;if(q==="bedrock"||q==="vertex"||q==="foundry"||process.env.DISABLE_ERROR_REPORTING||oq())return;let $={error:X.stack||X.message,timestamp:new Date().toISOString()};if(Nv($),S0===null){L2.push({type:"error",error:X});return}S0.logError(X)}catch{}}function K40(){return[...a4]}function xv(){return Pv(pz.errors())}async function U40(Z){return(await xv())[Z]||null}async function Pv(Z){let X;try{X=await Tv(Z,{withFileTypes:!0})}catch{return S(Error(`No logs found at ${Z}`)),[]}let q=await Promise.all(X.map(async(Q,$)=>{let J=wv(Z,Q.name),Y=await jv(J,{encoding:"utf8"}),H=X0(Y),U=H[0],G=H[H.length-1],W=U?.type==="user"&&typeof U?.message?.content==="string"?U?.message?.content:"No prompt",V=await Iv(J),L=J.includes("sidechain"),z=Ov(V.mtime);return{date:z,fullPath:J,messages:H,value:$,created:OQ(U?.timestamp||z),modified:G?.timestamp?OQ(G.timestamp):OQ(z),firstPrompt:W.split(`
|
|
205
|
+
`)[0]?.slice(0,50)+(W.length>50?"…":"")||"No prompt",messageCount:H.length,isSidechain:L}}));return yz(q.filter((Q)=>Q!==null)).map((Q,$)=>({...Q,value:$}))}function OQ(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 G40(Z,X){try{if(S0===null){L2.push({type:"mcpError",serverName:Z,error:X});return}S0.logMCPError(Z,X)}catch{}}function W40(Z,X){try{if(S0===null){L2.push({type:"mcpDebug",serverName:Z,message:X});return}S0.logMCPDebug(Z,X)}catch{}}function V40(Z,X){if(!X||!X.startsWith("repl_main_thread"))return;let{messages:q,...Q}=Z;az(Q),oz(null)}function B40(){S0=null,L2.length=0,a4=[]}var kv=100,a4,L2,S0=null,H40;var k0=B(()=>{j1();v1();V2();Av();Cz();dz();iz();I1();rq();M0();a4=[];L2=[];H40=u(()=>{return process.argv.includes("--hard-fail")})});import tz from"node:path";function yv(Z){return Z.includes(tz.sep)||Z.includes("/")||tz.isAbsolute(Z)}function Cv(Z){let X=Z.trim();if(!X)return"Unsafe executable: empty command";if(o4.test(X))return"Unsafe executable: control characters are not allowed";if(!yv(X)&&!vv.test(X))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function Sv(Z){for(let X of Z)if(o4.test(X))return"Unsafe argument: control characters are not allowed";return null}function bv(Z){if(!Z)return null;if(o4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function hv(Z){if(!Z)return{};for(let[X,q]of Object.entries(Z)){if(o4.test(X))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof q==="string"&&o4.test(q))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function fv(Z,X){if(typeof Z.signal==="string")return Z.signal;return String(X)}function s(Z,X,q={timeout:10*NQ*kQ,preserveOutputOnError:!0,useCwd:!0}){return Y2(Z,X,{abortSignal:q.abortSignal,timeout:q.timeout,preserveOutputOnError:q.preserveOutputOnError,cwd:q.useCwd?Z0():void 0,env:q.env,stdin:q.stdin,input:q.input})}function Y2(Z,X,{abortSignal:q,timeout:Q=10*NQ*kQ,preserveOutputOnError:$=!0,cwd:J,env:Y,maxBuffer:H=ez,stdin:U,input:G}={timeout:10*NQ*kQ,preserveOutputOnError:!0,maxBuffer:ez}){let W=Cv(Z);if(W)return Promise.resolve({stdout:"",stderr:"",code:1,error:W});let V=Sv(X);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=bv(J);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let z=hv(Y);if(z.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:z.error});return new Promise((_)=>{let R=G!==void 0?"pipe":U??"pipe",M=Z_.spawn(Z,X,{cwd:J,env:z.value,shell:!1,signal:q,stdio:[R,"pipe","pipe"]}),F=!1,N="",D="",w=0,T,j=!1,A=(x)=>{if(F)return;F=!0,_(x)},b=(x,E)=>{let f=typeof x==="string"?x:x.toString("utf8");if(w+=Buffer.byteLength(f,"utf8"),w>H){M.kill(),A({stdout:$?N:"",stderr:$?D:"",code:1,error:"maxBuffer exceeded"});return}if(E==="stdout")N+=f;else D+=f};M.stdout?.on("data",(x)=>b(x,"stdout")),M.stderr?.on("data",(x)=>b(x,"stderr")),M.once("spawn",()=>{if(R==="pipe"&&M.stdin)if(G!==void 0)M.stdin.end(G);else M.stdin.end()}),M.once("error",(x)=>{S(x),A({stdout:"",stderr:"",code:1,error:x.message})});let O=Q>0?setTimeout(()=>{j=!0,M.kill()},Q):void 0;M.once("close",(x,E)=>{if(O)clearTimeout(O);T=E??void 0;let f=x??1;if(j){A({stdout:$?N:"",stderr:$?D:"",code:f,error:`Command timed out after ${Q}ms`});return}if(f!==0){if($)A({stdout:N,stderr:D,code:f,error:fv({signal:T},f)});else A({stdout:"",stderr:"",code:f});return}A({stdout:N,stderr:D,code:0})})})}var Z_,kQ=1000,NQ=60,ez=1e6,o4,vv;var G5=B(()=>{G1();k0();QQ();Z_=Ev(_$(),1),o4=/[\0\r\n]/,vv=/^[A-Za-z0-9_.-]+$/});
|
|
206
|
+
export{de as P_,nB as Q_,d0 as R_,m4 as S_,w0 as T_,JQ as U_,M20 as V_,p5 as W_,V8 as X_,DJ as Y_,oK as Z_,sK as __,MX as $_,c2 as a$,P_ as b$,h1 as c$,M$ as d$,E_ as e$,F$ as f$,v_ as g$,I$ as h$,w$ as i$,G3 as j$,v$ as k$,M3 as l$,c$ as m$,a$ as n$,o$,Sy as p$,R1 as q$,$8 as r$,N0 as s$,dy as t$,D3 as u$,cy as v$,ly as w$,N6 as x$,e$ as y$,oy as z$,sy as A$,ZJ as B$,l2 as C$,FX as D$,tU as E$,C7 as F$,S7 as G$,eU as H$,ZG as I$,K0 as J$,Dw as K$,i2 as L$,yl as M$,J4 as N$,Ow as O$,kX as P$,_0 as Q$,kw as R$,a as S$,vw as T$,yw as U$,Cw as V$,Sw as W$,bw as X$,hw as Y$,G0 as Z$,ol as _$,U4 as $$,t1 as aaa,Zn as baa,Xn as caa,qn as daa,Qn as eaa,$n as faa,Jn as gaa,Yn as haa,Hn as iaa,Kn as jaa,Un as kaa,Gn as laa,m7 as maa,NX as naa,lw as oaa,U1 as paa,G4 as qaa,PX as raa,GG as saa,In as taa,m0 as uaa,s2 as vaa,Cn as waa,ow as xaa,Sn as yaa,BG as zaa,LG as Aaa,CX as Baa,dn as Caa,cn as Daa,ln as Eaa,W4 as Faa,Ui as Gaa,YO as Haa,Gi as Iaa,Wi as Jaa,Vi as Kaa,Bi as Laa,WG as Maa,Li as Naa,zi as Oaa,_i as Paa,Ri as Qaa,Mi as Raa,Fi as Saa,KO as Taa,Di as Uaa,Ai as Vaa,Ti as Waa,ji as Xaa,Z6 as Yaa,Ii as Zaa,wi as _aa,FG as $aa,Oi as aba,u7 as bba,fi as cba,gi as dba,rG as eba,rO as fba,tO as gba,eO as hba,ZW as iba,qW as jba,_$ as kba,u5 as lba,s as mba,Y2 as nba,G5 as oba,M4 as pba,QW as qba,Ba as rba,u0 as sba,Y6 as tba,$2 as uba,La as vba,za as wba,_a as xba,zW as yba,H6 as zba,J2 as Aba,kk as Bba,ya as Cba,Ca as Dba,r as Eba,xk as Fba,Sa as Gba,ba as Hba,OW as Iba,Pk as Jba,Ek as Kba,ha as Lba,Jq as Mba,vk as Nba,fa as Oba,yk as Pba,ga as Qba,ma as Rba,Ck as Sba,ua as Tba,Sk as Uba,bk as Vba,pa as Wba,da as Xba,ca as Yba,fk as Zba,la as _ba,na as $ba,D4 as aca,pk as bca,A4 as cca,T4 as dca,W5 as eca,ck as fca,lk as gca,ik as hca,CW as ica,SW as jca,dW as kca,cW as lca,WV as mca,VV as nca,DV as oca,AV as pca,ys as qca,Cs as rca,Ss as sca,hN as tca,R5 as uca,PV as vca,hs as wca,zq as xca,EV as yca,_q as zca,nN as Aca,vV as Bca,yV as Cca,os as Dca,ss as Eca,rs as Fca,ts as Gca,es as Hca,Zr as Ica,k4 as Jca,Xr as Kca,qr as Lca,Rq as Mca,$r as Nca,Jr as Oca,hV as Pca,Hr as Qca,fV as Rca,Kr as Sca,Zx as Tca,Ur as Uca,Xx as Vca,Gr as Wca,gV as Xca,mV as Yca,C1 as Zca,N4 as _ca,F5 as $ca,Dr as ada,Ar as bda,Tr as cda,jr as dda,Ir as eda,wr as fda,Or as gda,kr as hda,Nr as ida,xr as jda,Pr as kda,Er as lda,vr as mda,dV as nda,yr as oda,Cr as pda,Sr as qda,br as rda,hr as sda,fr as tda,gr as uda,mr as vda,cV as wda,Yx as xda,Hx as yda,Kx as zda,Ux as Ada,Gx as Bda,Wx as Cda,Vx as Dda,Bx as Eda,Lx as Fda,zx as Gda,nV as Hda,aV as Ida,oV as Jda,tV as Kda,tr as Lda,ZB as Mda,U2 as Nda,Ht as Oda,Fx as Pda,j5 as Qda,Ut as Rda,qB as Sda,I5 as Tda,zt as Uda,_t as Vda,Rt as Wda,JB as Xda,nx as Yda,Mt as Zda,Ft as _da,ax as $da,Dt as aea,GB as bea,At as cea,Tt as dea,jt as eea,WB as fea,wt as gea,w5 as hea,VB as iea,BB as jea,XP as kea,qP as lea,Nt as mea,xt as nea,Pt as oea,LB as pea,zB as qea,vt as rea,yt as sea,_B as tea,Iq as uea,RB as vea,MB as wea,bt as xea,FB as yea,W6 as zea,ut as Aea,DB as Bea,pt as Cea,AB as Dea,ct as Eea,TB as Fea,jB as Gea,lt as Hea,nt as Iea,it as Jea,at as Kea,ot as Lea,HP as Mea,st as Nea,Oq as Oea,He as Pea,PB as Qea,EB as Rea,C0 as Sea,De as Tea,Ae as Uea,Te as Vea,P4 as Wea,be as Xea,yq as Yea,Q00 as Zea,y5 as _ea,C5 as $ea,$00 as afa,J00 as bfa,rB as cfa,lq as dfa,C00 as efa,v4 as ffa,tB as gfa,b5 as hfa,UL as ifa,p as jfa,S00 as kfa,b00 as lfa,G2 as mfa,h00 as nfa,nq as ofa,f00 as pfa,OP as qfa,g00 as rfa,m00 as sfa,u00 as tfa,p00 as ufa,d00 as vfa,kP as wfa,NP as xfa,xP as yfa,EP as zfa,c00 as Afa,WL as Bfa,FL as Cfa,U10 as Dfa,gP as Efa,G10 as Ffa,S4 as Gfa,TL as Hfa,W10 as Ifa,aq as Jfa,oq as Kfa,jL as Lfa,rq as Mfa,f5 as Nfa,OL as Ofa,nP as Pfa,z10 as Qfa,_10 as Rfa,kL as Sfa,R0 as Tfa,PL as Ufa,f4 as Vfa,ZE as Wfa,qE as Xfa,QE as Yfa,CL as Zfa,SL as _fa,bL as $fa,YE as aga,HE as bga,hL as cga,KE as dga,UE as ega,GE as fga,WE as gga,VE as hga,BE as iga,LE as jga,ZQ as kga,g5 as lga,mL as mga,XQ as nga,o10 as oga,p0 as pga,s10 as qga,z1 as rga,r10 as sga,jE as tga,t10 as uga,IE as vga,e10 as wga,Z20 as xga,X20 as yga,q20 as zga,wE as Aga,OE as Bga,Q20 as Cga,kE as Dga,$20 as Ega,J20 as Fga,Y20 as Gga,NE as Hga,aL as Iga,O20 as Jga,eL as Kga,Yz as Lga,Hz as Mga,r20 as Nga,t20 as Oga,e20 as Pga,h as Qga,WQ as Rga,Z60 as Sga,c0 as Tga,X60 as Uga,Uz as Vga,BQ as Wga,pE as Xga,Lz as Yga,K60 as Zga,U60 as _ga,zz as $ga,zQ as aha,aE as bha,R60 as cha,M60 as dha,F60 as eha,Iz as fha,D60 as gha,A60 as hha,Hv as iha,Dz as jha,FQ as kha,T60 as lha,j60 as mha,I60 as nha,w60 as oha,Uv as pha,Gv as qha,O60 as rha,Pz as sha,r5 as tha,vz as uha,n4 as vha,Lv as wha,zv as xha,V2 as yha,yz as zha,Cz as Aha,pz as Bha,dz as Cha,lz as Dha,nz as Eha,l60 as Fha,iz as Gha,J40 as Hha,Ov as Iha,Y40 as Jha,S as Kha,K40 as Lha,xv as Mha,U40 as Nha,G40 as Oha,W40 as Pha,V40 as Qha,B40 as Rha,k0 as Sha};
|