import { type EntryIdentity } from './remove-if-same.js'; /** Result of {@link removeRecordedLink}. */ export type RecordedLinkRemoval = { removed: true; } | { removed: false; reason: string; }; /** * SMI-6529 H3 (round 2) / N6 (round 4): uninstall's teardown of a copy-mode * fan-out (or symlink) Skillsmith created and recorded in the link manifest. * * A recorded copy can later become a real git working tree (the user * `git init`s or clones into that path), so a non-symlink recorded copy with * `.git` at its root is refused: reported and left in place. Symlinks are * just unlinked; what they point at is untouched. * * Returns `{ removed: true }` on a removal, or when the path is already gone, * and `{ removed: false, reason }` on a refusal or a failure, so the caller * keeps the manifest entry and reports it. */ export declare function removeRecordedLink(p: string): Promise; /** * SMI-6529 rounds 10–11: undo addLink's write when its record couldn't be * saved. A fresh destination is removed. A refreshed symlink is put back, * since its existing record still describes it (it was replaced with no * backup). Left as is, either would be a destination the manifest doesn't * describe: uninstall would miss it, and a force refresh would refuse it. * * The caller holds the destination's lock, so no other Skillsmith call has * touched it. Another program may have, so only the entry this call placed is * removed; anything else found there is left, and the error says so. Round * 15: `placed` is the staged entry's identity, taken before it was swapped * into place, so a swap after that moment can't pass as this call's write. */ export declare function undoUnrecordedWrite(toDir: string, cause: unknown, oldLinkTarget: string | undefined, placed: EntryIdentity | null): Promise; //# sourceMappingURL=fan-out.cleanup.d.ts.map