/**
 * Agent Integrity Verifier
 *
 * Verifies consensus integrity in multi-agent systems.
 * Detects single outlier domination, low-entropy agreements,
 * and validates patch signing with Sigstore.
 *
 * @module agents/agent-integrity
 */
import type { Severity, Finding, AgentType, Verification } from "../certification/types.js";
/**
 * Agent contribution to consensus
 */
export interface AgentContribution {
    agent: AgentType;
    findings: number;
    severity: Record<Severity, number>;
    confidence: number;
    timestamp: string;
}
/**
 * Consensus analysis result
 */
export interface ConsensusAnalysis {
    totalAgents: number;
    activeAgents: number;
    findingsDistribution: Record<AgentType, number>;
    dominationScore: number;
    entropyScore: number;
    outlierAgents: AgentType[];
    suspiciousPatterns: IntegrityFinding[];
    isHealthy: boolean;
}
/**
 * Integrity finding
 */
export interface IntegrityFinding {
    type: IntegrityIssueType;
    severity: Severity;
    description: string;
    evidence: string;
    affectedAgents?: AgentType[];
    recommendation: string;
}
/**
 * Types of integrity issues
 */
export type IntegrityIssueType = "domination" | "low-entropy" | "outlier" | "timing-anomaly" | "unsigned-finding" | "hash-mismatch" | "version-drift" | "cross-contamination";
/**
 * Verification chain for a finding
 */
export interface VerificationChain {
    findingId: string;
    originalHash: string;
    verifications: Array<{
        agent: AgentType;
        hash: string;
        timestamp: string;
        verdict: "confirmed" | "disputed" | "inconclusive";
    }>;
    isValid: boolean;
    breakpoint?: string;
}
/**
 * Analyze consensus health
 */
export declare function analyzeConsensus(contributions: AgentContribution[]): ConsensusAnalysis;
/**
 * Calculate hash for a finding
 */
export declare function hashFinding(finding: {
    severity: string;
    category: string;
    description: string;
    evidence: string;
}): string;
/**
 * Verify a finding's hash chain
 */
export declare function verifyFindingChain(findingId: string, finding: {
    severity: string;
    category: string;
    description: string;
    evidence: string;
}, verifications: Verification[]): VerificationChain;
/**
 * Detect findings that appear to be copied between agents
 */
export declare function detectCrossContamination(agentFindings: Record<AgentType, Finding[]>): IntegrityFinding[];
/**
 * Run full integrity verification
 */
export declare function runIntegrityCheck(contributions: AgentContribution[], agentFindings: Record<AgentType, Finding[]>, options?: {
    checkCrossContamination?: boolean;
    verifyHashes?: boolean;
}): Promise<{
    consensus: ConsensusAnalysis;
    crossContamination: IntegrityFinding[];
    hashVerification: {
        verified: number;
        failed: number;
        chains: VerificationChain[];
    };
    overallHealth: "healthy" | "warning" | "critical";
    recommendations: string[];
}>;
/**
 * Convert integrity findings to certification findings
 */
export declare function integrityToFindings(analysis: ConsensusAnalysis, crossContamination: IntegrityFinding[]): Finding[];
//# sourceMappingURL=agent-integrity.d.ts.map