/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import type { Directory } from "../../fs/Directory.js";
import { type WalCommitId } from "./WalCommit.js";
import type { WalReader } from "./WalReader.js";
/**
 * Prunes old WAL segments that have been fully captured in a snapshot.
 */
export declare class WalCleaner {
    #private;
    constructor(walDir: Directory, options?: WalCleaner.Options);
    /**
     * Remove WAL segments where all commits are ≤ the snapshot commit ID.
     *
     * A segment is safe to delete only if its segment number is strictly less than the snapshot's segment number (since
     * the snapshot segment itself may have un-snapshotted commits at higher offsets).
     */
    run(lastSnapshotCommitId: WalCommitId): Promise<void>;
}
export declare namespace WalCleaner {
    interface Options {
        /**
         * Directory for storing the head snapshot.
         */
        dir?: Directory;
        /**
         * Whether to compress the head snapshot.
         */
        compress?: boolean;
        /**
         * Reader for replaying WAL segments before they are deleted.
         */
        reader?: WalReader;
    }
}
//# sourceMappingURL=WalCleaner.d.ts.map