@opencode/core 0.0.0-dev-21289 → 0.0.0-dev-21296
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 +83 -83
- package/dist/aisdk-native.js +91 -91
- package/dist/aisdk.js +96 -96
- package/dist/app.js +9 -9
- package/dist/bus.js +75 -75
- package/dist/chunks/{model-retry-n6sdcjf7.js → aisdk-native-004eaj6n.js} +43 -43
- package/dist/chunks/{model-retry-8npnpzra.js → aisdk-native-0c1e5scv.js} +3 -3
- package/dist/chunks/{model-retry-m0z9j2xs.js → aisdk-native-0jqv4wmc.js} +37 -37
- package/dist/chunks/{model-retry-m4gqpe3z.js → aisdk-native-0scb3md8.js} +13 -13
- package/dist/chunks/{model-retry-0vbcp93d.js → aisdk-native-0vbcp93d.js} +2 -2
- package/dist/chunks/{model-retry-e3jwh7ys.js → aisdk-native-0wd36ghc.js} +4 -4
- package/dist/chunks/{model-retry-892mrmp0.js → aisdk-native-0xezjjjn.js} +8 -8
- package/dist/chunks/{model-retry-7fccas0j.js → aisdk-native-17ajdbzk.js} +34 -34
- package/dist/chunks/{model-retry-jv6mm5r1.js → aisdk-native-19gt07c1.js} +11 -11
- package/dist/chunks/{model-retry-gxfsy275.js → aisdk-native-1g2gcyj5.js} +1 -1
- package/dist/chunks/{model-retry-bhey597w.js → aisdk-native-1q9mn8hp.js} +23 -23
- package/dist/chunks/{model-retry-ktbcyka7.js → aisdk-native-1th8yvsq.js} +4 -4
- package/dist/chunks/{model-retry-fw7x2wjw.js → aisdk-native-1z82t5n0.js} +6 -6
- package/dist/chunks/{model-retry-1ze9gtzp.js → aisdk-native-1ze9gtzp.js} +4 -4
- package/dist/chunks/{model-retry-zkkxzzm7.js → aisdk-native-2087xn0w.js} +15 -15
- package/dist/chunks/{model-retry-rkmhvsr4.js → aisdk-native-2098emdn.js} +30 -30
- package/dist/chunks/{model-retry-re80xzqk.js → aisdk-native-24vq2c21.js} +35 -35
- package/dist/chunks/{model-retry-fwgra7yh.js → aisdk-native-2e7kk2bz.js} +8 -8
- package/dist/chunks/{model-retry-7dqw4kz8.js → aisdk-native-2k8khapm.js} +5 -5
- package/dist/chunks/{model-retry-xagp7a1s.js → aisdk-native-349kc19m.js} +18 -18
- package/dist/chunks/{model-retry-s3j5qb0t.js → aisdk-native-34anad20.js} +18 -18
- package/dist/chunks/{model-retry-hadpnrkv.js → aisdk-native-37jxr4m7.js} +27 -27
- package/dist/chunks/{model-retry-k6jeefta.js → aisdk-native-3fzs49xt.js} +3 -3
- package/dist/chunks/{model-retry-3hepkmqq.js → aisdk-native-3hepkmqq.js} +1 -1
- package/dist/chunks/{model-retry-3hwn7j4h.js → aisdk-native-3hwn7j4h.js} +2 -2
- package/dist/chunks/{model-retry-r0ena7ce.js → aisdk-native-3qa76a24.js} +25 -25
- package/dist/chunks/{model-retry-73wqhfdm.js → aisdk-native-3qrzxmvj.js} +9 -9
- package/dist/chunks/{model-retry-cv3t9aez.js → aisdk-native-3rg3ay0p.js} +9 -9
- package/dist/chunks/{model-retry-2k0hjz8m.js → aisdk-native-3sc131mt.js} +4 -4
- package/dist/chunks/{model-retry-3smtnn6g.js → aisdk-native-3smtnn6g.js} +1 -1
- package/dist/chunks/{model-retry-3tvqynh2.js → aisdk-native-3tvqynh2.js} +1 -1
- package/dist/chunks/{model-retry-qj8x2vxm.js → aisdk-native-3w4y5t9t.js} +11 -11
- package/dist/chunks/{model-retry-3zsf4n22.js → aisdk-native-3zsf4n22.js} +1 -1
- package/dist/chunks/{model-retry-7sp0jpsz.js → aisdk-native-409scgpf.js} +7 -7
- package/dist/chunks/{model-retry-wn671ba5.js → aisdk-native-40kx92kj.js} +77 -77
- package/dist/chunks/{model-retry-yxx1qbg8.js → aisdk-native-41x0g12r.js} +6 -6
- package/dist/chunks/{model-retry-xjt2m7da.js → aisdk-native-4bf1vt5e.js} +6 -6
- package/dist/chunks/{model-retry-461nxmbv.js → aisdk-native-4ekscj25.js} +5 -5
- package/dist/chunks/{model-retry-t39p8j64.js → aisdk-native-4gr0t1kf.js} +13 -13
- package/dist/chunks/{model-retry-vdetfpsp.js → aisdk-native-4pjp27mg.js} +28 -28
- package/dist/chunks/{model-retry-99wvww9h.js → aisdk-native-53hfdb6m.js} +21 -21
- package/dist/chunks/{model-retry-xe38j9wy.js → aisdk-native-53n3eh82.js} +25 -25
- package/dist/chunks/{model-retry-54ma36ye.js → aisdk-native-54ma36ye.js} +1 -1
- package/dist/chunks/{model-retry-cnn1wj5a.js → aisdk-native-5dv05ep0.js} +26 -26
- package/dist/chunks/{model-retry-gebtr55s.js → aisdk-native-5e15319b.js} +5 -5
- package/dist/chunks/{model-retry-c4zg4w5q.js → aisdk-native-5ghj4hqh.js} +17 -17
- package/dist/chunks/{model-retry-5m9w47nd.js → aisdk-native-5m9w47nd.js} +1 -1
- package/dist/chunks/{model-retry-e3qxr5gk.js → aisdk-native-5qd3pb7m.js} +2 -2
- package/dist/chunks/{model-retry-fqqv62af.js → aisdk-native-5vscj5fh.js} +16 -16
- package/dist/chunks/{model-retry-km5jseh3.js → aisdk-native-5zdfhw0y.js} +27 -27
- package/dist/chunks/aisdk-native-60hy51x2.js +257 -0
- package/dist/chunks/{model-retry-a5mx5mz2.js → aisdk-native-65x6c591.js} +2 -2
- package/dist/chunks/{model-retry-ef28kdsf.js → aisdk-native-66jvax92.js} +11 -11
- package/dist/chunks/{model-retry-6827pfxn.js → aisdk-native-6827pfxn.js} +1 -1
- package/dist/chunks/{model-retry-yvvvp4gn.js → aisdk-native-69j91c1q.js} +8 -8
- package/dist/chunks/{model-retry-61pea42y.js → aisdk-native-6ab1jen0.js} +8 -8
- package/dist/chunks/{model-retry-4psrcf1w.js → aisdk-native-6ebgrc3y.js} +4 -4
- package/dist/chunks/{model-retry-1p07q0wb.js → aisdk-native-6pc27hjz.js} +8 -8
- package/dist/chunks/{model-retry-v7z2bvyd.js → aisdk-native-6t4hr8r6.js} +4 -4
- package/dist/chunks/{model-retry-6xb47vfp.js → aisdk-native-6xb47vfp.js} +1 -1
- package/dist/chunks/{model-retry-j8jw8bvb.js → aisdk-native-756c2e5g.js} +21 -21
- package/dist/chunks/{model-retry-775gj3j1.js → aisdk-native-775gj3j1.js} +2 -2
- package/dist/chunks/{model-retry-7bmhse3q.js → aisdk-native-7bmhse3q.js} +1 -1
- package/dist/chunks/{model-retry-vjtn814f.js → aisdk-native-7gw5bh7d.js} +19 -19
- package/dist/chunks/{model-retry-jq37yr04.js → aisdk-native-7karjvyy.js} +9 -9
- package/dist/chunks/{model-retry-b27vhd2z.js → aisdk-native-7sbkp4xb.js} +4 -4
- package/dist/chunks/{model-retry-f1kd18ve.js → aisdk-native-7vt3v0c3.js} +4 -4
- package/dist/chunks/{model-retry-mcgfs8g2.js → aisdk-native-7xhhckav.js} +11 -11
- package/dist/chunks/{model-retry-5ze9zbmh.js → aisdk-native-7xqwmsh4.js} +10 -10
- package/dist/chunks/{model-retry-84txncab.js → aisdk-native-84txncab.js} +1 -1
- package/dist/chunks/{model-retry-3hskxyfj.js → aisdk-native-8b1csnkw.js} +14 -14
- package/dist/chunks/{model-retry-vjh35t9b.js → aisdk-native-8e5ng5z0.js} +16 -16
- package/dist/chunks/{model-retry-fqyqba4e.js → aisdk-native-8esrbvwc.js} +14 -14
- package/dist/chunks/{model-retry-8m6m0r52.js → aisdk-native-8m6m0r52.js} +1 -1
- package/dist/chunks/{model-retry-8mywswrd.js → aisdk-native-8mywswrd.js} +1 -1
- package/dist/chunks/{model-retry-an6q6vkd.js → aisdk-native-8n5bt5nm.js} +23 -23
- package/dist/chunks/{model-retry-t01qgdv4.js → aisdk-native-8wy7662d.js} +17 -17
- package/dist/chunks/{model-retry-02w8hjv9.js → aisdk-native-8x5rkv0h.js} +11 -11
- package/dist/chunks/{model-retry-ydma693n.js → aisdk-native-8yj6gt86.js} +19 -19
- package/dist/chunks/{model-retry-m3vs2jhj.js → aisdk-native-8zzeef0r.js} +13 -13
- package/dist/chunks/{model-retry-ebs8qv75.js → aisdk-native-937m0y5f.js} +10 -10
- package/dist/chunks/{model-retry-fxjva6qe.js → aisdk-native-9487wnr3.js} +3 -3
- package/dist/chunks/{model-retry-3tnvd6qs.js → aisdk-native-95yg8akc.js} +21 -21
- package/dist/chunks/{model-retry-0bw8y30e.js → aisdk-native-96vvhf26.js} +51 -51
- package/dist/chunks/{model-retry-y3qxx51z.js → aisdk-native-9723mvds.js} +12 -12
- package/dist/chunks/{model-retry-3dt4tzwg.js → aisdk-native-9bh5q6pj.js} +2 -2
- package/dist/chunks/aisdk-native-9dv7jab0.js +517 -0
- package/dist/chunks/{model-retry-hc9hnsc9.js → aisdk-native-9ganr053.js} +14 -14
- package/dist/chunks/{model-retry-6xymw6hf.js → aisdk-native-9ham2w87.js} +14 -14
- package/dist/chunks/{model-retry-wcgsvnj5.js → aisdk-native-9jphx3mb.js} +8 -8
- package/dist/chunks/{model-retry-gx4mz6q7.js → aisdk-native-a0dwc44h.js} +51 -51
- package/dist/chunks/{model-retry-7v6vae4w.js → aisdk-native-a20pjse5.js} +3 -3
- package/dist/chunks/{model-retry-9pf7je19.js → aisdk-native-a2vq6s7f.js} +3 -3
- package/dist/chunks/{model-retry-hj389172.js → aisdk-native-a3bsrsd6.js} +1 -1
- package/dist/chunks/{model-retry-h6n0e19c.js → aisdk-native-a50454pt.js} +97 -97
- package/dist/chunks/{model-retry-cbrfz1mf.js → aisdk-native-ab3hvh4n.js} +304 -304
- package/dist/chunks/{model-retry-snxa7hz3.js → aisdk-native-ae2bqj1x.js} +5 -5
- package/dist/chunks/{model-retry-c77dabg0.js → aisdk-native-ahga06gf.js} +13 -13
- package/dist/chunks/{model-retry-27dhaw8v.js → aisdk-native-asjjsc90.js} +48 -48
- package/dist/chunks/{model-retry-a1hr7aq8.js → aisdk-native-avj3yf7v.js} +3 -3
- package/dist/chunks/{model-retry-7jdsj2a9.js → aisdk-native-axe3mf62.js} +3 -3
- package/dist/chunks/{model-retry-mhgn79e1.js → aisdk-native-azmw4fcy.js} +52 -52
- package/dist/chunks/{model-retry-e4m4ah41.js → aisdk-native-b1yzqvdj.js} +31 -31
- package/dist/chunks/{model-retry-7etyqpkv.js → aisdk-native-bc1xqbpd.js} +7 -7
- package/dist/chunks/{model-retry-b2zbab51.js → aisdk-native-brek2qp6.js} +9 -9
- package/dist/chunks/{model-retry-bzeyqsqd.js → aisdk-native-bzeyqsqd.js} +1 -1
- package/dist/chunks/{model-retry-c1fqxshp.js → aisdk-native-c1fqxshp.js} +3 -3
- package/dist/chunks/{model-retry-7pg7e456.js → aisdk-native-c5ggqzvz.js} +12 -12
- package/dist/chunks/{model-retry-ft3hqk2c.js → aisdk-native-c765mh8b.js} +9 -9
- package/dist/chunks/{model-retry-v91zw3m9.js → aisdk-native-cvjsq3wy.js} +14 -14
- package/dist/chunks/{model-retry-kzqw00rs.js → aisdk-native-dgm2qr8a.js} +16 -16
- package/dist/chunks/{model-retry-b724djfs.js → aisdk-native-dm07sh71.js} +18 -18
- package/dist/chunks/{model-retry-sz6fjq3m.js → aisdk-native-dpqarmsa.js} +5 -5
- package/dist/chunks/{model-retry-25yddszk.js → aisdk-native-dq407baf.js} +6 -6
- package/dist/chunks/{model-retry-qv0gwb50.js → aisdk-native-dqs3mz6s.js} +26 -26
- package/dist/chunks/{model-retry-57b9ws8p.js → aisdk-native-drwq78ky.js} +5 -5
- package/dist/chunks/{model-retry-dxqvx2bd.js → aisdk-native-dted5cxw.js} +25 -25
- package/dist/chunks/{model-retry-v15gsnts.js → aisdk-native-dtkq61nx.js} +50 -50
- package/dist/chunks/{model-retry-q7gr6qfd.js → aisdk-native-dw4a8ax5.js} +22 -22
- package/dist/chunks/{model-retry-frsszzbj.js → aisdk-native-dwc12cgc.js} +14 -14
- package/dist/chunks/{model-retry-xhhxc1wd.js → aisdk-native-dyvax4f1.js} +3 -3
- package/dist/chunks/{model-retry-wj5d0sg5.js → aisdk-native-e7qbyzsc.js} +23 -23
- package/dist/chunks/{model-retry-nma959mg.js → aisdk-native-e80seqcp.js} +3 -3
- package/dist/chunks/{model-retry-eej6y6fw.js → aisdk-native-eej6y6fw.js} +2 -2
- package/dist/chunks/{model-retry-ef5x83kb.js → aisdk-native-ef5x83kb.js} +1 -1
- package/dist/chunks/{model-retry-2g47h04h.js → aisdk-native-eh24tkg1.js} +29 -29
- package/dist/chunks/{model-retry-wksg1me0.js → aisdk-native-ehb6zgzn.js} +22 -22
- package/dist/chunks/{model-retry-yg89wztc.js → aisdk-native-es0z8ca2.js} +11 -11
- package/dist/chunks/{model-retry-gchapswt.js → aisdk-native-etf771kz.js} +8 -8
- package/dist/chunks/{model-retry-0wcqedam.js → aisdk-native-evvzn8t1.js} +36 -36
- package/dist/chunks/{model-retry-heq5p5e1.js → aisdk-native-f5pe91sd.js} +4 -4
- package/dist/chunks/{model-retry-197b73fz.js → aisdk-native-f74fvsr6.js} +44 -44
- package/dist/chunks/{model-retry-3htr7rzc.js → aisdk-native-fc146j8e.js} +23 -23
- package/dist/chunks/{model-retry-fcy631f0.js → aisdk-native-fcy631f0.js} +1 -1
- package/dist/chunks/{model-retry-bxqk5pf5.js → aisdk-native-g686f6pq.js} +9 -9
- package/dist/chunks/{model-retry-kvpdra3r.js → aisdk-native-gb6t5evv.js} +25 -25
- package/dist/chunks/{model-retry-dxt0ht33.js → aisdk-native-gcykmc2m.js} +20 -20
- package/dist/chunks/{model-retry-gd4qta3r.js → aisdk-native-gd4qta3r.js} +1 -1
- package/dist/chunks/{model-retry-qq7kxqk9.js → aisdk-native-gfa47pmv.js} +50 -50
- package/dist/chunks/{model-retry-qne3fa44.js → aisdk-native-gj71zhbs.js} +5 -5
- package/dist/chunks/{model-retry-9amv0j2y.js → aisdk-native-gqsra0s5.js} +9 -9
- package/dist/chunks/{model-retry-h6vf3j39.js → aisdk-native-h6vf3j39.js} +1 -1
- package/dist/chunks/{model-retry-z2qvtray.js → aisdk-native-haw017sp.js} +8 -8
- package/dist/chunks/{model-retry-b4ytdsdb.js → aisdk-native-hcv80w8f.js} +11 -11
- package/dist/chunks/{model-retry-93x8jgcz.js → aisdk-native-hetzgjah.js} +36 -36
- package/dist/chunks/{model-retry-pm9cq2zg.js → aisdk-native-hewty47s.js} +35 -35
- package/dist/chunks/{model-retry-hgz4x7wa.js → aisdk-native-hgz4x7wa.js} +1 -1
- package/dist/chunks/{model-retry-s56kzkqb.js → aisdk-native-hh4seyf6.js} +24 -24
- package/dist/chunks/{model-retry-eaz4frst.js → aisdk-native-hmpfctkq.js} +8 -8
- package/dist/chunks/{model-retry-pfzgmgqq.js → aisdk-native-hmvdm1nr.js} +30 -30
- package/dist/chunks/{model-retry-prx1gbh0.js → aisdk-native-hphtwhrw.js} +5 -5
- package/dist/chunks/{model-retry-0cbhyycw.js → aisdk-native-hyhyyj61.js} +17 -17
- package/dist/chunks/{model-retry-5fxpne0w.js → aisdk-native-j0ay6bhg.js} +2 -2
- package/dist/chunks/{model-retry-1th0nyd1.js → aisdk-native-j7tanhw5.js} +23 -23
- package/dist/chunks/{model-retry-4dwf0nmp.js → aisdk-native-j8wfa5vk.js} +13 -13
- package/dist/chunks/{model-retry-bkb01ez0.js → aisdk-native-jgp073vv.js} +45 -45
- package/dist/chunks/{model-retry-k2gfd0vj.js → aisdk-native-jh8env4y.js} +13 -13
- package/dist/chunks/{model-retry-9p4ckb4p.js → aisdk-native-jjd2yye4.js} +6 -6
- package/dist/chunks/{model-retry-8yaq5rsp.js → aisdk-native-jzy793vj.js} +32 -32
- package/dist/chunks/{model-retry-paykg90t.js → aisdk-native-k13rpznb.js} +34 -34
- package/dist/chunks/{model-retry-3pw8htx8.js → aisdk-native-kdbcdm2p.js} +1 -1
- package/dist/chunks/{model-retry-khmqacep.js → aisdk-native-khmqacep.js} +1 -1
- package/dist/chunks/{model-retry-kwb1v3vj.js → aisdk-native-kwb1v3vj.js} +1 -1
- package/dist/chunks/{model-retry-m9w0rfyh.js → aisdk-native-m9w0rfyh.js} +1 -1
- package/dist/chunks/{model-retry-maspj1v3.js → aisdk-native-maspj1v3.js} +1 -1
- package/dist/chunks/{model-retry-ffptefkn.js → aisdk-native-meeeyptt.js} +50 -50
- package/dist/chunks/{model-retry-m6pj9s11.js → aisdk-native-mey7zhp8.js} +5 -5
- package/dist/chunks/{model-retry-wxrr62q2.js → aisdk-native-mg9wc1ev.js} +11 -11
- package/dist/chunks/{model-retry-gysb7t93.js → aisdk-native-mmb750pd.js} +91 -91
- package/dist/chunks/{model-retry-315ef24x.js → aisdk-native-mt906k1j.js} +8 -8
- package/dist/chunks/{model-retry-cccr210v.js → aisdk-native-mwn18k12.js} +35 -35
- package/dist/chunks/{model-retry-ftfbzs9m.js → aisdk-native-n1p81jna.js} +19 -19
- package/dist/chunks/{model-retry-scbxxt86.js → aisdk-native-nc721mq8.js} +21 -21
- package/dist/chunks/{model-retry-120g7207.js → aisdk-native-nckm1509.js} +2 -2
- package/dist/chunks/{model-retry-jcjcjx0t.js → aisdk-native-nesm380x.js} +12 -12
- package/dist/chunks/{model-retry-dvwsp6mb.js → aisdk-native-nkfb0x16.js} +2 -2
- package/dist/chunks/{model-retry-q8wdfhzq.js → aisdk-native-nx9gpye3.js} +12 -12
- package/dist/chunks/{model-retry-nz56sr1f.js → aisdk-native-nz56sr1f.js} +2 -2
- package/dist/chunks/{model-retry-2xr9pws4.js → aisdk-native-p139kb1p.js} +13 -13
- package/dist/chunks/{model-retry-f82ss59t.js → aisdk-native-p1rw895a.js} +3 -3
- package/dist/chunks/{model-retry-9hn6k4tm.js → aisdk-native-p42hj8p8.js} +8 -8
- package/dist/chunks/{model-retry-grv8yzns.js → aisdk-native-p5dx8j25.js} +36 -36
- package/dist/chunks/{model-retry-sh9986p4.js → aisdk-native-p7kjzj47.js} +16 -16
- package/dist/chunks/{model-retry-s0s52qkt.js → aisdk-native-pd5d6pm6.js} +15 -15
- package/dist/chunks/{model-retry-tebr7jg9.js → aisdk-native-pfavk0gx.js} +12 -12
- package/dist/chunks/{model-retry-fc3q91nw.js → aisdk-native-pgeyzwhg.js} +42 -42
- package/dist/chunks/{model-retry-pjvnvgmy.js → aisdk-native-pjvnvgmy.js} +1 -1
- package/dist/chunks/{model-retry-6xsr5dks.js → aisdk-native-pk4wa1v7.js} +33 -33
- package/dist/chunks/{model-retry-ekp1j1b5.js → aisdk-native-pk6da7aj.js} +18 -18
- package/dist/chunks/{model-retry-pknna89w.js → aisdk-native-pknna89w.js} +1 -1
- package/dist/chunks/{model-retry-h896pcm5.js → aisdk-native-prmgem5b.js} +6 -6
- package/dist/chunks/{model-retry-v8chhsy3.js → aisdk-native-py3bbhv5.js} +11 -11
- package/dist/chunks/{model-retry-tz35mf6x.js → aisdk-native-pz0ytm9k.js} +8 -8
- package/dist/chunks/{model-retry-v7024ht3.js → aisdk-native-q5b8y3xv.js} +14 -14
- package/dist/chunks/{model-retry-zqma82cw.js → aisdk-native-q8ejgrh7.js} +11 -11
- package/dist/chunks/{model-retry-nentvqe9.js → aisdk-native-qat70s67.js} +24 -24
- package/dist/chunks/{model-retry-5kzpfxft.js → aisdk-native-qcan06tx.js} +21 -21
- package/dist/chunks/{model-retry-qt88z79s.js → aisdk-native-qe206vge.js} +7 -7
- package/dist/chunks/{model-retry-bhk1rbmp.js → aisdk-native-qmj4b9ja.js} +32 -32
- package/dist/chunks/{model-retry-7kw0mv8e.js → aisdk-native-qna8jnyk.js} +29 -29
- package/dist/chunks/{model-retry-qnc92qwc.js → aisdk-native-qnc92qwc.js} +1 -1
- package/dist/chunks/{model-retry-5c6h6vqc.js → aisdk-native-qq2qmwe2.js} +9 -9
- package/dist/chunks/{model-retry-0svm4j11.js → aisdk-native-qqmhr94f.js} +15 -15
- package/dist/chunks/{model-retry-qsdy395h.js → aisdk-native-qsdy395h.js} +1 -1
- package/dist/chunks/{model-retry-6vmd7p6h.js → aisdk-native-r7epa8w9.js} +10 -10
- package/dist/chunks/{model-retry-rv11vn85.js → aisdk-native-r939pgrs.js} +11 -11
- package/dist/chunks/{model-retry-gcsxsjs6.js → aisdk-native-rbddshgb.js} +18 -18
- package/dist/chunks/{model-retry-rdw6cm16.js → aisdk-native-rdw6cm16.js} +1 -1
- package/dist/chunks/{model-retry-5yx9a2ww.js → aisdk-native-rdx6zs89.js} +8 -8
- package/dist/chunks/{model-retry-rert0e01.js → aisdk-native-rert0e01.js} +2 -2
- package/dist/chunks/{model-retry-rhjbct0v.js → aisdk-native-rhjbct0v.js} +1 -1
- package/dist/chunks/{model-retry-1acjjqhc.js → aisdk-native-rhraev7y.js} +4 -4
- package/dist/chunks/{model-retry-rj3eygr5.js → aisdk-native-rj3eygr5.js} +2 -2
- package/dist/chunks/{model-retry-embw8kgh.js → aisdk-native-rwm5vee1.js} +4 -4
- package/dist/chunks/{model-retry-rf6pfzwp.js → aisdk-native-s6btdq5g.js} +1 -1
- package/dist/chunks/{model-retry-mq044fh7.js → aisdk-native-s6cpq0wz.js} +13 -13
- package/dist/chunks/{model-retry-rr55ymyq.js → aisdk-native-s6qcaefa.js} +29 -29
- package/dist/chunks/{model-retry-sa8ekw3f.js → aisdk-native-sa8ekw3f.js} +2 -2
- package/dist/chunks/{model-retry-8h4b0cs1.js → aisdk-native-skpgndjp.js} +24 -24
- package/dist/chunks/{model-retry-wn3g4ypj.js → aisdk-native-svj5pvzg.js} +28 -28
- package/dist/chunks/{model-retry-syv4x271.js → aisdk-native-syv4x271.js} +1 -1
- package/dist/chunks/{model-retry-dkpq1bsc.js → aisdk-native-t2wwn0ay.js} +19 -19
- package/dist/chunks/{model-retry-4vk656gf.js → aisdk-native-t3dkae6y.js} +9 -9
- package/dist/chunks/{model-retry-tazgh4e4.js → aisdk-native-tazgh4e4.js} +1 -1
- package/dist/chunks/{model-retry-tcezcvh9.js → aisdk-native-tcezcvh9.js} +1 -1
- package/dist/chunks/{model-retry-tdstcens.js → aisdk-native-tdstcens.js} +1 -1
- package/dist/chunks/{model-retry-zdqemt2t.js → aisdk-native-tk7tezdh.js} +15 -15
- package/dist/chunks/{model-retry-tm0kqsz3.js → aisdk-native-tm0kqsz3.js} +1 -1
- package/dist/chunks/{model-retry-1trs7s7z.js → aisdk-native-tprq4g7a.js} +16 -16
- package/dist/chunks/{model-retry-bx29z6jj.js → aisdk-native-tqngjy9q.js} +20 -20
- package/dist/chunks/{model-retry-7cx595n2.js → aisdk-native-txm3e8qz.js} +9 -9
- package/dist/chunks/{model-retry-tyytaxap.js → aisdk-native-tyytaxap.js} +1 -1
- package/dist/chunks/{model-retry-tx0gtb9m.js → aisdk-native-v210v162.js} +9 -9
- package/dist/chunks/{model-retry-v7p4zvkq.js → aisdk-native-v7p4zvkq.js} +2 -2
- package/dist/chunks/{model-retry-yxwmwsaj.js → aisdk-native-v9e4g1jz.js} +19 -19
- package/dist/chunks/{model-retry-eefqbebw.js → aisdk-native-v9zzqvcp.js} +24 -24
- package/dist/chunks/{model-retry-veqvce7d.js → aisdk-native-veqvce7d.js} +1 -1
- package/dist/chunks/aisdk-native-vnkjks7b.js +18 -0
- package/dist/chunks/aisdk-native-vr5m31t5.js +26 -0
- package/dist/chunks/{model-retry-fx6hsjqx.js → aisdk-native-vvhh43p5.js} +22 -22
- package/dist/chunks/{model-retry-qjch4pc3.js → aisdk-native-vzkxfwdq.js} +15 -15
- package/dist/chunks/{model-retry-vzs5sf6e.js → aisdk-native-vzs5sf6e.js} +1 -1
- package/dist/chunks/{model-retry-z3ammv4w.js → aisdk-native-w1wn6h8h.js} +17 -17
- package/dist/chunks/{model-retry-kjdm35cs.js → aisdk-native-w39jehkq.js} +5 -5
- package/dist/chunks/{model-retry-w3wsvvr9.js → aisdk-native-w3wsvvr9.js} +1 -1
- package/dist/chunks/{model-retry-jcen6etv.js → aisdk-native-w5rv5vav.js} +33 -33
- package/dist/chunks/{model-retry-13xvemqm.js → aisdk-native-w62gg202.js} +17 -17
- package/dist/chunks/{model-retry-wd87259q.js → aisdk-native-wd87259q.js} +1 -1
- package/dist/chunks/{model-retry-npr0wz9t.js → aisdk-native-wfpqd2wx.js} +6 -6
- package/dist/chunks/{model-retry-w3x15rym.js → aisdk-native-wh5h9wdx.js} +24 -24
- package/dist/chunks/{model-retry-bjx1sjef.js → aisdk-native-wjr9rjd7.js} +6 -6
- package/dist/chunks/{model-retry-fdms3n6w.js → aisdk-native-wk5z6jzv.js} +9 -9
- package/dist/chunks/{model-retry-tz70ab5q.js → aisdk-native-wks1wfwf.js} +30 -30
- package/dist/chunks/{model-retry-5mrmcz26.js → aisdk-native-x68jtk21.js} +37 -37
- package/dist/chunks/{model-retry-n8v5cbt0.js → aisdk-native-x8ghw6e7.js} +20 -20
- package/dist/chunks/{model-retry-tcpq0y9r.js → aisdk-native-xfjx2aft.js} +13 -13
- package/dist/chunks/{model-retry-87pge11c.js → aisdk-native-xgc9sej2.js} +61 -61
- package/dist/chunks/{model-retry-wp3yb7k0.js → aisdk-native-xm0e89ad.js} +11 -11
- package/dist/chunks/{model-retry-4ndyr8vy.js → aisdk-native-xsnfp990.js} +13 -13
- package/dist/chunks/{model-retry-ry6831an.js → aisdk-native-xvedb59m.js} +9 -9
- package/dist/chunks/{model-retry-f5rb7yq3.js → aisdk-native-xx1gnxvy.js} +32 -32
- package/dist/chunks/{model-retry-g36mkr7n.js → aisdk-native-xx6p3jw0.js} +21 -21
- package/dist/chunks/{model-retry-y1fvbwt7.js → aisdk-native-y1fvbwt7.js} +1 -1
- package/dist/chunks/{model-retry-3y377wv9.js → aisdk-native-y6bex35g.js} +4 -4
- package/dist/chunks/{model-retry-vkfdnwpx.js → aisdk-native-y6mhz57t.js} +4 -4
- package/dist/chunks/{model-retry-y71avatq.js → aisdk-native-y71avatq.js} +1 -1
- package/dist/chunks/{model-retry-qwemz3ha.js → aisdk-native-ya06qa3k.js} +21 -21
- package/dist/chunks/{model-retry-c3z27sd6.js → aisdk-native-ynanx4br.js} +9 -9
- package/dist/chunks/{model-retry-cm7k2cvd.js → aisdk-native-yq3mx877.js} +11 -11
- package/dist/chunks/{model-retry-zsg3hbgq.js → aisdk-native-ysetzwh9.js} +3 -3
- package/dist/chunks/{model-retry-pq9chy9c.js → aisdk-native-yvrjrdnb.js} +10 -10
- package/dist/chunks/{model-retry-1pr61bwh.js → aisdk-native-yx2dkg0t.js} +18 -18
- package/dist/chunks/{model-retry-z0bkrqjs.js → aisdk-native-z0bkrqjs.js} +1 -1
- package/dist/chunks/{model-retry-67zw56js.js → aisdk-native-z0tj0v41.js} +32 -32
- package/dist/chunks/{model-retry-z18fegx4.js → aisdk-native-z18fegx4.js} +1 -1
- package/dist/chunks/{model-retry-m9c6r0nn.js → aisdk-native-zfjehv6x.js} +13 -13
- package/dist/chunks/{model-retry-4n984778.js → aisdk-native-zgftg0pe.js} +32 -32
- package/dist/chunks/{model-retry-enbzs98c.js → aisdk-native-zqz7cba6.js} +15 -15
- package/dist/chunks/{model-retry-zr2ceqn5.js → aisdk-native-zr2ceqn5.js} +1 -1
- package/dist/chunks/{model-retry-pp4zh5st.js → aisdk-native-zssq29w7.js} +168 -168
- package/dist/chunks/{model-retry-zxq2ej10.js → aisdk-native-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 +85 -85
- package/dist/config/discovery.js +84 -84
- package/dist/config/markdown.js +1 -1
- package/dist/config/normalize.js +101 -101
- package/dist/config/plugin/agent.js +118 -118
- package/dist/config/plugin/command.js +208 -208
- package/dist/config/plugin/compaction.js +155 -155
- package/dist/config/plugin/compatibility.js +135 -135
- package/dist/config/plugin/entry-observer.js +1 -1
- package/dist/config/plugin/formatter.js +117 -117
- package/dist/config/plugin/image.js +116 -116
- package/dist/config/plugin/instruction.js +116 -116
- package/dist/config/plugin/location-watcher.js +118 -118
- package/dist/config/plugin/mcp.js +125 -125
- package/dist/config/plugin/policy.js +117 -117
- package/dist/config/plugin/provider.js +114 -114
- package/dist/config/plugin/reference.js +118 -118
- package/dist/config/plugin/shell.js +116 -116
- package/dist/config/plugin/skill-file.js +104 -104
- package/dist/config/plugin/skill-scan.js +1 -1
- package/dist/config/plugin/skill.js +138 -138
- package/dist/config/plugin/snapshot.js +116 -116
- package/dist/config/plugin/source.js +115 -115
- package/dist/config/plugin/tool-output.js +117 -117
- package/dist/config/plugin/websearch.js +115 -115
- package/dist/config/plugin/worktree.js +118 -118
- package/dist/config/variable.js +1 -1
- package/dist/config/watch.js +1 -1
- package/dist/config.js +121 -121
- package/dist/credential/sql.js +2 -2
- package/dist/credential.js +85 -85
- package/dist/database/database.js +72 -72
- 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/20261010180456_project_time_archived.js +1 -1
- package/dist/database/migration.gen.js +51 -51
- package/dist/database/migration.js +53 -53
- 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 +81 -81
- package/dist/database/v1-migration.js +1 -1
- package/dist/effect/app-node-builder.js +370 -370
- 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 +95 -95
- package/dist/environment/exec-defaults.js +2 -2
- package/dist/environment/files.js +1 -1
- package/dist/environment/index.js +95 -95
- 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 +76 -76
- package/dist/file-access.js +106 -106
- package/dist/file-mutation.js +96 -96
- 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 +105 -105
- package/dist/filesystem/watcher-binding.js +3 -3
- package/dist/filesystem/watcher.js +15 -15
- package/dist/filesystem.js +106 -106
- package/dist/form.js +82 -82
- package/dist/formatter/builtins.js +4 -4
- package/dist/formatter.js +89 -89
- package/dist/generate.js +106 -106
- 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 +93 -93
- 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 +361 -361
- package/dist/instruction-discovery.js +86 -86
- package/dist/instructions/builtins.js +89 -89
- package/dist/instructions/index.js +1 -1
- package/dist/integration/connection.js +3 -3
- package/dist/integration.js +85 -85
- package/dist/job.js +78 -78
- package/dist/kv/sql.js +2 -2
- package/dist/kv.js +75 -75
- package/dist/location-activity.js +136 -136
- package/dist/location-lifecycle.js +109 -109
- package/dist/location-service-map.js +88 -88
- package/dist/location-services.js +358 -358
- package/dist/location.js +87 -87
- package/dist/managed-policy.js +8 -8
- package/dist/mcp/client.js +93 -93
- package/dist/mcp/index.js +111 -111
- package/dist/mcp/instructions.js +131 -131
- package/dist/mcp/oauth.js +80 -80
- package/dist/mcp/stdio.js +92 -92
- package/dist/mime.js +1 -1
- package/dist/modal/models.js +93 -93
- package/dist/model-resolver.js +98 -98
- package/dist/model-retry.js +1 -1
- package/dist/model.js +100 -100
- package/dist/models-dev.js +107 -107
- package/dist/oauth/page.js +1 -1
- package/dist/permission/saved.js +82 -82
- package/dist/permission/sql.js +5 -5
- package/dist/permission.js +115 -115
- package/dist/persistent-pty/binary.bun.js +1 -1
- package/dist/persistent-pty/daemon.js +1 -1
- package/dist/persistent-pty/index.js +92 -92
- package/dist/persistent-pty/pty-binding.js +1 -1
- package/dist/persistent-pty.js +77 -77
- package/dist/plugin/agent.js +78 -78
- package/dist/plugin/command.js +104 -104
- 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 +332 -332
- package/dist/plugin/mcp-codemode-defaults.js +3 -3
- package/dist/plugin/models-dev.js +98 -98
- package/dist/plugin/module.js +117 -117
- package/dist/plugin/optimize.js +4 -4
- package/dist/plugin/plan.js +104 -104
- package/dist/plugin/promise.js +1 -1
- package/dist/plugin/provider/amazon-bedrock.js +92 -92
- package/dist/plugin/provider/azure.js +116 -116
- package/dist/plugin/provider/cerebras.js +1 -1
- package/dist/plugin/provider/chatgpt.js +116 -116
- package/dist/plugin/provider/cloudflare-ai-gateway.js +113 -113
- package/dist/plugin/provider/cloudflare-workers-ai.js +114 -114
- package/dist/plugin/provider/cohere.js +2 -2
- package/dist/plugin/provider/configured.js +112 -112
- package/dist/plugin/provider/databricks.js +1 -1
- package/dist/plugin/provider/digitalocean.js +95 -95
- package/dist/plugin/provider/dynamic.js +2 -2
- package/dist/plugin/provider/factory.js +1 -1
- package/dist/plugin/provider/github-copilot.js +97 -97
- package/dist/plugin/provider/gitlab.js +95 -95
- package/dist/plugin/provider/google-vertex.js +113 -113
- package/dist/plugin/provider/kilo.js +1 -1
- package/dist/plugin/provider/llmgateway.js +80 -80
- package/dist/plugin/provider/lmstudio.js +125 -125
- package/dist/plugin/provider/local.js +122 -122
- package/dist/plugin/provider/modal.js +94 -94
- package/dist/plugin/provider/neon.js +1 -1
- package/dist/plugin/provider/nvidia.js +1 -1
- package/dist/plugin/provider/ollama.js +123 -123
- package/dist/plugin/provider/openai.js +118 -118
- package/dist/plugin/provider/opencode.js +100 -100
- package/dist/plugin/provider/openrouter.js +93 -93
- package/dist/plugin/provider/perplexity.js +2 -2
- package/dist/plugin/provider/poe.js +81 -81
- package/dist/plugin/provider/prompt-cache-key.js +1 -1
- package/dist/plugin/provider/sap-ai-core.js +93 -93
- package/dist/plugin/provider/sdk-factory.js +1 -1
- package/dist/plugin/provider/snowflake-cortex.js +115 -115
- package/dist/plugin/provider/vercel.js +92 -92
- package/dist/plugin/provider/vllm.js +125 -125
- package/dist/plugin/provider/xai.js +93 -93
- package/dist/plugin/provider/zenmux.js +1 -1
- package/dist/plugin/provider.js +168 -168
- package/dist/plugin/sdk.js +78 -78
- package/dist/plugin/service.js +3 -3
- package/dist/plugin/skill.js +134 -134
- package/dist/plugin/source-directory.js +1 -1
- package/dist/plugin/supervisor.js +351 -351
- package/dist/plugin/tool-input-repair.js +4 -4
- package/dist/plugin/update.js +6 -6
- package/dist/plugin/vcs/git.js +88 -88
- package/dist/plugin/vcs/hg.js +88 -88
- package/dist/plugin/verbosity.js +95 -95
- package/dist/plugin/warming.js +114 -114
- package/dist/plugin/websearch/exa.js +7 -7
- package/dist/plugin/websearch/firecrawl.js +6 -6
- 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 +8 -8
- package/dist/plugin.js +217 -217
- package/dist/project/schema.js +8 -8
- package/dist/project/sql.js +4 -4
- package/dist/project.js +92 -92
- package/dist/provider.js +95 -95
- package/dist/pty/protocol.js +1 -1
- package/dist/pty/ticket.js +1 -1
- package/dist/pty.js +101 -101
- package/dist/reference/instructions.js +91 -91
- package/dist/reference.js +93 -93
- package/dist/repository-cache.js +83 -83
- package/dist/repository.js +1 -1
- package/dist/ripgrep/binary.js +2 -2
- package/dist/ripgrep.js +97 -97
- package/dist/rpc.js +88 -88
- package/dist/schema.js +1 -1
- package/dist/session/affinity.js +1 -1
- package/dist/session/command.js +76 -76
- package/dist/session/compaction.js +138 -138
- package/dist/session/context.js +155 -155
- package/dist/session/diff.js +90 -90
- package/dist/session/environment.js +5 -5
- package/dist/session/error.js +5 -5
- package/dist/session/event.js +1 -1
- package/dist/session/execution/restart.js +218 -218
- package/dist/session/execution.js +129 -129
- package/dist/session/generate.js +155 -155
- package/dist/session/history.js +15 -15
- package/dist/session/inbox.js +95 -95
- package/dist/session/info.js +3 -3
- package/dist/session/instruction-entry.js +81 -81
- package/dist/session/instruction-state.js +8 -8
- package/dist/session/instructions.js +99 -99
- package/dist/session/message-updater.js +2 -2
- package/dist/session/message.js +1 -1
- package/dist/session/model-request.js +122 -122
- package/dist/session/model-transport.js +9 -9
- package/dist/session/move.js +131 -131
- package/dist/session/projector.js +91 -91
- package/dist/session/prompt.js +107 -107
- package/dist/session/recent-text.js +1 -1
- package/dist/session/revert.js +96 -96
- package/dist/session/run-coordinator.js +3 -3
- package/dist/session/runner/index.js +3 -3
- package/dist/session/runner/llm.js +225 -225
- package/dist/session/runner/max-steps.js +1 -1
- package/dist/session/runner/model.js +100 -100
- package/dist/session/runner/publish-llm-event.js +115 -115
- package/dist/session/runner/retry.js +5 -5
- package/dist/session/runner/step.js +128 -128
- package/dist/session/runner/to-llm-message.js +14 -14
- package/dist/session/schema.js +5 -5
- package/dist/session/session.js +164 -164
- package/dist/session/shell.js +130 -130
- package/dist/session/skill.js +105 -105
- package/dist/session/sql.js +5 -5
- package/dist/session/stats.js +77 -77
- package/dist/session/store.js +87 -87
- package/dist/session/subagent-completion.js +1 -1
- package/dist/session/subagent-job.js +206 -206
- package/dist/session/system-prompt.js +3 -3
- package/dist/session/title.js +159 -159
- package/dist/session/to-session-error.js +113 -113
- package/dist/session/transfer.js +217 -217
- package/dist/session/usage.js +1 -1
- package/dist/session.js +212 -212
- 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 +13 -13
- package/dist/shell.js +132 -132
- package/dist/skill/discovery.js +6 -6
- package/dist/skill/instructions.js +109 -109
- package/dist/skill.js +116 -116
- package/dist/snapshot.js +95 -95
- 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 +128 -128
- package/dist/tool/plugin/edit.js +122 -122
- package/dist/tool/plugin/file-diff.js +1 -1
- package/dist/tool/plugin/glob.js +126 -126
- package/dist/tool/plugin/grep.js +126 -126
- package/dist/tool/plugin/mcp-resource.js +119 -119
- package/dist/tool/plugin/opencode.js +111 -111
- package/dist/tool/plugin/patch.js +124 -124
- package/dist/tool/plugin/question.js +105 -105
- package/dist/tool/plugin/read.js +127 -127
- package/dist/tool/plugin/shell.js +203 -203
- package/dist/tool/plugin/skill.js +113 -113
- package/dist/tool/plugin/subagent.js +213 -213
- package/dist/tool/plugin/todo.js +138 -138
- package/dist/tool/plugin/webfetch.js +110 -110
- package/dist/tool/plugin/websearch.js +112 -112
- package/dist/tool/plugin/write.js +124 -124
- package/dist/tool/read-filesystem.js +102 -102
- package/dist/tool/runtime.js +1 -1
- package/dist/tool-output.js +7 -7
- package/dist/tool.js +14 -14
- 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 +7 -7
- 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 +94 -94
- package/dist/v1/config/permission.js +7 -7
- 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 +93 -93
- package/dist/vcs/patch.js +1 -1
- package/dist/vcs.js +91 -91
- package/dist/voice.js +90 -90
- package/dist/websearch.js +84 -84
- package/dist/wellknown/plugin.js +78 -78
- package/dist/wellknown.js +83 -83
- package/dist/workspace/driver.js +7 -7
- package/dist/workspace/sql.js +1 -1
- package/dist/workspace.js +82 -82
- package/dist/worktree/directory.js +2 -2
- package/dist/worktree/git.js +10 -10
- package/dist/worktree/sql.js +5 -5
- package/dist/worktree/strategies.js +91 -91
- package/dist/worktree.js +100 -100
- package/package.json +8 -8
- package/dist/chunks/model-retry-374yendz.js +0 -26
- package/dist/chunks/model-retry-9yd845wg.js +0 -517
- package/dist/chunks/model-retry-9zdhvgqs.js +0 -18
- package/dist/chunks/model-retry-zw8e9rvj.js +0 -257
- /package/dist/chunks/{model-retry-0qkdqm5v.js → aisdk-native-0qkdqm5v.js} +0 -0
- /package/dist/chunks/{model-retry-0zkw76rk.js → aisdk-native-0zkw76rk.js} +0 -0
- /package/dist/chunks/{model-retry-17cy0kzp.js → aisdk-native-17cy0kzp.js} +0 -0
- /package/dist/chunks/{model-retry-1cnp2v09.js → aisdk-native-1cnp2v09.js} +0 -0
- /package/dist/chunks/{model-retry-1kg9ymc8.js → aisdk-native-1kg9ymc8.js} +0 -0
- /package/dist/chunks/{model-retry-24dcb14g.js → aisdk-native-24dcb14g.js} +0 -0
- /package/dist/chunks/{model-retry-2710q6r3.js → aisdk-native-2710q6r3.js} +0 -0
- /package/dist/chunks/{model-retry-2axfhc9x.js → aisdk-native-2axfhc9x.js} +0 -0
- /package/dist/chunks/{model-retry-2bv980vf.js → aisdk-native-2bv980vf.js} +0 -0
- /package/dist/chunks/{model-retry-2c3vjs8z.js → aisdk-native-2c3vjs8z.js} +0 -0
- /package/dist/chunks/{model-retry-359p4xyc.js → aisdk-native-359p4xyc.js} +0 -0
- /package/dist/chunks/{model-retry-3asan66x.js → aisdk-native-3asan66x.js} +0 -0
- /package/dist/chunks/{model-retry-3t0ybcrp.js → aisdk-native-3t0ybcrp.js} +0 -0
- /package/dist/chunks/{model-retry-3v8g72cx.js → aisdk-native-3v8g72cx.js} +0 -0
- /package/dist/chunks/{model-retry-3wcehsnq.js → aisdk-native-3wcehsnq.js} +0 -0
- /package/dist/chunks/{model-retry-43n2bw4t.js → aisdk-native-43n2bw4t.js} +0 -0
- /package/dist/chunks/{model-retry-4knz6hnm.js → aisdk-native-4knz6hnm.js} +0 -0
- /package/dist/chunks/{model-retry-4vcrnpx2.js → aisdk-native-4vcrnpx2.js} +0 -0
- /package/dist/chunks/{model-retry-4y7fprxs.js → aisdk-native-4y7fprxs.js} +0 -0
- /package/dist/chunks/{model-retry-53557ph1.js → aisdk-native-53557ph1.js} +0 -0
- /package/dist/chunks/{model-retry-550bvhaj.js → aisdk-native-550bvhaj.js} +0 -0
- /package/dist/chunks/{model-retry-6prwharc.js → aisdk-native-6prwharc.js} +0 -0
- /package/dist/chunks/{model-retry-6q2bdcd1.js → aisdk-native-6q2bdcd1.js} +0 -0
- /package/dist/chunks/{model-retry-7akdwqpd.js → aisdk-native-7akdwqpd.js} +0 -0
- /package/dist/chunks/{model-retry-7m9af43g.js → aisdk-native-7m9af43g.js} +0 -0
- /package/dist/chunks/{model-retry-822emrt2.js → aisdk-native-822emrt2.js} +0 -0
- /package/dist/chunks/{model-retry-84wd9syh.js → aisdk-native-84wd9syh.js} +0 -0
- /package/dist/chunks/{model-retry-88xbtdfr.js → aisdk-native-88xbtdfr.js} +0 -0
- /package/dist/chunks/{model-retry-8n3pysct.js → aisdk-native-8n3pysct.js} +0 -0
- /package/dist/chunks/{model-retry-8wj87zfr.js → aisdk-native-8wj87zfr.js} +0 -0
- /package/dist/chunks/{model-retry-9a4afbnw.js → aisdk-native-9a4afbnw.js} +0 -0
- /package/dist/chunks/{model-retry-9rqn6x4v.js → aisdk-native-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{model-retry-a6k6eb26.js → aisdk-native-a6k6eb26.js} +0 -0
- /package/dist/chunks/{model-retry-af5trqkr.js → aisdk-native-af5trqkr.js} +0 -0
- /package/dist/chunks/{model-retry-afrmfg78.js → aisdk-native-afrmfg78.js} +0 -0
- /package/dist/chunks/{model-retry-aqzs7mqg.js → aisdk-native-aqzs7mqg.js} +0 -0
- /package/dist/chunks/{model-retry-atq7p7m5.js → aisdk-native-atq7p7m5.js} +0 -0
- /package/dist/chunks/{model-retry-bkyjaxrp.js → aisdk-native-bkyjaxrp.js} +0 -0
- /package/dist/chunks/{model-retry-bmr6ed5q.js → aisdk-native-bmr6ed5q.js} +0 -0
- /package/dist/chunks/{model-retry-cf4snx6d.js → aisdk-native-cf4snx6d.js} +0 -0
- /package/dist/chunks/{model-retry-cvy3z8tj.js → aisdk-native-cvy3z8tj.js} +0 -0
- /package/dist/chunks/{model-retry-d9fn303g.js → aisdk-native-d9fn303g.js} +0 -0
- /package/dist/chunks/{model-retry-d9jj8t3e.js → aisdk-native-d9jj8t3e.js} +0 -0
- /package/dist/chunks/{model-retry-dajrwvna.js → aisdk-native-dajrwvna.js} +0 -0
- /package/dist/chunks/{model-retry-dap0rakb.js → aisdk-native-dap0rakb.js} +0 -0
- /package/dist/chunks/{model-retry-df08tz66.js → aisdk-native-df08tz66.js} +0 -0
- /package/dist/chunks/{model-retry-dy18nga0.js → aisdk-native-dy18nga0.js} +0 -0
- /package/dist/chunks/{model-retry-e5kj55wp.js → aisdk-native-e5kj55wp.js} +0 -0
- /package/dist/chunks/{model-retry-e73j6tqm.js → aisdk-native-e73j6tqm.js} +0 -0
- /package/dist/chunks/{model-retry-ec1grn59.js → aisdk-native-ec1grn59.js} +0 -0
- /package/dist/chunks/{model-retry-eh3zwz77.js → aisdk-native-eh3zwz77.js} +0 -0
- /package/dist/chunks/{model-retry-emrn6kk6.js → aisdk-native-emrn6kk6.js} +0 -0
- /package/dist/chunks/{model-retry-f0mxakyp.js → aisdk-native-f0mxakyp.js} +0 -0
- /package/dist/chunks/{model-retry-f6n9ztr4.js → aisdk-native-f6n9ztr4.js} +0 -0
- /package/dist/chunks/{model-retry-faypxj3z.js → aisdk-native-faypxj3z.js} +0 -0
- /package/dist/chunks/{model-retry-fd410y7t.js → aisdk-native-fd410y7t.js} +0 -0
- /package/dist/chunks/{model-retry-g4wezp1m.js → aisdk-native-g4wezp1m.js} +0 -0
- /package/dist/chunks/{model-retry-g86h250q.js → aisdk-native-g86h250q.js} +0 -0
- /package/dist/chunks/{model-retry-gebd4c9n.js → aisdk-native-gebd4c9n.js} +0 -0
- /package/dist/chunks/{model-retry-gftt206x.js → aisdk-native-gftt206x.js} +0 -0
- /package/dist/chunks/{model-retry-hcxmzztb.js → aisdk-native-hcxmzztb.js} +0 -0
- /package/dist/chunks/{model-retry-hk9envan.js → aisdk-native-hk9envan.js} +0 -0
- /package/dist/chunks/{model-retry-j2ntwpah.js → aisdk-native-j2ntwpah.js} +0 -0
- /package/dist/chunks/{model-retry-j5zkgpj8.js → aisdk-native-j5zkgpj8.js} +0 -0
- /package/dist/chunks/{model-retry-jjkms2e6.js → aisdk-native-jjkms2e6.js} +0 -0
- /package/dist/chunks/{model-retry-jr7sbwjy.js → aisdk-native-jr7sbwjy.js} +0 -0
- /package/dist/chunks/{model-retry-jwfs4k6c.js → aisdk-native-jwfs4k6c.js} +0 -0
- /package/dist/chunks/{model-retry-jze0r7bz.js → aisdk-native-jze0r7bz.js} +0 -0
- /package/dist/chunks/{model-retry-jzg6c2d5.js → aisdk-native-jzg6c2d5.js} +0 -0
- /package/dist/chunks/{model-retry-m18g726c.js → aisdk-native-m18g726c.js} +0 -0
- /package/dist/chunks/{model-retry-mp448xyj.js → aisdk-native-mp448xyj.js} +0 -0
- /package/dist/chunks/{model-retry-msx8hqn2.js → aisdk-native-msx8hqn2.js} +0 -0
- /package/dist/chunks/{model-retry-n05xt0ee.js → aisdk-native-n05xt0ee.js} +0 -0
- /package/dist/chunks/{model-retry-n3j8tn72.js → aisdk-native-n3j8tn72.js} +0 -0
- /package/dist/chunks/{model-retry-njntx4h6.js → aisdk-native-njntx4h6.js} +0 -0
- /package/dist/chunks/{model-retry-pkyv6v7h.js → aisdk-native-pkyv6v7h.js} +0 -0
- /package/dist/chunks/{model-retry-pyv0edze.js → aisdk-native-pyv0edze.js} +0 -0
- /package/dist/chunks/{model-retry-q3sfg36h.js → aisdk-native-q3sfg36h.js} +0 -0
- /package/dist/chunks/{model-retry-q74kybfr.js → aisdk-native-q74kybfr.js} +0 -0
- /package/dist/chunks/{model-retry-qaymkmh1.js → aisdk-native-qaymkmh1.js} +0 -0
- /package/dist/chunks/{model-retry-qb87gjwd.js → aisdk-native-qb87gjwd.js} +0 -0
- /package/dist/chunks/{model-retry-qfa1cgps.js → aisdk-native-qfa1cgps.js} +0 -0
- /package/dist/chunks/{model-retry-qg3g05ea.js → aisdk-native-qg3g05ea.js} +0 -0
- /package/dist/chunks/{model-retry-qrg20bc0.js → aisdk-native-qrg20bc0.js} +0 -0
- /package/dist/chunks/{model-retry-rcb2kzg1.js → aisdk-native-rcb2kzg1.js} +0 -0
- /package/dist/chunks/{model-retry-sdp7kfr6.js → aisdk-native-sdp7kfr6.js} +0 -0
- /package/dist/chunks/{model-retry-ssg3fenm.js → aisdk-native-ssg3fenm.js} +0 -0
- /package/dist/chunks/{model-retry-ve7vex1e.js → aisdk-native-ve7vex1e.js} +0 -0
- /package/dist/chunks/{model-retry-w803qqfp.js → aisdk-native-w803qqfp.js} +0 -0
- /package/dist/chunks/{model-retry-wc3fc9cn.js → aisdk-native-wc3fc9cn.js} +0 -0
- /package/dist/chunks/{model-retry-wer8tq1h.js → aisdk-native-wer8tq1h.js} +0 -0
- /package/dist/chunks/{model-retry-wjj7prxr.js → aisdk-native-wjj7prxr.js} +0 -0
- /package/dist/chunks/{model-retry-wtztk69x.js → aisdk-native-wtztk69x.js} +0 -0
- /package/dist/chunks/{model-retry-x0ckcb58.js → aisdk-native-x0ckcb58.js} +0 -0
- /package/dist/chunks/{model-retry-x61499pn.js → aisdk-native-x61499pn.js} +0 -0
- /package/dist/chunks/{model-retry-y44na4kk.js → aisdk-native-y44na4kk.js} +0 -0
- /package/dist/chunks/{model-retry-y8f7s663.js → aisdk-native-y8f7s663.js} +0 -0
- /package/dist/chunks/{model-retry-ygaqb7jw.js → aisdk-native-ygaqb7jw.js} +0 -0
- /package/dist/chunks/{model-retry-ym463w8f.js → aisdk-native-ym463w8f.js} +0 -0
- /package/dist/chunks/{model-retry-z5v4ffb3.js → aisdk-native-z5v4ffb3.js} +0 -0
- /package/dist/chunks/{model-retry-z9919s4g.js → aisdk-native-z9919s4g.js} +0 -0
|
@@ -1,36 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./
|
|
2
|
+
Service85,
|
|
3
|
+
node89
|
|
4
|
+
} from "./aisdk-native-5vscj5fh.js";
|
|
5
5
|
import {
|
|
6
6
|
shutdown2,
|
|
7
7
|
create3
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./aisdk-native-rdw6cm16.js";
|
|
9
9
|
import {
|
|
10
10
|
key2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./aisdk-native-y6bex35g.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
13
|
+
ID14,
|
|
14
14
|
Service80,
|
|
15
15
|
node84,
|
|
16
|
-
|
|
17
|
-
} from "./
|
|
16
|
+
Event18
|
|
17
|
+
} from "./aisdk-native-dw4a8ax5.js";
|
|
18
18
|
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from "./
|
|
19
|
+
Service79,
|
|
20
|
+
node83
|
|
21
|
+
} from "./aisdk-native-9ham2w87.js";
|
|
22
22
|
import {
|
|
23
23
|
__export
|
|
24
|
-
} from "./
|
|
25
|
-
|
|
26
|
-
// src/aisdk-native.ts
|
|
27
|
-
var exports_aisdk_native = {};
|
|
28
|
-
__export(exports_aisdk_native, {
|
|
29
|
-
AISDKNative: () => exports_aisdk_native,
|
|
30
|
-
native: () => native2,
|
|
31
|
-
rewrite: () => rewrite2
|
|
32
|
-
});
|
|
33
|
-
import { Effect as Effect2, Option as Option2, Schema as Schema2, Struct as Struct2 } from "effect";
|
|
24
|
+
} from "./aisdk-native-9rqn6x4v.js";
|
|
34
25
|
|
|
35
26
|
// src/provider.ts
|
|
36
27
|
var exports_provider3 = {};
|
|
@@ -45,7 +36,7 @@ __export(exports_provider3, {
|
|
|
45
36
|
LoadError: () => LoadError3,
|
|
46
37
|
Provider: () => exports_provider3,
|
|
47
38
|
Request: () => Request3,
|
|
48
|
-
Service: () =>
|
|
39
|
+
Service: () => Service78,
|
|
49
40
|
Settings: () => Settings2,
|
|
50
41
|
Transport: () => Transport2,
|
|
51
42
|
aisdk: () => aisdk2,
|
|
@@ -57,12 +48,12 @@ __export(exports_provider3, {
|
|
|
57
48
|
mergeOverlay: () => mergeOverlay2,
|
|
58
49
|
modelSettings: () => modelSettings2,
|
|
59
50
|
nativeSettings: () => nativeSettings2,
|
|
60
|
-
node: () =>
|
|
51
|
+
node: () => node82,
|
|
61
52
|
packageName: () => packageName2,
|
|
62
53
|
timeout: () => timeout2,
|
|
63
54
|
timeouts: () => timeouts2
|
|
64
55
|
});
|
|
65
|
-
import { Context, Effect, Layer, Option, Schema, Stream, Struct } from "effect";
|
|
56
|
+
import { Context, Effect as Effect2, Layer, Option as Option2, Schema as Schema2, Stream, Struct as Struct2 } from "effect";
|
|
66
57
|
import { Provider } from "@opencode/schema/provider";
|
|
67
58
|
import { Model } from "@opencode/schema/model";
|
|
68
59
|
import { makeLocationNode } from "@opencode/util/effect/app-node";
|
|
@@ -71,6 +62,263 @@ import { isRecord } from "@opencode/ai/utils/record";
|
|
|
71
62
|
import { importModule, resolveModule } from "@opencode/util/runtime-import";
|
|
72
63
|
import { Credential } from "@opencode/schema/credential";
|
|
73
64
|
import { freeze } from "immer";
|
|
65
|
+
|
|
66
|
+
// src/aisdk-native.ts
|
|
67
|
+
var exports_aisdk_native = {};
|
|
68
|
+
__export(exports_aisdk_native, {
|
|
69
|
+
AISDKNative: () => exports_aisdk_native,
|
|
70
|
+
native: () => native2,
|
|
71
|
+
rewrite: () => rewrite2
|
|
72
|
+
});
|
|
73
|
+
import { Effect, Option, Schema, Struct } from "effect";
|
|
74
|
+
function rewrite2(target, input) {
|
|
75
|
+
if (input.specifier === undefined)
|
|
76
|
+
return;
|
|
77
|
+
const plain = resolve(input.specifier, input);
|
|
78
|
+
if (!plain)
|
|
79
|
+
return;
|
|
80
|
+
const settings = decode(target.settings ?? {});
|
|
81
|
+
const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
|
|
82
|
+
const translated = options(replacement, input.modelID, settings);
|
|
83
|
+
if (target.package !== undefined || replacement !== input.specifier)
|
|
84
|
+
target.package = replacement;
|
|
85
|
+
const identity = replacement === "@opencode/ai/providers/openai-compatible" && !builtinPackages2.has(input.specifier) ? { provider: input.canonical ?? input.providerID } : {};
|
|
86
|
+
target.settings = target.settings === undefined ? undefined : { ...translated.settings, ...identity };
|
|
87
|
+
target.headers = mergeHeaders2(translated.headers, target.headers);
|
|
88
|
+
target.body = mergeOverlay2(translated.body, target.body);
|
|
89
|
+
target.variants = target.variants?.map((variant) => {
|
|
90
|
+
const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
|
|
91
|
+
const headers = mergeHeaders2(overlay.headers, variant.headers);
|
|
92
|
+
const body = mergeOverlay2(overlay.body, variant.body);
|
|
93
|
+
return {
|
|
94
|
+
id: variant.id,
|
|
95
|
+
...variant.settings === undefined ? {} : { settings: overlay.settings },
|
|
96
|
+
...headers === undefined ? {} : { headers },
|
|
97
|
+
...body === undefined ? {} : { body }
|
|
98
|
+
};
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
var PACKAGES = {
|
|
102
|
+
"@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
|
|
103
|
+
"@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
|
|
104
|
+
"@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
|
|
105
|
+
"@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
|
|
106
|
+
"@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
|
|
107
|
+
"@ai-sdk/cohere": "@opencode/ai/providers/cohere",
|
|
108
|
+
"@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
|
|
109
|
+
"@ai-sdk/google": "@opencode/ai/providers/google",
|
|
110
|
+
"@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
|
|
111
|
+
"@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
|
|
112
|
+
"@ai-sdk/groq": "@opencode/ai/providers/groq",
|
|
113
|
+
"@ai-sdk/mistral": "@opencode/ai/providers/mistral",
|
|
114
|
+
"@ai-sdk/openai": "@opencode/ai/providers/openai",
|
|
115
|
+
"@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
|
|
116
|
+
"@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
|
|
117
|
+
"@ai-sdk/xai": "@opencode/ai/providers/xai",
|
|
118
|
+
"@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
|
|
119
|
+
"@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
|
|
120
|
+
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
121
|
+
"venice-ai-sdk-provider": "@opencode/ai/providers/venice"
|
|
122
|
+
};
|
|
123
|
+
var protocols = (name) => ({
|
|
124
|
+
"@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
|
|
125
|
+
"@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
|
|
126
|
+
"@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
|
|
127
|
+
});
|
|
128
|
+
var HOSTS = {
|
|
129
|
+
alibaba: protocols("alibaba"),
|
|
130
|
+
"alibaba-cn": protocols("alibaba"),
|
|
131
|
+
"alibaba-coding-plan": protocols("alibaba"),
|
|
132
|
+
"alibaba-coding-plan-cn": protocols("alibaba"),
|
|
133
|
+
"alibaba-token-plan": protocols("alibaba"),
|
|
134
|
+
"alibaba-token-plan-cn": protocols("alibaba"),
|
|
135
|
+
baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
|
|
136
|
+
"cloudflare-ai-gateway": {
|
|
137
|
+
"@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
138
|
+
"@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
139
|
+
"@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
140
|
+
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
|
|
141
|
+
},
|
|
142
|
+
cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
|
|
143
|
+
"cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
|
|
144
|
+
deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
|
|
145
|
+
digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
|
|
146
|
+
"fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
|
|
147
|
+
"google-vertex": {
|
|
148
|
+
"@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat",
|
|
149
|
+
"@ai-sdk/mistral": "@opencode/ai/providers/google-vertex/mistral"
|
|
150
|
+
},
|
|
151
|
+
"kimi-for-coding": protocols("moonshot"),
|
|
152
|
+
meta: protocols("meta"),
|
|
153
|
+
minimax: protocols("minimax"),
|
|
154
|
+
"minimax-cn": protocols("minimax"),
|
|
155
|
+
"minimax-coding-plan": protocols("minimax"),
|
|
156
|
+
"minimax-cn-coding-plan": protocols("minimax"),
|
|
157
|
+
moonshotai: protocols("moonshot"),
|
|
158
|
+
"moonshotai-cn": protocols("moonshot"),
|
|
159
|
+
zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
160
|
+
"zai-coding-plan": protocols("zai-coding-plan"),
|
|
161
|
+
zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
162
|
+
"zhipuai-coding-plan": protocols("zai-coding-plan")
|
|
163
|
+
};
|
|
164
|
+
function native2(npm, context) {
|
|
165
|
+
const host = HOSTS[context.providerID]?.[npm];
|
|
166
|
+
if (host)
|
|
167
|
+
return host;
|
|
168
|
+
if (npm === "@ai-sdk/amazon-bedrock/mantle")
|
|
169
|
+
return mantle(context.modelID);
|
|
170
|
+
if (npm === "@ai-sdk/azure" && azureChat(context))
|
|
171
|
+
return "@opencode/ai/providers/azure/chat";
|
|
172
|
+
return PACKAGES[npm];
|
|
173
|
+
}
|
|
174
|
+
var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
|
|
175
|
+
var mantle = (modelID) => {
|
|
176
|
+
if (modelID === undefined)
|
|
177
|
+
return "@opencode/ai/providers/amazon-bedrock/mantle";
|
|
178
|
+
if (modelID.includes("anthropic."))
|
|
179
|
+
return "@opencode/ai/providers/amazon-bedrock/mantle/messages";
|
|
180
|
+
return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
|
|
181
|
+
};
|
|
182
|
+
function resolve(specifier, context) {
|
|
183
|
+
const npm = packageName2(specifier);
|
|
184
|
+
if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
|
|
185
|
+
return native2(npm, context);
|
|
186
|
+
if (npm === "@opencode/ai/providers/amazon-bedrock/mantle" || npm === "@opencode/ai/providers/amazon-bedrock-mantle")
|
|
187
|
+
return mantle(context.modelID);
|
|
188
|
+
if ((npm === "@opencode/ai/providers/azure" || npm === "@opencode/ai/providers/azure/responses") && azureChat(context))
|
|
189
|
+
return "@opencode/ai/providers/azure/chat";
|
|
190
|
+
return builtinPackages2.has(npm) ? npm : undefined;
|
|
191
|
+
}
|
|
192
|
+
function options(replacement, modelID, settings) {
|
|
193
|
+
const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
|
|
194
|
+
const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
|
|
195
|
+
const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
|
|
196
|
+
return {
|
|
197
|
+
settings: {
|
|
198
|
+
...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
|
|
199
|
+
...thinking === undefined ? {} : { thinking }
|
|
200
|
+
},
|
|
201
|
+
...settings.headers === undefined ? {} : { headers: settings.headers },
|
|
202
|
+
...settings.extraBody === undefined ? {} : { body: settings.extraBody },
|
|
203
|
+
...converse ? bedrockRequest(modelID, settings) : {},
|
|
204
|
+
...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
var BEDROCK_KEYS = [
|
|
208
|
+
"bearerToken",
|
|
209
|
+
"endpoint",
|
|
210
|
+
"credentials",
|
|
211
|
+
"credentialProvider",
|
|
212
|
+
"accessKeyId",
|
|
213
|
+
"secretAccessKey",
|
|
214
|
+
"sessionToken"
|
|
215
|
+
];
|
|
216
|
+
var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
|
|
217
|
+
function bedrockSettings(settings, converse) {
|
|
218
|
+
const region = settings.region ?? settings.credentials?.region;
|
|
219
|
+
const credentials = settings.credentials ?? settings;
|
|
220
|
+
const baseURL = settings.baseURL ?? settings.endpoint;
|
|
221
|
+
return {
|
|
222
|
+
...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
|
|
223
|
+
...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
|
|
224
|
+
...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
|
|
225
|
+
...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
|
|
226
|
+
credentials: {
|
|
227
|
+
...region === undefined ? {} : { region },
|
|
228
|
+
accessKeyId: credentials.accessKeyId,
|
|
229
|
+
secretAccessKey: credentials.secretAccessKey,
|
|
230
|
+
...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function bedrockThinking(modelID, settings) {
|
|
236
|
+
const reasoning = settings.reasoningConfig;
|
|
237
|
+
if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
|
|
238
|
+
return;
|
|
239
|
+
return { type: "enabled", budgetTokens: reasoning.budgetTokens };
|
|
240
|
+
}
|
|
241
|
+
function bedrockRequest(modelID, settings) {
|
|
242
|
+
const additional = settings.additionalModelRequestFields ?? {};
|
|
243
|
+
const reasoning = settings.reasoningConfig;
|
|
244
|
+
const anthropic = modelID?.includes("anthropic") ?? false;
|
|
245
|
+
const openai = modelID?.includes("openai.") ?? false;
|
|
246
|
+
const harmony = modelID?.includes("openai.gpt-oss") ?? false;
|
|
247
|
+
const effort = reasoning?.maxReasoningEffort;
|
|
248
|
+
const type = reasoning?.type;
|
|
249
|
+
const budget = reasoning?.budgetTokens;
|
|
250
|
+
const display = reasoning?.display;
|
|
251
|
+
const betas = settings.anthropicBeta ?? [];
|
|
252
|
+
const fields = mergeOverlay2(additional, {
|
|
253
|
+
...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
|
|
254
|
+
...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
|
|
255
|
+
...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
|
|
256
|
+
...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
|
|
257
|
+
...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
|
|
258
|
+
...!anthropic && !openai && effort !== undefined ? {
|
|
259
|
+
reasoningConfig: {
|
|
260
|
+
...type === undefined || type === "adaptive" ? {} : { type },
|
|
261
|
+
...budget === undefined ? {} : { budgetTokens: budget },
|
|
262
|
+
maxReasoningEffort: effort
|
|
263
|
+
}
|
|
264
|
+
} : {}
|
|
265
|
+
});
|
|
266
|
+
const body = {
|
|
267
|
+
...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
|
|
268
|
+
...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
|
|
269
|
+
};
|
|
270
|
+
return Object.keys(body).length === 0 ? {} : { body };
|
|
271
|
+
}
|
|
272
|
+
var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
|
|
273
|
+
function openRouterRequest(settings) {
|
|
274
|
+
const headers = mergeHeaders2({
|
|
275
|
+
...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
|
|
276
|
+
...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
|
|
277
|
+
...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
|
|
278
|
+
}, settings.headers) ?? {};
|
|
279
|
+
return Object.keys(headers).length === 0 ? {} : { headers };
|
|
280
|
+
}
|
|
281
|
+
var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
|
|
282
|
+
var Credentials = Schema.Struct({
|
|
283
|
+
accessKeyId: Schema.String,
|
|
284
|
+
secretAccessKey: Schema.String,
|
|
285
|
+
sessionToken: lenient(Schema.String),
|
|
286
|
+
region: lenient(Schema.String)
|
|
287
|
+
});
|
|
288
|
+
var Legacy = Schema.StructWithRest(Schema.Struct({
|
|
289
|
+
apiKey: lenient(Schema.String),
|
|
290
|
+
baseURL: lenient(Schema.String),
|
|
291
|
+
headers: lenient(Schema.Record(Schema.String, Schema.String)),
|
|
292
|
+
extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
|
|
293
|
+
useCompletionUrls: lenient(Schema.Boolean),
|
|
294
|
+
auth: lenient(Schema.Literals(["bearer", "sigv4"])),
|
|
295
|
+
bearerToken: lenient(Schema.String),
|
|
296
|
+
endpoint: lenient(Schema.String),
|
|
297
|
+
region: lenient(Schema.String),
|
|
298
|
+
credentials: lenient(Credentials),
|
|
299
|
+
accessKeyId: lenient(Schema.String),
|
|
300
|
+
secretAccessKey: lenient(Schema.String),
|
|
301
|
+
sessionToken: lenient(Schema.String),
|
|
302
|
+
anthropicBeta: lenient(Schema.Array(Schema.String)),
|
|
303
|
+
serviceTier: lenient(Schema.String),
|
|
304
|
+
reasoningConfig: lenient(Schema.Struct({
|
|
305
|
+
type: lenient(Schema.String),
|
|
306
|
+
display: lenient(Schema.String),
|
|
307
|
+
maxReasoningEffort: lenient(Schema.String),
|
|
308
|
+
budgetTokens: lenient(Schema.Number)
|
|
309
|
+
})),
|
|
310
|
+
additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
|
|
311
|
+
anthropic_beta: lenient(Schema.Array(Schema.String)),
|
|
312
|
+
output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
|
|
313
|
+
reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
|
|
314
|
+
}), [Schema.Record(Schema.String, Schema.Unknown)])),
|
|
315
|
+
appName: lenient(Schema.String),
|
|
316
|
+
appUrl: lenient(Schema.String),
|
|
317
|
+
api_keys: lenient(Schema.Record(Schema.String, Schema.String))
|
|
318
|
+
}), [Schema.Record(Schema.String, Schema.Unknown)]);
|
|
319
|
+
var decode = Schema.decodeUnknownSync(Legacy);
|
|
320
|
+
|
|
321
|
+
// src/provider.ts
|
|
74
322
|
import { Event as Event17 } from "@opencode/schema/provider";
|
|
75
323
|
var ID13 = Provider.ID;
|
|
76
324
|
var AISDK_PREFIX2 = "aisdk:";
|
|
@@ -83,12 +331,12 @@ function packageName2(value) {
|
|
|
83
331
|
return value;
|
|
84
332
|
return value.slice(AISDK_PREFIX2.length);
|
|
85
333
|
}
|
|
86
|
-
var JsonRecord =
|
|
87
|
-
var decodeJsonRecord =
|
|
334
|
+
var JsonRecord = Schema2.Record(Schema2.String, Schema2.Json);
|
|
335
|
+
var decodeJsonRecord = Schema2.decodeUnknownSync(JsonRecord);
|
|
88
336
|
|
|
89
|
-
class LoadError3 extends
|
|
90
|
-
package:
|
|
91
|
-
cause:
|
|
337
|
+
class LoadError3 extends Schema2.TaggedError()("Provider.LoadError", {
|
|
338
|
+
package: Schema2.String,
|
|
339
|
+
cause: Schema2.Defect()
|
|
92
340
|
}) {
|
|
93
341
|
}
|
|
94
342
|
var packages = new Map;
|
|
@@ -198,12 +446,12 @@ var builtins = new Map([
|
|
|
198
446
|
]
|
|
199
447
|
]);
|
|
200
448
|
var builtinPackages2 = new Set(builtins.keys());
|
|
201
|
-
var loadPackage2 =
|
|
449
|
+
var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
|
|
202
450
|
const specifier = packageName2(input);
|
|
203
451
|
const builtin = builtins.get(specifier);
|
|
204
452
|
if (builtin)
|
|
205
453
|
return yield* importPackage(specifier, specifier, builtin);
|
|
206
|
-
const resolved = yield*
|
|
454
|
+
const resolved = yield* Effect2.sync(() => {
|
|
207
455
|
if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
|
|
208
456
|
return specifier;
|
|
209
457
|
try {
|
|
@@ -222,8 +470,8 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
|
|
|
222
470
|
}
|
|
223
471
|
const parts = specifier.split("/");
|
|
224
472
|
const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
|
|
225
|
-
const installed = yield* npm.add(root).pipe(
|
|
226
|
-
const entrypoint = yield*
|
|
473
|
+
const installed = yield* npm.add(root).pipe(Effect2.mapError((cause) => new LoadError3({ package: specifier, cause })));
|
|
474
|
+
const entrypoint = yield* Effect2.try({
|
|
227
475
|
try: () => resolveModule(specifier, installed.directory),
|
|
228
476
|
catch: (cause) => new LoadError3({ package: specifier, cause })
|
|
229
477
|
});
|
|
@@ -232,16 +480,16 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
|
|
|
232
480
|
var CORE_KEYS = ["chunkTimeout", "compaction", "encoding", "fetch", "headerTimeout", "timeout", "transport"];
|
|
233
481
|
var PROVIDER_ONLY_KEYS = ["chunkTimeout", "headerTimeout", "timeout", "transport"];
|
|
234
482
|
function nativeSettings2(settings) {
|
|
235
|
-
return
|
|
483
|
+
return Struct2.omit(settings, CORE_KEYS);
|
|
236
484
|
}
|
|
237
485
|
function modelSettings2(settings) {
|
|
238
|
-
return settings &&
|
|
486
|
+
return settings && Struct2.omit(settings, PROVIDER_ONLY_KEYS);
|
|
239
487
|
}
|
|
240
|
-
var decodeTimeout =
|
|
488
|
+
var decodeTimeout = Schema2.decodeUnknownOption(HttpTimeout);
|
|
241
489
|
var DEFAULT_TIMEOUT_MS3 = 300000;
|
|
242
490
|
var DEFAULT_CHUNK_TIMEOUT_MS2 = 900000;
|
|
243
491
|
function timeout2(value) {
|
|
244
|
-
return
|
|
492
|
+
return Option2.getOrUndefined(decodeTimeout(value));
|
|
245
493
|
}
|
|
246
494
|
function timeouts2(settings) {
|
|
247
495
|
return {
|
|
@@ -250,9 +498,9 @@ function timeouts2(settings) {
|
|
|
250
498
|
chunkTimeout: timeout2(settings.chunkTimeout) ?? DEFAULT_CHUNK_TIMEOUT_MS2
|
|
251
499
|
};
|
|
252
500
|
}
|
|
253
|
-
var decodeEncoding =
|
|
501
|
+
var decodeEncoding = Schema2.decodeUnknownOption(Provider.Encoding);
|
|
254
502
|
function encoding2(settings) {
|
|
255
|
-
return
|
|
503
|
+
return Option2.getOrUndefined(decodeEncoding(settings.encoding));
|
|
256
504
|
}
|
|
257
505
|
function mergeOverlay2(base, overlay) {
|
|
258
506
|
if (base === undefined)
|
|
@@ -285,7 +533,7 @@ var Transport2 = Provider.Transport;
|
|
|
285
533
|
var Settings2 = Provider.Settings;
|
|
286
534
|
var Info22 = Provider.Info;
|
|
287
535
|
|
|
288
|
-
class
|
|
536
|
+
class Service78 extends Context.Service()("@opencode/Provider") {
|
|
289
537
|
}
|
|
290
538
|
var definitions = new WeakMap;
|
|
291
539
|
function index(providerID, models) {
|
|
@@ -298,10 +546,10 @@ function index(providerID, models) {
|
|
|
298
546
|
definitions.set(models, indexes);
|
|
299
547
|
return result;
|
|
300
548
|
}
|
|
301
|
-
var layer = Layer.effect(
|
|
302
|
-
const bus = yield*
|
|
549
|
+
var layer = Layer.effect(Service78, Effect2.gen(function* () {
|
|
550
|
+
const bus = yield* Service85;
|
|
303
551
|
const integrations = yield* Service80;
|
|
304
|
-
const location = yield*
|
|
552
|
+
const location = yield* Service79;
|
|
305
553
|
const state = create3({
|
|
306
554
|
name: "provider",
|
|
307
555
|
initial: () => new Map,
|
|
@@ -380,9 +628,9 @@ var layer = Layer.effect(Service74, Effect.gen(function* () {
|
|
|
380
628
|
},
|
|
381
629
|
notify: () => notify
|
|
382
630
|
});
|
|
383
|
-
yield*
|
|
631
|
+
yield* Effect2.addFinalizer(() => shutdown2(state.reload()));
|
|
384
632
|
let cached;
|
|
385
|
-
const snapshot =
|
|
633
|
+
const snapshot = Effect2.fn("Provider.snapshot")(function* () {
|
|
386
634
|
while (true) {
|
|
387
635
|
const revision = integrations.revision();
|
|
388
636
|
const records = state.get();
|
|
@@ -393,7 +641,7 @@ var layer = Layer.effect(Service74, Effect.gen(function* () {
|
|
|
393
641
|
const available = Array.from(records.values()).filter((record) => {
|
|
394
642
|
if (record.provider.activation === "disabled")
|
|
395
643
|
return false;
|
|
396
|
-
const integration = byID.get(record.provider.integrationID ??
|
|
644
|
+
const integration = byID.get(record.provider.integrationID ?? ID14.make(record.provider.id));
|
|
397
645
|
if (record.sourceConnection && key2(record.sourceConnection) !== key2(integration?.connections[0]))
|
|
398
646
|
return false;
|
|
399
647
|
if (record.provider.activation === "enabled")
|
|
@@ -410,7 +658,7 @@ var layer = Layer.effect(Service74, Effect.gen(function* () {
|
|
|
410
658
|
}
|
|
411
659
|
});
|
|
412
660
|
let published;
|
|
413
|
-
const notify =
|
|
661
|
+
const notify = Effect2.gen(function* () {
|
|
414
662
|
const value = yield* snapshot();
|
|
415
663
|
if (value === published)
|
|
416
664
|
return;
|
|
@@ -419,19 +667,19 @@ var layer = Layer.effect(Service74, Effect.gen(function* () {
|
|
|
419
667
|
location: { directory: location.directory, workspaceID: location.workspaceID }
|
|
420
668
|
});
|
|
421
669
|
});
|
|
422
|
-
yield* bus.subscribe([
|
|
423
|
-
return
|
|
670
|
+
yield* bus.subscribe([Event18.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect2.forkScoped({ startImmediately: true }));
|
|
671
|
+
return Service78.of({
|
|
424
672
|
transform: state.transform,
|
|
425
673
|
reload: state.reload,
|
|
426
|
-
get:
|
|
427
|
-
all:
|
|
428
|
-
available:
|
|
674
|
+
get: Effect2.fn("Provider.get")((id) => Effect2.sync(() => freeze(state.get().get(id)?.provider, true))),
|
|
675
|
+
all: Effect2.fn("Provider.all")(() => Effect2.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
|
|
676
|
+
available: Effect2.fn("Provider.available")(() => snapshot().pipe(Effect2.map((value) => value.providers))),
|
|
429
677
|
snapshot
|
|
430
678
|
});
|
|
431
679
|
}));
|
|
432
|
-
var
|
|
433
|
-
var importPackage =
|
|
434
|
-
const module = yield*
|
|
680
|
+
var node82 = makeLocationNode({ service: Service78, layer, deps: [node89, node84, node83] });
|
|
681
|
+
var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
|
|
682
|
+
const module = yield* Effect2.tryPromise({
|
|
435
683
|
try: () => {
|
|
436
684
|
const existing = packages.get(entrypoint);
|
|
437
685
|
if (existing)
|
|
@@ -451,252 +699,4 @@ var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, en
|
|
|
451
699
|
return module;
|
|
452
700
|
});
|
|
453
701
|
|
|
454
|
-
|
|
455
|
-
function rewrite2(target, input) {
|
|
456
|
-
if (input.specifier === undefined)
|
|
457
|
-
return;
|
|
458
|
-
const plain = resolve(input.specifier, input);
|
|
459
|
-
if (!plain)
|
|
460
|
-
return;
|
|
461
|
-
const settings = decode(target.settings ?? {});
|
|
462
|
-
const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
|
|
463
|
-
const translated = options(replacement, input.modelID, settings);
|
|
464
|
-
if (target.package !== undefined || replacement !== input.specifier)
|
|
465
|
-
target.package = replacement;
|
|
466
|
-
const identity = replacement === "@opencode/ai/providers/openai-compatible" && !builtinPackages2.has(input.specifier) ? { provider: input.canonical ?? input.providerID } : {};
|
|
467
|
-
target.settings = target.settings === undefined ? undefined : { ...translated.settings, ...identity };
|
|
468
|
-
target.headers = mergeHeaders2(translated.headers, target.headers);
|
|
469
|
-
target.body = mergeOverlay2(translated.body, target.body);
|
|
470
|
-
target.variants = target.variants?.map((variant) => {
|
|
471
|
-
const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
|
|
472
|
-
const headers = mergeHeaders2(overlay.headers, variant.headers);
|
|
473
|
-
const body = mergeOverlay2(overlay.body, variant.body);
|
|
474
|
-
return {
|
|
475
|
-
id: variant.id,
|
|
476
|
-
...variant.settings === undefined ? {} : { settings: overlay.settings },
|
|
477
|
-
...headers === undefined ? {} : { headers },
|
|
478
|
-
...body === undefined ? {} : { body }
|
|
479
|
-
};
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
var PACKAGES = {
|
|
483
|
-
"@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
|
|
484
|
-
"@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
|
|
485
|
-
"@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
|
|
486
|
-
"@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
|
|
487
|
-
"@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
|
|
488
|
-
"@ai-sdk/cohere": "@opencode/ai/providers/cohere",
|
|
489
|
-
"@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
|
|
490
|
-
"@ai-sdk/google": "@opencode/ai/providers/google",
|
|
491
|
-
"@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
|
|
492
|
-
"@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
|
|
493
|
-
"@ai-sdk/groq": "@opencode/ai/providers/groq",
|
|
494
|
-
"@ai-sdk/mistral": "@opencode/ai/providers/mistral",
|
|
495
|
-
"@ai-sdk/openai": "@opencode/ai/providers/openai",
|
|
496
|
-
"@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
|
|
497
|
-
"@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
|
|
498
|
-
"@ai-sdk/xai": "@opencode/ai/providers/xai",
|
|
499
|
-
"@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
|
|
500
|
-
"@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
|
|
501
|
-
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
502
|
-
"venice-ai-sdk-provider": "@opencode/ai/providers/venice"
|
|
503
|
-
};
|
|
504
|
-
var protocols = (name) => ({
|
|
505
|
-
"@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
|
|
506
|
-
"@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
|
|
507
|
-
"@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
|
|
508
|
-
});
|
|
509
|
-
var HOSTS = {
|
|
510
|
-
alibaba: protocols("alibaba"),
|
|
511
|
-
"alibaba-cn": protocols("alibaba"),
|
|
512
|
-
"alibaba-coding-plan": protocols("alibaba"),
|
|
513
|
-
"alibaba-coding-plan-cn": protocols("alibaba"),
|
|
514
|
-
"alibaba-token-plan": protocols("alibaba"),
|
|
515
|
-
"alibaba-token-plan-cn": protocols("alibaba"),
|
|
516
|
-
baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
|
|
517
|
-
"cloudflare-ai-gateway": {
|
|
518
|
-
"@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
519
|
-
"@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
520
|
-
"@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
|
|
521
|
-
"ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
|
|
522
|
-
},
|
|
523
|
-
cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
|
|
524
|
-
"cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
|
|
525
|
-
deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
|
|
526
|
-
digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
|
|
527
|
-
"fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
|
|
528
|
-
"google-vertex": {
|
|
529
|
-
"@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat",
|
|
530
|
-
"@ai-sdk/mistral": "@opencode/ai/providers/google-vertex/mistral"
|
|
531
|
-
},
|
|
532
|
-
"kimi-for-coding": protocols("moonshot"),
|
|
533
|
-
meta: protocols("meta"),
|
|
534
|
-
minimax: protocols("minimax"),
|
|
535
|
-
"minimax-cn": protocols("minimax"),
|
|
536
|
-
"minimax-coding-plan": protocols("minimax"),
|
|
537
|
-
"minimax-cn-coding-plan": protocols("minimax"),
|
|
538
|
-
moonshotai: protocols("moonshot"),
|
|
539
|
-
"moonshotai-cn": protocols("moonshot"),
|
|
540
|
-
zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
541
|
-
"zai-coding-plan": protocols("zai-coding-plan"),
|
|
542
|
-
zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
|
|
543
|
-
"zhipuai-coding-plan": protocols("zai-coding-plan")
|
|
544
|
-
};
|
|
545
|
-
function native2(npm, context) {
|
|
546
|
-
const host = HOSTS[context.providerID]?.[npm];
|
|
547
|
-
if (host)
|
|
548
|
-
return host;
|
|
549
|
-
if (npm === "@ai-sdk/amazon-bedrock/mantle")
|
|
550
|
-
return mantle(context.modelID);
|
|
551
|
-
if (npm === "@ai-sdk/azure" && azureChat(context))
|
|
552
|
-
return "@opencode/ai/providers/azure/chat";
|
|
553
|
-
return PACKAGES[npm];
|
|
554
|
-
}
|
|
555
|
-
var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
|
|
556
|
-
var mantle = (modelID) => {
|
|
557
|
-
if (modelID === undefined)
|
|
558
|
-
return "@opencode/ai/providers/amazon-bedrock/mantle";
|
|
559
|
-
if (modelID.includes("anthropic."))
|
|
560
|
-
return "@opencode/ai/providers/amazon-bedrock/mantle/messages";
|
|
561
|
-
return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
|
|
562
|
-
};
|
|
563
|
-
function resolve(specifier, context) {
|
|
564
|
-
const npm = packageName2(specifier);
|
|
565
|
-
if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
|
|
566
|
-
return native2(npm, context);
|
|
567
|
-
if (npm === "@opencode/ai/providers/amazon-bedrock/mantle" || npm === "@opencode/ai/providers/amazon-bedrock-mantle")
|
|
568
|
-
return mantle(context.modelID);
|
|
569
|
-
if ((npm === "@opencode/ai/providers/azure" || npm === "@opencode/ai/providers/azure/responses") && azureChat(context))
|
|
570
|
-
return "@opencode/ai/providers/azure/chat";
|
|
571
|
-
return builtinPackages2.has(npm) ? npm : undefined;
|
|
572
|
-
}
|
|
573
|
-
function options(replacement, modelID, settings) {
|
|
574
|
-
const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
|
|
575
|
-
const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
|
|
576
|
-
const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
|
|
577
|
-
return {
|
|
578
|
-
settings: {
|
|
579
|
-
...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
|
|
580
|
-
...thinking === undefined ? {} : { thinking }
|
|
581
|
-
},
|
|
582
|
-
...settings.headers === undefined ? {} : { headers: settings.headers },
|
|
583
|
-
...settings.extraBody === undefined ? {} : { body: settings.extraBody },
|
|
584
|
-
...converse ? bedrockRequest(modelID, settings) : {},
|
|
585
|
-
...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
var BEDROCK_KEYS = [
|
|
589
|
-
"bearerToken",
|
|
590
|
-
"endpoint",
|
|
591
|
-
"credentials",
|
|
592
|
-
"credentialProvider",
|
|
593
|
-
"accessKeyId",
|
|
594
|
-
"secretAccessKey",
|
|
595
|
-
"sessionToken"
|
|
596
|
-
];
|
|
597
|
-
var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
|
|
598
|
-
function bedrockSettings(settings, converse) {
|
|
599
|
-
const region = settings.region ?? settings.credentials?.region;
|
|
600
|
-
const credentials = settings.credentials ?? settings;
|
|
601
|
-
const baseURL = settings.baseURL ?? settings.endpoint;
|
|
602
|
-
return {
|
|
603
|
-
...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
|
|
604
|
-
...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
|
|
605
|
-
...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
|
|
606
|
-
...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
|
|
607
|
-
credentials: {
|
|
608
|
-
...region === undefined ? {} : { region },
|
|
609
|
-
accessKeyId: credentials.accessKeyId,
|
|
610
|
-
secretAccessKey: credentials.secretAccessKey,
|
|
611
|
-
...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
};
|
|
615
|
-
}
|
|
616
|
-
function bedrockThinking(modelID, settings) {
|
|
617
|
-
const reasoning = settings.reasoningConfig;
|
|
618
|
-
if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
|
|
619
|
-
return;
|
|
620
|
-
return { type: "enabled", budgetTokens: reasoning.budgetTokens };
|
|
621
|
-
}
|
|
622
|
-
function bedrockRequest(modelID, settings) {
|
|
623
|
-
const additional = settings.additionalModelRequestFields ?? {};
|
|
624
|
-
const reasoning = settings.reasoningConfig;
|
|
625
|
-
const anthropic = modelID?.includes("anthropic") ?? false;
|
|
626
|
-
const openai = modelID?.includes("openai.") ?? false;
|
|
627
|
-
const harmony = modelID?.includes("openai.gpt-oss") ?? false;
|
|
628
|
-
const effort = reasoning?.maxReasoningEffort;
|
|
629
|
-
const type = reasoning?.type;
|
|
630
|
-
const budget = reasoning?.budgetTokens;
|
|
631
|
-
const display = reasoning?.display;
|
|
632
|
-
const betas = settings.anthropicBeta ?? [];
|
|
633
|
-
const fields = mergeOverlay2(additional, {
|
|
634
|
-
...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
|
|
635
|
-
...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
|
|
636
|
-
...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
|
|
637
|
-
...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
|
|
638
|
-
...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
|
|
639
|
-
...!anthropic && !openai && effort !== undefined ? {
|
|
640
|
-
reasoningConfig: {
|
|
641
|
-
...type === undefined || type === "adaptive" ? {} : { type },
|
|
642
|
-
...budget === undefined ? {} : { budgetTokens: budget },
|
|
643
|
-
maxReasoningEffort: effort
|
|
644
|
-
}
|
|
645
|
-
} : {}
|
|
646
|
-
});
|
|
647
|
-
const body = {
|
|
648
|
-
...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
|
|
649
|
-
...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
|
|
650
|
-
};
|
|
651
|
-
return Object.keys(body).length === 0 ? {} : { body };
|
|
652
|
-
}
|
|
653
|
-
var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
|
|
654
|
-
function openRouterRequest(settings) {
|
|
655
|
-
const headers = mergeHeaders2({
|
|
656
|
-
...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
|
|
657
|
-
...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
|
|
658
|
-
...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
|
|
659
|
-
}, settings.headers) ?? {};
|
|
660
|
-
return Object.keys(headers).length === 0 ? {} : { headers };
|
|
661
|
-
}
|
|
662
|
-
var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option2.some(undefined)))));
|
|
663
|
-
var Credentials = Schema2.Struct({
|
|
664
|
-
accessKeyId: Schema2.String,
|
|
665
|
-
secretAccessKey: Schema2.String,
|
|
666
|
-
sessionToken: lenient(Schema2.String),
|
|
667
|
-
region: lenient(Schema2.String)
|
|
668
|
-
});
|
|
669
|
-
var Legacy = Schema2.StructWithRest(Schema2.Struct({
|
|
670
|
-
apiKey: lenient(Schema2.String),
|
|
671
|
-
baseURL: lenient(Schema2.String),
|
|
672
|
-
headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
|
|
673
|
-
extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
|
|
674
|
-
useCompletionUrls: lenient(Schema2.Boolean),
|
|
675
|
-
auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
|
|
676
|
-
bearerToken: lenient(Schema2.String),
|
|
677
|
-
endpoint: lenient(Schema2.String),
|
|
678
|
-
region: lenient(Schema2.String),
|
|
679
|
-
credentials: lenient(Credentials),
|
|
680
|
-
accessKeyId: lenient(Schema2.String),
|
|
681
|
-
secretAccessKey: lenient(Schema2.String),
|
|
682
|
-
sessionToken: lenient(Schema2.String),
|
|
683
|
-
anthropicBeta: lenient(Schema2.Array(Schema2.String)),
|
|
684
|
-
serviceTier: lenient(Schema2.String),
|
|
685
|
-
reasoningConfig: lenient(Schema2.Struct({
|
|
686
|
-
type: lenient(Schema2.String),
|
|
687
|
-
display: lenient(Schema2.String),
|
|
688
|
-
maxReasoningEffort: lenient(Schema2.String),
|
|
689
|
-
budgetTokens: lenient(Schema2.Number)
|
|
690
|
-
})),
|
|
691
|
-
additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
|
|
692
|
-
anthropic_beta: lenient(Schema2.Array(Schema2.String)),
|
|
693
|
-
output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
|
|
694
|
-
reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
|
|
695
|
-
}), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
|
|
696
|
-
appName: lenient(Schema2.String),
|
|
697
|
-
appUrl: lenient(Schema2.String),
|
|
698
|
-
api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
|
|
699
|
-
}), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
|
|
700
|
-
var decode = Schema2.decodeUnknownSync(Legacy);
|
|
701
|
-
|
|
702
|
-
export { rewrite2, native2, exports_aisdk_native, ID13, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, builtinPackages2, loadPackage2, nativeSettings2, modelSettings2, DEFAULT_TIMEOUT_MS3, DEFAULT_CHUNK_TIMEOUT_MS2, timeout2, timeouts2, encoding2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info22, Service74, node78, exports_provider3, Event17 };
|
|
702
|
+
export { ID13, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, builtinPackages2, loadPackage2, nativeSettings2, modelSettings2, DEFAULT_TIMEOUT_MS3, DEFAULT_CHUNK_TIMEOUT_MS2, timeout2, timeouts2, encoding2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info22, Service78, node82, exports_provider3, Event17, rewrite2, native2, exports_aisdk_native };
|