import { type ChildProcess } from 'node:child_process';
type AcpChildProcess = ChildProcess;
export interface AcpMcpServerInput {
    type?: unknown;
    name?: unknown;
    command?: unknown;
    args?: unknown;
    env?: unknown;
}
interface AcpSessionOptions {
    mcpServers?: AcpMcpServerInput[];
}
export interface ModelOption {
    id: string;
    label: string;
}
interface DetectAcpModelsOptions {
    bin: string;
    args: string[];
    cwd?: string;
    env?: NodeJS.ProcessEnv;
    timeoutMs?: number;
    clientName?: string;
    clientVersion?: string;
    defaultModelOption?: ModelOption;
}
interface AttachAcpSessionOptions {
    child: AcpChildProcess;
    prompt: string;
    cwd?: string;
    model?: string | null;
    mcpServers?: AcpMcpServerInput[];
    send: (event: string, payload: unknown) => void;
    clientName?: string;
    clientVersion?: string;
    stageTimeoutMs?: number;
}
export declare function buildAcpSessionNewParams(cwd: string, { mcpServers }?: AcpSessionOptions): {
    cwd: string;
    mcpServers: {
        type: string;
        name: string;
        command: string;
        args: any[];
        env: any[];
    }[];
};
export declare function normalizeModels(models: unknown, defaultModelOption: ModelOption, configOptions?: unknown): ModelOption[];
export declare function createJsonLineStream(onMessage: (message: unknown, rawLine: string) => void): {
    feed(chunk: string): void;
    flush(): void;
};
export declare function detectAcpModels({ bin, args, cwd, env, timeoutMs, clientName, clientVersion, defaultModelOption, }: DetectAcpModelsOptions): Promise<ModelOption[]>;
export declare function attachAcpSession({ child, prompt, cwd, model, mcpServers, send, clientName, clientVersion, stageTimeoutMs, }: AttachAcpSessionOptions): {
    hasFatalError(): boolean;
    completedSuccessfully(): boolean;
    abort(): void;
};
export {};
