@opencode/core 0.0.0-dev-19965 → 0.0.0-dev-19967

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 (796) hide show
  1. package/dist/account/sql.js +1 -1
  2. package/dist/agent.js +80 -80
  3. package/dist/aisdk-native.js +88 -88
  4. package/dist/aisdk.js +93 -93
  5. package/dist/app.js +7 -7
  6. package/dist/bus.js +68 -68
  7. package/dist/chunks/{project-52setmep.js → aisdk-native-04vcknvn.js} +20 -20
  8. package/dist/chunks/{project-rsm7z9rp.js → aisdk-native-08b53j8k.js} +6 -6
  9. package/dist/chunks/{project-ee4p7x9e.js → aisdk-native-0b64rne8.js} +21 -21
  10. package/dist/chunks/{project-tc2dawkr.js → aisdk-native-0bap6m1d.js} +14 -14
  11. package/dist/chunks/{project-2r1f3161.js → aisdk-native-0j95bcj7.js} +27 -27
  12. package/dist/chunks/{project-607tc6va.js → aisdk-native-0jwsre1p.js} +5 -5
  13. package/dist/chunks/{project-0paq2nw3.js → aisdk-native-0paq2nw3.js} +1 -1
  14. package/dist/chunks/{project-0q0f95c6.js → aisdk-native-0q0f95c6.js} +1 -1
  15. package/dist/chunks/{project-xjtsx636.js → aisdk-native-0ryd0fps.js} +5 -5
  16. package/dist/chunks/{project-p2wj83qv.js → aisdk-native-0tcf0cgs.js} +17 -17
  17. package/dist/chunks/aisdk-native-0ysm87ma.js +503 -0
  18. package/dist/chunks/{project-waa9wdep.js → aisdk-native-10jtetaj.js} +6 -6
  19. package/dist/chunks/{project-z04y6wbq.js → aisdk-native-12efd14p.js} +32 -32
  20. package/dist/chunks/{project-6zza1smj.js → aisdk-native-14kkz81x.js} +11 -11
  21. package/dist/chunks/{project-18wzm834.js → aisdk-native-16q1ceq0.js} +13 -13
  22. package/dist/chunks/{project-f2n192rq.js → aisdk-native-1acjjqhc.js} +4 -4
  23. package/dist/chunks/{project-1dazxqgg.js → aisdk-native-1dazxqgg.js} +2 -2
  24. package/dist/chunks/{project-8apd0fk3.js → aisdk-native-1ejyj31y.js} +2 -2
  25. package/dist/chunks/{project-1g7epwpd.js → aisdk-native-1g7epwpd.js} +1 -1
  26. package/dist/chunks/{project-tbmac1c7.js → aisdk-native-1y283654.js} +4 -4
  27. package/dist/chunks/{project-y6g64962.js → aisdk-native-1yksvsw1.js} +16 -16
  28. package/dist/chunks/{project-r6q7g1m5.js → aisdk-native-214efgxg.js} +13 -13
  29. package/dist/chunks/{project-21r38tys.js → aisdk-native-21r38tys.js} +1 -1
  30. package/dist/chunks/{project-d8eda7kb.js → aisdk-native-21ww0msa.js} +11 -11
  31. package/dist/chunks/{project-mp0wkdkb.js → aisdk-native-255dexas.js} +9 -9
  32. package/dist/chunks/{project-8n69n882.js → aisdk-native-25cs5cen.js} +8 -8
  33. package/dist/chunks/{project-baxnm38s.js → aisdk-native-26p4taxf.js} +26 -26
  34. package/dist/chunks/{project-97958gw3.js → aisdk-native-2864zbrq.js} +26 -26
  35. package/dist/chunks/{project-g4jds230.js → aisdk-native-28hmshjz.js} +18 -18
  36. package/dist/chunks/{project-2a5m3afh.js → aisdk-native-2a5m3afh.js} +1 -1
  37. package/dist/chunks/{project-3gjyge2f.js → aisdk-native-2a9keyza.js} +14 -14
  38. package/dist/chunks/{project-ez67mx11.js → aisdk-native-2aje0q51.js} +18 -18
  39. package/dist/chunks/{project-qj90dp8f.js → aisdk-native-2fqa7few.js} +84 -84
  40. package/dist/chunks/{project-ykjmw520.js → aisdk-native-2k1eznmx.js} +13 -13
  41. package/dist/chunks/{project-twthfsw8.js → aisdk-native-349ehsbg.js} +43 -43
  42. package/dist/chunks/{project-9fc3v4re.js → aisdk-native-3838ekre.js} +4 -4
  43. package/dist/chunks/{project-3xwvqmwq.js → aisdk-native-388d2z2c.js} +51 -51
  44. package/dist/chunks/{project-pqeyfrg6.js → aisdk-native-39ape2he.js} +24 -24
  45. package/dist/chunks/{project-d1ss3yp7.js → aisdk-native-39cw4c27.js} +21 -21
  46. package/dist/chunks/{project-3fc6dm20.js → aisdk-native-3fc6dm20.js} +1 -1
  47. package/dist/chunks/{project-3hepkmqq.js → aisdk-native-3hepkmqq.js} +1 -1
  48. package/dist/chunks/{project-3smtnn6g.js → aisdk-native-3smtnn6g.js} +1 -1
  49. package/dist/chunks/{project-3tvqynh2.js → aisdk-native-3tvqynh2.js} +1 -1
  50. package/dist/chunks/{project-m73pcdkj.js → aisdk-native-48ysqhtp.js} +48 -48
  51. package/dist/chunks/{project-nhpae0wq.js → aisdk-native-4as33se7.js} +35 -35
  52. package/dist/chunks/{project-w4zfp3g6.js → aisdk-native-4bm0wjf4.js} +8 -8
  53. package/dist/chunks/{project-qzxpbk08.js → aisdk-native-4p0d8ydw.js} +10 -10
  54. package/dist/chunks/{project-d1mtykxg.js → aisdk-native-51f5btjf.js} +6 -6
  55. package/dist/chunks/{project-n9k4a674.js → aisdk-native-5657pbmq.js} +11 -11
  56. package/dist/chunks/{project-56gdpj1q.js → aisdk-native-56gdpj1q.js} +2 -2
  57. package/dist/chunks/{project-57ez7d0k.js → aisdk-native-57ez7d0k.js} +2 -2
  58. package/dist/chunks/{project-5daktx2q.js → aisdk-native-5daktx2q.js} +1 -1
  59. package/dist/chunks/{project-7x6t9adc.js → aisdk-native-5dmwkexr.js} +16 -16
  60. package/dist/chunks/{project-5t3nmthw.js → aisdk-native-5t3nmthw.js} +2 -2
  61. package/dist/chunks/{project-seetsk1y.js → aisdk-native-5ysrf8mt.js} +15 -15
  62. package/dist/chunks/{project-5dgn1ybc.js → aisdk-native-60cvrxka.js} +9 -9
  63. package/dist/chunks/{project-k6p7079f.js → aisdk-native-61jzsvxp.js} +25 -25
  64. package/dist/chunks/{project-8r6fg7ct.js → aisdk-native-62q24vxd.js} +24 -24
  65. package/dist/chunks/{project-669tq793.js → aisdk-native-669tq793.js} +1 -1
  66. package/dist/chunks/{project-a96hn7s0.js → aisdk-native-6b13fx8d.js} +12 -12
  67. package/dist/chunks/{project-f7rj482f.js → aisdk-native-6c7yw9pm.js} +8 -8
  68. package/dist/chunks/{project-hq2v06xf.js → aisdk-native-6dzeqvyc.js} +20 -20
  69. package/dist/chunks/{project-6h73sxmp.js → aisdk-native-6h73sxmp.js} +1 -1
  70. package/dist/chunks/{project-6msgmcgs.js → aisdk-native-6msgmcgs.js} +1 -1
  71. package/dist/chunks/{project-jksd3hgh.js → aisdk-native-6nxdza1f.js} +11 -11
  72. package/dist/chunks/{project-0hrvvet0.js → aisdk-native-6qr5d6vh.js} +8 -8
  73. package/dist/chunks/{project-jg5wt5ha.js → aisdk-native-6ws1ng0q.js} +11 -11
  74. package/dist/chunks/{project-zc0wbjka.js → aisdk-native-74j38777.js} +29 -29
  75. package/dist/chunks/{project-3bxd3j1q.js → aisdk-native-768gsh1v.js} +6 -6
  76. package/dist/chunks/{project-d3skbh37.js → aisdk-native-76b532qp.js} +46 -46
  77. package/dist/chunks/{project-cwxh38s6.js → aisdk-native-79asx6fg.js} +23 -23
  78. package/dist/chunks/{project-7bmhse3q.js → aisdk-native-7bmhse3q.js} +1 -1
  79. package/dist/chunks/{project-ha607pgt.js → aisdk-native-7bpzgkas.js} +6 -6
  80. package/dist/chunks/{project-2zcxjm8w.js → aisdk-native-7bxnrvqn.js} +17 -17
  81. package/dist/chunks/aisdk-native-7pmhh3am.js +252 -0
  82. package/dist/chunks/{project-5e15319b.js → aisdk-native-7r0r50e5.js} +5 -5
  83. package/dist/chunks/{project-jrdxm6mh.js → aisdk-native-7zg5vg3b.js} +20 -20
  84. package/dist/chunks/{project-chhs2fpd.js → aisdk-native-8cc85h43.js} +5 -5
  85. package/dist/chunks/{project-8d7r5vzw.js → aisdk-native-8d7r5vzw.js} +1 -1
  86. package/dist/chunks/{project-4s4ptdqs.js → aisdk-native-8dx722xd.js} +25 -25
  87. package/dist/chunks/{project-zafvkgz2.js → aisdk-native-8esqeqms.js} +15 -15
  88. package/dist/chunks/{project-8p4f9s12.js → aisdk-native-8p4f9s12.js} +2 -2
  89. package/dist/chunks/{project-d7w19mqk.js → aisdk-native-8ts103zx.js} +6 -6
  90. package/dist/chunks/{project-d2amnt0t.js → aisdk-native-919p5qdm.js} +68 -68
  91. package/dist/chunks/{project-fcbbx3j9.js → aisdk-native-9f40cav3.js} +13 -13
  92. package/dist/chunks/{project-ra7k8cxz.js → aisdk-native-9m18bs5g.js} +18 -18
  93. package/dist/chunks/{project-ng9fnydx.js → aisdk-native-9qsnpf19.js} +47 -47
  94. package/dist/chunks/{project-ebpj8ebp.js → aisdk-native-9r0ddkxm.js} +8 -8
  95. package/dist/chunks/{project-a1bz86dw.js → aisdk-native-a1bz86dw.js} +3 -3
  96. package/dist/chunks/{project-f09vbjwv.js → aisdk-native-a37hkwng.js} +16 -16
  97. package/dist/chunks/{project-aaet6srn.js → aisdk-native-aaet6srn.js} +2 -2
  98. package/dist/chunks/{project-s2b3f138.js → aisdk-native-abg7mv1q.js} +7 -7
  99. package/dist/chunks/{project-edx0sx26.js → aisdk-native-abywrf09.js} +9 -9
  100. package/dist/chunks/{project-5m7mkkpv.js → aisdk-native-an3t1y59.js} +39 -39
  101. package/dist/chunks/{project-3g9mhmkp.js → aisdk-native-apve2bb2.js} +3 -3
  102. package/dist/chunks/{project-b6gygkdw.js → aisdk-native-b6gygkdw.js} +2 -2
  103. package/dist/chunks/{project-3ky9txt0.js → aisdk-native-b8yz1v4p.js} +17 -17
  104. package/dist/chunks/{project-77j4ksha.js → aisdk-native-be0bzs93.js} +10 -10
  105. package/dist/chunks/{project-gg7pg1rj.js → aisdk-native-bgxcxs0p.js} +5 -5
  106. package/dist/chunks/{project-vkxpz7g2.js → aisdk-native-bha4atvq.js} +4 -4
  107. package/dist/chunks/{project-8k32wqdf.js → aisdk-native-bqpemn9t.js} +88 -88
  108. package/dist/chunks/{project-1y7t7sgp.js → aisdk-native-bs6f4dh8.js} +24 -24
  109. package/dist/chunks/{project-1gcs78sm.js → aisdk-native-c2cs6qz3.js} +44 -44
  110. package/dist/chunks/{project-7n5vx9wf.js → aisdk-native-c4gkzm1y.js} +9 -9
  111. package/dist/chunks/{project-ec8389mk.js → aisdk-native-c5gn303e.js} +4 -4
  112. package/dist/chunks/{project-dj9sq318.js → aisdk-native-c78bbtc9.js} +5 -5
  113. package/dist/chunks/{project-mnfhan20.js → aisdk-native-c7st9k6w.js} +8 -8
  114. package/dist/chunks/{project-r6dyg3h3.js → aisdk-native-c9db0hk3.js} +26 -26
  115. package/dist/chunks/{project-w6y0yszf.js → aisdk-native-c9jmemf1.js} +5 -5
  116. package/dist/chunks/{project-magykp64.js → aisdk-native-cavr175a.js} +4 -4
  117. package/dist/chunks/{project-d7fjbfjm.js → aisdk-native-cbc0wxnt.js} +4 -4
  118. package/dist/chunks/{project-g6r4f441.js → aisdk-native-ce5h6d14.js} +10 -10
  119. package/dist/chunks/{project-cfpkc3c9.js → aisdk-native-cfpkc3c9.js} +2 -2
  120. package/dist/chunks/{project-x99mmdzx.js → aisdk-native-ch9dnrae.js} +10 -10
  121. package/dist/chunks/{project-br0tr5aq.js → aisdk-native-cmwkp3r5.js} +8 -8
  122. package/dist/chunks/{project-44h5tttr.js → aisdk-native-cpj0znwe.js} +4 -4
  123. package/dist/chunks/{project-6v2gbdep.js → aisdk-native-crjgaavg.js} +12 -12
  124. package/dist/chunks/{project-tj88ws5h.js → aisdk-native-crp8wqan.js} +4 -4
  125. package/dist/chunks/{project-gv66gg0x.js → aisdk-native-d383cjmk.js} +8 -8
  126. package/dist/chunks/{project-768me8ma.js → aisdk-native-d9c2c0rp.js} +29 -29
  127. package/dist/chunks/{project-2mq1h16s.js → aisdk-native-djszqvmq.js} +9 -9
  128. package/dist/chunks/{project-40xgcexb.js → aisdk-native-dksrmg0f.js} +4 -4
  129. package/dist/chunks/{project-058vq2j8.js → aisdk-native-dpxr7wb3.js} +11 -11
  130. package/dist/chunks/{project-3z627z5z.js → aisdk-native-dq6044hd.js} +4 -4
  131. package/dist/chunks/{project-x8rnm5yb.js → aisdk-native-dwvzrzzm.js} +27 -27
  132. package/dist/chunks/{project-1c8prt5q.js → aisdk-native-e248x3jn.js} +12 -12
  133. package/dist/chunks/{project-c2ee59z5.js → aisdk-native-e46wkp54.js} +3 -3
  134. package/dist/chunks/{project-5qbx7kyj.js → aisdk-native-e4mbtex4.js} +4 -4
  135. package/dist/chunks/{project-0gdmqesm.js → aisdk-native-eaj1djv9.js} +8 -8
  136. package/dist/chunks/{project-ef5x83kb.js → aisdk-native-ef5x83kb.js} +1 -1
  137. package/dist/chunks/{project-erw5rpbs.js → aisdk-native-erw5rpbs.js} +2 -2
  138. package/dist/chunks/{project-kpt1qdq7.js → aisdk-native-espmheeq.js} +8 -8
  139. package/dist/chunks/{project-etq0c3wd.js → aisdk-native-etq0c3wd.js} +1 -1
  140. package/dist/chunks/{project-jkyq3z1t.js → aisdk-native-eydgy4n7.js} +24 -24
  141. package/dist/chunks/{project-f828m53h.js → aisdk-native-f828m53h.js} +2 -2
  142. package/dist/chunks/{project-3fr8ss9f.js → aisdk-native-fb9kxgeh.js} +9 -9
  143. package/dist/chunks/{project-rf6x4mzb.js → aisdk-native-frtshnpa.js} +23 -23
  144. package/dist/chunks/{project-rvgstrhz.js → aisdk-native-ftm6tgek.js} +17 -17
  145. package/dist/chunks/{project-fxbjtjnd.js → aisdk-native-fxbjtjnd.js} +1 -1
  146. package/dist/chunks/{project-rz9rje65.js → aisdk-native-fxmyg7a0.js} +15 -15
  147. package/dist/chunks/{project-ep6z9mt6.js → aisdk-native-g8jasmdt.js} +5 -5
  148. package/dist/chunks/{project-n42gasq5.js → aisdk-native-g9em9f1e.js} +32 -32
  149. package/dist/chunks/{project-81nbps67.js → aisdk-native-g9q1ysac.js} +31 -31
  150. package/dist/chunks/{project-6d7xp62b.js → aisdk-native-gc5jzz0a.js} +25 -25
  151. package/dist/chunks/{project-gd4qta3r.js → aisdk-native-gd4qta3r.js} +1 -1
  152. package/dist/chunks/{project-b4xa8xgk.js → aisdk-native-gmjjhz4f.js} +6 -6
  153. package/dist/chunks/{project-afed7ext.js → aisdk-native-gmjq4p6e.js} +5 -5
  154. package/dist/chunks/{project-gv6a8nnw.js → aisdk-native-gv6a8nnw.js} +2 -2
  155. package/dist/chunks/{project-vaahshze.js → aisdk-native-gyn0pabq.js} +10 -10
  156. package/dist/chunks/{project-tjr458hf.js → aisdk-native-h02668cg.js} +10 -10
  157. package/dist/chunks/{project-s5dm7ens.js → aisdk-native-h59a76v6.js} +21 -21
  158. package/dist/chunks/{project-h6vf3j39.js → aisdk-native-h6vf3j39.js} +1 -1
  159. package/dist/chunks/{project-b0dgvpy7.js → aisdk-native-h71w788e.js} +9 -9
  160. package/dist/chunks/{project-sdkmmp6p.js → aisdk-native-h81gfgav.js} +28 -28
  161. package/dist/chunks/{project-b4m32151.js → aisdk-native-hasmkr10.js} +7 -7
  162. package/dist/chunks/{project-tsxqf4cv.js → aisdk-native-he6h4970.js} +25 -25
  163. package/dist/chunks/{project-m4s37zq8.js → aisdk-native-hj39tw6c.js} +11 -11
  164. package/dist/chunks/{project-z47gpksh.js → aisdk-native-hje5hbx5.js} +24 -24
  165. package/dist/chunks/{project-zgqx0wd1.js → aisdk-native-hmfj1a23.js} +3 -3
  166. package/dist/chunks/{project-ryycqeg8.js → aisdk-native-hv5qm7e0.js} +1 -1
  167. package/dist/chunks/{project-6gnjnc72.js → aisdk-native-hx42ska4.js} +174 -174
  168. package/dist/chunks/{project-bsrjb1f7.js → aisdk-native-j3wbk9h7.js} +15 -15
  169. package/dist/chunks/{project-j56e64zr.js → aisdk-native-j56e64zr.js} +1 -1
  170. package/dist/chunks/{project-0merdtq6.js → aisdk-native-jc8mfy6t.js} +50 -50
  171. package/dist/chunks/{project-kbwf032e.js → aisdk-native-jca4demv.js} +2 -2
  172. package/dist/chunks/{project-3wdv6d8m.js → aisdk-native-jj7mqc2j.js} +17 -17
  173. package/dist/chunks/aisdk-native-jqh9b0xq.js +18 -0
  174. package/dist/chunks/{project-4n60pb9e.js → aisdk-native-k005s409.js} +3 -3
  175. package/dist/chunks/{project-j3vg15m0.js → aisdk-native-k38nv8qa.js} +22 -22
  176. package/dist/chunks/{project-k3c624dm.js → aisdk-native-k3c624dm.js} +3 -3
  177. package/dist/chunks/{project-knb7evpn.js → aisdk-native-k9kj6xed.js} +6 -6
  178. package/dist/chunks/{project-q15fhm92.js → aisdk-native-m263hbz5.js} +6 -6
  179. package/dist/chunks/{project-m3fdjcah.js → aisdk-native-m3fdjcah.js} +1 -1
  180. package/dist/chunks/{project-qtcnb6n0.js → aisdk-native-m9r2t55r.js} +30 -30
  181. package/dist/chunks/{project-m9w0rfyh.js → aisdk-native-m9w0rfyh.js} +1 -1
  182. package/dist/chunks/aisdk-native-mn86beav.js +26 -0
  183. package/dist/chunks/{project-tb8aj0jp.js → aisdk-native-mpwc7f39.js} +16 -16
  184. package/dist/chunks/{project-btkph3mh.js → aisdk-native-mr1wt611.js} +19 -19
  185. package/dist/chunks/{project-5ykpya4c.js → aisdk-native-mvc6a162.js} +26 -26
  186. package/dist/chunks/{project-nwtacksf.js → aisdk-native-mve20dzm.js} +11 -11
  187. package/dist/chunks/{project-zymmqkhq.js → aisdk-native-n6z3zh05.js} +6 -6
  188. package/dist/chunks/{project-4y1rcddj.js → aisdk-native-nb0p13vf.js} +11 -11
  189. package/dist/chunks/{project-chezdbnw.js → aisdk-native-ndgn9124.js} +10 -10
  190. package/dist/chunks/{project-mk6cxvfk.js → aisdk-native-nk7emz49.js} +25 -25
  191. package/dist/chunks/{project-cr07tj7n.js → aisdk-native-nxhqveyz.js} +5 -5
  192. package/dist/chunks/{project-ezzzks3g.js → aisdk-native-p1cpmwyf.js} +19 -19
  193. package/dist/chunks/{project-5bsxggaw.js → aisdk-native-p1wgmcdp.js} +9 -9
  194. package/dist/chunks/{project-p28j5sbe.js → aisdk-native-p28j5sbe.js} +2 -2
  195. package/dist/chunks/{project-jtyz3hnt.js → aisdk-native-p3snnar0.js} +20 -20
  196. package/dist/chunks/{project-f55ehv52.js → aisdk-native-p63xjmtt.js} +33 -33
  197. package/dist/chunks/{project-6z4wb64c.js → aisdk-native-paegk39x.js} +4 -4
  198. package/dist/chunks/{project-j8rw3axx.js → aisdk-native-pgvyerd8.js} +24 -24
  199. package/dist/chunks/{project-pjvnvgmy.js → aisdk-native-pjvnvgmy.js} +1 -1
  200. package/dist/chunks/{project-pknna89w.js → aisdk-native-pknna89w.js} +1 -1
  201. package/dist/chunks/{project-fhs97t90.js → aisdk-native-pnv527nz.js} +9 -9
  202. package/dist/chunks/{project-msyq6m42.js → aisdk-native-pwa5myfx.js} +35 -35
  203. package/dist/chunks/{project-9bvpbkhr.js → aisdk-native-pz9d297f.js} +296 -296
  204. package/dist/chunks/{project-0jr93kkc.js → aisdk-native-q2cv6ezx.js} +8 -8
  205. package/dist/chunks/{project-gynv5cx7.js → aisdk-native-q3t37ft6.js} +3 -3
  206. package/dist/chunks/{project-pts6vf4w.js → aisdk-native-q4rwn17c.js} +35 -35
  207. package/dist/chunks/{project-5c4s9rra.js → aisdk-native-q7f3ye16.js} +16 -16
  208. package/dist/chunks/{project-zvg9jnf3.js → aisdk-native-qk5zamx4.js} +33 -33
  209. package/dist/chunks/{project-91ny65fk.js → aisdk-native-qr6c5py0.js} +17 -17
  210. package/dist/chunks/{project-qsdy395h.js → aisdk-native-qsdy395h.js} +1 -1
  211. package/dist/chunks/{project-rbtwj3fv.js → aisdk-native-qtr314hw.js} +11 -11
  212. package/dist/chunks/{project-w7gj1e9s.js → aisdk-native-qw3d0tgx.js} +31 -31
  213. package/dist/chunks/{project-m4nmqper.js → aisdk-native-r06e96jb.js} +14 -14
  214. package/dist/chunks/{project-23pqda6t.js → aisdk-native-r33ff4dw.js} +6 -6
  215. package/dist/chunks/{project-mvfsc1pv.js → aisdk-native-r5x6zcsm.js} +3 -3
  216. package/dist/chunks/{project-rdw6cm16.js → aisdk-native-rdw6cm16.js} +1 -1
  217. package/dist/chunks/{project-qgcp42sq.js → aisdk-native-rqss4qzh.js} +44 -44
  218. package/dist/chunks/{project-tkndnfam.js → aisdk-native-rtmswcvb.js} +4 -4
  219. package/dist/chunks/{project-6d6xcght.js → aisdk-native-rtv6ahp9.js} +4 -4
  220. package/dist/chunks/{project-3de7jp1p.js → aisdk-native-rykkbjxj.js} +21 -21
  221. package/dist/chunks/{project-dgt6kxbt.js → aisdk-native-rz83yr6x.js} +13 -13
  222. package/dist/chunks/{project-cd5e0ncw.js → aisdk-native-s6mjq73x.js} +1 -1
  223. package/dist/chunks/{project-2c50a4hz.js → aisdk-native-s9nv257w.js} +30 -30
  224. package/dist/chunks/{project-ss3aymxd.js → aisdk-native-seke3243.js} +3 -3
  225. package/dist/chunks/{project-9ken6xqn.js → aisdk-native-t74x5pjs.js} +8 -8
  226. package/dist/chunks/{project-pmr4s4kc.js → aisdk-native-t9zs3egg.js} +4 -4
  227. package/dist/chunks/{project-tazgh4e4.js → aisdk-native-tazgh4e4.js} +1 -1
  228. package/dist/chunks/{project-46459e7q.js → aisdk-native-tbckyrxw.js} +15 -15
  229. package/dist/chunks/{project-89znhe33.js → aisdk-native-tcezcvh9.js} +4 -4
  230. package/dist/chunks/{project-kv4fs7t7.js → aisdk-native-tcg29b4q.js} +1 -1
  231. package/dist/chunks/{project-tdstcens.js → aisdk-native-tdstcens.js} +1 -1
  232. package/dist/chunks/{project-8d4mrw56.js → aisdk-native-tn8q2sfe.js} +26 -26
  233. package/dist/chunks/{project-pavs221x.js → aisdk-native-tsjgvs76.js} +4 -4
  234. package/dist/chunks/{project-a0yh64rb.js → aisdk-native-tsvc8229.js} +11 -11
  235. package/dist/chunks/{project-tvtrv512.js → aisdk-native-tvtrv512.js} +1 -1
  236. package/dist/chunks/{project-gs3s1a1g.js → aisdk-native-tx9w5tca.js} +8 -8
  237. package/dist/chunks/{project-5r1a4zz1.js → aisdk-native-tysp02jm.js} +7 -7
  238. package/dist/chunks/{project-xrf7y2d9.js → aisdk-native-v04kpx20.js} +12 -12
  239. package/dist/chunks/{project-ndp4vv3f.js → aisdk-native-v1vpjg76.js} +17 -17
  240. package/dist/chunks/{project-y4wxjvpb.js → aisdk-native-v3x1ng9w.js} +11 -11
  241. package/dist/chunks/{project-r2147qr5.js → aisdk-native-v728edwg.js} +13 -13
  242. package/dist/chunks/{project-25sb2q89.js → aisdk-native-v942wyt1.js} +5 -5
  243. package/dist/chunks/{project-veqvce7d.js → aisdk-native-veqvce7d.js} +1 -1
  244. package/dist/chunks/{project-vsyfpyr9.js → aisdk-native-vfbypwep.js} +22 -22
  245. package/dist/chunks/{project-2chytzzm.js → aisdk-native-vm665873.js} +38 -38
  246. package/dist/chunks/{project-1gd24jtv.js → aisdk-native-vnbkqqmb.js} +11 -11
  247. package/dist/chunks/{project-0p4jx4fd.js → aisdk-native-vp8a70zw.js} +11 -11
  248. package/dist/chunks/{project-vzcthcp8.js → aisdk-native-vzcthcp8.js} +1 -1
  249. package/dist/chunks/{project-w3wsvvr9.js → aisdk-native-w3wsvvr9.js} +1 -1
  250. package/dist/chunks/{project-wd87259q.js → aisdk-native-wd87259q.js} +1 -1
  251. package/dist/chunks/{project-3rsgnsmd.js → aisdk-native-wf2ekdz7.js} +17 -17
  252. package/dist/chunks/{project-8tbgdqxq.js → aisdk-native-wsbbwh4z.js} +4 -4
  253. package/dist/chunks/{project-cj6z7q4m.js → aisdk-native-x175k34s.js} +15 -15
  254. package/dist/chunks/{project-x1ezjp6w.js → aisdk-native-x1ezjp6w.js} +1 -1
  255. package/dist/chunks/{project-c0xp0z8j.js → aisdk-native-x4a5r99k.js} +12 -12
  256. package/dist/chunks/{project-jf6e2x3g.js → aisdk-native-xd9v3gx7.js} +8 -8
  257. package/dist/chunks/{project-p53c638z.js → aisdk-native-xethfdgt.js} +12 -12
  258. package/dist/chunks/{project-drwq78ky.js → aisdk-native-xfkkasph.js} +4 -4
  259. package/dist/chunks/{project-2czxbyyd.js → aisdk-native-xjxbvrd9.js} +2 -2
  260. package/dist/chunks/{project-15tf48hp.js → aisdk-native-xmvv9p3a.js} +25 -25
  261. package/dist/chunks/{project-tkrzs310.js → aisdk-native-xt1f49xr.js} +6 -6
  262. package/dist/chunks/{project-p9mnwjh7.js → aisdk-native-xxj553jx.js} +11 -11
  263. package/dist/chunks/{project-y1fvbwt7.js → aisdk-native-y1fvbwt7.js} +1 -1
  264. package/dist/chunks/{project-y71avatq.js → aisdk-native-y71avatq.js} +1 -1
  265. package/dist/chunks/{project-tzsjrs71.js → aisdk-native-y71mf8s4.js} +17 -17
  266. package/dist/chunks/{project-f4m13756.js → aisdk-native-y8pez1p3.js} +18 -18
  267. package/dist/chunks/{project-af7bxwvw.js → aisdk-native-yb221033.js} +5 -5
  268. package/dist/chunks/{project-q0bq2k1c.js → aisdk-native-yjeg4353.js} +13 -13
  269. package/dist/chunks/{project-66qpnbfn.js → aisdk-native-ym857jpg.js} +29 -29
  270. package/dist/chunks/{project-yrhqyw5v.js → aisdk-native-yrhqyw5v.js} +1 -1
  271. package/dist/chunks/{project-yrznvahk.js → aisdk-native-yrznvahk.js} +2 -2
  272. package/dist/chunks/{project-yee4g248.js → aisdk-native-yxggehce.js} +5 -5
  273. package/dist/chunks/{project-d4mvnt5t.js → aisdk-native-yzft7j2c.js} +11 -11
  274. package/dist/chunks/{project-z0bkrqjs.js → aisdk-native-z0bkrqjs.js} +1 -1
  275. package/dist/chunks/{project-99mdmb67.js → aisdk-native-z0y20y7t.js} +29 -29
  276. package/dist/chunks/{project-jmxz90ff.js → aisdk-native-z4aee1bt.js} +16 -16
  277. package/dist/chunks/{project-z63w68vq.js → aisdk-native-z63w68vq.js} +2 -2
  278. package/dist/chunks/{project-2x7jzfgr.js → aisdk-native-za3w5by2.js} +3 -3
  279. package/dist/chunks/{project-ddt2bs9e.js → aisdk-native-zcrspsvn.js} +4 -4
  280. package/dist/chunks/{project-zeh9ct20.js → aisdk-native-zeh9ct20.js} +2 -2
  281. package/dist/chunks/{project-fa2frvsq.js → aisdk-native-zj472pr5.js} +16 -16
  282. package/dist/chunks/{project-ecbtfsmk.js → aisdk-native-zkng1bg4.js} +43 -43
  283. package/dist/chunks/{project-csmvz898.js → aisdk-native-zn5v3n4q.js} +9 -9
  284. package/dist/chunks/{project-vm3z8dtg.js → aisdk-native-zpamw6z7.js} +5 -5
  285. package/dist/chunks/{project-zr2ceqn5.js → aisdk-native-zr2ceqn5.js} +1 -1
  286. package/dist/chunks/{project-8mdcper2.js → aisdk-native-zv219dfq.js} +5 -5
  287. package/dist/chunks/{project-k7vzf8ty.js → aisdk-native-zw43zwfb.js} +6 -6
  288. package/dist/chunks/{project-zxq2ej10.js → aisdk-native-zxq2ej10.js} +1 -1
  289. package/dist/chunks/{project-7a79fyt5.js → aisdk-native-zzxvyegm.js} +3 -3
  290. package/dist/codemode/catalog.js +1 -1
  291. package/dist/codemode/instructions.js +7 -7
  292. package/dist/codemode/tool.js +3 -3
  293. package/dist/codemode/web.js +1 -1
  294. package/dist/command.js +78 -78
  295. package/dist/config/discovery.js +83 -83
  296. package/dist/config/markdown.js +1 -1
  297. package/dist/config/normalize.js +105 -105
  298. package/dist/config/plugin/agent.js +122 -122
  299. package/dist/config/plugin/command.js +211 -211
  300. package/dist/config/plugin/compaction.js +159 -159
  301. package/dist/config/plugin/compatibility.js +140 -140
  302. package/dist/config/plugin/entry-observer.js +1 -1
  303. package/dist/config/plugin/formatter.js +123 -123
  304. package/dist/config/plugin/image.js +122 -122
  305. package/dist/config/plugin/instruction.js +89 -89
  306. package/dist/config/plugin/location-watcher.js +122 -122
  307. package/dist/config/plugin/mcp.js +129 -129
  308. package/dist/config/plugin/policy.js +123 -123
  309. package/dist/config/plugin/provider.js +122 -122
  310. package/dist/config/plugin/reference.js +124 -124
  311. package/dist/config/plugin/shell.js +124 -124
  312. package/dist/config/plugin/skill-file.js +101 -101
  313. package/dist/config/plugin/skill.js +143 -143
  314. package/dist/config/plugin/snapshot.js +122 -122
  315. package/dist/config/plugin/source.js +119 -119
  316. package/dist/config/plugin/tool-output.js +124 -124
  317. package/dist/config/plugin/websearch.js +123 -123
  318. package/dist/config/plugin/worktree.js +124 -124
  319. package/dist/config/variable.js +3 -3
  320. package/dist/config/watch.js +1 -1
  321. package/dist/config.js +127 -127
  322. package/dist/credential/sql.js +2 -2
  323. package/dist/credential.js +84 -84
  324. package/dist/database/database.js +65 -65
  325. package/dist/database/drizzle/effect-sqlite/driver.js +12 -12
  326. package/dist/database/drizzle/effect-sqlite/index.js +12 -12
  327. package/dist/database/drizzle/effect-sqlite/session.js +11 -11
  328. package/dist/database/drizzle/index.js +13 -13
  329. package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
  330. package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
  331. package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
  332. package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
  333. package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
  334. package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
  335. package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
  336. package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
  337. package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
  338. package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
  339. package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
  340. package/dist/database/drizzle.js +14 -14
  341. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
  342. package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
  343. package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
  344. package/dist/database/migration/20260225215848_workspace.js +1 -1
  345. package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
  346. package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
  347. package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
  348. package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
  349. package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
  350. package/dist/database/migration/20260323234822_events.js +1 -1
  351. package/dist/database/migration/20260410174513_workspace-name.js +1 -1
  352. package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
  353. package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
  354. package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
  355. package/dist/database/migration/20260428004200_add_session_path.js +1 -1
  356. package/dist/database/migration/20260501142318_next_venus.js +1 -1
  357. package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
  358. package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
  359. package/dist/database/migration/20260510033149_session_usage.js +1 -1
  360. package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
  361. package/dist/database/migration/20260511173437_session-metadata.js +1 -1
  362. package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
  363. package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
  364. package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
  365. package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
  366. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
  367. package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
  368. package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
  369. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
  370. package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
  371. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
  372. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
  373. package/dist/database/migration/20260611035744_credential.js +1 -1
  374. package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
  375. package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
  376. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
  377. package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
  378. package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
  379. package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
  380. package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
  381. package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
  382. package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
  383. package/dist/database/migration/20260812181746_session_inbox.js +1 -1
  384. package/dist/database/migration/20260812213948_worktree.js +1 -1
  385. package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
  386. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
  387. package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
  388. package/dist/database/migration.gen.js +48 -48
  389. package/dist/database/migration.js +50 -50
  390. package/dist/database/path.js +2 -2
  391. package/dist/database/schema.gen.js +1 -1
  392. package/dist/database/schema.sql.js +1 -1
  393. package/dist/database/sqlite.bun.js +1 -1
  394. package/dist/database/sqlite.js +1 -1
  395. package/dist/database/sqlite.node.js +1 -1
  396. package/dist/database/sqlite.workerd.js +1 -1
  397. package/dist/database/v1-migration.bun.js +75 -75
  398. package/dist/database/v1-migration.js +1 -1
  399. package/dist/effect/app-node-builder.js +369 -369
  400. package/dist/effect/app-node-platform.js +2 -2
  401. package/dist/effect/keyed-mutex.js +1 -1
  402. package/dist/effect/websocket-constructor.js +1 -1
  403. package/dist/environment/driver.js +1 -1
  404. package/dist/environment/environment.js +92 -92
  405. package/dist/environment/exec-defaults.js +2 -2
  406. package/dist/environment/files.js +1 -1
  407. package/dist/environment/index.js +94 -94
  408. package/dist/environment/local.js +2 -2
  409. package/dist/environment/memory.js +2 -2
  410. package/dist/environment/unavailable.js +1 -1
  411. package/dist/event/sql.js +1 -1
  412. package/dist/event-logger.js +69 -69
  413. package/dist/file-access.js +103 -103
  414. package/dist/file-mutation.js +93 -93
  415. package/dist/file-retention.js +1 -1
  416. package/dist/file.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/ignore.js +1 -1
  422. package/dist/filesystem/location-watcher-policy.js +6 -6
  423. package/dist/filesystem/location-watcher.js +224 -224
  424. package/dist/filesystem/protected.js +3 -3
  425. package/dist/filesystem/search.js +102 -102
  426. package/dist/filesystem/watcher-binding.js +1 -1
  427. package/dist/filesystem/watcher.js +15 -15
  428. package/dist/filesystem.js +107 -107
  429. package/dist/form.js +83 -83
  430. package/dist/formatter/builtins.js +4 -4
  431. package/dist/formatter.js +86 -86
  432. package/dist/generate.js +104 -104
  433. package/dist/git.js +6 -6
  434. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +1 -1
  435. package/dist/github-copilot/chat/get-response-metadata.js +1 -1
  436. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +1 -1
  437. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +7 -7
  438. package/dist/github-copilot/chat/openai-compatible-chat-options.js +1 -1
  439. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +1 -1
  440. package/dist/github-copilot/copilot-provider.js +17 -17
  441. package/dist/github-copilot/models.js +90 -90
  442. package/dist/github-copilot/openai-compatible-error.js +1 -1
  443. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +1 -1
  444. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +1 -1
  445. package/dist/github-copilot/responses/openai-error.js +1 -1
  446. package/dist/github-copilot/responses/openai-responses-language-model.js +10 -10
  447. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +6 -6
  448. package/dist/github-copilot/responses/tool/code-interpreter.js +1 -1
  449. package/dist/github-copilot/responses/tool/file-search.js +1 -1
  450. package/dist/github-copilot/responses/tool/image-generation.js +1 -1
  451. package/dist/github-copilot/responses/tool/web-search-preview.js +1 -1
  452. package/dist/github-copilot/responses/tool/web-search.js +1 -1
  453. package/dist/id/id.js +1 -1
  454. package/dist/image/photon.js +2 -2
  455. package/dist/image.js +6 -6
  456. package/dist/instance/service.js +5 -5
  457. package/dist/instance.js +360 -360
  458. package/dist/instruction-discovery.js +84 -84
  459. package/dist/instructions/builtins.js +86 -86
  460. package/dist/instructions/index.js +5 -5
  461. package/dist/integration/connection.js +3 -3
  462. package/dist/integration.js +85 -85
  463. package/dist/job.js +78 -78
  464. package/dist/kv/sql.js +2 -2
  465. package/dist/kv.js +72 -72
  466. package/dist/location-activity.js +131 -131
  467. package/dist/location-lifecycle.js +105 -105
  468. package/dist/location-mutation.js +103 -103
  469. package/dist/location-service-map.js +85 -85
  470. package/dist/location-services.js +357 -357
  471. package/dist/location.js +80 -80
  472. package/dist/managed-policy.js +5 -5
  473. package/dist/mcp/client.js +90 -90
  474. package/dist/mcp/index.js +107 -107
  475. package/dist/mcp/instructions.js +127 -127
  476. package/dist/mcp/oauth.js +77 -77
  477. package/dist/mcp/stdio.js +89 -89
  478. package/dist/mime.js +1 -1
  479. package/dist/modal/models.js +90 -90
  480. package/dist/model-resolver.js +97 -97
  481. package/dist/model.js +99 -99
  482. package/dist/models-dev.js +106 -106
  483. package/dist/oauth/page.js +1 -1
  484. package/dist/permission/saved.js +81 -81
  485. package/dist/permission/sql.js +5 -5
  486. package/dist/permission.js +112 -112
  487. package/dist/persistent-pty/binary.bun.js +1 -1
  488. package/dist/persistent-pty/daemon.js +1 -1
  489. package/dist/persistent-pty/index.js +87 -87
  490. package/dist/persistent-pty/pty-binding.js +1 -1
  491. package/dist/persistent-pty.js +74 -74
  492. package/dist/plugin/agent.js +101 -101
  493. package/dist/plugin/command.js +96 -96
  494. package/dist/plugin/compaction.js +128 -128
  495. package/dist/plugin/hooks.js +5 -5
  496. package/dist/plugin/host.js +217 -217
  497. package/dist/plugin/identity.js +3 -3
  498. package/dist/plugin/instance.js +5 -5
  499. package/dist/plugin/internal.js +331 -331
  500. package/dist/plugin/mcp-codemode-exclusion.js +3 -3
  501. package/dist/plugin/models-dev.js +95 -95
  502. package/dist/plugin/module.js +7 -7
  503. package/dist/plugin/optimize.js +4 -4
  504. package/dist/plugin/plan.js +101 -101
  505. package/dist/plugin/promise.js +1 -1
  506. package/dist/plugin/provider/amazon-bedrock.js +89 -89
  507. package/dist/plugin/provider/azure.js +121 -121
  508. package/dist/plugin/provider/cerebras.js +1 -1
  509. package/dist/plugin/provider/cloudflare-ai-gateway.js +120 -120
  510. package/dist/plugin/provider/cloudflare-workers-ai.js +120 -120
  511. package/dist/plugin/provider/cohere.js +2 -2
  512. package/dist/plugin/provider/configured.js +118 -118
  513. package/dist/plugin/provider/digitalocean.js +92 -92
  514. package/dist/plugin/provider/dynamic.js +2 -2
  515. package/dist/plugin/provider/factory.js +1 -1
  516. package/dist/plugin/provider/gateway.js +2 -2
  517. package/dist/plugin/provider/github-copilot.js +92 -92
  518. package/dist/plugin/provider/gitlab.js +90 -90
  519. package/dist/plugin/provider/google-vertex.js +89 -89
  520. package/dist/plugin/provider/kilo.js +1 -1
  521. package/dist/plugin/provider/llmgateway.js +76 -76
  522. package/dist/plugin/provider/lmstudio.js +121 -121
  523. package/dist/plugin/provider/modal.js +91 -91
  524. package/dist/plugin/provider/nvidia.js +1 -1
  525. package/dist/plugin/provider/ollama.js +121 -121
  526. package/dist/plugin/provider/openai.js +93 -93
  527. package/dist/plugin/provider/opencode.js +93 -93
  528. package/dist/plugin/provider/openrouter.js +90 -90
  529. package/dist/plugin/provider/perplexity.js +2 -2
  530. package/dist/plugin/provider/poe.js +77 -77
  531. package/dist/plugin/provider/prompt-cache-key.js +89 -89
  532. package/dist/plugin/provider/sap-ai-core.js +90 -90
  533. package/dist/plugin/provider/sdk-factory.js +1 -1
  534. package/dist/plugin/provider/snowflake-cortex.js +121 -121
  535. package/dist/plugin/provider/venice.js +2 -2
  536. package/dist/plugin/provider/vercel.js +89 -89
  537. package/dist/plugin/provider/vllm.js +121 -121
  538. package/dist/plugin/provider/xai.js +90 -90
  539. package/dist/plugin/provider/zenmux.js +1 -1
  540. package/dist/plugin/provider.js +159 -159
  541. package/dist/plugin/sdk.js +75 -75
  542. package/dist/plugin/service.js +3 -3
  543. package/dist/plugin/skill.js +138 -138
  544. package/dist/plugin/source-directory.js +1 -1
  545. package/dist/plugin/supervisor.js +346 -346
  546. package/dist/plugin/tool-input-repair.js +4 -4
  547. package/dist/plugin/update.js +6 -6
  548. package/dist/plugin/vcs/git.js +85 -85
  549. package/dist/plugin/vcs/hg.js +85 -85
  550. package/dist/plugin/warming.js +120 -120
  551. package/dist/plugin/websearch/exa.js +7 -7
  552. package/dist/plugin/websearch/firecrawl.js +8 -8
  553. package/dist/plugin/websearch/index.js +9 -9
  554. package/dist/plugin/websearch/mcp.js +2 -2
  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 +224 -224
  559. package/dist/project/schema.js +2 -2
  560. package/dist/project/sql.js +4 -4
  561. package/dist/project.js +79 -79
  562. package/dist/provider.js +100 -100
  563. package/dist/pty/protocol.js +1 -1
  564. package/dist/pty/schema.js +1 -1
  565. package/dist/pty/ticket.js +1 -1
  566. package/dist/pty.js +89 -89
  567. package/dist/reference/instructions.js +88 -88
  568. package/dist/reference.js +90 -90
  569. package/dist/repository-cache.js +80 -80
  570. package/dist/repository.js +1 -1
  571. package/dist/ripgrep/binary.js +2 -2
  572. package/dist/ripgrep.js +96 -96
  573. package/dist/rpc.js +85 -85
  574. package/dist/schema.js +1 -1
  575. package/dist/session/command.js +73 -73
  576. package/dist/session/compaction.js +133 -133
  577. package/dist/session/context.js +151 -151
  578. package/dist/session/diff.js +87 -87
  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 +220 -220
  583. package/dist/session/execution.js +127 -127
  584. package/dist/session/generate.js +152 -152
  585. package/dist/session/history.js +13 -13
  586. package/dist/session/inbox.js +85 -85
  587. package/dist/session/info.js +3 -3
  588. package/dist/session/instruction-entry.js +78 -78
  589. package/dist/session/instruction-state.js +8 -8
  590. package/dist/session/instructions.js +96 -96
  591. package/dist/session/message-updater.js +2 -2
  592. package/dist/session/message.js +1 -1
  593. package/dist/session/model-request.js +118 -118
  594. package/dist/session/model-transport.js +9 -9
  595. package/dist/session/move.js +129 -129
  596. package/dist/session/projector.js +85 -85
  597. package/dist/session/prompt.js +104 -104
  598. package/dist/session/provider-context.js +3 -3
  599. package/dist/session/revert.js +89 -89
  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 +230 -230
  603. package/dist/session/runner/max-steps.js +1 -1
  604. package/dist/session/runner/model.js +97 -97
  605. package/dist/session/runner/publish-llm-event.js +3 -3
  606. package/dist/session/runner/retry.js +113 -113
  607. package/dist/session/runner/step.js +123 -123
  608. package/dist/session/runner/to-llm-message.js +2 -2
  609. package/dist/session/schema.js +5 -5
  610. package/dist/session/session.js +171 -171
  611. package/dist/session/shell.js +137 -137
  612. package/dist/session/skill.js +102 -102
  613. package/dist/session/sql.js +5 -5
  614. package/dist/session/stats.js +72 -72
  615. package/dist/session/store.js +86 -86
  616. package/dist/session/subagent-completion.js +1 -1
  617. package/dist/session/subagent-job.js +209 -209
  618. package/dist/session/system-prompt.js +3 -3
  619. package/dist/session/title.js +153 -153
  620. package/dist/session/to-session-error.js +110 -110
  621. package/dist/session/transfer.js +213 -213
  622. package/dist/session/usage.js +1 -1
  623. package/dist/session.js +219 -219
  624. package/dist/shell/parse.js +6 -6
  625. package/dist/shell/result.js +1 -1
  626. package/dist/shell/scan.js +1 -1
  627. package/dist/shell/select.js +13 -13
  628. package/dist/shell.js +139 -139
  629. package/dist/skill/discovery.js +6 -6
  630. package/dist/skill/instructions.js +106 -106
  631. package/dist/skill.js +111 -111
  632. package/dist/snapshot.js +92 -92
  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 +126 -126
  637. package/dist/tool/plugin/edit.js +113 -113
  638. package/dist/tool/plugin/file-diff.js +1 -1
  639. package/dist/tool/plugin/glob.js +123 -123
  640. package/dist/tool/plugin/grep.js +123 -123
  641. package/dist/tool/plugin/opencode.js +3 -3
  642. package/dist/tool/plugin/patch.js +119 -119
  643. package/dist/tool/plugin/question.js +104 -104
  644. package/dist/tool/plugin/read.js +124 -124
  645. package/dist/tool/plugin/shell.js +216 -216
  646. package/dist/tool/plugin/skill.js +104 -104
  647. package/dist/tool/plugin/subagent.js +218 -218
  648. package/dist/tool/plugin/webfetch.js +109 -109
  649. package/dist/tool/plugin/websearch.js +113 -113
  650. package/dist/tool/plugin/write.js +121 -121
  651. package/dist/tool/read-filesystem.js +99 -99
  652. package/dist/tool/runtime.js +1 -1
  653. package/dist/tool-output.js +8 -8
  654. package/dist/tool.js +16 -16
  655. package/dist/util/error-summary.js +1 -1
  656. package/dist/util/error.js +1 -1
  657. package/dist/util/git-executable.js +2 -2
  658. package/dist/util/iife.js +1 -1
  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/attachment.js +4 -4
  666. package/dist/v1/config/command.js +1 -1
  667. package/dist/v1/config/config.js +16 -16
  668. package/dist/v1/config/error.js +2 -2
  669. package/dist/v1/config/formatter.js +5 -5
  670. package/dist/v1/config/layout.js +1 -1
  671. package/dist/v1/config/lsp.js +5 -5
  672. package/dist/v1/config/mcp.js +4 -4
  673. package/dist/v1/config/migrate.js +91 -91
  674. package/dist/v1/config/permission.js +3 -3
  675. package/dist/v1/config/plugin.js +3 -3
  676. package/dist/v1/config/provider-options.js +1 -1
  677. package/dist/v1/config/provider.js +4 -4
  678. package/dist/v1/config/server.js +2 -2
  679. package/dist/v1/config/skills.js +3 -3
  680. package/dist/v1/permission.js +1 -1
  681. package/dist/variant.js +92 -92
  682. package/dist/vcs/patch.js +1 -1
  683. package/dist/vcs.js +88 -88
  684. package/dist/websearch.js +83 -83
  685. package/dist/wellknown/plugin.js +75 -75
  686. package/dist/wellknown.js +80 -80
  687. package/dist/workspace/driver.js +3 -3
  688. package/dist/workspace/sql.js +1 -1
  689. package/dist/workspace.js +79 -79
  690. package/dist/worktree/directory.js +2 -2
  691. package/dist/worktree/git.js +10 -10
  692. package/dist/worktree/sql.js +5 -5
  693. package/dist/worktree/strategies.js +88 -88
  694. package/dist/worktree.js +95 -95
  695. package/package.json +8 -8
  696. package/dist/chunks/project-3yh9ny3q.js +0 -503
  697. package/dist/chunks/project-9zdhvgqs.js +0 -18
  698. package/dist/chunks/project-m2fv4tsm.js +0 -26
  699. package/dist/chunks/project-mk5nqtvt.js +0 -252
  700. /package/dist/chunks/{project-0mesazry.js → aisdk-native-0mesazry.js} +0 -0
  701. /package/dist/chunks/{project-0qkdqm5v.js → aisdk-native-0qkdqm5v.js} +0 -0
  702. /package/dist/chunks/{project-0zkw76rk.js → aisdk-native-0zkw76rk.js} +0 -0
  703. /package/dist/chunks/{project-17cy0kzp.js → aisdk-native-17cy0kzp.js} +0 -0
  704. /package/dist/chunks/{project-1cnp2v09.js → aisdk-native-1cnp2v09.js} +0 -0
  705. /package/dist/chunks/{project-1kg9ymc8.js → aisdk-native-1kg9ymc8.js} +0 -0
  706. /package/dist/chunks/{project-24dcb14g.js → aisdk-native-24dcb14g.js} +0 -0
  707. /package/dist/chunks/{project-2710q6r3.js → aisdk-native-2710q6r3.js} +0 -0
  708. /package/dist/chunks/{project-2axfhc9x.js → aisdk-native-2axfhc9x.js} +0 -0
  709. /package/dist/chunks/{project-2c3vjs8z.js → aisdk-native-2c3vjs8z.js} +0 -0
  710. /package/dist/chunks/{project-359p4xyc.js → aisdk-native-359p4xyc.js} +0 -0
  711. /package/dist/chunks/{project-3asan66x.js → aisdk-native-3asan66x.js} +0 -0
  712. /package/dist/chunks/{project-3v8g72cx.js → aisdk-native-3v8g72cx.js} +0 -0
  713. /package/dist/chunks/{project-3w5fmr99.js → aisdk-native-3w5fmr99.js} +0 -0
  714. /package/dist/chunks/{project-3wcehsnq.js → aisdk-native-3wcehsnq.js} +0 -0
  715. /package/dist/chunks/{project-43n2bw4t.js → aisdk-native-43n2bw4t.js} +0 -0
  716. /package/dist/chunks/{project-4knz6hnm.js → aisdk-native-4knz6hnm.js} +0 -0
  717. /package/dist/chunks/{project-4vcrnpx2.js → aisdk-native-4vcrnpx2.js} +0 -0
  718. /package/dist/chunks/{project-4y7fprxs.js → aisdk-native-4y7fprxs.js} +0 -0
  719. /package/dist/chunks/{project-53557ph1.js → aisdk-native-53557ph1.js} +0 -0
  720. /package/dist/chunks/{project-550bvhaj.js → aisdk-native-550bvhaj.js} +0 -0
  721. /package/dist/chunks/{project-5qd3pb7m.js → aisdk-native-5qd3pb7m.js} +0 -0
  722. /package/dist/chunks/{project-6prwharc.js → aisdk-native-6prwharc.js} +0 -0
  723. /package/dist/chunks/{project-7akdwqpd.js → aisdk-native-7akdwqpd.js} +0 -0
  724. /package/dist/chunks/{project-7m9af43g.js → aisdk-native-7m9af43g.js} +0 -0
  725. /package/dist/chunks/{project-822emrt2.js → aisdk-native-822emrt2.js} +0 -0
  726. /package/dist/chunks/{project-88xbtdfr.js → aisdk-native-88xbtdfr.js} +0 -0
  727. /package/dist/chunks/{project-8n3pysct.js → aisdk-native-8n3pysct.js} +0 -0
  728. /package/dist/chunks/{project-922hggd3.js → aisdk-native-922hggd3.js} +0 -0
  729. /package/dist/chunks/{project-9a4afbnw.js → aisdk-native-9a4afbnw.js} +0 -0
  730. /package/dist/chunks/{project-9rqn6x4v.js → aisdk-native-9rqn6x4v.js} +0 -0
  731. /package/dist/chunks/{project-a6k6eb26.js → aisdk-native-a6k6eb26.js} +0 -0
  732. /package/dist/chunks/{project-af5trqkr.js → aisdk-native-af5trqkr.js} +0 -0
  733. /package/dist/chunks/{project-afrmfg78.js → aisdk-native-afrmfg78.js} +0 -0
  734. /package/dist/chunks/{project-aqzs7mqg.js → aisdk-native-aqzs7mqg.js} +0 -0
  735. /package/dist/chunks/{project-atq7p7m5.js → aisdk-native-atq7p7m5.js} +0 -0
  736. /package/dist/chunks/{project-bkyjaxrp.js → aisdk-native-bkyjaxrp.js} +0 -0
  737. /package/dist/chunks/{project-bmr6ed5q.js → aisdk-native-bmr6ed5q.js} +0 -0
  738. /package/dist/chunks/{project-cf4snx6d.js → aisdk-native-cf4snx6d.js} +0 -0
  739. /package/dist/chunks/{project-cvy3z8tj.js → aisdk-native-cvy3z8tj.js} +0 -0
  740. /package/dist/chunks/{project-d9fn303g.js → aisdk-native-d9fn303g.js} +0 -0
  741. /package/dist/chunks/{project-d9jj8t3e.js → aisdk-native-d9jj8t3e.js} +0 -0
  742. /package/dist/chunks/{project-dajrwvna.js → aisdk-native-dajrwvna.js} +0 -0
  743. /package/dist/chunks/{project-dap0rakb.js → aisdk-native-dap0rakb.js} +0 -0
  744. /package/dist/chunks/{project-df08tz66.js → aisdk-native-df08tz66.js} +0 -0
  745. /package/dist/chunks/{project-dy18nga0.js → aisdk-native-dy18nga0.js} +0 -0
  746. /package/dist/chunks/{project-e5kj55wp.js → aisdk-native-e5kj55wp.js} +0 -0
  747. /package/dist/chunks/{project-e73j6tqm.js → aisdk-native-e73j6tqm.js} +0 -0
  748. /package/dist/chunks/{project-ec1grn59.js → aisdk-native-ec1grn59.js} +0 -0
  749. /package/dist/chunks/{project-eh3zwz77.js → aisdk-native-eh3zwz77.js} +0 -0
  750. /package/dist/chunks/{project-emrn6kk6.js → aisdk-native-emrn6kk6.js} +0 -0
  751. /package/dist/chunks/{project-f0mxakyp.js → aisdk-native-f0mxakyp.js} +0 -0
  752. /package/dist/chunks/{project-f6n9ztr4.js → aisdk-native-f6n9ztr4.js} +0 -0
  753. /package/dist/chunks/{project-faypxj3z.js → aisdk-native-faypxj3z.js} +0 -0
  754. /package/dist/chunks/{project-fd410y7t.js → aisdk-native-fd410y7t.js} +0 -0
  755. /package/dist/chunks/{project-fxgpk5d8.js → aisdk-native-fxgpk5d8.js} +0 -0
  756. /package/dist/chunks/{project-g4wezp1m.js → aisdk-native-g4wezp1m.js} +0 -0
  757. /package/dist/chunks/{project-g86h250q.js → aisdk-native-g86h250q.js} +0 -0
  758. /package/dist/chunks/{project-gebd4c9n.js → aisdk-native-gebd4c9n.js} +0 -0
  759. /package/dist/chunks/{project-gftt206x.js → aisdk-native-gftt206x.js} +0 -0
  760. /package/dist/chunks/{project-hjbc5kem.js → aisdk-native-hjbc5kem.js} +0 -0
  761. /package/dist/chunks/{project-hk9envan.js → aisdk-native-hk9envan.js} +0 -0
  762. /package/dist/chunks/{project-j2ntwpah.js → aisdk-native-j2ntwpah.js} +0 -0
  763. /package/dist/chunks/{project-j5zkgpj8.js → aisdk-native-j5zkgpj8.js} +0 -0
  764. /package/dist/chunks/{project-jjkms2e6.js → aisdk-native-jjkms2e6.js} +0 -0
  765. /package/dist/chunks/{project-jr7sbwjy.js → aisdk-native-jr7sbwjy.js} +0 -0
  766. /package/dist/chunks/{project-jwfs4k6c.js → aisdk-native-jwfs4k6c.js} +0 -0
  767. /package/dist/chunks/{project-jzg6c2d5.js → aisdk-native-jzg6c2d5.js} +0 -0
  768. /package/dist/chunks/{project-mp448xyj.js → aisdk-native-mp448xyj.js} +0 -0
  769. /package/dist/chunks/{project-msx8hqn2.js → aisdk-native-msx8hqn2.js} +0 -0
  770. /package/dist/chunks/{project-n05xt0ee.js → aisdk-native-n05xt0ee.js} +0 -0
  771. /package/dist/chunks/{project-n3j8tn72.js → aisdk-native-n3j8tn72.js} +0 -0
  772. /package/dist/chunks/{project-njntx4h6.js → aisdk-native-njntx4h6.js} +0 -0
  773. /package/dist/chunks/{project-q3sfg36h.js → aisdk-native-q3sfg36h.js} +0 -0
  774. /package/dist/chunks/{project-q74kybfr.js → aisdk-native-q74kybfr.js} +0 -0
  775. /package/dist/chunks/{project-qaymkmh1.js → aisdk-native-qaymkmh1.js} +0 -0
  776. /package/dist/chunks/{project-qb87gjwd.js → aisdk-native-qb87gjwd.js} +0 -0
  777. /package/dist/chunks/{project-qfa1cgps.js → aisdk-native-qfa1cgps.js} +0 -0
  778. /package/dist/chunks/{project-qg3g05ea.js → aisdk-native-qg3g05ea.js} +0 -0
  779. /package/dist/chunks/{project-qrg20bc0.js → aisdk-native-qrg20bc0.js} +0 -0
  780. /package/dist/chunks/{project-rcb2kzg1.js → aisdk-native-rcb2kzg1.js} +0 -0
  781. /package/dist/chunks/{project-sdp7kfr6.js → aisdk-native-sdp7kfr6.js} +0 -0
  782. /package/dist/chunks/{project-sk3qaz4a.js → aisdk-native-sk3qaz4a.js} +0 -0
  783. /package/dist/chunks/{project-ssg3fenm.js → aisdk-native-ssg3fenm.js} +0 -0
  784. /package/dist/chunks/{project-twg0f83k.js → aisdk-native-twg0f83k.js} +0 -0
  785. /package/dist/chunks/{project-w803qqfp.js → aisdk-native-w803qqfp.js} +0 -0
  786. /package/dist/chunks/{project-wc3fc9cn.js → aisdk-native-wc3fc9cn.js} +0 -0
  787. /package/dist/chunks/{project-wer8tq1h.js → aisdk-native-wer8tq1h.js} +0 -0
  788. /package/dist/chunks/{project-wtztk69x.js → aisdk-native-wtztk69x.js} +0 -0
  789. /package/dist/chunks/{project-x0ckcb58.js → aisdk-native-x0ckcb58.js} +0 -0
  790. /package/dist/chunks/{project-x61499pn.js → aisdk-native-x61499pn.js} +0 -0
  791. /package/dist/chunks/{project-y44na4kk.js → aisdk-native-y44na4kk.js} +0 -0
  792. /package/dist/chunks/{project-y8cydn3q.js → aisdk-native-y8cydn3q.js} +0 -0
  793. /package/dist/chunks/{project-y8f7s663.js → aisdk-native-y8f7s663.js} +0 -0
  794. /package/dist/chunks/{project-ygaqb7jw.js → aisdk-native-ygaqb7jw.js} +0 -0
  795. /package/dist/chunks/{project-ym463w8f.js → aisdk-native-ym463w8f.js} +0 -0
  796. /package/dist/chunks/{project-z9919s4g.js → aisdk-native-z9919s4g.js} +0 -0
@@ -1,49 +1,40 @@
1
1
  import {
2
2
  Service83,
3
3
  node87
4
- } from "./project-40xgcexb.js";
4
+ } from "./aisdk-native-dksrmg0f.js";
5
5
  import {
6
6
  shutdown2,
7
7
  create3
8
- } from "./project-rdw6cm16.js";
8
+ } from "./aisdk-native-rdw6cm16.js";
9
9
  import {
10
- ID12,
11
- Service63,
12
- node66,
13
- Event14
14
- } from "./project-66qpnbfn.js";
10
+ ID9,
11
+ Service65,
12
+ node68,
13
+ Event15
14
+ } from "./aisdk-native-ym857jpg.js";
15
15
  import {
16
16
  key2
17
- } from "./project-44h5tttr.js";
17
+ } from "./aisdk-native-cpj0znwe.js";
18
18
  import {
19
19
  Service80,
20
20
  node84
21
- } from "./project-2czxbyyd.js";
21
+ } from "./aisdk-native-xjxbvrd9.js";
22
22
  import {
23
23
  __export
24
- } from "./project-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, Schema as Schema2, Struct as Struct2 } from "effect";
24
+ } from "./aisdk-native-9rqn6x4v.js";
34
25
 
35
26
  // src/provider.ts
36
27
  var exports_provider3 = {};
37
28
  __export(exports_provider3, {
38
29
  AISDK_PREFIX: () => AISDK_PREFIX2,
39
30
  Compaction: () => Compaction3,
40
- Event: () => Event13,
41
- ID: () => ID11,
42
- Info: () => Info23,
31
+ Event: () => Event14,
32
+ ID: () => ID8,
33
+ Info: () => Info21,
43
34
  LoadError: () => LoadError3,
44
35
  Provider: () => exports_provider3,
45
- Request: () => Request3,
46
- Service: () => Service62,
36
+ Request: () => Request2,
37
+ Service: () => Service64,
47
38
  Settings: () => Settings2,
48
39
  Transport: () => Transport2,
49
40
  aisdk: () => aisdk2,
@@ -53,10 +44,10 @@ __export(exports_provider3, {
53
44
  mergeOverlay: () => mergeOverlay2,
54
45
  modelSettings: () => modelSettings2,
55
46
  nativeSettings: () => nativeSettings2,
56
- node: () => node65,
47
+ node: () => node67,
57
48
  packageName: () => packageName2
58
49
  });
59
- import { Context, Effect, Layer, Schema, Stream, Struct } from "effect";
50
+ import { Context, Effect as Effect2, Layer, Schema as Schema2, Stream, Struct as Struct2 } from "effect";
60
51
  import { Provider } from "@opencode/schema/provider";
61
52
  import { Model } from "@opencode/schema/model";
62
53
  import { makeLocationNode } from "@opencode/util/effect/app-node";
@@ -64,8 +55,255 @@ import { isRecord } from "@opencode/ai/utils/record";
64
55
  import { importModule, resolveModule } from "@opencode/util/runtime-import";
65
56
  import { Credential } from "@opencode/schema/credential";
66
57
  import { freeze } from "immer";
67
- import { Event as Event13 } from "@opencode/schema/provider";
68
- var ID11 = Provider.ID;
58
+
59
+ // src/aisdk-native.ts
60
+ var exports_aisdk_native = {};
61
+ __export(exports_aisdk_native, {
62
+ AISDKNative: () => exports_aisdk_native,
63
+ native: () => native2,
64
+ rewrite: () => rewrite2
65
+ });
66
+ import { Effect, Option, Schema, Struct } from "effect";
67
+ function rewrite2(target, input) {
68
+ if (input.specifier === undefined)
69
+ return;
70
+ const plain = resolve(input.specifier, input);
71
+ if (!plain)
72
+ return;
73
+ const settings = decode(target.settings ?? {});
74
+ const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
75
+ const translated = options(replacement, input.modelID, settings);
76
+ if (target.package !== undefined || replacement !== input.specifier)
77
+ target.package = replacement;
78
+ target.settings = target.settings === undefined ? undefined : {
79
+ ...translated.settings,
80
+ ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
81
+ };
82
+ target.headers = mergeHeaders2(translated.headers, target.headers);
83
+ target.body = mergeOverlay2(translated.body, target.body);
84
+ target.variants = target.variants?.map((variant) => {
85
+ const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
86
+ const headers = mergeHeaders2(overlay.headers, variant.headers);
87
+ const body = mergeOverlay2(overlay.body, variant.body);
88
+ return {
89
+ id: variant.id,
90
+ ...variant.settings === undefined ? {} : { settings: overlay.settings },
91
+ ...headers === undefined ? {} : { headers },
92
+ ...body === undefined ? {} : { body }
93
+ };
94
+ });
95
+ }
96
+ var PACKAGES = {
97
+ "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
98
+ "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
99
+ "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
100
+ "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
101
+ "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
102
+ "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
103
+ "@ai-sdk/google": "@opencode/ai/providers/google",
104
+ "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
105
+ "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
106
+ "@ai-sdk/groq": "@opencode/ai/providers/groq",
107
+ "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
108
+ "@ai-sdk/openai": "@opencode/ai/providers/openai",
109
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
110
+ "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
111
+ "@ai-sdk/xai": "@opencode/ai/providers/xai",
112
+ "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
113
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
114
+ };
115
+ var protocols = (name) => ({
116
+ "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
117
+ "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
118
+ "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
119
+ });
120
+ var HOSTS = {
121
+ alibaba: protocols("alibaba"),
122
+ "alibaba-cn": protocols("alibaba"),
123
+ "alibaba-coding-plan": protocols("alibaba"),
124
+ "alibaba-coding-plan-cn": protocols("alibaba"),
125
+ "alibaba-token-plan": protocols("alibaba"),
126
+ "alibaba-token-plan-cn": protocols("alibaba"),
127
+ baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
128
+ "cloudflare-ai-gateway": {
129
+ "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
130
+ "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
131
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
132
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
133
+ },
134
+ "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
135
+ deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
136
+ "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
137
+ "google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
138
+ "kimi-for-coding": protocols("moonshot"),
139
+ meta: protocols("meta"),
140
+ minimax: protocols("minimax"),
141
+ "minimax-cn": protocols("minimax"),
142
+ "minimax-coding-plan": protocols("minimax"),
143
+ "minimax-cn-coding-plan": protocols("minimax"),
144
+ moonshotai: protocols("moonshot"),
145
+ "moonshotai-cn": protocols("moonshot"),
146
+ zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
147
+ "zai-coding-plan": protocols("zai-coding-plan"),
148
+ zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
149
+ "zhipuai-coding-plan": protocols("zai-coding-plan")
150
+ };
151
+ var NATIVE = new Set([
152
+ ...Object.values(PACKAGES),
153
+ ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
154
+ "@opencode/ai/providers/azure/chat",
155
+ "@opencode/ai/providers/amazon-bedrock/mantle",
156
+ "@opencode/ai/providers/amazon-bedrock/mantle/chat",
157
+ "@opencode/ai/providers/amazon-bedrock/mantle/responses"
158
+ ]);
159
+ function native2(npm, context) {
160
+ const host = HOSTS[context.providerID]?.[npm];
161
+ if (host)
162
+ return host;
163
+ if (npm === "@ai-sdk/amazon-bedrock/mantle")
164
+ return mantle(context.modelID);
165
+ if (npm === "@ai-sdk/azure" && context.settings?.useCompletionUrls === true)
166
+ return "@opencode/ai/providers/azure/chat";
167
+ return PACKAGES[npm];
168
+ }
169
+ var mantle = (modelID) => {
170
+ if (modelID === undefined)
171
+ return "@opencode/ai/providers/amazon-bedrock/mantle";
172
+ return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
173
+ };
174
+ function resolve(specifier, context) {
175
+ const npm = packageName2(specifier);
176
+ if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
177
+ return native2(npm, context);
178
+ if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
179
+ return mantle(context.modelID);
180
+ if (npm === "@opencode/ai/providers/azure/responses" && context.settings?.useCompletionUrls === true)
181
+ return "@opencode/ai/providers/azure/chat";
182
+ return NATIVE.has(npm) ? npm : undefined;
183
+ }
184
+ function options(replacement, modelID, settings) {
185
+ const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
186
+ const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
187
+ return {
188
+ settings: replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
189
+ ...settings.headers === undefined ? {} : { headers: settings.headers },
190
+ ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
191
+ ...converse ? bedrockRequest(modelID, settings) : {},
192
+ ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
193
+ };
194
+ }
195
+ var BEDROCK_KEYS = [
196
+ "bearerToken",
197
+ "endpoint",
198
+ "credentials",
199
+ "credentialProvider",
200
+ "accessKeyId",
201
+ "secretAccessKey",
202
+ "sessionToken"
203
+ ];
204
+ var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
205
+ function bedrockSettings(settings, converse) {
206
+ const region = settings.region ?? settings.credentials?.region;
207
+ const credentials = settings.credentials ?? settings;
208
+ const baseURL = settings.baseURL ?? settings.endpoint;
209
+ return {
210
+ ...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
211
+ ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
212
+ ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
213
+ ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
214
+ credentials: {
215
+ ...region === undefined ? {} : { region },
216
+ accessKeyId: credentials.accessKeyId,
217
+ secretAccessKey: credentials.secretAccessKey,
218
+ ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
219
+ }
220
+ }
221
+ };
222
+ }
223
+ function bedrockRequest(modelID, settings) {
224
+ const additional = settings.additionalModelRequestFields ?? {};
225
+ const reasoning = settings.reasoningConfig;
226
+ const anthropic = modelID?.includes("anthropic") ?? false;
227
+ const openai = modelID?.includes("openai.") ?? false;
228
+ const harmony = modelID?.includes("openai.gpt-oss") ?? false;
229
+ const effort = reasoning?.maxReasoningEffort;
230
+ const type = reasoning?.type;
231
+ const budget = reasoning?.budgetTokens;
232
+ const display = reasoning?.display;
233
+ const betas = settings.anthropicBeta ?? [];
234
+ const fields = mergeOverlay2(additional, {
235
+ ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
236
+ ...anthropic && type === "enabled" && budget !== undefined ? { thinking: { type: "enabled", budget_tokens: budget } } : {},
237
+ ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
238
+ ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
239
+ ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
240
+ ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
241
+ ...!anthropic && !openai && effort !== undefined ? {
242
+ reasoningConfig: {
243
+ ...type === undefined || type === "adaptive" ? {} : { type },
244
+ ...budget === undefined ? {} : { budgetTokens: budget },
245
+ maxReasoningEffort: effort
246
+ }
247
+ } : {}
248
+ });
249
+ const body = {
250
+ ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
251
+ ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
252
+ };
253
+ return Object.keys(body).length === 0 ? {} : { body };
254
+ }
255
+ var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
256
+ function openRouterRequest(settings) {
257
+ const headers = mergeHeaders2({
258
+ ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
259
+ ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
260
+ ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
261
+ }, settings.headers) ?? {};
262
+ return Object.keys(headers).length === 0 ? {} : { headers };
263
+ }
264
+ var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
265
+ var Credentials = Schema.Struct({
266
+ accessKeyId: Schema.String,
267
+ secretAccessKey: Schema.String,
268
+ sessionToken: lenient(Schema.String),
269
+ region: lenient(Schema.String)
270
+ });
271
+ var Legacy = Schema.StructWithRest(Schema.Struct({
272
+ apiKey: lenient(Schema.String),
273
+ baseURL: lenient(Schema.String),
274
+ headers: lenient(Schema.Record(Schema.String, Schema.String)),
275
+ extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
276
+ useCompletionUrls: lenient(Schema.Boolean),
277
+ auth: lenient(Schema.Literals(["bearer", "sigv4"])),
278
+ bearerToken: lenient(Schema.String),
279
+ endpoint: lenient(Schema.String),
280
+ region: lenient(Schema.String),
281
+ credentials: lenient(Credentials),
282
+ accessKeyId: lenient(Schema.String),
283
+ secretAccessKey: lenient(Schema.String),
284
+ sessionToken: lenient(Schema.String),
285
+ anthropicBeta: lenient(Schema.Array(Schema.String)),
286
+ serviceTier: lenient(Schema.String),
287
+ reasoningConfig: lenient(Schema.Struct({
288
+ type: lenient(Schema.String),
289
+ display: lenient(Schema.String),
290
+ maxReasoningEffort: lenient(Schema.String),
291
+ budgetTokens: lenient(Schema.Number)
292
+ })),
293
+ additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
294
+ anthropic_beta: lenient(Schema.Array(Schema.String)),
295
+ output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
296
+ reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
297
+ }), [Schema.Record(Schema.String, Schema.Unknown)])),
298
+ appName: lenient(Schema.String),
299
+ appUrl: lenient(Schema.String),
300
+ api_keys: lenient(Schema.Record(Schema.String, Schema.String))
301
+ }), [Schema.Record(Schema.String, Schema.Unknown)]);
302
+ var decode = Schema.decodeUnknownSync(Legacy);
303
+
304
+ // src/provider.ts
305
+ import { Event as Event14 } from "@opencode/schema/provider";
306
+ var ID8 = Provider.ID;
69
307
  var AISDK_PREFIX2 = "aisdk:";
70
308
  var isAISDK2 = (value) => value?.startsWith(AISDK_PREFIX2) ?? false;
71
309
  var aisdk2 = (value) => isAISDK2(value) ? value : `${AISDK_PREFIX2}${value}`;
@@ -76,12 +314,12 @@ function packageName2(value) {
76
314
  return value;
77
315
  return value.slice(AISDK_PREFIX2.length);
78
316
  }
79
- var JsonRecord = Schema.Record(Schema.String, Schema.Json);
80
- var decodeJsonRecord = Schema.decodeUnknownSync(JsonRecord);
317
+ var JsonRecord = Schema2.Record(Schema2.String, Schema2.Json);
318
+ var decodeJsonRecord = Schema2.decodeUnknownSync(JsonRecord);
81
319
 
82
- class LoadError3 extends Schema.TaggedError()("Provider.LoadError", {
83
- package: Schema.String,
84
- cause: Schema.Defect()
320
+ class LoadError3 extends Schema2.TaggedError()("Provider.LoadError", {
321
+ package: Schema2.String,
322
+ cause: Schema2.Defect()
85
323
  }) {
86
324
  }
87
325
  var packages = new Map;
@@ -142,12 +380,12 @@ var builtins = new Map([
142
380
  () => import("@opencode/ai/providers/zai-coding-plan/responses")
143
381
  ]
144
382
  ]);
145
- var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
383
+ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
146
384
  const specifier = packageName2(input);
147
385
  const builtin = builtins.get(specifier);
148
386
  if (builtin)
149
387
  return yield* importPackage(specifier, specifier, builtin);
150
- const resolved = yield* Effect.sync(() => {
388
+ const resolved = yield* Effect2.sync(() => {
151
389
  if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
152
390
  return specifier;
153
391
  try {
@@ -166,8 +404,8 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
166
404
  }
167
405
  const parts = specifier.split("/");
168
406
  const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
169
- const installed = yield* npm.add(root).pipe(Effect.mapError((cause) => new LoadError3({ package: specifier, cause })));
170
- const entrypoint = yield* Effect.try({
407
+ const installed = yield* npm.add(root).pipe(Effect2.mapError((cause) => new LoadError3({ package: specifier, cause })));
408
+ const entrypoint = yield* Effect2.try({
171
409
  try: () => resolveModule(specifier, installed.directory),
172
410
  catch: (cause) => new LoadError3({ package: specifier, cause })
173
411
  });
@@ -176,10 +414,10 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
176
414
  var CORE_KEYS = ["chunkTimeout", "compaction", "fetch", "timeout", "transport"];
177
415
  var PROVIDER_ONLY_KEYS = ["chunkTimeout", "timeout", "transport"];
178
416
  function nativeSettings2(settings) {
179
- return Struct.omit(settings, CORE_KEYS);
417
+ return Struct2.omit(settings, CORE_KEYS);
180
418
  }
181
419
  function modelSettings2(settings) {
182
- return settings && Struct.omit(settings, PROVIDER_ONLY_KEYS);
420
+ return settings && Struct2.omit(settings, PROVIDER_ONLY_KEYS);
183
421
  }
184
422
  function mergeOverlay2(base, overlay) {
185
423
  if (base === undefined)
@@ -206,13 +444,13 @@ function mergeHeaders2(base, overlay) {
206
444
  return result;
207
445
  }, new Map).values());
208
446
  }
209
- var Request3 = Provider.Request;
447
+ var Request2 = Provider.Request;
210
448
  var Compaction3 = Provider.Compaction;
211
449
  var Transport2 = Provider.Transport;
212
450
  var Settings2 = Provider.Settings;
213
- var Info23 = Provider.Info;
451
+ var Info21 = Provider.Info;
214
452
 
215
- class Service62 extends Context.Service()("@opencode/Provider") {
453
+ class Service64 extends Context.Service()("@opencode/Provider") {
216
454
  }
217
455
  var definitions = new WeakMap;
218
456
  function index(providerID, models) {
@@ -225,9 +463,9 @@ function index(providerID, models) {
225
463
  definitions.set(models, indexes);
226
464
  return result;
227
465
  }
228
- var layer = Layer.effect(Service62, Effect.gen(function* () {
466
+ var layer = Layer.effect(Service64, Effect2.gen(function* () {
229
467
  const bus = yield* Service83;
230
- const integrations = yield* Service63;
468
+ const integrations = yield* Service65;
231
469
  const location = yield* Service80;
232
470
  const state = create3({
233
471
  name: "provider",
@@ -239,7 +477,7 @@ var layer = Layer.effect(Service62, Effect.gen(function* () {
239
477
  const current = records.get(id);
240
478
  if (current)
241
479
  return current;
242
- const added = { provider: Info23.empty(id), models: new Map };
480
+ const added = { provider: Info21.empty(id), models: new Map };
243
481
  records.set(id, added);
244
482
  maps.add(added.models);
245
483
  return added;
@@ -307,9 +545,9 @@ var layer = Layer.effect(Service62, Effect.gen(function* () {
307
545
  },
308
546
  notify: () => notify
309
547
  });
310
- yield* Effect.addFinalizer(() => shutdown2(state.reload()));
548
+ yield* Effect2.addFinalizer(() => shutdown2(state.reload()));
311
549
  let cached;
312
- const snapshot = Effect.fn("Provider.snapshot")(function* () {
550
+ const snapshot = Effect2.fn("Provider.snapshot")(function* () {
313
551
  while (true) {
314
552
  const revision = integrations.revision();
315
553
  const records = state.get();
@@ -320,7 +558,7 @@ var layer = Layer.effect(Service62, Effect.gen(function* () {
320
558
  const available = Array.from(records.values()).filter((record) => {
321
559
  if (record.provider.activation === "disabled")
322
560
  return false;
323
- const integration = byID.get(record.provider.integrationID ?? ID12.make(record.provider.id));
561
+ const integration = byID.get(record.provider.integrationID ?? ID9.make(record.provider.id));
324
562
  if (record.sourceConnection && key2(record.sourceConnection) !== key2(integration?.connections[0]))
325
563
  return false;
326
564
  if (record.provider.activation === "enabled")
@@ -337,7 +575,7 @@ var layer = Layer.effect(Service62, Effect.gen(function* () {
337
575
  }
338
576
  });
339
577
  let published;
340
- const notify = Effect.gen(function* () {
578
+ const notify = Effect2.gen(function* () {
341
579
  const value = yield* snapshot();
342
580
  if (value === published)
343
581
  return;
@@ -346,19 +584,19 @@ var layer = Layer.effect(Service62, Effect.gen(function* () {
346
584
  location: { directory: location.directory, workspaceID: location.workspaceID }
347
585
  });
348
586
  });
349
- yield* bus.subscribe([Event14.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect.forkScoped({ startImmediately: true }));
350
- return Service62.of({
587
+ yield* bus.subscribe([Event15.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect2.forkScoped({ startImmediately: true }));
588
+ return Service64.of({
351
589
  transform: state.transform,
352
590
  reload: state.reload,
353
- get: Effect.fn("Provider.get")((id) => Effect.sync(() => freeze(state.get().get(id)?.provider, true))),
354
- all: Effect.fn("Provider.all")(() => Effect.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
355
- available: Effect.fn("Provider.available")(() => snapshot().pipe(Effect.map((value) => value.providers))),
591
+ get: Effect2.fn("Provider.get")((id) => Effect2.sync(() => freeze(state.get().get(id)?.provider, true))),
592
+ all: Effect2.fn("Provider.all")(() => Effect2.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
593
+ available: Effect2.fn("Provider.available")(() => snapshot().pipe(Effect2.map((value) => value.providers))),
356
594
  snapshot
357
595
  });
358
596
  }));
359
- var node65 = makeLocationNode({ service: Service62, layer, deps: [node87, node66, node84] });
360
- var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
361
- const module = yield* Effect.tryPromise({
597
+ var node67 = makeLocationNode({ service: Service64, layer, deps: [node87, node68, node84] });
598
+ var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
599
+ const module = yield* Effect2.tryPromise({
362
600
  try: () => {
363
601
  const existing = packages.get(entrypoint);
364
602
  if (existing)
@@ -378,242 +616,4 @@ var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, en
378
616
  return module;
379
617
  });
380
618
 
381
- // src/aisdk-native.ts
382
- function rewrite2(target, input) {
383
- if (input.specifier === undefined)
384
- return;
385
- const plain = resolve(input.specifier, input);
386
- if (!plain)
387
- return;
388
- const settings = decode(target.settings ?? {});
389
- const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
390
- const translated = options(replacement, input.modelID, settings);
391
- if (target.package !== undefined || replacement !== input.specifier)
392
- target.package = replacement;
393
- target.settings = target.settings === undefined ? undefined : {
394
- ...translated.settings,
395
- ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
396
- };
397
- target.headers = mergeHeaders2(translated.headers, target.headers);
398
- target.body = mergeOverlay2(translated.body, target.body);
399
- target.variants = target.variants?.map((variant) => {
400
- const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
401
- const headers = mergeHeaders2(overlay.headers, variant.headers);
402
- const body = mergeOverlay2(overlay.body, variant.body);
403
- return {
404
- id: variant.id,
405
- ...variant.settings === undefined ? {} : { settings: overlay.settings },
406
- ...headers === undefined ? {} : { headers },
407
- ...body === undefined ? {} : { body }
408
- };
409
- });
410
- }
411
- var PACKAGES = {
412
- "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
413
- "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
414
- "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
415
- "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
416
- "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
417
- "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
418
- "@ai-sdk/google": "@opencode/ai/providers/google",
419
- "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
420
- "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
421
- "@ai-sdk/groq": "@opencode/ai/providers/groq",
422
- "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
423
- "@ai-sdk/openai": "@opencode/ai/providers/openai",
424
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
425
- "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
426
- "@ai-sdk/xai": "@opencode/ai/providers/xai",
427
- "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
428
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
429
- };
430
- var protocols = (name) => ({
431
- "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
432
- "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
433
- "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
434
- });
435
- var HOSTS = {
436
- alibaba: protocols("alibaba"),
437
- "alibaba-cn": protocols("alibaba"),
438
- "alibaba-coding-plan": protocols("alibaba"),
439
- "alibaba-coding-plan-cn": protocols("alibaba"),
440
- "alibaba-token-plan": protocols("alibaba"),
441
- "alibaba-token-plan-cn": protocols("alibaba"),
442
- baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
443
- "cloudflare-ai-gateway": {
444
- "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
445
- "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
446
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
447
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
448
- },
449
- "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
450
- deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
451
- "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
452
- "google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
453
- "kimi-for-coding": protocols("moonshot"),
454
- meta: protocols("meta"),
455
- minimax: protocols("minimax"),
456
- "minimax-cn": protocols("minimax"),
457
- "minimax-coding-plan": protocols("minimax"),
458
- "minimax-cn-coding-plan": protocols("minimax"),
459
- moonshotai: protocols("moonshot"),
460
- "moonshotai-cn": protocols("moonshot"),
461
- zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
462
- "zai-coding-plan": protocols("zai-coding-plan"),
463
- zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
464
- "zhipuai-coding-plan": protocols("zai-coding-plan")
465
- };
466
- var NATIVE = new Set([
467
- ...Object.values(PACKAGES),
468
- ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
469
- "@opencode/ai/providers/azure/chat",
470
- "@opencode/ai/providers/amazon-bedrock/mantle",
471
- "@opencode/ai/providers/amazon-bedrock/mantle/chat",
472
- "@opencode/ai/providers/amazon-bedrock/mantle/responses"
473
- ]);
474
- function native2(npm, context) {
475
- const host = HOSTS[context.providerID]?.[npm];
476
- if (host)
477
- return host;
478
- if (npm === "@ai-sdk/amazon-bedrock/mantle")
479
- return mantle(context.modelID);
480
- if (npm === "@ai-sdk/azure" && context.settings?.useCompletionUrls === true)
481
- return "@opencode/ai/providers/azure/chat";
482
- return PACKAGES[npm];
483
- }
484
- var mantle = (modelID) => {
485
- if (modelID === undefined)
486
- return "@opencode/ai/providers/amazon-bedrock/mantle";
487
- return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
488
- };
489
- function resolve(specifier, context) {
490
- const npm = packageName2(specifier);
491
- if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
492
- return native2(npm, context);
493
- if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
494
- return mantle(context.modelID);
495
- if (npm === "@opencode/ai/providers/azure/responses" && context.settings?.useCompletionUrls === true)
496
- return "@opencode/ai/providers/azure/chat";
497
- return NATIVE.has(npm) ? npm : undefined;
498
- }
499
- function options(replacement, modelID, settings) {
500
- const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
501
- const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
502
- return {
503
- settings: replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
504
- ...settings.headers === undefined ? {} : { headers: settings.headers },
505
- ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
506
- ...converse ? bedrockRequest(modelID, settings) : {},
507
- ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
508
- };
509
- }
510
- var BEDROCK_KEYS = [
511
- "bearerToken",
512
- "endpoint",
513
- "credentials",
514
- "credentialProvider",
515
- "accessKeyId",
516
- "secretAccessKey",
517
- "sessionToken"
518
- ];
519
- var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
520
- function bedrockSettings(settings, converse) {
521
- const region = settings.region ?? settings.credentials?.region;
522
- const credentials = settings.credentials ?? settings;
523
- const baseURL = settings.baseURL ?? settings.endpoint;
524
- return {
525
- ...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
526
- ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
527
- ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
528
- ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
529
- credentials: {
530
- ...region === undefined ? {} : { region },
531
- accessKeyId: credentials.accessKeyId,
532
- secretAccessKey: credentials.secretAccessKey,
533
- ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
534
- }
535
- }
536
- };
537
- }
538
- function bedrockRequest(modelID, settings) {
539
- const additional = settings.additionalModelRequestFields ?? {};
540
- const reasoning = settings.reasoningConfig;
541
- const anthropic = modelID?.includes("anthropic") ?? false;
542
- const openai = modelID?.includes("openai.") ?? false;
543
- const harmony = modelID?.includes("openai.gpt-oss") ?? false;
544
- const effort = reasoning?.maxReasoningEffort;
545
- const type = reasoning?.type;
546
- const budget = reasoning?.budgetTokens;
547
- const display = reasoning?.display;
548
- const betas = settings.anthropicBeta ?? [];
549
- const fields = mergeOverlay2(additional, {
550
- ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
551
- ...anthropic && type === "enabled" && budget !== undefined ? { thinking: { type: "enabled", budget_tokens: budget } } : {},
552
- ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
553
- ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
554
- ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
555
- ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
556
- ...!anthropic && !openai && effort !== undefined ? {
557
- reasoningConfig: {
558
- ...type === undefined || type === "adaptive" ? {} : { type },
559
- ...budget === undefined ? {} : { budgetTokens: budget },
560
- maxReasoningEffort: effort
561
- }
562
- } : {}
563
- });
564
- const body = {
565
- ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
566
- ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
567
- };
568
- return Object.keys(body).length === 0 ? {} : { body };
569
- }
570
- var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
571
- function openRouterRequest(settings) {
572
- const headers = mergeHeaders2({
573
- ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
574
- ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
575
- ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
576
- }, settings.headers) ?? {};
577
- return Object.keys(headers).length === 0 ? {} : { headers };
578
- }
579
- var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option.some(undefined)))));
580
- var Credentials = Schema2.Struct({
581
- accessKeyId: Schema2.String,
582
- secretAccessKey: Schema2.String,
583
- sessionToken: lenient(Schema2.String),
584
- region: lenient(Schema2.String)
585
- });
586
- var Legacy = Schema2.StructWithRest(Schema2.Struct({
587
- apiKey: lenient(Schema2.String),
588
- baseURL: lenient(Schema2.String),
589
- headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
590
- extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
591
- useCompletionUrls: lenient(Schema2.Boolean),
592
- auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
593
- bearerToken: lenient(Schema2.String),
594
- endpoint: lenient(Schema2.String),
595
- region: lenient(Schema2.String),
596
- credentials: lenient(Credentials),
597
- accessKeyId: lenient(Schema2.String),
598
- secretAccessKey: lenient(Schema2.String),
599
- sessionToken: lenient(Schema2.String),
600
- anthropicBeta: lenient(Schema2.Array(Schema2.String)),
601
- serviceTier: lenient(Schema2.String),
602
- reasoningConfig: lenient(Schema2.Struct({
603
- type: lenient(Schema2.String),
604
- display: lenient(Schema2.String),
605
- maxReasoningEffort: lenient(Schema2.String),
606
- budgetTokens: lenient(Schema2.Number)
607
- })),
608
- additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
609
- anthropic_beta: lenient(Schema2.Array(Schema2.String)),
610
- output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
611
- reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
612
- }), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
613
- appName: lenient(Schema2.String),
614
- appUrl: lenient(Schema2.String),
615
- api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
616
- }), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
617
- var decode = Schema2.decodeUnknownSync(Legacy);
618
-
619
- export { rewrite2, native2, exports_aisdk_native, ID11, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info23, Service62, node65, exports_provider3, Event13 };
619
+ export { ID8, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, mergeOverlay2, mergeHeaders2, Request2, Compaction3, Transport2, Settings2, Info21, Service64, node67, exports_provider3, Event14, rewrite2, native2, exports_aisdk_native };