/** * @fileoverview Risk Score History Repository * @module @skillsmith/core/repositories/RiskScoreHistoryRepository * @see SMI-3864: Security-informed quality scoring * * CRUD operations for the risk_score_history table. * Records point-in-time snapshots after each security scan * for trend detection and supply chain attack monitoring. */ import type { Database } from '../db/database-interface.js'; export interface RiskScoreSnapshot { id: number; skillId: string; riskScore: number; findingsCount: number; contentHash: string | null; scannedAt: string; source: 'install' | 'indexer' | 'rescan'; } export declare class RiskScoreHistoryRepository { private readonly db; constructor(db: Database); /** * Record a risk score snapshot. Prunes old entries to cap at * MAX_HISTORY_PER_SKILL per skill (Review #7). */ record(snapshot: Omit): void; /** * Get risk score history for a skill, most recent first. */ getHistory(skillId: string, limit?: number): RiskScoreSnapshot[]; /** * Get the most recent risk score snapshot for a skill. */ getLatest(skillId: string): RiskScoreSnapshot | null; } //# sourceMappingURL=RiskScoreHistoryRepository.d.ts.map