import { type SessionRecord } from '../types/session/records.js'; /** SHA-256 (lowercase hex) of one complete line, its terminating newline included. */ export declare function recordSha256(line: string | Uint8Array): string; /** Serialise a record as the one line a log stores for it. */ export declare function formatSessionLogLine(record: SessionRecord): string; export type SessionLogLineFault = 'torn' | 'too-large' | 'not-utf8' | 'not-json' | 'not-a-record'; /** One line that is not a complete, valid record. `fault` says which rule it broke. */ export declare class SessionLogLineError extends Error { readonly fault: SessionLogLineFault; readonly name = "SessionLogLineError"; constructor(fault: SessionLogLineFault, message: string); } export interface ParsedSessionLogLine { readonly record: SessionRecord; /** Bytes of the line, newline included: the `length` of a pointer to it. */ readonly length: number; readonly sha256: string; } /** * Parse one complete line of a session log: exactly one record followed by * one `\n`. A line with no terminating newline is `torn` (a crash mid-append); * the reader, not this function, decides to truncate it. */ export declare function parseSessionLogLine(line: string | Uint8Array): ParsedSessionLogLine; //# sourceMappingURL=log-hash.d.ts.map