/** * Entity-level merge decisions for structural merge. * * Given a 3-way entity match, decides which text version to use in the * merged output. Conservative by design: if both sides changed an entity * differently, we return a "conflict" result and abort the structural merge * for the whole file (falling back to the hunk-based resolver). */ import type { EntityMatch } from "./matching.js"; export interface EntityMergeResult { signature: string; /** * Whether this entity should appear in the merged output. * `false` means the entity was deleted by ours, theirs, or both. */ include: boolean; /** * The text to emit for this entity in the merged file. * `null` signals an unresolvable conflict (structural merge aborted). */ mergedText: string | null; /** Human-readable explanation of the merge decision */ reason: string; } /** * Decide how to merge a single entity based on its 3-way match status. * * Rules (conservative, correct-by-default): * - unchanged → emit as-is * - both-changed-same → emit the common changed version * - ours-only-change → emit ours * - theirs-only-change → emit theirs * - ours-added → emit ours (append after theirs structure) * - theirs-added → emit theirs * - ours-deleted → omit (unless theirs also modified it → conflict) * - theirs-deleted → omit (unless ours also modified it → conflict) * - both-changed-diff → conflict (return mergedText: null → abort) */ export declare function mergeEntity(match: EntityMatch): EntityMergeResult; /** * Returns `true` if any entity merge has an unresolvable conflict * (i.e. the structural merge cannot produce a clean output). */ export declare function hasEntityConflict(merges: EntityMergeResult[]): boolean; //# sourceMappingURL=merge.d.ts.map