@opencode/core 0.0.0-dev-20725 → 0.0.0-dev-20731

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 (784) hide show
  1. package/dist/account/sql.js +1 -1
  2. package/dist/agent.js +84 -84
  3. package/dist/aisdk-native.js +90 -90
  4. package/dist/aisdk.js +95 -95
  5. package/dist/app.js +7 -7
  6. package/dist/bus.js +74 -74
  7. package/dist/chunks/{instruction-discovery-fy6pbx2f.js → state-08jsyhgk.js} +24 -24
  8. package/dist/chunks/{instruction-discovery-4ed0x5yc.js → state-09sqteag.js} +1 -1
  9. package/dist/chunks/{instruction-discovery-m47cqq2j.js → state-0j8txdm0.js} +3 -3
  10. package/dist/chunks/{instruction-discovery-0paq2nw3.js → state-0paq2nw3.js} +1 -1
  11. package/dist/chunks/{instruction-discovery-0r3c1bmw.js → state-0r3c1bmw.js} +2 -2
  12. package/dist/chunks/{instruction-discovery-ahqb0ma5.js → state-0s32db7e.js} +15 -15
  13. package/dist/chunks/{instruction-discovery-0vbcp93d.js → state-0vbcp93d.js} +2 -2
  14. package/dist/chunks/{instruction-discovery-kdpmtwd0.js → state-0zaydvkv.js} +32 -32
  15. package/dist/chunks/{instruction-discovery-rmnkmmsy.js → state-101fvt1n.js} +94 -94
  16. package/dist/chunks/{instruction-discovery-tvwj13n0.js → state-10rnhjad.js} +11 -11
  17. package/dist/chunks/{instruction-discovery-sz2337zw.js → state-138h01qe.js} +7 -7
  18. package/dist/chunks/{instruction-discovery-tyzzbzqn.js → state-1a37t69z.js} +10 -10
  19. package/dist/chunks/{instruction-discovery-2h6dd64w.js → state-1b60b23y.js} +18 -18
  20. package/dist/chunks/{instruction-discovery-1dazxqgg.js → state-1dazxqgg.js} +2 -2
  21. package/dist/chunks/{instruction-discovery-1dvck2a7.js → state-1dvck2a7.js} +2 -2
  22. package/dist/chunks/{instruction-discovery-g60p7p49.js → state-1epzdntc.js} +11 -11
  23. package/dist/chunks/{instruction-discovery-cvwz8r7d.js → state-1h0krj6g.js} +36 -36
  24. package/dist/chunks/{instruction-discovery-57myy5jh.js → state-1pxz8ven.js} +5 -5
  25. package/dist/chunks/{instruction-discovery-fjve5t31.js → state-1q8nfdb4.js} +3 -3
  26. package/dist/chunks/{instruction-discovery-3ye70ha2.js → state-1qbad211.js} +8 -8
  27. package/dist/chunks/{instruction-discovery-56gdpj1q.js → state-1ygqh575.js} +9 -9
  28. package/dist/chunks/{instruction-discovery-kfgkevm8.js → state-21qrczcf.js} +23 -23
  29. package/dist/chunks/{instruction-discovery-jsfxrkh5.js → state-24dsd3mh.js} +36 -36
  30. package/dist/chunks/{instruction-discovery-dv7jc8dx.js → state-25qfk6yg.js} +18 -18
  31. package/dist/chunks/{instruction-discovery-2a5m3afh.js → state-2a5m3afh.js} +1 -1
  32. package/dist/chunks/{instruction-discovery-vqfzq50h.js → state-2a6rn6yr.js} +6 -6
  33. package/dist/chunks/{instruction-discovery-1z87ab07.js → state-2kngz1a4.js} +11 -11
  34. package/dist/chunks/{instruction-discovery-trykadmf.js → state-2rc505e3.js} +21 -21
  35. package/dist/chunks/{instruction-discovery-6xcvjy28.js → state-2rnwhwfa.js} +14 -14
  36. package/dist/chunks/{instruction-discovery-j5e03z9p.js → state-2s897vgp.js} +13 -13
  37. package/dist/chunks/{instruction-discovery-a13vbfft.js → state-2t7sqs4y.js} +9 -9
  38. package/dist/chunks/{instruction-discovery-gqwek975.js → state-2z3n0s1m.js} +11 -11
  39. package/dist/chunks/{instruction-discovery-spa4s1dn.js → state-3eb2wybh.js} +11 -11
  40. package/dist/chunks/{instruction-discovery-3fc6dm20.js → state-3fc6dm20.js} +1 -1
  41. package/dist/chunks/{instruction-discovery-x1ns2rmk.js → state-3gccgfaf.js} +4 -4
  42. package/dist/chunks/{instruction-discovery-3hepkmqq.js → state-3hepkmqq.js} +1 -1
  43. package/dist/chunks/{instruction-discovery-gvnbcx9f.js → state-3jms3t4n.js} +79 -79
  44. package/dist/chunks/{instruction-discovery-jv5qmp9w.js → state-3nz0bd4c.js} +2 -2
  45. package/dist/chunks/{instruction-discovery-3smtnn6g.js → state-3smtnn6g.js} +1 -1
  46. package/dist/chunks/{instruction-discovery-3tvqynh2.js → state-3tvqynh2.js} +1 -1
  47. package/dist/chunks/{instruction-discovery-kn5t47nc.js → state-3w2eqbz4.js} +13 -13
  48. package/dist/chunks/{instruction-discovery-ycvydahw.js → state-3yjxx9cb.js} +13 -13
  49. package/dist/chunks/{instruction-discovery-3zsf4n22.js → state-3zsf4n22.js} +1 -1
  50. package/dist/chunks/{instruction-discovery-8v7xd1wr.js → state-40rcjy03.js} +36 -36
  51. package/dist/chunks/{instruction-discovery-6gy81bm0.js → state-41kmeemt.js} +6 -6
  52. package/dist/chunks/{instruction-discovery-rzhagf9y.js → state-427fgkyx.js} +20 -20
  53. package/dist/chunks/{instruction-discovery-k9gzbdyr.js → state-4dy7nfnb.js} +34 -34
  54. package/dist/chunks/{instruction-discovery-1rn5pcm9.js → state-4j4tgtq5.js} +4 -4
  55. package/dist/chunks/{instruction-discovery-shxd18c6.js → state-4m5yfwrs.js} +13 -13
  56. package/dist/chunks/{instruction-discovery-axs6pdy0.js → state-4n607a2z.js} +5 -5
  57. package/dist/chunks/{instruction-discovery-vtgxp655.js → state-4pa8nav4.js} +3 -3
  58. package/dist/chunks/{instruction-discovery-2ccvkpx1.js → state-4ts7tf6z.js} +2 -2
  59. package/dist/chunks/{instruction-discovery-v4p3p0ps.js → state-4xpke3ff.js} +15 -15
  60. package/dist/chunks/{instruction-discovery-v0jnr6tg.js → state-4yhfmhtq.js} +37 -37
  61. package/dist/chunks/{instruction-discovery-2f3mhj6p.js → state-52gbbbb2.js} +36 -36
  62. package/dist/chunks/{instruction-discovery-54ma36ye.js → state-54ma36ye.js} +1 -1
  63. package/dist/chunks/{instruction-discovery-rhz3ppas.js → state-54z56z4r.js} +8 -8
  64. package/dist/chunks/{instruction-discovery-fdteztds.js → state-551azpvx.js} +22 -22
  65. package/dist/chunks/{instruction-discovery-6azxvrpq.js → state-55ehdx5d.js} +23 -23
  66. package/dist/chunks/{instruction-discovery-5cq1fbn9.js → state-5gt3f0n7.js} +35 -35
  67. package/dist/chunks/{instruction-discovery-3vnr3awt.js → state-5h69wz8x.js} +4 -4
  68. package/dist/chunks/{instruction-discovery-7ynwestw.js → state-5k5r4c8x.js} +11 -11
  69. package/dist/chunks/{instruction-discovery-5m9w47nd.js → state-5m9w47nd.js} +1 -1
  70. package/dist/chunks/{instruction-discovery-e3qxr5gk.js → state-5qd3pb7m.js} +2 -2
  71. package/dist/chunks/{instruction-discovery-5t3nmthw.js → state-5t3nmthw.js} +2 -2
  72. package/dist/chunks/{instruction-discovery-1j3k7k9d.js → state-5w4b35rv.js} +9 -9
  73. package/dist/chunks/{instruction-discovery-kcy9dg9d.js → state-5y60f30r.js} +29 -29
  74. package/dist/chunks/{instruction-discovery-p37cw4rj.js → state-5yzzbxa7.js} +8 -8
  75. package/dist/chunks/{instruction-discovery-wvvb86qc.js → state-5zqdgy8b.js} +27 -27
  76. package/dist/chunks/{instruction-discovery-v8dws5ha.js → state-611ehfjv.js} +3 -3
  77. package/dist/chunks/{instruction-discovery-tneyjf48.js → state-62k0yxbf.js} +16 -16
  78. package/dist/chunks/{instruction-discovery-shd3tjfd.js → state-67yqhhje.js} +23 -23
  79. package/dist/chunks/{instruction-discovery-z8713354.js → state-686nxd57.js} +6 -6
  80. package/dist/chunks/{instruction-discovery-k3tvypcp.js → state-6bjn4za1.js} +28 -28
  81. package/dist/chunks/{instruction-discovery-d2y2z992.js → state-6cpepfj3.js} +18 -18
  82. package/dist/chunks/{instruction-discovery-0y6tdt34.js → state-6fhb81wd.js} +27 -27
  83. package/dist/chunks/{instruction-discovery-ked90xm8.js → state-6pygarpm.js} +5 -5
  84. package/dist/chunks/{instruction-discovery-n0hrvkpe.js → state-6rhevr55.js} +43 -43
  85. package/dist/chunks/{instruction-discovery-6xb47vfp.js → state-6xb47vfp.js} +1 -1
  86. package/dist/chunks/{instruction-discovery-71az546q.js → state-71az546q.js} +2 -2
  87. package/dist/chunks/{instruction-discovery-xspa99bm.js → state-77f8qgj3.js} +13 -13
  88. package/dist/chunks/{instruction-discovery-7bmhse3q.js → state-7bmhse3q.js} +1 -1
  89. package/dist/chunks/{instruction-discovery-qgn6gcr1.js → state-7dqw4kz8.js} +5 -5
  90. package/dist/chunks/{instruction-discovery-ej7r9z0m.js → state-7j27yge6.js} +21 -21
  91. package/dist/chunks/state-7jy1nsxc.js +26 -0
  92. package/dist/chunks/{instruction-discovery-3dhqmxsn.js → state-7pg6bb3s.js} +31 -31
  93. package/dist/chunks/{instruction-discovery-d6n2rq0s.js → state-7q0e42ms.js} +6 -6
  94. package/dist/chunks/{instruction-discovery-gybq0q5b.js → state-7rghpwat.js} +32 -32
  95. package/dist/chunks/{instruction-discovery-qdpn0p3b.js → state-7st03jgk.js} +19 -19
  96. package/dist/chunks/{instruction-discovery-8qhmnsmm.js → state-7x6rk6r1.js} +12 -12
  97. package/dist/chunks/{instruction-discovery-c85sm9p4.js → state-80jhpvy9.js} +30 -30
  98. package/dist/chunks/{instruction-discovery-w1eejvng.js → state-84txncab.js} +5 -5
  99. package/dist/chunks/{instruction-discovery-m2cgbxd0.js → state-89zyxthc.js} +27 -22
  100. package/dist/chunks/{instruction-discovery-8d7r5vzw.js → state-8d7r5vzw.js} +1 -1
  101. package/dist/chunks/{instruction-discovery-y2jstp7y.js → state-8hrcrd79.js} +29 -29
  102. package/dist/chunks/{instruction-discovery-d5x8dsx5.js → state-8hts1srz.js} +11 -11
  103. package/dist/chunks/{instruction-discovery-8m6m0r52.js → state-8m6m0r52.js} +1 -1
  104. package/dist/chunks/{instruction-discovery-1kk0y7r1.js → state-8mps3fwf.js} +19 -19
  105. package/dist/chunks/{instruction-discovery-mkamd2cf.js → state-9031p0b2.js} +5 -5
  106. package/dist/chunks/{instruction-discovery-tn29v157.js → state-918mtgee.js} +5 -5
  107. package/dist/chunks/{instruction-discovery-ra8aazcz.js → state-9dgxaq8y.js} +17 -17
  108. package/dist/chunks/{instruction-discovery-9e5bzkjp.js → state-9e5bzkjp.js} +3 -3
  109. package/dist/chunks/{instruction-discovery-g8x52gsw.js → state-9kg8hsmm.js} +11 -11
  110. package/dist/chunks/{instruction-discovery-wm42kgen.js → state-9n6qg2a9.js} +29 -29
  111. package/dist/chunks/{instruction-discovery-krrp65g5.js → state-9qk2kwmb.js} +16 -16
  112. package/dist/chunks/{instruction-discovery-gzf0jey7.js → state-9ywvhnd6.js} +20 -20
  113. package/dist/chunks/{instruction-discovery-eq1pz5kg.js → state-a1gpj94z.js} +3 -3
  114. package/dist/chunks/{instruction-discovery-6m42r3np.js → state-a8bn8zg0.js} +21 -21
  115. package/dist/chunks/{instruction-discovery-aaet6srn.js → state-aaet6srn.js} +2 -2
  116. package/dist/chunks/{instruction-discovery-4wnp65at.js → state-ad6fy242.js} +7 -7
  117. package/dist/chunks/{instruction-discovery-8ryk0bb9.js → state-aeb4sny1.js} +5 -5
  118. package/dist/chunks/{instruction-discovery-ebxy8v40.js → state-aeggwfyx.js} +7 -7
  119. package/dist/chunks/{instruction-discovery-wyt7mtfs.js → state-ajhnm1zb.js} +21 -21
  120. package/dist/chunks/{instruction-discovery-wzbah92y.js → state-b0rb4zb4.js} +32 -32
  121. package/dist/chunks/{instruction-discovery-nfw5wevp.js → state-b434f0z0.js} +9 -9
  122. package/dist/chunks/{instruction-discovery-b6gygkdw.js → state-b6gygkdw.js} +2 -2
  123. package/dist/chunks/{instruction-discovery-f2mw6jyj.js → state-bdpzzc2x.js} +11 -11
  124. package/dist/chunks/{instruction-discovery-0mk7ebd2.js → state-bgecxp98.js} +4 -4
  125. package/dist/chunks/{instruction-discovery-3a83a0n4.js → state-bnmr3cva.js} +8 -8
  126. package/dist/chunks/{instruction-discovery-eqbd9z3m.js → state-bx25mqzy.js} +27 -27
  127. package/dist/chunks/state-by5v678g.js +18 -0
  128. package/dist/chunks/{instruction-discovery-d1ccpy7q.js → state-c6b7y4z0.js} +3 -3
  129. package/dist/chunks/{instruction-discovery-vrxrx1v5.js → state-c6dd62wt.js} +4 -4
  130. package/dist/chunks/{instruction-discovery-qyx604d0.js → state-cb71px6m.js} +14 -14
  131. package/dist/chunks/{instruction-discovery-mxvb5adp.js → state-cfcvtgjj.js} +24 -24
  132. package/dist/chunks/{instruction-discovery-v48grkq5.js → state-cs141p16.js} +28 -28
  133. package/dist/chunks/{instruction-discovery-esnyhwy5.js → state-d7gb4geb.js} +8 -8
  134. package/dist/chunks/{instruction-discovery-xb50yt4b.js → state-d9sgy5v4.js} +4 -4
  135. package/dist/chunks/{instruction-discovery-q08m6yqc.js → state-dabehbb6.js} +9 -9
  136. package/dist/chunks/{instruction-discovery-pmm1qj4p.js → state-dmw4vz70.js} +19 -19
  137. package/dist/chunks/{instruction-discovery-chqzd9wq.js → state-dn6t15nt.js} +11 -11
  138. package/dist/chunks/{instruction-discovery-nxm207yx.js → state-dpkg50ah.js} +4 -4
  139. package/dist/chunks/{instruction-discovery-w96th336.js → state-dqv4y3rf.js} +44 -44
  140. package/dist/chunks/{instruction-discovery-qm7jrdpz.js → state-dy8qh9xy.js} +5 -5
  141. package/dist/chunks/{instruction-discovery-02xbtx70.js → state-e4atdt0t.js} +50 -50
  142. package/dist/chunks/{instruction-discovery-38vxzh90.js → state-edpay1ac.js} +31 -31
  143. package/dist/chunks/{instruction-discovery-ef5x83kb.js → state-ef5x83kb.js} +1 -1
  144. package/dist/chunks/{instruction-discovery-xy7nxqqh.js → state-ejxk0zy2.js} +30 -30
  145. package/dist/chunks/{instruction-discovery-etq0c3wd.js → state-etq0c3wd.js} +1 -1
  146. package/dist/chunks/{instruction-discovery-aavbrgwt.js → state-f42t7e33.js} +28 -28
  147. package/dist/chunks/{instruction-discovery-84xdhjgb.js → state-f7ge0a8n.js} +45 -45
  148. package/dist/chunks/{instruction-discovery-ryr25ayn.js → state-fdv30zvt.js} +7 -7
  149. package/dist/chunks/{instruction-discovery-z1ectzgg.js → state-fhb2dsjj.js} +28 -28
  150. package/dist/chunks/{instruction-discovery-pnkbpv6t.js → state-fmcqyzhx.js} +9 -9
  151. package/dist/chunks/{instruction-discovery-6qbsjcxz.js → state-ft8vrdb0.js} +28 -28
  152. package/dist/chunks/{instruction-discovery-f2trvhwb.js → state-fw6msab2.js} +13 -13
  153. package/dist/chunks/{instruction-discovery-sq5cmb50.js → state-fzm7tejx.js} +17 -17
  154. package/dist/chunks/{instruction-discovery-gd4qta3r.js → state-gd4qta3r.js} +1 -1
  155. package/dist/chunks/{instruction-discovery-c01nkytp.js → state-gh5z95q3.js} +9 -9
  156. package/dist/chunks/{instruction-discovery-addxnjmp.js → state-gqtdsdt7.js} +4 -4
  157. package/dist/chunks/{instruction-discovery-b7nzkckh.js → state-gs1dqwms.js} +22 -22
  158. package/dist/chunks/{instruction-discovery-h2b79v29.js → state-h2b79v29.js} +2 -2
  159. package/dist/chunks/{instruction-discovery-m1y5ga02.js → state-h3pfkhmz.js} +13 -13
  160. package/dist/chunks/{instruction-discovery-ygwzgsmj.js → state-h4ckqw4f.js} +11 -11
  161. package/dist/chunks/{instruction-discovery-a5jrsvab.js → state-h6h410qg.js} +61 -61
  162. package/dist/chunks/{instruction-discovery-h6vf3j39.js → state-h6vf3j39.js} +1 -1
  163. package/dist/chunks/{instruction-discovery-24ptn3c0.js → state-h78379q5.js} +48 -52
  164. package/dist/chunks/{instruction-discovery-d19zb9v6.js → state-hs3zg9hx.js} +36 -36
  165. package/dist/chunks/{instruction-discovery-qmvs021c.js → state-hv684ge7.js} +189 -189
  166. package/dist/chunks/{instruction-discovery-dmd82ryh.js → state-hw2pxhp3.js} +96 -96
  167. package/dist/chunks/{instruction-discovery-knevfgda.js → state-j34bs4nz.js} +4 -4
  168. package/dist/chunks/{instruction-discovery-j56e64zr.js → state-j56e64zr.js} +1 -1
  169. package/dist/chunks/{instruction-discovery-1cb25qpm.js → state-jf701akp.js} +5 -5
  170. package/dist/chunks/{instruction-discovery-w49382pb.js → state-jn0tk1mz.js} +8 -8
  171. package/dist/chunks/{instruction-discovery-gag4gr43.js → state-jnz95558.js} +17 -17
  172. package/dist/chunks/{instruction-discovery-1a777xbb.js → state-jwpv483e.js} +18 -18
  173. package/dist/chunks/{instruction-discovery-sr2dv6dj.js → state-jwygkmfq.js} +9 -9
  174. package/dist/chunks/{instruction-discovery-095fq8r9.js → state-k1qsfy5p.js} +43 -43
  175. package/dist/chunks/{instruction-discovery-feny6ayn.js → state-k99mds86.js} +36 -36
  176. package/dist/chunks/{instruction-discovery-qv8c18b1.js → state-k9t3kwqs.js} +12 -12
  177. package/dist/chunks/{instruction-discovery-hvy0zjq9.js → state-kaywwrt1.js} +5 -5
  178. package/dist/chunks/{instruction-discovery-h4y5xjrc.js → state-kkqpbp86.js} +328 -319
  179. package/dist/chunks/{instruction-discovery-my0mhq6c.js → state-kmb6d1dy.js} +30 -30
  180. package/dist/chunks/{instruction-discovery-7ks1423n.js → state-kss966qf.js} +24 -24
  181. package/dist/chunks/{instruction-discovery-99xfcv7k.js → state-ktay9hq4.js} +10 -10
  182. package/dist/chunks/{instruction-discovery-js6dfb5w.js → state-m2pfdawv.js} +4 -4
  183. package/dist/chunks/{instruction-discovery-m3fdjcah.js → state-m3fdjcah.js} +1 -1
  184. package/dist/chunks/{instruction-discovery-xkyz97qj.js → state-m4g7grr3.js} +24 -24
  185. package/dist/chunks/{instruction-discovery-k54318qp.js → state-m8b1hsph.js} +13 -13
  186. package/dist/chunks/{instruction-discovery-m9w0rfyh.js → state-m9w0rfyh.js} +1 -1
  187. package/dist/chunks/{instruction-discovery-zsqm7vff.js → state-mak85ys1.js} +15 -15
  188. package/dist/chunks/{instruction-discovery-knd4nc5f.js → state-maw79xe3.js} +11 -11
  189. package/dist/chunks/{instruction-discovery-q8c3pb1q.js → state-mcqz5t5c.js} +20 -20
  190. package/dist/chunks/{instruction-discovery-0tec47cr.js → state-mhrgq2e3.js} +8 -8
  191. package/dist/chunks/{instruction-discovery-a1xkz11p.js → state-mhz4gg3p.js} +21 -21
  192. package/dist/chunks/{instruction-discovery-p056yhxs.js → state-ms5r0hkh.js} +48 -48
  193. package/dist/chunks/{instruction-discovery-m45m4ven.js → state-mthfcyeq.js} +11 -11
  194. package/dist/chunks/{instruction-discovery-jah1syx0.js → state-mwh5sg7p.js} +40 -40
  195. package/dist/chunks/{instruction-discovery-cna82en0.js → state-mwnn09ds.js} +18 -18
  196. package/dist/chunks/{instruction-discovery-273h6293.js → state-myr8fe9c.js} +6 -6
  197. package/dist/chunks/{instruction-discovery-dz9417ry.js → state-mzc2a39c.js} +9 -9
  198. package/dist/chunks/{instruction-discovery-e116hgz1.js → state-mzwaxmr6.js} +3 -3
  199. package/dist/chunks/{instruction-discovery-4sfcqppx.js → state-n3ky4ns8.js} +2 -2
  200. package/dist/chunks/{instruction-discovery-nn1ppfgc.js → state-nb795v0v.js} +5 -5
  201. package/dist/chunks/{instruction-discovery-fqhagtyc.js → state-nc7he5v1.js} +27 -27
  202. package/dist/chunks/{instruction-discovery-f94nwnzd.js → state-nv5wzee9.js} +14 -14
  203. package/dist/chunks/state-nvdmc63m.js +507 -0
  204. package/dist/chunks/{instruction-discovery-xtrrk7k3.js → state-p66jwzje.js} +12 -12
  205. package/dist/chunks/{instruction-discovery-60m87ftc.js → state-pb9tkzd3.js} +24 -24
  206. package/dist/chunks/{instruction-discovery-8ghbvaa0.js → state-pgz7mtdk.js} +10 -10
  207. package/dist/chunks/{instruction-discovery-pjvnvgmy.js → state-pjvnvgmy.js} +1 -1
  208. package/dist/chunks/{instruction-discovery-pknna89w.js → state-pknna89w.js} +1 -1
  209. package/dist/chunks/{instruction-discovery-zfs8ae4p.js → state-pkqb68ka.js} +4 -4
  210. package/dist/chunks/{instruction-discovery-e3q4ya86.js → state-prq7hedt.js} +9 -9
  211. package/dist/chunks/{instruction-discovery-0j77ygfz.js → state-q0xm7vwc.js} +6 -6
  212. package/dist/chunks/{instruction-discovery-mwgcj3fx.js → state-q41dffrp.js} +11 -11
  213. package/dist/chunks/{instruction-discovery-d815wfjk.js → state-q5gkxxjb.js} +33 -33
  214. package/dist/chunks/{instruction-discovery-9grbqn9y.js → state-q8bdncf5.js} +9 -9
  215. package/dist/chunks/{instruction-discovery-y8c3vgnd.js → state-qcq5ks5d.js} +21 -21
  216. package/dist/chunks/{instruction-discovery-ht7r5zjn.js → state-qf4tt5n8.js} +5 -5
  217. package/dist/chunks/{instruction-discovery-zbdjk1jq.js → state-qfqe7b7s.js} +11 -11
  218. package/dist/chunks/{instruction-discovery-xgks750j.js → state-qh28zxsx.js} +32 -32
  219. package/dist/chunks/state-qk8sy7r3.js +253 -0
  220. package/dist/chunks/{instruction-discovery-5d607bsg.js → state-qmqgtz8f.js} +9 -9
  221. package/dist/chunks/{instruction-discovery-qnc92qwc.js → state-qnc92qwc.js} +1 -1
  222. package/dist/chunks/{instruction-discovery-qsdy395h.js → state-qsdy395h.js} +1 -1
  223. package/dist/chunks/{instruction-discovery-qxjc9qry.js → state-qxjc9qry.js} +3 -3
  224. package/dist/chunks/{instruction-discovery-pr8kmtqq.js → state-r3v0c7hy.js} +5 -5
  225. package/dist/chunks/{instruction-discovery-m5qzdqgg.js → state-r8wc69dc.js} +38 -25
  226. package/dist/chunks/{instruction-discovery-yp2x3t23.js → state-r8xr0va3.js} +4 -4
  227. package/dist/chunks/{instruction-discovery-rdw6cm16.js → state-rdw6cm16.js} +1 -1
  228. package/dist/chunks/{instruction-discovery-8xyg3w2m.js → state-rg29w5sg.js} +15 -15
  229. package/dist/chunks/{instruction-discovery-14fppf3b.js → state-rhgq3aa6.js} +22 -22
  230. package/dist/chunks/{instruction-discovery-vt3fyw5y.js → state-rkkgxmw8.js} +5 -5
  231. package/dist/chunks/{instruction-discovery-94mc2ky6.js → state-ryg7eh2t.js} +18 -18
  232. package/dist/chunks/{instruction-discovery-v93t099t.js → state-s4e19jsk.js} +43 -43
  233. package/dist/chunks/{instruction-discovery-qygbw77c.js → state-scgrse2b.js} +5 -5
  234. package/dist/chunks/{instruction-discovery-c6s977gm.js → state-sny9w75j.js} +30 -30
  235. package/dist/chunks/{instruction-discovery-5bpbs3y8.js → state-srp51ndr.js} +20 -20
  236. package/dist/chunks/{instruction-discovery-9408e2ey.js → state-t2t1t50a.js} +16 -16
  237. package/dist/chunks/{instruction-discovery-cr5fdqpw.js → state-t5131vnj.js} +45 -45
  238. package/dist/chunks/{instruction-discovery-gse2418f.js → state-t7v34wze.js} +8 -8
  239. package/dist/chunks/{instruction-discovery-tazgh4e4.js → state-tazgh4e4.js} +1 -1
  240. package/dist/chunks/{instruction-discovery-k4jm2qx2.js → state-tb07zrhn.js} +4 -4
  241. package/dist/chunks/{instruction-discovery-tcezcvh9.js → state-tcezcvh9.js} +1 -1
  242. package/dist/chunks/{instruction-discovery-tdstcens.js → state-tdstcens.js} +1 -1
  243. package/dist/chunks/{instruction-discovery-b41jq38g.js → state-tf2qcnq5.js} +8 -8
  244. package/dist/chunks/{instruction-discovery-v0es1rhs.js → state-tg7bkhef.js} +7 -7
  245. package/dist/chunks/{instruction-discovery-r66xghd9.js → state-tjedn1bk.js} +4 -4
  246. package/dist/chunks/{instruction-discovery-hj5bkg0c.js → state-tprb9ykm.js} +8 -8
  247. package/dist/chunks/{instruction-discovery-8sze2n9a.js → state-ts23464c.js} +8 -8
  248. package/dist/chunks/{instruction-discovery-3ja7vgc7.js → state-vccqm5x4.js} +28 -28
  249. package/dist/chunks/{instruction-discovery-veqvce7d.js → state-veqvce7d.js} +1 -1
  250. package/dist/chunks/{instruction-discovery-fdjyeynq.js → state-vfnexndp.js} +6 -6
  251. package/dist/chunks/{instruction-discovery-qzka7dgq.js → state-vjps42b3.js} +40 -40
  252. package/dist/chunks/{instruction-discovery-a1sz969t.js → state-vyb30c2y.js} +15 -15
  253. package/dist/chunks/{instruction-discovery-vzs5sf6e.js → state-vzs5sf6e.js} +1 -1
  254. package/dist/chunks/{instruction-discovery-xfkkasph.js → state-w19d8598.js} +5 -5
  255. package/dist/chunks/{instruction-discovery-w3wsvvr9.js → state-w3wsvvr9.js} +1 -1
  256. package/dist/chunks/{instruction-discovery-chrxq3ex.js → state-w9f5rn9p.js} +20 -20
  257. package/dist/chunks/{instruction-discovery-7hnnfp9c.js → state-wcnv1p8x.js} +11 -11
  258. package/dist/chunks/{instruction-discovery-wd87259q.js → state-wd87259q.js} +1 -1
  259. package/dist/chunks/{instruction-discovery-6rs83x58.js → state-wm8vp7b3.js} +16 -16
  260. package/dist/chunks/{instruction-discovery-zgtek2y9.js → state-wrvjmzy4.js} +54 -54
  261. package/dist/chunks/{instruction-discovery-s8d7rejh.js → state-wv396vej.js} +8 -8
  262. package/dist/chunks/{instruction-discovery-5zezd1p9.js → state-wxgmpaes.js} +11 -11
  263. package/dist/chunks/{instruction-discovery-hcx8qsr8.js → state-x62cppxn.js} +20 -20
  264. package/dist/chunks/{instruction-discovery-fghrj984.js → state-x944hqgj.js} +27 -27
  265. package/dist/chunks/{instruction-discovery-3nkhjpbq.js → state-xg26vyyk.js} +4 -4
  266. package/dist/chunks/{instruction-discovery-dmqcgk4z.js → state-xkntkrq7.js} +5 -5
  267. package/dist/chunks/{instruction-discovery-68wqtz75.js → state-xt4njr3s.js} +1 -1
  268. package/dist/chunks/{instruction-discovery-6gkym5fp.js → state-y0rd6mpg.js} +4 -4
  269. package/dist/chunks/{instruction-discovery-y1fvbwt7.js → state-y1fvbwt7.js} +1 -1
  270. package/dist/chunks/{instruction-discovery-w35vncqw.js → state-y7hh2tp0.js} +26 -26
  271. package/dist/chunks/{instruction-discovery-4bh92p7n.js → state-y88q4kk1.js} +49 -49
  272. package/dist/chunks/{instruction-discovery-fba5j9yy.js → state-y9v55n8z.js} +10 -10
  273. package/dist/chunks/{instruction-discovery-2seb41mk.js → state-yfng7xhx.js} +64 -64
  274. package/dist/chunks/{instruction-discovery-f17728fj.js → state-ykd4jxva.js} +29 -29
  275. package/dist/chunks/{instruction-discovery-52zfrmt1.js → state-yndsvvt3.js} +1 -1
  276. package/dist/chunks/{instruction-discovery-b4b58vta.js → state-yss3y4q1.js} +16 -16
  277. package/dist/chunks/{instruction-discovery-z0bkrqjs.js → state-z0bkrqjs.js} +1 -1
  278. package/dist/chunks/{instruction-discovery-ybpa7sx2.js → state-z2btvd3q.js} +9 -9
  279. package/dist/chunks/{instruction-discovery-wtbb01vz.js → state-zh56ev1t.js} +15 -15
  280. package/dist/chunks/{instruction-discovery-zr2ceqn5.js → state-zr2ceqn5.js} +1 -1
  281. package/dist/chunks/{instruction-discovery-2vs2nh1n.js → state-zvt5dnpc.js} +4 -4
  282. package/dist/chunks/{instruction-discovery-qqm50ya3.js → state-zw11p4sz.js} +5 -5
  283. package/dist/chunks/{instruction-discovery-zxq2ej10.js → state-zxq2ej10.js} +1 -1
  284. package/dist/chunks/{instruction-discovery-fzbgn245.js → state-zz0gef9f.js} +20 -20
  285. package/dist/codemode/catalog.js +1 -1
  286. package/dist/codemode/instructions.js +11 -11
  287. package/dist/codemode/tool.js +3 -3
  288. package/dist/codemode/web.js +1 -1
  289. package/dist/command.js +86 -86
  290. package/dist/config/discovery.js +83 -83
  291. package/dist/config/markdown.js +1 -1
  292. package/dist/config/normalize.js +100 -100
  293. package/dist/config/plugin/agent.js +119 -119
  294. package/dist/config/plugin/command.js +208 -208
  295. package/dist/config/plugin/compaction.js +155 -155
  296. package/dist/config/plugin/compatibility.js +135 -135
  297. package/dist/config/plugin/entry-observer.js +1 -1
  298. package/dist/config/plugin/formatter.js +118 -118
  299. package/dist/config/plugin/image.js +117 -117
  300. package/dist/config/plugin/instruction.js +91 -91
  301. package/dist/config/plugin/location-watcher.js +119 -119
  302. package/dist/config/plugin/mcp.js +126 -126
  303. package/dist/config/plugin/policy.js +118 -118
  304. package/dist/config/plugin/provider.js +117 -117
  305. package/dist/config/plugin/reference.js +119 -119
  306. package/dist/config/plugin/shell.js +117 -117
  307. package/dist/config/plugin/skill-file.js +103 -103
  308. package/dist/config/plugin/skill.js +138 -138
  309. package/dist/config/plugin/snapshot.js +117 -117
  310. package/dist/config/plugin/source.js +120 -120
  311. package/dist/config/plugin/tool-output.js +118 -118
  312. package/dist/config/plugin/websearch.js +116 -116
  313. package/dist/config/plugin/worktree.js +119 -119
  314. package/dist/config/variable.js +3 -3
  315. package/dist/config/watch.js +1 -1
  316. package/dist/config.js +122 -122
  317. package/dist/credential/sql.js +2 -2
  318. package/dist/credential.js +86 -86
  319. package/dist/database/database.js +71 -71
  320. package/dist/database/drizzle/effect-sqlite/driver.js +14 -14
  321. package/dist/database/drizzle/effect-sqlite/index.js +14 -14
  322. package/dist/database/drizzle/effect-sqlite/session.js +11 -11
  323. package/dist/database/drizzle/index.js +15 -15
  324. package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
  325. package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
  326. package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
  327. package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
  328. package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
  329. package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
  330. package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
  331. package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
  332. package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
  333. package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
  334. package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
  335. package/dist/database/drizzle.js +16 -16
  336. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
  337. package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
  338. package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
  339. package/dist/database/migration/20260225215848_workspace.js +1 -1
  340. package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
  341. package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
  342. package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
  343. package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
  344. package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
  345. package/dist/database/migration/20260323234822_events.js +1 -1
  346. package/dist/database/migration/20260410174513_workspace-name.js +1 -1
  347. package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
  348. package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
  349. package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
  350. package/dist/database/migration/20260428004200_add_session_path.js +1 -1
  351. package/dist/database/migration/20260501142318_next_venus.js +1 -1
  352. package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
  353. package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
  354. package/dist/database/migration/20260510033149_session_usage.js +1 -1
  355. package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
  356. package/dist/database/migration/20260511173437_session-metadata.js +1 -1
  357. package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
  358. package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
  359. package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
  360. package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
  361. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
  362. package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
  363. package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
  364. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
  365. package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
  366. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
  367. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
  368. package/dist/database/migration/20260611035744_credential.js +1 -1
  369. package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
  370. package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
  371. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
  372. package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
  373. package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
  374. package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
  375. package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
  376. package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
  377. package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
  378. package/dist/database/migration/20260812181746_session_inbox.js +1 -1
  379. package/dist/database/migration/20260812213948_worktree.js +1 -1
  380. package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
  381. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
  382. package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
  383. package/dist/database/migration/20260923013825_project_time_active.js +1 -1
  384. package/dist/database/migration/20261007190000_azure_cli_external_credential.js +1 -1
  385. package/dist/database/migration.gen.js +50 -50
  386. package/dist/database/migration.js +52 -52
  387. package/dist/database/path.js +2 -2
  388. package/dist/database/schema.gen.js +1 -1
  389. package/dist/database/schema.sql.js +1 -1
  390. package/dist/database/sqlite.bun.js +1 -1
  391. package/dist/database/sqlite.js +1 -1
  392. package/dist/database/sqlite.node.js +1 -1
  393. package/dist/database/sqlite.workerd.js +1 -1
  394. package/dist/database/v1-migration.bun.js +80 -80
  395. package/dist/database/v1-migration.js +1 -1
  396. package/dist/effect/app-node-builder.js +364 -364
  397. package/dist/effect/app-node-platform.js +2 -2
  398. package/dist/effect/keyed-mutex.js +3 -3
  399. package/dist/effect/websocket-constructor.js +1 -1
  400. package/dist/environment/driver.js +1 -1
  401. package/dist/environment/environment.js +94 -94
  402. package/dist/environment/exec-defaults.js +2 -2
  403. package/dist/environment/files.js +1 -1
  404. package/dist/environment/index.js +96 -96
  405. package/dist/environment/local.js +2 -2
  406. package/dist/environment/memory.js +2 -2
  407. package/dist/environment/unavailable.js +1 -1
  408. package/dist/event/sql.js +1 -1
  409. package/dist/event-logger.js +75 -75
  410. package/dist/file-access.js +105 -105
  411. package/dist/file-mutation.js +95 -95
  412. package/dist/file-retention.js +1 -1
  413. package/dist/filesystem/fff.bun.js +2 -2
  414. package/dist/filesystem/fff.js +1 -1
  415. package/dist/filesystem/fff.node.js +2 -2
  416. package/dist/filesystem/fff.workerd.js +2 -2
  417. package/dist/filesystem/location-watcher-policy.js +6 -6
  418. package/dist/filesystem/location-watcher.js +221 -221
  419. package/dist/filesystem/protected.js +1 -1
  420. package/dist/filesystem/search.js +104 -104
  421. package/dist/filesystem/watcher-binding.js +3 -3
  422. package/dist/filesystem/watcher.js +13 -13
  423. package/dist/filesystem.js +103 -103
  424. package/dist/form.js +87 -87
  425. package/dist/formatter/builtins.js +4 -4
  426. package/dist/formatter.js +88 -88
  427. package/dist/generate.js +104 -104
  428. package/dist/git.js +10 -10
  429. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +1 -1
  430. package/dist/github-copilot/chat/get-response-metadata.js +1 -1
  431. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +1 -1
  432. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +7 -7
  433. package/dist/github-copilot/chat/openai-compatible-chat-options.js +1 -1
  434. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +1 -1
  435. package/dist/github-copilot/copilot-provider.js +17 -17
  436. package/dist/github-copilot/models.js +92 -92
  437. package/dist/github-copilot/openai-compatible-error.js +1 -1
  438. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +1 -1
  439. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +1 -1
  440. package/dist/github-copilot/responses/openai-error.js +1 -1
  441. package/dist/github-copilot/responses/openai-responses-language-model.js +10 -10
  442. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +6 -6
  443. package/dist/github-copilot/responses/tool/code-interpreter.js +1 -1
  444. package/dist/github-copilot/responses/tool/file-search.js +1 -1
  445. package/dist/github-copilot/responses/tool/image-generation.js +1 -1
  446. package/dist/github-copilot/responses/tool/web-search-preview.js +1 -1
  447. package/dist/github-copilot/responses/tool/web-search.js +1 -1
  448. package/dist/image/photon.js +2 -2
  449. package/dist/image.js +6 -6
  450. package/dist/instance/service.js +5 -5
  451. package/dist/instance.js +355 -355
  452. package/dist/instruction-discovery.js +86 -86
  453. package/dist/instructions/builtins.js +88 -88
  454. package/dist/instructions/index.js +5 -5
  455. package/dist/integration/connection.js +3 -3
  456. package/dist/integration.js +88 -88
  457. package/dist/job.js +79 -79
  458. package/dist/kv/sql.js +2 -2
  459. package/dist/kv.js +74 -74
  460. package/dist/location-activity.js +135 -135
  461. package/dist/location-lifecycle.js +108 -108
  462. package/dist/location-service-map.js +87 -87
  463. package/dist/location-services.js +352 -352
  464. package/dist/location.js +88 -88
  465. package/dist/managed-policy.js +8 -8
  466. package/dist/mcp/client.js +92 -92
  467. package/dist/mcp/index.js +110 -110
  468. package/dist/mcp/instructions.js +128 -128
  469. package/dist/mcp/oauth.js +79 -79
  470. package/dist/mcp/stdio.js +91 -91
  471. package/dist/mime.js +1 -1
  472. package/dist/modal/models.js +92 -92
  473. package/dist/model-resolver.js +99 -99
  474. package/dist/model.js +103 -103
  475. package/dist/models-dev.js +108 -108
  476. package/dist/oauth/page.js +1 -1
  477. package/dist/permission/saved.js +83 -83
  478. package/dist/permission/sql.js +5 -5
  479. package/dist/permission.js +120 -120
  480. package/dist/persistent-pty/binary.bun.js +1 -1
  481. package/dist/persistent-pty/daemon.js +1 -1
  482. package/dist/persistent-pty/index.js +89 -89
  483. package/dist/persistent-pty/pty-binding.js +1 -1
  484. package/dist/persistent-pty.js +76 -76
  485. package/dist/plugin/agent.js +77 -77
  486. package/dist/plugin/command.js +103 -103
  487. package/dist/plugin/hooks.js +5 -5
  488. package/dist/plugin/host.js +212 -212
  489. package/dist/plugin/identity.js +3 -3
  490. package/dist/plugin/instance.js +5 -5
  491. package/dist/plugin/internal.js +327 -327
  492. package/dist/plugin/mcp-codemode-defaults.js +3 -3
  493. package/dist/plugin/models-dev.js +97 -97
  494. package/dist/plugin/module.js +118 -118
  495. package/dist/plugin/optimize.js +4 -4
  496. package/dist/plugin/plan.js +103 -103
  497. package/dist/plugin/promise.js +1 -1
  498. package/dist/plugin/provider/amazon-bedrock.js +91 -91
  499. package/dist/plugin/provider/azure.js +116 -116
  500. package/dist/plugin/provider/cerebras.js +1 -1
  501. package/dist/plugin/provider/chatgpt.js +95 -95
  502. package/dist/plugin/provider/cloudflare-ai-gateway.js +114 -114
  503. package/dist/plugin/provider/cloudflare-workers-ai.js +115 -115
  504. package/dist/plugin/provider/cohere.js +2 -2
  505. package/dist/plugin/provider/configured.js +113 -113
  506. package/dist/plugin/provider/digitalocean.js +94 -94
  507. package/dist/plugin/provider/dynamic.js +2 -2
  508. package/dist/plugin/provider/factory.js +1 -1
  509. package/dist/plugin/provider/github-copilot.js +96 -96
  510. package/dist/plugin/provider/gitlab.js +94 -94
  511. package/dist/plugin/provider/google-vertex.js +91 -91
  512. package/dist/plugin/provider/kilo.js +1 -1
  513. package/dist/plugin/provider/llmgateway.js +79 -79
  514. package/dist/plugin/provider/lmstudio.js +117 -117
  515. package/dist/plugin/provider/local.js +114 -114
  516. package/dist/plugin/provider/modal.js +93 -93
  517. package/dist/plugin/provider/nvidia.js +1 -1
  518. package/dist/plugin/provider/ollama.js +117 -117
  519. package/dist/plugin/provider/openai.js +96 -96
  520. package/dist/plugin/provider/opencode.js +98 -98
  521. package/dist/plugin/provider/openrouter.js +92 -92
  522. package/dist/plugin/provider/perplexity.js +2 -2
  523. package/dist/plugin/provider/poe.js +80 -80
  524. package/dist/plugin/provider/prompt-cache-key.js +91 -91
  525. package/dist/plugin/provider/sap-ai-core.js +92 -92
  526. package/dist/plugin/provider/sdk-factory.js +1 -1
  527. package/dist/plugin/provider/snowflake-cortex.js +116 -116
  528. package/dist/plugin/provider/vercel.js +91 -91
  529. package/dist/plugin/provider/vllm.js +117 -117
  530. package/dist/plugin/provider/xai.js +92 -92
  531. package/dist/plugin/provider/zenmux.js +1 -1
  532. package/dist/plugin/provider.js +157 -157
  533. package/dist/plugin/sdk.js +77 -77
  534. package/dist/plugin/service.js +3 -3
  535. package/dist/plugin/skill.js +135 -135
  536. package/dist/plugin/source-directory.js +1 -1
  537. package/dist/plugin/supervisor.js +344 -344
  538. package/dist/plugin/tool-input-repair.js +4 -4
  539. package/dist/plugin/update.js +6 -6
  540. package/dist/plugin/vcs/git.js +87 -87
  541. package/dist/plugin/vcs/hg.js +87 -87
  542. package/dist/plugin/verbosity.js +94 -94
  543. package/dist/plugin/warming.js +115 -115
  544. package/dist/plugin/websearch/exa.js +5 -5
  545. package/dist/plugin/websearch/firecrawl.js +8 -8
  546. package/dist/plugin/websearch/index.js +9 -9
  547. package/dist/plugin/websearch/mcp.js +6 -6
  548. package/dist/plugin/websearch/parallel.js +8 -8
  549. package/dist/plugin/websearch/tavily.js +6 -6
  550. package/dist/plugin/websearch/tinyfish.js +6 -6
  551. package/dist/plugin.js +217 -217
  552. package/dist/project/schema.js +6 -6
  553. package/dist/project/sql.js +4 -4
  554. package/dist/project.js +89 -89
  555. package/dist/provider.js +102 -102
  556. package/dist/pty/protocol.js +1 -1
  557. package/dist/pty/ticket.js +1 -1
  558. package/dist/pty.js +94 -94
  559. package/dist/reference/instructions.js +90 -90
  560. package/dist/reference.js +92 -92
  561. package/dist/repository-cache.js +82 -82
  562. package/dist/repository.js +3 -3
  563. package/dist/ripgrep/binary.js +2 -2
  564. package/dist/ripgrep.js +98 -98
  565. package/dist/rpc.js +87 -87
  566. package/dist/schema.js +1 -1
  567. package/dist/session/affinity.js +1 -1
  568. package/dist/session/command.js +75 -75
  569. package/dist/session/compaction.js +136 -136
  570. package/dist/session/context.js +154 -154
  571. package/dist/session/diff.js +89 -89
  572. package/dist/session/environment.js +5 -5
  573. package/dist/session/error.js +7 -7
  574. package/dist/session/event.js +1 -1
  575. package/dist/session/execution/restart.js +218 -218
  576. package/dist/session/execution.js +128 -128
  577. package/dist/session/generate.js +155 -155
  578. package/dist/session/history.js +15 -15
  579. package/dist/session/inbox.js +87 -87
  580. package/dist/session/info.js +3 -3
  581. package/dist/session/instruction-entry.js +80 -80
  582. package/dist/session/instruction-state.js +8 -8
  583. package/dist/session/instructions.js +98 -98
  584. package/dist/session/message-updater.js +4 -4
  585. package/dist/session/message.js +1 -1
  586. package/dist/session/model-request.js +121 -121
  587. package/dist/session/model-transport.js +9 -9
  588. package/dist/session/move.js +130 -130
  589. package/dist/session/projector.js +87 -87
  590. package/dist/session/prompt.js +106 -106
  591. package/dist/session/provider-context.js +3 -3
  592. package/dist/session/revert.js +91 -91
  593. package/dist/session/run-coordinator.js +3 -3
  594. package/dist/session/runner/index.js +3 -3
  595. package/dist/session/runner/llm.js +225 -225
  596. package/dist/session/runner/max-steps.js +1 -1
  597. package/dist/session/runner/model.js +99 -99
  598. package/dist/session/runner/publish-llm-event.js +114 -114
  599. package/dist/session/runner/retry.js +4 -4
  600. package/dist/session/runner/step.js +126 -126
  601. package/dist/session/runner/to-llm-message.js +2 -2
  602. package/dist/session/schema.js +5 -5
  603. package/dist/session/session.js +165 -165
  604. package/dist/session/shell.js +131 -131
  605. package/dist/session/skill.js +104 -104
  606. package/dist/session/sql.js +5 -5
  607. package/dist/session/stats.js +76 -76
  608. package/dist/session/store.js +88 -88
  609. package/dist/session/subagent-completion.js +1 -1
  610. package/dist/session/subagent-job.js +204 -204
  611. package/dist/session/system-prompt.js +3 -3
  612. package/dist/session/title.js +158 -158
  613. package/dist/session/to-session-error.js +112 -112
  614. package/dist/session/transfer.js +217 -217
  615. package/dist/session/usage.js +1 -1
  616. package/dist/session.js +212 -212
  617. package/dist/shell/parse.js +6 -6
  618. package/dist/shell/result.js +1 -1
  619. package/dist/shell/scan.js +1 -1
  620. package/dist/shell/select.js +11 -11
  621. package/dist/shell.js +133 -133
  622. package/dist/skill/discovery.js +6 -6
  623. package/dist/skill/instructions.js +106 -106
  624. package/dist/skill.js +115 -115
  625. package/dist/snapshot.js +92 -92
  626. package/dist/state.js +1 -1
  627. package/dist/tool/html-markdown.js +1 -1
  628. package/dist/tool/http-body.js +1 -1
  629. package/dist/tool/mcp.js +127 -127
  630. package/dist/tool/plugin/edit.js +121 -121
  631. package/dist/tool/plugin/file-diff.js +1 -1
  632. package/dist/tool/plugin/glob.js +123 -123
  633. package/dist/tool/plugin/grep.js +125 -125
  634. package/dist/tool/plugin/mcp-resource.js +118 -118
  635. package/dist/tool/plugin/opencode.js +3 -3
  636. package/dist/tool/plugin/patch.js +123 -123
  637. package/dist/tool/plugin/question.js +104 -104
  638. package/dist/tool/plugin/read.js +126 -126
  639. package/dist/tool/plugin/shell.js +209 -209
  640. package/dist/tool/plugin/skill.js +114 -114
  641. package/dist/tool/plugin/subagent.js +213 -213
  642. package/dist/tool/plugin/webfetch.js +113 -113
  643. package/dist/tool/plugin/websearch.js +111 -111
  644. package/dist/tool/plugin/write.js +121 -121
  645. package/dist/tool/read-filesystem.js +101 -101
  646. package/dist/tool/runtime.js +1 -1
  647. package/dist/tool-output.js +7 -7
  648. package/dist/tool.js +14 -14
  649. package/dist/types/session/runner/publish-llm-event.d.ts +1 -1
  650. package/dist/types/wellknown.d.ts +3 -0
  651. package/dist/util/error-summary.js +1 -1
  652. package/dist/util/error.js +1 -1
  653. package/dist/util/git-executable.js +2 -2
  654. package/dist/util/iife.js +1 -1
  655. package/dist/util/lazy.js +1 -1
  656. package/dist/util/slug.js +1 -1
  657. package/dist/util/token.js +1 -1
  658. package/dist/util/which.js +1 -1
  659. package/dist/util/wildcard.js +1 -1
  660. package/dist/v1/config/agent.js +7 -7
  661. package/dist/v1/config/command.js +5 -5
  662. package/dist/v1/config/error.js +4 -4
  663. package/dist/v1/config/mcp.js +4 -4
  664. package/dist/v1/config/migrate.js +93 -93
  665. package/dist/v1/config/permission.js +7 -7
  666. package/dist/v1/config/plugin.js +3 -3
  667. package/dist/v1/config/provider-options.js +1 -1
  668. package/dist/v1/config/provider.js +2 -2
  669. package/dist/variant.js +92 -92
  670. package/dist/vcs/patch.js +1 -1
  671. package/dist/vcs.js +90 -90
  672. package/dist/websearch.js +85 -85
  673. package/dist/wellknown/plugin.js +77 -77
  674. package/dist/wellknown.js +82 -82
  675. package/dist/workspace/driver.js +7 -7
  676. package/dist/workspace/sql.js +1 -1
  677. package/dist/workspace.js +81 -81
  678. package/dist/worktree/directory.js +2 -2
  679. package/dist/worktree/git.js +10 -10
  680. package/dist/worktree/sql.js +5 -5
  681. package/dist/worktree/strategies.js +90 -90
  682. package/dist/worktree.js +97 -97
  683. package/package.json +8 -8
  684. package/dist/chunks/instruction-discovery-02n47b9r.js +0 -507
  685. package/dist/chunks/instruction-discovery-d507n1ar.js +0 -253
  686. package/dist/chunks/instruction-discovery-gyce5qg1.js +0 -18
  687. package/dist/chunks/instruction-discovery-r54jadsm.js +0 -26
  688. /package/dist/chunks/{instruction-discovery-0qkdqm5v.js → state-0qkdqm5v.js} +0 -0
  689. /package/dist/chunks/{instruction-discovery-0zkw76rk.js → state-0zkw76rk.js} +0 -0
  690. /package/dist/chunks/{instruction-discovery-17cy0kzp.js → state-17cy0kzp.js} +0 -0
  691. /package/dist/chunks/{instruction-discovery-1cnp2v09.js → state-1cnp2v09.js} +0 -0
  692. /package/dist/chunks/{instruction-discovery-1kg9ymc8.js → state-1kg9ymc8.js} +0 -0
  693. /package/dist/chunks/{instruction-discovery-24dcb14g.js → state-24dcb14g.js} +0 -0
  694. /package/dist/chunks/{instruction-discovery-2710q6r3.js → state-2710q6r3.js} +0 -0
  695. /package/dist/chunks/{instruction-discovery-2axfhc9x.js → state-2axfhc9x.js} +0 -0
  696. /package/dist/chunks/{instruction-discovery-2c3vjs8z.js → state-2c3vjs8z.js} +0 -0
  697. /package/dist/chunks/{instruction-discovery-34c7v6d4.js → state-34c7v6d4.js} +0 -0
  698. /package/dist/chunks/{instruction-discovery-359p4xyc.js → state-359p4xyc.js} +0 -0
  699. /package/dist/chunks/{instruction-discovery-3asan66x.js → state-3asan66x.js} +0 -0
  700. /package/dist/chunks/{instruction-discovery-3t0ybcrp.js → state-3t0ybcrp.js} +0 -0
  701. /package/dist/chunks/{instruction-discovery-3v8g72cx.js → state-3v8g72cx.js} +0 -0
  702. /package/dist/chunks/{instruction-discovery-3w5fmr99.js → state-3w5fmr99.js} +0 -0
  703. /package/dist/chunks/{instruction-discovery-3wcehsnq.js → state-3wcehsnq.js} +0 -0
  704. /package/dist/chunks/{instruction-discovery-43n2bw4t.js → state-43n2bw4t.js} +0 -0
  705. /package/dist/chunks/{instruction-discovery-4knz6hnm.js → state-4knz6hnm.js} +0 -0
  706. /package/dist/chunks/{instruction-discovery-4vcrnpx2.js → state-4vcrnpx2.js} +0 -0
  707. /package/dist/chunks/{instruction-discovery-4y7fprxs.js → state-4y7fprxs.js} +0 -0
  708. /package/dist/chunks/{instruction-discovery-53557ph1.js → state-53557ph1.js} +0 -0
  709. /package/dist/chunks/{instruction-discovery-550bvhaj.js → state-550bvhaj.js} +0 -0
  710. /package/dist/chunks/{instruction-discovery-6prwharc.js → state-6prwharc.js} +0 -0
  711. /package/dist/chunks/{instruction-discovery-6q2bdcd1.js → state-6q2bdcd1.js} +0 -0
  712. /package/dist/chunks/{instruction-discovery-7akdwqpd.js → state-7akdwqpd.js} +0 -0
  713. /package/dist/chunks/{instruction-discovery-7m9af43g.js → state-7m9af43g.js} +0 -0
  714. /package/dist/chunks/{instruction-discovery-822emrt2.js → state-822emrt2.js} +0 -0
  715. /package/dist/chunks/{instruction-discovery-84wd9syh.js → state-84wd9syh.js} +0 -0
  716. /package/dist/chunks/{instruction-discovery-88xbtdfr.js → state-88xbtdfr.js} +0 -0
  717. /package/dist/chunks/{instruction-discovery-8n3pysct.js → state-8n3pysct.js} +0 -0
  718. /package/dist/chunks/{instruction-discovery-8wj87zfr.js → state-8wj87zfr.js} +0 -0
  719. /package/dist/chunks/{instruction-discovery-9a4afbnw.js → state-9a4afbnw.js} +0 -0
  720. /package/dist/chunks/{instruction-discovery-9rqn6x4v.js → state-9rqn6x4v.js} +0 -0
  721. /package/dist/chunks/{instruction-discovery-a6k6eb26.js → state-a6k6eb26.js} +0 -0
  722. /package/dist/chunks/{instruction-discovery-af5trqkr.js → state-af5trqkr.js} +0 -0
  723. /package/dist/chunks/{instruction-discovery-afrmfg78.js → state-afrmfg78.js} +0 -0
  724. /package/dist/chunks/{instruction-discovery-aqzs7mqg.js → state-aqzs7mqg.js} +0 -0
  725. /package/dist/chunks/{instruction-discovery-atq7p7m5.js → state-atq7p7m5.js} +0 -0
  726. /package/dist/chunks/{instruction-discovery-bkyjaxrp.js → state-bkyjaxrp.js} +0 -0
  727. /package/dist/chunks/{instruction-discovery-bmr6ed5q.js → state-bmr6ed5q.js} +0 -0
  728. /package/dist/chunks/{instruction-discovery-cf4snx6d.js → state-cf4snx6d.js} +0 -0
  729. /package/dist/chunks/{instruction-discovery-cvy3z8tj.js → state-cvy3z8tj.js} +0 -0
  730. /package/dist/chunks/{instruction-discovery-d9fn303g.js → state-d9fn303g.js} +0 -0
  731. /package/dist/chunks/{instruction-discovery-d9jj8t3e.js → state-d9jj8t3e.js} +0 -0
  732. /package/dist/chunks/{instruction-discovery-dajrwvna.js → state-dajrwvna.js} +0 -0
  733. /package/dist/chunks/{instruction-discovery-dap0rakb.js → state-dap0rakb.js} +0 -0
  734. /package/dist/chunks/{instruction-discovery-df08tz66.js → state-df08tz66.js} +0 -0
  735. /package/dist/chunks/{instruction-discovery-dy18nga0.js → state-dy18nga0.js} +0 -0
  736. /package/dist/chunks/{instruction-discovery-e5kj55wp.js → state-e5kj55wp.js} +0 -0
  737. /package/dist/chunks/{instruction-discovery-e73j6tqm.js → state-e73j6tqm.js} +0 -0
  738. /package/dist/chunks/{instruction-discovery-ec1grn59.js → state-ec1grn59.js} +0 -0
  739. /package/dist/chunks/{instruction-discovery-eh3zwz77.js → state-eh3zwz77.js} +0 -0
  740. /package/dist/chunks/{instruction-discovery-emrn6kk6.js → state-emrn6kk6.js} +0 -0
  741. /package/dist/chunks/{instruction-discovery-f0mxakyp.js → state-f0mxakyp.js} +0 -0
  742. /package/dist/chunks/{instruction-discovery-f6n9ztr4.js → state-f6n9ztr4.js} +0 -0
  743. /package/dist/chunks/{instruction-discovery-faypxj3z.js → state-faypxj3z.js} +0 -0
  744. /package/dist/chunks/{instruction-discovery-fd410y7t.js → state-fd410y7t.js} +0 -0
  745. /package/dist/chunks/{instruction-discovery-fxgpk5d8.js → state-fxgpk5d8.js} +0 -0
  746. /package/dist/chunks/{instruction-discovery-g4wezp1m.js → state-g4wezp1m.js} +0 -0
  747. /package/dist/chunks/{instruction-discovery-g86h250q.js → state-g86h250q.js} +0 -0
  748. /package/dist/chunks/{instruction-discovery-gebd4c9n.js → state-gebd4c9n.js} +0 -0
  749. /package/dist/chunks/{instruction-discovery-gftt206x.js → state-gftt206x.js} +0 -0
  750. /package/dist/chunks/{instruction-discovery-hk9envan.js → state-hk9envan.js} +0 -0
  751. /package/dist/chunks/{instruction-discovery-j2ntwpah.js → state-j2ntwpah.js} +0 -0
  752. /package/dist/chunks/{instruction-discovery-j5zkgpj8.js → state-j5zkgpj8.js} +0 -0
  753. /package/dist/chunks/{instruction-discovery-jjkms2e6.js → state-jjkms2e6.js} +0 -0
  754. /package/dist/chunks/{instruction-discovery-jr7sbwjy.js → state-jr7sbwjy.js} +0 -0
  755. /package/dist/chunks/{instruction-discovery-jwfs4k6c.js → state-jwfs4k6c.js} +0 -0
  756. /package/dist/chunks/{instruction-discovery-jzg6c2d5.js → state-jzg6c2d5.js} +0 -0
  757. /package/dist/chunks/{instruction-discovery-mp448xyj.js → state-mp448xyj.js} +0 -0
  758. /package/dist/chunks/{instruction-discovery-msx8hqn2.js → state-msx8hqn2.js} +0 -0
  759. /package/dist/chunks/{instruction-discovery-n05xt0ee.js → state-n05xt0ee.js} +0 -0
  760. /package/dist/chunks/{instruction-discovery-n3j8tn72.js → state-n3j8tn72.js} +0 -0
  761. /package/dist/chunks/{instruction-discovery-njntx4h6.js → state-njntx4h6.js} +0 -0
  762. /package/dist/chunks/{instruction-discovery-q3sfg36h.js → state-q3sfg36h.js} +0 -0
  763. /package/dist/chunks/{instruction-discovery-q74kybfr.js → state-q74kybfr.js} +0 -0
  764. /package/dist/chunks/{instruction-discovery-qaymkmh1.js → state-qaymkmh1.js} +0 -0
  765. /package/dist/chunks/{instruction-discovery-qb87gjwd.js → state-qb87gjwd.js} +0 -0
  766. /package/dist/chunks/{instruction-discovery-qfa1cgps.js → state-qfa1cgps.js} +0 -0
  767. /package/dist/chunks/{instruction-discovery-qg3g05ea.js → state-qg3g05ea.js} +0 -0
  768. /package/dist/chunks/{instruction-discovery-qrg20bc0.js → state-qrg20bc0.js} +0 -0
  769. /package/dist/chunks/{instruction-discovery-rcb2kzg1.js → state-rcb2kzg1.js} +0 -0
  770. /package/dist/chunks/{instruction-discovery-sdp7kfr6.js → state-sdp7kfr6.js} +0 -0
  771. /package/dist/chunks/{instruction-discovery-ssg3fenm.js → state-ssg3fenm.js} +0 -0
  772. /package/dist/chunks/{instruction-discovery-w803qqfp.js → state-w803qqfp.js} +0 -0
  773. /package/dist/chunks/{instruction-discovery-wc3fc9cn.js → state-wc3fc9cn.js} +0 -0
  774. /package/dist/chunks/{instruction-discovery-wer8tq1h.js → state-wer8tq1h.js} +0 -0
  775. /package/dist/chunks/{instruction-discovery-wtztk69x.js → state-wtztk69x.js} +0 -0
  776. /package/dist/chunks/{instruction-discovery-x0ckcb58.js → state-x0ckcb58.js} +0 -0
  777. /package/dist/chunks/{instruction-discovery-x61499pn.js → state-x61499pn.js} +0 -0
  778. /package/dist/chunks/{instruction-discovery-y44na4kk.js → state-y44na4kk.js} +0 -0
  779. /package/dist/chunks/{instruction-discovery-y8cydn3q.js → state-y8cydn3q.js} +0 -0
  780. /package/dist/chunks/{instruction-discovery-y8f7s663.js → state-y8f7s663.js} +0 -0
  781. /package/dist/chunks/{instruction-discovery-ygaqb7jw.js → state-ygaqb7jw.js} +0 -0
  782. /package/dist/chunks/{instruction-discovery-ym463w8f.js → state-ym463w8f.js} +0 -0
  783. /package/dist/chunks/{instruction-discovery-z5v4ffb3.js → state-z5v4ffb3.js} +0 -0
  784. /package/dist/chunks/{instruction-discovery-z9919s4g.js → state-z9919s4g.js} +0 -0
@@ -1,27 +1,36 @@
1
1
  import {
2
- Service83,
3
- node87
4
- } from "./instruction-discovery-tneyjf48.js";
2
+ Service80,
3
+ node84
4
+ } from "./state-62k0yxbf.js";
5
5
  import {
6
6
  shutdown2,
7
7
  create3
8
- } from "./instruction-discovery-rdw6cm16.js";
8
+ } from "./state-rdw6cm16.js";
9
9
  import {
10
10
  key2
11
- } from "./instruction-discovery-addxnjmp.js";
11
+ } from "./state-gqtdsdt7.js";
12
12
  import {
13
- ID14,
14
- Service77,
15
- node81,
16
- Event18
17
- } from "./instruction-discovery-d815wfjk.js";
13
+ ID10,
14
+ Service67,
15
+ node71,
16
+ Event15
17
+ } from "./state-q5gkxxjb.js";
18
18
  import {
19
- Service80,
20
- node84
21
- } from "./instruction-discovery-krrp65g5.js";
19
+ Service76,
20
+ node80
21
+ } from "./state-9qk2kwmb.js";
22
22
  import {
23
23
  __export
24
- } from "./instruction-discovery-9rqn6x4v.js";
24
+ } from "./state-9rqn6x4v.js";
25
+
26
+ // src/aisdk-native.ts
27
+ var exports_aisdk_native = {};
28
+ __export(exports_aisdk_native, {
29
+ AISDKNative: () => exports_aisdk_native,
30
+ native: () => native2,
31
+ rewrite: () => rewrite2
32
+ });
33
+ import { Effect as Effect2, Option as Option2, Schema as Schema2, Struct as Struct2 } from "effect";
25
34
 
26
35
  // src/provider.ts
27
36
  var exports_provider3 = {};
@@ -29,13 +38,13 @@ __export(exports_provider3, {
29
38
  AISDK_PREFIX: () => AISDK_PREFIX2,
30
39
  Compaction: () => Compaction3,
31
40
  DEFAULT_TIMEOUT_MS: () => DEFAULT_TIMEOUT_MS3,
32
- Event: () => Event17,
33
- ID: () => ID13,
34
- Info: () => Info22,
41
+ Event: () => Event13,
42
+ ID: () => ID8,
43
+ Info: () => Info16,
35
44
  LoadError: () => LoadError3,
36
45
  Provider: () => exports_provider3,
37
- Request: () => Request3,
38
- Service: () => Service76,
46
+ Request: () => Request2,
47
+ Service: () => Service63,
39
48
  Settings: () => Settings2,
40
49
  Transport: () => Transport2,
41
50
  aisdk: () => aisdk2,
@@ -45,12 +54,12 @@ __export(exports_provider3, {
45
54
  mergeOverlay: () => mergeOverlay2,
46
55
  modelSettings: () => modelSettings2,
47
56
  nativeSettings: () => nativeSettings2,
48
- node: () => node80,
57
+ node: () => node66,
49
58
  packageName: () => packageName2,
50
59
  timeout: () => timeout2,
51
60
  timeouts: () => timeouts2
52
61
  });
53
- import { Context, Effect as Effect2, Layer, Option as Option2, Schema as Schema2, Stream, Struct as Struct2 } from "effect";
62
+ import { Context, Effect, Layer, Option, Schema, Stream, Struct } from "effect";
54
63
  import { Provider } from "@opencode/schema/provider";
55
64
  import { Model } from "@opencode/schema/model";
56
65
  import { makeLocationNode } from "@opencode/util/effect/app-node";
@@ -59,270 +68,8 @@ import { isRecord } from "@opencode/ai/utils/record";
59
68
  import { importModule, resolveModule } from "@opencode/util/runtime-import";
60
69
  import { Credential } from "@opencode/schema/credential";
61
70
  import { freeze } from "immer";
62
-
63
- // src/aisdk-native.ts
64
- var exports_aisdk_native = {};
65
- __export(exports_aisdk_native, {
66
- AISDKNative: () => exports_aisdk_native,
67
- native: () => native2,
68
- rewrite: () => rewrite2
69
- });
70
- import { Effect, Option, Schema, Struct } from "effect";
71
- function rewrite2(target, input) {
72
- if (input.specifier === undefined)
73
- return;
74
- const plain = resolve(input.specifier, input);
75
- if (!plain)
76
- return;
77
- const settings = decode(target.settings ?? {});
78
- const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
79
- const translated = options(replacement, input.modelID, settings);
80
- if (target.package !== undefined || replacement !== input.specifier)
81
- target.package = replacement;
82
- target.settings = target.settings === undefined ? undefined : {
83
- ...translated.settings,
84
- ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
85
- };
86
- target.headers = mergeHeaders2(translated.headers, target.headers);
87
- target.body = mergeOverlay2(translated.body, target.body);
88
- target.variants = target.variants?.map((variant) => {
89
- const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
90
- const headers = mergeHeaders2(overlay.headers, variant.headers);
91
- const body = mergeOverlay2(overlay.body, variant.body);
92
- return {
93
- id: variant.id,
94
- ...variant.settings === undefined ? {} : { settings: overlay.settings },
95
- ...headers === undefined ? {} : { headers },
96
- ...body === undefined ? {} : { body }
97
- };
98
- });
99
- }
100
- var PACKAGES = {
101
- "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
102
- "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
103
- "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
104
- "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
105
- "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
106
- "@ai-sdk/cohere": "@opencode/ai/providers/cohere",
107
- "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
108
- "@ai-sdk/google": "@opencode/ai/providers/google",
109
- "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
110
- "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
111
- "@ai-sdk/groq": "@opencode/ai/providers/groq",
112
- "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
113
- "@ai-sdk/openai": "@opencode/ai/providers/openai",
114
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
115
- "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
116
- "@ai-sdk/xai": "@opencode/ai/providers/xai",
117
- "@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
118
- "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
119
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
120
- "venice-ai-sdk-provider": "@opencode/ai/providers/venice"
121
- };
122
- var protocols = (name) => ({
123
- "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
124
- "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
125
- "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
126
- });
127
- var HOSTS = {
128
- alibaba: protocols("alibaba"),
129
- "alibaba-cn": protocols("alibaba"),
130
- "alibaba-coding-plan": protocols("alibaba"),
131
- "alibaba-coding-plan-cn": protocols("alibaba"),
132
- "alibaba-token-plan": protocols("alibaba"),
133
- "alibaba-token-plan-cn": protocols("alibaba"),
134
- baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
135
- "cloudflare-ai-gateway": {
136
- "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
137
- "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
138
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
139
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
140
- },
141
- cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
142
- "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
143
- deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
144
- digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
145
- "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
146
- "google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
147
- "kimi-for-coding": protocols("moonshot"),
148
- meta: protocols("meta"),
149
- minimax: protocols("minimax"),
150
- "minimax-cn": protocols("minimax"),
151
- "minimax-coding-plan": protocols("minimax"),
152
- "minimax-cn-coding-plan": protocols("minimax"),
153
- moonshotai: protocols("moonshot"),
154
- "moonshotai-cn": protocols("moonshot"),
155
- zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
156
- "zai-coding-plan": protocols("zai-coding-plan"),
157
- zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
158
- "zhipuai-coding-plan": protocols("zai-coding-plan")
159
- };
160
- var NATIVE = new Set([
161
- ...Object.values(PACKAGES),
162
- ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
163
- "@opencode/ai/providers/azure/chat",
164
- "@opencode/ai/providers/amazon-bedrock/mantle",
165
- "@opencode/ai/providers/amazon-bedrock/mantle/chat",
166
- "@opencode/ai/providers/amazon-bedrock/mantle/responses"
167
- ]);
168
- function native2(npm, context) {
169
- const host = HOSTS[context.providerID]?.[npm];
170
- if (host)
171
- return host;
172
- if (npm === "@ai-sdk/amazon-bedrock/mantle")
173
- return mantle(context.modelID);
174
- if (npm === "@ai-sdk/azure" && azureChat(context))
175
- return "@opencode/ai/providers/azure/chat";
176
- return PACKAGES[npm];
177
- }
178
- var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
179
- var mantle = (modelID) => {
180
- if (modelID === undefined)
181
- return "@opencode/ai/providers/amazon-bedrock/mantle";
182
- return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
183
- };
184
- function resolve(specifier, context) {
185
- const npm = packageName2(specifier);
186
- if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
187
- return native2(npm, context);
188
- if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
189
- return mantle(context.modelID);
190
- if (npm === "@opencode/ai/providers/azure/responses" && azureChat(context))
191
- return "@opencode/ai/providers/azure/chat";
192
- return NATIVE.has(npm) ? npm : undefined;
193
- }
194
- function options(replacement, modelID, settings) {
195
- const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
196
- const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
197
- const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
198
- return {
199
- settings: {
200
- ...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
201
- ...thinking === undefined ? {} : { thinking }
202
- },
203
- ...settings.headers === undefined ? {} : { headers: settings.headers },
204
- ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
205
- ...converse ? bedrockRequest(modelID, settings) : {},
206
- ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
207
- };
208
- }
209
- var BEDROCK_KEYS = [
210
- "bearerToken",
211
- "endpoint",
212
- "credentials",
213
- "credentialProvider",
214
- "accessKeyId",
215
- "secretAccessKey",
216
- "sessionToken"
217
- ];
218
- var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
219
- function bedrockSettings(settings, converse) {
220
- const region = settings.region ?? settings.credentials?.region;
221
- const credentials = settings.credentials ?? settings;
222
- const baseURL = settings.baseURL ?? settings.endpoint;
223
- return {
224
- ...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
225
- ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
226
- ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
227
- ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
228
- credentials: {
229
- ...region === undefined ? {} : { region },
230
- accessKeyId: credentials.accessKeyId,
231
- secretAccessKey: credentials.secretAccessKey,
232
- ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
233
- }
234
- }
235
- };
236
- }
237
- function bedrockThinking(modelID, settings) {
238
- const reasoning = settings.reasoningConfig;
239
- if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
240
- return;
241
- return { type: "enabled", budgetTokens: reasoning.budgetTokens };
242
- }
243
- function bedrockRequest(modelID, settings) {
244
- const additional = settings.additionalModelRequestFields ?? {};
245
- const reasoning = settings.reasoningConfig;
246
- const anthropic = modelID?.includes("anthropic") ?? false;
247
- const openai = modelID?.includes("openai.") ?? false;
248
- const harmony = modelID?.includes("openai.gpt-oss") ?? false;
249
- const effort = reasoning?.maxReasoningEffort;
250
- const type = reasoning?.type;
251
- const budget = reasoning?.budgetTokens;
252
- const display = reasoning?.display;
253
- const betas = settings.anthropicBeta ?? [];
254
- const fields = mergeOverlay2(additional, {
255
- ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
256
- ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
257
- ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
258
- ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
259
- ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
260
- ...!anthropic && !openai && effort !== undefined ? {
261
- reasoningConfig: {
262
- ...type === undefined || type === "adaptive" ? {} : { type },
263
- ...budget === undefined ? {} : { budgetTokens: budget },
264
- maxReasoningEffort: effort
265
- }
266
- } : {}
267
- });
268
- const body = {
269
- ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
270
- ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
271
- };
272
- return Object.keys(body).length === 0 ? {} : { body };
273
- }
274
- var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
275
- function openRouterRequest(settings) {
276
- const headers = mergeHeaders2({
277
- ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
278
- ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
279
- ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
280
- }, settings.headers) ?? {};
281
- return Object.keys(headers).length === 0 ? {} : { headers };
282
- }
283
- var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
284
- var Credentials = Schema.Struct({
285
- accessKeyId: Schema.String,
286
- secretAccessKey: Schema.String,
287
- sessionToken: lenient(Schema.String),
288
- region: lenient(Schema.String)
289
- });
290
- var Legacy = Schema.StructWithRest(Schema.Struct({
291
- apiKey: lenient(Schema.String),
292
- baseURL: lenient(Schema.String),
293
- headers: lenient(Schema.Record(Schema.String, Schema.String)),
294
- extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
295
- useCompletionUrls: lenient(Schema.Boolean),
296
- auth: lenient(Schema.Literals(["bearer", "sigv4"])),
297
- bearerToken: lenient(Schema.String),
298
- endpoint: lenient(Schema.String),
299
- region: lenient(Schema.String),
300
- credentials: lenient(Credentials),
301
- accessKeyId: lenient(Schema.String),
302
- secretAccessKey: lenient(Schema.String),
303
- sessionToken: lenient(Schema.String),
304
- anthropicBeta: lenient(Schema.Array(Schema.String)),
305
- serviceTier: lenient(Schema.String),
306
- reasoningConfig: lenient(Schema.Struct({
307
- type: lenient(Schema.String),
308
- display: lenient(Schema.String),
309
- maxReasoningEffort: lenient(Schema.String),
310
- budgetTokens: lenient(Schema.Number)
311
- })),
312
- additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
313
- anthropic_beta: lenient(Schema.Array(Schema.String)),
314
- output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
315
- reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
316
- }), [Schema.Record(Schema.String, Schema.Unknown)])),
317
- appName: lenient(Schema.String),
318
- appUrl: lenient(Schema.String),
319
- api_keys: lenient(Schema.Record(Schema.String, Schema.String))
320
- }), [Schema.Record(Schema.String, Schema.Unknown)]);
321
- var decode = Schema.decodeUnknownSync(Legacy);
322
-
323
- // src/provider.ts
324
- import { Event as Event17 } from "@opencode/schema/provider";
325
- var ID13 = Provider.ID;
71
+ import { Event as Event13 } from "@opencode/schema/provider";
72
+ var ID8 = Provider.ID;
326
73
  var AISDK_PREFIX2 = "aisdk:";
327
74
  var isAISDK2 = (value) => value?.startsWith(AISDK_PREFIX2) ?? false;
328
75
  var aisdk2 = (value) => isAISDK2(value) ? value : `${AISDK_PREFIX2}${value}`;
@@ -333,12 +80,12 @@ function packageName2(value) {
333
80
  return value;
334
81
  return value.slice(AISDK_PREFIX2.length);
335
82
  }
336
- var JsonRecord = Schema2.Record(Schema2.String, Schema2.Json);
337
- var decodeJsonRecord = Schema2.decodeUnknownSync(JsonRecord);
83
+ var JsonRecord = Schema.Record(Schema.String, Schema.Json);
84
+ var decodeJsonRecord = Schema.decodeUnknownSync(JsonRecord);
338
85
 
339
- class LoadError3 extends Schema2.TaggedError()("Provider.LoadError", {
340
- package: Schema2.String,
341
- cause: Schema2.Defect()
86
+ class LoadError3 extends Schema.TaggedError()("Provider.LoadError", {
87
+ package: Schema.String,
88
+ cause: Schema.Defect()
342
89
  }) {
343
90
  }
344
91
  var packages = new Map;
@@ -357,6 +104,7 @@ var builtins = new Map([
357
104
  ["@opencode/ai/providers/alibaba/messages", () => import("@opencode/ai/providers/alibaba/messages")],
358
105
  ["@opencode/ai/providers/alibaba/responses", () => import("@opencode/ai/providers/alibaba/responses")],
359
106
  ["@opencode/ai/providers/anthropic", () => import("@opencode/ai/providers/anthropic")],
107
+ ["@opencode/ai/providers/anthropic-compatible", () => import("@opencode/ai/providers/anthropic-compatible")],
360
108
  ["@opencode/ai/providers/azure", () => import("@opencode/ai/providers/azure")],
361
109
  ["@opencode/ai/providers/azure/chat", () => import("@opencode/ai/providers/azure/chat")],
362
110
  ["@opencode/ai/providers/azure/responses", () => import("@opencode/ai/providers/azure/responses")],
@@ -392,6 +140,14 @@ var builtins = new Map([
392
140
  ["@opencode/ai/providers/openai/chat", () => import("@opencode/ai/providers/openai/chat")],
393
141
  ["@opencode/ai/providers/openai/responses", () => import("@opencode/ai/providers/openai/responses")],
394
142
  ["@opencode/ai/providers/openai-compatible", () => import("@opencode/ai/providers/openai-compatible")],
143
+ [
144
+ "@opencode/ai/providers/openai-compatible/responses",
145
+ () => import("@opencode/ai/providers/openai-compatible/responses")
146
+ ],
147
+ [
148
+ "@opencode/ai/providers/openai-compatible-responses",
149
+ () => import("@opencode/ai/providers/openai-compatible-responses")
150
+ ],
395
151
  ["@opencode/ai/providers/openrouter", () => import("@opencode/ai/providers/openrouter")],
396
152
  ["@opencode/ai/providers/togetherai", () => import("@opencode/ai/providers/togetherai")],
397
153
  ["@opencode/ai/providers/venice", () => import("@opencode/ai/providers/venice")],
@@ -405,12 +161,12 @@ var builtins = new Map([
405
161
  () => import("@opencode/ai/providers/zai-coding-plan/responses")
406
162
  ]
407
163
  ]);
408
- var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
164
+ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
409
165
  const specifier = packageName2(input);
410
166
  const builtin = builtins.get(specifier);
411
167
  if (builtin)
412
168
  return yield* importPackage(specifier, specifier, builtin);
413
- const resolved = yield* Effect2.sync(() => {
169
+ const resolved = yield* Effect.sync(() => {
414
170
  if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
415
171
  return specifier;
416
172
  try {
@@ -429,8 +185,8 @@ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
429
185
  }
430
186
  const parts = specifier.split("/");
431
187
  const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
432
- const installed = yield* npm.add(root).pipe(Effect2.mapError((cause) => new LoadError3({ package: specifier, cause })));
433
- const entrypoint = yield* Effect2.try({
188
+ const installed = yield* npm.add(root).pipe(Effect.mapError((cause) => new LoadError3({ package: specifier, cause })));
189
+ const entrypoint = yield* Effect.try({
434
190
  try: () => resolveModule(specifier, installed.directory),
435
191
  catch: (cause) => new LoadError3({ package: specifier, cause })
436
192
  });
@@ -439,15 +195,15 @@ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
439
195
  var CORE_KEYS = ["chunkTimeout", "compaction", "fetch", "headerTimeout", "timeout", "transport"];
440
196
  var PROVIDER_ONLY_KEYS = ["chunkTimeout", "headerTimeout", "timeout", "transport"];
441
197
  function nativeSettings2(settings) {
442
- return Struct2.omit(settings, CORE_KEYS);
198
+ return Struct.omit(settings, CORE_KEYS);
443
199
  }
444
200
  function modelSettings2(settings) {
445
- return settings && Struct2.omit(settings, PROVIDER_ONLY_KEYS);
201
+ return settings && Struct.omit(settings, PROVIDER_ONLY_KEYS);
446
202
  }
447
- var decodeTimeout = Schema2.decodeUnknownOption(HttpTimeout);
203
+ var decodeTimeout = Schema.decodeUnknownOption(HttpTimeout);
448
204
  var DEFAULT_TIMEOUT_MS3 = 300000;
449
205
  function timeout2(value) {
450
- return Option2.getOrUndefined(decodeTimeout(value));
206
+ return Option.getOrUndefined(decodeTimeout(value));
451
207
  }
452
208
  function timeouts2(settings) {
453
209
  return {
@@ -481,13 +237,13 @@ function mergeHeaders2(base, overlay) {
481
237
  return result;
482
238
  }, new Map).values());
483
239
  }
484
- var Request3 = Provider.Request;
240
+ var Request2 = Provider.Request;
485
241
  var Compaction3 = Provider.Compaction;
486
242
  var Transport2 = Provider.Transport;
487
243
  var Settings2 = Provider.Settings;
488
- var Info22 = Provider.Info;
244
+ var Info16 = Provider.Info;
489
245
 
490
- class Service76 extends Context.Service()("@opencode/Provider") {
246
+ class Service63 extends Context.Service()("@opencode/Provider") {
491
247
  }
492
248
  var definitions = new WeakMap;
493
249
  function index(providerID, models) {
@@ -500,10 +256,10 @@ function index(providerID, models) {
500
256
  definitions.set(models, indexes);
501
257
  return result;
502
258
  }
503
- var layer = Layer.effect(Service76, Effect2.gen(function* () {
504
- const bus = yield* Service83;
505
- const integrations = yield* Service77;
506
- const location = yield* Service80;
259
+ var layer = Layer.effect(Service63, Effect.gen(function* () {
260
+ const bus = yield* Service80;
261
+ const integrations = yield* Service67;
262
+ const location = yield* Service76;
507
263
  const state = create3({
508
264
  name: "provider",
509
265
  initial: () => new Map,
@@ -514,7 +270,7 @@ var layer = Layer.effect(Service76, Effect2.gen(function* () {
514
270
  const current = records.get(id);
515
271
  if (current)
516
272
  return current;
517
- const added = { provider: Info22.empty(id), models: new Map };
273
+ const added = { provider: Info16.empty(id), models: new Map };
518
274
  records.set(id, added);
519
275
  maps.add(added.models);
520
276
  return added;
@@ -582,9 +338,9 @@ var layer = Layer.effect(Service76, Effect2.gen(function* () {
582
338
  },
583
339
  notify: () => notify
584
340
  });
585
- yield* Effect2.addFinalizer(() => shutdown2(state.reload()));
341
+ yield* Effect.addFinalizer(() => shutdown2(state.reload()));
586
342
  let cached;
587
- const snapshot = Effect2.fn("Provider.snapshot")(function* () {
343
+ const snapshot = Effect.fn("Provider.snapshot")(function* () {
588
344
  while (true) {
589
345
  const revision = integrations.revision();
590
346
  const records = state.get();
@@ -595,7 +351,7 @@ var layer = Layer.effect(Service76, Effect2.gen(function* () {
595
351
  const available = Array.from(records.values()).filter((record) => {
596
352
  if (record.provider.activation === "disabled")
597
353
  return false;
598
- const integration = byID.get(record.provider.integrationID ?? ID14.make(record.provider.id));
354
+ const integration = byID.get(record.provider.integrationID ?? ID10.make(record.provider.id));
599
355
  if (record.sourceConnection && key2(record.sourceConnection) !== key2(integration?.connections[0]))
600
356
  return false;
601
357
  if (record.provider.activation === "enabled")
@@ -612,7 +368,7 @@ var layer = Layer.effect(Service76, Effect2.gen(function* () {
612
368
  }
613
369
  });
614
370
  let published;
615
- const notify = Effect2.gen(function* () {
371
+ const notify = Effect.gen(function* () {
616
372
  const value = yield* snapshot();
617
373
  if (value === published)
618
374
  return;
@@ -621,19 +377,19 @@ var layer = Layer.effect(Service76, Effect2.gen(function* () {
621
377
  location: { directory: location.directory, workspaceID: location.workspaceID }
622
378
  });
623
379
  });
624
- yield* bus.subscribe([Event18.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect2.forkScoped({ startImmediately: true }));
625
- return Service76.of({
380
+ yield* bus.subscribe([Event15.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect.forkScoped({ startImmediately: true }));
381
+ return Service63.of({
626
382
  transform: state.transform,
627
383
  reload: state.reload,
628
- get: Effect2.fn("Provider.get")((id) => Effect2.sync(() => freeze(state.get().get(id)?.provider, true))),
629
- all: Effect2.fn("Provider.all")(() => Effect2.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
630
- available: Effect2.fn("Provider.available")(() => snapshot().pipe(Effect2.map((value) => value.providers))),
384
+ get: Effect.fn("Provider.get")((id) => Effect.sync(() => freeze(state.get().get(id)?.provider, true))),
385
+ all: Effect.fn("Provider.all")(() => Effect.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
386
+ available: Effect.fn("Provider.available")(() => snapshot().pipe(Effect.map((value) => value.providers))),
631
387
  snapshot
632
388
  });
633
389
  }));
634
- var node80 = makeLocationNode({ service: Service76, layer, deps: [node87, node81, node84] });
635
- var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
636
- const module = yield* Effect2.tryPromise({
390
+ var node66 = makeLocationNode({ service: Service63, layer, deps: [node84, node71, node80] });
391
+ var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
392
+ const module = yield* Effect.tryPromise({
637
393
  try: () => {
638
394
  const existing = packages.get(entrypoint);
639
395
  if (existing)
@@ -653,4 +409,257 @@ var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, e
653
409
  return module;
654
410
  });
655
411
 
656
- export { ID13, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, DEFAULT_TIMEOUT_MS3, timeout2, timeouts2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info22, Service76, node80, exports_provider3, Event17, rewrite2, native2, exports_aisdk_native };
412
+ // src/aisdk-native.ts
413
+ function rewrite2(target, input) {
414
+ if (input.specifier === undefined)
415
+ return;
416
+ const plain = resolve(input.specifier, input);
417
+ if (!plain)
418
+ return;
419
+ const settings = decode(target.settings ?? {});
420
+ const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
421
+ const translated = options(replacement, input.modelID, settings);
422
+ if (target.package !== undefined || replacement !== input.specifier)
423
+ target.package = replacement;
424
+ target.settings = target.settings === undefined ? undefined : {
425
+ ...translated.settings,
426
+ ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
427
+ };
428
+ target.headers = mergeHeaders2(translated.headers, target.headers);
429
+ target.body = mergeOverlay2(translated.body, target.body);
430
+ target.variants = target.variants?.map((variant) => {
431
+ const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
432
+ const headers = mergeHeaders2(overlay.headers, variant.headers);
433
+ const body = mergeOverlay2(overlay.body, variant.body);
434
+ return {
435
+ id: variant.id,
436
+ ...variant.settings === undefined ? {} : { settings: overlay.settings },
437
+ ...headers === undefined ? {} : { headers },
438
+ ...body === undefined ? {} : { body }
439
+ };
440
+ });
441
+ }
442
+ var PACKAGES = {
443
+ "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
444
+ "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
445
+ "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
446
+ "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
447
+ "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
448
+ "@ai-sdk/cohere": "@opencode/ai/providers/cohere",
449
+ "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
450
+ "@ai-sdk/google": "@opencode/ai/providers/google",
451
+ "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
452
+ "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
453
+ "@ai-sdk/groq": "@opencode/ai/providers/groq",
454
+ "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
455
+ "@ai-sdk/openai": "@opencode/ai/providers/openai",
456
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
457
+ "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
458
+ "@ai-sdk/xai": "@opencode/ai/providers/xai",
459
+ "@ai-sdk/gateway": "@opencode/ai/providers/vercel-ai-gateway",
460
+ "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
461
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway",
462
+ "venice-ai-sdk-provider": "@opencode/ai/providers/venice"
463
+ };
464
+ var protocols = (name) => ({
465
+ "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
466
+ "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
467
+ "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
468
+ });
469
+ var HOSTS = {
470
+ alibaba: protocols("alibaba"),
471
+ "alibaba-cn": protocols("alibaba"),
472
+ "alibaba-coding-plan": protocols("alibaba"),
473
+ "alibaba-coding-plan-cn": protocols("alibaba"),
474
+ "alibaba-token-plan": protocols("alibaba"),
475
+ "alibaba-token-plan-cn": protocols("alibaba"),
476
+ baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
477
+ "cloudflare-ai-gateway": {
478
+ "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
479
+ "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
480
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
481
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
482
+ },
483
+ cohere: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cohere/chat" },
484
+ "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
485
+ deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
486
+ digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
487
+ "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
488
+ "google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
489
+ "kimi-for-coding": protocols("moonshot"),
490
+ meta: protocols("meta"),
491
+ minimax: protocols("minimax"),
492
+ "minimax-cn": protocols("minimax"),
493
+ "minimax-coding-plan": protocols("minimax"),
494
+ "minimax-cn-coding-plan": protocols("minimax"),
495
+ moonshotai: protocols("moonshot"),
496
+ "moonshotai-cn": protocols("moonshot"),
497
+ zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
498
+ "zai-coding-plan": protocols("zai-coding-plan"),
499
+ zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
500
+ "zhipuai-coding-plan": protocols("zai-coding-plan")
501
+ };
502
+ var NATIVE = new Set([
503
+ ...Object.values(PACKAGES),
504
+ ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
505
+ "@opencode/ai/providers/azure/chat",
506
+ "@opencode/ai/providers/amazon-bedrock/mantle",
507
+ "@opencode/ai/providers/amazon-bedrock/mantle/chat",
508
+ "@opencode/ai/providers/amazon-bedrock/mantle/responses"
509
+ ]);
510
+ function native2(npm, context) {
511
+ const host = HOSTS[context.providerID]?.[npm];
512
+ if (host)
513
+ return host;
514
+ if (npm === "@ai-sdk/amazon-bedrock/mantle")
515
+ return mantle(context.modelID);
516
+ if (npm === "@ai-sdk/azure" && azureChat(context))
517
+ return "@opencode/ai/providers/azure/chat";
518
+ return PACKAGES[npm];
519
+ }
520
+ var azureChat = (context) => context.shape === "completions" || context.settings?.useCompletionUrls === true;
521
+ var mantle = (modelID) => {
522
+ if (modelID === undefined)
523
+ return "@opencode/ai/providers/amazon-bedrock/mantle";
524
+ return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
525
+ };
526
+ function resolve(specifier, context) {
527
+ const npm = packageName2(specifier);
528
+ if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
529
+ return native2(npm, context);
530
+ if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
531
+ return mantle(context.modelID);
532
+ if (npm === "@opencode/ai/providers/azure/responses" && azureChat(context))
533
+ return "@opencode/ai/providers/azure/chat";
534
+ return NATIVE.has(npm) ? npm : undefined;
535
+ }
536
+ function options(replacement, modelID, settings) {
537
+ const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
538
+ const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
539
+ const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
540
+ return {
541
+ settings: {
542
+ ...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
543
+ ...thinking === undefined ? {} : { thinking }
544
+ },
545
+ ...settings.headers === undefined ? {} : { headers: settings.headers },
546
+ ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
547
+ ...converse ? bedrockRequest(modelID, settings) : {},
548
+ ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
549
+ };
550
+ }
551
+ var BEDROCK_KEYS = [
552
+ "bearerToken",
553
+ "endpoint",
554
+ "credentials",
555
+ "credentialProvider",
556
+ "accessKeyId",
557
+ "secretAccessKey",
558
+ "sessionToken"
559
+ ];
560
+ var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
561
+ function bedrockSettings(settings, converse) {
562
+ const region = settings.region ?? settings.credentials?.region;
563
+ const credentials = settings.credentials ?? settings;
564
+ const baseURL = settings.baseURL ?? settings.endpoint;
565
+ return {
566
+ ...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
567
+ ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
568
+ ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
569
+ ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
570
+ credentials: {
571
+ ...region === undefined ? {} : { region },
572
+ accessKeyId: credentials.accessKeyId,
573
+ secretAccessKey: credentials.secretAccessKey,
574
+ ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
575
+ }
576
+ }
577
+ };
578
+ }
579
+ function bedrockThinking(modelID, settings) {
580
+ const reasoning = settings.reasoningConfig;
581
+ if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
582
+ return;
583
+ return { type: "enabled", budgetTokens: reasoning.budgetTokens };
584
+ }
585
+ function bedrockRequest(modelID, settings) {
586
+ const additional = settings.additionalModelRequestFields ?? {};
587
+ const reasoning = settings.reasoningConfig;
588
+ const anthropic = modelID?.includes("anthropic") ?? false;
589
+ const openai = modelID?.includes("openai.") ?? false;
590
+ const harmony = modelID?.includes("openai.gpt-oss") ?? false;
591
+ const effort = reasoning?.maxReasoningEffort;
592
+ const type = reasoning?.type;
593
+ const budget = reasoning?.budgetTokens;
594
+ const display = reasoning?.display;
595
+ const betas = settings.anthropicBeta ?? [];
596
+ const fields = mergeOverlay2(additional, {
597
+ ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
598
+ ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
599
+ ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
600
+ ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
601
+ ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
602
+ ...!anthropic && !openai && effort !== undefined ? {
603
+ reasoningConfig: {
604
+ ...type === undefined || type === "adaptive" ? {} : { type },
605
+ ...budget === undefined ? {} : { budgetTokens: budget },
606
+ maxReasoningEffort: effort
607
+ }
608
+ } : {}
609
+ });
610
+ const body = {
611
+ ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
612
+ ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
613
+ };
614
+ return Object.keys(body).length === 0 ? {} : { body };
615
+ }
616
+ var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
617
+ function openRouterRequest(settings) {
618
+ const headers = mergeHeaders2({
619
+ ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
620
+ ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
621
+ ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
622
+ }, settings.headers) ?? {};
623
+ return Object.keys(headers).length === 0 ? {} : { headers };
624
+ }
625
+ var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option2.some(undefined)))));
626
+ var Credentials = Schema2.Struct({
627
+ accessKeyId: Schema2.String,
628
+ secretAccessKey: Schema2.String,
629
+ sessionToken: lenient(Schema2.String),
630
+ region: lenient(Schema2.String)
631
+ });
632
+ var Legacy = Schema2.StructWithRest(Schema2.Struct({
633
+ apiKey: lenient(Schema2.String),
634
+ baseURL: lenient(Schema2.String),
635
+ headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
636
+ extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
637
+ useCompletionUrls: lenient(Schema2.Boolean),
638
+ auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
639
+ bearerToken: lenient(Schema2.String),
640
+ endpoint: lenient(Schema2.String),
641
+ region: lenient(Schema2.String),
642
+ credentials: lenient(Credentials),
643
+ accessKeyId: lenient(Schema2.String),
644
+ secretAccessKey: lenient(Schema2.String),
645
+ sessionToken: lenient(Schema2.String),
646
+ anthropicBeta: lenient(Schema2.Array(Schema2.String)),
647
+ serviceTier: lenient(Schema2.String),
648
+ reasoningConfig: lenient(Schema2.Struct({
649
+ type: lenient(Schema2.String),
650
+ display: lenient(Schema2.String),
651
+ maxReasoningEffort: lenient(Schema2.String),
652
+ budgetTokens: lenient(Schema2.Number)
653
+ })),
654
+ additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
655
+ anthropic_beta: lenient(Schema2.Array(Schema2.String)),
656
+ output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
657
+ reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
658
+ }), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
659
+ appName: lenient(Schema2.String),
660
+ appUrl: lenient(Schema2.String),
661
+ api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
662
+ }), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
663
+ var decode = Schema2.decodeUnknownSync(Legacy);
664
+
665
+ export { rewrite2, native2, exports_aisdk_native, ID8, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, DEFAULT_TIMEOUT_MS3, timeout2, timeouts2, mergeOverlay2, mergeHeaders2, Request2, Compaction3, Transport2, Settings2, Info16, Service63, node66, exports_provider3, Event13 };