export { BaseStreamReader }; type CallContext = { telefunctionName: string; telefuncFilePath: string; abortController: AbortController; }; /** Abstract base for all transport readers. * * `readU32` and `readNextFrame` are pure wire-protocol logic — they only call * `readExact`. Each transport implements only `readExact` (the byte source). */ declare abstract class BaseStreamReader { cancelled: boolean; protected callContext: CallContext; constructor(callContext: CallContext); /** Cancel reading — sets cancelled flag and cleans up the transport resource. */ abstract cancel(): void; /** Implemented by each transport — pull exactly n bytes from the wire source. */ abstract readExact(n: number): Promise>; readU32(): Promise; /** Read the next indexed frame from the wire. * Returns { index, payload } or null on terminator. Throws on error frames. */ readNextFrame(): Promise<{ index: number; payload: Uint8Array; } | null>; }