import type { FieldValue } from "../ir/operations.js"; import { type MediaFallback } from "../api/ref-encoding.js"; import type { RemoteItem } from "../api/client.js"; import { type BaselineIndex } from "./baseline.js"; import type { FieldDiffEntry, PlanOptions } from "./plan-types.js"; interface FieldDriftOptions { itemRefKey?: string; baselineIndex?: BaselineIndex; mediaFallbacks?: ReadonlyMap; } export declare const computeFieldDrift: (desired: FieldValue[], remote: RemoteItem, capturedItemIds: ReadonlyMap, { itemRefKey, baselineIndex, mediaFallbacks }?: FieldDriftOptions) => FieldDiffEntry[]; /** * Reduce a drift array (with optional baseline classifications) to a * resolved status under the given conflict policy. * * - No drift → `null` (caller emits the existing `"skip"` action). * - No baseline → legacy `"update"` regardless of policy. * - All drift is `recipe-change` or `first-push` → safe `"update"`. * - Any drift is `conflict` → applies the policy: * error → `"conflict"`; recipe-wins → `"update"`; cms-wins → `"skip"`. * - Otherwise drift contains `cms-edit` (but no `conflict`): * error → `"conflict"`; recipe-wins → `"update"`; cms-wins → `"skip"`. * `cms-edit` flips to `"conflict"` under default policy because * applying the recipe value WOULD overwrite the author's edit — * even though the recipe value matches the baseline. (The recipe * didn't change, but the tenant did; the operator should know.) * * The caller still owns mutation construction; this helper is purely * the status reducer. */ export declare const resolveConflictStatus: (drift: FieldDiffEntry[], conflictPolicy: PlanOptions["conflictPolicy"]) => { status: "update" | "conflict" | "skip"; reason?: string; }; export {};