/**
 * SmartPerfetto Pipeline Executor
 *
 * @deprecated Not used in Agent-Driven architecture (v5.0). See executors/strategyExecutor.ts.
 *
 * 流水线执行器，负责：
 * 1. 按阶段顺序执行分析任务
 * 2. 管理阶段依赖关系
 * 3. 支持并行执行
 * 4. 检查点和恢复
 * 5. 错误处理和重试
 * 6. 生命周期钩子支持
 */
import { EventEmitter } from 'events';
import { PipelineStage, StageResult, PipelineConfig, PipelineResult, PipelineCallbacks, Finding, SubAgentContext, SubAgentResult } from '../types';
import { HookRegistry } from '../hooks';
import { ContextBuilder } from '../context';
/**
 * 阶段执行器接口
 */
export interface StageExecutor {
    execute(stage: PipelineStage, context: SubAgentContext): Promise<SubAgentResult>;
}
/**
 * 流水线执行器实现
 *
 * @deprecated This class is no longer used in the Agent-Driven architecture (v5.0).
 * The new architecture uses StrategyExecutor for deterministic stage pipelines and
 * HypothesisExecutor for adaptive multi-round analysis. Retained for reference.
 * Will be removed in v6.0.
 */
export declare class PipelineExecutor extends EventEmitter {
    private config;
    private stages;
    private stageResults;
    private executors;
    private isRunning;
    private isPaused;
    private isCancelled;
    private startTime;
    private hookRegistry;
    private hookContext;
    private contextBuilder;
    constructor(config?: Partial<PipelineConfig>, hookRegistry?: HookRegistry, contextBuilder?: ContextBuilder);
    /**
     * 注册阶段执行器
     */
    registerExecutor(key: string, executor: StageExecutor): void;
    /**
     * 注册多个阶段执行器
     */
    registerExecutors(executors: Record<string, StageExecutor>): void;
    /**
     * 执行完整流水线
     */
    execute(context: SubAgentContext, callbacks?: Partial<PipelineCallbacks>, startFromStage?: string): Promise<PipelineResult>;
    /**
     * 从检查点恢复执行
     */
    resumeFrom(checkpointStageId: string, context: SubAgentContext, previousResults: StageResult[], callbacks?: Partial<PipelineCallbacks>): Promise<PipelineResult>;
    /**
     * 执行单个阶段
     */
    private executeStage;
    /**
     * 处理阶段错误
     */
    private handleStageError;
    /**
     * 获取执行顺序（拓扑排序）
     */
    private getExecutionOrder;
    /**
     * 等待依赖阶段完成
     */
    private waitForDependencies;
    /**
     * 并行执行一组阶段
     */
    executeParallel(stages: PipelineStage[], context: SubAgentContext, callbacks?: Partial<PipelineCallbacks>): Promise<StageResult[]>;
    /**
     * 获取可并行执行的阶段组
     */
    getParallelGroups(): PipelineStage[][];
    /**
     * 暂停执行
     */
    pause(): void;
    /**
     * 恢复执行
     */
    resume(): void;
    /**
     * 取消执行
     */
    cancel(): void;
    /**
     * 检查是否超时
     */
    private isTimedOut;
    /**
     * 获取阶段结果
     */
    getStageResult(stageId: string): StageResult | undefined;
    /**
     * 获取所有阶段结果
     */
    getAllResults(): StageResult[];
    /**
     * 获取所有发现
     */
    getAllFindings(): Finding[];
    /**
     * 计算进度
     */
    private calculateProgress;
    private createSuccessResult;
    private createErrorResult;
    private createPausedResult;
    private delay;
    /**
     * 获取阶段列表
     */
    getStages(): PipelineStage[];
    /**
     * 获取阶段
     */
    getStage(stageId: string): PipelineStage | undefined;
    /**
     * 重置执行器状态
     */
    reset(): void;
}
/**
 * 流水线超时错误
 */
declare class PipelineTimeoutError extends Error {
    constructor(message: string);
}
/**
 * 流水线中止错误
 */
declare class PipelineAbortError extends Error {
    constructor(message: string);
}
/**
 * 阶段超时错误
 */
declare class StageTimeoutError extends Error {
    constructor(message: string);
}
export { PipelineTimeoutError, PipelineAbortError, StageTimeoutError };
export default PipelineExecutor;
//# sourceMappingURL=pipelineExecutor.d.ts.map