/**
 * False Positive Feedback
 *
 * Handles user feedback on findings and maintains a feedback database
 * for improving FP detection over time.
 *
 * @module scanners/fp-feedback
 */
import type { ScannerType, DeterministicFinding } from "./types.js";
import type { Severity } from "../certification/types.js";
/**
 * Reason for marking a finding as FP
 */
export type FPReason = "test-code" | "false-pattern-match" | "sanitized-elsewhere" | "intentional" | "vendor-code" | "generated-code" | "example-code" | "configuration" | "other";
/**
 * FP reason descriptions for UI
 */
export declare const FP_REASON_DESCRIPTIONS: Record<FPReason, string>;
/**
 * A single feedback entry
 */
export interface FeedbackEntry {
    /** Unique feedback ID */
    id: string;
    /** Finding ID this feedback relates to */
    findingId: string;
    /** Scanner that generated the finding */
    scanner: ScannerType;
    /** Rule ID */
    ruleId: string;
    /** File path */
    file: string;
    /** Line number */
    line?: number;
    /** Original severity */
    severity: Severity;
    /** Verdict: true positive or false positive */
    verdict: "tp" | "fp";
    /** Reason for FP (if verdict is FP) */
    reason?: FPReason;
    /** Additional details/notes */
    details?: string;
    /** Who submitted the feedback */
    submittedBy?: string;
    /** When the feedback was submitted */
    submittedAt: string;
    /** Hash of the code at feedback time (for invalidation) */
    codeHash?: string;
}
/**
 * Feedback database
 */
export interface FeedbackDatabase {
    version: string;
    projectPath: string;
    entries: FeedbackEntry[];
    stats: {
        totalFeedback: number;
        tpCount: number;
        fpCount: number;
        byScanner: Record<string, {
            tp: number;
            fp: number;
        }>;
        byReason: Record<string, number>;
    };
}
/**
 * Load feedback database
 */
export declare function loadFeedbackDatabase(projectPath: string): Promise<FeedbackDatabase>;
/**
 * Save feedback database
 */
export declare function saveFeedbackDatabase(projectPath: string, db: FeedbackDatabase): Promise<void>;
/**
 * Submit feedback for a finding
 */
export declare function submitFeedback(projectPath: string, finding: DeterministicFinding, verdict: "tp" | "fp", options?: {
    reason?: FPReason;
    details?: string;
    submittedBy?: string;
    codeHash?: string;
}): Promise<FeedbackEntry>;
/**
 * Get feedback for a specific finding
 */
export declare function getFeedbackForFinding(projectPath: string, scanner: ScannerType, ruleId: string, file: string, line?: number): Promise<FeedbackEntry[]>;
/**
 * Get all feedback for a rule
 */
export declare function getFeedbackForRule(projectPath: string, scanner: ScannerType, ruleId: string): Promise<FeedbackEntry[]>;
/**
 * Check if a finding has existing feedback
 */
export declare function hasFeedback(projectPath: string, scanner: ScannerType, ruleId: string, file: string, line?: number): Promise<boolean>;
/**
 * Get suppression suggestions based on feedback
 */
export declare function getSuppressionSuggestions(projectPath: string, options?: {
    minFPRate?: number;
    minSampleSize?: number;
}): Promise<Array<{
    scanner: ScannerType;
    ruleId: string;
    fpRate: number;
    sampleSize: number;
    suggestion: "disable" | "review" | "keep";
    commonReasons: FPReason[];
}>>;
/**
 * Generate feedback summary report
 */
export declare function generateFeedbackReport(projectPath: string): Promise<{
    overview: {
        totalFeedback: number;
        tpCount: number;
        fpCount: number;
        overallFPRate: number;
    };
    byScanner: Array<{
        scanner: ScannerType;
        total: number;
        tp: number;
        fp: number;
        fpRate: number;
    }>;
    topFPReasons: Array<{
        reason: FPReason;
        count: number;
        percentage: number;
    }>;
    recentFeedback: FeedbackEntry[];
    suppressionSuggestions: Awaited<ReturnType<typeof getSuppressionSuggestions>>;
}>;
/**
 * Clear old feedback entries
 */
export declare function pruneOldFeedback(projectPath: string, maxAgeDays?: number): Promise<number>;
//# sourceMappingURL=fp-feedback.d.ts.map