/**
 * False Positive Tracker
 *
 * Tracks false positive rates per scanner/rule and adjusts
 * finding confidence accordingly.
 *
 * @module scanners/fp-tracker
 */
import type { ScannerType, DeterministicFinding } from "./types.js";
import type { Severity } from "../certification/types.js";
/**
 * Metrics for a specific rule
 */
export interface RuleMetrics {
    /** Scanner that generated this rule */
    scanner: ScannerType;
    /** Rule ID */
    ruleId: string;
    /** Total findings reported by this rule */
    totalReported: number;
    /** Number confirmed as true positives */
    confirmedTP: number;
    /** Number confirmed as false positives */
    confirmedFP: number;
    /** Number still pending review */
    pendingReview: number;
    /** Calculated FP rate (0-1) */
    fpRate: number;
    /** Calculated TP rate (0-1) */
    tpRate: number;
    /** Confidence adjustment factor based on history */
    adjustmentFactor: number;
    /** Last updated timestamp */
    lastUpdated: string;
    /** Severity distribution of findings */
    severityDistribution: Partial<Record<Severity, number>>;
}
/**
 * Aggregated scanner metrics
 */
export interface ScannerMetrics {
    scanner: ScannerType;
    totalRules: number;
    totalFindings: number;
    overallFPRate: number;
    overallTPRate: number;
    ruleMetrics: Map<string, RuleMetrics>;
}
/**
 * FP tracking data store
 */
export interface FPTrackingData {
    version: string;
    lastUpdated: string;
    projectPath: string;
    scanners: Record<string, ScannerMetrics>;
    globalStats: {
        totalFindings: number;
        totalTP: number;
        totalFP: number;
        totalPending: number;
        overallAccuracy: number;
    };
}
/**
 * Load FP tracking data from disk
 */
export declare function loadTrackingData(projectPath: string): Promise<FPTrackingData>;
/**
 * Save FP tracking data to disk
 */
export declare function saveTrackingData(projectPath: string, data: FPTrackingData): Promise<void>;
/**
 * Record a new finding for tracking
 */
export declare function recordFinding(projectPath: string, finding: DeterministicFinding): Promise<void>;
/**
 * Mark a finding as true positive
 */
export declare function markTruePositive(projectPath: string, scanner: ScannerType, ruleId: string): Promise<RuleMetrics | undefined>;
/**
 * Mark a finding as false positive
 */
export declare function markFalsePositive(projectPath: string, scanner: ScannerType, ruleId: string, reason?: string): Promise<RuleMetrics | undefined>;
/**
 * Adjust finding confidence based on historical FP rates
 */
export declare function adjustFindingConfidence(finding: DeterministicFinding, metrics: RuleMetrics | undefined): number;
/**
 * Get metrics for a specific rule
 */
export declare function getRuleMetrics(projectPath: string, scanner: ScannerType, ruleId: string): Promise<RuleMetrics | undefined>;
/**
 * Get all scanner metrics
 */
export declare function getAllMetrics(projectPath: string): Promise<FPTrackingData>;
/**
 * Get rules with high FP rates
 */
export declare function getHighFPRules(projectPath: string, threshold?: number, minSampleSize?: number): Promise<RuleMetrics[]>;
/**
 * Generate FP tracking report
 */
export declare function generateFPReport(projectPath: string, options?: {
    minSampleSize?: number;
    includeAllRules?: boolean;
}): Promise<{
    summary: {
        totalScanners: number;
        totalRules: number;
        totalFindings: number;
        overallAccuracy: number;
        highFPRuleCount: number;
    };
    scannerBreakdown: Array<{
        scanner: ScannerType;
        totalFindings: number;
        fpRate: number;
        tpRate: number;
        ruleCount: number;
    }>;
    highFPRules: RuleMetrics[];
    recommendations: string[];
}>;
//# sourceMappingURL=fp-tracker.d.ts.map