@open-agent-toolkit/cli 0.2.51 → 0.2.53
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 +66 -28
- 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 +149 -37
- 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 +108 -43
- 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/index.d.ts +1 -1
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +1 -1
- 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 +9 -2
- package/dist/engine/scanner.d.ts.map +1 -1
- package/dist/engine/scanner.js +58 -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 +1 -1
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +48 -17
- 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 +52 -23
- 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
|
@@ -2,17 +2,54 @@ import { join } from 'node:path';
|
|
|
2
2
|
import { buildCommandContext } from '../../../app/command-context.js';
|
|
3
3
|
import { withScopeOption } from '../../shared/scope-option.js';
|
|
4
4
|
import { readGlobalOptions, resolveConcreteScopes, } from '../../shared/shared.utils.js';
|
|
5
|
+
import { DEFAULT_SYNC_CONFIG, loadSyncConfig } from '../../../config/index.js';
|
|
5
6
|
import { detectDrift } from '../../../drift/index.js';
|
|
6
7
|
import { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, } from '../../../fs/paths.js';
|
|
7
8
|
import { loadManifest } from '../../../manifest/index.js';
|
|
8
|
-
import {
|
|
9
|
-
import { codexAdapter } from '../../../providers/codex/index.js';
|
|
10
|
-
import { copilotAdapter } from '../../../providers/copilot/index.js';
|
|
11
|
-
import { cursorAdapter } from '../../../providers/cursor/index.js';
|
|
12
|
-
import { geminiAdapter } from '../../../providers/gemini/index.js';
|
|
13
|
-
import { getSyncMappings } from '../../../providers/shared/index.js';
|
|
9
|
+
import { getProviderRegistrations, getSyncMappings, resolveProviderScopeContext, } from '../../../providers/shared/index.js';
|
|
14
10
|
import { formatProviderDetails } from '../../../ui/output.js';
|
|
15
11
|
import { Command } from 'commander';
|
|
12
|
+
function contentInspection(capability, mappingState) {
|
|
13
|
+
const nativeRead = capability.projectionModes.includes('native-read');
|
|
14
|
+
return {
|
|
15
|
+
contentKind: capability.contentKind,
|
|
16
|
+
capability: capability.support,
|
|
17
|
+
projectionModes: capability.projectionModes,
|
|
18
|
+
nativeRead,
|
|
19
|
+
materialization: capability.support === 'unsupported'
|
|
20
|
+
? 'unsupported'
|
|
21
|
+
: nativeRead &&
|
|
22
|
+
!capability.projectionModes.includes('entry-sync') &&
|
|
23
|
+
!capability.projectionModes.includes('materialization-extension')
|
|
24
|
+
? 'not-required'
|
|
25
|
+
: mappingState?.missing
|
|
26
|
+
? 'missing'
|
|
27
|
+
: mappingState?.managed &&
|
|
28
|
+
mappingState.inSync === mappingState.managed
|
|
29
|
+
? 'current'
|
|
30
|
+
: 'unknown',
|
|
31
|
+
visibility: capability.support === 'unsupported' ? 'unsupported' : 'not-reported',
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function fallbackCapabilities(mappings, scope) {
|
|
35
|
+
const seen = new Set();
|
|
36
|
+
return mappings.flatMap((mapping) => {
|
|
37
|
+
if (seen.has(mapping.contentType))
|
|
38
|
+
return [];
|
|
39
|
+
seen.add(mapping.contentType);
|
|
40
|
+
return [
|
|
41
|
+
{
|
|
42
|
+
scope,
|
|
43
|
+
contentKind: mapping.contentType,
|
|
44
|
+
support: 'supported',
|
|
45
|
+
projectionModes: [mapping.nativeRead ? 'native-read' : 'entry-sync'],
|
|
46
|
+
nativeRoleSurface: mapping.contentType === 'agent',
|
|
47
|
+
collectionAlias: 'unsupported',
|
|
48
|
+
catalogRefresh: { state: 'unknown', reason: 'not resolved' },
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
});
|
|
52
|
+
}
|
|
16
53
|
function entryInMapping(providerPath, providerDir) {
|
|
17
54
|
const normalizedPath = normalizeToPosixPath(providerPath);
|
|
18
55
|
const normalizedDir = normalizeToPosixPath(providerDir);
|
|
@@ -29,40 +66,67 @@ function createDependencies() {
|
|
|
29
66
|
return resolveScopeRoot(scope, context.cwd, context.home);
|
|
30
67
|
},
|
|
31
68
|
getAdapters() {
|
|
32
|
-
return
|
|
33
|
-
claudeAdapter,
|
|
34
|
-
cursorAdapter,
|
|
35
|
-
codexAdapter,
|
|
36
|
-
copilotAdapter,
|
|
37
|
-
geminiAdapter,
|
|
38
|
-
];
|
|
69
|
+
return getProviderRegistrations().map(({ adapter }) => adapter);
|
|
39
70
|
},
|
|
40
71
|
getSyncMappings,
|
|
41
72
|
loadManifest,
|
|
42
73
|
detectDrift,
|
|
74
|
+
async loadSyncConfig(configPath) {
|
|
75
|
+
return loadSyncConfig(configPath, DEFAULT_SYNC_CONFIG);
|
|
76
|
+
},
|
|
77
|
+
resolveProviderScopeContext,
|
|
43
78
|
};
|
|
44
79
|
}
|
|
45
80
|
async function collectInspectResult(providerName, context, dependencies) {
|
|
46
|
-
const adapter = dependencies
|
|
47
|
-
.getAdapters()
|
|
48
|
-
.find((candidate) => candidate.name.toLowerCase() === providerName.toLowerCase());
|
|
49
|
-
if (!adapter) {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
81
|
const scopes = resolveConcreteScopes(context.scope);
|
|
53
|
-
const scopeRoots = await Promise.all(scopes.map(async (scope) =>
|
|
54
|
-
scope,
|
|
55
|
-
|
|
56
|
-
|
|
82
|
+
const scopeRoots = await Promise.all(scopes.map(async (scope) => {
|
|
83
|
+
const root = await dependencies.resolveScopeRoot(scope, context);
|
|
84
|
+
const config = dependencies.loadSyncConfig
|
|
85
|
+
? await dependencies.loadSyncConfig(join(root, '.oat', 'sync', 'config.json'))
|
|
86
|
+
: undefined;
|
|
87
|
+
const providerContext = config && dependencies.resolveProviderScopeContext
|
|
88
|
+
? await dependencies.resolveProviderScopeContext({
|
|
89
|
+
scope,
|
|
90
|
+
scopeRoot: root,
|
|
91
|
+
config,
|
|
92
|
+
})
|
|
93
|
+
: undefined;
|
|
94
|
+
return { scope, root, providerContext };
|
|
95
|
+
}));
|
|
96
|
+
const providerContexts = scopeRoots
|
|
97
|
+
.map(({ providerContext }) => providerContext)
|
|
98
|
+
.filter((value) => value !== undefined);
|
|
99
|
+
const adapters = providerContexts[0]
|
|
100
|
+
? providerContexts[0].registrations.map(({ adapter }) => adapter)
|
|
101
|
+
: dependencies.getAdapters();
|
|
102
|
+
const adapter = adapters.find((candidate) => candidate.name.toLowerCase() === providerName.toLowerCase());
|
|
103
|
+
if (!adapter)
|
|
104
|
+
return null;
|
|
57
105
|
const mappings = [];
|
|
106
|
+
const collectionAliases = [];
|
|
58
107
|
let detected = false;
|
|
59
108
|
for (const scopeRoot of scopeRoots) {
|
|
60
|
-
if (
|
|
109
|
+
if (scopeRoot.providerContext
|
|
110
|
+
? scopeRoot.providerContext.detectedProviders.includes(adapter.name)
|
|
111
|
+
: await adapter.detect(scopeRoot.root)) {
|
|
61
112
|
detected = true;
|
|
62
113
|
}
|
|
63
114
|
const manifestPath = join(scopeRoot.root, '.oat', 'sync', 'manifest.json');
|
|
64
115
|
const manifest = await dependencies.loadManifest(manifestPath);
|
|
65
|
-
|
|
116
|
+
collectionAliases.push(...(manifest.collections ?? [])
|
|
117
|
+
.filter((collection) => collection.provider === adapter.name)
|
|
118
|
+
.map((collection) => ({
|
|
119
|
+
scope: scopeRoot.scope,
|
|
120
|
+
contentType: collection.contentType,
|
|
121
|
+
canonicalDir: collection.canonicalDir,
|
|
122
|
+
providerDir: collection.providerDir,
|
|
123
|
+
ownership: collection.ownership,
|
|
124
|
+
lastVerified: collection.lastVerified,
|
|
125
|
+
})));
|
|
126
|
+
const scopeMappings = scopeRoot.scope === 'project'
|
|
127
|
+
? adapter.projectMappings
|
|
128
|
+
: adapter.userMappings;
|
|
129
|
+
for (const mapping of scopeMappings) {
|
|
66
130
|
const state = {
|
|
67
131
|
scope: scopeRoot.scope,
|
|
68
132
|
contentType: mapping.contentType,
|
|
@@ -71,6 +135,10 @@ async function collectInspectResult(providerName, context, dependencies) {
|
|
|
71
135
|
inSync: 0,
|
|
72
136
|
drifted: 0,
|
|
73
137
|
missing: 0,
|
|
138
|
+
nativeRead: mapping.nativeRead,
|
|
139
|
+
projectionModes: [mapping.nativeRead ? 'native-read' : 'entry-sync'],
|
|
140
|
+
materialization: mapping.nativeRead ? 'not-required' : 'unknown',
|
|
141
|
+
visibility: 'not-reported',
|
|
74
142
|
};
|
|
75
143
|
const copyTransform = mapping.transformCanonical
|
|
76
144
|
? { transformCanonical: mapping.transformCanonical }
|
|
@@ -96,9 +164,40 @@ async function collectInspectResult(providerName, context, dependencies) {
|
|
|
96
164
|
state.drifted += 1;
|
|
97
165
|
}
|
|
98
166
|
}
|
|
167
|
+
if (!mapping.nativeRead) {
|
|
168
|
+
state.materialization =
|
|
169
|
+
state.missing > 0
|
|
170
|
+
? 'missing'
|
|
171
|
+
: state.managed > 0 && state.inSync === state.managed
|
|
172
|
+
? 'current'
|
|
173
|
+
: 'unknown';
|
|
174
|
+
}
|
|
99
175
|
mappings.push(state);
|
|
100
176
|
}
|
|
101
177
|
}
|
|
178
|
+
const providerScopes = scopeRoots.map((scopeRoot) => {
|
|
179
|
+
const registration = scopeRoot.providerContext?.registrations.find(({ adapter: candidate }) => candidate.name === adapter.name);
|
|
180
|
+
const scopeMappings = scopeRoot.scope === 'project'
|
|
181
|
+
? adapter.projectMappings
|
|
182
|
+
: adapter.userMappings;
|
|
183
|
+
const capabilities = registration?.capabilities.filter(({ scope }) => scope === scopeRoot.scope) ?? fallbackCapabilities(scopeMappings, scopeRoot.scope);
|
|
184
|
+
const activation = scopeRoot.providerContext?.activation.find(({ provider }) => provider === adapter.name);
|
|
185
|
+
const detectedAtScope = scopeRoot.providerContext
|
|
186
|
+
? scopeRoot.providerContext.detectedProviders.includes(adapter.name)
|
|
187
|
+
: detected;
|
|
188
|
+
return {
|
|
189
|
+
scope: scopeRoot.scope,
|
|
190
|
+
activation: activation ?? {
|
|
191
|
+
state: detectedAtScope ? 'active' : 'unknown',
|
|
192
|
+
source: detectedAtScope ? 'detection-fallback' : 'not-resolved',
|
|
193
|
+
reason: detectedAtScope
|
|
194
|
+
? 'Provider detected without resolved configuration authority'
|
|
195
|
+
: 'Provider activation was not resolved',
|
|
196
|
+
},
|
|
197
|
+
content: capabilities.map((capability) => contentInspection(capability, mappings.find((mapping) => mapping.scope === scopeRoot.scope &&
|
|
198
|
+
mapping.contentType === capability.contentKind))),
|
|
199
|
+
};
|
|
200
|
+
});
|
|
102
201
|
const version = adapter.detectVersion ? await adapter.detectVersion() : null;
|
|
103
202
|
return {
|
|
104
203
|
name: adapter.name,
|
|
@@ -109,6 +208,8 @@ async function collectInspectResult(providerName, context, dependencies) {
|
|
|
109
208
|
userMappings: adapter.userMappings,
|
|
110
209
|
version,
|
|
111
210
|
mappings,
|
|
211
|
+
scopes: providerScopes,
|
|
212
|
+
collectionAliases,
|
|
112
213
|
};
|
|
113
214
|
}
|
|
114
215
|
function formatInspect(result) {
|
|
@@ -125,7 +226,22 @@ function formatInspect(result) {
|
|
|
125
226
|
if (result.mappings.length > 0) {
|
|
126
227
|
lines.push('Mappings:');
|
|
127
228
|
for (const mapping of result.mappings) {
|
|
128
|
-
lines.push(`- [${mapping.scope}] ${mapping.contentType} ${mapping.providerDir} managed=${mapping.managed} in_sync=${mapping.inSync} drifted=${mapping.drifted} missing=${mapping.missing}`);
|
|
229
|
+
lines.push(`- [${mapping.scope}] ${mapping.contentType} ${mapping.providerDir} projection=${mapping.projectionModes.join('|')} materialization=${mapping.materialization} visibility=${mapping.visibility} managed=${mapping.managed} in_sync=${mapping.inSync} drifted=${mapping.drifted} missing=${mapping.missing}`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (result.collectionAliases.length > 0) {
|
|
233
|
+
lines.push('Collection aliases:');
|
|
234
|
+
for (const collection of result.collectionAliases) {
|
|
235
|
+
lines.push(`- [${collection.scope}] ${collection.contentType} ${collection.ownership} ${collection.canonicalDir} -> ${collection.providerDir} last_verified=${collection.lastVerified}`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (result.scopes.length > 0) {
|
|
239
|
+
lines.push('Capability evidence:');
|
|
240
|
+
for (const scope of result.scopes) {
|
|
241
|
+
lines.push(`- [${scope.scope}] activation=${scope.activation.state} source=${scope.activation.source}`);
|
|
242
|
+
for (const content of scope.content) {
|
|
243
|
+
lines.push(` - ${content.contentKind} capability=${content.capability} projection=${content.projectionModes.join('|')} native_read=${content.nativeRead} materialization=${content.materialization} visibility=${content.visibility}`);
|
|
244
|
+
}
|
|
129
245
|
}
|
|
130
246
|
}
|
|
131
247
|
return lines.join('\n');
|
|
@@ -150,6 +266,10 @@ export function createProvidersInspectCommand(overrides = {}) {
|
|
|
150
266
|
...createDependencies(),
|
|
151
267
|
...overrides,
|
|
152
268
|
};
|
|
269
|
+
if (overrides.resolveProviderScopeContext === undefined &&
|
|
270
|
+
overrides.getAdapters !== undefined) {
|
|
271
|
+
dependencies.resolveProviderScopeContext = undefined;
|
|
272
|
+
}
|
|
153
273
|
return withScopeOption(new Command('inspect'))
|
|
154
274
|
.description('Inspect provider details and mapping state')
|
|
155
275
|
.argument('<provider>', 'Provider name')
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { ProvidersListDependencies } from '../../providers/providers.types.js';
|
|
2
|
+
import { loadSyncConfig } from '../../../config/index.js';
|
|
3
|
+
import { resolveProviderScopeContext } from '../../../providers/shared/index.js';
|
|
2
4
|
import { Command } from 'commander';
|
|
3
|
-
|
|
5
|
+
type ContextualListDependencies = ProvidersListDependencies & {
|
|
6
|
+
loadSyncConfig?: typeof loadSyncConfig;
|
|
7
|
+
resolveProviderScopeContext?: typeof resolveProviderScopeContext;
|
|
8
|
+
};
|
|
9
|
+
export declare function createProvidersListCommand(overrides?: Partial<ContextualListDependencies>): Command;
|
|
10
|
+
export {};
|
|
4
11
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/list/list.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/list/list.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAKV,yBAAyB,EAC1B,MAAM,qCAAqC,CAAC;AAM7C,OAAO,EAAuB,cAAc,EAAE,MAAM,eAAe,CAAC;AAQpE,OAAO,EAEL,2BAA2B,EAK5B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,KAAK,0BAA0B,GAAG,yBAAyB,GAAG;IAC5D,cAAc,CAAC,EAAE,OAAO,cAAc,CAAC;IACvC,2BAA2B,CAAC,EAAE,OAAO,2BAA2B,CAAC;CAClE,CAAC;AAiXF,wBAAgB,0BAA0B,CACxC,SAAS,GAAE,OAAO,CAAC,0BAA0B,CAAM,GAClD,OAAO,CAoBT"}
|
|
@@ -2,18 +2,19 @@ import { join } from 'node:path';
|
|
|
2
2
|
import { buildCommandContext } from '../../../app/command-context.js';
|
|
3
3
|
import { withScopeOption } from '../../shared/scope-option.js';
|
|
4
4
|
import { readGlobalOptions, resolveConcreteScopes, } from '../../shared/shared.utils.js';
|
|
5
|
+
import { DEFAULT_SYNC_CONFIG, loadSyncConfig } from '../../../config/index.js';
|
|
5
6
|
import { detectDrift } from '../../../drift/index.js';
|
|
6
7
|
import { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, } from '../../../fs/paths.js';
|
|
7
8
|
import { loadManifest } from '../../../manifest/index.js';
|
|
8
|
-
import {
|
|
9
|
-
import { codexAdapter } from '../../../providers/codex/index.js';
|
|
10
|
-
import { copilotAdapter } from '../../../providers/copilot/index.js';
|
|
11
|
-
import { cursorAdapter } from '../../../providers/cursor/index.js';
|
|
12
|
-
import { geminiAdapter } from '../../../providers/gemini/index.js';
|
|
13
|
-
import { getSyncMappings } from '../../../providers/shared/index.js';
|
|
9
|
+
import { getProviderRegistrations, resolveProviderScopeContext, getSyncMappings, } from '../../../providers/shared/index.js';
|
|
14
10
|
import { Command } from 'commander';
|
|
15
11
|
function formatSummary(item) {
|
|
16
12
|
const contentTypes = item.contentTypes.length > 0 ? item.contentTypes.join('|') : 'none';
|
|
13
|
+
const scopeEvidence = item.scopes
|
|
14
|
+
.map((scope) => `${scope.scope}:activation=${scope.activation.state};${scope.content
|
|
15
|
+
.map((content) => `${content.contentKind}=${content.capability}/${content.projectionModes.join('|')}/${content.materialization}/${content.visibility}`)
|
|
16
|
+
.join('+')}`)
|
|
17
|
+
.join(',');
|
|
17
18
|
return [
|
|
18
19
|
item.detected ? 'detected' : 'not detected',
|
|
19
20
|
`strategy=${item.defaultStrategy}`,
|
|
@@ -22,6 +23,9 @@ function formatSummary(item) {
|
|
|
22
23
|
`in_sync=${item.summary.inSync}`,
|
|
23
24
|
`drifted=${item.summary.drifted}`,
|
|
24
25
|
`missing=${item.summary.missing}`,
|
|
26
|
+
`collections=${item.collectionAliases.managed}`,
|
|
27
|
+
`collection_ownership=oat-created:${item.collectionAliases.oatCreated}|adopted-exact:${item.collectionAliases.adoptedExact}`,
|
|
28
|
+
`evidence=${scopeEvidence || 'not-resolved'}`,
|
|
25
29
|
].join(', ');
|
|
26
30
|
}
|
|
27
31
|
function formatList(items) {
|
|
@@ -60,17 +64,15 @@ function createDependencies() {
|
|
|
60
64
|
return resolveScopeRoot(scope, context.cwd, context.home);
|
|
61
65
|
},
|
|
62
66
|
getAdapters() {
|
|
63
|
-
return
|
|
64
|
-
claudeAdapter,
|
|
65
|
-
cursorAdapter,
|
|
66
|
-
codexAdapter,
|
|
67
|
-
copilotAdapter,
|
|
68
|
-
geminiAdapter,
|
|
69
|
-
];
|
|
67
|
+
return getProviderRegistrations().map(({ adapter }) => adapter);
|
|
70
68
|
},
|
|
71
69
|
getSyncMappings,
|
|
72
70
|
loadManifest,
|
|
73
71
|
detectDrift,
|
|
72
|
+
async loadSyncConfig(configPath) {
|
|
73
|
+
return loadSyncConfig(configPath, DEFAULT_SYNC_CONFIG);
|
|
74
|
+
},
|
|
75
|
+
resolveProviderScopeContext,
|
|
74
76
|
};
|
|
75
77
|
}
|
|
76
78
|
function createEmptySummary() {
|
|
@@ -81,43 +83,122 @@ function createEmptySummary() {
|
|
|
81
83
|
missing: 0,
|
|
82
84
|
};
|
|
83
85
|
}
|
|
86
|
+
function deriveContentInspection(capability, summary) {
|
|
87
|
+
const nativeRead = capability.projectionModes.includes('native-read');
|
|
88
|
+
const materialization = capability.support === 'unsupported'
|
|
89
|
+
? 'unsupported'
|
|
90
|
+
: nativeRead &&
|
|
91
|
+
!capability.projectionModes.includes('entry-sync') &&
|
|
92
|
+
!capability.projectionModes.includes('materialization-extension')
|
|
93
|
+
? 'not-required'
|
|
94
|
+
: (summary?.missing ?? 0) > 0
|
|
95
|
+
? 'missing'
|
|
96
|
+
: (summary?.managed ?? 0) > 0 && summary?.inSync === summary?.managed
|
|
97
|
+
? 'current'
|
|
98
|
+
: 'unknown';
|
|
99
|
+
return {
|
|
100
|
+
contentKind: capability.contentKind,
|
|
101
|
+
capability: capability.support,
|
|
102
|
+
projectionModes: capability.projectionModes,
|
|
103
|
+
nativeRead,
|
|
104
|
+
materialization,
|
|
105
|
+
visibility: capability.support === 'unsupported' ? 'unsupported' : 'not-reported',
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function fallbackCapabilities(mappings, scope) {
|
|
109
|
+
const seen = new Set();
|
|
110
|
+
return mappings.flatMap((mapping) => {
|
|
111
|
+
if (seen.has(mapping.contentType))
|
|
112
|
+
return [];
|
|
113
|
+
seen.add(mapping.contentType);
|
|
114
|
+
return [
|
|
115
|
+
{
|
|
116
|
+
scope,
|
|
117
|
+
contentKind: mapping.contentType,
|
|
118
|
+
support: 'supported',
|
|
119
|
+
projectionModes: [mapping.nativeRead ? 'native-read' : 'entry-sync'],
|
|
120
|
+
nativeRoleSurface: mapping.contentType === 'agent',
|
|
121
|
+
collectionAlias: 'unsupported',
|
|
122
|
+
catalogRefresh: { state: 'unknown', reason: 'not resolved' },
|
|
123
|
+
},
|
|
124
|
+
];
|
|
125
|
+
});
|
|
126
|
+
}
|
|
84
127
|
async function collectProviderList(context, dependencies) {
|
|
85
128
|
const scopes = resolveConcreteScopes(context.scope);
|
|
86
|
-
const scopeRoots = await Promise.all(scopes.map(async (scope) =>
|
|
87
|
-
scope,
|
|
88
|
-
|
|
89
|
-
|
|
129
|
+
const scopeRoots = await Promise.all(scopes.map(async (scope) => {
|
|
130
|
+
const root = await dependencies.resolveScopeRoot(scope, context);
|
|
131
|
+
const config = dependencies.loadSyncConfig
|
|
132
|
+
? await dependencies.loadSyncConfig(join(root, '.oat', 'sync', 'config.json'))
|
|
133
|
+
: undefined;
|
|
134
|
+
const providerContext = config && dependencies.resolveProviderScopeContext
|
|
135
|
+
? await dependencies.resolveProviderScopeContext({
|
|
136
|
+
scope,
|
|
137
|
+
scopeRoot: root,
|
|
138
|
+
config,
|
|
139
|
+
})
|
|
140
|
+
: undefined;
|
|
141
|
+
return { scope, root, providerContext };
|
|
142
|
+
}));
|
|
90
143
|
const manifestsByRoot = new Map();
|
|
91
144
|
for (const scopeRoot of scopeRoots) {
|
|
92
145
|
const manifestPath = join(scopeRoot.root, '.oat', 'sync', 'manifest.json');
|
|
93
146
|
manifestsByRoot.set(scopeRoot.root, await dependencies.loadManifest(manifestPath));
|
|
94
147
|
}
|
|
95
148
|
const items = [];
|
|
96
|
-
|
|
149
|
+
const providerContexts = scopeRoots
|
|
150
|
+
.map(({ providerContext }) => providerContext)
|
|
151
|
+
.filter((value) => value !== undefined);
|
|
152
|
+
const adapters = providerContexts[0]
|
|
153
|
+
? providerContexts[0].registrations.map(({ adapter }) => adapter)
|
|
154
|
+
: dependencies.getAdapters();
|
|
155
|
+
for (const adapter of adapters) {
|
|
97
156
|
const summary = createEmptySummary();
|
|
157
|
+
const collectionAliases = {
|
|
158
|
+
managed: 0,
|
|
159
|
+
oatCreated: 0,
|
|
160
|
+
adoptedExact: 0,
|
|
161
|
+
};
|
|
98
162
|
const contentTypes = new Set();
|
|
99
|
-
const
|
|
163
|
+
const contentSummaryByScope = new Map();
|
|
100
164
|
for (const scope of scopes) {
|
|
101
|
-
|
|
165
|
+
const mappings = scope === 'project' ? adapter.projectMappings : adapter.userMappings;
|
|
166
|
+
for (const mapping of mappings) {
|
|
102
167
|
contentTypes.add(mapping.contentType);
|
|
103
|
-
allMappings.push(mapping);
|
|
104
168
|
}
|
|
105
169
|
}
|
|
106
170
|
let detected = false;
|
|
107
171
|
for (const scopeRoot of scopeRoots) {
|
|
108
|
-
if (
|
|
172
|
+
if (scopeRoot.providerContext
|
|
173
|
+
? scopeRoot.providerContext.detectedProviders.includes(adapter.name)
|
|
174
|
+
: await adapter.detect(scopeRoot.root)) {
|
|
109
175
|
detected = true;
|
|
110
176
|
}
|
|
111
177
|
const manifest = manifestsByRoot.get(scopeRoot.root);
|
|
112
178
|
if (!manifest) {
|
|
113
179
|
continue;
|
|
114
180
|
}
|
|
181
|
+
for (const collection of manifest.collections ?? []) {
|
|
182
|
+
if (collection.provider !== adapter.name) {
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
collectionAliases.managed += 1;
|
|
186
|
+
if (collection.ownership === 'oat-created') {
|
|
187
|
+
collectionAliases.oatCreated += 1;
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
collectionAliases.adoptedExact += 1;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
115
193
|
for (const entry of manifest.entries) {
|
|
116
194
|
if (entry.provider !== adapter.name) {
|
|
117
195
|
continue;
|
|
118
196
|
}
|
|
119
197
|
summary.managed += 1;
|
|
120
|
-
const
|
|
198
|
+
const scopeMappings = scopeRoot.scope === 'project'
|
|
199
|
+
? adapter.projectMappings
|
|
200
|
+
: adapter.userMappings;
|
|
201
|
+
const matchedMapping = scopeMappings.find((mapping) => {
|
|
121
202
|
const normalizedEntry = normalizeToPosixPath(entry.providerPath);
|
|
122
203
|
const normalizedDir = normalizeToPosixPath(mapping.providerDir);
|
|
123
204
|
return (mapping.contentType === entry.contentType &&
|
|
@@ -128,19 +209,48 @@ async function collectProviderList(context, dependencies) {
|
|
|
128
209
|
? { transformCanonical: matchedMapping.transformCanonical }
|
|
129
210
|
: undefined;
|
|
130
211
|
const report = await dependencies.detectDrift(entry, scopeRoot.root, copyTransform);
|
|
212
|
+
const contentSummaryKey = `${scopeRoot.scope}:${entry.contentType}`;
|
|
213
|
+
const contentSummary = contentSummaryByScope.get(contentSummaryKey) ?? createEmptySummary();
|
|
214
|
+
contentSummary.managed += 1;
|
|
215
|
+
contentSummaryByScope.set(contentSummaryKey, contentSummary);
|
|
131
216
|
if (report.state.status === 'in_sync') {
|
|
132
217
|
summary.inSync += 1;
|
|
218
|
+
contentSummary.inSync += 1;
|
|
133
219
|
continue;
|
|
134
220
|
}
|
|
135
221
|
if (report.state.status === 'missing') {
|
|
136
222
|
summary.missing += 1;
|
|
223
|
+
contentSummary.missing += 1;
|
|
137
224
|
continue;
|
|
138
225
|
}
|
|
139
226
|
if (report.state.status === 'drifted') {
|
|
140
227
|
summary.drifted += 1;
|
|
228
|
+
contentSummary.drifted += 1;
|
|
141
229
|
}
|
|
142
230
|
}
|
|
143
231
|
}
|
|
232
|
+
const providerScopes = scopeRoots.map((scopeRoot) => {
|
|
233
|
+
const registration = scopeRoot.providerContext?.registrations.find(({ adapter: candidate }) => candidate.name === adapter.name);
|
|
234
|
+
const capabilities = registration?.capabilities.filter(({ scope }) => scope === scopeRoot.scope) ??
|
|
235
|
+
fallbackCapabilities(scopeRoot.scope === 'project'
|
|
236
|
+
? adapter.projectMappings
|
|
237
|
+
: adapter.userMappings, scopeRoot.scope);
|
|
238
|
+
const activation = scopeRoot.providerContext?.activation.find(({ provider }) => provider === adapter.name);
|
|
239
|
+
const detectedAtScope = scopeRoot.providerContext
|
|
240
|
+
? scopeRoot.providerContext.detectedProviders.includes(adapter.name)
|
|
241
|
+
: detected;
|
|
242
|
+
return {
|
|
243
|
+
scope: scopeRoot.scope,
|
|
244
|
+
activation: activation ?? {
|
|
245
|
+
state: detectedAtScope ? 'active' : 'unknown',
|
|
246
|
+
source: detectedAtScope ? 'detection-fallback' : 'not-resolved',
|
|
247
|
+
reason: detectedAtScope
|
|
248
|
+
? 'Provider detected without resolved configuration authority'
|
|
249
|
+
: 'Provider activation was not resolved',
|
|
250
|
+
},
|
|
251
|
+
content: capabilities.map((capability) => deriveContentInspection(capability, contentSummaryByScope.get(`${scopeRoot.scope}:${capability.contentKind}`))),
|
|
252
|
+
};
|
|
253
|
+
});
|
|
144
254
|
items.push({
|
|
145
255
|
name: adapter.name,
|
|
146
256
|
displayName: adapter.displayName,
|
|
@@ -148,6 +258,8 @@ async function collectProviderList(context, dependencies) {
|
|
|
148
258
|
defaultStrategy: adapter.defaultStrategy,
|
|
149
259
|
contentTypes: [...contentTypes].sort(),
|
|
150
260
|
summary,
|
|
261
|
+
collectionAliases,
|
|
262
|
+
scopes: providerScopes,
|
|
151
263
|
});
|
|
152
264
|
}
|
|
153
265
|
return items;
|
|
@@ -167,6 +279,10 @@ export function createProvidersListCommand(overrides = {}) {
|
|
|
167
279
|
...createDependencies(),
|
|
168
280
|
...overrides,
|
|
169
281
|
};
|
|
282
|
+
if (overrides.resolveProviderScopeContext === undefined &&
|
|
283
|
+
overrides.getAdapters !== undefined) {
|
|
284
|
+
dependencies.resolveProviderScopeContext = undefined;
|
|
285
|
+
}
|
|
170
286
|
return withScopeOption(new Command('list'))
|
|
171
287
|
.description('List provider adapters and sync summary')
|
|
172
288
|
.action(async (_options, command) => {
|
|
@@ -5,7 +5,7 @@ import type { CopyTransform, DriftReport } from '../../drift/index.js';
|
|
|
5
5
|
import type { Manifest } from '../../manifest/index.js';
|
|
6
6
|
import type { CodexRoleExport } from '../../providers/codex/codec/export-to-codex.js';
|
|
7
7
|
import type { CodexMaterializeRoleOptions } from '../../providers/codex/codec/materialize.js';
|
|
8
|
-
import type { PathMapping, ProviderAdapter } from '../../providers/shared/index.js';
|
|
8
|
+
import type { ManagedContentKind, PathMapping, ProviderActivationSource, ProviderAdapter, ProviderCapabilitySupport, ProviderProjectionMode } from '../../providers/shared/index.js';
|
|
9
9
|
import type { ConcreteScope, ContentType, Scope, SyncStrategy } from '../../shared/types.js';
|
|
10
10
|
export interface ProviderListSummary {
|
|
11
11
|
managed: number;
|
|
@@ -20,6 +20,25 @@ export interface ProviderListItem {
|
|
|
20
20
|
defaultStrategy: SyncStrategy;
|
|
21
21
|
contentTypes: ContentType[];
|
|
22
22
|
summary: ProviderListSummary;
|
|
23
|
+
scopes: ProviderScopeInspection[];
|
|
24
|
+
}
|
|
25
|
+
export type ProviderInspectionMaterialization = 'not-required' | 'current' | 'missing' | 'failed' | 'unsupported' | 'unknown';
|
|
26
|
+
export interface ProviderContentInspection {
|
|
27
|
+
contentKind: ManagedContentKind;
|
|
28
|
+
capability: ProviderCapabilitySupport;
|
|
29
|
+
projectionModes: readonly ProviderProjectionMode[];
|
|
30
|
+
nativeRead: boolean;
|
|
31
|
+
materialization: ProviderInspectionMaterialization;
|
|
32
|
+
visibility: 'not-reported' | 'unsupported' | 'unknown';
|
|
33
|
+
}
|
|
34
|
+
export interface ProviderScopeInspection {
|
|
35
|
+
scope: ConcreteScope;
|
|
36
|
+
activation: {
|
|
37
|
+
state: 'active' | 'inactive' | 'unknown';
|
|
38
|
+
source: ProviderActivationSource | 'detection-fallback' | 'not-resolved';
|
|
39
|
+
reason: string;
|
|
40
|
+
};
|
|
41
|
+
content: ProviderContentInspection[];
|
|
23
42
|
}
|
|
24
43
|
export interface ProvidersListDependencies {
|
|
25
44
|
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
@@ -37,6 +56,10 @@ export interface ProviderInspectMappingState {
|
|
|
37
56
|
inSync: number;
|
|
38
57
|
drifted: number;
|
|
39
58
|
missing: number;
|
|
59
|
+
nativeRead: boolean;
|
|
60
|
+
projectionModes: readonly ProviderProjectionMode[];
|
|
61
|
+
materialization: ProviderInspectionMaterialization;
|
|
62
|
+
visibility: 'not-reported' | 'unsupported' | 'unknown';
|
|
40
63
|
}
|
|
41
64
|
export interface ProviderInspectResult {
|
|
42
65
|
name: string;
|
|
@@ -47,6 +70,7 @@ export interface ProviderInspectResult {
|
|
|
47
70
|
userMappings: PathMapping[];
|
|
48
71
|
version: string | null;
|
|
49
72
|
mappings: ProviderInspectMappingState[];
|
|
73
|
+
scopes: ProviderScopeInspection[];
|
|
50
74
|
}
|
|
51
75
|
export interface ProvidersInspectDependencies {
|
|
52
76
|
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.types.d.ts","sourceRoot":"","sources":["../../../src/commands/providers/providers.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"providers.types.d.ts","sourceRoot":"","sources":["../../../src/commands/providers/providers.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,wBAAwB,EACxB,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,KAAK,EACL,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB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KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,cAAc,KACpB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,uBAAuB,EAAE,OAAO,uBAAuB,CAAC;IACxD,oBAAoB,EAAE,CACpB,OAAO,EAAE,2BAA2B,KACjC,eAAe,CAAC;CACtB;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC,qCAAqC,CAAC,CAAC;CAC9D"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { ProvidersSetDependencies } from '../../providers/providers.types.js';
|
|
2
|
+
import { resolveUserSyncConfig, updateUserSyncConfig } from '../../../config/user-sync-config.js';
|
|
3
|
+
import { resolveProviderScopeContext } from '../../../providers/shared/index.js';
|
|
2
4
|
import { Command } from 'commander';
|
|
3
|
-
|
|
5
|
+
type ContextualSetDependencies = ProvidersSetDependencies & {
|
|
6
|
+
resolveProviderScopeContext?: typeof resolveProviderScopeContext;
|
|
7
|
+
resolveUserSyncConfig?: typeof resolveUserSyncConfig;
|
|
8
|
+
updateUserSyncConfig?: typeof updateUserSyncConfig;
|
|
9
|
+
};
|
|
10
|
+
export declare function createProvidersSetCommand(overrides?: Partial<ContextualSetDependencies>): Command;
|
|
11
|
+
export {};
|
|
4
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/set/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/set/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAQpF,OAAO,EAEL,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAEL,2BAA2B,EAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAO5C,KAAK,yBAAyB,GAAG,wBAAwB,GAAG;IAC1D,2BAA2B,CAAC,EAAE,OAAO,2BAA2B,CAAC;IACjE,qBAAqB,CAAC,EAAE,OAAO,qBAAqB,CAAC;IACrD,oBAAoB,CAAC,EAAE,OAAO,oBAAoB,CAAC;CACpD,CAAC;AAwKF,wBAAgB,yBAAyB,CACvC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CA6BT"}
|