import type { NodeInvokeResult, NodeRegistry } from "../node-registry.js"; import type { PeerManager } from "./peer-manager.js"; /** Node info from a remote peer gateway. */ export type RemoteNodeInfo = { nodeId: string; displayName?: string; platform?: string; version?: string; caps: string[]; commands: string[]; connectedAtMs: number; }; /** A node session extended with mesh metadata. */ export type MeshNodeSession = { nodeId: string; displayName?: string; platform?: string; version?: string; deviceFamily?: string; modelIdentifier?: string; caps: string[]; commands: string[]; connectedAtMs: number; /** Which gateway this node is connected to. */ gatewayId: string; /** True if this node is on a remote peer gateway. */ remote: boolean; }; /** * Unified node registry that merges local nodes with remote nodes from peer gateways. * Provides transparent cross-gateway node listing and command forwarding. */ export declare class MeshNodeRegistry { private localGatewayId; private localRegistry; private peerManager; constructor(localGatewayId: string, localRegistry: NodeRegistry, peerManager: PeerManager); /** List all nodes across all gateways (local + remote). */ listAll(): MeshNodeSession[]; /** Get a node by ID (local or remote). */ get(nodeId: string): MeshNodeSession | undefined; /** * Invoke a command on a node (local or remote). * If the node is local, delegates to the local NodeRegistry. * If the node is on a remote peer, forwards the invoke via the mesh. */ invoke(params: { nodeId: string; command: string; params?: unknown; timeoutMs?: number; idempotencyKey?: string; }): Promise; }