/**
 * Workflow Execution Engine
 * Analyzes workflows and provides execution order for code generation
 * Updated for flexible stack system
 */
import { Workflow, StackComponent, Step } from '../types/workflow';
import { DAG } from './dag';
export interface ExecutionPlan {
    workflow: Workflow;
    componentPlans: Map<string, ComponentExecutionPlan>;
}
export interface ComponentExecutionPlan {
    componentName: string;
    component: StackComponent;
    actionPlans: Map<string, ActionExecutionPlan>;
    endpointPlans: Map<string, ImplementationExecutionPlan>;
}
export interface ActionExecutionPlan {
    actionId: string;
    componentId: string;
    dag: DAG;
    executionLevels: Step[][];
    entryPoints: Step[];
    exitPoints: Step[];
}
export interface ImplementationExecutionPlan {
    endpointId: string;
    dag: DAG;
    executionLevels: Step[][];
    entryPoints: Step[];
    exitPoints: Step[];
}
export declare class WorkflowEngine {
    /**
     * Analyze a workflow and create an execution plan
     */
    analyze(workflow: Workflow): ExecutionPlan;
    /**
     * Analyze a single stack component
     */
    private analyzeComponent;
    /**
     * Analyze a frontend action and build execution plan
     */
    private analyzeAction;
    /**
     * Analyze a backend implementation and build execution plan
     */
    private analyzeImplementation;
    /**
     * Validate workflow for common issues
     */
    validate(workflow: Workflow): ValidationResult;
    /**
     * Extract all template variables used in a workflow
     */
    extractTemplateVariables(workflow: Workflow): Set<string>;
    /**
     * Find all workflows that this workflow depends on
     */
    getDependencies(workflow: Workflow): string[];
    /**
     * Find all workflows that depend on this workflow
     */
    getDependents(workflow: Workflow): string[];
    /**
     * Get stack components by type
     */
    getComponentsByType(workflow: Workflow, type: string): Array<[string, StackComponent]>;
}
export interface ValidationResult {
    valid: boolean;
    errors: string[];
    warnings: string[];
}
//# sourceMappingURL=workflow-engine.d.ts.map