import { OPFSFileStore } from "./opfs_file_store"; import { ResumableReplayState } from "./replay"; import { ResumableCheckpointRef, ResumableSessionHandle, ResumableSessionManifest, ResumableSessionManifestInit, ResumableSessionPaths, SessionManifestRebuildInputs } from "./types"; export declare class ResumableSessionExistsError extends Error { constructor(sessionId: string); } export interface ResumableSessionStoreOptions { rootPath?: string; now?: () => number; } export declare class ResumableSessionStore { private readonly files; private readonly rootPath; private readonly now; constructor(files: OPFSFileStore, opts?: ResumableSessionStoreOptions); getSessionPaths(sessionId: string): ResumableSessionPaths; getCheckpointRef(sessionId: string, checkpointId: string): ResumableCheckpointRef; createSession(sessionId: string, init?: ResumableSessionManifestInit): Promise; createNewSession(sessionId: string, init?: ResumableSessionManifestInit): Promise; openSession(sessionId: string): Promise; listSessions(): Promise; /** Repair and maintain an idle session. Caller must hold its lifetime lock. */ repairSession(session: ResumableSessionHandle): Promise; /** Active sessions are read without mutation; idle sessions are repaired first. */ inspectSession(session: ResumableSessionHandle): Promise; deleteSession(sessionId: string): Promise; deleteKV(sessionId: string): Promise; readManifest(sessionId: string): Promise; tryWriteManifest(manifest: ResumableSessionManifest): Promise; private readCheckpointIndex; listCommittedCheckpoints(sessionId: string): Promise; /** Remove incomplete checkpoints and complete directories lacking a commit. */ reconcileCheckpoints(sessionId: string): Promise; /** Under the session lock, retain the newest valid commits and remove all other directories. */ pruneCommittedCheckpoints(sessionId: string, retain?: number): Promise; cleanupIncompleteCheckpoints(sessionId?: string): Promise; getManifestRebuildInputs(sessionId: string): Promise; } //# sourceMappingURL=session_store.d.ts.map