import type { SSEMessage } from './sseConsumer.ts';
interface RendererOptions {
    uploadTotal?: number;
    output?: NodeJS.WritableStream;
}
/**
 * Deploy-time renderer that owns the progress display across two phases:
 *
 *   1. Local upload — driven by `tapUploadStream`, which wraps the multipart body so we
 *      can update a `cli-progress` bar against the precomputed uncompressed source-tree
 *      total. The bar moves as gzipped bytes are sent and snaps to 100% on completion.
 *      In a non-TTY environment a single "Uploaded X MiB" line is printed on completion.
 *
 *   2. Server-side phases — driven by `renderEvent`, called for each SSE message the
 *      CLI receives from the operations API. Phase events print one-liners; live
 *      `install` events (npm/pnpm/yarn stdout) are throttled to one line under a
 *      "[install]" header so a noisy `npm install` doesn't drown the terminal.
 *
 * Designed so the two phases hand off cleanly: `endUpload()` tears the bar down (so
 * it doesn't compete with subsequent prints) before any SSE events render.
 */
export declare class DeployRenderer {
    private upload;
    private phase;
    private output;
    private isTty;
    private uploadTotal;
    constructor(options?: RendererOptions);
    /**
     * Wrap an outbound stream so each byte flowing through it advances the upload bar.
     * The Transform is identity — chunks pass through unmodified.
     */
    tapUploadStream<T extends NodeJS.ReadableStream>(stream: T): NodeJS.ReadableStream;
    /**
     * Record `n` pre-gzip bytes read from the tar pack stream. Called for each
     * raw tar chunk by the `onBytes` callback passed to `streamPackagedDirectory`,
     * keeping progress and total in the same (uncompressed) unit so the bar
     * tracks smoothly and doesn't terminate far short of 100%.
     */
    countUploadBytes(n: number): void;
    endUpload(): void;
    private tickUpload;
    renderEvent(message: SSEMessage): void;
    private renderPhase;
    private renderInstall;
}
export {};
