export interface ScannedMessage { /** The complete envelope bytes (header through the END frame). */ readonly message: Uint8Array; /** Byte count buffered PAST the END frame — a §8.7 stream MUST end * exactly at the END frame's last byte, so any excess is a protocol * violation (pipelining) for the caller to act on. */ readonly excess: number; } export declare class MessageStreamScanner { #private; /** True once any bytes were fed. */ get started(): boolean; /** * Feed one chunk. Returns the completed message once the END frame is * fully buffered, `undefined` while more bytes are needed. Throws * `DecodeError` on an invalid envelope header (connection-fatal per * §8.7) and plain `Error` on use after completion. */ push(chunk: Uint8Array): ScannedMessage | undefined; }