import type { ID, ControlAction, Timestamp } from '../../common/types.js';
import type { ReplayResult } from './index.js';
/**
 * Type of difference detected
 */
export type DifferenceType = 'decision' | 'policy_applied' | 'policy_missing' | 'trust_score' | 'trust_level' | 'timing' | 'evaluation_order' | 'constraint' | 'metadata';
/**
 * Severity of the difference
 */
export type DifferenceSeverity = 'info' | 'warning' | 'critical';
/**
 * Individual difference between original and replay
 */
export interface Difference {
    type: DifferenceType;
    severity: DifferenceSeverity;
    path: string;
    originalValue: unknown;
    replayValue: unknown;
    description: string;
    impact?: string;
}
/**
 * Timing comparison
 */
export interface TimingComparison {
    originalDurationMs: number;
    replayDurationMs: number;
    differenceMs: number;
    percentageChange: number;
    significant: boolean;
}
/**
 * Policy comparison
 */
export interface PolicyComparison {
    policyId: ID;
    policyName: string;
    originalApplied: boolean;
    replayApplied: boolean;
    originalAction?: ControlAction;
    replayAction?: ControlAction;
    actionChanged: boolean;
}
/**
 * Complete comparison report
 */
export interface ComparisonReport {
    id: ID;
    intentId: ID;
    replayId: ID;
    generatedAt: Timestamp;
    /** Overall match status */
    isMatch: boolean;
    /** Decision comparison */
    decision: {
        originalAction: ControlAction;
        replayAction: ControlAction;
        matches: boolean;
    };
    /** All differences found */
    differences: Difference[];
    /** Policy-level comparison */
    policyComparison: PolicyComparison[];
    /** Timing comparison */
    timing: TimingComparison;
    /** Summary statistics */
    summary: {
        totalDifferences: number;
        criticalDifferences: number;
        warningDifferences: number;
        infoDifferences: number;
        policiesCompared: number;
        policiesChanged: number;
    };
    /** Recommendations based on differences */
    recommendations: string[];
}
/**
 * Original execution result for comparison
 */
export interface OriginalExecution {
    intentId: ID;
    action: ControlAction;
    policiesApplied: Array<{
        policyId: ID;
        policyName: string;
        action: ControlAction;
        reason?: string;
    }>;
    trustScore: number;
    trustLevel: number;
    durationMs: number;
    evaluatedAt: Timestamp;
    metadata?: Record<string, unknown>;
}
/**
 * Options for comparison
 */
export interface ComparisonOptions {
    /** Threshold for significant timing difference (percentage) */
    timingThresholdPercent?: number;
    /** Include info-level differences */
    includeInfoDifferences?: boolean;
    /** Generate recommendations */
    generateRecommendations?: boolean;
}
/**
 * ReplayComparator - Compares replay results with original execution
 */
export declare class ReplayComparator {
    private readonly defaultTimingThreshold;
    /**
     * Compare a replay result with the original execution
     */
    compare(original: OriginalExecution, replay: ReplayResult, options?: ComparisonOptions): Promise<ComparisonReport>;
    /**
     * Compare policy applications
     */
    private comparePolicies;
    /**
     * Compare timing
     */
    private compareTiming;
    /**
     * Assess the impact of a decision change
     */
    private assessDecisionImpact;
    /**
     * Generate recommendations based on differences
     */
    private generateRecommendations;
    /**
     * Generate a summary text from a comparison report
     */
    summarize(report: ComparisonReport): string;
}
/**
 * Create a new ReplayComparator instance
 */
export declare function createReplayComparator(): ReplayComparator;
//# sourceMappingURL=comparator.d.ts.map