import type { RunningChildProcess } from './child-process.js'; export interface AcpJsonRpcPeerOptions { label: string; onNotification(message: Record): Promise | void; onRequest(message: Record): Promise | void; onUnstructuredOutput(text: string): Promise | void; } export declare class AcpJsonRpcError extends Error { readonly method: string; readonly error: Record; constructor(method: string, error: Record, label: string); } export declare class AcpJsonRpcPeer { private readonly child; private readonly options; private readonly lines; private nextRequestId; private readonly pending; constructor(child: RunningChildProcess, options: AcpJsonRpcPeerOptions); acceptStdoutChunk(chunk: string): Promise; request(method: string, params: Record): Promise | undefined>; notify(method: string, params: Record): void; respond(id: unknown, result: Record): void; respondError(id: unknown, code: number, message: string): void; rejectAll(error: unknown): void; private acceptLine; private handleResponse; private write; } //# sourceMappingURL=acp-json-rpc.d.ts.map