@opencode-ai/core 0.0.0-beta-18148 → 0.0.0-beta-18219

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 (791) hide show
  1. package/dist/account/sql.js +2 -2
  2. package/dist/agent.js +74 -74
  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 +72 -72
  7. package/dist/catalog.js +82 -82
  8. package/dist/chunks/{tool-02dbfq60.js → state-02dbfq60.js} +1 -1
  9. package/dist/chunks/{tool-gwvph7b1.js → state-0b13gwpq.js} +4 -4
  10. package/dist/chunks/{tool-0b17sr9d.js → state-0b17sr9d.js} +2 -2
  11. package/dist/chunks/{tool-e8nz8rq7.js → state-0dqphqhz.js} +3 -3
  12. package/dist/chunks/{tool-0kvmztkf.js → state-0kvmztkf.js} +1 -1
  13. package/dist/chunks/{tool-nsn3de2b.js → state-0r6r61g5.js} +2 -2
  14. package/dist/chunks/{tool-0vgt3zn6.js → state-0vgt3zn6.js} +2 -2
  15. package/dist/chunks/{tool-ejjtnsqc.js → state-1427k8mt.js} +4 -4
  16. package/dist/chunks/{tool-f0d1d2m6.js → state-14wbm4hn.js} +7 -7
  17. package/dist/chunks/{tool-18pv8fg3.js → state-18pv8fg3.js} +2 -2
  18. package/dist/chunks/{tool-02s4hv33.js → state-19nk26qg.js} +6 -6
  19. package/dist/chunks/{tool-1a3a2s70.js → state-1a3a2s70.js} +2 -2
  20. package/dist/chunks/{tool-1b390eyt.js → state-1b390eyt.js} +2 -2
  21. package/dist/chunks/{tool-eg0r1wye.js → state-1fqmpy8k.js} +42 -30
  22. package/dist/chunks/{tool-8krgkfx1.js → state-1g0dcjrg.js} +4 -4
  23. package/dist/chunks/{tool-jy47zfgh.js → state-1jaejmkb.js} +4 -4
  24. package/dist/chunks/{tool-h98mf69b.js → state-20hhthrk.js} +8 -8
  25. package/dist/chunks/{tool-2nmyybe0.js → state-2nmyybe0.js} +1 -1
  26. package/dist/chunks/{tool-3vbm1v85.js → state-2r1bah04.js} +6 -6
  27. package/dist/chunks/{tool-2ya5073c.js → state-2ya5073c.js} +1 -1
  28. package/dist/chunks/{tool-2zf7hxjt.js → state-2zf7hxjt.js} +2 -2
  29. package/dist/chunks/{tool-nq3rhfsn.js → state-2zyrrrhx.js} +7 -7
  30. package/dist/chunks/{tool-37e9hbzs.js → state-37e9hbzs.js} +2 -2
  31. package/dist/chunks/{tool-50qcmj3d.js → state-38jwdxby.js} +2 -2
  32. package/dist/chunks/{tool-3d1t6jqf.js → state-3d1t6jqf.js} +3 -3
  33. package/dist/chunks/{tool-3g8vftxb.js → state-3g8vftxb.js} +2 -2
  34. package/dist/chunks/{tool-3gsv1x0v.js → state-3gsv1x0v.js} +2 -2
  35. package/dist/chunks/{tool-0g8511jf.js → state-3mexq3pq.js} +14 -14
  36. package/dist/chunks/{tool-3thh6229.js → state-3thh6229.js} +2 -2
  37. package/dist/chunks/{tool-3ew6q1bh.js → state-3zqgma8g.js} +6 -6
  38. package/dist/chunks/{tool-6p8py0zd.js → state-46qzmhmr.js} +11 -11
  39. package/dist/chunks/{tool-axn3swgr.js → state-4ce5qhvd.js} +6 -6
  40. package/dist/chunks/{tool-v5p69e1j.js → state-4g5pgmex.js} +13 -13
  41. package/dist/chunks/{tool-ehay7pv0.js → state-4gksgcvv.js} +44 -49
  42. package/dist/chunks/{tool-4j7te1s0.js → state-4j7te1s0.js} +2 -2
  43. package/dist/chunks/{tool-jfb223e4.js → state-4pxf671z.js} +3 -3
  44. package/dist/chunks/{tool-4s2xwh5d.js → state-4s2xwh5d.js} +3 -3
  45. package/dist/chunks/{tool-4zzdwbaz.js → state-4zzdwbaz.js} +2 -2
  46. package/dist/chunks/{tool-50jxp3hw.js → state-50jxp3hw.js} +1 -1
  47. package/dist/chunks/{tool-xz7xrnjf.js → state-568e76aa.js} +5 -5
  48. package/dist/chunks/{tool-57tzwnz4.js → state-57tzwnz4.js} +1 -1
  49. package/dist/chunks/{tool-58xdvehb.js → state-58xdvehb.js} +1 -1
  50. package/dist/chunks/{tool-z3a6zs7j.js → state-59d95h76.js} +13 -13
  51. package/dist/chunks/{tool-4rrsm889.js → state-5cj22h72.js} +152 -144
  52. package/dist/chunks/{tool-5fe026tx.js → state-5fe026tx.js} +3 -3
  53. package/dist/chunks/{tool-xspksmzq.js → state-5gas9jc2.js} +11 -11
  54. package/dist/chunks/{tool-jny4m711.js → state-5m91ayta.js} +6 -6
  55. package/dist/chunks/{tool-0xn1rg63.js → state-5mntg4nb.js} +4 -4
  56. package/dist/chunks/{tool-5rs65q6p.js → state-5rs65q6p.js} +1 -1
  57. package/dist/chunks/{tool-5hvbv3as.js → state-5tehh5r2.js} +12 -12
  58. package/dist/chunks/{tool-5vcssjzn.js → state-5vcssjzn.js} +1 -1
  59. package/dist/chunks/{tool-7gb0xxf6.js → state-5vpdk7xd.js} +6 -6
  60. package/dist/chunks/{tool-5xrsrne4.js → state-5xrsrne4.js} +3 -3
  61. package/dist/chunks/{tool-2dargkq0.js → state-5z4zwtb4.js} +2 -2
  62. package/dist/chunks/{tool-6pq3agsx.js → state-5zayf0x8.js} +65 -65
  63. package/dist/chunks/{tool-fmkss9bc.js → state-625h1wqn.js} +6 -6
  64. package/dist/chunks/{tool-y5k1wv90.js → state-63gtrn1b.js} +2 -2
  65. package/dist/chunks/{tool-dna755ge.js → state-6a16bmez.js} +7 -7
  66. package/dist/chunks/{tool-b22z3ekw.js → state-6dpj79be.js} +3 -3
  67. package/dist/chunks/{tool-6ky7rqk7.js → state-6ky7rqk7.js} +1 -1
  68. package/dist/chunks/{tool-491my4a3.js → state-6msxydxg.js} +14 -14
  69. package/dist/chunks/{tool-6q0m15b3.js → state-6q0m15b3.js} +1 -1
  70. package/dist/chunks/{tool-6x98y149.js → state-6x98y149.js} +2 -2
  71. package/dist/chunks/{tool-y35p1cj5.js → state-77cj1yb3.js} +3 -3
  72. package/dist/chunks/{tool-89sr4hh7.js → state-78y9e82n.js} +3 -3
  73. package/dist/chunks/{tool-d594dyq5.js → state-7fr2g77j.js} +8 -8
  74. package/dist/chunks/{tool-eae423ze.js → state-7g3ydvzh.js} +5 -5
  75. package/dist/chunks/{tool-7gqqz1s8.js → state-7gqqz1s8.js} +1 -1
  76. package/dist/chunks/{tool-7khw64yh.js → state-7khw64yh.js} +1 -1
  77. package/dist/chunks/{tool-7mrpdsq5.js → state-7mrpdsq5.js} +1 -1
  78. package/dist/chunks/{tool-fdcj5r96.js → state-7qqad34w.js} +10 -10
  79. package/dist/chunks/{tool-w6ckq87g.js → state-7svew3xx.js} +7 -7
  80. package/dist/chunks/{tool-7wcmqxrc.js → state-7wcmqxrc.js} +1 -1
  81. package/dist/chunks/{tool-88jbfw8z.js → state-88jbfw8z.js} +2 -2
  82. package/dist/chunks/{tool-rkk2x1se.js → state-8a9e14vy.js} +33 -14
  83. package/dist/chunks/{tool-8gp1tmat.js → state-8gp1tmat.js} +3 -3
  84. package/dist/chunks/{tool-mpds2fpt.js → state-8mftgzpj.js} +3 -3
  85. package/dist/chunks/{tool-n4pksz6v.js → state-8tw3qzpt.js} +3 -3
  86. package/dist/chunks/{tool-ayr9ywyp.js → state-982wwmdk.js} +3 -3
  87. package/dist/chunks/{tool-2zkpb25t.js → state-993n0k7x.js} +3 -3
  88. package/dist/chunks/{tool-999qd968.js → state-999qd968.js} +1 -1
  89. package/dist/chunks/{tool-9f0rnpkn.js → state-9f0rnpkn.js} +1 -1
  90. package/dist/chunks/{tool-9p8mhgdp.js → state-9p8mhgdp.js} +1 -1
  91. package/dist/chunks/{tool-hk9221cy.js → state-9wqc5k0a.js} +3 -3
  92. package/dist/chunks/{tool-80d8k4wg.js → state-ayfpp7hf.js} +7 -7
  93. package/dist/chunks/{tool-ayfwnm78.js → state-ayfwnm78.js} +2 -2
  94. package/dist/chunks/{tool-0wpmswrv.js → state-bcvcrp33.js} +3 -3
  95. package/dist/chunks/{tool-6kfmqqv4.js → state-bdhgfttt.js} +11 -11
  96. package/dist/chunks/{tool-bh1wr8rq.js → state-bh1wr8rq.js} +2 -2
  97. package/dist/chunks/{tool-gyk1q5xq.js → state-bh50qah0.js} +4 -4
  98. package/dist/chunks/{tool-d87mh626.js → state-bkw9e9jk.js} +38 -38
  99. package/dist/chunks/{tool-byab506k.js → state-byab506k.js} +1 -1
  100. package/dist/chunks/{tool-0rn4wx80.js → state-c09ww48j.js} +3 -3
  101. package/dist/chunks/{tool-c4wcb9vc.js → state-c4wcb9vc.js} +2 -2
  102. package/dist/chunks/{tool-1a00xj9r.js → state-c9eyxdsa.js} +11 -11
  103. package/dist/chunks/{tool-c9tk9ghs.js → state-c9tk9ghs.js} +2 -2
  104. package/dist/chunks/{tool-yp6a9x5t.js → state-cb46h7pc.js} +7 -7
  105. package/dist/chunks/{tool-jhgchhyk.js → state-cqdxefk2.js} +33 -11
  106. package/dist/chunks/{tool-t6tkhgr6.js → state-crg4yysy.js} +2 -2
  107. package/dist/chunks/{tool-cve546b2.js → state-cve546b2.js} +2 -2
  108. package/dist/chunks/{tool-jxg1mb53.js → state-cwzmv738.js} +2 -2
  109. package/dist/chunks/{tool-cz3dkvcz.js → state-cz3dkvcz.js} +1 -1
  110. package/dist/chunks/{tool-65t8x3mp.js → state-d19eexxk.js} +4 -4
  111. package/dist/chunks/{tool-d2gk9vpf.js → state-d2gk9vpf.js} +2 -2
  112. package/dist/chunks/{tool-djtj7tjn.js → state-d7y00n83.js} +23 -23
  113. package/dist/chunks/{tool-e6vex8s8.js → state-dgfy6zt2.js} +4 -4
  114. package/dist/chunks/{tool-9me1qth4.js → state-dhccyx0v.js} +1 -1
  115. package/dist/chunks/{tool-dhphtf1x.js → state-dhphtf1x.js} +1 -1
  116. package/dist/chunks/{tool-djkt4gex.js → state-djkt4gex.js} +1 -1
  117. package/dist/chunks/{tool-pn8tj92r.js → state-dr1mvjy7.js} +3 -3
  118. package/dist/chunks/{tool-pjywn1fy.js → state-drean1vx.js} +62 -23
  119. package/dist/chunks/{tool-dyrphakh.js → state-dyrphakh.js} +2 -2
  120. package/dist/chunks/{tool-hrmqpkw1.js → state-e0wkpsf3.js} +5 -5
  121. package/dist/chunks/{tool-mrx95f8d.js → state-e1pa6vc2.js} +14 -15
  122. package/dist/chunks/{tool-e1z9a0ts.js → state-e1z9a0ts.js} +2 -2
  123. package/dist/chunks/{tool-4xt36d54.js → state-e2qdw0tg.js} +10 -10
  124. package/dist/chunks/{tool-s597vgwa.js → state-e9jfq0e9.js} +8 -8
  125. package/dist/chunks/{tool-20e3f75x.js → state-eaejza2t.js} +4 -4
  126. package/dist/chunks/{tool-ec8vrfw5.js → state-ec8vrfw5.js} +1 -1
  127. package/dist/chunks/{tool-bfgpcntw.js → state-effdwybp.js} +13 -13
  128. package/dist/chunks/{tool-dtmn9n0n.js → state-efvmw2xw.js} +2 -2
  129. package/dist/chunks/{tool-t3gpg6np.js → state-en9qv3ee.js} +5 -5
  130. package/dist/chunks/{tool-epzxjdf4.js → state-epzxjdf4.js} +4 -4
  131. package/dist/chunks/{tool-rfvq20p6.js → state-eq90zxhy.js} +3 -3
  132. package/dist/chunks/{tool-pc1tantx.js → state-esjk7kfz.js} +7 -7
  133. package/dist/chunks/{tool-f11jbhcb.js → state-f11jbhcb.js} +4 -4
  134. package/dist/chunks/{tool-f9wt0tjw.js → state-f9wt0tjw.js} +2 -2
  135. package/dist/chunks/{tool-fb7nfzf2.js → state-fb7nfzf2.js} +3 -3
  136. package/dist/chunks/{tool-0f8pz6dh.js → state-fdx44h11.js} +4 -4
  137. package/dist/chunks/{tool-5a0wgdcb.js → state-fkg79ekq.js} +13 -12
  138. package/dist/chunks/{tool-pgxfadne.js → state-ftfyk4m7.js} +4 -4
  139. package/dist/chunks/{tool-ewwhht7q.js → state-fvnc3e3d.js} +8 -8
  140. package/dist/chunks/{tool-qgwg4s20.js → state-fwsc80k7.js} +3 -3
  141. package/dist/chunks/{tool-qnae35cy.js → state-fxw49t4p.js} +4 -4
  142. package/dist/chunks/{tool-jxdkv5a3.js → state-fypnrcda.js} +6 -6
  143. package/dist/chunks/{tool-020k9cm3.js → state-fywp5vae.js} +5 -5
  144. package/dist/chunks/{tool-01smtdnd.js → state-g1zg5aqr.js} +3 -3
  145. package/dist/chunks/{tool-g7t6p8r2.js → state-g7t6p8r2.js} +1 -1
  146. package/dist/chunks/{tool-gcay93cp.js → state-gcay93cp.js} +1 -1
  147. package/dist/chunks/{tool-gd2xppx8.js → state-gd2xppx8.js} +1 -1
  148. package/dist/chunks/{tool-gg8gy1ab.js → state-gg8gy1ab.js} +2 -2
  149. package/dist/chunks/state-gqn2zsfg.js +429 -0
  150. package/dist/chunks/{tool-syxy6ytt.js → state-gwpydf4a.js} +3 -3
  151. package/dist/chunks/state-h094egad.js +132 -0
  152. package/dist/chunks/{tool-jj23ng5x.js → state-h9sy0va2.js} +6 -6
  153. package/dist/chunks/{tool-ap0rmgsh.js → state-hhfaz00h.js} +3 -3
  154. package/dist/chunks/{tool-hhxt27np.js → state-hhxt27np.js} +2 -2
  155. package/dist/chunks/{tool-j3xjfahf.js → state-hk8exvw2.js} +2 -2
  156. package/dist/chunks/{tool-8nrwvtht.js → state-hk8vx4ga.js} +5 -5
  157. package/dist/chunks/{tool-hp6rpdnc.js → state-hp6rpdnc.js} +1 -1
  158. package/dist/chunks/{tool-nrkas8zm.js → state-hqh8yks9.js} +4 -4
  159. package/dist/chunks/{tool-8bkmtpp6.js → state-hsyk7kfz.js} +5 -5
  160. package/dist/chunks/{tool-q07sa4nq.js → state-j2rwtkhe.js} +4 -4
  161. package/dist/chunks/{tool-zyv51q6q.js → state-j5q8scqt.js} +8 -8
  162. package/dist/chunks/{tool-dvm04eq0.js → state-j5tp9x2q.js} +15 -15
  163. package/dist/chunks/{tool-v2y3bqbd.js → state-jfgv8vsa.js} +10 -10
  164. package/dist/chunks/{tool-17qmam82.js → state-jm68rb0q.js} +8 -8
  165. package/dist/chunks/{tool-jssy2dr3.js → state-jssy2dr3.js} +2 -2
  166. package/dist/chunks/{tool-k42t1tha.js → state-k42t1tha.js} +2 -2
  167. package/dist/chunks/{tool-vvsez07j.js → state-kb2qf3qs.js} +3 -3
  168. package/dist/chunks/{tool-d95empd3.js → state-kdn1ck8k.js} +3 -3
  169. package/dist/chunks/{tool-kg1345f7.js → state-kg1345f7.js} +1 -1
  170. package/dist/chunks/{tool-kp1t5rcy.js → state-kp1t5rcy.js} +1 -1
  171. package/dist/chunks/{tool-ncyeyn0m.js → state-mc1mz2pc.js} +4 -4
  172. package/dist/chunks/{tool-mf0hyk7z.js → state-mf0hyk7z.js} +1 -1
  173. package/dist/chunks/{tool-mh28new4.js → state-mh28new4.js} +2 -2
  174. package/dist/chunks/{tool-mnb85w6b.js → state-mnb85w6b.js} +2 -2
  175. package/dist/chunks/{tool-mxvw03gv.js → state-mxvw03gv.js} +1 -1
  176. package/dist/chunks/{tool-048yyq10.js → state-myychbwq.js} +7 -7
  177. package/dist/chunks/state-n39vvkp0.js +5 -0
  178. package/dist/chunks/{tool-nesb2rcz.js → state-nesb2rcz.js} +2 -2
  179. package/dist/chunks/{tool-rkcx81da.js → state-njywpcye.js} +13 -13
  180. package/dist/chunks/{tool-nr76rjj3.js → state-nr76rjj3.js} +2 -2
  181. package/dist/chunks/{tool-ywrhnfsa.js → state-nzexh2ja.js} +89 -89
  182. package/dist/chunks/{tool-nzrjycs5.js → state-nzrjycs5.js} +1 -1
  183. package/dist/chunks/{tool-cke3skfe.js → state-p1xvm7za.js} +28 -39
  184. package/dist/chunks/{tool-pfqehjmy.js → state-pfqehjmy.js} +2 -2
  185. package/dist/chunks/{tool-pq4b4pqk.js → state-pq4b4pqk.js} +2 -2
  186. package/dist/chunks/{tool-xczxd94r.js → state-qajwj4ps.js} +6 -6
  187. package/dist/chunks/{tool-865jrn9e.js → state-qasbckzx.js} +92 -92
  188. package/dist/chunks/{tool-1t908443.js → state-qe0aav6y.js} +8 -8
  189. package/dist/chunks/{tool-qe0d689s.js → state-qe0d689s.js} +2 -2
  190. package/dist/chunks/{tool-vcq95k40.js → state-qh4vq1fm.js} +10 -10
  191. package/dist/chunks/{tool-qhdqjp31.js → state-qhdqjp31.js} +1 -1
  192. package/dist/chunks/{tool-fyh2hwxy.js → state-qjnrmq1k.js} +5 -5
  193. package/dist/chunks/{tool-gn6sd1bh.js → state-qqevkq7v.js} +1 -1
  194. package/dist/chunks/{tool-m5zw7dnb.js → state-qsh6aavw.js} +4 -4
  195. package/dist/chunks/{tool-fc0p81cy.js → state-qtaajmpt.js} +3 -3
  196. package/dist/chunks/{tool-65re92qg.js → state-qv06sb3r.js} +39 -6
  197. package/dist/chunks/{tool-r3k9abhd.js → state-r3k9abhd.js} +2 -2
  198. package/dist/chunks/{tool-rahat93a.js → state-rahat93a.js} +1 -1
  199. package/dist/chunks/{tool-rfbm65k8.js → state-rfbm65k8.js} +1 -1
  200. package/dist/chunks/{tool-e90sndj9.js → state-rgk6q7se.js} +3 -3
  201. package/dist/chunks/{tool-dd33dt68.js → state-rmr740y4.js} +52 -48
  202. package/dist/chunks/{tool-rn9r0ddn.js → state-rn9r0ddn.js} +2 -2
  203. package/dist/chunks/{tool-j5mb7fzz.js → state-rph6nvyf.js} +27 -27
  204. package/dist/chunks/{tool-h04mfeyz.js → state-rrc4sky2.js} +8 -8
  205. package/dist/chunks/{tool-dxgdqh6n.js → state-rs9n91g6.js} +6 -6
  206. package/dist/chunks/{tool-s33fw6zm.js → state-s33fw6zm.js} +1 -1
  207. package/dist/chunks/{tool-rqff2fxf.js → state-s4ame7nd.js} +5 -5
  208. package/dist/chunks/{tool-b7hsw5bk.js → state-se1aqaya.js} +4 -4
  209. package/dist/chunks/{tool-mnk1hgwj.js → state-sh61temt.js} +25 -25
  210. package/dist/chunks/{tool-e3a5351g.js → state-shg9btfn.js} +10 -10
  211. package/dist/chunks/{tool-67wds419.js → state-shhqc982.js} +12 -12
  212. package/dist/chunks/{tool-smpeg8c9.js → state-smpeg8c9.js} +2 -2
  213. package/dist/chunks/{tool-sw84ckhj.js → state-sw84ckhj.js} +1 -1
  214. package/dist/chunks/{tool-c9m9veqy.js → state-t0tt4nmt.js} +11 -11
  215. package/dist/chunks/{tool-t14kykx1.js → state-t14kykx1.js} +1 -1
  216. package/dist/chunks/{tool-tb33ng7x.js → state-tb33ng7x.js} +2 -2
  217. package/dist/chunks/{tool-tcptxgyq.js → state-tcptxgyq.js} +1 -1
  218. package/dist/chunks/{tool-r33pggsn.js → state-te0cypm2.js} +9 -9
  219. package/dist/chunks/{tool-thstd87d.js → state-thstd87d.js} +1 -1
  220. package/dist/chunks/{tool-07370043.js → state-tj4jvx23.js} +7 -7
  221. package/dist/chunks/{tool-tjjf1q77.js → state-tjjf1q77.js} +1 -1
  222. package/dist/chunks/{tool-pgxeyjjq.js → state-tpwp4gvc.js} +6 -6
  223. package/dist/chunks/{tool-zffe4dwc.js → state-tt8fjeh9.js} +64 -64
  224. package/dist/chunks/{tool-v2wshkax.js → state-v2wshkax.js} +1 -1
  225. package/dist/chunks/{tool-v80zsxnb.js → state-v80zsxnb.js} +1 -1
  226. package/dist/chunks/{tool-v972xay6.js → state-v972xay6.js} +1 -1
  227. package/dist/chunks/{tool-v9bfv94f.js → state-v9bfv94f.js} +1 -1
  228. package/dist/chunks/{tool-5rm9re06.js → state-va5k7fad.js} +3 -3
  229. package/dist/chunks/{tool-vcwr2vpf.js → state-vcwr2vpf.js} +1 -1
  230. package/dist/chunks/{tool-vqbmgfq1.js → state-vqbmgfq1.js} +3 -3
  231. package/dist/chunks/{tool-ecs05jkt.js → state-vvmq9xvn.js} +48 -27
  232. package/dist/chunks/{tool-my18m2rj.js → state-vz30fbtb.js} +3 -3
  233. package/dist/chunks/{tool-vz89hfgr.js → state-vz89hfgr.js} +1 -1
  234. package/dist/chunks/{tool-wbkt8qpj.js → state-wbkt8qpj.js} +1 -1
  235. package/dist/chunks/{tool-yt1s9r19.js → state-wcc1vz83.js} +66 -36
  236. package/dist/chunks/{tool-wd268jeg.js → state-wd268jeg.js} +1 -1
  237. package/dist/chunks/{tool-wmxdh12w.js → state-wmxdh12w.js} +1 -1
  238. package/dist/chunks/{tool-wps8gh8n.js → state-wps8gh8n.js} +2 -2
  239. package/dist/chunks/{tool-8v47shgf.js → state-wptv627x.js} +7 -3
  240. package/dist/chunks/{tool-6hn8t5cq.js → state-wrw92r0k.js} +11 -11
  241. package/dist/chunks/{tool-v43225w3.js → state-wvjbjymc.js} +2 -2
  242. package/dist/chunks/{tool-b9x8kpvk.js → state-wyhq3myq.js} +5 -5
  243. package/dist/chunks/{tool-hgrzp0k8.js → state-wzvy0tx9.js} +4 -4
  244. package/dist/chunks/{tool-ysxk876j.js → state-x07gtesk.js} +5 -5
  245. package/dist/chunks/{tool-xczfw7dq.js → state-xczfw7dq.js} +1 -1
  246. package/dist/chunks/{tool-xgv25zxy.js → state-xgv25zxy.js} +1 -1
  247. package/dist/chunks/{tool-8khs03wd.js → state-xjn4tcwe.js} +4 -4
  248. package/dist/chunks/{tool-bstj8yyp.js → state-xm8j1t5h.js} +4 -4
  249. package/dist/chunks/{tool-xwftk1fd.js → state-xwftk1fd.js} +2 -2
  250. package/dist/chunks/{tool-xxpvz42q.js → state-xxpvz42q.js} +3 -3
  251. package/dist/chunks/{tool-p4cfd1rg.js → state-xz479kyk.js} +3 -3
  252. package/dist/chunks/{tool-y0x38cee.js → state-y0x38cee.js} +1 -1
  253. package/dist/chunks/{tool-y198y2ra.js → state-y198y2ra.js} +1 -1
  254. package/dist/chunks/{tool-6hvdj2cr.js → state-y643ex83.js} +6 -6
  255. package/dist/chunks/{tool-y67x6rf6.js → state-y67x6rf6.js} +1 -1
  256. package/dist/chunks/{tool-wgqeepqk.js → state-y966n2ac.js} +12 -12
  257. package/dist/chunks/{tool-y980s7ka.js → state-y980s7ka.js} +3 -3
  258. package/dist/chunks/state-yb8yd193.js +252 -0
  259. package/dist/chunks/{tool-ybhfpy64.js → state-ybhfpy64.js} +2 -2
  260. package/dist/chunks/{tool-yf0knd5z.js → state-yf0knd5z.js} +2 -2
  261. package/dist/chunks/{tool-8bqpm1yy.js → state-yfq2zvb9.js} +50 -6
  262. package/dist/chunks/{tool-ygy0xbqa.js → state-ygy0xbqa.js} +3 -3
  263. package/dist/chunks/{tool-vndj2wpf.js → state-z88k6s2w.js} +4 -4
  264. package/dist/chunks/{tool-bd1ny6jy.js → state-zbjdaqcp.js} +6 -6
  265. package/dist/chunks/{tool-zbqqnp0n.js → state-zbqqnp0n.js} +1 -1
  266. package/dist/chunks/{tool-zdkg1k91.js → state-zdkg1k91.js} +1 -1
  267. package/dist/chunks/{tool-7w5rsddk.js → state-zrbk8s17.js} +11 -11
  268. package/dist/chunks/{tool-zxcy6vhn.js → state-zxcy6vhn.js} +1 -1
  269. package/dist/chunks/{tool-zxe9jjhn.js → state-zxe9jjhn.js} +2 -2
  270. package/dist/codemode/catalog.js +2 -2
  271. package/dist/codemode/instructions.js +4 -4
  272. package/dist/codemode/tool.js +3 -3
  273. package/dist/command.js +74 -74
  274. package/dist/config/markdown.js +2 -2
  275. package/dist/config/normalize.js +20 -20
  276. package/dist/config/plugin/agent.js +134 -133
  277. package/dist/config/plugin/command.js +117 -117
  278. package/dist/config/plugin/compaction.js +169 -169
  279. package/dist/config/plugin/entry-observer.js +113 -113
  280. package/dist/config/plugin/formatter.js +118 -118
  281. package/dist/config/plugin/image.js +129 -129
  282. package/dist/config/plugin/instruction.js +89 -89
  283. package/dist/config/plugin/location-watcher.js +116 -116
  284. package/dist/config/plugin/mcp.js +126 -126
  285. package/dist/config/plugin/policy.js +115 -115
  286. package/dist/config/plugin/provider.js +114 -114
  287. package/dist/config/plugin/reference.js +118 -118
  288. package/dist/config/plugin/shell.js +117 -117
  289. package/dist/config/plugin/skill-file.js +107 -106
  290. package/dist/config/plugin/skill.js +137 -136
  291. package/dist/config/plugin/snapshot.js +116 -116
  292. package/dist/config/plugin/source.js +113 -113
  293. package/dist/config/plugin/tool-output.js +118 -118
  294. package/dist/config/plugin/websearch.js +114 -114
  295. package/dist/config/variable.js +4 -4
  296. package/dist/config.js +112 -112
  297. package/dist/credential/sql.js +3 -3
  298. package/dist/credential.js +72 -72
  299. package/dist/database/database.js +69 -69
  300. package/dist/database/drizzle/effect-sqlite/driver.js +16 -16
  301. package/dist/database/drizzle/effect-sqlite/index.js +16 -16
  302. package/dist/database/drizzle/effect-sqlite/migrator.js +15 -15
  303. package/dist/database/drizzle/effect-sqlite/session.js +15 -15
  304. package/dist/database/drizzle/index.js +20 -20
  305. package/dist/database/drizzle/internal/drizzle-utils.js +2 -2
  306. package/dist/database/drizzle/sqlite-core/effect/count.js +2 -2
  307. package/dist/database/drizzle/sqlite-core/effect/db.js +10 -10
  308. package/dist/database/drizzle/sqlite-core/effect/delete.js +3 -3
  309. package/dist/database/drizzle/sqlite-core/effect/index.js +20 -20
  310. package/dist/database/drizzle/sqlite-core/effect/insert.js +3 -3
  311. package/dist/database/drizzle/sqlite-core/effect/query.js +2 -2
  312. package/dist/database/drizzle/sqlite-core/effect/raw.js +2 -2
  313. package/dist/database/drizzle/sqlite-core/effect/select.js +3 -3
  314. package/dist/database/drizzle/sqlite-core/effect/session.js +14 -14
  315. package/dist/database/drizzle/sqlite-core/effect/update.js +3 -3
  316. package/dist/database/drizzle/up-migrations/effect-sqlite.js +4 -4
  317. package/dist/database/drizzle/up-migrations/sqlite.js +2 -2
  318. package/dist/database/drizzle/up-migrations/utils.js +2 -2
  319. package/dist/database/drizzle.js +21 -21
  320. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +2 -2
  321. package/dist/database/migration/20260211171708_add_project_commands.js +2 -2
  322. package/dist/database/migration/20260213144116_wakeful_the_professor.js +2 -2
  323. package/dist/database/migration/20260225215848_workspace.js +2 -2
  324. package/dist/database/migration/20260227213759_add_session_workspace_id.js +2 -2
  325. package/dist/database/migration/20260228203230_blue_harpoon.js +2 -2
  326. package/dist/database/migration/20260303231226_add_workspace_fields.js +2 -2
  327. package/dist/database/migration/20260309230000_move_org_to_state.js +2 -2
  328. package/dist/database/migration/20260312043431_session_message_cursor.js +2 -2
  329. package/dist/database/migration/20260323234822_events.js +2 -2
  330. package/dist/database/migration/20260410174513_workspace-name.js +2 -2
  331. package/dist/database/migration/20260413175956_chief_energizer.js +2 -2
  332. package/dist/database/migration/20260423070820_add_icon_url_override.js +2 -2
  333. package/dist/database/migration/20260427172553_slow_nightmare.js +2 -2
  334. package/dist/database/migration/20260428004200_add_session_path.js +2 -2
  335. package/dist/database/migration/20260501142318_next_venus.js +2 -2
  336. package/dist/database/migration/20260504145000_add_sync_owner.js +2 -2
  337. package/dist/database/migration/20260507164347_add_workspace_time.js +2 -2
  338. package/dist/database/migration/20260510033149_session_usage.js +2 -2
  339. package/dist/database/migration/20260511000411_data_migration_state.js +2 -2
  340. package/dist/database/migration/20260511173437_session-metadata.js +2 -2
  341. package/dist/database/migration/20260601010001_normalize_storage_paths.js +2 -2
  342. package/dist/database/migration/20260601202201_amazing_prowler.js +2 -2
  343. package/dist/database/migration/20260602002951_lowly_union_jack.js +2 -2
  344. package/dist/database/migration/20260602182828_add_project_directories.js +2 -2
  345. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +2 -2
  346. package/dist/database/migration/20260603040000_session_message_projection_order.js +2 -2
  347. package/dist/database/migration/20260603141458_session_input_inbox.js +2 -2
  348. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +2 -2
  349. package/dist/database/migration/20260604172448_event_sourced_session_input.js +2 -2
  350. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +2 -2
  351. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +2 -2
  352. package/dist/database/migration/20260611035744_credential.js +2 -2
  353. package/dist/database/migration/20260611192811_lush_chimera.js +2 -2
  354. package/dist/database/migration/20260612174303_project_dir_strategy.js +2 -2
  355. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +2 -2
  356. package/dist/database/migration/20260622170816_reset_v2_session_state.js +2 -2
  357. package/dist/database/migration/20260622202450_simplify_session_input.js +2 -2
  358. package/dist/database/migration/20260804233008_loose_psylocke.js +2 -2
  359. package/dist/database/migration/20260805200742_import_legacy_credentials.js +2 -2
  360. package/dist/database/migration/20260808023530_workspace_domain.js +2 -2
  361. package/dist/database/migration/20260811161259_execution_claim_attempts.js +2 -2
  362. package/dist/database/migration/20260812181746_session_inbox.js +2 -2
  363. package/dist/database/migration/20260812213948_worktree.js +2 -2
  364. package/dist/database/migration/20260819222447_session_viewed_state.js +2 -2
  365. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +2 -2
  366. package/dist/database/migration.gen.js +48 -48
  367. package/dist/database/migration.js +50 -50
  368. package/dist/database/path.js +3 -3
  369. package/dist/database/schema.gen.js +2 -2
  370. package/dist/database/schema.sql.js +2 -2
  371. package/dist/database/sqlite.bun.js +2 -2
  372. package/dist/database/sqlite.js +2 -2
  373. package/dist/database/sqlite.node.js +2 -2
  374. package/dist/database/sqlite.workerd.js +2 -2
  375. package/dist/database/v1-migration.bun.js +82 -82
  376. package/dist/database/v1-migration.js +2 -2
  377. package/dist/database/v1-migration.noop.js +1 -1
  378. package/dist/effect/app-node-builder.js +330 -330
  379. package/dist/effect/app-node-platform.js +3 -3
  380. package/dist/effect/keyed-mutex.js +2 -2
  381. package/dist/effect/websocket-constructor.js +2 -2
  382. package/dist/environment/driver.js +1 -1
  383. package/dist/environment/environment.js +90 -90
  384. package/dist/environment/exec-defaults.js +3 -3
  385. package/dist/environment/files.js +2 -2
  386. package/dist/environment/index.js +92 -92
  387. package/dist/environment/local.js +3 -3
  388. package/dist/environment/memory.js +3 -3
  389. package/dist/environment/unavailable.js +1 -1
  390. package/dist/event/sql.js +2 -2
  391. package/dist/event-logger.js +72 -72
  392. package/dist/file-mutation.js +91 -91
  393. package/dist/file-retention.js +2 -2
  394. package/dist/file.js +2 -2
  395. package/dist/filesystem/fff.bun.js +2 -2
  396. package/dist/filesystem/fff.js +2 -2
  397. package/dist/filesystem/fff.node.js +2 -2
  398. package/dist/filesystem/fff.workerd.js +2 -2
  399. package/dist/filesystem/ignore.js +1 -1
  400. package/dist/filesystem/location-watcher-policy.js +3 -3
  401. package/dist/filesystem/location-watcher.js +310 -305
  402. package/dist/filesystem/protected.js +2 -2
  403. package/dist/filesystem/search.js +95 -95
  404. package/dist/filesystem/watcher-binding.js +2 -2
  405. package/dist/filesystem/watcher.js +4 -4
  406. package/dist/filesystem.js +95 -95
  407. package/dist/form.js +73 -73
  408. package/dist/formatter/builtins.js +3 -3
  409. package/dist/formatter.js +84 -84
  410. package/dist/generate.js +88 -88
  411. package/dist/git.js +5 -5
  412. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +2 -2
  413. package/dist/github-copilot/chat/get-response-metadata.js +2 -2
  414. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +2 -2
  415. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +8 -8
  416. package/dist/github-copilot/chat/openai-compatible-chat-options.js +2 -2
  417. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +2 -2
  418. package/dist/github-copilot/copilot-provider.js +18 -18
  419. package/dist/github-copilot/models.js +4 -4
  420. package/dist/github-copilot/openai-compatible-error.js +2 -2
  421. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +2 -2
  422. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +2 -2
  423. package/dist/github-copilot/responses/openai-error.js +2 -2
  424. package/dist/github-copilot/responses/openai-responses-language-model.js +11 -11
  425. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +7 -7
  426. package/dist/github-copilot/responses/tool/code-interpreter.js +2 -2
  427. package/dist/github-copilot/responses/tool/file-search.js +2 -2
  428. package/dist/github-copilot/responses/tool/image-generation.js +2 -2
  429. package/dist/github-copilot/responses/tool/web-search-preview.js +2 -2
  430. package/dist/github-copilot/responses/tool/web-search.js +2 -2
  431. package/dist/id/id.js +2 -2
  432. package/dist/image/photon-wasm.bun.js +1 -1
  433. package/dist/image/photon-wasm.node.js +1 -1
  434. package/dist/image/photon-wasm.workerd.js +1 -1
  435. package/dist/image/photon.js +97 -97
  436. package/dist/image.js +97 -97
  437. package/dist/instruction-discovery.js +76 -76
  438. package/dist/instructions/builtins.js +85 -85
  439. package/dist/instructions/index.js +2 -2
  440. package/dist/integration/connection.js +2 -2
  441. package/dist/integration.js +79 -79
  442. package/dist/job.js +4 -4
  443. package/dist/kv/sql.js +3 -3
  444. package/dist/kv.js +72 -72
  445. package/dist/location-activity.js +84 -84
  446. package/dist/location-mutation.js +83 -83
  447. package/dist/location-service-map.js +83 -83
  448. package/dist/location-services.js +330 -330
  449. package/dist/location.js +82 -82
  450. package/dist/mcp/client.js +91 -91
  451. package/dist/mcp/index.js +97 -97
  452. package/dist/mcp/instructions.js +127 -127
  453. package/dist/mcp/oauth.js +2 -2
  454. package/dist/mcp/stdio.js +91 -91
  455. package/dist/mime.js +2 -2
  456. package/dist/model-resolver.js +85 -85
  457. package/dist/model.js +3 -3
  458. package/dist/models-dev.js +79 -79
  459. package/dist/oauth/page.js +2 -2
  460. package/dist/permission/saved.js +83 -83
  461. package/dist/permission/sql.js +6 -6
  462. package/dist/permission.js +104 -103
  463. package/dist/persistent-pty/binary.bun.js +87 -0
  464. package/dist/persistent-pty/binary.node.js +9 -0
  465. package/dist/persistent-pty/binary.workerd.js +9 -0
  466. package/dist/persistent-pty/daemon.js +13 -0
  467. package/dist/persistent-pty/index.js +89 -0
  468. package/dist/persistent-pty/pty-binding.js +7 -0
  469. package/dist/persistent-pty.js +79 -0
  470. package/dist/plugin/agent.js +105 -104
  471. package/dist/plugin/command.js +98 -98
  472. package/dist/plugin/hooks.js +3 -3
  473. package/dist/plugin/host.js +169 -166
  474. package/dist/plugin/internal.js +302 -299
  475. package/dist/plugin/mcp-codemode-exclusion.js +2 -2
  476. package/dist/plugin/models-dev.js +80 -80
  477. package/dist/plugin/plan.js +105 -104
  478. package/dist/plugin/promise.js +2 -2
  479. package/dist/plugin/provider/alibaba.js +3 -3
  480. package/dist/plugin/provider/amazon-bedrock.js +3 -3
  481. package/dist/plugin/provider/anthropic.js +3 -3
  482. package/dist/plugin/provider/azure.js +120 -120
  483. package/dist/plugin/provider/cerebras.js +3 -3
  484. package/dist/plugin/provider/cloudflare-ai-gateway.js +121 -121
  485. package/dist/plugin/provider/cloudflare-workers-ai.js +121 -121
  486. package/dist/plugin/provider/cohere.js +3 -3
  487. package/dist/plugin/provider/configured.js +118 -118
  488. package/dist/plugin/provider/deepinfra.js +3 -3
  489. package/dist/plugin/provider/dynamic.js +2 -2
  490. package/dist/plugin/provider/factory.js +2 -2
  491. package/dist/plugin/provider/gateway.js +3 -3
  492. package/dist/plugin/provider/github-copilot.js +86 -86
  493. package/dist/plugin/provider/gitlab.js +4 -4
  494. package/dist/plugin/provider/google-vertex.js +3 -3
  495. package/dist/plugin/provider/groq.js +3 -3
  496. package/dist/plugin/provider/kilo.js +3 -3
  497. package/dist/plugin/provider/llmgateway.js +81 -81
  498. package/dist/plugin/provider/lmstudio.js +113 -113
  499. package/dist/plugin/provider/mistral.js +3 -3
  500. package/dist/plugin/provider/nvidia.js +3 -3
  501. package/dist/plugin/provider/ollama.js +113 -113
  502. package/dist/plugin/provider/openai-compatible.js +2 -2
  503. package/dist/plugin/provider/openai.js +83 -83
  504. package/dist/plugin/provider/opencode.js +97 -97
  505. package/dist/plugin/provider/openrouter.js +4 -4
  506. package/dist/plugin/provider/perplexity.js +3 -3
  507. package/dist/plugin/provider/sap-ai-core.js +3 -3
  508. package/dist/plugin/provider/snowflake-cortex.js +3 -3
  509. package/dist/plugin/provider/togetherai.js +3 -3
  510. package/dist/plugin/provider/venice.js +3 -3
  511. package/dist/plugin/provider/vercel.js +3 -3
  512. package/dist/plugin/provider/vllm.js +113 -113
  513. package/dist/plugin/provider/xai.js +82 -82
  514. package/dist/plugin/provider/zenmux.js +3 -3
  515. package/dist/plugin/provider.js +159 -159
  516. package/dist/plugin/runtime.js +155 -155
  517. package/dist/plugin/sdk.js +73 -73
  518. package/dist/plugin/skill.js +135 -134
  519. package/dist/plugin/supervisor-service.js +2 -2
  520. package/dist/plugin/supervisor.js +309 -304
  521. package/dist/plugin/system-prompt.js +2 -2
  522. package/dist/plugin/variant.js +4 -4
  523. package/dist/plugin/vcs/git.js +91 -0
  524. package/dist/plugin/vcs/hg.js +91 -0
  525. package/dist/plugin/warming.js +114 -114
  526. package/dist/plugin/websearch/exa.js +4 -4
  527. package/dist/plugin/websearch/firecrawl.js +5 -5
  528. package/dist/plugin/websearch/index.js +9 -9
  529. package/dist/plugin/websearch/mcp.js +3 -3
  530. package/dist/plugin/websearch/parallel.js +5 -5
  531. package/dist/plugin/websearch/tavily.js +3 -3
  532. package/dist/plugin.js +170 -167
  533. package/dist/project/schema.js +7 -3
  534. package/dist/project/sql.js +5 -5
  535. package/dist/project.js +85 -81
  536. package/dist/provider.js +2 -2
  537. package/dist/pty/protocol.js +1 -1
  538. package/dist/pty/pty.bun.js +1 -1
  539. package/dist/pty/pty.node.js +1 -1
  540. package/dist/pty/pty.workerd.js +1 -1
  541. package/dist/pty/schema.js +2 -2
  542. package/dist/pty/ticket.js +74 -74
  543. package/dist/pty.js +88 -88
  544. package/dist/reference/instructions.js +81 -81
  545. package/dist/reference.js +79 -79
  546. package/dist/repository-cache.js +7 -7
  547. package/dist/repository.js +2 -2
  548. package/dist/ripgrep/binary.js +3 -3
  549. package/dist/ripgrep.js +93 -93
  550. package/dist/schema.js +2 -2
  551. package/dist/session/compaction.js +141 -141
  552. package/dist/session/context.js +316 -311
  553. package/dist/session/environment.js +3 -3
  554. package/dist/session/error.js +4 -4
  555. package/dist/session/event.js +2 -2
  556. package/dist/session/execution/restart.js +120 -119
  557. package/dist/session/execution.js +120 -119
  558. package/dist/session/generate-node.js +317 -312
  559. package/dist/session/generate.js +2 -2
  560. package/dist/session/history.js +81 -81
  561. package/dist/session/inbox.js +81 -81
  562. package/dist/session/info.js +91 -91
  563. package/dist/session/instruction-entry.js +77 -77
  564. package/dist/session/instruction-state.js +10 -10
  565. package/dist/session/instructions.js +100 -100
  566. package/dist/session/message-updater.js +4 -4
  567. package/dist/session/message.js +2 -2
  568. package/dist/session/model-request.js +137 -137
  569. package/dist/session/model-transport.js +5 -5
  570. package/dist/session/projector.js +94 -94
  571. package/dist/session/prompt-cache-diagnostics.js +2 -2
  572. package/dist/session/revert.js +89 -89
  573. package/dist/session/run-coordinator.js +2 -2
  574. package/dist/session/runner/index.js +88 -88
  575. package/dist/session/runner/llm.js +322 -317
  576. package/dist/session/runner/max-steps.js +2 -2
  577. package/dist/session/runner/model.js +87 -87
  578. package/dist/session/runner/publish-llm-event.js +4 -4
  579. package/dist/session/runner/retry.js +76 -76
  580. package/dist/session/runner/to-llm-message.js +2 -2
  581. package/dist/session/schema.js +2 -2
  582. package/dist/session/sql.js +6 -6
  583. package/dist/session/stats.js +75 -75
  584. package/dist/session/store.js +99 -99
  585. package/dist/session/system-prompt.js +2 -2
  586. package/dist/session/title.js +141 -139
  587. package/dist/session/to-session-error.js +115 -114
  588. package/dist/session/transfer.js +157 -157
  589. package/dist/session/usage.js +2 -2
  590. package/dist/session.js +153 -153
  591. package/dist/shell/parse.js +5 -5
  592. package/dist/shell/parser-wasm.bun.js +1 -1
  593. package/dist/shell/parser-wasm.node.js +1 -1
  594. package/dist/shell/parser-wasm.workerd.js +1 -1
  595. package/dist/shell/scan.js +1 -1
  596. package/dist/shell/select.js +7 -9
  597. package/dist/shell.js +98 -98
  598. package/dist/skill/discovery.js +3 -3
  599. package/dist/skill/instructions.js +106 -105
  600. package/dist/skill.js +105 -104
  601. package/dist/snapshot.js +84 -84
  602. package/dist/state.js +2 -2
  603. package/dist/tool/html-markdown.js +2 -2
  604. package/dist/tool/http-body.js +2 -2
  605. package/dist/tool/mcp.js +126 -126
  606. package/dist/tool/plugin/edit.js +114 -113
  607. package/dist/tool/plugin/file-diff.js +2 -2
  608. package/dist/tool/plugin/glob.js +116 -115
  609. package/dist/tool/plugin/grep.js +116 -115
  610. package/dist/tool/plugin/patch.js +114 -113
  611. package/dist/tool/plugin/question.js +106 -105
  612. package/dist/tool/plugin/read.js +119 -118
  613. package/dist/tool/plugin/shell.js +185 -185
  614. package/dist/tool/plugin/skill.js +106 -105
  615. package/dist/tool/plugin/subagent.js +182 -182
  616. package/dist/tool/plugin/webfetch.js +107 -106
  617. package/dist/tool/plugin/websearch.js +109 -108
  618. package/dist/tool/plugin/write.js +114 -113
  619. package/dist/tool/read-filesystem.js +97 -97
  620. package/dist/tool/runtime.js +2 -2
  621. package/dist/tool-output.js +5 -5
  622. package/dist/tool.js +119 -119
  623. package/dist/types/git.d.ts +1 -0
  624. package/dist/types/location-service-map.d.ts +2 -2
  625. package/dist/types/location-services.d.ts +1 -1
  626. package/dist/types/model.d.ts +3 -0
  627. package/dist/types/permission.d.ts +2 -6
  628. package/dist/types/persistent-pty/binary.bun.d.ts +1 -0
  629. package/dist/types/persistent-pty/binary.node.d.ts +1 -0
  630. package/dist/types/persistent-pty/binary.workerd.d.ts +1 -0
  631. package/dist/types/persistent-pty/daemon.d.ts +642 -0
  632. package/dist/types/persistent-pty/index.d.ts +90 -0
  633. package/dist/types/persistent-pty/pty-binding.d.ts +6 -0
  634. package/dist/types/persistent-pty.d.ts +1 -0
  635. package/dist/types/plugin/hooks.d.ts +3 -0
  636. package/dist/types/plugin/host.d.ts +66 -1
  637. package/dist/types/plugin/internal.d.ts +3 -3
  638. package/dist/types/plugin/runtime.d.ts +1 -1
  639. package/dist/types/plugin/supervisor.d.ts +1 -1
  640. package/dist/types/plugin/vcs/git.d.ts +4 -0
  641. package/dist/types/plugin/vcs/hg.d.ts +5 -0
  642. package/dist/types/project/schema.d.ts +197 -0
  643. package/dist/types/project.d.ts +29 -0
  644. package/dist/types/session/title.d.ts +3 -2
  645. package/dist/types/shell/select.d.ts +6 -7
  646. package/dist/types/shell.d.ts +4 -2
  647. package/dist/types/tool/plugin/shell.d.ts +2 -1
  648. package/dist/types/v1/config/migrate.d.ts +1 -0
  649. package/dist/types/vcs.d.ts +12 -3
  650. package/dist/types/worktree/git.d.ts +1 -0
  651. package/dist/types/worktree.d.ts +4 -1
  652. package/dist/util/array.js +1 -1
  653. package/dist/util/error.js +2 -2
  654. package/dist/util/identifier.js +1 -1
  655. package/dist/util/iife.js +2 -2
  656. package/dist/util/lazy.js +2 -2
  657. package/dist/util/process-lock-ffi.bun.js +1 -1
  658. package/dist/util/process-lock-ffi.node.js +1 -1
  659. package/dist/util/process-lock-ffi.workerd.js +1 -1
  660. package/dist/util/process-lock.js +1 -1
  661. package/dist/util/slug.js +2 -2
  662. package/dist/util/token.js +2 -2
  663. package/dist/util/which.js +2 -2
  664. package/dist/util/wildcard.js +2 -2
  665. package/dist/v1/config/agent.js +4 -4
  666. package/dist/v1/config/attachment.js +3 -3
  667. package/dist/v1/config/command.js +2 -2
  668. package/dist/v1/config/config.js +15 -15
  669. package/dist/v1/config/error.js +3 -3
  670. package/dist/v1/config/formatter.js +2 -2
  671. package/dist/v1/config/layout.js +2 -2
  672. package/dist/v1/config/lsp.js +2 -2
  673. package/dist/v1/config/mcp.js +3 -3
  674. package/dist/v1/config/migrate.js +19 -19
  675. package/dist/v1/config/permission.js +2 -2
  676. package/dist/v1/config/plugin.js +2 -2
  677. package/dist/v1/config/provider-options.js +2 -2
  678. package/dist/v1/config/provider.js +3 -3
  679. package/dist/v1/config/server.js +3 -3
  680. package/dist/v1/config/skills.js +2 -2
  681. package/dist/v1/permission.js +1 -1
  682. package/dist/vcs/patch.js +2 -2
  683. package/dist/vcs.js +88 -87
  684. package/dist/websearch.js +77 -77
  685. package/dist/wellknown/plugin.js +77 -77
  686. package/dist/wellknown.js +76 -76
  687. package/dist/workspace/driver.js +2 -2
  688. package/dist/workspace/sql.js +2 -2
  689. package/dist/workspace.js +73 -73
  690. package/dist/worktree/directory.js +3 -3
  691. package/dist/worktree/git.js +7 -7
  692. package/dist/worktree/sql.js +6 -6
  693. package/dist/worktree.js +86 -86
  694. package/package.json +13 -7
  695. package/dist/chunks/tool-cp463fe5.js +0 -86
  696. package/dist/types/vcs/git.d.ts +0 -12
  697. package/dist/types/vcs/hg.d.ts +0 -13
  698. package/dist/vcs/git.js +0 -10
  699. package/dist/vcs/hg.js +0 -10
  700. /package/dist/chunks/{tool-0cgt0xh2.js → state-0cgt0xh2.js} +0 -0
  701. /package/dist/chunks/{tool-0f48qthw.js → state-0f48qthw.js} +0 -0
  702. /package/dist/chunks/{tool-0zz82cjq.js → state-0zz82cjq.js} +0 -0
  703. /package/dist/chunks/{tool-1fb7bmpf.js → state-1fb7bmpf.js} +0 -0
  704. /package/dist/chunks/{tool-1wcz8fvj.js → state-1wcz8fvj.js} +0 -0
  705. /package/dist/chunks/{tool-2qdx6zz3.js → state-2qdx6zz3.js} +0 -0
  706. /package/dist/chunks/{tool-39ktntah.js → state-39ktntah.js} +0 -0
  707. /package/dist/chunks/{tool-3g3rpp2x.js → state-3g3rpp2x.js} +0 -0
  708. /package/dist/chunks/{tool-3q6gbwmd.js → state-3q6gbwmd.js} +0 -0
  709. /package/dist/chunks/{tool-3w3ybtfd.js → state-3w3ybtfd.js} +0 -0
  710. /package/dist/chunks/{tool-47ty4mvs.js → state-47ty4mvs.js} +0 -0
  711. /package/dist/chunks/{tool-4b2tz2m9.js → state-4b2tz2m9.js} +0 -0
  712. /package/dist/chunks/{tool-4zg0gww9.js → state-4zg0gww9.js} +0 -0
  713. /package/dist/chunks/{tool-5a5ch9ts.js → state-5a5ch9ts.js} +0 -0
  714. /package/dist/chunks/{tool-5va1yh78.js → state-5va1yh78.js} +0 -0
  715. /package/dist/chunks/{tool-61ek4hj9.js → state-61ek4hj9.js} +0 -0
  716. /package/dist/chunks/{tool-69qrqpw0.js → state-69qrqpw0.js} +0 -0
  717. /package/dist/chunks/{tool-6yt963b8.js → state-6yt963b8.js} +0 -0
  718. /package/dist/chunks/{tool-6zqxzw0a.js → state-6zqxzw0a.js} +0 -0
  719. /package/dist/chunks/{tool-7n9qwqk4.js → state-7n9qwqk4.js} +0 -0
  720. /package/dist/chunks/{tool-8nn8kqcn.js → state-8nn8kqcn.js} +0 -0
  721. /package/dist/chunks/{tool-8rpfd2h6.js → state-8rpfd2h6.js} +0 -0
  722. /package/dist/chunks/{tool-8sj3ajy5.js → state-8sj3ajy5.js} +0 -0
  723. /package/dist/chunks/{tool-8w9tzfz1.js → state-8w9tzfz1.js} +0 -0
  724. /package/dist/chunks/{tool-906y0b6d.js → state-906y0b6d.js} +0 -0
  725. /package/dist/chunks/{tool-9dct5xhx.js → state-9dct5xhx.js} +0 -0
  726. /package/dist/chunks/{tool-9sdtsapf.js → state-9sdtsapf.js} +0 -0
  727. /package/dist/chunks/{tool-a02svayp.js → state-a02svayp.js} +0 -0
  728. /package/dist/chunks/{tool-a83yvq99.js → state-a83yvq99.js} +0 -0
  729. /package/dist/chunks/{tool-ayevdmef.js → state-ayevdmef.js} +0 -0
  730. /package/dist/chunks/{tool-b02txbh8.js → state-b02txbh8.js} +0 -0
  731. /package/dist/chunks/{tool-bbqs2y60.js → state-bbqs2y60.js} +0 -0
  732. /package/dist/chunks/{tool-bjwj8hwv.js → state-bjwj8hwv.js} +0 -0
  733. /package/dist/chunks/{tool-brsh5f65.js → state-brsh5f65.js} +0 -0
  734. /package/dist/chunks/{tool-bxdhjb3y.js → state-bxdhjb3y.js} +0 -0
  735. /package/dist/chunks/{tool-c77ad0vh.js → state-c77ad0vh.js} +0 -0
  736. /package/dist/chunks/{tool-ck5pgha0.js → state-ck5pgha0.js} +0 -0
  737. /package/dist/chunks/{tool-cm67rqy2.js → state-cm67rqy2.js} +0 -0
  738. /package/dist/chunks/{tool-df3v2q6j.js → state-df3v2q6j.js} +0 -0
  739. /package/dist/chunks/{tool-dhcq6c44.js → state-dhcq6c44.js} +0 -0
  740. /package/dist/chunks/{tool-dht5baf0.js → state-dht5baf0.js} +0 -0
  741. /package/dist/chunks/{tool-dkmkay92.js → state-dkmkay92.js} +0 -0
  742. /package/dist/chunks/{tool-ehj9csmv.js → state-ehj9csmv.js} +0 -0
  743. /package/dist/chunks/{tool-em6xpscd.js → state-em6xpscd.js} +0 -0
  744. /package/dist/chunks/{tool-emmqknsm.js → state-emmqknsm.js} +0 -0
  745. /package/dist/chunks/{tool-ezs3tagn.js → state-ezs3tagn.js} +0 -0
  746. /package/dist/chunks/{tool-f14r7hfz.js → state-f14r7hfz.js} +0 -0
  747. /package/dist/chunks/{tool-f4cp4g4a.js → state-f4cp4g4a.js} +0 -0
  748. /package/dist/chunks/{tool-f84sxdqn.js → state-f84sxdqn.js} +0 -0
  749. /package/dist/chunks/{tool-faypg4r1.js → state-faypg4r1.js} +0 -0
  750. /package/dist/chunks/{tool-fgbfdq62.js → state-fgbfdq62.js} +0 -0
  751. /package/dist/chunks/{tool-gd5xeqc2.js → state-gd5xeqc2.js} +0 -0
  752. /package/dist/chunks/{tool-ghm4673n.js → state-ghm4673n.js} +0 -0
  753. /package/dist/chunks/{tool-ghwjy7my.js → state-ghwjy7my.js} +0 -0
  754. /package/dist/chunks/{tool-gy500k2r.js → state-gy500k2r.js} +0 -0
  755. /package/dist/chunks/{tool-hzeg9cfr.js → state-hzeg9cfr.js} +0 -0
  756. /package/dist/chunks/{tool-j07kk359.js → state-j07kk359.js} +0 -0
  757. /package/dist/chunks/{tool-jf35ek5b.js → state-jf35ek5b.js} +0 -0
  758. /package/dist/chunks/{tool-jve7t217.js → state-jve7t217.js} +0 -0
  759. /package/dist/chunks/{tool-k3e42drn.js → state-k3e42drn.js} +0 -0
  760. /package/dist/chunks/{tool-k8b45nas.js → state-k8b45nas.js} +0 -0
  761. /package/dist/chunks/{tool-kcacmy5c.js → state-kcacmy5c.js} +0 -0
  762. /package/dist/chunks/{tool-kpdbz7gn.js → state-kpdbz7gn.js} +0 -0
  763. /package/dist/chunks/{tool-kxy11nzk.js → state-kxy11nzk.js} +0 -0
  764. /package/dist/chunks/{tool-kyyqvx4s.js → state-kyyqvx4s.js} +0 -0
  765. /package/dist/chunks/{tool-m8cbvarh.js → state-m8cbvarh.js} +0 -0
  766. /package/dist/chunks/{tool-ma60vzgv.js → state-ma60vzgv.js} +0 -0
  767. /package/dist/chunks/{tool-n3m50c2t.js → state-n3m50c2t.js} +0 -0
  768. /package/dist/chunks/{tool-nkm1m8dz.js → state-nkm1m8dz.js} +0 -0
  769. /package/dist/chunks/{tool-nsc0c3zb.js → state-nsc0c3zb.js} +0 -0
  770. /package/dist/chunks/{tool-qaarhjrp.js → state-qaarhjrp.js} +0 -0
  771. /package/dist/chunks/{tool-qc167nrn.js → state-qc167nrn.js} +0 -0
  772. /package/dist/chunks/{tool-qp95y4jb.js → state-qp95y4jb.js} +0 -0
  773. /package/dist/chunks/{tool-r8f4w671.js → state-r8f4w671.js} +0 -0
  774. /package/dist/chunks/{tool-rdfev9jy.js → state-rdfev9jy.js} +0 -0
  775. /package/dist/chunks/{tool-rvfvac9x.js → state-rvfvac9x.js} +0 -0
  776. /package/dist/chunks/{tool-s7whb9gt.js → state-s7whb9gt.js} +0 -0
  777. /package/dist/chunks/{tool-se76j685.js → state-se76j685.js} +0 -0
  778. /package/dist/chunks/{tool-sem2g21k.js → state-sem2g21k.js} +0 -0
  779. /package/dist/chunks/{tool-tmb1f636.js → state-tmb1f636.js} +0 -0
  780. /package/dist/chunks/{tool-ttxf0gsy.js → state-ttxf0gsy.js} +0 -0
  781. /package/dist/chunks/{tool-tvmhrvfj.js → state-tvmhrvfj.js} +0 -0
  782. /package/dist/chunks/{tool-v2adqbbe.js → state-v2adqbbe.js} +0 -0
  783. /package/dist/chunks/{tool-vkvb1sb3.js → state-vkvb1sb3.js} +0 -0
  784. /package/dist/chunks/{tool-wj4sxzqa.js → state-wj4sxzqa.js} +0 -0
  785. /package/dist/chunks/{tool-wwntjmk1.js → state-wwntjmk1.js} +0 -0
  786. /package/dist/chunks/{tool-wyqjaaa5.js → state-wyqjaaa5.js} +0 -0
  787. /package/dist/chunks/{tool-x4q807cx.js → state-x4q807cx.js} +0 -0
  788. /package/dist/chunks/{tool-xt0068v8.js → state-xt0068v8.js} +0 -0
  789. /package/dist/chunks/{tool-yrqrg4vp.js → state-yrqrg4vp.js} +0 -0
  790. /package/dist/chunks/{tool-z47nswr2.js → state-z47nswr2.js} +0 -0
  791. /package/dist/chunks/{tool-zsf8rs93.js → state-zsf8rs93.js} +0 -0
@@ -1,28 +1,28 @@
1
1
  import {
2
2
  exports_schema
3
- } from "./tool-8v47shgf.js";
3
+ } from "./state-wptv627x.js";
4
4
  import {
5
5
  WorktreeTable
6
- } from "./tool-mh28new4.js";
6
+ } from "./state-mh28new4.js";
7
7
  import {
8
8
  ProjectTable,
9
9
  upsertProject
10
- } from "./tool-88jbfw8z.js";
10
+ } from "./state-88jbfw8z.js";
11
11
  import {
12
12
  exports_git
13
- } from "./tool-b7hsw5bk.js";
13
+ } from "./state-se1aqaya.js";
14
14
  import {
15
15
  AbsolutePath
16
- } from "./tool-j07kk359.js";
16
+ } from "./state-j07kk359.js";
17
17
  import {
18
18
  exports_bus
19
- } from "./tool-axn3swgr.js";
19
+ } from "./state-4ce5qhvd.js";
20
20
  import {
21
21
  exports_database
22
- } from "./tool-ysxk876j.js";
22
+ } from "./state-x07gtesk.js";
23
23
  import {
24
24
  __export
25
- } from "./tool-rvfvac9x.js";
25
+ } from "./state-rvfvac9x.js";
26
26
 
27
27
  // src/project.ts
28
28
  var exports_project = {};
@@ -30,13 +30,15 @@ __export(exports_project, {
30
30
  root: () => root,
31
31
  node: () => node,
32
32
  Vcs: () => Vcs,
33
+ UpdateInput: () => UpdateInput,
33
34
  Service: () => Service,
34
35
  Project: () => exports_project,
36
+ NotFoundError: () => NotFoundError,
35
37
  Info: () => Info,
36
38
  ID: () => ID,
37
39
  Current: () => Current
38
40
  });
39
- import { Context, Effect, Layer } from "effect";
41
+ import { Context, Effect, Layer, Schema } from "effect";
40
42
  import { ChildProcess } from "effect/unstable/process";
41
43
  import { and, asc, desc, eq } from "drizzle-orm";
42
44
  import path from "path";
@@ -49,6 +51,12 @@ var ID = exports_schema.ID;
49
51
  var Vcs = exports_schema.Vcs;
50
52
  var Current = exports_schema.Current;
51
53
  var Info = exports_schema.Info;
54
+ var UpdateInput = exports_schema.UpdateInput;
55
+
56
+ class NotFoundError extends Schema.TaggedError()("Project.NotFoundError", {
57
+ projectID: ID
58
+ }) {
59
+ }
52
60
  var root = Effect.fn("Project.root")(function* (fs, input) {
53
61
  return yield* fs.up({ targets: [".git", ".hg"], start: input, mode: "first" }).pipe(Effect.map((matches) => matches[0] ? AbsolutePath.make(path.dirname(matches[0])) : undefined), Effect.orElseSucceed(() => {
54
62
  return;
@@ -118,6 +126,20 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
118
126
  const rows = yield* db.select().from(ProjectTable).orderBy(desc(ProjectTable.time_updated), asc(ProjectTable.id)).all().pipe(Effect.orDie);
119
127
  return rows.map(fromRow);
120
128
  });
129
+ const update = Effect.fn("Project.update")(function* (input) {
130
+ const row = yield* db.update(ProjectTable).set({
131
+ name: input.name === undefined ? undefined : input.name || null,
132
+ icon_url_override: input.icon?.override === undefined ? undefined : input.icon.override || null,
133
+ icon_color: input.icon?.color === undefined ? undefined : input.icon.color || null,
134
+ commands: input.commands?.start === undefined ? undefined : input.commands.start ? { start: input.commands.start } : null,
135
+ time_updated: Date.now()
136
+ }).where(eq(ProjectTable.id, input.projectID)).returning().get().pipe(Effect.orDie);
137
+ if (!row)
138
+ return yield* new NotFoundError({ projectID: input.projectID });
139
+ const project = fromRow(row);
140
+ yield* bus.publish(exports_schema.Event.Updated, project);
141
+ return project;
142
+ });
121
143
  const cached = Effect.fnUntraced(function* (dir) {
122
144
  return yield* fs.readFileString(path.join(dir, "opencode")).pipe(Effect.map((value) => value.trim()), Effect.map((value) => value ? ID.make(value) : undefined), Effect.orElseSucceed(() => {
123
145
  return;
@@ -211,7 +233,7 @@ var layer = Layer.effect(Service, Effect.gen(function* () {
211
233
  const directory = AbsolutePath.make(path.parse(input).root);
212
234
  return yield* persist({ id: ID.global, directory, canonical: directory, vcs: undefined });
213
235
  });
214
- return Service.of({ list, resolve });
236
+ return Service.of({ list, update, resolve });
215
237
  }));
216
238
  var node = makeGlobalNode({
217
239
  service: Service,
@@ -219,4 +241,4 @@ var node = makeGlobalNode({
219
241
  deps: [exports_bus.node, exports_database.node, FSUtil.node, exports_git.node, AppProcess.node]
220
242
  });
221
243
 
222
- export { ID, Vcs, Current, Info, root, Service, node, exports_project };
244
+ export { ID, Vcs, Current, Info, UpdateInput, NotFoundError, root, Service, node, exports_project };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  exports_bus
3
- } from "./tool-axn3swgr.js";
3
+ } from "./state-4ce5qhvd.js";
4
4
  import {
5
5
  __export
6
- } from "./tool-rvfvac9x.js";
6
+ } from "./state-rvfvac9x.js";
7
7
 
8
8
  // src/plugin/sdk.ts
9
9
  var exports_sdk = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  exports_provider
3
- } from "./tool-djkt4gex.js";
3
+ } from "./state-djkt4gex.js";
4
4
  import {
5
5
  __require
6
- } from "./tool-rvfvac9x.js";
6
+ } from "./state-rvfvac9x.js";
7
7
 
8
8
  // src/plugin/provider/anthropic.ts
9
9
  import { Effect } from "effect";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  exports_environment1 as exports_environment
3
- } from "./tool-r33pggsn.js";
3
+ } from "./state-te0cypm2.js";
4
4
  import {
5
5
  __export
6
- } from "./tool-rvfvac9x.js";
6
+ } from "./state-rvfvac9x.js";
7
7
 
8
8
  // src/mcp/stdio.ts
9
9
  var exports_stdio = {};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./tool-rvfvac9x.js";
3
+ } from "./state-rvfvac9x.js";
4
4
 
5
5
  // src/session/runner/index.ts
6
6
  var exports_runner = {};
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  InstructionEntryTable
3
- } from "./tool-ygy0xbqa.js";
3
+ } from "./state-ygy0xbqa.js";
4
4
  import {
5
5
  exports_instructions
6
- } from "./tool-ec8vrfw5.js";
6
+ } from "./state-ec8vrfw5.js";
7
7
  import {
8
8
  exports_database
9
- } from "./tool-ysxk876j.js";
9
+ } from "./state-x07gtesk.js";
10
10
  import {
11
11
  __export
12
- } from "./tool-rvfvac9x.js";
12
+ } from "./state-rvfvac9x.js";
13
13
 
14
14
  // src/session/instruction-entry.ts
15
15
  var exports_instruction_entry = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  InvalidError
3
- } from "./tool-nr76rjj3.js";
3
+ } from "./state-nr76rjj3.js";
4
4
  import {
5
5
  __export
6
- } from "./tool-rvfvac9x.js";
6
+ } from "./state-rvfvac9x.js";
7
7
 
8
8
  // src/config/variable.ts
9
9
  var exports_variable = {};
@@ -1,51 +1,51 @@
1
- import {
2
- exports_message_updater
3
- } from "./tool-1b390eyt.js";
4
- import {
5
- exports_inbox
6
- } from "./tool-zyv51q6q.js";
7
1
  import {
8
2
  exports_instruction_entry
9
- } from "./tool-65t8x3mp.js";
3
+ } from "./state-d19eexxk.js";
10
4
  import {
11
- Slug
12
- } from "./tool-df3v2q6j.js";
5
+ exports_inbox
6
+ } from "./state-j5q8scqt.js";
13
7
  import {
14
- SessionMessage
15
- } from "./tool-8rpfd2h6.js";
8
+ exports_message_updater
9
+ } from "./state-1b390eyt.js";
16
10
  import {
17
11
  exports_instruction_state
18
- } from "./tool-f11jbhcb.js";
12
+ } from "./state-f11jbhcb.js";
19
13
  import {
20
14
  SessionInboxTable,
21
15
  SessionMessageTable,
22
16
  SessionTable
23
- } from "./tool-ygy0xbqa.js";
17
+ } from "./state-ygy0xbqa.js";
18
+ import {
19
+ SessionMessage
20
+ } from "./state-8rpfd2h6.js";
24
21
  import {
25
22
  exports_agent
26
- } from "./tool-syxy6ytt.js";
23
+ } from "./state-gwpydf4a.js";
27
24
  import {
28
25
  SessionEvent
29
- } from "./tool-a83yvq99.js";
26
+ } from "./state-a83yvq99.js";
30
27
  import {
31
- exports_workspace
32
- } from "./tool-yp6a9x5t.js";
28
+ Slug
29
+ } from "./state-df3v2q6j.js";
33
30
  import {
34
- exports_model
35
- } from "./tool-1a3a2s70.js";
31
+ exports_workspace
32
+ } from "./state-cb46h7pc.js";
36
33
  import {
37
34
  AbsolutePath,
38
35
  RelativePath
39
- } from "./tool-j07kk359.js";
36
+ } from "./state-j07kk359.js";
37
+ import {
38
+ exports_model
39
+ } from "./state-1a3a2s70.js";
40
40
  import {
41
41
  exports_bus
42
- } from "./tool-axn3swgr.js";
42
+ } from "./state-4ce5qhvd.js";
43
43
  import {
44
44
  exports_database
45
- } from "./tool-ysxk876j.js";
45
+ } from "./state-x07gtesk.js";
46
46
  import {
47
47
  __export
48
- } from "./tool-rvfvac9x.js";
48
+ } from "./state-rvfvac9x.js";
49
49
 
50
50
  // src/session/projector.ts
51
51
  var exports_projector = {};
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  exports_model
3
- } from "./tool-1t908443.js";
3
+ } from "./state-qe0aav6y.js";
4
4
  import {
5
5
  exports_permission
6
- } from "./tool-dd33dt68.js";
6
+ } from "./state-rmr740y4.js";
7
7
  import {
8
8
  AgentNotFoundError,
9
9
  StepFailedError,
10
10
  UserInterruptedError
11
- } from "./tool-fb7nfzf2.js";
11
+ } from "./state-fb7nfzf2.js";
12
12
  import {
13
13
  exports_integration
14
- } from "./tool-80d8k4wg.js";
14
+ } from "./state-ayfpp7hf.js";
15
15
 
16
16
  // src/session/to-session-error.ts
17
17
  import { AIError, ToolFailure } from "@opencode-ai/ai";
@@ -2,7 +2,7 @@ import {
2
2
  SQLiteEffectPreparedQuery,
3
3
  SQLiteEffectSession,
4
4
  SQLiteEffectTransaction
5
- } from "./tool-89sr4hh7.js";
5
+ } from "./state-78y9e82n.js";
6
6
 
7
7
  // src/database/drizzle/effect-sqlite/session.ts
8
8
  import * as Context from "effect/Context";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./tool-rvfvac9x.js";
3
+ } from "./state-rvfvac9x.js";
4
4
 
5
5
  // src/mime.ts
6
6
  var exports_mime = {};
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __export,
3
3
  __require
4
- } from "./tool-rvfvac9x.js";
4
+ } from "./state-rvfvac9x.js";
5
5
 
6
6
  // src/provider.ts
7
7
  var exports_provider = {};
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  exports_config
3
- } from "./tool-bfgpcntw.js";
3
+ } from "./state-effdwybp.js";
4
4
  import {
5
5
  exports_model
6
- } from "./tool-1a3a2s70.js";
6
+ } from "./state-1a3a2s70.js";
7
7
  import {
8
8
  exports_provider
9
- } from "./tool-djkt4gex.js";
9
+ } from "./state-djkt4gex.js";
10
10
 
11
11
  // src/plugin/provider/ollama.ts
12
12
  import { define } from "@opencode-ai/plugin/effect/plugin";
@@ -1,6 +1,8 @@
1
1
  // src/tool/runtime.ts
2
2
  import { Tool } from "@opencode-ai/schema/tool";
3
- import { Cache, Effect, JsonSchema, Schema, SchemaRepresentation } from "effect";
3
+ import { Cache, Effect, JsonSchema, Schema, SchemaIssue, SchemaRepresentation } from "effect";
4
+ import { $ZodType, toJSONSchema } from "zod/v4/core";
5
+ var formatEffectIssues = SchemaIssue.makeFormatterStandardSchemaV1();
4
6
  var jsonSchemas = Effect.runSync(Cache.make({
5
7
  capacity: 100,
6
8
  lookup: (schema) => Effect.try({
@@ -19,7 +21,7 @@ var definition = (tool) => ({
19
21
  ...tool.output === undefined ? {} : { outputSchema: outputJsonSchema(tool.output) }
20
22
  });
21
23
  var execute = (tool, input, context) => Effect.gen(function* () {
22
- const decoded = yield* decodeInput(tool.input, input);
24
+ const decoded = yield* decodeInput(tool, input);
23
25
  const result = yield* tool.execute(decoded, context).pipe(Effect.mapError((error) => error instanceof Tool.Error ? error : new Tool.Error({
24
26
  message: error instanceof globalThis.Error ? error.message : String(error)
25
27
  })));
@@ -41,12 +43,45 @@ var execute = (tool, input, context) => Effect.gen(function* () {
41
43
  ...result.metadata === undefined ? {} : { metadata: result.metadata }
42
44
  };
43
45
  });
44
- var decodeInput = (schema, value) => {
45
- if (Schema.isSchema(schema))
46
- return Schema.decodeUnknownEffect(schema)(value).pipe(Effect.mapError((error) => new Tool.Error({ message: `Invalid tool input: ${error.message}` })));
46
+ var decodeInput = (tool, value) => Effect.gen(function* () {
47
+ const result = yield* validateInput(tool.input, value);
48
+ if (result.issues)
49
+ return yield* new Tool.Error({ message: formatInputIssues(effectiveName(tool), result.issues, value) });
50
+ return result.value;
51
+ });
52
+ var validateInput = (schema, value) => {
47
53
  if (isStandardSchema(schema))
48
- return validateStandard(schema, value, "Invalid tool input");
49
- return Cache.get(jsonSchemas, schema).pipe(Effect.flatMap((schema2) => schema2 === undefined ? Effect.succeed(value) : Schema.decodeUnknownEffect(schema2)(value)), Effect.mapError((error) => new Tool.Error({ message: `Invalid tool input: ${error.message}` })));
54
+ return validateStandard(schema, value);
55
+ return Effect.gen(function* () {
56
+ const codec = Schema.isSchema(schema) ? schema : yield* Cache.get(jsonSchemas, schema);
57
+ if (codec === undefined)
58
+ return { value };
59
+ return yield* Schema.decodeUnknownEffect(codec)(value, { errors: "all" }).pipe(Effect.match({
60
+ onFailure: (error) => formatEffectIssues(error.issue),
61
+ onSuccess: (value2) => ({ value: value2 })
62
+ }));
63
+ });
64
+ };
65
+ var formatInputIssues = (tool, issues, value) => {
66
+ const details = issues.slice(0, 5).map((issue) => {
67
+ const path = issue.path?.reduce((path2, segment) => {
68
+ const key = typeof segment === "object" ? segment.key : segment;
69
+ if (typeof key === "number")
70
+ return `${path2}[${key}]`;
71
+ return path2 === "" ? String(key) : `${path2}.${String(key)}`;
72
+ }, "") || "root";
73
+ return `- ${path}: ${issue.message}`;
74
+ });
75
+ if (issues.length > 5)
76
+ details.push(`- ...and ${issues.length - 5} more ${issues.length === 6 ? "issue" : "issues"}`);
77
+ return `Invalid arguments for tool "${tool}":
78
+ ${details.join(`
79
+ `)}
80
+
81
+ Arguments provided:
82
+ ${JSON.stringify(value, null, 2)}
83
+
84
+ Update the arguments and call the tool again.`;
50
85
  };
51
86
  var jsonSchema = (schema) => {
52
87
  const draft = typeof schema.$schema === "string" && schema.$schema.includes("draft-07") || "definitions" in schema ? JsonSchema.fromSchemaDraft07(schema) : JsonSchema.fromSchemaDraft2020_12(schema);
@@ -56,35 +91,39 @@ var encodeOutput = (schema, value) => {
56
91
  if (Schema.isSchema(schema))
57
92
  return Schema.encodeEffect(schema)(value).pipe(Effect.mapError((error) => new Tool.Error({ message: `Tool returned an invalid value for its output schema: ${error.message}` })));
58
93
  if (isStandardSchema(schema))
59
- return validateStandard(schema, value, "Tool returned an invalid value for its output schema");
94
+ return validateStandard(schema, value).pipe(Effect.flatMap((result) => result.issues ? new Tool.Error({
95
+ message: `Tool returned an invalid value for its output schema: ${result.issues.map((issue) => issue.message).join(", ")}`
96
+ }) : Effect.succeed(result.value)));
60
97
  return Schema.decodeUnknownEffect(Schema.Json)(value).pipe(Effect.mapError((error) => new Tool.Error({ message: `Tool returned a non-JSON value for its output schema: ${error.message}` })));
61
98
  };
62
99
  var isStandardSchema = (schema) => typeof schema === "object" && schema !== null && ("~standard" in schema);
63
- var validateStandard = (schema, value, prefix) => Effect.gen(function* () {
64
- const pending = yield* Effect.try({
65
- try: () => schema["~standard"].validate(value),
66
- catch: (error) => standardFailure(prefix, error)
67
- });
68
- const result = pending instanceof Promise ? yield* Effect.tryPromise({ try: () => pending, catch: (error) => standardFailure(prefix, error) }) : pending;
69
- if (result.issues)
70
- return yield* new Tool.Error({
71
- message: `${prefix}: ${result.issues.map((issue) => issue.message).join(", ")}`
72
- });
73
- return result.value;
74
- });
75
- var standardFailure = (prefix, error) => new Tool.Error({ message: `${prefix}: ${error instanceof Error ? error.message : String(error)}` });
100
+ var isStandardJSONSchema = (schema) => ("jsonSchema" in schema["~standard"]);
101
+ var validateStandard = (schema, value) => Effect.gen(function* () {
102
+ const result = yield* Effect.try({ try: () => schema["~standard"].validate(value), catch: (error) => error });
103
+ return result instanceof Promise ? yield* Effect.tryPromise({ try: () => result, catch: (error) => error }) : result;
104
+ }).pipe(Effect.match({
105
+ onFailure: (error) => ({ issues: [{ message: error instanceof Error ? error.message : String(error) }] }),
106
+ onSuccess: (result) => result
107
+ }));
76
108
  var inputJsonSchema = (schema) => {
77
109
  if (schema === undefined || schema === null)
78
110
  return {};
79
111
  if (isStandardSchema(schema))
80
- return schema["~standard"].jsonSchema.input({ target: "draft-2020-12" });
112
+ return standardJsonSchema(schema, "input");
81
113
  return Schema.isSchema(schema) ? toJsonSchema(schema) : schema;
82
114
  };
83
115
  var outputJsonSchema = (schema) => {
84
116
  if (isStandardSchema(schema))
85
- return schema["~standard"].jsonSchema.output({ target: "draft-2020-12" });
117
+ return standardJsonSchema(schema, "output");
86
118
  return Schema.isSchema(schema) ? toJsonSchema(schema) : schema;
87
119
  };
120
+ var standardJsonSchema = (schema, io) => {
121
+ if (isStandardJSONSchema(schema))
122
+ return schema["~standard"].jsonSchema[io]({ target: "draft-2020-12" });
123
+ if (schema instanceof $ZodType)
124
+ return toJSONSchema(schema, { target: "draft-2020-12", io });
125
+ throw new Error(`Schema vendor "${schema["~standard"].vendor}" does not support JSON Schema conversion`);
126
+ };
88
127
  var toJsonSchema = (schema) => {
89
128
  const document = Schema.toJsonSchemaDocument(schema);
90
129
  const normalized = flattenAllOf(Object.keys(document.definitions).length === 0 ? document.schema : { ...document.schema, $defs: document.definitions });
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  exports_usage
3
- } from "./tool-sw84ckhj.js";
3
+ } from "./state-sw84ckhj.js";
4
4
  import {
5
5
  SessionEvent
6
- } from "./tool-a83yvq99.js";
6
+ } from "./state-a83yvq99.js";
7
7
 
8
8
  // src/session/runner/publish-llm-event.ts
9
9
  import { Clock, Effect } from "effect";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  iife
3
- } from "./tool-ehj9csmv.js";
3
+ } from "./state-ehj9csmv.js";
4
4
  import {
5
5
  configuredSettings
6
- } from "./tool-b9x8kpvk.js";
6
+ } from "./state-wyhq3myq.js";
7
7
  import {
8
8
  exports_app
9
- } from "./tool-50jxp3hw.js";
9
+ } from "./state-50jxp3hw.js";
10
10
  import {
11
11
  exports_provider
12
- } from "./tool-djkt4gex.js";
12
+ } from "./state-djkt4gex.js";
13
13
  import {
14
14
  __require
15
- } from "./tool-rvfvac9x.js";
15
+ } from "./state-rvfvac9x.js";
16
16
 
17
17
  // src/plugin/provider/cloudflare-workers-ai.ts
18
18
  import os from "os";
@@ -1,31 +1,31 @@
1
1
  import {
2
2
  exports_environment as exports_environment2
3
- } from "./tool-6ky7rqk7.js";
3
+ } from "./state-6ky7rqk7.js";
4
4
  import {
5
5
  exports_select
6
- } from "./tool-cke3skfe.js";
7
- import {
8
- exports_file_retention
9
- } from "./tool-hp6rpdnc.js";
6
+ } from "./state-p1xvm7za.js";
10
7
  import {
11
8
  exports_hooks
12
- } from "./tool-v2wshkax.js";
9
+ } from "./state-v2wshkax.js";
13
10
  import {
14
- SessionSchema
15
- } from "./tool-bjwj8hwv.js";
11
+ exports_file_retention
12
+ } from "./state-hp6rpdnc.js";
16
13
  import {
17
14
  exports_environment1 as exports_environment
18
- } from "./tool-r33pggsn.js";
15
+ } from "./state-te0cypm2.js";
19
16
  import {
20
17
  exports_location
21
- } from "./tool-dtmn9n0n.js";
18
+ } from "./state-efvmw2xw.js";
19
+ import {
20
+ SessionSchema
21
+ } from "./state-bjwj8hwv.js";
22
22
  import {
23
23
  exports_bus
24
- } from "./tool-axn3swgr.js";
24
+ } from "./state-4ce5qhvd.js";
25
25
  import {
26
26
  __export,
27
27
  __require
28
- } from "./tool-rvfvac9x.js";
28
+ } from "./state-rvfvac9x.js";
29
29
 
30
30
  // src/shell.ts
31
31
  var exports_shell = {};
@@ -136,7 +136,6 @@ var layer = () => Layer.effect(Service, Effect.gen(function* () {
136
136
  yield* session.timeout(duration);
137
137
  return session.info;
138
138
  });
139
- const name = () => shell.preferred().pipe(Effect.map(exports_select.name));
140
139
  const output = Effect.fnUntraced(function* (id, input) {
141
140
  const session = yield* require2(id);
142
141
  const cursor = input?.cursor ?? 0;
@@ -171,7 +170,7 @@ var layer = () => Layer.effect(Service, Effect.gen(function* () {
171
170
  command: input.command,
172
171
  cwd: input.cwd ?? location.directory,
173
172
  timeout: input.timeout,
174
- shell: yield* shell.preferred(),
173
+ shell: input.shell ?? (yield* shell.resolve({ priority: "config" })),
175
174
  env: {
176
175
  ...sessionEnvironment ?? process.env,
177
176
  TERM: "xterm-256color",
@@ -273,7 +272,7 @@ var layer = () => Layer.effect(Service, Effect.gen(function* () {
273
272
  const session = yield* Deferred.await(ready);
274
273
  return session.info;
275
274
  });
276
- return Service.of({ name, create, list, get, wait, timeout, output, remove });
275
+ return Service.of({ create, list, get, wait, timeout, output, remove });
277
276
  }));
278
277
  var node = makeLocationNode({
279
278
  service: Service,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  PositiveInt
3
- } from "./tool-j07kk359.js";
3
+ } from "./state-j07kk359.js";
4
4
  import {
5
5
  __export
6
- } from "./tool-rvfvac9x.js";
6
+ } from "./state-rvfvac9x.js";
7
7
 
8
8
  // src/v1/config/mcp.ts
9
9
  var exports_mcp = {};
@@ -1,27 +1,27 @@
1
1
  import {
2
2
  exports_context
3
- } from "./tool-j5mb7fzz.js";
3
+ } from "./state-rph6nvyf.js";
4
4
  import {
5
5
  exports_model_request
6
- } from "./tool-c9m9veqy.js";
7
- import {
8
- exports_model
9
- } from "./tool-1t908443.js";
6
+ } from "./state-t0tt4nmt.js";
10
7
  import {
11
8
  exports_generate
12
- } from "./tool-xgv25zxy.js";
9
+ } from "./state-xgv25zxy.js";
10
+ import {
11
+ exports_model
12
+ } from "./state-qe0aav6y.js";
13
13
  import {
14
14
  llmClient
15
- } from "./tool-k42t1tha.js";
15
+ } from "./state-k42t1tha.js";
16
16
  import {
17
17
  exports_history
18
- } from "./tool-6hn8t5cq.js";
18
+ } from "./state-wrw92r0k.js";
19
19
  import {
20
20
  exports_database
21
- } from "./tool-ysxk876j.js";
21
+ } from "./state-x07gtesk.js";
22
22
  import {
23
23
  __export
24
- } from "./tool-rvfvac9x.js";
24
+ } from "./state-rvfvac9x.js";
25
25
 
26
26
  // src/session/generate-node.ts
27
27
  var exports_generate_node = {};
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  exports_tool
3
- } from "./tool-2dargkq0.js";
3
+ } from "./state-5z4zwtb4.js";
4
4
  import {
5
5
  definition,
6
6
  execute,
7
7
  normalizeContent
8
- } from "./tool-pjywn1fy.js";
8
+ } from "./state-drean1vx.js";
9
9
  import {
10
10
  exports_wildcard
11
- } from "./tool-y67x6rf6.js";
12
- import {
13
- exports_image
14
- } from "./tool-v43225w3.js";
11
+ } from "./state-y67x6rf6.js";
15
12
  import {
16
13
  exports_hooks
17
- } from "./tool-v2wshkax.js";
14
+ } from "./state-v2wshkax.js";
15
+ import {
16
+ exports_image
17
+ } from "./state-wvjbjymc.js";
18
18
  import {
19
19
  __export
20
- } from "./tool-rvfvac9x.js";
20
+ } from "./state-rvfvac9x.js";
21
21
 
22
22
  // src/tool.ts
23
23
  var exports_tool2 = {};