export declare class FileResumeAnchorStore {
private readonly dir;
/** sessionId → (eventId → {entryId, owner}) — the same in-memory shape MemoryResumeAnchorStore holds, hydrated on ctor. */
private readonly bySession;
/** sessionId → the open append log (one O_APPEND fd per session, lazily opened on first put, held for lifetime). */
private readonly logs;
constructor(root: string);
/** `
/.jsonl` — the per-session log path (sessionId is uuidv7, already safe). */
private pathFor;
/** Replay every session log into the in-memory index on boot (torn-tail-safe via readJsonlRecords; last-wins upsert
* so a re-stamped eventId reflects the latest appended record). The in-memory index is keyed by the SANITIZED
* sessionId throughout (put/resolve/list/delete all sanitize), and each on-disk file's base name IS
* `sanitizePathComponent(sessionId)` — so the index key is just the file base, with no de-sanitize needed. */
private hydrate;
/** Open (or reuse) the append log for a session. The file base is the SANITIZED id (matches hydrate's de-sanitize). */
private logFor;
/** Record/overwrite the anchor for one settled message boundary (idempotent upsert; parity with the SQL
* ON DUPLICATE/CONFLICT). Appends a durable record (fsync:true) THEN upserts the index — a crash after the
* fsync is recovered by hydrate (the record is on disk); a crash before it just loses an un-acked anchor. */
put(sessionId: string, eventId: string, entryId: string, owner: string | null): Promise;
/** Resolve a shell-supplied eventId → the persisted SessionTreeEntry.id for TaskSpec.resumeAt; undefined = unknown
* anchor (the route 4xx's before handing core a bad id). owner null-safe guard = the SQL `owner <=> ?` defense-in-depth. */
resolve(sessionId: string, eventId: string, owner: string | null): Promise;
/** 2c session-sync: ALL anchors for a session (every eventId→entryId + its owner), UNFILTERED — a cross-backend
* session EXPORT bundles the whole anchor map so the importer can RE-KEY owner to the target principal (§9). The
* route already proved session ownership (the export gate), so no per-row owner filter here. Twin of the SQL stores. */
listBySession(sessionId: string): Promise>;
/** E21 (§0.5 delete) — purge ALL anchors for a session, scoped by session_id ALONE (the route already proved session
* ownership; a per-row owner guard would orphan rows stored under a divergent per-run principal). Idempotent (count).
* Closes + unlinks the session log so the dir does not leak a file, and drops the in-memory index entry. */
deleteBySession(sessionId: string): Promise;
/** Release every open append-log fd (called by LocalBackend.close so a graceful restart can re-open the data dir). */
dispose(): void;
}
//# sourceMappingURL=file-resume-anchor-store.d.ts.map