@open-agent-toolkit/cli 0.1.43 → 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.
Files changed (47) hide show
  1. package/assets/config/dispatch-matrix-recommendation.json +23 -0
  2. package/assets/docs/cli-utilities/configuration.md +59 -20
  3. package/assets/docs/cli-utilities/workflow-gates.md +79 -16
  4. package/assets/docs/contributing/code.md +10 -4
  5. package/assets/docs/contributing/hooks-and-safety.md +23 -0
  6. package/assets/docs/workflows/projects/dispatch-ceiling.md +80 -10
  7. package/assets/public-package-versions.json +4 -4
  8. package/assets/skills/oat-project-implement/SKILL.md +53 -11
  9. package/assets/skills/oat-project-plan/SKILL.md +22 -3
  10. package/assets/skills/oat-project-quick-start/SKILL.md +22 -3
  11. package/assets/templates/state.md +5 -0
  12. package/dist/commands/config/index.d.ts +6 -0
  13. package/dist/commands/config/index.d.ts.map +1 -1
  14. package/dist/commands/config/index.js +366 -8
  15. package/dist/commands/doctor/index.d.ts +6 -1
  16. package/dist/commands/doctor/index.d.ts.map +1 -1
  17. package/dist/commands/doctor/index.js +138 -4
  18. package/dist/commands/gate/index.d.ts +39 -2
  19. package/dist/commands/gate/index.d.ts.map +1 -1
  20. package/dist/commands/gate/index.js +343 -30
  21. package/dist/commands/internal/cursor-current-target.d.ts +37 -0
  22. package/dist/commands/internal/cursor-current-target.d.ts.map +1 -0
  23. package/dist/commands/internal/cursor-current-target.js +228 -0
  24. package/dist/commands/internal/index.d.ts.map +1 -1
  25. package/dist/commands/internal/index.js +2 -0
  26. package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
  27. package/dist/commands/project/dispatch-ceiling/index.js +359 -16
  28. package/dist/config/oat-config.d.ts +15 -5
  29. package/dist/config/oat-config.d.ts.map +1 -1
  30. package/dist/config/oat-config.js +103 -10
  31. package/dist/config/resolve.js +12 -0
  32. package/dist/manifest/manifest.types.d.ts +12 -12
  33. package/dist/providers/ceiling/registry.d.ts.map +1 -1
  34. package/dist/providers/ceiling/registry.js +16 -0
  35. package/dist/providers/identity/availability.d.ts +22 -0
  36. package/dist/providers/identity/availability.d.ts.map +1 -0
  37. package/dist/providers/identity/availability.js +119 -0
  38. package/dist/providers/identity/family.d.ts +13 -0
  39. package/dist/providers/identity/family.d.ts.map +1 -0
  40. package/dist/providers/identity/family.js +32 -0
  41. package/dist/providers/identity/provenance.d.ts +21 -0
  42. package/dist/providers/identity/provenance.d.ts.map +1 -0
  43. package/dist/providers/identity/provenance.js +65 -0
  44. package/dist/providers/identity/stamp.d.ts +35 -0
  45. package/dist/providers/identity/stamp.d.ts.map +1 -0
  46. package/dist/providers/identity/stamp.js +171 -0
  47. package/package.json +2 -2
@@ -4,11 +4,12 @@ import { buildCommandContext, } from '../../../app/command-context.js';
4
4
  import { getFrontmatterBlock } from '../../shared/frontmatter.js';
5
5
  import { readGlobalOptions } from '../../shared/shared.utils.js';
6
6
  import { compileDispatchPolicyPreset, } from '../../../config/dispatch-ceiling-preset.js';
7
- import { resolveActiveProject, VALID_CLAUDE_DISPATCH_CEILINGS, VALID_CODEX_DISPATCH_CEILINGS, VALID_MANAGED_DISPATCH_POLICIES, } from '../../../config/oat-config.js';
7
+ import { resolveActiveProject, VALID_CLAUDE_DISPATCH_CEILINGS, VALID_CODEX_DISPATCH_CEILINGS, VALID_DISPATCH_MATRIX_TIERS, VALID_MANAGED_DISPATCH_POLICIES, } from '../../../config/oat-config.js';
8
8
  import { resolveEffectiveConfig, } from '../../../config/resolve.js';
9
9
  import { resolveProjectRoot } from '../../../fs/paths.js';
10
10
  import TOML from '@iarna/toml';
11
11
  import { getCeilingAdapter, } from '../../../providers/ceiling/registry.js';
12
+ import { classifyModelFamily, } from '../../../providers/identity/family.js';
12
13
  import { Command } from 'commander';
13
14
  import YAML from 'yaml';
14
15
  const CODEX_VALUES = [
@@ -54,7 +55,7 @@ function isValidProviderValue(provider, value) {
54
55
  return (typeof value === 'string' &&
55
56
  CLAUDE_VALUES.includes(value));
56
57
  }
57
- return false;
58
+ return typeof value === 'string' && value.trim().length > 0;
58
59
  }
59
60
  function configSourceToCeilingSource(source) {
60
61
  if (source === 'local') {
@@ -121,6 +122,222 @@ function invalidProjectPolicyMessage(value) {
121
122
  const actual = typeof value === 'string' ? value : String(value);
122
123
  return `Invalid project dispatch policy "${actual}". Valid managed policies: ${validManagedPolicyList()}. Use mode "inherit" for host defaults.`;
123
124
  }
125
+ function normalizeProjectMatrixBareValue(provider, value) {
126
+ if (typeof value !== 'string') {
127
+ return undefined;
128
+ }
129
+ const trimmed = value.trim();
130
+ if (!trimmed) {
131
+ return undefined;
132
+ }
133
+ const order = providerValueOrder(provider);
134
+ if (order && !isValidProviderValue(provider, trimmed)) {
135
+ return undefined;
136
+ }
137
+ return trimmed;
138
+ }
139
+ function normalizeProjectMatrixRouteTarget(value) {
140
+ if (!value || typeof value !== 'object' || Array.isArray(value)) {
141
+ return undefined;
142
+ }
143
+ const record = value;
144
+ const target = {};
145
+ for (const key of ['harness', 'model', 'effort']) {
146
+ const rawValue = record[key];
147
+ if (typeof rawValue === 'string' && rawValue.trim()) {
148
+ target[key] = rawValue.trim();
149
+ }
150
+ }
151
+ return Object.keys(target).length > 0 ? target : undefined;
152
+ }
153
+ function normalizeProjectMatrixCell(provider, value) {
154
+ const bareValue = normalizeProjectMatrixBareValue(provider, value);
155
+ if (bareValue !== undefined) {
156
+ return bareValue;
157
+ }
158
+ if (!Array.isArray(value) || value.length === 0) {
159
+ return undefined;
160
+ }
161
+ const route = [];
162
+ for (const entry of value) {
163
+ const bareEntry = normalizeProjectMatrixBareValue(provider, entry);
164
+ if (bareEntry !== undefined) {
165
+ route.push(bareEntry);
166
+ continue;
167
+ }
168
+ const target = normalizeProjectMatrixRouteTarget(entry);
169
+ if (target !== undefined) {
170
+ route.push(target);
171
+ }
172
+ }
173
+ return route.length > 0 ? route : undefined;
174
+ }
175
+ function normalizeProjectMatrixProviderValue(provider, value) {
176
+ const bareValue = normalizeProjectMatrixBareValue(provider, value);
177
+ if (bareValue !== undefined) {
178
+ return bareValue;
179
+ }
180
+ if (!value || typeof value !== 'object' || Array.isArray(value)) {
181
+ return undefined;
182
+ }
183
+ const tierMap = {};
184
+ for (const [tier, rawCell] of Object.entries(value)) {
185
+ if (!VALID_DISPATCH_MATRIX_TIERS.includes(tier)) {
186
+ continue;
187
+ }
188
+ const normalized = normalizeProjectMatrixCell(provider, rawCell);
189
+ if (normalized !== undefined) {
190
+ tierMap[tier] = normalized;
191
+ }
192
+ }
193
+ return Object.keys(tierMap).length > 0 ? tierMap : undefined;
194
+ }
195
+ function readProjectDispatchMatrix(value) {
196
+ if (value === undefined || value === null) {
197
+ return { matrix: null, warnings: [] };
198
+ }
199
+ if (typeof value !== 'object' || Array.isArray(value)) {
200
+ return {
201
+ matrix: null,
202
+ warnings: [
203
+ 'Ignoring malformed oat_dispatch_policy.matrix in project state.',
204
+ ],
205
+ };
206
+ }
207
+ const matrix = {};
208
+ for (const [provider, rawProviderValue] of Object.entries(value)) {
209
+ if (!provider.trim()) {
210
+ continue;
211
+ }
212
+ const normalized = normalizeProjectMatrixProviderValue(provider, rawProviderValue);
213
+ if (normalized !== undefined) {
214
+ matrix[provider] = normalized;
215
+ }
216
+ }
217
+ if (Object.keys(matrix).length === 0) {
218
+ return {
219
+ matrix: null,
220
+ warnings: [
221
+ 'Ignoring malformed oat_dispatch_policy.matrix in project state.',
222
+ ],
223
+ };
224
+ }
225
+ return { matrix, warnings: [] };
226
+ }
227
+ function policyTier(policy) {
228
+ return typeof policy === 'string' &&
229
+ VALID_DISPATCH_MATRIX_TIERS.includes(policy)
230
+ ? policy
231
+ : null;
232
+ }
233
+ function dispatchValueFromRouteTarget(target) {
234
+ const adapter = getCeilingAdapter(target.harness);
235
+ if (adapter.mechanism === 'pinned-variant') {
236
+ return target.effort ?? null;
237
+ }
238
+ if (adapter.mechanism === 'model-arg') {
239
+ return target.model ?? null;
240
+ }
241
+ return null;
242
+ }
243
+ function routeTargetFromBareValue(provider, value, routeIndex, routeLength) {
244
+ const adapter = getCeilingAdapter(provider);
245
+ const target = {
246
+ harness: provider,
247
+ crossHarness: false,
248
+ routeIndex,
249
+ routeLength,
250
+ };
251
+ if (adapter.mechanism === 'pinned-variant') {
252
+ target.effort = value;
253
+ }
254
+ else {
255
+ target.model = value;
256
+ }
257
+ return target;
258
+ }
259
+ function routeTargetFromObject(provider, target, routeIndex, routeLength) {
260
+ const harness = target.harness ?? provider;
261
+ return {
262
+ harness,
263
+ ...(target.model ? { model: target.model } : {}),
264
+ ...(target.effort ? { effort: target.effort } : {}),
265
+ crossHarness: harness !== provider,
266
+ routeIndex,
267
+ routeLength,
268
+ };
269
+ }
270
+ function resolveRouteMatrixCell(provider, route, escalationLevel, cellSource) {
271
+ const routeIndex = Math.min(escalationLevel, route.length - 1);
272
+ const entry = route[routeIndex];
273
+ if (entry === undefined) {
274
+ return null;
275
+ }
276
+ const target = typeof entry === 'string'
277
+ ? routeTargetFromBareValue(provider, entry, routeIndex, route.length)
278
+ : routeTargetFromObject(provider, entry, routeIndex, route.length);
279
+ const value = typeof entry === 'string' ? entry : dispatchValueFromRouteTarget(target);
280
+ return {
281
+ value,
282
+ cellSource,
283
+ target,
284
+ selectionBranch: routeIndex > 0 ? 'escalation-target' : 'matrix-pinned',
285
+ };
286
+ }
287
+ function resolveProviderCellFromValue(provider, providerValue, tier, cellSource, escalationLevel) {
288
+ if (providerValue === undefined) {
289
+ return null;
290
+ }
291
+ if (typeof providerValue === 'string') {
292
+ return {
293
+ value: providerValue,
294
+ cellSource,
295
+ target: null,
296
+ selectionBranch: 'prompt-persisted',
297
+ };
298
+ }
299
+ if (tier === null) {
300
+ return null;
301
+ }
302
+ const cell = providerValue[tier];
303
+ if (cell === undefined) {
304
+ return null;
305
+ }
306
+ if (typeof cell === 'string') {
307
+ return {
308
+ value: cell,
309
+ cellSource,
310
+ target: null,
311
+ selectionBranch: 'matrix-pinned',
312
+ };
313
+ }
314
+ return resolveRouteMatrixCell(provider, cell, escalationLevel, cellSource);
315
+ }
316
+ function resolveProviderMatrixCell(provider, tier, resolvedConfig, projectMatrix, escalationLevel) {
317
+ let selected = null;
318
+ const layers = [
319
+ {
320
+ source: 'user-config',
321
+ providers: resolvedConfig.user.workflow?.dispatchCeiling?.providers,
322
+ },
323
+ {
324
+ source: 'repo-config',
325
+ providers: resolvedConfig.shared.workflow?.dispatchCeiling?.providers,
326
+ },
327
+ {
328
+ source: 'local-config',
329
+ providers: resolvedConfig.local.workflow?.dispatchCeiling?.providers,
330
+ },
331
+ { source: 'project-state', providers: projectMatrix },
332
+ ];
333
+ for (const layer of layers) {
334
+ const resolved = resolveProviderCellFromValue(provider, layer.providers?.[provider], tier, layer.source, escalationLevel);
335
+ if (resolved) {
336
+ selected = resolved;
337
+ }
338
+ }
339
+ return selected;
340
+ }
124
341
  function readProjectDispatchPolicy(provider, content) {
125
342
  const frontmatter = getFrontmatterBlock(content);
126
343
  if (!frontmatter) {
@@ -135,6 +352,7 @@ function readProjectDispatchPolicy(provider, content) {
135
352
  return null;
136
353
  }
137
354
  const policyRecord = policy;
355
+ const parsedMatrix = readProjectDispatchMatrix(policyRecord['matrix']);
138
356
  const mode = policyRecord['mode'];
139
357
  if (mode === 'inherit') {
140
358
  return {
@@ -143,6 +361,11 @@ function readProjectDispatchPolicy(provider, content) {
143
361
  value: null,
144
362
  source: 'project-state',
145
363
  preset: null,
364
+ matrix: parsedMatrix.matrix,
365
+ cellSource: null,
366
+ target: null,
367
+ selectionBranch: 'inherit',
368
+ warnings: parsedMatrix.warnings,
146
369
  };
147
370
  }
148
371
  if (mode !== 'managed') {
@@ -161,6 +384,11 @@ function readProjectDispatchPolicy(provider, content) {
161
384
  value: null,
162
385
  source: 'project-state',
163
386
  preset: policyValue,
387
+ matrix: parsedMatrix.matrix,
388
+ cellSource: null,
389
+ target: null,
390
+ selectionBranch: 'prompt-persisted',
391
+ warnings: parsedMatrix.warnings,
164
392
  };
165
393
  }
166
394
  const providers = policyRecord['providers'];
@@ -183,6 +411,11 @@ function readProjectDispatchPolicy(provider, content) {
183
411
  value,
184
412
  source: 'project-state',
185
413
  preset: policyValue,
414
+ matrix: parsedMatrix.matrix,
415
+ cellSource: 'project-state',
416
+ target: null,
417
+ selectionBranch: 'prompt-persisted',
418
+ warnings: parsedMatrix.warnings,
186
419
  };
187
420
  }
188
421
  function readLegacyProjectDispatchCeiling(provider, parsed) {
@@ -208,6 +441,11 @@ function readLegacyProjectDispatchCeiling(provider, parsed) {
208
441
  value,
209
442
  source: 'project-state',
210
443
  preset: typeof presetValue === 'string' ? presetValue : null,
444
+ matrix: null,
445
+ cellSource: 'project-state',
446
+ target: null,
447
+ selectionBranch: 'prompt-persisted',
448
+ warnings: [],
211
449
  };
212
450
  }
213
451
  function readProjectDispatchCeiling(provider, content) {
@@ -274,6 +512,11 @@ function stripConfigCandidateSource(candidate) {
274
512
  value: candidate.value,
275
513
  source: candidate.source,
276
514
  preset: candidate.preset,
515
+ matrix: candidate.matrix,
516
+ cellSource: candidate.cellSource,
517
+ target: candidate.target,
518
+ selectionBranch: candidate.selectionBranch,
519
+ warnings: candidate.warnings,
277
520
  };
278
521
  }
279
522
  function readResolvedConfigPolicyCandidate(provider, resolvedConfig) {
@@ -291,6 +534,11 @@ function readResolvedConfigPolicyCandidate(provider, resolvedConfig) {
291
534
  value: null,
292
535
  source,
293
536
  preset: null,
537
+ matrix: null,
538
+ cellSource: null,
539
+ target: null,
540
+ selectionBranch: 'inherit',
541
+ warnings: [],
294
542
  configSource: modeEntry.source,
295
543
  };
296
544
  }
@@ -311,6 +559,11 @@ function readResolvedConfigPolicyCandidate(provider, resolvedConfig) {
311
559
  value: compiledPolicyValueForProvider(provider, compiled),
312
560
  source,
313
561
  preset: policy,
562
+ matrix: null,
563
+ cellSource: null,
564
+ target: null,
565
+ selectionBranch: 'prompt-persisted',
566
+ warnings: [],
314
567
  configSource,
315
568
  };
316
569
  }
@@ -336,6 +589,11 @@ function readResolvedLegacyConfigCeilingCandidate(provider, resolvedConfig) {
336
589
  value: entry.value,
337
590
  source,
338
591
  preset: null,
592
+ matrix: null,
593
+ cellSource: source,
594
+ target: null,
595
+ selectionBranch: 'prompt-persisted',
596
+ warnings: [],
339
597
  configSource: entry.source,
340
598
  };
341
599
  }
@@ -384,11 +642,28 @@ function normalizePreferredValue(provider, value) {
384
642
  }
385
643
  return normalized;
386
644
  }
645
+ function normalizeEscalationLevel(value) {
646
+ if (value === undefined) {
647
+ return 0;
648
+ }
649
+ const normalized = value.trim();
650
+ if (!/^\d+$/.test(normalized)) {
651
+ throw new Error(`Invalid escalation level "${value}". Use a non-negative integer.`);
652
+ }
653
+ return Number.parseInt(normalized, 10);
654
+ }
655
+ function selectionFamily(provider, value, target) {
656
+ return value
657
+ ? classifyModelFamily({ value, providerId: target?.harness ?? provider })
658
+ : 'unknown';
659
+ }
387
660
  function selectDispatchValue(provider, role, policy, preferredValue) {
388
661
  const baseSelection = {
389
662
  role,
390
663
  policyMode: policy.mode,
391
664
  policy: policy.policy,
665
+ cellSource: policy.cellSource,
666
+ target: policy.target,
392
667
  };
393
668
  if (policy.mode === 'inherit') {
394
669
  return {
@@ -397,15 +672,22 @@ function selectDispatchValue(provider, role, policy, preferredValue) {
397
672
  selectedValue: null,
398
673
  capped: false,
399
674
  selectionMode: 'inherit-default',
675
+ selectionBranch: 'inherit',
676
+ family: 'unknown',
677
+ target: null,
400
678
  };
401
679
  }
402
680
  if (policy.policy === 'uncapped') {
681
+ const selectedValue = role === 'reviewer' ? null : preferredValue;
403
682
  return {
404
683
  ...baseSelection,
405
684
  preferredValue: role === 'reviewer' ? null : preferredValue,
406
- selectedValue: role === 'reviewer' ? null : preferredValue,
685
+ selectedValue,
407
686
  capped: false,
408
687
  selectionMode: role === 'reviewer' ? 'no-review-target' : 'uncapped',
688
+ selectionBranch: selectedValue ? 'prompt-persisted' : 'unresolved',
689
+ family: selectionFamily(provider, selectedValue, null),
690
+ target: null,
409
691
  };
410
692
  }
411
693
  if (policy.value === null) {
@@ -414,7 +696,10 @@ function selectDispatchValue(provider, role, policy, preferredValue) {
414
696
  preferredValue: null,
415
697
  selectedValue: null,
416
698
  capped: false,
417
- selectionMode: 'capped',
699
+ selectionMode: policy.target ? 'unresolved' : 'capped',
700
+ selectionBranch: policy.selectionBranch,
701
+ family: 'unknown',
702
+ target: policy.target,
418
703
  };
419
704
  }
420
705
  if (role === 'reviewer' || preferredValue === null) {
@@ -424,6 +709,8 @@ function selectDispatchValue(provider, role, policy, preferredValue) {
424
709
  selectedValue: policy.value,
425
710
  capped: false,
426
711
  selectionMode: role === 'reviewer' ? 'review-target' : 'capped',
712
+ selectionBranch: policy.selectionBranch,
713
+ family: selectionFamily(provider, policy.value, policy.target),
427
714
  };
428
715
  }
429
716
  const order = providerValueOrder(provider);
@@ -436,15 +723,21 @@ function selectDispatchValue(provider, role, policy, preferredValue) {
436
723
  selectedValue: policy.value,
437
724
  capped: false,
438
725
  selectionMode: 'capped',
726
+ selectionBranch: policy.selectionBranch,
727
+ family: selectionFamily(provider, policy.value, policy.target),
439
728
  };
440
729
  }
441
730
  const selectedIndex = Math.min(preferredIndex, ceilingIndex);
731
+ const selectedValue = order[selectedIndex];
442
732
  return {
443
733
  ...baseSelection,
444
734
  preferredValue,
445
- selectedValue: order[selectedIndex],
735
+ selectedValue,
446
736
  capped: preferredIndex > ceilingIndex,
447
737
  selectionMode: 'capped',
738
+ selectionBranch: policy.selectionBranch,
739
+ family: selectionFamily(provider, selectedValue, selectedValue === policy.value ? policy.target : null),
740
+ target: selectedValue === policy.value ? policy.target : null,
448
741
  };
449
742
  }
450
743
  /**
@@ -461,12 +754,18 @@ function buildProviderResolution(provider, policy, role, orchestratorTier, prefe
461
754
  mechanism: adapter.mechanism,
462
755
  dispatchArgs: null,
463
756
  verifyOnDispatch: false,
757
+ cellSource: null,
758
+ target: null,
464
759
  selection: {
465
760
  role,
466
761
  preferredValue,
467
762
  selectedValue: null,
468
763
  capped: false,
469
764
  selectionMode: 'unresolved',
765
+ selectionBranch: 'unresolved',
766
+ family: 'unknown',
767
+ target: null,
768
+ cellSource: null,
470
769
  policyMode: null,
471
770
  policy: null,
472
771
  },
@@ -474,7 +773,8 @@ function buildProviderResolution(provider, policy, role, orchestratorTier, prefe
474
773
  }
475
774
  const selection = selectDispatchValue(provider, role, policy, preferredValue);
476
775
  const dispatchValue = selection.selectedValue;
477
- const dispatchArgs = dispatchValue
776
+ const isCrossHarness = selection.target?.crossHarness === true;
777
+ const dispatchArgs = dispatchValue && !isCrossHarness
478
778
  ? adapter.compileToDispatchArgs(dispatchValue, role, {
479
779
  orchestratorTier,
480
780
  })
@@ -494,11 +794,13 @@ function buildProviderResolution(provider, policy, role, orchestratorTier, prefe
494
794
  mode,
495
795
  mechanism: adapter.mechanism,
496
796
  dispatchArgs,
497
- verifyOnDispatch: dispatchValue
797
+ verifyOnDispatch: dispatchValue && !isCrossHarness
498
798
  ? adapter.verifyOnDispatch(dispatchValue, {
499
799
  orchestratorTier,
500
800
  })
501
801
  : false,
802
+ cellSource: policy.cellSource,
803
+ target: selection.target,
502
804
  selection,
503
805
  };
504
806
  }
@@ -550,7 +852,11 @@ async function resolveDispatchCeiling(context, dependencies, options) {
550
852
  ? await resolveCodexProviderDefaultEffort(repoRoot, context, dependencies)
551
853
  : 'not-applicable';
552
854
  const preferredValue = normalizePreferredValue(provider, options.preferred);
553
- const resolvedValue = await resolveCeilingValue(provider, resolvedConfig, projectPath, dependencies);
855
+ const escalationLevel = normalizeEscalationLevel(options.escalationLevel);
856
+ const resolvedValue = await resolveCeilingValue(provider, resolvedConfig, projectPath, dependencies, escalationLevel);
857
+ for (const warning of resolvedValue?.warnings ?? []) {
858
+ context.logger.warn(warning);
859
+ }
554
860
  const providerResolution = buildProviderResolution(provider, resolvedValue, role, orchestratorTier, preferredValue);
555
861
  const providers = {
556
862
  [provider]: providerResolution,
@@ -567,6 +873,7 @@ async function resolveDispatchCeiling(context, dependencies, options) {
567
873
  unresolved: false,
568
874
  projectPath,
569
875
  providerDefaultEffort,
876
+ matrix: resolvedValue.matrix,
570
877
  providers,
571
878
  };
572
879
  }
@@ -585,6 +892,7 @@ async function resolveDispatchCeiling(context, dependencies, options) {
585
892
  unresolved: true,
586
893
  projectPath,
587
894
  providerDefaultEffort,
895
+ matrix: null,
588
896
  providers,
589
897
  message,
590
898
  };
@@ -595,16 +903,33 @@ async function resolveDispatchCeiling(context, dependencies, options) {
595
903
  * Never reads the preset label for dispatch — the preset is surfaced as
596
904
  * provenance only.
597
905
  */
598
- async function resolveCeilingValue(provider, resolvedConfig, projectPath, dependencies) {
906
+ async function resolveCeilingValue(provider, resolvedConfig, projectPath, dependencies, escalationLevel) {
599
907
  const configCeiling = readResolvedConfigCeiling(provider, resolvedConfig);
600
- if (configCeiling) {
601
- return configCeiling;
602
- }
603
908
  const projectCeiling = await resolveProjectStateCeiling(provider, projectPath, dependencies);
604
- if (projectCeiling) {
605
- return projectCeiling;
909
+ const baseCeiling = configCeiling ?? projectCeiling;
910
+ if (!baseCeiling) {
911
+ return null;
606
912
  }
607
- return null;
913
+ if (baseCeiling.mode === 'inherit' || baseCeiling.policy === 'uncapped') {
914
+ return baseCeiling;
915
+ }
916
+ const tier = policyTier(baseCeiling.policy);
917
+ const matrixCell = resolveProviderMatrixCell(provider, tier, resolvedConfig, projectCeiling?.matrix ?? null, escalationLevel);
918
+ if (matrixCell) {
919
+ return {
920
+ ...baseCeiling,
921
+ value: matrixCell.value,
922
+ cellSource: matrixCell.cellSource,
923
+ target: matrixCell.target,
924
+ selectionBranch: matrixCell.selectionBranch,
925
+ };
926
+ }
927
+ if (baseCeiling.policy !== 'legacy-ceiling' &&
928
+ baseCeiling.value === null &&
929
+ providerValueOrder(provider) === null) {
930
+ return null;
931
+ }
932
+ return baseCeiling;
608
933
  }
609
934
  function policyLabel(policy) {
610
935
  if (policy === 'legacy-ceiling') {
@@ -625,6 +950,23 @@ function writeHumanResolution(context, resolution) {
625
950
  if (providerResolution) {
626
951
  context.logger.info(`Mode: ${providerResolution.mode} (${providerResolution.mechanism})`);
627
952
  context.logger.info(`Selection: ${providerResolution.selection.selectionMode}`);
953
+ if (providerResolution.target) {
954
+ const details = [
955
+ `harness=${providerResolution.target.harness}`,
956
+ providerResolution.target.model
957
+ ? `model=${providerResolution.target.model}`
958
+ : null,
959
+ providerResolution.target.effort
960
+ ? `effort=${providerResolution.target.effort}`
961
+ : null,
962
+ ]
963
+ .filter(Boolean)
964
+ .join(' ');
965
+ const suffix = providerResolution.target.crossHarness
966
+ ? ' (cross-harness target; native dispatch args deferred)'
967
+ : '';
968
+ context.logger.info(`Dispatch target: ${details}${suffix}`);
969
+ }
628
970
  }
629
971
  if (resolution.provider === 'codex') {
630
972
  context.logger.info(`Codex provider default effort: ${resolution.providerDefaultEffort}`);
@@ -689,10 +1031,11 @@ export function createProjectDispatchCeilingCommand(overrides = {}) {
689
1031
  const command = new Command('dispatch-ceiling').description('Resolve OAT project dispatch ceiling metadata');
690
1032
  command.addCommand(new Command('resolve')
691
1033
  .description('Resolve dispatch policy for a provider')
692
- .requiredOption('--provider <provider>', 'Provider name: codex or claude are enforced; any other provider resolves as advisory (unsupported)')
1034
+ .requiredOption('--provider <provider>', 'Provider name: codex, claude, or cursor are enforced; unregistered providers resolve as unsupported advisory')
693
1035
  .option('--role <role>', 'Dispatch role for variant compilation: implementer (default) or reviewer')
694
1036
  .option('--orchestrator-tier <tier>', 'Orchestrator tier, used to flag verify-on-upgrade for above-orchestrator requests')
695
1037
  .option('--preferred <value>', 'Preferred implementer/fix dispatch value before applying the resolved policy')
1038
+ .option('--escalation-level <level>', 'Ordered route entry to select; 0 is the floor and higher values advance through escalation targets')
696
1039
  .option('--project-path <path>', 'Read project-state policy from an explicit project path')
697
1040
  .option('--preflight', 'Treat unresolved non-interactive resolution as an implementation block')
698
1041
  .option('--non-interactive', 'Force non-interactive block behavior when the ceiling is unresolved')
@@ -25,14 +25,22 @@ export type WorkflowClaudeDispatchCeiling = 'haiku' | 'sonnet' | 'opus' | 'fable
25
25
  export type WorkflowDispatchCeilingPreset = 'balanced' | 'maximum' | 'cost-conscious';
26
26
  export type WorkflowDispatchPolicyMode = 'managed' | 'inherit';
27
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>>;
28
38
  export type GateOnFailure = 'block' | 'prompt' | 'warn';
29
- export type GateAvoid = 'same-runtime' | 'none';
39
+ export type GateAvoid = 'same-family' | 'same-runtime' | 'none';
30
40
  export interface WorkflowDispatchCeiling {
31
41
  preset?: WorkflowDispatchCeilingPreset;
32
- providers?: {
33
- codex?: WorkflowCodexDispatchCeiling;
34
- claude?: WorkflowClaudeDispatchCeiling;
35
- };
42
+ recommendationVersion?: string;
43
+ providers?: Record<string, WorkflowDispatchProviderValue>;
36
44
  }
37
45
  export interface WorkflowDispatchPolicy {
38
46
  mode: WorkflowDispatchPolicyMode;
@@ -51,6 +59,7 @@ export interface GateConfig {
51
59
  export interface ExecTarget {
52
60
  runtime: string;
53
61
  baseCommand: string[];
62
+ models?: string[];
54
63
  hostDetectionCommand?: string[];
55
64
  availabilityCommand?: string[];
56
65
  priority: number;
@@ -79,6 +88,7 @@ export declare const VALID_CLAUDE_DISPATCH_CEILINGS: readonly WorkflowClaudeDisp
79
88
  export declare const VALID_DISPATCH_CEILING_PRESETS: readonly WorkflowDispatchCeilingPreset[];
80
89
  export declare const VALID_DISPATCH_POLICY_MODES: readonly WorkflowDispatchPolicyMode[];
81
90
  export declare const VALID_MANAGED_DISPATCH_POLICIES: readonly WorkflowManagedDispatchPolicy[];
91
+ export declare const VALID_DISPATCH_MATRIX_TIERS: readonly WorkflowDispatchMatrixTier[];
82
92
  export declare const BUILTIN_EXEC_TARGETS: Readonly<Record<string, ExecTarget>>;
83
93
  export type OatToolsConfig = Partial<Record<'core' | 'ideas' | 'docs' | 'workflows' | 'utility' | 'project-management' | 'research' | 'brainstorm', boolean>>;
84
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;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,6BAA6B,GAAG,OAAO,GAAG,OAAO,CAAC;AAC9D,MAAM,MAAM,6BAA6B,GACrC,MAAM,GACN,SAAS,GACT,IAAI,GACJ,SAAS,CAAC;AACd,MAAM,MAAM,4BAA4B,GACpC,UAAU,GACV,QAAQ,GACR,eAAe,CAAC;AACpB,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG,WAAW,GAAG,OAAO,CAAC;AACzE,MAAM,MAAM,4BA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