/** * Agent Coordinator - Manages coordination between agents in a network * * The Coordinator is responsible for: * - Managing agent lifecycle and state * - Coordinating task execution across multiple agents * - Handling agent dependencies and execution order * - Managing shared context and state between agents */ import type { Agent } from "../agent.js"; import type { AgentStatus, CoordinatorConfig, CoordinationResult, TaskAssignment } from "../../types/index.js"; /** * Agent Coordinator - Orchestrates multi-agent execution */ export declare class AgentCoordinator { private agents; private config; private emitter; private activeExecutions; private executionHistory; private roundRobinCursor; constructor(config?: Partial); /** * Register an agent with the coordinator */ registerAgent(agent: Agent): void; /** * Unregister an agent */ unregisterAgent(agentId: string): void; /** * Get all registered agents */ getAgents(): Agent[]; /** * Get agent status */ getAgentStatus(agentId: string): AgentStatus | undefined; /** * Execute a coordinated task across agents */ coordinate(task: string, options?: Partial): Promise; /** * Execute agents sequentially */ private executeSequential; /** * Execute agents in parallel */ private executeParallel; /** * Execute agents in a pipeline (output feeds into next) */ private executePipeline; /** * Execute using round-robin distribution */ private executeRoundRobin; /** * Execute using least busy agent */ private executeLeastBusy; /** * Execute an agent with timeout */ private executeAgentWithTimeout; /** * Execute multiple task assignments with dependencies */ executeWithDependencies(assignments: TaskAssignment[]): Promise; /** * Update coordinator configuration */ updateConfig(config: Partial): void; /** * Subscribe to coordinator events */ on(event: string, handler: (...args: unknown[]) => void): void; /** * Unsubscribe from coordinator events */ off(event: string, handler: (...args: unknown[]) => void): void; }