@opencode-ai/core 0.0.0-dev-18334 → 0.0.0-dev-18339
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/sql.js +2 -2
- package/dist/agent.js +70 -70
- package/dist/aisdk-native.js +3 -3
- package/dist/aisdk.js +4 -4
- package/dist/app.js +2 -2
- package/dist/bus.js +68 -68
- package/dist/catalog.js +78 -78
- package/dist/chunks/{pty-02dbfq60.js → kv-02dbfq60.js} +1 -1
- package/dist/chunks/{pty-k60er779.js → kv-0ex5w6gb.js} +10 -10
- package/dist/chunks/{pty-bycv9049.js → kv-0gjxv4zg.js} +89 -89
- package/dist/chunks/{pty-0kvmztkf.js → kv-0kvmztkf.js} +1 -1
- package/dist/chunks/{pty-wxw93tt2.js → kv-0nsjmygq.js} +4 -4
- package/dist/chunks/{pty-n57pjc8k.js → kv-0pn12ky9.js} +3 -3
- package/dist/chunks/{pty-q3856v5v.js → kv-0rpfwhsw.js} +3 -3
- package/dist/chunks/{pty-hey25ktd.js → kv-0y655g3j.js} +2 -2
- package/dist/chunks/{pty-yhqh92qf.js → kv-10ymxce0.js} +15 -15
- package/dist/chunks/{pty-sst1754h.js → kv-14d5gv1g.js} +5 -5
- package/dist/chunks/{pty-18pv8fg3.js → kv-18pv8fg3.js} +2 -2
- package/dist/chunks/{pty-ctzszweb.js → kv-1e7b7hnt.js} +8 -8
- package/dist/chunks/{pty-gjy076rh.js → kv-1fq4p3a0.js} +8 -8
- package/dist/chunks/{pty-v5r4ssgv.js → kv-1z2djtdb.js} +155 -155
- package/dist/chunks/{pty-csrx180a.js → kv-1znkpcva.js} +5 -5
- package/dist/chunks/{pty-y0k2k5v2.js → kv-2472bxjq.js} +8 -8
- package/dist/chunks/{pty-0e43scmx.js → kv-26hyr64a.js} +8 -8
- package/dist/chunks/{pty-2m0hgr65.js → kv-2m0hgr65.js} +1 -1
- package/dist/chunks/{pty-xc25jqxj.js → kv-2nmh62e0.js} +5 -5
- package/dist/chunks/{pty-2nmyybe0.js → kv-2nmyybe0.js} +1 -1
- package/dist/chunks/{pty-k4h7rtgr.js → kv-2r4w0tef.js} +7 -7
- package/dist/chunks/{pty-hchrdr4t.js → kv-2te4qfmf.js} +4 -4
- package/dist/chunks/{pty-2wds5nk3.js → kv-2wds5nk3.js} +1 -1
- package/dist/chunks/{pty-aj9m13cz.js → kv-2zvg8b5x.js} +4 -4
- package/dist/chunks/{pty-qy7mm8w3.js → kv-3144vz00.js} +9 -9
- package/dist/chunks/{pty-9yrp1ad7.js → kv-3cv4p330.js} +3 -3
- package/dist/chunks/{pty-3g8vftxb.js → kv-3g8vftxb.js} +2 -2
- package/dist/chunks/{pty-3qv8nf0b.js → kv-3qv8nf0b.js} +1 -1
- package/dist/chunks/{pty-b7z6w66n.js → kv-3rayhmv3.js} +3 -3
- package/dist/chunks/{pty-tm1k0b1t.js → kv-3t17rrv4.js} +10 -10
- package/dist/chunks/{pty-3thh6229.js → kv-3thh6229.js} +2 -2
- package/dist/chunks/{pty-k3z8bqpp.js → kv-3vpyzwc4.js} +3 -3
- package/dist/chunks/{pty-dapbg9ce.js → kv-3w5aym19.js} +9 -9
- package/dist/chunks/{pty-mzj6ydvj.js → kv-46tke73x.js} +6 -6
- package/dist/chunks/{pty-yqza15cy.js → kv-4ahj0kbj.js} +38 -38
- package/dist/chunks/{pty-8vd6pef0.js → kv-4dsn0b5s.js} +4 -4
- package/dist/chunks/{pty-5vbqbv2r.js → kv-4gj3z125.js} +61 -61
- package/dist/chunks/{pty-9bzgvrrs.js → kv-4j3sy62h.js} +6 -6
- package/dist/chunks/{pty-4s2xwh5d.js → kv-4s2xwh5d.js} +3 -3
- package/dist/chunks/{pty-09vaeaer.js → kv-4v8j4d8q.js} +5 -5
- package/dist/chunks/{pty-4zzdwbaz.js → kv-4zzdwbaz.js} +2 -2
- package/dist/chunks/{pty-50jxp3hw.js → kv-50jxp3hw.js} +1 -1
- package/dist/chunks/{pty-57tzwnz4.js → kv-57tzwnz4.js} +1 -1
- package/dist/chunks/{pty-58xdvehb.js → kv-58xdvehb.js} +1 -1
- package/dist/chunks/{pty-5cdnkd94.js → kv-5cdnkd94.js} +3 -3
- package/dist/chunks/{pty-5fe026tx.js → kv-5fe026tx.js} +3 -3
- package/dist/chunks/{pty-90ajpsyk.js → kv-5hsxrzr9.js} +2 -2
- package/dist/chunks/{pty-cbp4tzfr.js → kv-5ncymr0a.js} +4 -4
- package/dist/chunks/{pty-5rs65q6p.js → kv-5rs65q6p.js} +1 -1
- package/dist/chunks/{pty-5vcssjzn.js → kv-5vcssjzn.js} +1 -1
- package/dist/chunks/{pty-5z4zwtb4.js → kv-5z4zwtb4.js} +2 -2
- package/dist/chunks/{pty-6272rtjg.js → kv-6272rtjg.js} +1 -1
- package/dist/chunks/{pty-j0a8c2ah.js → kv-66r1q76g.js} +3 -3
- package/dist/chunks/{pty-mzcgyw1d.js → kv-671n4ec0.js} +7 -7
- package/dist/chunks/{pty-6ky7rqk7.js → kv-6ky7rqk7.js} +1 -1
- package/dist/chunks/{pty-g8qafzk6.js → kv-6m9fss13.js} +7 -7
- package/dist/chunks/{pty-0kx9g65f.js → kv-6q644z5w.js} +3 -3
- package/dist/chunks/{pty-6wkzvma0.js → kv-6wkzvma0.js} +2 -2
- package/dist/chunks/{pty-75h1hfe2.js → kv-75h1hfe2.js} +2 -2
- package/dist/chunks/{pty-gvb5fjaj.js → kv-7d1grz3f.js} +4 -4
- package/dist/chunks/{pty-7gqqz1s8.js → kv-7gqqz1s8.js} +1 -1
- package/dist/chunks/{pty-7khw64yh.js → kv-7khw64yh.js} +1 -1
- package/dist/chunks/{pty-7mrpdsq5.js → kv-7mrpdsq5.js} +1 -1
- package/dist/chunks/{pty-hhx769z4.js → kv-7pb1ad45.js} +4 -4
- package/dist/chunks/{pty-7thnevmq.js → kv-7thnevmq.js} +2 -2
- package/dist/chunks/{pty-7wcmqxrc.js → kv-7wcmqxrc.js} +1 -1
- package/dist/chunks/{pty-88jbfw8z.js → kv-88jbfw8z.js} +2 -2
- package/dist/chunks/{pty-4rqp4j7m.js → kv-88kss8rc.js} +5 -5
- package/dist/chunks/{pty-scwsmnvy.js → kv-8kkwgkw2.js} +15 -15
- package/dist/chunks/{pty-8pngjawd.js → kv-8pngjawd.js} +2 -2
- package/dist/chunks/{pty-83e2qdb8.js → kv-8swew0x2.js} +6 -6
- package/dist/chunks/{pty-3eyrwrpy.js → kv-90qyxad2.js} +4 -4
- package/dist/chunks/{pty-jkx2v3a9.js → kv-93tefsha.js} +3 -3
- package/dist/chunks/{pty-81mz04qm.js → kv-968cth0m.js} +3 -3
- package/dist/chunks/{pty-fqex1cwa.js → kv-98hbc7y3.js} +12 -12
- package/dist/chunks/{pty-999qd968.js → kv-999qd968.js} +1 -1
- package/dist/chunks/{pty-sxp8nh0s.js → kv-9avjhcy3.js} +3 -3
- package/dist/chunks/{pty-4v3afprt.js → kv-9b76fep3.js} +8 -8
- package/dist/chunks/{pty-9f0rnpkn.js → kv-9f0rnpkn.js} +1 -1
- package/dist/chunks/{pty-zrn8d1yv.js → kv-9hh2h6b5.js} +15 -15
- package/dist/chunks/{pty-kwaxwgcd.js → kv-9rba19kc.js} +7 -7
- package/dist/chunks/{pty-f5p36mn1.js → kv-9sr1rygm.js} +3 -3
- package/dist/chunks/{pty-a09abg6q.js → kv-a09abg6q.js} +2 -2
- package/dist/chunks/{pty-34f5fj0z.js → kv-a46p3x3f.js} +9 -9
- package/dist/chunks/{pty-4tc9kn3c.js → kv-a63dcx9e.js} +21 -21
- package/dist/chunks/{pty-qgedfe15.js → kv-ahhpd2qe.js} +3 -3
- package/dist/chunks/{pty-heeswwmn.js → kv-ar229a3r.js} +8 -8
- package/dist/chunks/{pty-awg5d31a.js → kv-awg5d31a.js} +1 -1
- package/dist/chunks/{pty-bh1wr8rq.js → kv-bh1wr8rq.js} +2 -2
- package/dist/chunks/{pty-bmknfyv0.js → kv-bmknfyv0.js} +2 -2
- package/dist/chunks/{pty-hh9129p6.js → kv-br3vd8kh.js} +2 -2
- package/dist/chunks/{pty-j0z5ak8k.js → kv-by0e6x5c.js} +45 -45
- package/dist/chunks/{pty-byab506k.js → kv-byab506k.js} +1 -1
- package/dist/chunks/{pty-c4wcb9vc.js → kv-c4wcb9vc.js} +2 -2
- package/dist/chunks/{pty-frysc0nn.js → kv-c6ct36ty.js} +9 -9
- package/dist/chunks/{pty-z42p5vhz.js → kv-chcr0fra.js} +5 -5
- package/dist/chunks/{pty-m62ssds6.js → kv-cj3mznze.js} +2 -2
- package/dist/chunks/{pty-5nnwbsha.js → kv-ck6a95w5.js} +3 -3
- package/dist/chunks/{pty-p2559na6.js → kv-ck8sth2t.js} +3 -3
- package/dist/chunks/{pty-4jcspr7g.js → kv-ckv7kep5.js} +5 -5
- package/dist/chunks/{pty-0s07mtq1.js → kv-d18w9et2.js} +5 -5
- package/dist/chunks/{pty-d2gk9vpf.js → kv-d2gk9vpf.js} +2 -2
- package/dist/chunks/{pty-d4ax61k3.js → kv-d4ax61k3.js} +2 -2
- package/dist/chunks/{pty-8t2hdhmm.js → kv-ddex5nyn.js} +3 -3
- package/dist/chunks/{pty-k8fd3zhv.js → kv-dgqp5nda.js} +3 -3
- package/dist/chunks/{pty-dhphtf1x.js → kv-dhphtf1x.js} +1 -1
- package/dist/chunks/{pty-e1z9a0ts.js → kv-e1z9a0ts.js} +2 -2
- package/dist/chunks/{pty-ec8vrfw5.js → kv-ec8vrfw5.js} +1 -1
- package/dist/chunks/{pty-enpg66yn.js → kv-enpg66yn.js} +1 -1
- package/dist/chunks/{pty-bv58wyct.js → kv-ert2ba1d.js} +7 -7
- package/dist/chunks/{pty-9gthvhr1.js → kv-etsaqhqn.js} +8 -8
- package/dist/chunks/{pty-f7q7a28y.js → kv-f7q7a28y.js} +4 -4
- package/dist/chunks/kv-f9n5fyhn.js +341 -0
- package/dist/chunks/{pty-f9wt0tjw.js → kv-f9wt0tjw.js} +2 -2
- package/dist/chunks/{pty-fb7nfzf2.js → kv-fb7nfzf2.js} +3 -3
- package/dist/chunks/{pty-vq4bsz4p.js → kv-ferj8240.js} +91 -91
- package/dist/chunks/{pty-fgyjabww.js → kv-fgyjabww.js} +2 -2
- package/dist/chunks/{pty-59sg178t.js → kv-fwsezdbd.js} +4 -4
- package/dist/chunks/{pty-njwvsg8m.js → kv-g1db1nf1.js} +14 -14
- package/dist/chunks/{pty-shs983jy.js → kv-g7tgpc26.js} +12 -12
- package/dist/chunks/{pty-gcay93cp.js → kv-gcay93cp.js} +1 -1
- package/dist/chunks/{pty-gd2xppx8.js → kv-gd2xppx8.js} +1 -1
- package/dist/chunks/{pty-gpybhmhb.js → kv-gpybhmhb.js} +3 -3
- package/dist/chunks/{pty-f6c1t9rd.js → kv-gsdtpdj5.js} +4 -4
- package/dist/chunks/{pty-h12kt9pa.js → kv-h12kt9pa.js} +2 -2
- package/dist/chunks/{pty-7ev5chdf.js → kv-h4sj9tha.js} +14 -14
- package/dist/chunks/{pty-vfaqc6pt.js → kv-h7wwd8cj.js} +8 -8
- package/dist/chunks/{pty-h94zdhz8.js → kv-h94zdhz8.js} +2 -2
- package/dist/chunks/{pty-hp6rpdnc.js → kv-hp6rpdnc.js} +1 -1
- package/dist/chunks/{pty-hqh8yks9.js → kv-hqh8yks9.js} +3 -3
- package/dist/chunks/{pty-b2ykb7j7.js → kv-j0mc065y.js} +3 -3
- package/dist/chunks/{pty-j2rwtkhe.js → kv-j2rwtkhe.js} +4 -4
- package/dist/chunks/{pty-fxq037mg.js → kv-j37e0edx.js} +11 -11
- package/dist/chunks/{pty-w7xyqxnp.js → kv-j7s8djnk.js} +5 -5
- package/dist/chunks/{pty-h1kxvktj.js → kv-jc29bebd.js} +12 -12
- package/dist/chunks/{pty-p26n68ww.js → kv-jm0q6ezy.js} +13 -13
- package/dist/chunks/{pty-5n0e25rx.js → kv-jmnt8swh.js} +8 -8
- package/dist/chunks/{pty-21d46bda.js → kv-jn2zfzya.js} +3 -3
- package/dist/chunks/{pty-051n8qej.js → kv-jvh2qagg.js} +14 -14
- package/dist/chunks/{pty-k42t1tha.js → kv-k42t1tha.js} +2 -2
- package/dist/chunks/{pty-kpag6kfh.js → kv-k9na051a.js} +6 -6
- package/dist/chunks/{pty-p97a0mey.js → kv-kf17v4zs.js} +6 -6
- package/dist/chunks/{pty-kg1345f7.js → kv-kg1345f7.js} +1 -1
- package/dist/chunks/{pty-kp1t5rcy.js → kv-kp1t5rcy.js} +1 -1
- package/dist/chunks/{pty-krsqcmnj.js → kv-krsqcmnj.js} +1 -1
- package/dist/chunks/{pty-36b64kw5.js → kv-kxdfg7qh.js} +9 -9
- package/dist/chunks/{pty-5y71y6aq.js → kv-m1padgrh.js} +4 -4
- package/dist/chunks/{pty-m55whf0h.js → kv-m55whf0h.js} +2 -2
- package/dist/chunks/{pty-qf57kmn8.js → kv-mbv1w93f.js} +4 -4
- package/dist/chunks/{pty-c9ts76et.js → kv-mej0nrq3.js} +3 -3
- package/dist/chunks/{pty-mf0hyk7z.js → kv-mf0hyk7z.js} +1 -1
- package/dist/chunks/{pty-mh28new4.js → kv-mh28new4.js} +2 -2
- package/dist/chunks/{pty-mkaeg0rc.js → kv-mkaeg0rc.js} +6 -6
- package/dist/chunks/{pty-yd4t93pc.js → kv-mm1csdks.js} +4 -4
- package/dist/chunks/{pty-mnb85w6b.js → kv-mnb85w6b.js} +2 -2
- package/dist/chunks/{pty-5ev5dm41.js → kv-mnzk1cqa.js} +10 -10
- package/dist/chunks/{pty-mxvw03gv.js → kv-mxvw03gv.js} +1 -1
- package/dist/chunks/{pty-02jh672z.js → kv-n67f1qxt.js} +29 -29
- package/dist/chunks/{pty-mr7hz5nx.js → kv-nbawqw93.js} +8 -8
- package/dist/chunks/{pty-nesb2rcz.js → kv-nesb2rcz.js} +2 -2
- package/dist/chunks/{pty-ve0df51m.js → kv-njt4z54v.js} +6 -6
- package/dist/chunks/{pty-5t6ev4f9.js → kv-nkaqy11c.js} +59 -59
- package/dist/chunks/{pty-61y22362.js → kv-np30ra1e.js} +9 -9
- package/dist/chunks/{pty-nr76rjj3.js → kv-nr76rjj3.js} +2 -2
- package/dist/chunks/{pty-y369bt6x.js → kv-nv3q1d9w.js} +5 -5
- package/dist/chunks/{pty-4pb49s5g.js → kv-nxat12yk.js} +4 -4
- package/dist/chunks/{pty-nzrjycs5.js → kv-nzrjycs5.js} +1 -1
- package/dist/chunks/{pty-ezzbbpt3.js → kv-p7ceka9t.js} +14 -14
- package/dist/chunks/{pty-6q0m15b3.js → kv-p8fr6x1v.js} +2 -2
- package/dist/chunks/{pty-8s0m95jw.js → kv-p99drwz0.js} +5 -5
- package/dist/chunks/{pty-zgsy1s8j.js → kv-pc68jvdy.js} +4 -4
- package/dist/chunks/{pty-3c3xz5w2.js → kv-ppx35r9t.js} +4 -4
- package/dist/chunks/{pty-pq4b4pqk.js → kv-pq4b4pqk.js} +2 -2
- package/dist/chunks/{pty-ggww5s4h.js → kv-pqn75jxa.js} +13 -13
- package/dist/chunks/{pty-th5k7hy4.js → kv-pydw6mfr.js} +3 -3
- package/dist/chunks/{pty-bc1jme2z.js → kv-q0pv8ccx.js} +2 -2
- package/dist/chunks/{pty-q9b4qnv8.js → kv-q9b4qnv8.js} +2 -2
- package/dist/chunks/{pty-9dnj3g8a.js → kv-qbhcf2ms.js} +10 -10
- package/dist/chunks/{pty-qe0d689s.js → kv-qe0d689s.js} +2 -2
- package/dist/chunks/{pty-63k0vevy.js → kv-qrvmr4r5.js} +12 -12
- package/dist/chunks/{pty-tepwy0cv.js → kv-qt2qv4ez.js} +3 -3
- package/dist/chunks/{pty-vsp0ywmz.js → kv-qzt690fz.js} +2 -2
- package/dist/chunks/{pty-r13w8t0w.js → kv-r13w8t0w.js} +2 -2
- package/dist/chunks/{pty-r3k9abhd.js → kv-r3k9abhd.js} +2 -2
- package/dist/chunks/{pty-75bh2x5p.js → kv-r5svksvn.js} +13 -13
- package/dist/chunks/{pty-1rwfe3w7.js → kv-r97ytgf1.js} +6 -6
- package/dist/chunks/{pty-rahat93a.js → kv-rahat93a.js} +1 -1
- package/dist/chunks/{pty-rameyvmv.js → kv-rameyvmv.js} +1 -1
- package/dist/chunks/{pty-rbnp2c85.js → kv-rbnp2c85.js} +3 -3
- package/dist/chunks/{pty-rfbm65k8.js → kv-rfbm65k8.js} +1 -1
- package/dist/chunks/{pty-wpb53h8k.js → kv-rm7md962.js} +10 -10
- package/dist/chunks/{pty-gzya93qj.js → kv-rv0cjn1z.js} +3 -3
- package/dist/chunks/{pty-s33fw6zm.js → kv-s33fw6zm.js} +1 -1
- package/dist/chunks/{pty-jpw0c2hb.js → kv-sas94s9a.js} +2 -2
- package/dist/chunks/{pty-se1aqaya.js → kv-se1aqaya.js} +3 -3
- package/dist/chunks/{pty-smpeg8c9.js → kv-smpeg8c9.js} +2 -2
- package/dist/chunks/{pty-sw84ckhj.js → kv-sw84ckhj.js} +1 -1
- package/dist/chunks/{pty-9xz132x0.js → kv-t0h4pkp4.js} +28 -28
- package/dist/chunks/{pty-t14kykx1.js → kv-t14kykx1.js} +1 -1
- package/dist/chunks/{pty-x31hnj33.js → kv-ta3fzjwk.js} +3 -3
- package/dist/chunks/{pty-tcptxgyq.js → kv-tcptxgyq.js} +1 -1
- package/dist/chunks/{pty-8hx58cse.js → kv-td0yzbe3.js} +7 -7
- package/dist/chunks/{pty-wsb1nxx2.js → kv-te3xfmcs.js} +22 -22
- package/dist/chunks/{pty-tgbb2ckq.js → kv-tgbb2ckq.js} +2 -2
- package/dist/chunks/{pty-thstd87d.js → kv-thstd87d.js} +1 -1
- package/dist/chunks/{pty-x5g53fnr.js → kv-txmc67eg.js} +8 -8
- package/dist/chunks/{pty-k3ng8j0p.js → kv-txnnyt3a.js} +3 -3
- package/dist/chunks/{pty-aa3706nc.js → kv-tyymnqm2.js} +12 -12
- package/dist/chunks/{pty-v2wshkax.js → kv-v2wshkax.js} +1 -1
- package/dist/chunks/{pty-f0mp5ybc.js → kv-v7q0vmsp.js} +7 -7
- package/dist/chunks/{pty-v80zsxnb.js → kv-v80zsxnb.js} +1 -1
- package/dist/chunks/{pty-v972xay6.js → kv-v972xay6.js} +1 -1
- package/dist/chunks/{pty-v9bfv94f.js → kv-v9bfv94f.js} +1 -1
- package/dist/chunks/{pty-vcwr2vpf.js → kv-vcwr2vpf.js} +1 -1
- package/dist/chunks/{pty-vqbmgfq1.js → kv-vqbmgfq1.js} +3 -3
- package/dist/chunks/{pty-vycjsnjm.js → kv-vycjsnjm.js} +2 -2
- package/dist/chunks/{pty-vz89hfgr.js → kv-vz89hfgr.js} +1 -1
- package/dist/chunks/{pty-3e611gqc.js → kv-w2dqsb3p.js} +7 -7
- package/dist/chunks/{pty-wbkt8qpj.js → kv-wbkt8qpj.js} +1 -1
- package/dist/chunks/{pty-njhebxnk.js → kv-wc64byt1.js} +1 -1
- package/dist/chunks/{pty-wd268jeg.js → kv-wd268jeg.js} +1 -1
- package/dist/chunks/{pty-whk0g8cz.js → kv-whk0g8cz.js} +4 -4
- package/dist/chunks/{pty-c0wpjb9x.js → kv-whqpbpex.js} +3 -3
- package/dist/chunks/{pty-wmxdh12w.js → kv-wmxdh12w.js} +1 -1
- package/dist/chunks/{pty-wps8gh8n.js → kv-wps8gh8n.js} +2 -2
- package/dist/chunks/{pty-72qw6s34.js → kv-x6t3f0mt.js} +7 -7
- package/dist/chunks/{pty-x89rah0x.js → kv-x89rah0x.js} +1 -1
- package/dist/chunks/{pty-vvw8wy47.js → kv-xaamjw0t.js} +4 -4
- package/dist/chunks/{pty-xczfw7dq.js → kv-xczfw7dq.js} +1 -1
- package/dist/chunks/{pty-xgv25zxy.js → kv-xgv25zxy.js} +1 -1
- package/dist/chunks/{pty-gb6y46qa.js → kv-xk62382b.js} +7 -7
- package/dist/chunks/{pty-2bh65m2v.js → kv-xv3kk1c8.js} +4 -4
- package/dist/chunks/{pty-xwftk1fd.js → kv-xwftk1fd.js} +2 -2
- package/dist/chunks/{pty-xxpvz42q.js → kv-xxpvz42q.js} +3 -3
- package/dist/chunks/{pty-8v9vyqap.js → kv-xyd30y3n.js} +7 -7
- package/dist/chunks/{pty-y0x38cee.js → kv-y0x38cee.js} +1 -1
- package/dist/chunks/{pty-y198y2ra.js → kv-y198y2ra.js} +1 -1
- package/dist/chunks/{pty-gry11svd.js → kv-y4zy7z84.js} +7 -7
- package/dist/chunks/{pty-y67x6rf6.js → kv-y67x6rf6.js} +1 -1
- package/dist/chunks/{pty-d5c7vh5e.js → kv-y8bhddg5.js} +5 -5
- package/dist/chunks/{pty-y980s7ka.js → kv-y980s7ka.js} +3 -3
- package/dist/chunks/{pty-ybhfpy64.js → kv-ybhfpy64.js} +2 -2
- package/dist/chunks/{pty-yc2vxtaa.js → kv-yc2vxtaa.js} +2 -2
- package/dist/chunks/{pty-3tmjw1xx.js → kv-ydp36znb.js} +2 -2
- package/dist/chunks/{pty-yf0knd5z.js → kv-yf0knd5z.js} +2 -2
- package/dist/chunks/{pty-ygy0xbqa.js → kv-ygy0xbqa.js} +3 -3
- package/dist/chunks/{pty-0b0bqs4b.js → kv-yj6j21rs.js} +4 -4
- package/dist/chunks/{pty-fd9akh10.js → kv-yk8p9vz7.js} +14 -14
- package/dist/chunks/{pty-mzh6z5a7.js → kv-z0cdzwb8.js} +5 -5
- package/dist/chunks/{pty-cb10vk7s.js → kv-z0nqfmpz.js} +11 -11
- package/dist/chunks/{pty-zbqqnp0n.js → kv-zbqqnp0n.js} +1 -1
- package/dist/chunks/{pty-zdkg1k91.js → kv-zdkg1k91.js} +1 -1
- package/dist/chunks/{pty-41e94bne.js → kv-znpzapdm.js} +17 -17
- package/dist/chunks/{pty-ztjk4rav.js → kv-ztjk4rav.js} +4 -4
- package/dist/chunks/{pty-0jpabrph.js → kv-ztxrn9cn.js} +11 -11
- package/dist/chunks/{pty-agqwgkz2.js → kv-ztz12k4m.js} +8 -8
- package/dist/chunks/{pty-zxcy6vhn.js → kv-zxcy6vhn.js} +1 -1
- package/dist/chunks/{pty-zxe9jjhn.js → kv-zxe9jjhn.js} +2 -2
- package/dist/codemode/catalog.js +2 -2
- package/dist/codemode/instructions.js +4 -4
- package/dist/codemode/tool.js +3 -3
- package/dist/command.js +70 -70
- package/dist/config/markdown.js +2 -2
- package/dist/config/normalize.js +20 -20
- package/dist/config/plugin/agent.js +135 -135
- package/dist/config/plugin/command.js +118 -118
- package/dist/config/plugin/compaction.js +170 -170
- package/dist/config/plugin/entry-observer.js +114 -114
- package/dist/config/plugin/formatter.js +119 -119
- package/dist/config/plugin/image.js +130 -130
- package/dist/config/plugin/instruction.js +90 -90
- package/dist/config/plugin/location-watcher.js +117 -117
- package/dist/config/plugin/mcp.js +127 -127
- package/dist/config/plugin/policy.js +116 -116
- package/dist/config/plugin/provider.js +115 -115
- package/dist/config/plugin/reference.js +119 -119
- package/dist/config/plugin/shell.js +118 -118
- package/dist/config/plugin/skill-file.js +108 -108
- package/dist/config/plugin/skill.js +138 -138
- package/dist/config/plugin/snapshot.js +117 -117
- package/dist/config/plugin/source.js +114 -114
- package/dist/config/plugin/tool-output.js +119 -119
- package/dist/config/plugin/websearch.js +115 -115
- package/dist/config/variable.js +4 -4
- package/dist/config.js +113 -113
- package/dist/credential/sql.js +3 -3
- package/dist/credential.js +71 -71
- package/dist/database/database.js +65 -65
- package/dist/database/drizzle/effect-sqlite/driver.js +13 -13
- package/dist/database/drizzle/effect-sqlite/index.js +13 -13
- package/dist/database/drizzle/effect-sqlite/session.js +12 -12
- package/dist/database/drizzle/index.js +14 -14
- package/dist/database/drizzle/internal/drizzle-utils.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/count.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/db.js +10 -10
- package/dist/database/drizzle/sqlite-core/effect/delete.js +3 -3
- package/dist/database/drizzle/sqlite-core/effect/index.js +20 -20
- package/dist/database/drizzle/sqlite-core/effect/insert.js +3 -3
- package/dist/database/drizzle/sqlite-core/effect/query.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/raw.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/select.js +3 -3
- package/dist/database/drizzle/sqlite-core/effect/session.js +11 -11
- package/dist/database/drizzle/sqlite-core/effect/update.js +3 -3
- package/dist/database/drizzle.js +15 -15
- package/dist/database/migration/20260127222353_familiar_lady_ursula.js +2 -2
- package/dist/database/migration/20260211171708_add_project_commands.js +2 -2
- package/dist/database/migration/20260213144116_wakeful_the_professor.js +2 -2
- package/dist/database/migration/20260225215848_workspace.js +2 -2
- package/dist/database/migration/20260227213759_add_session_workspace_id.js +2 -2
- package/dist/database/migration/20260228203230_blue_harpoon.js +2 -2
- package/dist/database/migration/20260303231226_add_workspace_fields.js +2 -2
- package/dist/database/migration/20260309230000_move_org_to_state.js +2 -2
- package/dist/database/migration/20260312043431_session_message_cursor.js +2 -2
- package/dist/database/migration/20260323234822_events.js +2 -2
- package/dist/database/migration/20260410174513_workspace-name.js +2 -2
- package/dist/database/migration/20260413175956_chief_energizer.js +2 -2
- package/dist/database/migration/20260423070820_add_icon_url_override.js +2 -2
- package/dist/database/migration/20260427172553_slow_nightmare.js +2 -2
- package/dist/database/migration/20260428004200_add_session_path.js +2 -2
- package/dist/database/migration/20260501142318_next_venus.js +2 -2
- package/dist/database/migration/20260504145000_add_sync_owner.js +2 -2
- package/dist/database/migration/20260507164347_add_workspace_time.js +2 -2
- package/dist/database/migration/20260510033149_session_usage.js +2 -2
- package/dist/database/migration/20260511000411_data_migration_state.js +2 -2
- package/dist/database/migration/20260511173437_session-metadata.js +2 -2
- package/dist/database/migration/20260601010001_normalize_storage_paths.js +2 -2
- package/dist/database/migration/20260601202201_amazing_prowler.js +2 -2
- package/dist/database/migration/20260602002951_lowly_union_jack.js +2 -2
- package/dist/database/migration/20260602182828_add_project_directories.js +2 -2
- package/dist/database/migration/20260603001617_session_message_projection_indexes.js +2 -2
- package/dist/database/migration/20260603040000_session_message_projection_order.js +2 -2
- package/dist/database/migration/20260603141458_session_input_inbox.js +2 -2
- package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +2 -2
- package/dist/database/migration/20260604172448_event_sourced_session_input.js +2 -2
- package/dist/database/migration/20260605003541_add_session_context_snapshot.js +2 -2
- package/dist/database/migration/20260605042240_add_context_epoch_agent.js +2 -2
- package/dist/database/migration/20260611035744_credential.js +2 -2
- package/dist/database/migration/20260611192811_lush_chimera.js +2 -2
- package/dist/database/migration/20260612174303_project_dir_strategy.js +2 -2
- package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +2 -2
- package/dist/database/migration/20260622170816_reset_v2_session_state.js +2 -2
- package/dist/database/migration/20260622202450_simplify_session_input.js +2 -2
- package/dist/database/migration/20260804233008_loose_psylocke.js +2 -2
- package/dist/database/migration/20260805200742_import_legacy_credentials.js +2 -2
- package/dist/database/migration/20260808023530_workspace_domain.js +2 -2
- package/dist/database/migration/20260811161259_execution_claim_attempts.js +2 -2
- package/dist/database/migration/20260812181746_session_inbox.js +2 -2
- package/dist/database/migration/20260812213948_worktree.js +2 -2
- package/dist/database/migration/20260819222447_session_viewed_state.js +2 -2
- package/dist/database/migration/20260823191254_nullable_workspace_binding.js +2 -2
- package/dist/database/migration.gen.js +48 -48
- package/dist/database/migration.js +50 -50
- package/dist/database/path.js +3 -3
- package/dist/database/schema.gen.js +2 -2
- package/dist/database/schema.sql.js +2 -2
- package/dist/database/sqlite.bun.js +2 -2
- package/dist/database/sqlite.js +2 -2
- package/dist/database/sqlite.node.js +2 -2
- package/dist/database/sqlite.workerd.js +2 -2
- package/dist/database/v1-migration.bun.js +77 -77
- package/dist/database/v1-migration.js +2 -2
- package/dist/database/v1-migration.noop.js +1 -1
- package/dist/effect/app-node-builder.js +327 -327
- package/dist/effect/app-node-platform.js +3 -3
- package/dist/effect/keyed-mutex.js +2 -2
- package/dist/effect/websocket-constructor.js +2 -2
- package/dist/environment/driver.js +1 -1
- package/dist/environment/environment.js +91 -91
- package/dist/environment/exec-defaults.js +3 -3
- package/dist/environment/files.js +2 -2
- package/dist/environment/index.js +93 -93
- package/dist/environment/local.js +3 -3
- package/dist/environment/memory.js +3 -3
- package/dist/environment/unavailable.js +1 -1
- package/dist/event/sql.js +2 -2
- package/dist/event-logger.js +68 -68
- package/dist/file-mutation.js +92 -92
- package/dist/file-retention.js +2 -2
- package/dist/file.js +2 -2
- package/dist/filesystem/fff.bun.js +2 -2
- package/dist/filesystem/fff.js +2 -2
- package/dist/filesystem/fff.node.js +2 -2
- package/dist/filesystem/fff.workerd.js +2 -2
- package/dist/filesystem/ignore.js +1 -1
- package/dist/filesystem/location-watcher-policy.js +3 -3
- package/dist/filesystem/location-watcher.js +306 -306
- package/dist/filesystem/protected.js +2 -2
- package/dist/filesystem/search.js +96 -96
- package/dist/filesystem/watcher-binding.js +2 -2
- package/dist/filesystem/watcher.js +4 -4
- package/dist/filesystem.js +96 -96
- package/dist/form.js +69 -69
- package/dist/formatter/builtins.js +3 -3
- package/dist/formatter.js +85 -85
- package/dist/generate.js +84 -84
- package/dist/git.js +5 -5
- package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +2 -2
- package/dist/github-copilot/chat/get-response-metadata.js +2 -2
- package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +2 -2
- package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +8 -8
- package/dist/github-copilot/chat/openai-compatible-chat-options.js +2 -2
- package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +2 -2
- package/dist/github-copilot/copilot-provider.js +20 -20
- package/dist/github-copilot/models.js +4 -4
- package/dist/github-copilot/openai-compatible-error.js +2 -2
- package/dist/github-copilot/responses/convert-to-openai-responses-input.js +2 -2
- package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +2 -2
- package/dist/github-copilot/responses/openai-error.js +2 -2
- package/dist/github-copilot/responses/openai-responses-language-model.js +11 -11
- package/dist/github-copilot/responses/openai-responses-prepare-tools.js +7 -7
- package/dist/github-copilot/responses/tool/code-interpreter.js +2 -2
- package/dist/github-copilot/responses/tool/file-search.js +2 -2
- package/dist/github-copilot/responses/tool/image-generation.js +2 -2
- package/dist/github-copilot/responses/tool/web-search-preview.js +2 -2
- package/dist/github-copilot/responses/tool/web-search.js +2 -2
- package/dist/id/id.js +2 -2
- package/dist/image/photon-wasm.bun.js +1 -1
- package/dist/image/photon-wasm.node.js +1 -1
- package/dist/image/photon-wasm.workerd.js +1 -1
- package/dist/image/photon.js +98 -98
- package/dist/image.js +98 -98
- package/dist/instruction-discovery.js +72 -72
- package/dist/instructions/builtins.js +86 -86
- package/dist/instructions/index.js +2 -2
- package/dist/integration/connection.js +2 -2
- package/dist/integration.js +75 -75
- package/dist/job.js +72 -72
- package/dist/kv/sql.js +3 -3
- package/dist/kv.js +68 -68
- package/dist/location-activity.js +87 -87
- package/dist/location-mutation.js +84 -84
- package/dist/location-service-map.js +84 -84
- package/dist/location-services.js +327 -327
- package/dist/location.js +83 -83
- package/dist/mcp/client.js +96 -93
- package/dist/mcp/index.js +98 -98
- package/dist/mcp/instructions.js +128 -128
- package/dist/mcp/oauth.js +2 -2
- package/dist/mcp/stdio.js +92 -92
- package/dist/mime.js +2 -2
- package/dist/model-resolver.js +81 -81
- package/dist/model.js +3 -3
- package/dist/models-dev.js +75 -75
- package/dist/oauth/page.js +2 -2
- package/dist/permission/saved.js +84 -84
- package/dist/permission/sql.js +6 -6
- package/dist/permission.js +105 -105
- package/dist/persistent-pty/binary.bun.js +2 -2
- package/dist/persistent-pty/binary.node.js +1 -1
- package/dist/persistent-pty/binary.workerd.js +1 -1
- package/dist/persistent-pty/daemon.js +2 -2
- package/dist/persistent-pty/index.js +70 -70
- package/dist/persistent-pty/pty-binding.js +2 -2
- package/dist/persistent-pty.js +70 -70
- package/dist/plugin/agent.js +106 -106
- package/dist/plugin/command.js +99 -99
- package/dist/plugin/hooks.js +3 -3
- package/dist/plugin/host.js +170 -170
- package/dist/plugin/internal.js +300 -300
- package/dist/plugin/mcp-codemode-exclusion.js +2 -2
- package/dist/plugin/models-dev.js +76 -76
- package/dist/plugin/module.js +3 -3
- package/dist/plugin/plan.js +106 -106
- package/dist/plugin/promise.js +2 -2
- package/dist/plugin/provider/alibaba.js +3 -3
- package/dist/plugin/provider/amazon-bedrock.js +3 -3
- package/dist/plugin/provider/anthropic.js +3 -3
- package/dist/plugin/provider/azure.js +121 -121
- package/dist/plugin/provider/cerebras.js +3 -3
- package/dist/plugin/provider/cloudflare-ai-gateway.js +122 -122
- package/dist/plugin/provider/cloudflare-workers-ai.js +122 -122
- package/dist/plugin/provider/cohere.js +3 -3
- package/dist/plugin/provider/configured.js +119 -119
- package/dist/plugin/provider/dynamic.js +2 -2
- package/dist/plugin/provider/factory.js +2 -2
- package/dist/plugin/provider/gateway.js +3 -3
- package/dist/plugin/provider/github-copilot.js +82 -82
- package/dist/plugin/provider/gitlab.js +4 -4
- package/dist/plugin/provider/google-vertex.js +3 -3
- package/dist/plugin/provider/kilo.js +3 -3
- package/dist/plugin/provider/llmgateway.js +77 -77
- package/dist/plugin/provider/lmstudio.js +114 -114
- package/dist/plugin/provider/mistral.js +3 -3
- package/dist/plugin/provider/nvidia.js +3 -3
- package/dist/plugin/provider/ollama.js +114 -114
- package/dist/plugin/provider/openai-compatible.js +2 -2
- package/dist/plugin/provider/openai.js +79 -79
- package/dist/plugin/provider/opencode.js +93 -93
- package/dist/plugin/provider/openrouter.js +4 -4
- package/dist/plugin/provider/perplexity.js +3 -3
- package/dist/plugin/provider/sap-ai-core.js +3 -3
- package/dist/plugin/provider/snowflake-cortex.js +3 -3
- package/dist/plugin/provider/venice.js +3 -3
- package/dist/plugin/provider/vercel.js +3 -3
- package/dist/plugin/provider/vllm.js +114 -114
- package/dist/plugin/provider/xai.js +78 -78
- package/dist/plugin/provider/zenmux.js +3 -3
- package/dist/plugin/provider.js +157 -157
- package/dist/plugin/runtime.js +158 -158
- package/dist/plugin/sdk.js +69 -69
- package/dist/plugin/skill.js +136 -136
- package/dist/plugin/source-directory.js +2 -2
- package/dist/plugin/supervisor-service.js +2 -2
- package/dist/plugin/supervisor.js +305 -305
- package/dist/plugin/system-prompt.js +2 -2
- package/dist/plugin/variant.js +4 -4
- package/dist/plugin/vcs/git.js +85 -85
- package/dist/plugin/vcs/hg.js +85 -85
- package/dist/plugin/warming.js +115 -115
- package/dist/plugin/websearch/exa.js +4 -4
- package/dist/plugin/websearch/firecrawl.js +5 -5
- package/dist/plugin/websearch/index.js +9 -9
- package/dist/plugin/websearch/mcp.js +3 -3
- package/dist/plugin/websearch/parallel.js +5 -5
- package/dist/plugin/websearch/tavily.js +3 -3
- package/dist/plugin.js +171 -171
- package/dist/project/markers.js +74 -74
- package/dist/project/schema.js +3 -3
- package/dist/project/sql.js +5 -5
- package/dist/project.js +82 -82
- package/dist/provider.js +2 -2
- package/dist/pty/protocol.js +1 -1
- package/dist/pty/pty.bun.js +1 -1
- package/dist/pty/pty.node.js +1 -1
- package/dist/pty/pty.workerd.js +1 -1
- package/dist/pty/schema.js +2 -2
- package/dist/pty/ticket.js +70 -70
- package/dist/pty.js +89 -89
- package/dist/reference/instructions.js +77 -77
- package/dist/reference.js +75 -75
- package/dist/repository-cache.js +7 -7
- package/dist/repository.js +2 -2
- package/dist/ripgrep/binary.js +3 -3
- package/dist/ripgrep.js +94 -94
- package/dist/schema.js +2 -2
- package/dist/session/compaction.js +142 -142
- package/dist/session/context.js +312 -312
- package/dist/session/environment.js +3 -3
- package/dist/session/error.js +4 -4
- package/dist/session/event.js +2 -2
- package/dist/session/execution/restart.js +156 -156
- package/dist/session/execution.js +125 -125
- package/dist/session/generate-node.js +313 -313
- package/dist/session/generate.js +2 -2
- package/dist/session/history.js +77 -77
- package/dist/session/inbox.js +77 -77
- package/dist/session/info.js +92 -92
- package/dist/session/instruction-entry.js +73 -73
- package/dist/session/instruction-state.js +10 -10
- package/dist/session/instructions.js +101 -101
- package/dist/session/message-updater.js +4 -4
- package/dist/session/message.js +2 -2
- package/dist/session/model-request.js +138 -138
- package/dist/session/model-transport.js +5 -5
- package/dist/session/projector.js +90 -90
- package/dist/session/prompt-cache-diagnostics.js +2 -2
- package/dist/session/revert.js +90 -90
- package/dist/session/run-coordinator.js +2 -2
- package/dist/session/runner/index.js +84 -84
- package/dist/session/runner/llm.js +319 -319
- package/dist/session/runner/max-steps.js +2 -2
- package/dist/session/runner/model.js +83 -83
- package/dist/session/runner/publish-llm-event.js +4 -4
- package/dist/session/runner/retry.js +72 -72
- package/dist/session/runner/step.js +147 -147
- package/dist/session/runner/to-llm-message.js +2 -2
- package/dist/session/schema.js +2 -2
- package/dist/session/sql.js +6 -6
- package/dist/session/stats.js +71 -71
- package/dist/session/store.js +100 -100
- package/dist/session/system-prompt.js +2 -2
- package/dist/session/title.js +140 -140
- package/dist/session/to-session-error.js +116 -116
- package/dist/session/transfer.js +158 -158
- package/dist/session/usage.js +2 -2
- package/dist/session.js +156 -156
- package/dist/shell/parse.js +9 -6
- package/dist/shell/parser-wasm.bun.js +1 -1
- package/dist/shell/parser-wasm.node.js +1 -1
- package/dist/shell/parser-wasm.workerd.js +1 -1
- package/dist/shell/scan.js +1084 -365
- package/dist/shell/select.js +4 -4
- package/dist/shell.js +99 -99
- package/dist/skill/discovery.js +3 -3
- package/dist/skill/instructions.js +107 -107
- package/dist/skill.js +106 -106
- package/dist/snapshot.js +85 -85
- package/dist/state.js +2 -2
- package/dist/tool/html-markdown.js +2 -2
- package/dist/tool/http-body.js +2 -2
- package/dist/tool/mcp.js +127 -127
- package/dist/tool/plugin/edit.js +115 -115
- package/dist/tool/plugin/file-diff.js +2 -2
- package/dist/tool/plugin/glob.js +117 -117
- package/dist/tool/plugin/grep.js +117 -117
- package/dist/tool/plugin/patch.js +115 -115
- package/dist/tool/plugin/question.js +107 -107
- package/dist/tool/plugin/read.js +120 -120
- package/dist/tool/plugin/shell.js +186 -186
- package/dist/tool/plugin/skill.js +107 -107
- package/dist/tool/plugin/subagent.js +183 -183
- package/dist/tool/plugin/webfetch.js +108 -108
- package/dist/tool/plugin/websearch.js +110 -110
- package/dist/tool/plugin/write.js +115 -115
- package/dist/tool/read-filesystem.js +98 -98
- package/dist/tool/runtime.js +2 -2
- package/dist/tool-output.js +5 -5
- package/dist/tool.js +120 -120
- package/dist/types/shell/parse.d.ts +8 -6
- package/dist/types/shell/scan.d.ts +6 -3
- package/dist/util/array.js +1 -1
- package/dist/util/error.js +2 -2
- package/dist/util/identifier.js +1 -1
- package/dist/util/iife.js +2 -2
- package/dist/util/lazy.js +2 -2
- package/dist/util/process-lock-ffi.bun.js +1 -1
- package/dist/util/process-lock-ffi.node.js +1 -1
- package/dist/util/process-lock-ffi.workerd.js +1 -1
- package/dist/util/process-lock.js +1 -1
- package/dist/util/slug.js +2 -2
- package/dist/util/token.js +2 -2
- package/dist/util/which.js +2 -2
- package/dist/util/wildcard.js +2 -2
- package/dist/v1/config/agent.js +4 -4
- package/dist/v1/config/attachment.js +3 -3
- package/dist/v1/config/command.js +2 -2
- package/dist/v1/config/config.js +15 -15
- package/dist/v1/config/error.js +3 -3
- package/dist/v1/config/formatter.js +2 -2
- package/dist/v1/config/layout.js +2 -2
- package/dist/v1/config/lsp.js +2 -2
- package/dist/v1/config/mcp.js +3 -3
- package/dist/v1/config/migrate.js +19 -19
- package/dist/v1/config/permission.js +2 -2
- package/dist/v1/config/plugin.js +2 -2
- package/dist/v1/config/provider-options.js +2 -2
- package/dist/v1/config/provider.js +3 -3
- package/dist/v1/config/server.js +3 -3
- package/dist/v1/config/skills.js +2 -2
- package/dist/v1/permission.js +1 -1
- package/dist/vcs/patch.js +2 -2
- package/dist/vcs.js +86 -86
- package/dist/websearch.js +73 -73
- package/dist/wellknown/plugin.js +73 -73
- package/dist/wellknown.js +72 -72
- package/dist/workspace/driver.js +2 -2
- package/dist/workspace/sql.js +2 -2
- package/dist/workspace.js +69 -69
- package/dist/worktree/directory.js +3 -3
- package/dist/worktree/git.js +7 -7
- package/dist/worktree/sql.js +6 -6
- package/dist/worktree.js +87 -87
- package/package.json +8 -8
- package/dist/chunks/pty-nv9gjhyw.js +0 -712
- /package/dist/chunks/{pty-0cgt0xh2.js → kv-0cgt0xh2.js} +0 -0
- /package/dist/chunks/{pty-0f48qthw.js → kv-0f48qthw.js} +0 -0
- /package/dist/chunks/{pty-0zz82cjq.js → kv-0zz82cjq.js} +0 -0
- /package/dist/chunks/{pty-1fb7bmpf.js → kv-1fb7bmpf.js} +0 -0
- /package/dist/chunks/{pty-1wcz8fvj.js → kv-1wcz8fvj.js} +0 -0
- /package/dist/chunks/{pty-29n7vfk2.js → kv-29n7vfk2.js} +0 -0
- /package/dist/chunks/{pty-2qdx6zz3.js → kv-2qdx6zz3.js} +0 -0
- /package/dist/chunks/{pty-2xb0r1c6.js → kv-2xb0r1c6.js} +0 -0
- /package/dist/chunks/{pty-39ktntah.js → kv-39ktntah.js} +0 -0
- /package/dist/chunks/{pty-3g3rpp2x.js → kv-3g3rpp2x.js} +0 -0
- /package/dist/chunks/{pty-3q6gbwmd.js → kv-3q6gbwmd.js} +0 -0
- /package/dist/chunks/{pty-3w3ybtfd.js → kv-3w3ybtfd.js} +0 -0
- /package/dist/chunks/{pty-47ty4mvs.js → kv-47ty4mvs.js} +0 -0
- /package/dist/chunks/{pty-4b2tz2m9.js → kv-4b2tz2m9.js} +0 -0
- /package/dist/chunks/{pty-5a5ch9ts.js → kv-5a5ch9ts.js} +0 -0
- /package/dist/chunks/{pty-5va1yh78.js → kv-5va1yh78.js} +0 -0
- /package/dist/chunks/{pty-61ek4hj9.js → kv-61ek4hj9.js} +0 -0
- /package/dist/chunks/{pty-69qrqpw0.js → kv-69qrqpw0.js} +0 -0
- /package/dist/chunks/{pty-6zqxzw0a.js → kv-6zqxzw0a.js} +0 -0
- /package/dist/chunks/{pty-7n9qwqk4.js → kv-7n9qwqk4.js} +0 -0
- /package/dist/chunks/{pty-8nn8kqcn.js → kv-8nn8kqcn.js} +0 -0
- /package/dist/chunks/{pty-8rpfd2h6.js → kv-8rpfd2h6.js} +0 -0
- /package/dist/chunks/{pty-8sj3ajy5.js → kv-8sj3ajy5.js} +0 -0
- /package/dist/chunks/{pty-8w9tzfz1.js → kv-8w9tzfz1.js} +0 -0
- /package/dist/chunks/{pty-906y0b6d.js → kv-906y0b6d.js} +0 -0
- /package/dist/chunks/{pty-9dct5xhx.js → kv-9dct5xhx.js} +0 -0
- /package/dist/chunks/{pty-9sdtsapf.js → kv-9sdtsapf.js} +0 -0
- /package/dist/chunks/{pty-a02svayp.js → kv-a02svayp.js} +0 -0
- /package/dist/chunks/{pty-a83yvq99.js → kv-a83yvq99.js} +0 -0
- /package/dist/chunks/{pty-ayevdmef.js → kv-ayevdmef.js} +0 -0
- /package/dist/chunks/{pty-b02txbh8.js → kv-b02txbh8.js} +0 -0
- /package/dist/chunks/{pty-bbqs2y60.js → kv-bbqs2y60.js} +0 -0
- /package/dist/chunks/{pty-bjwj8hwv.js → kv-bjwj8hwv.js} +0 -0
- /package/dist/chunks/{pty-brsh5f65.js → kv-brsh5f65.js} +0 -0
- /package/dist/chunks/{pty-bxdhjb3y.js → kv-bxdhjb3y.js} +0 -0
- /package/dist/chunks/{pty-c77ad0vh.js → kv-c77ad0vh.js} +0 -0
- /package/dist/chunks/{pty-ck5pgha0.js → kv-ck5pgha0.js} +0 -0
- /package/dist/chunks/{pty-cm67rqy2.js → kv-cm67rqy2.js} +0 -0
- /package/dist/chunks/{pty-df3v2q6j.js → kv-df3v2q6j.js} +0 -0
- /package/dist/chunks/{pty-dhcq6c44.js → kv-dhcq6c44.js} +0 -0
- /package/dist/chunks/{pty-dht5baf0.js → kv-dht5baf0.js} +0 -0
- /package/dist/chunks/{pty-dkmkay92.js → kv-dkmkay92.js} +0 -0
- /package/dist/chunks/{pty-drean1vx.js → kv-drean1vx.js} +0 -0
- /package/dist/chunks/{pty-ehj9csmv.js → kv-ehj9csmv.js} +0 -0
- /package/dist/chunks/{pty-em6xpscd.js → kv-em6xpscd.js} +0 -0
- /package/dist/chunks/{pty-emmqknsm.js → kv-emmqknsm.js} +0 -0
- /package/dist/chunks/{pty-ezs3tagn.js → kv-ezs3tagn.js} +0 -0
- /package/dist/chunks/{pty-f14r7hfz.js → kv-f14r7hfz.js} +0 -0
- /package/dist/chunks/{pty-f4cp4g4a.js → kv-f4cp4g4a.js} +0 -0
- /package/dist/chunks/{pty-faypg4r1.js → kv-faypg4r1.js} +0 -0
- /package/dist/chunks/{pty-fgbfdq62.js → kv-fgbfdq62.js} +0 -0
- /package/dist/chunks/{pty-gd5xeqc2.js → kv-gd5xeqc2.js} +0 -0
- /package/dist/chunks/{pty-ghm4673n.js → kv-ghm4673n.js} +0 -0
- /package/dist/chunks/{pty-ghwjy7my.js → kv-ghwjy7my.js} +0 -0
- /package/dist/chunks/{pty-gqn2zsfg.js → kv-gqn2zsfg.js} +0 -0
- /package/dist/chunks/{pty-gy500k2r.js → kv-gy500k2r.js} +0 -0
- /package/dist/chunks/{pty-h846wrk2.js → kv-h846wrk2.js} +0 -0
- /package/dist/chunks/{pty-hzeg9cfr.js → kv-hzeg9cfr.js} +0 -0
- /package/dist/chunks/{pty-j07kk359.js → kv-j07kk359.js} +0 -0
- /package/dist/chunks/{pty-jve7t217.js → kv-jve7t217.js} +0 -0
- /package/dist/chunks/{pty-k3e42drn.js → kv-k3e42drn.js} +0 -0
- /package/dist/chunks/{pty-k8b45nas.js → kv-k8b45nas.js} +0 -0
- /package/dist/chunks/{pty-kcacmy5c.js → kv-kcacmy5c.js} +0 -0
- /package/dist/chunks/{pty-kpdbz7gn.js → kv-kpdbz7gn.js} +0 -0
- /package/dist/chunks/{pty-kxy11nzk.js → kv-kxy11nzk.js} +0 -0
- /package/dist/chunks/{pty-kyyqvx4s.js → kv-kyyqvx4s.js} +0 -0
- /package/dist/chunks/{pty-m8cbvarh.js → kv-m8cbvarh.js} +0 -0
- /package/dist/chunks/{pty-ma60vzgv.js → kv-ma60vzgv.js} +0 -0
- /package/dist/chunks/{pty-n3m50c2t.js → kv-n3m50c2t.js} +0 -0
- /package/dist/chunks/{pty-nkm1m8dz.js → kv-nkm1m8dz.js} +0 -0
- /package/dist/chunks/{pty-nsc0c3zb.js → kv-nsc0c3zb.js} +0 -0
- /package/dist/chunks/{pty-qaarhjrp.js → kv-qaarhjrp.js} +0 -0
- /package/dist/chunks/{pty-qc167nrn.js → kv-qc167nrn.js} +0 -0
- /package/dist/chunks/{pty-qp95y4jb.js → kv-qp95y4jb.js} +0 -0
- /package/dist/chunks/{pty-r8f4w671.js → kv-r8f4w671.js} +0 -0
- /package/dist/chunks/{pty-rdfev9jy.js → kv-rdfev9jy.js} +0 -0
- /package/dist/chunks/{pty-rvfvac9x.js → kv-rvfvac9x.js} +0 -0
- /package/dist/chunks/{pty-s7whb9gt.js → kv-s7whb9gt.js} +0 -0
- /package/dist/chunks/{pty-se76j685.js → kv-se76j685.js} +0 -0
- /package/dist/chunks/{pty-sem2g21k.js → kv-sem2g21k.js} +0 -0
- /package/dist/chunks/{pty-sp575ygv.js → kv-sp575ygv.js} +0 -0
- /package/dist/chunks/{pty-tmb1f636.js → kv-tmb1f636.js} +0 -0
- /package/dist/chunks/{pty-ttxf0gsy.js → kv-ttxf0gsy.js} +0 -0
- /package/dist/chunks/{pty-tvmhrvfj.js → kv-tvmhrvfj.js} +0 -0
- /package/dist/chunks/{pty-v2adqbbe.js → kv-v2adqbbe.js} +0 -0
- /package/dist/chunks/{pty-wj4sxzqa.js → kv-wj4sxzqa.js} +0 -0
- /package/dist/chunks/{pty-wwntjmk1.js → kv-wwntjmk1.js} +0 -0
- /package/dist/chunks/{pty-wyqjaaa5.js → kv-wyqjaaa5.js} +0 -0
- /package/dist/chunks/{pty-x4q807cx.js → kv-x4q807cx.js} +0 -0
- /package/dist/chunks/{pty-xt0068v8.js → kv-xt0068v8.js} +0 -0
- /package/dist/chunks/{pty-yrqrg4vp.js → kv-yrqrg4vp.js} +0 -0
- /package/dist/chunks/{pty-z47nswr2.js → kv-z47nswr2.js} +0 -0
- /package/dist/chunks/{pty-zsf8rs93.js → kv-zsf8rs93.js} +0 -0
|
@@ -1,712 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
exports_select
|
|
3
|
-
} from "./pty-csrx180a.js";
|
|
4
|
-
import {
|
|
5
|
-
__export,
|
|
6
|
-
__require
|
|
7
|
-
} from "./pty-rvfvac9x.js";
|
|
8
|
-
|
|
9
|
-
// src/shell/parse.ts
|
|
10
|
-
var exports_parse = {};
|
|
11
|
-
__export(exports_parse, {
|
|
12
|
-
scan: () => scan,
|
|
13
|
-
ShellParse: () => exports_parse
|
|
14
|
-
});
|
|
15
|
-
import { Effect } from "effect";
|
|
16
|
-
import { fileURLToPath } from "url";
|
|
17
|
-
import os from "os";
|
|
18
|
-
import path from "path";
|
|
19
|
-
import { shellParserWasm } from "#shell-parser-wasm";
|
|
20
|
-
var CWD = new Set(["cd", "chdir", "popd", "pushd", "push-location", "set-location"]);
|
|
21
|
-
var POWERSHELL_PATH_FLAGS = new Set(["-literalpath", "-path"]);
|
|
22
|
-
var ARITY = {
|
|
23
|
-
cat: 1,
|
|
24
|
-
cd: 1,
|
|
25
|
-
chmod: 1,
|
|
26
|
-
chown: 1,
|
|
27
|
-
cp: 1,
|
|
28
|
-
echo: 1,
|
|
29
|
-
env: 1,
|
|
30
|
-
export: 1,
|
|
31
|
-
grep: 1,
|
|
32
|
-
kill: 1,
|
|
33
|
-
killall: 1,
|
|
34
|
-
ln: 1,
|
|
35
|
-
ls: 1,
|
|
36
|
-
mkdir: 1,
|
|
37
|
-
mv: 1,
|
|
38
|
-
ps: 1,
|
|
39
|
-
pwd: 1,
|
|
40
|
-
rm: 1,
|
|
41
|
-
rmdir: 1,
|
|
42
|
-
sleep: 1,
|
|
43
|
-
source: 1,
|
|
44
|
-
tail: 1,
|
|
45
|
-
touch: 1,
|
|
46
|
-
unset: 1,
|
|
47
|
-
which: 1,
|
|
48
|
-
aws: 3,
|
|
49
|
-
az: 3,
|
|
50
|
-
bazel: 2,
|
|
51
|
-
brew: 2,
|
|
52
|
-
bun: 2,
|
|
53
|
-
"bun run": 3,
|
|
54
|
-
"bun x": 3,
|
|
55
|
-
cargo: 2,
|
|
56
|
-
"cargo add": 3,
|
|
57
|
-
"cargo run": 3,
|
|
58
|
-
cdk: 2,
|
|
59
|
-
cf: 2,
|
|
60
|
-
cmake: 2,
|
|
61
|
-
composer: 2,
|
|
62
|
-
consul: 2,
|
|
63
|
-
"consul kv": 3,
|
|
64
|
-
crictl: 2,
|
|
65
|
-
deno: 2,
|
|
66
|
-
"deno task": 3,
|
|
67
|
-
doctl: 3,
|
|
68
|
-
docker: 2,
|
|
69
|
-
"docker builder": 3,
|
|
70
|
-
"docker compose": 3,
|
|
71
|
-
"docker container": 3,
|
|
72
|
-
"docker image": 3,
|
|
73
|
-
"docker network": 3,
|
|
74
|
-
"docker volume": 3,
|
|
75
|
-
eksctl: 2,
|
|
76
|
-
"eksctl create": 3,
|
|
77
|
-
firebase: 2,
|
|
78
|
-
flyctl: 2,
|
|
79
|
-
gcloud: 3,
|
|
80
|
-
gh: 3,
|
|
81
|
-
git: 2,
|
|
82
|
-
"git config": 3,
|
|
83
|
-
"git remote": 3,
|
|
84
|
-
"git stash": 3,
|
|
85
|
-
go: 2,
|
|
86
|
-
gradle: 2,
|
|
87
|
-
helm: 2,
|
|
88
|
-
heroku: 2,
|
|
89
|
-
hugo: 2,
|
|
90
|
-
ip: 2,
|
|
91
|
-
"ip addr": 3,
|
|
92
|
-
"ip link": 3,
|
|
93
|
-
"ip netns": 3,
|
|
94
|
-
"ip route": 3,
|
|
95
|
-
kind: 2,
|
|
96
|
-
"kind create": 3,
|
|
97
|
-
kubectl: 2,
|
|
98
|
-
"kubectl kustomize": 3,
|
|
99
|
-
"kubectl rollout": 3,
|
|
100
|
-
kustomize: 2,
|
|
101
|
-
make: 2,
|
|
102
|
-
mc: 2,
|
|
103
|
-
"mc admin": 3,
|
|
104
|
-
minikube: 2,
|
|
105
|
-
mongosh: 2,
|
|
106
|
-
mysql: 2,
|
|
107
|
-
mvn: 2,
|
|
108
|
-
ng: 2,
|
|
109
|
-
npm: 2,
|
|
110
|
-
"npm exec": 3,
|
|
111
|
-
"npm init": 3,
|
|
112
|
-
"npm run": 3,
|
|
113
|
-
"npm view": 3,
|
|
114
|
-
npx: 2,
|
|
115
|
-
nvm: 2,
|
|
116
|
-
nx: 2,
|
|
117
|
-
openssl: 2,
|
|
118
|
-
"openssl req": 3,
|
|
119
|
-
"openssl x509": 3,
|
|
120
|
-
pip: 2,
|
|
121
|
-
pipenv: 2,
|
|
122
|
-
pnpm: 2,
|
|
123
|
-
"pnpm dlx": 3,
|
|
124
|
-
"pnpm exec": 3,
|
|
125
|
-
"pnpm run": 3,
|
|
126
|
-
poetry: 2,
|
|
127
|
-
podman: 2,
|
|
128
|
-
"podman container": 3,
|
|
129
|
-
"podman image": 3,
|
|
130
|
-
psql: 2,
|
|
131
|
-
pulumi: 2,
|
|
132
|
-
"pulumi stack": 3,
|
|
133
|
-
python: 2,
|
|
134
|
-
pyenv: 2,
|
|
135
|
-
rake: 2,
|
|
136
|
-
rbenv: 2,
|
|
137
|
-
"redis-cli": 2,
|
|
138
|
-
rustup: 2,
|
|
139
|
-
serverless: 2,
|
|
140
|
-
sfdx: 3,
|
|
141
|
-
skaffold: 2,
|
|
142
|
-
sls: 2,
|
|
143
|
-
sst: 2,
|
|
144
|
-
swift: 2,
|
|
145
|
-
systemctl: 2,
|
|
146
|
-
terraform: 2,
|
|
147
|
-
"terraform workspace": 3,
|
|
148
|
-
tmux: 2,
|
|
149
|
-
turbo: 2,
|
|
150
|
-
ufw: 2,
|
|
151
|
-
vault: 2,
|
|
152
|
-
"vault auth": 3,
|
|
153
|
-
"vault kv": 3,
|
|
154
|
-
vercel: 2,
|
|
155
|
-
volta: 2,
|
|
156
|
-
wp: 2,
|
|
157
|
-
yarn: 2,
|
|
158
|
-
"yarn dlx": 3,
|
|
159
|
-
"yarn run": 3
|
|
160
|
-
};
|
|
161
|
-
var scan = Effect.fnUntraced(function* (command, shell, cwd, options) {
|
|
162
|
-
if (options?.portable)
|
|
163
|
-
return yield* Effect.promise(() => scanPortable(command, shell, cwd));
|
|
164
|
-
return yield* scanLegacy(command, shell, cwd);
|
|
165
|
-
});
|
|
166
|
-
var scanLegacy = Effect.fnUntraced(function* (command, shell, cwd) {
|
|
167
|
-
const parsers = yield* Effect.promise(load);
|
|
168
|
-
const powershell = exports_select.ps(shell);
|
|
169
|
-
const tree = (powershell ? parsers.ps : parsers.bash).parse(command);
|
|
170
|
-
if (!tree)
|
|
171
|
-
return yield* Effect.fail(new Error("Failed to parse shell command"));
|
|
172
|
-
return yield* Effect.acquireUseRelease(Effect.succeed(tree), (tree2) => Effect.sync(() => tree2.rootNode.descendantsOfType("command").reduce((result, node) => {
|
|
173
|
-
if (!node)
|
|
174
|
-
return result;
|
|
175
|
-
const command2 = parts(node);
|
|
176
|
-
const tokens = command2.map((part) => part.text);
|
|
177
|
-
if (tokens.length === 0)
|
|
178
|
-
return result;
|
|
179
|
-
const name = powershell ? tokens[0].toLowerCase() : tokens[0];
|
|
180
|
-
if (CWD.has(name)) {
|
|
181
|
-
result.directories.push(...directoryArgs(command2, powershell, cwd, shell));
|
|
182
|
-
return result;
|
|
183
|
-
}
|
|
184
|
-
result.commands.push({
|
|
185
|
-
resource: (node.parent?.type === "redirected_statement" ? node.parent.text : node.text).trim(),
|
|
186
|
-
save: `${prefix(tokens).join(" ")} *`
|
|
187
|
-
});
|
|
188
|
-
return result;
|
|
189
|
-
}, { commands: [], directories: [] })), (tree2) => Effect.sync(() => tree2.delete()));
|
|
190
|
-
});
|
|
191
|
-
async function scanPortable(command, shell, cwd) {
|
|
192
|
-
const { ShellScan } = await import("../shell/scan.js");
|
|
193
|
-
const powershell = exports_select.ps(shell);
|
|
194
|
-
const result = powershell ? ShellScan.scanPowerShell(command) : ShellScan.scan(command);
|
|
195
|
-
if (result.kind === "opaque")
|
|
196
|
-
return { commands: [{ resource: command, save: command }], directories: [] };
|
|
197
|
-
const carriage = powershell ? command.search(/\r(?!\n)/) : -1;
|
|
198
|
-
if (carriage >= 0)
|
|
199
|
-
return { commands: [], directories: [] };
|
|
200
|
-
const parsed = result.commands.reduce((output, item) => {
|
|
201
|
-
const index = item[ShellScan.Nested] ? -1 : command.indexOf(item.resource, output.cursor);
|
|
202
|
-
const offset = item[ShellScan.Nested] ? command.lastIndexOf(item.resource, output.cursor - 1) : index < 0 ? command.indexOf(item.resource) : index;
|
|
203
|
-
if (index >= 0)
|
|
204
|
-
output.cursor = index + item.resource.length;
|
|
205
|
-
const before = command.slice(0, Math.max(0, offset));
|
|
206
|
-
const name = powershell ? item.words[0]?.toLowerCase() : item.words[0];
|
|
207
|
-
if (!name)
|
|
208
|
-
return output;
|
|
209
|
-
if (powershell && name === "<")
|
|
210
|
-
return output;
|
|
211
|
-
if (powershell && name === "foreach-object" && item.words.some((word) => word.startsWith("{")) && !/\|\s*$/.test(before))
|
|
212
|
-
return output;
|
|
213
|
-
const tokens = powershell ? powerShellSourceTokens(item.resource) : sourceTokens(item.resource);
|
|
214
|
-
const sourceHead = powershell ? item.words[0] : tokens.find((token) => token.value === item.words[0])?.raw;
|
|
215
|
-
if (CWD.has(name) && (powershell || sourceHead === item.words[0])) {
|
|
216
|
-
output.directories.push(...portableDirectoryArgs(item.words, tokens, powershell, cwd, shell));
|
|
217
|
-
return output;
|
|
218
|
-
}
|
|
219
|
-
const save = powershell ? powerShellSourcePrefix(tokens, item.words) : bashSourcePrefix(tokens, item.words);
|
|
220
|
-
output.commands.push({
|
|
221
|
-
resource: powershell ? item.resource : bashResource(item.resource, before),
|
|
222
|
-
save: `${save} *`
|
|
223
|
-
});
|
|
224
|
-
return output;
|
|
225
|
-
}, {
|
|
226
|
-
commands: [],
|
|
227
|
-
directories: [],
|
|
228
|
-
cursor: 0
|
|
229
|
-
});
|
|
230
|
-
return { commands: parsed.commands, directories: parsed.directories };
|
|
231
|
-
}
|
|
232
|
-
function bashResource(resource, before) {
|
|
233
|
-
if (!/(?:&&|\|\||\|&)\s*$|\|\s*$/.test(before))
|
|
234
|
-
return resource;
|
|
235
|
-
const redirect = bashRedirect(resource);
|
|
236
|
-
return redirect < 0 ? resource : resource.slice(0, redirect).replace(/\d+$/, "").trim();
|
|
237
|
-
}
|
|
238
|
-
function bashRedirect(resource) {
|
|
239
|
-
let quote;
|
|
240
|
-
for (let index = 0;index < resource.length; index++) {
|
|
241
|
-
const char = resource[index];
|
|
242
|
-
if (quote === "single") {
|
|
243
|
-
if (char === "'")
|
|
244
|
-
quote = undefined;
|
|
245
|
-
continue;
|
|
246
|
-
}
|
|
247
|
-
if (char === "\\") {
|
|
248
|
-
index++;
|
|
249
|
-
continue;
|
|
250
|
-
}
|
|
251
|
-
if (char === '"') {
|
|
252
|
-
quote = quote === "double" ? undefined : "double";
|
|
253
|
-
continue;
|
|
254
|
-
}
|
|
255
|
-
if (quote === "double") {
|
|
256
|
-
if (char === "$" && resource[index + 1] === "(")
|
|
257
|
-
index = bashParenthesizedEnd(resource, index + 1);
|
|
258
|
-
else if (char === "`")
|
|
259
|
-
index = bashBacktickEnd(resource, index);
|
|
260
|
-
continue;
|
|
261
|
-
}
|
|
262
|
-
if (char === "'") {
|
|
263
|
-
quote = "single";
|
|
264
|
-
continue;
|
|
265
|
-
}
|
|
266
|
-
if ((char === "$" || char === "<" || char === ">") && resource[index + 1] === "(") {
|
|
267
|
-
index = bashParenthesizedEnd(resource, index + 1);
|
|
268
|
-
continue;
|
|
269
|
-
}
|
|
270
|
-
if (char === "`") {
|
|
271
|
-
index = bashBacktickEnd(resource, index);
|
|
272
|
-
continue;
|
|
273
|
-
}
|
|
274
|
-
if (char === "<" || char === ">" || char === "&" && resource[index + 1] === ">")
|
|
275
|
-
return index;
|
|
276
|
-
}
|
|
277
|
-
return -1;
|
|
278
|
-
}
|
|
279
|
-
function bashParenthesizedEnd(resource, start) {
|
|
280
|
-
let level = 1;
|
|
281
|
-
let quote;
|
|
282
|
-
for (let index = start + 1;index < resource.length; index++) {
|
|
283
|
-
const char = resource[index];
|
|
284
|
-
if (quote === "single") {
|
|
285
|
-
if (char === "'")
|
|
286
|
-
quote = undefined;
|
|
287
|
-
continue;
|
|
288
|
-
}
|
|
289
|
-
if (char === "\\") {
|
|
290
|
-
index++;
|
|
291
|
-
continue;
|
|
292
|
-
}
|
|
293
|
-
if (char === '"') {
|
|
294
|
-
quote = quote === "double" ? undefined : "double";
|
|
295
|
-
continue;
|
|
296
|
-
}
|
|
297
|
-
if (quote === "double")
|
|
298
|
-
continue;
|
|
299
|
-
if (char === "'") {
|
|
300
|
-
quote = "single";
|
|
301
|
-
continue;
|
|
302
|
-
}
|
|
303
|
-
if (char === "(")
|
|
304
|
-
level++;
|
|
305
|
-
if (char === ")" && --level === 0)
|
|
306
|
-
return index;
|
|
307
|
-
}
|
|
308
|
-
return resource.length - 1;
|
|
309
|
-
}
|
|
310
|
-
function bashBacktickEnd(resource, start) {
|
|
311
|
-
for (let index = start + 1;index < resource.length; index++) {
|
|
312
|
-
if (resource[index] === "\\")
|
|
313
|
-
index++;
|
|
314
|
-
else if (resource[index] === "`")
|
|
315
|
-
return index;
|
|
316
|
-
}
|
|
317
|
-
return resource.length - 1;
|
|
318
|
-
}
|
|
319
|
-
function portableDirectoryArgs(command, tokens, powershell, cwd, shell) {
|
|
320
|
-
if (!powershell) {
|
|
321
|
-
const start2 = tokens.findIndex((token) => token.value === command[0]);
|
|
322
|
-
if (start2 < 0)
|
|
323
|
-
return [];
|
|
324
|
-
return directoryArgs(tokens.slice(start2).map((token) => ({ type: "word", text: token.raw })), false, cwd, shell);
|
|
325
|
-
}
|
|
326
|
-
const start = tokens.findIndex((token) => token.value.toLowerCase() === command[0]?.toLowerCase());
|
|
327
|
-
if (start < 0)
|
|
328
|
-
return [];
|
|
329
|
-
const directories = [];
|
|
330
|
-
let expectsPath = false;
|
|
331
|
-
for (const part of tokens.slice(start + 1).map((token) => token.raw)) {
|
|
332
|
-
if (expectsPath) {
|
|
333
|
-
const value2 = directoryArgument(part, true, cwd, shell);
|
|
334
|
-
if (value2)
|
|
335
|
-
directories.push(value2);
|
|
336
|
-
expectsPath = false;
|
|
337
|
-
continue;
|
|
338
|
-
}
|
|
339
|
-
if (part.startsWith("-")) {
|
|
340
|
-
expectsPath = POWERSHELL_PATH_FLAGS.has(part.toLowerCase());
|
|
341
|
-
continue;
|
|
342
|
-
}
|
|
343
|
-
const value = directoryArgument(part, true, cwd, shell);
|
|
344
|
-
if (value)
|
|
345
|
-
directories.push(value);
|
|
346
|
-
}
|
|
347
|
-
return directories;
|
|
348
|
-
}
|
|
349
|
-
function sourceTokens(resource) {
|
|
350
|
-
const tokens = [];
|
|
351
|
-
let raw = "";
|
|
352
|
-
let value = "";
|
|
353
|
-
let quote;
|
|
354
|
-
let substitution = 0;
|
|
355
|
-
let redirect = false;
|
|
356
|
-
const finish = () => {
|
|
357
|
-
if (!raw)
|
|
358
|
-
return;
|
|
359
|
-
if (!redirect)
|
|
360
|
-
tokens.push({ raw, value });
|
|
361
|
-
raw = "";
|
|
362
|
-
value = "";
|
|
363
|
-
redirect = false;
|
|
364
|
-
};
|
|
365
|
-
for (let index = 0;index < resource.length; index++) {
|
|
366
|
-
const char = resource[index];
|
|
367
|
-
if (quote === "single") {
|
|
368
|
-
raw += char;
|
|
369
|
-
if (char === "'")
|
|
370
|
-
quote = undefined;
|
|
371
|
-
else
|
|
372
|
-
value += char;
|
|
373
|
-
continue;
|
|
374
|
-
}
|
|
375
|
-
if (quote === "double") {
|
|
376
|
-
raw += char;
|
|
377
|
-
if (char === '"')
|
|
378
|
-
quote = undefined;
|
|
379
|
-
else if (char === "\\" && index + 1 < resource.length) {
|
|
380
|
-
const next = resource[index + 1];
|
|
381
|
-
if ('$`"\\\n'.includes(next)) {
|
|
382
|
-
raw += resource[++index];
|
|
383
|
-
if (next !== `
|
|
384
|
-
`)
|
|
385
|
-
value += next;
|
|
386
|
-
} else
|
|
387
|
-
value += char;
|
|
388
|
-
} else
|
|
389
|
-
value += char;
|
|
390
|
-
continue;
|
|
391
|
-
}
|
|
392
|
-
if (quote === "backtick") {
|
|
393
|
-
raw += char;
|
|
394
|
-
value += char;
|
|
395
|
-
if (char === "`" && resource[index - 1] !== "\\")
|
|
396
|
-
quote = undefined;
|
|
397
|
-
continue;
|
|
398
|
-
}
|
|
399
|
-
if (char === "'") {
|
|
400
|
-
raw += char;
|
|
401
|
-
quote = "single";
|
|
402
|
-
continue;
|
|
403
|
-
}
|
|
404
|
-
if (char === '"') {
|
|
405
|
-
raw += char;
|
|
406
|
-
quote = "double";
|
|
407
|
-
continue;
|
|
408
|
-
}
|
|
409
|
-
if (char === "`") {
|
|
410
|
-
raw += char;
|
|
411
|
-
value += char;
|
|
412
|
-
quote = "backtick";
|
|
413
|
-
continue;
|
|
414
|
-
}
|
|
415
|
-
if (char === "\\" && index + 1 < resource.length) {
|
|
416
|
-
if (resource[index + 1] === `
|
|
417
|
-
`) {
|
|
418
|
-
finish();
|
|
419
|
-
index++;
|
|
420
|
-
continue;
|
|
421
|
-
}
|
|
422
|
-
if (!raw && /\s/.test(resource[index + 1])) {
|
|
423
|
-
index++;
|
|
424
|
-
continue;
|
|
425
|
-
}
|
|
426
|
-
raw += char + resource[++index];
|
|
427
|
-
value += resource[index];
|
|
428
|
-
continue;
|
|
429
|
-
}
|
|
430
|
-
if ((char === "<" || char === ">") && resource[index + 1] === "(") {
|
|
431
|
-
const end = bashParenthesizedEnd(resource, index + 1);
|
|
432
|
-
if (raw) {
|
|
433
|
-
raw += resource.slice(index, end + 1);
|
|
434
|
-
value += resource.slice(index, end + 1);
|
|
435
|
-
}
|
|
436
|
-
index = end;
|
|
437
|
-
continue;
|
|
438
|
-
}
|
|
439
|
-
if (char === "$" && resource[index + 1] === "(")
|
|
440
|
-
substitution++;
|
|
441
|
-
if (char === ")" && substitution > 0)
|
|
442
|
-
substitution--;
|
|
443
|
-
if (substitution === 0 && /\s/.test(char)) {
|
|
444
|
-
finish();
|
|
445
|
-
continue;
|
|
446
|
-
}
|
|
447
|
-
if (substitution === 0 && (char === "<" || char === ">" || char === "&" && resource[index + 1] === ">")) {
|
|
448
|
-
if (/^\d+$/.test(value)) {
|
|
449
|
-
raw = "";
|
|
450
|
-
value = "";
|
|
451
|
-
} else
|
|
452
|
-
finish();
|
|
453
|
-
redirect = true;
|
|
454
|
-
if (char === "&")
|
|
455
|
-
index++;
|
|
456
|
-
while (/[<>&|]/.test(resource[index + 1] ?? ""))
|
|
457
|
-
index++;
|
|
458
|
-
continue;
|
|
459
|
-
}
|
|
460
|
-
raw += char;
|
|
461
|
-
value += char;
|
|
462
|
-
}
|
|
463
|
-
finish();
|
|
464
|
-
return tokens;
|
|
465
|
-
}
|
|
466
|
-
function bashSourcePrefix(tokens, words) {
|
|
467
|
-
const start = tokens.findIndex((token) => token.value === words[0]);
|
|
468
|
-
if (start < 0) {
|
|
469
|
-
const command = tokens.findIndex((token) => !/^[A-Za-z_][A-Za-z0-9_]*\+?=/.test(token.raw));
|
|
470
|
-
return prefix(tokens.slice(Math.max(0, command)).map((token) => token.raw)).join(" ");
|
|
471
|
-
}
|
|
472
|
-
const source = tokens.slice(start).map((token) => token.raw).filter((token) => !/^\$\([\s\S]*\)$/.test(token) && !/^`[\s\S]*`$/.test(token));
|
|
473
|
-
return prefix(source).join(" ");
|
|
474
|
-
}
|
|
475
|
-
function powerShellSourcePrefix(tokens, words) {
|
|
476
|
-
const start = tokens.findIndex((token) => token.value.toLowerCase() === words[0]?.toLowerCase());
|
|
477
|
-
if (start < 0)
|
|
478
|
-
return prefix(words).join(" ");
|
|
479
|
-
return prefix(tokens.slice(start).map((token) => token.raw)).join(" ");
|
|
480
|
-
}
|
|
481
|
-
function powerShellSourceTokens(resource) {
|
|
482
|
-
const tokens = [];
|
|
483
|
-
let raw = "";
|
|
484
|
-
let value = "";
|
|
485
|
-
let quote;
|
|
486
|
-
let redirect = false;
|
|
487
|
-
const finish = () => {
|
|
488
|
-
if (!raw)
|
|
489
|
-
return;
|
|
490
|
-
if (!redirect)
|
|
491
|
-
tokens.push({ raw, value });
|
|
492
|
-
raw = "";
|
|
493
|
-
value = "";
|
|
494
|
-
redirect = false;
|
|
495
|
-
};
|
|
496
|
-
for (let index = 0;index < resource.length; index++) {
|
|
497
|
-
const char = resource[index];
|
|
498
|
-
if (quote === "single") {
|
|
499
|
-
raw += char;
|
|
500
|
-
if (char === "'" && resource[index + 1] === "'") {
|
|
501
|
-
raw += resource[++index];
|
|
502
|
-
value += "'";
|
|
503
|
-
} else if (char === "'")
|
|
504
|
-
quote = undefined;
|
|
505
|
-
else
|
|
506
|
-
value += char;
|
|
507
|
-
continue;
|
|
508
|
-
}
|
|
509
|
-
if (quote === "double") {
|
|
510
|
-
raw += char;
|
|
511
|
-
if (char === '"')
|
|
512
|
-
quote = undefined;
|
|
513
|
-
else if (char === "`" && index + 1 < resource.length) {
|
|
514
|
-
raw += resource[++index];
|
|
515
|
-
value += resource[index];
|
|
516
|
-
} else
|
|
517
|
-
value += char;
|
|
518
|
-
continue;
|
|
519
|
-
}
|
|
520
|
-
if (char === "'") {
|
|
521
|
-
raw += char;
|
|
522
|
-
quote = "single";
|
|
523
|
-
continue;
|
|
524
|
-
}
|
|
525
|
-
if (char === '"') {
|
|
526
|
-
raw += char;
|
|
527
|
-
quote = "double";
|
|
528
|
-
continue;
|
|
529
|
-
}
|
|
530
|
-
if (char === "`" && index + 1 < resource.length) {
|
|
531
|
-
raw += char + resource[++index];
|
|
532
|
-
if (resource[index] !== `
|
|
533
|
-
` && resource[index] !== "\r")
|
|
534
|
-
value += resource[index];
|
|
535
|
-
continue;
|
|
536
|
-
}
|
|
537
|
-
if (char === "{" && !raw) {
|
|
538
|
-
const end = powerShellBracedEnd(resource, index);
|
|
539
|
-
raw = resource.slice(index, end + 1);
|
|
540
|
-
value = raw;
|
|
541
|
-
index = end;
|
|
542
|
-
continue;
|
|
543
|
-
}
|
|
544
|
-
if (/\s/.test(char)) {
|
|
545
|
-
finish();
|
|
546
|
-
continue;
|
|
547
|
-
}
|
|
548
|
-
if (char === ">") {
|
|
549
|
-
if (resource[index + 1] && !/[\s>&]/.test(resource[index + 1])) {
|
|
550
|
-
raw += char;
|
|
551
|
-
value += char;
|
|
552
|
-
continue;
|
|
553
|
-
}
|
|
554
|
-
if (/^\d+$/.test(value)) {
|
|
555
|
-
raw = "";
|
|
556
|
-
value = "";
|
|
557
|
-
} else if (raw === "*") {
|
|
558
|
-
raw = "";
|
|
559
|
-
value = "";
|
|
560
|
-
} else
|
|
561
|
-
finish();
|
|
562
|
-
redirect = true;
|
|
563
|
-
while (/[>&\d]/.test(resource[index + 1] ?? ""))
|
|
564
|
-
index++;
|
|
565
|
-
continue;
|
|
566
|
-
}
|
|
567
|
-
if ((char === "&" || char === ".") && !raw && tokens.length === 0)
|
|
568
|
-
continue;
|
|
569
|
-
raw += char;
|
|
570
|
-
value += char;
|
|
571
|
-
}
|
|
572
|
-
finish();
|
|
573
|
-
return tokens;
|
|
574
|
-
}
|
|
575
|
-
function powerShellBracedEnd(resource, start) {
|
|
576
|
-
let level = 1;
|
|
577
|
-
let quote;
|
|
578
|
-
for (let index = start + 1;index < resource.length; index++) {
|
|
579
|
-
const char = resource[index];
|
|
580
|
-
if (char === "`" && quote !== "single") {
|
|
581
|
-
index++;
|
|
582
|
-
continue;
|
|
583
|
-
}
|
|
584
|
-
if (quote === "single") {
|
|
585
|
-
if (char === "'" && resource[index + 1] === "'")
|
|
586
|
-
index++;
|
|
587
|
-
else if (char === "'")
|
|
588
|
-
quote = undefined;
|
|
589
|
-
continue;
|
|
590
|
-
}
|
|
591
|
-
if (quote === "double") {
|
|
592
|
-
if (char === '"')
|
|
593
|
-
quote = undefined;
|
|
594
|
-
continue;
|
|
595
|
-
}
|
|
596
|
-
if (char === "'") {
|
|
597
|
-
quote = "single";
|
|
598
|
-
continue;
|
|
599
|
-
}
|
|
600
|
-
if (char === '"') {
|
|
601
|
-
quote = "double";
|
|
602
|
-
continue;
|
|
603
|
-
}
|
|
604
|
-
if (char === "{")
|
|
605
|
-
level++;
|
|
606
|
-
if (char === "}" && --level === 0)
|
|
607
|
-
return index;
|
|
608
|
-
}
|
|
609
|
-
return resource.length - 1;
|
|
610
|
-
}
|
|
611
|
-
function parts(node) {
|
|
612
|
-
return Array.from({ length: node.childCount }).flatMap((_, index) => {
|
|
613
|
-
const child = node.child(index);
|
|
614
|
-
if (!child)
|
|
615
|
-
return [];
|
|
616
|
-
if (child.type === "command_elements")
|
|
617
|
-
return Array.from({ length: child.childCount }).flatMap((_2, itemIndex) => {
|
|
618
|
-
const item = child.child(itemIndex);
|
|
619
|
-
if (!item || item.type === "command_argument_sep" || item.type === "redirection")
|
|
620
|
-
return [];
|
|
621
|
-
return [{ type: item.type, text: item.text }];
|
|
622
|
-
});
|
|
623
|
-
if (!["command_name", "command_name_expr", "word", "string", "raw_string", "concatenation"].includes(child.type))
|
|
624
|
-
return [];
|
|
625
|
-
return [{ type: child.type, text: child.text }];
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
function directoryArgs(command, powershell, cwd, shell) {
|
|
629
|
-
if (!powershell)
|
|
630
|
-
return command.slice(1).filter((part) => !part.text.startsWith("-")).map((part) => directoryArgument(part.text, powershell, cwd, shell)).filter((part) => part !== undefined);
|
|
631
|
-
const directories = [];
|
|
632
|
-
let path2 = false;
|
|
633
|
-
for (const part of command.slice(1)) {
|
|
634
|
-
if (path2) {
|
|
635
|
-
const value2 = directoryArgument(part.text, powershell, cwd, shell);
|
|
636
|
-
if (value2)
|
|
637
|
-
directories.push(value2);
|
|
638
|
-
path2 = false;
|
|
639
|
-
continue;
|
|
640
|
-
}
|
|
641
|
-
if (part.type === "command_parameter") {
|
|
642
|
-
path2 = POWERSHELL_PATH_FLAGS.has(part.text.toLowerCase());
|
|
643
|
-
continue;
|
|
644
|
-
}
|
|
645
|
-
const value = directoryArgument(part.text, powershell, cwd, shell);
|
|
646
|
-
if (value)
|
|
647
|
-
directories.push(value);
|
|
648
|
-
}
|
|
649
|
-
return directories;
|
|
650
|
-
}
|
|
651
|
-
function directoryArgument(value, powershell, cwd, shell) {
|
|
652
|
-
const quote = value[0];
|
|
653
|
-
const text = (quote === '"' || quote === "'") && value.at(-1) === quote ? value.slice(1, -1) : value;
|
|
654
|
-
if (!powershell)
|
|
655
|
-
return expandKnownDirectory(text);
|
|
656
|
-
return expandKnownDirectory(text.replace(/\$\{env:([^}]+)\}/gi, (_, key) => environment(key) ?? "").replace(/\$env:([A-Za-z_][A-Za-z0-9_]*)/gi, (_, key) => environment(key) ?? "").replace(/\$(HOME|PWD|PSHOME)(?=$|[\\/])/gi, (_, key) => {
|
|
657
|
-
if (key.toUpperCase() === "HOME")
|
|
658
|
-
return os.homedir();
|
|
659
|
-
if (key.toUpperCase() === "PWD")
|
|
660
|
-
return cwd;
|
|
661
|
-
return path.dirname(shell);
|
|
662
|
-
}));
|
|
663
|
-
}
|
|
664
|
-
function expandKnownDirectory(value) {
|
|
665
|
-
if (value.includes("$") || value.includes("`") || value.startsWith("("))
|
|
666
|
-
return;
|
|
667
|
-
if (value === "~")
|
|
668
|
-
return os.homedir();
|
|
669
|
-
if (value.startsWith("~/") || value.startsWith("~\\"))
|
|
670
|
-
return path.join(os.homedir(), value.slice(2));
|
|
671
|
-
return value;
|
|
672
|
-
}
|
|
673
|
-
function environment(key) {
|
|
674
|
-
if (process.platform !== "win32")
|
|
675
|
-
return process.env[key];
|
|
676
|
-
const name = Object.keys(process.env).find((item) => item.toLowerCase() === key.toLowerCase());
|
|
677
|
-
return name ? process.env[name] : undefined;
|
|
678
|
-
}
|
|
679
|
-
function prefix(tokens) {
|
|
680
|
-
for (let length = tokens.length;length > 0; length--) {
|
|
681
|
-
const arity = ARITY[tokens.slice(0, length).join(" ")];
|
|
682
|
-
if (arity !== undefined)
|
|
683
|
-
return tokens.slice(0, arity);
|
|
684
|
-
}
|
|
685
|
-
return tokens.slice(0, 1);
|
|
686
|
-
}
|
|
687
|
-
function resolve(asset) {
|
|
688
|
-
if (asset.startsWith("file://"))
|
|
689
|
-
return fileURLToPath(asset);
|
|
690
|
-
if (path.isAbsolute(asset))
|
|
691
|
-
return asset;
|
|
692
|
-
return fileURLToPath(new URL(asset, import.meta.url));
|
|
693
|
-
}
|
|
694
|
-
var load = (() => {
|
|
695
|
-
let loading;
|
|
696
|
-
return () => loading ??= initialize();
|
|
697
|
-
})();
|
|
698
|
-
async function initialize() {
|
|
699
|
-
const { Parser, Language } = await import("web-tree-sitter");
|
|
700
|
-
await Parser.init({ locateFile: () => resolve(shellParserWasm.runtime) });
|
|
701
|
-
const [bashLanguage, psLanguage] = await Promise.all([
|
|
702
|
-
Language.load(resolve(shellParserWasm.bash)),
|
|
703
|
-
Language.load(resolve(shellParserWasm.powershell))
|
|
704
|
-
]);
|
|
705
|
-
const bash = new Parser;
|
|
706
|
-
bash.setLanguage(bashLanguage);
|
|
707
|
-
const ps = new Parser;
|
|
708
|
-
ps.setLanguage(psLanguage);
|
|
709
|
-
return { bash, ps };
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
export { scan, exports_parse };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|