import type { PeerRegistry } from "./peer-registry.js"; export type DiscoveryOptions = { gatewayId: string; gatewayUrl: string; displayName: string; token: string; koiId?: string; peerRegistry: PeerRegistry; platformUrl?: string; pollIntervalMs?: number; mdnsDiscovery?: boolean; log: { info: (msg: string) => void; warn: (msg: string) => void; error: (msg: string) => void; }; }; /** * Manages automatic peer discovery for the gateway mesh. * - Platform polling: heartbeats to the platform API, polls for peers * - mDNS: discovers gateways on the local network */ export declare class MeshDiscovery { private opts; private pollTimer; private stopped; constructor(opts: DiscoveryOptions); /** Start discovery loops. */ start(): Promise; /** Send heartbeat to platform. */ private heartbeat; /** Poll platform for peer gateways. */ private pollPeers; /** Discover gateways on the local network via Bonjour/mDNS. */ private startMdnsDiscovery; private runMdnsProbe; /** Stop all discovery. */ stop(): void; }