/**
 * Workflow Engine - Main orchestrator for workflow execution
 */
import { EventEmitter } from 'events';
import type { WorkflowDefinition, WorkflowContext, WorkflowState, WorkflowResult, WorkflowExecutionOptions, StepResult } from './types.js';
import { WorkflowStateManager } from './state-manager.js';
export declare class WorkflowEngine extends EventEmitter {
    private workflows;
    private stateManager;
    private stepManager;
    private runningWorkflows;
    constructor(statesDir?: string);
    private registerBuiltInWorkflows;
    registerWorkflow(workflow: WorkflowDefinition): void;
    unregisterWorkflow(workflowId: string): boolean;
    getWorkflow(workflowId: string): WorkflowDefinition | undefined;
    getWorkflows(): WorkflowDefinition[];
    registerAction(name: string, handler: (context: WorkflowContext) => Promise<StepResult>): void;
    startWorkflow(workflowId: string, options?: WorkflowExecutionOptions): Promise<WorkflowResult>;
    resumeWorkflow(instanceId: string): Promise<WorkflowResult>;
    pauseWorkflow(instanceId: string): boolean;
    cancelWorkflow(instanceId: string): boolean;
    private executeWorkflow;
    private buildResult;
    getWorkflowState(instanceId: string): WorkflowState | undefined;
    getWorkflowInstances(): WorkflowState[];
    getRunningWorkflows(): string[];
    getStats(): ReturnType<WorkflowStateManager['getStats']>;
    formatResult(result: WorkflowResult): string;
    formatWorkflows(): string;
    dispose(): void;
}
export declare function getWorkflowEngine(statesDir?: string): WorkflowEngine;
export declare function resetWorkflowEngine(): void;
