/**
 * Usage Statistics Aggregation
 *
 * Aggregates tool usage data to generate insights and recommendations.
 */
import Database from 'better-sqlite3';
export interface ToolUsageStats {
    toolName: string;
    toolset: string;
    callCount: number;
    successCount: number;
    failureCount: number;
    avgDuration: number;
    lastUsed: number;
    firstUsed: number;
}
export interface ToolsetUsageStats {
    toolset: string;
    toolCount: number;
    totalCalls: number;
    uniqueToolsUsed: number;
    avgCallsPerTool: number;
}
export interface ProjectUsageSummary {
    projectPath: string;
    totalCalls: number;
    uniqueToolsUsed: number;
    totalDuration: number;
    avgDuration: number;
    successRate: number;
    mostUsedTool: string;
    mostUsedToolset: string;
    topTools: Array<{
        name: string;
        count: number;
    }>;
    topToolsets: Array<{
        name: string;
        count: number;
    }>;
}
export interface UsageTrend {
    date: string;
    callCount: number;
    uniqueTools: number;
    avgDuration: number;
}
export declare function getToolUsageStats(db: Database.Database, projectPath: string, days?: number): ToolUsageStats[];
export declare function getToolsetUsageStats(db: Database.Database, projectPath: string, days?: number): ToolsetUsageStats[];
export declare function getProjectUsageSummary(db: Database.Database, projectPath: string, days?: number): ProjectUsageSummary | null;
export declare function getUsageTrend(db: Database.Database, projectPath: string, days?: number): UsageTrend[];
export declare function getUnusedTools(db: Database.Database, projectPath: string, availableTools: string[], days?: number): string[];
export declare function getFrequentlyFailingTools(db: Database.Database, projectPath: string, days?: number, minFailures?: number): Array<{
    toolName: string;
    failureCount: number;
    lastError: string | null;
}>;
export declare function getAllProjects(db: Database.Database): Array<{
    projectPath: string;
    lastSeen: number;
}>;
export declare function exportUsageStats(db: Database.Database, projectPath: string, days?: number): string;
export declare function getCachedProjectSummary(db: Database.Database, projectPath: string, days?: number): ProjectUsageSummary | null;
export declare function formatStatsDisplay(summary: ProjectUsageSummary, projectPath: string): string;
