@hydranium/cli 1.0.0-next.42 → 1.0.0-next.421
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.
- package/README.md +125 -204
- package/bin/hydranium-cli.js +13 -0
- package/heap-analysis/heap/core/load.mjs +2 -2
- package/heap-analysis/heap/langium/langium.classifier.mjs +22 -11
- package/lib/cli-version.js.map +1 -1
- package/lib/cli.js +11 -2
- package/lib/cli.js.map +1 -1
- package/lib/commands/analyze-heap-args.d.ts.map +1 -1
- package/lib/commands/analyze-heap-args.js +1 -2
- package/lib/commands/analyze-heap-args.js.map +1 -1
- package/lib/commands/analyze-heap.d.ts +3 -0
- package/lib/commands/analyze-heap.d.ts.map +1 -1
- package/lib/commands/analyze-heap.js +2 -1
- package/lib/commands/analyze-heap.js.map +1 -1
- package/lib/commands/ast-ground-truth-args.d.ts +3 -2
- package/lib/commands/ast-ground-truth-args.d.ts.map +1 -1
- package/lib/commands/ast-ground-truth-args.js +12 -10
- package/lib/commands/ast-ground-truth-args.js.map +1 -1
- package/lib/commands/ast-ground-truth-driver.js +4 -2
- package/lib/commands/ast-ground-truth-driver.js.map +1 -1
- package/lib/commands/ast-ground-truth.js +1 -1
- package/lib/commands/ast-ground-truth.js.map +1 -1
- package/lib/commands/check-skills-args.d.ts +11 -0
- package/lib/commands/check-skills-args.d.ts.map +1 -0
- package/lib/commands/check-skills-args.js +71 -0
- package/lib/commands/check-skills-args.js.map +1 -0
- package/lib/commands/client-session.d.ts +17 -0
- package/lib/commands/client-session.d.ts.map +1 -0
- package/lib/commands/client-session.js +27 -0
- package/lib/commands/client-session.js.map +1 -0
- package/lib/commands/create-args.d.ts +17 -0
- package/lib/commands/create-args.d.ts.map +1 -0
- package/lib/commands/create-args.js +53 -0
- package/lib/commands/create-args.js.map +1 -0
- package/lib/commands/create.d.ts +38 -0
- package/lib/commands/create.d.ts.map +1 -0
- package/lib/commands/create.js +43 -0
- package/lib/commands/create.js.map +1 -0
- package/lib/commands/delete-args.d.ts +17 -0
- package/lib/commands/delete-args.d.ts.map +1 -0
- package/lib/commands/delete-args.js +49 -0
- package/lib/commands/delete-args.js.map +1 -0
- package/lib/commands/delete.d.ts +30 -0
- package/lib/commands/delete.d.ts.map +1 -0
- package/lib/commands/delete.js +32 -0
- package/lib/commands/delete.js.map +1 -0
- package/lib/commands/generate-ast-builder.d.ts +1 -1
- package/lib/commands/generate-ast-builder.d.ts.map +1 -1
- package/lib/commands/generate-ast-builder.js +2 -11
- package/lib/commands/generate-ast-builder.js.map +1 -1
- package/lib/commands/generate-languages.d.ts +35 -0
- package/lib/commands/generate-languages.d.ts.map +1 -0
- package/lib/commands/generate-languages.js +105 -0
- package/lib/commands/generate-languages.js.map +1 -0
- package/lib/commands/generate-transfer-builder.d.ts +33 -0
- package/lib/commands/generate-transfer-builder.d.ts.map +1 -0
- package/lib/commands/generate-transfer-builder.js +86 -0
- package/lib/commands/generate-transfer-builder.js.map +1 -0
- package/lib/commands/generate-transfer-model-args.d.ts.map +1 -1
- package/lib/commands/generate-transfer-model-args.js +20 -5
- package/lib/commands/generate-transfer-model-args.js.map +1 -1
- package/lib/commands/generate-transfer-model-config.d.ts.map +1 -1
- package/lib/commands/generate-transfer-model-config.js +8 -3
- package/lib/commands/generate-transfer-model-config.js.map +1 -1
- package/lib/commands/generate-transfer-model.d.ts +41 -9
- package/lib/commands/generate-transfer-model.d.ts.map +1 -1
- package/lib/commands/generate-transfer-model.js +225 -68
- package/lib/commands/generate-transfer-model.js.map +1 -1
- package/lib/commands/generated-module-path.d.ts +16 -0
- package/lib/commands/generated-module-path.d.ts.map +1 -0
- package/lib/commands/generated-module-path.js +21 -0
- package/lib/commands/generated-module-path.js.map +1 -0
- package/lib/commands/harness-args.d.ts +46 -43
- package/lib/commands/harness-args.d.ts.map +1 -1
- package/lib/commands/harness-args.js +170 -29
- package/lib/commands/harness-args.js.map +1 -1
- package/lib/commands/headless-harness.d.ts +37 -20
- package/lib/commands/headless-harness.d.ts.map +1 -1
- package/lib/commands/headless-harness.js +71 -19
- package/lib/commands/headless-harness.js.map +1 -1
- package/lib/commands/init-args.d.ts +5 -18
- package/lib/commands/init-args.d.ts.map +1 -1
- package/lib/commands/init-args.js +131 -35
- package/lib/commands/init-args.js.map +1 -1
- package/lib/commands/init-hosts.d.ts +24 -0
- package/lib/commands/init-hosts.d.ts.map +1 -0
- package/lib/commands/init-hosts.js +37 -0
- package/lib/commands/init-hosts.js.map +1 -0
- package/lib/commands/init-prompt.d.ts +3 -3
- package/lib/commands/init-prompt.d.ts.map +1 -1
- package/lib/commands/init-prompt.js +4 -5
- package/lib/commands/init-prompt.js.map +1 -1
- package/lib/commands/init-skills.d.ts +41 -0
- package/lib/commands/init-skills.d.ts.map +1 -0
- package/lib/commands/init-skills.js +110 -0
- package/lib/commands/init-skills.js.map +1 -0
- package/lib/commands/init-templates.d.ts +20 -14
- package/lib/commands/init-templates.d.ts.map +1 -1
- package/lib/commands/init-templates.js +3134 -763
- package/lib/commands/init-templates.js.map +1 -1
- package/lib/commands/init-wizard.d.ts +10 -0
- package/lib/commands/init-wizard.d.ts.map +1 -1
- package/lib/commands/init-wizard.js +76 -31
- package/lib/commands/init-wizard.js.map +1 -1
- package/lib/commands/init-workspace.d.ts +13 -11
- package/lib/commands/init-workspace.d.ts.map +1 -1
- package/lib/commands/init-workspace.js +21 -7
- package/lib/commands/init-workspace.js.map +1 -1
- package/lib/commands/init.d.ts +61 -24
- package/lib/commands/init.d.ts.map +1 -1
- package/lib/commands/init.js +244 -50
- package/lib/commands/init.js.map +1 -1
- package/lib/commands/kebab.d.ts +15 -0
- package/lib/commands/kebab.d.ts.map +1 -0
- package/lib/commands/kebab.js +17 -0
- package/lib/commands/kebab.js.map +1 -0
- package/lib/commands/lint-grammar-args.d.ts +3 -2
- package/lib/commands/lint-grammar-args.d.ts.map +1 -1
- package/lib/commands/lint-grammar-args.js +14 -11
- package/lib/commands/lint-grammar-args.js.map +1 -1
- package/lib/commands/lint-grammar-driver.js +2 -1
- package/lib/commands/lint-grammar-driver.js.map +1 -1
- package/lib/commands/lint-grammar-report.js.map +1 -1
- package/lib/commands/lint-grammar.js +1 -1
- package/lib/commands/lint-grammar.js.map +1 -1
- package/lib/commands/measure-memory-args.d.ts +3 -2
- package/lib/commands/measure-memory-args.d.ts.map +1 -1
- package/lib/commands/measure-memory-args.js +26 -14
- package/lib/commands/measure-memory-args.js.map +1 -1
- package/lib/commands/measure-memory-driver.js +5 -3
- package/lib/commands/measure-memory-driver.js.map +1 -1
- package/lib/commands/measure-memory.d.ts +1 -1
- package/lib/commands/measure-memory.d.ts.map +1 -1
- package/lib/commands/measure-memory.js +6 -3
- package/lib/commands/measure-memory.js.map +1 -1
- package/lib/commands/message-catalogue-args.d.ts +16 -0
- package/lib/commands/message-catalogue-args.d.ts.map +1 -0
- package/lib/commands/message-catalogue-args.js +53 -0
- package/lib/commands/message-catalogue-args.js.map +1 -0
- package/lib/commands/message-catalogue.d.ts +21 -0
- package/lib/commands/message-catalogue.d.ts.map +1 -0
- package/lib/commands/message-catalogue.js +48 -0
- package/lib/commands/message-catalogue.js.map +1 -0
- package/lib/commands/model-docs-args.d.ts +4 -3
- package/lib/commands/model-docs-args.d.ts.map +1 -1
- package/lib/commands/model-docs-args.js +13 -11
- package/lib/commands/model-docs-args.js.map +1 -1
- package/lib/commands/model-docs-driver.js +2 -1
- package/lib/commands/model-docs-driver.js.map +1 -1
- package/lib/commands/model-docs.js +1 -1
- package/lib/commands/model-docs.js.map +1 -1
- package/lib/commands/projects-args.d.ts.map +1 -1
- package/lib/commands/projects-args.js +5 -5
- package/lib/commands/projects-args.js.map +1 -1
- package/lib/commands/projects.d.ts +3 -4
- package/lib/commands/projects.d.ts.map +1 -1
- package/lib/commands/projects.js +2 -2
- package/lib/commands/projects.js.map +1 -1
- package/lib/commands/query-args.d.ts.map +1 -1
- package/lib/commands/query-args.js +6 -5
- package/lib/commands/query-args.js.map +1 -1
- package/lib/commands/query.d.ts +6 -5
- package/lib/commands/query.d.ts.map +1 -1
- package/lib/commands/query.js +5 -4
- package/lib/commands/query.js.map +1 -1
- package/lib/commands/reflect-args.d.ts +3 -2
- package/lib/commands/reflect-args.d.ts.map +1 -1
- package/lib/commands/reflect-args.js +14 -11
- package/lib/commands/reflect-args.js.map +1 -1
- package/lib/commands/reflect-driver.js +2 -1
- package/lib/commands/reflect-driver.js.map +1 -1
- package/lib/commands/reflect-report.js.map +1 -1
- package/lib/commands/reflect.js +1 -1
- package/lib/commands/reflect.js.map +1 -1
- package/lib/commands/save-args.d.ts.map +1 -1
- package/lib/commands/save-args.js +7 -4
- package/lib/commands/save-args.js.map +1 -1
- package/lib/commands/save.d.ts +8 -4
- package/lib/commands/save.d.ts.map +1 -1
- package/lib/commands/save.js +12 -23
- package/lib/commands/save.js.map +1 -1
- package/lib/commands/skills.d.ts +22 -0
- package/lib/commands/skills.d.ts.map +1 -0
- package/lib/commands/skills.js +129 -0
- package/lib/commands/skills.js.map +1 -0
- package/lib/commands/validate-args.d.ts +3 -2
- package/lib/commands/validate-args.d.ts.map +1 -1
- package/lib/commands/validate-args.js +14 -11
- package/lib/commands/validate-args.js.map +1 -1
- package/lib/commands/validate-driver.js +2 -1
- package/lib/commands/validate-driver.js.map +1 -1
- package/lib/commands/validate-report.js.map +1 -1
- package/lib/commands/validate.js +1 -1
- package/lib/commands/validate.js.map +1 -1
- package/lib/commands/watch-args.d.ts.map +1 -1
- package/lib/commands/watch-args.js +6 -4
- package/lib/commands/watch-args.js.map +1 -1
- package/lib/commands/watch.d.ts +3 -4
- package/lib/commands/watch.d.ts.map +1 -1
- package/lib/commands/watch.js +5 -2
- package/lib/commands/watch.js.map +1 -1
- package/lib/driver-heap.d.ts +52 -0
- package/lib/driver-heap.d.ts.map +1 -0
- package/lib/driver-heap.js +51 -0
- package/lib/driver-heap.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/log-level.d.ts +21 -11
- package/lib/log-level.d.ts.map +1 -1
- package/lib/log-level.js +25 -14
- package/lib/log-level.js.map +1 -1
- package/lib/spawn-data-server.d.ts +9 -4
- package/lib/spawn-data-server.d.ts.map +1 -1
- package/lib/spawn-data-server.js +5 -4
- package/lib/spawn-data-server.js.map +1 -1
- package/lib/stderr-connection-logger.d.ts +12 -0
- package/lib/stderr-connection-logger.d.ts.map +1 -0
- package/lib/stderr-connection-logger.js +16 -0
- package/lib/stderr-connection-logger.js.map +1 -0
- package/lib/testing/echo-server.js +9 -1
- package/lib/testing/echo-server.js.map +1 -1
- package/package.json +99 -41
- package/src/cli.ts +11 -2
- package/src/commands/analyze-heap-args.ts +1 -2
- package/src/commands/analyze-heap.ts +4 -1
- package/src/commands/ast-ground-truth-args.ts +16 -13
- package/src/commands/ast-ground-truth-driver.ts +4 -2
- package/src/commands/ast-ground-truth.ts +1 -1
- package/src/commands/check-skills-args.ts +70 -0
- package/src/commands/client-session.ts +33 -0
- package/src/commands/create-args.ts +68 -0
- package/src/commands/create.ts +83 -0
- package/src/commands/delete-args.ts +64 -0
- package/src/commands/delete.ts +61 -0
- package/src/commands/generate-ast-builder.ts +2 -12
- package/src/commands/generate-languages.ts +132 -0
- package/src/commands/generate-transfer-builder.ts +101 -0
- package/src/commands/generate-transfer-model-args.ts +20 -5
- package/src/commands/generate-transfer-model-config.ts +8 -3
- package/src/commands/generate-transfer-model.ts +297 -66
- package/src/commands/generated-module-path.ts +22 -0
- package/src/commands/harness-args.ts +163 -33
- package/src/commands/headless-harness.ts +89 -28
- package/src/commands/init-args.ts +135 -35
- package/src/commands/init-hosts.ts +51 -0
- package/src/commands/init-prompt.ts +5 -6
- package/src/commands/init-skills.ts +129 -0
- package/src/commands/init-templates.ts +3326 -785
- package/src/commands/init-wizard.ts +97 -32
- package/src/commands/init-workspace.ts +31 -16
- package/src/commands/init.ts +311 -65
- package/src/commands/kebab.ts +17 -0
- package/src/commands/lint-grammar-args.ts +18 -14
- package/src/commands/lint-grammar-driver.ts +2 -1
- package/src/commands/lint-grammar.ts +1 -1
- package/src/commands/measure-memory-args.ts +31 -17
- package/src/commands/measure-memory-driver.ts +5 -3
- package/src/commands/measure-memory.ts +6 -3
- package/src/commands/message-catalogue-args.ts +55 -0
- package/src/commands/message-catalogue.ts +56 -0
- package/src/commands/model-docs-args.ts +17 -14
- package/src/commands/model-docs-driver.ts +2 -1
- package/src/commands/model-docs.ts +1 -1
- package/src/commands/projects-args.ts +5 -4
- package/src/commands/projects.ts +4 -6
- package/src/commands/query-args.ts +6 -4
- package/src/commands/query.ts +9 -9
- package/src/commands/reflect-args.ts +18 -14
- package/src/commands/reflect-driver.ts +2 -1
- package/src/commands/reflect.ts +1 -1
- package/src/commands/save-args.ts +7 -3
- package/src/commands/save.ts +24 -27
- package/src/commands/skills.ts +146 -0
- package/src/commands/validate-args.ts +18 -14
- package/src/commands/validate-driver.ts +2 -1
- package/src/commands/validate.ts +1 -1
- package/src/commands/watch-args.ts +6 -3
- package/src/commands/watch.ts +7 -6
- package/src/driver-heap.ts +65 -0
- package/src/index.ts +3 -0
- package/src/log-level.ts +42 -14
- package/src/spawn-data-server.ts +17 -5
- package/src/stderr-connection-logger.ts +18 -0
- package/src/testing/echo-server.ts +11 -2
- package/templates/client/gitignore +3 -0
- package/templates/client/src/__GRAMMAR_ID__-diagram-module.ts +82 -0
- package/templates/editorconfig +15 -0
- package/templates/gitignore +1 -0
- package/templates/host-browser/esbuild.mjs +82 -0
- package/templates/host-browser/gitignore +4 -0
- package/templates/host-browser/hydranium-mark.svg +40 -0
- package/templates/host-browser/index.html +287 -0
- package/templates/host-browser/playwright.config.mts +24 -0
- package/templates/host-browser/src/data-status.ts +15 -0
- package/templates/host-browser/src/diagram-save.ts +60 -0
- package/templates/host-browser/src/diagram.ts +121 -0
- package/templates/host-browser/src/editor.ts +116 -0
- package/templates/host-browser/src/log.ts +14 -0
- package/templates/host-browser/src/monaco-editor-core-worker.d.ts +7 -0
- package/templates/host-browser/src/monaco-editor-worker.ts +10 -0
- package/templates/host-browser/src/posix-path-shim.ts +23 -0
- package/templates/host-browser/src/shown-file.ts +61 -0
- package/templates/host-browser/src/workspace.ts +5 -0
- package/templates/host-browser/tsconfig.e2e.json +16 -0
- package/templates/host-browser/tsconfig.page.json +16 -0
- package/templates/host-browser/tsconfig.worker.json +16 -0
- package/templates/host-theia-browser/esbuild.mjs +24 -0
- package/templates/host-theia-browser/gitignore +9 -0
- package/templates/host-theia-browser/playwright.config.mts +42 -0
- package/templates/host-theia-browser/start.mjs +50 -0
- package/templates/host-theia-browser/tsconfig.e2e.json +16 -0
- package/templates/host-theia-electron/esbuild.mjs +27 -0
- package/templates/host-theia-electron/gitignore +8 -0
- package/templates/host-theia-electron/playwright.config.mts +12 -0
- package/templates/host-theia-electron/start.mjs +47 -0
- package/templates/host-theia-electron/tsconfig.e2e.json +16 -0
- package/templates/host-vscode/esbuild.mjs +38 -0
- package/templates/host-vscode/gitignore +7 -0
- package/templates/host-vscode/playwright.config.mts +14 -0
- package/templates/host-vscode/src/__GRAMMAR_ID__-diagram-editor.ts +19 -0
- package/templates/host-vscode/src/show-model-command.ts +24 -0
- package/templates/host-vscode/src/webview/__GRAMMAR_ID__-diagram.ts +18 -0
- package/templates/host-vscode/src/webview/diagram.css +40 -0
- package/templates/host-vscode/start.mjs +22 -0
- package/templates/host-vscode/test/content-server.cjs +40 -0
- package/templates/host-vscode/test/install-vscode.mts +21 -0
- package/templates/host-vscode/test/virtual-documents.spec.mts +28 -0
- package/templates/host-vscode/test/vscode-version.mts +10 -0
- package/templates/host-vscode/tsconfig.e2e.json +17 -0
- package/templates/host-vscode/tsconfig.json +19 -0
- package/templates/host-vscode/tsconfig.webview.json +17 -0
- package/templates/oxlintrc.json +4 -0
- package/templates/protocol/gitignore +3 -0
- package/templates/protocol/src/__GRAMMAR_ID__-diagram-types.ts +47 -0
- package/templates/server/gitignore +6 -0
- package/templates/server/src/glsp/__GRAMMAR_ID__/create-node-operation-handler.ts +62 -0
- package/templates/server/src/glsp/__GRAMMAR_ID__/delete-operation-handler.ts +63 -0
- package/templates/server/src/glsp/__GRAMMAR_ID__/gmodel-factory.ts +144 -0
- package/templates/server/src/glsp/__GRAMMAR_ID__/state.ts +18 -0
- package/templates/server/src/glsp/__GRAMMAR_ID__/storage.ts +16 -0
- package/templates/server/src/glsp/__GRAMMAR_ID__/submission-handler.ts +24 -0
- package/templates/server/src/grammar/common.langium +12 -0
- package/templates/server/src/language-server/__GRAMMAR_ID__-semantic-tokens.ts +10 -0
- package/templates/server/src/language-server/__GRAMMAR_ID__-serializer.ts +53 -0
- package/templates/server/src/language-server/__GRAMMAR_ID__-validation.ts +30 -0
- package/templates/server/src/language-server/ast.ts +23 -0
- package/templates/server/src/node/services.ts +16 -0
- package/templates/server/test/__GRAMMAR_ID__-diagram.test.ts +403 -0
- package/templates/server/test/__GRAMMAR_ID__-semantic-tokens.test.ts +34 -0
- package/templates/server/test/tsconfig.json +4 -0
- package/templates/server/tsconfig.test.json +10 -0
- package/templates/server/vitest.config.ts +14 -0
- package/templates/theia/gitignore +3 -0
- package/templates/theia/src/browser/__GRAMMAR_ID__-diagram-frontend-module.ts +65 -0
- package/templates/theia/src/browser/__PROJECT_ID__-connection-preload-module.ts +15 -0
- package/templates/theia/src/browser/__PROJECT_ID__-data-connection.ts +15 -0
- package/templates/theia/src/browser/__PROJECT_ID__-data-port.ts +11 -0
- package/templates/theia/src/browser/__PROJECT_ID__-glsp-client-contribution.ts +13 -0
- package/templates/theia/src/browser/__PROJECT_ID__-show-model-command.ts +51 -0
- package/templates/theia/src/common/__PROJECT_ID__-glsp-contribution.ts +3 -0
- package/templates/theia/src/node/__PROJECT_ID__-connection-backend-module.ts +12 -0
- package/templates/theia/src/node/__PROJECT_ID__-data-backend-module.ts +15 -0
- package/templates/theia/src/node/__PROJECT_ID__-glsp-backend-module.ts +16 -0
- package/templates/theia/style/diagram.css +20 -0
- package/templates/theia/tsconfig.json +24 -0
- package/templates/vscode-servers/gitignore +4 -0
- package/templates/vscode-servers/tsconfig.json +19 -0
- package/templates/workspace/nodes.__EXTENSION__ +5 -0
- package/templates/workspace/references.__EXTENSION__ +2 -0
package/README.md
CHANGED
|
@@ -1,240 +1,161 @@
|
|
|
1
1
|
# `@hydranium/cli`
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
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
|
+
- Install optional coding-agent skills after scaffolding and check their
|
|
19
|
+
declared compatibility with your project's installed dependencies.
|
|
20
|
+
- List, read, create, save and watch documents through a spawned data server,
|
|
21
|
+
printing JSON a script can pipe, and delete them.
|
|
27
22
|
|
|
28
23
|
## Install
|
|
29
24
|
|
|
30
|
-
|
|
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:
|
|
25
|
+
`init` needs no install:
|
|
37
26
|
|
|
38
27
|
```bash
|
|
39
28
|
npx @hydranium/cli init ./my-lang --name MyLang
|
|
40
29
|
```
|
|
41
30
|
|
|
42
|
-
For the
|
|
31
|
+
For the commands you run repeatedly, add it to the project it inspects, or
|
|
32
|
+
install it globally:
|
|
43
33
|
|
|
44
34
|
```bash
|
|
45
35
|
npm install --save-dev @hydranium/cli
|
|
46
36
|
npm install --global @hydranium/cli
|
|
47
37
|
```
|
|
48
38
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
`
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
`--
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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`.
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
hydranium-cli projects --server "node ./lib/data-server-main.js ./models"
|
|
39
|
+
| Peer | Range |
|
|
40
|
+
| ------------------------ | ------------- |
|
|
41
|
+
| `@hydranium/core` | `^1.0.0-next` |
|
|
42
|
+
| `@hydranium/data-server` | `^1.0.0-next` |
|
|
43
|
+
| `@hydranium/langium` | `^1.0.0-next` |
|
|
44
|
+
| `@hydranium/protocol` | `^1.0.0-next` |
|
|
45
|
+
| `@memlab/core` | `^2.0.3` |
|
|
46
|
+
| `@memlab/heap-analysis` | `^2.0.3` |
|
|
47
|
+
| `vscode-jsonrpc` | `^9.0.3` |
|
|
48
|
+
|
|
49
|
+
The two memlab packages are optional peers that only `analyze-heap` loads:
|
|
50
|
+
install them with `npm install @memlab/core @memlab/heap-analysis` before its
|
|
51
|
+
first run.
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
54
|
+
|
|
55
|
+
`hydranium-cli --help` lists the commands, and `hydranium-cli <command> --help`
|
|
56
|
+
lists each command's flags.
|
|
57
|
+
|
|
58
|
+
- **Scaffolding.** `init` writes a project you can build right away: a server
|
|
59
|
+
package, a protocol package its clients share, a client package with a
|
|
60
|
+
diagram, a browser page around the heads with `--hosts browser`, VS Code
|
|
61
|
+
extensions with `--hosts vscode`, a Theia extension with a browser
|
|
62
|
+
application with `--hosts theia-browser` or an Electron one with
|
|
63
|
+
`--hosts theia-electron`, and a starter workspace.
|
|
64
|
+
- **Grammar and workspace.** Boot your built head to reflect its grammar, lint
|
|
65
|
+
it, write a model reference, validate a workspace, or count its AST nodes.
|
|
66
|
+
- **Agent skills.** The wizard offers Hydranium and upstream Langium skills
|
|
67
|
+
after scaffolding. `check-skills` checks installed skill metadata against
|
|
68
|
+
your dependencies; see *Work with coding-agent skills* in the adopter guides.
|
|
69
|
+
- **Codegen.** `generate-transfer-model` turns the AST into a transfer model,
|
|
70
|
+
once or on watch, and can also write each grammar's language id and
|
|
71
|
+
extensions for a package your clients share without Langium, and a
|
|
72
|
+
`transferNode` builder for your tests.
|
|
73
|
+
- **Translations.** `message-catalogue` writes an English starter catalogue
|
|
74
|
+
from the message barrels of your installed heads and your language.
|
|
75
|
+
- **Memory.** Measure a workspace's model-store memory, and analyze a heap
|
|
76
|
+
snapshot.
|
|
77
|
+
- **Data server.** Spawn your data head and list projects, or query, create,
|
|
78
|
+
save, delete or watch a document.
|
|
79
|
+
|
|
80
|
+
Commands that boot your language need an ESM module exporting a zero-arg
|
|
81
|
+
`createServices()` that returns `{ shared }`. Declare its file path once in
|
|
82
|
+
`package.json`:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"hydranium": {
|
|
87
|
+
"services": "./server/lib/node/services.js"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
126
90
|
```
|
|
127
91
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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.
|
|
92
|
+
The CLI reads the nearest `package.json` from your current directory upwards
|
|
93
|
+
and resolves this path relative to that manifest. It stops at that package,
|
|
94
|
+
even if it has no setting. A standalone scaffold configures its root and server
|
|
95
|
+
package, so `npx hydranium-cli reflect` works from either after building. For a
|
|
96
|
+
scaffold added to an existing workspace, run from its server package or pass
|
|
97
|
+
`--services` from the workspace root.
|
|
98
|
+
|
|
99
|
+
`--services <module>` overrides the setting and resolves relative to your
|
|
100
|
+
current directory. To run TypeScript source, register a loader with `--import`:
|
|
101
|
+
`npx hydranium-cli reflect --import tsx --services ./server/src/node/services.ts`.
|
|
102
|
+
|
|
103
|
+
The data-server commands take `--server "<cmd> [args...]"`. Point it at the
|
|
104
|
+
data head's stdio entry, `server/lib/data-server-main.js` in a scaffolded
|
|
105
|
+
project, not at the editor entry `server/lib/main.js`, whose stdio carries LSP.
|
|
106
|
+
Pass the workspace as the entry's argument rather than through `--cwd`:
|
|
182
107
|
|
|
183
108
|
```bash
|
|
184
|
-
|
|
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
|
|
109
|
+
hydranium-cli projects --server "node ./server/lib/data-server-main.js ./workspace"
|
|
207
110
|
```
|
|
208
111
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
112
|
+
`create`, `save` and `delete` spawn a data server of their own, and a
|
|
113
|
+
workspace has one writer. Writing in a workspace an editor has open makes two
|
|
114
|
+
writers, and one write is lost: an editor that holds a deleted file can save it
|
|
115
|
+
back.
|
|
116
|
+
|
|
117
|
+
`generate-transfer-model` emits a constant under each type's name, as Langium
|
|
118
|
+
does for the AST. If the module that re-exports the generated model narrows an
|
|
119
|
+
interface, its declaration hides the generated constant of the same name, so
|
|
120
|
+
re-export that constant beside it. The generated `<LanguageId>TransferTypes`
|
|
121
|
+
map still names the generated interface, so declare the map under its own
|
|
122
|
+
name too, and `transferNode` builds the narrowed type. That reaches only the
|
|
123
|
+
type's own entry: a property or a union that holds the type, here a
|
|
124
|
+
`Declaration`, still names the generated interface.
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import * as generated from './generated-hydranium/transfer-model.js';
|
|
128
|
+
export * from './generated-hydranium/transfer-model.js';
|
|
129
|
+
export interface Entity extends generated.Entity {
|
|
130
|
+
name: `${string}Entity`;
|
|
131
|
+
}
|
|
132
|
+
export const Entity = generated.Entity;
|
|
133
|
+
export type OrderFlowTransferTypes = Omit<generated.OrderFlowTransferTypes, 'Entity'> & { Entity: Entity };
|
|
134
|
+
```
|
|
212
135
|
|
|
213
|
-
|
|
136
|
+
Commands that spawn a child give it a heap ceiling; set
|
|
137
|
+
`HYDRANIUM_CLI_MAX_OLD_SPACE_MB` to state your own in MiB.
|
|
214
138
|
|
|
215
|
-
|
|
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.
|
|
139
|
+
## Entry points
|
|
221
140
|
|
|
222
|
-
|
|
|
223
|
-
| ---------------- |
|
|
224
|
-
| `hydranium-cli` |
|
|
225
|
-
|
|
|
141
|
+
| Subpath | Use it for | Runs in |
|
|
142
|
+
| ---------------- | ---------------------------------------------------------------------------- | ------- |
|
|
143
|
+
| `hydranium-cli` | The binary (`bin`). | Node |
|
|
144
|
+
| `.` | Spawn a data server and get a typed proxy; run the codegen as a function. | Node |
|
|
145
|
+
| `./lib/cli.js` | Resolve the binary's file by specifier, to spawn it from a script or a test. | Node |
|
|
226
146
|
|
|
227
|
-
The
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
and the `runProjects` / `runQuery` / `runSave` / `runWatch` command bodies.
|
|
147
|
+
The subpaths need a TypeScript `moduleResolution` that reads `exports`
|
|
148
|
+
(`NodeNext` or `Bundler`); see *Requirements* in
|
|
149
|
+
[Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md).
|
|
231
150
|
|
|
232
151
|
## Status
|
|
233
152
|
|
|
234
|
-
Alpha
|
|
235
|
-
|
|
153
|
+
Alpha: every release is a prerelease that may break the API, so pin an exact
|
|
154
|
+
version. Guides and known limitations:
|
|
155
|
+
[Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md).
|
|
236
156
|
|
|
237
157
|
## License
|
|
238
158
|
|
|
239
159
|
`MIT` — see this package's [`LICENSE`](./LICENSE), and the repository
|
|
240
|
-
[`NOTICE.md`](
|
|
160
|
+
[`NOTICE.md`](https://github.com/eclipse-emfcloud/hydranium/blob/main/NOTICE.md)
|
|
161
|
+
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 =
|
|
27
|
+
const t0 = performance.now();
|
|
28
28
|
log(`Loading ${file} ...`);
|
|
29
29
|
const heap = await getFullHeapFromFile(file);
|
|
30
|
-
const loadSeconds = (
|
|
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 (
|
|
165
|
-
|
|
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';
|
package/lib/cli-version.js.map
CHANGED
|
@@ -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,
|
|
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,14 +8,19 @@
|
|
|
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 { runCheckSkillsCommand } from './commands/check-skills-args.js';
|
|
17
|
+
import { runDeleteCommand } from './commands/delete-args.js';
|
|
14
18
|
import { runGenerateTransferModelCommand } from './commands/generate-transfer-model-args.js';
|
|
15
19
|
import { runInitCommand } from './commands/init-args.js';
|
|
16
20
|
import { InitWizardCancelled } from './commands/init-prompt.js';
|
|
17
21
|
import { runLintGrammarCommand } from './commands/lint-grammar-args.js';
|
|
18
22
|
import { runMeasureMemoryCommand } from './commands/measure-memory-args.js';
|
|
23
|
+
import { runMessageCatalogueCommand } from './commands/message-catalogue-args.js';
|
|
19
24
|
import { runModelDocsCommand } from './commands/model-docs-args.js';
|
|
20
25
|
import { runProjectsCommand } from './commands/projects-args.js';
|
|
21
26
|
import { runQueryCommand } from './commands/query-args.js';
|
|
@@ -42,6 +47,9 @@ const COMMANDS = {
|
|
|
42
47
|
summary: "Tally a workspace's live-model $types (analyze-heap --validate input).",
|
|
43
48
|
run: runAstGroundTruthCommand
|
|
44
49
|
},
|
|
50
|
+
create: { summary: 'Create a new document and its file via a data-server subprocess.', run: runCreateCommand },
|
|
51
|
+
'check-skills': { summary: 'Check installed agent skills against project dependency versions.', run: runCheckSkillsCommand },
|
|
52
|
+
delete: { summary: 'Delete a document, its file included, via a data-server subprocess.', run: runDeleteCommand },
|
|
45
53
|
'generate-transfer-model': {
|
|
46
54
|
summary: 'Generate a transfer-model TypeScript file from a Langium AST.',
|
|
47
55
|
run: runGenerateTransferModelCommand
|
|
@@ -49,11 +57,12 @@ const COMMANDS = {
|
|
|
49
57
|
init: { summary: 'Scaffold a new Hydranium language project (grammar + server head).', run: runInitCommand },
|
|
50
58
|
'lint-grammar': { summary: 'Check a grammar against framework conventions (CI gate).', run: runLintGrammarCommand },
|
|
51
59
|
'measure-memory': { summary: 'Measure model-store memory for a workspace (needs @hydranium/core).', run: runMeasureMemoryCommand },
|
|
60
|
+
'message-catalogue': { summary: 'Emit a starter translation catalogue from message barrels.', run: runMessageCatalogueCommand },
|
|
52
61
|
'model-docs': { summary: 'Generate a navigable Markdown model reference for adopter docs.', run: runModelDocsCommand },
|
|
53
62
|
projects: { summary: 'List projects exposed by a data-server subprocess.', run: runProjectsCommand },
|
|
54
63
|
query: { summary: 'Print the data-server document envelope for a URI.', run: runQueryCommand },
|
|
55
64
|
reflect: { summary: "Dump a head's grammar/AST reflection (types, terminals, refs).", run: runReflectCommand },
|
|
56
|
-
save: { summary: 'Update + persist
|
|
65
|
+
save: { summary: 'Update + persist an existing document via a data-server subprocess.', run: runSaveCommand },
|
|
57
66
|
validate: { summary: 'Validate a workspace headlessly; non-zero exit on errors (CI gate).', run: runValidateCommand },
|
|
58
67
|
watch: { summary: 'Subscribe to data-server document updates; print events as NDJSON.', run: runWatchCommand }
|
|
59
68
|
};
|
|
@@ -129,7 +138,7 @@ main(process.argv.slice(2)).catch(err => {
|
|
|
129
138
|
if (err instanceof InitWizardCancelled) {
|
|
130
139
|
process.exit(130);
|
|
131
140
|
}
|
|
132
|
-
console.error(
|
|
141
|
+
console.error(describeError(err));
|
|
133
142
|
process.exit(1);
|
|
134
143
|
});
|
|
135
144
|
//# 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;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AC,CAAC,CAAC;AACnB,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-heap-args.d.ts","sourceRoot":"","sources":["../../src/commands/analyze-heap-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAA6B,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAA2C,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAoB7F;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAA6D,CAAC;AAE9G,0FAA0F;AAC1F,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAAgB,CAAC;AAEvE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"analyze-heap-args.d.ts","sourceRoot":"","sources":["../../src/commands/analyze-heap-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAA6B,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAA2C,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAoB7F;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAA6D,CAAC;AAE9G,0FAA0F;AAC1F,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAAgB,CAAC;AAEvE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EA6D9C,CAAC;AAEF,gEAAgE;AAChE,MAAM,WAAW,eAAe;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,UAA0B,GAAG,eAAe,CAqCzG;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,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
|
|
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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,KAAK,SAAS,EAAE,CAAC;YACjC,QAAQ,GAAG,IAAI,CAAC;QACnB,CAAC;aAAM,CAAC;YACL,OAAO,CAAC,wBAAwB,IAAI,sCAAsC,CAAC,CAAC;QAC/E,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,IAAI,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,CAAC,yEAAyE,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAc,EAAE,IAAI,GAAoB,EAAE;IAC7E,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,yEAAyE;QACzE,2EAA2E;QAC3E,iDAAiD;QACjD,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAC7B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC5B,CAAC;IACD,IAAI,aAAa,CAAC,IAAI,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;
|
|
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"}
|