@opencode/core 0.0.0-dev-20786 → 0.0.0-dev-20787
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/{aisdk-native-yjp304yq.js → mime-027wet4k.js} +18 -18
- package/dist/chunks/{aisdk-native-12a4gwmx.js → mime-02rhty21.js} +10 -10
- package/dist/chunks/{aisdk-native-1gpb38yh.js → mime-043vq6jw.js} +3 -3
- package/dist/chunks/{aisdk-native-dasyzfwa.js → mime-06svym02.js} +21 -21
- package/dist/chunks/{aisdk-native-hq2zzb6q.js → mime-0caw9ff2.js} +36 -36
- package/dist/chunks/{aisdk-native-z710t3jr.js → mime-0cdge0jb.js} +6 -6
- package/dist/chunks/{aisdk-native-p1qm3m6x.js → mime-0h0j16kf.js} +2 -2
- package/dist/chunks/{aisdk-native-93ygb5af.js → mime-0hf9g8pg.js} +6 -6
- package/dist/chunks/{aisdk-native-0paq2nw3.js → mime-0paq2nw3.js} +1 -1
- package/dist/chunks/{aisdk-native-tvmp3rky.js → mime-0r44031v.js} +4 -4
- package/dist/chunks/{aisdk-native-0vbcp93d.js → mime-0vbcp93d.js} +2 -2
- package/dist/chunks/{aisdk-native-n8ge2gvn.js → mime-119kcbn4.js} +14 -14
- package/dist/chunks/{aisdk-native-gs3s1a1g.js → mime-166kng33.js} +8 -8
- package/dist/chunks/{aisdk-native-1acjjqhc.js → mime-1acjjqhc.js} +1 -1
- package/dist/chunks/{aisdk-native-1dvck2a7.js → mime-1dvck2a7.js} +2 -2
- package/dist/chunks/{aisdk-native-bjx1sjef.js → mime-1ffvrpkg.js} +6 -6
- package/dist/chunks/{aisdk-native-yemq3d8b.js → mime-1fmrbde1.js} +6 -6
- package/dist/chunks/{aisdk-native-g6yfr6ja.js → mime-1pxz8ven.js} +5 -5
- package/dist/chunks/{aisdk-native-mdbjqyaj.js → mime-1rt8m1ja.js} +11 -11
- package/dist/chunks/{aisdk-native-208htf4x.js → mime-22ew7zjk.js} +21 -21
- package/dist/chunks/{aisdk-native-fqhxaznx.js → mime-25bt1wpa.js} +13 -13
- package/dist/chunks/{aisdk-native-gpg00hx0.js → mime-2a4kwaqe.js} +29 -29
- package/dist/chunks/{aisdk-native-g7nn2pxv.js → mime-2a8fhf6b.js} +22 -22
- package/dist/chunks/{aisdk-native-qgn6gcr1.js → mime-2k8khapm.js} +5 -5
- package/dist/chunks/{aisdk-native-w0d4wwxc.js → mime-2tzxhtg5.js} +6 -6
- package/dist/chunks/{aisdk-native-2vvh33eb.js → mime-2vvh33eb.js} +2 -2
- package/dist/chunks/{aisdk-native-9af9fmhm.js → mime-2wjj0fs1.js} +22 -22
- package/dist/chunks/{aisdk-native-cv08xkf1.js → mime-2y6me16a.js} +5 -5
- package/dist/chunks/{aisdk-native-apkkzndf.js → mime-2zgyweca.js} +11 -11
- package/dist/chunks/{aisdk-native-h7s7r6s9.js → mime-31xfzrxg.js} +5 -5
- package/dist/chunks/{aisdk-native-15wbcmej.js → mime-39p60x63.js} +14 -14
- package/dist/chunks/{aisdk-native-mkne3c2g.js → mime-3c019r4e.js} +6 -6
- package/dist/chunks/mime-3cr89ktw.js +26 -0
- package/dist/chunks/{aisdk-native-nr2zryxx.js → mime-3f0qz8hp.js} +46 -46
- package/dist/chunks/{aisdk-native-3fc6dm20.js → mime-3fc6dm20.js} +1 -1
- package/dist/chunks/{aisdk-native-3hepkmqq.js → mime-3hepkmqq.js} +1 -1
- package/dist/chunks/{aisdk-native-3hwn7j4h.js → mime-3hwn7j4h.js} +2 -2
- package/dist/chunks/{aisdk-native-xx4dt3wm.js → mime-3rh0t8ax.js} +49 -49
- package/dist/chunks/{aisdk-native-3smtnn6g.js → mime-3smtnn6g.js} +1 -1
- package/dist/chunks/{aisdk-native-3tvqynh2.js → mime-3tvqynh2.js} +1 -1
- package/dist/chunks/{aisdk-native-5kmm60mq.js → mime-3yaz0sw4.js} +8 -8
- package/dist/chunks/{aisdk-native-3zsf4n22.js → mime-3zsf4n22.js} +1 -1
- package/dist/chunks/{aisdk-native-tm6h5bf4.js → mime-474fe47g.js} +9 -9
- package/dist/chunks/{aisdk-native-drnf6xwf.js → mime-4a2kvcyx.js} +2 -2
- package/dist/chunks/{aisdk-native-n1n192bv.js → mime-4j4tgtq5.js} +4 -4
- package/dist/chunks/{aisdk-native-17sfd86m.js → mime-4qe3v82z.js} +18 -18
- package/dist/chunks/{aisdk-native-0wyqa8md.js → mime-4r678tgn.js} +51 -51
- package/dist/chunks/{aisdk-native-4ts7tf6z.js → mime-4ts7tf6z.js} +2 -2
- package/dist/chunks/{aisdk-native-mc036365.js → mime-51q7kv5k.js} +3 -3
- package/dist/chunks/{aisdk-native-r94pvvab.js → mime-54ma36ye.js} +4 -4
- package/dist/chunks/{aisdk-native-0gxvvpwd.js → mime-555m9css.js} +14 -14
- package/dist/chunks/{aisdk-native-jw6c5fet.js → mime-5d64x3an.js} +9 -9
- package/dist/chunks/{aisdk-native-gswcc2e7.js → mime-5fw1pe9s.js} +5 -5
- package/dist/chunks/{aisdk-native-1qnf3m4f.js → mime-5jnhywy7.js} +11 -11
- package/dist/chunks/{aisdk-native-5m9w47nd.js → mime-5m9w47nd.js} +1 -1
- package/dist/chunks/{aisdk-native-07kbpjrq.js → mime-5p7mbjgr.js} +30 -30
- package/dist/chunks/{aisdk-native-svzptg8w.js → mime-5r9tjx33.js} +11 -11
- package/dist/chunks/{aisdk-native-b04tv09v.js → mime-64p0dc34.js} +7 -7
- package/dist/chunks/mime-69df29ex.js +253 -0
- package/dist/chunks/{aisdk-native-t2fc4mz5.js → mime-6hh8tjw2.js} +4 -4
- package/dist/chunks/{aisdk-native-6etqf7sa.js → mime-6n4qmm4z.js} +15 -15
- package/dist/chunks/{aisdk-native-6xb47vfp.js → mime-6xb47vfp.js} +1 -1
- package/dist/chunks/{aisdk-native-71az546q.js → mime-71az546q.js} +2 -2
- package/dist/chunks/{aisdk-native-82v73sw7.js → mime-72sxpf59.js} +3 -3
- package/dist/chunks/{aisdk-native-kkrkkp85.js → mime-76v4hyh5.js} +24 -24
- package/dist/chunks/{aisdk-native-eetze1fx.js → mime-78ap8ptf.js} +11 -11
- package/dist/chunks/{aisdk-native-7bmhse3q.js → mime-7bmhse3q.js} +1 -1
- package/dist/chunks/{aisdk-native-qjscwv07.js → mime-7gefn60q.js} +11 -11
- package/dist/chunks/{aisdk-native-xj4mgpap.js → mime-7gz4zf6g.js} +8 -8
- package/dist/chunks/{aisdk-native-vcaj4twf.js → mime-7nrehf5e.js} +7 -7
- package/dist/chunks/{aisdk-native-ev6bpwvp.js → mime-7tyef49m.js} +5 -5
- package/dist/chunks/{aisdk-native-cgm4h4aq.js → mime-7yf5bkbq.js} +36 -36
- package/dist/chunks/{aisdk-native-mw7smfw4.js → mime-84q7187x.js} +33 -33
- package/dist/chunks/{aisdk-native-84txncab.js → mime-84txncab.js} +1 -1
- package/dist/chunks/{aisdk-native-r5q6fnhn.js → mime-86bpe89k.js} +15 -15
- package/dist/chunks/{aisdk-native-64z5egxx.js → mime-89axc63h.js} +26 -26
- package/dist/chunks/{aisdk-native-5w80jbce.js → mime-8fe25v87.js} +4 -4
- package/dist/chunks/{aisdk-native-d05zv93t.js → mime-8kp6mxwf.js} +25 -25
- package/dist/chunks/{aisdk-native-8m6m0r52.js → mime-8m6m0r52.js} +1 -1
- package/dist/chunks/{aisdk-native-503e0b7w.js → mime-8npmv51p.js} +43 -43
- package/dist/chunks/{aisdk-native-28s5gd9e.js → mime-8qhkxqz0.js} +19 -19
- package/dist/chunks/{aisdk-native-30wz2v66.js → mime-8spw8k1s.js} +1 -1
- package/dist/chunks/{aisdk-native-4dq1w2h4.js → mime-92gkf13j.js} +4 -4
- package/dist/chunks/{aisdk-native-9e5bzkjp.js → mime-9e5bzkjp.js} +3 -3
- package/dist/chunks/{aisdk-native-hspvnt0q.js → mime-9j7s670v.js} +24 -24
- package/dist/chunks/{aisdk-native-kbnhdetn.js → mime-9khw333n.js} +18 -18
- package/dist/chunks/{aisdk-native-wxn9ff8g.js → mime-9npg7sgn.js} +30 -30
- package/dist/chunks/{aisdk-native-ffrz43s8.js → mime-9p5s5qkh.js} +16 -16
- package/dist/chunks/{aisdk-native-ex9hba4z.js → mime-9vyb4gb4.js} +20 -20
- package/dist/chunks/{aisdk-native-fc17kpsq.js → mime-agkwbcw7.js} +3 -3
- package/dist/chunks/{aisdk-native-78vqgrxr.js → mime-am9t0yx5.js} +3 -3
- package/dist/chunks/{aisdk-native-ayk9hf2m.js → mime-athh32y1.js} +319 -319
- package/dist/chunks/{aisdk-native-bfr976yb.js → mime-azxjp3dp.js} +19 -19
- package/dist/chunks/{aisdk-native-4w7ta32n.js → mime-b296qpte.js} +1 -1
- package/dist/chunks/{aisdk-native-b3f8fkhc.js → mime-b3f8fkhc.js} +2 -2
- package/dist/chunks/{aisdk-native-t3r4kgzb.js → mime-b8g0b6fs.js} +47 -47
- package/dist/chunks/{aisdk-native-yvvvp4gn.js → mime-bc9tah8j.js} +8 -8
- package/dist/chunks/{aisdk-native-va1erbf3.js → mime-bg30q172.js} +15 -15
- package/dist/chunks/{aisdk-native-8dff8bqa.js → mime-bgs9y14h.js} +5 -5
- package/dist/chunks/{aisdk-native-avqnrtf7.js → mime-bkrd29jn.js} +22 -22
- package/dist/chunks/{aisdk-native-msr9p29v.js → mime-bmcasqcw.js} +40 -40
- package/dist/chunks/{aisdk-native-fjp33x3x.js → mime-bmcshxbz.js} +26 -26
- package/dist/chunks/{aisdk-native-w699qp6n.js → mime-bsedjk5j.js} +9 -9
- package/dist/chunks/{aisdk-native-my4zabxr.js → mime-btfhnvjh.js} +3 -3
- package/dist/chunks/{aisdk-native-3sdj3sj0.js → mime-c2hzm904.js} +21 -21
- package/dist/chunks/{aisdk-native-sam13k9q.js → mime-cbep1waf.js} +15 -15
- package/dist/chunks/{aisdk-native-be7zefqj.js → mime-ckvhbccj.js} +5 -5
- package/dist/chunks/{aisdk-native-51hcqn6c.js → mime-cvpz6d4t.js} +17 -17
- package/dist/chunks/{aisdk-native-5vewaszd.js → mime-cw9hs8vb.js} +35 -35
- package/dist/chunks/{aisdk-native-37d0tkcb.js → mime-cwxspmwx.js} +24 -24
- package/dist/chunks/{aisdk-native-mjkk500r.js → mime-cz82p42g.js} +36 -36
- package/dist/chunks/{aisdk-native-wchfmkx9.js → mime-d1hg4edt.js} +7 -7
- package/dist/chunks/{aisdk-native-qv8yaqbc.js → mime-ddx03t81.js} +80 -80
- package/dist/chunks/{aisdk-native-qv8r7dn3.js → mime-djg0yxrp.js} +6 -6
- package/dist/chunks/{aisdk-native-vv44hwmw.js → mime-dktjxkrs.js} +12 -12
- package/dist/chunks/{aisdk-native-pe642bbt.js → mime-dn9rb59v.js} +19 -19
- package/dist/chunks/{aisdk-native-ep658q2n.js → mime-dq5t6pd6.js} +3 -3
- package/dist/chunks/{aisdk-native-qqeeq2t9.js → mime-drwq78ky.js} +7 -7
- package/dist/chunks/{aisdk-native-s5wyam9r.js → mime-dvnbbf9e.js} +13 -13
- package/dist/chunks/{aisdk-native-1by08te6.js → mime-e8vkwm2v.js} +5 -5
- package/dist/chunks/{aisdk-native-t550f9t1.js → mime-eaj1djv9.js} +8 -8
- package/dist/chunks/{aisdk-native-eej6y6fw.js → mime-eej6y6fw.js} +2 -2
- package/dist/chunks/{aisdk-native-ef5x83kb.js → mime-ef5x83kb.js} +1 -1
- package/dist/chunks/{aisdk-native-7mt71gmx.js → mime-ejthmgn4.js} +36 -36
- package/dist/chunks/{aisdk-native-h9vx5wsk.js → mime-eq7febrf.js} +22 -22
- package/dist/chunks/{aisdk-native-pewx5hyn.js → mime-exydzexz.js} +49 -49
- package/dist/chunks/{aisdk-native-6hjx5zpb.js → mime-fdms3n6w.js} +9 -9
- package/dist/chunks/{aisdk-native-pmpekd2n.js → mime-fh2psg6v.js} +11 -11
- package/dist/chunks/{aisdk-native-499p6055.js → mime-fkej15m0.js} +11 -11
- package/dist/chunks/{aisdk-native-gabj3pgr.js → mime-fmgyvksq.js} +17 -17
- package/dist/chunks/{aisdk-native-ydnne5qh.js → mime-fyg8yg6h.js} +26 -26
- package/dist/chunks/{aisdk-native-9hn6k4tm.js → mime-g0445xdp.js} +8 -8
- package/dist/chunks/{aisdk-native-qtsye2my.js → mime-g1dne7vm.js} +20 -20
- package/dist/chunks/{aisdk-native-aeqfavaw.js → mime-g1z3w466.js} +11 -11
- package/dist/chunks/{aisdk-native-22ra1exs.js → mime-g2pj49kc.js} +15 -15
- package/dist/chunks/{aisdk-native-bxqk5pf5.js → mime-g686f6pq.js} +9 -9
- package/dist/chunks/{aisdk-native-gd4qta3r.js → mime-gd4qta3r.js} +1 -1
- package/dist/chunks/{aisdk-native-dehf6d0k.js → mime-gh3y8pm2.js} +13 -13
- package/dist/chunks/{aisdk-native-nhe0p8k5.js → mime-gj914s14.js} +13 -13
- package/dist/chunks/{aisdk-native-gk8qb678.js → mime-gk8qb678.js} +1 -1
- package/dist/chunks/{aisdk-native-g8ytx0e6.js → mime-gqxd2p8g.js} +6 -6
- package/dist/chunks/{aisdk-native-t9j2ta17.js → mime-gs1jyngd.js} +11 -11
- package/dist/chunks/{aisdk-native-0v0s295c.js → mime-gtzzrxfe.js} +28 -28
- package/dist/chunks/{aisdk-native-5460aaf2.js → mime-gxgkqch3.js} +3 -3
- package/dist/chunks/{aisdk-native-h2b79v29.js → mime-h2b79v29.js} +2 -2
- package/dist/chunks/{aisdk-native-xxw4aevj.js → mime-h3f2yjd6.js} +19 -19
- package/dist/chunks/{aisdk-native-h5qrb2fe.js → mime-h5qrb2fe.js} +2 -2
- package/dist/chunks/{aisdk-native-dq5ye1kk.js → mime-h5yjbcg8.js} +21 -21
- package/dist/chunks/{aisdk-native-h6vf3j39.js → mime-h6vf3j39.js} +1 -1
- package/dist/chunks/{aisdk-native-9kr58kvj.js → mime-h77dp10q.js} +16 -16
- package/dist/chunks/{aisdk-native-2kf882ja.js → mime-hbgztc69.js} +12 -12
- package/dist/chunks/{aisdk-native-1bmjn0qh.js → mime-hcv80w8f.js} +8 -8
- package/dist/chunks/{aisdk-native-tx74ce77.js → mime-hex8zqpz.js} +15 -15
- package/dist/chunks/{aisdk-native-mqkg4rby.js → mime-hgf4dt9s.js} +20 -20
- package/dist/chunks/{aisdk-native-f315jnsz.js → mime-hgfer15g.js} +9 -9
- package/dist/chunks/{aisdk-native-hgz4x7wa.js → mime-hgz4x7wa.js} +1 -1
- package/dist/chunks/{aisdk-native-chewf014.js → mime-hj508e7e.js} +11 -11
- package/dist/chunks/{aisdk-native-sfzddxxv.js → mime-hr6fafxf.js} +5 -5
- package/dist/chunks/{aisdk-native-acfah2j5.js → mime-hrt380bf.js} +25 -25
- package/dist/chunks/{aisdk-native-26jar2tj.js → mime-hrvxfe8q.js} +29 -29
- package/dist/chunks/mime-ht5y0zrb.js +18 -0
- package/dist/chunks/{aisdk-native-2qbapfxp.js → mime-j4my293e.js} +3 -3
- package/dist/chunks/{aisdk-native-j56e64zr.js → mime-j56e64zr.js} +1 -1
- package/dist/chunks/{aisdk-native-jxwj20k3.js → mime-jfahkm5h.js} +11 -11
- package/dist/chunks/{aisdk-native-nga4q8xv.js → mime-jky4ye9c.js} +32 -32
- package/dist/chunks/{aisdk-native-yc829qrg.js → mime-jpxm8prz.js} +9 -9
- package/dist/chunks/{aisdk-native-axhcxy2h.js → mime-jq7vh08d.js} +39 -39
- package/dist/chunks/{aisdk-native-s3k4yf5k.js → mime-jwz9xay8.js} +10 -10
- package/dist/chunks/{aisdk-native-afdssyjb.js → mime-k76fn4kw.js} +4 -4
- package/dist/chunks/{aisdk-native-za30zmz1.js → mime-k8k1q94h.js} +5 -5
- package/dist/chunks/{aisdk-native-efh984b4.js → mime-k9byb1f6.js} +324 -324
- package/dist/chunks/{aisdk-native-ye0e6s7b.js → mime-khxfz34n.js} +7 -7
- package/dist/chunks/{aisdk-native-mtf65vq0.js → mime-km9wxv53.js} +12 -12
- package/dist/chunks/{aisdk-native-vbfgae2j.js → mime-m0r31qfn.js} +4 -4
- package/dist/chunks/{aisdk-native-87662kyj.js → mime-m1p4hsbp.js} +4 -4
- package/dist/chunks/{aisdk-native-m3fdjcah.js → mime-m3fdjcah.js} +1 -1
- package/dist/chunks/{aisdk-native-m9w0rfyh.js → mime-m9w0rfyh.js} +1 -1
- package/dist/chunks/{aisdk-native-1s2d77qx.js → mime-ma1dyg6s.js} +20 -20
- package/dist/chunks/{aisdk-native-28y8fj81.js → mime-mj1ev22k.js} +13 -13
- package/dist/chunks/{aisdk-native-gghkt8yn.js → mime-mw0d6578.js} +23 -23
- package/dist/chunks/{aisdk-native-m3x2bdhe.js → mime-n8jrms90.js} +23 -23
- package/dist/chunks/{aisdk-native-4jbqxnys.js → mime-nbjv7f5k.js} +32 -32
- package/dist/chunks/{aisdk-native-jqex0031.js → mime-nshegbx5.js} +10 -10
- package/dist/chunks/{aisdk-native-4k5y6bq6.js → mime-ntmqqprx.js} +14 -14
- package/dist/chunks/{aisdk-native-cwbbynvz.js → mime-nvk5447c.js} +8 -8
- package/dist/chunks/{aisdk-native-3fc3bfk1.js → mime-nxf150ty.js} +15 -15
- package/dist/chunks/{aisdk-native-wppv7xh7.js → mime-nypq18gz.js} +3 -3
- package/dist/chunks/{aisdk-native-stth1wwk.js → mime-p2108z5q.js} +9 -9
- package/dist/chunks/{aisdk-native-15ypp5pm.js → mime-p6r9gt0e.js} +15 -15
- package/dist/chunks/{aisdk-native-1v16s55d.js → mime-paqvwarx.js} +28 -28
- package/dist/chunks/{aisdk-native-2m8jawch.js → mime-pgsrtt9v.js} +4 -4
- package/dist/chunks/{aisdk-native-pjvnvgmy.js → mime-pjvnvgmy.js} +1 -1
- package/dist/chunks/{aisdk-native-pknna89w.js → mime-pknna89w.js} +1 -1
- package/dist/chunks/{aisdk-native-an357sdh.js → mime-pm3fjw9d.js} +11 -11
- package/dist/chunks/{aisdk-native-sfcx648x.js → mime-pm8zwzej.js} +4 -4
- package/dist/chunks/{aisdk-native-m0fgvk42.js → mime-pp6w2n40.js} +64 -64
- package/dist/chunks/{aisdk-native-ac67tbtp.js → mime-pt2ghbdz.js} +6 -6
- package/dist/chunks/{aisdk-native-jhfcm0cr.js → mime-ptyhp8x2.js} +5 -5
- package/dist/chunks/{aisdk-native-460xqafy.js → mime-pw45mt5g.js} +29 -29
- package/dist/chunks/{aisdk-native-6ejhcdbg.js → mime-pwg95dhw.js} +27 -27
- package/dist/chunks/{aisdk-native-q0xm7vwc.js → mime-q0xm7vwc.js} +2 -2
- package/dist/chunks/{aisdk-native-p4vh95yg.js → mime-qdj621en.js} +10 -10
- package/dist/chunks/{aisdk-native-we7xe3ez.js → mime-qmkkptsn.js} +5 -5
- package/dist/chunks/{aisdk-native-ft3hqk2c.js → mime-qmqgtz8f.js} +9 -9
- package/dist/chunks/{aisdk-native-qnc92qwc.js → mime-qnc92qwc.js} +1 -1
- package/dist/chunks/{aisdk-native-qsdy395h.js → mime-qsdy395h.js} +1 -1
- package/dist/chunks/{aisdk-native-py5vy7dm.js → mime-qz30qjnb.js} +34 -34
- package/dist/chunks/{aisdk-native-nma959mg.js → mime-r2z489rp.js} +3 -3
- package/dist/chunks/{aisdk-native-6z0wxtmq.js → mime-r67c82cp.js} +13 -13
- package/dist/chunks/{aisdk-native-zd75cx22.js → mime-r8cdb8d1.js} +19 -19
- package/dist/chunks/{aisdk-native-y9s9xvs6.js → mime-rbpvdgf0.js} +8 -8
- package/dist/chunks/{aisdk-native-rdw6cm16.js → mime-rdw6cm16.js} +1 -1
- package/dist/chunks/{aisdk-native-nne3m2zy.js → mime-rj535w0r.js} +19 -19
- package/dist/chunks/{aisdk-native-7fkffz83.js → mime-rkprpv83.js} +4 -4
- package/dist/chunks/{aisdk-native-rnhh7h7z.js → mime-rm79vesf.js} +82 -82
- package/dist/chunks/{aisdk-native-8xkxcnns.js → mime-rnfpy8wk.js} +29 -29
- package/dist/chunks/{aisdk-native-xc6s865b.js → mime-rskec7mq.js} +23 -23
- package/dist/chunks/{aisdk-native-272fdhgb.js → mime-rvtvv650.js} +183 -183
- package/dist/chunks/{aisdk-native-da80x6cr.js → mime-rxsvjrcp.js} +12 -12
- package/dist/chunks/{aisdk-native-rmbbtebd.js → mime-s9rk4g4r.js} +46 -46
- package/dist/chunks/{aisdk-native-kecwt4tn.js → mime-sdp1rx2v.js} +31 -31
- package/dist/chunks/{aisdk-native-z1kk38nk.js → mime-seewk876.js} +22 -22
- package/dist/chunks/{aisdk-native-smd8q5by.js → mime-sfjpyg4a.js} +10 -10
- package/dist/chunks/{aisdk-native-2brm4zbg.js → mime-sh2d2d9q.js} +18 -18
- package/dist/chunks/{aisdk-native-4rqp1pwj.js → mime-t0157md9.js} +37 -37
- package/dist/chunks/{aisdk-native-eaq45qha.js → mime-t2rmr46s.js} +34 -34
- package/dist/chunks/{aisdk-native-ygrztswd.js → mime-t7a6mr3j.js} +12 -12
- package/dist/chunks/{aisdk-native-tazgh4e4.js → mime-tazgh4e4.js} +1 -1
- package/dist/chunks/{aisdk-native-tcezcvh9.js → mime-tcezcvh9.js} +1 -1
- package/dist/chunks/{aisdk-native-76rvckpe.js → mime-tdqj5rj9.js} +5 -5
- package/dist/chunks/{aisdk-native-tdstcens.js → mime-tdstcens.js} +1 -1
- package/dist/chunks/{aisdk-native-v2b2yc5y.js → mime-tparn3vn.js} +20 -20
- package/dist/chunks/{aisdk-native-3y8tkwef.js → mime-tvqmtm4q.js} +4 -4
- package/dist/chunks/{aisdk-native-c1jrcsrx.js → mime-tw0x9r6k.js} +22 -22
- package/dist/chunks/{aisdk-native-mv3hx7wz.js → mime-txm3e8qz.js} +4 -4
- package/dist/chunks/{aisdk-native-tyytaxap.js → mime-tyytaxap.js} +1 -1
- package/dist/chunks/{aisdk-native-y4xh0pmk.js → mime-v0es1rhs.js} +7 -7
- package/dist/chunks/{aisdk-native-rjknpt6z.js → mime-v63n2ckv.js} +11 -11
- package/dist/chunks/{aisdk-native-v7p4zvkq.js → mime-v7p4zvkq.js} +2 -2
- package/dist/chunks/{aisdk-native-6q3g8xg3.js → mime-ve85v3xb.js} +4 -4
- package/dist/chunks/{aisdk-native-veqvce7d.js → mime-veqvce7d.js} +1 -1
- package/dist/chunks/{aisdk-native-rza4mxkq.js → mime-vqjg70nz.js} +16 -16
- package/dist/chunks/{aisdk-native-6peqgq5h.js → mime-vvh8wk4a.js} +32 -32
- package/dist/chunks/{aisdk-native-sydd57cv.js → mime-vyw2z53s.js} +32 -32
- package/dist/chunks/{aisdk-native-fb1vsn26.js → mime-vz5w0m48.js} +4 -4
- package/dist/chunks/{aisdk-native-vzs5sf6e.js → mime-vzs5sf6e.js} +1 -1
- package/dist/chunks/{aisdk-native-w3wsvvr9.js → mime-w3wsvvr9.js} +1 -1
- package/dist/chunks/{aisdk-native-wd87259q.js → mime-wd87259q.js} +1 -1
- package/dist/chunks/{aisdk-native-cs198y7t.js → mime-wmtpy0s3.js} +20 -20
- package/dist/chunks/{aisdk-native-n2gtn2c6.js → mime-wppa2pay.js} +45 -45
- package/dist/chunks/{aisdk-native-sm55s1mk.js → mime-wrcfn0vf.js} +52 -52
- package/dist/chunks/{aisdk-native-f5yvwykz.js → mime-x44zd53x.js} +20 -20
- package/dist/chunks/{aisdk-native-4747q1q8.js → mime-x4zw4aa2.js} +32 -32
- package/dist/chunks/{aisdk-native-md6myaa9.js → mime-xfsxdr6e.js} +20 -20
- package/dist/chunks/{aisdk-native-3g8j9he4.js → mime-xt4njr3s.js} +1 -1
- package/dist/chunks/{aisdk-native-tkt1nrm6.js → mime-xzg29whq.js} +10 -10
- package/dist/chunks/{aisdk-native-4cgsncsb.js → mime-xzyak3pr.js} +4 -4
- package/dist/chunks/{aisdk-native-y1fvbwt7.js → mime-y1fvbwt7.js} +1 -1
- package/dist/chunks/{aisdk-native-nb18fvzg.js → mime-y60y4p2q.js} +17 -17
- package/dist/chunks/{aisdk-native-a8zx47k6.js → mime-y6ecqznf.js} +8 -8
- package/dist/chunks/{aisdk-native-y71avatq.js → mime-y71avatq.js} +1 -1
- package/dist/chunks/{aisdk-native-xk74gs42.js → mime-yerhakjb.js} +13 -13
- package/dist/chunks/{aisdk-native-6kzp9tjq.js → mime-ygdna4kr.js} +5 -5
- package/dist/chunks/{aisdk-native-bm4kvh4t.js → mime-yh544exa.js} +18 -18
- package/dist/chunks/{aisdk-native-2jw6zd4g.js → mime-ym3gh3rk.js} +25 -25
- package/dist/chunks/{aisdk-native-z0bkrqjs.js → mime-z0bkrqjs.js} +1 -1
- package/dist/chunks/{aisdk-native-v8vpn1gg.js → mime-z4x1pac8.js} +8 -8
- package/dist/chunks/{aisdk-native-fk4ssw1m.js → mime-z7r5j9y4.js} +14 -14
- package/dist/chunks/{aisdk-native-mvf7faxs.js → mime-z8g8xkam.js} +17 -17
- package/dist/chunks/{aisdk-native-k7myrtme.js → mime-zab19jja.js} +9 -9
- package/dist/chunks/{aisdk-native-39z47dss.js → mime-znvvnn0n.js} +17 -17
- package/dist/chunks/{aisdk-native-e6rn5k1j.js → mime-zp1tmv74.js} +9 -9
- package/dist/chunks/{aisdk-native-zr2ceqn5.js → mime-zr2ceqn5.js} +1 -1
- package/dist/chunks/{aisdk-native-65zzszyf.js → mime-zt8we9d1.js} +1 -1
- package/dist/chunks/{aisdk-native-67xxwmnt.js → mime-zvgv897q.js} +27 -27
- package/dist/chunks/{aisdk-native-addxnjmp.js → mime-zw2hpfmh.js} +4 -4
- package/dist/chunks/{aisdk-native-zxq2ej10.js → mime-zxq2ej10.js} +1 -1
- package/dist/codemode/catalog.js +1 -1
- package/dist/codemode/instructions.js +9 -9
- package/dist/codemode/tool.js +3 -3
- package/dist/codemode/web.js +1 -1
- package/dist/command.js +84 -84
- 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 +117 -117
- package/dist/config/plugin/command.js +206 -206
- 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 +124 -124
- 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 +118 -118
- package/dist/credential/sql.js +2 -2
- package/dist/credential.js +86 -86
- package/dist/database/database.js +67 -67
- package/dist/database/drizzle/effect-sqlite/driver.js +12 -12
- package/dist/database/drizzle/effect-sqlite/index.js +12 -12
- package/dist/database/drizzle/effect-sqlite/session.js +11 -11
- package/dist/database/drizzle/index.js +13 -13
- 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 +14 -14
- 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 +366 -366
- package/dist/effect/app-node-platform.js +2 -2
- package/dist/effect/keyed-mutex.js +1 -1
- 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 +94 -94
- package/dist/filesystem/watcher-binding.js +1 -1
- package/dist/filesystem/watcher.js +13 -13
- package/dist/filesystem.js +95 -95
- package/dist/form.js +81 -81
- package/dist/formatter/builtins.js +4 -4
- package/dist/formatter.js +88 -88
- package/dist/generate.js +104 -104
- package/dist/git.js +10 -10
- 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 +92 -92
- 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 +6 -6
- package/dist/instance/service.js +5 -5
- package/dist/instance.js +357 -357
- package/dist/instruction-discovery.js +86 -86
- package/dist/instructions/builtins.js +88 -88
- package/dist/instructions/index.js +5 -5
- package/dist/integration/connection.js +3 -3
- package/dist/integration.js +88 -88
- 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 +354 -354
- 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 +110 -110
- 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 +92 -92
- package/dist/model-resolver.js +97 -97
- package/dist/model.js +101 -101
- package/dist/models-dev.js +108 -108
- package/dist/oauth/page.js +1 -1
- package/dist/permission/saved.js +81 -81
- package/dist/permission/sql.js +5 -5
- package/dist/permission.js +112 -112
- 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 +75 -75
- package/dist/plugin/command.js +101 -101
- 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 +329 -329
- package/dist/plugin/mcp-codemode-defaults.js +3 -3
- package/dist/plugin/models-dev.js +97 -97
- package/dist/plugin/module.js +116 -116
- package/dist/plugin/optimize.js +2 -2
- 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/databricks.js +1 -1
- 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 +114 -114
- package/dist/plugin/provider/kilo.js +1 -1
- package/dist/plugin/provider/llmgateway.js +79 -79
- package/dist/plugin/provider/lmstudio.js +115 -115
- package/dist/plugin/provider/local.js +114 -114
- package/dist/plugin/provider/modal.js +93 -93
- package/dist/plugin/provider/neon.js +1 -1
- package/dist/plugin/provider/nvidia.js +1 -1
- package/dist/plugin/provider/ollama.js +117 -117
- package/dist/plugin/provider/openai.js +94 -94
- 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 +159 -159
- package/dist/plugin/sdk.js +75 -75
- 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 +7 -7
- package/dist/plugin/websearch/firecrawl.js +8 -8
- package/dist/plugin/websearch/index.js +9 -9
- package/dist/plugin/websearch/mcp.js +4 -4
- package/dist/plugin/websearch/parallel.js +8 -8
- package/dist/plugin/websearch/tavily.js +6 -6
- package/dist/plugin/websearch/tinyfish.js +6 -6
- package/dist/plugin.js +223 -223
- package/dist/project/schema.js +6 -6
- package/dist/project/sql.js +4 -4
- package/dist/project.js +87 -87
- package/dist/provider.js +102 -102
- 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 +92 -92
- package/dist/repository-cache.js +82 -82
- package/dist/repository.js +1 -1
- package/dist/ripgrep/binary.js +2 -2
- package/dist/ripgrep.js +96 -96
- package/dist/rpc.js +87 -87
- package/dist/schema.js +1 -1
- package/dist/session/affinity.js +3 -3
- 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 +3 -3
- package/dist/session/event.js +1 -1
- package/dist/session/execution/restart.js +215 -215
- package/dist/session/execution.js +124 -124
- package/dist/session/generate.js +153 -153
- package/dist/session/history.js +13 -13
- package/dist/session/inbox.js +87 -87
- package/dist/session/info.js +3 -3
- package/dist/session/instruction-entry.js +80 -80
- package/dist/session/instruction-state.js +8 -8
- package/dist/session/instructions.js +98 -98
- package/dist/session/message-updater.js +4 -4
- package/dist/session/message.js +1 -1
- package/dist/session/model-request.js +115 -115
- package/dist/session/model-transport.js +3 -3
- package/dist/session/move.js +130 -130
- package/dist/session/projector.js +87 -87
- 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 +1 -1
- 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 +5 -5
- package/dist/session/session.js +163 -163
- package/dist/session/shell.js +131 -131
- package/dist/session/skill.js +106 -106
- package/dist/session/sql.js +5 -5
- package/dist/session/stats.js +74 -74
- package/dist/session/store.js +86 -86
- package/dist/session/subagent-completion.js +1 -1
- package/dist/session/subagent-job.js +206 -206
- package/dist/session/system-prompt.js +5 -5
- package/dist/session/title.js +158 -158
- package/dist/session/to-session-error.js +112 -112
- package/dist/session/transfer.js +211 -211
- 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 +108 -108
- package/dist/skill.js +113 -113
- package/dist/snapshot.js +90 -90
- 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 +110 -110
- package/dist/tool/plugin/patch.js +123 -123
- package/dist/tool/plugin/question.js +104 -104
- package/dist/tool/plugin/read.js +126 -126
- package/dist/tool/plugin/shell.js +211 -211
- package/dist/tool/plugin/skill.js +114 -114
- package/dist/tool/plugin/subagent.js +213 -213
- package/dist/tool/plugin/webfetch.js +113 -113
- package/dist/tool/plugin/websearch.js +115 -115
- 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 +5 -5
- 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 +94 -94
- package/dist/vcs/patch.js +1 -1
- package/dist/vcs.js +90 -90
- package/dist/websearch.js +83 -83
- package/dist/wellknown/plugin.js +77 -77
- package/dist/wellknown.js +82 -82
- package/dist/workspace/driver.js +5 -5
- package/dist/workspace/sql.js +1 -1
- package/dist/workspace.js +83 -83
- package/dist/worktree/directory.js +2 -2
- package/dist/worktree/git.js +8 -8
- 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/aisdk-native-by5v678g.js +0 -18
- package/dist/chunks/aisdk-native-dkan0d0q.js +0 -253
- package/dist/chunks/aisdk-native-h91mk9a5.js +0 -26
- /package/dist/chunks/{aisdk-native-0qkdqm5v.js → mime-0qkdqm5v.js} +0 -0
- /package/dist/chunks/{aisdk-native-0zkw76rk.js → mime-0zkw76rk.js} +0 -0
- /package/dist/chunks/{aisdk-native-17cy0kzp.js → mime-17cy0kzp.js} +0 -0
- /package/dist/chunks/{aisdk-native-1cnp2v09.js → mime-1cnp2v09.js} +0 -0
- /package/dist/chunks/{aisdk-native-1kg9ymc8.js → mime-1kg9ymc8.js} +0 -0
- /package/dist/chunks/{aisdk-native-24dcb14g.js → mime-24dcb14g.js} +0 -0
- /package/dist/chunks/{aisdk-native-2710q6r3.js → mime-2710q6r3.js} +0 -0
- /package/dist/chunks/{aisdk-native-2axfhc9x.js → mime-2axfhc9x.js} +0 -0
- /package/dist/chunks/{aisdk-native-2c3vjs8z.js → mime-2c3vjs8z.js} +0 -0
- /package/dist/chunks/{aisdk-native-34c7v6d4.js → mime-34c7v6d4.js} +0 -0
- /package/dist/chunks/{aisdk-native-359p4xyc.js → mime-359p4xyc.js} +0 -0
- /package/dist/chunks/{aisdk-native-3asan66x.js → mime-3asan66x.js} +0 -0
- /package/dist/chunks/{aisdk-native-3t0ybcrp.js → mime-3t0ybcrp.js} +0 -0
- /package/dist/chunks/{aisdk-native-3v8g72cx.js → mime-3v8g72cx.js} +0 -0
- /package/dist/chunks/{aisdk-native-3wcehsnq.js → mime-3wcehsnq.js} +0 -0
- /package/dist/chunks/{aisdk-native-43n2bw4t.js → mime-43n2bw4t.js} +0 -0
- /package/dist/chunks/{aisdk-native-4knz6hnm.js → mime-4knz6hnm.js} +0 -0
- /package/dist/chunks/{aisdk-native-4vcrnpx2.js → mime-4vcrnpx2.js} +0 -0
- /package/dist/chunks/{aisdk-native-4y7fprxs.js → mime-4y7fprxs.js} +0 -0
- /package/dist/chunks/{aisdk-native-53557ph1.js → mime-53557ph1.js} +0 -0
- /package/dist/chunks/{aisdk-native-550bvhaj.js → mime-550bvhaj.js} +0 -0
- /package/dist/chunks/{aisdk-native-5qd3pb7m.js → mime-5qd3pb7m.js} +0 -0
- /package/dist/chunks/{aisdk-native-6prwharc.js → mime-6prwharc.js} +0 -0
- /package/dist/chunks/{aisdk-native-6q2bdcd1.js → mime-6q2bdcd1.js} +0 -0
- /package/dist/chunks/{aisdk-native-7akdwqpd.js → mime-7akdwqpd.js} +0 -0
- /package/dist/chunks/{aisdk-native-7m9af43g.js → mime-7m9af43g.js} +0 -0
- /package/dist/chunks/{aisdk-native-822emrt2.js → mime-822emrt2.js} +0 -0
- /package/dist/chunks/{aisdk-native-84wd9syh.js → mime-84wd9syh.js} +0 -0
- /package/dist/chunks/{aisdk-native-88xbtdfr.js → mime-88xbtdfr.js} +0 -0
- /package/dist/chunks/{aisdk-native-8n3pysct.js → mime-8n3pysct.js} +0 -0
- /package/dist/chunks/{aisdk-native-8wj87zfr.js → mime-8wj87zfr.js} +0 -0
- /package/dist/chunks/{aisdk-native-9a4afbnw.js → mime-9a4afbnw.js} +0 -0
- /package/dist/chunks/{aisdk-native-9rqn6x4v.js → mime-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{aisdk-native-a6k6eb26.js → mime-a6k6eb26.js} +0 -0
- /package/dist/chunks/{aisdk-native-af5trqkr.js → mime-af5trqkr.js} +0 -0
- /package/dist/chunks/{aisdk-native-afrmfg78.js → mime-afrmfg78.js} +0 -0
- /package/dist/chunks/{aisdk-native-aqzs7mqg.js → mime-aqzs7mqg.js} +0 -0
- /package/dist/chunks/{aisdk-native-atq7p7m5.js → mime-atq7p7m5.js} +0 -0
- /package/dist/chunks/{aisdk-native-bkyjaxrp.js → mime-bkyjaxrp.js} +0 -0
- /package/dist/chunks/{aisdk-native-bmr6ed5q.js → mime-bmr6ed5q.js} +0 -0
- /package/dist/chunks/{aisdk-native-bw78ga2c.js → mime-bw78ga2c.js} +0 -0
- /package/dist/chunks/{aisdk-native-cf4snx6d.js → mime-cf4snx6d.js} +0 -0
- /package/dist/chunks/{aisdk-native-cvy3z8tj.js → mime-cvy3z8tj.js} +0 -0
- /package/dist/chunks/{aisdk-native-d9fn303g.js → mime-d9fn303g.js} +0 -0
- /package/dist/chunks/{aisdk-native-d9jj8t3e.js → mime-d9jj8t3e.js} +0 -0
- /package/dist/chunks/{aisdk-native-dajrwvna.js → mime-dajrwvna.js} +0 -0
- /package/dist/chunks/{aisdk-native-dap0rakb.js → mime-dap0rakb.js} +0 -0
- /package/dist/chunks/{aisdk-native-df08tz66.js → mime-df08tz66.js} +0 -0
- /package/dist/chunks/{aisdk-native-dy18nga0.js → mime-dy18nga0.js} +0 -0
- /package/dist/chunks/{aisdk-native-e5kj55wp.js → mime-e5kj55wp.js} +0 -0
- /package/dist/chunks/{aisdk-native-e73j6tqm.js → mime-e73j6tqm.js} +0 -0
- /package/dist/chunks/{aisdk-native-ec1grn59.js → mime-ec1grn59.js} +0 -0
- /package/dist/chunks/{aisdk-native-eh3zwz77.js → mime-eh3zwz77.js} +0 -0
- /package/dist/chunks/{aisdk-native-emrn6kk6.js → mime-emrn6kk6.js} +0 -0
- /package/dist/chunks/{aisdk-native-f0mxakyp.js → mime-f0mxakyp.js} +0 -0
- /package/dist/chunks/{aisdk-native-f6n9ztr4.js → mime-f6n9ztr4.js} +0 -0
- /package/dist/chunks/{aisdk-native-faypxj3z.js → mime-faypxj3z.js} +0 -0
- /package/dist/chunks/{aisdk-native-fd410y7t.js → mime-fd410y7t.js} +0 -0
- /package/dist/chunks/{aisdk-native-fxgpk5d8.js → mime-fxgpk5d8.js} +0 -0
- /package/dist/chunks/{aisdk-native-g4wezp1m.js → mime-g4wezp1m.js} +0 -0
- /package/dist/chunks/{aisdk-native-g86h250q.js → mime-g86h250q.js} +0 -0
- /package/dist/chunks/{aisdk-native-gebd4c9n.js → mime-gebd4c9n.js} +0 -0
- /package/dist/chunks/{aisdk-native-gftt206x.js → mime-gftt206x.js} +0 -0
- /package/dist/chunks/{aisdk-native-hk9envan.js → mime-hk9envan.js} +0 -0
- /package/dist/chunks/{aisdk-native-j2ntwpah.js → mime-j2ntwpah.js} +0 -0
- /package/dist/chunks/{aisdk-native-j5zkgpj8.js → mime-j5zkgpj8.js} +0 -0
- /package/dist/chunks/{aisdk-native-jjkms2e6.js → mime-jjkms2e6.js} +0 -0
- /package/dist/chunks/{aisdk-native-jr7sbwjy.js → mime-jr7sbwjy.js} +0 -0
- /package/dist/chunks/{aisdk-native-jwfs4k6c.js → mime-jwfs4k6c.js} +0 -0
- /package/dist/chunks/{aisdk-native-jze0r7bz.js → mime-jze0r7bz.js} +0 -0
- /package/dist/chunks/{aisdk-native-jzg6c2d5.js → mime-jzg6c2d5.js} +0 -0
- /package/dist/chunks/{aisdk-native-mp448xyj.js → mime-mp448xyj.js} +0 -0
- /package/dist/chunks/{aisdk-native-msx8hqn2.js → mime-msx8hqn2.js} +0 -0
- /package/dist/chunks/{aisdk-native-n05xt0ee.js → mime-n05xt0ee.js} +0 -0
- /package/dist/chunks/{aisdk-native-n3j8tn72.js → mime-n3j8tn72.js} +0 -0
- /package/dist/chunks/{aisdk-native-njntx4h6.js → mime-njntx4h6.js} +0 -0
- /package/dist/chunks/{aisdk-native-pyv0edze.js → mime-pyv0edze.js} +0 -0
- /package/dist/chunks/{aisdk-native-q3sfg36h.js → mime-q3sfg36h.js} +0 -0
- /package/dist/chunks/{aisdk-native-q74kybfr.js → mime-q74kybfr.js} +0 -0
- /package/dist/chunks/{aisdk-native-qaymkmh1.js → mime-qaymkmh1.js} +0 -0
- /package/dist/chunks/{aisdk-native-qb87gjwd.js → mime-qb87gjwd.js} +0 -0
- /package/dist/chunks/{aisdk-native-qfa1cgps.js → mime-qfa1cgps.js} +0 -0
- /package/dist/chunks/{aisdk-native-qg3g05ea.js → mime-qg3g05ea.js} +0 -0
- /package/dist/chunks/{aisdk-native-qrg20bc0.js → mime-qrg20bc0.js} +0 -0
- /package/dist/chunks/{aisdk-native-rcb2kzg1.js → mime-rcb2kzg1.js} +0 -0
- /package/dist/chunks/{aisdk-native-sdp7kfr6.js → mime-sdp7kfr6.js} +0 -0
- /package/dist/chunks/{aisdk-native-ssg3fenm.js → mime-ssg3fenm.js} +0 -0
- /package/dist/chunks/{aisdk-native-ve7vex1e.js → mime-ve7vex1e.js} +0 -0
- /package/dist/chunks/{aisdk-native-w803qqfp.js → mime-w803qqfp.js} +0 -0
- /package/dist/chunks/{aisdk-native-wc3fc9cn.js → mime-wc3fc9cn.js} +0 -0
- /package/dist/chunks/{aisdk-native-wer8tq1h.js → mime-wer8tq1h.js} +0 -0
- /package/dist/chunks/{aisdk-native-wtztk69x.js → mime-wtztk69x.js} +0 -0
- /package/dist/chunks/{aisdk-native-x0ckcb58.js → mime-x0ckcb58.js} +0 -0
- /package/dist/chunks/{aisdk-native-x61499pn.js → mime-x61499pn.js} +0 -0
- /package/dist/chunks/{aisdk-native-y44na4kk.js → mime-y44na4kk.js} +0 -0
- /package/dist/chunks/{aisdk-native-y8f7s663.js → mime-y8f7s663.js} +0 -0
- /package/dist/chunks/{aisdk-native-ygaqb7jw.js → mime-ygaqb7jw.js} +0 -0
- /package/dist/chunks/{aisdk-native-ym463w8f.js → mime-ym463w8f.js} +0 -0
- /package/dist/chunks/{aisdk-native-z5v4ffb3.js → mime-z5v4ffb3.js} +0 -0
- /package/dist/chunks/{aisdk-native-z9919s4g.js → mime-z9919s4g.js} +0 -0
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Service84,
|
|
3
3
|
node88
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./mime-pm8zwzej.js";
|
|
5
5
|
import {
|
|
6
6
|
shutdown2,
|
|
7
7
|
create3
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./mime-rdw6cm16.js";
|
|
9
9
|
import {
|
|
10
10
|
key2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./mime-zw2hpfmh.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} from "./
|
|
13
|
+
ID9,
|
|
14
|
+
Service60,
|
|
15
|
+
node63,
|
|
16
|
+
Event15
|
|
17
|
+
} from "./mime-5p7mbjgr.js";
|
|
18
18
|
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from "./
|
|
19
|
+
Service81,
|
|
20
|
+
node85
|
|
21
|
+
} from "./mime-z7r5j9y4.js";
|
|
22
22
|
import {
|
|
23
23
|
__export
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./mime-9rqn6x4v.js";
|
|
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";
|
|
25
34
|
|
|
26
35
|
// src/provider.ts
|
|
27
36
|
var exports_provider3 = {};
|
|
@@ -29,13 +38,13 @@ __export(exports_provider3, {
|
|
|
29
38
|
AISDK_PREFIX: () => AISDK_PREFIX2,
|
|
30
39
|
Compaction: () => Compaction3,
|
|
31
40
|
DEFAULT_TIMEOUT_MS: () => DEFAULT_TIMEOUT_MS3,
|
|
32
|
-
Event: () =>
|
|
33
|
-
ID: () =>
|
|
34
|
-
Info: () =>
|
|
41
|
+
Event: () => Event14,
|
|
42
|
+
ID: () => ID8,
|
|
43
|
+
Info: () => Info16,
|
|
35
44
|
LoadError: () => LoadError3,
|
|
36
45
|
Provider: () => exports_provider3,
|
|
37
|
-
Request: () =>
|
|
38
|
-
Service: () =>
|
|
46
|
+
Request: () => Request2,
|
|
47
|
+
Service: () => Service59,
|
|
39
48
|
Settings: () => Settings2,
|
|
40
49
|
Transport: () => Transport2,
|
|
41
50
|
aisdk: () => aisdk2,
|
|
@@ -45,12 +54,12 @@ __export(exports_provider3, {
|
|
|
45
54
|
mergeOverlay: () => mergeOverlay2,
|
|
46
55
|
modelSettings: () => modelSettings2,
|
|
47
56
|
nativeSettings: () => nativeSettings2,
|
|
48
|
-
node: () =>
|
|
57
|
+
node: () => node62,
|
|
49
58
|
packageName: () => packageName2,
|
|
50
59
|
timeout: () => timeout2,
|
|
51
60
|
timeouts: () => timeouts2
|
|
52
61
|
});
|
|
53
|
-
import { Context, Effect
|
|
62
|
+
import { Context, Effect, Layer, Option, Schema, Stream, Struct } from "effect";
|
|
54
63
|
import { Provider } from "@opencode/schema/provider";
|
|
55
64
|
import { Model } from "@opencode/schema/model";
|
|
56
65
|
import { makeLocationNode } from "@opencode/util/effect/app-node";
|
|
@@ -59,273 +68,8 @@ import { isRecord } from "@opencode/ai/utils/record";
|
|
|
59
68
|
import { importModule, resolveModule } from "@opencode/util/runtime-import";
|
|
60
69
|
import { Credential } from "@opencode/schema/credential";
|
|
61
70
|
import { freeze } from "immer";
|
|
62
|
-
|
|
63
|
-
|
|
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": {
|
|
147
|
-
"@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat",
|
|
148
|
-
"@ai-sdk/mistral": "@opencode/ai/providers/google-vertex/mistral"
|
|
149
|
-
},
|
|
150
|
-
"kimi-for-coding": protocols("moonshot"),
|
|
151
|
-
meta: protocols("meta"),
|
|
152
|
-
minimax: protocols("minimax"),
|
|
153
|
-
"minimax-cn": protocols("minimax"),
|
|
154
|
-
"minimax-coding-plan": protocols("minimax"),
|
|
155
|
-
"minimax-cn-coding-plan": protocols("minimax"),
|
|
156
|
-
moonshotai: protocols("moonshot"),
|
|
157
|
-
"moonshotai-cn": protocols("moonshot"),
|
|
158
|
-
zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
159
|
-
"zai-coding-plan": protocols("zai-coding-plan"),
|
|
160
|
-
zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
161
|
-
"zhipuai-coding-plan": protocols("zai-coding-plan")
|
|
162
|
-
};
|
|
163
|
-
var NATIVE = new Set([
|
|
164
|
-
...Object.values(PACKAGES),
|
|
165
|
-
...Object.values(HOSTS).flatMap((host) => Object.values(host)),
|
|
166
|
-
"@opencode/ai/providers/azure/chat",
|
|
167
|
-
"@opencode/ai/providers/amazon-bedrock/mantle",
|
|
168
|
-
"@opencode/ai/providers/amazon-bedrock/mantle/chat",
|
|
169
|
-
"@opencode/ai/providers/amazon-bedrock/mantle/responses"
|
|
170
|
-
]);
|
|
171
|
-
function native2(npm, context) {
|
|
172
|
-
const host = HOSTS[context.providerID]?.[npm];
|
|
173
|
-
if (host)
|
|
174
|
-
return host;
|
|
175
|
-
if (npm === "@ai-sdk/amazon-bedrock/mantle")
|
|
176
|
-
return mantle(context.modelID);
|
|
177
|
-
if (npm === "@ai-sdk/azure" && azureChat(context))
|
|
178
|
-
return "@opencode/ai/providers/azure/chat";
|
|
179
|
-
return PACKAGES[npm];
|
|
180
|
-
}
|
|
181
|
-
var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
|
|
182
|
-
var mantle = (modelID) => {
|
|
183
|
-
if (modelID === undefined)
|
|
184
|
-
return "@opencode/ai/providers/amazon-bedrock/mantle";
|
|
185
|
-
return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
|
|
186
|
-
};
|
|
187
|
-
function resolve(specifier, context) {
|
|
188
|
-
const npm = packageName2(specifier);
|
|
189
|
-
if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
|
|
190
|
-
return native2(npm, context);
|
|
191
|
-
if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
|
|
192
|
-
return mantle(context.modelID);
|
|
193
|
-
if (npm === "@opencode/ai/providers/azure/responses" && azureChat(context))
|
|
194
|
-
return "@opencode/ai/providers/azure/chat";
|
|
195
|
-
return NATIVE.has(npm) ? npm : undefined;
|
|
196
|
-
}
|
|
197
|
-
function options(replacement, modelID, settings) {
|
|
198
|
-
const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
|
|
199
|
-
const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
|
|
200
|
-
const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
|
|
201
|
-
return {
|
|
202
|
-
settings: {
|
|
203
|
-
...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
|
|
204
|
-
...thinking === undefined ? {} : { thinking }
|
|
205
|
-
},
|
|
206
|
-
...settings.headers === undefined ? {} : { headers: settings.headers },
|
|
207
|
-
...settings.extraBody === undefined ? {} : { body: settings.extraBody },
|
|
208
|
-
...converse ? bedrockRequest(modelID, settings) : {},
|
|
209
|
-
...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
var BEDROCK_KEYS = [
|
|
213
|
-
"bearerToken",
|
|
214
|
-
"endpoint",
|
|
215
|
-
"credentials",
|
|
216
|
-
"credentialProvider",
|
|
217
|
-
"accessKeyId",
|
|
218
|
-
"secretAccessKey",
|
|
219
|
-
"sessionToken"
|
|
220
|
-
];
|
|
221
|
-
var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
|
|
222
|
-
function bedrockSettings(settings, converse) {
|
|
223
|
-
const region = settings.region ?? settings.credentials?.region;
|
|
224
|
-
const credentials = settings.credentials ?? settings;
|
|
225
|
-
const baseURL = settings.baseURL ?? settings.endpoint;
|
|
226
|
-
return {
|
|
227
|
-
...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
|
|
228
|
-
...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
|
|
229
|
-
...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
|
|
230
|
-
...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
|
|
231
|
-
credentials: {
|
|
232
|
-
...region === undefined ? {} : { region },
|
|
233
|
-
accessKeyId: credentials.accessKeyId,
|
|
234
|
-
secretAccessKey: credentials.secretAccessKey,
|
|
235
|
-
...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
function bedrockThinking(modelID, settings) {
|
|
241
|
-
const reasoning = settings.reasoningConfig;
|
|
242
|
-
if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
|
|
243
|
-
return;
|
|
244
|
-
return { type: "enabled", budgetTokens: reasoning.budgetTokens };
|
|
245
|
-
}
|
|
246
|
-
function bedrockRequest(modelID, settings) {
|
|
247
|
-
const additional = settings.additionalModelRequestFields ?? {};
|
|
248
|
-
const reasoning = settings.reasoningConfig;
|
|
249
|
-
const anthropic = modelID?.includes("anthropic") ?? false;
|
|
250
|
-
const openai = modelID?.includes("openai.") ?? false;
|
|
251
|
-
const harmony = modelID?.includes("openai.gpt-oss") ?? false;
|
|
252
|
-
const effort = reasoning?.maxReasoningEffort;
|
|
253
|
-
const type = reasoning?.type;
|
|
254
|
-
const budget = reasoning?.budgetTokens;
|
|
255
|
-
const display = reasoning?.display;
|
|
256
|
-
const betas = settings.anthropicBeta ?? [];
|
|
257
|
-
const fields = mergeOverlay2(additional, {
|
|
258
|
-
...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
|
|
259
|
-
...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
|
|
260
|
-
...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
|
|
261
|
-
...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
|
|
262
|
-
...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
|
|
263
|
-
...!anthropic && !openai && effort !== undefined ? {
|
|
264
|
-
reasoningConfig: {
|
|
265
|
-
...type === undefined || type === "adaptive" ? {} : { type },
|
|
266
|
-
...budget === undefined ? {} : { budgetTokens: budget },
|
|
267
|
-
maxReasoningEffort: effort
|
|
268
|
-
}
|
|
269
|
-
} : {}
|
|
270
|
-
});
|
|
271
|
-
const body = {
|
|
272
|
-
...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
|
|
273
|
-
...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
|
|
274
|
-
};
|
|
275
|
-
return Object.keys(body).length === 0 ? {} : { body };
|
|
276
|
-
}
|
|
277
|
-
var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
|
|
278
|
-
function openRouterRequest(settings) {
|
|
279
|
-
const headers = mergeHeaders2({
|
|
280
|
-
...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
|
|
281
|
-
...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
|
|
282
|
-
...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
|
|
283
|
-
}, settings.headers) ?? {};
|
|
284
|
-
return Object.keys(headers).length === 0 ? {} : { headers };
|
|
285
|
-
}
|
|
286
|
-
var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
|
|
287
|
-
var Credentials = Schema.Struct({
|
|
288
|
-
accessKeyId: Schema.String,
|
|
289
|
-
secretAccessKey: Schema.String,
|
|
290
|
-
sessionToken: lenient(Schema.String),
|
|
291
|
-
region: lenient(Schema.String)
|
|
292
|
-
});
|
|
293
|
-
var Legacy = Schema.StructWithRest(Schema.Struct({
|
|
294
|
-
apiKey: lenient(Schema.String),
|
|
295
|
-
baseURL: lenient(Schema.String),
|
|
296
|
-
headers: lenient(Schema.Record(Schema.String, Schema.String)),
|
|
297
|
-
extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
|
|
298
|
-
useCompletionUrls: lenient(Schema.Boolean),
|
|
299
|
-
auth: lenient(Schema.Literals(["bearer", "sigv4"])),
|
|
300
|
-
bearerToken: lenient(Schema.String),
|
|
301
|
-
endpoint: lenient(Schema.String),
|
|
302
|
-
region: lenient(Schema.String),
|
|
303
|
-
credentials: lenient(Credentials),
|
|
304
|
-
accessKeyId: lenient(Schema.String),
|
|
305
|
-
secretAccessKey: lenient(Schema.String),
|
|
306
|
-
sessionToken: lenient(Schema.String),
|
|
307
|
-
anthropicBeta: lenient(Schema.Array(Schema.String)),
|
|
308
|
-
serviceTier: lenient(Schema.String),
|
|
309
|
-
reasoningConfig: lenient(Schema.Struct({
|
|
310
|
-
type: lenient(Schema.String),
|
|
311
|
-
display: lenient(Schema.String),
|
|
312
|
-
maxReasoningEffort: lenient(Schema.String),
|
|
313
|
-
budgetTokens: lenient(Schema.Number)
|
|
314
|
-
})),
|
|
315
|
-
additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
|
|
316
|
-
anthropic_beta: lenient(Schema.Array(Schema.String)),
|
|
317
|
-
output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
|
|
318
|
-
reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
|
|
319
|
-
}), [Schema.Record(Schema.String, Schema.Unknown)])),
|
|
320
|
-
appName: lenient(Schema.String),
|
|
321
|
-
appUrl: lenient(Schema.String),
|
|
322
|
-
api_keys: lenient(Schema.Record(Schema.String, Schema.String))
|
|
323
|
-
}), [Schema.Record(Schema.String, Schema.Unknown)]);
|
|
324
|
-
var decode = Schema.decodeUnknownSync(Legacy);
|
|
325
|
-
|
|
326
|
-
// src/provider.ts
|
|
327
|
-
import { Event as Event16 } from "@opencode/schema/provider";
|
|
328
|
-
var ID12 = Provider.ID;
|
|
71
|
+
import { Event as Event14 } from "@opencode/schema/provider";
|
|
72
|
+
var ID8 = Provider.ID;
|
|
329
73
|
var AISDK_PREFIX2 = "aisdk:";
|
|
330
74
|
var isAISDK2 = (value) => value?.startsWith(AISDK_PREFIX2) ?? false;
|
|
331
75
|
var aisdk2 = (value) => isAISDK2(value) ? value : `${AISDK_PREFIX2}${value}`;
|
|
@@ -336,12 +80,12 @@ function packageName2(value) {
|
|
|
336
80
|
return value;
|
|
337
81
|
return value.slice(AISDK_PREFIX2.length);
|
|
338
82
|
}
|
|
339
|
-
var JsonRecord =
|
|
340
|
-
var decodeJsonRecord =
|
|
83
|
+
var JsonRecord = Schema.Record(Schema.String, Schema.Json);
|
|
84
|
+
var decodeJsonRecord = Schema.decodeUnknownSync(JsonRecord);
|
|
341
85
|
|
|
342
|
-
class LoadError3 extends
|
|
343
|
-
package:
|
|
344
|
-
cause:
|
|
86
|
+
class LoadError3 extends Schema.TaggedError()("Provider.LoadError", {
|
|
87
|
+
package: Schema.String,
|
|
88
|
+
cause: Schema.Defect()
|
|
345
89
|
}) {
|
|
346
90
|
}
|
|
347
91
|
var packages = new Map;
|
|
@@ -418,12 +162,12 @@ var builtins = new Map([
|
|
|
418
162
|
() => import("@opencode/ai/providers/zai-coding-plan/responses")
|
|
419
163
|
]
|
|
420
164
|
]);
|
|
421
|
-
var loadPackage2 =
|
|
165
|
+
var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
|
|
422
166
|
const specifier = packageName2(input);
|
|
423
167
|
const builtin = builtins.get(specifier);
|
|
424
168
|
if (builtin)
|
|
425
169
|
return yield* importPackage(specifier, specifier, builtin);
|
|
426
|
-
const resolved = yield*
|
|
170
|
+
const resolved = yield* Effect.sync(() => {
|
|
427
171
|
if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
|
|
428
172
|
return specifier;
|
|
429
173
|
try {
|
|
@@ -442,8 +186,8 @@ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
|
|
|
442
186
|
}
|
|
443
187
|
const parts = specifier.split("/");
|
|
444
188
|
const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
|
|
445
|
-
const installed = yield* npm.add(root).pipe(
|
|
446
|
-
const entrypoint = yield*
|
|
189
|
+
const installed = yield* npm.add(root).pipe(Effect.mapError((cause) => new LoadError3({ package: specifier, cause })));
|
|
190
|
+
const entrypoint = yield* Effect.try({
|
|
447
191
|
try: () => resolveModule(specifier, installed.directory),
|
|
448
192
|
catch: (cause) => new LoadError3({ package: specifier, cause })
|
|
449
193
|
});
|
|
@@ -452,15 +196,15 @@ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
|
|
|
452
196
|
var CORE_KEYS = ["chunkTimeout", "compaction", "fetch", "headerTimeout", "timeout", "transport"];
|
|
453
197
|
var PROVIDER_ONLY_KEYS = ["chunkTimeout", "headerTimeout", "timeout", "transport"];
|
|
454
198
|
function nativeSettings2(settings) {
|
|
455
|
-
return
|
|
199
|
+
return Struct.omit(settings, CORE_KEYS);
|
|
456
200
|
}
|
|
457
201
|
function modelSettings2(settings) {
|
|
458
|
-
return settings &&
|
|
202
|
+
return settings && Struct.omit(settings, PROVIDER_ONLY_KEYS);
|
|
459
203
|
}
|
|
460
|
-
var decodeTimeout =
|
|
204
|
+
var decodeTimeout = Schema.decodeUnknownOption(HttpTimeout);
|
|
461
205
|
var DEFAULT_TIMEOUT_MS3 = 300000;
|
|
462
206
|
function timeout2(value) {
|
|
463
|
-
return
|
|
207
|
+
return Option.getOrUndefined(decodeTimeout(value));
|
|
464
208
|
}
|
|
465
209
|
function timeouts2(settings) {
|
|
466
210
|
return {
|
|
@@ -494,13 +238,13 @@ function mergeHeaders2(base, overlay) {
|
|
|
494
238
|
return result;
|
|
495
239
|
}, new Map).values());
|
|
496
240
|
}
|
|
497
|
-
var
|
|
241
|
+
var Request2 = Provider.Request;
|
|
498
242
|
var Compaction3 = Provider.Compaction;
|
|
499
243
|
var Transport2 = Provider.Transport;
|
|
500
244
|
var Settings2 = Provider.Settings;
|
|
501
|
-
var
|
|
245
|
+
var Info16 = Provider.Info;
|
|
502
246
|
|
|
503
|
-
class
|
|
247
|
+
class Service59 extends Context.Service()("@opencode/Provider") {
|
|
504
248
|
}
|
|
505
249
|
var definitions = new WeakMap;
|
|
506
250
|
function index(providerID, models) {
|
|
@@ -513,10 +257,10 @@ function index(providerID, models) {
|
|
|
513
257
|
definitions.set(models, indexes);
|
|
514
258
|
return result;
|
|
515
259
|
}
|
|
516
|
-
var layer = Layer.effect(
|
|
260
|
+
var layer = Layer.effect(Service59, Effect.gen(function* () {
|
|
517
261
|
const bus = yield* Service84;
|
|
518
|
-
const integrations = yield*
|
|
519
|
-
const location = yield*
|
|
262
|
+
const integrations = yield* Service60;
|
|
263
|
+
const location = yield* Service81;
|
|
520
264
|
const state = create3({
|
|
521
265
|
name: "provider",
|
|
522
266
|
initial: () => new Map,
|
|
@@ -527,7 +271,7 @@ var layer = Layer.effect(Service75, Effect2.gen(function* () {
|
|
|
527
271
|
const current = records.get(id);
|
|
528
272
|
if (current)
|
|
529
273
|
return current;
|
|
530
|
-
const added = { provider:
|
|
274
|
+
const added = { provider: Info16.empty(id), models: new Map };
|
|
531
275
|
records.set(id, added);
|
|
532
276
|
maps.add(added.models);
|
|
533
277
|
return added;
|
|
@@ -595,9 +339,9 @@ var layer = Layer.effect(Service75, Effect2.gen(function* () {
|
|
|
595
339
|
},
|
|
596
340
|
notify: () => notify
|
|
597
341
|
});
|
|
598
|
-
yield*
|
|
342
|
+
yield* Effect.addFinalizer(() => shutdown2(state.reload()));
|
|
599
343
|
let cached;
|
|
600
|
-
const snapshot =
|
|
344
|
+
const snapshot = Effect.fn("Provider.snapshot")(function* () {
|
|
601
345
|
while (true) {
|
|
602
346
|
const revision = integrations.revision();
|
|
603
347
|
const records = state.get();
|
|
@@ -608,7 +352,7 @@ var layer = Layer.effect(Service75, Effect2.gen(function* () {
|
|
|
608
352
|
const available = Array.from(records.values()).filter((record) => {
|
|
609
353
|
if (record.provider.activation === "disabled")
|
|
610
354
|
return false;
|
|
611
|
-
const integration = byID.get(record.provider.integrationID ??
|
|
355
|
+
const integration = byID.get(record.provider.integrationID ?? ID9.make(record.provider.id));
|
|
612
356
|
if (record.sourceConnection && key2(record.sourceConnection) !== key2(integration?.connections[0]))
|
|
613
357
|
return false;
|
|
614
358
|
if (record.provider.activation === "enabled")
|
|
@@ -625,7 +369,7 @@ var layer = Layer.effect(Service75, Effect2.gen(function* () {
|
|
|
625
369
|
}
|
|
626
370
|
});
|
|
627
371
|
let published;
|
|
628
|
-
const notify =
|
|
372
|
+
const notify = Effect.gen(function* () {
|
|
629
373
|
const value = yield* snapshot();
|
|
630
374
|
if (value === published)
|
|
631
375
|
return;
|
|
@@ -634,19 +378,19 @@ var layer = Layer.effect(Service75, Effect2.gen(function* () {
|
|
|
634
378
|
location: { directory: location.directory, workspaceID: location.workspaceID }
|
|
635
379
|
});
|
|
636
380
|
});
|
|
637
|
-
yield* bus.subscribe([
|
|
638
|
-
return
|
|
381
|
+
yield* bus.subscribe([Event15.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect.forkScoped({ startImmediately: true }));
|
|
382
|
+
return Service59.of({
|
|
639
383
|
transform: state.transform,
|
|
640
384
|
reload: state.reload,
|
|
641
|
-
get:
|
|
642
|
-
all:
|
|
643
|
-
available:
|
|
385
|
+
get: Effect.fn("Provider.get")((id) => Effect.sync(() => freeze(state.get().get(id)?.provider, true))),
|
|
386
|
+
all: Effect.fn("Provider.all")(() => Effect.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
|
|
387
|
+
available: Effect.fn("Provider.available")(() => snapshot().pipe(Effect.map((value) => value.providers))),
|
|
644
388
|
snapshot
|
|
645
389
|
});
|
|
646
390
|
}));
|
|
647
|
-
var
|
|
648
|
-
var importPackage =
|
|
649
|
-
const module = yield*
|
|
391
|
+
var node62 = makeLocationNode({ service: Service59, layer, deps: [node88, node63, node85] });
|
|
392
|
+
var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
|
|
393
|
+
const module = yield* Effect.tryPromise({
|
|
650
394
|
try: () => {
|
|
651
395
|
const existing = packages.get(entrypoint);
|
|
652
396
|
if (existing)
|
|
@@ -666,4 +410,260 @@ var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, e
|
|
|
666
410
|
return module;
|
|
667
411
|
});
|
|
668
412
|
|
|
669
|
-
|
|
413
|
+
// src/aisdk-native.ts
|
|
414
|
+
function rewrite2(target, input) {
|
|
415
|
+
if (input.specifier === undefined)
|
|
416
|
+
return;
|
|
417
|
+
const plain = resolve(input.specifier, input);
|
|
418
|
+
if (!plain)
|
|
419
|
+
return;
|
|
420
|
+
const settings = decode(target.settings ?? {});
|
|
421
|
+
const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
|
|
422
|
+
const translated = options(replacement, input.modelID, settings);
|
|
423
|
+
if (target.package !== undefined || replacement !== input.specifier)
|
|
424
|
+
target.package = replacement;
|
|
425
|
+
target.settings = target.settings === undefined ? undefined : {
|
|
426
|
+
...translated.settings,
|
|
427
|
+
...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
|
|
428
|
+
};
|
|
429
|
+
target.headers = mergeHeaders2(translated.headers, target.headers);
|
|
430
|
+
target.body = mergeOverlay2(translated.body, target.body);
|
|
431
|
+
target.variants = target.variants?.map((variant) => {
|
|
432
|
+
const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
|
|
433
|
+
const headers = mergeHeaders2(overlay.headers, variant.headers);
|
|
434
|
+
const body = mergeOverlay2(overlay.body, variant.body);
|
|
435
|
+
return {
|
|
436
|
+
id: variant.id,
|
|
437
|
+
...variant.settings === undefined ? {} : { settings: overlay.settings },
|
|
438
|
+
...headers === undefined ? {} : { headers },
|
|
439
|
+
...body === undefined ? {} : { body }
|
|
440
|
+
};
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
var PACKAGES = {
|
|
444
|
+
"@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
|
|
445
|
+
"@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
|
|
446
|
+
"@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
|
|
447
|
+
"@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
|
|
448
|
+
"@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
|
|
449
|
+
"@ai-sdk/cohere": "@opencode/ai/providers/cohere",
|
|
450
|
+
"@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
|
|
451
|
+
"@ai-sdk/google": "@opencode/ai/providers/google",
|
|
452
|
+
"@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
|
|
453
|
+
"@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
|
|
454
|
+
"@ai-sdk/groq": "@opencode/ai/providers/groq",
|
|
455
|
+
"@ai-sdk/mistral": "@opencode/ai/providers/mistral",
|
|
456
|
+
"@ai-sdk/openai": "@opencode/ai/providers/openai",
|
|
457
|
+
"@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
|
|
458
|
+
"@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
|
|
459
|
+
"@ai-sdk/xai": "@opencode/ai/providers/xai",
|
|
460
|
+
"@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
|
|
461
|
+
"@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
|
|
462
|
+
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
463
|
+
"venice-ai-sdk-provider": "@opencode/ai/providers/venice"
|
|
464
|
+
};
|
|
465
|
+
var protocols = (name) => ({
|
|
466
|
+
"@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
|
|
467
|
+
"@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
|
|
468
|
+
"@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
|
|
469
|
+
});
|
|
470
|
+
var HOSTS = {
|
|
471
|
+
alibaba: protocols("alibaba"),
|
|
472
|
+
"alibaba-cn": protocols("alibaba"),
|
|
473
|
+
"alibaba-coding-plan": protocols("alibaba"),
|
|
474
|
+
"alibaba-coding-plan-cn": protocols("alibaba"),
|
|
475
|
+
"alibaba-token-plan": protocols("alibaba"),
|
|
476
|
+
"alibaba-token-plan-cn": protocols("alibaba"),
|
|
477
|
+
baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
|
|
478
|
+
"cloudflare-ai-gateway": {
|
|
479
|
+
"@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
480
|
+
"@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
481
|
+
"@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
482
|
+
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
|
|
483
|
+
},
|
|
484
|
+
cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
|
|
485
|
+
"cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
|
|
486
|
+
deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
|
|
487
|
+
digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
|
|
488
|
+
"fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
|
|
489
|
+
"google-vertex": {
|
|
490
|
+
"@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat",
|
|
491
|
+
"@ai-sdk/mistral": "@opencode/ai/providers/google-vertex/mistral"
|
|
492
|
+
},
|
|
493
|
+
"kimi-for-coding": protocols("moonshot"),
|
|
494
|
+
meta: protocols("meta"),
|
|
495
|
+
minimax: protocols("minimax"),
|
|
496
|
+
"minimax-cn": protocols("minimax"),
|
|
497
|
+
"minimax-coding-plan": protocols("minimax"),
|
|
498
|
+
"minimax-cn-coding-plan": protocols("minimax"),
|
|
499
|
+
moonshotai: protocols("moonshot"),
|
|
500
|
+
"moonshotai-cn": protocols("moonshot"),
|
|
501
|
+
zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
502
|
+
"zai-coding-plan": protocols("zai-coding-plan"),
|
|
503
|
+
zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
504
|
+
"zhipuai-coding-plan": protocols("zai-coding-plan")
|
|
505
|
+
};
|
|
506
|
+
var NATIVE = new Set([
|
|
507
|
+
...Object.values(PACKAGES),
|
|
508
|
+
...Object.values(HOSTS).flatMap((host) => Object.values(host)),
|
|
509
|
+
"@opencode/ai/providers/azure/chat",
|
|
510
|
+
"@opencode/ai/providers/amazon-bedrock/mantle",
|
|
511
|
+
"@opencode/ai/providers/amazon-bedrock/mantle/chat",
|
|
512
|
+
"@opencode/ai/providers/amazon-bedrock/mantle/responses"
|
|
513
|
+
]);
|
|
514
|
+
function native2(npm, context) {
|
|
515
|
+
const host = HOSTS[context.providerID]?.[npm];
|
|
516
|
+
if (host)
|
|
517
|
+
return host;
|
|
518
|
+
if (npm === "@ai-sdk/amazon-bedrock/mantle")
|
|
519
|
+
return mantle(context.modelID);
|
|
520
|
+
if (npm === "@ai-sdk/azure" && azureChat(context))
|
|
521
|
+
return "@opencode/ai/providers/azure/chat";
|
|
522
|
+
return PACKAGES[npm];
|
|
523
|
+
}
|
|
524
|
+
var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
|
|
525
|
+
var mantle = (modelID) => {
|
|
526
|
+
if (modelID === undefined)
|
|
527
|
+
return "@opencode/ai/providers/amazon-bedrock/mantle";
|
|
528
|
+
return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
|
|
529
|
+
};
|
|
530
|
+
function resolve(specifier, context) {
|
|
531
|
+
const npm = packageName2(specifier);
|
|
532
|
+
if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
|
|
533
|
+
return native2(npm, context);
|
|
534
|
+
if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
|
|
535
|
+
return mantle(context.modelID);
|
|
536
|
+
if (npm === "@opencode/ai/providers/azure/responses" && azureChat(context))
|
|
537
|
+
return "@opencode/ai/providers/azure/chat";
|
|
538
|
+
return NATIVE.has(npm) ? npm : undefined;
|
|
539
|
+
}
|
|
540
|
+
function options(replacement, modelID, settings) {
|
|
541
|
+
const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
|
|
542
|
+
const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
|
|
543
|
+
const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
|
|
544
|
+
return {
|
|
545
|
+
settings: {
|
|
546
|
+
...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
|
|
547
|
+
...thinking === undefined ? {} : { thinking }
|
|
548
|
+
},
|
|
549
|
+
...settings.headers === undefined ? {} : { headers: settings.headers },
|
|
550
|
+
...settings.extraBody === undefined ? {} : { body: settings.extraBody },
|
|
551
|
+
...converse ? bedrockRequest(modelID, settings) : {},
|
|
552
|
+
...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
var BEDROCK_KEYS = [
|
|
556
|
+
"bearerToken",
|
|
557
|
+
"endpoint",
|
|
558
|
+
"credentials",
|
|
559
|
+
"credentialProvider",
|
|
560
|
+
"accessKeyId",
|
|
561
|
+
"secretAccessKey",
|
|
562
|
+
"sessionToken"
|
|
563
|
+
];
|
|
564
|
+
var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
|
|
565
|
+
function bedrockSettings(settings, converse) {
|
|
566
|
+
const region = settings.region ?? settings.credentials?.region;
|
|
567
|
+
const credentials = settings.credentials ?? settings;
|
|
568
|
+
const baseURL = settings.baseURL ?? settings.endpoint;
|
|
569
|
+
return {
|
|
570
|
+
...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
|
|
571
|
+
...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
|
|
572
|
+
...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
|
|
573
|
+
...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
|
|
574
|
+
credentials: {
|
|
575
|
+
...region === undefined ? {} : { region },
|
|
576
|
+
accessKeyId: credentials.accessKeyId,
|
|
577
|
+
secretAccessKey: credentials.secretAccessKey,
|
|
578
|
+
...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
function bedrockThinking(modelID, settings) {
|
|
584
|
+
const reasoning = settings.reasoningConfig;
|
|
585
|
+
if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
|
|
586
|
+
return;
|
|
587
|
+
return { type: "enabled", budgetTokens: reasoning.budgetTokens };
|
|
588
|
+
}
|
|
589
|
+
function bedrockRequest(modelID, settings) {
|
|
590
|
+
const additional = settings.additionalModelRequestFields ?? {};
|
|
591
|
+
const reasoning = settings.reasoningConfig;
|
|
592
|
+
const anthropic = modelID?.includes("anthropic") ?? false;
|
|
593
|
+
const openai = modelID?.includes("openai.") ?? false;
|
|
594
|
+
const harmony = modelID?.includes("openai.gpt-oss") ?? false;
|
|
595
|
+
const effort = reasoning?.maxReasoningEffort;
|
|
596
|
+
const type = reasoning?.type;
|
|
597
|
+
const budget = reasoning?.budgetTokens;
|
|
598
|
+
const display = reasoning?.display;
|
|
599
|
+
const betas = settings.anthropicBeta ?? [];
|
|
600
|
+
const fields = mergeOverlay2(additional, {
|
|
601
|
+
...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
|
|
602
|
+
...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
|
|
603
|
+
...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
|
|
604
|
+
...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
|
|
605
|
+
...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
|
|
606
|
+
...!anthropic && !openai && effort !== undefined ? {
|
|
607
|
+
reasoningConfig: {
|
|
608
|
+
...type === undefined || type === "adaptive" ? {} : { type },
|
|
609
|
+
...budget === undefined ? {} : { budgetTokens: budget },
|
|
610
|
+
maxReasoningEffort: effort
|
|
611
|
+
}
|
|
612
|
+
} : {}
|
|
613
|
+
});
|
|
614
|
+
const body = {
|
|
615
|
+
...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
|
|
616
|
+
...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
|
|
617
|
+
};
|
|
618
|
+
return Object.keys(body).length === 0 ? {} : { body };
|
|
619
|
+
}
|
|
620
|
+
var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
|
|
621
|
+
function openRouterRequest(settings) {
|
|
622
|
+
const headers = mergeHeaders2({
|
|
623
|
+
...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
|
|
624
|
+
...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
|
|
625
|
+
...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
|
|
626
|
+
}, settings.headers) ?? {};
|
|
627
|
+
return Object.keys(headers).length === 0 ? {} : { headers };
|
|
628
|
+
}
|
|
629
|
+
var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option2.some(undefined)))));
|
|
630
|
+
var Credentials = Schema2.Struct({
|
|
631
|
+
accessKeyId: Schema2.String,
|
|
632
|
+
secretAccessKey: Schema2.String,
|
|
633
|
+
sessionToken: lenient(Schema2.String),
|
|
634
|
+
region: lenient(Schema2.String)
|
|
635
|
+
});
|
|
636
|
+
var Legacy = Schema2.StructWithRest(Schema2.Struct({
|
|
637
|
+
apiKey: lenient(Schema2.String),
|
|
638
|
+
baseURL: lenient(Schema2.String),
|
|
639
|
+
headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
|
|
640
|
+
extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
|
|
641
|
+
useCompletionUrls: lenient(Schema2.Boolean),
|
|
642
|
+
auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
|
|
643
|
+
bearerToken: lenient(Schema2.String),
|
|
644
|
+
endpoint: lenient(Schema2.String),
|
|
645
|
+
region: lenient(Schema2.String),
|
|
646
|
+
credentials: lenient(Credentials),
|
|
647
|
+
accessKeyId: lenient(Schema2.String),
|
|
648
|
+
secretAccessKey: lenient(Schema2.String),
|
|
649
|
+
sessionToken: lenient(Schema2.String),
|
|
650
|
+
anthropicBeta: lenient(Schema2.Array(Schema2.String)),
|
|
651
|
+
serviceTier: lenient(Schema2.String),
|
|
652
|
+
reasoningConfig: lenient(Schema2.Struct({
|
|
653
|
+
type: lenient(Schema2.String),
|
|
654
|
+
display: lenient(Schema2.String),
|
|
655
|
+
maxReasoningEffort: lenient(Schema2.String),
|
|
656
|
+
budgetTokens: lenient(Schema2.Number)
|
|
657
|
+
})),
|
|
658
|
+
additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
|
|
659
|
+
anthropic_beta: lenient(Schema2.Array(Schema2.String)),
|
|
660
|
+
output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
|
|
661
|
+
reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
|
|
662
|
+
}), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
|
|
663
|
+
appName: lenient(Schema2.String),
|
|
664
|
+
appUrl: lenient(Schema2.String),
|
|
665
|
+
api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
|
|
666
|
+
}), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
|
|
667
|
+
var decode = Schema2.decodeUnknownSync(Legacy);
|
|
668
|
+
|
|
669
|
+
export { rewrite2, native2, exports_aisdk_native, ID8, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, DEFAULT_TIMEOUT_MS3, timeout2, timeouts2, mergeOverlay2, mergeHeaders2, Request2, Compaction3, Transport2, Settings2, Info16, Service59, node62, exports_provider3, Event14 };
|