@open-agent-toolkit/cli 0.1.46 → 0.1.48
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 +202 -191
- package/assets/agents/oat-reviewer.md +11 -1
- package/assets/config/dispatch-matrix-recommendation.json +120 -13
- package/assets/docs/cli-utilities/configuration.md +172 -113
- package/assets/docs/cli-utilities/workflow-gates.md +161 -27
- package/assets/docs/contributing/skills.md +14 -8
- package/assets/docs/provider-sync/providers.md +41 -7
- package/assets/docs/provider-sync/scope-and-surface.md +2 -2
- package/assets/docs/reference/cli-reference.md +3 -1
- package/assets/docs/reference/oat-directory-structure.md +27 -26
- package/assets/docs/workflows/projects/artifacts.md +31 -1
- package/assets/docs/workflows/projects/dispatch-ceiling.md +235 -187
- package/assets/docs/workflows/projects/implementation-execution.md +283 -260
- package/assets/docs/workflows/projects/lifecycle.md +26 -5
- package/assets/docs/workflows/projects/reviews.md +27 -2
- package/assets/migration/pjm-restructure.md +1 -1
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-implement/SKILL.md +247 -133
- package/assets/skills/oat-project-import-plan/SKILL.md +173 -16
- package/assets/skills/oat-project-next/SKILL.md +2 -2
- package/assets/skills/oat-project-plan/SKILL.md +122 -92
- package/assets/skills/oat-project-plan-writing/SKILL.md +246 -15
- package/assets/skills/oat-project-quick-start/SKILL.md +157 -107
- package/assets/skills/oat-project-review-provide/SKILL.md +94 -22
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +64 -39
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +21 -6
- package/dist/commands/gate/index.d.ts +7 -1
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +544 -67
- package/dist/commands/gate/review-verdict.d.ts +16 -0
- package/dist/commands/gate/review-verdict.d.ts.map +1 -1
- package/dist/commands/gate/review-verdict.js +72 -9
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +452 -16
- package/dist/commands/providers/codex/materialize.d.ts.map +1 -1
- package/dist/commands/providers/codex/materialize.js +6 -1
- package/dist/commands/shared/frontmatter.d.ts +4 -0
- package/dist/commands/shared/frontmatter.d.ts.map +1 -1
- package/dist/commands/shared/frontmatter.js +23 -0
- package/dist/commands/status/index.d.ts +1 -0
- package/dist/commands/status/index.d.ts.map +1 -1
- package/dist/commands/status/index.js +10 -4
- package/dist/commands/sync/index.d.ts.map +1 -1
- package/dist/commands/sync/index.js +10 -3
- package/dist/commands/sync/sync.types.d.ts +1 -0
- package/dist/commands/sync/sync.types.d.ts.map +1 -1
- package/dist/config/oat-config.d.ts +19 -2
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +139 -24
- package/dist/config/resolve.d.ts +8 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +66 -2
- package/dist/engine/index.d.ts +1 -1
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +1 -1
- package/dist/engine/scanner.d.ts +1 -0
- package/dist/engine/scanner.d.ts.map +1 -1
- package/dist/engine/scanner.js +17 -1
- package/dist/fs/paths.d.ts +4 -0
- package/dist/fs/paths.d.ts.map +1 -1
- package/dist/fs/paths.js +18 -1
- package/dist/providers/ceiling/registry.d.ts +1 -0
- package/dist/providers/ceiling/registry.d.ts.map +1 -1
- package/dist/providers/ceiling/registry.js +12 -5
- package/dist/providers/codex/codec/catalog.d.ts +14 -0
- package/dist/providers/codex/codec/catalog.d.ts.map +1 -0
- package/dist/providers/codex/codec/catalog.js +21 -0
- package/dist/providers/codex/codec/materialize.d.ts.map +1 -1
- package/dist/providers/codex/codec/materialize.js +6 -5
- package/dist/providers/codex/codec/shared.d.ts +19 -0
- package/dist/providers/codex/codec/shared.d.ts.map +1 -1
- package/dist/providers/codex/codec/shared.js +98 -5
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +142 -32
- package/dist/providers/identity/stamp.d.ts.map +1 -1
- package/dist/providers/identity/stamp.js +4 -0
- package/dist/shared/types.d.ts +1 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js +4 -0
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@ import { confirmAction, } from '../shared/shared.prompts.js';
|
|
|
6
6
|
import { readGlobalOptions } from '../shared/shared.utils.js';
|
|
7
7
|
import { compileDispatchCeilingPreset } from '../../config/dispatch-ceiling-preset.js';
|
|
8
8
|
import { dispatchPolicyModeDescription, dispatchPolicyPolicyDescription, managedDispatchPolicyValueList, } from '../../config/dispatch-policy-options.js';
|
|
9
|
-
import { VALID_DISPATCH_POLICY_MODES, VALID_MANAGED_DISPATCH_POLICIES, isCodexMaterializedRouteTarget, readOatConfig, readOatLocalConfig, readUserConfig, validateDispatchRouteTarget, writeOatConfig, writeOatLocalConfig, writeUserConfig, } from '../../config/oat-config.js';
|
|
9
|
+
import { VALID_DISPATCH_POLICY_MODES, VALID_MANAGED_DISPATCH_POLICIES, isCodexMaterializedRouteTarget, isWorkflowDispatchCandidateLadder, isWorkflowDispatchFallbackRoute, readOatConfig, readOatLocalConfig, readUserConfig, validateDispatchRouteTarget, writeOatConfig, writeOatLocalConfig, writeUserConfig, } from '../../config/oat-config.js';
|
|
10
10
|
import { resolveEffectiveConfig, } from '../../config/resolve.js';
|
|
11
11
|
import { resolveAssetsRoot } from '../../fs/assets.js';
|
|
12
12
|
import { resolveProjectRoot } from '../../fs/paths.js';
|
|
@@ -497,7 +497,7 @@ const CONFIG_CATALOG = [
|
|
|
497
497
|
group: 'Workflow Preferences (3-layer: local > shared > user)',
|
|
498
498
|
file: '.oat/config.local.json | .oat/config.json | ~/.oat/config.json',
|
|
499
499
|
scope: 'workflow',
|
|
500
|
-
type: 'low | medium | high | xhigh',
|
|
500
|
+
type: 'low | medium | high | xhigh | max',
|
|
501
501
|
defaultValue: 'unset',
|
|
502
502
|
mutability: 'read/write',
|
|
503
503
|
owningCommand: 'oat config set workflow.dispatchCeiling.providers.codex <value>',
|
|
@@ -623,6 +623,7 @@ const WORKFLOW_ENUM_VALUES = {
|
|
|
623
623
|
'medium',
|
|
624
624
|
'high',
|
|
625
625
|
'xhigh',
|
|
626
|
+
'max',
|
|
626
627
|
],
|
|
627
628
|
'workflow.dispatchCeiling.providers.claude': [
|
|
628
629
|
'haiku',
|
|
@@ -780,14 +781,13 @@ function addDispatchMatrixCellRefs(refs, provider, path, cell) {
|
|
|
780
781
|
refs.push({ provider, value: cell, path });
|
|
781
782
|
return;
|
|
782
783
|
}
|
|
783
|
-
|
|
784
|
-
const entryPath = `${path}[${index}]`;
|
|
784
|
+
const addEntry = (entry, entryPath) => {
|
|
785
785
|
if (typeof entry === 'string') {
|
|
786
786
|
refs.push({ provider, value: entry, path: entryPath });
|
|
787
|
-
|
|
787
|
+
return;
|
|
788
788
|
}
|
|
789
789
|
if (!isRouteTarget(entry)) {
|
|
790
|
-
|
|
790
|
+
return;
|
|
791
791
|
}
|
|
792
792
|
const targetProvider = entry.harness ?? provider;
|
|
793
793
|
if (isCodexMaterializedRouteTarget(provider, entry)) {
|
|
@@ -798,7 +798,7 @@ function addDispatchMatrixCellRefs(refs, provider, path, cell) {
|
|
|
798
798
|
path: entryPath,
|
|
799
799
|
target: entry,
|
|
800
800
|
});
|
|
801
|
-
|
|
801
|
+
return;
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
804
|
if (entry.model) {
|
|
@@ -815,6 +815,22 @@ function addDispatchMatrixCellRefs(refs, provider, path, cell) {
|
|
|
815
815
|
path: `${entryPath}.effort`,
|
|
816
816
|
});
|
|
817
817
|
}
|
|
818
|
+
};
|
|
819
|
+
if (isWorkflowDispatchCandidateLadder(cell)) {
|
|
820
|
+
for (const [candidateIndex, candidate] of cell.candidates.entries()) {
|
|
821
|
+
const candidatePath = `${path}.candidates[${candidateIndex}]`;
|
|
822
|
+
if (isWorkflowDispatchFallbackRoute(candidate)) {
|
|
823
|
+
for (const [routeIndex, entry] of candidate.route.entries()) {
|
|
824
|
+
addEntry(entry, `${candidatePath}.route[${routeIndex}]`);
|
|
825
|
+
}
|
|
826
|
+
continue;
|
|
827
|
+
}
|
|
828
|
+
addEntry(candidate, candidatePath);
|
|
829
|
+
}
|
|
830
|
+
return;
|
|
831
|
+
}
|
|
832
|
+
for (const [index, entry] of cell.entries()) {
|
|
833
|
+
addEntry(entry, `${path}[${index}]`);
|
|
818
834
|
}
|
|
819
835
|
}
|
|
820
836
|
function collectDispatchMatrixCellRefs(providers) {
|
|
@@ -842,17 +858,33 @@ function collectDispatchMatrixTargetValidationErrors(providers) {
|
|
|
842
858
|
}
|
|
843
859
|
const providerPath = `workflow.dispatchCeiling.providers.${provider}`;
|
|
844
860
|
for (const [tier, cell] of Object.entries(providerValue)) {
|
|
845
|
-
if (
|
|
861
|
+
if (cell === undefined || typeof cell === 'string') {
|
|
846
862
|
continue;
|
|
847
863
|
}
|
|
848
|
-
|
|
864
|
+
const validateEntry = (entry, entryPath) => {
|
|
849
865
|
if (!isRouteTarget(entry)) {
|
|
850
|
-
|
|
866
|
+
return;
|
|
851
867
|
}
|
|
852
868
|
const validation = validateDispatchRouteTarget(provider, entry);
|
|
853
869
|
if (!validation.valid) {
|
|
854
|
-
errors.push(`${
|
|
870
|
+
errors.push(`${entryPath}: ${validation.reason}`);
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
if (isWorkflowDispatchCandidateLadder(cell)) {
|
|
874
|
+
for (const [candidateIndex, candidate] of cell.candidates.entries()) {
|
|
875
|
+
const candidatePath = `${providerPath}.${tier}.candidates[${candidateIndex}]`;
|
|
876
|
+
if (isWorkflowDispatchFallbackRoute(candidate)) {
|
|
877
|
+
for (const [routeIndex, entry] of candidate.route.entries()) {
|
|
878
|
+
validateEntry(entry, `${candidatePath}.route[${routeIndex}]`);
|
|
879
|
+
}
|
|
880
|
+
continue;
|
|
881
|
+
}
|
|
882
|
+
validateEntry(candidate, candidatePath);
|
|
855
883
|
}
|
|
884
|
+
continue;
|
|
885
|
+
}
|
|
886
|
+
for (const [index, entry] of cell.entries()) {
|
|
887
|
+
validateEntry(entry, `${providerPath}.${tier}[${index}]`);
|
|
856
888
|
}
|
|
857
889
|
}
|
|
858
890
|
}
|
|
@@ -967,6 +999,9 @@ function formatResolvedValue(value) {
|
|
|
967
999
|
if (Array.isArray(value)) {
|
|
968
1000
|
return value.join(',');
|
|
969
1001
|
}
|
|
1002
|
+
if (typeof value === 'object') {
|
|
1003
|
+
return JSON.stringify(value);
|
|
1004
|
+
}
|
|
970
1005
|
return String(value);
|
|
971
1006
|
}
|
|
972
1007
|
async function getConfigValue(repoRoot, userConfigDir, key, dependencies) {
|
|
@@ -1184,10 +1219,6 @@ async function setConfigValue(repoRoot, userConfigDir, key, rawValue, surface, d
|
|
|
1184
1219
|
source: 'shared',
|
|
1185
1220
|
};
|
|
1186
1221
|
}
|
|
1187
|
-
function hasExistingDispatchMatrix(config) {
|
|
1188
|
-
const providers = config.workflow?.dispatchCeiling?.providers;
|
|
1189
|
-
return providers !== undefined && Object.keys(providers).length > 0;
|
|
1190
|
-
}
|
|
1191
1222
|
async function loadDispatchMatrixRecommendation(dependencies) {
|
|
1192
1223
|
const assetsRoot = await dependencies.resolveAssetsRoot();
|
|
1193
1224
|
const assetPath = join(assetsRoot, DISPATCH_MATRIX_RECOMMENDATION_ASSET);
|
|
@@ -1222,35 +1253,35 @@ async function validateRecommendationCells(repoRoot, recommendation, dependencie
|
|
|
1222
1253
|
}
|
|
1223
1254
|
}
|
|
1224
1255
|
function applyDispatchMatrixRecommendation(workflow, recommendation) {
|
|
1256
|
+
const existingProviders = workflow?.dispatchCeiling?.providers ?? {};
|
|
1257
|
+
const providers = {
|
|
1258
|
+
...recommendation.providers,
|
|
1259
|
+
};
|
|
1260
|
+
for (const [provider, existingValue] of Object.entries(existingProviders)) {
|
|
1261
|
+
const recommendedValue = recommendation.providers[provider];
|
|
1262
|
+
if (recommendedValue &&
|
|
1263
|
+
typeof recommendedValue !== 'string' &&
|
|
1264
|
+
typeof existingValue !== 'string') {
|
|
1265
|
+
providers[provider] = { ...recommendedValue, ...existingValue };
|
|
1266
|
+
}
|
|
1267
|
+
else {
|
|
1268
|
+
providers[provider] = existingValue;
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1225
1271
|
return {
|
|
1226
1272
|
...(workflow ?? {}),
|
|
1227
1273
|
dispatchCeiling: {
|
|
1228
1274
|
...workflow?.dispatchCeiling,
|
|
1229
1275
|
recommendationVersion: recommendation.version,
|
|
1230
|
-
providers
|
|
1276
|
+
providers,
|
|
1231
1277
|
},
|
|
1232
1278
|
};
|
|
1233
1279
|
}
|
|
1234
|
-
async function confirmDispatchMatrixOverwrite(context, dependencies, source, yes) {
|
|
1235
|
-
if (yes) {
|
|
1236
|
-
return;
|
|
1237
|
-
}
|
|
1238
|
-
if (!context.interactive) {
|
|
1239
|
-
throw new Error('Dispatch matrix already exists; rerun interactively or pass --yes to replace it.');
|
|
1240
|
-
}
|
|
1241
|
-
const shouldReplace = await dependencies.confirmAction(`Replace existing dispatch matrix in ${source} config?`, { interactive: context.interactive });
|
|
1242
|
-
if (!shouldReplace) {
|
|
1243
|
-
throw new Error('Dispatch matrix adoption cancelled; existing matrix unchanged.');
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
1280
|
async function adoptDispatchMatrixRecommendation(repoRoot, userConfigDir, options, context, dependencies) {
|
|
1247
1281
|
const source = options.surface === 'auto' ? 'local' : options.surface;
|
|
1248
1282
|
const recommendation = await loadDispatchMatrixRecommendation(dependencies);
|
|
1249
1283
|
if (source === 'user') {
|
|
1250
1284
|
const userConfig = await dependencies.readUserConfig(userConfigDir);
|
|
1251
|
-
if (hasExistingDispatchMatrix(userConfig)) {
|
|
1252
|
-
await confirmDispatchMatrixOverwrite(context, dependencies, source, options.yes);
|
|
1253
|
-
}
|
|
1254
1285
|
await validateRecommendationCells(repoRoot, recommendation, dependencies, context.logger.warn);
|
|
1255
1286
|
await dependencies.writeUserConfig(userConfigDir, {
|
|
1256
1287
|
...userConfig,
|
|
@@ -1264,9 +1295,6 @@ async function adoptDispatchMatrixRecommendation(repoRoot, userConfigDir, option
|
|
|
1264
1295
|
}
|
|
1265
1296
|
if (source === 'local') {
|
|
1266
1297
|
const localConfig = await dependencies.readOatLocalConfig(repoRoot);
|
|
1267
|
-
if (hasExistingDispatchMatrix(localConfig)) {
|
|
1268
|
-
await confirmDispatchMatrixOverwrite(context, dependencies, source, options.yes);
|
|
1269
|
-
}
|
|
1270
1298
|
await validateRecommendationCells(repoRoot, recommendation, dependencies, context.logger.warn);
|
|
1271
1299
|
await dependencies.writeOatLocalConfig(repoRoot, {
|
|
1272
1300
|
...localConfig,
|
|
@@ -1279,9 +1307,6 @@ async function adoptDispatchMatrixRecommendation(repoRoot, userConfigDir, option
|
|
|
1279
1307
|
};
|
|
1280
1308
|
}
|
|
1281
1309
|
const sharedConfig = await dependencies.readOatConfig(repoRoot);
|
|
1282
|
-
if (hasExistingDispatchMatrix(sharedConfig)) {
|
|
1283
|
-
await confirmDispatchMatrixOverwrite(context, dependencies, source, options.yes);
|
|
1284
|
-
}
|
|
1285
1310
|
await validateRecommendationCells(repoRoot, recommendation, dependencies, context.logger.warn);
|
|
1286
1311
|
await dependencies.writeOatConfig(repoRoot, {
|
|
1287
1312
|
...sharedConfig,
|
|
@@ -1560,7 +1585,7 @@ export function createConfigCommand(overrides = {}) {
|
|
|
1560
1585
|
.option('--shared', 'Write to the shared repo config (.oat/config.json)')
|
|
1561
1586
|
.option('--local', 'Write to the repo-local config (.oat/config.local.json)')
|
|
1562
1587
|
.option('--user', 'Write to the user-level config (~/.oat/config.json)')
|
|
1563
|
-
.option('--yes', '
|
|
1588
|
+
.option('--yes', 'Compatibility flag; adoption always preserves explicit existing cells')
|
|
1564
1589
|
.action(async (template, options, command) => {
|
|
1565
1590
|
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
1566
1591
|
try {
|
|
@@ -1579,7 +1604,7 @@ export function createConfigCommand(overrides = {}) {
|
|
|
1579
1604
|
surface = 'local';
|
|
1580
1605
|
else if (options.user)
|
|
1581
1606
|
surface = 'user';
|
|
1582
|
-
await runAdopt(template, { surface
|
|
1607
|
+
await runAdopt(template, { surface }, context, dependencies);
|
|
1583
1608
|
}
|
|
1584
1609
|
catch (error) {
|
|
1585
1610
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,cAAc,EAMnB,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAO9D,OAAO,EAIL,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,UAAU,kBAAkB;IAC1B,mBAAmB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OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAC5B,kBAAkB,EAAE,CAClB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,KAC3C,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAClC;AAED,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,UAAU,kBAAkB;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0BAA0B,EAAE,MAAM,CAAC;IACnC,cAAc,EAAE,oBAAoB,EAAE,CAAC;CACxC;AA0uBD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC1C,OAAO,CAcT"}
|
|
@@ -7,7 +7,7 @@ import { createPjmDisabledCheck, runPjmDoctorChecks, } from '../pjm/doctor.js';
|
|
|
7
7
|
import { getSkillVersion } from '../shared/frontmatter.js';
|
|
8
8
|
import { withScopeOption } from '../shared/scope-option.js';
|
|
9
9
|
import { readGlobalOptions, resolveConcreteScopes, } from '../shared/shared.utils.js';
|
|
10
|
-
import { readOatConfig, readOatLocalConfig, readUserConfig, isCodexMaterializedRouteTarget, } from '../../config/oat-config.js';
|
|
10
|
+
import { readOatConfig, readOatLocalConfig, readUserConfig, isCodexMaterializedRouteTarget, isWorkflowDispatchCandidateLadder, isWorkflowDispatchFallbackRoute, } from '../../config/oat-config.js';
|
|
11
11
|
import { resolveAssetsRoot } from '../../fs/assets.js';
|
|
12
12
|
import { resolveProjectRoot, resolveScopeRoot } from '../../fs/paths.js';
|
|
13
13
|
import TOML from '@iarna/toml';
|
|
@@ -152,14 +152,13 @@ function addDispatchMatrixCellRefs(refs, layer, provider, path, cell) {
|
|
|
152
152
|
refs.push({ layer, provider, value: cell, path });
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
const entryPath = `${path}[${index}]`;
|
|
155
|
+
const addEntry = (entry, entryPath) => {
|
|
157
156
|
if (typeof entry === 'string') {
|
|
158
157
|
refs.push({ layer, provider, value: entry, path: entryPath });
|
|
159
|
-
|
|
158
|
+
return;
|
|
160
159
|
}
|
|
161
160
|
if (!isRouteTarget(entry)) {
|
|
162
|
-
|
|
161
|
+
return;
|
|
163
162
|
}
|
|
164
163
|
const targetProvider = entry.harness ?? provider;
|
|
165
164
|
if (isCodexMaterializedRouteTarget(provider, entry)) {
|
|
@@ -171,7 +170,7 @@ function addDispatchMatrixCellRefs(refs, layer, provider, path, cell) {
|
|
|
171
170
|
path: entryPath,
|
|
172
171
|
target: entry,
|
|
173
172
|
});
|
|
174
|
-
|
|
173
|
+
return;
|
|
175
174
|
}
|
|
176
175
|
}
|
|
177
176
|
if (entry.model) {
|
|
@@ -190,6 +189,22 @@ function addDispatchMatrixCellRefs(refs, layer, provider, path, cell) {
|
|
|
190
189
|
path: `${entryPath}.effort`,
|
|
191
190
|
});
|
|
192
191
|
}
|
|
192
|
+
};
|
|
193
|
+
if (isWorkflowDispatchCandidateLadder(cell)) {
|
|
194
|
+
for (const [candidateIndex, candidate] of cell.candidates.entries()) {
|
|
195
|
+
const candidatePath = `${path}.candidates[${candidateIndex}]`;
|
|
196
|
+
if (isWorkflowDispatchFallbackRoute(candidate)) {
|
|
197
|
+
for (const [routeIndex, entry] of candidate.route.entries()) {
|
|
198
|
+
addEntry(entry, `${candidatePath}.route[${routeIndex}]`);
|
|
199
|
+
}
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
addEntry(candidate, candidatePath);
|
|
203
|
+
}
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
for (const [index, entry] of cell.entries()) {
|
|
207
|
+
addEntry(entry, `${path}[${index}]`);
|
|
193
208
|
}
|
|
194
209
|
}
|
|
195
210
|
function collectDispatchMatrixCellRefs(layers) {
|
|
@@ -4,6 +4,7 @@ import { type ResolvedConfig } from '../../config/resolve.js';
|
|
|
4
4
|
import { type ModelFamily } from '../../providers/identity/family.js';
|
|
5
5
|
import { type IdentityConfidence, type IdentityProvenance } from '../../providers/identity/provenance.js';
|
|
6
6
|
import { Command } from 'commander';
|
|
7
|
+
import { parseReviewGateVerdict } from './review-verdict.js';
|
|
7
8
|
interface GateCommandDependencies {
|
|
8
9
|
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
9
10
|
resolveProjectRoot: (cwd: string) => Promise<string>;
|
|
@@ -15,6 +16,7 @@ interface GateCommandDependencies {
|
|
|
15
16
|
writeUserConfig: (userConfigDir: string, config: UserConfig) => Promise<void>;
|
|
16
17
|
resolveEffectiveConfig: (repoRoot: string, userConfigDir: string, env: NodeJS.ProcessEnv) => Promise<ResolvedConfig>;
|
|
17
18
|
runProcess: (command: string, args: string[], options: ProcessRunOptions) => Promise<ProcessRunResult>;
|
|
19
|
+
parseReviewGateVerdict: typeof parseReviewGateVerdict;
|
|
18
20
|
processEnv: NodeJS.ProcessEnv;
|
|
19
21
|
}
|
|
20
22
|
interface ProcessRunOptions {
|
|
@@ -44,8 +46,10 @@ interface GateProducerIdentity {
|
|
|
44
46
|
confidence: IdentityConfidence;
|
|
45
47
|
family: ModelFamily;
|
|
46
48
|
avoidFamilies: ModelFamily[];
|
|
49
|
+
contributingScopes?: string[];
|
|
50
|
+
contributingStampCount?: number;
|
|
47
51
|
diversityClaimable: boolean;
|
|
48
|
-
source: 'flag' | 'stamp' | 'unknown';
|
|
52
|
+
source: 'flag' | 'stamp' | 'aggregated-stamps' | 'unknown';
|
|
49
53
|
}
|
|
50
54
|
interface GateDiversityMetadata {
|
|
51
55
|
avoid: CrossProviderAvoid;
|
|
@@ -57,6 +61,8 @@ interface GateDiversityMetadata {
|
|
|
57
61
|
family: ModelFamily;
|
|
58
62
|
source: GateProducerIdentity['source'];
|
|
59
63
|
avoidFamilies: ModelFamily[];
|
|
64
|
+
contributingScopes?: string[];
|
|
65
|
+
contributingStampCount?: number;
|
|
60
66
|
};
|
|
61
67
|
reviewer: {
|
|
62
68
|
target: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAQL,KAAK,UAAU,EAIf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAQL,KAAK,UAAU,EAIf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAOzB,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAExB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EACL,sBAAsB,EAIvB,MAAM,kBAAkB,CAAC;AAE1B,UAAU,uBAAuB;IAC/B,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IAC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