@opencode-ai/core 0.0.0-beta-18866 → 0.0.0-beta-18965

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 (808) hide show
  1. package/dist/account/sql.js +2 -2
  2. package/dist/agent.js +70 -70
  3. package/dist/aisdk-native.js +3 -3
  4. package/dist/aisdk.js +4 -4
  5. package/dist/app.js +2 -2
  6. package/dist/bus.js +68 -68
  7. package/dist/catalog.js +78 -78
  8. package/dist/chunks/{reference-9vqgpz70.js → aisdk-046tpp0z.js} +6 -6
  9. package/dist/chunks/{reference-0ag03ecw.js → aisdk-0ag03ecw.js} +2 -2
  10. package/dist/chunks/{reference-3529n0tr.js → aisdk-0awdwz49.js} +15 -15
  11. package/dist/chunks/{reference-vczm1m9n.js → aisdk-0cx9n61w.js} +3 -3
  12. package/dist/chunks/{reference-0gpahtwn.js → aisdk-0gpahtwn.js} +2 -2
  13. package/dist/chunks/{reference-kemcf5mw.js → aisdk-0msaz5jv.js} +8 -8
  14. package/dist/chunks/{reference-0pc4kdn1.js → aisdk-0pc4kdn1.js} +2 -2
  15. package/dist/chunks/{reference-0rz7yd7x.js → aisdk-0rz7yd7x.js} +1 -1
  16. package/dist/chunks/{reference-136c8mz3.js → aisdk-136c8mz3.js} +3 -3
  17. package/dist/chunks/{reference-8zsay21d.js → aisdk-1q6h3772.js} +3 -3
  18. package/dist/chunks/{reference-fkdrrz2d.js → aisdk-1rvp214c.js} +8 -5
  19. package/dist/chunks/{reference-an1f8bbd.js → aisdk-2322sp5n.js} +92 -92
  20. package/dist/chunks/{reference-e2kekfkw.js → aisdk-23hmgfme.js} +23 -20
  21. package/dist/chunks/{reference-x7g08g2m.js → aisdk-24zwwgjw.js} +3 -3
  22. package/dist/chunks/{reference-264e1nfp.js → aisdk-264e1nfp.js} +2 -2
  23. package/dist/chunks/{reference-jsb6y3ce.js → aisdk-27z7ht8a.js} +3 -3
  24. package/dist/chunks/{reference-g7dw4rk5.js → aisdk-2b26j3gv.js} +9 -9
  25. package/dist/chunks/{reference-pw0qjder.js → aisdk-2kt0a5er.js} +13 -13
  26. package/dist/chunks/{reference-6f6thqyy.js → aisdk-2qq12ds3.js} +5 -5
  27. package/dist/chunks/{reference-2sqw2jjm.js → aisdk-2sqw2jjm.js} +3 -3
  28. package/dist/chunks/{reference-bwqptwn6.js → aisdk-2vg4raz5.js} +5 -5
  29. package/dist/chunks/{reference-pp6802x5.js → aisdk-2xaaqh5g.js} +2 -2
  30. package/dist/chunks/{reference-je5g7w6t.js → aisdk-30247vtq.js} +2 -2
  31. package/dist/chunks/{reference-326j4s6w.js → aisdk-326j4s6w.js} +2 -2
  32. package/dist/chunks/{reference-30f47jbp.js → aisdk-395w7gw6.js} +10 -21
  33. package/dist/chunks/{reference-3chx3ng6.js → aisdk-3chx3ng6.js} +1 -1
  34. package/dist/chunks/{reference-7y13h7qh.js → aisdk-3ebhgms6.js} +3 -3
  35. package/dist/chunks/{reference-3ep0k87g.js → aisdk-3ep0k87g.js} +3 -3
  36. package/dist/chunks/{reference-df9ps1ev.js → aisdk-3hxswawt.js} +3 -3
  37. package/dist/chunks/{reference-a7swh0z4.js → aisdk-3jp0syc9.js} +6 -6
  38. package/dist/chunks/{reference-w7agyzeg.js → aisdk-3kan537b.js} +12 -8
  39. package/dist/chunks/{reference-3mc1hhwa.js → aisdk-3mc1hhwa.js} +3 -3
  40. package/dist/chunks/aisdk-3tg0cqem.js +51 -0
  41. package/dist/chunks/{reference-9nyt8zyy.js → aisdk-3v3gqb4q.js} +6 -6
  42. package/dist/chunks/{reference-fkf3c53e.js → aisdk-3vaxt6sf.js} +9 -9
  43. package/dist/chunks/{reference-42zyazrq.js → aisdk-42zyazrq.js} +1 -1
  44. package/dist/chunks/{reference-yyskhrw5.js → aisdk-4449p5t9.js} +6 -6
  45. package/dist/chunks/{reference-mxhs55xx.js → aisdk-4e1savhv.js} +28 -27
  46. package/dist/chunks/{reference-xwpxh8hr.js → aisdk-4eb5ep2q.js} +18 -8
  47. package/dist/chunks/{reference-4v6g3p22.js → aisdk-4v6g3p22.js} +1 -1
  48. package/dist/chunks/{reference-e4ve50r5.js → aisdk-4vyvk81b.js} +2 -2
  49. package/dist/chunks/{reference-63teb4w1.js → aisdk-4w0ckvbq.js} +9 -9
  50. package/dist/chunks/{reference-tr2gzb1w.js → aisdk-51t2tyks.js} +4 -12
  51. package/dist/chunks/{reference-0kz3ajyp.js → aisdk-524csryr.js} +29 -29
  52. package/dist/chunks/{reference-j9ymnb9b.js → aisdk-53jxjgr1.js} +2 -2
  53. package/dist/chunks/{reference-9s00a4cy.js → aisdk-58hm31pf.js} +3 -3
  54. package/dist/chunks/{reference-s4nkbdgv.js → aisdk-5awx9562.js} +9 -9
  55. package/dist/chunks/{reference-wv8n739s.js → aisdk-5dctyyh4.js} +6 -6
  56. package/dist/chunks/{reference-98a24b06.js → aisdk-5e89kmj8.js} +92 -92
  57. package/dist/chunks/{reference-088y9cbk.js → aisdk-5mct8kyt.js} +6 -6
  58. package/dist/chunks/{reference-byc4rwvh.js → aisdk-5vbk082d.js} +2 -2
  59. package/dist/chunks/{reference-5400f3k2.js → aisdk-5xcbjpr3.js} +8 -8
  60. package/dist/chunks/{reference-5y5kqjze.js → aisdk-5y5kqjze.js} +1 -1
  61. package/dist/chunks/{reference-66mds5ht.js → aisdk-66mds5ht.js} +1 -1
  62. package/dist/chunks/{reference-zq5w46q0.js → aisdk-68yag814.js} +2 -2
  63. package/dist/chunks/{reference-90je674c.js → aisdk-69xb812k.js} +8 -8
  64. package/dist/chunks/{reference-jqd42x9x.js → aisdk-6a909wmz.js} +8 -10
  65. package/dist/chunks/{reference-5n97c1kz.js → aisdk-6bjdjsdc.js} +3 -3
  66. package/dist/chunks/{reference-6bxzghb6.js → aisdk-6bxzghb6.js} +1 -1
  67. package/dist/chunks/{reference-6hppa3xw.js → aisdk-6hppa3xw.js} +2 -2
  68. package/dist/chunks/{reference-424hja68.js → aisdk-6na2bbpn.js} +13 -9
  69. package/dist/chunks/{reference-893c53jd.js → aisdk-6npa32e4.js} +12 -9
  70. package/dist/chunks/{reference-h292hczs.js → aisdk-6sx19hk0.js} +14 -14
  71. package/dist/chunks/{reference-6vbv4je1.js → aisdk-6vbv4je1.js} +2 -2
  72. package/dist/chunks/{reference-6wsfy4sp.js → aisdk-6wsfy4sp.js} +2 -2
  73. package/dist/chunks/{reference-1e3g1ft9.js → aisdk-71c3fy12.js} +9 -9
  74. package/dist/chunks/{reference-mhxjtrfr.js → aisdk-726vkb77.js} +26 -26
  75. package/dist/chunks/{reference-dvqebtf1.js → aisdk-74jm1yvj.js} +8 -5
  76. package/dist/chunks/{reference-8g6k80zr.js → aisdk-76wk8mbh.js} +4 -4
  77. package/dist/chunks/{reference-jcc5a2z4.js → aisdk-78wmkgff.js} +21 -5
  78. package/dist/chunks/{reference-f85kjf82.js → aisdk-798tse46.js} +19 -19
  79. package/dist/chunks/{reference-7myqjfx6.js → aisdk-7myqjfx6.js} +1 -1
  80. package/dist/chunks/{reference-89ttfx5q.js → aisdk-89ttfx5q.js} +2 -2
  81. package/dist/chunks/{reference-8ezmrsyj.js → aisdk-8ezmrsyj.js} +2 -2
  82. package/dist/chunks/{reference-8ck72gm8.js → aisdk-8manx9kj.js} +2 -2
  83. package/dist/chunks/{reference-3vc9vmpv.js → aisdk-8wywmgtm.js} +16 -15
  84. package/dist/chunks/{reference-r932pxqs.js → aisdk-8y5vxhk7.js} +1 -1
  85. package/dist/chunks/{reference-3y28g1fq.js → aisdk-8y9bav0p.js} +7 -7
  86. package/dist/chunks/{reference-z1x5ppqv.js → aisdk-9dbv6hqn.js} +2 -2
  87. package/dist/chunks/{reference-rw2ay6e7.js → aisdk-9h861fk8.js} +5 -5
  88. package/dist/chunks/{reference-ramface9.js → aisdk-a5rtdw1c.js} +6 -6
  89. package/dist/chunks/{reference-a6xqkezx.js → aisdk-a6xqkezx.js} +1 -1
  90. package/dist/chunks/{reference-thngpag9.js → aisdk-ad2ggc93.js} +4 -4
  91. package/dist/chunks/{reference-af42tqdk.js → aisdk-af42tqdk.js} +2 -2
  92. package/dist/chunks/{reference-wvzafhct.js → aisdk-an1thxgn.js} +6 -6
  93. package/dist/chunks/{reference-wkcm2121.js → aisdk-aqq7me5d.js} +14 -6
  94. package/dist/chunks/{reference-bd2mvb8t.js → aisdk-bd2mvb8t.js} +2 -2
  95. package/dist/chunks/{reference-bnha4c96.js → aisdk-bnha4c96.js} +1 -1
  96. package/dist/chunks/{reference-kek3rf55.js → aisdk-bp604jy8.js} +8 -8
  97. package/dist/chunks/{reference-c54e84vp.js → aisdk-c54e84vp.js} +1 -1
  98. package/dist/chunks/{reference-hfzsp55z.js → aisdk-c55cgmsp.js} +2 -2
  99. package/dist/chunks/{reference-9kywsdzv.js → aisdk-c58y1j1b.js} +6 -6
  100. package/dist/chunks/{reference-c8ya26sa.js → aisdk-c8ya26sa.js} +2 -2
  101. package/dist/chunks/{reference-g6q238va.js → aisdk-ckcq38kt.js} +2 -2
  102. package/dist/chunks/{reference-pg6rcx6v.js → aisdk-cnk52shz.js} +11 -11
  103. package/dist/chunks/{reference-c8z1ewty.js → aisdk-ct828ed8.js} +2 -2
  104. package/dist/chunks/{reference-2syg46b4.js → aisdk-cy9sv9qn.js} +8 -8
  105. package/dist/chunks/{reference-jesbcz0e.js → aisdk-d3jhter6.js} +2 -2
  106. package/dist/chunks/{reference-m8dxe63b.js → aisdk-d48sqyk1.js} +19 -21
  107. package/dist/chunks/{reference-d4h7vwhh.js → aisdk-d4h7vwhh.js} +2 -2
  108. package/dist/chunks/{reference-bhk5bpxq.js → aisdk-d7v67mge.js} +4 -4
  109. package/dist/chunks/{reference-qvh7d3mm.js → aisdk-dagxnbzc.js} +8 -8
  110. package/dist/chunks/{reference-dexm22yg.js → aisdk-dexm22yg.js} +1 -1
  111. package/dist/chunks/{reference-fddsdmdf.js → aisdk-dpdf4zw3.js} +2 -2
  112. package/dist/chunks/{reference-dtm6fkaa.js → aisdk-dtm6fkaa.js} +2 -2
  113. package/dist/chunks/{reference-9ex87gzq.js → aisdk-dw81mx6k.js} +14 -14
  114. package/dist/chunks/{reference-dyhtrhy2.js → aisdk-dyhtrhy2.js} +1 -1
  115. package/dist/chunks/aisdk-dyrfpcd0.js +114 -0
  116. package/dist/chunks/{reference-b1f1x5nb.js → aisdk-e0n16vwa.js} +8 -8
  117. package/dist/chunks/{reference-ez1a90zg.js → aisdk-e5egep24.js} +88 -88
  118. package/dist/chunks/{reference-vd8gzy68.js → aisdk-e9hz5j20.js} +17 -16
  119. package/dist/chunks/{reference-pj0nw4b1.js → aisdk-eb87q0yv.js} +1 -1
  120. package/dist/chunks/{reference-edxnhgvj.js → aisdk-edxnhgvj.js} +1 -1
  121. package/dist/chunks/{reference-0bw2p3eg.js → aisdk-egcn562v.js} +3 -3
  122. package/dist/chunks/{reference-8ze61944.js → aisdk-egr0d9z8.js} +11 -11
  123. package/dist/chunks/{reference-4z6b1r7t.js → aisdk-ejhchn8a.js} +22 -22
  124. package/dist/chunks/{reference-9dpm0ypj.js → aisdk-ejv8pqye.js} +8 -9
  125. package/dist/chunks/{reference-hgf74c4y.js → aisdk-eq3t7cqt.js} +10 -10
  126. package/dist/chunks/aisdk-esv5q40e.js +18 -0
  127. package/dist/chunks/{reference-etbnsc4s.js → aisdk-etbnsc4s.js} +2 -2
  128. package/dist/chunks/{reference-0enfz0ma.js → aisdk-ew2f4d89.js} +10 -10
  129. package/dist/chunks/{reference-f2nhxfjt.js → aisdk-f2nhxfjt.js} +2 -2
  130. package/dist/chunks/{reference-p4fwfknn.js → aisdk-f4h7s1h5.js} +5 -5
  131. package/dist/chunks/{reference-wx0fv060.js → aisdk-f53znwd4.js} +9 -9
  132. package/dist/chunks/{reference-f8wvq04h.js → aisdk-f8wvq04h.js} +1 -1
  133. package/dist/chunks/{reference-z427xjvx.js → aisdk-fa6mffz8.js} +11 -11
  134. package/dist/chunks/{reference-ty5gs0vf.js → aisdk-fk21s3y7.js} +32 -20
  135. package/dist/chunks/{reference-567c56db.js → aisdk-fnbnz4sm.js} +5 -5
  136. package/dist/chunks/{reference-c1qrh1pd.js → aisdk-fq2jz3e3.js} +5 -5
  137. package/dist/chunks/{reference-fqehnn9p.js → aisdk-fqehnn9p.js} +2 -2
  138. package/dist/chunks/{reference-xzp0zmzd.js → aisdk-fs6mzspw.js} +8 -8
  139. package/dist/chunks/{reference-gat33t0e.js → aisdk-fwrcvh0s.js} +10 -10
  140. package/dist/chunks/{reference-3t5c6jt3.js → aisdk-fx3za2rk.js} +8 -8
  141. package/dist/chunks/{reference-g9dd0fv6.js → aisdk-g9dd0fv6.js} +2 -2
  142. package/dist/chunks/{reference-gb1z7yet.js → aisdk-gb1z7yet.js} +2 -2
  143. package/dist/chunks/{reference-gc513wew.js → aisdk-gc513wew.js} +2 -2
  144. package/dist/chunks/{reference-wghtbf73.js → aisdk-gpd89psw.js} +12 -12
  145. package/dist/chunks/{reference-grfz4hhj.js → aisdk-grfz4hhj.js} +1 -1
  146. package/dist/chunks/{reference-z83gsyf2.js → aisdk-gzwdd9gr.js} +3 -3
  147. package/dist/chunks/{reference-rancn5ng.js → aisdk-h01zxzks.js} +5 -5
  148. package/dist/chunks/{reference-hgr9y616.js → aisdk-hgr9y616.js} +1 -1
  149. package/dist/chunks/{reference-pdq2xh3y.js → aisdk-hn510kmp.js} +7 -7
  150. package/dist/chunks/{reference-hpkeh7wf.js → aisdk-hpkeh7wf.js} +1 -1
  151. package/dist/chunks/{reference-hs51b0fc.js → aisdk-hs51b0fc.js} +1 -1
  152. package/dist/chunks/{reference-vyxqdbzy.js → aisdk-htaqsvng.js} +5 -5
  153. package/dist/chunks/{reference-4qz7zhx0.js → aisdk-htmhxvv7.js} +31 -196
  154. package/dist/chunks/{reference-hvydqsq5.js → aisdk-hvydqsq5.js} +2 -2
  155. package/dist/chunks/{reference-z5p8bt57.js → aisdk-hxr43x7t.js} +6 -6
  156. package/dist/chunks/{reference-hy5n5jcn.js → aisdk-hy5n5jcn.js} +1 -1
  157. package/dist/chunks/{reference-s2kjqxd3.js → aisdk-hzag9ake.js} +1 -1
  158. package/dist/chunks/{reference-s6ck6xts.js → aisdk-hzwx8p6y.js} +5 -4
  159. package/dist/chunks/{reference-j0feex7e.js → aisdk-j0feex7e.js} +1 -1
  160. package/dist/chunks/{reference-vem6fgbh.js → aisdk-j2b08km2.js} +5 -4
  161. package/dist/chunks/{reference-g0z4yfdj.js → aisdk-j2yp1r0h.js} +53 -49
  162. package/dist/chunks/{reference-80jq34sk.js → aisdk-j74x50h7.js} +4 -4
  163. package/dist/chunks/{reference-750jzgaa.js → aisdk-jar52fmb.js} +3 -3
  164. package/dist/chunks/{reference-f821qzap.js → aisdk-jmeq6dxt.js} +5 -5
  165. package/dist/chunks/{reference-jqhp3fpz.js → aisdk-jqhp3fpz.js} +2 -2
  166. package/dist/chunks/{reference-jr5m26np.js → aisdk-jr5m26np.js} +2 -2
  167. package/dist/chunks/{reference-5gzv38nr.js → aisdk-jtp8p0gd.js} +12 -12
  168. package/dist/chunks/{reference-khswz5rb.js → aisdk-jtxb810x.js} +14 -14
  169. package/dist/chunks/{reference-38cv1e1c.js → aisdk-jx8ms3vm.js} +11 -11
  170. package/dist/chunks/{reference-7f09d21b.js → aisdk-k60qsnvc.js} +4 -4
  171. package/dist/chunks/{reference-k7hkdbw5.js → aisdk-k7hkdbw5.js} +2 -2
  172. package/dist/chunks/{reference-m48hb2tb.js → aisdk-kc6qze1s.js} +16 -13
  173. package/dist/chunks/{reference-rzv103sq.js → aisdk-kjf8vaxa.js} +7 -4
  174. package/dist/chunks/{reference-z1959vye.js → aisdk-km8dd814.js} +5 -5
  175. package/dist/chunks/{reference-kq3q54gz.js → aisdk-kq3q54gz.js} +1 -1
  176. package/dist/chunks/{reference-kr9vgar1.js → aisdk-kr9vgar1.js} +1 -1
  177. package/dist/chunks/{reference-dxcg1gpj.js → aisdk-kx5nctx9.js} +2 -2
  178. package/dist/chunks/{reference-pkvv3k6x.js → aisdk-kz3ktmxp.js} +4 -4
  179. package/dist/chunks/{reference-2cehtecm.js → aisdk-m2sez5sb.js} +6 -6
  180. package/dist/chunks/{reference-z65x5xn8.js → aisdk-m3k0wh38.js} +16 -11
  181. package/dist/chunks/{reference-m3k5wttq.js → aisdk-m3k5wttq.js} +4 -4
  182. package/dist/chunks/{reference-30st6gwt.js → aisdk-m6a7zjhr.js} +1 -1
  183. package/dist/chunks/{reference-m7jtgrng.js → aisdk-m7jtgrng.js} +2 -2
  184. package/dist/chunks/{reference-mf0hyk7z.js → aisdk-mf0hyk7z.js} +1 -1
  185. package/dist/chunks/{reference-sawwddx8.js → aisdk-mhne2nrr.js} +17 -17
  186. package/dist/chunks/{reference-1btf37k0.js → aisdk-mmnzh4s0.js} +6 -6
  187. package/dist/chunks/{reference-mnyszbxc.js → aisdk-mnyszbxc.js} +1 -1
  188. package/dist/chunks/{reference-hhxh8pdx.js → aisdk-mv81kt5z.js} +2 -2
  189. package/dist/chunks/{reference-7z97vfjw.js → aisdk-my53s247.js} +3 -3
  190. package/dist/chunks/{reference-7w4qx9zy.js → aisdk-n91926fc.js} +4 -4
  191. package/dist/chunks/{reference-ngzr6ypz.js → aisdk-ngzr6ypz.js} +2 -2
  192. package/dist/chunks/{reference-jjepj7kz.js → aisdk-nj6yqve1.js} +9 -3
  193. package/dist/chunks/{reference-nn16cgj7.js → aisdk-nn16cgj7.js} +1 -1
  194. package/dist/chunks/{reference-xfk2eagt.js → aisdk-ntev5d3k.js} +9 -9
  195. package/dist/chunks/{reference-f410cv5t.js → aisdk-ny7wzm3x.js} +13 -13
  196. package/dist/chunks/{reference-8r263vtv.js → aisdk-nz4de5b9.js} +5 -5
  197. package/dist/chunks/{reference-2xn0r9vb.js → aisdk-p0asjctg.js} +16 -16
  198. package/dist/chunks/{reference-p1m5qwvv.js → aisdk-p1m5qwvv.js} +1 -1
  199. package/dist/chunks/{reference-p5gyct0y.js → aisdk-p5gyct0y.js} +1 -1
  200. package/dist/chunks/{reference-jghhn6h0.js → aisdk-p87673dz.js} +4 -4
  201. package/dist/chunks/{reference-0emrnx66.js → aisdk-pk32mz2v.js} +5 -5
  202. package/dist/chunks/{reference-pk53j7qk.js → aisdk-pk53j7qk.js} +2 -2
  203. package/dist/chunks/{reference-kggc3hrm.js → aisdk-pves38xm.js} +8 -8
  204. package/dist/chunks/{reference-qf5b2gmg.js → aisdk-pxjen4wd.js} +13 -13
  205. package/dist/chunks/{reference-xxphcf1f.js → aisdk-pz49dv9m.js} +11 -11
  206. package/dist/chunks/{reference-k85ch1vg.js → aisdk-pznym66m.js} +3 -3
  207. package/dist/chunks/{reference-q606pcse.js → aisdk-q606pcse.js} +3 -3
  208. package/dist/chunks/{reference-zqygmzvz.js → aisdk-qcfrnhfy.js} +8 -8
  209. package/dist/chunks/{reference-qf52r0wh.js → aisdk-qf52r0wh.js} +1 -1
  210. package/dist/chunks/{reference-qfvp8zq7.js → aisdk-qfvp8zq7.js} +1 -1
  211. package/dist/chunks/{reference-zgfz4nwa.js → aisdk-qjw573hg.js} +13 -13
  212. package/dist/chunks/{reference-xh0dkm7j.js → aisdk-qpxzqy01.js} +1 -1
  213. package/dist/chunks/{reference-73zc7acq.js → aisdk-qszswz6j.js} +4 -4
  214. package/dist/chunks/{reference-qz5gwjr7.js → aisdk-qz5gwjr7.js} +3 -3
  215. package/dist/chunks/{reference-y1yqxy0w.js → aisdk-r1yqtt9g.js} +10 -10
  216. package/dist/chunks/{reference-4v53bvyt.js → aisdk-r5g0eg31.js} +18 -20
  217. package/dist/chunks/{reference-ftjbsen0.js → aisdk-r6zgyyks.js} +3 -3
  218. package/dist/chunks/{reference-gte2a4bk.js → aisdk-r7a2r1m6.js} +18 -33
  219. package/dist/chunks/{reference-r7z6wjth.js → aisdk-r7z6wjth.js} +1 -1
  220. package/dist/chunks/{reference-r9d3d23r.js → aisdk-r9d3d23r.js} +1 -1
  221. package/dist/chunks/{reference-rahat93a.js → aisdk-rahat93a.js} +1 -1
  222. package/dist/chunks/{reference-k3b0087g.js → aisdk-rcbvtsva.js} +10 -10
  223. package/dist/chunks/{reference-k5r2vn1t.js → aisdk-re3tnyhv.js} +9 -9
  224. package/dist/chunks/{reference-n256kz7s.js → aisdk-rgtj2rve.js} +32 -21
  225. package/dist/chunks/{reference-rr7wbarq.js → aisdk-rr7wbarq.js} +1 -1
  226. package/dist/chunks/{reference-gq0njyjb.js → aisdk-rs74c49y.js} +41 -43
  227. package/dist/chunks/{reference-9z5kkd1v.js → aisdk-rv983qnw.js} +12 -12
  228. package/dist/chunks/{reference-s32nnj3r.js → aisdk-s32nnj3r.js} +1 -1
  229. package/dist/chunks/{reference-v1q61tmm.js → aisdk-sgyp8ncd.js} +10 -10
  230. package/dist/chunks/{reference-j32vdj8r.js → aisdk-snpn6bap.js} +3 -6
  231. package/dist/chunks/{reference-ayh0b6nc.js → aisdk-ss69724p.js} +15 -15
  232. package/dist/chunks/{reference-ka1ze8e7.js → aisdk-st9m0r5x.js} +3 -3
  233. package/dist/chunks/{reference-vmf3mwf0.js → aisdk-svf3xmjw.js} +5 -5
  234. package/dist/chunks/{reference-ak8kj9h3.js → aisdk-t0tzarny.js} +29 -28
  235. package/dist/chunks/{reference-e5r3hp5p.js → aisdk-tqg8w6z3.js} +22 -16
  236. package/dist/chunks/{reference-2nszkqak.js → aisdk-tv521g8r.js} +8 -8
  237. package/dist/chunks/{reference-t5rvtmq7.js → aisdk-v0bpzf7m.js} +61 -61
  238. package/dist/chunks/{reference-tt4qnzy6.js → aisdk-v1d93kh1.js} +6 -7
  239. package/dist/chunks/{reference-hyfbxc6f.js → aisdk-v9jp7n76.js} +1 -1
  240. package/dist/chunks/{reference-vcwr2vpf.js → aisdk-vcwr2vpf.js} +1 -1
  241. package/dist/chunks/{reference-qp1z2q9w.js → aisdk-vp58t579.js} +25 -33
  242. package/dist/chunks/{reference-vynk8zbr.js → aisdk-vynk8zbr.js} +1 -1
  243. package/dist/chunks/{reference-f6687h7n.js → aisdk-w5bszccf.js} +47 -47
  244. package/dist/chunks/{reference-w5r9s7kx.js → aisdk-w5r9s7kx.js} +1 -1
  245. package/dist/chunks/{reference-qx3jf2qk.js → aisdk-w8hy6wsd.js} +7 -7
  246. package/dist/chunks/{reference-46azr2y9.js → aisdk-w9a3w5xf.js} +3 -3
  247. package/dist/chunks/{reference-wbkt8qpj.js → aisdk-wbkt8qpj.js} +1 -1
  248. package/dist/chunks/{reference-wdqva41w.js → aisdk-wdqva41w.js} +1 -1
  249. package/dist/chunks/{reference-z6zhg99y.js → aisdk-wf0csb76.js} +12 -12
  250. package/dist/chunks/{reference-wf5w4wph.js → aisdk-wf5w4wph.js} +1 -1
  251. package/dist/chunks/{reference-ec0fjxjh.js → aisdk-wj0dwjdq.js} +9 -9
  252. package/dist/chunks/{reference-wmxdh12w.js → aisdk-wmxdh12w.js} +1 -1
  253. package/dist/chunks/{reference-17fnrv0p.js → aisdk-wnk3k0td.js} +8 -8
  254. package/dist/chunks/{reference-yt5sqzpx.js → aisdk-wpy9b1rj.js} +13 -13
  255. package/dist/chunks/{reference-n5yhfyk0.js → aisdk-wvq8c2n1.js} +153 -149
  256. package/dist/chunks/{reference-8ngkfkdx.js → aisdk-wxkbchz3.js} +2 -2
  257. package/dist/chunks/{reference-x3vb5b1t.js → aisdk-x3vb5b1t.js} +1 -1
  258. package/dist/chunks/{reference-x4az4y7r.js → aisdk-x4az4y7r.js} +1 -1
  259. package/dist/chunks/{reference-xdb88cdw.js → aisdk-xdb88cdw.js} +2 -2
  260. package/dist/chunks/{reference-2x0ckx01.js → aisdk-xe02v0q7.js} +2 -2
  261. package/dist/chunks/{reference-t253hdyx.js → aisdk-xhy2qknm.js} +3 -3
  262. package/dist/chunks/{reference-97q0eayt.js → aisdk-xqx8htq9.js} +11 -11
  263. package/dist/chunks/{reference-xws7arpm.js → aisdk-xws7arpm.js} +1 -1
  264. package/dist/chunks/{reference-fq40qrnc.js → aisdk-y2t1e6ck.js} +4 -4
  265. package/dist/chunks/{reference-4e9y157d.js → aisdk-y6mc84ky.js} +2 -2
  266. package/dist/chunks/{reference-8q7rztf6.js → aisdk-yf78bf3z.js} +45 -26
  267. package/dist/chunks/{reference-6qa4ddqm.js → aisdk-yns4vmk5.js} +185 -144
  268. package/dist/chunks/{reference-c9xhhs5v.js → aisdk-ysdasg1c.js} +50 -36
  269. package/dist/chunks/{reference-7epmrnkh.js → aisdk-yxwnec9y.js} +11 -11
  270. package/dist/chunks/{reference-np5sawwb.js → aisdk-z6ngc9f1.js} +3 -3
  271. package/dist/chunks/{reference-z8c1ty6e.js → aisdk-z8c1ty6e.js} +1 -1
  272. package/dist/chunks/{reference-zbqqnp0n.js → aisdk-zbqqnp0n.js} +1 -1
  273. package/dist/chunks/{reference-rv2n9m0t.js → aisdk-zmbmd7xf.js} +2 -2
  274. package/dist/chunks/{reference-zn935gjz.js → aisdk-zn935gjz.js} +1 -1
  275. package/dist/chunks/{reference-8jwkk0nn.js → aisdk-zseh86v1.js} +2 -2
  276. package/dist/chunks/{reference-mq1tw6ze.js → aisdk-zsj6ehbf.js} +15 -15
  277. package/dist/chunks/{reference-yvej0khr.js → aisdk-ztjp727a.js} +6 -6
  278. package/dist/chunks/{reference-zyyhrfr9.js → aisdk-zyyhrfr9.js} +1 -1
  279. package/dist/codemode/catalog.js +2 -2
  280. package/dist/codemode/instructions.js +4 -4
  281. package/dist/codemode/tool.js +4 -4
  282. package/dist/command.js +70 -70
  283. package/dist/config/markdown.js +2 -2
  284. package/dist/config/normalize.js +20 -20
  285. package/dist/config/plugin/agent.js +127 -127
  286. package/dist/config/plugin/command.js +113 -113
  287. package/dist/config/plugin/compaction.js +166 -166
  288. package/dist/config/plugin/entry-observer.js +109 -109
  289. package/dist/config/plugin/formatter.js +114 -114
  290. package/dist/config/plugin/image.js +126 -126
  291. package/dist/config/plugin/instruction.js +85 -85
  292. package/dist/config/plugin/location-watcher.js +112 -112
  293. package/dist/config/plugin/mcp.js +122 -122
  294. package/dist/config/plugin/policy.js +111 -111
  295. package/dist/config/plugin/provider.js +110 -110
  296. package/dist/config/plugin/reference.js +114 -114
  297. package/dist/config/plugin/shell.js +113 -113
  298. package/dist/config/plugin/skill-file.js +98 -98
  299. package/dist/config/plugin/skill.js +130 -130
  300. package/dist/config/plugin/snapshot.js +112 -112
  301. package/dist/config/plugin/source.js +110 -110
  302. package/dist/config/plugin/tool-output.js +114 -114
  303. package/dist/config/plugin/websearch.js +110 -110
  304. package/dist/config/variable.js +4 -4
  305. package/dist/config.js +108 -108
  306. package/dist/credential/sql.js +3 -3
  307. package/dist/credential.js +71 -71
  308. package/dist/database/database.js +65 -65
  309. package/dist/database/drizzle/effect-sqlite/driver.js +13 -13
  310. package/dist/database/drizzle/effect-sqlite/index.js +13 -13
  311. package/dist/database/drizzle/effect-sqlite/session.js +12 -12
  312. package/dist/database/drizzle/index.js +14 -14
  313. package/dist/database/drizzle/internal/drizzle-utils.js +2 -2
  314. package/dist/database/drizzle/sqlite-core/effect/count.js +2 -2
  315. package/dist/database/drizzle/sqlite-core/effect/db.js +10 -10
  316. package/dist/database/drizzle/sqlite-core/effect/delete.js +3 -3
  317. package/dist/database/drizzle/sqlite-core/effect/index.js +16 -16
  318. package/dist/database/drizzle/sqlite-core/effect/insert.js +3 -3
  319. package/dist/database/drizzle/sqlite-core/effect/query.js +2 -2
  320. package/dist/database/drizzle/sqlite-core/effect/raw.js +2 -2
  321. package/dist/database/drizzle/sqlite-core/effect/select.js +3 -3
  322. package/dist/database/drizzle/sqlite-core/effect/session.js +11 -11
  323. package/dist/database/drizzle/sqlite-core/effect/update.js +3 -3
  324. package/dist/database/drizzle.js +15 -15
  325. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +2 -2
  326. package/dist/database/migration/20260211171708_add_project_commands.js +2 -2
  327. package/dist/database/migration/20260213144116_wakeful_the_professor.js +2 -2
  328. package/dist/database/migration/20260225215848_workspace.js +2 -2
  329. package/dist/database/migration/20260227213759_add_session_workspace_id.js +2 -2
  330. package/dist/database/migration/20260228203230_blue_harpoon.js +2 -2
  331. package/dist/database/migration/20260303231226_add_workspace_fields.js +2 -2
  332. package/dist/database/migration/20260309230000_move_org_to_state.js +2 -2
  333. package/dist/database/migration/20260312043431_session_message_cursor.js +2 -2
  334. package/dist/database/migration/20260323234822_events.js +2 -2
  335. package/dist/database/migration/20260410174513_workspace-name.js +2 -2
  336. package/dist/database/migration/20260413175956_chief_energizer.js +2 -2
  337. package/dist/database/migration/20260423070820_add_icon_url_override.js +2 -2
  338. package/dist/database/migration/20260427172553_slow_nightmare.js +2 -2
  339. package/dist/database/migration/20260428004200_add_session_path.js +2 -2
  340. package/dist/database/migration/20260501142318_next_venus.js +2 -2
  341. package/dist/database/migration/20260504145000_add_sync_owner.js +2 -2
  342. package/dist/database/migration/20260507164347_add_workspace_time.js +2 -2
  343. package/dist/database/migration/20260510033149_session_usage.js +2 -2
  344. package/dist/database/migration/20260511000411_data_migration_state.js +2 -2
  345. package/dist/database/migration/20260511173437_session-metadata.js +2 -2
  346. package/dist/database/migration/20260601010001_normalize_storage_paths.js +2 -2
  347. package/dist/database/migration/20260601202201_amazing_prowler.js +2 -2
  348. package/dist/database/migration/20260602002951_lowly_union_jack.js +2 -2
  349. package/dist/database/migration/20260602182828_add_project_directories.js +2 -2
  350. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +2 -2
  351. package/dist/database/migration/20260603040000_session_message_projection_order.js +2 -2
  352. package/dist/database/migration/20260603141458_session_input_inbox.js +2 -2
  353. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +2 -2
  354. package/dist/database/migration/20260604172448_event_sourced_session_input.js +2 -2
  355. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +2 -2
  356. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +2 -2
  357. package/dist/database/migration/20260611035744_credential.js +2 -2
  358. package/dist/database/migration/20260611192811_lush_chimera.js +2 -2
  359. package/dist/database/migration/20260612174303_project_dir_strategy.js +2 -2
  360. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +2 -2
  361. package/dist/database/migration/20260622170816_reset_v2_session_state.js +2 -2
  362. package/dist/database/migration/20260622202450_simplify_session_input.js +2 -2
  363. package/dist/database/migration/20260804233008_loose_psylocke.js +2 -2
  364. package/dist/database/migration/20260805200742_import_legacy_credentials.js +2 -2
  365. package/dist/database/migration/20260808023530_workspace_domain.js +2 -2
  366. package/dist/database/migration/20260811161259_execution_claim_attempts.js +2 -2
  367. package/dist/database/migration/20260812181746_session_inbox.js +2 -2
  368. package/dist/database/migration/20260812213948_worktree.js +2 -2
  369. package/dist/database/migration/20260819222447_session_viewed_state.js +2 -2
  370. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +2 -2
  371. package/dist/database/migration.gen.js +48 -48
  372. package/dist/database/migration.js +50 -50
  373. package/dist/database/path.js +3 -3
  374. package/dist/database/schema.gen.js +2 -2
  375. package/dist/database/schema.sql.js +2 -2
  376. package/dist/database/sqlite.bun.js +2 -2
  377. package/dist/database/sqlite.js +2 -2
  378. package/dist/database/sqlite.node.js +2 -2
  379. package/dist/database/sqlite.workerd.js +2 -2
  380. package/dist/database/v1-migration.bun.js +77 -77
  381. package/dist/database/v1-migration.js +2 -2
  382. package/dist/database/v1-migration.noop.js +1 -1
  383. package/dist/effect/app-node-builder.js +342 -340
  384. package/dist/effect/app-node-platform.js +3 -3
  385. package/dist/effect/keyed-mutex.js +2 -2
  386. package/dist/effect/websocket-constructor.js +2 -2
  387. package/dist/environment/driver.js +1 -1
  388. package/dist/environment/environment.js +86 -86
  389. package/dist/environment/exec-defaults.js +3 -3
  390. package/dist/environment/files.js +2 -2
  391. package/dist/environment/index.js +88 -88
  392. package/dist/environment/local.js +3 -3
  393. package/dist/environment/memory.js +3 -3
  394. package/dist/environment/unavailable.js +1 -1
  395. package/dist/event/sql.js +2 -2
  396. package/dist/event-logger.js +68 -68
  397. package/dist/file-mutation.js +87 -87
  398. package/dist/file-retention.js +2 -2
  399. package/dist/file.js +2 -2
  400. package/dist/filesystem/fff.bun.js +2 -2
  401. package/dist/filesystem/fff.js +2 -2
  402. package/dist/filesystem/fff.node.js +2 -2
  403. package/dist/filesystem/fff.workerd.js +2 -2
  404. package/dist/filesystem/ignore.js +1 -1
  405. package/dist/filesystem/location-watcher-policy.js +3 -3
  406. package/dist/filesystem/location-watcher.js +217 -216
  407. package/dist/filesystem/protected.js +2 -2
  408. package/dist/filesystem/search.js +91 -91
  409. package/dist/filesystem/watcher-binding.js +2 -2
  410. package/dist/filesystem/watcher.js +4 -4
  411. package/dist/filesystem.js +92 -92
  412. package/dist/form.js +69 -69
  413. package/dist/formatter/builtins.js +3 -3
  414. package/dist/formatter.js +80 -80
  415. package/dist/generate.js +84 -84
  416. package/dist/git.js +5 -5
  417. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +2 -2
  418. package/dist/github-copilot/chat/get-response-metadata.js +2 -2
  419. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +2 -2
  420. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +8 -8
  421. package/dist/github-copilot/chat/openai-compatible-chat-options.js +2 -2
  422. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +2 -2
  423. package/dist/github-copilot/copilot-provider.js +18 -18
  424. package/dist/github-copilot/models.js +4 -4
  425. package/dist/github-copilot/openai-compatible-error.js +2 -2
  426. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +2 -2
  427. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +2 -2
  428. package/dist/github-copilot/responses/openai-error.js +2 -2
  429. package/dist/github-copilot/responses/openai-responses-language-model.js +11 -11
  430. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +7 -7
  431. package/dist/github-copilot/responses/tool/code-interpreter.js +2 -2
  432. package/dist/github-copilot/responses/tool/file-search.js +2 -2
  433. package/dist/github-copilot/responses/tool/image-generation.js +2 -2
  434. package/dist/github-copilot/responses/tool/web-search-preview.js +2 -2
  435. package/dist/github-copilot/responses/tool/web-search.js +2 -2
  436. package/dist/id/id.js +2 -2
  437. package/dist/image/photon-wasm.bun.js +1 -1
  438. package/dist/image/photon-wasm.node.js +1 -1
  439. package/dist/image/photon-wasm.workerd.js +1 -1
  440. package/dist/image/photon.js +94 -94
  441. package/dist/image.js +94 -94
  442. package/dist/instance/service.js +2 -2
  443. package/dist/instance.js +341 -339
  444. package/dist/instruction-discovery.js +72 -72
  445. package/dist/instructions/builtins.js +80 -80
  446. package/dist/instructions/index.js +2 -2
  447. package/dist/integration/connection.js +2 -2
  448. package/dist/integration.js +75 -75
  449. package/dist/job.js +72 -72
  450. package/dist/kv/sql.js +3 -3
  451. package/dist/kv.js +68 -68
  452. package/dist/location-activity.js +82 -82
  453. package/dist/location-mutation.js +79 -79
  454. package/dist/location-service-map.js +79 -79
  455. package/dist/location-services.js +342 -340
  456. package/dist/location.js +78 -78
  457. package/dist/mcp/client.js +87 -87
  458. package/dist/mcp/index.js +93 -93
  459. package/dist/mcp/instructions.js +122 -122
  460. package/dist/mcp/oauth.js +2 -2
  461. package/dist/mcp/stdio.js +87 -87
  462. package/dist/mime.js +2 -2
  463. package/dist/model-resolver.js +81 -81
  464. package/dist/model.js +3 -3
  465. package/dist/models-dev.js +75 -75
  466. package/dist/oauth/page.js +2 -2
  467. package/dist/permission/saved.js +71 -71
  468. package/dist/permission/sql.js +6 -6
  469. package/dist/permission.js +95 -95
  470. package/dist/persistent-pty/binary.bun.js +2 -2
  471. package/dist/persistent-pty/binary.node.js +1 -1
  472. package/dist/persistent-pty/binary.workerd.js +1 -1
  473. package/dist/persistent-pty/daemon.js +2 -2
  474. package/dist/persistent-pty/index.js +73 -73
  475. package/dist/persistent-pty/pty-binding.js +2 -2
  476. package/dist/persistent-pty.js +74 -74
  477. package/dist/plugin/agent.js +96 -96
  478. package/dist/plugin/command.js +94 -94
  479. package/dist/plugin/hooks.js +3 -3
  480. package/dist/plugin/host.js +214 -213
  481. package/dist/plugin/instance.js +2 -2
  482. package/dist/plugin/internal.js +313 -311
  483. package/dist/plugin/mcp-codemode-exclusion.js +2 -2
  484. package/dist/plugin/models-dev.js +76 -76
  485. package/dist/plugin/module.js +3 -3
  486. package/dist/plugin/plan.js +96 -96
  487. package/dist/plugin/promise.js +2 -2
  488. package/dist/plugin/provider/alibaba.js +3 -3
  489. package/dist/plugin/provider/amazon-bedrock.js +3 -3
  490. package/dist/plugin/provider/anthropic.js +3 -3
  491. package/dist/plugin/provider/azure.js +118 -118
  492. package/dist/plugin/provider/cerebras.js +3 -3
  493. package/dist/plugin/provider/cloudflare-ai-gateway.js +117 -117
  494. package/dist/plugin/provider/cloudflare-workers-ai.js +117 -117
  495. package/dist/plugin/provider/cohere.js +3 -3
  496. package/dist/plugin/provider/configured.js +114 -114
  497. package/dist/plugin/provider/dynamic.js +3 -3
  498. package/dist/plugin/provider/factory.js +2 -2
  499. package/dist/plugin/provider/gateway.js +3 -3
  500. package/dist/plugin/provider/github-copilot.js +82 -82
  501. package/dist/plugin/provider/gitlab.js +4 -4
  502. package/dist/plugin/provider/google-vertex.js +3 -3
  503. package/dist/plugin/provider/kilo.js +3 -3
  504. package/dist/plugin/provider/llmgateway.js +77 -77
  505. package/dist/plugin/provider/lmstudio.js +115 -115
  506. package/dist/plugin/provider/mistral.js +3 -3
  507. package/dist/plugin/provider/nvidia.js +3 -3
  508. package/dist/plugin/provider/ollama.js +115 -115
  509. package/dist/plugin/provider/openai-compatible.js +2 -2
  510. package/dist/plugin/provider/openai.js +79 -79
  511. package/dist/plugin/provider/opencode.js +77 -77
  512. package/dist/plugin/provider/openrouter.js +4 -4
  513. package/dist/plugin/provider/perplexity.js +3 -3
  514. package/dist/plugin/provider/sap-ai-core.js +4 -4
  515. package/dist/plugin/provider/sdk-factory.js +2 -2
  516. package/dist/plugin/provider/snowflake-cortex.js +3 -3
  517. package/dist/plugin/provider/venice.js +3 -3
  518. package/dist/plugin/provider/vercel.js +3 -3
  519. package/dist/plugin/provider/vllm.js +115 -115
  520. package/dist/plugin/provider/xai.js +78 -78
  521. package/dist/plugin/provider/zenmux.js +3 -3
  522. package/dist/plugin/provider.js +154 -154
  523. package/dist/plugin/sdk.js +69 -69
  524. package/dist/plugin/service.js +11 -0
  525. package/dist/plugin/skill.js +127 -127
  526. package/dist/plugin/source-directory.js +2 -4
  527. package/dist/plugin/supervisor.js +328 -326
  528. package/dist/plugin/system-prompt.js +2 -2
  529. package/dist/plugin/update.js +3 -3
  530. package/dist/plugin/variant.js +3 -3
  531. package/dist/plugin/vcs/git.js +82 -82
  532. package/dist/plugin/vcs/hg.js +82 -82
  533. package/dist/plugin/warming.js +109 -109
  534. package/dist/plugin/websearch/exa.js +4 -4
  535. package/dist/plugin/websearch/firecrawl.js +5 -5
  536. package/dist/plugin/websearch/index.js +9 -9
  537. package/dist/plugin/websearch/mcp.js +3 -3
  538. package/dist/plugin/websearch/parallel.js +5 -5
  539. package/dist/plugin/websearch/tavily.js +3 -3
  540. package/dist/plugin.js +219 -215
  541. package/dist/project/schema.js +3 -3
  542. package/dist/project/sql.js +5 -5
  543. package/dist/project.js +77 -77
  544. package/dist/provider.js +2 -2
  545. package/dist/pty/protocol.js +1 -1
  546. package/dist/pty/pty.bun.js +1 -1
  547. package/dist/pty/pty.node.js +1 -1
  548. package/dist/pty/pty.workerd.js +1 -1
  549. package/dist/pty/schema.js +2 -2
  550. package/dist/pty/ticket.js +2 -2
  551. package/dist/pty.js +84 -84
  552. package/dist/reference/instructions.js +80 -80
  553. package/dist/reference.js +78 -78
  554. package/dist/repository-cache.js +74 -74
  555. package/dist/repository.js +2 -2
  556. package/dist/ripgrep/binary.js +3 -3
  557. package/dist/ripgrep.js +89 -89
  558. package/dist/rpc.js +79 -79
  559. package/dist/schema.js +2 -2
  560. package/dist/session/command.js +73 -72
  561. package/dist/session/compaction.js +138 -138
  562. package/dist/session/context.js +150 -150
  563. package/dist/session/environment.js +3 -3
  564. package/dist/session/error.js +4 -4
  565. package/dist/session/event.js +2 -2
  566. package/dist/session/execution/restart.js +208 -207
  567. package/dist/session/execution.js +117 -117
  568. package/dist/session/generate.js +153 -152
  569. package/dist/session/history.js +77 -77
  570. package/dist/session/inbox.js +77 -77
  571. package/dist/session/info.js +4 -4
  572. package/dist/session/instruction-entry.js +73 -73
  573. package/dist/session/instruction-state.js +10 -10
  574. package/dist/session/instructions.js +89 -89
  575. package/dist/session/message-updater.js +4 -4
  576. package/dist/session/message.js +2 -2
  577. package/dist/session/model-request.js +134 -134
  578. package/dist/session/model-transport.js +5 -5
  579. package/dist/session/move.js +80 -80
  580. package/dist/session/projector.js +83 -83
  581. package/dist/session/prompt.js +115 -114
  582. package/dist/session/revert.js +87 -87
  583. package/dist/session/run-coordinator.js +2 -2
  584. package/dist/session/runner/index.js +84 -84
  585. package/dist/session/runner/llm.js +224 -223
  586. package/dist/session/runner/max-steps.js +2 -2
  587. package/dist/session/runner/model.js +83 -83
  588. package/dist/session/runner/publish-llm-event.js +4 -4
  589. package/dist/session/runner/retry.js +72 -72
  590. package/dist/session/runner/step.js +143 -143
  591. package/dist/session/runner/to-llm-message.js +2 -2
  592. package/dist/session/schema.js +2 -2
  593. package/dist/session/session.js +171 -170
  594. package/dist/session/shell.js +130 -129
  595. package/dist/session/skill.js +99 -98
  596. package/dist/session/sql.js +6 -6
  597. package/dist/session/stats.js +71 -71
  598. package/dist/session/store.js +79 -79
  599. package/dist/session/subagent-completion.js +2 -2
  600. package/dist/session/system-prompt.js +2 -2
  601. package/dist/session/title.js +152 -152
  602. package/dist/session/to-session-error.js +108 -108
  603. package/dist/session/transfer.js +207 -206
  604. package/dist/session/usage.js +2 -2
  605. package/dist/session.js +205 -204
  606. package/dist/shell/parse.js +7 -7
  607. package/dist/shell/parser-wasm.bun.js +1 -1
  608. package/dist/shell/parser-wasm.node.js +1 -1
  609. package/dist/shell/parser-wasm.workerd.js +1 -1
  610. package/dist/shell/result.js +2 -2
  611. package/dist/shell/scan.js +1 -1
  612. package/dist/shell/select.js +4 -4
  613. package/dist/shell.js +127 -127
  614. package/dist/skill/discovery.js +3 -3
  615. package/dist/skill/instructions.js +97 -97
  616. package/dist/skill.js +96 -96
  617. package/dist/snapshot.js +80 -80
  618. package/dist/state.js +8 -4
  619. package/dist/tool/html-markdown.js +2 -2
  620. package/dist/tool/http-body.js +2 -2
  621. package/dist/tool/mcp.js +121 -121
  622. package/dist/tool/plugin/edit.js +108 -108
  623. package/dist/tool/plugin/file-diff.js +2 -2
  624. package/dist/tool/plugin/glob.js +111 -111
  625. package/dist/tool/plugin/grep.js +111 -111
  626. package/dist/tool/plugin/opencode.js +11 -0
  627. package/dist/tool/plugin/patch.js +108 -108
  628. package/dist/tool/plugin/question.js +97 -97
  629. package/dist/tool/plugin/read.js +114 -114
  630. package/dist/tool/plugin/shell.js +208 -207
  631. package/dist/tool/plugin/skill.js +97 -97
  632. package/dist/tool/plugin/subagent.js +207 -206
  633. package/dist/tool/plugin/webfetch.js +98 -98
  634. package/dist/tool/plugin/websearch.js +100 -100
  635. package/dist/tool/plugin/write.js +108 -108
  636. package/dist/tool/read-filesystem.js +94 -94
  637. package/dist/tool/runtime.js +2 -2
  638. package/dist/tool-output.js +5 -5
  639. package/dist/tool.js +114 -114
  640. package/dist/types/agent.d.ts +2 -2
  641. package/dist/types/catalog.d.ts +2 -2
  642. package/dist/types/command.d.ts +2 -2
  643. package/dist/types/filesystem/location-watcher-policy.d.ts +2 -2
  644. package/dist/types/filesystem/watcher.d.ts +4 -2
  645. package/dist/types/filesystem.d.ts +1 -0
  646. package/dist/types/formatter.d.ts +2 -2
  647. package/dist/types/image.d.ts +2 -2
  648. package/dist/types/instruction-discovery.d.ts +2 -2
  649. package/dist/types/integration.d.ts +2 -2
  650. package/dist/types/mcp/index.d.ts +2 -2
  651. package/dist/types/model-resolver.d.ts +1 -1
  652. package/dist/types/plugin/module.d.ts +4 -1
  653. package/dist/types/plugin/service.d.ts +32 -0
  654. package/dist/types/plugin/source-directory.d.ts +1 -2
  655. package/dist/types/plugin.d.ts +2 -25
  656. package/dist/types/provider.d.ts +1 -1
  657. package/dist/types/reference.d.ts +2 -2
  658. package/dist/types/session/compaction.d.ts +13 -12
  659. package/dist/types/session/model-request.d.ts +6 -5
  660. package/dist/types/session/runner/publish-llm-event.d.ts +2 -2
  661. package/dist/types/shell/select.d.ts +2 -2
  662. package/dist/types/skill.d.ts +2 -2
  663. package/dist/types/snapshot.d.ts +2 -2
  664. package/dist/types/state.d.ts +34 -24
  665. package/dist/types/tool/plugin/glob.d.ts +1 -0
  666. package/dist/types/tool/plugin/opencode.d.ts +14 -0
  667. package/dist/types/tool-output.d.ts +4 -4
  668. package/dist/types/tool.d.ts +7 -5
  669. package/dist/types/v1/config/migrate.d.ts +1 -1
  670. package/dist/types/vcs.d.ts +2 -2
  671. package/dist/types/websearch.d.ts +2 -2
  672. package/dist/util/array.js +1 -1
  673. package/dist/util/error.js +2 -2
  674. package/dist/util/identifier.js +1 -1
  675. package/dist/util/iife.js +2 -2
  676. package/dist/util/lazy.js +2 -2
  677. package/dist/util/process-lock-ffi.bun.js +1 -1
  678. package/dist/util/process-lock-ffi.node.js +1 -1
  679. package/dist/util/process-lock-ffi.workerd.js +1 -1
  680. package/dist/util/process-lock.js +1 -1
  681. package/dist/util/slug.js +2 -2
  682. package/dist/util/token.js +2 -2
  683. package/dist/util/which.js +2 -2
  684. package/dist/util/wildcard.js +2 -2
  685. package/dist/v1/config/agent.js +4 -4
  686. package/dist/v1/config/attachment.js +3 -3
  687. package/dist/v1/config/command.js +2 -2
  688. package/dist/v1/config/config.js +15 -15
  689. package/dist/v1/config/error.js +3 -3
  690. package/dist/v1/config/formatter.js +2 -2
  691. package/dist/v1/config/layout.js +2 -2
  692. package/dist/v1/config/lsp.js +2 -2
  693. package/dist/v1/config/mcp.js +3 -3
  694. package/dist/v1/config/migrate.js +19 -19
  695. package/dist/v1/config/permission.js +2 -2
  696. package/dist/v1/config/plugin.js +2 -2
  697. package/dist/v1/config/provider-options.js +2 -2
  698. package/dist/v1/config/provider.js +3 -3
  699. package/dist/v1/config/server.js +3 -3
  700. package/dist/v1/config/skills.js +2 -2
  701. package/dist/v1/permission.js +1 -1
  702. package/dist/vcs/patch.js +2 -2
  703. package/dist/vcs.js +81 -81
  704. package/dist/websearch.js +73 -73
  705. package/dist/wellknown/plugin.js +73 -73
  706. package/dist/wellknown.js +72 -72
  707. package/dist/workspace/driver.js +2 -2
  708. package/dist/workspace/sql.js +2 -2
  709. package/dist/workspace.js +69 -69
  710. package/dist/worktree/directory.js +3 -3
  711. package/dist/worktree/git.js +7 -7
  712. package/dist/worktree/sql.js +6 -6
  713. package/dist/worktree.js +82 -82
  714. package/package.json +8 -7
  715. package/dist/chunks/reference-b7rje112.js +0 -139
  716. /package/dist/chunks/{reference-0cgt0xh2.js → aisdk-0cgt0xh2.js} +0 -0
  717. /package/dist/chunks/{reference-0f48qthw.js → aisdk-0f48qthw.js} +0 -0
  718. /package/dist/chunks/{reference-0zz82cjq.js → aisdk-0zz82cjq.js} +0 -0
  719. /package/dist/chunks/{reference-1fb7bmpf.js → aisdk-1fb7bmpf.js} +0 -0
  720. /package/dist/chunks/{reference-1wcz8fvj.js → aisdk-1wcz8fvj.js} +0 -0
  721. /package/dist/chunks/{reference-29n7vfk2.js → aisdk-29n7vfk2.js} +0 -0
  722. /package/dist/chunks/{reference-2qdx6zz3.js → aisdk-2qdx6zz3.js} +0 -0
  723. /package/dist/chunks/{reference-2xb0r1c6.js → aisdk-2xb0r1c6.js} +0 -0
  724. /package/dist/chunks/{reference-39ktntah.js → aisdk-39ktntah.js} +0 -0
  725. /package/dist/chunks/{reference-3g3rpp2x.js → aisdk-3g3rpp2x.js} +0 -0
  726. /package/dist/chunks/{reference-3w3ybtfd.js → aisdk-3w3ybtfd.js} +0 -0
  727. /package/dist/chunks/{reference-47ty4mvs.js → aisdk-47ty4mvs.js} +0 -0
  728. /package/dist/chunks/{reference-4b2tz2m9.js → aisdk-4b2tz2m9.js} +0 -0
  729. /package/dist/chunks/{reference-5a5ch9ts.js → aisdk-5a5ch9ts.js} +0 -0
  730. /package/dist/chunks/{reference-5va1yh78.js → aisdk-5va1yh78.js} +0 -0
  731. /package/dist/chunks/{reference-61ek4hj9.js → aisdk-61ek4hj9.js} +0 -0
  732. /package/dist/chunks/{reference-69qrqpw0.js → aisdk-69qrqpw0.js} +0 -0
  733. /package/dist/chunks/{reference-6zqxzw0a.js → aisdk-6zqxzw0a.js} +0 -0
  734. /package/dist/chunks/{reference-7n9qwqk4.js → aisdk-7n9qwqk4.js} +0 -0
  735. /package/dist/chunks/{reference-8nn8kqcn.js → aisdk-8nn8kqcn.js} +0 -0
  736. /package/dist/chunks/{reference-8rpfd2h6.js → aisdk-8rpfd2h6.js} +0 -0
  737. /package/dist/chunks/{reference-8sj3ajy5.js → aisdk-8sj3ajy5.js} +0 -0
  738. /package/dist/chunks/{reference-8w9tzfz1.js → aisdk-8w9tzfz1.js} +0 -0
  739. /package/dist/chunks/{reference-906y0b6d.js → aisdk-906y0b6d.js} +0 -0
  740. /package/dist/chunks/{reference-9dct5xhx.js → aisdk-9dct5xhx.js} +0 -0
  741. /package/dist/chunks/{reference-9maxscqf.js → aisdk-9maxscqf.js} +0 -0
  742. /package/dist/chunks/{reference-9sdtsapf.js → aisdk-9sdtsapf.js} +0 -0
  743. /package/dist/chunks/{reference-a02svayp.js → aisdk-a02svayp.js} +0 -0
  744. /package/dist/chunks/{reference-a83yvq99.js → aisdk-a83yvq99.js} +0 -0
  745. /package/dist/chunks/{reference-ayevdmef.js → aisdk-ayevdmef.js} +0 -0
  746. /package/dist/chunks/{reference-b02txbh8.js → aisdk-b02txbh8.js} +0 -0
  747. /package/dist/chunks/{reference-bbqs2y60.js → aisdk-bbqs2y60.js} +0 -0
  748. /package/dist/chunks/{reference-bjwj8hwv.js → aisdk-bjwj8hwv.js} +0 -0
  749. /package/dist/chunks/{reference-brsh5f65.js → aisdk-brsh5f65.js} +0 -0
  750. /package/dist/chunks/{reference-bxdhjb3y.js → aisdk-bxdhjb3y.js} +0 -0
  751. /package/dist/chunks/{reference-bybkghrn.js → aisdk-bybkghrn.js} +0 -0
  752. /package/dist/chunks/{reference-c77ad0vh.js → aisdk-c77ad0vh.js} +0 -0
  753. /package/dist/chunks/{reference-cm67rqy2.js → aisdk-cm67rqy2.js} +0 -0
  754. /package/dist/chunks/{reference-df3v2q6j.js → aisdk-df3v2q6j.js} +0 -0
  755. /package/dist/chunks/{reference-dhcq6c44.js → aisdk-dhcq6c44.js} +0 -0
  756. /package/dist/chunks/{reference-dht5baf0.js → aisdk-dht5baf0.js} +0 -0
  757. /package/dist/chunks/{reference-dkmkay92.js → aisdk-dkmkay92.js} +0 -0
  758. /package/dist/chunks/{reference-ehj9csmv.js → aisdk-ehj9csmv.js} +0 -0
  759. /package/dist/chunks/{reference-em6xpscd.js → aisdk-em6xpscd.js} +0 -0
  760. /package/dist/chunks/{reference-emmqknsm.js → aisdk-emmqknsm.js} +0 -0
  761. /package/dist/chunks/{reference-ezs3tagn.js → aisdk-ezs3tagn.js} +0 -0
  762. /package/dist/chunks/{reference-f14r7hfz.js → aisdk-f14r7hfz.js} +0 -0
  763. /package/dist/chunks/{reference-f1jj19e8.js → aisdk-f1jj19e8.js} +0 -0
  764. /package/dist/chunks/{reference-f4cp4g4a.js → aisdk-f4cp4g4a.js} +0 -0
  765. /package/dist/chunks/{reference-faypg4r1.js → aisdk-faypg4r1.js} +0 -0
  766. /package/dist/chunks/{reference-fg7fz4q3.js → aisdk-fg7fz4q3.js} +0 -0
  767. /package/dist/chunks/{reference-fgbfdq62.js → aisdk-fgbfdq62.js} +0 -0
  768. /package/dist/chunks/{reference-g23fad86.js → aisdk-g23fad86.js} +0 -0
  769. /package/dist/chunks/{reference-gd5xeqc2.js → aisdk-gd5xeqc2.js} +0 -0
  770. /package/dist/chunks/{reference-ghm4673n.js → aisdk-ghm4673n.js} +0 -0
  771. /package/dist/chunks/{reference-ghwjy7my.js → aisdk-ghwjy7my.js} +0 -0
  772. /package/dist/chunks/{reference-gy500k2r.js → aisdk-gy500k2r.js} +0 -0
  773. /package/dist/chunks/{reference-hzeg9cfr.js → aisdk-hzeg9cfr.js} +0 -0
  774. /package/dist/chunks/{reference-j07kk359.js → aisdk-j07kk359.js} +0 -0
  775. /package/dist/chunks/{reference-jqms80b0.js → aisdk-jqms80b0.js} +0 -0
  776. /package/dist/chunks/{reference-jve7t217.js → aisdk-jve7t217.js} +0 -0
  777. /package/dist/chunks/{reference-k3e42drn.js → aisdk-k3e42drn.js} +0 -0
  778. /package/dist/chunks/{reference-k8b45nas.js → aisdk-k8b45nas.js} +0 -0
  779. /package/dist/chunks/{reference-kpdbz7gn.js → aisdk-kpdbz7gn.js} +0 -0
  780. /package/dist/chunks/{reference-kxy11nzk.js → aisdk-kxy11nzk.js} +0 -0
  781. /package/dist/chunks/{reference-kyyqvx4s.js → aisdk-kyyqvx4s.js} +0 -0
  782. /package/dist/chunks/{reference-m8cbvarh.js → aisdk-m8cbvarh.js} +0 -0
  783. /package/dist/chunks/{reference-ma60vzgv.js → aisdk-ma60vzgv.js} +0 -0
  784. /package/dist/chunks/{reference-n3m50c2t.js → aisdk-n3m50c2t.js} +0 -0
  785. /package/dist/chunks/{reference-nkm1m8dz.js → aisdk-nkm1m8dz.js} +0 -0
  786. /package/dist/chunks/{reference-nsc0c3zb.js → aisdk-nsc0c3zb.js} +0 -0
  787. /package/dist/chunks/{reference-qaarhjrp.js → aisdk-qaarhjrp.js} +0 -0
  788. /package/dist/chunks/{reference-qc167nrn.js → aisdk-qc167nrn.js} +0 -0
  789. /package/dist/chunks/{reference-qp95y4jb.js → aisdk-qp95y4jb.js} +0 -0
  790. /package/dist/chunks/{reference-r8f4w671.js → aisdk-r8f4w671.js} +0 -0
  791. /package/dist/chunks/{reference-rdfev9jy.js → aisdk-rdfev9jy.js} +0 -0
  792. /package/dist/chunks/{reference-s7whb9gt.js → aisdk-s7whb9gt.js} +0 -0
  793. /package/dist/chunks/{reference-se76j685.js → aisdk-se76j685.js} +0 -0
  794. /package/dist/chunks/{reference-sem2g21k.js → aisdk-sem2g21k.js} +0 -0
  795. /package/dist/chunks/{reference-sp575ygv.js → aisdk-sp575ygv.js} +0 -0
  796. /package/dist/chunks/{reference-tmb1f636.js → aisdk-tmb1f636.js} +0 -0
  797. /package/dist/chunks/{reference-ttxf0gsy.js → aisdk-ttxf0gsy.js} +0 -0
  798. /package/dist/chunks/{reference-tvmhrvfj.js → aisdk-tvmhrvfj.js} +0 -0
  799. /package/dist/chunks/{reference-v2adqbbe.js → aisdk-v2adqbbe.js} +0 -0
  800. /package/dist/chunks/{reference-vac9eqd2.js → aisdk-vac9eqd2.js} +0 -0
  801. /package/dist/chunks/{reference-vpjkya7h.js → aisdk-vpjkya7h.js} +0 -0
  802. /package/dist/chunks/{reference-wj4sxzqa.js → aisdk-wj4sxzqa.js} +0 -0
  803. /package/dist/chunks/{reference-wwntjmk1.js → aisdk-wwntjmk1.js} +0 -0
  804. /package/dist/chunks/{reference-wyqjaaa5.js → aisdk-wyqjaaa5.js} +0 -0
  805. /package/dist/chunks/{reference-x4q807cx.js → aisdk-x4q807cx.js} +0 -0
  806. /package/dist/chunks/{reference-yrqrg4vp.js → aisdk-yrqrg4vp.js} +0 -0
  807. /package/dist/chunks/{reference-z47nswr2.js → aisdk-z47nswr2.js} +0 -0
  808. /package/dist/chunks/{reference-zsf8rs93.js → aisdk-zsf8rs93.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./reference-vpjkya7h.js";
3
+ } from "./aisdk-vpjkya7h.js";
4
4
 
5
5
  // src/plugin/system-prompt.ts
6
6
  var exports_system_prompt = {};
@@ -13,6 +13,7 @@ __export(exports_system_prompt, {
13
13
  Plugins: () => Plugins,
14
14
  SystemPromptPlugin: () => exports_system_prompt
15
15
  });
16
+ import { SystemPart } from "@opencode-ai/ai";
16
17
  import { define } from "@opencode-ai/plugin/effect/plugin";
17
18
  import { Effect } from "effect";
18
19
 
@@ -72,196 +73,26 @@ assistant: Clients are marked as failed in the \`connectToServer\` function in s
72
73
  </example>
73
74
  `;
74
75
 
75
- // src/plugin/system-prompt/codex.txt
76
- var codex_default = `You are OpenCode, the best coding agent on the planet.
76
+ // src/plugin/system-prompt/gpt-extension.txt
77
+ var gpt_extension_default = `# Response channels
77
78
 
78
- You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.
79
-
80
- ## Editing constraints
81
- - Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
82
- - Only add comments if they are necessary to make a non-obvious block easier to understand.
83
- - Try to use patch for single file edits, but it is fine to explore other options to make the edit if it does not work well. Do not use patch for changes that are auto-generated (i.e. generating package.json or running a lint or format command like gofmt) or when scripting is more efficient (such as search and replacing a string across a codebase).
84
-
85
- ## Tool usage
86
- - Prefer specialized tools over shell for file operations:
87
- - Use read to view files and patch to modify files.
88
- - Use glob to find files by name and grep to search file contents.
89
- - Use the shell tool for terminal operations (git, bun, builds, tests, running scripts).
90
- - Run tool calls in parallel when neither call needs the other’s output; otherwise run sequentially.
91
-
92
- ## Git and workspace hygiene
93
- - You may be in a dirty git worktree.
94
- * NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.
95
- * If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.
96
- * If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.
97
- * If the changes are in unrelated files, just ignore them and don't revert them.
98
- - Do not amend commits unless explicitly requested.
99
- - **NEVER** use destructive commands like \`git reset --hard\` or \`git checkout --\` unless specifically requested or approved by the user.
100
-
101
- ## Frontend tasks
102
- When doing frontend design tasks, avoid collapsing into bland, generic layouts.
103
- Aim for interfaces that feel intentional and deliberate.
104
- - Typography: Use expressive, purposeful fonts and avoid default stacks (Inter, Roboto, Arial, system).
105
- - Color & Look: Choose a clear visual direction; define CSS variables; avoid purple-on-white defaults. No purple bias or dark mode bias.
106
- - Motion: Use a few meaningful animations (page-load, staggered reveals) instead of generic micro-motions.
107
- - Background: Don't rely on flat, single-color backgrounds; use gradients, shapes, or subtle patterns to build atmosphere.
108
- - Overall: Avoid boilerplate layouts and interchangeable UI patterns. Vary themes, type families, and visual languages across outputs.
109
- - Ensure the page loads properly on both desktop and mobile.
110
-
111
- Exception: If working within an existing website or design system, preserve the established patterns, structure, and visual language.
112
-
113
- ## Presenting your work and final message
114
-
115
- You are producing plain text that will later be styled by the CLI. Follow these rules exactly. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value.
116
-
117
- - Default: be very concise; friendly coding teammate tone.
118
- - Default: do the work without asking questions. Treat short tasks as sufficient direction; infer missing details by reading the codebase and following existing conventions.
119
- - Questions: only ask when you are truly blocked after checking relevant context AND you cannot safely pick a reasonable default. This usually means one of:
120
- * The request is ambiguous in a way that materially changes the result and you cannot disambiguate by reading the repo.
121
- * The action is destructive/irreversible, touches production, or changes billing/security posture.
122
- * You need a secret/credential/value that cannot be inferred (API key, account id, etc.).
123
- - If you must ask: do all non-blocked work first, then ask exactly one targeted question, include your recommended default, and state what would change based on the answer.
124
- - Never ask permission questions like "Should I proceed?" or "Do you want me to run tests?"; proceed with the most reasonable option and mention what you did.
125
- - For substantial work, summarize clearly; follow final‑answer formatting.
126
- - Skip heavy formatting for simple confirmations.
127
- - Don't dump large files you've written; reference paths only.
128
- - No "save/copy this file" - User is on the same machine.
129
- - Offer logical next steps (tests, commits, build) briefly; add verify steps if you couldn't do something.
130
- - For code changes:
131
- * Lead with a quick explanation of the change, and then give more details on the context covering where and why a change was made. Do not start this explanation with "summary", just jump right in.
132
- * If there are natural next steps the user may want to take, suggest them at the end of your response. Do not make suggestions if there are no natural next steps.
133
- * When suggesting multiple options, use numeric lists for the suggestions so the user can quickly respond with a single number.
134
- - The user does not command execution outputs. When asked to show the output of a command (e.g. \`git show\`), relay the important details in your answer or summarize the key lines so the user understands the result.
135
-
136
- ## Final answer structure and style guidelines
137
-
138
- - Plain text; CLI handles styling. Use structure only when it helps scannability.
139
- - Headers: optional; short Title Case (1-3 words) wrapped in **…**; no blank line before the first bullet; add only if they truly help.
140
- - Bullets: use - ; merge related points; keep to one line when possible; 4–6 per list ordered by importance; keep phrasing consistent.
141
- - Monospace: backticks for commands/paths/env vars/code ids and inline examples; use for literal keyword bullets; never combine with **.
142
- - Code samples or multi-line snippets should be wrapped in fenced code blocks; include an info string as often as possible.
143
- - Structure: group related bullets; order sections general → specific → supporting; for subsections, start with a bolded keyword bullet, then items; match complexity to the task.
144
- - Tone: collaborative, concise, factual; present tense, active voice; self‑contained; no "above/below"; parallel wording.
145
- - Don'ts: no nested bullets/hierarchies; no ANSI codes; don't cram unrelated keywords; keep keyword lists short—wrap/reformat if long; avoid naming formatting styles in answers.
146
- - Adaptation: code explanations → precise, structured with code refs; simple tasks → lead with outcome; big changes → logical walkthrough + rationale + next actions; casual one-offs → plain sentences, no headers/bullets.
147
- - File References: When referencing files in your response follow the below rules:
148
- * Use inline code to make file paths clickable.
149
- * Each reference should have a stand alone path. Even if it's the same file.
150
- * Accepted: absolute, workspace‑relative, a/ or b/ diff prefixes, or bare filename/suffix.
151
- * Optionally include line/column (1‑based): :line[:column] or #Lline[Ccolumn] (column defaults to 1).
152
- * Do not use URIs like file://, vscode://, or https://.
153
- * Do not provide range of lines
154
- * Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\\repo\\project\\main.rs:12:5
155
- `;
156
-
157
- // src/plugin/system-prompt/gpt.txt
158
- var gpt_default = `You are OpenCode, You and the user share the same workspace and collaborate to achieve the user's goals.
159
-
160
- You are a deeply pragmatic, effective software engineer. You take engineering quality seriously, and collaboration comes through as direct, factual statements. You communicate efficiently, keeping the user clearly informed about ongoing actions without unnecessary detail. You build context by examining the codebase first without making assumptions or jumping to conclusions. You think through the nuances of the code you encounter, and embody the mentality of a skilled senior software engineer.
161
-
162
- - When searching for text or files, prefer using glob and grep tools (they are powered by \`rg\`)
163
- - Parallelize tool calls whenever possible - especially file reads. When independent tool calls have no dependencies, issue them together in the same assistant message. Never chain together shell commands with separators like \`echo "====";\` as this renders to the user poorly.
164
-
165
- ## Editing Approach
166
-
167
- - The best changes are often the smallest correct changes.
168
- - When you are weighing two correct approaches, prefer the more minimal one (less new names, helpers, tests, etc).
169
- - Keep things in one function unless composable or reusable
170
- - Do not add backward-compatibility code unless there is a concrete need, such as persisted data, shipped behavior, external consumers, or an explicit user requirement; if unclear, ask one short question instead of guessing.
171
-
172
- ## Autonomy and persistence
173
-
174
- Unless the user explicitly asks for a plan, asks a question about the code, is brainstorming potential solutions, or some other intent that makes it clear that code should not be written, assume the user wants you to make code changes or run tools to solve the user's problem. In these cases, it's bad to output your proposed solution in a message, you should go ahead and actually implement the change. If you encounter challenges or blockers, you should attempt to resolve them yourself.
175
-
176
- Persist until the task is fully handled end-to-end within the current turn whenever feasible: do not stop at analysis or partial fixes; carry changes through implementation, verification, and a clear explanation of outcomes unless the user explicitly pauses or redirects you.
177
-
178
- If you notice unexpected changes in the worktree or staging area that you did not make, continue with your task. NEVER revert, undo, or modify changes you did not make unless the user explicitly asks you to. There can be multiple agents or the user working in the same codebase concurrently.
179
-
180
- ## Editing constraints
181
-
182
- - Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
183
- - Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.
184
- - Use patch for manual code edits when available. Do not use cat or any other commands when creating or editing files. Formatting commands or bulk edits don't need to be done with patch.
185
- - Do not use Python to read/write files when a simple shell command or patch would suffice.
186
- - You may be in a dirty git worktree.
187
- * NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.
188
- * If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.
189
- * If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.
190
- * If the changes are in unrelated files, just ignore them and don't revert them.
191
- - Do not amend a commit unless explicitly requested to do so.
192
- - While you are working, you might notice unexpected changes that you didn't make. It's likely the user made them, or were autogenerated. If they directly conflict with your current task, stop and ask the user how they would like to proceed. Otherwise, focus on the task at hand.
193
- - **NEVER** use destructive commands like \`git reset --hard\` or \`git checkout --\` unless specifically requested or approved by the user.
194
- - You struggle using the git interactive console. **ALWAYS** prefer using non-interactive git commands.
195
-
196
- ## Special user requests
197
-
198
- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as \`date\`), you should do so.
199
-
200
- If the user pastes an error description or a bug report, help them diagnose the root cause. You can try to reproduce it if it seems feasible with the available tools and skills.
201
-
202
- If the user asks for a "review", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Findings must be the primary focus of the response - keep summaries or overviews brief and only after enumerating the issues. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change-summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps.
203
-
204
- ## Frontend tasks
205
-
206
- When doing frontend design tasks, avoid collapsing into "AI slop" or safe, average-looking layouts.
207
- - Ensure the page loads properly on both desktop and mobile
208
- - For React code, prefer modern patterns including useEffectEvent, startTransition, and useDeferredValue when appropriate if used by the team. Do not add useMemo/useCallback by default unless already used; follow the repo's React Compiler guidance.
209
- - Overall: Avoid boilerplate layouts and interchangeable UI patterns. Vary themes, type families, and visual languages across outputs.
210
-
211
- Exception: If working within an existing website or design system, preserve the established patterns, structure, and visual language.
212
-
213
- # Working with the user
214
-
215
- ## General
79
+ As you work, you send messages to the commentary channel. These are how you collaborate with the user while you work: stating assumptions and providing updates. Keep them concise and quickly scannable, and send them only when they add real information, such as a discovery, a tradeoff, or a blocker. Do not narrate routine reads, searches, or edits.
216
80
 
217
- Do not begin responses with conversational interjections or meta commentary. Avoid openers such as acknowledgements ("Done —", "Got it", "Great question, ") or framing phrases.
81
+ Do not put a final response, such as a blocking or clarifying question, in the commentary channel. The final answer must always be fully self-contained.
218
82
 
219
- Balance conciseness to not overwhelm the user with appropriate detail for the request. Do not narrate abstractly; explain what you are doing and why.
83
+ In the final answer, lead with the outcome, not the steps you took to reach it. Cover the most important information, use only as much structure as the answer needs, and skip explanation the user did not ask for. Include technical detail only where it helps.
220
84
 
221
- Never tell the user to "save/copy this file", the user is on the same machine and has access to the same files as you have.
85
+ # Delegation
222
86
 
87
+ Do not spawn subagents unless the user or applicable AGENTS.md/skill instructions explicitly ask for subagents, delegation, or parallel agent work.
223
88
 
224
- ## Formatting rules
89
+ # Destructive actions
225
90
 
226
- Your responses are rendered as GitHub-flavored Markdown.
91
+ Do not revert, reset, or discard changes you did not make. Never run destructive commands such as \`git reset --hard\`, \`git checkout --\`, or recursive deletes on broad paths unless the user clearly asked for that operation; if the target or scope is unclear, ask first. Prefer non-interactive git commands.
227
92
 
228
- Never use nested bullets. Keep lists flat (single level). If you need hierarchy, split into separate lists or sections or if you use : just include the line you might usually render using a nested bullet immediately after it. For numbered lists, only use the \`1. 2. 3.\` style markers (with a period), never \`1)\`.
93
+ # Autonomy
229
94
 
230
- Headers are optional, only use them when you think they are necessary. If you do use them, use short Title Case (1-3 words) wrapped in **…**. Don't add a blank line.
231
-
232
- Use inline code blocks for commands, paths, environment variables, function names, inline examples, keywords.
233
-
234
- Code samples or multi-line snippets should be wrapped in fenced code blocks. Include a language tag when possible.
235
-
236
- Don’t use emojis or em dashes unless explicitly instructed.
237
-
238
- ## Response channels
239
-
240
- Use commentary for short progress updates while working and final for the completed response.
241
-
242
- ### \`commentary\` channel
243
-
244
- Only use \`commentary\` for intermediary updates. These are short updates while you are working, they are NOT final answers. Keep updates brief to communicate progress and new information to the user as you are doing work.
245
-
246
- Send updates when they add meaningful new information: a discovery, a tradeoff, a blocker, a substantial plan, or the start of a non-trivial edit or verification step.
247
-
248
- Do not narrate routine reads, searches, obvious next steps, or minor confirmations. Combine related progress into a single update.
249
-
250
- Do not begin responses with conversational interjections or meta commentary. Avoid openers such as acknowledgements ("Done —", "Got it", "Great question") or framing phrases.
251
-
252
- Before substantial work, send a short update describing your first step. Before editing files, send an update describing the edit.
253
-
254
- After you have sufficient context, and the work is substantial you can provide a longer plan (this is the only user update that may be longer than 2 sentences and can contain formatting).
255
-
256
- ### \`final\` channel
257
-
258
- Use final for the completed response.
259
-
260
- Structure your final response if necessary. The complexity of the answer should match the task. If the task is simple, your answer should be a one-liner. Order sections from general to specific to supporting.
261
-
262
- If the user asks for a code explanation, include code references. For simple tasks, just state the outcome without heavy formatting.
263
-
264
- For large or complex changes, lead with the solution, then explain what you did and why. For casual chat, just chat. If something couldn’t be done (tests, builds, etc.), say so. Suggest next steps only when they are natural and useful; if you list options, use numbered items.
95
+ Do not infer authorization for work beyond the user's request. Assumptions that help you make progress are fine as long as they stay within the user's intent and the scope of the task.
265
96
  `;
266
97
 
267
98
  // src/plugin/system-prompt/kimi.txt
@@ -525,26 +356,26 @@ assistant: Clients are marked as failed in the \`connectToServer\` function in s
525
356
  `;
526
357
 
527
358
  // src/plugin/system-prompt.ts
528
- var OpenAIPlugin = make("openai", (id) => {
529
- if (id.includes("gpt")) {
530
- if (id.includes("codex"))
531
- return codex_default;
532
- return gpt_default;
533
- }
534
- if (id.includes("o1") || id.includes("o3"))
535
- return gpt_default;
359
+ var OpenAIPlugin = make("openai", (id) => id.includes("gpt") ? gpt_extension_default : undefined, {
360
+ operation: "append"
361
+ });
362
+ var AnthropicPlugin = make("anthropic", (id) => id.includes("claude") ? anthropic_default : undefined, {
363
+ operation: "replace"
364
+ });
365
+ var KimiPlugin = make("kimi", (id) => id.includes("kimi") ? kimi_default : undefined, {
366
+ operation: "replace"
367
+ });
368
+ var ArceePlugin = make("arcee", (id) => id.includes("trinity") ? trinity_default : undefined, {
369
+ operation: "replace"
536
370
  });
537
- var AnthropicPlugin = make("anthropic", (id) => id.includes("claude") ? anthropic_default : undefined);
538
- var KimiPlugin = make("kimi", (id) => id.includes("kimi") ? kimi_default : undefined);
539
- var ArceePlugin = make("arcee", (id) => id.includes("trinity") ? trinity_default : undefined);
540
371
  var MetaPlugin = make("meta", (id) => {
541
372
  if (!id.includes("muse"))
542
373
  return;
543
374
  const name = id.includes("muse-glimmer") ? "Muse Glimmer" : "Muse Spark";
544
375
  return meta_default.replaceAll("{{MODEL_NAME}}", name);
545
- });
376
+ }, { operation: "replace" });
546
377
  var Plugins = [OpenAIPlugin, AnthropicPlugin, KimiPlugin, ArceePlugin, MetaPlugin];
547
- function make(id, select) {
378
+ function make(id, getPrompt, options) {
548
379
  return define({
549
380
  id: `opencode.prompt.${id}`,
550
381
  effect: Effect.fn(`SystemPromptPlugin.${id}`)(function* (ctx) {
@@ -555,9 +386,13 @@ function make(id, select) {
555
386
  if (!system)
556
387
  return;
557
388
  const model = (yield* ctx.catalog.model.list()).data.find((model2) => model2.providerID === event.model.providerID && model2.id === event.model.id);
558
- const prompt = select(`${model?.modelID ?? event.model.id} ${model?.family ?? ""}`.toLowerCase());
389
+ const prompt = getPrompt(`${model?.modelID ?? event.model.id} ${model?.family ?? ""}`.toLowerCase());
559
390
  if (!prompt)
560
391
  return;
392
+ if (options.operation === "append") {
393
+ event.system.splice(1, 0, SystemPart.make(prompt));
394
+ return;
395
+ }
561
396
  event.system[0] = { ...system, text: prompt };
562
397
  }).pipe(Effect.catch(() => Effect.void)));
563
398
  })
@@ -2,10 +2,10 @@ import {
2
2
  Failed,
3
3
  NotFound,
4
4
  WrongKind
5
- } from "./reference-vynk8zbr.js";
5
+ } from "./aisdk-vynk8zbr.js";
6
6
  import {
7
7
  __export
8
- } from "./reference-vpjkya7h.js";
8
+ } from "./aisdk-vpjkya7h.js";
9
9
 
10
10
  // src/environment/exec-defaults.ts
11
11
  var exports_exec_defaults = {};
@@ -1,12 +1,12 @@
1
- import {
2
- exports_form
3
- } from "./reference-dxcg1gpj.js";
4
1
  import {
5
2
  exports_permission
6
- } from "./reference-yt5sqzpx.js";
3
+ } from "./aisdk-wpy9b1rj.js";
4
+ import {
5
+ exports_form
6
+ } from "./aisdk-kx5nctx9.js";
7
7
  import {
8
8
  __export
9
- } from "./reference-vpjkya7h.js";
9
+ } from "./aisdk-vpjkya7h.js";
10
10
 
11
11
  // src/tool/plugin/question.ts
12
12
  var exports_question = {};
@@ -55,7 +55,7 @@ var Plugin = {
55
55
  effect: Effect.fn("QuestionTool.Plugin")(function* (ctx) {
56
56
  const forms = yield* exports_form.Service;
57
57
  const permission = yield* exports_permission.Service;
58
- yield* ctx.tool.transform((draft) => draft.add({
58
+ yield* ctx.tool.transform((editor) => editor.add({
59
59
  name,
60
60
  options: { codemode: false },
61
61
  description,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./reference-vpjkya7h.js";
3
+ } from "./aisdk-vpjkya7h.js";
4
4
 
5
5
  // src/plugin/promise.ts
6
6
  var exports_promise = {};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadSDKFactory
3
- } from "./reference-j32vdj8r.js";
3
+ } from "./aisdk-snpn6bap.js";
4
4
 
5
5
  // src/plugin/provider/dynamic.ts
6
6
  import { Effect } from "effect";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./reference-vpjkya7h.js";
3
+ } from "./aisdk-vpjkya7h.js";
4
4
 
5
5
  // src/session/system-prompt.ts
6
6
  var exports_system_prompt = {};
@@ -15,6 +15,7 @@ var system_default = `You are an AI agent powered by OpenCode, a coding agent ha
15
15
  # Harness
16
16
  - Responses are rendered as GitHub-flavored Markdown.
17
17
  - \`<system-reminder>\` blocks are harness instructions, not user-authored content. Read and follow them.
18
+ - Prefer parallelizing independent tool calls.
18
19
  \${OPENCODE_TOOL_GUIDANCE}
19
20
 
20
21
  # Communication
@@ -29,15 +30,15 @@ var system_default = `You are an AI agent powered by OpenCode, a coding agent ha
29
30
  // src/session/system-prompt.ts
30
31
  function make(tools) {
31
32
  const instructions = [];
33
+ if (tools.includes("shell")) {
34
+ instructions.push("- Prefer dedicated tools over shell commands; fall back to the shell when a tool cannot do what you need.");
35
+ }
32
36
  if (tools.includes("write")) {
33
37
  instructions.push("- Use the write tool to create files or completely replace their content. Prefer using the edit tool for targeted changes.");
34
38
  }
35
39
  if (tools.includes("edit")) {
36
40
  instructions.push("- Use the edit tool for targeted changes to existing text files. It replaces the exact text in `oldString` with `newString`, and the values must differ. By default, `oldString` must occur exactly once. If it occurs multiple times, include more surrounding context to make it unique or set `replaceAll` to true to replace every occurrence.");
37
41
  }
38
- if (tools.includes("read")) {
39
- instructions.push("- Prefer using the read tool rather than shell commands like `cat`.");
40
- }
41
42
  return system_default.replace("${OPENCODE_TOOL_GUIDANCE}", instructions.join(`
42
43
  `));
43
44
  }
@@ -4,7 +4,7 @@ import {
4
4
  getViewSelectedFieldsRuntime,
5
5
  mapUpdateSet,
6
6
  orderSelectedFields
7
- } from "./reference-k8b45nas.js";
7
+ } from "./aisdk-k8b45nas.js";
8
8
 
9
9
  // src/database/drizzle/sqlite-core/effect/update.ts
10
10
  import { applyEffectWrapper } from "drizzle-orm/effect-core/query-effect";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  exports_search
3
- } from "./reference-p4fwfknn.js";
3
+ } from "./aisdk-f4h7s1h5.js";
4
4
  import {
5
5
  exports_location
6
- } from "./reference-pp6802x5.js";
6
+ } from "./aisdk-2xaaqh5g.js";
7
7
  import {
8
8
  PositiveInt,
9
9
  RelativePath
10
- } from "./reference-j07kk359.js";
10
+ } from "./aisdk-j07kk359.js";
11
11
  import {
12
12
  __export
13
- } from "./reference-vpjkya7h.js";
13
+ } from "./aisdk-vpjkya7h.js";
14
14
 
15
15
  // src/filesystem.ts
16
16
  var exports_filesystem = {};
@@ -56,6 +56,7 @@ var DEFAULT_SEARCH_TIMEOUT_MS = 30000;
56
56
  class GlobInput extends Schema.Class("FileSystem.GlobInput")({
57
57
  pattern: Schema.String,
58
58
  path: Schema.optionalKey(RelativePath),
59
+ hidden: Schema.optionalKey(Schema.Boolean),
59
60
  limit: Schema.optionalKey(PositiveInt)
60
61
  }) {
61
62
  }
@@ -1,18 +1,22 @@
1
1
  import {
2
2
  exports_host
3
- } from "./reference-an1f8bbd.js";
3
+ } from "./aisdk-2322sp5n.js";
4
4
  import {
5
- exports_kv
6
- } from "./reference-9s00a4cy.js";
5
+ Service,
6
+ awaitActivation
7
+ } from "./aisdk-esv5q40e.js";
7
8
  import {
8
9
  exports_state
9
- } from "./reference-b7rje112.js";
10
+ } from "./aisdk-dyrfpcd0.js";
11
+ import {
12
+ exports_kv
13
+ } from "./aisdk-58hm31pf.js";
10
14
  import {
11
15
  exports_bus
12
- } from "./reference-jghhn6h0.js";
16
+ } from "./aisdk-p87673dz.js";
13
17
  import {
14
18
  __export
15
- } from "./reference-vpjkya7h.js";
19
+ } from "./aisdk-vpjkya7h.js";
16
20
 
17
21
  // src/plugin.ts
18
22
  var exports_plugin = {};
@@ -24,14 +28,13 @@ __export(exports_plugin, {
24
28
  Service: () => Service,
25
29
  Source: () => Source,
26
30
  State: () => State,
31
+ awaitActivation: () => awaitActivation,
27
32
  node: () => node
28
33
  });
29
34
  import { Event, ID, Info, Source, State } from "@opencode-ai/schema/plugin";
30
35
  import { Plugin } from "@opencode-ai/schema/plugin";
31
36
  import { Node } from "@opencode-ai/util/effect/app-node";
32
37
  import { Cause, Context, Effect, Exit, Latch, Layer, Logger, References, Scope, Semaphore } from "effect";
33
- class Service extends Context.Service()("@opencode/Plugin") {
34
- }
35
38
  var layer = Layer.effect(Service, Effect.gen(function* () {
36
39
  const bus = yield* exports_bus.Service;
37
40
  const kv = yield* exports_kv.Service;
@@ -57,7 +60,7 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
57
60
  const load = Effect.fnUntraced(function* (plugin) {
58
61
  const child = yield* Scope.fork(scope);
59
62
  const inherit = yield* exports_state.inherit();
60
- const loaded = yield* Effect.suspend(() => plugin.effect({ ...host, storage: exports_host.storage(kv, plugin.id) })).pipe(inherit, Effect.updateContext((context) => Context.make(Scope.Scope, child).pipe(Context.add(Logger.CurrentLoggers, Context.get(context, Logger.CurrentLoggers)), Context.add(References.MinimumLogLevel, Context.get(context, References.MinimumLogLevel)))), Effect.withSpan("Plugin.load", { attributes: { "plugin.id": plugin.id } }), Effect.andThen(bus.publish(Plugin.Event.Added, { id: Plugin.ID.make(plugin.id) })), Effect.onExit((exit) => Exit.isFailure(exit) ? Scope.close(child, exit) : Effect.void), Effect.exit);
63
+ const loaded = yield* Effect.suspend(() => plugin.effect({ ...host, storage: exports_host.storage(kv, plugin.id) })).pipe(inherit, Effect.updateContext((context) => Context.make(Scope.Scope, child).pipe(Context.add(Logger.CurrentLoggers, Context.get(context, Logger.CurrentLoggers)), Context.add(References.MinimumLogLevel, Context.get(context, References.MinimumLogLevel)))), Effect.withSpan("Plugin.load", { attributes: { "plugin.id": plugin.id } }), Effect.onExit((exit) => Exit.isFailure(exit) ? Scope.close(child, exit) : Effect.void), Effect.exit);
61
64
  if (Exit.isSuccess(loaded))
62
65
  return { scope: child };
63
66
  yield* Effect.logWarning("failed to load plugin", {
@@ -75,16 +78,19 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
75
78
  ids.add(definition.id);
76
79
  }
77
80
  yield* Effect.acquireUseRelease(hold(), () => lock.withPermit(Effect.gen(function* () {
78
- if (active.size === definitions.length && Array.from(active.values()).every((entry, index) => {
79
- const definition = definitions[index];
80
- return entry.plugin.id === definition?.id && entry.plugin.revision === definition.revision;
81
- })) {
82
- for (const definition of definitions) {
83
- const entry = active.get(definition.id);
84
- if (entry)
85
- active.set(definition.id, { ...entry, plugin: definition });
86
- }
87
- const nextInventory = [...definitions.map(activeInfo), ...failures];
81
+ const current = Array.from(active.values());
82
+ const changed = definitions.findIndex((definition, index) => {
83
+ const entry = current[index];
84
+ return entry?.plugin.id !== definition.id || entry.plugin.revision !== definition.revision;
85
+ });
86
+ const prefix = changed === -1 ? definitions.length : changed;
87
+ for (const definition of definitions.slice(0, prefix)) {
88
+ const entry = active.get(definition.id);
89
+ if (entry)
90
+ active.set(definition.id, { ...entry, plugin: definition });
91
+ }
92
+ if (prefix === definitions.length && active.size === definitions.length) {
93
+ const nextInventory = [...Array.from(active.values()).map(slotInfo), ...failures];
88
94
  if (JSON.stringify(inventory) === JSON.stringify(nextInventory))
89
95
  return;
90
96
  inventory = nextInventory;
@@ -92,48 +98,46 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
92
98
  return;
93
99
  }
94
100
  yield* exports_state.batch(Effect.gen(function* () {
95
- const nextInventory = [];
96
- for (const definition of definitions) {
97
- const previous = active.get(definition.id);
98
- active.delete(definition.id);
99
- if (previous)
100
- yield* Scope.close(previous.scope, Exit.void);
101
+ const previous = new Map(Array.from(active.entries()).slice(prefix));
102
+ yield* Effect.forEach(Array.from(previous.entries()).toReversed(), ([id, slot]) => Effect.gen(function* () {
103
+ active.delete(id);
104
+ if (slot.loaded)
105
+ yield* Scope.close(slot.loaded.scope, Exit.void);
106
+ }), { discard: true });
107
+ for (const definition of definitions.slice(prefix)) {
101
108
  const loaded = yield* load(definition);
102
109
  if (loaded.scope !== undefined) {
103
- active.set(definition.id, { plugin: definition, scope: loaded.scope });
104
- nextInventory.push(activeInfo(definition));
110
+ active.set(definition.id, {
111
+ plugin: definition,
112
+ loaded: { plugin: definition, scope: loaded.scope }
113
+ });
105
114
  continue;
106
115
  }
107
- nextInventory.push({
108
- id: definition.id,
109
- source: definition.source ?? { type: "builtin" },
110
- state: { status: "failed", error: loaded.error },
111
- features: { server: true, ...definition.features }
112
- });
113
- if (!previous)
116
+ active.set(definition.id, { plugin: definition, error: loaded.error });
117
+ const fallback = previous.get(definition.id)?.loaded;
118
+ if (!fallback)
114
119
  continue;
115
- const restored = yield* load(previous.plugin);
120
+ const restored = yield* load(fallback.plugin);
116
121
  if (restored.scope !== undefined) {
117
- active.set(definition.id, { plugin: previous.plugin, scope: restored.scope });
122
+ active.set(definition.id, {
123
+ plugin: definition,
124
+ loaded: { plugin: fallback.plugin, scope: restored.scope },
125
+ error: loaded.error
126
+ });
118
127
  continue;
119
128
  }
120
129
  yield* Effect.logError("failed to restore plugin; deactivating", {
121
130
  "plugin.id": definition.id
122
131
  });
123
132
  }
124
- const removed = Array.from(active.entries()).filter(([id]) => !ids.has(id)).toReversed();
125
- removed.forEach(([id]) => active.delete(id));
126
- yield* Effect.forEach(removed, ([, entry]) => Scope.close(entry.scope, Exit.void), {
127
- discard: true
128
- });
129
- inventory = [...nextInventory, ...failures];
133
+ inventory = [...Array.from(active.values()).map(slotInfo), ...failures];
130
134
  }));
131
135
  yield* bus.publish(Plugin.Event.Updated, {});
132
136
  })), (release) => release);
133
137
  });
134
138
  const close = (exit) => lock.withPermit(Effect.gen(function* () {
135
139
  active.clear();
136
- yield* exports_state.batch(Scope.close(scope, exit), { flush: false });
140
+ yield* exports_state.shutdown(Scope.close(scope, exit));
137
141
  }));
138
142
  yield* Effect.addFinalizer(close);
139
143
  return Service.of({
@@ -144,12 +148,12 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
144
148
  list
145
149
  });
146
150
  }));
147
- function activeInfo(plugin) {
151
+ function slotInfo(slot) {
148
152
  return {
149
- id: Plugin.ID.make(plugin.id),
150
- source: plugin.source ?? { type: "builtin" },
151
- state: { status: "active" },
152
- features: { server: true, ...plugin.features }
153
+ id: Plugin.ID.make(slot.plugin.id),
154
+ source: slot.plugin.source ?? { type: "builtin" },
155
+ state: slot.error === undefined ? { status: "active" } : { status: "failed", error: slot.error },
156
+ features: { server: true, ...slot.plugin.features }
153
157
  };
154
158
  }
155
159
  var node = Node.makeLocationNode({
@@ -158,4 +162,4 @@ var node = Node.makeLocationNode({
158
162
  deps: [exports_host.requirements]
159
163
  });
160
164
 
161
- export { Service, node, exports_plugin, Event, ID, Info, Source, State };
165
+ export { node, exports_plugin, Event, ID, Info, Source, State };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  InstructionEntryTable
3
- } from "./reference-q606pcse.js";
3
+ } from "./aisdk-q606pcse.js";
4
4
  import {
5
5
  exports_instructions
6
- } from "./reference-c54e84vp.js";
6
+ } from "./aisdk-c54e84vp.js";
7
7
  import {
8
8
  exports_database
9
- } from "./reference-xwpxh8hr.js";
9
+ } from "./aisdk-4eb5ep2q.js";
10
10
  import {
11
11
  __export
12
- } from "./reference-vpjkya7h.js";
12
+ } from "./aisdk-vpjkya7h.js";
13
13
 
14
14
  // src/session/instruction-entry.ts
15
15
  var exports_instruction_entry = {};
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  exports_app
3
- } from "./reference-hs51b0fc.js";
3
+ } from "./aisdk-hs51b0fc.js";
4
4
  import {
5
5
  exports_provider
6
- } from "./reference-zq5w46q0.js";
6
+ } from "./aisdk-68yag814.js";
7
7
  import {
8
8
  __require
9
- } from "./reference-vpjkya7h.js";
9
+ } from "./aisdk-vpjkya7h.js";
10
10
 
11
11
  // src/plugin/provider/gitlab.ts
12
12
  import os from "os";