import type { SessionEntry } from "../../session-manager-types.ts"; import type { SessionListQuery, SessionRecordHeader, SessionSnapshot, SessionStore, SessionSummary, SessionWriteOptions, StorageDescriptor } from "./types.js"; export interface JsonlSessionFile { readonly location: string; readonly header: SessionRecordHeader; read(): Promise; } export { SessionFormatVersionError } from "./errors.js"; export declare class JsonlStoragePoisonedError extends Error { readonly location: string; readonly cause: Error; readonly rollbackCause: Error; constructor(location: string, cause: Error, rollbackCause: Error); } export declare class JsonlSessionStore implements SessionStore { private queue; private closed; private poisoned; private readonly directory; private readonly fileStates; private readonly exactDirectory; private constructor(); static open(directory: string, options?: { exactDirectory?: boolean; scanExisting?: boolean; }): Promise; locationFor(header: SessionRecordHeader): string; get descriptor(): StorageDescriptor; create(header: SessionRecordHeader, entries: readonly SessionEntry[], location?: string): Promise<{ readonly lastSeq: number; }>; append(sessionId: string, entries: readonly SessionEntry[], options: SessionWriteOptions): Promise<{ readonly lastSeq: number; }>; replace(sessionId: string, header: SessionRecordHeader, entries: readonly SessionEntry[], options: SessionWriteOptions): Promise<{ readonly lastSeq: number; }>; private commit; load(sessionId: string): Promise; loadFile(path: string): Promise; private readPersisted; findFile(sessionId: string): Promise; readHeader(sessionId: string): Promise; delete(sessionId: string): Promise; list(query: SessionListQuery): AsyncIterable; scanFiles(): AsyncIterable; findMostRecent(query: { readonly cwd: string; readonly includeInternal?: boolean; }): Promise; close(): Promise; private run; private exclusive; private checkAbort; private paths; private locate; private scan; private locateKnown; private key; private readFirstLine; private readHeaderAt; private readSnapshot; private stamp; private contentState; private remember; /** * Foreign appends read only the header, at most 64 known boundary bytes, and new bytes. * The witness detects a changed append boundary, not arbitrary edits in old history. * Structural changes require an explicit load; they never trigger a hidden full reread. */ private forWrite; private encode; } //# sourceMappingURL=jsonl-session-store.d.ts.map