/**
 * Streaming reader for the semantic graph event log.
 *
 * Yields validated events line-by-line. Malformed lines (bad JSON or schema
 * mismatch) are not thrown — they are surfaced via the `onMalformed` callback
 * so replay can skip and log rather than aborting mid-file. Corruption at EOF
 * from a crashed writer is survivable this way.
 */
import { type SemanticGraphEvent } from "./events.js";
export interface LogReaderOptions {
    /** Called for each line that fails to parse. Replay should log and skip. */
    onMalformed?: (line: string, error: Error, lineNumber: number) => void;
}
/**
 * Read events from a log file as an async iterator.
 *
 * If the file does not exist, yields nothing (no error) — fresh projects start
 * with an empty log.
 */
export declare function readEvents(logPath: string, options?: LogReaderOptions): AsyncGenerator<SemanticGraphEvent>;
/** Collect all events into an array. Convenient for tests and small logs. */
export declare function readAllEvents(logPath: string, options?: LogReaderOptions): Promise<SemanticGraphEvent[]>;
