diffing 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/README.md +185 -4
  2. package/dist/{cli-agent-Vbs-ePHv.mjs → cli-agent-KxNAFIPf.mjs} +8 -1
  3. package/dist/cli-gh-CDGSpndZ.mjs +147 -0
  4. package/dist/cli.mjs +1594 -68
  5. package/dist/client/assets/{angular-html-fdYbuxHF.js → angular-html-DbbrJavS.js} +1 -1
  6. package/dist/client/assets/{angular-ts-D3iFqR-R.js → angular-ts-tCrxb1ht.js} +1 -1
  7. package/dist/client/assets/{apl-MnBV-iQN.js → apl-DawII0w7.js} +1 -1
  8. package/dist/client/assets/arc-DIRV7ZXr.js +1 -0
  9. package/dist/client/assets/architecture-7EHR7CIX-BM5HxebS.js +1 -0
  10. package/dist/client/assets/architectureDiagram-3BPJPVTR-3IoH78OV.js +36 -0
  11. package/dist/client/assets/array-CkF66D10.js +1 -0
  12. package/dist/client/assets/{astro-BrpK01E7.js → astro-DIyGTFXc.js} +1 -1
  13. package/dist/client/assets/{blade-CGmyBuwD.js → blade-CuF4Z1mP.js} +1 -1
  14. package/dist/client/assets/blockDiagram-GPEHLZMM-CFxPndC0.js +132 -0
  15. package/dist/client/assets/{bsl-Dx5tFn3i.js → bsl-BrHd4RA2.js} +1 -1
  16. package/dist/client/assets/{c-xQnwtG9Y.js → c-DUrjo9T5.js} +1 -1
  17. package/dist/client/assets/c4Diagram-AAUBKEIU-CGMBnkiv.js +10 -0
  18. package/dist/client/assets/{cairo-wCCQTdA9.js → cairo-BDZ6TRZS.js} +1 -1
  19. package/dist/client/assets/channel-D5AdjEWX.js +1 -0
  20. package/dist/client/assets/chunk-2J33WTMH-CJMBLaXy.js +1 -0
  21. package/dist/client/assets/chunk-3OPIFGDE-C9HQWVLl.js +62 -0
  22. package/dist/client/assets/chunk-4BX2VUAB-Qqg72GQd.js +1 -0
  23. package/dist/client/assets/chunk-4EGX6M5U-C70lfA2p.js +1 -0
  24. package/dist/client/assets/chunk-55IACEB6-DZF8brTR.js +1 -0
  25. package/dist/client/assets/chunk-5DO6E6H7-PprNUwlI.js +1 -0
  26. package/dist/client/assets/chunk-5ZQYHXKU-BflVFV5z.js +2 -0
  27. package/dist/client/assets/chunk-727SXJPM-COn6BRLY.js +206 -0
  28. package/dist/client/assets/chunk-AQP2D5EJ-CNOjODUR.js +231 -0
  29. package/dist/client/assets/chunk-BR22UD5L-D8XCYMy9.js +1 -0
  30. package/dist/client/assets/chunk-BSJP7CBP-PQX4ASCI.js +1 -0
  31. package/dist/client/assets/chunk-CSCIHK7Q-BfmUvL-L.js +124 -0
  32. package/dist/client/assets/chunk-FHYWG6QK-CcHPrHH1.js +1 -0
  33. package/dist/client/assets/chunk-FMBD7UC4-DorfwLnQ.js +15 -0
  34. package/dist/client/assets/chunk-KSCS5N6A-CXY93mId.js +10 -0
  35. package/dist/client/assets/chunk-L5ZTLDWV-BjMrSVmH.js +1 -0
  36. package/dist/client/assets/chunk-LZXEDZCA-q8jj6Nyb.js +2 -0
  37. package/dist/client/assets/chunk-MPE355IW-Bf9yHfDS.js +1 -0
  38. package/dist/client/assets/chunk-MZUSXYTE-CnUIUKI4.js +1 -0
  39. package/dist/client/assets/chunk-N66VUXT2-ahAf9GvV.js +1 -0
  40. package/dist/client/assets/chunk-ND2GUHAM-BRRQbYHl.js +1 -0
  41. package/dist/client/assets/chunk-NNHCCRGN-DHF3V75i.js +159 -0
  42. package/dist/client/assets/chunk-NZK2D7GU-Czt1qHrO.js +1 -0
  43. package/dist/client/assets/chunk-O5CBEL6O-DEopURak.js +70 -0
  44. package/dist/client/assets/chunk-PUPMXCY4-D0KKIhut.js +1 -0
  45. package/dist/client/assets/chunk-QZHKN3VN-BE917fn9.js +1 -0
  46. package/dist/client/assets/chunk-UIBZB4QT-TYsZ_c8u.js +1 -0
  47. package/dist/client/assets/chunk-WCWK7LTN-Dj8SfnMU.js +1 -0
  48. package/dist/client/assets/chunk-WU5MYG2G-DdoWnPla.js +1 -0
  49. package/dist/client/assets/chunk-XPW4576I-DocCoKUT.js +32 -0
  50. package/dist/client/assets/classDiagram-4FO5ZUOK-CxjhKO7s.js +1 -0
  51. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CSScAAQ4.js +1 -0
  52. package/dist/client/assets/{cobol-ypVzOIQu.js → cobol-BylylR2x.js} +1 -1
  53. package/dist/client/assets/{coffee-CrtE1uj2.js → coffee-DCKfk8xx.js} +1 -1
  54. package/dist/client/assets/cose-bilkent-S5V4N54A-Cm0BD5CS.js +1 -0
  55. package/dist/client/assets/{cpp-DLd4XEKA.js → cpp-CfKCIrGK.js} +1 -1
  56. package/dist/client/assets/{crystal-CJYvpLt_.js → crystal-v-9RIu3l.js} +1 -1
  57. package/dist/client/assets/{css-DrX2B9os.js → css-XjlXeGmZ.js} +1 -1
  58. package/dist/client/assets/cytoscape.esm-B7MQoI9k.js +321 -0
  59. package/dist/client/assets/dagre-BM42HDAG-kqgFUaF1.js +4 -0
  60. package/dist/client/assets/dagre-DAhKikc0.js +1 -0
  61. package/dist/client/assets/defaultLocale-B_TxGd0k.js +1 -0
  62. package/dist/client/assets/diagram-2AECGRRQ-B3hBvGUc.js +43 -0
  63. package/dist/client/assets/diagram-5GNKFQAL-r8zU8C-Y.js +10 -0
  64. package/dist/client/assets/diagram-KO2AKTUF-CDWD5zkZ.js +3 -0
  65. package/dist/client/assets/diagram-LMA3HP47-CRRfS6RD.js +24 -0
  66. package/dist/client/assets/diagram-OG6HWLK6-ChBS6E-K.js +24 -0
  67. package/dist/client/assets/dist-DUTeKbN7.js +1 -0
  68. package/dist/client/assets/{edge-BsQYk9OW.js → edge-Cwh953i8.js} +1 -1
  69. package/dist/client/assets/{elixir-DU_VfGYR.js → elixir-C4MgLzTj.js} +1 -1
  70. package/dist/client/assets/{elm-W4eOLEDv.js → elm-CFBu8r7i.js} +1 -1
  71. package/dist/client/assets/erDiagram-TEJ5UH35-_03Fb9RH.js +85 -0
  72. package/dist/client/assets/{erb-D9FdIJ2e.js → erb-CrCna7R1.js} +1 -1
  73. package/dist/client/assets/{erlang-CtK0kQ6z.js → erlang-cuhwpmsu.js} +1 -1
  74. package/dist/client/assets/eventmodeling-FCH6USID-hlXE2E34.js +1 -0
  75. package/dist/client/assets/flowDiagram-I6XJVG4X-D9pSaH_8.js +162 -0
  76. package/dist/client/assets/{fortran-fixed-form-DBM4e0_k.js → fortran-fixed-form-DWr0EnJn.js} +1 -1
  77. package/dist/client/assets/{fsharp-CmzzGQLe.js → fsharp-CQ5iYSPA.js} +1 -1
  78. package/dist/client/assets/ganttDiagram-6RSMTGT7-DKBfXY9D.js +292 -0
  79. package/dist/client/assets/{gdresource-B_wbPqHd.js → gdresource-CN-lsNu5.js} +1 -1
  80. package/dist/client/assets/{git-commit-1z4D6NzL.js → git-commit-6e79eN7Q.js} +1 -1
  81. package/dist/client/assets/{git-rebase-BtPCXjbS.js → git-rebase-CExLk2dD.js} +1 -1
  82. package/dist/client/assets/gitGraph-WXDBUCRP-D_3ZhTam.js +1 -0
  83. package/dist/client/assets/gitGraphDiagram-PVQCEYII-BPQ2kpJA.js +106 -0
  84. package/dist/client/assets/{glimmer-js-BVfUGMUb.js → glimmer-js-wjBSKaMu.js} +1 -1
  85. package/dist/client/assets/{glimmer-ts-BZEaHDZL.js → glimmer-ts-CyjMXDgZ.js} +1 -1
  86. package/dist/client/assets/{glsl-CSiNDuwt.js → glsl-CWOoN8or.js} +1 -1
  87. package/dist/client/assets/graphlib-DBdw4opr.js +1 -0
  88. package/dist/client/assets/{graphql-Crf08Rhb.js → graphql-DI5CB58U.js} +1 -1
  89. package/dist/client/assets/{hack-DUiQuO20.js → hack-Ct_Cm7Pr.js} +1 -1
  90. package/dist/client/assets/{haml-BtvVTDRG.js → haml-DzAjli8d.js} +1 -1
  91. package/dist/client/assets/{handlebars-Bu_cdZA_.js → handlebars-BfJB0RYx.js} +1 -1
  92. package/dist/client/assets/{html-C4cun3zD.js → html-CK8auhK8.js} +1 -1
  93. package/dist/client/assets/{html-derivative-CQnD80KV.js → html-derivative-B7VntYnF.js} +1 -1
  94. package/dist/client/assets/{http-DuOJF9Kg.js → http-_Zy71Sv3.js} +1 -1
  95. package/dist/client/assets/{hurl-DgrdYsYh.js → hurl-VbL4I95z.js} +1 -1
  96. package/dist/client/assets/{hxml-DC4KwKt2.js → hxml-nwJci6H5.js} +1 -1
  97. package/dist/client/assets/index-C3p7VKOX.css +1 -0
  98. package/dist/client/assets/index-Dv9jPmOc.js +3921 -0
  99. package/dist/client/assets/info-J43DQDTF-CAllC7mK.js +1 -0
  100. package/dist/client/assets/infoDiagram-5YYISTIA-B5RN-4Ke.js +2 -0
  101. package/dist/client/assets/init-Ce66tIvf.js +1 -0
  102. package/dist/client/assets/ishikawaDiagram-YF4QCWOH-DpbSX3Zy.js +70 -0
  103. package/dist/client/assets/{java-D-vtFiv8.js → java-0CC2DnK9.js} +1 -1
  104. package/dist/client/assets/{javascript-CFYFXvdN.js → javascript-DKSTP7rz.js} +1 -1
  105. package/dist/client/assets/{jinja-fZvIg2_s.js → jinja-DoGBHNJ6.js} +1 -1
  106. package/dist/client/assets/{jison-DEzxLq5g.js → jison-Bnl3lPA2.js} +1 -1
  107. package/dist/client/assets/journeyDiagram-JHISSGLW-B_X4_qPO.js +139 -0
  108. package/dist/client/assets/{json-QM4VBqMC.js → json-BQ3Ddj6g.js} +1 -1
  109. package/dist/client/assets/{jsx-DLzUM_cC.js → jsx-C_aFDuFZ.js} +1 -1
  110. package/dist/client/assets/{julia-Dwt1SIpn.js → julia-nIjp5yMR.js} +1 -1
  111. package/dist/client/assets/{just-Dwp-hLcL.js → just-zc4yJ46n.js} +1 -1
  112. package/dist/client/assets/kanban-definition-UN3LZRKU-BSs4C5DW.js +89 -0
  113. package/dist/client/assets/katex-eRFNlMh0.js +257 -0
  114. package/dist/client/assets/{latex-CMF1JViz.js → latex-BszBC80j.js} +1 -1
  115. package/dist/client/assets/line-C9HWVwPi.js +1 -0
  116. package/dist/client/assets/linear-DatJfpKY.js +1 -0
  117. package/dist/client/assets/{liquid-czkpOZWY.js → liquid-DglQpTge.js} +1 -1
  118. package/dist/client/assets/{lua-DE5PD0Vh.js → lua-BcbliFeR.js} +1 -1
  119. package/dist/client/assets/{marko-DHeEvZiW.js → marko-BPm4M8j-.js} +1 -1
  120. package/dist/client/assets/{mdc-B941liUQ.js → mdc-BNUj07UF.js} +1 -1
  121. package/dist/client/assets/mermaid-parser.core-BVEKlqQr.js +4 -0
  122. package/dist/client/assets/mermaid.core-DVis21V_.js +9 -0
  123. package/dist/client/assets/mindmap-definition-RKZ34NQL-Cuo7KewF.js +96 -0
  124. package/dist/client/assets/{nextflow-CApkvBGW.js → nextflow-DSfydIxt.js} +1 -1
  125. package/dist/client/assets/{nginx-Pb9t8c-r.js → nginx-CSSJwkd6.js} +1 -1
  126. package/dist/client/assets/{nim-MMUvW_R1.js → nim-nQAskwTR.js} +1 -1
  127. package/dist/client/assets/ordinal-5ziJS8mo.js +1 -0
  128. package/dist/client/assets/packet-YPE3B663-Dy58IAiO.js +1 -0
  129. package/dist/client/assets/path-g3G46IZB.js +1 -0
  130. package/dist/client/assets/{perl-DXwXRmuC.js → perl-CtH8xYH6.js} +1 -1
  131. package/dist/client/assets/{php-D42kv59r.js → php-Dcc3T2PH.js} +1 -1
  132. package/dist/client/assets/pie-LRSECV5Y-FXFFfdz2.js +1 -0
  133. package/dist/client/assets/pieDiagram-4H26LBE5-BfpvCRmo.js +30 -0
  134. package/dist/client/assets/{pug-v0iesski.js → pug-BCLaymlV.js} +1 -1
  135. package/dist/client/assets/{qml-spxQQ-ei.js → qml-BpKydcOi.js} +1 -1
  136. package/dist/client/assets/quadrantDiagram-W4KKPZXB-CJY6un0-.js +7 -0
  137. package/dist/client/assets/{r-CobWTBG9.js → r-BzCB9dpd.js} +1 -1
  138. package/dist/client/assets/radar-GUYGQ44K-BKTzSQ68.js +1 -0
  139. package/dist/client/assets/{razor-B-_Ww3MB.js → razor-BWmujqiQ.js} +1 -1
  140. package/dist/client/assets/{regexp-BJMVs8R0.js → regexp-urCI3YiZ.js} +1 -1
  141. package/dist/client/assets/requirementDiagram-4Y6WPE33-DIHWguS0.js +84 -0
  142. package/dist/client/assets/rough.esm-BBrzuQ0N.js +1 -0
  143. package/dist/client/assets/{rst-BHcaWsY0.js → rst-YTDC9H6u.js} +1 -1
  144. package/dist/client/assets/{ruby-BCMT6kog.js → ruby-v1IXQAFZ.js} +1 -1
  145. package/dist/client/assets/sankeyDiagram-5OEKKPKP-DJRPEO_F.js +40 -0
  146. package/dist/client/assets/{sas-DHfZnd3R.js → sas-KDUG3BSk.js} +1 -1
  147. package/dist/client/assets/{scss-DjDsJvDO.js → scss-pLIGFpjD.js} +1 -1
  148. package/dist/client/assets/sequenceDiagram-3UESZ5HK-DX0jVCOU.js +162 -0
  149. package/dist/client/assets/{shaderlab-DXAhMdPo.js → shaderlab-CbbQwRPF.js} +1 -1
  150. package/dist/client/assets/{shellscript-B6qaIiU-.js → shellscript-B5ZTyEsK.js} +1 -1
  151. package/dist/client/assets/{shellsession-ByCeir2b.js → shellsession-DVK3bw4p.js} +1 -1
  152. package/dist/client/assets/{soy-C6WpnMSF.js → soy-BXgyj2-T.js} +1 -1
  153. package/dist/client/assets/{sparql-BdcL8cbr.js → sparql-DEoxFJ5d.js} +1 -1
  154. package/dist/client/assets/{sql-BIvSNLV_.js → sql-G2vZCmw6.js} +1 -1
  155. package/dist/client/assets/src-D9zkqEEX.js +1 -0
  156. package/dist/client/assets/{stata-PG9iZ--I.js → stata-C4mEnygx.js} +1 -1
  157. package/dist/client/assets/stateDiagram-AJRCARHV-AMtMxKgQ.js +1 -0
  158. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-C89CM-_4.js +1 -0
  159. package/dist/client/assets/{surrealql-CmvCzG09.js → surrealql-Bf8gsTcP.js} +1 -1
  160. package/dist/client/assets/{svelte-ChumG88s.js → svelte-C1oIyl9t.js} +1 -1
  161. package/dist/client/assets/{templ-CmzuRY_a.js → templ-PJcWUuTF.js} +1 -1
  162. package/dist/client/assets/{tex-DL8t-_eJ.js → tex-B7Fnujsi.js} +1 -1
  163. package/dist/client/assets/timeline-definition-PNZ67QCA-BZJSqcAg.js +120 -0
  164. package/dist/client/assets/treeView-BLDUP644-DtjHwb6x.js +1 -0
  165. package/dist/client/assets/treemap-LRROVOQU-GqTXzMFU.js +1 -0
  166. package/dist/client/assets/{ts-tags-BFfE0Egm.js → ts-tags-CAAsFnUt.js} +1 -1
  167. package/dist/client/assets/{tsx-C1bFyHcE.js → tsx-DAKyTsWW.js} +1 -1
  168. package/dist/client/assets/{twig-DkIluZEQ.js → twig-Bd4dieZF.js} +1 -1
  169. package/dist/client/assets/{typescript-Gc86Bc3j.js → typescript-8myByDGd.js} +1 -1
  170. package/dist/client/assets/vennDiagram-CIIHVFJN-CMjBZNs2.js +34 -0
  171. package/dist/client/assets/{vue-C88JmL53.js → vue-fBA2B-QU.js} +1 -1
  172. package/dist/client/assets/{vue-html-Cry4aksC.js → vue-html-DEZECpsR.js} +1 -1
  173. package/dist/client/assets/{vue-vine-zlDkA3Ui.js → vue-vine-B_gG939R.js} +1 -1
  174. package/dist/client/assets/wardley-L42UT6IY-pROVAAhW.js +1 -0
  175. package/dist/client/assets/wardleyDiagram-YWT4CUSO-qeHmPLyL.js +78 -0
  176. package/dist/client/assets/{xml-NvwpIFDy.js → xml-DbXNss3s.js} +1 -1
  177. package/dist/client/assets/{xsl-CDjXvY9w.js → xsl-B7_dgqqc.js} +1 -1
  178. package/dist/client/assets/xychartDiagram-2RQKCTM6-NN2Et7YL.js +7 -0
  179. package/dist/client/assets/{yaml-Bh-LPjcH.js → yaml-DSyIApdJ.js} +1 -1
  180. package/dist/client/index.html +2 -5
  181. package/dist/{mcp-DKlThflu.mjs → mcp-BWeWR4yd.mjs} +3 -1
  182. package/dist/plan-format-f62JWFI-.mjs +117 -0
  183. package/dist/{server-lock-CAdqFSfl.mjs → server-lock-Dj9fG9md.mjs} +279 -132
  184. package/dist/update-check-DAPFCqpF.mjs +129 -0
  185. package/package.json +15 -5
  186. package/dist/cli-agent-Cfuy9fLC.mjs +0 -179
  187. package/dist/cli-agent-CtNivjQW.mjs +0 -179
  188. package/dist/cli-agent-DZBvZoXZ.mjs +0 -179
  189. package/dist/cli-agent-WzJPMH52.mjs +0 -174
  190. package/dist/cli-agent-uYUoCA4X.mjs +0 -179
  191. package/dist/client/assets/index-CZZd7iTh.js +0 -3887
  192. package/dist/client/assets/index-CkC-EvWo.css +0 -1
  193. package/dist/mcp-BQmH_By-.mjs +0 -119
  194. package/dist/mcp-CLgzC8_a.mjs +0 -119
  195. package/dist/mcp-D9E2HQZ9.mjs +0 -119
  196. package/dist/mcp-LVbLV17O.mjs +0 -119
  197. package/dist/mcp-nMwTAut3.mjs +0 -119
  198. package/dist/server-lock-BbiF7u3F.mjs +0 -493
  199. package/dist/server-lock-Bx9ixiF6.mjs +0 -575
  200. package/dist/server-lock-DIkImokU.mjs +0 -487
  201. package/dist/server-lock-DbxpfF3j.mjs +0 -575
  202. /package/dist/client/assets/{abap-CkQ0tsz-.js → abap-cWYhO34H.js} +0 -0
  203. /package/dist/client/assets/{actionscript-3-DHm0ZfF4.js → actionscript-3-B80ndJsD.js} +0 -0
  204. /package/dist/client/assets/{ada-DK_ua92Z.js → ada-C0C0SoYB.js} +0 -0
  205. /package/dist/client/assets/{andromeeda-D2ccw8v4.js → andromeeda-Ch2kWS7s.js} +0 -0
  206. /package/dist/client/assets/{apache-DXtpFu7o.js → apache-DBwBm4bB.js} +0 -0
  207. /package/dist/client/assets/{apex-DlnRRWpl.js → apex-FcV7UxQi.js} +0 -0
  208. /package/dist/client/assets/{applescript-CShk62ad.js → applescript-hQs8VNpS.js} +0 -0
  209. /package/dist/client/assets/{ara-CWN-FDkm.js → ara-BOadBOZg.js} +0 -0
  210. /package/dist/client/assets/{asciidoc-Bg-PM9Vn.js → asciidoc-BsfqiBck.js} +0 -0
  211. /package/dist/client/assets/{asm-DKOhR24S.js → asm-C2vUqzqz.js} +0 -0
  212. /package/dist/client/assets/{aurora-x-DpaEirL8.js → aurora-x-BHLqzt7j.js} +0 -0
  213. /package/dist/client/assets/{awk-3ibKHffv.js → awk-D4e-eeZT.js} +0 -0
  214. /package/dist/client/assets/{ayu-dark-ursiSH5k.js → ayu-dark-DCotN_ZT.js} +0 -0
  215. /package/dist/client/assets/{ayu-light-DMjlrKmx.js → ayu-light-CKB6o_im.js} +0 -0
  216. /package/dist/client/assets/{ayu-mirage-DZEMb75h.js → ayu-mirage-B38lW-C5.js} +0 -0
  217. /package/dist/client/assets/{ballerina-xx7VNGxs.js → ballerina-BzvFqbha.js} +0 -0
  218. /package/dist/client/assets/{bat-DGYsZ5wR.js → bat-CFyw2ERn.js} +0 -0
  219. /package/dist/client/assets/{beancount-D_ATR1UV.js → beancount-a6Gsu5WX.js} +0 -0
  220. /package/dist/client/assets/{berry-BqYMORfH.js → berry-C2jyz4Ah.js} +0 -0
  221. /package/dist/client/assets/{bibtex-CQTBDajW.js → bibtex-Dyet-B83.js} +0 -0
  222. /package/dist/client/assets/{bicep-CfNtxPrK.js → bicep-CghvUIvy.js} +0 -0
  223. /package/dist/client/assets/{bird2-C0dUPe3I.js → bird2-nHigvs-R.js} +0 -0
  224. /package/dist/client/assets/{c3-BUwZ5e3k.js → c3-9ZrcmAmr.js} +0 -0
  225. /package/dist/client/assets/{cadence-C3OKDYrr.js → cadence-BPDgYNWy.js} +0 -0
  226. /package/dist/client/assets/{catppuccin-frappe-CMnRXVZP.js → catppuccin-frappe-BY_2ofjk.js} +0 -0
  227. /package/dist/client/assets/{catppuccin-latte-CqhXSjCC.js → catppuccin-latte-D6GXPBmA.js} +0 -0
  228. /package/dist/client/assets/{catppuccin-macchiato-B6kneE0C.js → catppuccin-macchiato-BuW8_cyo.js} +0 -0
  229. /package/dist/client/assets/{catppuccin-mocha-CP8YZpvj.js → catppuccin-mocha-znex9DPe.js} +0 -0
  230. /package/dist/client/assets/{clarity-Crxe8gSr.js → clarity-Cmao5KSK.js} +0 -0
  231. /package/dist/client/assets/{clojure-BuzOUPMr.js → clojure-D2dPuTkk.js} +0 -0
  232. /package/dist/client/assets/{cmake-CCpZLdLI.js → cmake-DaqQuj4A.js} +0 -0
  233. /package/dist/client/assets/{codeowners-Bo1VYpHz.js → codeowners-B748jmvc.js} +0 -0
  234. /package/dist/client/assets/{codeql-Db01hzHE.js → codeql-CXb_8gHR.js} +0 -0
  235. /package/dist/client/assets/{common-lisp-CMlJIc6Y.js → common-lisp-UZn9nc_5.js} +0 -0
  236. /package/dist/client/assets/{coq-BlzBYp3f.js → coq-DtO6yBIf.js} +0 -0
  237. /package/dist/client/assets/{csharp-kfNshAa7.js → csharp-C3YlYcLV.js} +0 -0
  238. /package/dist/client/assets/{csv-Dr8ri5Nd.js → csv-BBwiVr0X.js} +0 -0
  239. /package/dist/client/assets/{cue-jXfhyOwY.js → cue-ScBFXY5f.js} +0 -0
  240. /package/dist/client/assets/{cypher-CayLeiaR.js → cypher-CGStaC1X.js} +0 -0
  241. /package/dist/client/assets/{d-BMZQ0mAy.js → d-CuTCIvnX.js} +0 -0
  242. /package/dist/client/assets/{dark-plus-B__q47Nr.js → dark-plus-BvePH-r3.js} +0 -0
  243. /package/dist/client/assets/{dart-gMOEMyuz.js → dart-CqEodbm2.js} +0 -0
  244. /package/dist/client/assets/{dax-C3t5LadU.js → dax-UdE5S0Dh.js} +0 -0
  245. /package/dist/client/assets/{desktop-DmhXLwLR.js → desktop-DfmsfHJA.js} +0 -0
  246. /package/dist/client/assets/{diff-togOXQX6.js → diff-CW0RWGd9.js} +0 -0
  247. /package/dist/client/assets/{docker--6N01olR.js → docker-B1qtW4ha.js} +0 -0
  248. /package/dist/client/assets/{dotenv-Bq930Yx8.js → dotenv-BUzOh1k8.js} +0 -0
  249. /package/dist/client/assets/{dracula-CBkSghcw.js → dracula-kJQjC_Gy.js} +0 -0
  250. /package/dist/client/assets/{dracula-soft-CCSYeoxL.js → dracula-soft-B3XhEjCl.js} +0 -0
  251. /package/dist/client/assets/{dream-maker-BiMf3DHl.js → dream-maker-CBvk18nW.js} +0 -0
  252. /package/dist/client/assets/{emacs-lisp-Dhht7he2.js → emacs-lisp-DvSgLhDc.js} +0 -0
  253. /package/dist/client/assets/{everforest-dark-NqSz4oHS.js → everforest-dark-u0zLn75q.js} +0 -0
  254. /package/dist/client/assets/{everforest-light-a3Yzs_lT.js → everforest-light-D3syIoAR.js} +0 -0
  255. /package/dist/client/assets/{fennel-BExc9TZf.js → fennel-C-1kWlGf.js} +0 -0
  256. /package/dist/client/assets/{fish-C2p-AJmZ.js → fish-CCpdtwqS.js} +0 -0
  257. /package/dist/client/assets/{fluent-CeYzs8Qy.js → fluent-BLg032oD.js} +0 -0
  258. /package/dist/client/assets/{fortran-free-form-BIQEK2Jw.js → fortran-free-form-Br4jRtSc.js} +0 -0
  259. /package/dist/client/assets/{gdscript-B5JQPh_-.js → gdscript-hSAZM1eh.js} +0 -0
  260. /package/dist/client/assets/{gdshader-vVjJ_Qr8.js → gdshader-D4XNAEs9.js} +0 -0
  261. /package/dist/client/assets/{genie-DGl5rqC8.js → genie-DmN-ICAN.js} +0 -0
  262. /package/dist/client/assets/{gherkin-CY_VLUnD.js → gherkin-cuHHmRcX.js} +0 -0
  263. /package/dist/client/assets/{github-dark-ClO4AStc.js → github-dark-CEBLh0--.js} +0 -0
  264. /package/dist/client/assets/{github-dark-default-CM0dPco8.js → github-dark-default-Dq0Z4Xai.js} +0 -0
  265. /package/dist/client/assets/{github-dark-dimmed-Cb6xxpXY.js → github-dark-dimmed-D90YmS4w.js} +0 -0
  266. /package/dist/client/assets/{github-dark-high-contrast-BpYtx2-M.js → github-dark-high-contrast-B6BWv1iC.js} +0 -0
  267. /package/dist/client/assets/{github-light-default-BmnCWL6x.js → github-light-default-DsPWmj4v.js} +0 -0
  268. /package/dist/client/assets/{github-light-high-contrast-rpagNF5O.js → github-light-high-contrast-C7aLb3kp.js} +0 -0
  269. /package/dist/client/assets/{github-light-CeOVFgf_.js → github-light-lXSVSq5T.js} +0 -0
  270. /package/dist/client/assets/{gleam-BarIG9kQ.js → gleam-D8VhqPDN.js} +0 -0
  271. /package/dist/client/assets/{gn-DhYsTPYc.js → gn-BjGRlX27.js} +0 -0
  272. /package/dist/client/assets/{gnuplot-CucLlTBc.js → gnuplot-BZCXuE4q.js} +0 -0
  273. /package/dist/client/assets/{go-toi-uWvg.js → go-BJpWXZEs.js} +0 -0
  274. /package/dist/client/assets/{groovy-Ds4dis_k.js → groovy-D9w3Dn-z.js} +0 -0
  275. /package/dist/client/assets/{gruvbox-dark-hard-aPiW8pQh.js → gruvbox-dark-hard-_deksD0U.js} +0 -0
  276. /package/dist/client/assets/{gruvbox-dark-medium-2HJCvzsS.js → gruvbox-dark-medium-CT31284j.js} +0 -0
  277. /package/dist/client/assets/{gruvbox-dark-soft-Da97ODX9.js → gruvbox-dark-soft-BZuEUCbj.js} +0 -0
  278. /package/dist/client/assets/{gruvbox-light-hard-BXlEipFe.js → gruvbox-light-hard-dxv4n_ZS.js} +0 -0
  279. /package/dist/client/assets/{gruvbox-light-medium-Cun-GjGk.js → gruvbox-light-medium-BsW_fVfR.js} +0 -0
  280. /package/dist/client/assets/{gruvbox-light-soft-Bd3qiiSw.js → gruvbox-light-soft-BiGy99gD.js} +0 -0
  281. /package/dist/client/assets/{haskell-B_jvz5Po.js → haskell-DqDdKEgk.js} +0 -0
  282. /package/dist/client/assets/{haxe-BRbuo5UO.js → haxe-DMg0jS3a.js} +0 -0
  283. /package/dist/client/assets/{hcl-BzNUCtsK.js → hcl-SZIZUK_X.js} +0 -0
  284. /package/dist/client/assets/{hjson-BxVo3sS2.js → hjson-DF1VspiE.js} +0 -0
  285. /package/dist/client/assets/{hlsl-C8Wes1nf.js → hlsl-DPe9L0Dt.js} +0 -0
  286. /package/dist/client/assets/{horizon-D54PjLAY.js → horizon-Ngud75Kn.js} +0 -0
  287. /package/dist/client/assets/{horizon-bright-D9RccdIr.js → horizon-bright-Cnljd0XD.js} +0 -0
  288. /package/dist/client/assets/{houston-CMu1N_4K.js → houston-BenZxlMr.js} +0 -0
  289. /package/dist/client/assets/{hy-dMrJKKU_.js → hy-B0f-B1mH.js} +0 -0
  290. /package/dist/client/assets/{imba-DG_oO8tg.js → imba-Bq3j1cW5.js} +0 -0
  291. /package/dist/client/assets/{ini-geHw79Aj.js → ini-BayloP2U.js} +0 -0
  292. /package/dist/client/assets/{json5-CDUsNqz6.js → json5-CRSfdIrY.js} +0 -0
  293. /package/dist/client/assets/{jsonc-D48xcwyD.js → jsonc-y4g9DQPx.js} +0 -0
  294. /package/dist/client/assets/{jsonl-cpIYDXEe.js → jsonl-D2paVn9r.js} +0 -0
  295. /package/dist/client/assets/{jsonnet-Da1lhszN.js → jsonnet-CLH27mtz.js} +0 -0
  296. /package/dist/client/assets/{jssm-B8BLrEGL.js → jssm-CPPYaqX-.js} +0 -0
  297. /package/dist/client/assets/{kanagawa-dragon-2Sk8Rx83.js → kanagawa-dragon-Bt5mhLu1.js} +0 -0
  298. /package/dist/client/assets/{kanagawa-lotus-CQVSWfJp.js → kanagawa-lotus-FGA3pRJk.js} +0 -0
  299. /package/dist/client/assets/{kanagawa-wave-BKWNioLX.js → kanagawa-wave-DnLVZPAD.js} +0 -0
  300. /package/dist/client/assets/{kdl-B-2tSRmp.js → kdl-D1BQjjnw.js} +0 -0
  301. /package/dist/client/assets/{kotlin-DepsEzh3.js → kotlin-ndCaDnf0.js} +0 -0
  302. /package/dist/client/assets/{kusto-BcCtXIb8.js → kusto-D-4nbkD3.js} +0 -0
  303. /package/dist/client/assets/{laserwave-BUqkO46F.js → laserwave-D2qAZkaG.js} +0 -0
  304. /package/dist/client/assets/{lean-CNO9ffpX.js → lean-YmtAsB0p.js} +0 -0
  305. /package/dist/client/assets/{less-Dj0T9pWC.js → less-DyHub3ow.js} +0 -0
  306. /package/dist/client/assets/{light-plus-C9Hnuc1T.js → light-plus-CP13QUvm.js} +0 -0
  307. /package/dist/client/assets/{llvm-DbV9b66l.js → llvm-DCcqrY0D.js} +0 -0
  308. /package/dist/client/assets/{log-BMblmPyH.js → log-DWAAMNbe.js} +0 -0
  309. /package/dist/client/assets/{logo-B78qMxws.js → logo-ClQMGkNL.js} +0 -0
  310. /package/dist/client/assets/{luau-BUd8xsdE.js → luau-CmcXFvLt.js} +0 -0
  311. /package/dist/client/assets/{make-Ev-6cJrd.js → make-DcfJyUzm.js} +0 -0
  312. /package/dist/client/assets/{markdown-CS4LI6sN.js → markdown-DXxotAxn.js} +0 -0
  313. /package/dist/client/assets/{material-theme-5rA1zn0D.js → material-theme-JFoPTBSr.js} +0 -0
  314. /package/dist/client/assets/{material-theme-darker-DGOEiL65.js → material-theme-darker-BHaqZ19v.js} +0 -0
  315. /package/dist/client/assets/{material-theme-lighter-CULfFRX0.js → material-theme-lighter-CGnnS2bs.js} +0 -0
  316. /package/dist/client/assets/{material-theme-ocean-LQZ9CleP.js → material-theme-ocean-Drhewjqf.js} +0 -0
  317. /package/dist/client/assets/{material-theme-palenight-Di_f5oks.js → material-theme-palenight-DbUypmpb.js} +0 -0
  318. /package/dist/client/assets/{matlab-C0qEtAx9.js → matlab-BlfbTznR.js} +0 -0
  319. /package/dist/client/assets/{mdx-CzvnbLXb.js → mdx-H8fyPQd8.js} +0 -0
  320. /package/dist/client/assets/{mermaid-BPquZaKt.js → mermaid-CWAV2dmV.js} +0 -0
  321. /package/dist/client/assets/{min-dark-rkuIbtJV.js → min-dark-BEelvXUB.js} +0 -0
  322. /package/dist/client/assets/{min-light-Dj_HOGsr.js → min-light-CTPBOACR.js} +0 -0
  323. /package/dist/client/assets/{mipsasm-k5DQoS6j.js → mipsasm-BWYFAm2s.js} +0 -0
  324. /package/dist/client/assets/{mojo-sTTDuNnR.js → mojo-DZcPJEIN.js} +0 -0
  325. /package/dist/client/assets/{monokai-D5p-u2ij.js → monokai-DQlZXbkg.js} +0 -0
  326. /package/dist/client/assets/{moonbit-j5ChFtBC.js → moonbit-6eslNlJL.js} +0 -0
  327. /package/dist/client/assets/{move-Dj0Gmn6R.js → move-DxFc9-QU.js} +0 -0
  328. /package/dist/client/assets/{narrat-DJgMz2oW.js → narrat-gv38dJOT.js} +0 -0
  329. /package/dist/client/assets/{nextflow-groovy-eDLuZ_oi.js → nextflow-groovy-DV4H3hok.js} +0 -0
  330. /package/dist/client/assets/{night-owl-CEdtPl3A.js → night-owl-BLcrYhaC.js} +0 -0
  331. /package/dist/client/assets/{night-owl-light-GdSldewm.js → night-owl-light-BG-tBJOz.js} +0 -0
  332. /package/dist/client/assets/{nix-CxIPS3pb.js → nix-NlOz3HGM.js} +0 -0
  333. /package/dist/client/assets/{nord-3WFAz5H9.js → nord-Dm2F5_QB.js} +0 -0
  334. /package/dist/client/assets/{nushell-GDfBmoBU.js → nushell-D86Z8aFF.js} +0 -0
  335. /package/dist/client/assets/{objective-c-MFQ_MGUa.js → objective-c-iuJvUjCv.js} +0 -0
  336. /package/dist/client/assets/{objective-cpp-Y83LcBE7.js → objective-cpp-C62JvfMT.js} +0 -0
  337. /package/dist/client/assets/{ocaml-FxYfaJxu.js → ocaml-Rbryo9lg.js} +0 -0
  338. /package/dist/client/assets/{odin-CprihY3z.js → odin-CfaOVNP_.js} +0 -0
  339. /package/dist/client/assets/{one-dark-pro-BB6mpmmA.js → one-dark-pro-DC9SHdX0.js} +0 -0
  340. /package/dist/client/assets/{one-light-BYLoxNtg.js → one-light-Doo39p0H.js} +0 -0
  341. /package/dist/client/assets/{openscad-Bc1FbpOi.js → openscad-DCRhgheK.js} +0 -0
  342. /package/dist/client/assets/{pascal-Bb4d8cUL.js → pascal-CTesTHtV.js} +0 -0
  343. /package/dist/client/assets/{pierre-dark-cF19s-RM.js → pierre-dark-Gtc9M_gS.js} +0 -0
  344. /package/dist/client/assets/{pierre-light-BdpX8OpD.js → pierre-light-EDxMHmhf.js} +0 -0
  345. /package/dist/client/assets/{pkl-tM25Sq0w.js → pkl-BjUMjQkt.js} +0 -0
  346. /package/dist/client/assets/{plastic-D3k2Xp_5.js → plastic-B3CcSpon.js} +0 -0
  347. /package/dist/client/assets/{plsql-CLEfFhSj.js → plsql-BgKEZSSo.js} +0 -0
  348. /package/dist/client/assets/{po-CaAzdrrh.js → po-C5s_CVt8.js} +0 -0
  349. /package/dist/client/assets/{poimandres-bPTvT4Da.js → poimandres-BsK70ma5.js} +0 -0
  350. /package/dist/client/assets/{polar-TG7aTGdK.js → polar-y4hX8qM0.js} +0 -0
  351. /package/dist/client/assets/{postcss-8kqfa9f0.js → postcss-BHCm7Qae.js} +0 -0
  352. /package/dist/client/assets/{powerquery-CtSu1Nfd.js → powerquery-C2vMt8aZ.js} +0 -0
  353. /package/dist/client/assets/{powershell-87lLBHMy.js → powershell-DEcjmg1c.js} +0 -0
  354. /package/dist/client/assets/{prisma-Dnf694DZ.js → prisma-Ba-Tcxy5.js} +0 -0
  355. /package/dist/client/assets/{prolog-C0XbHTWa.js → prolog-B4o261Jv.js} +0 -0
  356. /package/dist/client/assets/{proto-BZP-HLIb.js → proto-o3IZKiMR.js} +0 -0
  357. /package/dist/client/assets/{puppet-CJYWgYC5.js → puppet-BC0dqZ31.js} +0 -0
  358. /package/dist/client/assets/{purescript-B95Q6BAd.js → purescript-CLDw1y5G.js} +0 -0
  359. /package/dist/client/assets/{python-CqTCsi7P.js → python-D1NFioGW.js} +0 -0
  360. /package/dist/client/assets/{qmldir-DlIL4hls.js → qmldir-B7i9e9Vn.js} +0 -0
  361. /package/dist/client/assets/{qss-BW72E0q_.js → qss-DIe6oKX8.js} +0 -0
  362. /package/dist/client/assets/{racket-CCAimEsC.js → racket-CAOC_yyk.js} +0 -0
  363. /package/dist/client/assets/{raku-mSuqElkM.js → raku-Ccua3vW6.js} +0 -0
  364. /package/dist/client/assets/{red-C-DA4yBI.js → red-DtDH206x.js} +0 -0
  365. /package/dist/client/assets/{reg-CGwMBJ2c.js → reg-CAYZT9kE.js} +0 -0
  366. /package/dist/client/assets/{rel-JwrbYgX4.js → rel-cvB6F5nO.js} +0 -0
  367. /package/dist/client/assets/{riscv-CoYyE75b.js → riscv-SYGtE4EN.js} +0 -0
  368. /package/dist/client/assets/{ron-C5wrhnmJ.js → ron-CRt869SB.js} +0 -0
  369. /package/dist/client/assets/{rose-pine-DlrMPYYd.js → rose-pine-CjBfSJ5b.js} +0 -0
  370. /package/dist/client/assets/{rose-pine-dawn-DBHFtZD2.js → rose-pine-dawn-C0xwy7iJ.js} +0 -0
  371. /package/dist/client/assets/{rose-pine-moon-BBfrpe5q.js → rose-pine-moon-BSNy9Ty0.js} +0 -0
  372. /package/dist/client/assets/{rosmsg-DlimTR9t.js → rosmsg-BwrfJ66Z.js} +0 -0
  373. /package/dist/client/assets/{rust-Cxnkxx3h.js → rust-DCKTTPxN.js} +0 -0
  374. /package/dist/client/assets/{sass-DEyqUIpU.js → sass-CorcwySt.js} +0 -0
  375. /package/dist/client/assets/{scala-i3RN3yAN.js → scala-DlI-OmYj.js} +0 -0
  376. /package/dist/client/assets/{scheme-BcKdjYkO.js → scheme-CcNEGkZH.js} +0 -0
  377. /package/dist/client/assets/{sdbl-Be_XWc3n.js → sdbl-AL_m-RO_.js} +0 -0
  378. /package/dist/client/assets/{slack-dark-3PDtm74m.js → slack-dark-rMhrfPm6.js} +0 -0
  379. /package/dist/client/assets/{slack-ochin-CwiuFRJD.js → slack-ochin-9w8X74hU.js} +0 -0
  380. /package/dist/client/assets/{smalltalk-BdBlL6ks.js → smalltalk-Y2ogrfbk.js} +0 -0
  381. /package/dist/client/assets/{snazzy-light-Dyqc8Is2.js → snazzy-light-DHr9ygpP.js} +0 -0
  382. /package/dist/client/assets/{solarized-dark-DZiTscIX.js → solarized-dark-UPcKev9Q.js} +0 -0
  383. /package/dist/client/assets/{solarized-light-DBcfxrfG.js → solarized-light-DUsjROvl.js} +0 -0
  384. /package/dist/client/assets/{solidity-DH-yUSWc.js → solidity-Bfbm9QZQ.js} +0 -0
  385. /package/dist/client/assets/{splunk-CIjc4kxs.js → splunk-6DJA2XFa.js} +0 -0
  386. /package/dist/client/assets/{ssh-config-BKVd4drG.js → ssh-config-CbQtdF-u.js} +0 -0
  387. /package/dist/client/assets/{stylus-tqAsmugv.js → stylus-B_iq45Sj.js} +0 -0
  388. /package/dist/client/assets/{swift-CdDBQ3_Z.js → swift-C7KIgN-p.js} +0 -0
  389. /package/dist/client/assets/{synthwave-84-CbbRs73K.js → synthwave-84-lf_Wt0K_.js} +0 -0
  390. /package/dist/client/assets/{system-verilog-CBqEY-9v.js → system-verilog-C3G9wERd.js} +0 -0
  391. /package/dist/client/assets/{systemd-khRP5zwK.js → systemd-CwxGrojj.js} +0 -0
  392. /package/dist/client/assets/{talonscript-D_lneH-6.js → talonscript-DqnSo1EO.js} +0 -0
  393. /package/dist/client/assets/{tasl-CLymawGe.js → tasl-T8ethp86.js} +0 -0
  394. /package/dist/client/assets/{tcl-BRY1S87U.js → tcl-Ccl366o0.js} +0 -0
  395. /package/dist/client/assets/{terraform-BqohMo2f.js → terraform-BBf6ZI_0.js} +0 -0
  396. /package/dist/client/assets/{tokyo-night-BWUONxad.js → tokyo-night-BF5ata25.js} +0 -0
  397. /package/dist/client/assets/{toml-C4c85Lwg.js → toml-C5Z_BR4r.js} +0 -0
  398. /package/dist/client/assets/{tsv-DsZq9HBQ.js → tsv-rX8sUJs7.js} +0 -0
  399. /package/dist/client/assets/{turtle-Dpr8zLlw.js → turtle-BM-MG8WY.js} +0 -0
  400. /package/dist/client/assets/{typespec-DcqgATB-.js → typespec-C5gKydvR.js} +0 -0
  401. /package/dist/client/assets/{typst-CeVxmuPg.js → typst--_5VchrY.js} +0 -0
  402. /package/dist/client/assets/{v-C2Qsh2-1.js → v-C6PwpmTC.js} +0 -0
  403. /package/dist/client/assets/{vala-CvZ3yL7c.js → vala-4pTaceSj.js} +0 -0
  404. /package/dist/client/assets/{vb-B_p4qDw4.js → vb-DhoR5A6S.js} +0 -0
  405. /package/dist/client/assets/{verilog-D8MGjxD7.js → verilog-B9f_1lPn.js} +0 -0
  406. /package/dist/client/assets/{vesper-DossXiE1.js → vesper-CmBi_iCT.js} +0 -0
  407. /package/dist/client/assets/{vhdl-MLyYh_Gz.js → vhdl-Cy4RAmOe.js} +0 -0
  408. /package/dist/client/assets/{viml-BuYIArcz.js → viml-CFQW-CcD.js} +0 -0
  409. /package/dist/client/assets/{vitesse-black-C3kc1227.js → vitesse-black-CE8RoBJP.js} +0 -0
  410. /package/dist/client/assets/{vitesse-dark-kWOu5V36.js → vitesse-dark-BpF142p_.js} +0 -0
  411. /package/dist/client/assets/{vitesse-light-DMtiL8bK.js → vitesse-light-CMwxPBrg.js} +0 -0
  412. /package/dist/client/assets/{vyper-CNqG09-_.js → vyper-BW5zj9bE.js} +0 -0
  413. /package/dist/client/assets/{wasm-BsQDV7Y0.js → wasm-BigxSLnm.js} +0 -0
  414. /package/dist/client/assets/{wasm-DFVlQlgd.js → wasm-CSccDuAq.js} +0 -0
  415. /package/dist/client/assets/{wenyan-BmOQge13.js → wenyan-BZzM1SQT.js} +0 -0
  416. /package/dist/client/assets/{wgsl-CgWrmvIg.js → wgsl-xBPHbLlq.js} +0 -0
  417. /package/dist/client/assets/{wikitext-DkwckXCk.js → wikitext-BXJWUNJK.js} +0 -0
  418. /package/dist/client/assets/{wit-CtyVFGe7.js → wit-2GnUs67P.js} +0 -0
  419. /package/dist/client/assets/{wolfram-CXE4FrKz.js → wolfram-DIFDmw-g.js} +0 -0
  420. /package/dist/client/assets/{zenscript-DH15wJt0.js → zenscript-DQaUUjbx.js} +0 -0
  421. /package/dist/client/assets/{zig-CqXN9brD.js → zig-BDepRvBi.js} +0 -0
@@ -1,7 +1,7 @@
1
- import { basename, isAbsolute, join, resolve } from "node:path";
1
+ import { execFile, execFileSync } from "node:child_process";
2
+ import { basename, join, relative, resolve, sep } from "node:path";
2
3
  import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
3
4
  import { promisify } from "node:util";
4
- import { execFile, execFileSync } from "node:child_process";
5
5
  import { readFile } from "node:fs/promises";
6
6
  import { homedir } from "node:os";
7
7
  import { createHash } from "node:crypto";
@@ -14,15 +14,23 @@ function decodeAndNormalize(p) {
14
14
  } catch {}
15
15
  return decoded.replace(/\\/g, "/");
16
16
  }
17
- function isSafePath(relativePath, baseDir) {
18
- const normalized = decodeAndNormalize(relativePath);
19
- if (normalized.includes("..") || normalized.includes("\0") || isAbsolute(normalized)) return false;
17
+ function toSafeRelativePath(filePath, baseDir) {
18
+ const normalized = decodeAndNormalize(filePath);
19
+ if (normalized.includes("..") || normalized.includes("\0")) return null;
20
20
  const resolved = resolve(baseDir, normalized);
21
- return resolved.startsWith(resolve(baseDir) + "/") || resolved === resolve(baseDir);
21
+ const resolvedBase = resolve(baseDir);
22
+ if (!(resolved === resolvedBase || resolved.startsWith(resolvedBase + sep))) return null;
23
+ return relative(resolvedBase, resolved);
24
+ }
25
+ function isSafePath(relativePath, baseDir) {
26
+ return toSafeRelativePath(relativePath, baseDir) !== null;
22
27
  }
23
28
  //#endregion
24
29
  //#region src/lib/git.ts
25
30
  const execFileAsync = promisify(execFile);
31
+ function splitLines(content) {
32
+ return content.split(/\r\n|\n|\r/);
33
+ }
26
34
  function isBinaryFile(absolutePath) {
27
35
  try {
28
36
  const buffer = readFileSync(absolutePath);
@@ -35,15 +43,16 @@ function isBinaryFile(absolutePath) {
35
43
  }
36
44
  function getFileContent(filePath, version) {
37
45
  const root = getRepoRoot();
38
- if (!isSafePath(filePath, root)) return null;
39
- const resolved = resolve(root, filePath);
46
+ const relPath = toSafeRelativePath(filePath, root);
47
+ if (!relPath) return null;
48
+ const resolved = resolve(root, relPath);
40
49
  if (version === "new") try {
41
50
  return readFileSync(resolved);
42
51
  } catch {
43
52
  return null;
44
53
  }
45
54
  try {
46
- return execFileSync("git", ["show", `HEAD:${filePath}`], {
55
+ return execFileSync("git", ["show", `HEAD:${relPath}`], {
47
56
  stdio: "pipe",
48
57
  maxBuffer: 50 * 1024 * 1024
49
58
  });
@@ -134,7 +143,7 @@ async function getUntrackedFilesDiffAsync() {
134
143
  `Binary files /dev/null and b/${file} differ`
135
144
  ].join("\n");
136
145
  else try {
137
- const lines = (await readFile(absolutePath, "utf-8")).split("\n");
146
+ const lines = splitLines(await readFile(absolutePath, "utf-8"));
138
147
  const diffLines = lines.map((l) => `+${l}`);
139
148
  return [
140
149
  `diff --git a/${file} b/${file}`,
@@ -292,7 +301,7 @@ function getFilePatch(filePath) {
292
301
  try {
293
302
  const absolutePath = join(getRepoRoot(), filePath);
294
303
  if (isBinaryFile(absolutePath)) return "";
295
- const lines = readFileSync(absolutePath, "utf-8").split("\n");
304
+ const lines = splitLines(readFileSync(absolutePath, "utf-8"));
296
305
  return [
297
306
  `diff --git a/${filePath} b/${filePath}`,
298
307
  "new file mode 100644",
@@ -442,16 +451,266 @@ function getHunkHistory(filePath, deletionStart, deletionCount, revision = "HEAD
442
451
  recentCommits
443
452
  };
444
453
  }
454
+ /**
455
+ * Parse the output of `git log --pretty=raw -p` into `CommitInfo[]`.
456
+ *
457
+ * The `raw` format emits one record per commit:
458
+ *
459
+ * commit <sha>
460
+ * tree <sha>
461
+ * parent <sha> (zero or more; merges have ≥ 2)
462
+ * author <name> <email> <unix-time> <tz>
463
+ * committer <name> <email> <unix-time> <tz>
464
+ * gpgsig -----BEGIN ... (optional; continuation lines start with a single space)
465
+ * <indented body>
466
+ *
467
+ * <indented commit message — 4 spaces of indent>
468
+ *
469
+ * diff --git a/... b/... (the per-commit patch; may be empty)
470
+ * ...
471
+ *
472
+ * Records are separated by blank lines but the unambiguous boundary is the
473
+ * next line beginning with `commit <40-hex>` at column 0.
474
+ */
475
+ function parseGitShowRaw(raw) {
476
+ if (!raw) return [];
477
+ const out = [];
478
+ const lines = raw.split("\n");
479
+ const starts = [];
480
+ for (let i = 0; i < lines.length; i++) if (/^commit [0-9a-f]{40}\b/.test(lines[i])) starts.push(i);
481
+ if (starts.length === 0) return [];
482
+ for (let s = 0; s < starts.length; s++) {
483
+ const begin = starts[s];
484
+ const end = s + 1 < starts.length ? starts[s + 1] : lines.length;
485
+ const info = parseSingleCommitRaw(lines.slice(begin, end));
486
+ if (info) out.push(info);
487
+ }
488
+ return out;
489
+ }
490
+ function parseSingleCommitRaw(lines) {
491
+ const shaMatch = (lines[0] ?? "").match(/^commit ([0-9a-f]{40})/);
492
+ if (!shaMatch) return null;
493
+ const sha = shaMatch[1];
494
+ let i = 1;
495
+ const parents = [];
496
+ let authorName = "";
497
+ let authorEmail = "";
498
+ let authorDate = "";
499
+ let committerName = "";
500
+ let committerEmail = "";
501
+ let committerDate = "";
502
+ while (i < lines.length) {
503
+ const line = lines[i];
504
+ if (line === "") break;
505
+ if (line.startsWith(" ")) {
506
+ i++;
507
+ continue;
508
+ }
509
+ const idx = line.indexOf(" ");
510
+ const key = idx === -1 ? line : line.slice(0, idx);
511
+ const value = idx === -1 ? "" : line.slice(idx + 1);
512
+ switch (key) {
513
+ case "tree": break;
514
+ case "parent":
515
+ if (value) parents.push(value);
516
+ break;
517
+ case "author": {
518
+ const ident = parseIdent(value);
519
+ authorName = ident.name;
520
+ authorEmail = ident.email;
521
+ authorDate = ident.date;
522
+ break;
523
+ }
524
+ case "committer": {
525
+ const ident = parseIdent(value);
526
+ committerName = ident.name;
527
+ committerEmail = ident.email;
528
+ committerDate = ident.date;
529
+ break;
530
+ }
531
+ default: break;
532
+ }
533
+ i++;
534
+ }
535
+ if (i < lines.length && lines[i] === "") i++;
536
+ const msgLines = [];
537
+ while (i < lines.length) {
538
+ const line = lines[i];
539
+ if (line.startsWith(" ")) {
540
+ msgLines.push(line.slice(4));
541
+ i++;
542
+ continue;
543
+ }
544
+ if (line === "") {
545
+ msgLines.push("");
546
+ i++;
547
+ continue;
548
+ }
549
+ break;
550
+ }
551
+ const { subject, body } = splitMessage(msgLines);
552
+ let patchStart = -1;
553
+ for (let j = i; j < lines.length; j++) {
554
+ const line = lines[j];
555
+ if (line.startsWith("diff --git ") || line.startsWith("Binary files ")) {
556
+ patchStart = j;
557
+ break;
558
+ }
559
+ if (line === "") continue;
560
+ break;
561
+ }
562
+ const patch = patchStart === -1 ? "" : lines.slice(patchStart).join("\n").replace(/\n+$/, "\n");
563
+ return {
564
+ sha,
565
+ shortSha: sha.slice(0, 7),
566
+ parents,
567
+ subject,
568
+ body,
569
+ authorName,
570
+ authorEmail,
571
+ authorDate,
572
+ committerName,
573
+ committerEmail,
574
+ committerDate,
575
+ patch
576
+ };
577
+ }
578
+ /**
579
+ * Parse a `Name <email> <unix-seconds> <±HHMM>` ident line into structured
580
+ * fields. The email is bracketed; the timestamp is split out and converted to
581
+ * ISO 8601 for consumers.
582
+ */
583
+ function parseIdent(value) {
584
+ const match = value.match(/^(.*?)\s+<([^>]*)>\s+(\d+)\s+([+-]\d{4})$/);
585
+ if (!match) return {
586
+ name: value,
587
+ email: "",
588
+ date: ""
589
+ };
590
+ const [, name, email, secs, tz] = match;
591
+ return {
592
+ name,
593
+ email,
594
+ date: unixToIso(Number(secs), tz)
595
+ };
596
+ }
597
+ function unixToIso(secs, tz) {
598
+ if (!Number.isFinite(secs)) return "";
599
+ const sign = tz.startsWith("-") ? -1 : 1;
600
+ const tzHours = Number(tz.slice(1, 3));
601
+ const tzMins = Number(tz.slice(3, 5));
602
+ const offsetMs = sign * (tzHours * 60 + tzMins) * 6e4;
603
+ const d = new Date(secs * 1e3 + offsetMs);
604
+ const pad = (n, w = 2) => String(n).padStart(w, "0");
605
+ return `${d.getUTCFullYear()}-${pad(d.getUTCMonth() + 1)}-${pad(d.getUTCDate())}T${pad(d.getUTCHours())}:${pad(d.getUTCMinutes())}:${pad(d.getUTCSeconds())}${tz.slice(0, 3)}:${tz.slice(3)}`;
606
+ }
607
+ function splitMessage(msgLines) {
608
+ if (msgLines.length === 0) return {
609
+ subject: "",
610
+ body: ""
611
+ };
612
+ let start = 0;
613
+ while (start < msgLines.length && msgLines[start] === "") start++;
614
+ let stop = msgLines.length;
615
+ while (stop > start && msgLines[stop - 1] === "") stop--;
616
+ if (start >= stop) return {
617
+ subject: "",
618
+ body: ""
619
+ };
620
+ const subject = msgLines[start];
621
+ let bodyStart = start + 1;
622
+ if (bodyStart < stop && msgLines[bodyStart] === "") bodyStart++;
623
+ return {
624
+ subject,
625
+ body: msgLines.slice(bodyStart, stop).join("\n")
626
+ };
627
+ }
628
+ async function getShowDiff(revspecs, pathspecs = []) {
629
+ if (revspecs.length === 0) return {
630
+ commits: [],
631
+ patch: "",
632
+ truncated: 0
633
+ };
634
+ let shaList;
635
+ try {
636
+ const { stdout } = await execFileAsync("git", [
637
+ "rev-list",
638
+ "--no-walk",
639
+ "--reverse",
640
+ ...revspecs,
641
+ ...pathspecs.length ? ["--", ...pathspecs] : []
642
+ ], {
643
+ encoding: "utf-8",
644
+ maxBuffer: 50 * 1024 * 1024
645
+ });
646
+ shaList = stdout.split("\n").filter(Boolean);
647
+ } catch {
648
+ return {
649
+ commits: [],
650
+ patch: "",
651
+ truncated: 0
652
+ };
653
+ }
654
+ if (shaList.length === 0) return {
655
+ commits: [],
656
+ patch: "",
657
+ truncated: 0
658
+ };
659
+ const truncated = Math.max(0, shaList.length - 100);
660
+ const trimmed = truncated === 0 ? shaList : shaList.slice(0, 100);
661
+ let raw;
662
+ try {
663
+ const { stdout } = await execFileAsync("git", [
664
+ "log",
665
+ "--no-walk",
666
+ "--reverse",
667
+ "-p",
668
+ "--pretty=raw",
669
+ ...DIFF_FLAGS,
670
+ ...trimmed,
671
+ ...pathspecs.length ? ["--", ...pathspecs] : []
672
+ ], {
673
+ encoding: "utf-8",
674
+ maxBuffer: 200 * 1024 * 1024
675
+ });
676
+ raw = stdout;
677
+ } catch {
678
+ return {
679
+ commits: [],
680
+ patch: "",
681
+ truncated: 0
682
+ };
683
+ }
684
+ const commits = parseGitShowRaw(raw);
685
+ return {
686
+ commits,
687
+ patch: commits.map((c) => c.patch).filter(Boolean).join("\n"),
688
+ truncated
689
+ };
690
+ }
445
691
  //#endregion
446
692
  //#region src/lib/comment-format.ts
693
+ /** Plain-language guidance the agent should act on, derived from the verdict. */
694
+ function reviewDecisionSummary(decision) {
695
+ switch (decision) {
696
+ case "approved": return "The reviewer APPROVED these changes. Address any open comments below, then proceed — the overall direction is good.";
697
+ case "changes-requested": return "The reviewer REQUESTED EDITS. Address every open comment below and apply the requested changes before considering this review done.";
698
+ case "rejected": return "The reviewer REJECTED these changes. Do NOT keep building on this approach; reconsider it in light of the comments below before continuing.";
699
+ }
700
+ }
447
701
  /**
448
702
  * Render review comments as the `<code-review-comments>` XML envelope used to
449
703
  * hand a review to an AI agent. Shared by the UI clipboard button
450
704
  * (`useComments.formatAllComments`), the server's `/api/review/send` handoff,
451
705
  * and the `diffing` CLI/MCP so every channel emits byte-identical output.
706
+ *
707
+ * A review may carry a headline `decision` (approve / request edits / reject)
708
+ * and/or an overall comment, so the envelope is emitted even with zero inline
709
+ * comments — letting a reviewer submit a verdict without annotating any line.
452
710
  */
453
- function formatComments(comments, generalComment) {
454
- if (comments.length === 0) return "";
711
+ function formatComments(comments, generalComment, decision) {
712
+ const trimmedGeneral = generalComment?.trim();
713
+ if (comments.length === 0 && !decision && !trimmedGeneral) return "";
455
714
  const grouped = /* @__PURE__ */ new Map();
456
715
  for (const comment of comments) {
457
716
  const list = grouped.get(comment.filePath) ?? [];
@@ -459,10 +718,14 @@ function formatComments(comments, generalComment) {
459
718
  grouped.set(comment.filePath, list);
460
719
  }
461
720
  const lines = [];
462
- lines.push("<code-review-comments>");
721
+ lines.push(decision ? `<code-review-comments decision="${decision}">` : "<code-review-comments>");
463
722
  lines.push(" <instructions>");
464
723
  lines.push(" You are an AI coding assistant. You are receiving a structured list of code review comments to address in the repository.");
465
724
  lines.push(" For each file, review the inline comments and apply the changes requested.");
725
+ if (decision) {
726
+ lines.push(" - The \"decision\" attribute on the root element is the reviewer's headline verdict: \"approved\", \"changes-requested\", or \"rejected\".");
727
+ lines.push(" - <decision-summary> tells you, in plain language, what to do next based on that verdict.");
728
+ }
466
729
  lines.push(" - Target lines are specified by the \"line\" attribute (e.g. line=\"10\" or line=\"10-15\").");
467
730
  lines.push(" - \"side\" indicates whether the comment is on \"additions\" (added/modified lines) or \"deletions\" (deleted/old lines).");
468
731
  lines.push(" - \"status\" indicates whether the comment is \"open\" or \"resolved\". Only address comments with status=\"open\".");
@@ -490,7 +753,7 @@ function formatComments(comments, generalComment) {
490
753
  lines.push(" <reply to=\"<comment-id>\" model=\"<your-model-name>\"><![CDATA[Your reply or clarification request here]]></reply>");
491
754
  lines.push(" </comment-replies>");
492
755
  lines.push(" </instructions>");
493
- const trimmedGeneral = generalComment?.trim();
756
+ if (decision) lines.push(` <decision-summary><![CDATA[${reviewDecisionSummary(decision)}]]></decision-summary>`);
494
757
  if (trimmedGeneral) {
495
758
  lines.push(" <general-comment>");
496
759
  lines.push(` <![CDATA[${trimmedGeneral}]]>`);
@@ -531,122 +794,6 @@ function formatComments(comments, generalComment) {
531
794
  return lines.join("\n");
532
795
  }
533
796
  //#endregion
534
- //#region src/lib/plan-format.ts
535
- /**
536
- * Serialize a reviewed plan into the `<plan-review>` XML envelope handed back to
537
- * a waiting agent. The diff-review counterpart is {@link formatComments}; this
538
- * keeps the two handoffs structurally consistent so an agent learns one shape.
539
- *
540
- * Shared by the server's `/api/plan-review/await` handoff, the `diffing plan`
541
- * CLI, and the MCP server so every channel emits byte-identical output.
542
- */
543
- function escapeAttr(value) {
544
- return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
545
- }
546
- /** Human-readable guidance the agent should act on, derived from the verdict. */
547
- function decisionSummary(decision) {
548
- switch (decision) {
549
- case "approved": return "The reviewer APPROVED this plan. Proceed with implementation exactly as described, taking any inline comments into account.";
550
- case "rejected": return "The reviewer REJECTED this plan. Do NOT proceed. Reconsider the approach based on the comments; only continue once a new plan is approved.";
551
- case "changes-requested": return "The reviewer REQUESTED CHANGES. Revise the plan to address every open comment below, then resubmit the updated plan for re-review (do not start implementation yet).";
552
- default: return "This plan has not been decided yet. Wait for the reviewer to approve, reject, or request changes.";
553
- }
554
- }
555
- /**
556
- * Resolve the line label for a plan comment: `plan` for whole-plan notes,
557
- * `12-15` for a multi-line selection, otherwise the single line number.
558
- */
559
- function lineLabel(comment) {
560
- if (comment.lineNumber === 0) return "plan";
561
- if (comment.startLineNumber && comment.startLineNumber !== comment.lineNumber) return `${comment.startLineNumber}-${comment.lineNumber}`;
562
- return `${comment.lineNumber}`;
563
- }
564
- function formatPlanReview(plan) {
565
- const lines = [];
566
- lines.push("<plan-review>");
567
- lines.push(" <instructions>");
568
- lines.push(" You are an AI coding assistant receiving a human review of a plan you submitted.");
569
- lines.push(" - The \"decision\" attribute is the headline verdict: \"approved\", \"rejected\", \"changes-requested\", or \"pending\".");
570
- lines.push(" - <decision-summary> tells you, in plain language, what to do next based on that verdict.");
571
- lines.push(" - <decision-comment> is the reviewer's overall note (may be absent).");
572
- lines.push(" - <plan-body> is the exact markdown of the plan being reviewed. Inline comments target lines within it.");
573
- lines.push(" - Each <comment> targets a line (\"line=42\"), a range (\"line=12-15\"), or the whole plan (\"line=plan\").");
574
- lines.push(" \"section\" names the nearest markdown heading for context. Only address comments with status=\"open\".");
575
- lines.push(" - <context> contains the exact plan text the comment is anchored to.");
576
- lines.push("");
577
- lines.push(" HOW TO RESPOND:");
578
- lines.push(" - If approved: proceed with the work.");
579
- lines.push(" - If changes-requested: revise the plan and resubmit it for another review round.");
580
- lines.push(" - If rejected: stop and rethink; do not implement.");
581
- lines.push(" Prefer the diffing CLI or MCP (port-agnostic, no copy-paste):");
582
- lines.push(" diffing plan reply <comment-id> --body \"...\" --model \"<your-model-name>\"");
583
- lines.push(" diffing plan resolve <comment-id>");
584
- lines.push(" diffing plan submit <revised-plan.md> --id <plan-id> # resubmit a new version for re-review");
585
- lines.push(" (Or the equivalent MCP tools: reply_to_plan_comment, resolve_plan_comment, submit_plan.)");
586
- lines.push(" </instructions>");
587
- const decidedAttr = plan.decidedAt ? ` decided-at="${new Date(plan.decidedAt).toISOString()}"` : "";
588
- lines.push(` <plan id="${escapeAttr(plan.id)}" title="${escapeAttr(plan.title)}" version="${plan.version}" decision="${plan.decision}"${decidedAttr}>`);
589
- lines.push(` <decision-summary><![CDATA[${decisionSummary(plan.decision)}]]></decision-summary>`);
590
- const trimmedDecisionComment = plan.decisionComment?.trim();
591
- if (trimmedDecisionComment) lines.push(` <decision-comment><![CDATA[${trimmedDecisionComment}]]></decision-comment>`);
592
- lines.push(` <plan-body><![CDATA[${plan.body}]]></plan-body>`);
593
- const comments = plan.comments ?? [];
594
- if (comments.length > 0) {
595
- lines.push(" <comments>");
596
- for (const comment of comments) {
597
- const sectionAttr = comment.sectionTitle ? ` section="${escapeAttr(comment.sectionTitle)}"` : "";
598
- const isoDate = new Date(comment.createdAt).toISOString();
599
- lines.push(` <comment id="${escapeAttr(comment.id)}" line="${lineLabel(comment)}"${sectionAttr} status="${comment.status}" created-at="${isoDate}">`);
600
- if (comment.lineNumber !== 0 && comment.lineContent) lines.push(` <context><![CDATA[${comment.lineContent}]]></context>`);
601
- lines.push(` <body><![CDATA[${comment.body}]]></body>`);
602
- if (comment.replies && comment.replies.length > 0) {
603
- lines.push(" <replies>");
604
- for (const reply of comment.replies) {
605
- const replyIsoDate = new Date(reply.createdAt).toISOString();
606
- const roleAttr = reply.role ? ` role="${reply.role}"` : " role=\"agent\"";
607
- const modelAttr = reply.model ? ` model="${escapeAttr(reply.model)}"` : "";
608
- lines.push(` <reply id="${escapeAttr(reply.id)}" created-at="${replyIsoDate}"${roleAttr}${modelAttr}>`);
609
- lines.push(` <![CDATA[${reply.body}]]>`);
610
- lines.push(" </reply>");
611
- }
612
- lines.push(" </replies>");
613
- }
614
- lines.push(" </comment>");
615
- }
616
- lines.push(" </comments>");
617
- }
618
- lines.push(" </plan>");
619
- lines.push("</plan-review>");
620
- return lines.join("\n");
621
- }
622
- /**
623
- * Find the nearest markdown ATX heading at or above a 1-based line, so a comment
624
- * can record which section of the plan it belongs to. Returns the heading text
625
- * without the leading `#`s, or undefined when the line precedes any heading.
626
- */
627
- function sectionTitleForLine(body, lineNumber) {
628
- if (lineNumber < 1) return void 0;
629
- const lines = body.split("\n");
630
- const end = Math.min(lineNumber, lines.length);
631
- for (let i = end - 1; i >= 0; i--) {
632
- const match = /^\s{0,3}(#{1,6})\s+(.*?)\s*#*\s*$/.exec(lines[i]);
633
- if (match) return match[2].trim();
634
- }
635
- }
636
- /**
637
- * Snapshot the plan text spanned by a 1-based, inclusive [start, end] line
638
- * range, used as the `lineContent` anchor when a comment is created without one
639
- * (e.g. posted by an agent over the API).
640
- */
641
- function extractPlanLines(body, startLine, endLine) {
642
- if (startLine < 1) return "";
643
- const lines = body.split("\n");
644
- const from = Math.max(1, startLine);
645
- const to = Math.min(endLine, lines.length);
646
- if (to < from) return "";
647
- return lines.slice(from - 1, to).join("\n");
648
- }
649
- //#endregion
650
797
  //#region src/lib/server-lock.ts
651
798
  function lockPath(repoRoot) {
652
799
  return join(getProjectStorageDir(repoRoot), "server.json");
@@ -688,4 +835,4 @@ function removeServerLock(repoRoot) {
688
835
  } catch {}
689
836
  }
690
837
  //#endregion
691
- export { revertHunk as C, listRepoFiles as S, getRepoRoot as _, extractPlanLines as a, gitAddFile as b, formatComments as c, getFileContent as d, getGitDiffAsync as f, getRepoName as g, getProjectStorageDir as h, writeServerLock as i, getBranchName as l, getMergeStatus as m, readServerLock as n, formatPlanReview as o, getHunkHistory as p, removeServerLock as r, sectionTitleForLine as s, isLockAlive as t, getCustomGitDiffAsync as u, getTabSizeForFiles as v, isSafePath as w, isGitRepo as x, getUntrackedFilePathsAsync as y };
838
+ export { toSafeRelativePath as C, isSafePath as S, getUntrackedFilePathsAsync as _, formatComments as a, listRepoFiles as b, getFileContent as c, getMergeStatus as d, getProjectStorageDir as f, getTabSizeForFiles as g, getShowDiff as h, writeServerLock as i, getGitDiffAsync as l, getRepoRoot as m, readServerLock as n, getBranchName as o, getRepoName as p, removeServerLock as r, getCustomGitDiffAsync as s, isLockAlive as t, getHunkHistory as u, gitAddFile as v, revertHunk as x, isGitRepo as y };
@@ -0,0 +1,129 @@
1
+ import { spawn } from "node:child_process";
2
+ import { fileURLToPath } from "node:url";
3
+ import { dirname, resolve } from "node:path";
4
+ import { existsSync, readFileSync } from "node:fs";
5
+ //#region src/lib/update-check.ts
6
+ /**
7
+ * Strips ANSI escape sequences from a string to compute its visible/display length.
8
+ */
9
+ function stripAnsi(str) {
10
+ return str.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "");
11
+ }
12
+ /**
13
+ * Compare two semver version strings to see if the latest version is newer.
14
+ */
15
+ function isNewerVersion(current, latest) {
16
+ const clean = (v) => v.replace(/^v/, "");
17
+ const cParts = clean(current).split(".").map(Number);
18
+ const lParts = clean(latest).split(".").map(Number);
19
+ for (let i = 0; i < 3; i++) {
20
+ const cVal = cParts[i] ?? 0;
21
+ const lVal = lParts[i] ?? 0;
22
+ if (Number.isNaN(cVal) || Number.isNaN(lVal)) continue;
23
+ if (lVal > cVal) return true;
24
+ if (lVal < cVal) return false;
25
+ }
26
+ return false;
27
+ }
28
+ /**
29
+ * Queries the npm registry asynchronously with a 1-second timeout.
30
+ */
31
+ async function checkForUpdates(currentVersion) {
32
+ try {
33
+ const controller = new AbortController();
34
+ const id = setTimeout(() => controller.abort(), 1e3);
35
+ const res = await fetch("https://registry.npmjs.org/diffing/latest", { signal: controller.signal });
36
+ clearTimeout(id);
37
+ if (!res.ok) return null;
38
+ const data = await res.json();
39
+ if (!data.version) return null;
40
+ return {
41
+ hasUpdate: isNewerVersion(currentVersion, data.version),
42
+ latestVersion: data.version
43
+ };
44
+ } catch {
45
+ return null;
46
+ }
47
+ }
48
+ /**
49
+ * Prints a beautifully styled console box letting the user know a new version is available.
50
+ */
51
+ function printUpdateDisclaimer(current, latest) {
52
+ const borderCol = "\x1B[38;5;220m";
53
+ const bold = "\x1B[1m";
54
+ const reset = "\x1B[0m";
55
+ const boxWidth = 66;
56
+ const top = borderCol + "╭" + "─".repeat(boxWidth) + "╮\x1B[0m";
57
+ const bottom = borderCol + "╰" + "─".repeat(boxWidth) + "╯\x1B[0m";
58
+ const side = borderCol + "│\x1B[0m";
59
+ const l1 = `🚀 ${bold}Update available!${reset} v${current} → \x1b[38;5;82mv${latest}${reset}`;
60
+ const l2 = `Run ${bold}diffing update${reset} to easily upgrade to the latest version.`;
61
+ const printRow = (content) => {
62
+ const displayLength = stripAnsi(content).length + (content.includes("🚀") ? 1 : 0);
63
+ const totalPadding = boxWidth - 4 - displayLength;
64
+ const pad = " ".repeat(Math.max(0, totalPadding));
65
+ console.log(`${side} ${content}${pad} ${side}`);
66
+ };
67
+ console.log();
68
+ console.log(top);
69
+ printRow("");
70
+ printRow(l1);
71
+ printRow(l2);
72
+ printRow("");
73
+ console.log(bottom);
74
+ console.log();
75
+ }
76
+ /**
77
+ * Executes the update command process.
78
+ */
79
+ async function runUpdateCommand() {
80
+ const __dirname = dirname(fileURLToPath(import.meta.url));
81
+ const pkgPath = existsSync(resolve(__dirname, "..", "package.json")) ? resolve(__dirname, "..", "package.json") : resolve(__dirname, "..", "..", "package.json");
82
+ const currentVersion = JSON.parse(readFileSync(pkgPath, "utf-8")).version;
83
+ console.log("Checking for updates...");
84
+ const updateInfo = await checkForUpdates(currentVersion);
85
+ if (!updateInfo || !updateInfo.hasUpdate) {
86
+ console.log(`\x1b[38;5;82mYou are already on the latest version of diffing (v${currentVersion})!\x1b[0m`);
87
+ return 0;
88
+ }
89
+ const latest = updateInfo.latestVersion;
90
+ console.log(`\n\x1b[38;5;75mUpdating diffing: v${currentVersion} → v${latest}...\x1b[0m\n`);
91
+ let cmd = "npm";
92
+ let args = [
93
+ "install",
94
+ "-g",
95
+ "diffing@latest"
96
+ ];
97
+ try {
98
+ const { execSync } = await import("node:child_process");
99
+ execSync("pnpm --version", { stdio: "ignore" });
100
+ cmd = "pnpm";
101
+ args = [
102
+ "add",
103
+ "-g",
104
+ "diffing@latest"
105
+ ];
106
+ } catch {}
107
+ console.log(`Running: ${cmd} ${args.join(" ")}\n`);
108
+ const exitCode = await new Promise((res) => {
109
+ const child = spawn(cmd, args, {
110
+ stdio: "inherit",
111
+ shell: true
112
+ });
113
+ child.on("close", (code) => {
114
+ res(code ?? 0);
115
+ });
116
+ child.on("error", (err) => {
117
+ console.error(`Failed to start update process: ${err.message}`);
118
+ res(1);
119
+ });
120
+ });
121
+ if (exitCode === 0) console.log(`\n\x1b[38;5;82mSuccessfully updated diffing to v${latest}!\x1b[0m\n`);
122
+ else {
123
+ console.error(`\n\x1b[38;5;196mFailed to update diffing. Please try running the command manually with sudo if required:\x1b[0m`);
124
+ console.error(` sudo ${cmd} ${args.join(" ")}\n`);
125
+ }
126
+ return exitCode;
127
+ }
128
+ //#endregion
129
+ export { checkForUpdates, printUpdateDisclaimer, runUpdateCommand };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diffing",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "local-first CLI for reviewing, navigating, and discussing git diffs with AI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -26,11 +26,17 @@
26
26
  "dist"
27
27
  ],
28
28
  "scripts": {
29
- "build": "vite build && tsdown",
29
+ "build": "vite build && tsdown && pnpm run build:tui",
30
+ "build:ts": "vite build && tsdown",
31
+ "build:tui": "cargo build --release --manifest-path crates/diffing-tui/Cargo.toml",
32
+ "build:tui:debug": "cargo build --manifest-path crates/diffing-tui/Cargo.toml",
30
33
  "changeset": "changeset",
31
34
  "dev:client": "vite",
32
35
  "dev:server": "tsx src/cli.ts --no-open --port 3433",
33
- "test": "vitest run",
36
+ "dev:tui": "cargo run --release --manifest-path crates/diffing-tui/Cargo.toml --",
37
+ "test": "vitest run && pnpm run test:tui",
38
+ "test:ts": "vitest run",
39
+ "test:tui": "cargo test --manifest-path crates/diffing-tui/Cargo.toml",
34
40
  "test:watch": "vitest",
35
41
  "prepublishOnly": "pnpm run build",
36
42
  "release": "pnpm run build && changeset publish",
@@ -48,10 +54,14 @@
48
54
  "@tanstack/react-store": "^0.11.0",
49
55
  "editorconfig": "^3.0.2",
50
56
  "get-port": "^7.2.0",
51
- "highlight.js": "^11.11.1",
52
57
  "hono": "^4.7.6",
53
- "marked": "^18.0.4",
58
+ "mermaid": "^11.15.0",
54
59
  "open": "^11.0.0",
60
+ "react-markdown": "^10.1.0",
61
+ "rehype-highlight": "^7.0.2",
62
+ "rehype-sanitize": "^6.0.0",
63
+ "remark-breaks": "^4.0.0",
64
+ "remark-gfm": "^4.0.1",
55
65
  "web-haptics": "0.0.6",
56
66
  "zod": "^4.4.3"
57
67
  },