opensip-cli 0.1.5 → 0.1.7
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/dist/bootstrap/admit-tool-package.d.ts +15 -1
- package/dist/bootstrap/admit-tool-package.d.ts.map +1 -1
- package/dist/bootstrap/admit-tool-package.js +30 -5
- package/dist/bootstrap/admit-tool-package.js.map +1 -1
- package/dist/bootstrap/bind-tool-context.d.ts.map +1 -1
- package/dist/bootstrap/bind-tool-context.js +5 -3
- package/dist/bootstrap/bind-tool-context.js.map +1 -1
- package/dist/bootstrap/build-command-registration-input.d.ts +7 -0
- package/dist/bootstrap/build-command-registration-input.d.ts.map +1 -1
- package/dist/bootstrap/build-command-registration-input.js +11 -4
- package/dist/bootstrap/build-command-registration-input.js.map +1 -1
- package/dist/bootstrap/build-per-run-scope.d.ts +12 -0
- package/dist/bootstrap/build-per-run-scope.d.ts.map +1 -1
- package/dist/bootstrap/build-per-run-scope.js +84 -9
- package/dist/bootstrap/build-per-run-scope.js.map +1 -1
- package/dist/bootstrap/bundled-manifest.d.ts +5 -0
- package/dist/bootstrap/bundled-manifest.d.ts.map +1 -0
- package/dist/bootstrap/bundled-manifest.js +13 -0
- package/dist/bootstrap/bundled-manifest.js.map +1 -0
- package/dist/bootstrap/bundled-tools.manifest.json +19 -1
- package/dist/bootstrap/config-and-capabilities.d.ts +5 -3
- package/dist/bootstrap/config-and-capabilities.d.ts.map +1 -1
- package/dist/bootstrap/config-and-capabilities.js +10 -7
- package/dist/bootstrap/config-and-capabilities.js.map +1 -1
- package/dist/bootstrap/constants.d.ts +3 -0
- package/dist/bootstrap/constants.d.ts.map +1 -0
- package/dist/bootstrap/constants.js +3 -0
- package/dist/bootstrap/constants.js.map +1 -0
- package/dist/bootstrap/decorate-tool-primary.d.ts +50 -0
- package/dist/bootstrap/decorate-tool-primary.d.ts.map +1 -0
- package/dist/bootstrap/decorate-tool-primary.js +111 -0
- package/dist/bootstrap/decorate-tool-primary.js.map +1 -0
- package/dist/bootstrap/execute-post-bailout-bootstrap.d.ts +1 -0
- package/dist/bootstrap/execute-post-bailout-bootstrap.d.ts.map +1 -1
- package/dist/bootstrap/execute-post-bailout-bootstrap.js +12 -1
- package/dist/bootstrap/execute-post-bailout-bootstrap.js.map +1 -1
- package/dist/bootstrap/index.d.ts +1 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +1 -4
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/bootstrap/io-plane.d.ts +47 -0
- package/dist/bootstrap/io-plane.d.ts.map +1 -0
- package/dist/bootstrap/io-plane.js +73 -0
- package/dist/bootstrap/io-plane.js.map +1 -0
- package/dist/bootstrap/load-tool-capabilities.d.ts.map +1 -1
- package/dist/bootstrap/load-tool-capabilities.js +18 -2
- package/dist/bootstrap/load-tool-capabilities.js.map +1 -1
- package/dist/bootstrap/owning-tool-init.d.ts.map +1 -1
- package/dist/bootstrap/owning-tool-init.js +7 -4
- package/dist/bootstrap/owning-tool-init.js.map +1 -1
- package/dist/bootstrap/phase-map.d.ts +20 -0
- package/dist/bootstrap/phase-map.d.ts.map +1 -0
- package/dist/bootstrap/phase-map.js +108 -0
- package/dist/bootstrap/phase-map.js.map +1 -0
- package/dist/bootstrap/plan-pre-action-bootstrap.d.ts +5 -5
- package/dist/bootstrap/plan-pre-action-bootstrap.d.ts.map +1 -1
- package/dist/bootstrap/plan-pre-action-bootstrap.js +3 -19
- package/dist/bootstrap/plan-pre-action-bootstrap.js.map +1 -1
- package/dist/bootstrap/pre-action-guards.d.ts +2 -1
- package/dist/bootstrap/pre-action-guards.d.ts.map +1 -1
- package/dist/bootstrap/pre-action-guards.js +3 -27
- package/dist/bootstrap/pre-action-guards.js.map +1 -1
- package/dist/bootstrap/pre-action-hook.d.ts +2 -1
- package/dist/bootstrap/pre-action-hook.d.ts.map +1 -1
- package/dist/bootstrap/pre-action-hook.js +23 -4
- package/dist/bootstrap/pre-action-hook.js.map +1 -1
- package/dist/bootstrap/register-tools-discovery.d.ts +38 -39
- package/dist/bootstrap/register-tools-discovery.d.ts.map +1 -1
- package/dist/bootstrap/register-tools-discovery.js +134 -85
- package/dist/bootstrap/register-tools-discovery.js.map +1 -1
- package/dist/bootstrap/register-tools-mount.d.ts +18 -1
- package/dist/bootstrap/register-tools-mount.d.ts.map +1 -1
- package/dist/bootstrap/register-tools-mount.js +118 -18
- package/dist/bootstrap/register-tools-mount.js.map +1 -1
- package/dist/bootstrap/register-tools.d.ts +58 -14
- package/dist/bootstrap/register-tools.d.ts.map +1 -1
- package/dist/bootstrap/register-tools.js +185 -14
- package/dist/bootstrap/register-tools.js.map +1 -1
- package/dist/bootstrap/root-version.d.ts +26 -0
- package/dist/bootstrap/root-version.d.ts.map +1 -0
- package/dist/bootstrap/root-version.js +36 -0
- package/dist/bootstrap/root-version.js.map +1 -0
- package/dist/bootstrap/scope-access.d.ts +11 -0
- package/dist/bootstrap/scope-access.d.ts.map +1 -1
- package/dist/bootstrap/scope-access.js +26 -0
- package/dist/bootstrap/scope-access.js.map +1 -1
- package/dist/bootstrap/tool-lifecycle.d.ts +0 -22
- package/dist/bootstrap/tool-lifecycle.d.ts.map +1 -1
- package/dist/bootstrap/tool-lifecycle.js +0 -23
- package/dist/bootstrap/tool-lifecycle.js.map +1 -1
- package/dist/bootstrap/validate-tool.d.ts +10 -4
- package/dist/bootstrap/validate-tool.d.ts.map +1 -1
- package/dist/bootstrap/validate-tool.js +76 -22
- package/dist/bootstrap/validate-tool.js.map +1 -1
- package/dist/cli-context.d.ts +2 -2
- package/dist/cli-context.d.ts.map +1 -1
- package/dist/cli-context.js +20 -35
- package/dist/cli-context.js.map +1 -1
- package/dist/commands/agent-catalog.d.ts +29 -0
- package/dist/commands/agent-catalog.d.ts.map +1 -1
- package/dist/commands/agent-catalog.js +77 -36
- package/dist/commands/agent-catalog.js.map +1 -1
- package/dist/commands/clear.d.ts.map +1 -1
- package/dist/commands/clear.js +0 -1
- package/dist/commands/clear.js.map +1 -1
- package/dist/commands/command-scope-index.d.ts +45 -0
- package/dist/commands/command-scope-index.d.ts.map +1 -0
- package/dist/commands/command-scope-index.js +51 -0
- package/dist/commands/command-scope-index.js.map +1 -0
- package/dist/commands/completion.d.ts +67 -6
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +84 -12
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/configure.d.ts.map +1 -1
- package/dist/commands/configure.js +0 -1
- package/dist/commands/configure.js.map +1 -1
- package/dist/commands/host-command-specs.d.ts +16 -9
- package/dist/commands/host-command-specs.d.ts.map +1 -1
- package/dist/commands/host-command-specs.js +47 -21
- package/dist/commands/host-command-specs.js.map +1 -1
- package/dist/commands/host-config-flag.d.ts +21 -0
- package/dist/commands/host-config-flag.d.ts.map +1 -0
- package/dist/commands/host-config-flag.js +21 -0
- package/dist/commands/host-config-flag.js.map +1 -0
- package/dist/commands/host-subcommand-groups.d.ts +46 -5
- package/dist/commands/host-subcommand-groups.d.ts.map +1 -1
- package/dist/commands/host-subcommand-groups.js +97 -65
- package/dist/commands/host-subcommand-groups.js.map +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/internal-command-visibility.d.ts +42 -0
- package/dist/commands/internal-command-visibility.d.ts.map +1 -0
- package/dist/commands/internal-command-visibility.js +54 -0
- package/dist/commands/internal-command-visibility.js.map +1 -0
- package/dist/commands/mount-command-action.d.ts +24 -0
- package/dist/commands/mount-command-action.d.ts.map +1 -0
- package/dist/commands/mount-command-action.js +78 -0
- package/dist/commands/mount-command-action.js.map +1 -0
- package/dist/commands/mount-command-spec-wiring.d.ts +24 -0
- package/dist/commands/mount-command-spec-wiring.d.ts.map +1 -0
- package/dist/commands/mount-command-spec-wiring.js +71 -0
- package/dist/commands/mount-command-spec-wiring.js.map +1 -0
- package/dist/commands/mount-command-spec.d.ts +9 -2
- package/dist/commands/mount-command-spec.d.ts.map +1 -1
- package/dist/commands/mount-command-spec.js +11 -135
- package/dist/commands/mount-command-spec.js.map +1 -1
- package/dist/commands/plugin/domain-resolution.d.ts +12 -13
- package/dist/commands/plugin/domain-resolution.d.ts.map +1 -1
- package/dist/commands/plugin/domain-resolution.js +12 -58
- package/dist/commands/plugin/domain-resolution.js.map +1 -1
- package/dist/commands/plugin/host-dir.d.ts +0 -1
- package/dist/commands/plugin/host-dir.d.ts.map +1 -1
- package/dist/commands/plugin/host-dir.js +1 -1
- package/dist/commands/plugin/host-dir.js.map +1 -1
- package/dist/commands/plugin.d.ts +20 -14
- package/dist/commands/plugin.d.ts.map +1 -1
- package/dist/commands/plugin.js +39 -47
- package/dist/commands/plugin.js.map +1 -1
- package/dist/commands/render-outcome.d.ts.map +1 -1
- package/dist/commands/render-outcome.js.map +1 -1
- package/dist/commands/shared.d.ts +9 -0
- package/dist/commands/shared.d.ts.map +1 -1
- package/dist/commands/tools/create.d.ts +11 -0
- package/dist/commands/tools/create.d.ts.map +1 -0
- package/dist/commands/tools/create.js +84 -0
- package/dist/commands/tools/create.js.map +1 -0
- package/dist/commands/tools/index.d.ts.map +1 -1
- package/dist/commands/tools/index.js +31 -0
- package/dist/commands/tools/index.js.map +1 -1
- package/dist/commands/tools/runtime-probe-entry.d.ts.map +1 -1
- package/dist/commands/tools/runtime-probe-entry.js +4 -2
- package/dist/commands/tools/runtime-probe-entry.js.map +1 -1
- package/dist/commands/tools/validate.d.ts.map +1 -1
- package/dist/commands/tools/validate.js +12 -5
- package/dist/commands/tools/validate.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +0 -1
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/env/host-env-specs.d.ts +18 -0
- package/dist/env/host-env-specs.d.ts.map +1 -1
- package/dist/env/host-env-specs.js +36 -2
- package/dist/env/host-env-specs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -21
- package/dist/index.js.map +1 -1
- package/dist/report-compose.d.ts.map +1 -1
- package/dist/report-compose.js +2 -2
- package/dist/report-compose.js.map +1 -1
- package/dist/session-replay-registry.d.ts +1 -1
- package/dist/session-replay-registry.d.ts.map +1 -1
- package/dist/session-replay-registry.js +3 -1
- package/dist/session-replay-registry.js.map +1 -1
- package/dist/ui/result-to-view.d.ts +27 -7
- package/dist/ui/result-to-view.d.ts.map +1 -1
- package/dist/ui/result-to-view.js +68 -75
- package/dist/ui/result-to-view.js.map +1 -1
- package/dist/ui/views/misc-views.d.ts.map +1 -1
- package/dist/ui/views/misc-views.js +3 -1
- package/dist/ui/views/misc-views.js.map +1 -1
- package/dist/ui/views/tools-views.d.ts +2 -1
- package/dist/ui/views/tools-views.d.ts.map +1 -1
- package/dist/ui/views/tools-views.js +21 -0
- package/dist/ui/views/tools-views.js.map +1 -1
- package/package.json +32 -32
- package/dist/bootstrap/authored-tool-admission.d.ts +0 -23
- package/dist/bootstrap/authored-tool-admission.d.ts.map +0 -1
- package/dist/bootstrap/authored-tool-admission.js +0 -54
- package/dist/bootstrap/authored-tool-admission.js.map +0 -1
- package/dist/bootstrap/egress-plane.d.ts +0 -22
- package/dist/bootstrap/egress-plane.d.ts.map +0 -1
- package/dist/bootstrap/egress-plane.js +0 -37
- package/dist/bootstrap/egress-plane.js.map +0 -1
- package/dist/bootstrap/installed-tool-admission.d.ts +0 -20
- package/dist/bootstrap/installed-tool-admission.d.ts.map +0 -1
- package/dist/bootstrap/installed-tool-admission.js +0 -60
- package/dist/bootstrap/installed-tool-admission.js.map +0 -1
- package/dist/bootstrap/live-plane.d.ts +0 -51
- package/dist/bootstrap/live-plane.d.ts.map +0 -1
- package/dist/bootstrap/live-plane.js +0 -72
- package/dist/bootstrap/live-plane.js.map +0 -1
- package/dist/bootstrap/register-tools-bundled.d.ts +0 -28
- package/dist/bootstrap/register-tools-bundled.d.ts.map +0 -1
- package/dist/bootstrap/register-tools-bundled.js +0 -107
- package/dist/bootstrap/register-tools-bundled.js.map +0 -1
- package/dist/bootstrap/register-tools-shared.d.ts +0 -40
- package/dist/bootstrap/register-tools-shared.d.ts.map +0 -1
- package/dist/bootstrap/register-tools-shared.js +0 -98
- package/dist/bootstrap/register-tools-shared.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-and-capabilities.js","sourceRoot":"","sources":["../../src/bootstrap/config-and-capabilities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config-and-capabilities.js","sourceRoot":"","sources":["../../src/bootstrap/config-and-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,0CAA0C,EAC1C,sBAAsB,EACtB,aAAa,EACb,sBAAsB,GAGvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,kBAAkB,EAClB,MAAM,EACN,mBAAmB,EACnB,gBAAgB,EAIhB,qCAAqC,GACtC,MAAM,mBAAmB,CAAC;AAE3B,uEAAuE;AACvE,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED;;;;;;GAMG;AACH,SAAS,mBAAmB,CAAC,KAAmB;IAC9C,MAAM,YAAY,GAA4B,EAAE,CAAC;IACjD,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;QAC7C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,YAAY,CAAC,IAAI,CAAC,MAA+B,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,kBAAkB,CACzB,IAAqD,EACrD,GAAuB,EACvB,IAAwC;I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IACd,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,oBAAoB,CAAC;QAC/D,IAAI,UAAU,KAAK,SAAS;YAAE,SAAS;QACvC,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YAC/D,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACjC,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/bootstrap/constants.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/bootstrap/constants.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* decorate-tool-primary — the host-owned decorator the mount layer applies to
|
|
3
|
+
* EVERY tool's PRIMARY command (the flat, no-`parent` spec whose name matches
|
|
4
|
+
* `tool.metadata.name`: `fit`, `graph`, `sim`, and any third-party tool's run
|
|
5
|
+
* verb).
|
|
6
|
+
*
|
|
7
|
+
* The decorator is the single place the host GUARANTEES a uniform primary-command
|
|
8
|
+
* surface, so a tool need not opt in per spec:
|
|
9
|
+
*
|
|
10
|
+
* 1. `--version` — prints the TOOL's own version (`<name> <version>`, plus a
|
|
11
|
+
* `(tool contract v<n>)` marker when the Tool declares `contractVersion`).
|
|
12
|
+
* This is distinct from `opensip --version` (the CLI version, owned at the
|
|
13
|
+
* composition root). Implemented via Commander's `.version()` on the primary
|
|
14
|
+
* command — the root no longer registers a Commander version option (it is
|
|
15
|
+
* handled by a host argv pre-scan), so the subcommand-local `--version` no
|
|
16
|
+
* longer collides with an inherited global one.
|
|
17
|
+
* 2. The baseline common flags `--cwd` / `--json` / `--config` are present on
|
|
18
|
+
* every primary regardless of what the tool declared in `commonFlags`.
|
|
19
|
+
* 3. `--quiet` / `--verbose` are present on every primary.
|
|
20
|
+
*
|
|
21
|
+
* The decorator is IDEMPOTENT: a flag the tool already declared (via its
|
|
22
|
+
* `commonFlags` or a hand-rolled `OptionSpec` — e.g. fit already ships `--config`,
|
|
23
|
+
* and all three primaries already opt into `--cwd`/`--json`/`--quiet`/`--verbose`)
|
|
24
|
+
* is left untouched, so Commander never sees a duplicate-option registration. The
|
|
25
|
+
* decorator only ADDS what is missing (in practice `--config` for graph/sim).
|
|
26
|
+
*
|
|
27
|
+
* This lives in the mount path (called from `mountOneTool`) rather than being
|
|
28
|
+
* re-declared per tool — there is no per-tool special case here; the same
|
|
29
|
+
* decoration runs for bundled and discovered tools alike.
|
|
30
|
+
*/
|
|
31
|
+
import { type CliProgram } from '@opensip-cli/contracts';
|
|
32
|
+
import { type Tool } from '@opensip-cli/core';
|
|
33
|
+
/**
|
|
34
|
+
* Build the tool's `--version` payload: `<name> <version>`, with a
|
|
35
|
+
* `(tool contract v<n>)` suffix only when the Tool declares `contractVersion`
|
|
36
|
+
* (none of the bundled tools do today — they version their tool-specific surface
|
|
37
|
+
* via `extensionPoints` — so the suffix is reserved for tools that opt in).
|
|
38
|
+
*/
|
|
39
|
+
export declare function toolVersionString(tool: Tool): string;
|
|
40
|
+
/**
|
|
41
|
+
* Decorate a tool's PRIMARY command with the host-guaranteed uniform surface
|
|
42
|
+
* (see the module header). Idempotent w.r.t. flags the tool already declared.
|
|
43
|
+
*
|
|
44
|
+
* @param primaryCmd The mounted Commander command for the tool's primary spec
|
|
45
|
+
* (the flat spec whose name === `tool.metadata.name`).
|
|
46
|
+
* @param tool The tool being mounted — read for `metadata.version` /
|
|
47
|
+
* `metadata.name` / `contractVersion`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function decorateToolPrimary(primaryCmd: CliProgram, tool: Tool): void;
|
|
50
|
+
//# sourceMappingURL=decorate-tool-primary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorate-tool-primary.d.ts","sourceRoot":"","sources":["../../src/bootstrap/decorate-tool-primary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAqC9C;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAKpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CA0B5E"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* decorate-tool-primary — the host-owned decorator the mount layer applies to
|
|
3
|
+
* EVERY tool's PRIMARY command (the flat, no-`parent` spec whose name matches
|
|
4
|
+
* `tool.metadata.name`: `fit`, `graph`, `sim`, and any third-party tool's run
|
|
5
|
+
* verb).
|
|
6
|
+
*
|
|
7
|
+
* The decorator is the single place the host GUARANTEES a uniform primary-command
|
|
8
|
+
* surface, so a tool need not opt in per spec:
|
|
9
|
+
*
|
|
10
|
+
* 1. `--version` — prints the TOOL's own version (`<name> <version>`, plus a
|
|
11
|
+
* `(tool contract v<n>)` marker when the Tool declares `contractVersion`).
|
|
12
|
+
* This is distinct from `opensip --version` (the CLI version, owned at the
|
|
13
|
+
* composition root). Implemented via Commander's `.version()` on the primary
|
|
14
|
+
* command — the root no longer registers a Commander version option (it is
|
|
15
|
+
* handled by a host argv pre-scan), so the subcommand-local `--version` no
|
|
16
|
+
* longer collides with an inherited global one.
|
|
17
|
+
* 2. The baseline common flags `--cwd` / `--json` / `--config` are present on
|
|
18
|
+
* every primary regardless of what the tool declared in `commonFlags`.
|
|
19
|
+
* 3. `--quiet` / `--verbose` are present on every primary.
|
|
20
|
+
*
|
|
21
|
+
* The decorator is IDEMPOTENT: a flag the tool already declared (via its
|
|
22
|
+
* `commonFlags` or a hand-rolled `OptionSpec` — e.g. fit already ships `--config`,
|
|
23
|
+
* and all three primaries already opt into `--cwd`/`--json`/`--quiet`/`--verbose`)
|
|
24
|
+
* is left untouched, so Commander never sees a duplicate-option registration. The
|
|
25
|
+
* decorator only ADDS what is missing (in practice `--config` for graph/sim).
|
|
26
|
+
*
|
|
27
|
+
* This lives in the mount path (called from `mountOneTool`) rather than being
|
|
28
|
+
* re-declared per tool — there is no per-tool special case here; the same
|
|
29
|
+
* decoration runs for bundled and discovered tools alike.
|
|
30
|
+
*/
|
|
31
|
+
import { applyCommonFlags, commonFlags, } from '@opensip-cli/contracts';
|
|
32
|
+
import { CONFIG_FLAG } from '../commands/host-config-flag.js';
|
|
33
|
+
/**
|
|
34
|
+
* The host-guaranteed baseline COMMON flags on every tool primary (ADR-0021
|
|
35
|
+
* registry keys). `cwd` / `json` are the always-on machine-output + targeting
|
|
36
|
+
* pair; `quiet` / `verbose` are the uniform verbosity pair. `--config` is added
|
|
37
|
+
* separately (it is a host flag, not an ADR-0021 registry entry).
|
|
38
|
+
*/
|
|
39
|
+
const GUARANTEED_COMMON_FLAG_KEYS = ['cwd', 'json', 'quiet', 'verbose'];
|
|
40
|
+
/**
|
|
41
|
+
* Each guaranteed common flag paired with its registry `--long` form, resolved
|
|
42
|
+
* ONCE at module load. Precomputing keeps the per-decoration filter a plain
|
|
43
|
+
* `.long` read (no `commonFlags[key]` index access in the hot path).
|
|
44
|
+
*/
|
|
45
|
+
const GUARANTEED_COMMON_FLAGS = GUARANTEED_COMMON_FLAG_KEYS.map((key) => {
|
|
46
|
+
// Destructure the registry value into a local before reading `.flags` — the
|
|
47
|
+
// key is a static `CommonFlagKey`, so the registry entry is always present.
|
|
48
|
+
const { flags } = commonFlags[key];
|
|
49
|
+
return { key, long: longFlagOf(flags) };
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Read the set of long-flag strings (`--foo`) a Commander command already has, so
|
|
53
|
+
* the decorator can add only what is missing and never double-register a flag.
|
|
54
|
+
*/
|
|
55
|
+
function existingLongFlags(cmd) {
|
|
56
|
+
const longs = new Set();
|
|
57
|
+
for (const option of cmd.options) {
|
|
58
|
+
if (option.long !== undefined && option.long !== null)
|
|
59
|
+
longs.add(option.long);
|
|
60
|
+
}
|
|
61
|
+
return longs;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Build the tool's `--version` payload: `<name> <version>`, with a
|
|
65
|
+
* `(tool contract v<n>)` suffix only when the Tool declares `contractVersion`
|
|
66
|
+
* (none of the bundled tools do today — they version their tool-specific surface
|
|
67
|
+
* via `extensionPoints` — so the suffix is reserved for tools that opt in).
|
|
68
|
+
*/
|
|
69
|
+
export function toolVersionString(tool) {
|
|
70
|
+
const base = `${tool.metadata.name} ${tool.metadata.version}`;
|
|
71
|
+
return tool.contractVersion === undefined
|
|
72
|
+
? base
|
|
73
|
+
: `${base} (tool contract v${tool.contractVersion})`;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Decorate a tool's PRIMARY command with the host-guaranteed uniform surface
|
|
77
|
+
* (see the module header). Idempotent w.r.t. flags the tool already declared.
|
|
78
|
+
*
|
|
79
|
+
* @param primaryCmd The mounted Commander command for the tool's primary spec
|
|
80
|
+
* (the flat spec whose name === `tool.metadata.name`).
|
|
81
|
+
* @param tool The tool being mounted — read for `metadata.version` /
|
|
82
|
+
* `metadata.name` / `contractVersion`.
|
|
83
|
+
*/
|
|
84
|
+
export function decorateToolPrimary(primaryCmd, tool) {
|
|
85
|
+
const present = existingLongFlags(primaryCmd);
|
|
86
|
+
// (1) Per-tool --version. The root no longer owns a Commander version option,
|
|
87
|
+
// so this subcommand-local --version is the one Commander resolves for
|
|
88
|
+
// `opensip <tool> --version`. Skip if the tool already declared a `--version`
|
|
89
|
+
// (defense in depth — no first-party tool does).
|
|
90
|
+
if (!present.has('--version')) {
|
|
91
|
+
primaryCmd.version(toolVersionString(tool), '--version', "Print this tool's version");
|
|
92
|
+
}
|
|
93
|
+
// (2) Guaranteed baseline common flags (--cwd/--json/--quiet/--verbose), added
|
|
94
|
+
// only when missing. `cwd` seeds process.cwd() to match the mounter's default.
|
|
95
|
+
const missingCommon = GUARANTEED_COMMON_FLAGS.filter((f) => !present.has(f.long)).map((f) => f.key);
|
|
96
|
+
if (missingCommon.length > 0) {
|
|
97
|
+
const seedsCwd = missingCommon.includes('cwd');
|
|
98
|
+
applyCommonFlags(primaryCmd, missingCommon, seedsCwd ? { cwd: process.cwd() } : undefined);
|
|
99
|
+
}
|
|
100
|
+
// (3) Guaranteed --config (host flag read by the pre-action hook as
|
|
101
|
+
// `opts.config`), added only when missing — fit already declares it.
|
|
102
|
+
if (!present.has('--config')) {
|
|
103
|
+
primaryCmd.option(CONFIG_FLAG.flags, CONFIG_FLAG.description);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** Extract the `--long` form from a Commander flag string (`-q, --quiet` → `--quiet`). */
|
|
107
|
+
function longFlagOf(flags) {
|
|
108
|
+
const match = /--[a-z][a-z-]*/.exec(flags);
|
|
109
|
+
return match ? match[0] : flags;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=decorate-tool-primary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorate-tool-primary.js","sourceRoot":"","sources":["../../src/bootstrap/decorate-tool-primary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA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C,KAAK,CAAC;AAClC,CAAC"}
|
|
@@ -27,6 +27,7 @@ export interface PostBailoutBootstrapDeps {
|
|
|
27
27
|
readonly createRunLogger?: typeof createRunLogger;
|
|
28
28
|
readonly buildPerRunScope?: typeof buildPerRunScope;
|
|
29
29
|
readonly enterScope?: typeof enterScope;
|
|
30
|
+
readonly isScopeEntered?: () => boolean;
|
|
30
31
|
readonly checkForUpdate?: typeof checkForUpdate;
|
|
31
32
|
readonly startProfiling?: typeof startProfiling;
|
|
32
33
|
readonly maybeInitializeOwningTool?: typeof maybeInitializeOwningTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-post-bailout-bootstrap.d.ts","sourceRoot":"","sources":["../../src/bootstrap/execute-post-bailout-bootstrap.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,OAAO,EACL,eAAe,EAEf,UAAU,EAGV,KAAK,MAAM,EACX,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAmB,MAAM,uBAAuB,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAGrF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAShE,qDAAqD;AACrD,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEpD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,OA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M,CAAC;CAC5B;AA2BD;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,yBAAyB,EAChC,IAAI,GAAE,wBAA6B,GAClC,OAAO,CAAC,0BAA0B,CAAC,CA4GrC"}
|
|
@@ -22,6 +22,7 @@ const defaultDeps = {
|
|
|
22
22
|
createRunLogger,
|
|
23
23
|
buildPerRunScope,
|
|
24
24
|
enterScope,
|
|
25
|
+
isScopeEntered: () => currentScope() !== undefined,
|
|
25
26
|
checkForUpdate,
|
|
26
27
|
startProfiling,
|
|
27
28
|
maybeInitializeOwningTool,
|
|
@@ -45,10 +46,20 @@ export async function executePostBailoutBootstrap(input, deps = {}) {
|
|
|
45
46
|
process.stderr.write(formatUpdateNag(version, update));
|
|
46
47
|
}
|
|
47
48
|
record(PRE_ACTION_PHASES.buildScope);
|
|
49
|
+
// B2 / GAP e: parentCommand is the FIRST segment of the invoked command path
|
|
50
|
+
// (e.g. `graph`, `fit`) — NOT a child's own `graph-shard-worker`. toolName is
|
|
51
|
+
// the owning tool id of the dispatched command (resolved by the same
|
|
52
|
+
// owning-tool resolution the preflight uses); fall back to parentCommand when
|
|
53
|
+
// the command belongs to no tool (CLI-only commands have a 1:1 name).
|
|
54
|
+
const parentCommand = plan.commandPath.split(' ')[0] ?? plan.commandName;
|
|
55
|
+
const owningTool = d.resolveOwningTool(tools, plan.commandName);
|
|
56
|
+
const toolName = owningTool?.metadata.id ?? parentCommand;
|
|
48
57
|
const scope = d.buildPerRunScope({
|
|
49
58
|
project: plan.project,
|
|
50
59
|
runId: plan.runId,
|
|
51
60
|
cwd: plan.cwd,
|
|
61
|
+
parentCommand,
|
|
62
|
+
toolName,
|
|
52
63
|
cliDefaults: plan.cliDefaults,
|
|
53
64
|
registries: { languages, tools },
|
|
54
65
|
manifests,
|
|
@@ -60,7 +71,7 @@ export async function executePostBailoutBootstrap(input, deps = {}) {
|
|
|
60
71
|
});
|
|
61
72
|
record(PRE_ACTION_PHASES.enterScope);
|
|
62
73
|
d.enterScope(scope); // resilience-ok: Commander postAction in pre-action-hook.ts disposes the entered RunScope after the action completes.
|
|
63
|
-
if (!
|
|
74
|
+
if (!d.isScopeEntered()) {
|
|
64
75
|
throw new SystemError('Scope was not entered before command dispatch', {
|
|
65
76
|
code: 'SYSTEM.SCOPE.NOT_ENTERED',
|
|
66
77
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-post-bailout-bootstrap.js","sourceRoot":"","sources":["../../src/bootstrap/execute-post-bailout-bootstrap.ts"],"names":[],"mappings":"AAAA,qLAAqL;AACrL;;;;;;GAMG;AAEH,OAAO,EACL,eAAe,EACf,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,WAAW,GAGZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAKrE,MAAM,UAAU,GAAG,eAAe,CAAC;AACnC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAEvC,SAAS,eAAe;IACtB,gEAAgE;AAClE,CAAC;
|
|
1
|
+
{"version":3,"file":"execute-post-bailout-bootstrap.js","sourceRoot":"","sources":["../../src/bootstrap/execute-post-bailout-bootstrap.ts"],"names":[],"mappings":"AAAA,qLAAqL;AACrL;;;;;;GAMG;AAEH,OAAO,EACL,eAAe,EACf,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,WAAW,GAGZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC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AAE,IAAI,CAAC,OAAO,CAAC,WAAW;YACrC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;SAChC,CAAC,CAAC;IACL,CAAC;IAED,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAE1C,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAExC,MAAM,CAAC,CAAC,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAEvE,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,0BAA0B,CAAC;QAChD,UAAU,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC;QACxD,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW;QACpC,aAAa,EAAE,KAAK,CAAC,cAAc,EAAE,OAAO,IAAI,EAAE;KACnD,CAAC,CAAC;IACH,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QACf,KAAK,CAAC,WAAW,CAAC,KAAK,CACrB,MAAM,EACN,OAAO,EACP,SAAS,MAAM,CAAC,MAAM,CAAC,oHAAoH,CAC5I,CAAC;QACF,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
import { type LanguageRegistry, type ToolPluginManifest, type ToolProvenance, type ToolRegistry } from '@opensip-cli/core';
|
|
15
15
|
export { mountAllToolCommands, EXPECTED_SCAFFOLDING_TOOL_IDS } from './register-tools.js';
|
|
16
16
|
export { admitToolPackage, importToolRuntime, type AdmissionReport, type AdmissionSection, type AdmissionSectionResult, type AdmitToolPackageOptions, } from './admit-tool-package.js';
|
|
17
|
-
export { mountToolCommands } from './tool-lifecycle.js';
|
|
18
17
|
export { renderResult } from './render.js';
|
|
19
18
|
export { maybeOpenReport } from './report.js';
|
|
20
19
|
export { installPreActionHook } from './pre-action-hook.js';
|
|
21
20
|
export { buildCommandRegistrationInput } from './build-command-registration-input.js';
|
|
22
21
|
export { buildHostPlanes } from './host-planes.js';
|
|
22
|
+
export { isRootVersionRequest } from './root-version.js';
|
|
23
23
|
export interface BootstrapOptions {
|
|
24
24
|
readonly langRegistry: LanguageRegistry;
|
|
25
25
|
readonly toolRegistry: ToolRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bootstrap/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bootstrap/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAe3B,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAI1F,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,YAAY,EAAE,gBAAgB,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAyEnF;AAED,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,cAAc,EAAE,CAAC;IAC/C;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,kBAAkB,EAAE,CAAC;CACnD"}
|
package/dist/bootstrap/index.js
CHANGED
|
@@ -18,20 +18,17 @@ import { initTelemetry } from '../telemetry/sdk-init.js';
|
|
|
18
18
|
import { registerLanguageAdapters } from './register-language-adapters.js';
|
|
19
19
|
import { BUNDLED_TOOL_PACKAGES, registerFirstPartyTools, discoverAndRegisterToolPackages, discoverAndRegisterAuthoredTools, buildToolDiscoverySources, } from './register-tools.js';
|
|
20
20
|
// Re-export only the symbols the CLI composition root (`index.ts`) consumes.
|
|
21
|
-
// `mountToolCommands` is the named step-8 seam of the tool lifecycle (release
|
|
22
|
-
// launch, §5.4); it delegates to `mountAllToolCommands` (kept exported for the
|
|
23
|
-
// existing direct unit tests).
|
|
24
21
|
export { mountAllToolCommands, EXPECTED_SCAFFOLDING_TOOL_IDS } from './register-tools.js';
|
|
25
22
|
// The shared admission callable (ADR-0041: one validator, four consumers) —
|
|
26
23
|
// consumed by the tools command group (validate/install) and the
|
|
27
24
|
// admission-parity / bundled-conformance tests.
|
|
28
25
|
export { admitToolPackage, importToolRuntime, } from './admit-tool-package.js';
|
|
29
|
-
export { mountToolCommands } from './tool-lifecycle.js';
|
|
30
26
|
export { renderResult } from './render.js';
|
|
31
27
|
export { maybeOpenReport } from './report.js';
|
|
32
28
|
export { installPreActionHook } from './pre-action-hook.js';
|
|
33
29
|
export { buildCommandRegistrationInput } from './build-command-registration-input.js';
|
|
34
30
|
export { buildHostPlanes } from './host-planes.js';
|
|
31
|
+
export { isRootVersionRequest } from './root-version.js';
|
|
35
32
|
/**
|
|
36
33
|
* One-shot bootstrap: register language adapters, register the first-
|
|
37
34
|
* party tools, and discover-and-register every third-party tool +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bootstrap/index.ts"],"names":[],"mappings":"AAAA,wOAAwO;AACxO;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,GAKjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,+BAA+B,EAC/B,gCAAgC,EAChC,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,6EAA6E;AAC7E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bootstrap/index.ts"],"names":[],"mappings":"AAAA,wOAAwO;AACxO;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,GAKjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,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QACjF,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,sEAAsE;QACtE,6DAA6D;IAC/D,CAAC;IACD,MAAM,gCAAgC,CACpC,IAAI,CAAC,YAAY,EACjB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAC3D,UAAU,EACV,UAAU,EACV,SAAS,CACV,CAAC;IACF,2EAA2E;IAC3E,4EAA4E;IAC5E,uEAAuE;IACvE,wDAAwD;IACxD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* io-plane — the host's interactive + effectful I/O plane
|
|
3
|
+
* (host-owned-run-timing Phase 6 §6.1).
|
|
4
|
+
*
|
|
5
|
+
* Merges the former egress plane (cloud sync, SARIF file sink) and live-view
|
|
6
|
+
* plane (registerLiveView, renderLive) into one module — both concerns are
|
|
7
|
+
* effectful host I/O that tools reach only through documented ToolCliContext
|
|
8
|
+
* seams.
|
|
9
|
+
*/
|
|
10
|
+
import { type LiveViewContext, type LiveViewRenderer, type Logger, type ToolCliContext, type ToolRunCompletion, type ToolRunSessions } from '@opensip-cli/core';
|
|
11
|
+
import type { RunPlaneFactory } from './run-plane.js';
|
|
12
|
+
/** Stable dependencies the egress plane captures. */
|
|
13
|
+
export interface EgressPlaneDeps {
|
|
14
|
+
/** The single exit-code write path (from the output plane) — threaded into delivery. */
|
|
15
|
+
readonly setExitCode: (code: number) => void;
|
|
16
|
+
readonly logger?: Logger;
|
|
17
|
+
}
|
|
18
|
+
/** The egress plane's public surface (the two `ToolCliContext` egress seams). */
|
|
19
|
+
export type EgressPlane = Pick<ToolCliContext, 'deliverSignals' | 'writeSarif'>;
|
|
20
|
+
export declare function createEgressPlane(deps: EgressPlaneDeps): EgressPlane;
|
|
21
|
+
export interface LiveViewRegistry {
|
|
22
|
+
readonly register: (key: string, renderer: LiveViewRenderer) => void;
|
|
23
|
+
readonly render: (key: string, args: unknown, liveContext?: LiveViewContext) => Promise<ToolRunCompletion | void>;
|
|
24
|
+
readonly has: (key: string) => boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare function createLiveViewRegistry(log?: Logger): LiveViewRegistry;
|
|
27
|
+
/** Stable dependencies the live plane binds together. */
|
|
28
|
+
export interface LivePlaneDeps {
|
|
29
|
+
readonly liveViews: LiveViewRegistry;
|
|
30
|
+
readonly runPlane: RunPlaneFactory;
|
|
31
|
+
readonly runSession: ToolRunSessions;
|
|
32
|
+
}
|
|
33
|
+
/** The live plane's public surface (the two `ToolCliContext` live-view seams). */
|
|
34
|
+
export interface LivePlane {
|
|
35
|
+
readonly register: LiveViewRegistry['register'];
|
|
36
|
+
readonly renderLive: (key: string, args: unknown, liveContext?: LiveViewContext) => Promise<ToolRunCompletion | void>;
|
|
37
|
+
}
|
|
38
|
+
export declare function createLivePlane(deps: LivePlaneDeps): LivePlane;
|
|
39
|
+
/** Build both egress and live planes from one dependency bundle. */
|
|
40
|
+
export declare function createIoPlane(deps: {
|
|
41
|
+
readonly setExitCode: (code: number) => void;
|
|
42
|
+
readonly logger?: Logger;
|
|
43
|
+
readonly liveViews: LiveViewRegistry;
|
|
44
|
+
readonly runPlane: RunPlaneFactory;
|
|
45
|
+
readonly runSession: ToolRunSessions;
|
|
46
|
+
}): EgressPlane & LivePlane;
|
|
47
|
+
//# sourceMappingURL=io-plane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"io-plane.d.ts","sourceRoot":"","sources":["../../src/bootstrap/io-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,C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C;CACxC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,CAU9D;AAED,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;CACtC,GAAG,WAAW,GAAG,SAAS,CAS1B"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* io-plane — the host's interactive + effectful I/O plane
|
|
3
|
+
* (host-owned-run-timing Phase 6 §6.1).
|
|
4
|
+
*
|
|
5
|
+
* Merges the former egress plane (cloud sync, SARIF file sink) and live-view
|
|
6
|
+
* plane (registerLiveView, renderLive) into one module — both concerns are
|
|
7
|
+
* effectful host I/O that tools reach only through documented ToolCliContext
|
|
8
|
+
* seams.
|
|
9
|
+
*/
|
|
10
|
+
import { UnknownLiveViewError, logger as defaultLogger, } from '@opensip-cli/core';
|
|
11
|
+
import { deliverEnvelope, writeEnvelopeSarif } from './deliver-envelope.js';
|
|
12
|
+
export function createEgressPlane(deps) {
|
|
13
|
+
const log = deps.logger ?? defaultLogger;
|
|
14
|
+
return {
|
|
15
|
+
deliverSignals: (envelope, deliverOpts) => deliverEnvelope(envelope, {
|
|
16
|
+
cwd: deliverOpts.cwd,
|
|
17
|
+
reportTo: deliverOpts.reportTo,
|
|
18
|
+
apiKey: deliverOpts.apiKey,
|
|
19
|
+
runFailed: deliverOpts.runFailed,
|
|
20
|
+
setExitCode: deps.setExitCode,
|
|
21
|
+
logger: log,
|
|
22
|
+
}),
|
|
23
|
+
writeSarif: (envelope, path) => writeEnvelopeSarif(envelope, path),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export function createLiveViewRegistry(log = defaultLogger) {
|
|
27
|
+
const renderers = new Map();
|
|
28
|
+
return {
|
|
29
|
+
register(key, renderer) {
|
|
30
|
+
if (renderers.has(key)) {
|
|
31
|
+
log.warn({
|
|
32
|
+
evt: 'cli.live_view.duplicate',
|
|
33
|
+
module: 'cli:bootstrap',
|
|
34
|
+
key,
|
|
35
|
+
msg: `Duplicate live-view registration for key '${key}' — first registration wins.`,
|
|
36
|
+
});
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
renderers.set(key, renderer);
|
|
40
|
+
},
|
|
41
|
+
/** @throws {UnknownLiveViewError} When no renderer was registered for `key`. */
|
|
42
|
+
async render(key, args, liveContext) {
|
|
43
|
+
const renderer = renderers.get(key);
|
|
44
|
+
if (!renderer) {
|
|
45
|
+
throw new UnknownLiveViewError(key);
|
|
46
|
+
}
|
|
47
|
+
return renderer(args, liveContext);
|
|
48
|
+
},
|
|
49
|
+
has(key) {
|
|
50
|
+
return renderers.has(key);
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export function createLivePlane(deps) {
|
|
55
|
+
return {
|
|
56
|
+
register: deps.liveViews.register,
|
|
57
|
+
renderLive: (key, args, liveContext) => deps.runPlane
|
|
58
|
+
.current()
|
|
59
|
+
.completeLiveRender(() => deps.liveViews.render(key, args, liveContext ?? { runSession: deps.runSession })),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** Build both egress and live planes from one dependency bundle. */
|
|
63
|
+
export function createIoPlane(deps) {
|
|
64
|
+
return {
|
|
65
|
+
...createEgressPlane({ setExitCode: deps.setExitCode, logger: deps.logger }),
|
|
66
|
+
...createLivePlane({
|
|
67
|
+
liveViews: deps.liveViews,
|
|
68
|
+
runPlane: deps.runPlane,
|
|
69
|
+
runSession: deps.runSession,
|
|
70
|
+
}),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=io-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
|
|
|
1
|
-
{"version":3,"file":"load-tool-capabilities.d.ts","sourceRoot":"","sources":["../../src/bootstrap/load-tool-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,
|
|
1
|
+
{"version":3,"file":"load-tool-capabilities.d.ts","sourceRoot":"","sources":["../../src/bootstrap/load-tool-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,mBAAmB,CAAC;AAe3B,sDAAsD;AACtD,MAAM,WAAW,iCAAiC;IAChD,4GAA4G;IAC5G,QAAQ,CAAC,UAAU,EAAE,IAAI,GAAG,SAAS,CAAC;IACtC,uEAAuE;IACvE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,4FAA4F;IAC5F,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,uFAAuF;IACvF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;GASG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,MAAM,CAAC,CA0BjB"}
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
import { dirname } from 'node:path';
|
|
20
20
|
import { fileURLToPath } from 'node:url';
|
|
21
21
|
import { resolveCapabilityPreferences } from '@opensip-cli/config';
|
|
22
|
-
import { currentCapabilityRegistry, loadCapabilityDomain } from '@opensip-cli/core';
|
|
22
|
+
import { currentCapabilityRegistry, loadCapabilityDomain, } from '@opensip-cli/core';
|
|
23
|
+
import { BUNDLED_CAPABILITY_PACKS } from './bundled-manifest.js';
|
|
23
24
|
/**
|
|
24
25
|
* Resolve the directory the CLI was installed into. BUILT-IN capability packs
|
|
25
26
|
* (the bundled `@opensip-cli/*` check packs + graph adapters, declared as CLI
|
|
@@ -57,10 +58,25 @@ export async function loadOwningToolCapabilities(options) {
|
|
|
57
58
|
for (const domain of ownedDomains) {
|
|
58
59
|
if (domain.discovery === undefined)
|
|
59
60
|
continue;
|
|
60
|
-
const preferences = resolveCapabilityPreferences(domain.discovery, pluginsConfig);
|
|
61
|
+
const preferences = augmentBundledCapabilityPreferences(domain.discovery, resolveCapabilityPreferences(domain.discovery, pluginsConfig));
|
|
61
62
|
await loadCapabilityDomain({ registry, domainId: domain.id, projectDir, cliDir, preferences });
|
|
62
63
|
driven++;
|
|
63
64
|
}
|
|
64
65
|
return driven;
|
|
65
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Seed manifest-declared built-in packs when config did not supply an explicit
|
|
69
|
+
* package list. Domains with `explicitListMode: 'augment'` still auto-discover
|
|
70
|
+
* project-local packs on top of this list.
|
|
71
|
+
*/
|
|
72
|
+
function augmentBundledCapabilityPreferences(descriptor, preferences) {
|
|
73
|
+
if (preferences.packages !== undefined)
|
|
74
|
+
return preferences;
|
|
75
|
+
if (descriptor.discovery.mode !== 'marker')
|
|
76
|
+
return preferences;
|
|
77
|
+
const bundled = BUNDLED_CAPABILITY_PACKS[descriptor.discovery.markerKind];
|
|
78
|
+
if (bundled === undefined || bundled.length === 0)
|
|
79
|
+
return preferences;
|
|
80
|
+
return { ...preferences, packages: [...bundled] };
|
|
81
|
+
}
|
|
66
82
|
//# sourceMappingURL=load-tool-capabilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-tool-capabilities.js","sourceRoot":"","sources":["../../src/bootstrap/load-tool-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,4BAA4B,
|
|
1
|
+
{"version":3,"file":"load-tool-capabilities.js","sourceRoot":"","sources":["../../src/bootstrap/load-tool-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;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AS,EAAE,aAAa,CAAC,CAC9D,CAAC;QACF,MAAM,oBAAoB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;QAC/F,MAAM,EAAE,CAAC;IACX,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAS,mCAAmC,CAC1C,UAAyC,EACzC,WAAkC;IAElC,IAAI,WAAW,CAAC,QAAQ,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC;IAC3D,IAAI,UAAU,CAAC,SAAS,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,WAAW,CAAC;IAC/D,MAAM,OAAO,GAAG,wBAAwB,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC1E,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,WAAW,CAAC;IACtE,OAAO,EAAE,GAAG,WAAW,EAAE,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC;AACpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owning-tool-init.d.ts","sourceRoot":"","sources":["../../src/bootstrap/owning-tool-init.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"owning-tool-init.d.ts","sourceRoot":"","sources":["../../src/bootstrap/owning-tool-init.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAIL,KAAK,IAAI,EACT,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAO3B;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAQxF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CA6Bf"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* per-invocation SEQUENCER; the owning-tool resolution + fail-fast init
|
|
7
7
|
* semantics live here as a cohesive unit (see also `tool-lifecycle.ts`).
|
|
8
8
|
*/
|
|
9
|
-
import { logger } from '@opensip-cli/core';
|
|
9
|
+
import { logger, resolveToolCommands, resolveToolHooks, } from '@opensip-cli/core';
|
|
10
10
|
import { BootstrapError } from './bootstrap-error.js';
|
|
11
11
|
import { initializedToolIds } from './process-idempotency.js';
|
|
12
12
|
const MODULE_TAG = 'cli:bootstrap';
|
|
@@ -19,7 +19,7 @@ const MODULE_TAG = 'cli:bootstrap';
|
|
|
19
19
|
export function resolveOwningTool(tools, cmdName) {
|
|
20
20
|
return tools
|
|
21
21
|
.list()
|
|
22
|
-
.find((tool) => tool.
|
|
22
|
+
.find((tool) => resolveToolCommands(tool).some((c) => c.name === cmdName || (c.aliases?.includes(cmdName) ?? false)));
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Lazy, memoized Tool.initialize() (P1a). Resolve the tool owning the
|
|
@@ -37,13 +37,16 @@ export function resolveOwningTool(tools, cmdName) {
|
|
|
37
37
|
*/
|
|
38
38
|
export async function maybeInitializeOwningTool(tools, cmdName, runId) {
|
|
39
39
|
const owningTool = resolveOwningTool(tools, cmdName);
|
|
40
|
-
if (!owningTool
|
|
40
|
+
if (!owningTool)
|
|
41
|
+
return;
|
|
42
|
+
const hooks = resolveToolHooks(owningTool);
|
|
43
|
+
if (!hooks.initialize)
|
|
41
44
|
return;
|
|
42
45
|
const toolHumanId = owningTool.metadata.name ?? owningTool.metadata.id;
|
|
43
46
|
if (initializedToolIds.has(toolHumanId))
|
|
44
47
|
return;
|
|
45
48
|
try {
|
|
46
|
-
await
|
|
49
|
+
await hooks.initialize();
|
|
47
50
|
initializedToolIds.add(toolHumanId);
|
|
48
51
|
}
|
|
49
52
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owning-tool-init.js","sourceRoot":"","sources":["../../src/bootstrap/owning-tool-init.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"owning-tool-init.js","sourceRoot":"","sources":["../../src/bootstrap/owning-tool-init.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,MAAM,EACN,mBAAmB,EACnB,gBAAgB,GAGjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAmB,EAAE,OAAe;IACpE,OAAO,KAAK;SACT,IAAI,EAAE;SACN,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACb,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,CAC5B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,CACrE,CACF,CAAC;AACN,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,KAAmB,EACnB,OAAe,EACf,KAAa;IAEb,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACrD,IAAI,CAAC,UAAU;QAAE,OAAO;IACxB,MAAM,KAAK,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,CAAC,UAAU;QAAE,OAAO;IAC9B,MAAM,WAAW,GAAG,UAAU,CAA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