@opencode/core 2.1.4 → 2.2.0

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 (924) hide show
  1. package/dist/account/sql.js +1 -1
  2. package/dist/agent.js +89 -85
  3. package/dist/aisdk-native.js +97 -91
  4. package/dist/aisdk.js +103 -97
  5. package/dist/app.js +7 -7
  6. package/dist/bus.js +79 -75
  7. package/dist/chunks/{location-xyswfhq2.js → tool-012mq190.js} +33 -33
  8. package/dist/chunks/{location-80cqk4v7.js → tool-02nh8ewm.js} +18 -14
  9. package/dist/chunks/{location-034tev2y.js → tool-034tev2y.js} +2 -2
  10. package/dist/chunks/{location-9b28cy4d.js → tool-09bv4atg.js} +13 -7
  11. package/dist/chunks/{location-jdcya02q.js → tool-0a2sm9cp.js} +18 -18
  12. package/dist/chunks/{location-2jq4ff38.js → tool-0ahs07zn.js} +4 -4
  13. package/dist/chunks/{location-ytsgm675.js → tool-0fhbvqtr.js} +9 -9
  14. package/dist/chunks/{location-3y1df9hb.js → tool-0t332zg2.js} +6 -6
  15. package/dist/chunks/{location-8jztxfpf.js → tool-11hfp36g.js} +4 -4
  16. package/dist/chunks/tool-12cx84te.js +224 -0
  17. package/dist/chunks/{location-6pe7vn7p.js → tool-14kcwm24.js} +15 -15
  18. package/dist/chunks/{location-jw4xm41e.js → tool-18s0c7mk.js} +13 -13
  19. package/dist/chunks/{location-2ggqsqg3.js → tool-19y1mz66.js} +7 -7
  20. package/dist/chunks/{location-jz6d5c41.js → tool-1b236rmr.js} +206 -156
  21. package/dist/chunks/{location-gnkrmvzs.js → tool-1dvrssaw.js} +6 -4
  22. package/dist/chunks/{location-1ep2p91f.js → tool-1ep2p91f.js} +2 -2
  23. package/dist/chunks/{location-5fjb7ams.js → tool-1jakw16s.js} +2 -2
  24. package/dist/chunks/{location-cp65cvxr.js → tool-1px95g66.js} +13 -13
  25. package/dist/chunks/{location-vxybbfew.js → tool-1qb2fn2e.js} +12 -12
  26. package/dist/chunks/{location-y9awcm76.js → tool-1vpe07px.js} +78 -23
  27. package/dist/chunks/{location-1x2knyw4.js → tool-1x2knyw4.js} +1 -1
  28. package/dist/chunks/{location-vd3b3yk9.js → tool-204s3925.js} +13 -2
  29. package/dist/chunks/{location-wxy5qeqz.js → tool-27c23e33.js} +15 -15
  30. package/dist/chunks/{location-rttdb5jp.js → tool-28pnz6dy.js} +33 -33
  31. package/dist/chunks/tool-2esqe60t.js +252 -0
  32. package/dist/chunks/{location-997dsrmm.js → tool-2jrrfqe1.js} +17 -7
  33. package/dist/chunks/{location-cxat4xx2.js → tool-2nkqvy4a.js} +29 -29
  34. package/dist/chunks/{location-rkvk32bt.js → tool-2qgpse07.js} +16 -16
  35. package/dist/chunks/{location-aft2va8r.js → tool-2xw2f3vf.js} +11 -11
  36. package/dist/chunks/{location-c34bh8hr.js → tool-30wtetgq.js} +49 -44
  37. package/dist/chunks/{location-yx8gesms.js → tool-39j6yt37.js} +10 -10
  38. package/dist/chunks/{location-09wmedhs.js → tool-39tkfg3g.js} +9 -9
  39. package/dist/chunks/{location-2bymr7vt.js → tool-3ewwa9eq.js} +28 -28
  40. package/dist/chunks/{location-x3w3gr0t.js → tool-3f13jy3s.js} +30 -30
  41. package/dist/chunks/{location-3hepkmqq.js → tool-3hepkmqq.js} +1 -1
  42. package/dist/chunks/{location-4v3515yy.js → tool-3jy1f5rc.js} +66 -49
  43. package/dist/chunks/{location-2n0y9ar2.js → tool-3k7t0q4z.js} +15 -15
  44. package/dist/chunks/{location-3nnrz6f6.js → tool-3nnrz6f6.js} +1 -1
  45. package/dist/chunks/{location-dvpv1qqw.js → tool-3nr2yc9a.js} +5 -5
  46. package/dist/chunks/{location-p184mqc5.js → tool-3t4066nw.js} +17 -17
  47. package/dist/chunks/{location-239z01gj.js → tool-41sh1bbt.js} +8 -6
  48. package/dist/chunks/{location-fjnhz8nn.js → tool-47cq5kqw.js} +4 -4
  49. package/dist/chunks/{location-2ahfrs74.js → tool-4czcg6bs.js} +16 -16
  50. package/dist/chunks/{location-9zetw7am.js → tool-4jw80zew.js} +77 -77
  51. package/dist/chunks/{location-pkyv6v7h.js → tool-4m86bj6y.js} +24 -15
  52. package/dist/chunks/{location-ddwaa558.js → tool-4pw98qd4.js} +4 -4
  53. package/dist/chunks/{location-2z1j29yd.js → tool-4pyp9zr9.js} +19 -3
  54. package/dist/chunks/{location-7vd4enbp.js → tool-4t7jqkaw.js} +15 -15
  55. package/dist/chunks/{location-4v008n1t.js → tool-4v008n1t.js} +1 -1
  56. package/dist/chunks/{location-4y92vxjf.js → tool-4zsrmah6.js} +51 -51
  57. package/dist/chunks/{location-j6sw43tq.js → tool-5858b97a.js} +15 -15
  58. package/dist/chunks/{location-2s6r54qs.js → tool-5887ft1y.js} +7 -7
  59. package/dist/chunks/{location-et9e0jv5.js → tool-5dme8x4x.js} +11 -11
  60. package/dist/chunks/{location-86439gfw.js → tool-5fgj30xe.js} +30 -30
  61. package/dist/chunks/{location-q89bkvf2.js → tool-5k0vn9gs.js} +2 -2
  62. package/dist/chunks/{location-5m9w47nd.js → tool-5m9w47nd.js} +1 -1
  63. package/dist/chunks/{location-dgj49q4q.js → tool-5n6snyjt.js} +52 -36
  64. package/dist/chunks/tool-5w3e23ze.js +16 -0
  65. package/dist/chunks/{location-89c7n5pz.js → tool-5wtqv2es.js} +5 -5
  66. package/dist/chunks/{location-bjhzkqyk.js → tool-61ennm6n.js} +4 -4
  67. package/dist/chunks/{location-9s6wb0ev.js → tool-67cvb3ht.js} +9 -9
  68. package/dist/chunks/{location-6b66j3w1.js → tool-6adqbtbr.js} +43 -32
  69. package/dist/chunks/tool-6bshxcsx.js +18 -0
  70. package/dist/chunks/{location-6esdw8yj.js → tool-6esdw8yj.js} +1 -1
  71. package/dist/chunks/{location-830bkp7y.js → tool-6h9hqrxp.js} +26 -24
  72. package/dist/chunks/{location-37d4mgj3.js → tool-6jehphsq.js} +36 -36
  73. package/dist/chunks/{location-1bmrwaa5.js → tool-6mmkz41v.js} +16 -16
  74. package/dist/chunks/{location-eggkdbge.js → tool-6qtsf31h.js} +3 -3
  75. package/dist/chunks/{location-txg5xg0c.js → tool-6rfxa98r.js} +33 -33
  76. package/dist/chunks/{location-rjnacbrz.js → tool-6twykydk.js} +9 -9
  77. package/dist/chunks/{location-s9ty2h8k.js → tool-6wz31r82.js} +11 -11
  78. package/dist/chunks/{location-xr94g6d3.js → tool-7467kx48.js} +64 -45
  79. package/dist/chunks/{location-0hpjzkz5.js → tool-752zwhsj.js} +20 -14
  80. package/dist/chunks/{location-76cb1hcw.js → tool-76cb1hcw.js} +1 -1
  81. package/dist/chunks/{location-nah043kf.js → tool-770pw0s1.js} +4 -4
  82. package/dist/chunks/{location-mh30raav.js → tool-780q7vq9.js} +9 -7
  83. package/dist/chunks/{location-sk6vvdwr.js → tool-78kz22ny.js} +19 -19
  84. package/dist/chunks/{location-kp4ctdbn.js → tool-798y36pp.js} +51 -31
  85. package/dist/chunks/{location-7bmhse3q.js → tool-7bmhse3q.js} +1 -1
  86. package/dist/chunks/{location-584rjm98.js → tool-7f02p6s5.js} +1 -1
  87. package/dist/chunks/{location-1xwgv2nq.js → tool-7gm95e0b.js} +6 -6
  88. package/dist/chunks/{location-4bvc8sjz.js → tool-7harcha2.js} +2 -2
  89. package/dist/chunks/{location-ckr4b3py.js → tool-7hsh0za6.js} +48 -48
  90. package/dist/chunks/{location-pt3agb94.js → tool-7mwfr1ya.js} +14 -14
  91. package/dist/chunks/{location-7bgh3hsv.js → tool-7tjh76vn.js} +28 -9
  92. package/dist/chunks/{location-7w2ypzdf.js → tool-7w2ypzdf.js} +1 -1
  93. package/dist/chunks/{location-5qebhevh.js → tool-88degkwg.js} +48 -23
  94. package/dist/chunks/{location-2cjxs9ry.js → tool-8cvc109z.js} +23 -23
  95. package/dist/chunks/{location-3yy2vhmn.js → tool-8d9gtfa7.js} +30 -23
  96. package/dist/chunks/tool-8e0gbf5j.js +537 -0
  97. package/dist/chunks/{location-81va5nb7.js → tool-8feq5yxx.js} +19 -19
  98. package/dist/chunks/tool-8jkecmvj.js +111 -0
  99. package/dist/chunks/{location-a5h3ke48.js → tool-8rk0v0nw.js} +33 -33
  100. package/dist/chunks/{location-ptcpq2hv.js → tool-8t8mrqrh.js} +6 -6
  101. package/dist/chunks/{location-afmnpta1.js → tool-8wc2fpae.js} +5 -5
  102. package/dist/chunks/{location-8wtp7s3z.js → tool-8wtp7s3z.js} +1 -1
  103. package/dist/chunks/{location-g7esga4v.js → tool-8y4jps98.js} +7 -7
  104. package/dist/chunks/{location-maspj1v3.js → tool-90zstvax.js} +44 -8
  105. package/dist/chunks/{location-j8pg8rcr.js → tool-94as0g8p.js} +61 -41
  106. package/dist/chunks/{location-633qbm06.js → tool-9e6q8a6s.js} +14 -14
  107. package/dist/chunks/{location-3mgb105e.js → tool-9f3sjfep.js} +9 -9
  108. package/dist/chunks/{location-ytvhabzn.js → tool-9kqcsae8.js} +22 -16
  109. package/dist/chunks/{location-s2pfznc4.js → tool-9nkjg9qd.js} +6 -6
  110. package/dist/chunks/{location-1y0wdj51.js → tool-9q8g9sv8.js} +9 -9
  111. package/dist/chunks/{location-t6dn99ca.js → tool-9t5cp16p.js} +27 -22
  112. package/dist/chunks/{location-9dxz0jcc.js → tool-9taxa3wa.js} +15 -12
  113. package/dist/chunks/{location-8vjz6zkc.js → tool-a35byqw0.js} +28 -28
  114. package/dist/chunks/{location-dg6zbqet.js → tool-agmw1zcy.js} +61 -61
  115. package/dist/chunks/tool-asd4mxps.js +26 -0
  116. package/dist/chunks/{location-ayjs7tqn.js → tool-ayjs7tqn.js} +2 -2
  117. package/dist/chunks/{location-7jrmq8v4.js → tool-ayv543vf.js} +23 -23
  118. package/dist/chunks/{location-scdee33y.js → tool-b08y6na7.js} +2 -2
  119. package/dist/chunks/{location-b6vsg801.js → tool-b6vsg801.js} +2 -2
  120. package/dist/chunks/{location-m9ga4zyy.js → tool-b7286km2.js} +6 -6
  121. package/dist/chunks/{location-0pm6fm3r.js → tool-bavxd7np.js} +91 -67
  122. package/dist/chunks/{location-wjj7prxr.js → tool-beh6qq61.js} +11 -0
  123. package/dist/chunks/{location-b29mbqx6.js → tool-bgs9y14h.js} +5 -5
  124. package/dist/chunks/{location-v6h5bgwd.js → tool-bk7xq8bh.js} +8 -8
  125. package/dist/chunks/{location-bstexjd6.js → tool-bstexjd6.js} +1 -1
  126. package/dist/chunks/{location-xy22cvcr.js → tool-c065g2ca.js} +67 -51
  127. package/dist/chunks/{location-wedh6qfb.js → tool-c1y12bqd.js} +35 -37
  128. package/dist/chunks/{location-z06f5xk1.js → tool-c347jtgq.js} +29 -29
  129. package/dist/chunks/{location-6p8ga3wk.js → tool-cnga39w3.js} +17 -17
  130. package/dist/chunks/{location-n1ryh798.js → tool-cnh9xgcw.js} +46 -44
  131. package/dist/chunks/tool-cqv5kn06.js +13 -0
  132. package/dist/chunks/{location-m5nnd4yj.js → tool-cwq9059v.js} +19 -17
  133. package/dist/chunks/{location-b0mv4wxm.js → tool-cwrgdav8.js} +2 -2
  134. package/dist/chunks/{location-rxz7t1tx.js → tool-d3qmtx3n.js} +71 -39
  135. package/dist/chunks/{location-d4v9tmah.js → tool-d4v9tmah.js} +2 -2
  136. package/dist/chunks/{location-2h6s5afk.js → tool-d893c1qn.js} +13 -13
  137. package/dist/chunks/{location-7th4r57j.js → tool-d9hg8633.js} +17 -17
  138. package/dist/chunks/{location-x6zjgj80.js → tool-ds82yrjj.js} +35 -22
  139. package/dist/chunks/{location-j113cymg.js → tool-dt77769w.js} +2 -2
  140. package/dist/chunks/{location-d5m0d1jd.js → tool-dtfj6qhp.js} +121 -94
  141. package/dist/chunks/{location-dqc1xg2h.js → tool-dvbyh3pq.js} +51 -48
  142. package/dist/chunks/{location-ye1xrrbs.js → tool-dwxkhmt2.js} +18 -20
  143. package/dist/chunks/tool-e07q2w5p.js +83 -0
  144. package/dist/chunks/{location-ky7vvs7w.js → tool-e4vy1v26.js} +87 -35
  145. package/dist/chunks/{location-e834z07m.js → tool-e834z07m.js} +1 -1
  146. package/dist/chunks/{location-0928y98p.js → tool-edkh5za3.js} +3 -3
  147. package/dist/chunks/{location-nm4377q9.js → tool-ewr5k9wg.js} +5 -5
  148. package/dist/chunks/{location-snh71vez.js → tool-f1kzydc9.js} +30 -29
  149. package/dist/chunks/{location-bm60t44w.js → tool-f449218g.js} +3 -3
  150. package/dist/chunks/{location-k6wybhe4.js → tool-f68rfrfr.js} +33 -36
  151. package/dist/chunks/{location-h8rac0eh.js → tool-f8jj8vg7.js} +12 -12
  152. package/dist/chunks/{location-fffv3p7h.js → tool-fffv3p7h.js} +1 -1
  153. package/dist/chunks/tool-fkpq3x5p.js +36 -0
  154. package/dist/chunks/{location-eh71ek0g.js → tool-g2pxrbdf.js} +90 -77
  155. package/dist/chunks/{location-v0ajt838.js → tool-g3b4788n.js} +33 -21
  156. package/dist/chunks/{location-rkdfvdar.js → tool-ge4qdnbb.js} +28 -25
  157. package/dist/chunks/{location-998yhzzq.js → tool-gg8p9cgs.js} +24 -18
  158. package/dist/chunks/{location-w00s5rdr.js → tool-gjasn01h.js} +4 -4
  159. package/dist/chunks/{location-w67r90k6.js → tool-gn0hevf2.js} +13 -13
  160. package/dist/chunks/{location-fcfxs1zj.js → tool-gtqjgkpw.js} +3 -3
  161. package/dist/chunks/{location-v0h1q5gr.js → tool-h0ya90rh.js} +23 -19
  162. package/dist/chunks/{location-p894etz3.js → tool-h8wtbm19.js} +49 -49
  163. package/dist/chunks/{location-c3cfh5w6.js → tool-hdfrs5mg.js} +5 -5
  164. package/dist/chunks/{location-6pjqjmy2.js → tool-hpg1pkwy.js} +2 -2
  165. package/dist/chunks/{location-7hk3fzbx.js → tool-hs9cwcgs.js} +30 -30
  166. package/dist/chunks/{location-t09yj0zj.js → tool-hy05jz59.js} +4 -4
  167. package/dist/chunks/{location-y2hbnz15.js → tool-j04c4e1z.js} +25 -25
  168. package/dist/chunks/{location-5ysrq0ad.js → tool-j3xa31ke.js} +17 -17
  169. package/dist/chunks/{location-jbt1xm3n.js → tool-j56qcejd.js} +324 -330
  170. package/dist/chunks/tool-j775gmwt.js +171 -0
  171. package/dist/chunks/{location-91rj84md.js → tool-jfaecv01.js} +2 -2
  172. package/dist/chunks/{location-3043t2hd.js → tool-jhz9911s.js} +46 -31
  173. package/dist/chunks/{location-tx9vmxa7.js → tool-jsqg4353.js} +14 -14
  174. package/dist/chunks/{location-8bf8d73q.js → tool-jszqqvxf.js} +9 -9
  175. package/dist/chunks/{location-g5h9c0rr.js → tool-jtnps1zs.js} +2 -2
  176. package/dist/chunks/tool-jwr30sdr.js +13 -0
  177. package/dist/chunks/{location-vqpjc3nz.js → tool-jz5b6eqf.js} +32 -26
  178. package/dist/chunks/{location-6z79x2sm.js → tool-k66e5v3s.js} +13 -13
  179. package/dist/chunks/{location-k814nvkf.js → tool-k814nvkf.js} +1 -1
  180. package/dist/chunks/{location-8c8xwrnt.js → tool-kcw9vyak.js} +14 -14
  181. package/dist/chunks/{location-fphnwtmq.js → tool-kh9rt25c.js} +8 -8
  182. package/dist/chunks/{location-005psrwt.js → tool-ks0qaf84.js} +23 -21
  183. package/dist/chunks/{location-raq1s93x.js → tool-ks473cwm.js} +22 -22
  184. package/dist/chunks/tool-kt3bjfbg.js +26 -0
  185. package/dist/chunks/{location-ran0pwn3.js → tool-kzvqqj4g.js} +24 -24
  186. package/dist/chunks/{location-m1714858.js → tool-m1714858.js} +1 -1
  187. package/dist/chunks/{location-zakhs7qb.js → tool-m89ew3ks.js} +30 -30
  188. package/dist/chunks/{location-m9w0rfyh.js → tool-m9w0rfyh.js} +1 -1
  189. package/dist/chunks/{location-7jg3h9xc.js → tool-maq43m3m.js} +10 -10
  190. package/dist/chunks/{location-2brc2rvy.js → tool-mpvgefqy.js} +4 -4
  191. package/dist/chunks/tool-mrzap57y.js +295 -0
  192. package/dist/chunks/{location-42hxtx4a.js → tool-mvzrjhep.js} +2 -2
  193. package/dist/chunks/{location-1dqke238.js → tool-n0w6tq5t.js} +8 -8
  194. package/dist/chunks/{location-5qd3pb7m.js → tool-ncqqe42p.js} +2 -2
  195. package/dist/chunks/{location-t35vpv8z.js → tool-nfga29bv.js} +31 -30
  196. package/dist/chunks/{location-nfdwtzhc.js → tool-nfk1y8jw.js} +29 -29
  197. package/dist/chunks/{location-z24fzt3x.js → tool-nfq3amnp.js} +31 -30
  198. package/dist/chunks/{location-t9sf4w0m.js → tool-nh9ma6fe.js} +11 -11
  199. package/dist/chunks/{location-4kb4jvb8.js → tool-nn3qjkhj.js} +24 -24
  200. package/dist/chunks/{location-9p7ryr2b.js → tool-nq0efya9.js} +7 -7
  201. package/dist/chunks/{location-axe3mf62.js → tool-nvxqht09.js} +3 -3
  202. package/dist/chunks/{location-hyvp8sn8.js → tool-nyw2x12k.js} +1 -1
  203. package/dist/chunks/{location-hqgpx30z.js → tool-nz89qvcx.js} +34 -32
  204. package/dist/chunks/{location-p015t6z3.js → tool-p015t6z3.js} +2 -2
  205. package/dist/chunks/{location-hgn7fvrd.js → tool-p56gnsnx.js} +31 -31
  206. package/dist/chunks/tool-p71gwv9c.js +153 -0
  207. package/dist/chunks/{location-1yq9hg58.js → tool-p7vhpwh8.js} +5 -5
  208. package/dist/chunks/{location-nes0ks30.js → tool-p84syj9g.js} +31 -29
  209. package/dist/chunks/{location-zkgq49d1.js → tool-pbbktnbz.js} +6 -6
  210. package/dist/chunks/{location-nbvb24gq.js → tool-pbwrhxm9.js} +22 -22
  211. package/dist/chunks/{location-e6ke8dsh.js → tool-pckyv4f2.js} +36 -36
  212. package/dist/chunks/{location-2satw072.js → tool-pfnzsr07.js} +22 -22
  213. package/dist/chunks/{location-kjb4x69f.js → tool-pfstxkm2.js} +1 -1
  214. package/dist/chunks/tool-pjtyf8t7.js +133 -0
  215. package/dist/chunks/{location-pknna89w.js → tool-pknna89w.js} +1 -1
  216. package/dist/chunks/{location-a7hcemwv.js → tool-pnwsrq7c.js} +11 -11
  217. package/dist/chunks/tool-prq7xxp2.js +37 -0
  218. package/dist/chunks/{location-fqzd2d2r.js → tool-pvzzwdfq.js} +14 -14
  219. package/dist/chunks/{location-qbgwvbz8.js → tool-q2z4k2x9.js} +12 -12
  220. package/dist/chunks/{location-4jbtvrw1.js → tool-q63v4kjv.js} +21 -16
  221. package/dist/chunks/{location-hfkcnh3h.js → tool-qakjdagf.js} +42 -32
  222. package/dist/chunks/{location-xewrm1yq.js → tool-qcsk8x8g.js} +119 -69
  223. package/dist/chunks/{location-r20swzxr.js → tool-qhfm6m5r.js} +27 -25
  224. package/dist/chunks/tool-qp7r0hxv.js +120 -0
  225. package/dist/chunks/{location-jh9pmtvm.js → tool-r023m38x.js} +16 -16
  226. package/dist/chunks/{location-r0yr0wbs.js → tool-r0yr0wbs.js} +1 -1
  227. package/dist/chunks/{location-4fspmagn.js → tool-r0yvbzfa.js} +75 -60
  228. package/dist/chunks/{location-f7ma11rg.js → tool-r2z94j39.js} +6 -6
  229. package/dist/chunks/{location-tw8zr1ps.js → tool-r542h3bh.js} +5 -2
  230. package/dist/chunks/{location-fjngd7fj.js → tool-r850md5t.js} +11 -11
  231. package/dist/chunks/{location-tseqrb92.js → tool-r8dwygj6.js} +55 -55
  232. package/dist/chunks/{location-0gbb59p9.js → tool-r9zrswe1.js} +9 -9
  233. package/dist/chunks/{location-kmzgegqq.js → tool-ra6js1h8.js} +8 -8
  234. package/dist/chunks/{location-rb9dy4dg.js → tool-rb9dy4dg.js} +1 -1
  235. package/dist/chunks/{location-rgyfs092.js → tool-rbhebfmq.js} +6 -6
  236. package/dist/chunks/{location-xzb17nsd.js → tool-rgmk1r1t.js} +62 -27
  237. package/dist/chunks/{location-nb3nrvbh.js → tool-rjf5h5f7.js} +8 -8
  238. package/dist/chunks/{location-5nankzt7.js → tool-rr19gkj4.js} +13 -13
  239. package/dist/chunks/{location-rt5dr6hb.js → tool-rt5dr6hb.js} +1 -1
  240. package/dist/chunks/{location-x2adk3yy.js → tool-rvy8xhsv.js} +33 -32
  241. package/dist/chunks/{location-v3q8ezdd.js → tool-rzh929cz.js} +13 -13
  242. package/dist/chunks/{location-q55b1wrz.js → tool-s6jj6eh0.js} +15 -15
  243. package/dist/chunks/{location-3sfq932m.js → tool-s9zns2yk.js} +23 -30
  244. package/dist/chunks/tool-sa3fpqfw.js +46 -0
  245. package/dist/chunks/{location-qbm0r1ap.js → tool-sa46y2cf.js} +10 -8
  246. package/dist/chunks/{location-nte6bvsd.js → tool-sbj9xhv5.js} +79 -53
  247. package/dist/chunks/{location-ke7vzy3f.js → tool-sc5azq8x.js} +77 -45
  248. package/dist/chunks/{location-z359x3zf.js → tool-spqj5yby.js} +27 -27
  249. package/dist/chunks/{location-sqjzf8x2.js → tool-sqjzf8x2.js} +1 -1
  250. package/dist/chunks/{location-d2887f8n.js → tool-ssfehs1z.js} +4 -4
  251. package/dist/chunks/{location-3j92816q.js → tool-st7p3hwb.js} +2 -2
  252. package/dist/chunks/{location-zkg84ctx.js → tool-svcy3p9a.js} +4 -2
  253. package/dist/chunks/{location-jznc3yn3.js → tool-sw5vdw2h.js} +8 -8
  254. package/dist/chunks/{location-g3avwj86.js → tool-sws77t7f.js} +11 -11
  255. package/dist/chunks/{location-tczq8hjw.js → tool-tczq8hjw.js} +1 -1
  256. package/dist/chunks/{location-b259twyp.js → tool-tt79p4vp.js} +21 -21
  257. package/dist/chunks/tool-twcztz12.js +479 -0
  258. package/dist/chunks/{location-twv2r8f4.js → tool-twssxy5n.js} +2 -2
  259. package/dist/chunks/{location-v2r1d0zg.js → tool-v2r1d0zg.js} +1 -1
  260. package/dist/chunks/{location-dxbw252c.js → tool-v6njdshh.js} +21 -21
  261. package/dist/chunks/{location-j2cjg2qt.js → tool-v91xp2c8.js} +20 -20
  262. package/dist/chunks/{location-q1rqw855.js → tool-vacfhfey.js} +10 -10
  263. package/dist/chunks/{location-pc1v25hk.js → tool-vb80j1wh.js} +4 -4
  264. package/dist/chunks/{location-veqvce7d.js → tool-veqvce7d.js} +1 -1
  265. package/dist/chunks/{location-s56jz2hb.js → tool-vmx0pqdh.js} +28 -29
  266. package/dist/chunks/{location-c8666r4c.js → tool-vsqvcqta.js} +7 -7
  267. package/dist/chunks/{location-3e8nvsz7.js → tool-vvj7j8xf.js} +3 -3
  268. package/dist/chunks/{location-b46dzrwk.js → tool-vvqzd10p.js} +42 -42
  269. package/dist/chunks/{location-k732j073.js → tool-vycsk1c7.js} +8 -8
  270. package/dist/chunks/{location-1qtv120j.js → tool-w08h028t.js} +9 -9
  271. package/dist/chunks/{location-40za9wsf.js → tool-w2eysc6j.js} +9 -9
  272. package/dist/chunks/{location-w3wsvvr9.js → tool-w3wsvvr9.js} +1 -1
  273. package/dist/chunks/{location-30bn4rx3.js → tool-w9z9y32t.js} +21 -21
  274. package/dist/chunks/{location-wakvkjy4.js → tool-wakvkjy4.js} +1 -1
  275. package/dist/chunks/{location-wd87259q.js → tool-wd87259q.js} +1 -1
  276. package/dist/chunks/{location-n0p0277s.js → tool-wnhgecwx.js} +35 -4
  277. package/dist/chunks/{location-w687dnns.js → tool-wr3re1en.js} +4 -4
  278. package/dist/chunks/tool-wz464gjx.js +42 -0
  279. package/dist/chunks/{location-wf8nwwfn.js → tool-x75vegnr.js} +9 -9
  280. package/dist/chunks/{location-m0gv7qej.js → tool-xasx590j.js} +14 -14
  281. package/dist/chunks/{location-mjey6v08.js → tool-xhrs65th.js} +7 -7
  282. package/dist/chunks/{location-qyx1nkkd.js → tool-xpx0z35b.js} +19 -19
  283. package/dist/chunks/{location-37c15ztt.js → tool-xqxzn5yn.js} +14 -14
  284. package/dist/chunks/{location-jneg3k74.js → tool-xt0z8zst.js} +6 -6
  285. package/dist/chunks/{location-r1s8qxhz.js → tool-xw4ev616.js} +8 -8
  286. package/dist/chunks/{location-4c6ksw65.js → tool-y420wvgt.js} +39 -39
  287. package/dist/chunks/{location-2d2g0mpf.js → tool-y5kjjy07.js} +33 -33
  288. package/dist/chunks/{location-3wef9mrz.js → tool-y7287ygs.js} +8 -8
  289. package/dist/chunks/tool-yara3q77.js +132 -0
  290. package/dist/chunks/{location-yb20nhc3.js → tool-yb20nhc3.js} +1 -1
  291. package/dist/chunks/{location-9ypen6gf.js → tool-ycd18cxa.js} +6 -6
  292. package/dist/chunks/{location-kb4gstwj.js → tool-ymky0t0b.js} +5 -5
  293. package/dist/chunks/{location-ght5gt7k.js → tool-yqsmg75a.js} +63 -29
  294. package/dist/chunks/{location-e45fk36t.js → tool-yqveydy6.js} +4 -4
  295. package/dist/chunks/{location-6qtdkhme.js → tool-yxjvbhxs.js} +4 -4
  296. package/dist/chunks/{location-r3083m8p.js → tool-yytcp89d.js} +28 -28
  297. package/dist/chunks/{location-b93307df.js → tool-yzaa036j.js} +32 -32
  298. package/dist/chunks/{location-z0bkrqjs.js → tool-z0bkrqjs.js} +1 -1
  299. package/dist/chunks/{location-z38nccrw.js → tool-z38nccrw.js} +1 -1
  300. package/dist/chunks/{location-9mrr08ev.js → tool-zdkwz0rs.js} +5 -8
  301. package/dist/chunks/tool-zfjx7vmh.js +257 -0
  302. package/dist/chunks/{location-4xvmh7wp.js → tool-zgkm4kzm.js} +3 -3
  303. package/dist/chunks/{location-hwqvnpa6.js → tool-zw3yjf62.js} +13 -13
  304. package/dist/chunks/{location-s1t9wfqz.js → tool-zyqv3h6k.js} +8 -8
  305. package/dist/codemode/catalog.js +1 -1
  306. package/dist/codemode/instructions.js +9 -9
  307. package/dist/codemode/tool.js +3 -3
  308. package/dist/codemode/web.js +1 -1
  309. package/dist/command.js +89 -85
  310. package/dist/config/discovery.js +90 -84
  311. package/dist/config/integration.js +14 -0
  312. package/dist/config/markdown.js +1 -1
  313. package/dist/config/normalize.js +109 -103
  314. package/dist/config/plugin/agent.js +123 -118
  315. package/dist/config/plugin/command.js +221 -214
  316. package/dist/config/plugin/compaction.js +162 -155
  317. package/dist/config/plugin/compatibility.js +142 -135
  318. package/dist/config/plugin/entry-observer.js +1 -1
  319. package/dist/config/plugin/formatter.js +122 -117
  320. package/dist/config/plugin/image.js +121 -116
  321. package/dist/config/plugin/instruction.js +121 -116
  322. package/dist/config/plugin/location-watcher.js +119 -114
  323. package/dist/config/plugin/mcp.js +130 -125
  324. package/dist/config/plugin/policy.js +123 -117
  325. package/dist/config/plugin/provider.js +124 -116
  326. package/dist/config/plugin/reference.js +123 -118
  327. package/dist/config/plugin/shell.js +123 -118
  328. package/dist/config/plugin/skill-file.js +138 -104
  329. package/dist/config/plugin/skill-scan.js +3 -3
  330. package/dist/config/plugin/skill.js +143 -136
  331. package/dist/config/plugin/snapshot.js +121 -116
  332. package/dist/config/plugin/source.js +124 -119
  333. package/dist/config/plugin/tool-output.js +122 -117
  334. package/dist/config/plugin/websearch.js +122 -117
  335. package/dist/config/plugin/worktree.js +123 -118
  336. package/dist/config/variable.js +1 -1
  337. package/dist/config/watch.js +1 -1
  338. package/dist/config.js +124 -119
  339. package/dist/console-access.js +12 -0
  340. package/dist/credential/sql.js +2 -2
  341. package/dist/credential.js +83 -79
  342. package/dist/database/database.js +78 -74
  343. package/dist/database/drizzle/effect-sqlite/driver.js +14 -14
  344. package/dist/database/drizzle/effect-sqlite/index.js +14 -14
  345. package/dist/database/drizzle/effect-sqlite/session.js +11 -11
  346. package/dist/database/drizzle/index.js +15 -15
  347. package/dist/database/drizzle/internal/drizzle-utils.js +1 -1
  348. package/dist/database/drizzle/sqlite-core/effect/count.js +1 -1
  349. package/dist/database/drizzle/sqlite-core/effect/db.js +9 -9
  350. package/dist/database/drizzle/sqlite-core/effect/delete.js +2 -2
  351. package/dist/database/drizzle/sqlite-core/effect/index.js +10 -10
  352. package/dist/database/drizzle/sqlite-core/effect/insert.js +2 -2
  353. package/dist/database/drizzle/sqlite-core/effect/query.js +1 -1
  354. package/dist/database/drizzle/sqlite-core/effect/raw.js +1 -1
  355. package/dist/database/drizzle/sqlite-core/effect/select.js +2 -2
  356. package/dist/database/drizzle/sqlite-core/effect/session.js +10 -10
  357. package/dist/database/drizzle/sqlite-core/effect/update.js +2 -2
  358. package/dist/database/drizzle.js +16 -16
  359. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +1 -1
  360. package/dist/database/migration/20260211171708_add_project_commands.js +1 -1
  361. package/dist/database/migration/20260213144116_wakeful_the_professor.js +1 -1
  362. package/dist/database/migration/20260225215848_workspace.js +1 -1
  363. package/dist/database/migration/20260227213759_add_session_workspace_id.js +1 -1
  364. package/dist/database/migration/20260228203230_blue_harpoon.js +1 -1
  365. package/dist/database/migration/20260303231226_add_workspace_fields.js +1 -1
  366. package/dist/database/migration/20260309230000_move_org_to_state.js +1 -1
  367. package/dist/database/migration/20260312043431_session_message_cursor.js +1 -1
  368. package/dist/database/migration/20260323234822_events.js +1 -1
  369. package/dist/database/migration/20260410174513_workspace-name.js +1 -1
  370. package/dist/database/migration/20260413175956_chief_energizer.js +1 -1
  371. package/dist/database/migration/20260423070820_add_icon_url_override.js +1 -1
  372. package/dist/database/migration/20260427172553_slow_nightmare.js +1 -1
  373. package/dist/database/migration/20260428004200_add_session_path.js +1 -1
  374. package/dist/database/migration/20260501142318_next_venus.js +1 -1
  375. package/dist/database/migration/20260504145000_add_sync_owner.js +1 -1
  376. package/dist/database/migration/20260507164347_add_workspace_time.js +1 -1
  377. package/dist/database/migration/20260510033149_session_usage.js +1 -1
  378. package/dist/database/migration/20260511000411_data_migration_state.js +1 -1
  379. package/dist/database/migration/20260511173437_session-metadata.js +1 -1
  380. package/dist/database/migration/20260601010001_normalize_storage_paths.js +1 -1
  381. package/dist/database/migration/20260601202201_amazing_prowler.js +1 -1
  382. package/dist/database/migration/20260602002951_lowly_union_jack.js +1 -1
  383. package/dist/database/migration/20260602182828_add_project_directories.js +1 -1
  384. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +1 -1
  385. package/dist/database/migration/20260603040000_session_message_projection_order.js +1 -1
  386. package/dist/database/migration/20260603141458_session_input_inbox.js +1 -1
  387. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +1 -1
  388. package/dist/database/migration/20260604172448_event_sourced_session_input.js +1 -1
  389. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +1 -1
  390. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +1 -1
  391. package/dist/database/migration/20260611035744_credential.js +1 -1
  392. package/dist/database/migration/20260611192811_lush_chimera.js +1 -1
  393. package/dist/database/migration/20260612174303_project_dir_strategy.js +1 -1
  394. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +1 -1
  395. package/dist/database/migration/20260622170816_reset_v2_session_state.js +1 -1
  396. package/dist/database/migration/20260622202450_simplify_session_input.js +1 -1
  397. package/dist/database/migration/20260804233008_loose_psylocke.js +1 -1
  398. package/dist/database/migration/20260805200742_import_legacy_credentials.js +1 -1
  399. package/dist/database/migration/20260808023530_workspace_domain.js +1 -1
  400. package/dist/database/migration/20260811161259_execution_claim_attempts.js +1 -1
  401. package/dist/database/migration/20260812181746_session_inbox.js +1 -1
  402. package/dist/database/migration/20260812213948_worktree.js +1 -1
  403. package/dist/database/migration/20260819222447_session_viewed_state.js +1 -1
  404. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +1 -1
  405. package/dist/database/migration/20260910120000_clear_v1_session_permission.js +1 -1
  406. package/dist/database/migration/20260923013825_project_time_active.js +1 -1
  407. package/dist/database/migration/20261007190000_azure_cli_external_credential.js +1 -1
  408. package/dist/database/migration/20261010180456_project_time_archived.js +1 -1
  409. package/dist/database/migration/20261024002554_session_allowance.js +6 -0
  410. package/dist/database/migration/20261024175301_drop_session_allowance.js +6 -0
  411. package/dist/database/migration/20261025123711_blob.js +6 -0
  412. package/dist/database/migration/20261025154125_drop_session_pending.js +6 -0
  413. package/dist/database/migration.gen.js +55 -51
  414. package/dist/database/migration.js +57 -53
  415. package/dist/database/path.js +2 -2
  416. package/dist/database/schema.gen.js +1 -1
  417. package/dist/database/schema.sql.js +1 -1
  418. package/dist/database/sqlite.bun.js +1 -1
  419. package/dist/database/sqlite.js +1 -1
  420. package/dist/database/sqlite.node.js +1 -1
  421. package/dist/database/sqlite.workerd.js +1 -1
  422. package/dist/database/v1-migration.bun.js +98 -92
  423. package/dist/database/v1-migration.js +1 -1
  424. package/dist/effect/app-node-builder.js +386 -372
  425. package/dist/effect/app-node-platform.js +2 -2
  426. package/dist/effect/keyed-mutex.js +3 -3
  427. package/dist/effect/websocket-constructor.js +1 -1
  428. package/dist/environment/driver.js +1 -1
  429. package/dist/environment/environment.js +101 -95
  430. package/dist/environment/exec-defaults.js +2 -2
  431. package/dist/environment/files.js +3 -1
  432. package/dist/environment/index.js +106 -98
  433. package/dist/environment/local.js +2 -2
  434. package/dist/environment/memory.js +2 -2
  435. package/dist/environment/unavailable.js +3 -3
  436. package/dist/event/sql.js +1 -1
  437. package/dist/event-logger.js +80 -76
  438. package/dist/file-access.js +148 -106
  439. package/dist/file-mutation.js +102 -96
  440. package/dist/file-retention.js +1 -1
  441. package/dist/filesystem/fff.bun.js +2 -2
  442. package/dist/filesystem/fff.js +1 -1
  443. package/dist/filesystem/fff.node.js +2 -2
  444. package/dist/filesystem/fff.workerd.js +2 -2
  445. package/dist/filesystem/file-watch.js +221 -0
  446. package/dist/filesystem/location-watcher-policy.js +6 -6
  447. package/dist/filesystem/location-watcher.js +232 -225
  448. package/dist/filesystem/protected.js +1 -1
  449. package/dist/filesystem/search.js +107 -99
  450. package/dist/filesystem/watcher-binding.js +3 -3
  451. package/dist/filesystem/watcher.js +9 -9
  452. package/dist/filesystem.js +110 -104
  453. package/dist/form.js +80 -76
  454. package/dist/formatter/builtins.js +4 -4
  455. package/dist/formatter.js +95 -89
  456. package/dist/generate.js +125 -111
  457. package/dist/git.js +13 -10
  458. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +1 -1
  459. package/dist/github-copilot/chat/get-response-metadata.js +1 -1
  460. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +1 -1
  461. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +7 -7
  462. package/dist/github-copilot/chat/openai-compatible-chat-options.js +1 -1
  463. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +1 -1
  464. package/dist/github-copilot/copilot-provider.js +17 -17
  465. package/dist/github-copilot/models.js +101 -95
  466. package/dist/github-copilot/openai-compatible-error.js +1 -1
  467. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +1 -1
  468. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +1 -1
  469. package/dist/github-copilot/responses/openai-error.js +1 -1
  470. package/dist/github-copilot/responses/openai-responses-language-model.js +10 -10
  471. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +6 -6
  472. package/dist/github-copilot/responses/tool/code-interpreter.js +1 -1
  473. package/dist/github-copilot/responses/tool/file-search.js +1 -1
  474. package/dist/github-copilot/responses/tool/image-generation.js +1 -1
  475. package/dist/github-copilot/responses/tool/web-search-preview.js +1 -1
  476. package/dist/github-copilot/responses/tool/web-search.js +1 -1
  477. package/dist/image/photon-normalize.js +12 -0
  478. package/dist/image/photon-worker.js +19 -0
  479. package/dist/image/photon.js +125 -79
  480. package/dist/image.js +6 -6
  481. package/dist/instance/service.js +5 -5
  482. package/dist/instance.js +373 -361
  483. package/dist/instruction-discovery.js +90 -86
  484. package/dist/instructions/builtins.js +95 -89
  485. package/dist/instructions/index.js +5 -5
  486. package/dist/integration/connection.js +3 -3
  487. package/dist/integration.js +91 -87
  488. package/dist/job.js +84 -80
  489. package/dist/kv/sql.js +2 -2
  490. package/dist/kv.js +79 -75
  491. package/dist/location-activity.js +168 -163
  492. package/dist/location-lifecycle.js +142 -109
  493. package/dist/location-service-map.js +94 -88
  494. package/dist/location-services.js +370 -358
  495. package/dist/location.js +97 -91
  496. package/dist/managed-policy.js +11 -10
  497. package/dist/mcp/client.js +125 -95
  498. package/dist/mcp/index.js +115 -109
  499. package/dist/mcp/instructions.js +164 -136
  500. package/dist/mcp/oauth.js +84 -80
  501. package/dist/mcp/socket-client.js +1 -1
  502. package/dist/mcp/stdio.js +98 -92
  503. package/dist/mime.js +1 -1
  504. package/dist/modal/models.js +101 -95
  505. package/dist/model-resolver.js +109 -103
  506. package/dist/model-retry.js +4 -2
  507. package/dist/model.js +112 -104
  508. package/dist/models-dev/v1.js +8 -0
  509. package/dist/models-dev.js +120 -111
  510. package/dist/oauth/page.js +1 -1
  511. package/dist/permission/saved.js +88 -84
  512. package/dist/permission/sql.js +5 -5
  513. package/dist/permission.js +151 -117
  514. package/dist/persistent-pty/binary.bun.js +1 -1
  515. package/dist/persistent-pty/daemon.js +1 -1
  516. package/dist/persistent-pty/index.js +94 -90
  517. package/dist/persistent-pty/pty-binding.js +1 -1
  518. package/dist/persistent-pty.js +81 -77
  519. package/dist/plugin/agent.js +82 -78
  520. package/dist/plugin/command.js +110 -104
  521. package/dist/plugin/hooks.js +5 -5
  522. package/dist/plugin/host.js +227 -220
  523. package/dist/plugin/identity.js +5 -3
  524. package/dist/plugin/instance.js +5 -5
  525. package/dist/plugin/internal.js +343 -333
  526. package/dist/plugin/mcp-codemode-defaults.js +3 -3
  527. package/dist/plugin/models-dev.js +105 -98
  528. package/dist/plugin/module.js +123 -117
  529. package/dist/plugin/optimize.js +5 -3
  530. package/dist/plugin/plan.js +138 -104
  531. package/dist/plugin/promise.js +1 -1
  532. package/dist/plugin/provider/amazon-bedrock.js +98 -92
  533. package/dist/plugin/provider/azure.js +121 -116
  534. package/dist/plugin/provider/cerebras.js +1 -1
  535. package/dist/plugin/provider/chatgpt.js +121 -116
  536. package/dist/plugin/provider/cloudflare-ai-gateway.js +118 -113
  537. package/dist/plugin/provider/cloudflare-workers-ai.js +118 -113
  538. package/dist/plugin/provider/cohere.js +2 -2
  539. package/dist/plugin/provider/configured.js +117 -112
  540. package/dist/plugin/provider/databricks.js +1 -1
  541. package/dist/plugin/provider/digitalocean.js +101 -95
  542. package/dist/plugin/provider/dynamic.js +2 -2
  543. package/dist/plugin/provider/factory.js +1 -1
  544. package/dist/plugin/provider/github-copilot.js +103 -97
  545. package/dist/plugin/provider/gitlab.js +101 -95
  546. package/dist/plugin/provider/google-vertex.js +118 -113
  547. package/dist/plugin/provider/kilo.js +1 -1
  548. package/dist/plugin/provider/llmgateway.js +84 -80
  549. package/dist/plugin/provider/lmstudio.js +130 -125
  550. package/dist/plugin/provider/local.js +127 -122
  551. package/dist/plugin/provider/modal.js +100 -94
  552. package/dist/plugin/provider/neon.js +1 -1
  553. package/dist/plugin/provider/nvidia.js +1 -1
  554. package/dist/plugin/provider/ollama.js +130 -125
  555. package/dist/plugin/provider/openai-context-caps.js +98 -92
  556. package/dist/plugin/provider/openai.js +121 -116
  557. package/dist/plugin/provider/opencode-legacy.js +119 -0
  558. package/dist/plugin/provider/opencode.js +127 -103
  559. package/dist/plugin/provider/openrouter.js +99 -93
  560. package/dist/plugin/provider/perplexity.js +2 -2
  561. package/dist/plugin/provider/poe.js +85 -81
  562. package/dist/plugin/provider/prompt-cache-key.js +1 -1
  563. package/dist/plugin/provider/sap-ai-core.js +99 -93
  564. package/dist/plugin/provider/sdk-factory.js +1 -1
  565. package/dist/plugin/provider/snowflake-cortex.js +120 -115
  566. package/dist/plugin/provider/vercel.js +98 -92
  567. package/dist/plugin/provider/vllm.js +130 -125
  568. package/dist/plugin/provider/xai.js +99 -93
  569. package/dist/plugin/provider/zenmux.js +1 -1
  570. package/dist/plugin/provider.js +178 -171
  571. package/dist/plugin/sdk.js +82 -78
  572. package/dist/plugin/service.js +3 -3
  573. package/dist/plugin/skill.js +141 -134
  574. package/dist/plugin/source-directory.js +1 -1
  575. package/dist/plugin/supervisor.js +362 -352
  576. package/dist/plugin/tool-input-repair.js +4 -4
  577. package/dist/plugin/update.js +6 -6
  578. package/dist/plugin/vcs/git.js +94 -88
  579. package/dist/plugin/vcs/hg.js +94 -88
  580. package/dist/plugin/verbosity.js +101 -95
  581. package/dist/plugin/warming.js +119 -114
  582. package/dist/plugin/websearch/exa.js +5 -5
  583. package/dist/plugin/websearch/firecrawl.js +6 -6
  584. package/dist/plugin/websearch/index.js +9 -9
  585. package/dist/plugin/websearch/mcp.js +6 -6
  586. package/dist/plugin/websearch/parallel.js +8 -8
  587. package/dist/plugin/websearch/tavily.js +6 -6
  588. package/dist/plugin/websearch/tinyfish.js +8 -8
  589. package/dist/plugin.js +236 -227
  590. package/dist/project/icon.js +14 -0
  591. package/dist/project/schema.js +4 -4
  592. package/dist/project/sql.js +4 -4
  593. package/dist/project.js +94 -88
  594. package/dist/provider.js +103 -95
  595. package/dist/pty/protocol.js +1 -1
  596. package/dist/pty/ticket.js +1 -1
  597. package/dist/pty.js +98 -93
  598. package/dist/reference/instructions.js +94 -89
  599. package/dist/reference.js +98 -93
  600. package/dist/repository-cache.js +88 -83
  601. package/dist/repository.js +1 -1
  602. package/dist/ripgrep/binary.js +2 -2
  603. package/dist/ripgrep.js +105 -99
  604. package/dist/rpc.js +96 -88
  605. package/dist/schema.js +1 -1
  606. package/dist/session/affinity.js +1 -1
  607. package/dist/session/blob.js +157 -0
  608. package/dist/session/command.js +80 -76
  609. package/dist/session/compaction.js +158 -132
  610. package/dist/session/context.js +184 -160
  611. package/dist/session/diff.js +96 -90
  612. package/dist/session/environment.js +5 -5
  613. package/dist/session/error.js +5 -5
  614. package/dist/session/event.js +1 -1
  615. package/dist/session/execution/restart.js +231 -224
  616. package/dist/session/execution.js +154 -130
  617. package/dist/session/generate.js +190 -166
  618. package/dist/session/history.js +134 -14
  619. package/dist/session/inbox.js +144 -93
  620. package/dist/session/info.js +3 -3
  621. package/dist/session/instruction-entry.js +83 -79
  622. package/dist/session/instruction-state.js +8 -8
  623. package/dist/session/instructions.js +132 -99
  624. package/dist/session/message-updater.js +2 -2
  625. package/dist/session/message.js +1 -1
  626. package/dist/session/model-request.js +153 -120
  627. package/dist/session/model-transport.js +7 -7
  628. package/dist/session/move.js +156 -132
  629. package/dist/session/projector.js +134 -91
  630. package/dist/session/prompt.js +140 -107
  631. package/dist/session/recent-text.js +1 -1
  632. package/dist/session/revert.js +130 -96
  633. package/dist/session/run-coordinator.js +3 -3
  634. package/dist/session/runner/index.js +3 -3
  635. package/dist/session/runner/llm.js +238 -231
  636. package/dist/session/runner/max-steps.js +1 -1
  637. package/dist/session/runner/model.js +108 -102
  638. package/dist/session/runner/publish-llm-event.js +141 -116
  639. package/dist/session/runner/retry.js +5 -5
  640. package/dist/session/runner/step.js +154 -128
  641. package/dist/session/runner/to-llm-message.js +128 -14
  642. package/dist/session/schema.js +5 -5
  643. package/dist/session/session.js +172 -165
  644. package/dist/session/shell.js +135 -130
  645. package/dist/session/skill.js +139 -105
  646. package/dist/session/sql.js +10 -8
  647. package/dist/session/stats.js +81 -77
  648. package/dist/session/store.js +133 -87
  649. package/dist/session/stored.js +23 -0
  650. package/dist/session/subagent-completion.js +1 -1
  651. package/dist/session/subagent-job.js +219 -212
  652. package/dist/session/system-prompt.js +5 -5
  653. package/dist/session/title.js +192 -168
  654. package/dist/session/to-session-error.js +140 -114
  655. package/dist/session/transfer.js +230 -223
  656. package/dist/session/usage.js +1 -1
  657. package/dist/session.js +225 -218
  658. package/dist/shell/parse.js +8 -8
  659. package/dist/shell/result.js +1 -1
  660. package/dist/shell/scan.js +1 -1
  661. package/dist/shell/select.js +13 -13
  662. package/dist/shell.js +137 -132
  663. package/dist/skill/discovery.js +6 -6
  664. package/dist/skill/instructions.js +143 -109
  665. package/dist/skill.js +150 -116
  666. package/dist/snapshot.js +101 -95
  667. package/dist/state.js +3 -1
  668. package/dist/tool/html-markdown.js +1 -1
  669. package/dist/tool/http-body.js +1 -1
  670. package/dist/tool/mcp.js +163 -135
  671. package/dist/tool/plugin/edit.js +156 -122
  672. package/dist/tool/plugin/file-diff.js +1 -1
  673. package/dist/tool/plugin/glob.js +156 -122
  674. package/dist/tool/plugin/grep.js +160 -126
  675. package/dist/tool/plugin/mcp-resource.js +154 -126
  676. package/dist/tool/plugin/opencode.js +153 -111
  677. package/dist/tool/plugin/patch.js +158 -124
  678. package/dist/tool/plugin/question.js +136 -103
  679. package/dist/tool/plugin/read.js +161 -127
  680. package/dist/tool/plugin/shell.js +224 -217
  681. package/dist/tool/plugin/skill.js +149 -115
  682. package/dist/tool/plugin/subagent.js +220 -213
  683. package/dist/tool/plugin/todo.js +145 -138
  684. package/dist/tool/plugin/webfetch.js +149 -115
  685. package/dist/tool/plugin/websearch.js +147 -116
  686. package/dist/tool/plugin/write.js +156 -122
  687. package/dist/tool/read-filesystem.js +106 -100
  688. package/dist/tool/runtime.js +1 -1
  689. package/dist/tool-output.js +7 -7
  690. package/dist/tool.js +12 -12
  691. package/dist/types/agent.d.ts +5 -0
  692. package/dist/types/aisdk.d.ts +1 -1
  693. package/dist/types/config/integration.d.ts +81 -0
  694. package/dist/types/config/plugin/command.d.ts +1 -1
  695. package/dist/types/config/plugin/provider.d.ts +8 -0
  696. package/dist/types/config.d.ts +8 -1
  697. package/dist/types/console-access.d.ts +7 -0
  698. package/dist/types/credential.d.ts +2 -0
  699. package/dist/types/database/migration/20261024002554_session_allowance.d.ts +3 -0
  700. package/dist/types/database/migration/20261024175301_drop_session_allowance.d.ts +3 -0
  701. package/dist/types/database/migration/20261025123711_blob.d.ts +3 -0
  702. package/dist/types/database/migration/20261025154125_drop_session_pending.d.ts +3 -0
  703. package/dist/types/effect/app-node-platform.d.ts +3 -2
  704. package/dist/types/environment/files.d.ts +2 -0
  705. package/dist/types/environment/index.d.ts +1 -1
  706. package/dist/types/file-access.d.ts +3 -3
  707. package/dist/types/filesystem/fff.d.ts +1 -0
  708. package/dist/types/filesystem/file-watch.d.ts +33 -0
  709. package/dist/types/filesystem/search.d.ts +3 -0
  710. package/dist/types/generate.d.ts +39 -7
  711. package/dist/types/git.d.ts +17 -2
  712. package/dist/types/image/photon-normalize.d.ts +28 -0
  713. package/dist/types/image/photon-worker.d.ts +12 -0
  714. package/dist/types/image/photon.d.ts +14 -4
  715. package/dist/types/instance/service.d.ts +2 -0
  716. package/dist/types/instance.d.ts +2 -2
  717. package/dist/types/mcp/client.d.ts +2 -0
  718. package/dist/types/mcp/index.d.ts +1 -1
  719. package/dist/types/mime.d.ts +1 -1
  720. package/dist/types/model-resolver.d.ts +8 -1
  721. package/dist/types/model-retry.d.ts +3 -1
  722. package/dist/types/model.d.ts +28 -1
  723. package/dist/types/models-dev/v1.d.ts +3 -0
  724. package/dist/types/models-dev.d.ts +3 -3
  725. package/dist/types/plugin/host.d.ts +3 -2
  726. package/dist/types/plugin/internal.d.ts +2 -3
  727. package/dist/types/plugin/module.d.ts +10 -0
  728. package/dist/types/plugin/optimize.d.ts +26 -0
  729. package/dist/types/plugin/provider/azure.d.ts +2 -2
  730. package/dist/types/plugin/provider/chatgpt.d.ts +1 -1
  731. package/dist/types/plugin/provider/github-copilot.d.ts +1 -1
  732. package/dist/types/plugin/provider/gitlab.d.ts +1 -1
  733. package/dist/types/plugin/provider/google-vertex.d.ts +1 -1
  734. package/dist/types/plugin/provider/modal.d.ts +1 -1
  735. package/dist/types/plugin/provider/openai.d.ts +1 -1
  736. package/dist/types/plugin/provider/opencode-legacy.d.ts +69 -0
  737. package/dist/types/plugin/provider/opencode.d.ts +2 -2
  738. package/dist/types/plugin/provider/snowflake-cortex.d.ts +1 -1
  739. package/dist/types/plugin/service.d.ts +12 -0
  740. package/dist/types/plugin.d.ts +1 -1
  741. package/dist/types/project/icon.d.ts +26 -0
  742. package/dist/types/project.d.ts +3 -2
  743. package/dist/types/provider.d.ts +33 -3
  744. package/dist/types/ripgrep/binary.d.ts +1 -0
  745. package/dist/types/rpc.d.ts +2 -0
  746. package/dist/types/session/blob.d.ts +2687 -0
  747. package/dist/types/session/compaction.d.ts +13 -10
  748. package/dist/types/session/generate.d.ts +2 -2
  749. package/dist/types/session/history.d.ts +2078 -23
  750. package/dist/types/session/inbox.d.ts +73 -114
  751. package/dist/types/session/instruction-entry.d.ts +1 -1
  752. package/dist/types/session/model-request.d.ts +2 -2
  753. package/dist/types/session/prompt.d.ts +6 -2
  754. package/dist/types/session/recent-text.d.ts +2 -1
  755. package/dist/types/session/runner/index.d.ts +1 -1
  756. package/dist/types/session/runner/model.d.ts +1 -1
  757. package/dist/types/session/runner/publish-llm-event.d.ts +4 -2
  758. package/dist/types/session/runner/retry.d.ts +1 -1
  759. package/dist/types/session/runner/step.d.ts +2 -2
  760. package/dist/types/session/runner/to-llm-message.d.ts +1 -1
  761. package/dist/types/session/schema.d.ts +4 -0
  762. package/dist/types/session/sql.d.ts +196 -122
  763. package/dist/types/session/store.d.ts +7 -0
  764. package/dist/types/session/stored.d.ts +462 -0
  765. package/dist/types/session/title.d.ts +1 -1
  766. package/dist/types/session/to-session-error.d.ts +1 -1
  767. package/dist/types/session/transfer.d.ts +4 -0
  768. package/dist/types/session/usage.d.ts +1 -1
  769. package/dist/types/session.d.ts +9 -0
  770. package/dist/types/state.d.ts +6 -0
  771. package/dist/types/tool/plugin/edit.d.ts +2 -1
  772. package/dist/types/tool/plugin/glob.d.ts +1 -1
  773. package/dist/types/tool/plugin/grep.d.ts +1 -1
  774. package/dist/types/tool/plugin/patch.d.ts +2 -1
  775. package/dist/types/tool/plugin/shell.d.ts +1 -1
  776. package/dist/types/tool/plugin/subagent.d.ts +1 -1
  777. package/dist/types/tool/plugin/write.d.ts +1 -1
  778. package/dist/types/tool/runtime.d.ts +1 -1
  779. package/dist/types/tool.d.ts +1 -1
  780. package/dist/types/usage-limits.d.ts +103 -0
  781. package/dist/types/util/git-executable.d.ts +6 -2
  782. package/dist/types/v1/config/mcp.d.ts +4 -0
  783. package/dist/types/v1/config/migrate.d.ts +2 -0
  784. package/dist/types/vcs.d.ts +3 -2
  785. package/dist/types/voice.d.ts +3 -31
  786. package/dist/types/wellknown/plugin.d.ts +1 -1
  787. package/dist/usage-limits.js +100 -0
  788. package/dist/util/error-summary.js +1 -1
  789. package/dist/util/git-executable.js +5 -2
  790. package/dist/util/lazy.js +1 -1
  791. package/dist/util/slug.js +1 -1
  792. package/dist/util/token.js +1 -1
  793. package/dist/util/which.js +1 -1
  794. package/dist/util/wildcard.js +1 -1
  795. package/dist/v1/config/agent.js +7 -7
  796. package/dist/v1/config/command.js +3 -3
  797. package/dist/v1/config/mcp.js +6 -6
  798. package/dist/v1/config/migrate.js +100 -94
  799. package/dist/v1/config/permission.js +7 -7
  800. package/dist/v1/config/plugin.js +3 -3
  801. package/dist/v1/config/provider-options.js +1 -1
  802. package/dist/v1/config/provider.js +4 -4
  803. package/dist/variant.js +101 -95
  804. package/dist/vcs/patch.js +1 -1
  805. package/dist/vcs.js +99 -91
  806. package/dist/voice.js +94 -90
  807. package/dist/websearch.js +88 -84
  808. package/dist/wellknown/plugin.js +82 -78
  809. package/dist/wellknown.js +87 -83
  810. package/dist/workspace/driver.js +7 -7
  811. package/dist/workspace/sql.js +1 -1
  812. package/dist/workspace.js +88 -84
  813. package/dist/worktree/directory.js +2 -2
  814. package/dist/worktree/git.js +11 -10
  815. package/dist/worktree/sql.js +5 -5
  816. package/dist/worktree/strategies.js +97 -91
  817. package/dist/worktree.js +104 -98
  818. package/package.json +10 -9
  819. package/dist/chunks/location-00ve6mdn.js +0 -18
  820. package/dist/chunks/location-8230236v.js +0 -257
  821. package/dist/chunks/location-akfw3dm8.js +0 -321
  822. package/dist/chunks/location-ef5x83kb.js +0 -15
  823. package/dist/chunks/location-gb9gmc0j.js +0 -39
  824. package/dist/chunks/location-hzsp1kxy.js +0 -107
  825. package/dist/chunks/location-khh5ttga.js +0 -26
  826. package/dist/chunks/location-mx81xwtn.js +0 -82
  827. package/dist/chunks/location-z1f2n5q4.js +0 -621
  828. package/dist/chunks/location-zfwjf24c.js +0 -219
  829. /package/dist/chunks/{location-0qkdqm5v.js → tool-0qkdqm5v.js} +0 -0
  830. /package/dist/chunks/{location-0zkw76rk.js → tool-0zkw76rk.js} +0 -0
  831. /package/dist/chunks/{location-17cy0kzp.js → tool-17cy0kzp.js} +0 -0
  832. /package/dist/chunks/{location-1cnp2v09.js → tool-1cnp2v09.js} +0 -0
  833. /package/dist/chunks/{location-24dcb14g.js → tool-24dcb14g.js} +0 -0
  834. /package/dist/chunks/{location-2710q6r3.js → tool-2710q6r3.js} +0 -0
  835. /package/dist/chunks/{location-2bv980vf.js → tool-2bv980vf.js} +0 -0
  836. /package/dist/chunks/{location-2c3vjs8z.js → tool-2c3vjs8z.js} +0 -0
  837. /package/dist/chunks/{location-359p4xyc.js → tool-359p4xyc.js} +0 -0
  838. /package/dist/chunks/{location-3asan66x.js → tool-3asan66x.js} +0 -0
  839. /package/dist/chunks/{location-3v8g72cx.js → tool-3v8g72cx.js} +0 -0
  840. /package/dist/chunks/{location-3wcehsnq.js → tool-3wcehsnq.js} +0 -0
  841. /package/dist/chunks/{location-43n2bw4t.js → tool-43n2bw4t.js} +0 -0
  842. /package/dist/chunks/{location-4knz6hnm.js → tool-4knz6hnm.js} +0 -0
  843. /package/dist/chunks/{location-4vcrnpx2.js → tool-4vcrnpx2.js} +0 -0
  844. /package/dist/chunks/{location-4y7fprxs.js → tool-4y7fprxs.js} +0 -0
  845. /package/dist/chunks/{location-53557ph1.js → tool-53557ph1.js} +0 -0
  846. /package/dist/chunks/{location-550bvhaj.js → tool-550bvhaj.js} +0 -0
  847. /package/dist/chunks/{location-6prwharc.js → tool-6prwharc.js} +0 -0
  848. /package/dist/chunks/{location-6q2bdcd1.js → tool-6q2bdcd1.js} +0 -0
  849. /package/dist/chunks/{location-7akdwqpd.js → tool-7akdwqpd.js} +0 -0
  850. /package/dist/chunks/{location-7m9af43g.js → tool-7m9af43g.js} +0 -0
  851. /package/dist/chunks/{location-822emrt2.js → tool-822emrt2.js} +0 -0
  852. /package/dist/chunks/{location-84wd9syh.js → tool-84wd9syh.js} +0 -0
  853. /package/dist/chunks/{location-88xbtdfr.js → tool-88xbtdfr.js} +0 -0
  854. /package/dist/chunks/{location-8n3pysct.js → tool-8n3pysct.js} +0 -0
  855. /package/dist/chunks/{location-8wj87zfr.js → tool-8wj87zfr.js} +0 -0
  856. /package/dist/chunks/{location-9a4afbnw.js → tool-9a4afbnw.js} +0 -0
  857. /package/dist/chunks/{location-9rqn6x4v.js → tool-9rqn6x4v.js} +0 -0
  858. /package/dist/chunks/{location-a058387c.js → tool-a058387c.js} +0 -0
  859. /package/dist/chunks/{location-a6k6eb26.js → tool-a6k6eb26.js} +0 -0
  860. /package/dist/chunks/{location-af5trqkr.js → tool-af5trqkr.js} +0 -0
  861. /package/dist/chunks/{location-afrmfg78.js → tool-afrmfg78.js} +0 -0
  862. /package/dist/chunks/{location-aqzs7mqg.js → tool-aqzs7mqg.js} +0 -0
  863. /package/dist/chunks/{location-atq7p7m5.js → tool-atq7p7m5.js} +0 -0
  864. /package/dist/chunks/{location-bkyjaxrp.js → tool-bkyjaxrp.js} +0 -0
  865. /package/dist/chunks/{location-bmr6ed5q.js → tool-bmr6ed5q.js} +0 -0
  866. /package/dist/chunks/{location-cf4snx6d.js → tool-cf4snx6d.js} +0 -0
  867. /package/dist/chunks/{location-cvy3z8tj.js → tool-cvy3z8tj.js} +0 -0
  868. /package/dist/chunks/{location-d9fn303g.js → tool-d9fn303g.js} +0 -0
  869. /package/dist/chunks/{location-d9jj8t3e.js → tool-d9jj8t3e.js} +0 -0
  870. /package/dist/chunks/{location-dajrwvna.js → tool-dajrwvna.js} +0 -0
  871. /package/dist/chunks/{location-dap0rakb.js → tool-dap0rakb.js} +0 -0
  872. /package/dist/chunks/{location-df08tz66.js → tool-df08tz66.js} +0 -0
  873. /package/dist/chunks/{location-dy18nga0.js → tool-dy18nga0.js} +0 -0
  874. /package/dist/chunks/{location-e5kj55wp.js → tool-e5kj55wp.js} +0 -0
  875. /package/dist/chunks/{location-e73j6tqm.js → tool-e73j6tqm.js} +0 -0
  876. /package/dist/chunks/{location-ec1grn59.js → tool-ec1grn59.js} +0 -0
  877. /package/dist/chunks/{location-eh3zwz77.js → tool-eh3zwz77.js} +0 -0
  878. /package/dist/chunks/{location-emrn6kk6.js → tool-emrn6kk6.js} +0 -0
  879. /package/dist/chunks/{location-f0mxakyp.js → tool-f0mxakyp.js} +0 -0
  880. /package/dist/chunks/{location-f6n9ztr4.js → tool-f6n9ztr4.js} +0 -0
  881. /package/dist/chunks/{location-faypxj3z.js → tool-faypxj3z.js} +0 -0
  882. /package/dist/chunks/{location-fd410y7t.js → tool-fd410y7t.js} +0 -0
  883. /package/dist/chunks/{location-g4wezp1m.js → tool-g4wezp1m.js} +0 -0
  884. /package/dist/chunks/{location-g86h250q.js → tool-g86h250q.js} +0 -0
  885. /package/dist/chunks/{location-gebd4c9n.js → tool-gebd4c9n.js} +0 -0
  886. /package/dist/chunks/{location-gftt206x.js → tool-gftt206x.js} +0 -0
  887. /package/dist/chunks/{location-hcxmzztb.js → tool-hcxmzztb.js} +0 -0
  888. /package/dist/chunks/{location-hk9envan.js → tool-hk9envan.js} +0 -0
  889. /package/dist/chunks/{location-j2ntwpah.js → tool-j2ntwpah.js} +0 -0
  890. /package/dist/chunks/{location-j5zkgpj8.js → tool-j5zkgpj8.js} +0 -0
  891. /package/dist/chunks/{location-jjkms2e6.js → tool-jjkms2e6.js} +0 -0
  892. /package/dist/chunks/{location-jr7sbwjy.js → tool-jr7sbwjy.js} +0 -0
  893. /package/dist/chunks/{location-jwfs4k6c.js → tool-jwfs4k6c.js} +0 -0
  894. /package/dist/chunks/{location-jze0r7bz.js → tool-jze0r7bz.js} +0 -0
  895. /package/dist/chunks/{location-jzg6c2d5.js → tool-jzg6c2d5.js} +0 -0
  896. /package/dist/chunks/{location-m18g726c.js → tool-m18g726c.js} +0 -0
  897. /package/dist/chunks/{location-mp448xyj.js → tool-mp448xyj.js} +0 -0
  898. /package/dist/chunks/{location-msx8hqn2.js → tool-msx8hqn2.js} +0 -0
  899. /package/dist/chunks/{location-n05xt0ee.js → tool-n05xt0ee.js} +0 -0
  900. /package/dist/chunks/{location-n3j8tn72.js → tool-n3j8tn72.js} +0 -0
  901. /package/dist/chunks/{location-njntx4h6.js → tool-njntx4h6.js} +0 -0
  902. /package/dist/chunks/{location-q3sfg36h.js → tool-q3sfg36h.js} +0 -0
  903. /package/dist/chunks/{location-q74kybfr.js → tool-q74kybfr.js} +0 -0
  904. /package/dist/chunks/{location-qaymkmh1.js → tool-qaymkmh1.js} +0 -0
  905. /package/dist/chunks/{location-qb87gjwd.js → tool-qb87gjwd.js} +0 -0
  906. /package/dist/chunks/{location-qfa1cgps.js → tool-qfa1cgps.js} +0 -0
  907. /package/dist/chunks/{location-qg3g05ea.js → tool-qg3g05ea.js} +0 -0
  908. /package/dist/chunks/{location-qrg20bc0.js → tool-qrg20bc0.js} +0 -0
  909. /package/dist/chunks/{location-rcb2kzg1.js → tool-rcb2kzg1.js} +0 -0
  910. /package/dist/chunks/{location-sdp7kfr6.js → tool-sdp7kfr6.js} +0 -0
  911. /package/dist/chunks/{location-ssg3fenm.js → tool-ssg3fenm.js} +0 -0
  912. /package/dist/chunks/{location-ve7vex1e.js → tool-ve7vex1e.js} +0 -0
  913. /package/dist/chunks/{location-w803qqfp.js → tool-w803qqfp.js} +0 -0
  914. /package/dist/chunks/{location-wc3fc9cn.js → tool-wc3fc9cn.js} +0 -0
  915. /package/dist/chunks/{location-wer8tq1h.js → tool-wer8tq1h.js} +0 -0
  916. /package/dist/chunks/{location-wtztk69x.js → tool-wtztk69x.js} +0 -0
  917. /package/dist/chunks/{location-x0ckcb58.js → tool-x0ckcb58.js} +0 -0
  918. /package/dist/chunks/{location-x61499pn.js → tool-x61499pn.js} +0 -0
  919. /package/dist/chunks/{location-y44na4kk.js → tool-y44na4kk.js} +0 -0
  920. /package/dist/chunks/{location-y8f7s663.js → tool-y8f7s663.js} +0 -0
  921. /package/dist/chunks/{location-ygaqb7jw.js → tool-ygaqb7jw.js} +0 -0
  922. /package/dist/chunks/{location-ym463w8f.js → tool-ym463w8f.js} +0 -0
  923. /package/dist/chunks/{location-z5v4ffb3.js → tool-z5v4ffb3.js} +0 -0
  924. /package/dist/chunks/{location-z9919s4g.js → tool-z9919s4g.js} +0 -0
@@ -0,0 +1,479 @@
1
+ import {
2
+ useragent2
3
+ } from "./tool-maq43m3m.js";
4
+ import {
5
+ Service86
6
+ } from "./tool-c1y12bqd.js";
7
+ import {
8
+ ID16,
9
+ OAuth3,
10
+ Event19
11
+ } from "./tool-g3b4788n.js";
12
+ import {
13
+ key2
14
+ } from "./tool-61ennm6n.js";
15
+ import {
16
+ ID14,
17
+ MethodID2,
18
+ AuthorizationError2
19
+ } from "./tool-5n6snyjt.js";
20
+ import {
21
+ ID13
22
+ } from "./tool-yqsmg75a.js";
23
+ import {
24
+ Service69
25
+ } from "./tool-3jy1f5rc.js";
26
+ import {
27
+ Remote2,
28
+ Document2,
29
+ make12
30
+ } from "./tool-e07q2w5p.js";
31
+ import {
32
+ integrate2
33
+ } from "./tool-2esqe60t.js";
34
+ import {
35
+ defaultServer2,
36
+ server2,
37
+ headers2
38
+ } from "./tool-kt3bjfbg.js";
39
+ import {
40
+ Service18
41
+ } from "./tool-9kqcsae8.js";
42
+ import {
43
+ ID4,
44
+ Input14,
45
+ Response3
46
+ } from "./tool-p84syj9g.js";
47
+ import {
48
+ Response2,
49
+ make11,
50
+ statements2,
51
+ providerIDs2,
52
+ register3
53
+ } from "./tool-j775gmwt.js";
54
+
55
+ // src/plugin/provider/opencode.ts
56
+ import {
57
+ Clock,
58
+ Duration,
59
+ Effect,
60
+ Equal,
61
+ FiberHandle,
62
+ Option,
63
+ Predicate,
64
+ Schema,
65
+ Scope,
66
+ Semaphore,
67
+ Stream
68
+ } from "effect";
69
+ import { define } from "@opencode/plugin/effect/plugin";
70
+ import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http";
71
+ var clientID = "opencode-cli";
72
+ var methodID = MethodID2.make("device");
73
+ var Device = Schema.Struct({
74
+ device_code: Schema.String,
75
+ user_code: Schema.String,
76
+ verification_uri_complete: Schema.String,
77
+ expires_in: Schema.Number,
78
+ interval: Schema.Number
79
+ });
80
+ var Token = Schema.Struct({
81
+ access_token: Schema.String,
82
+ refresh_token: Schema.String,
83
+ expires_in: Schema.Number,
84
+ org_id: Schema.optional(Schema.NullOr(Schema.String))
85
+ });
86
+ var TokenPending = Schema.Struct({ error: Schema.String });
87
+ var DeviceToken = Schema.Union([Token, TokenPending]);
88
+ var User = Schema.Struct({ id: Schema.String, email: Schema.String });
89
+ var Org = Schema.Struct({ id: Schema.String, name: Schema.String });
90
+ var SsoRequired = Schema.Struct({
91
+ _tag: Schema.Literal("SsoRequired"),
92
+ orgId: Schema.String,
93
+ connectionId: Schema.String
94
+ });
95
+ var InvalidGrant = Schema.Struct({ error: Schema.Literal("invalid_grant") });
96
+ var Unauthorized = Schema.Struct({ _tag: Schema.Literal("Unauthorized") });
97
+ var signedOutMessage = "Reconnect OpenCode Console to continue";
98
+ var ssoMessage = (organization) => `Sign in with SSO again to use ${organization ?? "your OpenCode Console organization"}`;
99
+
100
+ class SsoRequiredError extends Schema.TaggedError()("OpencodeConsole.SsoRequired", {
101
+ organization: Schema.optional(Schema.String),
102
+ url: Schema.String
103
+ }) {
104
+ get message() {
105
+ return `${ssoMessage(this.organization)}.`;
106
+ }
107
+ }
108
+
109
+ class SignedOutError extends Schema.TaggedError()("OpencodeConsole.SignedOut", {}) {
110
+ get message() {
111
+ return `${signedOutMessage}.`;
112
+ }
113
+ }
114
+ function oauth(http) {
115
+ return {
116
+ integrationID: ID14.make("opencode"),
117
+ method: {
118
+ id: methodID,
119
+ type: "oauth",
120
+ label: "OpenCode Console account",
121
+ form: [
122
+ {
123
+ key: "server",
124
+ type: "string",
125
+ format: "uri",
126
+ hidden: true,
127
+ default: defaultServer2
128
+ }
129
+ ]
130
+ },
131
+ authorize: (answer) => Effect.gen(function* () {
132
+ const server = yield* normalizeServer(answer.server ?? defaultServer2);
133
+ const device = yield* post(http, `${server}/auth/device/code`, { client_id: clientID, supports_org_scope: true }, Device);
134
+ const verification = yield* Effect.try({
135
+ try: () => {
136
+ const url = new URL(device.verification_uri_complete, `${server}/`);
137
+ if (url.protocol !== "http:" && url.protocol !== "https:")
138
+ throw new Error("expected HTTP(S)");
139
+ return url;
140
+ },
141
+ catch: (cause) => new Error(`Invalid device verification URL: ${cause instanceof Error ? cause.message : String(cause)}`)
142
+ });
143
+ return {
144
+ mode: "auto",
145
+ url: verification.href,
146
+ instructions: `Enter code: ${device.user_code}`,
147
+ callback: poll(http, server, device.device_code, Duration.seconds(device.interval))
148
+ };
149
+ }),
150
+ refresh: (credential) => Effect.gen(function* () {
151
+ const response = yield* send(http, `${server2(credential)}/auth/device/token`, {
152
+ grant_type: "refresh_token",
153
+ refresh_token: credential.refresh,
154
+ client_id: clientID
155
+ });
156
+ if (response.status === 400) {
157
+ const body = yield* HttpClientResponse.schemaBodyJson(InvalidGrant)(response).pipe(Effect.option);
158
+ if (Option.isSome(body))
159
+ return yield* new SignedOutError;
160
+ }
161
+ const token = yield* HttpClientResponse.filterStatusOk(response).pipe(Effect.flatMap(HttpClientResponse.schemaBodyJson(Token)));
162
+ return {
163
+ ...credential,
164
+ access: token.access_token,
165
+ refresh: token.refresh_token,
166
+ expires: Date.now() + token.expires_in * 1000,
167
+ metadata: token.org_id == null ? credential.metadata : {
168
+ ...credential.metadata,
169
+ orgID: token.org_id,
170
+ orgName: credential.metadata?.orgID === token.org_id && typeof credential.metadata.orgName === "string" ? credential.metadata.orgName : token.org_id
171
+ }
172
+ };
173
+ }),
174
+ label: (credential) => typeof credential.metadata?.orgName === "string" ? credential.metadata.orgName : undefined
175
+ };
176
+ }
177
+ var OpencodePlugin2 = define({
178
+ id: "opencode.provider.opencode",
179
+ effect: Effect.fn(function* (ctx) {
180
+ const disableFree = ["1", "true"].includes(process.env.OPENCODE_DISABLE_FREE_MODELS?.toLowerCase() ?? "");
181
+ const bus = yield* Service86;
182
+ const client = yield* HttpClient.HttpClient;
183
+ const http = HttpClient.mapRequest(client, HttpClientRequest.setHeader("User-Agent", useragent2(ctx.app)));
184
+ const managed = yield* Service18;
185
+ const config = yield* Service69;
186
+ const scope = yield* Scope.Scope;
187
+ const loading = Semaphore.makeUnsafe(1);
188
+ let snapshot = { remote: undefined, connection: undefined, organization: undefined };
189
+ let reported;
190
+ let explainers = [];
191
+ let checked = Number.NEGATIVE_INFINITY;
192
+ const load = Effect.fn("OpencodePlugin.load")(function* () {
193
+ checked = yield* Clock.currentTimeMillis;
194
+ const connection = yield* ctx.integration.connection.active("opencode");
195
+ if (!connection) {
196
+ reported = undefined;
197
+ return { remote: undefined, connection, organization: undefined };
198
+ }
199
+ const status = (status) => {
200
+ reported = status;
201
+ return ctx.integration.connection.status({ integrationID: "opencode", connection, status });
202
+ };
203
+ return yield* ctx.integration.connection.resolve(connection).pipe(Effect.flatMap((credential) => {
204
+ if (!credential || credential.type === "external")
205
+ return Effect.succeed({ remote: undefined, connection, organization: undefined });
206
+ return fetchConfig(http, credential).pipe(Effect.map((remote) => ({
207
+ remote: remote?.type === "legacy" ? make11(remote.response, headers2(credential)) : remote,
208
+ connection,
209
+ organization: organizationName(credential)
210
+ })));
211
+ }), Effect.tap(() => status(undefined)), Effect.catch((cause) => Effect.gen(function* () {
212
+ const next = connectionStatus(cause);
213
+ if (next)
214
+ yield* status(next);
215
+ yield* Effect.logWarning("failed to load OpenCode provider config", { cause });
216
+ return key2(connection) === key2(snapshot.connection) ? { remote: snapshot.remote, connection, organization: snapshot.organization } : { remote: undefined, connection, organization: undefined };
217
+ })));
218
+ });
219
+ let integrated;
220
+ const integrate = Effect.fnUntraced(function* (document) {
221
+ yield* config.integration?.(ID14.make("opencode"), document) ?? Effect.void;
222
+ integrated = (yield* config.entries()).find((entry) => entry instanceof Document2 && entry.integrationID === ID14.make("opencode"));
223
+ });
224
+ const publish = Effect.fnUntraced(function* (next) {
225
+ switch (next.remote?.type) {
226
+ case "config":
227
+ yield* managed.set({ statements: [], organization: next.organization });
228
+ return yield* integrate(next.connection && make12({
229
+ integrationID: ID14.make("opencode"),
230
+ connection: next.connection.type === "credential" ? { ...next.connection, id: ID16.make(next.connection.id) } : next.connection,
231
+ organization: next.organization,
232
+ info: next.remote.info
233
+ }));
234
+ case "legacy":
235
+ yield* managed.set({ statements: statements2(next.remote), organization: next.organization });
236
+ return yield* integrate(undefined);
237
+ default:
238
+ yield* managed.set({ statements: [], organization: next.organization });
239
+ return yield* integrate(undefined);
240
+ }
241
+ });
242
+ const search = (providerID, connection) => ({
243
+ id: providerID,
244
+ name: "OpenCode Web Search",
245
+ execute: (input) => Effect.gen(function* () {
246
+ const active = yield* ctx.integration.connection.active("opencode");
247
+ if (!active || (connection.type === "credential" ? active.type !== "credential" || active.id !== connection.id : active.type !== "env" || active.name !== connection.name)) {
248
+ return yield* Effect.fail(new Error("OpenCode Console connection changed"));
249
+ }
250
+ const credential = yield* ctx.integration.connection.resolve(active);
251
+ if (!credential || credential.type === "external")
252
+ return yield* Effect.fail(new Error("OpenCode Console is not connected"));
253
+ const metadata = credential.metadata;
254
+ const orgID = typeof metadata?.orgID === "string" ? metadata.orgID : undefined;
255
+ const token = credential.type === "oauth" ? credential.access : credential.key;
256
+ const server = yield* normalizeServer(server2(credential));
257
+ const request = yield* HttpClientRequest.post(`${server}/api/websearch`).pipe(HttpClientRequest.acceptJson, HttpClientRequest.bearerToken(token), HttpClientRequest.setHeaders(orgID ? { "x-org-id": orgID } : {}), HttpClientRequest.schemaBodyJson(Input14)({
258
+ query: input.query,
259
+ providerID
260
+ }));
261
+ const response = yield* HttpClient.withScope(HttpClient.filterStatusOk(http)).execute(request).pipe(Effect.provideService(FetchHttpClient.RequestInit, { redirect: "error" }), Effect.flatMap(HttpClientResponse.schemaBodyJson(Response3)), Effect.scoped, Effect.timeoutOrElse({
262
+ duration: Duration.seconds(25),
263
+ orElse: () => Effect.fail(new Error("OpenCode web search request timed out"))
264
+ }));
265
+ if (response.providerID !== providerID) {
266
+ return yield* Effect.fail(new Error(`OpenCode web search returned provider ${response.providerID} instead of ${providerID}`));
267
+ }
268
+ return response.results;
269
+ })
270
+ });
271
+ yield* ctx.integration.transform((editor) => {
272
+ editor.update("opencode", (integration) => {
273
+ integration.name = "OpenCode Console";
274
+ });
275
+ editor.method.update(oauth(http));
276
+ editor.method.update({ integrationID: "opencode", method: { type: "key", label: "API key (service account)" } });
277
+ });
278
+ snapshot = yield* load();
279
+ yield* publish(snapshot);
280
+ yield* register3(ctx, () => snapshot, search);
281
+ yield* ctx.provider.transform((providers) => {
282
+ if (integrated)
283
+ integrate2(providers, integrated);
284
+ });
285
+ yield* ctx.provider.transform((providers) => {
286
+ const item = providers.get(ID13.opencode);
287
+ if (!item)
288
+ return;
289
+ const hasKey = Boolean(process.env.OPENCODE_API_KEY || snapshot.connection || item.provider.settings?.apiKey);
290
+ providers.update(item.provider.id, (provider) => {
291
+ if (!hasKey && !disableFree) {
292
+ provider.activation = "enabled";
293
+ provider.settings = { ...provider.settings, apiKey: "public" };
294
+ }
295
+ });
296
+ });
297
+ yield* ctx.model.transform((models) => {
298
+ const item = models.provider.get(ID13.opencode);
299
+ if (!item)
300
+ return;
301
+ const hasKey = Boolean(process.env.OPENCODE_API_KEY || snapshot.connection || item.provider.settings?.apiKey && item.provider.settings.apiKey !== "public");
302
+ if (hasKey)
303
+ return;
304
+ for (const model of models.list(item.provider.id)) {
305
+ if (!model.cost.some((cost) => cost.input > 0))
306
+ continue;
307
+ models.update(item.provider.id, model.id, (draft) => {
308
+ draft.enabled = false;
309
+ });
310
+ }
311
+ });
312
+ yield* ctx.websearch.transform((editor) => {
313
+ if (snapshot.remote?.type === "config" && snapshot.connection)
314
+ editor.add(search(ID4.make("opencode"), snapshot.connection));
315
+ });
316
+ const apply = Effect.fn("OpencodePlugin.apply")(function* (next) {
317
+ snapshot = next;
318
+ yield* publish(next);
319
+ yield* guard(next);
320
+ yield* Effect.all([ctx.provider.reload(), ctx.websearch.reload(), ctx.mcp.reload()], {
321
+ concurrency: 3,
322
+ discard: true
323
+ });
324
+ });
325
+ const refresh = () => loading.withPermit(load().pipe(Effect.andThen(apply)));
326
+ const check = (maxAge = Duration.zero) => loading.withPermit(Effect.gen(function* () {
327
+ if ((yield* Clock.currentTimeMillis) - checked < Duration.toMillis(maxAge))
328
+ return;
329
+ const next = yield* load();
330
+ if (!Equal.equals(snapshot, next))
331
+ yield* apply(next);
332
+ }));
333
+ const explain = (event) => Effect.gen(function* () {
334
+ if (event.response.status !== 401 && event.response.status !== 403)
335
+ return;
336
+ yield* check(Duration.seconds(30));
337
+ const status = reported;
338
+ if (!status)
339
+ return;
340
+ event.response.body?.cancel();
341
+ event.response = Response.json({
342
+ error: {
343
+ type: "authentication_error",
344
+ message: `${status.message}.`
345
+ }
346
+ }, { status: event.response.status });
347
+ });
348
+ const guard = Effect.fn("OpencodePlugin.guard")(function* (next) {
349
+ yield* Effect.forEach(explainers, (registration) => registration.dispose, { discard: true });
350
+ explainers = yield* Effect.forEach(next.connection ? new Set([
351
+ ID13.opencode,
352
+ ...next.remote?.type === "config" ? Object.keys(next.remote.info.providers ?? {}) : providerIDs2(next.remote)
353
+ ]) : [], (providerID) => ctx.session.hook("http.response", explain, { providerID }).pipe(Scope.provide(scope)));
354
+ });
355
+ yield* guard(snapshot);
356
+ const polling = yield* FiberHandle.make();
357
+ const poll = Effect.fnUntraced(function* () {
358
+ if (!snapshot.connection)
359
+ return yield* FiberHandle.clear(polling);
360
+ yield* FiberHandle.run(polling, Effect.sleep(Duration.minutes(1)).pipe(Effect.andThen(check()), Effect.forever), {
361
+ onlyIfMissing: true
362
+ });
363
+ });
364
+ yield* bus.subscribe(Event19.Switched).pipe(Stream.filter((event) => event.data.integrationID === ID14.make("opencode")), Stream.runForEach(() => refresh().pipe(Effect.andThen(poll()))), Effect.forkScoped({ startImmediately: true }));
365
+ yield* poll();
366
+ })
367
+ });
368
+ function fetchConfig(http, value) {
369
+ return HttpClient.withScope(http).execute(HttpClientRequest.get(`${server2(value)}/api/v2/config`).pipe(HttpClientRequest.acceptJson, HttpClientRequest.setHeaders(headers2(value)))).pipe(Effect.flatMap((response) => Effect.gen(function* () {
370
+ if (response.status === 404)
371
+ return;
372
+ if (response.status === 401) {
373
+ const body = yield* HttpClientResponse.schemaBodyJson(Unauthorized)(response).pipe(Effect.option);
374
+ if (Option.isSome(body))
375
+ return yield* new SignedOutError;
376
+ }
377
+ if (response.status === 403) {
378
+ const body = yield* HttpClientResponse.schemaBodyJson(SsoRequired)(response).pipe(Effect.option);
379
+ if (Option.isSome(body))
380
+ return yield* new SsoRequiredError({
381
+ organization: organizationName(value),
382
+ url: yield* ssoUrl(server2(value), body.value.connectionId)
383
+ });
384
+ }
385
+ const body = yield* HttpClientResponse.filterStatusOk(response).pipe(Effect.flatMap((ok) => ok.json));
386
+ if (Predicate.hasProperty(body, "$schema"))
387
+ return { type: "config", info: yield* Schema.decodeUnknownEffect(Remote2)(body) };
388
+ return { type: "legacy", response: yield* Schema.decodeUnknownEffect(Response2)(body) };
389
+ })), Effect.scoped);
390
+ }
391
+ function ssoUrl(server, connectionID) {
392
+ return normalizeServer(server).pipe(Effect.map((base) => {
393
+ const redirectTo = `${new URL(base).pathname.replace(/\/+$/, "")}/`;
394
+ return `${base}/auth/sso/${encodeURIComponent(connectionID)}/start?redirectTo=${encodeURIComponent(redirectTo)}`;
395
+ }));
396
+ }
397
+ function connectionStatus(cause) {
398
+ if (cause instanceof SsoRequiredError)
399
+ return {
400
+ status: "needs_auth",
401
+ message: ssoMessage(cause.organization),
402
+ url: cause.url
403
+ };
404
+ if (cause instanceof SignedOutError || cause instanceof AuthorizationError2 && cause.cause instanceof SignedOutError)
405
+ return { status: "needs_auth", message: signedOutMessage };
406
+ return;
407
+ }
408
+ function organizationName(credential) {
409
+ return typeof credential.metadata?.orgName === "string" ? credential.metadata.orgName : undefined;
410
+ }
411
+ function normalizeServer(input) {
412
+ return Effect.try({
413
+ try: () => {
414
+ if (typeof input !== "string")
415
+ throw new Error("expected string");
416
+ const url = new URL(input);
417
+ if (url.protocol !== "http:" && url.protocol !== "https:")
418
+ throw new Error("expected HTTP(S)");
419
+ return `${url.origin}${url.pathname.replace(/\/+$/, "")}`;
420
+ },
421
+ catch: (cause) => new Error(`Invalid OpenCode server URL: ${cause instanceof Error ? cause.message : String(cause)}`)
422
+ });
423
+ }
424
+ function poll(http, server, deviceCode, interval) {
425
+ const loop = (wait) => Effect.gen(function* () {
426
+ yield* Effect.sleep(wait);
427
+ const result = yield* post(http, `${server}/auth/device/token`, {
428
+ grant_type: "urn:ietf:params:oauth:grant-type:device_code",
429
+ device_code: deviceCode,
430
+ client_id: clientID
431
+ }, DeviceToken, false);
432
+ if ("access_token" in result)
433
+ return yield* credential(http, server, result);
434
+ if (result.error === "authorization_pending")
435
+ return yield* loop(wait);
436
+ if (result.error === "slow_down") {
437
+ return yield* loop(Duration.sum(wait, Duration.seconds(5)));
438
+ }
439
+ return yield* Effect.fail(new Error(`Device authorization failed: ${result.error}`));
440
+ });
441
+ return loop(interval);
442
+ }
443
+ function credential(http, server, token) {
444
+ return Effect.gen(function* () {
445
+ const [user, orgs] = yield* Effect.all([
446
+ get(http, `${server}/api/user`, token.access_token, User),
447
+ get(http, `${server}/api/orgs`, token.access_token, Schema.Array(Org))
448
+ ], { concurrency: 2 });
449
+ const org = token.org_id == null ? orgs.toSorted((a, b) => a.name.localeCompare(b.name) || a.id.localeCompare(b.id))[0] : orgs.find((org) => org.id === token.org_id);
450
+ if (token.org_id != null && !org) {
451
+ return yield* Effect.fail(new Error(`OpenCode organization not found: ${token.org_id}`));
452
+ }
453
+ return OAuth3.make({
454
+ type: "oauth",
455
+ methodID,
456
+ access: token.access_token,
457
+ refresh: token.refresh_token,
458
+ expires: Date.now() + token.expires_in * 1000,
459
+ metadata: {
460
+ server,
461
+ accountID: user.id,
462
+ email: user.email,
463
+ orgID: org?.id,
464
+ orgName: org?.name
465
+ }
466
+ });
467
+ });
468
+ }
469
+ function get(http, url, token, schema) {
470
+ return HttpClient.filterStatusOk(http).execute(HttpClientRequest.get(url).pipe(HttpClientRequest.acceptJson, HttpClientRequest.bearerToken(token))).pipe(Effect.flatMap(HttpClientResponse.schemaBodyJson(schema)));
471
+ }
472
+ function post(http, url, body, schema, statusOk = true) {
473
+ return send(http, url, body).pipe(Effect.flatMap((response) => statusOk ? HttpClientResponse.filterStatusOk(response) : Effect.succeed(response)), Effect.flatMap(HttpClientResponse.schemaBodyJson(schema)));
474
+ }
475
+ function send(http, url, body) {
476
+ return HttpClientRequest.post(url).pipe(HttpClientRequest.acceptJson, HttpClientRequest.schemaBodyJson(Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Boolean])))(body), Effect.flatMap((request) => http.execute(request)));
477
+ }
478
+
479
+ export { OpencodePlugin2 };
@@ -2,10 +2,10 @@ import {
2
2
  NotFound3,
3
3
  WrongKind2,
4
4
  Failed2
5
- } from "./location-zkg84ctx.js";
5
+ } from "./tool-svcy3p9a.js";
6
6
  import {
7
7
  __export
8
- } from "./location-9rqn6x4v.js";
8
+ } from "./tool-9rqn6x4v.js";
9
9
 
10
10
  // src/environment/memory.ts
11
11
  var exports_memory = {};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./location-9rqn6x4v.js";
3
+ } from "./tool-9rqn6x4v.js";
4
4
 
5
5
  // src/session/recent-text.ts
6
6
  var exports_recent_text = {};
@@ -1,31 +1,31 @@
1
1
  import {
2
- ID11
3
- } from "./location-dqc1xg2h.js";
2
+ ID8
3
+ } from "./tool-dvbyh3pq.js";
4
4
  import {
5
5
  AbsolutePath2
6
- } from "./location-z5v4ffb3.js";
6
+ } from "./tool-z5v4ffb3.js";
7
7
  import {
8
- Info13
9
- } from "./location-a7hcemwv.js";
8
+ Info18
9
+ } from "./tool-pnwsrq7c.js";
10
10
  import {
11
11
  migrateAgent2
12
- } from "./location-gnkrmvzs.js";
12
+ } from "./tool-1dvrssaw.js";
13
13
  import {
14
14
  latest2,
15
- Service58
16
- } from "./location-4v3515yy.js";
15
+ Service69
16
+ } from "./tool-3jy1f5rc.js";
17
17
  import {
18
18
  parseOption2
19
- } from "./location-e834z07m.js";
19
+ } from "./tool-e834z07m.js";
20
20
  import {
21
21
  __export
22
- } from "./location-9rqn6x4v.js";
22
+ } from "./tool-9rqn6x4v.js";
23
23
 
24
24
  // src/config/plugin/agent.ts
25
- var exports_agent2 = {};
26
- __export(exports_agent2, {
27
- ConfigAgentPlugin: () => exports_agent2,
28
- Plugin: () => Plugin27
25
+ var exports_agent = {};
26
+ __export(exports_agent, {
27
+ ConfigAgentPlugin: () => exports_agent,
28
+ Plugin: () => Plugin22
29
29
  });
30
30
  import { define } from "@opencode/plugin/effect/plugin";
31
31
  import { Document, Info } from "@opencode/schema/config";
@@ -40,14 +40,14 @@ var legacySources = [
40
40
  ];
41
41
  var sourceDirectories = ["agent", "agents", "mode", "modes"];
42
42
  var decodeAgent = Schema.decodeUnknownOption(ConfigAgent.Info);
43
- var decodeLegacyAgent = Schema.decodeUnknownOption(Info13);
43
+ var decodeLegacyAgent = Schema.decodeUnknownOption(Info18);
44
44
  var pathActions = ["external_directory", "read", "edit"];
45
45
  var agentKeys = new Set(["variant", ...Object.keys(ConfigAgent.Info.fields)]);
46
46
  var nativeKeys = ["permissions", "request", "system", "disabled"];
47
- var Plugin27 = define({
47
+ var Plugin22 = define({
48
48
  id: "opencode.config.agent",
49
49
  effect: Effect.fn(function* (ctx) {
50
- const config = yield* Service58;
50
+ const config = yield* Service69;
51
51
  const fs = yield* FSUtil.Service;
52
52
  const global = yield* Global.Service;
53
53
  const loadEntry = Effect.fnUntraced(function* (entry) {
@@ -68,7 +68,7 @@ var Plugin27 = define({
68
68
  const changes = yield* PubSub.sliding(1);
69
69
  const notify = () => PubSub.publish(changes, undefined);
70
70
  yield* config.changes().pipe(Stream.filterEffect((update) => Effect.map(config.entries(), (entries) => isAgentSource(entries, update.path))), Stream.runForEach(notify), Effect.forkScoped({ startImmediately: true }));
71
- yield* ctx.event.subscribe().pipe(Stream.filter((event) => event.type === "config.updated"), Stream.runForEach(notify), Effect.forkScoped({ startImmediately: true }));
71
+ yield* ctx.event.subscribe({ types: ["config.updated"] }).pipe(Stream.runForEach(notify), Effect.forkScoped({ startImmediately: true }));
72
72
  const updates = yield* PubSub.subscribe(changes);
73
73
  yield* Stream.fromSubscription(updates).pipe(Stream.debounce("100 millis"), Stream.runForEach(() => reload), Effect.forkScoped({ startImmediately: true }));
74
74
  loaded.documents = yield* load();
@@ -76,13 +76,13 @@ var Plugin27 = define({
76
76
  const permissions = expandPermissions(loaded.documents.flatMap((document) => document.info.permissions ?? []), global.home);
77
77
  const configuredDefault = latest2(loaded.documents, "default_agent");
78
78
  if (configuredDefault !== undefined)
79
- editor.default(ID11.make(configuredDefault));
79
+ editor.default(ID8.make(configuredDefault));
80
80
  for (const current of editor.list()) {
81
81
  editor.update(current.id, (agent) => agent.permissions.push(...permissions));
82
82
  }
83
83
  for (const document of loaded.documents) {
84
84
  for (const [id, item] of Object.entries(document.info.agents ?? {})) {
85
- const agentID = ID11.make(id);
85
+ const agentID = ID8.make(id);
86
86
  if (item.disabled) {
87
87
  editor.remove(agentID);
88
88
  continue;
@@ -163,4 +163,4 @@ var decode = Effect.fnUntraced(function* (file, content) {
163
163
  return new Document({ type: "document", path: AbsolutePath2.make(file.filepath), info });
164
164
  });
165
165
 
166
- export { Plugin27, exports_agent2 };
166
+ export { Plugin22, exports_agent };