@opencode/core 0.0.0-dev-21557 → 0.0.0-dev-21561

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.
Files changed (791) hide show
  1. package/dist/account/sql.js +1 -1
  2. package/dist/agent.js +79 -79
  3. package/dist/aisdk-native.js +91 -91
  4. package/dist/aisdk.js +97 -97
  5. package/dist/app.js +9 -9
  6. package/dist/bus.js +75 -75
  7. package/dist/chunks/model-resolver-0207mz92.js +523 -0
  8. package/dist/chunks/{command-034tev2y.js → model-resolver-034tev2y.js} +2 -2
  9. package/dist/chunks/{command-2mq1h16s.js → model-resolver-0421tmwc.js} +9 -9
  10. package/dist/chunks/{command-mvnn9g24.js → model-resolver-08ftexb4.js} +22 -22
  11. package/dist/chunks/{command-wrc6k2zh.js → model-resolver-0anhksjf.js} +11 -11
  12. package/dist/chunks/{command-zhdc5kpb.js → model-resolver-0jqtqcam.js} +11 -11
  13. package/dist/chunks/{command-4ezxk448.js → model-resolver-0pkr6qt9.js} +56 -56
  14. package/dist/chunks/{command-pex2677d.js → model-resolver-0rq01gt9.js} +5 -5
  15. package/dist/chunks/{command-8qcf7amm.js → model-resolver-0s4gbdd0.js} +10 -10
  16. package/dist/chunks/{command-y4g1qmba.js → model-resolver-0sd3e6sm.js} +9 -9
  17. package/dist/chunks/{command-p6d0b62k.js → model-resolver-158zhnz6.js} +12 -12
  18. package/dist/chunks/{command-sjs7wga1.js → model-resolver-1dpax7s7.js} +35 -35
  19. package/dist/chunks/{command-1ep2p91f.js → model-resolver-1ep2p91f.js} +2 -2
  20. package/dist/chunks/{command-cb62p8s9.js → model-resolver-1mznh3r2.js} +25 -25
  21. package/dist/chunks/{command-zxqtx2gp.js → model-resolver-1sdsfpt0.js} +36 -36
  22. package/dist/chunks/{command-6827pfxn.js → model-resolver-1x2knyw4.js} +1 -1
  23. package/dist/chunks/{command-jr2eqasw.js → model-resolver-2hdav3qx.js} +5 -5
  24. package/dist/chunks/{command-dmn8f3fz.js → model-resolver-2jk202a8.js} +37 -37
  25. package/dist/chunks/model-resolver-2vwdzrer.js +26 -0
  26. package/dist/chunks/{command-3y689znq.js → model-resolver-2yjk1ef9.js} +18 -18
  27. package/dist/chunks/{command-9wev2pgg.js → model-resolver-2z1j29yd.js} +1 -1
  28. package/dist/chunks/{command-yy8p69dz.js → model-resolver-361xprba.js} +16 -16
  29. package/dist/chunks/{command-w4axh9wz.js → model-resolver-362tp65q.js} +4 -4
  30. package/dist/chunks/{command-jrvn3mqz.js → model-resolver-3f2dq5js.js} +32 -32
  31. package/dist/chunks/{command-985ktdsx.js → model-resolver-3gs3gk71.js} +14 -14
  32. package/dist/chunks/{command-3hepkmqq.js → model-resolver-3hepkmqq.js} +1 -1
  33. package/dist/chunks/{command-8zg8p5q1.js → model-resolver-3j7gb19e.js} +19 -19
  34. package/dist/chunks/{command-54ma36ye.js → model-resolver-3nnrz6f6.js} +1 -1
  35. package/dist/chunks/{command-rzsyqtcs.js → model-resolver-3tvx83bq.js} +20 -20
  36. package/dist/chunks/{command-bhfmjk30.js → model-resolver-3vvx3qkg.js} +19 -19
  37. package/dist/chunks/{command-1kxdjam0.js → model-resolver-40fhy2zt.js} +17 -17
  38. package/dist/chunks/{command-wjr9rjd7.js → model-resolver-40za9wsf.js} +6 -6
  39. package/dist/chunks/{command-mfj0sxs3.js → model-resolver-42pj4rzv.js} +24 -24
  40. package/dist/chunks/{command-xdhksg1q.js → model-resolver-4755v7r3.js} +12 -12
  41. package/dist/chunks/{command-1t3hpytd.js → model-resolver-4anvj0nz.js} +81 -81
  42. package/dist/chunks/{command-dthc0v3v.js → model-resolver-4c6mfys4.js} +1 -1
  43. package/dist/chunks/{command-qsyf62v5.js → model-resolver-4kxf6a3x.js} +315 -311
  44. package/dist/chunks/{command-jr0r6h1g.js → model-resolver-4m6zstw0.js} +3 -3
  45. package/dist/chunks/{command-zr2ceqn5.js → model-resolver-4v008n1t.js} +1 -1
  46. package/dist/chunks/{command-qp7m8750.js → model-resolver-4xvmh7wp.js} +3 -3
  47. package/dist/chunks/model-resolver-53mdf58s.js +257 -0
  48. package/dist/chunks/{command-r57we6b1.js → model-resolver-56fqbvhs.js} +5 -5
  49. package/dist/chunks/{command-xsq7pz40.js → model-resolver-57y02hse.js} +12 -12
  50. package/dist/chunks/{command-jbxhns51.js → model-resolver-5brge8v8.js} +40 -40
  51. package/dist/chunks/{command-stq6srjr.js → model-resolver-5defca7t.js} +24 -24
  52. package/dist/chunks/{command-02g7aebq.js → model-resolver-5df887yz.js} +19 -19
  53. package/dist/chunks/{command-m26n4tkg.js → model-resolver-5f9n2b02.js} +4 -4
  54. package/dist/chunks/{command-5m9w47nd.js → model-resolver-5m9w47nd.js} +1 -1
  55. package/dist/chunks/{command-qakj2yt3.js → model-resolver-5ttwsr6z.js} +3 -3
  56. package/dist/chunks/{command-46jxkehv.js → model-resolver-5w7y85jn.js} +20 -20
  57. package/dist/chunks/{command-k7myrtme.js → model-resolver-66rk6f56.js} +9 -9
  58. package/dist/chunks/{command-smsqhasw.js → model-resolver-6a4kxdj8.js} +27 -27
  59. package/dist/chunks/{command-cqz7n2wt.js → model-resolver-6czmj677.js} +4 -4
  60. package/dist/chunks/{command-zxq2ej10.js → model-resolver-6esdw8yj.js} +1 -1
  61. package/dist/chunks/{command-9hq0xw37.js → model-resolver-6gsynj7k.js} +13 -13
  62. package/dist/chunks/{command-qsdy395h.js → model-resolver-6pjqjmy2.js} +1 -1
  63. package/dist/chunks/{command-fcyg4h47.js → model-resolver-6xqtcmxs.js} +2 -2
  64. package/dist/chunks/{command-3qfe0xj5.js → model-resolver-71ne8d3w.js} +8 -8
  65. package/dist/chunks/{command-kx57zey2.js → model-resolver-7454dw3e.js} +9 -9
  66. package/dist/chunks/{command-tcezcvh9.js → model-resolver-76cb1hcw.js} +1 -1
  67. package/dist/chunks/{command-bzeyqsqd.js → model-resolver-770pw0s1.js} +4 -4
  68. package/dist/chunks/{command-7bmhse3q.js → model-resolver-7bmhse3q.js} +1 -1
  69. package/dist/chunks/{command-epa6at65.js → model-resolver-7crfef3m.js} +26 -26
  70. package/dist/chunks/{command-ze3ntbvb.js → model-resolver-7p0hmyjt.js} +7 -7
  71. package/dist/chunks/{command-xdydn0yk.js → model-resolver-7s9p8b5q.js} +16 -16
  72. package/dist/chunks/{command-7vcph9c5.js → model-resolver-7sjdmqaj.js} +7 -7
  73. package/dist/chunks/{command-xe70zbdz.js → model-resolver-7v23t0sn.js} +5 -5
  74. package/dist/chunks/{command-ad8kq2nc.js → model-resolver-7vwgx2kr.js} +3 -3
  75. package/dist/chunks/{command-kwb1v3vj.js → model-resolver-7w2ypzdf.js} +1 -1
  76. package/dist/chunks/{command-6qf2y9ve.js → model-resolver-7we14xxk.js} +33 -33
  77. package/dist/chunks/{command-6ftnd7nz.js → model-resolver-7wxq9ndj.js} +13 -13
  78. package/dist/chunks/{command-xr5vn762.js → model-resolver-817tby3n.js} +6 -6
  79. package/dist/chunks/{command-5rk2deda.js → model-resolver-81veg7gk.js} +21 -21
  80. package/dist/chunks/{command-dsk8q8my.js → model-resolver-84pze0j7.js} +23 -23
  81. package/dist/chunks/{command-pazb1tph.js → model-resolver-873tmn1d.js} +8 -8
  82. package/dist/chunks/{command-cng6dfxk.js → model-resolver-8eay0v1g.js} +9 -9
  83. package/dist/chunks/{command-mjzferrs.js → model-resolver-8h5ae6e1.js} +3 -3
  84. package/dist/chunks/{command-h6vf3j39.js → model-resolver-8wtp7s3z.js} +1 -1
  85. package/dist/chunks/{command-h8vwnyd8.js → model-resolver-91rj84md.js} +1 -1
  86. package/dist/chunks/{command-998yhzzq.js → model-resolver-998yhzzq.js} +3 -3
  87. package/dist/chunks/{command-6a980ypm.js → model-resolver-9afz5xhg.js} +29 -29
  88. package/dist/chunks/{command-gawvjx7k.js → model-resolver-9tj4b67g.js} +13 -13
  89. package/dist/chunks/{command-rxmh8njq.js → model-resolver-9ts33eg0.js} +32 -32
  90. package/dist/chunks/{command-twx1y9b4.js → model-resolver-9ygq16qa.js} +28 -28
  91. package/dist/chunks/{command-kn6pff13.js → model-resolver-a0v55zen.js} +22 -22
  92. package/dist/chunks/{command-s7cy65rz.js → model-resolver-a3em8wep.js} +20 -20
  93. package/dist/chunks/{command-bhk6njy6.js → model-resolver-acmwnmb8.js} +24 -24
  94. package/dist/chunks/{command-5kc27ehr.js → model-resolver-ad0b5xxd.js} +12 -12
  95. package/dist/chunks/{command-xewwdcxe.js → model-resolver-ag809kpc.js} +18 -18
  96. package/dist/chunks/{command-4bz0312p.js → model-resolver-aj85frbb.js} +11 -11
  97. package/dist/chunks/{command-02hctrc4.js → model-resolver-an85mpdk.js} +12 -12
  98. package/dist/chunks/{command-1sqf9bkf.js → model-resolver-asaqahta.js} +8 -8
  99. package/dist/chunks/{command-tfzngn12.js → model-resolver-atkwrhtv.js} +4 -4
  100. package/dist/chunks/{command-ayjs7tqn.js → model-resolver-ayjs7tqn.js} +2 -2
  101. package/dist/chunks/{command-3hwn7j4h.js → model-resolver-b0mv4wxm.js} +2 -2
  102. package/dist/chunks/{command-cr9hweqv.js → model-resolver-b6vsg801.js} +2 -2
  103. package/dist/chunks/{command-ft31182a.js → model-resolver-b6x45btx.js} +8 -8
  104. package/dist/chunks/{command-9e9hzcd0.js → model-resolver-b7gsrj05.js} +10 -10
  105. package/dist/chunks/{command-d1r1vdjn.js → model-resolver-bbv4y6ft.js} +31 -31
  106. package/dist/chunks/{command-g6x66mca.js → model-resolver-bgqkkabj.js} +9 -9
  107. package/dist/chunks/{command-ahsb9kpf.js → model-resolver-bh1et42v.js} +6 -6
  108. package/dist/chunks/{command-r61qxybf.js → model-resolver-bm4gstpq.js} +8 -8
  109. package/dist/chunks/{command-et97578y.js → model-resolver-bnjwp1w3.js} +31 -28
  110. package/dist/chunks/{command-psphhya3.js → model-resolver-c1526x78.js} +11 -11
  111. package/dist/chunks/{command-3w35w3cz.js → model-resolver-c7pkf0mg.js} +39 -39
  112. package/dist/chunks/{command-5g57z1ma.js → model-resolver-c9t2ty9q.js} +4 -4
  113. package/dist/chunks/{command-g38g0fz0.js → model-resolver-cbeaw478.js} +12 -12
  114. package/dist/chunks/{command-tbjtr317.js → model-resolver-cex2vn28.js} +16 -16
  115. package/dist/chunks/{command-6frn0zka.js → model-resolver-cf9s935f.js} +25 -25
  116. package/dist/chunks/{command-gdc5cpct.js → model-resolver-cn7xf0c3.js} +5 -5
  117. package/dist/chunks/{command-tx9w5tca.js → model-resolver-cs87y13h.js} +8 -8
  118. package/dist/chunks/{command-dz15z44q.js → model-resolver-cxrgknsm.js} +9 -9
  119. package/dist/chunks/{command-9c0aadwr.js → model-resolver-d2b9tqdk.js} +23 -23
  120. package/dist/chunks/{command-0vbcp93d.js → model-resolver-d4v9tmah.js} +2 -2
  121. package/dist/chunks/{command-0p5n951n.js → model-resolver-d6dkcx5p.js} +8 -8
  122. package/dist/chunks/{command-wsmpk9jk.js → model-resolver-d9jnkx5k.js} +5 -5
  123. package/dist/chunks/{command-t3e98aec.js → model-resolver-dfks5x0x.js} +17 -17
  124. package/dist/chunks/{command-j86wn4pa.js → model-resolver-dgebqdnd.js} +36 -36
  125. package/dist/chunks/{command-pc1v25hk.js → model-resolver-dh62xe4r.js} +3 -3
  126. package/dist/chunks/{command-yfxdcy39.js → model-resolver-dnenxkzx.js} +7 -7
  127. package/dist/chunks/{command-941r3f3m.js → model-resolver-dp37p1r3.js} +1 -1
  128. package/dist/chunks/{command-7d822byb.js → model-resolver-dqgvvwe0.js} +2 -2
  129. package/dist/chunks/{command-p3pg4pyc.js → model-resolver-dr3grpx5.js} +15 -15
  130. package/dist/chunks/{command-svwczm27.js → model-resolver-dv7jmtr8.js} +9 -9
  131. package/dist/chunks/{command-z28rahrh.js → model-resolver-dvg82dp6.js} +33 -33
  132. package/dist/chunks/{command-p51tpj98.js → model-resolver-dx2tr0e6.js} +9 -9
  133. package/dist/chunks/{command-mdzseb04.js → model-resolver-dx6zzgj2.js} +22 -22
  134. package/dist/chunks/{command-pv4gp5m4.js → model-resolver-dy267r6z.js} +2 -2
  135. package/dist/chunks/{command-vj35nasm.js → model-resolver-dy9wt3zt.js} +71 -71
  136. package/dist/chunks/{command-rhjbct0v.js → model-resolver-e5dqjz6v.js} +1 -1
  137. package/dist/chunks/{command-8m6m0r52.js → model-resolver-e834z07m.js} +1 -1
  138. package/dist/chunks/{command-ef5x83kb.js → model-resolver-ef5x83kb.js} +1 -1
  139. package/dist/chunks/{command-vvg7my21.js → model-resolver-ehfx068x.js} +19 -19
  140. package/dist/chunks/{command-he40rdb8.js → model-resolver-etxseyds.js} +13 -13
  141. package/dist/chunks/{command-egvdenqz.js → model-resolver-evdtckst.js} +4 -4
  142. package/dist/chunks/{command-8qh1wvz2.js → model-resolver-exrjm4ta.js} +4 -4
  143. package/dist/chunks/{command-dedmnvkb.js → model-resolver-f6j7cyhq.js} +22 -22
  144. package/dist/chunks/{command-5smgpg59.js → model-resolver-f6mq62gx.js} +11 -11
  145. package/dist/chunks/{command-z9pbab2f.js → model-resolver-fae4enn1.js} +11 -11
  146. package/dist/chunks/{command-tw1m0zds.js → model-resolver-fchqce7y.js} +45 -45
  147. package/dist/chunks/{command-fmv8kpsp.js → model-resolver-fe8knzhs.js} +4 -4
  148. package/dist/chunks/{command-n6mrmtb3.js → model-resolver-fffv3p7h.js} +1 -1
  149. package/dist/chunks/{command-v9a132p0.js → model-resolver-frxcbkbz.js} +27 -27
  150. package/dist/chunks/{command-6a9ggp3a.js → model-resolver-fvyt5ase.js} +3 -3
  151. package/dist/chunks/{command-qxhg3shq.js → model-resolver-fxhha7v6.js} +7 -7
  152. package/dist/chunks/{command-4znvr1ks.js → model-resolver-fywxn8yw.js} +50 -50
  153. package/dist/chunks/{command-btbmdjwj.js → model-resolver-g1e2r5aa.js} +4 -4
  154. package/dist/chunks/{command-eej6y6fw.js → model-resolver-g5h9c0rr.js} +2 -2
  155. package/dist/chunks/{command-57b9ws8p.js → model-resolver-g7esga4v.js} +1 -2
  156. package/dist/chunks/{command-vbamk4ns.js → model-resolver-gaxzewmp.js} +35 -35
  157. package/dist/chunks/{command-cemytqje.js → model-resolver-gcw2976b.js} +22 -22
  158. package/dist/chunks/{command-57myy5jh.js → model-resolver-gj8x1tda.js} +5 -5
  159. package/dist/chunks/model-resolver-grzehpz7.js +18 -0
  160. package/dist/chunks/{command-7ta6mr36.js → model-resolver-gs6sdnbe.js} +21 -21
  161. package/dist/chunks/{command-n6s6s5d0.js → model-resolver-gtxeab11.js} +47 -47
  162. package/dist/chunks/{command-gryy9691.js → model-resolver-gw73nvw6.js} +11 -11
  163. package/dist/chunks/{command-sfd6krag.js → model-resolver-gzrpk3yh.js} +12 -12
  164. package/dist/chunks/{command-6pn57h68.js → model-resolver-h3c848hf.js} +33 -33
  165. package/dist/chunks/{command-mgym7y53.js → model-resolver-h7r3kzq2.js} +54 -54
  166. package/dist/chunks/{command-9zygn7h7.js → model-resolver-hhs2jvjz.js} +9 -9
  167. package/dist/chunks/{command-3p9s8f8r.js → model-resolver-hqr24qw0.js} +5 -5
  168. package/dist/chunks/{command-q1y8bwa4.js → model-resolver-hrwraf01.js} +183 -183
  169. package/dist/chunks/{command-x6x33ar5.js → model-resolver-hs0nkh4s.js} +15 -15
  170. package/dist/chunks/{command-b11a7tx7.js → model-resolver-j113cymg.js} +1 -1
  171. package/dist/chunks/{command-v2x3p8dx.js → model-resolver-j9hjqqep.js} +32 -32
  172. package/dist/chunks/{command-bacj9t34.js → model-resolver-jcqm84fr.js} +9 -9
  173. package/dist/chunks/{command-66gqgwkw.js → model-resolver-jdgy95a6.js} +4 -4
  174. package/dist/chunks/{command-npm9b9zb.js → model-resolver-jf5na7rx.js} +5 -5
  175. package/dist/chunks/{command-wn13chhe.js → model-resolver-jg26tebj.js} +16 -16
  176. package/dist/chunks/{command-mjqjpb51.js → model-resolver-jm58kwny.js} +15 -15
  177. package/dist/chunks/{command-t7bcp663.js → model-resolver-k2x2dsy8.js} +5 -5
  178. package/dist/chunks/{command-vzs5sf6e.js → model-resolver-k814nvkf.js} +1 -1
  179. package/dist/chunks/{command-k98r0vz1.js → model-resolver-k9drn87y.js} +27 -27
  180. package/dist/chunks/{command-3tpbv33b.js → model-resolver-k9ms0q72.js} +4 -4
  181. package/dist/chunks/{command-t718dtrh.js → model-resolver-kmjzn6q1.js} +47 -47
  182. package/dist/chunks/{command-1ajx6rf5.js → model-resolver-kmzgegqq.js} +8 -8
  183. package/dist/chunks/{command-gvpgbncv.js → model-resolver-ky0p85ga.js} +13 -13
  184. package/dist/chunks/{command-mdwjtjcb.js → model-resolver-m0k609qs.js} +16 -16
  185. package/dist/chunks/{command-3zsf4n22.js → model-resolver-m1714858.js} +1 -1
  186. package/dist/chunks/{command-1b1yf6g0.js → model-resolver-m4cw13px.js} +30 -30
  187. package/dist/chunks/{command-deq2yphe.js → model-resolver-m4eq7axd.js} +15 -15
  188. package/dist/chunks/{command-m9w0rfyh.js → model-resolver-m9w0rfyh.js} +1 -1
  189. package/dist/chunks/{command-maspj1v3.js → model-resolver-maspj1v3.js} +1 -1
  190. package/dist/chunks/{command-3ct72kbc.js → model-resolver-maxw8zgf.js} +20 -20
  191. package/dist/chunks/{command-8mywswrd.js → model-resolver-me5bcav6.js} +1 -1
  192. package/dist/chunks/{command-m95xgvrp.js → model-resolver-mhs2q8b0.js} +34 -34
  193. package/dist/chunks/{command-nn416cd4.js → model-resolver-mrejt0vx.js} +4 -4
  194. package/dist/chunks/{command-48kw51zw.js → model-resolver-my4zabxr.js} +3 -3
  195. package/dist/chunks/{command-fcy631f0.js → model-resolver-n0p0277s.js} +1 -1
  196. package/dist/chunks/{command-0ny45k08.js → model-resolver-nbz0maqw.js} +23 -23
  197. package/dist/chunks/{command-acdn2y46.js → model-resolver-ng4advcs.js} +45 -45
  198. package/dist/chunks/{command-8yr3zrx2.js → model-resolver-ntz68qz4.js} +11 -11
  199. package/dist/chunks/{command-tp3hq1fz.js → model-resolver-nwnd66fk.js} +3 -3
  200. package/dist/chunks/{command-775gj3j1.js → model-resolver-p015t6z3.js} +2 -2
  201. package/dist/chunks/{command-b27vhd2z.js → model-resolver-p0tsr9h6.js} +4 -4
  202. package/dist/chunks/{command-0jwsre1p.js → model-resolver-p7vhpwh8.js} +5 -5
  203. package/dist/chunks/{command-zqsad2gs.js → model-resolver-parpa42j.js} +2 -2
  204. package/dist/chunks/{command-sce0r76x.js → model-resolver-pb2pfffb.js} +10 -10
  205. package/dist/chunks/{command-dnkebwy9.js → model-resolver-pja7jmt2.js} +9 -9
  206. package/dist/chunks/{command-802megp1.js → model-resolver-pkam9c76.js} +11 -11
  207. package/dist/chunks/{command-pknna89w.js → model-resolver-pknna89w.js} +1 -1
  208. package/dist/chunks/{command-9c1a4kmv.js → model-resolver-psq9ew9c.js} +9 -9
  209. package/dist/chunks/{command-ew199m7p.js → model-resolver-q1fncbax.js} +5 -5
  210. package/dist/chunks/{command-kv6t07rj.js → model-resolver-qc854yns.js} +14 -14
  211. package/dist/chunks/{command-zjr49qxn.js → model-resolver-qeaqse4k.js} +43 -43
  212. package/dist/chunks/{command-x0g438en.js → model-resolver-qecz1syp.js} +89 -89
  213. package/dist/chunks/{command-y71avatq.js → model-resolver-qjgzc4b4.js} +1 -1
  214. package/dist/chunks/{command-zxn1czyk.js → model-resolver-qqe3xj9j.js} +23 -23
  215. package/dist/chunks/{command-tyytaxap.js → model-resolver-r0yr0wbs.js} +1 -1
  216. package/dist/chunks/{command-w92k2e0p.js → model-resolver-r1k9m3eb.js} +2 -2
  217. package/dist/chunks/{command-kkyxct86.js → model-resolver-r1rcp1a5.js} +4 -4
  218. package/dist/chunks/{command-ccy38syf.js → model-resolver-r2q802mc.js} +11 -11
  219. package/dist/chunks/{command-vk5kq5j8.js → model-resolver-r3jydfqs.js} +13 -13
  220. package/dist/chunks/{command-tazgh4e4.js → model-resolver-rb9dy4dg.js} +1 -1
  221. package/dist/chunks/{command-m38q3wy3.js → model-resolver-rg8m9xd0.js} +16 -16
  222. package/dist/chunks/{command-hpkegr1y.js → model-resolver-rkxhwyxc.js} +8 -8
  223. package/dist/chunks/{command-3tvqynh2.js → model-resolver-rt5dr6hb.js} +1 -1
  224. package/dist/chunks/{command-3k3tgz1s.js → model-resolver-s67gnmqz.js} +35 -35
  225. package/dist/chunks/{command-g970mz3v.js → model-resolver-s8pwnmrf.js} +34 -34
  226. package/dist/chunks/{command-v8jfbz3g.js → model-resolver-sq4s6wq1.js} +6 -6
  227. package/dist/chunks/{command-6xb47vfp.js → model-resolver-sqjzf8x2.js} +1 -1
  228. package/dist/chunks/{command-p3p972wa.js → model-resolver-sznyev98.js} +5 -5
  229. package/dist/chunks/{command-4z7vav0p.js → model-resolver-t5x9tta9.js} +13 -13
  230. package/dist/chunks/{command-0t5b2y9d.js → model-resolver-t9pmjw8g.js} +9 -9
  231. package/dist/chunks/{command-395q6j9z.js → model-resolver-tasvem1v.js} +6 -6
  232. package/dist/chunks/{command-gd4qta3r.js → model-resolver-tczq8hjw.js} +1 -1
  233. package/dist/chunks/{command-d97f9cxk.js → model-resolver-tetf7hhs.js} +12 -12
  234. package/dist/chunks/{command-g69zc3wy.js → model-resolver-tm49z4r5.js} +36 -36
  235. package/dist/chunks/{command-3dhsd59m.js → model-resolver-tn41ynre.js} +20 -20
  236. package/dist/chunks/{command-yc2cz67n.js → model-resolver-tpbnagbb.js} +32 -32
  237. package/dist/chunks/{command-p820w4f0.js → model-resolver-tvxppb48.js} +27 -27
  238. package/dist/chunks/{command-tdstcens.js → model-resolver-tw8zr1ps.js} +1 -1
  239. package/dist/chunks/{command-v7p4zvkq.js → model-resolver-twv2r8f4.js} +2 -2
  240. package/dist/chunks/{command-web3t9xy.js → model-resolver-tyxn5m2z.js} +4 -4
  241. package/dist/chunks/{command-ehsy592z.js → model-resolver-v7vzjxxh.js} +26 -26
  242. package/dist/chunks/{command-rdw6cm16.js → model-resolver-vd3b3yk9.js} +1 -1
  243. package/dist/chunks/{command-veqvce7d.js → model-resolver-veqvce7d.js} +1 -1
  244. package/dist/chunks/{command-rv6zpw67.js → model-resolver-vnfvdagd.js} +35 -35
  245. package/dist/chunks/{command-210p74nv.js → model-resolver-vsgt0m8t.js} +6 -6
  246. package/dist/chunks/{command-ymgkxg7n.js → model-resolver-vxxaf4jx.js} +3 -3
  247. package/dist/chunks/{command-kcme49p2.js → model-resolver-vywmmb7d.js} +18 -18
  248. package/dist/chunks/{command-82rhge12.js → model-resolver-vzmjdaw1.js} +9 -9
  249. package/dist/chunks/{command-xhmz0e2c.js → model-resolver-w26t1m11.js} +11 -11
  250. package/dist/chunks/{command-1j6m29mr.js → model-resolver-w35wzz9x.js} +1 -1
  251. package/dist/chunks/{command-w3wsvvr9.js → model-resolver-w3wsvvr9.js} +1 -1
  252. package/dist/chunks/{command-cvt24va3.js → model-resolver-w5zwfkq2.js} +34 -34
  253. package/dist/chunks/{command-khmqacep.js → model-resolver-w687dnns.js} +4 -4
  254. package/dist/chunks/{command-wakvkjy4.js → model-resolver-wakvkjy4.js} +1 -1
  255. package/dist/chunks/{command-wd87259q.js → model-resolver-wd87259q.js} +1 -1
  256. package/dist/chunks/{command-zbak8g8s.js → model-resolver-we1tgvvb.js} +5 -5
  257. package/dist/chunks/{command-1hzj9kg1.js → model-resolver-wekz2jy3.js} +13 -13
  258. package/dist/chunks/{command-pk1g9nse.js → model-resolver-xaqh7jtr.js} +17 -17
  259. package/dist/chunks/{command-84txncab.js → model-resolver-xd9cc171.js} +5 -5
  260. package/dist/chunks/{command-axq5kh8y.js → model-resolver-xezg9szt.js} +10 -10
  261. package/dist/chunks/{command-z4a4venm.js → model-resolver-xf4p2pg0.js} +14 -14
  262. package/dist/chunks/{command-mybp2pev.js → model-resolver-xj1dzt64.js} +4 -4
  263. package/dist/chunks/{command-n11rvh9p.js → model-resolver-xr3sacq2.js} +32 -32
  264. package/dist/chunks/{command-4j64n899.js → model-resolver-xxak8n2f.js} +4 -4
  265. package/dist/chunks/{command-pkz1gcrh.js → model-resolver-y8mr6xph.js} +12 -12
  266. package/dist/chunks/{command-6gmsgdx2.js → model-resolver-y9w21xdh.js} +9 -9
  267. package/dist/chunks/{command-pjvnvgmy.js → model-resolver-yb20nhc3.js} +1 -1
  268. package/dist/chunks/{command-dzg2v16h.js → model-resolver-yh0hw7we.js} +10 -10
  269. package/dist/chunks/{command-wak8pa62.js → model-resolver-yk9kn8z0.js} +18 -18
  270. package/dist/chunks/{command-dvmztg5v.js → model-resolver-ymn1zp0c.js} +25 -25
  271. package/dist/chunks/{command-1hfxmt0w.js → model-resolver-ypwr9vv7.js} +37 -37
  272. package/dist/chunks/{command-z0bkrqjs.js → model-resolver-z0bkrqjs.js} +1 -1
  273. package/dist/chunks/{command-xexx9thr.js → model-resolver-z0edr6gj.js} +22 -22
  274. package/dist/chunks/{command-ysye7j36.js → model-resolver-z2bchc84.js} +13 -13
  275. package/dist/chunks/{command-y1fvbwt7.js → model-resolver-z38nccrw.js} +1 -1
  276. package/dist/chunks/{command-drjmd517.js → model-resolver-z3ac7gyp.js} +19 -19
  277. package/dist/chunks/{command-wn0xhw32.js → model-resolver-z8zh1sht.js} +25 -25
  278. package/dist/chunks/{command-qc148cpv.js → model-resolver-zadgmz3x.js} +24 -24
  279. package/dist/chunks/{command-mxvxcxwy.js → model-resolver-zba5tm1j.js} +4 -4
  280. package/dist/chunks/{command-w4mk1hws.js → model-resolver-zgy84aax.js} +11 -11
  281. package/dist/chunks/{command-hgz4x7wa.js → model-resolver-zkg84ctx.js} +1 -1
  282. package/dist/chunks/{command-4ytg8f8f.js → model-resolver-zmwx25fz.js} +2 -2
  283. package/dist/chunks/{command-4y1psmjm.js → model-resolver-zp466xy7.js} +7 -7
  284. package/dist/chunks/{command-8sptrx30.js → model-resolver-zrbv4gdq.js} +13 -13
  285. package/dist/chunks/{command-2q3kn6hv.js → model-resolver-zsw153cf.js} +13 -13
  286. package/dist/chunks/{command-embw8kgh.js → model-resolver-ztf6n3de.js} +4 -4
  287. package/dist/codemode/catalog.js +1 -1
  288. package/dist/codemode/instructions.js +5 -5
  289. package/dist/codemode/tool.js +3 -3
  290. package/dist/codemode/web.js +1 -1
  291. package/dist/command.js +83 -83
  292. package/dist/config/discovery.js +84 -84
  293. package/dist/config/markdown.js +1 -1
  294. package/dist/config/normalize.js +101 -101
  295. package/dist/config/plugin/agent.js +118 -118
  296. package/dist/config/plugin/command.js +214 -214
  297. package/dist/config/plugin/compaction.js +155 -155
  298. package/dist/config/plugin/compatibility.js +135 -135
  299. package/dist/config/plugin/entry-observer.js +1 -1
  300. package/dist/config/plugin/formatter.js +117 -117
  301. package/dist/config/plugin/image.js +116 -116
  302. package/dist/config/plugin/instruction.js +116 -116
  303. package/dist/config/plugin/location-watcher.js +118 -118
  304. package/dist/config/plugin/mcp.js +125 -125
  305. package/dist/config/plugin/policy.js +117 -117
  306. package/dist/config/plugin/provider.js +116 -116
  307. package/dist/config/plugin/reference.js +118 -118
  308. package/dist/config/plugin/shell.js +118 -118
  309. package/dist/config/plugin/skill-file.js +104 -104
  310. package/dist/config/plugin/skill-scan.js +3 -3
  311. package/dist/config/plugin/skill.js +138 -138
  312. package/dist/config/plugin/snapshot.js +116 -116
  313. package/dist/config/plugin/source.js +115 -115
  314. package/dist/config/plugin/tool-output.js +117 -117
  315. package/dist/config/plugin/websearch.js +117 -117
  316. package/dist/config/plugin/worktree.js +118 -118
  317. package/dist/config/variable.js +1 -1
  318. package/dist/config/watch.js +1 -1
  319. package/dist/config.js +117 -117
  320. package/dist/credential/sql.js +2 -2
  321. package/dist/credential.js +85 -85
  322. package/dist/database/database.js +68 -68
  323. package/dist/database/drizzle/effect-sqlite/driver.js +12 -12
  324. package/dist/database/drizzle/effect-sqlite/index.js +12 -12
  325. package/dist/database/drizzle/effect-sqlite/session.js +11 -11
  326. package/dist/database/drizzle/index.js +13 -13
  327. package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
  328. package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
  329. package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
  330. package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
  331. package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
  332. package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
  333. package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
  334. package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
  335. package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
  336. package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
  337. package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
  338. package/dist/database/drizzle.js +14 -14
  339. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
  340. package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
  341. package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
  342. package/dist/database/migration/20260225215848_workspace.js +1 -1
  343. package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
  344. package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
  345. package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
  346. package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
  347. package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
  348. package/dist/database/migration/20260323234822_events.js +1 -1
  349. package/dist/database/migration/20260410174513_workspace-name.js +1 -1
  350. package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
  351. package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
  352. package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
  353. package/dist/database/migration/20260428004200_add_session_path.js +1 -1
  354. package/dist/database/migration/20260501142318_next_venus.js +1 -1
  355. package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
  356. package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
  357. package/dist/database/migration/20260510033149_session_usage.js +1 -1
  358. package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
  359. package/dist/database/migration/20260511173437_session-metadata.js +1 -1
  360. package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
  361. package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
  362. package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
  363. package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
  364. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
  365. package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
  366. package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
  367. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
  368. package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
  369. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
  370. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
  371. package/dist/database/migration/20260611035744_credential.js +1 -1
  372. package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
  373. package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
  374. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
  375. package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
  376. package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
  377. package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
  378. package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
  379. package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
  380. package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
  381. package/dist/database/migration/20260812181746_session_inbox.js +1 -1
  382. package/dist/database/migration/20260812213948_worktree.js +1 -1
  383. package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
  384. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
  385. package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
  386. package/dist/database/migration/20260923013825_project_time_active.js +1 -1
  387. package/dist/database/migration/20261007190000_azure_cli_external_credential.js +1 -1
  388. package/dist/database/migration/20261010180456_project_time_archived.js +1 -1
  389. package/dist/database/migration.gen.js +51 -51
  390. package/dist/database/migration.js +53 -53
  391. package/dist/database/path.js +2 -2
  392. package/dist/database/schema.gen.js +1 -1
  393. package/dist/database/schema.sql.js +1 -1
  394. package/dist/database/sqlite.bun.js +1 -1
  395. package/dist/database/sqlite.js +1 -1
  396. package/dist/database/sqlite.node.js +1 -1
  397. package/dist/database/sqlite.workerd.js +1 -1
  398. package/dist/database/v1-migration.bun.js +78 -78
  399. package/dist/database/v1-migration.js +1 -1
  400. package/dist/effect/app-node-builder.js +367 -367
  401. package/dist/effect/app-node-platform.js +2 -2
  402. package/dist/effect/keyed-mutex.js +1 -1
  403. package/dist/effect/websocket-constructor.js +1 -1
  404. package/dist/environment/driver.js +1 -1
  405. package/dist/environment/environment.js +95 -95
  406. package/dist/environment/exec-defaults.js +2 -2
  407. package/dist/environment/files.js +1 -1
  408. package/dist/environment/index.js +95 -95
  409. package/dist/environment/local.js +2 -2
  410. package/dist/environment/memory.js +2 -2
  411. package/dist/environment/unavailable.js +3 -3
  412. package/dist/event/sql.js +1 -1
  413. package/dist/event-logger.js +76 -76
  414. package/dist/file-access.js +106 -106
  415. package/dist/file-mutation.js +96 -96
  416. package/dist/file-retention.js +1 -1
  417. package/dist/filesystem/fff.bun.js +2 -2
  418. package/dist/filesystem/fff.js +1 -1
  419. package/dist/filesystem/fff.node.js +2 -2
  420. package/dist/filesystem/fff.workerd.js +2 -2
  421. package/dist/filesystem/location-watcher-policy.js +6 -6
  422. package/dist/filesystem/location-watcher.js +227 -227
  423. package/dist/filesystem/protected.js +1 -1
  424. package/dist/filesystem/search.js +101 -101
  425. package/dist/filesystem/watcher-binding.js +1 -1
  426. package/dist/filesystem/watcher.js +7 -7
  427. package/dist/filesystem.js +106 -106
  428. package/dist/form.js +86 -86
  429. package/dist/formatter/builtins.js +4 -4
  430. package/dist/formatter.js +89 -89
  431. package/dist/generate.js +107 -107
  432. package/dist/git.js +10 -10
  433. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +1 -1
  434. package/dist/github-copilot/chat/get-response-metadata.js +1 -1
  435. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +1 -1
  436. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +7 -7
  437. package/dist/github-copilot/chat/openai-compatible-chat-options.js +1 -1
  438. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +1 -1
  439. package/dist/github-copilot/copilot-provider.js +17 -17
  440. package/dist/github-copilot/models.js +101 -101
  441. package/dist/github-copilot/openai-compatible-error.js +1 -1
  442. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +1 -1
  443. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +1 -1
  444. package/dist/github-copilot/responses/openai-error.js +1 -1
  445. package/dist/github-copilot/responses/openai-responses-language-model.js +10 -10
  446. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +6 -6
  447. package/dist/github-copilot/responses/tool/code-interpreter.js +1 -1
  448. package/dist/github-copilot/responses/tool/file-search.js +1 -1
  449. package/dist/github-copilot/responses/tool/image-generation.js +1 -1
  450. package/dist/github-copilot/responses/tool/web-search-preview.js +1 -1
  451. package/dist/github-copilot/responses/tool/web-search.js +1 -1
  452. package/dist/image/photon.js +2 -2
  453. package/dist/image.js +6 -6
  454. package/dist/instance/service.js +5 -5
  455. package/dist/instance.js +360 -360
  456. package/dist/instruction-discovery.js +84 -84
  457. package/dist/instructions/builtins.js +89 -89
  458. package/dist/instructions/index.js +1 -1
  459. package/dist/integration/connection.js +3 -3
  460. package/dist/integration.js +87 -87
  461. package/dist/job.js +80 -80
  462. package/dist/kv/sql.js +2 -2
  463. package/dist/kv.js +75 -75
  464. package/dist/location-activity.js +155 -155
  465. package/dist/location-lifecycle.js +109 -109
  466. package/dist/location-service-map.js +86 -86
  467. package/dist/location-services.js +357 -357
  468. package/dist/location.js +87 -87
  469. package/dist/managed-policy.js +8 -8
  470. package/dist/mcp/client.js +93 -93
  471. package/dist/mcp/index.js +111 -111
  472. package/dist/mcp/instructions.js +138 -138
  473. package/dist/mcp/oauth.js +80 -80
  474. package/dist/mcp/stdio.js +92 -92
  475. package/dist/mime.js +1 -1
  476. package/dist/modal/models.js +101 -101
  477. package/dist/model-resolver.js +101 -101
  478. package/dist/model-retry.js +1 -1
  479. package/dist/model.js +102 -102
  480. package/dist/models-dev.js +105 -105
  481. package/dist/oauth/page.js +1 -1
  482. package/dist/permission/saved.js +80 -80
  483. package/dist/permission/sql.js +5 -5
  484. package/dist/permission.js +107 -107
  485. package/dist/persistent-pty/binary.bun.js +1 -1
  486. package/dist/persistent-pty/daemon.js +1 -1
  487. package/dist/persistent-pty/index.js +92 -92
  488. package/dist/persistent-pty/pty-binding.js +1 -1
  489. package/dist/persistent-pty.js +77 -77
  490. package/dist/plugin/agent.js +78 -78
  491. package/dist/plugin/command.js +104 -104
  492. package/dist/plugin/hooks.js +5 -5
  493. package/dist/plugin/host.js +218 -218
  494. package/dist/plugin/identity.js +3 -3
  495. package/dist/plugin/instance.js +5 -5
  496. package/dist/plugin/internal.js +332 -332
  497. package/dist/plugin/mcp-codemode-defaults.js +3 -3
  498. package/dist/plugin/models-dev.js +98 -98
  499. package/dist/plugin/module.js +117 -117
  500. package/dist/plugin/optimize.js +2 -2
  501. package/dist/plugin/plan.js +104 -104
  502. package/dist/plugin/promise.js +1 -1
  503. package/dist/plugin/provider/amazon-bedrock.js +92 -92
  504. package/dist/plugin/provider/azure.js +116 -116
  505. package/dist/plugin/provider/cerebras.js +1 -1
  506. package/dist/plugin/provider/chatgpt.js +116 -116
  507. package/dist/plugin/provider/cloudflare-ai-gateway.js +113 -113
  508. package/dist/plugin/provider/cloudflare-workers-ai.js +113 -113
  509. package/dist/plugin/provider/cohere.js +2 -2
  510. package/dist/plugin/provider/configured.js +112 -112
  511. package/dist/plugin/provider/databricks.js +1 -1
  512. package/dist/plugin/provider/digitalocean.js +95 -95
  513. package/dist/plugin/provider/dynamic.js +2 -2
  514. package/dist/plugin/provider/factory.js +1 -1
  515. package/dist/plugin/provider/github-copilot.js +97 -97
  516. package/dist/plugin/provider/gitlab.js +95 -95
  517. package/dist/plugin/provider/google-vertex.js +113 -113
  518. package/dist/plugin/provider/kilo.js +1 -1
  519. package/dist/plugin/provider/llmgateway.js +80 -80
  520. package/dist/plugin/provider/lmstudio.js +125 -125
  521. package/dist/plugin/provider/local.js +122 -122
  522. package/dist/plugin/provider/modal.js +94 -94
  523. package/dist/plugin/provider/neon.js +1 -1
  524. package/dist/plugin/provider/nvidia.js +1 -1
  525. package/dist/plugin/provider/ollama.js +125 -125
  526. package/dist/plugin/provider/openai.js +116 -116
  527. package/dist/plugin/provider/opencode.js +103 -103
  528. package/dist/plugin/provider/openrouter.js +93 -93
  529. package/dist/plugin/provider/perplexity.js +2 -2
  530. package/dist/plugin/provider/poe.js +81 -81
  531. package/dist/plugin/provider/prompt-cache-key.js +1 -1
  532. package/dist/plugin/provider/sap-ai-core.js +93 -93
  533. package/dist/plugin/provider/sdk-factory.js +1 -1
  534. package/dist/plugin/provider/snowflake-cortex.js +115 -115
  535. package/dist/plugin/provider/vercel.js +92 -92
  536. package/dist/plugin/provider/vllm.js +125 -125
  537. package/dist/plugin/provider/xai.js +93 -93
  538. package/dist/plugin/provider/zenmux.js +1 -1
  539. package/dist/plugin/provider.js +170 -170
  540. package/dist/plugin/sdk.js +78 -78
  541. package/dist/plugin/service.js +3 -3
  542. package/dist/plugin/skill.js +134 -134
  543. package/dist/plugin/source-directory.js +1 -1
  544. package/dist/plugin/supervisor.js +351 -351
  545. package/dist/plugin/tool-input-repair.js +4 -4
  546. package/dist/plugin/update.js +6 -6
  547. package/dist/plugin/vcs/git.js +88 -88
  548. package/dist/plugin/vcs/hg.js +88 -88
  549. package/dist/plugin/verbosity.js +95 -95
  550. package/dist/plugin/warming.js +114 -114
  551. package/dist/plugin/websearch/exa.js +7 -7
  552. package/dist/plugin/websearch/firecrawl.js +6 -6
  553. package/dist/plugin/websearch/index.js +9 -9
  554. package/dist/plugin/websearch/mcp.js +4 -4
  555. package/dist/plugin/websearch/parallel.js +8 -8
  556. package/dist/plugin/websearch/tavily.js +6 -6
  557. package/dist/plugin/websearch/tinyfish.js +8 -8
  558. package/dist/plugin.js +229 -229
  559. package/dist/project/schema.js +2 -2
  560. package/dist/project/sql.js +4 -4
  561. package/dist/project.js +86 -86
  562. package/dist/provider.js +99 -99
  563. package/dist/pty/protocol.js +1 -1
  564. package/dist/pty/ticket.js +1 -1
  565. package/dist/pty.js +101 -101
  566. package/dist/reference/instructions.js +91 -91
  567. package/dist/reference.js +89 -89
  568. package/dist/repository-cache.js +83 -83
  569. package/dist/repository.js +3 -3
  570. package/dist/ripgrep/binary.js +2 -2
  571. package/dist/ripgrep.js +97 -97
  572. package/dist/rpc.js +88 -88
  573. package/dist/schema.js +1 -1
  574. package/dist/session/affinity.js +1 -1
  575. package/dist/session/command.js +76 -76
  576. package/dist/session/compaction.js +138 -138
  577. package/dist/session/context.js +164 -164
  578. package/dist/session/diff.js +90 -90
  579. package/dist/session/environment.js +5 -5
  580. package/dist/session/error.js +5 -5
  581. package/dist/session/event.js +1 -1
  582. package/dist/session/execution/restart.js +224 -224
  583. package/dist/session/execution.js +128 -128
  584. package/dist/session/generate.js +164 -164
  585. package/dist/session/history.js +13 -13
  586. package/dist/session/inbox.js +93 -93
  587. package/dist/session/info.js +3 -3
  588. package/dist/session/instruction-entry.js +79 -79
  589. package/dist/session/instruction-state.js +8 -8
  590. package/dist/session/instructions.js +99 -99
  591. package/dist/session/message-updater.js +2 -2
  592. package/dist/session/message.js +1 -1
  593. package/dist/session/model-request.js +122 -122
  594. package/dist/session/model-transport.js +9 -9
  595. package/dist/session/move.js +132 -132
  596. package/dist/session/projector.js +91 -91
  597. package/dist/session/prompt.js +107 -107
  598. package/dist/session/recent-text.js +1 -1
  599. package/dist/session/revert.js +96 -96
  600. package/dist/session/run-coordinator.js +3 -3
  601. package/dist/session/runner/index.js +3 -3
  602. package/dist/session/runner/llm.js +231 -231
  603. package/dist/session/runner/max-steps.js +1 -1
  604. package/dist/session/runner/model.js +101 -101
  605. package/dist/session/runner/publish-llm-event.js +116 -116
  606. package/dist/session/runner/retry.js +5 -5
  607. package/dist/session/runner/step.js +128 -128
  608. package/dist/session/runner/to-llm-message.js +14 -14
  609. package/dist/session/schema.js +5 -5
  610. package/dist/session/session.js +163 -163
  611. package/dist/session/shell.js +130 -130
  612. package/dist/session/skill.js +105 -105
  613. package/dist/session/sql.js +5 -5
  614. package/dist/session/stats.js +75 -75
  615. package/dist/session/store.js +87 -87
  616. package/dist/session/subagent-completion.js +1 -1
  617. package/dist/session/subagent-job.js +212 -212
  618. package/dist/session/system-prompt.js +1 -1
  619. package/dist/session/title.js +168 -168
  620. package/dist/session/to-session-error.js +114 -114
  621. package/dist/session/transfer.js +220 -220
  622. package/dist/session/usage.js +1 -1
  623. package/dist/session.js +216 -216
  624. package/dist/shell/parse.js +8 -8
  625. package/dist/shell/result.js +1 -1
  626. package/dist/shell/scan.js +1 -1
  627. package/dist/shell/select.js +9 -9
  628. package/dist/shell.js +132 -132
  629. package/dist/skill/discovery.js +6 -6
  630. package/dist/skill/instructions.js +109 -109
  631. package/dist/skill.js +110 -110
  632. package/dist/snapshot.js +89 -89
  633. package/dist/state.js +1 -1
  634. package/dist/tool/html-markdown.js +1 -1
  635. package/dist/tool/http-body.js +1 -1
  636. package/dist/tool/mcp.js +137 -137
  637. package/dist/tool/plugin/edit.js +122 -122
  638. package/dist/tool/plugin/file-diff.js +1 -1
  639. package/dist/tool/plugin/glob.js +126 -126
  640. package/dist/tool/plugin/grep.js +126 -126
  641. package/dist/tool/plugin/mcp-resource.js +126 -126
  642. package/dist/tool/plugin/opencode.js +111 -111
  643. package/dist/tool/plugin/patch.js +124 -124
  644. package/dist/tool/plugin/question.js +105 -105
  645. package/dist/tool/plugin/read.js +127 -127
  646. package/dist/tool/plugin/shell.js +213 -213
  647. package/dist/tool/plugin/skill.js +107 -107
  648. package/dist/tool/plugin/subagent.js +211 -211
  649. package/dist/tool/plugin/todo.js +138 -138
  650. package/dist/tool/plugin/webfetch.js +111 -111
  651. package/dist/tool/plugin/websearch.js +114 -114
  652. package/dist/tool/plugin/write.js +124 -124
  653. package/dist/tool/read-filesystem.js +102 -102
  654. package/dist/tool/runtime.js +1 -1
  655. package/dist/tool-output.js +7 -7
  656. package/dist/tool.js +16 -16
  657. package/dist/util/error-summary.js +1 -1
  658. package/dist/util/git-executable.js +2 -2
  659. package/dist/util/lazy.js +1 -1
  660. package/dist/util/slug.js +1 -1
  661. package/dist/util/token.js +1 -1
  662. package/dist/util/which.js +1 -1
  663. package/dist/util/wildcard.js +1 -1
  664. package/dist/v1/config/agent.js +3 -3
  665. package/dist/v1/config/command.js +3 -3
  666. package/dist/v1/config/mcp.js +4 -4
  667. package/dist/v1/config/migrate.js +94 -94
  668. package/dist/v1/config/permission.js +1 -1
  669. package/dist/v1/config/plugin.js +3 -3
  670. package/dist/v1/config/provider-options.js +1 -1
  671. package/dist/v1/config/provider.js +2 -2
  672. package/dist/variant.js +93 -93
  673. package/dist/vcs/patch.js +1 -1
  674. package/dist/vcs.js +91 -91
  675. package/dist/voice.js +90 -90
  676. package/dist/websearch.js +86 -86
  677. package/dist/wellknown/plugin.js +78 -78
  678. package/dist/wellknown.js +75 -75
  679. package/dist/workspace/driver.js +3 -3
  680. package/dist/workspace/sql.js +1 -1
  681. package/dist/workspace.js +84 -84
  682. package/dist/worktree/directory.js +2 -2
  683. package/dist/worktree/git.js +8 -8
  684. package/dist/worktree/sql.js +5 -5
  685. package/dist/worktree/strategies.js +91 -91
  686. package/dist/worktree.js +100 -100
  687. package/package.json +9 -9
  688. package/dist/chunks/command-3q31v9sa.js +0 -257
  689. package/dist/chunks/command-dxj72tfx.js +0 -18
  690. package/dist/chunks/command-fwr9p4fy.js +0 -523
  691. package/dist/chunks/command-hqp5gz7t.js +0 -26
  692. /package/dist/chunks/{command-0qkdqm5v.js → model-resolver-0qkdqm5v.js} +0 -0
  693. /package/dist/chunks/{command-0zkw76rk.js → model-resolver-0zkw76rk.js} +0 -0
  694. /package/dist/chunks/{command-17cy0kzp.js → model-resolver-17cy0kzp.js} +0 -0
  695. /package/dist/chunks/{command-1cnp2v09.js → model-resolver-1cnp2v09.js} +0 -0
  696. /package/dist/chunks/{command-24dcb14g.js → model-resolver-24dcb14g.js} +0 -0
  697. /package/dist/chunks/{command-2710q6r3.js → model-resolver-2710q6r3.js} +0 -0
  698. /package/dist/chunks/{command-2bv980vf.js → model-resolver-2bv980vf.js} +0 -0
  699. /package/dist/chunks/{command-2c3vjs8z.js → model-resolver-2c3vjs8z.js} +0 -0
  700. /package/dist/chunks/{command-359p4xyc.js → model-resolver-359p4xyc.js} +0 -0
  701. /package/dist/chunks/{command-3asan66x.js → model-resolver-3asan66x.js} +0 -0
  702. /package/dist/chunks/{command-3v8g72cx.js → model-resolver-3v8g72cx.js} +0 -0
  703. /package/dist/chunks/{command-3wcehsnq.js → model-resolver-3wcehsnq.js} +0 -0
  704. /package/dist/chunks/{command-43n2bw4t.js → model-resolver-43n2bw4t.js} +0 -0
  705. /package/dist/chunks/{command-4knz6hnm.js → model-resolver-4knz6hnm.js} +0 -0
  706. /package/dist/chunks/{command-4vcrnpx2.js → model-resolver-4vcrnpx2.js} +0 -0
  707. /package/dist/chunks/{command-4y7fprxs.js → model-resolver-4y7fprxs.js} +0 -0
  708. /package/dist/chunks/{command-53557ph1.js → model-resolver-53557ph1.js} +0 -0
  709. /package/dist/chunks/{command-550bvhaj.js → model-resolver-550bvhaj.js} +0 -0
  710. /package/dist/chunks/{command-5fjb7ams.js → model-resolver-5fjb7ams.js} +0 -0
  711. /package/dist/chunks/{command-6prwharc.js → model-resolver-6prwharc.js} +0 -0
  712. /package/dist/chunks/{command-6q2bdcd1.js → model-resolver-6q2bdcd1.js} +0 -0
  713. /package/dist/chunks/{command-7akdwqpd.js → model-resolver-7akdwqpd.js} +0 -0
  714. /package/dist/chunks/{command-7m9af43g.js → model-resolver-7m9af43g.js} +0 -0
  715. /package/dist/chunks/{command-822emrt2.js → model-resolver-822emrt2.js} +0 -0
  716. /package/dist/chunks/{command-84wd9syh.js → model-resolver-84wd9syh.js} +0 -0
  717. /package/dist/chunks/{command-88xbtdfr.js → model-resolver-88xbtdfr.js} +0 -0
  718. /package/dist/chunks/{command-8n3pysct.js → model-resolver-8n3pysct.js} +0 -0
  719. /package/dist/chunks/{command-8wj87zfr.js → model-resolver-8wj87zfr.js} +0 -0
  720. /package/dist/chunks/{command-9a4afbnw.js → model-resolver-9a4afbnw.js} +0 -0
  721. /package/dist/chunks/{command-9rqn6x4v.js → model-resolver-9rqn6x4v.js} +0 -0
  722. /package/dist/chunks/{command-a058387c.js → model-resolver-a058387c.js} +0 -0
  723. /package/dist/chunks/{command-a6k6eb26.js → model-resolver-a6k6eb26.js} +0 -0
  724. /package/dist/chunks/{command-af5trqkr.js → model-resolver-af5trqkr.js} +0 -0
  725. /package/dist/chunks/{command-afrmfg78.js → model-resolver-afrmfg78.js} +0 -0
  726. /package/dist/chunks/{command-aqzs7mqg.js → model-resolver-aqzs7mqg.js} +0 -0
  727. /package/dist/chunks/{command-atq7p7m5.js → model-resolver-atq7p7m5.js} +0 -0
  728. /package/dist/chunks/{command-bkyjaxrp.js → model-resolver-bkyjaxrp.js} +0 -0
  729. /package/dist/chunks/{command-bmr6ed5q.js → model-resolver-bmr6ed5q.js} +0 -0
  730. /package/dist/chunks/{command-cf4snx6d.js → model-resolver-cf4snx6d.js} +0 -0
  731. /package/dist/chunks/{command-cvy3z8tj.js → model-resolver-cvy3z8tj.js} +0 -0
  732. /package/dist/chunks/{command-d9fn303g.js → model-resolver-d9fn303g.js} +0 -0
  733. /package/dist/chunks/{command-d9jj8t3e.js → model-resolver-d9jj8t3e.js} +0 -0
  734. /package/dist/chunks/{command-dajrwvna.js → model-resolver-dajrwvna.js} +0 -0
  735. /package/dist/chunks/{command-dap0rakb.js → model-resolver-dap0rakb.js} +0 -0
  736. /package/dist/chunks/{command-df08tz66.js → model-resolver-df08tz66.js} +0 -0
  737. /package/dist/chunks/{command-dy18nga0.js → model-resolver-dy18nga0.js} +0 -0
  738. /package/dist/chunks/{command-e3qxr5gk.js → model-resolver-e3qxr5gk.js} +0 -0
  739. /package/dist/chunks/{command-e5kj55wp.js → model-resolver-e5kj55wp.js} +0 -0
  740. /package/dist/chunks/{command-e73j6tqm.js → model-resolver-e73j6tqm.js} +0 -0
  741. /package/dist/chunks/{command-ec1grn59.js → model-resolver-ec1grn59.js} +0 -0
  742. /package/dist/chunks/{command-eh3zwz77.js → model-resolver-eh3zwz77.js} +0 -0
  743. /package/dist/chunks/{command-emrn6kk6.js → model-resolver-emrn6kk6.js} +0 -0
  744. /package/dist/chunks/{command-f0mxakyp.js → model-resolver-f0mxakyp.js} +0 -0
  745. /package/dist/chunks/{command-f6n9ztr4.js → model-resolver-f6n9ztr4.js} +0 -0
  746. /package/dist/chunks/{command-faypxj3z.js → model-resolver-faypxj3z.js} +0 -0
  747. /package/dist/chunks/{command-fd410y7t.js → model-resolver-fd410y7t.js} +0 -0
  748. /package/dist/chunks/{command-g4wezp1m.js → model-resolver-g4wezp1m.js} +0 -0
  749. /package/dist/chunks/{command-g86h250q.js → model-resolver-g86h250q.js} +0 -0
  750. /package/dist/chunks/{command-gebd4c9n.js → model-resolver-gebd4c9n.js} +0 -0
  751. /package/dist/chunks/{command-gftt206x.js → model-resolver-gftt206x.js} +0 -0
  752. /package/dist/chunks/{command-hcxmzztb.js → model-resolver-hcxmzztb.js} +0 -0
  753. /package/dist/chunks/{command-hk9envan.js → model-resolver-hk9envan.js} +0 -0
  754. /package/dist/chunks/{command-j2ntwpah.js → model-resolver-j2ntwpah.js} +0 -0
  755. /package/dist/chunks/{command-j5zkgpj8.js → model-resolver-j5zkgpj8.js} +0 -0
  756. /package/dist/chunks/{command-jjkms2e6.js → model-resolver-jjkms2e6.js} +0 -0
  757. /package/dist/chunks/{command-jr7sbwjy.js → model-resolver-jr7sbwjy.js} +0 -0
  758. /package/dist/chunks/{command-jwfs4k6c.js → model-resolver-jwfs4k6c.js} +0 -0
  759. /package/dist/chunks/{command-jze0r7bz.js → model-resolver-jze0r7bz.js} +0 -0
  760. /package/dist/chunks/{command-jzg6c2d5.js → model-resolver-jzg6c2d5.js} +0 -0
  761. /package/dist/chunks/{command-m18g726c.js → model-resolver-m18g726c.js} +0 -0
  762. /package/dist/chunks/{command-mp448xyj.js → model-resolver-mp448xyj.js} +0 -0
  763. /package/dist/chunks/{command-msx8hqn2.js → model-resolver-msx8hqn2.js} +0 -0
  764. /package/dist/chunks/{command-n05xt0ee.js → model-resolver-n05xt0ee.js} +0 -0
  765. /package/dist/chunks/{command-n3j8tn72.js → model-resolver-n3j8tn72.js} +0 -0
  766. /package/dist/chunks/{command-njntx4h6.js → model-resolver-njntx4h6.js} +0 -0
  767. /package/dist/chunks/{command-pkyv6v7h.js → model-resolver-pkyv6v7h.js} +0 -0
  768. /package/dist/chunks/{command-q3sfg36h.js → model-resolver-q3sfg36h.js} +0 -0
  769. /package/dist/chunks/{command-q74kybfr.js → model-resolver-q74kybfr.js} +0 -0
  770. /package/dist/chunks/{command-qaymkmh1.js → model-resolver-qaymkmh1.js} +0 -0
  771. /package/dist/chunks/{command-qb87gjwd.js → model-resolver-qb87gjwd.js} +0 -0
  772. /package/dist/chunks/{command-qfa1cgps.js → model-resolver-qfa1cgps.js} +0 -0
  773. /package/dist/chunks/{command-qg3g05ea.js → model-resolver-qg3g05ea.js} +0 -0
  774. /package/dist/chunks/{command-qrg20bc0.js → model-resolver-qrg20bc0.js} +0 -0
  775. /package/dist/chunks/{command-rcb2kzg1.js → model-resolver-rcb2kzg1.js} +0 -0
  776. /package/dist/chunks/{command-sdp7kfr6.js → model-resolver-sdp7kfr6.js} +0 -0
  777. /package/dist/chunks/{command-ssg3fenm.js → model-resolver-ssg3fenm.js} +0 -0
  778. /package/dist/chunks/{command-ve7vex1e.js → model-resolver-ve7vex1e.js} +0 -0
  779. /package/dist/chunks/{command-w803qqfp.js → model-resolver-w803qqfp.js} +0 -0
  780. /package/dist/chunks/{command-wc3fc9cn.js → model-resolver-wc3fc9cn.js} +0 -0
  781. /package/dist/chunks/{command-wer8tq1h.js → model-resolver-wer8tq1h.js} +0 -0
  782. /package/dist/chunks/{command-wjj7prxr.js → model-resolver-wjj7prxr.js} +0 -0
  783. /package/dist/chunks/{command-wtztk69x.js → model-resolver-wtztk69x.js} +0 -0
  784. /package/dist/chunks/{command-x0ckcb58.js → model-resolver-x0ckcb58.js} +0 -0
  785. /package/dist/chunks/{command-x61499pn.js → model-resolver-x61499pn.js} +0 -0
  786. /package/dist/chunks/{command-y44na4kk.js → model-resolver-y44na4kk.js} +0 -0
  787. /package/dist/chunks/{command-y8f7s663.js → model-resolver-y8f7s663.js} +0 -0
  788. /package/dist/chunks/{command-ygaqb7jw.js → model-resolver-ygaqb7jw.js} +0 -0
  789. /package/dist/chunks/{command-ym463w8f.js → model-resolver-ym463w8f.js} +0 -0
  790. /package/dist/chunks/{command-z5v4ffb3.js → model-resolver-z5v4ffb3.js} +0 -0
  791. /package/dist/chunks/{command-z9919s4g.js → model-resolver-z9919s4g.js} +0 -0
@@ -1,36 +1,27 @@
1
1
  import {
2
- Service85,
3
- node89
4
- } from "./command-5kc27ehr.js";
2
+ Service84,
3
+ node88
4
+ } from "./model-resolver-ad0b5xxd.js";
5
5
  import {
6
6
  shutdown2,
7
7
  create3
8
- } from "./command-rdw6cm16.js";
8
+ } from "./model-resolver-vd3b3yk9.js";
9
9
  import {
10
10
  key2
11
- } from "./command-mxvxcxwy.js";
11
+ } from "./model-resolver-zba5tm1j.js";
12
12
  import {
13
- ID12,
14
- Service73,
15
- node76,
13
+ ID13,
14
+ Service76,
15
+ node79,
16
16
  Event17
17
- } from "./command-smsqhasw.js";
17
+ } from "./model-resolver-6a4kxdj8.js";
18
18
  import {
19
- Service79,
20
- node83
21
- } from "./command-kv6t07rj.js";
19
+ Service80,
20
+ node84
21
+ } from "./model-resolver-qc854yns.js";
22
22
  import {
23
23
  __export
24
- } from "./command-9rqn6x4v.js";
25
-
26
- // src/aisdk-native.ts
27
- var exports_aisdk_native = {};
28
- __export(exports_aisdk_native, {
29
- AISDKNative: () => exports_aisdk_native,
30
- native: () => native2,
31
- rewrite: () => rewrite2
32
- });
33
- import { Effect as Effect2, Option as Option2, Schema as Schema2, Struct as Struct2 } from "effect";
24
+ } from "./model-resolver-9rqn6x4v.js";
34
25
 
35
26
  // src/provider.ts
36
27
  var exports_provider3 = {};
@@ -40,12 +31,12 @@ __export(exports_provider3, {
40
31
  DEFAULT_CHUNK_TIMEOUT_MS: () => DEFAULT_CHUNK_TIMEOUT_MS2,
41
32
  DEFAULT_TIMEOUT_MS: () => DEFAULT_TIMEOUT_MS3,
42
33
  Event: () => Event16,
43
- ID: () => ID11,
44
- Info: () => Info20,
34
+ ID: () => ID12,
35
+ Info: () => Info21,
45
36
  LoadError: () => LoadError3,
46
37
  Provider: () => exports_provider3,
47
38
  Request: () => Request3,
48
- Service: () => Service72,
39
+ Service: () => Service75,
49
40
  Settings: () => Settings2,
50
41
  Transport: () => Transport2,
51
42
  aisdk: () => aisdk2,
@@ -57,12 +48,22 @@ __export(exports_provider3, {
57
48
  mergeOverlay: () => mergeOverlay2,
58
49
  modelSettings: () => modelSettings2,
59
50
  nativeSettings: () => nativeSettings2,
60
- node: () => node75,
51
+ node: () => node78,
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
+
57
+ // src/aisdk-native.ts
58
+ var exports_aisdk_native = {};
59
+ __export(exports_aisdk_native, {
60
+ AISDKNative: () => exports_aisdk_native,
61
+ native: () => native2,
62
+ rewrite: () => rewrite2
63
+ });
64
+
65
+ // src/provider.ts
66
+ import { Context, Effect as Effect2, Layer, Option as Option2, Schema as Schema2, Stream, Struct as Struct2 } from "effect";
66
67
  import { Provider } from "@opencode/schema/provider";
67
68
  import { Model } from "@opencode/schema/model";
68
69
  import { makeLocationNode } from "@opencode/util/effect/app-node";
@@ -71,8 +72,259 @@ import { isRecord } from "@opencode/ai/utils/record";
71
72
  import { importModule, resolveModule } from "@opencode/util/runtime-import";
72
73
  import { Credential } from "@opencode/schema/credential";
73
74
  import { freeze } from "immer";
75
+
76
+ // src/aisdk-native.ts
77
+ import { Effect, Option, Schema, Struct } from "effect";
78
+ function rewrite2(target, input) {
79
+ if (input.specifier === undefined)
80
+ return;
81
+ const plain = resolve(input.specifier, input);
82
+ if (!plain)
83
+ return;
84
+ const settings = decode(target.settings ?? {});
85
+ const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
86
+ const translated = options(replacement, input.modelID, settings);
87
+ if (target.package !== undefined || replacement !== input.specifier)
88
+ target.package = replacement;
89
+ const identity = replacement === "@opencode/ai/providers/openai-compatible" && !builtinPackages2.has(input.specifier) ? { provider: input.canonical ?? input.providerID } : {};
90
+ target.settings = target.settings === undefined ? undefined : { ...translated.settings, ...identity };
91
+ target.headers = mergeHeaders2(translated.headers, target.headers);
92
+ target.body = mergeOverlay2(translated.body, target.body);
93
+ target.variants = target.variants?.map((variant) => {
94
+ const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
95
+ const headers = mergeHeaders2(overlay.headers, variant.headers);
96
+ const body = mergeOverlay2(overlay.body, variant.body);
97
+ return {
98
+ id: variant.id,
99
+ ...variant.settings === undefined ? {} : { settings: overlay.settings },
100
+ ...headers === undefined ? {} : { headers },
101
+ ...body === undefined ? {} : { body }
102
+ };
103
+ });
104
+ }
105
+ var PACKAGES = {
106
+ "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
107
+ "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
108
+ "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
109
+ "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
110
+ "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
111
+ "@ai-sdk/cohere": "@opencode/ai/providers/cohere",
112
+ "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
113
+ "@ai-sdk/google": "@opencode/ai/providers/google",
114
+ "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
115
+ "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
116
+ "@ai-sdk/groq": "@opencode/ai/providers/groq",
117
+ "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
118
+ "@ai-sdk/openai": "@opencode/ai/providers/openai",
119
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
120
+ "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
121
+ "@ai-sdk/xai": "@opencode/ai/providers/xai",
122
+ "@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
123
+ "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
124
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
125
+ "venice-ai-sdk-provider": "@opencode/ai/providers/venice"
126
+ };
127
+ var protocols = (name) => ({
128
+ "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
129
+ "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
130
+ "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
131
+ });
132
+ var HOSTS = {
133
+ alibaba: protocols("alibaba"),
134
+ "alibaba-cn": protocols("alibaba"),
135
+ "alibaba-coding-plan": protocols("alibaba"),
136
+ "alibaba-coding-plan-cn": protocols("alibaba"),
137
+ "alibaba-token-plan": protocols("alibaba"),
138
+ "alibaba-token-plan-cn": protocols("alibaba"),
139
+ baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
140
+ "cloudflare-ai-gateway": {
141
+ "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
142
+ "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
143
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
144
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
145
+ },
146
+ cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
147
+ "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
148
+ deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
149
+ digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
150
+ "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
151
+ "google-vertex": {
152
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat",
153
+ "@ai-sdk/mistral": "@opencode/ai/providers/google-vertex/mistral"
154
+ },
155
+ "kimi-for-coding": protocols("moonshot"),
156
+ meta: protocols("meta"),
157
+ minimax: protocols("minimax"),
158
+ "minimax-cn": protocols("minimax"),
159
+ "minimax-coding-plan": protocols("minimax"),
160
+ "minimax-cn-coding-plan": protocols("minimax"),
161
+ moonshotai: protocols("moonshot"),
162
+ "moonshotai-cn": protocols("moonshot"),
163
+ zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
164
+ "zai-coding-plan": protocols("zai-coding-plan"),
165
+ zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
166
+ "zhipuai-coding-plan": protocols("zai-coding-plan")
167
+ };
168
+ function native2(npm, context) {
169
+ const host = HOSTS[context.providerID]?.[npm];
170
+ if (host)
171
+ return host;
172
+ if (npm === "@ai-sdk/amazon-bedrock/mantle")
173
+ return mantle(context.modelID);
174
+ if (npm === "@ai-sdk/azure" && azureChat(context))
175
+ return "@opencode/ai/providers/azure/chat";
176
+ return PACKAGES[npm];
177
+ }
178
+ var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
179
+ var mantle = (modelID) => {
180
+ if (modelID === undefined)
181
+ return "@opencode/ai/providers/amazon-bedrock/mantle";
182
+ if (modelID.includes("anthropic."))
183
+ return "@opencode/ai/providers/amazon-bedrock/mantle/messages";
184
+ return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
185
+ };
186
+ function resolve(specifier, context) {
187
+ const npm = packageName2(specifier);
188
+ if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
189
+ return native2(npm, context);
190
+ if (npm === "@opencode/ai/providers/amazon-bedrock/mantle" || npm === "@opencode/ai/providers/amazon-bedrock-mantle")
191
+ return mantle(context.modelID);
192
+ if ((npm === "@opencode/ai/providers/azure" || npm === "@opencode/ai/providers/azure/responses") && azureChat(context))
193
+ return "@opencode/ai/providers/azure/chat";
194
+ return builtinPackages2.has(npm) ? npm : undefined;
195
+ }
196
+ function options(replacement, modelID, settings) {
197
+ const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
198
+ const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
199
+ const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
200
+ return {
201
+ settings: {
202
+ ...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
203
+ ...thinking === undefined ? {} : { thinking }
204
+ },
205
+ ...settings.headers === undefined ? {} : { headers: settings.headers },
206
+ ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
207
+ ...converse ? bedrockRequest(modelID, settings) : {},
208
+ ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
209
+ };
210
+ }
211
+ var BEDROCK_KEYS = [
212
+ "bearerToken",
213
+ "endpoint",
214
+ "credentials",
215
+ "credentialProvider",
216
+ "accessKeyId",
217
+ "secretAccessKey",
218
+ "sessionToken"
219
+ ];
220
+ var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
221
+ function bedrockSettings(settings, converse) {
222
+ const region = settings.region ?? settings.credentials?.region;
223
+ const credentials = settings.credentials ?? settings;
224
+ const baseURL = settings.baseURL ?? settings.endpoint;
225
+ return {
226
+ ...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
227
+ ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
228
+ ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
229
+ ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
230
+ credentials: {
231
+ ...region === undefined ? {} : { region },
232
+ accessKeyId: credentials.accessKeyId,
233
+ secretAccessKey: credentials.secretAccessKey,
234
+ ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
235
+ }
236
+ }
237
+ };
238
+ }
239
+ function bedrockThinking(modelID, settings) {
240
+ const reasoning = settings.reasoningConfig;
241
+ if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
242
+ return;
243
+ return { type: "enabled", budgetTokens: reasoning.budgetTokens };
244
+ }
245
+ function bedrockRequest(modelID, settings) {
246
+ const additional = settings.additionalModelRequestFields ?? {};
247
+ const reasoning = settings.reasoningConfig;
248
+ const anthropic = modelID?.includes("anthropic") ?? false;
249
+ const openai = modelID?.includes("openai.") ?? false;
250
+ const harmony = modelID?.includes("openai.gpt-oss") ?? false;
251
+ const effort = reasoning?.maxReasoningEffort;
252
+ const type = reasoning?.type;
253
+ const budget = reasoning?.budgetTokens;
254
+ const display = reasoning?.display;
255
+ const betas = settings.anthropicBeta ?? [];
256
+ const fields = mergeOverlay2(additional, {
257
+ ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
258
+ ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
259
+ ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
260
+ ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
261
+ ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
262
+ ...!anthropic && !openai && effort !== undefined ? {
263
+ reasoningConfig: {
264
+ ...type === undefined || type === "adaptive" ? {} : { type },
265
+ ...budget === undefined ? {} : { budgetTokens: budget },
266
+ maxReasoningEffort: effort
267
+ }
268
+ } : {}
269
+ });
270
+ const body = {
271
+ ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
272
+ ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
273
+ };
274
+ return Object.keys(body).length === 0 ? {} : { body };
275
+ }
276
+ var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
277
+ function openRouterRequest(settings) {
278
+ const headers = mergeHeaders2({
279
+ ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
280
+ ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
281
+ ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
282
+ }, settings.headers) ?? {};
283
+ return Object.keys(headers).length === 0 ? {} : { headers };
284
+ }
285
+ var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
286
+ var Credentials = Schema.Struct({
287
+ accessKeyId: Schema.String,
288
+ secretAccessKey: Schema.String,
289
+ sessionToken: lenient(Schema.String),
290
+ region: lenient(Schema.String)
291
+ });
292
+ var Legacy = Schema.StructWithRest(Schema.Struct({
293
+ apiKey: lenient(Schema.String),
294
+ baseURL: lenient(Schema.String),
295
+ headers: lenient(Schema.Record(Schema.String, Schema.String)),
296
+ extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
297
+ useCompletionUrls: lenient(Schema.Boolean),
298
+ auth: lenient(Schema.Literals(["bearer", "sigv4"])),
299
+ bearerToken: lenient(Schema.String),
300
+ endpoint: lenient(Schema.String),
301
+ region: lenient(Schema.String),
302
+ credentials: lenient(Credentials),
303
+ accessKeyId: lenient(Schema.String),
304
+ secretAccessKey: lenient(Schema.String),
305
+ sessionToken: lenient(Schema.String),
306
+ anthropicBeta: lenient(Schema.Array(Schema.String)),
307
+ serviceTier: lenient(Schema.String),
308
+ reasoningConfig: lenient(Schema.Struct({
309
+ type: lenient(Schema.String),
310
+ display: lenient(Schema.String),
311
+ maxReasoningEffort: lenient(Schema.String),
312
+ budgetTokens: lenient(Schema.Number)
313
+ })),
314
+ additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
315
+ anthropic_beta: lenient(Schema.Array(Schema.String)),
316
+ output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
317
+ reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
318
+ }), [Schema.Record(Schema.String, Schema.Unknown)])),
319
+ appName: lenient(Schema.String),
320
+ appUrl: lenient(Schema.String),
321
+ api_keys: lenient(Schema.Record(Schema.String, Schema.String))
322
+ }), [Schema.Record(Schema.String, Schema.Unknown)]);
323
+ var decode = Schema.decodeUnknownSync(Legacy);
324
+
325
+ // src/provider.ts
74
326
  import { Event as Event16 } from "@opencode/schema/provider";
75
- var ID11 = Provider.ID;
327
+ var ID12 = Provider.ID;
76
328
  var AISDK_PREFIX2 = "aisdk:";
77
329
  var isAISDK2 = (value) => value?.startsWith(AISDK_PREFIX2) ?? false;
78
330
  var aisdk2 = (value) => isAISDK2(value) ? value : `${AISDK_PREFIX2}${value}`;
@@ -83,12 +335,12 @@ function packageName2(value) {
83
335
  return value;
84
336
  return value.slice(AISDK_PREFIX2.length);
85
337
  }
86
- var JsonRecord = Schema.Record(Schema.String, Schema.Json);
87
- var decodeJsonRecord = Schema.decodeUnknownSync(JsonRecord);
338
+ var JsonRecord = Schema2.Record(Schema2.String, Schema2.Json);
339
+ var decodeJsonRecord = Schema2.decodeUnknownSync(JsonRecord);
88
340
 
89
- class LoadError3 extends Schema.TaggedError()("Provider.LoadError", {
90
- package: Schema.String,
91
- cause: Schema.Defect()
341
+ class LoadError3 extends Schema2.TaggedError()("Provider.LoadError", {
342
+ package: Schema2.String,
343
+ cause: Schema2.Defect()
92
344
  }) {
93
345
  }
94
346
  var packages = new Map;
@@ -198,12 +450,12 @@ var builtins = new Map([
198
450
  ]
199
451
  ]);
200
452
  var builtinPackages2 = new Set(builtins.keys());
201
- var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
453
+ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
202
454
  const specifier = packageName2(input);
203
455
  const builtin = builtins.get(specifier);
204
456
  if (builtin)
205
457
  return yield* importPackage(specifier, specifier, builtin);
206
- const resolved = yield* Effect.sync(() => {
458
+ const resolved = yield* Effect2.sync(() => {
207
459
  if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
208
460
  return specifier;
209
461
  try {
@@ -222,8 +474,8 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
222
474
  }
223
475
  const parts = specifier.split("/");
224
476
  const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
225
- const installed = yield* npm.add(root).pipe(Effect.mapError((cause) => new LoadError3({ package: specifier, cause })));
226
- const entrypoint = yield* Effect.try({
477
+ const installed = yield* npm.add(root).pipe(Effect2.mapError((cause) => new LoadError3({ package: specifier, cause })));
478
+ const entrypoint = yield* Effect2.try({
227
479
  try: () => resolveModule(specifier, installed.directory),
228
480
  catch: (cause) => new LoadError3({ package: specifier, cause })
229
481
  });
@@ -232,16 +484,16 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
232
484
  var CORE_KEYS = ["chunkTimeout", "compaction", "encoding", "fetch", "headerTimeout", "timeout", "transport"];
233
485
  var PROVIDER_ONLY_KEYS = ["chunkTimeout", "headerTimeout", "timeout", "transport"];
234
486
  function nativeSettings2(settings) {
235
- return Struct.omit(settings, CORE_KEYS);
487
+ return Struct2.omit(settings, CORE_KEYS);
236
488
  }
237
489
  function modelSettings2(settings) {
238
- return settings && Struct.omit(settings, PROVIDER_ONLY_KEYS);
490
+ return settings && Struct2.omit(settings, PROVIDER_ONLY_KEYS);
239
491
  }
240
- var decodeTimeout = Schema.decodeUnknownOption(HttpTimeout);
492
+ var decodeTimeout = Schema2.decodeUnknownOption(HttpTimeout);
241
493
  var DEFAULT_TIMEOUT_MS3 = 300000;
242
494
  var DEFAULT_CHUNK_TIMEOUT_MS2 = 900000;
243
495
  function timeout2(value) {
244
- return Option.getOrUndefined(decodeTimeout(value));
496
+ return Option2.getOrUndefined(decodeTimeout(value));
245
497
  }
246
498
  function timeouts2(settings) {
247
499
  return {
@@ -250,9 +502,9 @@ function timeouts2(settings) {
250
502
  chunkTimeout: timeout2(settings.chunkTimeout) ?? DEFAULT_CHUNK_TIMEOUT_MS2
251
503
  };
252
504
  }
253
- var decodeEncoding = Schema.decodeUnknownOption(Provider.Encoding);
505
+ var decodeEncoding = Schema2.decodeUnknownOption(Provider.Encoding);
254
506
  function encoding2(settings) {
255
- return Option.getOrUndefined(decodeEncoding(settings.encoding));
507
+ return Option2.getOrUndefined(decodeEncoding(settings.encoding));
256
508
  }
257
509
  function mergeOverlay2(base, overlay) {
258
510
  if (base === undefined)
@@ -286,9 +538,9 @@ var Request3 = Provider.Request;
286
538
  var Compaction3 = Provider.Compaction;
287
539
  var Transport2 = Provider.Transport;
288
540
  var Settings2 = Provider.Settings;
289
- var Info20 = Provider.Info;
541
+ var Info21 = Provider.Info;
290
542
 
291
- class Service72 extends Context.Service()("@opencode/Provider") {
543
+ class Service75 extends Context.Service()("@opencode/Provider") {
292
544
  }
293
545
  var definitions = new WeakMap;
294
546
  function index(providerID, models) {
@@ -301,10 +553,10 @@ function index(providerID, models) {
301
553
  definitions.set(models, indexes);
302
554
  return result;
303
555
  }
304
- var layer = Layer.effect(Service72, Effect.gen(function* () {
305
- const bus = yield* Service85;
306
- const integrations = yield* Service73;
307
- const location = yield* Service79;
556
+ var layer = Layer.effect(Service75, Effect2.gen(function* () {
557
+ const bus = yield* Service84;
558
+ const integrations = yield* Service76;
559
+ const location = yield* Service80;
308
560
  const state = create3({
309
561
  name: "provider",
310
562
  initial: () => new Map,
@@ -315,7 +567,7 @@ var layer = Layer.effect(Service72, Effect.gen(function* () {
315
567
  const current = records.get(id);
316
568
  if (current)
317
569
  return current;
318
- const added = { provider: Info20.empty(id), models: new Map };
570
+ const added = { provider: Info21.empty(id), models: new Map };
319
571
  records.set(id, added);
320
572
  maps.add(added.models);
321
573
  return added;
@@ -383,9 +635,9 @@ var layer = Layer.effect(Service72, Effect.gen(function* () {
383
635
  },
384
636
  notify: () => notify
385
637
  });
386
- yield* Effect.addFinalizer(() => shutdown2(state.reload()));
638
+ yield* Effect2.addFinalizer(() => shutdown2(state.reload()));
387
639
  let cached;
388
- const snapshot = Effect.fn("Provider.snapshot")(function* () {
640
+ const snapshot = Effect2.fn("Provider.snapshot")(function* () {
389
641
  while (true) {
390
642
  const revision = integrations.revision();
391
643
  const records = state.get();
@@ -396,7 +648,7 @@ var layer = Layer.effect(Service72, Effect.gen(function* () {
396
648
  const available = Array.from(records.values()).filter((record) => {
397
649
  if (record.provider.activation === "disabled")
398
650
  return false;
399
- const integration = byID.get(record.provider.integrationID ?? ID12.make(record.provider.id));
651
+ const integration = byID.get(record.provider.integrationID ?? ID13.make(record.provider.id));
400
652
  if (record.sourceConnection && key2(record.sourceConnection) !== key2(integration?.connections[0]))
401
653
  return false;
402
654
  if (record.provider.activation === "enabled")
@@ -413,7 +665,7 @@ var layer = Layer.effect(Service72, Effect.gen(function* () {
413
665
  }
414
666
  });
415
667
  let published;
416
- const notify = Effect.gen(function* () {
668
+ const notify = Effect2.gen(function* () {
417
669
  const value = yield* snapshot();
418
670
  if (value === published)
419
671
  return;
@@ -422,19 +674,19 @@ var layer = Layer.effect(Service72, Effect.gen(function* () {
422
674
  location: { directory: location.directory, workspaceID: location.workspaceID }
423
675
  });
424
676
  });
425
- yield* bus.subscribe([Event17.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect.forkScoped({ startImmediately: true }));
426
- return Service72.of({
677
+ yield* bus.subscribe([Event17.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect2.forkScoped({ startImmediately: true }));
678
+ return Service75.of({
427
679
  transform: state.transform,
428
680
  reload: state.reload,
429
- get: Effect.fn("Provider.get")((id) => Effect.sync(() => freeze(state.get().get(id)?.provider, true))),
430
- all: Effect.fn("Provider.all")(() => Effect.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
431
- available: Effect.fn("Provider.available")(() => snapshot().pipe(Effect.map((value) => value.providers))),
681
+ get: Effect2.fn("Provider.get")((id) => Effect2.sync(() => freeze(state.get().get(id)?.provider, true))),
682
+ all: Effect2.fn("Provider.all")(() => Effect2.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
683
+ available: Effect2.fn("Provider.available")(() => snapshot().pipe(Effect2.map((value) => value.providers))),
432
684
  snapshot
433
685
  });
434
686
  }));
435
- var node75 = makeLocationNode({ service: Service72, layer, deps: [node89, node76, node83] });
436
- var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
437
- const module = yield* Effect.tryPromise({
687
+ var node78 = makeLocationNode({ service: Service75, layer, deps: [node88, node79, node84] });
688
+ var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
689
+ const module = yield* Effect2.tryPromise({
438
690
  try: () => {
439
691
  const existing = packages.get(entrypoint);
440
692
  if (existing)
@@ -454,252 +706,4 @@ var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, en
454
706
  return module;
455
707
  });
456
708
 
457
- // src/aisdk-native.ts
458
- function rewrite2(target, input) {
459
- if (input.specifier === undefined)
460
- return;
461
- const plain = resolve(input.specifier, input);
462
- if (!plain)
463
- return;
464
- const settings = decode(target.settings ?? {});
465
- const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
466
- const translated = options(replacement, input.modelID, settings);
467
- if (target.package !== undefined || replacement !== input.specifier)
468
- target.package = replacement;
469
- const identity = replacement === "@opencode/ai/providers/openai-compatible" && !builtinPackages2.has(input.specifier) ? { provider: input.canonical ?? input.providerID } : {};
470
- target.settings = target.settings === undefined ? undefined : { ...translated.settings, ...identity };
471
- target.headers = mergeHeaders2(translated.headers, target.headers);
472
- target.body = mergeOverlay2(translated.body, target.body);
473
- target.variants = target.variants?.map((variant) => {
474
- const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
475
- const headers = mergeHeaders2(overlay.headers, variant.headers);
476
- const body = mergeOverlay2(overlay.body, variant.body);
477
- return {
478
- id: variant.id,
479
- ...variant.settings === undefined ? {} : { settings: overlay.settings },
480
- ...headers === undefined ? {} : { headers },
481
- ...body === undefined ? {} : { body }
482
- };
483
- });
484
- }
485
- var PACKAGES = {
486
- "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
487
- "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
488
- "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
489
- "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
490
- "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
491
- "@ai-sdk/cohere": "@opencode/ai/providers/cohere",
492
- "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
493
- "@ai-sdk/google": "@opencode/ai/providers/google",
494
- "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
495
- "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
496
- "@ai-sdk/groq": "@opencode/ai/providers/groq",
497
- "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
498
- "@ai-sdk/openai": "@opencode/ai/providers/openai",
499
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
500
- "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
501
- "@ai-sdk/xai": "@opencode/ai/providers/xai",
502
- "@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
503
- "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
504
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
505
- "venice-ai-sdk-provider": "@opencode/ai/providers/venice"
506
- };
507
- var protocols = (name) => ({
508
- "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
509
- "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
510
- "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
511
- });
512
- var HOSTS = {
513
- alibaba: protocols("alibaba"),
514
- "alibaba-cn": protocols("alibaba"),
515
- "alibaba-coding-plan": protocols("alibaba"),
516
- "alibaba-coding-plan-cn": protocols("alibaba"),
517
- "alibaba-token-plan": protocols("alibaba"),
518
- "alibaba-token-plan-cn": protocols("alibaba"),
519
- baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
520
- "cloudflare-ai-gateway": {
521
- "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
522
- "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
523
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
524
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
525
- },
526
- cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
527
- "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
528
- deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
529
- digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
530
- "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
531
- "google-vertex": {
532
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat",
533
- "@ai-sdk/mistral": "@opencode/ai/providers/google-vertex/mistral"
534
- },
535
- "kimi-for-coding": protocols("moonshot"),
536
- meta: protocols("meta"),
537
- minimax: protocols("minimax"),
538
- "minimax-cn": protocols("minimax"),
539
- "minimax-coding-plan": protocols("minimax"),
540
- "minimax-cn-coding-plan": protocols("minimax"),
541
- moonshotai: protocols("moonshot"),
542
- "moonshotai-cn": protocols("moonshot"),
543
- zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
544
- "zai-coding-plan": protocols("zai-coding-plan"),
545
- zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
546
- "zhipuai-coding-plan": protocols("zai-coding-plan")
547
- };
548
- function native2(npm, context) {
549
- const host = HOSTS[context.providerID]?.[npm];
550
- if (host)
551
- return host;
552
- if (npm === "@ai-sdk/amazon-bedrock/mantle")
553
- return mantle(context.modelID);
554
- if (npm === "@ai-sdk/azure" && azureChat(context))
555
- return "@opencode/ai/providers/azure/chat";
556
- return PACKAGES[npm];
557
- }
558
- var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
559
- var mantle = (modelID) => {
560
- if (modelID === undefined)
561
- return "@opencode/ai/providers/amazon-bedrock/mantle";
562
- if (modelID.includes("anthropic."))
563
- return "@opencode/ai/providers/amazon-bedrock/mantle/messages";
564
- return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
565
- };
566
- function resolve(specifier, context) {
567
- const npm = packageName2(specifier);
568
- if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
569
- return native2(npm, context);
570
- if (npm === "@opencode/ai/providers/amazon-bedrock/mantle" || npm === "@opencode/ai/providers/amazon-bedrock-mantle")
571
- return mantle(context.modelID);
572
- if ((npm === "@opencode/ai/providers/azure" || npm === "@opencode/ai/providers/azure/responses") && azureChat(context))
573
- return "@opencode/ai/providers/azure/chat";
574
- return builtinPackages2.has(npm) ? npm : undefined;
575
- }
576
- function options(replacement, modelID, settings) {
577
- const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
578
- const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
579
- const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
580
- return {
581
- settings: {
582
- ...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
583
- ...thinking === undefined ? {} : { thinking }
584
- },
585
- ...settings.headers === undefined ? {} : { headers: settings.headers },
586
- ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
587
- ...converse ? bedrockRequest(modelID, settings) : {},
588
- ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
589
- };
590
- }
591
- var BEDROCK_KEYS = [
592
- "bearerToken",
593
- "endpoint",
594
- "credentials",
595
- "credentialProvider",
596
- "accessKeyId",
597
- "secretAccessKey",
598
- "sessionToken"
599
- ];
600
- var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
601
- function bedrockSettings(settings, converse) {
602
- const region = settings.region ?? settings.credentials?.region;
603
- const credentials = settings.credentials ?? settings;
604
- const baseURL = settings.baseURL ?? settings.endpoint;
605
- return {
606
- ...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
607
- ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
608
- ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
609
- ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
610
- credentials: {
611
- ...region === undefined ? {} : { region },
612
- accessKeyId: credentials.accessKeyId,
613
- secretAccessKey: credentials.secretAccessKey,
614
- ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
615
- }
616
- }
617
- };
618
- }
619
- function bedrockThinking(modelID, settings) {
620
- const reasoning = settings.reasoningConfig;
621
- if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
622
- return;
623
- return { type: "enabled", budgetTokens: reasoning.budgetTokens };
624
- }
625
- function bedrockRequest(modelID, settings) {
626
- const additional = settings.additionalModelRequestFields ?? {};
627
- const reasoning = settings.reasoningConfig;
628
- const anthropic = modelID?.includes("anthropic") ?? false;
629
- const openai = modelID?.includes("openai.") ?? false;
630
- const harmony = modelID?.includes("openai.gpt-oss") ?? false;
631
- const effort = reasoning?.maxReasoningEffort;
632
- const type = reasoning?.type;
633
- const budget = reasoning?.budgetTokens;
634
- const display = reasoning?.display;
635
- const betas = settings.anthropicBeta ?? [];
636
- const fields = mergeOverlay2(additional, {
637
- ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
638
- ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
639
- ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
640
- ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
641
- ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
642
- ...!anthropic && !openai && effort !== undefined ? {
643
- reasoningConfig: {
644
- ...type === undefined || type === "adaptive" ? {} : { type },
645
- ...budget === undefined ? {} : { budgetTokens: budget },
646
- maxReasoningEffort: effort
647
- }
648
- } : {}
649
- });
650
- const body = {
651
- ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
652
- ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
653
- };
654
- return Object.keys(body).length === 0 ? {} : { body };
655
- }
656
- var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
657
- function openRouterRequest(settings) {
658
- const headers = mergeHeaders2({
659
- ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
660
- ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
661
- ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
662
- }, settings.headers) ?? {};
663
- return Object.keys(headers).length === 0 ? {} : { headers };
664
- }
665
- var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option2.some(undefined)))));
666
- var Credentials = Schema2.Struct({
667
- accessKeyId: Schema2.String,
668
- secretAccessKey: Schema2.String,
669
- sessionToken: lenient(Schema2.String),
670
- region: lenient(Schema2.String)
671
- });
672
- var Legacy = Schema2.StructWithRest(Schema2.Struct({
673
- apiKey: lenient(Schema2.String),
674
- baseURL: lenient(Schema2.String),
675
- headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
676
- extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
677
- useCompletionUrls: lenient(Schema2.Boolean),
678
- auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
679
- bearerToken: lenient(Schema2.String),
680
- endpoint: lenient(Schema2.String),
681
- region: lenient(Schema2.String),
682
- credentials: lenient(Credentials),
683
- accessKeyId: lenient(Schema2.String),
684
- secretAccessKey: lenient(Schema2.String),
685
- sessionToken: lenient(Schema2.String),
686
- anthropicBeta: lenient(Schema2.Array(Schema2.String)),
687
- serviceTier: lenient(Schema2.String),
688
- reasoningConfig: lenient(Schema2.Struct({
689
- type: lenient(Schema2.String),
690
- display: lenient(Schema2.String),
691
- maxReasoningEffort: lenient(Schema2.String),
692
- budgetTokens: lenient(Schema2.Number)
693
- })),
694
- additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
695
- anthropic_beta: lenient(Schema2.Array(Schema2.String)),
696
- output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
697
- reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
698
- }), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
699
- appName: lenient(Schema2.String),
700
- appUrl: lenient(Schema2.String),
701
- api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
702
- }), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
703
- var decode = Schema2.decodeUnknownSync(Legacy);
704
-
705
- export { rewrite2, native2, exports_aisdk_native, ID11, 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, Info20, Service72, node75, exports_provider3, Event16 };
709
+ export { rewrite2, native2, exports_aisdk_native, ID12, 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, Info21, Service75, node78, exports_provider3, Event16 };