/** * Dual-verdict architecture for recoverability classification. * * Combines rule-based handlers (high trust) with ML classifier (generalization) * and tracks confidence/source for each verdict. * * Rules: * 1. If rule-based handler exists → use rules, check classifier agreement * 2. If only classifier (unknown resource type) → use classifier with confidence * 3. Agreement/disagreement is tracked for trust calibration */ import { type RecoverabilityResult, type ResourceChange, type TerraformState, type VerdictSource } from '../resources/types.js'; export interface DualVerdictResult extends RecoverabilityResult { source: VerdictSource; confidence: number; classifierAgreement?: boolean; classifierVerdict?: RecoverabilityResult; featureExplanation?: string[]; } /** * Get recoverability using dual-verdict architecture. * * If a rule-based handler exists for this resource type, it is the source of truth. * The classifier runs in parallel to check agreement, which helps calibrate trust. * * If no handler exists, the classifier provides the verdict with a confidence score. */ export declare function getRecoverabilityDual(change: ResourceChange, state: TerraformState | null): DualVerdictResult; /** * Check if we have high confidence in a verdict. * Used to decide whether to show the ~ marker. */ export declare function isHighConfidence(result: DualVerdictResult): boolean; /** * Check if a verdict came from the classifier (not rules). */ export declare function isClassifierVerdict(result: DualVerdictResult): boolean; /** * Get the confidence display string. */ export declare function formatConfidence(result: DualVerdictResult): string; //# sourceMappingURL=dual-verdict.d.ts.map