import type { OverviewPayload, IncrementListPayload, IncrementSummary, SyncStatusPayload, SkillUsage, LspStatus, PluginInfo } from '../../types.js';
import type { CostsSummaryPayload } from './cost-aggregator.js';
interface AnalyticsAggregation {
    totalEvents: number;
    successRate: number;
    topCommands: Array<{
        name: string;
        count: number;
    }>;
    topSkills: Array<{
        name: string;
        plugin: string;
        count: number;
        successCount: number;
        failureCount: number;
        lastUsed: string;
    }>;
    topAgents: Array<{
        name: string;
        count: number;
    }>;
    dailySummaries: Array<{
        date: string;
        totalEvents: number;
    }>;
    last24hEvents: number;
}
export declare class DashboardDataAggregator {
    private projectRoot;
    private analyticsCache;
    private analyticsCacheTime;
    private readonly analyticsCacheTTL;
    private incrementsCache;
    private incrementsCacheTime;
    private readonly incrementsCacheTTL;
    constructor(projectRoot: string);
    /** Invalidate the increments cache (called by file watcher on increment changes) */
    invalidateIncrementsCache(): void;
    /** Get overview combining all sources */
    getOverview(costData?: CostsSummaryPayload): Promise<OverviewPayload>;
    /** Get increments list (with TTL cache) */
    getIncrements(): Promise<IncrementListPayload>;
    /** Get sync status with enriched connection diagnosis, umbrella-aware */
    getSyncStatus(): Promise<SyncStatusPayload>;
    /** Get analytics summary aggregated from events.jsonl */
    getAnalyticsSummary(): Promise<AnalyticsAggregation>;
    /** Get per-skill usage stats from events.jsonl */
    getSkillUsage(): Promise<SkillUsage[]>;
    /** Get notifications */
    getNotifications(): Promise<unknown[]>;
    /** Get config */
    getConfig(): Promise<Record<string, unknown>>;
    /** Get LSP status */
    getLspStatus(): Promise<LspStatus | null>;
    /** Get installed plugins */
    getPlugins(): Promise<PluginInfo[]>;
    private aggregateEventsFromJsonl;
    /**
     * Enrich sync platforms with connection status and diagnostics.
     * @param syncMeta - Raw sync metadata for the project/repo
     * @param config - Full config or a config with a `sync` section
     * @param syncOverride - Optional per-platform sync config override (from child repo)
     */
    enrichSyncPlatforms(syncMeta: any, config: any, syncOverride?: Record<string, any>): Record<string, any>;
    /** Scan increment directories directly from filesystem (async) */
    scanIncrementsFromFilesystem(): Promise<IncrementSummary[]>;
    /** Count tasks from tasks.md file (async) */
    private countTasksFromFile;
    /** Count acceptance criteria from spec.md file (async) */
    private countAcsFromFile;
    /** Build summary counts from increment list */
    private buildSummaryFromIncrements;
    private readDashboardJson;
    private readSyncMetadata;
    private readNotifications;
    private readConfig;
    private readJsonFile;
    private extractStatusBreakdown;
    /**
     * Get recent sync errors from the resilience audit log.
     * Returns up to `limit` failure entries from the last `hours` hours.
     */
    getSyncErrors(hours?: number, limit?: number): Promise<SyncErrorEntry[]>;
    /**
     * Detect sync gaps: increments that are synced to some providers but not all configured ones.
     */
    getSyncGaps(): Promise<SyncGapEntry[]>;
}
export interface SyncErrorEntry {
    provider: string;
    incrementId: string;
    error: string;
    errorStack?: string;
    timestamp: string;
    outcome: string;
}
export interface SyncGapEntry {
    incrementId: string;
    syncedProviders: string[];
    missingProviders: string[];
    lastSyncTimestamp?: string;
}
export {};
//# sourceMappingURL=dashboard-data-aggregator.d.ts.map