/** Variable definition for workflow parameterization */ export interface WorkflowVariable { required?: boolean; type?: 'string' | 'integer' | 'array'; pattern?: string; default?: string; } /** A single step within a workflow phase */ export interface WorkflowStep { id: string; type: 'command' | 'validation' | 'agent_input' | 'agent_work'; prompt?: string; command?: string; checkpoint?: string; blocks_next?: boolean; rules?: string[]; required_fields?: string[]; /** Validation conditions (for type=validation) */ conditions?: string[]; /** File glob patterns that must exist before step can be completed */ completion_conditions?: { /** Files that must exist (glob patterns resolved from cwd) */ files_exist?: string[]; }; } /** A phase containing ordered steps */ export interface WorkflowPhase { id: string; steps: WorkflowStep[]; /** Variable name containing array to iterate over */ repeat_for?: string; /** Timeout in seconds for each repeated item */ timeout_per_item?: number; /** Behavior when a repeated item times out */ on_timeout?: 'fail' | 'log_blocker_and_skip'; } /** Top-level workflow definition */ export interface WorkflowDefinition { name: string; version: string; description?: string; variables?: Record; phases: WorkflowPhase[]; } /** Parse a YAML string into a WorkflowDefinition. Throws on invalid structure. */ export declare function parseWorkflow(yaml: string): WorkflowDefinition; /** Valid step types for workflow definitions. Shared with the validator. */ export declare const VALID_STEP_TYPES: Set; /** * Resolve `${varName}` references in all string values of a workflow definition. * - Top-level string keys only (no nesting like `${x.y}`) * - Missing variable at resolve time → error * - Escaped `\${literal}` → `${literal}` */ export declare function resolveVariables(def: WorkflowDefinition, vars: Record): WorkflowDefinition; //# sourceMappingURL=workflow.d.ts.map