import WarpError from "../errors/WarpError.js";
import { CheckpointArtifact } from "./CheckpointArtifact.js";
/** Carries the writer frontier for checkpoint recovery. */
export class FrontierArtifact extends CheckpointArtifact {
    frontier;
    constructor({ schemaVersion, frontier }) {
        super({ schemaVersion });
        if (!(frontier instanceof Map)) {
            throw new WarpError('FrontierArtifact requires a Map frontier', 'E_INVALID_ARTIFACT');
        }
        this.frontier = frontier;
        Object.freeze(this);
    }
}
