import { CAS_MAX_RETRIES, generationOf, type RecordFields } from '../record/types.ts'; export { CAS_MAX_RETRIES, generationOf }; export type SessionFields = RecordFields; /** * Storage seam for durable session state. Abstract base. * * Mirrors the NamespaceStore pattern: the SessionManager keeps the * working copy in memory, hydrates once from the store, and writes * through on mutation, so sessions (and the mount grants they carry) * survive process restarts and are visible to any workspace pointed at * the same store. RAM is the default; Redis (node package) shares * sessions across processes, which is what lets a kernel tier bind a * session-bound mountpoint created by another daemon. */ export declare abstract class SessionStore { abstract load(): Promise>; abstract set(sessionId: string, fields: SessionFields): Promise; /** * Write one session iff its stored generation matches. * * Optimistic concurrency for the flush path: the write succeeds only * when the stored record's `generation` equals `expectedGeneration` * (a missing record and a record without the field both count as * generation 0). `replaceAll` stays unchecked on purpose: a snapshot * restore wins wholesale. Resolves true when the write landed, false * on conflict. */ abstract casSet(sessionId: string, fields: SessionFields, expectedGeneration: number): Promise; abstract delete(sessionIds: readonly string[]): Promise; abstract replaceAll(entries: Map): Promise; abstract clear(): Promise; abstract close(): Promise; } //# sourceMappingURL=store.d.ts.map