@opencode/core 0.0.0-dev-21003 → 0.0.0-dev-21009

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 +83 -83
  3. package/dist/aisdk-native.js +91 -91
  4. package/dist/aisdk.js +96 -96
  5. package/dist/app.js +9 -9
  6. package/dist/bus.js +75 -75
  7. package/dist/chunks/{reference-dxrd75ee.js → state-0459jf51.js} +24 -24
  8. package/dist/chunks/{reference-38y3j0a6.js → state-0pnnt7d9.js} +4 -4
  9. package/dist/chunks/{reference-z9x144hn.js → state-0ssmrtzc.js} +26 -26
  10. package/dist/chunks/{reference-0vbcp93d.js → state-0vbcp93d.js} +2 -2
  11. package/dist/chunks/{reference-hw5hqadp.js → state-1baxmn5d.js} +13 -13
  12. package/dist/chunks/state-1dtj47kj.js +253 -0
  13. package/dist/chunks/{reference-35ng7dkh.js → state-1q5awywt.js} +5 -5
  14. package/dist/chunks/{reference-pmne06ks.js → state-1trdtce6.js} +11 -11
  15. package/dist/chunks/{reference-ry7dydwt.js → state-1xk6wedh.js} +7 -7
  16. package/dist/chunks/{reference-ea3x7rwa.js → state-233w7mxv.js} +22 -22
  17. package/dist/chunks/{reference-j9mnae36.js → state-26j8sc83.js} +25 -25
  18. package/dist/chunks/{reference-st8026tp.js → state-28dwcykx.js} +19 -19
  19. package/dist/chunks/{reference-e2znmbmd.js → state-2910nsk0.js} +181 -181
  20. package/dist/chunks/{reference-tdxdfn5s.js → state-29gc7pfd.js} +11 -11
  21. package/dist/chunks/{reference-q8zknr33.js → state-2ncd5bhh.js} +6 -6
  22. package/dist/chunks/{reference-sxw208y2.js → state-2sfc2842.js} +2 -2
  23. package/dist/chunks/{reference-h7s7r6s9.js → state-31xfzrxg.js} +5 -5
  24. package/dist/chunks/{reference-743qse5p.js → state-36zsp7wt.js} +4 -4
  25. package/dist/chunks/{reference-3fax4j2d.js → state-37gkaztk.js} +9 -9
  26. package/dist/chunks/{reference-y3j594wr.js → state-39v2tedr.js} +24 -24
  27. package/dist/chunks/{reference-mfcg9zf8.js → state-3f2m75s5.js} +14 -14
  28. package/dist/chunks/{reference-3fc6dm20.js → state-3fc6dm20.js} +1 -1
  29. package/dist/chunks/{reference-3hepkmqq.js → state-3hepkmqq.js} +1 -1
  30. package/dist/chunks/{reference-3hwn7j4h.js → state-3hwn7j4h.js} +2 -2
  31. package/dist/chunks/{reference-05qzyfy0.js → state-3nfzk0qa.js} +33 -33
  32. package/dist/chunks/{reference-ekmm8y3n.js → state-3q7f1x34.js} +17 -17
  33. package/dist/chunks/{reference-3smtnn6g.js → state-3smtnn6g.js} +1 -1
  34. package/dist/chunks/{reference-dsqe59pg.js → state-3sn1tjkz.js} +3 -3
  35. package/dist/chunks/{reference-3tvqynh2.js → state-3tvqynh2.js} +1 -1
  36. package/dist/chunks/{reference-e330pyve.js → state-3wfkz6s1.js} +16 -16
  37. package/dist/chunks/{reference-3zsf4n22.js → state-3zsf4n22.js} +1 -1
  38. package/dist/chunks/{reference-1thc74wz.js → state-412yfsac.js} +13 -13
  39. package/dist/chunks/{reference-c85twgwa.js → state-44swrvp1.js} +19 -19
  40. package/dist/chunks/{reference-k0w1apbg.js → state-461nxmbv.js} +5 -5
  41. package/dist/chunks/{reference-1w3r4bph.js → state-468w6mzd.js} +4 -4
  42. package/dist/chunks/{reference-c2sed5cq.js → state-48kw51zw.js} +3 -3
  43. package/dist/chunks/{reference-nr3t94ek.js → state-4kvet074.js} +22 -22
  44. package/dist/chunks/{reference-dzse07y5.js → state-4mwpykj0.js} +6 -6
  45. package/dist/chunks/{reference-fnrmyyfx.js → state-4scw7yhd.js} +14 -14
  46. package/dist/chunks/{reference-1pxz8ven.js → state-4xpgt2w9.js} +5 -5
  47. package/dist/chunks/{reference-3fk86aw7.js → state-4z23ab3a.js} +4 -4
  48. package/dist/chunks/{reference-8k0z7ge9.js → state-4z92mb94.js} +32 -32
  49. package/dist/chunks/{reference-kj7j5fxd.js → state-4zchtw5z.js} +37 -37
  50. package/dist/chunks/{reference-54ma36ye.js → state-54ma36ye.js} +1 -1
  51. package/dist/chunks/{reference-g57505q5.js → state-55t5gfwz.js} +11 -11
  52. package/dist/chunks/{reference-5m9w47nd.js → state-5m9w47nd.js} +1 -1
  53. package/dist/chunks/state-5ykcsxae.js +26 -0
  54. package/dist/chunks/{reference-z6shxvkg.js → state-62mp1sb5.js} +11 -11
  55. package/dist/chunks/{reference-2q15wf76.js → state-699dywbp.js} +20 -20
  56. package/dist/chunks/{reference-4pw1s8mb.js → state-6hj0q4cz.js} +8 -8
  57. package/dist/chunks/{reference-s1kvmffy.js → state-6hjx5zpb.js} +9 -9
  58. package/dist/chunks/{reference-xg451pjv.js → state-6s0n9v0f.js} +16 -16
  59. package/dist/chunks/{reference-9nw2ws3v.js → state-6vcva7hs.js} +9 -9
  60. package/dist/chunks/{reference-6xb47vfp.js → state-6xb47vfp.js} +1 -1
  61. package/dist/chunks/{reference-8vrmbnrg.js → state-6zgzw1pt.js} +8 -8
  62. package/dist/chunks/{reference-r0eebq39.js → state-71f49j0g.js} +10 -10
  63. package/dist/chunks/{reference-775gj3j1.js → state-775gj3j1.js} +2 -2
  64. package/dist/chunks/{reference-7bmhse3q.js → state-7bmhse3q.js} +1 -1
  65. package/dist/chunks/{reference-pnqhs0ew.js → state-7rtv58sh.js} +330 -330
  66. package/dist/chunks/{reference-tbwt21ap.js → state-7tdp8yk2.js} +23 -23
  67. package/dist/chunks/{reference-pnzf6mjf.js → state-7zt5x37y.js} +1 -1
  68. package/dist/chunks/{reference-nts5xxr4.js → state-7zy47b61.js} +4 -4
  69. package/dist/chunks/{reference-63fpqb2s.js → state-86e23919.js} +45 -45
  70. package/dist/chunks/{reference-cpc5j1az.js → state-8b6w8cc4.js} +10 -10
  71. package/dist/chunks/{reference-8m6m0r52.js → state-8m6m0r52.js} +1 -1
  72. package/dist/chunks/{reference-045azavn.js → state-8raxsvkz.js} +4 -4
  73. package/dist/chunks/{reference-w92k2e0p.js → state-8sze2n9a.js} +4 -4
  74. package/dist/chunks/{reference-hs41a4tz.js → state-8xrzt693.js} +11 -11
  75. package/dist/chunks/{reference-j09zfasm.js → state-91qna3x0.js} +3 -3
  76. package/dist/chunks/{reference-r81p8d0w.js → state-96pr1f0k.js} +12 -12
  77. package/dist/chunks/{reference-3x2feh1y.js → state-9hwsx7sz.js} +43 -43
  78. package/dist/chunks/{reference-0yjtcscn.js → state-9mxpbgmg.js} +38 -38
  79. package/dist/chunks/{reference-t8sv6mhx.js → state-9rpz2hw9.js} +33 -33
  80. package/dist/chunks/{reference-qby9dwvd.js → state-a2qe2ev9.js} +8 -8
  81. package/dist/chunks/{reference-59n1fapm.js → state-a4hhctr7.js} +13 -13
  82. package/dist/chunks/{reference-w260pzdb.js → state-adv4y98c.js} +16 -16
  83. package/dist/chunks/{reference-ej4ab3hk.js → state-akbvn2q2.js} +15 -15
  84. package/dist/chunks/{reference-j3zdfp7k.js → state-as456vm3.js} +5 -5
  85. package/dist/chunks/{reference-3espnbnx.js → state-aw5wphbn.js} +22 -22
  86. package/dist/chunks/{reference-0f0tjfsd.js → state-axe469zx.js} +16 -16
  87. package/dist/chunks/{reference-vw1awvyn.js → state-b1kaysck.js} +27 -27
  88. package/dist/chunks/{reference-wecqtg5s.js → state-b3f8fkhc.js} +5 -5
  89. package/dist/chunks/{reference-xstzgqxx.js → state-b69axjbw.js} +33 -33
  90. package/dist/chunks/{reference-zfy1gwfz.js → state-b7tca0vw.js} +11 -11
  91. package/dist/chunks/{reference-epev154h.js → state-bap0endh.js} +5 -5
  92. package/dist/chunks/{reference-9c7asnz7.js → state-bbb0pzjs.js} +21 -21
  93. package/dist/chunks/{reference-q41vf2xe.js → state-bc42rdv0.js} +22 -22
  94. package/dist/chunks/{reference-1bmjn0qh.js → state-bfegkxfd.js} +8 -8
  95. package/dist/chunks/{reference-ywt8jp22.js → state-bjx1sjef.js} +9 -9
  96. package/dist/chunks/{reference-mv3hx7wz.js → state-bmr56wjg.js} +4 -4
  97. package/dist/chunks/{reference-8sw4wp74.js → state-bst6928h.js} +13 -13
  98. package/dist/chunks/{reference-gjr9q959.js → state-bsvaasas.js} +20 -20
  99. package/dist/chunks/{reference-hgag3gzg.js → state-btc7z31r.js} +22 -22
  100. package/dist/chunks/{reference-4my8r6he.js → state-bwpn7kg9.js} +8 -8
  101. package/dist/chunks/{reference-80z0vyq9.js → state-bxqk5pf5.js} +8 -8
  102. package/dist/chunks/state-by5v678g.js +18 -0
  103. package/dist/chunks/{reference-yn5sjats.js → state-bybntgg6.js} +6 -6
  104. package/dist/chunks/{reference-c1fqxshp.js → state-c1fqxshp.js} +3 -3
  105. package/dist/chunks/{reference-hvr28mne.js → state-c60ns7m9.js} +11 -11
  106. package/dist/chunks/{reference-s15r0dtj.js → state-caywxy8s.js} +25 -25
  107. package/dist/chunks/{reference-azsz2md7.js → state-cccpa7j0.js} +5 -5
  108. package/dist/chunks/{reference-98nkzpyj.js → state-cczz7jj2.js} +4 -4
  109. package/dist/chunks/{reference-szmcdvhr.js → state-cy4fvjtm.js} +20 -20
  110. package/dist/chunks/{reference-qbant2sw.js → state-cy6fv8hx.js} +34 -34
  111. package/dist/chunks/{reference-zfa7ynd8.js → state-d5fw341f.js} +20 -20
  112. package/dist/chunks/{reference-3a1k2atw.js → state-d7mw2e25.js} +13 -13
  113. package/dist/chunks/{reference-4xnzgvdv.js → state-dkh8aq6g.js} +29 -29
  114. package/dist/chunks/{reference-9wq61tcj.js → state-dkyft7f8.js} +9 -9
  115. package/dist/chunks/{reference-dqxsqydv.js → state-dqxsqydv.js} +1 -1
  116. package/dist/chunks/{reference-11a129ht.js → state-dtvsbb8r.js} +11 -11
  117. package/dist/chunks/{reference-h5m7e0fe.js → state-dvep9rg9.js} +9 -9
  118. package/dist/chunks/{reference-6dh0zb0s.js → state-e0ynfkzs.js} +7 -7
  119. package/dist/chunks/{reference-81ga0fy1.js → state-e197ggya.js} +5 -5
  120. package/dist/chunks/{reference-rhjbct0v.js → state-eaj1djv9.js} +8 -8
  121. package/dist/chunks/{reference-h8brdaj3.js → state-ebee5761.js} +19 -19
  122. package/dist/chunks/{reference-eej6y6fw.js → state-eej6y6fw.js} +2 -2
  123. package/dist/chunks/{reference-ef5x83kb.js → state-ef5x83kb.js} +1 -1
  124. package/dist/chunks/{reference-15k4azwb.js → state-en8t5366.js} +17 -17
  125. package/dist/chunks/{reference-feat9d3m.js → state-enztmqw1.js} +12 -12
  126. package/dist/chunks/{reference-07770t2t.js → state-eq20ba7x.js} +6 -6
  127. package/dist/chunks/{reference-gt5bakd5.js → state-ex0n3awc.js} +15 -15
  128. package/dist/chunks/{reference-ghmgawy4.js → state-f24gb5bq.js} +19 -19
  129. package/dist/chunks/{reference-fpr0n1zf.js → state-f747k6ef.js} +21 -21
  130. package/dist/chunks/{reference-hywf2c4r.js → state-fatn83ad.js} +11 -11
  131. package/dist/chunks/{reference-qgn6gcr1.js → state-fcrkznn8.js} +5 -5
  132. package/dist/chunks/{reference-xwmnfh3r.js → state-fv0c2at4.js} +26 -26
  133. package/dist/chunks/{reference-khmqacep.js → state-fxaymqdw.js} +4 -4
  134. package/dist/chunks/{reference-p4mj4rdp.js → state-g0445xdp.js} +8 -8
  135. package/dist/chunks/{reference-twq12gq3.js → state-gbt3zgba.js} +23 -23
  136. package/dist/chunks/{reference-gd4qta3r.js → state-gd4qta3r.js} +1 -1
  137. package/dist/chunks/{reference-gh545k69.js → state-gdqt70vf.js} +23 -23
  138. package/dist/chunks/{reference-addxnjmp.js → state-gqtdsdt7.js} +4 -4
  139. package/dist/chunks/{reference-yrcj3v3g.js → state-gw7cjrad.js} +4 -4
  140. package/dist/chunks/{reference-9dwgfb1r.js → state-gxn02pch.js} +11 -11
  141. package/dist/chunks/{reference-7bep4ber.js → state-gychpwz0.js} +39 -39
  142. package/dist/chunks/{reference-st5htmmp.js → state-h1rgn063.js} +8 -8
  143. package/dist/chunks/{reference-h6vf3j39.js → state-h6vf3j39.js} +1 -1
  144. package/dist/chunks/{reference-kqx1b4hy.js → state-hbk0ph6g.js} +4 -4
  145. package/dist/chunks/{reference-hgz4x7wa.js → state-hgz4x7wa.js} +1 -1
  146. package/dist/chunks/{reference-jpg3m0rz.js → state-hmj70r58.js} +8 -8
  147. package/dist/chunks/{reference-fbzf1q28.js → state-hqqj3jg8.js} +5 -5
  148. package/dist/chunks/{reference-tgv0byre.js → state-hrqq7wtc.js} +42 -42
  149. package/dist/chunks/{reference-es4zr9pq.js → state-hsjvmpjh.js} +5 -5
  150. package/dist/chunks/{reference-69pqp2ta.js → state-hwms0995.js} +4 -4
  151. package/dist/chunks/{reference-knevfgda.js → state-j34bs4nz.js} +4 -4
  152. package/dist/chunks/{reference-v5zagma4.js → state-j45y3r9x.js} +3 -3
  153. package/dist/chunks/{reference-ph7ntgm1.js → state-japjqhmp.js} +15 -15
  154. package/dist/chunks/{reference-jk540des.js → state-jk540des.js} +2 -2
  155. package/dist/chunks/{reference-5jvj1mv1.js → state-jsd15znb.js} +14 -14
  156. package/dist/chunks/{reference-v8ys44m2.js → state-jsfpkejg.js} +22 -22
  157. package/dist/chunks/{reference-avxp0dmd.js → state-jxzdswa4.js} +47 -47
  158. package/dist/chunks/{reference-zwe1k0ej.js → state-k1441ryq.js} +44 -44
  159. package/dist/chunks/{reference-ygcyyk2q.js → state-k1df0snj.js} +33 -33
  160. package/dist/chunks/{reference-05k2b1xp.js → state-kcrfwvke.js} +11 -11
  161. package/dist/chunks/{reference-65mpxnxp.js → state-kpk4pj14.js} +22 -22
  162. package/dist/chunks/{reference-mq8pyd3z.js → state-kre9xjyw.js} +14 -14
  163. package/dist/chunks/{reference-d9vgm7je.js → state-kwft1sg7.js} +2 -2
  164. package/dist/chunks/{reference-xrdz75pd.js → state-kyabj12g.js} +31 -31
  165. package/dist/chunks/{reference-pgcdf3yp.js → state-m2gc894p.js} +54 -54
  166. package/dist/chunks/{reference-m9w0rfyh.js → state-m9w0rfyh.js} +1 -1
  167. package/dist/chunks/{reference-maspj1v3.js → state-maspj1v3.js} +1 -1
  168. package/dist/chunks/{reference-4b6jte38.js → state-mbganbbe.js} +13 -13
  169. package/dist/chunks/{reference-z5wabbt8.js → state-mc9ntjar.js} +20 -20
  170. package/dist/chunks/{reference-11ewysrm.js → state-mcj02nxj.js} +9 -9
  171. package/dist/chunks/{reference-7w8dwfyw.js → state-mdqzwza3.js} +86 -86
  172. package/dist/chunks/{reference-pz7v2etc.js → state-mfzxjtt0.js} +3 -3
  173. package/dist/chunks/{reference-kna3qw76.js → state-mkk9p8j3.js} +32 -32
  174. package/dist/chunks/{reference-nj1fyrr5.js → state-mkrpb653.js} +9 -9
  175. package/dist/chunks/{reference-hkm4q0k4.js → state-mpkqfp7v.js} +3 -3
  176. package/dist/chunks/{reference-rwnpnfnn.js → state-mrh1dx2s.js} +3 -3
  177. package/dist/chunks/{reference-d7x4wa82.js → state-mswaxh11.js} +28 -28
  178. package/dist/chunks/{reference-a873kzar.js → state-mt9qx574.js} +8 -8
  179. package/dist/chunks/{reference-1b7p194a.js → state-mzmrm6vj.js} +33 -33
  180. package/dist/chunks/{reference-5h88vxg7.js → state-n4pbfpj5.js} +30 -30
  181. package/dist/chunks/{reference-5srtxftc.js → state-n51ng4sf.js} +9 -9
  182. package/dist/chunks/{reference-aeccth9c.js → state-n5b2wwq8.js} +11 -11
  183. package/dist/chunks/{reference-9as5mz56.js → state-n5xbav3a.js} +26 -26
  184. package/dist/chunks/{reference-5563pnry.js → state-ndtd5qrz.js} +32 -32
  185. package/dist/chunks/{reference-2wt7exxd.js → state-nfyst927.js} +23 -23
  186. package/dist/chunks/{reference-e80seqcp.js → state-nma959mg.js} +3 -3
  187. package/dist/chunks/{reference-gh1krvjx.js → state-pck7vvdx.js} +5 -5
  188. package/dist/chunks/{reference-bacyadyn.js → state-ph842b28.js} +4 -4
  189. package/dist/chunks/{reference-pjvnvgmy.js → state-pjvnvgmy.js} +1 -1
  190. package/dist/chunks/{reference-pknna89w.js → state-pknna89w.js} +1 -1
  191. package/dist/chunks/{reference-ebjm2wn5.js → state-pn82kknm.js} +15 -15
  192. package/dist/chunks/{reference-0j98sf6a.js → state-psw8jam6.js} +15 -15
  193. package/dist/chunks/{reference-22vjgegp.js → state-pxfcehez.js} +3 -3
  194. package/dist/chunks/{reference-q0xm7vwc.js → state-q0xm7vwc.js} +2 -2
  195. package/dist/chunks/{reference-smzrgrqh.js → state-q1tvsgae.js} +12 -12
  196. package/dist/chunks/{reference-kpnh5rdh.js → state-q8t4c571.js} +26 -26
  197. package/dist/chunks/{reference-m0vm465r.js → state-qbxb7qd6.js} +47 -47
  198. package/dist/chunks/{reference-gqrspt88.js → state-qcmwxm77.js} +7 -7
  199. package/dist/chunks/{reference-qp4vhx24.js → state-qjk7rny4.js} +11 -11
  200. package/dist/chunks/{reference-y1w1rhnk.js → state-qnbwvk35.js} +3 -3
  201. package/dist/chunks/{reference-qnc92qwc.js → state-qnc92qwc.js} +1 -1
  202. package/dist/chunks/{reference-qsdy395h.js → state-qsdy395h.js} +1 -1
  203. package/dist/chunks/{reference-cs9en2hq.js → state-qv9j2mcm.js} +23 -23
  204. package/dist/chunks/{reference-d606da0a.js → state-qwtxsz6h.js} +15 -15
  205. package/dist/chunks/{reference-g6q9qykm.js → state-r2m716tb.js} +8 -8
  206. package/dist/chunks/{reference-akjh0ytn.js → state-r5n5j0f6.js} +5 -5
  207. package/dist/chunks/{reference-y3emh7vm.js → state-rdd5jy1e.js} +22 -22
  208. package/dist/chunks/{reference-rdw6cm16.js → state-rdw6cm16.js} +1 -1
  209. package/dist/chunks/{reference-rert0e01.js → state-rert0e01.js} +2 -2
  210. package/dist/chunks/{reference-w1b1nwq4.js → state-rfh5dkmr.js} +21 -21
  211. package/dist/chunks/{reference-rj3eygr5.js → state-rj3eygr5.js} +2 -2
  212. package/dist/chunks/{reference-mb14aw74.js → state-rqa1jxse.js} +2 -2
  213. package/dist/chunks/{reference-g1wkew17.js → state-rxqq4vmb.js} +21 -21
  214. package/dist/chunks/{reference-6d7dy7s4.js → state-s2a95s6w.js} +19 -19
  215. package/dist/chunks/{reference-67wx5dm0.js → state-s8nse3sh.js} +40 -40
  216. package/dist/chunks/{reference-r8ebydnz.js → state-s9n56xqt.js} +23 -23
  217. package/dist/chunks/{reference-sa8ekw3f.js → state-sa8ekw3f.js} +2 -2
  218. package/dist/chunks/{reference-vyjxqysr.js → state-sdtdanhm.js} +14 -14
  219. package/dist/chunks/{reference-4fx8cncx.js → state-sgfwww2a.js} +13 -13
  220. package/dist/chunks/{reference-w3x9v1nk.js → state-sm965ndy.js} +8 -8
  221. package/dist/chunks/{reference-b6keqepk.js → state-svcw9x3w.js} +12 -12
  222. package/dist/chunks/{reference-3m53d28j.js → state-sw0cpgwh.js} +8 -8
  223. package/dist/chunks/{reference-nsv0y1w2.js → state-syfte0ky.js} +27 -27
  224. package/dist/chunks/{reference-syv4x271.js → state-syv4x271.js} +1 -1
  225. package/dist/chunks/{reference-q0nrsbdj.js → state-t32deht2.js} +10 -10
  226. package/dist/chunks/{reference-4pjps8v2.js → state-t5br7zt2.js} +50 -50
  227. package/dist/chunks/{reference-7wzym38v.js → state-t96xapfm.js} +47 -46
  228. package/dist/chunks/{reference-tazgh4e4.js → state-tazgh4e4.js} +1 -1
  229. package/dist/chunks/{reference-tcezcvh9.js → state-tcezcvh9.js} +1 -1
  230. package/dist/chunks/{reference-3kfmszx4.js → state-tdgts0x2.js} +33 -33
  231. package/dist/chunks/{reference-tdstcens.js → state-tdstcens.js} +1 -1
  232. package/dist/chunks/{reference-bvvg1rh8.js → state-teqqnftj.js} +17 -17
  233. package/dist/chunks/{reference-ybmjar5a.js → state-tjntatma.js} +20 -20
  234. package/dist/chunks/{reference-3a63wq34.js → state-tjx18q08.js} +29 -29
  235. package/dist/chunks/{reference-8rqycdgd.js → state-tkmwgdpd.js} +4 -4
  236. package/dist/chunks/{reference-tm0kqsz3.js → state-tm0kqsz3.js} +1 -1
  237. package/dist/chunks/{reference-ngyrtr94.js → state-twwzjqdf.js} +6 -6
  238. package/dist/chunks/{reference-tyytaxap.js → state-tyytaxap.js} +1 -1
  239. package/dist/chunks/{reference-v0es1rhs.js → state-v0es1rhs.js} +2 -2
  240. package/dist/chunks/{reference-v7p4zvkq.js → state-v7p4zvkq.js} +2 -2
  241. package/dist/chunks/{reference-veqvce7d.js → state-veqvce7d.js} +1 -1
  242. package/dist/chunks/{reference-dv357ym8.js → state-vgmdqk35.js} +81 -81
  243. package/dist/chunks/{reference-5p5gqk74.js → state-vjvwfxwz.js} +12 -12
  244. package/dist/chunks/{reference-j6wkh22k.js → state-vxrbht7e.js} +12 -12
  245. package/dist/chunks/{reference-vzs5sf6e.js → state-vzs5sf6e.js} +1 -1
  246. package/dist/chunks/{reference-84txncab.js → state-w1eejvng.js} +5 -5
  247. package/dist/chunks/{reference-w3wsvvr9.js → state-w3wsvvr9.js} +1 -1
  248. package/dist/chunks/{reference-cpjvpb3f.js → state-w53s0d5e.js} +4 -4
  249. package/dist/chunks/{reference-wd87259q.js → state-wd87259q.js} +1 -1
  250. package/dist/chunks/{reference-2d2g0b80.js → state-whtn744p.js} +71 -71
  251. package/dist/chunks/{reference-4jfd8c3z.js → state-wk4eqn65.js} +5 -5
  252. package/dist/chunks/{reference-f7avxq1w.js → state-ws9zqs95.js} +32 -32
  253. package/dist/chunks/{reference-dckhq1hb.js → state-wtag1fy8.js} +9 -9
  254. package/dist/chunks/{reference-zrxnpg3c.js → state-wvce6prw.js} +27 -27
  255. package/dist/chunks/{reference-vxrvct7x.js → state-wvdx2ek6.js} +9 -9
  256. package/dist/chunks/{reference-rgpm01ny.js → state-x004tdjz.js} +20 -20
  257. package/dist/chunks/{reference-q0vvbzs6.js → state-x28btc3q.js} +22 -22
  258. package/dist/chunks/{reference-73qsq1xc.js → state-x4k5jtsf.js} +1 -1
  259. package/dist/chunks/{reference-sn87wmz8.js → state-x5y4snx4.js} +321 -321
  260. package/dist/chunks/{reference-nc4qeq29.js → state-xahyd3q0.js} +4 -4
  261. package/dist/chunks/{reference-wsn7wktm.js → state-xc05z2m7.js} +29 -29
  262. package/dist/chunks/{reference-57b9ws8p.js → state-xfkkasph.js} +7 -7
  263. package/dist/chunks/{reference-d3n9z6py.js → state-xwmagqs5.js} +30 -30
  264. package/dist/chunks/{reference-6dp98m1b.js → state-y15tw7vc.js} +11 -11
  265. package/dist/chunks/{reference-y1fvbwt7.js → state-y1fvbwt7.js} +1 -1
  266. package/dist/chunks/{reference-ex32qt72.js → state-y6877jmf.js} +20 -20
  267. package/dist/chunks/{reference-y71avatq.js → state-y71avatq.js} +1 -1
  268. package/dist/chunks/{reference-ys9049bt.js → state-yfgf9xhk.js} +21 -21
  269. package/dist/chunks/{reference-9hwaqfsw.js → state-ygdna4kr.js} +5 -5
  270. package/dist/chunks/{reference-7x8122dn.js → state-yntsa6by.js} +15 -15
  271. package/dist/chunks/{reference-1acjjqhc.js → state-yp2x3t23.js} +4 -4
  272. package/dist/chunks/{reference-eqrps7ff.js → state-ypb1yt5b.js} +1 -1
  273. package/dist/chunks/{reference-g7ejj7wn.js → state-ypy7t2zt.js} +21 -21
  274. package/dist/chunks/{reference-z0bkrqjs.js → state-z0bkrqjs.js} +1 -1
  275. package/dist/chunks/{reference-yv5nr5jj.js → state-z4vev6b8.js} +11 -11
  276. package/dist/chunks/{reference-baaqp4zd.js → state-zcrspsvn.js} +4 -4
  277. package/dist/chunks/{reference-e09akz1d.js → state-zf0999f0.js} +20 -20
  278. package/dist/chunks/{reference-n0r2pe7t.js → state-zfwgv53e.js} +40 -40
  279. package/dist/chunks/{reference-knr7pyte.js → state-zk57ev3y.js} +57 -57
  280. package/dist/chunks/{reference-zr2ceqn5.js → state-zr2ceqn5.js} +1 -1
  281. package/dist/chunks/{reference-sqwzxhmw.js → state-zw7vdsjy.js} +18 -18
  282. package/dist/chunks/{reference-5mdamk89.js → state-zws9m538.js} +18 -18
  283. package/dist/chunks/{reference-zxq2ej10.js → state-zxq2ej10.js} +1 -1
  284. package/dist/codemode/catalog.js +1 -1
  285. package/dist/codemode/instructions.js +11 -11
  286. package/dist/codemode/tool.js +3 -3
  287. package/dist/codemode/web.js +1 -1
  288. package/dist/command.js +83 -83
  289. package/dist/config/discovery.js +84 -84
  290. package/dist/config/markdown.js +1 -1
  291. package/dist/config/normalize.js +101 -101
  292. package/dist/config/plugin/agent.js +120 -120
  293. package/dist/config/plugin/command.js +209 -209
  294. package/dist/config/plugin/compaction.js +156 -156
  295. package/dist/config/plugin/compatibility.js +136 -136
  296. package/dist/config/plugin/entry-observer.js +1 -1
  297. package/dist/config/plugin/formatter.js +119 -119
  298. package/dist/config/plugin/image.js +118 -118
  299. package/dist/config/plugin/instruction.js +118 -118
  300. package/dist/config/plugin/location-watcher.js +118 -118
  301. package/dist/config/plugin/mcp.js +127 -127
  302. package/dist/config/plugin/policy.js +119 -119
  303. package/dist/config/plugin/provider.js +118 -118
  304. package/dist/config/plugin/reference.js +120 -120
  305. package/dist/config/plugin/shell.js +118 -118
  306. package/dist/config/plugin/skill-file.js +104 -104
  307. package/dist/config/plugin/skill.js +139 -139
  308. package/dist/config/plugin/snapshot.js +118 -118
  309. package/dist/config/plugin/source.js +119 -119
  310. package/dist/config/plugin/tool-output.js +119 -119
  311. package/dist/config/plugin/websearch.js +117 -117
  312. package/dist/config/plugin/worktree.js +120 -120
  313. package/dist/config/variable.js +3 -3
  314. package/dist/config/watch.js +1 -1
  315. package/dist/config.js +123 -123
  316. package/dist/credential/sql.js +2 -2
  317. package/dist/credential.js +87 -87
  318. package/dist/database/database.js +68 -68
  319. package/dist/database/drizzle/effect-sqlite/driver.js +12 -12
  320. package/dist/database/drizzle/effect-sqlite/index.js +12 -12
  321. package/dist/database/drizzle/effect-sqlite/session.js +11 -11
  322. package/dist/database/drizzle/index.js +13 -13
  323. package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
  324. package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
  325. package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
  326. package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
  327. package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
  328. package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
  329. package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
  330. package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
  331. package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
  332. package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
  333. package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
  334. package/dist/database/drizzle.js +14 -14
  335. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
  336. package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
  337. package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
  338. package/dist/database/migration/20260225215848_workspace.js +1 -1
  339. package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
  340. package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
  341. package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
  342. package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
  343. package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
  344. package/dist/database/migration/20260323234822_events.js +1 -1
  345. package/dist/database/migration/20260410174513_workspace-name.js +1 -1
  346. package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
  347. package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
  348. package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
  349. package/dist/database/migration/20260428004200_add_session_path.js +1 -1
  350. package/dist/database/migration/20260501142318_next_venus.js +1 -1
  351. package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
  352. package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
  353. package/dist/database/migration/20260510033149_session_usage.js +1 -1
  354. package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
  355. package/dist/database/migration/20260511173437_session-metadata.js +1 -1
  356. package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
  357. package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
  358. package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
  359. package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
  360. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
  361. package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
  362. package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
  363. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
  364. package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
  365. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
  366. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
  367. package/dist/database/migration/20260611035744_credential.js +1 -1
  368. package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
  369. package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
  370. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
  371. package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
  372. package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
  373. package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
  374. package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
  375. package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
  376. package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
  377. package/dist/database/migration/20260812181746_session_inbox.js +1 -1
  378. package/dist/database/migration/20260812213948_worktree.js +1 -1
  379. package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
  380. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
  381. package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
  382. package/dist/database/migration/20260923013825_project_time_active.js +1 -1
  383. package/dist/database/migration/20261007190000_azure_cli_external_credential.js +1 -1
  384. package/dist/database/migration/20261010180456_project_time_archived.js +1 -1
  385. package/dist/database/migration.gen.js +51 -51
  386. package/dist/database/migration.js +53 -53
  387. package/dist/database/path.js +2 -2
  388. package/dist/database/schema.gen.js +1 -1
  389. package/dist/database/schema.sql.js +1 -1
  390. package/dist/database/sqlite.bun.js +1 -1
  391. package/dist/database/sqlite.js +1 -1
  392. package/dist/database/sqlite.node.js +1 -1
  393. package/dist/database/sqlite.workerd.js +1 -1
  394. package/dist/database/v1-migration.bun.js +78 -78
  395. package/dist/database/v1-migration.js +1 -1
  396. package/dist/effect/app-node-builder.js +368 -368
  397. package/dist/effect/app-node-platform.js +2 -2
  398. package/dist/effect/keyed-mutex.js +1 -1
  399. package/dist/effect/websocket-constructor.js +1 -1
  400. package/dist/environment/driver.js +1 -1
  401. package/dist/environment/environment.js +95 -95
  402. package/dist/environment/exec-defaults.js +2 -2
  403. package/dist/environment/files.js +1 -1
  404. package/dist/environment/index.js +97 -97
  405. package/dist/environment/local.js +2 -2
  406. package/dist/environment/memory.js +2 -2
  407. package/dist/environment/unavailable.js +3 -3
  408. package/dist/event/sql.js +1 -1
  409. package/dist/event-logger.js +76 -76
  410. package/dist/file-access.js +106 -106
  411. package/dist/file-mutation.js +96 -96
  412. package/dist/file-retention.js +1 -1
  413. package/dist/filesystem/fff.bun.js +2 -2
  414. package/dist/filesystem/fff.js +1 -1
  415. package/dist/filesystem/fff.node.js +2 -2
  416. package/dist/filesystem/fff.workerd.js +2 -2
  417. package/dist/filesystem/location-watcher-policy.js +4 -4
  418. package/dist/filesystem/location-watcher.js +216 -216
  419. package/dist/filesystem/protected.js +1 -1
  420. package/dist/filesystem/search.js +103 -103
  421. package/dist/filesystem/watcher-binding.js +1 -1
  422. package/dist/filesystem/watcher.js +15 -15
  423. package/dist/filesystem.js +104 -104
  424. package/dist/form.js +86 -86
  425. package/dist/formatter/builtins.js +4 -4
  426. package/dist/formatter.js +89 -89
  427. package/dist/generate.js +103 -103
  428. package/dist/git.js +10 -10
  429. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +1 -1
  430. package/dist/github-copilot/chat/get-response-metadata.js +1 -1
  431. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +1 -1
  432. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +7 -7
  433. package/dist/github-copilot/chat/openai-compatible-chat-options.js +1 -1
  434. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +1 -1
  435. package/dist/github-copilot/copilot-provider.js +17 -17
  436. package/dist/github-copilot/models.js +101 -101
  437. package/dist/github-copilot/openai-compatible-error.js +1 -1
  438. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +1 -1
  439. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +1 -1
  440. package/dist/github-copilot/responses/openai-error.js +1 -1
  441. package/dist/github-copilot/responses/openai-responses-language-model.js +10 -10
  442. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +6 -6
  443. package/dist/github-copilot/responses/tool/code-interpreter.js +1 -1
  444. package/dist/github-copilot/responses/tool/file-search.js +1 -1
  445. package/dist/github-copilot/responses/tool/image-generation.js +1 -1
  446. package/dist/github-copilot/responses/tool/web-search-preview.js +1 -1
  447. package/dist/github-copilot/responses/tool/web-search.js +1 -1
  448. package/dist/image/photon.js +2 -2
  449. package/dist/image.js +6 -6
  450. package/dist/instance/service.js +5 -5
  451. package/dist/instance.js +359 -359
  452. package/dist/instruction-discovery.js +86 -86
  453. package/dist/instructions/builtins.js +89 -89
  454. package/dist/instructions/index.js +5 -5
  455. package/dist/integration/connection.js +3 -3
  456. package/dist/integration.js +89 -89
  457. package/dist/job.js +80 -80
  458. package/dist/kv/sql.js +2 -2
  459. package/dist/kv.js +75 -75
  460. package/dist/location-activity.js +136 -136
  461. package/dist/location-lifecycle.js +109 -109
  462. package/dist/location-service-map.js +88 -88
  463. package/dist/location-services.js +356 -356
  464. package/dist/location.js +83 -83
  465. package/dist/managed-policy.js +8 -8
  466. package/dist/mcp/client.js +93 -93
  467. package/dist/mcp/index.js +105 -105
  468. package/dist/mcp/instructions.js +131 -131
  469. package/dist/mcp/oauth.js +80 -80
  470. package/dist/mcp/stdio.js +92 -92
  471. package/dist/mime.js +1 -1
  472. package/dist/modal/models.js +101 -101
  473. package/dist/model-resolver.js +100 -100
  474. package/dist/model.js +104 -104
  475. package/dist/models-dev.js +109 -109
  476. package/dist/oauth/page.js +1 -1
  477. package/dist/permission/saved.js +82 -82
  478. package/dist/permission/sql.js +5 -5
  479. package/dist/permission.js +117 -117
  480. package/dist/persistent-pty/binary.bun.js +1 -1
  481. package/dist/persistent-pty/daemon.js +1 -1
  482. package/dist/persistent-pty/index.js +88 -88
  483. package/dist/persistent-pty/pty-binding.js +1 -1
  484. package/dist/persistent-pty.js +77 -77
  485. package/dist/plugin/agent.js +78 -78
  486. package/dist/plugin/command.js +104 -104
  487. package/dist/plugin/hooks.js +5 -5
  488. package/dist/plugin/host.js +213 -213
  489. package/dist/plugin/identity.js +3 -3
  490. package/dist/plugin/instance.js +5 -5
  491. package/dist/plugin/internal.js +331 -331
  492. package/dist/plugin/mcp-codemode-defaults.js +3 -3
  493. package/dist/plugin/models-dev.js +98 -98
  494. package/dist/plugin/module.js +119 -119
  495. package/dist/plugin/optimize.js +2 -2
  496. package/dist/plugin/plan.js +104 -104
  497. package/dist/plugin/promise.js +1 -1
  498. package/dist/plugin/provider/amazon-bedrock.js +92 -92
  499. package/dist/plugin/provider/azure.js +118 -118
  500. package/dist/plugin/provider/cerebras.js +1 -1
  501. package/dist/plugin/provider/chatgpt.js +118 -118
  502. package/dist/plugin/provider/cloudflare-ai-gateway.js +115 -115
  503. package/dist/plugin/provider/cloudflare-workers-ai.js +116 -116
  504. package/dist/plugin/provider/cohere.js +2 -2
  505. package/dist/plugin/provider/configured.js +114 -114
  506. package/dist/plugin/provider/databricks.js +1 -1
  507. package/dist/plugin/provider/digitalocean.js +95 -95
  508. package/dist/plugin/provider/dynamic.js +2 -2
  509. package/dist/plugin/provider/factory.js +1 -1
  510. package/dist/plugin/provider/github-copilot.js +97 -97
  511. package/dist/plugin/provider/gitlab.js +95 -95
  512. package/dist/plugin/provider/google-vertex.js +115 -115
  513. package/dist/plugin/provider/kilo.js +1 -1
  514. package/dist/plugin/provider/llmgateway.js +80 -80
  515. package/dist/plugin/provider/lmstudio.js +127 -127
  516. package/dist/plugin/provider/local.js +124 -124
  517. package/dist/plugin/provider/modal.js +94 -94
  518. package/dist/plugin/provider/neon.js +1 -1
  519. package/dist/plugin/provider/nvidia.js +1 -1
  520. package/dist/plugin/provider/ollama.js +127 -127
  521. package/dist/plugin/provider/openai.js +118 -118
  522. package/dist/plugin/provider/opencode.js +99 -99
  523. package/dist/plugin/provider/openrouter.js +93 -93
  524. package/dist/plugin/provider/perplexity.js +2 -2
  525. package/dist/plugin/provider/poe.js +81 -81
  526. package/dist/plugin/provider/prompt-cache-key.js +1 -1
  527. package/dist/plugin/provider/sap-ai-core.js +93 -93
  528. package/dist/plugin/provider/sdk-factory.js +1 -1
  529. package/dist/plugin/provider/snowflake-cortex.js +117 -117
  530. package/dist/plugin/provider/vercel.js +92 -92
  531. package/dist/plugin/provider/vllm.js +127 -127
  532. package/dist/plugin/provider/xai.js +93 -93
  533. package/dist/plugin/provider/zenmux.js +1 -1
  534. package/dist/plugin/provider.js +169 -169
  535. package/dist/plugin/sdk.js +78 -78
  536. package/dist/plugin/service.js +3 -3
  537. package/dist/plugin/skill.js +136 -136
  538. package/dist/plugin/source-directory.js +1 -1
  539. package/dist/plugin/supervisor.js +350 -350
  540. package/dist/plugin/tool-input-repair.js +4 -4
  541. package/dist/plugin/update.js +6 -6
  542. package/dist/plugin/vcs/git.js +88 -88
  543. package/dist/plugin/vcs/hg.js +88 -88
  544. package/dist/plugin/verbosity.js +95 -95
  545. package/dist/plugin/warming.js +116 -116
  546. package/dist/plugin/websearch/exa.js +5 -5
  547. package/dist/plugin/websearch/firecrawl.js +8 -8
  548. package/dist/plugin/websearch/index.js +9 -9
  549. package/dist/plugin/websearch/mcp.js +6 -6
  550. package/dist/plugin/websearch/parallel.js +8 -8
  551. package/dist/plugin/websearch/tavily.js +6 -6
  552. package/dist/plugin/websearch/tinyfish.js +6 -6
  553. package/dist/plugin.js +224 -224
  554. package/dist/project/schema.js +2 -2
  555. package/dist/project/sql.js +4 -4
  556. package/dist/project.js +82 -82
  557. package/dist/provider.js +103 -103
  558. package/dist/pty/protocol.js +1 -1
  559. package/dist/pty/ticket.js +1 -1
  560. package/dist/pty.js +97 -97
  561. package/dist/reference/instructions.js +91 -91
  562. package/dist/reference.js +93 -93
  563. package/dist/repository-cache.js +83 -83
  564. package/dist/repository.js +3 -3
  565. package/dist/ripgrep/binary.js +2 -2
  566. package/dist/ripgrep.js +99 -99
  567. package/dist/rpc.js +88 -88
  568. package/dist/schema.js +1 -1
  569. package/dist/session/affinity.js +1 -1
  570. package/dist/session/command.js +76 -76
  571. package/dist/session/compaction.js +133 -133
  572. package/dist/session/context.js +155 -155
  573. package/dist/session/diff.js +90 -90
  574. package/dist/session/environment.js +5 -5
  575. package/dist/session/error.js +5 -5
  576. package/dist/session/event.js +1 -1
  577. package/dist/session/execution/restart.js +219 -219
  578. package/dist/session/execution.js +129 -129
  579. package/dist/session/generate.js +154 -154
  580. package/dist/session/history.js +13 -13
  581. package/dist/session/inbox.js +92 -92
  582. package/dist/session/info.js +3 -3
  583. package/dist/session/instruction-entry.js +81 -81
  584. package/dist/session/instruction-state.js +8 -8
  585. package/dist/session/instructions.js +99 -99
  586. package/dist/session/message-updater.js +4 -4
  587. package/dist/session/message.js +1 -1
  588. package/dist/session/model-request.js +122 -122
  589. package/dist/session/model-transport.js +9 -9
  590. package/dist/session/move.js +131 -131
  591. package/dist/session/projector.js +88 -88
  592. package/dist/session/prompt.js +107 -107
  593. package/dist/session/provider-context.js +3 -3
  594. package/dist/session/revert.js +92 -92
  595. package/dist/session/run-coordinator.js +3 -3
  596. package/dist/session/runner/index.js +3 -3
  597. package/dist/session/runner/llm.js +226 -226
  598. package/dist/session/runner/max-steps.js +1 -1
  599. package/dist/session/runner/model.js +100 -100
  600. package/dist/session/runner/publish-llm-event.js +115 -115
  601. package/dist/session/runner/retry.js +4 -4
  602. package/dist/session/runner/step.js +127 -127
  603. package/dist/session/runner/to-llm-message.js +2 -2
  604. package/dist/session/schema.js +5 -5
  605. package/dist/session/session.js +164 -164
  606. package/dist/session/shell.js +132 -132
  607. package/dist/session/skill.js +105 -105
  608. package/dist/session/sql.js +5 -5
  609. package/dist/session/stats.js +75 -75
  610. package/dist/session/store.js +87 -87
  611. package/dist/session/subagent-completion.js +1 -1
  612. package/dist/session/subagent-job.js +207 -207
  613. package/dist/session/system-prompt.js +5 -5
  614. package/dist/session/title.js +159 -159
  615. package/dist/session/to-session-error.js +113 -113
  616. package/dist/session/transfer.js +212 -212
  617. package/dist/session/usage.js +1 -1
  618. package/dist/session.js +211 -211
  619. package/dist/shell/parse.js +6 -6
  620. package/dist/shell/result.js +1 -1
  621. package/dist/shell/scan.js +1 -1
  622. package/dist/shell/select.js +15 -15
  623. package/dist/shell.js +132 -132
  624. package/dist/skill/discovery.js +4 -4
  625. package/dist/skill/instructions.js +109 -109
  626. package/dist/skill.js +110 -110
  627. package/dist/snapshot.js +93 -93
  628. package/dist/state.js +1 -1
  629. package/dist/tool/html-markdown.js +1 -1
  630. package/dist/tool/http-body.js +1 -1
  631. package/dist/tool/mcp.js +126 -126
  632. package/dist/tool/plugin/edit.js +122 -122
  633. package/dist/tool/plugin/file-diff.js +1 -1
  634. package/dist/tool/plugin/glob.js +126 -126
  635. package/dist/tool/plugin/grep.js +126 -126
  636. package/dist/tool/plugin/mcp-resource.js +119 -119
  637. package/dist/tool/plugin/opencode.js +111 -111
  638. package/dist/tool/plugin/patch.js +124 -124
  639. package/dist/tool/plugin/question.js +105 -105
  640. package/dist/tool/plugin/read.js +127 -127
  641. package/dist/tool/plugin/shell.js +206 -206
  642. package/dist/tool/plugin/skill.js +113 -113
  643. package/dist/tool/plugin/subagent.js +212 -212
  644. package/dist/tool/plugin/webfetch.js +112 -112
  645. package/dist/tool/plugin/websearch.js +112 -112
  646. package/dist/tool/plugin/write.js +124 -124
  647. package/dist/tool/read-filesystem.js +102 -102
  648. package/dist/tool/runtime.js +1 -1
  649. package/dist/tool-output.js +7 -7
  650. package/dist/tool.js +14 -14
  651. package/dist/types/config/discovery.d.ts +1 -0
  652. package/dist/types/config.d.ts +1 -0
  653. package/dist/util/error-summary.js +1 -1
  654. package/dist/util/error.js +1 -1
  655. package/dist/util/git-executable.js +2 -2
  656. package/dist/util/iife.js +1 -1
  657. package/dist/util/lazy.js +1 -1
  658. package/dist/util/slug.js +1 -1
  659. package/dist/util/token.js +1 -1
  660. package/dist/util/which.js +1 -1
  661. package/dist/util/wildcard.js +1 -1
  662. package/dist/v1/config/agent.js +5 -5
  663. package/dist/v1/config/command.js +3 -3
  664. package/dist/v1/config/error.js +2 -2
  665. package/dist/v1/config/mcp.js +4 -4
  666. package/dist/v1/config/migrate.js +94 -94
  667. package/dist/v1/config/permission.js +3 -3
  668. package/dist/v1/config/plugin.js +3 -3
  669. package/dist/v1/config/provider-options.js +1 -1
  670. package/dist/v1/config/provider.js +4 -4
  671. package/dist/variant.js +93 -93
  672. package/dist/vcs/patch.js +1 -1
  673. package/dist/vcs.js +91 -91
  674. package/dist/websearch.js +82 -82
  675. package/dist/wellknown/plugin.js +78 -78
  676. package/dist/wellknown.js +83 -83
  677. package/dist/workspace/driver.js +5 -5
  678. package/dist/workspace/sql.js +1 -1
  679. package/dist/workspace.js +82 -82
  680. package/dist/worktree/directory.js +2 -2
  681. package/dist/worktree/git.js +8 -8
  682. package/dist/worktree/sql.js +5 -5
  683. package/dist/worktree/strategies.js +91 -91
  684. package/dist/worktree.js +100 -100
  685. package/package.json +8 -8
  686. package/dist/chunks/reference-keaa5ges.js +0 -253
  687. package/dist/chunks/reference-mztsg71c.js +0 -26
  688. package/dist/chunks/reference-n95b3jav.js +0 -18
  689. /package/dist/chunks/{reference-0qkdqm5v.js → state-0qkdqm5v.js} +0 -0
  690. /package/dist/chunks/{reference-0zkw76rk.js → state-0zkw76rk.js} +0 -0
  691. /package/dist/chunks/{reference-17cy0kzp.js → state-17cy0kzp.js} +0 -0
  692. /package/dist/chunks/{reference-1cnp2v09.js → state-1cnp2v09.js} +0 -0
  693. /package/dist/chunks/{reference-1kg9ymc8.js → state-1kg9ymc8.js} +0 -0
  694. /package/dist/chunks/{reference-24dcb14g.js → state-24dcb14g.js} +0 -0
  695. /package/dist/chunks/{reference-2710q6r3.js → state-2710q6r3.js} +0 -0
  696. /package/dist/chunks/{reference-2axfhc9x.js → state-2axfhc9x.js} +0 -0
  697. /package/dist/chunks/{reference-2bv980vf.js → state-2bv980vf.js} +0 -0
  698. /package/dist/chunks/{reference-2c3vjs8z.js → state-2c3vjs8z.js} +0 -0
  699. /package/dist/chunks/{reference-359p4xyc.js → state-359p4xyc.js} +0 -0
  700. /package/dist/chunks/{reference-3asan66x.js → state-3asan66x.js} +0 -0
  701. /package/dist/chunks/{reference-3t0ybcrp.js → state-3t0ybcrp.js} +0 -0
  702. /package/dist/chunks/{reference-3v8g72cx.js → state-3v8g72cx.js} +0 -0
  703. /package/dist/chunks/{reference-3wcehsnq.js → state-3wcehsnq.js} +0 -0
  704. /package/dist/chunks/{reference-43n2bw4t.js → state-43n2bw4t.js} +0 -0
  705. /package/dist/chunks/{reference-4knz6hnm.js → state-4knz6hnm.js} +0 -0
  706. /package/dist/chunks/{reference-4vcrnpx2.js → state-4vcrnpx2.js} +0 -0
  707. /package/dist/chunks/{reference-4y7fprxs.js → state-4y7fprxs.js} +0 -0
  708. /package/dist/chunks/{reference-53557ph1.js → state-53557ph1.js} +0 -0
  709. /package/dist/chunks/{reference-550bvhaj.js → state-550bvhaj.js} +0 -0
  710. /package/dist/chunks/{reference-5qd3pb7m.js → state-5qd3pb7m.js} +0 -0
  711. /package/dist/chunks/{reference-6prwharc.js → state-6prwharc.js} +0 -0
  712. /package/dist/chunks/{reference-6q2bdcd1.js → state-6q2bdcd1.js} +0 -0
  713. /package/dist/chunks/{reference-7akdwqpd.js → state-7akdwqpd.js} +0 -0
  714. /package/dist/chunks/{reference-7m9af43g.js → state-7m9af43g.js} +0 -0
  715. /package/dist/chunks/{reference-822emrt2.js → state-822emrt2.js} +0 -0
  716. /package/dist/chunks/{reference-84wd9syh.js → state-84wd9syh.js} +0 -0
  717. /package/dist/chunks/{reference-88xbtdfr.js → state-88xbtdfr.js} +0 -0
  718. /package/dist/chunks/{reference-8n3pysct.js → state-8n3pysct.js} +0 -0
  719. /package/dist/chunks/{reference-8wj87zfr.js → state-8wj87zfr.js} +0 -0
  720. /package/dist/chunks/{reference-9a4afbnw.js → state-9a4afbnw.js} +0 -0
  721. /package/dist/chunks/{reference-9rqn6x4v.js → state-9rqn6x4v.js} +0 -0
  722. /package/dist/chunks/{reference-a6k6eb26.js → state-a6k6eb26.js} +0 -0
  723. /package/dist/chunks/{reference-af5trqkr.js → state-af5trqkr.js} +0 -0
  724. /package/dist/chunks/{reference-afrmfg78.js → state-afrmfg78.js} +0 -0
  725. /package/dist/chunks/{reference-aqzs7mqg.js → state-aqzs7mqg.js} +0 -0
  726. /package/dist/chunks/{reference-atq7p7m5.js → state-atq7p7m5.js} +0 -0
  727. /package/dist/chunks/{reference-bkyjaxrp.js → state-bkyjaxrp.js} +0 -0
  728. /package/dist/chunks/{reference-bmr6ed5q.js → state-bmr6ed5q.js} +0 -0
  729. /package/dist/chunks/{reference-cf4snx6d.js → state-cf4snx6d.js} +0 -0
  730. /package/dist/chunks/{reference-cvy3z8tj.js → state-cvy3z8tj.js} +0 -0
  731. /package/dist/chunks/{reference-d9fn303g.js → state-d9fn303g.js} +0 -0
  732. /package/dist/chunks/{reference-d9jj8t3e.js → state-d9jj8t3e.js} +0 -0
  733. /package/dist/chunks/{reference-dajrwvna.js → state-dajrwvna.js} +0 -0
  734. /package/dist/chunks/{reference-dap0rakb.js → state-dap0rakb.js} +0 -0
  735. /package/dist/chunks/{reference-df08tz66.js → state-df08tz66.js} +0 -0
  736. /package/dist/chunks/{reference-dy18nga0.js → state-dy18nga0.js} +0 -0
  737. /package/dist/chunks/{reference-e5kj55wp.js → state-e5kj55wp.js} +0 -0
  738. /package/dist/chunks/{reference-e73j6tqm.js → state-e73j6tqm.js} +0 -0
  739. /package/dist/chunks/{reference-ec1grn59.js → state-ec1grn59.js} +0 -0
  740. /package/dist/chunks/{reference-eh3zwz77.js → state-eh3zwz77.js} +0 -0
  741. /package/dist/chunks/{reference-emrn6kk6.js → state-emrn6kk6.js} +0 -0
  742. /package/dist/chunks/{reference-f0mxakyp.js → state-f0mxakyp.js} +0 -0
  743. /package/dist/chunks/{reference-f6n9ztr4.js → state-f6n9ztr4.js} +0 -0
  744. /package/dist/chunks/{reference-faypxj3z.js → state-faypxj3z.js} +0 -0
  745. /package/dist/chunks/{reference-fd410y7t.js → state-fd410y7t.js} +0 -0
  746. /package/dist/chunks/{reference-g4wezp1m.js → state-g4wezp1m.js} +0 -0
  747. /package/dist/chunks/{reference-g86h250q.js → state-g86h250q.js} +0 -0
  748. /package/dist/chunks/{reference-gebd4c9n.js → state-gebd4c9n.js} +0 -0
  749. /package/dist/chunks/{reference-gftt206x.js → state-gftt206x.js} +0 -0
  750. /package/dist/chunks/{reference-hcxmzztb.js → state-hcxmzztb.js} +0 -0
  751. /package/dist/chunks/{reference-hk9envan.js → state-hk9envan.js} +0 -0
  752. /package/dist/chunks/{reference-j2ntwpah.js → state-j2ntwpah.js} +0 -0
  753. /package/dist/chunks/{reference-j5zkgpj8.js → state-j5zkgpj8.js} +0 -0
  754. /package/dist/chunks/{reference-jjkms2e6.js → state-jjkms2e6.js} +0 -0
  755. /package/dist/chunks/{reference-jr7sbwjy.js → state-jr7sbwjy.js} +0 -0
  756. /package/dist/chunks/{reference-jwfs4k6c.js → state-jwfs4k6c.js} +0 -0
  757. /package/dist/chunks/{reference-jze0r7bz.js → state-jze0r7bz.js} +0 -0
  758. /package/dist/chunks/{reference-jzg6c2d5.js → state-jzg6c2d5.js} +0 -0
  759. /package/dist/chunks/{reference-m18g726c.js → state-m18g726c.js} +0 -0
  760. /package/dist/chunks/{reference-mp448xyj.js → state-mp448xyj.js} +0 -0
  761. /package/dist/chunks/{reference-msx8hqn2.js → state-msx8hqn2.js} +0 -0
  762. /package/dist/chunks/{reference-n05xt0ee.js → state-n05xt0ee.js} +0 -0
  763. /package/dist/chunks/{reference-n3j8tn72.js → state-n3j8tn72.js} +0 -0
  764. /package/dist/chunks/{reference-njntx4h6.js → state-njntx4h6.js} +0 -0
  765. /package/dist/chunks/{reference-pkyv6v7h.js → state-pkyv6v7h.js} +0 -0
  766. /package/dist/chunks/{reference-pyv0edze.js → state-pyv0edze.js} +0 -0
  767. /package/dist/chunks/{reference-q3sfg36h.js → state-q3sfg36h.js} +0 -0
  768. /package/dist/chunks/{reference-q74kybfr.js → state-q74kybfr.js} +0 -0
  769. /package/dist/chunks/{reference-qaymkmh1.js → state-qaymkmh1.js} +0 -0
  770. /package/dist/chunks/{reference-qb87gjwd.js → state-qb87gjwd.js} +0 -0
  771. /package/dist/chunks/{reference-qfa1cgps.js → state-qfa1cgps.js} +0 -0
  772. /package/dist/chunks/{reference-qg3g05ea.js → state-qg3g05ea.js} +0 -0
  773. /package/dist/chunks/{reference-qrg20bc0.js → state-qrg20bc0.js} +0 -0
  774. /package/dist/chunks/{reference-rcb2kzg1.js → state-rcb2kzg1.js} +0 -0
  775. /package/dist/chunks/{reference-sdp7kfr6.js → state-sdp7kfr6.js} +0 -0
  776. /package/dist/chunks/{reference-ssg3fenm.js → state-ssg3fenm.js} +0 -0
  777. /package/dist/chunks/{reference-ve7vex1e.js → state-ve7vex1e.js} +0 -0
  778. /package/dist/chunks/{reference-w803qqfp.js → state-w803qqfp.js} +0 -0
  779. /package/dist/chunks/{reference-wc3fc9cn.js → state-wc3fc9cn.js} +0 -0
  780. /package/dist/chunks/{reference-wer8tq1h.js → state-wer8tq1h.js} +0 -0
  781. /package/dist/chunks/{reference-wjj7prxr.js → state-wjj7prxr.js} +0 -0
  782. /package/dist/chunks/{reference-wtztk69x.js → state-wtztk69x.js} +0 -0
  783. /package/dist/chunks/{reference-x0ckcb58.js → state-x0ckcb58.js} +0 -0
  784. /package/dist/chunks/{reference-x61499pn.js → state-x61499pn.js} +0 -0
  785. /package/dist/chunks/{reference-y44na4kk.js → state-y44na4kk.js} +0 -0
  786. /package/dist/chunks/{reference-y8f7s663.js → state-y8f7s663.js} +0 -0
  787. /package/dist/chunks/{reference-ygaqb7jw.js → state-ygaqb7jw.js} +0 -0
  788. /package/dist/chunks/{reference-ym463w8f.js → state-ym463w8f.js} +0 -0
  789. /package/dist/chunks/{reference-z5v4ffb3.js → state-z5v4ffb3.js} +0 -0
  790. /package/dist/chunks/{reference-z9919s4g.js → state-z9919s4g.js} +0 -0
@@ -1,36 +1,27 @@
1
1
  import {
2
- Service83,
3
- node87
4
- } from "./reference-j6wkh22k.js";
2
+ Service84,
3
+ node88
4
+ } from "./state-vxrbht7e.js";
5
5
  import {
6
6
  shutdown2,
7
7
  create3
8
- } from "./reference-rdw6cm16.js";
8
+ } from "./state-rdw6cm16.js";
9
9
  import {
10
10
  key2
11
- } from "./reference-addxnjmp.js";
11
+ } from "./state-gqtdsdt7.js";
12
12
  import {
13
- ID14,
14
- Service78,
15
- node82,
16
- Event18
17
- } from "./reference-xstzgqxx.js";
13
+ ID9,
14
+ Service68,
15
+ node71,
16
+ Event16
17
+ } from "./state-b69axjbw.js";
18
18
  import {
19
19
  Service81,
20
20
  node85
21
- } from "./reference-sxw208y2.js";
21
+ } from "./state-2sfc2842.js";
22
22
  import {
23
23
  __export
24
- } from "./reference-9rqn6x4v.js";
25
-
26
- // src/aisdk-native.ts
27
- var exports_aisdk_native = {};
28
- __export(exports_aisdk_native, {
29
- AISDKNative: () => exports_aisdk_native,
30
- native: () => native2,
31
- rewrite: () => rewrite2
32
- });
33
- import { Effect as Effect2, Option as Option2, Schema as Schema2, Struct as Struct2 } from "effect";
24
+ } from "./state-9rqn6x4v.js";
34
25
 
35
26
  // src/provider.ts
36
27
  var exports_provider3 = {};
@@ -39,13 +30,13 @@ __export(exports_provider3, {
39
30
  Compaction: () => Compaction3,
40
31
  DEFAULT_CHUNK_TIMEOUT_MS: () => DEFAULT_CHUNK_TIMEOUT_MS2,
41
32
  DEFAULT_TIMEOUT_MS: () => DEFAULT_TIMEOUT_MS3,
42
- Event: () => Event17,
43
- ID: () => ID13,
44
- Info: () => Info22,
33
+ Event: () => Event15,
34
+ ID: () => ID8,
35
+ Info: () => Info17,
45
36
  LoadError: () => LoadError3,
46
37
  Provider: () => exports_provider3,
47
- Request: () => Request3,
48
- Service: () => Service77,
38
+ Request: () => Request2,
39
+ Service: () => Service67,
49
40
  Settings: () => Settings2,
50
41
  Transport: () => Transport2,
51
42
  aisdk: () => aisdk2,
@@ -56,12 +47,12 @@ __export(exports_provider3, {
56
47
  mergeOverlay: () => mergeOverlay2,
57
48
  modelSettings: () => modelSettings2,
58
49
  nativeSettings: () => nativeSettings2,
59
- node: () => node81,
50
+ node: () => node70,
60
51
  packageName: () => packageName2,
61
52
  timeout: () => timeout2,
62
53
  timeouts: () => timeouts2
63
54
  });
64
- import { Context, Effect, Layer, Option, Schema, Stream, Struct } from "effect";
55
+ import { Context, Effect as Effect2, Layer, Option as Option2, Schema as Schema2, Stream, Struct as Struct2 } from "effect";
65
56
  import { Provider } from "@opencode/schema/provider";
66
57
  import { Model } from "@opencode/schema/model";
67
58
  import { makeLocationNode } from "@opencode/util/effect/app-node";
@@ -70,8 +61,273 @@ import { isRecord } from "@opencode/ai/utils/record";
70
61
  import { importModule, resolveModule } from "@opencode/util/runtime-import";
71
62
  import { Credential } from "@opencode/schema/credential";
72
63
  import { freeze } from "immer";
73
- import { Event as Event17 } from "@opencode/schema/provider";
74
- var ID13 = Provider.ID;
64
+
65
+ // src/aisdk-native.ts
66
+ var exports_aisdk_native = {};
67
+ __export(exports_aisdk_native, {
68
+ AISDKNative: () => exports_aisdk_native,
69
+ native: () => native2,
70
+ rewrite: () => rewrite2
71
+ });
72
+ import { Effect, Option, Schema, Struct } from "effect";
73
+ function rewrite2(target, input) {
74
+ if (input.specifier === undefined)
75
+ return;
76
+ const plain = resolve(input.specifier, input);
77
+ if (!plain)
78
+ return;
79
+ const settings = decode(target.settings ?? {});
80
+ const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
81
+ const translated = options(replacement, input.modelID, settings);
82
+ if (target.package !== undefined || replacement !== input.specifier)
83
+ target.package = replacement;
84
+ target.settings = target.settings === undefined ? undefined : {
85
+ ...translated.settings,
86
+ ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
87
+ };
88
+ target.headers = mergeHeaders2(translated.headers, target.headers);
89
+ target.body = mergeOverlay2(translated.body, target.body);
90
+ target.variants = target.variants?.map((variant) => {
91
+ const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
92
+ const headers = mergeHeaders2(overlay.headers, variant.headers);
93
+ const body = mergeOverlay2(overlay.body, variant.body);
94
+ return {
95
+ id: variant.id,
96
+ ...variant.settings === undefined ? {} : { settings: overlay.settings },
97
+ ...headers === undefined ? {} : { headers },
98
+ ...body === undefined ? {} : { body }
99
+ };
100
+ });
101
+ }
102
+ var PACKAGES = {
103
+ "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
104
+ "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
105
+ "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
106
+ "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
107
+ "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
108
+ "@ai-sdk/cohere": "@opencode/ai/providers/cohere",
109
+ "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
110
+ "@ai-sdk/google": "@opencode/ai/providers/google",
111
+ "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
112
+ "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
113
+ "@ai-sdk/groq": "@opencode/ai/providers/groq",
114
+ "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
115
+ "@ai-sdk/openai": "@opencode/ai/providers/openai",
116
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
117
+ "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
118
+ "@ai-sdk/xai": "@opencode/ai/providers/xai",
119
+ "@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
120
+ "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
121
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
122
+ "venice-ai-sdk-provider": "@opencode/ai/providers/venice"
123
+ };
124
+ var protocols = (name) => ({
125
+ "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
126
+ "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
127
+ "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
128
+ });
129
+ var HOSTS = {
130
+ alibaba: protocols("alibaba"),
131
+ "alibaba-cn": protocols("alibaba"),
132
+ "alibaba-coding-plan": protocols("alibaba"),
133
+ "alibaba-coding-plan-cn": protocols("alibaba"),
134
+ "alibaba-token-plan": protocols("alibaba"),
135
+ "alibaba-token-plan-cn": protocols("alibaba"),
136
+ baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
137
+ "cloudflare-ai-gateway": {
138
+ "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
139
+ "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
140
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
141
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
142
+ },
143
+ cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
144
+ "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
145
+ deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
146
+ digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
147
+ "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
148
+ "google-vertex": {
149
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat",
150
+ "@ai-sdk/mistral": "@opencode/ai/providers/google-vertex/mistral"
151
+ },
152
+ "kimi-for-coding": protocols("moonshot"),
153
+ meta: protocols("meta"),
154
+ minimax: protocols("minimax"),
155
+ "minimax-cn": protocols("minimax"),
156
+ "minimax-coding-plan": protocols("minimax"),
157
+ "minimax-cn-coding-plan": protocols("minimax"),
158
+ moonshotai: protocols("moonshot"),
159
+ "moonshotai-cn": protocols("moonshot"),
160
+ zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
161
+ "zai-coding-plan": protocols("zai-coding-plan"),
162
+ zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
163
+ "zhipuai-coding-plan": protocols("zai-coding-plan")
164
+ };
165
+ var NATIVE = new Set([
166
+ ...Object.values(PACKAGES),
167
+ ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
168
+ "@opencode/ai/providers/azure/chat",
169
+ "@opencode/ai/providers/amazon-bedrock/mantle",
170
+ "@opencode/ai/providers/amazon-bedrock/mantle/chat",
171
+ "@opencode/ai/providers/amazon-bedrock/mantle/responses"
172
+ ]);
173
+ function native2(npm, context) {
174
+ const host = HOSTS[context.providerID]?.[npm];
175
+ if (host)
176
+ return host;
177
+ if (npm === "@ai-sdk/amazon-bedrock/mantle")
178
+ return mantle(context.modelID);
179
+ if (npm === "@ai-sdk/azure" && azureChat(context))
180
+ return "@opencode/ai/providers/azure/chat";
181
+ return PACKAGES[npm];
182
+ }
183
+ var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
184
+ var mantle = (modelID) => {
185
+ if (modelID === undefined)
186
+ return "@opencode/ai/providers/amazon-bedrock/mantle";
187
+ return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
188
+ };
189
+ function resolve(specifier, context) {
190
+ const npm = packageName2(specifier);
191
+ if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
192
+ return native2(npm, context);
193
+ if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
194
+ return mantle(context.modelID);
195
+ if (npm === "@opencode/ai/providers/azure/responses" && azureChat(context))
196
+ return "@opencode/ai/providers/azure/chat";
197
+ return NATIVE.has(npm) ? npm : undefined;
198
+ }
199
+ function options(replacement, modelID, settings) {
200
+ const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
201
+ const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
202
+ const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
203
+ return {
204
+ settings: {
205
+ ...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
206
+ ...thinking === undefined ? {} : { thinking }
207
+ },
208
+ ...settings.headers === undefined ? {} : { headers: settings.headers },
209
+ ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
210
+ ...converse ? bedrockRequest(modelID, settings) : {},
211
+ ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
212
+ };
213
+ }
214
+ var BEDROCK_KEYS = [
215
+ "bearerToken",
216
+ "endpoint",
217
+ "credentials",
218
+ "credentialProvider",
219
+ "accessKeyId",
220
+ "secretAccessKey",
221
+ "sessionToken"
222
+ ];
223
+ var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
224
+ function bedrockSettings(settings, converse) {
225
+ const region = settings.region ?? settings.credentials?.region;
226
+ const credentials = settings.credentials ?? settings;
227
+ const baseURL = settings.baseURL ?? settings.endpoint;
228
+ return {
229
+ ...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
230
+ ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
231
+ ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
232
+ ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
233
+ credentials: {
234
+ ...region === undefined ? {} : { region },
235
+ accessKeyId: credentials.accessKeyId,
236
+ secretAccessKey: credentials.secretAccessKey,
237
+ ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
238
+ }
239
+ }
240
+ };
241
+ }
242
+ function bedrockThinking(modelID, settings) {
243
+ const reasoning = settings.reasoningConfig;
244
+ if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
245
+ return;
246
+ return { type: "enabled", budgetTokens: reasoning.budgetTokens };
247
+ }
248
+ function bedrockRequest(modelID, settings) {
249
+ const additional = settings.additionalModelRequestFields ?? {};
250
+ const reasoning = settings.reasoningConfig;
251
+ const anthropic = modelID?.includes("anthropic") ?? false;
252
+ const openai = modelID?.includes("openai.") ?? false;
253
+ const harmony = modelID?.includes("openai.gpt-oss") ?? false;
254
+ const effort = reasoning?.maxReasoningEffort;
255
+ const type = reasoning?.type;
256
+ const budget = reasoning?.budgetTokens;
257
+ const display = reasoning?.display;
258
+ const betas = settings.anthropicBeta ?? [];
259
+ const fields = mergeOverlay2(additional, {
260
+ ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
261
+ ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
262
+ ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
263
+ ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
264
+ ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
265
+ ...!anthropic && !openai && effort !== undefined ? {
266
+ reasoningConfig: {
267
+ ...type === undefined || type === "adaptive" ? {} : { type },
268
+ ...budget === undefined ? {} : { budgetTokens: budget },
269
+ maxReasoningEffort: effort
270
+ }
271
+ } : {}
272
+ });
273
+ const body = {
274
+ ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
275
+ ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
276
+ };
277
+ return Object.keys(body).length === 0 ? {} : { body };
278
+ }
279
+ var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
280
+ function openRouterRequest(settings) {
281
+ const headers = mergeHeaders2({
282
+ ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
283
+ ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
284
+ ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
285
+ }, settings.headers) ?? {};
286
+ return Object.keys(headers).length === 0 ? {} : { headers };
287
+ }
288
+ var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
289
+ var Credentials = Schema.Struct({
290
+ accessKeyId: Schema.String,
291
+ secretAccessKey: Schema.String,
292
+ sessionToken: lenient(Schema.String),
293
+ region: lenient(Schema.String)
294
+ });
295
+ var Legacy = Schema.StructWithRest(Schema.Struct({
296
+ apiKey: lenient(Schema.String),
297
+ baseURL: lenient(Schema.String),
298
+ headers: lenient(Schema.Record(Schema.String, Schema.String)),
299
+ extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
300
+ useCompletionUrls: lenient(Schema.Boolean),
301
+ auth: lenient(Schema.Literals(["bearer", "sigv4"])),
302
+ bearerToken: lenient(Schema.String),
303
+ endpoint: lenient(Schema.String),
304
+ region: lenient(Schema.String),
305
+ credentials: lenient(Credentials),
306
+ accessKeyId: lenient(Schema.String),
307
+ secretAccessKey: lenient(Schema.String),
308
+ sessionToken: lenient(Schema.String),
309
+ anthropicBeta: lenient(Schema.Array(Schema.String)),
310
+ serviceTier: lenient(Schema.String),
311
+ reasoningConfig: lenient(Schema.Struct({
312
+ type: lenient(Schema.String),
313
+ display: lenient(Schema.String),
314
+ maxReasoningEffort: lenient(Schema.String),
315
+ budgetTokens: lenient(Schema.Number)
316
+ })),
317
+ additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
318
+ anthropic_beta: lenient(Schema.Array(Schema.String)),
319
+ output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
320
+ reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
321
+ }), [Schema.Record(Schema.String, Schema.Unknown)])),
322
+ appName: lenient(Schema.String),
323
+ appUrl: lenient(Schema.String),
324
+ api_keys: lenient(Schema.Record(Schema.String, Schema.String))
325
+ }), [Schema.Record(Schema.String, Schema.Unknown)]);
326
+ var decode = Schema.decodeUnknownSync(Legacy);
327
+
328
+ // src/provider.ts
329
+ import { Event as Event15 } from "@opencode/schema/provider";
330
+ var ID8 = Provider.ID;
75
331
  var AISDK_PREFIX2 = "aisdk:";
76
332
  var isAISDK2 = (value) => value?.startsWith(AISDK_PREFIX2) ?? false;
77
333
  var aisdk2 = (value) => isAISDK2(value) ? value : `${AISDK_PREFIX2}${value}`;
@@ -82,12 +338,12 @@ function packageName2(value) {
82
338
  return value;
83
339
  return value.slice(AISDK_PREFIX2.length);
84
340
  }
85
- var JsonRecord = Schema.Record(Schema.String, Schema.Json);
86
- var decodeJsonRecord = Schema.decodeUnknownSync(JsonRecord);
341
+ var JsonRecord = Schema2.Record(Schema2.String, Schema2.Json);
342
+ var decodeJsonRecord = Schema2.decodeUnknownSync(JsonRecord);
87
343
 
88
- class LoadError3 extends Schema.TaggedError()("Provider.LoadError", {
89
- package: Schema.String,
90
- cause: Schema.Defect()
344
+ class LoadError3 extends Schema2.TaggedError()("Provider.LoadError", {
345
+ package: Schema2.String,
346
+ cause: Schema2.Defect()
91
347
  }) {
92
348
  }
93
349
  var packages = new Map;
@@ -168,12 +424,12 @@ var builtins = new Map([
168
424
  () => import("@opencode/ai/providers/zai-coding-plan/responses")
169
425
  ]
170
426
  ]);
171
- var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
427
+ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
172
428
  const specifier = packageName2(input);
173
429
  const builtin = builtins.get(specifier);
174
430
  if (builtin)
175
431
  return yield* importPackage(specifier, specifier, builtin);
176
- const resolved = yield* Effect.sync(() => {
432
+ const resolved = yield* Effect2.sync(() => {
177
433
  if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
178
434
  return specifier;
179
435
  try {
@@ -192,8 +448,8 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
192
448
  }
193
449
  const parts = specifier.split("/");
194
450
  const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
195
- const installed = yield* npm.add(root).pipe(Effect.mapError((cause) => new LoadError3({ package: specifier, cause })));
196
- const entrypoint = yield* Effect.try({
451
+ const installed = yield* npm.add(root).pipe(Effect2.mapError((cause) => new LoadError3({ package: specifier, cause })));
452
+ const entrypoint = yield* Effect2.try({
197
453
  try: () => resolveModule(specifier, installed.directory),
198
454
  catch: (cause) => new LoadError3({ package: specifier, cause })
199
455
  });
@@ -202,16 +458,16 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
202
458
  var CORE_KEYS = ["chunkTimeout", "compaction", "encoding", "fetch", "headerTimeout", "timeout", "transport"];
203
459
  var PROVIDER_ONLY_KEYS = ["chunkTimeout", "headerTimeout", "timeout", "transport"];
204
460
  function nativeSettings2(settings) {
205
- return Struct.omit(settings, CORE_KEYS);
461
+ return Struct2.omit(settings, CORE_KEYS);
206
462
  }
207
463
  function modelSettings2(settings) {
208
- return settings && Struct.omit(settings, PROVIDER_ONLY_KEYS);
464
+ return settings && Struct2.omit(settings, PROVIDER_ONLY_KEYS);
209
465
  }
210
- var decodeTimeout = Schema.decodeUnknownOption(HttpTimeout);
466
+ var decodeTimeout = Schema2.decodeUnknownOption(HttpTimeout);
211
467
  var DEFAULT_TIMEOUT_MS3 = 300000;
212
468
  var DEFAULT_CHUNK_TIMEOUT_MS2 = 900000;
213
469
  function timeout2(value) {
214
- return Option.getOrUndefined(decodeTimeout(value));
470
+ return Option2.getOrUndefined(decodeTimeout(value));
215
471
  }
216
472
  function timeouts2(settings) {
217
473
  return {
@@ -220,9 +476,9 @@ function timeouts2(settings) {
220
476
  chunkTimeout: timeout2(settings.chunkTimeout) ?? DEFAULT_CHUNK_TIMEOUT_MS2
221
477
  };
222
478
  }
223
- var decodeEncoding = Schema.decodeUnknownOption(Provider.Encoding);
479
+ var decodeEncoding = Schema2.decodeUnknownOption(Provider.Encoding);
224
480
  function encoding2(settings) {
225
- return Option.getOrUndefined(decodeEncoding(settings.encoding));
481
+ return Option2.getOrUndefined(decodeEncoding(settings.encoding));
226
482
  }
227
483
  function mergeOverlay2(base, overlay) {
228
484
  if (base === undefined)
@@ -249,13 +505,13 @@ function mergeHeaders2(base, overlay) {
249
505
  return result;
250
506
  }, new Map).values());
251
507
  }
252
- var Request3 = Provider.Request;
508
+ var Request2 = Provider.Request;
253
509
  var Compaction3 = Provider.Compaction;
254
510
  var Transport2 = Provider.Transport;
255
511
  var Settings2 = Provider.Settings;
256
- var Info22 = Provider.Info;
512
+ var Info17 = Provider.Info;
257
513
 
258
- class Service77 extends Context.Service()("@opencode/Provider") {
514
+ class Service67 extends Context.Service()("@opencode/Provider") {
259
515
  }
260
516
  var definitions = new WeakMap;
261
517
  function index(providerID, models) {
@@ -268,9 +524,9 @@ function index(providerID, models) {
268
524
  definitions.set(models, indexes);
269
525
  return result;
270
526
  }
271
- var layer = Layer.effect(Service77, Effect.gen(function* () {
272
- const bus = yield* Service83;
273
- const integrations = yield* Service78;
527
+ var layer = Layer.effect(Service67, Effect2.gen(function* () {
528
+ const bus = yield* Service84;
529
+ const integrations = yield* Service68;
274
530
  const location = yield* Service81;
275
531
  const state = create3({
276
532
  name: "provider",
@@ -282,7 +538,7 @@ var layer = Layer.effect(Service77, Effect.gen(function* () {
282
538
  const current = records.get(id);
283
539
  if (current)
284
540
  return current;
285
- const added = { provider: Info22.empty(id), models: new Map };
541
+ const added = { provider: Info17.empty(id), models: new Map };
286
542
  records.set(id, added);
287
543
  maps.add(added.models);
288
544
  return added;
@@ -350,9 +606,9 @@ var layer = Layer.effect(Service77, Effect.gen(function* () {
350
606
  },
351
607
  notify: () => notify
352
608
  });
353
- yield* Effect.addFinalizer(() => shutdown2(state.reload()));
609
+ yield* Effect2.addFinalizer(() => shutdown2(state.reload()));
354
610
  let cached;
355
- const snapshot = Effect.fn("Provider.snapshot")(function* () {
611
+ const snapshot = Effect2.fn("Provider.snapshot")(function* () {
356
612
  while (true) {
357
613
  const revision = integrations.revision();
358
614
  const records = state.get();
@@ -363,7 +619,7 @@ var layer = Layer.effect(Service77, Effect.gen(function* () {
363
619
  const available = Array.from(records.values()).filter((record) => {
364
620
  if (record.provider.activation === "disabled")
365
621
  return false;
366
- const integration = byID.get(record.provider.integrationID ?? ID14.make(record.provider.id));
622
+ const integration = byID.get(record.provider.integrationID ?? ID9.make(record.provider.id));
367
623
  if (record.sourceConnection && key2(record.sourceConnection) !== key2(integration?.connections[0]))
368
624
  return false;
369
625
  if (record.provider.activation === "enabled")
@@ -380,7 +636,7 @@ var layer = Layer.effect(Service77, Effect.gen(function* () {
380
636
  }
381
637
  });
382
638
  let published;
383
- const notify = Effect.gen(function* () {
639
+ const notify = Effect2.gen(function* () {
384
640
  const value = yield* snapshot();
385
641
  if (value === published)
386
642
  return;
@@ -389,19 +645,19 @@ var layer = Layer.effect(Service77, Effect.gen(function* () {
389
645
  location: { directory: location.directory, workspaceID: location.workspaceID }
390
646
  });
391
647
  });
392
- yield* bus.subscribe([Event18.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect.forkScoped({ startImmediately: true }));
393
- return Service77.of({
648
+ yield* bus.subscribe([Event16.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect2.forkScoped({ startImmediately: true }));
649
+ return Service67.of({
394
650
  transform: state.transform,
395
651
  reload: state.reload,
396
- get: Effect.fn("Provider.get")((id) => Effect.sync(() => freeze(state.get().get(id)?.provider, true))),
397
- all: Effect.fn("Provider.all")(() => Effect.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
398
- available: Effect.fn("Provider.available")(() => snapshot().pipe(Effect.map((value) => value.providers))),
652
+ get: Effect2.fn("Provider.get")((id) => Effect2.sync(() => freeze(state.get().get(id)?.provider, true))),
653
+ all: Effect2.fn("Provider.all")(() => Effect2.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
654
+ available: Effect2.fn("Provider.available")(() => snapshot().pipe(Effect2.map((value) => value.providers))),
399
655
  snapshot
400
656
  });
401
657
  }));
402
- var node81 = makeLocationNode({ service: Service77, layer, deps: [node87, node82, node85] });
403
- var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
404
- const module = yield* Effect.tryPromise({
658
+ var node70 = makeLocationNode({ service: Service67, layer, deps: [node88, node71, node85] });
659
+ var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
660
+ const module = yield* Effect2.tryPromise({
405
661
  try: () => {
406
662
  const existing = packages.get(entrypoint);
407
663
  if (existing)
@@ -421,260 +677,4 @@ var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, en
421
677
  return module;
422
678
  });
423
679
 
424
- // src/aisdk-native.ts
425
- function rewrite2(target, input) {
426
- if (input.specifier === undefined)
427
- return;
428
- const plain = resolve(input.specifier, input);
429
- if (!plain)
430
- return;
431
- const settings = decode(target.settings ?? {});
432
- const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
433
- const translated = options(replacement, input.modelID, settings);
434
- if (target.package !== undefined || replacement !== input.specifier)
435
- target.package = replacement;
436
- target.settings = target.settings === undefined ? undefined : {
437
- ...translated.settings,
438
- ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
439
- };
440
- target.headers = mergeHeaders2(translated.headers, target.headers);
441
- target.body = mergeOverlay2(translated.body, target.body);
442
- target.variants = target.variants?.map((variant) => {
443
- const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
444
- const headers = mergeHeaders2(overlay.headers, variant.headers);
445
- const body = mergeOverlay2(overlay.body, variant.body);
446
- return {
447
- id: variant.id,
448
- ...variant.settings === undefined ? {} : { settings: overlay.settings },
449
- ...headers === undefined ? {} : { headers },
450
- ...body === undefined ? {} : { body }
451
- };
452
- });
453
- }
454
- var PACKAGES = {
455
- "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
456
- "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
457
- "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
458
- "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
459
- "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
460
- "@ai-sdk/cohere": "@opencode/ai/providers/cohere",
461
- "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
462
- "@ai-sdk/google": "@opencode/ai/providers/google",
463
- "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
464
- "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
465
- "@ai-sdk/groq": "@opencode/ai/providers/groq",
466
- "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
467
- "@ai-sdk/openai": "@opencode/ai/providers/openai",
468
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
469
- "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
470
- "@ai-sdk/xai": "@opencode/ai/providers/xai",
471
- "@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
472
- "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
473
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
474
- "venice-ai-sdk-provider": "@opencode/ai/providers/venice"
475
- };
476
- var protocols = (name) => ({
477
- "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
478
- "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
479
- "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
480
- });
481
- var HOSTS = {
482
- alibaba: protocols("alibaba"),
483
- "alibaba-cn": protocols("alibaba"),
484
- "alibaba-coding-plan": protocols("alibaba"),
485
- "alibaba-coding-plan-cn": protocols("alibaba"),
486
- "alibaba-token-plan": protocols("alibaba"),
487
- "alibaba-token-plan-cn": protocols("alibaba"),
488
- baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
489
- "cloudflare-ai-gateway": {
490
- "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
491
- "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
492
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
493
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
494
- },
495
- cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
496
- "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
497
- deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
498
- digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
499
- "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
500
- "google-vertex": {
501
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat",
502
- "@ai-sdk/mistral": "@opencode/ai/providers/google-vertex/mistral"
503
- },
504
- "kimi-for-coding": protocols("moonshot"),
505
- meta: protocols("meta"),
506
- minimax: protocols("minimax"),
507
- "minimax-cn": protocols("minimax"),
508
- "minimax-coding-plan": protocols("minimax"),
509
- "minimax-cn-coding-plan": protocols("minimax"),
510
- moonshotai: protocols("moonshot"),
511
- "moonshotai-cn": protocols("moonshot"),
512
- zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
513
- "zai-coding-plan": protocols("zai-coding-plan"),
514
- zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
515
- "zhipuai-coding-plan": protocols("zai-coding-plan")
516
- };
517
- var NATIVE = new Set([
518
- ...Object.values(PACKAGES),
519
- ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
520
- "@opencode/ai/providers/azure/chat",
521
- "@opencode/ai/providers/amazon-bedrock/mantle",
522
- "@opencode/ai/providers/amazon-bedrock/mantle/chat",
523
- "@opencode/ai/providers/amazon-bedrock/mantle/responses"
524
- ]);
525
- function native2(npm, context) {
526
- const host = HOSTS[context.providerID]?.[npm];
527
- if (host)
528
- return host;
529
- if (npm === "@ai-sdk/amazon-bedrock/mantle")
530
- return mantle(context.modelID);
531
- if (npm === "@ai-sdk/azure" && azureChat(context))
532
- return "@opencode/ai/providers/azure/chat";
533
- return PACKAGES[npm];
534
- }
535
- var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
536
- var mantle = (modelID) => {
537
- if (modelID === undefined)
538
- return "@opencode/ai/providers/amazon-bedrock/mantle";
539
- return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
540
- };
541
- function resolve(specifier, context) {
542
- const npm = packageName2(specifier);
543
- if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
544
- return native2(npm, context);
545
- if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
546
- return mantle(context.modelID);
547
- if (npm === "@opencode/ai/providers/azure/responses" && azureChat(context))
548
- return "@opencode/ai/providers/azure/chat";
549
- return NATIVE.has(npm) ? npm : undefined;
550
- }
551
- function options(replacement, modelID, settings) {
552
- const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
553
- const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
554
- const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
555
- return {
556
- settings: {
557
- ...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
558
- ...thinking === undefined ? {} : { thinking }
559
- },
560
- ...settings.headers === undefined ? {} : { headers: settings.headers },
561
- ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
562
- ...converse ? bedrockRequest(modelID, settings) : {},
563
- ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
564
- };
565
- }
566
- var BEDROCK_KEYS = [
567
- "bearerToken",
568
- "endpoint",
569
- "credentials",
570
- "credentialProvider",
571
- "accessKeyId",
572
- "secretAccessKey",
573
- "sessionToken"
574
- ];
575
- var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
576
- function bedrockSettings(settings, converse) {
577
- const region = settings.region ?? settings.credentials?.region;
578
- const credentials = settings.credentials ?? settings;
579
- const baseURL = settings.baseURL ?? settings.endpoint;
580
- return {
581
- ...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
582
- ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
583
- ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
584
- ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
585
- credentials: {
586
- ...region === undefined ? {} : { region },
587
- accessKeyId: credentials.accessKeyId,
588
- secretAccessKey: credentials.secretAccessKey,
589
- ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
590
- }
591
- }
592
- };
593
- }
594
- function bedrockThinking(modelID, settings) {
595
- const reasoning = settings.reasoningConfig;
596
- if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
597
- return;
598
- return { type: "enabled", budgetTokens: reasoning.budgetTokens };
599
- }
600
- function bedrockRequest(modelID, settings) {
601
- const additional = settings.additionalModelRequestFields ?? {};
602
- const reasoning = settings.reasoningConfig;
603
- const anthropic = modelID?.includes("anthropic") ?? false;
604
- const openai = modelID?.includes("openai.") ?? false;
605
- const harmony = modelID?.includes("openai.gpt-oss") ?? false;
606
- const effort = reasoning?.maxReasoningEffort;
607
- const type = reasoning?.type;
608
- const budget = reasoning?.budgetTokens;
609
- const display = reasoning?.display;
610
- const betas = settings.anthropicBeta ?? [];
611
- const fields = mergeOverlay2(additional, {
612
- ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
613
- ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
614
- ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
615
- ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
616
- ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
617
- ...!anthropic && !openai && effort !== undefined ? {
618
- reasoningConfig: {
619
- ...type === undefined || type === "adaptive" ? {} : { type },
620
- ...budget === undefined ? {} : { budgetTokens: budget },
621
- maxReasoningEffort: effort
622
- }
623
- } : {}
624
- });
625
- const body = {
626
- ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
627
- ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
628
- };
629
- return Object.keys(body).length === 0 ? {} : { body };
630
- }
631
- var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
632
- function openRouterRequest(settings) {
633
- const headers = mergeHeaders2({
634
- ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
635
- ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
636
- ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
637
- }, settings.headers) ?? {};
638
- return Object.keys(headers).length === 0 ? {} : { headers };
639
- }
640
- var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option2.some(undefined)))));
641
- var Credentials = Schema2.Struct({
642
- accessKeyId: Schema2.String,
643
- secretAccessKey: Schema2.String,
644
- sessionToken: lenient(Schema2.String),
645
- region: lenient(Schema2.String)
646
- });
647
- var Legacy = Schema2.StructWithRest(Schema2.Struct({
648
- apiKey: lenient(Schema2.String),
649
- baseURL: lenient(Schema2.String),
650
- headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
651
- extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
652
- useCompletionUrls: lenient(Schema2.Boolean),
653
- auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
654
- bearerToken: lenient(Schema2.String),
655
- endpoint: lenient(Schema2.String),
656
- region: lenient(Schema2.String),
657
- credentials: lenient(Credentials),
658
- accessKeyId: lenient(Schema2.String),
659
- secretAccessKey: lenient(Schema2.String),
660
- sessionToken: lenient(Schema2.String),
661
- anthropicBeta: lenient(Schema2.Array(Schema2.String)),
662
- serviceTier: lenient(Schema2.String),
663
- reasoningConfig: lenient(Schema2.Struct({
664
- type: lenient(Schema2.String),
665
- display: lenient(Schema2.String),
666
- maxReasoningEffort: lenient(Schema2.String),
667
- budgetTokens: lenient(Schema2.Number)
668
- })),
669
- additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
670
- anthropic_beta: lenient(Schema2.Array(Schema2.String)),
671
- output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
672
- reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
673
- }), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
674
- appName: lenient(Schema2.String),
675
- appUrl: lenient(Schema2.String),
676
- api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
677
- }), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
678
- var decode = Schema2.decodeUnknownSync(Legacy);
679
-
680
- export { rewrite2, native2, exports_aisdk_native, ID13, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, DEFAULT_TIMEOUT_MS3, DEFAULT_CHUNK_TIMEOUT_MS2, timeout2, timeouts2, encoding2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info22, Service77, node81, exports_provider3, Event17 };
680
+ export { ID8, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, DEFAULT_TIMEOUT_MS3, DEFAULT_CHUNK_TIMEOUT_MS2, timeout2, timeouts2, encoding2, mergeOverlay2, mergeHeaders2, Request2, Compaction3, Transport2, Settings2, Info17, Service67, node70, exports_provider3, Event15, rewrite2, native2, exports_aisdk_native };