@open-agent-toolkit/cli 0.2.79 → 0.3.0
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 +5 -5
- package/assets/agents/oat-reviewer.md +15 -15
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/cli-utilities/workflow-gates.md +1 -1
- package/assets/docs/workflows/projects/artifacts.md +2 -2
- package/assets/docs/workflows/projects/autonomy.md +1 -1
- package/assets/docs/workflows/projects/implementation-execution.md +4 -4
- package/assets/docs/workflows/projects/lifecycle.md +1 -1
- package/assets/docs/workflows/projects/reviews.md +11 -11
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-agent-instructions-analyze/SKILL.md +3 -3
- package/assets/skills/oat-docs-analyze/SKILL.md +3 -3
- package/assets/skills/oat-project-autonomous/SKILL.md +2 -2
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +14 -14
- package/assets/skills/oat-project-design/SKILL.md +2 -2
- package/assets/skills/oat-project-discover/SKILL.md +2 -2
- package/assets/skills/oat-project-document/SKILL.md +1 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +14 -14
- package/assets/skills/oat-project-implement/SKILL.md +2 -2
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +1 -1
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +14 -14
- package/assets/skills/oat-project-implement/references/phase-execution.md +3 -3
- package/assets/skills/oat-project-implement/references/plan-and-resume.md +2 -2
- package/assets/skills/oat-project-import-plan/SKILL.md +2 -2
- package/assets/skills/oat-project-lite/SKILL.md +1 -1
- package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +14 -14
- package/assets/skills/oat-project-plan/SKILL.md +2 -2
- package/assets/skills/oat-project-plan-writing/SKILL.md +4 -4
- package/assets/skills/oat-project-pr-final/SKILL.md +1 -1
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +14 -14
- package/assets/skills/oat-project-quick-start/SKILL.md +2 -2
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +14 -14
- package/assets/skills/oat-project-review-provide/SKILL.md +14 -14
- package/assets/skills/oat-project-review-provide-remote/SKILL.md +10 -10
- package/assets/skills/oat-project-review-receive/SKILL.md +64 -45
- package/assets/skills/oat-project-review-receive-remote/SKILL.md +6 -6
- package/assets/skills/oat-project-revise/SKILL.md +2 -2
- package/assets/skills/oat-review-provide/SKILL.md +2 -2
- package/assets/skills/oat-review-provide/references/review-artifact-template.md +3 -3
- package/assets/skills/oat-review-provide-remote/SKILL.md +11 -11
- package/assets/skills/oat-review-receive/SKILL.md +18 -17
- package/assets/skills/oat-review-receive-remote/SKILL.md +13 -13
- package/assets/skills/oat-wave-execute/SKILL.md +2 -2
- package/assets/templates/plan.md +1 -1
- package/dist/commands/gate/__fixtures__/fake-runtime.mjs +4 -4
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +20 -11
- package/dist/commands/gate/review-verdict.d.ts +2 -2
- package/dist/commands/gate/review-verdict.d.ts.map +1 -1
- package/dist/commands/gate/review-verdict.js +223 -57
- package/dist/review-remote/body-builder.d.ts +3 -3
- package/dist/review-remote/body-builder.d.ts.map +1 -1
- package/dist/review-remote/body-builder.js +12 -12
- package/dist/review-remote/reviewer-dispatch.d.ts +2 -2
- package/dist/review-remote/reviewer-dispatch.d.ts.map +1 -1
- package/dist/review-remote/reviewer-dispatch.js +15 -7
- package/package.json +2 -2
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The body is the durable handoff to `*-receive-remote`: a leading
|
|
7
7
|
* HTML-comment marker block (parsed back by {@link parseMarkerBlock}) followed
|
|
8
|
-
* by human-readable prose (summary, severity counts, optional
|
|
8
|
+
* by human-readable prose (summary, severity counts, optional low-fix nudge,
|
|
9
9
|
* optional verification commands).
|
|
10
10
|
*/
|
|
11
11
|
import { type ReviewInvocation } from './marker-parser.js';
|
|
12
12
|
export type ReviewVerdict = 'REQUEST_CHANGES' | 'COMMENT';
|
|
13
|
-
export type FindingSeverity = 'critical' | '
|
|
13
|
+
export type FindingSeverity = 'critical' | 'high' | 'medium' | 'low';
|
|
14
14
|
/** Minimal finding shape the builder needs — only severity is required. */
|
|
15
15
|
export interface BuilderFinding {
|
|
16
16
|
severity: FindingSeverity;
|
|
@@ -73,7 +73,7 @@ interface GateBuildInput {
|
|
|
73
73
|
export type BuildInput = BuildInputBase & (LifecycleBuildInput | GateBuildInput);
|
|
74
74
|
/**
|
|
75
75
|
* Map a finding set to the GitHub review verdict: `REQUEST_CHANGES` when any
|
|
76
|
-
* critical or
|
|
76
|
+
* critical or high finding is present, otherwise `COMMENT` (including the
|
|
77
77
|
* zero-findings clean-review case). Never auto-`APPROVE`.
|
|
78
78
|
*/
|
|
79
79
|
export declare function mapVerdict(findings: BuilderFinding[]): ReviewVerdict;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body-builder.d.ts","sourceRoot":"","sources":["../../src/review-remote/body-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"body-builder.d.ts","sourceRoot":"","sources":["../../src/review-remote/body-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAErE,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED;;;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body is the durable handoff to `*-receive-remote`: a leading
|
|
7
7
|
* HTML-comment marker block (parsed back by {@link parseMarkerBlock}) followed
|
|
8
|
-
* by human-readable prose (summary, severity counts, optional
|
|
8
|
+
* by human-readable prose (summary, severity counts, optional low-fix nudge,
|
|
9
9
|
* optional verification commands).
|
|
10
10
|
*/
|
|
11
11
|
import { MARKER_BLOCK_OPEN } from './marker-parser.js';
|
|
12
12
|
/**
|
|
13
13
|
* Map a finding set to the GitHub review verdict: `REQUEST_CHANGES` when any
|
|
14
|
-
* critical or
|
|
14
|
+
* critical or high finding is present, otherwise `COMMENT` (including the
|
|
15
15
|
* zero-findings clean-review case). Never auto-`APPROVE`.
|
|
16
16
|
*/
|
|
17
17
|
export function mapVerdict(findings) {
|
|
18
|
-
const hasBlocking = findings.some((f) => f.severity === 'critical' || f.severity === '
|
|
18
|
+
const hasBlocking = findings.some((f) => f.severity === 'critical' || f.severity === 'high');
|
|
19
19
|
return hasBlocking ? 'REQUEST_CHANGES' : 'COMMENT';
|
|
20
20
|
}
|
|
21
21
|
function countSeverities(findings) {
|
|
22
22
|
const counts = {
|
|
23
23
|
critical: 0,
|
|
24
|
-
|
|
24
|
+
high: 0,
|
|
25
25
|
medium: 0,
|
|
26
|
-
|
|
26
|
+
low: 0,
|
|
27
27
|
};
|
|
28
28
|
for (const f of findings) {
|
|
29
29
|
counts[f.severity] += 1;
|
|
@@ -76,9 +76,9 @@ function buildOutOfDiffSection(findings) {
|
|
|
76
76
|
});
|
|
77
77
|
return ['## Findings outside the PR diff', '', ...entries].join('\n');
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
'this cycle rather than tracking them as backlog items —
|
|
81
|
-
'faster to just resolve than to manage.';
|
|
79
|
+
const LOW_FIX_NUDGE = 'Low findings are included inline. We recommend fixing low-severity ' +
|
|
80
|
+
'findings during this cycle rather than tracking them as backlog items — ' +
|
|
81
|
+
'they are usually faster to just resolve than to manage.';
|
|
82
82
|
/**
|
|
83
83
|
* Build the posted-review body and compute its verdict.
|
|
84
84
|
*/
|
|
@@ -92,17 +92,17 @@ export function buildReviewBody(input) {
|
|
|
92
92
|
'## Severity Counts',
|
|
93
93
|
'',
|
|
94
94
|
`- Critical: ${counts.critical}`,
|
|
95
|
-
`-
|
|
95
|
+
`- High: ${counts.high}`,
|
|
96
96
|
`- Medium: ${counts.medium}`,
|
|
97
|
-
`-
|
|
97
|
+
`- Low: ${counts.low}`,
|
|
98
98
|
].join('\n'),
|
|
99
99
|
];
|
|
100
100
|
const outOfDiffSection = buildOutOfDiffSection(input.outOfDiffFindings);
|
|
101
101
|
if (outOfDiffSection !== null) {
|
|
102
102
|
sections.push(outOfDiffSection);
|
|
103
103
|
}
|
|
104
|
-
if (counts.
|
|
105
|
-
sections.push(`## Notes\n\n${
|
|
104
|
+
if (counts.low > 0) {
|
|
105
|
+
sections.push(`## Notes\n\n${LOW_FIX_NUDGE}`);
|
|
106
106
|
}
|
|
107
107
|
if (input.verificationCommands && input.verificationCommands.length > 0) {
|
|
108
108
|
const commands = input.verificationCommands
|
|
@@ -33,10 +33,10 @@ import type { NarrowingResult } from './narrowing.js';
|
|
|
33
33
|
export declare const STRUCTURED_OUTPUT_MODE_FLAG: 'oat_output_mode';
|
|
34
34
|
/** The single accepted value of {@link STRUCTURED_OUTPUT_MODE_FLAG}. */
|
|
35
35
|
export declare const STRUCTURED_OUTPUT_MODE_VALUE: 'structured';
|
|
36
|
-
export type FindingSeverity = 'critical' | '
|
|
36
|
+
export type FindingSeverity = 'critical' | 'high' | 'medium' | 'low';
|
|
37
37
|
/** A single structured finding (see design.md → Data Models). */
|
|
38
38
|
export interface StructuredFinding {
|
|
39
|
-
/** Stable per-dispatch ID with a C/
|
|
39
|
+
/** Stable per-dispatch ID with a C/H/M/L prefix. */
|
|
40
40
|
id: string;
|
|
41
41
|
severity: FindingSeverity;
|
|
42
42
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewer-dispatch.d.ts","sourceRoot":"","sources":["../../src/review-remote/reviewer-dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAG,iBAA0B,CAAC;AAEtE,wEAAwE;AACxE,eAAO,MAAM,4BAA4B,EAAG,YAAqB,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"reviewer-dispatch.d.ts","sourceRoot":"","sources":["../../src/review-remote/reviewer-dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAG,iBAA0B,CAAC;AAEtE,wEAAwE;AACxE,eAAO,MAAM,4BAA4B,EAAG,YAAqB,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAgBrE,iEAAiE;AACjE,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,eAAe,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACpE;AAED,iFAAiF;AACjF,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,SAAS,EAAE,eAAe,CAAC;CAC5B;AAED,iFAAiF;AACjF,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAezB;AAsED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CA2B7E;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,qBAAqB,EAC9B,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAK7B"}
|
|
@@ -34,10 +34,16 @@ export const STRUCTURED_OUTPUT_MODE_FLAG = 'oat_output_mode';
|
|
|
34
34
|
export const STRUCTURED_OUTPUT_MODE_VALUE = 'structured';
|
|
35
35
|
const SEVERITIES = new Set([
|
|
36
36
|
'critical',
|
|
37
|
-
'
|
|
37
|
+
'high',
|
|
38
38
|
'medium',
|
|
39
|
-
'
|
|
39
|
+
'low',
|
|
40
40
|
]);
|
|
41
|
+
const SEVERITY_ID_PREFIX = {
|
|
42
|
+
critical: 'C',
|
|
43
|
+
high: 'H',
|
|
44
|
+
medium: 'M',
|
|
45
|
+
low: 'L',
|
|
46
|
+
};
|
|
41
47
|
/** Typed error raised when the reviewer returns a malformed structured shape. */
|
|
42
48
|
export class StructuredFindingsError extends Error {
|
|
43
49
|
constructor(message) {
|
|
@@ -72,12 +78,14 @@ function validateFinding(value, index) {
|
|
|
72
78
|
if (!isObject(value)) {
|
|
73
79
|
throw new StructuredFindingsError(`${at} must be an object.`);
|
|
74
80
|
}
|
|
75
|
-
if (typeof value['id'] !== 'string' || value['id'] === '') {
|
|
76
|
-
throw new StructuredFindingsError(`${at}.id must be a non-empty string.`);
|
|
77
|
-
}
|
|
78
81
|
if (typeof value['severity'] !== 'string' ||
|
|
79
82
|
!SEVERITIES.has(value['severity'])) {
|
|
80
|
-
throw new StructuredFindingsError(`${at}.severity must be one of critical|
|
|
83
|
+
throw new StructuredFindingsError(`${at}.severity must be one of critical|high|medium|low.`);
|
|
84
|
+
}
|
|
85
|
+
const severity = value['severity'];
|
|
86
|
+
const expectedIdPattern = new RegExp(`^${SEVERITY_ID_PREFIX[severity]}[1-9]\\d*$`);
|
|
87
|
+
if (typeof value['id'] !== 'string' || !expectedIdPattern.test(value['id'])) {
|
|
88
|
+
throw new StructuredFindingsError(`${at}.id must use the ${SEVERITY_ID_PREFIX[severity]} prefix for ${severity} severity followed by a positive integer.`);
|
|
81
89
|
}
|
|
82
90
|
if (typeof value['title'] !== 'string') {
|
|
83
91
|
throw new StructuredFindingsError(`${at}.title must be a string.`);
|
|
@@ -104,7 +112,7 @@ function validateFinding(value, index) {
|
|
|
104
112
|
}
|
|
105
113
|
return {
|
|
106
114
|
id: value['id'],
|
|
107
|
-
severity
|
|
115
|
+
severity,
|
|
108
116
|
title: value['title'],
|
|
109
117
|
file: fileSet ? file : null,
|
|
110
118
|
line: lineSet ? line : null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Open Agent Toolkit CLI",
|
|
6
6
|
"homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ora": "^9.0.0",
|
|
35
35
|
"yaml": "2.8.2",
|
|
36
36
|
"zod": "^3.25.76",
|
|
37
|
-
"@open-agent-toolkit/control-plane": "0.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.3.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|