/**
 * Serve mode: Run the agent as a persistent WebSocket server.
 *
 * Each WebSocket connection gets its own AgentSession with full RPC protocol.
 * The server listens on localhost (default port 3141).
 *
 * Protocol:
 * - Client sends JSON messages (same format as RPC commands)
 * - Server sends JSON messages (same format as RPC responses/events)
 * - One agent session per WebSocket connection
 */
import { type CreateAgentSessionOptions } from "../../core/sdk.js";
export interface ServeOptions {
    /** Port to listen on (default: 3141) */
    port: number;
    /** Host to bind to (default: 127.0.0.1) */
    host: string;
    /** Factory to create session options for each connection */
    sessionOptionsFactory: () => Promise<CreateAgentSessionOptions>;
}
export declare function readPidFile(): {
    pid: number;
    port: number;
} | null;
/**
 * Check if the daemon is running.
 */
export declare function isDaemonRunning(): {
    pid: number;
    port: number;
} | null;
/**
 * Start the WebSocket server.
 */
export declare function runServeMode(options: ServeOptions): Promise<never>;
//# sourceMappingURL=serve-mode.d.ts.map