UNPKG

browser-debugger-cli

Version:

DevTools telemetry in your terminal. For humans and agents. Direct WebSocket to Chrome's debugging port.

39 lines 1.12 kB
/** * JSONL Protocol Handler * * Utilities for parsing newline-delimited JSON streams. */ /** * Error thrown when JSONL buffer exceeds maximum size. */ export declare class JSONLBufferOverflowError extends Error { constructor(bufferSize: number, maxSize: number); } /** * JSONL buffer for accumulating partial frames. * * Enforces a maximum buffer size to prevent OOM attacks from processes * that send unbounded data without newlines. */ export declare class JSONLBuffer { private buffer; /** * Process incoming chunk and extract complete JSONL frames. * * @param chunk - Incoming data chunk * @returns Array of complete JSONL frames (lines) * @throws JSONLBufferOverflowError if buffer exceeds MAX_JSONL_BUFFER_SIZE */ process(chunk: string): string[]; clear(): void; getBuffer(): string; } /** * Parse JSONL frame into typed object. */ export declare function parseJSONLFrame<T>(line: string): T; /** * Serialize object to JSONL frame (JSON + newline). */ export declare function toJSONLFrame(obj: unknown): string; //# sourceMappingURL=jsonl.d.ts.map