@open-agent-toolkit/cli 0.1.72 → 0.1.74
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/README.md +1 -0
- package/assets/config/dispatch-matrix-recommendation.json +13 -17
- package/assets/docs/cli-utilities/configuration.md +42 -60
- package/assets/docs/cli-utilities/index.md +1 -0
- package/assets/docs/cli-utilities/project-log.md +183 -0
- package/assets/docs/cli-utilities/workflow-gates.md +38 -2
- package/assets/docs/provider-sync/providers.md +15 -17
- package/assets/docs/reference/cli-reference.md +1 -0
- package/assets/docs/workflows/projects/artifacts.md +1 -1
- package/assets/docs/workflows/projects/dispatch-ceiling.md +29 -33
- package/assets/docs/workflows/projects/implementation-execution.md +7 -4
- package/assets/docs/workflows/projects/lifecycle.md +4 -3
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-dispatch-subagents/SKILL.md +1 -1
- package/assets/skills/oat-dispatch-subagents/references/provider-cursor.md +27 -15
- package/assets/skills/oat-project-autonomous/SKILL.md +1 -1
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +4 -3
- package/assets/skills/oat-project-complete/SKILL.md +60 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +4 -3
- package/assets/skills/oat-project-implement/SKILL.md +18 -2
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +17 -15
- package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +15 -9
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +4 -3
- package/assets/skills/oat-project-implement/references/phase-execution.md +11 -5
- package/assets/skills/oat-project-import-plan/SKILL.md +30 -8
- package/assets/skills/oat-project-plan/SKILL.md +30 -8
- package/assets/skills/oat-project-plan-writing/SKILL.md +12 -9
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +4 -3
- package/assets/skills/oat-project-quick-start/SKILL.md +30 -8
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +4 -3
- package/assets/skills/oat-project-review-provide/SKILL.md +19 -11
- package/assets/skills/oat-project-review-provide-remote/SKILL.md +27 -4
- package/assets/skills/oat-project-summary/SKILL.md +122 -18
- package/assets/templates/project-log.md +47 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +41 -0
- package/dist/commands/doctor/index.d.ts +2 -1
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +37 -1
- 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 +134 -7
- package/dist/commands/init/index.d.ts +1 -1
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +40 -8
- package/dist/commands/init/tools/shared/skill-manifest.d.ts +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.js +1 -0
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +17 -9
- package/dist/commands/project/index.d.ts.map +1 -1
- package/dist/commands/project/index.js +2 -0
- package/dist/commands/project/log/append.d.ts +41 -0
- package/dist/commands/project/log/append.d.ts.map +1 -0
- package/dist/commands/project/log/append.js +241 -0
- package/dist/commands/project/log/check.d.ts +66 -0
- package/dist/commands/project/log/check.d.ts.map +1 -0
- package/dist/commands/project/log/check.js +194 -0
- package/dist/commands/project/log/grammar.d.ts +28 -0
- package/dist/commands/project/log/grammar.d.ts.map +1 -0
- package/dist/commands/project/log/grammar.js +31 -0
- package/dist/commands/project/log/index.d.ts +9 -0
- package/dist/commands/project/log/index.d.ts.map +1 -0
- package/dist/commands/project/log/index.js +13 -0
- package/dist/commands/project/log/rollup.d.ts +40 -0
- package/dist/commands/project/log/rollup.d.ts.map +1 -0
- package/dist/commands/project/log/rollup.js +203 -0
- package/dist/commands/project/log/synthesize.d.ts +23 -0
- package/dist/commands/project/log/synthesize.d.ts.map +1 -0
- package/dist/commands/project/log/synthesize.js +112 -0
- package/dist/commands/project/new/index.d.ts +1 -0
- package/dist/commands/project/new/index.d.ts.map +1 -1
- package/dist/commands/project/new/index.js +7 -0
- package/dist/commands/project/new/scaffold.d.ts +1 -0
- package/dist/commands/project/new/scaffold.d.ts.map +1 -1
- package/dist/commands/project/new/scaffold.js +24 -0
- package/dist/commands/shared/codex-strays.d.ts +9 -0
- package/dist/commands/shared/codex-strays.d.ts.map +1 -1
- package/dist/commands/shared/codex-strays.js +4 -0
- package/dist/commands/status/index.d.ts +7 -1
- package/dist/commands/status/index.d.ts.map +1 -1
- package/dist/commands/status/index.js +53 -17
- package/dist/commands/sync/apply.d.ts.map +1 -1
- package/dist/commands/sync/apply.js +50 -24
- package/dist/commands/sync/dry-run.d.ts.map +1 -1
- package/dist/commands/sync/dry-run.js +31 -18
- package/dist/commands/sync/index.d.ts.map +1 -1
- package/dist/commands/sync/index.js +34 -25
- package/dist/commands/sync/sync.types.d.ts +26 -11
- package/dist/commands/sync/sync.types.d.ts.map +1 -1
- package/dist/commands/sync/sync.utils.d.ts.map +1 -1
- package/dist/commands/sync/sync.utils.js +3 -2
- package/dist/config/oat-config.d.ts +3 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +7 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +2 -0
- 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/scanner.d.ts +3 -1
- package/dist/engine/scanner.d.ts.map +1 -1
- package/dist/engine/scanner.js +4 -2
- package/dist/providers/ceiling/registry.d.ts +2 -0
- package/dist/providers/ceiling/registry.d.ts.map +1 -1
- package/dist/providers/ceiling/registry.js +20 -4
- package/dist/providers/codex/codec/sync-extension.d.ts +11 -10
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +42 -14
- package/dist/providers/cursor/codec/catalog.d.ts +18 -0
- package/dist/providers/cursor/codec/catalog.d.ts.map +1 -0
- package/dist/providers/cursor/codec/catalog.js +39 -0
- package/dist/providers/cursor/codec/materialize.d.ts +24 -0
- package/dist/providers/cursor/codec/materialize.d.ts.map +1 -0
- package/dist/providers/cursor/codec/materialize.js +166 -0
- package/dist/providers/cursor/codec/shared.d.ts +14 -0
- package/dist/providers/cursor/codec/shared.d.ts.map +1 -0
- package/dist/providers/cursor/codec/shared.js +76 -0
- package/dist/providers/cursor/codec/sync-extension.d.ts +37 -0
- package/dist/providers/cursor/codec/sync-extension.d.ts.map +1 -0
- package/dist/providers/cursor/codec/sync-extension.js +393 -0
- package/dist/providers/cursor/index.d.ts +3 -0
- package/dist/providers/cursor/index.d.ts.map +1 -1
- package/dist/providers/cursor/index.js +3 -0
- package/dist/providers/identity/availability.d.ts +7 -0
- package/dist/providers/identity/availability.d.ts.map +1 -1
- package/dist/providers/identity/availability.js +23 -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 +44 -0
- package/dist/providers/shared/materialization-extension.d.ts.map +1 -0
- package/dist/providers/shared/materialization-extension.js +26 -0
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { basename, join, relative } from 'node:path';
|
|
2
2
|
import { buildCommandContext, } from '../../app/command-context.js';
|
|
3
3
|
import { adoptStrayToCanonical, isAdoptionConflictError, } from '../shared/adopt-stray.js';
|
|
4
|
-
import { detectCodexRoleStrays, regenerateCodexAfterAdoption, } from '../shared/codex-strays.js';
|
|
4
|
+
import { detectCodexRoleStrays, filterMaterializationManagedStrays, regenerateCodexAfterAdoption, } from '../shared/codex-strays.js';
|
|
5
5
|
import { withScopeOption } from '../shared/scope-option.js';
|
|
6
6
|
import { confirmAction, selectManyWithAbort, } from '../shared/shared.prompts.js';
|
|
7
7
|
import { readGlobalOptions, resolveConcreteScopes, } from '../shared/shared.utils.js';
|
|
8
8
|
import { DEFAULT_SYNC_CONFIG, loadSyncConfig, } from '../../config/index.js';
|
|
9
9
|
import { readUserConfig } from '../../config/oat-config.js';
|
|
10
10
|
import { detectDrift, detectStrays, filterKnownStrays, } from '../../drift/index.js';
|
|
11
|
-
import { HOOK_DRIFT_WARNING, HOOK_STRAY_INFO,
|
|
11
|
+
import { HOOK_DRIFT_WARNING, HOOK_STRAY_INFO, scanBundledManagedAgents, scanCanonical, } from '../../engine/index.js';
|
|
12
12
|
import { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, } from '../../fs/paths.js';
|
|
13
13
|
import { loadManifest, saveManifest } from '../../manifest/manager.js';
|
|
14
14
|
import { claudeAdapter } from '../../providers/claude/index.js';
|
|
@@ -16,6 +16,7 @@ import { codexAdapter } from '../../providers/codex/index.js';
|
|
|
16
16
|
import { applyCodexProjectExtensionPlan, computeCodexProjectExtensionPlan, } from '../../providers/codex/codec/sync-extension.js';
|
|
17
17
|
import { copilotAdapter } from '../../providers/copilot/index.js';
|
|
18
18
|
import { cursorAdapter } from '../../providers/cursor/index.js';
|
|
19
|
+
import { applyCursorProjectExtensionPlan, computeCursorProjectExtensionPlan, } from '../../providers/cursor/codec/sync-extension.js';
|
|
19
20
|
import { geminiAdapter } from '../../providers/gemini/index.js';
|
|
20
21
|
import { getActiveAdapters, getSyncMappings, } from '../../providers/shared/index.js';
|
|
21
22
|
import { SCOPE_CONTENT_TYPES, } from '../../shared/types.js';
|
|
@@ -37,7 +38,7 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
37
38
|
readUserConfig,
|
|
38
39
|
saveManifest,
|
|
39
40
|
scanCanonical,
|
|
40
|
-
|
|
41
|
+
scanBundledManagedAgents,
|
|
41
42
|
getAdapters() {
|
|
42
43
|
return [
|
|
43
44
|
claudeAdapter,
|
|
@@ -54,6 +55,8 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
54
55
|
detectCodexRoleStrays,
|
|
55
56
|
computeCodexProjectExtensionPlan,
|
|
56
57
|
applyCodexProjectExtensionPlan,
|
|
58
|
+
computeCursorProjectExtensionPlan,
|
|
59
|
+
applyCursorProjectExtensionPlan,
|
|
57
60
|
selectManyWithAbort,
|
|
58
61
|
confirmAction,
|
|
59
62
|
adoptStray: adoptStrayDefault,
|
|
@@ -133,6 +136,38 @@ async function collectScopeReports(scope, context, dependencies) {
|
|
|
133
136
|
const reports = [];
|
|
134
137
|
const strayCandidates = [];
|
|
135
138
|
const trackedCanonicalByProvider = new Set(manifest.entries.map((entry) => `${entry.provider}|${normalizeToPosixPath(entry.canonicalPath)}`));
|
|
139
|
+
const activeProviderNames = new Set(activeAdapters.map((adapter) => adapter.name));
|
|
140
|
+
const extensionCanonicalEntries = scope === 'user' &&
|
|
141
|
+
(activeProviderNames.has('codex') || activeProviderNames.has('cursor'))
|
|
142
|
+
? [
|
|
143
|
+
...canonicalEntries,
|
|
144
|
+
...(await dependencies.scanBundledManagedAgents()),
|
|
145
|
+
]
|
|
146
|
+
: canonicalEntries;
|
|
147
|
+
const codexExtensionPlan = activeProviderNames.has('codex')
|
|
148
|
+
? await dependencies.computeCodexProjectExtensionPlan(scopeRoot, extensionCanonicalEntries, undefined, { userConfigDir })
|
|
149
|
+
: undefined;
|
|
150
|
+
const cursorExtensionPlan = activeProviderNames.has('cursor')
|
|
151
|
+
? await dependencies.computeCursorProjectExtensionPlan(scopeRoot, extensionCanonicalEntries, undefined, { userConfigDir })
|
|
152
|
+
: undefined;
|
|
153
|
+
const materializationPlans = [
|
|
154
|
+
...(codexExtensionPlan
|
|
155
|
+
? [
|
|
156
|
+
{
|
|
157
|
+
provider: 'codex',
|
|
158
|
+
operations: codexExtensionPlan.operations.map((operation) => ({
|
|
159
|
+
...operation,
|
|
160
|
+
provider: 'codex',
|
|
161
|
+
entryName: operation.roleName,
|
|
162
|
+
})),
|
|
163
|
+
managedEntries: codexExtensionPlan.managedRoles,
|
|
164
|
+
aggregateHash: codexExtensionPlan.aggregateConfigHash,
|
|
165
|
+
metadata: codexExtensionPlan.metadata,
|
|
166
|
+
},
|
|
167
|
+
]
|
|
168
|
+
: []),
|
|
169
|
+
...(cursorExtensionPlan ? [cursorExtensionPlan] : []),
|
|
170
|
+
];
|
|
136
171
|
for (const adapter of activeAdapters) {
|
|
137
172
|
const mappings = dependencies.getSyncMappings(adapter, scope);
|
|
138
173
|
const mappingContentTypes = new Set(mappings.map((mapping) => mapping.contentType));
|
|
@@ -179,7 +214,7 @@ async function collectScopeReports(scope, context, dependencies) {
|
|
|
179
214
|
}
|
|
180
215
|
for (const mapping of mappings) {
|
|
181
216
|
const providerDir = join(scopeRoot, mapping.providerDir);
|
|
182
|
-
const strays = await dependencies.detectStrays(adapter.name, providerDir, manifest, canonicalEntries, mapping);
|
|
217
|
+
const strays = filterMaterializationManagedStrays((await dependencies.detectStrays(adapter.name, providerDir, manifest, canonicalEntries, mapping)).map((report) => ({ provider: adapter.name, report })), materializationPlans).map((candidate) => candidate.report);
|
|
183
218
|
reports.push(...strays);
|
|
184
219
|
for (const stray of strays) {
|
|
185
220
|
if (stray.state.status !== 'stray') {
|
|
@@ -193,24 +228,17 @@ async function collectScopeReports(scope, context, dependencies) {
|
|
|
193
228
|
}
|
|
194
229
|
}
|
|
195
230
|
}
|
|
196
|
-
|
|
197
|
-
const
|
|
198
|
-
? [
|
|
199
|
-
...canonicalEntries,
|
|
200
|
-
...(await dependencies.scanBundledManagedCodexAgents()),
|
|
201
|
-
]
|
|
202
|
-
: canonicalEntries;
|
|
203
|
-
const codexExtensionPlan = await dependencies.computeCodexProjectExtensionPlan(scopeRoot, codexCanonicalEntries, undefined, { userConfigDir: join(context.home, '.oat') });
|
|
204
|
-
for (const operation of codexExtensionPlan.operations) {
|
|
231
|
+
for (const extensionPlan of materializationPlans) {
|
|
232
|
+
for (const operation of extensionPlan.operations) {
|
|
205
233
|
if (operation.action === 'skip') {
|
|
206
234
|
continue;
|
|
207
235
|
}
|
|
208
236
|
if (operation.target === 'role') {
|
|
209
237
|
reports.push({
|
|
210
|
-
canonical: operation.
|
|
211
|
-
? `.agents/agents/${operation.
|
|
238
|
+
canonical: operation.entryName
|
|
239
|
+
? `.agents/agents/${operation.entryName}.md`
|
|
212
240
|
: null,
|
|
213
|
-
provider:
|
|
241
|
+
provider: extensionPlan.provider,
|
|
214
242
|
providerPath: operation.path,
|
|
215
243
|
state: operation.action === 'create'
|
|
216
244
|
? { status: 'missing' }
|
|
@@ -220,12 +248,14 @@ async function collectScopeReports(scope, context, dependencies) {
|
|
|
220
248
|
else {
|
|
221
249
|
reports.push({
|
|
222
250
|
canonical: null,
|
|
223
|
-
provider:
|
|
251
|
+
provider: extensionPlan.provider,
|
|
224
252
|
providerPath: operation.path,
|
|
225
253
|
state: { status: 'drifted', reason: 'modified' },
|
|
226
254
|
});
|
|
227
255
|
}
|
|
228
256
|
}
|
|
257
|
+
}
|
|
258
|
+
if (codexExtensionPlan) {
|
|
229
259
|
const codexStrays = await dependencies.detectCodexRoleStrays(scopeRoot, canonicalEntries, new Set(codexExtensionPlan.managedRoles));
|
|
230
260
|
for (const codexStray of codexStrays) {
|
|
231
261
|
const report = {
|
|
@@ -267,6 +297,7 @@ async function collectScopeReports(scope, context, dependencies) {
|
|
|
267
297
|
manifest,
|
|
268
298
|
reports: filtered.reports,
|
|
269
299
|
strayCandidates: filtered.candidates,
|
|
300
|
+
activeAdapterNames: activeAdapters.map((adapter) => adapter.name),
|
|
270
301
|
};
|
|
271
302
|
}
|
|
272
303
|
async function runStatusCommand(context, dependencies, options = {}) {
|
|
@@ -356,6 +387,11 @@ async function runStatusCommand(context, dependencies, options = {}) {
|
|
|
356
387
|
computeExtensionPlan: dependencies.computeCodexProjectExtensionPlan,
|
|
357
388
|
applyExtensionPlan: dependencies.applyCodexProjectExtensionPlan,
|
|
358
389
|
});
|
|
390
|
+
if (scopeCollection.activeAdapterNames.includes('cursor')) {
|
|
391
|
+
const canonicalEntries = await dependencies.scanCanonical(scopeCollection.scopeRoot, scopeCollection.scope);
|
|
392
|
+
const cursorPlan = await dependencies.computeCursorProjectExtensionPlan(scopeCollection.scopeRoot, canonicalEntries, undefined, { userConfigDir: join(context.home, '.oat') });
|
|
393
|
+
await dependencies.applyCursorProjectExtensionPlan(scopeCollection.scopeRoot, cursorPlan);
|
|
394
|
+
}
|
|
359
395
|
}
|
|
360
396
|
if (manifestChanged) {
|
|
361
397
|
await dependencies.saveManifest(scopeCollection.manifestPath, scopeCollection.manifest);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/apply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EAExB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/apply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EAExB,MAAM,cAAc,CAAC;AAyEtB,wBAAsB,YAAY,CAChC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,aAAa,EAAE,EAC3B,YAAY,EAAE,uBAAuB,GACpC,OAAO,CAAC,IAAI,CAAC,CAyGf"}
|
|
@@ -2,11 +2,13 @@ import { OAT_VERSION } from '../../shared/oat-version.js';
|
|
|
2
2
|
import { countPlannedOperations } from './sync.utils.js';
|
|
3
3
|
function countSkippedEntries(scopePlans) {
|
|
4
4
|
return scopePlans.reduce((total, scopePlan) => {
|
|
5
|
-
const
|
|
5
|
+
const extensionSkipped = scopePlan.materializationExtensions.reduce((count, extension) => count +
|
|
6
|
+
extension.operations.filter((operation) => operation.action === 'skip')
|
|
7
|
+
.length, 0);
|
|
6
8
|
return (total +
|
|
7
9
|
scopePlan.plan.entries.filter((entry) => entry.operation === 'skip')
|
|
8
10
|
.length +
|
|
9
|
-
|
|
11
|
+
extensionSkipped);
|
|
10
12
|
}, 0);
|
|
11
13
|
}
|
|
12
14
|
function buildSummary(scopePlans, applied, failed) {
|
|
@@ -28,15 +30,19 @@ function formatAppliedOutput(scopePlans, dependencies) {
|
|
|
28
30
|
return scopePlans
|
|
29
31
|
.map((scopePlan) => {
|
|
30
32
|
const syncOutput = dependencies.formatSyncPlan(scopePlan.plan, true);
|
|
31
|
-
|
|
32
|
-
if (!codexExtension) {
|
|
33
|
+
if (scopePlan.materializationExtensions.length === 0) {
|
|
33
34
|
return `Scope: ${scopePlan.scope}\n${syncOutput}`;
|
|
34
35
|
}
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
36
|
+
const extensionSections = scopePlan.materializationExtensions.map((extension) => {
|
|
37
|
+
const lines = extension.operations.map((operation) => {
|
|
38
|
+
const entry = operation.entryName
|
|
39
|
+
? ` (${operation.entryName})`
|
|
40
|
+
: '';
|
|
41
|
+
return `- ${operation.provider}:${operation.target}:${operation.action} ${operation.path}${entry} (${operation.reason})`;
|
|
42
|
+
});
|
|
43
|
+
return `${extension.provider} extension (applied)\n${lines.join('\n')}`;
|
|
38
44
|
});
|
|
39
|
-
return `Scope: ${scopePlan.scope}\n${syncOutput}\n\
|
|
45
|
+
return `Scope: ${scopePlan.scope}\n${syncOutput}\n\n${extensionSections.join('\n\n')}`;
|
|
40
46
|
})
|
|
41
47
|
.join('\n\n');
|
|
42
48
|
}
|
|
@@ -45,10 +51,10 @@ export async function runSyncApply(context, scopePlans, dependencies) {
|
|
|
45
51
|
let failed = 0;
|
|
46
52
|
for (const scopePlan of scopePlans) {
|
|
47
53
|
const hasSyncEntries = scopePlan.plan.entries.length > 0 || scopePlan.plan.removals.length > 0;
|
|
48
|
-
const
|
|
54
|
+
const hasExtensionPlannedOperations = scopePlan.materializationExtensionPlans.some((plan) => plan.operations.some((operation) => operation.action !== 'skip'));
|
|
49
55
|
const shouldRefreshManifestVersion = scopePlan.manifest.oatVersion !== OAT_VERSION;
|
|
50
56
|
if (!hasSyncEntries &&
|
|
51
|
-
!
|
|
57
|
+
!hasExtensionPlannedOperations &&
|
|
52
58
|
!shouldRefreshManifestVersion) {
|
|
53
59
|
continue;
|
|
54
60
|
}
|
|
@@ -57,17 +63,22 @@ export async function runSyncApply(context, scopePlans, dependencies) {
|
|
|
57
63
|
applied += result.applied;
|
|
58
64
|
failed += result.failed;
|
|
59
65
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
for (const plan of scopePlan.materializationExtensionPlans) {
|
|
67
|
+
if (!plan.operations.some((operation) => operation.action !== 'skip')) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
const extension = dependencies
|
|
71
|
+
.getMaterializationExtensions()
|
|
72
|
+
.find((candidate) => candidate.provider === plan.provider);
|
|
73
|
+
if (!extension) {
|
|
74
|
+
throw new Error(`Materialization extension ${plan.provider} disappeared before apply.`);
|
|
75
|
+
}
|
|
76
|
+
const result = await dependencies.applyMaterializationExtensionPlan(extension, scopePlan.scopeRoot, plan);
|
|
77
|
+
applied += result.applied;
|
|
78
|
+
failed += result.failed;
|
|
79
|
+
const summary = scopePlan.materializationExtensions.find((candidate) => candidate.provider === plan.provider);
|
|
80
|
+
if (summary) {
|
|
81
|
+
Object.assign(summary, result);
|
|
71
82
|
}
|
|
72
83
|
}
|
|
73
84
|
}
|
|
@@ -75,9 +86,23 @@ export async function runSyncApply(context, scopePlans, dependencies) {
|
|
|
75
86
|
const providerMismatches = scopePlans
|
|
76
87
|
.map((scopePlan) => scopePlan.providerMismatches)
|
|
77
88
|
.filter((mismatch) => mismatch !== undefined);
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
.filter((extension) => extension
|
|
89
|
+
const materializationExtensions = scopePlans.flatMap((scopePlan) => scopePlan.materializationExtensions);
|
|
90
|
+
const codexExtensions = materializationExtensions
|
|
91
|
+
.filter((extension) => extension.provider === 'codex')
|
|
92
|
+
.map((extension) => ({
|
|
93
|
+
operations: extension.operations.map((operation) => ({
|
|
94
|
+
action: operation.action,
|
|
95
|
+
target: operation.target,
|
|
96
|
+
path: operation.path,
|
|
97
|
+
reason: operation.reason,
|
|
98
|
+
roleName: operation.entryName,
|
|
99
|
+
})),
|
|
100
|
+
managedRoles: extension.managedEntries,
|
|
101
|
+
aggregateConfigHash: extension.aggregateHash,
|
|
102
|
+
applied: extension.applied,
|
|
103
|
+
failed: extension.failed,
|
|
104
|
+
skipped: extension.skipped,
|
|
105
|
+
}));
|
|
81
106
|
if (context.json) {
|
|
82
107
|
context.logger.json({
|
|
83
108
|
scope: context.scope,
|
|
@@ -85,6 +110,7 @@ export async function runSyncApply(context, scopePlans, dependencies) {
|
|
|
85
110
|
plans: scopePlans.map((scopePlan) => scopePlan.plan),
|
|
86
111
|
summary,
|
|
87
112
|
providerMismatches,
|
|
113
|
+
materializationExtensions,
|
|
88
114
|
codexExtensions,
|
|
89
115
|
});
|
|
90
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dry-run.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/dry-run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EAExB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"dry-run.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/dry-run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EAExB,MAAM,cAAc,CAAC;AAiEtB,wBAAgB,aAAa,CAC3B,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,aAAa,EAAE,EAC3B,YAAY,EAAE,uBAAuB,GACpC,IAAI,CA2CN"}
|
|
@@ -5,24 +5,25 @@ function summarize(scopePlans) {
|
|
|
5
5
|
applied: 0,
|
|
6
6
|
failed: 0,
|
|
7
7
|
skipped: scopePlans.reduce((total, scopePlan) => {
|
|
8
|
-
const
|
|
8
|
+
const extensionSkipped = scopePlan.materializationExtensions.reduce((count, extension) => count +
|
|
9
|
+
extension.operations.filter((operation) => operation.action === 'skip').length, 0);
|
|
9
10
|
return (total +
|
|
10
11
|
scopePlan.plan.entries.filter((entry) => entry.operation === 'skip')
|
|
11
12
|
.length +
|
|
12
|
-
|
|
13
|
+
extensionSkipped);
|
|
13
14
|
}, 0),
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return
|
|
24
|
-
})
|
|
25
|
-
|
|
17
|
+
function formatMaterializationExtensions(scopePlan) {
|
|
18
|
+
return scopePlan.materializationExtensions
|
|
19
|
+
.map((extension) => {
|
|
20
|
+
const lines = extension.operations.map((operation) => {
|
|
21
|
+
const entry = operation.entryName ? ` (${operation.entryName})` : '';
|
|
22
|
+
return `- ${operation.provider}:${operation.target}:${operation.action} ${operation.path}${entry} (${operation.reason})`;
|
|
23
|
+
});
|
|
24
|
+
return `${extension.provider} extension (dry-run)\n${lines.join('\n')}`;
|
|
25
|
+
})
|
|
26
|
+
.join('\n\n');
|
|
26
27
|
}
|
|
27
28
|
function formatDryRunOutput(scopePlans, dependencies) {
|
|
28
29
|
if (scopePlans.length === 0) {
|
|
@@ -35,9 +36,9 @@ function formatDryRunOutput(scopePlans, dependencies) {
|
|
|
35
36
|
return scopePlans
|
|
36
37
|
.map((scopePlan) => {
|
|
37
38
|
const syncOutput = dependencies.formatSyncPlan(scopePlan.plan, false);
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
? `Scope: ${scopePlan.scope}\n${syncOutput}\n\n${
|
|
39
|
+
const extensionOutput = formatMaterializationExtensions(scopePlan);
|
|
40
|
+
return extensionOutput
|
|
41
|
+
? `Scope: ${scopePlan.scope}\n${syncOutput}\n\n${extensionOutput}`
|
|
41
42
|
: `Scope: ${scopePlan.scope}\n${syncOutput}`;
|
|
42
43
|
})
|
|
43
44
|
.join('\n\n');
|
|
@@ -47,9 +48,20 @@ export function runSyncDryRun(context, scopePlans, dependencies) {
|
|
|
47
48
|
const providerMismatches = scopePlans
|
|
48
49
|
.map((scopePlan) => scopePlan.providerMismatches)
|
|
49
50
|
.filter((mismatch) => mismatch !== undefined);
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
.filter((extension) => extension
|
|
51
|
+
const materializationExtensions = scopePlans.flatMap((scopePlan) => scopePlan.materializationExtensions);
|
|
52
|
+
const codexExtensions = materializationExtensions
|
|
53
|
+
.filter((extension) => extension.provider === 'codex')
|
|
54
|
+
.map((extension) => ({
|
|
55
|
+
operations: extension.operations.map((operation) => ({
|
|
56
|
+
action: operation.action,
|
|
57
|
+
target: operation.target,
|
|
58
|
+
path: operation.path,
|
|
59
|
+
reason: operation.reason,
|
|
60
|
+
roleName: operation.entryName,
|
|
61
|
+
})),
|
|
62
|
+
managedRoles: extension.managedEntries,
|
|
63
|
+
aggregateConfigHash: extension.aggregateHash,
|
|
64
|
+
}));
|
|
53
65
|
if (context.json) {
|
|
54
66
|
context.logger.json({
|
|
55
67
|
scope: context.scope,
|
|
@@ -57,6 +69,7 @@ export function runSyncDryRun(context, scopePlans, dependencies) {
|
|
|
57
69
|
plans: scopePlans.map((scopePlan) => scopePlan.plan),
|
|
58
70
|
summary,
|
|
59
71
|
providerMismatches,
|
|
72
|
+
materializationExtensions,
|
|
60
73
|
codexExtensions,
|
|
61
74
|
});
|
|
62
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/index.ts"],"names":[],"mappings":"AA0CA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,OAAO,KAAK,EAEV,uBAAuB,EAExB,MAAM,cAAc,CAAC;AAwUtB,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,uBAAuB,CAAM,GAC/C,OAAO,CA6BT"}
|
|
@@ -5,17 +5,18 @@ 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,
|
|
8
|
+
import { computeSyncPlan, executeSyncPlan, 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';
|
|
12
12
|
import { claudeAdapter } from '../../providers/claude/index.js';
|
|
13
13
|
import { codexAdapter } from '../../providers/codex/index.js';
|
|
14
|
-
import {
|
|
14
|
+
import { codexMaterializationExtension } from '../../providers/codex/codec/sync-extension.js';
|
|
15
15
|
import { copilotAdapter } from '../../providers/copilot/index.js';
|
|
16
16
|
import { cursorAdapter } from '../../providers/cursor/index.js';
|
|
17
|
+
import { cursorMaterializationExtension } from '../../providers/cursor/codec/sync-extension.js';
|
|
17
18
|
import { geminiAdapter } from '../../providers/gemini/index.js';
|
|
18
|
-
import { getConfigAwareAdapters, } from '../../providers/shared/index.js';
|
|
19
|
+
import { getConfigAwareAdapters, toMaterializationOperations, } from '../../providers/shared/index.js';
|
|
19
20
|
import { formatSyncPlan } from '../../ui/output.js';
|
|
20
21
|
import { Command, Option } from 'commander';
|
|
21
22
|
import { runSyncApply } from './apply.js';
|
|
@@ -36,7 +37,7 @@ function defaultDependencies() {
|
|
|
36
37
|
},
|
|
37
38
|
saveSyncConfig,
|
|
38
39
|
scanCanonical,
|
|
39
|
-
|
|
40
|
+
scanBundledManagedAgents,
|
|
40
41
|
getAdapters() {
|
|
41
42
|
return [
|
|
42
43
|
claudeAdapter,
|
|
@@ -50,9 +51,15 @@ function defaultDependencies() {
|
|
|
50
51
|
selectProvidersWithAbort: selectManyWithAbort,
|
|
51
52
|
computeSyncPlan,
|
|
52
53
|
executeSyncPlan,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
getMaterializationExtensions() {
|
|
55
|
+
return [
|
|
56
|
+
codexMaterializationExtension,
|
|
57
|
+
cursorMaterializationExtension,
|
|
58
|
+
];
|
|
59
|
+
},
|
|
60
|
+
applyMaterializationExtensionPlan(extension, scopeRoot, plan) {
|
|
61
|
+
return extension.applyPlan(scopeRoot, plan);
|
|
62
|
+
},
|
|
56
63
|
formatSyncPlan,
|
|
57
64
|
};
|
|
58
65
|
}
|
|
@@ -166,23 +173,25 @@ async function computePlans(context, dependencies, allowedCanonicalPaths) {
|
|
|
166
173
|
scopeRoot,
|
|
167
174
|
allowedCanonicalPaths,
|
|
168
175
|
});
|
|
169
|
-
let codexExtensionPlan;
|
|
170
|
-
let codexExtension;
|
|
171
176
|
const activeAdapterNames = resolved.activeAdapters.map((adapter) => adapter.name);
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
177
|
+
const enabledExtensions = dependencies
|
|
178
|
+
.getMaterializationExtensions()
|
|
179
|
+
.filter((extension) => activeAdapterNames.includes(extension.provider));
|
|
180
|
+
const extensionCanonical = scope === 'user' && enabledExtensions.length > 0
|
|
181
|
+
? [...canonical, ...(await dependencies.scanBundledManagedAgents())]
|
|
182
|
+
: canonical;
|
|
183
|
+
const materializationExtensionPlans = await Promise.all(enabledExtensions.map((extension) => extension.computePlan({
|
|
184
|
+
scopeRoot,
|
|
185
|
+
canonicalEntries: extensionCanonical,
|
|
186
|
+
allowedCanonicalPaths,
|
|
187
|
+
options: { userConfigDir: join(context.home, '.oat') },
|
|
188
|
+
})));
|
|
189
|
+
const materializationExtensions = materializationExtensionPlans.map((extensionPlan) => ({
|
|
190
|
+
provider: extensionPlan.provider,
|
|
191
|
+
operations: toMaterializationOperations(extensionPlan),
|
|
192
|
+
managedEntries: extensionPlan.managedEntries,
|
|
193
|
+
aggregateHash: extensionPlan.aggregateHash,
|
|
194
|
+
}));
|
|
186
195
|
scopePlans.push({
|
|
187
196
|
scope,
|
|
188
197
|
scopeRoot,
|
|
@@ -192,8 +201,8 @@ async function computePlans(context, dependencies, allowedCanonicalPaths) {
|
|
|
192
201
|
activeAdapterNames,
|
|
193
202
|
plan,
|
|
194
203
|
providerMismatches: resolved.mismatches,
|
|
195
|
-
|
|
196
|
-
|
|
204
|
+
materializationExtensionPlans,
|
|
205
|
+
materializationExtensions,
|
|
197
206
|
});
|
|
198
207
|
}
|
|
199
208
|
return scopePlans;
|
|
@@ -3,8 +3,7 @@ import type { MultiSelectChoice, PromptContext } from '../shared/shared.prompts.
|
|
|
3
3
|
import type { SyncConfig } from '../../config/index.js';
|
|
4
4
|
import type { CanonicalEntry, SyncPlan, SyncResult } from '../../engine/index.js';
|
|
5
5
|
import type { Manifest } from '../../manifest/index.js';
|
|
6
|
-
import type {
|
|
7
|
-
import type { ConfigAwareAdaptersResult, ProviderAdapter } from '../../providers/shared/index.js';
|
|
6
|
+
import type { ConfigAwareAdaptersResult, MaterializationApplyResult, MaterializationExtension, MaterializationOperation, MaterializationPlan, ProviderAdapter } from '../../providers/shared/index.js';
|
|
8
7
|
import type { ConcreteScope, Scope } from '../../shared/types.js';
|
|
9
8
|
export interface SyncProviderMismatches {
|
|
10
9
|
detectedUnset: string[];
|
|
@@ -19,8 +18,8 @@ export interface ScopeSyncPlan {
|
|
|
19
18
|
canonical?: CanonicalEntry[];
|
|
20
19
|
activeAdapterNames?: string[];
|
|
21
20
|
providerMismatches?: SyncProviderMismatches;
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
materializationExtensionPlans: MaterializationPlan[];
|
|
22
|
+
materializationExtensions: MaterializationExtensionSummary[];
|
|
24
23
|
}
|
|
25
24
|
export interface SyncSummary {
|
|
26
25
|
plannedOperations: number;
|
|
@@ -34,6 +33,8 @@ export interface SyncJsonPayload {
|
|
|
34
33
|
plans: SyncPlan[];
|
|
35
34
|
summary: SyncSummary;
|
|
36
35
|
providerMismatches?: SyncProviderMismatches[];
|
|
36
|
+
materializationExtensions?: MaterializationExtensionSummary[];
|
|
37
|
+
/** Retained for compatibility with existing Codex JSON consumers. */
|
|
37
38
|
codexExtensions?: CodexExtensionSummary[];
|
|
38
39
|
}
|
|
39
40
|
export type CodexExtensionAction = 'create' | 'update' | 'remove' | 'skip';
|
|
@@ -53,6 +54,24 @@ export interface CodexExtensionSummary {
|
|
|
53
54
|
failed?: number;
|
|
54
55
|
skipped?: number;
|
|
55
56
|
}
|
|
57
|
+
export interface MaterializationExtensionSummary {
|
|
58
|
+
provider: string;
|
|
59
|
+
operations: MaterializationOperation[];
|
|
60
|
+
managedEntries: string[];
|
|
61
|
+
aggregateHash: string;
|
|
62
|
+
applied?: number;
|
|
63
|
+
failed?: number;
|
|
64
|
+
skipped?: number;
|
|
65
|
+
}
|
|
66
|
+
export type SyncMaterializationExtension = MaterializationExtension<MaterializationPlan, {
|
|
67
|
+
scopeRoot: string;
|
|
68
|
+
canonicalEntries: CanonicalEntry[];
|
|
69
|
+
allowedCanonicalPaths?: string[];
|
|
70
|
+
options: {
|
|
71
|
+
userConfigDir?: string;
|
|
72
|
+
env?: NodeJS.ProcessEnv;
|
|
73
|
+
};
|
|
74
|
+
}>;
|
|
56
75
|
export interface SyncCommandDependencies {
|
|
57
76
|
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
58
77
|
resolveScopeRoot: (scope: ConcreteScope, context: CommandContext) => Promise<string>;
|
|
@@ -60,7 +79,7 @@ export interface SyncCommandDependencies {
|
|
|
60
79
|
loadSyncConfig: (configPath: string) => Promise<SyncConfig>;
|
|
61
80
|
saveSyncConfig: (configPath: string, config: SyncConfig) => Promise<SyncConfig>;
|
|
62
81
|
scanCanonical: (scopeRoot: string, scope: ConcreteScope) => Promise<CanonicalEntry[]>;
|
|
63
|
-
|
|
82
|
+
scanBundledManagedAgents: () => Promise<CanonicalEntry[]>;
|
|
64
83
|
getAdapters: () => ProviderAdapter[];
|
|
65
84
|
getConfigAwareAdapters: (adapters: ProviderAdapter[], scopeRoot: string, config: SyncConfig) => Promise<ConfigAwareAdaptersResult>;
|
|
66
85
|
selectProvidersWithAbort: <T extends string>(message: string, choices: MultiSelectChoice<T>[], ctx: PromptContext) => Promise<T[] | null>;
|
|
@@ -74,12 +93,8 @@ export interface SyncCommandDependencies {
|
|
|
74
93
|
allowedCanonicalPaths?: string[];
|
|
75
94
|
}) => Promise<SyncPlan>;
|
|
76
95
|
executeSyncPlan: (plan: SyncPlan, manifest: Manifest, manifestPath: string) => Promise<SyncResult>;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
env?: NodeJS.ProcessEnv;
|
|
80
|
-
}) => Promise<CodexExtensionPlan>;
|
|
81
|
-
toCodexExtensionOperations: (plan: CodexExtensionPlan) => CodexExtensionOperation[];
|
|
82
|
-
applyCodexProjectExtensionPlan: (scopeRoot: string, plan: CodexExtensionPlan) => Promise<CodexExtensionApplyResult>;
|
|
96
|
+
getMaterializationExtensions: () => SyncMaterializationExtension[];
|
|
97
|
+
applyMaterializationExtensionPlan: (extension: SyncMaterializationExtension, scopeRoot: string, plan: MaterializationPlan) => Promise<MaterializationApplyResult>;
|
|
83
98
|
formatSyncPlan: (plan: SyncPlan, applied: boolean) => string;
|
|
84
99
|
}
|
|
85
100
|
//# sourceMappingURL=sync.types.d.ts.map
|
|
@@ -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,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EACV,yBAAyB,EACzB,
|
|
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,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MA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AAC,0BAA0B,CAAC,CAAC;IACzC,cAAc,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;CAC9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.utils.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/sync.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"sync.utils.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/sync.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,MAAM,CAgB1E"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export function countPlannedOperations(scopePlans) {
|
|
2
2
|
return scopePlans.reduce((total, scopePlan) => {
|
|
3
|
-
const
|
|
3
|
+
const extensionOperations = scopePlan.materializationExtensions.reduce((count, extension) => count +
|
|
4
|
+
extension.operations.filter((entry) => entry.action !== 'skip').length, 0);
|
|
4
5
|
return (total +
|
|
5
6
|
[...scopePlan.plan.entries, ...scopePlan.plan.removals].filter((entry) => entry.operation !== 'skip').length +
|
|
6
|
-
|
|
7
|
+
extensionOperations);
|
|
7
8
|
}, 0);
|
|
8
9
|
}
|
|
@@ -19,6 +19,7 @@ export interface OatArchiveConfig {
|
|
|
19
19
|
awsRegion?: string;
|
|
20
20
|
}
|
|
21
21
|
export type WorkflowHillCheckpointDefault = 'every' | 'final';
|
|
22
|
+
export type WorkflowProjectLog = true | false | 'auto';
|
|
22
23
|
export type WorkflowPostImplementStep = 'summary' | 'document' | 'pr';
|
|
23
24
|
export type WorkflowPostImplementLegacySequence = 'wait' | 'summary' | 'pr' | 'docs-pr';
|
|
24
25
|
export interface WorkflowPostImplementStructuredSequence {
|
|
@@ -89,6 +90,8 @@ export interface OatWorkflowConfig {
|
|
|
89
90
|
autoReviewAtHillCheckpoints?: boolean;
|
|
90
91
|
autoNarrowReReviewScope?: boolean;
|
|
91
92
|
autoArtifactReview?: WorkflowAutoArtifactReview;
|
|
93
|
+
projectLog?: WorkflowProjectLog;
|
|
94
|
+
projectLogLedgerPath?: string;
|
|
92
95
|
designMode?: WorkflowDesignMode;
|
|
93
96
|
dispatchPolicy?: WorkflowDispatchPolicy;
|
|
94
97
|
dispatchCeiling?: WorkflowDispatchCeiling;
|