import CommitMessageCodecPort, { type AnchorCommitMessage, type CheckpointCommitMessage, type CommitMessageKind, type PatchCommitMessage, type PatchStorageRoute } from '../../ports/CommitMessageCodecPort.ts';
export type { AnchorCommitMessage, CheckpointCommitMessage, PatchCommitMessage, } from '../../ports/CommitMessageCodecPort.ts';
export declare const TRAILER_KEYS: Readonly<{
    kind: "eg-kind";
    graph: "eg-graph";
    writer: "eg-writer";
    lamport: "eg-lamport";
    patchOid: "eg-patch-oid";
    stateHash: "eg-state-hash";
    frontierOid: "eg-frontier-oid";
    indexOid: "eg-index-oid";
    schema: "eg-schema";
    checkpointVersion: "eg-checkpoint";
    storageVersion: "eg-storage-version";
    storageSchema: "eg-storage-schema";
    encrypted: "eg-encrypted";
}>;
export type EncodePatchCompatParams = {
    graph: string;
    writer: string;
    lamport: number;
    patchOid: string;
    schema?: number;
    storage?: PatchStorageRoute;
    encrypted?: boolean;
};
export type DecodePatchCompatMessage = PatchCommitMessage & {
    encrypted: boolean;
};
export type EncodeCheckpointCompatParams = {
    graph: string;
    stateHash: string;
    frontierOid: string;
    indexOid: string;
    schema?: number;
    checkpointVersion?: string | null;
};
export type EncodeAnchorCompatParams = {
    graph: string;
    schema?: number;
};
export declare class TrailerCommitMessageCodecAdapter extends CommitMessageCodecPort {
    private readonly _codec;
    constructor();
    encodePatch(message: PatchCommitMessage): string;
    decodePatch(message: string): PatchCommitMessage;
    encodeCheckpoint(message: CheckpointCommitMessage): string;
    decodeCheckpoint(message: string): CheckpointCommitMessage;
    encodeAnchor(message: AnchorCommitMessage): string;
    decodeAnchor(message: string): AnchorCommitMessage;
    detectKind(message: string): CommitMessageKind | null;
}
export declare const DEFAULT_COMMIT_MESSAGE_CODEC: TrailerCommitMessageCodecAdapter;
export declare function encodePatchMessage(params: EncodePatchCompatParams): string;
export declare function decodePatchMessage(message: string): DecodePatchCompatMessage;
export declare function encodeCheckpointMessage(params: EncodeCheckpointCompatParams): string;
export declare function decodeCheckpointMessage(message: string): CheckpointCommitMessage;
export declare function encodeAnchorMessage(params: EncodeAnchorCompatParams): string;
export declare function decodeAnchorMessage(message: string): AnchorCommitMessage;
export declare function detectMessageKind(message: string): CommitMessageKind | null;
