/** * LearningHistory — Track feedback and learn from interactions * * Records suggestions that were accepted, rejected, or modified, * and computes statistics about the agent's accuracy and user preferences. */ import type { LearningEntry } from '../types.js'; export declare class LearningHistory { private entries; /** * Record a learning entry */ record(entry: LearningEntry): void; /** * Get all entries */ getAll(): LearningEntry[]; /** * Get entries for a specific target (component, token, file, etc.) */ getForTarget(target: string): LearningEntry[]; /** * Get entries by type */ getByType(type: string): LearningEntry[]; /** * Get entries by decision */ getByDecision(decision: 'accepted' | 'rejected' | 'modified'): LearningEntry[]; /** * Get entries by tag */ getByTag(tag: string): LearningEntry[]; /** * Get entries within a time range */ getByDateRange(startTime: string, endTime: string): LearningEntry[]; /** * Compute statistics about learning */ getStats(): { totalSuggestions: number; acceptanceRate: number; rejectionRate: number; modificationRate: number; acceptedCount: number; rejectedCount: number; modifiedCount: number; accuracyTrend: { week: string; accuracy: number; }[]; mostRejectedType: string; mostAcceptedType: string; }; /** * Clear all entries */ clear(): void; /** * Save to a JSON file */ save(filePath: string): void; /** * Load from a JSON file */ static load(filePath: string): LearningHistory; /** * Serialize to JSON */ toJSON(): LearningEntry[]; /** * Deserialize from JSON */ static fromJSON(arr: LearningEntry[]): LearningHistory; } //# sourceMappingURL=learning-history.d.ts.map