import { EventEmitter } from 'events';
import { Workflow, ExecutionContext, OrchestratorError } from '../types/core.js';
import { AgentSpecReader } from './filesystem.js';
export interface WorkflowExecutionEvent {
    type: 'step_started' | 'step_completed' | 'step_failed' | 'workflow_completed' | 'workflow_failed';
    workflowId: string;
    stepId?: string;
    data?: any;
    error?: OrchestratorError;
    timestamp: Date;
}
export interface StepExecutionResult {
    success: boolean;
    outputs: Record<string, any>;
    error?: OrchestratorError;
    metadata: {
        executionTime: number;
        retryCount: number;
        agentUsed: string;
    };
}
export declare class WorkflowEngine extends EventEmitter {
    private agentReader;
    private activeExecutions;
    private stepExecutors;
    constructor(agentReader: AgentSpecReader);
    private setupStepExecutors;
    executeWorkflow(workflow: Workflow, initialInputs?: Record<string, any>): Promise<ExecutionContext>;
    private buildExecutionPlan;
    private executeStep;
    private executeWithRetry;
    private executePromptGeneration;
    private executeAnalysis;
    private executeCodeGeneration;
    private executeValidation;
    private executeGenericStep;
    private buildPrompt;
    private performAnalysis;
    private executeAgentTask;
    private generateSessionId;
    getActiveExecutions(): ExecutionContext[];
    getExecutionContext(sessionId: string): ExecutionContext | undefined;
    cancelExecution(sessionId: string): Promise<boolean>;
}
//# sourceMappingURL=workflow.d.ts.map