import { Readable } from 'node:stream';
export interface ProgressEvent {
    event: string;
    data: unknown;
}
export type ProgressListener = (event: ProgressEvent) => void;
/**
 * Lightweight pub-sub used to report phase/install/replicate events from a long-running
 * operation back to the HTTP layer. We deliberately don't use Node's EventEmitter here:
 * we only need broadcast semantics for a small set of event types, and we want the
 * `emit(event, data)` shape that matches the SSE wire format directly.
 */
export declare class ProgressEmitter {
    private listeners;
    emit(event: string, data: unknown): void;
    subscribe(listener: ProgressListener): () => void;
}
/**
 * Wrap a long-running operation so its progress events stream back as Server-Sent Events.
 *
 * The returned Readable emits one SSE message per `emitter.emit(...)` call, then a final
 * `done` (or `error`) event with the operation's result, then ends. The caller is
 * expected to set Content-Type: text/event-stream on the response.
 */
export declare function createSSEResponseStream(emitter: ProgressEmitter, operation: () => Promise<unknown>): Readable;
