/**
 * LocalLeaseStore — a git-less LeaseStore for LeaseCoordinator.
 *
 * The git-backed GitLeaseStore is the durable CAS substrate WHEN a machine has
 * git-sync available. But two real deployments have no git medium yet still need
 * lease coordination:
 *   1. A credential-less standby (the HTTP-transport "Build B" design): it joins
 *      the pool and must learn the holder WITHOUT pulling/pushing git.
 *   2. An agent whose home IS the instar source tree (e.g. the instar developer's
 *      agent home), where the SourceTreeGuard refuses GitSyncManager — so the
 *      git medium is unavailable even though gitBackup is enabled.
 *
 * Without lease coordination, a machine's `coordinator.leaseHolder` is null, so
 * MeshRpc rejects the holder's router-only commands (deliverMessage/place/
 * transfer) as `not-router` — which blocks cross-machine session transfer
 * entirely. (Found live, 2026-05-31: the lease block was nested inside the
 * git-gated try, so a gitSync throw skipped the HTTP lease transport too.)
 *
 * This store persists THIS machine's own view of the lease to a local JSON file
 * (durable across restarts) and implements the LeaseStore CAS locally. It is NOT
 * a shared substrate: cross-machine propagation is carried by HttpLeaseTransport
 * (broadcast/observe), which LeaseCoordinator folds into its effectiveView. The
 * fenced-lease acquire/observe rules prevent split-brain over the tunnel (a
 * machine that observes a valid peer lease declines to acquire). When git-sync
 * IS available, GitLeaseStore remains the stronger shared-CAS substrate.
 */
import type { LeaseStore } from './LeaseCoordinator.js';
import type { LeaseRecord } from './types.js';
export interface LocalLeaseStoreDeps {
    /** Absolute path of the local lease file (persisted across restarts). */
    filePath: string;
    logger?: (msg: string) => void;
}
export declare class LocalLeaseStore implements LeaseStore {
    private readonly d;
    private cached;
    private loaded;
    constructor(deps: LocalLeaseStoreDeps);
    private log;
    private load;
    private persist;
    read(): {
        lease: LeaseRecord | null;
        epoch: number;
    };
    casWrite(candidate: LeaseRecord): {
        ok: boolean;
        observed: {
            lease: LeaseRecord | null;
            epoch: number;
        };
    };
    refresh(lease: LeaseRecord): boolean;
    /**
     * Relinquish THIS machine's local self-lease to break a same-epoch contested
     * tie (spec §Problem A). The deterministic loser forces its persisted lease to
     * read as EXPIRED — so it stops being a "live holder at epoch N" (the winner's
     * canAcquire() unblocks; holdsLease() returns false) — while KEEPING the
     * committed epoch as the CAS/replay floor. (Clearing to epoch 0 would drop the
     * floor and let a replayed stale lease win; expiring-in-place preserves it.)
     * The winner then advances to N+1, which the loser adopts via the strict-`>`
     * tunnel fold in effectiveView(). No-op if there is no local lease.
     */
    forceLocalExpiry(): void;
}
//# sourceMappingURL=LocalLeaseStore.d.ts.map