export interface LspNotificationRecord {
    readonly method: string;
    readonly params?: unknown | undefined;
    readonly receivedAt: number;
}
export declare class LspClient {
    private command;
    private args;
    private options?;
    private proc;
    private nextId;
    private pendingRequests;
    private readonly notifications;
    private buffer;
    private readLoopRunning;
    constructor(command: string, args: string[], options?: {
        cwd?: string | undefined;
        env?: Record<string, string>;
        timeout?: number;
    } | undefined);
    /** Start the LSP server process. */
    start(): Promise<void>;
    /** Send a request and wait for response. */
    request<T = unknown>(method: string, params?: unknown): Promise<T>;
    /** Send a notification (no response expected). */
    notify(method: string, params?: unknown): void;
    takeNotifications(predicate: (notification: LspNotificationRecord) => boolean): LspNotificationRecord[];
    /** Stop the server process. */
    stop(): Promise<void>;
    /** Is the server running? */
    get isRunning(): boolean;
    private _startReadLoop;
    private _processBuffer;
    private _dispatchMessage;
    /** Encode a JSON-RPC frame (Content-Length framing). Exposed for testing. */
    static encodeFrame(json: string): string;
    /** Parse all complete JSON-RPC messages from a buffer string. Returns [messages, remainingBuffer]. */
    static parseMessages(buffer: string): [unknown[], string];
}
//# sourceMappingURL=client.d.ts.map