@open-agent-toolkit/cli 0.1.48 → 0.1.50
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/docs/cli-utilities/configuration.md +41 -0
- package/assets/docs/cli-utilities/workflow-gates.md +17 -0
- package/assets/docs/provider-sync/providers.md +5 -1
- package/assets/docs/workflows/projects/dispatch-ceiling.md +59 -7
- package/assets/docs/workflows/projects/implementation-execution.md +34 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-implement/SKILL.md +49 -22
- package/assets/skills/oat-project-review-provide/SKILL.md +18 -2
- 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 +57 -110
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +71 -0
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +144 -112
- 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/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
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { normalizeMatrixCellAvailability, probeCursorSubagentModel, resolveCursorModelCatalog, validateMatrixCell, } from './availability.js';
|
|
2
|
+
function errorDiagnostic(error) {
|
|
3
|
+
return error instanceof Error ? error.message : String(error);
|
|
4
|
+
}
|
|
5
|
+
function joinDiagnostics(...diagnostics) {
|
|
6
|
+
return diagnostics
|
|
7
|
+
.map((diagnostic) => diagnostic?.trim() ?? '')
|
|
8
|
+
.filter((diagnostic) => diagnostic.length > 0)
|
|
9
|
+
.join('\n');
|
|
10
|
+
}
|
|
11
|
+
function availabilityRef(ref) {
|
|
12
|
+
if (ref.value !== null) {
|
|
13
|
+
return { provider: ref.provider, value: ref.value, target: null };
|
|
14
|
+
}
|
|
15
|
+
if (ref.target === null) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const value = ref.target.model ?? ref.target.effort;
|
|
19
|
+
if (!value) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
provider: ref.target.harness ?? ref.provider,
|
|
24
|
+
value,
|
|
25
|
+
target: ref.target,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function oracleOptions(context, target) {
|
|
29
|
+
return {
|
|
30
|
+
cwd: context.options.cwd,
|
|
31
|
+
...(context.options.env ? { env: context.options.env } : {}),
|
|
32
|
+
...(context.options.dependencies
|
|
33
|
+
? { dependencies: context.options.dependencies }
|
|
34
|
+
: {}),
|
|
35
|
+
detailed: true,
|
|
36
|
+
...(target ? { target } : {}),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function cursorCatalogDiagnostic(value, presence) {
|
|
40
|
+
return presence
|
|
41
|
+
? `Cursor's broad model catalog lists '${value}', but subagent Task dispatch could not be validated.`
|
|
42
|
+
: `Cursor's broad model catalog does not list '${value}'.`;
|
|
43
|
+
}
|
|
44
|
+
function resolveCursorCatalogOnce(context) {
|
|
45
|
+
if (context.cursorCatalog === null) {
|
|
46
|
+
const resolver = context.options.resolveCursorModelCatalog ?? resolveCursorModelCatalog;
|
|
47
|
+
context.cursorCatalog = resolver(context.options).catch((error) => ({
|
|
48
|
+
status: 'failed',
|
|
49
|
+
candidates: [],
|
|
50
|
+
sourceCommand: null,
|
|
51
|
+
diagnostic: errorDiagnostic(error),
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
return context.cursorCatalog;
|
|
55
|
+
}
|
|
56
|
+
function probeCursorCandidateOnce(value, context) {
|
|
57
|
+
const cached = context.cursorTaskProbes.get(value);
|
|
58
|
+
if (cached) {
|
|
59
|
+
return cached;
|
|
60
|
+
}
|
|
61
|
+
const probe = context.options.probeCursorSubagentModel ?? probeCursorSubagentModel;
|
|
62
|
+
const pending = probe(value, context.options)
|
|
63
|
+
.then((result) => ({ result, diagnostic: '' }))
|
|
64
|
+
.catch((error) => ({
|
|
65
|
+
result: {
|
|
66
|
+
availability: 'unvalidated',
|
|
67
|
+
decisive: false,
|
|
68
|
+
evidence: 'none',
|
|
69
|
+
},
|
|
70
|
+
diagnostic: errorDiagnostic(error),
|
|
71
|
+
}));
|
|
72
|
+
context.cursorTaskProbes.set(value, pending);
|
|
73
|
+
return pending;
|
|
74
|
+
}
|
|
75
|
+
async function validateCursorRef(ref, value, context) {
|
|
76
|
+
const taskProbe = await probeCursorCandidateOnce(value, context);
|
|
77
|
+
if (taskProbe.result.decisive) {
|
|
78
|
+
return {
|
|
79
|
+
ref,
|
|
80
|
+
status: taskProbe.result.availability,
|
|
81
|
+
evidence: taskProbe.result.evidence,
|
|
82
|
+
catalogPresence: null,
|
|
83
|
+
diagnostic: joinDiagnostics(taskProbe.diagnostic, taskProbe.result.message),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const catalog = await resolveCursorCatalogOnce(context);
|
|
87
|
+
if (catalog.status === 'resolved') {
|
|
88
|
+
const catalogPresence = catalog.candidates.includes(value);
|
|
89
|
+
return {
|
|
90
|
+
ref,
|
|
91
|
+
status: catalogPresence ? 'unvalidated' : 'unknown-value',
|
|
92
|
+
evidence: 'catalog-only',
|
|
93
|
+
catalogPresence,
|
|
94
|
+
diagnostic: joinDiagnostics(taskProbe.diagnostic, cursorCatalogDiagnostic(value, catalogPresence)),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
ref,
|
|
99
|
+
status: 'unvalidated',
|
|
100
|
+
evidence: 'none',
|
|
101
|
+
catalogPresence: null,
|
|
102
|
+
diagnostic: joinDiagnostics(taskProbe.diagnostic, catalog.diagnostic),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
async function validateRef(ref, context) {
|
|
106
|
+
const candidate = availabilityRef(ref);
|
|
107
|
+
if (candidate === null) {
|
|
108
|
+
return {
|
|
109
|
+
ref,
|
|
110
|
+
status: 'unvalidated',
|
|
111
|
+
evidence: 'none',
|
|
112
|
+
catalogPresence: null,
|
|
113
|
+
diagnostic: 'No dispatch candidate value is available for validation.',
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
if (candidate.provider.trim().toLowerCase() === 'cursor') {
|
|
117
|
+
return validateCursorRef(ref, candidate.value, context);
|
|
118
|
+
}
|
|
119
|
+
const validator = context.options.validateMatrixCell ?? validateMatrixCell;
|
|
120
|
+
try {
|
|
121
|
+
const result = normalizeMatrixCellAvailability(await validator(candidate.provider, candidate.value, oracleOptions(context, candidate.target)));
|
|
122
|
+
return {
|
|
123
|
+
ref,
|
|
124
|
+
status: result.availability,
|
|
125
|
+
evidence: 'none',
|
|
126
|
+
catalogPresence: null,
|
|
127
|
+
diagnostic: result.message ?? '',
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
return {
|
|
132
|
+
ref,
|
|
133
|
+
status: 'unvalidated',
|
|
134
|
+
evidence: 'none',
|
|
135
|
+
catalogPresence: null,
|
|
136
|
+
diagnostic: errorDiagnostic(error),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export function createDispatchValidationPassContext(options = { cwd: process.cwd() }) {
|
|
141
|
+
return {
|
|
142
|
+
cursorCatalog: null,
|
|
143
|
+
cursorTaskProbes: new Map(),
|
|
144
|
+
options,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
export async function validateDispatchMatrixRefs(refs, context) {
|
|
148
|
+
return Promise.all(refs.map((ref) => validateRef(ref, context)));
|
|
149
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type DispatchReportV1 } from './dispatch-report.js';
|
|
1
2
|
import type { IdentityProvenance } from './provenance.js';
|
|
2
3
|
export type DispatchAction = 'implementation' | 'fix' | 'review';
|
|
3
4
|
export type DispatchRole = 'implementer' | 'fix' | 'reviewer';
|
|
@@ -30,6 +31,7 @@ export interface ParseDispatchStampsOptions {
|
|
|
30
31
|
onWarning?: (warning: string) => void;
|
|
31
32
|
}
|
|
32
33
|
export declare function formatDispatchStamp(record: DispatchStampRecord): string;
|
|
34
|
+
export declare function formatDispatchStamp(report: DispatchReportV1): string;
|
|
33
35
|
export declare function parseDispatchStamps(markdown: string, options?: ParseDispatchStampsOptions): DispatchStamp[];
|
|
34
36
|
export declare function getProducerIdentitiesByScope(markdown: string, options?: ParseDispatchStampsOptions): Record<string, ProducerIdentity[]>;
|
|
35
37
|
//# sourceMappingURL=stamp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stamp.d.ts","sourceRoot":"","sources":["../../../src/providers/identity/stamp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,KAAK,GAAG,QAAQ,CAAC;AACjE,MAAM,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-report.js';
|
|
1
2
|
const ACTIONS = new Set(['implementation', 'fix', 'review']);
|
|
2
3
|
const ROLES = new Set(['implementer', 'fix', 'reviewer']);
|
|
3
4
|
const PROVENANCES = new Set([
|
|
@@ -44,7 +45,8 @@ function inferRole(action) {
|
|
|
44
45
|
}
|
|
45
46
|
return 'implementer';
|
|
46
47
|
}
|
|
47
|
-
export function formatDispatchStamp(
|
|
48
|
+
export function formatDispatchStamp(value) {
|
|
49
|
+
const record = 'schemaVersion' in value ? toDispatchStampRecord(value) : value;
|
|
48
50
|
const normalized = {
|
|
49
51
|
scope: singleToken(record.scope, 'unknown'),
|
|
50
52
|
action: record.action,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.50",
|
|
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.1.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.1.50"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|