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
193 lines • 5.54 kB
TypeScript
/**
* AI Feedback Collector
*
* Revolutionary system for collecting feedback from AI users about their experience
* with AI-Debug tools, enabling automatic tool improvement based on AI usage patterns.
*/
export interface AIFeedbackEntry {
id: string;
timestamp: number;
sessionId: string;
agentType: string;
toolsUsed: string[];
taskDescription: string;
outcome: 'success' | 'partial_success' | 'failure';
userExperience: {
satisfaction: number;
efficiency: number;
clarity: number;
usefulness: number;
};
feedback: {
strengths: string[];
weaknesses: string[];
suggestions: string[];
wouldUseAgain: boolean;
recommendToOthers: boolean;
};
technicalMetrics: {
responseTimeMs: number;
tokensSaved: number;
errorsEncountered: string[];
recoveryActions: string[];
};
contextualData: {
framework: string;
projectComplexity: 'simple' | 'moderate' | 'complex';
userType: 'ai_assistant' | 'developer' | 'qa_engineer';
sessionDuration: number;
};
}
export interface FeedbackAnalytics {
totalFeedbackEntries: number;
averageRatings: {
satisfaction: number;
efficiency: number;
clarity: number;
usefulness: number;
};
agentPerformance: Record<string, {
usageCount: number;
averageRating: number;
topStrengths: string[];
topWeaknesses: string[];
improvementTrends: number[];
}>;
toolEffectiveness: Record<string, {
usageCount: number;
successRate: number;
averageResponseTime: number;
userSatisfaction: number;
}>;
frameworkInsights: Record<string, {
sessionCount: number;
averageComplexity: string;
preferredAgents: string[];
commonIssues: string[];
}>;
improvementOpportunities: Array<{
area: string;
priority: 'high' | 'medium' | 'low';
impact: number;
description: string;
suggestedActions: string[];
}>;
}
export interface FeedbackCollectionConfig {
enableAutoCollection: boolean;
feedbackFrequency: 'always' | 'success_only' | 'failure_only' | 'periodic';
persistenceMode: 'memory' | 'file' | 'database';
analysisEnabled: boolean;
privacyMode: 'full' | 'anonymous' | 'opt_in';
feedbackPrompts: {
postSuccess: string;
postFailure: string;
postSession: string;
};
}
export declare class AIFeedbackCollector {
private feedbackEntries;
private config;
private analytics;
private analyticsCache;
constructor(config?: Partial<FeedbackCollectionConfig>);
/**
* Collect feedback from an AI user after tool usage
*/
collectFeedback(sessionId: string, agentType: string, feedback: Partial<AIFeedbackEntry>): Promise<string>;
/**
* Generate feedback prompt for AI users
*/
generateFeedbackPrompt(sessionOutcome: 'success' | 'failure' | 'session_end', context: {
agentType: string;
toolsUsed: string[];
sessionDuration: number;
tokensEstimatedSaved?: number;
contextLinesPreserved?: number;
}): string;
/**
* Get comprehensive feedback analytics
*/
getFeedbackAnalytics(forceRefresh?: boolean): Promise<FeedbackAnalytics>;
/**
* Get feedback summary for specific agent
*/
getAgentFeedbackSummary(agentType: string): {
totalSessions: number;
averageRatings: Record<string, number>;
topStrengths: string[];
topWeaknesses: string[];
recentTrends: string[];
};
/**
* Configure feedback collection settings
*/
updateConfiguration(newConfig: Partial<FeedbackCollectionConfig>): void;
/**
* Export feedback data for external analysis
*/
exportFeedbackData(format?: 'json' | 'csv'): string;
/**
* Clear all feedback data
*/
clearFeedbackData(): void;
/**
* Get current configuration
*/
getConfiguration(): FeedbackCollectionConfig;
/**
* Calculate comprehensive analytics
*/
private calculateAnalytics;
/**
* Helper method to calculate average ratings
*/
private calculateAverage;
/**
* Get top mentioned items from array
*/
private getTopMentions;
/**
* Get most common value from array
*/
private getMostCommon;
/**
* Calculate improvement trends for agent
*/
private calculateImprovementTrends;
/**
* Analyze recent trends
*/
private analyzeTrends;
/**
* Identify improvement opportunities based on feedback data
*/
private identifyImprovementOpportunities;
/**
* Persist feedback to file system
*/
private persistFeedbackToFile;
/**
* Load persisted feedback from files on startup
*/
loadPersistedFeedback(): Promise<void>;
/**
* Batch upload feedback entries (for cloud collection)
*/
batchUploadFeedback(feedbackEntries: Partial<AIFeedbackEntry>[]): Promise<{
successful: number;
failed: number;
errors: string[];
}>;
/**
* Get all feedback data for analytics
*/
getAllFeedback(): AIFeedbackEntry[];
getStorageInfo(): {
persistenceMode: string;
memoryEntries: number;
storageLocation: string;
estimatedSize: string;
};
}
//# sourceMappingURL=ai-feedback-collector.d.ts.map