/** * Unified-diff parsing for the subagents /patches staging area. * Pure functions — no pi imports, so they are unit-testable. */ export interface PatchFileStat { path: string; added: number; removed: number; created: boolean; /** True when the diff deletes the file (+++ /dev/null); path holds the source path. */ deleted: boolean; /** Source path from the `--- a/…` line (kept for deletions). */ sourcePath?: string; header: string[]; } export interface PatchHunk { fileIndex: number; header: string; body: string[]; } export interface ParsedPatch { files: PatchFileStat[]; hunks: PatchHunk[]; totalAdded: number; totalRemoved: number; } export declare function parseUnifiedDiff(text: string): ParsedPatch;