@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
|
@@ -6,26 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
|
-
/**
|
|
10
|
-
* `init`'s argv parser.
|
|
11
|
-
*
|
|
12
|
-
* Its own module rather than a function in the CLI entry point, because the
|
|
13
|
-
* entry point runs `main()` on import: a test that wants to read an argv the
|
|
14
|
-
* way the command does would otherwise have to execute the whole binary. That
|
|
15
|
-
* matters more here than for the other subcommands, since the wizard's entire
|
|
16
|
-
* contract is that its composed argv means exactly what a typed one would — a
|
|
17
|
-
* claim only a test that round-trips through THIS function can check.
|
|
18
|
-
*
|
|
19
|
-
* The parsing is hand-written rather than declared to `commander` because the
|
|
20
|
-
* grammar-scoped flags are ORDER-dependent across different option names:
|
|
21
|
-
* `--extensions` applies to the `--grammar` it follows, so
|
|
22
|
-
* `--grammar A --extensions x --grammar B` and
|
|
23
|
-
* `--grammar A --grammar B --extensions x` mean different things. A declarative
|
|
24
|
-
* option model collects `{grammar: [A, B], extensions: [x]}` for both and the
|
|
25
|
-
* association is gone.
|
|
26
|
-
*/
|
|
27
9
|
import { type UsageError } from './harness-args.js';
|
|
28
10
|
import { type InitHead } from './init.js';
|
|
11
|
+
import type { InitHost } from './init-hosts.js';
|
|
29
12
|
/** One grammar as the command line collected it, before any derivation. */
|
|
30
13
|
export interface ParsedInitGrammar {
|
|
31
14
|
name: string;
|
|
@@ -38,7 +21,11 @@ export interface ParsedInitArgs {
|
|
|
38
21
|
targetDir?: string;
|
|
39
22
|
name?: string;
|
|
40
23
|
force: boolean;
|
|
24
|
+
install: boolean;
|
|
25
|
+
skills?: string;
|
|
26
|
+
agents?: string;
|
|
41
27
|
heads?: InitHead[];
|
|
28
|
+
hosts?: InitHost[];
|
|
42
29
|
monorepo: boolean;
|
|
43
30
|
scope?: string;
|
|
44
31
|
public: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-args.d.ts","sourceRoot":"","sources":["../../src/commands/init-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;
|
|
1
|
+
{"version":3,"file":"init-args.d.ts","sourceRoot":"","sources":["../../src/commands/init-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAsBlF,OAAO,EAA2D,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7G,OAAO,EAAoD,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC5F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAMhD,2EAA2E;AAC3E,MAAM,WAAW,iBAAiB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,sGAAsG;AACtG,MAAM,WAAW,cAAc;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAevC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAU7C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,UAA0B,GAAG,cAAc,CAiGjG;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,EAAE,SAAS,MAAM,EA0GtC,CAAC;AAEF,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA8ClE"}
|
|
@@ -24,11 +24,13 @@
|
|
|
24
24
|
* option model collects `{grammar: [A, B], extensions: [x]}` for both and the
|
|
25
25
|
* association is gone.
|
|
26
26
|
*/
|
|
27
|
+
import * as path from 'node:path';
|
|
27
28
|
import { assertRequired, exitWithUsage, helpRequested, printHelp } from './harness-args.js';
|
|
28
|
-
import { isNonEmptyDir, runInit } from './init.js';
|
|
29
|
+
import { isNonEmptyDir, runInit, validateInitInstallation } from './init.js';
|
|
29
30
|
import { createClackPrompt } from './init-prompt.js';
|
|
30
31
|
import { runInitWizard } from './init-wizard.js';
|
|
31
32
|
import { createNodeWorkspaceProbe, detectWorkspace } from './init-workspace.js';
|
|
33
|
+
import { installSkills, offerSkills, parseSkillInstallation, SKILLS_INSTALLER } from './init-skills.js';
|
|
32
34
|
/**
|
|
33
35
|
* Every flag `init` accepts, as data.
|
|
34
36
|
*
|
|
@@ -39,7 +41,11 @@ import { createNodeWorkspaceProbe, detectWorkspace } from './init-workspace.js';
|
|
|
39
41
|
export const INIT_FLAGS = [
|
|
40
42
|
'--name',
|
|
41
43
|
'--heads',
|
|
44
|
+
'--hosts',
|
|
42
45
|
'--force',
|
|
46
|
+
'--install',
|
|
47
|
+
'--skills',
|
|
48
|
+
'--agents',
|
|
43
49
|
'--monorepo',
|
|
44
50
|
'--scope',
|
|
45
51
|
'--public',
|
|
@@ -52,7 +58,17 @@ export const INIT_FLAGS = [
|
|
|
52
58
|
* The subset that takes a value, so `--help` in a value position reads as data.
|
|
53
59
|
* The rest are presence-only.
|
|
54
60
|
*/
|
|
55
|
-
export const INIT_VALUE_FLAGS = [
|
|
61
|
+
export const INIT_VALUE_FLAGS = [
|
|
62
|
+
'--skills',
|
|
63
|
+
'--agents',
|
|
64
|
+
'--name',
|
|
65
|
+
'--heads',
|
|
66
|
+
'--hosts',
|
|
67
|
+
'--scope',
|
|
68
|
+
'--grammar',
|
|
69
|
+
'--extensions',
|
|
70
|
+
'--language-id'
|
|
71
|
+
];
|
|
56
72
|
/**
|
|
57
73
|
* Parse `init`'s flags without deciding whether the result is complete.
|
|
58
74
|
*
|
|
@@ -68,7 +84,11 @@ export function parseInitArgs(args, onError = exitWithUsage) {
|
|
|
68
84
|
let targetDir;
|
|
69
85
|
let name;
|
|
70
86
|
let force = false;
|
|
87
|
+
let install = false;
|
|
88
|
+
let skills;
|
|
89
|
+
let agents;
|
|
71
90
|
let heads;
|
|
91
|
+
let hosts;
|
|
72
92
|
let monorepo = false;
|
|
73
93
|
let scope;
|
|
74
94
|
let isPublic = false;
|
|
@@ -94,6 +114,12 @@ export function parseInitArgs(args, onError = exitWithUsage) {
|
|
|
94
114
|
return current;
|
|
95
115
|
};
|
|
96
116
|
switch (flag) {
|
|
117
|
+
case '--skills':
|
|
118
|
+
skills = next();
|
|
119
|
+
break;
|
|
120
|
+
case '--agents':
|
|
121
|
+
agents = next();
|
|
122
|
+
break;
|
|
97
123
|
case '--name':
|
|
98
124
|
name = next();
|
|
99
125
|
break;
|
|
@@ -112,14 +138,20 @@ export function parseInitArgs(args, onError = exitWithUsage) {
|
|
|
112
138
|
scoped().diagram = true;
|
|
113
139
|
break;
|
|
114
140
|
case '--heads': {
|
|
115
|
-
// Validated in `resolveInitComposition
|
|
116
|
-
//
|
|
141
|
+
// Validated in `resolveInitComposition`; the cast only gets the
|
|
142
|
+
// strings that far.
|
|
117
143
|
heads = next().split(',');
|
|
118
144
|
break;
|
|
119
145
|
}
|
|
146
|
+
case '--hosts':
|
|
147
|
+
hosts = next().split(',');
|
|
148
|
+
break;
|
|
120
149
|
case '--force':
|
|
121
150
|
force = true;
|
|
122
151
|
break;
|
|
152
|
+
case '--install':
|
|
153
|
+
install = true;
|
|
154
|
+
break;
|
|
123
155
|
case '--monorepo':
|
|
124
156
|
monorepo = true;
|
|
125
157
|
break;
|
|
@@ -147,7 +179,7 @@ export function parseInitArgs(args, onError = exitWithUsage) {
|
|
|
147
179
|
}
|
|
148
180
|
}
|
|
149
181
|
}
|
|
150
|
-
return { targetDir, name, force, heads, monorepo, scope, public: isPublic, grammars };
|
|
182
|
+
return { targetDir, name, force, install, skills, agents, heads, hosts, monorepo, scope, public: isPublic, grammars };
|
|
151
183
|
}
|
|
152
184
|
/**
|
|
153
185
|
* The `init --help` text, as data.
|
|
@@ -157,46 +189,87 @@ export function parseInitArgs(args, onError = exitWithUsage) {
|
|
|
157
189
|
* authoritative, and a flag missing from it is a capability nobody finds.
|
|
158
190
|
*/
|
|
159
191
|
export const INIT_HELP = [
|
|
160
|
-
'Usage: hydranium-cli init <target-dir> --name <Name> [--heads <list>]
|
|
161
|
-
' [--
|
|
192
|
+
'Usage: hydranium-cli init <target-dir> --name <Name> [--heads <list>]',
|
|
193
|
+
' [--hosts <list>] [--force] [--monorepo]',
|
|
194
|
+
' [--scope <@scope>] [--public] [--install]',
|
|
162
195
|
' ( --grammar <Name> [--extensions <list>]',
|
|
163
196
|
' [--language-id <id>] [--diagram] )...',
|
|
164
197
|
'',
|
|
165
|
-
'Scaffold a new Hydranium language project end-to-end:
|
|
166
|
-
'
|
|
167
|
-
'
|
|
168
|
-
'
|
|
169
|
-
'
|
|
198
|
+
'Scaffold a new Hydranium language project end-to-end: its packages and a',
|
|
199
|
+
'starter workspace, each in its own directory. server/ holds a starter grammar',
|
|
200
|
+
'per --grammar, the `create<Name>Services` DI wiring, a launch of every head',
|
|
201
|
+
'and build scripts; protocol/ holds what the server and its clients both',
|
|
202
|
+
'import; client/, with a diagram, holds its host-neutral client side;',
|
|
203
|
+
'host-<name>/ holds each --hosts application, vscode-servers/ the server',
|
|
204
|
+
'launch of the VS Code and Theia ones, and theia/ the Theia extension;',
|
|
205
|
+
'workspace/ holds two starter model files per grammar. A standalone project',
|
|
206
|
+
'also gets a root manifest naming the packages as npm workspaces.',
|
|
207
|
+
'Stays offline unless --install or --skills is requested. With --install,',
|
|
208
|
+
'runs `npm install` after writing the scaffold. Building remains a next step.',
|
|
209
|
+
'Refuses a non-empty directory',
|
|
210
|
+
'without --force.',
|
|
170
211
|
'',
|
|
171
212
|
'Run it with no --name on a terminal to be prompted instead. The wizard echoes',
|
|
172
213
|
'the command it composed before running it, so every answer is reproducible as',
|
|
173
214
|
'flags. Without a terminal a missing --name stays an error, so CI never hangs.',
|
|
215
|
+
'For a standalone project, the wizard ends by offering npm install unless',
|
|
216
|
+
'--install already requested it.',
|
|
217
|
+
'After a successful scaffold, the wizard offers coding-agent skills separately.',
|
|
218
|
+
'Skipping or cancelling that offer leaves the scaffold intact.',
|
|
174
219
|
'',
|
|
175
220
|
'Project options (position-free):',
|
|
176
|
-
' <target-dir>
|
|
221
|
+
' <target-dir> The project directory to scaffold into (required).',
|
|
177
222
|
' --name <Name> PascalCase PROJECT name; drives the services and the',
|
|
178
223
|
' Langium projectName, i.e. the shared generated symbols',
|
|
179
224
|
' (<Name>AstReflection, <Name>GeneratedSharedModule) (required).',
|
|
180
|
-
' --heads <list> Comma-separated protocol heads: lsp, data, glsp
|
|
181
|
-
'
|
|
182
|
-
'
|
|
183
|
-
' The emitted dependencies, main.ts and
|
|
184
|
-
' all follow this set. Default: lsp,data.',
|
|
225
|
+
' --heads <list> Comma-separated protocol heads: lsp, data, glsp, any',
|
|
226
|
+
' non-empty set. Without lsp, main.ts serves the socket',
|
|
227
|
+
' heads from a workspace path it is given and prints',
|
|
228
|
+
' their ports. The emitted dependencies, main.ts and',
|
|
229
|
+
' module bindings all follow this set. Default: lsp,data.',
|
|
230
|
+
' --hosts <list> Comma-separated host applications to emit around the',
|
|
231
|
+
' heads: browser, a page running every head in a web',
|
|
232
|
+
' worker, which needs lsp or glsp; without lsp it has',
|
|
233
|
+
' no editor and saves through the diagram. vscode, a',
|
|
234
|
+
' VS Code extension and the servers-only extension it',
|
|
235
|
+
' starts the server through, which needs lsp.',
|
|
236
|
+
' theia-browser, a Theia browser application, its',
|
|
237
|
+
' Theia extension and the servers-only extension it',
|
|
238
|
+
' sideloads, which needs lsp. theia-electron, the',
|
|
239
|
+
' same in a Theia Electron application. Without',
|
|
240
|
+
' --hosts, the server with its Node entry points, and',
|
|
241
|
+
' with glsp the client/ package a host mounts.',
|
|
185
242
|
' --force Scaffold into a non-empty directory anyway.',
|
|
186
|
-
' --
|
|
187
|
-
|
|
188
|
-
'
|
|
189
|
-
'
|
|
190
|
-
'
|
|
191
|
-
'
|
|
192
|
-
' --
|
|
243
|
+
' --skills <names> After scaffolding, install named skills: hydranium-profiling,',
|
|
244
|
+
` langium. Requires --agents. Downloads with npx ${SKILLS_INSTALLER} add`,
|
|
245
|
+
' --copy, preserving unrelated skills and lock entries.',
|
|
246
|
+
' With --monorepo, skills are written at the workspace root.',
|
|
247
|
+
' --agents <names> Comma-separated agents for --skills: codex, claude-code,',
|
|
248
|
+
' cursor, github-copilot, opencode.',
|
|
249
|
+
' --install Run npm install in the scaffold, with lifecycle scripts',
|
|
250
|
+
' and network access. Cannot be combined with --monorepo:',
|
|
251
|
+
' its parent manifest needs manual edits first.',
|
|
252
|
+
' --monorepo Scaffold the packages as members of the surrounding npm',
|
|
253
|
+
' workspace, with no root of their own: each tsconfig',
|
|
254
|
+
' extends the root config that actually carries',
|
|
255
|
+
' compilerOptions, and the scripts address the server by',
|
|
256
|
+
' --prefix. Errors when no ancestor declares `workspaces`.',
|
|
257
|
+
' Scaffold files stay inside the target; optional skills',
|
|
258
|
+
' go at the workspace root. The root `workspaces`',
|
|
259
|
+
' entries and dependency pins are printed, not added.',
|
|
260
|
+
' --scope <@scope> npm scope for the package names, e.g. @acme. Not inferred:',
|
|
193
261
|
' a root manifest is usually named for the repo, not the',
|
|
194
262
|
' scope. The wizard offers the siblings’ scope as a default.',
|
|
195
|
-
'
|
|
196
|
-
'
|
|
197
|
-
'
|
|
198
|
-
'
|
|
199
|
-
'
|
|
263
|
+
' The VS Code extensions stay unscoped, since vsce',
|
|
264
|
+
' refuses a scoped extension name.',
|
|
265
|
+
' --public Omit "private": true from the server, protocol,',
|
|
266
|
+
' client and Theia extension packages, so they can be',
|
|
267
|
+
' published together; a host package stays private.',
|
|
268
|
+
' The scaffold emits it by default, because the',
|
|
269
|
+
' manifests also declare license "UNLICENSED": a',
|
|
270
|
+
' package granting no rights on a public registry',
|
|
271
|
+
' contradicts itself. Pass this once the project has',
|
|
272
|
+
' picked a licence.',
|
|
200
273
|
'',
|
|
201
274
|
'Grammar options — each applies to the PRECEDING --grammar:',
|
|
202
275
|
' --grammar <Name> PascalCase GRAMMAR name; drives the `grammar X` declaration',
|
|
@@ -210,8 +283,12 @@ export const INIT_HELP = [
|
|
|
210
283
|
' (default: <project-id>-<grammar-id>).',
|
|
211
284
|
' --diagram Scaffold a GLSP diagram for that grammar. Requires',
|
|
212
285
|
' `glsp` in --heads. Derived when there is exactly one',
|
|
213
|
-
' grammar; required when there are several, because
|
|
214
|
-
' diagram
|
|
286
|
+
' grammar; required when there are several, because the',
|
|
287
|
+
' scaffolded diagram is typed over one grammar’s model.',
|
|
288
|
+
'',
|
|
289
|
+
'Example — one grammar, three heads, in a browser page:',
|
|
290
|
+
' hydranium-cli init ./bookstore --name Bookstore --heads lsp,data,glsp \\',
|
|
291
|
+
' --hosts browser',
|
|
215
292
|
'',
|
|
216
293
|
'Example — three grammars, one with a differing extension, three heads:',
|
|
217
294
|
' hydranium-cli init ./order-flow --name OrderFlow --heads lsp,data,glsp \\',
|
|
@@ -223,28 +300,47 @@ export async function runInitCommand(args) {
|
|
|
223
300
|
printHelp(INIT_HELP);
|
|
224
301
|
return;
|
|
225
302
|
}
|
|
226
|
-
|
|
303
|
+
let parsed = parseInitArgs(args);
|
|
304
|
+
validateInitInstallation(parsed);
|
|
305
|
+
let selection = parseSkillInstallation(parsed.skills, parsed.agents);
|
|
306
|
+
let prompt;
|
|
227
307
|
// The wizard's entry point: no `--name` on an interactive terminal. Safe
|
|
228
308
|
// because that combination has no non-wizard meaning, and gated on a TTY
|
|
229
309
|
// because a non-interactive caller must keep failing fast — a prompt in CI
|
|
230
310
|
// hangs the job instead of reporting the missing flag.
|
|
231
311
|
if (parsed.name === undefined && process.stdin.isTTY && process.stdout.isTTY) {
|
|
232
|
-
|
|
312
|
+
prompt = await createClackPrompt();
|
|
233
313
|
const argv = await runInitWizard(prompt, targetDir => detectWorkspace(targetDir, createNodeWorkspaceProbe()), {
|
|
234
314
|
targetDir: parsed.targetDir,
|
|
315
|
+
install: parsed.install,
|
|
316
|
+
skills: parsed.skills,
|
|
317
|
+
agents: parsed.agents,
|
|
235
318
|
isOccupied: isNonEmptyDir
|
|
236
319
|
});
|
|
237
|
-
|
|
320
|
+
parsed = parseInitArgs(argv);
|
|
238
321
|
}
|
|
239
322
|
runInit({
|
|
240
323
|
targetDir: assertRequired(parsed.targetDir, '<target-dir>', 'init'),
|
|
241
324
|
name: assertRequired(parsed.name, '--name', 'init'),
|
|
242
325
|
grammars: parsed.grammars,
|
|
243
326
|
heads: parsed.heads,
|
|
327
|
+
hosts: parsed.hosts,
|
|
244
328
|
force: parsed.force,
|
|
329
|
+
install: parsed.install,
|
|
245
330
|
monorepo: parsed.monorepo,
|
|
246
331
|
scope: parsed.scope,
|
|
247
332
|
public: parsed.public
|
|
248
333
|
});
|
|
334
|
+
const target = path.resolve(parsed.targetDir);
|
|
335
|
+
const project = parsed.monorepo ? detectWorkspace(target, createNodeWorkspaceProbe()).rootDir : target;
|
|
336
|
+
if (selection === undefined && prompt !== undefined) {
|
|
337
|
+
selection = await offerSkills(prompt, project);
|
|
338
|
+
}
|
|
339
|
+
if (selection !== undefined) {
|
|
340
|
+
installSkills(project, path.join(target, 'server'), selection);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
process.stdout.write('\nOptional agent skills: see the Work with coding-agent skills guide.\n');
|
|
344
|
+
}
|
|
249
345
|
}
|
|
250
346
|
//# sourceMappingURL=init-args.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-args.js","sourceRoot":"","sources":["../../src/commands/init-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,OAAO,EAAiB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"init-args.js","sourceRoot":"","sources":["../../src/commands/init-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAiB,MAAM,WAAW,CAAC;AAE5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AA0BxG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAsB;IAC1C,QAAQ;IACR,SAAS;IACT,SAAS;IACT,SAAS;IACT,WAAW;IACX,UAAU;IACV,UAAU;IACV,YAAY;IACZ,SAAS;IACT,UAAU;IACV,WAAW;IACX,cAAc;IACd,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,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;KACvB,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAU,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;IACxG,IAAI,SAAS,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACnD,SAAS,GAAG,MAAM,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC3B,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAC;IAClE,CAAC;SAAM,CAAC;QACL,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;IACnG,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
/**
|
|
10
|
+
* The host applications `init` can emit around the server: each holds the
|
|
11
|
+
* clients of the heads it runs, in a sibling package of its own.
|
|
12
|
+
*/
|
|
13
|
+
import type { InitHead } from './init.js';
|
|
14
|
+
/** The hosts a scaffold can emit, in the order a workspace lists them. */
|
|
15
|
+
export declare const INIT_HOSTS: readonly ['browser', 'vscode', 'theia-browser', 'theia-electron'];
|
|
16
|
+
/** One host application — see {@link INIT_HOSTS}. */
|
|
17
|
+
export type InitHost = (typeof INIT_HOSTS)[number];
|
|
18
|
+
/** True for a string naming one of {@link INIT_HOSTS}. */
|
|
19
|
+
export declare function isInitHost(value: string): value is InitHost;
|
|
20
|
+
/** True for a host that is a Theia application, which runs the Theia extension. */
|
|
21
|
+
export declare function isTheiaHost(host: InitHost): boolean;
|
|
22
|
+
/** The heads {@link host} needs at least one of in the composition. */
|
|
23
|
+
export declare function editingHeads(host: InitHost): readonly InitHead[];
|
|
24
|
+
//# sourceMappingURL=init-hosts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-hosts.d.ts","sourceRoot":"","sources":["../../src/commands/init-hosts.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,0EAA0E;AAC1E,eAAO,MAAM,UAAU,YAAI,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,gBAAgB,CAAU,CAAC;AAE5F,qDAAqD;AACrD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAiBnD,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,QAAQ,CAE3D;AAED,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAEnD;AAED,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,QAAQ,EAAE,CAEhE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
/** The hosts a scaffold can emit, in the order a workspace lists them. */
|
|
10
|
+
export const INIT_HOSTS = ['browser', 'vscode', 'theia-browser', 'theia-electron'];
|
|
11
|
+
/**
|
|
12
|
+
* The heads a host needs at least one of: those whose client edits and saves
|
|
13
|
+
* the files. The browser page has no filesystem of its own, so it saves through
|
|
14
|
+
* the LSP head's editor or the GLSP head's diagram. VS Code and Theia own the
|
|
15
|
+
* files and reach the server through a language client, so they need the LSP
|
|
16
|
+
* head. Every other head is optional, and a head the host does not know is left
|
|
17
|
+
* unused.
|
|
18
|
+
*/
|
|
19
|
+
const EDITING_HEADS = {
|
|
20
|
+
browser: ['lsp', 'glsp'],
|
|
21
|
+
vscode: ['lsp'],
|
|
22
|
+
'theia-browser': ['lsp'],
|
|
23
|
+
'theia-electron': ['lsp']
|
|
24
|
+
};
|
|
25
|
+
/** True for a string naming one of {@link INIT_HOSTS}. */
|
|
26
|
+
export function isInitHost(value) {
|
|
27
|
+
return INIT_HOSTS.includes(value);
|
|
28
|
+
}
|
|
29
|
+
/** True for a host that is a Theia application, which runs the Theia extension. */
|
|
30
|
+
export function isTheiaHost(host) {
|
|
31
|
+
return host === 'theia-browser' || host === 'theia-electron';
|
|
32
|
+
}
|
|
33
|
+
/** The heads {@link host} needs at least one of in the composition. */
|
|
34
|
+
export function editingHeads(host) {
|
|
35
|
+
return EDITING_HEADS[host];
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=init-hosts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-hosts.js","sourceRoot":"","sources":["../../src/commands/init-hosts.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AASlF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,gBAAgB,CAAU,CAAC;AAK5F;;;;;;;GAOG;AACH,MAAM,aAAa,GAA0C;IAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,CAAC,KAAK,CAAC;IACf,eAAe,EAAE,CAAC,KAAK,CAAC;IACxB,gBAAgB,EAAE,CAAC,KAAK,CAAC;CAC3B,CAAC;AAEF,0DAA0D;AAC1D,MAAM,UAAU,UAAU,CAAC,KAAa;IACrC,OAAQ,UAAgC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,WAAW,CAAC,IAAc;IACvC,OAAO,IAAI,KAAK,eAAe,IAAI,IAAI,KAAK,gBAAgB,CAAC;AAChE,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,YAAY,CAAC,IAAc;IACxC,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -39,7 +39,7 @@ export interface PromptPort {
|
|
|
39
39
|
readonly choices: ReadonlyArray<PromptChoice<Value>>;
|
|
40
40
|
readonly initialValue?: Value;
|
|
41
41
|
}) => Promise<Value>;
|
|
42
|
-
/** Ask for
|
|
42
|
+
/** Ask for at least one of several choices. */
|
|
43
43
|
readonly multiselect: <Value extends string>(options: {
|
|
44
44
|
readonly message: string;
|
|
45
45
|
readonly choices: ReadonlyArray<PromptChoice<Value>>;
|
|
@@ -53,8 +53,8 @@ export interface PromptPort {
|
|
|
53
53
|
/** Close the session with a closing line. */
|
|
54
54
|
readonly outro: (message: string) => void;
|
|
55
55
|
}
|
|
56
|
-
/** The
|
|
57
|
-
export declare const
|
|
56
|
+
/** The heads, as a checkbox list. */
|
|
57
|
+
export declare const HEAD_CHOICES: ReadonlyArray<PromptChoice<InitHead>>;
|
|
58
58
|
/**
|
|
59
59
|
* The real prompt, backed by `@clack/prompts`.
|
|
60
60
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-prompt.d.ts","sourceRoot":"","sources":["../../src/commands/init-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAqBlF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,wFAAwF;AACxF,MAAM,WAAW,YAAY,CAAC,KAAK,SAAS,MAAM;IAC/C,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,mGAAmG;AACnG,MAAM,WAAW,iBAAiB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAC5D;AAED,4EAA4E;AAC5E,qBAAa,mBAAoB,SAAQ,KAAK
|
|
1
|
+
{"version":3,"file":"init-prompt.d.ts","sourceRoot":"","sources":["../../src/commands/init-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAqBlF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,wFAAwF;AACxF,MAAM,WAAW,YAAY,CAAC,KAAK,SAAS,MAAM;IAC/C,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACzB;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Q,CAAC,aAAa,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;KAC5C,KAAK,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/G,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,qCAAqC;AACrC,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,CAI9D,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,UAAU,CAAC,CAqD7D"}
|
|
@@ -13,8 +13,9 @@ export class InitWizardCancelled extends Error {
|
|
|
13
13
|
this.name = 'InitWizardCancelled';
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
/** The
|
|
17
|
-
export const
|
|
16
|
+
/** The heads, as a checkbox list. */
|
|
17
|
+
export const HEAD_CHOICES = [
|
|
18
|
+
{ value: 'lsp', label: 'lsp', hint: 'text editing in an LSP client' },
|
|
18
19
|
{ value: 'data', label: 'data', hint: 'typed JSON-RPC for forms, trees and code-gen' },
|
|
19
20
|
{ value: 'glsp', label: 'glsp', hint: 'graphical editing; adds a scaffolded diagram' }
|
|
20
21
|
];
|
|
@@ -60,9 +61,7 @@ export async function createClackPrompt() {
|
|
|
60
61
|
message: options.message,
|
|
61
62
|
options: toOptions(options.choices),
|
|
62
63
|
initialValues: options.initialValues ? [...options.initialValues] : [],
|
|
63
|
-
|
|
64
|
-
// server, so an empty selection must not be rejected.
|
|
65
|
-
required: false
|
|
64
|
+
required: true
|
|
66
65
|
})),
|
|
67
66
|
confirm: async (options) => unwrap(await clack.confirm({ message: options.message, initialValue: options.initialValue })),
|
|
68
67
|
outro: message => clack.outro(message)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-prompt.js","sourceRoot":"","sources":["../../src/commands/init-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAuClF,4EAA4E;AAC5E,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC3C;QACG,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACrC,CAAC;CACH;AA4BD,
|
|
1
|
+
{"version":3,"file":"init-prompt.js","sourceRoot":"","sources":["../../src/commands/init-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAuClF,4EAA4E;AAC5E,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC3C;QACG,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACrC,CAAC;CACH;AA4BD,qCAAqC;AACrC,MAAM,CAAC,MAAM,YAAY,GAA0C;IAChE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,+BAA+B,EAAE;IACrE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,8CAA8C,EAAE;IACtF,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,8CAA8C,EAAE;CACxF,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACpC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAE7C,uEAAuE;IACvE,MAAM,MAAM,GAAG,CAAQ,MAAsB,EAAS,EAAE;QACrD,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,mBAAmB,EAAE,CAAC;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AAY;SACpC,CAAC,CACJ;QACJ,WAAW,EAAE,KAAK,EAAC,OAAO,EAAC,EAAE,CAC1B,MAAM,CACH,MAAM,KAAK,CAAC,WAAW,CAAC;YACrB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;YACnC,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE;YACtE,QAAQ,EAAE,IAAI;SAChB,CAAC,CACJ;QACJ,OAAO,EAAE,KAAK,EAAC,OAAO,EAAC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;QACvH,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;KACxC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
import { type PromptPort } from './init-prompt.js';
|
|
10
|
+
export declare const SKILLS_INSTALLER = "skills@1.7.6";
|
|
11
|
+
export declare const ADOPTER_SKILLS: {
|
|
12
|
+
readonly 'hydranium-profiling': {
|
|
13
|
+
readonly source: 'eclipse-emfcloud/hydranium';
|
|
14
|
+
readonly label: 'Hydranium profiling';
|
|
15
|
+
};
|
|
16
|
+
readonly langium: {
|
|
17
|
+
readonly source: 'eclipse-langium/langium-ai';
|
|
18
|
+
readonly label: 'Langium grammar and runtime';
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type AdopterSkill = keyof typeof ADOPTER_SKILLS;
|
|
22
|
+
export declare const SKILL_AGENTS: {
|
|
23
|
+
readonly codex: 'Codex';
|
|
24
|
+
readonly 'claude-code': 'Claude Code';
|
|
25
|
+
readonly cursor: 'Cursor';
|
|
26
|
+
readonly 'github-copilot': 'GitHub Copilot';
|
|
27
|
+
readonly opencode: 'OpenCode';
|
|
28
|
+
};
|
|
29
|
+
export type SkillAgent = keyof typeof SKILL_AGENTS;
|
|
30
|
+
export interface SkillInstallation {
|
|
31
|
+
readonly skills: readonly AdopterSkill[];
|
|
32
|
+
readonly agents: readonly SkillAgent[];
|
|
33
|
+
}
|
|
34
|
+
/** Validate before scaffolding so a misspelling cannot leave a half-completed command. */
|
|
35
|
+
export declare function parseSkillInstallation(skills?: string, agents?: string): SkillInstallation | undefined;
|
|
36
|
+
export declare function skillInstallArgs(skill: AdopterSkill, agents: readonly SkillAgent[]): string[];
|
|
37
|
+
/** A failed optional download leaves the scaffold usable and gives an independently runnable retry. */
|
|
38
|
+
export declare function installSkills(project: string, from: string, selection: SkillInstallation, write?: (message: string) => void): void;
|
|
39
|
+
/** This prompt runs only after the scaffold succeeds; cancelling it cannot undo the scaffold. */
|
|
40
|
+
export declare function offerSkills(prompt: PromptPort, project: string): Promise<SkillInstallation | undefined>;
|
|
41
|
+
//# sourceMappingURL=init-skills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-skills.d.ts","sourceRoot":"","sources":["../../src/commands/init-skills.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAIlF,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGxE,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAE/C,eAAO,MAAM,cAAc;aACxB,qBAAqB;iBAAI,MAAM,EAAE,4BAA4B;iBAAE,KAAK,EAAE,qBAAqB;;aAC3F,OAAO;iBAAI,MAA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