opensip-cli 0.1.6 → 0.1.8
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.map +1 -1
- package/dist/bootstrap/admit-tool-package.js +8 -3
- 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 +92 -10
- 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.map +1 -1
- package/dist/bootstrap/config-and-capabilities.js +5 -4
- 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.map +1 -1
- package/dist/bootstrap/execute-post-bailout-bootstrap.js +10 -0
- package/dist/bootstrap/execute-post-bailout-bootstrap.js.map +1 -1
- package/dist/bootstrap/index.d.ts +7 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +15 -6
- 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/pre-action-hook.d.ts.map +1 -1
- package/dist/bootstrap/pre-action-hook.js +24 -2
- package/dist/bootstrap/pre-action-hook.js.map +1 -1
- package/dist/bootstrap/register-tools-discovery.d.ts +42 -59
- package/dist/bootstrap/register-tools-discovery.d.ts.map +1 -1
- package/dist/bootstrap/register-tools-discovery.js +175 -97
- 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 +26 -1
- package/dist/bootstrap/scope-access.d.ts.map +1 -1
- package/dist/bootstrap/scope-access.js +38 -1
- package/dist/bootstrap/scope-access.js.map +1 -1
- package/dist/bootstrap/skip-installed-plugins.d.ts +23 -0
- package/dist/bootstrap/skip-installed-plugins.d.ts.map +1 -0
- package/dist/bootstrap/skip-installed-plugins.js +30 -0
- package/dist/bootstrap/skip-installed-plugins.js.map +1 -0
- 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/tool-trust.d.ts +22 -2
- package/dist/bootstrap/tool-trust.d.ts.map +1 -1
- package/dist/bootstrap/tool-trust.js +25 -2
- package/dist/bootstrap/tool-trust.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 +15 -1
- package/dist/commands/command-scope-index.d.ts.map +1 -1
- package/dist/commands/command-scope-index.js +10 -1
- package/dist/commands/command-scope-index.js.map +1 -1
- 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 +45 -19
- 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 +5 -0
- package/dist/commands/mount-command-action.d.ts.map +1 -1
- package/dist/commands/mount-command-action.js +26 -2
- package/dist/commands/mount-command-action.js.map +1 -1
- 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 +9 -1
- 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 +58 -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 +33 -11
- 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/telemetry/command-label.d.ts +19 -0
- package/dist/telemetry/command-label.d.ts.map +1 -0
- package/dist/telemetry/command-label.js +26 -0
- package/dist/telemetry/command-label.js.map +1 -0
- package/dist/telemetry/sdk-init.d.ts +9 -0
- package/dist/telemetry/sdk-init.d.ts.map +1 -1
- package/dist/telemetry/sdk-init.js +32 -0
- package/dist/telemetry/sdk-init.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 +29 -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":"misc-views.js","sourceRoot":"","sources":["../../../src/ui/views/misc-views.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,IAAI,EACJ,KAAK,EACL,SAAS,GAKV,MAAM,qBAAqB,CAAC;AAc7B,MAAM,MAAM,GAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5C,MAAM,SAAS,GAAa,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;AAClD,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAE3C,6EAA6E;AAE7E,MAAM,UAAU,cAAc,CAAC,MAAwB;IACrD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAgD,CAAC;IAC1E,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QAC/D,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACpC,IAAI,QAAQ;gBAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;gBAC9B,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IACD,MAAM,UAAU,GAAG,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnF,MAAM,QAAQ,GAAe;QAC3B,I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AC1D,CAAC,CAAC,qDAAqD,CAAC;IAC5D,OAAO,KAAK,CACV;QACE,IAAI,CAAC;YACH,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9B,EAAE,IAAI,EAAE,YAAY,KAAK,UAAU,MAAM,GAAG,EAAE;YAC9C,EAAE,IAAI,EAAE,IAAI,QAAQ,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE;SACrC,CAAC;QACF,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;KACzC,EACD,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* without executing any tool runtime code.
|
|
4
4
|
*/
|
|
5
5
|
import { type ViewNode } from '@opensip-cli/cli-ui';
|
|
6
|
-
import type { ToolsDataPurgeResult, ToolsInstallResult, ToolsListResult, ToolsUninstallResult, ToolsValidateResult } from '@opensip-cli/contracts';
|
|
6
|
+
import type { ToolsCreateResult, ToolsDataPurgeResult, ToolsInstallResult, ToolsListResult, ToolsUninstallResult, ToolsValidateResult } from '@opensip-cli/contracts';
|
|
7
|
+
export declare function viewToolsCreate(result: ToolsCreateResult): ViewNode;
|
|
7
8
|
export declare function viewToolsList(result: ToolsListResult): ViewNode;
|
|
8
9
|
export declare function viewToolsValidate(result: ToolsValidateResult): ViewNode;
|
|
9
10
|
export declare function viewToolsInstall(result: ToolsInstallResult): ViewNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools-views.d.ts","sourceRoot":"","sources":["../../../src/ui/views/tools-views.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAOL,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EAEf,oBAAoB,EACpB,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAuFhC,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,QAAQ,CAY/D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,QAAQ,CAEvE;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,kBAAkB,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"tools-views.d.ts","sourceRoot":"","sources":["../../../src/ui/views/tools-views.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAOL,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EAEf,oBAAoB,EACpB,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAuFhC,wBAAgB,eAAe,CAAC,MAAM,EAAE,iBAAiB,GAAG,QAAQ,CAuBnE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,QAAQ,CAY/D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,QAAQ,CAEvE;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,kBAAkB,GAAG,QAAQ,CAyBrE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,oBAAoB,GAAG,QAAQ,CAuBzE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,oBAAoB,GAAG,QAAQ,CAiBzE"}
|
|
@@ -80,6 +80,27 @@ function validationView(result, title = 'Tool validation') {
|
|
|
80
80
|
];
|
|
81
81
|
return group(children, 2);
|
|
82
82
|
}
|
|
83
|
+
export function viewToolsCreate(result) {
|
|
84
|
+
if (!result.success) {
|
|
85
|
+
return group([
|
|
86
|
+
line([{ text: '✗', tone: 'error' }, { text: ' Tool scaffold failed' }]),
|
|
87
|
+
line([{ text: result.error ?? 'unknown error', tone: 'error' }]),
|
|
88
|
+
], 2);
|
|
89
|
+
}
|
|
90
|
+
const children = [
|
|
91
|
+
line([
|
|
92
|
+
{ text: '✓', tone: 'success' },
|
|
93
|
+
{ text: ' Scaffolded tool ' },
|
|
94
|
+
{ text: result.toolId, tone: 'brand', bold: true },
|
|
95
|
+
]),
|
|
96
|
+
line([{ text: result.dir, dim: true }]),
|
|
97
|
+
...result.files.map((file) => line([{ text: ` ${file}`, dim: true }])),
|
|
98
|
+
];
|
|
99
|
+
if (result.hint !== undefined) {
|
|
100
|
+
children.push(SPACER, line([{ text: result.hint, tone: 'warning' }]));
|
|
101
|
+
}
|
|
102
|
+
return group(children, 2);
|
|
103
|
+
}
|
|
83
104
|
export function viewToolsList(result) {
|
|
84
105
|
if (result.tools.length === 0) {
|
|
85
106
|
return group([line([{ text: 'No tools found for the selected scope.', dim: true }])], 2);
|
|
@@ -109,6 +130,14 @@ export function viewToolsInstall(result) {
|
|
|
109
130
|
if (result.error !== undefined) {
|
|
110
131
|
children.push(line([{ text: ` ${result.error}`, tone: 'error' }]));
|
|
111
132
|
}
|
|
133
|
+
if (result.success && result.toolId !== undefined) {
|
|
134
|
+
children.push(line([
|
|
135
|
+
{
|
|
136
|
+
text: ` Allow on next run: OPENSIP_CLI_ALLOW_INSTALLED_TOOLS='${result.toolId}'`,
|
|
137
|
+
dim: true,
|
|
138
|
+
},
|
|
139
|
+
]));
|
|
140
|
+
}
|
|
112
141
|
children.push(SPACER, validationView(result.validation, 'Validation'));
|
|
113
142
|
return group(children, 2);
|
|
114
143
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools-views.js","sourceRoot":"","sources":["../../../src/ui/views/tools-views.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,IAAI,EACJ,KAAK,EACL,SAAS,GAKV,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools-views.js","sourceRoot":"","sources":["../../../src/ui/views/tools-views.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,IAAI,EACJ,KAAK,E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AAC;SAC1E,CAAC;KACH,EACD,CAAC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,MAA4B;IAC7D,OAAO,KAAK,CACV;QACE,IAAI,CAAC;YACH,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9B,EAAE,IAAI,EAAE,mBAAmB,EAAE;YAC7B,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;SACvC,CAAC;QACF,IAAI,CAAC;YACH,EAAE,IAAI,EAAE,KAAK,MAAM,CAAC,QAAQ,eAAe,EAAE,GAAG,EAAE,IAAI,EAAE;YACxD,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,eAAe,uBAAuB,EAAE,GAAG,EAAE,IAAI,EAAE;YACrE,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB,EAAE,GAAG,EAAE,IAAI,EAAE;YAC1E,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,SAAS,eAAe,EAAE,GAAG,EAAE,IAAI,EAAE;SACxD,CAAC;KACH,EACD,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opensip-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "OpenSIP CLI — codebase analysis from the command line (the CLI; `npm i -g opensip-cli`)",
|
|
6
6
|
"keywords": [
|
|
@@ -50,36 +50,36 @@
|
|
|
50
50
|
"react": "^19.2.7",
|
|
51
51
|
"update-notifier": "^7.3.1",
|
|
52
52
|
"yaml": "^2.9.0",
|
|
53
|
-
"@opensip-cli/checks-
|
|
54
|
-
"@opensip-cli/checks-
|
|
55
|
-
"@opensip-cli/checks-
|
|
56
|
-
"@opensip-cli/checks-
|
|
57
|
-
"@opensip-cli/checks-universal": "0.1.
|
|
58
|
-
"@opensip-cli/checks-rust": "0.1.
|
|
59
|
-
"@opensip-cli/
|
|
60
|
-
"@opensip-cli/
|
|
61
|
-
"@opensip-cli/config": "0.1.
|
|
62
|
-
"@opensip-cli/contracts": "0.1.
|
|
63
|
-
"@opensip-cli/
|
|
64
|
-
"@opensip-cli/
|
|
65
|
-
"@opensip-cli/fitness": "0.1.
|
|
66
|
-
"@opensip-cli/graph": "0.1.
|
|
67
|
-
"@opensip-cli/
|
|
68
|
-
"@opensip-cli/graph-
|
|
69
|
-
"@opensip-cli/
|
|
70
|
-
"@opensip-cli/graph-
|
|
71
|
-
"@opensip-cli/graph-
|
|
72
|
-
"@opensip-cli/graph-typescript": "0.1.
|
|
73
|
-
"@opensip-cli/lang-go": "0.1.
|
|
74
|
-
"@opensip-cli/lang-
|
|
75
|
-
"@opensip-cli/lang-
|
|
76
|
-
"@opensip-cli/lang-
|
|
77
|
-
"@opensip-cli/lang-
|
|
78
|
-
"@opensip-cli/lang-typescript": "0.1.
|
|
79
|
-
"@opensip-cli/output": "0.1.
|
|
80
|
-
"@opensip-cli/session-store": "0.1.
|
|
81
|
-
"@opensip-cli/
|
|
82
|
-
"@opensip-cli/
|
|
53
|
+
"@opensip-cli/checks-cpp": "0.1.8",
|
|
54
|
+
"@opensip-cli/checks-python": "0.1.8",
|
|
55
|
+
"@opensip-cli/checks-java": "0.1.8",
|
|
56
|
+
"@opensip-cli/checks-go": "0.1.8",
|
|
57
|
+
"@opensip-cli/checks-universal": "0.1.8",
|
|
58
|
+
"@opensip-cli/checks-rust": "0.1.8",
|
|
59
|
+
"@opensip-cli/checks-typescript": "0.1.8",
|
|
60
|
+
"@opensip-cli/cli-ui": "0.1.8",
|
|
61
|
+
"@opensip-cli/config": "0.1.8",
|
|
62
|
+
"@opensip-cli/contracts": "0.1.8",
|
|
63
|
+
"@opensip-cli/dashboard": "0.1.8",
|
|
64
|
+
"@opensip-cli/datastore": "0.1.8",
|
|
65
|
+
"@opensip-cli/fitness": "0.1.8",
|
|
66
|
+
"@opensip-cli/graph-go": "0.1.8",
|
|
67
|
+
"@opensip-cli/graph": "0.1.8",
|
|
68
|
+
"@opensip-cli/graph-java": "0.1.8",
|
|
69
|
+
"@opensip-cli/core": "0.1.8",
|
|
70
|
+
"@opensip-cli/graph-python": "0.1.8",
|
|
71
|
+
"@opensip-cli/graph-rust": "0.1.8",
|
|
72
|
+
"@opensip-cli/graph-typescript": "0.1.8",
|
|
73
|
+
"@opensip-cli/lang-go": "0.1.8",
|
|
74
|
+
"@opensip-cli/lang-cpp": "0.1.8",
|
|
75
|
+
"@opensip-cli/lang-rust": "0.1.8",
|
|
76
|
+
"@opensip-cli/lang-java": "0.1.8",
|
|
77
|
+
"@opensip-cli/lang-python": "0.1.8",
|
|
78
|
+
"@opensip-cli/lang-typescript": "0.1.8",
|
|
79
|
+
"@opensip-cli/output": "0.1.8",
|
|
80
|
+
"@opensip-cli/session-store": "0.1.8",
|
|
81
|
+
"@opensip-cli/targeting": "0.1.8",
|
|
82
|
+
"@opensip-cli/simulation": "0.1.8"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@types/node": "^24.13.2",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"typescript": "~6.0.3",
|
|
90
90
|
"vitest": "^4.1.8",
|
|
91
91
|
"zod": "^4.4.3",
|
|
92
|
-
"@opensip-cli/test-support": "0.1.
|
|
92
|
+
"@opensip-cli/test-support": "0.1.8"
|
|
93
93
|
},
|
|
94
94
|
"scripts": {
|
|
95
95
|
"build": "tsc && node -e \"const {cpSync,mkdirSync}=require('fs');const p='dist/bootstrap';mkdirSync(p,{recursive:true});cpSync('src/bootstrap/bundled-tools.manifest.json',p+'/bundled-tools.manifest.json');\"",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ToolAdmission } from './tool-admission-types.js';
|
|
2
|
-
export type AuthoredAdmission = ToolAdmission;
|
|
3
|
-
/**
|
|
4
|
-
* Admit or reject a PROJECT-LOCAL authored tool under the deny-by-default trust
|
|
5
|
-
* policy. The trust decision always precedes module import; a non-allowlisted
|
|
6
|
-
* tool fails closed before any authored code can run.
|
|
7
|
-
*
|
|
8
|
-
* @throws {PluginIncompatibleError} When the sidecar manifest is missing,
|
|
9
|
-
* malformed, incompatible, or not trusted by the project-tool allowlist.
|
|
10
|
-
*/
|
|
11
|
-
export declare function admitProjectLocalTool(args: {
|
|
12
|
-
readonly dir: string;
|
|
13
|
-
readonly env?: NodeJS.ProcessEnv;
|
|
14
|
-
}): AuthoredAdmission;
|
|
15
|
-
/**
|
|
16
|
-
* Admit a USER-GLOBAL authored tool — trusted-by-default because the user placed
|
|
17
|
-
* it in their own home-dir tool host, but still fail-closed on a missing or
|
|
18
|
-
* incompatible manifest.
|
|
19
|
-
*/
|
|
20
|
-
export declare function admitUserGlobalTool(args: {
|
|
21
|
-
readonly dir: string;
|
|
22
|
-
}): AuthoredAdmission;
|
|
23
|
-
//# sourceMappingURL=authored-tool-admission.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authored-tool-admission.d.ts","sourceRoot":"","sources":["../../src/bootstrap/authored-tool-admission.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAsC9C;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAClC,GAAG,iBAAiB,CAgBpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,iBAAiB,CAErF"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { admitTool, loadToolManifest, PluginIncompatibleError, PROJECT_LOCAL_MANIFEST_FILE, } from '@opensip-cli/core';
|
|
2
|
-
import { isProjectLocalToolTrusted } from './tool-trust.js';
|
|
3
|
-
/**
|
|
4
|
-
* The shared admission tail for both authored sources. When `preloadedManifest`
|
|
5
|
-
* is supplied we use that snapshot so the trust decision and compatibility gate
|
|
6
|
-
* see the identical declaration.
|
|
7
|
-
*
|
|
8
|
-
* @throws {PluginIncompatibleError} When the sidecar manifest is missing,
|
|
9
|
-
* malformed, or rejected by the compatibility gate.
|
|
10
|
-
*/
|
|
11
|
-
function admitAuthoredTool(source, dir, preloadedManifest) {
|
|
12
|
-
const rawManifest = preloadedManifest ?? loadToolManifest(source, dir);
|
|
13
|
-
if (rawManifest === undefined) {
|
|
14
|
-
throw new PluginIncompatibleError(`${source} tool at '${dir}' has no conformant ${PROJECT_LOCAL_MANIFEST_FILE} sidecar`, { diagnostic: 'manifest missing or malformed' });
|
|
15
|
-
}
|
|
16
|
-
const result = admitTool({
|
|
17
|
-
manifest: rawManifest,
|
|
18
|
-
source,
|
|
19
|
-
dir,
|
|
20
|
-
explicitlyRequested: true,
|
|
21
|
-
});
|
|
22
|
-
if (result.decision !== 'admit') {
|
|
23
|
-
throw new PluginIncompatibleError(`${source} tool '${rawManifest.id}' is incompatible: ${result.diagnostic ?? 'compatibility gate rejected it'}`, { diagnostic: result.diagnostic });
|
|
24
|
-
}
|
|
25
|
-
return { provenance: result.provenance, manifest: result.manifest };
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Admit or reject a PROJECT-LOCAL authored tool under the deny-by-default trust
|
|
29
|
-
* policy. The trust decision always precedes module import; a non-allowlisted
|
|
30
|
-
* tool fails closed before any authored code can run.
|
|
31
|
-
*
|
|
32
|
-
* @throws {PluginIncompatibleError} When the sidecar manifest is missing,
|
|
33
|
-
* malformed, incompatible, or not trusted by the project-tool allowlist.
|
|
34
|
-
*/
|
|
35
|
-
export function admitProjectLocalTool(args) {
|
|
36
|
-
const manifest = loadToolManifest('project-local', args.dir);
|
|
37
|
-
if (manifest === undefined) {
|
|
38
|
-
throw new PluginIncompatibleError(`project-local tool at '${args.dir}' has no conformant ${PROJECT_LOCAL_MANIFEST_FILE} sidecar`, { diagnostic: 'manifest missing or malformed' });
|
|
39
|
-
}
|
|
40
|
-
if (!isProjectLocalToolTrusted(manifest.id, args.env)) {
|
|
41
|
-
throw new PluginIncompatibleError(`project-local tool '${manifest.id}' is not trusted to load (deny-by-default). ` +
|
|
42
|
-
`Allowlist it via OPENSIP_CLI_ALLOW_PROJECT_TOOLS='${manifest.id}' to admit it.`, { diagnostic: 'project-local tool not allowlisted (deny-by-default)' });
|
|
43
|
-
}
|
|
44
|
-
return admitAuthoredTool('project-local', args.dir, manifest);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Admit a USER-GLOBAL authored tool — trusted-by-default because the user placed
|
|
48
|
-
* it in their own home-dir tool host, but still fail-closed on a missing or
|
|
49
|
-
* incompatible manifest.
|
|
50
|
-
*/
|
|
51
|
-
export function admitUserGlobalTool(args) {
|
|
52
|
-
return admitAuthoredTool('user-global', args.dir);
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=authored-tool-admission.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authored-tool-admission.js","sourceRoot":"","sources":["../../src/bootstrap/authored-tool-admission.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,uBAAuB,EACvB,2BAA2B,GAE5B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAM5D;;;;;;;GAOG;AACH,SAAS,iBAAiB,CACxB,MAAkB,EAClB,GAAW,EACX,iBAAuD;IAEvD,MAAM,WAAW,GAAG,iBAAiB,IAAI,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,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,sDAAsD,EAAE,CACvE,CAAC;IACJ,CAAC;IACD,OAAO,iBAAiB,CAAC,eAAe,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAChE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAA8B;IAChE,OAAO,iBAAiB,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* egress-plane — the host's effectful-egress plane
|
|
3
|
-
* (host-owned-run-timing Phase 6 §6.1).
|
|
4
|
-
*
|
|
5
|
-
* The composition root owns all outbound delivery (ADR-0011 / ADR-0008): cloud
|
|
6
|
-
* sync via the run's signal sink + `--report-to` SARIF upload, and the
|
|
7
|
-
* SARIF-file sink. Tools never import `@opensip-cli/output`; they call these two
|
|
8
|
-
* `ToolCliContext` seams, which delegate to the existing `deliver-envelope`
|
|
9
|
-
* implementation. Extracted from `buildToolCliContext` so the egress concern has
|
|
10
|
-
* its own narrow, testable home.
|
|
11
|
-
*/
|
|
12
|
-
import { type Logger, type ToolCliContext } from '@opensip-cli/core';
|
|
13
|
-
/** Stable dependencies the egress plane captures. */
|
|
14
|
-
export interface EgressPlaneDeps {
|
|
15
|
-
/** The single exit-code write path (from the output plane) — threaded into delivery. */
|
|
16
|
-
readonly setExitCode: (code: number) => void;
|
|
17
|
-
readonly logger?: Logger;
|
|
18
|
-
}
|
|
19
|
-
/** The egress plane's public surface (the two `ToolCliContext` egress seams). */
|
|
20
|
-
export type EgressPlane = Pick<ToolCliContext, 'deliverSignals' | 'writeSarif'>;
|
|
21
|
-
export declare function createEgressPlane(deps: EgressPlaneDeps): EgressPlane;
|
|
22
|
-
//# sourceMappingURL=egress-plane.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"egress-plane.d.ts","sourceRoot":"","sources":["../../src/bootstrap/egress-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAA2B,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAM9F,qDAAqD;AACrD,MAAM,WAAW,eAAe;IAC9B,wFAAwF;IACxF,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,gBAAgB,GAAG,YAAY,CAAC,CAAC;AAEhF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CAuBpE"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* egress-plane — the host's effectful-egress plane
|
|
3
|
-
* (host-owned-run-timing Phase 6 §6.1).
|
|
4
|
-
*
|
|
5
|
-
* The composition root owns all outbound delivery (ADR-0011 / ADR-0008): cloud
|
|
6
|
-
* sync via the run's signal sink + `--report-to` SARIF upload, and the
|
|
7
|
-
* SARIF-file sink. Tools never import `@opensip-cli/output`; they call these two
|
|
8
|
-
* `ToolCliContext` seams, which delegate to the existing `deliver-envelope`
|
|
9
|
-
* implementation. Extracted from `buildToolCliContext` so the egress concern has
|
|
10
|
-
* its own narrow, testable home.
|
|
11
|
-
*/
|
|
12
|
-
import { logger as defaultLogger } from '@opensip-cli/core';
|
|
13
|
-
import { deliverEnvelope, writeEnvelopeSarif } from './deliver-envelope.js';
|
|
14
|
-
export function createEgressPlane(deps) {
|
|
15
|
-
const log = deps.logger ?? defaultLogger;
|
|
16
|
-
return {
|
|
17
|
-
// The root owns all effectful egress (ADR-0011 / ADR-0008): cloud sync via
|
|
18
|
-
// the run's signal sink + `--report-to` SARIF upload. Tools call this once
|
|
19
|
-
// per run; `setExitCode` is threaded so a `--report-to` failure on an
|
|
20
|
-
// otherwise-passing run can claim exit 4. The delivery result (what actually
|
|
21
|
-
// shipped / why a leg was skipped) flows back to the caller — the root has
|
|
22
|
-
// already printed any user-facing notice, so callers may ignore it.
|
|
23
|
-
deliverSignals: (envelope, deliverOpts) => deliverEnvelope(envelope, {
|
|
24
|
-
cwd: deliverOpts.cwd,
|
|
25
|
-
reportTo: deliverOpts.reportTo,
|
|
26
|
-
apiKey: deliverOpts.apiKey,
|
|
27
|
-
runFailed: deliverOpts.runFailed,
|
|
28
|
-
setExitCode: deps.setExitCode,
|
|
29
|
-
logger: log,
|
|
30
|
-
}),
|
|
31
|
-
// Root-owned SARIF-file sink (ADR-0011): the one place that formats an
|
|
32
|
-
// envelope to SARIF and writes it to disk, so tools that export SARIF to a
|
|
33
|
-
// file (e.g. `graph sarif-export`) never import `@opensip-cli/output`.
|
|
34
|
-
writeSarif: (envelope, path) => writeEnvelopeSarif(envelope, path),
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=egress-plane.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"egress-plane.js","sourceRoot":"","sources":["../../src/bootstrap/egress-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,IAAI,aAAa,EAAoC,MAAM,mBAAmB,CAAC;AAE9F,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAc5E,MAAM,UAAU,iBAAiB,CAAC,IAAqB;IACrD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,aAAa,CAAC;IACzC,OAAO;QACL,2EAA2E;QAC3E,2EAA2E;QAC3E,sEAAsE;QACtE,6EAA6E;QAC7E,2EAA2E;QAC3E,oEAAoE;QACpE,cAAc,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,CACxC,eAAe,CAAC,QAA0B,EAAE;YAC1C,GAAG,EAAE,WAAW,CAAC,GAAG;YACpB,QAAQ,EAAE,WAAW,CAAC,QAAQ;YAC9B,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,SAAS,EAAE,WAAW,CAAC,SAAS;YAChC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,MAAM,EAAE,GAAG;SACZ,CAAC;QACJ,uEAAuE;QACvE,2EAA2E;QAC3E,uEAAuE;QACvE,UAAU,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,QAA0B,EAAE,IAAI,CAAC;KACrF,CAAC;AACJ,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ToolRuntimeLoad } from './admit-tool-package.js';
|
|
2
|
-
import type { ToolAdmission } from './tool-admission-types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Run the admission gate over a discovered INSTALLED tool package before its
|
|
5
|
-
* module is imported. Installed tools are best-effort: incompatible or malformed
|
|
6
|
-
* ambient packages skip with diagnostics rather than crashing unrelated commands.
|
|
7
|
-
*/
|
|
8
|
-
export declare function admitInstalledTool(pkg: {
|
|
9
|
-
readonly name: string;
|
|
10
|
-
readonly packageDir: string;
|
|
11
|
-
}, builtInIds: ReadonlySet<string>): ToolAdmission | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Emit the best-effort stderr line + structured warning for a discovered
|
|
14
|
-
* INSTALLED tool whose runtime failed to load. Each failure reason maps to its
|
|
15
|
-
* own diagnostic while preserving the installed leg's skip-not-crash posture.
|
|
16
|
-
*/
|
|
17
|
-
export declare function emitInstalledLoadFailure(name: string, load: Extract<ToolRuntimeLoad, {
|
|
18
|
-
ok: false;
|
|
19
|
-
}>): void;
|
|
20
|
-
//# sourceMappingURL=installed-tool-admission.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"installed-tool-admission.d.ts","sourceRoot":"","sources":["../../src/bootstrap/installed-tool-admission.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,EAC3D,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAC9B,aAAa,GAAG,SAAS,CAwB3B;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,CAAC,eAAe,EAAE;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAAC,GAC5C,IAAI,CA0BN"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { admitTool, loadToolManifest, logger } from '@opensip-cli/core';
|
|
2
|
-
import { BOOTSTRAP_MODULE } from './register-tools-shared.js';
|
|
3
|
-
/**
|
|
4
|
-
* Run the admission gate over a discovered INSTALLED tool package before its
|
|
5
|
-
* module is imported. Installed tools are best-effort: incompatible or malformed
|
|
6
|
-
* ambient packages skip with diagnostics rather than crashing unrelated commands.
|
|
7
|
-
*/
|
|
8
|
-
export function admitInstalledTool(pkg, builtInIds) {
|
|
9
|
-
const manifest = loadToolManifest('installed', pkg.packageDir);
|
|
10
|
-
if (manifest === undefined) {
|
|
11
|
-
process.stderr.write(`opensip: tool package ${pkg.name} has no conformant package.json#opensipTools manifest — skipping\n`);
|
|
12
|
-
logger.warn({
|
|
13
|
-
evt: 'cli.tool.manifest_invalid',
|
|
14
|
-
module: BOOTSTRAP_MODULE,
|
|
15
|
-
name: pkg.name,
|
|
16
|
-
});
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
if (builtInIds.has(manifest.id))
|
|
20
|
-
return undefined;
|
|
21
|
-
const result = admitTool({
|
|
22
|
-
manifest,
|
|
23
|
-
source: 'installed',
|
|
24
|
-
dir: pkg.packageDir,
|
|
25
|
-
packageName: pkg.name,
|
|
26
|
-
explicitlyRequested: false,
|
|
27
|
-
});
|
|
28
|
-
if (result.decision !== 'admit')
|
|
29
|
-
return undefined;
|
|
30
|
-
return { provenance: result.provenance, manifest: result.manifest };
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Emit the best-effort stderr line + structured warning for a discovered
|
|
34
|
-
* INSTALLED tool whose runtime failed to load. Each failure reason maps to its
|
|
35
|
-
* own diagnostic while preserving the installed leg's skip-not-crash posture.
|
|
36
|
-
*/
|
|
37
|
-
export function emitInstalledLoadFailure(name, load) {
|
|
38
|
-
if (load.reason === 'no-entry') {
|
|
39
|
-
process.stderr.write(`opensip: tool package ${name} has no resolvable entry point — skipping\n`);
|
|
40
|
-
logger.warn({ evt: 'cli.tool.no_entry', module: BOOTSTRAP_MODULE, name });
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
if (load.reason === 'invalid-shape') {
|
|
44
|
-
process.stderr.write(`opensip: tool package ${name} does not export a valid \`tool\` — skipping\n`);
|
|
45
|
-
logger.warn({
|
|
46
|
-
evt: 'cli.tool.invalid_shape',
|
|
47
|
-
module: BOOTSTRAP_MODULE,
|
|
48
|
-
name,
|
|
49
|
-
});
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
process.stderr.write(`opensip: failed to load tool ${name}: ${load.detail ?? 'import failed'}\n`);
|
|
53
|
-
logger.warn({
|
|
54
|
-
evt: 'cli.tool.load_failed',
|
|
55
|
-
module: BOOTSTRAP_MODULE,
|
|
56
|
-
name,
|
|
57
|
-
error: load.detail,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=installed-tool-admission.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"installed-tool-admission.js","sourceRoot":"","sources":["../../src/bootstrap/installed-tool-admission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,mBAAmB,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,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,OAAO;IACT,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,eAAe,EAAE,CAAC;QACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,yBAAyB,IAAI,gDAAgD,CAC9E,CAAC;QACF,MAAM,CAAC,IAAI,CAAC;YACV,GAAG,EAAE,wBAAwB;YAC7B,MAAM,EAAE,gBAAgB;YACxB,IAAI;SACL,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,IAAI,KAAK,IAAI,CAAC,MAAM,IAAI,eAAe,IAAI,CAAC,CAAC;IAClG,MAAM,CAAC,IAAI,CAAC;QACV,GAAG,EAAE,sBAAsB;QAC3B,MAAM,EAAE,gBAAgB;QACxB,IAAI;QACJ,KAAK,EAAE,IAAI,CAAC,MAAM;KACnB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* live-plane — the host's interactive live-view plane
|
|
3
|
-
* (host-owned-run-timing Phase 6 §6.1).
|
|
4
|
-
*
|
|
5
|
-
* Two pieces:
|
|
6
|
-
* 1. {@link createLiveViewRegistry} — the pure key→renderer registry backing
|
|
7
|
-
* `cli.registerLiveView`. First-writer-wins on duplicate keys; an
|
|
8
|
-
* unregistered key throws {@link UnknownLiveViewError} rather than masking a
|
|
9
|
-
* mistyped key with a static render. The host builds ONE registry per
|
|
10
|
-
* invocation (in `main()`) and hands it to the context assembler.
|
|
11
|
-
* 2. {@link createLivePlane} — binds that registry to the run plane so the
|
|
12
|
-
* `cli.renderLive` seam owns the live run lifecycle (Phase 2): it times the
|
|
13
|
-
* TTY occupancy and persists the renderer's returned `session` contribution
|
|
14
|
-
* after `await render()`. The renderer no longer writes the session itself.
|
|
15
|
-
*
|
|
16
|
-
* The host ALWAYS supplies the {@link LiveViewContext} (carrying the run seam +
|
|
17
|
-
* timer) as the renderer's second argument, so tools that call `renderLive`
|
|
18
|
-
* directly (fit/sim/graph `runLiveMode`) get it without threading it themselves;
|
|
19
|
-
* a renderer that declares only one parameter simply ignores the extra arg.
|
|
20
|
-
*/
|
|
21
|
-
import { type LiveViewContext, type LiveViewRenderer, type Logger, type ToolRunCompletion, type ToolRunSessions } from '@opensip-cli/core';
|
|
22
|
-
import type { RunPlaneFactory } from './run-plane.js';
|
|
23
|
-
export interface LiveViewRegistry {
|
|
24
|
-
readonly register: (key: string, renderer: LiveViewRenderer) => void;
|
|
25
|
-
/**
|
|
26
|
-
* Render the live view. The optional third parameter is the LiveViewContext
|
|
27
|
-
* (carrying runSession) to forward as the *second* argument to the renderer
|
|
28
|
-
* function itself. This lets the host dispatch site (mount) supply the
|
|
29
|
-
* shared run timer without changing the public ToolCliContext.renderLive
|
|
30
|
-
* (tools still call renderLive(key, args)).
|
|
31
|
-
*/
|
|
32
|
-
readonly render: (key: string, args: unknown, liveContext?: LiveViewContext) => Promise<ToolRunCompletion | void>;
|
|
33
|
-
readonly has: (key: string) => boolean;
|
|
34
|
-
}
|
|
35
|
-
export declare function createLiveViewRegistry(log?: Logger): LiveViewRegistry;
|
|
36
|
-
/** Stable dependencies the live plane binds together. */
|
|
37
|
-
export interface LivePlaneDeps {
|
|
38
|
-
/** The per-invocation registry built in `main()` and passed to the assembler. */
|
|
39
|
-
readonly liveViews: LiveViewRegistry;
|
|
40
|
-
/** The run plane — `renderLive` runs the render through its `completeLiveRender`. */
|
|
41
|
-
readonly runPlane: RunPlaneFactory;
|
|
42
|
-
/** The host run seam, used to build the default {@link LiveViewContext}. */
|
|
43
|
-
readonly runSession: ToolRunSessions;
|
|
44
|
-
}
|
|
45
|
-
/** The live plane's public surface (the two `ToolCliContext` live-view seams). */
|
|
46
|
-
export interface LivePlane {
|
|
47
|
-
readonly register: LiveViewRegistry['register'];
|
|
48
|
-
readonly renderLive: (key: string, args: unknown, liveContext?: LiveViewContext) => Promise<ToolRunCompletion | void>;
|
|
49
|
-
}
|
|
50
|
-
export declare function createLivePlane(deps: LivePlaneDeps): LivePlane;
|
|
51
|
-
//# sourceMappingURL=live-plane.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"live-plane.d.ts","sourceRoot":"","sources":["../../src/bootstrap/live-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrE;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,CACf,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,OAAO,EACb,WAAW,CAAC,EAAE,eAAe,KAC1B,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACvC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACxC;AAED,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAsB,GAAG,gBAAgB,CAmCpF;AAED,yDAAyD;AACzD,MAAM,WAAW,aAAa;IAC5B,iFAAiF;IACjF,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;IACrC,qFAAqF;IACrF,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;CACtC;AAED,kFAAkF;AAClF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAChD,QAAQ,CAAC,UAAU,EAAE,CACnB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,OAAO,EACb,WAAW,CAAC,EAAE,eAAe,KAC1B,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CACxC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,CAgB9D"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* live-plane — the host's interactive live-view plane
|
|
3
|
-
* (host-owned-run-timing Phase 6 §6.1).
|
|
4
|
-
*
|
|
5
|
-
* Two pieces:
|
|
6
|
-
* 1. {@link createLiveViewRegistry} — the pure key→renderer registry backing
|
|
7
|
-
* `cli.registerLiveView`. First-writer-wins on duplicate keys; an
|
|
8
|
-
* unregistered key throws {@link UnknownLiveViewError} rather than masking a
|
|
9
|
-
* mistyped key with a static render. The host builds ONE registry per
|
|
10
|
-
* invocation (in `main()`) and hands it to the context assembler.
|
|
11
|
-
* 2. {@link createLivePlane} — binds that registry to the run plane so the
|
|
12
|
-
* `cli.renderLive` seam owns the live run lifecycle (Phase 2): it times the
|
|
13
|
-
* TTY occupancy and persists the renderer's returned `session` contribution
|
|
14
|
-
* after `await render()`. The renderer no longer writes the session itself.
|
|
15
|
-
*
|
|
16
|
-
* The host ALWAYS supplies the {@link LiveViewContext} (carrying the run seam +
|
|
17
|
-
* timer) as the renderer's second argument, so tools that call `renderLive`
|
|
18
|
-
* directly (fit/sim/graph `runLiveMode`) get it without threading it themselves;
|
|
19
|
-
* a renderer that declares only one parameter simply ignores the extra arg.
|
|
20
|
-
*/
|
|
21
|
-
import { UnknownLiveViewError, logger as defaultLogger, } from '@opensip-cli/core';
|
|
22
|
-
export function createLiveViewRegistry(log = defaultLogger) {
|
|
23
|
-
const renderers = new Map();
|
|
24
|
-
return {
|
|
25
|
-
register(key, renderer) {
|
|
26
|
-
if (renderers.has(key)) {
|
|
27
|
-
log.warn({
|
|
28
|
-
evt: 'cli.live_view.duplicate',
|
|
29
|
-
module: 'cli:bootstrap',
|
|
30
|
-
key,
|
|
31
|
-
msg: `Duplicate live-view registration for key '${key}' — first registration wins.`,
|
|
32
|
-
});
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
renderers.set(key, renderer);
|
|
36
|
-
},
|
|
37
|
-
/**
|
|
38
|
-
* @throws {UnknownLiveViewError} When `key` has no registered live-view renderer.
|
|
39
|
-
*/
|
|
40
|
-
async render(key, args, liveContext) {
|
|
41
|
-
const renderer = renderers.get(key);
|
|
42
|
-
if (!renderer) {
|
|
43
|
-
// async so the throw surfaces as a rejected promise (the contract
|
|
44
|
-
// callers `await` / assert `.rejects` against).
|
|
45
|
-
throw new UnknownLiveViewError(key);
|
|
46
|
-
}
|
|
47
|
-
// Always pass the host-supplied LiveViewContext (host-owned-run-timing
|
|
48
|
-
// Phase 2): live tool commands receive it; JS safely ignores the extra arg
|
|
49
|
-
// for any renderer that declares only one parameter. Return the renderer's
|
|
50
|
-
// ToolRunCompletion so the host can complete the lifecycle + persist.
|
|
51
|
-
return renderer(args, liveContext);
|
|
52
|
-
},
|
|
53
|
-
has(key) {
|
|
54
|
-
return renderers.has(key);
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export function createLivePlane(deps) {
|
|
59
|
-
return {
|
|
60
|
-
register: deps.liveViews.register,
|
|
61
|
-
// Host owns the live run lifecycle (host-owned-run-timing Phase 2): time
|
|
62
|
-
// the TTY occupancy, then complete the lifecycle + persist the renderer's
|
|
63
|
-
// returned `session` contribution. The host always supplies the
|
|
64
|
-
// LiveViewContext (carrying the run seam + timer) so tools that call
|
|
65
|
-
// renderLive directly (fit/sim/graph runLiveMode) get it without passing
|
|
66
|
-
// it themselves. The renderer no longer writes the session itself.
|
|
67
|
-
renderLive: (key, args, liveContext) => deps.runPlane
|
|
68
|
-
.current()
|
|
69
|
-
.completeLiveRender(() => deps.liveViews.render(key, args, liveContext ?? { runSession: deps.runSession })),
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=live-plane.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"live-plane.js","sourceRoot":"","sources":["../../src/bootstrap/live-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,oBAAoB,EACpB,MAAM,IAAI,aAAa,GAMxB,MAAM,mBAAmB,CAAC;AAqB3B,MAAM,UAAU,sBAAsB,CAAC,MAAc,aAAa;IAChE,MAAM,SAAS,GAAG,IAAI,GAAG,EAA4B,CAAC;IACtD,OAAO;QACL,QAAQ,CAAC,GAAG,EAAE,QAAQ;YACpB,IAAI,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,GAAG,CAAC,IAAI,CAAC;oBACP,GAAG,EAAE,yBAAyB;oBAC9B,MAAM,EAAE,eAAe;oBACvB,GAAG;oBACH,GAAG,EAAE,6CAA6C,GAAG,8BAA8B;iBACpF,CAAC,CAAC;gBACH,OAAO;YACT,CAAC;YACD,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC/B,CAAC;QACD;;WAEG;QACH,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,WAAW;YACjC,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACpC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,kEAAkE;gBAClE,gDAAgD;gBAChD,MAAM,IAAI,oBAAoB,CAAC,GAAG,CAAC,CAAC;YACtC,CAAC;YACD,uEAAuE;YACvE,2EAA2E;YAC3E,2EAA2E;YAC3E,sEAAsE;YACtE,OAAO,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACrC,CAAC;QACD,GAAG,CAAC,GAAG;YACL,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC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