export declare function meshDir(): string; export declare function socketPathFor(dir: string): string; /** * Why `dir` cannot be trusted to hold the hub socket, or undefined when it can: it must be a real * directory (not a symlink) owned by this user that nobody else can enter. Both the hub and its * clients check this, so a `MONOMIND_MESH_DIR` pointing somewhere shared or planted is refused. */ export declare function privateDirProblem(dir: string): string | undefined; export interface HubOptions { dir: string; host: string; now?: () => number; isAlive?: (pid: number) => boolean; staleMs?: number; goneMs?: number; sweepMs?: number; idleExitMs?: number; /** A connection that sends nothing for this long is closed (default 60 s). */ connIdleMs?: number; /** A half-sent line must be finished within this long (default 5 s): defeats trickling bytes. */ partialLineMs?: number; onIdle?: () => void; } export declare class MeshHub { readonly socketPath: string; private readonly server; private readonly store; private readonly lock; private readonly o; private readonly now; private readonly isAlive; private readonly staleMs; private readonly goneMs; private readonly idleExitMs; private lastBusy; private idleFired; private timer?; private readonly sockets; private constructor(); static start(o: HubOptions): Promise; private onConnection; private handle; /** True when `key` is the one issued for this live address (only its hash is stored). */ private authorized; /** The caller proves it owns a live address by its key, or by repeating the nonce it registered with. */ private ownsAddress; private dispatch; /** One presence pass: stale/gone transitions, idle-exit check. */ sweepNow(): void; stop(): Promise; } //# sourceMappingURL=hub.d.ts.map