import type { PatchOp } from "./manifest"; export type PatchResult = { file: string; applied: number; skipped: number; /** Target file was created because it did not exist (legacy app bootstrap). */ created?: boolean; }; /** * When patching a project created before a template file existed, seed minimal * content so insertAfter @irwin markers can apply. */ export declare function bootstrapPatchTargetContent(relFile: string, ops: PatchOp[]): string | null; /** Ensure @irwin marker lines exist before insertAfter/insertBefore ops run. */ export declare function ensurePatchTargetContent(relFile: string, content: string, ops: PatchOp[]): string; export declare function applyOp(content: string, op: PatchOp): { content: string; applied: boolean; }; export declare function applyPatches(projectRoot: string, patches: Array<{ file: string; ops: PatchOp[]; }>, dryRun: boolean): PatchResult[];