@open-agent-toolkit/cli 0.3.6 → 0.3.8
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/configuration.md +38 -18
- package/assets/docs/cli-utilities/workflow-gates.md +37 -0
- package/assets/docs/contributing/updating-model-guidance.md +6 -6
- package/assets/docs/provider-sync/commands.md +6 -0
- package/assets/docs/provider-sync/providers.md +24 -0
- package/assets/docs/provider-sync/scope-and-surface.md +2 -0
- package/assets/docs/reference/cli-reference.md +2 -1
- package/assets/docs/workflows/projects/autonomy.md +1 -1
- package/assets/docs/workflows/projects/dispatch-ceiling.md +26 -20
- package/assets/docs/workflows/projects/evidence-layers.md +5 -1
- package/assets/docs/workflows/projects/retro.md +7 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-agent-instructions-analyze/SKILL.md +1 -1
- package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-providers.sh +17 -6
- package/assets/skills/oat-dispatch-subagents/SKILL.md +1 -1
- package/assets/skills/oat-dispatch-subagents/references/managed-claude-example.json +387 -0
- package/assets/skills/oat-dispatch-subagents/references/record-schema.md +75 -0
- package/assets/skills/oat-doctor/SKILL.md +2 -2
- package/assets/skills/oat-project-autonomous/SKILL.md +2 -2
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +1 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-implement/SKILL.md +1 -1
- package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +24 -22
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-import-plan/SKILL.md +4 -4
- package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-plan/SKILL.md +4 -4
- package/assets/skills/oat-project-plan-writing/SKILL.md +4 -4
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-quick-start/SKILL.md +4 -4
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-retro/SKILL.md +70 -6
- package/assets/skills/oat-project-review-provide/SKILL.md +3 -1
- package/assets/skills/oat-project-review-provide-remote/SKILL.md +3 -1
- package/dist/agents/canonical/resolve.d.ts +6 -4
- package/dist/agents/canonical/resolve.d.ts.map +1 -1
- package/dist/agents/canonical/resolve.js +6 -4
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +210 -28
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +51 -2
- package/dist/commands/gate/review-verdict.d.ts +22 -0
- package/dist/commands/gate/review-verdict.d.ts.map +1 -1
- package/dist/commands/gate/review-verdict.js +111 -0
- package/dist/commands/project/dispatch/canonical-role.d.ts +33 -0
- package/dist/commands/project/dispatch/canonical-role.d.ts.map +1 -0
- package/dist/commands/project/dispatch/canonical-role.js +114 -0
- package/dist/commands/project/dispatch/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch/index.js +3 -1
- package/dist/commands/project/dispatch/record.d.ts.map +1 -1
- package/dist/commands/project/dispatch/record.js +146 -4
- package/dist/commands/sync/apply.d.ts.map +1 -1
- package/dist/commands/sync/apply.js +28 -21
- package/dist/commands/tools/shared/sync-evidence.d.ts.map +1 -1
- package/dist/commands/tools/shared/sync-evidence.js +32 -5
- package/dist/config/oat-config.d.ts +8 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +116 -1
- package/dist/engine/compute-plan.d.ts.map +1 -1
- package/dist/engine/compute-plan.js +31 -3
- package/dist/providers/claude/dispatch-envelope.d.ts +53 -0
- package/dist/providers/claude/dispatch-envelope.d.ts.map +1 -1
- package/dist/providers/claude/dispatch-envelope.js +324 -48
- package/dist/providers/claude/rule-transform.js +1 -1
- package/dist/providers/copilot/rule-transform.js +1 -1
- package/dist/providers/cursor/rule-transform.js +1 -1
- package/dist/providers/identity/absolute-paths.d.ts +13 -0
- package/dist/providers/identity/absolute-paths.d.ts.map +1 -1
- package/dist/providers/identity/absolute-paths.js +27 -14
- package/dist/providers/identity/generic-dispatch-record.d.ts +212 -0
- package/dist/providers/identity/generic-dispatch-record.d.ts.map +1 -1
- package/dist/providers/identity/generic-dispatch-record.js +78 -19
- package/dist/providers/identity/oat-dispatch-record.d.ts +5 -0
- package/dist/providers/identity/oat-dispatch-record.d.ts.map +1 -1
- package/dist/providers/identity/oat-dispatch-record.js +11 -2
- package/dist/providers/shared/registry.d.ts +6 -0
- package/dist/providers/shared/registry.d.ts.map +1 -1
- package/dist/providers/shared/registry.js +30 -0
- package/dist/rules/canonical/parse.d.ts.map +1 -1
- package/dist/rules/canonical/parse.js +38 -3
- package/package.json +2 -2
|
@@ -170,21 +170,25 @@ function coreHumanStatus(status) {
|
|
|
170
170
|
}
|
|
171
171
|
/** The sentence `formatSyncPlan` appends to its heading for an empty plan. */
|
|
172
172
|
const EMPTY_PLAN_SUFFIX = '\nNo changes required.';
|
|
173
|
-
function formatCoreResults(plan, evidence, dependencies, restampOnly) {
|
|
173
|
+
function formatCoreResults(plan, evidence, dependencies, restampOnly, runFailed) {
|
|
174
174
|
const operations = [...plan.entries, ...plan.removals];
|
|
175
175
|
if (operations.length === 0) {
|
|
176
176
|
if ((plan.collections?.length ?? 0) > 0) {
|
|
177
177
|
return 'Core results\nNo per-entry operations.';
|
|
178
178
|
}
|
|
179
179
|
const planOutput = dependencies.formatSyncPlan(plan, true);
|
|
180
|
-
if (!restampOnly ||
|
|
180
|
+
if (!(restampOnly || runFailed) ||
|
|
181
|
+
!planOutput.endsWith(EMPTY_PLAN_SUFFIX)) {
|
|
181
182
|
return planOutput;
|
|
182
183
|
}
|
|
183
184
|
// `formatSyncPlan` appends "No changes required." to its heading for any
|
|
184
185
|
// empty plan, and it is shared with dry-run and other callers, so it stays
|
|
185
186
|
// untouched. On the restamp-only path that sentence would contradict the
|
|
186
|
-
// trailing message two lines later,
|
|
187
|
-
//
|
|
187
|
+
// trailing message two lines later, and on a failed run (for example
|
|
188
|
+
// `--scope all` with one failed scope beside an empty one) it would
|
|
189
|
+
// contradict the partial-failure warning and exit code 1. In both cases the
|
|
190
|
+
// command layer drops exactly that known suffix and lets the trailing
|
|
191
|
+
// message be the run's single claim.
|
|
188
192
|
// Removing only a matching suffix, rather than keeping the first line,
|
|
189
193
|
// means an injected formatter's other content is never truncated.
|
|
190
194
|
return planOutput.slice(0, -EMPTY_PLAN_SUFFIX.length);
|
|
@@ -211,11 +215,14 @@ function formatCoreResults(plan, evidence, dependencies, restampOnly) {
|
|
|
211
215
|
return `Core results${aggregate}\n${lines.join('\n')}`;
|
|
212
216
|
}
|
|
213
217
|
function formatAppliedOutput(scopePlans, coreApplyEvidence, dependencies,
|
|
214
|
-
// True when the run planned no operation at all and
|
|
215
|
-
//
|
|
216
|
-
// summary message, so with `--scope all` every scope's body is
|
|
217
|
-
//
|
|
218
|
-
restampOnly
|
|
218
|
+
// True when the run planned no operation at all and at least one scope's
|
|
219
|
+
// manifest was restamped. It is a whole-run state, matching the single
|
|
220
|
+
// trailing summary message, so with `--scope all` every scope's body is
|
|
221
|
+
// empty. A failed run may also set it; `runFailed` covers that case.
|
|
222
|
+
restampOnly,
|
|
223
|
+
// True when any scope failed. Also a whole-run state: an empty scope beside
|
|
224
|
+
// a failed one must not claim that no changes were required.
|
|
225
|
+
runFailed) {
|
|
219
226
|
if (scopePlans.length === 0) {
|
|
220
227
|
return dependencies.formatSyncPlan({
|
|
221
228
|
scope: 'project',
|
|
@@ -225,7 +232,7 @@ restampOnly) {
|
|
|
225
232
|
}
|
|
226
233
|
return scopePlans
|
|
227
234
|
.map((scopePlan) => {
|
|
228
|
-
const syncOutput = formatCoreResults(scopePlan.plan, coreApplyEvidence.find((evidence) => evidence.plan === scopePlan.plan), dependencies, restampOnly);
|
|
235
|
+
const syncOutput = formatCoreResults(scopePlan.plan, coreApplyEvidence.find((evidence) => evidence.plan === scopePlan.plan), dependencies, restampOnly, runFailed);
|
|
229
236
|
const collectionOutput = formatCollectionLifecycle(buildCollectionLifecycle(scopePlan, coreApplyEvidence.find((evidence) => evidence.plan === scopePlan.plan)
|
|
230
237
|
?.collectionResults));
|
|
231
238
|
if (scopePlan.materializationExtensions.length === 0) {
|
|
@@ -379,17 +386,17 @@ export async function runSyncApply(context, scopePlans, dependencies) {
|
|
|
379
386
|
// run just emitted, so the state is resolved once and threaded through
|
|
380
387
|
// both the plan body and the trailing message.
|
|
381
388
|
//
|
|
382
|
-
// `failed === 0`
|
|
383
|
-
//
|
|
384
|
-
//
|
|
385
|
-
//
|
|
386
|
-
//
|
|
387
|
-
//
|
|
388
|
-
//
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
context.logger.info(formatAppliedOutput(scopePlans, coreApplyEvidence, dependencies, restampOnly));
|
|
389
|
+
// No `failed === 0` conjunct: a rejected collection counts as a failure
|
|
390
|
+
// but is not a *planned* operation, so a failed run can have
|
|
391
|
+
// `plannedOperations === 0`, yet no output can depend on excluding it
|
|
392
|
+
// here. `formatCoreResults` drops the empty-plan sentence whenever the run
|
|
393
|
+
// failed (`runFailed`), and the trailing message below tests the failure
|
|
394
|
+
// arm first. The conjunct was therefore unobservable and was removed
|
|
395
|
+
// rather than kept behind a test that could not fail without it (p02
|
|
396
|
+
// review L1); the failure arm is pinned by the `--scope all` failed-run
|
|
397
|
+
// tests instead.
|
|
398
|
+
const restampOnly = summary.plannedOperations === 0 && versionSkew.length > 0;
|
|
399
|
+
context.logger.info(formatAppliedOutput(scopePlans, coreApplyEvidence, dependencies, restampOnly, summary.failed > 0));
|
|
393
400
|
if (summary.failed > 0) {
|
|
394
401
|
context.logger.warn('\nSync completed with partial failures.');
|
|
395
402
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-evidence.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/sync-evidence.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sync-evidence.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/sync-evidence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EACV,kCAAkC,EAClC,6BAA6B,EAC9B,MAAM,yBAAyB,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,kBAAkB,CAAC;IAChC,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,4BAA4B,CAAC;KACvC,CAAC;CACH;AAED,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,OAAO,CAAC;IACb;;;;;;OAMG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,SAAS,6BAA6B,EAAE,CAAC;IAC3D,gBAAgB,EAAE,SAAS,kCAAkC,EAAE,CAAC;IAChE,aAAa,EAAE,SAAS,yBAAyB,EAAE,CAAC;CACrD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,eAAe,CAS1E;AA+CD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,OAAO,GACf,eAAe,CAsHjB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,yBAAyB,EAAE,GAC3C,CAAC,KAAK,EAAE;IACT,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,WAAW,EAAE,kBAAkB,CAAC;CACjC,KAAK,4BAA4B,GAAG,SAAS,CAQ7C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isValidCatalogRefreshPolicy } from '../../../providers/shared/registry.js';
|
|
1
2
|
export function emptySyncRunEvidence(scope) {
|
|
2
3
|
return {
|
|
3
4
|
scope,
|
|
@@ -19,6 +20,35 @@ function asArray(value) {
|
|
|
19
20
|
function asString(value) {
|
|
20
21
|
return typeof value === 'string' ? value : undefined;
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Validates a catalog-refresh policy from sync advice.
|
|
25
|
+
*
|
|
26
|
+
* The advice policy outranks the registered capability policy in the
|
|
27
|
+
* lifecycle projection, and `visibilityFor` switches exhaustively over its
|
|
28
|
+
* state with a `never` default that throws. An unrecognized state or a policy
|
|
29
|
+
* that fails the registry's own provenance rules must therefore never reach
|
|
30
|
+
* that switch: it is dropped here so the projection falls back to the
|
|
31
|
+
* registry policy. Validation is delegated to the registry so the two cannot
|
|
32
|
+
* drift; the accepted policy is rebuilt so unrecognized extra fields are not
|
|
33
|
+
* carried along.
|
|
34
|
+
*/
|
|
35
|
+
function asRefreshPolicy(value) {
|
|
36
|
+
if (!isValidCatalogRefreshPolicy(value))
|
|
37
|
+
return undefined;
|
|
38
|
+
if (value.state === 'unknown') {
|
|
39
|
+
return { state: 'unknown', reason: value.reason };
|
|
40
|
+
}
|
|
41
|
+
const { kind, reference, verifiedAt, providerVersion } = value.provenance;
|
|
42
|
+
return {
|
|
43
|
+
state: value.state,
|
|
44
|
+
provenance: {
|
|
45
|
+
kind,
|
|
46
|
+
reference,
|
|
47
|
+
verifiedAt,
|
|
48
|
+
...(providerVersion !== undefined ? { providerVersion } : {}),
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
22
52
|
/**
|
|
23
53
|
* Normalizes a captured sync JSON payload into reachability inputs.
|
|
24
54
|
*
|
|
@@ -99,6 +129,7 @@ export function normalizeSyncEvidence(scope, payload) {
|
|
|
99
129
|
return [];
|
|
100
130
|
}
|
|
101
131
|
const visibility = asRecord(advice.visibility);
|
|
132
|
+
const policy = asRefreshPolicy(visibility?.policy);
|
|
102
133
|
return [
|
|
103
134
|
{
|
|
104
135
|
provider,
|
|
@@ -113,11 +144,7 @@ export function normalizeSyncEvidence(scope, payload) {
|
|
|
113
144
|
...(asString(visibility.reason) !== undefined
|
|
114
145
|
? { reason: asString(visibility.reason) }
|
|
115
146
|
: {}),
|
|
116
|
-
...(
|
|
117
|
-
? {
|
|
118
|
-
policy: visibility.policy,
|
|
119
|
-
}
|
|
120
|
-
: {}),
|
|
147
|
+
...(policy !== undefined ? { policy } : {}),
|
|
121
148
|
},
|
|
122
149
|
}
|
|
123
150
|
: {}),
|
|
@@ -290,6 +290,14 @@ export declare function readOatConfigForDocumentationExcludesRepair(repoRoot: st
|
|
|
290
290
|
*/
|
|
291
291
|
export declare function readOatConfigForInstructionPointerExcludesRepair(repoRoot: string): Promise<OatConfig>;
|
|
292
292
|
export declare function readOatLocalConfig(repoRoot: string): Promise<OatLocalConfig>;
|
|
293
|
+
/**
|
|
294
|
+
* Writes the shared config, preserving the existing file's key order and
|
|
295
|
+
* skipping writes that would not change its JSON value (GitHub #329, #311).
|
|
296
|
+
*
|
|
297
|
+
* Formatting-only differences (indentation, trailing newline) therefore leave
|
|
298
|
+
* the file byte-identical, while repairs, raw-disk removals, and rewrites of a
|
|
299
|
+
* malformed or unparsable file always land.
|
|
300
|
+
*/
|
|
293
301
|
export declare function writeOatConfig(repoRoot: string, config: OatConfig): Promise<void>;
|
|
294
302
|
export declare function writeOatLocalConfig(repoRoot: string, config: OatLocalConfig): Promise<void>;
|
|
295
303
|
export declare function resolveActiveProject(repoRoot: string): Promise<ActiveProjectResolution>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oat-config.d.ts","sourceRoot":"","sources":["../../src/config/oat-config.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,6BAA6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f;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMrE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA6B5D"}
|
|
@@ -635,13 +635,18 @@ function normalizePjmRemoteSharedConfig(value, configPath) {
|
|
|
635
635
|
function assertClosedPjmRemoteSharedConfig(value, configPath) {
|
|
636
636
|
const findings = [];
|
|
637
637
|
collectUnknownPjmRemoteKeys(value, ['schemaVersion', 'storage', 'policy'], 'pjm.remote', findings);
|
|
638
|
+
if ('schemaVersion' in value && typeof value.schemaVersion !== 'number') {
|
|
639
|
+
findings.push(`pjm.remote.schemaVersion (expected number, received ${describePjmRemoteStructure(value.schemaVersion)})`);
|
|
640
|
+
}
|
|
638
641
|
if ('storage' in value &&
|
|
639
642
|
collectPjmRemoteExpectedObject(value.storage, 'pjm.remote.storage', findings)) {
|
|
640
643
|
collectUnknownPjmRemoteKeys(value.storage, ['state'], 'pjm.remote.storage', findings);
|
|
644
|
+
collectPjmRemoteStringLeaf(value.storage, 'state', 'pjm.remote.storage', findings);
|
|
641
645
|
}
|
|
642
646
|
if ('policy' in value &&
|
|
643
647
|
collectPjmRemoteExpectedObject(value.policy, 'pjm.remote.policy', findings)) {
|
|
644
648
|
collectUnknownPjmRemoteKeys(value.policy, ['description', 'authority', 'providers'], 'pjm.remote.policy', findings);
|
|
649
|
+
collectPjmRemoteStringLeaf(value.policy, 'description', 'pjm.remote.policy', findings);
|
|
645
650
|
if ('authority' in value.policy) {
|
|
646
651
|
collectPjmRemoteAuthorityFindings(value.policy.authority, 'pjm.remote.policy.authority', findings);
|
|
647
652
|
}
|
|
@@ -656,6 +661,7 @@ function assertClosedPjmRemoteSharedConfig(value, configPath) {
|
|
|
656
661
|
continue;
|
|
657
662
|
}
|
|
658
663
|
collectUnknownPjmRemoteKeys(providerPolicy, ['description', 'authority'], `pjm.remote.policy.providers.${provider}`, findings);
|
|
664
|
+
collectPjmRemoteStringLeaf(providerPolicy, 'description', `pjm.remote.policy.providers.${provider}`, findings);
|
|
659
665
|
if ('authority' in providerPolicy) {
|
|
660
666
|
collectPjmRemoteAuthorityFindings(providerPolicy.authority, `pjm.remote.policy.providers.${provider}.authority`, findings);
|
|
661
667
|
}
|
|
@@ -670,11 +676,27 @@ function collectPjmRemoteAuthorityFindings(value, path, findings) {
|
|
|
670
676
|
if (!collectPjmRemoteExpectedObject(value, path, findings))
|
|
671
677
|
return;
|
|
672
678
|
collectUnknownPjmRemoteKeys(value, ['default', 'operations'], path, findings);
|
|
679
|
+
collectPjmRemoteStringLeaf(value, 'default', path, findings);
|
|
673
680
|
if ('operations' in value &&
|
|
674
681
|
collectPjmRemoteExpectedObject(value.operations, `${path}.operations`, findings)) {
|
|
675
682
|
collectUnknownPjmRemoteKeys(value.operations, PJM_REMOTE_OPERATION_CLASSES, `${path}.operations`, findings);
|
|
683
|
+
for (const operation of PJM_REMOTE_OPERATION_CLASSES) {
|
|
684
|
+
collectPjmRemoteStringLeaf(value.operations, operation, `${path}.operations`, findings);
|
|
685
|
+
}
|
|
676
686
|
}
|
|
677
687
|
}
|
|
688
|
+
/**
|
|
689
|
+
* Records a present leaf whose value is not a string.
|
|
690
|
+
*
|
|
691
|
+
* Only the *type* is checked: an unrecognized string keeps its documented
|
|
692
|
+
* coercion in the normalizer. The finding names the structure type, never the
|
|
693
|
+
* value, so a secret pasted into the wrong field cannot leak into the error.
|
|
694
|
+
*/
|
|
695
|
+
function collectPjmRemoteStringLeaf(value, key, path, findings) {
|
|
696
|
+
if (!(key in value) || typeof value[key] === 'string')
|
|
697
|
+
return;
|
|
698
|
+
findings.push(`${path}.${key} (expected string, received ${describePjmRemoteStructure(value[key])})`);
|
|
699
|
+
}
|
|
678
700
|
function collectPjmRemoteExpectedObject(value, path, findings) {
|
|
679
701
|
if (isRecord(value) && !Array.isArray(value))
|
|
680
702
|
return true;
|
|
@@ -1219,10 +1241,103 @@ export async function readOatLocalConfig(repoRoot) {
|
|
|
1219
1241
|
throw error;
|
|
1220
1242
|
}
|
|
1221
1243
|
}
|
|
1244
|
+
/**
|
|
1245
|
+
* Reads the existing config file as raw JSON for ordering and no-op checks.
|
|
1246
|
+
*
|
|
1247
|
+
* Parses through `parseJsonConfig`, the same tolerant parser every config
|
|
1248
|
+
* reader uses (trailing commas accepted, `__proto__` kept as data), so a file
|
|
1249
|
+
* the readers accept is never treated as unparsable here. Deliberately
|
|
1250
|
+
* bypasses the normalizer, which throws on the malformed values repair flows
|
|
1251
|
+
* exist to remove. A missing or unparsable file yields `undefined`, so the
|
|
1252
|
+
* caller always writes it.
|
|
1253
|
+
*/
|
|
1254
|
+
async function readRawJsonForWrite(filePath) {
|
|
1255
|
+
let raw;
|
|
1256
|
+
try {
|
|
1257
|
+
raw = await readFile(filePath, 'utf8');
|
|
1258
|
+
}
|
|
1259
|
+
catch {
|
|
1260
|
+
return undefined;
|
|
1261
|
+
}
|
|
1262
|
+
try {
|
|
1263
|
+
return parseJsonConfig(raw, filePath);
|
|
1264
|
+
}
|
|
1265
|
+
catch {
|
|
1266
|
+
return undefined;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
function isPlainJsonObject(value) {
|
|
1270
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* Orders `value` like `template`, recursively: keys already present in the
|
|
1274
|
+
* template keep their existing position, and new keys follow in the
|
|
1275
|
+
* normalizer's order. Arrays keep their own element order.
|
|
1276
|
+
*/
|
|
1277
|
+
function orderLike(value, template) {
|
|
1278
|
+
if (Array.isArray(value)) {
|
|
1279
|
+
return value.map((element, index) => orderLike(element, Array.isArray(template) ? template[index] : undefined));
|
|
1280
|
+
}
|
|
1281
|
+
if (!isPlainJsonObject(value))
|
|
1282
|
+
return value;
|
|
1283
|
+
const templateObject = isPlainJsonObject(template) ? template : {};
|
|
1284
|
+
const ordered = {};
|
|
1285
|
+
// Define rather than assign: a config key named `__proto__` is data and must
|
|
1286
|
+
// never replace the output object's prototype.
|
|
1287
|
+
const place = (key, next) => {
|
|
1288
|
+
Object.defineProperty(ordered, key, {
|
|
1289
|
+
value: next,
|
|
1290
|
+
enumerable: true,
|
|
1291
|
+
writable: true,
|
|
1292
|
+
configurable: true,
|
|
1293
|
+
});
|
|
1294
|
+
};
|
|
1295
|
+
for (const key of Object.keys(templateObject)) {
|
|
1296
|
+
if (Object.hasOwn(value, key) && value[key] !== undefined) {
|
|
1297
|
+
place(key, orderLike(value[key], templateObject[key]));
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
for (const key of Object.keys(value)) {
|
|
1301
|
+
if (!Object.hasOwn(ordered, key) && value[key] !== undefined) {
|
|
1302
|
+
place(key, orderLike(value[key], undefined));
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
return ordered;
|
|
1306
|
+
}
|
|
1307
|
+
function jsonDeepEqual(left, right) {
|
|
1308
|
+
if (Array.isArray(left) || Array.isArray(right)) {
|
|
1309
|
+
return (Array.isArray(left) &&
|
|
1310
|
+
Array.isArray(right) &&
|
|
1311
|
+
left.length === right.length &&
|
|
1312
|
+
left.every((element, index) => jsonDeepEqual(element, right[index])));
|
|
1313
|
+
}
|
|
1314
|
+
if (isPlainJsonObject(left) || isPlainJsonObject(right)) {
|
|
1315
|
+
if (!isPlainJsonObject(left) || !isPlainJsonObject(right))
|
|
1316
|
+
return false;
|
|
1317
|
+
const leftKeys = Object.keys(left);
|
|
1318
|
+
return (leftKeys.length === Object.keys(right).length &&
|
|
1319
|
+
leftKeys.every((key) => Object.hasOwn(right, key) && jsonDeepEqual(left[key], right[key])));
|
|
1320
|
+
}
|
|
1321
|
+
return Object.is(left, right);
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* Writes the shared config, preserving the existing file's key order and
|
|
1325
|
+
* skipping writes that would not change its JSON value (GitHub #329, #311).
|
|
1326
|
+
*
|
|
1327
|
+
* Formatting-only differences (indentation, trailing newline) therefore leave
|
|
1328
|
+
* the file byte-identical, while repairs, raw-disk removals, and rewrites of a
|
|
1329
|
+
* malformed or unparsable file always land.
|
|
1330
|
+
*/
|
|
1222
1331
|
export async function writeOatConfig(repoRoot, config) {
|
|
1223
1332
|
const configPath = getConfigPath(repoRoot);
|
|
1224
1333
|
const normalized = normalizeOatConfig(config, configPath);
|
|
1225
|
-
await
|
|
1334
|
+
const existing = await readRawJsonForWrite(configPath);
|
|
1335
|
+
// Round-trip through JSON so the comparison sees exactly what would be
|
|
1336
|
+
// serialized (undefined-valued keys dropped).
|
|
1337
|
+
const output = JSON.parse(JSON.stringify(existing === undefined ? normalized : orderLike(normalized, existing)));
|
|
1338
|
+
if (existing !== undefined && jsonDeepEqual(existing, output))
|
|
1339
|
+
return;
|
|
1340
|
+
await atomicWriteJson(configPath, output);
|
|
1226
1341
|
}
|
|
1227
1342
|
export async function writeOatLocalConfig(repoRoot, config) {
|
|
1228
1343
|
const configPath = getLocalConfigPath(repoRoot);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-plan.d.ts","sourceRoot":"","sources":["../../src/engine/compute-plan.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"compute-plan.d.ts","sourceRoot":"","sources":["../../src/engine/compute-plan.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EAGd,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAEV,WAAW,EACX,oBAAoB,EACpB,QAAQ,EAET,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,UAAU,mBAAmB;IAC3B,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,sCAAsC,CAAC,EAAE,QAAQ,CAC/C,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAClC,CAAC;IACF,+BAA+B,CAAC,EAAE,SAAS;QACzC,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,WAAW,CAAC;KAC1B,EAAE,CAAC;IACJ,gCAAgC,CAAC,EAAE,OAAO,CAAC;CAC5C;AAiOD,wBAAsB,iCAAiC,CACrD,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,oBAAoB,CAAC,CAqG/B;AAyJD,wBAAsB,eAAe,CAAC,EACpC,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EAAE,iBAAiB,EAC5B,qBAAqB,EACrB,sCAAsC,EACtC,+BAAoC,EACpC,gCAAwC,GACzC,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA6dzC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { access, lstat, readFile, readlink, stat } from 'node:fs/promises';
|
|
2
2
|
import { basename, dirname, join, normalize, relative, resolve, } from 'node:path';
|
|
3
|
+
import { CliError } from '../errors/index.js';
|
|
3
4
|
import { computeContentHash, computeStringHash } from '../manifest/hash.js';
|
|
4
5
|
import { findEntry } from '../manifest/manager.js';
|
|
5
6
|
import { getSyncMappings } from '../providers/shared/adapter.utils.js';
|
|
@@ -315,6 +316,7 @@ export async function computeSyncPlan({ canonical, adapters, manifest, scope, co
|
|
|
315
316
|
const collections = [];
|
|
316
317
|
const scopeRoot = resolveScopeRoot(canonical, explicitScopeRoot);
|
|
317
318
|
const seenCanonicalKeys = new Set();
|
|
319
|
+
const transformFailures = new Map();
|
|
318
320
|
const activeProviderNames = new Set();
|
|
319
321
|
const activeMappingsByProvider = new Map();
|
|
320
322
|
const manifestV2 = manifest;
|
|
@@ -538,9 +540,27 @@ export async function computeSyncPlan({ canonical, adapters, manifest, scope, co
|
|
|
538
540
|
if (!entryInsideMapping(canonicalEntry, mapping.canonicalDir)) {
|
|
539
541
|
continue;
|
|
540
542
|
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
543
|
+
let renderedContent;
|
|
544
|
+
if (mapping.transformCanonical && canonicalEntry.isFile) {
|
|
545
|
+
const displayPath = relativeCanonicalPath.replaceAll('\\', '/');
|
|
546
|
+
try {
|
|
547
|
+
renderedContent = mapping.transformCanonical(await readFile(canonicalEntry.canonicalPath, 'utf8'), displayPath);
|
|
548
|
+
}
|
|
549
|
+
catch (error) {
|
|
550
|
+
if (!(error instanceof CliError)) {
|
|
551
|
+
throw error;
|
|
552
|
+
}
|
|
553
|
+
// Every provider transform parses the same canonical file, so key
|
|
554
|
+
// the failure by path and report each invalid file exactly once.
|
|
555
|
+
const failureKey = normalize(relativeCanonicalPath);
|
|
556
|
+
if (!transformFailures.has(failureKey)) {
|
|
557
|
+
transformFailures.set(failureKey, error.message.includes(displayPath)
|
|
558
|
+
? error.message
|
|
559
|
+
: `${displayPath}: ${error.message}`);
|
|
560
|
+
}
|
|
561
|
+
continue;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
544
564
|
const entryScopeRoot = scopeRoot
|
|
545
565
|
? scopeRoot
|
|
546
566
|
: resolveScopeRootFromCanonical(canonicalEntry, relativeCanonicalPath);
|
|
@@ -579,6 +599,14 @@ export async function computeSyncPlan({ canonical, adapters, manifest, scope, co
|
|
|
579
599
|
}
|
|
580
600
|
}
|
|
581
601
|
}
|
|
602
|
+
if (transformFailures.size > 0) {
|
|
603
|
+
const count = transformFailures.size;
|
|
604
|
+
throw new CliError(`Sync stopped: ${count} invalid canonical ${count === 1 ? 'rule' : 'rules'}. Fix ${count === 1 ? 'it' : 'them'} and re-run oat sync:\n${[
|
|
605
|
+
...transformFailures.values(),
|
|
606
|
+
]
|
|
607
|
+
.map((message) => ` - ${message}`)
|
|
608
|
+
.join('\n')}`);
|
|
609
|
+
}
|
|
582
610
|
if (!scopeRoot) {
|
|
583
611
|
return { scope, entries, removals, collections };
|
|
584
612
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type GenericDispatchRecord } from '../identity/generic-dispatch-record.js';
|
|
2
|
+
import { z } from 'zod';
|
|
2
3
|
import { type ClaudeCapabilityEvidence } from './targets.js';
|
|
3
4
|
export interface AcceptedClaudeLaunchEnvelope {
|
|
4
5
|
schemaVersion: 1;
|
|
@@ -16,19 +17,71 @@ export interface AcceptedClaudeLaunchEnvelope {
|
|
|
16
17
|
model?: string;
|
|
17
18
|
};
|
|
18
19
|
}
|
|
20
|
+
type ResolverRole = AcceptedClaudeLaunchEnvelope['resolverRole'];
|
|
21
|
+
/**
|
|
22
|
+
* One violation found while validating a managed Claude dispatch input.
|
|
23
|
+
* `stage` is the top-level input key it belongs to (`claudeLaunch`,
|
|
24
|
+
* `recordBase`, or `event`); `path` locates it inside that stage.
|
|
25
|
+
* Messages name fields and expected forms; they are still routed through the
|
|
26
|
+
* command's redaction boundary because a few echo caller-supplied selectors.
|
|
27
|
+
*/
|
|
28
|
+
export interface ManagedClaudeViolation {
|
|
29
|
+
stage: string;
|
|
30
|
+
path: string;
|
|
31
|
+
message: string;
|
|
32
|
+
}
|
|
33
|
+
/** Render a Zod issue path as `a.b[0].c`, or `<root>` when empty. */
|
|
34
|
+
export declare function formatIssuePath(prefix: string | null, path: readonly (string | number)[]): string;
|
|
35
|
+
export declare function zodIssueViolations(stage: string, prefix: string | null, error: z.ZodError): ManagedClaudeViolation[];
|
|
19
36
|
/**
|
|
20
37
|
* Validate the managed resolver result against the generated provider role and
|
|
21
38
|
* the exact payload that will be launched. This is the production boundary
|
|
22
39
|
* used by the project dispatch-record producer for managed Claude dispatches.
|
|
40
|
+
* It stops at the first failure; {@link collectClaudeLaunchViolations} reports
|
|
41
|
+
* every failure for a caller building its input.
|
|
23
42
|
*/
|
|
24
43
|
export declare function acceptClaudeLaunchEnvelope(input: {
|
|
25
44
|
resolution: unknown;
|
|
26
45
|
definition: string;
|
|
27
46
|
launch: unknown;
|
|
28
47
|
}): AcceptedClaudeLaunchEnvelope;
|
|
48
|
+
/**
|
|
49
|
+
* Report every `claudeLaunch` violation in one pass: each schema issue in the
|
|
50
|
+
* resolution and the payload, then every consistency check the parsed inputs
|
|
51
|
+
* allow. Consistency checks depend on a parsed resolution, and the two payload
|
|
52
|
+
* checks on a parsed payload; those are skipped and named in `skipped` rather
|
|
53
|
+
* than reported against a value that failed to parse.
|
|
54
|
+
*/
|
|
55
|
+
export declare function collectClaudeLaunchViolations(claudeLaunch: unknown): {
|
|
56
|
+
resolverRole: ResolverRole | null;
|
|
57
|
+
violations: ManagedClaudeViolation[];
|
|
58
|
+
skipped: string[];
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Report every `recordBase` violation in one pass: each derived field that is
|
|
62
|
+
* present, the action/role check, every missing, mistyped, or unknown field,
|
|
63
|
+
* every absolute path in an identity or control field, and every sensitive key
|
|
64
|
+
* or value. The action/role check needs a parsed resolution and is skipped
|
|
65
|
+
* without one.
|
|
66
|
+
*/
|
|
67
|
+
export declare function collectClaudeRecordBaseViolations(candidate: unknown, resolverRole: ResolverRole | null): {
|
|
68
|
+
violations: ManagedClaudeViolation[];
|
|
69
|
+
skipped: string[];
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* One error for a whole validation run: a header, then one
|
|
73
|
+
* `stage path: message` line per violation, then the checks that were skipped
|
|
74
|
+
* because they depend on a stage that failed to parse.
|
|
75
|
+
*/
|
|
76
|
+
export declare class ManagedClaudeDispatchValidationError extends Error {
|
|
77
|
+
readonly violations: readonly ManagedClaudeViolation[];
|
|
78
|
+
readonly skipped: readonly string[];
|
|
79
|
+
constructor(violations: readonly ManagedClaudeViolation[], skipped?: readonly string[]);
|
|
80
|
+
}
|
|
29
81
|
/** Build configured invocation evidence only from an accepted launch envelope. */
|
|
30
82
|
export declare function buildClaudeDispatchRecord(input: {
|
|
31
83
|
envelope: AcceptedClaudeLaunchEnvelope;
|
|
32
84
|
recordBase: unknown;
|
|
33
85
|
}): GenericDispatchRecord;
|
|
86
|
+
export {};
|
|
34
87
|
//# sourceMappingURL=dispatch-envelope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch-envelope.d.ts","sourceRoot":"","sources":["../../../src/providers/claude/dispatch-envelope.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dispatch-envelope.d.ts","sourceRoot":"","sources":["../../../src/providers/claude/dispatch-envelope.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,qBAAqB,EAC3B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,WAAW,CAAC;AA4FnB,MAAM,WAAW,4BAA4B;IAC3C,aAAa,EAAE,CAAC,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE,aAAa,GAAG,UAAU,CAAC;IACzC,QAAQ,EAAE,uBAAuB,GAAG,cAAc,CAAC;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,wBAAwB,CAAC;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,C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