/**
 * Nexus Prime -- Proof System Types
 *
 * Sovereign verification proofs that accompany every execution run.
 * Each proof type captures the rationale and evidence behind a decision,
 * enabling post-hoc audit and tri-state run tracking.
 */
export interface SelectionProof {
    selectedFiles: Array<{
        path: string;
        reason: string;
    }>;
    rejectedFiles: Array<{
        path: string;
        reason: string;
    }>;
    selectedArtifacts: Array<{
        name: string;
        type: string;
        reason: string;
    }>;
    rejectedArtifacts: Array<{
        name: string;
        type: string;
        reason: string;
    }>;
    selectorPrecedenceUsed: readonly string[];
    dominantReason: string;
    confidence: number;
}
export interface WorkerProof {
    topology: string;
    lanes: Array<{
        role: string;
        files: string[];
        rationale: string;
    }>;
    whyThisTopology: string;
    alternativesRejected: string[];
}
export interface VerificationProof {
    checks: Array<{
        name: string;
        passed: boolean;
        detail: string;
    }>;
    contradictions: string[];
    verdict: 'confirmed' | 'flagged' | 'rejected';
}
export interface MemoryPromotionProof {
    sourceRunIds: string[];
    evidence: string[];
    conflicts: string[];
    promotionClass: 'session_learning' | 'project_fact' | 'reusable_pattern';
    verdict: 'confirmed' | 'flagged' | 'rejected';
}
export interface ApplyProof {
    mergeDecision: string;
    rollbackConsidered: boolean;
    verifierGate: string;
    finalVerdict: 'confirmed' | 'flagged' | 'rejected';
}
export type ProofType = 'selection' | 'worker' | 'verification' | 'memory_promotion' | 'apply';
export type ProofVerdict = 'confirmed' | 'flagged' | 'rejected';
export interface ProofEnvelope {
    id: string;
    runId: string;
    type: ProofType;
    createdAt: number;
    proof: SelectionProof | WorkerProof | VerificationProof | MemoryPromotionProof | ApplyProof;
}
export type ExecutionState = 'planned' | 'running' | 'completed' | 'failed';
export type VerificationState = 'pending' | 'confirmed' | 'flagged' | 'rejected';
export type AcceptanceState = 'unapplied' | 'applied' | 'rolled_back' | 'held';
export interface RunTriState {
    executionState: ExecutionState;
    verificationState: VerificationState;
    acceptanceState: AcceptanceState;
}
