@open-agent-toolkit/cli 0.1.48 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agents/oat-phase-implementer.md +16 -5
- package/assets/docs/cli-utilities/configuration.md +41 -0
- package/assets/docs/cli-utilities/workflow-gates.md +18 -1
- package/assets/docs/provider-sync/commands.md +29 -1
- package/assets/docs/provider-sync/providers.md +18 -5
- package/assets/docs/provider-sync/scope-and-surface.md +13 -0
- package/assets/docs/workflows/projects/dispatch-ceiling.md +59 -7
- package/assets/docs/workflows/projects/implementation-execution.md +63 -3
- package/assets/docs/workflows/projects/reviews.md +18 -1
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-agent-instructions-analyze/references/docs/provider-reference.md +8 -2
- package/assets/skills/oat-agent-instructions-apply/references/docs/provider-reference.md +8 -2
- package/assets/skills/oat-project-implement/SKILL.md +141 -59
- package/assets/skills/oat-project-review-provide/SKILL.md +44 -10
- package/assets/skills/oat-project-review-provide-remote/SKILL.md +28 -1
- package/dist/commands/config/index.d.ts +3 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +70 -128
- package/dist/commands/doctor/index.d.ts +3 -0
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +205 -195
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +72 -1
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +224 -112
- package/dist/commands/providers/codex/materialize.d.ts.map +1 -1
- package/dist/commands/providers/codex/materialize.js +31 -15
- package/dist/config/dispatch-matrix.d.ts +59 -0
- package/dist/config/dispatch-matrix.d.ts.map +1 -0
- package/dist/config/dispatch-matrix.js +264 -0
- package/dist/config/oat-config.d.ts +2 -28
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +8 -144
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +2 -1
- package/dist/providers/codex/codec/config-merge.d.ts +8 -2
- package/dist/providers/codex/codec/config-merge.d.ts.map +1 -1
- package/dist/providers/codex/codec/config-merge.js +17 -2
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +14 -4
- package/dist/providers/identity/availability.d.ts +12 -0
- package/dist/providers/identity/availability.d.ts.map +1 -1
- package/dist/providers/identity/availability.js +72 -29
- package/dist/providers/identity/dispatch-report.d.ts +124 -0
- package/dist/providers/identity/dispatch-report.d.ts.map +1 -0
- package/dist/providers/identity/dispatch-report.js +285 -0
- package/dist/providers/identity/dispatch-validation.d.ts +28 -0
- package/dist/providers/identity/dispatch-validation.d.ts.map +1 -0
- package/dist/providers/identity/dispatch-validation.js +149 -0
- package/dist/providers/identity/stamp.d.ts +2 -0
- package/dist/providers/identity/stamp.d.ts.map +1 -1
- package/dist/providers/identity/stamp.js +3 -1
- package/package.json +2 -2
|
@@ -9,6 +9,7 @@ import { BUILTIN_EXEC_TARGETS, readOatConfig, readOatLocalConfig, readUserConfig
|
|
|
9
9
|
import { resolveEffectiveConfig, resolveExecTargetViews, resolveExecTargets, resolveGate, } from '../../config/resolve.js';
|
|
10
10
|
import { dirExists, fileExists } from '../../fs/io.js';
|
|
11
11
|
import { normalizeToPosixPath, resolveProjectRoot, validateRealPathWithinScope, } from '../../fs/paths.js';
|
|
12
|
+
import { buildDispatchReport, } from '../../providers/identity/dispatch-report.js';
|
|
12
13
|
import { classifyModelFamily, } from '../../providers/identity/family.js';
|
|
13
14
|
import { resolveIdentityConfidence, } from '../../providers/identity/provenance.js';
|
|
14
15
|
import { parseDispatchStamps } from '../../providers/identity/stamp.js';
|
|
@@ -54,7 +55,7 @@ const VALID_IDENTITY_PROVENANCES = [
|
|
|
54
55
|
];
|
|
55
56
|
const REVIEW_GATE_CONTEXT_NOTE = 'This review is gate-originated. If you run `oat-project-review-provide`, set `oat_review_invocation: gate` in the review artifact. Write a canonical review artifact with `### Critical`, `### Important`, `### Medium`, and `### Minor` headings in that order, using `None` for empty sections.';
|
|
56
57
|
const GATE_CHECK_TIMEOUT_MS = 5_000;
|
|
57
|
-
const GATE_EXEC_TIMEOUT_MS =
|
|
58
|
+
const GATE_EXEC_TIMEOUT_MS = 15 * 60 * 1_000;
|
|
58
59
|
function reviewGateProjectContext(project) {
|
|
59
60
|
return [
|
|
60
61
|
`Resolved OAT project path: ${project.path}. Run the review for this project path.`,
|
|
@@ -94,6 +95,62 @@ function createGateInvocationMetadata(runId, selected) {
|
|
|
94
95
|
: {}),
|
|
95
96
|
});
|
|
96
97
|
}
|
|
98
|
+
function buildGateDispatchReport(invocation, scope) {
|
|
99
|
+
const report = buildDispatchReport({
|
|
100
|
+
scope,
|
|
101
|
+
action: 'review',
|
|
102
|
+
role: 'reviewer',
|
|
103
|
+
resolution: {
|
|
104
|
+
status: 'resolved',
|
|
105
|
+
provider: invocation.runtime,
|
|
106
|
+
value: null,
|
|
107
|
+
policyMode: null,
|
|
108
|
+
policy: null,
|
|
109
|
+
source: null,
|
|
110
|
+
providers: {
|
|
111
|
+
[invocation.runtime]: {
|
|
112
|
+
dispatchArgs: null,
|
|
113
|
+
selection: {
|
|
114
|
+
role: 'reviewer',
|
|
115
|
+
requestedCandidate: null,
|
|
116
|
+
candidateTier: null,
|
|
117
|
+
candidateIndex: null,
|
|
118
|
+
ceilingTier: null,
|
|
119
|
+
ceilingTarget: null,
|
|
120
|
+
selectedValue: null,
|
|
121
|
+
selectionMode: 'gate-invocation',
|
|
122
|
+
selectionBranch: 'gate-configured-invocation',
|
|
123
|
+
target: null,
|
|
124
|
+
cellSource: null,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
requestedControls: {
|
|
130
|
+
model: {
|
|
131
|
+
value: null,
|
|
132
|
+
mechanism: 'base-role',
|
|
133
|
+
reason: 'Configured gate invocation is reported separately from runtime identity.',
|
|
134
|
+
},
|
|
135
|
+
effort: {
|
|
136
|
+
value: null,
|
|
137
|
+
mechanism: 'base-role',
|
|
138
|
+
reason: 'Configured gate invocation is reported separately from runtime identity.',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
configuredDefaults: {
|
|
142
|
+
model: null,
|
|
143
|
+
modelSource: null,
|
|
144
|
+
effort: null,
|
|
145
|
+
effortSource: null,
|
|
146
|
+
},
|
|
147
|
+
gateInvocation: invocation,
|
|
148
|
+
});
|
|
149
|
+
return {
|
|
150
|
+
...report,
|
|
151
|
+
route: { ...report.route, target: invocation.targetId },
|
|
152
|
+
};
|
|
153
|
+
}
|
|
97
154
|
function gateInvocationPromptContext(invocation) {
|
|
98
155
|
const frontmatter = YAML.stringify({
|
|
99
156
|
oat_gate_run_id: invocation.runId,
|
|
@@ -1165,6 +1222,7 @@ function writeReviewGateExecutionFailure(context, payload) {
|
|
|
1165
1222
|
project: payload.project,
|
|
1166
1223
|
projectResolutionSource: payload.projectResolutionSource,
|
|
1167
1224
|
gateInvocation: payload.gateInvocation,
|
|
1225
|
+
dispatchReport: payload.dispatchReport,
|
|
1168
1226
|
...(payload.corroboration
|
|
1169
1227
|
? { corroboration: payload.corroboration }
|
|
1170
1228
|
: {}),
|
|
@@ -1192,6 +1250,7 @@ function writeReviewGateUnexpectedFailure(context, payload) {
|
|
|
1192
1250
|
project: payload.project,
|
|
1193
1251
|
projectResolutionSource: payload.projectResolutionSource,
|
|
1194
1252
|
gateInvocation: payload.gateInvocation,
|
|
1253
|
+
dispatchReport: payload.dispatchReport,
|
|
1195
1254
|
message,
|
|
1196
1255
|
});
|
|
1197
1256
|
return;
|
|
@@ -1210,6 +1269,7 @@ function writeReviewGateArtifactValidationFailure(context, payload) {
|
|
|
1210
1269
|
artifactPath: payload.artifactPath,
|
|
1211
1270
|
generatedAt: payload.generatedAt,
|
|
1212
1271
|
gateInvocation: payload.gateInvocation,
|
|
1272
|
+
dispatchReport: payload.dispatchReport,
|
|
1213
1273
|
...(payload.corroboration
|
|
1214
1274
|
? { corroboration: payload.corroboration }
|
|
1215
1275
|
: {}),
|
|
@@ -1248,6 +1308,7 @@ function writeReviewGateTargetingFailure(context, payload) {
|
|
|
1248
1308
|
artifactPath: payload.artifactPath,
|
|
1249
1309
|
generatedAt: payload.generatedAt,
|
|
1250
1310
|
gateInvocation: payload.gateInvocation,
|
|
1311
|
+
dispatchReport: payload.dispatchReport,
|
|
1251
1312
|
corroboration,
|
|
1252
1313
|
receiveEligible: false,
|
|
1253
1314
|
remediable: false,
|
|
@@ -1418,11 +1479,13 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1418
1479
|
});
|
|
1419
1480
|
const selected = await resolveSelectedExecTarget(targets, options, producerIdentity, context, dependencies);
|
|
1420
1481
|
const gateInvocation = createGateInvocationMetadata(runId, selected);
|
|
1482
|
+
const dispatchReport = buildGateDispatchReport(gateInvocation, options.reviewScope?.trim() || 'gate-review');
|
|
1421
1483
|
postSelectionContext = {
|
|
1422
1484
|
project: projectPath,
|
|
1423
1485
|
projectResolutionSource: reviewProject.source,
|
|
1424
1486
|
target: selected.id,
|
|
1425
1487
|
gateInvocation,
|
|
1488
|
+
dispatchReport,
|
|
1426
1489
|
};
|
|
1427
1490
|
const threshold = parseReviewGateThreshold(options.exitNonzeroOn);
|
|
1428
1491
|
const before = await listReviewGateArtifactCandidates({
|
|
@@ -1454,6 +1517,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1454
1517
|
timedOut: childResult.timedOut ?? false,
|
|
1455
1518
|
timeoutMs: resolveGateExecTimeoutMs(dependencies.processEnv),
|
|
1456
1519
|
gateInvocation,
|
|
1520
|
+
dispatchReport,
|
|
1457
1521
|
});
|
|
1458
1522
|
process.exitCode = childExitCode;
|
|
1459
1523
|
return;
|
|
@@ -1493,6 +1557,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1493
1557
|
generatedAt: diagnosticArtifact?.generatedAt ?? null,
|
|
1494
1558
|
message,
|
|
1495
1559
|
gateInvocation,
|
|
1560
|
+
dispatchReport,
|
|
1496
1561
|
corroboration: initialTargetCorroboration,
|
|
1497
1562
|
});
|
|
1498
1563
|
process.exitCode = 1;
|
|
@@ -1514,6 +1579,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1514
1579
|
? 'Review artifact is missing oat_project for the explicitly declared project.'
|
|
1515
1580
|
: 'Review artifact project identity does not match the explicitly declared project.',
|
|
1516
1581
|
gateInvocation,
|
|
1582
|
+
dispatchReport,
|
|
1517
1583
|
corroboration: initialTargetCorroboration,
|
|
1518
1584
|
});
|
|
1519
1585
|
process.exitCode = 1;
|
|
@@ -1531,6 +1597,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1531
1597
|
message: 'Review artifact oat_generated_at is missing or is not a valid timestamp.',
|
|
1532
1598
|
recovery: `Set oat_generated_at to a valid timestamp in ${producedArtifact.path}, then rerun the gate. Invoke oat-project-review-receive only after the gate returns a receive-eligible result.`,
|
|
1533
1599
|
gateInvocation,
|
|
1600
|
+
dispatchReport,
|
|
1534
1601
|
corroboration: corroborateGateInvocation(gateInvocation, undefined, initialTargetCorroboration),
|
|
1535
1602
|
});
|
|
1536
1603
|
process.exitCode = 1;
|
|
@@ -1558,6 +1625,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1558
1625
|
message: detail,
|
|
1559
1626
|
recovery: `The review artifact was created at ${producedArtifact.path} but could not be consumed. Fix the artifact format, then rerun the gate to revalidate it. Invoke oat-project-review-receive only after the gate returns a receive-eligible result; if the only issue is a missing zero-count severity heading, rerun the gate to normalize the same artifact instead of creating a new review version.`,
|
|
1560
1627
|
gateInvocation,
|
|
1628
|
+
dispatchReport,
|
|
1561
1629
|
corroboration: corroborateGateInvocation(gateInvocation, undefined, initialTargetCorroboration),
|
|
1562
1630
|
});
|
|
1563
1631
|
process.exitCode = 1;
|
|
@@ -1581,6 +1649,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1581
1649
|
: 'Review artifact invocation metadata does not match the gate-owned configured invocation.',
|
|
1582
1650
|
recovery: `Copy the exact gate invocation fields from the review prompt into ${producedArtifact.path}, then run oat-project-review-receive only after the artifact validates.`,
|
|
1583
1651
|
gateInvocation,
|
|
1652
|
+
dispatchReport,
|
|
1584
1653
|
corroboration,
|
|
1585
1654
|
});
|
|
1586
1655
|
process.exitCode = 1;
|
|
@@ -1597,6 +1666,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1597
1666
|
message: 'Review artifact is missing the required gate invocation marker `oat_review_invocation: gate`.',
|
|
1598
1667
|
recovery: `Set oat_review_invocation: gate in ${producedArtifact.path}, then run oat-project-review-receive only after the artifact validates.`,
|
|
1599
1668
|
gateInvocation,
|
|
1669
|
+
dispatchReport,
|
|
1600
1670
|
corroboration,
|
|
1601
1671
|
});
|
|
1602
1672
|
process.exitCode = 1;
|
|
@@ -1627,6 +1697,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1627
1697
|
handoff,
|
|
1628
1698
|
diversity: selected.diversity,
|
|
1629
1699
|
gateInvocation,
|
|
1700
|
+
dispatchReport,
|
|
1630
1701
|
corroboration,
|
|
1631
1702
|
});
|
|
1632
1703
|
process.exitCode = blocking ? 1 : 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/dispatch-ceiling/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/dispatch-ceiling/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAa9B,OAAO,EAUL,KAAK,uBAAuB,EAY7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAsBzB,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAiC5C,UAAU,2BAA2B;IACnC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,sBAAsB,EAAE,CACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC7E,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAi/ED,wBAAgB,mCAAmC,CACjD,SAAS,GAAE,OAAO,CAAC,2BAA2B,CAAM,GACnD,OAAO,CAkGT"}
|