/**
 * GitLeaseStore — the durable (git-backed) LeaseStore for LeaseCoordinator.
 *
 * Implements the lease CAS over git: git has no native compare-and-swap, so we
 * do optimistic concurrency — pull-rebase to minimize the reject window, re-read
 * the committed epoch, refuse to write unless our candidate strictly advances
 * it, then commit+push. A non-fast-forward push (a peer advanced first) returns
 * ok:false with the freshly-observed lease so LeaseCoordinator re-evaluates and
 * either yields or retries with a higher epoch. We NEVER force-push.
 *
 * The write also bumps the holder's own registry entry (syncSequence +
 * authoredUnderEpoch) so the lease commit passes peers' registryReplayGuard.
 */
import type { LeaseStore } from './LeaseCoordinator.js';
import type { LeaseRecord, MachineRegistry } from './types.js';
export interface GitLeaseStoreDeps {
    /** This machine's id (the only entry we bump syncSequence on). */
    machineId: string;
    loadRegistry: () => MachineRegistry;
    saveRegistry: (r: MachineRegistry) => void;
    /** Absolute path of the registry file to stage. */
    registryAbsPath: string;
    /** Pull-rebase (best-effort) before reading/writing. */
    pullRebase: () => boolean;
    /** Commit + push the registry; false on non-ff/no-op. */
    commitAndPush: (message: string, paths: string[]) => boolean;
    logger?: (msg: string) => void;
}
export declare class GitLeaseStore implements LeaseStore {
    private readonly d;
    constructor(deps: GitLeaseStoreDeps);
    private log;
    read(): {
        lease: LeaseRecord | null;
        epoch: number;
    };
    casWrite(candidate: LeaseRecord): {
        ok: boolean;
        observed: {
            lease: LeaseRecord | null;
            epoch: number;
        };
    };
    refresh(lease: LeaseRecord): boolean;
}
//# sourceMappingURL=GitLeaseStore.d.ts.map