import type { ExecFileOptions } from 'node:child_process';
export type RuntimeEnv = NodeJS.ProcessEnv | Record<string, string>;
export type RuntimeModelOption = {
    id: string;
    label: string;
};
export type RuntimeReasoningOption = RuntimeModelOption;
export type RuntimeBuildOptions = {
    model?: string | null;
    reasoning?: string | null;
};
export type RuntimeContext = {
    cwd?: string;
};
export type RuntimeCapabilityMap = Record<string, boolean>;
export type RuntimeListModels = {
    args: string[];
    timeoutMs?: number;
    parse: (stdout: string) => RuntimeModelOption[] | null;
};
export type RuntimePromptBudgetError = {
    code: 'AGENT_PROMPT_TOO_LARGE';
    message: string;
    bytes?: number;
    commandLineLength?: number;
    limit: number;
};
export type RuntimeAgentDef = {
    id: string;
    name: string;
    bin: string;
    versionArgs: string[];
    fallbackModels: RuntimeModelOption[];
    buildArgs: (prompt: string, imagePaths: string[], extraAllowedDirs?: string[], options?: RuntimeBuildOptions, runtimeContext?: RuntimeContext) => string[];
    streamFormat: string;
    fallbackBins?: string[];
    helpArgs?: string[];
    capabilityFlags?: Record<string, string>;
    promptViaStdin?: boolean;
    promptInputFormat?: 'text' | 'stream-json';
    eventParser?: string;
    env?: Record<string, string>;
    listModels?: RuntimeListModels;
    fetchModels?: (resolvedBin: string, env: RuntimeEnv) => Promise<RuntimeModelOption[] | null>;
    reasoningOptions?: RuntimeReasoningOption[];
    supportsImagePaths?: boolean;
    maxPromptArgBytes?: number;
    mcpDiscovery?: string;
    installUrl?: string;
    docsUrl?: string;
};
export type DetectedAgent = Omit<RuntimeAgentDef, 'buildArgs' | 'listModels' | 'fetchModels' | 'fallbackModels' | 'helpArgs' | 'capabilityFlags' | 'fallbackBins' | 'maxPromptArgBytes' | 'env'> & {
    models: RuntimeModelOption[];
    available: boolean;
    authStatus?: 'ok' | 'missing' | 'unknown';
    authMessage?: string;
    path?: string;
    version?: string | null;
};
export type RuntimeExecOptions = ExecFileOptions & {
    env?: NodeJS.ProcessEnv;
};
