@claudiolabs/claudin 0.5.9 → 0.5.10
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/bin/claudin +62 -0
- package/dist/chunks/AgentTool-0.5.10-k5mymxpj.mjs +1 -0
- package/dist/chunks/App-0.5.10-yzg0d70f.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.5.10-mpm24aq5.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-0.5.10-jbgn5s9r.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-0.5.10-tk2jpgdr.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.5.10-2gqvp73t.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.5.10-mwwqh2cz.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.5.10-f4wd3yew.mjs +1 -0
- package/dist/chunks/DiffDialog-0.5.10-f28xdhns.mjs +3 -0
- package/dist/chunks/Doctor-0.5.10-dz3ndek3.mjs +1 -0
- package/dist/chunks/Grove-0.5.10-f2m596r7.mjs +1 -0
- package/dist/chunks/ITermBackend-0.5.10-k9sjxv27.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-0.5.10-d5f0ba3j.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.5.10-vyexdzf7.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.5.10-fxhfd566.mjs +1 -0
- package/dist/chunks/Onboarding-0.5.10-61c4a01v.mjs +1 -0
- package/dist/chunks/ProviderManager-0.5.10-mhnze07c.mjs +1 -0
- package/dist/chunks/REPL-0.5.10-qag06ykw.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.5.10-ax66yat2.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-0.5.10-mkzs7881.mjs +1 -0
- package/dist/chunks/TeleportProgress-0.5.10-762m6e6b.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.5.10-mr8ddjsn.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.5.10-rs9vs3j0.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.5.10-s7yrx34h.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.5.10-8tejm808.mjs +1 -0
- package/dist/chunks/TrustDialog-0.5.10-v09an4xe.mjs +1 -0
- package/dist/chunks/activeProvider-0.5.10-1c68rtzb.mjs +1 -0
- package/dist/chunks/add-dir-0.5.10-6hyjyege.mjs +1 -0
- package/dist/chunks/agents-0.5.10-34zhsd0m.mjs +110 -0
- package/dist/chunks/agents-0.5.10-fa6mrf84.mjs +3 -0
- package/dist/chunks/api-0.5.10-hvafwq9b.mjs +1 -0
- package/dist/chunks/asciicast-0.5.10-c2nfaps4.mjs +1 -0
- package/dist/chunks/assistant-0.5.10-w55twa4a.mjs +1 -0
- package/dist/chunks/auth-0.5.10-dmv8dcy1.mjs +1 -0
- package/dist/chunks/auth-0.5.10-tqm37j6k.mjs +1 -0
- package/dist/chunks/autoMode-0.5.10-bew44c3j.mjs +48 -0
- package/dist/chunks/autoUpdater-0.5.10-dav9gs0x.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-0.5.10-rsyjn0x7.mjs +1 -0
- package/dist/chunks/branch-0.5.10-k81z6new.mjs +4 -0
- package/dist/chunks/bridgePointer-0.5.10-h727df9t.mjs +1 -0
- package/dist/chunks/btw-0.5.10-f1syxkz1.mjs +1 -0
- package/dist/chunks/buddy-0.5.10-a15r3a8e.mjs +3 -0
- package/dist/chunks/cacache-0.5.10-1hz9d6s8.mjs +1 -0
- package/dist/chunks/cache-probe-0.5.10-fcxj2wy5.mjs +21 -0
- package/dist/chunks/cacheStats-0.5.10-vedv1qp4.mjs +4 -0
- package/dist/chunks/caches-0.5.10-fmadrqb1.mjs +1 -0
- package/dist/chunks/claudeDesktop-0.5.10-mz1s1yqp.mjs +1 -0
- package/dist/chunks/claudemd-0.5.10-9mb95kbb.mjs +1 -0
- package/dist/chunks/clear-0.5.10-tshbmj0g.mjs +1 -0
- package/dist/chunks/clearTerminal-0.5.10-bjqnvfmf.mjs +1 -0
- package/dist/chunks/cli-0.5.10-0ar26ct8.mjs +2 -0
- package/dist/chunks/cli-0.5.10-0p24d24e.mjs +2 -0
- package/dist/chunks/cli-0.5.10-0sg20shr.mjs +2 -0
- package/dist/chunks/cli-0.5.10-0twjtft5.mjs +2 -0
- package/dist/chunks/cli-0.5.10-0vs5gmpe.mjs +4 -0
- package/dist/chunks/cli-0.5.10-0xb1405m.mjs +2 -0
- package/dist/chunks/cli-0.5.10-0yn5x3m6.mjs +2 -0
- package/dist/chunks/cli-0.5.10-1gafefn2.mjs +3 -0
- package/dist/chunks/cli-0.5.10-207502x5.mjs +2 -0
- package/dist/chunks/cli-0.5.10-20w5v1ja.mjs +2 -0
- package/dist/chunks/cli-0.5.10-20x96vwq.mjs +2 -0
- package/dist/chunks/cli-0.5.10-2c19pn7b.mjs +2 -0
- package/dist/chunks/cli-0.5.10-2es9q9n1.mjs +2 -0
- package/dist/chunks/cli-0.5.10-2fqes7gy.mjs +193 -0
- package/dist/chunks/cli-0.5.10-2qxn5ad9.mjs +2 -0
- package/dist/chunks/cli-0.5.10-2yqdkew6.mjs +3 -0
- package/dist/chunks/cli-0.5.10-2yrgbmd1.mjs +9 -0
- package/dist/chunks/cli-0.5.10-347yjq4a.mjs +2 -0
- package/dist/chunks/cli-0.5.10-3xnh04c6.mjs +2 -0
- package/dist/chunks/cli-0.5.10-4ekf1v4x.mjs +2 -0
- package/dist/chunks/cli-0.5.10-58erwwbz.mjs +3 -0
- package/dist/chunks/cli-0.5.10-5m76kmzk.mjs +2 -0
- package/dist/chunks/cli-0.5.10-5mp7dx81.mjs +2 -0
- package/dist/chunks/cli-0.5.10-5nzsgwh2.mjs +2 -0
- package/dist/chunks/cli-0.5.10-5stz3dbm.mjs +2 -0
- package/dist/chunks/cli-0.5.10-5w3eaafz.mjs +2 -0
- package/dist/chunks/cli-0.5.10-661g0gft.mjs +2 -0
- package/dist/chunks/cli-0.5.10-68wvhytx.mjs +10 -0
- package/dist/chunks/cli-0.5.10-6c055y30.mjs +2 -0
- package/dist/chunks/cli-0.5.10-6g0257t2.mjs +2 -0
- package/dist/chunks/cli-0.5.10-6jarntdq.mjs +2 -0
- package/dist/chunks/cli-0.5.10-6twsf5qs.mjs +2 -0
- package/dist/chunks/cli-0.5.10-6wzddpjt.mjs +42 -0
- package/dist/chunks/cli-0.5.10-6y9d3fye.mjs +45 -0
- package/dist/chunks/cli-0.5.10-6z4j2qja.mjs +24 -0
- package/dist/chunks/cli-0.5.10-6zwxmza2.mjs +4 -0
- package/dist/chunks/cli-0.5.10-7f5q1zvk.mjs +2 -0
- package/dist/chunks/cli-0.5.10-7j4590js.mjs +2 -0
- package/dist/chunks/cli-0.5.10-7shp24xv.mjs +3 -0
- package/dist/chunks/cli-0.5.10-7tpa30tv.mjs +3 -0
- package/dist/chunks/cli-0.5.10-84q7z5hq.mjs +2 -0
- package/dist/chunks/cli-0.5.10-84z0ztsf.mjs +18 -0
- package/dist/chunks/cli-0.5.10-87sd2pqh.mjs +3 -0
- package/dist/chunks/cli-0.5.10-8f53zcp3.mjs +2 -0
- package/dist/chunks/cli-0.5.10-8jjacn05.mjs +5262 -0
- package/dist/chunks/cli-0.5.10-8kpt6897.mjs +3 -0
- package/dist/chunks/cli-0.5.10-8wqagr68.mjs +4 -0
- package/dist/chunks/cli-0.5.10-8zwd1xme.mjs +25 -0
- package/dist/chunks/cli-0.5.10-948wwm63.mjs +2 -0
- package/dist/chunks/cli-0.5.10-9dazv3hg.mjs +2 -0
- package/dist/chunks/cli-0.5.10-9ek8f4vk.mjs +2 -0
- package/dist/chunks/cli-0.5.10-9h23hhgb.mjs +2 -0
- package/dist/chunks/cli-0.5.10-9mt7ynrh.mjs +2 -0
- package/dist/chunks/cli-0.5.10-9xc8zhxg.mjs +59 -0
- package/dist/chunks/cli-0.5.10-9ynpb3y0.mjs +21 -0
- package/dist/chunks/cli-0.5.10-a1hh6v31.mjs +2 -0
- package/dist/chunks/cli-0.5.10-a38pnxbz.mjs +2 -0
- package/dist/chunks/cli-0.5.10-a8ecfnq0.mjs +2 -0
- package/dist/chunks/cli-0.5.10-atkghjt0.mjs +2 -0
- package/dist/chunks/cli-0.5.10-ax0fmeqk.mjs +2 -0
- package/dist/chunks/cli-0.5.10-azhfv28d.mjs +2 -0
- package/dist/chunks/cli-0.5.10-b4j3x063.mjs +4 -0
- package/dist/chunks/cli-0.5.10-b761m5q2.mjs +2 -0
- package/dist/chunks/cli-0.5.10-b7r8mjbd.mjs +9 -0
- package/dist/chunks/cli-0.5.10-ba15gakh.mjs +2 -0
- package/dist/chunks/cli-0.5.10-bad3yv4c.mjs +2 -0
- package/dist/chunks/cli-0.5.10-bhb8rt9y.mjs +2 -0
- package/dist/chunks/cli-0.5.10-bj0bm26b.mjs +4 -0
- package/dist/chunks/cli-0.5.10-bmc43e4g.mjs +2 -0
- package/dist/chunks/cli-0.5.10-bsqvacka.mjs +2 -0
- package/dist/chunks/cli-0.5.10-c0xtw3q0.mjs +34 -0
- package/dist/chunks/cli-0.5.10-c82cgdm7.mjs +133 -0
- package/dist/chunks/cli-0.5.10-c9z4tdw2.mjs +2 -0
- package/dist/chunks/cli-0.5.10-cm0r4pkd.mjs +3 -0
- package/dist/chunks/cli-0.5.10-cw4ykvbj.mjs +2 -0
- package/dist/chunks/cli-0.5.10-cz6csv1p.mjs +2 -0
- package/dist/chunks/cli-0.5.10-d1y749qy.mjs +2 -0
- package/dist/chunks/cli-0.5.10-d2cw91xn.mjs +3 -0
- package/dist/chunks/cli-0.5.10-d4d9x2de.mjs +2 -0
- package/dist/chunks/cli-0.5.10-d609fanf.mjs +2 -0
- package/dist/chunks/cli-0.5.10-d64hr722.mjs +3 -0
- package/dist/chunks/cli-0.5.10-d9xf1jnz.mjs +12 -0
- package/dist/chunks/cli-0.5.10-dkt8bbmm.mjs +3 -0
- package/dist/chunks/cli-0.5.10-dmmckmyf.mjs +12 -0
- package/dist/chunks/cli-0.5.10-dvmddb7c.mjs +6 -0
- package/dist/chunks/cli-0.5.10-dz26120x.mjs +2 -0
- package/dist/chunks/cli-0.5.10-dzr8kmx4.mjs +2 -0
- package/dist/chunks/cli-0.5.10-e8tz9596.mjs +2 -0
- package/dist/chunks/cli-0.5.10-e8wz8kc0.mjs +58 -0
- package/dist/chunks/cli-0.5.10-eh9hq9n3.mjs +2 -0
- package/dist/chunks/cli-0.5.10-ewcdy4pj.mjs +2 -0
- package/dist/chunks/cli-0.5.10-f3fj7f3q.mjs +2 -0
- package/dist/chunks/cli-0.5.10-fcbrnw81.mjs +2 -0
- package/dist/chunks/cli-0.5.10-fjvz4bt0.mjs +8 -0
- package/dist/chunks/cli-0.5.10-fzx10svb.mjs +2 -0
- package/dist/chunks/cli-0.5.10-g4khh98h.mjs +2 -0
- package/dist/chunks/cli-0.5.10-gekw3xnm.mjs +2 -0
- package/dist/chunks/cli-0.5.10-gk9n4zev.mjs +2 -0
- package/dist/chunks/cli-0.5.10-gs8dx67v.mjs +2 -0
- package/dist/chunks/cli-0.5.10-hmp23q7z.mjs +2 -0
- package/dist/chunks/cli-0.5.10-hzh8tpg0.mjs +2 -0
- package/dist/chunks/cli-0.5.10-j1aznw8b.mjs +2 -0
- package/dist/chunks/cli-0.5.10-jd7ff66n.mjs +2 -0
- package/dist/chunks/cli-0.5.10-jhtht51h.mjs +4 -0
- package/dist/chunks/cli-0.5.10-jsnrvena.mjs +2 -0
- package/dist/chunks/cli-0.5.10-k0mnqs0g.mjs +15 -0
- package/dist/chunks/cli-0.5.10-k1s62rww.mjs +2 -0
- package/dist/chunks/cli-0.5.10-k3qbvfj5.mjs +2 -0
- package/dist/chunks/cli-0.5.10-kj2g5r8c.mjs +15 -0
- package/dist/chunks/cli-0.5.10-kyt82zt5.mjs +2 -0
- package/dist/chunks/cli-0.5.10-m0hghx42.mjs +2 -0
- package/dist/chunks/cli-0.5.10-mcw01p8b.mjs +2 -0
- package/dist/chunks/cli-0.5.10-mgkc1jay.mjs +15 -0
- package/dist/chunks/cli-0.5.10-mrgw2c00.mjs +2 -0
- package/dist/chunks/cli-0.5.10-mvckg6zv.mjs +17 -0
- package/dist/chunks/cli-0.5.10-mxzdkm6r.mjs +2 -0
- package/dist/chunks/cli-0.5.10-n70d8n1f.mjs +2 -0
- package/dist/chunks/cli-0.5.10-neaex6bh.mjs +2 -0
- package/dist/chunks/cli-0.5.10-npmmxjts.mjs +5 -0
- package/dist/chunks/cli-0.5.10-nqvng39w.mjs +2 -0
- package/dist/chunks/cli-0.5.10-nvmq8pez.mjs +2 -0
- package/dist/chunks/cli-0.5.10-nx3m5sa2.mjs +2 -0
- package/dist/chunks/cli-0.5.10-p3g04417.mjs +20 -0
- package/dist/chunks/cli-0.5.10-p4wmnjhz.mjs +6 -0
- package/dist/chunks/cli-0.5.10-p5j82v0t.mjs +2 -0
- package/dist/chunks/cli-0.5.10-p7jd1z33.mjs +2 -0
- package/dist/chunks/cli-0.5.10-p8hbe96w.mjs +133 -0
- package/dist/chunks/cli-0.5.10-pk91q3s6.mjs +4 -0
- package/dist/chunks/cli-0.5.10-pq8nhdeq.mjs +2 -0
- package/dist/chunks/cli-0.5.10-pr0nkqpw.mjs +2 -0
- package/dist/chunks/cli-0.5.10-pr8yqs5v.mjs +2 -0
- package/dist/chunks/cli-0.5.10-pxhw9mwz.mjs +2 -0
- package/dist/chunks/cli-0.5.10-qvp1fb5n.mjs +2 -0
- package/dist/chunks/cli-0.5.10-qw9y3mst.mjs +2 -0
- package/dist/chunks/cli-0.5.10-qx17jbqj.mjs +2 -0
- package/dist/chunks/cli-0.5.10-r0jt3zrj.mjs +2 -0
- package/dist/chunks/cli-0.5.10-rhmrff22.mjs +2 -0
- package/dist/chunks/cli-0.5.10-rk7at2tn.mjs +2 -0
- package/dist/chunks/cli-0.5.10-rq5mv7xq.mjs +2 -0
- package/dist/chunks/cli-0.5.10-rwqvbtg3.mjs +18 -0
- package/dist/chunks/cli-0.5.10-rxnwkka5.mjs +24 -0
- package/dist/chunks/cli-0.5.10-rzshk2m6.mjs +6 -0
- package/dist/chunks/cli-0.5.10-rzz4tgvw.mjs +12 -0
- package/dist/chunks/cli-0.5.10-s8bv5q7m.mjs +2 -0
- package/dist/chunks/cli-0.5.10-srd78kpc.mjs +7 -0
- package/dist/chunks/cli-0.5.10-syb1bnb2.mjs +4 -0
- package/dist/chunks/cli-0.5.10-t11my4jb.mjs +2 -0
- package/dist/chunks/cli-0.5.10-t9d916t1.mjs +39 -0
- package/dist/chunks/cli-0.5.10-tbpqmp1s.mjs +2 -0
- package/dist/chunks/cli-0.5.10-tkjtbv56.mjs +2 -0
- package/dist/chunks/cli-0.5.10-tqpg21eq.mjs +2 -0
- package/dist/chunks/cli-0.5.10-tqyytkxn.mjs +2 -0
- package/dist/chunks/cli-0.5.10-tr692cqd.mjs +2 -0
- package/dist/chunks/cli-0.5.10-v36c5nnr.mjs +2 -0
- package/dist/chunks/cli-0.5.10-v6kj3ej2.mjs +2 -0
- package/dist/chunks/cli-0.5.10-vhn14p7a.mjs +2 -0
- package/dist/chunks/cli-0.5.10-vhrqqvdz.mjs +5 -0
- package/dist/chunks/cli-0.5.10-vpfctkxf.mjs +2 -0
- package/dist/chunks/cli-0.5.10-vqkn3pgf.mjs +17 -0
- package/dist/chunks/cli-0.5.10-vqrqhas6.mjs +2 -0
- package/dist/chunks/cli-0.5.10-vyem3gpm.mjs +2 -0
- package/dist/chunks/cli-0.5.10-w29mv5e9.mjs +4 -0
- package/dist/chunks/cli-0.5.10-w41wxn5f.mjs +50 -0
- package/dist/chunks/cli-0.5.10-w698y5mp.mjs +5 -0
- package/dist/chunks/cli-0.5.10-w93v7bhm.mjs +2 -0
- package/dist/chunks/cli-0.5.10-xfqxbzc6.mjs +4 -0
- package/dist/chunks/cli-0.5.10-xg27xawf.mjs +2 -0
- package/dist/chunks/cli-0.5.10-xhy1yx61.mjs +2 -0
- package/dist/chunks/cli-0.5.10-xk6v4sy0.mjs +2 -0
- package/dist/chunks/cli-0.5.10-xnmg1qwd.mjs +2 -0
- package/dist/chunks/cli-0.5.10-xrwj7982.mjs +67 -0
- package/dist/chunks/cli-0.5.10-xy780m03.mjs +2 -0
- package/dist/chunks/cli-0.5.10-xyscak5q.mjs +16 -0
- package/dist/chunks/cli-0.5.10-y0sfzz9t.mjs +2 -0
- package/dist/chunks/cli-0.5.10-y0sr20nf.mjs +2 -0
- package/dist/chunks/cli-0.5.10-y4tn070k.mjs +1 -0
- package/dist/chunks/cli-0.5.10-y7j4tsb5.mjs +2 -0
- package/dist/chunks/cli-0.5.10-y9qd4psg.mjs +2 -0
- package/dist/chunks/cli-0.5.10-ytqna8q4.mjs +2 -0
- package/dist/chunks/cli-0.5.10-yvjnvgky.mjs +2 -0
- package/dist/chunks/cli-0.5.10-yxxbgd59.mjs +2 -0
- package/dist/chunks/cli-0.5.10-yzqkgb55.mjs +2 -0
- package/dist/chunks/cli-0.5.10-z4bzn8vh.mjs +2 -0
- package/dist/chunks/cli-0.5.10-z5ysspq8.mjs +2 -0
- package/dist/chunks/cli-0.5.10-zk1h67jm.mjs +2 -0
- package/dist/chunks/client-0.5.10-a5rmwz53.mjs +1 -0
- package/dist/chunks/color-0.5.10-3mtfm5rv.mjs +1 -0
- package/dist/chunks/compact-0.5.10-7zdm8hke.mjs +3 -0
- package/dist/chunks/config-0.5.10-ns9jcqxp.mjs +1 -0
- package/dist/chunks/config-0.5.10-vtf1kzhz.mjs +1 -0
- package/dist/chunks/context-0.5.10-qjjyyqx9.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.5.10-244bgmbj.mjs +1 -0
- package/dist/chunks/conversation-0.5.10-zza66sgq.mjs +1 -0
- package/dist/chunks/copy-0.5.10-d6nstaxy.mjs +9 -0
- package/dist/chunks/cost-0.5.10-k89r76j7.mjs +1 -0
- package/dist/chunks/createSSHSession-0.5.10-xy3z3tdw.mjs +1 -0
- package/dist/chunks/createSession-0.5.10-ntrenxk4.mjs +1 -0
- package/dist/chunks/debug-0.5.10-bxkhvfc6.mjs +1 -0
- package/dist/chunks/defaultActionDeps-0.5.10-h673vq05.mjs +1177 -0
- package/dist/chunks/desktop-0.5.10-v0j5w6e8.mjs +1 -0
- package/dist/chunks/detectRepository-0.5.10-z29dy30r.mjs +1 -0
- package/dist/chunks/detection-0.5.10-jhy1kffq.mjs +1 -0
- package/dist/chunks/diff-0.5.10-14m8b77v.mjs +1 -0
- package/dist/chunks/doctor-0.5.10-pn374er7.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-0.5.10-wkjtp4z5.mjs +1 -0
- package/dist/chunks/earlyInput-0.5.10-9nxfn64h.mjs +1 -0
- package/dist/chunks/effort-0.5.10-sjn55ka6.mjs +10 -0
- package/dist/chunks/envUtils-0.5.10-sdrg5j2r.mjs +1 -0
- package/dist/chunks/environmentSelection-0.5.10-nkxtjsa6.mjs +1 -0
- package/dist/chunks/environments-0.5.10-j3cwt63g.mjs +1 -0
- package/dist/chunks/errors-0.5.10-k3a2vs5j.mjs +1 -0
- package/dist/chunks/exampleCommands-0.5.10-s4q3ndpx.mjs +1 -0
- package/dist/chunks/exit-0.5.10-aaqjsrb3.mjs +1 -0
- package/dist/chunks/export-0.5.10-g3n84jha.mjs +2 -0
- package/dist/chunks/extra-usage-0.5.10-1k8453hn.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.5.10-h0s4j23t.mjs +1 -0
- package/dist/chunks/fast-0.5.10-6jg8q83t.mjs +1 -0
- package/dist/chunks/feedback-0.5.10-f4cms77n.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-0.5.10-mtcdee5x.mjs +1 -0
- package/dist/chunks/git-0.5.10-5yr5z4ap.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.5.10-pfeadzx7.mjs +1 -0
- package/dist/chunks/grove-0.5.10-4vzycmmm.mjs +1 -0
- package/dist/chunks/growthbook-0.5.10-nf8eqz7k.mjs +1 -0
- package/dist/chunks/headless-0.5.10-kqpgc4q6.mjs +2 -0
- package/dist/chunks/heapdump-0.5.10-zedkfpnn.mjs +6 -0
- package/dist/chunks/help-0.5.10-a3vhmv05.mjs +1 -0
- package/dist/chunks/hookChains-0.5.10-yc93jx3d.mjs +3 -0
- package/dist/chunks/hooks-0.5.10-negsdbpw.mjs +1 -0
- package/dist/chunks/hooks-0.5.10-t26wz67x.mjs +79 -0
- package/dist/chunks/ide-0.5.10-qsh8k0we.mjs +3 -0
- package/dist/chunks/image-processor-napi-0.5.10-8kz0m2nd.mjs +1 -0
- package/dist/chunks/index-0.5.10-0j9kz8a6.mjs +1 -0
- package/dist/chunks/index-0.5.10-0wzdjjzk.mjs +5 -0
- package/dist/chunks/index-0.5.10-5fsxcv9a.mjs +1 -0
- package/dist/chunks/index-0.5.10-6v1h8fb2.mjs +17 -0
- package/dist/chunks/index-0.5.10-7t36m4fw.mjs +30 -0
- package/dist/chunks/index-0.5.10-8t5phmpa.mjs +9 -0
- package/dist/chunks/index-0.5.10-ak9fnp4h.mjs +2 -0
- package/dist/chunks/index-0.5.10-asj7h5d6.mjs +9 -0
- package/dist/chunks/index-0.5.10-dxkhh5bg.mjs +1 -0
- package/dist/chunks/index-0.5.10-eh8w8ayw.mjs +2 -0
- package/dist/chunks/index-0.5.10-fjf8d5vq.mjs +1 -0
- package/dist/chunks/index-0.5.10-fyt0d84h.mjs +1 -0
- package/dist/chunks/index-0.5.10-m8cjzf6y.mjs +1 -0
- package/dist/chunks/index-0.5.10-marrtwvx.mjs +1 -0
- package/dist/chunks/index-0.5.10-n7zsm7mc.mjs +1 -0
- package/dist/chunks/index-0.5.10-p69q9n6x.mjs +1 -0
- package/dist/chunks/index-0.5.10-rv6kfzr0.mjs +1 -0
- package/dist/chunks/index-0.5.10-s5ttsdnm.mjs +1 -0
- package/dist/chunks/index-0.5.10-thyhdy51.mjs +1 -0
- package/dist/chunks/index-0.5.10-tncm271j.mjs +1 -0
- package/dist/chunks/index-0.5.10-wzxzkrhk.mjs +1 -0
- package/dist/chunks/index-0.5.10-x3apane6.mjs +1 -0
- package/dist/chunks/init-0.5.10-ef7yaw4p.mjs +1 -0
- package/dist/chunks/initReplBridge-0.5.10-we7sga8z.mjs +1 -0
- package/dist/chunks/ink-0.5.10-chpcjhk0.mjs +1 -0
- package/dist/chunks/insights-0.5.10-advkjwjk.mjs +870 -0
- package/dist/chunks/install-0.5.10-znt3x5wn.mjs +1 -0
- package/dist/chunks/install-github-app-0.5.10-jg0eqhv0.mjs +149 -0
- package/dist/chunks/install-slack-app-0.5.10-ryvy8j96.mjs +1 -0
- package/dist/chunks/instrumentation-0.5.10-36atfc3f.mjs +1 -0
- package/dist/chunks/interactiveHelpers-0.5.10-asvens6h.mjs +1 -0
- package/dist/chunks/keybindings-0.5.10-csc1yzpg.mjs +2 -0
- package/dist/chunks/knowledge-0.5.10-tg7cvbym.mjs +2 -0
- package/dist/chunks/latestVersionCache-0.5.10-wjt7dbqy.mjs +1 -0
- package/dist/chunks/loadAgentsDir-0.5.10-7zwxynjb.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.5.10-c8kk1n2h.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.5.10-qx8rwccw.mjs +1 -0
- package/dist/chunks/log-0.5.10-ews8b6yn.mjs +1 -0
- package/dist/chunks/main-0.5.10-dxwhwf46.mjs +1 -0
- package/dist/chunks/managedEnv-0.5.10-5jce9mqj.mjs +1 -0
- package/dist/chunks/mcp-0.5.10-1wxhgtsr.mjs +17 -0
- package/dist/chunks/mcp-0.5.10-5wsj8fv2.mjs +1 -0
- package/dist/chunks/mcp-0.5.10-ydcjrb4p.mjs +4 -0
- package/dist/chunks/mcpb-0.5.10-120rqrb1.mjs +1 -0
- package/dist/chunks/memory-0.5.10-0pqjdjed.mjs +3 -0
- package/dist/chunks/mobile-0.5.10-kp63nfej.mjs +2 -0
- package/dist/chunks/model-0.5.10-9zszn74v.mjs +2 -0
- package/dist/chunks/model-0.5.10-b64fg4gd.mjs +1 -0
- package/dist/chunks/node-0.5.10-tny076t5.mjs +12 -0
- package/dist/chunks/oauth-0.5.10-fccp2x7y.mjs +1 -0
- package/dist/chunks/openaiShim-0.5.10-gwjyjn7m.mjs +14 -0
- package/dist/chunks/output-style-0.5.10-526tregy.mjs +1 -0
- package/dist/chunks/package-D6422PQU-0.5.10-we8amhca.mjs +1 -0
- package/dist/chunks/parseConnectUrl-0.5.10-nhkxeakd.mjs +1 -0
- package/dist/chunks/parser-0.5.10-m4aj9jm7.mjs +1 -0
- package/dist/chunks/passes-0.5.10-vwhmhxn9.mjs +1 -0
- package/dist/chunks/permissions-0.5.10-b7p2zxt8.mjs +3 -0
- package/dist/chunks/plan-0.5.10-s8612fw1.mjs +1 -0
- package/dist/chunks/plist-0.5.10-e8k2gtwm.mjs +1 -0
- package/dist/chunks/plugin-0.5.10-pjh90f93.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.5.10-mamzxaj6.mjs +1 -0
- package/dist/chunks/plugins-0.5.10-3zq96m7k.mjs +9 -0
- package/dist/chunks/preActionHook-0.5.10-6x12np60.mjs +2 -0
- package/dist/chunks/print-0.5.10-5a31vx9j.mjs +57 -0
- package/dist/chunks/privacy-settings-0.5.10-rdfd63af.mjs +1 -0
- package/dist/chunks/process-0.5.10-nf4cmk34.mjs +1 -0
- package/dist/chunks/processBashCommand-0.5.10-mw974xep.mjs +1 -0
- package/dist/chunks/processSlashCommand-0.5.10-e8c6n292.mjs +9 -0
- package/dist/chunks/prompt-0.5.10-6pbxq1g3.mjs +1 -0
- package/dist/chunks/prompt-0.5.10-n31de4d4.mjs +1 -0
- package/dist/chunks/prompts-0.5.10-0cxg5rvf.mjs +1 -0
- package/dist/chunks/protocolHandler-0.5.10-n15zj80n.mjs +13 -0
- package/dist/chunks/provider-0.5.10-0chtqqq3.mjs +2 -0
- package/dist/chunks/providerProfiles-0.5.10-kk39f15h.mjs +1 -0
- package/dist/chunks/providerValidation-0.5.10-5b2bmm6k.mjs +6 -0
- package/dist/chunks/rate-limit-options-0.5.10-qen28djd.mjs +1 -0
- package/dist/chunks/registerSubcommands-0.5.10-xmgpzx1a.mjs +34 -0
- package/dist/chunks/registry-0.5.10-q3yb1jt6.mjs +1 -0
- package/dist/chunks/release-notes-0.5.10-3m0mwzvq.mjs +5 -0
- package/dist/chunks/reload-plugins-0.5.10-2ngnamq3.mjs +2 -0
- package/dist/chunks/remote-env-0.5.10-gm9a4ms5.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-0.5.10-s9tnpv93.mjs +1 -0
- package/dist/chunks/remoteSession-0.5.10-mk8be8a3.mjs +1 -0
- package/dist/chunks/rename-0.5.10-9ecwm2ar.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.5.10-9956kd4a.mjs +1 -0
- package/dist/chunks/replLauncher-0.5.10-94wyag0m.mjs +1 -0
- package/dist/chunks/resume-0.5.10-nc3z5h15.mjs +2 -0
- package/dist/chunks/rewind-0.5.10-wbs4stfg.mjs +1 -0
- package/dist/chunks/rootOptions-0.5.10-8ky1y6hv.mjs +1 -0
- package/dist/chunks/sandbox-adapter-0.5.10-jg0fj7ss.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.5.10-yy9272d9.mjs +1 -0
- package/dist/chunks/session-0.5.10-jqzxp3r3.mjs +2 -0
- package/dist/chunks/sessionDiscovery-0.5.10-7va0srxq.mjs +1 -0
- package/dist/chunks/sessionFileAccessHooks-0.5.10-bykpya1w.mjs +1 -0
- package/dist/chunks/sessionStorage-0.5.10-yy69cv78.mjs +1 -0
- package/dist/chunks/settings-0.5.10-kx3ep0z5.mjs +1 -0
- package/dist/chunks/setup-0.5.10-w0byw3fs.mjs +5 -0
- package/dist/chunks/sinks-0.5.10-289qngp8.mjs +1 -0
- package/dist/chunks/skills-0.5.10-6kvsqc69.mjs +1 -0
- package/dist/chunks/startupProfiler-0.5.10-e0mg4v8r.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-0.5.10-08eextv5.mjs +1 -0
- package/dist/chunks/state-0.5.10-7xqjnrdw.mjs +1 -0
- package/dist/chunks/stats-0.5.10-fafdyc91.mjs +6 -0
- package/dist/chunks/status-0.5.10-y9t6rf31.mjs +1 -0
- package/dist/chunks/stickers-0.5.10-ta1pq624.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.5.10-zv2wcv5q.mjs +1 -0
- package/dist/chunks/tasks-0.5.10-d0y0wvjj.mjs +1 -0
- package/dist/chunks/teamHelpers-0.5.10-qpwpfv94.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.5.10-92d1devr.mjs +1 -0
- package/dist/chunks/teleport-0.5.10-rkxj6c9z.mjs +1 -0
- package/dist/chunks/terminalSetup-0.5.10-xtrfcff1.mjs +1 -0
- package/dist/chunks/theme-0.5.10-5rz8k2g9.mjs +1 -0
- package/dist/chunks/thinkback-0.5.10-pmdfhfhz.mjs +1 -0
- package/dist/chunks/thinkback-play-0.5.10-051qtb4m.mjs +1 -0
- package/dist/chunks/toolPool-0.5.10-702w7qvh.mjs +1 -0
- package/dist/chunks/toolSearch-0.5.10-emqjgdkv.mjs +1 -0
- package/dist/chunks/tools-0.5.10-2msmk0nf.mjs +1 -0
- package/dist/chunks/trustedDevice-0.5.10-rc23c6gy.mjs +1 -0
- package/dist/chunks/turndown.cjs-0.5.10-a87sftz7.mjs +69 -0
- package/dist/chunks/ultrareviewCommand-0.5.10-z29nftnt.mjs +4 -0
- package/dist/chunks/update-0.5.10-52yyras3.mjs +86 -0
- package/dist/chunks/upgrade-0.5.10-xqdpemsf.mjs +1 -0
- package/dist/chunks/upstreamproxy-0.5.10-154q742m.mjs +14 -0
- package/dist/chunks/url-handler-napi-0.5.10-8af5etcc.mjs +1 -0
- package/dist/chunks/usage-0.5.10-hhg47trs.mjs +1 -0
- package/dist/chunks/util-0.5.10-0zqyyf2e.mjs +1 -0
- package/dist/chunks/utils-0.5.10-36gnsqbk.mjs +1 -0
- package/dist/chunks/vim-0.5.10-0zas1t6x.mjs +1 -0
- package/dist/chunks/watcher-0.5.10-9etw516s.mjs +1 -0
- package/dist/chunks/wiki-0.5.10-rwktf7fm.mjs +132 -0
- package/dist/chunks/worktree-0.5.10-afdnv059.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.5.10-n0bmqq02.mjs +1 -0
- package/dist/chunks/wrapper-0.5.10-0bca9c3g.mjs +7 -0
- package/dist/claudin-vscode.vsix +0 -0
- package/dist/cli.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunks/AgentTool-0.5.9-560de9d1.mjs +0 -1
- package/dist/chunks/App-0.5.9-zsap2q4b.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.5.9-8zgzn0jw.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-0.5.9-92f16280.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.5.9-708dpq05.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.5.9-thv5358f.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.5.9-h0dan6qh.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.5.9-35ajv7zw.mjs +0 -1
- package/dist/chunks/DiffDialog-0.5.9-2gfy103v.mjs +0 -3
- package/dist/chunks/Doctor-0.5.9-wjw0w0c1.mjs +0 -1
- package/dist/chunks/Grove-0.5.9-hty0xzar.mjs +0 -1
- package/dist/chunks/ITermBackend-0.5.9-pch1zyqn.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.5.9-xjp9bdct.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.5.9-t4wkfdrh.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.5.9-12p8z825.mjs +0 -1
- package/dist/chunks/Onboarding-0.5.9-d02fdy7a.mjs +0 -1
- package/dist/chunks/ProviderManager-0.5.9-2h6pym7f.mjs +0 -1
- package/dist/chunks/REPL-0.5.9-fn63chv9.mjs +0 -1
- package/dist/chunks/ResumeConversation-0.5.9-wdc0fys1.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-0.5.9-ty7tvdf3.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.5.9-th2cx2b2.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.5.9-gqyef6wv.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-0.5.9-e4b9wj1z.mjs +0 -1
- package/dist/chunks/TmuxBackend-0.5.9-xx7btmxb.mjs +0 -9
- package/dist/chunks/ToolSearchTool-0.5.9-7h9j8zft.mjs +0 -1
- package/dist/chunks/TrustDialog-0.5.9-y0bxcnzx.mjs +0 -1
- package/dist/chunks/activeProvider-0.5.9-bqhnxdga.mjs +0 -1
- package/dist/chunks/add-dir-0.5.9-t52c4h9t.mjs +0 -1
- package/dist/chunks/agents-0.5.9-b270304w.mjs +0 -110
- package/dist/chunks/agents-0.5.9-h9dw36cp.mjs +0 -3
- package/dist/chunks/api-0.5.9-jnhtend7.mjs +0 -1
- package/dist/chunks/asciicast-0.5.9-hrjx2e4n.mjs +0 -1
- package/dist/chunks/assistant-0.5.9-ap4j82na.mjs +0 -1
- package/dist/chunks/auth-0.5.9-cna7nxzb.mjs +0 -1
- package/dist/chunks/auth-0.5.9-q8ejya3n.mjs +0 -1
- package/dist/chunks/autoMode-0.5.9-w9j324dc.mjs +0 -48
- package/dist/chunks/autoUpdater-0.5.9-3x3xcjhq.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-0.5.9-ngzjz5nf.mjs +0 -1
- package/dist/chunks/branch-0.5.9-4389y3jh.mjs +0 -4
- package/dist/chunks/bridgePointer-0.5.9-ph0vdzcm.mjs +0 -1
- package/dist/chunks/btw-0.5.9-kq7dda47.mjs +0 -1
- package/dist/chunks/buddy-0.5.9-3s5bz133.mjs +0 -3
- package/dist/chunks/cacache-0.5.9-k02nazjg.mjs +0 -1
- package/dist/chunks/cache-probe-0.5.9-vdfe8hkq.mjs +0 -21
- package/dist/chunks/cacheStats-0.5.9-89wd0xyf.mjs +0 -4
- package/dist/chunks/caches-0.5.9-kg4820wg.mjs +0 -1
- package/dist/chunks/claudeDesktop-0.5.9-7pt2wjt1.mjs +0 -1
- package/dist/chunks/claudemd-0.5.9-bhqwq7vs.mjs +0 -1
- package/dist/chunks/clear-0.5.9-5mg9gs8a.mjs +0 -1
- package/dist/chunks/clearTerminal-0.5.9-esamq102.mjs +0 -1
- package/dist/chunks/cli-0.5.9-00ms6tt7.mjs +0 -4
- package/dist/chunks/cli-0.5.9-02vwh5bc.mjs +0 -2
- package/dist/chunks/cli-0.5.9-0a5jxqra.mjs +0 -58
- package/dist/chunks/cli-0.5.9-0b1wx67c.mjs +0 -193
- package/dist/chunks/cli-0.5.9-0becvd5f.mjs +0 -2
- package/dist/chunks/cli-0.5.9-0w46b370.mjs +0 -3
- package/dist/chunks/cli-0.5.9-10ar539r.mjs +0 -2
- package/dist/chunks/cli-0.5.9-12gj3v8y.mjs +0 -12
- package/dist/chunks/cli-0.5.9-1ktmgzhb.mjs +0 -15
- package/dist/chunks/cli-0.5.9-1qkhnqnk.mjs +0 -4
- package/dist/chunks/cli-0.5.9-1zc8qwr4.mjs +0 -2
- package/dist/chunks/cli-0.5.9-248na0hf.mjs +0 -2
- package/dist/chunks/cli-0.5.9-2fcyavah.mjs +0 -17
- package/dist/chunks/cli-0.5.9-2jfbm2es.mjs +0 -12
- package/dist/chunks/cli-0.5.9-2txnqxd1.mjs +0 -2
- package/dist/chunks/cli-0.5.9-31f5vjyq.mjs +0 -2
- package/dist/chunks/cli-0.5.9-32fpvgpt.mjs +0 -2
- package/dist/chunks/cli-0.5.9-371mb3zf.mjs +0 -4
- package/dist/chunks/cli-0.5.9-3bsjckc3.mjs +0 -2
- package/dist/chunks/cli-0.5.9-3s1c44tz.mjs +0 -2
- package/dist/chunks/cli-0.5.9-41dpv5z9.mjs +0 -2
- package/dist/chunks/cli-0.5.9-42t3s85x.mjs +0 -2
- package/dist/chunks/cli-0.5.9-4aga12a5.mjs +0 -2
- package/dist/chunks/cli-0.5.9-4fdad25z.mjs +0 -3
- package/dist/chunks/cli-0.5.9-4m738pn1.mjs +0 -25
- package/dist/chunks/cli-0.5.9-4s8nynfd.mjs +0 -2
- package/dist/chunks/cli-0.5.9-4t8b91eb.mjs +0 -4
- package/dist/chunks/cli-0.5.9-4w9169na.mjs +0 -3
- package/dist/chunks/cli-0.5.9-5ah34c4c.mjs +0 -39
- package/dist/chunks/cli-0.5.9-5e3fhttm.mjs +0 -2
- package/dist/chunks/cli-0.5.9-5hzwn715.mjs +0 -2
- package/dist/chunks/cli-0.5.9-5s8vtyx6.mjs +0 -4
- package/dist/chunks/cli-0.5.9-5vdqnecb.mjs +0 -4
- package/dist/chunks/cli-0.5.9-5vj7cvdr.mjs +0 -2
- package/dist/chunks/cli-0.5.9-5ykvr12k.mjs +0 -2
- package/dist/chunks/cli-0.5.9-610r4gbg.mjs +0 -2
- package/dist/chunks/cli-0.5.9-637n1msd.mjs +0 -15
- package/dist/chunks/cli-0.5.9-671nz4d9.mjs +0 -2
- package/dist/chunks/cli-0.5.9-68rmtj23.mjs +0 -2
- package/dist/chunks/cli-0.5.9-6rrqt96f.mjs +0 -2
- package/dist/chunks/cli-0.5.9-72tax9cd.mjs +0 -2
- package/dist/chunks/cli-0.5.9-77nxjft3.mjs +0 -2
- package/dist/chunks/cli-0.5.9-7bq8wzr3.mjs +0 -18
- package/dist/chunks/cli-0.5.9-7hcka84h.mjs +0 -2
- package/dist/chunks/cli-0.5.9-7qcan18n.mjs +0 -2
- package/dist/chunks/cli-0.5.9-8h1qpeef.mjs +0 -2
- package/dist/chunks/cli-0.5.9-8kfemzbn.mjs +0 -2
- package/dist/chunks/cli-0.5.9-8ndgy03m.mjs +0 -4
- package/dist/chunks/cli-0.5.9-91gjew0x.mjs +0 -3
- package/dist/chunks/cli-0.5.9-9fgjryqc.mjs +0 -2
- package/dist/chunks/cli-0.5.9-9rrpczqk.mjs +0 -17
- package/dist/chunks/cli-0.5.9-a720c6hc.mjs +0 -9
- package/dist/chunks/cli-0.5.9-ajbjmz51.mjs +0 -2
- package/dist/chunks/cli-0.5.9-ap6gvqkx.mjs +0 -67
- package/dist/chunks/cli-0.5.9-apc46v07.mjs +0 -15
- package/dist/chunks/cli-0.5.9-awa1dtdz.mjs +0 -2
- package/dist/chunks/cli-0.5.9-b4t4xfpb.mjs +0 -2
- package/dist/chunks/cli-0.5.9-b4xgpen1.mjs +0 -5
- package/dist/chunks/cli-0.5.9-bax4dxrj.mjs +0 -2
- package/dist/chunks/cli-0.5.9-bc0wvx5b.mjs +0 -2
- package/dist/chunks/cli-0.5.9-bfn7177j.mjs +0 -2
- package/dist/chunks/cli-0.5.9-bp09b2xm.mjs +0 -2
- package/dist/chunks/cli-0.5.9-bv3m0yb8.mjs +0 -2
- package/dist/chunks/cli-0.5.9-bwdsfdf6.mjs +0 -2
- package/dist/chunks/cli-0.5.9-c54d94sv.mjs +0 -2
- package/dist/chunks/cli-0.5.9-cbgfqb0x.mjs +0 -2
- package/dist/chunks/cli-0.5.9-cy4sm0c2.mjs +0 -2
- package/dist/chunks/cli-0.5.9-d5rn9c6v.mjs +0 -12
- package/dist/chunks/cli-0.5.9-d66wktpd.mjs +0 -2
- package/dist/chunks/cli-0.5.9-d89n2ccx.mjs +0 -2
- package/dist/chunks/cli-0.5.9-da0mspn4.mjs +0 -2
- package/dist/chunks/cli-0.5.9-dszssq6z.mjs +0 -2
- package/dist/chunks/cli-0.5.9-dtbcqw2e.mjs +0 -2
- package/dist/chunks/cli-0.5.9-e1gk7v9y.mjs +0 -2
- package/dist/chunks/cli-0.5.9-e4sr85eg.mjs +0 -2
- package/dist/chunks/cli-0.5.9-e5ex267m.mjs +0 -2
- package/dist/chunks/cli-0.5.9-e7gc5p54.mjs +0 -2
- package/dist/chunks/cli-0.5.9-eagw660r.mjs +0 -2
- package/dist/chunks/cli-0.5.9-ejmv1n9p.mjs +0 -3
- package/dist/chunks/cli-0.5.9-ek649arf.mjs +0 -6
- package/dist/chunks/cli-0.5.9-ezc11axw.mjs +0 -2
- package/dist/chunks/cli-0.5.9-ezpjdejw.mjs +0 -2
- package/dist/chunks/cli-0.5.9-f9jt7awn.mjs +0 -2
- package/dist/chunks/cli-0.5.9-fn6ees65.mjs +0 -2
- package/dist/chunks/cli-0.5.9-fv4jrdef.mjs +0 -2
- package/dist/chunks/cli-0.5.9-g6qpvmj4.mjs +0 -133
- package/dist/chunks/cli-0.5.9-g9kt9aw7.mjs +0 -2
- package/dist/chunks/cli-0.5.9-ga0kqnkz.mjs +0 -5
- package/dist/chunks/cli-0.5.9-gbq794tt.mjs +0 -2
- package/dist/chunks/cli-0.5.9-gcsba93g.mjs +0 -18
- package/dist/chunks/cli-0.5.9-ghbax09k.mjs +0 -2
- package/dist/chunks/cli-0.5.9-gk1vb8nn.mjs +0 -2
- package/dist/chunks/cli-0.5.9-gp0bq7wk.mjs +0 -2
- package/dist/chunks/cli-0.5.9-gr8zgxwx.mjs +0 -2
- package/dist/chunks/cli-0.5.9-grgf8g99.mjs +0 -2
- package/dist/chunks/cli-0.5.9-h5d0zxek.mjs +0 -3
- package/dist/chunks/cli-0.5.9-h6nmz5e3.mjs +0 -2
- package/dist/chunks/cli-0.5.9-h7gh7ym5.mjs +0 -24
- package/dist/chunks/cli-0.5.9-h836a3wa.mjs +0 -2
- package/dist/chunks/cli-0.5.9-hg2qm56h.mjs +0 -4
- package/dist/chunks/cli-0.5.9-hpq0xehd.mjs +0 -2
- package/dist/chunks/cli-0.5.9-hwet4kvx.mjs +0 -2
- package/dist/chunks/cli-0.5.9-j2d1jct8.mjs +0 -2
- package/dist/chunks/cli-0.5.9-j8629kcy.mjs +0 -2
- package/dist/chunks/cli-0.5.9-j9ns2awb.mjs +0 -8
- package/dist/chunks/cli-0.5.9-jd8be7cd.mjs +0 -6
- package/dist/chunks/cli-0.5.9-jdzavz2g.mjs +0 -2
- package/dist/chunks/cli-0.5.9-jjtdefqj.mjs +0 -2
- package/dist/chunks/cli-0.5.9-jk4rx6zt.mjs +0 -4
- package/dist/chunks/cli-0.5.9-jnhyr1zg.mjs +0 -2
- package/dist/chunks/cli-0.5.9-jsxqd90d.mjs +0 -3
- package/dist/chunks/cli-0.5.9-k3prcbg9.mjs +0 -2
- package/dist/chunks/cli-0.5.9-k47s77hf.mjs +0 -2
- package/dist/chunks/cli-0.5.9-k6qxbj0d.mjs +0 -42
- package/dist/chunks/cli-0.5.9-k9yedz53.mjs +0 -5262
- package/dist/chunks/cli-0.5.9-kfpgp09g.mjs +0 -6
- package/dist/chunks/cli-0.5.9-knc0w8sn.mjs +0 -2
- package/dist/chunks/cli-0.5.9-krvpcgvw.mjs +0 -2
- package/dist/chunks/cli-0.5.9-ktxeg6my.mjs +0 -2
- package/dist/chunks/cli-0.5.9-m1y4hmzs.mjs +0 -2
- package/dist/chunks/cli-0.5.9-mcezkpp8.mjs +0 -2
- package/dist/chunks/cli-0.5.9-mhz9wt6a.mjs +0 -2
- package/dist/chunks/cli-0.5.9-mmvtbr39.mjs +0 -2
- package/dist/chunks/cli-0.5.9-mpqmy7zw.mjs +0 -2
- package/dist/chunks/cli-0.5.9-n08gkgng.mjs +0 -21
- package/dist/chunks/cli-0.5.9-ncjg30aq.mjs +0 -3
- package/dist/chunks/cli-0.5.9-nct7sarc.mjs +0 -2
- package/dist/chunks/cli-0.5.9-nfhfsnw6.mjs +0 -2
- package/dist/chunks/cli-0.5.9-nk3pacrn.mjs +0 -5
- package/dist/chunks/cli-0.5.9-nvf5kfmq.mjs +0 -9
- package/dist/chunks/cli-0.5.9-ppr1420k.mjs +0 -2
- package/dist/chunks/cli-0.5.9-q3wvc7qb.mjs +0 -2
- package/dist/chunks/cli-0.5.9-q69vj08a.mjs +0 -2
- package/dist/chunks/cli-0.5.9-q7a4xcwy.mjs +0 -3
- package/dist/chunks/cli-0.5.9-q9ne4r9p.mjs +0 -50
- package/dist/chunks/cli-0.5.9-qddf6zq9.mjs +0 -2
- package/dist/chunks/cli-0.5.9-qexy3mqr.mjs +0 -59
- package/dist/chunks/cli-0.5.9-qvvxrm93.mjs +0 -3
- package/dist/chunks/cli-0.5.9-qy6qkzwb.mjs +0 -2
- package/dist/chunks/cli-0.5.9-r9d405kc.mjs +0 -2
- package/dist/chunks/cli-0.5.9-rbjjfytb.mjs +0 -2
- package/dist/chunks/cli-0.5.9-rh5280xq.mjs +0 -2
- package/dist/chunks/cli-0.5.9-rhycyvwn.mjs +0 -2
- package/dist/chunks/cli-0.5.9-rjdhjn49.mjs +0 -20
- package/dist/chunks/cli-0.5.9-rm62v7hr.mjs +0 -34
- package/dist/chunks/cli-0.5.9-rpgjj6qg.mjs +0 -2
- package/dist/chunks/cli-0.5.9-rv2328c4.mjs +0 -2
- package/dist/chunks/cli-0.5.9-s2jh3scf.mjs +0 -3
- package/dist/chunks/cli-0.5.9-sd34jmva.mjs +0 -2
- package/dist/chunks/cli-0.5.9-sjcz03eb.mjs +0 -2
- package/dist/chunks/cli-0.5.9-ss870bda.mjs +0 -2
- package/dist/chunks/cli-0.5.9-syr6nffj.mjs +0 -2
- package/dist/chunks/cli-0.5.9-t2fy8t5r.mjs +0 -45
- package/dist/chunks/cli-0.5.9-tav5jmz1.mjs +0 -2
- package/dist/chunks/cli-0.5.9-tbz9s4h3.mjs +0 -2
- package/dist/chunks/cli-0.5.9-tj6dt3d6.mjs +0 -2
- package/dist/chunks/cli-0.5.9-tke5evvm.mjs +0 -2
- package/dist/chunks/cli-0.5.9-v1srrn02.mjs +0 -2
- package/dist/chunks/cli-0.5.9-v5mkedy5.mjs +0 -16
- package/dist/chunks/cli-0.5.9-v69cq6f1.mjs +0 -2
- package/dist/chunks/cli-0.5.9-ve2b6kmp.mjs +0 -2
- package/dist/chunks/cli-0.5.9-vkt9t3z8.mjs +0 -133
- package/dist/chunks/cli-0.5.9-w1g3tgzh.mjs +0 -2
- package/dist/chunks/cli-0.5.9-wc5gt1zw.mjs +0 -2
- package/dist/chunks/cli-0.5.9-whf5zybr.mjs +0 -2
- package/dist/chunks/cli-0.5.9-wjvc994v.mjs +0 -2
- package/dist/chunks/cli-0.5.9-wkhmkyaq.mjs +0 -2
- package/dist/chunks/cli-0.5.9-wrndf987.mjs +0 -2
- package/dist/chunks/cli-0.5.9-xbvqph1k.mjs +0 -2
- package/dist/chunks/cli-0.5.9-xcexsk79.mjs +0 -2
- package/dist/chunks/cli-0.5.9-xge969yd.mjs +0 -2
- package/dist/chunks/cli-0.5.9-xn1qcye7.mjs +0 -2
- package/dist/chunks/cli-0.5.9-xn369es1.mjs +0 -2
- package/dist/chunks/cli-0.5.9-xz1pg47z.mjs +0 -10
- package/dist/chunks/cli-0.5.9-yazhwsgb.mjs +0 -4
- package/dist/chunks/cli-0.5.9-yh7f5m4w.mjs +0 -2
- package/dist/chunks/cli-0.5.9-yqn35x2d.mjs +0 -2
- package/dist/chunks/cli-0.5.9-ywc7arzn.mjs +0 -2
- package/dist/chunks/cli-0.5.9-z87j725g.mjs +0 -2
- package/dist/chunks/cli-0.5.9-zb26tq1c.mjs +0 -2
- package/dist/chunks/cli-0.5.9-zerpef2t.mjs +0 -1
- package/dist/chunks/cli-0.5.9-zeskcndd.mjs +0 -24
- package/dist/chunks/cli-0.5.9-zqgkcx3g.mjs +0 -2
- package/dist/chunks/cli-0.5.9-zrcz538q.mjs +0 -2
- package/dist/chunks/cli-0.5.9-zwpt90q9.mjs +0 -7
- package/dist/chunks/client-0.5.9-bhc7ghsr.mjs +0 -1
- package/dist/chunks/color-0.5.9-5722xdf4.mjs +0 -1
- package/dist/chunks/compact-0.5.9-4cf807hc.mjs +0 -3
- package/dist/chunks/config-0.5.9-936tss5g.mjs +0 -1
- package/dist/chunks/config-0.5.9-kk16cygb.mjs +0 -1
- package/dist/chunks/context-0.5.9-b0afgp2c.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.5.9-wj6fxcsj.mjs +0 -1
- package/dist/chunks/conversation-0.5.9-rtntf81h.mjs +0 -1
- package/dist/chunks/copy-0.5.9-93t8z0wz.mjs +0 -9
- package/dist/chunks/cost-0.5.9-2csvd1ae.mjs +0 -1
- package/dist/chunks/createSSHSession-0.5.9-0aqkvqad.mjs +0 -1
- package/dist/chunks/createSession-0.5.9-j9xdpffh.mjs +0 -1
- package/dist/chunks/debug-0.5.9-kd9n32y2.mjs +0 -1
- package/dist/chunks/defaultActionDeps-0.5.9-1f7mkn9m.mjs +0 -1177
- package/dist/chunks/desktop-0.5.9-ce65mt7y.mjs +0 -1
- package/dist/chunks/detectRepository-0.5.9-4nd76hbs.mjs +0 -1
- package/dist/chunks/detection-0.5.9-mpgxg1d5.mjs +0 -1
- package/dist/chunks/diff-0.5.9-89ny0sp6.mjs +0 -1
- package/dist/chunks/doctor-0.5.9-e8bxsm2r.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-0.5.9-kwncc3yh.mjs +0 -1
- package/dist/chunks/earlyInput-0.5.9-cxrgrx2e.mjs +0 -1
- package/dist/chunks/effort-0.5.9-dbgsjfep.mjs +0 -10
- package/dist/chunks/envUtils-0.5.9-59e9sq5q.mjs +0 -1
- package/dist/chunks/environmentSelection-0.5.9-5tjt9mkd.mjs +0 -1
- package/dist/chunks/environments-0.5.9-ebm4yp6e.mjs +0 -1
- package/dist/chunks/errors-0.5.9-xp1e5xqp.mjs +0 -1
- package/dist/chunks/exampleCommands-0.5.9-dxv2wpk4.mjs +0 -1
- package/dist/chunks/exit-0.5.9-q7cpk25k.mjs +0 -1
- package/dist/chunks/export-0.5.9-1dpbp185.mjs +0 -2
- package/dist/chunks/extra-usage-0.5.9-ctd5dnsr.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.5.9-hbmbvzb5.mjs +0 -1
- package/dist/chunks/fast-0.5.9-wagaw91z.mjs +0 -1
- package/dist/chunks/feedback-0.5.9-x37szs13.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-0.5.9-g8st730b.mjs +0 -1
- package/dist/chunks/git-0.5.9-zxdvsyxq.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.5.9-mp51r114.mjs +0 -1
- package/dist/chunks/grove-0.5.9-grafpqtx.mjs +0 -1
- package/dist/chunks/growthbook-0.5.9-mr1nyz65.mjs +0 -1
- package/dist/chunks/headless-0.5.9-pxnbg1dh.mjs +0 -2
- package/dist/chunks/heapdump-0.5.9-58bmar8y.mjs +0 -6
- package/dist/chunks/help-0.5.9-x6ds3za0.mjs +0 -1
- package/dist/chunks/hookChains-0.5.9-1sz7vw7t.mjs +0 -3
- package/dist/chunks/hooks-0.5.9-4mjp8k78.mjs +0 -1
- package/dist/chunks/hooks-0.5.9-n14e2a57.mjs +0 -79
- package/dist/chunks/ide-0.5.9-gk5tarwc.mjs +0 -3
- package/dist/chunks/image-processor-napi-0.5.9-eept9e9s.mjs +0 -1
- package/dist/chunks/index-0.5.9-0n7mpzrj.mjs +0 -17
- package/dist/chunks/index-0.5.9-3ng34e8n.mjs +0 -2
- package/dist/chunks/index-0.5.9-4b9dgj2z.mjs +0 -9
- package/dist/chunks/index-0.5.9-4fzd2pns.mjs +0 -1
- package/dist/chunks/index-0.5.9-6awv6fyn.mjs +0 -1
- package/dist/chunks/index-0.5.9-6cbrcdyh.mjs +0 -1
- package/dist/chunks/index-0.5.9-725p0eby.mjs +0 -1
- package/dist/chunks/index-0.5.9-85ep6547.mjs +0 -30
- package/dist/chunks/index-0.5.9-8h5ceajb.mjs +0 -1
- package/dist/chunks/index-0.5.9-8ws7n6wv.mjs +0 -5
- package/dist/chunks/index-0.5.9-b3jm65x4.mjs +0 -1
- package/dist/chunks/index-0.5.9-cjjbeyt8.mjs +0 -1
- package/dist/chunks/index-0.5.9-gnac3s48.mjs +0 -1
- package/dist/chunks/index-0.5.9-m68jcsx2.mjs +0 -1
- package/dist/chunks/index-0.5.9-n91crv8a.mjs +0 -1
- package/dist/chunks/index-0.5.9-npkfayxd.mjs +0 -1
- package/dist/chunks/index-0.5.9-pbzzad7t.mjs +0 -9
- package/dist/chunks/index-0.5.9-thp631gs.mjs +0 -1
- package/dist/chunks/index-0.5.9-xcy5t1fw.mjs +0 -1
- package/dist/chunks/index-0.5.9-y07jxja1.mjs +0 -1
- package/dist/chunks/index-0.5.9-yjkfcf2g.mjs +0 -2
- package/dist/chunks/index-0.5.9-zb346057.mjs +0 -1
- package/dist/chunks/init-0.5.9-cmszfh8j.mjs +0 -1
- package/dist/chunks/initReplBridge-0.5.9-y2j594wz.mjs +0 -1
- package/dist/chunks/ink-0.5.9-km3f0tv6.mjs +0 -1
- package/dist/chunks/insights-0.5.9-fevx72ve.mjs +0 -870
- package/dist/chunks/install-0.5.9-6m05dpsa.mjs +0 -1
- package/dist/chunks/install-github-app-0.5.9-91syqpey.mjs +0 -149
- package/dist/chunks/install-slack-app-0.5.9-9rqmjej1.mjs +0 -1
- package/dist/chunks/instrumentation-0.5.9-55dt6kkh.mjs +0 -1
- package/dist/chunks/interactiveHelpers-0.5.9-47bhz9at.mjs +0 -1
- package/dist/chunks/keybindings-0.5.9-y134m89v.mjs +0 -2
- package/dist/chunks/knowledge-0.5.9-d1m7e2b4.mjs +0 -2
- package/dist/chunks/latestVersionCache-0.5.9-69z169gq.mjs +0 -1
- package/dist/chunks/loadAgentsDir-0.5.9-vtemqv8c.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.5.9-xxp0pj2x.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.5.9-zgq2s8sm.mjs +0 -1
- package/dist/chunks/log-0.5.9-8aszszjb.mjs +0 -1
- package/dist/chunks/main-0.5.9-cjg2h8yb.mjs +0 -1
- package/dist/chunks/managedEnv-0.5.9-nq2mbery.mjs +0 -1
- package/dist/chunks/mcp-0.5.9-g39bj87f.mjs +0 -17
- package/dist/chunks/mcp-0.5.9-h1sdm6zb.mjs +0 -4
- package/dist/chunks/mcp-0.5.9-vpwsq0wd.mjs +0 -1
- package/dist/chunks/mcpb-0.5.9-pavmx8mm.mjs +0 -1
- package/dist/chunks/memory-0.5.9-se036fe4.mjs +0 -3
- package/dist/chunks/mobile-0.5.9-57ycqdp3.mjs +0 -2
- package/dist/chunks/model-0.5.9-4e6fc1m4.mjs +0 -1
- package/dist/chunks/model-0.5.9-k0m86zrn.mjs +0 -2
- package/dist/chunks/node-0.5.9-ftk6pxmx.mjs +0 -12
- package/dist/chunks/oauth-0.5.9-bytwte72.mjs +0 -1
- package/dist/chunks/openaiShim-0.5.9-f9gdeama.mjs +0 -14
- package/dist/chunks/output-style-0.5.9-1wbqsbc0.mjs +0 -1
- package/dist/chunks/package-D6422PQU-0.5.9-4gkr65dy.mjs +0 -1
- package/dist/chunks/parseConnectUrl-0.5.9-d0t88r4n.mjs +0 -1
- package/dist/chunks/parser-0.5.9-j1kdtn15.mjs +0 -1
- package/dist/chunks/passes-0.5.9-w08t80rc.mjs +0 -1
- package/dist/chunks/permissions-0.5.9-mzx7w14f.mjs +0 -3
- package/dist/chunks/plan-0.5.9-trs5gepx.mjs +0 -1
- package/dist/chunks/plist-0.5.9-rzpv4ecn.mjs +0 -1
- package/dist/chunks/plugin-0.5.9-x1xsznkk.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-0.5.9-qwkp82xp.mjs +0 -1
- package/dist/chunks/plugins-0.5.9-8yj1w6bf.mjs +0 -9
- package/dist/chunks/preActionHook-0.5.9-130eb4bx.mjs +0 -2
- package/dist/chunks/print-0.5.9-fm0q92d1.mjs +0 -57
- package/dist/chunks/privacy-settings-0.5.9-vhjhbccg.mjs +0 -1
- package/dist/chunks/process-0.5.9-syp1y7ym.mjs +0 -1
- package/dist/chunks/processBashCommand-0.5.9-admb0s9z.mjs +0 -1
- package/dist/chunks/processSlashCommand-0.5.9-x5wmbzr0.mjs +0 -9
- package/dist/chunks/prompt-0.5.9-6s763n7m.mjs +0 -1
- package/dist/chunks/prompt-0.5.9-fg1exp0e.mjs +0 -1
- package/dist/chunks/prompts-0.5.9-a6jrpexy.mjs +0 -1
- package/dist/chunks/protocolHandler-0.5.9-5920qvb2.mjs +0 -13
- package/dist/chunks/provider-0.5.9-ew50s03j.mjs +0 -2
- package/dist/chunks/providerProfiles-0.5.9-ygv5pxbq.mjs +0 -1
- package/dist/chunks/providerValidation-0.5.9-pebvjkk0.mjs +0 -6
- package/dist/chunks/rate-limit-options-0.5.9-p39mhxr9.mjs +0 -1
- package/dist/chunks/registerSubcommands-0.5.9-5576rw9k.mjs +0 -34
- package/dist/chunks/registry-0.5.9-tkmx5qgm.mjs +0 -1
- package/dist/chunks/release-notes-0.5.9-cmf1033z.mjs +0 -5
- package/dist/chunks/reload-plugins-0.5.9-ynqb4wwm.mjs +0 -2
- package/dist/chunks/remote-env-0.5.9-ddnwx90m.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-0.5.9-br32ecze.mjs +0 -1
- package/dist/chunks/remoteSession-0.5.9-9ee3jy2n.mjs +0 -1
- package/dist/chunks/rename-0.5.9-h0npjxhv.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.5.9-4tjg5rct.mjs +0 -1
- package/dist/chunks/replLauncher-0.5.9-y4zkk3hb.mjs +0 -1
- package/dist/chunks/resume-0.5.9-5n9z570h.mjs +0 -2
- package/dist/chunks/rewind-0.5.9-cawzh2f5.mjs +0 -1
- package/dist/chunks/rootOptions-0.5.9-z7hher7x.mjs +0 -1
- package/dist/chunks/sandbox-adapter-0.5.9-m8dy3vak.mjs +0 -1
- package/dist/chunks/sandbox-toggle-0.5.9-d7hfb9dw.mjs +0 -1
- package/dist/chunks/session-0.5.9-spjfzb60.mjs +0 -2
- package/dist/chunks/sessionDiscovery-0.5.9-k8tw4apd.mjs +0 -1
- package/dist/chunks/sessionFileAccessHooks-0.5.9-kzd77836.mjs +0 -1
- package/dist/chunks/sessionStorage-0.5.9-5eaxh9e1.mjs +0 -1
- package/dist/chunks/settings-0.5.9-9y9yx2ep.mjs +0 -1
- package/dist/chunks/setup-0.5.9-cbnsjaz6.mjs +0 -5
- package/dist/chunks/sinks-0.5.9-3kes56y2.mjs +0 -1
- package/dist/chunks/skills-0.5.9-816ec23f.mjs +0 -1
- package/dist/chunks/startupProfiler-0.5.9-j5rdws5r.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-0.5.9-wgd2amqq.mjs +0 -1
- package/dist/chunks/state-0.5.9-ssv90pdf.mjs +0 -1
- package/dist/chunks/stats-0.5.9-09jq1eez.mjs +0 -6
- package/dist/chunks/status-0.5.9-zm23czy4.mjs +0 -1
- package/dist/chunks/stickers-0.5.9-df1ha62e.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.5.9-4bh9v7rk.mjs +0 -1
- package/dist/chunks/tasks-0.5.9-75eaj64t.mjs +0 -1
- package/dist/chunks/teamHelpers-0.5.9-a239c7as.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.5.9-gpfpnhg1.mjs +0 -1
- package/dist/chunks/teleport-0.5.9-jq0cm2ce.mjs +0 -1
- package/dist/chunks/terminalSetup-0.5.9-zscy8b5b.mjs +0 -1
- package/dist/chunks/theme-0.5.9-crkb4a1t.mjs +0 -1
- package/dist/chunks/thinkback-0.5.9-bqzpccev.mjs +0 -1
- package/dist/chunks/thinkback-play-0.5.9-avsgpz11.mjs +0 -1
- package/dist/chunks/toolPool-0.5.9-9k94r61g.mjs +0 -1
- package/dist/chunks/toolSearch-0.5.9-qm8rqvys.mjs +0 -1
- package/dist/chunks/tools-0.5.9-e5fa6xh1.mjs +0 -1
- package/dist/chunks/trustedDevice-0.5.9-dhpwn40g.mjs +0 -1
- package/dist/chunks/turndown.cjs-0.5.9-bwat06c0.mjs +0 -69
- package/dist/chunks/ultrareviewCommand-0.5.9-qfz8shw1.mjs +0 -4
- package/dist/chunks/update-0.5.9-yv6acwy6.mjs +0 -86
- package/dist/chunks/upgrade-0.5.9-3xpmapbj.mjs +0 -1
- package/dist/chunks/upstreamproxy-0.5.9-ebc62ytm.mjs +0 -14
- package/dist/chunks/url-handler-napi-0.5.9-ejbmjrv9.mjs +0 -1
- package/dist/chunks/usage-0.5.9-ze5694v0.mjs +0 -1
- package/dist/chunks/util-0.5.9-8517xr6w.mjs +0 -1
- package/dist/chunks/utils-0.5.9-tq5p3g26.mjs +0 -1
- package/dist/chunks/vim-0.5.9-3pwhv6s4.mjs +0 -1
- package/dist/chunks/watcher-0.5.9-ft2b96h8.mjs +0 -1
- package/dist/chunks/wiki-0.5.9-f96c34xg.mjs +0 -132
- package/dist/chunks/worktree-0.5.9-p28ne51h.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.5.9-4tgvrvd2.mjs +0 -1
- package/dist/chunks/wrapper-0.5.9-asjtntyw.mjs +0 -7
- /package/dist/chunks/{cli-0.5.9-ysvsqcpa.mjs → cli-0.5.10-1sd567wn.mjs} +0 -0
- /package/dist/chunks/{cli-0.5.9-ehe0yr95.mjs → cli-0.5.10-57andxje.mjs} +0 -0
- /package/dist/chunks/{cli-0.5.9-x9tg4bxs.mjs → cli-0.5.10-5kz0qdsz.mjs} +0 -0
- /package/dist/chunks/{cli-0.5.9-c91t0fys.mjs → cli-0.5.10-a542fww1.mjs} +0 -0
- /package/dist/chunks/{cli-0.5.9-4yxntpxv.mjs → cli-0.5.10-n8pz2na8.mjs} +0 -0
- /package/dist/chunks/{cli-0.5.9-1y9n9z2h.mjs → cli-0.5.10-ra711jkk.mjs} +0 -0
- /package/dist/chunks/{cli-0.5.9-mk69z06z.mjs → cli-0.5.10-t2s1mxyn.mjs} +0 -0
- /package/dist/chunks/{cli-0.5.9-an1j3dqv.mjs → cli-0.5.10-vsgznv7p.mjs} +0 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import{Uca as a6,Zca as nW}from"./cli-0.5.10-6zwxmza2.mjs";import{Ada as O,Bda as h1,hda as VL,kda as NN,qda as d7,uda as o_,vda as xW,xda as K,yda as VX,zda as n0}from"./cli-0.5.10-xrwj7982.mjs";import{Lda as S1,Xda as Q3}from"./cli-0.5.10-rk7at2tn.mjs";import{$da as Z1,Dea as PN,_da as s,kea as jL}from"./cli-0.5.10-d609fanf.mjs";import{Eea as yG,Mea as OB,Nea as CG}from"./cli-0.5.10-jd7ff66n.mjs";import{Oea as l0,Qea as R$}from"./cli-0.5.10-y9qd4psg.mjs";import{$ea as P_,Cfa as N,Gfa as F0,Qfa as P,Tea as J4,Tfa as M1,Vea as HB,Wea as o7,Xea as Pz,Yea as GJ,Zea as Zz,_ea as dQ,afa as OJ,bfa as Lz,cfa as N4,dfa as IJ,efa as EJ,ffa as Az,gfa as vJ,hfa as Tz,ifa as DJ,jfa as Yz,kfa as rQ,lfa as b_,mfa as yJ,nfa as jz,ofa as CJ,pfa as Oz,sfa as A4,tfa as m,ufa as X0,vfa as CX,wfa as PB,yfa as z0,zfa as F1}from"./cli-0.5.10-p4wmnjhz.mjs";import{cga as t5,hga as TL,jga as W0,kga as M6,nga as M$,pga as C1}from"./cli-0.5.10-8wqagr68.mjs";import{Fga as c0,sga as K0,vga as e,wga as GV,xga as q2}from"./cli-0.5.10-jsnrvena.mjs";import{$ha as XV,Aka as AL,Gga as hJ,Hga as wz,Hka as m$,Iha as oQ,Jha as C_,Mha as D4,Nha as uQ,Nka as QV,Oha as pQ,Pha as x_,Qha as nQ,Rha as v_,Sga as i7,Sha as x4,Tga as Rz,Tha as aJ,Uha as sQ,Vha as S_,Wha as sW,Wka as YB,Xha as rW,Yha as tW,Yja as UV,Zha as eW,_ha as ZV,aha as w4,aia as B2,ama as T6,bha as _J,bia as qV,cha as a7,dha as Mz,eha as xJ,eia as K$,fha as Fz,gha as F4,hha as mQ,mha as PJ,nha as Dz,oka as SX,pia as r1,qia as b5,qka as bX,rja as PL,uha as k4,vha as zJ,yka as DL}from"./cli-0.5.10-atkghjt0.mjs";import{Ama as v1,bma as I4,cma as UJ,lma as FJ,mma as $z,nma as e0,oma as M4,pma as NJ,qma as zz,zma as d}from"./cli-0.5.10-c9z4tdw2.mjs";import{Hna as nY,Ina as Q4,Jna as p,Kna as WX,Lna as B,Mna as H0,Nna as B6,Ona as L6}from"./cli-0.5.10-1sd567wn.mjs";function sq(Z){let X=Z.slice(Z.lastIndexOf(".")).toLowerCase();return sL.has(X)}function rq(Z){let X=Math.min(Z.length,rL),q=0;for(let Q=0;Q<X;Q++){let J=Z[Q];if(J===0)return!0;if(J<32&&J!==9&&J!==10&&J!==13)q++}return q/X>0.1}var sL,rL=8192;var tq=B(()=>{sL=new Set([".png",".jpg",".jpeg",".gif",".bmp",".ico",".webp",".tiff",".tif",".mp4",".mov",".avi",".mkv",".webm",".wmv",".flv",".m4v",".mpeg",".mpg",".mp3",".wav",".ogg",".flac",".aac",".m4a",".wma",".aiff",".opus",".zip",".tar",".gz",".bz2",".7z",".rar",".xz",".z",".tgz",".iso",".exe",".dll",".so",".dylib",".bin",".o",".a",".obj",".lib",".app",".msi",".deb",".rpm",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odt",".ods",".odp",".ttf",".otf",".woff",".woff2",".eot",".pyc",".pyo",".class",".jar",".war",".ear",".node",".wasm",".rlib",".sqlite",".sqlite3",".db",".mdb",".idx",".psd",".ai",".eps",".sketch",".fig",".xd",".blend",".3ds",".max",".swf",".fla",".lockb",".dat",".data"])});import{dirname as tL}from"path";function Y0(Z,X,q){let Q=eL();if(!Q)return;let J={timestamp:new Date().toISOString(),level:Z,event:X,data:q??{}},$=N(),Y=m(J)+`
|
|
2
|
+
`;try{$.appendFileSync(Q,Y)}catch{try{$.mkdirSync(tL(Q)),$.appendFileSync(Q,Y)}catch{}}}function eL(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function yx(Z,X,q){let Q=Date.now();Y0("info",`${Z}_started`);try{let J=await X(),$=q?q(J):{};return Y0("info",`${Z}_completed`,{duration_ms:Date.now()-Q,...$}),J}catch(J){throw Y0("error",`${Z}_failed`,{duration_ms:Date.now()-Q}),J}}var H2=B(()=>{F0();z0()});var QQ=p((Sx,qQ)=>{qQ.exports=XQ;XQ.sync=X_;var eq=H0("fs");function Z_(Z,X){var q=X.pathExt!==void 0?X.pathExt:process.env.PATHEXT;if(!q)return!0;if(q=q.split(";"),q.indexOf("")!==-1)return!0;for(var Q=0;Q<q.length;Q++){var J=q[Q].toLowerCase();if(J&&Z.substr(-J.length).toLowerCase()===J)return!0}return!1}function ZQ(Z,X,q){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return Z_(X,q)}function XQ(Z,X,q){eq.stat(Z,function(Q,J){q(Q,Q?!1:ZQ(J,Z,X))})}function X_(Z,X){return ZQ(eq.statSync(Z),Z,X)}});var KQ=p((bx,HQ)=>{HQ.exports=$Q;$Q.sync=q_;var JQ=H0("fs");function $Q(Z,X,q){JQ.stat(Z,function(Q,J){q(Q,Q?!1:YQ(J,X))})}function q_(Z,X){return YQ(JQ.statSync(Z),X)}function YQ(Z,X){return Z.isFile()&&Q_(Z,X)}function Q_(Z,X){var{mode:q,uid:Q,gid:J}=Z,$=X.uid!==void 0?X.uid:process.getuid&&process.getuid(),Y=X.gid!==void 0?X.gid:process.getgid&&process.getgid(),H=parseInt("100",8),U=parseInt("010",8),W=parseInt("001",8),G=H|U,V=q&W||q&U&&J===Y||q&H&&Q===$||q&G&&$===0;return V}});var GQ=p((fx,UQ)=>{var hx=H0("fs"),R4;if(process.platform==="win32"||global.TESTING_WINDOWS)R4=QQ();else R4=KQ();UQ.exports=N7;N7.sync=J_;function N7(Z,X,q){if(typeof X==="function")q=X,X={};if(!q){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(Q,J){N7(Z,X||{},function($,Y){if($)J($);else Q(Y)})})}R4(Z,X||{},function(Q,J){if(Q){if(Q.code==="EACCES"||X&&X.ignoreErrors)Q=null,J=!1}q(Q,J)})}function J_(Z,X){try{return R4.sync(Z,X||{})}catch(q){if(X&&X.ignoreErrors||q.code==="EACCES")return!1;else throw q}}});var RQ=p((gx,zQ)=>{var G6=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",WQ=H0("path"),$_=G6?";":":",VQ=GQ(),BQ=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),LQ=(Z,X)=>{let q=X.colon||$_,Q=Z.match(/\//)||G6&&Z.match(/\\/)?[""]:[...G6?[process.cwd()]:[],...(X.path||process.env.PATH||"").split(q)],J=G6?X.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",$=G6?J.split(q):[""];if(G6){if(Z.indexOf(".")!==-1&&$[0]!=="")$.unshift("")}return{pathEnv:Q,pathExt:$,pathExtExe:J}},_Q=(Z,X,q)=>{if(typeof X==="function")q=X,X={};if(!X)X={};let{pathEnv:Q,pathExt:J,pathExtExe:$}=LQ(Z,X),Y=[],H=(W)=>new Promise((G,V)=>{if(W===Q.length)return X.all&&Y.length?G(Y):V(BQ(Z));let _=Q[W],L=/^".*"$/.test(_)?_.slice(1,-1):_,z=WQ.join(L,Z),R=!L&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+z:z;G(U(R,W,0))}),U=(W,G,V)=>new Promise((_,L)=>{if(V===J.length)return _(H(G+1));let z=J[V];VQ(W+z,{pathExt:$},(R,D)=>{if(!R&&D)if(X.all)Y.push(W+z);else return _(W+z);return _(U(W,G,V+1))})});return q?H(0).then((W)=>q(null,W),q):H(0)},Y_=(Z,X)=>{X=X||{};let{pathEnv:q,pathExt:Q,pathExtExe:J}=LQ(Z,X),$=[];for(let Y=0;Y<q.length;Y++){let H=q[Y],U=/^".*"$/.test(H)?H.slice(1,-1):H,W=WQ.join(U,Z),G=!U&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+W:W;for(let V=0;V<Q.length;V++){let _=G+Q[V];try{if(VQ.sync(_,{pathExt:J}))if(X.all)$.push(_);else return _}catch(L){}}}if(X.all&&$.length)return $;if(X.nothrow)return null;throw BQ(Z)};zQ.exports=_Q;_Q.sync=Y_});var FQ=p((mx,x7)=>{var MQ=(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"};x7.exports=MQ;x7.exports.default=MQ});var jQ=p((ux,TQ)=>{var DQ=H0("path"),H_=RQ(),K_=FQ();function AQ(Z,X){let q=Z.options.env||process.env,Q=process.cwd(),J=Z.options.cwd!=null,$=J&&process.chdir!==void 0&&!process.chdir.disabled;if($)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=H_.sync(Z.command,{path:q[K_({env:q})],pathExt:X?DQ.delimiter:void 0})}catch(H){}finally{if($)process.chdir(Q)}if(Y)Y=DQ.resolve(J?Z.options.cwd:"",Y);return Y}function U_(Z){return AQ(Z)||AQ(Z,!0)}TQ.exports=U_});var OQ=p((V_,E7)=>{var P7=/([()\][%!^"`<>&|;, *?])/g;function G_(Z){return Z=Z.replace(P7,"^$1"),Z}function W_(Z,X){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(P7,"^$1"),X)Z=Z.replace(P7,"^$1");return Z}V_.command=G_;V_.argument=W_});var wQ=p((px,IQ)=>{IQ.exports=/^#!(.*)/});var NQ=p((dx,kQ)=>{var __=wQ();kQ.exports=(Z="")=>{let X=Z.match(__);if(!X)return null;let[q,Q]=X[0].replace(/#! ?/,"").split(" "),J=q.split("/").pop();if(J==="env")return Q;return Q?`${J} ${Q}`:J}});var PQ=p((cx,xQ)=>{var v7=H0("fs"),z_=NQ();function R_(Z){let q=Buffer.alloc(150),Q;try{Q=v7.openSync(Z,"r"),v7.readSync(Q,q,0,150,0),v7.closeSync(Q)}catch(J){}return z_(q.toString())}xQ.exports=R_});var CQ=p((lx,yQ)=>{var M_=H0("path"),EQ=jQ(),vQ=OQ(),F_=PQ(),D_=process.platform==="win32",A_=/\.(?:com|exe)$/i,T_=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function j_(Z){Z.file=EQ(Z);let X=Z.file&&F_(Z.file);if(X)return Z.args.unshift(Z.file),Z.command=X,EQ(Z);return Z.file}function O_(Z){if(!D_)return Z;let X=j_(Z),q=!A_.test(X);if(Z.options.forceShell||q){let Q=T_.test(X);Z.command=M_.normalize(Z.command),Z.command=vQ.command(Z.command),Z.args=Z.args.map(($)=>vQ.argument($,Q));let J=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${J}"`],Z.command=process.env.comspec||"cmd.exe",Z.options.windowsVerbatimArguments=!0}return Z}function I_(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:O_(Q)}yQ.exports=I_});var hQ=p((nx,bQ)=>{var y7=process.platform==="win32";function C7(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 w_(Z,X){if(!y7)return;let q=Z.emit;Z.emit=function(Q,J){if(Q==="exit"){let $=SQ(J,X);if($)return q.call(Z,"error",$)}return q.apply(Z,arguments)}}function SQ(Z,X){if(y7&&Z===1&&!X.file)return C7(X.original,"spawn");return null}function k_(Z,X){if(y7&&Z===1&&!X.file)return C7(X.original,"spawnSync");return null}bQ.exports={hookChildProcess:w_,verifyENOENT:SQ,verifyENOENTSync:k_,notFoundError:C7}});var h7=p((ix,W6)=>{var fQ=H0("child_process"),S7=CQ(),b7=hQ();function gQ(Z,X,q){let Q=S7(Z,X,q),J=fQ.spawn(Q.command,Q.args,Q.options);return b7.hookChildProcess(J,Q),J}function N_(Z,X,q){let Q=S7(Z,X,q),J=fQ.spawnSync(Q.command,Q.args,Q.options);return J.error=J.error||b7.verifyENOENTSync(J.status,Q),J}W6.exports=gQ;W6.exports.spawn=gQ;W6.exports.sync=N_;W6.exports._parse=S7;W6.exports._enoent=b7});function E_(Z,X,q,Q){if(!e0(Z))return Z;X=D4(X,Z);var J=-1,$=X.length,Y=$-1,H=Z;while(H!=null&&++J<$){var U=pQ(X[J]),W=q;if(U==="__proto__"||U==="constructor"||U==="prototype")return Z;if(J!=Y){var G=H[U];if(W=Q?Q(G,U,H):void 0,W===void 0)W=e0(G)?G:F4(X[J+1])?[]:{}}dQ(H,U,W),H=H[U]}return Z}var cQ;var lQ=B(()=>{P_();uQ();mQ();M4();x_();cQ=E_});function y_(Z,X,q){var Q=-1,J=X.length,$={};while(++Q<J){var Y=X[Q],H=nQ(Z,Y);if(q(H,Y))cQ($,D4(Y,Z),H)}return $}var iQ;var aQ=B(()=>{v_();lQ();uQ();iQ=y_});function h_(Z,X){if(Z==null)return{};var q=oQ(rQ(Z),function(Q){return[Q]});return X=sQ(X),iQ(Z,q,function(Q,J){return X(Q,J[0])})}var f7;var tQ=B(()=>{C_();S_();aQ();b_();f7=h_});import{readdir as GP,readFile as f_}from"fs/promises";import{release as g_}from"os";var _P,y0,zP,RP;var V6=B(()=>{v1();F0();p0();_P=["macos","wsl"],y0=d(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){g(Z)}return"linux"}return"unknown"}catch(Z){return g(Z),"unknown"}}),zP=d(()=>{if(process.platform!=="linux")return;try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"}),X=Z.match(/WSL(\d+)/i);if(X&&X[1])return X[1];if(Z.toLowerCase().includes("microsoft"))return"1";return}catch(Z){g(Z);return}}),RP=d(async()=>{if(process.platform!=="linux")return;let Z={linuxKernel:g_()};try{let X=await f_("/etc/os-release","utf8");for(let q of X.split(`
|
|
3
|
+
`)){let Q=q.match(/^(ID|VERSION_ID)=(.*)$/);if(Q&&Q[1]&&Q[2]){let J=Q[2].replace(/^"|"$/g,"");if(Q[1]==="ID")Z.linuxDistroId=J;else Z.linuxDistroVersion=J}}}catch{}return Z})});import{execSync as m_}from"child_process";function _6(Z,X){let Q=[];try{const q=B6(Q,A4`execSync: ${Z.slice(0,100)}`,0);return m_(Z,X)}catch(J){var $=J,Y=1}finally{L6(Q,$,Y)}}var g7=B(()=>{z0()});import{tracingChannel as u_,channel as p_}from"node:diagnostics_channel";var G0,K2,d_,m7=()=>G0.hasSubscribers||K2.hasSubscribers,ZJ,eQ,c_=(Z,X,q,Q)=>{typeof eQ.emitWarning=="function"?eQ.emitWarning(Z,X,q,Q):console.error(`[${q}] ${X}: ${Z}`)},l_=(Z)=>!ZJ.has(Z),z1=(Z)=>!!Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),XJ=(Z)=>z1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?T4:null:null,T4,n_=class Z{heap;length;static#q=!1;static create(X){let q=XJ(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]}},qJ;var QJ=B(()=>{G0=p_("lru-cache:metrics"),K2=u_("lru-cache"),d_=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ZJ=new Set,eQ=typeof process=="object"&&process?process:{},T4=class extends Array{constructor(Z){super(Z),this.fill(0)}},qJ=class Z{#q;#Q;#X;#Y;#K;#V;#A;#z;get perf(){return this.#z}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#H;#T;#U;#$;#Z;#L;#R;#B;#G;#j;#W;#O;#I;#M;#F;#w;#h;#_;#v;static unsafeExposeInternals(X){return{starts:X.#I,ttls:X.#M,autopurgeTimers:X.#F,sizes:X.#O,keyMap:X.#U,keyList:X.#$,valList:X.#Z,next:X.#L,prev:X.#R,get head(){return X.#B},get tail(){return X.#G},free:X.#j,isBackgroundFetch:(q)=>X.#J(q),backgroundFetch:(q,Q,J,$)=>X.#m(q,Q,J,$),moveToTail:(q)=>X.#b(q),indexes:(q)=>X.#k(q),rindexes:(q)=>X.#N(q),isStale:(q)=>X.#D(q)}}get max(){return this.#q}get maxSize(){return this.#Q}get calculatedSize(){return this.#T}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#A}get dispose(){return this.#X}get onInsert(){return this.#Y}get disposeAfter(){return this.#K}constructor(X){let{max:q=0,ttl:Q,ttlResolution:J=1,ttlAutopurge:$,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:U,dispose:W,onInsert:G,disposeAfter:V,noDisposeOnSet:_,noUpdateTTL:L,maxSize:z=0,maxEntrySize:R=0,sizeCalculation:D,fetchMethod:M,memoMethod:k,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:I,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:j,ignoreFetchAbort:A,backgroundFetchSize:f=1,perf:w}=X;if(this.backgroundFetchSize=f,w!==void 0&&typeof w?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#z=w??d_,q!==0&&!z1(q))throw TypeError("max option must be a nonnegative integer");let x=q?XJ(q):Array;if(!x)throw Error("invalid max value: "+q);if(this.#q=q,this.#Q=z,this.maxEntrySize=R||this.#Q,this.sizeCalculation=D,this.sizeCalculation){if(!this.#Q&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(k!==void 0&&typeof k!="function")throw TypeError("memoMethod must be a function if defined");if(this.#A=k,M!==void 0&&typeof M!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=M,this.#h=!!M,this.#U=new Map,this.#$=Array.from({length:q}).fill(void 0),this.#Z=Array.from({length:q}).fill(void 0),this.#L=new x(q),this.#R=new x(q),this.#B=0,this.#G=0,this.#j=n_.create(q),this.#H=0,this.#T=0,typeof W=="function"&&(this.#X=W),typeof G=="function"&&(this.#Y=G),typeof V=="function"?(this.#K=V,this.#W=[]):(this.#K=void 0,this.#W=void 0),this.#w=!!this.#X,this.#v=!!this.#Y,this.#_=!!this.#K,this.noDisposeOnSet=!!_,this.noUpdateTTL=!!L,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!j,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#Q!==0&&!z1(this.#Q))throw TypeError("maxSize must be a positive integer if specified");if(!z1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#a()}if(this.allowStale=!!U,this.noDeleteOnStaleGet=!!I,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=z1(J)||J===0?J:1,this.ttlAutopurge=!!$,this.ttl=Q||0,this.ttl){if(!z1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#u()}if(this.#q===0&&this.ttl===0&&this.#Q===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#q&&!this.#Q){let v="LRU_CACHE_UNBOUNDED";l_(v)&&(ZJ.add(v),c_("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",v,Z))}}getRemainingTTL(X){return this.#U.has(X)?1/0:0}#u(){let X=new T4(this.#q),q=new T4(this.#q);this.#M=X,this.#I=q;let Q=this.ttlAutopurge?Array.from({length:this.#q}):void 0;this.#F=Q,this.#p=(H,U,W=this.#z.now())=>{q[H]=U!==0?W:0,X[H]=U,J(H,U)},this.#y=(H)=>{q[H]=X[H]!==0?this.#z.now():0,J(H,X[H])};let J=this.ttlAutopurge?(H,U)=>{if(Q?.[H]&&(clearTimeout(Q[H]),Q[H]=void 0),U&&U!==0&&Q){let W=setTimeout(()=>{this.#D(H)&&this.#x(this.#$[H],"expire")},U+1);W.unref&&W.unref(),Q[H]=W}}:()=>{};this.#P=(H,U)=>{if(X[U]){let W=X[U],G=q[U];if(!W||!G)return;H.ttl=W,H.start=G,H.now=$||Y();let V=H.now-G;H.remainingTTL=W-V}};let $=0,Y=()=>{let H=this.#z.now();if(this.ttlResolution>0){$=H;let U=setTimeout(()=>$=0,this.ttlResolution);U.unref&&U.unref()}return H};this.getRemainingTTL=(H)=>{let U=this.#U.get(H);if(U===void 0)return 0;let W=X[U],G=q[U];if(!W||!G)return 1/0;let V=($||Y())-G;return W-V},this.#D=(H)=>{let U=q[H],W=X[H];return!!W&&!!U&&($||Y())-U>W}}#y=()=>{};#P=()=>{};#p=()=>{};#D=()=>!1;#a(){let X=new T4(this.#q);this.#T=0,this.#O=X,this.#C=(q)=>{this.#T-=X[q],X[q]=0},this.#d=(q,Q,J,$)=>{if(!z1(J)){if(this.#J(Q))return this.backgroundFetchSize;if($){if(typeof $!="function")throw TypeError("sizeCalculation must be a function");if(J=$(Q,q),!z1(J))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return J},this.#f=(q,Q,J)=>{if(X[q]=Q,this.#Q){let $=this.#Q-X[q];for(;this.#T>$;)this.#g(!0)}this.#T+=X[q],J&&(J.entrySize=Q,J.totalCalculatedSize=this.#T)}}#C=(X)=>{};#f=(X,q,Q)=>{};#d=(X,q,Q,J)=>{if(Q||J)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:X=this.allowStale}={}){if(this.#H)for(let q=this.#G;this.#c(q)&&((X||!this.#D(q))&&(yield q),q!==this.#B);)q=this.#R[q]}*#N({allowStale:X=this.allowStale}={}){if(this.#H)for(let q=this.#B;this.#c(q)&&((X||!this.#D(q))&&(yield q),q!==this.#G);)q=this.#L[q]}#c(X){return X!==void 0&&this.#U.get(this.#$[X])===X}*entries(){for(let X of this.#k())this.#Z[X]!==void 0&&this.#$[X]!==void 0&&!this.#J(this.#Z[X])&&(yield[this.#$[X],this.#Z[X]])}*rentries(){for(let X of this.#N())this.#Z[X]!==void 0&&this.#$[X]!==void 0&&!this.#J(this.#Z[X])&&(yield[this.#$[X],this.#Z[X]])}*keys(){for(let X of this.#k()){let q=this.#$[X];q!==void 0&&!this.#J(this.#Z[X])&&(yield q)}}*rkeys(){for(let X of this.#N()){let q=this.#$[X];q!==void 0&&!this.#J(this.#Z[X])&&(yield q)}}*values(){for(let X of this.#k())this.#Z[X]!==void 0&&!this.#J(this.#Z[X])&&(yield this.#Z[X])}*rvalues(){for(let X of this.#N())this.#Z[X]!==void 0&&!this.#J(this.#Z[X])&&(yield this.#Z[X])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(X,q={}){for(let Q of this.#k()){let J=this.#Z[Q],$=this.#J(J)?J.__staleWhileFetching:J;if($!==void 0&&X($,this.#$[Q],this))return this.#S(this.#$[Q],q)}}forEach(X,q=this){for(let Q of this.#k()){let J=this.#Z[Q],$=this.#J(J)?J.__staleWhileFetching:J;$!==void 0&&X.call(q,$,this.#$[Q],this)}}rforEach(X,q=this){for(let Q of this.#N()){let J=this.#Z[Q],$=this.#J(J)?J.__staleWhileFetching:J;$!==void 0&&X.call(q,$,this.#$[Q],this)}}purgeStale(){let X=!1;for(let q of this.#N({allowStale:!0}))this.#D(q)&&(this.#x(this.#$[q],"expire"),X=!0);return X}info(X){let q=this.#U.get(X);if(q===void 0)return;let Q=this.#Z[q],J=this.#J(Q)?Q.__staleWhileFetching:Q;if(J===void 0)return;let $={value:J};if(this.#M&&this.#I){let Y=this.#M[q],H=this.#I[q];if(Y&&H){let U=Y-(this.#z.now()-H);$.ttl=U,$.start=Date.now()}}return this.#O&&($.size=this.#O[q]),$}dump(){let X=[];for(let q of this.#k({allowStale:!0})){let Q=this.#$[q],J=this.#Z[q],$=this.#J(J)?J.__staleWhileFetching:J;if($===void 0||Q===void 0)continue;let Y={value:$};if(this.#M&&this.#I){Y.ttl=this.#M[q];let H=this.#z.now()-this.#I[q];Y.start=Math.floor(Date.now()-H)}this.#O&&(Y.size=this.#O[q]),X.unshift([Q,Y])}return X}load(X){this.clear();for(let[q,Q]of X){if(Q.start){let J=Date.now()-Q.start;Q.start=this.#z.now()-J}this.#E(q,Q.value,Q)}}set(X,q,Q={}){let{status:J=G0.hasSubscribers?{}:void 0}=Q;Q.status=J,J&&(J.op="set",J.key=X,q!==void 0&&(J.value=q),J.cache=this);let $=this.#E(X,q,Q);return J&&G0.hasSubscribers&&G0.publish(J),$}#E(X,q,Q,J){let{ttl:$=this.ttl,start:Y,noDisposeOnSet:H=this.noDisposeOnSet,sizeCalculation:U=this.sizeCalculation,status:W}=Q,G=this.#J(q);if(q===void 0)return W&&(W.set="deleted"),this.delete(X),this;let{noUpdateTTL:V=this.noUpdateTTL}=Q;W&&!G&&(W.value=q);let _=this.#d(X,q,Q.size||0,U,W);if(this.maxEntrySize&&_>this.maxEntrySize)return this.#x(X,"set"),W&&(W.set="miss",W.maxEntrySizeExceeded=!0),this;let L=this.#H===0?void 0:this.#U.get(X);if(L===void 0)L=this.#H===0?this.#G:this.#j.length!==0?this.#j.pop():this.#H===this.#q?this.#g(!1):this.#H,this.#$[L]=X,this.#Z[L]=q,this.#U.set(X,L),this.#L[this.#G]=L,this.#R[L]=this.#G,this.#G=L,this.#H++,this.#f(L,_,W),W&&(W.set="add"),V=!1,this.#v&&!G&&this.#Y?.(q,X,"add");else{this.#b(L);let z=this.#Z[L];if(q!==z){if(!H)if(this.#J(z)){z!==J&&z.__abortController.abort(Error("replaced"));let{__staleWhileFetching:R}=z;R!==void 0&&R!==q&&(this.#w&&this.#X?.(R,X,"set"),this.#_&&this.#W?.push([R,X,"set"]))}else this.#w&&this.#X?.(z,X,"set"),this.#_&&this.#W?.push([z,X,"set"]);if(this.#C(L),this.#f(L,_,W),this.#Z[L]=q,!G){let R=z&&this.#J(z)?z.__staleWhileFetching:z,D=R===void 0?"add":q!==R?"replace":"update";W&&(W.set=D,R!==void 0&&(W.oldValue=R)),this.#v&&this.onInsert?.(q,X,D)}}else G||(W&&(W.set="update"),this.#v&&this.onInsert?.(q,X,"update"))}if($!==0&&!this.#M&&this.#u(),this.#M&&(V||this.#p(L,$,Y),W&&this.#P(W,L)),!H&&this.#_&&this.#W){let z=this.#W,R;for(;R=z?.shift();)this.#K?.(...R)}return this}pop(){try{for(;this.#H;){let X=this.#Z[this.#B];if(this.#g(!0),this.#J(X)){if(X.__staleWhileFetching)return X.__staleWhileFetching}else if(X!==void 0)return X}}finally{if(this.#_&&this.#W){let X=this.#W,q;for(;q=X?.shift();)this.#K?.(...q)}}}#g(X){let q=this.#B,Q=this.#$[q],J=this.#Z[q],$=this.#J(J);$&&J.__abortController.abort(Error("evicted"));let Y=$?J.__staleWhileFetching:J;return(this.#w||this.#_)&&Y!==void 0&&(this.#w&&this.#X?.(Y,Q,"evict"),this.#_&&this.#W?.push([Y,Q,"evict"])),this.#C(q),this.#F?.[q]&&(clearTimeout(this.#F[q]),this.#F[q]=void 0),X&&(this.#$[q]=void 0,this.#Z[q]=void 0,this.#j.push(q)),this.#H===1?(this.#B=this.#G=0,this.#j.length=0):this.#B=this.#L[q],this.#U.delete(Q),this.#H--,q}has(X,q={}){let{status:Q=G0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="has",Q.key=X,Q.cache=this);let J=this.#o(X,q);return G0.hasSubscribers&&G0.publish(Q),J}#o(X,q={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:J}=q,$=this.#U.get(X);if($!==void 0){let Y=this.#Z[$];if(this.#J(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D($))J&&(J.has="stale",this.#P(J,$));else return Q&&this.#y($),J&&(J.has="hit",this.#P(J,$)),!0}else J&&(J.has="miss");return!1}peek(X,q={}){let{status:Q=m7()?{}:void 0}=q;Q&&(Q.op="peek",Q.key=X,Q.cache=this),q.status=Q;let J=this.#s(X,q);return G0.hasSubscribers&&G0.publish(Q),J}#s(X,q){let{status:Q,allowStale:J=this.allowStale}=q,$=this.#U.get(X);if($===void 0||!J&&this.#D($)){Q&&(Q.peek=$===void 0?"miss":"stale");return}let Y=this.#Z[$],H=this.#J(Y)?Y.__staleWhileFetching:Y;return Q&&(H!==void 0?(Q.peek="hit",Q.value=H):Q.peek="miss"),H}#m(X,q,Q,J){let $=q===void 0?void 0:this.#Z[q];if(this.#J($))return $;let Y=new AbortController,{signal:H}=Q;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let U={signal:Y.signal,options:Q,context:J},W=(R,D=!1)=>{let{aborted:M}=Y.signal,k=Q.ignoreFetchAbort&&R!==void 0,F=Q.ignoreFetchAbort||!!(Q.allowStaleOnFetchAbort&&R!==void 0);if(Q.status&&(M&&!D?(Q.status.fetchAborted=!0,Q.status.fetchError=Y.signal.reason,k&&(Q.status.fetchAbortIgnored=!0)):Q.status.fetchResolved=!0),M&&!k&&!D)return V(Y.signal.reason,F);let I=L,T=this.#Z[q];return(T===L||T===void 0&&k&&D)&&(R===void 0?I.__staleWhileFetching!==void 0?this.#Z[q]=I.__staleWhileFetching:this.#x(X,"fetch"):(Q.status&&(Q.status.fetchUpdated=!0),this.#E(X,R,U.options,I))),R},G=(R)=>(Q.status&&(Q.status.fetchRejected=!0,Q.status.fetchError=R),V(R,!1)),V=(R,D)=>{let{aborted:M}=Y.signal,k=M&&Q.allowStaleOnFetchAbort,F=k||Q.allowStaleOnFetchRejection,I=F||Q.noDeleteOnFetchRejection,T=L;if(this.#Z[q]===L&&(!I||!D&&T.__staleWhileFetching===void 0?this.#x(X,"fetch"):k||(this.#Z[q]=T.__staleWhileFetching)),F)return Q.status&&T.__staleWhileFetching!==void 0&&(Q.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw R},_=(R,D)=>{let M=this.#V?.(X,$,U);Y.signal.addEventListener("abort",()=>{(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort)&&(R(void 0),Q.allowStaleOnFetchAbort&&(R=(k)=>W(k,!0)))}),M&&M instanceof Promise?M.then((k)=>R(k===void 0?void 0:k),D):M!==void 0&&R(M)};Q.status&&(Q.status.fetchDispatched=!0);let L=new Promise(_).then(W,G),z=Object.assign(L,{__abortController:Y,__staleWhileFetching:$,__returned:void 0});return q===void 0?(this.#E(X,z,{...U.options,status:void 0}),q=this.#U.get(X)):this.#Z[q]=z,z}#J(X){if(!this.#h)return!1;let q=X;return!!q&&q instanceof Promise&&q.hasOwnProperty("__staleWhileFetching")&&q.__abortController instanceof AbortController}fetch(X,q={}){let Q=K2.hasSubscribers,{status:J=m7()?{}:void 0}=q;q.status=J,J&&q.context&&(J.context=q.context);let $=this.#l(X,q);return J&&Q&&(J.trace=!0,K2.tracePromise(()=>$,J).catch(()=>{})),$}async#l(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:J=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:U=0,sizeCalculation:W=this.sizeCalculation,noUpdateTTL:G=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:_=this.allowStaleOnFetchRejection,ignoreFetchAbort:L=this.ignoreFetchAbort,allowStaleOnFetchAbort:z=this.allowStaleOnFetchAbort,context:R,forceRefresh:D=!1,status:M,signal:k}=q;if(M&&(M.op="fetch",M.key=X,D&&(M.forceRefresh=!0),M.cache=this),!this.#h)return M&&(M.fetch="get"),this.#S(X,{allowStale:Q,updateAgeOnGet:J,noDeleteOnStaleGet:$,status:M});let F={allowStale:Q,updateAgeOnGet:J,noDeleteOnStaleGet:$,ttl:Y,noDisposeOnSet:H,size:U,sizeCalculation:W,noUpdateTTL:G,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:z,ignoreFetchAbort:L,status:M,signal:k},I=this.#U.get(X);if(I===void 0){M&&(M.fetch="miss");let T=this.#m(X,I,F,R);return T.__returned=T}else{let T=this.#Z[I];if(this.#J(T)){let w=Q&&T.__staleWhileFetching!==void 0;return M&&(M.fetch="inflight",w&&(M.returnedStale=!0)),w?T.__staleWhileFetching:T.__returned=T}let j=this.#D(I);if(!D&&!j)return M&&(M.fetch="hit"),this.#b(I),J&&this.#y(I),M&&this.#P(M,I),T;let A=this.#m(X,I,F,R),f=A.__staleWhileFetching!==void 0&&Q;return M&&(M.fetch=j?"stale":"refresh",f&&j&&(M.returnedStale=!0)),f?A.__staleWhileFetching:A.__returned=A}}forceFetch(X,q={}){let Q=K2.hasSubscribers,{status:J=m7()?{}:void 0}=q;q.status=J,J&&q.context&&(J.context=q.context);let $=this.#r(X,q);return J&&Q&&(J.trace=!0,K2.tracePromise(()=>$,J).catch(()=>{})),$}async#r(X,q={}){let Q=await this.#l(X,q);if(Q===void 0)throw Error("fetch() returned undefined");return Q}memo(X,q={}){let{status:Q=G0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="memo",Q.key=X,q.context&&(Q.context=q.context),Q.cache=this);let J=this.#t(X,q);return Q&&(Q.value=J),G0.hasSubscribers&&G0.publish(Q),J}#t(X,q={}){let Q=this.#A;if(!Q)throw Error("no memoMethod provided to constructor");let{context:J,status:$,forceRefresh:Y,...H}=q;$&&Y&&($.forceRefresh=!0);let U=this.#S(X,H),W=Y||U===void 0;if($&&($.memo=W?"miss":"hit",W||($.value=U)),!W)return U;let G=Q(X,U,{options:H,context:J});return $&&($.value=G),this.#E(X,G,H),G}get(X,q={}){let{status:Q=G0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="get",Q.key=X,Q.cache=this);let J=this.#S(X,q);return Q&&(J!==void 0&&(Q.value=J),G0.hasSubscribers&&G0.publish(Q)),J}#S(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:J=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,status:Y}=q,H=this.#U.get(X);if(H===void 0){Y&&(Y.get="miss");return}let U=this.#Z[H],W=this.#J(U);return Y&&this.#P(Y,H),this.#D(H)?W?(Y&&(Y.get="stale-fetching"),Q&&U.__staleWhileFetching!==void 0?(Y&&(Y.returnedStale=!0),U.__staleWhileFetching):void 0):($||this.#x(X,"expire"),Y&&(Y.get="stale"),Q?(Y&&(Y.returnedStale=!0),U):void 0):(Y&&(Y.get=W?"fetching":"hit"),this.#b(H),J&&this.#y(H),W?U.__staleWhileFetching:U)}#n(X,q){this.#R[q]=X,this.#L[X]=q}#b(X){X!==this.#G&&(X===this.#B?this.#B=this.#L[X]:this.#n(this.#R[X],this.#L[X]),this.#n(this.#G,X),this.#G=X)}delete(X){return this.#x(X,"delete")}#x(X,q){G0.hasSubscribers&&G0.publish({op:"delete",delete:q,key:X,cache:this});let Q=!1;if(this.#H!==0){let J=this.#U.get(X);if(J!==void 0)if(this.#F?.[J]&&(clearTimeout(this.#F?.[J]),this.#F[J]=void 0),Q=!0,this.#H===1)this.#i(q);else{this.#C(J);let $=this.#Z[J];if(this.#J($)?$.__abortController.abort(Error("deleted")):(this.#w||this.#_)&&(this.#w&&this.#X?.($,X,q),this.#_&&this.#W?.push([$,X,q])),this.#U.delete(X),this.#$[J]=void 0,this.#Z[J]=void 0,J===this.#G)this.#G=this.#R[J];else if(J===this.#B)this.#B=this.#L[J];else{let Y=this.#R[J];this.#L[Y]=this.#L[J];let H=this.#L[J];this.#R[H]=this.#R[J]}this.#H--,this.#j.push(J)}}if(this.#_&&this.#W?.length){let J=this.#W,$;for(;$=J?.shift();)this.#K?.(...$)}return Q}clear(){return this.#i("delete")}#i(X){for(let q of this.#N({allowStale:!0})){let Q=this.#Z[q];if(this.#J(Q))Q.__abortController.abort(Error("deleted"));else{let J=this.#$[q];this.#w&&this.#X?.(Q,J,X),this.#_&&this.#W?.push([Q,J,X])}}if(this.#U.clear(),this.#Z.fill(void 0),this.#$.fill(void 0),this.#M&&this.#I){this.#M.fill(0),this.#I.fill(0);for(let q of this.#F??[])q!==void 0&&clearTimeout(q);this.#F?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#B=0,this.#G=0,this.#j.length=0,this.#T=0,this.#H=0,this.#_&&this.#W){let q=this.#W,Q;for(;Q=q?.shift();)this.#K?.(...Q)}}}});function xP(Z,X=300000){let q=new Map,Q=new Map,J=async(...$)=>{let Y=m($),H=q.get(Y),U=Date.now();if(!H){let W=Q.get(Y);if(W)return W;let G=Z(...$);Q.set(Y,G);try{let V=await G;if(Q.get(Y)===G)q.set(Y,{value:V,timestamp:U,refreshing:!1});return V}finally{if(Q.get(Y)===G)Q.delete(Y)}}if(H&&U-H.timestamp>X&&!H.refreshing){H.refreshing=!0;let W=H;return Z(...$).then((G)=>{if(q.get(Y)===W)q.set(Y,{value:G,timestamp:Date.now(),refreshing:!1})}).catch((G)=>{if(g(G),q.get(Y)===W)q.delete(Y)}),H.value}return q.get(Y).value};return J.cache={clear:()=>{q.clear(),Q.clear()}},J}function R1(Z,X,q=100){let Q=new qJ({max:q}),J=(...$)=>{let Y=X(...$),H=Q.get(Y);if(H!==void 0)return H;let U=Z(...$);return Q.set(Y,U),U};return J.cache={clear:()=>Q.clear(),size:()=>Q.size,delete:($)=>Q.delete($),get:($)=>Q.peek($),has:($)=>Q.has($)},J}var j4=B(()=>{QJ();p0();z0()});import*as z6 from"path";import*as JJ from"path/win32";function u7(Z){try{return _6(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function i_(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(u7(q))return q}try{let q=_6(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
|
|
4
|
+
`).filter(Boolean),Q=s().toLowerCase();for(let J of q){let $=z6.resolve(J).toLowerCase();if(z6.dirname($).toLowerCase()===Q||$.startsWith(Q+z6.sep)){P(`Skipping potentially malicious executable in current directory: ${J}`);continue}return J}return null}catch{return null}}function hP(){if(y0()==="windows"){let Z=a_();process.env.SHELL=Z,P(`Using bash path: "${Z}"`)}}var a_,fP,$J;var YJ=B(()=>{v1();Z1();M1();g7();j4();V6();a_=d(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(u7(process.env.CLAUDE_CODE_GIT_BASH_PATH))return process.env.CLAUDE_CODE_GIT_BASH_PATH;console.error(`Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "${process.env.CLAUDE_CODE_GIT_BASH_PATH}"`),process.exit(1)}let Z=i_("git");if(Z){let X=JJ.join(Z,"..","..","bin","bash.exe");if(u7(X))return X}console.error("Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe"),process.exit(1)}),fP=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),$J=R1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let X=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(X){let Q=X[1].toUpperCase(),J=Z.slice(("/cygdrive/"+X[1]).length);return Q+":"+(J||"\\").replace(/\//g,"\\")}let q=Z.match(/^\/([A-Za-z])(\/|$)/);if(q){let Q=q[1].toUpperCase(),J=Z.slice(2);return Q+":"+(J||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as HJ}from"os";import{dirname as KJ,isAbsolute as s_,join as r_,normalize as p7,relative as t_,resolve as e_}from"path";function c7(Z,X){let q=X??s()??N().cwd();if(typeof Z!=="string")throw TypeError(`Path must be a string, received ${typeof Z}`);if(typeof q!=="string")throw TypeError(`Base directory must be a string, received ${typeof q}`);if(Z.includes("\x00")||q.includes("\x00"))throw Error("Path contains null bytes");let Q=Z.trim();if(!Q)return p7(q).normalize("NFC");if(Q==="~")return HJ().normalize("NFC");if(Q.startsWith("~/"))return r_(HJ(),Q.slice(2)).normalize("NFC");let J=Q;if(y0()==="windows"&&Q.match(/^\/[a-z]\//i))try{J=$J(Q)}catch{J=Q}if(s_(J))return p7(J).normalize("NFC");return e_(q,J).normalize("NFC")}function nP(Z){let X=t_(s(),Z);return X.startsWith("..")?Z:X}function iP(Z){let X=c7(Z);if(X.startsWith("\\\\")||X.startsWith("//"))return KJ(X);try{if(N().statSync(X).isDirectory())return X}catch{}return KJ(X)}function aP(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function y1(Z){return p7(Z).replace(/\\/g,"/")}var O4=B(()=>{Z1();F0();V6();YJ();o_()});function Xz(Z,X,q){if(q!==void 0&&!I4(Z[X],q)||q===void 0&&!(X in Z))GJ(Z,X,q)}var U2;var l7=B(()=>{Zz();UJ();U2=Xz});function qz(Z){return function(X,q,Q){var J=-1,$=Object(X),Y=Q(X),H=Y.length;while(H--){var U=Y[Z?H:++J];if(q($[U],U,$)===!1)break}return X}}var WJ;var VJ=B(()=>{WJ=qz});var Qz,BJ;var LJ=B(()=>{VJ();Qz=WJ(),BJ=Qz});function Jz(Z){return w4(Z)&&k4(Z)}var RJ;var MJ=B(()=>{zJ();_J();RJ=Jz});function Vz(Z){if(!w4(Z)||FJ(Z)!=Hz)return!1;var X=DJ(Z);if(X===null)return!0;var q=Gz.call(X,"constructor")&&X.constructor;return typeof q=="function"&&q instanceof q&&AJ.call(q)==Wz}var Hz="[object Object]",Kz,Uz,AJ,Gz,Wz,TJ;var jJ=B(()=>{$z();Yz();_J();Kz=Function.prototype,Uz=Object.prototype,AJ=Kz.toString,Gz=Uz.hasOwnProperty,Wz=AJ.call(Object);TJ=Vz});function Bz(Z,X){if(X==="constructor"&&typeof Z[X]==="function")return;if(X=="__proto__")return;return Z[X]}var G2;var n7=B(()=>{G2=Bz});function _z(Z){return OJ(Z,N4(Z))}var wJ;var kJ=B(()=>{Lz();IJ();wJ=_z});function Iz(Z,X,q,Q,J,$,Y){var H=G2(Z,q),U=G2(X,q),W=Y.get(U);if(W){U2(Z,q,W);return}var G=$?$(H,U,q+"",Z,X,Y):void 0,V=G===void 0;if(V){var _=i7(U),L=!_&&xJ(U),z=!_&&!L&&PJ(U);if(G=U,_||L||z)if(i7(H))G=H;else if(RJ(H))G=vJ(H);else if(L)V=!1,G=EJ(U,!0);else if(z)V=!1,G=yJ(U,!0);else G=[];else if(TJ(U)||a7(U)){if(G=H,a7(H))G=wJ(H);else if(!e0(H)||NJ(H))G=CJ(U)}else V=!1}if(V)Y.set(U,G),J(G,U,Q,$,Y),Y.delete(U);U2(Z,q,G)}var SJ;var bJ=B(()=>{l7();Az();jz();Tz();Oz();Mz();Rz();MJ();Fz();zz();M4();jJ();Dz();n7();kJ();SJ=Iz});function fJ(Z,X,q,Q,J){if(Z===X)return;BJ(X,function($,Y){if(J||(J=new hJ),e0($))SJ(Z,X,Y,q,fJ,Q,J);else{var H=Q?Q(G2(Z,Y),$,Y+"",Z,X,J):void 0;if(H===void 0)H=$;U2(Z,Y,H)}},N4)}var gJ;var mJ=B(()=>{wz();l7();LJ();bJ();M4();IJ();n7();gJ=fJ});function kz(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 uJ;var pJ=B(()=>{uJ=kz});function Nz(Z,X,q){return X=dJ(X===void 0?Z.length-1:X,0),function(){var Q=arguments,J=-1,$=dJ(Q.length-X,0),Y=Array($);while(++J<$)Y[J]=Q[X+J];J=-1;var H=Array(X+1);while(++J<X)H[J]=Q[J];return H[X]=q(Y),uJ(Z,this,H)}}var dJ,cJ;var lJ=B(()=>{pJ();dJ=Math.max;cJ=Nz});function xz(Z){return function(){return Z}}var nJ;var iJ=B(()=>{nJ=xz});var Ez,oJ;var sJ=B(()=>{iJ();Pz();aJ();Ez=!o7?x4:function(Z,X){return o7(Z,"toString",{configurable:!0,enumerable:!1,value:nJ(X),writable:!0})},oJ=Ez});function Sz(Z){var X=0,q=0;return function(){var Q=Cz(),J=yz-(Q-q);if(q=Q,J>0){if(++X>=vz)return arguments[0]}else X=0;return Z.apply(void 0,arguments)}}var vz=800,yz=16,Cz,rJ;var tJ=B(()=>{Cz=Date.now;rJ=Sz});var bz,eJ;var Z$=B(()=>{sJ();tJ();bz=rJ(oJ),eJ=bz});function hz(Z,X){return eJ(cJ(Z,X,x4),Z+"")}var X$;var q$=B(()=>{aJ();lJ();Z$();X$=hz});function fz(Z,X,q){if(!e0(q))return!1;var Q=typeof X;if(Q=="number"?k4(q)&&F4(X,q.length):Q=="string"&&(X in q))return I4(q[X],Z);return!1}var Q$;var J$=B(()=>{UJ();zJ();mQ();M4();Q$=fz});function gz(Z){return X$(function(X,q){var Q=-1,J=q.length,$=J>1?q[J-1]:void 0,Y=J>2?q[2]:void 0;if($=Z.length>3&&typeof $=="function"?(J--,$):void 0,Y&&Q$(q[0],q[1],Y))$=J<3?void 0:$,J=1;X=Object(X);while(++Q<J){var H=q[Q];if(H)Z(X,H,Q,$)}return X})}var $$;var Y$=B(()=>{q$();J$();$$=gz});var mz,X1;var H$=B(()=>{mJ();Y$();mz=$$(function(Z,X,q,Q){gJ(Z,X,q,Q)}),X1=mz});function s7(Z){let{buffer:X,bytesRead:q}=N().readSync(Z,{length:4096});if(q===0)return"utf8";if(q>=2){if(X[0]===255&&X[1]===254)return"utf16le"}if(q>=3&&X[0]===239&&X[1]===187&&X[2]===191)return"utf8";return"utf8"}function r7(Z){let X=0,q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===`
|
|
5
|
+
`)if(Q>0&&Z[Q-1]==="\r")X++;else q++;return X>q?"CRLF":"LF"}function uz(Z){let X=N(),{resolvedPath:q,isSymlink:Q}=F1(X,Z);if(Q)P(`Reading through symlink: ${Z} -> ${q}`);let J=s7(q),$=X.readFileSync(q,{encoding:J}),Y=r7($.slice(0,4096));return{content:$.replaceAll(`\r
|
|
6
|
+
`,`
|
|
7
|
+
`),encoding:J,lineEndings:Y}}function q1(Z){return uz(Z).content}var W2=B(()=>{M1();F0()});function d0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var P4=()=>{};import{join as pz}from"path";function Av(Z){V2=Z}function Tv(){V2=null,t7=void 0}function jv(Z){return t7=Z,Z}function cz(){return pz(K0(),dz)}function lz(){try{let Z=q1(cz()),X=X0(d0(Z));if(!X||typeof X!=="object"||Array.isArray(X))return null;return X}catch{return null}}function E4(){if(t7!==!0)return null;if(V2)return V2;let Z=lz();if(Z)return V2=Z,B2(),Z;return null}var dz="remote-settings.json",V2=null,t7;var U$=B(()=>{c0();W2();P4();K$();z0()});function Iv(Z,X){return Z.flatMap((q,Q)=>Q?[X(Q),q]:[q])}function e7(Z,X){let q=0;for(let Q of Z)q+=+!!X(Q);return q}function G$(Z){return[...new Set(Z)]}var Z3=()=>{};class W${cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let X=N(),q;try{q=X.statSync(Z)}catch(Y){throw this.cache.delete(Z),Y}let Q=this.cache.get(Z);if(Q&&Q.mtime===q.mtimeMs)return{content:Q.content,encoding:Q.encoding};let J=B$(Z),$=X.readFileSync(Z,{encoding:J}).replaceAll(`\r
|
|
8
|
+
`,`
|
|
9
|
+
`);if(q.size<=this.maxEntryBytes){if(this.cache.set(Z,{content:$,encoding:J,mtime:q.mtimeMs}),this.cache.size>this.maxCacheSize){let Y=this.cache.keys().next().value;if(Y)this.cache.delete(Y)}}return{content:$,encoding:J}}clear(){this.cache.clear()}invalidate(Z){this.cache.delete(Z)}getStats(){return{size:this.cache.size,entries:Array.from(this.cache.keys())}}get size(){return this.cache.size}}var X3;var V$=B(()=>{v4();F0();X3=new W$});import{chmodSync as nz,writeFileSync as L$}from"fs";import{realpath as iz,stat as F$}from"fs/promises";import{homedir as D$}from"os";import{basename as q3,dirname as y4,extname as _$,isAbsolute as az,join as R6,normalize as oz,relative as A$,resolve as sz,sep as L2}from"path";async function lv(Z){try{return await F$(Z),!0}catch{return!1}}function nv(Z){try{return N().readFileSync(Z,{encoding:"utf8"})}catch(X){return g(X),null}}function iv(Z){let X=N();return Math.floor(X.statSync(Z).mtimeMs)}async function av(Z){let X=await N().stat(Z);return Math.floor(X.mtimeMs)}function ov(Z,X,q,Q){let J=X;if(Q==="CRLF")J=X.replaceAll(`\r
|
|
10
|
+
`,`
|
|
11
|
+
`).split(`
|
|
12
|
+
`).join(`\r
|
|
13
|
+
`);F6(Z,J,{encoding:q}),X3.invalidate(Z)}function B$(Z){try{let X=N(),{resolvedPath:q}=F1(X,Z);return s7(q)}catch(X){if(M$(X))P(`detectFileEncoding failed for expected reason: ${X.code}`,{level:"debug"});else g(X);return"utf8"}}function sv(Z,X="utf8"){try{let q=N(),{resolvedPath:Q}=F1(q,Z),{buffer:J,bytesRead:$}=q.readSync(Q,{length:4096}),Y=J.toString(X,0,$);return r7(Y)}catch(q){return g(q),"LF"}}function rv(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(X)=>" ".repeat(X.length))}function tz(Z){let X=Z?c7(Z):void 0,q=X?A$(s(),X):void 0;return{absolutePath:X,relativePath:q}}function tv(Z){let{relativePath:X}=tz(Z);if(X&&!X.startsWith(".."))return X;let q=D$();if(Z.startsWith(q+L2))return"~"+Z.slice(q.length);return Z}function ev(Z){let X=N();try{let q=y4(Z),Q=q3(Z,_$(Z)),Y=X.readdirSync(q).filter((H)=>q3(H.name,_$(H.name))===Q&&R6(q,H.name)!==Z)[0];if(Y)return Y.name;return}catch(q){if(!M6(q))g(q);return}}async function Xy(Z){let X=s(),q=y4(X),Q=Z;try{let H=await iz(y4(Z));Q=R6(H,q3(Z))}catch{}let J=q===L2?L2:q+L2;if(!Q.startsWith(J)||Q.startsWith(X+L2)||Q===X)return;let $=A$(q,Q),Y=R6(X,$);try{return await F$(Y),Y}catch{return}}function ez(){return!S1("tengu_compact_line_prefix_killswitch",!1)}function qy({content:Z,startLine:X}){if(!Z)return"";let q=Z.split(/\r?\n/);if(ez())return q.map((Q,J)=>`${J+X}→${Q}`).join(`
|
|
14
|
+
`);return q.map((Q,J)=>{let $=String(J+X);if($.length>=6)return`${$}→${Q}`;return`${$.padStart(6," ")}→${Q}`}).join(`
|
|
15
|
+
`)}function Qy(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function Jy(Z){try{return N().isDirEmptySync(Z)}catch(X){return M6(X)}}function $y(Z){let{content:X}=X3.readFile(Z);return X}function F6(Z,X,q={encoding:"utf-8"}){let Q=N(),J=Z;try{let U=Q.readlinkSync(Z);J=az(U)?U:sz(y4(Z),U),P(`Writing through symlink: ${Z} -> ${J}`)}catch{}let $=`${J}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=Q.statSync(J).mode,H=!0,P(`Preserving file permissions: ${Y.toString(8)}`)}catch(U){if(!M6(U))throw U;if(q.mode!==void 0)Y=q.mode,P(`Setting permissions for new file: ${Y.toString(8)}`)}try{P(`Writing to temp file: ${$}`);let U={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)U.mode=q.mode;if(L$($,X,U),P(`Temp file written successfully, size: ${X.length} bytes`),H&&Y!==void 0)nz($,Y),P("Applied original permissions to temp file");P(`Renaming ${$} to ${J}`),Q.renameSync($,J),P(`File ${J} written atomically`)}catch(U){P(`Failed to write file atomically: ${U}`,{level:"error"}),l0("tengu_atomic_write_error",{});try{P(`Cleaning up temp file: ${$}`),Q.unlinkSync($)}catch(W){P(`Failed to clean up temp file: ${W}`)}P(`Falling back to non-atomic write for ${J}`);try{let W={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)W.mode=q.mode;L$(J,X,W),P(`File ${J} written successfully with non-atomic fallback`)}catch(W){throw P(`Non-atomic write also failed: ${W}`),W}}}function Yy(){let Z=y0(),X=D$();if(Z==="macos")return R6(X,"Desktop");if(Z==="windows"){let Q=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(Q){let $=`/mnt/c${Q.replace(/^[A-Z]:/,"")}/Desktop`;if(N().existsSync($))return $}try{let $=N().readdirSync("/mnt/c/Users");for(let Y of $){if(Y.name==="Public"||Y.name==="Default"||Y.name==="Default User"||Y.name==="All Users")continue;let H=R6("/mnt/c/Users",Y.name,"Desktop");if(N().existsSync(H))return H}}catch(J){g(J)}}let q=R6(X,"Desktop");if(N().existsSync(q))return q;return X}function Hy(Z,X=rz){try{return N().statSync(Z).size<=X}catch{return!1}}function z$(Z){let X=oz(Z);if(y0()==="windows")X=X.replace(/\//g,"\\").toLowerCase();return X}function Ky(Z,X){return z$(Z)===z$(X)}var rz=262144,Zy="Note: your current working directory is";var v4=B(()=>{R$();Q3();Z1();M1();C1();W2();V$();F0();p0();O4();V6()});import{appendFile as ZR,mkdir as XR,readFile as qR,writeFile as QR}from"fs/promises";import{homedir as JR}from"os";import{dirname as $R,join as YR}from"path";async function HR(Z,X){let{code:q}=await J3("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:X});return q===0}function KR(){return YR(JR(),".config","git","ignore")}async function j$(Z,X=s()){try{if(!await T$(X))return;let q=`**/${Z}`,Q=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await HR(Q,X))return;let J=KR(),$=$R(J);await XR($,{recursive:!0});try{if((await qR(J,{encoding:"utf-8"})).includes(q))return;await ZR(J,`
|
|
16
|
+
${q}
|
|
17
|
+
`)}catch(Y){if(W0(Y)==="ENOENT")await QR(J,`${q}
|
|
18
|
+
`,"utf-8");else throw Y}}catch(q){g(q)}}var O$=B(()=>{Z1();C1();C4();_2();p0()});function R2(Z,X=!1){let q=Z.length,Q=0,J="",$=0,Y=16,H=0,U=0,W=0,G=0,V=0;function _(F,I){let T=0,j=0;while(T<F||!I){let A=Z.charCodeAt(Q);if(A>=48&&A<=57)j=j*16+A-48;else if(A>=65&&A<=70)j=j*16+A-65+10;else if(A>=97&&A<=102)j=j*16+A-97+10;else break;Q++,T++}if(T<F)j=-1;return j}function L(F){Q=F,J="",$=0,Y=16,V=0}function z(){let F=Q;if(Z.charCodeAt(Q)===48)Q++;else{Q++;while(Q<Z.length&&D6(Z.charCodeAt(Q)))Q++}if(Q<Z.length&&Z.charCodeAt(Q)===46)if(Q++,Q<Z.length&&D6(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&D6(Z.charCodeAt(Q)))Q++}else return V=3,Z.substring(F,Q);let I=Q;if(Q<Z.length&&(Z.charCodeAt(Q)===69||Z.charCodeAt(Q)===101)){if(Q++,Q<Z.length&&Z.charCodeAt(Q)===43||Z.charCodeAt(Q)===45)Q++;if(Q<Z.length&&D6(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&D6(Z.charCodeAt(Q)))Q++;I=Q}else V=3}return Z.substring(F,I)}function R(){let F="",I=Q;while(!0){if(Q>=q){F+=Z.substring(I,Q),V=2;break}let T=Z.charCodeAt(Q);if(T===34){F+=Z.substring(I,Q),Q++;break}if(T===92){if(F+=Z.substring(I,Q),Q++,Q>=q){V=2;break}switch(Z.charCodeAt(Q++)){case 34:F+='"';break;case 92:F+="\\";break;case 47:F+="/";break;case 98:F+="\b";break;case 102:F+="\f";break;case 110:F+=`
|
|
19
|
+
`;break;case 114:F+="\r";break;case 116:F+="\t";break;case 117:let A=_(4,!0);if(A>=0)F+=String.fromCharCode(A);else V=4;break;default:V=5}I=Q;continue}if(T>=0&&T<=31)if(z2(T)){F+=Z.substring(I,Q),V=2;break}else V=6;Q++}return F}function D(){if(J="",V=0,$=Q,U=H,G=W,Q>=q)return $=q,Y=17;let F=Z.charCodeAt(Q);if($3(F)){do Q++,J+=String.fromCharCode(F),F=Z.charCodeAt(Q);while($3(F));return Y=15}if(z2(F)){if(Q++,J+=String.fromCharCode(F),F===13&&Z.charCodeAt(Q)===10)Q++,J+=`
|
|
20
|
+
`;return H++,W=Q,Y=14}switch(F){case 123:return Q++,Y=1;case 125:return Q++,Y=2;case 91:return Q++,Y=3;case 93:return Q++,Y=4;case 58:return Q++,Y=6;case 44:return Q++,Y=5;case 34:return Q++,J=R(),Y=10;case 47:let I=Q-1;if(Z.charCodeAt(Q+1)===47){Q+=2;while(Q<q){if(z2(Z.charCodeAt(Q)))break;Q++}return J=Z.substring(I,Q),Y=12}if(Z.charCodeAt(Q+1)===42){Q+=2;let T=q-1,j=!1;while(Q<T){let A=Z.charCodeAt(Q);if(A===42&&Z.charCodeAt(Q+1)===47){Q+=2,j=!0;break}if(Q++,z2(A)){if(A===13&&Z.charCodeAt(Q)===10)Q++;H++,W=Q}}if(!j)Q++,V=1;return J=Z.substring(I,Q),Y=13}return J+=String.fromCharCode(F),Q++,Y=16;case 45:if(J+=String.fromCharCode(F),Q++,Q===q||!D6(Z.charCodeAt(Q)))return Y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return J+=z(),Y=11;default:while(Q<q&&M(F))Q++,F=Z.charCodeAt(Q);if($!==Q){switch(J=Z.substring($,Q),J){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return J+=String.fromCharCode(F),Q++,Y=16}}function M(F){if($3(F)||z2(F))return!1;switch(F){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function k(){let F;do F=D();while(F>=12&&F<=15);return F}return{setPosition:L,getPosition:()=>Q,scan:X?k:D,getToken:()=>Y,getTokenValue:()=>J,getTokenOffset:()=>$,getTokenLength:()=>Q-$,getTokenStartLine:()=>U,getTokenStartCharacter:()=>$-G,getTokenError:()=>V}}function $3(Z){return Z===32||Z===9}function z2(Z){return Z===10||Z===13}function D6(Z){return Z>=48&&Z<=57}var I$;var S4=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"})(I$||(I$={}))});var D0,Y3,w$;var k$=B(()=>{D0=Array(20).fill(0).map((Z,X)=>{return" ".repeat(X)}),Y3={" ":{"\n":Array(200).fill(0).map((Z,X)=>{return`
|
|
21
|
+
`+" ".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+" ".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
|
|
22
|
+
`+" ".repeat(X)})},"\t":{"\n":Array(200).fill(0).map((Z,X)=>{return`
|
|
23
|
+
`+"\t".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+"\t".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
|
|
24
|
+
`+"\t".repeat(X)})}},w$=[`
|
|
25
|
+
`,"\r",`\r
|
|
26
|
+
`]});function H3(Z,X,q){let Q,J,$,Y,H;if(X){Y=X.offset,H=Y+X.length,$=Y;while($>0&&!M2(Z,$-1))$--;let T=H;while(T<Z.length&&!M2(Z,T))T++;J=Z.substring($,T),Q=GR(J,q)}else J=Z,Q=0,$=0,Y=0,H=Z.length;let U=WR(q,Z),W=w$.includes(U),G=0,V=0,_;if(q.insertSpaces)_=D0[q.tabSize||4]??A6(D0[1],q.tabSize||4);else _="\t";let L=_==="\t"?"\t":" ",z=R2(J,!1),R=!1;function D(){if(G>1)return A6(U,G)+A6(_,Q+V);let T=_.length*(Q+V);if(!W||T>Y3[L][U].length)return U+A6(_,Q+V);if(T<=0)return U;return Y3[L][U][T]}function M(){let T=z.scan();G=0;while(T===15||T===14){if(T===14&&q.keepLines)G+=1;else if(T===14)G=1;T=z.scan()}return R=T===16||z.getTokenError()!==0,T}let k=[];function F(T,j,A){if(!R&&(!X||j<H&&A>Y)&&Z.substring(j,A)!==T)k.push({offset:j,length:A-j,content:T})}let I=M();if(q.keepLines&&G>0)F(A6(U,G),0,0);if(I!==17){let T=z.getTokenOffset()+$,j=_.length*Q<20&&q.insertSpaces?D0[_.length*Q]:A6(_,Q);F(j,$,T)}while(I!==17){let T=z.getTokenOffset()+z.getTokenLength()+$,j=M(),A="",f=!1;while(G===0&&(j===12||j===13)){let x=z.getTokenOffset()+$;F(D0[1],T,x),T=z.getTokenOffset()+z.getTokenLength()+$,f=j===12,A=f?D():"",j=M()}if(j===2){if(I!==1)V--;if(q.keepLines&&G>0||!q.keepLines&&I!==1)A=D();else if(q.keepLines)A=D0[1]}else if(j===4){if(I!==3)V--;if(q.keepLines&&G>0||!q.keepLines&&I!==3)A=D();else if(q.keepLines)A=D0[1]}else{switch(I){case 3:case 1:if(V++,q.keepLines&&G>0||!q.keepLines)A=D();else A=D0[1];break;case 5:if(q.keepLines&&G>0||!q.keepLines)A=D();else A=D0[1];break;case 12:A=D();break;case 13:if(G>0)A=D();else if(!f)A=D0[1];break;case 6:if(q.keepLines&&G>0)A=D();else if(!f)A=D0[1];break;case 10:if(q.keepLines&&G>0)A=D();else if(j===6&&!f)A="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(q.keepLines&&G>0)A=D();else if((j===12||j===13)&&!f)A=D0[1];else if(j!==5&&j!==17)R=!0;break;case 16:R=!0;break}if(G>0&&(j===12||j===13))A=D()}if(j===17)if(q.keepLines&&G>0)A=D();else A=q.insertFinalNewline?U:"";let w=z.getTokenOffset()+$;F(A,T,w),I=j}return k}function A6(Z,X){let q="";for(let Q=0;Q<X;Q++)q+=Z;return q}function GR(Z,X){let q=0,Q=0,J=X.tabSize||4;while(q<Z.length){let $=Z.charAt(q);if($===D0[1])Q++;else if($==="\t")Q+=J;else break;q++}return Math.floor(Q/J)}function WR(Z,X){for(let q=0;q<X.length;q++){let Q=X.charAt(q);if(Q==="\r"){if(q+1<X.length&&X.charAt(q+1)===`
|
|
27
|
+
`)return`\r
|
|
28
|
+
`;return"\r"}else if(Q===`
|
|
29
|
+
`)return`
|
|
30
|
+
`}return Z&&Z.eol||`
|
|
31
|
+
`}function M2(Z,X){return`\r
|
|
32
|
+
`.indexOf(Z.charAt(X))!==-1}var K3=B(()=>{S4();k$()});function N$(Z,X=[],q=F2.DEFAULT){let Q=null,J=[],$=[];function Y(U){if(Array.isArray(J))J.push(U);else if(Q!==null)J[Q]=U}return G3(Z,{onObjectBegin:()=>{let U={};Y(U),$.push(J),J=U,Q=null},onObjectProperty:(U)=>{Q=U},onObjectEnd:()=>{J=$.pop()},onArrayBegin:()=>{let U=[];Y(U),$.push(J),J=U,Q=null},onArrayEnd:()=>{J=$.pop()},onLiteralValue:Y,onError:(U,W,G)=>{X.push({error:U,offset:W,length:G})}},q),J[0]}function U3(Z,X=[],q=F2.DEFAULT){let Q={type:"array",offset:-1,length:-1,children:[],parent:void 0};function J(U){if(Q.type==="property")Q.length=U-Q.offset,Q=Q.parent}function $(U){return Q.children.push(U),U}G3(Z,{onObjectBegin:(U)=>{Q=$({type:"object",offset:U,length:-1,parent:Q,children:[]})},onObjectProperty:(U,W,G)=>{Q=$({type:"property",offset:W,length:-1,parent:Q,children:[]}),Q.children.push({type:"string",value:U,offset:W,length:G,parent:Q})},onObjectEnd:(U,W)=>{J(U+W),Q.length=U+W-Q.offset,Q=Q.parent,J(U+W)},onArrayBegin:(U,W)=>{Q=$({type:"array",offset:U,length:-1,parent:Q,children:[]})},onArrayEnd:(U,W)=>{Q.length=U+W-Q.offset,Q=Q.parent,J(U+W)},onLiteralValue:(U,W,G)=>{$({type:BR(U),offset:W,length:G,parent:Q,value:U}),J(W+G)},onSeparator:(U,W,G)=>{if(Q.type==="property"){if(U===":")Q.colonOffset=W;else if(U===",")J(W)}},onError:(U,W,G)=>{X.push({error:U,offset:W,length:G})}},q);let H=Q.children[0];if(H)delete H.parent;return H}function b4(Z,X){if(!Z)return;let q=Z;for(let Q of X)if(typeof Q==="string"){if(q.type!=="object"||!Array.isArray(q.children))return;let J=!1;for(let $ of q.children)if(Array.isArray($.children)&&$.children[0].value===Q&&$.children.length===2){q=$.children[1],J=!0;break}if(!J)return}else{let J=Q;if(q.type!=="array"||J<0||!Array.isArray(q.children)||J>=q.children.length)return;q=q.children[J]}return q}function G3(Z,X,q=F2.DEFAULT){let Q=R2(Z,!1),J=[],$=0;function Y(E){return E?()=>$===0&&E(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function H(E){return E?(y)=>$===0&&E(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function U(E){return E?(y)=>$===0&&E(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>J.slice()):()=>!0}function W(E){return E?()=>{if($>0)$++;else if(E(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>J.slice())===!1)$=1}:()=>!0}function G(E){return E?()=>{if($>0)$--;if($===0)E(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter())}:()=>!0}let V=W(X.onObjectBegin),_=U(X.onObjectProperty),L=G(X.onObjectEnd),z=W(X.onArrayBegin),R=G(X.onArrayEnd),D=U(X.onLiteralValue),M=H(X.onSeparator),k=Y(X.onComment),F=H(X.onError),I=q&&q.disallowComments,T=q&&q.allowTrailingComma;function j(){while(!0){let E=Q.scan();switch(Q.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:if(!I)A(11);break;case 2:A(12);break;case 6:A(16);break}switch(E){case 12:case 13:if(I)A(10);else k();break;case 16:A(1);break;case 15:case 14:break;default:return E}}}function A(E,y=[],u=[]){if(F(E),y.length+u.length>0){let h=Q.getToken();while(h!==17){if(y.indexOf(h)!==-1){j();break}else if(u.indexOf(h)!==-1)break;h=j()}}}function f(E){let y=Q.getTokenValue();if(E)D(y);else _(y),J.push(y);return j(),!0}function w(){switch(Q.getToken()){case 11:let E=Q.getTokenValue(),y=Number(E);if(isNaN(y))A(2),y=0;D(y);break;case 7:D(null);break;case 8:D(!0);break;case 9:D(!1);break;default:return!1}return j(),!0}function x(){if(Q.getToken()!==10)return A(3,[],[2,5]),!1;if(f(!1),Q.getToken()===6){if(M(":"),j(),!r())A(4,[],[2,5])}else A(5,[],[2,5]);return J.pop(),!0}function v(){V(),j();let E=!1;while(Q.getToken()!==2&&Q.getToken()!==17){if(Q.getToken()===5){if(!E)A(4,[],[]);if(M(","),j(),Q.getToken()===2&&T)break}else if(E)A(6,[],[]);if(!x())A(4,[],[2,5]);E=!0}if(L(),Q.getToken()!==2)A(7,[2],[]);else j();return!0}function b(){z(),j();let E=!0,y=!1;while(Q.getToken()!==4&&Q.getToken()!==17){if(Q.getToken()===5){if(!y)A(4,[],[]);if(M(","),j(),Q.getToken()===4&&T)break}else if(y)A(6,[],[]);if(E)J.push(0),E=!1;else J[J.length-1]++;if(!r())A(4,[],[4,5]);y=!0}if(R(),!E)J.pop();if(Q.getToken()!==4)A(8,[4],[]);else j();return!0}function r(){switch(Q.getToken()){case 3:return b();case 1:return v();case 10:return f(!0);default:return w()}}if(j(),Q.getToken()===17){if(q.allowEmptyContent)return!0;return A(4,[],[]),!1}if(!r())return A(4,[],[]),!1;if(Q.getToken()!==17)A(9,[],[]);return!0}function BR(Z){switch(typeof Z){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(!Z)return"null";else if(Array.isArray(Z))return"array";return"object"}default:return"null"}}var F2;var W3=B(()=>{S4();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(F2||(F2={}))});function x$(Z,X,q,Q){let J=X.slice(),Y=U3(Z,[]),H=void 0,U=void 0;while(J.length>0)if(U=J.pop(),H=b4(Y,J),H===void 0&&q!==void 0)if(typeof U==="string")q={[U]:q};else q=[q];else break;if(!H){if(q===void 0)throw Error("Can not delete in empty document");return b1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(q)},Q)}else if(H.type==="object"&&typeof U==="string"&&Array.isArray(H.children)){let W=b4(H,[U]);if(W!==void 0)if(q===void 0){if(!W.parent)throw Error("Malformed AST");let G=H.children.indexOf(W.parent),V,_=W.parent.offset+W.parent.length;if(G>0){let L=H.children[G-1];V=L.offset+L.length}else if(V=H.offset+1,H.children.length>1)_=H.children[1].offset;return b1(Z,{offset:V,length:_-V,content:""},Q)}else return b1(Z,{offset:W.offset,length:W.length,content:JSON.stringify(q)},Q);else{if(q===void 0)return[];let G=`${JSON.stringify(U)}: ${JSON.stringify(q)}`,V=Q.getInsertionIndex?Q.getInsertionIndex(H.children.map((L)=>L.children[0].value)):H.children.length,_;if(V>0){let L=H.children[V-1];_={offset:L.offset+L.length,length:0,content:","+G}}else if(H.children.length===0)_={offset:H.offset+1,length:0,content:G};else _={offset:H.offset+1,length:0,content:G+","};return b1(Z,_,Q)}}else if(H.type==="array"&&typeof U==="number"&&Array.isArray(H.children)){let W=U;if(W===-1){let G=`${JSON.stringify(q)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:G};else{let _=H.children[H.children.length-1];V={offset:_.offset+_.length,length:0,content:","+G}}return b1(Z,V,Q)}else if(q===void 0&&H.children.length>=0){let G=U,V=H.children[G],_;if(H.children.length===1)_={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===G){let L=H.children[G-1],z=L.offset+L.length,R=H.offset+H.length;_={offset:z,length:R-2-z,content:""}}else _={offset:V.offset,length:H.children[G+1].offset-V.offset,content:""};return b1(Z,_,Q)}else if(q!==void 0){let G,V=`${JSON.stringify(q)}`;if(!Q.isArrayInsertion&&H.children.length>U){let _=H.children[U];G={offset:_.offset,length:_.length,content:V}}else if(H.children.length===0||U===0)G={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let _=U>H.children.length?H.children.length:U,L=H.children[_-1];G={offset:L.offset+L.length,length:0,content:","+V}}return b1(Z,G,Q)}else throw Error(`Can not ${q===void 0?"remove":Q.isArrayInsertion?"insert":"modify"} Array index ${W} as length is not sufficient`)}else throw Error(`Can not add ${typeof U!=="number"?"index":"property"} to parent of type ${H.type}`)}function b1(Z,X,q){if(!q.formattingOptions)return[X];let Q=h4(Z,X),J=X.offset,$=X.offset+X.content.length;if(X.length===0||X.content.length===0){while(J>0&&!M2(Q,J-1))J--;while($<Q.length&&!M2(Q,$))$++}let Y=H3(Q,{offset:J,length:$-J},{...q.formattingOptions,keepLines:!1});for(let U=Y.length-1;U>=0;U--){let W=Y[U];Q=h4(Q,W),J=Math.min(J,W.offset),$=Math.max($,W.offset+W.length),$+=W.content.length-W.length}let H=Z.length-(Q.length-$)-J;return[{offset:J,length:H,content:Q.substring(J,$)}]}function h4(Z,X){return Z.substring(0,X.offset)+X.content+Z.substring(X.offset+X.length)}var P$=B(()=>{K3();W3()});function C$(Z,X,q,Q){return x$(Z,X,q,Q)}function S$(Z,X){let q=X.slice(0).sort((J,$)=>{let Y=J.offset-$.offset;if(Y===0)return J.length-$.length;return Y}),Q=Z.length;for(let J=q.length-1;J>=0;J--){let $=q[J];if($.offset+$.length<=Q)Z=h4(Z,$);else throw Error("Overlapping edit");Q=$.offset}return Z}var E$,v$,V3,y$;var b$=B(()=>{K3();P$();S4();W3();(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"})(E$||(E$={}));(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"})(v$||(v$={}));V3=N$;(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"})(y$||(y$={}))});import{open as zR,readFile as RR,stat as MR}from"fs/promises";function f$(Z,X){try{return{ok:!0,value:JSON.parse(d0(Z))}}catch(q){if(X)g(q);return{ok:!1}}}function hy(Z){if(!Z)return null;try{return V3(d0(Z))}catch(X){return g(X),null}}function DR(Z){let X=g$,q=Z.length,Q=X(Z);if(!Q.error||Q.done||Q.read>=q)return Q.values;let{values:J,read:$}=Q;while($<q){let Y=typeof Z==="string"?Z.indexOf(`
|
|
33
|
+
`,$):Z.indexOf(10,$);if(Y===-1)break;$=Y+1;let H=X(Z,$);if(H.values.length>0)J=J.concat(H.values);if(!H.error||H.done||H.read>=q)break;$=H.read}return J}function AR(Z){let X=Z.length,q=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)q=3;let Q=[];while(q<X){let J=Z.indexOf(10,q);if(J===-1)J=X;let $=Z.toString("utf8",q,J).trim();if(q=J+1,!$)continue;try{Q.push(JSON.parse($))}catch{}}return Q}function TR(Z){let X=d0(Z),q=X.length,Q=0,J=[];while(Q<q){let $=X.indexOf(`
|
|
34
|
+
`,Q);if($===-1)$=q;let Y=X.substring(Q,$).trim();if(Q=$+1,!Y)continue;try{J.push(JSON.parse(Y))}catch{}}return J}function B3(Z){if(g$)return DR(Z);if(typeof Z==="string")return TR(Z);return AR(Z)}async function fy(Z){let H=[];try{let{size:X}=await MR(Z);if(X<=D2)return B3(await RR(Z));const q=B6(H,await zR(Z,"r"),1);let Q=Buffer.allocUnsafe(D2);let J=0;let $=X-D2;while(J<D2){let{bytesRead:_}=await q.read(Q,J,D2-J,$+J);if(_===0)break;J+=_}let Y=Q.indexOf(10);if(Y!==-1&&Y<J-1)return B3(Q.subarray(Y+1,J));return B3(Q.subarray(0,J))}catch(U){var W=U,G=1}finally{var V=L6(H,W,G);V&&await V}}function gy(Z,X){try{if(!Z||Z.trim()==="")return m([X],null,4);let q=d0(Z),Q=V3(q);if(Array.isArray(Q)){let J=Q.length,H=C$(q,J===0?[0]:[J],X,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let U=[...Q,X];return m(U,null,4)}return S$(q,H)}else return m([X],null,4)}catch(q){return g(q),m([X],null,4)}}var FR=8192,h$,C0,g$,D2=104857600;var f4=B(()=>{b$();P4();p0();j4();z0();h$=R1(f$,(Z)=>Z,50),C0=Object.assign(function(X,q=!0){if(!X)return null;let Q=X.length>FR?f$(X,q):h$(X,q);return Q.ok?Q.value:null},{cache:h$.cache});g$=(()=>{if(typeof Bun>"u")return!1;let X=Bun.JSONL;if(!X?.parseChunk)return!1;return X.parseChunk})()});function cy(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 ly(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 ny(Z){switch(Z){case"userSettings":return"user settings";case"projectSettings":return"shared project settings";case"localSettings":return"project local settings";case"flagSettings":return"command line arguments";case"policySettings":return"enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"command configuration";case"session":return"current session"}}function iy(Z){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 ay(Z){if(Z==="")return[];let X=Z.split(",").map((Q)=>Q.trim()),q=[];for(let Q of X)switch(Q){case"user":q.push("userSettings");break;case"project":q.push("projectSettings");break;case"local":q.push("localSettings");break;default:throw Error(`Invalid setting source: ${Q}. Valid options are: user, project, local`)}return q}function A2(){let Z=m$(),X=new Set(Z);return X.add("policySettings"),X.add("flagSettings"),Array.from(X)}function oy(Z){return A2().includes(Z)}var dy,sy,u$="https://json.schemastore.org/claude-code-settings.json";var L3=B(()=>{T6();dy=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];sy=["localSettings","projectSettings","userSettings"]});function p$(Z){g4.set(Z,Date.now())}function ty(Z,X){let q=g4.get(Z);if(q!==void 0&&Date.now()-q<X)return g4.delete(Z),!0;return!1}function ey(){g4.clear()}var g4;var d$=B(()=>{g4=new Map});import{join as jR}from"path";var D1,T2;var m4=B(()=>{v1();V6();D1=d(function(){switch(y0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),T2=d(function(){return jR(D1(),"managed-settings.d")})});var OR,IR,c$;var l$=B(()=>{n0();h1();OR=O(()=>K.object({allowedDomains:K.array(K.string()).optional(),allowManagedDomainsOnly:K.boolean().optional().describe("When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."),allowUnixSockets:K.array(K.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:K.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:K.boolean().optional(),httpProxyPort:K.number().optional(),socksProxyPort:K.number().optional()}).optional()),IR=O(()=>K.object({allowWrite:K.array(K.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:K.array(K.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:K.array(K.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:K.array(K.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths."),allowManagedReadPathsOnly:K.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used.")}).optional()),c$=O(()=>K.object({enabled:K.boolean().optional(),failIfUnavailable:K.boolean().optional().describe("Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies, unsupported platform, or platform not in enabledPlatforms). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate."),autoAllowBashIfSandboxed:K.boolean().optional(),allowUnsandboxedCommands:K.boolean().optional().describe("Allow trusted, user-initiated commands to run outside the sandbox. When false, sandbox override requests are ignored and all commands must run sandboxed. Default: true."),network:OR(),filesystem:IR(),ignoreViolations:K.record(K.string(),K.array(K.string())).optional(),enableWeakerNestedSandbox:K.boolean().optional(),enableWeakerNetworkIsolation:K.boolean().optional().describe("macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. "+"**Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false"),excludedCommands:K.array(K.string()).optional(),ripgrep:K.object({command:K.string(),args:K.array(K.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});function n$(){return process.versions.bun!==void 0}function KC(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var i$=()=>{};function t(Z){if(typeof Z!=="object"||Z===null)return!1;let X=Object.getPrototypeOf(Z);return(X===null||X===Object.prototype||Object.getPrototypeOf(X)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}var Q1=()=>{};import{fileURLToPath as wR}from"node:url";var j6=(Z,X)=>{let q=z3(kR(Z));if(typeof q!=="string")throw TypeError(`${X} must be a string or a file URL: ${q}.`);return q},kR=(Z)=>_3(Z)?Z.toString():Z,_3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,z3=(Z)=>Z instanceof URL?wR(Z):Z;var O6=()=>{};var u4=(Z,X=[],q={})=>{let Q=j6(Z,"First argument"),[J,$]=t(X)?[[],X]:[X,q];if(!Array.isArray(J))throw TypeError(`Second argument must be either an array of arguments or an options object: ${J}`);if(J.some((U)=>typeof U==="object"&&U!==null))throw TypeError(`Second argument must be an array of strings: ${J}`);let Y=J.map(String),H=Y.find((U)=>U.includes("\x00"));if(H!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${H}`);if(!t($))throw TypeError(`Last argument must be an options object: ${$}`);return[Q,Y,$]};var R3=B(()=>{Q1();O6()});import{StringDecoder as NR}from"node:string_decoder";var a$,o$=(Z)=>a$.call(Z)==="[object ArrayBuffer]",q0=(Z)=>a$.call(Z)==="[object Uint8Array]",J1=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),xR,s$=(Z)=>xR.encode(Z),PR,p4=(Z)=>PR.decode(Z),r$=(Z,X)=>{return ER(Z,X).join("")},ER=(Z,X)=>{if(X==="utf8"&&Z.every(($)=>typeof $==="string"))return Z;let q=new NR(X),Q=Z.map(($)=>typeof $==="string"?s$($):$).map(($)=>q.write($)),J=q.end();return J===""?Q:[...Q,J]},j2=(Z)=>{if(Z.length===1&&q0(Z[0]))return Z[0];return M3(vR(Z))},vR=(Z)=>Z.map((X)=>typeof X==="string"?s$(X):X),M3=(Z)=>{let X=new Uint8Array(yR(Z)),q=0;for(let Q of Z)X.set(Q,q),q+=Q.length;return X},yR=(Z)=>{let X=0;for(let q of Z)X+=q.length;return X};var A0=B(()=>{({toString:a$}=Object.prototype),xR=new TextEncoder,PR=new TextDecoder});import{ChildProcess as CR}from"node:child_process";var X9=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),q9=(Z,X)=>{let q=[];for(let[$,Y]of Z.entries())q=SR({templates:Z,expressions:X,tokens:q,index:$,template:Y});if(q.length===0)throw TypeError("Template script must not be empty");let[Q,...J]=q;return[Q,J,{}]},SR=({templates:Z,expressions:X,tokens:q,index:Q,template:J})=>{if(J===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[Q]}`);let{nextTokens:$,leadingWhitespaces:Y,trailingWhitespaces:H}=bR(J,Z.raw[Q]),U=e$(q,$,Y);if(Q===X.length)return U;let W=X[Q],G=Array.isArray(W)?W.map((V)=>Z9(V)):[Z9(W)];return e$(U,G,H)},bR=(Z,X)=>{if(X.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let q=[],Q=0,J=t$.has(X[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let U=X[H];if(t$.has(U)){if(Q!==Y)q.push(Z.slice(Q,Y));Q=Y+1}else if(U==="\\"){let W=X[H+1];if(W===`
|
|
35
|
+
`)Y-=1,H+=1;else if(W==="u"&&X[H+2]==="{")H=X.indexOf("}",H+3);else H+=hR[W]??1}}let $=Q===Z.length;if(!$)q.push(Z.slice(Q));return{nextTokens:q,leadingWhitespaces:J,trailingWhitespaces:$}},t$,hR,e$=(Z,X,q)=>q||Z.length===0||X.length===0?[...Z,...X]:[...Z.slice(0,-1),`${Z.at(-1)}${X[0]}`,...X.slice(1)],Z9=(Z)=>{let X=typeof Z;if(X==="string")return Z;if(X==="number")return String(Z);if(t(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return fR(Z);if(Z instanceof CR||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`)},fR=({stdout:Z})=>{if(typeof Z==="string")return Z;if(q0(Z))return p4(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 Q9=B(()=>{Q1();A0();t$=new Set([" ","\t","\r",`
|
|
36
|
+
`]),hR={x:3,u:5}});import F3 from"node:process";var S0=(Z)=>d4.includes(Z),d4,I0,c4=(Z)=>I0[Z]??`stdio[${Z}]`;var $1=B(()=>{d4=[F3.stdin,F3.stdout,F3.stderr],I0=["stdin","stdout","stderr"]});import{debuglog as gR}from"node:util";var $9=(Z)=>{let X={...Z};for(let q of T3)X[q]=D3(Z,q);return X},D3=(Z,X)=>{let q=Array.from({length:mR(Z)+1}),Q=uR(Z[X],q,X);return nR(Q,X)},mR=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,I0.length):I0.length,uR=(Z,X,q)=>t(Z)?pR(Z,X,q):X.fill(Z),pR=(Z,X,q)=>{for(let Q of Object.keys(Z).sort(dR))for(let J of cR(Q,q,X))X[J]=Z[Q];return X},dR=(Z,X)=>J9(Z)<J9(X)?1:-1,J9=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},cR=(Z,X,q)=>{if(Z==="ipc")return[q.length-1];let Q=A3(Z);if(Q===void 0||Q===0)throw TypeError(`"${X}.${Z}" is invalid.
|
|
37
|
+
It must be "${X}.stdout", "${X}.stderr", "${X}.all", "${X}.ipc", or "${X}.fd3", "${X}.fd4" (and so on).`);if(Q>=q.length)throw TypeError(`"${X}.${Z}" is invalid: that file descriptor does not exist.
|
|
38
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);return Q==="all"?[1,2]:[Q]},A3=(Z)=>{if(Z==="all")return Z;if(I0.includes(Z))return I0.indexOf(Z);let X=lR.exec(Z);if(X!==null)return Number(X[1])},lR,nR=(Z,X)=>Z.map((q)=>q===void 0?aR[X]:q),iR,aR,T3,Y1=(Z,X)=>X==="ipc"?Z.at(-1):Z[X];var H1=B(()=>{Q1();$1();lR=/^fd(\d+)$/,iR=gR("execa").enabled?"full":"none",aR={lines:!1,buffer:!0,maxBuffer:1e8,verbose:iR,stripFinalNewline:!0},T3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var I6=({verbose:Z},X)=>j3(Z,X)!=="none",w6=({verbose:Z},X)=>!["none","short"].includes(j3(Z,X)),Y9=({verbose:Z},X)=>{let q=j3(Z,X);return l4(q)?q:void 0},j3=(Z,X)=>X===void 0?oR(Z):Y1(Z,X),oR=(Z)=>Z.find((X)=>l4(X))??n4.findLast((X)=>Z.includes(X)),l4=(Z)=>typeof Z==="function",n4;var A1=B(()=>{H1();n4=["none","short","full"]});import{platform as sR}from"node:process";import{stripVTControlCharacters as rR}from"node:util";var H9=(Z,X)=>{let q=[Z,...X],Q=q.join(" "),J=q.map(($)=>QM(K9($))).join(" ");return{command:Q,escapedCommand:J}},O2=(Z)=>rR(Z).split(`
|
|
39
|
+
`).map((X)=>K9(X)).join(`
|
|
40
|
+
`),K9=(Z)=>Z.replaceAll(ZM,(X)=>tR(X)),tR=(Z)=>{let X=XM[Z];if(X!==void 0)return X;let q=Z.codePointAt(0),Q=q.toString(16);return q<=qM?`\\u${Q.padStart(4,"0")}`:`\\U${Q}`},eR=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},ZM,XM,qM=65535,QM=(Z)=>{if(JM.test(Z))return Z;return sR==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},JM;var i4=B(()=>{ZM=eR(),XM={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},JM=/^[\w./-]+$/});import U9 from"node:process";function O3(){let{env:Z}=U9,{TERM:X,TERM_PROGRAM:q}=Z;if(U9.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 G9=()=>{};var W9,V9,$M,YM,HM,KM,UM,a4,bC;var B9=B(()=>{G9();W9={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:"╱"},V9={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:"⅒"},$M={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"},YM={...W9,...V9},HM={...W9,...$M},KM=O3(),UM=KM?YM:HM,a4=UM,bC=Object.entries(V9)});import GM from"node:tty";var WM,C=(Z,X)=>{if(!WM)return(J)=>J;let q=`\x1B[${Z}m`,Q=`\x1B[${X}m`;return(J)=>{let $=J+"",Y=$.indexOf(Q);if(Y===-1)return q+$+Q;let H=q,U=0,G=(X===22?Q:"")+q;while(Y!==-1)H+=$.slice(U,Y)+G,U=Y+Q.length,Y=$.indexOf(Q,U);return H+=$.slice(U)+Q,H}},gC,L9,mC,uC,pC,dC,cC,lC,nC,iC,aC,oC,sC,rC,tC,eC,ZS,o4,XS,qS,QS,JS,$S,YS,HS,KS,US,_9,GS,z9,WS,VS,BS,LS,_S,zS,RS,MS,FS,DS,AS;var R9=B(()=>{WM=GM?.WriteStream?.prototype?.hasColors?.()??!1,gC=C(0,0),L9=C(1,22),mC=C(2,22),uC=C(3,23),pC=C(4,24),dC=C(53,55),cC=C(7,27),lC=C(8,28),nC=C(9,29),iC=C(30,39),aC=C(31,39),oC=C(32,39),sC=C(33,39),rC=C(34,39),tC=C(35,39),eC=C(36,39),ZS=C(37,39),o4=C(90,39),XS=C(40,49),qS=C(41,49),QS=C(42,49),JS=C(43,49),$S=C(44,49),YS=C(45,49),HS=C(46,49),KS=C(47,49),US=C(100,49),_9=C(91,39),GS=C(92,39),z9=C(93,39),WS=C(94,39),VS=C(95,39),BS=C(96,39),LS=C(97,39),_S=C(101,49),zS=C(102,49),RS=C(103,49),MS=C(104,49),FS=C(105,49),DS=C(106,49),AS=C(107,49)});var M9=B(()=>{R9()});var A9=({type:Z,message:X,timestamp:q,piped:Q,commandId:J,result:{failed:$=!1}={},options:{reject:Y=!0}})=>{let H=VM(q),U=BM[Z]({failed:$,reject:Y,piped:Q}),W=LM[Z]({reject:Y});return`${o4(`[${H}]`)} ${o4(`[${J}]`)} ${W(U)} ${W(X)}`},VM=(Z)=>`${s4(Z.getHours(),2)}:${s4(Z.getMinutes(),2)}:${s4(Z.getSeconds(),2)}.${s4(Z.getMilliseconds(),3)}`,s4=(Z,X)=>String(Z).padStart(X,"0"),F9=({failed:Z,reject:X})=>{if(!Z)return a4.tick;return X?a4.cross:a4.warning},BM,D9=(Z)=>Z,LM;var T9=B(()=>{B9();M9();BM={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:F9,duration:F9},LM={command:()=>L9,output:()=>D9,ipc:()=>D9,error:({reject:Z})=>Z?_9:z9,duration:()=>o4}});var j9=(Z,X,q)=>{let Q=Y9(X,q);return Z.map(({verboseLine:J,verboseObject:$})=>_M(J,$,Q)).filter((J)=>J!==void 0).map((J)=>zM(J)).join("")},_M=(Z,X,q)=>{if(q===void 0)return Z;let Q=q(Z,X);if(typeof Q==="string")return Q},zM=(Z)=>Z.endsWith(`
|
|
41
|
+
`)?Z:`${Z}
|
|
42
|
+
`;var O9=B(()=>{A1()});import{inspect as RM}from"node:util";var i0=({type:Z,verboseMessage:X,fdNumber:q,verboseInfo:Q,result:J})=>{let $=MM({type:Z,result:J,verboseInfo:Q}),Y=FM(X,$),H=j9(Y,Q,q);if(H!=="")console.warn(H.slice(0,-1))},MM=({type:Z,result:X,verboseInfo:{escapedCommand:q,commandId:Q,rawOptions:{piped:J=!1,...$}}})=>({type:Z,escapedCommand:q,commandId:`${Q}`,timestamp:new Date,piped:J,result:X,options:$}),FM=(Z,X)=>Z.split(`
|
|
43
|
+
`).map((q)=>DM({...X,message:q})),DM=(Z)=>{return{verboseLine:A9(Z),verboseObject:Z}},r4=(Z)=>{let X=typeof Z==="string"?Z:RM(Z);return O2(X).replaceAll("\t"," ".repeat(AM))},AM=2;var k6=B(()=>{i4();T9();O9()});var I9=(Z,X)=>{if(!I6(X))return;i0({type:"command",verboseMessage:Z,verboseInfo:X})};var w9=B(()=>{A1();k6()});var k9=(Z,X,q)=>{OM(Z);let Q=TM(Z);return{verbose:Z,escapedCommand:X,commandId:Q,rawOptions:q}},TM=(Z)=>I6({verbose:Z})?jM++:void 0,jM=0n,OM=(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(!n4.includes(X)&&!l4(X)){let q=n4.map((Q)=>`'${Q}'`).join(", ");throw TypeError(`The "verbose" option must not be ${X}. Allowed values are: ${q} or a function.`)}}};var N9=B(()=>{A1()});import{hrtime as x9}from"node:process";var t4=()=>x9.bigint(),I3=(Z)=>Number(x9.bigint()-Z)/1e6;var e4=()=>{};var Z8=(Z,X,q)=>{let Q=t4(),{command:J,escapedCommand:$}=H9(Z,X),Y=D3(q,"verbose"),H=k9(Y,$,{...q});return I9($,H),{command:J,escapedCommand:$,startTime:Q,verboseInfo:H}};var w3=B(()=>{w9();N9();e4();i4();H1()});function X8(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 P9=()=>{};var E9=()=>{};import{promisify as IM}from"node:util";import{execFile as wM,execFileSync as eS}from"node:child_process";import v9 from"node:path";import{fileURLToPath as kM}from"node:url";function q8(Z){return Z instanceof URL?kM(Z):Z}function y9(Z){return{*[Symbol.iterator](){let X=v9.resolve(q8(Z)),q;while(q!==X)yield X,q=X,X=v9.resolve(X,"..")}}}var qb;var C9=B(()=>{E9();qb=IM(wM)});import Q8 from"node:process";import f1 from"node:path";var NM=({cwd:Z=Q8.cwd(),path:X=Q8.env[X8()],preferLocal:q=!0,execPath:Q=Q8.execPath,addExecPath:J=!0}={})=>{let $=f1.resolve(q8(Z)),Y=[],H=X.split(f1.delimiter);if(q)xM(Y,H,$);if(J)PM(Y,H,Q,$);return X===""||X===f1.delimiter?`${Y.join(f1.delimiter)}${X}`:[...Y,X].join(f1.delimiter)},xM=(Z,X,q)=>{for(let Q of y9(q)){let J=f1.join(Q,"node_modules/.bin");if(!X.includes(J))Z.push(J)}},PM=(Z,X,q,Q)=>{let J=f1.resolve(Q,q8(q),"..");if(!X.includes(J))Z.push(J)},S9=({env:Z=Q8.env,...X}={})=>{Z={...Z};let q=X8({env:Z});return X.path=Z[q],Z[q]=NM(X),Z};var b9=B(()=>{P9();C9()});var h9=(Z,X,q)=>{let Q=q?$8:J8,J=Z instanceof a0?{}:{cause:Z};return new Q(X,J)},a0,f9=(Z,X)=>{Object.defineProperty(Z.prototype,"name",{value:X,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,m9,{value:!0,writable:!1,enumerable:!1,configurable:!1})},g9=(Z)=>Y8(Z)&&(m9 in Z),m9,Y8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",J8,$8;var g1=B(()=>{a0=class a0 extends Error{};m9=Symbol("isExecaError");J8=class J8 extends Error{};f9(J8,J8.name);$8=class $8 extends Error{};f9($8,$8.name)});var u9=()=>{let Z=k3-p9+1;return Array.from({length:Z},EM)},EM=(Z,X)=>({name:`SIGRT${X+1}`,number:p9+X,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),p9=34,k3=64;var N3=()=>{};var d9;var c9=B(()=>{d9=[{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 vM}from"node:os";var x3=()=>{let Z=u9();return[...d9,...Z].map(yM)},yM=({name:Z,number:X,description:q,action:Q,forced:J=!1,standard:$})=>{let{signals:{[Z]:Y}}=vM,H=Y!==void 0;return{name:Z,number:H?Y:X,description:q,supported:H,action:Q,forced:J,standard:$}};var l9=B(()=>{c9();N3()});import{constants as CM}from"node:os";var SM=()=>{let Z=x3();return Object.fromEntries(Z.map(bM))},bM=({name:Z,number:X,description:q,supported:Q,action:J,forced:$,standard:Y})=>[Z,{name:Z,number:X,description:q,supported:Q,action:J,forced:$,standard:Y}],n9,hM=()=>{let Z=x3(),X=k3+1,q=Array.from({length:X},(Q,J)=>fM(J,Z));return Object.assign({},...q)},fM=(Z,X)=>{let q=gM(Z,X);if(q===void 0)return{};let{name:Q,description:J,supported:$,action:Y,forced:H,standard:U}=q;return{[Z]:{name:Q,number:Z,description:J,supported:$,action:Y,forced:H,standard:U}}},gM=(Z,X)=>{let q=X.find(({name:Q})=>CM.signals[Q]===Z);if(q!==void 0)return q;return X.find((Q)=>Q.number===Z)},Db;var i9=B(()=>{N3();l9();n9=SM(),Db=hM()});import{constants as I2}from"node:os";var o9=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return r9(Z,"option `killSignal`")},s9=(Z)=>Z===0?Z:r9(Z,"`subprocess.kill()`'s argument"),r9=(Z,X)=>{if(Number.isInteger(Z))return mM(Z,X);if(typeof Z==="string")return pM(Z,X);throw TypeError(`Invalid ${X} ${String(Z)}: it must be a string or an integer.
|
|
44
|
+
${P3()}`)},mM=(Z,X)=>{if(a9.has(Z))return a9.get(Z);throw TypeError(`Invalid ${X} ${Z}: this signal integer does not exist.
|
|
45
|
+
${P3()}`)},uM=()=>new Map(Object.entries(I2.signals).reverse().map(([Z,X])=>[X,Z])),a9,pM=(Z,X)=>{if(Z in I2.signals)return Z;if(Z.toUpperCase()in I2.signals)throw TypeError(`Invalid ${X} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${X} '${Z}': this signal name does not exist.
|
|
46
|
+
${P3()}`)},P3=()=>`Available signal names: ${dM()}.
|
|
47
|
+
Available signal numbers: ${cM()}.`,dM=()=>Object.keys(I2.signals).sort().map((Z)=>`'${Z}'`).join(", "),cM=()=>[...new Set(Object.values(I2.signals).sort((Z,X)=>Z-X))].join(", "),H8=(Z)=>n9[Z].description;var w2=B(()=>{i9();a9=uM()});import{setTimeout as lM}from"node:timers/promises";var t9=(Z)=>{if(Z===!1)return Z;if(Z===!0)return nM;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},nM=5000,e9=({kill:Z,options:{forceKillAfterDelay:X,killSignal:q},onInternalError:Q,context:J,controller:$},Y,H)=>{let{signal:U,error:W}=iM(Y,H,q);aM(W,Q);let G=Z(U);return oM({kill:Z,signal:U,forceKillAfterDelay:X,killSignal:q,killResult:G,context:J,controller:$}),G},iM=(Z,X,q)=>{let[Q=q,J]=Y8(Z)?[void 0,Z]:[Z,X];if(typeof Q!=="string"&&!Number.isInteger(Q))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(Q)}`);if(J!==void 0&&!Y8(J))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${J}`);return{signal:s9(Q),error:J}},aM=(Z,X)=>{if(Z!==void 0)X.reject(Z)},oM=async({kill:Z,signal:X,forceKillAfterDelay:q,killSignal:Q,killResult:J,context:$,controller:Y})=>{if(X===Q&&J)E3({kill:Z,forceKillAfterDelay:q,context:$,controllerSignal:Y.signal})},E3=async({kill:Z,forceKillAfterDelay:X,context:q,controllerSignal:Q})=>{if(X===!1)return;try{if(await lM(X,void 0,{signal:Q}),Z("SIGKILL"))q.isForcefullyTerminated??=!0}catch{}};var K8=B(()=>{g1();w2()});import{once as sM}from"node:events";var U8=async(Z,X)=>{if(!Z.aborted)await sM(Z,"abort",{signal:X})};var v3=()=>{};var ZY=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},XY=({subprocess:Z,cancelSignal:X,gracefulCancel:q,context:Q,controller:J})=>X===void 0||q?[]:[rM(Z,X,Q,J)],rM=async(Z,X,q,{signal:Q})=>{throw await U8(X,Q),q.terminationReason??="cancel",Z.kill(),X.reason};var y3=B(()=>{v3()});var N6=({methodName:Z,isSubprocess:X,ipc:q,isConnected:Q})=>{tM(Z,X,q),C3(Z,X,Q)},tM=(Z,X,q)=>{if(!q)throw Error(`${b0(Z,X)} can only be used if the \`ipc\` option is \`true\`.`)},C3=(Z,X,q)=>{if(!q)throw Error(`${b0(Z,X)} cannot be used: the ${T1(X)} has already exited or disconnected.`)},qY=(Z)=>{throw Error(`${b0("getOneMessage",Z)} could not complete: the ${T1(Z)} exited or disconnected.`)},QY=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${T1(Z)} is sending a message too, instead of listening to incoming messages.
|
|
48
|
+
This can be fixed by both sending a message and listening to incoming messages at the same time:
|
|
49
|
+
|
|
50
|
+
const [receivedMessage] = await Promise.all([
|
|
51
|
+
${b0("getOneMessage",Z)},
|
|
52
|
+
${b0("sendMessage",Z,"message, {strict: true}")},
|
|
53
|
+
]);`)},G8=(Z,X)=>Error(`${b0("sendMessage",X)} failed when sending an acknowledgment response to the ${T1(X)}.`,{cause:Z}),JY=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${T1(Z)} is not listening to incoming messages.`)},$Y=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${T1(Z)} exited without listening to incoming messages.`)},YY=()=>Error(`\`cancelSignal\` aborted: the ${T1(!0)} disconnected.`),HY=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},KY=({error:Z,methodName:X,isSubprocess:q})=>{if(Z.code==="EPIPE")throw Error(`${b0(X,q)} cannot be used: the ${T1(q)} is disconnecting.`,{cause:Z})},UY=({error:Z,methodName:X,isSubprocess:q,message:Q})=>{if(eM(Z))throw Error(`${b0(X,q)}'s argument type is invalid: the message cannot be serialized: ${String(Q)}.`,{cause:Z})},eM=({code:Z,message:X})=>ZF.has(Z)||XF.some((q)=>X.includes(q)),ZF,XF,b0=(Z,X,q="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${qF(X)}${Z}(${q})`,qF=(Z)=>Z?"":"subprocess.",T1=(Z)=>Z?"parent process":"subprocess",x6=(Z)=>{if(Z.connected)Z.disconnect()};var P6=B(()=>{ZF=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),XF=["could not be cloned","circular structure","call stack size exceeded"]});var o0=()=>{let Z={},X=new Promise((q,Q)=>{Object.assign(Z,{resolve:q,reject:Q})});return Object.assign(X,Z)};var E6=()=>{};var V8=(Z,X="stdin")=>{let{options:Q,fileDescriptors:J}=s0.get(Z),$=GY(J,X,!0),Y=Z.stdio[$];if(Y===null)throw TypeError(WY($,X,Q,!0));return Y},v6=(Z,X="stdout")=>{let{options:Q,fileDescriptors:J}=s0.get(Z),$=GY(J,X,!1),Y=$==="all"?Z.all:Z.stdio[$];if(Y===null||Y===void 0)throw TypeError(WY($,X,Q,!1));return Y},s0,GY=(Z,X,q)=>{let Q=QF(X,q);return JF(Q,X,q,Z),Q},QF=(Z,X)=>{let q=A3(Z);if(q!==void 0)return q;let{validOptions:Q,defaultValue:J}=X?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${k2(X)}" must not be "${Z}".
|
|
54
|
+
It must be ${Q} or "fd3", "fd4" (and so on).
|
|
55
|
+
It is optional and defaults to "${J}".`)},JF=(Z,X,q,Q)=>{let J=Q[VY(Z)];if(J===void 0)throw TypeError(`"${k2(q)}" must not be ${X}. That file descriptor does not exist.
|
|
56
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);if(J.direction==="input"&&!q)throw TypeError(`"${k2(q)}" must not be ${X}. It must be a readable stream, not writable.`);if(J.direction!=="input"&&q)throw TypeError(`"${k2(q)}" must not be ${X}. It must be a writable stream, not readable.`)},WY=(Z,X,q,Q)=>{if(Z==="all"&&!q.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:J,optionValue:$}=$F(Z,q);return`The "${J}: ${W8($)}" option is incompatible with using "${k2(Q)}: ${W8(X)}".
|
|
57
|
+
Please set this option with "pipe" instead.`},$F=(Z,{stdin:X,stdout:q,stderr:Q,stdio:J})=>{let $=VY(Z);if($===0&&X!==void 0)return{optionName:"stdin",optionValue:X};if($===1&&q!==void 0)return{optionName:"stdout",optionValue:q};if($===2&&Q!==void 0)return{optionName:"stderr",optionValue:Q};return{optionName:`stdio[${$}]`,optionValue:J[$]}},VY=(Z)=>Z==="all"?1:Z,k2=(Z)=>Z?"to":"from",W8=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var j1=B(()=>{H1();s0=new WeakMap});import{addAbortListener as YF}from"node:events";var m1=(Z,X,q)=>{let Q=Z.getMaxListeners();if(Q===0||Q===Number.POSITIVE_INFINITY)return;Z.setMaxListeners(Q+X),YF(q,()=>{Z.setMaxListeners(Z.getMaxListeners()-X)})};var B8=()=>{};var L8=(Z,X)=>{if(X)S3(Z)},S3=(Z)=>{Z.refCounted()},_8=(Z,X)=>{if(X)b3(Z)},b3=(Z)=>{Z.unrefCounted()},BY=(Z,X)=>{if(X)b3(Z),b3(Z)},LY=(Z,X)=>{if(X)S3(Z),S3(Z)};var N2=()=>{};import{once as HF}from"node:events";import{scheduler as KF}from"node:timers/promises";var _Y=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q},J)=>{if(FY(J)||AY(J))return;if(!z8.has(Z))z8.set(Z,[]);let $=z8.get(Z);if($.push(J),$.length>1)return;while($.length>0){await DY(Z,Q,J),await KF.yield();let Y=await MY({wrappedMessage:$[0],anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q});$.shift(),Q.emit("message",Y),Q.emit("message:done")}},zY=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q,boundOnMessage:J})=>{h3();let $=z8.get(Z);while($?.length>0)await HF(Q,"message:done");Z.removeListener("message",J),LY(X,q),Q.connected=!1,Q.emit("disconnect")},z8;var RY=B(()=>{M8();N2();R8();F8();z8=new WeakMap});import{EventEmitter as UF}from"node:events";var O1=(Z,X,q)=>{if(D8.has(Z))return D8.get(Z);let Q=new UF;return Q.connected=!0,D8.set(Z,Q),GF({ipcEmitter:Q,anyProcess:Z,channel:X,isSubprocess:q}),Q},D8,GF=({ipcEmitter:Z,anyProcess:X,channel:q,isSubprocess:Q})=>{let J=_Y.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z});X.on("message",J),X.once("disconnect",zY.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z,boundOnMessage:J})),BY(q,Q)},A8=(Z)=>{let X=D8.get(Z);return X===void 0?Z.channel!==null:X.connected};var x2=B(()=>{RY();N2();D8=new WeakMap});import{once as WF}from"node:events";var TY=({anyProcess:Z,channel:X,isSubprocess:q,message:Q,strict:J})=>{if(!J)return Q;let $=O1(Z,X,q),Y=O8(Z,$);return{id:VF++,type:j8,message:Q,hasListeners:Y}},VF=0n,jY=(Z,X)=>{if(X?.type!==j8||X.hasListeners)return;for(let{id:q}of Z)if(q!==void 0)T8[q].resolve({isDeadlock:!0,hasListeners:!1})},MY=async({wrappedMessage:Z,anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:J})=>{if(Z?.type!==j8||!X.connected)return Z;let{id:$,message:Y}=Z,H={id:$,type:IY,message:O8(X,J)};try{await I8({anyProcess:X,channel:q,isSubprocess:Q,ipc:!0},H)}catch(U){J.emit("strict:error",U)}return Y},FY=(Z)=>{if(Z?.type!==IY)return!1;let{id:X,message:q}=Z;return T8[X]?.resolve({isDeadlock:!1,hasListeners:q}),!0},OY=async(Z,X,q)=>{if(Z?.type!==j8)return;let Q=o0();T8[Z.id]=Q;let J=new AbortController;try{let{isDeadlock:$,hasListeners:Y}=await Promise.race([Q,BF(X,q,J)]);if($)QY(q);if(!Y)JY(q)}finally{J.abort(),delete T8[Z.id]}},T8,BF=async(Z,X,{signal:q})=>{m1(Z,1,q),await WF(Z,"disconnect",{signal:q}),$Y(X)},j8="execa:ipc:request",IY="execa:ipc:response";var R8=B(()=>{E6();B8();w8();P6();x2();M8();T8={}});var wY=(Z,X,q)=>{if(!P2.has(Z))P2.set(Z,new Set);let Q=P2.get(Z),J=o0(),$=q?X.id:void 0,Y={onMessageSent:J,id:$};return Q.add(Y),{outgoingMessages:Q,outgoingMessage:Y}},kY=({outgoingMessages:Z,outgoingMessage:X})=>{Z.delete(X),X.onMessageSent.resolve()},DY=async(Z,X,q)=>{while(!O8(Z,X)&&P2.get(Z)?.size>0){let Q=[...P2.get(Z)];jY(Q,q),await Promise.all(Q.map(({onMessageSent:J})=>J))}},P2,O8=(Z,X)=>X.listenerCount("message")>LF(Z),LF=(Z)=>s0.has(Z)&&!Y1(s0.get(Z).options.buffer,"ipc")?1:0;var M8=B(()=>{E6();H1();j1();R8();P2=new WeakMap});import{promisify as _F}from"node:util";var I8=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},J,{strict:$=!1}={})=>{return N6({methodName:"sendMessage",isSubprocess:q,ipc:Q,isConnected:Z.connected}),zF({anyProcess:Z,channel:X,methodName:"sendMessage",isSubprocess:q,message:J,strict:$})},zF=async({anyProcess:Z,channel:X,methodName:q,isSubprocess:Q,message:J,strict:$})=>{let Y=TY({anyProcess:Z,channel:X,isSubprocess:Q,message:J,strict:$}),H=wY(Z,Y,$);try{await g3({anyProcess:Z,methodName:q,isSubprocess:Q,wrappedMessage:Y,message:J})}catch(U){throw x6(Z),U}finally{kY(H)}},g3=async({anyProcess:Z,methodName:X,isSubprocess:q,wrappedMessage:Q,message:J})=>{let $=RF(Z);try{await Promise.all([OY(Q,Z,q),$(Q)])}catch(Y){throw KY({error:Y,methodName:X,isSubprocess:q}),UY({error:Y,methodName:X,isSubprocess:q,message:J}),Y}},RF=(Z)=>{if(f3.has(Z))return f3.get(Z);let X=_F(Z.send.bind(Z));return f3.set(Z,X),X},f3;var w8=B(()=>{P6();M8();R8();f3=new WeakMap});import{scheduler as MF}from"node:timers/promises";var xY=(Z,X)=>{return C3("cancelSignal",!1,Z.connected),g3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:EY,message:X},message:X})},PY=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{return await FF({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q}),m3.signal},FF=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{if(NY)return;if(NY=!0,!Q){HY();return}if(X===null){h3();return}O1(Z,X,q),await MF.yield()},NY=!1,AY=(Z)=>{if(Z?.type!==EY)return!1;return m3.abort(Z.message),!0},EY="execa:ipc:cancel",h3=()=>{m3.abort(YY())},m3;var F8=B(()=>{w8();x2();P6();m3=new AbortController});var vY=({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.")},yY=({subprocess:Z,cancelSignal:X,gracefulCancel:q,forceKillAfterDelay:Q,context:J,controller:$})=>q?[DF({subprocess:Z,cancelSignal:X,forceKillAfterDelay:Q,context:J,controller:$})]:[],DF=async({subprocess:Z,cancelSignal:X,forceKillAfterDelay:q,context:Q,controller:{signal:J}})=>{await U8(X,J);let $=AF(X);throw await xY(Z,$),E3({kill:Z.kill,forceKillAfterDelay:q,context:Q,controllerSignal:J}),Q.terminationReason??="gracefulCancel",X.reason},AF=({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 u3=B(()=>{v3();F8();K8()});import{setTimeout as TF}from"node:timers/promises";var CY=({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})`)},SY=(Z,X,q,Q)=>X===0||X===void 0?[]:[jF(Z,X,q,Q)],jF=async(Z,X,q,{signal:Q})=>{throw await TF(X,void 0,{signal:Q}),q.terminationReason??="timeout",Z.kill(),new a0};var p3=B(()=>{g1()});import{execPath as OF,execArgv as IF}from"node:process";import bY from"node:path";var hY=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},fY=(Z,X,{node:q=!1,nodePath:Q=OF,nodeOptions:J=IF.filter((U)=>!U.startsWith("--inspect")),cwd:$,execPath:Y,...H})=>{if(Y!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let U=j6(Q,'The "nodePath" option'),W=bY.resolve($,U),G={...H,nodePath:W,node:q,cwd:$};if(!q)return[Z,X,G];if(bY.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[W,[...J,Z,...X],{ipc:!0,...G,shell:!1}]};var d3=B(()=>{O6()});import{serialize as wF}from"node:v8";var gY=({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`.");xF[q](Z)},kF=(Z)=>{try{wF(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:X})}},NF=(Z)=>{try{JSON.stringify(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:X})}},xF,mY=async(Z,X)=>{if(X===void 0)return;await Z.sendMessage(X)};var c3=B(()=>{xF={advanced:kF,json:NF}});var pY=({encoding:Z})=>{if(l3.has(Z))return;let X=EF(Z);if(X!==void 0)throw TypeError(`Invalid option \`encoding: ${k8(Z)}\`.
|
|
58
|
+
Please rename it to ${k8(X)}.`);let q=[...l3].map((Q)=>k8(Q)).join(", ");throw TypeError(`Invalid option \`encoding: ${k8(Z)}\`.
|
|
59
|
+
Please rename it to one of: ${q}.`)},PF,T0,l3,EF=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let X=Z.toLowerCase();if(X in uY)return uY[X];if(l3.has(X))return X},uY,k8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var u1=B(()=>{PF=new Set(["utf8","utf16le"]),T0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),l3=new Set([...PF,...T0]),uY={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import{statSync as vF}from"node:fs";import yF from"node:path";import CF from"node:process";var dY=(Z=cY())=>{let X=j6(Z,'The "cwd" option');return yF.resolve(X)},cY=()=>{try{return CF.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
|
|
60
|
+
${Z.message}`,Z}},lY=(Z,X)=>{if(X===cY())return Z;let q;try{q=vF(X)}catch(Q){return`The "cwd" option is invalid: ${X}.
|
|
61
|
+
${Q.message}
|
|
62
|
+
${Z}`}if(!q.isDirectory())return`The "cwd" option is not a directory: ${X}.
|
|
63
|
+
${Z}`;return Z};var n3=B(()=>{O6()});import SF from"node:path";import iY from"node:process";var aY,N8=(Z,X,q)=>{q.cwd=dY(q.cwd);let[Q,J,$]=fY(Z,X,q),{command:Y,args:H,options:U}=aY.default._parse(Q,J,$),W=$9(U),G=bF(W);if(CY(G),pY(G),gY(G),ZY(G),vY(G),G.shell=z3(G.shell),G.env=hF(G),G.killSignal=o9(G.killSignal),G.forceKillAfterDelay=t9(G.forceKillAfterDelay),G.lines=G.lines.map((V,_)=>V&&!T0.has(G.encoding)&&G.buffer[_]),iY.platform==="win32"&&SF.basename(Y,".exe")==="cmd")H.unshift("/q");return{file:Y,commandArguments:H,options:G}},bF=({extendEnv:Z=!0,preferLocal:X=!1,cwd:q,localDir:Q=q,encoding:J="utf8",reject:$=!0,cleanup:Y=!0,all:H=!1,windowsHide:U=!0,killSignal:W="SIGTERM",forceKillAfterDelay:G=!0,gracefulCancel:V=!1,ipcInput:_,ipc:L=_!==void 0||V,serialization:z="advanced",...R})=>({...R,extendEnv:Z,preferLocal:X,cwd:q,localDirectory:Q,encoding:J,reject:$,cleanup:Y,all:H,windowsHide:U,killSignal:W,forceKillAfterDelay:G,gracefulCancel:V,ipcInput:_,ipc:L,serialization:z}),hF=({env:Z,extendEnv:X,preferLocal:q,node:Q,localDirectory:J,nodePath:$})=>{let Y=X?{...iY.env,...Z}:Z;if(q||Q)return S9({env:Y,cwd:J,execPath:$,preferLocal:q,addExecPath:Q});return Y};var i3=B(()=>{b9();K8();w2();y3();u3();p3();d3();c3();u1();n3();O6();H1();aY=nY(h7(),1)});var x8=(Z,X,q)=>q.shell&&X.length>0?[[Z,...X].join(" "),[],q]:[Z,X,q];var a3=()=>{};function y6(Z){if(typeof Z==="string")return fF(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return gF(Z)}var fF=(Z)=>Z.at(-1)===oY?Z.slice(0,Z.at(-2)===sY?-2:-1):Z,gF=(Z)=>Z.at(-1)===mF?Z.subarray(0,Z.at(-2)===uF?-2:-1):Z,oY=`
|
|
64
|
+
`,mF,sY="\r",uF;var o3=B(()=>{mF=oY.codePointAt(0),uF=sY.codePointAt(0)});function h0(Z,{checkOpen:X=!0}={}){return Z!==null&&typeof Z==="object"&&(Z.writable||Z.readable||!X||Z.writable===void 0&&Z.readable===void 0)&&typeof Z.pipe==="function"}function s3(Z,{checkOpen:X=!0}={}){return h0(Z,{checkOpen:X})&&(Z.writable||!X)&&typeof Z.write==="function"&&typeof Z.end==="function"&&typeof Z.writable==="boolean"&&typeof Z.writableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function p1(Z,{checkOpen:X=!0}={}){return h0(Z,{checkOpen:X})&&(Z.readable||!X)&&typeof Z.read==="function"&&typeof Z.readable==="boolean"&&typeof Z.readableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function r3(Z,X){return s3(Z,X)&&p1(Z,X)}var d1=()=>{};class rY{#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 tY(){return this[t3].next()}function eY(Z){return this[t3].return(Z)}function e3({preventCancel:Z=!1}={}){let X=this.getReader(),q=new rY(X,Z),Q=Object.create(dF);return Q[t3]=q,Q}var pF,t3,dF;var ZH=B(()=>{pF=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);t3=Symbol();Object.defineProperty(tY,"name",{value:"next"});Object.defineProperty(eY,"name",{value:"return"});dF=Object.create(pF,{next:{enumerable:!0,configurable:!0,writable:!0,value:tY},return:{enumerable:!0,configurable:!0,writable:!0,value:eY}})});var XH=()=>{};var qH=B(()=>{ZH();XH()});var QH=(Z)=>{if(p1(Z,{checkOpen:!1})&&E2.on!==void 0)return lF(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(cF.call(Z)==="[object ReadableStream]")return e3.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},cF,lF=async function*(Z){let X=new AbortController,q={};nF(Z,X,q);try{for await(let[Q]of E2.on(Z,"data",{signal:X.signal}))yield Q}catch(Q){if(q.error!==void 0)throw q.error;else if(!X.signal.aborted)throw Q}finally{Z.destroy()}},nF=async(Z,X,q)=>{try{await E2.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(Q){q.error=Q}finally{X.abort()}},E2;var ZZ=B(()=>{d1();qH();({toString:cF}=Object.prototype),E2={}});var C6=async(Z,{init:X,convertChunk:q,getSize:Q,truncateChunk:J,addChunk:$,getFinalChunk:Y,finalize:H},{maxBuffer:U=Number.POSITIVE_INFINITY}={})=>{let W=QH(Z),G=X();G.length=0;try{for await(let V of W){let _=aF(V),L=q[_](V,G);YH({convertedChunk:L,state:G,getSize:Q,truncateChunk:J,addChunk:$,maxBuffer:U})}return iF({state:G,convertChunk:q,getSize:Q,truncateChunk:J,addChunk:$,getFinalChunk:Y,maxBuffer:U}),H(G)}catch(V){let _=typeof V==="object"&&V!==null?V:Error(V);throw _.bufferedData=H(G),_}},iF=({state:Z,getSize:X,truncateChunk:q,addChunk:Q,getFinalChunk:J,maxBuffer:$})=>{let Y=J(Z);if(Y!==void 0)YH({convertedChunk:Y,state:Z,getSize:X,truncateChunk:q,addChunk:Q,maxBuffer:$})},YH=({convertedChunk:Z,state:X,getSize:q,truncateChunk:Q,addChunk:J,maxBuffer:$})=>{let Y=q(Z),H=X.length+Y;if(H<=$){JH(Z,X,J,H);return}let U=Q(Z,$-X.length);if(U!==void 0)JH(U,X,J,$);throw new K1},JH=(Z,X,q,Q)=>{X.contents=q(Z,X,Q),X.length=Q},aF=(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=$H.call(Z);if(q==="[object ArrayBuffer]")return"arrayBuffer";if(q==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&$H.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},$H,K1;var v2=B(()=>{ZZ();({toString:$H}=Object.prototype);K1=class K1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var U1=(Z)=>Z,y2=()=>{return},P8=({contents:Z})=>Z,E8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},v8=(Z)=>Z.length;var y8=()=>{};async function C8(Z,X){return C6(Z,tF,X)}var oF=()=>({contents:[]}),sF=()=>1,rF=(Z,{contents:X})=>{return X.push(Z),X},tF;var HH=B(()=>{v2();y8();tF={init:oF,convertChunk:{string:U1,buffer:U1,arrayBuffer:U1,dataView:U1,typedArray:U1,others:U1},getSize:sF,truncateChunk:y2,addChunk:rF,getFinalChunk:y2,finalize:P8}});async function S8(Z,X){return C6(Z,HD,X)}var eF=()=>({contents:new ArrayBuffer(0)}),ZD=(Z)=>XD.encode(Z),XD,KH=(Z)=>new Uint8Array(Z),UH=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),qD=(Z,X)=>Z.slice(0,X),QD=(Z,{contents:X,length:q},Q)=>{let J=VH()?$D(X,Q):JD(X,Q);return new Uint8Array(J).set(Z,q),J},JD=(Z,X)=>{if(X<=Z.byteLength)return Z;let q=new ArrayBuffer(WH(X));return new Uint8Array(q).set(new Uint8Array(Z),0),q},$D=(Z,X)=>{if(X<=Z.maxByteLength)return Z.resize(X),Z;let q=new ArrayBuffer(X,{maxByteLength:WH(X)});return new Uint8Array(q).set(new Uint8Array(Z),0),q},WH=(Z)=>GH**Math.ceil(Math.log(Z)/Math.log(GH)),GH=2,YD=({contents:Z,length:X})=>VH()?Z:Z.slice(0,X),VH=()=>("resize"in ArrayBuffer.prototype),HD;var BH=B(()=>{v2();y8();XD=new TextEncoder,HD={init:eF,convertChunk:{string:ZD,buffer:KH,arrayBuffer:KH,dataView:UH,typedArray:UH,others:E8},getSize:v8,truncateChunk:qD,addChunk:QD,getFinalChunk:y2,finalize:YD}});async function h8(Z,X){return C6(Z,VD,X)}var KD=()=>({contents:"",textDecoder:new TextDecoder}),b8=(Z,{textDecoder:X})=>X.decode(Z,{stream:!0}),UD=(Z,{contents:X})=>X+Z,GD=(Z,X)=>Z.slice(0,X),WD=({textDecoder:Z})=>{let X=Z.decode();return X===""?void 0:X},VD;var LH=B(()=>{v2();y8();VD={init:KD,convertChunk:{string:U1,buffer:b8,arrayBuffer:b8,dataView:b8,typedArray:b8,others:E8},getSize:v8,truncateChunk:GD,addChunk:UD,getFinalChunk:WD,finalize:P8}});var _H=B(()=>{HH();BH();LH();v2()});import{on as BD}from"node:events";import{finished as LD}from"node:stream/promises";var f8=B(()=>{ZZ();_H();Object.assign(E2,{on:BD,finished:LD})});var zH=({error:Z,stream:X,readableObjectMode:q,lines:Q,encoding:J,fdNumber:$})=>{if(!(Z instanceof K1))throw Z;if($==="all")return Z;let Y=_D(q,Q,J);throw Z.maxBufferInfo={fdNumber:$,unit:Y},X.destroy(),Z},_D=(Z,X,q)=>{if(Z)return"objects";if(X)return"lines";if(q==="buffer")return"bytes";return"characters"},RH=(Z,X,q)=>{if(X.length!==q)return;let Q=new K1;throw Q.maxBufferInfo={fdNumber:"ipc"},Q},MH=(Z,X)=>{let{streamName:q,threshold:Q,unit:J}=zD(Z,X);return`Command's ${q} was larger than ${Q} ${J}`},zD=(Z,X)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:X[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:q,unit:Q}}=Z;delete Z.maxBufferInfo;let J=Y1(X,q);if(q==="ipc")return{streamName:"IPC output",threshold:J,unit:"messages"};return{streamName:c4(q),threshold:J,unit:Q}},FH=(Z,X,q)=>Z?.code==="ENOBUFS"&&X!==null&&X.some((Q)=>Q!==null&&Q.length>g8(q)),DH=(Z,X,q)=>{if(!X)return Z;let Q=g8(q);return Z.length>Q?Z.slice(0,Q):Z},g8=([,Z])=>Z;var c1=B(()=>{f8();$1();H1()});import{inspect as RD}from"node:util";var TH=({stdio:Z,all:X,ipcOutput:q,originalError:Q,signal:J,signalDescription:$,exitCode:Y,escapedCommand:H,timedOut:U,isCanceled:W,isGracefullyCanceled:G,isMaxBuffer:V,isForcefullyTerminated:_,forceKillAfterDelay:L,killSignal:z,maxBuffer:R,timeout:D,cwd:M})=>{let k=Q?.code,F=MD({originalError:Q,timedOut:U,timeout:D,isMaxBuffer:V,maxBuffer:R,errorCode:k,signal:J,signalDescription:$,exitCode:Y,isCanceled:W,isGracefullyCanceled:G,isForcefullyTerminated:_,forceKillAfterDelay:L,killSignal:z}),I=DD(Q,M),T=I===void 0?"":`
|
|
65
|
+
${I}`,j=`${F}: ${H}${T}`,A=X===void 0?[Z[2],Z[1]]:[X],f=[j,...A,...Z.slice(3),q.map((w)=>AD(w)).join(`
|
|
66
|
+
`)].map((w)=>O2(y6(TD(w)))).filter(Boolean).join(`
|
|
67
|
+
|
|
68
|
+
`);return{originalMessage:I,shortMessage:j,message:f}},MD=({originalError:Z,timedOut:X,timeout:q,isMaxBuffer:Q,maxBuffer:J,errorCode:$,signal:Y,signalDescription:H,exitCode:U,isCanceled:W,isGracefullyCanceled:G,isForcefullyTerminated:V,forceKillAfterDelay:_,killSignal:L})=>{let z=FD(V,_);if(X)return`Command timed out after ${q} milliseconds${z}`;if(G){if(Y===void 0)return`Command was gracefully canceled with exit code ${U}`;return V?`Command was gracefully canceled${z}`:`Command was gracefully canceled with ${Y} (${H})`}if(W)return`Command was canceled${z}`;if(Q)return`${MH(Z,J)}${z}`;if($!==void 0)return`Command failed with ${$}${z}`;if(V)return`Command was killed with ${L} (${H8(L)})${z}`;if(Y!==void 0)return`Command was killed with ${Y} (${H})`;if(U!==void 0)return`Command failed with exit code ${U}`;return"Command failed"},FD=(Z,X)=>Z?` and was forcefully terminated after ${X} milliseconds`:"",DD=(Z,X)=>{if(Z instanceof a0)return;let q=g9(Z)?Z.originalMessage:String(Z?.message??Z),Q=O2(lY(q,X));return Q===""?void 0:Q},AD=(Z)=>typeof Z==="string"?Z:RD(Z),TD=(Z)=>Array.isArray(Z)?Z.map((X)=>y6(AH(X))).filter(Boolean).join(`
|
|
69
|
+
`):AH(Z),AH=(Z)=>{if(typeof Z==="string")return Z;if(q0(Z))return p4(Z);return""};var jH=B(()=>{o3();A0();n3();i4();c1();w2();g1()});var m8=({command:Z,escapedCommand:X,stdio:q,all:Q,ipcOutput:J,options:{cwd:$},startTime:Y})=>OH({command:Z,escapedCommand:X,cwd:$,durationMs:I3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:q[1],stderr:q[2],all:Q,stdio:q,ipcOutput:J,pipedFrom:[]}),S6=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:J,startTime:$,isSync:Y})=>C2({error:Z,command:X,escapedCommand:q,startTime:$,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:Q.length}),ipcOutput:[],options:J,isSync:Y}),C2=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:J,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:W,signal:G,stdio:V,all:_,ipcOutput:L,options:{timeoutDuration:z,timeout:R=z,forceKillAfterDelay:D,killSignal:M,cwd:k,maxBuffer:F},isSync:I})=>{let{exitCode:T,signal:j,signalDescription:A}=OD(W,G),{originalMessage:f,shortMessage:w,message:x}=TH({stdio:V,all:_,ipcOutput:L,originalError:Z,signal:j,signalDescription:A,exitCode:T,escapedCommand:q,timedOut:J,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,forceKillAfterDelay:D,killSignal:M,maxBuffer:F,timeout:R,cwd:k}),v=h9(Z,x,I);return Object.assign(v,jD({error:v,command:X,escapedCommand:q,startTime:Q,timedOut:J,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:T,signal:j,signalDescription:A,stdio:V,all:_,ipcOutput:L,cwd:k,originalMessage:f,shortMessage:w})),v},jD=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:J,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:W,signal:G,signalDescription:V,stdio:_,all:L,ipcOutput:z,cwd:R,originalMessage:D,shortMessage:M})=>OH({shortMessage:M,originalMessage:D,command:X,escapedCommand:q,cwd:R,durationMs:I3(Q),failed:!0,timedOut:J,isCanceled:$,isGracefullyCanceled:Y,isTerminated:G!==void 0,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:W,signal:G,signalDescription:V,code:Z.cause?.code,stdout:_[1],stderr:_[2],all:L,stdio:_,ipcOutput:z,pipedFrom:[]}),OH=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0)),OD=(Z,X)=>{let q=Z===null?void 0:Z,Q=X===null?void 0:X,J=Q===void 0?void 0:H8(X);return{exitCode:q,signal:Q,signalDescription:J}};var S2=B(()=>{w2();e4();g1();jH()});function ID(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(IH(Z*1000)%1000),nanoseconds:Math.trunc(IH(Z*1e6)%1000)}}function wD(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 XZ(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return ID(Z);break}case"bigint":return wD(Z)}throw TypeError("Expected a finite number or bigint")}var IH=(Z)=>Number.isFinite(Z)?Z:0;var wH=()=>{};function qZ(Z,X){let q=typeof Z==="bigint";if(!q&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");X={...X};let Q=Z<0?"-":"";if(Z=Z<0?-Z:Z,X.colonNotation)X.compact=!1,X.formatSubMilliseconds=!1,X.separateMilliseconds=!1,X.verbose=!1;if(X.compact)X.unitCount=1,X.secondsDecimalDigits=0,X.millisecondsDecimalDigits=0;let J=[],$=(G,V)=>{let _=Math.floor(G*10**V+xD);return(Math.round(_)/10**V).toFixed(V)},Y=(G,V,_,L)=>{if((J.length===0||!X.colonNotation)&&kD(G)&&!(X.colonNotation&&_==="m"))return;if(L??=String(G),X.colonNotation){let z=L.includes(".")?L.split(".")[0].length:L.length,R=J.length>0?2:1;L="0".repeat(Math.max(0,R-z))+L}else L+=X.verbose?" "+ND(V,G):_;J.push(L)},H=XZ(Z),U=BigInt(H.days);if(X.hideYearAndDays)Y(BigInt(U)*24n+BigInt(H.hours),"hour","h");else{if(X.hideYear)Y(U,"day","d");else Y(U/365n,"year","y"),Y(U%365n,"day","d");Y(Number(H.hours),"hour","h")}if(Y(Number(H.minutes),"minute","m"),!X.hideSeconds)if(X.separateMilliseconds||X.formatSubMilliseconds||!X.colonNotation&&Z<1000&&!X.subSecondsAsDecimals){let G=Number(H.seconds),V=Number(H.milliseconds),_=Number(H.microseconds),L=Number(H.nanoseconds);if(Y(G,"second","s"),X.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(_,"microsecond","µs"),Y(L,"nanosecond","ns");else{let z=V+_/1000+L/1e6,R=typeof X.millisecondsDecimalDigits==="number"?X.millisecondsDecimalDigits:0,D=z>=1?Math.round(z):Math.ceil(z),M=R?z.toFixed(R):D;Y(Number.parseFloat(M),"millisecond","ms",M)}}else{let G=(q?Number(Z%PD):Z)/1000%60,V=typeof X.secondsDecimalDigits==="number"?X.secondsDecimalDigits:1,_=$(G,V),L=X.keepDecimalsOnWholeSeconds?_:_.replace(/\.0+$/,"");Y(Number.parseFloat(L),"second","s",L)}if(J.length===0)return Q+"0"+(X.verbose?" milliseconds":"ms");let W=X.colonNotation?":":" ";if(typeof X.unitCount==="number")J=J.slice(0,Math.max(X.unitCount,1));return Q+J.join(W)}var kD=(Z)=>Z===0||Z===0n,ND=(Z,X)=>X===1||X===1n?Z:`${Z}s`,xD=0.0000001,PD;var kH=B(()=>{wH();PD=24n*60n*60n*1000n});var NH=(Z,X)=>{if(Z.failed)i0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:X,result:Z})};var xH=B(()=>{k6()});var PH=(Z,X)=>{if(!I6(X))return;NH(Z,X),ED(Z,X)},ED=(Z,X)=>{let q=`(done in ${qZ(Z.durationMs)})`;i0({type:"duration",verboseMessage:q,verboseInfo:X,result:Z})};var EH=B(()=>{kH();A1();k6();xH()});var b6=(Z,X,{reject:q})=>{if(PH(Z,X),Z.failed&&q)throw Z;return Z};var u8=B(()=>{EH()});var CH=(Z,X)=>{if(l1(Z))return"asyncGenerator";if(hH(Z))return"generator";if(p8(Z))return"fileUrl";if(bD(Z))return"filePath";if(gD(Z))return"webStream";if(h0(Z,{checkOpen:!1}))return"native";if(q0(Z))return"uint8Array";if(mD(Z))return"asyncIterable";if(uD(Z))return"iterable";if($Z(Z))return SH({transform:Z},X);if(SD(Z))return vD(Z,X);return"native"},vD=(Z,X)=>{if(r3(Z.transform,{checkOpen:!1}))return yD(Z,X);if($Z(Z.transform))return SH(Z,X);return CD(Z,X)},yD=(Z,X)=>{return bH(Z,X,"Duplex stream"),"duplex"},SH=(Z,X)=>{return bH(Z,X,"web TransformStream"),"webTransform"},bH=({final:Z,binary:X,objectMode:q},Q,J)=>{vH(Z,`${Q}.final`,J),vH(X,`${Q}.binary`,J),QZ(q,`${Q}.objectMode`)},vH=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${X}\` option can only be defined when using a generator, not a ${q}.`)},CD=({transform:Z,final:X,binary:q,objectMode:Q},J)=>{if(Z!==void 0&&!yH(Z))throw TypeError(`The \`${J}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(r3(X,{checkOpen:!1}))throw TypeError(`The \`${J}.final\` option must not be a Duplex stream.`);if($Z(X))throw TypeError(`The \`${J}.final\` option must not be a web TransformStream.`);if(X!==void 0&&!yH(X))throw TypeError(`The \`${J}.final\` option must be a generator.`);return QZ(q,`${J}.binary`),QZ(Q,`${J}.objectMode`),l1(Z)||l1(X)?"asyncGenerator":"generator"},QZ=(Z,X)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${X}\` option must use a boolean.`)},yH=(Z)=>l1(Z)||hH(Z),l1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",hH=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",SD=(Z)=>t(Z)&&(Z.transform!==void 0||Z.final!==void 0),p8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",fH=(Z)=>p8(Z)&&Z.protocol!=="file:",bD=(Z)=>t(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>hD.has(X))&&JZ(Z.file),hD,JZ=(Z)=>typeof Z==="string",gH=(Z,X)=>Z==="native"&&typeof X==="string"&&!fD.has(X),fD,mH=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",d8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",gD=(Z)=>mH(Z)||d8(Z),$Z=(Z)=>mH(Z?.readable)&&d8(Z?.writable),mD=(Z)=>uH(Z)&&typeof Z[Symbol.asyncIterator]==="function",uD=(Z)=>uH(Z)&&typeof Z[Symbol.iterator]==="function",uH=(Z)=>typeof Z==="object"&&Z!==null,w0,c8,YZ,pH,dH,I1;var R0=B(()=>{d1();Q1();A0();hD=new Set(["file","append"]),fD=new Set(["ipc","ignore","inherit","overlapped","pipe"]),w0=new Set(["generator","asyncGenerator","duplex","webTransform"]),c8=new Set(["fileUrl","filePath","fileNumber"]),YZ=new Set(["fileUrl","filePath"]),pH=new Set([...YZ,"webStream","nodeStream"]),dH=new Set(["webTransform","duplex"]),I1={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"}});var HZ=(Z,X,q,Q)=>Q==="output"?pD(Z,X,q):dD(Z,X,q),pD=(Z,X,q)=>{let Q=X!==0&&q[X-1].value.readableObjectMode;return{writableObjectMode:Q,readableObjectMode:Z??Q}},dD=(Z,X,q)=>{let Q=X===0?Z===!0:q[X-1].value.readableObjectMode,J=X!==q.length-1&&(Z??Q);return{writableObjectMode:Q,readableObjectMode:J}},cH=(Z,X)=>{let q=Z.findLast(({type:Q})=>w0.has(Q));if(q===void 0)return!1;return X==="input"?q.value.writableObjectMode:q.value.readableObjectMode};var KZ=B(()=>{R0()});var lH=(Z,X,q,Q)=>[...Z.filter(({type:J})=>!w0.has(J)),...cD(Z,X,q,Q)],cD=(Z,X,q,{encoding:Q})=>{let J=Z.filter(({type:Y})=>w0.has(Y)),$=Array.from({length:J.length});for(let[Y,H]of Object.entries(J))$[Y]=lD({stdioItem:H,index:Number(Y),newTransforms:$,optionName:X,direction:q,encoding:Q});return oD($,q)},lD=({stdioItem:Z,stdioItem:{type:X},index:q,newTransforms:Q,optionName:J,direction:$,encoding:Y})=>{if(X==="duplex")return nD({stdioItem:Z,optionName:J});if(X==="webTransform")return iD({stdioItem:Z,index:q,newTransforms:Q,direction:$});return aD({stdioItem:Z,index:q,newTransforms:Q,direction:$,encoding:Y})},nD=({stdioItem:Z,stdioItem:{value:{transform:X,transform:{writableObjectMode:q,readableObjectMode:Q},objectMode:J=Q}},optionName:$})=>{if(J&&!Q)throw TypeError(`The \`${$}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!J&&Q)throw TypeError(`The \`${$}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:X,writableObjectMode:q,readableObjectMode:Q}}},iD=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:J})=>{let{transform:$,objectMode:Y}=t(X)?X:{transform:X},{writableObjectMode:H,readableObjectMode:U}=HZ(Y,q,Q,J);return{...Z,value:{transform:$,writableObjectMode:H,readableObjectMode:U}}},aD=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:J,encoding:$})=>{let{transform:Y,final:H,binary:U=!1,preserveNewlines:W=!1,objectMode:G}=t(X)?X:{transform:X},V=U||T0.has($),{writableObjectMode:_,readableObjectMode:L}=HZ(G,q,Q,J);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:W,writableObjectMode:_,readableObjectMode:L}}},oD=(Z,X)=>X==="input"?Z.reverse():Z;var nH=B(()=>{Q1();u1();R0();KZ()});import UZ from"node:process";var iH=(Z,X,q)=>{let Q=Z.map((J)=>sD(J,X));if(Q.includes("input")&&Q.includes("output"))throw TypeError(`The \`${q}\` option must not be an array of both readable and writable values.`);return Q.find(Boolean)??eD},sD=({type:Z,value:X},q)=>rD[q]??aH[Z](X),rD,h6=()=>{return},GZ=()=>"input",aH,tD=(Z)=>{if([0,UZ.stdin].includes(Z))return"input";if([1,2,UZ.stdout,UZ.stderr].includes(Z))return"output"},eD="output";var oH=B(()=>{d1();R0();rD=["input","output","output"],aH={generator:h6,asyncGenerator:h6,fileUrl:h6,filePath:h6,iterable:GZ,asyncIterable:GZ,uint8Array:GZ,webStream:(Z)=>d8(Z)?"output":"input",nodeStream(Z){if(!p1(Z,{checkOpen:!1}))return"output";return s3(Z,{checkOpen:!1})?void 0:"input"},webTransform:h6,duplex:h6,native(Z){let X=tD(Z);if(X!==void 0)return X;if(h0(Z,{checkOpen:!1}))return aH.nodeStream(Z)}}});var sH=(Z,X)=>X&&!Z.includes("ipc")?[...Z,"ipc"]:Z;var rH=()=>{};var tH=({stdio:Z,ipc:X,buffer:q,...Q},J,$)=>{let Y=ZA(Z,Q).map((H,U)=>eH(H,U));return $?qA(Y,q,J):sH(Y,X)},ZA=(Z,X)=>{if(Z===void 0)return I0.map((Q)=>X[Q]);if(XA(X))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${I0.map((Q)=>`\`${Q}\``).join(", ")}`);if(typeof Z==="string")return[Z,Z,Z];if(!Array.isArray(Z))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof Z}\``);let q=Math.max(Z.length,I0.length);return Array.from({length:q},(Q,J)=>Z[J])},XA=(Z)=>I0.some((X)=>Z[X]!==void 0),eH=(Z,X)=>{if(Array.isArray(Z))return Z.map((q)=>eH(q,X));if(Z===null||Z===void 0)return X>=I0.length?"ignore":"pipe";return Z},qA=(Z,X,q)=>Z.map((Q,J)=>!X[J]&&J!==0&&!w6(q,J)&&QA(Q)?"ignore":Q),QA=(Z)=>Z==="pipe"||Array.isArray(Z)&&Z.every((X)=>X==="pipe");var ZK=B(()=>{$1();rH();A1()});import{readFileSync as JA}from"node:fs";import $A from"node:tty";var qK=({stdioItem:Z,stdioItem:{type:X},isStdioArray:q,fdNumber:Q,direction:J,isSync:$})=>{if(!q||X!=="native")return Z;return $?YA({stdioItem:Z,fdNumber:Q,direction:J}):UA({stdioItem:Z,fdNumber:Q})},YA=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q,direction:J})=>{let $=HA({value:X,optionName:q,fdNumber:Q,direction:J});if($!==void 0)return $;if(h0(X,{checkOpen:!1}))throw TypeError(`The \`${q}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},HA=({value:Z,optionName:X,fdNumber:q,direction:Q})=>{let J=KA(Z,q);if(J===void 0)return;if(Q==="output")return{type:"fileNumber",value:J,optionName:X};if($A.isatty(J))throw TypeError(`The \`${X}: ${W8(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:J1(JA(J)),optionName:X}},KA=(Z,X)=>{if(Z==="inherit")return X;if(typeof Z==="number")return Z;let q=d4.indexOf(Z);if(q!==-1)return q},UA=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q})=>{if(X==="inherit")return{type:"nodeStream",value:XK(Q,X,q),optionName:q};if(typeof X==="number")return{type:"nodeStream",value:XK(X,X,q),optionName:q};if(h0(X,{checkOpen:!1}))return{type:"nodeStream",value:X,optionName:q};return Z},XK=(Z,X,q)=>{let Q=d4[Z];if(Q===void 0)throw TypeError(`The \`${q}: ${X}\` option is invalid: no such standard stream.`);return Q};var QK=B(()=>{d1();$1();A0();j1()});var JK=({input:Z,inputFile:X},q)=>q===0?[...GA(Z),...VA(X)]:[],GA=(Z)=>Z===void 0?[]:[{type:WA(Z),value:Z,optionName:"input"}],WA=(Z)=>{if(p1(Z,{checkOpen:!1}))return"nodeStream";if(typeof Z==="string")return"string";if(q0(Z))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},VA=(Z)=>Z===void 0?[]:[{...BA(Z),optionName:"inputFile"}],BA=(Z)=>{if(p8(Z))return{type:"fileUrl",value:Z};if(JZ(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var $K=B(()=>{d1();A0();R0()});var YK=(Z)=>Z.filter((X,q)=>Z.every((Q,J)=>X.value!==Q.value||q>=J||X.type==="generator"||X.type==="asyncGenerator")),HK=({stdioItem:{type:Z,value:X,optionName:q},direction:Q,fileDescriptors:J,isSync:$})=>{let Y=LA(J,Z);if(Y.length===0)return;if($){_A({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});return}if(pH.has(Z))return KK({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});if(dH.has(Z))RA({otherStdioItems:Y,type:Z,value:X,optionName:q})},LA=(Z,X)=>Z.flatMap(({direction:q,stdioItems:Q})=>Q.filter((J)=>J.type===X).map((J)=>({...J,direction:q}))),_A=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:J})=>{if(YZ.has(X))KK({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:J})},KK=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:J})=>{let $=Z.filter((H)=>zA(H,q));if($.length===0)return;let Y=$.find((H)=>H.direction!==J);return UK(Y,Q,X),J==="output"?$[0].stream:void 0},zA=({type:Z,value:X},q)=>{if(Z==="filePath")return X.file===q.file;if(Z==="fileUrl")return X.href===q.href;return X===q},RA=({otherStdioItems:Z,type:X,value:q,optionName:Q})=>{let J=Z.find(({value:{transform:$}})=>$===q.transform);UK(J,Q,X)},UK=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${X}\` options must not target ${I1[q]} that is the same.`)};var GK=B(()=>{R0()});var l8=(Z,X,q,Q)=>{let $=tH(X,q,Q).map((H,U)=>MA({stdioOption:H,fdNumber:U,options:X,isSync:Q})),Y=wA({initialFileDescriptors:$,addProperties:Z,options:X,isSync:Q});return X.stdio=Y.map(({stdioItems:H})=>xA(H)),Y},MA=({stdioOption:Z,fdNumber:X,options:q,isSync:Q})=>{let J=c4(X),{stdioItems:$,isStdioArray:Y}=FA({stdioOption:Z,fdNumber:X,options:q,optionName:J}),H=iH($,X,J),U=$.map((V)=>qK({stdioItem:V,isStdioArray:Y,fdNumber:X,direction:H,isSync:Q})),W=lH(U,J,H,q),G=cH(W,H);return IA(W,G),{direction:H,objectMode:G,stdioItems:W}},FA=({stdioOption:Z,fdNumber:X,options:q,optionName:Q})=>{let $=[...(Array.isArray(Z)?Z:[Z]).map((U)=>DA(U,Q)),...JK(q,X)],Y=YK($),H=Y.length>1;return AA(Y,H,Q),jA(Y),{stdioItems:Y,isStdioArray:H}},DA=(Z,X)=>({type:CH(Z,X),value:Z,optionName:X}),AA=(Z,X,q)=>{if(Z.length===0)throw TypeError(`The \`${q}\` option must not be an empty array.`);if(!X)return;for(let{value:Q,optionName:J}of Z)if(TA.has(Q))throw Error(`The \`${J}\` option must not include \`${Q}\`.`)},TA,jA=(Z)=>{for(let X of Z)OA(X)},OA=({type:Z,value:X,optionName:q})=>{if(fH(X))throw TypeError(`The \`${q}: URL\` option must use the \`file:\` scheme.
|
|
70
|
+
For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(gH(Z,X))throw TypeError(`The \`${q}: { file: '...' }\` option must be used instead of \`${q}: '...'\`.`)},IA=(Z,X)=>{if(!X)return;let q=Z.find(({type:Q})=>c8.has(Q));if(q!==void 0)throw TypeError(`The \`${q.optionName}\` option cannot use both files and transforms in objectMode.`)},wA=({initialFileDescriptors:Z,addProperties:X,options:q,isSync:Q})=>{let J=[];try{for(let $ of Z)J.push(kA({fileDescriptor:$,fileDescriptors:J,addProperties:X,options:q,isSync:Q}));return J}catch($){throw WZ(J),$}},kA=({fileDescriptor:{direction:Z,objectMode:X,stdioItems:q},fileDescriptors:Q,addProperties:J,options:$,isSync:Y})=>{let H=q.map((U)=>NA({stdioItem:U,addProperties:J,direction:Z,options:$,fileDescriptors:Q,isSync:Y}));return{direction:Z,objectMode:X,stdioItems:H}},NA=({stdioItem:Z,addProperties:X,direction:q,options:Q,fileDescriptors:J,isSync:$})=>{let Y=HK({stdioItem:Z,direction:q,fileDescriptors:J,isSync:$});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...X[q][Z.type](Z,Q)}},WZ=(Z)=>{for(let{stdioItems:X}of Z)for(let{stream:q}of X)if(q!==void 0&&!S0(q))q.destroy()},xA=(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 n8=B(()=>{$1();nH();KZ();R0();oH();ZK();QK();$K();GK();TA=new Set(["ignore","ipc"])});import{readFileSync as WK}from"node:fs";var BK=(Z,X)=>l8(EA,Z,X,!0),r0=({type:Z,optionName:X})=>{LK(X,I1[Z])},PA=({optionName:Z,value:X})=>{if(X==="ipc"||X==="overlapped")LK(Z,`"${X}"`);return{}},LK=(Z,X)=>{throw TypeError(`The \`${Z}\` option cannot be ${X} with synchronous methods.`)},VK,EA;var _K=B(()=>{A0();n8();R0();VK={generator(){},asyncGenerator:r0,webStream:r0,nodeStream:r0,webTransform:r0,duplex:r0,asyncIterable:r0,native:PA},EA={input:{...VK,fileUrl:({value:Z})=>({contents:[J1(WK(Z))]}),filePath:({value:{file:Z}})=>({contents:[J1(WK(Z))]}),fileNumber:r0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...VK,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:X}})=>({path:Z,append:X}),fileNumber:({value:Z})=>({path:Z}),iterable:r0,string:r0,uint8Array:r0}}});var G1=(Z,{stripFinalNewline:X},q)=>VZ(X,q)&&Z!==void 0&&!Array.isArray(Z)?y6(Z):Z,VZ=(Z,X)=>X==="all"?Z[1]||Z[2]:Z[X];var b2=B(()=>{o3()});var i8=(Z,X,q,Q)=>Z||q?void 0:RK(X,Q),LZ=(Z,X,q)=>q?Z.flatMap((Q)=>zK(Q,X)):zK(Z,X),zK=(Z,X)=>{let{transform:q,final:Q}=RK(X,{});return[...q(Z),...Q()]},RK=(Z,X)=>{return X.previousChunks="",{transform:vA.bind(void 0,X,Z),final:CA.bind(void 0,X)}},vA=function*(Z,X,q){if(typeof q!=="string"){yield q;return}let{previousChunks:Q}=Z,J=-1;for(let $=0;$<q.length;$+=1)if(q[$]===`
|
|
71
|
+
`){let Y=yA(q,$,X,Z),H=q.slice(J+1,$+1-Y);if(Q.length>0)H=BZ(Q,H),Q="";yield H,J=$}if(J!==q.length-1)Q=BZ(Q,q.slice(J+1));Z.previousChunks=Q},yA=(Z,X,q,Q)=>{if(q)return 0;return Q.isWindowsNewline=X!==0&&Z[X-1]==="\r",Q.isWindowsNewline?2:1},CA=function*({previousChunks:Z}){if(Z.length>0)yield Z},MK=({binary:Z,preserveNewlines:X,readableObjectMode:q,state:Q})=>Z||X||q?void 0:{transform:SA.bind(void 0,Q)},SA=function*({isWindowsNewline:Z=!1},X){let{unixNewline:q,windowsNewline:Q,LF:J,concatBytes:$}=typeof X==="string"?bA:fA;if(X.at(-1)===J){yield X;return}yield $(X,Z?Q:q)},BZ=(Z,X)=>`${Z}${X}`,bA,hA=(Z,X)=>{let q=new Uint8Array(Z.length+X.length);return q.set(Z,0),q.set(X,Z.length),q},fA;var a8=B(()=>{bA={windowsNewline:`\r
|
|
72
|
+
`,unixNewline:`
|
|
73
|
+
`,LF:`
|
|
74
|
+
`,concatBytes:BZ},fA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:hA}});import{Buffer as gA}from"node:buffer";var FK=(Z,X)=>Z?void 0:mA.bind(void 0,X),mA=function*(Z,X){if(typeof X!=="string"&&!q0(X)&&!gA.isBuffer(X))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof X}.`);yield X},DK=(Z,X)=>Z?uA.bind(void 0,X):pA.bind(void 0,X),uA=function*(Z,X){AK(Z,X),yield X},pA=function*(Z,X){if(AK(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},AK=(Z,X)=>{if(X===null||X===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${X}\`.
|
|
75
|
+
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
76
|
+
if (condition) { yield value; }`)};var TK=B(()=>{A0()});import{Buffer as dA}from"node:buffer";import{StringDecoder as cA}from"node:string_decoder";var o8=(Z,X,q)=>{if(q)return;if(Z)return{transform:lA.bind(void 0,new TextEncoder)};let Q=new cA(X);return{transform:nA.bind(void 0,Q),final:iA.bind(void 0,Q)}},lA=function*(Z,X){if(dA.isBuffer(X))yield J1(X);else if(typeof X==="string")yield Z.encode(X);else yield X},nA=function*(Z,X){yield q0(X)?Z.write(X):X},iA=function*(Z){let X=Z.end();if(X!=="")yield X};var _Z=B(()=>{A0()});import{callbackify as jK}from"node:util";var zZ,s8=async function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=oA}=X[q];for await(let J of Q(Z))yield*s8(J,X,q+1)},OK=async function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*aA(q,Number(X),Z)},aA=async function*(Z,X,q){if(Z===void 0)return;for await(let Q of Z())yield*s8(Q,q,X+1)},IK,oA=function*(Z){yield Z};var wK=B(()=>{zZ=jK(async(Z,X,q,Q)=>{X.currentIterable=Z(...q);try{for await(let J of X.currentIterable)Q.push(J)}finally{delete X.currentIterable}}),IK=jK(async({currentIterable:Z},X)=>{if(Z!==void 0){await(X?Z.throw(X):Z.return());return}if(X)throw X})});var RZ=(Z,X,q,Q)=>{try{for(let J of Z(...X))q.push(J);Q()}catch(J){Q(J)}},kK=(Z,X)=>[...X.flatMap((q)=>[...n1(q,Z,0)]),...h2(Z)],n1=function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=rA}=X[q];for(let J of Q(Z))yield*n1(J,X,q+1)},h2=function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*sA(q,Number(X),Z)},sA=function*(Z,X,q){if(Z===void 0)return;for(let Q of Z())yield*n1(Q,q,X+1)},rA=function*(Z){yield Z};var MZ=()=>{};import{Transform as tA,getDefaultHighWaterMark as NK}from"node:stream";var FZ=({value:Z,value:{transform:X,final:q,writableObjectMode:Q,readableObjectMode:J},optionName:$},{encoding:Y})=>{let H={},U=xK(Z,Y,$),W=l1(X),G=l1(q),V=W?zZ.bind(void 0,s8,H):RZ.bind(void 0,n1),_=W||G?zZ.bind(void 0,OK,H):RZ.bind(void 0,h2),L=W||G?IK.bind(void 0,H):void 0;return{stream:new tA({writableObjectMode:Q,writableHighWaterMark:NK(Q),readableObjectMode:J,readableHighWaterMark:NK(J),transform(R,D,M){V([R,U,0],this,M)},flush(R){_([U],this,R)},destroy:L})}},r8=(Z,X,q,Q)=>{let J=X.filter(({type:Y})=>Y==="generator"),$=Q?J.reverse():J;for(let{value:Y,optionName:H}of $){let U=xK(Y,q,H);Z=kK(U,Z)}return Z},xK=({transform:Z,final:X,binary:q,writableObjectMode:Q,readableObjectMode:J,preserveNewlines:$},Y,H)=>{let U={};return[{transform:FK(Q,H)},o8(q,Y,Q),i8(q,$,Q,U),{transform:Z,final:X},{transform:DK(J,H)},MK({binary:q,preserveNewlines:$,readableObjectMode:J,state:U})].filter(Boolean)};var t8=B(()=>{R0();a8();TK();_Z();wK();MZ()});var PK=(Z,X)=>{for(let q of eA(Z))ZT(Z,q,X)},eA=(Z)=>new Set(Object.entries(Z).filter(([,{direction:X}])=>X==="input").map(([X])=>Number(X))),ZT=(Z,X,q)=>{let{stdioItems:Q}=Z[X],J=Q.filter(({contents:H})=>H!==void 0);if(J.length===0)return;if(X!==0){let[{type:H,optionName:U}]=J;throw TypeError(`Only the \`stdin\` option, not \`${U}\`, can be ${I1[H]} with synchronous methods.`)}let Y=J.map(({contents:H})=>H).map((H)=>XT(H,Q));q.input=j2(Y)},XT=(Z,X)=>{let q=r8(Z,X,"utf8",!0);return qT(q),j2(q)},qT=(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 EK=B(()=>{t8();A0();R0()});var e8=({stdioItems:Z,encoding:X,verboseInfo:q,fdNumber:Q})=>Q!=="all"&&w6(q,Q)&&!T0.has(X)&&QT(Q)&&(Z.some(({type:J,value:$})=>J==="native"&&JT.has($))||Z.every(({type:J})=>w0.has(J))),QT=(Z)=>Z===1||Z===2,JT,vK=async(Z,X,q,Q)=>{for await(let J of Z)if(!$T(X))CK(J,q,Q)},yK=(Z,X,q)=>{for(let Q of Z)CK(Q,X,q)},$T=(Z)=>Z._readableState.pipes.length>0,CK=(Z,X,q)=>{let Q=r4(Z);i0({type:"output",verboseMessage:Q,fdNumber:X,verboseInfo:q})};var DZ=B(()=>{u1();R0();k6();A1();JT=new Set(["pipe","overlapped"])});import{writeFileSync as YT,appendFileSync as HT}from"node:fs";var SK=({fileDescriptors:Z,syncResult:{output:X},options:q,isMaxBuffer:Q,verboseInfo:J})=>{if(X===null)return{output:Array.from({length:3})};let $={},Y=new Set([]);return{output:X.map((U,W)=>KT({result:U,fileDescriptors:Z,fdNumber:W,state:$,outputFiles:Y,isMaxBuffer:Q,verboseInfo:J},q)),...$}},KT=({result:Z,fileDescriptors:X,fdNumber:q,state:Q,outputFiles:J,isMaxBuffer:$,verboseInfo:Y},{buffer:H,encoding:U,lines:W,stripFinalNewline:G,maxBuffer:V})=>{if(Z===null)return;let _=DH(Z,$,V),L=J1(_),{stdioItems:z,objectMode:R}=X[q],D=UT([L],z,U,Q),{serializedResult:M,finalResult:k=M}=GT({chunks:D,objectMode:R,encoding:U,lines:W,stripFinalNewline:G,fdNumber:q});WT({serializedResult:M,fdNumber:q,state:Q,verboseInfo:Y,encoding:U,stdioItems:z,objectMode:R});let F=H[q]?k:void 0;try{if(Q.error===void 0)VT(M,z,J);return F}catch(I){return Q.error=I,F}},UT=(Z,X,q,Q)=>{try{return r8(Z,X,q,!1)}catch(J){return Q.error=J,Z}},GT=({chunks:Z,objectMode:X,encoding:q,lines:Q,stripFinalNewline:J,fdNumber:$})=>{if(X)return{serializedResult:Z};if(q==="buffer")return{serializedResult:j2(Z)};let Y=r$(Z,q);if(Q[$])return{serializedResult:Y,finalResult:LZ(Y,!J[$],X)};return{serializedResult:Y}},WT=({serializedResult:Z,fdNumber:X,state:q,verboseInfo:Q,encoding:J,stdioItems:$,objectMode:Y})=>{if(!e8({stdioItems:$,encoding:J,verboseInfo:Q,fdNumber:X}))return;let H=LZ(Z,!1,Y);try{yK(H,X,Q)}catch(U){q.error??=U}},VT=(Z,X,q)=>{for(let{path:Q,append:J}of X.filter(({type:$})=>c8.has($))){let $=typeof Q==="string"?Q:Q.toString();if(J||q.has($))HT(Q,Z);else q.add($),YT(Q,Z)}};var bK=B(()=>{DZ();t8();a8();A0();R0();c1()});var hK=([,Z,X],q)=>{if(!q.all)return;if(Z===void 0)return X;if(X===void 0)return Z;if(Array.isArray(Z))return Array.isArray(X)?[...Z,...X]:[...Z,G1(X,q,"all")];if(Array.isArray(X))return[G1(Z,q,"all"),...X];if(q0(Z)&&q0(X))return M3([Z,X]);return`${Z}${X}`};var fK=B(()=>{A0();b2()});import{once as AZ}from"node:events";var gK=async(Z,X)=>{let[q,Q]=await BT(Z);return X.isForcefullyTerminated??=!1,[q,Q]},BT=async(Z)=>{let[X,q]=await Promise.allSettled([AZ(Z,"spawn"),AZ(Z,"exit")]);if(X.status==="rejected")return[];return q.status==="rejected"?mK(Z):q.value},mK=async(Z)=>{try{return await AZ(Z,"exit")}catch{return mK(Z)}},uK=async(Z)=>{let[X,q]=await Z;if(!LT(X,q)&&TZ(X,q))throw new a0;return[X,q]},LT=(Z,X)=>Z===void 0&&X===void 0,TZ=(Z,X)=>Z!==0||X!==null;var jZ=B(()=>{g1()});var pK=({error:Z,status:X,signal:q,output:Q},{maxBuffer:J})=>{let $=_T(Z,X,q),Y=$?.code==="ETIMEDOUT",H=FH($,Q,J);return{resultError:$,exitCode:X,signal:q,timedOut:Y,isMaxBuffer:H}},_T=(Z,X,q)=>{if(Z!==void 0)return Z;return TZ(X,q)?new a0:void 0};var dK=B(()=>{g1();c1();jZ()});import{spawnSync as zT}from"node:child_process";var cK=(Z,X,q)=>{let{file:Q,commandArguments:J,command:$,escapedCommand:Y,startTime:H,verboseInfo:U,options:W,fileDescriptors:G}=RT(Z,X,q),V=DT({file:Q,commandArguments:J,options:W,command:$,escapedCommand:Y,verboseInfo:U,fileDescriptors:G,startTime:H});return b6(V,U,W)},RT=(Z,X,q)=>{let{command:Q,escapedCommand:J,startTime:$,verboseInfo:Y}=Z8(Z,X,q),H=MT(q),{file:U,commandArguments:W,options:G}=N8(Z,X,H);FT(G);let V=BK(G,Y);return{file:U,commandArguments:W,command:Q,escapedCommand:J,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},MT=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,FT=({ipc:Z,ipcInput:X,detached:q,cancelSignal:Q})=>{if(X)Z5("ipcInput");if(Z)Z5("ipc: true");if(q)Z5("detached: true");if(Q)Z5("cancelSignal")},Z5=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},DT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:J,verboseInfo:$,fileDescriptors:Y,startTime:H})=>{let U=AT({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:J,fileDescriptors:Y,startTime:H});if(U.failed)return U;let{resultError:W,exitCode:G,signal:V,timedOut:_,isMaxBuffer:L}=pK(U,q),{output:z,error:R=W}=SK({fileDescriptors:Y,syncResult:U,options:q,isMaxBuffer:L,verboseInfo:$}),D=z.map((k,F)=>G1(k,q,F)),M=G1(hK(z,q),q,"all");return jT({error:R,exitCode:G,signal:V,timedOut:_,isMaxBuffer:L,stdio:D,all:M,options:q,command:Q,escapedCommand:J,startTime:H})},AT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:J,fileDescriptors:$,startTime:Y})=>{try{PK($,q);let H=TT(q);return zT(...x8(Z,X,H))}catch(H){return S6({error:H,command:Q,escapedCommand:J,fileDescriptors:$,options:q,startTime:Y,isSync:!0})}},TT=({encoding:Z,maxBuffer:X,...q})=>({...q,encoding:"buffer",maxBuffer:g8(X)}),jT=({error:Z,exitCode:X,signal:q,timedOut:Q,isMaxBuffer:J,stdio:$,all:Y,options:H,command:U,escapedCommand:W,startTime:G})=>Z===void 0?m8({command:U,escapedCommand:W,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G}):C2({error:Z,command:U,escapedCommand:W,timedOut:Q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:J,isForcefullyTerminated:!1,exitCode:X,signal:q,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G,isSync:!0});var lK=B(()=>{w3();i3();a3();S2();u8();_K();b2();EK();bK();c1();fK();dK()});import{once as OZ,on as OT}from"node:events";var nK=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},{reference:J=!0,filter:$}={})=>{return N6({methodName:"getOneMessage",isSubprocess:q,ipc:Q,isConnected:A8(Z)}),IT({anyProcess:Z,channel:X,isSubprocess:q,filter:$,reference:J})},IT=async({anyProcess:Z,channel:X,isSubprocess:q,filter:Q,reference:J})=>{L8(X,J);let $=O1(Z,X,q),Y=new AbortController;try{return await Promise.race([wT($,Q,Y),kT($,q,Y),NT($,q,Y)])}catch(H){throw x6(Z),H}finally{Y.abort(),_8(X,J)}},wT=async(Z,X,{signal:q})=>{if(X===void 0){let[Q]=await OZ(Z,"message",{signal:q});return Q}for await(let[Q]of OT(Z,"message",{signal:q}))if(X(Q))return Q},kT=async(Z,X,{signal:q})=>{await OZ(Z,"disconnect",{signal:q}),qY(X)},NT=async(Z,X,{signal:q})=>{let[Q]=await OZ(Z,"strict:error",{signal:q});throw G8(Q,X)};var iK=B(()=>{P6();x2();N2()});import{once as oK,on as xT}from"node:events";var sK=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},{reference:J=!0}={})=>IZ({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q,shouldAwait:!q,reference:J}),IZ=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q,shouldAwait:J,reference:$})=>{N6({methodName:"getEachMessage",isSubprocess:q,ipc:Q,isConnected:A8(Z)}),L8(X,$);let Y=O1(Z,X,q),H=new AbortController,U={};return PT(Z,Y,H),ET({ipcEmitter:Y,isSubprocess:q,controller:H,state:U}),vT({anyProcess:Z,channel:X,ipcEmitter:Y,isSubprocess:q,shouldAwait:J,controller:H,state:U,reference:$})},PT=async(Z,X,q)=>{try{await oK(X,"disconnect",{signal:q.signal}),q.abort()}catch{}},ET=async({ipcEmitter:Z,isSubprocess:X,controller:q,state:Q})=>{try{let[J]=await oK(Z,"strict:error",{signal:q.signal});Q.error=G8(J,X),q.abort()}catch{}},vT=async function*({anyProcess:Z,channel:X,ipcEmitter:q,isSubprocess:Q,shouldAwait:J,controller:$,state:Y,reference:H}){try{for await(let[U]of xT(q,"message",{signal:$.signal}))aK(Y),yield U}catch{aK(Y)}finally{if($.abort(),_8(X,H),!Q)x6(Z);if(J)await Z}},aK=({error:Z})=>{if(Z)throw Z};var wZ=B(()=>{P6();x2();N2()});import rK from"node:process";var tK=(Z,{ipc:X})=>{Object.assign(Z,ZU(Z,!1,X))},eK=()=>{let Z=rK,X=!0,q=rK.channel!==void 0;return{...ZU(Z,!0,q),getCancelSignal:PY.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:q})}},ZU=(Z,X,q)=>({sendMessage:I8.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getOneMessage:nK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getEachMessage:sK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q})});var kZ=B(()=>{w8();iK();wZ();F8()});import{ChildProcess as yT}from"node:child_process";import{PassThrough as CT,Readable as ST,Writable as bT,Duplex as hT}from"node:stream";var XU=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:J,startTime:$,verboseInfo:Y})=>{WZ(Q);let H=new yT;fT(H,Q),Object.assign(H,{readable:gT,writable:mT,duplex:uT});let U=S6({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:J,startTime:$,isSync:!1}),W=pT(U,Y,J);return{subprocess:H,promise:W}},fT=(Z,X)=>{let q=f2(),Q=f2(),J=f2(),$=Array.from({length:X.length-3},f2),Y=f2(),H=[q,Q,J,...$];Object.assign(Z,{stdin:q,stdout:Q,stderr:J,all:Y,stdio:H})},f2=()=>{let Z=new CT;return Z.end(),Z},gT=()=>new ST({read(){}}),mT=()=>new bT({write(){}}),uT=()=>new hT({read(){},write(){}}),pT=async(Z,X,q)=>b6(Z,X,q);var qU=B(()=>{n8();S2();u8()});import{createReadStream as QU,createWriteStream as JU}from"node:fs";import{Buffer as dT}from"node:buffer";import{Readable as g2,Writable as cT,Duplex as lT}from"node:stream";var YU=(Z,X)=>l8(nT,Z,X,!1),m2=({type:Z,optionName:X})=>{throw TypeError(`The \`${X}\` option cannot be ${I1[Z]}.`)},$U,nT;var HU=B(()=>{t8();n8();R0();$U={fileNumber:m2,generator:FZ,asyncGenerator:FZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:X,readableObjectMode:q}}){let Q=X||q;return{stream:lT.fromWeb(Z,{objectMode:Q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},nT={input:{...$U,fileUrl:({value:Z})=>({stream:QU(Z)}),filePath:({value:{file:Z}})=>({stream:QU(Z)}),webStream:({value:Z})=>({stream:g2.fromWeb(Z)}),iterable:({value:Z})=>({stream:g2.from(Z)}),asyncIterable:({value:Z})=>({stream:g2.from(Z)}),string:({value:Z})=>({stream:g2.from(Z)}),uint8Array:({value:Z})=>({stream:g2.from(dT.from(Z))})},output:{...$U,fileUrl:({value:Z})=>({stream:JU(Z)}),filePath:({value:{file:Z,append:X}})=>({stream:JU(Z,X?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:cT.fromWeb(Z)}),iterable:m2,asyncIterable:m2,string:m2,uint8Array:m2}}});import{on as iT,once as KU}from"node:events";import{PassThrough as aT,getDefaultHighWaterMark as oT}from"node:stream";import{finished as WU}from"node:stream/promises";function i1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let J of Z)NZ(J);let X=Z.some(({readableObjectMode:J})=>J),q=sT(Z,X),Q=new VU({objectMode:X,writableHighWaterMark:q,readableHighWaterMark:q});for(let J of Z)Q.add(J);return Q}var sT=(Z,X)=>{if(Z.length===0)return oT(X);let q=Z.filter(({readableObjectMode:Q})=>Q===X).map(({readableHighWaterMark:Q})=>Q);return Math.max(...q)},VU,rT=async(Z,X,q)=>{X5(Z,UU);let Q=new AbortController;try{await Promise.race([tT(Z,Q),eT(Z,X,q,Q)])}finally{Q.abort(),X5(Z,-UU)}},tT=async(Z,{signal:X})=>{try{await WU(Z,{signal:X,cleanup:!0})}catch(q){throw BU(Z,q),q}},eT=async(Z,X,q,{signal:Q})=>{for await(let[J]of iT(Z,"unpipe",{signal:Q}))if(X.has(J))J.emit(q)},NZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},Zj=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:J,onFinished:$,unpipeEvent:Y})=>{X5(Z,GU);let H=new AbortController;try{await Promise.race([Xj($,X,H),qj({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:J,controller:H}),Qj({stream:X,streams:q,ended:Q,aborted:J,unpipeEvent:Y,controller:H})])}finally{H.abort(),X5(Z,-GU)}if(q.size>0&&q.size===Q.size+J.size)if(Q.size===0&&J.size>0)xZ(Z);else Jj(Z)},Xj=async(Z,X,{signal:q})=>{try{if(await Z,!q.aborted)xZ(X)}catch(Q){if(!q.aborted)BU(X,Q)}},qj=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:J,controller:{signal:$}})=>{try{if(await WU(X,{signal:$,cleanup:!0,readable:!0,writable:!1}),q.has(X))Q.add(X)}catch(Y){if($.aborted||!q.has(X))return;if(LU(Y))J.add(X);else _U(Z,Y)}},Qj=async({stream:Z,streams:X,ended:q,aborted:Q,unpipeEvent:J,controller:{signal:$}})=>{if(await KU(Z,J,{signal:$}),!Z.readable)return KU($,"abort",{signal:$});X.delete(Z),q.delete(Z),Q.delete(Z)},Jj=(Z)=>{if(Z.writable)Z.end()},BU=(Z,X)=>{if(LU(X))xZ(Z);else _U(Z,X)},LU=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",xZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},_U=(Z,X)=>{if(!Z.destroyed)Z.once("error",$j),Z.destroy(X)},$j=()=>{},X5=(Z,X)=>{let q=Z.getMaxListeners();if(q!==0&&q!==Number.POSITIVE_INFINITY)Z.setMaxListeners(q+X)},UU=2,GU=1;var q5=B(()=>{VU=class VU extends aT{#q=new Set([]);#Q=new Set([]);#X=new Set([]);#Y;#K=Symbol("unpipe");#V=new WeakMap;add(Z){if(NZ(Z),this.#q.has(Z))return;this.#q.add(Z),this.#Y??=rT(this,this.#q,this.#K);let X=Zj({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(NZ(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 zU}from"node:stream/promises";var f6=(Z,X)=>{Z.pipe(X),Yj(Z,X),Hj(Z,X)},Yj=async(Z,X)=>{if(S0(Z)||S0(X))return;try{await zU(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}PZ(X)},PZ=(Z)=>{if(Z.writable)Z.end()},Hj=async(Z,X)=>{if(S0(Z)||S0(X))return;try{await zU(X,{cleanup:!0,readable:!1,writable:!0})}catch{}EZ(Z)},EZ=(Z)=>{if(Z.readable)Z.destroy()};var Q5=B(()=>{$1()});var RU=(Z,X,q)=>{let Q=new Map;for(let[J,{stdioItems:$,direction:Y}]of Object.entries(X)){for(let{stream:H}of $.filter(({type:U})=>w0.has(U)))Kj(Z,H,Y,J);for(let{stream:H}of $.filter(({type:U})=>!w0.has(U)))Gj({subprocess:Z,stream:H,direction:Y,fdNumber:J,pipeGroups:Q,controller:q})}for(let[J,$]of Q.entries()){let Y=$.length===1?$[0]:i1($);f6(Y,J)}},Kj=(Z,X,q,Q)=>{if(q==="output")f6(Z.stdio[Q],X);else f6(X,Z.stdio[Q]);let J=Uj[Q];if(J!==void 0)Z[J]=X;Z.stdio[Q]=X},Uj,Gj=({subprocess:Z,stream:X,direction:q,fdNumber:Q,pipeGroups:J,controller:$})=>{if(X===void 0)return;Wj(X,$);let[Y,H]=q==="output"?[X,Z.stdio[Q]]:[Z.stdio[Q],X],U=J.get(Y)??[];J.set(Y,[...U,H])},Wj=(Z,{signal:X})=>{if(S0(Z))m1(Z,Vj,X)},Vj=2;var MU=B(()=>{q5();$1();B8();R0();Q5();Uj=["stdin","stdout","stderr"]});var a1;var FU=B(()=>{a1=[];a1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")a1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")a1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class DU{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(yZ[vZ])return yZ[vZ];Bj(yZ,vZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,X){this.listeners[Z].push(X)}removeListener(Z,X){let q=this.listeners[Z],Q=q.indexOf(X);if(Q===-1)return;if(Q===0&&q.length===1)q.length=0;else q.splice(Q,1)}emit(Z,X,q){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let Q=!1;for(let J of this.listeners[Z])Q=J(X,q)===!0||Q;if(Z==="exit")Q=this.emit("afterExit",X,q)||Q;return Q}}class SZ{}var J5=(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",vZ,yZ,Bj,Lj=(Z)=>{return{onExit(X,q){return Z.onExit(X,q)},load(){return Z.load()},unload(){return Z.unload()}}},AU,TU,CZ,jU,Jp,$p;var OU=B(()=>{FU();vZ=Symbol.for("signal-exit emitter"),yZ=globalThis,Bj=Object.defineProperty.bind(Object);AU=class AU extends SZ{onExit(){return()=>{}}load(){}unload(){}};TU=class TU extends SZ{#q=CZ.platform==="win32"?"SIGINT":"SIGHUP";#Q=new DU;#X;#Y;#K;#V={};#A=!1;constructor(Z){super();this.#X=Z,this.#V={};for(let X of a1)this.#V[X]=()=>{let q=this.#X.listeners(X),{count:Q}=this.#Q,J=Z;if(typeof J.__signal_exit_emitter__==="object"&&typeof J.__signal_exit_emitter__.count==="number")Q+=J.__signal_exit_emitter__.count;if(q.length===Q){this.unload();let $=this.#Q.emit("exit",null,X),Y=X==="SIGHUP"?this.#q:X;if(!$)Z.kill(Z.pid,Y)}};this.#K=Z.reallyExit,this.#Y=Z.emit}onExit(Z,X){if(!J5(this.#X))return()=>{};if(this.#A===!1)this.load();let q=X?.alwaysLast?"afterExit":"exit";return this.#Q.on(q,Z),()=>{if(this.#Q.removeListener(q,Z),this.#Q.listeners.exit.length===0&&this.#Q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#A)return;this.#A=!0,this.#Q.count+=1;for(let Z of a1)try{let X=this.#V[Z];if(X)this.#X.on(Z,X)}catch(X){}this.#X.emit=(Z,...X)=>{return this.#H(Z,...X)},this.#X.reallyExit=(Z)=>{return this.#z(Z)}}unload(){if(!this.#A)return;this.#A=!1,a1.forEach((Z)=>{let X=this.#V[Z];if(!X)throw Error("Listener not defined for signal: "+Z);try{this.#X.removeListener(Z,X)}catch(q){}}),this.#X.emit=this.#Y,this.#X.reallyExit=this.#K,this.#Q.count-=1}#z(Z){if(!J5(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"&&J5(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:jU,load:Jp,unload:$p}=Lj(J5(CZ)?new TU(CZ):new AU)});import{addAbortListener as _j}from"node:events";var IU=(Z,{cleanup:X,detached:q},{signal:Q})=>{if(!X||q)return;let J=jU(()=>{Z.kill()});_j(Q,()=>{J()})};var wU=B(()=>{OU()});var NU=({source:Z,sourcePromise:X,boundOptions:q,createNested:Q},...J)=>{let $=t4(),{destination:Y,destinationStream:H,destinationError:U,from:W,unpipeSignal:G}=zj(q,Q,J),{sourceStream:V,sourceError:_}=Mj(Z,W),{options:L,fileDescriptors:z}=s0.get(Z);return{sourcePromise:X,sourceStream:V,sourceOptions:L,sourceError:_,destination:Y,destinationStream:H,destinationError:U,unpipeSignal:G,fileDescriptors:z,startTime:$}},zj=(Z,X,q)=>{try{let{destination:Q,pipeOptions:{from:J,to:$,unpipeSignal:Y}={}}=Rj(Z,X,...q),H=V8(Q,$);return{destination:Q,destinationStream:H,from:J,unpipeSignal:Y}}catch(Q){return{destinationError:Q}}},Rj=(Z,X,q,...Q)=>{if(Array.isArray(q))return{destination:X(kU,Z)(q,...Q),pipeOptions:Z};if(typeof q==="string"||q instanceof URL||_3(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]=u4(q,...Q);return{destination:X(kU)(J,$,Y),pipeOptions:Y}}if(s0.has(q)){if(Object.keys(Z).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:q,pipeOptions:Q[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${q}`)},kU=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),Mj=(Z,X)=>{try{return{sourceStream:v6(Z,X)}}catch(q){return{sourceError:q}}};var xU=B(()=>{R3();e4();j1();O6()});var EU=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q,fileDescriptors:J,sourceOptions:$,startTime:Y})=>{let H=Fj({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q});if(H!==void 0)throw bZ({error:H,fileDescriptors:J,sourceOptions:$,startTime:Y})},Fj=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q})=>{if(X!==void 0&&Q!==void 0)return Q;if(Q!==void 0)return EZ(Z),Q;if(X!==void 0)return PZ(q),X},bZ=({error:Z,fileDescriptors:X,sourceOptions:q,startTime:Q})=>S6({error:Z,command:PU,escapedCommand:PU,fileDescriptors:X,options:q,startTime:Q,isSync:!1}),PU="source.pipe(destination)";var hZ=B(()=>{S2();Q5()});var vU=async(Z)=>{let[{status:X,reason:q,value:Q=q},{status:J,reason:$,value:Y=$}]=await Z;if(!Y.pipedFrom.includes(Q))Y.pipedFrom.push(Q);if(J==="rejected")throw Y;if(X==="rejected")throw Q;return Y};var yU=()=>{};import{finished as Dj}from"node:stream/promises";var CU=(Z,X,q)=>{let Q=$5.has(X)?Tj(Z,X):Aj(Z,X);return m1(Z,Oj,q.signal),m1(X,Ij,q.signal),jj(X),Q},Aj=(Z,X)=>{let q=i1([Z]);return f6(q,X),$5.set(X,q),q},Tj=(Z,X)=>{let q=$5.get(X);return q.add(Z),q},jj=async(Z)=>{try{await Dj(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}$5.delete(Z)},$5,Oj=2,Ij=1;var SU=B(()=>{q5();B8();Q5();$5=new WeakMap});import{aborted as wj}from"node:util";var bU=(Z,X)=>Z===void 0?[]:[kj(Z,X)],kj=async(Z,{sourceStream:X,mergedStream:q,fileDescriptors:Q,sourceOptions:J,startTime:$})=>{await wj(Z,X),await q.remove(X);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw bZ({error:Y,fileDescriptors:Q,sourceOptions:J,startTime:$})};var hU=B(()=>{hZ()});var Y5=(Z,...X)=>{if(t(X[0]))return Y5.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...X[0]}});let{destination:q,...Q}=NU(Z,...X),J=Nj({...Q,destination:q});return J.pipe=Y5.bind(void 0,{...Z,source:q,sourcePromise:J,boundOptions:{}}),J},Nj=async({sourcePromise:Z,sourceStream:X,sourceOptions:q,sourceError:Q,destination:J,destinationStream:$,destinationError:Y,unpipeSignal:H,fileDescriptors:U,startTime:W})=>{let G=xj(Z,J);EU({sourceStream:X,sourceError:Q,destinationStream:$,destinationError:Y,fileDescriptors:U,sourceOptions:q,startTime:W});let V=new AbortController;try{let _=CU(X,$,V);return await Promise.race([vU(G),...bU(H,{sourceStream:X,mergedStream:_,sourceOptions:q,fileDescriptors:U,startTime:W})])}finally{V.abort()}},xj=(Z,X)=>Promise.allSettled([Z,X]);var fU=B(()=>{Q1();xU();hZ();yU();SU();hU()});import{on as Pj}from"node:events";import{getDefaultHighWaterMark as Ej}from"node:stream";var H5=({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:Q,encoding:J,preserveNewlines:$})=>{let Y=new AbortController;return vj(X,Y),mU({stream:Z,controller:Y,binary:q,shouldEncode:!Z.readableObjectMode&&Q,encoding:J,shouldSplit:!Z.readableObjectMode,preserveNewlines:$})},vj=async(Z,X)=>{try{await Z}catch{}finally{X.abort()}},fZ=({stream:Z,onStreamEnd:X,lines:q,encoding:Q,stripFinalNewline:J,allMixed:$})=>{let Y=new AbortController;yj(X,Y,Z);let H=Z.readableObjectMode&&!$;return mU({stream:Z,controller:Y,binary:Q==="buffer",shouldEncode:!H,encoding:Q,shouldSplit:!H&&q,preserveNewlines:!J})},yj=async(Z,X,q)=>{try{await Z}catch{q.destroy()}finally{X.abort()}},mU=({stream:Z,controller:X,binary:q,shouldEncode:Q,encoding:J,shouldSplit:$,preserveNewlines:Y})=>{let H=Pj(Z,"data",{signal:X.signal,highWaterMark:gU,highWatermark:gU});return Cj({onStdoutChunk:H,controller:X,binary:q,shouldEncode:Q,encoding:J,shouldSplit:$,preserveNewlines:Y})},gZ,gU,Cj=async function*({onStdoutChunk:Z,controller:X,binary:q,shouldEncode:Q,encoding:J,shouldSplit:$,preserveNewlines:Y}){let H=Sj({binary:q,shouldEncode:Q,encoding:J,shouldSplit:$,preserveNewlines:Y});try{for await(let[U]of Z)yield*n1(U,H,0)}catch(U){if(!X.signal.aborted)throw U}finally{yield*h2(H)}},Sj=({binary:Z,shouldEncode:X,encoding:q,shouldSplit:Q,preserveNewlines:J})=>[o8(Z,q,!X),i8(Z,J,!Q,{})].filter(Boolean);var K5=B(()=>{_Z();a8();MZ();gZ=Ej(!0),gU=gZ});import{setImmediate as bj}from"node:timers/promises";var uU=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,buffer:J,maxBuffer:$,lines:Y,allMixed:H,stripFinalNewline:U,verboseInfo:W,streamInfo:G})=>{let V=hj({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:H,verboseInfo:W,streamInfo:G});if(!J){await Promise.all([fj(Z),V]);return}let _=VZ(U,q),L=fZ({stream:Z,onStreamEnd:X,lines:Y,encoding:Q,stripFinalNewline:_,allMixed:H}),[z]=await Promise.all([gj({stream:Z,iterable:L,fdNumber:q,encoding:Q,maxBuffer:$,lines:Y}),V]);return z},hj=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:J,verboseInfo:$,streamInfo:{fileDescriptors:Y}})=>{if(!e8({stdioItems:Y[q]?.stdioItems,encoding:Q,verboseInfo:$,fdNumber:q}))return;let H=fZ({stream:Z,onStreamEnd:X,lines:!0,encoding:Q,stripFinalNewline:!0,allMixed:J});await vK(H,Z,q,$)},fj=async(Z)=>{if(await bj(),Z.readableFlowing===null)Z.resume()},gj=async({stream:Z,stream:{readableObjectMode:X},iterable:q,fdNumber:Q,encoding:J,maxBuffer:$,lines:Y})=>{try{if(X||Y)return await C8(q,{maxBuffer:$});if(J==="buffer")return new Uint8Array(await S8(q,{maxBuffer:$}));return await h8(q,{maxBuffer:$})}catch(H){return pU(zH({error:H,stream:Z,readableObjectMode:X,lines:Y,encoding:J,fdNumber:Q}))}},mZ=async(Z)=>{try{return await Z}catch(X){return pU(X)}},pU=({bufferedData:Z})=>o$(Z)?new Uint8Array(Z):Z;var uZ=B(()=>{f8();A0();DZ();K5();c1();b2()});import{finished as mj}from"node:stream/promises";var u2=async(Z,X,q,{isSameDirection:Q,stopOnExit:J=!1}={})=>{let $=uj(Z,q),Y=new AbortController;try{await Promise.race([...J?[q.exitPromise]:[],mj(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!$.stdinCleanedUp)cj(H,X,q,Q)}finally{Y.abort()}},uj=(Z,{originalStreams:[X],subprocess:q})=>{let Q={stdinCleanedUp:!1};if(Z===X)pj(Z,q,Q);return Q},pj=(Z,X,q)=>{let{_destroy:Q}=Z;Z._destroy=(...J)=>{dj(X,q),Q.call(Z,...J)}},dj=({exitCode:Z,signalCode:X},q)=>{if(Z!==null||X!==null)q.stdinCleanedUp=!0},cj=(Z,X,q,Q)=>{if(!lj(Z,X,q,Q))throw Z},lj=(Z,X,q,Q=!0)=>{if(q.propagating)return dU(Z)||U5(Z);return q.propagating=!0,pZ(q,X)===Q?dU(Z):U5(Z)},pZ=({fileDescriptors:Z},X)=>X!=="all"&&Z[X].direction==="input",U5=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",dU=(Z)=>Z?.code==="EPIPE";var G5=()=>{};var cU=({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:J,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((U,W)=>dZ({stream:U,fdNumber:W,encoding:X,buffer:q[W],maxBuffer:Q[W],lines:J[W],allMixed:!1,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})),dZ=async({stream:Z,fdNumber:X,encoding:q,buffer:Q,maxBuffer:J,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:W})=>{if(!Z)return;let G=u2(Z,X,W);if(pZ(W,X)){await G;return}let[V]=await Promise.all([uU({stream:Z,onStreamEnd:G,fdNumber:X,encoding:q,buffer:Q,maxBuffer:J,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:W}),G]);return V};var cZ=B(()=>{uZ();G5()});var lU=({stdout:Z,stderr:X},{all:q})=>q&&(Z||X)?i1([Z,X].filter(Boolean)):void 0,nU=({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:J,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>dZ({...nj(Z,q),fdNumber:"all",encoding:X,maxBuffer:Q[1]+Q[2],lines:J[1]||J[2],allMixed:ij(Z),stripFinalNewline:$,verboseInfo:Y,streamInfo:H}),nj=({stdout:Z,stderr:X,all:q},[,Q,J])=>{let $=Q||J;if(!$)return{stream:q,buffer:$};if(!Q)return{stream:X,buffer:$};if(!J)return{stream:Z,buffer:$};return{stream:q,buffer:$}},ij=({all:Z,stdout:X,stderr:q})=>Z&&X&&q&&X.readableObjectMode!==q.readableObjectMode;var lZ=B(()=>{q5();cZ()});var iU=(Z)=>w6(Z,"ipc"),aU=(Z,X)=>{let q=r4(Z);i0({type:"ipc",verboseMessage:q,fdNumber:"ipc",verboseInfo:X})};var oU=B(()=>{k6();A1()});var sU=async({subprocess:Z,buffer:X,maxBuffer:q,ipc:Q,ipcOutput:J,verboseInfo:$})=>{if(!Q)return J;let Y=iU($),H=Y1(X,"ipc"),U=Y1(q,"ipc");for await(let W of IZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:Q,shouldAwait:!1,reference:!0})){if(H)RH(Z,J,U),J.push(W);if(Y)aU(W,$)}return J},rU=async(Z,X)=>{return await Promise.allSettled([Z]),X};var tU=B(()=>{c1();oU();H1();wZ()});import{once as aj}from"node:events";var eU=async({subprocess:Z,options:{encoding:X,buffer:q,maxBuffer:Q,lines:J,timeoutDuration:$,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:U,stripFinalNewline:W,ipc:G,ipcInput:V},context:_,verboseInfo:L,fileDescriptors:z,originalStreams:R,onInternalError:D,controller:M})=>{let k=gK(Z,_),F={originalStreams:R,fileDescriptors:z,subprocess:Z,exitPromise:k,propagating:!1},I=cU({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:J,stripFinalNewline:W,verboseInfo:L,streamInfo:F}),T=nU({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:J,stripFinalNewline:W,verboseInfo:L,streamInfo:F}),j=[],A=sU({subprocess:Z,buffer:q,maxBuffer:Q,ipc:G,ipcOutput:j,verboseInfo:L}),f=oj(R,Z,F),w=sj(z,F);try{return await Promise.race([Promise.all([{},uK(k),Promise.all(I),T,A,mY(Z,V),...f,...w]),D,rj(Z,M),...SY(Z,$,_,M),...XY({subprocess:Z,cancelSignal:Y,gracefulCancel:H,context:_,controller:M}),...yY({subprocess:Z,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:U,context:_,controller:M})])}catch(x){return _.terminationReason??="other",Promise.all([{error:x},k,Promise.all(I.map((v)=>mZ(v))),mZ(T),rU(A,j),Promise.allSettled(f),Promise.allSettled(w)])}},oj=(Z,X,q)=>Z.map((Q,J)=>Q===X.stdio[J]?void 0:u2(Q,J,q)),sj=(Z,X)=>Z.flatMap(({stdioItems:q},Q)=>q.filter(({value:J,stream:$=J})=>h0($,{checkOpen:!1})&&!S0($)).map(({type:J,value:$,stream:Y=$})=>u2(Y,Q,X,{isSameDirection:w0.has(J),stopOnExit:J==="native"}))),rj=async(Z,{signal:X})=>{let[q]=await aj(Z,"error",{signal:X});throw q};var ZG=B(()=>{d1();p3();y3();u3();$1();R0();uZ();tU();c3();lZ();cZ();jZ();G5()});var XG=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),p2=(Z,X,q)=>{let Q=Z[q];if(!Q.has(X))Q.set(X,[]);let J=Q.get(X),$=o0();return J.push($),{resolve:$.resolve.bind($),promises:J}},g6=async({resolve:Z,promises:X},q)=>{Z();let[Q]=await Promise.race([Promise.allSettled([!0,q]),Promise.all([!1,...X])]);return!Q};var W5=B(()=>{E6()});import{finished as qG}from"node:stream/promises";var nZ=async(Z)=>{if(Z===void 0)return;try{await iZ(Z)}catch{}},QG=async(Z)=>{if(Z===void 0)return;try{await aZ(Z)}catch{}},iZ=async(Z)=>{await qG(Z,{cleanup:!0,readable:!1,writable:!0})},aZ=async(Z)=>{await qG(Z,{cleanup:!0,readable:!0,writable:!1})},V5=async(Z,X)=>{if(await Z,X)throw X},B5=(Z,X,q)=>{if(q&&!U5(q))Z.destroy(q);else if(X)Z.destroy()};var oZ=B(()=>{G5()});import{Readable as tj}from"node:stream";import{callbackify as ej}from"node:util";var JG=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,binary:J=!0,preserveNewlines:$=!0}={})=>{let Y=J||T0.has(q),{subprocessStdout:H,waitReadableDestroy:U}=sZ(Z,Q,X),{readableEncoding:W,readableObjectMode:G,readableHighWaterMark:V}=rZ(H,Y),{read:_,onStdoutDataDone:L}=tZ({subprocessStdout:H,subprocess:Z,binary:Y,encoding:q,preserveNewlines:$}),z=new tj({read:_,destroy:ej(ZX.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:U})),highWaterMark:V,objectMode:G,encoding:W});return eZ({subprocessStdout:H,onStdoutDataDone:L,readable:z,subprocess:Z}),z},sZ=(Z,X,q)=>{let Q=v6(Z,X),J=p2(q,Q,"readableDestroy");return{subprocessStdout:Q,waitReadableDestroy:J}},rZ=({readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q},Q)=>Q?{readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:gZ},tZ=({subprocessStdout:Z,subprocess:X,binary:q,encoding:Q,preserveNewlines:J})=>{let $=o0(),Y=H5({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:!q,encoding:Q,preserveNewlines:J});return{read(){ZO(this,Y,$)},onStdoutDataDone:$}},ZO=async(Z,X,q)=>{try{let{value:Q,done:J}=await X.next();if(J)q.resolve();else Z.push(Q)}catch{}},eZ=async({subprocessStdout:Z,onStdoutDataDone:X,readable:q,subprocess:Q,subprocessStdin:J})=>{try{if(await aZ(Z),await Q,await nZ(J),await X,q.readable)q.push(null)}catch($){await nZ(J),$G(q,$)}},ZX=async({subprocessStdout:Z,subprocess:X,waitReadableDestroy:q},Q)=>{if(await g6(q,X))$G(Z,Q),await V5(X,Q)},$G=(Z,X)=>{B5(Z,Z.readable,X)};var XX=B(()=>{u1();j1();K5();E6();W5();oZ()});import{Writable as XO}from"node:stream";import{callbackify as YG}from"node:util";var HG=({subprocess:Z,concurrentStreams:X},{to:q}={})=>{let{subprocessStdin:Q,waitWritableFinal:J,waitWritableDestroy:$}=qX(Z,q,X),Y=new XO({...QX(Q,Z,J),destroy:YG($X.bind(void 0,{subprocessStdin:Q,subprocess:Z,waitWritableFinal:J,waitWritableDestroy:$})),highWaterMark:Q.writableHighWaterMark,objectMode:Q.writableObjectMode});return JX(Q,Y),Y},qX=(Z,X,q)=>{let Q=V8(Z,X),J=p2(q,Q,"writableFinal"),$=p2(q,Q,"writableDestroy");return{subprocessStdin:Q,waitWritableFinal:J,waitWritableDestroy:$}},QX=(Z,X,q)=>({write:qO.bind(void 0,Z),final:YG(QO.bind(void 0,Z,X,q))}),qO=(Z,X,q,Q)=>{if(Z.write(X,q))Q();else Z.once("drain",Q)},QO=async(Z,X,q)=>{if(await g6(q,X)){if(Z.writable)Z.end();await X}},JX=async(Z,X,q)=>{try{if(await iZ(Z),X.writable)X.end()}catch(Q){await QG(q),KG(X,Q)}},$X=async({subprocessStdin:Z,subprocess:X,waitWritableFinal:q,waitWritableDestroy:Q},J)=>{if(await g6(q,X),await g6(Q,X))KG(Z,J),await V5(X,J)},KG=(Z,X)=>{B5(Z,Z.writable,X)};var YX=B(()=>{j1();W5();oZ()});import{Duplex as JO}from"node:stream";import{callbackify as $O}from"node:util";var UG=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,to:J,binary:$=!0,preserveNewlines:Y=!0}={})=>{let H=$||T0.has(q),{subprocessStdout:U,waitReadableDestroy:W}=sZ(Z,Q,X),{subprocessStdin:G,waitWritableFinal:V,waitWritableDestroy:_}=qX(Z,J,X),{readableEncoding:L,readableObjectMode:z,readableHighWaterMark:R}=rZ(U,H),{read:D,onStdoutDataDone:M}=tZ({subprocessStdout:U,subprocess:Z,binary:H,encoding:q,preserveNewlines:Y}),k=new JO({read:D,...QX(G,Z,V),destroy:$O(YO.bind(void 0,{subprocessStdout:U,subprocessStdin:G,subprocess:Z,waitReadableDestroy:W,waitWritableFinal:V,waitWritableDestroy:_})),readableHighWaterMark:R,writableHighWaterMark:G.writableHighWaterMark,readableObjectMode:z,writableObjectMode:G.writableObjectMode,encoding:L});return eZ({subprocessStdout:U,onStdoutDataDone:M,readable:k,subprocess:Z,subprocessStdin:G}),JX(G,k,U),k},YO=async({subprocessStdout:Z,subprocessStdin:X,subprocess:q,waitReadableDestroy:Q,waitWritableFinal:J,waitWritableDestroy:$},Y)=>{await Promise.all([ZX({subprocessStdout:Z,subprocess:q,waitReadableDestroy:Q},Y),$X({subprocessStdin:X,subprocess:q,waitWritableFinal:J,waitWritableDestroy:$},Y)])};var GG=B(()=>{u1();XX();YX()});var HX=(Z,X,{from:q,binary:Q=!1,preserveNewlines:J=!1}={})=>{let $=Q||T0.has(X),Y=v6(Z,q),H=H5({subprocessStdout:Y,subprocess:Z,binary:$,shouldEncode:!0,encoding:X,preserveNewlines:J});return HO(H,Y,Z)},HO=async function*(Z,X,q){try{yield*Z}finally{if(X.readable)X.destroy();await q}};var WG=B(()=>{u1();j1();K5()});var VG=(Z,{encoding:X})=>{let q=XG();Z.readable=JG.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.writable=HG.bind(void 0,{subprocess:Z,concurrentStreams:q}),Z.duplex=UG.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.iterable=HX.bind(void 0,Z,X),Z[Symbol.asyncIterator]=HX.bind(void 0,Z,X,{})};var BG=B(()=>{W5();XX();YX();GG();WG()});var LG=(Z,X)=>{for(let[q,Q]of UO){let J=Q.value.bind(X);Reflect.defineProperty(Z,q,{...Q,value:J})}},KO,UO;var _G=B(()=>{KO=(async()=>{})().constructor.prototype,UO=["then","catch","finally"].map((Z)=>[Z,Reflect.getOwnPropertyDescriptor(KO,Z)])});import{setMaxListeners as GO}from"node:events";import{spawn as WO}from"node:child_process";var zG=(Z,X,q,Q)=>{let{file:J,commandArguments:$,command:Y,escapedCommand:H,startTime:U,verboseInfo:W,options:G,fileDescriptors:V}=VO(Z,X,q),{subprocess:_,promise:L}=LO({file:J,commandArguments:$,options:G,startTime:U,verboseInfo:W,command:Y,escapedCommand:H,fileDescriptors:V});return _.pipe=Y5.bind(void 0,{source:_,sourcePromise:L,boundOptions:{},createNested:Q}),LG(_,L),s0.set(_,{options:G,fileDescriptors:V}),_},VO=(Z,X,q)=>{let{command:Q,escapedCommand:J,startTime:$,verboseInfo:Y}=Z8(Z,X,q),{file:H,commandArguments:U,options:W}=N8(Z,X,q),G=BO(W),V=YU(G,Y);return{file:H,commandArguments:U,command:Q,escapedCommand:J,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},BO=({timeout:Z,signal:X,...q})=>{if(X!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...q,timeoutDuration:Z}},LO=({file:Z,commandArguments:X,options:q,startTime:Q,verboseInfo:J,command:$,escapedCommand:Y,fileDescriptors:H})=>{let U;try{U=WO(...x8(Z,X,q))}catch(z){return XU({error:z,command:$,escapedCommand:Y,fileDescriptors:H,options:q,startTime:Q,verboseInfo:J})}let W=new AbortController;GO(Number.POSITIVE_INFINITY,W.signal);let G=[...U.stdio];RU(U,H,W),IU(U,q,W);let V={},_=o0();U.kill=e9.bind(void 0,{kill:U.kill.bind(U),options:q,onInternalError:_,context:V,controller:W}),U.all=lU(U,q),VG(U,q),tK(U,q);let L=_O({subprocess:U,options:q,startTime:Q,verboseInfo:J,fileDescriptors:H,originalStreams:G,command:$,escapedCommand:Y,context:V,onInternalError:_,controller:W});return{subprocess:U,promise:L}},_O=async({subprocess:Z,options:X,startTime:q,verboseInfo:Q,fileDescriptors:J,originalStreams:$,command:Y,escapedCommand:H,context:U,onInternalError:W,controller:G})=>{let[V,[_,L],z,R,D]=await eU({subprocess:Z,options:X,context:U,verboseInfo:Q,fileDescriptors:J,originalStreams:$,onInternalError:W,controller:G});G.abort(),W.resolve();let M=z.map((I,T)=>G1(I,X,T)),k=G1(R,X,"all"),F=zO({errorInfo:V,exitCode:_,signal:L,stdio:M,all:k,ipcOutput:D,context:U,options:X,command:Y,escapedCommand:H,startTime:q});return b6(F,Q,X)},zO=({errorInfo:Z,exitCode:X,signal:q,stdio:Q,all:J,ipcOutput:$,context:Y,options:H,command:U,escapedCommand:W,startTime:G})=>("error"in Z)?C2({error:Z.error,command:U,escapedCommand:W,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof K1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:X,signal:q,stdio:Q,all:J,ipcOutput:$,options:H,startTime:G,isSync:!1}):m8({command:U,escapedCommand:W,stdio:Q,all:J,ipcOutput:$,options:H,startTime:G});var RG=B(()=>{f8();w3();i3();j1();a3();kZ();S2();u8();qU();HU();b2();MU();K8();wU();fU();lZ();ZG();BG();E6();_G()});var L5=(Z,X)=>{let q=Object.fromEntries(Object.entries(X).map(([Q,J])=>[Q,RO(Q,Z[Q],J)]));return{...Z,...q}},RO=(Z,X,q)=>{if(MO.has(Z)&&t(X)&&t(q))return{...X,...q};return q},MO;var MG=B(()=>{Q1();H1();MO=new Set(["env",...T3])});var w1=(Z,X,q,Q)=>{let J=(Y,H,U)=>w1(Y,H,q,U),$=(...Y)=>FO({mapArguments:Z,deepOptions:q,boundOptions:X,setBoundExeca:Q,createNested:J},...Y);if(Q!==void 0)Q($,J,X);return $},FO=({mapArguments:Z,deepOptions:X={},boundOptions:q={},setBoundExeca:Q,createNested:J},$,...Y)=>{if(t($))return J(Z,L5(q,$),Q);let{file:H,commandArguments:U,options:W,isSync:G}=DO({mapArguments:Z,firstArgument:$,nextArguments:Y,deepOptions:X,boundOptions:q});return G?cK(H,U,W):zG(H,U,W,J)},DO=({mapArguments:Z,firstArgument:X,nextArguments:q,deepOptions:Q,boundOptions:J})=>{let $=X9(X)?q9(X,q):[X,...q],[Y,H,U]=u4(...$),W=L5(L5(Q,J),U),{file:G=Y,commandArguments:V=H,options:_=W,isSync:L=!1}=Z({file:Y,commandArguments:H,options:W});return{file:G,commandArguments:V,options:_,isSync:L}};var FG=B(()=>{Q1();R3();Q9();lK();RG();MG()});var DG=({file:Z,commandArguments:X})=>TG(Z,X),AG=({file:Z,commandArguments:X})=>({...TG(Z,X),isSync:!0}),TG=(Z,X)=>{if(X.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${Z} ${X}.`);let[q,...Q]=AO(Z);return{file:q,commandArguments:Q}},AO=(Z)=>{if(typeof Z!=="string")throw TypeError(`The command must be a string: ${String(Z)}.`);let X=Z.trim();if(X==="")return[];let q=[];for(let Q of X.split(TO)){let J=q.at(-1);if(J&&J.endsWith("\\"))q[q.length-1]=`${J.slice(0,-1)} ${Q}`;else q.push(Q)}return q},TO;var jG=B(()=>{TO=/ +/g});var OG=(Z,X,q)=>{Z.sync=X(jO,q),Z.s=Z.sync},IG=({options:Z})=>wG(Z),jO=({options:Z})=>({...wG(Z),isSync:!0}),wG=(Z)=>({options:{...OO(Z),...Z}}),OO=({input:Z,inputFile:X,stdio:q})=>Z===void 0&&X===void 0&&q===void 0?{stdin:"inherit"}:{},kG;var NG=B(()=>{kG={preferLocal:!0}});var KX,k0,ac,oc,sc,rc,tc,ec,Zl,Xl;var m6=B(()=>{FG();jG();d3();NG();kZ();KX=w1(()=>({})),k0=w1(()=>({isSync:!0})),ac=w1(DG),oc=w1(AG),sc=w1(hY),rc=w1(IG,{},kG,OG),{sendMessage:tc,getOneMessage:ec,getEachMessage:Zl,getCancelSignal:Xl}=eK()});async function IO(Z){if(process.platform==="win32"){let q=await KX(`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 KX(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(X.exitCode!==0||!X.stdout)return null;return X.stdout.trim()}function wO(Z){if(process.platform==="win32")try{return _6(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return _6(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var UX,xG,_5;var z5=B(()=>{m6();g7();UX=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,xG=UX?async(Z)=>UX(Z):IO,_5=UX??wO});function PG(Z,X){return{cmd:_5(Z)??Z,args:X}}var EG=B(()=>{z5()});import{dirname as kO,join as vG}from"path";async function u6(Z){try{return!!await xG(Z)}catch{return!1}}function vO(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function CO(){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 yO)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(bG())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 bG(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function zl(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return p6.platform}var L0,NO,xO,PO,SG,EO,yO,SO,p6;var GX=B(()=>{v1();CG();i$();c0();EG();F0();z5();L0=d(()=>{let Z=yG(),X=K0(),q=vG(X,`config${Z}.json`);if(!N().existsSync(q)){let J=process.env.CLAUDIN_CONFIG_DIR?X:kO(X),$=vG(J,`.claudin${Z}.json`);if(N().existsSync($))return $}return q}),NO=d(async()=>{try{let{default:Z}=await import("./index-0.5.10-x3apane6.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});xO=d(async()=>{let Z=[];if(await u6("npm"))Z.push("npm");if(await u6("yarn"))Z.push("yarn");if(await u6("pnpm"))Z.push("pnpm");return Z}),PO=d(async()=>{let Z=[];if(await u6("bun"))Z.push("bun");if(await u6("deno"))Z.push("deno");if(await u6("node"))Z.push("node");return Z}),SG=d(()=>{try{return N().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),EO=d(()=>{try{if(!SG())return!1;let{cmd:Z}=PG("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});yO=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];SO=d(()=>{if(e(process.env.CODESPACES))return"codespaces";if(process.env.GITPOD_WORKSPACE_ID)return"gitpod";if(process.env.REPL_ID||process.env.REPL_SLUG)return"replit";if(process.env.PROJECT_DOMAIN)return"glitch";if(e(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(e(process.env.RENDER))return"render";if(e(process.env.NETLIFY))return"netlify";if(process.env.DYNO)return"heroku";if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return"fly.io";if(e(process.env.CF_PAGES))return"cloudflare-pages";if(process.env.DENO_DEPLOYMENT_ID)return"deno-deploy";if(process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_FARGATE")return"aws-fargate";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_EC2")return"aws-ecs";try{if(N().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase().startsWith("ec2"))return"aws-ec2"}catch{}if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if(e(process.env.GITHUB_ACTIONS))return"github-actions";if(e(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(e(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(N().existsSync("/.dockerenv"))return"docker"}catch{}if(p6.platform==="darwin")return"unknown-darwin";if(p6.platform==="linux")return"unknown-linux";if(p6.platform==="win32")return"unknown-win32";return"unknown"});p6={hasInternetAccess:NO,isCI:e(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:CO(),isSSH:bG,getPackageManagers:xO,getRuntimes:PO,isRunningWithBun:d(n$),isWslEnvironment:SG,isNpmFromWindowsPath:EO,isConductor:vO,detectDeploymentEnvironment:SO}});var Fl,Dl="∙",Al="✻",Tl="↑",jl="↓",Ol="↯",Il="○",wl="◐",kl="●",Nl="◉",xl="◍",Pl="▶",hG="⏸",El="↻",vl="◇",yl="◆",Cl="※",Sl="▎",bl="·✔︎·",hl="×";var fG=B(()=>{GX();Fl=p6.platform==="darwin"?"⏺":"●"});var R5,bO,d6;var gG=B(()=>{R5=["acceptEdits","bypassPermissions","default","dontAsk","plan"],bO=[...R5,"auto"],d6=bO});var iO={};WX(iO,{toExternalPermissionMode:()=>mO,permissionModeTitle:()=>pO,permissionModeSymbol:()=>lO,permissionModeShortTitle:()=>cO,permissionModeSchema:()=>hO,permissionModeFromString:()=>uO,isExternalPermissionMode:()=>gO,isDefaultMode:()=>dO,getModeColor:()=>nO,externalPermissionModeSchema:()=>fO,PERMISSION_MODES:()=>d6,EXTERNAL_PERMISSION_MODES:()=>R5});function gO(Z){return Z!=="auto"}function d2(Z){return mG[Z]??mG.default}function mO(Z){return d2(Z).external}function uO(Z){return d6.includes(Z)?Z:"default"}function pO(Z){return d2(Z).title}function dO(Z){return Z==="default"||Z===void 0}function cO(Z){return d2(Z).shortTitle}function lO(Z){return d2(Z).symbol}function nO(Z){return d2(Z).color}var hO,fO,mG;var uG=B(()=>{n0();fG();gG();h1();hO=O(()=>VX.enum(d6)),fO=O(()=>VX.enum(R5)),mG={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:hG,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 pG=()=>{};var dG;var cG=B(()=>{pG();dG=["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 lG=()=>{};var nG=()=>{};var iG=B(()=>{cG();lG();nG()});var aG,sl="bash";var oG=B(()=>{aG=["bash","powershell"]});function aO(){let Z=K.object({type:K.literal("command").describe("Shell command hook type"),command:K.string().describe("Shell command to execute"),if:M5(),shell:K.enum(aG).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:K.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:K.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.")}),X=K.object({type:K.literal("prompt").describe("LLM prompt hook type"),prompt:K.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:M5(),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:K.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-4-6"). If not specified, uses the default small fast model.'),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")}),q=K.object({type:K.literal("http").describe("HTTP hook type"),url:K.string().url().describe("URL to POST the hook input JSON to"),if:M5(),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:M5(),timeout:K.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:K.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-4-6"). If not specified, uses Haiku.'),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:X,HttpHookSchema:q,AgentHookSchema:Q}}var M5,sG,rG,o1;var F5=B(()=>{iG();n0();h1();oG();M5=O(()=>K.string().optional().describe('Permission rule syntax to filter when this hook runs (e.g., "Bash(git *)"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.'));sG=O(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:X,AgentHookSchema:q,HttpHookSchema:Q}=aO();return K.discriminatedUnion("type",[Z,X,q,Q])}),rG=O(()=>K.object({matcher:K.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:K.array(sG()).describe("List of hooks to execute when the matcher matches")})),o1=O(()=>K.partialRecord(K.enum(dG),K.array(rG())))});var $n,Yn,oO,sO,tG,rO,tO,eO,ZI,XI,qI,QI,D5,Hn;var eG=B(()=>{n0();h1();$n=O(()=>K.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),Yn=O(()=>K.enum(["stdio","sse","sse-ide","http","ws","sdk"])),oO=O(()=>K.object({type:K.literal("stdio").optional(),command:K.string().min(1,"Command cannot be empty"),args:K.array(K.string()).default([]),env:K.record(K.string(),K.string()).optional()})),sO=O(()=>K.boolean()),tG=O(()=>K.object({clientId:K.string().optional(),callbackPort:K.number().int().positive().optional(),authServerMetadataUrl:K.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional(),xaa:sO().optional()})),rO=O(()=>K.object({type:K.literal("sse"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:tG().optional()})),tO=O(()=>K.object({type:K.literal("sse-ide"),url:K.string(),ideName:K.string(),ideRunningInWindows:K.boolean().optional()})),eO=O(()=>K.object({type:K.literal("ws-ide"),url:K.string(),ideName:K.string(),authToken:K.string().optional(),ideRunningInWindows:K.boolean().optional()})),ZI=O(()=>K.object({type:K.literal("http"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:tG().optional()})),XI=O(()=>K.object({type:K.literal("ws"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional()})),qI=O(()=>K.object({type:K.literal("sdk"),name:K.string()})),QI=O(()=>K.object({type:K.literal("claudeai-proxy"),url:K.string(),id:K.string()})),D5=O(()=>K.union([oO(),rO(),tO(),eO(),ZI(),XI(),qI(),QI()])),Hn=O(()=>K.object({mcpServers:K.record(K.string(),D5())}))});function Bn(Z,X){let q=Z.toLowerCase();return X.autoUpdate??(j5.has(q)&&!JI.has(q))}function HI(Z){if(j5.has(Z.toLowerCase()))return!1;if(YI.test(Z))return!0;return $I.test(Z)}function Ln(Z,X){let q=Z.toLowerCase();if(!j5.has(q))return null;if(X.source==="github"){if(!(X.repo||"").toLowerCase().startsWith(`${A5}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${A5}/' can use this name.`;return null}if(X.source==="git"&&X.url){let Q=X.url.toLowerCase(),J=Q.includes("github.com/anthropics/"),$=Q.includes("git@github.com:anthropics/");if(J||$)return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${A5}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${A5}' organization.`}function zn(Z){return typeof Z==="string"&&Z.startsWith("./")}function Rn(Z){return Z.source==="file"||Z.source==="directory"}var j5,JI,$I,YI,A5="anthropics",W1,c6,ZW,LX,_X,QW,zX,KI,_n,UI,GI,WI,VI,BI,LI,XW,_I,zI,JW,RI,MI,qW,FI,$W,DI,AI,c2,BX,YW,TI,jI,Mn,T5,OI,II,Fn,wI,kI,NI,xI,PI,Dn,EI,An;var HW=B(()=>{n0();F5();eG();h1();j5=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),JI=new Set(["knowledge-work-plugins"]);$I=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,YI=/[^\u0020-\u007E]/;W1=O(()=>K.string().startsWith("./")),c6=O(()=>W1().endsWith(".json")),ZW=O(()=>K.union([W1().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB file path must end with .mcpb or .dxt"}).describe("Path to MCPB file relative to plugin root"),K.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),LX=O(()=>W1().endsWith(".md")),_X=O(()=>K.union([LX(),W1()])),QW=O(()=>K.string().min(1,"Marketplace must have a name").refine((Z)=>!Z.includes(" "),{message:'Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")'}).refine((Z)=>!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("..")&&Z!==".",{message:'Marketplace name cannot contain path separators (/ or \\), ".." sequences, or be "."'}).refine((Z)=>!HI(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'})),zX=O(()=>K.object({name:K.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:K.string().optional().describe("Contact email for support or feedback"),url:K.string().optional().describe("Website, GitHub profile, or organization URL")})),KI=O(()=>K.object({name:K.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier for the plugin, used for namespacing (prefer kebab-case)"),version:K.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:K.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:zX().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(II()).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.`)})),_n=O(()=>K.object({description:K.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:K.lazy(()=>o1()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),UI=O(()=>K.object({hooks:K.union([c6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),K.lazy(()=>o1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),K.array(K.union([c6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),K.lazy(()=>o1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),GI=O(()=>K.object({source:_X().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'})),WI=O(()=>K.object({commands:K.union([_X().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(_X().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(),GI()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),VI=O(()=>K.object({agents:K.union([LX().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),K.array(LX().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")])})),BI=O(()=>K.object({skills:K.union([W1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),K.array(W1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional skill directories")])})),LI=O(()=>K.object({outputStyles:K.union([W1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root"),K.array(W1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional output styles directories or files")])})),XW=O(()=>K.string().min(1)),_I=O(()=>K.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),zI=O(()=>K.object({mcpServers:K.union([c6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),ZW().describe("Path or URL to MCPB file containing MCP server configuration"),K.record(K.string(),D5()).describe("MCP server configurations keyed by server name"),K.array(K.union([c6().describe("Path to MCP servers configuration file"),ZW().describe("Path or URL to MCPB file"),K.record(K.string(),D5()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),JW=O(()=>K.object({type:K.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:K.string().describe("Human-readable label shown in the config dialog"),description:K.string().describe("Help text shown beneath the field in the config dialog"),required:K.boolean().optional().describe("If true, validation fails when this field is empty"),default:K.union([K.string(),K.number(),K.boolean(),K.array(K.string())]).optional().describe("Default value used when the user provides nothing"),multiple:K.boolean().optional().describe("For string type: allow an array of strings"),sensitive:K.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:K.number().optional().describe("Minimum value (number type only)"),max:K.number().optional().describe("Maximum value (number type only)")}).strict()),RI=O(()=>K.object({userConfig:K.record(K.string().regex(/^[A-Za-z_]\w*$/,"Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDE_PLUGIN_OPTION_<KEY> env vars in hooks"),JW()).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).")})),MI=O(()=>K.object({channels:K.array(K.object({server:K.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:K.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:K.record(K.string(),JW()).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.")})),qW=O(()=>K.strictObject({command:K.string().min(1).refine((Z)=>{if(Z.includes(" ")&&!Z.startsWith("/"))return!1;return!0},{message:"Command should not contain spaces. Use args array for arguments."}).describe('Command to execute the LSP server (e.g., "typescript-language-server")'),args:K.array(XW()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:K.record(_I(),XW()).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")})),FI=O(()=>K.object({lspServers:K.union([c6().describe("Path to .lsp.json configuration file relative to plugin root"),K.record(K.string(),qW()).describe("LSP server configurations keyed by server name"),K.array(K.union([c6().describe("Path to LSP configuration file"),K.record(K.string(),qW()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),$W=O(()=>K.string().refine((Z)=>!Z.includes("..")&&!Z.includes("//"),"Package name cannot contain path traversal patterns").refine((Z)=>{let X=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,q=/^[a-z0-9][a-z0-9-._]*$/;return X.test(Z)||q.test(Z)},"Invalid npm package name format")),DI=O(()=>K.object({settings:K.record(K.string(),K.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),AI=O(()=>K.object({...KI().shape,...UI().partial().shape,...WI().partial().shape,...VI().partial().shape,...BI().partial().shape,...LI().partial().shape,...MI().partial().shape,...zI().partial().shape,...FI().partial().shape,...DI().partial().shape,...RI().partial().shape})),c2=O(()=>K.discriminatedUnion("source",[K.object({source:K.literal("url"),url:K.string().url().describe("Direct URL to marketplace.json file"),headers:K.record(K.string(),K.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),K.object({source:K.literal("github"),repo:K.string().describe("GitHub repository in owner/repo format"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:K.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:K.array(K.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),K.object({source:K.literal("git"),url:K.string().describe("Full git repository URL"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:K.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:K.array(K.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),K.object({source:K.literal("npm"),package:$W().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:QW().refine((Z)=>!j5.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(TI()).describe("Plugin entries declared inline in settings.json"),owner:zX().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).")])),BX=O(()=>K.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),YW=O(()=>K.union([W1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),K.object({source:K.literal("npm"),package:$W().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:BX().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:BX().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:BX().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.")])),TI=O(()=>K.object({name:K.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Plugin name as it appears in the target repository"),source:YW().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.'}));jI=O(()=>AI().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:YW().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.")})),Mn=O(()=>K.object({name:QW(),owner:zX().describe("Marketplace maintainer or curator information"),plugins:K.array(jI()).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.")})),T5=O(()=>K.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),OI=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,II=O(()=>K.union([K.string().regex(OI,"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)])),Fn=O(()=>K.union([T5(),K.object({id:T5().describe('Plugin identifier (e.g., "formatter@tools")'),version:K.string().optional().describe('Version constraint (e.g., "^2.0.0")'),required:K.boolean().optional().describe("If true, cannot be disabled"),config:K.record(K.string(),K.unknown()).optional().describe("Plugin-specific configuration")})])),wI=O(()=>K.object({version:K.string().describe("Currently installed version"),installedAt:K.string().describe("ISO 8601 timestamp of installation"),lastUpdated:K.string().optional().describe("ISO 8601 timestamp of last update"),installPath:K.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:K.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),kI=O(()=>K.object({version:K.literal(1).describe("Schema version 1"),plugins:K.record(T5(),wI()).describe("Map of plugin IDs to their installation metadata")})),NI=O(()=>K.enum(["managed","user","project","local"])),xI=O(()=>K.object({scope:NI().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")})),PI=O(()=>K.object({version:K.literal(2).describe("Schema version 2"),plugins:K.record(T5(),K.array(xI())).describe("Map of plugin IDs to arrays of installation entries")})),Dn=O(()=>K.union([kI(),PI()])),EI=O(()=>K.object({source:c2().describe("Where to fetch the marketplace from"),installLocation:K.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:K.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:K.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),An=O(()=>K.record(K.string(),EI()))});function jn(Z){return Z.startsWith("claude.ai ")}function O5(Z){let X=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))X=X.replace(/_+/g,"_").replace(/^_|_$/g,"");return X}var KW=()=>{};function UW(Z){let X=Z.split("__"),[q,Q,...J]=X;if(q!=="mcp"||!Q)return null;let $=J.length>0?J.join("__"):void 0;return{serverName:Q,toolName:$}}function vI(Z){return`mcp__${O5(Z)}__`}function yI(Z,X){return`${vI(Z)}${O5(X)}`}function wn(Z){return Z.mcpInfo?yI(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function kn(Z,X){let q=`mcp__${O5(X)}__`;return Z.replace(q,"")}function Nn(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 GW=B(()=>{KW()});var WW="Agent",Pn="Task",En;var VW=B(()=>{En=new Set(["Explore","Plan","WebResearcher","WebResearcherManager"])});var RX="TaskOutput";var BW=()=>{};var LW="TaskStop",Cn=`
|
|
77
|
+
- Stops a running background task by its ID
|
|
78
|
+
- Takes a task_id parameter identifying the task to stop
|
|
79
|
+
- Returns a success or failure status
|
|
80
|
+
- Use this tool when you need to terminate a long-running task
|
|
81
|
+
`;var _W=()=>{};function l6(Z){return zW[Z]??Z}function gn(Z){let X=[];for(let[q,Q]of Object.entries(zW))if(Q===Z)X.push(q);return X}function CI(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function SI(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function RW(Z){let X=bI(Z,"(");if(X===-1)return{toolName:l6(Z)};let q=hI(Z,")");if(q===-1||q<=X)return{toolName:l6(Z)};if(q!==Z.length-1)return{toolName:l6(Z)};let Q=Z.substring(0,X),J=Z.substring(X+1,q);if(!Q)return{toolName:l6(Z)};if(J===""||J==="*")return{toolName:l6(Q)};let $=SI(J);return{toolName:l6(Q),ruleContent:$}}function mn(Z){if(!Z.ruleContent)return Z.toolName;let X=CI(Z.ruleContent);return`${Z.toolName}(${X})`}function bI(Z,X){for(let q=0;q<Z.length;q++)if(Z[q]===X){let Q=0,J=q-1;while(J>=0&&Z[J]==="\\")Q++,J--;if(Q%2===0)return q}return-1}function hI(Z,X){for(let q=Z.length-1;q>=0;q--)if(Z[q]===X){let Q=0,J=q-1;while(J>=0&&Z[J]==="\\")Q++,J--;if(Q%2===0)return q}return-1}var zW;var MW=B(()=>{VW();BW();_W();zW={Task:WW,KillShell:LW,AgentOutputTool:RX,BashOutputTool:RX,...{}}});function pn(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function FW(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function DW(Z,X,q=X+"s"){return Z===1?X:q}function dn(Z){let X=Z.indexOf(`
|
|
82
|
+
`);return X===-1?Z:Z.slice(0,X)}function cn(Z,X,q=0){let Q=0,J=Z.indexOf(X,q);while(J!==-1)Q++,J=Z.indexOf(X,J+1);return Q}function ln(Z){return Z.replace(/[0-9]/g,(X)=>String.fromCharCode(X.charCodeAt(0)-65248))}function nn(Z){return Z.replace(/\u3000/g," ")}function an(Z,X=",",q=AW){let J="";for(let $ of Z){let Y=J?X:"",H=Y+$;if(J.length+H.length<=q)J+=H;else{let U=q-J.length-Y.length-14;if(U>0)J+=Y+$.slice(0,U)+"...[truncated]";else J+="...[truncated]";return J}}return J}class fI{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=AW){this.maxSize=Z}append(Z){let X=typeof Z==="string"?Z:Z.toString();if(this.totalBytesReceived+=X.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+X.length>this.maxSize){let q=this.maxSize-this.content.length;if(q>0)this.content+=X.slice(0,q);this.isTruncated=!0}else this.content+=X}toString(){if(!this.isTruncated)return this.content;let Z=this.totalBytesReceived-this.maxSize,X=Math.round(Z/1024);return this.content+`
|
|
83
|
+
... [output truncated - ${X}KB removed]`}clear(){this.content="",this.isTruncated=!1,this.totalBytesReceived=0}get length(){return this.content.length}get truncated(){return this.isTruncated}get totalBytes(){return this.totalBytesReceived}}function on(Z,X){let q=Z.split(`
|
|
84
|
+
`);if(q.length<=X)return Z;return q.slice(0,X).join(`
|
|
85
|
+
`)+"…"}var AW=33554432;var MX=()=>{};function TW(Z){return FX.filePatternTools.includes(Z)}function jW(Z){return FX.bashPrefixTools.includes(Z)}function OW(Z){return FX.customValidation[Z]}var FX;var IW=B(()=>{FX={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 wW(Z,X){let q=0,Q=X-1;while(Q>=0&&Z[Q]==="\\")q++,Q--;return q%2!==0}function DX(Z,X){let q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===X&&!wW(Z,Q))q++;return q}function gI(Z){for(let X=0;X<Z.length-1;X++)if(Z[X]==="("&&Z[X+1]===")"){if(!wW(Z,X))return!0}return!1}function AX(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let X=DX(Z,"("),q=DX(Z,")");if(X!==q)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(gI(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=RW(Z),J=UW(Q.toolName);if(J){if(Q.ruleContent!==void 0||DX(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${Q.toolName}" without parentheses, or use "mcp__${J.serverName}__*" for all tools`,examples:[`mcp__${J.serverName}`,`mcp__${J.serverName}__*`,J.toolName&&J.toolName!=="*"?`mcp__${J.serverName}__${J.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!Q.toolName||Q.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(Q.toolName[0]!==Q.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${FW(String(Q.toolName))}"`};let $=OW(Q.toolName);if($&&Q.ruleContent!==void 0){let Y=$(Q.ruleContent);if(!Y.valid)return Y}if(jW(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(TW(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 I5;var TX=B(()=>{n0();GW();h1();MW();MX();IW();I5=O(()=>K.string().superRefine((Z,X)=>{let q=AX(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 Yi(Z){if(!Z||typeof Z!=="object")return null;let X=jX.safeParse(Z);if(!X.success)return null;if(!X.data.enabled)return null;return X.data}var jX;var kW=B(()=>{n0();jX=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 Di(Z){return"serverName"in Z&&Z.serverName!==void 0}function Ai(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function Ti(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var mI,uI,pI,dI,cI,NW,N0;var l2=B(()=>{n0();l$();c0();h1();uG();HW();L3();TX();F5();F5();kW();Z3();mI=O(()=>K.record(K.string(),K.coerce.string())),uI=O(()=>K.object({allow:K.array(I5()).optional().describe("List of permission rules for allowed operations"),deny:K.array(I5()).optional().describe("List of permission rules for denied operations"),ask:K.array(I5()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:K.enum(d6).optional().describe("Default permission mode when Claude Code needs access"),disableBypassPermissionsMode:K.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:K.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:K.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:K.array(K.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),pI=O(()=>K.object({source:c2().describe("Where to fetch the marketplace from"),installLocation:K.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:K.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),dI=O(()=>K.object({serverName:K.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that 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 e7([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"'})),cI=O(()=>K.object({serverName:K.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that is explicitly blocked"),serverCommand:K.array(K.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for blocked stdio servers"),serverUrl:K.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return e7([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"'})),NW=["skills","agents","hooks","mcp"],N0=O(()=>K.object({$schema:K.literal(u$).optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:K.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:K.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:K.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:K.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),...e(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:K.object({issuer:K.string().url().describe("IdP issuer URL for OIDC discovery"),clientId:K.string().describe("Claude Code's client_id registered at the IdP"),callbackPort:K.number().int().positive().optional().describe("Fixed loopback callback port for the IdP OIDC login. Only needed if the IdP does not honor RFC 8252 port-any matching.")}).optional().describe("XAA (SEP-990) IdP connection. Configure once; all XAA-enabled MCP servers reuse this.")}:{},fileSuggestion:K.object({type:K.literal("command"),command:K.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:K.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:K.number().nonnegative().int().optional().describe("Number of days to retain chat transcripts (default: 30). Setting to 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."),env:mI().optional().describe("Environment variables to set for Claude Code sessions"),attribution:K.object({commit:K.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:K.string().optional().describe("Attribution text for pull request descriptions. Empty string hides attribution.")}).optional().describe("Customize attribution text for commits and PRs. Each field defaults to the standard Claude Code attribution if not set."),includeGitInstructions:K.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:uI().optional().describe("Tool usage permissions configuration"),model:K.string().optional().describe("Override the default model used by Claude Code"),availableModels:K.array(K.string()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'),modelOverrides:K.record(K.string(),K.string()).optional().describe('Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.'),enableAllProjectMcpServers:K.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:K.array(K.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:K.array(K.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:K.array(dI()).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(cI()).optional().describe("Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied."),hooks:o1().optional().describe("Custom commands to run before/after tool executions"),autoFix:jX.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:K.object({symlinkDirectories:K.array(K.string()).optional().describe('Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"'),sparsePaths:K.array(K.string()).optional().describe("Directories to include when creating worktrees, via git sparse-checkout (cone mode). "+"Dramatically faster in large monorepos — only the listed paths are written to disk."),baseRef:K.enum(["fresh","head"]).optional().describe('Base ref for new worktrees. "fresh" (default) branches from origin/<default-branch>; "head" branches from the current local HEAD.')}).optional().describe("Git worktree configuration for --worktree flag."),lsp:K.object({enabled:K.boolean().optional(),diagnosticsTimeoutMs:K.number().min(100).max(5000).optional().describe("Per-edit diagnostic injection timeout in ms (default 1500, min 100, max 5000). After FileEdit/FileWrite, Claudin waits up to this duration for the LSP server to publish diagnostics so they can be attached to the same turn.")}).catchall(K.object({disabled:K.boolean().optional(),command:K.array(K.string()).min(1).optional(),extensions:K.array(K.string()).optional()})).optional().describe("LSP server configuration. Set enabled:false to disable the entire LSP subsystem (default: true). Set diagnosticsTimeoutMs to tune per-edit diagnostic injection (default 1500). Other keys = server names. Set disabled:true to disable a built-in server. Set command to override or add a server."),disableAllHooks:K.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:K.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:K.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:K.array(K.string()).optional().describe('Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).'),httpHookAllowedEnvVars:K.array(K.string()).optional().describe("Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers)."),allowManagedPermissionRulesOnly:K.boolean().optional().describe("When true (and set in managed settings), only permission rules (allow/deny/ask) from managed settings are respected. User, project, local, and CLI argument permission rules are ignored."),allowManagedMcpServersOnly:K.boolean().optional().describe("When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies."),strictPluginOnlyCustomization:K.preprocess((Z)=>Array.isArray(Z)?Z.filter((X)=>NW.includes(X)):Z,K.union([K.boolean(),K.array(K.enum(NW))])).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(),pI()).check((Z)=>{for(let[X,q]of Object.entries(Z.value))if(q.source.source==="settings"&&q.source.name!==X)Z.issues.push({code:"custom",input:q.source.name,path:[X,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${X}" but source.name "${q.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claudin/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:K.array(c2()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. "+"Note: this is a policy gate only — it does NOT register marketplaces. "+"To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),blockedMarketplaces:K.array(c2()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem."),forceLoginMethod:K.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:K.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:K.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:K.string().optional().describe("Controls the output style for assistant responses"),language:K.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:K.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:c$().optional(),feedbackSurveyRate:K.number().min(0).max(1).optional().describe("Probability (0–1) that the session quality survey appears when eligible. 0.05 is a reasonable starting point."),spinnerTipsEnabled:K.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:K.object({mode:K.enum(["append","replace"]),verbs:K.array(K.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:K.object({excludeDefault:K.boolean().optional(),tips:K.array(K.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:K.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:K.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:K.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:K.enum(["low","medium","high","xhigh","max","adaptive"]).optional().catch(void 0).describe("Persisted effort level for supported models. 'adaptive' sends no effort field so the model scales per request."),codingLoopXhighDefault:K.boolean().optional().catch(void 0).describe("When true, defaults effort to xhigh for Opus 4.8 (coding/high-autonomy loops). Overrides the medium default for Pro/Max/Team and ultrathink. Opus 4.8 only; other models are unaffected. Defaults to false."),advisorModel:K.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:K.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:K.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:K.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:K.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:K.string().optional().describe("Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model."),companyAnnouncements:K.array(K.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:K.record(K.string(),K.object({mcpServers:K.record(K.string(),K.record(K.string(),K.union([K.string(),K.number(),K.boolean(),K.array(K.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:K.record(K.string(),K.union([K.string(),K.number(),K.boolean(),K.array(K.string())])).optional().describe("Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.")})).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"),remote:K.object({defaultEnvironmentId:K.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:K.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),...{},minimumVersion:K.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:K.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"),...{},...{},...{},channelsEnabled:K.boolean().optional().describe("Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels."),allowedChannelPlugins:K.array(K.object({marketplace:K.string(),plugin:K.string()})).optional().describe("Teams/Enterprise allowlist of channel plugins. When set, "+"replaces the default Anthropic allowlist — admins decide which "+"plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true."),...{},prefersReducedMotion:K.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:K.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:K.string().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."),autoDreamEnabled:K.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:K.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:K.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:K.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:K.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:K.object({allow:K.array(K.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:K.array(K.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:K.array(K.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:K.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:K.array(K.object({id:K.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:K.string().describe("Display name for the SSH connection"),sshHost:K.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:K.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:K.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:K.string().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.")})).optional().describe("SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members."),claudeMdExcludes:K.array(K.string()).optional().describe('Glob patterns or absolute paths of AGENTS.md/CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/AGENTS.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'),pluginTrustMessage:K.string().optional().describe('Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").')}).passthrough())});function OX(){let Z=xW(N0(),{unrepresentable:"any"});return m(Z,null,2)}var PW=B(()=>{n0();z0();l2()});function EW(Z){let X=lI.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=nI[Q]}return q}var lI,nI;var vW=B(()=>{lI=[{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'}}],nI={}});function yW(Z){return Z.code==="invalid_type"}function CW(Z){return Z.code==="invalid_value"}function iI(Z){return Z.code==="unrecognized_keys"}function SW(Z){return Z.code==="too_small"}function IX(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function bW(Z){let X=Z.match(/received (\w+)/);return X?X[1]:void 0}function n6(Z,X){return Z.issues.map((q)=>{let Q=q.path.map(String).join("."),J=q.message,$,Y,H,U,W;if(CW(q))Y=q.values.map((V)=>String(V)),H=Y.join(" | "),U=void 0,W=void 0;else if(yW(q)){H=q.expected;let V=bW(q.message);U=V??IX(q.input),W=V??IX(q.input)}else if(SW(q))H=String(q.minimum);else if(q.code==="custom"&&"params"in q)U=q.params.received,W=U;let G=EW({path:Q,code:q.code,expected:H,received:U,enumValues:Y,message:q.message,value:U});if(CW(q))$=Y?.map((V)=>`"${V}"`).join(", "),J=`Invalid value. Expected one of: ${$}`;else if(yW(q)){let V=bW(q.message)??IX(q.input);if(q.expected==="object"&&V==="null"&&Q==="")J="Invalid or malformed JSON";else J=`Expected ${q.expected}, but received ${V}`}else if(iI(q)){let V=q.keys.join(", ");J=`Unrecognized ${DW(q.keys.length,"field")}: ${V}`}else if(SW(q))J=`Number must be greater than or equal to ${q.minimum}`,$=String(q.minimum);return{file:X,path:Q,message:J,expected:$,invalidValue:W,suggestion:G?.suggestion,docLink:G?.docLink}})}function bi(Z){try{let X=X0(Z),q=N0().strict().safeParse(X);if(q.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
|
|
86
|
+
`+n6(q.error,"settings").map(($)=>`- ${$.path}: ${$.message}`).join(`
|
|
87
|
+
`),fullSchema:OX()}}catch(X){return{isValid:!1,error:`Invalid JSON: ${X instanceof Error?X.message:"Unknown parsing error"}`,fullSchema:OX()}}}function w5(Z,X){if(!Z||typeof Z!=="object")return[];let q=Z;if(!q.permissions||typeof q.permissions!=="object")return[];let Q=q.permissions,J=[];for(let $ of["allow","deny","ask"]){let Y=Q[$];if(!Array.isArray(Y))continue;Q[$]=Y.filter((H)=>{if(typeof H!=="string")return J.push({file:X,path:`permissions.${$}`,message:`Non-string value in ${$} array was removed`,invalidValue:H}),!1;let U=AX(H);if(!U.valid){let W=`Invalid permission rule "${H}" was skipped`;if(U.error)W+=`: ${U.error}`;if(U.suggestion)W+=`. ${U.suggestion}`;return J.push({file:X,path:`permissions.${$}`,message:W,invalidValue:H}),!1}return!0})}return J}var wX=B(()=>{z0();MX();TX();PW();l2();vW()});import{userInfo as aI}from"os";function uW(){let Z="";try{Z=aI().username}catch{}let X=[];if(Z)X.push({path:`/Library/Managed Preferences/${Z}/${hW}.plist`,label:"per-user managed preferences"});return X.push({path:`/Library/Managed Preferences/${hW}.plist`,label:"device-level managed preferences"}),X}var hW="com.anthropic.claudecode",k5="HKLM\\SOFTWARE\\Policies\\ClaudeCode",N5="HKCU\\SOFTWARE\\Policies\\ClaudeCode",i6="Settings",fW="/usr/bin/plutil",gW,mW=5000;var kX=B(()=>{gW=["-convert","json","-o","-","--"]});import{execFile as oI}from"child_process";import{existsSync as sI}from"fs";function NX(Z,X){return new Promise((q)=>{oI(Z,X,{encoding:"utf-8",timeout:mW},(Q,J)=>{q({stdout:J??"",code:Q?1:0})})})}function x5(){return(async()=>{if(process.platform==="darwin"){let Z=uW(),q=(await Promise.all(Z.map(async({path:Q,label:J})=>{if(!sI(Q))return{stdout:"",label:J,ok:!1};let{stdout:$,code:Y}=await NX(fW,[...gW,Q]);return{stdout:$,label:J,ok:Y===0&&!!$}}))).find((Q)=>Q.ok);return{plistStdouts:q?[{stdout:q.stdout,label:q.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,X]=await Promise.all([NX("reg",["query",k5,"/v",i6]),NX("reg",["query",N5,"/v",i6])]);return{plistStdouts:null,hklmStdout:Z.code===0?Z.stdout:null,hkcuStdout:X.code===0?X.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function di(){if(xX)return;xX=x5()}function pW(){return xX}var xX=null;var dW=B(()=>{kX()});import{join as cW}from"path";function rI(){if(P5)return;P5=(async()=>{a6("mdm_load_start");let Z=Date.now(),X=pW()??x5(),{mdm:q,hkcu:Q}=iW(await X);EX=q,vX=Q,a6("mdm_load_end");let J=Date.now()-Z;if(P(`MDM settings load completed in ${J}ms`),Object.keys(q.settings).length>0){P(`MDM settings found: ${Object.keys(q.settings).join(", ")}`);try{Y0("info","mdm_settings_loaded",{duration_ms:J,key_count:Object.keys(q.settings).length,error_count:q.errors.length})}catch{}}})()}async function Qa(){if(!P5)rI();await P5}function E5(){return EX??V1}function v5(){return vX??V1}function Ja(Z,X){EX=Z,vX=X}async function $a(){let Z=await x5();return iW(Z)}function PX(Z,X){let q=C0(Z,!1);if(!q||typeof q!=="object")return{settings:{},errors:[]};let Q=w5(q,X),J=N0().safeParse(q);if(!J.success){let $=n6(J.error,X);return{settings:{},errors:[...Q,...$]}}return{settings:J.data,errors:Q}}function lW(Z,X="Settings"){let q=Z.split(/\r?\n/),Q=X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),J=new RegExp(`^\\s+${Q}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let $ of q){let Y=$.match(J);if(Y&&Y[1])return Y[1].trimEnd()}return null}function iW(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:X,label:q}=Z.plistStdouts[0],Q=PX(X,q);if(Object.keys(Q.settings).length>0)return{mdm:Q,hkcu:V1}}if(Z.hklmStdout){let X=lW(Z.hklmStdout);if(X){let q=PX(X,`Registry: ${k5}\\${i6}`);if(Object.keys(q.settings).length>0)return{mdm:q,hkcu:V1}}}if(tI())return{mdm:V1,hkcu:V1};if(Z.hkcuStdout){let X=lW(Z.hkcuStdout);if(X){let q=PX(X,`Registry: ${N5}\\${i6}`);return{mdm:V1,hkcu:q}}}return{mdm:V1,hkcu:V1}}function tI(){try{let Z=cW(D1(),"managed-settings.json"),X=q1(Z),q=C0(X,!1);if(q&&typeof q==="object"&&Object.keys(q).length>0)return!0}catch{}try{let Z=T2(),X=N().readdirSync(Z);for(let q of X){if(!(q.isFile()||q.isSymbolicLink())||!q.name.endsWith(".json")||q.name.startsWith("."))continue;try{let Q=q1(cW(Z,q.name)),J=C0(Q,!1);if(J&&typeof J==="object"&&Object.keys(J).length>0)return!0}catch{}}}catch{}return!1}var V1,EX=null,vX=null,P5=null;var aW=B(()=>{M1();H2();W2();F0();f4();nW();m4();l2();wX();kX();dW();V1=Object.freeze({settings:{},errors:[]})});import{dirname as JV,join as y5,resolve as n2}from"path";function hX(){return y5(D1(),"managed-settings.json")}function fX(){let Z=[],X={},q=!1,{settings:Q,errors:J}=i2(hX());if(Z.push(...J),Q&&Object.keys(Q).length>0)X=X1(X,Q,s1),q=!0;let $=T2();try{let Y=N().readdirSync($).filter((H)=>(H.isFile()||H.isSymbolicLink())&&H.name.endsWith(".json")&&!H.name.startsWith(".")).map((H)=>H.name).sort();for(let H of Y){let{settings:U,errors:W}=i2(y5($,H));if(Z.push(...W),U&&Object.keys(U).length>0)X=X1(X,U,s1),q=!0}}catch(Y){let H=W0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")g(Y)}return{settings:q?X:null,errors:Z}}function ya(){let{settings:Z}=i2(hX()),X=!!Z&&Object.keys(Z).length>0,q=!1,Q=T2();try{q=N().readdirSync(Q).some((J)=>(J.isFile()||J.isSymbolicLink())&&J.name.endsWith(".json")&&!J.name.startsWith("."))}catch{}return{hasBase:X,hasDropIns:q}}function $V(Z,X){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")P(`Broken symlink or missing file encountered for settings.json at path: ${X}`);else g(Z)}function i2(Z){let X=ZV(Z);if(X)return{settings:X.settings?CX(X.settings):null,errors:X.errors};let q=eI(Z);return XV(Z,q),{settings:q.settings?CX(q.settings):null,errors:q.errors}}function eI(Z){try{let{resolvedPath:X}=F1(N(),Z),q=q1(X);if(q.trim()==="")return{settings:{},errors:[]};let Q=C0(q,!1),J=w5(Q,Z),$=N0().safeParse(Q);if(!$.success){let Y=n6($.error,Z);return{settings:null,errors:[...J,...Y]}}return{settings:$.data,errors:J}}catch(X){return $V(X,Z),{settings:null,errors:[]}}}function oW(Z){switch(Z){case"userSettings":return n2(K0());case"policySettings":case"projectSettings":case"localSettings":return n2(r1());case"flagSettings":{let X=SX();return X?JV(n2(X)):n2(r1())}}}function Zw(){if(QV()||e(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function C5(Z){switch(Z){case"userSettings":return y5(oW(Z),Zw());case"projectSettings":case"localSettings":return y5(oW(Z),YV(Z));case"policySettings":return hX();case"flagSettings":return SX()}}function YV(Z){switch(Z){case"projectSettings":return".claudin/settings.json";case"localSettings":return".claudin/settings.local.json"}}function n(Z){let X=tW(Z);if(X!==void 0)return X;let q=HV(Z);return eW(Z,q),q}function HV(Z){if(Z==="policySettings"){let Q=E4();if(Q&&Object.keys(Q).length>0)return Q;let J=E5();if(Object.keys(J.settings).length>0)return J.settings;let{settings:$}=fX();if($)return $;let Y=v5();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let X=C5(Z),{settings:q}=X?i2(X):{settings:null};if(Z==="flagSettings"){let Q=bX();if(Q){let J=N0().safeParse(Q);if(J.success)return X1(q||{},J.data,s1)}}return q}function Ca(){let Z=E4();if(Z&&Object.keys(Z).length>0)return"remote";let X=E5();if(Object.keys(X.settings).length>0)return y0()==="macos"?"plist":"hklm";let{settings:q}=fX();if(q)return"file";let Q=v5();if(Object.keys(Q.settings).length>0)return"hkcu";return null}function Sa(Z,X){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let q=C5(Z);if(!q)return{error:null};try{N().mkdirSync(JV(q));let Q=HV(Z);if(!Q){let $=null;try{$=q1(q)}catch(Y){if(!M6(Y))throw Y}if($!==null){let Y=C0($);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${q}`)};if(Y&&typeof Y==="object")Q=Y,P(`Using raw settings from ${q} due to validation failure`)}}let J=X1(Q||{},X,($,Y,H,U)=>{if(Y===void 0&&U&&typeof H==="string"){delete U[H];return}if(Array.isArray(Y))return Y;return});if(p$(q),F6(q,m(J,null,2)+`
|
|
88
|
+
`),B2(),Z==="localSettings")j$(YV("localSettings"),r1())}catch(Q){let J=Error(`Failed to read raw settings from ${q}: ${Q}`);return g(J),{error:J}}return{error:null}}function Xw(Z,X){return G$([...Z,...X])}function s1(Z,X){if(Array.isArray(Z)&&Array.isArray(X))return Xw(Z,X);return}function ba(Z){let X=N0().strip().parse(Z),q=["permissions","sandbox","hooks"],Q=[],J={permissions:new Set(["allow","deny","ask","defaultMode","disableBypassPermissionsMode","allowBypassPermissionsMode","disableAutoMode","additionalDirectories"]),sandbox:new Set(["enabled","failIfUnavailable","allowUnsandboxedCommands","network","filesystem","ignoreViolations","excludedCommands","autoAllowBashIfSandboxed","enableWeakerNestedSandbox","enableWeakerNetworkIsolation","ripgrep"]),hooks:new Set(["PreToolUse","PostToolUse","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStop","PreCompact","PostCompact","TeammateIdle","TaskCreated","TaskCompleted"])};for(let $ of Object.keys(X))if(q.includes($)&&X[$]&&typeof X[$]==="object"){let Y=X[$],H=J[$];if(H){for(let U of Object.keys(Y))if(H.has(U))Q.push(`${$}.${U}`)}}else Q.push($);return Q.sort()}function qw(){if(yX)return{settings:{},errors:[]};let Z=Date.now();a6("loadSettingsFromDisk_start"),Y0("info","settings_load_started"),yX=!0;try{let X=qV(),q={};if(X)q=X1(q,X,s1);let Q=[],J=new Set,$=new Set;for(let Y of A2()){if(Y==="policySettings"){let U=null,W=[],G=E4();if(G&&Object.keys(G).length>0){let V=N0().safeParse(G);if(V.success)U=V.data;else W.push(...n6(V.error,"remote managed settings"))}if(!U){let V=E5();if(Object.keys(V.settings).length>0)U=V.settings;W.push(...V.errors)}if(!U){let{settings:V,errors:_}=fX();if(V)U=V;W.push(..._)}if(!U){let V=v5();if(Object.keys(V.settings).length>0)U=V.settings;W.push(...V.errors)}if(U)q=X1(q,U,s1);for(let V of W){let _=`${V.file}:${V.path}:${V.message}`;if(!J.has(_))J.add(_),Q.push(V)}continue}let H=C5(Y);if(H){let U=n2(H);if(!$.has(U)){$.add(U);let{settings:W,errors:G}=i2(H);for(let V of G){let _=`${V.file}:${V.path}:${V.message}`;if(!J.has(_))J.add(_),Q.push(V)}if(W)q=X1(q,W,s1)}}if(Y==="flagSettings"){let U=bX();if(U){let W=N0().safeParse(U);if(W.success)q=X1(q,W.data,s1)}}}return Y0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:$.size,error_count:Q.length}),{settings:q,errors:Q}}finally{yX=!1}}function S5(){let{settings:Z}=Qw();return Z||{}}function fa(){B2();let Z=[];for(let X of A2()){let q=n(X);if(q&&Object.keys(q).length>0)Z.push({source:X,settings:q})}return{effective:S5(),sources:Z}}function Qw(){let Z=sW();if(Z!==null)return Z;let X=qw();return a6("loadSettingsFromDisk_end"),rW(X),X}function ga(){return!!(n("userSettings")?.skipDangerousModePermissionPrompt||n("localSettings")?.skipDangerousModePermissionPrompt||n("flagSettings")?.skipDangerousModePermissionPrompt||n("policySettings")?.skipDangerousModePermissionPrompt)}function ma(){return!!(n("userSettings")?.permissions?.allowBypassPermissionsMode||n("localSettings")?.permissions?.allowBypassPermissionsMode||n("flagSettings")?.permissions?.allowBypassPermissionsMode||n("policySettings")?.permissions?.allowBypassPermissionsMode)}function ua(){{let Z=n("userSettings")?.skipAutoPermissionPrompt,X=n("localSettings")?.skipAutoPermissionPrompt,q=n("flagSettings")?.skipAutoPermissionPrompt,Q=n("policySettings")?.skipAutoPermissionPrompt,J=!!(Z||X||q||Q);return P(`[auto-mode] hasAutoModeOptIn=${J} skipAutoPermissionPrompt: user=${Z} local=${X} flag=${q} policy=${Q}`),J}return!1}function pa(){return n("policySettings")?.useAutoModeDuringPlan!==!1&&n("flagSettings")?.useAutoModeDuringPlan!==!1&&n("userSettings")?.useAutoModeDuringPlan!==!1&&n("localSettings")?.useAutoModeDuringPlan!==!1}function da(){{let Z=K.object({allow:K.array(K.string()).optional(),soft_deny:K.array(K.string()).optional(),deny:K.array(K.string()).optional(),environment:K.array(K.string()).optional()}),X=[],q=[],Q=[];for(let J of["userSettings","localSettings","flagSettings","policySettings"]){let $=n(J);if(!$)continue;let Y=Z.safeParse($.autoMode);if(Y.success){if(Y.data.allow)X.push(...Y.data.allow);if(Y.data.soft_deny)q.push(...Y.data.soft_deny);if(Y.data.environment)Q.push(...Y.data.environment)}}if(X.length>0||q.length>0||Q.length>0)return{...X.length>0&&{allow:X},...q.length>0&&{soft_deny:q},...Q.length>0&&{environment:Q}}}return}function ca(Z){for(let X of A2()){if(X==="policySettings")continue;let q=C5(X);if(!q)continue;try{let{resolvedPath:Q}=F1(N(),q),J=q1(Q);if(!J.trim())continue;let $=C0(J,!1);if($&&typeof $==="object"&&Z in $)return!0}catch(Q){$V(Q,q)}}return!1}var yX=!1,ha;var KV=B(()=>{H$();n0();T6();U$();Z3();M1();H2();c0();C1();v4();W2();F0();O$();f4();p0();V6();z0();nW();L3();d$();m4();aW();K$();l2();wX();ha=S5});import{homedir as Jw}from"os";import{isAbsolute as $w,join as h5,normalize as gX,sep as WV}from"path";function VV(){let Z=process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY;if(e(Z))return!1;if(GV(Z))return!0;if(e(process.env.CLAUDE_CODE_SIMPLE))return!1;if(e(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let X=S5();if(X.autoMemoryEnabled!==void 0)return X.autoMemoryEnabled;return!0}function Xo(){if(!S1("tengu_passport_quail",!1))return!1;return!UV()||S1("tengu_slate_thimble",!1)}function Yw(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return K0()}function BV(Z,X){if(!Z)return;let q=Z;if(X&&(q.startsWith("~/")||q.startsWith("~\\"))){let J=q.slice(2),$=gX(J||".");if($==="."||$==="..")return;q=h5(Jw(),J)}let Q=gX(q).replace(/[/\\]+$/,"");if(!$w(Q)||Q.length<3||/^[A-Za-z]:$/.test(Q)||Q.startsWith("\\\\")||Q.startsWith("//")||Q.includes("\x00"))return;return(Q+WV).normalize("NFC")}function LV(){return BV(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function Uw(){let Z=n("policySettings")?.autoMemoryDirectory??n("flagSettings")?.autoMemoryDirectory??n("localSettings")?.autoMemoryDirectory??n("userSettings")?.autoMemoryDirectory;return BV(Z,!0)}function qo(){return LV()!==void 0}function Gw(){return f5(b5())??b5()}function _V(){return h5(a2(),Kw)}function Qo(Z){return gX(Z).startsWith(a2())}var Hw="memory",Kw="MEMORY.md",a2;var mX=B(()=>{v1();T6();Q3();c0();_2();O4();KV();a2=d(()=>{let Z=LV()??Uw();if(Z)return Z;let X=h5(Yw(),"projects");return(h5(X,d7(Gw()),Hw)+WV).normalize("NFC")},()=>b5())});var RV=p(($o,zV)=>{var k1=H0("constants"),Ww=process.cwd,g5=null,Vw=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!g5)g5=Ww.call(process);return g5};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(m5=process.chdir,process.chdir=function(Z){g5=null,m5.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,m5)}var m5;zV.exports=Bw;function Bw(Z){if(k1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))X(Z);if(!Z.lutimes)q(Z);if(Z.chown=$(Z.chown),Z.fchown=$(Z.fchown),Z.lchown=$(Z.lchown),Z.chmod=Q(Z.chmod),Z.fchmod=Q(Z.fchmod),Z.lchmod=Q(Z.lchmod),Z.chownSync=Y(Z.chownSync),Z.fchownSync=Y(Z.fchownSync),Z.lchownSync=Y(Z.lchownSync),Z.chmodSync=J(Z.chmodSync),Z.fchmodSync=J(Z.fchmodSync),Z.lchmodSync=J(Z.lchmodSync),Z.stat=H(Z.stat),Z.fstat=H(Z.fstat),Z.lstat=H(Z.lstat),Z.statSync=U(Z.statSync),Z.fstatSync=U(Z.fstatSync),Z.lstatSync=U(Z.lstatSync),Z.chmod&&!Z.lchmod)Z.lchmod=function(G,V,_){if(_)process.nextTick(_)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(G,V,_,L){if(L)process.nextTick(L)},Z.lchownSync=function(){};if(Vw==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(G){function V(_,L,z){var R=Date.now(),D=0;G(_,L,function M(k){if(k&&(k.code==="EACCES"||k.code==="EPERM"||k.code==="EBUSY")&&Date.now()-R<60000){if(setTimeout(function(){Z.stat(L,function(F,I){if(F&&F.code==="ENOENT")G(_,L,M);else z(k)})},D),D<100)D+=10;return}if(z)z(k)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,G);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(G){function V(_,L,z,R,D,M){var k;if(M&&typeof M==="function"){var F=0;k=function(I,T,j){if(I&&I.code==="EAGAIN"&&F<10)return F++,G.call(Z,_,L,z,R,D,k);M.apply(this,arguments)}}return G.call(Z,_,L,z,R,D,k)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,G);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(G){return function(V,_,L,z,R){var D=0;while(!0)try{return G.call(Z,V,_,L,z,R)}catch(M){if(M.code==="EAGAIN"&&D<10){D++;continue}throw M}}}(Z.readSync);function X(G){G.lchmod=function(V,_,L){G.open(V,k1.O_WRONLY|k1.O_SYMLINK,_,function(z,R){if(z){if(L)L(z);return}G.fchmod(R,_,function(D){G.close(R,function(M){if(L)L(D||M)})})})},G.lchmodSync=function(V,_){var L=G.openSync(V,k1.O_WRONLY|k1.O_SYMLINK,_),z=!0,R;try{R=G.fchmodSync(L,_),z=!1}finally{if(z)try{G.closeSync(L)}catch(D){}else G.closeSync(L)}return R}}function q(G){if(k1.hasOwnProperty("O_SYMLINK")&&G.futimes)G.lutimes=function(V,_,L,z){G.open(V,k1.O_SYMLINK,function(R,D){if(R){if(z)z(R);return}G.futimes(D,_,L,function(M){G.close(D,function(k){if(z)z(M||k)})})})},G.lutimesSync=function(V,_,L){var z=G.openSync(V,k1.O_SYMLINK),R,D=!0;try{R=G.futimesSync(z,_,L),D=!1}finally{if(D)try{G.closeSync(z)}catch(M){}else G.closeSync(z)}return R};else if(G.futimes)G.lutimes=function(V,_,L,z){if(z)process.nextTick(z)},G.lutimesSync=function(){}}function Q(G){if(!G)return G;return function(V,_,L){return G.call(Z,V,_,function(z){if(W(z))z=null;if(L)L.apply(this,arguments)})}}function J(G){if(!G)return G;return function(V,_){try{return G.call(Z,V,_)}catch(L){if(!W(L))throw L}}}function $(G){if(!G)return G;return function(V,_,L,z){return G.call(Z,V,_,L,function(R){if(W(R))R=null;if(z)z.apply(this,arguments)})}}function Y(G){if(!G)return G;return function(V,_,L){try{return G.call(Z,V,_,L)}catch(z){if(!W(z))throw z}}}function H(G){if(!G)return G;return function(V,_,L){if(typeof _==="function")L=_,_=null;function z(R,D){if(D){if(D.uid<0)D.uid+=4294967296;if(D.gid<0)D.gid+=4294967296}if(L)L.apply(this,arguments)}return _?G.call(Z,V,_,z):G.call(Z,V,z)}}function U(G){if(!G)return G;return function(V,_){var L=_?G.call(Z,V,_):G.call(Z,V);if(L){if(L.uid<0)L.uid+=4294967296;if(L.gid<0)L.gid+=4294967296}return L}}function W(G){if(!G)return!0;if(G.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(G.code==="EINVAL"||G.code==="EPERM")return!0}return!1}}});var DV=p((Yo,FV)=>{var MV=H0("stream").Stream;FV.exports=Lw;function Lw(Z){return{ReadStream:X,WriteStream:q};function X(Q,J){if(!(this instanceof X))return new X(Q,J);MV.call(this);var $=this;this.path=Q,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,J=J||{};var Y=Object.keys(J);for(var H=0,U=Y.length;H<U;H++){var W=Y[H];this[W]=J[W]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){$._read()});return}Z.open(this.path,this.flags,this.mode,function(G,V){if(G){$.emit("error",G),$.readable=!1;return}$.fd=V,$.emit("open",V),$._read()})}function q(Q,J){if(!(this instanceof q))return new q(Q,J);MV.call(this),this.path=Q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,J=J||{};var $=Object.keys(J);for(var Y=0,H=$.length;Y<H;Y++){var U=$[Y];this[U]=J[U]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=Z.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var TV=p((Ho,AV)=>{AV.exports=zw;var _w=Object.getPrototypeOf||function(Z){return Z.__proto__};function zw(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var X={__proto__:_w(Z)};else var X=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(q){Object.defineProperty(X,q,Object.getOwnPropertyDescriptor(Z,q))}),X}});var lX=p((Ko,cX)=>{var i=H0("fs"),Rw=RV(),Mw=DV(),Fw=TV(),u5=H0("util"),V0,d5;if(typeof Symbol==="function"&&typeof Symbol.for==="function")V0=Symbol.for("graceful-fs.queue"),d5=Symbol.for("graceful-fs.previous");else V0="___graceful-fs.queue",d5="___graceful-fs.previous";function Dw(){}function OV(Z,X){Object.defineProperty(Z,V0,{get:function(){return X}})}var t1=Dw;if(u5.debuglog)t1=u5.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))t1=function(){var Z=u5.format.apply(u5,arguments);Z="GFS4: "+Z.split(/\n/).join(`
|
|
89
|
+
GFS4: `),console.error(Z)};if(!i[V0]){if(uX=global[V0]||[],OV(i,uX),i.close=function(Z){function X(q,Q){return Z.call(i,q,function(J){if(!J)jV();if(typeof Q==="function")Q.apply(this,arguments)})}return Object.defineProperty(X,d5,{value:Z}),X}(i.close),i.closeSync=function(Z){function X(q){Z.apply(i,arguments),jV()}return Object.defineProperty(X,d5,{value:Z}),X}(i.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){t1(i[V0]),H0("assert").equal(i[V0].length,0)})}var uX;if(!global[V0])OV(global,i[V0]);cX.exports=pX(Fw(i));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched)cX.exports=pX(i),i.__patched=!0;function pX(Z){Rw(Z),Z.gracefulify=pX,Z.createReadStream=T,Z.createWriteStream=j;var X=Z.readFile;Z.readFile=q;function q(w,x,v){if(typeof x==="function")v=x,x=null;return b(w,x,v);function b(r,E,y,u){return X(r,E,function(h){if(h&&(h.code==="EMFILE"||h.code==="ENFILE"))o6([b,[r,E,y],h,u||Date.now(),Date.now()]);else if(typeof y==="function")y.apply(this,arguments)})}}var Q=Z.writeFile;Z.writeFile=J;function J(w,x,v,b){if(typeof v==="function")b=v,v=null;return r(w,x,v,b);function r(E,y,u,h,U0){return Q(E,y,u,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))o6([r,[E,y,u,h],c,U0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var $=Z.appendFile;if($)Z.appendFile=Y;function Y(w,x,v,b){if(typeof v==="function")b=v,v=null;return r(w,x,v,b);function r(E,y,u,h,U0){return $(E,y,u,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))o6([r,[E,y,u,h],c,U0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=U;function U(w,x,v,b){if(typeof v==="function")b=v,v=0;return r(w,x,v,b);function r(E,y,u,h,U0){return H(E,y,u,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))o6([r,[E,y,u,h],c,U0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var W=Z.readdir;Z.readdir=V;var G=/^v[0-5]\./;function V(w,x,v){if(typeof x==="function")v=x,x=null;var b=G.test(process.version)?function(y,u,h,U0){return W(y,r(y,u,h,U0))}:function(y,u,h,U0){return W(y,u,r(y,u,h,U0))};return b(w,x,v);function r(E,y,u,h){return function(U0,c){if(U0&&(U0.code==="EMFILE"||U0.code==="ENFILE"))o6([b,[E,y,u],U0,h||Date.now(),Date.now()]);else{if(c&&c.sort)c.sort();if(typeof u==="function")u.call(this,U0,c)}}}}if(process.version.substr(0,4)==="v0.8"){var _=Mw(Z);M=_.ReadStream,F=_.WriteStream}var L=Z.ReadStream;if(L)M.prototype=Object.create(L.prototype),M.prototype.open=k;var z=Z.WriteStream;if(z)F.prototype=Object.create(z.prototype),F.prototype.open=I;Object.defineProperty(Z,"ReadStream",{get:function(){return M},set:function(w){M=w},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return F},set:function(w){F=w},enumerable:!0,configurable:!0});var R=M;Object.defineProperty(Z,"FileReadStream",{get:function(){return R},set:function(w){R=w},enumerable:!0,configurable:!0});var D=F;Object.defineProperty(Z,"FileWriteStream",{get:function(){return D},set:function(w){D=w},enumerable:!0,configurable:!0});function M(w,x){if(this instanceof M)return L.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function k(){var w=this;f(w.path,w.flags,w.mode,function(x,v){if(x){if(w.autoClose)w.destroy();w.emit("error",x)}else w.fd=v,w.emit("open",v),w.read()})}function F(w,x){if(this instanceof F)return z.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function I(){var w=this;f(w.path,w.flags,w.mode,function(x,v){if(x)w.destroy(),w.emit("error",x);else w.fd=v,w.emit("open",v)})}function T(w,x){return new Z.ReadStream(w,x)}function j(w,x){return new Z.WriteStream(w,x)}var A=Z.open;Z.open=f;function f(w,x,v,b){if(typeof v==="function")b=v,v=null;return r(w,x,v,b);function r(E,y,u,h,U0){return A(E,y,u,function(c,Nx){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))o6([r,[E,y,u,h],c,U0||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}return Z}function o6(Z){t1("ENQUEUE",Z[0].name,Z[1]),i[V0].push(Z),dX()}var p5;function jV(){var Z=Date.now();for(var X=0;X<i[V0].length;++X)if(i[V0][X].length>2)i[V0][X][3]=Z,i[V0][X][4]=Z;dX()}function dX(){if(clearTimeout(p5),p5=void 0,i[V0].length===0)return;var Z=i[V0].shift(),X=Z[0],q=Z[1],Q=Z[2],J=Z[3],$=Z[4];if(J===void 0)t1("RETRY",X.name,q),X.apply(null,q);else if(Date.now()-J>=60000){t1("TIMEOUT",X.name,q);var Y=q.pop();if(typeof Y==="function")Y.call(null,Q)}else{var H=Date.now()-$,U=Math.max($-J,1),W=Math.min(U*1.2,100);if(H>=W)t1("RETRY",X.name,q),X.apply(null,q.concat([J]));else i[V0].push(Z)}if(p5===void 0)p5=setTimeout(dX,0)}});var wV=p((Uo,IV)=>{function x0(Z,X){if(typeof X==="boolean")X={forever:X};if(this._originalTimeouts=JSON.parse(JSON.stringify(Z)),this._timeouts=Z,this._options=X||{},this._maxRetryTime=X&&X.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}IV.exports=x0;x0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};x0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};x0.prototype.retry=function(Z){if(this._timeout)clearTimeout(this._timeout);if(!Z)return!1;var X=new Date().getTime();if(Z&&X-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(Z);var q=this._timeouts.shift();if(q===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),q=this._timeouts.shift();else return!1;var Q=this,J=setTimeout(function(){if(Q._attempts++,Q._operationTimeoutCb){if(Q._timeout=setTimeout(function(){Q._operationTimeoutCb(Q._attempts)},Q._operationTimeout),Q._options.unref)Q._timeout.unref()}Q._fn(Q._attempts)},q);if(this._options.unref)J.unref();return!0};x0.prototype.attempt=function(Z,X){if(this._fn=Z,X){if(X.timeout)this._operationTimeout=X.timeout;if(X.cb)this._operationTimeoutCb=X.cb}var q=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){q._operationTimeoutCb()},q._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};x0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};x0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};x0.prototype.start=x0.prototype.try;x0.prototype.errors=function(){return this._errors};x0.prototype.attempts=function(){return this._attempts};x0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},X=null,q=0;for(var Q=0;Q<this._errors.length;Q++){var J=this._errors[Q],$=J.message,Y=(Z[$]||0)+1;if(Z[$]=Y,Y>=q)X=J,q=Y}return X}});var NV=p((Tw)=>{var Aw=wV();Tw.operation=function(Z){var X=Tw.timeouts(Z);return new Aw(X,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};Tw.timeouts=function(Z){if(Z instanceof Array)return[].concat(Z);var X={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var q in Z)X[q]=Z[q];if(X.minTimeout>X.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Q=[];for(var J=0;J<X.retries;J++)Q.push(this.createTimeout(J,X));if(Z&&Z.forever&&!Q.length)Q.push(this.createTimeout(J,X));return Q.sort(function($,Y){return $-Y}),Q};Tw.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};Tw.wrap=function(Z,X,q){if(X instanceof Array)q=X,X=null;if(!q){q=[];for(var Q in Z)if(typeof Z[Q]==="function")q.push(Q)}for(var J=0;J<q.length;J++){var $=q[J],Y=Z[$];Z[$]=function(U){var W=Tw.operation(X),G=Array.prototype.slice.call(arguments,1),V=G.pop();G.push(function(_){if(W.retry(_))return;if(_)arguments[0]=W.mainError();V.apply(this,arguments)}),W.attempt(function(){U.apply(Z,G)})}.bind(Z,Y),Z[$].options=X}}});var xV=p((Wo,c5)=>{c5.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")c5.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")c5.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var PV=p((Vo,r6)=>{var l=global.process,e1=function(Z){return Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function"};if(!e1(l))r6.exports=function(){return function(){}};else{if(nX=H0("assert"),Z6=xV(),iX=/^win/i.test(l.platform),s6=H0("events"),typeof s6!=="function")s6=s6.EventEmitter;if(l.__signal_exit_emitter__)Q0=l.__signal_exit_emitter__;else Q0=l.__signal_exit_emitter__=new s6,Q0.count=0,Q0.emitted={};if(!Q0.infinite)Q0.setMaxListeners(1/0),Q0.infinite=!0;r6.exports=function(Z,X){if(!e1(global.process))return function(){};if(nX.equal(typeof Z,"function","a callback must be provided for exit handler"),X6===!1)l5();var q="exit";if(X&&X.alwaysLast)q="afterexit";var Q=function(){if(Q0.removeListener(q,Z),Q0.listeners("exit").length===0&&Q0.listeners("afterexit").length===0)o2()};return Q0.on(q,Z),Q},o2=function(){if(!X6||!e1(global.process))return;X6=!1,Z6.forEach(function(X){try{l.removeListener(X,s2[X])}catch(q){}}),l.emit=r2,l.reallyExit=n5,Q0.count-=1},r6.exports.unload=o2,N1=function(X,q,Q){if(Q0.emitted[X])return;Q0.emitted[X]=!0,Q0.emit(X,q,Q)},s2={},Z6.forEach(function(Z){s2[Z]=function(){if(!e1(global.process))return;var q=l.listeners(Z);if(q.length===Q0.count){if(o2(),N1("exit",null,Z),N1("afterexit",null,Z),iX&&Z==="SIGHUP")Z="SIGINT";l.kill(l.pid,Z)}}}),r6.exports.signals=function(){return Z6},X6=!1,l5=function(){if(X6||!e1(global.process))return;X6=!0,Q0.count+=1,Z6=Z6.filter(function(X){try{return l.on(X,s2[X]),!0}catch(q){return!1}}),l.emit=oX,l.reallyExit=aX},r6.exports.load=l5,n5=l.reallyExit,aX=function(X){if(!e1(global.process))return;l.exitCode=X||0,N1("exit",l.exitCode,null),N1("afterexit",l.exitCode,null),n5.call(l,l.exitCode)},r2=l.emit,oX=function(X,q){if(X==="exit"&&e1(global.process)){if(q!==void 0)l.exitCode=q;var Q=r2.apply(this,arguments);return N1("exit",l.exitCode,null),N1("afterexit",l.exitCode,null),Q}else return r2.apply(this,arguments)}}var nX,Z6,iX,s6,Q0,o2,N1,s2,X6,l5,n5,aX,r2,oX});var vV=p((Nw,sX)=>{var EV=Symbol();function ww(Z,X,q){let Q=X[EV];if(Q)return X.stat(Z,($,Y)=>{if($)return q($);q(null,Y.mtime,Q)});let J=new Date(Math.ceil(Date.now()/1000)*1000+5);X.utimes(Z,J,J,($)=>{if($)return q($);X.stat(Z,(Y,H)=>{if(Y)return q(Y);let U=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(X,EV,{value:U}),q(null,H.mtime,U)})})}function kw(Z){let X=Date.now();if(Z==="s")X=Math.ceil(X/1000)*1000;return new Date(X)}Nw.probe=ww;Nw.getMtime=kw});var hV=p((hw,e2)=>{var Ew=H0("path"),eX=lX(),vw=NV(),yw=PV(),yV=vV(),B1={};function t2(Z,X){return X.lockfilePath||`${Z}.lock`}function Zq(Z,X,q){if(!X.realpath)return q(null,Ew.resolve(Z));X.fs.realpath(Z,q)}function tX(Z,X,q){let Q=t2(Z,X);X.fs.mkdir(Q,(J)=>{if(!J)return yV.probe(Q,X.fs,($,Y,H)=>{if($)return X.fs.rmdir(Q,()=>{}),q($);q(null,Y,H)});if(J.code!=="EEXIST")return q(J);if(X.stale<=0)return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));X.fs.stat(Q,($,Y)=>{if($){if($.code==="ENOENT")return tX(Z,{...X,stale:0},q);return q($)}if(!CV(Y,X))return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));SV(Z,X,(H)=>{if(H)return q(H);tX(Z,{...X,stale:0},q)})})})}function CV(Z,X){return Z.mtime.getTime()<Date.now()-X.stale}function SV(Z,X,q){X.fs.rmdir(t2(Z,X),(Q)=>{if(Q&&Q.code!=="ENOENT")return q(Q);q()})}function i5(Z,X){let q=B1[Z];if(q.updateTimeout)return;if(q.updateDelay=q.updateDelay||X.update,q.updateTimeout=setTimeout(()=>{q.updateTimeout=null,X.fs.stat(q.lockfilePath,(Q,J)=>{let $=q.lastUpdate+X.stale<Date.now();if(Q){if(Q.code==="ENOENT"||$)return rX(Z,q,Object.assign(Q,{code:"ECOMPROMISED"}));return q.updateDelay=1000,i5(Z,X)}if(q.mtime.getTime()!==J.mtime.getTime())return rX(Z,q,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=yV.getMtime(q.mtimePrecision);X.fs.utimes(q.lockfilePath,H,H,(U)=>{let W=q.lastUpdate+X.stale<Date.now();if(q.released)return;if(U){if(U.code==="ENOENT"||W)return rX(Z,q,Object.assign(U,{code:"ECOMPROMISED"}));return q.updateDelay=1000,i5(Z,X)}q.mtime=H,q.lastUpdate=Date.now(),q.updateDelay=null,i5(Z,X)})})},q.updateDelay),q.updateTimeout.unref)q.updateTimeout.unref()}function rX(Z,X,q){if(X.released=!0,X.updateTimeout)clearTimeout(X.updateTimeout);if(B1[Z]===X)delete B1[Z];X.options.onCompromised(q)}function Cw(Z,X,q){X={stale:1e4,update:null,realpath:!0,retries:0,fs:eX,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),Zq(Z,X,(Q,J)=>{if(Q)return q(Q);let $=vw.operation(X.retries);$.attempt(()=>{tX(J,X,(Y,H,U)=>{if($.retry(Y))return;if(Y)return q($.mainError());let W=B1[J]={lockfilePath:t2(J,X),mtime:H,mtimePrecision:U,options:X,lastUpdate:Date.now()};i5(J,X),q(null,(G)=>{if(W.released)return G&&G(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));bV(J,{...X,realpath:!1},G)})})})})}function bV(Z,X,q){X={fs:eX,realpath:!0,...X},Zq(Z,X,(Q,J)=>{if(Q)return q(Q);let $=B1[J];if(!$)return q(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));$.updateTimeout&&clearTimeout($.updateTimeout),$.released=!0,delete B1[J],SV(J,X,q)})}function Sw(Z,X,q){X={stale:1e4,realpath:!0,fs:eX,...X},X.stale=Math.max(X.stale||0,2000),Zq(Z,X,(Q,J)=>{if(Q)return q(Q);X.fs.stat(t2(J,X),($,Y)=>{if($)return $.code==="ENOENT"?q(null,!1):q($);return q(null,!CV(Y,X))})})}function bw(){return B1}yw(()=>{for(let Z in B1){let X=B1[Z].options;try{X.fs.rmdirSync(t2(Z,X))}catch(q){}}});hw.lock=Cw;hw.unlock=bV;hw.check=Sw;hw.getLocks=bw});var gV=p((Bo,fV)=>{var pw=lX();function dw(Z){let X=["mkdir","realpath","stat","rmdir","utimes"],q={...Z};return X.forEach((Q)=>{q[Q]=(...J)=>{let $=J.pop(),Y;try{Y=Z[`${Q}Sync`](...J)}catch(H){return $(H)}$(null,Y)}}),q}function cw(Z){return(...X)=>new Promise((q,Q)=>{X.push((J,$)=>{if(J)Q(J);else q($)}),Z(...X)})}function lw(Z){return(...X)=>{let q,Q;if(X.push((J,$)=>{q=J,Q=$}),Z(...X),q)throw q;return Q}}function nw(Z){if(Z={...Z},Z.fs=dw(Z.fs||pw),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}fV.exports={toPromise:cw,toSync:lw,toSyncOptions:nw}});var uV=p((Lo,x1)=>{var t6=hV(),{toPromise:a5,toSync:o5,toSyncOptions:Xq}=gV();async function mV(Z,X){let q=await a5(t6.lock)(Z,X);return a5(q)}function iw(Z,X){let q=o5(t6.lock)(Z,Xq(X));return o5(q)}function aw(Z,X){return a5(t6.unlock)(Z,X)}function ow(Z,X){return o5(t6.unlock)(Z,Xq(X))}function sw(Z,X){return a5(t6.check)(Z,X)}function rw(Z,X){return o5(t6.check)(Z,Xq(X))}x1.exports=mV;x1.exports.lock=mV;x1.exports.unlock=aw;x1.exports.lockSync=iw;x1.exports.unlockSync=ow;x1.exports.check=sw;x1.exports.checkSync=rw});function Qq(){if(!qq)qq=uV();return qq}function _o(Z,X){return Qq().lock(Z,X)}function pV(Z,X){return Qq().lockSync(Z,X)}function zo(Z,X){return Qq().check(Z,X)}var qq;var dV=()=>{};function Z4(Z){if(Z===void 0)return!1;let X=Z.trim().toLowerCase();return X==="0"||X==="false"||X==="no"||X==="off"||X===""}function ew(){let Z=process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC,X=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&Z4(Z)||X!==void 0&&Z4(X)){if(process.env.DISABLE_TELEMETRY&&!Z4(process.env.DISABLE_TELEMETRY))return"no-telemetry";return"default"}return"essential-traffic"}function Jq(){return ew()==="essential-traffic"}function cV(){if(!Jq())return null;let Z=process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&!Z4(Z))return"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";let X=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(X!==void 0&&!Z4(X))return"ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC";return"claudin-default"}var $q=()=>{};import{dirname as Zk,join as lV}from"path";function iV(Z){return[lV(Z,s5),lV(Z,nV)]}function Xk(Z,X){let[q,Q]=iV(Z);return X(q)?q:Q}function qk(Z,X){return iV(Z).some((q)=>X(q))}function Fo(Z,X){let q=Z;while(!0){if(qk(q,X))return Xk(q,X);let Q=Zk(q);if(Q===q)return null;q=Q}}function Do(Z){return Z===s5||Z===nV}var s5="AGENTS.md",nV="CLAUDE.md";var aV=()=>{};var Qk,Jk;var oV=B(()=>{Qk=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","os_native","notifications_disabled"],Jk=["normal","vim"]});var qB={};WX(qB,{validateTeamMemWritePath:()=>Kk,validateTeamMemKey:()=>Uk,isTeamMemoryEnabled:()=>tV,isTeamMemPath:()=>XB,isTeamMemFile:()=>Gk,getTeamMemPath:()=>X4,getTeamMemEntrypoint:()=>Hk,PathTraversalError:()=>_0});import{lstat as $k,realpath as rV}from"fs/promises";import{dirname as sV,join as r5,resolve as Yq,sep as Hq}from"path";function Yk(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path key: "${Z}"`);let X;try{X=decodeURIComponent(Z)}catch{X=Z}if(X!==Z&&(X.includes("..")||X.includes("/")))throw new _0(`URL-encoded traversal in path key: "${Z}"`);let q=Z.normalize("NFKC");if(q!==Z&&(q.includes("..")||q.includes("/")||q.includes("\\")||q.includes("\x00")))throw new _0(`Unicode-normalized traversal in path key: "${Z}"`);if(Z.includes("\\"))throw new _0(`Backslash in path key: "${Z}"`);if(Z.startsWith("/"))throw new _0(`Absolute path key: "${Z}"`);return Z}function tV(){if(!VV())return!1;return S1("tengu_herring_clock",!0)}function X4(){return(r5(a2(),"team")+Hq).normalize("NFC")}function Hk(){return r5(a2(),"team","MEMORY.md")}async function eV(Z){let X=[],q=Z;for(let Q=sV(q);q!==Q;Q=sV(q))try{let J=await rV(q);return X.length===0?J:r5(J,...X.reverse())}catch(J){let $=W0(J);if($==="ENOENT")try{if((await $k(q)).isSymbolicLink())throw new _0(`Dangling symlink detected (target does not exist): "${q}"`)}catch(Y){if(Y instanceof _0)throw Y}else if($==="ELOOP")throw new _0(`Symlink loop detected in path: "${q}"`);else if($!=="ENOTDIR"&&$!=="ENAMETOOLONG")throw new _0(`Cannot verify path containment (${$}): "${q}"`);X.push(q.slice(Q.length+Hq.length)),q=Q}return Z}async function ZB(Z){let X;try{X=await rV(X4().replace(/[/\\]+$/,""))}catch(q){let Q=W0(q);if(Q==="ENOENT"||Q==="ENOTDIR")return!0;return!1}if(Z===X)return!0;return Z.startsWith(X+Hq)}function XB(Z){let X=Yq(Z),q=X4();return X.startsWith(q)}async function Kk(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path: "${Z}"`);let X=Yq(Z),q=X4();if(!X.startsWith(q))throw new _0(`Path escapes team memory directory: "${Z}"`);let Q=await eV(X);if(!await ZB(Q))throw new _0(`Path escapes team memory directory via symlink: "${Z}"`);return X}async function Uk(Z){Yk(Z);let X=X4(),q=r5(X,Z),Q=Yq(q);if(!Q.startsWith(X))throw new _0(`Key escapes team memory directory: "${Z}"`);let J=await eV(Q);if(!await ZB(J))throw new _0(`Key escapes team memory directory via symlink: "${Z}"`);return Q}function Gk(Z){return tV()&&XB(Z)}var _0;var QB=B(()=>{Q3();C1();mX();_0=class _0 extends Error{constructor(Z){super(Z);this.name="PathTraversalError"}}});import{randomBytes as Wk}from"crypto";import{unwatchFile as Vk,watchFile as Bk}from"fs";import{basename as Bq,dirname as Lq,join as j0,resolve as Z7}from"path";function L1(){return{numStartups:0,installMethod:void 0,autoUpdates:void 0,theme:"dark",preferredNotifChannel:"auto",verbose:!1,editorMode:"normal",autoCompactEnabled:!0,collapseSubagentProgress:!0,summarizeSubagentResult:!1,thinkingHistoryRedactionEnabled:!0,narrationHistoryRedactionEnabled:!0,toolResultSummarizerEnabled:!0,showTurnDuration:!0,showCacheStats:"compact",hasSeenTasksHint:!1,hasUsedStash:!1,hasUsedBackgroundTask:!1,queuedCommandUpHintCount:0,diffTool:"auto",customApiKeyResponses:{approved:[],rejected:[]},env:{},tipsHistory:{},memoryUsageCount:0,promptQueueUseCount:0,btwUseCount:0,todoFeatureEnabled:!0,showExpandedTodos:!1,messageIdleNotifThresholdMs:60000,autoConnectIde:!1,autoInstallIdeExtension:!0,fileCheckpointingEnabled:!0,terminalProgressBarEnabled:!0,cachedStatsigGates:{},cachedDynamicConfigs:{},cachedGrowthBookFeatures:{},respectGitignore:!0,copyFullResponse:!1,providerProfiles:[],openaiAdditionalModelOptionsCacheByProfile:{},knowledgeGraphEnabled:!0,inlineImagesMode:"auto",autoBackgroundAgentsEnabled:!0}}function Xs(Z){return _k.includes(Z)}function qs(){KB=!1}function Qs(){return KB||=Rk()}function Rk(){if(YB())return!0;let Z=J0(),X=Rq();if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let Q=y1(s());while(!0){if(Z.projects?.[Q]?.hasTrustDialogAccepted)return!0;let $=y1(Z7(Q,".."));if($===Q)break;Q=$}return!1}function Js(Z){let X=J0(),q=y1(Z7(Z));while(!0){if(X.projects?.[q]?.hasTrustDialogAccepted)return!0;let Q=y1(Z7(q,".."));if(Q===q)return!1;q=Q}}function $s(){return}function Ys(){return}function Hs(Z){return zk.includes(Z)}function $7(Z){let X=t0.config;if(!X)return!1;let q=X.oauthAccount!==void 0&&Z.oauthAccount===void 0,Q=X.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return q||Q}function UB(Z){return Wq.add(Z),()=>Wq.delete(Z)}function X7(){for(let Z of Wq)try{Z()}catch{}}function M0(Z){let X=null;try{if(WB(L0(),L1,(Q)=>{let J=Z(Q);if(J===Q)return Q;return X={...J,projects:JB(Q.projects)},X})&&X)q7(X),X7()}catch(q){let Q=W0(q);if(Q==="EACCES"||Q==="EPERM"||Q==="EROFS"){P(`Skipping global config write due to permission error: ${q}`,{level:"error"});return}P(`Failed to save config with lock: ${q}`,{level:"error"});let J=Q6(L0(),L1);if($7(J)){P("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),l0("tengu_config_auth_loss_prevented",{});return}let $=Z(J);if($===J)return;X={...$,projects:JB(J.projects)},GB(L0(),X,J7),q7(X),X7()}}function Ks(){return _q}function Fk(){let Z=q4+e5;if(Z>0)l0("tengu_config_cache_stats",{cache_hits:q4,cache_misses:e5,hit_rate:q4/Z});q4=0,e5=0}function Vq(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 JB(Z){if(!Z)return Z;let X={},q=!1;for(let[Q,J]of Object.entries(Z)){let $=J;if($.history!==void 0){q=!0;let{history:Y,...H}=$;X[Q]=H}else X[Q]=J}return q?X:Z}function Ak(){if(Gq)return;Gq=!0;let Z=L0();Bk(Z,{interval:Dk,persistent:!1},(X)=>{if(X.mtimeMs<=t0.mtime)return;N().readFile(Z,{encoding:"utf-8"}).then((q)=>{if(X.mtimeMs<=t0.mtime)return;let Q=C0(d0(q));if(Q===null||typeof Q!=="object")return;t0={config:Vq({...L1(),...Q}),mtime:X.mtimeMs},P1={mtime:X.mtimeMs,size:X.size}}).catch(()=>{})}),J4(async()=>{Vk(Z),Gq=!1})}function q7(Z){t0={config:Z,mtime:Date.now()},P1=null}function J0(){if(t0.config)return q4++,t0.config;e5++;try{let Z=null;try{Z=N().statSync(L0())}catch{}let X=Vq(Q6(L0(),L1));return t0={config:X,mtime:Z?.mtimeMs??Date.now()},P1=Z?{mtime:Z.mtimeMs,size:Z.size}:null,Ak(),X}catch{return Vq(Q6(L0(),L1))}}function Gs(){let Z=J0().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function Ws(Z){let X=J0();if(X.customApiKeyResponses?.approved?.includes(Z))return"approved";if(X.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function GB(Z,X,q){let Q=Lq(Z);N().mkdirSync(Q);let $=f7(X,(Y,H)=>m(Y)!==m(q[H]));if(F6(Z,m($,null,2),{encoding:"utf-8",mode:384}),Z===L0())_q++}function WB(Z,X,q){let Q=X(),J=Lq(Z),$=N();$.mkdirSync(J);let Y;try{let H=`${Z}.lock`,U=Date.now();Y=pV(Z,{lockfilePath:H,onCompromised:(L)=>{P(`Config lock compromised: ${L}`,{level:"error"})}});let W=Date.now()-U;if(W>100)P("Lock acquisition took longer than expected - another Claude instance may be running"),l0("tengu_config_lock_contention",{lock_time_ms:W});if(P1&&Z===L0())try{let L=$.statSync(Z);if(L.mtimeMs!==P1.mtime||L.size!==P1.size)l0("tengu_config_stale_write",{read_mtime:P1.mtime,write_mtime:L.mtimeMs,read_size:P1.size,write_size:L.size})}catch(L){if(W0(L)!=="ENOENT")throw L}let G=Q6(Z,X);if(Z===L0()&&$7(G))return P("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claudin/config.json. See GH #3117.",{level:"error"}),l0("tengu_config_auth_loss_prevented",{}),!1;let V=q(G);if(V===G)return!1;let _=f7(V,(L,z)=>m(L)!==m(Q[z]));try{let L=Bq(Z),z=zq();try{$.mkdirSync(z)}catch(j){if(W0(j)!=="EEXIST")throw j}let R=60000,D=$.readdirStringSync(z).filter((j)=>j.startsWith(`${L}.backup.`)).sort().reverse(),M=D[0],k=M?Number(M.split(".backup.").pop()):0,F=Number.isNaN(k)||Date.now()-k>=R;if(F){let j=j0(z,`${L}.backup.${Date.now()}`);$.copyFileSync(Z,j)}let I=5,T=F?$.readdirStringSync(z).filter((j)=>j.startsWith(`${L}.backup.`)).sort().reverse():D;for(let j of T.slice(I))try{$.unlinkSync(j0(z,j))}catch{}}catch(L){if(W0(L)!=="ENOENT")P(`Failed to backup config: ${L}`,{level:"error"})}if(F6(Z,m(_,null,2),{encoding:"utf-8",mode:384}),Z===L0())_q++;return!0}finally{if(Y)Y()}}function Vs(){return Q7}function Bs(){if(Q7)return;let Z=Date.now();Y0("info","enable_configs_started"),Q7=!0,Q6(L0(),L1,!0),Y0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function zq(){return j0(K0(),"backups")}function $B(Z){let X=N(),q=Bq(Z),Q=zq();try{let Y=X.readdirStringSync(Q).filter((H)=>H.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return j0(Q,Y)}catch{}let J=Lq(Z);try{let Y=X.readdirStringSync(J).filter((U)=>U.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return j0(J,Y);let H=`${Z}.backup`;try{return X.statSync(H),H}catch{}}catch{}return null}function Q6(Z,X,q){if(!Q7)throw Error("Config accessed before allowed.");let Q=N();try{let J=Q.readFileSync(Z,{encoding:"utf-8"});try{let $=X0(d0(J));return{...X(),...$}}catch($){let Y=$ instanceof Error?$.message:String($);throw new t5(Y,Z,X())}}catch(J){if(W0(J)==="ENOENT"){let Y=$B(Z);if(Y)process.stderr.write(`
|
|
90
|
+
Claude configuration file not found at: ${Z}
|
|
91
|
+
A backup file exists at: ${Y}
|
|
92
|
+
You can manually restore it by running: cp "${Y}" "${Z}"
|
|
93
|
+
|
|
94
|
+
`);return X()}if(J instanceof t5&&q)throw J;if(J instanceof t5){if(P(`Config file corrupted, resetting to defaults: ${J.message}`,{level:"error"}),!Kq){Kq=!0;try{g(J);let L=!1;try{Q.statSync(`${Z}.backup`),L=!0}catch{}l0("tengu_config_parse_error",{has_backup:L})}finally{Kq=!1}}process.stderr.write(`
|
|
95
|
+
Claude configuration file at ${Z} is corrupted: ${J.message}
|
|
96
|
+
`);let Y=Bq(Z),H=zq();try{Q.mkdirSync(H)}catch(L){if(W0(L)!=="EEXIST")throw L}let U=Q.readdirStringSync(H).filter((L)=>L.startsWith(`${Y}.corrupted.`)),W,G=!1,V=Q.readFileSync(Z,{encoding:"utf-8"});for(let L of U)try{let z=Q.readFileSync(j0(H,L),{encoding:"utf-8"});if(V===z){G=!0;break}}catch{}if(!G){W=j0(H,`${Y}.corrupted.${Date.now()}`);try{Q.copyFileSync(Z,W),P(`Corrupted config backed up to: ${W}`,{level:"error"})}catch{}}let _=$B(Z);if(W)process.stderr.write(`The corrupted file has been backed up to: ${W}
|
|
97
|
+
`);else if(G)process.stderr.write(`The corrupted file has already been backed up.
|
|
98
|
+
`);if(_)process.stderr.write(`A backup file exists at: ${_}
|
|
99
|
+
You can manually restore it by running: cp "${_}" "${Z}"
|
|
100
|
+
|
|
101
|
+
`);else process.stderr.write(`
|
|
102
|
+
`)}return X()}}function Rq(){let Z=r1(),X=q6.get(Z);if(X!==void 0)return q6.delete(Z),q6.set(Z,X),X;let q=f5(Z),Q=q?y1(q):y1(Z7(Z));if(q6.size>=Tk){let J=q6.keys().next().value;if(J!==void 0)q6.delete(J)}return q6.set(Z,Q),Q}function Y7(){let Z=Rq(),X=J0();if(!X.projects)return e6;let q=X.projects[Z]??e6;if(typeof q.allowedTools==="string")q.allowedTools=C0(q.allowedTools)??[];return q}function Mq(Z){let X=Rq(),q=null;try{if(WB(L0(),L1,(J)=>{let $=J.projects?.[X]??e6,Y=Z($);if(Y===$)return J;return q={...J,projects:{...J.projects,[X]:Y}},q})&&q)q7(q),X7()}catch(Q){P(`Failed to save config with lock: ${Q}`,{level:"error"});let J=Q6(L0(),L1);if($7(J)){P("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),l0("tengu_config_auth_loss_prevented",{});return}let $=J.projects?.[X]??e6,Y=Z($);if(Y===$)return;q={...J,projects:{...J.projects,[X]:Y}},GB(L0(),q,J7),q7(q),X7()}}function jk(){return Ok()!==null}function Ls(){return jk()&&!e(process.env.FORCE_AUTOUPDATE_PLUGINS)}function _s(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function Ok(){if(e(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let Z=cV();if(Z)return{type:"env",envVar:Z};let X=J0();if(X.autoUpdates===!1&&(X.installMethod!=="native"||X.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function zs(){let Z=J0();if(Z.userID)return Z.userID;let X=Wk(32).toString("hex");return M0((q)=>({...q,userID:X})),X}function Rs(){if(!J0().firstStartTime){let X=new Date().toISOString();M0((q)=>({...q,firstStartTime:q.firstStartTime??X}))}}function Ms(Z){let X=r1();switch(Z){case"User":return j0(K0(),"CLAUDE.md");case"Local":return j0(X,"CLAUDE.local.md");case"Project":return j0(X,s5);case"Managed":return j0(D1(),"CLAUDE.md");case"AutoMem":return _V()}return Lk.getTeamMemEntrypoint()}function Fs(){return j0(D1(),".claudin","rules")}function Ds(){return j0(K0(),"rules")}function js(Z){t0.config=Z,t0.mtime=Z?Date.now():0}var Lk,Kq=!1,e6,Zs,J7,_k,zk,KB=!1,Mk,Uq,Wq,t0,P1=null,q4=0,e5=0,_q=0,Us=20,Dk=1000,Gq=!1,Q7=!1,Tk=32,q6,As,Ts;var Fq=B(()=>{tQ();T6();mX();R$();Z1();HB();M1();H2();GX();c0();C1();v4();F0();_2();f4();P4();dV();p0();O4();$q();m4();aV();z0();oV();Lk=(QB(),Q4(qB)),e6={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},Zs=["off","compact","full"];J7=L1(),_k=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","narrationHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","lspRecommendationDisabled","lspRecommendationNeverPlugins","lspRecommendationIgnoredCount","lspWorkspaceEditConfirmThreshold","lspWorkspaceEditMaxFiles","lspWorkspaceEditMaxBytes","copyFullResponse","copyOnSelect","flickerFreeMode","permissionExplainerEnabled","prStatusFooterEnabled","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled","autoBackgroundAgentsEnabled","inlineImagesMode"];zk=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"];Mk={...J7,autoUpdates:!1,knowledgeGraphEnabled:!0};Uq={...e6};Wq=new Set;t0={config:null,mtime:0};J4(async()=>{Fk()});q6=new Map;As=Q6,Ts=$7});function H7(Z){return Z.split(/[;,]/).map((X)=>X.trim()).filter((X)=>X.length>0)}function VB(Z){let X=H7(Z);return X.length>0?X[0]:Z.trim()}var Dq=()=>{};import{randomBytes as Ik}from"crypto";function Z2(Z){return Z?.trim()??""}function B0(Z){let X=Z2(Z);return X.length>0?X:void 0}function wk(Z){return Z2(Z).replace(/\/+$/,"")}function kk(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function Nk(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function xk(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let X={};for(let[q,Q]of Object.entries(Z)){let J=Z2(q),$=typeof Q==="string"?Q.trim():"";if(J.length>0&&$.length>0)X[J]=$}return Object.keys(X).length>0?X:void 0}function Pk(Z){if(!Z||typeof Z!=="object")return;let X={},q=B0(Z.codexAuthPath);if(q)X.codexAuthPath=q;let Q=B0(Z.codexAccountId);if(Q)X.codexAccountId=Q;let J=B0(Z.githubToken);if(J)X.githubToken=J;let $=B0(Z.awsRegion);if($)X.awsRegion=$;let Y=B0(Z.gcpProject);if(Y)X.gcpProject=Y;let H=B0(Z.gcpRegion);if(H)X.gcpRegion=H;let U=B0(Z.azureResource);if(U)X.azureResource=U;let W=xk(Z.customHeaders);if(W)X.customHeaders=W;let G=Nk(Z.reasoningEffort);if(G)X.reasoningEffort=G;return Object.keys(X).length>0?X:void 0}function RB(Z){let X=Z2(Z.id),q=Z2(Z.name),Q=kk(Z.provider),J=wk(Z.baseUrl),$=Z2(Z.model);if(!X||!q||!J||Q!=="anthropic"&&!$)return null;let H={id:X,name:q,provider:Q,baseUrl:J,model:$,apiKey:B0(Z.apiKey)},U=Pk(Z.extras);if(U)H.extras=U;return H}function Ek(Z){let X=new Set,q=[];for(let Q of Z??[]){let J=RB(Q);if(!J||X.has(J.id))continue;X.add(J.id),q.push(J)}return q}function vk(){return`provider_${Ik(6).toString("hex")}`}function MB(Z,X=vk()){return RB({id:X,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function FB(Z,X=J0()){return X.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function Ps(Z){switch(Z){case"anthropic":return{provider:"anthropic",name:"Anthropic",baseUrl:"https://api.anthropic.com",model:"",apiKey:"",requiresApiKey:!0};case"openai":return{provider:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"gpt-5.4",apiKey:"",requiresApiKey:!0};case"kimi-code":return{provider:"openai",name:"Moonshot AI - Kimi Code",baseUrl:"https://api.kimi.com/coding/v1",model:"kimi-for-coding",apiKey:"",requiresApiKey:!0};case"moonshotai":return{provider:"openai",name:"Moonshot AI - API",baseUrl:"https://api.moonshot.ai/v1",model:"kimi-k2.5",apiKey:"",requiresApiKey:!0};case"deepseek":return{provider:"openai",name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-v4-flash, deepseek-v4-pro, deepseek-chat, deepseek-reasoner",apiKey:"",requiresApiKey:!0};case"gemini":return{provider:"gemini",name:"Google Gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",model:"gemini-3-flash-preview",apiKey:"",requiresApiKey:!0};case"mistral":return{provider:"mistral",name:"Mistral",baseUrl:"https://api.mistral.ai/v1",model:"devstral-latest",apiKey:"",requiresApiKey:!0};case"together":return{provider:"openai",name:"Together AI",baseUrl:"https://api.together.xyz/v1",model:"Qwen/Qwen3.5-9B",apiKey:"",requiresApiKey:!0};case"groq":return{provider:"openai",name:"Groq",baseUrl:"https://api.groq.com/openai/v1",model:"llama-3.3-70b-versatile",apiKey:"",requiresApiKey:!0};case"azure-openai":return{provider:"openai",name:"Azure OpenAI",baseUrl:"https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1",model:"YOUR-DEPLOYMENT-NAME",apiKey:"",requiresApiKey:!0};case"openrouter":return{provider:"openai",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",model:"openai/gpt-5-mini",apiKey:"",requiresApiKey:!0};case"lmstudio":return{provider:"openai",name:"LM Studio",baseUrl:"http://localhost:1234/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"dashscope-cn":return{provider:"openai",name:"Alibaba Coding Plan (China)",baseUrl:"https://coding.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"dashscope-intl":return{provider:"openai",name:"Alibaba Coding Plan",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"custom":return{provider:"openai",name:"Custom OpenAI-compatible",baseUrl:BB,model:LB,apiKey:"",requiresApiKey:!1};case"nvidia-nim":return{provider:"openai",name:"NVIDIA NIM",baseUrl:"https://integrate.api.nvidia.com/v1",model:"nvidia/llama-3.1-nemotron-70b-instruct",apiKey:"",requiresApiKey:!0};case"minimax":return{provider:"openai",name:"MiniMax",baseUrl:"https://api.minimax.io/v1",model:"MiniMax-M2.5",apiKey:"",requiresApiKey:!0};case"atomic-chat":return{provider:"openai",name:"Atomic Chat",baseUrl:"http://127.0.0.1:1337/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"bankr":return{provider:"openai",name:"Bankr",baseUrl:"https://llm.bankr.bot/v1",model:"claude-opus-4.6",apiKey:"",requiresApiKey:!0};case"bedrock":return{provider:"bedrock",name:"AWS Bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"vertex":return{provider:"vertex",name:"Google Vertex AI",baseUrl:"https://us-central1-aiplatform.googleapis.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"foundry":return{provider:"foundry",name:"Azure AI Foundry",baseUrl:"https://YOUR-RESOURCE-NAME.services.ai.azure.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"opencode-zen":return{provider:"openai",name:"OpenCode Zen",baseUrl:"https://opencode.ai/zen/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"opencode-go":return{provider:"openai",name:"OpenCode GO",baseUrl:"https://opencode.ai/zen/go/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:BB,model:LB,apiKey:"",requiresApiKey:!1}}}function f0(Z=J0()){return Ek(Z.providerProfiles)}function Es(Z=J0()){return f0(Z).length>0}function _1(Z=J0()){let X=f0(Z);if(X.length===0)return;let q=B0(Y7().activeProviderProfileId);if(q){let J=X.find(($)=>$.id===q);if(J)return J}let Q=B0(Z.activeProviderProfileId);return X.find((J)=>J.id===Q)??X[0]}function vs(){let Z=B0(Y7().activeProviderProfileId);if(!Z)return;return f0().some((q)=>q.id===Z)?Z:void 0}function yk(){return B0(Y7().activeProviderProfileId)}function ys(){return yk()!==void 0}function Ck(){return B0(J0().activeProviderProfileId)}function Cs(Z,X){let q=MB(Z);if(!q)return null;let Q=X?.makeActive??!0;if(M0((J)=>{let Y=[...f0(J),q],H=B0(J.activeProviderProfileId),U=Q||!H||!Y.some((W)=>W.id===H)?q.id:H;return{...J,providerProfiles:Y,activeProviderProfileId:U}}),Ck()===q.id)bk(q.id),hk();return q}function Ss(Z,X){let q=MB(X,Z);if(!q)return null;let Q=!1;if(M0((J)=>{let $=f0(J),Y=$.findIndex((_)=>_.id===Z);if(Y<0)return J;Q=!0;let H=[...$];H[Y]=q;let U={...J.openaiAdditionalModelOptionsCacheByProfile??{}};delete U[Z];let W=B0(J.activeProviderProfileId),G=W&&H.some((_)=>_.id===W)?W:H[0]?.id;return{...J,providerProfiles:H,activeProviderProfileId:G,openaiAdditionalModelOptionsCacheByProfile:U,openaiAdditionalModelOptionsCache:G===Z?[]:J.openaiAdditionalModelOptionsCache}}),!Q)return null;return q}function bs(Z){let X=B0(Z);if(!X)return null;let q=_1();if(!q)return null;if(H7(q.model).includes(X))return q;M0(($)=>{let Y=f0($),H=Y.findIndex((G)=>G.id===q.id);if(H<0)return $;let U=Y[H];if(U.model===X)return $;let W=[...Y];return W[H]={...U,model:X},{...$,providerProfiles:W}});let J=_1();if(!J||J.id!==q.id)return null;return J}function hs(){let Z=_1();if(!Z)return;M0((X)=>{let q=f0(X),Q=q.findIndex((Y)=>Y.id===Z.id);if(Q<0)return X;let J=q[Q];if(!J.model)return X;let $=[...q];return $[Q]={...J,model:""},{...X,providerProfiles:$}})}function Sk(Z){let X=H7(Z.model);if(X.length===0)return[];return X.map((q)=>({value:q,label:q,description:`Provider: ${Z.name}`}))}function Aq(Z,X){let q=Sk(Z);return{openaiAdditionalModelOptionsCache:q.length>0?q:FB(Z.id,X),openaiAdditionalModelOptionsCacheByProfile:{...X.openaiAdditionalModelOptionsCacheByProfile??{},[Z.id]:q.length>0?q:X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[]}}}function bk(Z){let X=J0(),Q=f0(X).find((J)=>J.id===Z);if(!Q)return null;return M0((J)=>({...J,activeProviderProfileId:Z,...Aq(Q,J)})),Q}function fs(Z){if(Z===null){Mq(($)=>({...$,activeProviderProfileId:void 0,activeModelForProject:void 0}));let J=_1();if(J)_B(J);return null}let q=f0().find((J)=>J.id===Z);if(!q)return null;let Q=!1;if(Mq((J)=>{if(!f0().some((H)=>H.id===Z))return Q=!0,J;let Y={...J,activeProviderProfileId:Z};if(J.activeProviderProfileId!==Z)Y.activeModelForProject=void 0;return Y}),Q)return null;return _B(q),q}function _B(Z){let X=J0(),q=Aq(Z,X),Q=X.openaiAdditionalModelOptionsCache??[],J=X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[],$=q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[];if(zB(Q,q.openaiAdditionalModelOptionsCache??[])&&zB(J,$))return;M0((Y)=>({...Y,...Aq(Z,Y)}))}function zB(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 gs(Z){let X=!1,q;return M0((Q)=>{let J=f0(Q);if(!J.find((L)=>L.id===Z))return Q;X=!0;let Y=J.filter((L)=>L.id!==Z),H=B0(Q.activeProviderProfileId),W=!H||H===Z||!Y.some((L)=>L.id===H)?Y[0]?.id:H;if(W)q=Y.find((L)=>L.id===W)??Y[0];let G={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete G[Z];let _=(Q.projects?Object.values(Q.projects).some((L)=>L?.activeProviderProfileId===Z):!1)&&Q.projects?Object.fromEntries(Object.entries(Q.projects).map(([L,z])=>{if(z?.activeProviderProfileId===Z){let{activeProviderProfileId:R,activeModelForProject:D,...M}=z;return[L,M]}return[L,z]})):Q.projects;return{...Q,providerProfiles:Y,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:G,openaiAdditionalModelOptionsCache:W?FB(W,{...Q,openaiAdditionalModelOptionsCacheByProfile:G}):[],projects:_}}),{removed:X,activeProfileId:q?.id}}function ms(Z=J0()){let X=_1(Z);if(!X)return Z.openaiAdditionalModelOptionsCache??[];let q=Z.openaiAdditionalModelOptionsCacheByProfile?.[X.id];if(q)return q;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function us(Z){let X=_1();if(!X){M0((q)=>({...q,openaiAdditionalModelOptionsCache:Z}));return}M0((q)=>({...q,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...q.openaiAdditionalModelOptionsCacheByProfile??{},[X.id]:Z}}))}function hk(){let Z=_1();if(!Z){M0((X)=>({...X,openaiAdditionalModelOptionsCache:[]}));return}M0((X)=>{let q={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete q[Z.id],{...X,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:q}})}var BB="http://localhost:11434/v1",LB="llama3.1:8b";var DB=B(()=>{Fq();Dq()});function K7(Z,X){return{name:`${Z.name}-with-${X.name}-fallback`,read(){let q=Z.read();if(q!==null&&q!==void 0)return q;return X.read()||{}},async readAsync(){let q=await Z.readAsync();if(q!==null&&q!==void 0)return q;return await X.readAsync()||{}},update(q){let Q=Z.read(),J=Z.update(q);if(J.success){if(Q===null)X.delete();return J}let $=X.update(q);if($.success){if(Q!==null)Z.delete();return{success:!0,warning:$.warning}}return{success:!1}},delete(){let q=Z.delete(),Q=X.delete();return q||Q}}}var AB=()=>{};function U7(Z,X,q=10*jB*TB){let W=[];try{let Q;if(X===void 0)Q={};else if(X instanceof AbortSignal)Q={abortSignal:X,timeout:q};else Q=X;let{abortSignal:J,timeout:$=10*jB*TB,input:Y,stdio:H=["ignore","pipe","pipe"]}=Q;J?.throwIfAborted();const U=B6(W,A4`exec: ${Z.slice(0,200)}`,0);try{let L=k0(Z,{env:process.env,maxBuffer:1e6,timeout:$,cwd:s(),stdio:H,shell:!0,reject:!1,input:Y});if(!L.stdout)return null;return L.stdout.trim()||null}catch{return null}}catch(G){var V=G,_=1}finally{L6(W,V,_)}}var TB=1000,jB=60;var Tq=B(()=>{m6();Z1();z0()});import{createHash as fk}from"crypto";import{userInfo as gk}from"os";function J6(Z=""){let X=K0(),Q=!process.env.CLAUDIN_CONFIG_DIR?"":`-${fk("sha256").update(X).digest("hex").substring(0,8)}`;return`Claude Code${OB().OAUTH_FILE_SUFFIX}${Z}${Q}`}function $4(Z=""){return J6(Z)}function O0(){try{return process.env.USER||gk().username}catch{return"claude-code-user"}}function Oq(){$0.cache={data:null,cachedAt:0},$0.generation++,$0.readInFlight=null}function es(Z){if($0.cache.cachedAt!==0)return;let X=null;if(Z)try{X=JSON.parse(Z)}catch{return}$0.cache={data:X,cachedAt:Date.now()}}var g0="-credentials",jq=30000,$0;var G7=B(()=>{CG();c0();$0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function uk(){try{let Z=$4(g0),X=O0(),{stdout:q,code:Q}=await a("security",["find-generic-password","-a",X,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(Q===0&&q)return X0(q.trim())}catch(Z){}return null}function Hr(){if(X2!==void 0)return X2;if(process.platform!=="darwin")return X2=!1,!1;try{X2=k0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{X2=!1}return X2}var mk=4032,Iq,X2;var IB=B(()=>{m6();M1();C4();Tq();z0();G7();Iq={name:"keychain",read(){let Z=$0.cache;if(Date.now()-Z.cachedAt<jq)return Z.data;try{let X=$4(g0),q=O0(),Q=U7(`security find-generic-password -a "${q}" -w -s "${X}"`);if(Q){let J=X0(Q);return $0.cache={data:J,cachedAt:Date.now()},J}}catch(X){}if(Z.data!==null)return P("[keychain] read failed; serving stale cache",{level:"warn"}),$0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return $0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=$0.cache;if(Date.now()-Z.cachedAt<jq)return Z.data;if($0.readInFlight)return $0.readInFlight;let X=$0.generation,q=uk().then((Q)=>{if(X===$0.generation){if(Q===null&&Z.data!==null)P("[keychain] readAsync failed; serving stale cache",{level:"warn"});let J=Q??Z.data;return $0.cache={data:J,cachedAt:Date.now()},$0.readInFlight=null,J}return Q});return $0.readInFlight=q,q},update(Z){Oq();try{let X=$4(g0),q=O0(),Q=m(Z),J=Buffer.from(Q,"utf-8").toString("hex"),$=`add-generic-password -U -a "${q}" -s "${X}" -X "${J}"
|
|
103
|
+
`,Y;if($.length<=mk)Y=k0("security",["-i"],{input:$,stdio:["pipe","pipe","pipe"],reject:!1});else P(`Keychain payload (${Q.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=k0("security",["add-generic-password","-U","-a",q,"-s",X,"-X",J],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return $0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(X){return{success:!1}}},delete(){Oq();try{let Z=$4(g0),X=O0();return U7(`security delete-generic-password -a "${X}" -s "${Z}"`),!0}catch(Z){return!1}}}});var wq;var wB=B(()=>{m6();z0();G7();wq={name:"libsecret",read(){try{let Z=O0(),X=J6(g0),q=k0("secret-tool",["lookup","service",X,"account",Z],{reject:!1});if(q.exitCode===0&&q.stdout)return X0(q.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let X=O0(),q=J6(g0),Q=m(Z);return{success:k0("secret-tool",["store","--label",q,"service",q,"account",X],{input:Q,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=O0(),X=J6(g0);return k0("secret-tool",["clear","service",X,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as pk}from"path";function Y4(Z){return Z.replace(/'/g,"''")}function W7(){return J6(g0)}function kB(){return`${W7()}:${O0()}`}function kq(){let Z=W7().replace(/[^a-zA-Z0-9._-]/g,"_");return pk(K0(),`${Z}.secure.dpapi`)}function H4(Z,X){try{return k0("powershell.exe",["-Command",Z],{input:X?.input,reject:!1})}catch{return null}}function dk(Z,X){let q=Z?.stderr?.trim();if(q)return q;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${X} (exit code ${Z.exitCode}).`;return X}function NB(){let Z=W7().replace(/"/g,'`"'),X=O0().replace(/"/g,'`"'),q=`
|
|
104
|
+
Add-Type -AssemblyName System.Runtime.WindowsRuntime
|
|
105
|
+
try {
|
|
106
|
+
$vault = New-Object Windows.Security.Credentials.PasswordVault
|
|
107
|
+
$cred = $vault.Retrieve("${Z}", "${X}")
|
|
108
|
+
$cred.FillPassword()
|
|
109
|
+
[Console]::Out.Write($cred.Password)
|
|
110
|
+
} catch {
|
|
111
|
+
exit 1
|
|
112
|
+
}
|
|
113
|
+
`,Q=H4(q);if(Q?.exitCode===0&&Q.stdout)try{return X0(Q.stdout)}catch{return null}return null}var Nq;var xB=B(()=>{m6();c0();z0();G7();Nq={name:"credential-locker-dpapi",read(){let Z=Y4(kq()),X=Y4(kB()),q=`
|
|
114
|
+
try {
|
|
115
|
+
Add-Type -AssemblyName System.Security
|
|
116
|
+
$path = '${Z}'
|
|
117
|
+
if (!(Test-Path -LiteralPath $path)) {
|
|
118
|
+
exit 1
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
$protectedBase64 = [System.IO.File]::ReadAllText(
|
|
122
|
+
$path,
|
|
123
|
+
[System.Text.Encoding]::UTF8
|
|
124
|
+
).Trim()
|
|
125
|
+
if (-not $protectedBase64) {
|
|
126
|
+
exit 1
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
$protectedBytes = [Convert]::FromBase64String($protectedBase64)
|
|
130
|
+
$entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${X}')
|
|
131
|
+
$bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
|
|
132
|
+
$protectedBytes,
|
|
133
|
+
$entropyBytes,
|
|
134
|
+
[System.Security.Cryptography.DataProtectionScope]::CurrentUser
|
|
135
|
+
)
|
|
136
|
+
[Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
|
|
137
|
+
} catch {
|
|
138
|
+
exit 1
|
|
139
|
+
}
|
|
140
|
+
`,Q=H4(q);if(Q?.exitCode===0&&Q.stdout)try{return X0(Q.stdout)}catch{return NB()}return NB()},async readAsync(){return this.read()},update(Z){let X=Y4(kq()),q=Y4(kB()),Q=m(Z),J=`
|
|
141
|
+
try {
|
|
142
|
+
Add-Type -AssemblyName System.Security
|
|
143
|
+
$path = '${X}'
|
|
144
|
+
$directory = [System.IO.Path]::GetDirectoryName($path)
|
|
145
|
+
if ($directory) {
|
|
146
|
+
[System.IO.Directory]::CreateDirectory($directory) | Out-Null
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
$payload = [Console]::In.ReadToEnd()
|
|
150
|
+
$bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
|
|
151
|
+
$entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${q}')
|
|
152
|
+
$protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
|
|
153
|
+
$bytes,
|
|
154
|
+
$entropyBytes,
|
|
155
|
+
[System.Security.Cryptography.DataProtectionScope]::CurrentUser
|
|
156
|
+
)
|
|
157
|
+
$protectedBase64 = [Convert]::ToBase64String($protectedBytes)
|
|
158
|
+
[System.IO.File]::WriteAllText(
|
|
159
|
+
$path,
|
|
160
|
+
$protectedBase64,
|
|
161
|
+
[System.Text.Encoding]::UTF8
|
|
162
|
+
)
|
|
163
|
+
} catch {
|
|
164
|
+
Write-Error $_.Exception.Message
|
|
165
|
+
exit 1
|
|
166
|
+
}
|
|
167
|
+
`,$=H4(J,{input:Q});if($?.exitCode===0)return{success:!0};return{success:!1,warning:dk($,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let X=`
|
|
168
|
+
try {
|
|
169
|
+
$path = '${Y4(kq())}'
|
|
170
|
+
if (Test-Path -LiteralPath $path) {
|
|
171
|
+
Remove-Item -LiteralPath $path -Force
|
|
172
|
+
}
|
|
173
|
+
} catch {
|
|
174
|
+
exit 1
|
|
175
|
+
}
|
|
176
|
+
`,q=H4(X),Q=W7().replace(/"/g,'`"'),J=O0().replace(/"/g,'`"'),$=`
|
|
177
|
+
Add-Type -AssemblyName System.Runtime.WindowsRuntime
|
|
178
|
+
try {
|
|
179
|
+
$vault = New-Object Windows.Security.Credentials.PasswordVault
|
|
180
|
+
$cred = $vault.Retrieve("${Q}", "${J}")
|
|
181
|
+
$vault.Remove($cred)
|
|
182
|
+
} catch {
|
|
183
|
+
exit 0
|
|
184
|
+
}
|
|
185
|
+
`,Y=H4($);return(q?.exitCode??1)===0}}});import{chmodSync as ck}from"fs";import{join as lk}from"path";function V7(){let Z=K0(),X=".credentials.json";return{storageDir:Z,storagePath:lk(Z,".credentials.json")}}var K4;var EB=B(()=>{c0();C1();F0();z0();K4={name:"plaintext",read(){let{storagePath:Z}=V7();try{let X=N().readFileSync(Z,{encoding:"utf8"});return X0(X)}catch{return null}},async readAsync(){let{storagePath:Z}=V7();try{let X=await N().readFile(Z,{encoding:"utf8"});return X0(X)}catch{return null}},update(Z){try{let{storageDir:X,storagePath:q}=V7();try{N().mkdirSync(X)}catch(Q){if(W0(Q)!=="EEXIST")throw Q}return PB(q,m(Z),{encoding:"utf8",flush:!1}),ck(q,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=V7();try{return N().unlinkSync(Z),!0}catch(X){if(W0(X)==="ENOENT")return!0;return!1}}}});function vB(Z){let X=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return X?K7(Iq,K4):Iq;if(process.platform==="linux")return X?K7(wq,K4):wq;if(process.platform==="win32")return X?K7(Nq,K4):Nq;return X?K4:nk}var nk;var yB=B(()=>{AB();IB();wB();xB();EB();nk={name:"unavailable-secure-storage",read:()=>null,readAsync:async()=>null,update:()=>({success:!1,warning:"Secure storage is unavailable on this platform without plaintext fallback."}),delete:()=>!0}});function S(Z){if(typeof Z!=="string")return;let X=Z.trim();return X?X:void 0}function xq(Z=process.env){return S(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function Sr(Z=process.env){let X=S(Z.CODEX_OAUTH_CALLBACK_PORT);if(!X)return 1455;let q=Number.parseInt(X,10);if(Number.isInteger(q)&&q>=0&&q<=65535)return q;return 1455}function Pq(Z){let X=Z.split(".");if(X.length<2)return;try{let q=X[1].replace(/-/g,"+").replace(/_/g,"/"),Q=q+"=".repeat((4-q.length%4)%4),J=Buffer.from(Q,"base64").toString("utf8"),$=JSON.parse(J);return $&&typeof $==="object"?$:void 0}catch{return}}function m0(Z){if(!Z)return;let X=Pq(Z),q=X?.["https://api.openai.com/auth"]&&typeof X["https://api.openai.com/auth"]==="object"?X["https://api.openai.com/auth"]:void 0;return S(q?.chatgpt_account_id??X?.["https://api.openai.com/auth.chatgpt_account_id"]??X?.chatgpt_account_id)??void 0}function br(Z){return Z.replace(/[&<>"']/g,(X)=>{switch(X){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"'":return"'";default:return X}})}async function SB(Z){let X=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:xq(),requested_token:"openai-api-key",subject_token:Z,subject_token_type:"urn:ietf:params:oauth:token-type:id_token"}),q=await fetch("https://auth.openai.com/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:X,signal:AbortSignal.timeout(15000)});if(!q.ok){let $=await q.text().catch(()=>"");throw Error($.trim()?`Codex API key exchange failed (${q.status}): ${$.trim()}`:`Codex API key exchange failed with status ${q.status}.`)}let Q=await q.json(),J=S(Q.access_token);if(!J)throw Error("Codex API key exchange completed, but no API key token was returned.");return J}var vr="https://auth.openai.com",CB="https://auth.openai.com/oauth/token",yr="openid profile email offline_access api.connectors.read api.connectors.invoke",Cr="codex_cli_rs";var Eq=()=>{};function _7(){return vB({allowPlainTextFallback:!0})}function bB(Z){if(!Z)return;let q=Pq(Z)?.exp;if(typeof q==="number"&&Number.isFinite(q))return q*1000;return}function G4(Z){if(!Z||typeof Z!=="object")return;let X=Z,q=S(X.apiKey),Q=S(X.accessToken);if(!Q)return;let J=S(X.refreshToken),$=S(X.idToken),Y=S(X.accountId)??m0($)??m0(Q),H=S(X.profileId),U=typeof X.lastRefreshAt==="number"&&Number.isFinite(X.lastRefreshAt)?X.lastRefreshAt:void 0,W=typeof X.lastRefreshFailureAt==="number"&&Number.isFinite(X.lastRefreshFailureAt)?X.lastRefreshFailureAt:void 0;return{apiKey:q,accessToken:Q,refreshToken:J,idToken:$,accountId:Y,profileId:H,lastRefreshAt:U,lastRefreshFailureAt:W}}function ok(Z){let X=bB(Z.accessToken)??bB(Z.idToken);if(X===void 0)return!1;return X<=Date.now()+ik}function hB(Z,X=Date.now()){let q=Math.max(Z.lastRefreshFailureAt??0,L7??0);if(!q)return!1;return X-q<ak}function sk(Z,X){if(!X.trim())return`Codex token refresh failed with status ${Z}.`;try{let q=JSON.parse(X),Q=q.error&&typeof q.error==="object"?q.error:void 0,J=S(Q?.code??q.code),$=S(Q?.message??q.error_description)??X.trim();return J?`Codex token refresh failed (${J}): ${$}`:`Codex token refresh failed with status ${Z}: ${$}`}catch{return`Codex token refresh failed with status ${Z}: ${X.trim()}`}}function fB(){if(q2())return;try{let Z=_7().read();return G4(Z?.codex)}catch{return}}async function rk(){if(q2())return;try{let Z=await _7().readAsync();return G4(Z?.codex)}catch{return}}function gB(Z,X=Date.now()){return hB(Z,X)}function mB(Z){if(q2())return{success:!1,warning:"Bare mode: secure storage is disabled."};let X=G4(Z);if(!X)return{success:!1,warning:"Codex credentials are incomplete."};let q=_7(),Q=q.read()||{},J=G4(Q[B7]),$={...Q,[B7]:{...X,profileId:X.profileId??J?.profileId,lastRefreshAt:X.lastRefreshAt??Date.now()}},Y=q.update($);if(Y.success)L7=G4($[B7])?.lastRefreshFailureAt??null;return Y}function tk(Z,X){if(!mB({...Z,lastRefreshFailureAt:X}).success)L7=X}function pr(){if(q2())return{success:!0};let Z=_7(),q={...Z.read()||{}};delete q[B7];let Q=Z.update(q);if(Q.success)L7=null;return Q}async function dr(Z){if(q2())return{refreshed:!1};if(W4()?.apiKey?.trim())return{refreshed:!1};let X=await rk();if(!X)return{refreshed:!1};if(!X.refreshToken)return{refreshed:!1,credentials:X};if(!Z?.force&&!ok(X))return{refreshed:!1,credentials:X};if(!Z?.force&&hB(X))return{refreshed:!1,credentials:X};if(U4)return U4;return U4=(async()=>{let q=Date.now();try{let Q=new URLSearchParams({client_id:xq(),grant_type:"refresh_token",refresh_token:X.refreshToken}),J=await fetch(CB,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:Q,signal:AbortSignal.timeout(15000)});if(!J.ok){let G=await J.text().catch(()=>"");throw Error(sk(J.status,G))}let $=await J.json(),Y=S($.access_token);if(!Y)throw Error("Codex token refresh succeeded without a new access token.");let H={accessToken:Y,refreshToken:S($.refresh_token)??X.refreshToken,idToken:S($.id_token)??X.idToken,accountId:m0($.id_token)??m0($.access_token)??X.accountId,lastRefreshAt:Date.now()},U=H.idToken??X.idToken;if(U)H.apiKey=await SB(U).catch(()=>{return});let W=mB(H);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:H}}catch(Q){throw tk(X,q),Q}finally{U4=null}})(),U4}var B7="codex",ik=60000,ak=60000,U4=null,L7=null;var uB=B(()=>{$6();c0();yB();Eq()});import{existsSync as ek,readFileSync as ZN}from"node:fs";import{isIP as XN}from"node:net";import{homedir as qN}from"node:os";import{join as pB}from"node:path";function YN(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 HN(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 Cq(Z){if(!Z)return;let X=Z.trim();if(!X)return;if(X==="undefined")return;return X}function vq(Z,X){for(let q of X){let Q=Z,J=!0;for(let Y of q){if(!Q||typeof Q!=="object"||!(Y in Q)){J=!1;break}Q=Q[Y]}if(!J)continue;let $=S(Q);if($)return $}return}function KN(Z){if(!Z)return;let X=Z.trim().toLowerCase();if(X==="low"||X==="medium"||X==="high"||X==="xhigh")return X;return}function dB(Z){let X=Z.trim(),q=X.indexOf("?");if(q===-1){let W=X.toLowerCase(),G=R7[W];if(G)return{raw:X,baseModel:G.model,reasoning:G.reasoningEffort?{effort:G.reasoningEffort}:void 0};return{raw:X,baseModel:X}}let Q=X.slice(0,q).trim(),J=new URLSearchParams(X.slice(q+1)),$=Q.toLowerCase(),Y=R7[$],H=Y?.model??Q,U=KN(J.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:X,baseModel:H,reasoning:typeof U==="string"?{effort:U}:U}}function aB(Z){let X=Z.trim().toLowerCase();return(X.split("?",1)[0]??X)in R7}function Sq(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;return JN.has(q)}function oB(Z){return Sq(Z)}function UN(Z,X){let q=Cq(X);return zN(q)||!q&&aB(Z)}function BN(Z){let X=Z.trim().toLowerCase();if(X.includes("codex"))return!0;let q=GN.exec(X);if(!q)return!1;if(Number(q[1])<5)return!1;if(X.startsWith("gpt-5-mini"))return!1;return!0}function sB(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($N.has(X)||X==="0.0.0.0")return!0;if(X.endsWith(".local"))return!0;let Q=XN(X);if(Q===4)return Number.parseInt(X.split(".",1)[0]??"",10)===127||YN(X);if(Q===6)return HN(X);return!1}catch{return!1}}function z7(Z){return Z.replace(bq,"")}function LN(Z){let X=z7(Z);if(!X||X==="/")return"/v1";if(X.toLowerCase().endsWith("/v1"))return X;return`${X}/v1`}function _N(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 rr(Z){if(!sB(Z))return[];try{let X=new URL(Z),q=z7(X.toString()),Q=new Set([q]),J=[],$=(U,W)=>{let G=new URL(X.toString());G.hostname=U,G.pathname=W,G.search="",G.hash="";let V=z7(G.toString());if(Q.has(V))return;Q.add(V),J.push(V)},Y=LN(X.pathname);if(Y!==z7(X.pathname))$(X.hostname,Y);let H=X.hostname.toLowerCase().replace(VN,"");if(H==="localhost"||H==="::1")$("127.0.0.1",X.pathname||"/"),$("127.0.0.1",Y);return J}catch{return[]}}function tr(Z){if(!Z.hasTools)return!1;if(!sB(Z.baseUrl))return!1;return _N(Z.baseUrl)}function zN(Z){if(!Z)return!1;try{let X=new URL(Z);return X.hostname==="chatgpt.com"&&X.pathname.replace(bq,"")==="/backend-api/codex"}catch{return!1}}function RN(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return iB;let Q=q.indexOf("/");if(Q!==-1)return q.slice(Q+1);return q}function cB(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return iB;return q}function nB(Z){if(!Z)return"copilot";try{let X=new URL(Z).hostname.toLowerCase();if(X==="api.githubcopilot.com")return"copilot";if(X==="models.github.ai"||X.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function rB(Z){let X=null;try{let{tryGetActiveProvider:b}=($6(),Q4(V4));X=b()}catch{X=null}let Q=X?.transport==="github_copilot",J=X?.model?.trim(),$=Cq(X?.baseUrl),Y=Z?.model?.trim()||J||Z?.fallbackModel?.trim()||(Q?"github:copilot":"gpt-4o"),H=dB(Y),U=Cq(Z?.baseUrl),W=U??$,V=Q&&aB(Y)&&W&&nB(W)==="custom"?void 0:W,_=U??V,L=J??"",R=Sq(L)?dB(L).baseModel:null,D=Boolean(Z?.model)&&Boolean(R)&&H.baseModel===R,M=Sq(Y)||D,F=!Q&&M&&!(_&&_!==yq)?QN:_,I=Q?nB(_):"custom",T=Q&&I==="copilot",j=Q&&I==="models",A=Q&&I==="custom",f=Q?cB(Y):Y,w=UN(Y,F)||T&&BN(f)?"codex_responses":"chat_completions",x=T?RN(H.baseModel):j||A?cB(H.baseModel):H.baseModel,v=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(X?.extras?.reasoningEffort?{effort:X.extras.reasoningEffort}:void 0);return{transport:w,requestedModel:Y,resolvedModel:x,baseUrl:(F??(T&&w==="codex_responses"?lB:Q?lB:yq)).replace(bq,""),reasoning:v}}function er(){let Z=null;try{let{tryGetActiveProvider:Q}=($6(),Q4(V4));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=rB();if(q.transport!=="chat_completions")return null;return`openai:${q.baseUrl.toLowerCase()}`}function Zt(){let Z=rB();if(Z.transport!=="chat_completions")return!1;let X=Z.baseUrl.toLowerCase();return X.includes("api.openai.com")||X===yq}function tB(Z=process.env){let X=hq();if(X)return X;let q=S(Z.CODEX_AUTH_JSON_PATH);if(q)return q;let Q=S(Z.CODEX_HOME);if(Q)return pB(Q,"auth.json");return pB(qN(),".codex","auth.json")}function hq(){try{let{tryGetActiveProvider:Z}=($6(),Q4(V4));return S(Z()?.extras?.codexAuthPath)}catch{return}}function fq(){try{let{tryGetActiveProvider:Z}=($6(),Q4(V4));return S(Z()?.extras?.codexAccountId)}catch{return}}function eB(Z){if(!ek(Z))return;try{let X=ZN(Z,"utf8"),q=JSON.parse(X);return q&&typeof q==="object"?q:void 0}catch{return}}function ZL(Z){let{authJson:X,authPath:q,envAccountId:Q}=Z;if(!X)return{apiKey:"",authPath:q,source:Z.missingSource??"none"};let J=vq(X,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),$=vq(X,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=Q??vq(X,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??m0(J)??m0($);if(!J)return{apiKey:"",accountId:Y,authPath:q,source:Z.missingSource??"none"};return{apiKey:J,accountId:Y,authPath:q,source:"auth.json"}}function XL(Z){let{storedCredentials:X,envAccountId:q}=Z;return{apiKey:X.apiKey??X.accessToken,accountId:q??X.accountId??m0(X.idToken)??m0(X.accessToken),source:"secure-storage"}}function M7(Z,X){let q=S(Z.CODEX_API_KEY),J=fq()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID);if(q)return{apiKey:q,accountId:J??m0(q),source:"env"};let $=hq();if(!Boolean($??S(Z.CODEX_AUTH_JSON_PATH)??S(Z.CODEX_HOME))&&X?.explicitAuthPathOnly)return{apiKey:"",accountId:J,source:"none"};let H=tB(Z),U=eB(H);return ZL({authJson:U,authPath:H,envAccountId:J})}function Xt(Z){let X=Z?.env??process.env,q=M7(X,{explicitAuthPathOnly:!0}),Q=Boolean(hq()??S(X.CODEX_AUTH_JSON_PATH)??S(X.CODEX_HOME)),J=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(Q||q.source==="env"||q.source==="auth.json")return q;if(Z?.storedCredentials?.accessToken)return XL({storedCredentials:Z.storedCredentials,envAccountId:fq()??S(X.CODEX_ACCOUNT_ID)??S(X.CHATGPT_ACCOUNT_ID)});if(J)return M7(X);return MN(X)}function MN(Z=process.env){let X=fq()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID),q=M7(Z,{explicitAuthPathOnly:!0});if(q.source==="env"||q.source==="auth.json"||q.authPath)return q;let Q=fB();if(Q?.accessToken){let J=XL({storedCredentials:Q,envAccountId:X});if(!(!J.accountId||gB(Q)))return J;let Y=tB(Z),H=eB(Y),U=ZL({authJson:H,authPath:Y,envAccountId:X});if(U.apiKey)return{...U,accountId:U.accountId??J.accountId};return J}return M7(Z)}function FN(Z){let X=Z.trim().toLowerCase(),Q=X.split("?",1)[0]??X;return R7[Q]?.reasoningEffort}function qt(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;if(q==="gpt-5.3-codex-spark"||q==="codexspark")return!1;if(FN(q)!==void 0)return!0;return WN.test(q)}var yq="https://api.openai.com/v1",QN="https://chatgpt.com/backend-api/codex",iB="gpt-4o",R7,JN,$N,GN,WN,bq,VN,lB="https://api.githubcopilot.com";var qL=B(()=>{uB();Eq();R7={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.5":{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.4":{model:"gpt-5.4",reasoningEffort:"high"},"gpt-5.3-codex":{model:"gpt-5.3-codex",reasoningEffort:"high"},"gpt-5.3-codex-spark":{model:"gpt-5.3-codex-spark"},codexspark:{model:"gpt-5.3-codex-spark"},"gpt-5.2-codex":{model:"gpt-5.2-codex",reasoningEffort:"high"},"gpt-5.1-codex-max":{model:"gpt-5.1-codex-max",reasoningEffort:"high"},"gpt-5.1-codex-mini":{model:"gpt-5.1-codex-mini"},"gpt-5.5-mini":{model:"gpt-5.5-mini",reasoningEffort:"medium"},"gpt-5.4-mini":{model:"gpt-5.4-mini",reasoningEffort:"medium"},"gpt-5.2":{model:"gpt-5.2",reasoningEffort:"medium"}},JN=new Set(["codexplan","codexspark"]),$N=new Set(["localhost","127.0.0.1","::1"]);GN=/^gpt-(\d+)/,WN=/^gpt-5(?:[.-]|$)/,bq=/\/+$/,VN=/^\[|\]$/g});var V4={};WX(V4,{tryGetActiveProvider:()=>W4,invalidateActiveProviderCache:()=>jN,getActiveProvider:()=>JL,_peekActiveProviderCacheForTesting:()=>ON,ActiveProviderNotConfiguredError:()=>F7});function DN(){if(QL)return;QL=!0,UB(()=>{Y6=null})}function AN(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(oB(X))return"codex_responses";return"openai_compat"}}}function TN(Z){let X=VB(Z.model);return{transport:AN(Z,X),baseUrl:Z.baseUrl,model:X,apiKey:Z.apiKey,extras:Z.extras,name:Z.name}}function JL(){if(DN(),Y6)return Y6;let Z=_1(J0());if(!Z)throw new F7;return Y6=TN(Z),Y6}function W4(){try{return JL()}catch(Z){if(Z instanceof F7)return null;throw Z}}function jN(){Y6=null}function ON(){return Y6}var F7,Y6=null,QL=!1;var $6=B(()=>{Fq();DB();Dq();qL();F7=class F7 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function $L(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 YL=()=>{};function HL(Z){if(typeof Z!=="string")return!1;let X=Z.trim();return X!==""&&X!=="."&&X!==".."&&!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("\x00")}function gq(Z){if(typeof Z!=="string")throw TypeError("Expected a string");if(!HL(Z))throw Error(`Unsafe filename: ${JSON.stringify(Z)}`)}var Ut;var KL=B(()=>{Ut=Object.freeze([""," ",".",".."," .",". "," ..",".. ","../","../foo","foo/../bar","foo/bar","foo\\bar","foo\x00bar"])});import o from"node:path";import UL from"node:os";import mq from"node:process";function pq(Z,{suffix:X="nodejs"}={}){if(gq(Z),X)Z+=`-${X}`;if(gq(Z),mq.platform==="darwin")return IN(Z);if(mq.platform==="win32")return wN(Z);return kN(Z)}var E1,uq,Q2,IN=(Z)=>{let X=o.join(E1,"Library");return{data:o.join(X,"Application Support",Z),config:o.join(X,"Preferences",Z),cache:o.join(X,"Caches",Z),log:o.join(X,"Logs",Z),temp:o.join(uq,Z)}},wN=(Z)=>{let X=Q2.APPDATA||o.join(E1,"AppData","Roaming"),q=Q2.LOCALAPPDATA||o.join(E1,"AppData","Local");return{data:o.join(q,Z,"Data"),config:o.join(X,Z,"Config"),cache:o.join(q,Z,"Cache"),log:o.join(q,Z,"Log"),temp:o.join(uq,Z)}},kN=(Z)=>{let X=o.basename(E1);return{data:o.join(Q2.XDG_DATA_HOME||o.join(E1,".local","share"),Z),config:o.join(Q2.XDG_CONFIG_HOME||o.join(E1,".config"),Z),cache:o.join(Q2.XDG_CACHE_HOME||o.join(E1,".cache"),Z),log:o.join(Q2.XDG_STATE_HOME||o.join(E1,".local","state"),Z),temp:o.join(uq,X,Z)}};var GL=B(()=>{KL();E1=UL.homedir(),uq=UL.tmpdir(),{env:Q2}=mq});import{join as D7}from"path";function BL(Z){let X=Z.replace(/[^a-zA-Z0-9]/g,"-");if(X.length<=WL)return X;return`${X.slice(0,WL)}-${Math.abs(VL(Z)).toString(36)}`}function T7(Z){return BL(Z)}var A7,WL=200,LL;var _L=B(()=>{GL();F0();NN();A7=pq("claude-cli");LL={baseLogs:()=>D7(A7.cache,T7(N().cwd())),errors:()=>D7(A7.cache,T7(N().cwd()),"errors"),messages:()=>D7(A7.cache,T7(N().cwd()),"messages"),mcpLogs:(Z)=>D7(A7.cache,T7(N().cwd()),`mcp-logs-${BL(Z)}`)}});function RL(Z){return Z.replace(zL,"").trim()||Z}function ML(Z){return Z.replace(zL,"").trim()}function At(Z){return Z.replace(xN,"").trim()}var zL,xN;var FL=B(()=>{zL=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;xN=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});import{readdir as EN,readFile as vN,stat as yN}from"fs/promises";import{join as CN}from"path";function St(Z,X){let q=Z.firstPrompt?.startsWith(`<${jL}>`),Q=Z.firstPrompt?ML(Z.firstPrompt):"",J=Q&&!q,$=Z.agentName||Z.customTitle||Z.summary||(J?Q:void 0)||X||(q?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return RL($).trim()}function SN(Z){return Z.toISOString().replace(/[:.]/g,"-")}function hN(Z){if(B4.length>=bN)B4.shift();B4.push(Z)}function bt(Z){if(P0!==null)return;if(P0=Z,H6.length>0){let X=[...H6];H6.length=0;for(let q of X)switch(q.type){case"error":P0.logError(q.error);break;case"mcpError":P0.logMCPError(q.serverName,q.error);break;case"mcpDebug":P0.logMCPDebug(q.serverName,q.message);break}}}function g(Z){let X=TL(Z);try{let q=W4()?.transport;if(q==="bedrock"||q==="vertex"||q==="foundry"||process.env.DISABLE_ERROR_REPORTING||Jq())return;let J={error:X.stack||X.message,timestamp:new Date().toISOString()};if(hN(J),P0===null){H6.push({type:"error",error:X});return}P0.logError(X)}catch{}}function ft(){return[...B4]}function fN(){return gN(LL.errors())}async function gt(Z){return(await fN())[Z]||null}async function gN(Z){let X;try{X=await EN(Z,{withFileTypes:!0})}catch{return g(Error(`No logs found at ${Z}`)),[]}let q=await Promise.all(X.map(async(Q,J)=>{let $=CN(Z,Q.name),Y=await vN($,{encoding:"utf8"}),H=X0(Y),U=H[0],W=H[H.length-1],G=U?.type==="user"&&typeof U?.message?.content==="string"?U?.message?.content:"No prompt",V=await yN($),_=$.includes("sidechain"),L=SN(V.mtime);return{date:L,fullPath:$,messages:H,value:J,created:dq(U?.timestamp||L),modified:W?.timestamp?dq(W.timestamp):dq(L),firstPrompt:G.split(`
|
|
186
|
+
`)[0]?.slice(0,50)+(G.length>50?"…":"")||"No prompt",messageCount:H.length,isSidechain:_}}));return $L(q.filter((Q)=>Q!==null)).map((Q,J)=>({...Q,value:J}))}function dq(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 mt(Z,X){try{if(P0===null){H6.push({type:"mcpError",serverName:Z,error:X});return}P0.logMCPError(Z,X)}catch{}}function ut(Z,X){try{if(P0===null){H6.push({type:"mcpDebug",serverName:Z,message:X});return}P0.logMCPDebug(Z,X)}catch{}}function pt(Z,X){if(!X||!X.startsWith("repl_main_thread"))return;let{messages:q,...Q}=Z;DL(Q),AL(null)}function dt(){P0=null,H6.length=0,B4=[]}var bN=100,B4,H6,P0=null,ht;var p0=B(()=>{v1();T6();$6();PN();YL();_L();FL();C1();$q();z0();B4=[];H6=[];ht=d(()=>{return process.argv.includes("--hard-fail")})});import OL from"node:path";function uN(Z){return Z.includes(OL.sep)||Z.includes("/")||OL.isAbsolute(Z)}function pN(Z){let X=Z.trim();if(!X)return"Unsafe executable: empty command";if(L4.test(X))return"Unsafe executable: control characters are not allowed";if(!uN(X)&&!mN.test(X))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function dN(Z){for(let X of Z)if(L4.test(X))return"Unsafe argument: control characters are not allowed";return null}function cN(Z){if(!Z)return null;if(L4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function lN(Z){if(!Z)return{};for(let[X,q]of Object.entries(Z)){if(L4.test(X))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof q==="string"&&L4.test(q))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function nN(Z,X){if(typeof Z.signal==="string")return Z.signal;return String(X)}function a(Z,X,q={timeout:10*lq*cq,preserveOutputOnError:!0,useCwd:!0}){return J3(Z,X,{abortSignal:q.abortSignal,timeout:q.timeout,preserveOutputOnError:q.preserveOutputOnError,cwd:q.useCwd?s():void 0,env:q.env,stdin:q.stdin,input:q.input})}function J3(Z,X,{abortSignal:q,timeout:Q=10*lq*cq,preserveOutputOnError:J=!0,cwd:$,env:Y,maxBuffer:H=IL,stdin:U,input:W}={timeout:10*lq*cq,preserveOutputOnError:!0,maxBuffer:IL}){let G=pN(Z);if(G)return Promise.resolve({stdout:"",stderr:"",code:1,error:G});let V=dN(X);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let _=cN($);if(_)return Promise.resolve({stdout:"",stderr:"",code:1,error:_});let L=lN(Y);if(L.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:L.error});return new Promise((z)=>{let R=W!==void 0?"pipe":U??"pipe",D=wL.spawn(Z,X,{cwd:$,env:L.value,shell:!1,signal:q,stdio:[R,"pipe","pipe"]}),M=!1,k="",F="",I=0,T,j=!1,A=(x)=>{if(M)return;M=!0,z(x)},f=(x,v)=>{let b=typeof x==="string"?x:x.toString("utf8");if(I+=Buffer.byteLength(b,"utf8"),I>H){D.kill(),A({stdout:J?k:"",stderr:J?F:"",code:1,error:"maxBuffer exceeded"});return}if(v==="stdout")k+=b;else F+=b};D.stdout?.on("data",(x)=>f(x,"stdout")),D.stderr?.on("data",(x)=>f(x,"stderr")),D.once("spawn",()=>{if(R==="pipe"&&D.stdin)if(W!==void 0)D.stdin.end(W);else D.stdin.end()}),D.once("error",(x)=>{g(x),A({stdout:"",stderr:"",code:1,error:x.message})});let w=Q>0?setTimeout(()=>{j=!0,D.kill()},Q):void 0;D.once("close",(x,v)=>{if(w)clearTimeout(w);T=v??void 0;let b=x??1;if(j){A({stdout:J?k:"",stderr:J?F:"",code:b,error:`Command timed out after ${Q}ms`});return}if(b!==0){if(J)A({stdout:k,stderr:F,code:b,error:nN({signal:T},b)});else A({stdout:"",stderr:"",code:b});return}A({stdout:k,stderr:F,code:0})})})}var wL,cq=1000,lq=60,IL=1e6,L4,mN;var C4=B(()=>{Z1();p0();Tq();wL=nY(h7(),1),L4=/[\0\r\n]/,mN=/^[A-Za-z0-9_.-]+$/});import{readFile as iN}from"fs/promises";import{join as aN}from"path";async function _4(Z,X,q,Q){try{let J=await iN(aN(Z,"config"),"utf-8");return oN(J,X,q,Q)}catch{return null}}function oN(Z,X,q,Q){let J=Z.split(`
|
|
187
|
+
`),$=X.toLowerCase(),Y=Q.toLowerCase(),H=!1;for(let U of J){let W=U.trim();if(W.length===0||W[0]==="#"||W[0]===";")continue;if(W[0]==="["){H=eN(W,$,q);continue}if(!H)continue;let G=sN(W);if(G&&G.key.toLowerCase()===Y)return G.value}return null}function sN(Z){let X=0;while(X<Z.length&&Zx(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=rN(Z,X);return{key:q,value:Q}}function rN(Z,X){let q="",Q=!1,J=X;while(J<Z.length){let $=Z[J];if(!Q&&($==="#"||$===";"))break;if($==='"'){Q=!Q,J++;continue}if($==="\\"&&J+1<Z.length){let Y=Z[J+1];if(Q){switch(Y){case"n":q+=`
|
|
188
|
+
`;break;case"t":q+="\t";break;case"b":q+="\b";break;case'"':q+='"';break;case"\\":q+="\\";break;default:q+=Y;break}J+=2;continue}if(Y==="\\"){q+="\\",J+=2;continue}}q+=$,J++}if(!Q)q=tN(q);return q}function tN(Z){let X=Z.length;while(X>0&&(Z[X-1]===" "||Z[X-1]==="\t"))X--;return Z.slice(0,X)}function eN(Z,X,q){let Q=1;while(Q<Z.length&&Z[Q]!=="]"&&Z[Q]!==" "&&Z[Q]!=="\t"&&Z[Q]!=='"')Q++;if(Z.slice(1,Q).toLowerCase()!==X)return!1;if(q===null)return Q<Z.length&&Z[Q]==="]";while(Q<Z.length&&(Z[Q]===" "||Z[Q]==="\t"))Q++;if(Q>=Z.length||Z[Q]!=='"')return!1;Q++;let $="";while(Q<Z.length&&Z[Q]!=='"'){if(Z[Q]==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(Y==="\\"||Y==='"'){$+=Y,Q+=2;continue}$+=Y,Q+=2;continue}$+=Z[Q],Q++}if(Q>=Z.length||Z[Q]!=='"')return!1;if(Q++,Q>=Z.length||Z[Q]!=="]")return!1;return $===q}function Zx(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var kL=()=>{};import{unwatchFile as NL,watchFile as Xx}from"fs";import{readdir as qx,readFile as K6,stat as EL}from"fs/promises";import{join as E0,resolve as j7}from"path";function He(){J2.clear()}async function u0(Z){let X=j7(Z??s()),q=J2.get(X);if(q!==void 0)return q;let Q=Y2(X);if(!Q)return J2.set(X,null),null;let J=E0(Q,".git");try{if((await EL(J)).isFile()){let Y=(await K6(J,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),U=j7(Q,H);return J2.set(X,U),U}}return J2.set(X,J),J}catch{return J2.set(X,null),null}}function O7(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 nq(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function z4(Z){try{let X=(await K6(E0(Z,"HEAD"),"utf-8")).trim();if(X.startsWith("ref:")){let q=X.slice(4).trim();if(q.startsWith("refs/heads/")){let J=q.slice(11);if(!O7(J))return null;return{type:"branch",name:J}}if(!O7(q))return null;let Q=await $2(Z,q);return Q?{type:"detached",sha:Q}:{type:"detached",sha:""}}if(!nq(X))return null;return{type:"detached",sha:X}}catch{return null}}async function $2(Z,X){let q=await xL(Z,X);if(q)return q;let Q=await U6(Z);if(Q&&Q!==Z)return xL(Q,X);return null}async function xL(Z,X){try{let q=(await K6(E0(Z,X),"utf-8")).trim();if(q.startsWith("ref:")){let Q=q.slice(4).trim();if(!O7(Q))return null;return $2(Z,Q)}if(!nq(q))return null;return q}catch{}try{let q=await K6(E0(Z,"packed-refs"),"utf-8");for(let Q of q.split(`
|
|
189
|
+
`)){if(Q.startsWith("#")||Q.startsWith("^"))continue;let J=Q.indexOf(" ");if(J===-1)continue;if(Q.slice(J+1)===X){let $=Q.slice(0,J);return nq($)?$:null}}}catch{}return null}async function U6(Z){try{let X=(await K6(E0(Z,"commondir"),"utf-8")).trim();return j7(Z,X)}catch{return null}}async function Qx(Z,X,q){try{let Q=(await K6(E0(Z,X),"utf-8")).trim();if(Q.startsWith("ref:")){let J=Q.slice(4).trim();if(J.startsWith(q)){let $=J.slice(q.length);if(!O7($))return null;return $}}}catch{}return null}class vL{gitDir=null;commonDir=null;initialized=!1;initPromise=null;watchedPaths=[];branchRefPath=null;cache=new Map;async ensureStarted(){if(this.initialized)return;if(this.initPromise)return this.initPromise;return this.initPromise=this.start(),this.initPromise}async start(){if(this.gitDir=await u0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await U6(this.gitDir),this.watchPath(E0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(E0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),J4(async()=>{this.stopWatching()})}watchPath(Z,X){this.watchedPaths.push(Z),Xx(Z,{interval:Jx},X)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await z4(this.gitDir),X=this.commonDir??this.gitDir,q=Z?.type==="branch"?E0(X,"refs","heads",Z.name):null;if(q===this.branchRefPath)return;if(this.branchRefPath)NL(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 PL(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)NL(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,X){await this.ensureStarted();let q=this.cache.get(Z);if(q&&!q.dirty)return q.value;if(q)q.dirty=!1;let Q=await X(),J=this.cache.get(Z);if(J&&!J.dirty)J.value=Q;if(!J)this.cache.set(Z,{value:Q,dirty:!1,compute:X});return Q}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function $x(){let Z=await u0();if(!Z)return"HEAD";let X=await z4(Z);if(!X)return"HEAD";return X.type==="branch"?X.name:"HEAD"}async function Yx(){let Z=await u0();if(!Z)return"";let X=await z4(Z);if(!X)return"";if(X.type==="branch")return await $2(Z,`refs/heads/${X.name}`)??"";return X.sha}async function Hx(){let Z=await u0();if(!Z)return null;let X=await _4(Z,"remote","origin","url");if(X)return X;let q=await U6(Z);if(q&&q!==Z)return _4(q,"remote","origin","url");return null}async function Kx(){let Z=await u0();if(!Z)return"main";let X=await U6(Z)??Z,q=await Qx(X,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(q)return q;for(let Q of["main","master"])if(await $2(X,`refs/remotes/origin/${Q}`))return Q;return"main"}function yL(){return I7.get("branch",$x)}function CL(){return I7.get("head",Yx)}function SL(){return I7.get("remoteUrl",Hx)}function bL(){return I7.get("defaultBranch",Kx)}async function Ke(Z){let X=await u0(Z);if(!X)return null;let q=await z4(X);if(!q)return null;if(q.type==="branch")return $2(X,`refs/heads/${q.name}`);return q.sha}async function Ue(Z){let X;try{let Q=(await K6(E0(Z,".git"),"utf-8")).trim();if(!Q.startsWith("gitdir:"))return null;X=j7(Z,Q.slice(7).trim())}catch{return null}let q=await z4(X);if(!q)return null;if(q.type==="branch")return $2(X,`refs/heads/${q.name}`);return q.sha}async function Ge(Z){let X=await u0(Z);if(!X)return null;let q=await _4(X,"remote","origin","url");if(q)return q;let Q=await U6(X);if(Q&&Q!==X)return _4(Q,"remote","origin","url");return null}async function hL(){let Z=await u0();if(!Z)return!1;let X=await U6(Z)??Z;try{return await EL(E0(X,"shallow")),!0}catch{return!1}}async function fL(){try{let Z=await u0();if(!Z)return 0;let X=await U6(Z)??Z;return(await qx(E0(X,"worktrees"))).length+1}catch{return 1}}var J2,Jx=1000,I7;var gL=B(()=>{T6();HB();Z1();_2();kL();J2=new Map;I7=new vL});import{createHash as Ux}from"crypto";import{readFileSync as iq,realpathSync as mL,statSync as uL}from"fs";import{open as Gx,readFile as Wx,realpath as pL,stat as Vx}from"fs/promises";import{basename as Bx,dirname as aq,join as v0,resolve as k7,sep as dL}from"path";function Lx(){function Z(X){let q=cL(X);return q===oL?null:q}return Z.cache=cL.cache,Z}function _x(){function Z(X){let q=Y2(X);if(!q)return null;return lL(q)}return Z.cache=lL.cache,Z}function ke(Z){return u0(Z)}async function Ne(){let Z=s(),X=Y2(Z);if(!X)return!1;try{let[q,Q]=await Promise.all([pL(Z),pL(X)]);return q===Q}catch{return Z===X}}function Fx(Z){let X=Z.trim();if(!X)return null;let q=X.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(q&&q[1]&&q[2])return`${q[1]}/${q[2]}`.toLowerCase();let Q=X.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(Q&&Q[1]&&Q[2]){let J=Q[1],$=Q[2];if(kx(J)&&$.startsWith("git/")){let Y=$.slice(4),H=Y.split("/");if(H.length>=3&&H[0].includes("."))return Y.toLowerCase();return`github.com/${Y}`.toLowerCase()}return`${J}/${$}`.toLowerCase()}return null}async function Pe(){let Z=await oq();if(!Z)return null;let X=Fx(Z);if(!X)return null;return Ux("sha256").update(X).digest("hex").substring(0,16)}async function Se(){try{let[Z,X,q,Q,J,$]=await Promise.all([Rx(),Mx(),oq(),Dx(),Ax(),jx()]);return{commitHash:Z,branchName:X,remoteUrl:q,isHeadOnRemote:Q,isClean:J,worktreeCount:$}}catch(Z){return null}}async function be(){let{parseGitRemote:Z}=await import("./detectRepository-0.5.10-z29dy30r.mjs"),X=await oq();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 Ix(){let{stdout:Z,code:X}=await a(Z0(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(X===0&&Z.trim())return Z.trim();let{stdout:q,code:Q}=await a(Z0(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(Q===0){let $=q.match(/HEAD branch: (\S+)/);if($&&$[1])return`origin/${$[1]}`}let J=["origin/main","origin/staging","origin/master"];for(let $ of J){let{code:Y}=await a(Z0(),["rev-parse","--verify",$],{preserveOutputOnError:!1});if(Y===0)return $}return null}function wx(){return hL()}async function w7(){let{stdout:Z,code:X}=await a(Z0(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),q=Z.trim();if(X!==0||!q)return[];let Q=q.split(`
|
|
190
|
+
`).filter(Boolean),J=[],$=0;for(let Y of Q){if(J.length>=aL){P(`Untracked file capture: reached max file count (${aL})`);break}if(sq(Y))continue;try{let U=(await Vx(Y)).size;if(U>nL){P(`Untracked file capture: skipping ${Y} (exceeds ${nL} bytes)`);continue}if($+U>iL){P(`Untracked file capture: reached total size limit (${iL} bytes)`);break}if(U===0){J.push({path:Y,content:""});continue}let W=Math.min(Ox,U),G=await Gx(Y,"r");try{let V=Buffer.alloc(W),{bytesRead:_}=await G.read(V,0,W,0),L=V.subarray(0,_);if(rq(L))continue;let z;if(U<=W)z=L.toString("utf-8");else z=await Wx(Y,"utf-8");J.push({path:Y,content:z}),$+=U}finally{await G.close()}}catch(H){P(`Failed to read untracked file ${Y}: ${H}`)}}return J}async function he(){try{if(!await zx())return null;if(await wx()){P("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:L},z]=await Promise.all([a(Z0(),["diff","HEAD"]),w7()]);return{remote_base_sha:null,remote_base:null,patch:L||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let X=await Ix();if(!X){P("No remote found, using HEAD-only mode for issue");let[{stdout:L},z]=await Promise.all([a(Z0(),["diff","HEAD"]),w7()]);return{remote_base_sha:null,remote_base:null,patch:L||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let{stdout:q,code:Q}=await a(Z0(),["merge-base","HEAD",X],{preserveOutputOnError:!1});if(Q!==0||!q.trim()){P("Merge-base failed, using HEAD-only mode for issue");let[{stdout:L},z]=await Promise.all([a(Z0(),["diff","HEAD"]),w7()]);return{remote_base_sha:null,remote_base:null,patch:L||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let J=q.trim(),[{stdout:$},Y,{stdout:H,code:U},{stdout:W},{stdout:G}]=await Promise.all([a(Z0(),["diff",J]),w7(),a(Z0(),["format-patch",`${J}..HEAD`,"--stdout"]),a(Z0(),["rev-parse","HEAD"]),a(Z0(),["rev-parse","--abbrev-ref","HEAD"])]),V=null;if(U===0&&H&&H.trim())V=H;let _=G?.trim();return{remote_base_sha:J,remote_base:X,patch:$||"",untracked_files:Y,format_patch:V,head_sha:W?.trim()||null,branch_name:_&&_!=="HEAD"?_:null}}catch(Z){return g(Z),null}}function kx(Z){let X=Z.split(":")[0]??"";return X==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(X)}function fe(){let Z=N(),X=s(),q=v0(X,".git");try{let Q=Z.statSync(q);if(Q.isFile())return!1;if(Q.isDirectory()){let J=v0(q,"HEAD");try{if(Z.statSync(J).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(v0(X,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(v0(X,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(v0(X,"refs")).isDirectory())return!0}catch{}return!1}var oL,cL,Y2,lL,f5,Z0,zx,T$=async(Z)=>{return Y2(Z)!==null},Rx=async()=>{return CL()},Mx=async()=>{return yL()},xe=async()=>{return bL()},oq=async()=>{return SL()},Dx=async()=>{let{code:Z}=await a(Z0(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},Ee=async()=>{let{stdout:Z,code:X}=await a(Z0(),["--no-optional-locks","rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1,useCwd:!0});return X===0&&parseInt(Z.trim(),10)>0},ve=async()=>{let{stdout:Z,code:X}=await a(Z0(),["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{preserveOutputOnError:!1,useCwd:!0});if(X!==0)return{ahead:0,behind:0};let q=Z.trim().split(/\s+/);if(q.length!==2)return{ahead:0,behind:0};let Q=parseInt(q[0],10),J=parseInt(q[1],10);return{ahead:Number.isFinite(J)?J:0,behind:Number.isFinite(Q)?Q:0}},Ax=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)X.push("-uno");let{stdout:q}=await a(Z0(),X,{preserveOutputOnError:!1});return q.trim().length===0},ye=async()=>{let{stdout:Z}=await a(Z0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
|
|
191
|
+
`).map((X)=>X.trim().split(" ",2)[1]?.trim()).filter((X)=>typeof X==="string")},Tx=async()=>{let{stdout:Z}=await a(Z0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1}),X=[],q=[];return Z.trim().split(`
|
|
192
|
+
`).filter((Q)=>Q.length>0).forEach((Q)=>{let J=Q.substring(0,2),$=Q.substring(2).trim();if(J==="??")q.push($);else if($)X.push($)}),{tracked:X,untracked:q}},jx=async()=>{return fL()},Ce=async(Z)=>{try{let X=Z||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:q}=await Tx();if(q.length>0){let{code:J}=await a(Z0(),["add",...q],{preserveOutputOnError:!1});if(J!==0)return!1}let{code:Q}=await a(Z0(),["stash","push","--message",X],{preserveOutputOnError:!1});return Q===0}catch(X){return!1}},nL=524288000,iL=5368709120,aL=20000,Ox=65536;var _2=B(()=>{v1();tq();Z1();M1();H2();C4();F0();gL();p0();j4();z5();oL=Symbol("git-root-not-found"),cL=R1((Z)=>{let X=Date.now();Y0("info","find_git_root_started");let q=k7(Z),Q=q.substring(0,q.indexOf(dL)+1)||dL,J=0;while(q!==Q){try{let Y=v0(q,".git");J++;let H=uL(Y);if(H.isDirectory()||H.isFile())return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:J,found:!0}),q.normalize("NFC")}catch{}let $=aq(q);if($===q)break;q=$}try{let $=v0(Q,".git");J++;let Y=uL($);if(Y.isDirectory()||Y.isFile())return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:J,found:!0}),Q.normalize("NFC")}catch{}return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:J,found:!1}),oL},(Z)=>Z,50),Y2=Lx();lL=R1((Z)=>{try{let X=iq(v0(Z,".git"),"utf-8").trim();if(!X.startsWith("gitdir:"))return Z;let q=k7(Z,X.slice(7).trim()),Q=k7(q,iq(v0(q,"commondir"),"utf-8").trim());if(k7(aq(q))!==v0(Q,"worktrees"))return Z;if(mL(iq(v0(q,"gitdir"),"utf-8").trim())!==v0(mL(Z),".git"))return Z;if(Bx(Q)!==".git")return Q.normalize("NFC");return aq(Q).normalize("NFC")}catch{return Z}},(Z)=>Z,50),f5=_x();Z0=d(()=>{return _5("git")||"git"}),zx=d(async()=>{let Z=Date.now();Y0("info","is_git_check_started");let X=Y2(s())!==null;return Y0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:X}),X})});
|
|
193
|
+
export{di as c6,dW as d6,g0 as e6,$4 as f6,O0 as g6,Oq as h6,es as i6,G7 as j6,a4 as k6,B9 as l6,h7 as m6,jU as n6,OU as o6,KX as p6,m6 as q6,cQ as r6,lQ as s6,f7 as t6,tQ as u6,sq as v6,tq as w6,Y0 as x6,yx as y6,H2 as z6,U7 as A6,a as B6,J3 as C6,C4 as D6,_4 as E6,kL as F6,He as G6,u0 as H6,$2 as I6,U6 as J6,Ke as K6,Ue as L6,Ge as M6,gL as N6,qJ as O6,QJ as P6,xP as Q6,R1 as R6,j4 as S6,_6 as T6,g7 as U6,xG as V6,_5 as W6,z5 as X6,Y2 as Y6,f5 as Z6,Z0 as _6,zx as $6,ke as a7,Ne as b7,T$ as c7,Rx as d7,Mx as e7,xe as f7,oq as g7,Fx as h7,Pe as i7,Dx as j7,Ee as k7,ve as l7,Ax as m7,ye as n7,Tx as o7,jx as p7,Ce as q7,Se as r7,be as s7,Ix as t7,he as u7,fe as v7,_2 as w7,_P as x7,y0 as y7,V6 as z7,hP as A7,a_ as B7,fP as C7,$J as D7,YJ as E7,c7 as F7,nP as G7,iP as H7,aP as I7,O4 as J7,BJ as K7,LJ as L7,TJ as M7,jJ as N7,cJ as O7,lJ as P7,eJ as Q7,Z$ as R7,s7 as S7,uz as T7,q1 as U7,W2 as V7,Av as W7,Tv as X7,jv as Y7,cz as Z7,E4 as _7,U$ as $7,Iv as a8,e7 as b8,G$ as c8,Z3 as d8,X3 as e8,V$ as f8,lv as g8,rz as h8,nv as i8,iv as j8,av as k8,ov as l8,B$ as m8,sv as n8,rv as o8,tv as p8,ev as q8,Zy as r8,Xy as s8,ez as t8,qy as u8,Qy as v8,Jy as w8,$y as x8,Yy as y8,Hy as z8,z$ as A8,Ky as B8,v4 as C8,HR as D8,O$ as E8,C0 as F8,hy as G8,B3 as H8,fy as I8,gy as J8,f4 as K8,dy as L8,cy as M8,ly as N8,ny as O8,iy as P8,ay as Q8,A2 as R8,oy as S8,sy as T8,L3 as U8,ty as V8,ey as W8,d$ as X8,D1 as Y8,T2 as Z8,m4 as _8,n$ as $8,KC as a9,i$ as b9,PG as c9,EG as d9,L0 as e9,yO as f9,p6 as g9,zl as h9,GX as i9,Fl as j9,Dl as k9,Al as l9,Tl as m9,jl as n9,Ol as o9,Il as p9,wl as q9,kl as r9,Nl as s9,xl as t9,Pl as u9,hG as v9,El as w9,vl as x9,yl as y9,Cl as z9,Sl as A9,bl as B9,hl as C9,fG as D9,d6 as E9,gG as F9,hO as G9,fO as H9,gO as I9,mO as J9,uO as K9,pO as L9,dO as M9,lO as N9,nO as O9,iO as P9,uG as Q9,dG as R9,cG as S9,iG as T9,sl as U9,oG as V9,o1 as W9,$n as X9,oO as Y9,D5 as Z9,Hn as _9,eG as $9,j5 as a_,Bn as b_,Ln as c_,_n as d_,qW as e_,AI as f_,zn as g_,Rn as h_,jI as i_,Mn as j_,T5 as k_,kI as l_,PI as m_,An as n_,HW as o_,jn as p_,O5 as q_,KW as r_,UW as s_,vI as t_,yI as u_,wn as v_,kn as w_,Nn as x_,GW as y_,WW as z_,Pn as A_,En as B_,VW as C_,RX as D_,BW as E_,LW as F_,Cn as G_,_W as H_,l6 as I_,gn as J_,RW as K_,mn as L_,MW as M_,pn as N_,FW as O_,DW as P_,dn as Q_,cn as R_,ln as S_,nn as T_,an as U_,fI as V_,on as W_,MX as X_,Yi as Y_,kW as Z_,NW as __,N0 as $_,Di as a$,Ai as b$,Ti as c$,l2 as d$,bi as e$,wX as f$,Qa as g$,E5 as h$,v5 as i$,Ja as j$,$a as k$,aW as l$,fX as m$,ya as n$,i2 as o$,oW as p$,C5 as q$,YV as r$,n as s$,Ca as t$,Sa as u$,s1 as v$,ba as w$,S5 as x$,ha as y$,fa as z$,Qw as A$,ga as B$,ma as C$,ua as D$,pa as E$,da as F$,ca as G$,KV as H$,VV as I$,Xo as J$,Yw as K$,qo as L$,a2 as M$,_V as N$,Qo as O$,mX as P$,_o as Q$,zo as R$,dV as S$,Jq as T$,$q as U$,s5 as V$,iV as W$,Xk as X$,Fo as Y$,Do as Z$,aV as _$,Qk as $$,Jk as aaa,_0 as baa,tV as caa,X4 as daa,Uk as eaa,Gk as faa,qB as gaa,QB as haa,Zs as iaa,J7 as jaa,_k as kaa,Xs as laa,zk as maa,qs as naa,Qs as oaa,Js as paa,$s as qaa,Ys as raa,Hs as saa,UB as taa,M0 as uaa,Ks as vaa,Us as waa,J0 as xaa,Gs as yaa,Ws as zaa,Vs as Aaa,Bs as Baa,Rq as Caa,Y7 as Daa,Mq as Eaa,jk as Faa,Ls as Gaa,_s as Haa,Ok as Iaa,zs as Jaa,Rs as Kaa,Ms as Laa,Fs as Maa,Ds as Naa,As as Oaa,Ts as Paa,js as Qaa,Fq as Raa,H7 as Saa,VB as Taa,Dq as Uaa,Ps as Vaa,f0 as Waa,Es as Xaa,_1 as Yaa,vs as Zaa,yk as _aa,ys as $aa,Ck as aba,Cs as bba,Ss as cba,bs as dba,hs as eba,Sk as fba,bk as gba,fs as hba,gs as iba,ms as jba,us as kba,hk as lba,DB as mba,Hr as nba,IB as oba,vB as pba,yB as qba,vr as rba,yr as sba,Cr as tba,S as uba,xq as vba,Sr as wba,m0 as xba,br as yba,SB as zba,Eq as Aba,rk as Bba,mB as Cba,pr as Dba,dr as Eba,uB as Fba,yq as Gba,QN as Hba,sB as Iba,rr as Jba,tr as Kba,zN as Lba,nB as Mba,rB as Nba,er as Oba,Zt as Pba,Xt as Qba,MN as Rba,FN as Sba,qt as Tba,qL as Uba,F7 as Vba,JL as Wba,W4 as Xba,jN as Yba,ON as Zba,$6 as _ba,$L as $ba,YL as aca,LL as bca,_L as cca,RL as dca,ML as eca,At as fca,FL as gca,St as hca,SN as ica,bt as jca,g as kca,ft as lca,fN as mca,gt as nca,mt as oca,ut as pca,pt as qca,dt as rca,p0 as sca};
|