/** * ipc/server.ts — Unix Domain Socket IPC server. * * Creates the UDS, parses NDJSON requests, and delegates to a handler map. * Transport-specific handlers are registered by the per-project watcher. */ import type { IpcRequest } from "../types/ipc.js"; export type IpcHandler = (req: IpcRequest) => Promise<{ ok: true; result: Record; } | { ok: false; error: string; }>; export declare class IpcServer { private server; /** * The peer listener, if peering is configured. A second server object rather * than a second address on the first, because the two have different trust: * the unix socket is protected by file permissions and everything on it is * already local, while this one must authenticate every request. */ private peerServer; private readonly handlers; private readonly socketPath; constructor(socketPath: string); /** * Register a handler for an IPC method. */ on(method: string, handler: IpcHandler): void; /** * Start listening on the Unix Domain Socket. */ start(): void; /** * The cross-machine door. Closed unless somebody configured it. * * Everything that makes this safe is here rather than spread out: no default * port, no wildcard bind, and a secret checked on every single request before * the method is even looked up. A caller that reached the port has proved * nothing except that it reached the port. */ private startPeerListener; /** * Stop the IPC server. */ stop(): void; private dispatch; } //# sourceMappingURL=server.d.ts.map