/**
 * Multi-Agent Orchestrator
 *
 * Coordinates multiple agents working together on complex tasks.
 */
import { EventEmitter } from 'events';
import type { AgentDefinition, AgentInstance, AgentStatus, TaskDefinition, TaskInstance, WorkflowDefinition, WorkflowInstance, AgentMessage, OrchestratorConfig, OrchestratorStats, OrchestratorEventHandler } from './types.js';
/**
 * Multi-Agent Orchestrator
 */
export declare class Orchestrator extends EventEmitter {
    private config;
    private agents;
    private tasks;
    private workflows;
    private taskQueue;
    private messageQueue;
    private startTime;
    private completedTaskCount;
    private failedTaskCount;
    private totalTaskDuration;
    private running;
    constructor(config?: Partial<OrchestratorConfig>);
    /**
     * Register a new agent
     */
    registerAgent(definition: AgentDefinition): AgentInstance;
    /**
     * Unregister an agent
     */
    unregisterAgent(agentId: string): boolean;
    /**
     * Get agent by ID
     */
    getAgent(agentId: string): AgentInstance | undefined;
    /**
     * Get all agents
     */
    getAllAgents(): AgentInstance[];
    /**
     * Update agent status
     */
    updateAgentStatus(agentId: string, status: AgentStatus): void;
    /**
     * Find available agent for task
     */
    findAvailableAgent(task: TaskDefinition): AgentInstance | null;
    /**
     * Create a new task
     */
    createTask(definition: TaskDefinition): TaskInstance;
    /**
     * Queue a task for execution
     */
    queueTask(taskId: string): void;
    /**
     * Insert task into priority queue
     */
    private insertIntoQueue;
    /**
     * Assign task to agent
     */
    assignTask(taskId: string, agentId: string): void;
    /**
     * Start task execution
     */
    startTask(taskId: string): void;
    /**
     * Complete a task
     */
    completeTask(taskId: string, output: Record<string, unknown>): void;
    /**
     * Fail a task
     */
    failTask(taskId: string, error: string): void;
    /**
     * Get task by ID
     */
    getTask(taskId: string): TaskInstance | undefined;
    /**
     * Cancel a task
     */
    cancelTask(taskId: string): void;
    /**
     * Process the task queue
     */
    processQueue(): void;
    /**
     * Start the orchestrator
     */
    start(): void;
    /**
     * Stop the orchestrator
     */
    stop(): void;
    /**
     * Start a workflow
     */
    startWorkflow(definition: WorkflowDefinition, input: Record<string, unknown>): Promise<WorkflowInstance>;
    /**
     * Execute a workflow
     */
    private executeWorkflow;
    /**
     * Execute a workflow step
     */
    private executeWorkflowStep;
    /**
     * Execute a task step
     */
    private executeTaskStep;
    /**
     * Execute parallel branches
     */
    private executeParallelStep;
    /**
     * Execute conditional step
     */
    private executeConditionalStep;
    /**
     * Execute loop step
     */
    private executeLoopStep;
    /**
     * Wait for task completion
     */
    private waitForTask;
    /**
     * Resolve variables in an object
     */
    private resolveVariables;
    /**
     * Evaluate a condition
     */
    private evaluateCondition;
    /**
     * Send a message between agents
     */
    sendMessage(message: Omit<AgentMessage, 'id' | 'timestamp'>): void;
    /**
     * Get messages for an agent
     */
    getMessagesForAgent(agentId: string): AgentMessage[];
    /**
     * Get orchestrator statistics
     */
    getStats(): OrchestratorStats;
    /**
     * Calculate throughput (tasks/min)
     */
    private calculateThroughput;
    private log;
    /**
     * Add event handler
     */
    onEvent(handler: OrchestratorEventHandler): void;
}
