@hydranium/cli 1.0.0-next.37 → 1.0.0-next.371

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 (339) hide show
  1. package/README.md +102 -204
  2. package/bin/hydranium-cli.js +13 -0
  3. package/heap-analysis/heap/core/load.mjs +2 -2
  4. package/heap-analysis/heap/langium/langium.classifier.mjs +22 -11
  5. package/lib/cli-version.js.map +1 -1
  6. package/lib/cli.js +7 -2
  7. package/lib/cli.js.map +1 -1
  8. package/lib/commands/analyze-heap-args.d.ts.map +1 -1
  9. package/lib/commands/analyze-heap-args.js +1 -2
  10. package/lib/commands/analyze-heap-args.js.map +1 -1
  11. package/lib/commands/analyze-heap.d.ts +3 -0
  12. package/lib/commands/analyze-heap.d.ts.map +1 -1
  13. package/lib/commands/analyze-heap.js +2 -1
  14. package/lib/commands/analyze-heap.js.map +1 -1
  15. package/lib/commands/ast-ground-truth-args.d.ts +3 -2
  16. package/lib/commands/ast-ground-truth-args.d.ts.map +1 -1
  17. package/lib/commands/ast-ground-truth-args.js +11 -9
  18. package/lib/commands/ast-ground-truth-args.js.map +1 -1
  19. package/lib/commands/ast-ground-truth-driver.js +4 -2
  20. package/lib/commands/ast-ground-truth-driver.js.map +1 -1
  21. package/lib/commands/ast-ground-truth.js +1 -1
  22. package/lib/commands/ast-ground-truth.js.map +1 -1
  23. package/lib/commands/client-session.d.ts +17 -0
  24. package/lib/commands/client-session.d.ts.map +1 -0
  25. package/lib/commands/client-session.js +27 -0
  26. package/lib/commands/client-session.js.map +1 -0
  27. package/lib/commands/create-args.d.ts +17 -0
  28. package/lib/commands/create-args.d.ts.map +1 -0
  29. package/lib/commands/create-args.js +53 -0
  30. package/lib/commands/create-args.js.map +1 -0
  31. package/lib/commands/create.d.ts +38 -0
  32. package/lib/commands/create.d.ts.map +1 -0
  33. package/lib/commands/create.js +43 -0
  34. package/lib/commands/create.js.map +1 -0
  35. package/lib/commands/delete-args.d.ts +17 -0
  36. package/lib/commands/delete-args.d.ts.map +1 -0
  37. package/lib/commands/delete-args.js +49 -0
  38. package/lib/commands/delete-args.js.map +1 -0
  39. package/lib/commands/delete.d.ts +30 -0
  40. package/lib/commands/delete.d.ts.map +1 -0
  41. package/lib/commands/delete.js +32 -0
  42. package/lib/commands/delete.js.map +1 -0
  43. package/lib/commands/generate-ast-builder.d.ts.map +1 -1
  44. package/lib/commands/generate-ast-builder.js +1 -10
  45. package/lib/commands/generate-ast-builder.js.map +1 -1
  46. package/lib/commands/generate-languages.d.ts +35 -0
  47. package/lib/commands/generate-languages.d.ts.map +1 -0
  48. package/lib/commands/generate-languages.js +105 -0
  49. package/lib/commands/generate-languages.js.map +1 -0
  50. package/lib/commands/generate-transfer-builder.d.ts +33 -0
  51. package/lib/commands/generate-transfer-builder.d.ts.map +1 -0
  52. package/lib/commands/generate-transfer-builder.js +86 -0
  53. package/lib/commands/generate-transfer-builder.js.map +1 -0
  54. package/lib/commands/generate-transfer-model-args.d.ts.map +1 -1
  55. package/lib/commands/generate-transfer-model-args.js +20 -5
  56. package/lib/commands/generate-transfer-model-args.js.map +1 -1
  57. package/lib/commands/generate-transfer-model-config.d.ts.map +1 -1
  58. package/lib/commands/generate-transfer-model-config.js +8 -3
  59. package/lib/commands/generate-transfer-model-config.js.map +1 -1
  60. package/lib/commands/generate-transfer-model.d.ts +40 -9
  61. package/lib/commands/generate-transfer-model.d.ts.map +1 -1
  62. package/lib/commands/generate-transfer-model.js +219 -67
  63. package/lib/commands/generate-transfer-model.js.map +1 -1
  64. package/lib/commands/generated-module-path.d.ts +16 -0
  65. package/lib/commands/generated-module-path.d.ts.map +1 -0
  66. package/lib/commands/generated-module-path.js +21 -0
  67. package/lib/commands/generated-module-path.js.map +1 -0
  68. package/lib/commands/harness-args.d.ts +44 -42
  69. package/lib/commands/harness-args.d.ts.map +1 -1
  70. package/lib/commands/harness-args.js +109 -27
  71. package/lib/commands/harness-args.js.map +1 -1
  72. package/lib/commands/headless-harness.d.ts +37 -20
  73. package/lib/commands/headless-harness.d.ts.map +1 -1
  74. package/lib/commands/headless-harness.js +71 -19
  75. package/lib/commands/headless-harness.js.map +1 -1
  76. package/lib/commands/init-args.d.ts +2 -0
  77. package/lib/commands/init-args.d.ts.map +1 -1
  78. package/lib/commands/init-args.js +74 -31
  79. package/lib/commands/init-args.js.map +1 -1
  80. package/lib/commands/init-hosts.d.ts +24 -0
  81. package/lib/commands/init-hosts.d.ts.map +1 -0
  82. package/lib/commands/init-hosts.js +37 -0
  83. package/lib/commands/init-hosts.js.map +1 -0
  84. package/lib/commands/init-prompt.d.ts +3 -3
  85. package/lib/commands/init-prompt.d.ts.map +1 -1
  86. package/lib/commands/init-prompt.js +4 -5
  87. package/lib/commands/init-prompt.js.map +1 -1
  88. package/lib/commands/init-templates.d.ts +26 -14
  89. package/lib/commands/init-templates.d.ts.map +1 -1
  90. package/lib/commands/init-templates.js +2989 -743
  91. package/lib/commands/init-templates.js.map +1 -1
  92. package/lib/commands/init-wizard.d.ts +3 -0
  93. package/lib/commands/init-wizard.d.ts.map +1 -1
  94. package/lib/commands/init-wizard.js +46 -31
  95. package/lib/commands/init-wizard.js.map +1 -1
  96. package/lib/commands/init-workspace.d.ts +13 -11
  97. package/lib/commands/init-workspace.d.ts.map +1 -1
  98. package/lib/commands/init-workspace.js +21 -7
  99. package/lib/commands/init-workspace.js.map +1 -1
  100. package/lib/commands/init.d.ts +58 -22
  101. package/lib/commands/init.d.ts.map +1 -1
  102. package/lib/commands/init.js +206 -48
  103. package/lib/commands/init.js.map +1 -1
  104. package/lib/commands/kebab.d.ts +15 -0
  105. package/lib/commands/kebab.d.ts.map +1 -0
  106. package/lib/commands/kebab.js +17 -0
  107. package/lib/commands/kebab.js.map +1 -0
  108. package/lib/commands/lint-grammar-args.d.ts +3 -2
  109. package/lib/commands/lint-grammar-args.d.ts.map +1 -1
  110. package/lib/commands/lint-grammar-args.js +13 -10
  111. package/lib/commands/lint-grammar-args.js.map +1 -1
  112. package/lib/commands/lint-grammar-driver.js +2 -1
  113. package/lib/commands/lint-grammar-driver.js.map +1 -1
  114. package/lib/commands/lint-grammar-report.js.map +1 -1
  115. package/lib/commands/lint-grammar.js +1 -1
  116. package/lib/commands/lint-grammar.js.map +1 -1
  117. package/lib/commands/measure-memory-args.d.ts +3 -2
  118. package/lib/commands/measure-memory-args.d.ts.map +1 -1
  119. package/lib/commands/measure-memory-args.js +22 -11
  120. package/lib/commands/measure-memory-args.js.map +1 -1
  121. package/lib/commands/measure-memory-driver.js +5 -3
  122. package/lib/commands/measure-memory-driver.js.map +1 -1
  123. package/lib/commands/measure-memory.js +1 -1
  124. package/lib/commands/measure-memory.js.map +1 -1
  125. package/lib/commands/model-docs-args.d.ts +4 -3
  126. package/lib/commands/model-docs-args.d.ts.map +1 -1
  127. package/lib/commands/model-docs-args.js +12 -10
  128. package/lib/commands/model-docs-args.js.map +1 -1
  129. package/lib/commands/model-docs-driver.js +2 -1
  130. package/lib/commands/model-docs-driver.js.map +1 -1
  131. package/lib/commands/model-docs.js +1 -1
  132. package/lib/commands/model-docs.js.map +1 -1
  133. package/lib/commands/projects-args.d.ts.map +1 -1
  134. package/lib/commands/projects-args.js +5 -5
  135. package/lib/commands/projects-args.js.map +1 -1
  136. package/lib/commands/projects.d.ts +3 -4
  137. package/lib/commands/projects.d.ts.map +1 -1
  138. package/lib/commands/projects.js +2 -2
  139. package/lib/commands/projects.js.map +1 -1
  140. package/lib/commands/query-args.d.ts.map +1 -1
  141. package/lib/commands/query-args.js +6 -5
  142. package/lib/commands/query-args.js.map +1 -1
  143. package/lib/commands/query.d.ts +6 -5
  144. package/lib/commands/query.d.ts.map +1 -1
  145. package/lib/commands/query.js +5 -4
  146. package/lib/commands/query.js.map +1 -1
  147. package/lib/commands/reflect-args.d.ts +3 -2
  148. package/lib/commands/reflect-args.d.ts.map +1 -1
  149. package/lib/commands/reflect-args.js +13 -10
  150. package/lib/commands/reflect-args.js.map +1 -1
  151. package/lib/commands/reflect-driver.js +2 -1
  152. package/lib/commands/reflect-driver.js.map +1 -1
  153. package/lib/commands/reflect-report.js.map +1 -1
  154. package/lib/commands/reflect.js +1 -1
  155. package/lib/commands/reflect.js.map +1 -1
  156. package/lib/commands/save-args.d.ts.map +1 -1
  157. package/lib/commands/save-args.js +7 -4
  158. package/lib/commands/save-args.js.map +1 -1
  159. package/lib/commands/save.d.ts +8 -4
  160. package/lib/commands/save.d.ts.map +1 -1
  161. package/lib/commands/save.js +12 -23
  162. package/lib/commands/save.js.map +1 -1
  163. package/lib/commands/validate-args.d.ts +3 -2
  164. package/lib/commands/validate-args.d.ts.map +1 -1
  165. package/lib/commands/validate-args.js +13 -10
  166. package/lib/commands/validate-args.js.map +1 -1
  167. package/lib/commands/validate-driver.js +2 -1
  168. package/lib/commands/validate-driver.js.map +1 -1
  169. package/lib/commands/validate-report.js.map +1 -1
  170. package/lib/commands/validate.js +1 -1
  171. package/lib/commands/validate.js.map +1 -1
  172. package/lib/commands/watch-args.d.ts.map +1 -1
  173. package/lib/commands/watch-args.js +6 -4
  174. package/lib/commands/watch-args.js.map +1 -1
  175. package/lib/commands/watch.d.ts +3 -4
  176. package/lib/commands/watch.d.ts.map +1 -1
  177. package/lib/commands/watch.js +20 -2
  178. package/lib/commands/watch.js.map +1 -1
  179. package/lib/driver-heap.d.ts +52 -0
  180. package/lib/driver-heap.d.ts.map +1 -0
  181. package/lib/driver-heap.js +51 -0
  182. package/lib/driver-heap.js.map +1 -0
  183. package/lib/index.d.ts +2 -0
  184. package/lib/index.d.ts.map +1 -1
  185. package/lib/index.js +2 -0
  186. package/lib/index.js.map +1 -1
  187. package/lib/log-level.d.ts +21 -11
  188. package/lib/log-level.d.ts.map +1 -1
  189. package/lib/log-level.js +25 -14
  190. package/lib/log-level.js.map +1 -1
  191. package/lib/spawn-data-server.d.ts +9 -4
  192. package/lib/spawn-data-server.d.ts.map +1 -1
  193. package/lib/spawn-data-server.js +5 -4
  194. package/lib/spawn-data-server.js.map +1 -1
  195. package/lib/stderr-connection-logger.d.ts +12 -0
  196. package/lib/stderr-connection-logger.d.ts.map +1 -0
  197. package/lib/stderr-connection-logger.js +16 -0
  198. package/lib/stderr-connection-logger.js.map +1 -0
  199. package/lib/testing/echo-server.js +9 -1
  200. package/lib/testing/echo-server.js.map +1 -1
  201. package/package.json +91 -39
  202. package/src/cli.ts +7 -2
  203. package/src/commands/analyze-heap-args.ts +1 -2
  204. package/src/commands/analyze-heap.ts +4 -1
  205. package/src/commands/ast-ground-truth-args.ts +15 -12
  206. package/src/commands/ast-ground-truth-driver.ts +4 -2
  207. package/src/commands/ast-ground-truth.ts +1 -1
  208. package/src/commands/client-session.ts +33 -0
  209. package/src/commands/create-args.ts +68 -0
  210. package/src/commands/create.ts +83 -0
  211. package/src/commands/delete-args.ts +64 -0
  212. package/src/commands/delete.ts +61 -0
  213. package/src/commands/generate-ast-builder.ts +1 -11
  214. package/src/commands/generate-languages.ts +132 -0
  215. package/src/commands/generate-transfer-builder.ts +101 -0
  216. package/src/commands/generate-transfer-model-args.ts +20 -5
  217. package/src/commands/generate-transfer-model-config.ts +8 -3
  218. package/src/commands/generate-transfer-model.ts +291 -65
  219. package/src/commands/generated-module-path.ts +22 -0
  220. package/src/commands/harness-args.ts +99 -31
  221. package/src/commands/headless-harness.ts +89 -28
  222. package/src/commands/init-args.ts +76 -31
  223. package/src/commands/init-hosts.ts +51 -0
  224. package/src/commands/init-prompt.ts +5 -6
  225. package/src/commands/init-templates.ts +3161 -756
  226. package/src/commands/init-wizard.ts +55 -31
  227. package/src/commands/init-workspace.ts +31 -16
  228. package/src/commands/init.ts +266 -63
  229. package/src/commands/kebab.ts +17 -0
  230. package/src/commands/lint-grammar-args.ts +17 -13
  231. package/src/commands/lint-grammar-driver.ts +2 -1
  232. package/src/commands/lint-grammar.ts +1 -1
  233. package/src/commands/measure-memory-args.ts +27 -14
  234. package/src/commands/measure-memory-driver.ts +5 -3
  235. package/src/commands/measure-memory.ts +1 -1
  236. package/src/commands/model-docs-args.ts +16 -13
  237. package/src/commands/model-docs-driver.ts +2 -1
  238. package/src/commands/model-docs.ts +1 -1
  239. package/src/commands/projects-args.ts +5 -4
  240. package/src/commands/projects.ts +4 -6
  241. package/src/commands/query-args.ts +6 -4
  242. package/src/commands/query.ts +9 -9
  243. package/src/commands/reflect-args.ts +17 -13
  244. package/src/commands/reflect-driver.ts +2 -1
  245. package/src/commands/reflect.ts +1 -1
  246. package/src/commands/save-args.ts +7 -3
  247. package/src/commands/save.ts +24 -27
  248. package/src/commands/validate-args.ts +17 -13
  249. package/src/commands/validate-driver.ts +2 -1
  250. package/src/commands/validate.ts +1 -1
  251. package/src/commands/watch-args.ts +6 -3
  252. package/src/commands/watch.ts +28 -7
  253. package/src/driver-heap.ts +65 -0
  254. package/src/index.ts +2 -0
  255. package/src/log-level.ts +42 -14
  256. package/src/spawn-data-server.ts +17 -5
  257. package/src/stderr-connection-logger.ts +18 -0
  258. package/src/testing/echo-server.ts +11 -2
  259. package/templates/client/gitignore +3 -0
  260. package/templates/client/src/__GRAMMAR_ID__-diagram-module.ts +82 -0
  261. package/templates/editorconfig +15 -0
  262. package/templates/gitignore +1 -0
  263. package/templates/host-browser/esbuild.mjs +82 -0
  264. package/templates/host-browser/gitignore +4 -0
  265. package/templates/host-browser/hydranium-mark.svg +40 -0
  266. package/templates/host-browser/index.html +287 -0
  267. package/templates/host-browser/playwright.config.mts +24 -0
  268. package/templates/host-browser/src/data-status.ts +15 -0
  269. package/templates/host-browser/src/diagram-save.ts +60 -0
  270. package/templates/host-browser/src/diagram.ts +118 -0
  271. package/templates/host-browser/src/editor.ts +102 -0
  272. package/templates/host-browser/src/log.ts +14 -0
  273. package/templates/host-browser/src/monaco-editor-core-worker.d.ts +7 -0
  274. package/templates/host-browser/src/monaco-editor-worker.ts +10 -0
  275. package/templates/host-browser/src/posix-path-shim.ts +23 -0
  276. package/templates/host-browser/src/shown-file.ts +61 -0
  277. package/templates/host-browser/src/workspace.ts +5 -0
  278. package/templates/host-browser/tsconfig.e2e.json +16 -0
  279. package/templates/host-browser/tsconfig.page.json +16 -0
  280. package/templates/host-browser/tsconfig.worker.json +16 -0
  281. package/templates/host-theia-browser/esbuild.mjs +24 -0
  282. package/templates/host-theia-browser/gitignore +9 -0
  283. package/templates/host-theia-browser/playwright.config.mts +42 -0
  284. package/templates/host-theia-browser/start.mjs +50 -0
  285. package/templates/host-theia-browser/tsconfig.e2e.json +16 -0
  286. package/templates/host-theia-electron/esbuild.mjs +27 -0
  287. package/templates/host-theia-electron/gitignore +8 -0
  288. package/templates/host-theia-electron/playwright.config.mts +12 -0
  289. package/templates/host-theia-electron/start.mjs +47 -0
  290. package/templates/host-theia-electron/tsconfig.e2e.json +16 -0
  291. package/templates/host-vscode/esbuild.mjs +38 -0
  292. package/templates/host-vscode/gitignore +7 -0
  293. package/templates/host-vscode/playwright.config.mts +14 -0
  294. package/templates/host-vscode/src/__GRAMMAR_ID__-diagram-editor.ts +19 -0
  295. package/templates/host-vscode/src/show-model-command.ts +24 -0
  296. package/templates/host-vscode/src/webview/__GRAMMAR_ID__-diagram.ts +18 -0
  297. package/templates/host-vscode/src/webview/diagram.css +40 -0
  298. package/templates/host-vscode/start.mjs +22 -0
  299. package/templates/host-vscode/test/install-vscode.mts +21 -0
  300. package/templates/host-vscode/test/vscode-version.mts +10 -0
  301. package/templates/host-vscode/tsconfig.e2e.json +17 -0
  302. package/templates/host-vscode/tsconfig.json +19 -0
  303. package/templates/host-vscode/tsconfig.webview.json +17 -0
  304. package/templates/oxlintrc.json +4 -0
  305. package/templates/protocol/gitignore +3 -0
  306. package/templates/protocol/src/__GRAMMAR_ID__-diagram-types.ts +47 -0
  307. package/templates/server/gitignore +6 -0
  308. package/templates/server/src/glsp/__GRAMMAR_ID__/create-node-operation-handler.ts +62 -0
  309. package/templates/server/src/glsp/__GRAMMAR_ID__/delete-operation-handler.ts +63 -0
  310. package/templates/server/src/glsp/__GRAMMAR_ID__/gmodel-factory.ts +144 -0
  311. package/templates/server/src/glsp/__GRAMMAR_ID__/state.ts +18 -0
  312. package/templates/server/src/glsp/__GRAMMAR_ID__/storage.ts +16 -0
  313. package/templates/server/src/glsp/__GRAMMAR_ID__/submission-handler.ts +24 -0
  314. package/templates/server/src/grammar/common.langium +12 -0
  315. package/templates/server/src/language-server/__GRAMMAR_ID__-serializer.ts +53 -0
  316. package/templates/server/src/language-server/__GRAMMAR_ID__-validation.ts +30 -0
  317. package/templates/server/src/language-server/ast.ts +23 -0
  318. package/templates/server/src/node/services.ts +16 -0
  319. package/templates/server/test/__GRAMMAR_ID__-diagram.test.ts +388 -0
  320. package/templates/server/test/tsconfig.json +4 -0
  321. package/templates/server/tsconfig.test.json +10 -0
  322. package/templates/server/vitest.config.ts +14 -0
  323. package/templates/theia/gitignore +3 -0
  324. package/templates/theia/src/browser/__GRAMMAR_ID__-diagram-frontend-module.ts +65 -0
  325. package/templates/theia/src/browser/__PROJECT_ID__-connection-preload-module.ts +15 -0
  326. package/templates/theia/src/browser/__PROJECT_ID__-data-connection.ts +15 -0
  327. package/templates/theia/src/browser/__PROJECT_ID__-data-port.ts +11 -0
  328. package/templates/theia/src/browser/__PROJECT_ID__-glsp-client-contribution.ts +13 -0
  329. package/templates/theia/src/browser/__PROJECT_ID__-show-model-command.ts +51 -0
  330. package/templates/theia/src/common/__PROJECT_ID__-glsp-contribution.ts +3 -0
  331. package/templates/theia/src/node/__PROJECT_ID__-connection-backend-module.ts +12 -0
  332. package/templates/theia/src/node/__PROJECT_ID__-data-backend-module.ts +15 -0
  333. package/templates/theia/src/node/__PROJECT_ID__-glsp-backend-module.ts +16 -0
  334. package/templates/theia/style/diagram.css +20 -0
  335. package/templates/theia/tsconfig.json +24 -0
  336. package/templates/vscode-servers/gitignore +4 -0
  337. package/templates/vscode-servers/tsconfig.json +19 -0
  338. package/templates/workspace/nodes.__EXTENSION__ +5 -0
  339. package/templates/workspace/references.__EXTENSION__ +2 -0
package/README.md CHANGED
@@ -1,240 +1,138 @@
1
1
  # `@hydranium/cli`
2
2
 
3
- The headless tool surface of the [Hydranium](https://github.com/eclipse-emfcloud/hydranium)
4
- framework, published as the `hydranium-cli` binary.
5
-
6
- Install it if you are building a Hydranium language. `init` scaffolds a complete project from one
7
- invocation; the other twelve subcommands drive an already-built head from a shell or a CI step —
8
- grammar introspection, headless validation, transfer-model codegen, memory measurement, and
9
- operations against a spawned data-server.
3
+ The `hydranium-cli` binary of the
4
+ [Hydranium](https://github.com/eclipse-emfcloud/hydranium) framework. You
5
+ install it when you build a Hydranium language: `init` scaffolds the project,
6
+ and the other commands drive your built head from a shell or a CI step.
10
7
 
11
8
  ## What it gives you
12
9
 
13
- - **`init`** — a buildable project (starter grammar, `create<Name>Services` DI wiring, an LSP +
14
- data-server launch, `langium-config.json`, build scripts) from one command, or from a wizard that
15
- echoes the flags it composed.
16
- - **CI gates that need no editor** — `validate` exits non-zero on a diagnostic; `lint-grammar`
17
- checks that every concrete cross-reference target carries a name property and that each language
18
- declares an entry rule.
19
- - **Grammar introspection** — `reflect` (type hierarchy, terminals, every cross-reference target;
20
- Markdown or `--json`) and `model-docs` (a navigable Markdown model reference for your own docs).
21
- - **Codegen** — `generate-transfer-model` turns a Langium-generated AST into a serializable transfer
22
- model, once or in `--watch`.
23
- - **Memory and profiling** — `measure-memory`, `ast-ground-truth`, and the memlab-based
24
- `analyze-heap`.
25
- - **Data-server operations** — `projects`, `query`, `save` and `watch` spawn a data-server child and
26
- speak its protocol, printing JSON / NDJSON a script can pipe.
10
+ - Scaffold a buildable language project with one `init` command, or answer a
11
+ wizard that echoes the command it composed.
12
+ - Fail a CI step on a diagnostic or a grammar-convention violation, with no
13
+ editor running.
14
+ - Dump your grammar's reflection, or write a Markdown model reference for your
15
+ own docs.
16
+ - Generate the serializable transfer model from Langium's generated AST.
17
+ - Measure model-store memory and analyze a V8 heap snapshot.
18
+ - List, read, create, save and watch documents through a spawned data server,
19
+ printing JSON a script can pipe, and delete them.
27
20
 
28
21
  ## Install
29
22
 
30
- > **Nothing in `@hydranium/*` is on npm yet**, so every `npx` line below
31
- > resolves to no package and fails with `E404`. Until the first release the CLI
32
- > is reachable only from a clone of this repository: run `npm run build`, then
33
- > substitute `node packages/cli/lib/cli.js` for the `npx …` prefix. Subcommands,
34
- > flags and output are the same either way.
35
-
36
- `init` needs no install at all:
23
+ `init` needs no install:
37
24
 
38
25
  ```bash
39
26
  npx @hydranium/cli init ./my-lang --name MyLang
40
27
  ```
41
28
 
42
- For the subcommands you run repeatedly, add it to the project it inspects, or install it globally:
29
+ For the commands you run repeatedly, add it to the project it inspects, or
30
+ install it globally:
43
31
 
44
32
  ```bash
45
33
  npm install --save-dev @hydranium/cli
46
34
  npm install --global @hydranium/cli
47
35
  ```
48
36
 
49
- The framework edges are **peer dependencies** — `@hydranium/core`, `@hydranium/data-server`,
50
- `@hydranium/langium`, `@hydranium/protocol` and `vscode-jsonrpc` — so the CLI runs the same physical
51
- copies as the head it inspects (`init` itself needs none of them). The memlab packages
52
- `analyze-heap` loads are **optional peer dependencies**, so installing this package pulls no browser:
53
- run `npm install @memlab/core @memlab/heap-analysis` (heavy, ~86 MB) before the first
54
- `analyze-heap`. Every other subcommand works without them.
55
-
56
- ## Subcommands
57
-
58
- `hydranium-cli --help` lists them; `hydranium-cli <command> --help` prints one command's own flags.
59
-
60
- Most subcommands take `--services <module>`: an ESM module exporting a zero-arg
61
- `createServices(): { shared }` thunk — normally your build's `./lib/services.js`. The head wires its
62
- own filesystem inside, so the CLI boots it with no arguments.
63
-
64
- **Scaffolding**
65
-
66
- - `init <target-dir>` — scaffold a new language project. See the section below.
67
-
68
- **Grammar and workspace** (`--services <module>`)
69
-
70
- - `reflect` — dump the grammar/AST reflection: type hierarchy, per-language terminals and entry
71
- rule, every cross-reference target. `--json`, `--out-file <file>`.
72
- - `lint-grammar` — check the grammar against framework conventions; non-zero exit on a violation.
73
- `--name-property <p>` (repeatable), `--strict`, `--json`.
74
- - `model-docs` — emit a navigable Markdown model reference on stdout, or into `--out-file <file>`.
75
- - `validate <workspace>` — build a workspace headlessly and report its diagnostics; non-zero exit on
76
- any error. `--strict` (also fail on warnings), `--json`, `--out-file <file>`.
77
- - `measure-memory <workspace>` — measure model-store memory in an `--expose-gc` child.
78
- `--edits <N>`, `--edit-docs <N>`, `--churn-suffix <ext>`, `--settle <ms>`, `--snapshot`,
79
- `--snapshot-path <p>`, `--profile <dims>`, `--session-out <dir>`, `--json`.
80
- - `ast-ground-truth <workspace>` — tally the live model's AST nodes by `$type`, the ground truth
81
- `analyze-heap --validate` checks a snapshot against. `--out-file <file>`.
82
-
83
- All six also take `--log-level <off|error|warn|info|debug|trace>`, which sets the threshold for the
84
- head the subcommand boots — not for the CLI itself. It reaches the head through the child's
85
- environment, so a head that binds a logger of its own decides what the flag means to it.
86
-
87
- The three `<workspace>` commands resolve that argument to an existing directory before they start —
88
- a filesystem path or a `file:` URI — and exit 2 naming it when it reaches none. Without that a CI
89
- step whose path has rotted builds nothing, reports whatever documents the head contributes
90
- independently of the workspace, and exits 0; the count is a property of the head, so it can be
91
- plausibly non-zero and cannot be read as the tell.
92
-
93
- **Codegen**
94
-
95
- - `generate-transfer-model` — generate a transfer-model TypeScript file from a Langium AST.
96
- `--ast-file`, `--augmentation-file` and `--out-file` are required, and may come from
97
- `--config <path>` instead; `--langium-config <path>` derives `--ast-file` from that config's `out`
98
- directory. `--watch` regenerates on change, and the output-naming flags (`--element-type-name`,
99
- `--terminals-name`, `--terminals-source-name`, `--skip-type-alias`, `--skip-terminal`,
100
- `--regen-command`) tune the emitted file.
101
-
102
- **Heap analysis**
103
-
104
- - `analyze-heap <snapshot>` — Langium-aware V8 heap-snapshot analysis. Its flags (`--out-file`,
105
- `--json`, `--diff`, `--validate <gt.json>`, `--renderer`, and the drill-down tuning flags) are
106
- declared alongside every other subcommand's, so an unrecognised one is rejected rather than
107
- ignored.
108
-
109
- **Data-server operations** (`--server "<cmd> [args...]"`)
110
-
111
- These spawn a data-server child and talk to it over its protocol. All four also take `--cwd <dir>`
112
- and `--log-level <off|error|warn|info|debug|trace>`.
113
-
114
- `--server` has to name an entry that puts the **data** protocol on stdio, which for a scaffolded
115
- project is `lib/data-server-main.js` — `init` emits it, and the `<project-id>-data-server` bin key
116
- points at it. `lib/main.js` is the editor entry: stdio there carries LSP and the data head is a
117
- socket whose port is published over the LSP connection, so pointing `--server` at it answers
118
- `Unhandled method data-server/getProjects` (or, without `--stdio`, exits on "Connection input stream
119
- is not set"). Pass the workspace as the entry's own argument rather than through `--cwd`: `--cwd`
120
- re-roots the child, so a relative entry path would resolve against the workspace — the parser
121
- refuses that combination by name rather than letting the child fail on a bare module-not-found.
122
- An absolute entry path works with `--cwd`.
37
+ | Peer | Range |
38
+ | ------------------------ | ------------- |
39
+ | `@hydranium/core` | `^1.0.0-next` |
40
+ | `@hydranium/data-server` | `^1.0.0-next` |
41
+ | `@hydranium/langium` | `^1.0.0-next` |
42
+ | `@hydranium/protocol` | `^1.0.0-next` |
43
+ | `@memlab/core` | `^2.0.3` |
44
+ | `@memlab/heap-analysis` | `^2.0.3` |
45
+ | `vscode-jsonrpc` | `^9.0.0` |
46
+
47
+ The two memlab packages are optional peers that only `analyze-heap` loads:
48
+ install them with `npm install @memlab/core @memlab/heap-analysis` before its
49
+ first run.
50
+
51
+ ## Commands
52
+
53
+ `hydranium-cli --help` lists the commands, and `hydranium-cli <command> --help`
54
+ lists each command's flags.
55
+
56
+ - **Scaffolding.** `init` writes a project you can build right away: a server
57
+ package, a protocol package its clients share, a client package with a
58
+ diagram, a browser page around the heads with `--hosts browser`, VS Code
59
+ extensions with `--hosts vscode`, a Theia extension with a browser
60
+ application with `--hosts theia-browser` or an Electron one with
61
+ `--hosts theia-electron`, and a starter workspace.
62
+ - **Grammar and workspace.** Boot your built head to reflect its grammar, lint
63
+ it, write a model reference, validate a workspace, or count its AST nodes.
64
+ - **Codegen.** `generate-transfer-model` turns the AST into a transfer model,
65
+ once or on watch, and can also write each grammar's language id and
66
+ extensions for a package your clients share without Langium, and a
67
+ `transferNode` builder for your tests.
68
+ - **Memory.** Measure a workspace's model-store memory, and analyze a heap
69
+ snapshot.
70
+ - **Data server.** Spawn your data head and list projects, or query, create,
71
+ save, delete or watch a document.
72
+
73
+ The commands that boot your head take `--services <module>`. That is an ESM
74
+ module exporting a zero-arg `createServices()` that returns `{ shared }`; in a
75
+ scaffolded project, that is `./server/lib/node/services.js` from the project
76
+ root. To run the head from its TypeScript source instead, register a loader
77
+ with `--import`:
78
+ `npx hydranium-cli reflect --import tsx --services ./server/src/node/services.ts`.
79
+
80
+ The data-server commands take `--server "<cmd> [args...]"`. Point it at the
81
+ data head's stdio entry, `server/lib/data-server-main.js` in a scaffolded
82
+ project, not at the editor entry `server/lib/main.js`, whose stdio carries LSP.
83
+ Pass the workspace as the entry's argument rather than through `--cwd`:
123
84
 
124
85
  ```bash
125
- hydranium-cli projects --server "node ./lib/data-server-main.js ./models"
86
+ hydranium-cli projects --server "node ./server/lib/data-server-main.js ./workspace"
126
87
  ```
127
88
 
128
- - `projects` — list the projects the server exposes, one JSON envelope per line.
129
- - `query --uri <uri>` — print that document's envelope as a single JSON line.
130
- - `save --uri <uri> --content <text|@file>` — update and persist the document; an `@`-prefixed value
131
- reads the content from a file. `--client-id <id>`. This is the only writing subcommand, and it
132
- spawns a data server of its own: a workspace has a **single writer**, so pointing it at one an
133
- editor already has open is two writers and the later write wins. Neither process will see a
134
- half-written file, but nothing serialises them either, so a lost write is the documented
135
- outcome rather than a defect — the guarantee, its one exception and what it does not cover are
136
- in [Status: one process writes a workspace](../../docs/adopting/status.md#one-process-writes-a-workspace).
137
- - `watch --uri <uri>` — subscribe to document updates and print events as NDJSON until Ctrl-C.
138
- `--client-id <id>`.
139
-
140
- ## `init` in detail
141
-
142
- `init` writes a project you can build immediately, and it writes **only inside the target
143
- directory** — it refuses a non-empty directory without `--force`, and it never edits a surrounding
144
- manifest (a root `workspaces` entry is printed, not added). It also does **not** run `npm install`
145
- or `langium generate`; both are printed as next steps.
146
-
147
- Project options are position-free:
148
-
149
- - `<target-dir>` and `--name <Name>` are required. `--name` is the PascalCase **project** name and
150
- drives the shared generated symbols (`<Name>AstReflection`, `<Name>GeneratedSharedModule`).
151
- - `--heads <list>` picks the protocol heads from `lsp`, `data`, `glsp`; default `lsp,data`. `lsp` is
152
- mandatory — it owns the workspace, the build pipeline and the shared tier the others read through.
153
- - `--monorepo` scaffolds a member of the surrounding npm workspace, `--scope <@scope>` sets the npm
154
- scope, `--public` drops the emitted `"private": true`, `--force` allows a non-empty directory.
155
-
156
- The emitted manifest carries `files` (`lib`, `src`, `syntaxes`), a derived `description` and
157
- `keywords`, and an empty `author` for you to fill. It is `"private": true` unless you pass
158
- `--public`, because it also declares `"license": "UNLICENSED"` — a scaffold cannot pick a licence for
159
- your project, and a package that grants no rights has no business being publishable to a public
160
- registry. Choose a licence, then pass `--public`. The wizard asks this on every run rather than
161
- letting a default settle it. `files` is not cosmetic: without it npm falls back
162
- to the `.gitignore` the scaffold also writes, which ignores `lib/` — so a publish would ship `main`
163
- and omit the `bin` targets beside it, and succeed. There is deliberately no `repository`: a scaffold
164
- cannot know yours, and tooling follows that field rather than merely displaying it.
165
-
166
- There is one `bin` key per executable entry — `<project-id>` for `src/main.ts`, plus
167
- `<project-id>-data-server` for `src/data-server-main.ts` when `data` is in `--heads`. Both sources
168
- begin with a `#!` line, because npm sets the exec bit on a linked target without adding one: a
169
- first line that is anything else is handed to the shell.
170
-
171
- Grammar options are **repeatable and order-scoped**: each applies to the `--grammar` it follows.
172
-
173
- - `--grammar <Name>` — the PascalCase grammar name; pass it once per grammar. Defaults to `--name`.
174
- - `--extensions <list>` — comma-separated file extensions for that grammar, leading dot optional;
175
- accumulates. Defaults to the kebab-cased grammar name.
176
- - `--language-id <id>` — override that grammar's derived routing key.
177
- - `--diagram` — scaffold a GLSP diagram for that grammar; requires `glsp` in `--heads`.
178
-
179
- Leave `--name` off on an interactive terminal and `init` prompts instead, then echoes the command it
180
- composed before running it — so the wizard is a way to reach an `init` command line, not an
181
- alternative to one. Without a TTY a missing `--name` stays an error, so CI never hangs.
182
-
183
- ```bash
184
- # Scaffold, install, build
185
- npx @hydranium/cli init ./my-lang --name MyLang
186
- cd my-lang
187
- npm install
188
- npm run build # langium generate + tsc, into lib/
189
- npm test # the scaffolded DI-composition test
190
-
191
- # The editor entry: LSP on stdio, every other head on a published socket
192
- node lib/main.js --stdio
193
-
194
- # The data head alone, on stdio — the entry the four --server subcommands spawn
195
- hydranium-cli projects --server "node ./lib/data-server-main.js ./models"
196
-
197
- # Drive the rest of the CLI against the built factory
198
- npx hydranium-cli reflect --services ./lib/services.js
199
- npx hydranium-cli lint-grammar --services ./lib/services.js
200
- npx hydranium-cli validate --services ./lib/services.js ./models
201
- npx hydranium-cli model-docs --services ./lib/services.js --out-file model-reference.md
202
-
203
- # Several grammars, three heads, one of them with a diagram
204
- npx @hydranium/cli init ./order-flow --name OrderFlow --heads lsp,data,glsp \
205
- --grammar Domain --grammar Process --diagram \
206
- --grammar Layout --extensions diagram
89
+ `create`, `save` and `delete` spawn a data server of their own, and a
90
+ workspace has one writer. Writing in a workspace an editor has open makes two
91
+ writers, and one write is lost: an editor that holds a deleted file can save it
92
+ back.
93
+
94
+ `generate-transfer-model` emits a constant under each type's name, as Langium
95
+ does for the AST. If the module that re-exports the generated model narrows an
96
+ interface, its declaration hides the generated constant of the same name, so
97
+ re-export that constant beside it. The generated `<LanguageId>TransferTypes`
98
+ map still names the generated interface, so declare the map under its own
99
+ name too, and `transferNode` builds the narrowed type. That reaches only the
100
+ type's own entry: a property or a union that holds the type, here a
101
+ `Declaration`, still names the generated interface.
102
+
103
+ ```ts
104
+ import * as generated from './generated-hydranium/transfer-model.js';
105
+ export * from './generated-hydranium/transfer-model.js';
106
+ export interface Entity extends generated.Entity {
107
+ name: `${string}Entity`;
108
+ }
109
+ export const Entity = generated.Entity;
110
+ export type OrderFlowTransferTypes = Omit<generated.OrderFlowTransferTypes, 'Entity'> & { Entity: Entity };
207
111
  ```
208
112
 
209
- The scaffold wires only the framework defaults. The seams a real language customizes are walked
210
- beside those defaults in
211
- [`docs/concepts/framework-vs-adopter.md`](../../docs/concepts/framework-vs-adopter.md).
113
+ Commands that spawn a child give it a heap ceiling; set
114
+ `HYDRANIUM_CLI_MAX_OLD_SPACE_MB` to state your own in MiB.
212
115
 
213
116
  ## Entry points
214
117
 
215
- This package declares a two-key `exports` map — the root barrel and the CLI
216
- binary — plus a `main` and a `bin`. The binary key is spelled `./lib/cli.js` and
217
- carries no bare alias: the pairing rule that gives every subpath a `./lib/` twin
218
- runs one way only, and a key already spelled that way resolves under both
219
- resolvers as it stands. A consumer that spawns the binary resolves it by
220
- specifier, and `bin` offers a shim on `PATH` rather than a path.
221
-
222
- | Entry | Kind | Contents |
223
- | ---------------- | ------ | -------------------------------- |
224
- | `hydranium-cli` | `bin` | The binary — all 13 subcommands. |
225
- | `@hydranium/cli` | `main` | Programmatic API (see below). |
118
+ | Subpath | Use it for | Runs in |
119
+ | ---------------- | ---------------------------------------------------------------------------- | ------- |
120
+ | `hydranium-cli` | The binary (`bin`). | Node |
121
+ | `.` | Spawn a data server and get a typed proxy; run the codegen as a function. | Node |
122
+ | `./lib/cli.js` | Resolve the binary's file by specifier, to spawn it from a script or a test. | Node |
226
123
 
227
- The programmatic surface is the part of the CLI worth calling from your own scripts and tests rather
228
- than through argv: `spawnDataServer` / `withDataServer` (spawn a data-server child and get a typed
229
- proxy, with teardown), `generateTransferModel` / `watchTransferModel` (the codegen, as a function),
230
- and the `runProjects` / `runQuery` / `runSave` / `runWatch` command bodies.
124
+ The subpaths need a TypeScript `moduleResolution` that reads `exports`
125
+ (`NodeNext` or `Bundler`); see *Requirements* in
126
+ [Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md).
231
127
 
232
128
  ## Status
233
129
 
234
- Alpha — pre-v0, not yet published. The subcommand surface and the programmatic API are both still
235
- moving. See the [repository README](../../README.md) for the current status and known limitations.
130
+ Alpha: every release is a prerelease that may break the API, so pin an exact
131
+ version. Guides and known limitations:
132
+ [Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md).
236
133
 
237
134
  ## License
238
135
 
239
136
  `MIT` — see this package's [`LICENSE`](./LICENSE), and the repository
240
- [`NOTICE.md`](../../NOTICE.md) for third-party notices.
137
+ [`NOTICE.md`](https://github.com/eclipse-emfcloud/hydranium/blob/main/NOTICE.md)
138
+ for third-party notices.
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+
11
+ // Committed rather than built, so the first install of a fresh clone links it:
12
+ // npm skips a `bin` whose target is missing, and `lib/` exists only after a build.
13
+ import '../lib/cli.js';
@@ -24,10 +24,10 @@ const mb = bytes => bytes / (1024 * 1024);
24
24
  * @param {(msg: string) => void} [log] timestamped progress sink (defaults to stderr)
25
25
  */
26
26
  export async function loadHeap(file, log = progress) {
27
- const t0 = Date.now();
27
+ const t0 = performance.now();
28
28
  log(`Loading ${file} ...`);
29
29
  const heap = await getFullHeapFromFile(file);
30
- const loadSeconds = (Date.now() - t0) / 1000;
30
+ const loadSeconds = (performance.now() - t0) / 1000;
31
31
 
32
32
  let totalShallow = 0;
33
33
  heap.nodes.forEach(node => {
@@ -86,6 +86,16 @@ const LANGIUM_GRAMMAR_TYPES = [
86
86
  'StringLiteral'
87
87
  ];
88
88
 
89
+ // Own fields every description payload has, as a literal or a class instance;
90
+ // the segments are left out because a class may expose them as prototype getters.
91
+ const isDescriptionPayload = props => has(props, 'name', 'type', 'documentUri', 'path');
92
+
93
+ // The payload carries `type` = the described node's element kind. Labelled
94
+ // `AstNodeDescription:base:<kind>` so it nests under the description family: L2
95
+ // `base` aggregates all payloads (alongside the L2 scope-wrapper layers), L3
96
+ // `<kind>` is the per-element-kind split.
97
+ const descriptionPayloadLabel = node => `AstNodeDescription:base:${stringProp(node, 'type') ?? 'unknown'}`;
98
+
89
99
  /** @type {import('./concepts.mjs').ConceptClassifier} */
90
100
  export const langiumClassifier = {
91
101
  classify(node) {
@@ -115,6 +125,16 @@ export const langiumClassifier = {
115
125
  }
116
126
  return `CST:${cstRole}`;
117
127
  }
128
+ // Index manager is an attribution anchor but keeps its real name; Map/MultiMap
129
+ // stay their own names too (referrer edges show which are the scope index).
130
+ if (name.endsWith('IndexManager') || name === 'MultiMap' || name === 'Map') {
131
+ return name;
132
+ }
133
+ // A description built as a class instance carries the base payload's
134
+ // own fields; label it like the literal payload, whatever its class name.
135
+ if (isDescriptionPayload(propertySet(node))) {
136
+ return descriptionPayloadLabel(node);
137
+ }
118
138
  // Any class whose name ends in AstNodeDescription is a description wrapper;
119
139
  // the prefix is the scope layer (Local, Global, ...). Labelled
120
140
  // `AstNodeDescription:<layer>` so it nests under the description family at
@@ -123,11 +143,6 @@ export const langiumClassifier = {
123
143
  const layer = name.slice(0, -'AstNodeDescription'.length) || 'base';
124
144
  return `AstNodeDescription:${layer}`;
125
145
  }
126
- // Index manager is an attribution anchor but keeps its real name; Map/MultiMap
127
- // stay their own names too (referrer edges show which are the scope index).
128
- if (name.endsWith('IndexManager') || name === 'MultiMap' || name === 'Map') {
129
- return name;
130
- }
131
146
  return undefined; // defer (engine → class:<name>, or a later classifier)
132
147
  }
133
148
 
@@ -161,12 +176,8 @@ export const langiumClassifier = {
161
176
  if (has(props, 'value', 'lexerErrors', 'parserErrors')) {
162
177
  return 'ParseResult';
163
178
  }
164
- if (has(props, 'name', 'nameSegment', 'documentUri', 'node', 'selectionSegment')) {
165
- // The base description payload carries `type` = the described node's element
166
- // kind. Labelled `AstNodeDescription:base:<kind>` so it nests under the
167
- // description family: L2 `base` aggregates all payloads (alongside the L2
168
- // scope-wrapper layers above), L3 `<kind>` is the per-element-kind split.
169
- return `AstNodeDescription:base:${stringProp(node, 'type') ?? 'unknown'}`;
179
+ if (isDescriptionPayload(props)) {
180
+ return descriptionPayloadLabel(node);
170
181
  }
171
182
  if (has(props, '$refText', 'ref')) {
172
183
  return 'Reference';
@@ -1 +1 @@
1
- {"version":3,"file":"cli-version.js","sourceRoot":"","sources":["../src/cli-version.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,+FAA+F;AAC/F,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEjE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc;IAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAA0B,CAAC;IAC1F,IAAI,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,EAAE,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,QAAQ,CAAC,OAAO,CAAC;AAC3B,CAAC"}
1
+ {"version":3,"file":"cli-version.js","sourceRoot":"","sources":["../src/cli-version.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,+FAA+F;AAC/F,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,iBAAiB,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAEjE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc;IAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAA0B,CAAC;IAC1F,IAAI,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,EAAE,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,QAAQ,CAAC,OAAO,CAAC;AAC3B,CAAC"}
package/lib/cli.js CHANGED
@@ -8,9 +8,12 @@
8
8
  * SPDX-License-Identifier: MIT
9
9
  ********************************************************************************/
10
10
  import { Command } from 'commander';
11
+ import { describeError } from '@hydranium/protocol';
11
12
  import { readCliVersion } from './cli-version.js';
12
13
  import { runAnalyzeHeapCommand } from './commands/analyze-heap-args.js';
13
14
  import { runAstGroundTruthCommand } from './commands/ast-ground-truth-args.js';
15
+ import { runCreateCommand } from './commands/create-args.js';
16
+ import { runDeleteCommand } from './commands/delete-args.js';
14
17
  import { runGenerateTransferModelCommand } from './commands/generate-transfer-model-args.js';
15
18
  import { runInitCommand } from './commands/init-args.js';
16
19
  import { InitWizardCancelled } from './commands/init-prompt.js';
@@ -42,6 +45,8 @@ const COMMANDS = {
42
45
  summary: "Tally a workspace's live-model $types (analyze-heap --validate input).",
43
46
  run: runAstGroundTruthCommand
44
47
  },
48
+ create: { summary: 'Create a new document and its file via a data-server subprocess.', run: runCreateCommand },
49
+ delete: { summary: 'Delete a document, its file included, via a data-server subprocess.', run: runDeleteCommand },
45
50
  'generate-transfer-model': {
46
51
  summary: 'Generate a transfer-model TypeScript file from a Langium AST.',
47
52
  run: runGenerateTransferModelCommand
@@ -53,7 +58,7 @@ const COMMANDS = {
53
58
  projects: { summary: 'List projects exposed by a data-server subprocess.', run: runProjectsCommand },
54
59
  query: { summary: 'Print the data-server document envelope for a URI.', run: runQueryCommand },
55
60
  reflect: { summary: "Dump a head's grammar/AST reflection (types, terminals, refs).", run: runReflectCommand },
56
- save: { summary: 'Update + persist a document via a data-server subprocess.', run: runSaveCommand },
61
+ save: { summary: 'Update + persist an existing document via a data-server subprocess.', run: runSaveCommand },
57
62
  validate: { summary: 'Validate a workspace headlessly; non-zero exit on errors (CI gate).', run: runValidateCommand },
58
63
  watch: { summary: 'Subscribe to data-server document updates; print events as NDJSON.', run: runWatchCommand }
59
64
  };
@@ -129,7 +134,7 @@ main(process.argv.slice(2)).catch(err => {
129
134
  if (err instanceof InitWizardCancelled) {
130
135
  process.exit(130);
131
136
  }
132
- console.error(err instanceof Error ? err.message : String(err));
137
+ console.error(describeError(err));
133
138
  process.exit(1);
134
139
  });
135
140
  //# sourceMappingURL=cli.js.map
package/lib/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;;;;;;;;;;;GAYG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AE,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAe/F"}
@@ -48,8 +48,7 @@ export const ANALYZE_HEAP_HELP = [
48
48
  'AST node -> $type, GModel -> kind -> subtype), the duplicate-string / cut-point /',
49
49
  'per-document drill-downs, and sample retainer paths. Loading is the only real',
50
50
  'cost, so the drill-downs run by default; tune or disable them with the flags',
51
- 'below. The Markdown reads fine as text, saves as a .md file (--out-file), and',
52
- 'is ideal input for the memory-analysis skill.',
51
+ 'below. The Markdown reads fine as text and saves as a .md file (--out-file).',
53
52
  '',
54
53
  'Reading a snapshot needs the optional @memlab/core + @memlab/heap-analysis peer',
55
54
  'dependencies (`npm install @memlab/core @memlab/heap-analysis`); --diff and',
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-heap-args.js","sourceRoot":"","sources":["../../src/commands/analyze-heap-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,SAAS,EAAE,cAAc,EAAwB,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,CAAU,CAAC;AAE/G;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,CAAC,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,CAAU,CAAC;AAEjI,2BAA2B;AAC3B,MAAM,UAAU,GAAG,CAAC,iBAAiB,EAAE,YAAY,CAAU,CAAC;AAE9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB,CAAC,GAAG,WAAW,EAAE,GAAG,oBAAoB,EAAE,GAAG,UAAU,CAAC,CAAC;AA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AAI,EAAE,wBAAwB,CAAC,EAAE,CAAC;QACjD,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC5B,CAAC;IACD,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC"}
@@ -6,6 +6,7 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
+ import { type HeapReading } from '../driver-heap.js';
9
10
  /**
10
11
  * Selects the JSON-vs-JSON comparison, which reads two analysis artifacts and
11
12
  * needs neither a snapshot nor memlab. Declared here rather than in the args
@@ -18,6 +19,8 @@ export interface AnalyzeHeapDeps {
18
19
  readonly __spawnForTest?: (execArgs: string[]) => Promise<number>;
19
20
  /** Override the memlab-availability check. */
20
21
  readonly __memlabInstalledForTest?: () => boolean;
22
+ /** Decide the heap ceiling from a stated cgroup reading rather than the machine's. */
23
+ readonly __heapReadingForTest?: HeapReading;
21
24
  }
22
25
  /**
23
26
  * Run the heap-snapshot analyzer. Memlab is an OPTIONAL PEER dependency and a
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-heap.d.ts","sourceRoot":"","sources":["../../src/commands/analyze-heap.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAuBlF;;;;GAIG;AACH,eAAO,MAAM,SAAS,WAAW,CAAC;AAElC,mGAAmG;AACnG,MAAM,WAAW,eAAe;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,8CAA8C;IAC9C,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,OAAO,CAAC;CACpD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB9F"}
1
+ {"version":3,"file":"analyze-heap.d.ts","sourceRoot":"","sources":["../../src/commands/analyze-heap.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqBrE;;;;GAIG;AACH,eAAO,MAAM,SAAS,WAAW,CAAC;AAElC,mGAAmG;AACnG,MAAM,WAAW,eAAe;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,8CAA8C;IAC9C,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,OAAO,CAAC;IAClD,sFAAsF;IACtF,QAAQ,CAAC,oBAAoB,CAAC,EAAE,WAAW,CAAC;CAC9C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB9F"}
@@ -7,6 +7,7 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  import { fileURLToPath } from 'node:url';
10
+ import { driverHeapArgs } from '../driver-heap.js';
10
11
  import { spawnNodeChild } from './headless-harness.js';
11
12
  /**
12
13
  * Absolute path to the bundled memlab-based analyzer (a standalone ESM script
@@ -55,7 +56,7 @@ export async function runAnalyzeHeap(args, deps = {}) {
55
56
  return;
56
57
  }
57
58
  const spawnChild = deps.__spawnForTest ?? spawnNodeChild;
58
- const code = await spawnChild(['--max-old-space-size=8192', ANALYZER, ...args]);
59
+ const code = await spawnChild([...driverHeapArgs(deps.__heapReadingForTest), ANALYZER, ...args]);
59
60
  if (code) {
60
61
  process.exitCode = code;
61
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-heap.js","sourceRoot":"","sources":["../../src/commands/analyze-heap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