/**
 * OpNormalizer — raw ↔ canonical operation conversion.
 *
 * ADR 1 (Canonicalize Edge Property Operations Internally) requires that
 * reducers, provenance, receipts, and queries operate on canonical ops:
 *
 *   Raw (persisted):      NodeAdd, NodeRemove, EdgeAdd, EdgeRemove, PropSet, BlobValue
 *   Canonical (internal): NodeAdd, NodeRemove, EdgeAdd, EdgeRemove, NodePropSet, EdgePropSet, BlobValue
 *
 * **Current normalization location:** Normalization is performed at the
 * reducer entry points (`applyFast`, `applyWithReceipt`, `applyWithDiff`
 * in JoinReducer.ts), not at the CBOR decode boundary as originally
 * planned in ADR 1. This is a pragmatic deviation — the reducer calls
 * `normalizeRawOp()` on each op before dispatch. Lowering happens in
 * `PatchBuilder.build()`/`commit()` via `lowerCanonicalOp()`.
 *
 * @module domain/services/OpNormalizer
 */
import type { CanonicalPatchOp, PatchOp } from '../types/ops/unions.ts';
import type { OpLike } from './OpLike.ts';
/**
 * Hydrates a decoded op into the corresponding runtime-backed op class
 * when the op type is known. Unknown types pass through unchanged so
 * forward-compatible callers can decide how to handle them.
 */
export declare function hydrateDecodedOp(rawOp: OpLike): OpLike;
/**
 * Hydrates a known decoded op into a runtime-backed current op class.
 * Unknown types are rejected at this stricter boundary.
 */
export declare function hydrateKnownDecodedOp(rawOp: OpLike): PatchOp;
/**
 * Normalizes a single raw (persisted) op into its canonical form.
 *
 * - Raw `PropSet` with \x01-prefixed node → canonical `EdgePropSet`
 * - Raw `PropSet` without prefix → canonical `NodePropSet`
 * - Add/property/blob ops are hydrated into runtime-backed classes.
 * - Legacy tombstone-only remove POJOs still pass through until the
 *   remove-op boundary cleanup lands.
 *
 * Reducer entrypoints may receive either class instances or plain objects
 * decoded from CBOR. This function is the boundary that turns decoded
 * shapes back into real op/domain objects before reducer dispatch.
 */
export declare function normalizeRawOp(rawOp: OpLike): OpLike;
/**
 * Lowers a single canonical op back to raw (persisted) form.
 *
 * - Canonical `NodePropSet` → raw `PropSet`
 * - Canonical `EdgePropSet` → raw `PropSet` with legacy \x01-prefixed node
 * - All other op types pass through unchanged.
 *
 * In M13, this always produces legacy raw PropSet for property ops.
 * A future graph capability cutover (ADR 2) may allow emitting raw
 * `EdgePropSet` directly.
 */
export declare function lowerCanonicalOp(canonicalOp: CanonicalPatchOp): PatchOp;
