/** Progress callback — matches cc's signature. */
export type ProgressCallback = (lastLines: string, allLines: string, totalLines: number, totalBytes: number, isIncomplete: boolean) => void;
/** Max output file on disk (background tasks). */
export declare const MAX_TASK_OUTPUT_BYTES: number;
export declare const MAX_TASK_OUTPUT_BYTES_DISPLAY = "5GB";
/** Lazily generate session-scoped task output directory. */
export declare function getTaskOutputDir(): string;
/** Set the task output directory (for embedding hosts to override). */
export declare function setTaskOutputDir(dir: string): void;
export declare function getTaskOutputPath(taskId: string): string;
/**
 * Single source of truth for a shell command's output.
 * Ported from cc's TaskOutput.
 *
 * For bash commands (file mode): both stdout/stderr go to file fd.
 * For hooks (pipe mode): data flows through writeStdout/writeStderr.
 */
export declare class TaskOutput {
    #private;
    readonly taskId: string;
    readonly path: string;
    readonly stdoutToFile: boolean;
    constructor(taskId: string, onProgress: ProgressCallback | null, stdoutToFile?: boolean, maxMemory?: number);
    /** Write stdout data (pipe mode). */
    writeStdout(data: string): void;
    /** Write stderr data (pipe mode). */
    writeStderr(data: string): void;
    /** Get captured stdout. For file mode, reads from disk. */
    getStdout(): Promise<string>;
    /** Get captured stderr. In file mode stderr is interleaved with stdout. */
    getStderr(): string;
    get outputFileSize(): number;
    /**
     * Whether the output file content is fully contained in getStdout().
     * If true, the file can be deleted.
     */
    get outputFileRedundant(): boolean;
    /** Write in-memory buffer to disk file. */
    spillToDisk(): void;
    /** Delete the output file on disk. */
    deleteOutputFile(): Promise<void>;
    /** Clean up all resources. */
    clear(): void;
}
