import { Session } from "../../internal/harness.js"; import type { SessionMetadata, SessionRepo, SessionTreeEntry } from "../../internal/harness.js"; export declare class FileSessionRepo implements SessionRepo { private readonly dir; private readonly tmpDir; constructor(root: string); private pathFor; /** Read + torn-tail-recover a session file into (meta, entries); a missing file → not_found. */ private read; private storage; create(options?: { id?: string; }): Promise; open(metadata: SessionMetadata): Promise; list(): Promise; delete(metadata: SessionMetadata): Promise; fork(sourceMetadata: SessionMetadata, options?: { entryId?: string; position?: "before" | "at"; id?: string; }): Promise; /** 2c session-sync ([275], the FILE half of [266]②): the FULL oldest-first log for export. The file backend * has NO F3 floor — `read` returns EVERY persisted entry (`id`/`parentId` verbatim) — so this is the complete * log, BYPASSing any bounded tail (matches `InMemorySessionRepo.exportEntries`). Missing file → not_found. */ exportEntries(sessionId: string): Promise; /** 2c session-sync ([275]): import a verbatim log into `sessionId`. The single fail-closed invariant gate runs * FIRST ({@link validateEntriesForImport}); `owner` is a durable multi-tenant concept the local file backend * has no field for (accepted, unused — same as `InMemorySessionRepo`). Writes the WHOLE file (meta + entries) * atomically via tmp→fsync→rename — the rename is the commit point, so a crash leaves either nothing or an * orphan temp, never a partially-imported session (mirrors `fork`). An existing session is REPLACED (the * orchestrator's importSession owns the already-exists policy, same as InMemory's overwrite). */ importEntries(sessionId: string, owner: string | undefined, entries: SessionTreeEntry[]): Promise; } //# sourceMappingURL=session-store.d.ts.map