/** * Stage 8: confidence and visibility. * * All thresholds live here so that calibration against the labelled set can move them without * touching detector or rule code. The numbers below are the deterministic baseline's starting * point, chosen conservatively; Phase 6 replaces them with calibrated values. */ import { type Label, type Visibility } from '../types'; export interface ConfidenceConfig { /** At or above this, high confidence history may be hidden outright. */ hideThreshold: number; /** At or above this, content is collapsed but one interaction away. */ collapseThreshold: number; /** Minimum anchor strength before hiding is permitted at all. */ minAnchorStrength: number; } export declare const DEFAULT_CONFIDENCE: ConfidenceConfig; /** * Validate caller supplied confidence thresholds and fill in the defaults. * * Rejects, never clamps. Clamping hides a configuration mistake and makes the pipeline behave * differently from what the caller asked for, on every message, silently. `NaN` is the case that * matters most: every comparison against it is false, so a `NaN` threshold does not merely shift * behaviour, it makes the visibility bands stop working while everything still looks fine. * * Takes a partial. The previous signature required a complete object, so a caller wanting to move * one threshold had to copy the other two and then own them forever. */ export declare function validateConfidenceConfig(input?: Partial): ConfidenceConfig; /** * Map a label and confidence to a visibility band. * * The asymmetry is deliberate and is the core safety mechanism: * - only REPLY_HISTORY can ever be hidden outright * - FORWARDED_CONTENT is collapsed at most, because it was included on purpose * - INLINE_QUOTE stays visible, because it is the context an answer depends on * - UNKNOWN always stays visible */ export declare function visibilityFor(label: Label, confidence: number, config?: ConfidenceConfig): Visibility; /** * Message level confidence. * * The weakest hide or collapse decision, not the average. An average would let a long run of easy * blocks mask one risky decision, and the risky decision is the one that loses content. */ export declare function overallConfidence(decisions: readonly { confidence: number; visibility: Visibility; }[]): number; //# sourceMappingURL=confidence.d.ts.map