import type { SourceFile } from "../statelog/projectClient.js"; export type PlannedPullFile = { name: string; destination: string; contents: string; replace: boolean; }; export type PullPlan = { outputDir: string; files: PlannedPullFile[]; }; /** An application failure that names the destinations already committed (the * bundle is not transactional) and any temp sibling left behind. The committed * list is folded into `message` so the sole `error.message` a command prints * still discloses the already-written files. */ export declare class PullApplyError extends Error { readonly committed: string[]; readonly leftoverTemp?: string | undefined; constructor(detail: string, committed: string[], leftoverTemp?: string | undefined); } /** Preflight the whole pull. Completes before any mutation; throws on any * violation so no file is written when a conflict or unsafe name exists. */ export declare function planSourcePull(files: SourceFile[], outputDir: string, force: boolean): PullPlan; /** Publish the plan. Each file is written to an exclusive temp sibling then * committed atomically: create via `fs.link` (EEXIST on a post-plan race → * aborts that file), or `--force` replace via revalidate-then-rename over a * still-regular file. The whole bundle is NOT transactional. */ export declare function applySourcePull(plan: PullPlan): void;