/**
 * Policy Diff Utility
 *
 * Provides deep comparison of policy definitions with human-readable summaries.
 * Supports comparing any two versions of a policy to understand what changed.
 *
 * @packageDocumentation
 */
import type { PolicyDefinition, PolicyRule } from './types.js';
/**
 * Type of change detected
 */
export type ChangeType = 'added' | 'removed' | 'changed';
/**
 * Single change in a diff result
 */
export interface DiffChange {
    /** JSON path to the changed value (e.g., "rules[0].name") */
    path: string;
    /** Value before the change (undefined if added) */
    before: unknown;
    /** Value after the change (undefined if removed) */
    after: unknown;
    /** Type of change */
    type: ChangeType;
}
/**
 * Complete diff result between two policy versions
 */
export interface PolicyDiffResult {
    /** Whether any changes were detected */
    hasChanges: boolean;
    /** Total number of changes */
    changeCount: number;
    /** List of individual changes */
    changes: DiffChange[];
    /** Human-readable summary of the changes */
    summary: string;
    /** Categorized changes for easier consumption */
    categorized: {
        rules: DiffChange[];
        target: DiffChange[];
        metadata: DiffChange[];
        other: DiffChange[];
    };
}
/**
 * Compare two policy definitions and return detailed diff
 *
 * @param before - The earlier version of the policy definition
 * @param after - The later version of the policy definition
 * @returns Complete diff result with changes and summary
 */
export declare function diffPolicyDefinitions(before: PolicyDefinition, after: PolicyDefinition): PolicyDiffResult;
/**
 * Format a change for display
 */
export declare function formatChange(change: DiffChange): string;
/**
 * Format all changes for display
 */
export declare function formatDiff(result: PolicyDiffResult): string;
/**
 * Get a brief description of what changed between versions
 */
export declare function getChangeSummary(before: PolicyDefinition, after: PolicyDefinition): string;
/**
 * Check if two policy definitions are equivalent
 */
export declare function arePoliciesEquivalent(a: PolicyDefinition, b: PolicyDefinition): boolean;
/**
 * Extract rule-specific changes from a diff result
 */
export declare function getRuleChanges(result: PolicyDiffResult): {
    added: Array<{
        index: number;
        rule: PolicyRule;
    }>;
    removed: Array<{
        index: number;
        rule: PolicyRule;
    }>;
    modified: Array<{
        index: number;
        changes: DiffChange[];
    }>;
};
//# sourceMappingURL=diff.d.ts.map