/** * Line-based diff utilities using LCS (Longest Common Subsequence). * * @module */ /** Line diff result */ export interface DiffLine { type: 'same' | 'add' | 'remove'; line: string; } /** * Generate a line-based diff between two strings using LCS algorithm. * * @param a - the original/current content * @param b - the new/desired content */ export declare const diff_lines: (a: string, b: string) => Array; /** * Filter diff to only include lines within N lines of context around changes. * * @param context_lines - number of context lines to show around changes (default: 3) * @returns filtered diff with ellipsis markers for skipped regions */ export declare const filter_diff_context: (diff: Array, context_lines?: number) => Array; /** * Format options for diff output. */ export interface FormatDiffOptions { /** Prefix for each line (for indentation in plan output). */ prefix?: string; /** Whether to use ANSI colors. */ use_color?: boolean; /** Maximum number of diff lines to show (0 = unlimited). */ max_lines?: number; } /** * Format a diff for display. * * @param current_path - path label for "current" content * @param desired_path - path label for "desired" content */ export declare const format_diff: (diff: Array, current_path: string, desired_path: string, options?: FormatDiffOptions) => string; /** * Generate a formatted diff between two strings. * * Combines `diff_lines`, `filter_diff_context`, and `format_diff` for convenience. * Returns null if content is binary. * * @param path - file path for labels */ export declare const generate_diff: (current: string, desired: string, path: string, options?: FormatDiffOptions) => string | null; //# sourceMappingURL=diff.d.ts.map