export interface JsonlCursor { newOffset: number; pendingTail: string; } export interface JsonlScanOptions { endOffset?: number; chunkSize?: number; onLine?: (line: string, lineStart: number) => void; onError?: (error: unknown) => void; } /** Scan a JSONL stream from a caller-owned regular file descriptor. The fd is * never closed here; ownership stays with the caller. */ export declare function scanJsonlFromFd(fd: number, fromOffset: number, opts?: JsonlScanOptions): JsonlCursor | null; /** * Scan an append-only JSONL file from `fromOffset` using chunked reads. Calls * `onLine` for each COMPLETE line, and returns the durable byte frontier plus * any trailing partial line text left after the last newline. One logical line * is accumulated linearly, so memory remains proportional to that line length. */ export declare function scanJsonlFromOffset(path: string, fromOffset: number, opts?: JsonlScanOptions): JsonlCursor | null; /** * Return a baseline cursor for an append-only JSONL file without parsing the * historical content. This is used when attaching to an existing transcript: * old lines are history, so the caller only needs to start future reads after * the last complete newline. */ export declare function baselineJsonlCursor(path: string): JsonlCursor; //# sourceMappingURL=jsonl-cursor.d.ts.map