/** * Automatic Contradiction Detection for Research Tool * * Surfaces disagreements between sources and policy change indicators * WITHOUT requiring the caller to know what contradictions to look for. * * Two detection mechanisms: * 1. Content-Level Detection: Scan excerpts for linguistic markers * 2. Value-Level Detection: Compare extracted values across sources */ export type ContradictionSeverity = 'critical' | 'major' | 'minor' | 'info'; export type ContradictionCategory = 'value_mismatch' | 'policy_change' | 'denial_indicator'; export interface ContradictionAlert { id: string; category: ContradictionCategory; severity: ContradictionSeverity; title: string; description: string; field?: string; conflictingValues?: Array<{ value: unknown; source: string; sourceType: string; authorityScore: number; }>; evidence: Array<{ source: string; excerpt: string; matchedPattern?: string; }>; suggestedAction: string; } export interface ContradictionSummary { total: number; bySeverity: Record; hasCritical: boolean; summary: string; } export interface ContradictionResult { alerts: ContradictionAlert[]; summary: ContradictionSummary; } /** * Source data structure expected from research handler */ export interface SourceForDetection { url: string; sourceType: string; authorityScore: number; excerpt?: string; extractedData?: Record; error?: string; } /** * Detect content-level contradictions by scanning excerpts for policy change markers */ export declare function detectContentContradictions(sources: SourceForDetection[], _scope: string): ContradictionAlert[]; /** * Detect value-level contradictions by comparing extracted values across sources */ export declare function detectValueContradictions(sources: SourceForDetection[], _scope: string): ContradictionAlert[]; /** * Main entry point: detect all contradictions in sources */ export declare function detectContradictions(sources: SourceForDetection[], scope: string): ContradictionResult; //# sourceMappingURL=contradiction-detector.d.ts.map