import { type SpawnOptions } from "node:child_process"; export declare const LIVE_CLIS: readonly ["codex", "claude", "kimi"]; export type LiveCli = (typeof LIVE_CLIS)[number]; export type LiveSafety = "read_only" | "non_read_only"; export declare const LIVE_PROGRESS_SCHEMA_VERSION: 1; export declare const MAX_LIVE_PROGRESS_EVENTS = 100; export declare const MAX_LIVE_NATIVE_LINE_CHARS: number; export declare const MAX_LIVE_FINAL_RESULT_CHARS: number; export type LiveActivity = "codex_turn" | "codex_item" | "claude_assistant" | "claude_stream" | "claude_result" | "kimi_assistant" | "native_stdout_unknown" | "native_stdout_malformed" | "native_stdout_line_capped" | "native_stderr"; export type LiveTerminalStatus = "completed" | "failed" | "timed_out" | "unavailable"; export type LiveProgressEvent = { schemaVersion: 1; sequence: number; cli: LiveCli; safety: LiveSafety; type: "started"; } | { schemaVersion: 1; sequence: number; cli: LiveCli; safety: LiveSafety; type: "activity"; activity: LiveActivity; } | { schemaVersion: 1; sequence: number; cli: LiveCli; safety: LiveSafety; type: "output_capped"; } | { schemaVersion: 1; sequence: number; cli: LiveCli; safety: LiveSafety; type: "terminal"; status: LiveTerminalStatus; }; export interface LiveChild { pid?: number; stdin: NodeJS.WritableStream | null; stdout: NodeJS.ReadableStream | null; stderr: NodeJS.ReadableStream | null; on(event: string, listener: (...args: never[]) => void): this; once(event: string, listener: (...args: never[]) => void): this; kill(signal?: NodeJS.Signals): boolean; } export type LiveSpawn = (executable: string, args: readonly string[], options: SpawnOptions) => LiveChild; export interface LiveProcessSeam { spawn: LiveSpawn; platform: NodeJS.Platform; kill: (pid: number, signal: NodeJS.Signals) => void; } export interface LiveRunOptions { prompt: string; cwd: string; timeoutMs: number; env: NodeJS.ProcessEnv; progress: (event: LiveProgressEvent) => void; deferCleanup: (cleanup: () => Promise) => void; process?: LiveProcessSeam; } export interface LiveResult { schemaVersion: 1; cli: LiveCli; safety: LiveSafety; result: string; } export interface LiveLaunch { executable: string; args: string[]; promptOnStdin: boolean; windowsVerbatimArguments?: boolean; } export declare function safetyFor(cli: LiveCli): LiveSafety; export declare function findOnPath(name: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, options?: { /** Reject a candidate (including its symlink target) below this root. */ excludeRoot?: string; /** `execFile` callers that cannot safely execute Windows command shims. */ windowsExeOnly?: boolean; }): string | undefined; /** Quote one prevalidated fixed cmd.exe token; prompt text never reaches this path. */ export declare function quoteCmd(value: string): string; export declare function launchFor(cli: LiveCli, prompt: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): LiveLaunch; /** Help/fixture-pinned terminal extraction; callers keep only the last candidate until process exit. */ export declare function extractFinalResult(cli: LiveCli, line: string): string | undefined; /** Run exactly one explicitly selected local CLI and return its one sanitized terminal result. */ export declare function runLiveCli(cli: LiveCli, options: LiveRunOptions): Promise;