import { ChildProcess } from 'child_process';
type RpcHandler<TInput, TOutput> = (input: TInput) => Promise<TOutput>;
export type RpcMessage = {
    type: 'rpc_request';
    id: string | undefined;
    method: string;
    args: unknown;
};
export declare class RpcProcessor {
    private child;
    private handlers;
    private isClosed;
    constructor(child: ChildProcess);
    handler<TInput, TOutput = unknown>(method: string, handler: RpcHandler<TInput, TOutput>): void;
    handle(method: string, input: unknown): Promise<any>;
    private response;
    init(): Promise<void>;
}
export {};
