/** * Leaper Agent – Patch Parser * V4A unified diff parser and applier with fuzzy match support. */ export type OperationType = 'add' | 'update' | 'delete' | 'move'; export interface HunkLine { type: '+' | '-' | ' '; content: string; } export interface Hunk { context_hint?: string; lines: HunkLine[]; } export interface PatchOperation { type: OperationType; path: string; new_path?: string; hunks?: Hunk[]; content?: string; } export interface ApplyResult { success: boolean; operations_applied: number; errors: string[]; } export interface ParseResult { success: boolean; operations?: PatchOperation[]; error?: string; } export declare function parseV4aPatch(patch: string): ParseResult; export declare function applyHunk(fileContent: string, hunk: Hunk): { result: string; applied: boolean; }; export declare function validateOperations(operations: PatchOperation[], rootDir: string): string[]; export declare function applyV4aOperations(operations: PatchOperation[], rootDir?: string): ApplyResult; export declare function applyPatch(patch: string, rootDir?: string): ApplyResult; //# sourceMappingURL=patch-parser.d.ts.map