import { spawn } from "node:child_process"; export declare class DesktopCreationRpcError extends Error { readonly code: string; readonly requestDispatched: boolean; readonly method?: string | undefined; readonly requestId?: number | undefined; readonly rpcCode?: number | undefined; constructor(code: string, message: string, requestDispatched: boolean, method?: string | undefined, requestId?: number | undefined, rpcCode?: number | undefined); } export interface DesktopCreationRpc { request(method: string, params: Record, options?: { beforeDispatch?: () => void | Promise; }): Promise; notifyInitialized(): void; close(): Promise; } export interface DesktopCreationRpcOptions { binaryPath: string; codexHome: string; timeoutMs?: number; environment?: NodeJS.ProcessEnv; spawnProcess?: typeof spawn; } /** A dedicated, short-lived bundled process. Never attaches to or kills an existing server. */ export declare function createDesktopCreationRpc(options: DesktopCreationRpcOptions): DesktopCreationRpc;