/**
 * coherence-learner — online EMA learning for coherence detector thresholds.
 *
 * Signal: if the user resumes after an `incoherent` stop, that stop was a
 * false positive. The model relaxes thresholds toward upper bounds.
 * After sustained clean completions (low FPR), thresholds can tighten back.
 *
 * This is a pure module (no file I/O, no side effects). Persistence is the
 * caller's responsibility (CLI writes to ~/.preste/coherence-model.json).
 */
export interface CoherenceModel {
    /** Current learned loop-detection window. Default: 6. Range: [6, 16]. */
    loopDetectionWindow: number;
    /** Current learned stall threshold. Default: 10. Range: [10, 30]. */
    stallThreshold: number;
    /** Total episodes observed. */
    episodes: number;
    /** Running false-positive rate (0–1). */
    falsePositiveRate: number;
    /** Unix ms of last update. */
    lastUpdated: number;
}
export interface CoherenceEpisode {
    stopReason: string;
    stepCount: number;
    /** True when the user resumed after an `incoherent` stop — clear FP signal. */
    isFalsePositive: boolean;
}
export declare function defaultCoherenceModel(): CoherenceModel;
/**
 * Return an updated model given one new episode observation.
 * Does NOT mutate the input — returns a new object.
 */
export declare function updateCoherenceModel(model: CoherenceModel, episode: CoherenceEpisode): CoherenceModel;
/**
 * Validate and repair a model loaded from disk (e.g. after a preste upgrade
 * that changed bounds). Clamps all numeric fields to valid ranges.
 */
export declare function repairCoherenceModel(raw: unknown): CoherenceModel;
//# sourceMappingURL=coherence-learner.d.ts.map