/** * daemon/peer-handlers.ts — pairing, and reaching sessions on another machine. * * The whole cross-machine surface is four verbs a person types once and then * forgets: invite, join, list, forget. Everything after that is ordinary — a * session on the guest appears in listings as `guest/` and takes * messages like any other, because the alternative is every call site growing a * branch for "unless it is remote", and branches like that are never added * everywhere they are needed. */ import type { IpcServer } from "../ipc/server.js"; /** * Sessions on every paired hub, named `peer/session`. * * Best effort by design: a peer that is asleep, rebuilding or simply switched * off must not stop the local list being returned. An unreachable peer is * reported as unreachable rather than omitted, because a machine silently * missing from a list is indistinguishable from a machine with no sessions — * and those want opposite reactions. */ export declare function remoteSessions(): Promise<{ sessions: Array>; unreachable: Array<{ peer: string; why: string; }>; }>; /** Forward a call to whichever peer owns the addressed session. */ export declare function forwardToPeer(target: string, method: string, params: Record): Promise<{ ok: boolean; result?: any; error?: string; } | null>; export declare function registerPeerHandlers(server: IpcServer): void; //# sourceMappingURL=peer-handlers.d.ts.map