@opencode-ai/core 0.0.0-dev-18332 → 0.0.0-dev-18338

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 (754) 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/{repository-02dbfq60.js → command-02dbfq60.js} +1 -1
  9. package/dist/chunks/{repository-6dd2a0dp.js → command-07086x0p.js} +15 -15
  10. package/dist/chunks/{repository-a6w4g4cj.js → command-0fxyfvd8.js} +3 -3
  11. package/dist/chunks/{repository-0kvmztkf.js → command-0kvmztkf.js} +1 -1
  12. package/dist/chunks/{repository-rnz05jn0.js → command-0x9pc4qd.js} +3 -3
  13. package/dist/chunks/{repository-9g83n8eb.js → command-0xw6stsz.js} +9 -9
  14. package/dist/chunks/{repository-9f2qmfnk.js → command-0y0kz806.js} +7 -7
  15. package/dist/chunks/{repository-1q9jm0c5.js → command-13kqh5ym.js} +8 -8
  16. package/dist/chunks/{repository-18pv8fg3.js → command-18pv8fg3.js} +2 -2
  17. package/dist/chunks/{repository-vdj6c7nz.js → command-18v6q0xy.js} +23 -23
  18. package/dist/chunks/{repository-m5kqahw3.js → command-1cyx1kjz.js} +6 -6
  19. package/dist/chunks/{repository-68qqdpkg.js → command-1d8re98f.js} +4 -4
  20. package/dist/chunks/{repository-t470qcr0.js → command-1fpz5k78.js} +2 -2
  21. package/dist/chunks/{repository-xjx97m2v.js → command-20azrh1e.js} +12 -12
  22. package/dist/chunks/{repository-etpvgr36.js → command-2326bf9a.js} +3 -3
  23. package/dist/chunks/{repository-6a00t4qm.js → command-2kc32s9z.js} +7 -7
  24. package/dist/chunks/{repository-2m0hgr65.js → command-2m0hgr65.js} +1 -1
  25. package/dist/chunks/{repository-076r8hnq.js → command-2nbd4tew.js} +13 -13
  26. package/dist/chunks/{repository-2nmyybe0.js → command-2nmyybe0.js} +1 -1
  27. package/dist/chunks/{repository-170h8jjm.js → command-2pa0q0m7.js} +10 -10
  28. package/dist/chunks/{repository-3xnzsp73.js → command-2w0edm4d.js} +7 -7
  29. package/dist/chunks/{repository-2wds5nk3.js → command-2wds5nk3.js} +1 -1
  30. package/dist/chunks/{repository-t2csvvvq.js → command-34hf638t.js} +14 -14
  31. package/dist/chunks/{repository-3g8vftxb.js → command-3g8vftxb.js} +2 -2
  32. package/dist/chunks/{repository-3qv8nf0b.js → command-3qv8nf0b.js} +1 -1
  33. package/dist/chunks/{repository-w9m8fgr8.js → command-3smpbccg.js} +3 -3
  34. package/dist/chunks/{repository-3thh6229.js → command-3thh6229.js} +2 -2
  35. package/dist/chunks/{repository-nmvk8hbh.js → command-3vanabr6.js} +8 -8
  36. package/dist/chunks/{repository-345yesx5.js → command-3xe1nwck.js} +3 -3
  37. package/dist/chunks/{repository-k0frj1f4.js → command-3z201p5v.js} +16 -16
  38. package/dist/chunks/{repository-tcrd7gn4.js → command-45f68xg0.js} +10 -10
  39. package/dist/chunks/{repository-17tgwgx0.js → command-4gzs46ms.js} +3 -3
  40. package/dist/chunks/{repository-71311zxd.js → command-4pmhaw5y.js} +11 -11
  41. package/dist/chunks/{repository-ghp3192f.js → command-4pr43xfg.js} +16 -16
  42. package/dist/chunks/{repository-4s2xwh5d.js → command-4s2xwh5d.js} +3 -3
  43. package/dist/chunks/{repository-4zzdwbaz.js → command-4zzdwbaz.js} +2 -2
  44. package/dist/chunks/{repository-50jxp3hw.js → command-50jxp3hw.js} +1 -1
  45. package/dist/chunks/{repository-00vrvwj2.js → command-5530a4sj.js} +9 -9
  46. package/dist/chunks/{repository-57tzwnz4.js → command-57tzwnz4.js} +1 -1
  47. package/dist/chunks/{repository-58xdvehb.js → command-58xdvehb.js} +1 -1
  48. package/dist/chunks/{repository-5cdnkd94.js → command-5cdnkd94.js} +3 -3
  49. package/dist/chunks/{repository-jv7qqyzy.js → command-5cn2as5p.js} +28 -28
  50. package/dist/chunks/{repository-nxhmdyxq.js → command-5ej4w4re.js} +7 -7
  51. package/dist/chunks/{repository-5fe026tx.js → command-5fe026tx.js} +3 -3
  52. package/dist/chunks/{repository-pabq4g2g.js → command-5n4z7hw9.js} +29 -29
  53. package/dist/chunks/{repository-5rs65q6p.js → command-5rs65q6p.js} +1 -1
  54. package/dist/chunks/{repository-5vcssjzn.js → command-5vcssjzn.js} +1 -1
  55. package/dist/chunks/{repository-aeyesfjw.js → command-5vt8h2zx.js} +11 -11
  56. package/dist/chunks/{repository-5z4zwtb4.js → command-5z4zwtb4.js} +2 -2
  57. package/dist/chunks/{repository-6272rtjg.js → command-6272rtjg.js} +1 -1
  58. package/dist/chunks/{repository-zy7m13ag.js → command-635kctt6.js} +6 -6
  59. package/dist/chunks/{repository-rsgcahmv.js → command-68sn9976.js} +7 -7
  60. package/dist/chunks/{repository-w68g34jk.js → command-6azbvp0j.js} +8 -8
  61. package/dist/chunks/{repository-2rbgjk9n.js → command-6d08482p.js} +5 -5
  62. package/dist/chunks/{repository-seh353nb.js → command-6h3szv9d.js} +13 -13
  63. package/dist/chunks/{repository-zvrwrdrm.js → command-6jzrxqp8.js} +3 -3
  64. package/dist/chunks/{repository-6ky7rqk7.js → command-6ky7rqk7.js} +1 -1
  65. package/dist/chunks/{repository-6wkzvma0.js → command-6wkzvma0.js} +2 -2
  66. package/dist/chunks/{repository-mwq7yj7g.js → command-71b0nhr9.js} +2 -2
  67. package/dist/chunks/{repository-75h1hfe2.js → command-75h1hfe2.js} +2 -2
  68. package/dist/chunks/{repository-psk674yw.js → command-762h6w2y.js} +4 -4
  69. package/dist/chunks/{repository-tfr8sv0k.js → command-7b0tjb0r.js} +8 -8
  70. package/dist/chunks/{repository-7gqqz1s8.js → command-7gqqz1s8.js} +1 -1
  71. package/dist/chunks/{repository-7khw64yh.js → command-7khw64yh.js} +1 -1
  72. package/dist/chunks/{repository-7mrpdsq5.js → command-7mrpdsq5.js} +1 -1
  73. package/dist/chunks/{repository-58ezrk5g.js → command-7s3hdjsx.js} +8 -8
  74. package/dist/chunks/{repository-wwnnv2f9.js → command-7sd2gfph.js} +13 -13
  75. package/dist/chunks/{repository-7thnevmq.js → command-7thnevmq.js} +2 -2
  76. package/dist/chunks/{repository-z71y81jy.js → command-7v7j7gdn.js} +4 -4
  77. package/dist/chunks/{repository-7wcmqxrc.js → command-7wcmqxrc.js} +1 -1
  78. package/dist/chunks/{repository-7pc2v325.js → command-852qbg4y.js} +3 -3
  79. package/dist/chunks/{repository-d688w8jr.js → command-876e45a6.js} +11 -11
  80. package/dist/chunks/{repository-88jbfw8z.js → command-88jbfw8z.js} +2 -2
  81. package/dist/chunks/{repository-8zjz3n40.js → command-8by23dpn.js} +5 -5
  82. package/dist/chunks/{repository-c2xqe7tb.js → command-8h79yynz.js} +7 -7
  83. package/dist/chunks/{repository-8pngjawd.js → command-8pngjawd.js} +2 -2
  84. package/dist/chunks/{repository-wnbq96m8.js → command-8vnat5be.js} +3 -3
  85. package/dist/chunks/{repository-ghp47den.js → command-8x6f1wbp.js} +5 -5
  86. package/dist/chunks/{repository-z24e4npm.js → command-8zxaej49.js} +3 -3
  87. package/dist/chunks/{repository-999qd968.js → command-999qd968.js} +1 -1
  88. package/dist/chunks/{repository-9f0rnpkn.js → command-9f0rnpkn.js} +1 -1
  89. package/dist/chunks/{repository-hfybqnzy.js → command-9k2vxwft.js} +3 -3
  90. package/dist/chunks/{repository-41tr85mm.js → command-9prfjntx.js} +15 -15
  91. package/dist/chunks/{repository-t41bjjc8.js → command-9sk2hxbj.js} +26 -26
  92. package/dist/chunks/{repository-a09abg6q.js → command-a09abg6q.js} +2 -2
  93. package/dist/chunks/{repository-dwqhgbcv.js → command-a42fyn66.js} +4 -4
  94. package/dist/chunks/{repository-wts4bbbj.js → command-agsxfmys.js} +12 -12
  95. package/dist/chunks/{repository-6fgavvjz.js → command-aqb2brhr.js} +3 -3
  96. package/dist/chunks/{repository-1y54f3gd.js → command-atdsxjyb.js} +11 -11
  97. package/dist/chunks/{repository-awg5d31a.js → command-awg5d31a.js} +1 -1
  98. package/dist/chunks/{repository-cdabage0.js → command-awg90ga5.js} +91 -91
  99. package/dist/chunks/{repository-f4wz5w8t.js → command-b1cpagj2.js} +3 -3
  100. package/dist/chunks/{repository-nz8yfaef.js → command-b2znypa8.js} +6 -6
  101. package/dist/chunks/{repository-ykr3can0.js → command-b52613qw.js} +3 -3
  102. package/dist/chunks/{repository-bh1wr8rq.js → command-bh1wr8rq.js} +2 -2
  103. package/dist/chunks/{repository-bmknfyv0.js → command-bmknfyv0.js} +2 -2
  104. package/dist/chunks/{repository-26e1s4fc.js → command-bsxnqn9w.js} +3 -3
  105. package/dist/chunks/{repository-byab506k.js → command-byab506k.js} +1 -1
  106. package/dist/chunks/{repository-c4wcb9vc.js → command-c4wcb9vc.js} +2 -2
  107. package/dist/chunks/{repository-qn4f7hc3.js → command-cc3ec8j0.js} +4 -4
  108. package/dist/chunks/{repository-da8pd544.js → command-cds8qqzh.js} +4 -4
  109. package/dist/chunks/{repository-csrx180a.js → command-csrx180a.js} +3 -3
  110. package/dist/chunks/{repository-d2gk9vpf.js → command-d2gk9vpf.js} +2 -2
  111. package/dist/chunks/{repository-d4ax61k3.js → command-d4ax61k3.js} +2 -2
  112. package/dist/chunks/{repository-7b48rxmy.js → command-dchkjjs1.js} +8 -8
  113. package/dist/chunks/{repository-dhphtf1x.js → command-dhphtf1x.js} +1 -1
  114. package/dist/chunks/{repository-r4jpthk2.js → command-dtt78e9g.js} +5 -5
  115. package/dist/chunks/{repository-e1z9a0ts.js → command-e1z9a0ts.js} +2 -2
  116. package/dist/chunks/{repository-gt9frmwq.js → command-e24kf4q9.js} +5 -5
  117. package/dist/chunks/{repository-ec8vrfw5.js → command-ec8vrfw5.js} +1 -1
  118. package/dist/chunks/{repository-f1vkqdgb.js → command-eg9w23bg.js} +1 -1
  119. package/dist/chunks/{repository-enpg66yn.js → command-enpg66yn.js} +1 -1
  120. package/dist/chunks/{repository-ezhxybkj.js → command-ep16agv5.js} +4 -4
  121. package/dist/chunks/{repository-kndvs6c0.js → command-esf92hfb.js} +3 -3
  122. package/dist/chunks/{repository-15qr5px5.js → command-eskxxab2.js} +4 -4
  123. package/dist/chunks/{repository-ztjk4rav.js → command-f11jbhcb.js} +6 -6
  124. package/dist/chunks/{repository-ega5tbj6.js → command-f45448df.js} +8 -8
  125. package/dist/chunks/{repository-wh1qgym5.js → command-f4hn113j.js} +3 -3
  126. package/dist/chunks/{repository-7ccgh94t.js → command-f7q7a28y.js} +6 -6
  127. package/dist/chunks/{repository-f9wt0tjw.js → command-f9wt0tjw.js} +2 -2
  128. package/dist/chunks/{repository-fb7nfzf2.js → command-fb7nfzf2.js} +3 -3
  129. package/dist/chunks/{repository-2vm8q0r6.js → command-fdafgy0p.js} +4 -4
  130. package/dist/chunks/{repository-fgyjabww.js → command-fgyjabww.js} +2 -2
  131. package/dist/chunks/{repository-kpbwa3k5.js → command-fr2dm94j.js} +4 -4
  132. package/dist/chunks/{repository-rhkd2d6z.js → command-fthn4xft.js} +2 -2
  133. package/dist/chunks/{repository-a31n10t3.js → command-fyy436k1.js} +8 -8
  134. package/dist/chunks/{repository-aqy4y243.js → command-g2p7nacw.js} +151 -151
  135. package/dist/chunks/{repository-ebp16t0h.js → command-g6p65dha.js} +4 -4
  136. package/dist/chunks/{repository-gcay93cp.js → command-gcay93cp.js} +1 -1
  137. package/dist/chunks/{repository-gd2xppx8.js → command-gd2xppx8.js} +1 -1
  138. package/dist/chunks/{repository-njraexa2.js → command-gpeygqd6.js} +19 -19
  139. package/dist/chunks/{repository-gpybhmhb.js → command-gpybhmhb.js} +3 -3
  140. package/dist/chunks/{repository-nja1fn3g.js → command-gwcdyecz.js} +3 -3
  141. package/dist/chunks/{repository-h12kt9pa.js → command-h12kt9pa.js} +2 -2
  142. package/dist/chunks/{repository-0vq6d7pc.js → command-h2afcd1x.js} +9 -9
  143. package/dist/chunks/{repository-mkaeg0rc.js → command-h3kcef9b.js} +8 -8
  144. package/dist/chunks/{repository-xgb68578.js → command-h4nnfjrk.js} +59 -59
  145. package/dist/chunks/{repository-h94zdhz8.js → command-h94zdhz8.js} +2 -2
  146. package/dist/chunks/{repository-hp6rpdnc.js → command-hp6rpdnc.js} +1 -1
  147. package/dist/chunks/{repository-hqh8yks9.js → command-hqh8yks9.js} +3 -3
  148. package/dist/chunks/{repository-55h21shb.js → command-j2rwtkhe.js} +6 -6
  149. package/dist/chunks/{repository-05fp7m24.js → command-j9qxmp1z.js} +6 -6
  150. package/dist/chunks/{repository-shghj89k.js → command-jcpbs0he.js} +2 -2
  151. package/dist/chunks/{repository-vwc0mjkf.js → command-jd3gn2jc.js} +8 -8
  152. package/dist/chunks/{repository-neyyg2f1.js → command-jthqd831.js} +6 -6
  153. package/dist/chunks/{repository-n0sr5jck.js → command-jxka5pmd.js} +3 -3
  154. package/dist/chunks/{repository-k42t1tha.js → command-k42t1tha.js} +2 -2
  155. package/dist/chunks/{repository-whfsh5fv.js → command-kaxbcgz2.js} +4 -4
  156. package/dist/chunks/{repository-kg1345f7.js → command-kg1345f7.js} +1 -1
  157. package/dist/chunks/{repository-a15yv4x5.js → command-kj7y1q6w.js} +7 -7
  158. package/dist/chunks/{repository-kp1t5rcy.js → command-kp1t5rcy.js} +1 -1
  159. package/dist/chunks/{repository-krsqcmnj.js → command-krsqcmnj.js} +1 -1
  160. package/dist/chunks/{repository-3k9axw29.js → command-m33naph7.js} +6 -6
  161. package/dist/chunks/{repository-m55whf0h.js → command-m55whf0h.js} +2 -2
  162. package/dist/chunks/{repository-qbwjpsd1.js → command-m5ptvz2y.js} +17 -17
  163. package/dist/chunks/{repository-bkkt73j6.js → command-m6yhz9m5.js} +8 -8
  164. package/dist/chunks/{repository-t5xbttqw.js → command-m7hzz66e.js} +5 -5
  165. package/dist/chunks/command-mb0mcgky.js +341 -0
  166. package/dist/chunks/{repository-mf0hyk7z.js → command-mf0hyk7z.js} +1 -1
  167. package/dist/chunks/{repository-83krsvy7.js → command-mgrmrfyf.js} +5 -5
  168. package/dist/chunks/{repository-mh28new4.js → command-mh28new4.js} +2 -2
  169. package/dist/chunks/{repository-1g1tbwy6.js → command-mkegcr90.js} +3 -3
  170. package/dist/chunks/{repository-mnb85w6b.js → command-mnb85w6b.js} +2 -2
  171. package/dist/chunks/{repository-51cyvdh7.js → command-mpyzw49z.js} +4 -4
  172. package/dist/chunks/{repository-9a8ypnye.js → command-mt1mc0tc.js} +86 -86
  173. package/dist/chunks/{repository-mxvw03gv.js → command-mxvw03gv.js} +1 -1
  174. package/dist/chunks/{repository-jgxv49xw.js → command-n00ksz6g.js} +5 -5
  175. package/dist/chunks/{repository-nesb2rcz.js → command-nesb2rcz.js} +2 -2
  176. package/dist/chunks/{repository-nr76rjj3.js → command-nr76rjj3.js} +2 -2
  177. package/dist/chunks/{repository-nzrjycs5.js → command-nzrjycs5.js} +1 -1
  178. package/dist/chunks/{repository-qxx313yp.js → command-p3cfaqcp.js} +11 -11
  179. package/dist/chunks/{repository-6q0m15b3.js → command-p8fr6x1v.js} +2 -2
  180. package/dist/chunks/{repository-cpwvev3e.js → command-pmh5ez6x.js} +64 -64
  181. package/dist/chunks/{repository-pq4b4pqk.js → command-pq4b4pqk.js} +2 -2
  182. package/dist/chunks/{repository-cxxehzrs.js → command-pqtjdh5w.js} +14 -14
  183. package/dist/chunks/{repository-756s1wy4.js → command-pxgcm67z.js} +10 -10
  184. package/dist/chunks/{repository-319e7pv3.js → command-q2tqyfpq.js} +4 -4
  185. package/dist/chunks/{repository-q9b4qnv8.js → command-q9b4qnv8.js} +2 -2
  186. package/dist/chunks/{repository-qe0d689s.js → command-qe0d689s.js} +2 -2
  187. package/dist/chunks/{repository-ytz48meg.js → command-qevy6d6w.js} +36 -36
  188. package/dist/chunks/{repository-b8mh6t1j.js → command-qg4njq5q.js} +2 -2
  189. package/dist/chunks/{repository-jc3cexpb.js → command-qnx7s8px.js} +5 -5
  190. package/dist/chunks/{repository-3rnsxg9g.js → command-qznv994b.js} +8 -8
  191. package/dist/chunks/{repository-r13w8t0w.js → command-r13w8t0w.js} +2 -2
  192. package/dist/chunks/{repository-r3k9abhd.js → command-r3k9abhd.js} +2 -2
  193. package/dist/chunks/{repository-rahat93a.js → command-rahat93a.js} +1 -1
  194. package/dist/chunks/{repository-rameyvmv.js → command-rameyvmv.js} +1 -1
  195. package/dist/chunks/{repository-rbnp2c85.js → command-rbnp2c85.js} +3 -3
  196. package/dist/chunks/{repository-rfbm65k8.js → command-rfbm65k8.js} +1 -1
  197. package/dist/chunks/{repository-s33fw6zm.js → command-s33fw6zm.js} +1 -1
  198. package/dist/chunks/{repository-qz0b8ts0.js → command-sdxjmp8q.js} +5 -5
  199. package/dist/chunks/{repository-se1aqaya.js → command-se1aqaya.js} +3 -3
  200. package/dist/chunks/{repository-smpeg8c9.js → command-smpeg8c9.js} +2 -2
  201. package/dist/chunks/{repository-sw84ckhj.js → command-sw84ckhj.js} +1 -1
  202. package/dist/chunks/{repository-t14kykx1.js → command-t14kykx1.js} +1 -1
  203. package/dist/chunks/{repository-tcptxgyq.js → command-tcptxgyq.js} +1 -1
  204. package/dist/chunks/{repository-psmyjr0t.js → command-tejwhz1j.js} +4 -4
  205. package/dist/chunks/{repository-p93g9cdt.js → command-tfxbd1jy.js} +9 -9
  206. package/dist/chunks/{repository-tgbb2ckq.js → command-tgbb2ckq.js} +2 -2
  207. package/dist/chunks/{repository-thstd87d.js → command-thstd87d.js} +1 -1
  208. package/dist/chunks/{repository-kjdqw05y.js → command-tzn4tdda.js} +4 -4
  209. package/dist/chunks/{repository-v2wshkax.js → command-v2wshkax.js} +1 -1
  210. package/dist/chunks/{repository-5rn0dd71.js → command-v7tem4pa.js} +3 -3
  211. package/dist/chunks/{repository-v80zsxnb.js → command-v80zsxnb.js} +1 -1
  212. package/dist/chunks/{repository-v972xay6.js → command-v972xay6.js} +1 -1
  213. package/dist/chunks/{repository-v9bfv94f.js → command-v9bfv94f.js} +1 -1
  214. package/dist/chunks/{repository-sgbc5jbj.js → command-va9v8x4k.js} +4 -4
  215. package/dist/chunks/{repository-vcwr2vpf.js → command-vcwr2vpf.js} +1 -1
  216. package/dist/chunks/{repository-ahxkvhb9.js → command-vcy7g1ry.js} +4 -4
  217. package/dist/chunks/{repository-qaw5fms9.js → command-vhx6n6s7.js} +3 -3
  218. package/dist/chunks/{repository-vqbmgfq1.js → command-vqbmgfq1.js} +3 -3
  219. package/dist/chunks/{repository-b4zrgnay.js → command-vrkzsqt1.js} +4 -4
  220. package/dist/chunks/{repository-vycjsnjm.js → command-vycjsnjm.js} +2 -2
  221. package/dist/chunks/{repository-vz89hfgr.js → command-vz89hfgr.js} +1 -1
  222. package/dist/chunks/{repository-h7r3gqv9.js → command-w9ch4qnj.js} +5 -5
  223. package/dist/chunks/{repository-wbkt8qpj.js → command-wbkt8qpj.js} +1 -1
  224. package/dist/chunks/{repository-j5rzyk9h.js → command-wcwptmnn.js} +3 -3
  225. package/dist/chunks/{repository-wd268jeg.js → command-wd268jeg.js} +1 -1
  226. package/dist/chunks/{repository-whk0g8cz.js → command-whk0g8cz.js} +4 -4
  227. package/dist/chunks/{repository-wmxdh12w.js → command-wmxdh12w.js} +1 -1
  228. package/dist/chunks/{repository-wps8gh8n.js → command-wps8gh8n.js} +2 -2
  229. package/dist/chunks/{repository-1407j08c.js → command-wq1hz9k5.js} +4 -4
  230. package/dist/chunks/{repository-yyces3ct.js → command-wyak2t21.js} +5 -5
  231. package/dist/chunks/{repository-rrnp9jfd.js → command-x29w0fqx.js} +7 -7
  232. package/dist/chunks/{repository-0z5957sm.js → command-x4fsxj3w.js} +2 -2
  233. package/dist/chunks/{repository-x89rah0x.js → command-x89rah0x.js} +1 -1
  234. package/dist/chunks/{repository-xczfw7dq.js → command-xczfw7dq.js} +1 -1
  235. package/dist/chunks/{repository-xgv25zxy.js → command-xgv25zxy.js} +1 -1
  236. package/dist/chunks/{repository-f3ywcpkc.js → command-xpd5ajfw.js} +13 -13
  237. package/dist/chunks/{repository-axehtavx.js → command-xwash6kg.js} +43 -43
  238. package/dist/chunks/{repository-xwftk1fd.js → command-xwftk1fd.js} +2 -2
  239. package/dist/chunks/{repository-bkz3me4y.js → command-xx1crn9e.js} +14 -14
  240. package/dist/chunks/{repository-xxpvz42q.js → command-xxpvz42q.js} +3 -3
  241. package/dist/chunks/{repository-y0x38cee.js → command-y0x38cee.js} +1 -1
  242. package/dist/chunks/{repository-y198y2ra.js → command-y198y2ra.js} +1 -1
  243. package/dist/chunks/{repository-59n2d071.js → command-y25c5dv9.js} +11 -11
  244. package/dist/chunks/{repository-ywn690qs.js → command-y2g3vveh.js} +7 -7
  245. package/dist/chunks/{repository-y67x6rf6.js → command-y67x6rf6.js} +1 -1
  246. package/dist/chunks/{repository-y980s7ka.js → command-y980s7ka.js} +3 -3
  247. package/dist/chunks/{repository-mw780xr3.js → command-yb07q8fy.js} +3 -3
  248. package/dist/chunks/{repository-ybhfpy64.js → command-ybhfpy64.js} +2 -2
  249. package/dist/chunks/{repository-59b1gbjf.js → command-ybzkfmmh.js} +8 -8
  250. package/dist/chunks/{repository-yc2vxtaa.js → command-yc2vxtaa.js} +2 -2
  251. package/dist/chunks/{repository-yf0knd5z.js → command-yf0knd5z.js} +2 -2
  252. package/dist/chunks/{repository-ygy0xbqa.js → command-ygy0xbqa.js} +3 -3
  253. package/dist/chunks/{repository-h7qp289f.js → command-yk40qyxj.js} +5 -5
  254. package/dist/chunks/{repository-1a1w6s9q.js → command-yz756q4w.js} +10 -10
  255. package/dist/chunks/{repository-0zk7ferw.js → command-z290dmzw.js} +13 -13
  256. package/dist/chunks/{repository-v0j3x2xe.js → command-z5eaewt6.js} +3 -3
  257. package/dist/chunks/{repository-dxzgwmyr.js → command-z5pbwkhm.js} +5 -5
  258. package/dist/chunks/{repository-twb6zc5v.js → command-z8ebwbdj.js} +11 -11
  259. package/dist/chunks/{repository-zbqqnp0n.js → command-zbqqnp0n.js} +1 -1
  260. package/dist/chunks/{repository-zdkg1k91.js → command-zdkg1k91.js} +1 -1
  261. package/dist/chunks/{repository-1qwv15gn.js → command-zkcd3d6b.js} +2 -2
  262. package/dist/chunks/{repository-tjsr34fn.js → command-zv8cn6h8.js} +3 -3
  263. package/dist/chunks/{repository-q99f8njx.js → command-zx1kt9ts.js} +11 -11
  264. package/dist/chunks/{repository-zxcy6vhn.js → command-zxcy6vhn.js} +1 -1
  265. package/dist/chunks/{repository-zxe9jjhn.js → command-zxe9jjhn.js} +2 -2
  266. package/dist/codemode/catalog.js +2 -2
  267. package/dist/codemode/instructions.js +4 -4
  268. package/dist/codemode/tool.js +3 -3
  269. package/dist/command.js +70 -70
  270. package/dist/config/markdown.js +2 -2
  271. package/dist/config/normalize.js +20 -20
  272. package/dist/config/plugin/agent.js +135 -135
  273. package/dist/config/plugin/command.js +118 -118
  274. package/dist/config/plugin/compaction.js +170 -170
  275. package/dist/config/plugin/entry-observer.js +114 -114
  276. package/dist/config/plugin/formatter.js +119 -119
  277. package/dist/config/plugin/image.js +130 -130
  278. package/dist/config/plugin/instruction.js +90 -90
  279. package/dist/config/plugin/location-watcher.js +117 -117
  280. package/dist/config/plugin/mcp.js +127 -127
  281. package/dist/config/plugin/policy.js +116 -116
  282. package/dist/config/plugin/provider.js +115 -115
  283. package/dist/config/plugin/reference.js +119 -119
  284. package/dist/config/plugin/shell.js +118 -118
  285. package/dist/config/plugin/skill-file.js +108 -108
  286. package/dist/config/plugin/skill.js +138 -138
  287. package/dist/config/plugin/snapshot.js +117 -117
  288. package/dist/config/plugin/source.js +114 -114
  289. package/dist/config/plugin/tool-output.js +119 -119
  290. package/dist/config/plugin/websearch.js +115 -115
  291. package/dist/config/variable.js +4 -4
  292. package/dist/config.js +113 -113
  293. package/dist/credential/sql.js +3 -3
  294. package/dist/credential.js +71 -71
  295. package/dist/database/database.js +65 -65
  296. package/dist/database/drizzle/effect-sqlite/driver.js +13 -13
  297. package/dist/database/drizzle/effect-sqlite/index.js +13 -13
  298. package/dist/database/drizzle/effect-sqlite/session.js +12 -12
  299. package/dist/database/drizzle/index.js +14 -14
  300. package/dist/database/drizzle/internal/drizzle-utils.js +2 -2
  301. package/dist/database/drizzle/sqlite-core/effect/count.js +2 -2
  302. package/dist/database/drizzle/sqlite-core/effect/db.js +10 -10
  303. package/dist/database/drizzle/sqlite-core/effect/delete.js +3 -3
  304. package/dist/database/drizzle/sqlite-core/effect/index.js +19 -19
  305. package/dist/database/drizzle/sqlite-core/effect/insert.js +3 -3
  306. package/dist/database/drizzle/sqlite-core/effect/query.js +2 -2
  307. package/dist/database/drizzle/sqlite-core/effect/raw.js +2 -2
  308. package/dist/database/drizzle/sqlite-core/effect/select.js +3 -3
  309. package/dist/database/drizzle/sqlite-core/effect/session.js +11 -11
  310. package/dist/database/drizzle/sqlite-core/effect/update.js +3 -3
  311. package/dist/database/drizzle.js +15 -15
  312. package/dist/database/migration/20260127222353_familiar_lady_ursula.js +2 -2
  313. package/dist/database/migration/20260211171708_add_project_commands.js +2 -2
  314. package/dist/database/migration/20260213144116_wakeful_the_professor.js +2 -2
  315. package/dist/database/migration/20260225215848_workspace.js +2 -2
  316. package/dist/database/migration/20260227213759_add_session_workspace_id.js +2 -2
  317. package/dist/database/migration/20260228203230_blue_harpoon.js +2 -2
  318. package/dist/database/migration/20260303231226_add_workspace_fields.js +2 -2
  319. package/dist/database/migration/20260309230000_move_org_to_state.js +2 -2
  320. package/dist/database/migration/20260312043431_session_message_cursor.js +2 -2
  321. package/dist/database/migration/20260323234822_events.js +2 -2
  322. package/dist/database/migration/20260410174513_workspace-name.js +2 -2
  323. package/dist/database/migration/20260413175956_chief_energizer.js +2 -2
  324. package/dist/database/migration/20260423070820_add_icon_url_override.js +2 -2
  325. package/dist/database/migration/20260427172553_slow_nightmare.js +2 -2
  326. package/dist/database/migration/20260428004200_add_session_path.js +2 -2
  327. package/dist/database/migration/20260501142318_next_venus.js +2 -2
  328. package/dist/database/migration/20260504145000_add_sync_owner.js +2 -2
  329. package/dist/database/migration/20260507164347_add_workspace_time.js +2 -2
  330. package/dist/database/migration/20260510033149_session_usage.js +2 -2
  331. package/dist/database/migration/20260511000411_data_migration_state.js +2 -2
  332. package/dist/database/migration/20260511173437_session-metadata.js +2 -2
  333. package/dist/database/migration/20260601010001_normalize_storage_paths.js +2 -2
  334. package/dist/database/migration/20260601202201_amazing_prowler.js +2 -2
  335. package/dist/database/migration/20260602002951_lowly_union_jack.js +2 -2
  336. package/dist/database/migration/20260602182828_add_project_directories.js +2 -2
  337. package/dist/database/migration/20260603001617_session_message_projection_indexes.js +2 -2
  338. package/dist/database/migration/20260603040000_session_message_projection_order.js +2 -2
  339. package/dist/database/migration/20260603141458_session_input_inbox.js +2 -2
  340. package/dist/database/migration/20260603160727_jittery_ezekiel_stane.js +2 -2
  341. package/dist/database/migration/20260604172448_event_sourced_session_input.js +2 -2
  342. package/dist/database/migration/20260605003541_add_session_context_snapshot.js +2 -2
  343. package/dist/database/migration/20260605042240_add_context_epoch_agent.js +2 -2
  344. package/dist/database/migration/20260611035744_credential.js +2 -2
  345. package/dist/database/migration/20260611192811_lush_chimera.js +2 -2
  346. package/dist/database/migration/20260612174303_project_dir_strategy.js +2 -2
  347. package/dist/database/migration/20260622142730_simplify_session_context_epoch.js +2 -2
  348. package/dist/database/migration/20260622170816_reset_v2_session_state.js +2 -2
  349. package/dist/database/migration/20260622202450_simplify_session_input.js +2 -2
  350. package/dist/database/migration/20260804233008_loose_psylocke.js +2 -2
  351. package/dist/database/migration/20260805200742_import_legacy_credentials.js +2 -2
  352. package/dist/database/migration/20260808023530_workspace_domain.js +2 -2
  353. package/dist/database/migration/20260811161259_execution_claim_attempts.js +2 -2
  354. package/dist/database/migration/20260812181746_session_inbox.js +2 -2
  355. package/dist/database/migration/20260812213948_worktree.js +2 -2
  356. package/dist/database/migration/20260819222447_session_viewed_state.js +2 -2
  357. package/dist/database/migration/20260823191254_nullable_workspace_binding.js +2 -2
  358. package/dist/database/migration.gen.js +48 -48
  359. package/dist/database/migration.js +50 -50
  360. package/dist/database/path.js +3 -3
  361. package/dist/database/schema.gen.js +2 -2
  362. package/dist/database/schema.sql.js +2 -2
  363. package/dist/database/sqlite.bun.js +2 -2
  364. package/dist/database/sqlite.js +2 -2
  365. package/dist/database/sqlite.node.js +2 -2
  366. package/dist/database/sqlite.workerd.js +2 -2
  367. package/dist/database/v1-migration.bun.js +77 -77
  368. package/dist/database/v1-migration.js +2 -2
  369. package/dist/database/v1-migration.noop.js +1 -1
  370. package/dist/effect/app-node-builder.js +327 -327
  371. package/dist/effect/app-node-platform.js +3 -3
  372. package/dist/effect/keyed-mutex.js +2 -2
  373. package/dist/effect/websocket-constructor.js +2 -2
  374. package/dist/environment/driver.js +1 -1
  375. package/dist/environment/environment.js +91 -91
  376. package/dist/environment/exec-defaults.js +3 -3
  377. package/dist/environment/files.js +2 -2
  378. package/dist/environment/index.js +93 -93
  379. package/dist/environment/local.js +3 -3
  380. package/dist/environment/memory.js +3 -3
  381. package/dist/environment/unavailable.js +1 -1
  382. package/dist/event/sql.js +2 -2
  383. package/dist/event-logger.js +68 -68
  384. package/dist/file-mutation.js +92 -92
  385. package/dist/file-retention.js +2 -2
  386. package/dist/file.js +2 -2
  387. package/dist/filesystem/fff.bun.js +2 -2
  388. package/dist/filesystem/fff.js +2 -2
  389. package/dist/filesystem/fff.node.js +2 -2
  390. package/dist/filesystem/fff.workerd.js +2 -2
  391. package/dist/filesystem/ignore.js +1 -1
  392. package/dist/filesystem/location-watcher-policy.js +3 -3
  393. package/dist/filesystem/location-watcher.js +306 -306
  394. package/dist/filesystem/protected.js +2 -2
  395. package/dist/filesystem/search.js +96 -96
  396. package/dist/filesystem/watcher-binding.js +2 -2
  397. package/dist/filesystem/watcher.js +4 -4
  398. package/dist/filesystem.js +96 -96
  399. package/dist/form.js +69 -69
  400. package/dist/formatter/builtins.js +3 -3
  401. package/dist/formatter.js +85 -85
  402. package/dist/generate.js +84 -84
  403. package/dist/git.js +5 -5
  404. package/dist/github-copilot/chat/convert-to-openai-compatible-chat-messages.js +2 -2
  405. package/dist/github-copilot/chat/get-response-metadata.js +2 -2
  406. package/dist/github-copilot/chat/map-openai-compatible-finish-reason.js +2 -2
  407. package/dist/github-copilot/chat/openai-compatible-chat-language-model.js +8 -8
  408. package/dist/github-copilot/chat/openai-compatible-chat-options.js +2 -2
  409. package/dist/github-copilot/chat/openai-compatible-prepare-tools.js +2 -2
  410. package/dist/github-copilot/copilot-provider.js +18 -18
  411. package/dist/github-copilot/models.js +4 -4
  412. package/dist/github-copilot/openai-compatible-error.js +2 -2
  413. package/dist/github-copilot/responses/convert-to-openai-responses-input.js +2 -2
  414. package/dist/github-copilot/responses/map-openai-responses-finish-reason.js +2 -2
  415. package/dist/github-copilot/responses/openai-error.js +2 -2
  416. package/dist/github-copilot/responses/openai-responses-language-model.js +11 -11
  417. package/dist/github-copilot/responses/openai-responses-prepare-tools.js +7 -7
  418. package/dist/github-copilot/responses/tool/code-interpreter.js +2 -2
  419. package/dist/github-copilot/responses/tool/file-search.js +2 -2
  420. package/dist/github-copilot/responses/tool/image-generation.js +2 -2
  421. package/dist/github-copilot/responses/tool/web-search-preview.js +2 -2
  422. package/dist/github-copilot/responses/tool/web-search.js +2 -2
  423. package/dist/id/id.js +2 -2
  424. package/dist/image/photon-wasm.bun.js +1 -1
  425. package/dist/image/photon-wasm.node.js +1 -1
  426. package/dist/image/photon-wasm.workerd.js +1 -1
  427. package/dist/image/photon.js +98 -98
  428. package/dist/image.js +98 -98
  429. package/dist/instruction-discovery.js +72 -72
  430. package/dist/instructions/builtins.js +86 -86
  431. package/dist/instructions/index.js +2 -2
  432. package/dist/integration/connection.js +2 -2
  433. package/dist/integration.js +75 -75
  434. package/dist/job.js +72 -72
  435. package/dist/kv/sql.js +3 -3
  436. package/dist/kv.js +68 -68
  437. package/dist/location-activity.js +87 -87
  438. package/dist/location-mutation.js +84 -84
  439. package/dist/location-service-map.js +84 -84
  440. package/dist/location-services.js +327 -327
  441. package/dist/location.js +83 -83
  442. package/dist/mcp/client.js +96 -93
  443. package/dist/mcp/index.js +98 -98
  444. package/dist/mcp/instructions.js +128 -128
  445. package/dist/mcp/oauth.js +2 -2
  446. package/dist/mcp/stdio.js +92 -92
  447. package/dist/mime.js +2 -2
  448. package/dist/model-resolver.js +81 -81
  449. package/dist/model.js +3 -3
  450. package/dist/models-dev.js +75 -75
  451. package/dist/oauth/page.js +2 -2
  452. package/dist/permission/saved.js +84 -84
  453. package/dist/permission/sql.js +6 -6
  454. package/dist/permission.js +105 -105
  455. package/dist/persistent-pty/binary.bun.js +2 -2
  456. package/dist/persistent-pty/binary.node.js +1 -1
  457. package/dist/persistent-pty/binary.workerd.js +1 -1
  458. package/dist/persistent-pty/daemon.js +2 -2
  459. package/dist/persistent-pty/index.js +70 -70
  460. package/dist/persistent-pty/pty-binding.js +2 -2
  461. package/dist/persistent-pty.js +70 -70
  462. package/dist/plugin/agent.js +106 -106
  463. package/dist/plugin/command.js +99 -99
  464. package/dist/plugin/hooks.js +3 -3
  465. package/dist/plugin/host.js +170 -170
  466. package/dist/plugin/internal.js +300 -300
  467. package/dist/plugin/mcp-codemode-exclusion.js +2 -2
  468. package/dist/plugin/models-dev.js +76 -76
  469. package/dist/plugin/module.js +3 -3
  470. package/dist/plugin/plan.js +106 -106
  471. package/dist/plugin/promise.js +2 -2
  472. package/dist/plugin/provider/alibaba.js +3 -3
  473. package/dist/plugin/provider/amazon-bedrock.js +3 -3
  474. package/dist/plugin/provider/anthropic.js +3 -3
  475. package/dist/plugin/provider/azure.js +121 -121
  476. package/dist/plugin/provider/cerebras.js +3 -3
  477. package/dist/plugin/provider/cloudflare-ai-gateway.js +122 -122
  478. package/dist/plugin/provider/cloudflare-workers-ai.js +122 -122
  479. package/dist/plugin/provider/cohere.js +3 -3
  480. package/dist/plugin/provider/configured.js +119 -119
  481. package/dist/plugin/provider/dynamic.js +2 -2
  482. package/dist/plugin/provider/factory.js +2 -2
  483. package/dist/plugin/provider/gateway.js +3 -3
  484. package/dist/plugin/provider/github-copilot.js +82 -82
  485. package/dist/plugin/provider/gitlab.js +4 -4
  486. package/dist/plugin/provider/google-vertex.js +3 -3
  487. package/dist/plugin/provider/kilo.js +3 -3
  488. package/dist/plugin/provider/llmgateway.js +77 -77
  489. package/dist/plugin/provider/lmstudio.js +114 -114
  490. package/dist/plugin/provider/mistral.js +3 -3
  491. package/dist/plugin/provider/nvidia.js +3 -3
  492. package/dist/plugin/provider/ollama.js +114 -114
  493. package/dist/plugin/provider/openai-compatible.js +2 -2
  494. package/dist/plugin/provider/openai.js +79 -79
  495. package/dist/plugin/provider/opencode.js +93 -93
  496. package/dist/plugin/provider/openrouter.js +4 -4
  497. package/dist/plugin/provider/perplexity.js +3 -3
  498. package/dist/plugin/provider/sap-ai-core.js +3 -3
  499. package/dist/plugin/provider/snowflake-cortex.js +3 -3
  500. package/dist/plugin/provider/venice.js +3 -3
  501. package/dist/plugin/provider/vercel.js +3 -3
  502. package/dist/plugin/provider/vllm.js +114 -114
  503. package/dist/plugin/provider/xai.js +78 -78
  504. package/dist/plugin/provider/zenmux.js +3 -3
  505. package/dist/plugin/provider.js +157 -157
  506. package/dist/plugin/runtime.js +158 -158
  507. package/dist/plugin/sdk.js +69 -69
  508. package/dist/plugin/skill.js +136 -136
  509. package/dist/plugin/source-directory.js +2 -2
  510. package/dist/plugin/supervisor-service.js +2 -2
  511. package/dist/plugin/supervisor.js +305 -305
  512. package/dist/plugin/system-prompt.js +2 -2
  513. package/dist/plugin/variant.js +4 -4
  514. package/dist/plugin/vcs/git.js +85 -85
  515. package/dist/plugin/vcs/hg.js +85 -85
  516. package/dist/plugin/warming.js +115 -115
  517. package/dist/plugin/websearch/exa.js +4 -4
  518. package/dist/plugin/websearch/firecrawl.js +5 -5
  519. package/dist/plugin/websearch/index.js +9 -9
  520. package/dist/plugin/websearch/mcp.js +3 -3
  521. package/dist/plugin/websearch/parallel.js +5 -5
  522. package/dist/plugin/websearch/tavily.js +3 -3
  523. package/dist/plugin.js +171 -171
  524. package/dist/project/markers.js +74 -74
  525. package/dist/project/schema.js +3 -3
  526. package/dist/project/sql.js +5 -5
  527. package/dist/project.js +82 -82
  528. package/dist/provider.js +2 -2
  529. package/dist/pty/protocol.js +1 -1
  530. package/dist/pty/pty.bun.js +1 -1
  531. package/dist/pty/pty.node.js +1 -1
  532. package/dist/pty/pty.workerd.js +1 -1
  533. package/dist/pty/schema.js +2 -2
  534. package/dist/pty/ticket.js +70 -70
  535. package/dist/pty.js +89 -89
  536. package/dist/reference/instructions.js +77 -77
  537. package/dist/reference.js +75 -75
  538. package/dist/repository-cache.js +7 -7
  539. package/dist/repository.js +2 -2
  540. package/dist/ripgrep/binary.js +3 -3
  541. package/dist/ripgrep.js +94 -94
  542. package/dist/schema.js +2 -2
  543. package/dist/session/compaction.js +142 -142
  544. package/dist/session/context.js +312 -312
  545. package/dist/session/environment.js +3 -3
  546. package/dist/session/error.js +4 -4
  547. package/dist/session/event.js +2 -2
  548. package/dist/session/execution/restart.js +158 -158
  549. package/dist/session/execution.js +125 -125
  550. package/dist/session/generate-node.js +313 -313
  551. package/dist/session/generate.js +2 -2
  552. package/dist/session/history.js +77 -77
  553. package/dist/session/inbox.js +77 -77
  554. package/dist/session/info.js +92 -92
  555. package/dist/session/instruction-entry.js +73 -73
  556. package/dist/session/instruction-state.js +10 -10
  557. package/dist/session/instructions.js +101 -101
  558. package/dist/session/message-updater.js +4 -4
  559. package/dist/session/message.js +2 -2
  560. package/dist/session/model-request.js +138 -138
  561. package/dist/session/model-transport.js +5 -5
  562. package/dist/session/projector.js +90 -90
  563. package/dist/session/prompt-cache-diagnostics.js +2 -2
  564. package/dist/session/revert.js +90 -90
  565. package/dist/session/run-coordinator.js +2 -2
  566. package/dist/session/runner/index.js +84 -84
  567. package/dist/session/runner/llm.js +319 -319
  568. package/dist/session/runner/max-steps.js +2 -2
  569. package/dist/session/runner/model.js +83 -83
  570. package/dist/session/runner/publish-llm-event.js +4 -4
  571. package/dist/session/runner/retry.js +72 -72
  572. package/dist/session/runner/step.js +147 -147
  573. package/dist/session/runner/to-llm-message.js +2 -2
  574. package/dist/session/schema.js +2 -2
  575. package/dist/session/sql.js +6 -6
  576. package/dist/session/stats.js +71 -71
  577. package/dist/session/store.js +100 -100
  578. package/dist/session/system-prompt.js +2 -2
  579. package/dist/session/title.js +140 -140
  580. package/dist/session/to-session-error.js +116 -116
  581. package/dist/session/transfer.js +160 -160
  582. package/dist/session/usage.js +2 -2
  583. package/dist/session.js +156 -156
  584. package/dist/shell/parse.js +9 -6
  585. package/dist/shell/parser-wasm.bun.js +1 -1
  586. package/dist/shell/parser-wasm.node.js +1 -1
  587. package/dist/shell/parser-wasm.workerd.js +1 -1
  588. package/dist/shell/scan.js +1084 -365
  589. package/dist/shell/select.js +4 -4
  590. package/dist/shell.js +99 -99
  591. package/dist/skill/discovery.js +3 -3
  592. package/dist/skill/instructions.js +107 -107
  593. package/dist/skill.js +106 -106
  594. package/dist/snapshot.js +85 -85
  595. package/dist/state.js +2 -2
  596. package/dist/tool/html-markdown.js +2 -2
  597. package/dist/tool/http-body.js +2 -2
  598. package/dist/tool/mcp.js +127 -127
  599. package/dist/tool/plugin/edit.js +115 -115
  600. package/dist/tool/plugin/file-diff.js +2 -2
  601. package/dist/tool/plugin/glob.js +117 -117
  602. package/dist/tool/plugin/grep.js +117 -117
  603. package/dist/tool/plugin/patch.js +115 -115
  604. package/dist/tool/plugin/question.js +107 -107
  605. package/dist/tool/plugin/read.js +120 -120
  606. package/dist/tool/plugin/shell.js +186 -186
  607. package/dist/tool/plugin/skill.js +107 -107
  608. package/dist/tool/plugin/subagent.js +183 -183
  609. package/dist/tool/plugin/webfetch.js +108 -108
  610. package/dist/tool/plugin/websearch.js +110 -110
  611. package/dist/tool/plugin/write.js +115 -115
  612. package/dist/tool/read-filesystem.js +98 -98
  613. package/dist/tool/runtime.js +2 -2
  614. package/dist/tool-output.js +5 -5
  615. package/dist/tool.js +120 -120
  616. package/dist/types/shell/parse.d.ts +8 -6
  617. package/dist/types/shell/scan.d.ts +6 -3
  618. package/dist/util/array.js +1 -1
  619. package/dist/util/error.js +2 -2
  620. package/dist/util/identifier.js +1 -1
  621. package/dist/util/iife.js +2 -2
  622. package/dist/util/lazy.js +2 -2
  623. package/dist/util/process-lock-ffi.bun.js +1 -1
  624. package/dist/util/process-lock-ffi.node.js +1 -1
  625. package/dist/util/process-lock-ffi.workerd.js +1 -1
  626. package/dist/util/process-lock.js +1 -1
  627. package/dist/util/slug.js +2 -2
  628. package/dist/util/token.js +2 -2
  629. package/dist/util/which.js +2 -2
  630. package/dist/util/wildcard.js +2 -2
  631. package/dist/v1/config/agent.js +4 -4
  632. package/dist/v1/config/attachment.js +3 -3
  633. package/dist/v1/config/command.js +2 -2
  634. package/dist/v1/config/config.js +15 -15
  635. package/dist/v1/config/error.js +3 -3
  636. package/dist/v1/config/formatter.js +2 -2
  637. package/dist/v1/config/layout.js +2 -2
  638. package/dist/v1/config/lsp.js +2 -2
  639. package/dist/v1/config/mcp.js +3 -3
  640. package/dist/v1/config/migrate.js +19 -19
  641. package/dist/v1/config/permission.js +2 -2
  642. package/dist/v1/config/plugin.js +2 -2
  643. package/dist/v1/config/provider-options.js +2 -2
  644. package/dist/v1/config/provider.js +3 -3
  645. package/dist/v1/config/server.js +3 -3
  646. package/dist/v1/config/skills.js +2 -2
  647. package/dist/v1/permission.js +1 -1
  648. package/dist/vcs/patch.js +2 -2
  649. package/dist/vcs.js +86 -86
  650. package/dist/websearch.js +73 -73
  651. package/dist/wellknown/plugin.js +73 -73
  652. package/dist/wellknown.js +72 -72
  653. package/dist/workspace/driver.js +2 -2
  654. package/dist/workspace/sql.js +2 -2
  655. package/dist/workspace.js +69 -69
  656. package/dist/worktree/directory.js +3 -3
  657. package/dist/worktree/git.js +7 -7
  658. package/dist/worktree/sql.js +6 -6
  659. package/dist/worktree.js +87 -87
  660. package/package.json +8 -8
  661. package/dist/chunks/repository-nv9gjhyw.js +0 -712
  662. /package/dist/chunks/{repository-0cgt0xh2.js → command-0cgt0xh2.js} +0 -0
  663. /package/dist/chunks/{repository-0f48qthw.js → command-0f48qthw.js} +0 -0
  664. /package/dist/chunks/{repository-0zz82cjq.js → command-0zz82cjq.js} +0 -0
  665. /package/dist/chunks/{repository-1fb7bmpf.js → command-1fb7bmpf.js} +0 -0
  666. /package/dist/chunks/{repository-1wcz8fvj.js → command-1wcz8fvj.js} +0 -0
  667. /package/dist/chunks/{repository-29n7vfk2.js → command-29n7vfk2.js} +0 -0
  668. /package/dist/chunks/{repository-2qdx6zz3.js → command-2qdx6zz3.js} +0 -0
  669. /package/dist/chunks/{repository-2xb0r1c6.js → command-2xb0r1c6.js} +0 -0
  670. /package/dist/chunks/{repository-39ktntah.js → command-39ktntah.js} +0 -0
  671. /package/dist/chunks/{repository-3g3rpp2x.js → command-3g3rpp2x.js} +0 -0
  672. /package/dist/chunks/{repository-3q6gbwmd.js → command-3q6gbwmd.js} +0 -0
  673. /package/dist/chunks/{repository-3w3ybtfd.js → command-3w3ybtfd.js} +0 -0
  674. /package/dist/chunks/{repository-47ty4mvs.js → command-47ty4mvs.js} +0 -0
  675. /package/dist/chunks/{repository-4b2tz2m9.js → command-4b2tz2m9.js} +0 -0
  676. /package/dist/chunks/{repository-5a5ch9ts.js → command-5a5ch9ts.js} +0 -0
  677. /package/dist/chunks/{repository-5va1yh78.js → command-5va1yh78.js} +0 -0
  678. /package/dist/chunks/{repository-61ek4hj9.js → command-61ek4hj9.js} +0 -0
  679. /package/dist/chunks/{repository-69qrqpw0.js → command-69qrqpw0.js} +0 -0
  680. /package/dist/chunks/{repository-6zqxzw0a.js → command-6zqxzw0a.js} +0 -0
  681. /package/dist/chunks/{repository-7n9qwqk4.js → command-7n9qwqk4.js} +0 -0
  682. /package/dist/chunks/{repository-8nn8kqcn.js → command-8nn8kqcn.js} +0 -0
  683. /package/dist/chunks/{repository-8rpfd2h6.js → command-8rpfd2h6.js} +0 -0
  684. /package/dist/chunks/{repository-8sj3ajy5.js → command-8sj3ajy5.js} +0 -0
  685. /package/dist/chunks/{repository-8w9tzfz1.js → command-8w9tzfz1.js} +0 -0
  686. /package/dist/chunks/{repository-906y0b6d.js → command-906y0b6d.js} +0 -0
  687. /package/dist/chunks/{repository-9dct5xhx.js → command-9dct5xhx.js} +0 -0
  688. /package/dist/chunks/{repository-9sdtsapf.js → command-9sdtsapf.js} +0 -0
  689. /package/dist/chunks/{repository-a02svayp.js → command-a02svayp.js} +0 -0
  690. /package/dist/chunks/{repository-a83yvq99.js → command-a83yvq99.js} +0 -0
  691. /package/dist/chunks/{repository-ayevdmef.js → command-ayevdmef.js} +0 -0
  692. /package/dist/chunks/{repository-b02txbh8.js → command-b02txbh8.js} +0 -0
  693. /package/dist/chunks/{repository-bbqs2y60.js → command-bbqs2y60.js} +0 -0
  694. /package/dist/chunks/{repository-bjwj8hwv.js → command-bjwj8hwv.js} +0 -0
  695. /package/dist/chunks/{repository-brsh5f65.js → command-brsh5f65.js} +0 -0
  696. /package/dist/chunks/{repository-bxdhjb3y.js → command-bxdhjb3y.js} +0 -0
  697. /package/dist/chunks/{repository-c77ad0vh.js → command-c77ad0vh.js} +0 -0
  698. /package/dist/chunks/{repository-ck5pgha0.js → command-ck5pgha0.js} +0 -0
  699. /package/dist/chunks/{repository-cm67rqy2.js → command-cm67rqy2.js} +0 -0
  700. /package/dist/chunks/{repository-df3v2q6j.js → command-df3v2q6j.js} +0 -0
  701. /package/dist/chunks/{repository-dhcq6c44.js → command-dhcq6c44.js} +0 -0
  702. /package/dist/chunks/{repository-dht5baf0.js → command-dht5baf0.js} +0 -0
  703. /package/dist/chunks/{repository-dkmkay92.js → command-dkmkay92.js} +0 -0
  704. /package/dist/chunks/{repository-drean1vx.js → command-drean1vx.js} +0 -0
  705. /package/dist/chunks/{repository-ehj9csmv.js → command-ehj9csmv.js} +0 -0
  706. /package/dist/chunks/{repository-em6xpscd.js → command-em6xpscd.js} +0 -0
  707. /package/dist/chunks/{repository-emmqknsm.js → command-emmqknsm.js} +0 -0
  708. /package/dist/chunks/{repository-ezs3tagn.js → command-ezs3tagn.js} +0 -0
  709. /package/dist/chunks/{repository-f14r7hfz.js → command-f14r7hfz.js} +0 -0
  710. /package/dist/chunks/{repository-f4cp4g4a.js → command-f4cp4g4a.js} +0 -0
  711. /package/dist/chunks/{repository-faypg4r1.js → command-faypg4r1.js} +0 -0
  712. /package/dist/chunks/{repository-fgbfdq62.js → command-fgbfdq62.js} +0 -0
  713. /package/dist/chunks/{repository-gd5xeqc2.js → command-gd5xeqc2.js} +0 -0
  714. /package/dist/chunks/{repository-ghm4673n.js → command-ghm4673n.js} +0 -0
  715. /package/dist/chunks/{repository-ghwjy7my.js → command-ghwjy7my.js} +0 -0
  716. /package/dist/chunks/{repository-gqn2zsfg.js → command-gqn2zsfg.js} +0 -0
  717. /package/dist/chunks/{repository-gy500k2r.js → command-gy500k2r.js} +0 -0
  718. /package/dist/chunks/{repository-h846wrk2.js → command-h846wrk2.js} +0 -0
  719. /package/dist/chunks/{repository-hzeg9cfr.js → command-hzeg9cfr.js} +0 -0
  720. /package/dist/chunks/{repository-j07kk359.js → command-j07kk359.js} +0 -0
  721. /package/dist/chunks/{repository-jve7t217.js → command-jve7t217.js} +0 -0
  722. /package/dist/chunks/{repository-k3e42drn.js → command-k3e42drn.js} +0 -0
  723. /package/dist/chunks/{repository-k8b45nas.js → command-k8b45nas.js} +0 -0
  724. /package/dist/chunks/{repository-kcacmy5c.js → command-kcacmy5c.js} +0 -0
  725. /package/dist/chunks/{repository-kpdbz7gn.js → command-kpdbz7gn.js} +0 -0
  726. /package/dist/chunks/{repository-kxy11nzk.js → command-kxy11nzk.js} +0 -0
  727. /package/dist/chunks/{repository-kyyqvx4s.js → command-kyyqvx4s.js} +0 -0
  728. /package/dist/chunks/{repository-m8cbvarh.js → command-m8cbvarh.js} +0 -0
  729. /package/dist/chunks/{repository-ma60vzgv.js → command-ma60vzgv.js} +0 -0
  730. /package/dist/chunks/{repository-n3m50c2t.js → command-n3m50c2t.js} +0 -0
  731. /package/dist/chunks/{repository-nkm1m8dz.js → command-nkm1m8dz.js} +0 -0
  732. /package/dist/chunks/{repository-nsc0c3zb.js → command-nsc0c3zb.js} +0 -0
  733. /package/dist/chunks/{repository-qaarhjrp.js → command-qaarhjrp.js} +0 -0
  734. /package/dist/chunks/{repository-qc167nrn.js → command-qc167nrn.js} +0 -0
  735. /package/dist/chunks/{repository-qp95y4jb.js → command-qp95y4jb.js} +0 -0
  736. /package/dist/chunks/{repository-r8f4w671.js → command-r8f4w671.js} +0 -0
  737. /package/dist/chunks/{repository-rdfev9jy.js → command-rdfev9jy.js} +0 -0
  738. /package/dist/chunks/{repository-rvfvac9x.js → command-rvfvac9x.js} +0 -0
  739. /package/dist/chunks/{repository-s7whb9gt.js → command-s7whb9gt.js} +0 -0
  740. /package/dist/chunks/{repository-se76j685.js → command-se76j685.js} +0 -0
  741. /package/dist/chunks/{repository-sem2g21k.js → command-sem2g21k.js} +0 -0
  742. /package/dist/chunks/{repository-sp575ygv.js → command-sp575ygv.js} +0 -0
  743. /package/dist/chunks/{repository-tmb1f636.js → command-tmb1f636.js} +0 -0
  744. /package/dist/chunks/{repository-ttxf0gsy.js → command-ttxf0gsy.js} +0 -0
  745. /package/dist/chunks/{repository-tvmhrvfj.js → command-tvmhrvfj.js} +0 -0
  746. /package/dist/chunks/{repository-v2adqbbe.js → command-v2adqbbe.js} +0 -0
  747. /package/dist/chunks/{repository-wj4sxzqa.js → command-wj4sxzqa.js} +0 -0
  748. /package/dist/chunks/{repository-wwntjmk1.js → command-wwntjmk1.js} +0 -0
  749. /package/dist/chunks/{repository-wyqjaaa5.js → command-wyqjaaa5.js} +0 -0
  750. /package/dist/chunks/{repository-x4q807cx.js → command-x4q807cx.js} +0 -0
  751. /package/dist/chunks/{repository-xt0068v8.js → command-xt0068v8.js} +0 -0
  752. /package/dist/chunks/{repository-yrqrg4vp.js → command-yrqrg4vp.js} +0 -0
  753. /package/dist/chunks/{repository-z47nswr2.js → command-z47nswr2.js} +0 -0
  754. /package/dist/chunks/{repository-zsf8rs93.js → command-zsf8rs93.js} +0 -0
@@ -1,712 +0,0 @@
1
- import {
2
- exports_select
3
- } from "./repository-csrx180a.js";
4
- import {
5
- __export,
6
- __require
7
- } from "./repository-rvfvac9x.js";
8
-
9
- // src/shell/parse.ts
10
- var exports_parse = {};
11
- __export(exports_parse, {
12
- scan: () => scan,
13
- ShellParse: () => exports_parse
14
- });
15
- import { Effect } from "effect";
16
- import { fileURLToPath } from "url";
17
- import os from "os";
18
- import path from "path";
19
- import { shellParserWasm } from "#shell-parser-wasm";
20
- var CWD = new Set(["cd", "chdir", "popd", "pushd", "push-location", "set-location"]);
21
- var POWERSHELL_PATH_FLAGS = new Set(["-literalpath", "-path"]);
22
- var ARITY = {
23
- cat: 1,
24
- cd: 1,
25
- chmod: 1,
26
- chown: 1,
27
- cp: 1,
28
- echo: 1,
29
- env: 1,
30
- export: 1,
31
- grep: 1,
32
- kill: 1,
33
- killall: 1,
34
- ln: 1,
35
- ls: 1,
36
- mkdir: 1,
37
- mv: 1,
38
- ps: 1,
39
- pwd: 1,
40
- rm: 1,
41
- rmdir: 1,
42
- sleep: 1,
43
- source: 1,
44
- tail: 1,
45
- touch: 1,
46
- unset: 1,
47
- which: 1,
48
- aws: 3,
49
- az: 3,
50
- bazel: 2,
51
- brew: 2,
52
- bun: 2,
53
- "bun run": 3,
54
- "bun x": 3,
55
- cargo: 2,
56
- "cargo add": 3,
57
- "cargo run": 3,
58
- cdk: 2,
59
- cf: 2,
60
- cmake: 2,
61
- composer: 2,
62
- consul: 2,
63
- "consul kv": 3,
64
- crictl: 2,
65
- deno: 2,
66
- "deno task": 3,
67
- doctl: 3,
68
- docker: 2,
69
- "docker builder": 3,
70
- "docker compose": 3,
71
- "docker container": 3,
72
- "docker image": 3,
73
- "docker network": 3,
74
- "docker volume": 3,
75
- eksctl: 2,
76
- "eksctl create": 3,
77
- firebase: 2,
78
- flyctl: 2,
79
- gcloud: 3,
80
- gh: 3,
81
- git: 2,
82
- "git config": 3,
83
- "git remote": 3,
84
- "git stash": 3,
85
- go: 2,
86
- gradle: 2,
87
- helm: 2,
88
- heroku: 2,
89
- hugo: 2,
90
- ip: 2,
91
- "ip addr": 3,
92
- "ip link": 3,
93
- "ip netns": 3,
94
- "ip route": 3,
95
- kind: 2,
96
- "kind create": 3,
97
- kubectl: 2,
98
- "kubectl kustomize": 3,
99
- "kubectl rollout": 3,
100
- kustomize: 2,
101
- make: 2,
102
- mc: 2,
103
- "mc admin": 3,
104
- minikube: 2,
105
- mongosh: 2,
106
- mysql: 2,
107
- mvn: 2,
108
- ng: 2,
109
- npm: 2,
110
- "npm exec": 3,
111
- "npm init": 3,
112
- "npm run": 3,
113
- "npm view": 3,
114
- npx: 2,
115
- nvm: 2,
116
- nx: 2,
117
- openssl: 2,
118
- "openssl req": 3,
119
- "openssl x509": 3,
120
- pip: 2,
121
- pipenv: 2,
122
- pnpm: 2,
123
- "pnpm dlx": 3,
124
- "pnpm exec": 3,
125
- "pnpm run": 3,
126
- poetry: 2,
127
- podman: 2,
128
- "podman container": 3,
129
- "podman image": 3,
130
- psql: 2,
131
- pulumi: 2,
132
- "pulumi stack": 3,
133
- python: 2,
134
- pyenv: 2,
135
- rake: 2,
136
- rbenv: 2,
137
- "redis-cli": 2,
138
- rustup: 2,
139
- serverless: 2,
140
- sfdx: 3,
141
- skaffold: 2,
142
- sls: 2,
143
- sst: 2,
144
- swift: 2,
145
- systemctl: 2,
146
- terraform: 2,
147
- "terraform workspace": 3,
148
- tmux: 2,
149
- turbo: 2,
150
- ufw: 2,
151
- vault: 2,
152
- "vault auth": 3,
153
- "vault kv": 3,
154
- vercel: 2,
155
- volta: 2,
156
- wp: 2,
157
- yarn: 2,
158
- "yarn dlx": 3,
159
- "yarn run": 3
160
- };
161
- var scan = Effect.fnUntraced(function* (command, shell, cwd, options) {
162
- if (options?.portable)
163
- return yield* Effect.promise(() => scanPortable(command, shell, cwd));
164
- return yield* scanLegacy(command, shell, cwd);
165
- });
166
- var scanLegacy = Effect.fnUntraced(function* (command, shell, cwd) {
167
- const parsers = yield* Effect.promise(load);
168
- const powershell = exports_select.ps(shell);
169
- const tree = (powershell ? parsers.ps : parsers.bash).parse(command);
170
- if (!tree)
171
- return yield* Effect.fail(new Error("Failed to parse shell command"));
172
- return yield* Effect.acquireUseRelease(Effect.succeed(tree), (tree2) => Effect.sync(() => tree2.rootNode.descendantsOfType("command").reduce((result, node) => {
173
- if (!node)
174
- return result;
175
- const command2 = parts(node);
176
- const tokens = command2.map((part) => part.text);
177
- if (tokens.length === 0)
178
- return result;
179
- const name = powershell ? tokens[0].toLowerCase() : tokens[0];
180
- if (CWD.has(name)) {
181
- result.directories.push(...directoryArgs(command2, powershell, cwd, shell));
182
- return result;
183
- }
184
- result.commands.push({
185
- resource: (node.parent?.type === "redirected_statement" ? node.parent.text : node.text).trim(),
186
- save: `${prefix(tokens).join(" ")} *`
187
- });
188
- return result;
189
- }, { commands: [], directories: [] })), (tree2) => Effect.sync(() => tree2.delete()));
190
- });
191
- async function scanPortable(command, shell, cwd) {
192
- const { ShellScan } = await import("../shell/scan.js");
193
- const powershell = exports_select.ps(shell);
194
- const result = powershell ? ShellScan.scanPowerShell(command) : ShellScan.scan(command);
195
- if (result.kind === "opaque")
196
- return { commands: [{ resource: command, save: command }], directories: [] };
197
- const carriage = powershell ? command.search(/\r(?!\n)/) : -1;
198
- if (carriage >= 0)
199
- return { commands: [], directories: [] };
200
- const parsed = result.commands.reduce((output, item) => {
201
- const index = item[ShellScan.Nested] ? -1 : command.indexOf(item.resource, output.cursor);
202
- const offset = item[ShellScan.Nested] ? command.lastIndexOf(item.resource, output.cursor - 1) : index < 0 ? command.indexOf(item.resource) : index;
203
- if (index >= 0)
204
- output.cursor = index + item.resource.length;
205
- const before = command.slice(0, Math.max(0, offset));
206
- const name = powershell ? item.words[0]?.toLowerCase() : item.words[0];
207
- if (!name)
208
- return output;
209
- if (powershell && name === "<")
210
- return output;
211
- if (powershell && name === "foreach-object" && item.words.some((word) => word.startsWith("{")) && !/\|\s*$/.test(before))
212
- return output;
213
- const tokens = powershell ? powerShellSourceTokens(item.resource) : sourceTokens(item.resource);
214
- const sourceHead = powershell ? item.words[0] : tokens.find((token) => token.value === item.words[0])?.raw;
215
- if (CWD.has(name) && (powershell || sourceHead === item.words[0])) {
216
- output.directories.push(...portableDirectoryArgs(item.words, tokens, powershell, cwd, shell));
217
- return output;
218
- }
219
- const save = powershell ? powerShellSourcePrefix(tokens, item.words) : bashSourcePrefix(tokens, item.words);
220
- output.commands.push({
221
- resource: powershell ? item.resource : bashResource(item.resource, before),
222
- save: `${save} *`
223
- });
224
- return output;
225
- }, {
226
- commands: [],
227
- directories: [],
228
- cursor: 0
229
- });
230
- return { commands: parsed.commands, directories: parsed.directories };
231
- }
232
- function bashResource(resource, before) {
233
- if (!/(?:&&|\|\||\|&)\s*$|\|\s*$/.test(before))
234
- return resource;
235
- const redirect = bashRedirect(resource);
236
- return redirect < 0 ? resource : resource.slice(0, redirect).replace(/\d+$/, "").trim();
237
- }
238
- function bashRedirect(resource) {
239
- let quote;
240
- for (let index = 0;index < resource.length; index++) {
241
- const char = resource[index];
242
- if (quote === "single") {
243
- if (char === "'")
244
- quote = undefined;
245
- continue;
246
- }
247
- if (char === "\\") {
248
- index++;
249
- continue;
250
- }
251
- if (char === '"') {
252
- quote = quote === "double" ? undefined : "double";
253
- continue;
254
- }
255
- if (quote === "double") {
256
- if (char === "$" && resource[index + 1] === "(")
257
- index = bashParenthesizedEnd(resource, index + 1);
258
- else if (char === "`")
259
- index = bashBacktickEnd(resource, index);
260
- continue;
261
- }
262
- if (char === "'") {
263
- quote = "single";
264
- continue;
265
- }
266
- if ((char === "$" || char === "<" || char === ">") && resource[index + 1] === "(") {
267
- index = bashParenthesizedEnd(resource, index + 1);
268
- continue;
269
- }
270
- if (char === "`") {
271
- index = bashBacktickEnd(resource, index);
272
- continue;
273
- }
274
- if (char === "<" || char === ">" || char === "&" && resource[index + 1] === ">")
275
- return index;
276
- }
277
- return -1;
278
- }
279
- function bashParenthesizedEnd(resource, start) {
280
- let level = 1;
281
- let quote;
282
- for (let index = start + 1;index < resource.length; index++) {
283
- const char = resource[index];
284
- if (quote === "single") {
285
- if (char === "'")
286
- quote = undefined;
287
- continue;
288
- }
289
- if (char === "\\") {
290
- index++;
291
- continue;
292
- }
293
- if (char === '"') {
294
- quote = quote === "double" ? undefined : "double";
295
- continue;
296
- }
297
- if (quote === "double")
298
- continue;
299
- if (char === "'") {
300
- quote = "single";
301
- continue;
302
- }
303
- if (char === "(")
304
- level++;
305
- if (char === ")" && --level === 0)
306
- return index;
307
- }
308
- return resource.length - 1;
309
- }
310
- function bashBacktickEnd(resource, start) {
311
- for (let index = start + 1;index < resource.length; index++) {
312
- if (resource[index] === "\\")
313
- index++;
314
- else if (resource[index] === "`")
315
- return index;
316
- }
317
- return resource.length - 1;
318
- }
319
- function portableDirectoryArgs(command, tokens, powershell, cwd, shell) {
320
- if (!powershell) {
321
- const start2 = tokens.findIndex((token) => token.value === command[0]);
322
- if (start2 < 0)
323
- return [];
324
- return directoryArgs(tokens.slice(start2).map((token) => ({ type: "word", text: token.raw })), false, cwd, shell);
325
- }
326
- const start = tokens.findIndex((token) => token.value.toLowerCase() === command[0]?.toLowerCase());
327
- if (start < 0)
328
- return [];
329
- const directories = [];
330
- let expectsPath = false;
331
- for (const part of tokens.slice(start + 1).map((token) => token.raw)) {
332
- if (expectsPath) {
333
- const value2 = directoryArgument(part, true, cwd, shell);
334
- if (value2)
335
- directories.push(value2);
336
- expectsPath = false;
337
- continue;
338
- }
339
- if (part.startsWith("-")) {
340
- expectsPath = POWERSHELL_PATH_FLAGS.has(part.toLowerCase());
341
- continue;
342
- }
343
- const value = directoryArgument(part, true, cwd, shell);
344
- if (value)
345
- directories.push(value);
346
- }
347
- return directories;
348
- }
349
- function sourceTokens(resource) {
350
- const tokens = [];
351
- let raw = "";
352
- let value = "";
353
- let quote;
354
- let substitution = 0;
355
- let redirect = false;
356
- const finish = () => {
357
- if (!raw)
358
- return;
359
- if (!redirect)
360
- tokens.push({ raw, value });
361
- raw = "";
362
- value = "";
363
- redirect = false;
364
- };
365
- for (let index = 0;index < resource.length; index++) {
366
- const char = resource[index];
367
- if (quote === "single") {
368
- raw += char;
369
- if (char === "'")
370
- quote = undefined;
371
- else
372
- value += char;
373
- continue;
374
- }
375
- if (quote === "double") {
376
- raw += char;
377
- if (char === '"')
378
- quote = undefined;
379
- else if (char === "\\" && index + 1 < resource.length) {
380
- const next = resource[index + 1];
381
- if ('$`"\\\n'.includes(next)) {
382
- raw += resource[++index];
383
- if (next !== `
384
- `)
385
- value += next;
386
- } else
387
- value += char;
388
- } else
389
- value += char;
390
- continue;
391
- }
392
- if (quote === "backtick") {
393
- raw += char;
394
- value += char;
395
- if (char === "`" && resource[index - 1] !== "\\")
396
- quote = undefined;
397
- continue;
398
- }
399
- if (char === "'") {
400
- raw += char;
401
- quote = "single";
402
- continue;
403
- }
404
- if (char === '"') {
405
- raw += char;
406
- quote = "double";
407
- continue;
408
- }
409
- if (char === "`") {
410
- raw += char;
411
- value += char;
412
- quote = "backtick";
413
- continue;
414
- }
415
- if (char === "\\" && index + 1 < resource.length) {
416
- if (resource[index + 1] === `
417
- `) {
418
- finish();
419
- index++;
420
- continue;
421
- }
422
- if (!raw && /\s/.test(resource[index + 1])) {
423
- index++;
424
- continue;
425
- }
426
- raw += char + resource[++index];
427
- value += resource[index];
428
- continue;
429
- }
430
- if ((char === "<" || char === ">") && resource[index + 1] === "(") {
431
- const end = bashParenthesizedEnd(resource, index + 1);
432
- if (raw) {
433
- raw += resource.slice(index, end + 1);
434
- value += resource.slice(index, end + 1);
435
- }
436
- index = end;
437
- continue;
438
- }
439
- if (char === "$" && resource[index + 1] === "(")
440
- substitution++;
441
- if (char === ")" && substitution > 0)
442
- substitution--;
443
- if (substitution === 0 && /\s/.test(char)) {
444
- finish();
445
- continue;
446
- }
447
- if (substitution === 0 && (char === "<" || char === ">" || char === "&" && resource[index + 1] === ">")) {
448
- if (/^\d+$/.test(value)) {
449
- raw = "";
450
- value = "";
451
- } else
452
- finish();
453
- redirect = true;
454
- if (char === "&")
455
- index++;
456
- while (/[<>&|]/.test(resource[index + 1] ?? ""))
457
- index++;
458
- continue;
459
- }
460
- raw += char;
461
- value += char;
462
- }
463
- finish();
464
- return tokens;
465
- }
466
- function bashSourcePrefix(tokens, words) {
467
- const start = tokens.findIndex((token) => token.value === words[0]);
468
- if (start < 0) {
469
- const command = tokens.findIndex((token) => !/^[A-Za-z_][A-Za-z0-9_]*\+?=/.test(token.raw));
470
- return prefix(tokens.slice(Math.max(0, command)).map((token) => token.raw)).join(" ");
471
- }
472
- const source = tokens.slice(start).map((token) => token.raw).filter((token) => !/^\$\([\s\S]*\)$/.test(token) && !/^`[\s\S]*`$/.test(token));
473
- return prefix(source).join(" ");
474
- }
475
- function powerShellSourcePrefix(tokens, words) {
476
- const start = tokens.findIndex((token) => token.value.toLowerCase() === words[0]?.toLowerCase());
477
- if (start < 0)
478
- return prefix(words).join(" ");
479
- return prefix(tokens.slice(start).map((token) => token.raw)).join(" ");
480
- }
481
- function powerShellSourceTokens(resource) {
482
- const tokens = [];
483
- let raw = "";
484
- let value = "";
485
- let quote;
486
- let redirect = false;
487
- const finish = () => {
488
- if (!raw)
489
- return;
490
- if (!redirect)
491
- tokens.push({ raw, value });
492
- raw = "";
493
- value = "";
494
- redirect = false;
495
- };
496
- for (let index = 0;index < resource.length; index++) {
497
- const char = resource[index];
498
- if (quote === "single") {
499
- raw += char;
500
- if (char === "'" && resource[index + 1] === "'") {
501
- raw += resource[++index];
502
- value += "'";
503
- } else if (char === "'")
504
- quote = undefined;
505
- else
506
- value += char;
507
- continue;
508
- }
509
- if (quote === "double") {
510
- raw += char;
511
- if (char === '"')
512
- quote = undefined;
513
- else if (char === "`" && index + 1 < resource.length) {
514
- raw += resource[++index];
515
- value += resource[index];
516
- } else
517
- value += char;
518
- continue;
519
- }
520
- if (char === "'") {
521
- raw += char;
522
- quote = "single";
523
- continue;
524
- }
525
- if (char === '"') {
526
- raw += char;
527
- quote = "double";
528
- continue;
529
- }
530
- if (char === "`" && index + 1 < resource.length) {
531
- raw += char + resource[++index];
532
- if (resource[index] !== `
533
- ` && resource[index] !== "\r")
534
- value += resource[index];
535
- continue;
536
- }
537
- if (char === "{" && !raw) {
538
- const end = powerShellBracedEnd(resource, index);
539
- raw = resource.slice(index, end + 1);
540
- value = raw;
541
- index = end;
542
- continue;
543
- }
544
- if (/\s/.test(char)) {
545
- finish();
546
- continue;
547
- }
548
- if (char === ">") {
549
- if (resource[index + 1] && !/[\s>&]/.test(resource[index + 1])) {
550
- raw += char;
551
- value += char;
552
- continue;
553
- }
554
- if (/^\d+$/.test(value)) {
555
- raw = "";
556
- value = "";
557
- } else if (raw === "*") {
558
- raw = "";
559
- value = "";
560
- } else
561
- finish();
562
- redirect = true;
563
- while (/[>&\d]/.test(resource[index + 1] ?? ""))
564
- index++;
565
- continue;
566
- }
567
- if ((char === "&" || char === ".") && !raw && tokens.length === 0)
568
- continue;
569
- raw += char;
570
- value += char;
571
- }
572
- finish();
573
- return tokens;
574
- }
575
- function powerShellBracedEnd(resource, start) {
576
- let level = 1;
577
- let quote;
578
- for (let index = start + 1;index < resource.length; index++) {
579
- const char = resource[index];
580
- if (char === "`" && quote !== "single") {
581
- index++;
582
- continue;
583
- }
584
- if (quote === "single") {
585
- if (char === "'" && resource[index + 1] === "'")
586
- index++;
587
- else if (char === "'")
588
- quote = undefined;
589
- continue;
590
- }
591
- if (quote === "double") {
592
- if (char === '"')
593
- quote = undefined;
594
- continue;
595
- }
596
- if (char === "'") {
597
- quote = "single";
598
- continue;
599
- }
600
- if (char === '"') {
601
- quote = "double";
602
- continue;
603
- }
604
- if (char === "{")
605
- level++;
606
- if (char === "}" && --level === 0)
607
- return index;
608
- }
609
- return resource.length - 1;
610
- }
611
- function parts(node) {
612
- return Array.from({ length: node.childCount }).flatMap((_, index) => {
613
- const child = node.child(index);
614
- if (!child)
615
- return [];
616
- if (child.type === "command_elements")
617
- return Array.from({ length: child.childCount }).flatMap((_2, itemIndex) => {
618
- const item = child.child(itemIndex);
619
- if (!item || item.type === "command_argument_sep" || item.type === "redirection")
620
- return [];
621
- return [{ type: item.type, text: item.text }];
622
- });
623
- if (!["command_name", "command_name_expr", "word", "string", "raw_string", "concatenation"].includes(child.type))
624
- return [];
625
- return [{ type: child.type, text: child.text }];
626
- });
627
- }
628
- function directoryArgs(command, powershell, cwd, shell) {
629
- if (!powershell)
630
- return command.slice(1).filter((part) => !part.text.startsWith("-")).map((part) => directoryArgument(part.text, powershell, cwd, shell)).filter((part) => part !== undefined);
631
- const directories = [];
632
- let path2 = false;
633
- for (const part of command.slice(1)) {
634
- if (path2) {
635
- const value2 = directoryArgument(part.text, powershell, cwd, shell);
636
- if (value2)
637
- directories.push(value2);
638
- path2 = false;
639
- continue;
640
- }
641
- if (part.type === "command_parameter") {
642
- path2 = POWERSHELL_PATH_FLAGS.has(part.text.toLowerCase());
643
- continue;
644
- }
645
- const value = directoryArgument(part.text, powershell, cwd, shell);
646
- if (value)
647
- directories.push(value);
648
- }
649
- return directories;
650
- }
651
- function directoryArgument(value, powershell, cwd, shell) {
652
- const quote = value[0];
653
- const text = (quote === '"' || quote === "'") && value.at(-1) === quote ? value.slice(1, -1) : value;
654
- if (!powershell)
655
- return expandKnownDirectory(text);
656
- return expandKnownDirectory(text.replace(/\$\{env:([^}]+)\}/gi, (_, key) => environment(key) ?? "").replace(/\$env:([A-Za-z_][A-Za-z0-9_]*)/gi, (_, key) => environment(key) ?? "").replace(/\$(HOME|PWD|PSHOME)(?=$|[\\/])/gi, (_, key) => {
657
- if (key.toUpperCase() === "HOME")
658
- return os.homedir();
659
- if (key.toUpperCase() === "PWD")
660
- return cwd;
661
- return path.dirname(shell);
662
- }));
663
- }
664
- function expandKnownDirectory(value) {
665
- if (value.includes("$") || value.includes("`") || value.startsWith("("))
666
- return;
667
- if (value === "~")
668
- return os.homedir();
669
- if (value.startsWith("~/") || value.startsWith("~\\"))
670
- return path.join(os.homedir(), value.slice(2));
671
- return value;
672
- }
673
- function environment(key) {
674
- if (process.platform !== "win32")
675
- return process.env[key];
676
- const name = Object.keys(process.env).find((item) => item.toLowerCase() === key.toLowerCase());
677
- return name ? process.env[name] : undefined;
678
- }
679
- function prefix(tokens) {
680
- for (let length = tokens.length;length > 0; length--) {
681
- const arity = ARITY[tokens.slice(0, length).join(" ")];
682
- if (arity !== undefined)
683
- return tokens.slice(0, arity);
684
- }
685
- return tokens.slice(0, 1);
686
- }
687
- function resolve(asset) {
688
- if (asset.startsWith("file://"))
689
- return fileURLToPath(asset);
690
- if (path.isAbsolute(asset))
691
- return asset;
692
- return fileURLToPath(new URL(asset, import.meta.url));
693
- }
694
- var load = (() => {
695
- let loading;
696
- return () => loading ??= initialize();
697
- })();
698
- async function initialize() {
699
- const { Parser, Language } = await import("web-tree-sitter");
700
- await Parser.init({ locateFile: () => resolve(shellParserWasm.runtime) });
701
- const [bashLanguage, psLanguage] = await Promise.all([
702
- Language.load(resolve(shellParserWasm.bash)),
703
- Language.load(resolve(shellParserWasm.powershell))
704
- ]);
705
- const bash = new Parser;
706
- bash.setLanguage(bashLanguage);
707
- const ps = new Parser;
708
- ps.setLanguage(psLanguage);
709
- return { bash, ps };
710
- }
711
-
712
- export { scan, exports_parse };