/** * Daemon Client * * Used by the CLI to communicate with the daemon process. * Handles spawning, discovery, and HTTP requests to the daemon. */ import type { DaemonAction, DaemonResponse, DaemonState } from './types.js'; export declare class DaemonRequestError extends Error { readonly action: string; readonly status: number; readonly response: DaemonResponse; readonly data?: Record; constructor(action: string, status: number, response: DaemonResponse); } /** * Ensure a daemon is running for the given project root and URL. * If no daemon is alive, spawns one and waits for it to be ready. * Returns the daemon state (port, token) needed for requests. */ export declare function ensureDaemon(projectRoot: string, url: string, options?: { headed?: boolean; }): Promise; /** * Send a request to the daemon HTTP server. */ export declare function daemonRequest(state: DaemonState, action: DaemonAction, params?: Record): Promise; /** * Stop the daemon by sending a shutdown command. */ export declare function stopDaemon(projectRoot: string, appPort?: number): Promise; /** * Get daemon status information. */ export declare function getDaemonStatus(projectRoot: string, appPort?: number): Promise<{ running: boolean; pid?: number; port?: number; url?: string; uptime?: number; }>; //# sourceMappingURL=client.d.ts.map