@open-agent-toolkit/cli 0.2.52 → 0.2.54
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/agents/recon-worker.md +105 -0
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/cli-utilities/tool-packs.md +62 -8
- package/assets/docs/contributing/skills.md +26 -0
- package/assets/docs/workflows/skills/index.md +3 -0
- package/assets/docs/workflows/skills/recon.md +194 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-dispatch-subagents/SKILL.md +105 -4
- package/assets/skills/oat-dispatch-subagents/references/record-schema.md +226 -0
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +2 -2
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +2 -2
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +2 -2
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +2 -2
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +2 -2
- package/assets/skills/recon/SKILL.md +260 -0
- package/assets/skills/recon/references/packet-contract.md +307 -0
- package/assets/skills/recon/references/profiles.md +58 -0
- package/assets/skills/recon/references/worker-contract.md +71 -0
- package/assets/skills/recon/scripts/create-review-brief.mjs +452 -0
- package/assets/skills/recon/scripts/lib/canonical-json.mjs +55 -0
- package/assets/skills/recon/scripts/lib/contracts.mjs +2462 -0
- package/assets/skills/recon/scripts/lib/safe-path.mjs +120 -0
- package/assets/skills/recon/scripts/lib/validated-run.mjs +86 -0
- package/assets/skills/recon/scripts/reconcile-ledger.mjs +360 -0
- package/assets/skills/recon/scripts/render-packet.mjs +392 -0
- package/assets/skills/recon/scripts/validate-artifact.mjs +96 -0
- package/assets/skills/recon/scripts/validate-packet.mjs +2359 -0
- package/dist/commands/doctor/index.js +5 -5
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +7 -8
- package/dist/commands/status/index.d.ts +2 -2
- package/dist/commands/status/index.d.ts.map +1 -1
- package/dist/commands/status/index.js +8 -8
- package/dist/commands/sync/index.d.ts.map +1 -1
- package/dist/commands/sync/index.js +25 -9
- package/dist/commands/sync/sync.types.d.ts +2 -2
- package/dist/commands/sync/sync.types.d.ts.map +1 -1
- package/dist/commands/tools/migrate/index.d.ts.map +1 -1
- package/dist/commands/tools/migrate/index.js +25 -1
- package/dist/commands/tools/migrate/migrate-pack.d.ts +5 -0
- package/dist/commands/tools/migrate/migrate-pack.d.ts.map +1 -1
- package/dist/commands/tools/migrate/migrate-pack.js +66 -7
- package/dist/commands/tools/remove/index.js +1 -1
- package/dist/commands/tools/remove/remove-tools.d.ts +5 -1
- package/dist/commands/tools/remove/remove-tools.d.ts.map +1 -1
- package/dist/commands/tools/remove/remove-tools.js +81 -1
- package/dist/commands/tools/shared/apply-pack-reconcile.d.ts +3 -0
- package/dist/commands/tools/shared/apply-pack-reconcile.d.ts.map +1 -1
- package/dist/commands/tools/shared/apply-pack-reconcile.js +40 -9
- package/dist/commands/tools/shared/format-pack-inventory.d.ts.map +1 -1
- package/dist/commands/tools/shared/format-pack-inventory.js +3 -0
- package/dist/commands/tools/shared/install-sync-context.d.ts +2 -1
- package/dist/commands/tools/shared/install-sync-context.d.ts.map +1 -1
- package/dist/commands/tools/shared/install-sync-context.js +14 -3
- package/dist/commands/tools/shared/pack-dependencies.d.ts +14 -0
- package/dist/commands/tools/shared/pack-dependencies.d.ts.map +1 -0
- package/dist/commands/tools/shared/pack-dependencies.js +54 -0
- package/dist/commands/tools/shared/pack-inventory.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-inventory.js +9 -9
- package/dist/commands/tools/shared/pack-lifecycle.d.ts +9 -1
- package/dist/commands/tools/shared/pack-lifecycle.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-lifecycle.js +102 -9
- package/dist/commands/tools/shared/pack-manifest.d.ts +2 -2
- package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-manifest.js +91 -2
- package/dist/commands/tools/shared/pack-reconcile.d.ts +15 -1
- package/dist/commands/tools/shared/pack-reconcile.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-reconcile.js +75 -13
- package/dist/commands/tools/shared/scoped-pack-intent.d.ts +8 -0
- package/dist/commands/tools/shared/scoped-pack-intent.d.ts.map +1 -1
- package/dist/commands/tools/shared/scoped-pack-intent.js +61 -15
- package/dist/commands/tools/shared/types.d.ts +7 -0
- package/dist/commands/tools/shared/types.d.ts.map +1 -1
- package/dist/commands/tools/update/update-tools.d.ts.map +1 -1
- package/dist/commands/tools/update/update-tools.js +7 -1
- package/dist/config/oat-config.d.ts +5 -1
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +19 -0
- package/dist/engine/index.d.ts +2 -2
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +1 -1
- package/dist/engine/scanner.d.ts +16 -1
- package/dist/engine/scanner.d.ts.map +1 -1
- package/dist/engine/scanner.js +98 -4
- package/dist/providers/codex/codec/sync-extension.d.ts +1 -1
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +7 -7
- package/dist/providers/cursor/codec/sync-extension.d.ts +1 -1
- package/dist/providers/cursor/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/cursor/codec/sync-extension.js +11 -13
- package/dist/shared/types.d.ts +1 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js +3 -0
- package/package.json +2 -2
|
@@ -574,15 +574,15 @@ function collectPackStateFindings(inventories) {
|
|
|
574
574
|
continue;
|
|
575
575
|
}
|
|
576
576
|
if (diagnostic.code === 'user-agent-unmaterialized') {
|
|
577
|
-
// A
|
|
578
|
-
// cannot repair it, so no recovery command is offered and the
|
|
579
|
-
// stays a pass. The message still names every affected agent so
|
|
580
|
-
// absent capability is not reported as a complete pack.
|
|
577
|
+
// A manifest eligibility boundary rather than drift: `oat tools
|
|
578
|
+
// update` cannot repair it, so no recovery command is offered and the
|
|
579
|
+
// check stays a pass. The message still names every affected agent so
|
|
580
|
+
// the absent capability is not reported as a complete pack.
|
|
581
581
|
findings.push({
|
|
582
582
|
pack: inventory.pack,
|
|
583
583
|
scope,
|
|
584
584
|
code: 'user-agent-unmaterialized',
|
|
585
|
-
detail: `${diagnostic.paths.length} user-scope agent(s) lack native provider-role materialization; canonical instruction reads are unaffected, and active Codex or Cursor materialization supplies only
|
|
585
|
+
detail: `${diagnostic.paths.length} user-scope agent(s) lack native provider-role materialization; canonical instruction reads are unaffected, and active Codex or Cursor materialization supplies only built-in managed roles and manifest-declared user-materializable agents, so install this pack at project scope to materialize the affected agents`,
|
|
586
586
|
paths: diagnostic.paths,
|
|
587
587
|
recovery: null,
|
|
588
588
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/init/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAEnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,0BAA0B,CAAC;AAclC,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EAGlB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/init/index.ts"],"names":[],"mappings":"AA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AAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,aAAa,KACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5B,eAAe,EAAE,CAAC,CAAC,SAAS,MAAM,EAChC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,EAC1B,GAAG,EAAE,aAAa,KACf,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,2BAA2B,EAAE,CAC3B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,kBAAkB,EACzB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,sBAAsB,EACnC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,KACrC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvB,cAAc,EAAE,CACd,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,gBAAgB,EAC9B,uBAAuB,CAAC,EAAE,OAAO,KAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,YAAY,EAAE,CACZ,OAAO,EAAE,cAAc,EACvB,uBAAuB,CAAC,EAAE,OAAO,KAC9B,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzB,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD;AAmgCD,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,gBAAgB,CAAM,GACxC,OAAO,CA8BT"}
|
|
@@ -17,7 +17,7 @@ import { DEFAULT_SYNC_CONFIG, loadSyncConfig, saveSyncConfig, } from '../../conf
|
|
|
17
17
|
import { detectDefaultBranch, readOatConfig, resolveLocalPaths, writeOatConfig, } from '../../config/oat-config.js';
|
|
18
18
|
import { resolveUserSyncConfig } from '../../config/user-sync-config.js';
|
|
19
19
|
import { detectStrays, filterKnownStrays, } from '../../drift/index.js';
|
|
20
|
-
import { configureLocalHooksPath, getHookInstallInfo, installHook, isHookInstalled, scanBundledManagedAgents, scanCanonical, uninstallHook, } from '../../engine/index.js';
|
|
20
|
+
import { configureLocalHooksPath, getHookInstallInfo, installHook, isHookInstalled, mergeUserScopeMaterializationEntries, scanBundledManagedAgents, scanCanonical, uninstallHook, } from '../../engine/index.js';
|
|
21
21
|
import { dirExists, fileExists } from '../../fs/io.js';
|
|
22
22
|
import { resolveProjectRoot, resolveScopeRoot } from '../../fs/paths.js';
|
|
23
23
|
import { normalizeToPosixPath } from '../../fs/paths.js';
|
|
@@ -48,15 +48,14 @@ async function collectStraysDefault(scopeRoot, scope, manifest, canonicalEntries
|
|
|
48
48
|
const adaptersToScan = activeAdapters ??
|
|
49
49
|
(await getActiveAdapters(getDefaultAdapters(), scopeRoot));
|
|
50
50
|
const candidates = [];
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
? [...canonicalEntries, ...(await scanBundledManagedAgents())]
|
|
51
|
+
const providerCanonicalEntries = scope === 'user'
|
|
52
|
+
? mergeUserScopeMaterializationEntries(canonicalEntries, await scanBundledManagedAgents({ scopeRoot }))
|
|
54
53
|
: canonicalEntries;
|
|
55
54
|
const codexExtensionPlan = adaptersToScan.some((adapter) => adapter.name === 'codex')
|
|
56
|
-
? await computeCodexProjectExtensionPlan(scopeRoot,
|
|
55
|
+
? await computeCodexProjectExtensionPlan(scopeRoot, providerCanonicalEntries, undefined, { userConfigDir })
|
|
57
56
|
: undefined;
|
|
58
57
|
const cursorExtensionPlan = adaptersToScan.some((adapter) => adapter.name === 'cursor')
|
|
59
|
-
? await computeCursorProjectExtensionPlan(scopeRoot,
|
|
58
|
+
? await computeCursorProjectExtensionPlan(scopeRoot, providerCanonicalEntries, undefined, { userConfigDir })
|
|
60
59
|
: undefined;
|
|
61
60
|
const materializationPlans = [
|
|
62
61
|
...(codexExtensionPlan
|
|
@@ -80,7 +79,7 @@ async function collectStraysDefault(scopeRoot, scope, manifest, canonicalEntries
|
|
|
80
79
|
const adoptionSources = getAdoptionSources(adapter, scope);
|
|
81
80
|
for (const source of adoptionSources) {
|
|
82
81
|
const providerDir = join(scopeRoot, source.directory);
|
|
83
|
-
const strays = filterMaterializationManagedStrays((await detectStrays(adapter.name, providerDir, manifest,
|
|
82
|
+
const strays = filterMaterializationManagedStrays((await detectStrays(adapter.name, providerDir, manifest, providerCanonicalEntries, source.mapping)).map((report) => ({ provider: adapter.name, report })), materializationPlans).map((candidate) => candidate.report);
|
|
84
83
|
for (const report of strays) {
|
|
85
84
|
if (report.state.status !== 'stray') {
|
|
86
85
|
continue;
|
|
@@ -94,7 +93,7 @@ async function collectStraysDefault(scopeRoot, scope, manifest, canonicalEntries
|
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
if (adaptersToScan.some((adapter) => adapter.name === 'codex')) {
|
|
97
|
-
const codexStrays = await detectCodexRoleStrays(scopeRoot,
|
|
96
|
+
const codexStrays = await detectCodexRoleStrays(scopeRoot, providerCanonicalEntries, new Set(codexExtensionPlan.managedRoles));
|
|
98
97
|
for (const stray of codexStrays) {
|
|
99
98
|
candidates.push({
|
|
100
99
|
provider: 'codex',
|
|
@@ -6,7 +6,7 @@ import { type MultiSelectChoice, type PromptContext, type SelectChoice } from '.
|
|
|
6
6
|
import { type InventoryPackInput, type PackInventory } from '../tools/shared/pack-inventory.js';
|
|
7
7
|
import { type SyncConfig } from '../../config/index.js';
|
|
8
8
|
import { type CopyTransform, type DriftReport } from '../../drift/index.js';
|
|
9
|
-
import { type CanonicalEntry } from '../../engine/index.js';
|
|
9
|
+
import { type CanonicalEntry, type ScanBundledManagedAgentsOptions } from '../../engine/index.js';
|
|
10
10
|
import type { Manifest } from '../../manifest/index.js';
|
|
11
11
|
import { type CodexExtensionPlan } from '../../providers/codex/codec/sync-extension.js';
|
|
12
12
|
import { type CursorExtensionPlan } from '../../providers/cursor/codec/sync-extension.js';
|
|
@@ -22,7 +22,7 @@ interface StatusDependencies {
|
|
|
22
22
|
resolveUserSyncConfig: (userConfigDir: string) => Promise<SyncConfig>;
|
|
23
23
|
saveManifest: (manifestPath: string, manifest: Manifest) => Promise<void>;
|
|
24
24
|
scanCanonical: (scopeRoot: string, scope: ConcreteScope, targets?: readonly CanonicalScanTarget[]) => Promise<CanonicalEntry[]>;
|
|
25
|
-
scanBundledManagedAgents: () => Promise<CanonicalEntry[]>;
|
|
25
|
+
scanBundledManagedAgents: (options?: ScanBundledManagedAgentsOptions) => Promise<CanonicalEntry[]>;
|
|
26
26
|
getAdapters: () => ProviderAdapter[];
|
|
27
27
|
getConfigAwareAdapters: (adapters: ProviderAdapter[], scopeRoot: string, config: SyncConfig) => Promise<{
|
|
28
28
|
activeAdapters: ProviderAdapter[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/status/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC/B,MAAM,wBAAwB,CAAC;AAMhC,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EAGlB,MAAM,iCAAiC,CAAC;AAWzC,OAAO,EAIL,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EAEnB,MAAM,uCAAuC,CAAC;AAU/C,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAIjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/status/index.ts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ACzC,aAAa,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IACrE,kBAAkB,EAAE,CAClB,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3B;AAED,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAsoCD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC1C,OAAO,CA2BT"}
|
|
@@ -14,7 +14,7 @@ import { formatPackPath, formatPackPaths, updatePackRecovery, } from '../tools/s
|
|
|
14
14
|
import { DEFAULT_SYNC_CONFIG, loadSyncConfig, } from '../../config/index.js';
|
|
15
15
|
import { resolveUserSyncConfig } from '../../config/user-sync-config.js';
|
|
16
16
|
import { detectDrift, detectStrays, filterKnownStrays, } from '../../drift/index.js';
|
|
17
|
-
import { HOOK_DRIFT_WARNING, HOOK_STRAY_INFO, scanBundledManagedAgents, scanCanonical, } from '../../engine/index.js';
|
|
17
|
+
import { HOOK_DRIFT_WARNING, HOOK_STRAY_INFO, mergeUserScopeMaterializationEntries, scanBundledManagedAgents, scanCanonical, } from '../../engine/index.js';
|
|
18
18
|
import { resolveAssetsRoot } from '../../fs/assets.js';
|
|
19
19
|
import { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, } from '../../fs/paths.js';
|
|
20
20
|
import { loadManifest, saveManifest } from '../../manifest/manager.js';
|
|
@@ -488,13 +488,13 @@ async function collectScopeReports(scope, context, dependencies) {
|
|
|
488
488
|
.filter(({ adapter }) => activeProviderNames.has(adapter.name))
|
|
489
489
|
.flatMap(({ extensions }) => extensions.map(({ provider }) => provider))
|
|
490
490
|
: [...activeProviderNames]);
|
|
491
|
+
const providerCanonicalEntries = scope === 'user'
|
|
492
|
+
? mergeUserScopeMaterializationEntries(canonicalEntries, await dependencies.scanBundledManagedAgents({ scopeRoot }))
|
|
493
|
+
: canonicalEntries;
|
|
491
494
|
const extensionCanonicalEntries = scope === 'user' &&
|
|
492
495
|
(activeExtensionProviders.has('codex') ||
|
|
493
496
|
activeExtensionProviders.has('cursor'))
|
|
494
|
-
?
|
|
495
|
-
...canonicalEntries,
|
|
496
|
-
...(await dependencies.scanBundledManagedAgents()),
|
|
497
|
-
]
|
|
497
|
+
? providerCanonicalEntries
|
|
498
498
|
: canonicalEntries;
|
|
499
499
|
const codexExtensionPlan = activeExtensionProviders.has('codex')
|
|
500
500
|
? await dependencies.computeCodexProjectExtensionPlan(scopeRoot, extensionCanonicalEntries, undefined, { userConfigDir })
|
|
@@ -542,7 +542,7 @@ async function collectScopeReports(scope, context, dependencies) {
|
|
|
542
542
|
reports.push(await dependencies.detectDrift(entry, scopeRoot, copyTransform));
|
|
543
543
|
}
|
|
544
544
|
for (const mapping of mappings) {
|
|
545
|
-
for (const canonicalEntry of
|
|
545
|
+
for (const canonicalEntry of providerCanonicalEntries) {
|
|
546
546
|
if (canonicalEntry.type !== mapping.contentType) {
|
|
547
547
|
continue;
|
|
548
548
|
}
|
|
@@ -564,7 +564,7 @@ async function collectScopeReports(scope, context, dependencies) {
|
|
|
564
564
|
}
|
|
565
565
|
for (const source of adoptionSources) {
|
|
566
566
|
const providerDir = join(scopeRoot, source.directory);
|
|
567
|
-
const strays = filterMaterializationManagedStrays((await dependencies.detectStrays(adapter.name, providerDir, manifest,
|
|
567
|
+
const strays = filterMaterializationManagedStrays((await dependencies.detectStrays(adapter.name, providerDir, manifest, providerCanonicalEntries, source.mapping)).map((report) => ({ provider: adapter.name, report })), materializationPlans).map((candidate) => candidate.report);
|
|
568
568
|
reports.push(...strays);
|
|
569
569
|
for (const stray of strays) {
|
|
570
570
|
if (stray.state.status !== 'stray') {
|
|
@@ -606,7 +606,7 @@ async function collectScopeReports(scope, context, dependencies) {
|
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
if (codexExtensionPlan) {
|
|
609
|
-
const codexStrays = await dependencies.detectCodexRoleStrays(scopeRoot,
|
|
609
|
+
const codexStrays = await dependencies.detectCodexRoleStrays(scopeRoot, providerCanonicalEntries, new Set(codexExtensionPlan.managedRoles));
|
|
610
610
|
for (const codexStray of codexStrays) {
|
|
611
611
|
const report = {
|
|
612
612
|
canonical: null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,eAAe,CAAC;AAWvB,OAAO,EAOL,KAAK,oBAAoB,EAC1B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,OAAO,KAAK,EACV,aAAa,EAEb,uBAAuB,EAGxB,MAAM,cAAc,CAAC;AAEtB,KAAK,0BAA0B,GAAG,IAAI,CACpC,uBAAuB,EACvB,iBAAiB,GAAG,eAAe,CACpC,GAAG;IACF,aAAa,EAAE,CACb,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,aAAa,EACpB,OAAO,CAAC,EAAE,SAAS,mBAAmB,EAAE,KACrC,UAAU,CAAC,uBAAuB,CAAC,eAAe,CAAC,CAAC,CAAC;IAC1D,eAAe,EAAE,CACf,IAAI,EAAE,UAAU,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAChE,sCAAsC,CAAC,EAAE,QAAQ,CAC/C,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAClC,CAAC;KACH,KACE,UAAU,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC5D,2BAA2B,CAAC,EAAE,CAAC,KAAK,EAAE;QACpC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9B,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,UAAU,CAAC;KACpB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACrC,CAAC;AAkgBF,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,0BAA0B,CAAM,GAClD,OAAO,CA+DT"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { join, relative } from 'node:path';
|
|
1
|
+
import { isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
2
2
|
import { buildCommandContext } from '../../app/command-context.js';
|
|
3
3
|
import { PROVIDER_CONFIG_REMEDIATION } from '../shared/messages.js';
|
|
4
4
|
import { withScopeOption } from '../shared/scope-option.js';
|
|
5
5
|
import { selectManyWithAbort, } from '../shared/shared.prompts.js';
|
|
6
6
|
import { readGlobalOptions, resolveConcreteScopes, } from '../shared/shared.utils.js';
|
|
7
7
|
import { DEFAULT_SYNC_CONFIG, loadSyncConfig, saveSyncConfig, } from '../../config/index.js';
|
|
8
|
-
import { computeSyncPlan, executeSyncPlan, scanBundledManagedAgents, scanCanonical, } from '../../engine/index.js';
|
|
8
|
+
import { computeSyncPlan, executeSyncPlan, mergeUserScopeMaterializationEntries, scanBundledManagedAgents, scanCanonical, } from '../../engine/index.js';
|
|
9
9
|
import { CliError } from '../../errors/index.js';
|
|
10
10
|
import { resolveProjectRoot, resolveScopeRoot } from '../../fs/paths.js';
|
|
11
11
|
import { loadManifest } from '../../manifest/index.js';
|
|
@@ -186,6 +186,13 @@ function detectVersionSkew(scope, manifest) {
|
|
|
186
186
|
}
|
|
187
187
|
return { scope, producingVersion, invokingVersion };
|
|
188
188
|
}
|
|
189
|
+
function isPathWithin(root, candidate) {
|
|
190
|
+
const relativePath = relative(resolve(root), resolve(candidate));
|
|
191
|
+
return (relativePath === '' ||
|
|
192
|
+
(relativePath !== '..' &&
|
|
193
|
+
!relativePath.startsWith(`..${sep}`) &&
|
|
194
|
+
!isAbsolute(relativePath)));
|
|
195
|
+
}
|
|
189
196
|
async function computePlans(context, dependencies, canonicalFilter) {
|
|
190
197
|
const scopePlans = [];
|
|
191
198
|
for (const scope of resolveConcreteScopes(context.scope)) {
|
|
@@ -239,8 +246,20 @@ async function computePlans(context, dependencies, canonicalFilter) {
|
|
|
239
246
|
}
|
|
240
247
|
}
|
|
241
248
|
const canonical = await dependencies.scanCanonical(scopeRoot, scope, scanTargets);
|
|
249
|
+
const managedAgents = scope === 'user'
|
|
250
|
+
? await dependencies.scanBundledManagedAgents({ scopeRoot })
|
|
251
|
+
: [];
|
|
252
|
+
const ordinaryCanonical = scope === 'user'
|
|
253
|
+
? [
|
|
254
|
+
...canonical,
|
|
255
|
+
...managedAgents.filter(({ canonicalPath }) => isPathWithin(join(scopeRoot, '.agents', 'agents'), canonicalPath)),
|
|
256
|
+
]
|
|
257
|
+
: canonical;
|
|
258
|
+
const materializationCanonical = scope === 'user'
|
|
259
|
+
? mergeUserScopeMaterializationEntries(canonical, managedAgents)
|
|
260
|
+
: canonical;
|
|
242
261
|
if (canonicalFilter?.mode === 'remove') {
|
|
243
|
-
const existing = new Set(
|
|
262
|
+
const existing = new Set(ordinaryCanonical.map(({ canonicalPath }) => relative(scopeRoot, canonicalPath).replaceAll('\\', '/')));
|
|
244
263
|
const stillPresent = canonicalFilter.paths.filter((path) => existing.has(path));
|
|
245
264
|
if (stillPresent.length > 0) {
|
|
246
265
|
throw new CliError(`Cannot remove canonical provider views while source exists: ${stillPresent.join(', ')}`, 1);
|
|
@@ -268,7 +287,7 @@ async function computePlans(context, dependencies, canonicalFilter) {
|
|
|
268
287
|
}))
|
|
269
288
|
: []) ?? [];
|
|
270
289
|
const plan = await dependencies.computeSyncPlan({
|
|
271
|
-
canonical,
|
|
290
|
+
canonical: ordinaryCanonical,
|
|
272
291
|
adapters: resolved.activeAdapters,
|
|
273
292
|
manifest,
|
|
274
293
|
scope,
|
|
@@ -278,12 +297,9 @@ async function computePlans(context, dependencies, canonicalFilter) {
|
|
|
278
297
|
collectionAliasEligibleMappings,
|
|
279
298
|
...(scope === 'user' ? { extensionOwnedCanonicalPathsByProvider } : {}),
|
|
280
299
|
});
|
|
281
|
-
const extensionCanonical = scope === 'user' && enabledExtensions.length > 0
|
|
282
|
-
? [...canonical, ...(await dependencies.scanBundledManagedAgents())]
|
|
283
|
-
: canonical;
|
|
284
300
|
const materializationExtensionPlans = await Promise.all(enabledExtensions.map((extension) => extension.computePlan({
|
|
285
301
|
scopeRoot,
|
|
286
|
-
canonicalEntries:
|
|
302
|
+
canonicalEntries: materializationCanonical,
|
|
287
303
|
allowedCanonicalPaths: canonicalFilter?.paths,
|
|
288
304
|
options: { userConfigDir: join(context.home, '.oat') },
|
|
289
305
|
})));
|
|
@@ -298,7 +314,7 @@ async function computePlans(context, dependencies, canonicalFilter) {
|
|
|
298
314
|
scopeRoot,
|
|
299
315
|
manifestPath,
|
|
300
316
|
manifest,
|
|
301
|
-
canonical,
|
|
317
|
+
canonical: ordinaryCanonical,
|
|
302
318
|
activeAdapterNames,
|
|
303
319
|
plan,
|
|
304
320
|
providerMismatches: resolved.mismatches,
|
|
@@ -3,7 +3,7 @@ import type { MultiSelectChoice, PromptContext } from '../shared/shared.prompts.
|
|
|
3
3
|
import type { SyncConfig } from '../../config/index.js';
|
|
4
4
|
import type { CollectionProjectionPlan, SyncOperationResult } from '../../engine/engine.types.js';
|
|
5
5
|
import type { CollectionOperationResult } from '../../engine/execute-plan.js';
|
|
6
|
-
import type { CanonicalEntry, SyncPlan, SyncResult } from '../../engine/index.js';
|
|
6
|
+
import type { CanonicalEntry, ScanBundledManagedAgentsOptions, SyncPlan, SyncResult } from '../../engine/index.js';
|
|
7
7
|
import type { Manifest } from '../../manifest/index.js';
|
|
8
8
|
import type { ConfigAwareAdaptersResult, MaterializationApplyResult, MaterializationExtension, MaterializationOperation, MaterializationPlan, ProviderAdapter } from '../../providers/shared/index.js';
|
|
9
9
|
import type { MaterializationOperationResult } from '../../providers/shared/materialization-extension.js';
|
|
@@ -126,7 +126,7 @@ export interface SyncCommandDependencies {
|
|
|
126
126
|
loadSyncConfig: (configPath: string) => Promise<SyncConfig>;
|
|
127
127
|
saveSyncConfig: (configPath: string, config: SyncConfig) => Promise<SyncConfig>;
|
|
128
128
|
scanCanonical: (scopeRoot: string, scope: ConcreteScope) => Promise<CanonicalEntry[]>;
|
|
129
|
-
scanBundledManagedAgents: () => Promise<CanonicalEntry[]>;
|
|
129
|
+
scanBundledManagedAgents: (options?: ScanBundledManagedAgentsOptions) => Promise<CanonicalEntry[]>;
|
|
130
130
|
getAdapters: () => ProviderAdapter[];
|
|
131
131
|
getConfigAwareAdapters: (adapters: ProviderAdapter[], scopeRoot: string, config: SyncConfig) => Promise<ConfigAwareAdaptersResult>;
|
|
132
132
|
selectProvidersWithAbort: <T extends string>(message: string, choices: MultiSelectChoice<T>[], ctx: PromptContext) => Promise<T[] | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.types.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/sync.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAA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ACjC,SAAS,EAAE,4BAA4B,EACvC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,mBAAmB,KACtB,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,cAAc,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;CAC9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/migrate/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/migrate/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAGhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAG5E,OAAO,EACL,4BAA4B,EAE5B,KAAK,iCAAiC,EACvC,MAAM,uCAAuC,CAAC;AAU/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAE5C,OAAO,EAIL,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAExB,UAAU,uBAAuB;IAC/B,OAAO,EAAE,cAAc,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,gBAAgB,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9E,iBAAiB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,SAAS,EAAE,OAAO,mBAAmB,CAAC;IACtC,uBAAuB,EAAE,CACvB,KAAK,EAAE,iCAAiC,KACrC,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC;IACrD,IAAI,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,oBAAoB,CAAC;IAC9D,kBAAkB,EAAE,CAClB,OAAO,EAAE,oBAAoB,EAC7B,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,uBAAuB,KAC7B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnC,qBAAqB,EAAE,CACrB,WAAW,EAAE,oBAAoB,EACjC,KAAK,EAAE,mCAAmC,EAC1C,OAAO,EAAE,uBAAuB,KAC7B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnC,aAAa,EAAE,OAAO,aAAa,CAAC;CACrC;AA+PD,wBAAgB,yBAAyB,CACvC,YAAY,GAAE,4BAAkD,GAC/D,OAAO,CA0IT"}
|
|
@@ -4,10 +4,12 @@ import { dirname } from 'node:path';
|
|
|
4
4
|
import { buildCommandContext, } from '../../../app/command-context.js';
|
|
5
5
|
import { confirmAction } from '../../shared/shared.prompts.js';
|
|
6
6
|
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
7
|
+
import { dependencyRetainedAssetIds } from '../../tools/shared/pack-dependencies.js';
|
|
7
8
|
import { inventoryScopedPack } from '../../tools/shared/pack-inventory.js';
|
|
9
|
+
import { reconcilePackDependencyLifecycles } from '../../tools/shared/pack-lifecycle.js';
|
|
8
10
|
import { isPackName, PACK_NAMES } from '../../tools/shared/pack-manifest.js';
|
|
9
11
|
import { resolveSharedOwnerRetentions, } from '../../tools/shared/pack-reconcile.js';
|
|
10
|
-
import { hasScopedPackOwnershipEvidence, writeScopedPackIntent, } from '../../tools/shared/scoped-pack-intent.js';
|
|
12
|
+
import { hasScopedPackOwnershipEvidence, readScopedPackIntent, writeScopedPackIntent, } from '../../tools/shared/scoped-pack-intent.js';
|
|
11
13
|
import { readOatConfig, writeOatConfig } from '../../../config/oat-config.js';
|
|
12
14
|
import { CliError } from '../../../errors/index.js';
|
|
13
15
|
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
@@ -61,6 +63,13 @@ async function writeGenerated(scopeRoot, operation) {
|
|
|
61
63
|
}
|
|
62
64
|
async function defaultExecuteDestination(preview, destinationRoot, runtime) {
|
|
63
65
|
return executeMigrationDestination(preview, destinationRoot, {
|
|
66
|
+
acquireDependencies: async () => reconcilePackDependencyLifecycles({
|
|
67
|
+
pack: preview.pack,
|
|
68
|
+
scope: preview.to,
|
|
69
|
+
scopeRoot: destinationRoot,
|
|
70
|
+
assetsRoot: runtime.assetsRoot,
|
|
71
|
+
action: 'migrate-destination',
|
|
72
|
+
}),
|
|
64
73
|
applyDependencies: {
|
|
65
74
|
writeGenerated: async (operation) => writeGenerated(destinationRoot, operation),
|
|
66
75
|
writeIntent: async (operation) => writeScopedPackIntent({
|
|
@@ -86,6 +95,13 @@ async function defaultExecuteDestination(preview, destinationRoot, runtime) {
|
|
|
86
95
|
async function defaultCompleteSourceRemoval(destination, input, runtime) {
|
|
87
96
|
const preview = destination.preview;
|
|
88
97
|
return completeMigrationSourceRemoval(destination, input, {
|
|
98
|
+
releaseDependencies: async () => reconcilePackDependencyLifecycles({
|
|
99
|
+
pack: preview.pack,
|
|
100
|
+
scope: preview.from,
|
|
101
|
+
scopeRoot: input.sourceRoot,
|
|
102
|
+
assetsRoot: runtime.assetsRoot,
|
|
103
|
+
action: 'remove',
|
|
104
|
+
}),
|
|
89
105
|
inventory: async () => inventoryScopedPack({
|
|
90
106
|
pack: preview.pack,
|
|
91
107
|
scope: preview.from,
|
|
@@ -107,6 +123,14 @@ async function defaultCompleteSourceRemoval(destination, input, runtime) {
|
|
|
107
123
|
scopeRoot: input.sourceRoot,
|
|
108
124
|
hasOwnershipEvidence: async (pack, scope, scopeRoot) => hasScopedPackOwnershipEvidence({ pack, scope, scopeRoot }),
|
|
109
125
|
}),
|
|
126
|
+
resolveRetainedDependencyAssetIds: async () => {
|
|
127
|
+
const intent = await readScopedPackIntent({
|
|
128
|
+
pack: preview.pack,
|
|
129
|
+
scope: preview.from,
|
|
130
|
+
scopeRoot: input.sourceRoot,
|
|
131
|
+
});
|
|
132
|
+
return dependencyRetainedAssetIds(preview.pack, intent.requiredBy);
|
|
133
|
+
},
|
|
110
134
|
sync: async ({ scope, canonicalPaths }) => runSync({
|
|
111
135
|
context: runtime.context,
|
|
112
136
|
scope,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { applyPackReconcilePlan, type ApplyPackReconcileDependencies } from '../../tools/shared/apply-pack-reconcile.js';
|
|
2
2
|
import { type ScopedPackInventory } from '../../tools/shared/pack-inventory.js';
|
|
3
|
+
import type { PackLifecycleResult } from '../../tools/shared/pack-lifecycle.js';
|
|
3
4
|
import { planPackReconcile, type PackSharedOwnerRetention, type PackReconcilePlan } from '../../tools/shared/pack-reconcile.js';
|
|
4
5
|
import type { PackAssetKind, PackAssetStatus, PackName } from '../../tools/shared/types.js';
|
|
5
6
|
import type { ConcreteScope } from '../../../shared/types.js';
|
|
@@ -40,6 +41,7 @@ export interface PackMigrationOutcome {
|
|
|
40
41
|
sourceInventory?: ScopedPackInventory;
|
|
41
42
|
recovery?: readonly string[];
|
|
42
43
|
pendingSync?: MigrationPendingSync;
|
|
44
|
+
dependencyLifecycles?: readonly PackLifecycleResult[];
|
|
43
45
|
}
|
|
44
46
|
export interface PlanPackMigrationInput {
|
|
45
47
|
pack: PackName;
|
|
@@ -61,6 +63,7 @@ export interface ExecuteMigrationDestinationDependencies {
|
|
|
61
63
|
apply?: typeof applyPackReconcilePlan;
|
|
62
64
|
applyDependencies: ApplyPackReconcileDependencies;
|
|
63
65
|
sync?: (input: MigrationSyncInput) => Promise<void>;
|
|
66
|
+
acquireDependencies?: () => Promise<PackLifecycleResult[]>;
|
|
64
67
|
}
|
|
65
68
|
export interface CompleteMigrationSourceRemovalInput {
|
|
66
69
|
confirmation: 'confirmed' | 'declined' | 'non-interactive';
|
|
@@ -73,7 +76,9 @@ export interface CompleteMigrationSourceRemovalDependencies {
|
|
|
73
76
|
apply?: typeof applyPackReconcilePlan;
|
|
74
77
|
applyDependencies: Omit<ApplyPackReconcileDependencies, 'inventory'>;
|
|
75
78
|
resolveSourceRetentions?: () => Promise<PackSharedOwnerRetention[]>;
|
|
79
|
+
resolveRetainedDependencyAssetIds?: () => Promise<string[]>;
|
|
76
80
|
sync?: (input: MigrationSyncInput) => Promise<void>;
|
|
81
|
+
releaseDependencies?: () => Promise<PackLifecycleResult[]>;
|
|
77
82
|
}
|
|
78
83
|
export declare function planPackMigration(input: PlanPackMigrationInput): PackMigrationPreview;
|
|
79
84
|
export declare function executeMigrationDestination(preview: PackMigrationPreview, destinationRoot: string, dependencies: ExecuteMigrationDestinationDependencies): Promise<PackMigrationOutcome>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-pack.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/migrate/migrate-pack.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,KAAK,8BAA8B,EACpC,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"migrate-pack.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/migrate/migrate-pack.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,KAAK,8BAA8B,EACpC,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAEjF,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GAAG,iBAAiB,CAAC;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,0CAA0C;IACzD,SAAS,EAAE,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC9C,IAAI,CAAC,EAAE,OAAO,iBAAiB,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,sBAAsB,CAAC;IACtC,iBAAiB,EAAE,IAAI,CAAC,8BAA8B,EAAE,WAAW,CAAC,CAAC;IACrE,uBAAuB,CAAC,EAAE,MAAM,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC;IACpE,iCAAiC,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5D,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;CAC5D;AA8BD,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,sBAAsB,GAC5B,oBAAoB,CAwJtB;AAED,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,oBAAoB,EAC7B,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,uCAAuC,GACpD,OAAO,CAAC,oBAAoB,CAAC,CAwE/B;AAsDD,wBAAsB,8BAA8B,CAClD,WAAW,EAAE,oBAAoB,EACjC,KAAK,EAAE,mCAAmC,EAC1C,YAAY,EAAE,0CAA0C,GACvD,OAAO,CAAC,oBAAoB,CAAC,CAyN/B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { applyPackReconcilePlan, } from '../../tools/shared/apply-pack-reconcile.js';
|
|
2
|
+
import { canonicalPathsForPack } from '../../tools/shared/install-sync-context.js';
|
|
2
3
|
import { hasScopedPackPlacementEvidence, } from '../../tools/shared/pack-inventory.js';
|
|
3
4
|
import { getPackDefinition } from '../../tools/shared/pack-manifest.js';
|
|
4
5
|
import { planPackReconcile, } from '../../tools/shared/pack-reconcile.js';
|
|
@@ -49,10 +50,13 @@ export function planPackMigration(input) {
|
|
|
49
50
|
const destinationPlan = {
|
|
50
51
|
...unfilteredDestinationPlan,
|
|
51
52
|
operations: unfilteredDestinationPlan.operations.filter((operation) => operation.kind === 'write-intent' ||
|
|
53
|
+
operation.kind === 'write-lease' ||
|
|
52
54
|
!conflictIds.has(operation.assetId)),
|
|
53
55
|
changedCanonicalPaths: unfilteredDestinationPlan.changedCanonicalPaths.filter((path) => !conflictCanonicalPaths.has(path)),
|
|
54
56
|
};
|
|
55
|
-
const additionIds = new Set(destinationPlan.operations.flatMap((operation) => operation.kind === 'write-intent'
|
|
57
|
+
const additionIds = new Set(destinationPlan.operations.flatMap((operation) => operation.kind === 'write-intent' || operation.kind === 'write-lease'
|
|
58
|
+
? []
|
|
59
|
+
: [operation.assetId]));
|
|
56
60
|
const additions = input.destinationInventory.assets
|
|
57
61
|
.filter(({ definition }) => additionIds.has(definition.id) && !conflictIds.has(definition.id))
|
|
58
62
|
.map((asset) => previewAsset(asset, input.to, 'destination-reconcile'));
|
|
@@ -108,6 +112,7 @@ export async function executeMigrationDestination(preview, destinationRoot, depe
|
|
|
108
112
|
if (preview.status === 'blocked' || preview.conflicts.length > 0) {
|
|
109
113
|
throw new Error(`Migration destination conflicts must be resolved before mutation: ${preview.conflicts.map(({ assetId }) => assetId).join(', ')}`);
|
|
110
114
|
}
|
|
115
|
+
const dependencyLifecycles = (await dependencies.acquireDependencies?.()) ?? [];
|
|
111
116
|
const applied = await (dependencies.apply ?? applyPackReconcilePlan)(preview.destinationPlan, destinationRoot, { ...dependencies.applyDependencies, sync: undefined });
|
|
112
117
|
const destinationInventory = applied.inventory;
|
|
113
118
|
const drifted = destinationInventory.assets.filter(({ definition: asset, status }) => asset.ownership[preview.to] === 'managed' && status !== 'current');
|
|
@@ -119,9 +124,7 @@ export async function executeMigrationDestination(preview, destinationRoot, depe
|
|
|
119
124
|
drifted.length > 0) {
|
|
120
125
|
throw new Error(`Migration destination verification did not produce a complete current declared installation for ${preview.pack} at ${preview.to} scope`);
|
|
121
126
|
}
|
|
122
|
-
const canonicalPaths =
|
|
123
|
-
.assets.filter(({ kind, scopes }) => scopes.includes(preview.to) && (kind === 'skill' || kind === 'agent'))
|
|
124
|
-
.map(({ destination }) => destination);
|
|
127
|
+
const canonicalPaths = canonicalPathsForPack(preview.pack);
|
|
125
128
|
try {
|
|
126
129
|
await dependencies.sync?.({
|
|
127
130
|
scope: preview.to,
|
|
@@ -147,6 +150,7 @@ export async function executeMigrationDestination(preview, destinationRoot, depe
|
|
|
147
150
|
preview,
|
|
148
151
|
status: 'destination-verified',
|
|
149
152
|
destinationInventory,
|
|
153
|
+
dependencyLifecycles,
|
|
150
154
|
};
|
|
151
155
|
}
|
|
152
156
|
function migrationRetry(preview) {
|
|
@@ -245,6 +249,7 @@ export async function completeMigrationSourceRemoval(destination, input, depende
|
|
|
245
249
|
const sourceBefore = await dependencies.inventory();
|
|
246
250
|
assertInventory(sourceBefore, preview.pack, preview.from, 'source');
|
|
247
251
|
const sourceRetentions = (await dependencies.resolveSourceRetentions?.()) ?? [];
|
|
252
|
+
const retainedDependencyAssetIds = (await dependencies.resolveRetainedDependencyAssetIds?.()) ?? [];
|
|
248
253
|
const sourcePlan = (dependencies.plan ?? planPackReconcile)({
|
|
249
254
|
pack: preview.pack,
|
|
250
255
|
scope: preview.from,
|
|
@@ -253,27 +258,45 @@ export async function completeMigrationSourceRemoval(destination, input, depende
|
|
|
253
258
|
action: 'remove',
|
|
254
259
|
inventory: sourceBefore,
|
|
255
260
|
retainedAssets: sourceRetentions,
|
|
261
|
+
retainedDependencyAssetIds,
|
|
256
262
|
});
|
|
263
|
+
const priorReleasedDependencyPaths = (destination.dependencyLifecycles ?? [])
|
|
264
|
+
.filter(({ request }) => request.scope === preview.from &&
|
|
265
|
+
request.dependency?.lease === 'release')
|
|
266
|
+
.flatMap(({ plan }) => plan.changedCanonicalPaths);
|
|
267
|
+
let dependencyLifecycles = [];
|
|
257
268
|
try {
|
|
269
|
+
dependencyLifecycles = (await dependencies.releaseDependencies?.()) ?? [];
|
|
258
270
|
const applied = await (dependencies.apply ?? applyPackReconcilePlan)(sourcePlan, input.sourceRoot, {
|
|
259
271
|
...dependencies.applyDependencies,
|
|
260
272
|
inventory: dependencies.inventory,
|
|
261
273
|
sync: undefined,
|
|
262
274
|
});
|
|
275
|
+
const removedCanonicalPaths = [
|
|
276
|
+
...new Set([
|
|
277
|
+
...sourcePlan.changedCanonicalPaths,
|
|
278
|
+
...priorReleasedDependencyPaths,
|
|
279
|
+
...dependencyLifecycles.flatMap(({ plan }) => plan.changedCanonicalPaths),
|
|
280
|
+
]),
|
|
281
|
+
];
|
|
263
282
|
try {
|
|
264
283
|
await dependencies.sync?.({
|
|
265
284
|
scope: preview.from,
|
|
266
285
|
action: 'remove',
|
|
267
|
-
canonicalPaths:
|
|
286
|
+
canonicalPaths: removedCanonicalPaths,
|
|
268
287
|
});
|
|
269
288
|
}
|
|
270
289
|
catch (error) {
|
|
271
|
-
const pendingSync = pendingSyncState(preview, preview.from, 'remove',
|
|
290
|
+
const pendingSync = pendingSyncState(preview, preview.from, 'remove', removedCanonicalPaths);
|
|
272
291
|
return {
|
|
273
292
|
preview,
|
|
274
293
|
status: 'source-sync-failed',
|
|
275
294
|
destinationInventory: destination.destinationInventory,
|
|
276
295
|
sourceInventory: applied.inventory,
|
|
296
|
+
dependencyLifecycles: [
|
|
297
|
+
...(destination.dependencyLifecycles ?? []),
|
|
298
|
+
...dependencyLifecycles,
|
|
299
|
+
],
|
|
277
300
|
pendingSync,
|
|
278
301
|
recovery: [
|
|
279
302
|
`Source provider sync failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -286,9 +309,33 @@ export async function completeMigrationSourceRemoval(destination, input, depende
|
|
|
286
309
|
status: 'migrated',
|
|
287
310
|
destinationInventory: destination.destinationInventory,
|
|
288
311
|
sourceInventory: applied.inventory,
|
|
312
|
+
dependencyLifecycles: [
|
|
313
|
+
...(destination.dependencyLifecycles ?? []),
|
|
314
|
+
...dependencyLifecycles,
|
|
315
|
+
],
|
|
289
316
|
};
|
|
290
317
|
}
|
|
291
318
|
catch (error) {
|
|
319
|
+
const releasedDependencyPaths = [
|
|
320
|
+
...new Set([
|
|
321
|
+
...priorReleasedDependencyPaths,
|
|
322
|
+
...dependencyLifecycles.flatMap(({ plan }) => plan.changedCanonicalPaths),
|
|
323
|
+
]),
|
|
324
|
+
];
|
|
325
|
+
let dependencySyncFailure = null;
|
|
326
|
+
if (releasedDependencyPaths.length > 0) {
|
|
327
|
+
try {
|
|
328
|
+
await dependencies.sync?.({
|
|
329
|
+
scope: preview.from,
|
|
330
|
+
action: 'remove',
|
|
331
|
+
canonicalPaths: releasedDependencyPaths,
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
catch (syncError) {
|
|
335
|
+
dependencySyncFailure =
|
|
336
|
+
syncError instanceof Error ? syncError.message : String(syncError);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
292
339
|
let sourceInventory = sourceBefore;
|
|
293
340
|
let inventoryFailure = null;
|
|
294
341
|
try {
|
|
@@ -311,13 +358,25 @@ export async function completeMigrationSourceRemoval(destination, input, depende
|
|
|
311
358
|
status: 'source-removal-failed',
|
|
312
359
|
destinationInventory: destination.destinationInventory,
|
|
313
360
|
sourceInventory,
|
|
361
|
+
dependencyLifecycles: [
|
|
362
|
+
...(destination.dependencyLifecycles ?? []),
|
|
363
|
+
...dependencyLifecycles,
|
|
364
|
+
],
|
|
314
365
|
recovery: [
|
|
315
366
|
`Source removal failed: ${detail}`,
|
|
367
|
+
...(dependencySyncFailure
|
|
368
|
+
? [
|
|
369
|
+
`Dependency provider sync failed: ${dependencySyncFailure}`,
|
|
370
|
+
`Retry provider sync: ${pendingSyncState(preview, preview.from, 'remove', releasedDependencyPaths).command}`,
|
|
371
|
+
]
|
|
372
|
+
: []),
|
|
316
373
|
`Remaining source paths: ${remaining.length > 0 ? remaining.join(', ') : 'inventory unavailable'}`,
|
|
317
374
|
...(inventoryFailure
|
|
318
375
|
? [`Source re-inventory failed: ${inventoryFailure}`]
|
|
319
376
|
: []),
|
|
320
|
-
|
|
377
|
+
dependencySyncFailure
|
|
378
|
+
? `After provider sync, ${migrationRetry(preview)}`
|
|
379
|
+
: migrationRetry(preview),
|
|
321
380
|
],
|
|
322
381
|
};
|
|
323
382
|
}
|