@opencode/core 0.0.0-dev-20284 → 0.0.0-dev-20286
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/agent.js +63 -63
- package/dist/aisdk-native.js +65 -65
- package/dist/aisdk.js +70 -70
- package/dist/app.js +9 -9
- package/dist/bus.js +52 -52
- package/dist/chunks/{integration-wzmaxvc9.js → integration-007kv54v.js} +19 -19
- package/dist/chunks/integration-04cetggm.js +507 -0
- package/dist/chunks/{integration-4yb1sc8z.js → integration-090naprk.js} +5 -5
- package/dist/chunks/{integration-a4ae1mqs.js → integration-0bfcnrg1.js} +1 -1
- package/dist/chunks/{integration-hkxx6036.js → integration-0mph93pj.js} +1 -1
- package/dist/chunks/{integration-8y7th7f2.js → integration-0r7yqxbf.js} +3 -3
- package/dist/chunks/{integration-0ta8ncat.js → integration-0s64387h.js} +10 -10
- package/dist/chunks/{integration-2c7hjkzv.js → integration-1813d5zh.js} +15 -15
- package/dist/chunks/{integration-v7tbbmm7.js → integration-1bzea8hf.js} +7 -7
- package/dist/chunks/{integration-y5sjzhg5.js → integration-1g2pwm2v.js} +3 -3
- package/dist/chunks/{integration-xr72202b.js → integration-1jhsme74.js} +1 -1
- package/dist/chunks/{integration-mr90rcr6.js → integration-1kwjt6d6.js} +16 -16
- package/dist/chunks/{integration-kefef9st.js → integration-1mwnra7p.js} +22 -22
- package/dist/chunks/{integration-10ce4g8v.js → integration-1n23hs5q.js} +10 -10
- package/dist/chunks/{integration-g26xt907.js → integration-1q0e68gg.js} +15 -15
- package/dist/chunks/{integration-e5d75q9m.js → integration-1ysctg58.js} +27 -27
- package/dist/chunks/{integration-ash82f75.js → integration-216h48p4.js} +24 -24
- package/dist/chunks/{integration-df3df5tx.js → integration-228m9d3z.js} +1 -1
- package/dist/chunks/{integration-txe61999.js → integration-23dc2d68.js} +21 -21
- package/dist/chunks/{integration-qf37nfnm.js → integration-276aa1tg.js} +3 -3
- package/dist/chunks/{integration-r1mh77dy.js → integration-29yhzn30.js} +21 -21
- package/dist/chunks/{integration-fj3c9ane.js → integration-2f8k78sm.js} +10 -10
- package/dist/chunks/{integration-0w5jwg0z.js → integration-2ggkd5y6.js} +3 -3
- package/dist/chunks/{integration-nf82b3wt.js → integration-2gx9j6y9.js} +9 -9
- package/dist/chunks/{integration-3801kdgp.js → integration-2p623br6.js} +3 -3
- package/dist/chunks/{integration-s00bxgng.js → integration-2zg6nskx.js} +22 -22
- package/dist/chunks/{integration-cvhkk3hw.js → integration-37x5te5e.js} +6 -6
- package/dist/chunks/{integration-bt5vmpp6.js → integration-3h57rhwa.js} +3 -3
- package/dist/chunks/{integration-3ayz7pdh.js → integration-3htr6yph.js} +32 -32
- package/dist/chunks/{integration-a79rb00n.js → integration-427a15qw.js} +27 -27
- package/dist/chunks/{integration-4w3q00qb.js → integration-43fvpk64.js} +22 -22
- package/dist/chunks/{integration-3py9tntd.js → integration-450n1fmb.js} +5 -5
- package/dist/chunks/{integration-fjnt6npx.js → integration-4bvnjebc.js} +14 -14
- package/dist/chunks/{integration-fsmmwzws.js → integration-4enjeyq9.js} +28 -28
- package/dist/chunks/{integration-1x11rq2a.js → integration-4v7qdvcn.js} +4 -4
- package/dist/chunks/{integration-yfj39tds.js → integration-4x26exyn.js} +22 -22
- package/dist/chunks/{integration-d0k1g5nx.js → integration-51f5btjf.js} +5 -5
- package/dist/chunks/{integration-7rncv06g.js → integration-52t303b9.js} +40 -40
- package/dist/chunks/{integration-s9taesah.js → integration-55bzypr0.js} +10 -10
- package/dist/chunks/{integration-ns7tbk3m.js → integration-55jj4qxv.js} +21 -21
- package/dist/chunks/{integration-8parajs2.js → integration-5df5bq3a.js} +41 -41
- package/dist/chunks/{integration-355jfwf8.js → integration-5nnneb5s.js} +46 -46
- package/dist/chunks/{integration-med42bqn.js → integration-5qxftstg.js} +16 -16
- package/dist/chunks/{integration-18fhcwyd.js → integration-5xp6zek4.js} +8 -8
- package/dist/chunks/{integration-cpyc35sh.js → integration-67kxvcq5.js} +80 -80
- package/dist/chunks/{integration-5we7r0eg.js → integration-6f8737q3.js} +7 -7
- package/dist/chunks/{integration-14skzq0n.js → integration-6whetfrh.js} +41 -41
- package/dist/chunks/{integration-9kbags8k.js → integration-70byt6m4.js} +8 -8
- package/dist/chunks/{integration-exxm0dv4.js → integration-77d9dkzy.js} +23 -23
- package/dist/chunks/{integration-m2p4qxhv.js → integration-7e6vht7x.js} +25 -25
- package/dist/chunks/{integration-baes5359.js → integration-7m3qqnex.js} +4 -4
- package/dist/chunks/{integration-5r5ngwvx.js → integration-7my3jqe6.js} +6 -6
- package/dist/chunks/{integration-b8t30bwq.js → integration-7pzv1w99.js} +9 -9
- package/dist/chunks/{integration-41xbg949.js → integration-7rcqk60f.js} +12 -12
- package/dist/chunks/{integration-jmv4csz4.js → integration-7yaqes3v.js} +9 -9
- package/dist/chunks/{integration-7r6wwy4a.js → integration-7yr82b3h.js} +6 -6
- package/dist/chunks/{integration-s0k7kba5.js → integration-818pfwc9.js} +6 -6
- package/dist/chunks/{integration-s3g84wna.js → integration-85kjp3d4.js} +5 -5
- package/dist/chunks/{integration-r280vhkp.js → integration-8j3sn0xa.js} +17 -17
- package/dist/chunks/{integration-1p07q0wb.js → integration-8sze2n9a.js} +7 -7
- package/dist/chunks/{integration-m8dxka3f.js → integration-8vag3pxv.js} +32 -32
- package/dist/chunks/{integration-a79tw4th.js → integration-8wa5wmwv.js} +5 -5
- package/dist/chunks/{integration-ete09x6f.js → integration-918vfc7v.js} +5 -5
- package/dist/chunks/{integration-gfvb90ym.js → integration-94ek1h2f.js} +1 -1
- package/dist/chunks/{integration-akqv09jd.js → integration-9e9nvwfq.js} +174 -169
- package/dist/chunks/{integration-xsgk3b13.js → integration-9jsdpggr.js} +7 -7
- package/dist/chunks/{integration-k8s2g9k3.js → integration-9pcszhcd.js} +66 -66
- package/dist/chunks/{integration-enc8k7eb.js → integration-9sp358pj.js} +142 -34
- package/dist/chunks/{integration-nvrj0150.js → integration-9xefwsd5.js} +9 -9
- package/dist/chunks/{integration-ngts6ef0.js → integration-a2qe2ev9.js} +7 -7
- package/dist/chunks/{integration-mh4rkcf4.js → integration-a3vq5bj2.js} +24 -24
- package/dist/chunks/{integration-5798x35d.js → integration-a6fmcvwn.js} +23 -23
- package/dist/chunks/{integration-d7ap0fky.js → integration-apjcg4d6.js} +8 -8
- package/dist/chunks/{integration-56tk9z3j.js → integration-arkmsdt9.js} +13 -13
- package/dist/chunks/{integration-8xwjq0pe.js → integration-b1rb0xwe.js} +23 -23
- package/dist/chunks/{integration-v4r6ds62.js → integration-bay80n5w.js} +4 -4
- package/dist/chunks/{integration-q2b1ymqp.js → integration-bf0ztrs3.js} +3 -3
- package/dist/chunks/{integration-2y8s9x1b.js → integration-br4ct1cv.js} +10 -10
- package/dist/chunks/{integration-2emg5d4r.js → integration-brka9z6d.js} +1 -1
- package/dist/chunks/{integration-wefqzq4f.js → integration-c634d86v.js} +304 -304
- package/dist/chunks/{integration-54tcyq79.js → integration-ckecvw8r.js} +1 -1
- package/dist/chunks/{integration-h3b20av4.js → integration-cs3k7vbw.js} +7 -7
- package/dist/chunks/{integration-7zdz69fq.js → integration-ctkexn52.js} +17 -17
- package/dist/chunks/{integration-datgzbnb.js → integration-cw40cn3a.js} +18 -18
- package/dist/chunks/{integration-rbkd2d5v.js → integration-dcdcxcqv.js} +21 -21
- package/dist/chunks/{integration-zfsz7c4a.js → integration-ddxretnd.js} +9 -9
- package/dist/chunks/{integration-h3xyrx8k.js → integration-dez0353w.js} +14 -14
- package/dist/chunks/{integration-cwa6csj7.js → integration-djszqvmq.js} +7 -7
- package/dist/chunks/{integration-r0bd36fr.js → integration-dmftx2z2.js} +6 -6
- package/dist/chunks/{integration-y71avatq.js → integration-dpkg50ah.js} +3 -3
- package/dist/chunks/{integration-dd4dnbbb.js → integration-dpy1708c.js} +4 -4
- package/dist/chunks/{integration-wztfhms8.js → integration-e2ha372a.js} +2 -2
- package/dist/chunks/{integration-yqrrhp5w.js → integration-e2zxmq4e.js} +16 -16
- package/dist/chunks/{integration-zbsarep8.js → integration-e56jykm2.js} +11 -11
- package/dist/chunks/{integration-nydz2zbj.js → integration-e8n5dwh7.js} +24 -24
- package/dist/chunks/{integration-rhjbct0v.js → integration-eaj1djv9.js} +7 -7
- package/dist/chunks/{integration-zywn5321.js → integration-eckntx06.js} +21 -21
- package/dist/chunks/{integration-9erc8nq9.js → integration-ehzy0r6a.js} +36 -36
- package/dist/chunks/{integration-mvfdckk2.js → integration-emzsebxx.js} +5 -5
- package/dist/chunks/{integration-eahhehpg.js → integration-ermxvwhp.js} +3 -3
- package/dist/chunks/{integration-59xwxqv5.js → integration-evbgk2k8.js} +3 -3
- package/dist/chunks/{integration-19eyspa8.js → integration-ew48pmvr.js} +26 -26
- package/dist/chunks/{integration-8ntmc9jd.js → integration-ex6pt5yr.js} +1 -1
- package/dist/chunks/{integration-j6rk38x8.js → integration-eyz64kwr.js} +4 -4
- package/dist/chunks/{integration-zd5r1z3p.js → integration-f1csepjx.js} +28 -28
- package/dist/chunks/{integration-kc8mrxbe.js → integration-f4ntpb4a.js} +15 -15
- package/dist/chunks/{integration-dpja50vx.js → integration-f5gy8qwh.js} +7 -7
- package/dist/chunks/{integration-fs86y4y8.js → integration-fb8ajyr9.js} +23 -23
- package/dist/chunks/{integration-h9055z12.js → integration-fbrwwgmz.js} +16 -16
- package/dist/chunks/{integration-941r3npm.js → integration-fh23fcf5.js} +10 -10
- package/dist/chunks/{integration-13ahtzqa.js → integration-ftnq43wp.js} +14 -14
- package/dist/chunks/{integration-a8bn8zg0.js → integration-g190xswt.js} +3 -3
- package/dist/chunks/{integration-xvp1j2dc.js → integration-g5agzp2h.js} +3 -3
- package/dist/chunks/{integration-a2xz39qp.js → integration-g8ab104g.js} +7 -7
- package/dist/chunks/{integration-wnys78fq.js → integration-gdv3ksn6.js} +2 -2
- package/dist/chunks/{integration-3e147rt9.js → integration-gzbkpp9m.js} +8 -8
- package/dist/chunks/{integration-4p773rn4.js → integration-h1vw7kx6.js} +13 -13
- package/dist/chunks/{integration-jssdqx31.js → integration-h70zt0wt.js} +22 -22
- package/dist/chunks/{integration-ycwy6ex1.js → integration-haf8ym7w.js} +17 -17
- package/dist/chunks/{integration-sn41jhqx.js → integration-hn0x82vs.js} +13 -13
- package/dist/chunks/{integration-h9qb7c7q.js → integration-htq109gq.js} +30 -30
- package/dist/chunks/{integration-576s5d3g.js → integration-hx450sbz.js} +19 -19
- package/dist/chunks/{integration-e2w4nw67.js → integration-hxmak5w6.js} +10 -10
- package/dist/chunks/{integration-2va239gy.js → integration-hza05959.js} +16 -16
- package/dist/chunks/{integration-d1pkyphn.js → integration-j1jfj66b.js} +5 -5
- package/dist/chunks/{integration-8p70309a.js → integration-j26sntzs.js} +8 -8
- package/dist/chunks/{integration-g74mfj6n.js → integration-j3s2z371.js} +7 -7
- package/dist/chunks/{integration-pc4b88sv.js → integration-j8afcsyc.js} +3 -3
- package/dist/chunks/{integration-mkvne50z.js → integration-j9a2q0fz.js} +6 -6
- package/dist/chunks/{integration-5frpvc34.js → integration-jca4demv.js} +1 -1
- package/dist/chunks/{integration-2e55ks6z.js → integration-jdnyyw3y.js} +12 -12
- package/dist/chunks/{integration-m3v0axb2.js → integration-jkcjd3kp.js} +4 -4
- package/dist/chunks/{integration-tffktew3.js → integration-jrjzd75d.js} +5 -5
- package/dist/chunks/{integration-rpg9c19m.js → integration-jvf3yq6v.js} +3 -3
- package/dist/chunks/{integration-g56r92cj.js → integration-k054q3ng.js} +12 -12
- package/dist/chunks/{integration-j34bs4nz.js → integration-k0a3z2qz.js} +3 -3
- package/dist/chunks/{integration-88b17fsa.js → integration-k3y1sryq.js} +35 -35
- package/dist/chunks/{integration-m601tfh9.js → integration-k7a6qazk.js} +13 -13
- package/dist/chunks/{integration-qf0b0eax.js → integration-kfgccrws.js} +9 -9
- package/dist/chunks/{integration-1hsgezmh.js → integration-kmsf2gmc.js} +11 -11
- package/dist/chunks/integration-krtr9e37.js +26 -0
- package/dist/chunks/{integration-j7kkg62r.js → integration-kyr9dgrt.js} +19 -19
- package/dist/chunks/{integration-t5ey9jjv.js → integration-m84jjq37.js} +39 -39
- package/dist/chunks/{integration-hwaq6n4f.js → integration-m8n1jv7h.js} +16 -16
- package/dist/chunks/{integration-1ygqh575.js → integration-mfqp6xfm.js} +4 -4
- package/dist/chunks/{integration-sht10b59.js → integration-mgznjxj1.js} +50 -50
- package/dist/chunks/{integration-y9vg1scn.js → integration-mm0znw5z.js} +9 -9
- package/dist/chunks/{integration-tchf8bzg.js → integration-mnwqmehd.js} +16 -16
- package/dist/chunks/{integration-mhkvc446.js → integration-mvfsc1pv.js} +2 -2
- package/dist/chunks/{integration-87b0ccws.js → integration-mvg2k0gw.js} +4 -4
- package/dist/chunks/{integration-287rg9sk.js → integration-mvxy8yk1.js} +23 -23
- package/dist/chunks/{integration-amv7r7xf.js → integration-mx84fb2r.js} +6 -6
- package/dist/chunks/{integration-7w8vs4ab.js → integration-mxxa41h5.js} +11 -11
- package/dist/chunks/{integration-f60ve7xe.js → integration-n56w81az.js} +10 -10
- package/dist/chunks/{integration-jw0bqmef.js → integration-n5jbg1jr.js} +31 -31
- package/dist/chunks/{integration-s2eagjy5.js → integration-n6ywjbkr.js} +22 -22
- package/dist/chunks/{integration-99ws31qd.js → integration-n860bejb.js} +24 -24
- package/dist/chunks/{integration-mpthp08p.js → integration-ngfnceq4.js} +8 -8
- package/dist/chunks/{integration-rzep3kdk.js → integration-nxgbngy1.js} +6 -6
- package/dist/chunks/{integration-ssx3zy79.js → integration-nzg2pgvq.js} +14 -14
- package/dist/chunks/{integration-w4arg62q.js → integration-p0b4ytnr.js} +5 -5
- package/dist/chunks/{integration-5yzzbxa7.js → integration-p37cw4rj.js} +7 -7
- package/dist/chunks/integration-p6rn815x.js +252 -0
- package/dist/chunks/{integration-jx4jx4s1.js → integration-pc24wejf.js} +1 -1
- package/dist/chunks/{integration-evxqfha7.js → integration-pcgeyt73.js} +24 -24
- package/dist/chunks/{integration-500fmqbd.js → integration-pp173efe.js} +9 -9
- package/dist/chunks/{integration-fndw4the.js → integration-ppdtm0qk.js} +1 -1
- package/dist/chunks/{integration-6hjx5zpb.js → integration-prq7hedt.js} +8 -8
- package/dist/chunks/{integration-hawc55qt.js → integration-prqcyn0c.js} +2 -2
- package/dist/chunks/{integration-3q756xqj.js → integration-psy3e1hh.js} +31 -31
- package/dist/chunks/{integration-q7z079fr.js → integration-pxy4dh62.js} +22 -22
- package/dist/chunks/{integration-8q7cq0y1.js → integration-q3t37ft6.js} +3 -3
- package/dist/chunks/{integration-h8vn6fjj.js → integration-qepzh1bh.js} +11 -11
- package/dist/chunks/{integration-0jwsre1p.js → integration-qgn6gcr1.js} +4 -4
- package/dist/chunks/{integration-5sxhaqv9.js → integration-qkcvm401.js} +12 -12
- package/dist/chunks/{integration-13wsvgev.js → integration-qm74d4cp.js} +9 -9
- package/dist/chunks/{integration-txzsewg6.js → integration-qvqw0qph.js} +20 -20
- package/dist/chunks/{integration-6esbwhw5.js → integration-rbpwsggg.js} +30 -30
- package/dist/chunks/{integration-b2s2f9hy.js → integration-rc5nmyhy.js} +9 -9
- package/dist/chunks/{integration-h8pmqzj1.js → integration-re7wp77e.js} +5 -5
- package/dist/chunks/{integration-03wz1akf.js → integration-rq3a28zf.js} +36 -36
- package/dist/chunks/{integration-kfktj5h5.js → integration-rrzjzqrd.js} +2 -2
- package/dist/chunks/{integration-7b7x293f.js → integration-rwsvrpt4.js} +48 -29
- package/dist/chunks/{integration-kxw6n92b.js → integration-s22tcjmk.js} +12 -12
- package/dist/chunks/{integration-d2czbp48.js → integration-s30fyz93.js} +3 -3
- package/dist/chunks/{integration-jxjcdxd0.js → integration-sf48c4sg.js} +23 -23
- package/dist/chunks/{integration-166agdv6.js → integration-sj2zwkfm.js} +9 -9
- package/dist/chunks/{integration-npzqcw4h.js → integration-sjhe73hb.js} +8 -8
- package/dist/chunks/{integration-pkfxfszq.js → integration-skb9kzak.js} +22 -22
- package/dist/chunks/{integration-1ag5f13t.js → integration-srvnn0v4.js} +9 -9
- package/dist/chunks/{integration-9jft2ye4.js → integration-st0j0zn3.js} +17 -17
- package/dist/chunks/{integration-qv1j0f1d.js → integration-sv7yr8xe.js} +15 -15
- package/dist/chunks/{integration-336jbapg.js → integration-t71c8r43.js} +7 -7
- package/dist/chunks/{integration-g3nv7gdt.js → integration-tp0s123v.js} +4 -4
- package/dist/chunks/{integration-p0sbmvqz.js → integration-tqz9py0c.js} +19 -19
- package/dist/chunks/{integration-aby47wwy.js → integration-trfm30pq.js} +22 -22
- package/dist/chunks/{integration-xn76t6fc.js → integration-v2g7d70b.js} +14 -14
- package/dist/chunks/{integration-fdv30zvt.js → integration-v5dkyp31.js} +6 -6
- package/dist/chunks/{integration-k5c5twea.js → integration-vavgc505.js} +25 -25
- package/dist/chunks/{integration-r0d7dx27.js → integration-vnn4gkfz.js} +81 -81
- package/dist/chunks/{integration-yesqp7fw.js → integration-vycpbpnw.js} +25 -25
- package/dist/chunks/{integration-kaqgv1kk.js → integration-w3senr2q.js} +6 -6
- package/dist/chunks/{integration-tgcnk5sw.js → integration-w47g9jnr.js} +1 -1
- package/dist/chunks/{integration-1p2r191f.js → integration-w9nr0r4k.js} +15 -15
- package/dist/chunks/{integration-g2mx06y3.js → integration-wdzcbyx9.js} +22 -22
- package/dist/chunks/{integration-a7pt7jn1.js → integration-wq4mmp7m.js} +2 -2
- package/dist/chunks/{integration-n264kn3f.js → integration-wstveqzx.js} +13 -13
- package/dist/chunks/{integration-k2aj64ym.js → integration-wvjmf19v.js} +21 -21
- package/dist/chunks/{integration-vzfyd6yh.js → integration-wyvmt7jr.js} +14 -14
- package/dist/chunks/{integration-dxt5nwr4.js → integration-x3k4y0th.js} +14 -14
- package/dist/chunks/{integration-8hpx30f9.js → integration-x8h61vbx.js} +43 -43
- package/dist/chunks/{integration-bxp2jpa1.js → integration-x8v6s741.js} +2 -2
- package/dist/chunks/{integration-7evwkt5a.js → integration-xf1aecpm.js} +13 -13
- package/dist/chunks/{integration-57b9ws8p.js → integration-xfkkasph.js} +6 -6
- package/dist/chunks/{integration-s9htjpym.js → integration-xn7zchcf.js} +26 -26
- package/dist/chunks/{integration-y3ems7z9.js → integration-xp8cepfb.js} +8 -8
- package/dist/chunks/{integration-4wdgh5xv.js → integration-y0s8f48q.js} +1 -1
- package/dist/chunks/{integration-h6r3nrb9.js → integration-y6bex35g.js} +5 -3
- package/dist/chunks/{integration-3rtxz4nr.js → integration-y72zmemf.js} +7 -7
- package/dist/chunks/{integration-37dqmmxw.js → integration-yk1wne8d.js} +17 -17
- package/dist/chunks/{integration-kcc7mh83.js → integration-yn0skrfd.js} +39 -39
- package/dist/chunks/{integration-4xz89tjk.js → integration-yt0fqk68.js} +3 -3
- package/dist/chunks/{integration-bjtzbw4r.js → integration-z07pqspn.js} +1 -1
- package/dist/chunks/{integration-99jc8f7r.js → integration-z83vrf6c.js} +21 -21
- package/dist/chunks/{integration-0qjwcdf0.js → integration-z96crwnb.js} +3 -3
- package/dist/chunks/{integration-2yx0kjta.js → integration-zqankrzg.js} +3 -3
- package/dist/codemode/instructions.js +8 -8
- package/dist/command.js +67 -67
- package/dist/config/discovery.js +60 -60
- package/dist/config/normalize.js +81 -81
- package/dist/config/plugin/agent.js +94 -94
- package/dist/config/plugin/command.js +177 -177
- package/dist/config/plugin/compaction.js +126 -126
- package/dist/config/plugin/compatibility.js +110 -110
- package/dist/config/plugin/formatter.js +93 -93
- package/dist/config/plugin/image.js +92 -92
- package/dist/config/plugin/instruction.js +66 -66
- package/dist/config/plugin/location-watcher.js +92 -92
- package/dist/config/plugin/mcp.js +100 -100
- package/dist/config/plugin/policy.js +93 -93
- package/dist/config/plugin/provider.js +92 -92
- package/dist/config/plugin/reference.js +94 -94
- package/dist/config/plugin/shell.js +92 -92
- package/dist/config/plugin/skill-file.js +77 -77
- package/dist/config/plugin/skill.js +113 -113
- package/dist/config/plugin/snapshot.js +92 -92
- package/dist/config/plugin/source.js +95 -95
- package/dist/config/plugin/tool-output.js +93 -93
- package/dist/config/plugin/websearch.js +91 -91
- package/dist/config/plugin/worktree.js +94 -94
- package/dist/config.js +98 -98
- package/dist/credential.js +65 -65
- package/dist/database/database.js +50 -50
- package/dist/database/drizzle/effect-sqlite/driver.js +10 -10
- package/dist/database/drizzle/effect-sqlite/index.js +6 -6
- package/dist/database/drizzle/effect-sqlite/session.js +7 -7
- package/dist/database/drizzle/index.js +11 -11
- package/dist/database/drizzle/sqlite-core/effect/db.js +5 -5
- package/dist/database/drizzle/sqlite-core/effect/index.js +2 -2
- package/dist/database/drizzle/sqlite-core/effect/session.js +6 -6
- package/dist/database/drizzle.js +11 -11
- package/dist/database/migration.gen.js +39 -39
- package/dist/database/migration.js +40 -40
- package/dist/database/v1-migration.bun.js +11 -11
- package/dist/effect/app-node-builder.js +241 -241
- package/dist/effect/keyed-mutex.js +3 -3
- package/dist/environment/environment.js +68 -68
- package/dist/environment/index.js +70 -70
- package/dist/event-logger.js +10 -10
- package/dist/file-access.js +80 -80
- package/dist/file-mutation.js +69 -69
- package/dist/filesystem/location-watcher-policy.js +5 -5
- package/dist/filesystem/location-watcher.js +188 -188
- package/dist/filesystem/search.js +76 -76
- package/dist/filesystem/watcher.js +13 -13
- package/dist/filesystem.js +75 -75
- package/dist/form.js +67 -67
- package/dist/formatter/builtins.js +3 -3
- package/dist/formatter.js +67 -67
- package/dist/generate.js +79 -79
- package/dist/git.js +3 -3
- package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +3 -3
- package/dist/github-copilot/copilot-provider.js +3 -3
- package/dist/github-copilot/models.js +75 -75
- package/dist/github-copilot/responses/openai-responses-language-model.js +5 -5
- package/dist/github-copilot/responses/openai-responses-prepare-tools.js +3 -3
- package/dist/image/photon.js +1 -1
- package/dist/image.js +5 -5
- package/dist/instance/service.js +5 -5
- package/dist/instance.js +312 -312
- package/dist/instruction-discovery.js +65 -65
- package/dist/instructions/builtins.js +65 -65
- package/dist/instructions/index.js +5 -5
- package/dist/integration/connection.js +5 -3
- package/dist/integration.js +67 -66
- package/dist/job.js +60 -60
- package/dist/kv.js +55 -55
- package/dist/location-activity.js +57 -57
- package/dist/location-lifecycle.js +83 -83
- package/dist/location-service-map.js +64 -64
- package/dist/location-services.js +309 -309
- package/dist/location.js +59 -59
- package/dist/managed-policy.js +5 -5
- package/dist/mcp/client.js +20 -20
- package/dist/mcp/index.js +76 -75
- package/dist/mcp/instructions.js +99 -98
- package/dist/mcp/oauth.js +14 -14
- package/dist/mcp/stdio.js +65 -65
- package/dist/modal/models.js +75 -75
- package/dist/model-resolver.js +74 -74
- package/dist/model.js +76 -76
- package/dist/models-dev.js +82 -82
- package/dist/permission/saved.js +64 -64
- package/dist/permission/sql.js +3 -3
- package/dist/permission.js +89 -89
- package/dist/persistent-pty/index.js +69 -69
- package/dist/persistent-pty.js +55 -55
- package/dist/plugin/agent.js +80 -80
- package/dist/plugin/command.js +75 -74
- package/dist/plugin/hooks.js +5 -5
- package/dist/plugin/host.js +181 -181
- package/dist/plugin/identity.js +3 -3
- package/dist/plugin/instance.js +5 -5
- package/dist/plugin/internal.js +285 -285
- package/dist/plugin/mcp-codemode-defaults.js +3 -3
- package/dist/plugin/models-dev.js +71 -71
- package/dist/plugin/module.js +2 -2
- package/dist/plugin/optimize.js +4 -4
- package/dist/plugin/plan.js +78 -78
- package/dist/plugin/provider/amazon-bedrock.js +66 -66
- package/dist/plugin/provider/azure.js +91 -91
- package/dist/plugin/provider/cloudflare-ai-gateway.js +90 -90
- package/dist/plugin/provider/cloudflare-workers-ai.js +90 -90
- package/dist/plugin/provider/configured.js +89 -89
- package/dist/plugin/provider/digitalocean.js +68 -68
- package/dist/plugin/provider/github-copilot.js +70 -70
- package/dist/plugin/provider/gitlab.js +68 -68
- package/dist/plugin/provider/google-vertex.js +66 -66
- package/dist/plugin/provider/llmgateway.js +58 -57
- package/dist/plugin/provider/lmstudio.js +92 -92
- package/dist/plugin/provider/modal.js +68 -68
- package/dist/plugin/provider/ollama.js +92 -92
- package/dist/plugin/provider/openai.js +69 -69
- package/dist/plugin/provider/opencode.js +70 -70
- package/dist/plugin/provider/openrouter.js +67 -67
- package/dist/plugin/provider/poe.js +58 -57
- package/dist/plugin/provider/prompt-cache-key.js +66 -66
- package/dist/plugin/provider/sap-ai-core.js +66 -66
- package/dist/plugin/provider/snowflake-cortex.js +91 -91
- package/dist/plugin/provider/vercel.js +66 -66
- package/dist/plugin/provider/vllm.js +92 -92
- package/dist/plugin/provider/xai.js +67 -67
- package/dist/plugin/provider.js +123 -123
- package/dist/plugin/sdk.js +59 -59
- package/dist/plugin/service.js +3 -3
- package/dist/plugin/skill.js +111 -111
- package/dist/plugin/supervisor.js +299 -299
- package/dist/plugin/tool-input-repair.js +3 -3
- package/dist/plugin/update.js +6 -6
- package/dist/plugin/vcs/git.js +64 -64
- package/dist/plugin/vcs/hg.js +64 -64
- package/dist/plugin/verbosity.js +69 -69
- package/dist/plugin/warming.js +91 -91
- package/dist/plugin/websearch/exa.js +6 -6
- package/dist/plugin/websearch/firecrawl.js +5 -5
- package/dist/plugin/websearch/index.js +8 -8
- package/dist/plugin/websearch/mcp.js +3 -3
- package/dist/plugin/websearch/parallel.js +5 -5
- package/dist/plugin/websearch/tavily.js +6 -6
- package/dist/plugin/websearch/tinyfish.js +7 -7
- package/dist/plugin.js +192 -192
- package/dist/project/schema.js +1 -1
- package/dist/project/sql.js +2 -2
- package/dist/project.js +58 -58
- package/dist/provider.js +77 -77
- package/dist/pty.js +74 -74
- package/dist/reference/instructions.js +63 -63
- package/dist/reference.js +69 -69
- package/dist/repository-cache.js +60 -60
- package/dist/ripgrep.js +71 -71
- package/dist/rpc.js +64 -64
- package/dist/session/command.js +56 -56
- package/dist/session/compaction.js +103 -103
- package/dist/session/context.js +122 -122
- package/dist/session/diff.js +65 -65
- package/dist/session/environment.js +5 -5
- package/dist/session/error.js +4 -4
- package/dist/session/execution/restart.js +120 -120
- package/dist/session/execution.js +101 -101
- package/dist/session/generate.js +123 -123
- package/dist/session/history.js +9 -9
- package/dist/session/inbox.js +69 -69
- package/dist/session/info.js +2 -2
- package/dist/session/instruction-entry.js +61 -61
- package/dist/session/instruction-state.js +5 -5
- package/dist/session/instructions.js +73 -73
- package/dist/session/model-request.js +92 -92
- package/dist/session/model-transport.js +7 -7
- package/dist/session/move.js +102 -102
- package/dist/session/projector.js +63 -63
- package/dist/session/prompt.js +80 -80
- package/dist/session/provider-context.js +3 -3
- package/dist/session/revert.js +66 -66
- package/dist/session/runner/index.js +3 -3
- package/dist/session/runner/llm.js +191 -191
- package/dist/session/runner/model.js +74 -74
- package/dist/session/runner/retry.js +3 -3
- package/dist/session/runner/step.js +97 -97
- package/dist/session/runner/to-llm-message.js +2 -2
- package/dist/session/schema.js +5 -5
- package/dist/session/session.js +135 -135
- package/dist/session/shell.js +104 -104
- package/dist/session/skill.js +79 -79
- package/dist/session/sql.js +3 -3
- package/dist/session/stats.js +10 -10
- package/dist/session/store.js +67 -67
- package/dist/session/subagent-job.js +172 -172
- package/dist/session/system-prompt.js +5 -5
- package/dist/session/title.js +125 -125
- package/dist/session/to-session-error.js +87 -87
- package/dist/session/transfer.js +114 -114
- package/dist/session.js +186 -186
- package/dist/shell/parse.js +3 -3
- package/dist/shell/select.js +12 -12
- package/dist/shell.js +107 -107
- package/dist/skill/discovery.js +5 -5
- package/dist/skill/instructions.js +83 -83
- package/dist/skill.js +88 -88
- package/dist/snapshot.js +71 -71
- package/dist/tool/mcp.js +98 -97
- package/dist/tool/plugin/edit.js +88 -88
- package/dist/tool/plugin/glob.js +97 -97
- package/dist/tool/plugin/grep.js +93 -93
- package/dist/tool/plugin/mcp-resource.js +88 -87
- package/dist/tool/plugin/opencode.js +3 -3
- package/dist/tool/plugin/patch.js +96 -96
- package/dist/tool/plugin/question.js +81 -81
- package/dist/tool/plugin/read.js +98 -98
- package/dist/tool/plugin/shell.js +180 -180
- package/dist/tool/plugin/skill.js +87 -87
- package/dist/tool/plugin/subagent.js +183 -183
- package/dist/tool/plugin/webfetch.js +85 -85
- package/dist/tool/plugin/websearch.js +88 -88
- package/dist/tool/plugin/write.js +96 -96
- package/dist/tool/read-filesystem.js +73 -73
- package/dist/tool-output.js +6 -6
- package/dist/tool.js +9 -9
- package/dist/types/integration/connection.d.ts +42 -0
- package/dist/types/integration.d.ts +24 -0
- package/dist/types/plugin/provider/opencode.d.ts +1 -1
- package/dist/v1/config/agent.js +4 -4
- package/dist/v1/config/attachment.js +3 -3
- package/dist/v1/config/command.js +5 -5
- package/dist/v1/config/config.js +14 -14
- package/dist/v1/config/formatter.js +7 -7
- package/dist/v1/config/lsp.js +5 -5
- package/dist/v1/config/mcp.js +3 -3
- package/dist/v1/config/migrate.js +67 -67
- package/dist/v1/config/permission.js +3 -3
- package/dist/v1/config/plugin.js +3 -3
- package/dist/v1/config/provider.js +3 -3
- package/dist/v1/config/server.js +1 -1
- package/dist/v1/config/skills.js +3 -3
- package/dist/variant.js +67 -67
- package/dist/vcs.js +67 -67
- package/dist/websearch.js +65 -65
- package/dist/wellknown/plugin.js +57 -57
- package/dist/wellknown.js +60 -60
- package/dist/workspace/driver.js +5 -5
- package/dist/workspace.js +63 -63
- package/dist/worktree/directory.js +1 -1
- package/dist/worktree/git.js +5 -5
- package/dist/worktree/sql.js +3 -3
- package/dist/worktree/strategies.js +67 -67
- package/dist/worktree.js +71 -71
- package/package.json +8 -8
- package/dist/chunks/integration-78b6byxs.js +0 -252
- package/dist/chunks/integration-a9zdxssk.js +0 -26
- package/dist/chunks/integration-efmr7s8w.js +0 -507
- /package/dist/chunks/{integration-d9s573fh.js → integration-57ez7d0k.js} +0 -0
- /package/dist/chunks/{integration-82206brs.js → integration-5wyqsnb4.js} +0 -0
- /package/dist/chunks/{integration-dfmjf6m5.js → integration-fqm9ba4x.js} +0 -0
- /package/dist/chunks/{integration-yyb7tjpc.js → integration-gv6a8nnw.js} +0 -0
- /package/dist/chunks/{integration-p4b86tx8.js → integration-prwkcbsp.js} +0 -0
- /package/dist/chunks/{integration-2hg7qvzt.js → integration-q4fmv0xv.js} +0 -0
- /package/dist/chunks/{integration-psazpmmj.js → integration-wd3x2cqz.js} +0 -0
- /package/dist/chunks/{integration-rq775frq.js → integration-zeh9ct20.js} +0 -0
|
@@ -1,40 +1,49 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Service83,
|
|
3
3
|
node87
|
|
4
|
-
} from "./integration-
|
|
4
|
+
} from "./integration-x8v6s741.js";
|
|
5
5
|
import {
|
|
6
6
|
shutdown2,
|
|
7
7
|
create3
|
|
8
8
|
} from "./integration-rdw6cm16.js";
|
|
9
|
-
import {
|
|
10
|
-
ID14,
|
|
11
|
-
Service77,
|
|
12
|
-
node81,
|
|
13
|
-
Event18
|
|
14
|
-
} from "./integration-7b7x293f.js";
|
|
15
9
|
import {
|
|
16
10
|
key2
|
|
17
|
-
} from "./integration-
|
|
11
|
+
} from "./integration-y6bex35g.js";
|
|
12
|
+
import {
|
|
13
|
+
ID10,
|
|
14
|
+
Service71,
|
|
15
|
+
node75,
|
|
16
|
+
Event16
|
|
17
|
+
} from "./integration-rwsvrpt4.js";
|
|
18
18
|
import {
|
|
19
19
|
Service80,
|
|
20
20
|
node84
|
|
21
|
-
} from "./integration-
|
|
21
|
+
} from "./integration-y0s8f48q.js";
|
|
22
22
|
import {
|
|
23
23
|
__export
|
|
24
24
|
} from "./integration-9rqn6x4v.js";
|
|
25
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, Schema as Schema2, Struct as Struct2 } from "effect";
|
|
34
|
+
|
|
26
35
|
// src/provider.ts
|
|
27
36
|
var exports_provider3 = {};
|
|
28
37
|
__export(exports_provider3, {
|
|
29
38
|
AISDK_PREFIX: () => AISDK_PREFIX2,
|
|
30
39
|
Compaction: () => Compaction3,
|
|
31
|
-
Event: () =>
|
|
32
|
-
ID: () =>
|
|
33
|
-
Info: () =>
|
|
40
|
+
Event: () => Event15,
|
|
41
|
+
ID: () => ID9,
|
|
42
|
+
Info: () => Info23,
|
|
34
43
|
LoadError: () => LoadError3,
|
|
35
44
|
Provider: () => exports_provider3,
|
|
36
|
-
Request: () =>
|
|
37
|
-
Service: () =>
|
|
45
|
+
Request: () => Request2,
|
|
46
|
+
Service: () => Service70,
|
|
38
47
|
Settings: () => Settings2,
|
|
39
48
|
Transport: () => Transport2,
|
|
40
49
|
aisdk: () => aisdk2,
|
|
@@ -44,10 +53,10 @@ __export(exports_provider3, {
|
|
|
44
53
|
mergeOverlay: () => mergeOverlay2,
|
|
45
54
|
modelSettings: () => modelSettings2,
|
|
46
55
|
nativeSettings: () => nativeSettings2,
|
|
47
|
-
node: () =>
|
|
56
|
+
node: () => node74,
|
|
48
57
|
packageName: () => packageName2
|
|
49
58
|
});
|
|
50
|
-
import { Context, Effect
|
|
59
|
+
import { Context, Effect, Layer, Schema, Stream, Struct } from "effect";
|
|
51
60
|
import { Provider } from "@opencode/schema/provider";
|
|
52
61
|
import { Model } from "@opencode/schema/model";
|
|
53
62
|
import { makeLocationNode } from "@opencode/util/effect/app-node";
|
|
@@ -55,264 +64,8 @@ import { isRecord } from "@opencode/ai/utils/record";
|
|
|
55
64
|
import { importModule, resolveModule } from "@opencode/util/runtime-import";
|
|
56
65
|
import { Credential } from "@opencode/schema/credential";
|
|
57
66
|
import { freeze } from "immer";
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var exports_aisdk_native = {};
|
|
61
|
-
__export(exports_aisdk_native, {
|
|
62
|
-
AISDKNative: () => exports_aisdk_native,
|
|
63
|
-
native: () => native2,
|
|
64
|
-
rewrite: () => rewrite2
|
|
65
|
-
});
|
|
66
|
-
import { Effect, Option, Schema, Struct } from "effect";
|
|
67
|
-
function rewrite2(target, input) {
|
|
68
|
-
if (input.specifier === undefined)
|
|
69
|
-
return;
|
|
70
|
-
const plain = resolve(input.specifier, input);
|
|
71
|
-
if (!plain)
|
|
72
|
-
return;
|
|
73
|
-
const settings = decode(target.settings ?? {});
|
|
74
|
-
const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
|
|
75
|
-
const translated = options(replacement, input.modelID, settings);
|
|
76
|
-
if (target.package !== undefined || replacement !== input.specifier)
|
|
77
|
-
target.package = replacement;
|
|
78
|
-
target.settings = target.settings === undefined ? undefined : {
|
|
79
|
-
...translated.settings,
|
|
80
|
-
...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
|
|
81
|
-
};
|
|
82
|
-
target.headers = mergeHeaders2(translated.headers, target.headers);
|
|
83
|
-
target.body = mergeOverlay2(translated.body, target.body);
|
|
84
|
-
target.variants = target.variants?.map((variant) => {
|
|
85
|
-
const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
|
|
86
|
-
const headers = mergeHeaders2(overlay.headers, variant.headers);
|
|
87
|
-
const body = mergeOverlay2(overlay.body, variant.body);
|
|
88
|
-
return {
|
|
89
|
-
id: variant.id,
|
|
90
|
-
...variant.settings === undefined ? {} : { settings: overlay.settings },
|
|
91
|
-
...headers === undefined ? {} : { headers },
|
|
92
|
-
...body === undefined ? {} : { body }
|
|
93
|
-
};
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
var PACKAGES = {
|
|
97
|
-
"@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
|
|
98
|
-
"@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
|
|
99
|
-
"@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
|
|
100
|
-
"@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
|
|
101
|
-
"@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
|
|
102
|
-
"@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
|
|
103
|
-
"@ai-sdk/google": "@opencode/ai/providers/google",
|
|
104
|
-
"@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
|
|
105
|
-
"@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
|
|
106
|
-
"@ai-sdk/groq": "@opencode/ai/providers/groq",
|
|
107
|
-
"@ai-sdk/mistral": "@opencode/ai/providers/mistral",
|
|
108
|
-
"@ai-sdk/openai": "@opencode/ai/providers/openai",
|
|
109
|
-
"@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
|
|
110
|
-
"@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
|
|
111
|
-
"@ai-sdk/xai": "@opencode/ai/providers/xai",
|
|
112
|
-
"@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
|
|
113
|
-
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
|
|
114
|
-
};
|
|
115
|
-
var protocols = (name) => ({
|
|
116
|
-
"@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
|
|
117
|
-
"@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
|
|
118
|
-
"@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
|
|
119
|
-
});
|
|
120
|
-
var HOSTS = {
|
|
121
|
-
alibaba: protocols("alibaba"),
|
|
122
|
-
"alibaba-cn": protocols("alibaba"),
|
|
123
|
-
"alibaba-coding-plan": protocols("alibaba"),
|
|
124
|
-
"alibaba-coding-plan-cn": protocols("alibaba"),
|
|
125
|
-
"alibaba-token-plan": protocols("alibaba"),
|
|
126
|
-
"alibaba-token-plan-cn": protocols("alibaba"),
|
|
127
|
-
baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
|
|
128
|
-
"cloudflare-ai-gateway": {
|
|
129
|
-
"@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
130
|
-
"@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
131
|
-
"@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
132
|
-
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
|
|
133
|
-
},
|
|
134
|
-
"cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
|
|
135
|
-
deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
|
|
136
|
-
"fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
|
|
137
|
-
"google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
|
|
138
|
-
"kimi-for-coding": protocols("moonshot"),
|
|
139
|
-
meta: protocols("meta"),
|
|
140
|
-
minimax: protocols("minimax"),
|
|
141
|
-
"minimax-cn": protocols("minimax"),
|
|
142
|
-
"minimax-coding-plan": protocols("minimax"),
|
|
143
|
-
"minimax-cn-coding-plan": protocols("minimax"),
|
|
144
|
-
moonshotai: protocols("moonshot"),
|
|
145
|
-
"moonshotai-cn": protocols("moonshot"),
|
|
146
|
-
zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
147
|
-
"zai-coding-plan": protocols("zai-coding-plan"),
|
|
148
|
-
zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
149
|
-
"zhipuai-coding-plan": protocols("zai-coding-plan")
|
|
150
|
-
};
|
|
151
|
-
var NATIVE = new Set([
|
|
152
|
-
...Object.values(PACKAGES),
|
|
153
|
-
...Object.values(HOSTS).flatMap((host) => Object.values(host)),
|
|
154
|
-
"@opencode/ai/providers/azure/chat",
|
|
155
|
-
"@opencode/ai/providers/amazon-bedrock/mantle",
|
|
156
|
-
"@opencode/ai/providers/amazon-bedrock/mantle/chat",
|
|
157
|
-
"@opencode/ai/providers/amazon-bedrock/mantle/responses"
|
|
158
|
-
]);
|
|
159
|
-
function native2(npm, context) {
|
|
160
|
-
const host = HOSTS[context.providerID]?.[npm];
|
|
161
|
-
if (host)
|
|
162
|
-
return host;
|
|
163
|
-
if (npm === "@ai-sdk/amazon-bedrock/mantle")
|
|
164
|
-
return mantle(context.modelID);
|
|
165
|
-
if (npm === "@ai-sdk/azure" && context.settings?.useCompletionUrls === true)
|
|
166
|
-
return "@opencode/ai/providers/azure/chat";
|
|
167
|
-
return PACKAGES[npm];
|
|
168
|
-
}
|
|
169
|
-
var mantle = (modelID) => {
|
|
170
|
-
if (modelID === undefined)
|
|
171
|
-
return "@opencode/ai/providers/amazon-bedrock/mantle";
|
|
172
|
-
return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
|
|
173
|
-
};
|
|
174
|
-
function resolve(specifier, context) {
|
|
175
|
-
const npm = packageName2(specifier);
|
|
176
|
-
if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
|
|
177
|
-
return native2(npm, context);
|
|
178
|
-
if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
|
|
179
|
-
return mantle(context.modelID);
|
|
180
|
-
if (npm === "@opencode/ai/providers/azure/responses" && context.settings?.useCompletionUrls === true)
|
|
181
|
-
return "@opencode/ai/providers/azure/chat";
|
|
182
|
-
return NATIVE.has(npm) ? npm : undefined;
|
|
183
|
-
}
|
|
184
|
-
function options(replacement, modelID, settings) {
|
|
185
|
-
const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
|
|
186
|
-
const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
|
|
187
|
-
const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
|
|
188
|
-
return {
|
|
189
|
-
settings: {
|
|
190
|
-
...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
|
|
191
|
-
...thinking === undefined ? {} : { thinking }
|
|
192
|
-
},
|
|
193
|
-
...settings.headers === undefined ? {} : { headers: settings.headers },
|
|
194
|
-
...settings.extraBody === undefined ? {} : { body: settings.extraBody },
|
|
195
|
-
...converse ? bedrockRequest(modelID, settings) : {},
|
|
196
|
-
...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
var BEDROCK_KEYS = [
|
|
200
|
-
"bearerToken",
|
|
201
|
-
"endpoint",
|
|
202
|
-
"credentials",
|
|
203
|
-
"credentialProvider",
|
|
204
|
-
"accessKeyId",
|
|
205
|
-
"secretAccessKey",
|
|
206
|
-
"sessionToken"
|
|
207
|
-
];
|
|
208
|
-
var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
|
|
209
|
-
function bedrockSettings(settings, converse) {
|
|
210
|
-
const region = settings.region ?? settings.credentials?.region;
|
|
211
|
-
const credentials = settings.credentials ?? settings;
|
|
212
|
-
const baseURL = settings.baseURL ?? settings.endpoint;
|
|
213
|
-
return {
|
|
214
|
-
...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
|
|
215
|
-
...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
|
|
216
|
-
...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
|
|
217
|
-
...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
|
|
218
|
-
credentials: {
|
|
219
|
-
...region === undefined ? {} : { region },
|
|
220
|
-
accessKeyId: credentials.accessKeyId,
|
|
221
|
-
secretAccessKey: credentials.secretAccessKey,
|
|
222
|
-
...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
function bedrockThinking(modelID, settings) {
|
|
228
|
-
const reasoning = settings.reasoningConfig;
|
|
229
|
-
if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
|
|
230
|
-
return;
|
|
231
|
-
return { type: "enabled", budgetTokens: reasoning.budgetTokens };
|
|
232
|
-
}
|
|
233
|
-
function bedrockRequest(modelID, settings) {
|
|
234
|
-
const additional = settings.additionalModelRequestFields ?? {};
|
|
235
|
-
const reasoning = settings.reasoningConfig;
|
|
236
|
-
const anthropic = modelID?.includes("anthropic") ?? false;
|
|
237
|
-
const openai = modelID?.includes("openai.") ?? false;
|
|
238
|
-
const harmony = modelID?.includes("openai.gpt-oss") ?? false;
|
|
239
|
-
const effort = reasoning?.maxReasoningEffort;
|
|
240
|
-
const type = reasoning?.type;
|
|
241
|
-
const budget = reasoning?.budgetTokens;
|
|
242
|
-
const display = reasoning?.display;
|
|
243
|
-
const betas = settings.anthropicBeta ?? [];
|
|
244
|
-
const fields = mergeOverlay2(additional, {
|
|
245
|
-
...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
|
|
246
|
-
...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
|
|
247
|
-
...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
|
|
248
|
-
...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
|
|
249
|
-
...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
|
|
250
|
-
...!anthropic && !openai && effort !== undefined ? {
|
|
251
|
-
reasoningConfig: {
|
|
252
|
-
...type === undefined || type === "adaptive" ? {} : { type },
|
|
253
|
-
...budget === undefined ? {} : { budgetTokens: budget },
|
|
254
|
-
maxReasoningEffort: effort
|
|
255
|
-
}
|
|
256
|
-
} : {}
|
|
257
|
-
});
|
|
258
|
-
const body = {
|
|
259
|
-
...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
|
|
260
|
-
...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
|
|
261
|
-
};
|
|
262
|
-
return Object.keys(body).length === 0 ? {} : { body };
|
|
263
|
-
}
|
|
264
|
-
var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
|
|
265
|
-
function openRouterRequest(settings) {
|
|
266
|
-
const headers = mergeHeaders2({
|
|
267
|
-
...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
|
|
268
|
-
...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
|
|
269
|
-
...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
|
|
270
|
-
}, settings.headers) ?? {};
|
|
271
|
-
return Object.keys(headers).length === 0 ? {} : { headers };
|
|
272
|
-
}
|
|
273
|
-
var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
|
|
274
|
-
var Credentials = Schema.Struct({
|
|
275
|
-
accessKeyId: Schema.String,
|
|
276
|
-
secretAccessKey: Schema.String,
|
|
277
|
-
sessionToken: lenient(Schema.String),
|
|
278
|
-
region: lenient(Schema.String)
|
|
279
|
-
});
|
|
280
|
-
var Legacy = Schema.StructWithRest(Schema.Struct({
|
|
281
|
-
apiKey: lenient(Schema.String),
|
|
282
|
-
baseURL: lenient(Schema.String),
|
|
283
|
-
headers: lenient(Schema.Record(Schema.String, Schema.String)),
|
|
284
|
-
extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
|
|
285
|
-
useCompletionUrls: lenient(Schema.Boolean),
|
|
286
|
-
auth: lenient(Schema.Literals(["bearer", "sigv4"])),
|
|
287
|
-
bearerToken: lenient(Schema.String),
|
|
288
|
-
endpoint: lenient(Schema.String),
|
|
289
|
-
region: lenient(Schema.String),
|
|
290
|
-
credentials: lenient(Credentials),
|
|
291
|
-
accessKeyId: lenient(Schema.String),
|
|
292
|
-
secretAccessKey: lenient(Schema.String),
|
|
293
|
-
sessionToken: lenient(Schema.String),
|
|
294
|
-
anthropicBeta: lenient(Schema.Array(Schema.String)),
|
|
295
|
-
serviceTier: lenient(Schema.String),
|
|
296
|
-
reasoningConfig: lenient(Schema.Struct({
|
|
297
|
-
type: lenient(Schema.String),
|
|
298
|
-
display: lenient(Schema.String),
|
|
299
|
-
maxReasoningEffort: lenient(Schema.String),
|
|
300
|
-
budgetTokens: lenient(Schema.Number)
|
|
301
|
-
})),
|
|
302
|
-
additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
|
|
303
|
-
anthropic_beta: lenient(Schema.Array(Schema.String)),
|
|
304
|
-
output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
|
|
305
|
-
reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
|
|
306
|
-
}), [Schema.Record(Schema.String, Schema.Unknown)])),
|
|
307
|
-
appName: lenient(Schema.String),
|
|
308
|
-
appUrl: lenient(Schema.String),
|
|
309
|
-
api_keys: lenient(Schema.Record(Schema.String, Schema.String))
|
|
310
|
-
}), [Schema.Record(Schema.String, Schema.Unknown)]);
|
|
311
|
-
var decode = Schema.decodeUnknownSync(Legacy);
|
|
312
|
-
|
|
313
|
-
// src/provider.ts
|
|
314
|
-
import { Event as Event17 } from "@opencode/schema/provider";
|
|
315
|
-
var ID13 = Provider.ID;
|
|
67
|
+
import { Event as Event15 } from "@opencode/schema/provider";
|
|
68
|
+
var ID9 = Provider.ID;
|
|
316
69
|
var AISDK_PREFIX2 = "aisdk:";
|
|
317
70
|
var isAISDK2 = (value) => value?.startsWith(AISDK_PREFIX2) ?? false;
|
|
318
71
|
var aisdk2 = (value) => isAISDK2(value) ? value : `${AISDK_PREFIX2}${value}`;
|
|
@@ -323,12 +76,12 @@ function packageName2(value) {
|
|
|
323
76
|
return value;
|
|
324
77
|
return value.slice(AISDK_PREFIX2.length);
|
|
325
78
|
}
|
|
326
|
-
var JsonRecord =
|
|
327
|
-
var decodeJsonRecord =
|
|
79
|
+
var JsonRecord = Schema.Record(Schema.String, Schema.Json);
|
|
80
|
+
var decodeJsonRecord = Schema.decodeUnknownSync(JsonRecord);
|
|
328
81
|
|
|
329
|
-
class LoadError3 extends
|
|
330
|
-
package:
|
|
331
|
-
cause:
|
|
82
|
+
class LoadError3 extends Schema.TaggedError()("Provider.LoadError", {
|
|
83
|
+
package: Schema.String,
|
|
84
|
+
cause: Schema.Defect()
|
|
332
85
|
}) {
|
|
333
86
|
}
|
|
334
87
|
var packages = new Map;
|
|
@@ -389,12 +142,12 @@ var builtins = new Map([
|
|
|
389
142
|
() => import("@opencode/ai/providers/zai-coding-plan/responses")
|
|
390
143
|
]
|
|
391
144
|
]);
|
|
392
|
-
var loadPackage2 =
|
|
145
|
+
var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
|
|
393
146
|
const specifier = packageName2(input);
|
|
394
147
|
const builtin = builtins.get(specifier);
|
|
395
148
|
if (builtin)
|
|
396
149
|
return yield* importPackage(specifier, specifier, builtin);
|
|
397
|
-
const resolved = yield*
|
|
150
|
+
const resolved = yield* Effect.sync(() => {
|
|
398
151
|
if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
|
|
399
152
|
return specifier;
|
|
400
153
|
try {
|
|
@@ -413,8 +166,8 @@ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
|
|
|
413
166
|
}
|
|
414
167
|
const parts = specifier.split("/");
|
|
415
168
|
const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
|
|
416
|
-
const installed = yield* npm.add(root).pipe(
|
|
417
|
-
const entrypoint = yield*
|
|
169
|
+
const installed = yield* npm.add(root).pipe(Effect.mapError((cause) => new LoadError3({ package: specifier, cause })));
|
|
170
|
+
const entrypoint = yield* Effect.try({
|
|
418
171
|
try: () => resolveModule(specifier, installed.directory),
|
|
419
172
|
catch: (cause) => new LoadError3({ package: specifier, cause })
|
|
420
173
|
});
|
|
@@ -423,10 +176,10 @@ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
|
|
|
423
176
|
var CORE_KEYS = ["chunkTimeout", "compaction", "fetch", "timeout", "transport"];
|
|
424
177
|
var PROVIDER_ONLY_KEYS = ["chunkTimeout", "timeout", "transport"];
|
|
425
178
|
function nativeSettings2(settings) {
|
|
426
|
-
return
|
|
179
|
+
return Struct.omit(settings, CORE_KEYS);
|
|
427
180
|
}
|
|
428
181
|
function modelSettings2(settings) {
|
|
429
|
-
return settings &&
|
|
182
|
+
return settings && Struct.omit(settings, PROVIDER_ONLY_KEYS);
|
|
430
183
|
}
|
|
431
184
|
function mergeOverlay2(base, overlay) {
|
|
432
185
|
if (base === undefined)
|
|
@@ -453,13 +206,13 @@ function mergeHeaders2(base, overlay) {
|
|
|
453
206
|
return result;
|
|
454
207
|
}, new Map).values());
|
|
455
208
|
}
|
|
456
|
-
var
|
|
209
|
+
var Request2 = Provider.Request;
|
|
457
210
|
var Compaction3 = Provider.Compaction;
|
|
458
211
|
var Transport2 = Provider.Transport;
|
|
459
212
|
var Settings2 = Provider.Settings;
|
|
460
|
-
var
|
|
213
|
+
var Info23 = Provider.Info;
|
|
461
214
|
|
|
462
|
-
class
|
|
215
|
+
class Service70 extends Context.Service()("@opencode/Provider") {
|
|
463
216
|
}
|
|
464
217
|
var definitions = new WeakMap;
|
|
465
218
|
function index(providerID, models) {
|
|
@@ -472,9 +225,9 @@ function index(providerID, models) {
|
|
|
472
225
|
definitions.set(models, indexes);
|
|
473
226
|
return result;
|
|
474
227
|
}
|
|
475
|
-
var layer = Layer.effect(
|
|
228
|
+
var layer = Layer.effect(Service70, Effect.gen(function* () {
|
|
476
229
|
const bus = yield* Service83;
|
|
477
|
-
const integrations = yield*
|
|
230
|
+
const integrations = yield* Service71;
|
|
478
231
|
const location = yield* Service80;
|
|
479
232
|
const state = create3({
|
|
480
233
|
name: "provider",
|
|
@@ -486,7 +239,7 @@ var layer = Layer.effect(Service76, Effect2.gen(function* () {
|
|
|
486
239
|
const current = records.get(id);
|
|
487
240
|
if (current)
|
|
488
241
|
return current;
|
|
489
|
-
const added = { provider:
|
|
242
|
+
const added = { provider: Info23.empty(id), models: new Map };
|
|
490
243
|
records.set(id, added);
|
|
491
244
|
maps.add(added.models);
|
|
492
245
|
return added;
|
|
@@ -554,9 +307,9 @@ var layer = Layer.effect(Service76, Effect2.gen(function* () {
|
|
|
554
307
|
},
|
|
555
308
|
notify: () => notify
|
|
556
309
|
});
|
|
557
|
-
yield*
|
|
310
|
+
yield* Effect.addFinalizer(() => shutdown2(state.reload()));
|
|
558
311
|
let cached;
|
|
559
|
-
const snapshot =
|
|
312
|
+
const snapshot = Effect.fn("Provider.snapshot")(function* () {
|
|
560
313
|
while (true) {
|
|
561
314
|
const revision = integrations.revision();
|
|
562
315
|
const records = state.get();
|
|
@@ -567,7 +320,7 @@ var layer = Layer.effect(Service76, Effect2.gen(function* () {
|
|
|
567
320
|
const available = Array.from(records.values()).filter((record) => {
|
|
568
321
|
if (record.provider.activation === "disabled")
|
|
569
322
|
return false;
|
|
570
|
-
const integration = byID.get(record.provider.integrationID ??
|
|
323
|
+
const integration = byID.get(record.provider.integrationID ?? ID10.make(record.provider.id));
|
|
571
324
|
if (record.sourceConnection && key2(record.sourceConnection) !== key2(integration?.connections[0]))
|
|
572
325
|
return false;
|
|
573
326
|
if (record.provider.activation === "enabled")
|
|
@@ -584,7 +337,7 @@ var layer = Layer.effect(Service76, Effect2.gen(function* () {
|
|
|
584
337
|
}
|
|
585
338
|
});
|
|
586
339
|
let published;
|
|
587
|
-
const notify =
|
|
340
|
+
const notify = Effect.gen(function* () {
|
|
588
341
|
const value = yield* snapshot();
|
|
589
342
|
if (value === published)
|
|
590
343
|
return;
|
|
@@ -593,19 +346,19 @@ var layer = Layer.effect(Service76, Effect2.gen(function* () {
|
|
|
593
346
|
location: { directory: location.directory, workspaceID: location.workspaceID }
|
|
594
347
|
});
|
|
595
348
|
});
|
|
596
|
-
yield* bus.subscribe([
|
|
597
|
-
return
|
|
349
|
+
yield* bus.subscribe([Event16.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect.forkScoped({ startImmediately: true }));
|
|
350
|
+
return Service70.of({
|
|
598
351
|
transform: state.transform,
|
|
599
352
|
reload: state.reload,
|
|
600
|
-
get:
|
|
601
|
-
all:
|
|
602
|
-
available:
|
|
353
|
+
get: Effect.fn("Provider.get")((id) => Effect.sync(() => freeze(state.get().get(id)?.provider, true))),
|
|
354
|
+
all: Effect.fn("Provider.all")(() => Effect.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
|
|
355
|
+
available: Effect.fn("Provider.available")(() => snapshot().pipe(Effect.map((value) => value.providers))),
|
|
603
356
|
snapshot
|
|
604
357
|
});
|
|
605
358
|
}));
|
|
606
|
-
var
|
|
607
|
-
var importPackage =
|
|
608
|
-
const module = yield*
|
|
359
|
+
var node74 = makeLocationNode({ service: Service70, layer, deps: [node87, node75, node84] });
|
|
360
|
+
var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
|
|
361
|
+
const module = yield* Effect.tryPromise({
|
|
609
362
|
try: () => {
|
|
610
363
|
const existing = packages.get(entrypoint);
|
|
611
364
|
if (existing)
|
|
@@ -625,4 +378,251 @@ var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, e
|
|
|
625
378
|
return module;
|
|
626
379
|
});
|
|
627
380
|
|
|
628
|
-
|
|
381
|
+
// src/aisdk-native.ts
|
|
382
|
+
function rewrite2(target, input) {
|
|
383
|
+
if (input.specifier === undefined)
|
|
384
|
+
return;
|
|
385
|
+
const plain = resolve(input.specifier, input);
|
|
386
|
+
if (!plain)
|
|
387
|
+
return;
|
|
388
|
+
const settings = decode(target.settings ?? {});
|
|
389
|
+
const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
|
|
390
|
+
const translated = options(replacement, input.modelID, settings);
|
|
391
|
+
if (target.package !== undefined || replacement !== input.specifier)
|
|
392
|
+
target.package = replacement;
|
|
393
|
+
target.settings = target.settings === undefined ? undefined : {
|
|
394
|
+
...translated.settings,
|
|
395
|
+
...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
|
|
396
|
+
};
|
|
397
|
+
target.headers = mergeHeaders2(translated.headers, target.headers);
|
|
398
|
+
target.body = mergeOverlay2(translated.body, target.body);
|
|
399
|
+
target.variants = target.variants?.map((variant) => {
|
|
400
|
+
const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
|
|
401
|
+
const headers = mergeHeaders2(overlay.headers, variant.headers);
|
|
402
|
+
const body = mergeOverlay2(overlay.body, variant.body);
|
|
403
|
+
return {
|
|
404
|
+
id: variant.id,
|
|
405
|
+
...variant.settings === undefined ? {} : { settings: overlay.settings },
|
|
406
|
+
...headers === undefined ? {} : { headers },
|
|
407
|
+
...body === undefined ? {} : { body }
|
|
408
|
+
};
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
var PACKAGES = {
|
|
412
|
+
"@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
|
|
413
|
+
"@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
|
|
414
|
+
"@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
|
|
415
|
+
"@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
|
|
416
|
+
"@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
|
|
417
|
+
"@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
|
|
418
|
+
"@ai-sdk/google": "@opencode/ai/providers/google",
|
|
419
|
+
"@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
|
|
420
|
+
"@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
|
|
421
|
+
"@ai-sdk/groq": "@opencode/ai/providers/groq",
|
|
422
|
+
"@ai-sdk/mistral": "@opencode/ai/providers/mistral",
|
|
423
|
+
"@ai-sdk/openai": "@opencode/ai/providers/openai",
|
|
424
|
+
"@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
|
|
425
|
+
"@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
|
|
426
|
+
"@ai-sdk/xai": "@opencode/ai/providers/xai",
|
|
427
|
+
"@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
|
|
428
|
+
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
|
|
429
|
+
};
|
|
430
|
+
var protocols = (name) => ({
|
|
431
|
+
"@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
|
|
432
|
+
"@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
|
|
433
|
+
"@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
|
|
434
|
+
});
|
|
435
|
+
var HOSTS = {
|
|
436
|
+
alibaba: protocols("alibaba"),
|
|
437
|
+
"alibaba-cn": protocols("alibaba"),
|
|
438
|
+
"alibaba-coding-plan": protocols("alibaba"),
|
|
439
|
+
"alibaba-coding-plan-cn": protocols("alibaba"),
|
|
440
|
+
"alibaba-token-plan": protocols("alibaba"),
|
|
441
|
+
"alibaba-token-plan-cn": protocols("alibaba"),
|
|
442
|
+
baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
|
|
443
|
+
"cloudflare-ai-gateway": {
|
|
444
|
+
"@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
445
|
+
"@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
446
|
+
"@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
447
|
+
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
|
|
448
|
+
},
|
|
449
|
+
"cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
|
|
450
|
+
deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
|
|
451
|
+
"fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
|
|
452
|
+
"google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
|
|
453
|
+
"kimi-for-coding": protocols("moonshot"),
|
|
454
|
+
meta: protocols("meta"),
|
|
455
|
+
minimax: protocols("minimax"),
|
|
456
|
+
"minimax-cn": protocols("minimax"),
|
|
457
|
+
"minimax-coding-plan": protocols("minimax"),
|
|
458
|
+
"minimax-cn-coding-plan": protocols("minimax"),
|
|
459
|
+
moonshotai: protocols("moonshot"),
|
|
460
|
+
"moonshotai-cn": protocols("moonshot"),
|
|
461
|
+
zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
462
|
+
"zai-coding-plan": protocols("zai-coding-plan"),
|
|
463
|
+
zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
464
|
+
"zhipuai-coding-plan": protocols("zai-coding-plan")
|
|
465
|
+
};
|
|
466
|
+
var NATIVE = new Set([
|
|
467
|
+
...Object.values(PACKAGES),
|
|
468
|
+
...Object.values(HOSTS).flatMap((host) => Object.values(host)),
|
|
469
|
+
"@opencode/ai/providers/azure/chat",
|
|
470
|
+
"@opencode/ai/providers/amazon-bedrock/mantle",
|
|
471
|
+
"@opencode/ai/providers/amazon-bedrock/mantle/chat",
|
|
472
|
+
"@opencode/ai/providers/amazon-bedrock/mantle/responses"
|
|
473
|
+
]);
|
|
474
|
+
function native2(npm, context) {
|
|
475
|
+
const host = HOSTS[context.providerID]?.[npm];
|
|
476
|
+
if (host)
|
|
477
|
+
return host;
|
|
478
|
+
if (npm === "@ai-sdk/amazon-bedrock/mantle")
|
|
479
|
+
return mantle(context.modelID);
|
|
480
|
+
if (npm === "@ai-sdk/azure" && context.settings?.useCompletionUrls === true)
|
|
481
|
+
return "@opencode/ai/providers/azure/chat";
|
|
482
|
+
return PACKAGES[npm];
|
|
483
|
+
}
|
|
484
|
+
var mantle = (modelID) => {
|
|
485
|
+
if (modelID === undefined)
|
|
486
|
+
return "@opencode/ai/providers/amazon-bedrock/mantle";
|
|
487
|
+
return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
|
|
488
|
+
};
|
|
489
|
+
function resolve(specifier, context) {
|
|
490
|
+
const npm = packageName2(specifier);
|
|
491
|
+
if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
|
|
492
|
+
return native2(npm, context);
|
|
493
|
+
if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
|
|
494
|
+
return mantle(context.modelID);
|
|
495
|
+
if (npm === "@opencode/ai/providers/azure/responses" && context.settings?.useCompletionUrls === true)
|
|
496
|
+
return "@opencode/ai/providers/azure/chat";
|
|
497
|
+
return NATIVE.has(npm) ? npm : undefined;
|
|
498
|
+
}
|
|
499
|
+
function options(replacement, modelID, settings) {
|
|
500
|
+
const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
|
|
501
|
+
const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
|
|
502
|
+
const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
|
|
503
|
+
return {
|
|
504
|
+
settings: {
|
|
505
|
+
...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
|
|
506
|
+
...thinking === undefined ? {} : { thinking }
|
|
507
|
+
},
|
|
508
|
+
...settings.headers === undefined ? {} : { headers: settings.headers },
|
|
509
|
+
...settings.extraBody === undefined ? {} : { body: settings.extraBody },
|
|
510
|
+
...converse ? bedrockRequest(modelID, settings) : {},
|
|
511
|
+
...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
var BEDROCK_KEYS = [
|
|
515
|
+
"bearerToken",
|
|
516
|
+
"endpoint",
|
|
517
|
+
"credentials",
|
|
518
|
+
"credentialProvider",
|
|
519
|
+
"accessKeyId",
|
|
520
|
+
"secretAccessKey",
|
|
521
|
+
"sessionToken"
|
|
522
|
+
];
|
|
523
|
+
var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
|
|
524
|
+
function bedrockSettings(settings, converse) {
|
|
525
|
+
const region = settings.region ?? settings.credentials?.region;
|
|
526
|
+
const credentials = settings.credentials ?? settings;
|
|
527
|
+
const baseURL = settings.baseURL ?? settings.endpoint;
|
|
528
|
+
return {
|
|
529
|
+
...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
|
|
530
|
+
...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
|
|
531
|
+
...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
|
|
532
|
+
...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
|
|
533
|
+
credentials: {
|
|
534
|
+
...region === undefined ? {} : { region },
|
|
535
|
+
accessKeyId: credentials.accessKeyId,
|
|
536
|
+
secretAccessKey: credentials.secretAccessKey,
|
|
537
|
+
...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
function bedrockThinking(modelID, settings) {
|
|
543
|
+
const reasoning = settings.reasoningConfig;
|
|
544
|
+
if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
|
|
545
|
+
return;
|
|
546
|
+
return { type: "enabled", budgetTokens: reasoning.budgetTokens };
|
|
547
|
+
}
|
|
548
|
+
function bedrockRequest(modelID, settings) {
|
|
549
|
+
const additional = settings.additionalModelRequestFields ?? {};
|
|
550
|
+
const reasoning = settings.reasoningConfig;
|
|
551
|
+
const anthropic = modelID?.includes("anthropic") ?? false;
|
|
552
|
+
const openai = modelID?.includes("openai.") ?? false;
|
|
553
|
+
const harmony = modelID?.includes("openai.gpt-oss") ?? false;
|
|
554
|
+
const effort = reasoning?.maxReasoningEffort;
|
|
555
|
+
const type = reasoning?.type;
|
|
556
|
+
const budget = reasoning?.budgetTokens;
|
|
557
|
+
const display = reasoning?.display;
|
|
558
|
+
const betas = settings.anthropicBeta ?? [];
|
|
559
|
+
const fields = mergeOverlay2(additional, {
|
|
560
|
+
...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
|
|
561
|
+
...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
|
|
562
|
+
...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
|
|
563
|
+
...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
|
|
564
|
+
...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
|
|
565
|
+
...!anthropic && !openai && effort !== undefined ? {
|
|
566
|
+
reasoningConfig: {
|
|
567
|
+
...type === undefined || type === "adaptive" ? {} : { type },
|
|
568
|
+
...budget === undefined ? {} : { budgetTokens: budget },
|
|
569
|
+
maxReasoningEffort: effort
|
|
570
|
+
}
|
|
571
|
+
} : {}
|
|
572
|
+
});
|
|
573
|
+
const body = {
|
|
574
|
+
...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
|
|
575
|
+
...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
|
|
576
|
+
};
|
|
577
|
+
return Object.keys(body).length === 0 ? {} : { body };
|
|
578
|
+
}
|
|
579
|
+
var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
|
|
580
|
+
function openRouterRequest(settings) {
|
|
581
|
+
const headers = mergeHeaders2({
|
|
582
|
+
...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
|
|
583
|
+
...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
|
|
584
|
+
...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
|
|
585
|
+
}, settings.headers) ?? {};
|
|
586
|
+
return Object.keys(headers).length === 0 ? {} : { headers };
|
|
587
|
+
}
|
|
588
|
+
var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option.some(undefined)))));
|
|
589
|
+
var Credentials = Schema2.Struct({
|
|
590
|
+
accessKeyId: Schema2.String,
|
|
591
|
+
secretAccessKey: Schema2.String,
|
|
592
|
+
sessionToken: lenient(Schema2.String),
|
|
593
|
+
region: lenient(Schema2.String)
|
|
594
|
+
});
|
|
595
|
+
var Legacy = Schema2.StructWithRest(Schema2.Struct({
|
|
596
|
+
apiKey: lenient(Schema2.String),
|
|
597
|
+
baseURL: lenient(Schema2.String),
|
|
598
|
+
headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
|
|
599
|
+
extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
|
|
600
|
+
useCompletionUrls: lenient(Schema2.Boolean),
|
|
601
|
+
auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
|
|
602
|
+
bearerToken: lenient(Schema2.String),
|
|
603
|
+
endpoint: lenient(Schema2.String),
|
|
604
|
+
region: lenient(Schema2.String),
|
|
605
|
+
credentials: lenient(Credentials),
|
|
606
|
+
accessKeyId: lenient(Schema2.String),
|
|
607
|
+
secretAccessKey: lenient(Schema2.String),
|
|
608
|
+
sessionToken: lenient(Schema2.String),
|
|
609
|
+
anthropicBeta: lenient(Schema2.Array(Schema2.String)),
|
|
610
|
+
serviceTier: lenient(Schema2.String),
|
|
611
|
+
reasoningConfig: lenient(Schema2.Struct({
|
|
612
|
+
type: lenient(Schema2.String),
|
|
613
|
+
display: lenient(Schema2.String),
|
|
614
|
+
maxReasoningEffort: lenient(Schema2.String),
|
|
615
|
+
budgetTokens: lenient(Schema2.Number)
|
|
616
|
+
})),
|
|
617
|
+
additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
|
|
618
|
+
anthropic_beta: lenient(Schema2.Array(Schema2.String)),
|
|
619
|
+
output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
|
|
620
|
+
reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
|
|
621
|
+
}), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
|
|
622
|
+
appName: lenient(Schema2.String),
|
|
623
|
+
appUrl: lenient(Schema2.String),
|
|
624
|
+
api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
|
|
625
|
+
}), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
|
|
626
|
+
var decode = Schema2.decodeUnknownSync(Legacy);
|
|
627
|
+
|
|
628
|
+
export { rewrite2, native2, exports_aisdk_native, ID9, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, mergeOverlay2, mergeHeaders2, Request2, Compaction3, Transport2, Settings2, Info23, Service70, node74, exports_provider3, Event15 };
|