/**
 * On-disk session store.
 *
 * Each session lives in its own append-only JSONL file under a sessions root.
 * Every line is one record: either a node (the full content-addressed {@link
 * SessionNode}) or a head marker naming the current leaf. Appending a node
 * writes its record and a fresh head marker; loading a session replays the file,
 * runs each raw record through the {@link Migrator} pipeline, and reconstructs
 * an in-memory {@link SessionGraph}.
 */
import type { Migrator, SessionNode } from "../contract";
import { SessionGraph } from "./dag";
/**
 * A filesystem-backed store of branchable session DAGs.
 *
 * The store owns a root directory; sessions are files within it. A migrator
 * pipeline is applied to every record on load so older on-disk schemas upgrade
 * forward transparently.
 */
export declare class SessionStore {
    private readonly root;
    private readonly migrators;
    constructor(root: string, migrators?: readonly Migrator[]);
    /** Absolute path of a session's JSONL file. */
    private fileFor;
    /** Ensure the sessions root directory exists. */
    private ensureRoot;
    /**
     * Append one node to a session and advance its persisted head.
     *
     * Writes the node record followed by a head record pointing at it, so the last
     * head marker in the file always names the live leaf.
     */
    appendNode(sessionId: string, node: SessionNode): Promise<void>;
    /**
     * Load a session from disk into a {@link SessionGraph}.
     *
     * Replays every line, upgrades it through the migrator pipeline, collects the
     * node records, and tracks the last head marker as the leaf. Blank lines are
     * skipped. A missing session file yields an empty graph.
     */
    loadSession(sessionId: string): Promise<SessionGraph>;
    /**
     * List the ids of every session present in the store.
     *
     * Returns an empty list if the root does not yet exist.
     */
    listSessions(): Promise<string[]>;
}
