import { ChildProcess } from 'child_process';
import { CommunicationType } from './communication-config';
import { RpcHandler, MessageCallback } from './rpc-processor-interface';
import { BaseLogger } from '../logger';
export interface ProcessManagerOptions {
    command: string;
    args: string[];
    logger: BaseLogger;
    context?: string;
}
export declare class ProcessManager {
    private options;
    private child?;
    private processor?;
    private communicationType?;
    constructor(options: ProcessManagerOptions);
    spawn(): Promise<ChildProcess>;
    handler<TInput, TOutput = unknown>(method: string, handler: RpcHandler<TInput, TOutput>): void;
    onMessage<T = unknown>(callback: MessageCallback<T>): void;
    onProcessClose(callback: (code: number | null) => void): void;
    onProcessError(callback: (error: Error & {
        code?: string;
    }) => void): void;
    onStderr(callback: (data: Buffer) => void): void;
    onStdout(callback: (data: Buffer) => void): void;
    kill(): void;
    close(): void;
    get process(): ChildProcess | undefined;
    get commType(): CommunicationType | undefined;
}
