/** * UDSClient — owner-side IPC socket client (Unix Domain Socket / Named Pipe). * * The counterpart of UDSServer: connects to a hub, speaks the length-prefixed * MessagePack wire format, and emits decoded NamespacedMessages. Connection * retry is built in so a session host can outlive hub restarts. * * This is transport plumbing only — handshake, announcements, and session * semantics live in IPCSessionHost. */ import { EventEmitter } from 'events'; import { type NamespacedMessage } from './wire.js'; export interface UDSClientOptions { socketPath: string; /** Reconnect automatically after connection loss (default: true). */ autoRetry?: boolean; retryIntervalMs?: number; } export interface UDSClientEvents { connect: []; disconnect: [reason: string]; message: [msg: NamespacedMessage]; error: [err: Error]; } export interface UDSClient extends EventEmitter { on(event: K, listener: (...args: UDSClientEvents[K]) => void): this; off(event: K, listener: (...args: UDSClientEvents[K]) => void): this; emit(event: K, ...args: UDSClientEvents[K]): boolean; } export declare class UDSClient extends EventEmitter { private readonly options; private socket; private buffer; private retryTimer; private disposed; constructor(options: UDSClientOptions); isConnected(): boolean; /** Resolves true once connected, false if the attempt failed. */ connect(): Promise; send(msg: NamespacedMessage): boolean; disconnect(reason?: string): void; dispose(): void; private adopt; private handleData; private scheduleRetry; private cancelRetry; } export declare function createUDSClient(options: UDSClientOptions): UDSClient; //# sourceMappingURL=uds-client.d.ts.map