/**
 * PatchCommitter — persistence pipeline for committing a built patch.
 *
 * Extracted from PatchBuilder to keep file sizes under 500 LOC.
 * Handles: CAS race detection, lamport resolution, blob persistence,
 * tree construction, commit creation, ref update, and success callback.
 *
 * @module domain/services/PatchCommitter
 */
import VersionVector from '../crdt/VersionVector.ts';
import Patch from '../types/Patch.ts';
import type { PatchOp } from '../types/ops/unions.ts';
import type WarpKernelPort from '../../ports/WarpKernelPort.ts';
import type PatchJournalPort from '../../ports/PatchJournalPort.ts';
import type LoggerPort from '../../ports/LoggerPort.ts';
import { type default as CommitMessageCodecPort } from '../../ports/CommitMessageCodecPort.ts';
export type CommitState = {
    persistence: WarpKernelPort;
    graphName: string;
    writerId: string;
    lamport: number;
    vv: VersionVector;
    ops: PatchOp[];
    observedOperands: Set<string>;
    writes: Set<string>;
    hasEdgeProps: boolean;
    expectedParentSha: string | null;
    targetRefPath: string | null;
    contentBlobs: string[];
    patchJournal: PatchJournalPort | null;
    commitMessageCodec: CommitMessageCodecPort;
    logger: LoggerPort;
    onCommitSuccess: ((result: {
        patch: Patch;
        sha: string;
    }) => void | Promise<void>) | null;
};
/**
 * Commits a patch built by PatchBuilder to the Git object store.
 *
 * Steps: CAS check → lamport resolution → build Patch → persist blob →
 * build tree → create commit → update ref → invoke callback.
 */
export declare function commitPatch(state: CommitState): Promise<string>;
