@claudiolabs/claudio 0.1.12 → 0.1.14
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/claudio +7 -0
- package/dist/chunks/AgentTool-0.1.14-cdr5h1g4.mjs +1 -0
- package/dist/chunks/App-0.1.14-pg2tqqjz.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.1.14-e86h3nff.mjs +1 -0
- package/dist/chunks/{AssistantSessionChooser-0.1.12-x3zt5579.mjs → AssistantSessionChooser-0.1.14-tf848k8v.mjs} +1 -1
- package/dist/chunks/AutoModeOptInDialog-0.1.14-ftdkaf8h.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.1.14-d45z21x5.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.14-dzhpgrhm.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.1.14-y2v8vg76.mjs +1 -0
- package/dist/chunks/{DiffDialog-0.1.12-tzjdg5ys.mjs → DiffDialog-0.1.14-wtx2wmbs.mjs} +1 -1
- package/dist/chunks/Doctor-0.1.14-rhryp3qj.mjs +1 -0
- package/dist/chunks/Grove-0.1.14-4pt83x25.mjs +1 -0
- package/dist/chunks/ITermBackend-0.1.14-xtdr5bmp.mjs +1 -0
- package/dist/chunks/{InProcessTransport-0.1.12-xnrc78z1.mjs → InProcessTransport-0.1.14-wdqgcpb4.mjs} +1 -1
- package/dist/chunks/InvalidConfigDialog-0.1.14-rx2djmka.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.1.14-nhkj2max.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.1.14-f6hf3ymp.mjs +1 -0
- package/dist/chunks/Onboarding-0.1.14-1rddgg2b.mjs +1 -0
- package/dist/chunks/ProviderManager-0.1.14-2d77t0cr.mjs +1 -0
- package/dist/chunks/REPL-0.1.14-rz1jsayd.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.1.14-79hg5s2w.mjs +1 -0
- package/dist/chunks/{SnapshotUpdateDialog-0.1.12-f1byjres.mjs → SnapshotUpdateDialog-0.1.14-sbjnsz3c.mjs} +1 -1
- package/dist/chunks/TeleportProgress-0.1.14-411m3y24.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.1.14-v6ytg24w.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.1.14-8wfa8twy.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.1.14-175xkeyy.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.1.14-rpbvvb5j.mjs +1 -0
- package/dist/chunks/TrustDialog-0.1.14-zvmfmtg5.mjs +1 -0
- package/dist/chunks/activeProvider-0.1.14-5cpywex1.mjs +1 -0
- package/dist/chunks/add-dir-0.1.14-q700x1tp.mjs +1 -0
- package/dist/chunks/agents-0.1.14-nm4k11re.mjs +3 -0
- package/dist/chunks/{agents-0.1.12-vfwpnn0d.mjs → agents-0.1.14-pjr42t23.mjs} +2 -2
- package/dist/chunks/api-0.1.14-v09922m9.mjs +1 -0
- package/dist/chunks/{asciicast-0.1.12-nwzfr5gz.mjs → asciicast-0.1.14-kgp9j4z6.mjs} +1 -1
- package/dist/chunks/assistant-0.1.14-yt6v1sjy.mjs +1 -0
- package/dist/chunks/auth-0.1.14-vg6ez70v.mjs +1 -0
- package/dist/chunks/{auth-0.1.12-vhdwtwhb.mjs → auth-0.1.14-vj6095mm.mjs} +1 -1
- package/dist/chunks/{autoMode-0.1.12-xjr5qd6q.mjs → autoMode-0.1.14-jxse6h16.mjs} +1 -1
- package/dist/chunks/backgroundHousekeeping-0.1.14-bh13ez8a.mjs +1 -0
- package/dist/chunks/branch-0.1.14-r5tt7cec.mjs +4 -0
- package/dist/chunks/{bridgePointer-0.1.12-vdj4j4ke.mjs → bridgePointer-0.1.14-2w1wvxgt.mjs} +1 -1
- package/dist/chunks/btw-0.1.14-j1cexrtn.mjs +1 -0
- package/dist/chunks/{buddy-0.1.12-4q50s2x4.mjs → buddy-0.1.14-r4nmfbke.mjs} +1 -1
- package/dist/chunks/cacache-0.1.14-3vw5qkqs.mjs +1 -0
- package/dist/chunks/{cache-probe-0.1.12-4s8cc2km.mjs → cache-probe-0.1.14-zfb6aw4f.mjs} +1 -1
- package/dist/chunks/{cacheStats-0.1.12-qqcw6b5n.mjs → cacheStats-0.1.14-15eahew3.mjs} +1 -1
- package/dist/chunks/caches-0.1.14-et2zg3m5.mjs +1 -0
- package/dist/chunks/{claudeDesktop-0.1.12-1yrkynq4.mjs → claudeDesktop-0.1.14-0df0z4v6.mjs} +1 -1
- package/dist/chunks/claudemd-0.1.14-exzt8psa.mjs +1 -0
- package/dist/chunks/clear-0.1.14-62gnxkg3.mjs +1 -0
- package/dist/chunks/clearTerminal-0.1.14-5p1j5sbv.mjs +1 -0
- package/dist/chunks/cli-0.1.14-08ambmnj.mjs +2 -0
- package/dist/chunks/cli-0.1.14-0a8ckx07.mjs +2 -0
- package/dist/chunks/cli-0.1.14-0ctjta81.mjs +5 -0
- package/dist/chunks/{cli-0.1.12-faa9mx3m.mjs → cli-0.1.14-0kzzfe41.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-0nhaxy76.mjs +4 -0
- package/dist/chunks/{cli-0.1.12-q63qrz06.mjs → cli-0.1.14-0x3m90bk.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-v000x470.mjs → cli-0.1.14-16jrehc2.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-352pjhkh.mjs → cli-0.1.14-1g5jq0j8.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-1shkmy81.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-trdq9d6x.mjs → cli-0.1.14-1xkst5wv.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-rwhrpb6w.mjs → cli-0.1.14-244fknyr.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-1x06khjr.mjs → cli-0.1.14-25ta9abj.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-0vf5f6qn.mjs → cli-0.1.14-28exj8zm.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-2e2jfccr.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-vzga2are.mjs → cli-0.1.14-2f7s5xbd.mjs} +6 -6
- package/dist/chunks/{cli-0.1.12-rzpc0tr9.mjs → cli-0.1.14-2mzb5ath.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-373staaj.mjs +2 -0
- package/dist/chunks/cli-0.1.14-39y8qfj7.mjs +2 -0
- package/dist/chunks/cli-0.1.14-3m63hy2a.mjs +3 -0
- package/dist/chunks/cli-0.1.14-3scecgzx.mjs +6 -0
- package/dist/chunks/{cli-0.1.12-g2s9mjr6.mjs → cli-0.1.14-3w7fbjhy.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-9pq0gse0.mjs → cli-0.1.14-3xj419mp.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-yk12dgnx.mjs → cli-0.1.14-3yj4dkmn.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-3zj4s594.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-ae3e3ffp.mjs → cli-0.1.14-42sm5vzr.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-442a367x.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-jqrk975g.mjs → cli-0.1.14-473sgexj.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-6238zg7k.mjs → cli-0.1.14-4mde8z7h.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-9v01t95v.mjs → cli-0.1.14-4tmbgg29.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-4wdh3k7y.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-vxej5jdm.mjs → cli-0.1.14-59axynr8.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-qsh4sj4y.mjs → cli-0.1.14-5brvxst8.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-5e5kkjam.mjs +2 -0
- package/dist/chunks/cli-0.1.14-5rp4y3q2.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-0eznapyf.mjs → cli-0.1.14-5te1nbdc.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-68wbwy40.mjs +4 -0
- package/dist/chunks/cli-0.1.14-6cjjzttb.mjs +3 -0
- package/dist/chunks/{cli-0.1.12-v8j9zstg.mjs → cli-0.1.14-71m91842.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-0kqx19vz.mjs → cli-0.1.14-71sp86jb.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-d0es0fxd.mjs → cli-0.1.14-77ha4n58.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-a2qh6gjr.mjs → cli-0.1.14-7zjhrz42.mjs} +3 -3
- package/dist/chunks/{cli-0.1.12-r6f9sy54.mjs → cli-0.1.14-7zz7abpc.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-86gckvrm.mjs +2 -0
- package/dist/chunks/cli-0.1.14-893g12wf.mjs +2 -0
- package/dist/chunks/cli-0.1.14-8fr10t94.mjs +17 -0
- package/dist/chunks/{cli-0.1.12-3ywnr2v1.mjs → cli-0.1.14-90zkq8jm.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-9b8kspnd.mjs +2 -0
- package/dist/chunks/cli-0.1.14-9evp0ewn.mjs +2 -0
- package/dist/chunks/cli-0.1.14-9gem156t.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-hsw67esw.mjs → cli-0.1.14-9kxzs20h.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-4wwhk7dc.mjs → cli-0.1.14-9vc52dnj.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-a15xdexp.mjs +12 -0
- package/dist/chunks/cli-0.1.14-a6kwmqhz.mjs +16 -0
- package/dist/chunks/{cli-0.1.12-37ga9zc2.mjs → cli-0.1.14-a9ytrehs.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-7ehqw1dk.mjs → cli-0.1.14-ab0rxxvk.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-mr41yjpw.mjs → cli-0.1.14-adz0gnzy.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-ktpqrbjc.mjs → cli-0.1.14-aky5tegx.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-vgbc3g9x.mjs → cli-0.1.14-akz49g5v.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-sgtpyf6y.mjs → cli-0.1.14-as1s0b0t.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-as9nq99n.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-5exp787z.mjs → cli-0.1.14-ba919tmj.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-bat0c779.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-v0510w04.mjs → cli-0.1.14-bgqm4vsk.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-756ngehz.mjs → cli-0.1.14-c0bv9eha.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-f0x1y6nn.mjs → cli-0.1.14-c4v2kfdn.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-xekep4qg.mjs → cli-0.1.14-canpypsb.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-g3ycbjxk.mjs → cli-0.1.14-cdby401e.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-ch9c9c38.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-nv2m8kgk.mjs → cli-0.1.14-ckjcet41.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-c23pyffx.mjs → cli-0.1.14-cp2pada5.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-d1edbjh4.mjs +25 -0
- package/dist/chunks/{cli-0.1.12-z8eybrhz.mjs → cli-0.1.14-d483gd53.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-d8m01qtm.mjs → cli-0.1.14-d4zkffre.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-ps94e9y5.mjs → cli-0.1.14-dcgxqsyp.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-dntkrp1j.mjs +134 -0
- package/dist/chunks/cli-0.1.14-dq7jkw1n.mjs +2 -0
- package/dist/chunks/cli-0.1.14-dqads3y3.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-8znn9f50.mjs → cli-0.1.14-dt11hwkv.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-kys514qx.mjs → cli-0.1.14-dw74ppax.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-dz2jvye2.mjs +2 -0
- package/dist/chunks/cli-0.1.14-e40hm9sd.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-2zqgfhrb.mjs → cli-0.1.14-edjtfw4q.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-efhhkgkx.mjs +2 -0
- package/dist/chunks/cli-0.1.14-eq0gbnpg.mjs +2 -0
- package/dist/chunks/cli-0.1.14-et8yewbf.mjs +2 -0
- package/dist/chunks/cli-0.1.14-fdpfr31f.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-mwp84gtr.mjs → cli-0.1.14-fhfj87ej.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-zs5rpqmb.mjs → cli-0.1.14-fmgz6tx2.mjs} +3 -3
- package/dist/chunks/{cli-0.1.12-ds2mn8zn.mjs → cli-0.1.14-fmmxw3gj.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-5ye0t0xd.mjs → cli-0.1.14-fspxpmh7.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-h0d833vg.mjs → cli-0.1.14-ftjxb57b.mjs} +4 -4
- package/dist/chunks/{cli-0.1.12-wdmxm11z.mjs → cli-0.1.14-g5q2xqp3.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-gdm27acz.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-ytxphavm.mjs → cli-0.1.14-harz1d9d.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-qn20n18h.mjs → cli-0.1.14-heevc19y.mjs} +5 -5
- package/dist/chunks/{cli-0.1.12-04jw23rj.mjs → cli-0.1.14-hjktwgtk.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-hkaqyhx1.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-4syxz3pe.mjs → cli-0.1.14-hvfg45y0.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-04v3yab2.mjs → cli-0.1.14-hxvzvfr2.mjs} +3 -3
- package/dist/chunks/cli-0.1.14-j5sbzwhy.mjs +5045 -0
- package/dist/chunks/cli-0.1.14-ja2ctrem.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-m6jeef2z.mjs → cli-0.1.14-jbn4ywda.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-7xsa2bcp.mjs → cli-0.1.14-jf8019sb.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-jnfs73kb.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-4qedbzt3.mjs → cli-0.1.14-jpe9sxch.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-7mjpbm22.mjs → cli-0.1.14-k8nwm06m.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-j6hwb68p.mjs → cli-0.1.14-k9jcmxtd.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-ka0xhrv6.mjs +2 -0
- package/dist/chunks/cli-0.1.14-kcrsww4s.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-bh7jp3zk.mjs → cli-0.1.14-khtq9cgy.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-j6gjfwh5.mjs → cli-0.1.14-kmsvd61a.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-zk49aaxv.mjs → cli-0.1.14-kn1f2x94.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-kpsh76mj.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-34gqc6yf.mjs → cli-0.1.14-kt6sq4nr.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-w0qbr98a.mjs → cli-0.1.14-ktz3cgwa.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-y04asmqh.mjs → cli-0.1.14-kv650aha.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-024a8zz7.mjs → cli-0.1.14-m75ce5ve.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-m7khgn2k.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-fqpxr3qb.mjs → cli-0.1.14-m7xchegb.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-bhxgr018.mjs → cli-0.1.14-mgcmwvcn.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-238c85zt.mjs → cli-0.1.14-mngn74ga.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-mx9yse7m.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-ng34ay3g.mjs → cli-0.1.14-nbvvdkk2.mjs} +1 -1
- package/dist/chunks/{cli-0.1.12-830kqdpq.mjs → cli-0.1.14-nkza93de.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-nmmtd1d6.mjs +2 -0
- package/dist/chunks/cli-0.1.14-nnr43nyg.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-xj3mv67x.mjs → cli-0.1.14-nprcbhwn.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-86nmrm6g.mjs → cli-0.1.14-ntq8w1ss.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-73k5qd97.mjs → cli-0.1.14-nxphqjb4.mjs} +7 -10
- package/dist/chunks/{cli-0.1.12-8qvgy8xr.mjs → cli-0.1.14-nzsj259d.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-qe5zyvfh.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-1hv04bp7.mjs → cli-0.1.14-qn4ftczz.mjs} +1 -1
- package/dist/chunks/{cli-0.1.12-4sh0f4y1.mjs → cli-0.1.14-qyx55m6c.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-qzcceap6.mjs +20 -0
- package/dist/chunks/{cli-0.1.12-s0cwq66w.mjs → cli-0.1.14-r00mjm41.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-r46jh9af.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-c28bme4j.mjs → cli-0.1.14-r5qyt63x.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-erggrdth.mjs → cli-0.1.14-rc5yd94n.mjs} +3 -3
- package/dist/chunks/{cli-0.1.12-cxn1ke77.mjs → cli-0.1.14-rtstk94r.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-ra3sby5b.mjs → cli-0.1.14-s9m1y93w.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-sb7dm65b.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-bddm1g1s.mjs → cli-0.1.14-seq2fm2d.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-sn1rf71y.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-rwzav5h1.mjs → cli-0.1.14-stv1d0q3.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-svqkx41a.mjs +2 -0
- package/dist/chunks/cli-0.1.14-t3fga5je.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-a5h71tt8.mjs → cli-0.1.14-ta3w93yb.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-t8712dbc.mjs → cli-0.1.14-tkb5t0xv.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-7da43cy1.mjs → cli-0.1.14-tqexnkmz.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-41zq3gv6.mjs → cli-0.1.14-tsth8deg.mjs} +1 -1
- package/dist/chunks/cli-0.1.14-tyv29sz9.mjs +2 -0
- package/dist/chunks/cli-0.1.14-v2acyy7r.mjs +4 -0
- package/dist/chunks/{cli-0.1.12-9gs0g8yb.mjs → cli-0.1.14-v9q1cxjy.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-c47ape20.mjs → cli-0.1.14-vp1kn532.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-w3rwfr1d.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-tyt09z73.mjs → cli-0.1.14-w6nzk5dc.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-w8efvbh6.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-awb2yac7.mjs → cli-0.1.14-we6s7jfg.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-bjzb0sjt.mjs → cli-0.1.14-wgatq2fj.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-k2164g7e.mjs → cli-0.1.14-whe4bxfr.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-wwehdfwx.mjs +9 -0
- package/dist/chunks/{cli-0.1.12-0xzdygm2.mjs → cli-0.1.14-wymtdw5f.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-actnmgw5.mjs → cli-0.1.14-wz5yr49j.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-a2frnpdd.mjs → cli-0.1.14-x88ypr2r.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-xp6rc33g.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-6ddq5n4e.mjs → cli-0.1.14-y2wxptpk.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-y55hrwdp.mjs +3 -0
- package/dist/chunks/{cli-0.1.12-wcdh3m4s.mjs → cli-0.1.14-y56629hj.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-g728hcdr.mjs → cli-0.1.14-yagh75p5.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-ydm3fwx1.mjs +2 -0
- package/dist/chunks/cli-0.1.14-yfc7weqn.mjs +821 -0
- package/dist/chunks/{cli-0.1.12-qrx9nssg.mjs → cli-0.1.14-yphht6rx.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-kzd4y6yq.mjs → cli-0.1.14-yxce1bdc.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-yxq1tr3a.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-5pw10pf8.mjs → cli-0.1.14-z0ckw2hb.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-z8j2n955.mjs +2 -0
- package/dist/chunks/{cli-0.1.12-2fajd44n.mjs → cli-0.1.14-zjqt3r89.mjs} +2 -2
- package/dist/chunks/{cli-0.1.12-af1r644n.mjs → cli-0.1.14-zq66y0mv.mjs} +2 -2
- package/dist/chunks/cli-0.1.14-zrmretjp.mjs +4 -0
- package/dist/chunks/cli-0.1.14-zs4vmj7z.mjs +4 -0
- package/dist/chunks/client-0.1.14-3t6sfwha.mjs +1 -0
- package/dist/chunks/color-0.1.14-65rf0ap9.mjs +1 -0
- package/dist/chunks/compact-0.1.14-mx9ng433.mjs +3 -0
- package/dist/chunks/config-0.1.14-1v5v86ax.mjs +1 -0
- package/dist/chunks/config-0.1.14-76vavy7t.mjs +1 -0
- package/dist/chunks/context-0.1.14-hyykwj83.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.1.14-24qfm7b9.mjs +1 -0
- package/dist/chunks/conversation-0.1.14-mkc1cd5a.mjs +1 -0
- package/dist/chunks/{copy-0.1.12-w6tabpy0.mjs → copy-0.1.14-kp76nh7r.mjs} +1 -1
- package/dist/chunks/cost-0.1.14-3d4g5gqm.mjs +1 -0
- package/dist/chunks/createSession-0.1.14-8599rbgg.mjs +1 -0
- package/dist/chunks/desktop-0.1.14-bx4eky6b.mjs +1 -0
- package/dist/chunks/detectRepository-0.1.14-8yam7kv4.mjs +1 -0
- package/dist/chunks/detection-0.1.14-vz5bqsc0.mjs +1 -0
- package/dist/chunks/diff-0.1.14-e4pm39ee.mjs +1 -0
- package/dist/chunks/doctor-0.1.14-22fc2q8y.mjs +1 -0
- package/dist/chunks/earlyInput-0.1.14-997vtdw4.mjs +1 -0
- package/dist/chunks/effort-0.1.14-d9xmff2t.mjs +8 -0
- package/dist/chunks/environmentSelection-0.1.14-fn5p85z5.mjs +1 -0
- package/dist/chunks/environments-0.1.14-7napbg6g.mjs +1 -0
- package/dist/chunks/exit-0.1.14-v8j7rsfw.mjs +1 -0
- package/dist/chunks/export-0.1.14-qpt72paa.mjs +2 -0
- package/dist/chunks/extra-usage-0.1.14-tmwgn4dh.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.1.14-b2pdph8q.mjs +1 -0
- package/dist/chunks/fast-0.1.14-q1tyk3k8.mjs +1 -0
- package/dist/chunks/feedback-0.1.14-qhk5ek0b.mjs +14 -0
- package/dist/chunks/{firstPartyEventLogger-0.1.12-95kzm3md.mjs → firstPartyEventLogger-0.1.14-78y09nr6.mjs} +1 -1
- package/dist/chunks/git-0.1.14-zvsa13gk.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.1.14-r30t00rx.mjs +1 -0
- package/dist/chunks/{growthbook-0.1.12-4phnr6b3.mjs → growthbook-0.1.14-dcdeqgyq.mjs} +1 -1
- package/dist/chunks/{heapdump-0.1.12-m49qs4r7.mjs → heapdump-0.1.14-tj7w79dt.mjs} +1 -1
- package/dist/chunks/help-0.1.14-gk9s0stg.mjs +1 -0
- package/dist/chunks/{hookChains-0.1.12-brq8x7f7.mjs → hookChains-0.1.14-wng6tzfd.mjs} +2 -2
- package/dist/chunks/hooks-0.1.14-jy9bt7s6.mjs +79 -0
- package/dist/chunks/hooks-0.1.14-ybdbkdfh.mjs +1 -0
- package/dist/chunks/{ide-0.1.12-553mazfs.mjs → ide-0.1.14-0ar60k4r.mjs} +1 -1
- package/dist/chunks/image-processor-napi-0.1.14-p1r3vkb0.mjs +1 -0
- package/dist/chunks/index-0.1.14-071xy8v4.mjs +1 -0
- package/dist/chunks/index-0.1.14-1mttyja2.mjs +2 -0
- package/dist/chunks/index-0.1.14-272zxs9n.mjs +1 -0
- package/dist/chunks/index-0.1.14-2v6wa4p4.mjs +1 -0
- package/dist/chunks/{index-0.1.12-3nbh75ta.mjs → index-0.1.14-2x59va64.mjs} +1 -1
- package/dist/chunks/index-0.1.14-3m7vrt91.mjs +1 -0
- package/dist/chunks/index-0.1.14-4hv4f8g9.mjs +1 -0
- package/dist/chunks/index-0.1.14-8v5xwttx.mjs +10 -0
- package/dist/chunks/index-0.1.14-ac13h1t1.mjs +1 -0
- package/dist/chunks/index-0.1.14-dmbjzapt.mjs +2 -0
- package/dist/chunks/index-0.1.14-g5kkm9ng.mjs +1 -0
- package/dist/chunks/index-0.1.14-h8gc6ph5.mjs +1 -0
- package/dist/chunks/index-0.1.14-hqphn8m5.mjs +5 -0
- package/dist/chunks/index-0.1.14-ksa4vdak.mjs +9 -0
- package/dist/chunks/index-0.1.14-mzhk0gvs.mjs +1 -0
- package/dist/chunks/index-0.1.14-qrykb444.mjs +9 -0
- package/dist/chunks/index-0.1.14-qvap58wt.mjs +1 -0
- package/dist/chunks/index-0.1.14-vygpnv88.mjs +1 -0
- package/dist/chunks/index-0.1.14-wjc5jkvz.mjs +1 -0
- package/dist/chunks/{index-0.1.12-rhj8dsvk.mjs → index-0.1.14-y3aj57xa.mjs} +1 -1
- package/dist/chunks/index-0.1.14-yjw9017n.mjs +1 -0
- package/dist/chunks/index-0.1.14-zgwbnfqh.mjs +1 -0
- package/dist/chunks/initReplBridge-0.1.14-qe820gff.mjs +1 -0
- package/dist/chunks/ink-0.1.14-kxs7ygns.mjs +1 -0
- package/dist/chunks/{insights-0.1.12-93mz1f1d.mjs → insights-0.1.14-9n58d9t8.mjs} +3 -3
- package/dist/chunks/install-0.1.14-1zyjez10.mjs +1 -0
- package/dist/chunks/{install-github-app-0.1.12-qd8g81v4.mjs → install-github-app-0.1.14-kmetkgdq.mjs} +1 -1
- package/dist/chunks/install-slack-app-0.1.14-64534gsm.mjs +1 -0
- package/dist/chunks/instrumentation-0.1.14-fsgk97cp.mjs +12 -0
- package/dist/chunks/interactiveHelpers-0.1.14-ca4bp7gy.mjs +1 -0
- package/dist/chunks/keybindings-0.1.14-zk3nyh0h.mjs +2 -0
- package/dist/chunks/knowledge-0.1.14-f7w4damb.mjs +2 -0
- package/dist/chunks/loadAgentsDir-0.1.14-md40mt17.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.1.14-d998c7wf.mjs +1 -0
- package/dist/chunks/lsp-0.1.14-cks4jevz.mjs +1 -0
- package/dist/chunks/main-0.1.14-94wst05h.mjs +1 -0
- package/dist/chunks/managedEnv-0.1.14-tvr9zhbp.mjs +1 -0
- package/dist/chunks/mcp-0.1.14-3tzc0agq.mjs +1 -0
- package/dist/chunks/{mcp-0.1.12-vm3tpth6.mjs → mcp-0.1.14-dmtc9tjr.mjs} +3 -3
- package/dist/chunks/mcp-0.1.14-tepbr987.mjs +4 -0
- package/dist/chunks/mcpServer-0.1.14-0mvs3bcw.mjs +1 -0
- package/dist/chunks/mcpb-0.1.14-ffa57420.mjs +1 -0
- package/dist/chunks/memory-0.1.14-cgx518q9.mjs +3 -0
- package/dist/chunks/{mobile-0.1.12-qdtxwz76.mjs → mobile-0.1.14-bwjnmpy0.mjs} +1 -1
- package/dist/chunks/model-0.1.14-rq2dkze7.mjs +2 -0
- package/dist/chunks/model-0.1.14-zg566cz0.mjs +1 -0
- package/dist/chunks/{oauth-0.1.12-3aky0v8n.mjs → oauth-0.1.14-gftadks2.mjs} +1 -1
- package/dist/chunks/{openaiShim-0.1.12-p458t1q6.mjs → openaiShim-0.1.14-jv6416m8.mjs} +2 -2
- package/dist/chunks/{output-style-0.1.12-cahkbh9x.mjs → output-style-0.1.14-v41ce6t5.mjs} +1 -1
- package/dist/chunks/package-WSP46L7M-0.1.14-xy3ej2c4.mjs +1 -0
- package/dist/chunks/parser-0.1.14-jr4b3as9.mjs +1 -0
- package/dist/chunks/passes-0.1.14-0jjh5wg5.mjs +1 -0
- package/dist/chunks/permissions-0.1.14-hh0d709r.mjs +3 -0
- package/dist/chunks/plan-0.1.14-kxb7xax2.mjs +1 -0
- package/dist/chunks/plist-0.1.14-ssqtjjq9.mjs +1 -0
- package/dist/chunks/plugin-0.1.14-01jhhdd3.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.1.14-zjwy126p.mjs +1 -0
- package/dist/chunks/{plugins-0.1.12-sm87b8fm.mjs → plugins-0.1.14-4tggkexv.mjs} +2 -2
- package/dist/chunks/{print-0.1.12-8mgqmx4k.mjs → print-0.1.14-m719w2yp.mjs} +10 -10
- package/dist/chunks/privacy-settings-0.1.14-2gv7gdy1.mjs +1 -0
- package/dist/chunks/{process-0.1.12-t401v84c.mjs → process-0.1.14-vgdgd7sq.mjs} +1 -1
- package/dist/chunks/processBashCommand-0.1.14-d3xsyk5f.mjs +1 -0
- package/dist/chunks/processSlashCommand-0.1.14-7w1v93bg.mjs +9 -0
- package/dist/chunks/prompt-0.1.14-30e7kfkx.mjs +1 -0
- package/dist/chunks/prompt-0.1.14-brtd9j19.mjs +1 -0
- package/dist/chunks/prompts-0.1.14-bv9qxc0a.mjs +1 -0
- package/dist/chunks/provider-0.1.14-xs34vy3w.mjs +2 -0
- package/dist/chunks/providerProfiles-0.1.14-068kvwwx.mjs +1 -0
- package/dist/chunks/rate-limit-options-0.1.14-2ftxh15k.mjs +1 -0
- package/dist/chunks/registry-0.1.14-ad3na7g6.mjs +1 -0
- package/dist/chunks/release-notes-0.1.14-b7e554an.mjs +5 -0
- package/dist/chunks/reload-plugins-0.1.14-3w9v6nw6.mjs +2 -0
- package/dist/chunks/remote-env-0.1.14-jyc0gkhb.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-0.1.14-8kt4ffzy.mjs +1 -0
- package/dist/chunks/remoteSession-0.1.14-ppejxt7n.mjs +1 -0
- package/dist/chunks/rename-0.1.14-tx9dpgk1.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.1.14-gsqgzdev.mjs +1 -0
- package/dist/chunks/resume-0.1.14-7sda36n0.mjs +2 -0
- package/dist/chunks/{rewind-0.1.12-707se5pz.mjs → rewind-0.1.14-zba66at0.mjs} +1 -1
- package/dist/chunks/sandbox-adapter-0.1.14-k97fyzcg.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.1.14-jz6x02qp.mjs +1 -0
- package/dist/chunks/session-0.1.14-5qsfxmey.mjs +2 -0
- package/dist/chunks/sessionFileAccessHooks-0.1.14-mgx78eqm.mjs +1 -0
- package/dist/chunks/sessionStorage-0.1.14-sz2medpp.mjs +1 -0
- package/dist/chunks/setup-0.1.14-f13rnmdg.mjs +5 -0
- package/dist/chunks/sinks-0.1.14-bkyqa9eq.mjs +1 -0
- package/dist/chunks/skills-0.1.14-1vvr60ph.mjs +1 -0
- package/dist/chunks/startupProfiler-0.1.14-sabjns03.mjs +1 -0
- package/dist/chunks/state-0.1.14-rj00ry6n.mjs +1 -0
- package/dist/chunks/{stats-0.1.12-5pj1c6sr.mjs → stats-0.1.14-rr3tpwqw.mjs} +1 -1
- package/dist/chunks/status-0.1.14-d4fcn5sn.mjs +1 -0
- package/dist/chunks/stickers-0.1.14-s9x2bdhp.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.1.14-spqyrvd7.mjs +1 -0
- package/dist/chunks/tasks-0.1.14-yje1cmy8.mjs +1 -0
- package/dist/chunks/teamHelpers-0.1.14-zv908fgk.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.1.14-natmxyx5.mjs +1 -0
- package/dist/chunks/teleport-0.1.14-np0wrxrm.mjs +1 -0
- package/dist/chunks/terminalSetup-0.1.14-dzsstmk7.mjs +1 -0
- package/dist/chunks/theme-0.1.14-202es8wd.mjs +1 -0
- package/dist/chunks/thinkback-0.1.14-k4krnzrn.mjs +1 -0
- package/dist/chunks/thinkback-play-0.1.14-nn1v84ja.mjs +1 -0
- package/dist/chunks/toolPool-0.1.14-4etecef4.mjs +1 -0
- package/dist/chunks/toolSearch-0.1.14-q506jg4k.mjs +1 -0
- package/dist/chunks/trustedDevice-0.1.14-qq8dmccd.mjs +1 -0
- package/dist/chunks/{turndown.cjs-0.1.12-9525v010.mjs → turndown.cjs-0.1.14-nw2rtcyd.mjs} +1 -1
- package/dist/chunks/{ultrareviewCommand-0.1.12-d5c4096k.mjs → ultrareviewCommand-0.1.14-9twnt5bp.mjs} +1 -1
- package/dist/chunks/{update-0.1.12-hwx0e6fq.mjs → update-0.1.14-9dhep94r.mjs} +11 -11
- package/dist/chunks/upgrade-0.1.14-4nr1rdba.mjs +1 -0
- package/dist/chunks/{upstreamproxy-0.1.12-yhnqfcyb.mjs → upstreamproxy-0.1.14-sc0x4n7b.mjs} +1 -1
- package/dist/chunks/usage-0.1.14-sbaqxx8h.mjs +1 -0
- package/dist/chunks/util-0.1.14-vfg50acy.mjs +1 -0
- package/dist/chunks/utils-0.1.14-heqqycdx.mjs +1 -0
- package/dist/chunks/vim-0.1.14-z71303w7.mjs +1 -0
- package/dist/chunks/watcher-0.1.14-h1wk07kt.mjs +1 -0
- package/dist/chunks/{wiki-0.1.12-vecp82xq.mjs → wiki-0.1.14-s3exyf45.mjs} +1 -1
- package/dist/chunks/worktree-0.1.14-5486fw5t.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.1.14-xn1mf8hc.mjs +1 -0
- package/dist/chunks/{wrapper-0.1.12-bpewypaz.mjs → wrapper-0.1.14-a4mesaeh.mjs} +1 -1
- package/dist/claudio-vscode.vsix +0 -0
- package/dist/cli.mjs +5 -5
- package/package.json +2 -19
- package/dist/chunks/AgentTool-0.1.12-kgypyeny.mjs +0 -1
- package/dist/chunks/App-0.1.12-t1g68ag4.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.1.12-zpw36mzg.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.1.12-fgvj28kh.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.1.12-y1vnt631.mjs +0 -1
- package/dist/chunks/ClaudeInChromeOnboarding-0.1.12-n4az8bcp.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.12-j7w4pe1r.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.1.12-57crf0yg.mjs +0 -1
- package/dist/chunks/Doctor-0.1.12-52dk0t0z.mjs +0 -1
- package/dist/chunks/Grove-0.1.12-m9r696vw.mjs +0 -1
- package/dist/chunks/ITermBackend-0.1.12-85zqw000.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.1.12-9w4z4d73.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.1.12-j1jmd6jg.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.1.12-n5zwn0kh.mjs +0 -1
- package/dist/chunks/Onboarding-0.1.12-tc4trc3y.mjs +0 -1
- package/dist/chunks/ProviderManager-0.1.12-01epdnc3.mjs +0 -1
- package/dist/chunks/REPL-0.1.12-4750qvss.mjs +0 -1
- package/dist/chunks/ResumeConversation-0.1.12-sn3hxnfq.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.1.12-p5spc4b6.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.1.12-562cbm4h.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-0.1.12-w2rds1kj.mjs +0 -1
- package/dist/chunks/TmuxBackend-0.1.12-02kj3wef.mjs +0 -9
- package/dist/chunks/ToolSearchTool-0.1.12-qesye0kj.mjs +0 -1
- package/dist/chunks/TrustDialog-0.1.12-gr62n6f8.mjs +0 -1
- package/dist/chunks/activeProvider-0.1.12-dnn18th9.mjs +0 -1
- package/dist/chunks/add-dir-0.1.12-he4qjfr7.mjs +0 -1
- package/dist/chunks/agents-0.1.12-1dz073e3.mjs +0 -3
- package/dist/chunks/api-0.1.12-e314x4g9.mjs +0 -1
- package/dist/chunks/assistant-0.1.12-x4e2qcyw.mjs +0 -1
- package/dist/chunks/auth-0.1.12-9xrz11cs.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-0.1.12-z7jhyx9z.mjs +0 -1
- package/dist/chunks/branch-0.1.12-e2jz4k8j.mjs +0 -4
- package/dist/chunks/btw-0.1.12-k5gxnrq8.mjs +0 -1
- package/dist/chunks/cacache-0.1.12-mtaw8981.mjs +0 -1
- package/dist/chunks/caches-0.1.12-jvzzcs09.mjs +0 -1
- package/dist/chunks/chrome-0.1.12-6qypq8nj.mjs +0 -1
- package/dist/chunks/chromeNativeHost-0.1.12-7e2jv2nr.mjs +0 -2
- package/dist/chunks/claude-for-chrome-mcp-0.1.12-2q97mema.mjs +0 -1
- package/dist/chunks/claudemd-0.1.12-dnz21tgs.mjs +0 -1
- package/dist/chunks/clear-0.1.12-cq6vnm92.mjs +0 -1
- package/dist/chunks/clearTerminal-0.1.12-pzt74jz3.mjs +0 -1
- package/dist/chunks/cli-0.1.12-0x3cd401.mjs +0 -2
- package/dist/chunks/cli-0.1.12-19as1myk.mjs +0 -2
- package/dist/chunks/cli-0.1.12-1cn8b1tj.mjs +0 -2
- package/dist/chunks/cli-0.1.12-242der7s.mjs +0 -5036
- package/dist/chunks/cli-0.1.12-2f2v27e3.mjs +0 -2
- package/dist/chunks/cli-0.1.12-2sqxe53a.mjs +0 -2
- package/dist/chunks/cli-0.1.12-2v18rdhk.mjs +0 -2
- package/dist/chunks/cli-0.1.12-2yy1nw3s.mjs +0 -2
- package/dist/chunks/cli-0.1.12-37ezy1qg.mjs +0 -2
- package/dist/chunks/cli-0.1.12-3d2xpvk2.mjs +0 -2
- package/dist/chunks/cli-0.1.12-4gj8p030.mjs +0 -22
- package/dist/chunks/cli-0.1.12-4tanq0qc.mjs +0 -2
- package/dist/chunks/cli-0.1.12-4ys47rex.mjs +0 -2
- package/dist/chunks/cli-0.1.12-52dbx2x6.mjs +0 -4
- package/dist/chunks/cli-0.1.12-5b3j1c9c.mjs +0 -2
- package/dist/chunks/cli-0.1.12-5k9mfnz0.mjs +0 -2
- package/dist/chunks/cli-0.1.12-5p9g1vcm.mjs +0 -2
- package/dist/chunks/cli-0.1.12-5qhkbp8w.mjs +0 -2
- package/dist/chunks/cli-0.1.12-6e4e36bv.mjs +0 -16
- package/dist/chunks/cli-0.1.12-6rjh20wh.mjs +0 -2
- package/dist/chunks/cli-0.1.12-6x2mnahn.mjs +0 -2
- package/dist/chunks/cli-0.1.12-6zryzryc.mjs +0 -2
- package/dist/chunks/cli-0.1.12-74tt2500.mjs +0 -2
- package/dist/chunks/cli-0.1.12-7v8dtyx8.mjs +0 -2
- package/dist/chunks/cli-0.1.12-817sd5bc.mjs +0 -6
- package/dist/chunks/cli-0.1.12-8qm558mj.mjs +0 -2
- package/dist/chunks/cli-0.1.12-8tdckdxp.mjs +0 -2
- package/dist/chunks/cli-0.1.12-9dvxchv3.mjs +0 -2
- package/dist/chunks/cli-0.1.12-b01yrner.mjs +0 -2
- package/dist/chunks/cli-0.1.12-baxk5jyy.mjs +0 -4
- package/dist/chunks/cli-0.1.12-bmtahtv7.mjs +0 -2
- package/dist/chunks/cli-0.1.12-bnn1nrwd.mjs +0 -2
- package/dist/chunks/cli-0.1.12-bnss4rxn.mjs +0 -833
- package/dist/chunks/cli-0.1.12-c8d9vr4b.mjs +0 -2
- package/dist/chunks/cli-0.1.12-dc4e6688.mjs +0 -2
- package/dist/chunks/cli-0.1.12-dqynn0at.mjs +0 -2
- package/dist/chunks/cli-0.1.12-dtba3gm9.mjs +0 -8
- package/dist/chunks/cli-0.1.12-e262snmb.mjs +0 -3
- package/dist/chunks/cli-0.1.12-e4zeaahk.mjs +0 -2
- package/dist/chunks/cli-0.1.12-fx0zg3d9.mjs +0 -2
- package/dist/chunks/cli-0.1.12-g1yp7kdf.mjs +0 -2
- package/dist/chunks/cli-0.1.12-g4sdgt8h.mjs +0 -2
- package/dist/chunks/cli-0.1.12-g604mknq.mjs +0 -2
- package/dist/chunks/cli-0.1.12-g8mny195.mjs +0 -2
- package/dist/chunks/cli-0.1.12-h248m986.mjs +0 -2
- package/dist/chunks/cli-0.1.12-hfmv72b6.mjs +0 -2
- package/dist/chunks/cli-0.1.12-jjza3gz9.mjs +0 -2
- package/dist/chunks/cli-0.1.12-kea0zcje.mjs +0 -2
- package/dist/chunks/cli-0.1.12-kg8gb6e3.mjs +0 -2
- package/dist/chunks/cli-0.1.12-kwc7ew38.mjs +0 -2
- package/dist/chunks/cli-0.1.12-m3q5r7wd.mjs +0 -2
- package/dist/chunks/cli-0.1.12-mevh0dza.mjs +0 -2
- package/dist/chunks/cli-0.1.12-nfvtmt75.mjs +0 -2
- package/dist/chunks/cli-0.1.12-nnyca8nb.mjs +0 -2
- package/dist/chunks/cli-0.1.12-p5w2kms9.mjs +0 -4
- package/dist/chunks/cli-0.1.12-pm5cwtxh.mjs +0 -2
- package/dist/chunks/cli-0.1.12-pnh4t8c3.mjs +0 -2
- package/dist/chunks/cli-0.1.12-q1nn9teh.mjs +0 -3
- package/dist/chunks/cli-0.1.12-q8k1zvhb.mjs +0 -2
- package/dist/chunks/cli-0.1.12-qf1kw5cr.mjs +0 -2
- package/dist/chunks/cli-0.1.12-rqedb88a.mjs +0 -10
- package/dist/chunks/cli-0.1.12-rtft4mrx.mjs +0 -4
- package/dist/chunks/cli-0.1.12-ryycx3v6.mjs +0 -2
- package/dist/chunks/cli-0.1.12-sd72y750.mjs +0 -12
- package/dist/chunks/cli-0.1.12-strz382t.mjs +0 -2
- package/dist/chunks/cli-0.1.12-sxxpysy8.mjs +0 -2
- package/dist/chunks/cli-0.1.12-tadj1p4y.mjs +0 -2
- package/dist/chunks/cli-0.1.12-tae7cd7e.mjs +0 -2
- package/dist/chunks/cli-0.1.12-taqfqnag.mjs +0 -4
- package/dist/chunks/cli-0.1.12-v79j5ced.mjs +0 -2
- package/dist/chunks/cli-0.1.12-vpnp7x5c.mjs +0 -100
- package/dist/chunks/cli-0.1.12-vwcas8f6.mjs +0 -2
- package/dist/chunks/cli-0.1.12-wfbfq2mm.mjs +0 -3
- package/dist/chunks/cli-0.1.12-wwnkrzck.mjs +0 -134
- package/dist/chunks/cli-0.1.12-xanhpra7.mjs +0 -2
- package/dist/chunks/cli-0.1.12-xcxjv6qd.mjs +0 -2
- package/dist/chunks/cli-0.1.12-xfqkrd5x.mjs +0 -2
- package/dist/chunks/cli-0.1.12-y0fb5j7x.mjs +0 -2
- package/dist/chunks/cli-0.1.12-y9598sy3.mjs +0 -16
- package/dist/chunks/cli-0.1.12-ybm1kvwy.mjs +0 -4
- package/dist/chunks/cli-0.1.12-zwyec6tj.mjs +0 -2
- package/dist/chunks/client-0.1.12-f54egbjx.mjs +0 -1
- package/dist/chunks/color-0.1.12-jss6svg8.mjs +0 -1
- package/dist/chunks/compact-0.1.12-9b9fsqs5.mjs +0 -3
- package/dist/chunks/config-0.1.12-1pyte6wv.mjs +0 -1
- package/dist/chunks/config-0.1.12-ryxz4stj.mjs +0 -1
- package/dist/chunks/context-0.1.12-mnwn2xss.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.1.12-qhe1aprp.mjs +0 -1
- package/dist/chunks/conversation-0.1.12-7pvwtwdn.mjs +0 -1
- package/dist/chunks/cost-0.1.12-3ca0tbv9.mjs +0 -1
- package/dist/chunks/createSession-0.1.12-117q0efg.mjs +0 -1
- package/dist/chunks/desktop-0.1.12-3t2jc3mt.mjs +0 -1
- package/dist/chunks/detectRepository-0.1.12-sd9276rx.mjs +0 -1
- package/dist/chunks/detection-0.1.12-c0tecfvg.mjs +0 -1
- package/dist/chunks/diff-0.1.12-2ck0qzp6.mjs +0 -1
- package/dist/chunks/doctor-0.1.12-rb6t847g.mjs +0 -1
- package/dist/chunks/earlyInput-0.1.12-b94g75cb.mjs +0 -1
- package/dist/chunks/effort-0.1.12-jxkp3wwf.mjs +0 -8
- package/dist/chunks/environmentSelection-0.1.12-z9knjbv1.mjs +0 -1
- package/dist/chunks/environments-0.1.12-m9v7hag6.mjs +0 -1
- package/dist/chunks/exit-0.1.12-0fzdjpbr.mjs +0 -1
- package/dist/chunks/export-0.1.12-s6ag6jke.mjs +0 -2
- package/dist/chunks/extra-usage-0.1.12-x8gd0q32.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.1.12-pfgq5r6b.mjs +0 -1
- package/dist/chunks/fast-0.1.12-9x69m50c.mjs +0 -1
- package/dist/chunks/feedback-0.1.12-d1j49tb4.mjs +0 -14
- package/dist/chunks/git-0.1.12-7fyh5fhk.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.1.12-6em81h7g.mjs +0 -1
- package/dist/chunks/help-0.1.12-f02ce11x.mjs +0 -1
- package/dist/chunks/hooks-0.1.12-n1f9dp3r.mjs +0 -1
- package/dist/chunks/hooks-0.1.12-swtq74gm.mjs +0 -79
- package/dist/chunks/image-processor-napi-0.1.12-3mrm0vts.mjs +0 -1
- package/dist/chunks/index-0.1.12-218arkqe.mjs +0 -9
- package/dist/chunks/index-0.1.12-2ykt90tn.mjs +0 -1
- package/dist/chunks/index-0.1.12-34ew4zjx.mjs +0 -1
- package/dist/chunks/index-0.1.12-41g5mvtk.mjs +0 -7
- package/dist/chunks/index-0.1.12-77szwkm6.mjs +0 -1
- package/dist/chunks/index-0.1.12-aeeh5zvp.mjs +0 -1
- package/dist/chunks/index-0.1.12-cpv0hf3f.mjs +0 -1
- package/dist/chunks/index-0.1.12-d5w1w05d.mjs +0 -1
- package/dist/chunks/index-0.1.12-d7j83tkh.mjs +0 -1
- package/dist/chunks/index-0.1.12-hvf65cbr.mjs +0 -1
- package/dist/chunks/index-0.1.12-m0e193t8.mjs +0 -1
- package/dist/chunks/index-0.1.12-nc3z95ph.mjs +0 -5
- package/dist/chunks/index-0.1.12-r92p75vh.mjs +0 -1
- package/dist/chunks/index-0.1.12-sxh3dwcy.mjs +0 -1
- package/dist/chunks/index-0.1.12-sy5zw7vk.mjs +0 -1
- package/dist/chunks/index-0.1.12-v53nbtdb.mjs +0 -2
- package/dist/chunks/index-0.1.12-vbv1ac2q.mjs +0 -1
- package/dist/chunks/index-0.1.12-z0brwe1k.mjs +0 -2
- package/dist/chunks/index-0.1.12-zc2ayczg.mjs +0 -1
- package/dist/chunks/index-0.1.12-zqrp5tve.mjs +0 -9
- package/dist/chunks/initReplBridge-0.1.12-yyn8mbyh.mjs +0 -1
- package/dist/chunks/ink-0.1.12-qdefs6hn.mjs +0 -1
- package/dist/chunks/install-0.1.12-11xkk6vf.mjs +0 -1
- package/dist/chunks/install-slack-app-0.1.12-a44xy1pr.mjs +0 -1
- package/dist/chunks/instrumentation-0.1.12-nqv5x6q8.mjs +0 -12
- package/dist/chunks/interactiveHelpers-0.1.12-c4xec7dn.mjs +0 -1
- package/dist/chunks/keybindings-0.1.12-21jbfvfp.mjs +0 -2
- package/dist/chunks/knowledge-0.1.12-1zq0qj6h.mjs +0 -2
- package/dist/chunks/loadAgentsDir-0.1.12-1ckjzc8p.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.1.12-85daax4j.mjs +0 -1
- package/dist/chunks/logout-0.1.12-n2tbfcz8.mjs +0 -1
- package/dist/chunks/lsp-0.1.12-ks84es3y.mjs +0 -1
- package/dist/chunks/main-0.1.12-47ck3kj2.mjs +0 -1
- package/dist/chunks/managedEnv-0.1.12-vt155n3n.mjs +0 -1
- package/dist/chunks/mcp-0.1.12-93a71b1q.mjs +0 -1
- package/dist/chunks/mcp-0.1.12-rwfrrttw.mjs +0 -4
- package/dist/chunks/mcpServer-0.1.12-zwsas6ss.mjs +0 -1
- package/dist/chunks/mcpb-0.1.12-mcbd7ywh.mjs +0 -1
- package/dist/chunks/memory-0.1.12-7x2msczw.mjs +0 -3
- package/dist/chunks/model-0.1.12-15e9c8j0.mjs +0 -2
- package/dist/chunks/model-0.1.12-z2qjscwh.mjs +0 -1
- package/dist/chunks/package-HMBVQOZ4-0.1.12-3njzvqd2.mjs +0 -1
- package/dist/chunks/parser-0.1.12-jz2xz2kd.mjs +0 -1
- package/dist/chunks/passes-0.1.12-7vmawmvq.mjs +0 -1
- package/dist/chunks/permissions-0.1.12-dmp58kwy.mjs +0 -3
- package/dist/chunks/plan-0.1.12-waed49m8.mjs +0 -1
- package/dist/chunks/plist-0.1.12-65r770yt.mjs +0 -1
- package/dist/chunks/plugin-0.1.12-j30rqvv5.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-0.1.12-5bp08b06.mjs +0 -1
- package/dist/chunks/privacy-settings-0.1.12-9drzsgkz.mjs +0 -1
- package/dist/chunks/processBashCommand-0.1.12-3s8a2x65.mjs +0 -1
- package/dist/chunks/processSlashCommand-0.1.12-m9sh3sjt.mjs +0 -9
- package/dist/chunks/prompt-0.1.12-786vk11a.mjs +0 -1
- package/dist/chunks/prompt-0.1.12-fg4npvax.mjs +0 -1
- package/dist/chunks/prompts-0.1.12-h3xd9wvy.mjs +0 -1
- package/dist/chunks/provider-0.1.12-wrfpbx8a.mjs +0 -2
- package/dist/chunks/providerProfiles-0.1.12-3fp9n85w.mjs +0 -1
- package/dist/chunks/rate-limit-options-0.1.12-dx2886b6.mjs +0 -1
- package/dist/chunks/registry-0.1.12-btwd6z61.mjs +0 -1
- package/dist/chunks/release-notes-0.1.12-dwzs8z2c.mjs +0 -5
- package/dist/chunks/reload-plugins-0.1.12-ec88j31s.mjs +0 -2
- package/dist/chunks/remote-env-0.1.12-w15618dm.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-0.1.12-c0y46zw8.mjs +0 -1
- package/dist/chunks/remoteSession-0.1.12-npxn0mje.mjs +0 -1
- package/dist/chunks/rename-0.1.12-sbes9wm3.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.1.12-2jqj7bby.mjs +0 -1
- package/dist/chunks/resume-0.1.12-9vpmw2hg.mjs +0 -2
- package/dist/chunks/sandbox-adapter-0.1.12-htfmfp9m.mjs +0 -1
- package/dist/chunks/sandbox-toggle-0.1.12-qq2yf1ta.mjs +0 -1
- package/dist/chunks/session-0.1.12-2xgt0x74.mjs +0 -2
- package/dist/chunks/sessionFileAccessHooks-0.1.12-xpxt6bqs.mjs +0 -1
- package/dist/chunks/sessionStorage-0.1.12-7s6eezdt.mjs +0 -1
- package/dist/chunks/setup-0.1.12-2kjx6mnf.mjs +0 -5
- package/dist/chunks/sinks-0.1.12-qvx26vtt.mjs +0 -1
- package/dist/chunks/skills-0.1.12-sh637gsv.mjs +0 -1
- package/dist/chunks/startupProfiler-0.1.12-n3fce9wg.mjs +0 -1
- package/dist/chunks/state-0.1.12-e374v6h8.mjs +0 -1
- package/dist/chunks/status-0.1.12-qphx08h4.mjs +0 -1
- package/dist/chunks/stickers-0.1.12-dksexsqf.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.1.12-sbpfvs29.mjs +0 -1
- package/dist/chunks/tasks-0.1.12-268nn2c6.mjs +0 -1
- package/dist/chunks/teamHelpers-0.1.12-3trvxmmz.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.1.12-28s4rsx4.mjs +0 -1
- package/dist/chunks/teleport-0.1.12-zz9z0w99.mjs +0 -1
- package/dist/chunks/terminalSetup-0.1.12-xf61sxh6.mjs +0 -1
- package/dist/chunks/theme-0.1.12-3rgm5yr1.mjs +0 -1
- package/dist/chunks/thinkback-0.1.12-sf0y9d2d.mjs +0 -1
- package/dist/chunks/thinkback-play-0.1.12-vyyv42tm.mjs +0 -1
- package/dist/chunks/toolPool-0.1.12-tyqns5jv.mjs +0 -1
- package/dist/chunks/toolSearch-0.1.12-k91edc7b.mjs +0 -1
- package/dist/chunks/trustedDevice-0.1.12-w1scr51x.mjs +0 -1
- package/dist/chunks/upgrade-0.1.12-zhqgygsd.mjs +0 -1
- package/dist/chunks/usage-0.1.12-g40wd0mq.mjs +0 -1
- package/dist/chunks/util-0.1.12-qdejkkj5.mjs +0 -1
- package/dist/chunks/utils-0.1.12-3f08ztd2.mjs +0 -1
- package/dist/chunks/vim-0.1.12-z78k9k65.mjs +0 -1
- package/dist/chunks/watcher-0.1.12-pkwq5a2d.mjs +0 -1
- package/dist/chunks/worktree-0.1.12-a1mh6hjt.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.1.12-amrewbka.mjs +0 -1
- /package/dist/chunks/{cli-0.1.12-tvawkeks.mjs → cli-0.1.14-cahvg3jq.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Cba as tk,Kba as t7,Oba as dz,Sba as XV,oca as U,pca as DX,qca as l0,rca as O,sca as b1,zba as SL}from"./cli-0.1.14-kmsvd61a.mjs";import{Hca as lL,_ca as Xx,vca as s,wca as t0}from"./cli-0.1.14-cdby401e.mjs";import{$ca as YW,hda as sB,ida as HW}from"./cli-0.1.14-9vc52dnj.mjs";import{jda as uW,mda as Kj}from"./cli-0.1.14-442a367x.mjs";import{Ida as W3,wda as C1}from"./cli-0.1.14-z8j2n955.mjs";import{lea as r6,qea as MV}from"./cli-0.1.14-mgcmwvcn.mjs";import{yea as c0,zea as l$}from"./cli-0.1.14-t3fga5je.mjs";import{Cea as Y4,Eea as SB,Sea as q7,Xea as cL,Zea as K0,_ea as A6,afa as c$,cfa as y1,dfa as k4,efa as f,ffa as H0,gfa as pX,hfa as JL,ifa as L0,jfa as M1,mfa as k,qfa as R0,wfa as E,zfa as R1}from"./cli-0.1.14-2mzb5ath.mjs";import{Afa as Y0,Dfa as e,Efa as bV,Ffa as Q2,Nfa as d0}from"./cli-0.1.14-s9m1y93w.mjs";import{$ga as wQ,Aja as dX,Bha as s1,Cga as H$,Cha as u5,Cja as cX,Dga as WR,Dia as tL,Ega as Gq,Fga as P_,Gga as D4,Hga as Hq,Iga as Fq,Jga as h_,Kga as W6,Kja as pL,Lga as C7,Mja as dL,Tja as B9,Ufa as vQ,Vfa as vz,Wfa as G$,Xfa as BR,Zja as xV,_ga as N4,aga as b7,aha as jQ,bga as n_,bha as kz,cha as xQ,dha as Ez,ega as Dq,eha as y4,fga as f_,fha as T$,gga as J3,gha as CQ,gka as yB,hga as UR,hha as Cz,iga as wq,iha as AV,ija as SV,jga as c_,jha as IV,kha as OV,lha as wV,mga as Tq,mha as jV,mla as j6,nga as m_,nha as NV,oga as Aq,oha as _2,pga as u_,pha as kV,qga as C4,rga as sQ,sga as q3,sha as S$,tga as KR,uga as Y$,vga as GR,wga as j4,xga as OQ}from"./cli-0.1.14-r46jh9af.mjs";import{Bla as Jq,Cla as D_,Dla as K6,Ela as P7,Lla as u,Mla as L1,pla as Lq,qla as C_,tla as eQ,ula as tz,vla as z0,wla as G6,xla as $$,yla as HR}from"./cli-0.1.14-akz49g5v.mjs";import{$la as d,Zla as FH,_la as $4,ama as y7,bma as B,cma as $0,dma as R6,ema as M6}from"./cli-0.1.14-qn4ftczz.mjs";function eJ(Z){let X=Z.slice(Z.lastIndexOf(".")).toLowerCase();return M_.has(X)}function Zq(Z){let X=Math.min(Z.length,F_),J=0;for(let q=0;q<X;q++){let Q=Z[q];if(Q===0)return!0;if(Q<32&&Q!==9&&Q!==10&&Q!==13)J++}return J/X>0.1}var M_,F_=8192;var Xq=B(()=>{M_=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"])});var T_,H6;var E7=B(()=>{D_();T_=function(){try{var Z=Jq(Object,"defineProperty");return Z({},"",{}),Z}catch(X){}}(),H6=T_});function A_(Z,X,J){if(X=="__proto__"&&H6)H6(Z,X,{configurable:!0,enumerable:!0,value:J,writable:!0});else Z[X]=J}var U6;var M4=B(()=>{E7();U6=A_});function w_(Z,X,J){var q=Z[X];if(!(O_.call(Z,X)&&K6(q,J))||J===void 0&&!(X in Z))U6(Z,X,J)}var I_,O_,F4;var v7=B(()=>{M4();P7();I_=Object.prototype,O_=I_.hasOwnProperty;F4=w_});function j_(Z,X,J,q){var Q=!J;J||(J={});var $=-1,Y=X.length;while(++$<Y){var H=X[$],K=q?q(J[H],Z[H],H,J,Z):void 0;if(K===void 0)K=Z[H];if(Q)U6(J,H,K);else F4(J,H,K)}return J}var qq;var Qq=B(()=>{v7();M4();qq=j_});function N_(Z){var X=[];if(Z!=null)for(var J in Object(Z))X.push(J);return X}var $q;var Yq=B(()=>{$q=N_});function E_(Z){if(!z0(Z))return $q(Z);var X=D4(Z),J=[];for(var q in Z)if(!(q=="constructor"&&(X||!x_.call(Z,q))))J.push(q);return J}var k_,x_,Uq;var Kq=B(()=>{G6();Hq();Yq();k_=Object.prototype,x_=k_.hasOwnProperty;Uq=E_});function v_(Z){return W6(Z)?Gq(Z,!0):Uq(Z)}var V6;var T4=B(()=>{P_();Kq();C7();V6=v_});var I4={};y7(I4,{default:()=>S7});function S_(Z,X){if(X)return Z.slice();var J=Z.length,q=Bq?Bq(J):new Z.constructor(J);return Z.copy(q),q}var _q,Wq,y_,Vq,Bq,S7;var zq=B(()=>{C_();_q=typeof I4=="object"&&I4&&!I4.nodeType&&I4,Wq=_q&&typeof A4=="object"&&A4&&!A4.nodeType&&A4,y_=Wq&&Wq.exports===_q,Vq=y_?Lq.Buffer:void 0,Bq=Vq?Vq.allocUnsafe:void 0;S7=S_});function b_(Z,X){var J=-1,q=Z.length;X||(X=Array(q));while(++J<q)X[J]=Z[J];return X}var Rq;var Mq=B(()=>{Rq=b_});var g_,B6;var O4=B(()=>{h_();g_=Fq(Object.getPrototypeOf,Object),B6=g_});var p_,d_,Iq;var Oq=B(()=>{f_();O4();u_();m_();p_=Object.getOwnPropertySymbols,d_=!p_?Tq:function(Z){var X=[];while(Z)Dq(X,Aq(Z)),Z=B6(Z);return X},Iq=d_});function l_(Z){return wq(Z,V6,Iq)}var jq;var Nq=B(()=>{c_();Oq();T4();jq=l_});function i_(Z){var X=new Z.constructor(Z.byteLength);return new b7(X).set(new b7(Z)),X}var kq;var xq=B(()=>{n_();kq=i_});function a_(Z,X){var J=X?kq(Z.buffer):Z.buffer;return new Z.constructor(J,Z.byteOffset,Z.length)}var Eq;var Pq=B(()=>{xq();Eq=a_});var vq,o_,Cq;var yq=B(()=>{G6();vq=Object.create,o_=function(){function Z(){}return function(X){if(!z0(X))return{};if(vq)return vq(X);Z.prototype=X;var J=new Z;return Z.prototype=void 0,J}}(),Cq=o_});function s_(Z){return typeof Z.constructor=="function"&&!D4(Z)?Cq(B6(Z)):{}}var Sq;var bq=B(()=>{yq();O4();Hq();Sq=s_});import{dirname as r_}from"path";function Q0(Z,X,J){let q=t_();if(!q)return;let Q={timestamp:new Date().toISOString(),level:Z,event:X,data:J??{}},$=k(),Y=f(Q)+`
|
|
2
2
|
`;try{$.appendFileSync(q,Y)}catch{try{$.mkdirSync(r_(q)),$.appendFileSync(q,Y)}catch{}}}function t_(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function mE(Z,X,J){let q=Date.now();Q0("info",`${Z}_started`);try{let Q=await X(),$=J?J(Q):{};return Q0("info",`${Z}_completed`,{duration_ms:Date.now()-q,...$}),Q}catch(Q){throw Q0("error",`${Z}_failed`,{duration_ms:Date.now()-q}),Q}}var G2=B(()=>{R0();L0()});var uq=d((pE,mq)=>{mq.exports=fq;fq.sync=Zz;var hq=$0("fs");function e_(Z,X){var J=X.pathExt!==void 0?X.pathExt:process.env.PATHEXT;if(!J)return!0;if(J=J.split(";"),J.indexOf("")!==-1)return!0;for(var q=0;q<J.length;q++){var Q=J[q].toLowerCase();if(Q&&Z.substr(-Q.length).toLowerCase()===Q)return!0}return!1}function gq(Z,X,J){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return e_(X,J)}function fq(Z,X,J){hq.stat(Z,function(q,Q){J(q,q?!1:gq(Q,Z,X))})}function Zz(Z,X){return gq(hq.statSync(Z),Z,X)}});var nq=d((dE,lq)=>{lq.exports=dq;dq.sync=Xz;var pq=$0("fs");function dq(Z,X,J){pq.stat(Z,function(q,Q){J(q,q?!1:cq(Q,X))})}function Xz(Z,X){return cq(pq.statSync(Z),X)}function cq(Z,X){return Z.isFile()&&Jz(Z,X)}function Jz(Z,X){var{mode:J,uid:q,gid:Q}=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),K=parseInt("010",8),W=parseInt("001",8),G=H|K,V=J&W||J&K&&Q===Y||J&H&&q===$||J&G&&$===0;return V}});var aq=d((lE,iq)=>{var cE=$0("fs"),w4;if(process.platform==="win32"||global.TESTING_WINDOWS)w4=uq();else w4=nq();iq.exports=h7;h7.sync=qz;function h7(Z,X,J){if(typeof X==="function")J=X,X={};if(!J){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(q,Q){h7(Z,X||{},function($,Y){if($)Q($);else q(Y)})})}w4(Z,X||{},function(q,Q){if(q){if(q.code==="EACCES"||X&&X.ignoreErrors)q=null,Q=!1}J(q,Q)})}function qz(Z,X){try{return w4.sync(Z,X||{})}catch(J){if(X&&X.ignoreErrors||J.code==="EACCES")return!1;else throw J}}});var XQ=d((nE,ZQ)=>{var L6=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",oq=$0("path"),Qz=L6?";":":",sq=aq(),rq=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),tq=(Z,X)=>{let J=X.colon||Qz,q=Z.match(/\//)||L6&&Z.match(/\\/)?[""]:[...L6?[process.cwd()]:[],...(X.path||process.env.PATH||"").split(J)],Q=L6?X.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",$=L6?Q.split(J):[""];if(L6){if(Z.indexOf(".")!==-1&&$[0]!=="")$.unshift("")}return{pathEnv:q,pathExt:$,pathExtExe:Q}},eq=(Z,X,J)=>{if(typeof X==="function")J=X,X={};if(!X)X={};let{pathEnv:q,pathExt:Q,pathExtExe:$}=tq(Z,X),Y=[],H=(W)=>new Promise((G,V)=>{if(W===q.length)return X.all&&Y.length?G(Y):V(rq(Z));let L=q[W],_=/^".*"$/.test(L)?L.slice(1,-1):L,z=oq.join(_,Z),D=!_&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+z:z;G(K(D,W,0))}),K=(W,G,V)=>new Promise((L,_)=>{if(V===Q.length)return L(H(G+1));let z=Q[V];sq(W+z,{pathExt:$},(D,M)=>{if(!D&&M)if(X.all)Y.push(W+z);else return L(W+z);return L(K(W,G,V+1))})});return J?H(0).then((W)=>J(null,W),J):H(0)},$z=(Z,X)=>{X=X||{};let{pathEnv:J,pathExt:q,pathExtExe:Q}=tq(Z,X),$=[];for(let Y=0;Y<J.length;Y++){let H=J[Y],K=/^".*"$/.test(H)?H.slice(1,-1):H,W=oq.join(K,Z),G=!K&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+W:W;for(let V=0;V<q.length;V++){let L=G+q[V];try{if(sq.sync(L,{pathExt:Q}))if(X.all)$.push(L);else return L}catch(_){}}}if(X.all&&$.length)return $;if(X.nothrow)return null;throw rq(Z)};ZQ.exports=eq;eq.sync=$z});var qQ=d((iE,g7)=>{var JQ=(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"};g7.exports=JQ;g7.exports.default=JQ});var HQ=d((aE,YQ)=>{var QQ=$0("path"),Yz=XQ(),Hz=qQ();function $Q(Z,X){let J=Z.options.env||process.env,q=process.cwd(),Q=Z.options.cwd!=null,$=Q&&process.chdir!==void 0&&!process.chdir.disabled;if($)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=Yz.sync(Z.command,{path:J[Hz({env:J})],pathExt:X?QQ.delimiter:void 0})}catch(H){}finally{if($)process.chdir(q)}if(Y)Y=QQ.resolve(Q?Z.options.cwd:"",Y);return Y}function Uz(Z){return $Q(Z)||$Q(Z,!0)}YQ.exports=Uz});var UQ=d((Wz,m7)=>{var f7=/([()\][%!^"`<>&|;, *?])/g;function Kz(Z){return Z=Z.replace(f7,"^$1"),Z}function Gz(Z,X){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(f7,"^$1"),X)Z=Z.replace(f7,"^$1");return Z}Wz.command=Kz;Wz.argument=Gz});var GQ=d((oE,KQ)=>{KQ.exports=/^#!(.*)/});var VQ=d((sE,WQ)=>{var Lz=GQ();WQ.exports=(Z="")=>{let X=Z.match(Lz);if(!X)return null;let[J,q]=X[0].replace(/#! ?/,"").split(" "),Q=J.split("/").pop();if(Q==="env")return q;return q?`${Q} ${q}`:Q}});var LQ=d((rE,BQ)=>{var u7=$0("fs"),_z=VQ();function zz(Z){let J=Buffer.alloc(150),q;try{q=u7.openSync(Z,"r"),u7.readSync(q,J,0,150,0),u7.closeSync(q)}catch(Q){}return _z(J.toString())}BQ.exports=zz});var MQ=d((tE,RQ)=>{var Rz=$0("path"),_Q=HQ(),zQ=UQ(),Mz=LQ(),Fz=process.platform==="win32",Dz=/\.(?:com|exe)$/i,Tz=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Az(Z){Z.file=_Q(Z);let X=Z.file&&Mz(Z.file);if(X)return Z.args.unshift(Z.file),Z.command=X,_Q(Z);return Z.file}function Iz(Z){if(!Fz)return Z;let X=Az(Z),J=!Dz.test(X);if(Z.options.forceShell||J){let q=Tz.test(X);Z.command=Rz.normalize(Z.command),Z.command=zQ.command(Z.command),Z.args=Z.args.map(($)=>zQ.argument($,q));let Q=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${Q}"`],Z.command=process.env.comspec||"cmd.exe",Z.options.windowsVerbatimArguments=!0}return Z}function Oz(Z,X,J){if(X&&!Array.isArray(X))J=X,X=null;X=X?X.slice(0):[],J=Object.assign({},J);let q={command:Z,args:X,options:J,file:void 0,original:{command:Z,args:X}};return J.shell?q:Iz(q)}RQ.exports=Oz});var TQ=d((eE,DQ)=>{var p7=process.platform==="win32";function d7(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 wz(Z,X){if(!p7)return;let J=Z.emit;Z.emit=function(q,Q){if(q==="exit"){let $=FQ(Q,X);if($)return J.call(Z,"error",$)}return J.apply(Z,arguments)}}function FQ(Z,X){if(p7&&Z===1&&!X.file)return d7(X.original,"spawn");return null}function jz(Z,X){if(p7&&Z===1&&!X.file)return d7(X.original,"spawnSync");return null}DQ.exports={hookChildProcess:wz,verifyENOENT:FQ,verifyENOENTSync:jz,notFoundError:d7}});var n7=d((ZP,_6)=>{var AQ=$0("child_process"),c7=MQ(),l7=TQ();function IQ(Z,X,J){let q=c7(Z,X,J),Q=AQ.spawn(q.command,q.args,q.options);return l7.hookChildProcess(Q,q),Q}function Nz(Z,X,J){let q=c7(Z,X,J),Q=AQ.spawnSync(q.command,q.args,q.options);return Q.error=Q.error||l7.verifyENOENTSync(Q.status,q),Q}_6.exports=IQ;_6.exports.spawn=IQ;_6.exports.sync=Nz;_6.exports._parse=c7;_6.exports._enoent=l7});function xz(Z,X,J,q){if(!z0(Z))return Z;X=N4(X,Z);var Q=-1,$=X.length,Y=$-1,H=Z;while(H!=null&&++Q<$){var K=jQ(X[Q]),W=J;if(K==="__proto__"||K==="constructor"||K==="prototype")return Z;if(Q!=Y){var G=H[K];if(W=q?q(G,K,H):void 0,W===void 0)W=z0(G)?G:j4(X[Q+1])?[]:{}}F4(H,K,W),H=H[K]}return Z}var NQ;var kQ=B(()=>{v7();wQ();OQ();G6();kz();NQ=xz});function Pz(Z,X,J){var q=-1,Q=X.length,$={};while(++q<Q){var Y=X[q],H=xQ(Z,Y);if(J(H,Y))NQ($,N4(Y,Z),H)}return $}var EQ;var PQ=B(()=>{Ez();kQ();wQ();EQ=Pz});function yz(Z,X){if(Z==null)return{};var J=vQ(jq(Z),function(q){return[q]});return X=CQ(X),EQ(Z,J,function(q,Q){return X(q,Q[0])})}var i7;var yQ=B(()=>{vz();Cz();PQ();Nq();i7=yz});import{readdir as RP,readFile as Sz}from"fs/promises";import{release as bz}from"os";var AP,v0,IP,OP;var z6=B(()=>{L1();R0();u0();AP=["macos","wsl"],v0=u(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=k().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){m(Z)}return"linux"}return"unknown"}catch(Z){return m(Z),"unknown"}}),IP=u(()=>{if(process.platform!=="linux")return;try{let Z=k().readFileSync("/proc/version",{encoding:"utf8"}),X=Z.match(/WSL(\d+)/i);if(X&&X[1])return X[1];if(Z.toLowerCase().includes("microsoft"))return"1";return}catch(Z){m(Z);return}}),OP=u(async()=>{if(process.platform!=="linux")return;let Z={linuxKernel:bz()};try{let X=await Sz("/etc/os-release","utf8");for(let J of X.split(`
|
|
3
3
|
`)){let q=J.match(/^(ID|VERSION_ID)=(.*)$/);if(q&&q[1]&&q[2]){let Q=q[2].replace(/^"|"$/g,"");if(q[1]==="ID")Z.linuxDistroId=Q;else Z.linuxDistroVersion=Q}}}catch{}return Z})});import{execSync as hz}from"child_process";function F6(Z,X){let q=[];try{const J=R6(q,k4`execSync: ${Z.slice(0,100)}`,0);return hz(Z,X)}catch(Q){var $=Q,Y=1}finally{M6(q,$,Y)}}var a7=B(()=>{L0()});var gz,bQ,o7,hQ=(Z,X,J,q)=>{typeof o7.emitWarning=="function"?o7.emitWarning(Z,X,J,q):console.error(`[${J}] ${X}: ${Z}`)},E4,SQ,fz=(Z)=>!bQ.has(Z),EP,_1=(Z)=>Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),gQ=(Z)=>_1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?x4:null:null,x4,mz=class Z{heap;length;static#J=!1;static create(X){let J=gQ(X);if(!J)return[];Z.#J=!0;let q=new Z(X,J);return Z.#J=!1,q}constructor(X,J){if(!Z.#J)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new J(X),this.length=0}push(X){this.heap[this.length++]=X}pop(){return this.heap[--this.length]}},fQ;var mQ=B(()=>{gz=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,bQ=new Set,o7=typeof process=="object"&&process?process:{},E4=globalThis.AbortController,SQ=globalThis.AbortSignal;if(typeof E4>"u"){SQ=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(J,q){this._onabort.push(q)}},E4=class{constructor(){X()}signal=new SQ;abort(J){if(!this.signal.aborted){this.signal.reason=J,this.signal.aborted=!0;for(let q of this.signal._onabort)q(J);this.signal.onabort?.(J)}}};let Z=o7.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",X=()=>{Z&&(Z=!1,hQ("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",X))}}EP=Symbol("type"),x4=class extends Array{constructor(Z){super(Z),this.fill(0)}},fQ=class Z{#J;#q;#X;#Y;#U;#V;#T;#z;get perf(){return this.#z}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#H;#A;#K;#$;#Z;#L;#R;#B;#G;#I;#W;#O;#w;#M;#F;#j;#P;#_;#S;static unsafeExposeInternals(X){return{starts:X.#w,ttls:X.#M,autopurgeTimers:X.#F,sizes:X.#O,keyMap:X.#K,keyList:X.#$,valList:X.#Z,next:X.#L,prev:X.#R,get head(){return X.#B},get tail(){return X.#G},free:X.#I,isBackgroundFetch:(J)=>X.#Q(J),backgroundFetch:(J,q,Q,$)=>X.#g(J,q,Q,$),moveToTail:(J)=>X.#y(J),indexes:(J)=>X.#N(J),rindexes:(J)=>X.#k(J),isStale:(J)=>X.#D(J)}}get max(){return this.#J}get maxSize(){return this.#q}get calculatedSize(){return this.#A}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#T}get dispose(){return this.#X}get onInsert(){return this.#Y}get disposeAfter(){return this.#U}constructor(X){let{max:J=0,ttl:q,ttlResolution:Q=1,ttlAutopurge:$,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:K,dispose:W,onInsert:G,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:_,maxSize:z=0,maxEntrySize:D=0,sizeCalculation:M,fetchMethod:F,memoMethod:N,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:I,ignoreFetchAbort:T,perf:b}=X;if(b!==void 0&&typeof b?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#z=b??gz,J!==0&&!_1(J))throw TypeError("max option must be a nonnegative integer");let j=J?gQ(J):Array;if(!j)throw Error("invalid max value: "+J);if(this.#J=J,this.#q=z,this.maxEntrySize=D||this.#q,this.sizeCalculation=M,this.sizeCalculation){if(!this.#q&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(N!==void 0&&typeof N!="function")throw TypeError("memoMethod must be a function if defined");if(this.#T=N,F!==void 0&&typeof F!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=F,this.#P=!!F,this.#K=new Map,this.#$=Array(J).fill(void 0),this.#Z=Array(J).fill(void 0),this.#L=new j(J),this.#R=new j(J),this.#B=0,this.#G=0,this.#I=mz.create(J),this.#H=0,this.#A=0,typeof W=="function"&&(this.#X=W),typeof G=="function"&&(this.#Y=G),typeof V=="function"?(this.#U=V,this.#W=[]):(this.#U=void 0,this.#W=void 0),this.#j=!!this.#X,this.#S=!!this.#Y,this.#_=!!this.#U,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#q!==0&&!_1(this.#q))throw TypeError("maxSize must be a positive integer if specified");if(!_1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#l()}if(this.allowStale=!!K,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=_1(Q)||Q===0?Q:1,this.ttlAutopurge=!!$,this.ttl=q||0,this.ttl){if(!_1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#f()}if(this.#J===0&&this.ttl===0&&this.#q===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#J&&!this.#q){let x="LRU_CACHE_UNBOUNDED";fz(x)&&(bQ.add(x),hQ("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,Z))}}getRemainingTTL(X){return this.#K.has(X)?1/0:0}#f(){let X=new x4(this.#J),J=new x4(this.#J);this.#M=X,this.#w=J;let q=this.ttlAutopurge?Array(this.#J):void 0;this.#F=q,this.#m=(H,K,W=this.#z.now())=>{J[H]=K!==0?W:0,X[H]=K,Q(H,K)},this.#v=(H)=>{J[H]=X[H]!==0?this.#z.now():0,Q(H,X[H])};let Q=this.ttlAutopurge?(H,K)=>{if(q?.[H]&&(clearTimeout(q[H]),q[H]=void 0),K&&K!==0&&q){let W=setTimeout(()=>{this.#D(H)&&this.#x(this.#$[H],"expire")},K+1);W.unref&&W.unref(),q[H]=W}}:()=>{};this.#E=(H,K)=>{if(X[K]){let W=X[K],G=J[K];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 K=setTimeout(()=>$=0,this.ttlResolution);K.unref&&K.unref()}return H};this.getRemainingTTL=(H)=>{let K=this.#K.get(H);if(K===void 0)return 0;let W=X[K],G=J[K];if(!W||!G)return 1/0;let V=($||Y())-G;return W-V},this.#D=(H)=>{let K=J[H],W=X[H];return!!W&&!!K&&($||Y())-K>W}}#v=()=>{};#E=()=>{};#m=()=>{};#D=()=>!1;#l(){let X=new x4(this.#J);this.#A=0,this.#O=X,this.#C=(J)=>{this.#A-=X[J],X[J]=0},this.#u=(J,q,Q,$)=>{if(this.#Q(q))return 0;if(!_1(Q))if($){if(typeof $!="function")throw TypeError("sizeCalculation must be a function");if(Q=$(q,J),!_1(Q))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return Q},this.#b=(J,q,Q)=>{if(X[J]=q,this.#q){let $=this.#q-X[J];for(;this.#A>$;)this.#h(!0)}this.#A+=X[J],Q&&(Q.entrySize=q,Q.totalCalculatedSize=this.#A)}}#C=(X)=>{};#b=(X,J,q)=>{};#u=(X,J,q,Q)=>{if(q||Q)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#N({allowStale:X=this.allowStale}={}){if(this.#H)for(let J=this.#G;!(!this.#p(J)||((X||!this.#D(J))&&(yield J),J===this.#B));)J=this.#R[J]}*#k({allowStale:X=this.allowStale}={}){if(this.#H)for(let J=this.#B;!(!this.#p(J)||((X||!this.#D(J))&&(yield J),J===this.#G));)J=this.#L[J]}#p(X){return X!==void 0&&this.#K.get(this.#$[X])===X}*entries(){for(let X of this.#N())this.#Z[X]!==void 0&&this.#$[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield[this.#$[X],this.#Z[X]])}*rentries(){for(let X of this.#k())this.#Z[X]!==void 0&&this.#$[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield[this.#$[X],this.#Z[X]])}*keys(){for(let X of this.#N()){let J=this.#$[X];J!==void 0&&!this.#Q(this.#Z[X])&&(yield J)}}*rkeys(){for(let X of this.#k()){let J=this.#$[X];J!==void 0&&!this.#Q(this.#Z[X])&&(yield J)}}*values(){for(let X of this.#N())this.#Z[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield this.#Z[X])}*rvalues(){for(let X of this.#k())this.#Z[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield this.#Z[X])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(X,J={}){for(let q of this.#N()){let Q=this.#Z[q],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($!==void 0&&X($,this.#$[q],this))return this.get(this.#$[q],J)}}forEach(X,J=this){for(let q of this.#N()){let Q=this.#Z[q],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&X.call(J,$,this.#$[q],this)}}rforEach(X,J=this){for(let q of this.#k()){let Q=this.#Z[q],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&X.call(J,$,this.#$[q],this)}}purgeStale(){let X=!1;for(let J of this.#k({allowStale:!0}))this.#D(J)&&(this.#x(this.#$[J],"expire"),X=!0);return X}info(X){let J=this.#K.get(X);if(J===void 0)return;let q=this.#Z[J],Q=this.#Q(q)?q.__staleWhileFetching:q;if(Q===void 0)return;let $={value:Q};if(this.#M&&this.#w){let Y=this.#M[J],H=this.#w[J];if(Y&&H){let K=Y-(this.#z.now()-H);$.ttl=K,$.start=Date.now()}}return this.#O&&($.size=this.#O[J]),$}dump(){let X=[];for(let J of this.#N({allowStale:!0})){let q=this.#$[J],Q=this.#Z[J],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($===void 0||q===void 0)continue;let Y={value:$};if(this.#M&&this.#w){Y.ttl=this.#M[J];let H=this.#z.now()-this.#w[J];Y.start=Math.floor(Date.now()-H)}this.#O&&(Y.size=this.#O[J]),X.unshift([q,Y])}return X}load(X){this.clear();for(let[J,q]of X){if(q.start){let Q=Date.now()-q.start;q.start=this.#z.now()-Q}this.set(J,q.value,q)}}set(X,J,q={}){if(J===void 0)return this.delete(X),this;let{ttl:Q=this.ttl,start:$,noDisposeOnSet:Y=this.noDisposeOnSet,sizeCalculation:H=this.sizeCalculation,status:K}=q,{noUpdateTTL:W=this.noUpdateTTL}=q,G=this.#u(X,J,q.size||0,H);if(this.maxEntrySize&&G>this.maxEntrySize)return K&&(K.set="miss",K.maxEntrySizeExceeded=!0),this.#x(X,"set"),this;let V=this.#H===0?void 0:this.#K.get(X);if(V===void 0)V=this.#H===0?this.#G:this.#I.length!==0?this.#I.pop():this.#H===this.#J?this.#h(!1):this.#H,this.#$[V]=X,this.#Z[V]=J,this.#K.set(X,V),this.#L[this.#G]=V,this.#R[V]=this.#G,this.#G=V,this.#H++,this.#b(V,G,K),K&&(K.set="add"),W=!1,this.#S&&this.#Y?.(J,X,"add");else{this.#y(V);let L=this.#Z[V];if(J!==L){if(this.#P&&this.#Q(L)){L.__abortController.abort(Error("replaced"));let{__staleWhileFetching:_}=L;_!==void 0&&!Y&&(this.#j&&this.#X?.(_,X,"set"),this.#_&&this.#W?.push([_,X,"set"]))}else Y||(this.#j&&this.#X?.(L,X,"set"),this.#_&&this.#W?.push([L,X,"set"]));if(this.#C(V),this.#b(V,G,K),this.#Z[V]=J,K){K.set="replace";let _=L&&this.#Q(L)?L.__staleWhileFetching:L;_!==void 0&&(K.oldValue=_)}}else K&&(K.set="update");this.#S&&this.onInsert?.(J,X,J===L?"update":"replace")}if(Q!==0&&!this.#M&&this.#f(),this.#M&&(W||this.#m(V,Q,$),K&&this.#E(K,V)),!Y&&this.#_&&this.#W){let L=this.#W,_;for(;_=L?.shift();)this.#U?.(..._)}return this}pop(){try{for(;this.#H;){let X=this.#Z[this.#B];if(this.#h(!0),this.#Q(X)){if(X.__staleWhileFetching)return X.__staleWhileFetching}else if(X!==void 0)return X}}finally{if(this.#_&&this.#W){let X=this.#W,J;for(;J=X?.shift();)this.#U?.(...J)}}}#h(X){let J=this.#B,q=this.#$[J],Q=this.#Z[J];return this.#P&&this.#Q(Q)?Q.__abortController.abort(Error("evicted")):(this.#j||this.#_)&&(this.#j&&this.#X?.(Q,q,"evict"),this.#_&&this.#W?.push([Q,q,"evict"])),this.#C(J),this.#F?.[J]&&(clearTimeout(this.#F[J]),this.#F[J]=void 0),X&&(this.#$[J]=void 0,this.#Z[J]=void 0,this.#I.push(J)),this.#H===1?(this.#B=this.#G=0,this.#I.length=0):this.#B=this.#L[J],this.#K.delete(q),this.#H--,J}has(X,J={}){let{updateAgeOnHas:q=this.updateAgeOnHas,status:Q}=J,$=this.#K.get(X);if($!==void 0){let Y=this.#Z[$];if(this.#Q(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D($))Q&&(Q.has="stale",this.#E(Q,$));else return q&&this.#v($),Q&&(Q.has="hit",this.#E(Q,$)),!0}else Q&&(Q.has="miss");return!1}peek(X,J={}){let{allowStale:q=this.allowStale}=J,Q=this.#K.get(X);if(Q===void 0||!q&&this.#D(Q))return;let $=this.#Z[Q];return this.#Q($)?$.__staleWhileFetching:$}#g(X,J,q,Q){let $=J===void 0?void 0:this.#Z[J];if(this.#Q($))return $;let Y=new E4,{signal:H}=q;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let K={signal:Y.signal,options:q,context:Q},W=(D,M=!1)=>{let{aborted:F}=Y.signal,N=q.ignoreFetchAbort&&D!==void 0,R=q.ignoreFetchAbort||!!(q.allowStaleOnFetchAbort&&D!==void 0);if(q.status&&(F&&!M?(q.status.fetchAborted=!0,q.status.fetchError=Y.signal.reason,N&&(q.status.fetchAbortIgnored=!0)):q.status.fetchResolved=!0),F&&!N&&!M)return V(Y.signal.reason,R);let w=_,A=this.#Z[J];return(A===_||N&&M&&A===void 0)&&(D===void 0?w.__staleWhileFetching!==void 0?this.#Z[J]=w.__staleWhileFetching:this.#x(X,"fetch"):(q.status&&(q.status.fetchUpdated=!0),this.set(X,D,K.options))),D},G=(D)=>(q.status&&(q.status.fetchRejected=!0,q.status.fetchError=D),V(D,!1)),V=(D,M)=>{let{aborted:F}=Y.signal,N=F&&q.allowStaleOnFetchAbort,R=N||q.allowStaleOnFetchRejection,w=R||q.noDeleteOnFetchRejection,A=_;if(this.#Z[J]===_&&(!w||!M&&A.__staleWhileFetching===void 0?this.#x(X,"fetch"):N||(this.#Z[J]=A.__staleWhileFetching)),R)return q.status&&A.__staleWhileFetching!==void 0&&(q.status.returnedStale=!0),A.__staleWhileFetching;if(A.__returned===A)throw D},L=(D,M)=>{let F=this.#V?.(X,$,K);F&&F instanceof Promise&&F.then((N)=>D(N===void 0?void 0:N),M),Y.signal.addEventListener("abort",()=>{(!q.ignoreFetchAbort||q.allowStaleOnFetchAbort)&&(D(void 0),q.allowStaleOnFetchAbort&&(D=(N)=>W(N,!0)))})};q.status&&(q.status.fetchDispatched=!0);let _=new Promise(L).then(W,G),z=Object.assign(_,{__abortController:Y,__staleWhileFetching:$,__returned:void 0});return J===void 0?(this.set(X,z,{...K.options,status:void 0}),J=this.#K.get(X)):this.#Z[J]=z,z}#Q(X){if(!this.#P)return!1;let J=X;return!!J&&J instanceof Promise&&J.hasOwnProperty("__staleWhileFetching")&&J.__abortController instanceof E4}async fetch(X,J={}){let{allowStale:q=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:K=0,sizeCalculation:W=this.sizeCalculation,noUpdateTTL:G=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:z=this.allowStaleOnFetchAbort,context:D,forceRefresh:M=!1,status:F,signal:N}=J;if(!this.#P)return F&&(F.fetch="get"),this.get(X,{allowStale:q,updateAgeOnGet:Q,noDeleteOnStaleGet:$,status:F});let R={allowStale:q,updateAgeOnGet:Q,noDeleteOnStaleGet:$,ttl:Y,noDisposeOnSet:H,size:K,sizeCalculation:W,noUpdateTTL:G,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:z,ignoreFetchAbort:_,status:F,signal:N},w=this.#K.get(X);if(w===void 0){F&&(F.fetch="miss");let A=this.#g(X,w,R,D);return A.__returned=A}else{let A=this.#Z[w];if(this.#Q(A)){let j=q&&A.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",j&&(F.returnedStale=!0)),j?A.__staleWhileFetching:A.__returned=A}let I=this.#D(w);if(!M&&!I)return F&&(F.fetch="hit"),this.#y(w),Q&&this.#v(w),F&&this.#E(F,w),A;let T=this.#g(X,w,R,D),b=T.__staleWhileFetching!==void 0&&q;return F&&(F.fetch=I?"stale":"refresh",b&&I&&(F.returnedStale=!0)),b?T.__staleWhileFetching:T.__returned=T}}async forceFetch(X,J={}){let q=await this.fetch(X,J);if(q===void 0)throw Error("fetch() returned undefined");return q}memo(X,J={}){let q=this.#T;if(!q)throw Error("no memoMethod provided to constructor");let{context:Q,forceRefresh:$,...Y}=J,H=this.get(X,Y);if(!$&&H!==void 0)return H;let K=q(X,H,{options:Y,context:Q});return this.set(X,K,Y),K}get(X,J={}){let{allowStale:q=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,status:Y}=J,H=this.#K.get(X);if(H!==void 0){let K=this.#Z[H],W=this.#Q(K);return Y&&this.#E(Y,H),this.#D(H)?(Y&&(Y.get="stale"),W?(Y&&q&&K.__staleWhileFetching!==void 0&&(Y.returnedStale=!0),q?K.__staleWhileFetching:void 0):($||this.#x(X,"expire"),Y&&q&&(Y.returnedStale=!0),q?K:void 0)):(Y&&(Y.get="hit"),W?K.__staleWhileFetching:(this.#y(H),Q&&this.#v(H),K))}else Y&&(Y.get="miss")}#d(X,J){this.#R[J]=X,this.#L[X]=J}#y(X){X!==this.#G&&(X===this.#B?this.#B=this.#L[X]:this.#d(this.#R[X],this.#L[X]),this.#d(this.#G,X),this.#G=X)}delete(X){return this.#x(X,"delete")}#x(X,J){let q=!1;if(this.#H!==0){let Q=this.#K.get(X);if(Q!==void 0)if(this.#F?.[Q]&&(clearTimeout(this.#F?.[Q]),this.#F[Q]=void 0),q=!0,this.#H===1)this.#c(J);else{this.#C(Q);let $=this.#Z[Q];if(this.#Q($)?$.__abortController.abort(Error("deleted")):(this.#j||this.#_)&&(this.#j&&this.#X?.($,X,J),this.#_&&this.#W?.push([$,X,J])),this.#K.delete(X),this.#$[Q]=void 0,this.#Z[Q]=void 0,Q===this.#G)this.#G=this.#R[Q];else if(Q===this.#B)this.#B=this.#L[Q];else{let Y=this.#R[Q];this.#L[Y]=this.#L[Q];let H=this.#L[Q];this.#R[H]=this.#R[Q]}this.#H--,this.#I.push(Q)}}if(this.#_&&this.#W?.length){let Q=this.#W,$;for(;$=Q?.shift();)this.#U?.(...$)}return q}clear(){return this.#c("delete")}#c(X){for(let J of this.#k({allowStale:!0})){let q=this.#Z[J];if(this.#Q(q))q.__abortController.abort(Error("deleted"));else{let Q=this.#$[J];this.#j&&this.#X?.(q,Q,X),this.#_&&this.#W?.push([q,Q,X])}}if(this.#K.clear(),this.#Z.fill(void 0),this.#$.fill(void 0),this.#M&&this.#w){this.#M.fill(0),this.#w.fill(0);for(let J of this.#F??[])J!==void 0&&clearTimeout(J);this.#F?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#B=0,this.#G=0,this.#I.length=0,this.#A=0,this.#H=0,this.#_&&this.#W){let J=this.#W,q;for(;q=J?.shift();)this.#U?.(...q)}}}});function gP(Z,X=300000){let J=new Map,q=new Map,Q=async(...$)=>{let Y=f($),H=J.get(Y),K=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)J.set(Y,{value:V,timestamp:K,refreshing:!1});return V}finally{if(q.get(Y)===G)q.delete(Y)}}if(H&&K-H.timestamp>X&&!H.refreshing){H.refreshing=!0;let W=H;return Z(...$).then((G)=>{if(J.get(Y)===W)J.set(Y,{value:G,timestamp:Date.now(),refreshing:!1})}).catch((G)=>{if(m(G),J.get(Y)===W)J.delete(Y)}),H.value}return J.get(Y).value};return Q.cache={clear:()=>{J.clear(),q.clear()}},Q}function z1(Z,X,J=100){let q=new fQ({max:J}),Q=(...$)=>{let Y=X(...$),H=q.get(Y);if(H!==void 0)return H;let K=Z(...$);return q.set(Y,K),K};return Q.cache={clear:()=>q.clear(),size:()=>q.size,delete:($)=>q.delete($),get:($)=>q.peek($),has:($)=>q.has($)},Q}var P4=B(()=>{mQ();u0();L0()});import*as D6 from"path";import*as uQ from"path/win32";function s7(Z){try{return F6(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function uz(Z){if(Z==="git"){let X=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let J of X)if(s7(J))return J}try{let J=F6(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
|
|
4
4
|
`).filter(Boolean),q=s().toLowerCase();for(let Q of J){let $=D6.resolve(Q).toLowerCase();if(D6.dirname($).toLowerCase()===q||$.startsWith(q+D6.sep)){E(`Skipping potentially malicious executable in current directory: ${Q}`);continue}return Q}return null}catch{return null}}function nP(){if(v0()==="windows"){let Z=pz();process.env.SHELL=Z,E(`Using bash path: "${Z}"`)}}var pz,iP,pQ;var dQ=B(()=>{L1();t0();R1();a7();P4();z6();pz=u(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(s7(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=uz("git");if(Z){let X=uQ.join(Z,"..","..","bin","bash.exe");if(s7(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)}),iP=z1((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),pQ=z1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let X=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(X){let q=X[1].toUpperCase(),Q=Z.slice(("/cygdrive/"+X[1]).length);return q+":"+(Q||"\\").replace(/\//g,"\\")}let J=Z.match(/^\/([A-Za-z])(\/|$)/);if(J){let q=J[1].toUpperCase(),Q=Z.slice(2);return q+":"+(Q||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as cQ}from"os";import{dirname as lQ,isAbsolute as cz,join as lz,normalize as r7,relative as nz,resolve as iz}from"path";function e7(Z,X){let J=X??s()??k().cwd();if(typeof Z!=="string")throw TypeError(`Path must be a string, received ${typeof Z}`);if(typeof J!=="string")throw TypeError(`Base directory must be a string, received ${typeof J}`);if(Z.includes("\x00")||J.includes("\x00"))throw Error("Path contains null bytes");let q=Z.trim();if(!q)return r7(J).normalize("NFC");if(q==="~")return cQ().normalize("NFC");if(q.startsWith("~/"))return lz(cQ(),q.slice(2)).normalize("NFC");let Q=q;if(v0()==="windows"&&q.match(/^\/[a-z]\//i))try{Q=pQ(q)}catch{Q=q}if(cz(Q))return r7(Q).normalize("NFC");return iz(J,Q).normalize("NFC")}function Xv(Z){let X=nz(s(),Z);return X.startsWith("..")?Z:X}function Jv(Z){let X=e7(Z);if(X.startsWith("\\\\")||X.startsWith("//"))return lQ(X);try{if(k().statSync(X).isDirectory())return X}catch{}return lQ(X)}function qv(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function v1(Z){return r7(Z).replace(/\\/g,"/")}var v4=B(()=>{t0();R0();z6();dQ();dz()});function az(Z,X,J){if(J!==void 0&&!K6(Z[X],J)||J===void 0&&!(X in Z))U6(Z,X,J)}var W2;var Z3=B(()=>{M4();P7();W2=az});function oz(Z){return function(X,J,q){var Q=-1,$=Object(X),Y=q(X),H=Y.length;while(H--){var K=Y[Z?H:++Q];if(J($[K],K,$)===!1)break}return X}}var nQ;var iQ=B(()=>{nQ=oz});var sz,aQ;var oQ=B(()=>{iQ();sz=nQ(),aQ=sz});function rz(Z){return C4(Z)&&W6(Z)}var rQ;var tQ=B(()=>{C7();sQ();rQ=rz});function QR(Z){if(!C4(Z)||eQ(Z)!=ez)return!1;var X=B6(Z);if(X===null)return!0;var J=JR.call(X,"constructor")&&X.constructor;return typeof J=="function"&&J instanceof J&&Z$.call(J)==qR}var ez="[object Object]",ZR,XR,Z$,JR,qR,X$;var J$=B(()=>{tz();O4();sQ();ZR=Function.prototype,XR=Object.prototype,Z$=ZR.toString,JR=XR.hasOwnProperty,qR=Z$.call(Object);X$=QR});function $R(Z,X){if(X==="constructor"&&typeof Z[X]==="function")return;if(X=="__proto__")return;return Z[X]}var V2;var X3=B(()=>{V2=$R});function YR(Z){return qq(Z,V6(Z))}var q$;var Q$=B(()=>{Qq();T4();q$=YR});function VR(Z,X,J,q,Q,$,Y){var H=V2(Z,J),K=V2(X,J),W=Y.get(K);if(W){W2(Z,J,W);return}var G=$?$(H,K,J+"",Z,X,Y):void 0,V=G===void 0;if(V){var L=J3(K),_=!L&&Y$(K),z=!L&&!_&&H$(K);if(G=K,L||_||z)if(J3(H))G=H;else if(rQ(H))G=Rq(H);else if(_)V=!1,G=S7(K,!0);else if(z)V=!1,G=Eq(K,!0);else G=[];else if(X$(K)||q3(K)){if(G=H,q3(H))G=q$(H);else if(!z0(H)||$$(H))G=Sq(K)}else V=!1}if(V)Y.set(K,G),Q(G,K,q,$,Y),Y.delete(K);W2(Z,J,G)}var U$;var K$=B(()=>{Z3();zq();Pq();Mq();bq();KR();UR();tQ();GR();HR();G6();J$();WR();X3();Q$();U$=VR});function W$(Z,X,J,q,Q){if(Z===X)return;aQ(X,function($,Y){if(Q||(Q=new G$),z0($))U$(Z,X,Y,J,W$,q,Q);else{var H=q?q(V2(Z,Y),$,Y+"",Z,X,Q):void 0;if(H===void 0)H=$;W2(Z,Y,H)}},V6)}var V$;var B$=B(()=>{BR();Z3();oQ();K$();G6();T4();X3();V$=W$});function LR(Z,X,J){switch(J.length){case 0:return Z.call(X);case 1:return Z.call(X,J[0]);case 2:return Z.call(X,J[0],J[1]);case 3:return Z.call(X,J[0],J[1],J[2])}return Z.apply(X,J)}var L$;var _$=B(()=>{L$=LR});function _R(Z,X,J){return X=z$(X===void 0?Z.length-1:X,0),function(){var q=arguments,Q=-1,$=z$(q.length-X,0),Y=Array($);while(++Q<$)Y[Q]=q[X+Q];Q=-1;var H=Array(X+1);while(++Q<X)H[Q]=q[Q];return H[X]=J(Y),L$(Z,this,H)}}var z$,R$;var M$=B(()=>{_$();z$=Math.max;R$=_R});function zR(Z){return function(){return Z}}var F$;var D$=B(()=>{F$=zR});var RR,A$;var I$=B(()=>{D$();E7();T$();RR=!H6?y4:function(Z,X){return H6(Z,"toString",{configurable:!0,enumerable:!1,value:F$(X),writable:!0})},A$=RR});function TR(Z){var X=0,J=0;return function(){var q=DR(),Q=FR-(q-J);if(J=q,Q>0){if(++X>=MR)return arguments[0]}else X=0;return Z.apply(void 0,arguments)}}var MR=800,FR=16,DR,O$;var w$=B(()=>{DR=Date.now;O$=TR});var AR,j$;var N$=B(()=>{I$();w$();AR=O$(A$),j$=AR});function IR(Z,X){return j$(R$(Z,X,y4),Z+"")}var k$;var x$=B(()=>{T$();M$();N$();k$=IR});function OR(Z,X,J){if(!z0(J))return!1;var q=typeof X;if(q=="number"?W6(J)&&j4(X,J.length):q=="string"&&(X in J))return K6(J[X],Z);return!1}var E$;var P$=B(()=>{P7();C7();OQ();G6();E$=OR});function wR(Z){return k$(function(X,J){var q=-1,Q=J.length,$=Q>1?J[Q-1]:void 0,Y=Q>2?J[2]:void 0;if($=Z.length>3&&typeof $=="function"?(Q--,$):void 0,Y&&E$(J[0],J[1],Y))$=Q<3?void 0:$,Q=1;X=Object(X);while(++q<Q){var H=J[q];if(H)Z(X,H,q,$)}return X})}var v$;var C$=B(()=>{x$();P$();v$=wR});var jR,e0;var y$=B(()=>{B$();C$();jR=v$(function(Z,X,J,q){V$(Z,X,J,q)}),e0=jR});function Q3(Z){let{buffer:X,bytesRead:J}=k().readSync(Z,{length:4096});if(J===0)return"utf8";if(J>=2){if(X[0]===255&&X[1]===254)return"utf16le"}if(J>=3&&X[0]===239&&X[1]===187&&X[2]===191)return"utf8";return"utf8"}function $3(Z){let X=0,J=0;for(let q=0;q<Z.length;q++)if(Z[q]===`
|
|
@@ -73,7 +73,7 @@ For example, you can use the \`pathToFileURL()\` method of the \`url\` core modu
|
|
|
73
73
|
`,LF:`
|
|
74
74
|
`,concatBytes:TZ},OA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:IA}});import{Buffer as wA}from"node:buffer";var nU=(Z,X)=>Z?void 0:jA.bind(void 0,X),jA=function*(Z,X){if(typeof X!=="string"&&!X0(X)&&!wA.isBuffer(X))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof X}.`);yield X},iU=(Z,X)=>Z?NA.bind(void 0,X):kA.bind(void 0,X),NA=function*(Z,X){aU(Z,X),yield X},kA=function*(Z,X){if(aU(Z,X),typeof X!=="string"&&!X0(X))throw TypeError(`The \`${Z}\` option's function must yield a string or an Uint8Array, not ${typeof X}.`);yield X},aU=(Z,X)=>{if(X===null||X===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${X}\`.
|
|
75
75
|
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
76
|
-
if (condition) { yield value; }`)};var oU=B(()=>{F0()});import{Buffer as xA}from"node:buffer";import{StringDecoder as EA}from"node:string_decoder";var Z5=(Z,X,J)=>{if(J)return;if(Z)return{transform:PA.bind(void 0,new TextEncoder)};let q=new EA(X);return{transform:vA.bind(void 0,q),final:CA.bind(void 0,q)}},PA=function*(Z,X){if(xA.isBuffer(X))yield J1(X);else if(typeof X==="string")yield Z.encode(X);else yield X},vA=function*(Z,X){yield X0(X)?Z.write(X):X},CA=function*(Z){let X=Z.end();if(X!=="")yield X};var IZ=B(()=>{F0()});import{callbackify as sU}from"node:util";var OZ,X5=async function*(Z,X,J){if(J===X.length){yield Z;return}let{transform:q=SA}=X[J];for await(let Q of q(Z))yield*X5(Q,X,J+1)},rU=async function*(Z){for(let[X,{final:J}]of Object.entries(Z))yield*yA(J,Number(X),Z)},yA=async function*(Z,X,J){if(Z===void 0)return;for await(let q of Z())yield*X5(q,J,X+1)},tU,SA=function*(Z){yield Z};var eU=B(()=>{OZ=sU(async(Z,X,J,q)=>{X.currentIterable=Z(...J);try{for await(let Q of X.currentIterable)q.push(Q)}finally{delete X.currentIterable}}),tU=sU(async({currentIterable:Z},X)=>{if(Z!==void 0){await(X?Z.throw(X):Z.return());return}if(X)throw X})});var wZ=(Z,X,J,q)=>{try{for(let Q of Z(...X))J.push(Q);q()}catch(Q){q(Q)}},ZK=(Z,X)=>[...X.flatMap((J)=>[...l1(J,Z,0)]),...f2(Z)],l1=function*(Z,X,J){if(J===X.length){yield Z;return}let{transform:q=hA}=X[J];for(let Q of q(Z))yield*l1(Q,X,J+1)},f2=function*(Z){for(let[X,{final:J}]of Object.entries(Z))yield*bA(J,Number(X),Z)},bA=function*(Z,X,J){if(Z===void 0)return;for(let q of Z())yield*l1(q,J,X+1)},hA=function*(Z){yield Z};var jZ=()=>{};import{Transform as gA,getDefaultHighWaterMark as XK}from"node:stream";var NZ=({value:Z,value:{transform:X,final:J,writableObjectMode:q,readableObjectMode:Q},optionName:$},{encoding:Y})=>{let H={},K=JK(Z,Y,$),W=c1(X),G=c1(J),V=W?OZ.bind(void 0,X5,H):wZ.bind(void 0,l1),L=W||G?OZ.bind(void 0,rU,H):wZ.bind(void 0,f2),_=W||G?tU.bind(void 0,H):void 0;return{stream:new gA({writableObjectMode:q,writableHighWaterMark:XK(q),readableObjectMode:Q,readableHighWaterMark:XK(Q),transform(D,M,F){V([D,K,0],this,F)},flush(D){L([K],this,D)},destroy:_})}},J5=(Z,X,J,q)=>{let Q=X.filter(({type:Y})=>Y==="generator"),$=q?Q.reverse():Q;for(let{value:Y,optionName:H}of $){let K=JK(Y,J,H);Z=ZK(K,Z)}return Z},JK=({transform:Z,final:X,binary:J,writableObjectMode:q,readableObjectMode:Q,preserveNewlines:$},Y,H)=>{let K={};return[{transform:nU(q,H)},Z5(J,Y,q),t8(J,$,q,K),{transform:Z,final:X},{transform:iU(Q,H)},lU({binary:J,preserveNewlines:$,readableObjectMode:Q,state:K})].filter(Boolean)};var q5=B(()=>{_0();e8();oU();IZ();eU();jZ()});var qK=(Z,X)=>{for(let J of fA(Z))mA(Z,J,X)},fA=(Z)=>new Set(Object.entries(Z).filter(([,{direction:X}])=>X==="input").map(([X])=>Number(X))),mA=(Z,X,J)=>{let{stdioItems:q}=Z[X],Q=q.filter(({contents:H})=>H!==void 0);if(Q.length===0)return;if(X!==0){let[{type:H,optionName:K}]=Q;throw TypeError(`Only the \`stdin\` option, not \`${K}\`, can be ${O1[H]} with synchronous methods.`)}let Y=Q.map(({contents:H})=>H).map((H)=>uA(H,q));J.input=w2(Y)},uA=(Z,X)=>{let J=J5(Z,X,"utf8",!0);return pA(J),w2(J)},pA=(Z)=>{let X=Z.find((J)=>typeof J!=="string"&&!X0(J));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 QK=B(()=>{q5();F0();_0()});var Q5=({stdioItems:Z,encoding:X,verboseInfo:J,fdNumber:q})=>q!=="all"&&E6(J,q)&&!D0.has(X)&&dA(q)&&(Z.some(({type:Q,value:$})=>Q==="native"&&cA.has($))||Z.every(({type:Q})=>j0.has(Q))),dA=(Z)=>Z===1||Z===2,cA,$K=async(Z,X,J,q)=>{for await(let Q of Z)if(!lA(X))HK(Q,J,q)},YK=(Z,X,J)=>{for(let q of Z)HK(q,X,J)},lA=(Z)=>Z._readableState.pipes.length>0,HK=(Z,X,J)=>{let q=J8(Z);n0({type:"output",verboseMessage:q,fdNumber:X,verboseInfo:J})};var kZ=B(()=>{m1();_0();P6();D1();cA=new Set(["pipe","overlapped"])});import{writeFileSync as nA,appendFileSync as iA}from"node:fs";var UK=({fileDescriptors:Z,syncResult:{output:X},options:J,isMaxBuffer:q,verboseInfo:Q})=>{if(X===null)return{output:Array.from({length:3})};let $={},Y=new Set([]);return{output:X.map((K,W)=>aA({result:K,fileDescriptors:Z,fdNumber:W,state:$,outputFiles:Y,isMaxBuffer:q,verboseInfo:Q},J)),...$}},aA=({result:Z,fileDescriptors:X,fdNumber:J,state:q,outputFiles:Q,isMaxBuffer:$,verboseInfo:Y},{buffer:H,encoding:K,lines:W,stripFinalNewline:G,maxBuffer:V})=>{if(Z===null)return;let L=iH(Z,$,V),_=J1(L),{stdioItems:z,objectMode:D}=X[J],M=oA([_],z,K,q),{serializedResult:F,finalResult:N=F}=sA({chunks:M,objectMode:D,encoding:K,lines:W,stripFinalNewline:G,fdNumber:J});rA({serializedResult:F,fdNumber:J,state:q,verboseInfo:Y,encoding:K,stdioItems:z,objectMode:D});let R=H[J]?N:void 0;try{if(q.error===void 0)tA(F,z,Q);return R}catch(w){return q.error=w,R}},oA=(Z,X,J,q)=>{try{return J5(Z,X,J,!1)}catch(Q){return q.error=Q,Z}},sA=({chunks:Z,objectMode:X,encoding:J,lines:q,stripFinalNewline:Q,fdNumber:$})=>{if(X)return{serializedResult:Z};if(J==="buffer")return{serializedResult:w2(Z)};let Y=O9(Z,J);if(q[$])return{serializedResult:Y,finalResult:AZ(Y,!Q[$],X)};return{serializedResult:Y}},rA=({serializedResult:Z,fdNumber:X,state:J,verboseInfo:q,encoding:Q,stdioItems:$,objectMode:Y})=>{if(!Q5({stdioItems:$,encoding:Q,verboseInfo:q,fdNumber:X}))return;let H=AZ(Z,!1,Y);try{YK(H,X,q)}catch(K){J.error??=K}},tA=(Z,X,J)=>{for(let{path:q,append:Q}of X.filter(({type:$})=>o8.has($))){let $=typeof q==="string"?q:q.toString();if(Q||J.has($))iA(q,Z);else J.add($),nA(q,Z)}};var KK=B(()=>{kZ();q5();e8();F0();_0();d1()});var GK=([,Z,X],J)=>{if(!J.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,U1(X,J,"all")];if(Array.isArray(X))return[U1(Z,J,"all"),...X];if(X0(Z)&&X0(X))return j3([Z,X]);return`${Z}${X}`};var WK=B(()=>{F0();g2()});import{once as xZ}from"node:events";var VK=async(Z,X)=>{let[J,q]=await eA(Z);return X.isForcefullyTerminated??=!1,[J,q]},eA=async(Z)=>{let[X,J]=await Promise.allSettled([xZ(Z,"spawn"),xZ(Z,"exit")]);if(X.status==="rejected")return[];return J.status==="rejected"?BK(Z):J.value},BK=async(Z)=>{try{return await xZ(Z,"exit")}catch{return BK(Z)}},LK=async(Z)=>{let[X,J]=await Z;if(!ZI(X,J)&&EZ(X,J))throw new i0;return[X,J]},ZI=(Z,X)=>Z===void 0&&X===void 0,EZ=(Z,X)=>Z!==0||X!==null;var PZ=B(()=>{g1()});var _K=({error:Z,status:X,signal:J,output:q},{maxBuffer:Q})=>{let $=XI(Z,X,J),Y=$?.code==="ETIMEDOUT",H=nH($,q,Q);return{resultError:$,exitCode:X,signal:J,timedOut:Y,isMaxBuffer:H}},XI=(Z,X,J)=>{if(Z!==void 0)return Z;return EZ(X,J)?new i0:void 0};var zK=B(()=>{g1();d1();PZ()});import{spawnSync as JI}from"node:child_process";var RK=(Z,X,J)=>{let{file:q,commandArguments:Q,command:$,escapedCommand:Y,startTime:H,verboseInfo:K,options:W,fileDescriptors:G}=qI(Z,X,J),V=YI({file:q,commandArguments:Q,options:W,command:$,escapedCommand:Y,verboseInfo:K,fileDescriptors:G,startTime:H});return m6(V,K,W)},qI=(Z,X,J)=>{let{command:q,escapedCommand:Q,startTime:$,verboseInfo:Y}=$8(Z,X,J),H=QI(J),{file:K,commandArguments:W,options:G}=C8(Z,X,H);$I(G);let V=mU(G,Y);return{file:K,commandArguments:W,command:q,escapedCommand:Q,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},QI=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,$I=({ipc:Z,ipcInput:X,detached:J,cancelSignal:q})=>{if(X)$5("ipcInput");if(Z)$5("ipc: true");if(J)$5("detached: true");if(q)$5("cancelSignal")},$5=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},YI=({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,verboseInfo:$,fileDescriptors:Y,startTime:H})=>{let K=HI({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,fileDescriptors:Y,startTime:H});if(K.failed)return K;let{resultError:W,exitCode:G,signal:V,timedOut:L,isMaxBuffer:_}=_K(K,J),{output:z,error:D=W}=UK({fileDescriptors:Y,syncResult:K,options:J,isMaxBuffer:_,verboseInfo:$}),M=z.map((N,R)=>U1(N,J,R)),F=U1(GK(z,J),J,"all");return KI({error:D,exitCode:G,signal:V,timedOut:L,isMaxBuffer:_,stdio:M,all:F,options:J,command:q,escapedCommand:Q,startTime:H})},HI=({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,fileDescriptors:$,startTime:Y})=>{try{qK($,J);let H=UI(J);return JI(...y8(Z,X,H))}catch(H){return f6({error:H,command:q,escapedCommand:Q,fileDescriptors:$,options:J,startTime:Y,isSync:!0})}},UI=({encoding:Z,maxBuffer:X,...J})=>({...J,encoding:"buffer",maxBuffer:c8(X)}),KI=({error:Z,exitCode:X,signal:J,timedOut:q,isMaxBuffer:Q,stdio:$,all:Y,options:H,command:K,escapedCommand:W,startTime:G})=>Z===void 0?l8({command:K,escapedCommand:W,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G}):b2({error:Z,command:K,escapedCommand:W,timedOut:q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:Q,isForcefullyTerminated:!1,exitCode:X,signal:J,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G,isSync:!0});var MK=B(()=>{y3();XZ();JZ();h2();n8();pU();g2();QK();KK();d1();WK();zK()});import{once as vZ,on as GI}from"node:events";var FK=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q},{reference:Q=!0,filter:$}={})=>{return v6({methodName:"getOneMessage",isSubprocess:J,ipc:q,isConnected:j8(Z)}),WI({anyProcess:Z,channel:X,isSubprocess:J,filter:$,reference:Q})},WI=async({anyProcess:Z,channel:X,isSubprocess:J,filter:q,reference:Q})=>{F8(X,Q);let $=I1(Z,X,J),Y=new AbortController;try{return await Promise.race([VI($,q,Y),BI($,J,Y),LI($,J,Y)])}catch(H){throw C6(Z),H}finally{Y.abort(),D8(X,Q)}},VI=async(Z,X,{signal:J})=>{if(X===void 0){let[q]=await vZ(Z,"message",{signal:J});return q}for await(let[q]of GI(Z,"message",{signal:J}))if(X(q))return q},BI=async(Z,X,{signal:J})=>{await vZ(Z,"disconnect",{signal:J}),xY(X)},LI=async(Z,X,{signal:J})=>{let[q]=await vZ(Z,"strict:error",{signal:J});throw _8(q,X)};var DK=B(()=>{y6();P2();E2()});import{once as AK,on as _I}from"node:events";var IK=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q},{reference:Q=!0}={})=>CZ({anyProcess:Z,channel:X,isSubprocess:J,ipc:q,shouldAwait:!J,reference:Q}),CZ=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q,shouldAwait:Q,reference:$})=>{v6({methodName:"getEachMessage",isSubprocess:J,ipc:q,isConnected:j8(Z)}),F8(X,$);let Y=I1(Z,X,J),H=new AbortController,K={};return zI(Z,Y,H),RI({ipcEmitter:Y,isSubprocess:J,controller:H,state:K}),MI({anyProcess:Z,channel:X,ipcEmitter:Y,isSubprocess:J,shouldAwait:Q,controller:H,state:K,reference:$})},zI=async(Z,X,J)=>{try{await AK(X,"disconnect",{signal:J.signal}),J.abort()}catch{}},RI=async({ipcEmitter:Z,isSubprocess:X,controller:J,state:q})=>{try{let[Q]=await AK(Z,"strict:error",{signal:J.signal});q.error=_8(Q,X),J.abort()}catch{}},MI=async function*({anyProcess:Z,channel:X,ipcEmitter:J,isSubprocess:q,shouldAwait:Q,controller:$,state:Y,reference:H}){try{for await(let[K]of _I(J,"message",{signal:$.signal}))TK(Y),yield K}catch{TK(Y)}finally{if($.abort(),D8(X,H),!q)C6(Z);if(Q)await Z}},TK=({error:Z})=>{if(Z)throw Z};var yZ=B(()=>{y6();P2();E2()});import OK from"node:process";var wK=(Z,{ipc:X})=>{Object.assign(Z,NK(Z,!1,X))},jK=()=>{let Z=OK,X=!0,J=OK.channel!==void 0;return{...NK(Z,!0,J),getCancelSignal:qH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:J})}},NK=(Z,X,J)=>({sendMessage:E8.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J}),getOneMessage:FK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J}),getEachMessage:IK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J})});var SZ=B(()=>{P8();DK();yZ();O8()});import{ChildProcess as FI}from"node:child_process";import{PassThrough as DI,Readable as TI,Writable as AI,Duplex as II}from"node:stream";var kK=({error:Z,command:X,escapedCommand:J,fileDescriptors:q,options:Q,startTime:$,verboseInfo:Y})=>{FZ(q);let H=new FI;OI(H,q),Object.assign(H,{readable:wI,writable:jI,duplex:NI});let K=f6({error:Z,command:X,escapedCommand:J,fileDescriptors:q,options:Q,startTime:$,isSync:!1}),W=kI(K,Y,Q);return{subprocess:H,promise:W}},OI=(Z,X)=>{let J=m2(),q=m2(),Q=m2(),$=Array.from({length:X.length-3},m2),Y=m2(),H=[J,q,Q,...$];Object.assign(Z,{stdin:J,stdout:q,stderr:Q,all:Y,stdio:H})},m2=()=>{let Z=new DI;return Z.end(),Z},wI=()=>new TI({read(){}}),jI=()=>new AI({write(){}}),NI=()=>new II({read(){},write(){}}),kI=async(Z,X,J)=>m6(Z,X,J);var xK=B(()=>{r8();h2();n8()});import{createReadStream as EK,createWriteStream as PK}from"node:fs";import{Buffer as xI}from"node:buffer";import{Readable as u2,Writable as EI,Duplex as PI}from"node:stream";var CK=(Z,X)=>s8(vI,Z,X,!1),p2=({type:Z,optionName:X})=>{throw TypeError(`The \`${X}\` option cannot be ${O1[Z]}.`)},vK,vI;var yK=B(()=>{q5();r8();_0();vK={fileNumber:p2,generator:NZ,asyncGenerator:NZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:X,readableObjectMode:J}}){let q=X||J;return{stream:PI.fromWeb(Z,{objectMode:q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},vI={input:{...vK,fileUrl:({value:Z})=>({stream:EK(Z)}),filePath:({value:{file:Z}})=>({stream:EK(Z)}),webStream:({value:Z})=>({stream:u2.fromWeb(Z)}),iterable:({value:Z})=>({stream:u2.from(Z)}),asyncIterable:({value:Z})=>({stream:u2.from(Z)}),string:({value:Z})=>({stream:u2.from(Z)}),uint8Array:({value:Z})=>({stream:u2.from(xI.from(Z))})},output:{...vK,fileUrl:({value:Z})=>({stream:PK(Z)}),filePath:({value:{file:Z,append:X}})=>({stream:PK(Z,X?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:EI.fromWeb(Z)}),iterable:p2,asyncIterable:p2,string:p2,uint8Array:p2}}});import{on as CI,once as SK}from"node:events";import{PassThrough as yI,getDefaultHighWaterMark as SI}from"node:stream";import{finished as gK}from"node:stream/promises";function n1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let Q of Z)bZ(Q);let X=Z.some(({readableObjectMode:Q})=>Q),J=bI(Z,X),q=new fK({objectMode:X,writableHighWaterMark:J,readableHighWaterMark:J});for(let Q of Z)q.add(Q);return q}var bI=(Z,X)=>{if(Z.length===0)return SI(X);let J=Z.filter(({readableObjectMode:q})=>q===X).map(({readableHighWaterMark:q})=>q);return Math.max(...J)},fK,hI=async(Z,X,J)=>{Y5(Z,bK);let q=new AbortController;try{await Promise.race([gI(Z,q),fI(Z,X,J,q)])}finally{q.abort(),Y5(Z,-bK)}},gI=async(Z,{signal:X})=>{try{await gK(Z,{signal:X,cleanup:!0})}catch(J){throw mK(Z,J),J}},fI=async(Z,X,J,{signal:q})=>{for await(let[Q]of CI(Z,"unpipe",{signal:q}))if(X.has(Q))Q.emit(J)},bZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},mI=async({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,onFinished:$,unpipeEvent:Y})=>{Y5(Z,hK);let H=new AbortController;try{await Promise.race([uI($,X,H),pI({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,controller:H}),dI({stream:X,streams:J,ended:q,aborted:Q,unpipeEvent:Y,controller:H})])}finally{H.abort(),Y5(Z,-hK)}if(J.size>0&&J.size===q.size+Q.size)if(q.size===0&&Q.size>0)hZ(Z);else cI(Z)},uI=async(Z,X,{signal:J})=>{try{if(await Z,!J.aborted)hZ(X)}catch(q){if(!J.aborted)mK(X,q)}},pI=async({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,controller:{signal:$}})=>{try{if(await gK(X,{signal:$,cleanup:!0,readable:!0,writable:!1}),J.has(X))q.add(X)}catch(Y){if($.aborted||!J.has(X))return;if(uK(Y))Q.add(X);else pK(Z,Y)}},dI=async({stream:Z,streams:X,ended:J,aborted:q,unpipeEvent:Q,controller:{signal:$}})=>{if(await SK(Z,Q,{signal:$}),!Z.readable)return SK($,"abort",{signal:$});X.delete(Z),J.delete(Z),q.delete(Z)},cI=(Z)=>{if(Z.writable)Z.end()},mK=(Z,X)=>{if(uK(X))hZ(Z);else pK(Z,X)},uK=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",hZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},pK=(Z,X)=>{if(!Z.destroyed)Z.once("error",lI),Z.destroy(X)},lI=()=>{},Y5=(Z,X)=>{let J=Z.getMaxListeners();if(J!==0&&J!==Number.POSITIVE_INFINITY)Z.setMaxListeners(J+X)},bK=2,hK=1;var H5=B(()=>{fK=class fK extends yI{#J=new Set([]);#q=new Set([]);#X=new Set([]);#Y;#U=Symbol("unpipe");#V=new WeakMap;add(Z){if(bZ(Z),this.#J.has(Z))return;this.#J.add(Z),this.#Y??=hI(this,this.#J,this.#U);let X=mI({passThroughStream:this,stream:Z,streams:this.#J,ended:this.#q,aborted:this.#X,onFinished:this.#Y,unpipeEvent:this.#U});this.#V.set(Z,X),Z.pipe(this,{end:!1})}async remove(Z){if(bZ(Z),!this.#J.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 dK}from"node:stream/promises";var p6=(Z,X)=>{Z.pipe(X),nI(Z,X),iI(Z,X)},nI=async(Z,X)=>{if(y0(Z)||y0(X))return;try{await dK(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}gZ(X)},gZ=(Z)=>{if(Z.writable)Z.end()},iI=async(Z,X)=>{if(y0(Z)||y0(X))return;try{await dK(X,{cleanup:!0,readable:!1,writable:!0})}catch{}fZ(Z)},fZ=(Z)=>{if(Z.readable)Z.destroy()};var U5=B(()=>{q1()});var cK=(Z,X,J)=>{let q=new Map;for(let[Q,{stdioItems:$,direction:Y}]of Object.entries(X)){for(let{stream:H}of $.filter(({type:K})=>j0.has(K)))aI(Z,H,Y,Q);for(let{stream:H}of $.filter(({type:K})=>!j0.has(K)))sI({subprocess:Z,stream:H,direction:Y,fdNumber:Q,pipeGroups:q,controller:J})}for(let[Q,$]of q.entries()){let Y=$.length===1?$[0]:n1($);p6(Y,Q)}},aI=(Z,X,J,q)=>{if(J==="output")p6(Z.stdio[q],X);else p6(X,Z.stdio[q]);let Q=oI[q];if(Q!==void 0)Z[Q]=X;Z.stdio[q]=X},oI,sI=({subprocess:Z,stream:X,direction:J,fdNumber:q,pipeGroups:Q,controller:$})=>{if(X===void 0)return;rI(X,$);let[Y,H]=J==="output"?[X,Z.stdio[q]]:[Z.stdio[q],X],K=Q.get(Y)??[];Q.set(Y,[...K,H])},rI=(Z,{signal:X})=>{if(y0(Z))f1(Z,tI,X)},tI=2;var lK=B(()=>{H5();q1();M8();_0();U5();oI=["stdin","stdout","stderr"]});var i1;var nK=B(()=>{i1=[];i1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")i1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")i1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class iK{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(uZ[mZ])return uZ[mZ];eI(uZ,mZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,X){this.listeners[Z].push(X)}removeListener(Z,X){let J=this.listeners[Z],q=J.indexOf(X);if(q===-1)return;if(q===0&&J.length===1)J.length=0;else J.splice(q,1)}emit(Z,X,J){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let q=!1;for(let Q of this.listeners[Z])q=Q(X,J)===!0||q;if(Z==="exit")q=this.emit("afterExit",X,J)||q;return q}}class dZ{}var K5=(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",mZ,uZ,eI,ZO=(Z)=>{return{onExit(X,J){return Z.onExit(X,J)},load(){return Z.load()},unload(){return Z.unload()}}},aK,oK,pZ,sK,Bd,Ld;var rK=B(()=>{nK();mZ=Symbol.for("signal-exit emitter"),uZ=globalThis,eI=Object.defineProperty.bind(Object);aK=class aK extends dZ{onExit(){return()=>{}}load(){}unload(){}};oK=class oK extends dZ{#J=pZ.platform==="win32"?"SIGINT":"SIGHUP";#q=new iK;#X;#Y;#U;#V={};#T=!1;constructor(Z){super();this.#X=Z,this.#V={};for(let X of i1)this.#V[X]=()=>{let J=this.#X.listeners(X),{count:q}=this.#q,Q=Z;if(typeof Q.__signal_exit_emitter__==="object"&&typeof Q.__signal_exit_emitter__.count==="number")q+=Q.__signal_exit_emitter__.count;if(J.length===q){this.unload();let $=this.#q.emit("exit",null,X),Y=X==="SIGHUP"?this.#J:X;if(!$)Z.kill(Z.pid,Y)}};this.#U=Z.reallyExit,this.#Y=Z.emit}onExit(Z,X){if(!K5(this.#X))return()=>{};if(this.#T===!1)this.load();let J=X?.alwaysLast?"afterExit":"exit";return this.#q.on(J,Z),()=>{if(this.#q.removeListener(J,Z),this.#q.listeners.exit.length===0&&this.#q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#T)return;this.#T=!0,this.#q.count+=1;for(let Z of i1)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.#T)return;this.#T=!1,i1.forEach((Z)=>{let X=this.#V[Z];if(!X)throw Error("Listener not defined for signal: "+Z);try{this.#X.removeListener(Z,X)}catch(J){}}),this.#X.emit=this.#Y,this.#X.reallyExit=this.#U,this.#q.count-=1}#z(Z){if(!K5(this.#X))return 0;return this.#X.exitCode=Z||0,this.#q.emit("exit",this.#X.exitCode,null),this.#U.call(this.#X,this.#X.exitCode)}#H(Z,...X){let J=this.#Y;if(Z==="exit"&&K5(this.#X)){if(typeof X[0]==="number")this.#X.exitCode=X[0];let q=J.call(this.#X,Z,...X);return this.#q.emit("exit",this.#X.exitCode,null),q}else return J.call(this.#X,Z,...X)}};pZ=globalThis.process,{onExit:sK,load:Bd,unload:Ld}=ZO(K5(pZ)?new oK(pZ):new aK)});import{addAbortListener as XO}from"node:events";var tK=(Z,{cleanup:X,detached:J},{signal:q})=>{if(!X||J)return;let Q=sK(()=>{Z.kill()});XO(q,()=>{Q()})};var eK=B(()=>{rK()});var XG=({source:Z,sourcePromise:X,boundOptions:J,createNested:q},...Q)=>{let $=q8(),{destination:Y,destinationStream:H,destinationError:K,from:W,unpipeSignal:G}=JO(J,q,Q),{sourceStream:V,sourceError:L}=QO(Z,W),{options:_,fileDescriptors:z}=o0.get(Z);return{sourcePromise:X,sourceStream:V,sourceOptions:_,sourceError:L,destination:Y,destinationStream:H,destinationError:K,unpipeSignal:G,fileDescriptors:z,startTime:$}},JO=(Z,X,J)=>{try{let{destination:q,pipeOptions:{from:Q,to:$,unpipeSignal:Y}={}}=qO(Z,X,...J),H=R8(q,$);return{destination:q,destinationStream:H,from:Q,unpipeSignal:Y}}catch(q){return{destinationError:q}}},qO=(Z,X,J,...q)=>{if(Array.isArray(J))return{destination:X(ZG,Z)(J,...q),pipeOptions:Z};if(typeof J==="string"||J instanceof URL||I3(J)){if(Object.keys(Z).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[Q,$,Y]=n4(J,...q);return{destination:X(ZG)(Q,$,Y),pipeOptions:Y}}if(o0.has(J)){if(Object.keys(Z).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:J,pipeOptions:q[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${J}`)},ZG=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),QO=(Z,X)=>{try{return{sourceStream:b6(Z,X)}}catch(J){return{sourceError:J}}};var JG=B(()=>{w3();Q8();A1();k6()});var QG=({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q,fileDescriptors:Q,sourceOptions:$,startTime:Y})=>{let H=$O({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q});if(H!==void 0)throw cZ({error:H,fileDescriptors:Q,sourceOptions:$,startTime:Y})},$O=({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q})=>{if(X!==void 0&&q!==void 0)return q;if(q!==void 0)return fZ(Z),q;if(X!==void 0)return gZ(J),X},cZ=({error:Z,fileDescriptors:X,sourceOptions:J,startTime:q})=>f6({error:Z,command:qG,escapedCommand:qG,fileDescriptors:X,options:J,startTime:q,isSync:!1}),qG="source.pipe(destination)";var lZ=B(()=>{h2();U5()});var $G=async(Z)=>{let[{status:X,reason:J,value:q=J},{status:Q,reason:$,value:Y=$}]=await Z;if(!Y.pipedFrom.includes(q))Y.pipedFrom.push(q);if(Q==="rejected")throw Y;if(X==="rejected")throw q;return Y};var YG=()=>{};import{finished as YO}from"node:stream/promises";var HG=(Z,X,J)=>{let q=G5.has(X)?UO(Z,X):HO(Z,X);return f1(Z,GO,J.signal),f1(X,WO,J.signal),KO(X),q},HO=(Z,X)=>{let J=n1([Z]);return p6(J,X),G5.set(X,J),J},UO=(Z,X)=>{let J=G5.get(X);return J.add(Z),J},KO=async(Z)=>{try{await YO(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}G5.delete(Z)},G5,GO=2,WO=1;var UG=B(()=>{H5();M8();U5();G5=new WeakMap});import{aborted as VO}from"node:util";var KG=(Z,X)=>Z===void 0?[]:[BO(Z,X)],BO=async(Z,{sourceStream:X,mergedStream:J,fileDescriptors:q,sourceOptions:Q,startTime:$})=>{await VO(Z,X),await J.remove(X);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw cZ({error:Y,fileDescriptors:q,sourceOptions:Q,startTime:$})};var GG=B(()=>{lZ()});var W5=(Z,...X)=>{if(t(X[0]))return W5.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...X[0]}});let{destination:J,...q}=XG(Z,...X),Q=LO({...q,destination:J});return Q.pipe=W5.bind(void 0,{...Z,source:J,sourcePromise:Q,boundOptions:{}}),Q},LO=async({sourcePromise:Z,sourceStream:X,sourceOptions:J,sourceError:q,destination:Q,destinationStream:$,destinationError:Y,unpipeSignal:H,fileDescriptors:K,startTime:W})=>{let G=_O(Z,Q);QG({sourceStream:X,sourceError:q,destinationStream:$,destinationError:Y,fileDescriptors:K,sourceOptions:J,startTime:W});let V=new AbortController;try{let L=HG(X,$,V);return await Promise.race([$G(G),...KG(H,{sourceStream:X,mergedStream:L,sourceOptions:J,fileDescriptors:K,startTime:W})])}finally{V.abort()}},_O=(Z,X)=>Promise.allSettled([Z,X]);var WG=B(()=>{X1();JG();lZ();YG();UG();GG()});import{on as zO}from"node:events";import{getDefaultHighWaterMark as RO}from"node:stream";var V5=({subprocessStdout:Z,subprocess:X,binary:J,shouldEncode:q,encoding:Q,preserveNewlines:$})=>{let Y=new AbortController;return MO(X,Y),BG({stream:Z,controller:Y,binary:J,shouldEncode:!Z.readableObjectMode&&q,encoding:Q,shouldSplit:!Z.readableObjectMode,preserveNewlines:$})},MO=async(Z,X)=>{try{await Z}catch{}finally{X.abort()}},nZ=({stream:Z,onStreamEnd:X,lines:J,encoding:q,stripFinalNewline:Q,allMixed:$})=>{let Y=new AbortController;FO(X,Y,Z);let H=Z.readableObjectMode&&!$;return BG({stream:Z,controller:Y,binary:q==="buffer",shouldEncode:!H,encoding:q,shouldSplit:!H&&J,preserveNewlines:!Q})},FO=async(Z,X,J)=>{try{await Z}catch{J.destroy()}finally{X.abort()}},BG=({stream:Z,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y})=>{let H=zO(Z,"data",{signal:X.signal,highWaterMark:VG,highWatermark:VG});return DO({onStdoutChunk:H,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y})},iZ,VG,DO=async function*({onStdoutChunk:Z,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y}){let H=TO({binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y});try{for await(let[K]of Z)yield*l1(K,H,0)}catch(K){if(!X.signal.aborted)throw K}finally{yield*f2(H)}},TO=({binary:Z,shouldEncode:X,encoding:J,shouldSplit:q,preserveNewlines:Q})=>[Z5(Z,J,!X),t8(Z,Q,!q,{})].filter(Boolean);var B5=B(()=>{IZ();e8();jZ();iZ=RO(!0),VG=iZ});import{setImmediate as AO}from"node:timers/promises";var LG=async({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,buffer:Q,maxBuffer:$,lines:Y,allMixed:H,stripFinalNewline:K,verboseInfo:W,streamInfo:G})=>{let V=IO({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,allMixed:H,verboseInfo:W,streamInfo:G});if(!Q){await Promise.all([OO(Z),V]);return}let L=DZ(K,J),_=nZ({stream:Z,onStreamEnd:X,lines:Y,encoding:q,stripFinalNewline:L,allMixed:H}),[z]=await Promise.all([wO({stream:Z,iterable:_,fdNumber:J,encoding:q,maxBuffer:$,lines:Y}),V]);return z},IO=async({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,allMixed:Q,verboseInfo:$,streamInfo:{fileDescriptors:Y}})=>{if(!Q5({stdioItems:Y[J]?.stdioItems,encoding:q,verboseInfo:$,fdNumber:J}))return;let H=nZ({stream:Z,onStreamEnd:X,lines:!0,encoding:q,stripFinalNewline:!0,allMixed:Q});await $K(H,Z,J,$)},OO=async(Z)=>{if(await AO(),Z.readableFlowing===null)Z.resume()},wO=async({stream:Z,stream:{readableObjectMode:X},iterable:J,fdNumber:q,encoding:Q,maxBuffer:$,lines:Y})=>{try{if(X||Y)return await f8(J,{maxBuffer:$});if(Q==="buffer")return new Uint8Array(await m8(J,{maxBuffer:$}));return await p8(J,{maxBuffer:$})}catch(H){return _G(dH({error:H,stream:Z,readableObjectMode:X,lines:Y,encoding:Q,fdNumber:q}))}},aZ=async(Z)=>{try{return await Z}catch(X){return _G(X)}},_G=({bufferedData:Z})=>A9(Z)?new Uint8Array(Z):Z;var oZ=B(()=>{d8();F0();kZ();B5();d1();g2()});import{finished as jO}from"node:stream/promises";var d2=async(Z,X,J,{isSameDirection:q,stopOnExit:Q=!1}={})=>{let $=NO(Z,J),Y=new AbortController;try{await Promise.race([...Q?[J.exitPromise]:[],jO(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!$.stdinCleanedUp)EO(H,X,J,q)}finally{Y.abort()}},NO=(Z,{originalStreams:[X],subprocess:J})=>{let q={stdinCleanedUp:!1};if(Z===X)kO(Z,J,q);return q},kO=(Z,X,J)=>{let{_destroy:q}=Z;Z._destroy=(...Q)=>{xO(X,J),q.call(Z,...Q)}},xO=({exitCode:Z,signalCode:X},J)=>{if(Z!==null||X!==null)J.stdinCleanedUp=!0},EO=(Z,X,J,q)=>{if(!PO(Z,X,J,q))throw Z},PO=(Z,X,J,q=!0)=>{if(J.propagating)return zG(Z)||L5(Z);return J.propagating=!0,sZ(J,X)===q?zG(Z):L5(Z)},sZ=({fileDescriptors:Z},X)=>X!=="all"&&Z[X].direction==="input",L5=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",zG=(Z)=>Z?.code==="EPIPE";var _5=()=>{};var RG=({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((K,W)=>rZ({stream:K,fdNumber:W,encoding:X,buffer:J[W],maxBuffer:q[W],lines:Q[W],allMixed:!1,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})),rZ=async({stream:Z,fdNumber:X,encoding:J,buffer:q,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W})=>{if(!Z)return;let G=d2(Z,X,W);if(sZ(W,X)){await G;return}let[V]=await Promise.all([LG({stream:Z,onStreamEnd:G,fdNumber:X,encoding:J,buffer:q,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W}),G]);return V};var tZ=B(()=>{oZ();_5()});var MG=({stdout:Z,stderr:X},{all:J})=>J&&(Z||X)?n1([Z,X].filter(Boolean)):void 0,FG=({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>rZ({...vO(Z,J),fdNumber:"all",encoding:X,maxBuffer:q[1]+q[2],lines:Q[1]||Q[2],allMixed:CO(Z),stripFinalNewline:$,verboseInfo:Y,streamInfo:H}),vO=({stdout:Z,stderr:X,all:J},[,q,Q])=>{let $=q||Q;if(!$)return{stream:J,buffer:$};if(!q)return{stream:X,buffer:$};if(!Q)return{stream:Z,buffer:$};return{stream:J,buffer:$}},CO=({all:Z,stdout:X,stderr:J})=>Z&&X&&J&&X.readableObjectMode!==J.readableObjectMode;var eZ=B(()=>{H5();tZ()});var DG=(Z)=>E6(Z,"ipc"),TG=(Z,X)=>{let J=J8(Z);n0({type:"ipc",verboseMessage:J,fdNumber:"ipc",verboseInfo:X})};var AG=B(()=>{P6();D1()});var IG=async({subprocess:Z,buffer:X,maxBuffer:J,ipc:q,ipcOutput:Q,verboseInfo:$})=>{if(!q)return Q;let Y=DG($),H=Q1(X,"ipc"),K=Q1(J,"ipc");for await(let W of CZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:q,shouldAwait:!1,reference:!0})){if(H)cH(Z,Q,K),Q.push(W);if(Y)TG(W,$)}return Q},OG=async(Z,X)=>{return await Promise.allSettled([Z]),X};var wG=B(()=>{d1();AG();$1();yZ()});import{once as yO}from"node:events";var jG=async({subprocess:Z,options:{encoding:X,buffer:J,maxBuffer:q,lines:Q,timeoutDuration:$,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,stripFinalNewline:W,ipc:G,ipcInput:V},context:L,verboseInfo:_,fileDescriptors:z,originalStreams:D,onInternalError:M,controller:F})=>{let N=VK(Z,L),R={originalStreams:D,fileDescriptors:z,subprocess:Z,exitPromise:N,propagating:!1},w=RG({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:W,verboseInfo:_,streamInfo:R}),A=FG({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:W,verboseInfo:_,streamInfo:R}),I=[],T=IG({subprocess:Z,buffer:J,maxBuffer:q,ipc:G,ipcOutput:I,verboseInfo:_}),b=SO(D,Z,R),j=bO(z,R);try{return await Promise.race([Promise.all([{},LK(N),Promise.all(w),A,T,BH(Z,V),...b,...j]),M,hO(Z,F),...UH(Z,$,L,F),...kY({subprocess:Z,cancelSignal:Y,gracefulCancel:H,context:L,controller:F}),...YH({subprocess:Z,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,context:L,controller:F})])}catch(x){return L.terminationReason??="other",Promise.all([{error:x},N,Promise.all(w.map((v)=>aZ(v))),aZ(A),OG(T,I),Promise.allSettled(b),Promise.allSettled(j)])}},SO=(Z,X,J)=>Z.map((q,Q)=>q===X.stdio[Q]?void 0:d2(q,Q,J)),bO=(Z,X)=>Z.flatMap(({stdioItems:J},q)=>J.filter(({value:Q,stream:$=Q})=>b0($,{checkOpen:!1})&&!y0($)).map(({type:Q,value:$,stream:Y=$})=>d2(Y,q,X,{isSameDirection:j0.has(Q),stopOnExit:Q==="native"}))),hO=async(Z,{signal:X})=>{let[J]=await yO(Z,"error",{signal:X});throw J};var NG=B(()=>{p1();s3();u3();o3();q1();_0();oZ();wG();t3();eZ();tZ();PZ();_5()});var kG=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),c2=(Z,X,J)=>{let q=Z[J];if(!q.has(X))q.set(X,[]);let Q=q.get(X),$=a0();return Q.push($),{resolve:$.resolve.bind($),promises:Q}},d6=async({resolve:Z,promises:X},J)=>{Z();let[q]=await Promise.race([Promise.allSettled([!0,J]),Promise.all([!1,...X])]);return!q};var z5=B(()=>{S6()});import{finished as xG}from"node:stream/promises";var ZX=async(Z)=>{if(Z===void 0)return;try{await XX(Z)}catch{}},EG=async(Z)=>{if(Z===void 0)return;try{await JX(Z)}catch{}},XX=async(Z)=>{await xG(Z,{cleanup:!0,readable:!1,writable:!0})},JX=async(Z)=>{await xG(Z,{cleanup:!0,readable:!0,writable:!1})},R5=async(Z,X)=>{if(await Z,X)throw X},M5=(Z,X,J)=>{if(J&&!L5(J))Z.destroy(J);else if(X)Z.destroy()};var qX=B(()=>{_5()});import{Readable as gO}from"node:stream";import{callbackify as fO}from"node:util";var PG=({subprocess:Z,concurrentStreams:X,encoding:J},{from:q,binary:Q=!0,preserveNewlines:$=!0}={})=>{let Y=Q||D0.has(J),{subprocessStdout:H,waitReadableDestroy:K}=QX(Z,q,X),{readableEncoding:W,readableObjectMode:G,readableHighWaterMark:V}=$X(H,Y),{read:L,onStdoutDataDone:_}=YX({subprocessStdout:H,subprocess:Z,binary:Y,encoding:J,preserveNewlines:$}),z=new gO({read:L,destroy:fO(UX.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:K})),highWaterMark:V,objectMode:G,encoding:W});return HX({subprocessStdout:H,onStdoutDataDone:_,readable:z,subprocess:Z}),z},QX=(Z,X,J)=>{let q=b6(Z,X),Q=c2(J,q,"readableDestroy");return{subprocessStdout:q,waitReadableDestroy:Q}},$X=({readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:J},q)=>q?{readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:J}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:iZ},YX=({subprocessStdout:Z,subprocess:X,binary:J,encoding:q,preserveNewlines:Q})=>{let $=a0(),Y=V5({subprocessStdout:Z,subprocess:X,binary:J,shouldEncode:!J,encoding:q,preserveNewlines:Q});return{read(){mO(this,Y,$)},onStdoutDataDone:$}},mO=async(Z,X,J)=>{try{let{value:q,done:Q}=await X.next();if(Q)J.resolve();else Z.push(q)}catch{}},HX=async({subprocessStdout:Z,onStdoutDataDone:X,readable:J,subprocess:q,subprocessStdin:Q})=>{try{if(await JX(Z),await q,await ZX(Q),await X,J.readable)J.push(null)}catch($){await ZX(Q),vG(J,$)}},UX=async({subprocessStdout:Z,subprocess:X,waitReadableDestroy:J},q)=>{if(await d6(J,X))vG(Z,q),await R5(X,q)},vG=(Z,X)=>{M5(Z,Z.readable,X)};var KX=B(()=>{m1();A1();B5();S6();z5();qX()});import{Writable as uO}from"node:stream";import{callbackify as CG}from"node:util";var yG=({subprocess:Z,concurrentStreams:X},{to:J}={})=>{let{subprocessStdin:q,waitWritableFinal:Q,waitWritableDestroy:$}=GX(Z,J,X),Y=new uO({...WX(q,Z,Q),destroy:CG(BX.bind(void 0,{subprocessStdin:q,subprocess:Z,waitWritableFinal:Q,waitWritableDestroy:$})),highWaterMark:q.writableHighWaterMark,objectMode:q.writableObjectMode});return VX(q,Y),Y},GX=(Z,X,J)=>{let q=R8(Z,X),Q=c2(J,q,"writableFinal"),$=c2(J,q,"writableDestroy");return{subprocessStdin:q,waitWritableFinal:Q,waitWritableDestroy:$}},WX=(Z,X,J)=>({write:pO.bind(void 0,Z),final:CG(dO.bind(void 0,Z,X,J))}),pO=(Z,X,J,q)=>{if(Z.write(X,J))q();else Z.once("drain",q)},dO=async(Z,X,J)=>{if(await d6(J,X)){if(Z.writable)Z.end();await X}},VX=async(Z,X,J)=>{try{if(await XX(Z),X.writable)X.end()}catch(q){await EG(J),SG(X,q)}},BX=async({subprocessStdin:Z,subprocess:X,waitWritableFinal:J,waitWritableDestroy:q},Q)=>{if(await d6(J,X),await d6(q,X))SG(Z,Q),await R5(X,Q)},SG=(Z,X)=>{M5(Z,Z.writable,X)};var LX=B(()=>{A1();z5();qX()});import{Duplex as cO}from"node:stream";import{callbackify as lO}from"node:util";var bG=({subprocess:Z,concurrentStreams:X,encoding:J},{from:q,to:Q,binary:$=!0,preserveNewlines:Y=!0}={})=>{let H=$||D0.has(J),{subprocessStdout:K,waitReadableDestroy:W}=QX(Z,q,X),{subprocessStdin:G,waitWritableFinal:V,waitWritableDestroy:L}=GX(Z,Q,X),{readableEncoding:_,readableObjectMode:z,readableHighWaterMark:D}=$X(K,H),{read:M,onStdoutDataDone:F}=YX({subprocessStdout:K,subprocess:Z,binary:H,encoding:J,preserveNewlines:Y}),N=new cO({read:M,...WX(G,Z,V),destroy:lO(nO.bind(void 0,{subprocessStdout:K,subprocessStdin:G,subprocess:Z,waitReadableDestroy:W,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:D,writableHighWaterMark:G.writableHighWaterMark,readableObjectMode:z,writableObjectMode:G.writableObjectMode,encoding:_});return HX({subprocessStdout:K,onStdoutDataDone:F,readable:N,subprocess:Z,subprocessStdin:G}),VX(G,N,K),N},nO=async({subprocessStdout:Z,subprocessStdin:X,subprocess:J,waitReadableDestroy:q,waitWritableFinal:Q,waitWritableDestroy:$},Y)=>{await Promise.all([UX({subprocessStdout:Z,subprocess:J,waitReadableDestroy:q},Y),BX({subprocessStdin:X,subprocess:J,waitWritableFinal:Q,waitWritableDestroy:$},Y)])};var hG=B(()=>{m1();KX();LX()});var _X=(Z,X,{from:J,binary:q=!1,preserveNewlines:Q=!1}={})=>{let $=q||D0.has(X),Y=b6(Z,J),H=V5({subprocessStdout:Y,subprocess:Z,binary:$,shouldEncode:!0,encoding:X,preserveNewlines:Q});return iO(H,Y,Z)},iO=async function*(Z,X,J){try{yield*Z}finally{if(X.readable)X.destroy();await J}};var gG=B(()=>{m1();A1();B5()});var fG=(Z,{encoding:X})=>{let J=kG();Z.readable=PG.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:X}),Z.writable=yG.bind(void 0,{subprocess:Z,concurrentStreams:J}),Z.duplex=bG.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:X}),Z.iterable=_X.bind(void 0,Z,X),Z[Symbol.asyncIterator]=_X.bind(void 0,Z,X,{})};var mG=B(()=>{z5();KX();LX();hG();gG()});var uG=(Z,X)=>{for(let[J,q]of oO){let Q=q.value.bind(X);Reflect.defineProperty(Z,J,{...q,value:Q})}},aO,oO;var pG=B(()=>{aO=(async()=>{})().constructor.prototype,oO=["then","catch","finally"].map((Z)=>[Z,Reflect.getOwnPropertyDescriptor(aO,Z)])});import{setMaxListeners as sO}from"node:events";import{spawn as rO}from"node:child_process";var dG=(Z,X,J,q)=>{let{file:Q,commandArguments:$,command:Y,escapedCommand:H,startTime:K,verboseInfo:W,options:G,fileDescriptors:V}=tO(Z,X,J),{subprocess:L,promise:_}=Zw({file:Q,commandArguments:$,options:G,startTime:K,verboseInfo:W,command:Y,escapedCommand:H,fileDescriptors:V});return L.pipe=W5.bind(void 0,{source:L,sourcePromise:_,boundOptions:{},createNested:q}),uG(L,_),o0.set(L,{options:G,fileDescriptors:V}),L},tO=(Z,X,J)=>{let{command:q,escapedCommand:Q,startTime:$,verboseInfo:Y}=$8(Z,X,J),{file:H,commandArguments:K,options:W}=C8(Z,X,J),G=eO(W),V=CK(G,Y);return{file:H,commandArguments:K,command:q,escapedCommand:Q,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},eO=({timeout:Z,signal:X,...J})=>{if(X!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...J,timeoutDuration:Z}},Zw=({file:Z,commandArguments:X,options:J,startTime:q,verboseInfo:Q,command:$,escapedCommand:Y,fileDescriptors:H})=>{let K;try{K=rO(...y8(Z,X,J))}catch(z){return kK({error:z,command:$,escapedCommand:Y,fileDescriptors:H,options:J,startTime:q,verboseInfo:Q})}let W=new AbortController;sO(Number.POSITIVE_INFINITY,W.signal);let G=[...K.stdio];cK(K,H,W),tK(K,J,W);let V={},L=a0();K.kill=jY.bind(void 0,{kill:K.kill.bind(K),options:J,onInternalError:L,context:V,controller:W}),K.all=MG(K,J),fG(K,J),wK(K,J);let _=Xw({subprocess:K,options:J,startTime:q,verboseInfo:Q,fileDescriptors:H,originalStreams:G,command:$,escapedCommand:Y,context:V,onInternalError:L,controller:W});return{subprocess:K,promise:_}},Xw=async({subprocess:Z,options:X,startTime:J,verboseInfo:q,fileDescriptors:Q,originalStreams:$,command:Y,escapedCommand:H,context:K,onInternalError:W,controller:G})=>{let[V,[L,_],z,D,M]=await jG({subprocess:Z,options:X,context:K,verboseInfo:q,fileDescriptors:Q,originalStreams:$,onInternalError:W,controller:G});G.abort(),W.resolve();let F=z.map((w,A)=>U1(w,X,A)),N=U1(D,X,"all"),R=Jw({errorInfo:V,exitCode:L,signal:_,stdio:F,all:N,ipcOutput:M,context:K,options:X,command:Y,escapedCommand:H,startTime:J});return m6(R,q,X)},Jw=({errorInfo:Z,exitCode:X,signal:J,stdio:q,all:Q,ipcOutput:$,context:Y,options:H,command:K,escapedCommand:W,startTime:G})=>("error"in Z)?b2({error:Z.error,command:K,escapedCommand:W,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof Y1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:X,signal:J,stdio:q,all:Q,ipcOutput:$,options:H,startTime:G,isSync:!1}):l8({command:K,escapedCommand:W,stdio:q,all:Q,ipcOutput:$,options:H,startTime:G});var cG=B(()=>{d8();y3();XZ();A1();JZ();SZ();h2();n8();xK();yK();g2();lK();B8();eK();WG();eZ();NG();mG();S6();pG()});var F5=(Z,X)=>{let J=Object.fromEntries(Object.entries(X).map(([q,Q])=>[q,qw(q,Z[q],Q)]));return{...Z,...J}},qw=(Z,X,J)=>{if(Qw.has(Z)&&t(X)&&t(J))return{...X,...J};return J},Qw;var lG=B(()=>{X1();$1();Qw=new Set(["env",...E3])});var w1=(Z,X,J,q)=>{let Q=(Y,H,K)=>w1(Y,H,J,K),$=(...Y)=>$w({mapArguments:Z,deepOptions:J,boundOptions:X,setBoundExeca:q,createNested:Q},...Y);if(q!==void 0)q($,Q,X);return $},$w=({mapArguments:Z,deepOptions:X={},boundOptions:J={},setBoundExeca:q,createNested:Q},$,...Y)=>{if(t($))return Q(Z,F5(J,$),q);let{file:H,commandArguments:K,options:W,isSync:G}=Yw({mapArguments:Z,firstArgument:$,nextArguments:Y,deepOptions:X,boundOptions:J});return G?RK(H,K,W):dG(H,K,W,Q)},Yw=({mapArguments:Z,firstArgument:X,nextArguments:J,deepOptions:q,boundOptions:Q})=>{let $=k9(X)?x9(X,J):[X,...J],[Y,H,K]=n4(...$),W=F5(F5(q,Q),K),{file:G=Y,commandArguments:V=H,options:L=W,isSync:_=!1}=Z({file:Y,commandArguments:H,options:W});return{file:G,commandArguments:V,options:L,isSync:_}};var nG=B(()=>{X1();w3();E9();MK();cG();lG()});var iG=({file:Z,commandArguments:X})=>oG(Z,X),aG=({file:Z,commandArguments:X})=>({...oG(Z,X),isSync:!0}),oG=(Z,X)=>{if(X.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${Z} ${X}.`);let[J,...q]=Hw(Z);return{file:J,commandArguments:q}},Hw=(Z)=>{if(typeof Z!=="string")throw TypeError(`The command must be a string: ${String(Z)}.`);let X=Z.trim();if(X==="")return[];let J=[];for(let q of X.split(Uw)){let Q=J.at(-1);if(Q&&Q.endsWith("\\"))J[J.length-1]=`${Q.slice(0,-1)} ${q}`;else J.push(q)}return J},Uw;var sG=B(()=>{Uw=/ +/g});var rG=(Z,X,J)=>{Z.sync=X(Kw,J),Z.s=Z.sync},tG=({options:Z})=>eG(Z),Kw=({options:Z})=>({...eG(Z),isSync:!0}),eG=(Z)=>({options:{...Gw(Z),...Z}}),Gw=({input:Z,inputFile:X,stdio:J})=>Z===void 0&&X===void 0&&J===void 0?{stdin:"inherit"}:{},ZW;var XW=B(()=>{ZW={preferLocal:!0}});var zX,N0,qn,Qn,$n,Yn,Hn,Un,Kn,Gn;var c6=B(()=>{nG();sG();r3();XW();SZ();zX=w1(()=>({})),N0=w1(()=>({isSync:!0})),qn=w1(iG),Qn=w1(aG),$n=w1(GH),Yn=w1(tG,{},ZW,rG),{sendMessage:Hn,getOneMessage:Un,getEachMessage:Kn,getCancelSignal:Gn}=jK()});async function Ww(Z){if(process.platform==="win32"){let J=await zX(`where.exe ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(J.exitCode!==0||!J.stdout)return null;return J.stdout.trim().split(/\r?\n/)[0]||null}let X=await zX(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(X.exitCode!==0||!X.stdout)return null;return X.stdout.trim()}function Vw(Z){if(process.platform==="win32")try{return F6(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return F6(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var RX,JW,D5;var T5=B(()=>{c6();a7();RX=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,JW=RX?async(Z)=>RX(Z):Ww,D5=RX??Vw});function qW(Z,X){return{cmd:D5(Z)??Z,args:X}}var QW=B(()=>{T5()});import{dirname as Bw,join as $W}from"path";async function l6(Z){try{return!!await JW(Z)}catch{return!1}}function Mw(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function Dw(){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 Fw)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(KW())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 KW(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function wn(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return n6.platform}var V0,Lw,_w,zw,UW,Rw,Fw,Tw,n6;var MX=B(()=>{L1();HW();D9();d0();QW();R0();T5();V0=u(()=>{let Z=YW(),X=Y0(),J=$W(X,`config${Z}.json`);if(!k().existsSync(J)){let Q=process.env.CLAUDIO_CONFIG_DIR?X:Bw(X),$=$W(Q,`.claudio${Z}.json`);if(k().existsSync($))return $}return J}),Lw=u(async()=>{try{let{default:Z}=await import("./index-0.1.12-sy5zw7vk.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});_w=u(async()=>{let Z=[];if(await l6("npm"))Z.push("npm");if(await l6("yarn"))Z.push("yarn");if(await l6("pnpm"))Z.push("pnpm");return Z}),zw=u(async()=>{let Z=[];if(await l6("bun"))Z.push("bun");if(await l6("deno"))Z.push("deno");if(await l6("node"))Z.push("node");return Z}),UW=u(()=>{try{return k().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),Rw=u(()=>{try{if(!UW())return!1;let{cmd:Z}=qW("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});Fw=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];Tw=u(()=>{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(k().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase().startsWith("ec2"))return"aws-ec2"}catch{}if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if(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(k().existsSync("/.dockerenv"))return"docker"}catch{}if(n6.platform==="darwin")return"unknown-darwin";if(n6.platform==="linux")return"unknown-linux";if(n6.platform==="win32")return"unknown-win32";return"unknown"});n6={hasInternetAccess:Lw,isCI:e(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:Dw(),isSSH:KW,getPackageManagers:_w,getRuntimes:zw,isRunningWithBun:u(F9),isWslEnvironment:UW,isNpmFromWindowsPath:Rw,isConductor:Mw,detectDeploymentEnvironment:Tw}});var kn,xn="∙",En="✻",Pn="↑",vn="↓",Cn="↯",yn="○",Sn="◐",bn="●",hn="◉",GW="⏸",gn="↻",fn="◇",mn="◆",un="※",pn="▎",dn="·✔︎·",cn="×";var WW=B(()=>{MX();kn=n6.platform==="darwin"?"⏺":"●"});var FX,Aw,l2;var VW=B(()=>{FX=["acceptEdits","bypassPermissions","default","dontAsk","plan"],Aw=[...FX,"auto"],l2=Aw});function Zi(Z){return!0}function A5(Z){return BW[Z]??BW.default}function Xi(Z){return A5(Z).external}function Ji(Z){return l2.includes(Z)?Z:"default"}function qi(Z){return A5(Z).title}function Qi(Z){return Z==="default"||Z===void 0}function $i(Z){return A5(Z).symbol}function Yi(Z){return A5(Z).color}var tn,en,BW;var LW=B(()=>{l0();WW();VW();b1();tn=O(()=>DX.enum(l2)),en=O(()=>DX.enum(FX)),BW={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:GW,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 _W=()=>{};var zW;var RW=B(()=>{_W();zW=["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 MW=()=>{};var FW=()=>{};var DW=B(()=>{RW();MW();FW()});var TW,Li="bash";var AW=B(()=>{TW=["bash","powershell"]});function Iw(){let Z=U.object({type:U.literal("command").describe("Shell command hook type"),command:U.string().describe("Shell command to execute"),if:I5(),shell:U.enum(TW).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:U.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:U.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.")}),X=U.object({type:U.literal("prompt").describe("LLM prompt hook type"),prompt:U.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:U.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:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")}),J=U.object({type:U.literal("http").describe("HTTP hook type"),url:U.string().url().describe("URL to POST the hook input JSON to"),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:U.record(U.string(),U.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:U.array(U.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:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")}),q=U.object({type:U.literal("agent").describe("Agentic verifier hook type"),prompt:U.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:U.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-4-6"). If not specified, uses Haiku.'),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:X,HttpHookSchema:J,AgentHookSchema:q}}var I5,IW,OW,a1;var O5=B(()=>{DW();l0();b1();AW();I5=O(()=>U.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.'));IW=O(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:X,AgentHookSchema:J,HttpHookSchema:q}=Iw();return U.discriminatedUnion("type",[Z,X,J,q])}),OW=O(()=>U.object({matcher:U.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:U.array(IW()).describe("List of hooks to execute when the matcher matches")})),a1=O(()=>U.partialRecord(U.enum(zW),U.array(OW())))});var Ii,Oi,Ow,ww,wW,jw,Nw,kw,xw,Ew,Pw,vw,w5,wi;var jW=B(()=>{l0();b1();Ii=O(()=>U.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),Oi=O(()=>U.enum(["stdio","sse","sse-ide","http","ws","sdk"])),Ow=O(()=>U.object({type:U.literal("stdio").optional(),command:U.string().min(1,"Command cannot be empty"),args:U.array(U.string()).default([]),env:U.record(U.string(),U.string()).optional()})),ww=O(()=>U.boolean()),wW=O(()=>U.object({clientId:U.string().optional(),callbackPort:U.number().int().positive().optional(),authServerMetadataUrl:U.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional(),xaa:ww().optional()})),jw=O(()=>U.object({type:U.literal("sse"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional(),oauth:wW().optional()})),Nw=O(()=>U.object({type:U.literal("sse-ide"),url:U.string(),ideName:U.string(),ideRunningInWindows:U.boolean().optional()})),kw=O(()=>U.object({type:U.literal("ws-ide"),url:U.string(),ideName:U.string(),authToken:U.string().optional(),ideRunningInWindows:U.boolean().optional()})),xw=O(()=>U.object({type:U.literal("http"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional(),oauth:wW().optional()})),Ew=O(()=>U.object({type:U.literal("ws"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional()})),Pw=O(()=>U.object({type:U.literal("sdk"),name:U.string()})),vw=O(()=>U.object({type:U.literal("claudeai-proxy"),url:U.string(),id:U.string()})),w5=O(()=>U.union([Ow(),jw(),Nw(),kw(),xw(),Ew(),Pw(),vw()])),wi=O(()=>U.object({mcpServers:U.record(U.string(),w5())}))});function Pi(Z,X){let J=Z.toLowerCase();return X.autoUpdate??(k5.has(J)&&!Cw.has(J))}function bw(Z){if(k5.has(Z.toLowerCase()))return!1;if(Sw.test(Z))return!0;return yw.test(Z)}function vi(Z,X){let J=Z.toLowerCase();if(!k5.has(J))return null;if(X.source==="github"){if(!(X.repo||"").toLowerCase().startsWith(`${j5}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${j5}/' can use this name.`;return null}if(X.source==="git"&&X.url){let q=X.url.toLowerCase(),Q=q.includes("github.com/anthropics/"),$=q.includes("git@github.com:anthropics/");if(Q||$)return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${j5}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${j5}' organization.`}function yi(Z){return typeof Z==="string"&&Z.startsWith("./")}function Si(Z){return Z.source==="file"||Z.source==="directory"}var k5,Cw,yw,Sw,j5="anthropics",K1,i6,NW,AX,IX,EW,OX,hw,Ci,gw,fw,mw,uw,pw,dw,kW,cw,lw,PW,nw,iw,xW,aw,vW,ow,sw,n2,TX,CW,rw,tw,bi,N5,ew,Zj,hi,Xj,Jj,qj,Qj,$j,gi,Yj,fi;var yW=B(()=>{l0();O5();jW();b1();k5=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),Cw=new Set(["knowledge-work-plugins"]);yw=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,Sw=/[^\u0020-\u007E]/;K1=O(()=>U.string().startsWith("./")),i6=O(()=>K1().endsWith(".json")),NW=O(()=>U.union([K1().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"),U.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),AX=O(()=>K1().endsWith(".md")),IX=O(()=>U.union([AX(),K1()])),EW=O(()=>U.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)=>!bw(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'})),OX=O(()=>U.object({name:U.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:U.string().optional().describe("Contact email for support or feedback"),url:U.string().optional().describe("Website, GitHub profile, or organization URL")})),hw=O(()=>U.object({name:U.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:U.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:U.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:OX().optional().describe("Information about the plugin creator or maintainer"),homepage:U.string().url().optional().describe("Plugin homepage or documentation URL"),repository:U.string().optional().describe("Source code repository URL"),license:U.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:U.array(U.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:U.array(Zj()).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.`)})),Ci=O(()=>U.object({description:U.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:U.lazy(()=>a1()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),gw=O(()=>U.object({hooks:U.union([i6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),U.lazy(()=>a1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),U.array(U.union([i6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),U.lazy(()=>a1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),fw=O(()=>U.object({source:IX().optional().describe("Path to command markdown file, relative to plugin root"),content:U.string().optional().describe("Inline markdown content for the command"),description:U.string().optional().describe("Command description override"),argumentHint:U.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:U.string().optional().describe("Default model for this command"),allowedTools:U.array(U.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'})),mw=O(()=>U.object({commands:U.union([IX().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"),U.array(IX().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"),U.record(U.string(),fw()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),uw=O(()=>U.object({agents:U.union([AX().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),U.array(AX().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")])})),pw=O(()=>U.object({skills:U.union([K1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),U.array(K1().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")])})),dw=O(()=>U.object({outputStyles:U.union([K1().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"),U.array(K1().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")])})),kW=O(()=>U.string().min(1)),cw=O(()=>U.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),lw=O(()=>U.object({mcpServers:U.union([i6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),NW().describe("Path or URL to MCPB file containing MCP server configuration"),U.record(U.string(),w5()).describe("MCP server configurations keyed by server name"),U.array(U.union([i6().describe("Path to MCP servers configuration file"),NW().describe("Path or URL to MCPB file"),U.record(U.string(),w5()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),PW=O(()=>U.object({type:U.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:U.string().describe("Human-readable label shown in the config dialog"),description:U.string().describe("Help text shown beneath the field in the config dialog"),required:U.boolean().optional().describe("If true, validation fails when this field is empty"),default:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())]).optional().describe("Default value used when the user provides nothing"),multiple:U.boolean().optional().describe("For string type: allow an array of strings"),sensitive:U.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:U.number().optional().describe("Minimum value (number type only)"),max:U.number().optional().describe("Maximum value (number type only)")}).strict()),nw=O(()=>U.object({userConfig:U.record(U.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"),PW()).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).")})),iw=O(()=>U.object({channels:U.array(U.object({server:U.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:U.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:U.record(U.string(),PW()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")}).strict()).describe("Channels this plugin provides. Each entry declares an MCP server as a message channel and optionally specifies user configuration to prompt for at enable time.")})),xW=O(()=>U.strictObject({command:U.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:U.array(kW()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:U.record(cw(),kW()).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:U.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:U.record(U.string(),U.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:U.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:U.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:U.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:U.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:U.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:U.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:U.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),aw=O(()=>U.object({lspServers:U.union([i6().describe("Path to .lsp.json configuration file relative to plugin root"),U.record(U.string(),xW()).describe("LSP server configurations keyed by server name"),U.array(U.union([i6().describe("Path to LSP configuration file"),U.record(U.string(),xW()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),vW=O(()=>U.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-._]*$/,J=/^[a-z0-9][a-z0-9-._]*$/;return X.test(Z)||J.test(Z)},"Invalid npm package name format")),ow=O(()=>U.object({settings:U.record(U.string(),U.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),sw=O(()=>U.object({...hw().shape,...gw().partial().shape,...mw().partial().shape,...uw().partial().shape,...pw().partial().shape,...dw().partial().shape,...iw().partial().shape,...lw().partial().shape,...aw().partial().shape,...ow().partial().shape,...nw().partial().shape})),n2=O(()=>U.discriminatedUnion("source",[U.object({source:U.literal("url"),url:U.string().url().describe("Direct URL to marketplace.json file"),headers:U.record(U.string(),U.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),U.object({source:U.literal("github"),repo:U.string().describe("GitHub repository in owner/repo format"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:U.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:U.array(U.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.')}),U.object({source:U.literal("git"),url:U.string().describe("Full git repository URL"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:U.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:U.array(U.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.')}),U.object({source:U.literal("npm"),package:vW().describe("NPM package containing marketplace.json")}),U.object({source:U.literal("file"),path:U.string().describe("Local file path to marketplace.json")}),U.object({source:U.literal("directory"),path:U.string().describe("Local directory containing .claude-plugin/marketplace.json")}),U.object({source:U.literal("hostPattern"),hostPattern:U.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$").')}),U.object({source:U.literal("pathPattern"),pathPattern:U.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.')}),U.object({source:U.literal("settings"),name:EW().refine((Z)=>!k5.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:U.array(rw()).describe("Plugin entries declared inline in settings.json"),owner:OX().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).")])),TX=O(()=>U.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),CW=O(()=>U.union([K1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),U.object({source:U.literal("npm"),package:vW().or(U.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:U.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:U.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),U.object({source:U.literal("pip"),package:U.string().describe("Python package name as it appears on PyPI"),version:U.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:U.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),U.object({source:U.literal("url"),url:U.string().describe("Full git repository URL (https:// or git@)"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().optional().describe("Specific commit SHA to use")}),U.object({source:U.literal("github"),repo:U.string().describe("GitHub repository in owner/repo format"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().optional().describe("Specific commit SHA to use")}),U.object({source:U.literal("git-subdir"),url:U.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:U.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:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().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.")])),rw=O(()=>U.object({name:U.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:CW().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against."),description:U.string().optional(),version:U.string().optional(),strict:U.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.'}));tw=O(()=>sw().partial().extend({name:U.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:CW().describe("Where to fetch the plugin from"),category:U.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:U.array(U.string()).optional().describe("Tags for searchability and discovery"),strict:U.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),bi=O(()=>U.object({name:EW(),owner:OX().describe("Marketplace maintainer or curator information"),plugins:U.array(tw()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:U.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:U.object({pluginRoot:U.string().optional().describe("Base path for relative plugin sources"),version:U.string().optional().describe("Marketplace version"),description:U.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:U.array(U.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")})),N5=O(()=>U.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),ew=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,Zj=O(()=>U.union([U.string().regex(ew,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),U.object({name:U.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:U.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),hi=O(()=>U.union([N5(),U.object({id:N5().describe('Plugin identifier (e.g., "formatter@tools")'),version:U.string().optional().describe('Version constraint (e.g., "^2.0.0")'),required:U.boolean().optional().describe("If true, cannot be disabled"),config:U.record(U.string(),U.unknown()).optional().describe("Plugin-specific configuration")})])),Xj=O(()=>U.object({version:U.string().describe("Currently installed version"),installedAt:U.string().describe("ISO 8601 timestamp of installation"),lastUpdated:U.string().optional().describe("ISO 8601 timestamp of last update"),installPath:U.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:U.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),Jj=O(()=>U.object({version:U.literal(1).describe("Schema version 1"),plugins:U.record(N5(),Xj()).describe("Map of plugin IDs to their installation metadata")})),qj=O(()=>U.enum(["managed","user","project","local"])),Qj=O(()=>U.object({scope:qj().describe("Installation scope"),projectPath:U.string().optional().describe("Project path (required for project/local scopes)"),installPath:U.string().describe("Absolute path to the versioned plugin directory"),version:U.string().optional().describe("Currently installed version"),installedAt:U.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:U.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:U.string().optional().describe("Git commit SHA for git-based plugins")})),$j=O(()=>U.object({version:U.literal(2).describe("Schema version 2"),plugins:U.record(N5(),U.array(Qj())).describe("Map of plugin IDs to arrays of installation entries")})),gi=O(()=>U.union([Jj(),$j()])),Yj=O(()=>U.object({source:n2().describe("Where to fetch the marketplace from"),installLocation:U.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:U.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:U.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),fi=O(()=>U.record(U.string(),Yj()))});function x5(Z){let X=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))X=X.replace(/_+/g,"_").replace(/^_|_$/g,"");return X}var SW=()=>{};function bW(Z){let X=Z.split("__"),[J,q,...Q]=X;if(J!=="mcp"||!q)return null;let $=Q.length>0?Q.join("__"):void 0;return{serverName:q,toolName:$}}function Hj(Z){return`mcp__${x5(Z)}__`}function Uj(Z,X){return`${Hj(Z)}${x5(X)}`}function di(Z){return Z.mcpInfo?Uj(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function ci(Z,X){let J=`mcp__${x5(X)}__`;return Z.replace(J,"")}function li(Z){let X=Z.replace(/\s*\(MCP\)\s*$/,"");X=X.trim();let J=X.indexOf(" - ");if(J!==-1)return X.substring(J+3).trim();return X}var hW=B(()=>{SW()});var wX="TaskOutput";var gW=()=>{};var fW="TaskStop",ai=`
|
|
76
|
+
if (condition) { yield value; }`)};var oU=B(()=>{F0()});import{Buffer as xA}from"node:buffer";import{StringDecoder as EA}from"node:string_decoder";var Z5=(Z,X,J)=>{if(J)return;if(Z)return{transform:PA.bind(void 0,new TextEncoder)};let q=new EA(X);return{transform:vA.bind(void 0,q),final:CA.bind(void 0,q)}},PA=function*(Z,X){if(xA.isBuffer(X))yield J1(X);else if(typeof X==="string")yield Z.encode(X);else yield X},vA=function*(Z,X){yield X0(X)?Z.write(X):X},CA=function*(Z){let X=Z.end();if(X!=="")yield X};var IZ=B(()=>{F0()});import{callbackify as sU}from"node:util";var OZ,X5=async function*(Z,X,J){if(J===X.length){yield Z;return}let{transform:q=SA}=X[J];for await(let Q of q(Z))yield*X5(Q,X,J+1)},rU=async function*(Z){for(let[X,{final:J}]of Object.entries(Z))yield*yA(J,Number(X),Z)},yA=async function*(Z,X,J){if(Z===void 0)return;for await(let q of Z())yield*X5(q,J,X+1)},tU,SA=function*(Z){yield Z};var eU=B(()=>{OZ=sU(async(Z,X,J,q)=>{X.currentIterable=Z(...J);try{for await(let Q of X.currentIterable)q.push(Q)}finally{delete X.currentIterable}}),tU=sU(async({currentIterable:Z},X)=>{if(Z!==void 0){await(X?Z.throw(X):Z.return());return}if(X)throw X})});var wZ=(Z,X,J,q)=>{try{for(let Q of Z(...X))J.push(Q);q()}catch(Q){q(Q)}},ZK=(Z,X)=>[...X.flatMap((J)=>[...l1(J,Z,0)]),...f2(Z)],l1=function*(Z,X,J){if(J===X.length){yield Z;return}let{transform:q=hA}=X[J];for(let Q of q(Z))yield*l1(Q,X,J+1)},f2=function*(Z){for(let[X,{final:J}]of Object.entries(Z))yield*bA(J,Number(X),Z)},bA=function*(Z,X,J){if(Z===void 0)return;for(let q of Z())yield*l1(q,J,X+1)},hA=function*(Z){yield Z};var jZ=()=>{};import{Transform as gA,getDefaultHighWaterMark as XK}from"node:stream";var NZ=({value:Z,value:{transform:X,final:J,writableObjectMode:q,readableObjectMode:Q},optionName:$},{encoding:Y})=>{let H={},K=JK(Z,Y,$),W=c1(X),G=c1(J),V=W?OZ.bind(void 0,X5,H):wZ.bind(void 0,l1),L=W||G?OZ.bind(void 0,rU,H):wZ.bind(void 0,f2),_=W||G?tU.bind(void 0,H):void 0;return{stream:new gA({writableObjectMode:q,writableHighWaterMark:XK(q),readableObjectMode:Q,readableHighWaterMark:XK(Q),transform(D,M,F){V([D,K,0],this,F)},flush(D){L([K],this,D)},destroy:_})}},J5=(Z,X,J,q)=>{let Q=X.filter(({type:Y})=>Y==="generator"),$=q?Q.reverse():Q;for(let{value:Y,optionName:H}of $){let K=JK(Y,J,H);Z=ZK(K,Z)}return Z},JK=({transform:Z,final:X,binary:J,writableObjectMode:q,readableObjectMode:Q,preserveNewlines:$},Y,H)=>{let K={};return[{transform:nU(q,H)},Z5(J,Y,q),t8(J,$,q,K),{transform:Z,final:X},{transform:iU(Q,H)},lU({binary:J,preserveNewlines:$,readableObjectMode:Q,state:K})].filter(Boolean)};var q5=B(()=>{_0();e8();oU();IZ();eU();jZ()});var qK=(Z,X)=>{for(let J of fA(Z))mA(Z,J,X)},fA=(Z)=>new Set(Object.entries(Z).filter(([,{direction:X}])=>X==="input").map(([X])=>Number(X))),mA=(Z,X,J)=>{let{stdioItems:q}=Z[X],Q=q.filter(({contents:H})=>H!==void 0);if(Q.length===0)return;if(X!==0){let[{type:H,optionName:K}]=Q;throw TypeError(`Only the \`stdin\` option, not \`${K}\`, can be ${O1[H]} with synchronous methods.`)}let Y=Q.map(({contents:H})=>H).map((H)=>uA(H,q));J.input=w2(Y)},uA=(Z,X)=>{let J=J5(Z,X,"utf8",!0);return pA(J),w2(J)},pA=(Z)=>{let X=Z.find((J)=>typeof J!=="string"&&!X0(J));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 QK=B(()=>{q5();F0();_0()});var Q5=({stdioItems:Z,encoding:X,verboseInfo:J,fdNumber:q})=>q!=="all"&&E6(J,q)&&!D0.has(X)&&dA(q)&&(Z.some(({type:Q,value:$})=>Q==="native"&&cA.has($))||Z.every(({type:Q})=>j0.has(Q))),dA=(Z)=>Z===1||Z===2,cA,$K=async(Z,X,J,q)=>{for await(let Q of Z)if(!lA(X))HK(Q,J,q)},YK=(Z,X,J)=>{for(let q of Z)HK(q,X,J)},lA=(Z)=>Z._readableState.pipes.length>0,HK=(Z,X,J)=>{let q=J8(Z);n0({type:"output",verboseMessage:q,fdNumber:X,verboseInfo:J})};var kZ=B(()=>{m1();_0();P6();D1();cA=new Set(["pipe","overlapped"])});import{writeFileSync as nA,appendFileSync as iA}from"node:fs";var UK=({fileDescriptors:Z,syncResult:{output:X},options:J,isMaxBuffer:q,verboseInfo:Q})=>{if(X===null)return{output:Array.from({length:3})};let $={},Y=new Set([]);return{output:X.map((K,W)=>aA({result:K,fileDescriptors:Z,fdNumber:W,state:$,outputFiles:Y,isMaxBuffer:q,verboseInfo:Q},J)),...$}},aA=({result:Z,fileDescriptors:X,fdNumber:J,state:q,outputFiles:Q,isMaxBuffer:$,verboseInfo:Y},{buffer:H,encoding:K,lines:W,stripFinalNewline:G,maxBuffer:V})=>{if(Z===null)return;let L=iH(Z,$,V),_=J1(L),{stdioItems:z,objectMode:D}=X[J],M=oA([_],z,K,q),{serializedResult:F,finalResult:N=F}=sA({chunks:M,objectMode:D,encoding:K,lines:W,stripFinalNewline:G,fdNumber:J});rA({serializedResult:F,fdNumber:J,state:q,verboseInfo:Y,encoding:K,stdioItems:z,objectMode:D});let R=H[J]?N:void 0;try{if(q.error===void 0)tA(F,z,Q);return R}catch(w){return q.error=w,R}},oA=(Z,X,J,q)=>{try{return J5(Z,X,J,!1)}catch(Q){return q.error=Q,Z}},sA=({chunks:Z,objectMode:X,encoding:J,lines:q,stripFinalNewline:Q,fdNumber:$})=>{if(X)return{serializedResult:Z};if(J==="buffer")return{serializedResult:w2(Z)};let Y=O9(Z,J);if(q[$])return{serializedResult:Y,finalResult:AZ(Y,!Q[$],X)};return{serializedResult:Y}},rA=({serializedResult:Z,fdNumber:X,state:J,verboseInfo:q,encoding:Q,stdioItems:$,objectMode:Y})=>{if(!Q5({stdioItems:$,encoding:Q,verboseInfo:q,fdNumber:X}))return;let H=AZ(Z,!1,Y);try{YK(H,X,q)}catch(K){J.error??=K}},tA=(Z,X,J)=>{for(let{path:q,append:Q}of X.filter(({type:$})=>o8.has($))){let $=typeof q==="string"?q:q.toString();if(Q||J.has($))iA(q,Z);else J.add($),nA(q,Z)}};var KK=B(()=>{kZ();q5();e8();F0();_0();d1()});var GK=([,Z,X],J)=>{if(!J.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,U1(X,J,"all")];if(Array.isArray(X))return[U1(Z,J,"all"),...X];if(X0(Z)&&X0(X))return j3([Z,X]);return`${Z}${X}`};var WK=B(()=>{F0();g2()});import{once as xZ}from"node:events";var VK=async(Z,X)=>{let[J,q]=await eA(Z);return X.isForcefullyTerminated??=!1,[J,q]},eA=async(Z)=>{let[X,J]=await Promise.allSettled([xZ(Z,"spawn"),xZ(Z,"exit")]);if(X.status==="rejected")return[];return J.status==="rejected"?BK(Z):J.value},BK=async(Z)=>{try{return await xZ(Z,"exit")}catch{return BK(Z)}},LK=async(Z)=>{let[X,J]=await Z;if(!ZI(X,J)&&EZ(X,J))throw new i0;return[X,J]},ZI=(Z,X)=>Z===void 0&&X===void 0,EZ=(Z,X)=>Z!==0||X!==null;var PZ=B(()=>{g1()});var _K=({error:Z,status:X,signal:J,output:q},{maxBuffer:Q})=>{let $=XI(Z,X,J),Y=$?.code==="ETIMEDOUT",H=nH($,q,Q);return{resultError:$,exitCode:X,signal:J,timedOut:Y,isMaxBuffer:H}},XI=(Z,X,J)=>{if(Z!==void 0)return Z;return EZ(X,J)?new i0:void 0};var zK=B(()=>{g1();d1();PZ()});import{spawnSync as JI}from"node:child_process";var RK=(Z,X,J)=>{let{file:q,commandArguments:Q,command:$,escapedCommand:Y,startTime:H,verboseInfo:K,options:W,fileDescriptors:G}=qI(Z,X,J),V=YI({file:q,commandArguments:Q,options:W,command:$,escapedCommand:Y,verboseInfo:K,fileDescriptors:G,startTime:H});return m6(V,K,W)},qI=(Z,X,J)=>{let{command:q,escapedCommand:Q,startTime:$,verboseInfo:Y}=$8(Z,X,J),H=QI(J),{file:K,commandArguments:W,options:G}=C8(Z,X,H);$I(G);let V=mU(G,Y);return{file:K,commandArguments:W,command:q,escapedCommand:Q,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},QI=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,$I=({ipc:Z,ipcInput:X,detached:J,cancelSignal:q})=>{if(X)$5("ipcInput");if(Z)$5("ipc: true");if(J)$5("detached: true");if(q)$5("cancelSignal")},$5=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},YI=({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,verboseInfo:$,fileDescriptors:Y,startTime:H})=>{let K=HI({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,fileDescriptors:Y,startTime:H});if(K.failed)return K;let{resultError:W,exitCode:G,signal:V,timedOut:L,isMaxBuffer:_}=_K(K,J),{output:z,error:D=W}=UK({fileDescriptors:Y,syncResult:K,options:J,isMaxBuffer:_,verboseInfo:$}),M=z.map((N,R)=>U1(N,J,R)),F=U1(GK(z,J),J,"all");return KI({error:D,exitCode:G,signal:V,timedOut:L,isMaxBuffer:_,stdio:M,all:F,options:J,command:q,escapedCommand:Q,startTime:H})},HI=({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,fileDescriptors:$,startTime:Y})=>{try{qK($,J);let H=UI(J);return JI(...y8(Z,X,H))}catch(H){return f6({error:H,command:q,escapedCommand:Q,fileDescriptors:$,options:J,startTime:Y,isSync:!0})}},UI=({encoding:Z,maxBuffer:X,...J})=>({...J,encoding:"buffer",maxBuffer:c8(X)}),KI=({error:Z,exitCode:X,signal:J,timedOut:q,isMaxBuffer:Q,stdio:$,all:Y,options:H,command:K,escapedCommand:W,startTime:G})=>Z===void 0?l8({command:K,escapedCommand:W,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G}):b2({error:Z,command:K,escapedCommand:W,timedOut:q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:Q,isForcefullyTerminated:!1,exitCode:X,signal:J,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G,isSync:!0});var MK=B(()=>{y3();XZ();JZ();h2();n8();pU();g2();QK();KK();d1();WK();zK()});import{once as vZ,on as GI}from"node:events";var FK=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q},{reference:Q=!0,filter:$}={})=>{return v6({methodName:"getOneMessage",isSubprocess:J,ipc:q,isConnected:j8(Z)}),WI({anyProcess:Z,channel:X,isSubprocess:J,filter:$,reference:Q})},WI=async({anyProcess:Z,channel:X,isSubprocess:J,filter:q,reference:Q})=>{F8(X,Q);let $=I1(Z,X,J),Y=new AbortController;try{return await Promise.race([VI($,q,Y),BI($,J,Y),LI($,J,Y)])}catch(H){throw C6(Z),H}finally{Y.abort(),D8(X,Q)}},VI=async(Z,X,{signal:J})=>{if(X===void 0){let[q]=await vZ(Z,"message",{signal:J});return q}for await(let[q]of GI(Z,"message",{signal:J}))if(X(q))return q},BI=async(Z,X,{signal:J})=>{await vZ(Z,"disconnect",{signal:J}),xY(X)},LI=async(Z,X,{signal:J})=>{let[q]=await vZ(Z,"strict:error",{signal:J});throw _8(q,X)};var DK=B(()=>{y6();P2();E2()});import{once as AK,on as _I}from"node:events";var IK=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q},{reference:Q=!0}={})=>CZ({anyProcess:Z,channel:X,isSubprocess:J,ipc:q,shouldAwait:!J,reference:Q}),CZ=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q,shouldAwait:Q,reference:$})=>{v6({methodName:"getEachMessage",isSubprocess:J,ipc:q,isConnected:j8(Z)}),F8(X,$);let Y=I1(Z,X,J),H=new AbortController,K={};return zI(Z,Y,H),RI({ipcEmitter:Y,isSubprocess:J,controller:H,state:K}),MI({anyProcess:Z,channel:X,ipcEmitter:Y,isSubprocess:J,shouldAwait:Q,controller:H,state:K,reference:$})},zI=async(Z,X,J)=>{try{await AK(X,"disconnect",{signal:J.signal}),J.abort()}catch{}},RI=async({ipcEmitter:Z,isSubprocess:X,controller:J,state:q})=>{try{let[Q]=await AK(Z,"strict:error",{signal:J.signal});q.error=_8(Q,X),J.abort()}catch{}},MI=async function*({anyProcess:Z,channel:X,ipcEmitter:J,isSubprocess:q,shouldAwait:Q,controller:$,state:Y,reference:H}){try{for await(let[K]of _I(J,"message",{signal:$.signal}))TK(Y),yield K}catch{TK(Y)}finally{if($.abort(),D8(X,H),!q)C6(Z);if(Q)await Z}},TK=({error:Z})=>{if(Z)throw Z};var yZ=B(()=>{y6();P2();E2()});import OK from"node:process";var wK=(Z,{ipc:X})=>{Object.assign(Z,NK(Z,!1,X))},jK=()=>{let Z=OK,X=!0,J=OK.channel!==void 0;return{...NK(Z,!0,J),getCancelSignal:qH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:J})}},NK=(Z,X,J)=>({sendMessage:E8.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J}),getOneMessage:FK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J}),getEachMessage:IK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J})});var SZ=B(()=>{P8();DK();yZ();O8()});import{ChildProcess as FI}from"node:child_process";import{PassThrough as DI,Readable as TI,Writable as AI,Duplex as II}from"node:stream";var kK=({error:Z,command:X,escapedCommand:J,fileDescriptors:q,options:Q,startTime:$,verboseInfo:Y})=>{FZ(q);let H=new FI;OI(H,q),Object.assign(H,{readable:wI,writable:jI,duplex:NI});let K=f6({error:Z,command:X,escapedCommand:J,fileDescriptors:q,options:Q,startTime:$,isSync:!1}),W=kI(K,Y,Q);return{subprocess:H,promise:W}},OI=(Z,X)=>{let J=m2(),q=m2(),Q=m2(),$=Array.from({length:X.length-3},m2),Y=m2(),H=[J,q,Q,...$];Object.assign(Z,{stdin:J,stdout:q,stderr:Q,all:Y,stdio:H})},m2=()=>{let Z=new DI;return Z.end(),Z},wI=()=>new TI({read(){}}),jI=()=>new AI({write(){}}),NI=()=>new II({read(){},write(){}}),kI=async(Z,X,J)=>m6(Z,X,J);var xK=B(()=>{r8();h2();n8()});import{createReadStream as EK,createWriteStream as PK}from"node:fs";import{Buffer as xI}from"node:buffer";import{Readable as u2,Writable as EI,Duplex as PI}from"node:stream";var CK=(Z,X)=>s8(vI,Z,X,!1),p2=({type:Z,optionName:X})=>{throw TypeError(`The \`${X}\` option cannot be ${O1[Z]}.`)},vK,vI;var yK=B(()=>{q5();r8();_0();vK={fileNumber:p2,generator:NZ,asyncGenerator:NZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:X,readableObjectMode:J}}){let q=X||J;return{stream:PI.fromWeb(Z,{objectMode:q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},vI={input:{...vK,fileUrl:({value:Z})=>({stream:EK(Z)}),filePath:({value:{file:Z}})=>({stream:EK(Z)}),webStream:({value:Z})=>({stream:u2.fromWeb(Z)}),iterable:({value:Z})=>({stream:u2.from(Z)}),asyncIterable:({value:Z})=>({stream:u2.from(Z)}),string:({value:Z})=>({stream:u2.from(Z)}),uint8Array:({value:Z})=>({stream:u2.from(xI.from(Z))})},output:{...vK,fileUrl:({value:Z})=>({stream:PK(Z)}),filePath:({value:{file:Z,append:X}})=>({stream:PK(Z,X?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:EI.fromWeb(Z)}),iterable:p2,asyncIterable:p2,string:p2,uint8Array:p2}}});import{on as CI,once as SK}from"node:events";import{PassThrough as yI,getDefaultHighWaterMark as SI}from"node:stream";import{finished as gK}from"node:stream/promises";function n1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let Q of Z)bZ(Q);let X=Z.some(({readableObjectMode:Q})=>Q),J=bI(Z,X),q=new fK({objectMode:X,writableHighWaterMark:J,readableHighWaterMark:J});for(let Q of Z)q.add(Q);return q}var bI=(Z,X)=>{if(Z.length===0)return SI(X);let J=Z.filter(({readableObjectMode:q})=>q===X).map(({readableHighWaterMark:q})=>q);return Math.max(...J)},fK,hI=async(Z,X,J)=>{Y5(Z,bK);let q=new AbortController;try{await Promise.race([gI(Z,q),fI(Z,X,J,q)])}finally{q.abort(),Y5(Z,-bK)}},gI=async(Z,{signal:X})=>{try{await gK(Z,{signal:X,cleanup:!0})}catch(J){throw mK(Z,J),J}},fI=async(Z,X,J,{signal:q})=>{for await(let[Q]of CI(Z,"unpipe",{signal:q}))if(X.has(Q))Q.emit(J)},bZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},mI=async({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,onFinished:$,unpipeEvent:Y})=>{Y5(Z,hK);let H=new AbortController;try{await Promise.race([uI($,X,H),pI({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,controller:H}),dI({stream:X,streams:J,ended:q,aborted:Q,unpipeEvent:Y,controller:H})])}finally{H.abort(),Y5(Z,-hK)}if(J.size>0&&J.size===q.size+Q.size)if(q.size===0&&Q.size>0)hZ(Z);else cI(Z)},uI=async(Z,X,{signal:J})=>{try{if(await Z,!J.aborted)hZ(X)}catch(q){if(!J.aborted)mK(X,q)}},pI=async({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,controller:{signal:$}})=>{try{if(await gK(X,{signal:$,cleanup:!0,readable:!0,writable:!1}),J.has(X))q.add(X)}catch(Y){if($.aborted||!J.has(X))return;if(uK(Y))Q.add(X);else pK(Z,Y)}},dI=async({stream:Z,streams:X,ended:J,aborted:q,unpipeEvent:Q,controller:{signal:$}})=>{if(await SK(Z,Q,{signal:$}),!Z.readable)return SK($,"abort",{signal:$});X.delete(Z),J.delete(Z),q.delete(Z)},cI=(Z)=>{if(Z.writable)Z.end()},mK=(Z,X)=>{if(uK(X))hZ(Z);else pK(Z,X)},uK=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",hZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},pK=(Z,X)=>{if(!Z.destroyed)Z.once("error",lI),Z.destroy(X)},lI=()=>{},Y5=(Z,X)=>{let J=Z.getMaxListeners();if(J!==0&&J!==Number.POSITIVE_INFINITY)Z.setMaxListeners(J+X)},bK=2,hK=1;var H5=B(()=>{fK=class fK extends yI{#J=new Set([]);#q=new Set([]);#X=new Set([]);#Y;#U=Symbol("unpipe");#V=new WeakMap;add(Z){if(bZ(Z),this.#J.has(Z))return;this.#J.add(Z),this.#Y??=hI(this,this.#J,this.#U);let X=mI({passThroughStream:this,stream:Z,streams:this.#J,ended:this.#q,aborted:this.#X,onFinished:this.#Y,unpipeEvent:this.#U});this.#V.set(Z,X),Z.pipe(this,{end:!1})}async remove(Z){if(bZ(Z),!this.#J.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 dK}from"node:stream/promises";var p6=(Z,X)=>{Z.pipe(X),nI(Z,X),iI(Z,X)},nI=async(Z,X)=>{if(y0(Z)||y0(X))return;try{await dK(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}gZ(X)},gZ=(Z)=>{if(Z.writable)Z.end()},iI=async(Z,X)=>{if(y0(Z)||y0(X))return;try{await dK(X,{cleanup:!0,readable:!1,writable:!0})}catch{}fZ(Z)},fZ=(Z)=>{if(Z.readable)Z.destroy()};var U5=B(()=>{q1()});var cK=(Z,X,J)=>{let q=new Map;for(let[Q,{stdioItems:$,direction:Y}]of Object.entries(X)){for(let{stream:H}of $.filter(({type:K})=>j0.has(K)))aI(Z,H,Y,Q);for(let{stream:H}of $.filter(({type:K})=>!j0.has(K)))sI({subprocess:Z,stream:H,direction:Y,fdNumber:Q,pipeGroups:q,controller:J})}for(let[Q,$]of q.entries()){let Y=$.length===1?$[0]:n1($);p6(Y,Q)}},aI=(Z,X,J,q)=>{if(J==="output")p6(Z.stdio[q],X);else p6(X,Z.stdio[q]);let Q=oI[q];if(Q!==void 0)Z[Q]=X;Z.stdio[q]=X},oI,sI=({subprocess:Z,stream:X,direction:J,fdNumber:q,pipeGroups:Q,controller:$})=>{if(X===void 0)return;rI(X,$);let[Y,H]=J==="output"?[X,Z.stdio[q]]:[Z.stdio[q],X],K=Q.get(Y)??[];Q.set(Y,[...K,H])},rI=(Z,{signal:X})=>{if(y0(Z))f1(Z,tI,X)},tI=2;var lK=B(()=>{H5();q1();M8();_0();U5();oI=["stdin","stdout","stderr"]});var i1;var nK=B(()=>{i1=[];i1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")i1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")i1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class iK{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(uZ[mZ])return uZ[mZ];eI(uZ,mZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,X){this.listeners[Z].push(X)}removeListener(Z,X){let J=this.listeners[Z],q=J.indexOf(X);if(q===-1)return;if(q===0&&J.length===1)J.length=0;else J.splice(q,1)}emit(Z,X,J){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let q=!1;for(let Q of this.listeners[Z])q=Q(X,J)===!0||q;if(Z==="exit")q=this.emit("afterExit",X,J)||q;return q}}class dZ{}var K5=(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",mZ,uZ,eI,ZO=(Z)=>{return{onExit(X,J){return Z.onExit(X,J)},load(){return Z.load()},unload(){return Z.unload()}}},aK,oK,pZ,sK,Bd,Ld;var rK=B(()=>{nK();mZ=Symbol.for("signal-exit emitter"),uZ=globalThis,eI=Object.defineProperty.bind(Object);aK=class aK extends dZ{onExit(){return()=>{}}load(){}unload(){}};oK=class oK extends dZ{#J=pZ.platform==="win32"?"SIGINT":"SIGHUP";#q=new iK;#X;#Y;#U;#V={};#T=!1;constructor(Z){super();this.#X=Z,this.#V={};for(let X of i1)this.#V[X]=()=>{let J=this.#X.listeners(X),{count:q}=this.#q,Q=Z;if(typeof Q.__signal_exit_emitter__==="object"&&typeof Q.__signal_exit_emitter__.count==="number")q+=Q.__signal_exit_emitter__.count;if(J.length===q){this.unload();let $=this.#q.emit("exit",null,X),Y=X==="SIGHUP"?this.#J:X;if(!$)Z.kill(Z.pid,Y)}};this.#U=Z.reallyExit,this.#Y=Z.emit}onExit(Z,X){if(!K5(this.#X))return()=>{};if(this.#T===!1)this.load();let J=X?.alwaysLast?"afterExit":"exit";return this.#q.on(J,Z),()=>{if(this.#q.removeListener(J,Z),this.#q.listeners.exit.length===0&&this.#q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#T)return;this.#T=!0,this.#q.count+=1;for(let Z of i1)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.#T)return;this.#T=!1,i1.forEach((Z)=>{let X=this.#V[Z];if(!X)throw Error("Listener not defined for signal: "+Z);try{this.#X.removeListener(Z,X)}catch(J){}}),this.#X.emit=this.#Y,this.#X.reallyExit=this.#U,this.#q.count-=1}#z(Z){if(!K5(this.#X))return 0;return this.#X.exitCode=Z||0,this.#q.emit("exit",this.#X.exitCode,null),this.#U.call(this.#X,this.#X.exitCode)}#H(Z,...X){let J=this.#Y;if(Z==="exit"&&K5(this.#X)){if(typeof X[0]==="number")this.#X.exitCode=X[0];let q=J.call(this.#X,Z,...X);return this.#q.emit("exit",this.#X.exitCode,null),q}else return J.call(this.#X,Z,...X)}};pZ=globalThis.process,{onExit:sK,load:Bd,unload:Ld}=ZO(K5(pZ)?new oK(pZ):new aK)});import{addAbortListener as XO}from"node:events";var tK=(Z,{cleanup:X,detached:J},{signal:q})=>{if(!X||J)return;let Q=sK(()=>{Z.kill()});XO(q,()=>{Q()})};var eK=B(()=>{rK()});var XG=({source:Z,sourcePromise:X,boundOptions:J,createNested:q},...Q)=>{let $=q8(),{destination:Y,destinationStream:H,destinationError:K,from:W,unpipeSignal:G}=JO(J,q,Q),{sourceStream:V,sourceError:L}=QO(Z,W),{options:_,fileDescriptors:z}=o0.get(Z);return{sourcePromise:X,sourceStream:V,sourceOptions:_,sourceError:L,destination:Y,destinationStream:H,destinationError:K,unpipeSignal:G,fileDescriptors:z,startTime:$}},JO=(Z,X,J)=>{try{let{destination:q,pipeOptions:{from:Q,to:$,unpipeSignal:Y}={}}=qO(Z,X,...J),H=R8(q,$);return{destination:q,destinationStream:H,from:Q,unpipeSignal:Y}}catch(q){return{destinationError:q}}},qO=(Z,X,J,...q)=>{if(Array.isArray(J))return{destination:X(ZG,Z)(J,...q),pipeOptions:Z};if(typeof J==="string"||J instanceof URL||I3(J)){if(Object.keys(Z).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[Q,$,Y]=n4(J,...q);return{destination:X(ZG)(Q,$,Y),pipeOptions:Y}}if(o0.has(J)){if(Object.keys(Z).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:J,pipeOptions:q[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${J}`)},ZG=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),QO=(Z,X)=>{try{return{sourceStream:b6(Z,X)}}catch(J){return{sourceError:J}}};var JG=B(()=>{w3();Q8();A1();k6()});var QG=({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q,fileDescriptors:Q,sourceOptions:$,startTime:Y})=>{let H=$O({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q});if(H!==void 0)throw cZ({error:H,fileDescriptors:Q,sourceOptions:$,startTime:Y})},$O=({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q})=>{if(X!==void 0&&q!==void 0)return q;if(q!==void 0)return fZ(Z),q;if(X!==void 0)return gZ(J),X},cZ=({error:Z,fileDescriptors:X,sourceOptions:J,startTime:q})=>f6({error:Z,command:qG,escapedCommand:qG,fileDescriptors:X,options:J,startTime:q,isSync:!1}),qG="source.pipe(destination)";var lZ=B(()=>{h2();U5()});var $G=async(Z)=>{let[{status:X,reason:J,value:q=J},{status:Q,reason:$,value:Y=$}]=await Z;if(!Y.pipedFrom.includes(q))Y.pipedFrom.push(q);if(Q==="rejected")throw Y;if(X==="rejected")throw q;return Y};var YG=()=>{};import{finished as YO}from"node:stream/promises";var HG=(Z,X,J)=>{let q=G5.has(X)?UO(Z,X):HO(Z,X);return f1(Z,GO,J.signal),f1(X,WO,J.signal),KO(X),q},HO=(Z,X)=>{let J=n1([Z]);return p6(J,X),G5.set(X,J),J},UO=(Z,X)=>{let J=G5.get(X);return J.add(Z),J},KO=async(Z)=>{try{await YO(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}G5.delete(Z)},G5,GO=2,WO=1;var UG=B(()=>{H5();M8();U5();G5=new WeakMap});import{aborted as VO}from"node:util";var KG=(Z,X)=>Z===void 0?[]:[BO(Z,X)],BO=async(Z,{sourceStream:X,mergedStream:J,fileDescriptors:q,sourceOptions:Q,startTime:$})=>{await VO(Z,X),await J.remove(X);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw cZ({error:Y,fileDescriptors:q,sourceOptions:Q,startTime:$})};var GG=B(()=>{lZ()});var W5=(Z,...X)=>{if(t(X[0]))return W5.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...X[0]}});let{destination:J,...q}=XG(Z,...X),Q=LO({...q,destination:J});return Q.pipe=W5.bind(void 0,{...Z,source:J,sourcePromise:Q,boundOptions:{}}),Q},LO=async({sourcePromise:Z,sourceStream:X,sourceOptions:J,sourceError:q,destination:Q,destinationStream:$,destinationError:Y,unpipeSignal:H,fileDescriptors:K,startTime:W})=>{let G=_O(Z,Q);QG({sourceStream:X,sourceError:q,destinationStream:$,destinationError:Y,fileDescriptors:K,sourceOptions:J,startTime:W});let V=new AbortController;try{let L=HG(X,$,V);return await Promise.race([$G(G),...KG(H,{sourceStream:X,mergedStream:L,sourceOptions:J,fileDescriptors:K,startTime:W})])}finally{V.abort()}},_O=(Z,X)=>Promise.allSettled([Z,X]);var WG=B(()=>{X1();JG();lZ();YG();UG();GG()});import{on as zO}from"node:events";import{getDefaultHighWaterMark as RO}from"node:stream";var V5=({subprocessStdout:Z,subprocess:X,binary:J,shouldEncode:q,encoding:Q,preserveNewlines:$})=>{let Y=new AbortController;return MO(X,Y),BG({stream:Z,controller:Y,binary:J,shouldEncode:!Z.readableObjectMode&&q,encoding:Q,shouldSplit:!Z.readableObjectMode,preserveNewlines:$})},MO=async(Z,X)=>{try{await Z}catch{}finally{X.abort()}},nZ=({stream:Z,onStreamEnd:X,lines:J,encoding:q,stripFinalNewline:Q,allMixed:$})=>{let Y=new AbortController;FO(X,Y,Z);let H=Z.readableObjectMode&&!$;return BG({stream:Z,controller:Y,binary:q==="buffer",shouldEncode:!H,encoding:q,shouldSplit:!H&&J,preserveNewlines:!Q})},FO=async(Z,X,J)=>{try{await Z}catch{J.destroy()}finally{X.abort()}},BG=({stream:Z,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y})=>{let H=zO(Z,"data",{signal:X.signal,highWaterMark:VG,highWatermark:VG});return DO({onStdoutChunk:H,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y})},iZ,VG,DO=async function*({onStdoutChunk:Z,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y}){let H=TO({binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y});try{for await(let[K]of Z)yield*l1(K,H,0)}catch(K){if(!X.signal.aborted)throw K}finally{yield*f2(H)}},TO=({binary:Z,shouldEncode:X,encoding:J,shouldSplit:q,preserveNewlines:Q})=>[Z5(Z,J,!X),t8(Z,Q,!q,{})].filter(Boolean);var B5=B(()=>{IZ();e8();jZ();iZ=RO(!0),VG=iZ});import{setImmediate as AO}from"node:timers/promises";var LG=async({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,buffer:Q,maxBuffer:$,lines:Y,allMixed:H,stripFinalNewline:K,verboseInfo:W,streamInfo:G})=>{let V=IO({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,allMixed:H,verboseInfo:W,streamInfo:G});if(!Q){await Promise.all([OO(Z),V]);return}let L=DZ(K,J),_=nZ({stream:Z,onStreamEnd:X,lines:Y,encoding:q,stripFinalNewline:L,allMixed:H}),[z]=await Promise.all([wO({stream:Z,iterable:_,fdNumber:J,encoding:q,maxBuffer:$,lines:Y}),V]);return z},IO=async({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,allMixed:Q,verboseInfo:$,streamInfo:{fileDescriptors:Y}})=>{if(!Q5({stdioItems:Y[J]?.stdioItems,encoding:q,verboseInfo:$,fdNumber:J}))return;let H=nZ({stream:Z,onStreamEnd:X,lines:!0,encoding:q,stripFinalNewline:!0,allMixed:Q});await $K(H,Z,J,$)},OO=async(Z)=>{if(await AO(),Z.readableFlowing===null)Z.resume()},wO=async({stream:Z,stream:{readableObjectMode:X},iterable:J,fdNumber:q,encoding:Q,maxBuffer:$,lines:Y})=>{try{if(X||Y)return await f8(J,{maxBuffer:$});if(Q==="buffer")return new Uint8Array(await m8(J,{maxBuffer:$}));return await p8(J,{maxBuffer:$})}catch(H){return _G(dH({error:H,stream:Z,readableObjectMode:X,lines:Y,encoding:Q,fdNumber:q}))}},aZ=async(Z)=>{try{return await Z}catch(X){return _G(X)}},_G=({bufferedData:Z})=>A9(Z)?new Uint8Array(Z):Z;var oZ=B(()=>{d8();F0();kZ();B5();d1();g2()});import{finished as jO}from"node:stream/promises";var d2=async(Z,X,J,{isSameDirection:q,stopOnExit:Q=!1}={})=>{let $=NO(Z,J),Y=new AbortController;try{await Promise.race([...Q?[J.exitPromise]:[],jO(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!$.stdinCleanedUp)EO(H,X,J,q)}finally{Y.abort()}},NO=(Z,{originalStreams:[X],subprocess:J})=>{let q={stdinCleanedUp:!1};if(Z===X)kO(Z,J,q);return q},kO=(Z,X,J)=>{let{_destroy:q}=Z;Z._destroy=(...Q)=>{xO(X,J),q.call(Z,...Q)}},xO=({exitCode:Z,signalCode:X},J)=>{if(Z!==null||X!==null)J.stdinCleanedUp=!0},EO=(Z,X,J,q)=>{if(!PO(Z,X,J,q))throw Z},PO=(Z,X,J,q=!0)=>{if(J.propagating)return zG(Z)||L5(Z);return J.propagating=!0,sZ(J,X)===q?zG(Z):L5(Z)},sZ=({fileDescriptors:Z},X)=>X!=="all"&&Z[X].direction==="input",L5=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",zG=(Z)=>Z?.code==="EPIPE";var _5=()=>{};var RG=({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((K,W)=>rZ({stream:K,fdNumber:W,encoding:X,buffer:J[W],maxBuffer:q[W],lines:Q[W],allMixed:!1,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})),rZ=async({stream:Z,fdNumber:X,encoding:J,buffer:q,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W})=>{if(!Z)return;let G=d2(Z,X,W);if(sZ(W,X)){await G;return}let[V]=await Promise.all([LG({stream:Z,onStreamEnd:G,fdNumber:X,encoding:J,buffer:q,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W}),G]);return V};var tZ=B(()=>{oZ();_5()});var MG=({stdout:Z,stderr:X},{all:J})=>J&&(Z||X)?n1([Z,X].filter(Boolean)):void 0,FG=({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>rZ({...vO(Z,J),fdNumber:"all",encoding:X,maxBuffer:q[1]+q[2],lines:Q[1]||Q[2],allMixed:CO(Z),stripFinalNewline:$,verboseInfo:Y,streamInfo:H}),vO=({stdout:Z,stderr:X,all:J},[,q,Q])=>{let $=q||Q;if(!$)return{stream:J,buffer:$};if(!q)return{stream:X,buffer:$};if(!Q)return{stream:Z,buffer:$};return{stream:J,buffer:$}},CO=({all:Z,stdout:X,stderr:J})=>Z&&X&&J&&X.readableObjectMode!==J.readableObjectMode;var eZ=B(()=>{H5();tZ()});var DG=(Z)=>E6(Z,"ipc"),TG=(Z,X)=>{let J=J8(Z);n0({type:"ipc",verboseMessage:J,fdNumber:"ipc",verboseInfo:X})};var AG=B(()=>{P6();D1()});var IG=async({subprocess:Z,buffer:X,maxBuffer:J,ipc:q,ipcOutput:Q,verboseInfo:$})=>{if(!q)return Q;let Y=DG($),H=Q1(X,"ipc"),K=Q1(J,"ipc");for await(let W of CZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:q,shouldAwait:!1,reference:!0})){if(H)cH(Z,Q,K),Q.push(W);if(Y)TG(W,$)}return Q},OG=async(Z,X)=>{return await Promise.allSettled([Z]),X};var wG=B(()=>{d1();AG();$1();yZ()});import{once as yO}from"node:events";var jG=async({subprocess:Z,options:{encoding:X,buffer:J,maxBuffer:q,lines:Q,timeoutDuration:$,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,stripFinalNewline:W,ipc:G,ipcInput:V},context:L,verboseInfo:_,fileDescriptors:z,originalStreams:D,onInternalError:M,controller:F})=>{let N=VK(Z,L),R={originalStreams:D,fileDescriptors:z,subprocess:Z,exitPromise:N,propagating:!1},w=RG({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:W,verboseInfo:_,streamInfo:R}),A=FG({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:W,verboseInfo:_,streamInfo:R}),I=[],T=IG({subprocess:Z,buffer:J,maxBuffer:q,ipc:G,ipcOutput:I,verboseInfo:_}),b=SO(D,Z,R),j=bO(z,R);try{return await Promise.race([Promise.all([{},LK(N),Promise.all(w),A,T,BH(Z,V),...b,...j]),M,hO(Z,F),...UH(Z,$,L,F),...kY({subprocess:Z,cancelSignal:Y,gracefulCancel:H,context:L,controller:F}),...YH({subprocess:Z,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,context:L,controller:F})])}catch(x){return L.terminationReason??="other",Promise.all([{error:x},N,Promise.all(w.map((v)=>aZ(v))),aZ(A),OG(T,I),Promise.allSettled(b),Promise.allSettled(j)])}},SO=(Z,X,J)=>Z.map((q,Q)=>q===X.stdio[Q]?void 0:d2(q,Q,J)),bO=(Z,X)=>Z.flatMap(({stdioItems:J},q)=>J.filter(({value:Q,stream:$=Q})=>b0($,{checkOpen:!1})&&!y0($)).map(({type:Q,value:$,stream:Y=$})=>d2(Y,q,X,{isSameDirection:j0.has(Q),stopOnExit:Q==="native"}))),hO=async(Z,{signal:X})=>{let[J]=await yO(Z,"error",{signal:X});throw J};var NG=B(()=>{p1();s3();u3();o3();q1();_0();oZ();wG();t3();eZ();tZ();PZ();_5()});var kG=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),c2=(Z,X,J)=>{let q=Z[J];if(!q.has(X))q.set(X,[]);let Q=q.get(X),$=a0();return Q.push($),{resolve:$.resolve.bind($),promises:Q}},d6=async({resolve:Z,promises:X},J)=>{Z();let[q]=await Promise.race([Promise.allSettled([!0,J]),Promise.all([!1,...X])]);return!q};var z5=B(()=>{S6()});import{finished as xG}from"node:stream/promises";var ZX=async(Z)=>{if(Z===void 0)return;try{await XX(Z)}catch{}},EG=async(Z)=>{if(Z===void 0)return;try{await JX(Z)}catch{}},XX=async(Z)=>{await xG(Z,{cleanup:!0,readable:!1,writable:!0})},JX=async(Z)=>{await xG(Z,{cleanup:!0,readable:!0,writable:!1})},R5=async(Z,X)=>{if(await Z,X)throw X},M5=(Z,X,J)=>{if(J&&!L5(J))Z.destroy(J);else if(X)Z.destroy()};var qX=B(()=>{_5()});import{Readable as gO}from"node:stream";import{callbackify as fO}from"node:util";var PG=({subprocess:Z,concurrentStreams:X,encoding:J},{from:q,binary:Q=!0,preserveNewlines:$=!0}={})=>{let Y=Q||D0.has(J),{subprocessStdout:H,waitReadableDestroy:K}=QX(Z,q,X),{readableEncoding:W,readableObjectMode:G,readableHighWaterMark:V}=$X(H,Y),{read:L,onStdoutDataDone:_}=YX({subprocessStdout:H,subprocess:Z,binary:Y,encoding:J,preserveNewlines:$}),z=new gO({read:L,destroy:fO(UX.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:K})),highWaterMark:V,objectMode:G,encoding:W});return HX({subprocessStdout:H,onStdoutDataDone:_,readable:z,subprocess:Z}),z},QX=(Z,X,J)=>{let q=b6(Z,X),Q=c2(J,q,"readableDestroy");return{subprocessStdout:q,waitReadableDestroy:Q}},$X=({readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:J},q)=>q?{readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:J}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:iZ},YX=({subprocessStdout:Z,subprocess:X,binary:J,encoding:q,preserveNewlines:Q})=>{let $=a0(),Y=V5({subprocessStdout:Z,subprocess:X,binary:J,shouldEncode:!J,encoding:q,preserveNewlines:Q});return{read(){mO(this,Y,$)},onStdoutDataDone:$}},mO=async(Z,X,J)=>{try{let{value:q,done:Q}=await X.next();if(Q)J.resolve();else Z.push(q)}catch{}},HX=async({subprocessStdout:Z,onStdoutDataDone:X,readable:J,subprocess:q,subprocessStdin:Q})=>{try{if(await JX(Z),await q,await ZX(Q),await X,J.readable)J.push(null)}catch($){await ZX(Q),vG(J,$)}},UX=async({subprocessStdout:Z,subprocess:X,waitReadableDestroy:J},q)=>{if(await d6(J,X))vG(Z,q),await R5(X,q)},vG=(Z,X)=>{M5(Z,Z.readable,X)};var KX=B(()=>{m1();A1();B5();S6();z5();qX()});import{Writable as uO}from"node:stream";import{callbackify as CG}from"node:util";var yG=({subprocess:Z,concurrentStreams:X},{to:J}={})=>{let{subprocessStdin:q,waitWritableFinal:Q,waitWritableDestroy:$}=GX(Z,J,X),Y=new uO({...WX(q,Z,Q),destroy:CG(BX.bind(void 0,{subprocessStdin:q,subprocess:Z,waitWritableFinal:Q,waitWritableDestroy:$})),highWaterMark:q.writableHighWaterMark,objectMode:q.writableObjectMode});return VX(q,Y),Y},GX=(Z,X,J)=>{let q=R8(Z,X),Q=c2(J,q,"writableFinal"),$=c2(J,q,"writableDestroy");return{subprocessStdin:q,waitWritableFinal:Q,waitWritableDestroy:$}},WX=(Z,X,J)=>({write:pO.bind(void 0,Z),final:CG(dO.bind(void 0,Z,X,J))}),pO=(Z,X,J,q)=>{if(Z.write(X,J))q();else Z.once("drain",q)},dO=async(Z,X,J)=>{if(await d6(J,X)){if(Z.writable)Z.end();await X}},VX=async(Z,X,J)=>{try{if(await XX(Z),X.writable)X.end()}catch(q){await EG(J),SG(X,q)}},BX=async({subprocessStdin:Z,subprocess:X,waitWritableFinal:J,waitWritableDestroy:q},Q)=>{if(await d6(J,X),await d6(q,X))SG(Z,Q),await R5(X,Q)},SG=(Z,X)=>{M5(Z,Z.writable,X)};var LX=B(()=>{A1();z5();qX()});import{Duplex as cO}from"node:stream";import{callbackify as lO}from"node:util";var bG=({subprocess:Z,concurrentStreams:X,encoding:J},{from:q,to:Q,binary:$=!0,preserveNewlines:Y=!0}={})=>{let H=$||D0.has(J),{subprocessStdout:K,waitReadableDestroy:W}=QX(Z,q,X),{subprocessStdin:G,waitWritableFinal:V,waitWritableDestroy:L}=GX(Z,Q,X),{readableEncoding:_,readableObjectMode:z,readableHighWaterMark:D}=$X(K,H),{read:M,onStdoutDataDone:F}=YX({subprocessStdout:K,subprocess:Z,binary:H,encoding:J,preserveNewlines:Y}),N=new cO({read:M,...WX(G,Z,V),destroy:lO(nO.bind(void 0,{subprocessStdout:K,subprocessStdin:G,subprocess:Z,waitReadableDestroy:W,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:D,writableHighWaterMark:G.writableHighWaterMark,readableObjectMode:z,writableObjectMode:G.writableObjectMode,encoding:_});return HX({subprocessStdout:K,onStdoutDataDone:F,readable:N,subprocess:Z,subprocessStdin:G}),VX(G,N,K),N},nO=async({subprocessStdout:Z,subprocessStdin:X,subprocess:J,waitReadableDestroy:q,waitWritableFinal:Q,waitWritableDestroy:$},Y)=>{await Promise.all([UX({subprocessStdout:Z,subprocess:J,waitReadableDestroy:q},Y),BX({subprocessStdin:X,subprocess:J,waitWritableFinal:Q,waitWritableDestroy:$},Y)])};var hG=B(()=>{m1();KX();LX()});var _X=(Z,X,{from:J,binary:q=!1,preserveNewlines:Q=!1}={})=>{let $=q||D0.has(X),Y=b6(Z,J),H=V5({subprocessStdout:Y,subprocess:Z,binary:$,shouldEncode:!0,encoding:X,preserveNewlines:Q});return iO(H,Y,Z)},iO=async function*(Z,X,J){try{yield*Z}finally{if(X.readable)X.destroy();await J}};var gG=B(()=>{m1();A1();B5()});var fG=(Z,{encoding:X})=>{let J=kG();Z.readable=PG.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:X}),Z.writable=yG.bind(void 0,{subprocess:Z,concurrentStreams:J}),Z.duplex=bG.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:X}),Z.iterable=_X.bind(void 0,Z,X),Z[Symbol.asyncIterator]=_X.bind(void 0,Z,X,{})};var mG=B(()=>{z5();KX();LX();hG();gG()});var uG=(Z,X)=>{for(let[J,q]of oO){let Q=q.value.bind(X);Reflect.defineProperty(Z,J,{...q,value:Q})}},aO,oO;var pG=B(()=>{aO=(async()=>{})().constructor.prototype,oO=["then","catch","finally"].map((Z)=>[Z,Reflect.getOwnPropertyDescriptor(aO,Z)])});import{setMaxListeners as sO}from"node:events";import{spawn as rO}from"node:child_process";var dG=(Z,X,J,q)=>{let{file:Q,commandArguments:$,command:Y,escapedCommand:H,startTime:K,verboseInfo:W,options:G,fileDescriptors:V}=tO(Z,X,J),{subprocess:L,promise:_}=Zw({file:Q,commandArguments:$,options:G,startTime:K,verboseInfo:W,command:Y,escapedCommand:H,fileDescriptors:V});return L.pipe=W5.bind(void 0,{source:L,sourcePromise:_,boundOptions:{},createNested:q}),uG(L,_),o0.set(L,{options:G,fileDescriptors:V}),L},tO=(Z,X,J)=>{let{command:q,escapedCommand:Q,startTime:$,verboseInfo:Y}=$8(Z,X,J),{file:H,commandArguments:K,options:W}=C8(Z,X,J),G=eO(W),V=CK(G,Y);return{file:H,commandArguments:K,command:q,escapedCommand:Q,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},eO=({timeout:Z,signal:X,...J})=>{if(X!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...J,timeoutDuration:Z}},Zw=({file:Z,commandArguments:X,options:J,startTime:q,verboseInfo:Q,command:$,escapedCommand:Y,fileDescriptors:H})=>{let K;try{K=rO(...y8(Z,X,J))}catch(z){return kK({error:z,command:$,escapedCommand:Y,fileDescriptors:H,options:J,startTime:q,verboseInfo:Q})}let W=new AbortController;sO(Number.POSITIVE_INFINITY,W.signal);let G=[...K.stdio];cK(K,H,W),tK(K,J,W);let V={},L=a0();K.kill=jY.bind(void 0,{kill:K.kill.bind(K),options:J,onInternalError:L,context:V,controller:W}),K.all=MG(K,J),fG(K,J),wK(K,J);let _=Xw({subprocess:K,options:J,startTime:q,verboseInfo:Q,fileDescriptors:H,originalStreams:G,command:$,escapedCommand:Y,context:V,onInternalError:L,controller:W});return{subprocess:K,promise:_}},Xw=async({subprocess:Z,options:X,startTime:J,verboseInfo:q,fileDescriptors:Q,originalStreams:$,command:Y,escapedCommand:H,context:K,onInternalError:W,controller:G})=>{let[V,[L,_],z,D,M]=await jG({subprocess:Z,options:X,context:K,verboseInfo:q,fileDescriptors:Q,originalStreams:$,onInternalError:W,controller:G});G.abort(),W.resolve();let F=z.map((w,A)=>U1(w,X,A)),N=U1(D,X,"all"),R=Jw({errorInfo:V,exitCode:L,signal:_,stdio:F,all:N,ipcOutput:M,context:K,options:X,command:Y,escapedCommand:H,startTime:J});return m6(R,q,X)},Jw=({errorInfo:Z,exitCode:X,signal:J,stdio:q,all:Q,ipcOutput:$,context:Y,options:H,command:K,escapedCommand:W,startTime:G})=>("error"in Z)?b2({error:Z.error,command:K,escapedCommand:W,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof Y1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:X,signal:J,stdio:q,all:Q,ipcOutput:$,options:H,startTime:G,isSync:!1}):l8({command:K,escapedCommand:W,stdio:q,all:Q,ipcOutput:$,options:H,startTime:G});var cG=B(()=>{d8();y3();XZ();A1();JZ();SZ();h2();n8();xK();yK();g2();lK();B8();eK();WG();eZ();NG();mG();S6();pG()});var F5=(Z,X)=>{let J=Object.fromEntries(Object.entries(X).map(([q,Q])=>[q,qw(q,Z[q],Q)]));return{...Z,...J}},qw=(Z,X,J)=>{if(Qw.has(Z)&&t(X)&&t(J))return{...X,...J};return J},Qw;var lG=B(()=>{X1();$1();Qw=new Set(["env",...E3])});var w1=(Z,X,J,q)=>{let Q=(Y,H,K)=>w1(Y,H,J,K),$=(...Y)=>$w({mapArguments:Z,deepOptions:J,boundOptions:X,setBoundExeca:q,createNested:Q},...Y);if(q!==void 0)q($,Q,X);return $},$w=({mapArguments:Z,deepOptions:X={},boundOptions:J={},setBoundExeca:q,createNested:Q},$,...Y)=>{if(t($))return Q(Z,F5(J,$),q);let{file:H,commandArguments:K,options:W,isSync:G}=Yw({mapArguments:Z,firstArgument:$,nextArguments:Y,deepOptions:X,boundOptions:J});return G?RK(H,K,W):dG(H,K,W,Q)},Yw=({mapArguments:Z,firstArgument:X,nextArguments:J,deepOptions:q,boundOptions:Q})=>{let $=k9(X)?x9(X,J):[X,...J],[Y,H,K]=n4(...$),W=F5(F5(q,Q),K),{file:G=Y,commandArguments:V=H,options:L=W,isSync:_=!1}=Z({file:Y,commandArguments:H,options:W});return{file:G,commandArguments:V,options:L,isSync:_}};var nG=B(()=>{X1();w3();E9();MK();cG();lG()});var iG=({file:Z,commandArguments:X})=>oG(Z,X),aG=({file:Z,commandArguments:X})=>({...oG(Z,X),isSync:!0}),oG=(Z,X)=>{if(X.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${Z} ${X}.`);let[J,...q]=Hw(Z);return{file:J,commandArguments:q}},Hw=(Z)=>{if(typeof Z!=="string")throw TypeError(`The command must be a string: ${String(Z)}.`);let X=Z.trim();if(X==="")return[];let J=[];for(let q of X.split(Uw)){let Q=J.at(-1);if(Q&&Q.endsWith("\\"))J[J.length-1]=`${Q.slice(0,-1)} ${q}`;else J.push(q)}return J},Uw;var sG=B(()=>{Uw=/ +/g});var rG=(Z,X,J)=>{Z.sync=X(Kw,J),Z.s=Z.sync},tG=({options:Z})=>eG(Z),Kw=({options:Z})=>({...eG(Z),isSync:!0}),eG=(Z)=>({options:{...Gw(Z),...Z}}),Gw=({input:Z,inputFile:X,stdio:J})=>Z===void 0&&X===void 0&&J===void 0?{stdin:"inherit"}:{},ZW;var XW=B(()=>{ZW={preferLocal:!0}});var zX,N0,qn,Qn,$n,Yn,Hn,Un,Kn,Gn;var c6=B(()=>{nG();sG();r3();XW();SZ();zX=w1(()=>({})),N0=w1(()=>({isSync:!0})),qn=w1(iG),Qn=w1(aG),$n=w1(GH),Yn=w1(tG,{},ZW,rG),{sendMessage:Hn,getOneMessage:Un,getEachMessage:Kn,getCancelSignal:Gn}=jK()});async function Ww(Z){if(process.platform==="win32"){let J=await zX(`where.exe ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(J.exitCode!==0||!J.stdout)return null;return J.stdout.trim().split(/\r?\n/)[0]||null}let X=await zX(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(X.exitCode!==0||!X.stdout)return null;return X.stdout.trim()}function Vw(Z){if(process.platform==="win32")try{return F6(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return F6(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var RX,JW,D5;var T5=B(()=>{c6();a7();RX=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,JW=RX?async(Z)=>RX(Z):Ww,D5=RX??Vw});function qW(Z,X){return{cmd:D5(Z)??Z,args:X}}var QW=B(()=>{T5()});import{dirname as Bw,join as $W}from"path";async function l6(Z){try{return!!await JW(Z)}catch{return!1}}function Mw(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function Dw(){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 Fw)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(KW())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 KW(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function wn(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return n6.platform}var V0,Lw,_w,zw,UW,Rw,Fw,Tw,n6;var MX=B(()=>{L1();HW();D9();d0();QW();R0();T5();V0=u(()=>{let Z=YW(),X=Y0(),J=$W(X,`config${Z}.json`);if(!k().existsSync(J)){let Q=process.env.CLAUDIO_CONFIG_DIR?X:Bw(X),$=$W(Q,`.claudio${Z}.json`);if(k().existsSync($))return $}return J}),Lw=u(async()=>{try{let{default:Z}=await import("./index-0.1.14-4hv4f8g9.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});_w=u(async()=>{let Z=[];if(await l6("npm"))Z.push("npm");if(await l6("yarn"))Z.push("yarn");if(await l6("pnpm"))Z.push("pnpm");return Z}),zw=u(async()=>{let Z=[];if(await l6("bun"))Z.push("bun");if(await l6("deno"))Z.push("deno");if(await l6("node"))Z.push("node");return Z}),UW=u(()=>{try{return k().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),Rw=u(()=>{try{if(!UW())return!1;let{cmd:Z}=qW("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});Fw=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];Tw=u(()=>{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(k().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase().startsWith("ec2"))return"aws-ec2"}catch{}if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if(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(k().existsSync("/.dockerenv"))return"docker"}catch{}if(n6.platform==="darwin")return"unknown-darwin";if(n6.platform==="linux")return"unknown-linux";if(n6.platform==="win32")return"unknown-win32";return"unknown"});n6={hasInternetAccess:Lw,isCI:e(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:Dw(),isSSH:KW,getPackageManagers:_w,getRuntimes:zw,isRunningWithBun:u(F9),isWslEnvironment:UW,isNpmFromWindowsPath:Rw,isConductor:Mw,detectDeploymentEnvironment:Tw}});var kn,xn="∙",En="✻",Pn="↑",vn="↓",Cn="↯",yn="○",Sn="◐",bn="●",hn="◉",GW="⏸",gn="↻",fn="◇",mn="◆",un="※",pn="▎",dn="·✔︎·",cn="×";var WW=B(()=>{MX();kn=n6.platform==="darwin"?"⏺":"●"});var FX,Aw,l2;var VW=B(()=>{FX=["acceptEdits","bypassPermissions","default","dontAsk","plan"],Aw=[...FX,"auto"],l2=Aw});function Zi(Z){return!0}function A5(Z){return BW[Z]??BW.default}function Xi(Z){return A5(Z).external}function Ji(Z){return l2.includes(Z)?Z:"default"}function qi(Z){return A5(Z).title}function Qi(Z){return Z==="default"||Z===void 0}function $i(Z){return A5(Z).symbol}function Yi(Z){return A5(Z).color}var tn,en,BW;var LW=B(()=>{l0();WW();VW();b1();tn=O(()=>DX.enum(l2)),en=O(()=>DX.enum(FX)),BW={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:GW,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 _W=()=>{};var zW;var RW=B(()=>{_W();zW=["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 MW=()=>{};var FW=()=>{};var DW=B(()=>{RW();MW();FW()});var TW,Li="bash";var AW=B(()=>{TW=["bash","powershell"]});function Iw(){let Z=U.object({type:U.literal("command").describe("Shell command hook type"),command:U.string().describe("Shell command to execute"),if:I5(),shell:U.enum(TW).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:U.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:U.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.")}),X=U.object({type:U.literal("prompt").describe("LLM prompt hook type"),prompt:U.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:U.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:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")}),J=U.object({type:U.literal("http").describe("HTTP hook type"),url:U.string().url().describe("URL to POST the hook input JSON to"),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:U.record(U.string(),U.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:U.array(U.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:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")}),q=U.object({type:U.literal("agent").describe("Agentic verifier hook type"),prompt:U.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:U.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-4-6"). If not specified, uses Haiku.'),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:X,HttpHookSchema:J,AgentHookSchema:q}}var I5,IW,OW,a1;var O5=B(()=>{DW();l0();b1();AW();I5=O(()=>U.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.'));IW=O(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:X,AgentHookSchema:J,HttpHookSchema:q}=Iw();return U.discriminatedUnion("type",[Z,X,J,q])}),OW=O(()=>U.object({matcher:U.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:U.array(IW()).describe("List of hooks to execute when the matcher matches")})),a1=O(()=>U.partialRecord(U.enum(zW),U.array(OW())))});var Ii,Oi,Ow,ww,wW,jw,Nw,kw,xw,Ew,Pw,vw,w5,wi;var jW=B(()=>{l0();b1();Ii=O(()=>U.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),Oi=O(()=>U.enum(["stdio","sse","sse-ide","http","ws","sdk"])),Ow=O(()=>U.object({type:U.literal("stdio").optional(),command:U.string().min(1,"Command cannot be empty"),args:U.array(U.string()).default([]),env:U.record(U.string(),U.string()).optional()})),ww=O(()=>U.boolean()),wW=O(()=>U.object({clientId:U.string().optional(),callbackPort:U.number().int().positive().optional(),authServerMetadataUrl:U.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional(),xaa:ww().optional()})),jw=O(()=>U.object({type:U.literal("sse"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional(),oauth:wW().optional()})),Nw=O(()=>U.object({type:U.literal("sse-ide"),url:U.string(),ideName:U.string(),ideRunningInWindows:U.boolean().optional()})),kw=O(()=>U.object({type:U.literal("ws-ide"),url:U.string(),ideName:U.string(),authToken:U.string().optional(),ideRunningInWindows:U.boolean().optional()})),xw=O(()=>U.object({type:U.literal("http"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional(),oauth:wW().optional()})),Ew=O(()=>U.object({type:U.literal("ws"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional()})),Pw=O(()=>U.object({type:U.literal("sdk"),name:U.string()})),vw=O(()=>U.object({type:U.literal("claudeai-proxy"),url:U.string(),id:U.string()})),w5=O(()=>U.union([Ow(),jw(),Nw(),kw(),xw(),Ew(),Pw(),vw()])),wi=O(()=>U.object({mcpServers:U.record(U.string(),w5())}))});function Pi(Z,X){let J=Z.toLowerCase();return X.autoUpdate??(k5.has(J)&&!Cw.has(J))}function bw(Z){if(k5.has(Z.toLowerCase()))return!1;if(Sw.test(Z))return!0;return yw.test(Z)}function vi(Z,X){let J=Z.toLowerCase();if(!k5.has(J))return null;if(X.source==="github"){if(!(X.repo||"").toLowerCase().startsWith(`${j5}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${j5}/' can use this name.`;return null}if(X.source==="git"&&X.url){let q=X.url.toLowerCase(),Q=q.includes("github.com/anthropics/"),$=q.includes("git@github.com:anthropics/");if(Q||$)return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${j5}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${j5}' organization.`}function yi(Z){return typeof Z==="string"&&Z.startsWith("./")}function Si(Z){return Z.source==="file"||Z.source==="directory"}var k5,Cw,yw,Sw,j5="anthropics",K1,i6,NW,AX,IX,EW,OX,hw,Ci,gw,fw,mw,uw,pw,dw,kW,cw,lw,PW,nw,iw,xW,aw,vW,ow,sw,n2,TX,CW,rw,tw,bi,N5,ew,Zj,hi,Xj,Jj,qj,Qj,$j,gi,Yj,fi;var yW=B(()=>{l0();O5();jW();b1();k5=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),Cw=new Set(["knowledge-work-plugins"]);yw=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,Sw=/[^\u0020-\u007E]/;K1=O(()=>U.string().startsWith("./")),i6=O(()=>K1().endsWith(".json")),NW=O(()=>U.union([K1().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"),U.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),AX=O(()=>K1().endsWith(".md")),IX=O(()=>U.union([AX(),K1()])),EW=O(()=>U.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)=>!bw(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'})),OX=O(()=>U.object({name:U.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:U.string().optional().describe("Contact email for support or feedback"),url:U.string().optional().describe("Website, GitHub profile, or organization URL")})),hw=O(()=>U.object({name:U.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:U.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:U.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:OX().optional().describe("Information about the plugin creator or maintainer"),homepage:U.string().url().optional().describe("Plugin homepage or documentation URL"),repository:U.string().optional().describe("Source code repository URL"),license:U.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:U.array(U.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:U.array(Zj()).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.`)})),Ci=O(()=>U.object({description:U.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:U.lazy(()=>a1()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),gw=O(()=>U.object({hooks:U.union([i6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),U.lazy(()=>a1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),U.array(U.union([i6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),U.lazy(()=>a1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),fw=O(()=>U.object({source:IX().optional().describe("Path to command markdown file, relative to plugin root"),content:U.string().optional().describe("Inline markdown content for the command"),description:U.string().optional().describe("Command description override"),argumentHint:U.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:U.string().optional().describe("Default model for this command"),allowedTools:U.array(U.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'})),mw=O(()=>U.object({commands:U.union([IX().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"),U.array(IX().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"),U.record(U.string(),fw()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),uw=O(()=>U.object({agents:U.union([AX().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),U.array(AX().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")])})),pw=O(()=>U.object({skills:U.union([K1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),U.array(K1().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")])})),dw=O(()=>U.object({outputStyles:U.union([K1().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"),U.array(K1().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")])})),kW=O(()=>U.string().min(1)),cw=O(()=>U.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),lw=O(()=>U.object({mcpServers:U.union([i6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),NW().describe("Path or URL to MCPB file containing MCP server configuration"),U.record(U.string(),w5()).describe("MCP server configurations keyed by server name"),U.array(U.union([i6().describe("Path to MCP servers configuration file"),NW().describe("Path or URL to MCPB file"),U.record(U.string(),w5()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),PW=O(()=>U.object({type:U.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:U.string().describe("Human-readable label shown in the config dialog"),description:U.string().describe("Help text shown beneath the field in the config dialog"),required:U.boolean().optional().describe("If true, validation fails when this field is empty"),default:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())]).optional().describe("Default value used when the user provides nothing"),multiple:U.boolean().optional().describe("For string type: allow an array of strings"),sensitive:U.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:U.number().optional().describe("Minimum value (number type only)"),max:U.number().optional().describe("Maximum value (number type only)")}).strict()),nw=O(()=>U.object({userConfig:U.record(U.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"),PW()).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).")})),iw=O(()=>U.object({channels:U.array(U.object({server:U.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:U.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:U.record(U.string(),PW()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")}).strict()).describe("Channels this plugin provides. Each entry declares an MCP server as a message channel and optionally specifies user configuration to prompt for at enable time.")})),xW=O(()=>U.strictObject({command:U.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:U.array(kW()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:U.record(cw(),kW()).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:U.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:U.record(U.string(),U.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:U.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:U.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:U.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:U.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:U.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:U.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:U.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),aw=O(()=>U.object({lspServers:U.union([i6().describe("Path to .lsp.json configuration file relative to plugin root"),U.record(U.string(),xW()).describe("LSP server configurations keyed by server name"),U.array(U.union([i6().describe("Path to LSP configuration file"),U.record(U.string(),xW()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),vW=O(()=>U.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-._]*$/,J=/^[a-z0-9][a-z0-9-._]*$/;return X.test(Z)||J.test(Z)},"Invalid npm package name format")),ow=O(()=>U.object({settings:U.record(U.string(),U.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),sw=O(()=>U.object({...hw().shape,...gw().partial().shape,...mw().partial().shape,...uw().partial().shape,...pw().partial().shape,...dw().partial().shape,...iw().partial().shape,...lw().partial().shape,...aw().partial().shape,...ow().partial().shape,...nw().partial().shape})),n2=O(()=>U.discriminatedUnion("source",[U.object({source:U.literal("url"),url:U.string().url().describe("Direct URL to marketplace.json file"),headers:U.record(U.string(),U.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),U.object({source:U.literal("github"),repo:U.string().describe("GitHub repository in owner/repo format"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:U.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:U.array(U.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.')}),U.object({source:U.literal("git"),url:U.string().describe("Full git repository URL"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:U.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:U.array(U.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.')}),U.object({source:U.literal("npm"),package:vW().describe("NPM package containing marketplace.json")}),U.object({source:U.literal("file"),path:U.string().describe("Local file path to marketplace.json")}),U.object({source:U.literal("directory"),path:U.string().describe("Local directory containing .claude-plugin/marketplace.json")}),U.object({source:U.literal("hostPattern"),hostPattern:U.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$").')}),U.object({source:U.literal("pathPattern"),pathPattern:U.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.')}),U.object({source:U.literal("settings"),name:EW().refine((Z)=>!k5.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:U.array(rw()).describe("Plugin entries declared inline in settings.json"),owner:OX().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).")])),TX=O(()=>U.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),CW=O(()=>U.union([K1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),U.object({source:U.literal("npm"),package:vW().or(U.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:U.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:U.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),U.object({source:U.literal("pip"),package:U.string().describe("Python package name as it appears on PyPI"),version:U.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:U.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),U.object({source:U.literal("url"),url:U.string().describe("Full git repository URL (https:// or git@)"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().optional().describe("Specific commit SHA to use")}),U.object({source:U.literal("github"),repo:U.string().describe("GitHub repository in owner/repo format"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().optional().describe("Specific commit SHA to use")}),U.object({source:U.literal("git-subdir"),url:U.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:U.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:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().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.")])),rw=O(()=>U.object({name:U.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:CW().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against."),description:U.string().optional(),version:U.string().optional(),strict:U.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.'}));tw=O(()=>sw().partial().extend({name:U.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:CW().describe("Where to fetch the plugin from"),category:U.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:U.array(U.string()).optional().describe("Tags for searchability and discovery"),strict:U.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),bi=O(()=>U.object({name:EW(),owner:OX().describe("Marketplace maintainer or curator information"),plugins:U.array(tw()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:U.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:U.object({pluginRoot:U.string().optional().describe("Base path for relative plugin sources"),version:U.string().optional().describe("Marketplace version"),description:U.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:U.array(U.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")})),N5=O(()=>U.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),ew=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,Zj=O(()=>U.union([U.string().regex(ew,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),U.object({name:U.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:U.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),hi=O(()=>U.union([N5(),U.object({id:N5().describe('Plugin identifier (e.g., "formatter@tools")'),version:U.string().optional().describe('Version constraint (e.g., "^2.0.0")'),required:U.boolean().optional().describe("If true, cannot be disabled"),config:U.record(U.string(),U.unknown()).optional().describe("Plugin-specific configuration")})])),Xj=O(()=>U.object({version:U.string().describe("Currently installed version"),installedAt:U.string().describe("ISO 8601 timestamp of installation"),lastUpdated:U.string().optional().describe("ISO 8601 timestamp of last update"),installPath:U.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:U.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),Jj=O(()=>U.object({version:U.literal(1).describe("Schema version 1"),plugins:U.record(N5(),Xj()).describe("Map of plugin IDs to their installation metadata")})),qj=O(()=>U.enum(["managed","user","project","local"])),Qj=O(()=>U.object({scope:qj().describe("Installation scope"),projectPath:U.string().optional().describe("Project path (required for project/local scopes)"),installPath:U.string().describe("Absolute path to the versioned plugin directory"),version:U.string().optional().describe("Currently installed version"),installedAt:U.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:U.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:U.string().optional().describe("Git commit SHA for git-based plugins")})),$j=O(()=>U.object({version:U.literal(2).describe("Schema version 2"),plugins:U.record(N5(),U.array(Qj())).describe("Map of plugin IDs to arrays of installation entries")})),gi=O(()=>U.union([Jj(),$j()])),Yj=O(()=>U.object({source:n2().describe("Where to fetch the marketplace from"),installLocation:U.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:U.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:U.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),fi=O(()=>U.record(U.string(),Yj()))});function x5(Z){let X=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))X=X.replace(/_+/g,"_").replace(/^_|_$/g,"");return X}var SW=()=>{};function bW(Z){let X=Z.split("__"),[J,q,...Q]=X;if(J!=="mcp"||!q)return null;let $=Q.length>0?Q.join("__"):void 0;return{serverName:q,toolName:$}}function Hj(Z){return`mcp__${x5(Z)}__`}function Uj(Z,X){return`${Hj(Z)}${x5(X)}`}function di(Z){return Z.mcpInfo?Uj(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function ci(Z,X){let J=`mcp__${x5(X)}__`;return Z.replace(J,"")}function li(Z){let X=Z.replace(/\s*\(MCP\)\s*$/,"");X=X.trim();let J=X.indexOf(" - ");if(J!==-1)return X.substring(J+3).trim();return X}var hW=B(()=>{SW()});var wX="TaskOutput";var gW=()=>{};var fW="TaskStop",ai=`
|
|
77
77
|
- Stops a running background task by its ID
|
|
78
78
|
- Takes a task_id parameter identifying the task to stop
|
|
79
79
|
- Returns a success or failure status
|
|
@@ -82,7 +82,7 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
82
82
|
`);return X===-1?Z:Z.slice(0,X)}function Qa(Z,X,J=0){let q=0,Q=Z.indexOf(X,J);while(Q!==-1)q++,Q=Z.indexOf(X,Q+1);return q}function $a(Z){return Z.replace(/[0-9]/g,(X)=>String.fromCharCode(X.charCodeAt(0)-65248))}function Ya(Z){return Z.replace(/\u3000/g," ")}function Ha(Z,X=",",J=iW){let Q="";for(let $ of Z){let Y=Q?X:"",H=Y+$;if(Q.length+H.length<=J)Q+=H;else{let K=J-Q.length-Y.length-14;if(K>0)Q+=Y+$.slice(0,K)+"...[truncated]";else Q+="...[truncated]";return Q}}return Q}class Lj{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=iW){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 J=this.maxSize-this.content.length;if(J>0)this.content+=X.slice(0,J);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
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 Ua(Z,X){let J=Z.split(`
|
|
84
84
|
`);if(J.length<=X)return Z;return J.slice(0,X).join(`
|
|
85
|
-
`)+"…"}var iW=33554432;var jX=()=>{};function aW(Z){return NX.filePatternTools.includes(Z)}function oW(Z){return NX.bashPrefixTools.includes(Z)}function sW(Z){return NX.customValidation[Z]}var NX;var rW=B(()=>{NX={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 tW(Z,X){let J=0,q=X-1;while(q>=0&&Z[q]==="\\")J++,q--;return J%2!==0}function kX(Z,X){let J=0;for(let q=0;q<Z.length;q++)if(Z[q]===X&&!tW(Z,q))J++;return J}function _j(Z){for(let X=0;X<Z.length-1;X++)if(Z[X]==="("&&Z[X+1]===")"){if(!tW(Z,X))return!0}return!1}function xX(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let X=kX(Z,"("),J=kX(Z,")");if(X!==J)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(_j(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=dW(Z),Q=bW(q.toolName);if(Q){if(q.ruleContent!==void 0||kX(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${q.toolName}" without parentheses, or use "mcp__${Q.serverName}__*" for all tools`,examples:[`mcp__${Q.serverName}`,`mcp__${Q.serverName}__*`,Q.toolName&&Q.toolName!=="*"?`mcp__${Q.serverName}__${Q.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!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 "${lW(String(q.toolName))}"`};let $=sW(q.toolName);if($&&q.ruleContent!==void 0){let Y=$(q.ruleContent);if(!Y.valid)return Y}if(oW(q.toolName)&&q.ruleContent!==void 0){let Y=q.ruleContent;if(Y.includes(":*")&&!Y.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(Y===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if(aW(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 E5;var EX=B(()=>{l0();hW();b1();cW();jX();rW();E5=O(()=>U.string().superRefine((Z,X)=>{let J=xX(Z);if(!J.valid){let q=J.error;if(J.suggestion)q+=`. ${J.suggestion}`;if(J.examples&&J.examples.length>0)q+=`. Examples: ${J.examples.join(", ")}`;X.addIssue({code:U.ZodIssueCode.custom,message:q,params:{received:Z}})}}))});function Fa(Z){if(!Z||typeof Z!=="object")return null;let X=PX.safeParse(Z);if(!X.success)return null;if(!X.data.enabled)return null;return X.data}var PX;var eW=B(()=>{l0();PX=U.object({enabled:U.boolean().describe("Whether auto-fix is enabled"),lint:U.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:U.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:U.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:U.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 Ca(Z){return"serverName"in Z&&Z.serverName!==void 0}function ya(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function Sa(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var zj,Rj,Mj,Fj,Dj,ZV,k0;var i2=B(()=>{l0();M9();d0();b1();LW();yW();A3();EX();O5();O5();eW();U3();zj=O(()=>U.record(U.string(),U.coerce.string())),Rj=O(()=>U.object({allow:U.array(E5()).optional().describe("List of permission rules for allowed operations"),deny:U.array(E5()).optional().describe("List of permission rules for denied operations"),ask:U.array(E5()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:U.enum(l2).optional().describe("Default permission mode when Claude Code needs access"),disableBypassPermissionsMode:U.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:U.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:U.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:U.array(U.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),Mj=O(()=>U.object({source:n2().describe("Where to fetch the marketplace from"),installLocation:U.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:U.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Fj=O(()=>U.object({serverName:U.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:U.array(U.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:U.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return H3([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"'})),Dj=O(()=>U.object({serverName:U.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:U.array(U.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:U.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return H3([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"'})),ZV=["skills","agents","hooks","mcp"],k0=O(()=>U.object({$schema:U.literal(L9).optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:U.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:U.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:U.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:U.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),...e(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:U.object({issuer:U.string().url().describe("IdP issuer URL for OIDC discovery"),clientId:U.string().describe("Claude Code's client_id registered at the IdP"),callbackPort:U.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:U.object({type:U.literal("command"),command:U.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:U.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:U.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:zj().optional().describe("Environment variables to set for Claude Code sessions"),attribution:U.object({commit:U.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:U.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."),includeCoAuthoredBy:U.boolean().optional().describe("Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"),includeGitInstructions:U.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:Rj().optional().describe("Tool usage permissions configuration"),model:U.string().optional().describe("Override the default model used by Claude Code"),availableModels:U.array(U.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:U.record(U.string(),U.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:U.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:U.array(U.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:U.array(U.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:U.array(Fj()).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:U.array(Dj()).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:a1().optional().describe("Custom commands to run before/after tool executions"),autoFix:PX.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:U.object({symlinkDirectories:U.array(U.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:U.array(U.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.")}).optional().describe("Git worktree configuration for --worktree flag."),lsp:U.object({enabled:U.boolean().optional(),diagnosticsTimeoutMs:U.number().min(100).max(5000).optional().describe("Per-edit diagnostic injection timeout in ms (default 1500, min 100, max 5000). After FileEdit/FileWrite, Claudio waits up to this duration for the LSP server to publish diagnostics so they can be attached to the same turn.")}).catchall(U.object({disabled:U.boolean().optional(),command:U.array(U.string()).min(1).optional(),extensions:U.array(U.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:U.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:U.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:U.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:U.array(U.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:U.array(U.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:U.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:U.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:U.preprocess((Z)=>Array.isArray(Z)?Z.filter((X)=>ZV.includes(X)):Z,U.union([U.boolean(),U.array(U.enum(ZV))])).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:U.object({type:U.literal("command"),command:U.string(),padding:U.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:U.record(U.string(),U.union([U.array(U.string()),U.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:U.record(U.string(),Mj()).check((Z)=>{for(let[X,J]of Object.entries(Z.value))if(J.source.source==="settings"&&J.source.name!==X)Z.issues.push({code:"custom",input:J.source.name,path:[X,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${X}" but source.name "${J.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:U.array(n2()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. "+"Note: this is a policy gate only — it does NOT register marketplaces. "+"To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),blockedMarketplaces:U.array(n2()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem."),forceLoginMethod:U.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:U.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:U.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:U.string().optional().describe("Controls the output style for assistant responses"),language:U.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:U.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:R9().optional(),feedbackSurveyRate:U.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:U.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:U.object({mode:U.enum(["append","replace"]),verbs:U.array(U.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:U.object({excludeDefault:U.boolean().optional(),tips:U.array(U.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:U.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:U.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:U.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:U.enum(["low","medium","high","max"]).optional().catch(void 0).describe("Persisted effort level for supported models."),advisorModel:U.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:U.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:U.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:U.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:U.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:U.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:U.array(U.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:U.record(U.string(),U.object({mcpServers:U.record(U.string(),U.record(U.string(),U.union([U.string(),U.number(),U.boolean(),U.array(U.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:U.record(U.string(),U.union([U.string(),U.number(),U.boolean(),U.array(U.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:U.object({defaultEnvironmentId:U.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:U.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),...{},minimumVersion:U.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:U.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"),...{},...{},...{},channelsEnabled:U.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:U.array(U.object({marketplace:U.string(),plugin:U.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:U.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:U.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:U.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:U.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:U.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:U.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:U.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:U.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:U.object({allow:U.array(U.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:U.array(U.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:U.array(U.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:U.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:U.array(U.object({id:U.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:U.string().describe("Display name for the SSH connection"),sshHost:U.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:U.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:U.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:U.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:U.array(U.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:U.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 vX(){let Z=XV(k0(),{unrepresentable:"any"});return f(Z,null,2)}var JV=B(()=>{l0();L0();i2()});function qV(Z){let X=Tj.find((q)=>q.matches(Z));if(!X)return null;let J={...X.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!J.suggestion)J.suggestion=`Valid values: ${Z.enumValues.map((q)=>`"${q}"`).join(", ")}`;if(!J.docLink&&Z.path){let q=Z.path.split(".")[0];if(q)J.docLink=Aj[q]}return J}var Tj,Aj;var QV=B(()=>{Tj=[{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: "includeCoAuthoredBy": 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'}}],Aj={}});function $V(Z){return Z.code==="invalid_type"}function YV(Z){return Z.code==="invalid_value"}function Ij(Z){return Z.code==="unrecognized_keys"}function HV(Z){return Z.code==="too_small"}function CX(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function UV(Z){let X=Z.match(/received (\w+)/);return X?X[1]:void 0}function o6(Z,X){return Z.issues.map((J)=>{let q=J.path.map(String).join("."),Q=J.message,$,Y,H,K,W;if(YV(J))Y=J.values.map((V)=>String(V)),H=Y.join(" | "),K=void 0,W=void 0;else if($V(J)){H=J.expected;let V=UV(J.message);K=V??CX(J.input),W=V??CX(J.input)}else if(HV(J))H=String(J.minimum);else if(J.code==="custom"&&"params"in J)K=J.params.received,W=K;let G=qV({path:q,code:J.code,expected:H,received:K,enumValues:Y,message:J.message,value:K});if(YV(J))$=Y?.map((V)=>`"${V}"`).join(", "),Q=`Invalid value. Expected one of: ${$}`;else if($V(J)){let V=UV(J.message)??CX(J.input);if(J.expected==="object"&&V==="null"&&q==="")Q="Invalid or malformed JSON";else Q=`Expected ${J.expected}, but received ${V}`}else if(Ij(J)){let V=J.keys.join(", ");Q=`Unrecognized ${nW(J.keys.length,"field")}: ${V}`}else if(HV(J))Q=`Number must be greater than or equal to ${J.minimum}`,$=String(J.minimum);return{file:X,path:q,message:Q,expected:$,invalidValue:W,suggestion:G?.suggestion,docLink:G?.docLink}})}function oa(Z){try{let X=H0(Z),J=k0().strict().safeParse(X);if(J.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
|
|
85
|
+
`)+"…"}var iW=33554432;var jX=()=>{};function aW(Z){return NX.filePatternTools.includes(Z)}function oW(Z){return NX.bashPrefixTools.includes(Z)}function sW(Z){return NX.customValidation[Z]}var NX;var rW=B(()=>{NX={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 tW(Z,X){let J=0,q=X-1;while(q>=0&&Z[q]==="\\")J++,q--;return J%2!==0}function kX(Z,X){let J=0;for(let q=0;q<Z.length;q++)if(Z[q]===X&&!tW(Z,q))J++;return J}function _j(Z){for(let X=0;X<Z.length-1;X++)if(Z[X]==="("&&Z[X+1]===")"){if(!tW(Z,X))return!0}return!1}function xX(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let X=kX(Z,"("),J=kX(Z,")");if(X!==J)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(_j(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=dW(Z),Q=bW(q.toolName);if(Q){if(q.ruleContent!==void 0||kX(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${q.toolName}" without parentheses, or use "mcp__${Q.serverName}__*" for all tools`,examples:[`mcp__${Q.serverName}`,`mcp__${Q.serverName}__*`,Q.toolName&&Q.toolName!=="*"?`mcp__${Q.serverName}__${Q.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!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 "${lW(String(q.toolName))}"`};let $=sW(q.toolName);if($&&q.ruleContent!==void 0){let Y=$(q.ruleContent);if(!Y.valid)return Y}if(oW(q.toolName)&&q.ruleContent!==void 0){let Y=q.ruleContent;if(Y.includes(":*")&&!Y.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(Y===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if(aW(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 E5;var EX=B(()=>{l0();hW();b1();cW();jX();rW();E5=O(()=>U.string().superRefine((Z,X)=>{let J=xX(Z);if(!J.valid){let q=J.error;if(J.suggestion)q+=`. ${J.suggestion}`;if(J.examples&&J.examples.length>0)q+=`. Examples: ${J.examples.join(", ")}`;X.addIssue({code:U.ZodIssueCode.custom,message:q,params:{received:Z}})}}))});function Fa(Z){if(!Z||typeof Z!=="object")return null;let X=PX.safeParse(Z);if(!X.success)return null;if(!X.data.enabled)return null;return X.data}var PX;var eW=B(()=>{l0();PX=U.object({enabled:U.boolean().describe("Whether auto-fix is enabled"),lint:U.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:U.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:U.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:U.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 Ca(Z){return"serverName"in Z&&Z.serverName!==void 0}function ya(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function Sa(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var zj,Rj,Mj,Fj,Dj,ZV,k0;var i2=B(()=>{l0();M9();d0();b1();LW();yW();A3();EX();O5();O5();eW();U3();zj=O(()=>U.record(U.string(),U.coerce.string())),Rj=O(()=>U.object({allow:U.array(E5()).optional().describe("List of permission rules for allowed operations"),deny:U.array(E5()).optional().describe("List of permission rules for denied operations"),ask:U.array(E5()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:U.enum(l2).optional().describe("Default permission mode when Claude Code needs access"),disableBypassPermissionsMode:U.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:U.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:U.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:U.array(U.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),Mj=O(()=>U.object({source:n2().describe("Where to fetch the marketplace from"),installLocation:U.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:U.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Fj=O(()=>U.object({serverName:U.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:U.array(U.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:U.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return H3([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"'})),Dj=O(()=>U.object({serverName:U.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:U.array(U.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:U.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return H3([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"'})),ZV=["skills","agents","hooks","mcp"],k0=O(()=>U.object({$schema:U.literal(L9).optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:U.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:U.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:U.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:U.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),...e(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:U.object({issuer:U.string().url().describe("IdP issuer URL for OIDC discovery"),clientId:U.string().describe("Claude Code's client_id registered at the IdP"),callbackPort:U.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:U.object({type:U.literal("command"),command:U.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:U.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:U.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:zj().optional().describe("Environment variables to set for Claude Code sessions"),attribution:U.object({commit:U.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:U.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."),includeCoAuthoredBy:U.boolean().optional().describe("Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"),includeGitInstructions:U.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:Rj().optional().describe("Tool usage permissions configuration"),model:U.string().optional().describe("Override the default model used by Claude Code"),availableModels:U.array(U.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:U.record(U.string(),U.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:U.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:U.array(U.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:U.array(U.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:U.array(Fj()).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:U.array(Dj()).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:a1().optional().describe("Custom commands to run before/after tool executions"),autoFix:PX.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:U.object({symlinkDirectories:U.array(U.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:U.array(U.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.")}).optional().describe("Git worktree configuration for --worktree flag."),lsp:U.object({enabled:U.boolean().optional(),diagnosticsTimeoutMs:U.number().min(100).max(5000).optional().describe("Per-edit diagnostic injection timeout in ms (default 1500, min 100, max 5000). After FileEdit/FileWrite, Claudio waits up to this duration for the LSP server to publish diagnostics so they can be attached to the same turn.")}).catchall(U.object({disabled:U.boolean().optional(),command:U.array(U.string()).min(1).optional(),extensions:U.array(U.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:U.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:U.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:U.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:U.array(U.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:U.array(U.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:U.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:U.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:U.preprocess((Z)=>Array.isArray(Z)?Z.filter((X)=>ZV.includes(X)):Z,U.union([U.boolean(),U.array(U.enum(ZV))])).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:U.object({type:U.literal("command"),command:U.string(),padding:U.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:U.record(U.string(),U.union([U.array(U.string()),U.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:U.record(U.string(),Mj()).check((Z)=>{for(let[X,J]of Object.entries(Z.value))if(J.source.source==="settings"&&J.source.name!==X)Z.issues.push({code:"custom",input:J.source.name,path:[X,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${X}" but source.name "${J.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claudio/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:U.array(n2()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. "+"Note: this is a policy gate only — it does NOT register marketplaces. "+"To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),blockedMarketplaces:U.array(n2()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem."),forceLoginMethod:U.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:U.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:U.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:U.string().optional().describe("Controls the output style for assistant responses"),language:U.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:U.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:R9().optional(),feedbackSurveyRate:U.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:U.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:U.object({mode:U.enum(["append","replace"]),verbs:U.array(U.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:U.object({excludeDefault:U.boolean().optional(),tips:U.array(U.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:U.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:U.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:U.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:U.enum(["low","medium","high","max"]).optional().catch(void 0).describe("Persisted effort level for supported models."),advisorModel:U.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:U.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:U.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:U.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:U.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:U.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:U.array(U.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:U.record(U.string(),U.object({mcpServers:U.record(U.string(),U.record(U.string(),U.union([U.string(),U.number(),U.boolean(),U.array(U.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:U.record(U.string(),U.union([U.string(),U.number(),U.boolean(),U.array(U.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:U.object({defaultEnvironmentId:U.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:U.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),...{},minimumVersion:U.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:U.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"),...{},...{},...{},channelsEnabled:U.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:U.array(U.object({marketplace:U.string(),plugin:U.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:U.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:U.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:U.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:U.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:U.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:U.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:U.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:U.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:U.object({allow:U.array(U.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:U.array(U.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:U.array(U.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:U.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:U.array(U.object({id:U.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:U.string().describe("Display name for the SSH connection"),sshHost:U.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:U.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:U.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:U.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:U.array(U.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:U.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 vX(){let Z=XV(k0(),{unrepresentable:"any"});return f(Z,null,2)}var JV=B(()=>{l0();L0();i2()});function qV(Z){let X=Tj.find((q)=>q.matches(Z));if(!X)return null;let J={...X.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!J.suggestion)J.suggestion=`Valid values: ${Z.enumValues.map((q)=>`"${q}"`).join(", ")}`;if(!J.docLink&&Z.path){let q=Z.path.split(".")[0];if(q)J.docLink=Aj[q]}return J}var Tj,Aj;var QV=B(()=>{Tj=[{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: "includeCoAuthoredBy": 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'}}],Aj={}});function $V(Z){return Z.code==="invalid_type"}function YV(Z){return Z.code==="invalid_value"}function Ij(Z){return Z.code==="unrecognized_keys"}function HV(Z){return Z.code==="too_small"}function CX(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function UV(Z){let X=Z.match(/received (\w+)/);return X?X[1]:void 0}function o6(Z,X){return Z.issues.map((J)=>{let q=J.path.map(String).join("."),Q=J.message,$,Y,H,K,W;if(YV(J))Y=J.values.map((V)=>String(V)),H=Y.join(" | "),K=void 0,W=void 0;else if($V(J)){H=J.expected;let V=UV(J.message);K=V??CX(J.input),W=V??CX(J.input)}else if(HV(J))H=String(J.minimum);else if(J.code==="custom"&&"params"in J)K=J.params.received,W=K;let G=qV({path:q,code:J.code,expected:H,received:K,enumValues:Y,message:J.message,value:K});if(YV(J))$=Y?.map((V)=>`"${V}"`).join(", "),Q=`Invalid value. Expected one of: ${$}`;else if($V(J)){let V=UV(J.message)??CX(J.input);if(J.expected==="object"&&V==="null"&&q==="")Q="Invalid or malformed JSON";else Q=`Expected ${J.expected}, but received ${V}`}else if(Ij(J)){let V=J.keys.join(", ");Q=`Unrecognized ${nW(J.keys.length,"field")}: ${V}`}else if(HV(J))Q=`Number must be greater than or equal to ${J.minimum}`,$=String(J.minimum);return{file:X,path:q,message:Q,expected:$,invalidValue:W,suggestion:G?.suggestion,docLink:G?.docLink}})}function oa(Z){try{let X=H0(Z),J=k0().strict().safeParse(X);if(J.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
|
|
86
86
|
`+o6(J.error,"settings").map(($)=>`- ${$.path}: ${$.message}`).join(`
|
|
87
87
|
`),fullSchema:vX()}}catch(X){return{isValid:!1,error:`Invalid JSON: ${X instanceof Error?X.message:"Unknown parsing error"}`,fullSchema:vX()}}}function P5(Z,X){if(!Z||typeof Z!=="object")return[];let J=Z;if(!J.permissions||typeof J.permissions!=="object")return[];let q=J.permissions,Q=[];for(let $ of["allow","deny","ask"]){let Y=q[$];if(!Array.isArray(Y))continue;q[$]=Y.filter((H)=>{if(typeof H!=="string")return Q.push({file:X,path:`permissions.${$}`,message:`Non-string value in ${$} array was removed`,invalidValue:H}),!1;let K=xX(H);if(!K.valid){let W=`Invalid permission rule "${H}" was skipped`;if(K.error)W+=`: ${K.error}`;if(K.suggestion)W+=`. ${K.suggestion}`;return Q.push({file:X,path:`permissions.${$}`,message:W,invalidValue:H}),!1}return!0})}return Q}var yX=B(()=>{L0();jX();EX();JV();i2();QV()});import{userInfo as Oj}from"os";function BV(){let Z="";try{Z=Oj().username}catch{}let X=[];if(Z)X.push({path:`/Library/Managed Preferences/${Z}/${KV}.plist`,label:"per-user managed preferences"});return X.push({path:`/Library/Managed Preferences/${KV}.plist`,label:"device-level managed preferences"}),X}var KV="com.anthropic.claudecode",v5="HKLM\\SOFTWARE\\Policies\\ClaudeCode",C5="HKCU\\SOFTWARE\\Policies\\ClaudeCode",s6="Settings",GV="/usr/bin/plutil",WV,VV=5000;var SX=B(()=>{WV=["-convert","json","-o","-","--"]});import{execFile as wj}from"child_process";import{existsSync as jj}from"fs";function bX(Z,X){return new Promise((J)=>{wj(Z,X,{encoding:"utf-8",timeout:VV},(q,Q)=>{J({stdout:Q??"",code:q?1:0})})})}function y5(){return(async()=>{if(process.platform==="darwin"){let Z=BV(),J=(await Promise.all(Z.map(async({path:q,label:Q})=>{if(!jj(q))return{stdout:"",label:Q,ok:!1};let{stdout:$,code:Y}=await bX(GV,[...WV,q]);return{stdout:$,label:Q,ok:Y===0&&!!$}}))).find((q)=>q.ok);return{plistStdouts:J?[{stdout:J.stdout,label:J.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,X]=await Promise.all([bX("reg",["query",v5,"/v",s6]),bX("reg",["query",C5,"/v",s6])]);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 Jo(){if(hX)return;hX=y5()}function LV(){return hX}var hX=null;var _V=B(()=>{SX()});import{join as zV}from"path";function Nj(){if(S5)return;S5=(async()=>{r6("mdm_load_start");let Z=Date.now(),X=LV()??y5(),{mdm:J,hkcu:q}=FV(await X);fX=J,mX=q,r6("mdm_load_end");let Q=Date.now()-Z;if(E(`MDM settings load completed in ${Q}ms`),Object.keys(J.settings).length>0){E(`MDM settings found: ${Object.keys(J.settings).join(", ")}`);try{Q0("info","mdm_settings_loaded",{duration_ms:Q,key_count:Object.keys(J.settings).length,error_count:J.errors.length})}catch{}}})()}async function zo(){if(!S5)Nj();await S5}function b5(){return fX??G1}function h5(){return mX??G1}function Ro(Z,X){fX=Z,mX=X}async function Mo(){let Z=await y5();return FV(Z)}function gX(Z,X){let J=C0(Z,!1);if(!J||typeof J!=="object")return{settings:{},errors:[]};let q=P5(J,X),Q=k0().safeParse(J);if(!Q.success){let $=o6(Q.error,X);return{settings:{},errors:[...q,...$]}}return{settings:Q.data,errors:q}}function RV(Z,X="Settings"){let J=Z.split(/\r?\n/),q=X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Q=new RegExp(`^\\s+${q}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let $ of J){let Y=$.match(Q);if(Y&&Y[1])return Y[1].trimEnd()}return null}function FV(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:X,label:J}=Z.plistStdouts[0],q=gX(X,J);if(Object.keys(q.settings).length>0)return{mdm:q,hkcu:G1}}if(Z.hklmStdout){let X=RV(Z.hklmStdout);if(X){let J=gX(X,`Registry: ${v5}\\${s6}`);if(Object.keys(J.settings).length>0)return{mdm:J,hkcu:G1}}}if(kj())return{mdm:G1,hkcu:G1};if(Z.hkcuStdout){let X=RV(Z.hkcuStdout);if(X){let J=gX(X,`Registry: ${C5}\\${s6}`);return{mdm:G1,hkcu:J}}}return{mdm:G1,hkcu:G1}}function kj(){try{let Z=zV(F1(),"managed-settings.json"),X=Z1(Z),J=C0(X,!1);if(J&&typeof J==="object"&&Object.keys(J).length>0)return!0}catch{}try{let Z=O2(),X=k().readdirSync(Z);for(let J of X){if(!(J.isFile()||J.isSymbolicLink())||!J.name.endsWith(".json")||J.name.startsWith("."))continue;try{let q=Z1(zV(Z,J.name)),Q=C0(q,!1);if(Q&&typeof Q==="object"&&Object.keys(Q).length>0)return!0}catch{}}}catch{}return!1}var G1,fX=null,mX=null,S5=null;var DV=B(()=>{R1();G2();B2();R0();d4();MV();l4();i2();yX();SX();_V();G1=Object.freeze({settings:{},errors:[]})});import{dirname as EV,join as g5,resolve as a2}from"path";function lX(){return g5(F1(),"managed-settings.json")}function nX(){let Z=[],X={},J=!1,{settings:q,errors:Q}=o2(lX());if(Z.push(...Q),q&&Object.keys(q).length>0)X=e0(X,q,o1),J=!0;let $=O2();try{let Y=k().readdirSync($).filter((H)=>(H.isFile()||H.isSymbolicLink())&&H.name.endsWith(".json")&&!H.name.startsWith(".")).map((H)=>H.name).sort();for(let H of Y){let{settings:K,errors:W}=o2(g5($,H));if(Z.push(...W),K&&Object.keys(K).length>0)X=e0(X,K,o1),J=!0}}catch(Y){let H=K0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")m(Y)}return{settings:J?X:null,errors:Z}}function io(){let{settings:Z}=o2(lX()),X=!!Z&&Object.keys(Z).length>0,J=!1,q=O2();try{J=k().readdirSync(q).some((Q)=>(Q.isFile()||Q.isSymbolicLink())&&Q.name.endsWith(".json")&&!Q.name.startsWith("."))}catch{}return{hasBase:X,hasDropIns:J}}function PV(Z,X){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")E(`Broken symlink or missing file encountered for settings.json at path: ${X}`);else m(Z)}function o2(Z){let X=jV(Z);if(X)return{settings:X.settings?pX(X.settings):null,errors:X.errors};let J=xj(Z);return NV(Z,J),{settings:J.settings?pX(J.settings):null,errors:J.errors}}function xj(Z){try{let{resolvedPath:X}=M1(k(),Z),J=Z1(X);if(J.trim()==="")return{settings:{},errors:[]};let q=C0(J,!1),Q=P5(q,Z),$=k0().safeParse(q);if(!$.success){let Y=o6($.error,Z);return{settings:null,errors:[...Q,...Y]}}return{settings:$.data,errors:Q}}catch(X){return PV(X,Z),{settings:null,errors:[]}}}function TV(Z){switch(Z){case"userSettings":return a2(Y0());case"policySettings":case"projectSettings":case"localSettings":return a2(s1());case"flagSettings":{let X=dX();return X?EV(a2(X)):a2(s1())}}}function Ej(){if(xV()||e(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function f5(Z){switch(Z){case"userSettings":return g5(TV(Z),Ej());case"projectSettings":case"localSettings":return g5(TV(Z),vV(Z));case"policySettings":return lX();case"flagSettings":return dX()}}function vV(Z){switch(Z){case"projectSettings":return".claudio/settings.json";case"localSettings":return".claudio/settings.local.json"}}function n(Z){let X=OV(Z);if(X!==void 0)return X;let J=CV(Z);return wV(Z,J),J}function CV(Z){if(Z==="policySettings"){let q=b4();if(q&&Object.keys(q).length>0)return q;let Q=b5();if(Object.keys(Q.settings).length>0)return Q.settings;let{settings:$}=nX();if($)return $;let Y=h5();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let X=f5(Z),{settings:J}=X?o2(X):{settings:null};if(Z==="flagSettings"){let q=cX();if(q){let Q=k0().safeParse(q);if(Q.success)return e0(J||{},Q.data,o1)}}return J}function ao(){let Z=b4();if(Z&&Object.keys(Z).length>0)return"remote";let X=b5();if(Object.keys(X.settings).length>0)return v0()==="macos"?"plist":"hklm";let{settings:J}=nX();if(J)return"file";let q=h5();if(Object.keys(q.settings).length>0)return"hkcu";return null}function oo(Z,X){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let J=f5(Z);if(!J)return{error:null};try{k().mkdirSync(EV(J));let q=CV(Z);if(!q){let $=null;try{$=Z1(J)}catch(Y){if(!A6(Y))throw Y}if($!==null){let Y=C0($);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${J}`)};if(Y&&typeof Y==="object")q=Y,E(`Using raw settings from ${J} due to validation failure`)}}let Q=e0(q||{},X,($,Y,H,K)=>{if(Y===void 0&&K&&typeof H==="string"){delete K[H];return}if(Array.isArray(Y))return Y;return});if(_9(J),I6(J,f(Q,null,2)+`
|
|
88
88
|
`),_2(),Z==="localSettings")s$(vV("localSettings"),s1())}catch(q){let Q=Error(`Failed to read raw settings from ${J}: ${q}`);return m(Q),{error:Q}}return{error:null}}function Pj(Z,X){return h$([...Z,...X])}function o1(Z,X){if(Array.isArray(Z)&&Array.isArray(X))return Pj(Z,X);return}function so(Z){let X=k0().strip().parse(Z),J=["permissions","sandbox","hooks"],q=[],Q={permissions:new Set(["allow","deny","ask","defaultMode","disableBypassPermissionsMode","allowBypassPermissionsMode","disableAutoMode","additionalDirectories"]),sandbox:new Set(["enabled","failIfUnavailable","allowUnsandboxedCommands","network","filesystem","ignoreViolations","excludedCommands","autoAllowBashIfSandboxed","enableWeakerNestedSandbox","enableWeakerNetworkIsolation","ripgrep"]),hooks:new Set(["PreToolUse","PostToolUse","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStop","PreCompact","PostCompact","TeammateIdle","TaskCreated","TaskCompleted"])};for(let $ of Object.keys(X))if(J.includes($)&&X[$]&&typeof X[$]==="object"){let Y=X[$],H=Q[$];if(H){for(let K of Object.keys(Y))if(H.has(K))q.push(`${$}.${K}`)}}else q.push($);return q.sort()}function vj(){if(uX)return{settings:{},errors:[]};let Z=Date.now();r6("loadSettingsFromDisk_start"),Q0("info","settings_load_started"),uX=!0;try{let X=kV(),J={};if(X)J=e0(J,X,o1);let q=[],Q=new Set,$=new Set;for(let Y of I2()){if(Y==="policySettings"){let K=null,W=[],G=b4();if(G&&Object.keys(G).length>0){let V=k0().safeParse(G);if(V.success)K=V.data;else W.push(...o6(V.error,"remote managed settings"))}if(!K){let V=b5();if(Object.keys(V.settings).length>0)K=V.settings;W.push(...V.errors)}if(!K){let{settings:V,errors:L}=nX();if(V)K=V;W.push(...L)}if(!K){let V=h5();if(Object.keys(V.settings).length>0)K=V.settings;W.push(...V.errors)}if(K)J=e0(J,K,o1);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),q.push(V)}continue}let H=f5(Y);if(H){let K=a2(H);if(!$.has(K)){$.add(K);let{settings:W,errors:G}=o2(H);for(let V of G){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),q.push(V)}if(W)J=e0(J,W,o1)}}if(Y==="flagSettings"){let K=cX();if(K){let W=k0().safeParse(K);if(W.success)J=e0(J,W.data,o1)}}}return Q0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:$.size,error_count:q.length}),{settings:J,errors:q}}finally{uX=!1}}function m5(){let{settings:Z}=Cj();return Z||{}}function to(){_2();let Z=[];for(let X of I2()){let J=n(X);if(J&&Object.keys(J).length>0)Z.push({source:X,settings:J})}return{effective:m5(),sources:Z}}function Cj(){let Z=AV();if(Z!==null)return Z;let X=vj();return r6("loadSettingsFromDisk_end"),IV(X),X}function eo(){return!!(n("userSettings")?.skipDangerousModePermissionPrompt||n("localSettings")?.skipDangerousModePermissionPrompt||n("flagSettings")?.skipDangerousModePermissionPrompt||n("policySettings")?.skipDangerousModePermissionPrompt)}function Zs(){return!!(n("userSettings")?.permissions?.allowBypassPermissionsMode||n("localSettings")?.permissions?.allowBypassPermissionsMode||n("flagSettings")?.permissions?.allowBypassPermissionsMode||n("policySettings")?.permissions?.allowBypassPermissionsMode)}function Xs(){{let Z=n("userSettings")?.skipAutoPermissionPrompt,X=n("localSettings")?.skipAutoPermissionPrompt,J=n("flagSettings")?.skipAutoPermissionPrompt,q=n("policySettings")?.skipAutoPermissionPrompt,Q=!!(Z||X||J||q);return E(`[auto-mode] hasAutoModeOptIn=${Q} skipAutoPermissionPrompt: user=${Z} local=${X} flag=${J} policy=${q}`),Q}return!1}function Js(){return n("policySettings")?.useAutoModeDuringPlan!==!1&&n("flagSettings")?.useAutoModeDuringPlan!==!1&&n("userSettings")?.useAutoModeDuringPlan!==!1&&n("localSettings")?.useAutoModeDuringPlan!==!1}function qs(){{let Z=U.object({allow:U.array(U.string()).optional(),soft_deny:U.array(U.string()).optional(),deny:U.array(U.string()).optional(),environment:U.array(U.string()).optional()}),X=[],J=[],q=[];for(let Q of["userSettings","localSettings","flagSettings","policySettings"]){let $=n(Q);if(!$)continue;let Y=Z.safeParse($.autoMode);if(Y.success){if(Y.data.allow)X.push(...Y.data.allow);if(Y.data.soft_deny)J.push(...Y.data.soft_deny);if(Y.data.environment)q.push(...Y.data.environment)}}if(X.length>0||J.length>0||q.length>0)return{...X.length>0&&{allow:X},...J.length>0&&{soft_deny:J},...q.length>0&&{environment:q}}}return}function Qs(Z){for(let X of I2()){if(X==="policySettings")continue;let J=f5(X);if(!J)continue;try{let{resolvedPath:q}=M1(k(),J),Q=Z1(q);if(!Q.trim())continue;let $=C0(Q,!1);if($&&typeof $==="object"&&Z in $)return!0}catch(q){PV(q,J)}}return!1}var uX=!1,ro;var yV=B(()=>{y$();l0();j6();b$();U3();R1();G2();d0();y1();h4();B2();R0();r$();d4();u0();z6();L0();MV();A3();z9();l4();DV();S$();i2();yX();ro=m5});import{homedir as yj}from"os";import{isAbsolute as Sj,join as p5,normalize as iX,sep as hV}from"path";function gV(){let Z=process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY;if(e(Z))return!1;if(bV(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=m5();if(X.autoMemoryEnabled!==void 0)return X.autoMemoryEnabled;return!0}function _s(){if(!C1("tengu_passport_quail",!1))return!1;return!SV()||C1("tengu_slate_thimble",!1)}function bj(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return Y0()}function fV(Z,X){if(!Z)return;let J=Z;if(X&&(J.startsWith("~/")||J.startsWith("~\\"))){let Q=J.slice(2),$=iX(Q||".");if($==="."||$==="..")return;J=p5(yj(),Q)}let q=iX(J).replace(/[/\\]+$/,"");if(!Sj(q)||q.length<3||/^[A-Za-z]:$/.test(q)||q.startsWith("\\\\")||q.startsWith("//")||q.includes("\x00"))return;return(q+hV).normalize("NFC")}function mV(){return fV(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function fj(){let Z=n("policySettings")?.autoMemoryDirectory??n("flagSettings")?.autoMemoryDirectory??n("localSettings")?.autoMemoryDirectory??n("userSettings")?.autoMemoryDirectory;return fV(Z,!0)}function zs(){return mV()!==void 0}function mj(){return d5(u5())??u5()}function uV(){return p5(s2(),gj)}function Rs(Z){return iX(Z).startsWith(s2())}var hj="memory",gj="MEMORY.md",s2;var aX=B(()=>{L1();j6();W3();d0();R2();v4();yV();s2=u(()=>{let Z=mV()??fj();if(Z)return Z;let X=p5(bj(),"projects");return(p5(X,t7(mj()),hj)+hV).normalize("NFC")},()=>u5())});var dV=d((Fs,pV)=>{var j1=$0("constants"),uj=process.cwd,c5=null,pj=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!c5)c5=uj.call(process);return c5};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(l5=process.chdir,process.chdir=function(Z){c5=null,l5.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,l5)}var l5;pV.exports=dj;function dj(Z){if(j1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))X(Z);if(!Z.lutimes)J(Z);if(Z.chown=$(Z.chown),Z.fchown=$(Z.fchown),Z.lchown=$(Z.lchown),Z.chmod=q(Z.chmod),Z.fchmod=q(Z.fchmod),Z.lchmod=q(Z.lchmod),Z.chownSync=Y(Z.chownSync),Z.fchownSync=Y(Z.fchownSync),Z.lchownSync=Y(Z.lchownSync),Z.chmodSync=Q(Z.chmodSync),Z.fchmodSync=Q(Z.fchmodSync),Z.lchmodSync=Q(Z.lchmodSync),Z.stat=H(Z.stat),Z.fstat=H(Z.fstat),Z.lstat=H(Z.lstat),Z.statSync=K(Z.statSync),Z.fstatSync=K(Z.fstatSync),Z.lstatSync=K(Z.lstatSync),Z.chmod&&!Z.lchmod)Z.lchmod=function(G,V,L){if(L)process.nextTick(L)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(G,V,L,_){if(_)process.nextTick(_)},Z.lchownSync=function(){};if(pj==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(G){function V(L,_,z){var D=Date.now(),M=0;G(L,_,function F(N){if(N&&(N.code==="EACCES"||N.code==="EPERM"||N.code==="EBUSY")&&Date.now()-D<60000){if(setTimeout(function(){Z.stat(_,function(R,w){if(R&&R.code==="ENOENT")G(L,_,F);else z(N)})},M),M<100)M+=10;return}if(z)z(N)})}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,D,M,F){var N;if(F&&typeof F==="function"){var R=0;N=function(w,A,I){if(w&&w.code==="EAGAIN"&&R<10)return R++,G.call(Z,L,_,z,D,M,N);F.apply(this,arguments)}}return G.call(Z,L,_,z,D,M,N)}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,D){var M=0;while(!0)try{return G.call(Z,V,L,_,z,D)}catch(F){if(F.code==="EAGAIN"&&M<10){M++;continue}throw F}}}(Z.readSync);function X(G){G.lchmod=function(V,L,_){G.open(V,j1.O_WRONLY|j1.O_SYMLINK,L,function(z,D){if(z){if(_)_(z);return}G.fchmod(D,L,function(M){G.close(D,function(F){if(_)_(M||F)})})})},G.lchmodSync=function(V,L){var _=G.openSync(V,j1.O_WRONLY|j1.O_SYMLINK,L),z=!0,D;try{D=G.fchmodSync(_,L),z=!1}finally{if(z)try{G.closeSync(_)}catch(M){}else G.closeSync(_)}return D}}function J(G){if(j1.hasOwnProperty("O_SYMLINK")&&G.futimes)G.lutimes=function(V,L,_,z){G.open(V,j1.O_SYMLINK,function(D,M){if(D){if(z)z(D);return}G.futimes(M,L,_,function(F){G.close(M,function(N){if(z)z(F||N)})})})},G.lutimesSync=function(V,L,_){var z=G.openSync(V,j1.O_SYMLINK),D,M=!0;try{D=G.futimesSync(z,L,_),M=!1}finally{if(M)try{G.closeSync(z)}catch(F){}else G.closeSync(z)}return D};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,L,function(z){if(W(z))z=null;if(_)_.apply(this,arguments)})}}function Q(G){if(!G)return G;return function(V,L){try{return G.call(Z,V,L)}catch(_){if(!W(_))throw _}}}function $(G){if(!G)return G;return function(V,L,_,z){return G.call(Z,V,L,_,function(D){if(W(D))D=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 L==="function")_=L,L=null;function z(D,M){if(M){if(M.uid<0)M.uid+=4294967296;if(M.gid<0)M.gid+=4294967296}if(_)_.apply(this,arguments)}return L?G.call(Z,V,L,z):G.call(Z,V,z)}}function K(G){if(!G)return G;return function(V,L){var _=L?G.call(Z,V,L):G.call(Z,V);if(_){if(_.uid<0)_.uid+=4294967296;if(_.gid<0)_.gid+=4294967296}return _}}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 nV=d((Ds,lV)=>{var cV=$0("stream").Stream;lV.exports=cj;function cj(Z){return{ReadStream:X,WriteStream:J};function X(q,Q){if(!(this instanceof X))return new X(q,Q);cV.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,Q=Q||{};var Y=Object.keys(Q);for(var H=0,K=Y.length;H<K;H++){var W=Y[H];this[W]=Q[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 J(q,Q){if(!(this instanceof J))return new J(q,Q);cV.call(this),this.path=q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Q=Q||{};var $=Object.keys(Q);for(var Y=0,H=$.length;Y<H;Y++){var K=$[Y];this[K]=Q[K]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=Z.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var aV=d((Ts,iV)=>{iV.exports=nj;var lj=Object.getPrototypeOf||function(Z){return Z.__proto__};function nj(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var X={__proto__:lj(Z)};else var X=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(J){Object.defineProperty(X,J,Object.getOwnPropertyDescriptor(Z,J))}),X}});var eX=d((As,tX)=>{var i=$0("fs"),ij=dV(),aj=nV(),oj=aV(),n5=$0("util"),G0,a5;if(typeof Symbol==="function"&&typeof Symbol.for==="function")G0=Symbol.for("graceful-fs.queue"),a5=Symbol.for("graceful-fs.previous");else G0="___graceful-fs.queue",a5="___graceful-fs.previous";function sj(){}function sV(Z,X){Object.defineProperty(Z,G0,{get:function(){return X}})}var r1=sj;if(n5.debuglog)r1=n5.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))r1=function(){var Z=n5.format.apply(n5,arguments);Z="GFS4: "+Z.split(/\n/).join(`
|
|
@@ -99,7 +99,7 @@ Claude configuration file at ${Z} is corrupted: ${Q.message}
|
|
|
99
99
|
You can manually restore it by running: cp "${L}" "${Z}"
|
|
100
100
|
|
|
101
101
|
`);else process.stderr.write(`
|
|
102
|
-
`)}return X()}}function Nr(){let Z=wJ(),X=W0();if(!X.projects)return Q4;let J=X.projects[Z]??Q4;if(typeof J.allowedTools==="string")J.allowedTools=C0(J.allowedTools)??[];return J}function kr(Z){let X=wJ(),J=null;try{if(fB(V0(),V1,(Q)=>{let $=Q.projects?.[X]??Q4,Y=Z($);if(Y===$)return Q;return J={...Q,projects:{...Q.projects,[X]:Y}},J})&&J)Y7(J)}catch(q){E(`Failed to save config with lock: ${q}`,{level:"error"});let Q=X6(V0(),V1);if(H7(Q)){E("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),c0("tengu_config_auth_loss_prevented",{});return}let $=Q.projects?.[X]??Q4,Y=Z($);if(Y===$)return;J={...Q,projects:{...Q.projects,[X]:Y}},gB(V0(),J,AJ),Y7(J)}}function rN(){return tN()!==null}function xr(){return rN()&&!e(process.env.FORCE_AUTOUPDATE_PLUGINS)}function Er(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function tN(){if(e(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let Z=RB();if(Z)return{type:"env",envVar:Z};let X=W0();if(X.autoUpdates===!1&&(X.installMethod!=="native"||X.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function Pr(){let Z=W0();if(Z.userID)return Z.userID;let X=uN(32).toString("hex");return A0((J)=>({...J,userID:X})),X}function vr(){if(!W0().firstStartTime){let X=new Date().toISOString();A0((J)=>({...J,firstStartTime:J.firstStartTime??X}))}}function Cr(Z){let X=s1();switch(Z){case"User":return T0(Y0(),"CLAUDE.md");case"Local":return T0(X,"CLAUDE.local.md");case"Project":return T0(X,X7);case"Managed":return T0(F1(),"CLAUDE.md");case"AutoMem":return uV()}return cN.getTeamMemEntrypoint()}function yr(){return T0(F1(),".claude","rules")}function Sr(){return T0(Y0(),"rules")}function gr(Z){r0.config=Z,r0.mtime=Z?Date.now():0}var cN,_J=!1,Q4,Lr,AJ,lN,nN,bB=!1,Fr,Dr,RJ,r0,x1=null,q4=0,Q7=0,IJ=0,Ir=20,oN=1000,zJ=!1,FJ=!1,wJ,br,hr;var jJ=B(()=>{L1();yQ();j6();aX();l$();t0();SB();R1();G2();MX();d0();y1();h4();R0();R2();d4();S4();_B();u0();v4();VJ();l4();TB();L0();AB();cN=(EB(),$4(xB)),Q4={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},Lr=["off","compact","full"];AJ=V1(),lN=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","claudeInChromeDefaultEnabled","hasCompletedClaudeInChromeOnboarding","lspRecommendationDisabled","lspRecommendationNeverPlugins","lspRecommendationIgnoredCount","copyFullResponse","copyOnSelect","flickerFreeMode","permissionExplainerEnabled","prStatusFooterEnabled","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled"];nN=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"];Fr={...AJ,autoUpdates:!1,knowledgeGraphEnabled:!0},Dr={...Q4};RJ=new Set;r0={config:null,mtime:0};Y4(async()=>{aN()});wJ=u(()=>{let Z=s1(),X=d5(Z);if(X)return v1(X);return v1($7(Z))});br=X6,hr=H7});function U7(Z){return Z.split(/[;,]/).map((X)=>X.trim()).filter((X)=>X.length>0)}function mB(Z){let X=U7(Z);return X.length>0?X[0]:Z.trim()}var NJ=()=>{};import{randomBytes as eN}from"crypto";function J2(Z){return Z?.trim()??""}function I0(Z){let X=J2(Z);return X.length>0?X:void 0}function Zk(Z){return J2(Z).replace(/\/+$/,"")}function Xk(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function Jk(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function qk(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let X={};for(let[J,q]of Object.entries(Z)){let Q=J2(J),$=typeof q==="string"?q.trim():"";if(Q.length>0&&$.length>0)X[Q]=$}return Object.keys(X).length>0?X:void 0}function Qk(Z){if(!Z||typeof Z!=="object")return;let X={},J=I0(Z.codexAuthPath);if(J)X.codexAuthPath=J;let q=I0(Z.codexAccountId);if(q)X.codexAccountId=q;let Q=I0(Z.githubToken);if(Q)X.githubToken=Q;let $=I0(Z.awsRegion);if($)X.awsRegion=$;let Y=I0(Z.gcpProject);if(Y)X.gcpProject=Y;let H=I0(Z.gcpRegion);if(H)X.gcpRegion=H;let K=I0(Z.azureResource);if(K)X.azureResource=K;let W=qk(Z.customHeaders);if(W)X.customHeaders=W;let G=Jk(Z.reasoningEffort);if(G)X.reasoningEffort=G;return Object.keys(X).length>0?X:void 0}function dB(Z){let X=J2(Z.id),J=J2(Z.name),q=Xk(Z.provider),Q=Zk(Z.baseUrl),$=J2(Z.model);if(!X||!J||!Q||q!=="anthropic"&&!$)return null;let H={id:X,name:J,provider:q,baseUrl:Q,model:$,apiKey:I0(Z.apiKey)},K=Qk(Z.extras);if(K)H.extras=K;return H}function $k(Z){let X=new Set,J=[];for(let q of Z??[]){let Q=dB(q);if(!Q||X.has(Q.id))continue;X.add(Q.id),J.push(Q)}return J}function Yk(){return`provider_${eN(6).toString("hex")}`}function cB(Z,X=Yk()){return dB({id:X,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function lB(Z,X=W0()){return X.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function lr(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:uB,model:pB,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"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:uB,model:pB,apiKey:"",requiresApiKey:!1}}}function E1(Z=W0()){return $k(Z.providerProfiles)}function nr(Z=W0()){return E1(Z).length>0}function B1(Z=W0()){let X=E1(Z);if(X.length===0)return;let J=I0(Z.activeProviderProfileId);return X.find((q)=>q.id===J)??X[0]}function ir(Z,X){let J=cB(Z);if(!J)return null;let q=X?.makeActive??!0;if(A0(($)=>{let H=[...E1($),J],K=I0($.activeProviderProfileId),W=q||!K||!H.some((G)=>G.id===K)?J.id:K;return{...$,providerProfiles:H,activeProviderProfileId:W}}),B1()?.id===J.id)Uk(J.id),Kk();return J}function ar(Z,X){let J=cB(X,Z);if(!J)return null;let q=!1;if(A0((Q)=>{let $=E1(Q),Y=$.findIndex((L)=>L.id===Z);if(Y<0)return Q;q=!0;let H=[...$];H[Y]=J;let K={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete K[Z];let W=I0(Q.activeProviderProfileId),G=W&&H.some((L)=>L.id===W)?W:H[0]?.id;return{...Q,providerProfiles:H,activeProviderProfileId:G,openaiAdditionalModelOptionsCacheByProfile:K,openaiAdditionalModelOptionsCache:G===Z?[]:Q.openaiAdditionalModelOptionsCache}}),!q)return null;return J}function or(Z){let X=I0(Z);if(!X)return null;let J=B1();if(!J)return null;if(U7(J.model).includes(X))return J;A0(($)=>{let Y=E1($),H=Y.findIndex((G)=>G.id===J.id);if(H<0)return $;let K=Y[H];if(K.model===X)return $;let W=[...Y];return W[H]={...K,model:X},{...$,providerProfiles:W}});let Q=B1();if(!Q||Q.id!==J.id)return null;return Q}function sr(){let Z=B1();if(!Z)return;A0((X)=>{let J=E1(X),q=J.findIndex((Y)=>Y.id===Z.id);if(q<0)return X;let Q=J[q];if(!Q.model)return X;let $=[...J];return $[q]={...Q,model:""},{...X,providerProfiles:$}})}function Hk(Z){let X=U7(Z.model);if(X.length===0)return[];return X.map((J)=>({value:J,label:J,description:`Provider: ${Z.name}`}))}function Uk(Z){let X=W0(),q=E1(X).find(($)=>$.id===Z);if(!q)return null;let Q=Hk(q);return A0(($)=>({...$,activeProviderProfileId:Z,openaiAdditionalModelOptionsCache:Q.length>0?Q:lB(Z,$),openaiAdditionalModelOptionsCacheByProfile:{...$.openaiAdditionalModelOptionsCacheByProfile??{},[Z]:Q.length>0?Q:$.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}})),q}function rr(Z){let X=!1,J;return A0((q)=>{let Q=E1(q);if(!Q.find((V)=>V.id===Z))return q;X=!0;let Y=Q.filter((V)=>V.id!==Z),H=I0(q.activeProviderProfileId),W=!H||H===Z||!Y.some((V)=>V.id===H)?Y[0]?.id:H;if(W)J=Y.find((V)=>V.id===W)??Y[0];let G={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete G[Z],{...q,providerProfiles:Y,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:G,openaiAdditionalModelOptionsCache:W?lB(W,{...q,openaiAdditionalModelOptionsCacheByProfile:G}):[]}}),{removed:X,activeProfileId:J?.id}}function tr(Z=W0()){let X=B1(Z);if(!X)return Z.openaiAdditionalModelOptionsCache??[];let J=Z.openaiAdditionalModelOptionsCacheByProfile?.[X.id];if(J)return J;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function er(Z){let X=B1();if(!X){A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z}));return}A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...J.openaiAdditionalModelOptionsCacheByProfile??{},[X.id]:Z}}))}function Kk(){let Z=B1();if(!Z){A0((X)=>({...X,openaiAdditionalModelOptionsCache:[]}));return}A0((X)=>{let J={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete J[Z.id],{...X,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:J}})}var uB="http://localhost:11434/v1",pB="llama3.1:8b";var nB=B(()=>{jJ();NJ()});function K7(Z,X){return{name:`${Z.name}-with-${X.name}-fallback`,read(){let J=Z.read();if(J!==null&&J!==void 0)return J;return X.read()||{}},async readAsync(){let J=await Z.readAsync();if(J!==null&&J!==void 0)return J;return await X.readAsync()||{}},update(J){let q=Z.read(),Q=Z.update(J);if(Q.success){if(q===null)X.delete();return Q}let $=X.update(J);if($.success){if(q!==null)Z.delete();return{success:!0,warning:$.warning}}return{success:!1}},delete(){let J=Z.delete(),q=X.delete();return J||q}}}var iB=()=>{};function G7(Z,X,J=10*oB*aB){let W=[];try{let q;if(X===void 0)q={};else if(X instanceof AbortSignal)q={abortSignal:X,timeout:J};else q=X;let{abortSignal:Q,timeout:$=10*oB*aB,input:Y,stdio:H=["ignore","pipe","pipe"]}=q;Q?.throwIfAborted();const K=R6(W,k4`exec: ${Z.slice(0,200)}`,0);try{let _=N0(Z,{env:process.env,maxBuffer:1e6,timeout:$,cwd:s(),stdio:H,shell:!0,reject:!1,input:Y});if(!_.stdout)return null;return _.stdout.trim()||null}catch{return null}}catch(G){var V=G,L=1}finally{M6(W,V,L)}}var aB=1000,oB=60;var kJ=B(()=>{c6();t0();L0()});import{createHash as Gk}from"crypto";import{userInfo as Wk}from"os";function J6(Z=""){let X=Y0(),q=!process.env.CLAUDIO_CONFIG_DIR?"":`-${Gk("sha256").update(X).digest("hex").substring(0,8)}`;return`Claude Code${sB().OAUTH_FILE_SUFFIX}${Z}${q}`}function H4(Z=""){return J6(Z)}function O0(){try{return process.env.USER||Wk().username}catch{return"claude-code-user"}}function EJ(){q0.cache={data:null,cachedAt:0},q0.generation++,q0.readInFlight=null}function Wt(Z){if(q0.cache.cachedAt!==0)return;let X=null;if(Z)try{X=JSON.parse(Z)}catch{return}q0.cache={data:X,cachedAt:Date.now()}}var h0="-credentials",xJ=30000,q0;var W7=B(()=>{HW();d0();q0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function Bk(){try{let Z=H4(h0),X=O0(),{stdout:J,code:q}=await a("security",["find-generic-password","-a",X,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(q===0&&J)return H0(J.trim())}catch(Z){}return null}function Ft(){if(q2!==void 0)return q2;if(process.platform!=="darwin")return q2=!1,!1;try{q2=N0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{q2=!1}return q2}var Vk=4032,PJ,q2;var rB=B(()=>{c6();R1();f4();kJ();L0();W7();PJ={name:"keychain",read(){let Z=q0.cache;if(Date.now()-Z.cachedAt<xJ)return Z.data;try{let X=H4(h0),J=O0(),q=G7(`security find-generic-password -a "${J}" -w -s "${X}"`);if(q){let Q=H0(q);return q0.cache={data:Q,cachedAt:Date.now()},Q}}catch(X){}if(Z.data!==null)return E("[keychain] read failed; serving stale cache",{level:"warn"}),q0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return q0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=q0.cache;if(Date.now()-Z.cachedAt<xJ)return Z.data;if(q0.readInFlight)return q0.readInFlight;let X=q0.generation,J=Bk().then((q)=>{if(X===q0.generation){if(q===null&&Z.data!==null)E("[keychain] readAsync failed; serving stale cache",{level:"warn"});let Q=q??Z.data;return q0.cache={data:Q,cachedAt:Date.now()},q0.readInFlight=null,Q}return q});return q0.readInFlight=J,J},update(Z){EJ();try{let X=H4(h0),J=O0(),q=f(Z),Q=Buffer.from(q,"utf-8").toString("hex"),$=`add-generic-password -U -a "${J}" -s "${X}" -X "${Q}"
|
|
102
|
+
`)}return X()}}function Nr(){let Z=wJ(),X=W0();if(!X.projects)return Q4;let J=X.projects[Z]??Q4;if(typeof J.allowedTools==="string")J.allowedTools=C0(J.allowedTools)??[];return J}function kr(Z){let X=wJ(),J=null;try{if(fB(V0(),V1,(Q)=>{let $=Q.projects?.[X]??Q4,Y=Z($);if(Y===$)return Q;return J={...Q,projects:{...Q.projects,[X]:Y}},J})&&J)Y7(J)}catch(q){E(`Failed to save config with lock: ${q}`,{level:"error"});let Q=X6(V0(),V1);if(H7(Q)){E("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),c0("tengu_config_auth_loss_prevented",{});return}let $=Q.projects?.[X]??Q4,Y=Z($);if(Y===$)return;J={...Q,projects:{...Q.projects,[X]:Y}},gB(V0(),J,AJ),Y7(J)}}function rN(){return tN()!==null}function xr(){return rN()&&!e(process.env.FORCE_AUTOUPDATE_PLUGINS)}function Er(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function tN(){if(e(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let Z=RB();if(Z)return{type:"env",envVar:Z};let X=W0();if(X.autoUpdates===!1&&(X.installMethod!=="native"||X.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function Pr(){let Z=W0();if(Z.userID)return Z.userID;let X=uN(32).toString("hex");return A0((J)=>({...J,userID:X})),X}function vr(){if(!W0().firstStartTime){let X=new Date().toISOString();A0((J)=>({...J,firstStartTime:J.firstStartTime??X}))}}function Cr(Z){let X=s1();switch(Z){case"User":return T0(Y0(),"CLAUDE.md");case"Local":return T0(X,"CLAUDE.local.md");case"Project":return T0(X,X7);case"Managed":return T0(F1(),"CLAUDE.md");case"AutoMem":return uV()}return cN.getTeamMemEntrypoint()}function yr(){return T0(F1(),".claudio","rules")}function Sr(){return T0(Y0(),"rules")}function gr(Z){r0.config=Z,r0.mtime=Z?Date.now():0}var cN,_J=!1,Q4,Lr,AJ,lN,nN,bB=!1,Fr,Dr,RJ,r0,x1=null,q4=0,Q7=0,IJ=0,Ir=20,oN=1000,zJ=!1,FJ=!1,wJ,br,hr;var jJ=B(()=>{L1();yQ();j6();aX();l$();t0();SB();R1();G2();MX();d0();y1();h4();R0();R2();d4();S4();_B();u0();v4();VJ();l4();TB();L0();AB();cN=(EB(),$4(xB)),Q4={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},Lr=["off","compact","full"];AJ=V1(),lN=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","lspRecommendationDisabled","lspRecommendationNeverPlugins","lspRecommendationIgnoredCount","copyFullResponse","copyOnSelect","flickerFreeMode","permissionExplainerEnabled","prStatusFooterEnabled","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled"];nN=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"];Fr={...AJ,autoUpdates:!1,knowledgeGraphEnabled:!0},Dr={...Q4};RJ=new Set;r0={config:null,mtime:0};Y4(async()=>{aN()});wJ=u(()=>{let Z=s1(),X=d5(Z);if(X)return v1(X);return v1($7(Z))});br=X6,hr=H7});function U7(Z){return Z.split(/[;,]/).map((X)=>X.trim()).filter((X)=>X.length>0)}function mB(Z){let X=U7(Z);return X.length>0?X[0]:Z.trim()}var NJ=()=>{};import{randomBytes as eN}from"crypto";function J2(Z){return Z?.trim()??""}function I0(Z){let X=J2(Z);return X.length>0?X:void 0}function Zk(Z){return J2(Z).replace(/\/+$/,"")}function Xk(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function Jk(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function qk(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let X={};for(let[J,q]of Object.entries(Z)){let Q=J2(J),$=typeof q==="string"?q.trim():"";if(Q.length>0&&$.length>0)X[Q]=$}return Object.keys(X).length>0?X:void 0}function Qk(Z){if(!Z||typeof Z!=="object")return;let X={},J=I0(Z.codexAuthPath);if(J)X.codexAuthPath=J;let q=I0(Z.codexAccountId);if(q)X.codexAccountId=q;let Q=I0(Z.githubToken);if(Q)X.githubToken=Q;let $=I0(Z.awsRegion);if($)X.awsRegion=$;let Y=I0(Z.gcpProject);if(Y)X.gcpProject=Y;let H=I0(Z.gcpRegion);if(H)X.gcpRegion=H;let K=I0(Z.azureResource);if(K)X.azureResource=K;let W=qk(Z.customHeaders);if(W)X.customHeaders=W;let G=Jk(Z.reasoningEffort);if(G)X.reasoningEffort=G;return Object.keys(X).length>0?X:void 0}function dB(Z){let X=J2(Z.id),J=J2(Z.name),q=Xk(Z.provider),Q=Zk(Z.baseUrl),$=J2(Z.model);if(!X||!J||!Q||q!=="anthropic"&&!$)return null;let H={id:X,name:J,provider:q,baseUrl:Q,model:$,apiKey:I0(Z.apiKey)},K=Qk(Z.extras);if(K)H.extras=K;return H}function $k(Z){let X=new Set,J=[];for(let q of Z??[]){let Q=dB(q);if(!Q||X.has(Q.id))continue;X.add(Q.id),J.push(Q)}return J}function Yk(){return`provider_${eN(6).toString("hex")}`}function cB(Z,X=Yk()){return dB({id:X,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function lB(Z,X=W0()){return X.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function lr(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:uB,model:pB,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"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:uB,model:pB,apiKey:"",requiresApiKey:!1}}}function E1(Z=W0()){return $k(Z.providerProfiles)}function nr(Z=W0()){return E1(Z).length>0}function B1(Z=W0()){let X=E1(Z);if(X.length===0)return;let J=I0(Z.activeProviderProfileId);return X.find((q)=>q.id===J)??X[0]}function ir(Z,X){let J=cB(Z);if(!J)return null;let q=X?.makeActive??!0;if(A0(($)=>{let H=[...E1($),J],K=I0($.activeProviderProfileId),W=q||!K||!H.some((G)=>G.id===K)?J.id:K;return{...$,providerProfiles:H,activeProviderProfileId:W}}),B1()?.id===J.id)Uk(J.id),Kk();return J}function ar(Z,X){let J=cB(X,Z);if(!J)return null;let q=!1;if(A0((Q)=>{let $=E1(Q),Y=$.findIndex((L)=>L.id===Z);if(Y<0)return Q;q=!0;let H=[...$];H[Y]=J;let K={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete K[Z];let W=I0(Q.activeProviderProfileId),G=W&&H.some((L)=>L.id===W)?W:H[0]?.id;return{...Q,providerProfiles:H,activeProviderProfileId:G,openaiAdditionalModelOptionsCacheByProfile:K,openaiAdditionalModelOptionsCache:G===Z?[]:Q.openaiAdditionalModelOptionsCache}}),!q)return null;return J}function or(Z){let X=I0(Z);if(!X)return null;let J=B1();if(!J)return null;if(U7(J.model).includes(X))return J;A0(($)=>{let Y=E1($),H=Y.findIndex((G)=>G.id===J.id);if(H<0)return $;let K=Y[H];if(K.model===X)return $;let W=[...Y];return W[H]={...K,model:X},{...$,providerProfiles:W}});let Q=B1();if(!Q||Q.id!==J.id)return null;return Q}function sr(){let Z=B1();if(!Z)return;A0((X)=>{let J=E1(X),q=J.findIndex((Y)=>Y.id===Z.id);if(q<0)return X;let Q=J[q];if(!Q.model)return X;let $=[...J];return $[q]={...Q,model:""},{...X,providerProfiles:$}})}function Hk(Z){let X=U7(Z.model);if(X.length===0)return[];return X.map((J)=>({value:J,label:J,description:`Provider: ${Z.name}`}))}function Uk(Z){let X=W0(),q=E1(X).find(($)=>$.id===Z);if(!q)return null;let Q=Hk(q);return A0(($)=>({...$,activeProviderProfileId:Z,openaiAdditionalModelOptionsCache:Q.length>0?Q:lB(Z,$),openaiAdditionalModelOptionsCacheByProfile:{...$.openaiAdditionalModelOptionsCacheByProfile??{},[Z]:Q.length>0?Q:$.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}})),q}function rr(Z){let X=!1,J;return A0((q)=>{let Q=E1(q);if(!Q.find((V)=>V.id===Z))return q;X=!0;let Y=Q.filter((V)=>V.id!==Z),H=I0(q.activeProviderProfileId),W=!H||H===Z||!Y.some((V)=>V.id===H)?Y[0]?.id:H;if(W)J=Y.find((V)=>V.id===W)??Y[0];let G={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete G[Z],{...q,providerProfiles:Y,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:G,openaiAdditionalModelOptionsCache:W?lB(W,{...q,openaiAdditionalModelOptionsCacheByProfile:G}):[]}}),{removed:X,activeProfileId:J?.id}}function tr(Z=W0()){let X=B1(Z);if(!X)return Z.openaiAdditionalModelOptionsCache??[];let J=Z.openaiAdditionalModelOptionsCacheByProfile?.[X.id];if(J)return J;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function er(Z){let X=B1();if(!X){A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z}));return}A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...J.openaiAdditionalModelOptionsCacheByProfile??{},[X.id]:Z}}))}function Kk(){let Z=B1();if(!Z){A0((X)=>({...X,openaiAdditionalModelOptionsCache:[]}));return}A0((X)=>{let J={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete J[Z.id],{...X,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:J}})}var uB="http://localhost:11434/v1",pB="llama3.1:8b";var nB=B(()=>{jJ();NJ()});function K7(Z,X){return{name:`${Z.name}-with-${X.name}-fallback`,read(){let J=Z.read();if(J!==null&&J!==void 0)return J;return X.read()||{}},async readAsync(){let J=await Z.readAsync();if(J!==null&&J!==void 0)return J;return await X.readAsync()||{}},update(J){let q=Z.read(),Q=Z.update(J);if(Q.success){if(q===null)X.delete();return Q}let $=X.update(J);if($.success){if(q!==null)Z.delete();return{success:!0,warning:$.warning}}return{success:!1}},delete(){let J=Z.delete(),q=X.delete();return J||q}}}var iB=()=>{};function G7(Z,X,J=10*oB*aB){let W=[];try{let q;if(X===void 0)q={};else if(X instanceof AbortSignal)q={abortSignal:X,timeout:J};else q=X;let{abortSignal:Q,timeout:$=10*oB*aB,input:Y,stdio:H=["ignore","pipe","pipe"]}=q;Q?.throwIfAborted();const K=R6(W,k4`exec: ${Z.slice(0,200)}`,0);try{let _=N0(Z,{env:process.env,maxBuffer:1e6,timeout:$,cwd:s(),stdio:H,shell:!0,reject:!1,input:Y});if(!_.stdout)return null;return _.stdout.trim()||null}catch{return null}}catch(G){var V=G,L=1}finally{M6(W,V,L)}}var aB=1000,oB=60;var kJ=B(()=>{c6();t0();L0()});import{createHash as Gk}from"crypto";import{userInfo as Wk}from"os";function J6(Z=""){let X=Y0(),q=!process.env.CLAUDIO_CONFIG_DIR?"":`-${Gk("sha256").update(X).digest("hex").substring(0,8)}`;return`Claude Code${sB().OAUTH_FILE_SUFFIX}${Z}${q}`}function H4(Z=""){return J6(Z)}function O0(){try{return process.env.USER||Wk().username}catch{return"claude-code-user"}}function EJ(){q0.cache={data:null,cachedAt:0},q0.generation++,q0.readInFlight=null}function Wt(Z){if(q0.cache.cachedAt!==0)return;let X=null;if(Z)try{X=JSON.parse(Z)}catch{return}q0.cache={data:X,cachedAt:Date.now()}}var h0="-credentials",xJ=30000,q0;var W7=B(()=>{HW();d0();q0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function Bk(){try{let Z=H4(h0),X=O0(),{stdout:J,code:q}=await a("security",["find-generic-password","-a",X,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(q===0&&J)return H0(J.trim())}catch(Z){}return null}function Ft(){if(q2!==void 0)return q2;if(process.platform!=="darwin")return q2=!1,!1;try{q2=N0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{q2=!1}return q2}var Vk=4032,PJ,q2;var rB=B(()=>{c6();R1();f4();kJ();L0();W7();PJ={name:"keychain",read(){let Z=q0.cache;if(Date.now()-Z.cachedAt<xJ)return Z.data;try{let X=H4(h0),J=O0(),q=G7(`security find-generic-password -a "${J}" -w -s "${X}"`);if(q){let Q=H0(q);return q0.cache={data:Q,cachedAt:Date.now()},Q}}catch(X){}if(Z.data!==null)return E("[keychain] read failed; serving stale cache",{level:"warn"}),q0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return q0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=q0.cache;if(Date.now()-Z.cachedAt<xJ)return Z.data;if(q0.readInFlight)return q0.readInFlight;let X=q0.generation,J=Bk().then((q)=>{if(X===q0.generation){if(q===null&&Z.data!==null)E("[keychain] readAsync failed; serving stale cache",{level:"warn"});let Q=q??Z.data;return q0.cache={data:Q,cachedAt:Date.now()},q0.readInFlight=null,Q}return q});return q0.readInFlight=J,J},update(Z){EJ();try{let X=H4(h0),J=O0(),q=f(Z),Q=Buffer.from(q,"utf-8").toString("hex"),$=`add-generic-password -U -a "${J}" -s "${X}" -X "${Q}"
|
|
103
103
|
`,Y;if($.length<=Vk)Y=N0("security",["-i"],{input:$,stdio:["pipe","pipe","pipe"],reject:!1});else E(`Keychain payload (${q.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=N0("security",["add-generic-password","-U","-a",J,"-s",X,"-X",Q],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return q0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(X){return{success:!1}}},delete(){EJ();try{let Z=H4(h0),X=O0();return G7(`security delete-generic-password -a "${X}" -s "${Z}"`),!0}catch(Z){return!1}}}});var vJ;var tB=B(()=>{c6();L0();W7();vJ={name:"libsecret",read(){try{let Z=O0(),X=J6(h0),J=N0("secret-tool",["lookup","service",X,"account",Z],{reject:!1});if(J.exitCode===0&&J.stdout)return H0(J.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let X=O0(),J=J6(h0),q=f(Z);return{success:N0("secret-tool",["store","--label",J,"service",J,"account",X],{input:q,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=O0(),X=J6(h0);return N0("secret-tool",["clear","service",X,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as Lk}from"path";function U4(Z){return Z.replace(/'/g,"''")}function V7(){return J6(h0)}function eB(){return`${V7()}:${O0()}`}function CJ(){let Z=V7().replace(/[^a-zA-Z0-9._-]/g,"_");return Lk(Y0(),`${Z}.secure.dpapi`)}function K4(Z,X){try{return N0("powershell.exe",["-Command",Z],{input:X?.input,reject:!1})}catch{return null}}function _k(Z,X){let J=Z?.stderr?.trim();if(J)return J;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${X} (exit code ${Z.exitCode}).`;return X}function ZL(){let Z=V7().replace(/"/g,'`"'),X=O0().replace(/"/g,'`"'),J=`
|
|
104
104
|
Add-Type -AssemblyName System.Runtime.WindowsRuntime
|
|
105
105
|
try {
|
|
@@ -185,8 +185,8 @@ You can manually restore it by running: cp "${L}" "${Z}"
|
|
|
185
185
|
`,Y=K4($);return(J?.exitCode??1)===0}}});import{chmodSync as zk}from"fs";import{join as Rk}from"path";function B7(){let Z=Y0(),X=".credentials.json";return{storageDir:Z,storagePath:Rk(Z,".credentials.json")}}var G4;var qL=B(()=>{d0();y1();R0();L0();G4={name:"plaintext",read(){let{storagePath:Z}=B7();try{let X=k().readFileSync(Z,{encoding:"utf8"});return H0(X)}catch{return null}},async readAsync(){let{storagePath:Z}=B7();try{let X=await k().readFile(Z,{encoding:"utf8"});return H0(X)}catch{return null}},update(Z){try{let{storageDir:X,storagePath:J}=B7();try{k().mkdirSync(X)}catch(q){if(K0(q)!=="EEXIST")throw q}return JL(J,f(Z),{encoding:"utf8",flush:!1}),zk(J,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=B7();try{return k().unlinkSync(Z),!0}catch(X){if(K0(X)==="ENOENT")return!0;return!1}}}});function QL(Z){let X=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return X?K7(PJ,G4):PJ;if(process.platform==="linux")return X?K7(vJ,G4):vJ;if(process.platform==="win32")return X?K7(yJ,G4):yJ;return X?G4:Mk}var Mk;var $L=B(()=>{iB();rB();tB();XL();qL();Mk={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 SJ(Z=process.env){return S(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function it(Z=process.env){let X=S(Z.CODEX_OAUTH_CALLBACK_PORT);if(!X)return 1455;let J=Number.parseInt(X,10);if(Number.isInteger(J)&&J>=0&&J<=65535)return J;return 1455}function bJ(Z){let X=Z.split(".");if(X.length<2)return;try{let J=X[1].replace(/-/g,"+").replace(/_/g,"/"),q=J+"=".repeat((4-J.length%4)%4),Q=Buffer.from(q,"base64").toString("utf8"),$=JSON.parse(Q);return $&&typeof $==="object"?$:void 0}catch{return}}function g0(Z){if(!Z)return;let X=bJ(Z),J=X?.["https://api.openai.com/auth"]&&typeof X["https://api.openai.com/auth"]==="object"?X["https://api.openai.com/auth"]:void 0;return S(J?.chatgpt_account_id??X?.["https://api.openai.com/auth.chatgpt_account_id"]??X?.chatgpt_account_id)??void 0}function at(Z){return Z.replace(/[&<>"']/g,(X)=>{switch(X){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"'":return"'";default:return X}})}async function HL(Z){let X=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:SJ(),requested_token:"openai-api-key",subject_token:Z,subject_token_type:"urn:ietf:params:oauth:token-type:id_token"}),J=await fetch("https://auth.openai.com/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:X,signal:AbortSignal.timeout(15000)});if(!J.ok){let $=await J.text().catch(()=>"");throw Error($.trim()?`Codex API key exchange failed (${J.status}): ${$.trim()}`:`Codex API key exchange failed with status ${J.status}.`)}let q=await J.json(),Q=S(q.access_token);if(!Q)throw Error("Codex API key exchange completed, but no API key token was returned.");return Q}var ct="https://auth.openai.com",YL="https://auth.openai.com/oauth/token",lt="openid profile email offline_access api.connectors.read api.connectors.invoke",nt="codex_cli_rs";var hJ=()=>{};function z7(){return QL({allowPlainTextFallback:!1})}function UL(Z){if(!Z)return;let J=bJ(Z)?.exp;if(typeof J==="number"&&Number.isFinite(J))return J*1000;return}function V4(Z){if(!Z||typeof Z!=="object")return;let X=Z,J=S(X.apiKey),q=S(X.accessToken);if(!q)return;let Q=S(X.refreshToken),$=S(X.idToken),Y=S(X.accountId)??g0($)??g0(q),H=S(X.profileId),K=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:J,accessToken:q,refreshToken:Q,idToken:$,accountId:Y,profileId:H,lastRefreshAt:K,lastRefreshFailureAt:W}}function Tk(Z){let X=UL(Z.accessToken)??UL(Z.idToken);if(X===void 0)return!1;return X<=Date.now()+Fk}function KL(Z,X=Date.now()){let J=Math.max(Z.lastRefreshFailureAt??0,_7??0);if(!J)return!1;return X-J<Dk}function Ak(Z,X){if(!X.trim())return`Codex token refresh failed with status ${Z}.`;try{let J=JSON.parse(X),q=J.error&&typeof J.error==="object"?J.error:void 0,Q=S(q?.code??J.code),$=S(q?.message??J.error_description)??X.trim();return Q?`Codex token refresh failed (${Q}): ${$}`:`Codex token refresh failed with status ${Z}: ${$}`}catch{return`Codex token refresh failed with status ${Z}: ${X.trim()}`}}function GL(){if(Q2())return;try{let Z=z7().read();return V4(Z?.codex)}catch{return}}async function Ik(){if(Q2())return;try{let Z=await z7().readAsync();return V4(Z?.codex)}catch{return}}function WL(Z,X=Date.now()){return KL(Z,X)}function VL(Z){if(Q2())return{success:!1,warning:"Bare mode: secure storage is disabled."};let X=V4(Z);if(!X)return{success:!1,warning:"Codex credentials are incomplete."};let J=z7(),q=J.read()||{},Q=V4(q[L7]),$={...q,[L7]:{...X,profileId:X.profileId??Q?.profileId,lastRefreshAt:X.lastRefreshAt??Date.now()}},Y=J.update($);if(Y.success)_7=V4($[L7])?.lastRefreshFailureAt??null;return Y}function Ok(Z,X){if(!VL({...Z,lastRefreshFailureAt:X}).success)_7=X}function Ze(){if(Q2())return{success:!0};let Z=z7(),J={...Z.read()||{}};delete J[L7];let q=Z.update(J);if(q.success)_7=null;return q}async function Xe(Z){if(Q2())return{refreshed:!1};if(B4()?.apiKey?.trim())return{refreshed:!1};let X=await Ik();if(!X)return{refreshed:!1};if(!X.refreshToken)return{refreshed:!1,credentials:X};if(!Z?.force&&!Tk(X))return{refreshed:!1,credentials:X};if(!Z?.force&&KL(X))return{refreshed:!1,credentials:X};if(W4)return W4;return W4=(async()=>{let J=Date.now();try{let q=new URLSearchParams({client_id:SJ(),grant_type:"refresh_token",refresh_token:X.refreshToken}),Q=await fetch(YL,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:q,signal:AbortSignal.timeout(15000)});if(!Q.ok){let G=await Q.text().catch(()=>"");throw Error(Ak(Q.status,G))}let $=await Q.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:g0($.id_token)??g0($.access_token)??X.accountId,lastRefreshAt:Date.now()},K=H.idToken??X.idToken;if(K)H.apiKey=await HL(K).catch(()=>{return});let W=VL(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 Ok(X,J),q}finally{W4=null}})(),W4}var L7="codex",Fk=60000,Dk=60000,W4=null,_7=null;var BL=B(()=>{q6();d0();$L();hJ()});import{existsSync as wk,readFileSync as jk}from"node:fs";import{isIP as Nk}from"node:net";import{homedir as kk}from"node:os";import{join as LL}from"node:path";function vk(Z){let X=Z.split(".").map((J)=>Number.parseInt(J,10));if(X.length!==4||X.some((J)=>Number.isNaN(J)))return!1;return X[0]===10||X[0]===172&&X[1]>=16&&X[1]<=31||X[0]===192&&X[1]===168}function Ck(Z){let X=Z.split(":",1)[0];if(!X)return!1;let J=Number.parseInt(X,16);if(Number.isNaN(J))return!1;return(J&65024)===64512||(J&65472)===65152}function mJ(Z){if(!Z)return;let X=Z.trim();if(!X)return;if(X==="undefined")return;return X}function gJ(Z,X){for(let J of X){let q=Z,Q=!0;for(let Y of J){if(!q||typeof q!=="object"||!(Y in q)){Q=!1;break}q=q[Y]}if(!Q)continue;let $=S(q);if($)return $}return}function yk(Z){if(!Z)return;let X=Z.trim().toLowerCase();if(X==="low"||X==="medium"||X==="high"||X==="xhigh")return X;return}function _L(Z){let X=Z.trim(),J=X.indexOf("?");if(J===-1){let W=X.toLowerCase(),G=M7[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,J).trim(),Q=new URLSearchParams(X.slice(J+1)),$=q.toLowerCase(),Y=M7[$],H=Y?.model??q,K=yk(Q.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:X,baseModel:H,reasoning:typeof K==="string"?{effort:K}:K}}function DL(Z){let X=Z.trim().toLowerCase();return(X.split("?",1)[0]??X)in M7}function uJ(Z){let X=Z.trim().toLowerCase(),J=X.split("?",1)[0]??X;return Ek.has(J)}function TL(Z){return uJ(Z)}function Sk(Z,X){let J=mJ(X);return fk(J)||!J&&DL(Z)}function bk(Z){let X=Z.trim().toLowerCase();if(X.includes("codex"))return!0;let J=/^gpt-(\d+)/.exec(X);if(!J)return!1;if(Number(J[1])<5)return!1;if(X.startsWith("gpt-5-mini"))return!1;return!0}function AL(Z){if(!Z)return!1;try{let X=new URL(Z).hostname.toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);let J=X.indexOf("%25");if(J!==-1)X=X.slice(0,J);if(Pk.has(X)||X==="0.0.0.0")return!0;if(X.endsWith(".local"))return!0;let q=Nk(X);if(q===4)return Number.parseInt(X.split(".",1)[0]??"",10)===127||vk(X);if(q===6)return Ck(X);return!1}catch{return!1}}function R7(Z){return Z.replace(/\/+$/,"")}function hk(Z){let X=R7(Z);if(!X||X==="/")return"/v1";if(X.toLowerCase().endsWith("/v1"))return X;return`${X}/v1`}function gk(Z){try{let X=new URL(Z),J=X.hostname.toLowerCase(),q=X.pathname.toLowerCase();if(X.port==="11434")return!0;return J.includes("ollama")||q.includes("ollama")}catch{return!1}}function Ke(Z){if(!AL(Z))return[];try{let X=new URL(Z),J=R7(X.toString()),q=new Set([J]),Q=[],$=(K,W)=>{let G=new URL(X.toString());G.hostname=K,G.pathname=W,G.search="",G.hash="";let V=R7(G.toString());if(q.has(V))return;q.add(V),Q.push(V)},Y=hk(X.pathname);if(Y!==R7(X.pathname))$(X.hostname,Y);let H=X.hostname.toLowerCase().replace(/^\[|\]$/g,"");if(H==="localhost"||H==="::1")$("127.0.0.1",X.pathname||"/"),$("127.0.0.1",Y);return Q}catch{return[]}}function Ge(Z){if(!Z.hasTools)return!1;if(!AL(Z.baseUrl))return!1;return gk(Z.baseUrl)}function fk(Z){if(!Z)return!1;try{let X=new URL(Z);return X.hostname==="chatgpt.com"&&X.pathname.replace(/\/+$/,"")==="/backend-api/codex"}catch{return!1}}function mk(Z){let X=Z.split("?",1)[0]??Z,J=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!J||J.toLowerCase()==="copilot")return FL;let q=J.indexOf("/");if(q!==-1)return J.slice(q+1);return J}function zL(Z){let X=Z.split("?",1)[0]??Z,J=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!J||J.toLowerCase()==="copilot")return FL;return J}function ML(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 IL(Z){let X=null;try{let{tryGetActiveProvider:h}=(q6(),$4(L4));X=h()}catch{X=null}let q=X?.transport==="github_copilot",Q=X?.model?.trim(),$=mJ(X?.baseUrl),Y=Z?.model?.trim()||Q||Z?.fallbackModel?.trim()||(q?"github:copilot":"gpt-4o"),H=_L(Y),K=mJ(Z?.baseUrl),W=K??$,V=q&&DL(Y)&&W&&ML(W)==="custom"?void 0:W,L=K??V,_=Q??"",D=uJ(_)?_L(_).baseModel:null,M=Boolean(Z?.model)&&Boolean(D)&&H.baseModel===D,F=uJ(Y)||M,R=!q&&F&&!(L&&L!==fJ)?xk:L,w=q?ML(L):"custom",A=q&&w==="copilot",I=q&&w==="models",T=q&&w==="custom",b=q?zL(Y):Y,j=Sk(Y,R)||A&&bk(b)?"codex_responses":"chat_completions",x=A?mk(H.baseModel):I||T?zL(H.baseModel):H.baseModel,v=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(X?.extras?.reasoningEffort?{effort:X.extras.reasoningEffort}:void 0);return{transport:j,requestedModel:Y,resolvedModel:x,baseUrl:(R??(A&&j==="codex_responses"?RL:q?RL:fJ)).replace(/\/+$/,""),reasoning:v}}function We(){let Z=null;try{let{tryGetActiveProvider:q}=(q6(),$4(L4));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 J=IL();if(J.transport!=="chat_completions")return null;return`openai:${J.baseUrl.toLowerCase()}`}function Ve(){let Z=IL();if(Z.transport!=="chat_completions")return!1;let X=Z.baseUrl.toLowerCase();return X.includes("api.openai.com")||X===fJ}function OL(Z=process.env){let X=pJ();if(X)return X;let J=S(Z.CODEX_AUTH_JSON_PATH);if(J)return J;let q=S(Z.CODEX_HOME);if(q)return LL(q,"auth.json");return LL(kk(),".codex","auth.json")}function pJ(){try{let{tryGetActiveProvider:Z}=(q6(),$4(L4));return S(Z()?.extras?.codexAuthPath)}catch{return}}function dJ(){try{let{tryGetActiveProvider:Z}=(q6(),$4(L4));return S(Z()?.extras?.codexAccountId)}catch{return}}function wL(Z){if(!wk(Z))return;try{let X=jk(Z,"utf8"),J=JSON.parse(X);return J&&typeof J==="object"?J:void 0}catch{return}}function jL(Z){let{authJson:X,authPath:J,envAccountId:q}=Z;if(!X)return{apiKey:"",authPath:J,source:Z.missingSource??"none"};let Q=gJ(X,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),$=gJ(X,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=q??gJ(X,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??g0(Q)??g0($);if(!Q)return{apiKey:"",accountId:Y,authPath:J,source:Z.missingSource??"none"};return{apiKey:Q,accountId:Y,authPath:J,source:"auth.json"}}function NL(Z){let{storedCredentials:X,envAccountId:J}=Z;return{apiKey:X.apiKey??X.accessToken,accountId:J??X.accountId??g0(X.idToken)??g0(X.accessToken),source:"secure-storage"}}function F7(Z,X){let J=S(Z.CODEX_API_KEY),Q=dJ()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID);if(J)return{apiKey:J,accountId:Q??g0(J),source:"env"};let $=pJ();if(!Boolean($??S(Z.CODEX_AUTH_JSON_PATH)??S(Z.CODEX_HOME))&&X?.explicitAuthPathOnly)return{apiKey:"",accountId:Q,source:"none"};let H=OL(Z),K=wL(H);return jL({authJson:K,authPath:H,envAccountId:Q})}function Be(Z){let X=Z?.env??process.env,J=F7(X,{explicitAuthPathOnly:!0}),q=Boolean(pJ()??S(X.CODEX_AUTH_JSON_PATH)??S(X.CODEX_HOME)),Q=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(q||J.source==="env"||J.source==="auth.json")return J;if(Z?.storedCredentials?.accessToken)return NL({storedCredentials:Z.storedCredentials,envAccountId:dJ()??S(X.CODEX_ACCOUNT_ID)??S(X.CHATGPT_ACCOUNT_ID)});if(Q)return F7(X);return uk(X)}function uk(Z=process.env){let X=dJ()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID),J=F7(Z,{explicitAuthPathOnly:!0});if(J.source==="env"||J.source==="auth.json"||J.authPath)return J;let q=GL();if(q?.accessToken){let Q=NL({storedCredentials:q,envAccountId:X});if(!(!Q.accountId||WL(q)))return Q;let Y=OL(Z),H=wL(Y),K=jL({authJson:H,authPath:Y,envAccountId:X});if(K.apiKey)return{...K,accountId:K.accountId??Q.accountId};return Q}return F7(Z)}function pk(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;return M7[q]?.reasoningEffort}function Le(Z){let X=Z.trim().toLowerCase(),J=X.split("?",1)[0]??X;if(J==="gpt-5.3-codex-spark"||J==="codexspark")return!1;if(pk(J)!==void 0)return!0;return/^gpt-5(?:[.-]|$)/.test(J)}var fJ="https://api.openai.com/v1",xk="https://chatgpt.com/backend-api/codex",FL="gpt-4o",M7,Ek,Pk,RL="https://api.githubcopilot.com";var kL=B(()=>{BL();hJ();M7={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"}},Ek=new Set(["codexplan","codexspark"]),Pk=new Set(["localhost","127.0.0.1","::1"])});var L4={};y7(L4,{tryGetActiveProvider:()=>B4,invalidateActiveProviderCache:()=>nk,getActiveProvider:()=>EL,_peekActiveProviderCacheForTesting:()=>ik,ActiveProviderNotConfiguredError:()=>D7});function dk(){if(xL)return;xL=!0,hB(()=>{Q6=null})}function ck(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(TL(X))return"codex_responses";return"openai_compat"}}}function lk(Z){let X=mB(Z.model);return{transport:ck(Z,X),baseUrl:Z.baseUrl,model:X,apiKey:Z.apiKey,extras:Z.extras}}function EL(){if(dk(),Q6)return Q6;let Z=B1(W0());if(!Z)throw new D7;return Q6=lk(Z),Q6}function B4(){try{return EL()}catch(Z){if(Z instanceof D7)return null;throw Z}}function nk(){Q6=null}function ik(){return Q6}var D7,Q6=null,xL=!1;var q6=B(()=>{jJ();nB();NJ();kL();D7=class D7 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function ak(Z){return Z.sort((X,J)=>{let q=J.modified.getTime()-X.modified.getTime();if(q!==0)return q;return J.created.getTime()-X.created.getTime()})}var PL=()=>{};import o from"node:path";import vL from"node:os";import cJ from"node:process";function nJ(Z,{suffix:X="nodejs"}={}){if(typeof Z!=="string")throw TypeError(`Expected a string, got ${typeof Z}`);if(X)Z+=`-${X}`;if(cJ.platform==="darwin")return ok(Z);if(cJ.platform==="win32")return sk(Z);return rk(Z)}var P1,lJ,$2,ok=(Z)=>{let X=o.join(P1,"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(lJ,Z)}},sk=(Z)=>{let X=$2.APPDATA||o.join(P1,"AppData","Roaming"),J=$2.LOCALAPPDATA||o.join(P1,"AppData","Local");return{data:o.join(J,Z,"Data"),config:o.join(X,Z,"Config"),cache:o.join(J,Z,"Cache"),log:o.join(J,Z,"Log"),temp:o.join(lJ,Z)}},rk=(Z)=>{let X=o.basename(P1);return{data:o.join($2.XDG_DATA_HOME||o.join(P1,".local","share"),Z),config:o.join($2.XDG_CONFIG_HOME||o.join(P1,".config"),Z),cache:o.join($2.XDG_CACHE_HOME||o.join(P1,".cache"),Z),log:o.join($2.XDG_STATE_HOME||o.join(P1,".local","state"),Z),temp:o.join(lJ,X,Z)}};var CL=B(()=>{P1=vL.homedir(),lJ=vL.tmpdir(),{env:$2}=cJ});import{join as T7}from"path";function bL(Z){let X=Z.replace(/[^a-zA-Z0-9]/g,"-");if(X.length<=yL)return X;return`${X.slice(0,yL)}-${Math.abs(SL(Z)).toString(36)}`}function I7(Z){return bL(Z)}var A7,yL=200,ek;var hL=B(()=>{CL();R0();tk();A7=nJ("claude-cli");ek={baseLogs:()=>T7(A7.cache,I7(k().cwd())),errors:()=>T7(A7.cache,I7(k().cwd()),"errors"),messages:()=>T7(A7.cache,I7(k().cwd()),"messages"),mcpLogs:(Z)=>T7(A7.cache,I7(k().cwd()),`mcp-logs-${bL(Z)}`)}});function fL(Z){return Z.replace(gL,"").trim()||Z}function mL(Z){return Z.replace(gL,"").trim()}function Ee(Z){return Z.replace(Zx,"").trim()}var gL,Zx;var uL=B(()=>{gL=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;Zx=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});function pe(Z,X){let J=Z.firstPrompt?.startsWith(`<${lL}>`),q=Z.firstPrompt?mL(Z.firstPrompt):"",Q=q&&!J,$=Z.agentName||Z.customTitle||Z.summary||(Q?q:void 0)||X||(J?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return fL($).trim()}function de(Z){return Z.toISOString().replace(/[:.]/g,"-")}function qx(Z){if(O7.length>=Jx)O7.shift();O7.push(Z)}function ce(Z){if(f0!==null)return;if(f0=Z,Y2.length>0){let X=[...Y2];Y2.length=0;for(let J of X)switch(J.type){case"error":f0.logError(J.error);break;case"mcpError":f0.logMCPError(J.serverName,J.error);break;case"mcpDebug":f0.logMCPDebug(J.serverName,J.message);break}}}function m(Z){let X=cL(Z);try{let J=B4()?.transport;if(J==="bedrock"||J==="vertex"||J==="foundry"||process.env.DISABLE_ERROR_REPORTING||zB())return;let Q={error:X.stack||X.message,timestamp:new Date().toISOString()};if(qx(Q),f0===null){Y2.push({type:"error",error:X});return}f0.logError(X)}catch{}}function ne(){return[...O7]}function ie(Z,X){try{if(f0===null){Y2.push({type:"mcpError",serverName:Z,error:X});return}f0.logMCPError(Z,X)}catch{}}function ae(Z,X){try{if(f0===null){Y2.push({type:"mcpDebug",serverName:Z,message:X});return}f0.logMCPDebug(Z,X)}catch{}}function oe(Z,X){if(!X||!X.startsWith("repl_main_thread"))return;let{messages:J,...q}=Z;pL(q),dL(null)}var Jx=100,O7,Y2,f0=null,le;var u0=B(()=>{L1();j6();q6();Xx();PL();hL();uL();y1();VJ();L0();O7=[];Y2=[];le=u(()=>{return process.argv.includes("--hard-fail")})});import nL from"node:path";function $x(Z){return Z.includes(nL.sep)||Z.includes("/")||nL.isAbsolute(Z)}function Yx(Z){let X=Z.trim();if(!X)return"Unsafe executable: empty command";if(_4.test(X))return"Unsafe executable: control characters are not allowed";if(!$x(X)&&!Qx.test(X))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function Hx(Z){for(let X of Z)if(_4.test(X))return"Unsafe argument: control characters are not allowed";return null}function Ux(Z){if(!Z)return null;if(_4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function Kx(Z){if(!Z)return{};for(let[X,J]of Object.entries(Z)){if(_4.test(X))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof J==="string"&&_4.test(J))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function Gx(Z,X){if(typeof Z.signal==="string")return Z.signal;return String(X)}function a(Z,X,J={timeout:10*aJ*iJ,preserveOutputOnError:!0,useCwd:!0}){return V3(Z,X,{abortSignal:J.abortSignal,timeout:J.timeout,preserveOutputOnError:J.preserveOutputOnError,cwd:J.useCwd?s():void 0,env:J.env,stdin:J.stdin,input:J.input})}function V3(Z,X,{abortSignal:J,timeout:q=10*aJ*iJ,preserveOutputOnError:Q=!0,cwd:$,env:Y,maxBuffer:H=iL,stdin:K,input:W}={timeout:10*aJ*iJ,preserveOutputOnError:!0,maxBuffer:iL}){let G=Yx(Z);if(G)return Promise.resolve({stdout:"",stderr:"",code:1,error:G});let V=Hx(X);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=Ux($);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let _=Kx(Y);if(_.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:_.error});return new Promise((z)=>{let D=W!==void 0?"pipe":K??"pipe",M=aL.spawn(Z,X,{cwd:$,env:_.value,shell:!1,signal:J,stdio:[D,"pipe","pipe"]}),F=!1,N="",R="",w=0,A,I=!1,T=(x)=>{if(F)return;F=!0,z(x)},b=(x,v)=>{let h=typeof x==="string"?x:x.toString("utf8");if(w+=Buffer.byteLength(h,"utf8"),w>H){M.kill(),T({stdout:Q?N:"",stderr:Q?R:"",code:1,error:"maxBuffer exceeded"});return}if(v==="stdout")N+=h;else R+=h};M.stdout?.on("data",(x)=>b(x,"stdout")),M.stderr?.on("data",(x)=>b(x,"stderr")),M.once("spawn",()=>{if(D==="pipe"&&M.stdin)if(W!==void 0)M.stdin.end(W);else M.stdin.end()}),M.once("error",(x)=>{m(x),T({stdout:"",stderr:"",code:1,error:x.message})});let j=q>0?setTimeout(()=>{I=!0,M.kill()},q):void 0;M.once("close",(x,v)=>{if(j)clearTimeout(j);A=v??void 0;let h=x??1;if(I){T({stdout:Q?N:"",stderr:Q?R:"",code:h,error:`Command timed out after ${q}ms`});return}if(h!==0){if(Q)T({stdout:N,stderr:R,code:h,error:Gx({signal:A},h)});else T({stdout:"",stderr:"",code:h});return}T({stdout:N,stderr:R,code:0})})})}var aL,iJ=1000,aJ=60,iL=1e6,_4,Qx;var f4=B(()=>{t0();u0();kJ();aL=FH(n7(),1),_4=/[\0\r\n]/,Qx=/^[A-Za-z0-9_.-]+$/});import{readFile as Wx}from"fs/promises";import{join as Vx}from"path";async function z4(Z,X,J,q){try{let Q=await Wx(Vx(Z,"config"),"utf-8");return Bx(Q,X,J,q)}catch{return null}}function Bx(Z,X,J,q){let Q=Z.split(`
|
|
186
186
|
`),$=X.toLowerCase(),Y=q.toLowerCase(),H=!1;for(let K of Q){let W=K.trim();if(W.length===0||W[0]==="#"||W[0]===";")continue;if(W[0]==="["){H=Rx(W,$,J);continue}if(!H)continue;let G=Lx(W);if(G&&G.key.toLowerCase()===Y)return G.value}return null}function Lx(Z){let X=0;while(X<Z.length&&Mx(Z[X]))X++;if(X===0)return null;let J=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=_x(Z,X);return{key:J,value:q}}function _x(Z,X){let J="",q=!1,Q=X;while(Q<Z.length){let $=Z[Q];if(!q&&($==="#"||$===";"))break;if($==='"'){q=!q,Q++;continue}if($==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(q){switch(Y){case"n":J+=`
|
|
187
187
|
`;break;case"t":J+="\t";break;case"b":J+="\b";break;case'"':J+='"';break;case"\\":J+="\\";break;default:J+=Y;break}Q+=2;continue}if(Y==="\\"){J+="\\",Q+=2;continue}}J+=$,Q++}if(!q)J=zx(J);return J}function zx(Z){let X=Z.length;while(X>0&&(Z[X-1]===" "||Z[X-1]==="\t"))X--;return Z.slice(0,X)}function Rx(Z,X,J){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(J===null)return q<Z.length&&Z[q]==="]";while(q<Z.length&&(Z[q]===" "||Z[q]==="\t"))q++;if(q>=Z.length||Z[q]!=='"')return!1;q++;let $="";while(q<Z.length&&Z[q]!=='"'){if(Z[q]==="\\"&&q+1<Z.length){let Y=Z[q+1];if(Y==="\\"||Y==='"'){$+=Y,q+=2;continue}$+=Y,q+=2;continue}$+=Z[q],q++}if(q>=Z.length||Z[q]!=='"')return!1;if(q++,q>=Z.length||Z[q]!=="]")return!1;return $===J}function Mx(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var oL=()=>{};import{unwatchFile as sL,watchFile as Fx}from"fs";import{readdir as Dx,readFile as $6,stat as eL}from"fs/promises";import{join as E0,resolve as w7}from"path";function B00(){H2.clear()}async function m0(Z){let X=w7(Z??s()),J=H2.get(X);if(J!==void 0)return J;let q=K2(X);if(!q)return H2.set(X,null),null;let Q=E0(q,".git");try{if((await eL(Q)).isFile()){let Y=(await $6(Q,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),K=w7(q,H);return H2.set(X,K),K}}return H2.set(X,Q),Q}catch{return H2.set(X,null),null}}function j7(Z){if(!Z||Z.startsWith("-")||Z.startsWith("/"))return!1;if(Z.includes(".."))return!1;if(Z.split("/").some((X)=>X==="."||X===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(Z))return!1;return!0}function oJ(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function R4(Z){try{let X=(await $6(E0(Z,"HEAD"),"utf-8")).trim();if(X.startsWith("ref:")){let J=X.slice(4).trim();if(J.startsWith("refs/heads/")){let Q=J.slice(11);if(!j7(Q))return null;return{type:"branch",name:Q}}if(!j7(J))return null;let q=await U2(Z,J);return q?{type:"detached",sha:q}:{type:"detached",sha:""}}if(!oJ(X))return null;return{type:"detached",sha:X}}catch{return null}}async function U2(Z,X){let J=await rL(Z,X);if(J)return J;let q=await Y6(Z);if(q&&q!==Z)return rL(q,X);return null}async function rL(Z,X){try{let J=(await $6(E0(Z,X),"utf-8")).trim();if(J.startsWith("ref:")){let q=J.slice(4).trim();if(!j7(q))return null;return U2(Z,q)}if(!oJ(J))return null;return J}catch{}try{let J=await $6(E0(Z,"packed-refs"),"utf-8");for(let q of J.split(`
|
|
188
|
-
`)){if(q.startsWith("#")||q.startsWith("^"))continue;let Q=q.indexOf(" ");if(Q===-1)continue;if(q.slice(Q+1)===X){let $=q.slice(0,Q);return oJ($)?$:null}}}catch{}return null}async function Y6(Z){try{let X=(await $6(E0(Z,"commondir"),"utf-8")).trim();return w7(Z,X)}catch{return null}}async function Tx(Z,X,J){try{let q=(await $6(E0(Z,X),"utf-8")).trim();if(q.startsWith("ref:")){let Q=q.slice(4).trim();if(Q.startsWith(J)){let $=Q.slice(J.length);if(!j7($))return null;return $}}}catch{}return null}class Z_{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 m0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await Y6(this.gitDir),this.watchPath(E0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(E0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),Y4(async()=>{this.stopWatching()})}watchPath(Z,X){this.watchedPaths.push(Z),Fx(Z,{interval:Ax},X)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await R4(this.gitDir),X=this.commonDir??this.gitDir,J=Z?.type==="branch"?E0(X,"refs","heads",Z.name):null;if(J===this.branchRefPath)return;if(this.branchRefPath)sL(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((q)=>q!==this.branchRefPath);if(this.branchRefPath=J,!J)return;this.watchPath(J,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await tL(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)sL(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,X){await this.ensureStarted();let J=this.cache.get(Z);if(J&&!J.dirty)return J.value;if(J)J.dirty=!1;let q=await X(),Q=this.cache.get(Z);if(Q&&!Q.dirty)Q.value=q;if(!Q)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 Ix(){let Z=await m0();if(!Z)return"HEAD";let X=await R4(Z);if(!X)return"HEAD";return X.type==="branch"?X.name:"HEAD"}async function Ox(){let Z=await m0();if(!Z)return"";let X=await R4(Z);if(!X)return"";if(X.type==="branch")return await U2(Z,`refs/heads/${X.name}`)??"";return X.sha}async function wx(){let Z=await m0();if(!Z)return null;let X=await z4(Z,"remote","origin","url");if(X)return X;let J=await Y6(Z);if(J&&J!==Z)return z4(J,"remote","origin","url");return null}async function jx(){let Z=await m0();if(!Z)return"main";let X=await Y6(Z)??Z,J=await Tx(X,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(J)return J;for(let q of["main","master"])if(await U2(X,`refs/remotes/origin/${q}`))return q;return"main"}function X_(){return N7.get("branch",Ix)}function J_(){return N7.get("head",Ox)}function q_(){return N7.get("remoteUrl",wx)}function Q_(){return N7.get("defaultBranch",jx)}async function L00(Z){let X=await m0(Z);if(!X)return null;let J=await R4(X);if(!J)return null;if(J.type==="branch")return U2(X,`refs/heads/${J.name}`);return J.sha}async function _00(Z){let X;try{let q=(await $6(E0(Z,".git"),"utf-8")).trim();if(!q.startsWith("gitdir:"))return null;X=w7(Z,q.slice(7).trim())}catch{return null}let J=await R4(X);if(!J)return null;if(J.type==="branch")return U2(X,`refs/heads/${J.name}`);return J.sha}async function z00(Z){let X=await m0(Z);if(!X)return null;let J=await z4(X,"remote","origin","url");if(J)return J;let q=await Y6(X);if(q&&q!==X)return z4(q,"remote","origin","url");return null}async function $_(){let Z=await m0();if(!Z)return!1;let X=await Y6(Z)??Z;try{return await eL(E0(X,"shallow")),!0}catch{return!1}}async function Y_(){try{let Z=await m0();if(!Z)return 0;let X=await Y6(Z)??Z;return(await Dx(E0(X,"worktrees"))).length+1}catch{return 1}}var H2,Ax=1000,N7;var H_=B(()=>{j6();SB();t0();R2();oL();H2=new Map;N7=new Z_});import{createHash as Nx}from"crypto";import{readFileSync as sJ,realpathSync as U_,statSync as K_}from"fs";import{open as kx,readFile as xx,realpath as G_,stat as Ex}from"fs/promises";import{basename as Px,dirname as rJ,join as P0,resolve as x7,sep as W_}from"path";function vx(){function Z(X){let J=V_(X);return J===R_?null:J}return Z.cache=V_.cache,Z}function Cx(){function Z(X){let J=K2(X);if(!J)return null;return B_(J)}return Z.cache=B_.cache,Z}function C00(Z){return m0(Z)}async function y00(){let Z=s(),X=K2(Z);if(!X)return!1;try{let[J,q]=await Promise.all([G_(Z),G_(X)]);return J===q}catch{return Z===X}}function hx(Z){let X=Z.trim();if(!X)return null;let J=X.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(J&&J[1]&&J[2])return`${J[1]}/${J[2]}`.toLowerCase();let q=X.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(q&&q[1]&&q[2]){let Q=q[1],$=q[2];if(lx(Q)&&$.startsWith("git/")){let Y=$.slice(4),H=Y.split("/");if(H.length>=3&&H[0].includes("."))return Y.toLowerCase();return`github.com/${Y}`.toLowerCase()}return`${Q}/${$}`.toLowerCase()}return null}async function b00(){let Z=await tJ();if(!Z)return null;let X=hx(Z);if(!X)return null;return Nx("sha256").update(X).digest("hex").substring(0,16)}async function u00(){try{let[Z,X,J,q,Q,$]=await Promise.all([Sx(),bx(),tJ(),gx(),fx(),ux()]);return{commitHash:Z,branchName:X,remoteUrl:J,isHeadOnRemote:q,isClean:Q,worktreeCount:$}}catch(Z){return null}}async function p00(){let{parseGitRemote:Z}=await import("./detectRepository-0.1.
|
|
188
|
+
`)){if(q.startsWith("#")||q.startsWith("^"))continue;let Q=q.indexOf(" ");if(Q===-1)continue;if(q.slice(Q+1)===X){let $=q.slice(0,Q);return oJ($)?$:null}}}catch{}return null}async function Y6(Z){try{let X=(await $6(E0(Z,"commondir"),"utf-8")).trim();return w7(Z,X)}catch{return null}}async function Tx(Z,X,J){try{let q=(await $6(E0(Z,X),"utf-8")).trim();if(q.startsWith("ref:")){let Q=q.slice(4).trim();if(Q.startsWith(J)){let $=Q.slice(J.length);if(!j7($))return null;return $}}}catch{}return null}class Z_{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 m0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await Y6(this.gitDir),this.watchPath(E0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(E0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),Y4(async()=>{this.stopWatching()})}watchPath(Z,X){this.watchedPaths.push(Z),Fx(Z,{interval:Ax},X)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await R4(this.gitDir),X=this.commonDir??this.gitDir,J=Z?.type==="branch"?E0(X,"refs","heads",Z.name):null;if(J===this.branchRefPath)return;if(this.branchRefPath)sL(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((q)=>q!==this.branchRefPath);if(this.branchRefPath=J,!J)return;this.watchPath(J,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await tL(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)sL(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,X){await this.ensureStarted();let J=this.cache.get(Z);if(J&&!J.dirty)return J.value;if(J)J.dirty=!1;let q=await X(),Q=this.cache.get(Z);if(Q&&!Q.dirty)Q.value=q;if(!Q)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 Ix(){let Z=await m0();if(!Z)return"HEAD";let X=await R4(Z);if(!X)return"HEAD";return X.type==="branch"?X.name:"HEAD"}async function Ox(){let Z=await m0();if(!Z)return"";let X=await R4(Z);if(!X)return"";if(X.type==="branch")return await U2(Z,`refs/heads/${X.name}`)??"";return X.sha}async function wx(){let Z=await m0();if(!Z)return null;let X=await z4(Z,"remote","origin","url");if(X)return X;let J=await Y6(Z);if(J&&J!==Z)return z4(J,"remote","origin","url");return null}async function jx(){let Z=await m0();if(!Z)return"main";let X=await Y6(Z)??Z,J=await Tx(X,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(J)return J;for(let q of["main","master"])if(await U2(X,`refs/remotes/origin/${q}`))return q;return"main"}function X_(){return N7.get("branch",Ix)}function J_(){return N7.get("head",Ox)}function q_(){return N7.get("remoteUrl",wx)}function Q_(){return N7.get("defaultBranch",jx)}async function L00(Z){let X=await m0(Z);if(!X)return null;let J=await R4(X);if(!J)return null;if(J.type==="branch")return U2(X,`refs/heads/${J.name}`);return J.sha}async function _00(Z){let X;try{let q=(await $6(E0(Z,".git"),"utf-8")).trim();if(!q.startsWith("gitdir:"))return null;X=w7(Z,q.slice(7).trim())}catch{return null}let J=await R4(X);if(!J)return null;if(J.type==="branch")return U2(X,`refs/heads/${J.name}`);return J.sha}async function z00(Z){let X=await m0(Z);if(!X)return null;let J=await z4(X,"remote","origin","url");if(J)return J;let q=await Y6(X);if(q&&q!==X)return z4(q,"remote","origin","url");return null}async function $_(){let Z=await m0();if(!Z)return!1;let X=await Y6(Z)??Z;try{return await eL(E0(X,"shallow")),!0}catch{return!1}}async function Y_(){try{let Z=await m0();if(!Z)return 0;let X=await Y6(Z)??Z;return(await Dx(E0(X,"worktrees"))).length+1}catch{return 1}}var H2,Ax=1000,N7;var H_=B(()=>{j6();SB();t0();R2();oL();H2=new Map;N7=new Z_});import{createHash as Nx}from"crypto";import{readFileSync as sJ,realpathSync as U_,statSync as K_}from"fs";import{open as kx,readFile as xx,realpath as G_,stat as Ex}from"fs/promises";import{basename as Px,dirname as rJ,join as P0,resolve as x7,sep as W_}from"path";function vx(){function Z(X){let J=V_(X);return J===R_?null:J}return Z.cache=V_.cache,Z}function Cx(){function Z(X){let J=K2(X);if(!J)return null;return B_(J)}return Z.cache=B_.cache,Z}function C00(Z){return m0(Z)}async function y00(){let Z=s(),X=K2(Z);if(!X)return!1;try{let[J,q]=await Promise.all([G_(Z),G_(X)]);return J===q}catch{return Z===X}}function hx(Z){let X=Z.trim();if(!X)return null;let J=X.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(J&&J[1]&&J[2])return`${J[1]}/${J[2]}`.toLowerCase();let q=X.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(q&&q[1]&&q[2]){let Q=q[1],$=q[2];if(lx(Q)&&$.startsWith("git/")){let Y=$.slice(4),H=Y.split("/");if(H.length>=3&&H[0].includes("."))return Y.toLowerCase();return`github.com/${Y}`.toLowerCase()}return`${Q}/${$}`.toLowerCase()}return null}async function b00(){let Z=await tJ();if(!Z)return null;let X=hx(Z);if(!X)return null;return Nx("sha256").update(X).digest("hex").substring(0,16)}async function u00(){try{let[Z,X,J,q,Q,$]=await Promise.all([Sx(),bx(),tJ(),gx(),fx(),ux()]);return{commitHash:Z,branchName:X,remoteUrl:J,isHeadOnRemote:q,isClean:Q,worktreeCount:$}}catch(Z){return null}}async function p00(){let{parseGitRemote:Z}=await import("./detectRepository-0.1.14-8yam7kv4.mjs"),X=await tJ();if(!X)return E("Local GitHub repo: unknown"),null;let J=Z(X);if(J&&J.host==="github.com"){let q=`${J.owner}/${J.name}`;return E(`Local GitHub repo: ${q}`),q}return E("Local GitHub repo: unknown"),null}async function dx(){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:J,code:q}=await a(Z0(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(q===0){let $=J.match(/HEAD branch: (\S+)/);if($&&$[1])return`origin/${$[1]}`}let Q=["origin/main","origin/staging","origin/master"];for(let $ of Q){let{code:Y}=await a(Z0(),["rev-parse","--verify",$],{preserveOutputOnError:!1});if(Y===0)return $}return null}function cx(){return $_()}async function k7(){let{stdout:Z,code:X}=await a(Z0(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),J=Z.trim();if(X!==0||!J)return[];let q=J.split(`
|
|
189
189
|
`).filter(Boolean),Q=[],$=0;for(let Y of q){if(Q.length>=z_){E(`Untracked file capture: reached max file count (${z_})`);break}if(eJ(Y))continue;try{let K=(await Ex(Y)).size;if(K>L_){E(`Untracked file capture: skipping ${Y} (exceeds ${L_} bytes)`);continue}if($+K>__){E(`Untracked file capture: reached total size limit (${__} bytes)`);break}if(K===0){Q.push({path:Y,content:""});continue}let W=Math.min(px,K),G=await kx(Y,"r");try{let V=Buffer.alloc(W),{bytesRead:L}=await G.read(V,0,W,0),_=V.subarray(0,L);if(Zq(_))continue;let z;if(K<=W)z=_.toString("utf-8");else z=await xx(Y,"utf-8");Q.push({path:Y,content:z}),$+=K}finally{await G.close()}}catch(H){E(`Failed to read untracked file ${Y}: ${H}`)}}return Q}async function d00(){try{if(!await yx())return null;if(await cx()){E("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(Z0(),["diff","HEAD"]),k7()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let X=await dx();if(!X){E("No remote found, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(Z0(),["diff","HEAD"]),k7()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let{stdout:J,code:q}=await a(Z0(),["merge-base","HEAD",X],{preserveOutputOnError:!1});if(q!==0||!J.trim()){E("Merge-base failed, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(Z0(),["diff","HEAD"]),k7()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let Q=J.trim(),[{stdout:$},Y,{stdout:H,code:K},{stdout:W},{stdout:G}]=await Promise.all([a(Z0(),["diff",Q]),k7(),a(Z0(),["format-patch",`${Q}..HEAD`,"--stdout"]),a(Z0(),["rev-parse","HEAD"]),a(Z0(),["rev-parse","--abbrev-ref","HEAD"])]),V=null;if(K===0&&H&&H.trim())V=H;let L=G?.trim();return{remote_base_sha:Q,remote_base:X,patch:$||"",untracked_files:Y,format_patch:V,head_sha:W?.trim()||null,branch_name:L&&L!=="HEAD"?L:null}}catch(Z){return m(Z),null}}function lx(Z){let X=Z.split(":")[0]??"";return X==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(X)}function c00(){let Z=k(),X=s(),J=P0(X,".git");try{let q=Z.statSync(J);if(q.isFile())return!1;if(q.isDirectory()){let Q=P0(J,"HEAD");try{if(Z.statSync(Q).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(P0(X,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(P0(X,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(P0(X,"refs")).isDirectory())return!0}catch{}return!1}var R_,V_,K2,B_,d5,Z0,yx,o$=async(Z)=>{return K2(Z)!==null},Sx=async()=>{return J_()},bx=async()=>{return X_()},S00=async()=>{return Q_()},tJ=async()=>{return q_()},gx=async()=>{let{code:Z}=await a(Z0(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},h00=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},g00=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 J=Z.trim().split(/\s+/);if(J.length!==2)return{ahead:0,behind:0};let q=parseInt(J[0],10),Q=parseInt(J[1],10);return{ahead:Number.isFinite(Q)?Q:0,behind:Number.isFinite(q)?q:0}},fx=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)X.push("-uno");let{stdout:J}=await a(Z0(),X,{preserveOutputOnError:!1});return J.trim().length===0},f00=async()=>{let{stdout:Z}=await a(Z0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
|
|
190
190
|
`).map((X)=>X.trim().split(" ",2)[1]?.trim()).filter((X)=>typeof X==="string")},mx=async()=>{let{stdout:Z}=await a(Z0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1}),X=[],J=[];return Z.trim().split(`
|
|
191
191
|
`).filter((q)=>q.length>0).forEach((q)=>{let Q=q.substring(0,2),$=q.substring(2).trim();if(Q==="??")J.push($);else if($)X.push($)}),{tracked:X,untracked:J}},ux=async()=>{return Y_()},m00=async(Z)=>{try{let X=Z||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:J}=await mx();if(J.length>0){let{code:Q}=await a(Z0(),["add",...J],{preserveOutputOnError:!1});if(Q!==0)return!1}let{code:q}=await a(Z0(),["stash","push","--message",X],{preserveOutputOnError:!1});return q===0}catch(X){return!1}},L_=524288000,__=5368709120,z_=20000,px=65536;var R2=B(()=>{L1();Xq();t0();R1();G2();f4();R0();H_();u0();P4();T5();R_=Symbol("git-root-not-found"),V_=z1((Z)=>{let X=Date.now();Q0("info","find_git_root_started");let J=x7(Z),q=J.substring(0,J.indexOf(W_)+1)||W_,Q=0;while(J!==q){try{let Y=P0(J,".git");Q++;let H=K_(Y);if(H.isDirectory()||H.isFile())return Q0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:Q,found:!0}),J.normalize("NFC")}catch{}let $=rJ(J);if($===J)break;J=$}try{let $=P0(q,".git");Q++;let Y=K_($);if(Y.isDirectory()||Y.isFile())return Q0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:Q,found:!0}),q.normalize("NFC")}catch{}return Q0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:Q,found:!1}),R_},(Z)=>Z,50),K2=vx();B_=z1((Z)=>{try{let X=sJ(P0(Z,".git"),"utf-8").trim();if(!X.startsWith("gitdir:"))return Z;let J=x7(Z,X.slice(7).trim()),q=x7(J,sJ(P0(J,"commondir"),"utf-8").trim());if(x7(rJ(J))!==P0(q,"worktrees"))return Z;if(U_(sJ(P0(J,"gitdir"),"utf-8").trim())!==P0(U_(Z),".git"))return Z;if(Px(q)!==".git")return q.normalize("NFC");return rJ(q).normalize("NFC")}catch{return Z}},(Z)=>Z,50),d5=Cx();Z0=u(()=>{return D5("git")||"git"}),yx=u(async()=>{let Z=Date.now();Q0("info","is_git_check_started");let X=K2(s())!==null;return Q0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:X}),X})});
|
|
192
|
-
export{U6 as
|
|
192
|
+
export{U6 as h5,M4 as i5,F4 as j5,v7 as k5,NQ as l5,kQ as m5,Iq as n5,Oq as o5,V6 as p5,T4 as q5,jq as r5,Nq as s5,i7 as t5,yQ as u5,eJ as v5,Xq as w5,qq as x5,Qq as y5,S7 as z5,zq as A5,Rq as B5,Mq as C5,kq as D5,xq as E5,Eq as F5,Pq as G5,Sq as H5,bq as I5,Q0 as J5,mE as K5,G2 as L5,n7 as M5,ak as N5,PL as O5,ek as P5,hL as Q5,fL as R5,mL as S5,Ee as T5,uL as U5,zB as V5,VJ as W5,pe as X5,de as Y5,ce as Z5,m as _5,ne as $5,ie as a6,ae as b6,oe as c6,u0 as d6,e4 as e6,m9 as f6,sK as g6,rK as h6,zX as i6,c6 as j6,G7 as k6,a as l6,V3 as m6,f4 as n6,z4 as o6,oL as p6,B00 as q6,m0 as r6,U2 as s6,Y6 as t6,L00 as u6,_00 as v6,z00 as w6,H_ as x6,fQ as y6,mQ as z6,gP as A6,z1 as B6,P4 as C6,F6 as D6,a7 as E6,JW as F6,D5 as G6,T5 as H6,K2 as I6,d5 as J6,Z0 as K6,yx as L6,C00 as M6,y00 as N6,o$ as O6,Sx as P6,bx as Q6,S00 as R6,tJ as S6,hx as T6,b00 as U6,gx as V6,h00 as W6,g00 as X6,fx as Y6,f00 as Z6,mx as _6,ux as $6,m00 as a7,u00 as b7,p00 as c7,dx as d7,d00 as e7,c00 as f7,R2 as g7,AP as h7,v0 as i7,IP as j7,z6 as k7,nP as l7,pz as m7,iP as n7,pQ as o7,dQ as p7,e7 as q7,Xv as r7,Jv as s7,qv as t7,v4 as u7,aQ as v7,oQ as w7,X$ as x7,J$ as y7,R$ as z7,M$ as A7,j$ as B7,N$ as C7,Q3 as D7,NR as E7,Z1 as F7,B2 as G7,EC as H7,PC as I7,vC as J7,ER as K7,b4 as L7,b$ as M7,yC as N7,H3 as O7,h$ as P7,U3 as Q7,K3 as R7,f$ as S7,Zy as T7,hR as U7,Xy as V7,Jy as W7,qy as X7,Qy as Y7,m$ as Z7,$y as _7,Yy as $7,Hy as a8,Uy as b8,Ky as c8,Gy as d8,fR as e8,Wy as f8,Vy as g8,By as h8,Ly as i8,_y as j8,zy as k8,d$ as l8,Ry as m8,h4 as n8,iR as o8,r$ as p8,C0 as q8,ny as r8,T3 as s8,iy as t8,ay as u8,d4 as v8,ty as w8,ey as x8,ZS as y8,XS as z8,JS as A8,qS as B8,I2 as C8,QS as D8,$S as E8,A3 as F8,HS as G8,US as H8,z9 as I8,F1 as J8,O2 as K8,l4 as L8,F9 as M8,RS as N8,D9 as O8,qW as P8,QW as Q8,V0 as R8,Fw as S8,n6 as T8,wn as U8,MX as V8,kn as W8,xn as X8,En as Y8,Pn as Z8,vn as _8,Cn as $8,yn as a9,Sn as b9,bn as c9,hn as d9,gn as e9,fn as f9,mn as g9,un as h9,pn as i9,dn as j9,cn as k9,WW as l9,l2 as m9,VW as n9,tn as o9,en as p9,Zi as q9,Xi as r9,Ji as s9,qi as t9,Qi as u9,$i as v9,Yi as w9,LW as x9,zW as y9,RW as z9,DW as A9,Li as B9,AW as C9,a1 as D9,Ii as E9,Ow as F9,w5 as G9,wi as H9,jW as I9,k5 as J9,Pi as K9,vi as L9,Ci as M9,xW as N9,sw as O9,yi as P9,Si as Q9,tw as R9,bi as S9,N5 as T9,Jj as U9,$j as V9,fi as W9,yW as X9,x5 as Y9,SW as Z9,bW as _9,Hj as $9,Uj as a_,di as b_,ci as c_,li as d_,hW as e_,wX as f_,gW as g_,fW as h_,ai as i_,mW as j_,a6 as k_,ei as l_,dW as m_,Za as n_,cW as o_,Ja as p_,lW as q_,nW as r_,qa as s_,Qa as t_,$a as u_,Ya as v_,Ha as w_,Lj as x_,Ua as y_,jX as z_,Fa as A_,eW as B_,ZV as C_,k0 as D_,Ca as E_,ya as F_,Sa as G_,i2 as H_,oa as I_,yX as J_,Jo as K_,_V as L_,zo as M_,b5 as N_,h5 as O_,Ro as P_,Mo as Q_,DV as R_,io as S_,o2 as T_,TV as U_,f5 as V_,vV as W_,n as X_,ao as Y_,oo as Z_,so as __,m5 as $_,ro as a$,to as b$,Cj as c$,eo as d$,Zs as e$,Xs as f$,Js as g$,qs as h$,Qs as i$,yV as j$,gV as k$,_s as l$,bj as m$,zs as n$,s2 as o$,uV as p$,Rs as q$,aX as r$,xs as s$,Es as t$,_B as u$,X7 as v$,DB as w$,PN as x$,Cs as y$,ys as z$,TB as A$,CN as B$,yN as C$,B0 as D$,wB as E$,J4 as F$,fN as G$,mN as H$,xB as I$,EB as J$,Lr as K$,AJ as L$,lN as M$,_r as N$,nN as O$,zr as P$,Rr as Q$,Mr as R$,Tr as S$,hB as T$,A0 as U$,Ar as V$,Ir as W$,W0 as X$,Or as Y$,wr as Z$,jr as _$,wJ as $$,Nr as aaa,kr as baa,rN as caa,xr as daa,Er as eaa,tN as faa,Pr as gaa,vr as haa,Cr as iaa,yr as jaa,Sr as kaa,br as laa,hr as maa,gr as naa,jJ as oaa,U7 as paa,mB as qaa,NJ as raa,lr as saa,E1 as taa,nr as uaa,B1 as vaa,ir as waa,ar as xaa,or as yaa,sr as zaa,Hk as Aaa,Uk as Baa,rr as Caa,tr as Daa,er as Eaa,Kk as Faa,nB as Gaa,h0 as Haa,H4 as Iaa,O0 as Jaa,EJ as Kaa,Wt as Laa,W7 as Maa,Ft as Naa,rB as Oaa,QL as Paa,$L as Qaa,ct as Raa,lt as Saa,nt as Taa,S as Uaa,SJ as Vaa,it as Waa,g0 as Xaa,at as Yaa,HL as Zaa,hJ as _aa,Ik as $aa,VL as aba,Ze as bba,Xe as cba,BL as dba,fJ as eba,xk as fba,AL as gba,Ke as hba,Ge as iba,fk as jba,ML as kba,IL as lba,We as mba,Ve as nba,Be as oba,uk as pba,pk as qba,Le as rba,kL as sba,D7 as tba,EL as uba,B4 as vba,nk as wba,ik as xba,q6 as yba};
|