/** * 3-way entity matching for structural merge. * * Matches top-level entities across the three file versions (base / ours / * theirs) using their `signature` as a stable key. Each entity triple is * assigned a status that describes what happened to it during the merge. */ import type { TopLevelEntity } from "./entities.js"; export type EntityMatchStatus = /** Text identical in all three versions */ "unchanged" /** Changed in ours, unchanged in theirs */ | "ours-only-change" /** Changed in theirs, unchanged in ours */ | "theirs-only-change" /** Both sides made the same change (or both deleted) */ | "both-changed-same" /** Both sides changed differently — unresolvable at entity level */ | "both-changed-diff" /** Added only by ours (not in base, not in theirs) */ | "ours-added" /** Added only by theirs (not in base, not in ours) */ | "theirs-added" /** Deleted by ours (was in base and theirs) */ | "ours-deleted" /** Deleted by theirs (was in base and ours) */ | "theirs-deleted"; export interface EntityMatch { signature: string; status: EntityMatchStatus; base: TopLevelEntity | null; ours: TopLevelEntity | null; theirs: TopLevelEntity | null; } /** * Compute 3-way entity matches between base, ours, and theirs. * * The returned array covers every unique signature found across all three * versions. Order follows: base order → ours-only → theirs-only sigs. * * @param base - Entities extracted from the base (ancestor) version * @param ours - Entities extracted from our version (current branch) * @param theirs - Entities extracted from their version (incoming branch) */ export declare function matchEntities(base: TopLevelEntity[], ours: TopLevelEntity[], theirs: TopLevelEntity[]): EntityMatch[]; //# sourceMappingURL=matching.d.ts.map