export type StreamOutputMode = "line" | "delta";
export declare function createStreamOutputGate({ stdout, clearProgressForStdout, restoreProgressAfterStdout, outputMode, richTty, rewriteOnReplacement, restoreDuringStream, }: {
    stdout: NodeJS.WritableStream;
    clearProgressForStdout: () => void;
    restoreProgressAfterStdout?: (() => void) | null;
    outputMode: StreamOutputMode;
    richTty: boolean;
    rewriteOnReplacement?: boolean;
    restoreDuringStream?: boolean;
}): {
    handleChunk: (streamed: string, prevStreamed: string) => boolean;
    finalize: (finalText: string) => boolean;
    reset: () => void;
    getFlushedLen: () => number;
};
