moving
This commit is contained in:
@@ -9,7 +9,11 @@
|
||||
*/
|
||||
|
||||
import type { TaskShape, TaskShapeType, ComponentPhase } from './task-shape.js';
|
||||
import type { WorkflowTemplate, WorkflowStep } from './subagent-orchestrator.js';
|
||||
import {
|
||||
MAX_WORKFLOW_STEPS,
|
||||
type WorkflowTemplate,
|
||||
type WorkflowStep,
|
||||
} from './subagent-orchestrator.js';
|
||||
import type { LoadedSkill } from './prompt-loader.js';
|
||||
import type { WorkflowHarness } from './workflow-harness.js';
|
||||
import { matchHarness } from './builtin-harnesses.js';
|
||||
@@ -345,6 +349,14 @@ export function validateTemplate(template: WorkflowTemplate): ValidationError[]
|
||||
errors.push({ field: 'steps', message: 'At least one step is required' });
|
||||
return errors;
|
||||
}
|
||||
const workerCount = template.steps.length + (template.aggregation === 'synthesize' ? 1 : 0);
|
||||
if (workerCount > MAX_WORKFLOW_STEPS) {
|
||||
errors.push({
|
||||
field: 'steps',
|
||||
message: `Workflow worker limit exceeded: ${workerCount} > ${MAX_WORKFLOW_STEPS}`,
|
||||
});
|
||||
return errors;
|
||||
}
|
||||
if (!['concatenate', 'last', 'synthesize'].includes(template.aggregation)) {
|
||||
errors.push({ field: 'aggregation', message: `Invalid aggregation: ${template.aggregation}` });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user