@opencode/core 0.0.0-dev-20384 → 0.0.0-dev-20386

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 (800) hide show
  1. package/dist/account/sql.js +1 -1
  2. package/dist/agent.js +83 -83
  3. package/dist/aisdk-native.js +89 -89
  4. package/dist/aisdk.js +94 -94
  5. package/dist/app.js +9 -9
  6. package/dist/bus.js +69 -69
  7. package/dist/chunks/{repository-cache-4pmjbv1q.js → bus-057z78dy.js} +24 -24
  8. package/dist/chunks/{repository-cache-jpeemenq.js → bus-0b07cytw.js} +4 -4
  9. package/dist/chunks/{repository-cache-dzydyd9h.js → bus-0b4yhjxs.js} +48 -48
  10. package/dist/chunks/{repository-cache-395chjsb.js → bus-0dhvyftb.js} +32 -32
  11. package/dist/chunks/{repository-cache-0rts7qdn.js → bus-0gjptt89.js} +57 -57
  12. package/dist/chunks/{repository-cache-j5w2yx54.js → bus-0jkw1j53.js} +6 -6
  13. package/dist/chunks/{repository-cache-jv2beyhx.js → bus-0mpp7kje.js} +11 -11
  14. package/dist/chunks/{repository-cache-0paq2nw3.js → bus-0paq2nw3.js} +1 -1
  15. package/dist/chunks/{repository-cache-s13yc4gs.js → bus-12yh3v9m.js} +43 -43
  16. package/dist/chunks/{repository-cache-ffmrpess.js → bus-137fdrk4.js} +8 -8
  17. package/dist/chunks/bus-187kn7r0.js +507 -0
  18. package/dist/chunks/{repository-cache-f2n192rq.js → bus-1acjjqhc.js} +4 -4
  19. package/dist/chunks/{repository-cache-73tb2d7t.js → bus-1bbkgx8g.js} +3 -3
  20. package/dist/chunks/{repository-cache-1dazxqgg.js → bus-1dazxqgg.js} +2 -2
  21. package/dist/chunks/{repository-cache-ad4vgpbm.js → bus-1egn70ga.js} +32 -32
  22. package/dist/chunks/{repository-cache-jgrnma6d.js → bus-1g721s8n.js} +3 -3
  23. package/dist/chunks/{repository-cache-t1262myw.js → bus-1g8mdag0.js} +10 -10
  24. package/dist/chunks/{repository-cache-3w0edgpr.js → bus-1sf8sswz.js} +16 -16
  25. package/dist/chunks/{repository-cache-1ygqh575.js → bus-1ygqh575.js} +2 -2
  26. package/dist/chunks/{repository-cache-21r38tys.js → bus-21r38tys.js} +1 -1
  27. package/dist/chunks/{repository-cache-dgg5hry3.js → bus-26qjdhj3.js} +14 -14
  28. package/dist/chunks/{repository-cache-da443km9.js → bus-29jjt28q.js} +88 -88
  29. package/dist/chunks/{repository-cache-2a5m3afh.js → bus-2a5m3afh.js} +1 -1
  30. package/dist/chunks/{repository-cache-aeexf8fc.js → bus-2e474cp7.js} +17 -17
  31. package/dist/chunks/{repository-cache-d858xzj7.js → bus-2k71kv7p.js} +4 -4
  32. package/dist/chunks/{repository-cache-bsxd6m7c.js → bus-2ta68rf2.js} +7 -7
  33. package/dist/chunks/{repository-cache-0qb7pa1n.js → bus-2txne078.js} +8 -8
  34. package/dist/chunks/{repository-cache-k0dvd39k.js → bus-2y7xnc52.js} +9 -9
  35. package/dist/chunks/{repository-cache-h0h78a5e.js → bus-32sa0c0w.js} +16 -16
  36. package/dist/chunks/{repository-cache-3fc6dm20.js → bus-3fc6dm20.js} +1 -1
  37. package/dist/chunks/{repository-cache-3hepkmqq.js → bus-3hepkmqq.js} +1 -1
  38. package/dist/chunks/{repository-cache-tyk6hpg1.js → bus-3nyxp4kt.js} +23 -23
  39. package/dist/chunks/{repository-cache-cwapn2kk.js → bus-3rg5dt53.js} +17 -17
  40. package/dist/chunks/{repository-cache-3smtnn6g.js → bus-3smtnn6g.js} +1 -1
  41. package/dist/chunks/{repository-cache-3tvqynh2.js → bus-3tvqynh2.js} +1 -1
  42. package/dist/chunks/{repository-cache-974w5737.js → bus-3w2p8hyx.js} +23 -23
  43. package/dist/chunks/{repository-cache-mjd5dqnw.js → bus-3y3ca60k.js} +3 -3
  44. package/dist/chunks/{repository-cache-rnqxsqdw.js → bus-3y6qv6fa.js} +33 -33
  45. package/dist/chunks/{repository-cache-3zsf4n22.js → bus-3zsf4n22.js} +1 -1
  46. package/dist/chunks/{repository-cache-3556dn8t.js → bus-427t97hr.js} +1 -1
  47. package/dist/chunks/{repository-cache-ksbnj448.js → bus-453dwvt0.js} +181 -181
  48. package/dist/chunks/{repository-cache-5888xk6a.js → bus-46gydz25.js} +51 -51
  49. package/dist/chunks/{repository-cache-ss0epz44.js → bus-48dkvn4f.js} +11 -11
  50. package/dist/chunks/{repository-cache-37ea9c2d.js → bus-4a0nv7mx.js} +8 -8
  51. package/dist/chunks/{repository-cache-3vetqjk1.js → bus-4bj1y1rr.js} +36 -36
  52. package/dist/chunks/{repository-cache-hjhp6xxc.js → bus-4m9tr61w.js} +16 -16
  53. package/dist/chunks/{repository-cache-qsr9synt.js → bus-4n607a2z.js} +5 -5
  54. package/dist/chunks/{repository-cache-m0ecvezt.js → bus-4pbr4a79.js} +19 -19
  55. package/dist/chunks/{repository-cache-1kr9zwgv.js → bus-4tk06fn7.js} +20 -20
  56. package/dist/chunks/{repository-cache-be0emam3.js → bus-4zxcbstk.js} +31 -31
  57. package/dist/chunks/{repository-cache-54ma36ye.js → bus-54ma36ye.js} +1 -1
  58. package/dist/chunks/{repository-cache-5daktx2q.js → bus-5daktx2q.js} +1 -1
  59. package/dist/chunks/{repository-cache-6bn6zw9m.js → bus-5ehga51n.js} +3 -3
  60. package/dist/chunks/{repository-cache-kzhakyvk.js → bus-5gre4vbt.js} +2 -2
  61. package/dist/chunks/{repository-cache-e3qxr5gk.js → bus-5qd3pb7m.js} +2 -2
  62. package/dist/chunks/{repository-cache-5t3nmthw.js → bus-5t3nmthw.js} +2 -2
  63. package/dist/chunks/{repository-cache-mspkneqr.js → bus-62hy5w4k.js} +11 -11
  64. package/dist/chunks/{repository-cache-669tq793.js → bus-669tq793.js} +1 -1
  65. package/dist/chunks/{repository-cache-hh9dckdz.js → bus-6ktds10y.js} +12 -12
  66. package/dist/chunks/{repository-cache-6msgmcgs.js → bus-6msgmcgs.js} +1 -1
  67. package/dist/chunks/{repository-cache-vxhhv58t.js → bus-6nt1sgah.js} +24 -24
  68. package/dist/chunks/{repository-cache-2nsj23ry.js → bus-78dcfyc2.js} +15 -15
  69. package/dist/chunks/{repository-cache-7bmhse3q.js → bus-7bmhse3q.js} +1 -1
  70. package/dist/chunks/{repository-cache-1krrpkdr.js → bus-7ehz94ke.js} +12 -12
  71. package/dist/chunks/{repository-cache-k1hwpwtt.js → bus-7hk1a9kn.js} +15 -15
  72. package/dist/chunks/{repository-cache-6bkwpg0x.js → bus-7q81yew2.js} +12 -12
  73. package/dist/chunks/{repository-cache-x0vh4z3y.js → bus-7vq335ge.js} +28 -28
  74. package/dist/chunks/{repository-cache-rf6qq5pr.js → bus-7vqcmx4q.js} +9 -9
  75. package/dist/chunks/{repository-cache-66qv7stq.js → bus-7zqrex6v.js} +16 -16
  76. package/dist/chunks/{repository-cache-1f653fp7.js → bus-80s1qpja.js} +24 -24
  77. package/dist/chunks/{repository-cache-cxp51yks.js → bus-825bw704.js} +42 -42
  78. package/dist/chunks/{repository-cache-1nz9djp5.js → bus-840n79mv.js} +15 -15
  79. package/dist/chunks/{repository-cache-w1eejvng.js → bus-84txncab.js} +5 -5
  80. package/dist/chunks/{repository-cache-v20d2acs.js → bus-87ayqzvj.js} +20 -20
  81. package/dist/chunks/{repository-cache-h26wjtqz.js → bus-894m4bqb.js} +11 -11
  82. package/dist/chunks/{repository-cache-f9qv40sy.js → bus-8arr1g8f.js} +42 -42
  83. package/dist/chunks/{repository-cache-vbzc55dd.js → bus-8c24f6ff.js} +17 -17
  84. package/dist/chunks/{repository-cache-2mfzxht7.js → bus-8c50268e.js} +5 -5
  85. package/dist/chunks/{repository-cache-8d7r5vzw.js → bus-8d7r5vzw.js} +1 -1
  86. package/dist/chunks/{repository-cache-cy6ws55e.js → bus-8h0ahnmn.js} +20 -20
  87. package/dist/chunks/{repository-cache-ydgy0jv4.js → bus-8hbfdwcy.js} +8 -8
  88. package/dist/chunks/{repository-cache-8evgpfva.js → bus-8qp06k83.js} +11 -11
  89. package/dist/chunks/{repository-cache-xct5fsjt.js → bus-8t16g276.js} +20 -20
  90. package/dist/chunks/{repository-cache-0w8x28sf.js → bus-8wy1n625.js} +43 -43
  91. package/dist/chunks/{repository-cache-q53c2jgr.js → bus-8y86t981.js} +11 -11
  92. package/dist/chunks/{repository-cache-g9xsh2b9.js → bus-8ywrnqjj.js} +23 -23
  93. package/dist/chunks/{repository-cache-a6b6yrq3.js → bus-92ssfs48.js} +24 -24
  94. package/dist/chunks/{repository-cache-94ek1h2f.js → bus-94ek1h2f.js} +2 -2
  95. package/dist/chunks/{repository-cache-qnpxmzp3.js → bus-96mdvajj.js} +24 -24
  96. package/dist/chunks/{repository-cache-1kzhj9ac.js → bus-98pprt8f.js} +15 -15
  97. package/dist/chunks/{repository-cache-w3bkza1g.js → bus-9eg4jjgq.js} +8 -8
  98. package/dist/chunks/{repository-cache-afed7ext.js → bus-9g3kc011.js} +12 -12
  99. package/dist/chunks/{repository-cache-5xtgfte3.js → bus-9hn6k4tm.js} +8 -8
  100. package/dist/chunks/{repository-cache-rtb06bvf.js → bus-9j1htrj5.js} +3 -3
  101. package/dist/chunks/{repository-cache-1n8qs01n.js → bus-9r1zvxbf.js} +4 -4
  102. package/dist/chunks/{repository-cache-tnhf2k51.js → bus-a4n3shsa.js} +30 -30
  103. package/dist/chunks/{repository-cache-2pnhn36q.js → bus-a8bn8zg0.js} +21 -21
  104. package/dist/chunks/{repository-cache-aaet6srn.js → bus-aaet6srn.js} +2 -2
  105. package/dist/chunks/{repository-cache-5jz776c3.js → bus-abem9yh0.js} +21 -21
  106. package/dist/chunks/{repository-cache-ead3g9p8.js → bus-af04s6ss.js} +5 -5
  107. package/dist/chunks/{repository-cache-c2capq82.js → bus-af88mf9m.js} +26 -26
  108. package/dist/chunks/{repository-cache-22f357wt.js → bus-aj9wrhbp.js} +9 -9
  109. package/dist/chunks/{repository-cache-5etd2cz8.js → bus-aw4ks25e.js} +13 -13
  110. package/dist/chunks/{repository-cache-jbjr1a4g.js → bus-awaee7qt.js} +4 -4
  111. package/dist/chunks/{repository-cache-yx9af1wb.js → bus-awaqrqtp.js} +33 -33
  112. package/dist/chunks/{repository-cache-t098exxm.js → bus-ax6ghwwf.js} +33 -33
  113. package/dist/chunks/bus-axpe2ek8.js +252 -0
  114. package/dist/chunks/{repository-cache-srk5s9w6.js → bus-b1nmpyb4.js} +20 -20
  115. package/dist/chunks/{repository-cache-vb911m41.js → bus-b26wtfeh.js} +18 -18
  116. package/dist/chunks/{repository-cache-b6gygkdw.js → bus-b6gygkdw.js} +2 -2
  117. package/dist/chunks/{repository-cache-ca7w653e.js → bus-baaqp4zd.js} +4 -4
  118. package/dist/chunks/{repository-cache-r9q3mv0t.js → bus-bavs97tk.js} +47 -47
  119. package/dist/chunks/{repository-cache-h9mky73t.js → bus-bddt2pqj.js} +12 -12
  120. package/dist/chunks/{repository-cache-2y1vgr31.js → bus-bhqygd8k.js} +15 -15
  121. package/dist/chunks/{repository-cache-rvb1ky6f.js → bus-bm36gav2.js} +3 -3
  122. package/dist/chunks/{repository-cache-yfxk6ps6.js → bus-btjm13ym.js} +10 -10
  123. package/dist/chunks/{repository-cache-gm597rkn.js → bus-bv7gpt9b.js} +9 -9
  124. package/dist/chunks/{repository-cache-cmbk0xqe.js → bus-c52sabfa.js} +21 -21
  125. package/dist/chunks/{repository-cache-1cn3ven4.js → bus-c7w8kqar.js} +4 -4
  126. package/dist/chunks/{repository-cache-6163btsh.js → bus-c8ahp79r.js} +30 -30
  127. package/dist/chunks/{repository-cache-w4rh11p9.js → bus-cdwjrg5z.js} +9 -9
  128. package/dist/chunks/{repository-cache-zf6k16wx.js → bus-cjmb3pa7.js} +6 -6
  129. package/dist/chunks/{repository-cache-q1prep5a.js → bus-cjtbz79v.js} +5 -5
  130. package/dist/chunks/{repository-cache-ckecvw8r.js → bus-ckecvw8r.js} +2 -2
  131. package/dist/chunks/{repository-cache-ysypycvb.js → bus-cm3spbj7.js} +1 -1
  132. package/dist/chunks/{repository-cache-c765mh8b.js → bus-cpneeje0.js} +8 -8
  133. package/dist/chunks/{repository-cache-hz7s10xd.js → bus-crsj3ebw.js} +4 -4
  134. package/dist/chunks/{repository-cache-5xmatmkw.js → bus-cxzq7vxy.js} +24 -24
  135. package/dist/chunks/{repository-cache-cy1erk79.js → bus-cyqrzhgj.js} +20 -20
  136. package/dist/chunks/{repository-cache-768tacq1.js → bus-d135fm4j.js} +54 -54
  137. package/dist/chunks/{repository-cache-t5sbgpcp.js → bus-dbq3dcxy.js} +18 -18
  138. package/dist/chunks/{repository-cache-57ez7d0k.js → bus-dc6tzc5b.js} +9 -9
  139. package/dist/chunks/{repository-cache-qq11w61w.js → bus-dfe8djrf.js} +4 -4
  140. package/dist/chunks/{repository-cache-3cfzdc8e.js → bus-dj9sq318.js} +5 -5
  141. package/dist/chunks/{repository-cache-xkntkrq7.js → bus-dmqcgk4z.js} +5 -5
  142. package/dist/chunks/{repository-cache-2evjqgve.js → bus-dn8m779r.js} +71 -71
  143. package/dist/chunks/{repository-cache-mpk0rfs5.js → bus-dnxkq42g.js} +4 -4
  144. package/dist/chunks/{repository-cache-5pm33tn0.js → bus-dyf2220y.js} +24 -24
  145. package/dist/chunks/{repository-cache-msa4er6y.js → bus-e8npv53b.js} +22 -22
  146. package/dist/chunks/{repository-cache-y31vjpwk.js → bus-edc927t6.js} +18 -18
  147. package/dist/chunks/{repository-cache-ef5x83kb.js → bus-ef5x83kb.js} +1 -1
  148. package/dist/chunks/{repository-cache-sq2td1wp.js → bus-eqhv3z84.js} +24 -24
  149. package/dist/chunks/{repository-cache-19hqn2h9.js → bus-er3kxcsq.js} +22 -22
  150. package/dist/chunks/{repository-cache-etq0c3wd.js → bus-etq0c3wd.js} +1 -1
  151. package/dist/chunks/{repository-cache-85mhr6td.js → bus-f35csz83.js} +18 -18
  152. package/dist/chunks/{repository-cache-qc1x1f66.js → bus-f9rm78b5.js} +5 -5
  153. package/dist/chunks/{repository-cache-wk5z6jzv.js → bus-fdms3n6w.js} +9 -9
  154. package/dist/chunks/{repository-cache-b8kqzbny.js → bus-ff50tnq2.js} +20 -20
  155. package/dist/chunks/{repository-cache-qg78ryn2.js → bus-fjakxwt0.js} +9 -9
  156. package/dist/chunks/{repository-cache-xrt7n2v3.js → bus-fq8xtrbp.js} +17 -17
  157. package/dist/chunks/{repository-cache-85y232q2.js → bus-ft6sq6ge.js} +12 -12
  158. package/dist/chunks/{repository-cache-ray2z7pb.js → bus-fwvczyet.js} +20 -20
  159. package/dist/chunks/{repository-cache-194h8ws8.js → bus-fym2qhys.js} +1 -1
  160. package/dist/chunks/{repository-cache-y0wxh08b.js → bus-fzyjevma.js} +15 -15
  161. package/dist/chunks/{repository-cache-xvp1j2dc.js → bus-g5agzp2h.js} +5 -5
  162. package/dist/chunks/{repository-cache-806j49yq.js → bus-g8d3gcyj.js} +7 -7
  163. package/dist/chunks/{repository-cache-gd4qta3r.js → bus-gd4qta3r.js} +1 -1
  164. package/dist/chunks/{repository-cache-wabdchgd.js → bus-gfnd1j1q.js} +5 -5
  165. package/dist/chunks/{repository-cache-n2ev6tjf.js → bus-gsr3rt87.js} +17 -17
  166. package/dist/chunks/{repository-cache-gv6a8nnw.js → bus-gv6a8nnw.js} +2 -2
  167. package/dist/chunks/{repository-cache-nt0m1awr.js → bus-gw3qt7kb.js} +18 -18
  168. package/dist/chunks/{repository-cache-wmvwkbff.js → bus-gxjy6dfa.js} +5 -5
  169. package/dist/chunks/{repository-cache-s6tfkdwg.js → bus-h0sz092a.js} +10 -10
  170. package/dist/chunks/{repository-cache-h6vf3j39.js → bus-h6vf3j39.js} +1 -1
  171. package/dist/chunks/{repository-cache-5q7t082n.js → bus-h9t1bzna.js} +26 -26
  172. package/dist/chunks/{repository-cache-p2y3dfrn.js → bus-hagpnyr2.js} +5 -5
  173. package/dist/chunks/{repository-cache-jmdz0xnc.js → bus-hbpa88t1.js} +23 -23
  174. package/dist/chunks/{repository-cache-5yrmw3zp.js → bus-hkagz2yt.js} +6 -6
  175. package/dist/chunks/{repository-cache-kcz65p5n.js → bus-hng35392.js} +36 -36
  176. package/dist/chunks/{repository-cache-aja34zf0.js → bus-ht29xtmx.js} +25 -25
  177. package/dist/chunks/{repository-cache-a46jvrgv.js → bus-j0vmqhvn.js} +11 -11
  178. package/dist/chunks/{repository-cache-e3ac5n3c.js → bus-j36k01a4.js} +8 -8
  179. package/dist/chunks/{repository-cache-qg0jgkcp.js → bus-j3s2z371.js} +9 -9
  180. package/dist/chunks/{repository-cache-j56e64zr.js → bus-j56e64zr.js} +1 -1
  181. package/dist/chunks/{repository-cache-w957gz27.js → bus-j6peaycv.js} +9 -9
  182. package/dist/chunks/{repository-cache-e7z5m3qb.js → bus-jbg63639.js} +4 -4
  183. package/dist/chunks/{repository-cache-8451t691.js → bus-jesf17xq.js} +41 -41
  184. package/dist/chunks/{repository-cache-t74f4gsm.js → bus-jg5vcgv5.js} +85 -85
  185. package/dist/chunks/{repository-cache-bpf208j3.js → bus-jgjn4qh1.js} +11 -11
  186. package/dist/chunks/{repository-cache-httqwp5x.js → bus-jva0abwr.js} +13 -13
  187. package/dist/chunks/{repository-cache-5m5yrm4y.js → bus-k1qrnqst.js} +8 -8
  188. package/dist/chunks/{repository-cache-v954s5ta.js → bus-k2cd168e.js} +15 -15
  189. package/dist/chunks/{repository-cache-k3c624dm.js → bus-k3c624dm.js} +3 -3
  190. package/dist/chunks/{repository-cache-6x1xjyfa.js → bus-k4z41wd4.js} +10 -10
  191. package/dist/chunks/bus-k62abecv.js +26 -0
  192. package/dist/chunks/{repository-cache-3ym1w18d.js → bus-k9jhqx46.js} +10 -10
  193. package/dist/chunks/{repository-cache-1cr71hfs.js → bus-kape24d0.js} +10 -10
  194. package/dist/chunks/{repository-cache-kb6vbnxp.js → bus-kb6gw2zp.js} +4 -4
  195. package/dist/chunks/{repository-cache-78phanfd.js → bus-knpd28bd.js} +10 -10
  196. package/dist/chunks/{repository-cache-stcaqmwb.js → bus-kpack14v.js} +4 -4
  197. package/dist/chunks/{repository-cache-hftftmrk.js → bus-kw3tvbv2.js} +42 -42
  198. package/dist/chunks/{repository-cache-efv4s0g0.js → bus-kxpygcw9.js} +4 -4
  199. package/dist/chunks/{repository-cache-kbegyq1c.js → bus-ky3seynh.js} +2 -2
  200. package/dist/chunks/{repository-cache-1mv2y61c.js → bus-m0jez0qq.js} +10 -10
  201. package/dist/chunks/{repository-cache-m3fdjcah.js → bus-m3fdjcah.js} +1 -1
  202. package/dist/chunks/{repository-cache-m58kmhef.js → bus-m58kmhef.js} +2 -2
  203. package/dist/chunks/{repository-cache-s47h6278.js → bus-m5k1y86b.js} +11 -11
  204. package/dist/chunks/{repository-cache-3xqhjr40.js → bus-m708tn22.js} +17 -17
  205. package/dist/chunks/{repository-cache-ckgjktd6.js → bus-m9fjd327.js} +31 -31
  206. package/dist/chunks/{repository-cache-m9w0rfyh.js → bus-m9w0rfyh.js} +1 -1
  207. package/dist/chunks/{repository-cache-4cxwmwzv.js → bus-mksw1wy2.js} +8 -8
  208. package/dist/chunks/{repository-cache-76ymgwed.js → bus-mphgtbj1.js} +9 -9
  209. package/dist/chunks/{repository-cache-mx04v3d0.js → bus-mr56zc53.js} +23 -23
  210. package/dist/chunks/{repository-cache-n1ka8r9d.js → bus-mvksx64m.js} +4 -4
  211. package/dist/chunks/{repository-cache-cb680df9.js → bus-mxbrm02f.js} +9 -9
  212. package/dist/chunks/{repository-cache-rvyqxt9n.js → bus-n6hmrgxn.js} +6 -6
  213. package/dist/chunks/{repository-cache-mvgvez97.js → bus-n8m4h8vv.js} +25 -25
  214. package/dist/chunks/{repository-cache-m3txq9h1.js → bus-nf7503gn.js} +5 -5
  215. package/dist/chunks/{repository-cache-vzqaq3ze.js → bus-nkxydt3a.js} +31 -31
  216. package/dist/chunks/{repository-cache-wmsa3mqy.js → bus-nmt80txx.js} +24 -24
  217. package/dist/chunks/{repository-cache-q6e2qxqk.js → bus-nps70g5m.js} +27 -27
  218. package/dist/chunks/{repository-cache-3b5480dd.js → bus-nxrqtpaw.js} +15 -15
  219. package/dist/chunks/{repository-cache-pjvnvgmy.js → bus-pjvnvgmy.js} +1 -1
  220. package/dist/chunks/{repository-cache-pknna89w.js → bus-pknna89w.js} +1 -1
  221. package/dist/chunks/{repository-cache-sjwzrrye.js → bus-pp173efe.js} +11 -11
  222. package/dist/chunks/{repository-cache-0mgqdngq.js → bus-ppbeg2ft.js} +39 -39
  223. package/dist/chunks/{repository-cache-0wpsqe1j.js → bus-pphvfzc9.js} +20 -20
  224. package/dist/chunks/{repository-cache-wwf55qdz.js → bus-ps6629h5.js} +25 -25
  225. package/dist/chunks/{repository-cache-rkprpv83.js → bus-py3kkmfq.js} +2 -2
  226. package/dist/chunks/{repository-cache-bxntr1t7.js → bus-pyc5j42v.js} +35 -35
  227. package/dist/chunks/{repository-cache-btec747f.js → bus-q17z9dx8.js} +5 -5
  228. package/dist/chunks/{repository-cache-63f8h98j.js → bus-qbx0tcre.js} +32 -32
  229. package/dist/chunks/{repository-cache-etqwhcmh.js → bus-qeqbv4aj.js} +11 -11
  230. package/dist/chunks/{repository-cache-qgn6gcr1.js → bus-qgn6gcr1.js} +1 -1
  231. package/dist/chunks/{repository-cache-kfk5w719.js → bus-qhmaerxs.js} +43 -43
  232. package/dist/chunks/{repository-cache-qte5z7bc.js → bus-qjnxxf51.js} +5 -5
  233. package/dist/chunks/{repository-cache-vd179j24.js → bus-qm58jeay.js} +3 -3
  234. package/dist/chunks/{repository-cache-qsdy395h.js → bus-qsdy395h.js} +1 -1
  235. package/dist/chunks/{repository-cache-rft60nn9.js → bus-qt2a3bcw.js} +11 -11
  236. package/dist/chunks/{repository-cache-rh8c8h0e.js → bus-qvf0fb0d.js} +20 -20
  237. package/dist/chunks/{repository-cache-m3zza4qd.js → bus-r9t00hsy.js} +8 -8
  238. package/dist/chunks/bus-rap9a73h.js +18 -0
  239. package/dist/chunks/{repository-cache-rdw6cm16.js → bus-rdw6cm16.js} +1 -1
  240. package/dist/chunks/{repository-cache-bqjmek8f.js → bus-rh8c4axs.js} +11 -11
  241. package/dist/chunks/{repository-cache-t550f9t1.js → bus-rhjbct0v.js} +4 -4
  242. package/dist/chunks/{repository-cache-7xkvsncw.js → bus-rq0cynag.js} +9 -9
  243. package/dist/chunks/{repository-cache-54gykf4q.js → bus-sedacm6d.js} +4 -4
  244. package/dist/chunks/{repository-cache-7jkksj7z.js → bus-sj42pf2p.js} +15 -15
  245. package/dist/chunks/{repository-cache-8aaqm6qj.js → bus-sm965ndy.js} +8 -8
  246. package/dist/chunks/{repository-cache-4z58m4b4.js → bus-syf57q56.js} +4 -4
  247. package/dist/chunks/{repository-cache-e9266ee7.js → bus-t5ymyahf.js} +24 -24
  248. package/dist/chunks/{repository-cache-pavnatfc.js → bus-t69extwx.js} +6 -6
  249. package/dist/chunks/{repository-cache-tazgh4e4.js → bus-tazgh4e4.js} +1 -1
  250. package/dist/chunks/{repository-cache-tcezcvh9.js → bus-tcezcvh9.js} +1 -1
  251. package/dist/chunks/{repository-cache-tdstcens.js → bus-tdstcens.js} +1 -1
  252. package/dist/chunks/{repository-cache-tvtrv512.js → bus-tvtrv512.js} +1 -1
  253. package/dist/chunks/{repository-cache-0ee6f9jy.js → bus-v46pt5zw.js} +14 -14
  254. package/dist/chunks/{repository-cache-h6310vsd.js → bus-v7z2bvyd.js} +4 -4
  255. package/dist/chunks/{repository-cache-f453btn2.js → bus-vcwt96gk.js} +10 -10
  256. package/dist/chunks/{repository-cache-jq8b4me5.js → bus-vefpeqf1.js} +12 -12
  257. package/dist/chunks/{repository-cache-veqvce7d.js → bus-veqvce7d.js} +1 -1
  258. package/dist/chunks/{repository-cache-p08dfpvf.js → bus-vwjrrz0m.js} +22 -22
  259. package/dist/chunks/{repository-cache-vzcthcp8.js → bus-vzcthcp8.js} +1 -1
  260. package/dist/chunks/{repository-cache-vzs5sf6e.js → bus-vzs5sf6e.js} +1 -1
  261. package/dist/chunks/{repository-cache-233fp5d4.js → bus-w0j0ze2a.js} +26 -26
  262. package/dist/chunks/{repository-cache-46zxvhk8.js → bus-w22vg6hf.js} +13 -13
  263. package/dist/chunks/{repository-cache-w3wsvvr9.js → bus-w3wsvvr9.js} +1 -1
  264. package/dist/chunks/{repository-cache-57kcybrc.js → bus-w5v07rgg.js} +5 -5
  265. package/dist/chunks/{repository-cache-e6m5dm35.js → bus-w9c7z483.js} +21 -21
  266. package/dist/chunks/{repository-cache-wd3x2cqz.js → bus-wd3x2cqz.js} +2 -2
  267. package/dist/chunks/{repository-cache-wd87259q.js → bus-wd87259q.js} +1 -1
  268. package/dist/chunks/{repository-cache-x1ezjp6w.js → bus-x1ezjp6w.js} +1 -1
  269. package/dist/chunks/{repository-cache-dh57vbnz.js → bus-x2z7greh.js} +44 -44
  270. package/dist/chunks/{repository-cache-3zm2v763.js → bus-x37017eb.js} +11 -11
  271. package/dist/chunks/{repository-cache-qgn1c80m.js → bus-x62hmsgp.js} +11 -11
  272. package/dist/chunks/{repository-cache-h9rbv32p.js → bus-x6wr6p94.js} +3 -3
  273. package/dist/chunks/{repository-cache-eb1y8z6f.js → bus-xapvk9pt.js} +13 -13
  274. package/dist/chunks/{repository-cache-drwq78ky.js → bus-xfkkasph.js} +4 -4
  275. package/dist/chunks/{repository-cache-3ezfeh6y.js → bus-xgmmm5ws.js} +8 -8
  276. package/dist/chunks/{repository-cache-d5c7pv19.js → bus-xjj8bw77.js} +303 -303
  277. package/dist/chunks/{repository-cache-n7d88tpn.js → bus-xxynqx5z.js} +3 -3
  278. package/dist/chunks/{repository-cache-b2nsx1md.js → bus-xzne595f.js} +26 -26
  279. package/dist/chunks/{repository-cache-y1fvbwt7.js → bus-y1fvbwt7.js} +1 -1
  280. package/dist/chunks/{repository-cache-8n5abwtw.js → bus-y5dj3dxk.js} +6 -6
  281. package/dist/chunks/{repository-cache-y71avatq.js → bus-y71avatq.js} +1 -1
  282. package/dist/chunks/{repository-cache-zyr433b0.js → bus-y7x142mt.js} +11 -11
  283. package/dist/chunks/{repository-cache-dngwpm44.js → bus-yhyck5ts.js} +23 -23
  284. package/dist/chunks/{repository-cache-yrhqyw5v.js → bus-yrhqyw5v.js} +1 -1
  285. package/dist/chunks/{repository-cache-s4enseaf.js → bus-yrznvahk.js} +2 -2
  286. package/dist/chunks/{repository-cache-z07pqspn.js → bus-z07pqspn.js} +3 -3
  287. package/dist/chunks/{repository-cache-z0bkrqjs.js → bus-z0bkrqjs.js} +1 -1
  288. package/dist/chunks/{repository-cache-29x78va6.js → bus-z63w68vq.js} +6 -6
  289. package/dist/chunks/{repository-cache-zeh9ct20.js → bus-zeh9ct20.js} +2 -2
  290. package/dist/chunks/{repository-cache-zr2ceqn5.js → bus-zr2ceqn5.js} +1 -1
  291. package/dist/chunks/{repository-cache-mp2sm6hx.js → bus-zrb90v6x.js} +35 -35
  292. package/dist/chunks/{repository-cache-zxq2ej10.js → bus-zxq2ej10.js} +1 -1
  293. package/dist/chunks/{repository-cache-e1wpnkfg.js → bus-zzmzhkbe.js} +36 -36
  294. package/dist/codemode/catalog.js +1 -1
  295. package/dist/codemode/instructions.js +7 -7
  296. package/dist/codemode/tool.js +3 -3
  297. package/dist/codemode/web.js +1 -1
  298. package/dist/command.js +85 -85
  299. package/dist/config/discovery.js +82 -82
  300. package/dist/config/markdown.js +1 -1
  301. package/dist/config/normalize.js +106 -106
  302. package/dist/config/plugin/agent.js +123 -123
  303. package/dist/config/plugin/command.js +213 -213
  304. package/dist/config/plugin/compaction.js +161 -161
  305. package/dist/config/plugin/compatibility.js +141 -141
  306. package/dist/config/plugin/entry-observer.js +1 -1
  307. package/dist/config/plugin/formatter.js +124 -124
  308. package/dist/config/plugin/image.js +123 -123
  309. package/dist/config/plugin/instruction.js +90 -90
  310. package/dist/config/plugin/location-watcher.js +125 -125
  311. package/dist/config/plugin/mcp.js +130 -130
  312. package/dist/config/plugin/policy.js +124 -124
  313. package/dist/config/plugin/provider.js +123 -123
  314. package/dist/config/plugin/reference.js +125 -125
  315. package/dist/config/plugin/shell.js +123 -123
  316. package/dist/config/plugin/skill-file.js +102 -102
  317. package/dist/config/plugin/skill.js +142 -142
  318. package/dist/config/plugin/snapshot.js +123 -123
  319. package/dist/config/plugin/source.js +126 -126
  320. package/dist/config/plugin/tool-output.js +125 -125
  321. package/dist/config/plugin/websearch.js +122 -122
  322. package/dist/config/plugin/worktree.js +125 -125
  323. package/dist/config/variable.js +3 -3
  324. package/dist/config/watch.js +1 -1
  325. package/dist/config.js +128 -128
  326. package/dist/credential/sql.js +2 -2
  327. package/dist/credential.js +79 -79
  328. package/dist/database/database.js +66 -66
  329. package/dist/database/drizzle/effect-sqlite/driver.js +12 -12
  330. package/dist/database/drizzle/effect-sqlite/index.js +12 -12
  331. package/dist/database/drizzle/effect-sqlite/session.js +11 -11
  332. package/dist/database/drizzle/index.js +13 -13
  333. package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
  334. package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
  335. package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
  336. package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
  337. package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
  338. package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
  339. package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
  340. package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
  341. package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
  342. package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
  343. package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
  344. package/dist/database/drizzle.js +14 -14
  345. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
  346. package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
  347. package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
  348. package/dist/database/migration/20260225215848_workspace.js +1 -1
  349. package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
  350. package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
  351. package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
  352. package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
  353. package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
  354. package/dist/database/migration/20260323234822_events.js +1 -1
  355. package/dist/database/migration/20260410174513_workspace-name.js +1 -1
  356. package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
  357. package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
  358. package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
  359. package/dist/database/migration/20260428004200_add_session_path.js +1 -1
  360. package/dist/database/migration/20260501142318_next_venus.js +1 -1
  361. package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
  362. package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
  363. package/dist/database/migration/20260510033149_session_usage.js +1 -1
  364. package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
  365. package/dist/database/migration/20260511173437_session-metadata.js +1 -1
  366. package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
  367. package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
  368. package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
  369. package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
  370. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
  371. package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
  372. package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
  373. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
  374. package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
  375. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
  376. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
  377. package/dist/database/migration/20260611035744_credential.js +1 -1
  378. package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
  379. package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
  380. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
  381. package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
  382. package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
  383. package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
  384. package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
  385. package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
  386. package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
  387. package/dist/database/migration/20260812181746_session_inbox.js +1 -1
  388. package/dist/database/migration/20260812213948_worktree.js +1 -1
  389. package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
  390. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
  391. package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
  392. package/dist/database/migration/20260923013825_project_time_active.js +1 -1
  393. package/dist/database/migration.gen.js +49 -49
  394. package/dist/database/migration.js +51 -51
  395. package/dist/database/path.js +2 -2
  396. package/dist/database/schema.gen.js +1 -1
  397. package/dist/database/schema.sql.js +1 -1
  398. package/dist/database/sqlite.bun.js +1 -1
  399. package/dist/database/sqlite.js +1 -1
  400. package/dist/database/sqlite.node.js +1 -1
  401. package/dist/database/sqlite.workerd.js +1 -1
  402. package/dist/database/v1-migration.bun.js +76 -76
  403. package/dist/database/v1-migration.js +1 -1
  404. package/dist/effect/app-node-builder.js +372 -372
  405. package/dist/effect/app-node-platform.js +2 -2
  406. package/dist/effect/keyed-mutex.js +1 -1
  407. package/dist/effect/websocket-constructor.js +1 -1
  408. package/dist/environment/driver.js +1 -1
  409. package/dist/environment/environment.js +93 -93
  410. package/dist/environment/exec-defaults.js +2 -2
  411. package/dist/environment/files.js +1 -1
  412. package/dist/environment/index.js +95 -95
  413. package/dist/environment/local.js +2 -2
  414. package/dist/environment/memory.js +2 -2
  415. package/dist/environment/unavailable.js +1 -1
  416. package/dist/event/sql.js +1 -1
  417. package/dist/event-logger.js +70 -70
  418. package/dist/file-access.js +104 -104
  419. package/dist/file-mutation.js +94 -94
  420. package/dist/file-retention.js +1 -1
  421. package/dist/filesystem/fff.bun.js +2 -2
  422. package/dist/filesystem/fff.js +1 -1
  423. package/dist/filesystem/fff.node.js +2 -2
  424. package/dist/filesystem/fff.workerd.js +2 -2
  425. package/dist/filesystem/ignore.js +1 -1
  426. package/dist/filesystem/location-watcher-policy.js +4 -4
  427. package/dist/filesystem/location-watcher.js +228 -228
  428. package/dist/filesystem/protected.js +1 -1
  429. package/dist/filesystem/search.js +99 -99
  430. package/dist/filesystem/watcher-binding.js +3 -3
  431. package/dist/filesystem/watcher.js +15 -15
  432. package/dist/filesystem.js +100 -100
  433. package/dist/form.js +82 -82
  434. package/dist/formatter/builtins.js +4 -4
  435. package/dist/formatter.js +87 -87
  436. package/dist/generate.js +103 -103
  437. package/dist/git.js +10 -10
  438. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +1 -1
  439. package/dist/github-copilot/chat/get-response-metadata.js +1 -1
  440. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +1 -1
  441. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +7 -7
  442. package/dist/github-copilot/chat/openai-compatible-chat-options.js +1 -1
  443. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +1 -1
  444. package/dist/github-copilot/copilot-provider.js +17 -17
  445. package/dist/github-copilot/models.js +99 -99
  446. package/dist/github-copilot/openai-compatible-error.js +1 -1
  447. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +1 -1
  448. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +1 -1
  449. package/dist/github-copilot/responses/openai-error.js +1 -1
  450. package/dist/github-copilot/responses/openai-responses-language-model.js +10 -10
  451. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +6 -6
  452. package/dist/github-copilot/responses/tool/code-interpreter.js +1 -1
  453. package/dist/github-copilot/responses/tool/file-search.js +1 -1
  454. package/dist/github-copilot/responses/tool/image-generation.js +1 -1
  455. package/dist/github-copilot/responses/tool/web-search-preview.js +1 -1
  456. package/dist/github-copilot/responses/tool/web-search.js +1 -1
  457. package/dist/id/id.js +1 -1
  458. package/dist/image/photon.js +2 -2
  459. package/dist/image.js +6 -6
  460. package/dist/instance/service.js +5 -5
  461. package/dist/instance.js +363 -363
  462. package/dist/instruction-discovery.js +85 -85
  463. package/dist/instructions/builtins.js +87 -87
  464. package/dist/instructions/index.js +3 -3
  465. package/dist/integration/connection.js +3 -3
  466. package/dist/integration.js +85 -85
  467. package/dist/job.js +79 -79
  468. package/dist/kv/sql.js +2 -2
  469. package/dist/kv.js +73 -73
  470. package/dist/location-activity.js +132 -132
  471. package/dist/location-lifecycle.js +107 -107
  472. package/dist/location-service-map.js +86 -86
  473. package/dist/location-services.js +360 -360
  474. package/dist/location.js +87 -87
  475. package/dist/managed-policy.js +5 -5
  476. package/dist/mcp/client.js +91 -91
  477. package/dist/mcp/index.js +109 -109
  478. package/dist/mcp/instructions.js +129 -129
  479. package/dist/mcp/oauth.js +78 -78
  480. package/dist/mcp/stdio.js +90 -90
  481. package/dist/mime.js +1 -1
  482. package/dist/modal/models.js +99 -99
  483. package/dist/model-resolver.js +98 -98
  484. package/dist/model.js +100 -100
  485. package/dist/models-dev.js +107 -107
  486. package/dist/oauth/page.js +1 -1
  487. package/dist/permission/saved.js +80 -80
  488. package/dist/permission/sql.js +5 -5
  489. package/dist/permission.js +115 -115
  490. package/dist/persistent-pty/binary.bun.js +1 -1
  491. package/dist/persistent-pty/daemon.js +1 -1
  492. package/dist/persistent-pty/index.js +86 -86
  493. package/dist/persistent-pty/pty-binding.js +1 -1
  494. package/dist/persistent-pty.js +75 -75
  495. package/dist/plugin/agent.js +102 -102
  496. package/dist/plugin/command.js +100 -100
  497. package/dist/plugin/hooks.js +5 -5
  498. package/dist/plugin/host.js +219 -219
  499. package/dist/plugin/identity.js +3 -3
  500. package/dist/plugin/instance.js +5 -5
  501. package/dist/plugin/internal.js +335 -335
  502. package/dist/plugin/mcp-codemode-defaults.js +3 -3
  503. package/dist/plugin/models-dev.js +96 -96
  504. package/dist/plugin/module.js +7 -7
  505. package/dist/plugin/optimize.js +2 -2
  506. package/dist/plugin/plan.js +102 -102
  507. package/dist/plugin/promise.js +1 -1
  508. package/dist/plugin/provider/amazon-bedrock.js +90 -90
  509. package/dist/plugin/provider/azure.js +122 -122
  510. package/dist/plugin/provider/cerebras.js +1 -1
  511. package/dist/plugin/provider/chatgpt.js +93 -93
  512. package/dist/plugin/provider/cloudflare-ai-gateway.js +120 -120
  513. package/dist/plugin/provider/cloudflare-workers-ai.js +121 -121
  514. package/dist/plugin/provider/cohere.js +2 -2
  515. package/dist/plugin/provider/configured.js +119 -119
  516. package/dist/plugin/provider/digitalocean.js +93 -93
  517. package/dist/plugin/provider/dynamic.js +2 -2
  518. package/dist/plugin/provider/factory.js +1 -1
  519. package/dist/plugin/provider/gateway.js +2 -2
  520. package/dist/plugin/provider/github-copilot.js +95 -95
  521. package/dist/plugin/provider/gitlab.js +93 -93
  522. package/dist/plugin/provider/google-vertex.js +90 -90
  523. package/dist/plugin/provider/kilo.js +1 -1
  524. package/dist/plugin/provider/llmgateway.js +78 -78
  525. package/dist/plugin/provider/lmstudio.js +122 -122
  526. package/dist/plugin/provider/modal.js +92 -92
  527. package/dist/plugin/provider/nvidia.js +1 -1
  528. package/dist/plugin/provider/ollama.js +122 -122
  529. package/dist/plugin/provider/openai.js +93 -93
  530. package/dist/plugin/provider/opencode.js +95 -95
  531. package/dist/plugin/provider/openrouter.js +91 -91
  532. package/dist/plugin/provider/perplexity.js +2 -2
  533. package/dist/plugin/provider/poe.js +79 -79
  534. package/dist/plugin/provider/prompt-cache-key.js +90 -90
  535. package/dist/plugin/provider/sap-ai-core.js +91 -91
  536. package/dist/plugin/provider/sdk-factory.js +1 -1
  537. package/dist/plugin/provider/snowflake-cortex.js +122 -122
  538. package/dist/plugin/provider/venice.js +2 -2
  539. package/dist/plugin/provider/vercel.js +90 -90
  540. package/dist/plugin/provider/vllm.js +122 -122
  541. package/dist/plugin/provider/xai.js +91 -91
  542. package/dist/plugin/provider/zenmux.js +1 -1
  543. package/dist/plugin/provider.js +163 -163
  544. package/dist/plugin/sdk.js +76 -76
  545. package/dist/plugin/service.js +3 -3
  546. package/dist/plugin/skill.js +139 -139
  547. package/dist/plugin/source-directory.js +1 -1
  548. package/dist/plugin/supervisor.js +354 -354
  549. package/dist/plugin/tool-input-repair.js +4 -4
  550. package/dist/plugin/update.js +6 -6
  551. package/dist/plugin/vcs/git.js +86 -86
  552. package/dist/plugin/vcs/hg.js +86 -86
  553. package/dist/plugin/verbosity.js +93 -93
  554. package/dist/plugin/warming.js +119 -119
  555. package/dist/plugin/websearch/exa.js +7 -7
  556. package/dist/plugin/websearch/firecrawl.js +8 -8
  557. package/dist/plugin/websearch/index.js +9 -9
  558. package/dist/plugin/websearch/mcp.js +2 -2
  559. package/dist/plugin/websearch/parallel.js +8 -8
  560. package/dist/plugin/websearch/tavily.js +6 -6
  561. package/dist/plugin/websearch/tinyfish.js +8 -8
  562. package/dist/plugin.js +230 -230
  563. package/dist/project/schema.js +8 -8
  564. package/dist/project/sql.js +4 -4
  565. package/dist/project.js +90 -90
  566. package/dist/provider.js +97 -97
  567. package/dist/pty/protocol.js +1 -1
  568. package/dist/pty/ticket.js +1 -1
  569. package/dist/pty.js +97 -97
  570. package/dist/reference/instructions.js +87 -87
  571. package/dist/reference.js +91 -91
  572. package/dist/repository-cache.js +81 -81
  573. package/dist/repository.js +3 -3
  574. package/dist/ripgrep/binary.js +2 -2
  575. package/dist/ripgrep.js +97 -97
  576. package/dist/rpc.js +86 -86
  577. package/dist/schema.js +1 -1
  578. package/dist/session/affinity.js +1 -1
  579. package/dist/session/command.js +74 -74
  580. package/dist/session/compaction.js +135 -135
  581. package/dist/session/context.js +153 -153
  582. package/dist/session/diff.js +88 -88
  583. package/dist/session/environment.js +5 -5
  584. package/dist/session/error.js +7 -7
  585. package/dist/session/event.js +1 -1
  586. package/dist/session/execution/restart.js +222 -222
  587. package/dist/session/execution.js +126 -126
  588. package/dist/session/generate.js +154 -154
  589. package/dist/session/history.js +15 -15
  590. package/dist/session/inbox.js +86 -86
  591. package/dist/session/info.js +3 -3
  592. package/dist/session/instruction-entry.js +79 -79
  593. package/dist/session/instruction-state.js +8 -8
  594. package/dist/session/instructions.js +93 -93
  595. package/dist/session/message-updater.js +4 -4
  596. package/dist/session/message.js +1 -1
  597. package/dist/session/model-request.js +120 -120
  598. package/dist/session/model-transport.js +9 -9
  599. package/dist/session/move.js +130 -130
  600. package/dist/session/projector.js +86 -86
  601. package/dist/session/prompt.js +105 -105
  602. package/dist/session/provider-context.js +3 -3
  603. package/dist/session/revert.js +90 -90
  604. package/dist/session/run-coordinator.js +3 -3
  605. package/dist/session/runner/index.js +3 -3
  606. package/dist/session/runner/llm.js +232 -232
  607. package/dist/session/runner/max-steps.js +1 -1
  608. package/dist/session/runner/model.js +98 -98
  609. package/dist/session/runner/publish-llm-event.js +3 -3
  610. package/dist/session/runner/retry.js +4 -4
  611. package/dist/session/runner/step.js +126 -126
  612. package/dist/session/runner/to-llm-message.js +2 -2
  613. package/dist/session/schema.js +5 -5
  614. package/dist/session/session.js +172 -172
  615. package/dist/session/shell.js +138 -138
  616. package/dist/session/skill.js +103 -103
  617. package/dist/session/sql.js +5 -5
  618. package/dist/session/stats.js +73 -73
  619. package/dist/session/store.js +85 -85
  620. package/dist/session/subagent-completion.js +1 -1
  621. package/dist/session/subagent-job.js +211 -211
  622. package/dist/session/system-prompt.js +3 -3
  623. package/dist/session/title.js +157 -157
  624. package/dist/session/to-session-error.js +111 -111
  625. package/dist/session/transfer.js +218 -218
  626. package/dist/session/usage.js +1 -1
  627. package/dist/session.js +219 -219
  628. package/dist/shell/parse.js +6 -6
  629. package/dist/shell/result.js +1 -1
  630. package/dist/shell/scan.js +1 -1
  631. package/dist/shell/select.js +13 -13
  632. package/dist/shell.js +140 -140
  633. package/dist/skill/discovery.js +6 -6
  634. package/dist/skill/instructions.js +107 -107
  635. package/dist/skill.js +112 -112
  636. package/dist/snapshot.js +91 -91
  637. package/dist/state.js +1 -1
  638. package/dist/tool/html-markdown.js +1 -1
  639. package/dist/tool/http-body.js +1 -1
  640. package/dist/tool/mcp.js +126 -126
  641. package/dist/tool/plugin/edit.js +120 -120
  642. package/dist/tool/plugin/file-diff.js +1 -1
  643. package/dist/tool/plugin/glob.js +124 -124
  644. package/dist/tool/plugin/grep.js +124 -124
  645. package/dist/tool/plugin/mcp-resource.js +117 -117
  646. package/dist/tool/plugin/opencode.js +3 -3
  647. package/dist/tool/plugin/patch.js +122 -122
  648. package/dist/tool/plugin/question.js +103 -103
  649. package/dist/tool/plugin/read.js +125 -125
  650. package/dist/tool/plugin/shell.js +216 -216
  651. package/dist/tool/plugin/skill.js +109 -109
  652. package/dist/tool/plugin/subagent.js +218 -218
  653. package/dist/tool/plugin/webfetch.js +110 -110
  654. package/dist/tool/plugin/websearch.js +112 -112
  655. package/dist/tool/plugin/write.js +122 -122
  656. package/dist/tool/read-filesystem.js +96 -96
  657. package/dist/tool/runtime.js +1 -1
  658. package/dist/tool-output.js +8 -8
  659. package/dist/tool.js +14 -14
  660. package/dist/util/error-summary.js +1 -1
  661. package/dist/util/error.js +1 -1
  662. package/dist/util/git-executable.js +2 -2
  663. package/dist/util/iife.js +1 -1
  664. package/dist/util/lazy.js +1 -1
  665. package/dist/util/slug.js +1 -1
  666. package/dist/util/token.js +1 -1
  667. package/dist/util/which.js +1 -1
  668. package/dist/util/wildcard.js +1 -1
  669. package/dist/v1/config/agent.js +7 -7
  670. package/dist/v1/config/attachment.js +4 -4
  671. package/dist/v1/config/command.js +5 -5
  672. package/dist/v1/config/config.js +16 -16
  673. package/dist/v1/config/error.js +4 -4
  674. package/dist/v1/config/formatter.js +3 -3
  675. package/dist/v1/config/layout.js +1 -1
  676. package/dist/v1/config/lsp.js +3 -3
  677. package/dist/v1/config/mcp.js +4 -4
  678. package/dist/v1/config/migrate.js +92 -92
  679. package/dist/v1/config/permission.js +7 -7
  680. package/dist/v1/config/plugin.js +1 -1
  681. package/dist/v1/config/provider-options.js +1 -1
  682. package/dist/v1/config/provider.js +4 -4
  683. package/dist/v1/config/server.js +2 -2
  684. package/dist/v1/config/skills.js +3 -3
  685. package/dist/v1/permission.js +1 -1
  686. package/dist/variant.js +93 -93
  687. package/dist/vcs/patch.js +1 -1
  688. package/dist/vcs.js +89 -89
  689. package/dist/websearch.js +84 -84
  690. package/dist/wellknown/plugin.js +76 -76
  691. package/dist/wellknown.js +79 -79
  692. package/dist/workspace/driver.js +7 -7
  693. package/dist/workspace/sql.js +1 -1
  694. package/dist/workspace.js +80 -80
  695. package/dist/worktree/directory.js +2 -2
  696. package/dist/worktree/git.js +10 -10
  697. package/dist/worktree/sql.js +5 -5
  698. package/dist/worktree/strategies.js +89 -89
  699. package/dist/worktree.js +98 -98
  700. package/package.json +8 -8
  701. package/dist/chunks/repository-cache-4pfd6v8k.js +0 -507
  702. package/dist/chunks/repository-cache-eygf1jp4.js +0 -252
  703. package/dist/chunks/repository-cache-pdhzdjhf.js +0 -26
  704. package/dist/chunks/repository-cache-v1faaxn9.js +0 -18
  705. /package/dist/chunks/{repository-cache-0qkdqm5v.js → bus-0qkdqm5v.js} +0 -0
  706. /package/dist/chunks/{repository-cache-0zkw76rk.js → bus-0zkw76rk.js} +0 -0
  707. /package/dist/chunks/{repository-cache-17cy0kzp.js → bus-17cy0kzp.js} +0 -0
  708. /package/dist/chunks/{repository-cache-1cnp2v09.js → bus-1cnp2v09.js} +0 -0
  709. /package/dist/chunks/{repository-cache-1kg9ymc8.js → bus-1kg9ymc8.js} +0 -0
  710. /package/dist/chunks/{repository-cache-24dcb14g.js → bus-24dcb14g.js} +0 -0
  711. /package/dist/chunks/{repository-cache-2710q6r3.js → bus-2710q6r3.js} +0 -0
  712. /package/dist/chunks/{repository-cache-2axfhc9x.js → bus-2axfhc9x.js} +0 -0
  713. /package/dist/chunks/{repository-cache-2c3vjs8z.js → bus-2c3vjs8z.js} +0 -0
  714. /package/dist/chunks/{repository-cache-34c7v6d4.js → bus-34c7v6d4.js} +0 -0
  715. /package/dist/chunks/{repository-cache-359p4xyc.js → bus-359p4xyc.js} +0 -0
  716. /package/dist/chunks/{repository-cache-3asan66x.js → bus-3asan66x.js} +0 -0
  717. /package/dist/chunks/{repository-cache-3v8g72cx.js → bus-3v8g72cx.js} +0 -0
  718. /package/dist/chunks/{repository-cache-3w5fmr99.js → bus-3w5fmr99.js} +0 -0
  719. /package/dist/chunks/{repository-cache-3wcehsnq.js → bus-3wcehsnq.js} +0 -0
  720. /package/dist/chunks/{repository-cache-43n2bw4t.js → bus-43n2bw4t.js} +0 -0
  721. /package/dist/chunks/{repository-cache-4knz6hnm.js → bus-4knz6hnm.js} +0 -0
  722. /package/dist/chunks/{repository-cache-4vcrnpx2.js → bus-4vcrnpx2.js} +0 -0
  723. /package/dist/chunks/{repository-cache-4y7fprxs.js → bus-4y7fprxs.js} +0 -0
  724. /package/dist/chunks/{repository-cache-53557ph1.js → bus-53557ph1.js} +0 -0
  725. /package/dist/chunks/{repository-cache-550bvhaj.js → bus-550bvhaj.js} +0 -0
  726. /package/dist/chunks/{repository-cache-6prwharc.js → bus-6prwharc.js} +0 -0
  727. /package/dist/chunks/{repository-cache-7akdwqpd.js → bus-7akdwqpd.js} +0 -0
  728. /package/dist/chunks/{repository-cache-7m9af43g.js → bus-7m9af43g.js} +0 -0
  729. /package/dist/chunks/{repository-cache-822emrt2.js → bus-822emrt2.js} +0 -0
  730. /package/dist/chunks/{repository-cache-88xbtdfr.js → bus-88xbtdfr.js} +0 -0
  731. /package/dist/chunks/{repository-cache-8n3pysct.js → bus-8n3pysct.js} +0 -0
  732. /package/dist/chunks/{repository-cache-8wj87zfr.js → bus-8wj87zfr.js} +0 -0
  733. /package/dist/chunks/{repository-cache-922hggd3.js → bus-922hggd3.js} +0 -0
  734. /package/dist/chunks/{repository-cache-9a4afbnw.js → bus-9a4afbnw.js} +0 -0
  735. /package/dist/chunks/{repository-cache-9rqn6x4v.js → bus-9rqn6x4v.js} +0 -0
  736. /package/dist/chunks/{repository-cache-a6k6eb26.js → bus-a6k6eb26.js} +0 -0
  737. /package/dist/chunks/{repository-cache-af5trqkr.js → bus-af5trqkr.js} +0 -0
  738. /package/dist/chunks/{repository-cache-afrmfg78.js → bus-afrmfg78.js} +0 -0
  739. /package/dist/chunks/{repository-cache-aqzs7mqg.js → bus-aqzs7mqg.js} +0 -0
  740. /package/dist/chunks/{repository-cache-atq7p7m5.js → bus-atq7p7m5.js} +0 -0
  741. /package/dist/chunks/{repository-cache-bkyjaxrp.js → bus-bkyjaxrp.js} +0 -0
  742. /package/dist/chunks/{repository-cache-bmr6ed5q.js → bus-bmr6ed5q.js} +0 -0
  743. /package/dist/chunks/{repository-cache-cf4snx6d.js → bus-cf4snx6d.js} +0 -0
  744. /package/dist/chunks/{repository-cache-cvy3z8tj.js → bus-cvy3z8tj.js} +0 -0
  745. /package/dist/chunks/{repository-cache-d9fn303g.js → bus-d9fn303g.js} +0 -0
  746. /package/dist/chunks/{repository-cache-d9jj8t3e.js → bus-d9jj8t3e.js} +0 -0
  747. /package/dist/chunks/{repository-cache-dajrwvna.js → bus-dajrwvna.js} +0 -0
  748. /package/dist/chunks/{repository-cache-dap0rakb.js → bus-dap0rakb.js} +0 -0
  749. /package/dist/chunks/{repository-cache-df08tz66.js → bus-df08tz66.js} +0 -0
  750. /package/dist/chunks/{repository-cache-dy18nga0.js → bus-dy18nga0.js} +0 -0
  751. /package/dist/chunks/{repository-cache-e5kj55wp.js → bus-e5kj55wp.js} +0 -0
  752. /package/dist/chunks/{repository-cache-e73j6tqm.js → bus-e73j6tqm.js} +0 -0
  753. /package/dist/chunks/{repository-cache-ec1grn59.js → bus-ec1grn59.js} +0 -0
  754. /package/dist/chunks/{repository-cache-eh3zwz77.js → bus-eh3zwz77.js} +0 -0
  755. /package/dist/chunks/{repository-cache-emrn6kk6.js → bus-emrn6kk6.js} +0 -0
  756. /package/dist/chunks/{repository-cache-f0mxakyp.js → bus-f0mxakyp.js} +0 -0
  757. /package/dist/chunks/{repository-cache-f6n9ztr4.js → bus-f6n9ztr4.js} +0 -0
  758. /package/dist/chunks/{repository-cache-faypxj3z.js → bus-faypxj3z.js} +0 -0
  759. /package/dist/chunks/{repository-cache-fd410y7t.js → bus-fd410y7t.js} +0 -0
  760. /package/dist/chunks/{repository-cache-fxgpk5d8.js → bus-fxgpk5d8.js} +0 -0
  761. /package/dist/chunks/{repository-cache-g4wezp1m.js → bus-g4wezp1m.js} +0 -0
  762. /package/dist/chunks/{repository-cache-g86h250q.js → bus-g86h250q.js} +0 -0
  763. /package/dist/chunks/{repository-cache-gebd4c9n.js → bus-gebd4c9n.js} +0 -0
  764. /package/dist/chunks/{repository-cache-gftt206x.js → bus-gftt206x.js} +0 -0
  765. /package/dist/chunks/{repository-cache-hjbc5kem.js → bus-hjbc5kem.js} +0 -0
  766. /package/dist/chunks/{repository-cache-hk9envan.js → bus-hk9envan.js} +0 -0
  767. /package/dist/chunks/{repository-cache-j2ntwpah.js → bus-j2ntwpah.js} +0 -0
  768. /package/dist/chunks/{repository-cache-j5zkgpj8.js → bus-j5zkgpj8.js} +0 -0
  769. /package/dist/chunks/{repository-cache-jjkms2e6.js → bus-jjkms2e6.js} +0 -0
  770. /package/dist/chunks/{repository-cache-jr7sbwjy.js → bus-jr7sbwjy.js} +0 -0
  771. /package/dist/chunks/{repository-cache-jwfs4k6c.js → bus-jwfs4k6c.js} +0 -0
  772. /package/dist/chunks/{repository-cache-jzg6c2d5.js → bus-jzg6c2d5.js} +0 -0
  773. /package/dist/chunks/{repository-cache-mp448xyj.js → bus-mp448xyj.js} +0 -0
  774. /package/dist/chunks/{repository-cache-msx8hqn2.js → bus-msx8hqn2.js} +0 -0
  775. /package/dist/chunks/{repository-cache-n05xt0ee.js → bus-n05xt0ee.js} +0 -0
  776. /package/dist/chunks/{repository-cache-n3j8tn72.js → bus-n3j8tn72.js} +0 -0
  777. /package/dist/chunks/{repository-cache-njntx4h6.js → bus-njntx4h6.js} +0 -0
  778. /package/dist/chunks/{repository-cache-q3sfg36h.js → bus-q3sfg36h.js} +0 -0
  779. /package/dist/chunks/{repository-cache-q74kybfr.js → bus-q74kybfr.js} +0 -0
  780. /package/dist/chunks/{repository-cache-qaymkmh1.js → bus-qaymkmh1.js} +0 -0
  781. /package/dist/chunks/{repository-cache-qb87gjwd.js → bus-qb87gjwd.js} +0 -0
  782. /package/dist/chunks/{repository-cache-qfa1cgps.js → bus-qfa1cgps.js} +0 -0
  783. /package/dist/chunks/{repository-cache-qg3g05ea.js → bus-qg3g05ea.js} +0 -0
  784. /package/dist/chunks/{repository-cache-qrg20bc0.js → bus-qrg20bc0.js} +0 -0
  785. /package/dist/chunks/{repository-cache-rcb2kzg1.js → bus-rcb2kzg1.js} +0 -0
  786. /package/dist/chunks/{repository-cache-sdp7kfr6.js → bus-sdp7kfr6.js} +0 -0
  787. /package/dist/chunks/{repository-cache-sk3qaz4a.js → bus-sk3qaz4a.js} +0 -0
  788. /package/dist/chunks/{repository-cache-ssg3fenm.js → bus-ssg3fenm.js} +0 -0
  789. /package/dist/chunks/{repository-cache-w803qqfp.js → bus-w803qqfp.js} +0 -0
  790. /package/dist/chunks/{repository-cache-wc3fc9cn.js → bus-wc3fc9cn.js} +0 -0
  791. /package/dist/chunks/{repository-cache-wer8tq1h.js → bus-wer8tq1h.js} +0 -0
  792. /package/dist/chunks/{repository-cache-wtztk69x.js → bus-wtztk69x.js} +0 -0
  793. /package/dist/chunks/{repository-cache-x0ckcb58.js → bus-x0ckcb58.js} +0 -0
  794. /package/dist/chunks/{repository-cache-x61499pn.js → bus-x61499pn.js} +0 -0
  795. /package/dist/chunks/{repository-cache-y44na4kk.js → bus-y44na4kk.js} +0 -0
  796. /package/dist/chunks/{repository-cache-y8cydn3q.js → bus-y8cydn3q.js} +0 -0
  797. /package/dist/chunks/{repository-cache-y8f7s663.js → bus-y8f7s663.js} +0 -0
  798. /package/dist/chunks/{repository-cache-ygaqb7jw.js → bus-ygaqb7jw.js} +0 -0
  799. /package/dist/chunks/{repository-cache-ym463w8f.js → bus-ym463w8f.js} +0 -0
  800. /package/dist/chunks/{repository-cache-z9919s4g.js → bus-z9919s4g.js} +0 -0
@@ -1,27 +1,36 @@
1
1
  import {
2
2
  Service83,
3
3
  node87
4
- } from "./repository-cache-e7z5m3qb.js";
4
+ } from "./bus-jbg63639.js";
5
5
  import {
6
6
  shutdown2,
7
7
  create3
8
- } from "./repository-cache-rdw6cm16.js";
8
+ } from "./bus-rdw6cm16.js";
9
9
  import {
10
10
  key2
11
- } from "./repository-cache-mpk0rfs5.js";
11
+ } from "./bus-dnxkq42g.js";
12
12
  import {
13
- ID13,
14
- Service72,
15
- node75,
13
+ ID14,
14
+ Service75,
15
+ node79,
16
16
  Event17
17
- } from "./repository-cache-4pmjbv1q.js";
17
+ } from "./bus-057z78dy.js";
18
18
  import {
19
- Service80,
20
- node84
21
- } from "./repository-cache-h0h78a5e.js";
19
+ Service77,
20
+ node81
21
+ } from "./bus-32sa0c0w.js";
22
22
  import {
23
23
  __export
24
- } from "./repository-cache-9rqn6x4v.js";
24
+ } from "./bus-9rqn6x4v.js";
25
+
26
+ // src/aisdk-native.ts
27
+ var exports_aisdk_native = {};
28
+ __export(exports_aisdk_native, {
29
+ AISDKNative: () => exports_aisdk_native,
30
+ native: () => native2,
31
+ rewrite: () => rewrite2
32
+ });
33
+ import { Effect as Effect2, Option, Schema as Schema2, Struct as Struct2 } from "effect";
25
34
 
26
35
  // src/provider.ts
27
36
  var exports_provider3 = {};
@@ -29,12 +38,12 @@ __export(exports_provider3, {
29
38
  AISDK_PREFIX: () => AISDK_PREFIX2,
30
39
  Compaction: () => Compaction3,
31
40
  Event: () => Event16,
32
- ID: () => ID12,
33
- Info: () => Info26,
41
+ ID: () => ID13,
42
+ Info: () => Info27,
34
43
  LoadError: () => LoadError3,
35
44
  Provider: () => exports_provider3,
36
45
  Request: () => Request3,
37
- Service: () => Service69,
46
+ Service: () => Service74,
38
47
  Settings: () => Settings2,
39
48
  Transport: () => Transport2,
40
49
  aisdk: () => aisdk2,
@@ -44,10 +53,10 @@ __export(exports_provider3, {
44
53
  mergeOverlay: () => mergeOverlay2,
45
54
  modelSettings: () => modelSettings2,
46
55
  nativeSettings: () => nativeSettings2,
47
- node: () => node72,
56
+ node: () => node78,
48
57
  packageName: () => packageName2
49
58
  });
50
- import { Context, Effect as Effect2, Layer, Schema as Schema2, Stream, Struct as Struct2 } from "effect";
59
+ import { Context, Effect, Layer, Schema, Stream, Struct } from "effect";
51
60
  import { Provider } from "@opencode/schema/provider";
52
61
  import { Model } from "@opencode/schema/model";
53
62
  import { makeLocationNode } from "@opencode/util/effect/app-node";
@@ -55,264 +64,8 @@ import { isRecord } from "@opencode/ai/utils/record";
55
64
  import { importModule, resolveModule } from "@opencode/util/runtime-import";
56
65
  import { Credential } from "@opencode/schema/credential";
57
66
  import { freeze } from "immer";
58
-
59
- // src/aisdk-native.ts
60
- var exports_aisdk_native = {};
61
- __export(exports_aisdk_native, {
62
- AISDKNative: () => exports_aisdk_native,
63
- native: () => native2,
64
- rewrite: () => rewrite2
65
- });
66
- import { Effect, Option, Schema, Struct } from "effect";
67
- function rewrite2(target, input) {
68
- if (input.specifier === undefined)
69
- return;
70
- const plain = resolve(input.specifier, input);
71
- if (!plain)
72
- return;
73
- const settings = decode(target.settings ?? {});
74
- const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
75
- const translated = options(replacement, input.modelID, settings);
76
- if (target.package !== undefined || replacement !== input.specifier)
77
- target.package = replacement;
78
- target.settings = target.settings === undefined ? undefined : {
79
- ...translated.settings,
80
- ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
81
- };
82
- target.headers = mergeHeaders2(translated.headers, target.headers);
83
- target.body = mergeOverlay2(translated.body, target.body);
84
- target.variants = target.variants?.map((variant) => {
85
- const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
86
- const headers = mergeHeaders2(overlay.headers, variant.headers);
87
- const body = mergeOverlay2(overlay.body, variant.body);
88
- return {
89
- id: variant.id,
90
- ...variant.settings === undefined ? {} : { settings: overlay.settings },
91
- ...headers === undefined ? {} : { headers },
92
- ...body === undefined ? {} : { body }
93
- };
94
- });
95
- }
96
- var PACKAGES = {
97
- "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
98
- "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
99
- "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
100
- "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
101
- "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
102
- "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
103
- "@ai-sdk/google": "@opencode/ai/providers/google",
104
- "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
105
- "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
106
- "@ai-sdk/groq": "@opencode/ai/providers/groq",
107
- "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
108
- "@ai-sdk/openai": "@opencode/ai/providers/openai",
109
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
110
- "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
111
- "@ai-sdk/xai": "@opencode/ai/providers/xai",
112
- "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
113
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
114
- };
115
- var protocols = (name) => ({
116
- "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
117
- "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
118
- "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
119
- });
120
- var HOSTS = {
121
- alibaba: protocols("alibaba"),
122
- "alibaba-cn": protocols("alibaba"),
123
- "alibaba-coding-plan": protocols("alibaba"),
124
- "alibaba-coding-plan-cn": protocols("alibaba"),
125
- "alibaba-token-plan": protocols("alibaba"),
126
- "alibaba-token-plan-cn": protocols("alibaba"),
127
- baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
128
- "cloudflare-ai-gateway": {
129
- "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
130
- "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
131
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
132
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
133
- },
134
- "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
135
- deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
136
- "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
137
- "google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
138
- "kimi-for-coding": protocols("moonshot"),
139
- meta: protocols("meta"),
140
- minimax: protocols("minimax"),
141
- "minimax-cn": protocols("minimax"),
142
- "minimax-coding-plan": protocols("minimax"),
143
- "minimax-cn-coding-plan": protocols("minimax"),
144
- moonshotai: protocols("moonshot"),
145
- "moonshotai-cn": protocols("moonshot"),
146
- zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
147
- "zai-coding-plan": protocols("zai-coding-plan"),
148
- zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
149
- "zhipuai-coding-plan": protocols("zai-coding-plan")
150
- };
151
- var NATIVE = new Set([
152
- ...Object.values(PACKAGES),
153
- ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
154
- "@opencode/ai/providers/azure/chat",
155
- "@opencode/ai/providers/amazon-bedrock/mantle",
156
- "@opencode/ai/providers/amazon-bedrock/mantle/chat",
157
- "@opencode/ai/providers/amazon-bedrock/mantle/responses"
158
- ]);
159
- function native2(npm, context) {
160
- const host = HOSTS[context.providerID]?.[npm];
161
- if (host)
162
- return host;
163
- if (npm === "@ai-sdk/amazon-bedrock/mantle")
164
- return mantle(context.modelID);
165
- if (npm === "@ai-sdk/azure" && context.settings?.useCompletionUrls === true)
166
- return "@opencode/ai/providers/azure/chat";
167
- return PACKAGES[npm];
168
- }
169
- var mantle = (modelID) => {
170
- if (modelID === undefined)
171
- return "@opencode/ai/providers/amazon-bedrock/mantle";
172
- return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
173
- };
174
- function resolve(specifier, context) {
175
- const npm = packageName2(specifier);
176
- if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
177
- return native2(npm, context);
178
- if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
179
- return mantle(context.modelID);
180
- if (npm === "@opencode/ai/providers/azure/responses" && context.settings?.useCompletionUrls === true)
181
- return "@opencode/ai/providers/azure/chat";
182
- return NATIVE.has(npm) ? npm : undefined;
183
- }
184
- function options(replacement, modelID, settings) {
185
- const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
186
- const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
187
- const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
188
- return {
189
- settings: {
190
- ...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
191
- ...thinking === undefined ? {} : { thinking }
192
- },
193
- ...settings.headers === undefined ? {} : { headers: settings.headers },
194
- ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
195
- ...converse ? bedrockRequest(modelID, settings) : {},
196
- ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
197
- };
198
- }
199
- var BEDROCK_KEYS = [
200
- "bearerToken",
201
- "endpoint",
202
- "credentials",
203
- "credentialProvider",
204
- "accessKeyId",
205
- "secretAccessKey",
206
- "sessionToken"
207
- ];
208
- var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
209
- function bedrockSettings(settings, converse) {
210
- const region = settings.region ?? settings.credentials?.region;
211
- const credentials = settings.credentials ?? settings;
212
- const baseURL = settings.baseURL ?? settings.endpoint;
213
- return {
214
- ...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
215
- ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
216
- ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
217
- ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
218
- credentials: {
219
- ...region === undefined ? {} : { region },
220
- accessKeyId: credentials.accessKeyId,
221
- secretAccessKey: credentials.secretAccessKey,
222
- ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
223
- }
224
- }
225
- };
226
- }
227
- function bedrockThinking(modelID, settings) {
228
- const reasoning = settings.reasoningConfig;
229
- if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
230
- return;
231
- return { type: "enabled", budgetTokens: reasoning.budgetTokens };
232
- }
233
- function bedrockRequest(modelID, settings) {
234
- const additional = settings.additionalModelRequestFields ?? {};
235
- const reasoning = settings.reasoningConfig;
236
- const anthropic = modelID?.includes("anthropic") ?? false;
237
- const openai = modelID?.includes("openai.") ?? false;
238
- const harmony = modelID?.includes("openai.gpt-oss") ?? false;
239
- const effort = reasoning?.maxReasoningEffort;
240
- const type = reasoning?.type;
241
- const budget = reasoning?.budgetTokens;
242
- const display = reasoning?.display;
243
- const betas = settings.anthropicBeta ?? [];
244
- const fields = mergeOverlay2(additional, {
245
- ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
246
- ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
247
- ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
248
- ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
249
- ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
250
- ...!anthropic && !openai && effort !== undefined ? {
251
- reasoningConfig: {
252
- ...type === undefined || type === "adaptive" ? {} : { type },
253
- ...budget === undefined ? {} : { budgetTokens: budget },
254
- maxReasoningEffort: effort
255
- }
256
- } : {}
257
- });
258
- const body = {
259
- ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
260
- ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
261
- };
262
- return Object.keys(body).length === 0 ? {} : { body };
263
- }
264
- var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
265
- function openRouterRequest(settings) {
266
- const headers = mergeHeaders2({
267
- ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
268
- ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
269
- ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
270
- }, settings.headers) ?? {};
271
- return Object.keys(headers).length === 0 ? {} : { headers };
272
- }
273
- var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
274
- var Credentials = Schema.Struct({
275
- accessKeyId: Schema.String,
276
- secretAccessKey: Schema.String,
277
- sessionToken: lenient(Schema.String),
278
- region: lenient(Schema.String)
279
- });
280
- var Legacy = Schema.StructWithRest(Schema.Struct({
281
- apiKey: lenient(Schema.String),
282
- baseURL: lenient(Schema.String),
283
- headers: lenient(Schema.Record(Schema.String, Schema.String)),
284
- extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
285
- useCompletionUrls: lenient(Schema.Boolean),
286
- auth: lenient(Schema.Literals(["bearer", "sigv4"])),
287
- bearerToken: lenient(Schema.String),
288
- endpoint: lenient(Schema.String),
289
- region: lenient(Schema.String),
290
- credentials: lenient(Credentials),
291
- accessKeyId: lenient(Schema.String),
292
- secretAccessKey: lenient(Schema.String),
293
- sessionToken: lenient(Schema.String),
294
- anthropicBeta: lenient(Schema.Array(Schema.String)),
295
- serviceTier: lenient(Schema.String),
296
- reasoningConfig: lenient(Schema.Struct({
297
- type: lenient(Schema.String),
298
- display: lenient(Schema.String),
299
- maxReasoningEffort: lenient(Schema.String),
300
- budgetTokens: lenient(Schema.Number)
301
- })),
302
- additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
303
- anthropic_beta: lenient(Schema.Array(Schema.String)),
304
- output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
305
- reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
306
- }), [Schema.Record(Schema.String, Schema.Unknown)])),
307
- appName: lenient(Schema.String),
308
- appUrl: lenient(Schema.String),
309
- api_keys: lenient(Schema.Record(Schema.String, Schema.String))
310
- }), [Schema.Record(Schema.String, Schema.Unknown)]);
311
- var decode = Schema.decodeUnknownSync(Legacy);
312
-
313
- // src/provider.ts
314
67
  import { Event as Event16 } from "@opencode/schema/provider";
315
- var ID12 = Provider.ID;
68
+ var ID13 = Provider.ID;
316
69
  var AISDK_PREFIX2 = "aisdk:";
317
70
  var isAISDK2 = (value) => value?.startsWith(AISDK_PREFIX2) ?? false;
318
71
  var aisdk2 = (value) => isAISDK2(value) ? value : `${AISDK_PREFIX2}${value}`;
@@ -323,12 +76,12 @@ function packageName2(value) {
323
76
  return value;
324
77
  return value.slice(AISDK_PREFIX2.length);
325
78
  }
326
- var JsonRecord = Schema2.Record(Schema2.String, Schema2.Json);
327
- var decodeJsonRecord = Schema2.decodeUnknownSync(JsonRecord);
79
+ var JsonRecord = Schema.Record(Schema.String, Schema.Json);
80
+ var decodeJsonRecord = Schema.decodeUnknownSync(JsonRecord);
328
81
 
329
- class LoadError3 extends Schema2.TaggedError()("Provider.LoadError", {
330
- package: Schema2.String,
331
- cause: Schema2.Defect()
82
+ class LoadError3 extends Schema.TaggedError()("Provider.LoadError", {
83
+ package: Schema.String,
84
+ cause: Schema.Defect()
332
85
  }) {
333
86
  }
334
87
  var packages = new Map;
@@ -389,12 +142,12 @@ var builtins = new Map([
389
142
  () => import("@opencode/ai/providers/zai-coding-plan/responses")
390
143
  ]
391
144
  ]);
392
- var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
145
+ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
393
146
  const specifier = packageName2(input);
394
147
  const builtin = builtins.get(specifier);
395
148
  if (builtin)
396
149
  return yield* importPackage(specifier, specifier, builtin);
397
- const resolved = yield* Effect2.sync(() => {
150
+ const resolved = yield* Effect.sync(() => {
398
151
  if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
399
152
  return specifier;
400
153
  try {
@@ -413,8 +166,8 @@ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
413
166
  }
414
167
  const parts = specifier.split("/");
415
168
  const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
416
- const installed = yield* npm.add(root).pipe(Effect2.mapError((cause) => new LoadError3({ package: specifier, cause })));
417
- const entrypoint = yield* Effect2.try({
169
+ const installed = yield* npm.add(root).pipe(Effect.mapError((cause) => new LoadError3({ package: specifier, cause })));
170
+ const entrypoint = yield* Effect.try({
418
171
  try: () => resolveModule(specifier, installed.directory),
419
172
  catch: (cause) => new LoadError3({ package: specifier, cause })
420
173
  });
@@ -423,10 +176,10 @@ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
423
176
  var CORE_KEYS = ["chunkTimeout", "compaction", "fetch", "timeout", "transport"];
424
177
  var PROVIDER_ONLY_KEYS = ["chunkTimeout", "timeout", "transport"];
425
178
  function nativeSettings2(settings) {
426
- return Struct2.omit(settings, CORE_KEYS);
179
+ return Struct.omit(settings, CORE_KEYS);
427
180
  }
428
181
  function modelSettings2(settings) {
429
- return settings && Struct2.omit(settings, PROVIDER_ONLY_KEYS);
182
+ return settings && Struct.omit(settings, PROVIDER_ONLY_KEYS);
430
183
  }
431
184
  function mergeOverlay2(base, overlay) {
432
185
  if (base === undefined)
@@ -457,9 +210,9 @@ var Request3 = Provider.Request;
457
210
  var Compaction3 = Provider.Compaction;
458
211
  var Transport2 = Provider.Transport;
459
212
  var Settings2 = Provider.Settings;
460
- var Info26 = Provider.Info;
213
+ var Info27 = Provider.Info;
461
214
 
462
- class Service69 extends Context.Service()("@opencode/Provider") {
215
+ class Service74 extends Context.Service()("@opencode/Provider") {
463
216
  }
464
217
  var definitions = new WeakMap;
465
218
  function index(providerID, models) {
@@ -472,10 +225,10 @@ function index(providerID, models) {
472
225
  definitions.set(models, indexes);
473
226
  return result;
474
227
  }
475
- var layer = Layer.effect(Service69, Effect2.gen(function* () {
228
+ var layer = Layer.effect(Service74, Effect.gen(function* () {
476
229
  const bus = yield* Service83;
477
- const integrations = yield* Service72;
478
- const location = yield* Service80;
230
+ const integrations = yield* Service75;
231
+ const location = yield* Service77;
479
232
  const state = create3({
480
233
  name: "provider",
481
234
  initial: () => new Map,
@@ -486,7 +239,7 @@ var layer = Layer.effect(Service69, Effect2.gen(function* () {
486
239
  const current = records.get(id);
487
240
  if (current)
488
241
  return current;
489
- const added = { provider: Info26.empty(id), models: new Map };
242
+ const added = { provider: Info27.empty(id), models: new Map };
490
243
  records.set(id, added);
491
244
  maps.add(added.models);
492
245
  return added;
@@ -554,9 +307,9 @@ var layer = Layer.effect(Service69, Effect2.gen(function* () {
554
307
  },
555
308
  notify: () => notify
556
309
  });
557
- yield* Effect2.addFinalizer(() => shutdown2(state.reload()));
310
+ yield* Effect.addFinalizer(() => shutdown2(state.reload()));
558
311
  let cached;
559
- const snapshot = Effect2.fn("Provider.snapshot")(function* () {
312
+ const snapshot = Effect.fn("Provider.snapshot")(function* () {
560
313
  while (true) {
561
314
  const revision = integrations.revision();
562
315
  const records = state.get();
@@ -567,7 +320,7 @@ var layer = Layer.effect(Service69, Effect2.gen(function* () {
567
320
  const available = Array.from(records.values()).filter((record) => {
568
321
  if (record.provider.activation === "disabled")
569
322
  return false;
570
- const integration = byID.get(record.provider.integrationID ?? ID13.make(record.provider.id));
323
+ const integration = byID.get(record.provider.integrationID ?? ID14.make(record.provider.id));
571
324
  if (record.sourceConnection && key2(record.sourceConnection) !== key2(integration?.connections[0]))
572
325
  return false;
573
326
  if (record.provider.activation === "enabled")
@@ -584,7 +337,7 @@ var layer = Layer.effect(Service69, Effect2.gen(function* () {
584
337
  }
585
338
  });
586
339
  let published;
587
- const notify = Effect2.gen(function* () {
340
+ const notify = Effect.gen(function* () {
588
341
  const value = yield* snapshot();
589
342
  if (value === published)
590
343
  return;
@@ -593,19 +346,19 @@ var layer = Layer.effect(Service69, Effect2.gen(function* () {
593
346
  location: { directory: location.directory, workspaceID: location.workspaceID }
594
347
  });
595
348
  });
596
- yield* bus.subscribe([Event17.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect2.forkScoped({ startImmediately: true }));
597
- return Service69.of({
349
+ yield* bus.subscribe([Event17.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect.forkScoped({ startImmediately: true }));
350
+ return Service74.of({
598
351
  transform: state.transform,
599
352
  reload: state.reload,
600
- get: Effect2.fn("Provider.get")((id) => Effect2.sync(() => freeze(state.get().get(id)?.provider, true))),
601
- all: Effect2.fn("Provider.all")(() => Effect2.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
602
- available: Effect2.fn("Provider.available")(() => snapshot().pipe(Effect2.map((value) => value.providers))),
353
+ get: Effect.fn("Provider.get")((id) => Effect.sync(() => freeze(state.get().get(id)?.provider, true))),
354
+ all: Effect.fn("Provider.all")(() => Effect.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
355
+ available: Effect.fn("Provider.available")(() => snapshot().pipe(Effect.map((value) => value.providers))),
603
356
  snapshot
604
357
  });
605
358
  }));
606
- var node72 = makeLocationNode({ service: Service69, layer, deps: [node87, node75, node84] });
607
- var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
608
- const module = yield* Effect2.tryPromise({
359
+ var node78 = makeLocationNode({ service: Service74, layer, deps: [node87, node79, node81] });
360
+ var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
361
+ const module = yield* Effect.tryPromise({
609
362
  try: () => {
610
363
  const existing = packages.get(entrypoint);
611
364
  if (existing)
@@ -625,4 +378,251 @@ var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, e
625
378
  return module;
626
379
  });
627
380
 
628
- export { ID12, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info26, Service69, node72, exports_provider3, Event16, rewrite2, native2, exports_aisdk_native };
381
+ // src/aisdk-native.ts
382
+ function rewrite2(target, input) {
383
+ if (input.specifier === undefined)
384
+ return;
385
+ const plain = resolve(input.specifier, input);
386
+ if (!plain)
387
+ return;
388
+ const settings = decode(target.settings ?? {});
389
+ const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
390
+ const translated = options(replacement, input.modelID, settings);
391
+ if (target.package !== undefined || replacement !== input.specifier)
392
+ target.package = replacement;
393
+ target.settings = target.settings === undefined ? undefined : {
394
+ ...translated.settings,
395
+ ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
396
+ };
397
+ target.headers = mergeHeaders2(translated.headers, target.headers);
398
+ target.body = mergeOverlay2(translated.body, target.body);
399
+ target.variants = target.variants?.map((variant) => {
400
+ const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
401
+ const headers = mergeHeaders2(overlay.headers, variant.headers);
402
+ const body = mergeOverlay2(overlay.body, variant.body);
403
+ return {
404
+ id: variant.id,
405
+ ...variant.settings === undefined ? {} : { settings: overlay.settings },
406
+ ...headers === undefined ? {} : { headers },
407
+ ...body === undefined ? {} : { body }
408
+ };
409
+ });
410
+ }
411
+ var PACKAGES = {
412
+ "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
413
+ "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
414
+ "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
415
+ "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
416
+ "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
417
+ "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
418
+ "@ai-sdk/google": "@opencode/ai/providers/google",
419
+ "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
420
+ "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
421
+ "@ai-sdk/groq": "@opencode/ai/providers/groq",
422
+ "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
423
+ "@ai-sdk/openai": "@opencode/ai/providers/openai",
424
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
425
+ "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
426
+ "@ai-sdk/xai": "@opencode/ai/providers/xai",
427
+ "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
428
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
429
+ };
430
+ var protocols = (name) => ({
431
+ "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
432
+ "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
433
+ "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
434
+ });
435
+ var HOSTS = {
436
+ alibaba: protocols("alibaba"),
437
+ "alibaba-cn": protocols("alibaba"),
438
+ "alibaba-coding-plan": protocols("alibaba"),
439
+ "alibaba-coding-plan-cn": protocols("alibaba"),
440
+ "alibaba-token-plan": protocols("alibaba"),
441
+ "alibaba-token-plan-cn": protocols("alibaba"),
442
+ baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
443
+ "cloudflare-ai-gateway": {
444
+ "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
445
+ "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
446
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
447
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
448
+ },
449
+ "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
450
+ deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
451
+ "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
452
+ "google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
453
+ "kimi-for-coding": protocols("moonshot"),
454
+ meta: protocols("meta"),
455
+ minimax: protocols("minimax"),
456
+ "minimax-cn": protocols("minimax"),
457
+ "minimax-coding-plan": protocols("minimax"),
458
+ "minimax-cn-coding-plan": protocols("minimax"),
459
+ moonshotai: protocols("moonshot"),
460
+ "moonshotai-cn": protocols("moonshot"),
461
+ zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
462
+ "zai-coding-plan": protocols("zai-coding-plan"),
463
+ zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
464
+ "zhipuai-coding-plan": protocols("zai-coding-plan")
465
+ };
466
+ var NATIVE = new Set([
467
+ ...Object.values(PACKAGES),
468
+ ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
469
+ "@opencode/ai/providers/azure/chat",
470
+ "@opencode/ai/providers/amazon-bedrock/mantle",
471
+ "@opencode/ai/providers/amazon-bedrock/mantle/chat",
472
+ "@opencode/ai/providers/amazon-bedrock/mantle/responses"
473
+ ]);
474
+ function native2(npm, context) {
475
+ const host = HOSTS[context.providerID]?.[npm];
476
+ if (host)
477
+ return host;
478
+ if (npm === "@ai-sdk/amazon-bedrock/mantle")
479
+ return mantle(context.modelID);
480
+ if (npm === "@ai-sdk/azure" && context.settings?.useCompletionUrls === true)
481
+ return "@opencode/ai/providers/azure/chat";
482
+ return PACKAGES[npm];
483
+ }
484
+ var mantle = (modelID) => {
485
+ if (modelID === undefined)
486
+ return "@opencode/ai/providers/amazon-bedrock/mantle";
487
+ return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
488
+ };
489
+ function resolve(specifier, context) {
490
+ const npm = packageName2(specifier);
491
+ if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
492
+ return native2(npm, context);
493
+ if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
494
+ return mantle(context.modelID);
495
+ if (npm === "@opencode/ai/providers/azure/responses" && context.settings?.useCompletionUrls === true)
496
+ return "@opencode/ai/providers/azure/chat";
497
+ return NATIVE.has(npm) ? npm : undefined;
498
+ }
499
+ function options(replacement, modelID, settings) {
500
+ const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
501
+ const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
502
+ const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
503
+ return {
504
+ settings: {
505
+ ...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
506
+ ...thinking === undefined ? {} : { thinking }
507
+ },
508
+ ...settings.headers === undefined ? {} : { headers: settings.headers },
509
+ ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
510
+ ...converse ? bedrockRequest(modelID, settings) : {},
511
+ ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
512
+ };
513
+ }
514
+ var BEDROCK_KEYS = [
515
+ "bearerToken",
516
+ "endpoint",
517
+ "credentials",
518
+ "credentialProvider",
519
+ "accessKeyId",
520
+ "secretAccessKey",
521
+ "sessionToken"
522
+ ];
523
+ var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
524
+ function bedrockSettings(settings, converse) {
525
+ const region = settings.region ?? settings.credentials?.region;
526
+ const credentials = settings.credentials ?? settings;
527
+ const baseURL = settings.baseURL ?? settings.endpoint;
528
+ return {
529
+ ...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
530
+ ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
531
+ ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
532
+ ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
533
+ credentials: {
534
+ ...region === undefined ? {} : { region },
535
+ accessKeyId: credentials.accessKeyId,
536
+ secretAccessKey: credentials.secretAccessKey,
537
+ ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
538
+ }
539
+ }
540
+ };
541
+ }
542
+ function bedrockThinking(modelID, settings) {
543
+ const reasoning = settings.reasoningConfig;
544
+ if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
545
+ return;
546
+ return { type: "enabled", budgetTokens: reasoning.budgetTokens };
547
+ }
548
+ function bedrockRequest(modelID, settings) {
549
+ const additional = settings.additionalModelRequestFields ?? {};
550
+ const reasoning = settings.reasoningConfig;
551
+ const anthropic = modelID?.includes("anthropic") ?? false;
552
+ const openai = modelID?.includes("openai.") ?? false;
553
+ const harmony = modelID?.includes("openai.gpt-oss") ?? false;
554
+ const effort = reasoning?.maxReasoningEffort;
555
+ const type = reasoning?.type;
556
+ const budget = reasoning?.budgetTokens;
557
+ const display = reasoning?.display;
558
+ const betas = settings.anthropicBeta ?? [];
559
+ const fields = mergeOverlay2(additional, {
560
+ ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
561
+ ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
562
+ ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
563
+ ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
564
+ ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
565
+ ...!anthropic && !openai && effort !== undefined ? {
566
+ reasoningConfig: {
567
+ ...type === undefined || type === "adaptive" ? {} : { type },
568
+ ...budget === undefined ? {} : { budgetTokens: budget },
569
+ maxReasoningEffort: effort
570
+ }
571
+ } : {}
572
+ });
573
+ const body = {
574
+ ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
575
+ ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
576
+ };
577
+ return Object.keys(body).length === 0 ? {} : { body };
578
+ }
579
+ var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
580
+ function openRouterRequest(settings) {
581
+ const headers = mergeHeaders2({
582
+ ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
583
+ ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
584
+ ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
585
+ }, settings.headers) ?? {};
586
+ return Object.keys(headers).length === 0 ? {} : { headers };
587
+ }
588
+ var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option.some(undefined)))));
589
+ var Credentials = Schema2.Struct({
590
+ accessKeyId: Schema2.String,
591
+ secretAccessKey: Schema2.String,
592
+ sessionToken: lenient(Schema2.String),
593
+ region: lenient(Schema2.String)
594
+ });
595
+ var Legacy = Schema2.StructWithRest(Schema2.Struct({
596
+ apiKey: lenient(Schema2.String),
597
+ baseURL: lenient(Schema2.String),
598
+ headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
599
+ extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
600
+ useCompletionUrls: lenient(Schema2.Boolean),
601
+ auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
602
+ bearerToken: lenient(Schema2.String),
603
+ endpoint: lenient(Schema2.String),
604
+ region: lenient(Schema2.String),
605
+ credentials: lenient(Credentials),
606
+ accessKeyId: lenient(Schema2.String),
607
+ secretAccessKey: lenient(Schema2.String),
608
+ sessionToken: lenient(Schema2.String),
609
+ anthropicBeta: lenient(Schema2.Array(Schema2.String)),
610
+ serviceTier: lenient(Schema2.String),
611
+ reasoningConfig: lenient(Schema2.Struct({
612
+ type: lenient(Schema2.String),
613
+ display: lenient(Schema2.String),
614
+ maxReasoningEffort: lenient(Schema2.String),
615
+ budgetTokens: lenient(Schema2.Number)
616
+ })),
617
+ additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
618
+ anthropic_beta: lenient(Schema2.Array(Schema2.String)),
619
+ output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
620
+ reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
621
+ }), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
622
+ appName: lenient(Schema2.String),
623
+ appUrl: lenient(Schema2.String),
624
+ api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
625
+ }), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
626
+ var decode = Schema2.decodeUnknownSync(Legacy);
627
+
628
+ export { rewrite2, native2, exports_aisdk_native, ID13, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info27, Service74, node78, exports_provider3, Event16 };