/**
 * PatchBuilder — fluent API for building schema:2 WARP patches.
 *
 * Maintains a VersionVector per writer, assigns dots on add operations,
 * reads current state to populate observedDots for removes, and includes
 * context VersionVector in the patch.
 *
 * @module domain/services/PatchBuilder
 */
import VersionVector from '../crdt/VersionVector.ts';
import Patch from '../types/Patch.ts';
import type { PatchOp } from '../types/ops/unions.ts';
import { type ContentInput, type ContentMetadataInput } from './PatchBuilderContent.ts';
import type { WarpState } from './JoinReducer.ts';
import type WarpKernelPort from '../../ports/WarpKernelPort.ts';
import type PatchJournalPort from '../../ports/PatchJournalPort.ts';
import type LoggerPort from '../../ports/LoggerPort.ts';
import type BlobStoragePort from '../../ports/BlobStoragePort.ts';
import type CommitMessageCodecPort from '../../ports/CommitMessageCodecPort.ts';
type DeletePolicy = 'reject' | 'cascade' | 'warn';
type PatchBuilderOptions = {
    persistence: WarpKernelPort;
    graphName: string;
    writerId: string;
    lamport: number;
    versionVector: VersionVector;
    getCurrentState: () => WarpState | null;
    expectedParentSha?: string | null;
    targetRefPath?: string;
    onCommitSuccess?: ((result: {
        patch: Patch;
        sha: string;
    }) => void | Promise<void>) | null;
    onDeleteWithData?: DeletePolicy;
    patchJournal?: PatchJournalPort;
    commitMessageCodec?: CommitMessageCodecPort;
    logger?: LoggerPort;
    blobStorage?: BlobStoragePort;
};
export declare class PatchBuilder {
    private readonly _persistence;
    private readonly _graphName;
    private readonly _writerId;
    private readonly _targetRefPath;
    private readonly _lamport;
    private readonly _vv;
    private readonly _getCurrentState;
    private readonly _expectedParentSha;
    private readonly _onCommitSuccess;
    private readonly _onDeleteWithData;
    private readonly _patchJournal;
    private readonly _commitMessageCodec;
    private readonly _logger;
    private readonly _blobStorage;
    private readonly _ops;
    private readonly _nodesAdded;
    private readonly _edgesAdded;
    private readonly _observedOperands;
    private readonly _writes;
    private readonly _contentBlobs;
    private _snapshotState;
    private _hasEdgeProps;
    private _committed;
    private _committing;
    constructor(options: PatchBuilderOptions);
    private _getSnapshotState;
    private _assertNotCommitted;
    addNode(nodeId: string): PatchBuilder;
    removeNode(nodeId: string): PatchBuilder;
    addEdge(from: string, to: string, label: string): PatchBuilder;
    removeEdge(from: string, to: string, label: string): PatchBuilder;
    emitEffect(kind: string, payload?: unknown, options?: {
        effectId?: string;
    }): string;
    setProperty(nodeId: string, key: string, value: unknown): PatchBuilder;
    setEdgeProperty(from: string, to: string, label: string, key: string, value: unknown): PatchBuilder;
    attachContent(nodeId: string, content: ContentInput, metadata?: ContentMetadataInput): Promise<PatchBuilder>;
    clearContent(nodeId: string): PatchBuilder;
    attachEdgeContent(from: string, to: string, label: string, content: ContentInput, metadata?: ContentMetadataInput): Promise<PatchBuilder>;
    clearEdgeContent(from: string, to: string, label: string): PatchBuilder;
    private _lowerNodeContentIntent;
    private _lowerEdgeContentIntent;
    private _lowerNodePropertyIntent;
    private _lowerEdgePropertyIntent;
    private _assertNodeExistsForContent;
    private _assertEdgeExists;
    build(): Patch;
    commit(): Promise<string>;
    get ops(): PatchOp[];
    get versionVector(): VersionVector;
    get reads(): ReadonlySet<string>;
    get writes(): ReadonlySet<string>;
    /**
     * Content-blob OIDs captured via `attachNodeContent` / `attachEdgeContent`.
     * Exposed for strand-overlay queued-intent assembly, which needs the
     * snapshot of blob OIDs to persist alongside the patch entry.
     */
    get contentBlobs(): readonly string[];
}
export {};
