@opencode/core 0.0.0-dev-19713 → 0.0.0-dev-19714

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 (790) hide show
  1. package/dist/account/sql.js +1 -1
  2. package/dist/agent.js +82 -82
  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-3838ekre.js → model-resolver-036p5t1s.js} +4 -4
  8. package/dist/chunks/{project-4nd81372.js → model-resolver-03j0d1mj.js} +3 -3
  9. package/dist/chunks/{project-sf0yp864.js → model-resolver-07770t2t.js} +6 -6
  10. package/dist/chunks/{project-f85ht8t4.js → model-resolver-09kan382.js} +18 -18
  11. package/dist/chunks/{project-g4evn3v7.js → model-resolver-0cwrv3rz.js} +24 -24
  12. package/dist/chunks/{project-axe68c7r.js → model-resolver-0gzst43f.js} +15 -15
  13. package/dist/chunks/model-resolver-0mesazry.js +4 -0
  14. package/dist/chunks/{project-0paq2nw3.js → model-resolver-0paq2nw3.js} +1 -1
  15. package/dist/chunks/{project-0q0f95c6.js → model-resolver-0q0f95c6.js} +1 -1
  16. package/dist/chunks/{project-0e43mjqe.js → model-resolver-0tj19dxf.js} +44 -44
  17. package/dist/chunks/{project-gz8vf2wf.js → model-resolver-0wmjfan7.js} +11 -11
  18. package/dist/chunks/{project-t30ds354.js → model-resolver-105491yy.js} +50 -50
  19. package/dist/chunks/{project-6p2e6h7q.js → model-resolver-12x7tyn7.js} +17 -17
  20. package/dist/chunks/{project-45fc085j.js → model-resolver-136t2gc4.js} +13 -13
  21. package/dist/chunks/{project-qm6bcdq0.js → model-resolver-19x634pp.js} +24 -24
  22. package/dist/chunks/{project-1dazxqgg.js → model-resolver-1dazxqgg.js} +2 -2
  23. package/dist/chunks/{project-6rsmfscx.js → model-resolver-1e3gp6z5.js} +3 -3
  24. package/dist/chunks/{project-gd2bs2n5.js → model-resolver-1g2j4a9r.js} +15 -15
  25. package/dist/chunks/{project-t9zz3wr0.js → model-resolver-1sr9wk0z.js} +20 -20
  26. package/dist/chunks/{project-apb6pzk4.js → model-resolver-1v4fec1y.js} +11 -11
  27. package/dist/chunks/{project-21r38tys.js → model-resolver-21r38tys.js} +1 -1
  28. package/dist/chunks/{project-f40xb99z.js → model-resolver-21v8w307.js} +5 -5
  29. package/dist/chunks/{project-6h73sxmp.js → model-resolver-2402vzrj.js} +5 -5
  30. package/dist/chunks/{project-hhey0jg1.js → model-resolver-26x0xdfb.js} +35 -35
  31. package/dist/chunks/{project-ajm2xfj9.js → model-resolver-280hqnth.js} +17 -17
  32. package/dist/chunks/{project-z63w68vq.js → model-resolver-29x78va6.js} +6 -6
  33. package/dist/chunks/{project-2a5m3afh.js → model-resolver-2a5m3afh.js} +1 -1
  34. package/dist/chunks/{project-qfs20yb1.js → model-resolver-2eysy4zx.js} +31 -31
  35. package/dist/chunks/{project-phc8pspp.js → model-resolver-2qq7qy34.js} +9 -9
  36. package/dist/chunks/{project-b7arwqew.js → model-resolver-32hhr2bd.js} +17 -17
  37. package/dist/chunks/{project-g5jdgkja.js → model-resolver-32n3v4ks.js} +17 -17
  38. package/dist/chunks/{project-q8vefxpv.js → model-resolver-37med0fv.js} +3 -3
  39. package/dist/chunks/{project-7vhg0pxj.js → model-resolver-37w67f0s.js} +4 -4
  40. package/dist/chunks/{project-xpfx79fc.js → model-resolver-3a7v3mfb.js} +3 -3
  41. package/dist/chunks/{project-3fc6dm20.js → model-resolver-3fc6dm20.js} +1 -1
  42. package/dist/chunks/{project-3hepkmqq.js → model-resolver-3hepkmqq.js} +1 -1
  43. package/dist/chunks/{project-6twqde5r.js → model-resolver-3k1d3fsa.js} +26 -26
  44. package/dist/chunks/{project-3smtnn6g.js → model-resolver-3smtnn6g.js} +1 -1
  45. package/dist/chunks/{project-vh9kev4b.js → model-resolver-3te71xag.js} +20 -20
  46. package/dist/chunks/{project-3tvqynh2.js → model-resolver-3tvqynh2.js} +1 -1
  47. package/dist/chunks/{project-db3nr1v1.js → model-resolver-43yktx36.js} +11 -11
  48. package/dist/chunks/{project-ve3mta7y.js → model-resolver-4aa2m1a0.js} +10 -10
  49. package/dist/chunks/{project-qwjmgwmn.js → model-resolver-4e8vs6eh.js} +8 -8
  50. package/dist/chunks/{project-z7fwrr9t.js → model-resolver-4fqcgg66.js} +16 -16
  51. package/dist/chunks/{project-0gxvdf9c.js → model-resolver-4hcdp5hb.js} +10 -10
  52. package/dist/chunks/{project-2tccykea.js → model-resolver-4sxejfta.js} +5 -5
  53. package/dist/chunks/{project-tmwvyjej.js → model-resolver-4tvste0q.js} +2 -2
  54. package/dist/chunks/{project-510m7gjw.js → model-resolver-510m7gjw.js} +2 -2
  55. package/dist/chunks/{project-wtm31mz8.js → model-resolver-54pcgdgx.js} +6 -6
  56. package/dist/chunks/{project-xfkkasph.js → model-resolver-57b9ws8p.js} +7 -7
  57. package/dist/chunks/{project-57ez7d0k.js → model-resolver-57ez7d0k.js} +2 -2
  58. package/dist/chunks/{project-n8g4dvrs.js → model-resolver-582h4ye8.js} +20 -20
  59. package/dist/chunks/{project-5c4hm403.js → model-resolver-5c4hm403.js} +3 -3
  60. package/dist/chunks/{project-5daktx2q.js → model-resolver-5daktx2q.js} +1 -1
  61. package/dist/chunks/{project-807pyvs8.js → model-resolver-5pf115b2.js} +10 -10
  62. package/dist/chunks/{project-81zmr1ce.js → model-resolver-5pmj86cf.js} +26 -26
  63. package/dist/chunks/{project-5t3nmthw.js → model-resolver-5t3nmthw.js} +2 -2
  64. package/dist/chunks/{project-6ekh48kv.js → model-resolver-61bshzb4.js} +21 -21
  65. package/dist/chunks/{project-669tq793.js → model-resolver-669tq793.js} +1 -1
  66. package/dist/chunks/{project-1m6e9scz.js → model-resolver-6706eqrn.js} +18 -18
  67. package/dist/chunks/{project-46dczp5g.js → model-resolver-6a86sy3s.js} +14 -14
  68. package/dist/chunks/{project-7wz5t3gw.js → model-resolver-6cv92x4b.js} +8 -8
  69. package/dist/chunks/{project-bf3mwr3a.js → model-resolver-6dpxe5wv.js} +38 -38
  70. package/dist/chunks/{project-8d7qmr5n.js → model-resolver-6j6rjarh.js} +2 -2
  71. package/dist/chunks/{project-6msgmcgs.js → model-resolver-6msgmcgs.js} +1 -1
  72. package/dist/chunks/{project-bmcbgxas.js → model-resolver-6p3xqd60.js} +1 -1
  73. package/dist/chunks/{project-j8w01nkz.js → model-resolver-6rgj1aye.js} +3 -3
  74. package/dist/chunks/{project-jf1f0nss.js → model-resolver-6vcd148b.js} +27 -27
  75. package/dist/chunks/{project-mhkvc446.js → model-resolver-73tb2d7t.js} +3 -3
  76. package/dist/chunks/{project-0053kn32.js → model-resolver-77t38nde.js} +57 -57
  77. package/dist/chunks/{project-wzx6cy1j.js → model-resolver-797kpq2p.js} +11 -11
  78. package/dist/chunks/{project-7bmhse3q.js → model-resolver-7bmhse3q.js} +1 -1
  79. package/dist/chunks/{project-ps59y782.js → model-resolver-7ewmrn6e.js} +1 -1
  80. package/dist/chunks/{project-6zgwg02f.js → model-resolver-7jjj6fmh.js} +29 -29
  81. package/dist/chunks/{project-j83vkw0y.js → model-resolver-7z4dgn25.js} +3 -3
  82. package/dist/chunks/{project-q6ek06hm.js → model-resolver-843r718v.js} +2 -2
  83. package/dist/chunks/{project-rsdf2nvv.js → model-resolver-88sz8qcd.js} +4 -4
  84. package/dist/chunks/{project-8d7r5vzw.js → model-resolver-8d7r5vzw.js} +1 -1
  85. package/dist/chunks/{project-ep9bxrrg.js → model-resolver-8gnjjt4m.js} +12 -12
  86. package/dist/chunks/{project-r31ekhvv.js → model-resolver-8m6g92fr.js} +31 -31
  87. package/dist/chunks/{project-38ddmwy9.js → model-resolver-8mdv2t2t.js} +9 -9
  88. package/dist/chunks/{project-g237yjq6.js → model-resolver-8mrgngee.js} +27 -27
  89. package/dist/chunks/{project-hdthj1pw.js → model-resolver-8xd21chy.js} +11 -11
  90. package/dist/chunks/{project-cq9vh2fv.js → model-resolver-91p1v22t.js} +8 -8
  91. package/dist/chunks/{project-ks386gw1.js → model-resolver-99qst2hg.js} +32 -32
  92. package/dist/chunks/{project-m6yjd7en.js → model-resolver-9ae838bd.js} +9 -9
  93. package/dist/chunks/{project-1ah48ds1.js → model-resolver-9afpsfvx.js} +22 -22
  94. package/dist/chunks/{project-hwth1sas.js → model-resolver-9p3ceqmc.js} +11 -11
  95. package/dist/chunks/{project-c6t8xy98.js → model-resolver-a0p1bqyg.js} +13 -13
  96. package/dist/chunks/{project-ff0svapt.js → model-resolver-a3r4dcrj.js} +2 -2
  97. package/dist/chunks/{project-ejxq0kbn.js → model-resolver-a4y05av3.js} +42 -42
  98. package/dist/chunks/{project-aaet6srn.js → model-resolver-aaet6srn.js} +2 -2
  99. package/dist/chunks/{project-asepq3gz.js → model-resolver-aeqcmxjy.js} +6 -6
  100. package/dist/chunks/{project-q7s34kns.js → model-resolver-akv0dm8z.js} +4 -4
  101. package/dist/chunks/model-resolver-aspdhtxw.js +26 -0
  102. package/dist/chunks/{project-s8zy8myc.js → model-resolver-avm8jn6n.js} +5 -5
  103. package/dist/chunks/{project-m64xvjj1.js → model-resolver-b29mbqx6.js} +5 -5
  104. package/dist/chunks/{project-jqwv312v.js → model-resolver-b4scv1je.js} +7 -7
  105. package/dist/chunks/{project-yc78m0qr.js → model-resolver-b5hby8zf.js} +9 -9
  106. package/dist/chunks/{project-58f9hsjx.js → model-resolver-b662eqrs.js} +35 -35
  107. package/dist/chunks/{project-b6gygkdw.js → model-resolver-b6gygkdw.js} +2 -2
  108. package/dist/chunks/{project-e2jvphg0.js → model-resolver-bxvw9c4f.js} +30 -30
  109. package/dist/chunks/{project-f3ngv102.js → model-resolver-c20khjev.js} +21 -21
  110. package/dist/chunks/{project-4ztxs8pm.js → model-resolver-c2qzrg7b.js} +11 -11
  111. package/dist/chunks/{project-zzpdbskt.js → model-resolver-c8eb5bxh.js} +24 -24
  112. package/dist/chunks/{project-7mc0myxf.js → model-resolver-cbkyy13e.js} +32 -32
  113. package/dist/chunks/{project-xrfewb9d.js → model-resolver-cs9gs3bj.js} +10 -10
  114. package/dist/chunks/{project-czt4nnnj.js → model-resolver-cvn0pq7m.js} +4 -4
  115. package/dist/chunks/{project-rffp7s6r.js → model-resolver-d068vn8b.js} +19 -19
  116. package/dist/chunks/{project-18yjdgfz.js → model-resolver-d4h3qc93.js} +14 -14
  117. package/dist/chunks/{project-cwx0qw6s.js → model-resolver-d92zep6j.js} +8 -8
  118. package/dist/chunks/{project-dj2t23y0.js → model-resolver-dj2t23y0.js} +2 -2
  119. package/dist/chunks/{project-qmqgtz8f.js → model-resolver-djszqvmq.js} +9 -9
  120. package/dist/chunks/{project-dpkg50ah.js → model-resolver-dpkg50ah.js} +1 -1
  121. package/dist/chunks/{project-gdw7k6f6.js → model-resolver-dsqfhhxw.js} +6 -6
  122. package/dist/chunks/{project-eqyf5spt.js → model-resolver-dvh6e8nq.js} +2 -2
  123. package/dist/chunks/{project-dxj72tfx.js → model-resolver-dxj72tfx.js} +1 -1
  124. package/dist/chunks/{project-t9pnexmg.js → model-resolver-e0vtkr8g.js} +6 -6
  125. package/dist/chunks/{project-5qd3pb7m.js → model-resolver-e3qxr5gk.js} +2 -2
  126. package/dist/chunks/{project-kxs7pxe0.js → model-resolver-e9bbt0wn.js} +139 -139
  127. package/dist/chunks/{project-ef5x83kb.js → model-resolver-ef5x83kb.js} +1 -1
  128. package/dist/chunks/{project-3ns9snst.js → model-resolver-er91jp3n.js} +283 -283
  129. package/dist/chunks/{project-etq0c3wd.js → model-resolver-etq0c3wd.js} +1 -1
  130. package/dist/chunks/{project-rch32y69.js → model-resolver-exbfn0n5.js} +13 -13
  131. package/dist/chunks/{project-ehqw40ev.js → model-resolver-f2bg7dfe.js} +7 -7
  132. package/dist/chunks/{project-d9q114hm.js → model-resolver-f4t5cf30.js} +17 -17
  133. package/dist/chunks/{project-7ac170kv.js → model-resolver-fab8hzt3.js} +4 -4
  134. package/dist/chunks/{project-1nhwpg1s.js → model-resolver-fav965pf.js} +9 -9
  135. package/dist/chunks/{project-mw9h66aj.js → model-resolver-fb1pb7ec.js} +5 -5
  136. package/dist/chunks/{project-2k8khapm.js → model-resolver-fcrkznn8.js} +5 -5
  137. package/dist/chunks/{project-nscznvay.js → model-resolver-fhs97t90.js} +9 -9
  138. package/dist/chunks/{project-7xvfyw1s.js → model-resolver-fq77vv66.js} +10 -10
  139. package/dist/chunks/{project-wztgefzb.js → model-resolver-fwmj055g.js} +28 -28
  140. package/dist/chunks/{project-fxbjtjnd.js → model-resolver-fxbjtjnd.js} +1 -1
  141. package/dist/chunks/{project-66m4g3ad.js → model-resolver-fxkmg59r.js} +22 -22
  142. package/dist/chunks/{project-v6sbkfdk.js → model-resolver-g1f3nzyq.js} +10 -10
  143. package/dist/chunks/{project-pg0sspy2.js → model-resolver-g22wph12.js} +24 -24
  144. package/dist/chunks/{project-a3xdadst.js → model-resolver-g25ey1zv.js} +4 -4
  145. package/dist/chunks/{project-4gxkwj94.js → model-resolver-g5m51wyg.js} +7 -7
  146. package/dist/chunks/{project-gd4qta3r.js → model-resolver-gd4qta3r.js} +1 -1
  147. package/dist/chunks/{project-a887cz7t.js → model-resolver-gnp856re.js} +11 -11
  148. package/dist/chunks/{project-8wa2px18.js → model-resolver-gpanbyjj.js} +3 -3
  149. package/dist/chunks/{project-rb8gbgsw.js → model-resolver-grkqts8z.js} +14 -14
  150. package/dist/chunks/{project-gv6a8nnw.js → model-resolver-gv6a8nnw.js} +2 -2
  151. package/dist/chunks/{project-vfy1kg21.js → model-resolver-gw1g6bxq.js} +41 -41
  152. package/dist/chunks/{project-apwr3fvc.js → model-resolver-gzgc3wej.js} +14 -14
  153. package/dist/chunks/{project-h03wrkyp.js → model-resolver-h03wrkyp.js} +2 -2
  154. package/dist/chunks/{project-x4zt7gar.js → model-resolver-h0za90c7.js} +11 -11
  155. package/dist/chunks/{project-hd5f4vqj.js → model-resolver-h28m7sc2.js} +1 -1
  156. package/dist/chunks/{project-7d7fs79y.js → model-resolver-h2rkx437.js} +20 -20
  157. package/dist/chunks/{project-xg3kyc3a.js → model-resolver-h3v21342.js} +23 -23
  158. package/dist/chunks/{project-h6r3nrb9.js → model-resolver-h6r3nrb9.js} +1 -1
  159. package/dist/chunks/{project-h6vf3j39.js → model-resolver-h6vf3j39.js} +1 -1
  160. package/dist/chunks/{project-dj68pnee.js → model-resolver-h90v2x9d.js} +4 -4
  161. package/dist/chunks/{project-rywpqwaq.js → model-resolver-h9520sm0.js} +9 -9
  162. package/dist/chunks/{project-dvwe6amh.js → model-resolver-h96pgs48.js} +11 -11
  163. package/dist/chunks/{project-tff9hnav.js → model-resolver-hbecdtej.js} +7 -7
  164. package/dist/chunks/{project-hdnk95c8.js → model-resolver-hdnk95c8.js} +2 -2
  165. package/dist/chunks/{project-d9pdb30h.js → model-resolver-hg488ry8.js} +20 -20
  166. package/dist/chunks/{project-a5ds490q.js → model-resolver-hja6fhvt.js} +21 -21
  167. package/dist/chunks/{project-mpcz64qa.js → model-resolver-hkbhb5q6.js} +9 -9
  168. package/dist/chunks/{project-rm2vr7q2.js → model-resolver-hvxy08g5.js} +16 -16
  169. package/dist/chunks/{project-y81xge66.js → model-resolver-hxd5vk3m.js} +16 -16
  170. package/dist/chunks/{project-j56e64zr.js → model-resolver-j56e64zr.js} +1 -1
  171. package/dist/chunks/{project-4paq7rse.js → model-resolver-j7bcq5se.js} +18 -18
  172. package/dist/chunks/{project-v6kv8rtw.js → model-resolver-j7k61pcz.js} +24 -24
  173. package/dist/chunks/{project-6bsje7ws.js → model-resolver-jexxy024.js} +3 -3
  174. package/dist/chunks/{project-qa3qhgw8.js → model-resolver-jfqtm2ew.js} +4 -4
  175. package/dist/chunks/{project-fhvxcjn2.js → model-resolver-jg86prm2.js} +3 -3
  176. package/dist/chunks/{project-1bhphhem.js → model-resolver-jkbwdfs8.js} +18 -18
  177. package/dist/chunks/{project-jppvw2tx.js → model-resolver-jppvw2tx.js} +2 -2
  178. package/dist/chunks/{project-ergc4ny1.js → model-resolver-jsvzcvkq.js} +11 -11
  179. package/dist/chunks/{project-1m4k53rk.js → model-resolver-jt63vget.js} +11 -11
  180. package/dist/chunks/{project-n4r3xatb.js → model-resolver-jvf3yq6v.js} +4 -4
  181. package/dist/chunks/{project-psmqrama.js → model-resolver-k2f8e2fb.js} +14 -14
  182. package/dist/chunks/{project-nzks3jc8.js → model-resolver-k3c624dm.js} +3 -3
  183. package/dist/chunks/{project-xv9c8883.js → model-resolver-k60bgaqn.js} +25 -25
  184. package/dist/chunks/{project-r6xm6v3j.js → model-resolver-kewfkj5e.js} +8 -8
  185. package/dist/chunks/{project-nejh3f09.js → model-resolver-kjexfpn9.js} +12 -12
  186. package/dist/chunks/{project-c6ejzy2z.js → model-resolver-kmk2vv10.js} +10 -10
  187. package/dist/chunks/{project-yvag60xw.js → model-resolver-knddexfq.js} +10 -10
  188. package/dist/chunks/{project-b2r72qsd.js → model-resolver-kycpm9x6.js} +11 -11
  189. package/dist/chunks/{project-m0jqrx5p.js → model-resolver-m0jqrx5p.js} +2 -2
  190. package/dist/chunks/{project-m3fdjcah.js → model-resolver-m3fdjcah.js} +1 -1
  191. package/dist/chunks/{project-d87mm69w.js → model-resolver-m879hchs.js} +15 -15
  192. package/dist/chunks/{project-m9w0rfyh.js → model-resolver-m9w0rfyh.js} +1 -1
  193. package/dist/chunks/{project-n9j71pv6.js → model-resolver-mae1f2vv.js} +26 -26
  194. package/dist/chunks/{project-9g54c81z.js → model-resolver-mcjy4xdq.js} +27 -27
  195. package/dist/chunks/{project-33w4ejhs.js → model-resolver-mfqp6xfm.js} +9 -9
  196. package/dist/chunks/{project-6qqgecnt.js → model-resolver-mj754nyr.js} +52 -52
  197. package/dist/chunks/{project-e90cjycw.js → model-resolver-mtc1r9z5.js} +47 -47
  198. package/dist/chunks/{project-17468q09.js → model-resolver-mvydm7va.js} +4 -4
  199. package/dist/chunks/{project-ycjb11n5.js → model-resolver-mx9vqzsb.js} +6 -6
  200. package/dist/chunks/{project-482ejey9.js → model-resolver-n2q19pyc.js} +20 -20
  201. package/dist/chunks/{project-mwzn64pe.js → model-resolver-n2sfrcvm.js} +9 -9
  202. package/dist/chunks/{project-0pdvte1k.js → model-resolver-n7ec94wg.js} +15 -15
  203. package/dist/chunks/{project-wzz0kxab.js → model-resolver-n8c291r7.js} +9 -9
  204. package/dist/chunks/{project-yyq4exrk.js → model-resolver-p10e02dr.js} +34 -34
  205. package/dist/chunks/{project-7nnf86rv.js → model-resolver-p55fzyn7.js} +22 -22
  206. package/dist/chunks/{project-qdv30vxr.js → model-resolver-pdqjgxh5.js} +41 -41
  207. package/dist/chunks/{project-pjvnvgmy.js → model-resolver-pjvnvgmy.js} +1 -1
  208. package/dist/chunks/{project-pknna89w.js → model-resolver-pknna89w.js} +1 -1
  209. package/dist/chunks/{project-0fa4pp12.js → model-resolver-ps87kzvs.js} +29 -29
  210. package/dist/chunks/{project-2gbsvbx5.js → model-resolver-py5agcrg.js} +12 -12
  211. package/dist/chunks/{project-q0crzqsn.js → model-resolver-q378wj2a.js} +11 -11
  212. package/dist/chunks/{project-0avpwvn6.js → model-resolver-q38hx1yx.js} +9 -9
  213. package/dist/chunks/{project-jj2hptzc.js → model-resolver-q3bxgjqn.js} +4 -4
  214. package/dist/chunks/{project-55tews2p.js → model-resolver-q5dg9qes.js} +24 -24
  215. package/dist/chunks/{project-nzs5n59t.js → model-resolver-qgwyt9kf.js} +16 -16
  216. package/dist/chunks/{project-yzgcsa77.js → model-resolver-qnenbneg.js} +9 -9
  217. package/dist/chunks/{project-rhx683sy.js → model-resolver-qqtwvk4z.js} +6 -6
  218. package/dist/chunks/{project-qsdy395h.js → model-resolver-qsdy395h.js} +1 -1
  219. package/dist/chunks/model-resolver-qsj989em.js +478 -0
  220. package/dist/chunks/{project-2jwwfjvq.js → model-resolver-qvsy8jwx.js} +14 -14
  221. package/dist/chunks/{project-nwb9p4n0.js → model-resolver-qwhb49p5.js} +13 -13
  222. package/dist/chunks/{project-qsr4f22s.js → model-resolver-qy0qaq8h.js} +24 -24
  223. package/dist/chunks/{project-hdeyfasg.js → model-resolver-qzhqhqdj.js} +85 -85
  224. package/dist/chunks/{project-rcwsqex5.js → model-resolver-rcz1rf0a.js} +12 -12
  225. package/dist/chunks/{project-6m2z8x45.js → model-resolver-rd82n06c.js} +2 -2
  226. package/dist/chunks/{project-rdw6cm16.js → model-resolver-rdw6cm16.js} +1 -1
  227. package/dist/chunks/{project-6ckrbv33.js → model-resolver-re1b4xdv.js} +12 -12
  228. package/dist/chunks/{project-s8d7rejh.js → model-resolver-rhjbct0v.js} +4 -4
  229. package/dist/chunks/{project-df1e2q09.js → model-resolver-s2b6rjy8.js} +27 -27
  230. package/dist/chunks/{project-yrznvahk.js → model-resolver-s4enseaf.js} +2 -2
  231. package/dist/chunks/{project-y70c3h32.js → model-resolver-s5qg1d5b.js} +3 -3
  232. package/dist/chunks/{project-kweabchx.js → model-resolver-s8skvdk2.js} +15 -15
  233. package/dist/chunks/{project-jf9anmv7.js → model-resolver-sa4vrjjn.js} +5 -5
  234. package/dist/chunks/{project-6rybd781.js → model-resolver-scq4khx8.js} +1 -1
  235. package/dist/chunks/{project-xwwz9aqf.js → model-resolver-sej7e0cf.js} +4 -4
  236. package/dist/chunks/{project-sd7kbe23.js → model-resolver-sxk5rhme.js} +43 -43
  237. package/dist/chunks/{project-ax1q9e2w.js → model-resolver-szrkjaj8.js} +13 -13
  238. package/dist/chunks/{project-y85y39z7.js → model-resolver-t4pxw6gg.js} +6 -6
  239. package/dist/chunks/{project-g0b73kpw.js → model-resolver-t4zcj5pn.js} +8 -8
  240. package/dist/chunks/{project-8gw42vpw.js → model-resolver-t96rdxhd.js} +15 -15
  241. package/dist/chunks/{project-tazgh4e4.js → model-resolver-tazgh4e4.js} +1 -1
  242. package/dist/chunks/{project-c2vgry0s.js → model-resolver-tc5jn9f0.js} +31 -31
  243. package/dist/chunks/{project-89znhe33.js → model-resolver-tcezcvh9.js} +4 -4
  244. package/dist/chunks/{project-tdstcens.js → model-resolver-tdstcens.js} +1 -1
  245. package/dist/chunks/{project-5xtgfte3.js → model-resolver-tpw6cwsb.js} +8 -8
  246. package/dist/chunks/{project-dqbxdgww.js → model-resolver-tsc91ve6.js} +11 -11
  247. package/dist/chunks/{project-53xccd59.js → model-resolver-tsmnctvy.js} +23 -23
  248. package/dist/chunks/{project-tvtrv512.js → model-resolver-tvtrv512.js} +1 -1
  249. package/dist/chunks/model-resolver-tz5bhpr7.js +252 -0
  250. package/dist/chunks/{project-pmr4s4kc.js → model-resolver-ve4pfa0n.js} +4 -4
  251. package/dist/chunks/{project-veqvce7d.js → model-resolver-veqvce7d.js} +1 -1
  252. package/dist/chunks/{project-32xn2sn4.js → model-resolver-vje7zzhn.js} +6 -6
  253. package/dist/chunks/{project-6yk2zq27.js → model-resolver-vmakrqm7.js} +20 -20
  254. package/dist/chunks/{project-vzcthcp8.js → model-resolver-vzcthcp8.js} +1 -1
  255. package/dist/chunks/{project-jghp9vat.js → model-resolver-vzvmv61a.js} +35 -35
  256. package/dist/chunks/{project-wg1yegmy.js → model-resolver-w0x80a1d.js} +1 -1
  257. package/dist/chunks/{project-faj2svbs.js → model-resolver-w3nq1sqw.js} +9 -9
  258. package/dist/chunks/{project-w3wsvvr9.js → model-resolver-w3wsvvr9.js} +1 -1
  259. package/dist/chunks/{project-en4evqvm.js → model-resolver-w7ejeta8.js} +24 -24
  260. package/dist/chunks/{project-te31491j.js → model-resolver-w7wmj8nh.js} +32 -32
  261. package/dist/chunks/{project-wd87259q.js → model-resolver-wd87259q.js} +1 -1
  262. package/dist/chunks/{project-9200cv3f.js → model-resolver-wf37p31v.js} +46 -46
  263. package/dist/chunks/{project-wargq46t.js → model-resolver-wgyq80v0.js} +3 -3
  264. package/dist/chunks/{project-mpm1edyf.js → model-resolver-wq0zvr2n.js} +21 -21
  265. package/dist/chunks/{project-bjqps2ga.js → model-resolver-wy2za45w.js} +7 -7
  266. package/dist/chunks/{project-x1ezjp6w.js → model-resolver-x1ezjp6w.js} +1 -1
  267. package/dist/chunks/{project-9wg02tht.js → model-resolver-x442ch9z.js} +1 -1
  268. package/dist/chunks/{project-44ke2mar.js → model-resolver-xfdrc2qg.js} +4 -4
  269. package/dist/chunks/{project-csyfbvnh.js → model-resolver-xndsvhpx.js} +24 -24
  270. package/dist/chunks/{project-6t0tdr4f.js → model-resolver-xq5wqvhk.js} +9 -9
  271. package/dist/chunks/{project-1v6e57b0.js → model-resolver-xqjcyj9c.js} +3 -3
  272. package/dist/chunks/{project-tv77nzbw.js → model-resolver-xsgfbn57.js} +24 -24
  273. package/dist/chunks/{project-y1fvbwt7.js → model-resolver-y1fvbwt7.js} +1 -1
  274. package/dist/chunks/{project-k79tzb9n.js → model-resolver-y56ehv6b.js} +9 -9
  275. package/dist/chunks/{project-41pvexha.js → model-resolver-y57wc7ze.js} +72 -72
  276. package/dist/chunks/{project-gnx8rka1.js → model-resolver-y8s1zs8h.js} +13 -13
  277. package/dist/chunks/{project-c0mnv205.js → model-resolver-y9g5yfg0.js} +8 -8
  278. package/dist/chunks/{project-3eg0d9cb.js → model-resolver-ymcr6gjs.js} +9 -9
  279. package/dist/chunks/{project-rhraev7y.js → model-resolver-yp2x3t23.js} +4 -4
  280. package/dist/chunks/{project-yrhqyw5v.js → model-resolver-yrhqyw5v.js} +1 -1
  281. package/dist/chunks/{project-z0bkrqjs.js → model-resolver-z0bkrqjs.js} +1 -1
  282. package/dist/chunks/{project-3cfzdc8e.js → model-resolver-z3pw5915.js} +5 -5
  283. package/dist/chunks/{project-dwacwe3p.js → model-resolver-z6f2y3jk.js} +30 -30
  284. package/dist/chunks/{project-zeh9ct20.js → model-resolver-zeh9ct20.js} +2 -2
  285. package/dist/chunks/{project-dpvzhgsn.js → model-resolver-zpb5kyv6.js} +13 -13
  286. package/dist/chunks/{project-k8dasee7.js → model-resolver-zq6stcrg.js} +8 -8
  287. package/dist/chunks/{project-zr2ceqn5.js → model-resolver-zr2ceqn5.js} +1 -1
  288. package/dist/chunks/{project-zxq2ej10.js → model-resolver-zxq2ej10.js} +1 -1
  289. package/dist/codemode/catalog.js +1 -1
  290. package/dist/codemode/instructions.js +7 -7
  291. package/dist/codemode/tool.js +3 -3
  292. package/dist/codemode/web.js +1 -1
  293. package/dist/command.js +82 -82
  294. package/dist/config/discovery.js +83 -83
  295. package/dist/config/markdown.js +1 -1
  296. package/dist/config/normalize.js +105 -105
  297. package/dist/config/plugin/agent.js +124 -124
  298. package/dist/config/plugin/command.js +213 -213
  299. package/dist/config/plugin/compaction.js +159 -159
  300. package/dist/config/plugin/compatibility.js +140 -140
  301. package/dist/config/plugin/entry-observer.js +1 -1
  302. package/dist/config/plugin/formatter.js +123 -123
  303. package/dist/config/plugin/image.js +122 -122
  304. package/dist/config/plugin/instruction.js +89 -89
  305. package/dist/config/plugin/location-watcher.js +124 -124
  306. package/dist/config/plugin/mcp.js +131 -131
  307. package/dist/config/plugin/policy.js +122 -122
  308. package/dist/config/plugin/provider.js +122 -122
  309. package/dist/config/plugin/reference.js +124 -124
  310. package/dist/config/plugin/shell.js +124 -124
  311. package/dist/config/plugin/skill-file.js +101 -101
  312. package/dist/config/plugin/skill.js +143 -143
  313. package/dist/config/plugin/snapshot.js +122 -122
  314. package/dist/config/plugin/source.js +125 -125
  315. package/dist/config/plugin/tool-output.js +124 -124
  316. package/dist/config/plugin/websearch.js +123 -123
  317. package/dist/config/plugin/worktree.js +124 -124
  318. package/dist/config/variable.js +3 -3
  319. package/dist/config/watch.js +1 -1
  320. package/dist/config.js +127 -127
  321. package/dist/credential/sql.js +2 -2
  322. package/dist/credential.js +76 -76
  323. package/dist/database/database.js +65 -65
  324. package/dist/database/drizzle/effect-sqlite/driver.js +12 -12
  325. package/dist/database/drizzle/effect-sqlite/index.js +12 -12
  326. package/dist/database/drizzle/effect-sqlite/session.js +11 -11
  327. package/dist/database/drizzle/index.js +13 -13
  328. package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
  329. package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
  330. package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
  331. package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
  332. package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
  333. package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
  334. package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
  335. package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
  336. package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
  337. package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
  338. package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
  339. package/dist/database/drizzle.js +14 -14
  340. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
  341. package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
  342. package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
  343. package/dist/database/migration/20260225215848_workspace.js +1 -1
  344. package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
  345. package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
  346. package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
  347. package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
  348. package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
  349. package/dist/database/migration/20260323234822_events.js +1 -1
  350. package/dist/database/migration/20260410174513_workspace-name.js +1 -1
  351. package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
  352. package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
  353. package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
  354. package/dist/database/migration/20260428004200_add_session_path.js +1 -1
  355. package/dist/database/migration/20260501142318_next_venus.js +1 -1
  356. package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
  357. package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
  358. package/dist/database/migration/20260510033149_session_usage.js +1 -1
  359. package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
  360. package/dist/database/migration/20260511173437_session-metadata.js +1 -1
  361. package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
  362. package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
  363. package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
  364. package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
  365. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
  366. package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
  367. package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
  368. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
  369. package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
  370. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
  371. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
  372. package/dist/database/migration/20260611035744_credential.js +1 -1
  373. package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
  374. package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
  375. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
  376. package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
  377. package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
  378. package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
  379. package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
  380. package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
  381. package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
  382. package/dist/database/migration/20260812181746_session_inbox.js +1 -1
  383. package/dist/database/migration/20260812213948_worktree.js +1 -1
  384. package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
  385. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
  386. package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
  387. package/dist/database/migration.gen.js +48 -48
  388. package/dist/database/migration.js +50 -50
  389. package/dist/database/path.js +2 -2
  390. package/dist/database/schema.gen.js +1 -1
  391. package/dist/database/schema.sql.js +1 -1
  392. package/dist/database/sqlite.bun.js +1 -1
  393. package/dist/database/sqlite.js +1 -1
  394. package/dist/database/sqlite.node.js +1 -1
  395. package/dist/database/sqlite.workerd.js +1 -1
  396. package/dist/database/v1-migration.bun.js +75 -75
  397. package/dist/database/v1-migration.js +1 -1
  398. package/dist/effect/app-node-builder.js +366 -366
  399. package/dist/effect/app-node-platform.js +2 -2
  400. package/dist/effect/keyed-mutex.js +1 -1
  401. package/dist/effect/websocket-constructor.js +1 -1
  402. package/dist/environment/driver.js +1 -1
  403. package/dist/environment/environment.js +92 -92
  404. package/dist/environment/exec-defaults.js +2 -2
  405. package/dist/environment/files.js +1 -1
  406. package/dist/environment/index.js +94 -94
  407. package/dist/environment/local.js +2 -2
  408. package/dist/environment/memory.js +2 -2
  409. package/dist/environment/unavailable.js +1 -1
  410. package/dist/event/sql.js +1 -1
  411. package/dist/event-logger.js +69 -69
  412. package/dist/file-access.js +103 -103
  413. package/dist/file-mutation.js +93 -93
  414. package/dist/file-retention.js +1 -1
  415. package/dist/file.js +1 -1
  416. package/dist/filesystem/fff.bun.js +2 -2
  417. package/dist/filesystem/fff.js +1 -1
  418. package/dist/filesystem/fff.node.js +2 -2
  419. package/dist/filesystem/fff.workerd.js +2 -2
  420. package/dist/filesystem/ignore.js +1 -1
  421. package/dist/filesystem/location-watcher-policy.js +6 -6
  422. package/dist/filesystem/location-watcher.js +226 -226
  423. package/dist/filesystem/protected.js +3 -3
  424. package/dist/filesystem/search.js +102 -102
  425. package/dist/filesystem/watcher-binding.js +3 -3
  426. package/dist/filesystem/watcher.js +15 -15
  427. package/dist/filesystem.js +107 -107
  428. package/dist/form.js +73 -73
  429. package/dist/formatter/builtins.js +4 -4
  430. package/dist/formatter.js +88 -88
  431. package/dist/generate.js +102 -102
  432. package/dist/git.js +6 -6
  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 +98 -98
  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/id/id.js +1 -1
  453. package/dist/image/photon.js +2 -2
  454. package/dist/image.js +6 -6
  455. package/dist/instance/service.js +5 -5
  456. package/dist/instance.js +357 -357
  457. package/dist/instruction-discovery.js +84 -84
  458. package/dist/instructions/builtins.js +86 -86
  459. package/dist/instructions/index.js +3 -3
  460. package/dist/integration/connection.js +1 -1
  461. package/dist/integration.js +79 -79
  462. package/dist/job.js +78 -78
  463. package/dist/kv/sql.js +2 -2
  464. package/dist/kv.js +72 -72
  465. package/dist/location-activity.js +131 -131
  466. package/dist/location-lifecycle.js +105 -105
  467. package/dist/location-mutation.js +103 -103
  468. package/dist/location-service-map.js +85 -85
  469. package/dist/location-services.js +354 -354
  470. package/dist/location.js +80 -80
  471. package/dist/mcp/client.js +90 -90
  472. package/dist/mcp/index.js +107 -107
  473. package/dist/mcp/instructions.js +125 -125
  474. package/dist/mcp/oauth.js +77 -77
  475. package/dist/mcp/stdio.js +89 -89
  476. package/dist/mime.js +1 -1
  477. package/dist/modal/models.js +98 -98
  478. package/dist/model-resolver.js +97 -97
  479. package/dist/model.js +101 -101
  480. package/dist/models-dev.js +100 -100
  481. package/dist/oauth/page.js +1 -1
  482. package/dist/permission/saved.js +79 -79
  483. package/dist/permission/sql.js +5 -5
  484. package/dist/permission.js +112 -112
  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 +85 -85
  488. package/dist/persistent-pty/pty-binding.js +1 -1
  489. package/dist/persistent-pty.js +74 -74
  490. package/dist/plugin/agent.js +103 -103
  491. package/dist/plugin/command.js +100 -100
  492. package/dist/plugin/hooks.js +5 -5
  493. package/dist/plugin/host.js +217 -217
  494. package/dist/plugin/identity.js +3 -3
  495. package/dist/plugin/instance.js +5 -5
  496. package/dist/plugin/internal.js +328 -328
  497. package/dist/plugin/mcp-codemode-exclusion.js +3 -3
  498. package/dist/plugin/models-dev.js +95 -95
  499. package/dist/plugin/module.js +5 -5
  500. package/dist/plugin/optimize.js +2 -2
  501. package/dist/plugin/plan.js +101 -101
  502. package/dist/plugin/promise.js +1 -1
  503. package/dist/plugin/provider/amazon-bedrock.js +89 -89
  504. package/dist/plugin/provider/azure.js +121 -121
  505. package/dist/plugin/provider/cerebras.js +1 -1
  506. package/dist/plugin/provider/cloudflare-ai-gateway.js +120 -120
  507. package/dist/plugin/provider/cloudflare-workers-ai.js +120 -120
  508. package/dist/plugin/provider/cohere.js +2 -2
  509. package/dist/plugin/provider/configured.js +118 -118
  510. package/dist/plugin/provider/digitalocean.js +92 -92
  511. package/dist/plugin/provider/dynamic.js +2 -2
  512. package/dist/plugin/provider/factory.js +1 -1
  513. package/dist/plugin/provider/gateway.js +2 -2
  514. package/dist/plugin/provider/github-copilot.js +92 -92
  515. package/dist/plugin/provider/gitlab.js +90 -90
  516. package/dist/plugin/provider/google-vertex.js +89 -89
  517. package/dist/plugin/provider/kilo.js +1 -1
  518. package/dist/plugin/provider/llmgateway.js +76 -76
  519. package/dist/plugin/provider/lmstudio.js +121 -121
  520. package/dist/plugin/provider/modal.js +91 -91
  521. package/dist/plugin/provider/nvidia.js +1 -1
  522. package/dist/plugin/provider/ollama.js +121 -121
  523. package/dist/plugin/provider/openai.js +91 -91
  524. package/dist/plugin/provider/opencode.js +92 -92
  525. package/dist/plugin/provider/openrouter.js +90 -90
  526. package/dist/plugin/provider/perplexity.js +2 -2
  527. package/dist/plugin/provider/poe.js +77 -77
  528. package/dist/plugin/provider/prompt-cache-key.js +89 -89
  529. package/dist/plugin/provider/sap-ai-core.js +90 -90
  530. package/dist/plugin/provider/sdk-factory.js +1 -1
  531. package/dist/plugin/provider/snowflake-cortex.js +121 -121
  532. package/dist/plugin/provider/venice.js +2 -2
  533. package/dist/plugin/provider/vercel.js +89 -89
  534. package/dist/plugin/provider/vllm.js +119 -119
  535. package/dist/plugin/provider/xai.js +90 -90
  536. package/dist/plugin/provider/zenmux.js +1 -1
  537. package/dist/plugin/provider.js +158 -158
  538. package/dist/plugin/sdk.js +75 -75
  539. package/dist/plugin/service.js +1 -1
  540. package/dist/plugin/skill.js +138 -138
  541. package/dist/plugin/source-directory.js +1 -1
  542. package/dist/plugin/supervisor.js +343 -343
  543. package/dist/plugin/update.js +6 -6
  544. package/dist/plugin/vcs/git.js +85 -85
  545. package/dist/plugin/vcs/hg.js +85 -85
  546. package/dist/plugin/warming.js +120 -120
  547. package/dist/plugin/websearch/exa.js +7 -7
  548. package/dist/plugin/websearch/firecrawl.js +8 -8
  549. package/dist/plugin/websearch/index.js +9 -9
  550. package/dist/plugin/websearch/mcp.js +6 -6
  551. package/dist/plugin/websearch/parallel.js +8 -8
  552. package/dist/plugin/websearch/tavily.js +4 -4
  553. package/dist/plugin/websearch/tinyfish.js +8 -8
  554. package/dist/plugin.js +226 -226
  555. package/dist/project/schema.js +2 -2
  556. package/dist/project/sql.js +4 -4
  557. package/dist/project.js +79 -79
  558. package/dist/provider.js +92 -92
  559. package/dist/pty/protocol.js +1 -1
  560. package/dist/pty/schema.js +3 -3
  561. package/dist/pty/ticket.js +1 -1
  562. package/dist/pty.js +97 -97
  563. package/dist/reference/instructions.js +88 -88
  564. package/dist/reference.js +90 -90
  565. package/dist/repository-cache.js +80 -80
  566. package/dist/repository.js +3 -3
  567. package/dist/ripgrep/binary.js +2 -2
  568. package/dist/ripgrep.js +96 -96
  569. package/dist/rpc.js +85 -85
  570. package/dist/schema.js +1 -1
  571. package/dist/session/command.js +73 -73
  572. package/dist/session/compaction.js +131 -131
  573. package/dist/session/context.js +149 -149
  574. package/dist/session/diff.js +87 -87
  575. package/dist/session/environment.js +5 -5
  576. package/dist/session/error.js +7 -7
  577. package/dist/session/event.js +1 -1
  578. package/dist/session/execution/restart.js +220 -220
  579. package/dist/session/execution.js +127 -127
  580. package/dist/session/generate.js +150 -150
  581. package/dist/session/history.js +15 -15
  582. package/dist/session/inbox.js +89 -89
  583. package/dist/session/info.js +3 -3
  584. package/dist/session/instruction-entry.js +74 -74
  585. package/dist/session/instruction-state.js +8 -8
  586. package/dist/session/instructions.js +96 -96
  587. package/dist/session/message-updater.js +2 -2
  588. package/dist/session/message.js +1 -1
  589. package/dist/session/model-request.js +118 -118
  590. package/dist/session/model-transport.js +9 -9
  591. package/dist/session/move.js +129 -129
  592. package/dist/session/projector.js +85 -85
  593. package/dist/session/prompt.js +104 -104
  594. package/dist/session/provider-context.js +3 -3
  595. package/dist/session/revert.js +89 -89
  596. package/dist/session/run-coordinator.js +3 -3
  597. package/dist/session/runner/index.js +3 -3
  598. package/dist/session/runner/llm.js +228 -228
  599. package/dist/session/runner/max-steps.js +1 -1
  600. package/dist/session/runner/model.js +97 -97
  601. package/dist/session/runner/publish-llm-event.js +3 -3
  602. package/dist/session/runner/retry.js +113 -113
  603. package/dist/session/runner/step.js +123 -123
  604. package/dist/session/runner/to-llm-message.js +2 -2
  605. package/dist/session/schema.js +5 -5
  606. package/dist/session/session.js +169 -169
  607. package/dist/session/shell.js +137 -137
  608. package/dist/session/skill.js +102 -102
  609. package/dist/session/sql.js +5 -5
  610. package/dist/session/stats.js +72 -72
  611. package/dist/session/store.js +84 -84
  612. package/dist/session/subagent-completion.js +1 -1
  613. package/dist/session/subagent-job.js +209 -209
  614. package/dist/session/system-prompt.js +5 -5
  615. package/dist/session/title.js +149 -149
  616. package/dist/session/to-session-error.js +110 -110
  617. package/dist/session/transfer.js +213 -213
  618. package/dist/session/usage.js +1 -1
  619. package/dist/session.js +219 -219
  620. package/dist/shell/parse.js +6 -6
  621. package/dist/shell/result.js +1 -1
  622. package/dist/shell/scan.js +1 -1
  623. package/dist/shell/select.js +15 -15
  624. package/dist/shell.js +139 -139
  625. package/dist/skill/discovery.js +6 -6
  626. package/dist/skill/instructions.js +106 -106
  627. package/dist/skill.js +111 -111
  628. package/dist/snapshot.js +92 -92
  629. package/dist/state.js +1 -1
  630. package/dist/tool/html-markdown.js +1 -1
  631. package/dist/tool/http-body.js +1 -1
  632. package/dist/tool/mcp.js +126 -126
  633. package/dist/tool/plugin/edit.js +119 -119
  634. package/dist/tool/plugin/file-diff.js +1 -1
  635. package/dist/tool/plugin/glob.js +121 -121
  636. package/dist/tool/plugin/grep.js +123 -123
  637. package/dist/tool/plugin/opencode.js +3 -3
  638. package/dist/tool/plugin/patch.js +121 -121
  639. package/dist/tool/plugin/question.js +102 -102
  640. package/dist/tool/plugin/read.js +120 -120
  641. package/dist/tool/plugin/shell.js +216 -216
  642. package/dist/tool/plugin/skill.js +106 -106
  643. package/dist/tool/plugin/subagent.js +218 -218
  644. package/dist/tool/plugin/webfetch.js +111 -111
  645. package/dist/tool/plugin/websearch.js +113 -113
  646. package/dist/tool/plugin/write.js +121 -121
  647. package/dist/tool/read-filesystem.js +99 -99
  648. package/dist/tool/runtime.js +1 -1
  649. package/dist/tool-output.js +8 -8
  650. package/dist/tool.js +12 -12
  651. package/dist/util/error-summary.js +1 -1
  652. package/dist/util/error.js +1 -1
  653. package/dist/util/git-executable.js +2 -2
  654. package/dist/util/iife.js +1 -1
  655. package/dist/util/lazy.js +1 -1
  656. package/dist/util/slug.js +1 -1
  657. package/dist/util/token.js +1 -1
  658. package/dist/util/which.js +1 -1
  659. package/dist/util/wildcard.js +1 -1
  660. package/dist/v1/config/agent.js +7 -7
  661. package/dist/v1/config/attachment.js +4 -4
  662. package/dist/v1/config/command.js +3 -3
  663. package/dist/v1/config/config.js +16 -16
  664. package/dist/v1/config/error.js +4 -4
  665. package/dist/v1/config/formatter.js +7 -7
  666. package/dist/v1/config/layout.js +1 -1
  667. package/dist/v1/config/lsp.js +5 -5
  668. package/dist/v1/config/mcp.js +4 -4
  669. package/dist/v1/config/migrate.js +91 -91
  670. package/dist/v1/config/permission.js +7 -7
  671. package/dist/v1/config/plugin.js +3 -3
  672. package/dist/v1/config/provider-options.js +1 -1
  673. package/dist/v1/config/provider.js +2 -2
  674. package/dist/v1/config/server.js +2 -2
  675. package/dist/v1/config/skills.js +3 -3
  676. package/dist/v1/permission.js +1 -1
  677. package/dist/variant.js +90 -90
  678. package/dist/vcs/patch.js +1 -1
  679. package/dist/vcs.js +88 -88
  680. package/dist/websearch.js +81 -81
  681. package/dist/wellknown/plugin.js +75 -75
  682. package/dist/wellknown.js +80 -80
  683. package/dist/workspace/driver.js +5 -5
  684. package/dist/workspace/sql.js +1 -1
  685. package/dist/workspace.js +77 -77
  686. package/dist/worktree/directory.js +2 -2
  687. package/dist/worktree/git.js +8 -8
  688. package/dist/worktree/sql.js +5 -5
  689. package/dist/worktree/strategies.js +88 -88
  690. package/dist/worktree.js +97 -97
  691. package/package.json +8 -8
  692. package/dist/chunks/project-0f7zcf6t.js +0 -26
  693. package/dist/chunks/project-6kdq0pjd.js +0 -4
  694. package/dist/chunks/project-fge3qzfa.js +0 -478
  695. package/dist/chunks/project-xy587a6s.js +0 -252
  696. /package/dist/chunks/{project-0qkdqm5v.js → model-resolver-0qkdqm5v.js} +0 -0
  697. /package/dist/chunks/{project-0zkw76rk.js → model-resolver-0zkw76rk.js} +0 -0
  698. /package/dist/chunks/{project-17cy0kzp.js → model-resolver-17cy0kzp.js} +0 -0
  699. /package/dist/chunks/{project-1cnp2v09.js → model-resolver-1cnp2v09.js} +0 -0
  700. /package/dist/chunks/{project-1kg9ymc8.js → model-resolver-1kg9ymc8.js} +0 -0
  701. /package/dist/chunks/{project-24dcb14g.js → model-resolver-24dcb14g.js} +0 -0
  702. /package/dist/chunks/{project-2710q6r3.js → model-resolver-2710q6r3.js} +0 -0
  703. /package/dist/chunks/{project-2axfhc9x.js → model-resolver-2axfhc9x.js} +0 -0
  704. /package/dist/chunks/{project-2c3vjs8z.js → model-resolver-2c3vjs8z.js} +0 -0
  705. /package/dist/chunks/{project-359p4xyc.js → model-resolver-359p4xyc.js} +0 -0
  706. /package/dist/chunks/{project-3asan66x.js → model-resolver-3asan66x.js} +0 -0
  707. /package/dist/chunks/{project-3v8g72cx.js → model-resolver-3v8g72cx.js} +0 -0
  708. /package/dist/chunks/{project-3w5fmr99.js → model-resolver-3w5fmr99.js} +0 -0
  709. /package/dist/chunks/{project-3wcehsnq.js → model-resolver-3wcehsnq.js} +0 -0
  710. /package/dist/chunks/{project-43n2bw4t.js → model-resolver-43n2bw4t.js} +0 -0
  711. /package/dist/chunks/{project-4knz6hnm.js → model-resolver-4knz6hnm.js} +0 -0
  712. /package/dist/chunks/{project-4vcrnpx2.js → model-resolver-4vcrnpx2.js} +0 -0
  713. /package/dist/chunks/{project-4y7fprxs.js → model-resolver-4y7fprxs.js} +0 -0
  714. /package/dist/chunks/{project-53557ph1.js → model-resolver-53557ph1.js} +0 -0
  715. /package/dist/chunks/{project-550bvhaj.js → model-resolver-550bvhaj.js} +0 -0
  716. /package/dist/chunks/{project-6prwharc.js → model-resolver-6prwharc.js} +0 -0
  717. /package/dist/chunks/{project-7akdwqpd.js → model-resolver-7akdwqpd.js} +0 -0
  718. /package/dist/chunks/{project-7m9af43g.js → model-resolver-7m9af43g.js} +0 -0
  719. /package/dist/chunks/{project-822emrt2.js → model-resolver-822emrt2.js} +0 -0
  720. /package/dist/chunks/{project-88xbtdfr.js → model-resolver-88xbtdfr.js} +0 -0
  721. /package/dist/chunks/{project-8n3pysct.js → model-resolver-8n3pysct.js} +0 -0
  722. /package/dist/chunks/{project-922hggd3.js → model-resolver-922hggd3.js} +0 -0
  723. /package/dist/chunks/{project-9a4afbnw.js → model-resolver-9a4afbnw.js} +0 -0
  724. /package/dist/chunks/{project-9rqn6x4v.js → model-resolver-9rqn6x4v.js} +0 -0
  725. /package/dist/chunks/{project-a6k6eb26.js → model-resolver-a6k6eb26.js} +0 -0
  726. /package/dist/chunks/{project-af5trqkr.js → model-resolver-af5trqkr.js} +0 -0
  727. /package/dist/chunks/{project-afrmfg78.js → model-resolver-afrmfg78.js} +0 -0
  728. /package/dist/chunks/{project-aqzs7mqg.js → model-resolver-aqzs7mqg.js} +0 -0
  729. /package/dist/chunks/{project-atq7p7m5.js → model-resolver-atq7p7m5.js} +0 -0
  730. /package/dist/chunks/{project-bkyjaxrp.js → model-resolver-bkyjaxrp.js} +0 -0
  731. /package/dist/chunks/{project-bmr6ed5q.js → model-resolver-bmr6ed5q.js} +0 -0
  732. /package/dist/chunks/{project-cf4snx6d.js → model-resolver-cf4snx6d.js} +0 -0
  733. /package/dist/chunks/{project-cvy3z8tj.js → model-resolver-cvy3z8tj.js} +0 -0
  734. /package/dist/chunks/{project-d9fn303g.js → model-resolver-d9fn303g.js} +0 -0
  735. /package/dist/chunks/{project-d9jj8t3e.js → model-resolver-d9jj8t3e.js} +0 -0
  736. /package/dist/chunks/{project-dajrwvna.js → model-resolver-dajrwvna.js} +0 -0
  737. /package/dist/chunks/{project-dap0rakb.js → model-resolver-dap0rakb.js} +0 -0
  738. /package/dist/chunks/{project-df08tz66.js → model-resolver-df08tz66.js} +0 -0
  739. /package/dist/chunks/{project-dy18nga0.js → model-resolver-dy18nga0.js} +0 -0
  740. /package/dist/chunks/{project-e5kj55wp.js → model-resolver-e5kj55wp.js} +0 -0
  741. /package/dist/chunks/{project-e73j6tqm.js → model-resolver-e73j6tqm.js} +0 -0
  742. /package/dist/chunks/{project-ec1grn59.js → model-resolver-ec1grn59.js} +0 -0
  743. /package/dist/chunks/{project-eh3zwz77.js → model-resolver-eh3zwz77.js} +0 -0
  744. /package/dist/chunks/{project-emrn6kk6.js → model-resolver-emrn6kk6.js} +0 -0
  745. /package/dist/chunks/{project-f0mxakyp.js → model-resolver-f0mxakyp.js} +0 -0
  746. /package/dist/chunks/{project-f6n9ztr4.js → model-resolver-f6n9ztr4.js} +0 -0
  747. /package/dist/chunks/{project-faypxj3z.js → model-resolver-faypxj3z.js} +0 -0
  748. /package/dist/chunks/{project-fd410y7t.js → model-resolver-fd410y7t.js} +0 -0
  749. /package/dist/chunks/{project-fxgpk5d8.js → model-resolver-fxgpk5d8.js} +0 -0
  750. /package/dist/chunks/{project-g4wezp1m.js → model-resolver-g4wezp1m.js} +0 -0
  751. /package/dist/chunks/{project-g86h250q.js → model-resolver-g86h250q.js} +0 -0
  752. /package/dist/chunks/{project-gebd4c9n.js → model-resolver-gebd4c9n.js} +0 -0
  753. /package/dist/chunks/{project-gftt206x.js → model-resolver-gftt206x.js} +0 -0
  754. /package/dist/chunks/{project-hjbc5kem.js → model-resolver-hjbc5kem.js} +0 -0
  755. /package/dist/chunks/{project-hk9envan.js → model-resolver-hk9envan.js} +0 -0
  756. /package/dist/chunks/{project-j2ntwpah.js → model-resolver-j2ntwpah.js} +0 -0
  757. /package/dist/chunks/{project-j5zkgpj8.js → model-resolver-j5zkgpj8.js} +0 -0
  758. /package/dist/chunks/{project-jjkms2e6.js → model-resolver-jjkms2e6.js} +0 -0
  759. /package/dist/chunks/{project-jr7sbwjy.js → model-resolver-jr7sbwjy.js} +0 -0
  760. /package/dist/chunks/{project-jwfs4k6c.js → model-resolver-jwfs4k6c.js} +0 -0
  761. /package/dist/chunks/{project-jzg6c2d5.js → model-resolver-jzg6c2d5.js} +0 -0
  762. /package/dist/chunks/{project-mp448xyj.js → model-resolver-mp448xyj.js} +0 -0
  763. /package/dist/chunks/{project-msx8hqn2.js → model-resolver-msx8hqn2.js} +0 -0
  764. /package/dist/chunks/{project-n05xt0ee.js → model-resolver-n05xt0ee.js} +0 -0
  765. /package/dist/chunks/{project-n3j8tn72.js → model-resolver-n3j8tn72.js} +0 -0
  766. /package/dist/chunks/{project-njntx4h6.js → model-resolver-njntx4h6.js} +0 -0
  767. /package/dist/chunks/{project-q3sfg36h.js → model-resolver-q3sfg36h.js} +0 -0
  768. /package/dist/chunks/{project-q74kybfr.js → model-resolver-q74kybfr.js} +0 -0
  769. /package/dist/chunks/{project-qaymkmh1.js → model-resolver-qaymkmh1.js} +0 -0
  770. /package/dist/chunks/{project-qb87gjwd.js → model-resolver-qb87gjwd.js} +0 -0
  771. /package/dist/chunks/{project-qfa1cgps.js → model-resolver-qfa1cgps.js} +0 -0
  772. /package/dist/chunks/{project-qg3g05ea.js → model-resolver-qg3g05ea.js} +0 -0
  773. /package/dist/chunks/{project-qrg20bc0.js → model-resolver-qrg20bc0.js} +0 -0
  774. /package/dist/chunks/{project-rcb2kzg1.js → model-resolver-rcb2kzg1.js} +0 -0
  775. /package/dist/chunks/{project-sdp7kfr6.js → model-resolver-sdp7kfr6.js} +0 -0
  776. /package/dist/chunks/{project-sk3qaz4a.js → model-resolver-sk3qaz4a.js} +0 -0
  777. /package/dist/chunks/{project-ssg3fenm.js → model-resolver-ssg3fenm.js} +0 -0
  778. /package/dist/chunks/{project-twg0f83k.js → model-resolver-twg0f83k.js} +0 -0
  779. /package/dist/chunks/{project-w803qqfp.js → model-resolver-w803qqfp.js} +0 -0
  780. /package/dist/chunks/{project-wc3fc9cn.js → model-resolver-wc3fc9cn.js} +0 -0
  781. /package/dist/chunks/{project-wer8tq1h.js → model-resolver-wer8tq1h.js} +0 -0
  782. /package/dist/chunks/{project-wtztk69x.js → model-resolver-wtztk69x.js} +0 -0
  783. /package/dist/chunks/{project-x0ckcb58.js → model-resolver-x0ckcb58.js} +0 -0
  784. /package/dist/chunks/{project-x61499pn.js → model-resolver-x61499pn.js} +0 -0
  785. /package/dist/chunks/{project-y44na4kk.js → model-resolver-y44na4kk.js} +0 -0
  786. /package/dist/chunks/{project-y8cydn3q.js → model-resolver-y8cydn3q.js} +0 -0
  787. /package/dist/chunks/{project-y8f7s663.js → model-resolver-y8f7s663.js} +0 -0
  788. /package/dist/chunks/{project-ygaqb7jw.js → model-resolver-ygaqb7jw.js} +0 -0
  789. /package/dist/chunks/{project-ym463w8f.js → model-resolver-ym463w8f.js} +0 -0
  790. /package/dist/chunks/{project-z9919s4g.js → model-resolver-z9919s4g.js} +0 -0
@@ -1,27 +1,36 @@
1
1
  import {
2
2
  Service82,
3
3
  node86
4
- } from "./project-q7s34kns.js";
4
+ } from "./model-resolver-akv0dm8z.js";
5
5
  import {
6
6
  shutdown2,
7
7
  create3
8
- } from "./project-rdw6cm16.js";
8
+ } from "./model-resolver-rdw6cm16.js";
9
9
  import {
10
10
  ID14,
11
- Service75,
12
- node79,
11
+ Service76,
12
+ node80,
13
13
  Event18
14
- } from "./project-g5jdgkja.js";
14
+ } from "./model-resolver-32n3v4ks.js";
15
15
  import {
16
16
  key2
17
- } from "./project-h6r3nrb9.js";
17
+ } from "./model-resolver-h6r3nrb9.js";
18
18
  import {
19
19
  Service79,
20
20
  node83
21
- } from "./project-tmwvyjej.js";
21
+ } from "./model-resolver-4tvste0q.js";
22
22
  import {
23
23
  __export
24
- } from "./project-9rqn6x4v.js";
24
+ } from "./model-resolver-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";
25
34
 
26
35
  // src/provider.ts
27
36
  var exports_provider3 = {};
@@ -33,7 +42,7 @@ __export(exports_provider3, {
33
42
  LoadError: () => LoadError3,
34
43
  Provider: () => exports_provider3,
35
44
  Request: () => Request3,
36
- Service: () => Service74,
45
+ Service: () => Service75,
37
46
  Settings: () => Settings2,
38
47
  aisdk: () => aisdk2,
39
48
  isAISDK: () => isAISDK2,
@@ -41,10 +50,10 @@ __export(exports_provider3, {
41
50
  mergeHeaders: () => mergeHeaders2,
42
51
  mergeOverlay: () => mergeOverlay2,
43
52
  nativeSettings: () => nativeSettings2,
44
- node: () => node78,
53
+ node: () => node79,
45
54
  packageName: () => packageName2
46
55
  });
47
- import { Context, Effect as Effect2, Layer, Schema as Schema2, Stream, Struct as Struct2 } from "effect";
56
+ import { Context, Effect, Layer, Schema, Stream, Struct } from "effect";
48
57
  import { Provider } from "@opencode/schema/provider";
49
58
  import { Model } from "@opencode/schema/model";
50
59
  import { makeLocationNode } from "@opencode/util/effect/app-node";
@@ -52,253 +61,6 @@ import { isRecord } from "@opencode/ai/utils/record";
52
61
  import { importModule, resolveModule } from "@opencode/util/runtime-import";
53
62
  import { Credential } from "@opencode/schema/credential";
54
63
  import { freeze } from "immer";
55
-
56
- // src/aisdk-native.ts
57
- var exports_aisdk_native = {};
58
- __export(exports_aisdk_native, {
59
- AISDKNative: () => exports_aisdk_native,
60
- native: () => native2,
61
- rewrite: () => rewrite2
62
- });
63
- import { Effect, Option, Schema, Struct } from "effect";
64
- function rewrite2(target, input) {
65
- if (input.specifier === undefined)
66
- return;
67
- const plain = resolve(input.specifier, input);
68
- if (!plain)
69
- return;
70
- const settings = decode(target.settings ?? {});
71
- const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
72
- const translated = options(replacement, input.modelID, settings);
73
- if (target.package !== undefined || replacement !== input.specifier)
74
- target.package = replacement;
75
- target.settings = target.settings === undefined ? undefined : {
76
- ...translated.settings,
77
- ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
78
- };
79
- target.headers = mergeHeaders2(translated.headers, target.headers);
80
- target.body = mergeOverlay2(translated.body, target.body);
81
- target.variants = target.variants?.map((variant) => {
82
- const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
83
- const headers = mergeHeaders2(overlay.headers, variant.headers);
84
- const body = mergeOverlay2(overlay.body, variant.body);
85
- return {
86
- id: variant.id,
87
- ...variant.settings === undefined ? {} : { settings: overlay.settings },
88
- ...headers === undefined ? {} : { headers },
89
- ...body === undefined ? {} : { body }
90
- };
91
- });
92
- }
93
- var PACKAGES = {
94
- "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
95
- "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
96
- "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
97
- "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
98
- "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
99
- "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
100
- "@ai-sdk/google": "@opencode/ai/providers/google",
101
- "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
102
- "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
103
- "@ai-sdk/groq": "@opencode/ai/providers/groq",
104
- "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
105
- "@ai-sdk/openai": "@opencode/ai/providers/openai",
106
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
107
- "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
108
- "@ai-sdk/xai": "@opencode/ai/providers/xai",
109
- "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
110
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
111
- };
112
- var protocols = (name) => ({
113
- "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
114
- "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
115
- "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
116
- });
117
- var HOSTS = {
118
- alibaba: protocols("alibaba"),
119
- "alibaba-cn": protocols("alibaba"),
120
- "alibaba-coding-plan": protocols("alibaba"),
121
- "alibaba-coding-plan-cn": protocols("alibaba"),
122
- "alibaba-token-plan": protocols("alibaba"),
123
- "alibaba-token-plan-cn": protocols("alibaba"),
124
- baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
125
- "cloudflare-ai-gateway": {
126
- "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
127
- "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
128
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
129
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
130
- },
131
- "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
132
- deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
133
- "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
134
- "google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
135
- "kimi-for-coding": protocols("moonshot"),
136
- meta: protocols("meta"),
137
- minimax: protocols("minimax"),
138
- "minimax-cn": protocols("minimax"),
139
- "minimax-coding-plan": protocols("minimax"),
140
- "minimax-cn-coding-plan": protocols("minimax"),
141
- moonshotai: protocols("moonshot"),
142
- "moonshotai-cn": protocols("moonshot"),
143
- zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
144
- "zai-coding-plan": protocols("zai-coding-plan"),
145
- zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
146
- "zhipuai-coding-plan": protocols("zai-coding-plan")
147
- };
148
- var NATIVE = new Set([
149
- ...Object.values(PACKAGES),
150
- ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
151
- "@opencode/ai/providers/azure/chat",
152
- "@opencode/ai/providers/amazon-bedrock/mantle",
153
- "@opencode/ai/providers/amazon-bedrock/mantle/chat",
154
- "@opencode/ai/providers/amazon-bedrock/mantle/responses"
155
- ]);
156
- function native2(npm, context) {
157
- const host = HOSTS[context.providerID]?.[npm];
158
- if (host)
159
- return host;
160
- if (npm === "@ai-sdk/amazon-bedrock/mantle")
161
- return mantle(context.modelID);
162
- if (npm === "@ai-sdk/azure" && context.settings?.useCompletionUrls === true)
163
- return "@opencode/ai/providers/azure/chat";
164
- return PACKAGES[npm];
165
- }
166
- var mantle = (modelID) => {
167
- if (modelID === undefined)
168
- return "@opencode/ai/providers/amazon-bedrock/mantle";
169
- return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
170
- };
171
- function resolve(specifier, context) {
172
- const npm = packageName2(specifier);
173
- if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
174
- return native2(npm, context);
175
- if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
176
- return mantle(context.modelID);
177
- if (npm === "@opencode/ai/providers/azure/responses" && context.settings?.useCompletionUrls === true)
178
- return "@opencode/ai/providers/azure/chat";
179
- return NATIVE.has(npm) ? npm : undefined;
180
- }
181
- function options(replacement, modelID, settings) {
182
- const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
183
- const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
184
- return {
185
- settings: replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
186
- ...settings.headers === undefined ? {} : { headers: settings.headers },
187
- ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
188
- ...converse ? bedrockRequest(modelID, settings) : {},
189
- ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
190
- };
191
- }
192
- var BEDROCK_KEYS = [
193
- "bearerToken",
194
- "endpoint",
195
- "credentials",
196
- "credentialProvider",
197
- "accessKeyId",
198
- "secretAccessKey",
199
- "sessionToken"
200
- ];
201
- var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
202
- function bedrockSettings(settings, converse) {
203
- const region = settings.region ?? settings.credentials?.region;
204
- const credentials = settings.credentials ?? settings;
205
- const baseURL = settings.baseURL ?? settings.endpoint;
206
- return {
207
- ...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
208
- ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
209
- ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
210
- ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
211
- credentials: {
212
- ...region === undefined ? {} : { region },
213
- accessKeyId: credentials.accessKeyId,
214
- secretAccessKey: credentials.secretAccessKey,
215
- ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
216
- }
217
- }
218
- };
219
- }
220
- function bedrockRequest(modelID, settings) {
221
- const additional = settings.additionalModelRequestFields ?? {};
222
- const reasoning = settings.reasoningConfig;
223
- const anthropic = modelID?.includes("anthropic") ?? false;
224
- const openai = modelID?.includes("openai.") ?? false;
225
- const harmony = modelID?.includes("openai.gpt-oss") ?? false;
226
- const effort = reasoning?.maxReasoningEffort;
227
- const type = reasoning?.type;
228
- const budget = reasoning?.budgetTokens;
229
- const display = reasoning?.display;
230
- const betas = settings.anthropicBeta ?? [];
231
- const fields = mergeOverlay2(additional, {
232
- ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
233
- ...anthropic && type === "enabled" && budget !== undefined ? { thinking: { type: "enabled", budget_tokens: budget } } : {},
234
- ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
235
- ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
236
- ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
237
- ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
238
- ...!anthropic && !openai && effort !== undefined ? {
239
- reasoningConfig: {
240
- ...type === undefined || type === "adaptive" ? {} : { type },
241
- ...budget === undefined ? {} : { budgetTokens: budget },
242
- maxReasoningEffort: effort
243
- }
244
- } : {}
245
- });
246
- const body = {
247
- ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
248
- ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
249
- };
250
- return Object.keys(body).length === 0 ? {} : { body };
251
- }
252
- var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
253
- function openRouterRequest(settings) {
254
- const headers = mergeHeaders2({
255
- ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
256
- ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
257
- ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
258
- }, settings.headers) ?? {};
259
- return Object.keys(headers).length === 0 ? {} : { headers };
260
- }
261
- var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
262
- var Credentials = Schema.Struct({
263
- accessKeyId: Schema.String,
264
- secretAccessKey: Schema.String,
265
- sessionToken: lenient(Schema.String),
266
- region: lenient(Schema.String)
267
- });
268
- var Legacy = Schema.StructWithRest(Schema.Struct({
269
- apiKey: lenient(Schema.String),
270
- baseURL: lenient(Schema.String),
271
- headers: lenient(Schema.Record(Schema.String, Schema.String)),
272
- extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
273
- useCompletionUrls: lenient(Schema.Boolean),
274
- auth: lenient(Schema.Literals(["bearer", "sigv4"])),
275
- bearerToken: lenient(Schema.String),
276
- endpoint: lenient(Schema.String),
277
- region: lenient(Schema.String),
278
- credentials: lenient(Credentials),
279
- accessKeyId: lenient(Schema.String),
280
- secretAccessKey: lenient(Schema.String),
281
- sessionToken: lenient(Schema.String),
282
- anthropicBeta: lenient(Schema.Array(Schema.String)),
283
- serviceTier: lenient(Schema.String),
284
- reasoningConfig: lenient(Schema.Struct({
285
- type: lenient(Schema.String),
286
- display: lenient(Schema.String),
287
- maxReasoningEffort: lenient(Schema.String),
288
- budgetTokens: lenient(Schema.Number)
289
- })),
290
- additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
291
- anthropic_beta: lenient(Schema.Array(Schema.String)),
292
- output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
293
- reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
294
- }), [Schema.Record(Schema.String, Schema.Unknown)])),
295
- appName: lenient(Schema.String),
296
- appUrl: lenient(Schema.String),
297
- api_keys: lenient(Schema.Record(Schema.String, Schema.String))
298
- }), [Schema.Record(Schema.String, Schema.Unknown)]);
299
- var decode = Schema.decodeUnknownSync(Legacy);
300
-
301
- // src/provider.ts
302
64
  import { Event as Event17 } from "@opencode/schema/provider";
303
65
  var ID13 = Provider.ID;
304
66
  var AISDK_PREFIX2 = "aisdk:";
@@ -311,12 +73,12 @@ function packageName2(value) {
311
73
  return value;
312
74
  return value.slice(AISDK_PREFIX2.length);
313
75
  }
314
- var JsonRecord = Schema2.Record(Schema2.String, Schema2.Json);
315
- var decodeJsonRecord = Schema2.decodeUnknownSync(JsonRecord);
76
+ var JsonRecord = Schema.Record(Schema.String, Schema.Json);
77
+ var decodeJsonRecord = Schema.decodeUnknownSync(JsonRecord);
316
78
 
317
- class LoadError3 extends Schema2.TaggedError()("Provider.LoadError", {
318
- package: Schema2.String,
319
- cause: Schema2.Defect()
79
+ class LoadError3 extends Schema.TaggedError()("Provider.LoadError", {
80
+ package: Schema.String,
81
+ cause: Schema.Defect()
320
82
  }) {
321
83
  }
322
84
  var packages = new Map;
@@ -377,12 +139,12 @@ var builtins = new Map([
377
139
  () => import("@opencode/ai/providers/zai-coding-plan/responses")
378
140
  ]
379
141
  ]);
380
- var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
142
+ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
381
143
  const specifier = packageName2(input);
382
144
  const builtin = builtins.get(specifier);
383
145
  if (builtin)
384
146
  return yield* importPackage(specifier, specifier, builtin);
385
- const resolved = yield* Effect2.sync(() => {
147
+ const resolved = yield* Effect.sync(() => {
386
148
  if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
387
149
  return specifier;
388
150
  try {
@@ -401,8 +163,8 @@ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
401
163
  }
402
164
  const parts = specifier.split("/");
403
165
  const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
404
- const installed = yield* npm.add(root).pipe(Effect2.mapError((cause) => new LoadError3({ package: specifier, cause })));
405
- const entrypoint = yield* Effect2.try({
166
+ const installed = yield* npm.add(root).pipe(Effect.mapError((cause) => new LoadError3({ package: specifier, cause })));
167
+ const entrypoint = yield* Effect.try({
406
168
  try: () => resolveModule(specifier, installed.directory),
407
169
  catch: (cause) => new LoadError3({ package: specifier, cause })
408
170
  });
@@ -410,7 +172,7 @@ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
410
172
  });
411
173
  var TRANSPORT_KEYS = ["chunkTimeout", "fetch", "timeout"];
412
174
  function nativeSettings2(settings) {
413
- return Struct2.omit(settings, TRANSPORT_KEYS);
175
+ return Struct.omit(settings, TRANSPORT_KEYS);
414
176
  }
415
177
  function mergeOverlay2(base, overlay) {
416
178
  if (base === undefined)
@@ -441,7 +203,7 @@ var Request3 = Provider.Request;
441
203
  var Settings2 = Provider.Settings;
442
204
  var Info27 = Provider.Info;
443
205
 
444
- class Service74 extends Context.Service()("@opencode/Provider") {
206
+ class Service75 extends Context.Service()("@opencode/Provider") {
445
207
  }
446
208
  var definitions = new WeakMap;
447
209
  function index(providerID, models) {
@@ -454,9 +216,9 @@ function index(providerID, models) {
454
216
  definitions.set(models, indexes);
455
217
  return result;
456
218
  }
457
- var layer = Layer.effect(Service74, Effect2.gen(function* () {
219
+ var layer = Layer.effect(Service75, Effect.gen(function* () {
458
220
  const bus = yield* Service82;
459
- const integrations = yield* Service75;
221
+ const integrations = yield* Service76;
460
222
  const location = yield* Service79;
461
223
  const state = create3({
462
224
  name: "provider",
@@ -536,9 +298,9 @@ var layer = Layer.effect(Service74, Effect2.gen(function* () {
536
298
  },
537
299
  notify: () => notify
538
300
  });
539
- yield* Effect2.addFinalizer(() => shutdown2(state.reload()));
301
+ yield* Effect.addFinalizer(() => shutdown2(state.reload()));
540
302
  let cached;
541
- const snapshot = Effect2.fn("Provider.snapshot")(function* () {
303
+ const snapshot = Effect.fn("Provider.snapshot")(function* () {
542
304
  while (true) {
543
305
  const revision = integrations.revision();
544
306
  const records = state.get();
@@ -566,7 +328,7 @@ var layer = Layer.effect(Service74, Effect2.gen(function* () {
566
328
  }
567
329
  });
568
330
  let published;
569
- const notify = Effect2.gen(function* () {
331
+ const notify = Effect.gen(function* () {
570
332
  const value = yield* snapshot();
571
333
  if (value === published)
572
334
  return;
@@ -575,19 +337,19 @@ var layer = Layer.effect(Service74, Effect2.gen(function* () {
575
337
  location: { directory: location.directory, workspaceID: location.workspaceID }
576
338
  });
577
339
  });
578
- yield* bus.subscribe([Event18.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect2.forkScoped({ startImmediately: true }));
579
- return Service74.of({
340
+ yield* bus.subscribe([Event18.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect.forkScoped({ startImmediately: true }));
341
+ return Service75.of({
580
342
  transform: state.transform,
581
343
  reload: state.reload,
582
- get: Effect2.fn("Provider.get")((id) => Effect2.sync(() => freeze(state.get().get(id)?.provider, true))),
583
- all: Effect2.fn("Provider.all")(() => Effect2.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
584
- available: Effect2.fn("Provider.available")(() => snapshot().pipe(Effect2.map((value) => value.providers))),
344
+ get: Effect.fn("Provider.get")((id) => Effect.sync(() => freeze(state.get().get(id)?.provider, true))),
345
+ all: Effect.fn("Provider.all")(() => Effect.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
346
+ available: Effect.fn("Provider.available")(() => snapshot().pipe(Effect.map((value) => value.providers))),
585
347
  snapshot
586
348
  });
587
349
  }));
588
- var node78 = makeLocationNode({ service: Service74, layer, deps: [node86, node79, node83] });
589
- var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
590
- const module = yield* Effect2.tryPromise({
350
+ var node79 = makeLocationNode({ service: Service75, layer, deps: [node86, node80, node83] });
351
+ var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
352
+ const module = yield* Effect.tryPromise({
591
353
  try: () => {
592
354
  const existing = packages.get(entrypoint);
593
355
  if (existing)
@@ -607,4 +369,242 @@ var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, e
607
369
  return module;
608
370
  });
609
371
 
610
- export { ID13, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, mergeOverlay2, mergeHeaders2, Request3, Settings2, Info27, Service74, node78, exports_provider3, Event17, rewrite2, native2, exports_aisdk_native };
372
+ // src/aisdk-native.ts
373
+ function rewrite2(target, input) {
374
+ if (input.specifier === undefined)
375
+ return;
376
+ const plain = resolve(input.specifier, input);
377
+ if (!plain)
378
+ return;
379
+ const settings = decode(target.settings ?? {});
380
+ const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
381
+ const translated = options(replacement, input.modelID, settings);
382
+ if (target.package !== undefined || replacement !== input.specifier)
383
+ target.package = replacement;
384
+ target.settings = target.settings === undefined ? undefined : {
385
+ ...translated.settings,
386
+ ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
387
+ };
388
+ target.headers = mergeHeaders2(translated.headers, target.headers);
389
+ target.body = mergeOverlay2(translated.body, target.body);
390
+ target.variants = target.variants?.map((variant) => {
391
+ const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
392
+ const headers = mergeHeaders2(overlay.headers, variant.headers);
393
+ const body = mergeOverlay2(overlay.body, variant.body);
394
+ return {
395
+ id: variant.id,
396
+ ...variant.settings === undefined ? {} : { settings: overlay.settings },
397
+ ...headers === undefined ? {} : { headers },
398
+ ...body === undefined ? {} : { body }
399
+ };
400
+ });
401
+ }
402
+ var PACKAGES = {
403
+ "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
404
+ "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
405
+ "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
406
+ "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
407
+ "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
408
+ "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
409
+ "@ai-sdk/google": "@opencode/ai/providers/google",
410
+ "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
411
+ "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
412
+ "@ai-sdk/groq": "@opencode/ai/providers/groq",
413
+ "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
414
+ "@ai-sdk/openai": "@opencode/ai/providers/openai",
415
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
416
+ "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
417
+ "@ai-sdk/xai": "@opencode/ai/providers/xai",
418
+ "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
419
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
420
+ };
421
+ var protocols = (name) => ({
422
+ "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
423
+ "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
424
+ "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
425
+ });
426
+ var HOSTS = {
427
+ alibaba: protocols("alibaba"),
428
+ "alibaba-cn": protocols("alibaba"),
429
+ "alibaba-coding-plan": protocols("alibaba"),
430
+ "alibaba-coding-plan-cn": protocols("alibaba"),
431
+ "alibaba-token-plan": protocols("alibaba"),
432
+ "alibaba-token-plan-cn": protocols("alibaba"),
433
+ baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
434
+ "cloudflare-ai-gateway": {
435
+ "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
436
+ "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
437
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
438
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
439
+ },
440
+ "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
441
+ deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
442
+ "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
443
+ "google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
444
+ "kimi-for-coding": protocols("moonshot"),
445
+ meta: protocols("meta"),
446
+ minimax: protocols("minimax"),
447
+ "minimax-cn": protocols("minimax"),
448
+ "minimax-coding-plan": protocols("minimax"),
449
+ "minimax-cn-coding-plan": protocols("minimax"),
450
+ moonshotai: protocols("moonshot"),
451
+ "moonshotai-cn": protocols("moonshot"),
452
+ zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
453
+ "zai-coding-plan": protocols("zai-coding-plan"),
454
+ zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
455
+ "zhipuai-coding-plan": protocols("zai-coding-plan")
456
+ };
457
+ var NATIVE = new Set([
458
+ ...Object.values(PACKAGES),
459
+ ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
460
+ "@opencode/ai/providers/azure/chat",
461
+ "@opencode/ai/providers/amazon-bedrock/mantle",
462
+ "@opencode/ai/providers/amazon-bedrock/mantle/chat",
463
+ "@opencode/ai/providers/amazon-bedrock/mantle/responses"
464
+ ]);
465
+ function native2(npm, context) {
466
+ const host = HOSTS[context.providerID]?.[npm];
467
+ if (host)
468
+ return host;
469
+ if (npm === "@ai-sdk/amazon-bedrock/mantle")
470
+ return mantle(context.modelID);
471
+ if (npm === "@ai-sdk/azure" && context.settings?.useCompletionUrls === true)
472
+ return "@opencode/ai/providers/azure/chat";
473
+ return PACKAGES[npm];
474
+ }
475
+ var mantle = (modelID) => {
476
+ if (modelID === undefined)
477
+ return "@opencode/ai/providers/amazon-bedrock/mantle";
478
+ return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
479
+ };
480
+ function resolve(specifier, context) {
481
+ const npm = packageName2(specifier);
482
+ if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
483
+ return native2(npm, context);
484
+ if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
485
+ return mantle(context.modelID);
486
+ if (npm === "@opencode/ai/providers/azure/responses" && context.settings?.useCompletionUrls === true)
487
+ return "@opencode/ai/providers/azure/chat";
488
+ return NATIVE.has(npm) ? npm : undefined;
489
+ }
490
+ function options(replacement, modelID, settings) {
491
+ const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
492
+ const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
493
+ return {
494
+ settings: replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
495
+ ...settings.headers === undefined ? {} : { headers: settings.headers },
496
+ ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
497
+ ...converse ? bedrockRequest(modelID, settings) : {},
498
+ ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
499
+ };
500
+ }
501
+ var BEDROCK_KEYS = [
502
+ "bearerToken",
503
+ "endpoint",
504
+ "credentials",
505
+ "credentialProvider",
506
+ "accessKeyId",
507
+ "secretAccessKey",
508
+ "sessionToken"
509
+ ];
510
+ var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
511
+ function bedrockSettings(settings, converse) {
512
+ const region = settings.region ?? settings.credentials?.region;
513
+ const credentials = settings.credentials ?? settings;
514
+ const baseURL = settings.baseURL ?? settings.endpoint;
515
+ return {
516
+ ...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
517
+ ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
518
+ ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
519
+ ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
520
+ credentials: {
521
+ ...region === undefined ? {} : { region },
522
+ accessKeyId: credentials.accessKeyId,
523
+ secretAccessKey: credentials.secretAccessKey,
524
+ ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
525
+ }
526
+ }
527
+ };
528
+ }
529
+ function bedrockRequest(modelID, settings) {
530
+ const additional = settings.additionalModelRequestFields ?? {};
531
+ const reasoning = settings.reasoningConfig;
532
+ const anthropic = modelID?.includes("anthropic") ?? false;
533
+ const openai = modelID?.includes("openai.") ?? false;
534
+ const harmony = modelID?.includes("openai.gpt-oss") ?? false;
535
+ const effort = reasoning?.maxReasoningEffort;
536
+ const type = reasoning?.type;
537
+ const budget = reasoning?.budgetTokens;
538
+ const display = reasoning?.display;
539
+ const betas = settings.anthropicBeta ?? [];
540
+ const fields = mergeOverlay2(additional, {
541
+ ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
542
+ ...anthropic && type === "enabled" && budget !== undefined ? { thinking: { type: "enabled", budget_tokens: budget } } : {},
543
+ ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
544
+ ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
545
+ ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
546
+ ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
547
+ ...!anthropic && !openai && effort !== undefined ? {
548
+ reasoningConfig: {
549
+ ...type === undefined || type === "adaptive" ? {} : { type },
550
+ ...budget === undefined ? {} : { budgetTokens: budget },
551
+ maxReasoningEffort: effort
552
+ }
553
+ } : {}
554
+ });
555
+ const body = {
556
+ ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
557
+ ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
558
+ };
559
+ return Object.keys(body).length === 0 ? {} : { body };
560
+ }
561
+ var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
562
+ function openRouterRequest(settings) {
563
+ const headers = mergeHeaders2({
564
+ ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
565
+ ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
566
+ ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
567
+ }, settings.headers) ?? {};
568
+ return Object.keys(headers).length === 0 ? {} : { headers };
569
+ }
570
+ var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option.some(undefined)))));
571
+ var Credentials = Schema2.Struct({
572
+ accessKeyId: Schema2.String,
573
+ secretAccessKey: Schema2.String,
574
+ sessionToken: lenient(Schema2.String),
575
+ region: lenient(Schema2.String)
576
+ });
577
+ var Legacy = Schema2.StructWithRest(Schema2.Struct({
578
+ apiKey: lenient(Schema2.String),
579
+ baseURL: lenient(Schema2.String),
580
+ headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
581
+ extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
582
+ useCompletionUrls: lenient(Schema2.Boolean),
583
+ auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
584
+ bearerToken: lenient(Schema2.String),
585
+ endpoint: lenient(Schema2.String),
586
+ region: lenient(Schema2.String),
587
+ credentials: lenient(Credentials),
588
+ accessKeyId: lenient(Schema2.String),
589
+ secretAccessKey: lenient(Schema2.String),
590
+ sessionToken: lenient(Schema2.String),
591
+ anthropicBeta: lenient(Schema2.Array(Schema2.String)),
592
+ serviceTier: lenient(Schema2.String),
593
+ reasoningConfig: lenient(Schema2.Struct({
594
+ type: lenient(Schema2.String),
595
+ display: lenient(Schema2.String),
596
+ maxReasoningEffort: lenient(Schema2.String),
597
+ budgetTokens: lenient(Schema2.Number)
598
+ })),
599
+ additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
600
+ anthropic_beta: lenient(Schema2.Array(Schema2.String)),
601
+ output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
602
+ reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
603
+ }), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
604
+ appName: lenient(Schema2.String),
605
+ appUrl: lenient(Schema2.String),
606
+ api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
607
+ }), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
608
+ var decode = Schema2.decodeUnknownSync(Legacy);
609
+
610
+ export { rewrite2, native2, exports_aisdk_native, ID13, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, mergeOverlay2, mergeHeaders2, Request3, Settings2, Info27, Service75, node79, exports_provider3, Event17 };