UNPKG

ai-debug-local-mcp

Version:

🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh

109 lines • 3.66 kB
/** * AI Feedback Privacy Aggregator * * Privacy-preserving data aggregation for AI feedback collection that enables * valuable analytics while protecting user privacy through differential privacy, * k-anonymity, and data minimization techniques. */ import { AIFeedbackEntry } from './ai-feedback-collector.js'; export interface PrivacyConfig { enableDifferentialPrivacy: boolean; epsilonValue: number; kAnonymityThreshold: number; enableDataMinimization: boolean; retentionPeriodDays: number; allowedAggregations: ('count' | 'average' | 'distribution' | 'trends')[]; } export interface AggregatedMetrics { timestamp: number; aggregationType: string; privacyLevel: 'minimal' | 'standard' | 'strict'; metrics: { totalSessions: number; averageSatisfaction: number; satisfactionDistribution: Record<string, number>; agentPerformance: Record<string, { usageCount: number; averageRating: number; anonymizedFeedback: string[]; }>; frameworkMetrics: Record<string, { sessionCount: number; averageComplexity: string; successRate: number; }>; trendIndicators: { satisfactionTrend: 'improving' | 'stable' | 'declining'; usageTrend: 'increasing' | 'stable' | 'decreasing'; qualityTrend: 'improving' | 'stable' | 'declining'; }; }; privacyMetadata: { noiseAdded: boolean; kAnonymityMet: boolean; dataMinimized: boolean; originalEntryCount: number; aggregatedEntryCount: number; }; } export interface PrivacyReport { complianceLevel: 'compliant' | 'warning' | 'violation'; privacyRisks: string[]; recommendedActions: string[]; dataRetentionStatus: { totalEntries: number; expiredEntries: number; retainedEntries: number; }; anonymizationEffectiveness: { score: number; vulnerabilities: string[]; improvements: string[]; }; } /** * Privacy-Preserving AI Feedback Aggregator */ export declare class AIFeedbackPrivacyAggregator { private config; private privacyBudgetUsed; private aggregationHistory; constructor(config?: Partial<PrivacyConfig>); /** * Aggregate feedback data with privacy preservation */ aggregateWithPrivacy(feedbackData: AIFeedbackEntry[], aggregationType?: 'daily' | 'weekly' | 'monthly'): Promise<AggregatedMetrics>; /** * Generate privacy compliance report */ generatePrivacyReport(feedbackData: AIFeedbackEntry[]): PrivacyReport; /** * Export privacy-compliant dataset */ exportPrivacyCompliantDataset(feedbackData: AIFeedbackEntry[], exportLevel?: 'public' | 'research' | 'internal'): { dataset: any[]; privacyGuarantees: string[]; limitations: string[]; }; private applyPrivacyFilters; private checkKAnonymity; private applyDataMinimization; private calculateBaseMetrics; private addDifferentialPrivacyNoise; private generateLaplaceNoise; private hashValue; private generalizeTextArray; private getSatisfactionBucket; private groupByAgent; private groupByFramework; private getMostCommonComplexity; private extractAnonymizedFeedback; private determinePrivacyLevel; private updatePrivacyBudget; private assessReidentificationRisk; private calculateAnonymizationScore; private applyMaximalPrivacy; private applyResearchPrivacy; private applyInternalPrivacy; } //# sourceMappingURL=ai-feedback-privacy-aggregator.d.ts.map