import { EventEmitter } from 'events'; import { AgentInfo, AgentStatus, AgentCapability, AgentMetrics } from '../types'; /** * Dynamic registry for tracking connected agents and their capabilities * Maintains agent state, metrics, and capability discovery */ export declare class AgentRegistry extends EventEmitter { private agents; private capabilityIndex; private metricsInterval; constructor(); /** * Register a new agent */ registerAgent(agentId: string, connectionId: string, capabilities: AgentCapability[], metadata?: Record): AgentInfo; /** * Unregister an agent (on disconnect) */ unregisterAgent(agentId: string): boolean; /** * Get agent information */ getAgent(agentId: string): AgentInfo | undefined; /** * Get all registered agents */ getAllAgents(): AgentInfo[]; /** * Backward-compatible alias for dashboard routes */ getAgents(): AgentInfo[]; /** * Get online agents only */ getOnlineAgents(): AgentInfo[]; /** * Find agents by capability */ findAgentsByCapability(capabilityName: string): AgentInfo[]; /** * Find agents by multiple capabilities (AND logic) */ findAgentsByCapabilities(capabilityNames: string[]): AgentInfo[]; /** * Find best agent for a task based on capabilities and load */ findBestAgent(requiredCapabilities: string[]): AgentInfo | null; /** * Update agent status */ updateAgentStatus(agentId: string, status: AgentStatus): boolean; /** * Update agent metrics */ updateAgentMetrics(agentId: string, metrics: Partial): boolean; /** * Record task start for an agent */ recordTaskStart(agentId: string): boolean; /** * Record task completion for an agent */ recordTaskCompletion(agentId: string, responseTime: number, success: boolean): boolean; /** * Get all available capabilities across all agents */ getAllCapabilities(): string[]; /** * Get registry statistics */ getStats(): { totalAgents: number; onlineAgents: number; offlineAgents: number; totalCapabilities: number; totalTasksInProgress: number; totalTasksCompleted: number; totalTasksFailed: number; }; /** * Start periodic metrics collection */ private startMetricsCollection; /** * Stop metrics collection */ stop(): void; /** * Clear all agents (for testing/reset) */ clear(): void; } //# sourceMappingURL=AgentRegistry.d.ts.map