/**
 * LocalSessionOwnershipStore — a DURABLE per-session ownership store that survives
 * restarts, replacing the in-memory-only `InMemorySessionOwnershipStore` for the
 * cross-machine session pool.
 *
 * Spec: docs/specs/live-user-channel-proof-standard.md §7.2 (transfer fix). The
 * registry/FSM/CAS logic in SessionOwnershipRegistry is store-agnostic; this swaps
 * the substrate from a process-lifetime Map to per-session JSON files (atomic
 * tmp+rename, mirroring LocalLeaseStore) PLUS an in-memory cache so the routing hot
 * path stays an in-memory read.
 *
 * Why durable matters (the live bug, 2026-06-15): a transfer wrote the target's
 * ownership record into the SOURCE machine's in-memory Map; the record vanished on
 * restart and never crossed machines. Persisting per-session lets the cross-machine
 * `OwnershipApplier` (which materializes records from the REPLICATED coherence-journal
 * placement entries) land a durable record the target machine reads as owner=self.
 *
 * This store alone is single-machine-durable. Cross-machine replication is carried
 * by the coherence-journal placement stream + OwnershipApplier (off the hot path) —
 * exactly the boundary the spec draws: durable LOCALLY here, REPLICATED there.
 */
import type { SessionOwnershipRecord } from './SessionOwnership.js';
import type { SessionOwnershipStore } from './SessionOwnershipRegistry.js';
export interface LocalSessionOwnershipStoreDeps {
    /** Absolute directory holding one JSON file per session ownership record. */
    dir: string;
    logger?: (msg: string) => void;
}
export declare class LocalSessionOwnershipStore implements SessionOwnershipStore {
    private readonly d;
    /** Hot-path read cache: sessionKey → record. Authoritative-on-disk, cached here. */
    private readonly cache;
    /** Whether the full directory has been scanned into the cache (for all()). */
    private scanned;
    constructor(deps: LocalSessionOwnershipStoreDeps);
    private log;
    private filePathFor;
    /** Load one session's record from disk into the cache (idempotent). */
    private loadOne;
    private persist;
    read(sessionKey: string): SessionOwnershipRecord | null;
    /**
     * Fast-forward CAS: the candidate lands only if it MONOTONICALLY advances the
     * committed epoch (`candidate.ownershipEpoch > current.epoch`) — identical to
     * InMemorySessionOwnershipStore + GitLeaseStore, so SessionOwnershipRegistry's FSM
     * is unchanged regardless of substrate. Synchronous, so within this process a stale
     * competing candidate (computed from the same `current`) still loses.
     */
    casWrite(candidate: SessionOwnershipRecord): {
        ok: boolean;
        observed: SessionOwnershipRecord | null;
    };
    /** Every known ownership record (cache + a one-time disk scan). */
    all(): SessionOwnershipRecord[];
}
//# sourceMappingURL=LocalSessionOwnershipStore.d.ts.map