import type { ControlRequest, ControlResponse } from './protocol.js'; export interface ControlRequestOpts { /** Path of the control socket (defaults provided by callers). */ socketPath: string; /** The request to send. */ request: ControlRequest; /** Connect + I/O timeout (ms). Defaults to 5s. */ timeoutMs?: number; } /** * Sends a single request to the running sigil-mcp control socket and returns * the parsed response. Throws ControlClientError if: * - the socket file is missing or refused (server not running) * - the connection times out * - the response is not valid JSON * * Note: a server-side denial (wrong passphrase, etc.) is NOT thrown — it * comes back as a ControlResponse with `ok: false`. Callers branch on that. */ export declare function controlRequest(opts: ControlRequestOpts): Promise; export type ControlClientErrorCode = 'SERVER_DOWN' | 'CONNECT_FAILED' | 'TIMEOUT' | 'BAD_RESPONSE' | 'NO_RESPONSE'; export declare class ControlClientError extends Error { readonly code: ControlClientErrorCode; constructor(message: string, code: ControlClientErrorCode); } //# sourceMappingURL=client.d.ts.map