import { EventEmitter } from "node:events";
import type { RemoteNodeInfo } from "./mesh-node-registry.js";
export type PeerStatus = "connecting" | "connected" | "disconnected" | "failed";
export type GatewayPeerInfo = {
    gatewayId: string;
    url: string;
    displayName: string;
    status: PeerStatus;
    nodes: RemoteNodeInfo[];
    lastSeen: number;
    source: "platform" | "mdns" | "config";
};
export declare class PeerRegistry extends EventEmitter {
    private peers;
    add(info: Omit<GatewayPeerInfo, "status" | "nodes" | "lastSeen">): GatewayPeerInfo;
    remove(gatewayId: string): boolean;
    get(gatewayId: string): GatewayPeerInfo | undefined;
    setStatus(gatewayId: string, status: PeerStatus): void;
    setNodes(gatewayId: string, nodes: RemoteNodeInfo[]): void;
    listAll(): GatewayPeerInfo[];
    listConnected(): GatewayPeerInfo[];
    /** Get a peer by URL (used during discovery dedup). */
    findByUrl(url: string): GatewayPeerInfo | undefined;
    clear(): void;
}
