import { EventEmitter } from "events";
import { SubagentResult } from "./subagents.js";
import { CodeBuddyToolCall } from "../codebuddy/client.js";
import { ToolResult } from "../types/index.js";
export interface PipelineStage {
    name: string;
    agent: string;
    inputTransform?: string;
    outputCapture?: string;
    timeout?: number;
    retryOnFailure?: boolean;
    maxRetries?: number;
    condition?: string;
}
export interface AgentPipeline {
    name: string;
    description: string;
    stages: PipelineStage[];
    passContext: boolean;
    haltOnFailure: boolean;
    timeout?: number;
    variables?: Record<string, string>;
}
export interface PipelineResult {
    success: boolean;
    pipelineName: string;
    stageResults: Map<string, StageResult>;
    capturedVariables: Record<string, string>;
    totalDuration: number;
    failedStage?: string;
    error?: string;
}
export interface StageResult {
    stageName: string;
    agentType: string;
    result: SubagentResult;
    duration: number;
    retries: number;
}
export declare const PREDEFINED_PIPELINES: Record<string, AgentPipeline>;
/**
 * Agent Pipeline Runner - Execute multi-stage agent workflows
 */
export declare class PipelineRunner extends EventEmitter {
    private manager;
    private customPipelines;
    private isRunning;
    constructor(apiKey: string, baseURL?: string);
    /**
     * Register a custom pipeline
     */
    registerPipeline(pipeline: AgentPipeline): void;
    /**
     * Get a pipeline by name
     */
    getPipeline(name: string): AgentPipeline | null;
    /**
     * Get all available pipelines
     */
    getAvailablePipelines(): string[];
    /**
     * Run a pipeline
     */
    runPipeline(pipelineName: string, task: string, options?: {
        tools?: import("../codebuddy/client.js").CodeBuddyTool[];
        executeTool?: (toolCall: CodeBuddyToolCall) => Promise<ToolResult>;
        initialVariables?: Record<string, string>;
    }): Promise<PipelineResult>;
    /**
     * Stop the current pipeline
     */
    stop(): void;
    /**
     * Interpolate variables into a template string
     */
    private interpolateTemplate;
    /**
     * Evaluate a condition string
     */
    private evaluateCondition;
    /**
     * Format pipeline result for display
     */
    formatResult(result: PipelineResult): string;
    /**
     * Format available pipelines for display
     */
    formatAvailablePipelines(): string;
    /**
     * Dispose resources and cleanup
     */
    dispose(): void;
}
export declare function getPipelineRunner(apiKey: string, baseURL?: string): PipelineRunner;
export declare function resetPipelineRunner(): void;
