@open-agent-toolkit/cli 0.2.51 → 0.2.52
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/assets/bundle-metadata.json +1 -1
- package/assets/docs/cli-utilities/bootstrap.md +6 -2
- package/assets/docs/cli-utilities/tool-packs.md +87 -33
- package/assets/docs/provider-sync/commands.md +30 -2
- package/assets/docs/provider-sync/config.md +19 -0
- package/assets/docs/provider-sync/manifest-and-drift.md +37 -0
- package/assets/docs/provider-sync/providers.md +69 -2
- package/assets/docs/provider-sync/scope-and-surface.md +44 -0
- package/assets/docs/reference/cli-reference.md +1 -0
- package/assets/docs/reference/oat-directory-structure.md +11 -4
- package/assets/docs/workflows/projects/evidence-layers.md +110 -1
- package/assets/docs/workflows/projects/implementation-execution.md +13 -0
- package/assets/docs/workflows/projects/orchestration-model.md +18 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-dispatch-subagents/SKILL.md +57 -1
- package/assets/skills/oat-dispatch-subagents/references/record-schema.md +77 -1
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +1 -1
- package/assets/skills/oat-project-dispatch-subagents/SKILL.md +24 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +11 -0
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-plan-writing/SKILL.md +12 -1
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-review-provide/SKILL.md +12 -1
- package/assets/skills/oat-project-review-provide-remote/SKILL.md +12 -1
- package/dist/agents/canonical/index.d.ts +2 -0
- package/dist/agents/canonical/index.d.ts.map +1 -1
- package/dist/agents/canonical/index.js +1 -0
- package/dist/agents/canonical/resolve.d.ts +45 -0
- package/dist/agents/canonical/resolve.d.ts.map +1 -0
- package/dist/agents/canonical/resolve.js +175 -0
- package/dist/commands/decision/agents-guidance.d.ts +2 -2
- package/dist/commands/decision/agents-guidance.d.ts.map +1 -1
- package/dist/commands/decision/agents-guidance.js +1 -4
- package/dist/commands/decision/index.d.ts.map +1 -1
- package/dist/commands/decision/index.js +25 -6
- package/dist/commands/docs/init/index.d.ts +7 -1
- package/dist/commands/docs/init/index.d.ts.map +1 -1
- package/dist/commands/docs/init/index.js +53 -20
- package/dist/commands/doctor/index.d.ts +8 -2
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +157 -46
- package/dist/commands/init/index.d.ts +8 -3
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +64 -26
- package/dist/commands/init/tools/index.d.ts +12 -12
- package/dist/commands/init/tools/index.d.ts.map +1 -1
- package/dist/commands/init/tools/index.js +430 -99
- package/dist/commands/init/tools/install-state.d.ts +2 -0
- package/dist/commands/init/tools/install-state.d.ts.map +1 -1
- package/dist/commands/init/tools/install-state.js +11 -0
- package/dist/commands/init/tools/project-guidance.d.ts +49 -0
- package/dist/commands/init/tools/project-guidance.d.ts.map +1 -0
- package/dist/commands/init/tools/project-guidance.js +144 -0
- package/dist/commands/init/tools/workflows/index.d.ts +7 -0
- package/dist/commands/init/tools/workflows/index.d.ts.map +1 -1
- package/dist/commands/init/tools/workflows/index.js +160 -7
- package/dist/commands/pjm/index.d.ts.map +1 -1
- package/dist/commands/pjm/index.js +28 -3
- package/dist/commands/pjm/init.d.ts +5 -0
- package/dist/commands/pjm/init.d.ts.map +1 -1
- package/dist/commands/pjm/init.js +19 -3
- package/dist/commands/project/dispatch/index.d.ts +10 -0
- package/dist/commands/project/dispatch/index.d.ts.map +1 -0
- package/dist/commands/project/dispatch/index.js +137 -0
- package/dist/commands/project/dispatch/record.d.ts +91 -0
- package/dist/commands/project/dispatch/record.d.ts.map +1 -0
- package/dist/commands/project/dispatch/record.js +402 -0
- package/dist/commands/project/index.d.ts.map +1 -1
- package/dist/commands/project/index.js +2 -0
- package/dist/commands/providers/inspect/inspect.d.ts +8 -1
- package/dist/commands/providers/inspect/inspect.d.ts.map +1 -1
- package/dist/commands/providers/inspect/inspect.js +146 -26
- package/dist/commands/providers/list/list.d.ts +8 -1
- package/dist/commands/providers/list/list.d.ts.map +1 -1
- package/dist/commands/providers/list/list.js +139 -23
- package/dist/commands/providers/providers.types.d.ts +25 -1
- package/dist/commands/providers/providers.types.d.ts.map +1 -1
- package/dist/commands/providers/set/index.d.ts +9 -1
- package/dist/commands/providers/set/index.d.ts.map +1 -1
- package/dist/commands/providers/set/index.js +43 -33
- package/dist/commands/remove/skill/remove-skill.d.ts.map +1 -1
- package/dist/commands/remove/skill/remove-skill.js +11 -0
- package/dist/commands/shared/agents-md.d.ts +42 -14
- package/dist/commands/shared/agents-md.d.ts.map +1 -1
- package/dist/commands/shared/agents-md.js +364 -70
- package/dist/commands/status/index.d.ts +8 -3
- package/dist/commands/status/index.d.ts.map +1 -1
- package/dist/commands/status/index.js +147 -32
- package/dist/commands/sync/apply.d.ts.map +1 -1
- package/dist/commands/sync/apply.js +220 -29
- package/dist/commands/sync/dry-run.d.ts.map +1 -1
- package/dist/commands/sync/dry-run.js +30 -6
- package/dist/commands/sync/index.d.ts +17 -2
- package/dist/commands/sync/index.d.ts.map +1 -1
- package/dist/commands/sync/index.js +106 -41
- package/dist/commands/sync/sync.types.d.ts +39 -2
- package/dist/commands/sync/sync.types.d.ts.map +1 -1
- package/dist/commands/sync/sync.utils.d.ts +5 -1
- package/dist/commands/sync/sync.utils.d.ts.map +1 -1
- package/dist/commands/sync/sync.utils.js +73 -0
- package/dist/commands/tools/info/info-tool.d.ts +2 -0
- package/dist/commands/tools/info/info-tool.d.ts.map +1 -1
- package/dist/commands/tools/info/info-tool.js +34 -12
- package/dist/commands/tools/install/index.d.ts.map +1 -1
- package/dist/commands/tools/install/index.js +19 -3
- package/dist/commands/tools/list/list-tools.d.ts +2 -0
- package/dist/commands/tools/list/list-tools.d.ts.map +1 -1
- package/dist/commands/tools/list/list-tools.js +36 -7
- package/dist/commands/tools/remove/index.d.ts.map +1 -1
- package/dist/commands/tools/remove/index.js +150 -21
- package/dist/commands/tools/remove/remove-tools.d.ts +20 -0
- package/dist/commands/tools/remove/remove-tools.d.ts.map +1 -1
- package/dist/commands/tools/remove/remove-tools.js +122 -1
- package/dist/commands/tools/shared/format-pack-inventory.d.ts +19 -0
- package/dist/commands/tools/shared/format-pack-inventory.d.ts.map +1 -1
- package/dist/commands/tools/shared/format-pack-inventory.js +109 -0
- package/dist/commands/tools/shared/pack-evidence.d.ts +66 -0
- package/dist/commands/tools/shared/pack-evidence.d.ts.map +1 -0
- package/dist/commands/tools/shared/pack-evidence.js +132 -0
- package/dist/commands/tools/shared/pack-inventory.d.ts +1 -0
- package/dist/commands/tools/shared/pack-inventory.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-lifecycle-outcome.d.ts +44 -0
- package/dist/commands/tools/shared/pack-lifecycle-outcome.d.ts.map +1 -0
- package/dist/commands/tools/shared/pack-lifecycle-outcome.js +91 -0
- package/dist/commands/tools/update/index.d.ts.map +1 -1
- package/dist/commands/tools/update/index.js +74 -4
- package/dist/commands/tools/update/update-tools.d.ts +5 -0
- package/dist/commands/tools/update/update-tools.d.ts.map +1 -1
- package/dist/commands/tools/update/update-tools.js +64 -2
- package/dist/config/oat-config.d.ts +5 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +17 -5
- package/dist/config/user-sync-config.d.ts +1 -0
- package/dist/config/user-sync-config.d.ts.map +1 -1
- package/dist/config/user-sync-config.js +8 -0
- package/dist/drift/detector.d.ts +2 -2
- package/dist/drift/detector.d.ts.map +1 -1
- package/dist/drift/detector.js +18 -0
- package/dist/drift/strays.d.ts.map +1 -1
- package/dist/drift/strays.js +5 -0
- package/dist/engine/collection-sync.d.ts +14 -0
- package/dist/engine/collection-sync.d.ts.map +1 -0
- package/dist/engine/collection-sync.js +282 -0
- package/dist/engine/compute-plan.d.ts +8 -1
- package/dist/engine/compute-plan.d.ts.map +1 -1
- package/dist/engine/compute-plan.js +303 -12
- package/dist/engine/engine.types.d.ts +61 -0
- package/dist/engine/engine.types.d.ts.map +1 -1
- package/dist/engine/execute-plan.d.ts +22 -2
- package/dist/engine/execute-plan.d.ts.map +1 -1
- package/dist/engine/execute-plan.js +459 -27
- package/dist/engine/provider-path-safety.d.ts +1 -0
- package/dist/engine/provider-path-safety.d.ts.map +1 -1
- package/dist/engine/provider-path-safety.js +15 -0
- package/dist/engine/scanner.d.ts +2 -2
- package/dist/engine/scanner.d.ts.map +1 -1
- package/dist/engine/scanner.js +21 -4
- package/dist/fs/io.d.ts +67 -0
- package/dist/fs/io.d.ts.map +1 -1
- package/dist/fs/io.js +536 -3
- package/dist/manifest/index.d.ts +2 -2
- package/dist/manifest/index.d.ts.map +1 -1
- package/dist/manifest/index.js +1 -1
- package/dist/manifest/manager.d.ts +2 -2
- package/dist/manifest/manager.d.ts.map +1 -1
- package/dist/manifest/manager.js +20 -3
- package/dist/manifest/manifest.types.d.ts +704 -13
- package/dist/manifest/manifest.types.d.ts.map +1 -1
- package/dist/manifest/manifest.types.js +131 -15
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +41 -10
- package/dist/providers/cursor/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/cursor/codec/sync-extension.js +41 -10
- package/dist/providers/identity/absolute-paths.d.ts +68 -0
- package/dist/providers/identity/absolute-paths.d.ts.map +1 -0
- package/dist/providers/identity/absolute-paths.js +144 -0
- package/dist/providers/identity/claude-runtime-observation.d.ts +105 -0
- package/dist/providers/identity/claude-runtime-observation.d.ts.map +1 -0
- package/dist/providers/identity/claude-runtime-observation.fixtures.d.ts +40 -0
- package/dist/providers/identity/claude-runtime-observation.fixtures.d.ts.map +1 -0
- package/dist/providers/identity/claude-runtime-observation.fixtures.js +146 -0
- package/dist/providers/identity/claude-runtime-observation.js +229 -0
- package/dist/providers/identity/codex-runtime-observation.d.ts +75 -0
- package/dist/providers/identity/codex-runtime-observation.d.ts.map +1 -0
- package/dist/providers/identity/codex-runtime-observation.fixtures.d.ts +37 -0
- package/dist/providers/identity/codex-runtime-observation.fixtures.d.ts.map +1 -0
- package/dist/providers/identity/codex-runtime-observation.fixtures.js +539 -0
- package/dist/providers/identity/codex-runtime-observation.js +255 -0
- package/dist/providers/identity/generic-dispatch-record.d.ts +313 -0
- package/dist/providers/identity/generic-dispatch-record.d.ts.map +1 -0
- package/dist/providers/identity/generic-dispatch-record.js +539 -0
- package/dist/providers/identity/oat-dispatch-record.d.ts +1964 -0
- package/dist/providers/identity/oat-dispatch-record.d.ts.map +1 -0
- package/dist/providers/identity/oat-dispatch-record.js +691 -0
- package/dist/providers/identity/runtime-observation.d.ts +100 -0
- package/dist/providers/identity/runtime-observation.d.ts.map +1 -0
- package/dist/providers/identity/runtime-observation.js +169 -0
- package/dist/providers/shared/index.d.ts +2 -0
- package/dist/providers/shared/index.d.ts.map +1 -1
- package/dist/providers/shared/index.js +1 -0
- package/dist/providers/shared/materialization-extension.d.ts +12 -0
- package/dist/providers/shared/materialization-extension.d.ts.map +1 -1
- package/dist/providers/shared/registry.d.ts +69 -0
- package/dist/providers/shared/registry.d.ts.map +1 -0
- package/dist/providers/shared/registry.js +252 -0
- package/dist/providers/shared/restart-adviser.d.ts +26 -0
- package/dist/providers/shared/restart-adviser.d.ts.map +1 -0
- package/dist/providers/shared/restart-adviser.js +96 -0
- package/dist/shared/types.d.ts +4 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,117 @@
|
|
|
1
|
+
import { packScopeFactsFromInventory, projectPackEvidence, unavailablePackScopeFacts, } from './pack-evidence.js';
|
|
2
|
+
import { formatPackPath } from './pack-paths.js';
|
|
3
|
+
export function unavailablePackEvidence(input) {
|
|
4
|
+
const reason = redactPackText(input.reason, input.roots ?? {});
|
|
5
|
+
const facts = input.scopes.map((scope) => unavailablePackScopeFacts({
|
|
6
|
+
scope,
|
|
7
|
+
reason,
|
|
8
|
+
intent: {
|
|
9
|
+
pack: input.pack,
|
|
10
|
+
scope,
|
|
11
|
+
enabled: false,
|
|
12
|
+
source: 'none',
|
|
13
|
+
configPath: `${scope === 'project' ? '<project>' : '~'}/.oat/config.json`,
|
|
14
|
+
diagnostics: [],
|
|
15
|
+
},
|
|
16
|
+
}));
|
|
17
|
+
return projectPackEvidence({ canonical: null, scopes: facts });
|
|
18
|
+
}
|
|
19
|
+
function redactPackText(text, roots) {
|
|
20
|
+
let redacted = text;
|
|
21
|
+
const replacements = [
|
|
22
|
+
...(roots.projectRoot ? [[roots.projectRoot, '.']] : []),
|
|
23
|
+
...(roots.userRoot ? [[roots.userRoot, '~']] : []),
|
|
24
|
+
].sort(([left], [right]) => right.length - left.length);
|
|
25
|
+
for (const [root, replacement] of replacements) {
|
|
26
|
+
redacted = redacted
|
|
27
|
+
.replaceAll(`${root}/`, `${replacement}/`)
|
|
28
|
+
.replaceAll(root, replacement);
|
|
29
|
+
}
|
|
30
|
+
return redacted;
|
|
31
|
+
}
|
|
32
|
+
function redactPackInventory(inventory, roots) {
|
|
33
|
+
return {
|
|
34
|
+
...inventory,
|
|
35
|
+
scopes: inventory.scopes.map((scoped) => ({
|
|
36
|
+
...scoped,
|
|
37
|
+
intent: {
|
|
38
|
+
...scoped.intent,
|
|
39
|
+
configPath: formatPackPath(scoped.intent.configPath, roots),
|
|
40
|
+
},
|
|
41
|
+
assets: scoped.assets.map((asset) => ({
|
|
42
|
+
...asset,
|
|
43
|
+
path: formatPackPath(asset.path, roots),
|
|
44
|
+
})),
|
|
45
|
+
diagnostics: scoped.diagnostics.map((diagnostic) => ({
|
|
46
|
+
...diagnostic,
|
|
47
|
+
paths: diagnostic.paths.map((path) => formatPackPath(path, roots)),
|
|
48
|
+
})),
|
|
49
|
+
})),
|
|
50
|
+
diagnostics: inventory.diagnostics.map((diagnostic) => ({
|
|
51
|
+
...diagnostic,
|
|
52
|
+
paths: diagnostic.paths.map((path) => formatPackPath(path, roots)),
|
|
53
|
+
})),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export function projectRenderablePackEvidence(canonical, roots) {
|
|
57
|
+
const redacted = redactPackInventory(canonical, roots);
|
|
58
|
+
const evidence = projectPackEvidence({
|
|
59
|
+
canonical: redacted,
|
|
60
|
+
scopes: redacted.scopes.map(packScopeFactsFromInventory),
|
|
61
|
+
});
|
|
62
|
+
const providerDiagnostics = redacted.scopes.flatMap((scoped) => scoped.diagnostics
|
|
63
|
+
.filter(({ code }) => code === 'user-agent-unmaterialized')
|
|
64
|
+
.map((diagnostic) => ({
|
|
65
|
+
code: 'provider-materialization-missing',
|
|
66
|
+
severity: 'warning',
|
|
67
|
+
pack: redacted.pack,
|
|
68
|
+
scope: scoped.scope,
|
|
69
|
+
contentKind: 'agent',
|
|
70
|
+
affectedAssets: diagnostic.paths,
|
|
71
|
+
source: 'pack-inventory',
|
|
72
|
+
detail: diagnostic.message,
|
|
73
|
+
recovery: [
|
|
74
|
+
{
|
|
75
|
+
code: 'install-project-scope',
|
|
76
|
+
command: `oat tools install ${redacted.pack} --scope project`,
|
|
77
|
+
message: 'Install the pack at project scope for native provider materialization.',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
})));
|
|
81
|
+
return {
|
|
82
|
+
...evidence,
|
|
83
|
+
diagnostics: [...evidence.diagnostics, ...providerDiagnostics],
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export function packEvidenceBlock(items) {
|
|
87
|
+
const diagnostics = items.flatMap(({ diagnostics: values }) => values);
|
|
88
|
+
return {
|
|
89
|
+
schemaVersion: 1,
|
|
90
|
+
status: diagnostics.length > 0 ? 'partial' : 'ok',
|
|
91
|
+
items,
|
|
92
|
+
diagnostics,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
1
95
|
function versionEvidence(installed, bundled) {
|
|
2
96
|
if (installed === null && bundled === null)
|
|
3
97
|
return '';
|
|
4
98
|
return `; versions=${installed ?? '-'} -> ${bundled ?? '-'}`;
|
|
5
99
|
}
|
|
100
|
+
export function formatPackEvidenceDetails(evidence, indent = ' ') {
|
|
101
|
+
const lines = [`${indent}Realized placement: ${evidence.realizedPlacement}`];
|
|
102
|
+
for (const scoped of evidence.scopes) {
|
|
103
|
+
lines.push(`${indent}${scoped.scope}: ${scoped.realization}; completeness=${scoped.completeness}; health=${scoped.health}; intent=${scoped.intent.source}`);
|
|
104
|
+
if (scoped.inventory.reason) {
|
|
105
|
+
lines.push(`${indent} Inventory: ${scoped.inventory.reason}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
for (const diagnostic of evidence.diagnostics) {
|
|
109
|
+
lines.push(`${indent}${diagnostic.code}: ${diagnostic.detail}`, ...(diagnostic.affectedAssets.length > 0
|
|
110
|
+
? [`${indent} Affected: ${diagnostic.affectedAssets.join(', ')}`]
|
|
111
|
+
: []), ...diagnostic.recovery.map(({ command, message }) => `${indent} Fix: ${message}${command ? ` (${command})` : ''}`));
|
|
112
|
+
}
|
|
113
|
+
return lines;
|
|
114
|
+
}
|
|
6
115
|
export function formatPackInventoryDetails(inventory, indent = ' ') {
|
|
7
116
|
const lines = [];
|
|
8
117
|
for (const scoped of inventory.scopes) {
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ConcreteScope } from '../../../shared/types.js';
|
|
2
|
+
import type { PackInventory, ScopedPackInventory } from './pack-inventory.js';
|
|
3
|
+
import type { PackCompleteness, PackName } from './types.js';
|
|
4
|
+
export type ScopeRealization = 'present' | 'absent' | 'unknown';
|
|
5
|
+
export type RealizedPackPlacement = 'project' | 'user' | 'both' | 'none' | 'unknown';
|
|
6
|
+
export type PackHealth = 'absent' | 'current' | 'drifted' | 'newer' | 'mixed' | 'unknown';
|
|
7
|
+
export interface PackScopeFacts {
|
|
8
|
+
scope: ConcreteScope;
|
|
9
|
+
intent: ScopedPackInventory['intent'];
|
|
10
|
+
inventory: {
|
|
11
|
+
state: 'available' | 'unavailable';
|
|
12
|
+
source: 'pack-inventory';
|
|
13
|
+
reason?: string;
|
|
14
|
+
};
|
|
15
|
+
completeness: PackCompleteness | 'unknown';
|
|
16
|
+
health: PackHealth;
|
|
17
|
+
realization: ScopeRealization;
|
|
18
|
+
}
|
|
19
|
+
export interface RecoveryAction {
|
|
20
|
+
code: string;
|
|
21
|
+
command?: string;
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
export interface PackEvidenceDiagnostic {
|
|
25
|
+
code: 'inventory-unavailable' | 'declared-only' | 'partial-placement' | 'duplicate-placement' | 'provider-inactive' | 'provider-unsupported' | 'provider-materialization-missing' | 'provider-materialization-failed' | 'visibility-unknown' | 'refresh-required' | 'restart-required';
|
|
26
|
+
severity: 'info' | 'warning' | 'error';
|
|
27
|
+
pack: PackName;
|
|
28
|
+
scope?: ConcreteScope;
|
|
29
|
+
provider?: string;
|
|
30
|
+
contentKind?: 'skill' | 'agent' | 'rule' | 'directory';
|
|
31
|
+
affectedAssets: readonly string[];
|
|
32
|
+
source: string;
|
|
33
|
+
detail: string;
|
|
34
|
+
recovery: readonly RecoveryAction[];
|
|
35
|
+
}
|
|
36
|
+
export interface ProviderReachabilityEvidence {
|
|
37
|
+
provider: string;
|
|
38
|
+
scope: ConcreteScope;
|
|
39
|
+
contentKind: 'skill' | 'agent' | 'rule' | 'directory';
|
|
40
|
+
assets: readonly string[];
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
export interface ToolPackEvidence {
|
|
44
|
+
schemaVersion: 1;
|
|
45
|
+
pack: PackName;
|
|
46
|
+
canonical: PackInventory | null;
|
|
47
|
+
scopes: readonly PackScopeFacts[];
|
|
48
|
+
knownRealizedScopes: readonly ConcreteScope[];
|
|
49
|
+
unknownScopes: readonly ConcreteScope[];
|
|
50
|
+
realizedPlacement: RealizedPackPlacement;
|
|
51
|
+
providers: readonly ProviderReachabilityEvidence[];
|
|
52
|
+
diagnostics: readonly PackEvidenceDiagnostic[];
|
|
53
|
+
}
|
|
54
|
+
export declare function packScopeFactsFromInventory(inventory: ScopedPackInventory): PackScopeFacts;
|
|
55
|
+
export declare function unavailablePackScopeFacts(input: {
|
|
56
|
+
scope: ConcreteScope;
|
|
57
|
+
intent: ScopedPackInventory['intent'];
|
|
58
|
+
reason: string;
|
|
59
|
+
}): PackScopeFacts;
|
|
60
|
+
export declare function hasScopedPackRealizationEvidence(inventory: ScopedPackInventory): boolean;
|
|
61
|
+
export declare function projectPackEvidence(input: {
|
|
62
|
+
canonical: PackInventory | null;
|
|
63
|
+
scopes: readonly PackScopeFacts[];
|
|
64
|
+
providers?: readonly ProviderReachabilityEvidence[];
|
|
65
|
+
}): ToolPackEvidence;
|
|
66
|
+
//# sourceMappingURL=pack-evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-evidence.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/pack-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAmB,gBAAgB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE3E,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAChE,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,CAAC;AACd,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,SAAS,GACT,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,CAAC;AAEd,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACtC,SAAS,EAAE;QACT,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AC,CAAC;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC;IAClC,mBAAmB,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,aAAa,EAAE,SAAS,aAAa,EAAE,CAAC;IACxC,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,SAAS,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACnD,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;CAChD;AAYD,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,mBAAmB,GAC7B,cAAc,CAkBhB;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC/C,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,cAAc,CAajB;AAED,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,mBAAmB,GAC7B,OAAO,CAOT;AA0ED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,4BAA4B,EAAE,CAAC;CACrD,GAAG,gBAAgB,CAwBnB"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
function healthForStatuses(statuses) {
|
|
2
|
+
const present = statuses.filter((status) => status !== 'missing');
|
|
3
|
+
if (present.length === 0)
|
|
4
|
+
return 'absent';
|
|
5
|
+
const states = new Set(present);
|
|
6
|
+
if (states.size === 1 && states.has('current'))
|
|
7
|
+
return 'current';
|
|
8
|
+
if (states.size === 1 && states.has('newer'))
|
|
9
|
+
return 'newer';
|
|
10
|
+
if (states.has('outdated'))
|
|
11
|
+
return states.size === 1 ? 'drifted' : 'mixed';
|
|
12
|
+
return states.size === 1 ? 'current' : 'mixed';
|
|
13
|
+
}
|
|
14
|
+
export function packScopeFactsFromInventory(inventory) {
|
|
15
|
+
return {
|
|
16
|
+
scope: inventory.scope,
|
|
17
|
+
intent: inventory.intent,
|
|
18
|
+
inventory: { state: 'available', source: 'pack-inventory' },
|
|
19
|
+
completeness: inventory.completeness,
|
|
20
|
+
health: healthForStatuses(inventory.assets
|
|
21
|
+
.filter(({ definition }) => definition.ownership[inventory.scope] === 'managed')
|
|
22
|
+
.map(({ status }) => status)),
|
|
23
|
+
realization: hasScopedPackRealizationEvidence(inventory)
|
|
24
|
+
? 'present'
|
|
25
|
+
: 'absent',
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export function unavailablePackScopeFacts(input) {
|
|
29
|
+
return {
|
|
30
|
+
scope: input.scope,
|
|
31
|
+
intent: input.intent,
|
|
32
|
+
inventory: {
|
|
33
|
+
state: 'unavailable',
|
|
34
|
+
source: 'pack-inventory',
|
|
35
|
+
reason: input.reason,
|
|
36
|
+
},
|
|
37
|
+
completeness: 'unknown',
|
|
38
|
+
health: 'unknown',
|
|
39
|
+
realization: 'unknown',
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function hasScopedPackRealizationEvidence(inventory) {
|
|
43
|
+
return inventory.assets.some(({ definition, status }) => definition.sharedOwner === undefined &&
|
|
44
|
+
definition.ownership[inventory.scope] === 'managed' &&
|
|
45
|
+
status !== 'missing');
|
|
46
|
+
}
|
|
47
|
+
function placementForScopes(scopes) {
|
|
48
|
+
if (scopes.some(({ realization }) => realization === 'unknown')) {
|
|
49
|
+
return 'unknown';
|
|
50
|
+
}
|
|
51
|
+
const realized = scopes
|
|
52
|
+
.filter(({ realization }) => realization === 'present')
|
|
53
|
+
.map(({ scope }) => scope);
|
|
54
|
+
if (realized.includes('project') && realized.includes('user'))
|
|
55
|
+
return 'both';
|
|
56
|
+
return realized[0] ?? 'none';
|
|
57
|
+
}
|
|
58
|
+
function canonicalDiagnostics(pack, scopes) {
|
|
59
|
+
const diagnostics = [];
|
|
60
|
+
for (const facts of scopes) {
|
|
61
|
+
if (facts.inventory.state === 'unavailable') {
|
|
62
|
+
diagnostics.push({
|
|
63
|
+
code: 'inventory-unavailable',
|
|
64
|
+
severity: 'error',
|
|
65
|
+
pack,
|
|
66
|
+
scope: facts.scope,
|
|
67
|
+
affectedAssets: [],
|
|
68
|
+
source: facts.inventory.source,
|
|
69
|
+
detail: facts.inventory.reason ?? `${facts.scope} inventory unavailable`,
|
|
70
|
+
recovery: [],
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
else if (facts.intent.enabled && facts.realization === 'absent') {
|
|
74
|
+
diagnostics.push({
|
|
75
|
+
code: 'declared-only',
|
|
76
|
+
severity: 'warning',
|
|
77
|
+
pack,
|
|
78
|
+
scope: facts.scope,
|
|
79
|
+
affectedAssets: [],
|
|
80
|
+
source: 'pack-inventory',
|
|
81
|
+
detail: `Pack ${pack} is declared at ${facts.scope} scope but has no realized managed assets`,
|
|
82
|
+
recovery: [],
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (facts.completeness === 'partial') {
|
|
86
|
+
diagnostics.push({
|
|
87
|
+
code: 'partial-placement',
|
|
88
|
+
severity: 'warning',
|
|
89
|
+
pack,
|
|
90
|
+
scope: facts.scope,
|
|
91
|
+
affectedAssets: [],
|
|
92
|
+
source: 'pack-inventory',
|
|
93
|
+
detail: `Pack ${pack} is only partially realized at ${facts.scope} scope`,
|
|
94
|
+
recovery: [],
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (scopes.filter(({ realization }) => realization === 'present').length === 2) {
|
|
99
|
+
diagnostics.push({
|
|
100
|
+
code: 'duplicate-placement',
|
|
101
|
+
severity: 'warning',
|
|
102
|
+
pack,
|
|
103
|
+
affectedAssets: [],
|
|
104
|
+
source: 'pack-inventory',
|
|
105
|
+
detail: `Pack ${pack} is realized at project and user scope`,
|
|
106
|
+
recovery: [],
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return diagnostics;
|
|
110
|
+
}
|
|
111
|
+
export function projectPackEvidence(input) {
|
|
112
|
+
const pack = input.canonical?.pack ??
|
|
113
|
+
input.scopes[0]?.intent.pack ??
|
|
114
|
+
(() => {
|
|
115
|
+
throw new Error('Pack evidence requires canonical inventory or scope facts');
|
|
116
|
+
})();
|
|
117
|
+
return {
|
|
118
|
+
schemaVersion: 1,
|
|
119
|
+
pack,
|
|
120
|
+
canonical: input.canonical,
|
|
121
|
+
scopes: input.scopes,
|
|
122
|
+
knownRealizedScopes: input.scopes
|
|
123
|
+
.filter(({ realization }) => realization === 'present')
|
|
124
|
+
.map(({ scope }) => scope),
|
|
125
|
+
unknownScopes: input.scopes
|
|
126
|
+
.filter(({ realization }) => realization === 'unknown')
|
|
127
|
+
.map(({ scope }) => scope),
|
|
128
|
+
realizedPlacement: placementForScopes(input.scopes),
|
|
129
|
+
providers: input.providers ?? [],
|
|
130
|
+
diagnostics: canonicalDiagnostics(pack, input.scopes),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
@@ -24,6 +24,7 @@ export interface ScopedPackInventory {
|
|
|
24
24
|
}
|
|
25
25
|
export interface PackInventory {
|
|
26
26
|
pack: PackName;
|
|
27
|
+
/** @deprecated Use ToolPackEvidence.realizedPlacement for truthful placement. */
|
|
27
28
|
placement: 'project' | 'user' | 'both' | 'unavailable';
|
|
28
29
|
scopes: ScopedPackInventory[];
|
|
29
30
|
diagnostics: PackDiagnostic[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack-inventory.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/pack-inventory.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,eAAe,CAAC;AAIvB,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,QAAQ,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AAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAiRD,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,mBAAmB,CAAC,CAwC9B;AAED,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,mBAAmB,GAC7B,OAAO,CAUT;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE,aAAa,EAAE,GAC3B,aAAa,EAAE,CAgEjB;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,aAAa,CAAC,CAiDxB"}
|
|
1
|
+
{"version":3,"file":"pack-inventory.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/pack-inventory.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,eAAe,CAAC;AAIvB,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACT,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,mBAAmB,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,eAAe,CAAC;IACxB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EACA,uBAAuB,GACvB,iBAAiB,GACjB,0BAA0B,GAC1B,2BAA2B,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,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Result } from './auto-sync.js';
|
|
3
|
+
import { type ProviderReachabilityEvidence, type RecoveryAction, type ToolPackEvidence } from './pack-evidence.js';
|
|
4
|
+
import type { PackLifecycleResult } from './pack-lifecycle.js';
|
|
5
|
+
import type { PackName } from './types.js';
|
|
6
|
+
export interface PackScopeSelection {
|
|
7
|
+
pack: PackName;
|
|
8
|
+
requested: ConcreteScope | 'both';
|
|
9
|
+
retainedRealizedScopes: readonly ConcreteScope[];
|
|
10
|
+
targetScopes: readonly ConcreteScope[];
|
|
11
|
+
}
|
|
12
|
+
export interface ProviderSyncOutcome {
|
|
13
|
+
scopes: readonly ConcreteScope[];
|
|
14
|
+
status: 'not-run' | 'complete' | 'partial' | 'failed';
|
|
15
|
+
providers: readonly ProviderReachabilityEvidence[];
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface PackLifecycleOutcome {
|
|
19
|
+
schemaVersion: 1;
|
|
20
|
+
selection: PackScopeSelection;
|
|
21
|
+
canonical: {
|
|
22
|
+
status: 'unchanged' | 'applied' | 'failed' | 'verification-failed';
|
|
23
|
+
results: readonly PackLifecycleResult[];
|
|
24
|
+
};
|
|
25
|
+
sync: ProviderSyncOutcome;
|
|
26
|
+
finalEvidence: ToolPackEvidence | null;
|
|
27
|
+
status: 'complete' | 'partial' | 'failed';
|
|
28
|
+
recovery: readonly RecoveryAction[];
|
|
29
|
+
}
|
|
30
|
+
export declare function resolveAdditivePackScopeSelection(input: {
|
|
31
|
+
pack: PackName;
|
|
32
|
+
requested: ConcreteScope | 'both';
|
|
33
|
+
knownRealizedScopes: readonly ConcreteScope[];
|
|
34
|
+
unknownScopes: readonly ConcreteScope[];
|
|
35
|
+
}): PackScopeSelection;
|
|
36
|
+
export declare function providerSyncOutcomeFromAutoSync(result: AutoSyncResult, providers?: readonly ProviderReachabilityEvidence[]): ProviderSyncOutcome;
|
|
37
|
+
export declare function evaluatePackLifecycleOutcome(input: {
|
|
38
|
+
selection: PackScopeSelection;
|
|
39
|
+
lifecycle: readonly PackLifecycleResult[];
|
|
40
|
+
sync: ProviderSyncOutcome;
|
|
41
|
+
finalEvidence: ToolPackEvidence | null;
|
|
42
|
+
canonicalFailure?: string;
|
|
43
|
+
}): PackLifecycleOutcome;
|
|
44
|
+
//# sourceMappingURL=pack-lifecycle-outcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-lifecycle-outcome.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/pack-lifecycle-outcome.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,aAAa,GAAG,MAAM,CAAC;IAClC,sBAAsB,EAAE,SAAS,aAAa,EAAE,CAAC;IACjD,YAAY,EAAE,SAAS,aAAa,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;IACjC,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IACtD,SAAS,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,CAAC,CAAC;IACjB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE;QACT,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,qBAAqB,CAAC;QACnE,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;KACzC,CAAC;IACF,IAAI,EAAE,mBAAmB,CAAC;IAC1B,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACvC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC1C,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC;AASD,wBAAgB,iCAAiC,CAAC,KAAK,EAAE;IACvD,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,aAAa,GAAG,MAAM,CAAC;IAClC,mBAAmB,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,aAAa,EAAE,SAAS,aAAa,EAAE,CAAC;CACzC,GAAG,kBAAkB,CAkBrB;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,cAAc,EACtB,SAAS,GAAE,SAAS,4BAA4B,EAAO,GACtD,mBAAmB,CAYrB;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IAClD,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC1C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,oBAAoB,CAqEvB"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { hasScopedPackRealizationEvidence, } from './pack-evidence.js';
|
|
2
|
+
const SCOPE_ORDER = ['project', 'user'];
|
|
3
|
+
function orderedScopes(scopes) {
|
|
4
|
+
const selected = new Set(scopes);
|
|
5
|
+
return SCOPE_ORDER.filter((scope) => selected.has(scope));
|
|
6
|
+
}
|
|
7
|
+
export function resolveAdditivePackScopeSelection(input) {
|
|
8
|
+
if (input.unknownScopes.length > 0) {
|
|
9
|
+
throw new Error(`Cannot select scope for ${input.pack}: inventory is unknown at ${input.unknownScopes.join(', ')} scope`);
|
|
10
|
+
}
|
|
11
|
+
const retainedRealizedScopes = orderedScopes(input.knownRealizedScopes);
|
|
12
|
+
const requestedScopes = input.requested === 'both' ? SCOPE_ORDER : [input.requested];
|
|
13
|
+
return {
|
|
14
|
+
pack: input.pack,
|
|
15
|
+
requested: input.requested,
|
|
16
|
+
retainedRealizedScopes,
|
|
17
|
+
targetScopes: orderedScopes([
|
|
18
|
+
...retainedRealizedScopes,
|
|
19
|
+
...requestedScopes,
|
|
20
|
+
]),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export function providerSyncOutcomeFromAutoSync(result, providers = []) {
|
|
24
|
+
return {
|
|
25
|
+
scopes: result.scopes,
|
|
26
|
+
status: result.scopes.length === 0
|
|
27
|
+
? 'not-run'
|
|
28
|
+
: result.synced
|
|
29
|
+
? 'complete'
|
|
30
|
+
: 'failed',
|
|
31
|
+
providers,
|
|
32
|
+
...(result.error ? { error: result.error } : {}),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export function evaluatePackLifecycleOutcome(input) {
|
|
36
|
+
const recovery = [];
|
|
37
|
+
let canonicalStatus;
|
|
38
|
+
if (input.canonicalFailure) {
|
|
39
|
+
canonicalStatus = 'failed';
|
|
40
|
+
recovery.push({
|
|
41
|
+
code: 'canonical-apply-failed',
|
|
42
|
+
message: input.canonicalFailure,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
else if (input.lifecycle.length === 0) {
|
|
46
|
+
canonicalStatus = 'unchanged';
|
|
47
|
+
}
|
|
48
|
+
else if (input.lifecycle.some(({ apply }) => apply !== null && !hasScopedPackRealizationEvidence(apply.inventory))) {
|
|
49
|
+
canonicalStatus = 'verification-failed';
|
|
50
|
+
recovery.push({
|
|
51
|
+
code: 'canonical-verification-failed',
|
|
52
|
+
message: `Re-run installation for ${input.selection.pack} and inspect pack status`,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
canonicalStatus = input.lifecycle.some(({ apply }) => apply && apply.applied.length > 0)
|
|
57
|
+
? 'applied'
|
|
58
|
+
: 'unchanged';
|
|
59
|
+
}
|
|
60
|
+
const verified = input.finalEvidence !== null &&
|
|
61
|
+
input.finalEvidence.unknownScopes.length === 0 &&
|
|
62
|
+
input.selection.targetScopes.every((scope) => input.finalEvidence.knownRealizedScopes.includes(scope));
|
|
63
|
+
if (!verified && canonicalStatus !== 'failed') {
|
|
64
|
+
canonicalStatus = 'verification-failed';
|
|
65
|
+
recovery.push({
|
|
66
|
+
code: 'final-inventory-unverified',
|
|
67
|
+
message: `Re-run status for ${input.selection.pack}; final placement could not be verified`,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (input.sync.status === 'partial' || input.sync.status === 'failed') {
|
|
71
|
+
recovery.push({
|
|
72
|
+
code: 'provider-sync-incomplete',
|
|
73
|
+
message: input.sync.error ??
|
|
74
|
+
`Run oat sync for ${input.sync.scopes.join(', ') || 'the selected'} scope`,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
const status = canonicalStatus === 'failed' || canonicalStatus === 'verification-failed'
|
|
78
|
+
? 'failed'
|
|
79
|
+
: input.sync.status === 'partial' || input.sync.status === 'failed'
|
|
80
|
+
? 'partial'
|
|
81
|
+
: 'complete';
|
|
82
|
+
return {
|
|
83
|
+
schemaVersion: 1,
|
|
84
|
+
selection: input.selection,
|
|
85
|
+
canonical: { status: canonicalStatus, results: input.lifecycle },
|
|
86
|
+
sync: input.sync,
|
|
87
|
+
finalEvidence: input.finalEvidence,
|
|
88
|
+
status,
|
|
89
|
+
recovery,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/update/index.ts"],"names":[],"mappings":"AAgBA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/update/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AAS1C,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAKvE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAG7B,MAAM,gBAAgB,CAAC;AAmBxB,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAAA;CAAE,GAClD,MAAM,EAAE,CAaV;AAgCD,wBAAgB,wBAAwB,CACtC,YAAY,GAAE,uBAA6C,EAC3D,gBAAgB,GAAE,oBAA8C,GAC/D,OAAO,CAkPT;AAwCD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAS7E;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,YAAY,GACnB,OAAO,CAOT;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,OAAO,GACd,MAAM,CAMR"}
|
|
@@ -10,6 +10,7 @@ import { readGlobalOptions, resolveConcreteScopes, } from '../../shared/shared.u
|
|
|
10
10
|
import { autoSync, } from '../../tools/shared/auto-sync.js';
|
|
11
11
|
import { inventoryScopedPack } from '../../tools/shared/pack-inventory.js';
|
|
12
12
|
import { reconcilePackLifecycles } from '../../tools/shared/pack-lifecycle.js';
|
|
13
|
+
import { evaluatePackLifecycleOutcome, } from '../../tools/shared/pack-lifecycle-outcome.js';
|
|
13
14
|
import { reconcileProjectToolsConfig } from '../../tools/shared/project-tools-config.js';
|
|
14
15
|
import { scanTools } from '../../tools/shared/scan-tools.js';
|
|
15
16
|
import { readOatConfig, writeOatConfig } from '../../../config/oat-config.js';
|
|
@@ -17,7 +18,7 @@ import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
|
17
18
|
import { fileExists } from '../../../fs/io.js';
|
|
18
19
|
import { resolveProjectRoot, resolveScopeRoot } from '../../../fs/paths.js';
|
|
19
20
|
import { Command } from 'commander';
|
|
20
|
-
import { updateTools, } from './update-tools.js';
|
|
21
|
+
import { failedUpdateLifecycleOutcomes, updateTools, } from './update-tools.js';
|
|
21
22
|
const defaultDependencies = {
|
|
22
23
|
scanTools,
|
|
23
24
|
resolveScopeRoot: async (scope, cwd, home) => {
|
|
@@ -95,7 +96,29 @@ export function createToolsUpdateCommand(dependencies = defaultDependencies, syn
|
|
|
95
96
|
const target = targetResolution.target;
|
|
96
97
|
const scopes = resolveConcreteScopes(context.scope);
|
|
97
98
|
const dryRun = opts.dryRun ?? false;
|
|
98
|
-
|
|
99
|
+
let result;
|
|
100
|
+
try {
|
|
101
|
+
result = await updateTools(target, scopes, context.cwd, context.home, dryRun, dependencies);
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
if (target.kind === 'name')
|
|
105
|
+
throw error;
|
|
106
|
+
const lifecycle = failedUpdateLifecycleOutcomes(target, scopes, error);
|
|
107
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
108
|
+
if (context.json) {
|
|
109
|
+
logger.json({
|
|
110
|
+
target: describeTarget(target),
|
|
111
|
+
dryRun,
|
|
112
|
+
result: createEmptyUpdateResult(),
|
|
113
|
+
lifecycle,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
logger.error(`Pack update failed: ${message}`);
|
|
118
|
+
}
|
|
119
|
+
process.exitCode = 1;
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
99
122
|
const assetsRoot = dryRun ? null : await dependencies.resolveAssetsRoot();
|
|
100
123
|
if (!dryRun && shouldBackfillWorkflowGitignore(result)) {
|
|
101
124
|
const repoRoot = await resolveProjectRoot(context.cwd);
|
|
@@ -162,6 +185,7 @@ export function createToolsUpdateCommand(dependencies = defaultDependencies, syn
|
|
|
162
185
|
return;
|
|
163
186
|
}
|
|
164
187
|
// Auto-sync after mutations (before output so sync errors are captured)
|
|
188
|
+
const syncResults = [];
|
|
165
189
|
if (!dryRun && opts.sync !== false) {
|
|
166
190
|
for (const scope of scopes) {
|
|
167
191
|
const installedCanonicalPaths = [
|
|
@@ -172,16 +196,23 @@ export function createToolsUpdateCommand(dependencies = defaultDependencies, syn
|
|
|
172
196
|
const updatedAtScope = result.updated.some((tool) => tool.scope === scope);
|
|
173
197
|
if (!updatedAtScope && installedCanonicalPaths.length === 0)
|
|
174
198
|
continue;
|
|
175
|
-
await autoSync([scope], context.cwd, context.home, logger, syncDependencies, { installedCanonicalPaths });
|
|
199
|
+
syncResults.push(await autoSync([scope], context.cwd, context.home, logger, syncDependencies, { installedCanonicalPaths }));
|
|
176
200
|
}
|
|
177
201
|
}
|
|
202
|
+
const lifecycle = finalizeUpdateLifecycle(result.lifecycle, syncResults);
|
|
203
|
+
const legacyResult = { ...result };
|
|
204
|
+
delete legacyResult.lifecycle;
|
|
178
205
|
if (context.json) {
|
|
179
206
|
logger.json({
|
|
180
207
|
target: describeTarget(target),
|
|
181
208
|
dryRun,
|
|
182
|
-
result,
|
|
209
|
+
result: legacyResult,
|
|
183
210
|
...(adoptedPacks.length > 0 ? { adoptedPacks } : {}),
|
|
211
|
+
...(lifecycle ? { lifecycle } : {}),
|
|
184
212
|
});
|
|
213
|
+
if (lifecycle?.some(({ status }) => status !== 'complete')) {
|
|
214
|
+
process.exitCode = 1;
|
|
215
|
+
}
|
|
185
216
|
return;
|
|
186
217
|
}
|
|
187
218
|
for (const pack of adoptedPacks) {
|
|
@@ -213,6 +244,45 @@ export function createToolsUpdateCommand(dependencies = defaultDependencies, syn
|
|
|
213
244
|
if (result.updated.length === 0 && result.assetRefreshes.length === 0) {
|
|
214
245
|
logger.info('No tools to update.');
|
|
215
246
|
}
|
|
247
|
+
for (const outcome of lifecycle ?? []) {
|
|
248
|
+
if (outcome.status === 'complete')
|
|
249
|
+
continue;
|
|
250
|
+
logger.warn(`Pack ${outcome.selection.pack} update ${outcome.status}: ${outcome.recovery.map(({ message }) => message).join('; ')}`);
|
|
251
|
+
process.exitCode = 1;
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
function createEmptyUpdateResult() {
|
|
256
|
+
return {
|
|
257
|
+
updated: [],
|
|
258
|
+
current: [],
|
|
259
|
+
newer: [],
|
|
260
|
+
notInstalled: [],
|
|
261
|
+
notBundled: [],
|
|
262
|
+
assetRefreshes: [],
|
|
263
|
+
plans: [],
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function finalizeUpdateLifecycle(lifecycle, syncResults) {
|
|
267
|
+
if (!lifecycle || syncResults.length === 0)
|
|
268
|
+
return lifecycle;
|
|
269
|
+
return lifecycle.map((outcome) => {
|
|
270
|
+
const relevant = syncResults.filter(({ scopes }) => scopes.some((scope) => outcome.selection.targetScopes.includes(scope)));
|
|
271
|
+
if (relevant.length === 0)
|
|
272
|
+
return outcome;
|
|
273
|
+
return evaluatePackLifecycleOutcome({
|
|
274
|
+
selection: outcome.selection,
|
|
275
|
+
lifecycle: outcome.canonical.results,
|
|
276
|
+
sync: {
|
|
277
|
+
scopes: [...new Set(relevant.flatMap(({ scopes }) => scopes))],
|
|
278
|
+
status: relevant.every(({ synced }) => synced) ? 'complete' : 'failed',
|
|
279
|
+
providers: [],
|
|
280
|
+
...(relevant.find(({ error }) => error)?.error
|
|
281
|
+
? { error: relevant.find(({ error }) => error).error }
|
|
282
|
+
: {}),
|
|
283
|
+
},
|
|
284
|
+
finalEvidence: outcome.finalEvidence,
|
|
285
|
+
});
|
|
216
286
|
});
|
|
217
287
|
}
|
|
218
288
|
/**
|
|
@@ -3,6 +3,7 @@ import type { ApplyOatCoreResult } from '../../init/gitignore.js';
|
|
|
3
3
|
import type { CopyStatus } from '../../init/tools/shared/copy-helpers.js';
|
|
4
4
|
import type { InventoryScopedPackInput, ScopedPackInventory } from '../../tools/shared/pack-inventory.js';
|
|
5
5
|
import { type PackLifecycleRequest, type PackLifecycleResult } from '../../tools/shared/pack-lifecycle.js';
|
|
6
|
+
import { type PackLifecycleOutcome } from '../../tools/shared/pack-lifecycle-outcome.js';
|
|
6
7
|
import type { PackReconcilePlan } from '../../tools/shared/pack-reconcile.js';
|
|
7
8
|
import type { ScanToolsOptions } from '../../tools/shared/scan-tools.js';
|
|
8
9
|
import type { PackName, ToolInfo } from '../../tools/shared/types.js';
|
|
@@ -31,6 +32,7 @@ export interface UpdateResult {
|
|
|
31
32
|
notBundled: ToolInfo[];
|
|
32
33
|
assetRefreshes: PackAssetRefresh[];
|
|
33
34
|
plans: PackReconcilePlan[];
|
|
35
|
+
lifecycle?: PackLifecycleOutcome[];
|
|
34
36
|
}
|
|
35
37
|
export interface UpdateToolsDependencies {
|
|
36
38
|
scanTools: (options: ScanToolsOptions) => Promise<ToolInfo[]>;
|
|
@@ -48,4 +50,7 @@ export interface UpdateToolsDependencies {
|
|
|
48
50
|
}) => Promise<PackLifecycleResult[]>;
|
|
49
51
|
}
|
|
50
52
|
export declare function updateTools(target: UpdateTarget, scopes: ConcreteScope[], cwd: string, home: string, dryRun: boolean, dependencies: UpdateToolsDependencies): Promise<UpdateResult>;
|
|
53
|
+
export declare function failedUpdateLifecycleOutcomes(target: Exclude<UpdateTarget, {
|
|
54
|
+
kind: 'name';
|
|
55
|
+
}>, scopes: readonly ConcreteScope[], error: unknown): PackLifecycleOutcome[];
|
|
51
56
|
//# sourceMappingURL=update-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-tools.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/update/update-tools.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0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