@opencode/core 0.0.0-dev-20720 → 0.0.0-dev-20725
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 +1 -1
- package/dist/agent.js +82 -82
- package/dist/aisdk-native.js +90 -90
- package/dist/aisdk.js +95 -95
- package/dist/app.js +9 -9
- package/dist/bus.js +70 -70
- package/dist/chunks/instruction-discovery-02n47b9r.js +507 -0
- package/dist/chunks/{state-eq2t0afb.js → instruction-discovery-02xbtx70.js} +40 -40
- package/dist/chunks/{state-6e54mn8t.js → instruction-discovery-095fq8r9.js} +41 -41
- package/dist/chunks/{state-0j77ygfz.js → instruction-discovery-0j77ygfz.js} +2 -2
- package/dist/chunks/{state-cq15wxzp.js → instruction-discovery-0mk7ebd2.js} +4 -4
- package/dist/chunks/{state-0paq2nw3.js → instruction-discovery-0paq2nw3.js} +1 -1
- package/dist/chunks/{state-y6f80w1r.js → instruction-discovery-0r3c1bmw.js} +5 -5
- package/dist/chunks/{state-zc3nhar9.js → instruction-discovery-0tec47cr.js} +8 -8
- package/dist/chunks/{state-0emb60td.js → instruction-discovery-0vbcp93d.js} +2 -2
- package/dist/chunks/{state-mcjkpbn0.js → instruction-discovery-0y6tdt34.js} +22 -22
- package/dist/chunks/{state-c4jzek7p.js → instruction-discovery-14fppf3b.js} +15 -15
- package/dist/chunks/{state-bcdwjwga.js → instruction-discovery-1a777xbb.js} +15 -15
- package/dist/chunks/{state-trj1gmcm.js → instruction-discovery-1cb25qpm.js} +1 -1
- package/dist/chunks/{state-1dazxqgg.js → instruction-discovery-1dazxqgg.js} +2 -2
- package/dist/chunks/{state-84h8c373.js → instruction-discovery-1dvck2a7.js} +2 -2
- package/dist/chunks/{state-6sf1d713.js → instruction-discovery-1j3k7k9d.js} +7 -7
- package/dist/chunks/{state-za57v6vq.js → instruction-discovery-1kk0y7r1.js} +16 -16
- package/dist/chunks/{state-5dkn69vz.js → instruction-discovery-1rn5pcm9.js} +4 -4
- package/dist/chunks/{state-cse9r4v9.js → instruction-discovery-1z87ab07.js} +11 -11
- package/dist/chunks/{state-fn7rspy2.js → instruction-discovery-24ptn3c0.js} +43 -43
- package/dist/chunks/{state-4bevpzhv.js → instruction-discovery-273h6293.js} +6 -6
- package/dist/chunks/{state-2a5m3afh.js → instruction-discovery-2a5m3afh.js} +1 -1
- package/dist/chunks/{state-2ccvkpx1.js → instruction-discovery-2ccvkpx1.js} +2 -2
- package/dist/chunks/{state-hjwcbm2z.js → instruction-discovery-2f3mhj6p.js} +16 -16
- package/dist/chunks/{state-hts2a9q2.js → instruction-discovery-2h6dd64w.js} +18 -18
- package/dist/chunks/{state-3arepkys.js → instruction-discovery-2seb41mk.js} +50 -50
- package/dist/chunks/{state-ttqh24zm.js → instruction-discovery-2vs2nh1n.js} +4 -4
- package/dist/chunks/{state-q67nxkv9.js → instruction-discovery-38vxzh90.js} +33 -33
- package/dist/chunks/{state-s5met55r.js → instruction-discovery-3a83a0n4.js} +8 -8
- package/dist/chunks/{state-7zy8zh4w.js → instruction-discovery-3dhqmxsn.js} +26 -26
- package/dist/chunks/{state-3fc6dm20.js → instruction-discovery-3fc6dm20.js} +1 -1
- package/dist/chunks/{state-3hepkmqq.js → instruction-discovery-3hepkmqq.js} +1 -1
- package/dist/chunks/{state-0fypn0a3.js → instruction-discovery-3ja7vgc7.js} +28 -28
- package/dist/chunks/{state-9t8z8sz2.js → instruction-discovery-3nkhjpbq.js} +4 -4
- package/dist/chunks/{state-3smtnn6g.js → instruction-discovery-3smtnn6g.js} +1 -1
- package/dist/chunks/{state-3tvqynh2.js → instruction-discovery-3tvqynh2.js} +1 -1
- package/dist/chunks/{state-scyp0cvb.js → instruction-discovery-3vnr3awt.js} +4 -4
- package/dist/chunks/{state-qcy60mzg.js → instruction-discovery-3ye70ha2.js} +8 -8
- package/dist/chunks/{state-3zsf4n22.js → instruction-discovery-3zsf4n22.js} +1 -1
- package/dist/chunks/{state-msbh9db6.js → instruction-discovery-4bh92p7n.js} +49 -49
- package/dist/chunks/{state-62wb3p7v.js → instruction-discovery-4ed0x5yc.js} +1 -1
- package/dist/chunks/{state-6121h2h6.js → instruction-discovery-4sfcqppx.js} +2 -2
- package/dist/chunks/{state-f9a4pn72.js → instruction-discovery-4wnp65at.js} +7 -7
- package/dist/chunks/{state-mzzkv1b5.js → instruction-discovery-52zfrmt1.js} +1 -1
- package/dist/chunks/{state-54ma36ye.js → instruction-discovery-54ma36ye.js} +1 -1
- package/dist/chunks/{state-1ygqh575.js → instruction-discovery-56gdpj1q.js} +9 -9
- package/dist/chunks/{state-8316qx5p.js → instruction-discovery-57myy5jh.js} +5 -5
- package/dist/chunks/{state-qbma24dw.js → instruction-discovery-5bpbs3y8.js} +22 -22
- package/dist/chunks/{state-1p2095bv.js → instruction-discovery-5cq1fbn9.js} +35 -35
- package/dist/chunks/{state-cwa6csj7.js → instruction-discovery-5d607bsg.js} +9 -9
- package/dist/chunks/{state-5m9w47nd.js → instruction-discovery-5m9w47nd.js} +1 -1
- package/dist/chunks/{state-5t3nmthw.js → instruction-discovery-5t3nmthw.js} +2 -2
- package/dist/chunks/{state-86fzd6mx.js → instruction-discovery-5zezd1p9.js} +9 -9
- package/dist/chunks/{state-ccchx4q8.js → instruction-discovery-60m87ftc.js} +21 -21
- package/dist/chunks/{state-jhdf29st.js → instruction-discovery-68wqtz75.js} +1 -1
- package/dist/chunks/{state-yfmzq89s.js → instruction-discovery-6azxvrpq.js} +20 -20
- package/dist/chunks/{state-768a8gp9.js → instruction-discovery-6gkym5fp.js} +4 -4
- package/dist/chunks/{state-wy9mvxme.js → instruction-discovery-6gy81bm0.js} +9 -9
- package/dist/chunks/{state-6sr3ve8g.js → instruction-discovery-6m42r3np.js} +4 -4
- package/dist/chunks/{state-9sxnv72c.js → instruction-discovery-6qbsjcxz.js} +16 -16
- package/dist/chunks/{state-09cpb2ex.js → instruction-discovery-6rs83x58.js} +16 -16
- package/dist/chunks/{state-6xb47vfp.js → instruction-discovery-6xb47vfp.js} +1 -1
- package/dist/chunks/{state-zxszgjhy.js → instruction-discovery-6xcvjy28.js} +14 -14
- package/dist/chunks/{state-f75zav2x.js → instruction-discovery-71az546q.js} +2 -2
- package/dist/chunks/{state-7bmhse3q.js → instruction-discovery-7bmhse3q.js} +1 -1
- package/dist/chunks/{state-3rfzw5ap.js → instruction-discovery-7hnnfp9c.js} +11 -11
- package/dist/chunks/{state-45cwyr7q.js → instruction-discovery-7ks1423n.js} +24 -24
- package/dist/chunks/{state-ggjzp0zf.js → instruction-discovery-7ynwestw.js} +11 -11
- package/dist/chunks/{state-mec702eg.js → instruction-discovery-84xdhjgb.js} +35 -35
- package/dist/chunks/{state-8d7r5vzw.js → instruction-discovery-8d7r5vzw.js} +1 -1
- package/dist/chunks/{state-7x89b08m.js → instruction-discovery-8ghbvaa0.js} +10 -10
- package/dist/chunks/{state-8m6m0r52.js → instruction-discovery-8m6m0r52.js} +1 -1
- package/dist/chunks/{state-497z3mry.js → instruction-discovery-8qhmnsmm.js} +7 -7
- package/dist/chunks/{state-9pkkzrmj.js → instruction-discovery-8ryk0bb9.js} +5 -5
- package/dist/chunks/{state-cfsekr6v.js → instruction-discovery-8sze2n9a.js} +6 -6
- package/dist/chunks/{state-6wzskhnk.js → instruction-discovery-8v7xd1wr.js} +20 -20
- package/dist/chunks/{state-ah3xqtr9.js → instruction-discovery-8xyg3w2m.js} +15 -15
- package/dist/chunks/{state-88gkpqae.js → instruction-discovery-9408e2ey.js} +16 -16
- package/dist/chunks/{state-2x68r0t2.js → instruction-discovery-94mc2ky6.js} +18 -18
- package/dist/chunks/{state-7zpky84d.js → instruction-discovery-99xfcv7k.js} +11 -11
- package/dist/chunks/{state-kb9j3d72.js → instruction-discovery-9e5bzkjp.js} +3 -3
- package/dist/chunks/{state-0x57zm2e.js → instruction-discovery-9grbqn9y.js} +9 -9
- package/dist/chunks/{state-55h7b49p.js → instruction-discovery-a13vbfft.js} +9 -9
- package/dist/chunks/{state-yn2fms0x.js → instruction-discovery-a1sz969t.js} +18 -18
- package/dist/chunks/{state-ef18fqje.js → instruction-discovery-a1xkz11p.js} +20 -20
- package/dist/chunks/{state-evszv5pj.js → instruction-discovery-a5jrsvab.js} +52 -52
- package/dist/chunks/{state-aaet6srn.js → instruction-discovery-aaet6srn.js} +2 -2
- package/dist/chunks/{state-v6raqp8b.js → instruction-discovery-aavbrgwt.js} +15 -15
- package/dist/chunks/{state-addxnjmp.js → instruction-discovery-addxnjmp.js} +1 -1
- package/dist/chunks/{state-1smjtbw1.js → instruction-discovery-ahqb0ma5.js} +15 -15
- package/dist/chunks/{state-f62qkzqr.js → instruction-discovery-axs6pdy0.js} +5 -5
- package/dist/chunks/{state-wm3gbqz0.js → instruction-discovery-b41jq38g.js} +11 -11
- package/dist/chunks/{state-xb9jmman.js → instruction-discovery-b4b58vta.js} +14 -14
- package/dist/chunks/{state-b6gygkdw.js → instruction-discovery-b6gygkdw.js} +2 -2
- package/dist/chunks/{state-tbpc65w4.js → instruction-discovery-b7nzkckh.js} +15 -15
- package/dist/chunks/{state-fkqcn188.js → instruction-discovery-c01nkytp.js} +9 -9
- package/dist/chunks/{state-8h82tmdf.js → instruction-discovery-c6s977gm.js} +24 -24
- package/dist/chunks/{state-pvr0mps5.js → instruction-discovery-c85sm9p4.js} +17 -17
- package/dist/chunks/{state-y8v18ms9.js → instruction-discovery-chqzd9wq.js} +11 -11
- package/dist/chunks/{state-jrjafyr0.js → instruction-discovery-chrxq3ex.js} +11 -11
- package/dist/chunks/{state-mvatweg5.js → instruction-discovery-cna82en0.js} +20 -20
- package/dist/chunks/{state-gzpbea96.js → instruction-discovery-cr5fdqpw.js} +35 -35
- package/dist/chunks/{state-mgpjz0db.js → instruction-discovery-cvwz8r7d.js} +30 -30
- package/dist/chunks/{state-z9ghcmzp.js → instruction-discovery-d19zb9v6.js} +34 -34
- package/dist/chunks/{state-20de9dw7.js → instruction-discovery-d1ccpy7q.js} +3 -3
- package/dist/chunks/{state-dntcxfx6.js → instruction-discovery-d2y2z992.js} +12 -12
- package/dist/chunks/instruction-discovery-d507n1ar.js +253 -0
- package/dist/chunks/{state-wv509nq3.js → instruction-discovery-d5x8dsx5.js} +11 -11
- package/dist/chunks/{state-r2vb5ahw.js → instruction-discovery-d6n2rq0s.js} +6 -6
- package/dist/chunks/{state-fesacqrs.js → instruction-discovery-d815wfjk.js} +20 -20
- package/dist/chunks/{state-yw2yvzmw.js → instruction-discovery-dmd82ryh.js} +87 -87
- package/dist/chunks/{state-dmqcgk4z.js → instruction-discovery-dmqcgk4z.js} +2 -2
- package/dist/chunks/{state-d3zsqy84.js → instruction-discovery-dv7jc8dx.js} +18 -18
- package/dist/chunks/{state-pqqhfkp1.js → instruction-discovery-dz9417ry.js} +6 -6
- package/dist/chunks/{state-28jd512m.js → instruction-discovery-e116hgz1.js} +3 -3
- package/dist/chunks/{state-11dqjexa.js → instruction-discovery-e3q4ya86.js} +9 -9
- package/dist/chunks/{state-bxrcwjqe.js → instruction-discovery-ebxy8v40.js} +7 -7
- package/dist/chunks/{state-ef5x83kb.js → instruction-discovery-ef5x83kb.js} +1 -1
- package/dist/chunks/{state-34rerane.js → instruction-discovery-ej7r9z0m.js} +11 -11
- package/dist/chunks/{state-eq1pz5kg.js → instruction-discovery-eq1pz5kg.js} +1 -1
- package/dist/chunks/{state-4dbsr0k0.js → instruction-discovery-eqbd9z3m.js} +27 -27
- package/dist/chunks/{state-gx34rq0y.js → instruction-discovery-esnyhwy5.js} +6 -6
- package/dist/chunks/{state-etq0c3wd.js → instruction-discovery-etq0c3wd.js} +1 -1
- package/dist/chunks/{state-tb16czpv.js → instruction-discovery-f17728fj.js} +8 -8
- package/dist/chunks/{state-ejvnp2ks.js → instruction-discovery-f2mw6jyj.js} +11 -11
- package/dist/chunks/{state-2e8mbfdm.js → instruction-discovery-f2trvhwb.js} +13 -13
- package/dist/chunks/{state-kz7kk7hk.js → instruction-discovery-f94nwnzd.js} +14 -14
- package/dist/chunks/{state-vtg4gjwx.js → instruction-discovery-fba5j9yy.js} +10 -10
- package/dist/chunks/{state-mypwhdkk.js → instruction-discovery-fdjyeynq.js} +6 -6
- package/dist/chunks/{state-e2ncvvex.js → instruction-discovery-fdteztds.js} +22 -22
- package/dist/chunks/{state-f36c7hhr.js → instruction-discovery-feny6ayn.js} +33 -33
- package/dist/chunks/{state-ppk3b36w.js → instruction-discovery-fghrj984.js} +34 -34
- package/dist/chunks/{state-qpef03sa.js → instruction-discovery-fjve5t31.js} +3 -3
- package/dist/chunks/{state-pn003z7t.js → instruction-discovery-fqhagtyc.js} +21 -21
- package/dist/chunks/{state-yg8cpn2k.js → instruction-discovery-fy6pbx2f.js} +13 -13
- package/dist/chunks/{state-6q8n1y66.js → instruction-discovery-fzbgn245.js} +20 -20
- package/dist/chunks/{state-g5kmhmn4.js → instruction-discovery-g60p7p49.js} +11 -11
- package/dist/chunks/{state-rdd3t6fr.js → instruction-discovery-g8x52gsw.js} +11 -11
- package/dist/chunks/{state-c1wzgm1s.js → instruction-discovery-gag4gr43.js} +11 -11
- package/dist/chunks/{state-gd4qta3r.js → instruction-discovery-gd4qta3r.js} +1 -1
- package/dist/chunks/{state-jvtf094g.js → instruction-discovery-gqwek975.js} +14 -14
- package/dist/chunks/{state-3ck2xf04.js → instruction-discovery-gse2418f.js} +8 -8
- package/dist/chunks/{state-2cfdhw3s.js → instruction-discovery-gvnbcx9f.js} +67 -67
- package/dist/chunks/{state-04a2hr2k.js → instruction-discovery-gybq0q5b.js} +25 -25
- package/dist/chunks/instruction-discovery-gyce5qg1.js +18 -0
- package/dist/chunks/{state-m7afyyyj.js → instruction-discovery-gzf0jey7.js} +17 -17
- package/dist/chunks/{state-3cegwx68.js → instruction-discovery-h2b79v29.js} +2 -2
- package/dist/chunks/{state-adn16pwm.js → instruction-discovery-h4y5xjrc.js} +307 -307
- package/dist/chunks/{state-h6vf3j39.js → instruction-discovery-h6vf3j39.js} +1 -1
- package/dist/chunks/{state-berfgc7x.js → instruction-discovery-hcx8qsr8.js} +18 -18
- package/dist/chunks/{state-2bw2w2fe.js → instruction-discovery-hj5bkg0c.js} +8 -8
- package/dist/chunks/{state-vrtmy21p.js → instruction-discovery-ht7r5zjn.js} +2 -2
- package/dist/chunks/{state-73vgk540.js → instruction-discovery-hvy0zjq9.js} +1 -1
- package/dist/chunks/{state-j56e64zr.js → instruction-discovery-j56e64zr.js} +1 -1
- package/dist/chunks/{state-yc3p3qwe.js → instruction-discovery-j5e03z9p.js} +13 -13
- package/dist/chunks/{state-x34x4jyj.js → instruction-discovery-jah1syx0.js} +34 -34
- package/dist/chunks/{state-4x28rjsq.js → instruction-discovery-js6dfb5w.js} +2 -2
- package/dist/chunks/{state-x7sbve6c.js → instruction-discovery-jsfxrkh5.js} +31 -31
- package/dist/chunks/{state-kxfx0zw7.js → instruction-discovery-jv5qmp9w.js} +2 -2
- package/dist/chunks/{state-agh9v499.js → instruction-discovery-k3tvypcp.js} +23 -23
- package/dist/chunks/{state-thc1rszf.js → instruction-discovery-k4jm2qx2.js} +4 -4
- package/dist/chunks/{state-g41jgzrn.js → instruction-discovery-k54318qp.js} +13 -13
- package/dist/chunks/{state-17dj5fv5.js → instruction-discovery-k9gzbdyr.js} +23 -23
- package/dist/chunks/{state-bpfw675d.js → instruction-discovery-kcy9dg9d.js} +11 -11
- package/dist/chunks/{state-qvkrf2sr.js → instruction-discovery-kdpmtwd0.js} +24 -24
- package/dist/chunks/{state-crdrr85v.js → instruction-discovery-ked90xm8.js} +5 -5
- package/dist/chunks/{state-s2f320av.js → instruction-discovery-kfgkevm8.js} +26 -26
- package/dist/chunks/{state-2fdt73cz.js → instruction-discovery-kn5t47nc.js} +13 -13
- package/dist/chunks/{state-54n0a6zw.js → instruction-discovery-knd4nc5f.js} +11 -11
- package/dist/chunks/{state-44ak30pa.js → instruction-discovery-knevfgda.js} +4 -4
- package/dist/chunks/{state-4t030mrg.js → instruction-discovery-krrp65g5.js} +14 -14
- package/dist/chunks/{state-v4swh9q7.js → instruction-discovery-m1y5ga02.js} +10 -10
- package/dist/chunks/{state-6yjat7sj.js → instruction-discovery-m2cgbxd0.js} +20 -20
- package/dist/chunks/{state-m3fdjcah.js → instruction-discovery-m3fdjcah.js} +1 -1
- package/dist/chunks/{state-jjqn8krh.js → instruction-discovery-m45m4ven.js} +3 -3
- package/dist/chunks/{state-pe0zt13j.js → instruction-discovery-m47cqq2j.js} +1 -1
- package/dist/chunks/{state-kzfrgs0d.js → instruction-discovery-m5qzdqgg.js} +20 -20
- package/dist/chunks/{state-m9w0rfyh.js → instruction-discovery-m9w0rfyh.js} +1 -1
- package/dist/chunks/{state-m9jgt8r5.js → instruction-discovery-mkamd2cf.js} +5 -5
- package/dist/chunks/{state-1deese7r.js → instruction-discovery-mwgcj3fx.js} +20 -20
- package/dist/chunks/{state-46rbnc5c.js → instruction-discovery-mxvb5adp.js} +21 -21
- package/dist/chunks/{state-nd37bzcf.js → instruction-discovery-my0mhq6c.js} +23 -23
- package/dist/chunks/{state-ctj64nje.js → instruction-discovery-n0hrvkpe.js} +44 -44
- package/dist/chunks/{state-2wtagmr7.js → instruction-discovery-nfw5wevp.js} +9 -9
- package/dist/chunks/{state-kk956e2k.js → instruction-discovery-nn1ppfgc.js} +3 -3
- package/dist/chunks/{state-dpkg50ah.js → instruction-discovery-nxm207yx.js} +4 -4
- package/dist/chunks/{state-fed6refb.js → instruction-discovery-p056yhxs.js} +47 -47
- package/dist/chunks/{state-9hn6k4tm.js → instruction-discovery-p37cw4rj.js} +8 -8
- package/dist/chunks/{state-pjvnvgmy.js → instruction-discovery-pjvnvgmy.js} +1 -1
- package/dist/chunks/{state-pknna89w.js → instruction-discovery-pknna89w.js} +1 -1
- package/dist/chunks/{state-van68h44.js → instruction-discovery-pmm1qj4p.js} +14 -14
- package/dist/chunks/{state-xdrba4jw.js → instruction-discovery-pnkbpv6t.js} +8 -8
- package/dist/chunks/{state-y597v6j1.js → instruction-discovery-pr8kmtqq.js} +3 -3
- package/dist/chunks/{state-2xg2fwz2.js → instruction-discovery-q08m6yqc.js} +9 -9
- package/dist/chunks/{state-0rq11za7.js → instruction-discovery-q8c3pb1q.js} +23 -23
- package/dist/chunks/{state-eekvak8k.js → instruction-discovery-qdpn0p3b.js} +13 -13
- package/dist/chunks/{state-7dqw4kz8.js → instruction-discovery-qgn6gcr1.js} +5 -5
- package/dist/chunks/{state-w1ad28wa.js → instruction-discovery-qm7jrdpz.js} +5 -5
- package/dist/chunks/{state-88wa59w3.js → instruction-discovery-qmvs021c.js} +146 -146
- package/dist/chunks/{state-qnc92qwc.js → instruction-discovery-qnc92qwc.js} +1 -1
- package/dist/chunks/{state-nr69g3jv.js → instruction-discovery-qqm50ya3.js} +3 -3
- package/dist/chunks/{state-qsdy395h.js → instruction-discovery-qsdy395h.js} +1 -1
- package/dist/chunks/{state-h9pcb0g7.js → instruction-discovery-qv8c18b1.js} +5 -5
- package/dist/chunks/{state-xyafkbt0.js → instruction-discovery-qxjc9qry.js} +3 -3
- package/dist/chunks/{state-qygbw77c.js → instruction-discovery-qygbw77c.js} +2 -2
- package/dist/chunks/{state-rf1bdrxr.js → instruction-discovery-qyx604d0.js} +14 -14
- package/dist/chunks/{state-b00pzheq.js → instruction-discovery-qzka7dgq.js} +30 -30
- package/dist/chunks/instruction-discovery-r54jadsm.js +26 -0
- package/dist/chunks/{state-pmwpe40e.js → instruction-discovery-r66xghd9.js} +4 -4
- package/dist/chunks/{state-ket9r42f.js → instruction-discovery-ra8aazcz.js} +22 -22
- package/dist/chunks/{state-rdw6cm16.js → instruction-discovery-rdw6cm16.js} +1 -1
- package/dist/chunks/{state-qgvx2ecd.js → instruction-discovery-rhz3ppas.js} +11 -11
- package/dist/chunks/{state-dd2ph1ae.js → instruction-discovery-rmnkmmsy.js} +79 -79
- package/dist/chunks/{state-fm2qvscf.js → instruction-discovery-ryr25ayn.js} +4 -4
- package/dist/chunks/{state-5krvj9g7.js → instruction-discovery-rzhagf9y.js} +6 -6
- package/dist/chunks/{state-9t7a50xb.js → instruction-discovery-s8d7rejh.js} +4 -4
- package/dist/chunks/{state-zbj3drqt.js → instruction-discovery-shd3tjfd.js} +23 -23
- package/dist/chunks/{state-vpn79mg0.js → instruction-discovery-shxd18c6.js} +10 -10
- package/dist/chunks/{state-cxr298sk.js → instruction-discovery-spa4s1dn.js} +8 -8
- package/dist/chunks/{state-xhw3x5cz.js → instruction-discovery-sq5cmb50.js} +15 -15
- package/dist/chunks/{state-e7fzh1tv.js → instruction-discovery-sr2dv6dj.js} +9 -9
- package/dist/chunks/{state-y3ghf2b6.js → instruction-discovery-sz2337zw.js} +7 -7
- package/dist/chunks/{state-tazgh4e4.js → instruction-discovery-tazgh4e4.js} +1 -1
- package/dist/chunks/{state-tcezcvh9.js → instruction-discovery-tcezcvh9.js} +1 -1
- package/dist/chunks/{state-tdstcens.js → instruction-discovery-tdstcens.js} +1 -1
- package/dist/chunks/{state-4916wvbv.js → instruction-discovery-tn29v157.js} +5 -5
- package/dist/chunks/{state-jh8bf3qg.js → instruction-discovery-tneyjf48.js} +4 -4
- package/dist/chunks/{state-adwe1qqm.js → instruction-discovery-trykadmf.js} +18 -18
- package/dist/chunks/{state-bkwnwkna.js → instruction-discovery-tvwj13n0.js} +6 -6
- package/dist/chunks/{state-m55qy151.js → instruction-discovery-tyzzbzqn.js} +10 -10
- package/dist/chunks/{state-xecxzrdp.js → instruction-discovery-v0es1rhs.js} +2 -2
- package/dist/chunks/{state-mqatsg7m.js → instruction-discovery-v0jnr6tg.js} +33 -33
- package/dist/chunks/{state-7wnhzmy2.js → instruction-discovery-v48grkq5.js} +29 -29
- package/dist/chunks/{state-6t7bc6bg.js → instruction-discovery-v4p3p0ps.js} +14 -14
- package/dist/chunks/{state-6dtkngtv.js → instruction-discovery-v8dws5ha.js} +3 -3
- package/dist/chunks/{state-ssax58sw.js → instruction-discovery-v93t099t.js} +36 -36
- package/dist/chunks/{state-veqvce7d.js → instruction-discovery-veqvce7d.js} +1 -1
- package/dist/chunks/{state-edbfpfck.js → instruction-discovery-vqfzq50h.js} +6 -6
- package/dist/chunks/{state-wzx4r275.js → instruction-discovery-vrxrx1v5.js} +4 -4
- package/dist/chunks/{state-2t27atdg.js → instruction-discovery-vt3fyw5y.js} +5 -5
- package/dist/chunks/{state-fjs5xx1d.js → instruction-discovery-vtgxp655.js} +2 -2
- package/dist/chunks/{state-vzs5sf6e.js → instruction-discovery-vzs5sf6e.js} +1 -1
- package/dist/chunks/{state-84txncab.js → instruction-discovery-w1eejvng.js} +5 -5
- package/dist/chunks/{state-prdj665r.js → instruction-discovery-w35vncqw.js} +15 -15
- package/dist/chunks/{state-w3wsvvr9.js → instruction-discovery-w3wsvvr9.js} +1 -1
- package/dist/chunks/{state-3rtxz4nr.js → instruction-discovery-w49382pb.js} +8 -8
- package/dist/chunks/{state-n4dca9y5.js → instruction-discovery-w96th336.js} +22 -22
- package/dist/chunks/{state-wd87259q.js → instruction-discovery-wd87259q.js} +1 -1
- package/dist/chunks/{state-35b7yesr.js → instruction-discovery-wm42kgen.js} +32 -32
- package/dist/chunks/{state-jkz3v61y.js → instruction-discovery-wtbb01vz.js} +15 -15
- package/dist/chunks/{state-ms8ccy3x.js → instruction-discovery-wvvb86qc.js} +27 -27
- package/dist/chunks/{state-kr34918r.js → instruction-discovery-wyt7mtfs.js} +20 -20
- package/dist/chunks/{state-w692g40q.js → instruction-discovery-wzbah92y.js} +32 -32
- package/dist/chunks/{state-zzwrqwz9.js → instruction-discovery-x1ns2rmk.js} +4 -4
- package/dist/chunks/{state-vgepzxbh.js → instruction-discovery-xb50yt4b.js} +4 -4
- package/dist/chunks/{state-g5w8qwbj.js → instruction-discovery-xfkkasph.js} +4 -4
- package/dist/chunks/{state-h24f7b7f.js → instruction-discovery-xgks750j.js} +32 -32
- package/dist/chunks/{state-h7nvfha0.js → instruction-discovery-xkyz97qj.js} +24 -24
- package/dist/chunks/{state-emk51cvb.js → instruction-discovery-xspa99bm.js} +13 -13
- package/dist/chunks/{state-tc3k9mfd.js → instruction-discovery-xtrrk7k3.js} +21 -21
- package/dist/chunks/{state-hjd5rs48.js → instruction-discovery-xy7nxqqh.js} +29 -29
- package/dist/chunks/{state-y1fvbwt7.js → instruction-discovery-y1fvbwt7.js} +1 -1
- package/dist/chunks/{state-b37sb5xh.js → instruction-discovery-y2jstp7y.js} +26 -26
- package/dist/chunks/{state-a8947ck8.js → instruction-discovery-y8c3vgnd.js} +19 -19
- package/dist/chunks/{state-krs87b37.js → instruction-discovery-ybpa7sx2.js} +9 -9
- package/dist/chunks/{state-fwr1nvee.js → instruction-discovery-ycvydahw.js} +13 -13
- package/dist/chunks/{state-zbjxv3dz.js → instruction-discovery-ygwzgsmj.js} +8 -8
- package/dist/chunks/{state-rhraev7y.js → instruction-discovery-yp2x3t23.js} +4 -4
- package/dist/chunks/{state-z0bkrqjs.js → instruction-discovery-z0bkrqjs.js} +1 -1
- package/dist/chunks/{state-m6yf48sn.js → instruction-discovery-z1ectzgg.js} +28 -28
- package/dist/chunks/{state-g5xbze43.js → instruction-discovery-z8713354.js} +6 -6
- package/dist/chunks/{state-7dyczsbr.js → instruction-discovery-zbdjk1jq.js} +11 -11
- package/dist/chunks/{state-dd40s8jk.js → instruction-discovery-zfs8ae4p.js} +4 -4
- package/dist/chunks/{state-2qzcchk7.js → instruction-discovery-zgtek2y9.js} +42 -42
- package/dist/chunks/{state-zr2ceqn5.js → instruction-discovery-zr2ceqn5.js} +1 -1
- package/dist/chunks/{state-9y76xs4t.js → instruction-discovery-zsqm7vff.js} +15 -15
- package/dist/chunks/{state-zxq2ej10.js → instruction-discovery-zxq2ej10.js} +1 -1
- package/dist/codemode/catalog.js +1 -1
- package/dist/codemode/instructions.js +7 -7
- package/dist/codemode/tool.js +3 -3
- package/dist/codemode/web.js +1 -1
- package/dist/command.js +80 -80
- package/dist/config/discovery.js +83 -83
- package/dist/config/markdown.js +1 -1
- package/dist/config/normalize.js +100 -100
- package/dist/config/plugin/agent.js +119 -119
- package/dist/config/plugin/command.js +208 -208
- package/dist/config/plugin/compaction.js +155 -155
- package/dist/config/plugin/compatibility.js +135 -135
- package/dist/config/plugin/entry-observer.js +1 -1
- package/dist/config/plugin/formatter.js +118 -118
- package/dist/config/plugin/image.js +117 -117
- package/dist/config/plugin/instruction.js +91 -91
- package/dist/config/plugin/location-watcher.js +119 -119
- package/dist/config/plugin/mcp.js +126 -126
- package/dist/config/plugin/policy.js +118 -118
- package/dist/config/plugin/provider.js +117 -117
- package/dist/config/plugin/reference.js +119 -119
- package/dist/config/plugin/shell.js +119 -119
- package/dist/config/plugin/skill-file.js +103 -103
- package/dist/config/plugin/skill.js +138 -138
- package/dist/config/plugin/snapshot.js +117 -117
- package/dist/config/plugin/source.js +120 -120
- package/dist/config/plugin/tool-output.js +118 -118
- package/dist/config/plugin/websearch.js +118 -118
- package/dist/config/plugin/worktree.js +119 -119
- package/dist/config/variable.js +3 -3
- package/dist/config/watch.js +1 -1
- package/dist/config.js +122 -122
- package/dist/credential/sql.js +2 -2
- package/dist/credential.js +80 -80
- package/dist/database/database.js +67 -67
- package/dist/database/drizzle/effect-sqlite/driver.js +14 -14
- package/dist/database/drizzle/effect-sqlite/index.js +14 -14
- package/dist/database/drizzle/effect-sqlite/session.js +11 -11
- package/dist/database/drizzle/index.js +15 -15
- package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
- package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
- package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
- package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
- package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
- package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
- package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
- package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
- package/dist/database/drizzle.js +16 -16
- package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
- package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
- package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
- package/dist/database/migration/20260225215848_workspace.js +1 -1
- package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
- package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
- package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
- package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
- package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
- package/dist/database/migration/20260323234822_events.js +1 -1
- package/dist/database/migration/20260410174513_workspace-name.js +1 -1
- package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
- package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
- package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
- package/dist/database/migration/20260428004200_add_session_path.js +1 -1
- package/dist/database/migration/20260501142318_next_venus.js +1 -1
- package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
- package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
- package/dist/database/migration/20260510033149_session_usage.js +1 -1
- package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
- package/dist/database/migration/20260511173437_session-metadata.js +1 -1
- package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
- package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
- package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
- package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
- package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
- package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
- package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
- package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
- package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
- package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
- package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
- package/dist/database/migration/20260611035744_credential.js +1 -1
- package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
- package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
- package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
- package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
- package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
- package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
- package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
- package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
- package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
- package/dist/database/migration/20260812181746_session_inbox.js +1 -1
- package/dist/database/migration/20260812213948_worktree.js +1 -1
- package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
- package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
- package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
- package/dist/database/migration/20260923013825_project_time_active.js +1 -1
- package/dist/database/migration/20261007190000_azure_cli_external_credential.js +1 -1
- package/dist/database/migration.gen.js +50 -50
- package/dist/database/migration.js +52 -52
- package/dist/database/path.js +2 -2
- package/dist/database/schema.gen.js +1 -1
- package/dist/database/schema.sql.js +1 -1
- package/dist/database/sqlite.bun.js +1 -1
- package/dist/database/sqlite.js +1 -1
- package/dist/database/sqlite.node.js +1 -1
- package/dist/database/sqlite.workerd.js +1 -1
- package/dist/database/v1-migration.bun.js +77 -77
- package/dist/database/v1-migration.js +1 -1
- package/dist/effect/app-node-builder.js +364 -364
- package/dist/effect/app-node-platform.js +2 -2
- package/dist/effect/keyed-mutex.js +3 -3
- package/dist/effect/websocket-constructor.js +1 -1
- package/dist/environment/driver.js +1 -1
- package/dist/environment/environment.js +94 -94
- package/dist/environment/exec-defaults.js +2 -2
- package/dist/environment/files.js +1 -1
- package/dist/environment/index.js +94 -94
- package/dist/environment/local.js +2 -2
- package/dist/environment/memory.js +2 -2
- package/dist/environment/unavailable.js +1 -1
- package/dist/event/sql.js +1 -1
- package/dist/event-logger.js +71 -71
- package/dist/file-access.js +105 -105
- package/dist/file-mutation.js +95 -95
- package/dist/file-retention.js +1 -1
- package/dist/filesystem/fff.bun.js +2 -2
- package/dist/filesystem/fff.js +1 -1
- package/dist/filesystem/fff.node.js +2 -2
- package/dist/filesystem/fff.workerd.js +2 -2
- package/dist/filesystem/location-watcher-policy.js +6 -6
- package/dist/filesystem/location-watcher.js +221 -221
- package/dist/filesystem/protected.js +1 -1
- package/dist/filesystem/search.js +96 -96
- package/dist/filesystem/watcher-binding.js +1 -1
- package/dist/filesystem/watcher.js +15 -15
- package/dist/filesystem.js +95 -95
- package/dist/form.js +77 -77
- package/dist/formatter/builtins.js +2 -2
- package/dist/formatter.js +88 -88
- package/dist/generate.js +104 -104
- package/dist/git.js +6 -6
- package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +1 -1
- package/dist/github-copilot/chat/get-response-metadata.js +1 -1
- package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +1 -1
- package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +7 -7
- package/dist/github-copilot/chat/openai-compatible-chat-options.js +1 -1
- package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +1 -1
- package/dist/github-copilot/copilot-provider.js +17 -17
- package/dist/github-copilot/models.js +100 -100
- package/dist/github-copilot/openai-compatible-error.js +1 -1
- package/dist/github-copilot/responses/convert-to-openai-responses-input.js +1 -1
- package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +1 -1
- package/dist/github-copilot/responses/openai-error.js +1 -1
- package/dist/github-copilot/responses/openai-responses-language-model.js +10 -10
- package/dist/github-copilot/responses/openai-responses-prepare-tools.js +6 -6
- package/dist/github-copilot/responses/tool/code-interpreter.js +1 -1
- package/dist/github-copilot/responses/tool/file-search.js +1 -1
- package/dist/github-copilot/responses/tool/image-generation.js +1 -1
- package/dist/github-copilot/responses/tool/web-search-preview.js +1 -1
- package/dist/github-copilot/responses/tool/web-search.js +1 -1
- package/dist/image/photon.js +2 -2
- package/dist/image.js +4 -4
- package/dist/instance/service.js +5 -5
- package/dist/instance.js +355 -355
- package/dist/instruction-discovery.js +84 -84
- package/dist/instructions/builtins.js +88 -88
- package/dist/instructions/index.js +3 -3
- package/dist/integration/connection.js +1 -1
- package/dist/integration.js +84 -84
- package/dist/job.js +79 -79
- package/dist/kv/sql.js +2 -2
- package/dist/kv.js +74 -74
- package/dist/location-activity.js +132 -132
- package/dist/location-lifecycle.js +108 -108
- package/dist/location-service-map.js +87 -87
- package/dist/location-services.js +352 -352
- package/dist/location.js +86 -86
- package/dist/managed-policy.js +8 -8
- package/dist/mcp/client.js +92 -92
- package/dist/mcp/index.js +106 -106
- package/dist/mcp/instructions.js +130 -130
- package/dist/mcp/oauth.js +79 -79
- package/dist/mcp/stdio.js +91 -91
- package/dist/mime.js +1 -1
- package/dist/modal/models.js +100 -100
- package/dist/model-resolver.js +99 -99
- package/dist/model.js +103 -103
- package/dist/models-dev.js +104 -104
- package/dist/oauth/page.js +1 -1
- package/dist/permission/saved.js +83 -83
- package/dist/permission/sql.js +5 -5
- package/dist/permission.js +110 -110
- package/dist/persistent-pty/binary.bun.js +1 -1
- package/dist/persistent-pty/daemon.js +1 -1
- package/dist/persistent-pty/index.js +91 -91
- package/dist/persistent-pty/pty-binding.js +1 -1
- package/dist/persistent-pty.js +76 -76
- package/dist/plugin/agent.js +77 -77
- package/dist/plugin/command.js +103 -103
- package/dist/plugin/hooks.js +5 -5
- package/dist/plugin/host.js +212 -212
- package/dist/plugin/identity.js +3 -3
- package/dist/plugin/instance.js +5 -5
- package/dist/plugin/internal.js +327 -327
- package/dist/plugin/mcp-codemode-defaults.js +3 -3
- package/dist/plugin/models-dev.js +97 -97
- package/dist/plugin/module.js +118 -118
- package/dist/plugin/optimize.js +4 -4
- package/dist/plugin/plan.js +103 -103
- package/dist/plugin/promise.js +1 -1
- package/dist/plugin/provider/amazon-bedrock.js +91 -91
- package/dist/plugin/provider/azure.js +118 -118
- package/dist/plugin/provider/cerebras.js +1 -1
- package/dist/plugin/provider/chatgpt.js +95 -95
- package/dist/plugin/provider/cloudflare-ai-gateway.js +114 -114
- package/dist/plugin/provider/cloudflare-workers-ai.js +115 -115
- package/dist/plugin/provider/cohere.js +2 -2
- package/dist/plugin/provider/configured.js +113 -113
- package/dist/plugin/provider/digitalocean.js +94 -94
- package/dist/plugin/provider/dynamic.js +2 -2
- package/dist/plugin/provider/factory.js +1 -1
- package/dist/plugin/provider/github-copilot.js +96 -96
- package/dist/plugin/provider/gitlab.js +94 -94
- package/dist/plugin/provider/google-vertex.js +91 -91
- package/dist/plugin/provider/kilo.js +1 -1
- package/dist/plugin/provider/llmgateway.js +79 -79
- package/dist/plugin/provider/lmstudio.js +117 -117
- package/dist/plugin/provider/local.js +114 -114
- package/dist/plugin/provider/modal.js +93 -93
- package/dist/plugin/provider/nvidia.js +1 -1
- package/dist/plugin/provider/ollama.js +117 -117
- package/dist/plugin/provider/openai.js +96 -96
- package/dist/plugin/provider/opencode.js +98 -98
- package/dist/plugin/provider/openrouter.js +92 -92
- package/dist/plugin/provider/perplexity.js +2 -2
- package/dist/plugin/provider/poe.js +80 -80
- package/dist/plugin/provider/prompt-cache-key.js +91 -91
- package/dist/plugin/provider/sap-ai-core.js +92 -92
- package/dist/plugin/provider/sdk-factory.js +1 -1
- package/dist/plugin/provider/snowflake-cortex.js +116 -116
- package/dist/plugin/provider/vercel.js +91 -91
- package/dist/plugin/provider/vllm.js +117 -117
- package/dist/plugin/provider/xai.js +92 -92
- package/dist/plugin/provider/zenmux.js +1 -1
- package/dist/plugin/provider.js +157 -157
- package/dist/plugin/sdk.js +77 -77
- package/dist/plugin/service.js +3 -3
- package/dist/plugin/skill.js +135 -135
- package/dist/plugin/source-directory.js +1 -1
- package/dist/plugin/supervisor.js +344 -344
- package/dist/plugin/tool-input-repair.js +4 -4
- package/dist/plugin/update.js +6 -6
- package/dist/plugin/vcs/git.js +87 -87
- package/dist/plugin/vcs/hg.js +87 -87
- package/dist/plugin/verbosity.js +94 -94
- package/dist/plugin/warming.js +115 -115
- package/dist/plugin/websearch/exa.js +5 -5
- package/dist/plugin/websearch/firecrawl.js +8 -8
- package/dist/plugin/websearch/index.js +9 -9
- package/dist/plugin/websearch/mcp.js +6 -6
- package/dist/plugin/websearch/parallel.js +8 -8
- package/dist/plugin/websearch/tavily.js +6 -6
- package/dist/plugin/websearch/tinyfish.js +8 -8
- package/dist/plugin.js +223 -223
- package/dist/project/schema.js +2 -2
- package/dist/project/sql.js +4 -4
- package/dist/project.js +85 -85
- package/dist/provider.js +96 -96
- package/dist/pty/protocol.js +1 -1
- package/dist/pty/ticket.js +1 -1
- package/dist/pty.js +100 -100
- package/dist/reference/instructions.js +90 -90
- package/dist/reference.js +90 -90
- package/dist/repository-cache.js +82 -82
- package/dist/repository.js +3 -3
- package/dist/ripgrep/binary.js +2 -2
- package/dist/ripgrep.js +98 -98
- package/dist/rpc.js +87 -87
- package/dist/schema.js +1 -1
- package/dist/session/affinity.js +1 -1
- package/dist/session/command.js +75 -75
- package/dist/session/compaction.js +134 -134
- package/dist/session/context.js +154 -154
- package/dist/session/diff.js +89 -89
- package/dist/session/environment.js +5 -5
- package/dist/session/error.js +5 -5
- package/dist/session/event.js +1 -1
- package/dist/session/execution/restart.js +215 -215
- package/dist/session/execution.js +126 -126
- package/dist/session/generate.js +153 -153
- package/dist/session/history.js +13 -13
- package/dist/session/inbox.js +91 -91
- package/dist/session/info.js +3 -3
- package/dist/session/instruction-entry.js +74 -74
- package/dist/session/instruction-state.js +8 -8
- package/dist/session/instructions.js +98 -98
- package/dist/session/message-updater.js +2 -2
- package/dist/session/message.js +1 -1
- package/dist/session/model-request.js +121 -121
- package/dist/session/model-transport.js +9 -9
- package/dist/session/move.js +130 -130
- package/dist/session/projector.js +85 -85
- package/dist/session/prompt.js +106 -106
- package/dist/session/provider-context.js +3 -3
- package/dist/session/revert.js +91 -91
- package/dist/session/run-coordinator.js +3 -3
- package/dist/session/runner/index.js +3 -3
- package/dist/session/runner/llm.js +225 -225
- package/dist/session/runner/max-steps.js +1 -1
- package/dist/session/runner/model.js +99 -99
- package/dist/session/runner/publish-llm-event.js +114 -114
- package/dist/session/runner/retry.js +2 -2
- package/dist/session/runner/step.js +126 -126
- package/dist/session/runner/to-llm-message.js +2 -2
- package/dist/session/schema.js +3 -3
- package/dist/session/session.js +165 -165
- package/dist/session/shell.js +131 -131
- package/dist/session/skill.js +104 -104
- package/dist/session/sql.js +5 -5
- package/dist/session/stats.js +74 -74
- package/dist/session/store.js +88 -88
- package/dist/session/subagent-completion.js +1 -1
- package/dist/session/subagent-job.js +204 -204
- package/dist/session/system-prompt.js +3 -3
- package/dist/session/title.js +156 -156
- package/dist/session/to-session-error.js +112 -112
- package/dist/session/transfer.js +209 -209
- package/dist/session/usage.js +1 -1
- package/dist/session.js +210 -210
- package/dist/shell/parse.js +6 -6
- package/dist/shell/result.js +1 -1
- package/dist/shell/scan.js +1 -1
- package/dist/shell/select.js +15 -15
- package/dist/shell.js +133 -133
- package/dist/skill/discovery.js +6 -6
- package/dist/skill/instructions.js +106 -106
- package/dist/skill.js +113 -113
- package/dist/snapshot.js +92 -92
- package/dist/state.js +1 -1
- package/dist/tool/html-markdown.js +1 -1
- package/dist/tool/http-body.js +1 -1
- package/dist/tool/mcp.js +129 -129
- package/dist/tool/plugin/edit.js +121 -121
- package/dist/tool/plugin/file-diff.js +1 -1
- package/dist/tool/plugin/glob.js +119 -119
- package/dist/tool/plugin/grep.js +125 -125
- package/dist/tool/plugin/mcp-resource.js +118 -118
- package/dist/tool/plugin/opencode.js +3 -3
- package/dist/tool/plugin/patch.js +121 -121
- package/dist/tool/plugin/question.js +104 -104
- package/dist/tool/plugin/read.js +126 -126
- package/dist/tool/plugin/shell.js +209 -209
- package/dist/tool/plugin/skill.js +106 -106
- package/dist/tool/plugin/subagent.js +209 -209
- package/dist/tool/plugin/webfetch.js +113 -113
- package/dist/tool/plugin/websearch.js +113 -113
- package/dist/tool/plugin/write.js +123 -123
- package/dist/tool/read-filesystem.js +101 -101
- package/dist/tool/runtime.js +1 -1
- package/dist/tool-output.js +7 -7
- package/dist/tool.js +12 -12
- package/dist/util/error-summary.js +1 -1
- package/dist/util/error.js +1 -1
- package/dist/util/git-executable.js +2 -2
- package/dist/util/iife.js +1 -1
- package/dist/util/lazy.js +1 -1
- package/dist/util/slug.js +1 -1
- package/dist/util/token.js +1 -1
- package/dist/util/which.js +1 -1
- package/dist/util/wildcard.js +1 -1
- package/dist/v1/config/agent.js +5 -5
- package/dist/v1/config/command.js +3 -3
- package/dist/v1/config/error.js +2 -2
- package/dist/v1/config/mcp.js +4 -4
- package/dist/v1/config/migrate.js +93 -93
- package/dist/v1/config/permission.js +3 -3
- package/dist/v1/config/plugin.js +3 -3
- package/dist/v1/config/provider-options.js +1 -1
- package/dist/v1/config/provider.js +4 -4
- package/dist/variant.js +92 -92
- package/dist/vcs/patch.js +1 -1
- package/dist/vcs.js +90 -90
- package/dist/websearch.js +83 -83
- package/dist/wellknown/plugin.js +75 -75
- package/dist/wellknown.js +82 -82
- package/dist/workspace/driver.js +7 -7
- package/dist/workspace/sql.js +1 -1
- package/dist/workspace.js +81 -81
- package/dist/worktree/directory.js +2 -2
- package/dist/worktree/git.js +10 -10
- package/dist/worktree/sql.js +5 -5
- package/dist/worktree/strategies.js +90 -90
- package/dist/worktree.js +99 -99
- package/package.json +8 -8
- package/dist/chunks/state-9zmkt7t8.js +0 -507
- package/dist/chunks/state-ht5y0zrb.js +0 -18
- package/dist/chunks/state-kc4mjjv2.js +0 -253
- package/dist/chunks/state-w1199tq0.js +0 -26
- /package/dist/chunks/{state-0qkdqm5v.js → instruction-discovery-0qkdqm5v.js} +0 -0
- /package/dist/chunks/{state-0zkw76rk.js → instruction-discovery-0zkw76rk.js} +0 -0
- /package/dist/chunks/{state-17cy0kzp.js → instruction-discovery-17cy0kzp.js} +0 -0
- /package/dist/chunks/{state-1cnp2v09.js → instruction-discovery-1cnp2v09.js} +0 -0
- /package/dist/chunks/{state-1kg9ymc8.js → instruction-discovery-1kg9ymc8.js} +0 -0
- /package/dist/chunks/{state-24dcb14g.js → instruction-discovery-24dcb14g.js} +0 -0
- /package/dist/chunks/{state-2710q6r3.js → instruction-discovery-2710q6r3.js} +0 -0
- /package/dist/chunks/{state-2axfhc9x.js → instruction-discovery-2axfhc9x.js} +0 -0
- /package/dist/chunks/{state-2c3vjs8z.js → instruction-discovery-2c3vjs8z.js} +0 -0
- /package/dist/chunks/{state-34c7v6d4.js → instruction-discovery-34c7v6d4.js} +0 -0
- /package/dist/chunks/{state-359p4xyc.js → instruction-discovery-359p4xyc.js} +0 -0
- /package/dist/chunks/{state-3asan66x.js → instruction-discovery-3asan66x.js} +0 -0
- /package/dist/chunks/{state-3t0ybcrp.js → instruction-discovery-3t0ybcrp.js} +0 -0
- /package/dist/chunks/{state-3v8g72cx.js → instruction-discovery-3v8g72cx.js} +0 -0
- /package/dist/chunks/{state-3w5fmr99.js → instruction-discovery-3w5fmr99.js} +0 -0
- /package/dist/chunks/{state-3wcehsnq.js → instruction-discovery-3wcehsnq.js} +0 -0
- /package/dist/chunks/{state-43n2bw4t.js → instruction-discovery-43n2bw4t.js} +0 -0
- /package/dist/chunks/{state-4knz6hnm.js → instruction-discovery-4knz6hnm.js} +0 -0
- /package/dist/chunks/{state-4vcrnpx2.js → instruction-discovery-4vcrnpx2.js} +0 -0
- /package/dist/chunks/{state-4y7fprxs.js → instruction-discovery-4y7fprxs.js} +0 -0
- /package/dist/chunks/{state-53557ph1.js → instruction-discovery-53557ph1.js} +0 -0
- /package/dist/chunks/{state-550bvhaj.js → instruction-discovery-550bvhaj.js} +0 -0
- /package/dist/chunks/{state-6prwharc.js → instruction-discovery-6prwharc.js} +0 -0
- /package/dist/chunks/{state-6q2bdcd1.js → instruction-discovery-6q2bdcd1.js} +0 -0
- /package/dist/chunks/{state-7akdwqpd.js → instruction-discovery-7akdwqpd.js} +0 -0
- /package/dist/chunks/{state-7m9af43g.js → instruction-discovery-7m9af43g.js} +0 -0
- /package/dist/chunks/{state-822emrt2.js → instruction-discovery-822emrt2.js} +0 -0
- /package/dist/chunks/{state-84wd9syh.js → instruction-discovery-84wd9syh.js} +0 -0
- /package/dist/chunks/{state-88xbtdfr.js → instruction-discovery-88xbtdfr.js} +0 -0
- /package/dist/chunks/{state-8n3pysct.js → instruction-discovery-8n3pysct.js} +0 -0
- /package/dist/chunks/{state-8wj87zfr.js → instruction-discovery-8wj87zfr.js} +0 -0
- /package/dist/chunks/{state-9a4afbnw.js → instruction-discovery-9a4afbnw.js} +0 -0
- /package/dist/chunks/{state-9rqn6x4v.js → instruction-discovery-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{state-a6k6eb26.js → instruction-discovery-a6k6eb26.js} +0 -0
- /package/dist/chunks/{state-af5trqkr.js → instruction-discovery-af5trqkr.js} +0 -0
- /package/dist/chunks/{state-afrmfg78.js → instruction-discovery-afrmfg78.js} +0 -0
- /package/dist/chunks/{state-aqzs7mqg.js → instruction-discovery-aqzs7mqg.js} +0 -0
- /package/dist/chunks/{state-atq7p7m5.js → instruction-discovery-atq7p7m5.js} +0 -0
- /package/dist/chunks/{state-bkyjaxrp.js → instruction-discovery-bkyjaxrp.js} +0 -0
- /package/dist/chunks/{state-bmr6ed5q.js → instruction-discovery-bmr6ed5q.js} +0 -0
- /package/dist/chunks/{state-cf4snx6d.js → instruction-discovery-cf4snx6d.js} +0 -0
- /package/dist/chunks/{state-cvy3z8tj.js → instruction-discovery-cvy3z8tj.js} +0 -0
- /package/dist/chunks/{state-d9fn303g.js → instruction-discovery-d9fn303g.js} +0 -0
- /package/dist/chunks/{state-d9jj8t3e.js → instruction-discovery-d9jj8t3e.js} +0 -0
- /package/dist/chunks/{state-dajrwvna.js → instruction-discovery-dajrwvna.js} +0 -0
- /package/dist/chunks/{state-dap0rakb.js → instruction-discovery-dap0rakb.js} +0 -0
- /package/dist/chunks/{state-df08tz66.js → instruction-discovery-df08tz66.js} +0 -0
- /package/dist/chunks/{state-dy18nga0.js → instruction-discovery-dy18nga0.js} +0 -0
- /package/dist/chunks/{state-e3qxr5gk.js → instruction-discovery-e3qxr5gk.js} +0 -0
- /package/dist/chunks/{state-e5kj55wp.js → instruction-discovery-e5kj55wp.js} +0 -0
- /package/dist/chunks/{state-e73j6tqm.js → instruction-discovery-e73j6tqm.js} +0 -0
- /package/dist/chunks/{state-ec1grn59.js → instruction-discovery-ec1grn59.js} +0 -0
- /package/dist/chunks/{state-eh3zwz77.js → instruction-discovery-eh3zwz77.js} +0 -0
- /package/dist/chunks/{state-emrn6kk6.js → instruction-discovery-emrn6kk6.js} +0 -0
- /package/dist/chunks/{state-f0mxakyp.js → instruction-discovery-f0mxakyp.js} +0 -0
- /package/dist/chunks/{state-f6n9ztr4.js → instruction-discovery-f6n9ztr4.js} +0 -0
- /package/dist/chunks/{state-faypxj3z.js → instruction-discovery-faypxj3z.js} +0 -0
- /package/dist/chunks/{state-fd410y7t.js → instruction-discovery-fd410y7t.js} +0 -0
- /package/dist/chunks/{state-fxgpk5d8.js → instruction-discovery-fxgpk5d8.js} +0 -0
- /package/dist/chunks/{state-g4wezp1m.js → instruction-discovery-g4wezp1m.js} +0 -0
- /package/dist/chunks/{state-g86h250q.js → instruction-discovery-g86h250q.js} +0 -0
- /package/dist/chunks/{state-gebd4c9n.js → instruction-discovery-gebd4c9n.js} +0 -0
- /package/dist/chunks/{state-gftt206x.js → instruction-discovery-gftt206x.js} +0 -0
- /package/dist/chunks/{state-hk9envan.js → instruction-discovery-hk9envan.js} +0 -0
- /package/dist/chunks/{state-j2ntwpah.js → instruction-discovery-j2ntwpah.js} +0 -0
- /package/dist/chunks/{state-j5zkgpj8.js → instruction-discovery-j5zkgpj8.js} +0 -0
- /package/dist/chunks/{state-jjkms2e6.js → instruction-discovery-jjkms2e6.js} +0 -0
- /package/dist/chunks/{state-jr7sbwjy.js → instruction-discovery-jr7sbwjy.js} +0 -0
- /package/dist/chunks/{state-jwfs4k6c.js → instruction-discovery-jwfs4k6c.js} +0 -0
- /package/dist/chunks/{state-jzg6c2d5.js → instruction-discovery-jzg6c2d5.js} +0 -0
- /package/dist/chunks/{state-mp448xyj.js → instruction-discovery-mp448xyj.js} +0 -0
- /package/dist/chunks/{state-msx8hqn2.js → instruction-discovery-msx8hqn2.js} +0 -0
- /package/dist/chunks/{state-n05xt0ee.js → instruction-discovery-n05xt0ee.js} +0 -0
- /package/dist/chunks/{state-n3j8tn72.js → instruction-discovery-n3j8tn72.js} +0 -0
- /package/dist/chunks/{state-njntx4h6.js → instruction-discovery-njntx4h6.js} +0 -0
- /package/dist/chunks/{state-q3sfg36h.js → instruction-discovery-q3sfg36h.js} +0 -0
- /package/dist/chunks/{state-q74kybfr.js → instruction-discovery-q74kybfr.js} +0 -0
- /package/dist/chunks/{state-qaymkmh1.js → instruction-discovery-qaymkmh1.js} +0 -0
- /package/dist/chunks/{state-qb87gjwd.js → instruction-discovery-qb87gjwd.js} +0 -0
- /package/dist/chunks/{state-qfa1cgps.js → instruction-discovery-qfa1cgps.js} +0 -0
- /package/dist/chunks/{state-qg3g05ea.js → instruction-discovery-qg3g05ea.js} +0 -0
- /package/dist/chunks/{state-qrg20bc0.js → instruction-discovery-qrg20bc0.js} +0 -0
- /package/dist/chunks/{state-rcb2kzg1.js → instruction-discovery-rcb2kzg1.js} +0 -0
- /package/dist/chunks/{state-sdp7kfr6.js → instruction-discovery-sdp7kfr6.js} +0 -0
- /package/dist/chunks/{state-ssg3fenm.js → instruction-discovery-ssg3fenm.js} +0 -0
- /package/dist/chunks/{state-w803qqfp.js → instruction-discovery-w803qqfp.js} +0 -0
- /package/dist/chunks/{state-wc3fc9cn.js → instruction-discovery-wc3fc9cn.js} +0 -0
- /package/dist/chunks/{state-wer8tq1h.js → instruction-discovery-wer8tq1h.js} +0 -0
- /package/dist/chunks/{state-wtztk69x.js → instruction-discovery-wtztk69x.js} +0 -0
- /package/dist/chunks/{state-x0ckcb58.js → instruction-discovery-x0ckcb58.js} +0 -0
- /package/dist/chunks/{state-x61499pn.js → instruction-discovery-x61499pn.js} +0 -0
- /package/dist/chunks/{state-y44na4kk.js → instruction-discovery-y44na4kk.js} +0 -0
- /package/dist/chunks/{state-y8cydn3q.js → instruction-discovery-y8cydn3q.js} +0 -0
- /package/dist/chunks/{state-y8f7s663.js → instruction-discovery-y8f7s663.js} +0 -0
- /package/dist/chunks/{state-ygaqb7jw.js → instruction-discovery-ygaqb7jw.js} +0 -0
- /package/dist/chunks/{state-ym463w8f.js → instruction-discovery-ym463w8f.js} +0 -0
- /package/dist/chunks/{state-z5v4ffb3.js → instruction-discovery-z5v4ffb3.js} +0 -0
- /package/dist/chunks/{state-z9919s4g.js → instruction-discovery-z9919s4g.js} +0 -0
|
@@ -1,36 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Service83,
|
|
3
3
|
node87
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./instruction-discovery-tneyjf48.js";
|
|
5
5
|
import {
|
|
6
6
|
shutdown2,
|
|
7
7
|
create3
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./instruction-discovery-rdw6cm16.js";
|
|
9
9
|
import {
|
|
10
10
|
key2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./instruction-discovery-addxnjmp.js";
|
|
12
12
|
import {
|
|
13
13
|
ID14,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} from "./
|
|
14
|
+
Service77,
|
|
15
|
+
node81,
|
|
16
|
+
Event18
|
|
17
|
+
} from "./instruction-discovery-d815wfjk.js";
|
|
18
18
|
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from "./
|
|
19
|
+
Service80,
|
|
20
|
+
node84
|
|
21
|
+
} from "./instruction-discovery-krrp65g5.js";
|
|
22
22
|
import {
|
|
23
23
|
__export
|
|
24
|
-
} from "./
|
|
25
|
-
|
|
26
|
-
// src/aisdk-native.ts
|
|
27
|
-
var exports_aisdk_native = {};
|
|
28
|
-
__export(exports_aisdk_native, {
|
|
29
|
-
AISDKNative: () => exports_aisdk_native,
|
|
30
|
-
native: () => native2,
|
|
31
|
-
rewrite: () => rewrite2
|
|
32
|
-
});
|
|
33
|
-
import { Effect as Effect2, Option as Option2, Schema as Schema2, Struct as Struct2 } from "effect";
|
|
24
|
+
} from "./instruction-discovery-9rqn6x4v.js";
|
|
34
25
|
|
|
35
26
|
// src/provider.ts
|
|
36
27
|
var exports_provider3 = {};
|
|
@@ -38,13 +29,13 @@ __export(exports_provider3, {
|
|
|
38
29
|
AISDK_PREFIX: () => AISDK_PREFIX2,
|
|
39
30
|
Compaction: () => Compaction3,
|
|
40
31
|
DEFAULT_TIMEOUT_MS: () => DEFAULT_TIMEOUT_MS3,
|
|
41
|
-
Event: () =>
|
|
32
|
+
Event: () => Event17,
|
|
42
33
|
ID: () => ID13,
|
|
43
34
|
Info: () => Info22,
|
|
44
35
|
LoadError: () => LoadError3,
|
|
45
36
|
Provider: () => exports_provider3,
|
|
46
37
|
Request: () => Request3,
|
|
47
|
-
Service: () =>
|
|
38
|
+
Service: () => Service76,
|
|
48
39
|
Settings: () => Settings2,
|
|
49
40
|
Transport: () => Transport2,
|
|
50
41
|
aisdk: () => aisdk2,
|
|
@@ -54,12 +45,12 @@ __export(exports_provider3, {
|
|
|
54
45
|
mergeOverlay: () => mergeOverlay2,
|
|
55
46
|
modelSettings: () => modelSettings2,
|
|
56
47
|
nativeSettings: () => nativeSettings2,
|
|
57
|
-
node: () =>
|
|
48
|
+
node: () => node80,
|
|
58
49
|
packageName: () => packageName2,
|
|
59
50
|
timeout: () => timeout2,
|
|
60
51
|
timeouts: () => timeouts2
|
|
61
52
|
});
|
|
62
|
-
import { Context, Effect, Layer, Option, Schema, Stream, Struct } from "effect";
|
|
53
|
+
import { Context, Effect as Effect2, Layer, Option as Option2, Schema as Schema2, Stream, Struct as Struct2 } from "effect";
|
|
63
54
|
import { Provider } from "@opencode/schema/provider";
|
|
64
55
|
import { Model } from "@opencode/schema/model";
|
|
65
56
|
import { makeLocationNode } from "@opencode/util/effect/app-node";
|
|
@@ -68,7 +59,269 @@ import { isRecord } from "@opencode/ai/utils/record";
|
|
|
68
59
|
import { importModule, resolveModule } from "@opencode/util/runtime-import";
|
|
69
60
|
import { Credential } from "@opencode/schema/credential";
|
|
70
61
|
import { freeze } from "immer";
|
|
71
|
-
|
|
62
|
+
|
|
63
|
+
// src/aisdk-native.ts
|
|
64
|
+
var exports_aisdk_native = {};
|
|
65
|
+
__export(exports_aisdk_native, {
|
|
66
|
+
AISDKNative: () => exports_aisdk_native,
|
|
67
|
+
native: () => native2,
|
|
68
|
+
rewrite: () => rewrite2
|
|
69
|
+
});
|
|
70
|
+
import { Effect, Option, Schema, Struct } from "effect";
|
|
71
|
+
function rewrite2(target, input) {
|
|
72
|
+
if (input.specifier === undefined)
|
|
73
|
+
return;
|
|
74
|
+
const plain = resolve(input.specifier, input);
|
|
75
|
+
if (!plain)
|
|
76
|
+
return;
|
|
77
|
+
const settings = decode(target.settings ?? {});
|
|
78
|
+
const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
|
|
79
|
+
const translated = options(replacement, input.modelID, settings);
|
|
80
|
+
if (target.package !== undefined || replacement !== input.specifier)
|
|
81
|
+
target.package = replacement;
|
|
82
|
+
target.settings = target.settings === undefined ? undefined : {
|
|
83
|
+
...translated.settings,
|
|
84
|
+
...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
|
|
85
|
+
};
|
|
86
|
+
target.headers = mergeHeaders2(translated.headers, target.headers);
|
|
87
|
+
target.body = mergeOverlay2(translated.body, target.body);
|
|
88
|
+
target.variants = target.variants?.map((variant) => {
|
|
89
|
+
const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
|
|
90
|
+
const headers = mergeHeaders2(overlay.headers, variant.headers);
|
|
91
|
+
const body = mergeOverlay2(overlay.body, variant.body);
|
|
92
|
+
return {
|
|
93
|
+
id: variant.id,
|
|
94
|
+
...variant.settings === undefined ? {} : { settings: overlay.settings },
|
|
95
|
+
...headers === undefined ? {} : { headers },
|
|
96
|
+
...body === undefined ? {} : { body }
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
var PACKAGES = {
|
|
101
|
+
"@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
|
|
102
|
+
"@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
|
|
103
|
+
"@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
|
|
104
|
+
"@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
|
|
105
|
+
"@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
|
|
106
|
+
"@ai-sdk/cohere": "@opencode/ai/providers/cohere",
|
|
107
|
+
"@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
|
|
108
|
+
"@ai-sdk/google": "@opencode/ai/providers/google",
|
|
109
|
+
"@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
|
|
110
|
+
"@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
|
|
111
|
+
"@ai-sdk/groq": "@opencode/ai/providers/groq",
|
|
112
|
+
"@ai-sdk/mistral": "@opencode/ai/providers/mistral",
|
|
113
|
+
"@ai-sdk/openai": "@opencode/ai/providers/openai",
|
|
114
|
+
"@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
|
|
115
|
+
"@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
|
|
116
|
+
"@ai-sdk/xai": "@opencode/ai/providers/xai",
|
|
117
|
+
"@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
|
|
118
|
+
"@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
|
|
119
|
+
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
120
|
+
"venice-ai-sdk-provider": "@opencode/ai/providers/venice"
|
|
121
|
+
};
|
|
122
|
+
var protocols = (name) => ({
|
|
123
|
+
"@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
|
|
124
|
+
"@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
|
|
125
|
+
"@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
|
|
126
|
+
});
|
|
127
|
+
var HOSTS = {
|
|
128
|
+
alibaba: protocols("alibaba"),
|
|
129
|
+
"alibaba-cn": protocols("alibaba"),
|
|
130
|
+
"alibaba-coding-plan": protocols("alibaba"),
|
|
131
|
+
"alibaba-coding-plan-cn": protocols("alibaba"),
|
|
132
|
+
"alibaba-token-plan": protocols("alibaba"),
|
|
133
|
+
"alibaba-token-plan-cn": protocols("alibaba"),
|
|
134
|
+
baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
|
|
135
|
+
"cloudflare-ai-gateway": {
|
|
136
|
+
"@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
137
|
+
"@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
138
|
+
"@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
139
|
+
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
|
|
140
|
+
},
|
|
141
|
+
cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
|
|
142
|
+
"cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
|
|
143
|
+
deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
|
|
144
|
+
digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
|
|
145
|
+
"fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
|
|
146
|
+
"google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
|
|
147
|
+
"kimi-for-coding": protocols("moonshot"),
|
|
148
|
+
meta: protocols("meta"),
|
|
149
|
+
minimax: protocols("minimax"),
|
|
150
|
+
"minimax-cn": protocols("minimax"),
|
|
151
|
+
"minimax-coding-plan": protocols("minimax"),
|
|
152
|
+
"minimax-cn-coding-plan": protocols("minimax"),
|
|
153
|
+
moonshotai: protocols("moonshot"),
|
|
154
|
+
"moonshotai-cn": protocols("moonshot"),
|
|
155
|
+
zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
156
|
+
"zai-coding-plan": protocols("zai-coding-plan"),
|
|
157
|
+
zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
158
|
+
"zhipuai-coding-plan": protocols("zai-coding-plan")
|
|
159
|
+
};
|
|
160
|
+
var NATIVE = new Set([
|
|
161
|
+
...Object.values(PACKAGES),
|
|
162
|
+
...Object.values(HOSTS).flatMap((host) => Object.values(host)),
|
|
163
|
+
"@opencode/ai/providers/azure/chat",
|
|
164
|
+
"@opencode/ai/providers/amazon-bedrock/mantle",
|
|
165
|
+
"@opencode/ai/providers/amazon-bedrock/mantle/chat",
|
|
166
|
+
"@opencode/ai/providers/amazon-bedrock/mantle/responses"
|
|
167
|
+
]);
|
|
168
|
+
function native2(npm, context) {
|
|
169
|
+
const host = HOSTS[context.providerID]?.[npm];
|
|
170
|
+
if (host)
|
|
171
|
+
return host;
|
|
172
|
+
if (npm === "@ai-sdk/amazon-bedrock/mantle")
|
|
173
|
+
return mantle(context.modelID);
|
|
174
|
+
if (npm === "@ai-sdk/azure" && azureChat(context))
|
|
175
|
+
return "@opencode/ai/providers/azure/chat";
|
|
176
|
+
return PACKAGES[npm];
|
|
177
|
+
}
|
|
178
|
+
var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
|
|
179
|
+
var mantle = (modelID) => {
|
|
180
|
+
if (modelID === undefined)
|
|
181
|
+
return "@opencode/ai/providers/amazon-bedrock/mantle";
|
|
182
|
+
return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
|
|
183
|
+
};
|
|
184
|
+
function resolve(specifier, context) {
|
|
185
|
+
const npm = packageName2(specifier);
|
|
186
|
+
if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
|
|
187
|
+
return native2(npm, context);
|
|
188
|
+
if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
|
|
189
|
+
return mantle(context.modelID);
|
|
190
|
+
if (npm === "@opencode/ai/providers/azure/responses" && azureChat(context))
|
|
191
|
+
return "@opencode/ai/providers/azure/chat";
|
|
192
|
+
return NATIVE.has(npm) ? npm : undefined;
|
|
193
|
+
}
|
|
194
|
+
function options(replacement, modelID, settings) {
|
|
195
|
+
const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
|
|
196
|
+
const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
|
|
197
|
+
const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
|
|
198
|
+
return {
|
|
199
|
+
settings: {
|
|
200
|
+
...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
|
|
201
|
+
...thinking === undefined ? {} : { thinking }
|
|
202
|
+
},
|
|
203
|
+
...settings.headers === undefined ? {} : { headers: settings.headers },
|
|
204
|
+
...settings.extraBody === undefined ? {} : { body: settings.extraBody },
|
|
205
|
+
...converse ? bedrockRequest(modelID, settings) : {},
|
|
206
|
+
...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
var BEDROCK_KEYS = [
|
|
210
|
+
"bearerToken",
|
|
211
|
+
"endpoint",
|
|
212
|
+
"credentials",
|
|
213
|
+
"credentialProvider",
|
|
214
|
+
"accessKeyId",
|
|
215
|
+
"secretAccessKey",
|
|
216
|
+
"sessionToken"
|
|
217
|
+
];
|
|
218
|
+
var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
|
|
219
|
+
function bedrockSettings(settings, converse) {
|
|
220
|
+
const region = settings.region ?? settings.credentials?.region;
|
|
221
|
+
const credentials = settings.credentials ?? settings;
|
|
222
|
+
const baseURL = settings.baseURL ?? settings.endpoint;
|
|
223
|
+
return {
|
|
224
|
+
...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
|
|
225
|
+
...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
|
|
226
|
+
...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
|
|
227
|
+
...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
|
|
228
|
+
credentials: {
|
|
229
|
+
...region === undefined ? {} : { region },
|
|
230
|
+
accessKeyId: credentials.accessKeyId,
|
|
231
|
+
secretAccessKey: credentials.secretAccessKey,
|
|
232
|
+
...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
function bedrockThinking(modelID, settings) {
|
|
238
|
+
const reasoning = settings.reasoningConfig;
|
|
239
|
+
if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
|
|
240
|
+
return;
|
|
241
|
+
return { type: "enabled", budgetTokens: reasoning.budgetTokens };
|
|
242
|
+
}
|
|
243
|
+
function bedrockRequest(modelID, settings) {
|
|
244
|
+
const additional = settings.additionalModelRequestFields ?? {};
|
|
245
|
+
const reasoning = settings.reasoningConfig;
|
|
246
|
+
const anthropic = modelID?.includes("anthropic") ?? false;
|
|
247
|
+
const openai = modelID?.includes("openai.") ?? false;
|
|
248
|
+
const harmony = modelID?.includes("openai.gpt-oss") ?? false;
|
|
249
|
+
const effort = reasoning?.maxReasoningEffort;
|
|
250
|
+
const type = reasoning?.type;
|
|
251
|
+
const budget = reasoning?.budgetTokens;
|
|
252
|
+
const display = reasoning?.display;
|
|
253
|
+
const betas = settings.anthropicBeta ?? [];
|
|
254
|
+
const fields = mergeOverlay2(additional, {
|
|
255
|
+
...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
|
|
256
|
+
...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
|
|
257
|
+
...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
|
|
258
|
+
...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
|
|
259
|
+
...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
|
|
260
|
+
...!anthropic && !openai && effort !== undefined ? {
|
|
261
|
+
reasoningConfig: {
|
|
262
|
+
...type === undefined || type === "adaptive" ? {} : { type },
|
|
263
|
+
...budget === undefined ? {} : { budgetTokens: budget },
|
|
264
|
+
maxReasoningEffort: effort
|
|
265
|
+
}
|
|
266
|
+
} : {}
|
|
267
|
+
});
|
|
268
|
+
const body = {
|
|
269
|
+
...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
|
|
270
|
+
...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
|
|
271
|
+
};
|
|
272
|
+
return Object.keys(body).length === 0 ? {} : { body };
|
|
273
|
+
}
|
|
274
|
+
var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
|
|
275
|
+
function openRouterRequest(settings) {
|
|
276
|
+
const headers = mergeHeaders2({
|
|
277
|
+
...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
|
|
278
|
+
...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
|
|
279
|
+
...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
|
|
280
|
+
}, settings.headers) ?? {};
|
|
281
|
+
return Object.keys(headers).length === 0 ? {} : { headers };
|
|
282
|
+
}
|
|
283
|
+
var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
|
|
284
|
+
var Credentials = Schema.Struct({
|
|
285
|
+
accessKeyId: Schema.String,
|
|
286
|
+
secretAccessKey: Schema.String,
|
|
287
|
+
sessionToken: lenient(Schema.String),
|
|
288
|
+
region: lenient(Schema.String)
|
|
289
|
+
});
|
|
290
|
+
var Legacy = Schema.StructWithRest(Schema.Struct({
|
|
291
|
+
apiKey: lenient(Schema.String),
|
|
292
|
+
baseURL: lenient(Schema.String),
|
|
293
|
+
headers: lenient(Schema.Record(Schema.String, Schema.String)),
|
|
294
|
+
extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
|
|
295
|
+
useCompletionUrls: lenient(Schema.Boolean),
|
|
296
|
+
auth: lenient(Schema.Literals(["bearer", "sigv4"])),
|
|
297
|
+
bearerToken: lenient(Schema.String),
|
|
298
|
+
endpoint: lenient(Schema.String),
|
|
299
|
+
region: lenient(Schema.String),
|
|
300
|
+
credentials: lenient(Credentials),
|
|
301
|
+
accessKeyId: lenient(Schema.String),
|
|
302
|
+
secretAccessKey: lenient(Schema.String),
|
|
303
|
+
sessionToken: lenient(Schema.String),
|
|
304
|
+
anthropicBeta: lenient(Schema.Array(Schema.String)),
|
|
305
|
+
serviceTier: lenient(Schema.String),
|
|
306
|
+
reasoningConfig: lenient(Schema.Struct({
|
|
307
|
+
type: lenient(Schema.String),
|
|
308
|
+
display: lenient(Schema.String),
|
|
309
|
+
maxReasoningEffort: lenient(Schema.String),
|
|
310
|
+
budgetTokens: lenient(Schema.Number)
|
|
311
|
+
})),
|
|
312
|
+
additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
|
|
313
|
+
anthropic_beta: lenient(Schema.Array(Schema.String)),
|
|
314
|
+
output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
|
|
315
|
+
reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
|
|
316
|
+
}), [Schema.Record(Schema.String, Schema.Unknown)])),
|
|
317
|
+
appName: lenient(Schema.String),
|
|
318
|
+
appUrl: lenient(Schema.String),
|
|
319
|
+
api_keys: lenient(Schema.Record(Schema.String, Schema.String))
|
|
320
|
+
}), [Schema.Record(Schema.String, Schema.Unknown)]);
|
|
321
|
+
var decode = Schema.decodeUnknownSync(Legacy);
|
|
322
|
+
|
|
323
|
+
// src/provider.ts
|
|
324
|
+
import { Event as Event17 } from "@opencode/schema/provider";
|
|
72
325
|
var ID13 = Provider.ID;
|
|
73
326
|
var AISDK_PREFIX2 = "aisdk:";
|
|
74
327
|
var isAISDK2 = (value) => value?.startsWith(AISDK_PREFIX2) ?? false;
|
|
@@ -80,12 +333,12 @@ function packageName2(value) {
|
|
|
80
333
|
return value;
|
|
81
334
|
return value.slice(AISDK_PREFIX2.length);
|
|
82
335
|
}
|
|
83
|
-
var JsonRecord =
|
|
84
|
-
var decodeJsonRecord =
|
|
336
|
+
var JsonRecord = Schema2.Record(Schema2.String, Schema2.Json);
|
|
337
|
+
var decodeJsonRecord = Schema2.decodeUnknownSync(JsonRecord);
|
|
85
338
|
|
|
86
|
-
class LoadError3 extends
|
|
87
|
-
package:
|
|
88
|
-
cause:
|
|
339
|
+
class LoadError3 extends Schema2.TaggedError()("Provider.LoadError", {
|
|
340
|
+
package: Schema2.String,
|
|
341
|
+
cause: Schema2.Defect()
|
|
89
342
|
}) {
|
|
90
343
|
}
|
|
91
344
|
var packages = new Map;
|
|
@@ -152,12 +405,12 @@ var builtins = new Map([
|
|
|
152
405
|
() => import("@opencode/ai/providers/zai-coding-plan/responses")
|
|
153
406
|
]
|
|
154
407
|
]);
|
|
155
|
-
var loadPackage2 =
|
|
408
|
+
var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
|
|
156
409
|
const specifier = packageName2(input);
|
|
157
410
|
const builtin = builtins.get(specifier);
|
|
158
411
|
if (builtin)
|
|
159
412
|
return yield* importPackage(specifier, specifier, builtin);
|
|
160
|
-
const resolved = yield*
|
|
413
|
+
const resolved = yield* Effect2.sync(() => {
|
|
161
414
|
if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
|
|
162
415
|
return specifier;
|
|
163
416
|
try {
|
|
@@ -176,8 +429,8 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
|
|
|
176
429
|
}
|
|
177
430
|
const parts = specifier.split("/");
|
|
178
431
|
const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
|
|
179
|
-
const installed = yield* npm.add(root).pipe(
|
|
180
|
-
const entrypoint = yield*
|
|
432
|
+
const installed = yield* npm.add(root).pipe(Effect2.mapError((cause) => new LoadError3({ package: specifier, cause })));
|
|
433
|
+
const entrypoint = yield* Effect2.try({
|
|
181
434
|
try: () => resolveModule(specifier, installed.directory),
|
|
182
435
|
catch: (cause) => new LoadError3({ package: specifier, cause })
|
|
183
436
|
});
|
|
@@ -186,15 +439,15 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
|
|
|
186
439
|
var CORE_KEYS = ["chunkTimeout", "compaction", "fetch", "headerTimeout", "timeout", "transport"];
|
|
187
440
|
var PROVIDER_ONLY_KEYS = ["chunkTimeout", "headerTimeout", "timeout", "transport"];
|
|
188
441
|
function nativeSettings2(settings) {
|
|
189
|
-
return
|
|
442
|
+
return Struct2.omit(settings, CORE_KEYS);
|
|
190
443
|
}
|
|
191
444
|
function modelSettings2(settings) {
|
|
192
|
-
return settings &&
|
|
445
|
+
return settings && Struct2.omit(settings, PROVIDER_ONLY_KEYS);
|
|
193
446
|
}
|
|
194
|
-
var decodeTimeout =
|
|
447
|
+
var decodeTimeout = Schema2.decodeUnknownOption(HttpTimeout);
|
|
195
448
|
var DEFAULT_TIMEOUT_MS3 = 300000;
|
|
196
449
|
function timeout2(value) {
|
|
197
|
-
return
|
|
450
|
+
return Option2.getOrUndefined(decodeTimeout(value));
|
|
198
451
|
}
|
|
199
452
|
function timeouts2(settings) {
|
|
200
453
|
return {
|
|
@@ -234,7 +487,7 @@ var Transport2 = Provider.Transport;
|
|
|
234
487
|
var Settings2 = Provider.Settings;
|
|
235
488
|
var Info22 = Provider.Info;
|
|
236
489
|
|
|
237
|
-
class
|
|
490
|
+
class Service76 extends Context.Service()("@opencode/Provider") {
|
|
238
491
|
}
|
|
239
492
|
var definitions = new WeakMap;
|
|
240
493
|
function index(providerID, models) {
|
|
@@ -247,10 +500,10 @@ function index(providerID, models) {
|
|
|
247
500
|
definitions.set(models, indexes);
|
|
248
501
|
return result;
|
|
249
502
|
}
|
|
250
|
-
var layer = Layer.effect(
|
|
503
|
+
var layer = Layer.effect(Service76, Effect2.gen(function* () {
|
|
251
504
|
const bus = yield* Service83;
|
|
252
|
-
const integrations = yield*
|
|
253
|
-
const location = yield*
|
|
505
|
+
const integrations = yield* Service77;
|
|
506
|
+
const location = yield* Service80;
|
|
254
507
|
const state = create3({
|
|
255
508
|
name: "provider",
|
|
256
509
|
initial: () => new Map,
|
|
@@ -329,9 +582,9 @@ var layer = Layer.effect(Service74, Effect.gen(function* () {
|
|
|
329
582
|
},
|
|
330
583
|
notify: () => notify
|
|
331
584
|
});
|
|
332
|
-
yield*
|
|
585
|
+
yield* Effect2.addFinalizer(() => shutdown2(state.reload()));
|
|
333
586
|
let cached;
|
|
334
|
-
const snapshot =
|
|
587
|
+
const snapshot = Effect2.fn("Provider.snapshot")(function* () {
|
|
335
588
|
while (true) {
|
|
336
589
|
const revision = integrations.revision();
|
|
337
590
|
const records = state.get();
|
|
@@ -359,7 +612,7 @@ var layer = Layer.effect(Service74, Effect.gen(function* () {
|
|
|
359
612
|
}
|
|
360
613
|
});
|
|
361
614
|
let published;
|
|
362
|
-
const notify =
|
|
615
|
+
const notify = Effect2.gen(function* () {
|
|
363
616
|
const value = yield* snapshot();
|
|
364
617
|
if (value === published)
|
|
365
618
|
return;
|
|
@@ -368,19 +621,19 @@ var layer = Layer.effect(Service74, Effect.gen(function* () {
|
|
|
368
621
|
location: { directory: location.directory, workspaceID: location.workspaceID }
|
|
369
622
|
});
|
|
370
623
|
});
|
|
371
|
-
yield* bus.subscribe([
|
|
372
|
-
return
|
|
624
|
+
yield* bus.subscribe([Event18.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect2.forkScoped({ startImmediately: true }));
|
|
625
|
+
return Service76.of({
|
|
373
626
|
transform: state.transform,
|
|
374
627
|
reload: state.reload,
|
|
375
|
-
get:
|
|
376
|
-
all:
|
|
377
|
-
available:
|
|
628
|
+
get: Effect2.fn("Provider.get")((id) => Effect2.sync(() => freeze(state.get().get(id)?.provider, true))),
|
|
629
|
+
all: Effect2.fn("Provider.all")(() => Effect2.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
|
|
630
|
+
available: Effect2.fn("Provider.available")(() => snapshot().pipe(Effect2.map((value) => value.providers))),
|
|
378
631
|
snapshot
|
|
379
632
|
});
|
|
380
633
|
}));
|
|
381
|
-
var
|
|
382
|
-
var importPackage =
|
|
383
|
-
const module = yield*
|
|
634
|
+
var node80 = makeLocationNode({ service: Service76, layer, deps: [node87, node81, node84] });
|
|
635
|
+
var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
|
|
636
|
+
const module = yield* Effect2.tryPromise({
|
|
384
637
|
try: () => {
|
|
385
638
|
const existing = packages.get(entrypoint);
|
|
386
639
|
if (existing)
|
|
@@ -400,257 +653,4 @@ var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, en
|
|
|
400
653
|
return module;
|
|
401
654
|
});
|
|
402
655
|
|
|
403
|
-
|
|
404
|
-
function rewrite2(target, input) {
|
|
405
|
-
if (input.specifier === undefined)
|
|
406
|
-
return;
|
|
407
|
-
const plain = resolve(input.specifier, input);
|
|
408
|
-
if (!plain)
|
|
409
|
-
return;
|
|
410
|
-
const settings = decode(target.settings ?? {});
|
|
411
|
-
const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
|
|
412
|
-
const translated = options(replacement, input.modelID, settings);
|
|
413
|
-
if (target.package !== undefined || replacement !== input.specifier)
|
|
414
|
-
target.package = replacement;
|
|
415
|
-
target.settings = target.settings === undefined ? undefined : {
|
|
416
|
-
...translated.settings,
|
|
417
|
-
...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
|
|
418
|
-
};
|
|
419
|
-
target.headers = mergeHeaders2(translated.headers, target.headers);
|
|
420
|
-
target.body = mergeOverlay2(translated.body, target.body);
|
|
421
|
-
target.variants = target.variants?.map((variant) => {
|
|
422
|
-
const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
|
|
423
|
-
const headers = mergeHeaders2(overlay.headers, variant.headers);
|
|
424
|
-
const body = mergeOverlay2(overlay.body, variant.body);
|
|
425
|
-
return {
|
|
426
|
-
id: variant.id,
|
|
427
|
-
...variant.settings === undefined ? {} : { settings: overlay.settings },
|
|
428
|
-
...headers === undefined ? {} : { headers },
|
|
429
|
-
...body === undefined ? {} : { body }
|
|
430
|
-
};
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
var PACKAGES = {
|
|
434
|
-
"@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
|
|
435
|
-
"@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
|
|
436
|
-
"@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
|
|
437
|
-
"@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
|
|
438
|
-
"@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
|
|
439
|
-
"@ai-sdk/cohere": "@opencode/ai/providers/cohere",
|
|
440
|
-
"@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
|
|
441
|
-
"@ai-sdk/google": "@opencode/ai/providers/google",
|
|
442
|
-
"@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
|
|
443
|
-
"@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
|
|
444
|
-
"@ai-sdk/groq": "@opencode/ai/providers/groq",
|
|
445
|
-
"@ai-sdk/mistral": "@opencode/ai/providers/mistral",
|
|
446
|
-
"@ai-sdk/openai": "@opencode/ai/providers/openai",
|
|
447
|
-
"@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
|
|
448
|
-
"@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
|
|
449
|
-
"@ai-sdk/xai": "@opencode/ai/providers/xai",
|
|
450
|
-
"@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
|
|
451
|
-
"@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
|
|
452
|
-
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
453
|
-
"venice-ai-sdk-provider": "@opencode/ai/providers/venice"
|
|
454
|
-
};
|
|
455
|
-
var protocols = (name) => ({
|
|
456
|
-
"@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
|
|
457
|
-
"@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
|
|
458
|
-
"@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
|
|
459
|
-
});
|
|
460
|
-
var HOSTS = {
|
|
461
|
-
alibaba: protocols("alibaba"),
|
|
462
|
-
"alibaba-cn": protocols("alibaba"),
|
|
463
|
-
"alibaba-coding-plan": protocols("alibaba"),
|
|
464
|
-
"alibaba-coding-plan-cn": protocols("alibaba"),
|
|
465
|
-
"alibaba-token-plan": protocols("alibaba"),
|
|
466
|
-
"alibaba-token-plan-cn": protocols("alibaba"),
|
|
467
|
-
baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
|
|
468
|
-
"cloudflare-ai-gateway": {
|
|
469
|
-
"@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
470
|
-
"@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
471
|
-
"@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
472
|
-
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
|
|
473
|
-
},
|
|
474
|
-
cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
|
|
475
|
-
"cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
|
|
476
|
-
deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
|
|
477
|
-
digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
|
|
478
|
-
"fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
|
|
479
|
-
"google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
|
|
480
|
-
"kimi-for-coding": protocols("moonshot"),
|
|
481
|
-
meta: protocols("meta"),
|
|
482
|
-
minimax: protocols("minimax"),
|
|
483
|
-
"minimax-cn": protocols("minimax"),
|
|
484
|
-
"minimax-coding-plan": protocols("minimax"),
|
|
485
|
-
"minimax-cn-coding-plan": protocols("minimax"),
|
|
486
|
-
moonshotai: protocols("moonshot"),
|
|
487
|
-
"moonshotai-cn": protocols("moonshot"),
|
|
488
|
-
zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
489
|
-
"zai-coding-plan": protocols("zai-coding-plan"),
|
|
490
|
-
zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
491
|
-
"zhipuai-coding-plan": protocols("zai-coding-plan")
|
|
492
|
-
};
|
|
493
|
-
var NATIVE = new Set([
|
|
494
|
-
...Object.values(PACKAGES),
|
|
495
|
-
...Object.values(HOSTS).flatMap((host) => Object.values(host)),
|
|
496
|
-
"@opencode/ai/providers/azure/chat",
|
|
497
|
-
"@opencode/ai/providers/amazon-bedrock/mantle",
|
|
498
|
-
"@opencode/ai/providers/amazon-bedrock/mantle/chat",
|
|
499
|
-
"@opencode/ai/providers/amazon-bedrock/mantle/responses"
|
|
500
|
-
]);
|
|
501
|
-
function native2(npm, context) {
|
|
502
|
-
const host = HOSTS[context.providerID]?.[npm];
|
|
503
|
-
if (host)
|
|
504
|
-
return host;
|
|
505
|
-
if (npm === "@ai-sdk/amazon-bedrock/mantle")
|
|
506
|
-
return mantle(context.modelID);
|
|
507
|
-
if (npm === "@ai-sdk/azure" && azureChat(context))
|
|
508
|
-
return "@opencode/ai/providers/azure/chat";
|
|
509
|
-
return PACKAGES[npm];
|
|
510
|
-
}
|
|
511
|
-
var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
|
|
512
|
-
var mantle = (modelID) => {
|
|
513
|
-
if (modelID === undefined)
|
|
514
|
-
return "@opencode/ai/providers/amazon-bedrock/mantle";
|
|
515
|
-
return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
|
|
516
|
-
};
|
|
517
|
-
function resolve(specifier, context) {
|
|
518
|
-
const npm = packageName2(specifier);
|
|
519
|
-
if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
|
|
520
|
-
return native2(npm, context);
|
|
521
|
-
if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
|
|
522
|
-
return mantle(context.modelID);
|
|
523
|
-
if (npm === "@opencode/ai/providers/azure/responses" && azureChat(context))
|
|
524
|
-
return "@opencode/ai/providers/azure/chat";
|
|
525
|
-
return NATIVE.has(npm) ? npm : undefined;
|
|
526
|
-
}
|
|
527
|
-
function options(replacement, modelID, settings) {
|
|
528
|
-
const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
|
|
529
|
-
const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
|
|
530
|
-
const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
|
|
531
|
-
return {
|
|
532
|
-
settings: {
|
|
533
|
-
...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
|
|
534
|
-
...thinking === undefined ? {} : { thinking }
|
|
535
|
-
},
|
|
536
|
-
...settings.headers === undefined ? {} : { headers: settings.headers },
|
|
537
|
-
...settings.extraBody === undefined ? {} : { body: settings.extraBody },
|
|
538
|
-
...converse ? bedrockRequest(modelID, settings) : {},
|
|
539
|
-
...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
var BEDROCK_KEYS = [
|
|
543
|
-
"bearerToken",
|
|
544
|
-
"endpoint",
|
|
545
|
-
"credentials",
|
|
546
|
-
"credentialProvider",
|
|
547
|
-
"accessKeyId",
|
|
548
|
-
"secretAccessKey",
|
|
549
|
-
"sessionToken"
|
|
550
|
-
];
|
|
551
|
-
var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
|
|
552
|
-
function bedrockSettings(settings, converse) {
|
|
553
|
-
const region = settings.region ?? settings.credentials?.region;
|
|
554
|
-
const credentials = settings.credentials ?? settings;
|
|
555
|
-
const baseURL = settings.baseURL ?? settings.endpoint;
|
|
556
|
-
return {
|
|
557
|
-
...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
|
|
558
|
-
...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
|
|
559
|
-
...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
|
|
560
|
-
...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
|
|
561
|
-
credentials: {
|
|
562
|
-
...region === undefined ? {} : { region },
|
|
563
|
-
accessKeyId: credentials.accessKeyId,
|
|
564
|
-
secretAccessKey: credentials.secretAccessKey,
|
|
565
|
-
...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
};
|
|
569
|
-
}
|
|
570
|
-
function bedrockThinking(modelID, settings) {
|
|
571
|
-
const reasoning = settings.reasoningConfig;
|
|
572
|
-
if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
|
|
573
|
-
return;
|
|
574
|
-
return { type: "enabled", budgetTokens: reasoning.budgetTokens };
|
|
575
|
-
}
|
|
576
|
-
function bedrockRequest(modelID, settings) {
|
|
577
|
-
const additional = settings.additionalModelRequestFields ?? {};
|
|
578
|
-
const reasoning = settings.reasoningConfig;
|
|
579
|
-
const anthropic = modelID?.includes("anthropic") ?? false;
|
|
580
|
-
const openai = modelID?.includes("openai.") ?? false;
|
|
581
|
-
const harmony = modelID?.includes("openai.gpt-oss") ?? false;
|
|
582
|
-
const effort = reasoning?.maxReasoningEffort;
|
|
583
|
-
const type = reasoning?.type;
|
|
584
|
-
const budget = reasoning?.budgetTokens;
|
|
585
|
-
const display = reasoning?.display;
|
|
586
|
-
const betas = settings.anthropicBeta ?? [];
|
|
587
|
-
const fields = mergeOverlay2(additional, {
|
|
588
|
-
...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
|
|
589
|
-
...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
|
|
590
|
-
...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
|
|
591
|
-
...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
|
|
592
|
-
...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
|
|
593
|
-
...!anthropic && !openai && effort !== undefined ? {
|
|
594
|
-
reasoningConfig: {
|
|
595
|
-
...type === undefined || type === "adaptive" ? {} : { type },
|
|
596
|
-
...budget === undefined ? {} : { budgetTokens: budget },
|
|
597
|
-
maxReasoningEffort: effort
|
|
598
|
-
}
|
|
599
|
-
} : {}
|
|
600
|
-
});
|
|
601
|
-
const body = {
|
|
602
|
-
...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
|
|
603
|
-
...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
|
|
604
|
-
};
|
|
605
|
-
return Object.keys(body).length === 0 ? {} : { body };
|
|
606
|
-
}
|
|
607
|
-
var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
|
|
608
|
-
function openRouterRequest(settings) {
|
|
609
|
-
const headers = mergeHeaders2({
|
|
610
|
-
...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
|
|
611
|
-
...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
|
|
612
|
-
...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
|
|
613
|
-
}, settings.headers) ?? {};
|
|
614
|
-
return Object.keys(headers).length === 0 ? {} : { headers };
|
|
615
|
-
}
|
|
616
|
-
var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option2.some(undefined)))));
|
|
617
|
-
var Credentials = Schema2.Struct({
|
|
618
|
-
accessKeyId: Schema2.String,
|
|
619
|
-
secretAccessKey: Schema2.String,
|
|
620
|
-
sessionToken: lenient(Schema2.String),
|
|
621
|
-
region: lenient(Schema2.String)
|
|
622
|
-
});
|
|
623
|
-
var Legacy = Schema2.StructWithRest(Schema2.Struct({
|
|
624
|
-
apiKey: lenient(Schema2.String),
|
|
625
|
-
baseURL: lenient(Schema2.String),
|
|
626
|
-
headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
|
|
627
|
-
extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
|
|
628
|
-
useCompletionUrls: lenient(Schema2.Boolean),
|
|
629
|
-
auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
|
|
630
|
-
bearerToken: lenient(Schema2.String),
|
|
631
|
-
endpoint: lenient(Schema2.String),
|
|
632
|
-
region: lenient(Schema2.String),
|
|
633
|
-
credentials: lenient(Credentials),
|
|
634
|
-
accessKeyId: lenient(Schema2.String),
|
|
635
|
-
secretAccessKey: lenient(Schema2.String),
|
|
636
|
-
sessionToken: lenient(Schema2.String),
|
|
637
|
-
anthropicBeta: lenient(Schema2.Array(Schema2.String)),
|
|
638
|
-
serviceTier: lenient(Schema2.String),
|
|
639
|
-
reasoningConfig: lenient(Schema2.Struct({
|
|
640
|
-
type: lenient(Schema2.String),
|
|
641
|
-
display: lenient(Schema2.String),
|
|
642
|
-
maxReasoningEffort: lenient(Schema2.String),
|
|
643
|
-
budgetTokens: lenient(Schema2.Number)
|
|
644
|
-
})),
|
|
645
|
-
additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
|
|
646
|
-
anthropic_beta: lenient(Schema2.Array(Schema2.String)),
|
|
647
|
-
output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
|
|
648
|
-
reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
|
|
649
|
-
}), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
|
|
650
|
-
appName: lenient(Schema2.String),
|
|
651
|
-
appUrl: lenient(Schema2.String),
|
|
652
|
-
api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
|
|
653
|
-
}), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
|
|
654
|
-
var decode = Schema2.decodeUnknownSync(Legacy);
|
|
655
|
-
|
|
656
|
-
export { rewrite2, native2, exports_aisdk_native, ID13, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, DEFAULT_TIMEOUT_MS3, timeout2, timeouts2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info22, Service74, node78, exports_provider3, Event16 };
|
|
656
|
+
export { ID13, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, DEFAULT_TIMEOUT_MS3, timeout2, timeouts2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info22, Service76, node80, exports_provider3, Event17, rewrite2, native2, exports_aisdk_native };
|