/** A frame larger than this is a broken helper, not a frame. */
export declare const MAX_FRAME_BYTES: number;
/**
 * Splits a helper's stdout into records: a 4-byte big-endian length, then that
 * many bytes. Pipes deliver arbitrary chunks, so a record may span many, and a
 * chunk may hold several. The simulator forwards the payloads as JPEG frames;
 * the Mac window stream reads the same shape, but each record starts with a tag
 * byte and its cap is the 24576-byte wire message plus that tag.
 */
export declare class FrameReader {
    private readonly maxFrameBytes;
    private buffered;
    private bytes;
    constructor(maxFrameBytes?: number);
    push(chunk: Buffer): Buffer[];
    /** Bytes held for a record that has not completed yet. */
    pending(): number;
    /** The helper's stdout ended: a partially written record is a broken helper. */
    finish(): void;
}
