/**
 * transferOps — operation builders and property/content diff logic for transfer planning.
 *
 * @module domain/services/transfer/transferOps
 */
import type { VisibleStateTransferOperation, VisibleStateTransferPlanSummary } from '../../types/CoordinateComparison.ts';
import { type ContentMeta, type EdgeRef, type VisibleStateReader } from './transferKeys.ts';
export declare const TRANSFER_OP_ATTACH_NODE_CONTENT = "attach_node_content";
export declare const TRANSFER_OP_CLEAR_NODE_CONTENT = "clear_node_content";
export declare const TRANSFER_OP_ATTACH_EDGE_CONTENT = "attach_edge_content";
export declare const TRANSFER_OP_CLEAR_EDGE_CONTENT = "clear_edge_content";
/**
 * Create a set_node_property transfer operation.
 */
export declare function nodePropertyOp(nodeId: string, key: string, value: unknown): VisibleStateTransferOperation;
/**
 * Create a set_edge_property transfer operation.
 */
export declare function edgePropertyOp(edge: EdgeRef, key: string, value: unknown): VisibleStateTransferOperation;
export type PropertyKeyInfo = {
    sourceHas: boolean;
    targetHas: boolean;
    sourceValue: unknown;
    targetValue: unknown;
};
/**
 * Determine whether a property key exists and has changed between source and target.
 */
export declare function inspectPropertyKey(sourceProps: Record<string, unknown>, // nosemgrep: ts-no-record-string-unknown-outside-adapters -- 0025B; nosemgrep: ts-no-unknown-outside-adapters -- 0025B
targetProps: Record<string, unknown>, // nosemgrep: ts-no-record-string-unknown-outside-adapters -- 0025B; nosemgrep: ts-no-unknown-outside-adapters -- 0025B
key: string): PropertyKeyInfo;
/**
 * Check whether a source-present property has changed relative to the target.
 */
export declare function sourcePropertyChanged(info: PropertyKeyInfo): boolean;
/**
 * Build the op for a single property key if it differs between source and target.
 */
export declare function buildPropertyDiffOp(info: PropertyKeyInfo, buildOp: (key: string, value: unknown) => VisibleStateTransferOperation, // nosemgrep: ts-no-unknown-outside-adapters -- 0025B
key: string): VisibleStateTransferOperation | null;
/**
 * Diff two property bags and produce transfer ops for each changed key.
 */
export declare function collectPropertyOps(sourceProps: Record<string, unknown>, // nosemgrep: ts-no-record-string-unknown-outside-adapters -- 0025B; nosemgrep: ts-no-unknown-outside-adapters -- 0025B
targetProps: Record<string, unknown>, // nosemgrep: ts-no-record-string-unknown-outside-adapters -- 0025B; nosemgrep: ts-no-unknown-outside-adapters -- 0025B
buildOp: (key: string, value: unknown) => VisibleStateTransferOperation): VisibleStateTransferOperation[];
export type ContentOpParams = {
    sourceMeta: ContentMeta | null;
    targetMeta: ContentMeta | null;
    loadContent: () => Promise<Uint8Array>;
    buildAttach: (content: Uint8Array, meta: ContentMeta) => VisibleStateTransferOperation;
    buildClear: () => VisibleStateTransferOperation;
};
/**
 * Plan a content attach/clear operation by comparing source and target metadata.
 */
export declare function planContentOp(params: ContentOpParams): Promise<VisibleStateTransferOperation | null>;
/**
 * Build the attach operation for a single node's content.
 */
export declare function buildNodeAttach(nodeId: string, content: Uint8Array, meta: ContentMeta): VisibleStateTransferOperation;
/**
 * Build the clear operation for a single node's content.
 */
export declare function buildNodeClear(nodeId: string): VisibleStateTransferOperation;
export type NodeContentOpsParams = {
    sourceReader: VisibleStateReader;
    targetReader: VisibleStateReader;
    nodeIds: string[];
    loadContent: (nodeId: string, meta: ContentMeta) => Promise<Uint8Array>;
};
/**
 * Plan a single node's content operation by comparing source and target metadata.
 */
export declare function planNodeContentOp(params: NodeContentOpsParams, nodeId: string): Promise<VisibleStateTransferOperation | null>;
/**
 * Collect content attach/clear ops for all nodes that differ.
 */
export declare function collectNodeContentOps(params: NodeContentOpsParams): Promise<VisibleStateTransferOperation[]>;
/**
 * Build the attach operation for a single edge's content.
 */
export declare function buildEdgeAttach(edge: EdgeRef, content: Uint8Array, meta: ContentMeta): VisibleStateTransferOperation;
/**
 * Build the clear operation for a single edge's content.
 */
export declare function buildEdgeClear(edge: EdgeRef): VisibleStateTransferOperation;
export type EdgeContentOpsParams = {
    sourceReader: VisibleStateReader;
    targetReader: VisibleStateReader;
    edges: EdgeRef[];
    loadContent: (edge: EdgeRef, meta: ContentMeta) => Promise<Uint8Array>;
};
/**
 * Plan a single edge's content operation by comparing source and target metadata.
 */
export declare function planEdgeContentOp(params: EdgeContentOpsParams, edge: EdgeRef): Promise<VisibleStateTransferOperation | null>;
/**
 * Collect content attach/clear ops for all edges that differ.
 */
export declare function collectEdgeContentOps(params: EdgeContentOpsParams): Promise<VisibleStateTransferOperation[]>;
/**
 * Increment the appropriate node-property summary counter.
 */
export declare function countNodePropertyOp(summary: VisibleStateTransferPlanSummary, op: VisibleStateTransferOperation): void;
/**
 * Increment the appropriate edge-property summary counter.
 */
export declare function countEdgePropertyOp(summary: VisibleStateTransferPlanSummary, op: VisibleStateTransferOperation): void;
/**
 * Increment the correct summary counter for a single transfer operation.
 */
export declare function countOp(summary: VisibleStateTransferPlanSummary, op: VisibleStateTransferOperation): void;
/**
 * Produce a summary of operation counts from a list of transfer operations.
 */
export declare function summarizeOps(ops: VisibleStateTransferOperation[]): VisibleStateTransferPlanSummary;
