/** * Append-only NDJSON transition log writer and reader. * * The transitions.log file stores one JSON record per line (NDJSON format). * Each record is a TransitionRecord capturing a phase transition event. * * Write semantics: * - Uses O_WRONLY | O_APPEND | O_CREAT flags for atomic appends. * - Concurrent appends from separate processes cannot corrupt existing lines. * * Read semantics: * - File not found → empty array (no error). * - Empty lines are skipped. * - Malformed JSON lines are skipped with a warning to stderr. * * Requirements: 4.3, 4.4, 11.5 */ import type { TransitionRecord } from '../core/types.js'; /** * Append a single transition record to the NDJSON log file. * * Creates the file (and parent directories) if it does not exist. * Uses O_APPEND to guarantee atomic line appends even under concurrent writes. * * @param logPath - Absolute or relative path to the transitions.log file. * @param record - The transition record to append. */ export declare function appendTransition(logPath: string, record: TransitionRecord): void; /** * Read all transition records from the NDJSON log file. * * - Returns an empty array if the file does not exist. * - Skips empty lines. * - Skips malformed JSON lines (logs a warning to stderr). * * @param logPath - Absolute or relative path to the transitions.log file. * @returns Array of parsed TransitionRecord entries. */ export declare function readTransitions(logPath: string): TransitionRecord[]; //# sourceMappingURL=transition-log.d.ts.map