opensip-cli 0.1.9 → 0.1.11
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/baseline-seams.d.ts.map +1 -1
- package/dist/bootstrap/baseline-seams.js +0 -2
- package/dist/bootstrap/baseline-seams.js.map +1 -1
- package/dist/bootstrap/bootstrap-diagnostics-buffer.d.ts +15 -0
- package/dist/bootstrap/bootstrap-diagnostics-buffer.d.ts.map +1 -0
- package/dist/bootstrap/bootstrap-diagnostics-buffer.js +24 -0
- package/dist/bootstrap/bootstrap-diagnostics-buffer.js.map +1 -0
- package/dist/bootstrap/build-command-registration-input.d.ts +2 -0
- package/dist/bootstrap/build-command-registration-input.d.ts.map +1 -1
- package/dist/bootstrap/build-command-registration-input.js +1 -0
- package/dist/bootstrap/build-command-registration-input.js.map +1 -1
- package/dist/bootstrap/build-per-run-scope.d.ts +5 -1
- package/dist/bootstrap/build-per-run-scope.d.ts.map +1 -1
- package/dist/bootstrap/build-per-run-scope.js +8 -2
- package/dist/bootstrap/build-per-run-scope.js.map +1 -1
- package/dist/bootstrap/bundled-tools.manifest.json +6 -1
- package/dist/bootstrap/config-and-capabilities.d.ts +2 -1
- package/dist/bootstrap/config-and-capabilities.d.ts.map +1 -1
- package/dist/bootstrap/config-and-capabilities.js +18 -5
- package/dist/bootstrap/config-and-capabilities.js.map +1 -1
- package/dist/bootstrap/deliver-envelope.d.ts.map +1 -1
- package/dist/bootstrap/deliver-envelope.js +0 -1
- package/dist/bootstrap/deliver-envelope.js.map +1 -1
- package/dist/bootstrap/discovery-diagnostics.d.ts +17 -0
- package/dist/bootstrap/discovery-diagnostics.d.ts.map +1 -0
- package/dist/bootstrap/discovery-diagnostics.js +94 -0
- package/dist/bootstrap/discovery-diagnostics.js.map +1 -0
- package/dist/bootstrap/dispatch-fork-core.d.ts.map +1 -1
- package/dist/bootstrap/dispatch-fork-core.js +9 -15
- package/dist/bootstrap/dispatch-fork-core.js.map +1 -1
- package/dist/bootstrap/dispatch-host-rpc-handler.d.ts.map +1 -1
- package/dist/bootstrap/dispatch-host-rpc-handler.js +0 -1
- package/dist/bootstrap/dispatch-host-rpc-handler.js.map +1 -1
- package/dist/bootstrap/dispatch-replay-result.d.ts.map +1 -1
- package/dist/bootstrap/dispatch-replay-result.js +0 -1
- package/dist/bootstrap/dispatch-replay-result.js.map +1 -1
- package/dist/bootstrap/execute-post-bailout-bootstrap.d.ts.map +1 -1
- package/dist/bootstrap/execute-post-bailout-bootstrap.js +8 -2
- package/dist/bootstrap/execute-post-bailout-bootstrap.js.map +1 -1
- package/dist/bootstrap/index.d.ts +6 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +15 -4
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/bootstrap/load-tool-capabilities.d.ts.map +1 -1
- package/dist/bootstrap/load-tool-capabilities.js +14 -2
- package/dist/bootstrap/load-tool-capabilities.js.map +1 -1
- package/dist/bootstrap/output-plane.d.ts.map +1 -1
- package/dist/bootstrap/output-plane.js +1 -0
- package/dist/bootstrap/output-plane.js.map +1 -1
- package/dist/bootstrap/pre-action-hook.d.ts.map +1 -1
- package/dist/bootstrap/pre-action-hook.js +0 -2
- package/dist/bootstrap/pre-action-hook.js.map +1 -1
- package/dist/bootstrap/pre-action-runtime.d.ts +2 -1
- package/dist/bootstrap/pre-action-runtime.d.ts.map +1 -1
- package/dist/bootstrap/register-tools-discovery.d.ts +6 -4
- package/dist/bootstrap/register-tools-discovery.d.ts.map +1 -1
- package/dist/bootstrap/register-tools-discovery.js +32 -19
- package/dist/bootstrap/register-tools-discovery.js.map +1 -1
- package/dist/bootstrap/register-tools-mount.d.ts +8 -5
- package/dist/bootstrap/register-tools-mount.d.ts.map +1 -1
- package/dist/bootstrap/register-tools-mount.js +35 -6
- package/dist/bootstrap/register-tools-mount.js.map +1 -1
- package/dist/bootstrap/register-tools.d.ts.map +1 -1
- package/dist/bootstrap/register-tools.js +0 -2
- package/dist/bootstrap/register-tools.js.map +1 -1
- package/dist/bootstrap/render-bootstrap-diagnostics.d.ts +13 -0
- package/dist/bootstrap/render-bootstrap-diagnostics.d.ts.map +1 -0
- package/dist/bootstrap/render-bootstrap-diagnostics.js +25 -0
- package/dist/bootstrap/render-bootstrap-diagnostics.js.map +1 -0
- package/dist/bootstrap/run-plane.d.ts.map +1 -1
- package/dist/bootstrap/run-plane.js +9 -4
- package/dist/bootstrap/run-plane.js.map +1 -1
- package/dist/bootstrap/state-seams.d.ts.map +1 -1
- package/dist/bootstrap/state-seams.js +0 -1
- package/dist/bootstrap/state-seams.js.map +1 -1
- package/dist/bootstrap/synthesize-external-tool.d.ts +0 -37
- package/dist/bootstrap/synthesize-external-tool.d.ts.map +1 -1
- package/dist/bootstrap/synthesize-external-tool.js +18 -67
- package/dist/bootstrap/synthesize-external-tool.js.map +1 -1
- package/dist/bootstrap/tool-command-worker-context.d.ts.map +1 -1
- package/dist/bootstrap/tool-command-worker-context.js +0 -1
- package/dist/bootstrap/tool-command-worker-context.js.map +1 -1
- package/dist/bootstrap/tool-command-worker-entry.d.ts.map +1 -1
- package/dist/bootstrap/tool-command-worker-entry.js +1 -3
- package/dist/bootstrap/tool-command-worker-entry.js.map +1 -1
- package/dist/bootstrap/tool-trust.d.ts.map +1 -1
- package/dist/bootstrap/tool-trust.js +15 -0
- package/dist/bootstrap/tool-trust.js.map +1 -1
- package/dist/bootstrap/validate-tool.d.ts.map +1 -1
- package/dist/bootstrap/validate-tool.js +63 -6
- package/dist/bootstrap/validate-tool.js.map +1 -1
- package/dist/cli-context.js +0 -1
- package/dist/cli-context.js.map +1 -1
- package/dist/commands/agent-catalog.d.ts.map +1 -1
- package/dist/commands/agent-catalog.js +14 -5
- package/dist/commands/agent-catalog.js.map +1 -1
- package/dist/commands/assemble-outcome.d.ts +2 -1
- package/dist/commands/assemble-outcome.d.ts.map +1 -1
- package/dist/commands/assemble-outcome.js +33 -16
- package/dist/commands/assemble-outcome.js.map +1 -1
- package/dist/commands/command-scope-index.d.ts +1 -1
- package/dist/commands/command-scope-index.js +2 -2
- package/dist/commands/command-scope-index.js.map +1 -1
- package/dist/commands/completion.d.ts +7 -33
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +76 -69
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/history.d.ts +3 -6
- package/dist/commands/history.d.ts.map +1 -1
- package/dist/commands/history.js +7 -12
- package/dist/commands/history.js.map +1 -1
- package/dist/commands/host-command-specs.d.ts +6 -30
- package/dist/commands/host-command-specs.d.ts.map +1 -1
- package/dist/commands/host-command-specs.js +10 -33
- package/dist/commands/host-command-specs.js.map +1 -1
- package/dist/commands/host-subcommand-groups.d.ts +8 -72
- package/dist/commands/host-subcommand-groups.d.ts.map +1 -1
- package/dist/commands/host-subcommand-groups.js +9 -400
- package/dist/commands/host-subcommand-groups.js.map +1 -1
- package/dist/commands/host-subcommand-plugins.d.ts +20 -0
- package/dist/commands/host-subcommand-plugins.d.ts.map +1 -0
- package/dist/commands/host-subcommand-plugins.js +116 -0
- package/dist/commands/host-subcommand-plugins.js.map +1 -0
- package/dist/commands/host-subcommand-sessions.d.ts +8 -0
- package/dist/commands/host-subcommand-sessions.d.ts.map +1 -0
- package/dist/commands/host-subcommand-sessions.js +201 -0
- package/dist/commands/host-subcommand-sessions.js.map +1 -0
- package/dist/commands/host-subcommand-shared.d.ts +20 -0
- package/dist/commands/host-subcommand-shared.d.ts.map +1 -0
- package/dist/commands/host-subcommand-shared.js +15 -0
- package/dist/commands/host-subcommand-shared.js.map +1 -0
- package/dist/commands/init/file-classifier.d.ts.map +1 -1
- package/dist/commands/init/file-classifier.js +0 -1
- package/dist/commands/init/file-classifier.js.map +1 -1
- package/dist/commands/init/state-machine.d.ts.map +1 -1
- package/dist/commands/init/state-machine.js +0 -1
- package/dist/commands/init/state-machine.js.map +1 -1
- package/dist/commands/plugin/host-dir.d.ts.map +1 -1
- package/dist/commands/plugin/host-dir.js +0 -1
- package/dist/commands/plugin/host-dir.js.map +1 -1
- package/dist/commands/plugin-host-ops.d.ts.map +1 -1
- package/dist/commands/plugin-host-ops.js +0 -1
- package/dist/commands/plugin-host-ops.js.map +1 -1
- package/dist/commands/plugin.d.ts.map +1 -1
- package/dist/commands/plugin.js +0 -1
- package/dist/commands/plugin.js.map +1 -1
- package/dist/commands/session-show.d.ts +3 -1
- package/dist/commands/session-show.d.ts.map +1 -1
- package/dist/commands/session-show.js +23 -9
- package/dist/commands/session-show.js.map +1 -1
- package/dist/commands/shared.d.ts +3 -1
- package/dist/commands/shared.d.ts.map +1 -1
- package/dist/commands/tools/doctor.d.ts +7 -0
- package/dist/commands/tools/doctor.d.ts.map +1 -0
- package/dist/commands/tools/doctor.js +12 -0
- package/dist/commands/tools/doctor.js.map +1 -0
- package/dist/commands/tools/index.d.ts.map +1 -1
- package/dist/commands/tools/index.js +58 -8
- package/dist/commands/tools/index.js.map +1 -1
- package/dist/commands/uninstall/targets.d.ts.map +1 -1
- package/dist/commands/uninstall/targets.js +0 -1
- package/dist/commands/uninstall/targets.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/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/open-report.d.ts.map +1 -1
- package/dist/open-report.js +0 -1
- package/dist/open-report.js.map +1 -1
- package/dist/report-compose.d.ts.map +1 -1
- package/dist/report-compose.js +0 -2
- package/dist/report-compose.js.map +1 -1
- package/dist/session-replay-registry.js +0 -1
- package/dist/session-replay-registry.js.map +1 -1
- package/dist/telemetry/sdk-init.d.ts.map +1 -1
- package/dist/telemetry/sdk-init.js +1 -1
- package/dist/telemetry/sdk-init.js.map +1 -1
- package/dist/ui/render-diagnostic.d.ts +20 -0
- package/dist/ui/render-diagnostic.d.ts.map +1 -0
- package/dist/ui/render-diagnostic.js +22 -0
- package/dist/ui/render-diagnostic.js.map +1 -0
- package/dist/ui/result-to-view.d.ts.map +1 -1
- package/dist/ui/result-to-view.js +13 -102
- package/dist/ui/result-to-view.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 +46 -5
- package/dist/ui/views/tools-views.js.map +1 -1
- package/dist/update-notifier.d.ts.map +1 -1
- package/dist/update-notifier.js +0 -1
- package/dist/update-notifier.js.map +1 -1
- package/dist/update-state.d.ts.map +1 -1
- package/dist/update-state.js +0 -1
- package/dist/update-state.js.map +1 -1
- package/package.json +33 -32
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @fitness-ignore-file performance-anti-patterns -- sequential await across discovered tool packages preserves load order for plugin-conflict detection; bounded by installed plugin count
|
|
2
1
|
/**
|
|
3
2
|
* register-tools-discovery — installed + authored tool admission and discovery.
|
|
4
3
|
*
|
|
@@ -7,19 +6,22 @@
|
|
|
7
6
|
*/
|
|
8
7
|
import { admitTool, assertManifestMatchesTool, discoverToolPackagesFromAnchors, logger, resolveProjectContext, resolveProjectPaths, resolveUserPaths, loadToolManifest, } from '@opensip-cli/core';
|
|
9
8
|
import { importToolRuntime, workerRuntimeImportPolicyFor, } from './admit-tool-package.js';
|
|
9
|
+
import { BUNDLED_TOOL_PACKAGES } from './bundled-manifest.js';
|
|
10
10
|
import { BOOTSTRAP_MODULE } from './constants.js';
|
|
11
|
+
import { recordInstalledCatchFailure, recordInstalledLoadFailure, recordInstalledManifestInvalid, recordInstalledTrustDenied, } from './discovery-diagnostics.js';
|
|
11
12
|
import { synthesizeExternalTool } from './synthesize-external-tool.js';
|
|
12
13
|
import { isHostRuntimeImportForbidden } from './tool-provenance.js';
|
|
13
14
|
import { isInstalledToolTrusted } from './tool-trust.js';
|
|
15
|
+
const BUNDLED_PACKAGE_NAMES = new Set(BUNDLED_TOOL_PACKAGES);
|
|
14
16
|
/**
|
|
15
17
|
* Run the admission gate over a discovered INSTALLED tool package before its
|
|
16
18
|
* module is imported. Installed tools are best-effort: incompatible or malformed
|
|
17
19
|
* ambient packages skip with diagnostics rather than crashing unrelated commands.
|
|
18
20
|
*/
|
|
19
|
-
function admitInstalledTool(pkg, builtInIds) {
|
|
21
|
+
function admitInstalledTool(pkg, builtInIds, collector) {
|
|
20
22
|
const manifest = loadToolManifest('installed', pkg.packageDir);
|
|
21
23
|
if (manifest === undefined) {
|
|
22
|
-
|
|
24
|
+
recordInstalledManifestInvalid(pkg.name, collector);
|
|
23
25
|
logger.warn({
|
|
24
26
|
evt: 'cli.tool.manifest_invalid',
|
|
25
27
|
module: BOOTSTRAP_MODULE,
|
|
@@ -27,6 +29,19 @@ function admitInstalledTool(pkg, builtInIds) {
|
|
|
27
29
|
});
|
|
28
30
|
return undefined;
|
|
29
31
|
}
|
|
32
|
+
// ADR-0060 Phase 1: stale injected copies of bundled first-party tools are
|
|
33
|
+
// distribution noise when the bundled path already admitted the same id.
|
|
34
|
+
// When OPENSIP_CLI_SKIP_BUNDLED dropped bundled admission, the installed
|
|
35
|
+
// package is the intentional takeover path — do not skip it here.
|
|
36
|
+
if (BUNDLED_PACKAGE_NAMES.has(pkg.name) && builtInIds.has(manifest.id)) {
|
|
37
|
+
logger.debug({
|
|
38
|
+
evt: 'cli.tool.bundled_installed_copy_skipped',
|
|
39
|
+
module: BOOTSTRAP_MODULE,
|
|
40
|
+
packageName: pkg.name,
|
|
41
|
+
packageDir: pkg.packageDir,
|
|
42
|
+
});
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
30
45
|
if (builtInIds.has(manifest.id))
|
|
31
46
|
return undefined;
|
|
32
47
|
const result = admitTool({
|
|
@@ -45,11 +60,9 @@ function admitInstalledTool(pkg, builtInIds) {
|
|
|
45
60
|
* INSTALLED tool whose runtime failed to load. Each failure reason maps to its
|
|
46
61
|
* own diagnostic while preserving the installed leg's skip-not-crash posture.
|
|
47
62
|
*/
|
|
48
|
-
/**
|
|
49
|
-
export function emitInstalledTrustDenied(toolId, packageName, packageDir) {
|
|
50
|
-
|
|
51
|
-
`Allowlist it via OPENSIP_CLI_ALLOW_INSTALLED_TOOLS='${toolId}' to admit it ` +
|
|
52
|
-
`(or OPENSIP_CLI_ALLOW_INSTALLED_TOOLS='*' for all). See opensip.ai/docs/opensip-cli/70-reference/10-environment-variables/\n`);
|
|
63
|
+
/** Record + structured log when an installed tool is skipped by the trust gate. */
|
|
64
|
+
export function emitInstalledTrustDenied(toolId, packageName, packageDir, collector) {
|
|
65
|
+
recordInstalledTrustDenied(toolId, packageName, packageDir, collector);
|
|
53
66
|
logger.warn({
|
|
54
67
|
evt: 'cli.tool.installed_trust_denied',
|
|
55
68
|
module: BOOTSTRAP_MODULE,
|
|
@@ -58,14 +71,13 @@ export function emitInstalledTrustDenied(toolId, packageName, packageDir) {
|
|
|
58
71
|
packageDir,
|
|
59
72
|
});
|
|
60
73
|
}
|
|
61
|
-
export function emitInstalledLoadFailure(name, load) {
|
|
74
|
+
export function emitInstalledLoadFailure(name, load, collector) {
|
|
75
|
+
recordInstalledLoadFailure(name, load, collector);
|
|
62
76
|
if (load.reason === 'no-entry') {
|
|
63
|
-
process.stderr.write(`opensip: tool package ${name} has no resolvable entry point — skipping\n`);
|
|
64
77
|
logger.warn({ evt: 'cli.tool.no_entry', module: BOOTSTRAP_MODULE, name });
|
|
65
78
|
return;
|
|
66
79
|
}
|
|
67
80
|
if (load.reason === 'invalid-shape') {
|
|
68
|
-
process.stderr.write(`opensip: tool package ${name} does not export a valid \`tool\` — skipping\n`);
|
|
69
81
|
logger.warn({
|
|
70
82
|
evt: 'cli.tool.invalid_shape',
|
|
71
83
|
module: BOOTSTRAP_MODULE,
|
|
@@ -73,7 +85,6 @@ export function emitInstalledLoadFailure(name, load) {
|
|
|
73
85
|
});
|
|
74
86
|
return;
|
|
75
87
|
}
|
|
76
|
-
process.stderr.write(`opensip: failed to load tool ${name}: ${load.detail ?? 'import failed'}\n`);
|
|
77
88
|
logger.warn({
|
|
78
89
|
evt: 'cli.tool.load_failed',
|
|
79
90
|
module: BOOTSTRAP_MODULE,
|
|
@@ -135,11 +146,11 @@ export function buildToolDiscoverySources(cwd, cliInstallDir) {
|
|
|
135
146
|
* @param provenance Optional sink for admitted tools' provenance records.
|
|
136
147
|
*/
|
|
137
148
|
async function registerDiscoveredInstalledPackage(pkg, args) {
|
|
138
|
-
const admission = admitInstalledTool(pkg, args.builtInIds);
|
|
149
|
+
const admission = admitInstalledTool(pkg, args.builtInIds, args.bootstrapDiagnostics);
|
|
139
150
|
if (admission === undefined)
|
|
140
151
|
return;
|
|
141
152
|
if (!isInstalledToolTrusted(admission.manifest.id, args.env)) {
|
|
142
|
-
emitInstalledTrustDenied(admission.manifest.id, pkg.name, pkg.packageDir);
|
|
153
|
+
emitInstalledTrustDenied(admission.manifest.id, pkg.name, pkg.packageDir, args.bootstrapDiagnostics);
|
|
143
154
|
return;
|
|
144
155
|
}
|
|
145
156
|
// ADR-0054 M4-G (capstone): in the HOST, NEVER import the external runtime —
|
|
@@ -152,12 +163,14 @@ async function registerDiscoveredInstalledPackage(pkg, args) {
|
|
|
152
163
|
if (isHostRuntimeImportForbidden(args.env)) {
|
|
153
164
|
// Synchronous void registration (no import in the host); `void` marks the
|
|
154
165
|
// floating call as deliberately non-promise (the synthesize path never awaits).
|
|
155
|
-
void registerSyntheticExternalTool(args, admission, {
|
|
166
|
+
void registerSyntheticExternalTool(args, admission, {
|
|
167
|
+
sourcePackage: pkg.name,
|
|
168
|
+
});
|
|
156
169
|
return;
|
|
157
170
|
}
|
|
158
171
|
const load = await importToolRuntime(pkg.packageDir, workerRuntimeImportPolicyFor('installed'));
|
|
159
172
|
if (!load.ok) {
|
|
160
|
-
emitInstalledLoadFailure(pkg.name, load);
|
|
173
|
+
emitInstalledLoadFailure(pkg.name, load, args.bootstrapDiagnostics);
|
|
161
174
|
return;
|
|
162
175
|
}
|
|
163
176
|
if (args.builtInIds.has(load.tool.metadata.name ?? load.tool.metadata.id))
|
|
@@ -167,7 +180,6 @@ async function registerDiscoveredInstalledPackage(pkg, args) {
|
|
|
167
180
|
if (args.registeredStableIds.has(load.tool.metadata.id))
|
|
168
181
|
return;
|
|
169
182
|
assertManifestMatchesTool(admission.manifest, load.tool);
|
|
170
|
-
// @fitness-ignore-next-line detached-promises -- ToolRegistry.register(...) returns void (registry.ts:46); the detached-promise heuristic misfires on the discarded non-promise call result.
|
|
171
183
|
args.registry.register(load.tool, { sourcePackage: pkg.name });
|
|
172
184
|
args.provenance.push(admission.provenance);
|
|
173
185
|
args.manifests.push(admission.manifest);
|
|
@@ -184,7 +196,6 @@ function registerSyntheticExternalTool(args, admission, opts) {
|
|
|
184
196
|
return;
|
|
185
197
|
if (args.registeredStableIds.has(tool.metadata.id))
|
|
186
198
|
return;
|
|
187
|
-
// @fitness-ignore-next-line detached-promises -- ToolRegistry.register(...) returns void (registry.ts:46); the detached-promise heuristic misfires on the discarded non-promise call result.
|
|
188
199
|
args.registry.register(tool, opts?.sourcePackage === undefined ? undefined : opts);
|
|
189
200
|
args.provenance.push(admission.provenance);
|
|
190
201
|
args.manifests.push(admission.manifest);
|
|
@@ -200,6 +211,7 @@ export async function discoverAndRegisterToolPackages(registry, opts, builtInIds
|
|
|
200
211
|
// session-replay duplicate guard. UUID is identity; skip on a UUID match.
|
|
201
212
|
const registeredStableIds = new Set(registry.list().map((t) => t.metadata.id));
|
|
202
213
|
const env = opts.env ?? process.env;
|
|
214
|
+
const bootstrapDiagnostics = opts.bootstrapDiagnostics;
|
|
203
215
|
for (const pkg of discovered) {
|
|
204
216
|
try {
|
|
205
217
|
await registerDiscoveredInstalledPackage(pkg, {
|
|
@@ -209,11 +221,12 @@ export async function discoverAndRegisterToolPackages(registry, opts, builtInIds
|
|
|
209
221
|
registeredStableIds,
|
|
210
222
|
provenance,
|
|
211
223
|
manifests,
|
|
224
|
+
bootstrapDiagnostics,
|
|
212
225
|
});
|
|
213
226
|
}
|
|
214
227
|
catch (error) {
|
|
215
228
|
const msg = error instanceof Error ? error.message : String(error);
|
|
216
|
-
|
|
229
|
+
recordInstalledCatchFailure(pkg.name, msg, bootstrapDiagnostics);
|
|
217
230
|
logger.warn({
|
|
218
231
|
evt: 'cli.tool.load_failed',
|
|
219
232
|
module: BOOTSTRAP_MODULE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-tools-discovery.js","sourceRoot":"","sources":["../../src/bootstrap/register-tools-discovery.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"register-tools-discovery.js","sourceRoot":"","sources":["../../src/bootstrap/register-tools-discovery.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,SAAS,EACT,yBAAyB,EACzB,+BAA+B,EAC/B,MAAM,EACN,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GAMjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,iBAAiB,EACjB,4BAA4B,GAE7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAS,qBAAqB,CAAC,CAAC;AAErE;;;;GAIG;AACH,SAAS,kBAAkB,CACzB,GAA2D,EAC3D,UAA+B,EAC/B,SAAyC;IAEzC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,WAAW,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAC/D,IAAI,QAAQ,KAAK,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AC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACnE,2BAA2B,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,oBAAoB,CAAC,CAAC;YACjE,MAAM,CAAC,IAAI,CAAC;gBACV,GAAG,EAAE,sBAAsB;gBAC3B,MAAM,EAAE,gBAAgB;gBACxB,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,KAAK,EAAE,GAAG;aACX,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CliProgram } from '@opensip-cli/contracts';
|
|
2
|
-
import { type Tool, type ToolCliContext, type ToolRegistry } from '@opensip-cli/core';
|
|
2
|
+
import { type Tool, type ToolCliContext, type ToolProvenance, type ToolRegistry } from '@opensip-cli/core';
|
|
3
3
|
/**
|
|
4
4
|
* Walk the registry and mount each tool's commands onto `program`. This is
|
|
5
5
|
* **step 8** of the tool lifecycle (launch, §5.4) — see
|
|
@@ -12,16 +12,19 @@ import { type Tool, type ToolCliContext, type ToolRegistry } from '@opensip-cli/
|
|
|
12
12
|
* mis-declaration: it contributes no commands, surfaced loudly via
|
|
13
13
|
* `cli.tool.no_command_surface`.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Mount failures are **bundled fail-closed, external best-effort** (R16). A
|
|
16
|
+
* bundled tool whose spec fails to mount throws `PluginIncompatibleError` so the
|
|
17
|
+
* composition root aborts startup (exit 5). External provenance (installed /
|
|
18
|
+
* project-local / user-global) keeps the warn-and-continue posture.
|
|
18
19
|
*
|
|
19
20
|
* @param registry The per-invocation tool registry to walk.
|
|
20
21
|
* @param program The root Commander program (host-owned; the composition root
|
|
21
22
|
* passes it — it is no longer reachable through the tool context, §8).
|
|
22
23
|
* @param ctx The per-invocation handler context (render/emit/scope — no program).
|
|
24
|
+
* @param provenance Admitted-tool provenance from bootstrap (required — no default).
|
|
25
|
+
* @throws {PluginIncompatibleError} When a bundled tool's command surface fails to mount.
|
|
23
26
|
*/
|
|
24
|
-
export declare function mountAllToolCommands(registry: ToolRegistry, program: CliProgram, ctx: ToolCliContext): void;
|
|
27
|
+
export declare function mountAllToolCommands(registry: ToolRegistry, program: CliProgram, ctx: ToolCliContext, provenance: readonly ToolProvenance[]): void;
|
|
25
28
|
/**
|
|
26
29
|
* Mount ONE tool's commands from its declared `commandSpecs` — the only command
|
|
27
30
|
* surface (public launch). Extracted so {@link mountAllToolCommands} keeps its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-tools-mount.d.ts","sourceRoot":"","sources":["../../src/bootstrap/register-tools-mount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"register-tools-mount.d.ts","sourceRoot":"","sources":["../../src/bootstrap/register-tools-mount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAIL,KAAK,IAAI,EACT,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAW3B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,UAAU,EACnB,GAAG,EAAE,cAAc,EACnB,UAAU,EAAE,SAAS,cAAc,EAAE,GACpC,IAAI,CAqDN;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAsCvF"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { logger } from '@opensip-cli/core';
|
|
1
|
+
import { CLI_DIAGNOSTIC_CODES, logger, PluginIncompatibleError, } from '@opensip-cli/core';
|
|
2
2
|
import { mountCommandSpec } from '../commands/mount-command-spec.js';
|
|
3
3
|
import { buildMaybeDispatchExternal } from './bind-external-dispatch.js';
|
|
4
4
|
import { bindToolCliContext } from './bind-tool-context.js';
|
|
5
|
+
import { getBootstrapDiagnosticsBuffer } from './bootstrap-diagnostics-buffer.js';
|
|
5
6
|
import { BOOTSTRAP_MODULE } from './constants.js';
|
|
6
7
|
import { decorateToolPrimary } from './decorate-tool-primary.js';
|
|
8
|
+
import { provenanceSourceFor } from './tool-provenance.js';
|
|
7
9
|
/**
|
|
8
10
|
* Walk the registry and mount each tool's commands onto `program`. This is
|
|
9
11
|
* **step 8** of the tool lifecycle (launch, §5.4) — see
|
|
@@ -16,16 +18,19 @@ import { decorateToolPrimary } from './decorate-tool-primary.js';
|
|
|
16
18
|
* mis-declaration: it contributes no commands, surfaced loudly via
|
|
17
19
|
* `cli.tool.no_command_surface`.
|
|
18
20
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
21
|
+
* Mount failures are **bundled fail-closed, external best-effort** (R16). A
|
|
22
|
+
* bundled tool whose spec fails to mount throws `PluginIncompatibleError` so the
|
|
23
|
+
* composition root aborts startup (exit 5). External provenance (installed /
|
|
24
|
+
* project-local / user-global) keeps the warn-and-continue posture.
|
|
22
25
|
*
|
|
23
26
|
* @param registry The per-invocation tool registry to walk.
|
|
24
27
|
* @param program The root Commander program (host-owned; the composition root
|
|
25
28
|
* passes it — it is no longer reachable through the tool context, §8).
|
|
26
29
|
* @param ctx The per-invocation handler context (render/emit/scope — no program).
|
|
30
|
+
* @param provenance Admitted-tool provenance from bootstrap (required — no default).
|
|
31
|
+
* @throws {PluginIncompatibleError} When a bundled tool's command surface fails to mount.
|
|
27
32
|
*/
|
|
28
|
-
export function mountAllToolCommands(registry, program, ctx) {
|
|
33
|
+
export function mountAllToolCommands(registry, program, ctx, provenance) {
|
|
29
34
|
for (const tool of registry.list()) {
|
|
30
35
|
try {
|
|
31
36
|
mountOneTool(program, tool, ctx);
|
|
@@ -33,7 +38,31 @@ export function mountAllToolCommands(registry, program, ctx) {
|
|
|
33
38
|
catch (error) {
|
|
34
39
|
const msg = error instanceof Error ? error.message : String(error);
|
|
35
40
|
const human = tool.metadata.name ?? tool.metadata.id;
|
|
36
|
-
|
|
41
|
+
getBootstrapDiagnosticsBuffer().record({
|
|
42
|
+
severity: 'warning',
|
|
43
|
+
code: CLI_DIAGNOSTIC_CODES.OPENSIP_DISCOVERY_TOOL_LOAD_FAILED,
|
|
44
|
+
category: 'discovery',
|
|
45
|
+
message: `Tool ${human} failed to mount: ${msg}`,
|
|
46
|
+
impact: 'The tool commands are not available on the CLI surface.',
|
|
47
|
+
provenance: {
|
|
48
|
+
toolId: tool.metadata.id,
|
|
49
|
+
packageName: human,
|
|
50
|
+
discoverySource: 'mount',
|
|
51
|
+
},
|
|
52
|
+
detail: msg,
|
|
53
|
+
});
|
|
54
|
+
if (provenanceSourceFor(tool, provenance) === 'bundled') {
|
|
55
|
+
logger.warn({
|
|
56
|
+
evt: 'cli.tool.bundled_mount_failed',
|
|
57
|
+
module: BOOTSTRAP_MODULE,
|
|
58
|
+
toolId: tool.metadata.id,
|
|
59
|
+
toolName: human,
|
|
60
|
+
error: msg,
|
|
61
|
+
});
|
|
62
|
+
throw new PluginIncompatibleError(`bundled tool '${human}' failed to mount: ${msg}`, {
|
|
63
|
+
diagnostic: 'bundled command surface mount failed',
|
|
64
|
+
});
|
|
65
|
+
}
|
|
37
66
|
logger.warn({
|
|
38
67
|
evt: 'cli.tool.register_failed',
|
|
39
68
|
module: BOOTSTRAP_MODULE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-tools-mount.js","sourceRoot":"","sources":["../../src/bootstrap/register-tools-mount.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"register-tools-mount.js","sourceRoot":"","sources":["../../src/bootstrap/register-tools-mount.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,MAAM,EACN,uBAAuB,GAKxB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAsB,EACtB,OAAmB,EACnB,GAAmB,EACnB,UAAqC;IAErC,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;QACnC,IAAI,CAAC;YACH,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACnE,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACrD,6BAA6B,EAAE,CAAC,MAAM,CAAC;gBACrC,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,oBAAoB,CAAC,kCAAkC;gBAC7D,QAAQ,EAAE,WAAW;gBACr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AAS,4BAA4B,CAAC,OAAmB;IACvD,MAAM,SAAS,GAAG,CAAC,GAAe,EAAQ,EAAE;QAC1C,GAAG,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAChE,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ;YAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC,CAAC;IACF,SAAS,CAAC,OAAO,CAAC,CAAC;IACnB,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-tools.d.ts","sourceRoot":"","sources":["../../src/bootstrap/register-tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register-tools.d.ts","sourceRoot":"","sources":["../../src/bootstrap/register-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAK/B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAkChF;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAO5E;AAQD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,YAAY,EACtB,UAAU,GAAE,cAAc,EAAO,EACjC,SAAS,GAAE,kBAAkB,EAAO,EACpC,QAAQ,GAAE,SAAS,MAAM,EAA0B,GAClD,OAAO,CAAC,IAAI,CAAC,CAuCf;AA8DD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,gCAAgC,EAChC,KAAK,iBAAiB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,wBAAwB,EACxB,KAAK,gBAAgB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @fitness-ignore-file performance-anti-patterns -- sequential await across discovered tool packages preserves load order for plugin-conflict detection; bounded by installed plugin count
|
|
2
1
|
/**
|
|
3
2
|
* register-tools — populate the kernel ToolRegistry with bundled, installed,
|
|
4
3
|
* and authored tools (ADR-0027 / ADR-0041).
|
|
@@ -127,7 +126,6 @@ export async function registerFirstPartyTools(registry, provenance = [], manifes
|
|
|
127
126
|
explicitlyRequested: true,
|
|
128
127
|
});
|
|
129
128
|
if (!report.ok) {
|
|
130
|
-
// @fitness-ignore-next-line detached-promises -- synchronous never-returning thrower; the heuristic mistakes the bare call for an unawaited promise
|
|
131
129
|
throwBundledAdmissionFailure(packageName, report);
|
|
132
130
|
}
|
|
133
131
|
/* v8 ignore next 3 -- throwBundledAdmissionFailure never returns on a failed report; this guard narrows types */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-tools.js","sourceRoot":"","sources":["../../src/bootstrap/register-tools.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"register-tools.js","sourceRoot":"","sources":["../../src/bootstrap/register-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACL,MAAM,EACN,uBAAuB,GAIxB,MAAM,mBAAmB,CAAC;AAE3B,OAA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B,EACzB,+BAA+B,EAC/B,wBAAwB,GAEzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* render-bootstrap-diagnostics — host-owned stderr presentation for command-scoped
|
|
3
|
+
* bootstrap diagnostics (ADR-0060, Phase 5).
|
|
4
|
+
*/
|
|
5
|
+
import type { BootstrapDiagnosticsCollector } from '@opensip-cli/core';
|
|
6
|
+
/** True when the selected command owns its own bootstrap diagnostic surface. */
|
|
7
|
+
export declare function isDedicatedBootstrapDiagnosticCommand(commandPath: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Render bootstrap diagnostics relevant to the selected command. Unrelated
|
|
10
|
+
* installed-tool health stays silent on normal commands (ADR-0060).
|
|
11
|
+
*/
|
|
12
|
+
export declare function renderRelevantBootstrapDiagnostics(collector: BootstrapDiagnosticsCollector | undefined, toolId: string): void;
|
|
13
|
+
//# sourceMappingURL=render-bootstrap-diagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-bootstrap-diagnostics.d.ts","sourceRoot":"","sources":["../../src/bootstrap/render-bootstrap-diagnostics.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAMvE,gFAAgF;AAChF,wBAAgB,qCAAqC,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAElF;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,SAAS,EAAE,6BAA6B,GAAG,SAAS,EACpD,MAAM,EAAE,MAAM,GACb,IAAI,CAMN"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* render-bootstrap-diagnostics — host-owned stderr presentation for command-scoped
|
|
3
|
+
* bootstrap diagnostics (ADR-0060, Phase 5).
|
|
4
|
+
*/
|
|
5
|
+
import { renderDiagnosticsHuman } from '../ui/render-diagnostic.js';
|
|
6
|
+
const STDERR_HOST = {
|
|
7
|
+
writeStderr: (text) => process.stderr.write(text),
|
|
8
|
+
};
|
|
9
|
+
/** True when the selected command owns its own bootstrap diagnostic surface. */
|
|
10
|
+
export function isDedicatedBootstrapDiagnosticCommand(commandPath) {
|
|
11
|
+
return commandPath === 'tools doctor' || commandPath.endsWith(' doctor');
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Render bootstrap diagnostics relevant to the selected command. Unrelated
|
|
15
|
+
* installed-tool health stays silent on normal commands (ADR-0060).
|
|
16
|
+
*/
|
|
17
|
+
export function renderRelevantBootstrapDiagnostics(collector, toolId) {
|
|
18
|
+
if (collector === undefined)
|
|
19
|
+
return;
|
|
20
|
+
const relevant = collector.filterForCommand(toolId);
|
|
21
|
+
if (relevant.length > 0) {
|
|
22
|
+
renderDiagnosticsHuman(relevant, STDERR_HOST);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=render-bootstrap-diagnostics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-bootstrap-diagnostics.js","sourceRoot":"","sources":["../../src/bootstrap/render-bootstrap-diagnostics.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAIpE,MAAM,WAAW,GAAG;IAClB,WAAW,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;CAC1D,CAAC;AAEF,gFAAgF;AAChF,MAAM,UAAU,qCAAqC,CAAC,WAAmB;IACvE,OAAO,WAAW,KAAK,cAAc,IAAI,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAChD,SAAoD,EACpD,MAAc;IAEd,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO;IACpC,MAAM,QAAQ,GAAG,SAAS,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACpD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAChD,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-plane.d.ts","sourceRoot":"","sources":["../../src/bootstrap/run-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"run-plane.d.ts","sourceRoot":"","sources":["../../src/bootstrap/run-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAKL,KAAK,MAAM,EACX,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EAEjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAIxD,oFAAoF;AACpF,MAAM,WAAW,YAAY;IAC3B,yFAAyF;IACzF,QAAQ,CAAC,YAAY,EAAE,MAAM,SAAS,GAAG,SAAS,CAAC;IACnD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,mFAAmF;IACnF,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IACjC;;;;OAIG;IACH,kBAAkB,CAAC,YAAY,EAAE,uBAAuB,GAAG,sBAAsB,GAAG,SAAS,CAAC;IAC9F,kFAAkF;IAClF,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC3D;;;;;;;;;OASG;IACH,kBAAkB,CAChB,MAAM,EAAE,MAAM,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,GAC9C,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrC,8EAA8E;IAC9E,SAAS,IAAI,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,6FAA6F;IAC7F,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD;;;;;;;;;OASG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAC/B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,WAAW,EAAE,SAAS,OAAO,EAAE,KAC5B,OAAO,CAAC,OAAO,CAAC,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,wFAAwF;IACxF,QAAQ,IAAI,kBAAkB,CAAC;IAC/B,+FAA+F;IAC/F,OAAO,IAAI,kBAAkB,CAAC;CAC/B;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,eAAe,CA6IzE;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,eAAe,CAM9E;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,cAAc,CAa7E"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* result or exit code. When no datastore is in scope (non-project commands,
|
|
19
19
|
* tests) the plane writes nothing and returns `undefined`.
|
|
20
20
|
*/
|
|
21
|
-
import { createRunLifecycle, generatePrefixedId, logger as defaultLogger, } from '@opensip-cli/core';
|
|
21
|
+
import { createRunLifecycle, deriveRunOutcome, generatePrefixedId, logger as defaultLogger, } from '@opensip-cli/core';
|
|
22
22
|
import { SessionRepo } from '@opensip-cli/session-store';
|
|
23
23
|
const MODULE_TAG = 'cli:run-plane';
|
|
24
24
|
export function createRunPlaneFactory(deps) {
|
|
@@ -52,6 +52,10 @@ export function createRunPlaneFactory(deps) {
|
|
|
52
52
|
const persistStart = performance.now();
|
|
53
53
|
try {
|
|
54
54
|
const repo = new SessionRepo(datastore);
|
|
55
|
+
const runOutcome = deriveRunOutcome({
|
|
56
|
+
passed: contribution.passed,
|
|
57
|
+
explicit: contribution.runOutcome,
|
|
58
|
+
});
|
|
55
59
|
repo.save({
|
|
56
60
|
id,
|
|
57
61
|
tool: contribution.tool,
|
|
@@ -61,13 +65,16 @@ export function createRunPlaneFactory(deps) {
|
|
|
61
65
|
recipe: contribution.recipe,
|
|
62
66
|
score: contribution.score,
|
|
63
67
|
passed: contribution.passed,
|
|
68
|
+
runOutcome,
|
|
64
69
|
durationMs: snapshot.durationMs,
|
|
65
70
|
payload: contribution.payload,
|
|
66
71
|
});
|
|
67
72
|
sessionId = id;
|
|
68
73
|
// persistMs: host-side write cost, recorded on the sibling metrics row
|
|
69
74
|
// (separate clock from canonical durationMs).
|
|
70
|
-
repo.upsertHostMetrics(id, {
|
|
75
|
+
repo.upsertHostMetrics(id, {
|
|
76
|
+
persistMs: Math.max(0, performance.now() - persistStart),
|
|
77
|
+
});
|
|
71
78
|
log.info?.({
|
|
72
79
|
evt: 'cli.run-session.recorded',
|
|
73
80
|
module: MODULE_TAG,
|
|
@@ -123,9 +130,7 @@ export function createRunPlaneFactory(deps) {
|
|
|
123
130
|
// Both calls are SYNCHRONOUS best-effort writes (they return a value /
|
|
124
131
|
// void, not a promise); the detached-promise heuristic flags un-awaited
|
|
125
132
|
// calls inside this async fn by name. Nothing to await.
|
|
126
|
-
// @fitness-ignore-next-line detached-promises -- completeAndPersist is synchronous (returns RecordedToolRunSession | undefined)
|
|
127
133
|
completeAndPersist(completion.session);
|
|
128
|
-
// @fitness-ignore-next-line detached-promises -- recordHostMetrics is synchronous (returns void)
|
|
129
134
|
recordHostMetrics({ ttyBusyMs });
|
|
130
135
|
}
|
|
131
136
|
return completion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-plane.js","sourceRoot":"","sources":["../../src/bootstrap/run-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,IAAI,aAAa,GAQxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAKzD,MAAM,UAAU,GAAG,eAAe,CAAC;AAqFnC,MAAM,UAAU,qBAAqB,CAAC,IAAkB;IACtD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,aAAa,CAAC;IACzC,+EAA+E;IAC/E,IAAI,UAA0C,CAAC;IAE/C,SAAS,aAAa;QACpB,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;QAC7B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,qEAAqE;YACrE,yEAAyE;YACzE,8DAA8D;YAC9D,GAAG,CAAC,KAAK,EAAE,CAAC;gBACV,GAAG,EAAE,qCAAqC;gBAC1C,MAAM,EAAE,UAAU;gBAClB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAC9D,CAAC,CAAC;YACH,OAAO;QACT,CAAC;IACH,CAAC;IAED,SAAS,cAAc;QACrB,MAAM,SAAS,GAAG,kBAAkB,EAAE,CAAC;QACvC,IAAI,SAA6B,CAAC;QAElC,SAAS,OAAO,CACd,YAAqC,EACrC,QAA2B;YAE3B,MAAM,SAAS,GAAG,aAAa,EAAE,CAAC;YAClC,IAAI,CAAC,SAAS;gBAAE,OAAO;YACvB,MAAM,EAAE,GA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AU,KAAK,cAAc,EAAE,CAAC;YAChC,OAAO,UAAU,CAAC;QACpB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAwB;IAC3D,OAAO;QACL,IAAI,MAAM;YACR,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC;QACrC,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAwB;IAC3D,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE;YACb,OAAO,CAAC,QAAQ,EAAE,CAAC;QACrB,CAAC;QACD,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE;YACtB,MAAM,UAAU,GAAG,MAAuC,CAAC;YAC3D,MAAM,OAAO,GAAG,UAAU,EAAE,OAAO,CAAC;YACpC,oEAAoE;YACpE,2DAA2D;YAC3D,IAAI,OAAO;gBAAE,OAAO,CAAC,OAAO,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-seams.d.ts","sourceRoot":"","sources":["../../src/bootstrap/state-seams.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"state-seams.d.ts","sourceRoot":"","sources":["../../src/bootstrap/state-seams.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,IAAI,EAAE;IACpC,QAAQ,CAAC,YAAY,EAAE,MAAM,SAAS,CAAC;CACxC,GAAG,cAAc,CAAC,WAAW,CAAC,CAc9B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @fitness-ignore-file null-safety -- repoFor() returns a freshly constructed ToolStateRepo (never null); the heuristic misreads the fluent .put/.list calls
|
|
2
1
|
/**
|
|
3
2
|
* state-seams — the host implementation behind the `ToolCliContext.toolState`
|
|
4
3
|
* grouped seam (ADR-0042): durable keyed JSON persistence over the host-owned
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-seams.js","sourceRoot":"","sources":["../../src/bootstrap/state-seams.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"state-seams.js","sourceRoot":"","sources":["../../src/bootstrap/state-seams.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAkB,MAAM,wBAAwB,CAAC;AAIvE,uEAAuE;AACvE,MAAM,UAAU,eAAe,CAAC,IAE/B;IACC,MAAM,OAAO,GAAG,GAAkB,EAAE,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IAC5E,OAAO;QACL,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC7D,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;YAC1B,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;YAClC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;QACD,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YACpB,OAAO,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAC5B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;QACD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACtD,CAAC;AACJ,CAAC"}
|
|
@@ -2,44 +2,7 @@
|
|
|
2
2
|
* synthesize-external-tool — build a manifest-derived synthetic {@link Tool} for
|
|
3
3
|
* EXTERNAL provenance, so the HOST can register + mount an external tool's
|
|
4
4
|
* commands WITHOUT importing its untrusted runtime (ADR-0054 M4-G capstone).
|
|
5
|
-
*
|
|
6
|
-
* After M4-C…F every host consumer of an external tool's RUNTIME hooks either
|
|
7
|
-
* skips external provenance (config/capabilities/scope/report/replay all gate on
|
|
8
|
-
* `provenanceSourceFor`) or routes the hook to a worker. The ONLY thing the host
|
|
9
|
-
* still needs from an external `Tool` is the command SHELL for
|
|
10
|
-
* `mountAllToolCommands` (`commandSpecs`) — name, description, aliases, parent,
|
|
11
|
-
* commonFlags, options, args, scope, output, visibility. The capstone lifts that
|
|
12
|
-
* shell into the static manifest ({@link ToolCommandManifest}), so the host builds
|
|
13
|
-
* the registry entry from the manifest ALONE.
|
|
14
|
-
*
|
|
15
|
-
* The synthetic tool is a `Tool`-shaped object so EVERY `registry.list()` consumer
|
|
16
|
-
* keeps working unchanged. Its differences from a real runtime are exactly the
|
|
17
|
-
* things the host must never touch for external provenance:
|
|
18
|
-
*
|
|
19
|
-
* - NO `extensionPoints` — the host runs no external lifecycle/capability hooks
|
|
20
|
-
* (M4-F). The WORKER, which imports the real runtime, has the real hooks.
|
|
21
|
-
* - the per-command `handler` is a fail-loud DISPATCH STUB. The host NEVER calls
|
|
22
|
-
* it: `maybeDispatchExternal` (mount-command-spec.ts) intercepts external
|
|
23
|
-
* provenance and dispatches to the worker BEFORE the handler runs. The stub is
|
|
24
|
-
* insurance — if a refactor ever bypassed the hook, the run fails with a clear
|
|
25
|
-
* message instead of silently mis-running a no-op handler in-host.
|
|
26
|
-
*
|
|
27
|
-
* The WORKER never synthesizes: it re-runs the SAME bootstrap with
|
|
28
|
-
* `OPENSIP_CLI_IN_TOOL_WORKER=1`, so its discovery imports the real runtime (the
|
|
29
|
-
* isolation boundary). See `register-tools-discovery.ts` for the host/worker gate.
|
|
30
5
|
*/
|
|
31
6
|
import { defineTool, type ToolPluginManifest } from '@opensip-cli/core';
|
|
32
|
-
/**
|
|
33
|
-
* Build a manifest-derived synthetic {@link Tool} for an EXTERNAL admitted tool.
|
|
34
|
-
* The host registers + mounts it WITHOUT importing the tool's runtime. The
|
|
35
|
-
* `metadata` mirrors the runtime shape a real tool registers with (post-ADR-0048:
|
|
36
|
-
* `metadata.id` = stable UUID for modern tools, `metadata.name` = human key), so
|
|
37
|
-
* every registry/provenance/conflict matcher resolves it identically. No
|
|
38
|
-
* `extensionPoints` (the host runs no external hooks); each command's handler is
|
|
39
|
-
* a fail-loud dispatch stub.
|
|
40
|
-
*
|
|
41
|
-
* @param manifest The admitted static manifest (from `loadToolManifest` + the
|
|
42
|
-
* compatibility gate). Carries the command shells (ADR-0054 M4-G).
|
|
43
|
-
*/
|
|
44
7
|
export declare function synthesizeExternalTool(manifest: ToolPluginManifest): ReturnType<typeof defineTool>;
|
|
45
8
|
//# sourceMappingURL=synthesize-external-tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"synthesize-external-tool.d.ts","sourceRoot":"","sources":["../../src/bootstrap/synthesize-external-tool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"synthesize-external-tool.d.ts","sourceRoot":"","sources":["../../src/bootstrap/synthesize-external-tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,UAAU,EAOV,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAsC3B,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,kBAAkB,GAC3B,UAAU,CAAC,OAAO,UAAU,CAAC,CA4B/B"}
|