import type { MergeResult, MergeStrategy } from "../../types.js"; /** * Apply path-level changes from `source` into the current version using a * three-way comparison against the LCA. Equality is over `node_type`, * `blob_hash`, `mode`, and `symlink_target` (mtime/size_bytes ignored). * * Classification (one rule covers the whole conflict matrix): * * - `ours == theirs` (semantically): skip (no-op). * - else `base == ours`: only theirs changed -> apply theirs. * - else `base == theirs`: only ours changed -> keep ours. * - else: conflict. * * `null` (deleted / never-existed) compares like any other value, so the * deletion rows in the proposal's matrix collapse cleanly: `(- - X)` -> * `base == ours` -> apply (add); `(X X -)` -> `base == ours` -> apply * tombstone; `(X - X)` -> `base == theirs` -> skip; etc. * * Strategies on conflict: * * - `fail` (default): no writes; conflicts returned, applied/skipped both * empty. * - `ours`: keep destination, conflicts still reported, path goes in * `skipped`. * - `theirs`: apply source, conflicts still reported (so callers can see * the override), path goes in `applied`. * * Filters: `paths` matches each entry as either an exact path or a path * prefix (so a directory entry pulls in its descendants visible in any of * base/ours/theirs); `pathScope` restricts to one subtree; supplying both * intersects them. `dryRun: true` returns the same `MergeResult` without * writing. * * Source and base are read-only. Only the current destination version * receives `fs_entries` writes; `parent_version_id` and `version_ancestors` * are never modified. * * Implicit parent directories: when an applied non-null file or symlink * lands under a path whose ancestors are not visible in the destination, * those ancestors are copied from the source view (theirs preferred, then * ours, then base) and reported in `applied`. */ export declare const merge: (ctx: import("./context.js").FilesystemOpsContext, source: string, opts?: { strategy?: MergeStrategy; paths?: string[]; pathScope?: string; dryRun?: boolean; }) => Promise; //# sourceMappingURL=merge.d.ts.map