/**
 * chat-daemon RPC server (v0.7.1 Phase B).
 *
 * Runs INSIDE the daemon worker process. Listens on the platform-
 * correct socket address (Unix socket / named pipe) and dispatches
 * JSON-RPC method calls to the in-process ChatGateway.
 *
 * Connection model: stateless. Each line is one request; each response
 * goes back on the same connection. Connections may pipeline multiple
 * requests, and the server reads line-by-line (we keep a per-connection
 * buffer until \n).
 */
import type { ChatGateway } from "../gateway.js";
export interface RpcServerOptions {
    gateway: ChatGateway;
    dataRoot?: string;
    startedAt?: number;
    /** Daemon's process version string — surfaced by `ping`. */
    version?: string;
    /** Pid surfaced by `ping`. Defaults to process.pid. */
    pid?: number;
    /** Hook for tests: callback when a request is dispatched. */
    onRequest?: (method: string) => void;
}
export declare class RpcServer {
    private readonly opts;
    private server;
    private listening;
    private readonly address;
    private readonly startedAt;
    constructor(opts: RpcServerOptions);
    listen(): Promise<void>;
    close(): Promise<void>;
    private handleConnection;
    private dispatchLine;
    private respond;
    private handle;
}
//# sourceMappingURL=rpc-server.d.ts.map