/** * Periodic Governance — 知识库定期治理 (FR-N08) * * 功能: * 1. 过时检测:对 fact 类型条目,用 LLM 判断是否仍成立 * 2. 价值衰减:last_hit_at 超过 N 天(可配置,默认 90)的条目 confidence -= 0.1,低于阈值(可配置,默认 0.3)则标记低价值 * 3. 矛盾扫描:BGE embedding 余弦预筛(cosine > 0.6)→ LLM 精判,结果进入冲突裁决队列 * 4. 常识回收:用 LLM 评估条目是否已被模型内化 * 5. 审计轨迹:写入 quality_gate_log 表 * 6. 恢复命令:governance restore * 7. 报告输出:Top-10 高风险条目 * 8. 运行摘要持久化:每次 governance run 写入 quality_gate_log(decision='governance_summary') */ export interface PeriodicGovernanceOptions { domain?: string; dryRun?: boolean; json?: boolean; decayDays?: number; minConfidence?: number; } export interface GovernanceAction { entryId: string; entryTitle: string; actionType: 'staleness_flagged' | 'value_decay' | 'value_low' | 'common_reclaimed' | 'contradiction_flagged'; reason: string; previousConfidence: number; newConfidence: number; previousStatus: string; newStatus: string; } export interface PeriodicGovernanceReport { runAt: string; totalScanned: number; actions: GovernanceAction[]; topRiskEntries: Array<{ id: string; title: string; confidence: number; status: string; }>; contradictions: Array<{ entryAId: string; entryATitle: string; entryBId: string; entryBTitle: string; }>; dryRun: boolean; } export declare function runPeriodicGovernance(options?: PeriodicGovernanceOptions): Promise; export declare function runGovernanceRestore(entryId: string): Promise; export declare function formatPeriodicGovernanceReport(report: PeriodicGovernanceReport): string; //# sourceMappingURL=periodic-governance.d.ts.map