export interface DiscoveredPeer { name: string; ip: string; tags?: string[]; online: boolean; source: 'tailscale' | 'lan'; } export interface DiscoveredContext { /** Best hub candidate (the on-site box). */ hub?: DiscoveredPeer; /** InfiniBot gateway if found on the tailnet. */ gateway?: { host: string; port: number; token?: string; }; /** Robots discovered on LAN or Tailscale. */ robots: DiscoveredPeer[]; /** Tailscale auth key if one is cached locally. */ tailscaleAuthKey?: string; /** Existing infinicode mesh token if already configured. */ meshToken?: string; /** Existing infinicode mesh port. */ meshPort?: number; /** This machine's hostname. */ localName: string; } interface TailscalePeer { HostName?: string; DNSName?: string; TailscaleIPs?: string[]; Online?: boolean; Tags?: string[]; } interface TailscaleStatus { Self?: TailscalePeer; Peer?: Record; } /** Run `tailscale status --json` and parse. */ export declare function tailscaleStatus(): Promise; /** Discover peers from Tailscale. */ export declare function discoverTailscale(): Promise; /** Scan LAN UDP beacons on the default mesh discovery port. */ export declare function discoverLan(port?: number, timeoutMs?: number): Promise; /** Read a Tailscale auth key from common locations. */ export declare function findTailscaleAuthKey(): string | undefined; /** Read InfiniBot gateway config from common locations. */ export declare function findInfinibotGateway(): { host: string; port: number; token?: string; } | undefined; /** Read existing infinicode mesh token/port from config. */ export declare function readInfinicodeFederation(): { token?: string; port?: number; }; /** Build the full discovered context for this environment. */ export declare function discoverContext(options?: { lan?: boolean; }): Promise; /** Generate a random token for mesh auth or scheduler enrollment. */ export declare function generateToken(length?: number): string; export {};