import type { FileEdit } from './types.js'; /** An edit that cannot be turned into a patch: its target text is missing, ambiguous, or its path is unsafe. */ export declare class PatchError extends Error { constructor(message: string); } /** * Applies edits in memory to the files `read` returns and renders the result as one unified diff * that `git apply` accepts. Nothing is written; the diff is the only output. */ export declare function renderPatch(edits: FileEdit[], read: (path: string) => Promise): Promise; /** A single-hunk git diff from `before` (null for a new file) to `after`. */ export declare function createUnifiedDiff(path: string, before: string | null, after: string): string; /** * The path an edit actually writes to: `src/../.env` writes `.env`. Every check on an edit's path must use this, * or a path spelled differently slips past the check while the patch still lands on the normalized file. */ export declare function normalizeEditPath(path: string): string; //# sourceMappingURL=patch.d.ts.map