gsd-pi 2.8.3 → 2.10.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 (1162) hide show
  1. package/README.md +2 -1
  2. package/dist/cli.js +5 -0
  3. package/dist/loader.js +1 -1
  4. package/dist/update-check.d.ts +24 -0
  5. package/dist/update-check.js +93 -0
  6. package/node_modules/@gsd/native/package.json +59 -0
  7. package/node_modules/@gsd/native/src/__tests__/clipboard.test.mjs +79 -0
  8. package/node_modules/@gsd/native/src/__tests__/fd.test.mjs +164 -0
  9. package/node_modules/@gsd/native/src/__tests__/glob.test.mjs +237 -0
  10. package/node_modules/@gsd/native/src/__tests__/grep.test.mjs +162 -0
  11. package/node_modules/@gsd/native/src/__tests__/highlight.test.mjs +156 -0
  12. package/node_modules/@gsd/native/src/__tests__/html.test.mjs +98 -0
  13. package/node_modules/@gsd/native/src/__tests__/image.test.mjs +137 -0
  14. package/node_modules/@gsd/native/src/__tests__/ps.test.mjs +109 -0
  15. package/node_modules/@gsd/native/src/__tests__/text.test.mjs +262 -0
  16. package/node_modules/@gsd/native/src/ast/index.ts +12 -0
  17. package/node_modules/@gsd/native/src/ast/types.ts +75 -0
  18. package/node_modules/@gsd/native/src/clipboard/index.ts +40 -0
  19. package/node_modules/@gsd/native/src/clipboard/types.ts +7 -0
  20. package/node_modules/@gsd/native/src/fd/index.ts +35 -0
  21. package/node_modules/@gsd/native/src/fd/types.ts +31 -0
  22. package/node_modules/@gsd/native/src/glob/index.ts +44 -0
  23. package/node_modules/@gsd/native/src/glob/types.ts +53 -0
  24. package/node_modules/@gsd/native/src/grep/index.ts +48 -0
  25. package/node_modules/@gsd/native/src/grep/types.ts +105 -0
  26. package/node_modules/@gsd/native/src/highlight/index.ts +44 -0
  27. package/node_modules/@gsd/native/src/highlight/types.ts +25 -0
  28. package/node_modules/@gsd/native/src/html/index.ts +24 -0
  29. package/node_modules/@gsd/native/src/html/types.ts +7 -0
  30. package/node_modules/@gsd/native/src/image/index.ts +28 -0
  31. package/node_modules/@gsd/native/src/image/types.ts +41 -0
  32. package/node_modules/@gsd/native/src/index.ts +88 -0
  33. package/node_modules/@gsd/native/src/native.ts +94 -0
  34. package/node_modules/@gsd/native/src/ps/index.ts +52 -0
  35. package/node_modules/@gsd/native/src/ps/types.ts +5 -0
  36. package/node_modules/@gsd/native/src/text/index.ts +125 -0
  37. package/node_modules/@gsd/native/src/text/types.ts +29 -0
  38. package/node_modules/@gsd/native/src/ttsr/index.ts +39 -0
  39. package/node_modules/@gsd/native/src/ttsr/types.ts +10 -0
  40. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.d.ts +46 -0
  41. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -0
  42. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.js +758 -0
  43. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.js.map +1 -0
  44. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.d.ts +23 -0
  45. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.d.ts.map +1 -0
  46. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.js +267 -0
  47. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.js.map +1 -0
  48. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/defaults.json +456 -0
  49. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.d.ts +17 -0
  50. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.d.ts.map +1 -0
  51. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.js +101 -0
  52. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.js.map +1 -0
  53. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.d.ts +15 -0
  54. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.d.ts.map +1 -0
  55. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.js +46 -0
  56. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.js.map +1 -0
  57. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.d.ts +35 -0
  58. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.d.ts.map +1 -0
  59. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.js +709 -0
  60. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.js.map +1 -0
  61. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts +2 -0
  62. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts.map +1 -0
  63. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.js +308 -0
  64. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.js.map +1 -0
  65. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp.md +33 -0
  66. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.d.ts +34 -0
  67. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.d.ts.map +1 -0
  68. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.js +136 -0
  69. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.js.map +1 -0
  70. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.d.ts +262 -0
  71. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.d.ts.map +1 -0
  72. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.js +64 -0
  73. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.js.map +1 -0
  74. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.d.ts +50 -0
  75. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.d.ts.map +1 -0
  76. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.js +574 -0
  77. package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.js.map +1 -0
  78. package/node_modules/@gsd/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
  79. package/node_modules/@gsd/pi-coding-agent/dist/core/slash-commands.js +1 -0
  80. package/node_modules/@gsd/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
  81. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.d.ts +1 -1
  82. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
  83. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.js +12 -77
  84. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.js.map +1 -1
  85. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.d.ts +60 -0
  86. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.d.ts.map +1 -0
  87. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.js +247 -0
  88. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.js.map +1 -0
  89. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.d.ts +43 -0
  90. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.d.ts.map +1 -0
  91. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.js +146 -0
  92. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.js.map +1 -0
  93. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.d.ts +114 -0
  94. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.d.ts.map +1 -0
  95. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.js +522 -0
  96. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.js.map +1 -0
  97. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.d.ts +2 -0
  98. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.d.ts.map +1 -0
  99. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.js +376 -0
  100. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.js.map +1 -0
  101. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.d.ts +38 -0
  102. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.d.ts.map +1 -1
  103. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.js +27 -0
  104. package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.js.map +1 -1
  105. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +10 -1
  106. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  107. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +2 -2
  108. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  109. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  110. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +6 -3
  111. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  112. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +2 -1
  113. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  114. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.js +54 -10
  115. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  116. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  117. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/theme/theme.js +25 -40
  118. package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  119. package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-image.d.ts.map +1 -1
  120. package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-image.js +17 -21
  121. package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-image.js.map +1 -1
  122. package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.d.ts +7 -6
  123. package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.d.ts.map +1 -1
  124. package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.js +7 -13
  125. package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.js.map +1 -1
  126. package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard.d.ts.map +1 -1
  127. package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard.js +3 -56
  128. package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard.js.map +1 -1
  129. package/node_modules/@gsd/pi-coding-agent/dist/utils/image-convert.d.ts.map +1 -1
  130. package/node_modules/@gsd/pi-coding-agent/dist/utils/image-convert.js +7 -17
  131. package/node_modules/@gsd/pi-coding-agent/dist/utils/image-convert.js.map +1 -1
  132. package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.d.ts +1 -2
  133. package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
  134. package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.js +21 -29
  135. package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
  136. package/node_modules/@gsd/pi-coding-agent/package.json +2 -5
  137. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/client.ts +880 -0
  138. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/config.ts +325 -0
  139. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/defaults.json +456 -0
  140. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/edits.ts +109 -0
  141. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/helpers.ts +54 -0
  142. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/index.ts +943 -0
  143. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/lsp-integration.test.ts +407 -0
  144. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/lsp.md +33 -0
  145. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/lspmux.ts +199 -0
  146. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/types.ts +421 -0
  147. package/node_modules/@gsd/pi-coding-agent/src/core/lsp/utils.ts +682 -0
  148. package/node_modules/@gsd/pi-coding-agent/src/core/slash-commands.ts +1 -0
  149. package/node_modules/@gsd/pi-coding-agent/src/core/tools/find.ts +13 -88
  150. package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline-edit.ts +318 -0
  151. package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline-read.ts +196 -0
  152. package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline.test.ts +456 -0
  153. package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline.ts +594 -0
  154. package/node_modules/@gsd/pi-coding-agent/src/core/tools/index.ts +63 -0
  155. package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +2 -2
  156. package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +5 -3
  157. package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/interactive-mode.ts +66 -12
  158. package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/theme/theme.ts +26 -42
  159. package/node_modules/@gsd/pi-coding-agent/src/utils/clipboard-image.ts +17 -24
  160. package/node_modules/@gsd/pi-coding-agent/src/utils/clipboard-native.ts +11 -21
  161. package/node_modules/@gsd/pi-coding-agent/src/utils/clipboard.ts +3 -51
  162. package/node_modules/@gsd/pi-coding-agent/src/utils/image-convert.ts +7 -17
  163. package/node_modules/@gsd/pi-coding-agent/src/utils/image-resize.ts +28 -34
  164. package/node_modules/@gsd/pi-tui/dist/autocomplete.d.ts +1 -3
  165. package/node_modules/@gsd/pi-tui/dist/autocomplete.d.ts.map +1 -1
  166. package/node_modules/@gsd/pi-tui/dist/autocomplete.js +16 -95
  167. package/node_modules/@gsd/pi-tui/dist/autocomplete.js.map +1 -1
  168. package/node_modules/@gsd/pi-tui/dist/components/image.d.ts +7 -0
  169. package/node_modules/@gsd/pi-tui/dist/components/image.d.ts.map +1 -1
  170. package/node_modules/@gsd/pi-tui/dist/components/image.js +20 -1
  171. package/node_modules/@gsd/pi-tui/dist/components/image.js.map +1 -1
  172. package/node_modules/@gsd/pi-tui/dist/index.d.ts +1 -1
  173. package/node_modules/@gsd/pi-tui/dist/index.d.ts.map +1 -1
  174. package/node_modules/@gsd/pi-tui/dist/index.js +1 -1
  175. package/node_modules/@gsd/pi-tui/dist/index.js.map +1 -1
  176. package/node_modules/@gsd/pi-tui/dist/terminal-image.d.ts +5 -5
  177. package/node_modules/@gsd/pi-tui/dist/terminal-image.d.ts.map +1 -1
  178. package/node_modules/@gsd/pi-tui/dist/terminal-image.js +9 -120
  179. package/node_modules/@gsd/pi-tui/dist/terminal-image.js.map +1 -1
  180. package/node_modules/@gsd/pi-tui/dist/utils.d.ts +23 -26
  181. package/node_modules/@gsd/pi-tui/dist/utils.d.ts.map +1 -1
  182. package/node_modules/@gsd/pi-tui/dist/utils.js +47 -716
  183. package/node_modules/@gsd/pi-tui/dist/utils.js.map +1 -1
  184. package/node_modules/@gsd/pi-tui/package.json +1 -0
  185. package/node_modules/@gsd/pi-tui/src/autocomplete.ts +17 -112
  186. package/node_modules/@gsd/pi-tui/src/components/image.ts +23 -1
  187. package/node_modules/@gsd/pi-tui/src/index.ts +0 -4
  188. package/node_modules/@gsd/pi-tui/src/terminal-image.ts +9 -135
  189. package/node_modules/@gsd/pi-tui/src/utils.ts +51 -775
  190. package/package.json +4 -1
  191. package/packages/native/package.json +59 -0
  192. package/packages/native/src/__tests__/clipboard.test.mjs +79 -0
  193. package/packages/native/src/__tests__/fd.test.mjs +164 -0
  194. package/packages/native/src/__tests__/glob.test.mjs +237 -0
  195. package/packages/native/src/__tests__/grep.test.mjs +162 -0
  196. package/packages/native/src/__tests__/highlight.test.mjs +156 -0
  197. package/packages/native/src/__tests__/html.test.mjs +98 -0
  198. package/packages/native/src/__tests__/image.test.mjs +137 -0
  199. package/packages/native/src/__tests__/ps.test.mjs +109 -0
  200. package/packages/native/src/__tests__/text.test.mjs +262 -0
  201. package/packages/native/src/ast/index.ts +12 -0
  202. package/packages/native/src/ast/types.ts +75 -0
  203. package/packages/native/src/clipboard/index.ts +40 -0
  204. package/packages/native/src/clipboard/types.ts +7 -0
  205. package/packages/native/src/fd/index.ts +35 -0
  206. package/packages/native/src/fd/types.ts +31 -0
  207. package/packages/native/src/glob/index.ts +44 -0
  208. package/packages/native/src/glob/types.ts +53 -0
  209. package/packages/native/src/grep/index.ts +48 -0
  210. package/packages/native/src/grep/types.ts +105 -0
  211. package/packages/native/src/highlight/index.ts +44 -0
  212. package/packages/native/src/highlight/types.ts +25 -0
  213. package/packages/native/src/html/index.ts +24 -0
  214. package/packages/native/src/html/types.ts +7 -0
  215. package/packages/native/src/image/index.ts +28 -0
  216. package/packages/native/src/image/types.ts +41 -0
  217. package/packages/native/src/index.ts +88 -0
  218. package/packages/native/src/native.ts +94 -0
  219. package/packages/native/src/ps/index.ts +52 -0
  220. package/packages/native/src/ps/types.ts +5 -0
  221. package/packages/native/src/text/index.ts +125 -0
  222. package/packages/native/src/text/types.ts +29 -0
  223. package/packages/native/src/ttsr/index.ts +39 -0
  224. package/packages/native/src/ttsr/types.ts +10 -0
  225. package/packages/native/tsconfig.json +8 -0
  226. package/packages/pi-coding-agent/dist/core/lsp/client.d.ts +46 -0
  227. package/packages/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -0
  228. package/packages/pi-coding-agent/dist/core/lsp/client.js +758 -0
  229. package/packages/pi-coding-agent/dist/core/lsp/client.js.map +1 -0
  230. package/packages/pi-coding-agent/dist/core/lsp/config.d.ts +23 -0
  231. package/packages/pi-coding-agent/dist/core/lsp/config.d.ts.map +1 -0
  232. package/packages/pi-coding-agent/dist/core/lsp/config.js +267 -0
  233. package/packages/pi-coding-agent/dist/core/lsp/config.js.map +1 -0
  234. package/packages/pi-coding-agent/dist/core/lsp/defaults.json +456 -0
  235. package/packages/pi-coding-agent/dist/core/lsp/edits.d.ts +17 -0
  236. package/packages/pi-coding-agent/dist/core/lsp/edits.d.ts.map +1 -0
  237. package/packages/pi-coding-agent/dist/core/lsp/edits.js +101 -0
  238. package/packages/pi-coding-agent/dist/core/lsp/edits.js.map +1 -0
  239. package/packages/pi-coding-agent/dist/core/lsp/helpers.d.ts +15 -0
  240. package/packages/pi-coding-agent/dist/core/lsp/helpers.d.ts.map +1 -0
  241. package/packages/pi-coding-agent/dist/core/lsp/helpers.js +46 -0
  242. package/packages/pi-coding-agent/dist/core/lsp/helpers.js.map +1 -0
  243. package/packages/pi-coding-agent/dist/core/lsp/index.d.ts +35 -0
  244. package/packages/pi-coding-agent/dist/core/lsp/index.d.ts.map +1 -0
  245. package/packages/pi-coding-agent/dist/core/lsp/index.js +709 -0
  246. package/packages/pi-coding-agent/dist/core/lsp/index.js.map +1 -0
  247. package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts +2 -0
  248. package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts.map +1 -0
  249. package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.js +308 -0
  250. package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.js.map +1 -0
  251. package/packages/pi-coding-agent/dist/core/lsp/lsp.md +33 -0
  252. package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts +34 -0
  253. package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts.map +1 -0
  254. package/packages/pi-coding-agent/dist/core/lsp/lspmux.js +136 -0
  255. package/packages/pi-coding-agent/dist/core/lsp/lspmux.js.map +1 -0
  256. package/packages/pi-coding-agent/dist/core/lsp/types.d.ts +262 -0
  257. package/packages/pi-coding-agent/dist/core/lsp/types.d.ts.map +1 -0
  258. package/packages/pi-coding-agent/dist/core/lsp/types.js +64 -0
  259. package/packages/pi-coding-agent/dist/core/lsp/types.js.map +1 -0
  260. package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts +50 -0
  261. package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts.map +1 -0
  262. package/packages/pi-coding-agent/dist/core/lsp/utils.js +574 -0
  263. package/packages/pi-coding-agent/dist/core/lsp/utils.js.map +1 -0
  264. package/packages/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
  265. package/packages/pi-coding-agent/dist/core/slash-commands.js +1 -0
  266. package/packages/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
  267. package/packages/pi-coding-agent/dist/core/tools/find.d.ts +1 -1
  268. package/packages/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
  269. package/packages/pi-coding-agent/dist/core/tools/find.js +12 -77
  270. package/packages/pi-coding-agent/dist/core/tools/find.js.map +1 -1
  271. package/packages/pi-coding-agent/dist/core/tools/hashline-edit.d.ts +60 -0
  272. package/packages/pi-coding-agent/dist/core/tools/hashline-edit.d.ts.map +1 -0
  273. package/packages/pi-coding-agent/dist/core/tools/hashline-edit.js +247 -0
  274. package/packages/pi-coding-agent/dist/core/tools/hashline-edit.js.map +1 -0
  275. package/packages/pi-coding-agent/dist/core/tools/hashline-read.d.ts +43 -0
  276. package/packages/pi-coding-agent/dist/core/tools/hashline-read.d.ts.map +1 -0
  277. package/packages/pi-coding-agent/dist/core/tools/hashline-read.js +146 -0
  278. package/packages/pi-coding-agent/dist/core/tools/hashline-read.js.map +1 -0
  279. package/packages/pi-coding-agent/dist/core/tools/hashline.d.ts +114 -0
  280. package/packages/pi-coding-agent/dist/core/tools/hashline.d.ts.map +1 -0
  281. package/packages/pi-coding-agent/dist/core/tools/hashline.js +522 -0
  282. package/packages/pi-coding-agent/dist/core/tools/hashline.js.map +1 -0
  283. package/packages/pi-coding-agent/dist/core/tools/hashline.test.d.ts +2 -0
  284. package/packages/pi-coding-agent/dist/core/tools/hashline.test.d.ts.map +1 -0
  285. package/packages/pi-coding-agent/dist/core/tools/hashline.test.js +376 -0
  286. package/packages/pi-coding-agent/dist/core/tools/hashline.test.js.map +1 -0
  287. package/packages/pi-coding-agent/dist/core/tools/index.d.ts +38 -0
  288. package/packages/pi-coding-agent/dist/core/tools/index.d.ts.map +1 -1
  289. package/packages/pi-coding-agent/dist/core/tools/index.js +27 -0
  290. package/packages/pi-coding-agent/dist/core/tools/index.js.map +1 -1
  291. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +10 -1
  292. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  293. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +2 -2
  294. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  295. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  296. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +6 -3
  297. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  298. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +2 -1
  299. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  300. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +54 -10
  301. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  302. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  303. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +25 -40
  304. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  305. package/packages/pi-coding-agent/dist/utils/clipboard-image.d.ts.map +1 -1
  306. package/packages/pi-coding-agent/dist/utils/clipboard-image.js +17 -21
  307. package/packages/pi-coding-agent/dist/utils/clipboard-image.js.map +1 -1
  308. package/packages/pi-coding-agent/dist/utils/clipboard-native.d.ts +7 -6
  309. package/packages/pi-coding-agent/dist/utils/clipboard-native.d.ts.map +1 -1
  310. package/packages/pi-coding-agent/dist/utils/clipboard-native.js +7 -13
  311. package/packages/pi-coding-agent/dist/utils/clipboard-native.js.map +1 -1
  312. package/packages/pi-coding-agent/dist/utils/clipboard.d.ts.map +1 -1
  313. package/packages/pi-coding-agent/dist/utils/clipboard.js +3 -56
  314. package/packages/pi-coding-agent/dist/utils/clipboard.js.map +1 -1
  315. package/packages/pi-coding-agent/dist/utils/image-convert.d.ts.map +1 -1
  316. package/packages/pi-coding-agent/dist/utils/image-convert.js +7 -17
  317. package/packages/pi-coding-agent/dist/utils/image-convert.js.map +1 -1
  318. package/packages/pi-coding-agent/dist/utils/image-resize.d.ts +1 -2
  319. package/packages/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
  320. package/packages/pi-coding-agent/dist/utils/image-resize.js +21 -29
  321. package/packages/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
  322. package/packages/pi-coding-agent/package.json +2 -5
  323. package/packages/pi-coding-agent/src/core/lsp/client.ts +880 -0
  324. package/packages/pi-coding-agent/src/core/lsp/config.ts +325 -0
  325. package/packages/pi-coding-agent/src/core/lsp/defaults.json +456 -0
  326. package/packages/pi-coding-agent/src/core/lsp/edits.ts +109 -0
  327. package/packages/pi-coding-agent/src/core/lsp/helpers.ts +54 -0
  328. package/packages/pi-coding-agent/src/core/lsp/index.ts +943 -0
  329. package/packages/pi-coding-agent/src/core/lsp/lsp-integration.test.ts +407 -0
  330. package/packages/pi-coding-agent/src/core/lsp/lsp.md +33 -0
  331. package/packages/pi-coding-agent/src/core/lsp/lspmux.ts +199 -0
  332. package/packages/pi-coding-agent/src/core/lsp/types.ts +421 -0
  333. package/packages/pi-coding-agent/src/core/lsp/utils.ts +682 -0
  334. package/packages/pi-coding-agent/src/core/slash-commands.ts +1 -0
  335. package/packages/pi-coding-agent/src/core/tools/find.ts +13 -88
  336. package/packages/pi-coding-agent/src/core/tools/hashline-edit.ts +318 -0
  337. package/packages/pi-coding-agent/src/core/tools/hashline-read.ts +196 -0
  338. package/packages/pi-coding-agent/src/core/tools/hashline.test.ts +456 -0
  339. package/packages/pi-coding-agent/src/core/tools/hashline.ts +594 -0
  340. package/packages/pi-coding-agent/src/core/tools/index.ts +63 -0
  341. package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +2 -2
  342. package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +5 -3
  343. package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +66 -12
  344. package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +26 -42
  345. package/packages/pi-coding-agent/src/utils/clipboard-image.ts +17 -24
  346. package/packages/pi-coding-agent/src/utils/clipboard-native.ts +11 -21
  347. package/packages/pi-coding-agent/src/utils/clipboard.ts +3 -51
  348. package/packages/pi-coding-agent/src/utils/image-convert.ts +7 -17
  349. package/packages/pi-coding-agent/src/utils/image-resize.ts +28 -34
  350. package/packages/pi-tui/dist/autocomplete.d.ts +1 -3
  351. package/packages/pi-tui/dist/autocomplete.d.ts.map +1 -1
  352. package/packages/pi-tui/dist/autocomplete.js +16 -95
  353. package/packages/pi-tui/dist/autocomplete.js.map +1 -1
  354. package/packages/pi-tui/dist/components/image.d.ts +7 -0
  355. package/packages/pi-tui/dist/components/image.d.ts.map +1 -1
  356. package/packages/pi-tui/dist/components/image.js +20 -1
  357. package/packages/pi-tui/dist/components/image.js.map +1 -1
  358. package/packages/pi-tui/dist/index.d.ts +1 -1
  359. package/packages/pi-tui/dist/index.d.ts.map +1 -1
  360. package/packages/pi-tui/dist/index.js +1 -1
  361. package/packages/pi-tui/dist/index.js.map +1 -1
  362. package/packages/pi-tui/dist/terminal-image.d.ts +5 -5
  363. package/packages/pi-tui/dist/terminal-image.d.ts.map +1 -1
  364. package/packages/pi-tui/dist/terminal-image.js +9 -120
  365. package/packages/pi-tui/dist/terminal-image.js.map +1 -1
  366. package/packages/pi-tui/dist/utils.d.ts +23 -26
  367. package/packages/pi-tui/dist/utils.d.ts.map +1 -1
  368. package/packages/pi-tui/dist/utils.js +47 -716
  369. package/packages/pi-tui/dist/utils.js.map +1 -1
  370. package/packages/pi-tui/package.json +1 -0
  371. package/packages/pi-tui/src/autocomplete.ts +17 -112
  372. package/packages/pi-tui/src/components/image.ts +23 -1
  373. package/packages/pi-tui/src/index.ts +0 -4
  374. package/packages/pi-tui/src/terminal-image.ts +9 -135
  375. package/packages/pi-tui/src/utils.ts +51 -775
  376. package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  377. package/pkg/dist/modes/interactive/theme/theme.js +25 -40
  378. package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
  379. package/src/resources/extensions/ask-user-questions.ts +2 -2
  380. package/src/resources/extensions/bg-shell/index.ts +377 -51
  381. package/src/resources/extensions/browser-tools/core.d.ts +205 -0
  382. package/src/resources/extensions/browser-tools/index.ts +2 -2
  383. package/src/resources/extensions/browser-tools/refs.ts +1 -1
  384. package/src/resources/extensions/browser-tools/tools/session.ts +1 -1
  385. package/src/resources/extensions/context7/index.ts +2 -2
  386. package/src/resources/extensions/get-secrets-from-user.ts +3 -2
  387. package/src/resources/extensions/google-search/index.ts +1 -1
  388. package/src/resources/extensions/gsd/auto.ts +41 -4
  389. package/src/resources/extensions/gsd/commands.ts +218 -3
  390. package/src/resources/extensions/gsd/doctor.ts +1 -1
  391. package/src/resources/extensions/gsd/git-service.ts +129 -5
  392. package/src/resources/extensions/gsd/guided-flow.ts +19 -9
  393. package/src/resources/extensions/gsd/index.ts +17 -7
  394. package/src/resources/extensions/gsd/preferences.ts +1 -1
  395. package/src/resources/extensions/gsd/tests/git-service.test.ts +226 -0
  396. package/src/resources/extensions/gsd/tests/migrate-command.test.ts +2 -2
  397. package/src/resources/extensions/gsd/tests/migrate-transformer.test.ts +1 -1
  398. package/src/resources/extensions/gsd/tests/migrate-writer-integration.test.ts +10 -10
  399. package/src/resources/extensions/gsd/tests/next-milestone-id.test.ts +87 -0
  400. package/src/resources/extensions/gsd/tests/worktree.test.ts +352 -0
  401. package/src/resources/extensions/gsd/types.ts +1 -0
  402. package/src/resources/extensions/gsd/worktree.ts +20 -1
  403. package/src/resources/extensions/mac-tools/index.ts +1 -1
  404. package/src/resources/extensions/search-the-web/format.ts +1 -1
  405. package/src/resources/extensions/search-the-web/index.ts +5 -5
  406. package/src/resources/extensions/search-the-web/tool-fetch-page.ts +7 -7
  407. package/src/resources/extensions/search-the-web/tool-llm-context.ts +11 -11
  408. package/src/resources/extensions/search-the-web/tool-search.ts +10 -10
  409. package/src/resources/extensions/shared/interview-ui.ts +2 -2
  410. package/src/resources/extensions/universal-config/discovery.ts +78 -0
  411. package/src/resources/extensions/universal-config/format.ts +160 -0
  412. package/src/resources/extensions/universal-config/index.ts +118 -0
  413. package/src/resources/extensions/universal-config/package.json +11 -0
  414. package/src/resources/extensions/universal-config/scanners.ts +579 -0
  415. package/src/resources/extensions/universal-config/tests/discovery.test.ts +111 -0
  416. package/src/resources/extensions/universal-config/tests/format.test.ts +111 -0
  417. package/src/resources/extensions/universal-config/tests/scanners.test.ts +438 -0
  418. package/src/resources/extensions/universal-config/tools.ts +60 -0
  419. package/src/resources/extensions/universal-config/types.ts +116 -0
  420. package/node_modules/@mariozechner/clipboard/.yarnrc.yml +0 -1
  421. package/node_modules/@mariozechner/clipboard/Cargo.toml +0 -26
  422. package/node_modules/@mariozechner/clipboard/README.md +0 -58
  423. package/node_modules/@mariozechner/clipboard/build.rs +0 -5
  424. package/node_modules/@mariozechner/clipboard/exp.ts +0 -12
  425. package/node_modules/@mariozechner/clipboard/index.d.ts +0 -23
  426. package/node_modules/@mariozechner/clipboard/index.js +0 -317
  427. package/node_modules/@mariozechner/clipboard/package.json +0 -56
  428. package/node_modules/@mariozechner/clipboard/src/lib.rs +0 -191
  429. package/node_modules/@mariozechner/clipboard-darwin-arm64/README.md +0 -3
  430. package/node_modules/@mariozechner/clipboard-darwin-arm64/clipboard.darwin-arm64.node +0 -0
  431. package/node_modules/@mariozechner/clipboard-darwin-arm64/package.json +0 -22
  432. package/node_modules/@mariozechner/clipboard-darwin-universal/README.md +0 -3
  433. package/node_modules/@mariozechner/clipboard-darwin-universal/clipboard.darwin-universal.node +0 -0
  434. package/node_modules/@mariozechner/clipboard-darwin-universal/package.json +0 -19
  435. package/node_modules/ansi-styles/index.d.ts +0 -345
  436. package/node_modules/ansi-styles/index.js +0 -163
  437. package/node_modules/ansi-styles/license +0 -9
  438. package/node_modules/ansi-styles/package.json +0 -56
  439. package/node_modules/ansi-styles/readme.md +0 -152
  440. package/node_modules/any-promise/.jshintrc +0 -4
  441. package/node_modules/any-promise/.npmignore +0 -7
  442. package/node_modules/any-promise/LICENSE +0 -19
  443. package/node_modules/any-promise/README.md +0 -161
  444. package/node_modules/any-promise/implementation.d.ts +0 -3
  445. package/node_modules/any-promise/implementation.js +0 -1
  446. package/node_modules/any-promise/index.d.ts +0 -73
  447. package/node_modules/any-promise/index.js +0 -1
  448. package/node_modules/any-promise/loader.js +0 -78
  449. package/node_modules/any-promise/optional.js +0 -6
  450. package/node_modules/any-promise/package.json +0 -45
  451. package/node_modules/any-promise/register/bluebird.d.ts +0 -1
  452. package/node_modules/any-promise/register/bluebird.js +0 -2
  453. package/node_modules/any-promise/register/es6-promise.d.ts +0 -1
  454. package/node_modules/any-promise/register/es6-promise.js +0 -2
  455. package/node_modules/any-promise/register/lie.d.ts +0 -1
  456. package/node_modules/any-promise/register/lie.js +0 -2
  457. package/node_modules/any-promise/register/native-promise-only.d.ts +0 -1
  458. package/node_modules/any-promise/register/native-promise-only.js +0 -2
  459. package/node_modules/any-promise/register/pinkie.d.ts +0 -1
  460. package/node_modules/any-promise/register/pinkie.js +0 -2
  461. package/node_modules/any-promise/register/promise.d.ts +0 -1
  462. package/node_modules/any-promise/register/promise.js +0 -2
  463. package/node_modules/any-promise/register/q.d.ts +0 -1
  464. package/node_modules/any-promise/register/q.js +0 -2
  465. package/node_modules/any-promise/register/rsvp.d.ts +0 -1
  466. package/node_modules/any-promise/register/rsvp.js +0 -2
  467. package/node_modules/any-promise/register/vow.d.ts +0 -1
  468. package/node_modules/any-promise/register/vow.js +0 -2
  469. package/node_modules/any-promise/register/when.d.ts +0 -1
  470. package/node_modules/any-promise/register/when.js +0 -2
  471. package/node_modules/any-promise/register-shim.js +0 -18
  472. package/node_modules/any-promise/register.d.ts +0 -17
  473. package/node_modules/any-promise/register.js +0 -94
  474. package/node_modules/cli-highlight/LICENSE.txt +0 -15
  475. package/node_modules/cli-highlight/README.md +0 -88
  476. package/node_modules/cli-highlight/bin/highlight +0 -2
  477. package/node_modules/cli-highlight/dist/cli.d.ts +0 -1
  478. package/node_modules/cli-highlight/dist/cli.js +0 -102
  479. package/node_modules/cli-highlight/dist/cli.js.map +0 -1
  480. package/node_modules/cli-highlight/dist/index.d.ts +0 -53
  481. package/node_modules/cli-highlight/dist/index.js +0 -112
  482. package/node_modules/cli-highlight/dist/index.js.map +0 -1
  483. package/node_modules/cli-highlight/dist/test/test.d.ts +0 -1
  484. package/node_modules/cli-highlight/dist/test/test.js +0 -62
  485. package/node_modules/cli-highlight/dist/test/test.js.map +0 -1
  486. package/node_modules/cli-highlight/dist/theme.d.ts +0 -270
  487. package/node_modules/cli-highlight/dist/theme.js +0 -265
  488. package/node_modules/cli-highlight/dist/theme.js.map +0 -1
  489. package/node_modules/cli-highlight/node_modules/chalk/index.d.ts +0 -415
  490. package/node_modules/cli-highlight/node_modules/chalk/license +0 -9
  491. package/node_modules/cli-highlight/node_modules/chalk/package.json +0 -68
  492. package/node_modules/cli-highlight/node_modules/chalk/readme.md +0 -341
  493. package/node_modules/cli-highlight/node_modules/chalk/source/index.js +0 -229
  494. package/node_modules/cli-highlight/node_modules/chalk/source/templates.js +0 -134
  495. package/node_modules/cli-highlight/node_modules/chalk/source/util.js +0 -39
  496. package/node_modules/cli-highlight/package.json +0 -129
  497. package/node_modules/cliui/CHANGELOG.md +0 -121
  498. package/node_modules/cliui/LICENSE.txt +0 -14
  499. package/node_modules/cliui/README.md +0 -141
  500. package/node_modules/cliui/build/index.cjs +0 -302
  501. package/node_modules/cliui/build/lib/index.js +0 -287
  502. package/node_modules/cliui/build/lib/string-utils.js +0 -27
  503. package/node_modules/cliui/index.mjs +0 -13
  504. package/node_modules/cliui/node_modules/ansi-regex/index.d.ts +0 -37
  505. package/node_modules/cliui/node_modules/ansi-regex/index.js +0 -10
  506. package/node_modules/cliui/node_modules/ansi-regex/license +0 -9
  507. package/node_modules/cliui/node_modules/ansi-regex/package.json +0 -55
  508. package/node_modules/cliui/node_modules/ansi-regex/readme.md +0 -78
  509. package/node_modules/cliui/node_modules/strip-ansi/index.d.ts +0 -17
  510. package/node_modules/cliui/node_modules/strip-ansi/index.js +0 -4
  511. package/node_modules/cliui/node_modules/strip-ansi/license +0 -9
  512. package/node_modules/cliui/node_modules/strip-ansi/package.json +0 -54
  513. package/node_modules/cliui/node_modules/strip-ansi/readme.md +0 -46
  514. package/node_modules/cliui/package.json +0 -83
  515. package/node_modules/color-convert/CHANGELOG.md +0 -54
  516. package/node_modules/color-convert/LICENSE +0 -21
  517. package/node_modules/color-convert/README.md +0 -68
  518. package/node_modules/color-convert/conversions.js +0 -839
  519. package/node_modules/color-convert/index.js +0 -81
  520. package/node_modules/color-convert/package.json +0 -48
  521. package/node_modules/color-convert/route.js +0 -97
  522. package/node_modules/color-name/LICENSE +0 -8
  523. package/node_modules/color-name/README.md +0 -11
  524. package/node_modules/color-name/index.js +0 -152
  525. package/node_modules/color-name/package.json +0 -28
  526. package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  527. package/node_modules/emoji-regex/README.md +0 -73
  528. package/node_modules/emoji-regex/es2015/index.js +0 -6
  529. package/node_modules/emoji-regex/es2015/text.js +0 -6
  530. package/node_modules/emoji-regex/index.d.ts +0 -23
  531. package/node_modules/emoji-regex/index.js +0 -6
  532. package/node_modules/emoji-regex/package.json +0 -50
  533. package/node_modules/emoji-regex/text.js +0 -6
  534. package/node_modules/escalade/dist/index.js +0 -22
  535. package/node_modules/escalade/dist/index.mjs +0 -22
  536. package/node_modules/escalade/index.d.mts +0 -11
  537. package/node_modules/escalade/index.d.ts +0 -15
  538. package/node_modules/escalade/license +0 -9
  539. package/node_modules/escalade/package.json +0 -74
  540. package/node_modules/escalade/readme.md +0 -211
  541. package/node_modules/escalade/sync/index.d.mts +0 -9
  542. package/node_modules/escalade/sync/index.d.ts +0 -13
  543. package/node_modules/escalade/sync/index.js +0 -18
  544. package/node_modules/escalade/sync/index.mjs +0 -18
  545. package/node_modules/esprima/ChangeLog +0 -235
  546. package/node_modules/get-caller-file/LICENSE.md +0 -6
  547. package/node_modules/get-caller-file/README.md +0 -41
  548. package/node_modules/get-caller-file/index.d.ts +0 -2
  549. package/node_modules/get-caller-file/index.js +0 -22
  550. package/node_modules/get-caller-file/index.js.map +0 -1
  551. package/node_modules/get-caller-file/package.json +0 -42
  552. package/node_modules/has-flag/index.d.ts +0 -39
  553. package/node_modules/has-flag/index.js +0 -8
  554. package/node_modules/has-flag/license +0 -9
  555. package/node_modules/has-flag/package.json +0 -46
  556. package/node_modules/has-flag/readme.md +0 -89
  557. package/node_modules/highlight.js/LICENSE +0 -29
  558. package/node_modules/highlight.js/README.md +0 -371
  559. package/node_modules/highlight.js/lib/core.js +0 -2517
  560. package/node_modules/highlight.js/lib/highlight.js +0 -2
  561. package/node_modules/highlight.js/lib/index.js +0 -195
  562. package/node_modules/highlight.js/lib/languages/1c.js +0 -521
  563. package/node_modules/highlight.js/lib/languages/abnf.js +0 -103
  564. package/node_modules/highlight.js/lib/languages/accesslog.js +0 -127
  565. package/node_modules/highlight.js/lib/languages/actionscript.js +0 -113
  566. package/node_modules/highlight.js/lib/languages/ada.js +0 -194
  567. package/node_modules/highlight.js/lib/languages/angelscript.js +0 -123
  568. package/node_modules/highlight.js/lib/languages/apache.js +0 -89
  569. package/node_modules/highlight.js/lib/languages/applescript.js +0 -189
  570. package/node_modules/highlight.js/lib/languages/arcade.js +0 -165
  571. package/node_modules/highlight.js/lib/languages/arduino.js +0 -576
  572. package/node_modules/highlight.js/lib/languages/armasm.js +0 -131
  573. package/node_modules/highlight.js/lib/languages/asciidoc.js +0 -303
  574. package/node_modules/highlight.js/lib/languages/aspectj.js +0 -186
  575. package/node_modules/highlight.js/lib/languages/autohotkey.js +0 -84
  576. package/node_modules/highlight.js/lib/languages/autoit.js +0 -183
  577. package/node_modules/highlight.js/lib/languages/avrasm.js +0 -80
  578. package/node_modules/highlight.js/lib/languages/awk.js +0 -73
  579. package/node_modules/highlight.js/lib/languages/axapta.js +0 -179
  580. package/node_modules/highlight.js/lib/languages/bash.js +0 -169
  581. package/node_modules/highlight.js/lib/languages/basic.js +0 -65
  582. package/node_modules/highlight.js/lib/languages/bnf.js +0 -38
  583. package/node_modules/highlight.js/lib/languages/brainfuck.js +0 -46
  584. package/node_modules/highlight.js/lib/languages/c-like.js +0 -501
  585. package/node_modules/highlight.js/lib/languages/c.js +0 -309
  586. package/node_modules/highlight.js/lib/languages/cal.js +0 -104
  587. package/node_modules/highlight.js/lib/languages/capnproto.js +0 -64
  588. package/node_modules/highlight.js/lib/languages/ceylon.js +0 -82
  589. package/node_modules/highlight.js/lib/languages/clean.js +0 -40
  590. package/node_modules/highlight.js/lib/languages/clojure-repl.js +0 -27
  591. package/node_modules/highlight.js/lib/languages/clojure.js +0 -158
  592. package/node_modules/highlight.js/lib/languages/cmake.js +0 -64
  593. package/node_modules/highlight.js/lib/languages/coffeescript.js +0 -356
  594. package/node_modules/highlight.js/lib/languages/coq.js +0 -79
  595. package/node_modules/highlight.js/lib/languages/cos.js +0 -138
  596. package/node_modules/highlight.js/lib/languages/cpp.js +0 -464
  597. package/node_modules/highlight.js/lib/languages/crmsh.js +0 -102
  598. package/node_modules/highlight.js/lib/languages/crystal.js +0 -326
  599. package/node_modules/highlight.js/lib/languages/csharp.js +0 -441
  600. package/node_modules/highlight.js/lib/languages/csp.js +0 -37
  601. package/node_modules/highlight.js/lib/languages/css.js +0 -608
  602. package/node_modules/highlight.js/lib/languages/d.js +0 -271
  603. package/node_modules/highlight.js/lib/languages/dart.js +0 -199
  604. package/node_modules/highlight.js/lib/languages/delphi.js +0 -126
  605. package/node_modules/highlight.js/lib/languages/diff.js +0 -85
  606. package/node_modules/highlight.js/lib/languages/django.js +0 -77
  607. package/node_modules/highlight.js/lib/languages/dns.js +0 -46
  608. package/node_modules/highlight.js/lib/languages/dockerfile.js +0 -34
  609. package/node_modules/highlight.js/lib/languages/dos.js +0 -70
  610. package/node_modules/highlight.js/lib/languages/dsconfig.js +0 -66
  611. package/node_modules/highlight.js/lib/languages/dts.js +0 -153
  612. package/node_modules/highlight.js/lib/languages/dust.js +0 -45
  613. package/node_modules/highlight.js/lib/languages/ebnf.js +0 -53
  614. package/node_modules/highlight.js/lib/languages/elixir.js +0 -259
  615. package/node_modules/highlight.js/lib/languages/elm.js +0 -129
  616. package/node_modules/highlight.js/lib/languages/erb.js +0 -29
  617. package/node_modules/highlight.js/lib/languages/erlang-repl.js +0 -86
  618. package/node_modules/highlight.js/lib/languages/erlang.js +0 -199
  619. package/node_modules/highlight.js/lib/languages/excel.js +0 -64
  620. package/node_modules/highlight.js/lib/languages/fix.js +0 -37
  621. package/node_modules/highlight.js/lib/languages/flix.js +0 -54
  622. package/node_modules/highlight.js/lib/languages/fortran.js +0 -159
  623. package/node_modules/highlight.js/lib/languages/fsharp.js +0 -86
  624. package/node_modules/highlight.js/lib/languages/gams.js +0 -208
  625. package/node_modules/highlight.js/lib/languages/gauss.js +0 -316
  626. package/node_modules/highlight.js/lib/languages/gcode.js +0 -88
  627. package/node_modules/highlight.js/lib/languages/gherkin.js +0 -49
  628. package/node_modules/highlight.js/lib/languages/glsl.js +0 -128
  629. package/node_modules/highlight.js/lib/languages/gml.js +0 -885
  630. package/node_modules/highlight.js/lib/languages/go.js +0 -74
  631. package/node_modules/highlight.js/lib/languages/golo.js +0 -33
  632. package/node_modules/highlight.js/lib/languages/gradle.js +0 -44
  633. package/node_modules/highlight.js/lib/languages/groovy.js +0 -174
  634. package/node_modules/highlight.js/lib/languages/haml.js +0 -117
  635. package/node_modules/highlight.js/lib/languages/handlebars.js +0 -324
  636. package/node_modules/highlight.js/lib/languages/haskell.js +0 -173
  637. package/node_modules/highlight.js/lib/languages/haxe.js +0 -157
  638. package/node_modules/highlight.js/lib/languages/hsp.js +0 -65
  639. package/node_modules/highlight.js/lib/languages/htmlbars.js +0 -352
  640. package/node_modules/highlight.js/lib/languages/http.js +0 -121
  641. package/node_modules/highlight.js/lib/languages/hy.js +0 -109
  642. package/node_modules/highlight.js/lib/languages/inform7.js +0 -70
  643. package/node_modules/highlight.js/lib/languages/ini.js +0 -173
  644. package/node_modules/highlight.js/lib/languages/irpf90.js +0 -141
  645. package/node_modules/highlight.js/lib/languages/isbl.js +0 -3207
  646. package/node_modules/highlight.js/lib/languages/java.js +0 -181
  647. package/node_modules/highlight.js/lib/languages/javascript.js +0 -604
  648. package/node_modules/highlight.js/lib/languages/jboss-cli.js +0 -63
  649. package/node_modules/highlight.js/lib/languages/json.js +0 -63
  650. package/node_modules/highlight.js/lib/languages/julia-repl.js +0 -50
  651. package/node_modules/highlight.js/lib/languages/julia.js +0 -416
  652. package/node_modules/highlight.js/lib/languages/kotlin.js +0 -284
  653. package/node_modules/highlight.js/lib/languages/lasso.js +0 -187
  654. package/node_modules/highlight.js/lib/languages/latex.js +0 -276
  655. package/node_modules/highlight.js/lib/languages/ldif.js +0 -42
  656. package/node_modules/highlight.js/lib/languages/leaf.js +0 -49
  657. package/node_modules/highlight.js/lib/languages/less.js +0 -666
  658. package/node_modules/highlight.js/lib/languages/lisp.js +0 -111
  659. package/node_modules/highlight.js/lib/languages/livecodeserver.js +0 -189
  660. package/node_modules/highlight.js/lib/languages/livescript.js +0 -374
  661. package/node_modules/highlight.js/lib/languages/llvm.js +0 -154
  662. package/node_modules/highlight.js/lib/languages/lsl.js +0 -95
  663. package/node_modules/highlight.js/lib/languages/lua.js +0 -82
  664. package/node_modules/highlight.js/lib/languages/makefile.js +0 -92
  665. package/node_modules/highlight.js/lib/languages/markdown.js +0 -258
  666. package/node_modules/highlight.js/lib/languages/mathematica.js +0 -6797
  667. package/node_modules/highlight.js/lib/languages/matlab.js +0 -106
  668. package/node_modules/highlight.js/lib/languages/maxima.js +0 -417
  669. package/node_modules/highlight.js/lib/languages/mel.js +0 -236
  670. package/node_modules/highlight.js/lib/languages/mercury.js +0 -121
  671. package/node_modules/highlight.js/lib/languages/mipsasm.js +0 -109
  672. package/node_modules/highlight.js/lib/languages/mizar.js +0 -29
  673. package/node_modules/highlight.js/lib/languages/mojolicious.js +0 -36
  674. package/node_modules/highlight.js/lib/languages/monkey.js +0 -89
  675. package/node_modules/highlight.js/lib/languages/moonscript.js +0 -147
  676. package/node_modules/highlight.js/lib/languages/n1ql.js +0 -77
  677. package/node_modules/highlight.js/lib/languages/nginx.js +0 -140
  678. package/node_modules/highlight.js/lib/languages/nim.js +0 -79
  679. package/node_modules/highlight.js/lib/languages/nix.js +0 -65
  680. package/node_modules/highlight.js/lib/languages/node-repl.js +0 -37
  681. package/node_modules/highlight.js/lib/languages/nsis.js +0 -119
  682. package/node_modules/highlight.js/lib/languages/objectivec.js +0 -121
  683. package/node_modules/highlight.js/lib/languages/ocaml.js +0 -82
  684. package/node_modules/highlight.js/lib/languages/openscad.js +0 -81
  685. package/node_modules/highlight.js/lib/languages/oxygene.js +0 -101
  686. package/node_modules/highlight.js/lib/languages/parser3.js +0 -57
  687. package/node_modules/highlight.js/lib/languages/perl.js +0 -515
  688. package/node_modules/highlight.js/lib/languages/pf.js +0 -59
  689. package/node_modules/highlight.js/lib/languages/pgsql.js +0 -630
  690. package/node_modules/highlight.js/lib/languages/php-template.js +0 -54
  691. package/node_modules/highlight.js/lib/languages/php.js +0 -204
  692. package/node_modules/highlight.js/lib/languages/plaintext.js +0 -19
  693. package/node_modules/highlight.js/lib/languages/pony.js +0 -89
  694. package/node_modules/highlight.js/lib/languages/powershell.js +0 -331
  695. package/node_modules/highlight.js/lib/languages/processing.js +0 -58
  696. package/node_modules/highlight.js/lib/languages/profile.js +0 -43
  697. package/node_modules/highlight.js/lib/languages/prolog.js +0 -102
  698. package/node_modules/highlight.js/lib/languages/properties.js +0 -85
  699. package/node_modules/highlight.js/lib/languages/protobuf.js +0 -47
  700. package/node_modules/highlight.js/lib/languages/puppet.js +0 -147
  701. package/node_modules/highlight.js/lib/languages/purebasic.js +0 -101
  702. package/node_modules/highlight.js/lib/languages/python-repl.js +0 -36
  703. package/node_modules/highlight.js/lib/languages/python.js +0 -446
  704. package/node_modules/highlight.js/lib/languages/q.js +0 -37
  705. package/node_modules/highlight.js/lib/languages/qml.js +0 -225
  706. package/node_modules/highlight.js/lib/languages/r.js +0 -231
  707. package/node_modules/highlight.js/lib/languages/reasonml.js +0 -321
  708. package/node_modules/highlight.js/lib/languages/rib.js +0 -37
  709. package/node_modules/highlight.js/lib/languages/roboconf.js +0 -82
  710. package/node_modules/highlight.js/lib/languages/routeros.js +0 -172
  711. package/node_modules/highlight.js/lib/languages/rsl.js +0 -49
  712. package/node_modules/highlight.js/lib/languages/ruby.js +0 -387
  713. package/node_modules/highlight.js/lib/languages/ruleslanguage.js +0 -78
  714. package/node_modules/highlight.js/lib/languages/rust.js +0 -146
  715. package/node_modules/highlight.js/lib/languages/sas.js +0 -133
  716. package/node_modules/highlight.js/lib/languages/scala.js +0 -140
  717. package/node_modules/highlight.js/lib/languages/scheme.js +0 -207
  718. package/node_modules/highlight.js/lib/languages/scilab.js +0 -73
  719. package/node_modules/highlight.js/lib/languages/scss.js +0 -545
  720. package/node_modules/highlight.js/lib/languages/shell.js +0 -30
  721. package/node_modules/highlight.js/lib/languages/smali.js +0 -135
  722. package/node_modules/highlight.js/lib/languages/smalltalk.js +0 -63
  723. package/node_modules/highlight.js/lib/languages/sml.js +0 -81
  724. package/node_modules/highlight.js/lib/languages/sqf.js +0 -448
  725. package/node_modules/highlight.js/lib/languages/sql.js +0 -699
  726. package/node_modules/highlight.js/lib/languages/sql_more.js +0 -183
  727. package/node_modules/highlight.js/lib/languages/stan.js +0 -548
  728. package/node_modules/highlight.js/lib/languages/stata.js +0 -60
  729. package/node_modules/highlight.js/lib/languages/step21.js +0 -66
  730. package/node_modules/highlight.js/lib/languages/stylus.js +0 -609
  731. package/node_modules/highlight.js/lib/languages/subunit.js +0 -51
  732. package/node_modules/highlight.js/lib/languages/swift.js +0 -873
  733. package/node_modules/highlight.js/lib/languages/taggerscript.js +0 -52
  734. package/node_modules/highlight.js/lib/languages/tap.js +0 -55
  735. package/node_modules/highlight.js/lib/languages/tcl.js +0 -115
  736. package/node_modules/highlight.js/lib/languages/thrift.js +0 -51
  737. package/node_modules/highlight.js/lib/languages/tp.js +0 -95
  738. package/node_modules/highlight.js/lib/languages/twig.js +0 -77
  739. package/node_modules/highlight.js/lib/languages/typescript.js +0 -697
  740. package/node_modules/highlight.js/lib/languages/vala.js +0 -61
  741. package/node_modules/highlight.js/lib/languages/vbnet.js +0 -214
  742. package/node_modules/highlight.js/lib/languages/vbscript-html.js +0 -24
  743. package/node_modules/highlight.js/lib/languages/vbscript.js +0 -109
  744. package/node_modules/highlight.js/lib/languages/verilog.js +0 -131
  745. package/node_modules/highlight.js/lib/languages/vhdl.js +0 -71
  746. package/node_modules/highlight.js/lib/languages/vim.js +0 -123
  747. package/node_modules/highlight.js/lib/languages/x86asm.js +0 -163
  748. package/node_modules/highlight.js/lib/languages/xl.js +0 -92
  749. package/node_modules/highlight.js/lib/languages/xml.js +0 -287
  750. package/node_modules/highlight.js/lib/languages/xquery.js +0 -197
  751. package/node_modules/highlight.js/lib/languages/yaml.js +0 -176
  752. package/node_modules/highlight.js/lib/languages/zephir.js +0 -140
  753. package/node_modules/highlight.js/package.json +0 -86
  754. package/node_modules/highlight.js/scss/a11y-dark.scss +0 -99
  755. package/node_modules/highlight.js/scss/a11y-light.scss +0 -99
  756. package/node_modules/highlight.js/scss/agate.scss +0 -108
  757. package/node_modules/highlight.js/scss/an-old-hope.scss +0 -89
  758. package/node_modules/highlight.js/scss/androidstudio.scss +0 -66
  759. package/node_modules/highlight.js/scss/arduino-light.scss +0 -87
  760. package/node_modules/highlight.js/scss/arta.scss +0 -73
  761. package/node_modules/highlight.js/scss/ascetic.scss +0 -45
  762. package/node_modules/highlight.js/scss/atelier-cave-dark.scss +0 -83
  763. package/node_modules/highlight.js/scss/atelier-cave-light.scss +0 -85
  764. package/node_modules/highlight.js/scss/atelier-dune-dark.scss +0 -69
  765. package/node_modules/highlight.js/scss/atelier-dune-light.scss +0 -69
  766. package/node_modules/highlight.js/scss/atelier-estuary-dark.scss +0 -84
  767. package/node_modules/highlight.js/scss/atelier-estuary-light.scss +0 -84
  768. package/node_modules/highlight.js/scss/atelier-forest-dark.scss +0 -69
  769. package/node_modules/highlight.js/scss/atelier-forest-light.scss +0 -69
  770. package/node_modules/highlight.js/scss/atelier-heath-dark.scss +0 -69
  771. package/node_modules/highlight.js/scss/atelier-heath-light.scss +0 -69
  772. package/node_modules/highlight.js/scss/atelier-lakeside-dark.scss +0 -69
  773. package/node_modules/highlight.js/scss/atelier-lakeside-light.scss +0 -69
  774. package/node_modules/highlight.js/scss/atelier-plateau-dark.scss +0 -84
  775. package/node_modules/highlight.js/scss/atelier-plateau-light.scss +0 -84
  776. package/node_modules/highlight.js/scss/atelier-savanna-dark.scss +0 -84
  777. package/node_modules/highlight.js/scss/atelier-savanna-light.scss +0 -84
  778. package/node_modules/highlight.js/scss/atelier-seaside-dark.scss +0 -69
  779. package/node_modules/highlight.js/scss/atelier-seaside-light.scss +0 -69
  780. package/node_modules/highlight.js/scss/atelier-sulphurpool-dark.scss +0 -69
  781. package/node_modules/highlight.js/scss/atelier-sulphurpool-light.scss +0 -69
  782. package/node_modules/highlight.js/scss/atom-one-dark-reasonable.scss +0 -75
  783. package/node_modules/highlight.js/scss/atom-one-dark.scss +0 -96
  784. package/node_modules/highlight.js/scss/atom-one-light.scss +0 -96
  785. package/node_modules/highlight.js/scss/brown-paper.scss +0 -64
  786. package/node_modules/highlight.js/scss/brown-papersq.png +0 -0
  787. package/node_modules/highlight.js/scss/codepen-embed.scss +0 -60
  788. package/node_modules/highlight.js/scss/color-brewer.scss +0 -71
  789. package/node_modules/highlight.js/scss/darcula.scss +0 -74
  790. package/node_modules/highlight.js/scss/dark.scss +0 -63
  791. package/node_modules/highlight.js/scss/default.scss +0 -99
  792. package/node_modules/highlight.js/scss/docco.scss +0 -97
  793. package/node_modules/highlight.js/scss/dracula.scss +0 -76
  794. package/node_modules/highlight.js/scss/far.scss +0 -71
  795. package/node_modules/highlight.js/scss/foundation.scss +0 -89
  796. package/node_modules/highlight.js/scss/github-gist.scss +0 -79
  797. package/node_modules/highlight.js/scss/github.scss +0 -99
  798. package/node_modules/highlight.js/scss/gml.scss +0 -78
  799. package/node_modules/highlight.js/scss/googlecode.scss +0 -89
  800. package/node_modules/highlight.js/scss/gradient-dark.scss +0 -122
  801. package/node_modules/highlight.js/scss/gradient-light.scss +0 -130
  802. package/node_modules/highlight.js/scss/grayscale.scss +0 -101
  803. package/node_modules/highlight.js/scss/gruvbox-dark.scss +0 -108
  804. package/node_modules/highlight.js/scss/gruvbox-light.scss +0 -108
  805. package/node_modules/highlight.js/scss/hopscotch.scss +0 -84
  806. package/node_modules/highlight.js/scss/hybrid.scss +0 -102
  807. package/node_modules/highlight.js/scss/idea.scss +0 -97
  808. package/node_modules/highlight.js/scss/ir-black.scss +0 -73
  809. package/node_modules/highlight.js/scss/isbl-editor-dark.scss +0 -112
  810. package/node_modules/highlight.js/scss/isbl-editor-light.scss +0 -111
  811. package/node_modules/highlight.js/scss/kimbie.dark.scss +0 -74
  812. package/node_modules/highlight.js/scss/kimbie.light.scss +0 -74
  813. package/node_modules/highlight.js/scss/lightfair.scss +0 -88
  814. package/node_modules/highlight.js/scss/lioshi.scss +0 -88
  815. package/node_modules/highlight.js/scss/magula.scss +0 -70
  816. package/node_modules/highlight.js/scss/mono-blue.scss +0 -56
  817. package/node_modules/highlight.js/scss/monokai-sublime.scss +0 -83
  818. package/node_modules/highlight.js/scss/monokai.scss +0 -71
  819. package/node_modules/highlight.js/scss/night-owl.scss +0 -182
  820. package/node_modules/highlight.js/scss/nnfx-dark.scss +0 -106
  821. package/node_modules/highlight.js/scss/nnfx.scss +0 -106
  822. package/node_modules/highlight.js/scss/nord.scss +0 -309
  823. package/node_modules/highlight.js/scss/obsidian.scss +0 -88
  824. package/node_modules/highlight.js/scss/ocean.scss +0 -74
  825. package/node_modules/highlight.js/scss/paraiso-dark.scss +0 -72
  826. package/node_modules/highlight.js/scss/paraiso-light.scss +0 -72
  827. package/node_modules/highlight.js/scss/pojoaque.jpg +0 -0
  828. package/node_modules/highlight.js/scss/pojoaque.scss +0 -83
  829. package/node_modules/highlight.js/scss/purebasic.scss +0 -96
  830. package/node_modules/highlight.js/scss/qtcreator_dark.scss +0 -83
  831. package/node_modules/highlight.js/scss/qtcreator_light.scss +0 -83
  832. package/node_modules/highlight.js/scss/railscasts.scss +0 -106
  833. package/node_modules/highlight.js/scss/rainbow.scss +0 -85
  834. package/node_modules/highlight.js/scss/routeros.scss +0 -108
  835. package/node_modules/highlight.js/scss/school-book.png +0 -0
  836. package/node_modules/highlight.js/scss/school-book.scss +0 -69
  837. package/node_modules/highlight.js/scss/shades-of-purple.scss +0 -96
  838. package/node_modules/highlight.js/scss/solarized-dark.scss +0 -84
  839. package/node_modules/highlight.js/scss/solarized-light.scss +0 -84
  840. package/node_modules/highlight.js/scss/srcery.scss +0 -78
  841. package/node_modules/highlight.js/scss/stackoverflow-dark.scss +0 -78
  842. package/node_modules/highlight.js/scss/stackoverflow-light.scss +0 -78
  843. package/node_modules/highlight.js/scss/sunburst.scss +0 -102
  844. package/node_modules/highlight.js/scss/tomorrow-night-blue.scss +0 -75
  845. package/node_modules/highlight.js/scss/tomorrow-night-bright.scss +0 -74
  846. package/node_modules/highlight.js/scss/tomorrow-night-eighties.scss +0 -74
  847. package/node_modules/highlight.js/scss/tomorrow-night.scss +0 -75
  848. package/node_modules/highlight.js/scss/tomorrow.scss +0 -72
  849. package/node_modules/highlight.js/scss/vs.scss +0 -68
  850. package/node_modules/highlight.js/scss/vs2015.scss +0 -115
  851. package/node_modules/highlight.js/scss/xcode.scss +0 -104
  852. package/node_modules/highlight.js/scss/xt256.scss +0 -92
  853. package/node_modules/highlight.js/scss/zenburn.scss +0 -80
  854. package/node_modules/highlight.js/styles/a11y-dark.css +0 -99
  855. package/node_modules/highlight.js/styles/a11y-light.css +0 -99
  856. package/node_modules/highlight.js/styles/agate.css +0 -108
  857. package/node_modules/highlight.js/styles/an-old-hope.css +0 -89
  858. package/node_modules/highlight.js/styles/androidstudio.css +0 -66
  859. package/node_modules/highlight.js/styles/arduino-light.css +0 -87
  860. package/node_modules/highlight.js/styles/arta.css +0 -73
  861. package/node_modules/highlight.js/styles/ascetic.css +0 -45
  862. package/node_modules/highlight.js/styles/atelier-cave-dark.css +0 -83
  863. package/node_modules/highlight.js/styles/atelier-cave-light.css +0 -85
  864. package/node_modules/highlight.js/styles/atelier-dune-dark.css +0 -69
  865. package/node_modules/highlight.js/styles/atelier-dune-light.css +0 -69
  866. package/node_modules/highlight.js/styles/atelier-estuary-dark.css +0 -84
  867. package/node_modules/highlight.js/styles/atelier-estuary-light.css +0 -84
  868. package/node_modules/highlight.js/styles/atelier-forest-dark.css +0 -69
  869. package/node_modules/highlight.js/styles/atelier-forest-light.css +0 -69
  870. package/node_modules/highlight.js/styles/atelier-heath-dark.css +0 -69
  871. package/node_modules/highlight.js/styles/atelier-heath-light.css +0 -69
  872. package/node_modules/highlight.js/styles/atelier-lakeside-dark.css +0 -69
  873. package/node_modules/highlight.js/styles/atelier-lakeside-light.css +0 -69
  874. package/node_modules/highlight.js/styles/atelier-plateau-dark.css +0 -84
  875. package/node_modules/highlight.js/styles/atelier-plateau-light.css +0 -84
  876. package/node_modules/highlight.js/styles/atelier-savanna-dark.css +0 -84
  877. package/node_modules/highlight.js/styles/atelier-savanna-light.css +0 -84
  878. package/node_modules/highlight.js/styles/atelier-seaside-dark.css +0 -69
  879. package/node_modules/highlight.js/styles/atelier-seaside-light.css +0 -69
  880. package/node_modules/highlight.js/styles/atelier-sulphurpool-dark.css +0 -69
  881. package/node_modules/highlight.js/styles/atelier-sulphurpool-light.css +0 -69
  882. package/node_modules/highlight.js/styles/atom-one-dark-reasonable.css +0 -75
  883. package/node_modules/highlight.js/styles/atom-one-dark.css +0 -96
  884. package/node_modules/highlight.js/styles/atom-one-light.css +0 -96
  885. package/node_modules/highlight.js/styles/brown-paper.css +0 -64
  886. package/node_modules/highlight.js/styles/brown-papersq.png +0 -0
  887. package/node_modules/highlight.js/styles/codepen-embed.css +0 -60
  888. package/node_modules/highlight.js/styles/color-brewer.css +0 -71
  889. package/node_modules/highlight.js/styles/darcula.css +0 -74
  890. package/node_modules/highlight.js/styles/dark.css +0 -63
  891. package/node_modules/highlight.js/styles/default.css +0 -99
  892. package/node_modules/highlight.js/styles/docco.css +0 -97
  893. package/node_modules/highlight.js/styles/dracula.css +0 -76
  894. package/node_modules/highlight.js/styles/far.css +0 -71
  895. package/node_modules/highlight.js/styles/foundation.css +0 -89
  896. package/node_modules/highlight.js/styles/github-gist.css +0 -79
  897. package/node_modules/highlight.js/styles/github.css +0 -99
  898. package/node_modules/highlight.js/styles/gml.css +0 -78
  899. package/node_modules/highlight.js/styles/googlecode.css +0 -89
  900. package/node_modules/highlight.js/styles/gradient-dark.css +0 -122
  901. package/node_modules/highlight.js/styles/gradient-light.css +0 -130
  902. package/node_modules/highlight.js/styles/grayscale.css +0 -101
  903. package/node_modules/highlight.js/styles/gruvbox-dark.css +0 -108
  904. package/node_modules/highlight.js/styles/gruvbox-light.css +0 -108
  905. package/node_modules/highlight.js/styles/hopscotch.css +0 -84
  906. package/node_modules/highlight.js/styles/hybrid.css +0 -102
  907. package/node_modules/highlight.js/styles/idea.css +0 -97
  908. package/node_modules/highlight.js/styles/ir-black.css +0 -73
  909. package/node_modules/highlight.js/styles/isbl-editor-dark.css +0 -112
  910. package/node_modules/highlight.js/styles/isbl-editor-light.css +0 -111
  911. package/node_modules/highlight.js/styles/kimbie.dark.css +0 -74
  912. package/node_modules/highlight.js/styles/kimbie.light.css +0 -74
  913. package/node_modules/highlight.js/styles/lightfair.css +0 -88
  914. package/node_modules/highlight.js/styles/lioshi.css +0 -88
  915. package/node_modules/highlight.js/styles/magula.css +0 -70
  916. package/node_modules/highlight.js/styles/mono-blue.css +0 -56
  917. package/node_modules/highlight.js/styles/monokai-sublime.css +0 -83
  918. package/node_modules/highlight.js/styles/monokai.css +0 -71
  919. package/node_modules/highlight.js/styles/night-owl.css +0 -182
  920. package/node_modules/highlight.js/styles/nnfx-dark.css +0 -106
  921. package/node_modules/highlight.js/styles/nnfx.css +0 -106
  922. package/node_modules/highlight.js/styles/nord.css +0 -309
  923. package/node_modules/highlight.js/styles/obsidian.css +0 -88
  924. package/node_modules/highlight.js/styles/ocean.css +0 -74
  925. package/node_modules/highlight.js/styles/paraiso-dark.css +0 -72
  926. package/node_modules/highlight.js/styles/paraiso-light.css +0 -72
  927. package/node_modules/highlight.js/styles/pojoaque.css +0 -83
  928. package/node_modules/highlight.js/styles/pojoaque.jpg +0 -0
  929. package/node_modules/highlight.js/styles/purebasic.css +0 -96
  930. package/node_modules/highlight.js/styles/qtcreator_dark.css +0 -83
  931. package/node_modules/highlight.js/styles/qtcreator_light.css +0 -83
  932. package/node_modules/highlight.js/styles/railscasts.css +0 -106
  933. package/node_modules/highlight.js/styles/rainbow.css +0 -85
  934. package/node_modules/highlight.js/styles/routeros.css +0 -108
  935. package/node_modules/highlight.js/styles/school-book.css +0 -69
  936. package/node_modules/highlight.js/styles/school-book.png +0 -0
  937. package/node_modules/highlight.js/styles/shades-of-purple.css +0 -96
  938. package/node_modules/highlight.js/styles/solarized-dark.css +0 -84
  939. package/node_modules/highlight.js/styles/solarized-light.css +0 -84
  940. package/node_modules/highlight.js/styles/srcery.css +0 -78
  941. package/node_modules/highlight.js/styles/stackoverflow-dark.css +0 -78
  942. package/node_modules/highlight.js/styles/stackoverflow-light.css +0 -78
  943. package/node_modules/highlight.js/styles/sunburst.css +0 -102
  944. package/node_modules/highlight.js/styles/tomorrow-night-blue.css +0 -75
  945. package/node_modules/highlight.js/styles/tomorrow-night-bright.css +0 -74
  946. package/node_modules/highlight.js/styles/tomorrow-night-eighties.css +0 -74
  947. package/node_modules/highlight.js/styles/tomorrow-night.css +0 -75
  948. package/node_modules/highlight.js/styles/tomorrow.css +0 -72
  949. package/node_modules/highlight.js/styles/vs.css +0 -68
  950. package/node_modules/highlight.js/styles/vs2015.css +0 -115
  951. package/node_modules/highlight.js/styles/xcode.css +0 -104
  952. package/node_modules/highlight.js/styles/xt256.css +0 -92
  953. package/node_modules/highlight.js/styles/zenburn.css +0 -80
  954. package/node_modules/highlight.js/types/index.d.ts +0 -261
  955. package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  956. package/node_modules/is-fullwidth-code-point/index.js +0 -50
  957. package/node_modules/is-fullwidth-code-point/license +0 -9
  958. package/node_modules/is-fullwidth-code-point/package.json +0 -42
  959. package/node_modules/is-fullwidth-code-point/readme.md +0 -39
  960. package/node_modules/mz/HISTORY.md +0 -66
  961. package/node_modules/mz/LICENSE +0 -22
  962. package/node_modules/mz/README.md +0 -106
  963. package/node_modules/mz/child_process.js +0 -8
  964. package/node_modules/mz/crypto.js +0 -9
  965. package/node_modules/mz/dns.js +0 -16
  966. package/node_modules/mz/fs.js +0 -62
  967. package/node_modules/mz/index.js +0 -8
  968. package/node_modules/mz/package.json +0 -44
  969. package/node_modules/mz/readline.js +0 -64
  970. package/node_modules/mz/zlib.js +0 -13
  971. package/node_modules/object-assign/index.js +0 -90
  972. package/node_modules/object-assign/license +0 -21
  973. package/node_modules/object-assign/package.json +0 -42
  974. package/node_modules/object-assign/readme.md +0 -61
  975. package/node_modules/parse5/LICENSE +0 -19
  976. package/node_modules/parse5/README.md +0 -38
  977. package/node_modules/parse5/lib/common/doctype.js +0 -162
  978. package/node_modules/parse5/lib/common/error-codes.js +0 -65
  979. package/node_modules/parse5/lib/common/foreign-content.js +0 -265
  980. package/node_modules/parse5/lib/common/html.js +0 -272
  981. package/node_modules/parse5/lib/common/unicode.js +0 -109
  982. package/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
  983. package/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
  984. package/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
  985. package/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
  986. package/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
  987. package/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +0 -222
  988. package/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
  989. package/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
  990. package/node_modules/parse5/lib/index.js +0 -29
  991. package/node_modules/parse5/lib/parser/formatting-element-list.js +0 -181
  992. package/node_modules/parse5/lib/parser/index.js +0 -2956
  993. package/node_modules/parse5/lib/parser/open-element-stack.js +0 -482
  994. package/node_modules/parse5/lib/serializer/index.js +0 -176
  995. package/node_modules/parse5/lib/tokenizer/index.js +0 -2196
  996. package/node_modules/parse5/lib/tokenizer/named-entity-data.js +0 -5
  997. package/node_modules/parse5/lib/tokenizer/preprocessor.js +0 -159
  998. package/node_modules/parse5/lib/tree-adapters/default.js +0 -217
  999. package/node_modules/parse5/lib/utils/merge-options.js +0 -13
  1000. package/node_modules/parse5/lib/utils/mixin.js +0 -39
  1001. package/node_modules/parse5/package.json +0 -35
  1002. package/node_modules/parse5-htmlparser2-tree-adapter/LICENSE +0 -19
  1003. package/node_modules/parse5-htmlparser2-tree-adapter/README.md +0 -34
  1004. package/node_modules/parse5-htmlparser2-tree-adapter/lib/index.js +0 -348
  1005. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/LICENSE +0 -19
  1006. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/README.md +0 -38
  1007. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/doctype.js +0 -162
  1008. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/error-codes.js +0 -65
  1009. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/foreign-content.js +0 -265
  1010. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/html.js +0 -272
  1011. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/unicode.js +0 -109
  1012. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
  1013. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
  1014. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
  1015. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
  1016. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
  1017. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +0 -223
  1018. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
  1019. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
  1020. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/index.js +0 -29
  1021. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/formatting-element-list.js +0 -181
  1022. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/index.js +0 -2956
  1023. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/open-element-stack.js +0 -482
  1024. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/serializer/index.js +0 -176
  1025. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/index.js +0 -2196
  1026. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/named-entity-data.js +0 -5
  1027. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/preprocessor.js +0 -159
  1028. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tree-adapters/default.js +0 -221
  1029. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/utils/merge-options.js +0 -13
  1030. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/utils/mixin.js +0 -39
  1031. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/package.json +0 -35
  1032. package/node_modules/parse5-htmlparser2-tree-adapter/package.json +0 -27
  1033. package/node_modules/proper-lockfile/CHANGELOG.md +0 -108
  1034. package/node_modules/require-directory/.jshintrc +0 -67
  1035. package/node_modules/require-directory/.npmignore +0 -1
  1036. package/node_modules/require-directory/.travis.yml +0 -3
  1037. package/node_modules/require-directory/LICENSE +0 -22
  1038. package/node_modules/require-directory/README.markdown +0 -184
  1039. package/node_modules/require-directory/index.js +0 -86
  1040. package/node_modules/require-directory/package.json +0 -40
  1041. package/node_modules/source-map/CHANGELOG.md +0 -301
  1042. package/node_modules/string-width/index.d.ts +0 -29
  1043. package/node_modules/string-width/index.js +0 -47
  1044. package/node_modules/string-width/license +0 -9
  1045. package/node_modules/string-width/node_modules/ansi-regex/index.d.ts +0 -37
  1046. package/node_modules/string-width/node_modules/ansi-regex/index.js +0 -10
  1047. package/node_modules/string-width/node_modules/ansi-regex/license +0 -9
  1048. package/node_modules/string-width/node_modules/ansi-regex/package.json +0 -55
  1049. package/node_modules/string-width/node_modules/ansi-regex/readme.md +0 -78
  1050. package/node_modules/string-width/node_modules/strip-ansi/index.d.ts +0 -17
  1051. package/node_modules/string-width/node_modules/strip-ansi/index.js +0 -4
  1052. package/node_modules/string-width/node_modules/strip-ansi/license +0 -9
  1053. package/node_modules/string-width/node_modules/strip-ansi/package.json +0 -54
  1054. package/node_modules/string-width/node_modules/strip-ansi/readme.md +0 -46
  1055. package/node_modules/string-width/package.json +0 -56
  1056. package/node_modules/string-width/readme.md +0 -50
  1057. package/node_modules/supports-color/browser.js +0 -5
  1058. package/node_modules/supports-color/index.js +0 -135
  1059. package/node_modules/supports-color/license +0 -9
  1060. package/node_modules/supports-color/package.json +0 -53
  1061. package/node_modules/supports-color/readme.md +0 -76
  1062. package/node_modules/thenify/History.md +0 -11
  1063. package/node_modules/thenify/LICENSE +0 -22
  1064. package/node_modules/thenify/README.md +0 -120
  1065. package/node_modules/thenify/index.js +0 -77
  1066. package/node_modules/thenify/package.json +0 -31
  1067. package/node_modules/thenify-all/History.md +0 -11
  1068. package/node_modules/thenify-all/LICENSE +0 -22
  1069. package/node_modules/thenify-all/README.md +0 -66
  1070. package/node_modules/thenify-all/index.js +0 -73
  1071. package/node_modules/thenify-all/package.json +0 -34
  1072. package/node_modules/wrap-ansi/index.js +0 -216
  1073. package/node_modules/wrap-ansi/license +0 -9
  1074. package/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts +0 -37
  1075. package/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +0 -10
  1076. package/node_modules/wrap-ansi/node_modules/ansi-regex/license +0 -9
  1077. package/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +0 -55
  1078. package/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +0 -78
  1079. package/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts +0 -17
  1080. package/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +0 -4
  1081. package/node_modules/wrap-ansi/node_modules/strip-ansi/license +0 -9
  1082. package/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +0 -54
  1083. package/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +0 -46
  1084. package/node_modules/wrap-ansi/package.json +0 -62
  1085. package/node_modules/wrap-ansi/readme.md +0 -91
  1086. package/node_modules/y18n/CHANGELOG.md +0 -100
  1087. package/node_modules/y18n/LICENSE +0 -13
  1088. package/node_modules/y18n/README.md +0 -127
  1089. package/node_modules/y18n/build/index.cjs +0 -203
  1090. package/node_modules/y18n/build/lib/cjs.js +0 -6
  1091. package/node_modules/y18n/build/lib/index.js +0 -174
  1092. package/node_modules/y18n/build/lib/platform-shims/node.js +0 -19
  1093. package/node_modules/y18n/index.mjs +0 -8
  1094. package/node_modules/y18n/package.json +0 -70
  1095. package/node_modules/yargs/CHANGELOG.md +0 -88
  1096. package/node_modules/yargs/LICENSE +0 -21
  1097. package/node_modules/yargs/README.md +0 -202
  1098. package/node_modules/yargs/browser.mjs +0 -7
  1099. package/node_modules/yargs/build/index.cjs +0 -2920
  1100. package/node_modules/yargs/build/lib/argsert.js +0 -62
  1101. package/node_modules/yargs/build/lib/command.js +0 -382
  1102. package/node_modules/yargs/build/lib/completion-templates.js +0 -47
  1103. package/node_modules/yargs/build/lib/completion.js +0 -128
  1104. package/node_modules/yargs/build/lib/middleware.js +0 -53
  1105. package/node_modules/yargs/build/lib/parse-command.js +0 -32
  1106. package/node_modules/yargs/build/lib/typings/common-types.js +0 -9
  1107. package/node_modules/yargs/build/lib/typings/yargs-parser-types.js +0 -1
  1108. package/node_modules/yargs/build/lib/usage.js +0 -548
  1109. package/node_modules/yargs/build/lib/utils/apply-extends.js +0 -59
  1110. package/node_modules/yargs/build/lib/utils/is-promise.js +0 -5
  1111. package/node_modules/yargs/build/lib/utils/levenshtein.js +0 -26
  1112. package/node_modules/yargs/build/lib/utils/obj-filter.js +0 -10
  1113. package/node_modules/yargs/build/lib/utils/process-argv.js +0 -17
  1114. package/node_modules/yargs/build/lib/utils/set-blocking.js +0 -12
  1115. package/node_modules/yargs/build/lib/utils/which-module.js +0 -10
  1116. package/node_modules/yargs/build/lib/validation.js +0 -308
  1117. package/node_modules/yargs/build/lib/yargs-factory.js +0 -1143
  1118. package/node_modules/yargs/build/lib/yerror.js +0 -7
  1119. package/node_modules/yargs/helpers/helpers.mjs +0 -10
  1120. package/node_modules/yargs/helpers/index.js +0 -14
  1121. package/node_modules/yargs/helpers/package.json +0 -3
  1122. package/node_modules/yargs/index.cjs +0 -39
  1123. package/node_modules/yargs/index.mjs +0 -8
  1124. package/node_modules/yargs/lib/platform-shims/browser.mjs +0 -92
  1125. package/node_modules/yargs/lib/platform-shims/esm.mjs +0 -67
  1126. package/node_modules/yargs/locales/be.json +0 -46
  1127. package/node_modules/yargs/locales/de.json +0 -46
  1128. package/node_modules/yargs/locales/en.json +0 -51
  1129. package/node_modules/yargs/locales/es.json +0 -46
  1130. package/node_modules/yargs/locales/fi.json +0 -49
  1131. package/node_modules/yargs/locales/fr.json +0 -53
  1132. package/node_modules/yargs/locales/hi.json +0 -49
  1133. package/node_modules/yargs/locales/hu.json +0 -46
  1134. package/node_modules/yargs/locales/id.json +0 -50
  1135. package/node_modules/yargs/locales/it.json +0 -46
  1136. package/node_modules/yargs/locales/ja.json +0 -51
  1137. package/node_modules/yargs/locales/ko.json +0 -49
  1138. package/node_modules/yargs/locales/nb.json +0 -44
  1139. package/node_modules/yargs/locales/nl.json +0 -49
  1140. package/node_modules/yargs/locales/nn.json +0 -44
  1141. package/node_modules/yargs/locales/pirate.json +0 -13
  1142. package/node_modules/yargs/locales/pl.json +0 -49
  1143. package/node_modules/yargs/locales/pt.json +0 -45
  1144. package/node_modules/yargs/locales/pt_BR.json +0 -48
  1145. package/node_modules/yargs/locales/ru.json +0 -46
  1146. package/node_modules/yargs/locales/th.json +0 -46
  1147. package/node_modules/yargs/locales/tr.json +0 -48
  1148. package/node_modules/yargs/locales/zh_CN.json +0 -48
  1149. package/node_modules/yargs/locales/zh_TW.json +0 -47
  1150. package/node_modules/yargs/package.json +0 -122
  1151. package/node_modules/yargs/yargs +0 -9
  1152. package/node_modules/yargs-parser/CHANGELOG.md +0 -263
  1153. package/node_modules/yargs-parser/LICENSE.txt +0 -14
  1154. package/node_modules/yargs-parser/README.md +0 -518
  1155. package/node_modules/yargs-parser/browser.js +0 -29
  1156. package/node_modules/yargs-parser/build/index.cjs +0 -1042
  1157. package/node_modules/yargs-parser/build/lib/index.js +0 -59
  1158. package/node_modules/yargs-parser/build/lib/string-utils.js +0 -65
  1159. package/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +0 -40
  1160. package/node_modules/yargs-parser/build/lib/yargs-parser-types.js +0 -12
  1161. package/node_modules/yargs-parser/build/lib/yargs-parser.js +0 -1037
  1162. package/node_modules/yargs-parser/package.json +0 -87
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/core/lsp/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAUlE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEzD,gFAAgF;AAChF,eAAe;AACf,gFAAgF;AAEhF,MAAM,OAAO,GAAG,IAAI,GAAG,EAAqB,CAAC;AAC7C,MAAM,WAAW,GAAG,IAAI,GAAG,EAA8B,CAAC;AAC1D,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAyB,CAAC;AAE5D,mDAAmD;AACnD,IAAI,aAAa,GAAkB,IAAI,CAAC;AACxC,IAAI,iBAAiB,GAA0C,IAAI,CAAC;AACpE,MAAM,sBAAsB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEzC;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,EAA6B;IAC3D,aAAa,GAAG,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,CAAC,CAAC;YACtC,IAAI,CAAC;gBACJ,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAClC,CAAC;YAAC,MAAM,CAAC;gBACR,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACpB,CAAC;QACF,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACtB,CAAC;AACF,CAAC;AAUD,MAAM,UAAU,gBAAgB;IAC/B,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAClD,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO;QAC3B,MAAM,EAAE,OAAgB;QACxB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS;KAClC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,gFAAgF;AAChF,kBAAkB;AAClB,gFAAgF;AAEhF,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACzB,WAAW,EAAE,CAAC;QACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;QAC1B,WAAW,EAAE,CAAC;QACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { spawn } from \"node:child_process\";\nimport * as fsPromises from \"node:fs/promises\";\nimport type { Writable } from \"node:stream\";\nimport { killProcessTree } from \"../../utils/shell.js\";\nimport { ToolAbortError, isEnoent, throwIfAborted, untilAborted } from \"./helpers.js\";\nimport { applyWorkspaceEdit } from \"./edits.js\";\nimport { getLspmuxCommand, isLspmuxSupported } from \"./lspmux.js\";\nimport type {\n\tDiagnostic,\n\tLspClient,\n\tLspJsonRpcNotification,\n\tLspJsonRpcRequest,\n\tLspJsonRpcResponse,\n\tServerConfig,\n\tWorkspaceEdit,\n} from \"./types.js\";\nimport { detectLanguageId, fileToUri } from \"./utils.js\";\n\n// =============================================================================\n// Client State\n// =============================================================================\n\nconst clients = new Map<string, LspClient>();\nconst clientLocks = new Map<string, Promise<LspClient>>();\nconst fileOperationLocks = new Map<string, Promise<void>>();\n\n// Idle timeout configuration (disabled by default)\nlet idleTimeoutMs: number | null = null;\nlet idleCheckInterval: ReturnType<typeof setInterval> | null = null;\nconst IDLE_CHECK_INTERVAL_MS = 60 * 1000;\n\n/**\n * Configure the idle timeout for LSP clients.\n */\nexport function setIdleTimeout(ms: number | null | undefined): void {\n\tidleTimeoutMs = ms ?? null;\n\n\tif (idleTimeoutMs && idleTimeoutMs > 0) {\n\t\tstartIdleChecker();\n\t} else {\n\t\tstopIdleChecker();\n\t}\n}\n\nfunction startIdleChecker(): void {\n\tif (idleCheckInterval) return;\n\tidleCheckInterval = setInterval(() => {\n\t\tif (!idleTimeoutMs) return;\n\t\tconst now = Date.now();\n\t\tfor (const [key, client] of Array.from(clients.entries())) {\n\t\t\tif (now - client.lastActivity > idleTimeoutMs) {\n\t\t\t\tshutdownClient(key);\n\t\t\t}\n\t\t}\n\t}, IDLE_CHECK_INTERVAL_MS);\n}\n\nfunction stopIdleChecker(): void {\n\tif (idleCheckInterval) {\n\t\tclearInterval(idleCheckInterval);\n\t\tidleCheckInterval = null;\n\t}\n}\n\n// =============================================================================\n// Client Capabilities\n// =============================================================================\n\nconst CLIENT_CAPABILITIES = {\n\ttextDocument: {\n\t\tsynchronization: {\n\t\t\tdidSave: true,\n\t\t\tdynamicRegistration: false,\n\t\t\twillSave: false,\n\t\t\twillSaveWaitUntil: false,\n\t\t},\n\t\thover: {\n\t\t\tcontentFormat: [\"markdown\", \"plaintext\"],\n\t\t\tdynamicRegistration: false,\n\t\t},\n\t\tdefinition: {\n\t\t\tdynamicRegistration: false,\n\t\t\tlinkSupport: true,\n\t\t},\n\t\ttypeDefinition: {\n\t\t\tdynamicRegistration: false,\n\t\t\tlinkSupport: true,\n\t\t},\n\t\timplementation: {\n\t\t\tdynamicRegistration: false,\n\t\t\tlinkSupport: true,\n\t\t},\n\t\treferences: {\n\t\t\tdynamicRegistration: false,\n\t\t},\n\t\tdocumentSymbol: {\n\t\t\tdynamicRegistration: false,\n\t\t\thierarchicalDocumentSymbolSupport: true,\n\t\t\tsymbolKind: {\n\t\t\t\tvalueSet: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26],\n\t\t\t},\n\t\t},\n\t\trename: {\n\t\t\tdynamicRegistration: false,\n\t\t\tprepareSupport: true,\n\t\t},\n\t\tcodeAction: {\n\t\t\tdynamicRegistration: false,\n\t\t\tcodeActionLiteralSupport: {\n\t\t\t\tcodeActionKind: {\n\t\t\t\t\tvalueSet: [\n\t\t\t\t\t\t\"quickfix\",\n\t\t\t\t\t\t\"refactor\",\n\t\t\t\t\t\t\"refactor.extract\",\n\t\t\t\t\t\t\"refactor.inline\",\n\t\t\t\t\t\t\"refactor.rewrite\",\n\t\t\t\t\t\t\"source\",\n\t\t\t\t\t\t\"source.organizeImports\",\n\t\t\t\t\t\t\"source.fixAll\",\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\tresolveSupport: {\n\t\t\t\tproperties: [\"edit\"],\n\t\t\t},\n\t\t},\n\t\tformatting: {\n\t\t\tdynamicRegistration: false,\n\t\t},\n\t\trangeFormatting: {\n\t\t\tdynamicRegistration: false,\n\t\t},\n\t\tpublishDiagnostics: {\n\t\t\trelatedInformation: true,\n\t\t\tversionSupport: false,\n\t\t\ttagSupport: { valueSet: [1, 2] },\n\t\t\tcodeDescriptionSupport: true,\n\t\t\tdataSupport: true,\n\t\t},\n\t},\n\tworkspace: {\n\t\tapplyEdit: true,\n\t\tworkspaceEdit: {\n\t\t\tdocumentChanges: true,\n\t\t\tresourceOperations: [\"create\", \"rename\", \"delete\"],\n\t\t\tfailureHandling: \"textOnlyTransactional\",\n\t\t},\n\t\tconfiguration: true,\n\t\tsymbol: {\n\t\t\tdynamicRegistration: false,\n\t\t\tsymbolKind: {\n\t\t\t\tvalueSet: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26],\n\t\t\t},\n\t\t},\n\t},\n\texperimental: {\n\t\tsnippetTextEdit: true,\n\t},\n};\n\n// =============================================================================\n// LSP Message Protocol\n// =============================================================================\n\nfunction parseMessage(\n\tbuffer: Buffer,\n): { message: LspJsonRpcResponse | LspJsonRpcNotification | null; remaining: Buffer } | null {\n\tconst headerEndIndex = findHeaderEnd(buffer);\n\tif (headerEndIndex === -1) return null;\n\n\tconst headerText = new TextDecoder().decode(buffer.slice(0, headerEndIndex));\n\tconst contentLengthMatch = headerText.match(/Content-Length: (\\d+)/i);\n\tif (!contentLengthMatch) return null;\n\n\tconst contentLength = Number.parseInt(contentLengthMatch[1], 10);\n\tconst messageStart = headerEndIndex + 4; // Skip \\r\\n\\r\\n\n\tconst messageEnd = messageStart + contentLength;\n\n\tif (buffer.length < messageEnd) return null;\n\n\tconst messageBytes = buffer.subarray(messageStart, messageEnd);\n\tconst messageText = new TextDecoder().decode(messageBytes);\n\tconst remaining = Buffer.from(buffer.subarray(messageEnd));\n\n\tlet message: LspJsonRpcResponse | LspJsonRpcNotification;\n\ttry {\n\t\tmessage = JSON.parse(messageText);\n\t} catch {\n\t\t// Malformed JSON from LSP server — skip this message and advance past it\n\t\treturn { message: null, remaining };\n\t}\n\n\treturn { message, remaining };\n}\n\nfunction findHeaderEnd(buffer: Uint8Array): number {\n\tfor (let i = 0; i < buffer.length - 3; i++) {\n\t\tif (buffer[i] === 13 && buffer[i + 1] === 10 && buffer[i + 2] === 13 && buffer[i + 3] === 10) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\nasync function writeMessage(\n\tstdin: Writable | null,\n\tmessage: LspJsonRpcRequest | LspJsonRpcNotification | LspJsonRpcResponse,\n): Promise<void> {\n\tif (!stdin) {\n\t\tthrow new Error(\"LSP process stdin is not available\");\n\t}\n\tconst content = JSON.stringify(message);\n\tconst header = `Content-Length: ${Buffer.byteLength(content, \"utf-8\")}\\r\\n\\r\\n`;\n\treturn new Promise((resolve, reject) => {\n\t\tstdin.write(header + content, (err?: Error | null) => {\n\t\t\tif (err) reject(err);\n\t\t\telse resolve();\n\t\t});\n\t});\n}\n\n// =============================================================================\n// Message Reader\n// =============================================================================\n\nasync function startMessageReader(client: LspClient): Promise<void> {\n\tif (client.isReading) return;\n\tclient.isReading = true;\n\n\tconst stdout = client.proc.stdout;\n\tif (!stdout) {\n\t\tclient.isReading = false;\n\t\treturn;\n\t}\n\n\treturn new Promise<void>((resolve) => {\n\t\tstdout.on(\"data\", async (chunk: Buffer) => {\n\t\t\tconst currentBuffer: Buffer = Buffer.concat([client.messageBuffer, chunk]);\n\t\t\tclient.messageBuffer = currentBuffer;\n\n\t\t\tlet workingBuffer = currentBuffer;\n\t\t\tlet parsed = parseMessage(workingBuffer);\n\t\t\twhile (parsed) {\n\t\t\t\tconst { message, remaining } = parsed;\n\t\t\t\tworkingBuffer = remaining;\n\n\t\t\t\tif (!message) {\n\t\t\t\t\tparsed = parseMessage(workingBuffer);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (\"id\" in message && message.id !== undefined) {\n\t\t\t\t\tconst pending = client.pendingRequests.get(message.id);\n\t\t\t\t\tif (pending) {\n\t\t\t\t\t\tclient.pendingRequests.delete(message.id);\n\t\t\t\t\t\tif (\"error\" in message && message.error) {\n\t\t\t\t\t\t\tpending.reject(new Error(`LSP error: ${message.error.message}`));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpending.resolve(message.result);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (\"method\" in message) {\n\t\t\t\t\t\tawait handleServerRequest(client, message as LspJsonRpcRequest);\n\t\t\t\t\t}\n\t\t\t\t} else if (\"method\" in message) {\n\t\t\t\t\tif (message.method === \"textDocument/publishDiagnostics\" && message.params) {\n\t\t\t\t\t\tconst params = message.params as { uri: string; diagnostics: Diagnostic[] };\n\t\t\t\t\t\tclient.diagnostics.set(params.uri, params.diagnostics);\n\t\t\t\t\t\tclient.diagnosticsVersion += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tparsed = parseMessage(workingBuffer);\n\t\t\t}\n\n\t\t\tclient.messageBuffer = workingBuffer;\n\t\t});\n\n\t\tstdout.on(\"end\", () => {\n\t\t\tclient.isReading = false;\n\t\t\tresolve();\n\t\t});\n\n\t\tstdout.on(\"error\", () => {\n\t\t\tclient.isReading = false;\n\t\t\tresolve();\n\t\t});\n\t});\n}\n\n// =============================================================================\n// Server Request Handlers\n// =============================================================================\n\nasync function handleConfigurationRequest(client: LspClient, message: LspJsonRpcRequest): Promise<void> {\n\tif (typeof message.id !== \"number\") return;\n\tconst params = message.params as { items?: Array<{ section?: string }> };\n\tconst items = params?.items ?? [];\n\tconst result = items.map(item => {\n\t\tconst section = item.section ?? \"\";\n\t\treturn client.config.settings?.[section] ?? {};\n\t});\n\tawait sendResponse(client, message.id, result, \"workspace/configuration\");\n}\n\nasync function handleApplyEditRequest(client: LspClient, message: LspJsonRpcRequest): Promise<void> {\n\tif (typeof message.id !== \"number\") return;\n\tconst params = message.params as { edit?: WorkspaceEdit };\n\tif (!params?.edit) {\n\t\tawait sendResponse(\n\t\t\tclient,\n\t\t\tmessage.id,\n\t\t\t{ applied: false, failureReason: \"No edit provided\" },\n\t\t\t\"workspace/applyEdit\",\n\t\t);\n\t\treturn;\n\t}\n\n\ttry {\n\t\tawait applyWorkspaceEdit(params.edit, client.cwd);\n\t\tawait sendResponse(client, message.id, { applied: true }, \"workspace/applyEdit\");\n\t} catch (err: unknown) {\n\t\tawait sendResponse(client, message.id, { applied: false, failureReason: String(err) }, \"workspace/applyEdit\");\n\t}\n}\n\nasync function handleServerRequest(client: LspClient, message: LspJsonRpcRequest): Promise<void> {\n\tif (message.method === \"workspace/configuration\") {\n\t\tawait handleConfigurationRequest(client, message);\n\t\treturn;\n\t}\n\tif (message.method === \"workspace/applyEdit\") {\n\t\tawait handleApplyEditRequest(client, message);\n\t\treturn;\n\t}\n\tif (typeof message.id !== \"number\") return;\n\tawait sendResponse(client, message.id, null, message.method, {\n\t\tcode: -32601,\n\t\tmessage: `Method not found: ${message.method}`,\n\t});\n}\n\nasync function sendResponse(\n\tclient: LspClient,\n\tid: number,\n\tresult: unknown,\n\t_method: string,\n\terror?: { code: number; message: string; data?: unknown },\n): Promise<void> {\n\tconst response: LspJsonRpcResponse = {\n\t\tjsonrpc: \"2.0\",\n\t\tid,\n\t\t...(error ? { error } : { result }),\n\t};\n\n\ttry {\n\t\tawait writeMessage(client.proc.stdin, response);\n\t} catch {\n\t\t// Failed to respond to server request\n\t}\n}\n\n// =============================================================================\n// Stderr Buffer\n// =============================================================================\n\nasync function startStderrReader(client: LspClient): Promise<void> {\n\tconst stderr = client.proc.stderr;\n\tif (!stderr) return;\n\n\treturn new Promise<void>((resolve) => {\n\t\tstderr.on(\"data\", (chunk: Buffer) => {\n\t\t\tconst text = chunk.toString(\"utf-8\");\n\t\t\tclient.stderrBuffer += text;\n\t\t\tif (client.stderrBuffer.length > 4096) {\n\t\t\t\tclient.stderrBuffer = client.stderrBuffer.slice(-4096);\n\t\t\t}\n\t\t});\n\n\t\tstderr.on(\"end\", () => {\n\t\t\tresolve();\n\t\t});\n\n\t\tstderr.on(\"error\", () => {\n\t\t\tresolve();\n\t\t});\n\t});\n}\n\n// =============================================================================\n// Client Management\n// =============================================================================\n\n/** Timeout for warmup initialize requests (5 seconds) */\nexport const WARMUP_TIMEOUT_MS = 5000;\n\n/**\n * Get or create an LSP client for the given server configuration and working directory.\n */\nexport async function getOrCreateClient(config: ServerConfig, cwd: string, initTimeoutMs?: number): Promise<LspClient> {\n\tconst key = `${config.command}:${cwd}`;\n\n\tconst existingClient = clients.get(key);\n\tif (existingClient) {\n\t\texistingClient.lastActivity = Date.now();\n\t\treturn existingClient;\n\t}\n\n\tconst existingLock = clientLocks.get(key);\n\tif (existingLock) {\n\t\treturn existingLock;\n\t}\n\n\tconst clientPromise = (async () => {\n\t\tconst baseCommand = config.resolvedCommand ?? config.command;\n\t\tconst baseArgs = config.args ?? [];\n\n\t\t// Wrap with lspmux if available and supported\n\t\tconst { command, args, env } = isLspmuxSupported(baseCommand)\n\t\t\t? await getLspmuxCommand(baseCommand, baseArgs)\n\t\t\t: { command: baseCommand, args: baseArgs };\n\n\t\tconst proc = spawn(command, args, {\n\t\t\tcwd,\n\t\t\tstdio: [\"pipe\", \"pipe\", \"pipe\"],\n\t\t\tenv: env ? { ...process.env, ...env } : undefined,\n\t\t});\n\n\t\tconst exitedPromise = new Promise<number>((resolve) => {\n\t\t\tproc.on(\"exit\", (code: number | null) => resolve(code ?? 1));\n\t\t});\n\n\t\tconst client: LspClient = {\n\t\t\tname: key,\n\t\t\tcwd,\n\t\t\tproc: {\n\t\t\t\tstdin: proc.stdin,\n\t\t\t\tstdout: proc.stdout,\n\t\t\t\tstderr: proc.stderr,\n\t\t\t\tpid: proc.pid ?? 0,\n\t\t\t\texitCode: null,\n\t\t\t\texited: exitedPromise,\n\t\t\t\tkill: (signal?: number) => proc.kill(signal),\n\t\t\t},\n\t\t\tconfig,\n\t\t\trequestId: 0,\n\t\t\tdiagnostics: new Map(),\n\t\t\tdiagnosticsVersion: 0,\n\t\t\topenFiles: new Map(),\n\t\t\tpendingRequests: new Map(),\n\t\t\tmessageBuffer: Buffer.alloc(0),\n\t\t\tisReading: false,\n\t\t\tlastActivity: Date.now(),\n\t\t\tstderrBuffer: \"\",\n\t\t};\n\t\tclients.set(key, client);\n\n\t\t// Register crash recovery\n\t\texitedPromise.then((code: number) => {\n\t\t\tclient.proc.exitCode = code;\n\t\t\tclients.delete(key);\n\t\t\tclientLocks.delete(key);\n\n\t\t\tif (client.pendingRequests.size > 0) {\n\t\t\t\tconst stderr = client.stderrBuffer.trim();\n\t\t\t\tconst err = new Error(\n\t\t\t\t\tstderr ? `LSP server exited (code ${code}): ${stderr}` : `LSP server exited unexpectedly (code ${code})`,\n\t\t\t\t);\n\t\t\t\tfor (const pending of client.pendingRequests.values()) {\n\t\t\t\t\tpending.reject(err);\n\t\t\t\t}\n\t\t\t\tclient.pendingRequests.clear();\n\t\t\t}\n\t\t});\n\n\t\t// Start background readers\n\t\tstartMessageReader(client);\n\t\tstartStderrReader(client);\n\n\t\ttry {\n\t\t\tconst initResult = (await sendRequest(\n\t\t\t\tclient,\n\t\t\t\t\"initialize\",\n\t\t\t\t{\n\t\t\t\t\tprocessId: process.pid,\n\t\t\t\t\trootUri: fileToUri(cwd),\n\t\t\t\t\trootPath: cwd,\n\t\t\t\t\tcapabilities: CLIENT_CAPABILITIES,\n\t\t\t\t\tinitializationOptions: config.initOptions ?? {},\n\t\t\t\t\tworkspaceFolders: [{ uri: fileToUri(cwd), name: cwd.split(\"/\").pop() ?? \"workspace\" }],\n\t\t\t\t},\n\t\t\t\tundefined, // signal\n\t\t\t\tinitTimeoutMs,\n\t\t\t)) as { capabilities?: unknown };\n\n\t\t\tif (!initResult) {\n\t\t\t\tthrow new Error(\"Failed to initialize LSP: no response\");\n\t\t\t}\n\n\t\t\tclient.serverCapabilities = initResult.capabilities as LspClient[\"serverCapabilities\"];\n\n\t\t\tawait sendNotification(client, \"initialized\", {});\n\n\t\t\treturn client;\n\t\t} catch (err) {\n\t\t\tclients.delete(key);\n\t\t\tclientLocks.delete(key);\n\t\t\ttry {\n\t\t\t\tkillProcessTree(proc.pid ?? 0);\n\t\t\t} catch {\n\t\t\t\tproc.kill();\n\t\t\t}\n\t\t\tthrow err;\n\t\t} finally {\n\t\t\tclientLocks.delete(key);\n\t\t}\n\t})();\n\n\tclientLocks.set(key, clientPromise);\n\treturn clientPromise;\n}\n\n/**\n * Ensure a file is opened in the LSP client.\n */\nexport async function ensureFileOpen(client: LspClient, filePath: string, signal?: AbortSignal): Promise<void> {\n\tthrowIfAborted(signal);\n\tconst uri = fileToUri(filePath);\n\tconst lockKey = `${client.name}:${uri}`;\n\n\tif (client.openFiles.has(uri)) {\n\t\treturn;\n\t}\n\n\tconst existingLock = fileOperationLocks.get(lockKey);\n\tif (existingLock) {\n\t\tawait untilAborted(signal, () => existingLock);\n\t\treturn;\n\t}\n\n\tconst openPromise = (async () => {\n\t\tthrowIfAborted(signal);\n\t\tif (client.openFiles.has(uri)) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet content: string;\n\t\ttry {\n\t\t\tcontent = await fsPromises.readFile(filePath, \"utf-8\");\n\t\t\tthrowIfAborted(signal);\n\t\t} catch (err: unknown) {\n\t\t\tif (isEnoent(err)) return;\n\t\t\tthrow err;\n\t\t}\n\t\tconst languageId = detectLanguageId(filePath);\n\t\tthrowIfAborted(signal);\n\n\t\tawait sendNotification(client, \"textDocument/didOpen\", {\n\t\t\ttextDocument: {\n\t\t\t\turi,\n\t\t\t\tlanguageId,\n\t\t\t\tversion: 1,\n\t\t\t\ttext: content,\n\t\t\t},\n\t\t});\n\n\t\tclient.openFiles.set(uri, { version: 1, languageId });\n\t\tclient.lastActivity = Date.now();\n\t})();\n\n\tfileOperationLocks.set(lockKey, openPromise);\n\ttry {\n\t\tawait openPromise;\n\t} finally {\n\t\tfileOperationLocks.delete(lockKey);\n\t}\n}\n\n/**\n * Sync in-memory content to the LSP client without reading from disk.\n */\nexport async function syncContent(\n\tclient: LspClient,\n\tfilePath: string,\n\tcontent: string,\n\tsignal?: AbortSignal,\n): Promise<void> {\n\tconst uri = fileToUri(filePath);\n\tconst lockKey = `${client.name}:${uri}`;\n\tthrowIfAborted(signal);\n\n\tconst existingLock = fileOperationLocks.get(lockKey);\n\tif (existingLock) {\n\t\tawait untilAborted(signal, () => existingLock);\n\t}\n\n\tconst syncPromise = (async () => {\n\t\tclient.diagnostics.delete(uri);\n\n\t\tconst info = client.openFiles.get(uri);\n\n\t\tif (!info) {\n\t\t\tconst languageId = detectLanguageId(filePath);\n\t\t\tthrowIfAborted(signal);\n\t\t\tawait sendNotification(client, \"textDocument/didOpen\", {\n\t\t\t\ttextDocument: {\n\t\t\t\t\turi,\n\t\t\t\t\tlanguageId,\n\t\t\t\t\tversion: 1,\n\t\t\t\t\ttext: content,\n\t\t\t\t},\n\t\t\t});\n\t\t\tclient.openFiles.set(uri, { version: 1, languageId });\n\t\t\tclient.lastActivity = Date.now();\n\t\t\treturn;\n\t\t}\n\n\t\tconst version = ++info.version;\n\t\tthrowIfAborted(signal);\n\t\tawait sendNotification(client, \"textDocument/didChange\", {\n\t\t\ttextDocument: { uri, version },\n\t\t\tcontentChanges: [{ text: content }],\n\t\t});\n\t\tclient.lastActivity = Date.now();\n\t})();\n\n\tfileOperationLocks.set(lockKey, syncPromise);\n\ttry {\n\t\tawait syncPromise;\n\t} finally {\n\t\tfileOperationLocks.delete(lockKey);\n\t}\n}\n\n/**\n * Notify LSP that a file was saved.\n */\nexport async function notifySaved(client: LspClient, filePath: string, signal?: AbortSignal): Promise<void> {\n\tconst uri = fileToUri(filePath);\n\tconst info = client.openFiles.get(uri);\n\tif (!info) return;\n\n\tthrowIfAborted(signal);\n\tawait sendNotification(client, \"textDocument/didSave\", {\n\t\ttextDocument: { uri },\n\t});\n\tclient.lastActivity = Date.now();\n}\n\n/**\n * Refresh a file in the LSP client.\n */\nexport async function refreshFile(client: LspClient, filePath: string, signal?: AbortSignal): Promise<void> {\n\tthrowIfAborted(signal);\n\tconst uri = fileToUri(filePath);\n\tconst lockKey = `${client.name}:${uri}`;\n\n\tconst existingLock = fileOperationLocks.get(lockKey);\n\tif (existingLock) {\n\t\tawait untilAborted(signal, () => existingLock);\n\t}\n\n\tconst refreshPromise = (async () => {\n\t\tthrowIfAborted(signal);\n\t\tconst info = client.openFiles.get(uri);\n\n\t\tif (!info) {\n\t\t\tawait ensureFileOpen(client, filePath, signal);\n\t\t\treturn;\n\t\t}\n\n\t\tlet content: string;\n\t\ttry {\n\t\t\tcontent = await fsPromises.readFile(filePath, \"utf-8\");\n\t\t\tthrowIfAborted(signal);\n\t\t} catch (err: unknown) {\n\t\t\tif (isEnoent(err)) return;\n\t\t\tthrow err;\n\t\t}\n\t\tconst version = ++info.version;\n\t\tthrowIfAborted(signal);\n\n\t\tawait sendNotification(client, \"textDocument/didChange\", {\n\t\t\ttextDocument: { uri, version },\n\t\t\tcontentChanges: [{ text: content }],\n\t\t});\n\t\tthrowIfAborted(signal);\n\n\t\tawait sendNotification(client, \"textDocument/didSave\", {\n\t\t\ttextDocument: { uri },\n\t\t\ttext: content,\n\t\t});\n\n\t\tclient.lastActivity = Date.now();\n\t})();\n\n\tfileOperationLocks.set(lockKey, refreshPromise);\n\ttry {\n\t\tawait refreshPromise;\n\t} finally {\n\t\tfileOperationLocks.delete(lockKey);\n\t}\n}\n\n/**\n * Shutdown a specific client by key.\n */\nexport function shutdownClient(key: string): void {\n\tconst client = clients.get(key);\n\tif (!client) return;\n\n\tfor (const pending of Array.from(client.pendingRequests.values())) {\n\t\tpending.reject(new Error(\"LSP client shutdown\"));\n\t}\n\tclient.pendingRequests.clear();\n\n\tsendRequest(client, \"shutdown\", null).catch(() => {});\n\n\ttry {\n\t\tkillProcessTree(client.proc.pid);\n\t} catch {\n\t\tclient.proc.kill();\n\t}\n\tclients.delete(key);\n}\n\n// =============================================================================\n// LSP Protocol Methods\n// =============================================================================\n\nconst DEFAULT_REQUEST_TIMEOUT_MS = 30000;\n\nexport async function sendRequest(\n\tclient: LspClient,\n\tmethod: string,\n\tparams: unknown,\n\tsignal?: AbortSignal,\n\ttimeoutMs: number = DEFAULT_REQUEST_TIMEOUT_MS,\n): Promise<unknown> {\n\tconst id = ++client.requestId;\n\tif (signal?.aborted) {\n\t\tconst reason = signal.reason instanceof Error ? signal.reason : new ToolAbortError();\n\t\treturn Promise.reject(reason);\n\t}\n\n\tconst request: LspJsonRpcRequest = {\n\t\tjsonrpc: \"2.0\",\n\t\tid,\n\t\tmethod,\n\t\tparams,\n\t};\n\n\tclient.lastActivity = Date.now();\n\n\tconst { promise, resolve, reject } = Promise.withResolvers<unknown>();\n\tlet timeout: NodeJS.Timeout | undefined;\n\tconst cleanup = () => {\n\t\tif (signal) {\n\t\t\tsignal.removeEventListener(\"abort\", abortHandler);\n\t\t}\n\t};\n\tconst abortHandler = () => {\n\t\tif (client.pendingRequests.has(id)) {\n\t\t\tclient.pendingRequests.delete(id);\n\t\t}\n\t\tvoid sendNotification(client, \"$/cancelRequest\", { id }).catch(() => {});\n\t\tif (timeout) clearTimeout(timeout);\n\t\tcleanup();\n\t\tconst reason = signal?.reason instanceof Error ? signal.reason : new ToolAbortError();\n\t\treject(reason);\n\t};\n\n\ttimeout = setTimeout(() => {\n\t\tif (client.pendingRequests.has(id)) {\n\t\t\tclient.pendingRequests.delete(id);\n\t\t\tconst err = new Error(`LSP request ${method} timed out after ${timeoutMs}ms`);\n\t\t\tcleanup();\n\t\t\treject(err);\n\t\t}\n\t}, timeoutMs);\n\tif (signal) {\n\t\tsignal.addEventListener(\"abort\", abortHandler, { once: true });\n\t\tif (signal.aborted) {\n\t\t\tabortHandler();\n\t\t\treturn promise;\n\t\t}\n\t}\n\n\tclient.pendingRequests.set(id, {\n\t\tresolve: (result: unknown) => {\n\t\t\tif (timeout) clearTimeout(timeout);\n\t\t\tcleanup();\n\t\t\tresolve(result);\n\t\t},\n\t\treject: (err: Error) => {\n\t\t\tif (timeout) clearTimeout(timeout);\n\t\t\tcleanup();\n\t\t\treject(err);\n\t\t},\n\t\tmethod,\n\t});\n\n\twriteMessage(client.proc.stdin, request).catch((err: Error) => {\n\t\tif (timeout) clearTimeout(timeout);\n\t\tclient.pendingRequests.delete(id);\n\t\tcleanup();\n\t\treject(err);\n\t});\n\treturn promise;\n}\n\nexport async function sendNotification(client: LspClient, method: string, params: unknown): Promise<void> {\n\tconst notification: LspJsonRpcNotification = {\n\t\tjsonrpc: \"2.0\",\n\t\tmethod,\n\t\tparams,\n\t};\n\n\tclient.lastActivity = Date.now();\n\tawait writeMessage(client.proc.stdin, notification);\n}\n\n/**\n * Shutdown all LSP clients.\n */\nexport function shutdownAll(): void {\n\tconst clientsToShutdown = Array.from(clients.values());\n\tclients.clear();\n\n\tconst err = new Error(\"LSP client shutdown\");\n\tfor (const client of clientsToShutdown) {\n\t\tconst reqs = Array.from(client.pendingRequests.values());\n\t\tclient.pendingRequests.clear();\n\t\tfor (const pending of reqs) {\n\t\t\tpending.reject(err);\n\t\t}\n\n\t\tvoid (async () => {\n\t\t\tconst timeout = new Promise<void>(resolve => setTimeout(resolve, 5_000));\n\t\t\tconst result = sendRequest(client, \"shutdown\", null).catch(() => {});\n\t\t\tawait Promise.race([result, timeout]);\n\t\t\ttry {\n\t\t\t\tkillProcessTree(client.proc.pid);\n\t\t\t} catch {\n\t\t\t\tclient.proc.kill();\n\t\t\t}\n\t\t})().catch(() => {});\n\t}\n}\n\n/** Status of an LSP server */\nexport interface LspServerStatus {\n\tname: string;\n\tstatus: \"connecting\" | \"ready\" | \"error\";\n\tfileTypes: string[];\n\terror?: string;\n}\n\nexport function getActiveClients(): LspServerStatus[] {\n\treturn Array.from(clients.values()).map(client => ({\n\t\tname: client.config.command,\n\t\tstatus: \"ready\" as const,\n\t\tfileTypes: client.config.fileTypes,\n\t}));\n}\n\n// =============================================================================\n// Process Cleanup\n// =============================================================================\n\nif (typeof process !== \"undefined\") {\n\tprocess.on(\"beforeExit\", shutdownAll);\n\tprocess.on(\"SIGINT\", () => {\n\t\tshutdownAll();\n\t\tprocess.exit(0);\n\t});\n\tprocess.on(\"SIGTERM\", () => {\n\t\tshutdownAll();\n\t\tprocess.exit(0);\n\t});\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import type { ServerConfig } from "./types.js";
2
+ export interface LspConfig {
3
+ servers: Record<string, ServerConfig>;
4
+ /** Idle timeout in milliseconds. If set, LSP clients will be shutdown after this period of inactivity. Disabled by default. */
5
+ idleTimeoutMs?: number;
6
+ }
7
+ export declare function hasRootMarkers(cwd: string, markers: string[]): boolean;
8
+ export declare function resolveCommand(command: string, cwd: string): string | null;
9
+ /**
10
+ * Load LSP configuration.
11
+ *
12
+ * Priority (highest to lowest):
13
+ * 1. Project root: lsp.json/.lsp.json/lsp.yml/.lsp.yml/lsp.yaml/.lsp.yaml
14
+ * 2. Project config dir: {CONFIG_DIR_NAME}/lsp.* (+ hidden variants)
15
+ * 3. User config dir: ~/{CONFIG_DIR_NAME}/agent/lsp.* (+ hidden variants)
16
+ * 4. User home root: ~/lsp.*, ~/.lsp.*
17
+ * 5. Auto-detect from project markers + available binaries
18
+ */
19
+ export declare function loadConfig(cwd: string): LspConfig;
20
+ export declare function getServersForFile(config: LspConfig, filePath: string): Array<[string, ServerConfig]>;
21
+ export declare function getServerForFile(config: LspConfig, filePath: string): [string, ServerConfig] | null;
22
+ export declare function hasCapability(config: ServerConfig, capability: keyof NonNullable<ServerConfig["capabilities"]>): boolean;
23
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/lsp/config.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,MAAM,WAAW,SAAS;IACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACtC,+HAA+H;IAC/H,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AA6HD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAmBtE;AAsBD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW1E;AAkCD;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CA6CjD;AAMD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAsBpG;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,IAAI,CAGnG;AAED,wBAAgB,aAAa,CAC5B,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,MAAM,WAAW,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,GACzD,OAAO,CAET"}
@@ -0,0 +1,267 @@
1
+ import * as fs from "node:fs";
2
+ import { createRequire } from "node:module";
3
+ import * as os from "node:os";
4
+ import * as path from "node:path";
5
+ import { spawnSync } from "node:child_process";
6
+ import YAML from "yaml";
7
+ import { globSync } from "glob";
8
+ import { CONFIG_DIR_NAME } from "../../config.js";
9
+ import { isRecord } from "./helpers.js";
10
+ const require = createRequire(import.meta.url);
11
+ const DEFAULTS = require("./defaults.json");
12
+ // =============================================================================
13
+ // Default Server Configuration Loading
14
+ // =============================================================================
15
+ const PID_TOKEN = "$PID";
16
+ function parseConfigContent(content, filePath) {
17
+ const extension = path.extname(filePath).toLowerCase();
18
+ if (extension === ".yaml" || extension === ".yml") {
19
+ return YAML.parse(content);
20
+ }
21
+ return JSON.parse(content);
22
+ }
23
+ function normalizeConfig(value) {
24
+ if (!isRecord(value))
25
+ return null;
26
+ const idleTimeoutMs = typeof value.idleTimeoutMs === "number" ? value.idleTimeoutMs : undefined;
27
+ const rawServers = value.servers;
28
+ if (isRecord(rawServers)) {
29
+ return { servers: rawServers, idleTimeoutMs };
30
+ }
31
+ const servers = Object.fromEntries(Object.entries(value).filter(([key]) => key !== "idleTimeoutMs"));
32
+ return { servers, idleTimeoutMs };
33
+ }
34
+ function normalizeStringArray(value) {
35
+ if (!Array.isArray(value))
36
+ return null;
37
+ const items = value.filter((entry) => typeof entry === "string" && entry.length > 0);
38
+ return items.length > 0 ? items : null;
39
+ }
40
+ function normalizeServerConfig(name, config) {
41
+ const command = typeof config.command === "string" && config.command.length > 0 ? config.command : null;
42
+ const fileTypes = normalizeStringArray(config.fileTypes);
43
+ const rootMarkers = normalizeStringArray(config.rootMarkers);
44
+ if (!command || !fileTypes || !rootMarkers) {
45
+ return null;
46
+ }
47
+ const args = Array.isArray(config.args)
48
+ ? config.args.filter((entry) => typeof entry === "string")
49
+ : undefined;
50
+ return {
51
+ ...config,
52
+ command,
53
+ args,
54
+ fileTypes,
55
+ rootMarkers,
56
+ };
57
+ }
58
+ function readConfigFile(filePath) {
59
+ try {
60
+ const content = fs.readFileSync(filePath, "utf-8");
61
+ const parsed = parseConfigContent(content, filePath);
62
+ return normalizeConfig(parsed);
63
+ }
64
+ catch {
65
+ return null;
66
+ }
67
+ }
68
+ function coerceServerConfigs(servers) {
69
+ const result = {};
70
+ for (const [name, config] of Object.entries(servers)) {
71
+ const normalized = normalizeServerConfig(name, config);
72
+ if (normalized) {
73
+ result[name] = normalized;
74
+ }
75
+ }
76
+ return result;
77
+ }
78
+ function mergeServers(base, overrides) {
79
+ const merged = { ...base };
80
+ for (const [name, config] of Object.entries(overrides)) {
81
+ if (merged[name]) {
82
+ const candidate = { ...merged[name], ...config };
83
+ const normalized = normalizeServerConfig(name, candidate);
84
+ if (normalized) {
85
+ merged[name] = normalized;
86
+ }
87
+ }
88
+ else {
89
+ const normalized = normalizeServerConfig(name, config);
90
+ if (normalized) {
91
+ merged[name] = normalized;
92
+ }
93
+ }
94
+ }
95
+ return merged;
96
+ }
97
+ function applyRuntimeDefaults(servers) {
98
+ const updated = { ...servers };
99
+ if (updated.omnisharp?.args) {
100
+ const args = updated.omnisharp.args.map((arg) => (arg === PID_TOKEN ? String(process.pid) : arg));
101
+ updated.omnisharp = { ...updated.omnisharp, args };
102
+ }
103
+ return updated;
104
+ }
105
+ // =============================================================================
106
+ // Configuration Loading
107
+ // =============================================================================
108
+ export function hasRootMarkers(cwd, markers) {
109
+ for (const marker of markers) {
110
+ if (marker.includes("*")) {
111
+ try {
112
+ const matches = globSync(marker, { cwd, nodir: false });
113
+ if (matches.length > 0) {
114
+ return true;
115
+ }
116
+ }
117
+ catch {
118
+ // Failed to resolve glob root marker
119
+ }
120
+ continue;
121
+ }
122
+ const filePath = path.join(cwd, marker);
123
+ if (fs.existsSync(filePath)) {
124
+ return true;
125
+ }
126
+ }
127
+ return false;
128
+ }
129
+ // =============================================================================
130
+ // Local Binary Resolution
131
+ // =============================================================================
132
+ const LOCAL_BIN_PATHS = [
133
+ { markers: ["package.json", "package-lock.json", "yarn.lock", "pnpm-lock.yaml"], binDir: "node_modules/.bin" },
134
+ { markers: ["pyproject.toml", "requirements.txt", "setup.py", "Pipfile"], binDir: ".venv/bin" },
135
+ { markers: ["pyproject.toml", "requirements.txt", "setup.py", "Pipfile"], binDir: "venv/bin" },
136
+ { markers: ["pyproject.toml", "requirements.txt", "setup.py", "Pipfile"], binDir: ".env/bin" },
137
+ { markers: ["Gemfile", "Gemfile.lock"], binDir: "vendor/bundle/bin" },
138
+ { markers: ["Gemfile", "Gemfile.lock"], binDir: "bin" },
139
+ { markers: ["go.mod", "go.sum"], binDir: "bin" },
140
+ ];
141
+ function which(command) {
142
+ const result = spawnSync("which", [command], { encoding: "utf-8" });
143
+ if (result.status !== 0)
144
+ return null;
145
+ return result.stdout.trim() || null;
146
+ }
147
+ export function resolveCommand(command, cwd) {
148
+ for (const { markers, binDir } of LOCAL_BIN_PATHS) {
149
+ if (hasRootMarkers(cwd, markers)) {
150
+ const localPath = path.join(cwd, binDir, command);
151
+ if (fs.existsSync(localPath)) {
152
+ return localPath;
153
+ }
154
+ }
155
+ }
156
+ return which(command);
157
+ }
158
+ /**
159
+ * Configuration file search paths (in priority order).
160
+ */
161
+ function getConfigPaths(cwd) {
162
+ const filenames = ["lsp.json", ".lsp.json", "lsp.yaml", ".lsp.yaml", "lsp.yml", ".lsp.yml"];
163
+ const paths = [];
164
+ // Project root files (highest priority)
165
+ for (const filename of filenames) {
166
+ paths.push(path.join(cwd, filename));
167
+ }
168
+ // Project config directory
169
+ const projectConfigDir = path.join(cwd, CONFIG_DIR_NAME);
170
+ for (const filename of filenames) {
171
+ paths.push(path.join(projectConfigDir, filename));
172
+ }
173
+ // User config directory
174
+ const userConfigDir = path.join(os.homedir(), CONFIG_DIR_NAME, "agent");
175
+ for (const filename of filenames) {
176
+ paths.push(path.join(userConfigDir, filename));
177
+ }
178
+ // User home root files (lowest priority fallback)
179
+ for (const filename of filenames) {
180
+ paths.push(path.join(os.homedir(), filename));
181
+ }
182
+ return paths;
183
+ }
184
+ /**
185
+ * Load LSP configuration.
186
+ *
187
+ * Priority (highest to lowest):
188
+ * 1. Project root: lsp.json/.lsp.json/lsp.yml/.lsp.yml/lsp.yaml/.lsp.yaml
189
+ * 2. Project config dir: {CONFIG_DIR_NAME}/lsp.* (+ hidden variants)
190
+ * 3. User config dir: ~/{CONFIG_DIR_NAME}/agent/lsp.* (+ hidden variants)
191
+ * 4. User home root: ~/lsp.*, ~/.lsp.*
192
+ * 5. Auto-detect from project markers + available binaries
193
+ */
194
+ export function loadConfig(cwd) {
195
+ let mergedServers = coerceServerConfigs(DEFAULTS);
196
+ const configPaths = getConfigPaths(cwd).reverse();
197
+ let hasOverrides = false;
198
+ let idleTimeoutMs;
199
+ for (const configPath of configPaths) {
200
+ const parsed = readConfigFile(configPath);
201
+ if (!parsed)
202
+ continue;
203
+ const hasServerOverrides = Object.keys(parsed.servers).length > 0;
204
+ if (hasServerOverrides) {
205
+ hasOverrides = true;
206
+ mergedServers = mergeServers(mergedServers, parsed.servers);
207
+ }
208
+ if (parsed.idleTimeoutMs !== undefined) {
209
+ idleTimeoutMs = parsed.idleTimeoutMs;
210
+ }
211
+ }
212
+ if (!hasOverrides) {
213
+ const detected = {};
214
+ const defaultsWithRuntime = applyRuntimeDefaults(mergedServers);
215
+ for (const [name, config] of Object.entries(defaultsWithRuntime)) {
216
+ if (!hasRootMarkers(cwd, config.rootMarkers))
217
+ continue;
218
+ const resolved = resolveCommand(config.command, cwd);
219
+ if (!resolved)
220
+ continue;
221
+ detected[name] = { ...config, resolvedCommand: resolved };
222
+ }
223
+ return { servers: detected, idleTimeoutMs };
224
+ }
225
+ const mergedWithRuntime = applyRuntimeDefaults(mergedServers);
226
+ const available = {};
227
+ for (const [name, config] of Object.entries(mergedWithRuntime)) {
228
+ if (config.disabled)
229
+ continue;
230
+ const resolved = resolveCommand(config.command, cwd);
231
+ if (!resolved)
232
+ continue;
233
+ available[name] = { ...config, resolvedCommand: resolved };
234
+ }
235
+ return { servers: available, idleTimeoutMs };
236
+ }
237
+ // =============================================================================
238
+ // Server Selection
239
+ // =============================================================================
240
+ export function getServersForFile(config, filePath) {
241
+ const ext = path.extname(filePath).toLowerCase();
242
+ const fileName = path.basename(filePath).toLowerCase();
243
+ const matches = [];
244
+ for (const [name, serverConfig] of Object.entries(config.servers)) {
245
+ const supportsFile = serverConfig.fileTypes.some(fileType => {
246
+ const normalized = fileType.toLowerCase();
247
+ return normalized === ext || normalized === fileName;
248
+ });
249
+ if (supportsFile) {
250
+ matches.push([name, serverConfig]);
251
+ }
252
+ }
253
+ // Sort: primary servers (non-linters) first, then linters
254
+ return matches.sort((a, b) => {
255
+ const aIsLinter = a[1].isLinter ? 1 : 0;
256
+ const bIsLinter = b[1].isLinter ? 1 : 0;
257
+ return aIsLinter - bIsLinter;
258
+ });
259
+ }
260
+ export function getServerForFile(config, filePath) {
261
+ const servers = getServersForFile(config, filePath);
262
+ return servers.length > 0 ? servers[0] : null;
263
+ }
264
+ export function hasCapability(config, capability) {
265
+ return config.capabilities?.[capability] === true;
266
+ }
267
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../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GAAG,SAAS,CAAC;IAC9B,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,QAAgB;IACnE,MAAM,OAAO,GAAG,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACpD,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,aAAa,CAC5B,MAAoB,EACpB,UAA2D;IAE3D,OAAO,MAAM,CAAC,YAAY,EAAE,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;AACnD,CAAC","sourcesContent":["import * as fs from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport * as os from \"node:os\";\nimport * as path from \"node:path\";\nimport { spawnSync } from \"node:child_process\";\nimport YAML from \"yaml\";\nimport { globSync } from \"glob\";\nimport { CONFIG_DIR_NAME } from \"../../config.js\";\nimport { isRecord } from \"./helpers.js\";\nimport type { ServerConfig } from \"./types.js\";\n\nconst require = createRequire(import.meta.url);\nconst DEFAULTS = require(\"./defaults.json\") as Record<string, Partial<ServerConfig>>;\n\nexport interface LspConfig {\n\tservers: Record<string, ServerConfig>;\n\t/** Idle timeout in milliseconds. If set, LSP clients will be shutdown after this period of inactivity. Disabled by default. */\n\tidleTimeoutMs?: number;\n}\n\n// =============================================================================\n// Default Server Configuration Loading\n// =============================================================================\n\nconst PID_TOKEN = \"$PID\";\n\ninterface NormalizedConfig {\n\tservers: Record<string, Partial<ServerConfig>>;\n\tidleTimeoutMs?: number;\n}\n\nfunction parseConfigContent(content: string, filePath: string): unknown {\n\tconst extension = path.extname(filePath).toLowerCase();\n\tif (extension === \".yaml\" || extension === \".yml\") {\n\t\treturn YAML.parse(content) as unknown;\n\t}\n\treturn JSON.parse(content) as unknown;\n}\n\nfunction normalizeConfig(value: unknown): NormalizedConfig | null {\n\tif (!isRecord(value)) return null;\n\n\tconst idleTimeoutMs = typeof value.idleTimeoutMs === \"number\" ? value.idleTimeoutMs : undefined;\n\tconst rawServers = value.servers;\n\n\tif (isRecord(rawServers)) {\n\t\treturn { servers: rawServers as Record<string, Partial<ServerConfig>>, idleTimeoutMs };\n\t}\n\n\tconst servers = Object.fromEntries(Object.entries(value).filter(([key]) => key !== \"idleTimeoutMs\")) as Record<\n\t\tstring,\n\t\tPartial<ServerConfig>\n\t>;\n\n\treturn { servers, idleTimeoutMs };\n}\n\nfunction normalizeStringArray(value: unknown): string[] | null {\n\tif (!Array.isArray(value)) return null;\n\tconst items = value.filter((entry): entry is string => typeof entry === \"string\" && entry.length > 0);\n\treturn items.length > 0 ? items : null;\n}\n\nfunction normalizeServerConfig(name: string, config: Partial<ServerConfig>): ServerConfig | null {\n\tconst command = typeof config.command === \"string\" && config.command.length > 0 ? config.command : null;\n\tconst fileTypes = normalizeStringArray(config.fileTypes);\n\tconst rootMarkers = normalizeStringArray(config.rootMarkers);\n\n\tif (!command || !fileTypes || !rootMarkers) {\n\t\treturn null;\n\t}\n\n\tconst args = Array.isArray(config.args)\n\t\t? config.args.filter((entry): entry is string => typeof entry === \"string\")\n\t\t: undefined;\n\n\treturn {\n\t\t...config,\n\t\tcommand,\n\t\targs,\n\t\tfileTypes,\n\t\trootMarkers,\n\t};\n}\n\nfunction readConfigFile(filePath: string): NormalizedConfig | null {\n\ttry {\n\t\tconst content = fs.readFileSync(filePath, \"utf-8\");\n\t\tconst parsed = parseConfigContent(content, filePath);\n\t\treturn normalizeConfig(parsed);\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction coerceServerConfigs(servers: Record<string, Partial<ServerConfig>>): Record<string, ServerConfig> {\n\tconst result: Record<string, ServerConfig> = {};\n\tfor (const [name, config] of Object.entries(servers)) {\n\t\tconst normalized = normalizeServerConfig(name, config);\n\t\tif (normalized) {\n\t\t\tresult[name] = normalized;\n\t\t}\n\t}\n\treturn result;\n}\n\nfunction mergeServers(\n\tbase: Record<string, ServerConfig>,\n\toverrides: Record<string, Partial<ServerConfig>>,\n): Record<string, ServerConfig> {\n\tconst merged: Record<string, ServerConfig> = { ...base };\n\tfor (const [name, config] of Object.entries(overrides)) {\n\t\tif (merged[name]) {\n\t\t\tconst candidate = { ...merged[name], ...config };\n\t\t\tconst normalized = normalizeServerConfig(name, candidate);\n\t\t\tif (normalized) {\n\t\t\t\tmerged[name] = normalized;\n\t\t\t}\n\t\t} else {\n\t\t\tconst normalized = normalizeServerConfig(name, config);\n\t\t\tif (normalized) {\n\t\t\t\tmerged[name] = normalized;\n\t\t\t}\n\t\t}\n\t}\n\treturn merged;\n}\n\nfunction applyRuntimeDefaults(servers: Record<string, ServerConfig>): Record<string, ServerConfig> {\n\tconst updated: Record<string, ServerConfig> = { ...servers };\n\n\tif (updated.omnisharp?.args) {\n\t\tconst args = updated.omnisharp.args.map((arg: string) => (arg === PID_TOKEN ? String(process.pid) : arg));\n\t\tupdated.omnisharp = { ...updated.omnisharp, args };\n\t}\n\n\treturn updated;\n}\n\n// =============================================================================\n// Configuration Loading\n// =============================================================================\n\nexport function hasRootMarkers(cwd: string, markers: string[]): boolean {\n\tfor (const marker of markers) {\n\t\tif (marker.includes(\"*\")) {\n\t\t\ttry {\n\t\t\t\tconst matches = globSync(marker, { cwd, nodir: false });\n\t\t\t\tif (matches.length > 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// Failed to resolve glob root marker\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tconst filePath = path.join(cwd, marker);\n\t\tif (fs.existsSync(filePath)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n// =============================================================================\n// Local Binary Resolution\n// =============================================================================\n\nconst LOCAL_BIN_PATHS: Array<{ markers: string[]; binDir: string }> = [\n\t{ markers: [\"package.json\", \"package-lock.json\", \"yarn.lock\", \"pnpm-lock.yaml\"], binDir: \"node_modules/.bin\" },\n\t{ markers: [\"pyproject.toml\", \"requirements.txt\", \"setup.py\", \"Pipfile\"], binDir: \".venv/bin\" },\n\t{ markers: [\"pyproject.toml\", \"requirements.txt\", \"setup.py\", \"Pipfile\"], binDir: \"venv/bin\" },\n\t{ markers: [\"pyproject.toml\", \"requirements.txt\", \"setup.py\", \"Pipfile\"], binDir: \".env/bin\" },\n\t{ markers: [\"Gemfile\", \"Gemfile.lock\"], binDir: \"vendor/bundle/bin\" },\n\t{ markers: [\"Gemfile\", \"Gemfile.lock\"], binDir: \"bin\" },\n\t{ markers: [\"go.mod\", \"go.sum\"], binDir: \"bin\" },\n];\n\nfunction which(command: string): string | null {\n\tconst result = spawnSync(\"which\", [command], { encoding: \"utf-8\" });\n\tif (result.status !== 0) return null;\n\treturn result.stdout.trim() || null;\n}\n\nexport function resolveCommand(command: string, cwd: string): string | null {\n\tfor (const { markers, binDir } of LOCAL_BIN_PATHS) {\n\t\tif (hasRootMarkers(cwd, markers)) {\n\t\t\tconst localPath = path.join(cwd, binDir, command);\n\t\t\tif (fs.existsSync(localPath)) {\n\t\t\t\treturn localPath;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn which(command);\n}\n\n/**\n * Configuration file search paths (in priority order).\n */\nfunction getConfigPaths(cwd: string): string[] {\n\tconst filenames = [\"lsp.json\", \".lsp.json\", \"lsp.yaml\", \".lsp.yaml\", \"lsp.yml\", \".lsp.yml\"];\n\tconst paths: string[] = [];\n\n\t// Project root files (highest priority)\n\tfor (const filename of filenames) {\n\t\tpaths.push(path.join(cwd, filename));\n\t}\n\n\t// Project config directory\n\tconst projectConfigDir = path.join(cwd, CONFIG_DIR_NAME);\n\tfor (const filename of filenames) {\n\t\tpaths.push(path.join(projectConfigDir, filename));\n\t}\n\n\t// User config directory\n\tconst userConfigDir = path.join(os.homedir(), CONFIG_DIR_NAME, \"agent\");\n\tfor (const filename of filenames) {\n\t\tpaths.push(path.join(userConfigDir, filename));\n\t}\n\n\t// User home root files (lowest priority fallback)\n\tfor (const filename of filenames) {\n\t\tpaths.push(path.join(os.homedir(), filename));\n\t}\n\n\treturn paths;\n}\n\n/**\n * Load LSP configuration.\n *\n * Priority (highest to lowest):\n * 1. Project root: lsp.json/.lsp.json/lsp.yml/.lsp.yml/lsp.yaml/.lsp.yaml\n * 2. Project config dir: {CONFIG_DIR_NAME}/lsp.* (+ hidden variants)\n * 3. User config dir: ~/{CONFIG_DIR_NAME}/agent/lsp.* (+ hidden variants)\n * 4. User home root: ~/lsp.*, ~/.lsp.*\n * 5. Auto-detect from project markers + available binaries\n */\nexport function loadConfig(cwd: string): LspConfig {\n\tlet mergedServers = coerceServerConfigs(DEFAULTS);\n\n\tconst configPaths = getConfigPaths(cwd).reverse();\n\tlet hasOverrides = false;\n\n\tlet idleTimeoutMs: number | undefined;\n\tfor (const configPath of configPaths) {\n\t\tconst parsed = readConfigFile(configPath);\n\t\tif (!parsed) continue;\n\t\tconst hasServerOverrides = Object.keys(parsed.servers).length > 0;\n\t\tif (hasServerOverrides) {\n\t\t\thasOverrides = true;\n\t\t\tmergedServers = mergeServers(mergedServers, parsed.servers);\n\t\t}\n\t\tif (parsed.idleTimeoutMs !== undefined) {\n\t\t\tidleTimeoutMs = parsed.idleTimeoutMs;\n\t\t}\n\t}\n\n\tif (!hasOverrides) {\n\t\tconst detected: Record<string, ServerConfig> = {};\n\t\tconst defaultsWithRuntime = applyRuntimeDefaults(mergedServers);\n\n\t\tfor (const [name, config] of Object.entries(defaultsWithRuntime)) {\n\t\t\tif (!hasRootMarkers(cwd, config.rootMarkers)) continue;\n\t\t\tconst resolved = resolveCommand(config.command, cwd);\n\t\t\tif (!resolved) continue;\n\t\t\tdetected[name] = { ...config, resolvedCommand: resolved };\n\t\t}\n\n\t\treturn { servers: detected, idleTimeoutMs };\n\t}\n\n\tconst mergedWithRuntime = applyRuntimeDefaults(mergedServers);\n\tconst available: Record<string, ServerConfig> = {};\n\n\tfor (const [name, config] of Object.entries(mergedWithRuntime)) {\n\t\tif (config.disabled) continue;\n\t\tconst resolved = resolveCommand(config.command, cwd);\n\t\tif (!resolved) continue;\n\t\tavailable[name] = { ...config, resolvedCommand: resolved };\n\t}\n\n\treturn { servers: available, idleTimeoutMs };\n}\n\n// =============================================================================\n// Server Selection\n// =============================================================================\n\nexport function getServersForFile(config: LspConfig, filePath: string): Array<[string, ServerConfig]> {\n\tconst ext = path.extname(filePath).toLowerCase();\n\tconst fileName = path.basename(filePath).toLowerCase();\n\tconst matches: Array<[string, ServerConfig]> = [];\n\n\tfor (const [name, serverConfig] of Object.entries(config.servers)) {\n\t\tconst supportsFile = serverConfig.fileTypes.some(fileType => {\n\t\t\tconst normalized = fileType.toLowerCase();\n\t\t\treturn normalized === ext || normalized === fileName;\n\t\t});\n\n\t\tif (supportsFile) {\n\t\t\tmatches.push([name, serverConfig]);\n\t\t}\n\t}\n\n\t// Sort: primary servers (non-linters) first, then linters\n\treturn matches.sort((a, b) => {\n\t\tconst aIsLinter = a[1].isLinter ? 1 : 0;\n\t\tconst bIsLinter = b[1].isLinter ? 1 : 0;\n\t\treturn aIsLinter - bIsLinter;\n\t});\n}\n\nexport function getServerForFile(config: LspConfig, filePath: string): [string, ServerConfig] | null {\n\tconst servers = getServersForFile(config, filePath);\n\treturn servers.length > 0 ? servers[0] : null;\n}\n\nexport function hasCapability(\n\tconfig: ServerConfig,\n\tcapability: keyof NonNullable<ServerConfig[\"capabilities\"]>,\n): boolean {\n\treturn config.capabilities?.[capability] === true;\n}\n"]}