@open-agent-toolkit/cli 0.1.42 → 0.1.45
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 +11 -7
- package/assets/agents/oat-reviewer.md +6 -4
- package/assets/config/dispatch-matrix-recommendation.json +23 -0
- package/assets/docs/cli-utilities/configuration.md +95 -40
- package/assets/docs/cli-utilities/workflow-gates.md +79 -16
- package/assets/docs/contributing/code.md +10 -4
- package/assets/docs/contributing/hooks-and-safety.md +23 -0
- package/assets/docs/reference/oat-directory-structure.md +26 -24
- package/assets/docs/workflows/projects/dispatch-ceiling.md +193 -80
- package/assets/docs/workflows/projects/implementation-execution.md +68 -45
- package/assets/docs/workflows/projects/index.md +2 -2
- package/assets/docs/workflows/projects/lifecycle.md +17 -2
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-implement/SKILL.md +232 -100
- package/assets/skills/oat-project-plan/SKILL.md +80 -30
- package/assets/skills/oat-project-plan-writing/SKILL.md +10 -10
- package/assets/skills/oat-project-quick-start/SKILL.md +80 -30
- package/assets/templates/plan.md +4 -4
- package/assets/templates/state.md +12 -3
- package/dist/commands/config/index.d.ts +6 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +432 -11
- package/dist/commands/doctor/index.d.ts +6 -1
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +138 -4
- package/dist/commands/gate/index.d.ts +39 -2
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +343 -30
- package/dist/commands/internal/cursor-current-target.d.ts +37 -0
- package/dist/commands/internal/cursor-current-target.d.ts.map +1 -0
- package/dist/commands/internal/cursor-current-target.js +228 -0
- package/dist/commands/internal/index.d.ts.map +1 -1
- package/dist/commands/internal/index.js +2 -0
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +646 -56
- package/dist/config/dispatch-ceiling-preset.d.ts +37 -1
- package/dist/config/dispatch-ceiling-preset.d.ts.map +1 -1
- package/dist/config/dispatch-ceiling-preset.js +20 -0
- package/dist/config/oat-config.d.ts +25 -6
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +123 -11
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +16 -0
- package/dist/manifest/manifest.types.d.ts +12 -12
- package/dist/providers/ceiling/registry.d.ts.map +1 -1
- package/dist/providers/ceiling/registry.js +22 -1
- package/dist/providers/codex/codec/sync-extension.js +1 -1
- package/dist/providers/identity/availability.d.ts +22 -0
- package/dist/providers/identity/availability.d.ts.map +1 -0
- package/dist/providers/identity/availability.js +119 -0
- package/dist/providers/identity/family.d.ts +13 -0
- package/dist/providers/identity/family.d.ts.map +1 -0
- package/dist/providers/identity/family.js +32 -0
- package/dist/providers/identity/provenance.d.ts +21 -0
- package/dist/providers/identity/provenance.d.ts.map +1 -0
- package/dist/providers/identity/provenance.js +65 -0
- package/dist/providers/identity/stamp.d.ts +35 -0
- package/dist/providers/identity/stamp.d.ts.map +1 -0
- package/dist/providers/identity/stamp.js +171 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WorkflowClaudeDispatchCeiling, WorkflowCodexDispatchCeiling, WorkflowDispatchCeiling, WorkflowDispatchCeilingPreset } from './oat-config.js';
|
|
1
|
+
import type { WorkflowClaudeDispatchCeiling, WorkflowCodexDispatchCeiling, WorkflowDispatchCeiling, WorkflowDispatchCeilingPreset, WorkflowManagedDispatchPolicy } from './oat-config.js';
|
|
2
2
|
/**
|
|
3
3
|
* Fixed mapping table: preset → concrete per-provider values.
|
|
4
4
|
* This is the single authority for preset compilation; the resolver and skills
|
|
@@ -22,6 +22,26 @@ export declare const DISPATCH_CEILING_PRESETS: {
|
|
|
22
22
|
readonly claude: "sonnet";
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
+
export type DispatchPolicyClaudeValue = WorkflowClaudeDispatchCeiling | 'fable';
|
|
26
|
+
export type CappedManagedDispatchPolicy = Exclude<WorkflowManagedDispatchPolicy, 'uncapped'>;
|
|
27
|
+
export declare const DISPATCH_POLICY_PRESETS: {
|
|
28
|
+
readonly economy: {
|
|
29
|
+
readonly codex: "medium";
|
|
30
|
+
readonly claude: "sonnet";
|
|
31
|
+
};
|
|
32
|
+
readonly balanced: {
|
|
33
|
+
readonly codex: "high";
|
|
34
|
+
readonly claude: "sonnet";
|
|
35
|
+
};
|
|
36
|
+
readonly high: {
|
|
37
|
+
readonly codex: "xhigh";
|
|
38
|
+
readonly claude: "opus";
|
|
39
|
+
};
|
|
40
|
+
readonly frontier: {
|
|
41
|
+
readonly codex: "xhigh";
|
|
42
|
+
readonly claude: "fable";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
25
45
|
/**
|
|
26
46
|
* Result of compiling a preset selection.
|
|
27
47
|
* Both `preset` (provenance label) and `providers` (concrete values) are present.
|
|
@@ -40,6 +60,17 @@ export interface PresetCompileResult {
|
|
|
40
60
|
export interface AdvancedCompileResult {
|
|
41
61
|
providers: WorkflowDispatchCeiling['providers'] & object;
|
|
42
62
|
}
|
|
63
|
+
export type DispatchPolicyCompileResult = {
|
|
64
|
+
mode: 'managed';
|
|
65
|
+
policy: CappedManagedDispatchPolicy;
|
|
66
|
+
providers: {
|
|
67
|
+
codex: WorkflowCodexDispatchCeiling;
|
|
68
|
+
claude: DispatchPolicyClaudeValue;
|
|
69
|
+
};
|
|
70
|
+
} | {
|
|
71
|
+
mode: 'managed';
|
|
72
|
+
policy: 'uncapped';
|
|
73
|
+
};
|
|
43
74
|
/**
|
|
44
75
|
* Compile a preset label into concrete per-provider values.
|
|
45
76
|
* The returned `preset` field is provenance only; runtime dispatch reads
|
|
@@ -51,4 +82,9 @@ export declare function compileDispatchCeilingPreset(preset: WorkflowDispatchCei
|
|
|
51
82
|
* Advanced selections do not set a preset so the persisted shape omits it.
|
|
52
83
|
*/
|
|
53
84
|
export declare function compileAdvancedDispatchCeiling(providers: WorkflowDispatchCeiling['providers'] & object): AdvancedCompileResult;
|
|
85
|
+
/**
|
|
86
|
+
* Compile the managed dispatch-policy ladder into concrete provider caps.
|
|
87
|
+
* `uncapped` is intentionally explicit but has no provider caps.
|
|
88
|
+
*/
|
|
89
|
+
export declare function compileDispatchPolicyPreset(policy: WorkflowManagedDispatchPolicy): DispatchPolicyCompileResult;
|
|
54
90
|
//# sourceMappingURL=dispatch-ceiling-preset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch-ceiling-preset.d.ts","sourceRoot":"","sources":["../../src/config/dispatch-ceiling-preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,4BAA4B,EAC5B,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,cAAc,CAAC;AAEtB;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;CAOpC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,6BAA6B,CAAC;IACtC,SAAS,EAAE;QACT,KAAK,EAAE,4BAA4B,CAAC;QACpC,MAAM,EAAE,6BAA6B,CAAC;KACvC,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,uBAAuB,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC;CAC1D;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,6BAA6B,GACpC,mBAAmB,CAKrB;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,uBAAuB,CAAC,WAAW,CAAC,GAAG,MAAM,GACvD,qBAAqB,CAEvB"}
|
|
1
|
+
{"version":3,"file":"dispatch-ceiling-preset.d.ts","sourceRoot":"","sources":["../../src/config/dispatch-ceiling-preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA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ING_PRESETS = {
|
|
|
12
12
|
maximum: { codex: 'xhigh', claude: 'opus' },
|
|
13
13
|
'cost-conscious': { codex: 'medium', claude: 'sonnet' },
|
|
14
14
|
};
|
|
15
|
+
export const DISPATCH_POLICY_PRESETS = {
|
|
16
|
+
economy: { codex: 'medium', claude: 'sonnet' },
|
|
17
|
+
balanced: { codex: 'high', claude: 'sonnet' },
|
|
18
|
+
high: { codex: 'xhigh', claude: 'opus' },
|
|
19
|
+
frontier: { codex: 'xhigh', claude: 'fable' },
|
|
20
|
+
};
|
|
15
21
|
/**
|
|
16
22
|
* Compile a preset label into concrete per-provider values.
|
|
17
23
|
* The returned `preset` field is provenance only; runtime dispatch reads
|
|
@@ -30,3 +36,17 @@ export function compileDispatchCeilingPreset(preset) {
|
|
|
30
36
|
export function compileAdvancedDispatchCeiling(providers) {
|
|
31
37
|
return { providers };
|
|
32
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Compile the managed dispatch-policy ladder into concrete provider caps.
|
|
41
|
+
* `uncapped` is intentionally explicit but has no provider caps.
|
|
42
|
+
*/
|
|
43
|
+
export function compileDispatchPolicyPreset(policy) {
|
|
44
|
+
if (policy === 'uncapped') {
|
|
45
|
+
return { mode: 'managed', policy };
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
mode: 'managed',
|
|
49
|
+
policy,
|
|
50
|
+
providers: { ...DISPATCH_POLICY_PRESETS[policy] },
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -21,16 +21,30 @@ export type WorkflowPostImplementSequence = 'wait' | 'summary' | 'pr' | 'docs-pr
|
|
|
21
21
|
export type WorkflowReviewExecutionModel = 'subagent' | 'inline' | 'fresh-session';
|
|
22
22
|
export type WorkflowDesignMode = 'collaborative' | 'selective' | 'draft';
|
|
23
23
|
export type WorkflowCodexDispatchCeiling = 'low' | 'medium' | 'high' | 'xhigh';
|
|
24
|
-
export type WorkflowClaudeDispatchCeiling = 'haiku' | 'sonnet' | 'opus';
|
|
24
|
+
export type WorkflowClaudeDispatchCeiling = 'haiku' | 'sonnet' | 'opus' | 'fable';
|
|
25
25
|
export type WorkflowDispatchCeilingPreset = 'balanced' | 'maximum' | 'cost-conscious';
|
|
26
|
+
export type WorkflowDispatchPolicyMode = 'managed' | 'inherit';
|
|
27
|
+
export type WorkflowManagedDispatchPolicy = 'economy' | 'balanced' | 'high' | 'frontier' | 'uncapped';
|
|
28
|
+
export type WorkflowDispatchMatrixTier = Exclude<WorkflowManagedDispatchPolicy, 'uncapped'>;
|
|
29
|
+
export interface WorkflowDispatchRouteTarget {
|
|
30
|
+
harness?: string;
|
|
31
|
+
model?: string;
|
|
32
|
+
effort?: string;
|
|
33
|
+
}
|
|
34
|
+
export type WorkflowDispatchRouteEntry = string | WorkflowDispatchRouteTarget;
|
|
35
|
+
export type WorkflowDispatchRoute = WorkflowDispatchRouteEntry[];
|
|
36
|
+
export type WorkflowDispatchMatrixCell = string | WorkflowDispatchRoute;
|
|
37
|
+
export type WorkflowDispatchProviderValue = string | Partial<Record<WorkflowDispatchMatrixTier, WorkflowDispatchMatrixCell>>;
|
|
26
38
|
export type GateOnFailure = 'block' | 'prompt' | 'warn';
|
|
27
|
-
export type GateAvoid = 'same-runtime' | 'none';
|
|
39
|
+
export type GateAvoid = 'same-family' | 'same-runtime' | 'none';
|
|
28
40
|
export interface WorkflowDispatchCeiling {
|
|
29
41
|
preset?: WorkflowDispatchCeilingPreset;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
recommendationVersion?: string;
|
|
43
|
+
providers?: Record<string, WorkflowDispatchProviderValue>;
|
|
44
|
+
}
|
|
45
|
+
export interface WorkflowDispatchPolicy {
|
|
46
|
+
mode: WorkflowDispatchPolicyMode;
|
|
47
|
+
policy?: WorkflowManagedDispatchPolicy;
|
|
34
48
|
}
|
|
35
49
|
export interface WorkflowAutoArtifactReview {
|
|
36
50
|
plan?: boolean;
|
|
@@ -45,6 +59,7 @@ export interface GateConfig {
|
|
|
45
59
|
export interface ExecTarget {
|
|
46
60
|
runtime: string;
|
|
47
61
|
baseCommand: string[];
|
|
62
|
+
models?: string[];
|
|
48
63
|
hostDetectionCommand?: string[];
|
|
49
64
|
availabilityCommand?: string[];
|
|
50
65
|
priority: number;
|
|
@@ -64,12 +79,16 @@ export interface OatWorkflowConfig {
|
|
|
64
79
|
autoNarrowReReviewScope?: boolean;
|
|
65
80
|
autoArtifactReview?: WorkflowAutoArtifactReview;
|
|
66
81
|
designMode?: WorkflowDesignMode;
|
|
82
|
+
dispatchPolicy?: WorkflowDispatchPolicy;
|
|
67
83
|
dispatchCeiling?: WorkflowDispatchCeiling;
|
|
68
84
|
gates?: WorkflowGatesConfig;
|
|
69
85
|
}
|
|
70
86
|
export declare const VALID_CODEX_DISPATCH_CEILINGS: readonly WorkflowCodexDispatchCeiling[];
|
|
71
87
|
export declare const VALID_CLAUDE_DISPATCH_CEILINGS: readonly WorkflowClaudeDispatchCeiling[];
|
|
72
88
|
export declare const VALID_DISPATCH_CEILING_PRESETS: readonly WorkflowDispatchCeilingPreset[];
|
|
89
|
+
export declare const VALID_DISPATCH_POLICY_MODES: readonly WorkflowDispatchPolicyMode[];
|
|
90
|
+
export declare const VALID_MANAGED_DISPATCH_POLICIES: readonly WorkflowManagedDispatchPolicy[];
|
|
91
|
+
export declare const VALID_DISPATCH_MATRIX_TIERS: readonly WorkflowDispatchMatrixTier[];
|
|
73
92
|
export declare const BUILTIN_EXEC_TARGETS: Readonly<Record<string, ExecTarget>>;
|
|
74
93
|
export type OatToolsConfig = Partial<Record<'core' | 'ideas' | 'docs' | 'workflows' | 'utility' | 'project-management' | 'research' | 'brainstorm', boolean>>;
|
|
75
94
|
export interface OatConfig {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oat-config.d.ts","sourceRoot":"","sources":["../../src/config/oat-config.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;I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8 +17,11 @@ const VALID_DESIGN_MODES = [
|
|
|
17
17
|
'draft',
|
|
18
18
|
];
|
|
19
19
|
export const VALID_CODEX_DISPATCH_CEILINGS = ['low', 'medium', 'high', 'xhigh'];
|
|
20
|
-
export const VALID_CLAUDE_DISPATCH_CEILINGS = ['haiku', 'sonnet', 'opus'];
|
|
20
|
+
export const VALID_CLAUDE_DISPATCH_CEILINGS = ['haiku', 'sonnet', 'opus', 'fable'];
|
|
21
21
|
export const VALID_DISPATCH_CEILING_PRESETS = ['balanced', 'maximum', 'cost-conscious'];
|
|
22
|
+
export const VALID_DISPATCH_POLICY_MODES = ['managed', 'inherit'];
|
|
23
|
+
export const VALID_MANAGED_DISPATCH_POLICIES = ['economy', 'balanced', 'high', 'frontier', 'uncapped'];
|
|
24
|
+
export const VALID_DISPATCH_MATRIX_TIERS = ['economy', 'balanced', 'high', 'frontier'];
|
|
22
25
|
const VALID_GATE_ON_FAILURES = [
|
|
23
26
|
'block',
|
|
24
27
|
'prompt',
|
|
@@ -47,7 +50,11 @@ export const BUILTIN_EXEC_TARGETS = {
|
|
|
47
50
|
runtime: 'cursor',
|
|
48
51
|
baseCommand: ['cursor-agent', '-p'],
|
|
49
52
|
hostDetectionCommand: ['sh', '-c', 'test -n "$CURSOR_AGENT"'],
|
|
50
|
-
availabilityCommand: [
|
|
53
|
+
availabilityCommand: [
|
|
54
|
+
'sh',
|
|
55
|
+
'-c',
|
|
56
|
+
'command -v cursor-agent || command -v agent',
|
|
57
|
+
],
|
|
51
58
|
priority: 70,
|
|
52
59
|
},
|
|
53
60
|
};
|
|
@@ -70,6 +77,14 @@ function normalizeArgv(value) {
|
|
|
70
77
|
}
|
|
71
78
|
return [...value];
|
|
72
79
|
}
|
|
80
|
+
function normalizeStringList(value) {
|
|
81
|
+
if (!Array.isArray(value) ||
|
|
82
|
+
value.length === 0 ||
|
|
83
|
+
!value.every((item) => typeof item === 'string' && item.trim().length > 0)) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
return value.map((item) => item.trim());
|
|
87
|
+
}
|
|
73
88
|
function normalizeGateConfig(value) {
|
|
74
89
|
if (value === null) {
|
|
75
90
|
return null;
|
|
@@ -94,6 +109,82 @@ function normalizeGateConfig(value) {
|
|
|
94
109
|
}
|
|
95
110
|
return gate;
|
|
96
111
|
}
|
|
112
|
+
function normalizeProviderBareValue(providerKey, value) {
|
|
113
|
+
const trimmed = trimNonEmptyString(value);
|
|
114
|
+
if (trimmed === undefined) {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
if (providerKey === 'codex' &&
|
|
118
|
+
!VALID_CODEX_DISPATCH_CEILINGS.includes(trimmed)) {
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
if (providerKey === 'claude' &&
|
|
122
|
+
!VALID_CLAUDE_DISPATCH_CEILINGS.includes(trimmed)) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
return trimmed;
|
|
126
|
+
}
|
|
127
|
+
function normalizeDispatchRouteTarget(value) {
|
|
128
|
+
if (!isRecord(value)) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
const target = {};
|
|
132
|
+
const harness = trimNonEmptyString(value.harness);
|
|
133
|
+
if (harness !== undefined) {
|
|
134
|
+
target.harness = harness;
|
|
135
|
+
}
|
|
136
|
+
const model = trimNonEmptyString(value.model);
|
|
137
|
+
if (model !== undefined) {
|
|
138
|
+
target.model = model;
|
|
139
|
+
}
|
|
140
|
+
const effort = trimNonEmptyString(value.effort);
|
|
141
|
+
if (effort !== undefined) {
|
|
142
|
+
target.effort = effort;
|
|
143
|
+
}
|
|
144
|
+
return Object.keys(target).length > 0 ? target : undefined;
|
|
145
|
+
}
|
|
146
|
+
function normalizeDispatchMatrixCell(providerKey, value) {
|
|
147
|
+
const bareValue = normalizeProviderBareValue(providerKey, value);
|
|
148
|
+
if (bareValue !== undefined) {
|
|
149
|
+
return bareValue;
|
|
150
|
+
}
|
|
151
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
const route = [];
|
|
155
|
+
for (const entry of value) {
|
|
156
|
+
const bareEntry = normalizeProviderBareValue(providerKey, entry);
|
|
157
|
+
if (bareEntry !== undefined) {
|
|
158
|
+
route.push(bareEntry);
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
const target = normalizeDispatchRouteTarget(entry);
|
|
162
|
+
if (target !== undefined) {
|
|
163
|
+
route.push(target);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return route.length > 0 ? route : undefined;
|
|
167
|
+
}
|
|
168
|
+
function normalizeDispatchProviderValue(providerKey, value) {
|
|
169
|
+
const bareValue = normalizeProviderBareValue(providerKey, value);
|
|
170
|
+
if (bareValue !== undefined) {
|
|
171
|
+
return bareValue;
|
|
172
|
+
}
|
|
173
|
+
if (!isRecord(value)) {
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
const tierMap = {};
|
|
177
|
+
for (const [tier, rawCell] of Object.entries(value)) {
|
|
178
|
+
if (!VALID_DISPATCH_MATRIX_TIERS.includes(tier)) {
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
const normalized = normalizeDispatchMatrixCell(providerKey, rawCell);
|
|
182
|
+
if (normalized !== undefined) {
|
|
183
|
+
tierMap[tier] = normalized;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return Object.keys(tierMap).length > 0 ? tierMap : undefined;
|
|
187
|
+
}
|
|
97
188
|
function normalizeExecTarget(value) {
|
|
98
189
|
if (value === null) {
|
|
99
190
|
return null;
|
|
@@ -110,6 +201,10 @@ function normalizeExecTarget(value) {
|
|
|
110
201
|
if (baseCommand !== undefined) {
|
|
111
202
|
target.baseCommand = baseCommand;
|
|
112
203
|
}
|
|
204
|
+
const models = normalizeStringList(value.models);
|
|
205
|
+
if (models !== undefined) {
|
|
206
|
+
target.models = models;
|
|
207
|
+
}
|
|
113
208
|
if ('priority' in value) {
|
|
114
209
|
if (typeof value.priority === 'number' && Number.isFinite(value.priority)) {
|
|
115
210
|
target.priority = value.priority;
|
|
@@ -189,6 +284,23 @@ function normalizeWorkflowConfig(parsed) {
|
|
|
189
284
|
VALID_DESIGN_MODES.includes(parsed.designMode)) {
|
|
190
285
|
next.designMode = parsed.designMode;
|
|
191
286
|
}
|
|
287
|
+
if (isRecord(parsed.dispatchPolicy)) {
|
|
288
|
+
const mode = typeof parsed.dispatchPolicy.mode === 'string' &&
|
|
289
|
+
VALID_DISPATCH_POLICY_MODES.includes(parsed.dispatchPolicy.mode)
|
|
290
|
+
? parsed.dispatchPolicy.mode
|
|
291
|
+
: undefined;
|
|
292
|
+
if (mode === 'inherit') {
|
|
293
|
+
next.dispatchPolicy = { mode };
|
|
294
|
+
}
|
|
295
|
+
if (mode === 'managed' &&
|
|
296
|
+
typeof parsed.dispatchPolicy.policy === 'string' &&
|
|
297
|
+
VALID_MANAGED_DISPATCH_POLICIES.includes(parsed.dispatchPolicy.policy)) {
|
|
298
|
+
next.dispatchPolicy = {
|
|
299
|
+
mode,
|
|
300
|
+
policy: parsed.dispatchPolicy.policy,
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
}
|
|
192
304
|
if (isRecord(parsed.dispatchCeiling)) {
|
|
193
305
|
const dispatchCeiling = {};
|
|
194
306
|
if (typeof parsed.dispatchCeiling.preset === 'string' &&
|
|
@@ -196,17 +308,17 @@ function normalizeWorkflowConfig(parsed) {
|
|
|
196
308
|
dispatchCeiling.preset = parsed.dispatchCeiling
|
|
197
309
|
.preset;
|
|
198
310
|
}
|
|
311
|
+
const recommendationVersion = trimNonEmptyString(parsed.dispatchCeiling.recommendationVersion);
|
|
312
|
+
if (recommendationVersion !== undefined) {
|
|
313
|
+
dispatchCeiling.recommendationVersion = recommendationVersion;
|
|
314
|
+
}
|
|
199
315
|
if (isRecord(parsed.dispatchCeiling.providers)) {
|
|
200
316
|
const providers = {};
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
if (typeof parsed.dispatchCeiling.providers.claude === 'string' &&
|
|
207
|
-
VALID_CLAUDE_DISPATCH_CEILINGS.includes(parsed.dispatchCeiling.providers.claude)) {
|
|
208
|
-
providers.claude = parsed.dispatchCeiling.providers
|
|
209
|
-
.claude;
|
|
317
|
+
for (const [providerKey, rawProviderValue] of Object.entries(parsed.dispatchCeiling.providers)) {
|
|
318
|
+
const normalized = normalizeDispatchProviderValue(providerKey, rawProviderValue);
|
|
319
|
+
if (normalized !== undefined) {
|
|
320
|
+
providers[providerKey] = normalized;
|
|
321
|
+
}
|
|
210
322
|
}
|
|
211
323
|
if (Object.keys(providers).length > 0) {
|
|
212
324
|
dispatchCeiling.providers = providers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,oBAAoB,GAC5B,QAAQ,GACR,OAAO,GACP,MAAM,GACN,KAAK,GACL,SAAS,CAAC;AAEd,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,kCAAkC;IACjD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,kBAAkB,EAAE,CAAC,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,SAAS,EAAE,MAAM,GAChB,UAAU,GAAG,IAAI,CAcnB;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,cAAc,GACxB,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAY5B"}
|
package/dist/config/resolve.js
CHANGED
|
@@ -64,6 +64,10 @@ const DEFAULT_WORKFLOW_CONFIG = {
|
|
|
64
64
|
claude: null,
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
|
+
dispatchPolicy: {
|
|
68
|
+
mode: null,
|
|
69
|
+
policy: null,
|
|
70
|
+
},
|
|
67
71
|
},
|
|
68
72
|
};
|
|
69
73
|
const ENV_OVERRIDE_MAP = {
|
|
@@ -177,6 +181,7 @@ function mergeExecTargetLayer(targets, layer) {
|
|
|
177
181
|
targets[id] = cloneExecTarget({
|
|
178
182
|
runtime: override.runtime ?? existing.runtime,
|
|
179
183
|
baseCommand: override.baseCommand ?? existing.baseCommand,
|
|
184
|
+
models: override.models ?? existing.models,
|
|
180
185
|
hostDetectionCommand: override.hostDetectionCommand ?? existing.hostDetectionCommand,
|
|
181
186
|
availabilityCommand: override.availabilityCommand ?? existing.availabilityCommand,
|
|
182
187
|
priority: override.priority ?? existing.priority,
|
|
@@ -207,6 +212,9 @@ function cloneExecTarget(target) {
|
|
|
207
212
|
if (target.availabilityCommand) {
|
|
208
213
|
next.availabilityCommand = [...target.availabilityCommand];
|
|
209
214
|
}
|
|
215
|
+
if (target.models) {
|
|
216
|
+
next.models = [...target.models];
|
|
217
|
+
}
|
|
210
218
|
return next;
|
|
211
219
|
}
|
|
212
220
|
function toCompleteExecTarget(target) {
|
|
@@ -227,8 +235,16 @@ function toCompleteExecTarget(target) {
|
|
|
227
235
|
if (isValidArgv(target.availabilityCommand)) {
|
|
228
236
|
completeTarget.availabilityCommand = [...target.availabilityCommand];
|
|
229
237
|
}
|
|
238
|
+
if (isValidStringList(target.models)) {
|
|
239
|
+
completeTarget.models = target.models.map((model) => model.trim());
|
|
240
|
+
}
|
|
230
241
|
return completeTarget;
|
|
231
242
|
}
|
|
243
|
+
function isValidStringList(value) {
|
|
244
|
+
return (Array.isArray(value) &&
|
|
245
|
+
value.length > 0 &&
|
|
246
|
+
value.every((part) => typeof part === 'string' && part.trim().length > 0));
|
|
247
|
+
}
|
|
232
248
|
function isValidArgv(value) {
|
|
233
249
|
if (!Array.isArray(value) ||
|
|
234
250
|
value.length === 0 ||
|
|
@@ -9,36 +9,36 @@ export declare const ManifestEntrySchema: z.ZodEffects<z.ZodObject<{
|
|
|
9
9
|
isFile: z.ZodDefault<z.ZodBoolean>;
|
|
10
10
|
lastSynced: z.ZodString;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
provider: string;
|
|
12
13
|
canonicalPath: string;
|
|
13
14
|
providerPath: string;
|
|
14
|
-
provider: string;
|
|
15
15
|
contentType: "skill" | "agent" | "rule";
|
|
16
16
|
strategy: "symlink" | "copy";
|
|
17
17
|
contentHash: string | null;
|
|
18
18
|
isFile: boolean;
|
|
19
19
|
lastSynced: string;
|
|
20
20
|
}, {
|
|
21
|
+
provider: string;
|
|
21
22
|
canonicalPath: string;
|
|
22
23
|
providerPath: string;
|
|
23
|
-
provider: string;
|
|
24
24
|
contentType: "skill" | "agent" | "rule";
|
|
25
25
|
strategy: "symlink" | "copy";
|
|
26
26
|
contentHash: string | null;
|
|
27
27
|
lastSynced: string;
|
|
28
28
|
isFile?: boolean | undefined;
|
|
29
29
|
}>, {
|
|
30
|
+
provider: string;
|
|
30
31
|
canonicalPath: string;
|
|
31
32
|
providerPath: string;
|
|
32
|
-
provider: string;
|
|
33
33
|
contentType: "skill" | "agent" | "rule";
|
|
34
34
|
strategy: "symlink" | "copy";
|
|
35
35
|
contentHash: string | null;
|
|
36
36
|
isFile: boolean;
|
|
37
37
|
lastSynced: string;
|
|
38
38
|
}, {
|
|
39
|
+
provider: string;
|
|
39
40
|
canonicalPath: string;
|
|
40
41
|
providerPath: string;
|
|
41
|
-
provider: string;
|
|
42
42
|
contentType: "skill" | "agent" | "rule";
|
|
43
43
|
strategy: "symlink" | "copy";
|
|
44
44
|
contentHash: string | null;
|
|
@@ -58,36 +58,36 @@ export declare const ManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
58
58
|
isFile: z.ZodDefault<z.ZodBoolean>;
|
|
59
59
|
lastSynced: z.ZodString;
|
|
60
60
|
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
provider: string;
|
|
61
62
|
canonicalPath: string;
|
|
62
63
|
providerPath: string;
|
|
63
|
-
provider: string;
|
|
64
64
|
contentType: "skill" | "agent" | "rule";
|
|
65
65
|
strategy: "symlink" | "copy";
|
|
66
66
|
contentHash: string | null;
|
|
67
67
|
isFile: boolean;
|
|
68
68
|
lastSynced: string;
|
|
69
69
|
}, {
|
|
70
|
+
provider: string;
|
|
70
71
|
canonicalPath: string;
|
|
71
72
|
providerPath: string;
|
|
72
|
-
provider: string;
|
|
73
73
|
contentType: "skill" | "agent" | "rule";
|
|
74
74
|
strategy: "symlink" | "copy";
|
|
75
75
|
contentHash: string | null;
|
|
76
76
|
lastSynced: string;
|
|
77
77
|
isFile?: boolean | undefined;
|
|
78
78
|
}>, {
|
|
79
|
+
provider: string;
|
|
79
80
|
canonicalPath: string;
|
|
80
81
|
providerPath: string;
|
|
81
|
-
provider: string;
|
|
82
82
|
contentType: "skill" | "agent" | "rule";
|
|
83
83
|
strategy: "symlink" | "copy";
|
|
84
84
|
contentHash: string | null;
|
|
85
85
|
isFile: boolean;
|
|
86
86
|
lastSynced: string;
|
|
87
87
|
}, {
|
|
88
|
+
provider: string;
|
|
88
89
|
canonicalPath: string;
|
|
89
90
|
providerPath: string;
|
|
90
|
-
provider: string;
|
|
91
91
|
contentType: "skill" | "agent" | "rule";
|
|
92
92
|
strategy: "symlink" | "copy";
|
|
93
93
|
contentHash: string | null;
|
|
@@ -97,9 +97,9 @@ export declare const ManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
97
97
|
lastUpdated: z.ZodString;
|
|
98
98
|
}, "strip", z.ZodTypeAny, {
|
|
99
99
|
entries: {
|
|
100
|
+
provider: string;
|
|
100
101
|
canonicalPath: string;
|
|
101
102
|
providerPath: string;
|
|
102
|
-
provider: string;
|
|
103
103
|
contentType: "skill" | "agent" | "rule";
|
|
104
104
|
strategy: "symlink" | "copy";
|
|
105
105
|
contentHash: string | null;
|
|
@@ -111,9 +111,9 @@ export declare const ManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
111
111
|
lastUpdated: string;
|
|
112
112
|
}, {
|
|
113
113
|
entries: {
|
|
114
|
+
provider: string;
|
|
114
115
|
canonicalPath: string;
|
|
115
116
|
providerPath: string;
|
|
116
|
-
provider: string;
|
|
117
117
|
contentType: "skill" | "agent" | "rule";
|
|
118
118
|
strategy: "symlink" | "copy";
|
|
119
119
|
contentHash: string | null;
|
|
@@ -125,9 +125,9 @@ export declare const ManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
125
125
|
lastUpdated: string;
|
|
126
126
|
}>, {
|
|
127
127
|
entries: {
|
|
128
|
+
provider: string;
|
|
128
129
|
canonicalPath: string;
|
|
129
130
|
providerPath: string;
|
|
130
|
-
provider: string;
|
|
131
131
|
contentType: "skill" | "agent" | "rule";
|
|
132
132
|
strategy: "symlink" | "copy";
|
|
133
133
|
contentHash: string | null;
|
|
@@ -139,9 +139,9 @@ export declare const ManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
139
139
|
lastUpdated: string;
|
|
140
140
|
}, {
|
|
141
141
|
entries: {
|
|
142
|
+
provider: string;
|
|
142
143
|
canonicalPath: string;
|
|
143
144
|
providerPath: string;
|
|
144
|
-
provider: string;
|
|
145
145
|
contentType: "skill" | "agent" | "rule";
|
|
146
146
|
strategy: "symlink" | "copy";
|
|
147
147
|
contentHash: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/providers/ceiling/registry.ts"],"names":[],"mappings":"AAKA;;;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CAAA;CAAE,GACjB,IAAI,CAAC;AAET,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,oBAAoB,CAAC;IAChC;;;OAGG;IACH,qBAAqB,CACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,qBAAqB,GACzB,mBAAmB,CAAC;IACvB;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,qBAAqB,GAAG,OAAO,CAAC;CACtE;AAMD,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAK9C,CAAC;AA2FF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,sBAAsB,CAE1E"}
|
|
@@ -3,7 +3,12 @@ import { VALID_CLAUDE_DISPATCH_CEILINGS, VALID_CODEX_DISPATCH_CEILINGS, } from '
|
|
|
3
3
|
const CODEX_IMPLEMENTER_ROLE = 'oat-phase-implementer';
|
|
4
4
|
const CODEX_REVIEWER_ROLE = 'oat-reviewer';
|
|
5
5
|
/** Claude tier order, low → high, for above-orchestrator comparison. */
|
|
6
|
-
export const CLAUDE_TIER_ORDER = [
|
|
6
|
+
export const CLAUDE_TIER_ORDER = [
|
|
7
|
+
'haiku',
|
|
8
|
+
'sonnet',
|
|
9
|
+
'opus',
|
|
10
|
+
'fable',
|
|
11
|
+
];
|
|
7
12
|
const codexAdapter = {
|
|
8
13
|
provider: 'codex',
|
|
9
14
|
supportsCeiling: true,
|
|
@@ -49,6 +54,21 @@ const claudeAdapter = {
|
|
|
49
54
|
return isAboveOrchestrator(value, ctx.orchestratorTier);
|
|
50
55
|
},
|
|
51
56
|
};
|
|
57
|
+
const cursorAdapter = {
|
|
58
|
+
provider: 'cursor',
|
|
59
|
+
supportsCeiling: true,
|
|
60
|
+
validValues: [],
|
|
61
|
+
mechanism: 'model-arg',
|
|
62
|
+
compileToDispatchArgs(value) {
|
|
63
|
+
const model = value.trim();
|
|
64
|
+
return model ? { model } : null;
|
|
65
|
+
},
|
|
66
|
+
// Cursor model slugs do not share a total order, so upgrade verification is
|
|
67
|
+
// not meaningful here; availability is checked by the identity oracle layer.
|
|
68
|
+
verifyOnDispatch() {
|
|
69
|
+
return false;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
52
72
|
function advisoryAdapter(provider) {
|
|
53
73
|
return {
|
|
54
74
|
provider,
|
|
@@ -66,6 +86,7 @@ function advisoryAdapter(provider) {
|
|
|
66
86
|
const REGISTERED_ADAPTERS = {
|
|
67
87
|
codex: codexAdapter,
|
|
68
88
|
claude: claudeAdapter,
|
|
89
|
+
cursor: cursorAdapter,
|
|
69
90
|
};
|
|
70
91
|
/**
|
|
71
92
|
* Look up the ceiling adapter for a provider. Unknown providers fall back to an
|
|
@@ -58,7 +58,7 @@ function codexEffortVariantDescription(baseRoleName, effort) {
|
|
|
58
58
|
if (effort === 'high') {
|
|
59
59
|
return `OAT ${roleLabel} pinned to high reasoning effort for broad, subtle, or higher-risk implementation, fix, or review phases.`;
|
|
60
60
|
}
|
|
61
|
-
return `OAT ${roleLabel} pinned to xhigh reasoning effort for the highest configured Codex dispatch
|
|
61
|
+
return `OAT ${roleLabel} pinned to xhigh reasoning effort for the highest configured Codex dispatch policy cap.`;
|
|
62
62
|
}
|
|
63
63
|
function codexEffortVariantsFromBase(exported) {
|
|
64
64
|
if (!CODEX_EFFORT_VARIANT_BASE_ROLES.has(exported.roleName)) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type MatrixCellAvailability = 'valid' | 'unknown-value' | 'unvalidated';
|
|
2
|
+
export interface CursorAgentRunOptions {
|
|
3
|
+
cwd: string;
|
|
4
|
+
env: NodeJS.ProcessEnv;
|
|
5
|
+
}
|
|
6
|
+
export interface CursorAgentRunResult {
|
|
7
|
+
ok: boolean;
|
|
8
|
+
stdout: string;
|
|
9
|
+
stderr: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AvailabilityOracleDependencies {
|
|
12
|
+
pathExists: (path: string) => Promise<boolean>;
|
|
13
|
+
runCursorAgent: (args: string[], options: CursorAgentRunOptions) => Promise<CursorAgentRunResult>;
|
|
14
|
+
env?: NodeJS.ProcessEnv;
|
|
15
|
+
}
|
|
16
|
+
export interface ValidateMatrixCellOptions {
|
|
17
|
+
cwd: string;
|
|
18
|
+
env?: NodeJS.ProcessEnv;
|
|
19
|
+
dependencies?: Partial<AvailabilityOracleDependencies>;
|
|
20
|
+
}
|
|
21
|
+
export declare function validateMatrixCell(provider: string, value: string, options: ValidateMatrixCellOptions): Promise<MatrixCellAvailability>;
|
|
22
|
+
//# sourceMappingURL=availability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../../src/providers/identity/availability.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,eAAe,GAAG,aAAa,CAAC;AAE/E,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,8BAA8B;IAC7C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,cAAc,EAAE,CACd,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,qBAAqB,KAC3B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;CACxD;AAwID,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,sBAAsB,CAAC,CA8BjC"}
|