/**
 * Multi-Agent System
 *
 * The main orchestration layer that coordinates multiple specialized agents
 * to solve complex software engineering tasks collaboratively.
 *
 * Based on research from:
 * - ComplexAgents (EMNLP 2024)
 * - Paper2Code (arXiv 2504.17192)
 * - AgentCoder (Huang et al., 2023)
 */
import { EventEmitter } from "events";
import { AgentRole, ExecutionPlan, SharedContext, WorkflowResult, WorkflowOptions, CodebaseInfo, ToolExecutor } from "./types.js";
import { BaseAgent } from "./base-agent.js";
/**
 * Main Multi-Agent System class
 */
export declare class MultiAgentSystem extends EventEmitter {
    private apiKey;
    private baseURL?;
    private agents;
    private orchestrator;
    private isRunning;
    private currentPlan;
    private sharedContext;
    private timeline;
    private tools;
    private toolExecutor;
    constructor(apiKey: string, baseURL?: string, toolExecutor?: ToolExecutor);
    /**
     * Set up event forwarding from all agents
     */
    private setupAgentEventForwarding;
    /**
     * Handle messages between agents
     */
    private handleAgentMessage;
    /**
     * Default tool executor (placeholder - should be replaced with actual implementation)
     */
    private defaultToolExecutor;
    /**
     * Set the tool executor function
     */
    setToolExecutor(executor: ToolExecutor): void;
    /**
     * Initialize tools
     */
    initializeTools(): Promise<void>;
    /**
     * Run a complete workflow for a given goal
     */
    runWorkflow(goal: string, options?: Partial<WorkflowOptions>): Promise<WorkflowResult>;
    /**
     * Execute tasks sequentially
     */
    private executeSequential;
    /**
     * Execute tasks in parallel where possible
     */
    private executeParallel;
    /**
     * Execute with hierarchical delegation (orchestrator controls)
     */
    private executeHierarchical;
    /**
     * Execute with peer review (coder + reviewer collaboration)
     */
    private executePeerReview;
    /**
     * Execute with iterative refinement
     */
    private executeIterative;
    /**
     * Execute a single task
     */
    private executeTask;
    /**
     * Perform final review of all changes
     */
    private performFinalReview;
    /**
     * Add an event to the timeline
     */
    private addTimelineEvent;
    /**
     * Create an empty plan (for error cases)
     */
    private createEmptyPlan;
    /**
     * Chunk array into smaller arrays
     */
    private chunk;
    /**
     * Stop the current workflow
     */
    stop(): void;
    /**
     * Get the current plan
     */
    getCurrentPlan(): ExecutionPlan | null;
    /**
     * Get the shared context
     */
    getSharedContext(): SharedContext;
    /**
     * Get an agent by role
     */
    getAgent(role: AgentRole): BaseAgent | undefined;
    /**
     * Add a decision to the shared context
     */
    addDecision(description: string, madeBy: AgentRole, rationale: string, alternatives?: string[]): void;
    /**
     * Update codebase info in shared context
     */
    setCodebaseInfo(info: CodebaseInfo): void;
    /**
     * Add relevant files to context
     */
    addRelevantFiles(files: string[]): void;
    /**
     * Add constraints to the workflow
     */
    addConstraints(constraints: string[]): void;
    /**
     * Reset the system for a new workflow
     */
    reset(): void;
    /**
     * Dispose and cleanup
     */
    dispose(): void;
    /**
     * Format workflow result for display
     */
    formatResult(result: WorkflowResult): string;
}
/**
 * Create a new MultiAgentSystem instance
 */
export declare function createMultiAgentSystem(apiKey: string, baseURL?: string, toolExecutor?: ToolExecutor): MultiAgentSystem;
export declare function getMultiAgentSystem(apiKey: string, baseURL?: string, toolExecutor?: ToolExecutor): MultiAgentSystem;
export declare function resetMultiAgentSystem(): void;
