import { WebSocket } from 'ws'; import type { AgentInfo } from '../shared.js'; interface RegistryEntry { ws: WebSocket; info: AgentInfo; } export declare class Registry { private byWs; private byId; /** * Register a new agent. If ANY other connections with the same name exist, * they are ALL evicted (last-writer-wins) — prevents stale duplicates * when an IDE restarts and spawns a fresh MCP process. * Returns the new AgentInfo plus any evicted WebSockets to close. */ register(ws: WebSocket, info: Omit): { agent: AgentInfo; evicted: WebSocket[]; }; remove(ws: WebSocket): AgentInfo | undefined; findById(id: string): RegistryEntry | undefined; findByName(name: string): RegistryEntry | undefined; getInfo(ws: WebSocket): AgentInfo | undefined; list(): AgentInfo[]; allConnections(): Array<{ ws: WebSocket; info: AgentInfo; }>; resolve(nameOrId: string): RegistryEntry | undefined; } export {}; //# sourceMappingURL=registry.d.ts.map