@opencode/core 0.0.0-dev-20414 → 0.0.0-dev-20416

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 (805) hide show
  1. package/dist/account/sql.js +1 -1
  2. package/dist/agent.js +79 -79
  3. package/dist/aisdk-native.js +89 -89
  4. package/dist/aisdk.js +92 -92
  5. package/dist/app.js +9 -9
  6. package/dist/bus.js +75 -75
  7. package/dist/chunks/{plugin-8pbv99c3.js → event-logger-056xzx59.js} +15 -15
  8. package/dist/chunks/{plugin-heny0ssz.js → event-logger-07yjvnaz.js} +5 -5
  9. package/dist/chunks/{plugin-rd120rg1.js → event-logger-0gr0dgrd.js} +5 -5
  10. package/dist/chunks/{plugin-njce9agh.js → event-logger-0kskbm85.js} +18 -18
  11. package/dist/chunks/{plugin-0paq2nw3.js → event-logger-0paq2nw3.js} +1 -1
  12. package/dist/chunks/{plugin-je1f8dtr.js → event-logger-0zpkfkm4.js} +10 -10
  13. package/dist/chunks/{plugin-dnbh66kg.js → event-logger-125m14jt.js} +10 -10
  14. package/dist/chunks/{plugin-rhraev7y.js → event-logger-1acjjqhc.js} +4 -4
  15. package/dist/chunks/{plugin-jexmq6sz.js → event-logger-1b4xyzex.js} +11 -11
  16. package/dist/chunks/{plugin-f4vj83tc.js → event-logger-1bksvrzb.js} +33 -33
  17. package/dist/chunks/{plugin-1dazxqgg.js → event-logger-1dazxqgg.js} +2 -2
  18. package/dist/chunks/{plugin-yqn3ptz9.js → event-logger-1js6j2vy.js} +8 -8
  19. package/dist/chunks/{plugin-am9xhf4z.js → event-logger-1m38g5s1.js} +43 -43
  20. package/dist/chunks/{plugin-2518j0hh.js → event-logger-1sfkerqt.js} +6 -6
  21. package/dist/chunks/{plugin-56gdpj1q.js → event-logger-1ygqh575.js} +9 -9
  22. package/dist/chunks/{plugin-21r38tys.js → event-logger-21r38tys.js} +1 -1
  23. package/dist/chunks/{plugin-9nj21xqc.js → event-logger-2336b01z.js} +8 -8
  24. package/dist/chunks/{plugin-e7vg2kgh.js → event-logger-24eg1qa8.js} +8 -8
  25. package/dist/chunks/{plugin-qbqbaz6q.js → event-logger-277eer69.js} +4 -4
  26. package/dist/chunks/{plugin-2a5m3afh.js → event-logger-2a5m3afh.js} +1 -1
  27. package/dist/chunks/{plugin-fjcvtvqr.js → event-logger-2bx4t2ca.js} +14 -14
  28. package/dist/chunks/{plugin-fv3acgj2.js → event-logger-2c42hanh.js} +10 -10
  29. package/dist/chunks/{plugin-fawmbhh7.js → event-logger-2h7tvynr.js} +17 -17
  30. package/dist/chunks/{plugin-9f2zepew.js → event-logger-2kahjab4.js} +29 -29
  31. package/dist/chunks/{plugin-q17z9dx8.js → event-logger-2vgzs72b.js} +5 -5
  32. package/dist/chunks/{plugin-cb4gr5k0.js → event-logger-2wva2jkh.js} +17 -17
  33. package/dist/chunks/{plugin-h4ge2txa.js → event-logger-3032hhxb.js} +5 -5
  34. package/dist/chunks/{plugin-g1sxm558.js → event-logger-30846h32.js} +4 -4
  35. package/dist/chunks/{plugin-jnmgvrcz.js → event-logger-36xy1yzh.js} +15 -15
  36. package/dist/chunks/{plugin-tqstf8pr.js → event-logger-3by5zhag.js} +26 -26
  37. package/dist/chunks/{plugin-3fc6dm20.js → event-logger-3fc6dm20.js} +1 -1
  38. package/dist/chunks/{plugin-3hepkmqq.js → event-logger-3hepkmqq.js} +1 -1
  39. package/dist/chunks/{plugin-3smtnn6g.js → event-logger-3smtnn6g.js} +1 -1
  40. package/dist/chunks/{plugin-3tvqynh2.js → event-logger-3tvqynh2.js} +1 -1
  41. package/dist/chunks/{plugin-cpxvd5mt.js → event-logger-3whn8bgs.js} +10 -10
  42. package/dist/chunks/{plugin-p3xcgj33.js → event-logger-3z4fvzn9.js} +19 -19
  43. package/dist/chunks/{plugin-3zsf4n22.js → event-logger-3zsf4n22.js} +1 -1
  44. package/dist/chunks/{plugin-xh8zq66e.js → event-logger-41wasfk9.js} +5 -5
  45. package/dist/chunks/{plugin-427t97hr.js → event-logger-427t97hr.js} +1 -1
  46. package/dist/chunks/{plugin-y5rf7nzv.js → event-logger-44ak30pa.js} +4 -4
  47. package/dist/chunks/{plugin-j11cyqqw.js → event-logger-474z6p00.js} +20 -20
  48. package/dist/chunks/{plugin-vcwynttf.js → event-logger-49tz1vf4.js} +44 -44
  49. package/dist/chunks/{plugin-b7eck780.js → event-logger-4nh1t5qm.js} +31 -31
  50. package/dist/chunks/{plugin-s6tfd5w9.js → event-logger-4q8h7cm3.js} +30 -30
  51. package/dist/chunks/{plugin-p9kt6re1.js → event-logger-4wrkd8nn.js} +11 -11
  52. package/dist/chunks/{plugin-7zpeh0yx.js → event-logger-4wwqnvbr.js} +4 -4
  53. package/dist/chunks/{plugin-v1p7g5sn.js → event-logger-4x85amra.js} +326 -310
  54. package/dist/chunks/{plugin-5h7tpa83.js → event-logger-4xe71878.js} +25 -25
  55. package/dist/chunks/{plugin-54ma36ye.js → event-logger-54ma36ye.js} +1 -1
  56. package/dist/chunks/{plugin-54tcyq79.js → event-logger-54tcyq79.js} +2 -2
  57. package/dist/chunks/{plugin-5daktx2q.js → event-logger-5daktx2q.js} +1 -1
  58. package/dist/chunks/{plugin-hyxv9c2g.js → event-logger-5gepjxtb.js} +13 -13
  59. package/dist/chunks/{plugin-3x79pmsk.js → event-logger-5kg9mh08.js} +179 -179
  60. package/dist/chunks/{plugin-njzrbw38.js → event-logger-5kyehztc.js} +11 -11
  61. package/dist/chunks/{plugin-2nrn7pcv.js → event-logger-5n9fdw5n.js} +23 -23
  62. package/dist/chunks/{plugin-03fbxtag.js → event-logger-5pw6jttx.js} +8 -8
  63. package/dist/chunks/{plugin-tz2bjj40.js → event-logger-5sj81wm5.js} +5 -5
  64. package/dist/chunks/{plugin-5t3nmthw.js → event-logger-5t3nmthw.js} +2 -2
  65. package/dist/chunks/{plugin-xzme5cs7.js → event-logger-5wxrmrks.js} +7 -7
  66. package/dist/chunks/{plugin-7cas8v75.js → event-logger-5zm9k7fe.js} +27 -27
  67. package/dist/chunks/{plugin-669tq793.js → event-logger-669tq793.js} +1 -1
  68. package/dist/chunks/{plugin-11memm1s.js → event-logger-670p6hpz.js} +2 -2
  69. package/dist/chunks/{plugin-t4t1jkwq.js → event-logger-6btz5c3h.js} +56 -56
  70. package/dist/chunks/{plugin-w1wprjtr.js → event-logger-6hhet5rf.js} +11 -11
  71. package/dist/chunks/{plugin-v1qjrw5t.js → event-logger-6jvpc8jy.js} +6 -6
  72. package/dist/chunks/{plugin-6msgmcgs.js → event-logger-6msgmcgs.js} +1 -1
  73. package/dist/chunks/{plugin-w6deqnwt.js → event-logger-6pah7r0c.js} +1 -1
  74. package/dist/chunks/{plugin-yyb3k5h4.js → event-logger-72czns48.js} +3 -3
  75. package/dist/chunks/{plugin-mxvwwzz5.js → event-logger-7478rs74.js} +11 -11
  76. package/dist/chunks/{plugin-jb3wjpks.js → event-logger-78ftde5m.js} +27 -27
  77. package/dist/chunks/{plugin-7bmhse3q.js → event-logger-7bmhse3q.js} +1 -1
  78. package/dist/chunks/{plugin-mdm0twpa.js → event-logger-7jz5tqjy.js} +17 -17
  79. package/dist/chunks/{plugin-6p0xc422.js → event-logger-7k2avqd9.js} +15 -15
  80. package/dist/chunks/{plugin-wtvb30sm.js → event-logger-7pmz6bbz.js} +9 -9
  81. package/dist/chunks/{plugin-apjtb6ta.js → event-logger-801jjte1.js} +3 -3
  82. package/dist/chunks/{plugin-84txncab.js → event-logger-84txncab.js} +1 -1
  83. package/dist/chunks/{plugin-gq1vhpes.js → event-logger-89a25q8r.js} +31 -32
  84. package/dist/chunks/{plugin-be9ya69w.js → event-logger-8bwjdssr.js} +7 -7
  85. package/dist/chunks/{plugin-8d7r5vzw.js → event-logger-8d7r5vzw.js} +1 -1
  86. package/dist/chunks/{plugin-rz9grs9e.js → event-logger-8h3t5p2d.js} +13 -13
  87. package/dist/chunks/{plugin-vjcy803z.js → event-logger-8mj95qcv.js} +5 -5
  88. package/dist/chunks/{plugin-8rdjafsh.js → event-logger-8mv5n3j0.js} +27 -27
  89. package/dist/chunks/{plugin-s06s152w.js → event-logger-96p7brnx.js} +23 -23
  90. package/dist/chunks/{plugin-j6d0zdmd.js → event-logger-96s3rq5g.js} +14 -14
  91. package/dist/chunks/{plugin-rxyc52bh.js → event-logger-9kf8crr2.js} +6 -6
  92. package/dist/chunks/{plugin-8pkz3xqw.js → event-logger-9qem93zb.js} +3 -3
  93. package/dist/chunks/{plugin-1qesfn3a.js → event-logger-9rewjmnr.js} +20 -20
  94. package/dist/chunks/{plugin-ntg2j34t.js → event-logger-9szwjyee.js} +8 -8
  95. package/dist/chunks/{plugin-m2d0j7c0.js → event-logger-9wpgsbre.js} +9 -9
  96. package/dist/chunks/{plugin-k4ezc13p.js → event-logger-9zkw4r8w.js} +70 -70
  97. package/dist/chunks/{plugin-r5x6zcsm.js → event-logger-a1gpj94z.js} +3 -3
  98. package/dist/chunks/{plugin-cg2at24b.js → event-logger-a358s59g.js} +33 -33
  99. package/dist/chunks/{plugin-aaet6srn.js → event-logger-aaet6srn.js} +2 -2
  100. package/dist/chunks/{plugin-5qkxfyep.js → event-logger-apn8f15b.js} +9 -9
  101. package/dist/chunks/{plugin-c9nqsd6p.js → event-logger-aqcksy77.js} +6 -6
  102. package/dist/chunks/{plugin-f13tjfqg.js → event-logger-asyqfrs8.js} +21 -21
  103. package/dist/chunks/{plugin-b09hzw3k.js → event-logger-b09hzw3k.js} +2 -2
  104. package/dist/chunks/{plugin-psnbjtnb.js → event-logger-b0eftgcg.js} +26 -26
  105. package/dist/chunks/{plugin-mzywpf3p.js → event-logger-b0vhkd8y.js} +4 -4
  106. package/dist/chunks/{plugin-acne750a.js → event-logger-b34hkfqm.js} +41 -41
  107. package/dist/chunks/{plugin-8zh4h089.js → event-logger-b3f8fkhc.js} +11 -6
  108. package/dist/chunks/{plugin-b6gygkdw.js → event-logger-b6gygkdw.js} +2 -2
  109. package/dist/chunks/{plugin-05eqgg1f.js → event-logger-b6jzatxk.js} +51 -45
  110. package/dist/chunks/{plugin-ybgbsjbh.js → event-logger-b6q8nkfr.js} +9 -9
  111. package/dist/chunks/{plugin-wyg24z1h.js → event-logger-b8gbgwp4.js} +48 -48
  112. package/dist/chunks/{plugin-12r7ywha.js → event-logger-ba50v45e.js} +4 -4
  113. package/dist/chunks/{plugin-bjtzbw4r.js → event-logger-bjtzbw4r.js} +3 -3
  114. package/dist/chunks/{plugin-0a2a93z6.js → event-logger-bk5z8xts.js} +21 -21
  115. package/dist/chunks/{plugin-qdy6maa1.js → event-logger-bkdfrtpa.js} +5 -5
  116. package/dist/chunks/{plugin-w0nye3zq.js → event-logger-bpa997y7.js} +26 -26
  117. package/dist/chunks/{plugin-vyamxdws.js → event-logger-byb8yc9m.js} +23 -23
  118. package/dist/chunks/{plugin-49qycnny.js → event-logger-c3bsdxv3.js} +9 -9
  119. package/dist/chunks/{plugin-py3kkmfq.js → event-logger-cfsekr6v.js} +2 -2
  120. package/dist/chunks/{plugin-ajzsbz6h.js → event-logger-chrxq3ex.js} +10 -10
  121. package/dist/chunks/{plugin-1eg1syt8.js → event-logger-cj8231sg.js} +13 -13
  122. package/dist/chunks/{plugin-djszqvmq.js → event-logger-cwa6csj7.js} +9 -9
  123. package/dist/chunks/{plugin-57ez7d0k.js → event-logger-d2q3stg4.js} +7 -7
  124. package/dist/chunks/{plugin-xxtp1kj0.js → event-logger-d6e90v2e.js} +24 -24
  125. package/dist/chunks/{plugin-ag1zf1n2.js → event-logger-dfd6nqfg.js} +7 -7
  126. package/dist/chunks/{plugin-vncycja5.js → event-logger-dfe8djrf.js} +4 -4
  127. package/dist/chunks/{plugin-r54g0ayv.js → event-logger-dg5h694m.js} +45 -45
  128. package/dist/chunks/{plugin-rpg9c19m.js → event-logger-dhmh7aw6.js} +4 -4
  129. package/dist/chunks/{plugin-evks0epg.js → event-logger-dkmywptv.js} +12 -12
  130. package/dist/chunks/{plugin-xkntkrq7.js → event-logger-dmqcgk4z.js} +5 -5
  131. package/dist/chunks/{plugin-bkhdeahw.js → event-logger-dqq9xe44.js} +27 -27
  132. package/dist/chunks/{plugin-6ysrkrkr.js → event-logger-dvc89yjx.js} +8 -8
  133. package/dist/chunks/{plugin-fh2psg6v.js → event-logger-dy7wbn3s.js} +11 -11
  134. package/dist/chunks/{plugin-69tf3796.js → event-logger-dyzkfz1n.js} +21 -21
  135. package/dist/chunks/{plugin-bhfwj6wv.js → event-logger-e6rgzrg1.js} +11 -11
  136. package/dist/chunks/{plugin-tvxp8bn7.js → event-logger-eac16bg9.js} +43 -43
  137. package/dist/chunks/{plugin-ef5x83kb.js → event-logger-ef5x83kb.js} +1 -1
  138. package/dist/chunks/{plugin-7qsnhr75.js → event-logger-emsz7g57.js} +38 -38
  139. package/dist/chunks/{plugin-05y19q8d.js → event-logger-et0s89qn.js} +28 -28
  140. package/dist/chunks/{plugin-etq0c3wd.js → event-logger-etq0c3wd.js} +1 -1
  141. package/dist/chunks/{plugin-s29xemwy.js → event-logger-f885rbej.js} +18 -18
  142. package/dist/chunks/{plugin-v5dkyp31.js → event-logger-fdv30zvt.js} +7 -7
  143. package/dist/chunks/{plugin-vemrnhxc.js → event-logger-fenjx7x0.js} +11 -11
  144. package/dist/chunks/{plugin-975ag91a.js → event-logger-fkq03hc4.js} +18 -18
  145. package/dist/chunks/{plugin-shd19xyq.js → event-logger-frn296px.js} +5 -5
  146. package/dist/chunks/{plugin-pyg34pey.js → event-logger-fxrhgb5s.js} +5 -5
  147. package/dist/chunks/event-logger-g013tbqx.js +26 -0
  148. package/dist/chunks/{plugin-q6am2fr7.js → event-logger-g1rejjsd.js} +12 -12
  149. package/dist/chunks/{plugin-mydmq7vy.js → event-logger-g45t7an4.js} +5 -5
  150. package/dist/chunks/{plugin-y09xcvme.js → event-logger-g578wdqb.js} +16 -16
  151. package/dist/chunks/{plugin-xfkkasph.js → event-logger-g5w8qwbj.js} +4 -4
  152. package/dist/chunks/{plugin-15pq7v1x.js → event-logger-g7afzaxy.js} +11 -11
  153. package/dist/chunks/{plugin-hhz992g6.js → event-logger-g8ynk2e5.js} +35 -35
  154. package/dist/chunks/{plugin-gd4qta3r.js → event-logger-gd4qta3r.js} +1 -1
  155. package/dist/chunks/{plugin-gfvb90ym.js → event-logger-gfvb90ym.js} +2 -2
  156. package/dist/chunks/{plugin-hny4zpsq.js → event-logger-gnxyvke2.js} +15 -15
  157. package/dist/chunks/{plugin-m88agcr3.js → event-logger-gtm482jc.js} +12 -12
  158. package/dist/chunks/{plugin-qk1af027.js → event-logger-gvtxaj7z.js} +21 -21
  159. package/dist/chunks/{plugin-1v844xvg.js → event-logger-h6046181.js} +22 -22
  160. package/dist/chunks/{plugin-h6vf3j39.js → event-logger-h6vf3j39.js} +1 -1
  161. package/dist/chunks/{plugin-at6hz7dy.js → event-logger-h9b27k9k.js} +9 -9
  162. package/dist/chunks/{plugin-ckf6s1e3.js → event-logger-ha5qz99h.js} +14 -14
  163. package/dist/chunks/{plugin-zhqmjxee.js → event-logger-hbn7w743.js} +8 -8
  164. package/dist/chunks/{plugin-24sdwh53.js → event-logger-hcy42j4t.js} +31 -31
  165. package/dist/chunks/{plugin-7sjztwde.js → event-logger-hevc4bph.js} +3 -3
  166. package/dist/chunks/{plugin-0hbmy7r1.js → event-logger-hfpyh3je.js} +35 -23
  167. package/dist/chunks/{plugin-fn0g176e.js → event-logger-hnnwg8mk.js} +27 -27
  168. package/dist/chunks/{plugin-pk1n9ynb.js → event-logger-hnw30wnd.js} +9 -9
  169. package/dist/chunks/{plugin-t6z2tk8y.js → event-logger-hpje7ss6.js} +14 -14
  170. package/dist/chunks/{plugin-j56e64zr.js → event-logger-j56e64zr.js} +1 -1
  171. package/dist/chunks/{plugin-cg6bafnc.js → event-logger-j5aanxkf.js} +18 -18
  172. package/dist/chunks/{plugin-hbepx7tp.js → event-logger-jtjn351v.js} +16 -16
  173. package/dist/chunks/{plugin-k074bh7n.js → event-logger-jv4989nc.js} +18 -18
  174. package/dist/chunks/{plugin-k3c624dm.js → event-logger-k3c624dm.js} +3 -3
  175. package/dist/chunks/{plugin-cyward61.js → event-logger-k8kza4t3.js} +13 -13
  176. package/dist/chunks/{plugin-b1h1c68h.js → event-logger-kfvedqw3.js} +8 -8
  177. package/dist/chunks/{plugin-jhh1k21k.js → event-logger-kpy4yfav.js} +1 -1
  178. package/dist/chunks/{plugin-zw04h7y9.js → event-logger-krfw2wza.js} +10 -10
  179. package/dist/chunks/{plugin-xgd6vhan.js → event-logger-kvt93wrg.js} +4 -4
  180. package/dist/chunks/{plugin-9h1zctex.js → event-logger-kxfyed36.js} +81 -81
  181. package/dist/chunks/{plugin-dxm7jqgk.js → event-logger-m2pxj8c0.js} +20 -20
  182. package/dist/chunks/{plugin-m3fdjcah.js → event-logger-m3fdjcah.js} +1 -1
  183. package/dist/chunks/{plugin-m58kmhef.js → event-logger-m58kmhef.js} +2 -2
  184. package/dist/chunks/{plugin-17fsw95c.js → event-logger-m6nmcdhk.js} +15 -15
  185. package/dist/chunks/{plugin-dyyz5283.js → event-logger-m7kk9p21.js} +6 -6
  186. package/dist/chunks/{plugin-m9w0rfyh.js → event-logger-m9w0rfyh.js} +1 -1
  187. package/dist/chunks/{plugin-hrw2t248.js → event-logger-mgtej8q6.js} +28 -28
  188. package/dist/chunks/{plugin-7k8qyt23.js → event-logger-mgyjezvw.js} +44 -44
  189. package/dist/chunks/{plugin-magykp64.js → event-logger-mjymc32g.js} +4 -4
  190. package/dist/chunks/{plugin-pxr9jhng.js → event-logger-mp3rs6rf.js} +12 -12
  191. package/dist/chunks/{plugin-dnxkq42g.js → event-logger-mpk0rfs5.js} +4 -4
  192. package/dist/chunks/{plugin-h5x33s9d.js → event-logger-mtazec1p.js} +32 -32
  193. package/dist/chunks/{plugin-88yg0haz.js → event-logger-mwme0r2x.js} +9 -9
  194. package/dist/chunks/event-logger-mybqtq6t.js +507 -0
  195. package/dist/chunks/{plugin-kwaa1xej.js → event-logger-n6pgtx9h.js} +4 -4
  196. package/dist/chunks/{plugin-q1zezmfs.js → event-logger-ntt46qkd.js} +18 -18
  197. package/dist/chunks/{plugin-dpkg50ah.js → event-logger-nxm207yx.js} +4 -4
  198. package/dist/chunks/{plugin-cmwkp3r5.js → event-logger-p37cw4rj.js} +8 -8
  199. package/dist/chunks/{plugin-qk3qqkg0.js → event-logger-pe642vya.js} +18 -18
  200. package/dist/chunks/{plugin-pjvnvgmy.js → event-logger-pjvnvgmy.js} +1 -1
  201. package/dist/chunks/{plugin-p1np60n0.js → event-logger-pk4ymh6x.js} +16 -16
  202. package/dist/chunks/{plugin-pknna89w.js → event-logger-pknna89w.js} +1 -1
  203. package/dist/chunks/{plugin-58gyjtks.js → event-logger-pkpw5sx5.js} +32 -32
  204. package/dist/chunks/{plugin-e6ke0dsv.js → event-logger-pm2ytph1.js} +20 -20
  205. package/dist/chunks/{plugin-psazpmmj.js → event-logger-psazpmmj.js} +2 -2
  206. package/dist/chunks/{plugin-0t85s976.js → event-logger-px42xchs.js} +17 -17
  207. package/dist/chunks/{plugin-fk4rp2mh.js → event-logger-qa5emg3d.js} +7 -7
  208. package/dist/chunks/{plugin-1fv57ab3.js → event-logger-qafkbnc3.js} +32 -32
  209. package/dist/chunks/{plugin-brdxpnq2.js → event-logger-qbtyy1xv.js} +28 -28
  210. package/dist/chunks/{plugin-khcv1f62.js → event-logger-qc39ajn0.js} +14 -14
  211. package/dist/chunks/{plugin-axs6pdy0.js → event-logger-qdbakdjh.js} +5 -5
  212. package/dist/chunks/{plugin-7x144p2c.js → event-logger-qgccrrkf.js} +15 -15
  213. package/dist/chunks/{plugin-qgn6gcr1.js → event-logger-qgn6gcr1.js} +1 -1
  214. package/dist/chunks/{plugin-qsdy395h.js → event-logger-qsdy395h.js} +1 -1
  215. package/dist/chunks/{plugin-6gmp4gem.js → event-logger-qsf46761.js} +8 -8
  216. package/dist/chunks/{plugin-e21rpbkk.js → event-logger-qtz788pa.js} +22 -22
  217. package/dist/chunks/{plugin-yxzgp43r.js → event-logger-qvfvz5h6.js} +9 -9
  218. package/dist/chunks/{plugin-9ctgc0g7.js → event-logger-qvkn8f97.js} +4 -4
  219. package/dist/chunks/{plugin-j4t6xr1p.js → event-logger-qy24xa0s.js} +16 -16
  220. package/dist/chunks/{plugin-bhdgc465.js → event-logger-r4fq1cvf.js} +33 -33
  221. package/dist/chunks/event-logger-rap9a73h.js +18 -0
  222. package/dist/chunks/{plugin-rdw6cm16.js → event-logger-rdw6cm16.js} +1 -1
  223. package/dist/chunks/{plugin-febbbnbh.js → event-logger-rfxyr88f.js} +38 -38
  224. package/dist/chunks/{plugin-4xrvpr4d.js → event-logger-rkqpmy5q.js} +12 -12
  225. package/dist/chunks/{plugin-58en54fn.js → event-logger-rna2mx7d.js} +33 -33
  226. package/dist/chunks/{plugin-cpy6gm2a.js → event-logger-rph3zd4r.js} +6 -6
  227. package/dist/chunks/{plugin-zeh9ct20.js → event-logger-rq775frq.js} +2 -2
  228. package/dist/chunks/{plugin-ep47vn57.js → event-logger-rsntv4fw.js} +11 -11
  229. package/dist/chunks/{plugin-pnmknv3a.js → event-logger-s18e97c5.js} +84 -84
  230. package/dist/chunks/{plugin-sk2hk6tq.js → event-logger-s4jagjf8.js} +9 -9
  231. package/dist/chunks/{plugin-wr8aqzky.js → event-logger-s50vkwph.js} +3 -3
  232. package/dist/chunks/{plugin-mkn2682r.js → event-logger-s6776ax8.js} +24 -24
  233. package/dist/chunks/{plugin-s8d7rejh.js → event-logger-s8d7rejh.js} +1 -1
  234. package/dist/chunks/{plugin-0qya2vv4.js → event-logger-s9mbqkha.js} +20 -20
  235. package/dist/chunks/{plugin-syf57q56.js → event-logger-syf57q56.js} +1 -1
  236. package/dist/chunks/{plugin-b95n020p.js → event-logger-sz763eb6.js} +6 -6
  237. package/dist/chunks/{plugin-yjptyezs.js → event-logger-t3swkhbg.js} +5 -5
  238. package/dist/chunks/{plugin-mp5dqp3x.js → event-logger-t6w4mtk7.js} +13 -13
  239. package/dist/chunks/{plugin-tazgh4e4.js → event-logger-tazgh4e4.js} +1 -1
  240. package/dist/chunks/{plugin-edbfpfck.js → event-logger-tcay1cqt.js} +6 -6
  241. package/dist/chunks/{plugin-tcezcvh9.js → event-logger-tcezcvh9.js} +1 -1
  242. package/dist/chunks/{plugin-tdstcens.js → event-logger-tdstcens.js} +1 -1
  243. package/dist/chunks/{plugin-e28cvq4c.js → event-logger-tkzj0056.js} +4 -4
  244. package/dist/chunks/{plugin-bxqb3hdk.js → event-logger-tqhrypxk.js} +13 -13
  245. package/dist/chunks/{plugin-jhnnbcrq.js → event-logger-tsf7ps50.js} +8 -8
  246. package/dist/chunks/{plugin-tvtrv512.js → event-logger-tvtrv512.js} +1 -1
  247. package/dist/chunks/{plugin-g1y398dd.js → event-logger-twtjjjev.js} +4 -4
  248. package/dist/chunks/{plugin-sfzb50zm.js → event-logger-twvtekjm.js} +10 -10
  249. package/dist/chunks/{plugin-gvpwdtw4.js → event-logger-v0rzgg0c.js} +46 -46
  250. package/dist/chunks/{plugin-zpn7x7ph.js → event-logger-vbdhqjda.js} +9 -9
  251. package/dist/chunks/{plugin-a1a50ys5.js → event-logger-vdzspbnc.js} +5 -5
  252. package/dist/chunks/{plugin-veqvce7d.js → event-logger-veqvce7d.js} +1 -1
  253. package/dist/chunks/{plugin-wbt9zsn3.js → event-logger-vps92m75.js} +8 -8
  254. package/dist/chunks/{plugin-r5cdkqmj.js → event-logger-vw0kv50g.js} +13 -13
  255. package/dist/chunks/{plugin-exkfp83h.js → event-logger-vwgs6v8p.js} +33 -33
  256. package/dist/chunks/{plugin-zg1t26g9.js → event-logger-vwk34294.js} +3 -3
  257. package/dist/chunks/{plugin-vzcthcp8.js → event-logger-vzcthcp8.js} +1 -1
  258. package/dist/chunks/{plugin-vzs5sf6e.js → event-logger-vzs5sf6e.js} +1 -1
  259. package/dist/chunks/{plugin-w3wsvvr9.js → event-logger-w3wsvvr9.js} +1 -1
  260. package/dist/chunks/{plugin-4c8bw516.js → event-logger-w3x9v1nk.js} +7 -7
  261. package/dist/chunks/{plugin-wd87259q.js → event-logger-wd87259q.js} +1 -1
  262. package/dist/chunks/{plugin-fv4vgvy1.js → event-logger-wng992rj.js} +20 -20
  263. package/dist/chunks/{plugin-dp9x5mxp.js → event-logger-wpgrwh85.js} +10 -10
  264. package/dist/chunks/{plugin-nqygpcct.js → event-logger-wpwx019v.js} +15 -15
  265. package/dist/chunks/{plugin-3176ztkn.js → event-logger-wq15az09.js} +23 -23
  266. package/dist/chunks/{plugin-ndrk8r07.js → event-logger-wv2pvdd1.js} +11 -11
  267. package/dist/chunks/{plugin-x1ezjp6w.js → event-logger-x1ezjp6w.js} +1 -1
  268. package/dist/chunks/{plugin-g3zzmh5g.js → event-logger-xda1fc24.js} +14 -14
  269. package/dist/chunks/{plugin-x25ckt5d.js → event-logger-xhjp5ndj.js} +10 -10
  270. package/dist/chunks/{plugin-584wdnyf.js → event-logger-xj3htnp5.js} +16 -16
  271. package/dist/chunks/{plugin-j30qv9ss.js → event-logger-xmszv9zx.js} +25 -25
  272. package/dist/chunks/{plugin-09chyfxs.js → event-logger-xn4rdr4r.js} +43 -43
  273. package/dist/chunks/{plugin-xk21n9zm.js → event-logger-xvq5hbj2.js} +22 -22
  274. package/dist/chunks/{plugin-r73hggny.js → event-logger-xx2yb7w0.js} +36 -36
  275. package/dist/chunks/{plugin-4m263vr9.js → event-logger-xy2t9kqq.js} +21 -21
  276. package/dist/chunks/{plugin-y1fvbwt7.js → event-logger-y1fvbwt7.js} +1 -1
  277. package/dist/chunks/{plugin-1hzm6jbk.js → event-logger-y39dv51y.js} +29 -29
  278. package/dist/chunks/{plugin-j54ngk1e.js → event-logger-y4jjsjgg.js} +35 -35
  279. package/dist/chunks/{plugin-pk9r2dcy.js → event-logger-y6hv0j91.js} +26 -26
  280. package/dist/chunks/{plugin-5jt7jh4x.js → event-logger-yn3dmqqd.js} +28 -28
  281. package/dist/chunks/{plugin-yrhqyw5v.js → event-logger-yrhqyw5v.js} +1 -1
  282. package/dist/chunks/{plugin-yrznvahk.js → event-logger-yrznvahk.js} +2 -2
  283. package/dist/chunks/{plugin-jw9x1xkp.js → event-logger-yxkyb042.js} +24 -24
  284. package/dist/chunks/{plugin-gv6a8nnw.js → event-logger-yyb7tjpc.js} +2 -2
  285. package/dist/chunks/{plugin-z0bkrqjs.js → event-logger-z0bkrqjs.js} +1 -1
  286. package/dist/chunks/event-logger-z0wm06r0.js +252 -0
  287. package/dist/chunks/{plugin-z63w68vq.js → event-logger-z63w68vq.js} +2 -2
  288. package/dist/chunks/{plugin-zr2ceqn5.js → event-logger-zr2ceqn5.js} +1 -1
  289. package/dist/chunks/{plugin-zxq2ej10.js → event-logger-zxq2ej10.js} +1 -1
  290. package/dist/chunks/{plugin-r3fve70j.js → event-logger-zzd0m6f2.js} +47 -47
  291. package/dist/chunks/{plugin-t5xj5z8c.js → event-logger-zzqx3mne.js} +11 -11
  292. package/dist/codemode/catalog.js +1 -1
  293. package/dist/codemode/instructions.js +7 -7
  294. package/dist/codemode/tool.js +3 -3
  295. package/dist/codemode/web.js +1 -1
  296. package/dist/command.js +85 -85
  297. package/dist/config/discovery.js +82 -82
  298. package/dist/config/markdown.js +1 -1
  299. package/dist/config/normalize.js +106 -106
  300. package/dist/config/plugin/agent.js +125 -125
  301. package/dist/config/plugin/command.js +215 -215
  302. package/dist/config/plugin/compaction.js +161 -161
  303. package/dist/config/plugin/compatibility.js +141 -141
  304. package/dist/config/plugin/entry-observer.js +1 -1
  305. package/dist/config/plugin/formatter.js +124 -124
  306. package/dist/config/plugin/image.js +123 -123
  307. package/dist/config/plugin/instruction.js +90 -90
  308. package/dist/config/plugin/location-watcher.js +125 -125
  309. package/dist/config/plugin/mcp.js +132 -132
  310. package/dist/config/plugin/policy.js +124 -124
  311. package/dist/config/plugin/provider.js +123 -123
  312. package/dist/config/plugin/reference.js +125 -125
  313. package/dist/config/plugin/shell.js +125 -125
  314. package/dist/config/plugin/skill-file.js +102 -102
  315. package/dist/config/plugin/skill.js +144 -144
  316. package/dist/config/plugin/snapshot.js +123 -123
  317. package/dist/config/plugin/source.js +126 -126
  318. package/dist/config/plugin/tool-output.js +125 -125
  319. package/dist/config/plugin/websearch.js +124 -124
  320. package/dist/config/plugin/worktree.js +125 -125
  321. package/dist/config/variable.js +3 -3
  322. package/dist/config/watch.js +1 -1
  323. package/dist/config.js +124 -124
  324. package/dist/credential/sql.js +2 -2
  325. package/dist/credential.js +81 -81
  326. package/dist/database/database.js +66 -66
  327. package/dist/database/drizzle/effect-sqlite/driver.js +14 -14
  328. package/dist/database/drizzle/effect-sqlite/index.js +14 -14
  329. package/dist/database/drizzle/effect-sqlite/session.js +11 -11
  330. package/dist/database/drizzle/index.js +15 -15
  331. package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
  332. package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
  333. package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
  334. package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
  335. package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
  336. package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
  337. package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
  338. package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
  339. package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
  340. package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
  341. package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
  342. package/dist/database/drizzle.js +16 -16
  343. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
  344. package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
  345. package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
  346. package/dist/database/migration/20260225215848_workspace.js +1 -1
  347. package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
  348. package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
  349. package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
  350. package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
  351. package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
  352. package/dist/database/migration/20260323234822_events.js +1 -1
  353. package/dist/database/migration/20260410174513_workspace-name.js +1 -1
  354. package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
  355. package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
  356. package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
  357. package/dist/database/migration/20260428004200_add_session_path.js +1 -1
  358. package/dist/database/migration/20260501142318_next_venus.js +1 -1
  359. package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
  360. package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
  361. package/dist/database/migration/20260510033149_session_usage.js +1 -1
  362. package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
  363. package/dist/database/migration/20260511173437_session-metadata.js +1 -1
  364. package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
  365. package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
  366. package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
  367. package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
  368. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
  369. package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
  370. package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
  371. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
  372. package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
  373. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
  374. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
  375. package/dist/database/migration/20260611035744_credential.js +1 -1
  376. package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
  377. package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
  378. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
  379. package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
  380. package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
  381. package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
  382. package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
  383. package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
  384. package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
  385. package/dist/database/migration/20260812181746_session_inbox.js +1 -1
  386. package/dist/database/migration/20260812213948_worktree.js +1 -1
  387. package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
  388. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
  389. package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
  390. package/dist/database/migration/20260923013825_project_time_active.js +1 -1
  391. package/dist/database/migration.gen.js +49 -49
  392. package/dist/database/migration.js +51 -51
  393. package/dist/database/path.js +2 -2
  394. package/dist/database/schema.gen.js +1 -1
  395. package/dist/database/schema.sql.js +1 -1
  396. package/dist/database/sqlite.bun.js +1 -1
  397. package/dist/database/sqlite.js +1 -1
  398. package/dist/database/sqlite.node.js +1 -1
  399. package/dist/database/sqlite.workerd.js +1 -1
  400. package/dist/database/v1-migration.bun.js +76 -76
  401. package/dist/database/v1-migration.js +1 -1
  402. package/dist/effect/app-node-builder.js +372 -372
  403. package/dist/effect/app-node-platform.js +2 -2
  404. package/dist/effect/keyed-mutex.js +3 -3
  405. package/dist/effect/websocket-constructor.js +1 -1
  406. package/dist/environment/driver.js +1 -1
  407. package/dist/environment/environment.js +93 -93
  408. package/dist/environment/exec-defaults.js +2 -2
  409. package/dist/environment/files.js +1 -1
  410. package/dist/environment/index.js +95 -95
  411. package/dist/environment/local.js +2 -2
  412. package/dist/environment/memory.js +2 -2
  413. package/dist/environment/unavailable.js +1 -1
  414. package/dist/event/sql.js +1 -1
  415. package/dist/event-logger.js +74 -74
  416. package/dist/file-access.js +104 -104
  417. package/dist/file-mutation.js +94 -94
  418. package/dist/file-retention.js +1 -1
  419. package/dist/filesystem/fff.bun.js +2 -2
  420. package/dist/filesystem/fff.js +1 -1
  421. package/dist/filesystem/fff.node.js +2 -2
  422. package/dist/filesystem/fff.workerd.js +2 -2
  423. package/dist/filesystem/ignore.js +1 -1
  424. package/dist/filesystem/location-watcher-policy.js +6 -6
  425. package/dist/filesystem/location-watcher.js +228 -228
  426. package/dist/filesystem/protected.js +1 -1
  427. package/dist/filesystem/search.js +103 -103
  428. package/dist/filesystem/watcher-binding.js +1 -1
  429. package/dist/filesystem/watcher.js +9 -9
  430. package/dist/filesystem.js +102 -102
  431. package/dist/form.js +78 -78
  432. package/dist/formatter/builtins.js +4 -4
  433. package/dist/formatter.js +89 -89
  434. package/dist/generate.js +101 -101
  435. package/dist/git.js +10 -10
  436. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +1 -1
  437. package/dist/github-copilot/chat/get-response-metadata.js +1 -1
  438. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +1 -1
  439. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +7 -7
  440. package/dist/github-copilot/chat/openai-compatible-chat-options.js +1 -1
  441. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +1 -1
  442. package/dist/github-copilot/copilot-provider.js +17 -17
  443. package/dist/github-copilot/models.js +91 -91
  444. package/dist/github-copilot/openai-compatible-error.js +1 -1
  445. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +1 -1
  446. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +1 -1
  447. package/dist/github-copilot/responses/openai-error.js +1 -1
  448. package/dist/github-copilot/responses/openai-responses-language-model.js +10 -10
  449. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +6 -6
  450. package/dist/github-copilot/responses/tool/code-interpreter.js +1 -1
  451. package/dist/github-copilot/responses/tool/file-search.js +1 -1
  452. package/dist/github-copilot/responses/tool/image-generation.js +1 -1
  453. package/dist/github-copilot/responses/tool/web-search-preview.js +1 -1
  454. package/dist/github-copilot/responses/tool/web-search.js +1 -1
  455. package/dist/id/id.js +1 -1
  456. package/dist/image/photon.js +2 -2
  457. package/dist/image.js +4 -4
  458. package/dist/instance/service.js +5 -5
  459. package/dist/instance.js +363 -363
  460. package/dist/instruction-discovery.js +81 -81
  461. package/dist/instructions/builtins.js +87 -87
  462. package/dist/instructions/index.js +1 -1
  463. package/dist/integration/connection.js +3 -3
  464. package/dist/integration.js +85 -85
  465. package/dist/job.js +77 -77
  466. package/dist/kv/sql.js +2 -2
  467. package/dist/kv.js +71 -71
  468. package/dist/location-activity.js +133 -133
  469. package/dist/location-lifecycle.js +105 -105
  470. package/dist/location-service-map.js +86 -86
  471. package/dist/location-services.js +360 -360
  472. package/dist/location.js +87 -87
  473. package/dist/managed-policy.js +5 -5
  474. package/dist/mcp/client.js +91 -91
  475. package/dist/mcp/index.js +101 -101
  476. package/dist/mcp/instructions.js +127 -127
  477. package/dist/mcp/oauth.js +78 -78
  478. package/dist/mcp/stdio.js +90 -90
  479. package/dist/mime.js +1 -1
  480. package/dist/modal/models.js +91 -91
  481. package/dist/model-resolver.js +98 -98
  482. package/dist/model.js +100 -100
  483. package/dist/models-dev.js +95 -95
  484. package/dist/oauth/page.js +1 -1
  485. package/dist/permission/saved.js +82 -82
  486. package/dist/permission/sql.js +5 -5
  487. package/dist/permission.js +107 -107
  488. package/dist/persistent-pty/binary.bun.js +1 -1
  489. package/dist/persistent-pty/daemon.js +1 -1
  490. package/dist/persistent-pty/index.js +86 -86
  491. package/dist/persistent-pty/pty-binding.js +1 -1
  492. package/dist/persistent-pty.js +75 -75
  493. package/dist/plugin/agent.js +104 -104
  494. package/dist/plugin/command.js +102 -102
  495. package/dist/plugin/hooks.js +3 -3
  496. package/dist/plugin/host.js +219 -219
  497. package/dist/plugin/identity.js +3 -3
  498. package/dist/plugin/instance.js +5 -5
  499. package/dist/plugin/internal.js +335 -335
  500. package/dist/plugin/mcp-codemode-defaults.js +3 -3
  501. package/dist/plugin/models-dev.js +96 -96
  502. package/dist/plugin/module.js +7 -7
  503. package/dist/plugin/optimize.js +2 -2
  504. package/dist/plugin/plan.js +102 -102
  505. package/dist/plugin/promise.js +1 -1
  506. package/dist/plugin/provider/amazon-bedrock.js +90 -90
  507. package/dist/plugin/provider/azure.js +124 -124
  508. package/dist/plugin/provider/cerebras.js +1 -1
  509. package/dist/plugin/provider/chatgpt.js +93 -93
  510. package/dist/plugin/provider/cloudflare-ai-gateway.js +120 -120
  511. package/dist/plugin/provider/cloudflare-workers-ai.js +121 -121
  512. package/dist/plugin/provider/cohere.js +2 -2
  513. package/dist/plugin/provider/configured.js +119 -119
  514. package/dist/plugin/provider/digitalocean.js +93 -93
  515. package/dist/plugin/provider/dynamic.js +2 -2
  516. package/dist/plugin/provider/factory.js +1 -1
  517. package/dist/plugin/provider/gateway.js +2 -2
  518. package/dist/plugin/provider/github-copilot.js +95 -95
  519. package/dist/plugin/provider/gitlab.js +93 -93
  520. package/dist/plugin/provider/google-vertex.js +90 -90
  521. package/dist/plugin/provider/kilo.js +1 -1
  522. package/dist/plugin/provider/llmgateway.js +78 -78
  523. package/dist/plugin/provider/lmstudio.js +122 -122
  524. package/dist/plugin/provider/modal.js +92 -92
  525. package/dist/plugin/provider/nvidia.js +1 -1
  526. package/dist/plugin/provider/ollama.js +122 -122
  527. package/dist/plugin/provider/openai.js +93 -93
  528. package/dist/plugin/provider/opencode.js +95 -95
  529. package/dist/plugin/provider/openrouter.js +91 -91
  530. package/dist/plugin/provider/perplexity.js +2 -2
  531. package/dist/plugin/provider/poe.js +79 -79
  532. package/dist/plugin/provider/prompt-cache-key.js +90 -90
  533. package/dist/plugin/provider/sap-ai-core.js +91 -91
  534. package/dist/plugin/provider/sdk-factory.js +1 -1
  535. package/dist/plugin/provider/snowflake-cortex.js +122 -122
  536. package/dist/plugin/provider/venice.js +2 -2
  537. package/dist/plugin/provider/vercel.js +90 -90
  538. package/dist/plugin/provider/vllm.js +122 -122
  539. package/dist/plugin/provider/xai.js +91 -91
  540. package/dist/plugin/provider/zenmux.js +1 -1
  541. package/dist/plugin/provider.js +163 -163
  542. package/dist/plugin/sdk.js +76 -76
  543. package/dist/plugin/service.js +3 -3
  544. package/dist/plugin/skill.js +141 -141
  545. package/dist/plugin/source-directory.js +1 -1
  546. package/dist/plugin/supervisor.js +354 -354
  547. package/dist/plugin/tool-input-repair.js +4 -4
  548. package/dist/plugin/update.js +6 -6
  549. package/dist/plugin/vcs/git.js +86 -86
  550. package/dist/plugin/vcs/hg.js +86 -86
  551. package/dist/plugin/verbosity.js +93 -93
  552. package/dist/plugin/warming.js +121 -121
  553. package/dist/plugin/websearch/exa.js +7 -7
  554. package/dist/plugin/websearch/firecrawl.js +8 -8
  555. package/dist/plugin/websearch/index.js +9 -9
  556. package/dist/plugin/websearch/mcp.js +6 -6
  557. package/dist/plugin/websearch/parallel.js +6 -6
  558. package/dist/plugin/websearch/tavily.js +6 -6
  559. package/dist/plugin/websearch/tinyfish.js +8 -8
  560. package/dist/plugin.js +226 -226
  561. package/dist/project/schema.js +6 -6
  562. package/dist/project/sql.js +4 -4
  563. package/dist/project.js +88 -88
  564. package/dist/provider.js +104 -98
  565. package/dist/pty/protocol.js +1 -1
  566. package/dist/pty/ticket.js +1 -1
  567. package/dist/pty.js +93 -93
  568. package/dist/reference/instructions.js +89 -89
  569. package/dist/reference.js +91 -91
  570. package/dist/repository-cache.js +81 -81
  571. package/dist/repository.js +1 -1
  572. package/dist/ripgrep/binary.js +2 -2
  573. package/dist/ripgrep.js +95 -95
  574. package/dist/rpc.js +86 -86
  575. package/dist/schema.js +1 -1
  576. package/dist/session/affinity.js +1 -1
  577. package/dist/session/command.js +74 -74
  578. package/dist/session/compaction.js +135 -135
  579. package/dist/session/context.js +153 -153
  580. package/dist/session/diff.js +88 -88
  581. package/dist/session/environment.js +3 -3
  582. package/dist/session/error.js +5 -5
  583. package/dist/session/event.js +1 -1
  584. package/dist/session/execution/restart.js +221 -221
  585. package/dist/session/execution.js +128 -128
  586. package/dist/session/generate.js +152 -152
  587. package/dist/session/history.js +13 -13
  588. package/dist/session/inbox.js +88 -88
  589. package/dist/session/info.js +3 -3
  590. package/dist/session/instruction-entry.js +75 -75
  591. package/dist/session/instruction-state.js +8 -8
  592. package/dist/session/instructions.js +97 -97
  593. package/dist/session/message-updater.js +4 -4
  594. package/dist/session/message.js +1 -1
  595. package/dist/session/model-request.js +118 -118
  596. package/dist/session/model-transport.js +7 -7
  597. package/dist/session/move.js +130 -130
  598. package/dist/session/projector.js +86 -86
  599. package/dist/session/prompt.js +105 -105
  600. package/dist/session/provider-context.js +1 -1
  601. package/dist/session/revert.js +90 -90
  602. package/dist/session/run-coordinator.js +3 -3
  603. package/dist/session/runner/index.js +3 -3
  604. package/dist/session/runner/llm.js +232 -232
  605. package/dist/session/runner/max-steps.js +1 -1
  606. package/dist/session/runner/model.js +98 -98
  607. package/dist/session/runner/publish-llm-event.js +3 -3
  608. package/dist/session/runner/retry.js +4 -4
  609. package/dist/session/runner/step.js +126 -126
  610. package/dist/session/runner/to-llm-message.js +2 -2
  611. package/dist/session/schema.js +1 -1
  612. package/dist/session/session.js +172 -172
  613. package/dist/session/shell.js +138 -138
  614. package/dist/session/skill.js +103 -103
  615. package/dist/session/sql.js +5 -5
  616. package/dist/session/stats.js +73 -73
  617. package/dist/session/store.js +85 -85
  618. package/dist/session/subagent-completion.js +1 -1
  619. package/dist/session/subagent-job.js +211 -211
  620. package/dist/session/system-prompt.js +3 -3
  621. package/dist/session/title.js +157 -157
  622. package/dist/session/to-session-error.js +111 -111
  623. package/dist/session/transfer.js +219 -219
  624. package/dist/session/usage.js +1 -1
  625. package/dist/session.js +213 -213
  626. package/dist/shell/parse.js +6 -6
  627. package/dist/shell/result.js +1 -1
  628. package/dist/shell/scan.js +1 -1
  629. package/dist/shell/select.js +11 -11
  630. package/dist/shell.js +138 -138
  631. package/dist/skill/discovery.js +6 -6
  632. package/dist/skill/instructions.js +107 -107
  633. package/dist/skill.js +112 -112
  634. package/dist/snapshot.js +93 -93
  635. package/dist/state.js +1 -1
  636. package/dist/tool/html-markdown.js +1 -1
  637. package/dist/tool/http-body.js +1 -1
  638. package/dist/tool/mcp.js +124 -124
  639. package/dist/tool/plugin/edit.js +120 -120
  640. package/dist/tool/plugin/file-diff.js +1 -1
  641. package/dist/tool/plugin/glob.js +120 -120
  642. package/dist/tool/plugin/grep.js +124 -124
  643. package/dist/tool/plugin/mcp-resource.js +117 -117
  644. package/dist/tool/plugin/opencode.js +3 -3
  645. package/dist/tool/plugin/patch.js +120 -120
  646. package/dist/tool/plugin/question.js +101 -101
  647. package/dist/tool/plugin/read.js +125 -125
  648. package/dist/tool/plugin/shell.js +218 -218
  649. package/dist/tool/plugin/skill.js +111 -111
  650. package/dist/tool/plugin/subagent.js +220 -220
  651. package/dist/tool/plugin/webfetch.js +108 -108
  652. package/dist/tool/plugin/websearch.js +112 -112
  653. package/dist/tool/plugin/write.js +122 -122
  654. package/dist/tool/read-filesystem.js +100 -100
  655. package/dist/tool/runtime.js +1 -1
  656. package/dist/tool-output.js +8 -8
  657. package/dist/tool.js +14 -14
  658. package/dist/types/agent.d.ts +2 -1
  659. package/dist/types/model-resolver.d.ts +2 -2
  660. package/dist/types/provider.d.ts +19 -5
  661. package/dist/types/session/model-transport.d.ts +1 -1
  662. package/dist/types/v1/config/migrate.d.ts +2 -1
  663. package/dist/util/error-summary.js +1 -1
  664. package/dist/util/error.js +1 -1
  665. package/dist/util/git-executable.js +2 -2
  666. package/dist/util/iife.js +1 -1
  667. package/dist/util/lazy.js +1 -1
  668. package/dist/util/slug.js +1 -1
  669. package/dist/util/token.js +1 -1
  670. package/dist/util/which.js +1 -1
  671. package/dist/util/wildcard.js +1 -1
  672. package/dist/v1/config/agent.js +5 -5
  673. package/dist/v1/config/attachment.js +4 -4
  674. package/dist/v1/config/command.js +5 -5
  675. package/dist/v1/config/config.js +16 -16
  676. package/dist/v1/config/error.js +2 -2
  677. package/dist/v1/config/formatter.js +7 -7
  678. package/dist/v1/config/layout.js +1 -1
  679. package/dist/v1/config/lsp.js +5 -5
  680. package/dist/v1/config/mcp.js +4 -4
  681. package/dist/v1/config/migrate.js +92 -92
  682. package/dist/v1/config/permission.js +3 -3
  683. package/dist/v1/config/plugin.js +1 -1
  684. package/dist/v1/config/provider-options.js +1 -1
  685. package/dist/v1/config/provider.js +4 -4
  686. package/dist/v1/config/server.js +2 -2
  687. package/dist/v1/config/skills.js +3 -3
  688. package/dist/v1/permission.js +1 -1
  689. package/dist/variant.js +91 -91
  690. package/dist/vcs/patch.js +1 -1
  691. package/dist/vcs.js +89 -89
  692. package/dist/websearch.js +80 -80
  693. package/dist/wellknown/plugin.js +76 -76
  694. package/dist/wellknown.js +77 -77
  695. package/dist/workspace/driver.js +7 -7
  696. package/dist/workspace/sql.js +1 -1
  697. package/dist/workspace.js +80 -80
  698. package/dist/worktree/directory.js +2 -2
  699. package/dist/worktree/git.js +10 -10
  700. package/dist/worktree/sql.js +5 -5
  701. package/dist/worktree/strategies.js +89 -89
  702. package/dist/worktree.js +96 -96
  703. package/package.json +8 -8
  704. package/dist/chunks/plugin-0m3kpr1q.js +0 -507
  705. package/dist/chunks/plugin-h090amsa.js +0 -252
  706. package/dist/chunks/plugin-qc068m1q.js +0 -18
  707. package/dist/chunks/plugin-xc1fzwy2.js +0 -26
  708. /package/dist/chunks/{plugin-0qkdqm5v.js → event-logger-0qkdqm5v.js} +0 -0
  709. /package/dist/chunks/{plugin-0zkw76rk.js → event-logger-0zkw76rk.js} +0 -0
  710. /package/dist/chunks/{plugin-17cy0kzp.js → event-logger-17cy0kzp.js} +0 -0
  711. /package/dist/chunks/{plugin-1cnp2v09.js → event-logger-1cnp2v09.js} +0 -0
  712. /package/dist/chunks/{plugin-1kg9ymc8.js → event-logger-1kg9ymc8.js} +0 -0
  713. /package/dist/chunks/{plugin-24dcb14g.js → event-logger-24dcb14g.js} +0 -0
  714. /package/dist/chunks/{plugin-2710q6r3.js → event-logger-2710q6r3.js} +0 -0
  715. /package/dist/chunks/{plugin-2axfhc9x.js → event-logger-2axfhc9x.js} +0 -0
  716. /package/dist/chunks/{plugin-2c3vjs8z.js → event-logger-2c3vjs8z.js} +0 -0
  717. /package/dist/chunks/{plugin-34c7v6d4.js → event-logger-34c7v6d4.js} +0 -0
  718. /package/dist/chunks/{plugin-359p4xyc.js → event-logger-359p4xyc.js} +0 -0
  719. /package/dist/chunks/{plugin-3asan66x.js → event-logger-3asan66x.js} +0 -0
  720. /package/dist/chunks/{plugin-3v8g72cx.js → event-logger-3v8g72cx.js} +0 -0
  721. /package/dist/chunks/{plugin-3w5fmr99.js → event-logger-3w5fmr99.js} +0 -0
  722. /package/dist/chunks/{plugin-3wcehsnq.js → event-logger-3wcehsnq.js} +0 -0
  723. /package/dist/chunks/{plugin-43n2bw4t.js → event-logger-43n2bw4t.js} +0 -0
  724. /package/dist/chunks/{plugin-4knz6hnm.js → event-logger-4knz6hnm.js} +0 -0
  725. /package/dist/chunks/{plugin-4vcrnpx2.js → event-logger-4vcrnpx2.js} +0 -0
  726. /package/dist/chunks/{plugin-4y7fprxs.js → event-logger-4y7fprxs.js} +0 -0
  727. /package/dist/chunks/{plugin-53557ph1.js → event-logger-53557ph1.js} +0 -0
  728. /package/dist/chunks/{plugin-550bvhaj.js → event-logger-550bvhaj.js} +0 -0
  729. /package/dist/chunks/{plugin-5qd3pb7m.js → event-logger-5qd3pb7m.js} +0 -0
  730. /package/dist/chunks/{plugin-6prwharc.js → event-logger-6prwharc.js} +0 -0
  731. /package/dist/chunks/{plugin-7akdwqpd.js → event-logger-7akdwqpd.js} +0 -0
  732. /package/dist/chunks/{plugin-7m9af43g.js → event-logger-7m9af43g.js} +0 -0
  733. /package/dist/chunks/{plugin-822emrt2.js → event-logger-822emrt2.js} +0 -0
  734. /package/dist/chunks/{plugin-88xbtdfr.js → event-logger-88xbtdfr.js} +0 -0
  735. /package/dist/chunks/{plugin-8n3pysct.js → event-logger-8n3pysct.js} +0 -0
  736. /package/dist/chunks/{plugin-8wj87zfr.js → event-logger-8wj87zfr.js} +0 -0
  737. /package/dist/chunks/{plugin-922hggd3.js → event-logger-922hggd3.js} +0 -0
  738. /package/dist/chunks/{plugin-9a4afbnw.js → event-logger-9a4afbnw.js} +0 -0
  739. /package/dist/chunks/{plugin-9rqn6x4v.js → event-logger-9rqn6x4v.js} +0 -0
  740. /package/dist/chunks/{plugin-a6k6eb26.js → event-logger-a6k6eb26.js} +0 -0
  741. /package/dist/chunks/{plugin-af5trqkr.js → event-logger-af5trqkr.js} +0 -0
  742. /package/dist/chunks/{plugin-afrmfg78.js → event-logger-afrmfg78.js} +0 -0
  743. /package/dist/chunks/{plugin-aqzs7mqg.js → event-logger-aqzs7mqg.js} +0 -0
  744. /package/dist/chunks/{plugin-atq7p7m5.js → event-logger-atq7p7m5.js} +0 -0
  745. /package/dist/chunks/{plugin-bkyjaxrp.js → event-logger-bkyjaxrp.js} +0 -0
  746. /package/dist/chunks/{plugin-bmr6ed5q.js → event-logger-bmr6ed5q.js} +0 -0
  747. /package/dist/chunks/{plugin-cf4snx6d.js → event-logger-cf4snx6d.js} +0 -0
  748. /package/dist/chunks/{plugin-cvy3z8tj.js → event-logger-cvy3z8tj.js} +0 -0
  749. /package/dist/chunks/{plugin-d9fn303g.js → event-logger-d9fn303g.js} +0 -0
  750. /package/dist/chunks/{plugin-d9jj8t3e.js → event-logger-d9jj8t3e.js} +0 -0
  751. /package/dist/chunks/{plugin-dajrwvna.js → event-logger-dajrwvna.js} +0 -0
  752. /package/dist/chunks/{plugin-dap0rakb.js → event-logger-dap0rakb.js} +0 -0
  753. /package/dist/chunks/{plugin-df08tz66.js → event-logger-df08tz66.js} +0 -0
  754. /package/dist/chunks/{plugin-dy18nga0.js → event-logger-dy18nga0.js} +0 -0
  755. /package/dist/chunks/{plugin-e5kj55wp.js → event-logger-e5kj55wp.js} +0 -0
  756. /package/dist/chunks/{plugin-e73j6tqm.js → event-logger-e73j6tqm.js} +0 -0
  757. /package/dist/chunks/{plugin-ec1grn59.js → event-logger-ec1grn59.js} +0 -0
  758. /package/dist/chunks/{plugin-eh3zwz77.js → event-logger-eh3zwz77.js} +0 -0
  759. /package/dist/chunks/{plugin-emrn6kk6.js → event-logger-emrn6kk6.js} +0 -0
  760. /package/dist/chunks/{plugin-f0mxakyp.js → event-logger-f0mxakyp.js} +0 -0
  761. /package/dist/chunks/{plugin-f6n9ztr4.js → event-logger-f6n9ztr4.js} +0 -0
  762. /package/dist/chunks/{plugin-faypxj3z.js → event-logger-faypxj3z.js} +0 -0
  763. /package/dist/chunks/{plugin-fd410y7t.js → event-logger-fd410y7t.js} +0 -0
  764. /package/dist/chunks/{plugin-fxgpk5d8.js → event-logger-fxgpk5d8.js} +0 -0
  765. /package/dist/chunks/{plugin-g4wezp1m.js → event-logger-g4wezp1m.js} +0 -0
  766. /package/dist/chunks/{plugin-g86h250q.js → event-logger-g86h250q.js} +0 -0
  767. /package/dist/chunks/{plugin-gebd4c9n.js → event-logger-gebd4c9n.js} +0 -0
  768. /package/dist/chunks/{plugin-gftt206x.js → event-logger-gftt206x.js} +0 -0
  769. /package/dist/chunks/{plugin-hjbc5kem.js → event-logger-hjbc5kem.js} +0 -0
  770. /package/dist/chunks/{plugin-hk9envan.js → event-logger-hk9envan.js} +0 -0
  771. /package/dist/chunks/{plugin-j2ntwpah.js → event-logger-j2ntwpah.js} +0 -0
  772. /package/dist/chunks/{plugin-j5zkgpj8.js → event-logger-j5zkgpj8.js} +0 -0
  773. /package/dist/chunks/{plugin-jjkms2e6.js → event-logger-jjkms2e6.js} +0 -0
  774. /package/dist/chunks/{plugin-jr7sbwjy.js → event-logger-jr7sbwjy.js} +0 -0
  775. /package/dist/chunks/{plugin-jwfs4k6c.js → event-logger-jwfs4k6c.js} +0 -0
  776. /package/dist/chunks/{plugin-jzg6c2d5.js → event-logger-jzg6c2d5.js} +0 -0
  777. /package/dist/chunks/{plugin-mp448xyj.js → event-logger-mp448xyj.js} +0 -0
  778. /package/dist/chunks/{plugin-msx8hqn2.js → event-logger-msx8hqn2.js} +0 -0
  779. /package/dist/chunks/{plugin-n05xt0ee.js → event-logger-n05xt0ee.js} +0 -0
  780. /package/dist/chunks/{plugin-n3j8tn72.js → event-logger-n3j8tn72.js} +0 -0
  781. /package/dist/chunks/{plugin-njntx4h6.js → event-logger-njntx4h6.js} +0 -0
  782. /package/dist/chunks/{plugin-q3sfg36h.js → event-logger-q3sfg36h.js} +0 -0
  783. /package/dist/chunks/{plugin-q74kybfr.js → event-logger-q74kybfr.js} +0 -0
  784. /package/dist/chunks/{plugin-qaymkmh1.js → event-logger-qaymkmh1.js} +0 -0
  785. /package/dist/chunks/{plugin-qb87gjwd.js → event-logger-qb87gjwd.js} +0 -0
  786. /package/dist/chunks/{plugin-qfa1cgps.js → event-logger-qfa1cgps.js} +0 -0
  787. /package/dist/chunks/{plugin-qg3g05ea.js → event-logger-qg3g05ea.js} +0 -0
  788. /package/dist/chunks/{plugin-qrg20bc0.js → event-logger-qrg20bc0.js} +0 -0
  789. /package/dist/chunks/{plugin-rcb2kzg1.js → event-logger-rcb2kzg1.js} +0 -0
  790. /package/dist/chunks/{plugin-sdp7kfr6.js → event-logger-sdp7kfr6.js} +0 -0
  791. /package/dist/chunks/{plugin-sk3qaz4a.js → event-logger-sk3qaz4a.js} +0 -0
  792. /package/dist/chunks/{plugin-ssg3fenm.js → event-logger-ssg3fenm.js} +0 -0
  793. /package/dist/chunks/{plugin-w803qqfp.js → event-logger-w803qqfp.js} +0 -0
  794. /package/dist/chunks/{plugin-wc3fc9cn.js → event-logger-wc3fc9cn.js} +0 -0
  795. /package/dist/chunks/{plugin-wer8tq1h.js → event-logger-wer8tq1h.js} +0 -0
  796. /package/dist/chunks/{plugin-wtztk69x.js → event-logger-wtztk69x.js} +0 -0
  797. /package/dist/chunks/{plugin-x0ckcb58.js → event-logger-x0ckcb58.js} +0 -0
  798. /package/dist/chunks/{plugin-x61499pn.js → event-logger-x61499pn.js} +0 -0
  799. /package/dist/chunks/{plugin-y44na4kk.js → event-logger-y44na4kk.js} +0 -0
  800. /package/dist/chunks/{plugin-y6f0p4jw.js → event-logger-y6f0p4jw.js} +0 -0
  801. /package/dist/chunks/{plugin-y8cydn3q.js → event-logger-y8cydn3q.js} +0 -0
  802. /package/dist/chunks/{plugin-y8f7s663.js → event-logger-y8f7s663.js} +0 -0
  803. /package/dist/chunks/{plugin-ygaqb7jw.js → event-logger-ygaqb7jw.js} +0 -0
  804. /package/dist/chunks/{plugin-ym463w8f.js → event-logger-ym463w8f.js} +0 -0
  805. /package/dist/chunks/{plugin-z9919s4g.js → event-logger-z9919s4g.js} +0 -0
@@ -1,49 +1,41 @@
1
1
  import {
2
- Service83,
3
- node87
4
- } from "./plugin-fjcvtvqr.js";
2
+ Service82,
3
+ node85
4
+ } from "./event-logger-2bx4t2ca.js";
5
5
  import {
6
6
  shutdown2,
7
7
  create3
8
- } from "./plugin-rdw6cm16.js";
8
+ } from "./event-logger-rdw6cm16.js";
9
9
  import {
10
10
  key2
11
- } from "./plugin-dnxkq42g.js";
11
+ } from "./event-logger-mpk0rfs5.js";
12
12
  import {
13
- ID14,
14
- Service77,
15
- node81,
13
+ ID13,
14
+ Service75,
15
+ node78,
16
16
  Event18
17
- } from "./plugin-fn0g176e.js";
17
+ } from "./event-logger-hnnwg8mk.js";
18
18
  import {
19
- Service80,
20
- node84
21
- } from "./plugin-hbepx7tp.js";
19
+ Service79,
20
+ node82
21
+ } from "./event-logger-jtjn351v.js";
22
22
  import {
23
23
  __export
24
- } from "./plugin-9rqn6x4v.js";
25
-
26
- // src/aisdk-native.ts
27
- var exports_aisdk_native = {};
28
- __export(exports_aisdk_native, {
29
- AISDKNative: () => exports_aisdk_native,
30
- native: () => native2,
31
- rewrite: () => rewrite2
32
- });
33
- import { Effect as Effect2, Option, Schema as Schema2, Struct as Struct2 } from "effect";
24
+ } from "./event-logger-9rqn6x4v.js";
34
25
 
35
26
  // src/provider.ts
36
27
  var exports_provider3 = {};
37
28
  __export(exports_provider3, {
38
29
  AISDK_PREFIX: () => AISDK_PREFIX2,
39
30
  Compaction: () => Compaction3,
31
+ DEFAULT_TIMEOUT_MS: () => DEFAULT_TIMEOUT_MS3,
40
32
  Event: () => Event17,
41
- ID: () => ID13,
42
- Info: () => Info27,
33
+ ID: () => ID12,
34
+ Info: () => Info26,
43
35
  LoadError: () => LoadError3,
44
36
  Provider: () => exports_provider3,
45
37
  Request: () => Request3,
46
- Service: () => Service76,
38
+ Service: () => Service74,
47
39
  Settings: () => Settings2,
48
40
  Transport: () => Transport2,
49
41
  aisdk: () => aisdk2,
@@ -53,19 +45,279 @@ __export(exports_provider3, {
53
45
  mergeOverlay: () => mergeOverlay2,
54
46
  modelSettings: () => modelSettings2,
55
47
  nativeSettings: () => nativeSettings2,
56
- node: () => node80,
57
- packageName: () => packageName2
48
+ node: () => node77,
49
+ packageName: () => packageName2,
50
+ timeout: () => timeout2,
51
+ timeouts: () => timeouts2
58
52
  });
59
- import { Context, Effect, Layer, Schema, Stream, Struct } from "effect";
53
+ import { Context, Effect as Effect2, Layer, Option as Option2, Schema as Schema2, Stream, Struct as Struct2 } from "effect";
60
54
  import { Provider } from "@opencode/schema/provider";
61
55
  import { Model } from "@opencode/schema/model";
62
56
  import { makeLocationNode } from "@opencode/util/effect/app-node";
57
+ import { HttpTimeout } from "@opencode/ai";
63
58
  import { isRecord } from "@opencode/ai/utils/record";
64
59
  import { importModule, resolveModule } from "@opencode/util/runtime-import";
65
60
  import { Credential } from "@opencode/schema/credential";
66
61
  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/deepinfra": "@opencode/ai/providers/deepinfra",
107
+ "@ai-sdk/google": "@opencode/ai/providers/google",
108
+ "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
109
+ "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
110
+ "@ai-sdk/groq": "@opencode/ai/providers/groq",
111
+ "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
112
+ "@ai-sdk/openai": "@opencode/ai/providers/openai",
113
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
114
+ "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
115
+ "@ai-sdk/xai": "@opencode/ai/providers/xai",
116
+ "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
117
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
118
+ };
119
+ var protocols = (name) => ({
120
+ "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
121
+ "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
122
+ "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
123
+ });
124
+ var HOSTS = {
125
+ alibaba: protocols("alibaba"),
126
+ "alibaba-cn": protocols("alibaba"),
127
+ "alibaba-coding-plan": protocols("alibaba"),
128
+ "alibaba-coding-plan-cn": protocols("alibaba"),
129
+ "alibaba-token-plan": protocols("alibaba"),
130
+ "alibaba-token-plan-cn": protocols("alibaba"),
131
+ baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
132
+ "cloudflare-ai-gateway": {
133
+ "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
134
+ "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
135
+ "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
136
+ "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
137
+ },
138
+ "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
139
+ deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
140
+ digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
141
+ "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
142
+ "google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
143
+ "kimi-for-coding": protocols("moonshot"),
144
+ meta: protocols("meta"),
145
+ minimax: protocols("minimax"),
146
+ "minimax-cn": protocols("minimax"),
147
+ "minimax-coding-plan": protocols("minimax"),
148
+ "minimax-cn-coding-plan": protocols("minimax"),
149
+ moonshotai: protocols("moonshot"),
150
+ "moonshotai-cn": protocols("moonshot"),
151
+ zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
152
+ "zai-coding-plan": protocols("zai-coding-plan"),
153
+ zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
154
+ "zhipuai-coding-plan": protocols("zai-coding-plan")
155
+ };
156
+ var NATIVE = new Set([
157
+ ...Object.values(PACKAGES),
158
+ ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
159
+ "@opencode/ai/providers/azure/chat",
160
+ "@opencode/ai/providers/amazon-bedrock/mantle",
161
+ "@opencode/ai/providers/amazon-bedrock/mantle/chat",
162
+ "@opencode/ai/providers/amazon-bedrock/mantle/responses"
163
+ ]);
164
+ function native2(npm, context) {
165
+ const host = HOSTS[context.providerID]?.[npm];
166
+ if (host)
167
+ return host;
168
+ if (npm === "@ai-sdk/amazon-bedrock/mantle")
169
+ return mantle(context.modelID);
170
+ if (npm === "@ai-sdk/azure" && context.settings?.useCompletionUrls === true)
171
+ return "@opencode/ai/providers/azure/chat";
172
+ return PACKAGES[npm];
173
+ }
174
+ var mantle = (modelID) => {
175
+ if (modelID === undefined)
176
+ return "@opencode/ai/providers/amazon-bedrock/mantle";
177
+ return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
178
+ };
179
+ function resolve(specifier, context) {
180
+ const npm = packageName2(specifier);
181
+ if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
182
+ return native2(npm, context);
183
+ if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
184
+ return mantle(context.modelID);
185
+ if (npm === "@opencode/ai/providers/azure/responses" && context.settings?.useCompletionUrls === true)
186
+ return "@opencode/ai/providers/azure/chat";
187
+ return NATIVE.has(npm) ? npm : undefined;
188
+ }
189
+ function options(replacement, modelID, settings) {
190
+ const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
191
+ const kept = Struct.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
192
+ const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
193
+ return {
194
+ settings: {
195
+ ...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
196
+ ...thinking === undefined ? {} : { thinking }
197
+ },
198
+ ...settings.headers === undefined ? {} : { headers: settings.headers },
199
+ ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
200
+ ...converse ? bedrockRequest(modelID, settings) : {},
201
+ ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
202
+ };
203
+ }
204
+ var BEDROCK_KEYS = [
205
+ "bearerToken",
206
+ "endpoint",
207
+ "credentials",
208
+ "credentialProvider",
209
+ "accessKeyId",
210
+ "secretAccessKey",
211
+ "sessionToken"
212
+ ];
213
+ var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
214
+ function bedrockSettings(settings, converse) {
215
+ const region = settings.region ?? settings.credentials?.region;
216
+ const credentials = settings.credentials ?? settings;
217
+ const baseURL = settings.baseURL ?? settings.endpoint;
218
+ return {
219
+ ...Struct.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
220
+ ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
221
+ ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
222
+ ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
223
+ credentials: {
224
+ ...region === undefined ? {} : { region },
225
+ accessKeyId: credentials.accessKeyId,
226
+ secretAccessKey: credentials.secretAccessKey,
227
+ ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
228
+ }
229
+ }
230
+ };
231
+ }
232
+ function bedrockThinking(modelID, settings) {
233
+ const reasoning = settings.reasoningConfig;
234
+ if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
235
+ return;
236
+ return { type: "enabled", budgetTokens: reasoning.budgetTokens };
237
+ }
238
+ function bedrockRequest(modelID, settings) {
239
+ const additional = settings.additionalModelRequestFields ?? {};
240
+ const reasoning = settings.reasoningConfig;
241
+ const anthropic = modelID?.includes("anthropic") ?? false;
242
+ const openai = modelID?.includes("openai.") ?? false;
243
+ const harmony = modelID?.includes("openai.gpt-oss") ?? false;
244
+ const effort = reasoning?.maxReasoningEffort;
245
+ const type = reasoning?.type;
246
+ const budget = reasoning?.budgetTokens;
247
+ const display = reasoning?.display;
248
+ const betas = settings.anthropicBeta ?? [];
249
+ const fields = mergeOverlay2(additional, {
250
+ ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
251
+ ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
252
+ ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
253
+ ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
254
+ ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
255
+ ...!anthropic && !openai && effort !== undefined ? {
256
+ reasoningConfig: {
257
+ ...type === undefined || type === "adaptive" ? {} : { type },
258
+ ...budget === undefined ? {} : { budgetTokens: budget },
259
+ maxReasoningEffort: effort
260
+ }
261
+ } : {}
262
+ });
263
+ const body = {
264
+ ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
265
+ ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
266
+ };
267
+ return Object.keys(body).length === 0 ? {} : { body };
268
+ }
269
+ var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
270
+ function openRouterRequest(settings) {
271
+ const headers = mergeHeaders2({
272
+ ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
273
+ ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
274
+ ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
275
+ }, settings.headers) ?? {};
276
+ return Object.keys(headers).length === 0 ? {} : { headers };
277
+ }
278
+ var lenient = (schema) => Schema.optional(Schema.UndefinedOr(schema).pipe(Schema.catchDecoding(() => Effect.succeed(Option.some(undefined)))));
279
+ var Credentials = Schema.Struct({
280
+ accessKeyId: Schema.String,
281
+ secretAccessKey: Schema.String,
282
+ sessionToken: lenient(Schema.String),
283
+ region: lenient(Schema.String)
284
+ });
285
+ var Legacy = Schema.StructWithRest(Schema.Struct({
286
+ apiKey: lenient(Schema.String),
287
+ baseURL: lenient(Schema.String),
288
+ headers: lenient(Schema.Record(Schema.String, Schema.String)),
289
+ extraBody: lenient(Schema.Record(Schema.String, Schema.Unknown)),
290
+ useCompletionUrls: lenient(Schema.Boolean),
291
+ auth: lenient(Schema.Literals(["bearer", "sigv4"])),
292
+ bearerToken: lenient(Schema.String),
293
+ endpoint: lenient(Schema.String),
294
+ region: lenient(Schema.String),
295
+ credentials: lenient(Credentials),
296
+ accessKeyId: lenient(Schema.String),
297
+ secretAccessKey: lenient(Schema.String),
298
+ sessionToken: lenient(Schema.String),
299
+ anthropicBeta: lenient(Schema.Array(Schema.String)),
300
+ serviceTier: lenient(Schema.String),
301
+ reasoningConfig: lenient(Schema.Struct({
302
+ type: lenient(Schema.String),
303
+ display: lenient(Schema.String),
304
+ maxReasoningEffort: lenient(Schema.String),
305
+ budgetTokens: lenient(Schema.Number)
306
+ })),
307
+ additionalModelRequestFields: lenient(Schema.StructWithRest(Schema.Struct({
308
+ anthropic_beta: lenient(Schema.Array(Schema.String)),
309
+ output_config: lenient(Schema.Record(Schema.String, Schema.Unknown)),
310
+ reasoning: lenient(Schema.Record(Schema.String, Schema.Unknown))
311
+ }), [Schema.Record(Schema.String, Schema.Unknown)])),
312
+ appName: lenient(Schema.String),
313
+ appUrl: lenient(Schema.String),
314
+ api_keys: lenient(Schema.Record(Schema.String, Schema.String))
315
+ }), [Schema.Record(Schema.String, Schema.Unknown)]);
316
+ var decode = Schema.decodeUnknownSync(Legacy);
317
+
318
+ // src/provider.ts
67
319
  import { Event as Event17 } from "@opencode/schema/provider";
68
- var ID13 = Provider.ID;
320
+ var ID12 = Provider.ID;
69
321
  var AISDK_PREFIX2 = "aisdk:";
70
322
  var isAISDK2 = (value) => value?.startsWith(AISDK_PREFIX2) ?? false;
71
323
  var aisdk2 = (value) => isAISDK2(value) ? value : `${AISDK_PREFIX2}${value}`;
@@ -76,12 +328,12 @@ function packageName2(value) {
76
328
  return value;
77
329
  return value.slice(AISDK_PREFIX2.length);
78
330
  }
79
- var JsonRecord = Schema.Record(Schema.String, Schema.Json);
80
- var decodeJsonRecord = Schema.decodeUnknownSync(JsonRecord);
331
+ var JsonRecord = Schema2.Record(Schema2.String, Schema2.Json);
332
+ var decodeJsonRecord = Schema2.decodeUnknownSync(JsonRecord);
81
333
 
82
- class LoadError3 extends Schema.TaggedError()("Provider.LoadError", {
83
- package: Schema.String,
84
- cause: Schema.Defect()
334
+ class LoadError3 extends Schema2.TaggedError()("Provider.LoadError", {
335
+ package: Schema2.String,
336
+ cause: Schema2.Defect()
85
337
  }) {
86
338
  }
87
339
  var packages = new Map;
@@ -143,12 +395,12 @@ var builtins = new Map([
143
395
  () => import("@opencode/ai/providers/zai-coding-plan/responses")
144
396
  ]
145
397
  ]);
146
- var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
398
+ var loadPackage2 = Effect2.fn("Provider.loadPackage")(function* (input, npm) {
147
399
  const specifier = packageName2(input);
148
400
  const builtin = builtins.get(specifier);
149
401
  if (builtin)
150
402
  return yield* importPackage(specifier, specifier, builtin);
151
- const resolved = yield* Effect.sync(() => {
403
+ const resolved = yield* Effect2.sync(() => {
152
404
  if (specifier.startsWith("file://") || specifier.startsWith("@opencode/ai/"))
153
405
  return specifier;
154
406
  try {
@@ -167,20 +419,32 @@ var loadPackage2 = Effect.fn("Provider.loadPackage")(function* (input, npm) {
167
419
  }
168
420
  const parts = specifier.split("/");
169
421
  const root = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0] ?? specifier;
170
- const installed = yield* npm.add(root).pipe(Effect.mapError((cause) => new LoadError3({ package: specifier, cause })));
171
- const entrypoint = yield* Effect.try({
422
+ const installed = yield* npm.add(root).pipe(Effect2.mapError((cause) => new LoadError3({ package: specifier, cause })));
423
+ const entrypoint = yield* Effect2.try({
172
424
  try: () => resolveModule(specifier, installed.directory),
173
425
  catch: (cause) => new LoadError3({ package: specifier, cause })
174
426
  });
175
427
  return yield* importPackage(specifier, entrypoint);
176
428
  });
177
- var CORE_KEYS = ["chunkTimeout", "compaction", "fetch", "timeout", "transport"];
178
- var PROVIDER_ONLY_KEYS = ["chunkTimeout", "timeout", "transport"];
429
+ var CORE_KEYS = ["chunkTimeout", "compaction", "fetch", "headerTimeout", "timeout", "transport"];
430
+ var PROVIDER_ONLY_KEYS = ["chunkTimeout", "headerTimeout", "timeout", "transport"];
179
431
  function nativeSettings2(settings) {
180
- return Struct.omit(settings, CORE_KEYS);
432
+ return Struct2.omit(settings, CORE_KEYS);
181
433
  }
182
434
  function modelSettings2(settings) {
183
- return settings && Struct.omit(settings, PROVIDER_ONLY_KEYS);
435
+ return settings && Struct2.omit(settings, PROVIDER_ONLY_KEYS);
436
+ }
437
+ var decodeTimeout = Schema2.decodeUnknownOption(HttpTimeout);
438
+ var DEFAULT_TIMEOUT_MS3 = 300000;
439
+ function timeout2(value) {
440
+ return Option2.getOrUndefined(decodeTimeout(value));
441
+ }
442
+ function timeouts2(settings) {
443
+ return {
444
+ timeout: timeout2(settings.timeout),
445
+ headerTimeout: timeout2(settings.headerTimeout) ?? DEFAULT_TIMEOUT_MS3,
446
+ chunkTimeout: timeout2(settings.chunkTimeout) ?? DEFAULT_TIMEOUT_MS3
447
+ };
184
448
  }
185
449
  function mergeOverlay2(base, overlay) {
186
450
  if (base === undefined)
@@ -211,9 +475,9 @@ var Request3 = Provider.Request;
211
475
  var Compaction3 = Provider.Compaction;
212
476
  var Transport2 = Provider.Transport;
213
477
  var Settings2 = Provider.Settings;
214
- var Info27 = Provider.Info;
478
+ var Info26 = Provider.Info;
215
479
 
216
- class Service76 extends Context.Service()("@opencode/Provider") {
480
+ class Service74 extends Context.Service()("@opencode/Provider") {
217
481
  }
218
482
  var definitions = new WeakMap;
219
483
  function index(providerID, models) {
@@ -226,10 +490,10 @@ function index(providerID, models) {
226
490
  definitions.set(models, indexes);
227
491
  return result;
228
492
  }
229
- var layer = Layer.effect(Service76, Effect.gen(function* () {
230
- const bus = yield* Service83;
231
- const integrations = yield* Service77;
232
- const location = yield* Service80;
493
+ var layer = Layer.effect(Service74, Effect2.gen(function* () {
494
+ const bus = yield* Service82;
495
+ const integrations = yield* Service75;
496
+ const location = yield* Service79;
233
497
  const state = create3({
234
498
  name: "provider",
235
499
  initial: () => new Map,
@@ -240,7 +504,7 @@ var layer = Layer.effect(Service76, Effect.gen(function* () {
240
504
  const current = records.get(id);
241
505
  if (current)
242
506
  return current;
243
- const added = { provider: Info27.empty(id), models: new Map };
507
+ const added = { provider: Info26.empty(id), models: new Map };
244
508
  records.set(id, added);
245
509
  maps.add(added.models);
246
510
  return added;
@@ -308,9 +572,9 @@ var layer = Layer.effect(Service76, Effect.gen(function* () {
308
572
  },
309
573
  notify: () => notify
310
574
  });
311
- yield* Effect.addFinalizer(() => shutdown2(state.reload()));
575
+ yield* Effect2.addFinalizer(() => shutdown2(state.reload()));
312
576
  let cached;
313
- const snapshot = Effect.fn("Provider.snapshot")(function* () {
577
+ const snapshot = Effect2.fn("Provider.snapshot")(function* () {
314
578
  while (true) {
315
579
  const revision = integrations.revision();
316
580
  const records = state.get();
@@ -321,7 +585,7 @@ var layer = Layer.effect(Service76, Effect.gen(function* () {
321
585
  const available = Array.from(records.values()).filter((record) => {
322
586
  if (record.provider.activation === "disabled")
323
587
  return false;
324
- const integration = byID.get(record.provider.integrationID ?? ID14.make(record.provider.id));
588
+ const integration = byID.get(record.provider.integrationID ?? ID13.make(record.provider.id));
325
589
  if (record.sourceConnection && key2(record.sourceConnection) !== key2(integration?.connections[0]))
326
590
  return false;
327
591
  if (record.provider.activation === "enabled")
@@ -338,7 +602,7 @@ var layer = Layer.effect(Service76, Effect.gen(function* () {
338
602
  }
339
603
  });
340
604
  let published;
341
- const notify = Effect.gen(function* () {
605
+ const notify = Effect2.gen(function* () {
342
606
  const value = yield* snapshot();
343
607
  if (value === published)
344
608
  return;
@@ -347,19 +611,19 @@ var layer = Layer.effect(Service76, Effect.gen(function* () {
347
611
  location: { directory: location.directory, workspaceID: location.workspaceID }
348
612
  });
349
613
  });
350
- yield* bus.subscribe([Event18.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect.forkScoped({ startImmediately: true }));
351
- return Service76.of({
614
+ yield* bus.subscribe([Event18.Updated, Credential.Event.Updated, Credential.Event.Switched]).pipe(Stream.runForEach(() => notify), Effect2.forkScoped({ startImmediately: true }));
615
+ return Service74.of({
352
616
  transform: state.transform,
353
617
  reload: state.reload,
354
- get: Effect.fn("Provider.get")((id) => Effect.sync(() => freeze(state.get().get(id)?.provider, true))),
355
- all: Effect.fn("Provider.all")(() => Effect.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
356
- available: Effect.fn("Provider.available")(() => snapshot().pipe(Effect.map((value) => value.providers))),
618
+ get: Effect2.fn("Provider.get")((id) => Effect2.sync(() => freeze(state.get().get(id)?.provider, true))),
619
+ all: Effect2.fn("Provider.all")(() => Effect2.sync(() => Array.from(state.get().values(), (record) => freeze(record.provider, true)))),
620
+ available: Effect2.fn("Provider.available")(() => snapshot().pipe(Effect2.map((value) => value.providers))),
357
621
  snapshot
358
622
  });
359
623
  }));
360
- var node80 = makeLocationNode({ service: Service76, layer, deps: [node87, node81, node84] });
361
- var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
362
- const module = yield* Effect.tryPromise({
624
+ var node77 = makeLocationNode({ service: Service74, layer, deps: [node85, node78, node82] });
625
+ var importPackage = Effect2.fn("Provider.importPackage")(function* (specifier, entrypoint, load = () => importModule(entrypoint)) {
626
+ const module = yield* Effect2.tryPromise({
363
627
  try: () => {
364
628
  const existing = packages.get(entrypoint);
365
629
  if (existing)
@@ -379,252 +643,4 @@ var importPackage = Effect.fn("Provider.importPackage")(function* (specifier, en
379
643
  return module;
380
644
  });
381
645
 
382
- // src/aisdk-native.ts
383
- function rewrite2(target, input) {
384
- if (input.specifier === undefined)
385
- return;
386
- const plain = resolve(input.specifier, input);
387
- if (!plain)
388
- return;
389
- const settings = decode(target.settings ?? {});
390
- const replacement = resolve(input.specifier, { ...input, settings }) ?? plain;
391
- const translated = options(replacement, input.modelID, settings);
392
- if (target.package !== undefined || replacement !== input.specifier)
393
- target.package = replacement;
394
- target.settings = target.settings === undefined ? undefined : {
395
- ...translated.settings,
396
- ...!NATIVE.has(input.specifier) && replacement === "@opencode/ai/providers/openai-compatible" ? { provider: input.canonical ?? input.providerID } : {}
397
- };
398
- target.headers = mergeHeaders2(translated.headers, target.headers);
399
- target.body = mergeOverlay2(translated.body, target.body);
400
- target.variants = target.variants?.map((variant) => {
401
- const overlay = options(replacement, input.modelID, decode(variant.settings ?? {}));
402
- const headers = mergeHeaders2(overlay.headers, variant.headers);
403
- const body = mergeOverlay2(overlay.body, variant.body);
404
- return {
405
- id: variant.id,
406
- ...variant.settings === undefined ? {} : { settings: overlay.settings },
407
- ...headers === undefined ? {} : { headers },
408
- ...body === undefined ? {} : { body }
409
- };
410
- });
411
- }
412
- var PACKAGES = {
413
- "@ai-sdk/amazon-bedrock": "@opencode/ai/providers/amazon-bedrock",
414
- "@ai-sdk/alibaba": "@opencode/ai/providers/alibaba/chat",
415
- "@ai-sdk/anthropic": "@opencode/ai/providers/anthropic",
416
- "@ai-sdk/azure": "@opencode/ai/providers/azure/responses",
417
- "@ai-sdk/cerebras": "@opencode/ai/providers/cerebras",
418
- "@ai-sdk/deepinfra": "@opencode/ai/providers/deepinfra",
419
- "@ai-sdk/google": "@opencode/ai/providers/google",
420
- "@ai-sdk/google-vertex": "@opencode/ai/providers/google-vertex",
421
- "@ai-sdk/google-vertex/anthropic": "@opencode/ai/providers/google-vertex/messages",
422
- "@ai-sdk/groq": "@opencode/ai/providers/groq",
423
- "@ai-sdk/mistral": "@opencode/ai/providers/mistral",
424
- "@ai-sdk/openai": "@opencode/ai/providers/openai",
425
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/openai-compatible",
426
- "@ai-sdk/togetherai": "@opencode/ai/providers/togetherai",
427
- "@ai-sdk/xai": "@opencode/ai/providers/xai",
428
- "@openrouter/ai-sdk-provider": "@opencode/ai/providers/openrouter",
429
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
430
- };
431
- var protocols = (name) => ({
432
- "@ai-sdk/openai-compatible": `@opencode/ai/providers/${name}/chat`,
433
- "@ai-sdk/anthropic": `@opencode/ai/providers/${name}/messages`,
434
- "@ai-sdk/openai": `@opencode/ai/providers/${name}/responses`
435
- });
436
- var HOSTS = {
437
- alibaba: protocols("alibaba"),
438
- "alibaba-cn": protocols("alibaba"),
439
- "alibaba-coding-plan": protocols("alibaba"),
440
- "alibaba-coding-plan-cn": protocols("alibaba"),
441
- "alibaba-token-plan": protocols("alibaba"),
442
- "alibaba-token-plan-cn": protocols("alibaba"),
443
- baseten: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/baseten" },
444
- "cloudflare-ai-gateway": {
445
- "@ai-sdk/anthropic": "@opencode/ai/providers/cloudflare-ai-gateway",
446
- "@ai-sdk/openai": "@opencode/ai/providers/cloudflare-ai-gateway",
447
- "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-ai-gateway",
448
- "ai-gateway-provider": "@opencode/ai/providers/cloudflare-ai-gateway"
449
- },
450
- "cloudflare-workers-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/cloudflare-workers-ai" },
451
- deepseek: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/deepseek" },
452
- digitalocean: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/digitalocean" },
453
- "fireworks-ai": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/fireworks" },
454
- "google-vertex": { "@ai-sdk/openai-compatible": "@opencode/ai/providers/google-vertex/chat" },
455
- "kimi-for-coding": protocols("moonshot"),
456
- meta: protocols("meta"),
457
- minimax: protocols("minimax"),
458
- "minimax-cn": protocols("minimax"),
459
- "minimax-coding-plan": protocols("minimax"),
460
- "minimax-cn-coding-plan": protocols("minimax"),
461
- moonshotai: protocols("moonshot"),
462
- "moonshotai-cn": protocols("moonshot"),
463
- zai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
464
- "zai-coding-plan": protocols("zai-coding-plan"),
465
- zhipuai: { "@ai-sdk/openai-compatible": "@opencode/ai/providers/zai/chat" },
466
- "zhipuai-coding-plan": protocols("zai-coding-plan")
467
- };
468
- var NATIVE = new Set([
469
- ...Object.values(PACKAGES),
470
- ...Object.values(HOSTS).flatMap((host) => Object.values(host)),
471
- "@opencode/ai/providers/azure/chat",
472
- "@opencode/ai/providers/amazon-bedrock/mantle",
473
- "@opencode/ai/providers/amazon-bedrock/mantle/chat",
474
- "@opencode/ai/providers/amazon-bedrock/mantle/responses"
475
- ]);
476
- function native2(npm, context) {
477
- const host = HOSTS[context.providerID]?.[npm];
478
- if (host)
479
- return host;
480
- if (npm === "@ai-sdk/amazon-bedrock/mantle")
481
- return mantle(context.modelID);
482
- if (npm === "@ai-sdk/azure" && context.settings?.useCompletionUrls === true)
483
- return "@opencode/ai/providers/azure/chat";
484
- return PACKAGES[npm];
485
- }
486
- var mantle = (modelID) => {
487
- if (modelID === undefined)
488
- return "@opencode/ai/providers/amazon-bedrock/mantle";
489
- return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`;
490
- };
491
- function resolve(specifier, context) {
492
- const npm = packageName2(specifier);
493
- if (isAISDK2(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
494
- return native2(npm, context);
495
- if (npm === "@opencode/ai/providers/amazon-bedrock/mantle")
496
- return mantle(context.modelID);
497
- if (npm === "@opencode/ai/providers/azure/responses" && context.settings?.useCompletionUrls === true)
498
- return "@opencode/ai/providers/azure/chat";
499
- return NATIVE.has(npm) ? npm : undefined;
500
- }
501
- function options(replacement, modelID, settings) {
502
- const converse = replacement === "@opencode/ai/providers/amazon-bedrock" && modelID !== undefined;
503
- const kept = Struct2.omit(settings, ["headers", "extraBody", "useCompletionUrls", ...OPENROUTER_KEYS]);
504
- const thinking = converse ? bedrockThinking(modelID, settings) : undefined;
505
- return {
506
- settings: {
507
- ...replacement.startsWith("@opencode/ai/providers/amazon-bedrock") ? bedrockSettings(kept, converse) : kept,
508
- ...thinking === undefined ? {} : { thinking }
509
- },
510
- ...settings.headers === undefined ? {} : { headers: settings.headers },
511
- ...settings.extraBody === undefined ? {} : { body: settings.extraBody },
512
- ...converse ? bedrockRequest(modelID, settings) : {},
513
- ...replacement === "@opencode/ai/providers/openrouter" ? openRouterRequest(settings) : {}
514
- };
515
- }
516
- var BEDROCK_KEYS = [
517
- "bearerToken",
518
- "endpoint",
519
- "credentials",
520
- "credentialProvider",
521
- "accessKeyId",
522
- "secretAccessKey",
523
- "sessionToken"
524
- ];
525
- var CONVERSE_KEYS = ["additionalModelRequestFields", "reasoningConfig", "anthropicBeta", "serviceTier"];
526
- function bedrockSettings(settings, converse) {
527
- const region = settings.region ?? settings.credentials?.region;
528
- const credentials = settings.credentials ?? settings;
529
- const baseURL = settings.baseURL ?? settings.endpoint;
530
- return {
531
- ...Struct2.omit(settings, converse ? [...BEDROCK_KEYS, ...CONVERSE_KEYS] : BEDROCK_KEYS),
532
- ...baseURL === undefined ? {} : { baseURL: region === undefined ? baseURL : baseURL.replaceAll("${AWS_REGION}", region) },
533
- ...settings.apiKey === undefined && settings.bearerToken !== undefined ? { apiKey: settings.bearerToken } : {},
534
- ...credentials.accessKeyId === undefined || credentials.secretAccessKey === undefined ? {} : {
535
- credentials: {
536
- ...region === undefined ? {} : { region },
537
- accessKeyId: credentials.accessKeyId,
538
- secretAccessKey: credentials.secretAccessKey,
539
- ...credentials.sessionToken === undefined ? {} : { sessionToken: credentials.sessionToken }
540
- }
541
- }
542
- };
543
- }
544
- function bedrockThinking(modelID, settings) {
545
- const reasoning = settings.reasoningConfig;
546
- if (!modelID?.includes("anthropic") || reasoning?.type !== "enabled" || reasoning.budgetTokens === undefined)
547
- return;
548
- return { type: "enabled", budgetTokens: reasoning.budgetTokens };
549
- }
550
- function bedrockRequest(modelID, settings) {
551
- const additional = settings.additionalModelRequestFields ?? {};
552
- const reasoning = settings.reasoningConfig;
553
- const anthropic = modelID?.includes("anthropic") ?? false;
554
- const openai = modelID?.includes("openai.") ?? false;
555
- const harmony = modelID?.includes("openai.gpt-oss") ?? false;
556
- const effort = reasoning?.maxReasoningEffort;
557
- const type = reasoning?.type;
558
- const budget = reasoning?.budgetTokens;
559
- const display = reasoning?.display;
560
- const betas = settings.anthropicBeta ?? [];
561
- const fields = mergeOverlay2(additional, {
562
- ...betas.length > 0 ? { anthropic_beta: [...additional.anthropic_beta ?? [], ...betas] } : {},
563
- ...anthropic && type === "adaptive" ? { thinking: { type: "adaptive", ...display === undefined ? {} : { display } } } : {},
564
- ...anthropic && effort !== undefined ? { output_config: { ...additional.output_config, effort } } : {},
565
- ...!anthropic && openai && harmony && effort !== undefined ? { reasoning_effort: effort } : {},
566
- ...!anthropic && openai && !harmony && effort !== undefined ? { reasoning: { ...additional.reasoning, effort } } : {},
567
- ...!anthropic && !openai && effort !== undefined ? {
568
- reasoningConfig: {
569
- ...type === undefined || type === "adaptive" ? {} : { type },
570
- ...budget === undefined ? {} : { budgetTokens: budget },
571
- maxReasoningEffort: effort
572
- }
573
- } : {}
574
- });
575
- const body = {
576
- ...fields && Object.keys(fields).length > 0 ? { additionalModelRequestFields: fields } : {},
577
- ...settings.serviceTier === undefined ? {} : { serviceTier: { type: settings.serviceTier } }
578
- };
579
- return Object.keys(body).length === 0 ? {} : { body };
580
- }
581
- var OPENROUTER_KEYS = ["appName", "appUrl", "api_keys", "compatibility"];
582
- function openRouterRequest(settings) {
583
- const headers = mergeHeaders2({
584
- ...settings.appName === undefined ? {} : { "X-OpenRouter-Title": settings.appName },
585
- ...settings.appUrl === undefined ? {} : { "HTTP-Referer": settings.appUrl },
586
- ...settings.api_keys === undefined || Object.keys(settings.api_keys).length === 0 ? {} : { "X-Provider-API-Keys": JSON.stringify(settings.api_keys) }
587
- }, settings.headers) ?? {};
588
- return Object.keys(headers).length === 0 ? {} : { headers };
589
- }
590
- var lenient = (schema) => Schema2.optional(Schema2.UndefinedOr(schema).pipe(Schema2.catchDecoding(() => Effect2.succeed(Option.some(undefined)))));
591
- var Credentials = Schema2.Struct({
592
- accessKeyId: Schema2.String,
593
- secretAccessKey: Schema2.String,
594
- sessionToken: lenient(Schema2.String),
595
- region: lenient(Schema2.String)
596
- });
597
- var Legacy = Schema2.StructWithRest(Schema2.Struct({
598
- apiKey: lenient(Schema2.String),
599
- baseURL: lenient(Schema2.String),
600
- headers: lenient(Schema2.Record(Schema2.String, Schema2.String)),
601
- extraBody: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
602
- useCompletionUrls: lenient(Schema2.Boolean),
603
- auth: lenient(Schema2.Literals(["bearer", "sigv4"])),
604
- bearerToken: lenient(Schema2.String),
605
- endpoint: lenient(Schema2.String),
606
- region: lenient(Schema2.String),
607
- credentials: lenient(Credentials),
608
- accessKeyId: lenient(Schema2.String),
609
- secretAccessKey: lenient(Schema2.String),
610
- sessionToken: lenient(Schema2.String),
611
- anthropicBeta: lenient(Schema2.Array(Schema2.String)),
612
- serviceTier: lenient(Schema2.String),
613
- reasoningConfig: lenient(Schema2.Struct({
614
- type: lenient(Schema2.String),
615
- display: lenient(Schema2.String),
616
- maxReasoningEffort: lenient(Schema2.String),
617
- budgetTokens: lenient(Schema2.Number)
618
- })),
619
- additionalModelRequestFields: lenient(Schema2.StructWithRest(Schema2.Struct({
620
- anthropic_beta: lenient(Schema2.Array(Schema2.String)),
621
- output_config: lenient(Schema2.Record(Schema2.String, Schema2.Unknown)),
622
- reasoning: lenient(Schema2.Record(Schema2.String, Schema2.Unknown))
623
- }), [Schema2.Record(Schema2.String, Schema2.Unknown)])),
624
- appName: lenient(Schema2.String),
625
- appUrl: lenient(Schema2.String),
626
- api_keys: lenient(Schema2.Record(Schema2.String, Schema2.String))
627
- }), [Schema2.Record(Schema2.String, Schema2.Unknown)]);
628
- var decode = Schema2.decodeUnknownSync(Legacy);
629
-
630
- export { rewrite2, native2, exports_aisdk_native, ID13, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info27, Service76, node80, exports_provider3, Event17 };
646
+ export { ID12, AISDK_PREFIX2, isAISDK2, aisdk2, packageName2, LoadError3, loadPackage2, nativeSettings2, modelSettings2, DEFAULT_TIMEOUT_MS3, timeout2, timeouts2, mergeOverlay2, mergeHeaders2, Request3, Compaction3, Transport2, Settings2, Info26, Service74, node77, exports_provider3, Event17, rewrite2, native2, exports_aisdk_native };