/** * Correction Cue Learner * * Persistent, learnable keyword store for correction cue detection. * Replaces the hardcoded cue list in detectCorrectionCue() with a * crash-safe JSON store that can grow over time. * * Persistence contract: * - Atomic write: temp-file-then-rename (T-38-02) * - Cache invalidated after every write (D-05) * - 200-term hard cap enforced before any write (T-38-01) */ import type { CorrectionKeyword, CorrectionKeywordStore } from './correction-types.js'; export declare function _resetCorrectionCueCache(): void; export declare function loadCorrectionKeywordStore(stateDir: string): CorrectionKeywordStore; export declare function saveCorrectionKeywordStore(stateDir: string, store: CorrectionKeywordStore): void; export declare function _resetCorrectionCueLearnerInstance(): void; export declare class CorrectionCueLearner { private readonly store; private readonly stateDir; constructor(stateDir: string); recordTruePositive(term: string): void; recordFalsePositive(term: string): void; add(keyword: Omit): void; updateWeight(term: string, weight: number): void; remove(term: string): void; getStore(): CorrectionKeywordStore; getLastOptimizedAt(): string; flush(): void; static get(stateDir: string): CorrectionCueLearner; }