@open-agent-toolkit/cli 0.2.62 → 0.2.64
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/config-and-local-state.md +1 -0
- package/assets/docs/cli-utilities/configuration.md +10 -8
- package/assets/docs/cli-utilities/project-log.md +16 -0
- package/assets/docs/cli-utilities/tool-packs.md +83 -0
- package/assets/docs/cli-utilities/workflow-gates.md +124 -16
- package/assets/docs/contributing/skills.md +42 -7
- package/assets/docs/provider-sync/commands.md +3 -0
- package/assets/docs/provider-sync/instruction-sync.md +107 -0
- package/assets/docs/provider-sync/manifest-and-drift.md +105 -0
- package/assets/docs/reference/cli-reference.md +16 -6
- package/assets/docs/reference/oat-directory-structure.md +32 -31
- package/assets/docs/workflows/projects/lifecycle.md +45 -0
- package/assets/docs/workflows/projects/picking-up-projects.md +14 -0
- package/assets/docs/workflows/skills/explainer-kit.md +10 -4
- package/assets/docs/workflows/skills/repo-improve.md +15 -1
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/create-agnostic-skill/SKILL.md +9 -7
- package/assets/skills/create-agnostic-skill/references/skill-template.md +9 -7
- package/assets/skills/oat-explainer-kit/SKILL.md +14 -1
- package/assets/skills/oat-explainer-kit/references/config-contract.md +12 -0
- package/assets/skills/oat-explainer-kit/references/lifecycle-contract.md +57 -10
- package/assets/skills/oat-explainer-kit/scripts/check-terminal-outcome.mjs +28 -5
- package/assets/skills/oat-explainer-kit/scripts/probe-recap-seams.mjs +371 -0
- package/assets/skills/oat-explainer-kit/scripts/resolve-intent.mjs +123 -1
- package/assets/skills/oat-project-autonomous/SKILL.md +10 -1
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +122 -121
- package/assets/skills/oat-project-complete/SKILL.md +134 -4
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +122 -121
- package/assets/skills/oat-project-implement/SKILL.md +1 -1
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +38 -6
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +122 -121
- package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +122 -121
- package/assets/skills/oat-project-next/SKILL.md +62 -19
- package/assets/skills/oat-project-plan/SKILL.md +31 -5
- package/assets/skills/oat-project-pr-final/SKILL.md +281 -6
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +122 -121
- package/assets/skills/oat-project-progress/SKILL.md +12 -3
- package/assets/skills/oat-project-quick-start/SKILL.md +264 -4
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +122 -121
- package/assets/skills/oat-project-summary/SKILL.md +34 -23
- package/assets/skills/oat-repo-improve/SKILL.md +40 -5
- package/assets/skills/oat-repo-improve/references/plan-template.md +84 -7
- package/dist/agents/canonical/resolve.d.ts.map +1 -1
- package/dist/agents/canonical/resolve.js +25 -4
- package/dist/commands/config/index.d.ts +1 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +401 -18
- package/dist/commands/doctor/index.d.ts +7 -0
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +10 -2
- package/dist/commands/gate/index.d.ts +3 -1
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +699 -211
- package/dist/commands/init/tools/index.d.ts.map +1 -1
- package/dist/commands/init/tools/index.js +68 -36
- package/dist/commands/init/tools/shared/skill-script-references.d.ts +126 -0
- package/dist/commands/init/tools/shared/skill-script-references.d.ts.map +1 -0
- package/dist/commands/init/tools/shared/skill-script-references.js +311 -0
- package/dist/commands/instructions/instructions.types.d.ts +63 -0
- package/dist/commands/instructions/instructions.types.d.ts.map +1 -1
- package/dist/commands/instructions/instructions.utils.d.ts +51 -2
- package/dist/commands/instructions/instructions.utils.d.ts.map +1 -1
- package/dist/commands/instructions/instructions.utils.js +201 -4
- package/dist/commands/instructions/sync/sync.d.ts.map +1 -1
- package/dist/commands/instructions/sync/sync.js +12 -1
- package/dist/commands/instructions/validate/validate.d.ts.map +1 -1
- package/dist/commands/instructions/validate/validate.js +12 -1
- package/dist/commands/project/log/append.d.ts +195 -0
- package/dist/commands/project/log/append.d.ts.map +1 -1
- package/dist/commands/project/log/append.js +1034 -11
- package/dist/commands/shared/frontmatter.d.ts +51 -0
- package/dist/commands/shared/frontmatter.d.ts.map +1 -1
- package/dist/commands/shared/frontmatter.js +118 -6
- package/dist/commands/status/index.d.ts.map +1 -1
- package/dist/commands/status/index.js +5 -3
- package/dist/commands/sync/index.d.ts +14 -0
- package/dist/commands/sync/index.d.ts.map +1 -1
- package/dist/commands/sync/index.js +21 -0
- package/dist/commands/tools/info/index.d.ts.map +1 -1
- package/dist/commands/tools/info/index.js +14 -1
- package/dist/commands/tools/info/info-tool.d.ts +12 -0
- package/dist/commands/tools/info/info-tool.d.ts.map +1 -1
- package/dist/commands/tools/info/info-tool.js +54 -6
- package/dist/commands/tools/info/skill-views.d.ts +86 -0
- package/dist/commands/tools/info/skill-views.d.ts.map +1 -0
- package/dist/commands/tools/info/skill-views.js +383 -0
- package/dist/commands/tools/install/index.d.ts.map +1 -1
- package/dist/commands/tools/install/index.js +3 -25
- 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 +23 -4
- package/dist/commands/tools/remove/index.d.ts.map +1 -1
- package/dist/commands/tools/remove/index.js +35 -42
- package/dist/commands/tools/remove/remove-tools.d.ts +3 -2
- package/dist/commands/tools/remove/remove-tools.d.ts.map +1 -1
- package/dist/commands/tools/remove/remove-tools.js +14 -4
- package/dist/commands/tools/shared/auto-sync.d.ts +12 -1
- package/dist/commands/tools/shared/auto-sync.d.ts.map +1 -1
- package/dist/commands/tools/shared/auto-sync.js +20 -4
- package/dist/commands/tools/shared/format-pack-inventory.d.ts +12 -1
- package/dist/commands/tools/shared/format-pack-inventory.d.ts.map +1 -1
- package/dist/commands/tools/shared/format-pack-inventory.js +48 -6
- package/dist/commands/tools/shared/in-process-sync.d.ts +11 -0
- package/dist/commands/tools/shared/in-process-sync.d.ts.map +1 -0
- package/dist/commands/tools/shared/in-process-sync.js +79 -0
- package/dist/commands/tools/shared/pack-evidence.d.ts +78 -2
- package/dist/commands/tools/shared/pack-evidence.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-evidence.js +96 -2
- package/dist/commands/tools/shared/pack-lifecycle-outcome.d.ts +11 -0
- package/dist/commands/tools/shared/pack-lifecycle-outcome.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-lifecycle-outcome.js +24 -3
- package/dist/commands/tools/shared/pack-provider-evidence.d.ts +73 -0
- package/dist/commands/tools/shared/pack-provider-evidence.d.ts.map +1 -0
- package/dist/commands/tools/shared/pack-provider-evidence.js +161 -0
- package/dist/commands/tools/shared/provider-context.d.ts +88 -0
- package/dist/commands/tools/shared/provider-context.d.ts.map +1 -0
- package/dist/commands/tools/shared/provider-context.js +77 -0
- package/dist/commands/tools/shared/provider-reachability.d.ts +93 -0
- package/dist/commands/tools/shared/provider-reachability.d.ts.map +1 -0
- package/dist/commands/tools/shared/provider-reachability.js +358 -0
- package/dist/commands/tools/shared/sync-evidence.d.ts +57 -0
- package/dist/commands/tools/shared/sync-evidence.d.ts.map +1 -0
- package/dist/commands/tools/shared/sync-evidence.js +147 -0
- package/dist/commands/tools/update/index.d.ts +0 -4
- package/dist/commands/tools/update/index.d.ts.map +1 -1
- package/dist/commands/tools/update/index.js +22 -40
- package/dist/commands/tools/update/update-tools.d.ts.map +1 -1
- package/dist/commands/tools/update/update-tools.js +23 -8
- package/dist/config/json.d.ts +36 -0
- package/dist/config/json.d.ts.map +1 -1
- package/dist/config/json.js +135 -3
- package/dist/config/oat-config.d.ts +41 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +111 -0
- package/dist/drift/index.d.ts +2 -0
- package/dist/drift/index.d.ts.map +1 -1
- package/dist/drift/index.js +1 -0
- package/dist/drift/skill-view-diagnostic.d.ts +197 -0
- package/dist/drift/skill-view-diagnostic.d.ts.map +1 -0
- package/dist/drift/skill-view-diagnostic.js +343 -0
- package/dist/validation/skills.d.ts +1 -0
- package/dist/validation/skills.d.ts.map +1 -1
- package/dist/validation/skills.js +181 -19
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove-tools.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/remove/remove-tools.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"remove-tools.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/remove/remove-tools.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,+CAA+C,CAAC;AAIvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAEV,QAAQ,EACR,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAMtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,G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,oBAAoB,EAAE,CA2ExB;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAC/C,MAAM,EAAE,SAAS,aAAa,EAAE,EAChC,KAAK,EAAE,OAAO,GACb,oBAAoB,EAAE,CAsBxB;AAED,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAC/C,MAAM,EAAE,SAAS,aAAa,EAAE,EAChC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,EACvC,KAAK,EAAE,cAAc,GAAG,iBAAiB,EACzC,UAAU,EAAE,QAAQ,EACpB,WAAW,EAAE,aAAa,EAC1B,KAAK,EAAE,OAAO,GACb,oBAAoB,EAAE,CAwCxB"}
|
|
@@ -2,7 +2,9 @@ import { join } from 'node:path';
|
|
|
2
2
|
import { packScopeFactsFromInventory, projectPackEvidence, } from '../../tools/shared/pack-evidence.js';
|
|
3
3
|
import { hasScopedPackPlacementEvidence, } from '../../tools/shared/pack-inventory.js';
|
|
4
4
|
import {} from '../../tools/shared/pack-lifecycle.js';
|
|
5
|
+
import { notRunProviderSyncOutcome, } from '../../tools/shared/pack-lifecycle-outcome.js';
|
|
5
6
|
import { PACK_MANIFEST } from '../../tools/shared/pack-manifest.js';
|
|
7
|
+
import { lifecycleProviderEvidence } from '../../tools/shared/pack-provider-evidence.js';
|
|
6
8
|
import { resolveSharedOwnerRetentions } from '../../tools/shared/pack-reconcile.js';
|
|
7
9
|
import { resolveManagedScopeRoots, validateManagedPath, } from '../../../fs/paths.js';
|
|
8
10
|
function matchesTarget(tool, target) {
|
|
@@ -286,7 +288,7 @@ export async function removeTools(target, scopes, cwd, home, dryRun, deps) {
|
|
|
286
288
|
lifecycle: removalLifecycleOutcomes(selectedPacks(target), scopes, packOutcomes, dryRun, finalInventories),
|
|
287
289
|
};
|
|
288
290
|
}
|
|
289
|
-
export function removalLifecycleOutcomes(packs, scopes, outcomes, dryRun, finalInventories) {
|
|
291
|
+
export function removalLifecycleOutcomes(packs, scopes, outcomes, dryRun, finalInventories, providerContexts = []) {
|
|
290
292
|
if (finalInventories.length === 0)
|
|
291
293
|
return [];
|
|
292
294
|
return packs.map((pack) => {
|
|
@@ -333,7 +335,15 @@ export function removalLifecycleOutcomes(packs, scopes, outcomes, dryRun, finalI
|
|
|
333
335
|
status: removed && !dryRun ? 'applied' : 'unchanged',
|
|
334
336
|
results: [],
|
|
335
337
|
},
|
|
336
|
-
|
|
338
|
+
// After a completed removal the pack has no realized assets, so the
|
|
339
|
+
// mapper legitimately produces no rows; a retained or dry-run pack still
|
|
340
|
+
// reports its providers.
|
|
341
|
+
sync: notRunProviderSyncOutcome(lifecycleProviderEvidence({
|
|
342
|
+
pack,
|
|
343
|
+
scopedInventories: packInventories,
|
|
344
|
+
providerContexts,
|
|
345
|
+
scopes,
|
|
346
|
+
}), 'Auto-sync has not run for this operation'),
|
|
337
347
|
finalEvidence,
|
|
338
348
|
status: verified ? 'complete' : inventoryVerified ? 'partial' : 'failed',
|
|
339
349
|
recovery,
|
|
@@ -353,7 +363,7 @@ export function failedRemovalLifecycleOutcomes(target, scopes, error) {
|
|
|
353
363
|
targetScopes: scopes,
|
|
354
364
|
},
|
|
355
365
|
canonical: { status: 'failed', results: [] },
|
|
356
|
-
sync:
|
|
366
|
+
sync: notRunProviderSyncOutcome([], 'Canonical removal failed before auto-sync'),
|
|
357
367
|
finalEvidence: null,
|
|
358
368
|
status: 'failed',
|
|
359
369
|
recovery: [{ code: 'canonical-apply-failed', message }],
|
|
@@ -383,7 +393,7 @@ export function failedPostRemovalLifecycleOutcomes(target, scopes, outcomes, sta
|
|
|
383
393
|
status: canonicalApplied ? 'applied' : 'unchanged',
|
|
384
394
|
results: [],
|
|
385
395
|
},
|
|
386
|
-
sync:
|
|
396
|
+
sync: notRunProviderSyncOutcome([], `Auto-sync did not run because the ${stageLabel}`),
|
|
387
397
|
finalEvidence: null,
|
|
388
398
|
status: 'failed',
|
|
389
399
|
recovery: scopes.map((scope) => ({
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
import type { ConcreteScope } from '../../../shared/types.js';
|
|
2
2
|
import type { CliLogger } from '../../../ui/logger.js';
|
|
3
|
+
import { type SyncRunEvidence } from './sync-evidence.js';
|
|
3
4
|
export interface AutoSyncDependencies {
|
|
5
|
+
/**
|
|
6
|
+
* Runs one scope's sync and returns its normalized evidence.
|
|
7
|
+
*
|
|
8
|
+
* The production implementation runs sync in-process and consumes the
|
|
9
|
+
* evidence object directly; it does not spawn `oat sync --json` and parse
|
|
10
|
+
* stdout. Returning `void` is still accepted so an injected test double or a
|
|
11
|
+
* caller that only needs the success/failure signal stays valid.
|
|
12
|
+
*/
|
|
4
13
|
runSync: (options: {
|
|
5
14
|
scope: ConcreteScope;
|
|
6
15
|
cwd: string;
|
|
7
16
|
home: string;
|
|
8
17
|
installedCanonicalPaths?: string[];
|
|
9
18
|
removedCanonicalPaths?: string[];
|
|
10
|
-
}) => Promise<void>;
|
|
19
|
+
}) => Promise<SyncRunEvidence | void>;
|
|
11
20
|
}
|
|
12
21
|
export interface AutoSyncResult {
|
|
13
22
|
synced: boolean;
|
|
14
23
|
scopes: ConcreteScope[];
|
|
15
24
|
error: string | null;
|
|
25
|
+
/** One entry per scope the run reached, in the order it ran them. */
|
|
26
|
+
evidence: readonly SyncRunEvidence[];
|
|
16
27
|
}
|
|
17
28
|
export interface AutoSyncOptions {
|
|
18
29
|
installedCanonicalPaths?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-sync.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/auto-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,WAAW,o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,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,SAAS,EACjB,YAAY,EAAE,oBAAoB,EAClC,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,cAAc,CAAC,CAwCzB"}
|
|
@@ -1,23 +1,39 @@
|
|
|
1
|
+
import { emptySyncRunEvidence } from './sync-evidence.js';
|
|
1
2
|
export async function autoSync(scopes, cwd, home, logger, dependencies, options) {
|
|
2
3
|
if (scopes.length === 0) {
|
|
3
|
-
return { synced: false, scopes: [], error: null };
|
|
4
|
+
return { synced: false, scopes: [], error: null, evidence: [] };
|
|
4
5
|
}
|
|
6
|
+
const evidence = [];
|
|
5
7
|
try {
|
|
6
8
|
for (const scope of scopes) {
|
|
7
|
-
await dependencies.runSync({
|
|
9
|
+
const result = await dependencies.runSync({
|
|
8
10
|
scope,
|
|
9
11
|
cwd,
|
|
10
12
|
home,
|
|
11
13
|
installedCanonicalPaths: options?.installedCanonicalPaths,
|
|
12
14
|
removedCanonicalPaths: options?.removedCanonicalPaths,
|
|
13
15
|
});
|
|
16
|
+
evidence.push(result ?? { ...emptySyncRunEvidence(scope), ran: true });
|
|
17
|
+
}
|
|
18
|
+
// A sync can fail without throwing: `runSyncApply` reports failed
|
|
19
|
+
// operations and returns normally. Treating that as success is what let a
|
|
20
|
+
// failed sync print `Auto-sync completed.` and exit 0. The evidence is
|
|
21
|
+
// kept either way so the failed provider rows survive.
|
|
22
|
+
const failedOperations = evidence.reduce((total, run) => total + run.failedOperations, 0);
|
|
23
|
+
if (failedOperations > 0) {
|
|
24
|
+
const message = `oat sync reported ${failedOperations} failed operation(s)`;
|
|
25
|
+
logger.warn(`Auto-sync failed: ${message}`);
|
|
26
|
+
return { synced: false, scopes, error: message, evidence };
|
|
14
27
|
}
|
|
15
28
|
logger.info('Auto-sync completed.');
|
|
16
|
-
return { synced: true, scopes, error: null };
|
|
29
|
+
return { synced: true, scopes, error: null, evidence };
|
|
17
30
|
}
|
|
18
31
|
catch (err) {
|
|
19
32
|
const message = err instanceof Error ? err.message : String(err);
|
|
20
33
|
logger.warn(`Auto-sync failed: ${message}`);
|
|
21
|
-
|
|
34
|
+
// Evidence collected before the failure is preserved: a two-scope run that
|
|
35
|
+
// failed on the second scope still reached the first, and discarding that
|
|
36
|
+
// would report a reachable provider as unknown.
|
|
37
|
+
return { synced: false, scopes, error: message, evidence };
|
|
22
38
|
}
|
|
23
39
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ProviderScopeContext } from '../../../providers/shared/registry.js';
|
|
1
2
|
import type { ConcreteScope } from '../../../shared/types.js';
|
|
2
3
|
import { type PackEvidenceDiagnostic, type ToolPackEvidence } from './pack-evidence.js';
|
|
3
4
|
import type { PackInventory } from './pack-inventory.js';
|
|
@@ -15,7 +16,17 @@ export declare function unavailablePackEvidence(input: {
|
|
|
15
16
|
reason: string;
|
|
16
17
|
roots?: PackPathRoots;
|
|
17
18
|
}): ToolPackEvidence;
|
|
18
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Projects a renderable pack evidence item.
|
|
21
|
+
*
|
|
22
|
+
* `providerContexts` is the config-aware provider context per scope. When it
|
|
23
|
+
* is supplied, provider reachability is mapped from the registry and the
|
|
24
|
+
* resulting `provider-materialization-missing` diagnostics name the provider.
|
|
25
|
+
* When it is absent — a surface that could not resolve a sync config — the
|
|
26
|
+
* unattributed inventory-derived diagnostic is emitted instead, so the
|
|
27
|
+
* warning is never silently lost.
|
|
28
|
+
*/
|
|
29
|
+
export declare function projectRenderablePackEvidence(canonical: PackInventory, roots: PackPathRoots, providerContexts?: readonly ProviderScopeContext[]): ToolPackEvidence;
|
|
19
30
|
export declare function packEvidenceBlock(items: readonly ToolPackEvidence[]): PackEvidenceBlockV1;
|
|
20
31
|
export declare function formatPackEvidenceDetails(evidence: ToolPackEvidence, indent?: string): string[];
|
|
21
32
|
export declare function formatPackInventoryDetails(inventory: PackInventory, indent?: string): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-pack-inventory.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/format-pack-inventory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"format-pack-inventory.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/format-pack-inventory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,CAAC,CAAC;IACjB,MAAM,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC;IACnC,KAAK,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACnC,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;CAChD;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,GAAG,gBAAgB,CAoBnB;AA4CD;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,aAAa,EACpB,gBAAgB,CAAC,EAAE,SAAS,oBAAoB,EAAE,GACjD,gBAAgB,CAyDlB;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,SAAS,gBAAgB,EAAE,GACjC,mBAAmB,CAerB;AAUD,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,SAAO,GACZ,MAAM,EAAE,CAiCV;AAED,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,aAAa,EACxB,MAAM,SAAO,GACZ,MAAM,EAAE,CAuBV"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { packScopeFactsFromInventory, projectPackEvidence, unavailablePackScopeFacts, } from './pack-evidence.js';
|
|
2
2
|
import { formatPackPath } from './pack-paths.js';
|
|
3
|
+
import { packProviderEvidence } from './pack-provider-evidence.js';
|
|
3
4
|
export function unavailablePackEvidence(input) {
|
|
4
5
|
const reason = redactPackText(input.reason, input.roots ?? {});
|
|
5
6
|
const facts = input.scopes.map((scope) => unavailablePackScopeFacts({
|
|
@@ -56,14 +57,42 @@ function redactPackInventory(inventory, roots) {
|
|
|
56
57
|
})),
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Projects a renderable pack evidence item.
|
|
62
|
+
*
|
|
63
|
+
* `providerContexts` is the config-aware provider context per scope. When it
|
|
64
|
+
* is supplied, provider reachability is mapped from the registry and the
|
|
65
|
+
* resulting `provider-materialization-missing` diagnostics name the provider.
|
|
66
|
+
* When it is absent — a surface that could not resolve a sync config — the
|
|
67
|
+
* unattributed inventory-derived diagnostic is emitted instead, so the
|
|
68
|
+
* warning is never silently lost.
|
|
69
|
+
*/
|
|
70
|
+
export function projectRenderablePackEvidence(canonical, roots, providerContexts) {
|
|
60
71
|
const redacted = redactPackInventory(canonical, roots);
|
|
72
|
+
const providers = providerContexts && providerContexts.length > 0
|
|
73
|
+
? packProviderEvidence({
|
|
74
|
+
pack: redacted.pack,
|
|
75
|
+
scopedInventories: redacted.scopes,
|
|
76
|
+
providerContexts,
|
|
77
|
+
mode: 'inventory',
|
|
78
|
+
})
|
|
79
|
+
: [];
|
|
61
80
|
const evidence = projectPackEvidence({
|
|
62
81
|
canonical: redacted,
|
|
63
82
|
scopes: redacted.scopes.map(packScopeFactsFromInventory),
|
|
83
|
+
providers,
|
|
84
|
+
providerMode: 'inventory',
|
|
64
85
|
});
|
|
65
|
-
|
|
66
|
-
|
|
86
|
+
// Assets a provider row already reports as missing are covered by the
|
|
87
|
+
// named diagnostic. Anything left over has no responsible active provider,
|
|
88
|
+
// so the unattributed pack-level warning is still the only report of it and
|
|
89
|
+
// must not be dropped just because provider rows exist.
|
|
90
|
+
const attributedAssets = new Set(providers
|
|
91
|
+
.filter(({ materialization }) => materialization.state === 'missing')
|
|
92
|
+
.flatMap(({ assets }) => assets));
|
|
93
|
+
const legacyDiagnostics = redacted.scopes.flatMap((scoped) => scoped.diagnostics
|
|
94
|
+
.filter(({ code, paths }) => code === 'user-agent-unmaterialized' &&
|
|
95
|
+
paths.some((path) => !attributedAssets.has(path)))
|
|
67
96
|
.map((diagnostic) => ({
|
|
68
97
|
code: 'provider-materialization-missing',
|
|
69
98
|
severity: 'warning',
|
|
@@ -83,14 +112,19 @@ export function projectRenderablePackEvidence(canonical, roots) {
|
|
|
83
112
|
})));
|
|
84
113
|
return {
|
|
85
114
|
...evidence,
|
|
86
|
-
diagnostics: [...evidence.diagnostics, ...
|
|
115
|
+
diagnostics: [...evidence.diagnostics, ...legacyDiagnostics],
|
|
87
116
|
};
|
|
88
117
|
}
|
|
89
118
|
export function packEvidenceBlock(items) {
|
|
90
119
|
const diagnostics = items.flatMap(({ diagnostics: values }) => values);
|
|
120
|
+
// Severity, never the diagnostic count, decides the block status. `info`
|
|
121
|
+
// rows (an inactive provider, an unsupported content kind, a host that
|
|
122
|
+
// needs a catalog refresh) are reportable facts about a healthy install,
|
|
123
|
+
// so counting them would turn every correctly configured host `partial`.
|
|
124
|
+
const actionable = diagnostics.some(({ severity }) => severity === 'warning' || severity === 'error');
|
|
91
125
|
return {
|
|
92
126
|
schemaVersion: 1,
|
|
93
|
-
status:
|
|
127
|
+
status: actionable ? 'partial' : 'ok',
|
|
94
128
|
items,
|
|
95
129
|
diagnostics,
|
|
96
130
|
};
|
|
@@ -108,8 +142,16 @@ export function formatPackEvidenceDetails(evidence, indent = ' ') {
|
|
|
108
142
|
lines.push(`${indent} Inventory: ${scoped.inventory.reason}`);
|
|
109
143
|
}
|
|
110
144
|
}
|
|
145
|
+
// Human output names the provider; the structured evidence stays in JSON.
|
|
146
|
+
// The materialization detail is rendered alongside the state because
|
|
147
|
+
// `not-applicable` alone collapses two different situations: a provider
|
|
148
|
+
// that is inactive or cannot project this content, and an active provider
|
|
149
|
+
// on a read-only surface that simply observed no sync.
|
|
150
|
+
for (const provider of evidence.providers) {
|
|
151
|
+
lines.push(`${indent}${provider.provider} [${provider.scope} ${provider.contentKind}]: ${provider.activation.state}; capability=${provider.capability.support}; projection=${provider.projection.state}; materialization=${provider.materialization.state} (${provider.materialization.detail}); visibility=${provider.visibility.state}`);
|
|
152
|
+
}
|
|
111
153
|
for (const diagnostic of evidence.diagnostics) {
|
|
112
|
-
lines.push(`${indent}${diagnostic.code}: ${diagnostic.detail}`, ...(diagnostic.affectedAssets.length > 0
|
|
154
|
+
lines.push(`${indent}${diagnostic.code}${diagnostic.provider ? ` [${diagnostic.provider}]` : ''}: ${diagnostic.detail}`, ...(diagnostic.affectedAssets.length > 0
|
|
113
155
|
? [`${indent} Affected: ${diagnostic.affectedAssets.join(', ')}`]
|
|
114
156
|
: []), ...diagnostic.recovery.map(({ command, message }) => `${indent} Fix: ${message}${command ? ` (${command})` : ''}`));
|
|
115
157
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AutoSyncDependencies } from './auto-sync.js';
|
|
2
|
+
/**
|
|
3
|
+
* The production auto-sync seam for every pack lifecycle command.
|
|
4
|
+
*
|
|
5
|
+
* Runs sync in-process and consumes the evidence object the sync run already
|
|
6
|
+
* builds, rather than spawning `oat sync --json` and parsing stdout. The
|
|
7
|
+
* subprocess it replaces discarded that evidence entirely, which is why every
|
|
8
|
+
* lifecycle outcome carried an empty provider array.
|
|
9
|
+
*/
|
|
10
|
+
export declare const inProcessSyncDependencies: AutoSyncDependencies;
|
|
11
|
+
//# sourceMappingURL=in-process-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"in-process-sync.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/in-process-sync.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAyBxD;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,oBAqDvC,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { runSyncInProcess } from '../../sync/index.js';
|
|
2
|
+
import { normalizeSyncEvidence } from './sync-evidence.js';
|
|
3
|
+
/**
|
|
4
|
+
* Silent logger that captures the sync run's JSON payload.
|
|
5
|
+
*
|
|
6
|
+
* Auto-sync has never surfaced the child sync's output — the previous
|
|
7
|
+
* subprocess implementation captured and discarded its stdout — so keeping
|
|
8
|
+
* every channel silent preserves the lifecycle command's human output exactly
|
|
9
|
+
* while making the evidence object available to the caller.
|
|
10
|
+
*/
|
|
11
|
+
function capturingSyncLogger(sink) {
|
|
12
|
+
const noop = () => { };
|
|
13
|
+
return {
|
|
14
|
+
debug: noop,
|
|
15
|
+
info: noop,
|
|
16
|
+
warn: noop,
|
|
17
|
+
error: noop,
|
|
18
|
+
success: noop,
|
|
19
|
+
json(payload) {
|
|
20
|
+
sink.payload = payload;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The production auto-sync seam for every pack lifecycle command.
|
|
26
|
+
*
|
|
27
|
+
* Runs sync in-process and consumes the evidence object the sync run already
|
|
28
|
+
* builds, rather than spawning `oat sync --json` and parsing stdout. The
|
|
29
|
+
* subprocess it replaces discarded that evidence entirely, which is why every
|
|
30
|
+
* lifecycle outcome carried an empty provider array.
|
|
31
|
+
*/
|
|
32
|
+
export const inProcessSyncDependencies = {
|
|
33
|
+
runSync: async ({ scope, cwd, home, installedCanonicalPaths, removedCanonicalPaths, }) => {
|
|
34
|
+
const sink = { payload: null };
|
|
35
|
+
const context = {
|
|
36
|
+
scope,
|
|
37
|
+
dryRun: false,
|
|
38
|
+
verbose: false,
|
|
39
|
+
json: true,
|
|
40
|
+
cwd,
|
|
41
|
+
home,
|
|
42
|
+
interactive: false,
|
|
43
|
+
logger: capturingSyncLogger(sink),
|
|
44
|
+
};
|
|
45
|
+
// `runSyncApply` assigns `process.exitCode` for its own run. In a
|
|
46
|
+
// subprocess that was the child's exit status and never reached the
|
|
47
|
+
// parent command; in-process it would overwrite the parent's own result,
|
|
48
|
+
// including resetting a failure to 0, so the parent's value is restored.
|
|
49
|
+
//
|
|
50
|
+
// That exit code is also the only signal sync gives for a run that failed
|
|
51
|
+
// without throwing: `runSyncApply` sets 1 when operations failed and
|
|
52
|
+
// returns normally. The subprocess this replaces surfaced that as an
|
|
53
|
+
// `execFile` rejection, which auto-sync recorded as a failed sync. Reading
|
|
54
|
+
// it before restoring keeps that contract instead of reporting a failed
|
|
55
|
+
// sync as `Auto-sync completed.` with exit 0.
|
|
56
|
+
const priorExitCode = process.exitCode;
|
|
57
|
+
let syncExitCode;
|
|
58
|
+
try {
|
|
59
|
+
await runSyncInProcess(context, {
|
|
60
|
+
...(installedCanonicalPaths ? { installedCanonicalPaths } : {}),
|
|
61
|
+
...(removedCanonicalPaths ? { removedCanonicalPaths } : {}),
|
|
62
|
+
});
|
|
63
|
+
syncExitCode = process.exitCode;
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
process.exitCode = priorExitCode;
|
|
67
|
+
}
|
|
68
|
+
const evidence = normalizeSyncEvidence(scope, sink.payload);
|
|
69
|
+
// The failure is reported through the evidence rather than by throwing:
|
|
70
|
+
// a throw would discard the very rows that describe which provider
|
|
71
|
+
// failed, and those rows are what emit `provider-materialization-failed`.
|
|
72
|
+
// A non-zero exit with no counted operation (a rejected collection is a
|
|
73
|
+
// failure but not a planned operation) still records one.
|
|
74
|
+
const exitedNonZero = typeof syncExitCode === 'number' && syncExitCode !== 0;
|
|
75
|
+
return exitedNonZero && evidence.failedOperations === 0
|
|
76
|
+
? { ...evidence, failedOperations: 1 }
|
|
77
|
+
: evidence;
|
|
78
|
+
},
|
|
79
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ManagedContentKind, ProviderActivationSource, ProviderCapabilitySupport, ProviderProjectionMode } from '../../../providers/shared/registry.js';
|
|
1
2
|
import type { ConcreteScope } from '../../../shared/types.js';
|
|
2
3
|
import type { PackInventory, ScopedPackInventory } from './pack-inventory.js';
|
|
3
4
|
import type { PackCompleteness, PackName } from './types.js';
|
|
@@ -33,12 +34,69 @@ export interface PackEvidenceDiagnostic {
|
|
|
33
34
|
detail: string;
|
|
34
35
|
recovery: readonly RecoveryAction[];
|
|
35
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Provider diagnostic codes and their pinned severities.
|
|
39
|
+
*
|
|
40
|
+
* `packEvidenceBlock` and the lifecycle-outcome status derive from the
|
|
41
|
+
* severity, never from the code name, so adding a code later cannot silently
|
|
42
|
+
* change a pack evidence block status or an install exit code.
|
|
43
|
+
*/
|
|
44
|
+
export declare const PROVIDER_DIAGNOSTIC_SEVERITY: {
|
|
45
|
+
readonly 'provider-inactive': 'info';
|
|
46
|
+
readonly 'provider-unsupported': 'info';
|
|
47
|
+
readonly 'provider-materialization-missing': 'warning';
|
|
48
|
+
readonly 'provider-materialization-failed': 'error';
|
|
49
|
+
readonly 'visibility-unknown': 'info';
|
|
50
|
+
readonly 'refresh-required': 'info';
|
|
51
|
+
readonly 'restart-required': 'info';
|
|
52
|
+
};
|
|
53
|
+
export type ProviderDiagnosticCode = keyof typeof PROVIDER_DIAGNOSTIC_SEVERITY;
|
|
54
|
+
/**
|
|
55
|
+
* Marks a diagnostic as projected from provider reachability evidence.
|
|
56
|
+
*
|
|
57
|
+
* Consumers that re-project an evidence item use this to replace the previous
|
|
58
|
+
* provider rows without disturbing canonical or inventory-derived diagnostics.
|
|
59
|
+
*/
|
|
60
|
+
export declare const PROVIDER_DIAGNOSTIC_SOURCE = "provider-registry";
|
|
61
|
+
export type ProviderProjectionState = 'projected' | 'absent' | 'not-applicable';
|
|
62
|
+
export type ProviderMaterializationState = 'materialized' | 'missing' | 'failed' | 'not-applicable';
|
|
63
|
+
export type ProviderVisibilityState = 'live' | 'manual-refresh' | 'restart-required' | 'unknown'
|
|
64
|
+
/** The row is inactive or unsupported, so catalog visibility is moot. */
|
|
65
|
+
| 'not-applicable';
|
|
66
|
+
/**
|
|
67
|
+
* Per provider, scope, and content kind reachability, derived from the
|
|
68
|
+
* config-aware provider registry the sync engine uses. Every field is
|
|
69
|
+
* required: a permissive interface is what let every production path emit
|
|
70
|
+
* `providers: []` while still type-checking.
|
|
71
|
+
*/
|
|
36
72
|
export interface ProviderReachabilityEvidence {
|
|
37
73
|
provider: string;
|
|
38
74
|
scope: ConcreteScope;
|
|
39
|
-
contentKind:
|
|
75
|
+
contentKind: ManagedContentKind;
|
|
40
76
|
assets: readonly string[];
|
|
41
|
-
|
|
77
|
+
activation: {
|
|
78
|
+
state: 'active' | 'inactive';
|
|
79
|
+
source: ProviderActivationSource;
|
|
80
|
+
reason: string;
|
|
81
|
+
};
|
|
82
|
+
capability: {
|
|
83
|
+
support: ProviderCapabilitySupport;
|
|
84
|
+
projectionModes: readonly ProviderProjectionMode[];
|
|
85
|
+
reason: string;
|
|
86
|
+
};
|
|
87
|
+
projection: {
|
|
88
|
+
state: ProviderProjectionState;
|
|
89
|
+
mode: ProviderProjectionMode | null;
|
|
90
|
+
};
|
|
91
|
+
materialization: {
|
|
92
|
+
state: ProviderMaterializationState;
|
|
93
|
+
detail: string;
|
|
94
|
+
};
|
|
95
|
+
visibility: {
|
|
96
|
+
state: ProviderVisibilityState;
|
|
97
|
+
reason: string;
|
|
98
|
+
};
|
|
99
|
+
recovery: readonly RecoveryAction[];
|
|
42
100
|
}
|
|
43
101
|
export interface ToolPackEvidence {
|
|
44
102
|
schemaVersion: 1;
|
|
@@ -58,9 +116,27 @@ export declare function unavailablePackScopeFacts(input: {
|
|
|
58
116
|
reason: string;
|
|
59
117
|
}): PackScopeFacts;
|
|
60
118
|
export declare function hasScopedPackRealizationEvidence(inventory: ScopedPackInventory): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Emits the pinned severity-matrix diagnostics for provider reachability.
|
|
121
|
+
*
|
|
122
|
+
* `mode` is load-bearing rather than cosmetic: a read-only inventory surface
|
|
123
|
+
* (`list`, `info`, `status`, `doctor`) ran no sync, so it can never have
|
|
124
|
+
* observed a materialization failure. Emitting `provider-materialization-failed`
|
|
125
|
+
* there would report an error severity from evidence that does not exist.
|
|
126
|
+
*/
|
|
127
|
+
export declare function providerDiagnostics(input: {
|
|
128
|
+
pack: PackName;
|
|
129
|
+
providers: readonly ProviderReachabilityEvidence[];
|
|
130
|
+
mode: 'lifecycle' | 'inventory';
|
|
131
|
+
}): PackEvidenceDiagnostic[];
|
|
61
132
|
export declare function projectPackEvidence(input: {
|
|
62
133
|
canonical: PackInventory | null;
|
|
63
134
|
scopes: readonly PackScopeFacts[];
|
|
64
135
|
providers?: readonly ProviderReachabilityEvidence[];
|
|
136
|
+
/**
|
|
137
|
+
* Defaults to the conservative read-only reading. A surface that actually
|
|
138
|
+
* ran a sync opts in to `lifecycle` so an observed failure can be reported.
|
|
139
|
+
*/
|
|
140
|
+
providerMode?: 'lifecycle' | 'inventory';
|
|
65
141
|
}): ToolPackEvidence;
|
|
66
142
|
//# sourceMappingURL=pack-evidence.d.ts.map
|
|
@@ -1 +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,KAAK,EAAE,WAAW,GAAG,aAAa,CAAC;QACnC,MAAM,EAAE,gBAAgB,CAAC;QACzB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,YAAY,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC3C,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,EAAE,gBAAgB,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EACA,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,sBAAsB,GACtB,kCAAkC,GAClC,iCAAiC,GACjC,oBAAoB,GACpB,kBAA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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;AA8FD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACnD,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC;CACjC,GAAG,sBAAsB,EAAE,CAsF3B;AAED,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;IACpD;;;OAGG;IACH,YAAY,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC;CAC1C,GAAG,gBAAgB,CAgCnB"}
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider diagnostic codes and their pinned severities.
|
|
3
|
+
*
|
|
4
|
+
* `packEvidenceBlock` and the lifecycle-outcome status derive from the
|
|
5
|
+
* severity, never from the code name, so adding a code later cannot silently
|
|
6
|
+
* change a pack evidence block status or an install exit code.
|
|
7
|
+
*/
|
|
8
|
+
export const PROVIDER_DIAGNOSTIC_SEVERITY = {
|
|
9
|
+
'provider-inactive': 'info',
|
|
10
|
+
'provider-unsupported': 'info',
|
|
11
|
+
'provider-materialization-missing': 'warning',
|
|
12
|
+
'provider-materialization-failed': 'error',
|
|
13
|
+
'visibility-unknown': 'info',
|
|
14
|
+
'refresh-required': 'info',
|
|
15
|
+
'restart-required': 'info',
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Marks a diagnostic as projected from provider reachability evidence.
|
|
19
|
+
*
|
|
20
|
+
* Consumers that re-project an evidence item use this to replace the previous
|
|
21
|
+
* provider rows without disturbing canonical or inventory-derived diagnostics.
|
|
22
|
+
*/
|
|
23
|
+
export const PROVIDER_DIAGNOSTIC_SOURCE = 'provider-registry';
|
|
1
24
|
function healthForStatuses(statuses) {
|
|
2
25
|
const present = statuses.filter((status) => status !== 'missing');
|
|
3
26
|
if (present.length === 0)
|
|
@@ -108,12 +131,76 @@ function canonicalDiagnostics(pack, scopes) {
|
|
|
108
131
|
}
|
|
109
132
|
return diagnostics;
|
|
110
133
|
}
|
|
134
|
+
function providerDiagnostic(pack, evidence, code, detail) {
|
|
135
|
+
return {
|
|
136
|
+
code,
|
|
137
|
+
severity: PROVIDER_DIAGNOSTIC_SEVERITY[code],
|
|
138
|
+
pack,
|
|
139
|
+
scope: evidence.scope,
|
|
140
|
+
provider: evidence.provider,
|
|
141
|
+
contentKind: evidence.contentKind,
|
|
142
|
+
affectedAssets: evidence.assets,
|
|
143
|
+
source: PROVIDER_DIAGNOSTIC_SOURCE,
|
|
144
|
+
detail,
|
|
145
|
+
recovery: evidence.recovery,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Emits the pinned severity-matrix diagnostics for provider reachability.
|
|
150
|
+
*
|
|
151
|
+
* `mode` is load-bearing rather than cosmetic: a read-only inventory surface
|
|
152
|
+
* (`list`, `info`, `status`, `doctor`) ran no sync, so it can never have
|
|
153
|
+
* observed a materialization failure. Emitting `provider-materialization-failed`
|
|
154
|
+
* there would report an error severity from evidence that does not exist.
|
|
155
|
+
*/
|
|
156
|
+
export function providerDiagnostics(input) {
|
|
157
|
+
const diagnostics = [];
|
|
158
|
+
for (const evidence of input.providers) {
|
|
159
|
+
if (evidence.activation.state === 'inactive') {
|
|
160
|
+
// Only an explicitly disabled provider is reportable. A provider that
|
|
161
|
+
// was never detected and never configured is not a finding about this
|
|
162
|
+
// pack: emitting one per registered provider, per content kind, per
|
|
163
|
+
// pack would bury the actionable rows under inventory noise. The
|
|
164
|
+
// inactive state itself is still carried on the evidence row.
|
|
165
|
+
if (evidence.activation.source === 'config-disabled') {
|
|
166
|
+
diagnostics.push(providerDiagnostic(input.pack, evidence, 'provider-inactive', `${evidence.provider} is not active for ${evidence.scope} scope: ${evidence.activation.reason}`));
|
|
167
|
+
}
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (evidence.capability.support !== 'supported') {
|
|
171
|
+
diagnostics.push(providerDiagnostic(input.pack, evidence, 'provider-unsupported', evidence.capability.reason));
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (evidence.materialization.state === 'failed') {
|
|
175
|
+
if (input.mode === 'lifecycle') {
|
|
176
|
+
diagnostics.push(providerDiagnostic(input.pack, evidence, 'provider-materialization-failed', evidence.materialization.detail));
|
|
177
|
+
}
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
if (evidence.materialization.state === 'missing') {
|
|
181
|
+
diagnostics.push(providerDiagnostic(input.pack, evidence, 'provider-materialization-missing', evidence.materialization.detail));
|
|
182
|
+
}
|
|
183
|
+
if (evidence.projection.state !== 'projected')
|
|
184
|
+
continue;
|
|
185
|
+
if (evidence.visibility.state === 'unknown') {
|
|
186
|
+
diagnostics.push(providerDiagnostic(input.pack, evidence, 'visibility-unknown', evidence.visibility.reason));
|
|
187
|
+
}
|
|
188
|
+
else if (evidence.visibility.state === 'manual-refresh') {
|
|
189
|
+
diagnostics.push(providerDiagnostic(input.pack, evidence, 'refresh-required', evidence.visibility.reason));
|
|
190
|
+
}
|
|
191
|
+
else if (evidence.visibility.state === 'restart-required') {
|
|
192
|
+
diagnostics.push(providerDiagnostic(input.pack, evidence, 'restart-required', evidence.visibility.reason));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return diagnostics;
|
|
196
|
+
}
|
|
111
197
|
export function projectPackEvidence(input) {
|
|
112
198
|
const pack = input.canonical?.pack ??
|
|
113
199
|
input.scopes[0]?.intent.pack ??
|
|
114
200
|
(() => {
|
|
115
201
|
throw new Error('Pack evidence requires canonical inventory or scope facts');
|
|
116
202
|
})();
|
|
203
|
+
const providers = input.providers ?? [];
|
|
117
204
|
return {
|
|
118
205
|
schemaVersion: 1,
|
|
119
206
|
pack,
|
|
@@ -126,7 +213,14 @@ export function projectPackEvidence(input) {
|
|
|
126
213
|
.filter(({ realization }) => realization === 'unknown')
|
|
127
214
|
.map(({ scope }) => scope),
|
|
128
215
|
realizedPlacement: placementForScopes(input.scopes),
|
|
129
|
-
providers
|
|
130
|
-
diagnostics:
|
|
216
|
+
providers,
|
|
217
|
+
diagnostics: [
|
|
218
|
+
...canonicalDiagnostics(pack, input.scopes),
|
|
219
|
+
...providerDiagnostics({
|
|
220
|
+
pack,
|
|
221
|
+
providers,
|
|
222
|
+
mode: input.providerMode ?? 'inventory',
|
|
223
|
+
}),
|
|
224
|
+
],
|
|
131
225
|
};
|
|
132
226
|
}
|
|
@@ -33,7 +33,18 @@ export declare function resolveAdditivePackScopeSelection(input: {
|
|
|
33
33
|
knownRealizedScopes: readonly ConcreteScope[];
|
|
34
34
|
unknownScopes: readonly ConcreteScope[];
|
|
35
35
|
}): PackScopeSelection;
|
|
36
|
+
/**
|
|
37
|
+
* Derives the provider sync outcome from an auto-sync run and its evidence.
|
|
38
|
+
*
|
|
39
|
+
* Status follows the pinned severity matrix rather than the diagnostic code
|
|
40
|
+
* name: only an observed `failed` materialization degrades an otherwise
|
|
41
|
+
* successful run to `partial`. An inactive provider, an unsupported content
|
|
42
|
+
* kind, or a host that needs a catalog refresh are `info`-severity facts and
|
|
43
|
+
* leave the outcome `complete`, so a healthy install keeps exit code 0.
|
|
44
|
+
*/
|
|
36
45
|
export declare function providerSyncOutcomeFromAutoSync(result: AutoSyncResult, providers?: readonly ProviderReachabilityEvidence[]): ProviderSyncOutcome;
|
|
46
|
+
/** A `not-run` sync outcome that still carries registry-derived evidence. */
|
|
47
|
+
export declare function notRunProviderSyncOutcome(providers?: readonly ProviderReachabilityEvidence[], reason?: string): ProviderSyncOutcome;
|
|
37
48
|
export declare function evaluatePackLifecycleOutcome(input: {
|
|
38
49
|
selection: PackScopeSelection;
|
|
39
50
|
lifecycle: readonly PackLifecycleResult[];
|