import { HookLogEntry } from './hook-logger.js';
export type HookStatus = 'OK' | 'DEGRADED' | 'FAILED' | 'UNKNOWN';
export interface HookHealth {
    hookName: string;
    status: HookStatus;
    successRate: number;
    avgDuration: number;
    lastRun: string | null;
    totalExecutions: number;
    consecutiveFailures: number;
    recommendations: string[];
}
/**
 * Hook health tracking and analysis
 *
 * Analyzes hook execution logs to determine health status:
 * - OK: >90% success rate, no recent consecutive failures
 * - DEGRADED: 50-90% success rate OR 3+ warnings in last 10 executions
 * - FAILED: <50% success rate OR 3+ consecutive failures
 * - UNKNOWN: No execution data available
 *
 * @example
 * ```typescript
 * const tracker = new HookHealthTracker();
 * const logger = new HookLogger('.specweave/logs/hooks');
 * const logs = await logger.readLogs('session-start', 100);
 *
 * const health = tracker.analyze('session-start', logs);
 * console.log(`Status: ${health.status}`);
 * console.log(`Success rate: ${(health.successRate * 100).toFixed(1)}%`);
 * ```
 */
export declare class HookHealthTracker {
    private readonly WINDOW_HOURS;
    private readonly DEGRADED_THRESHOLD;
    private readonly OK_THRESHOLD;
    private readonly CONSECUTIVE_FAILURE_THRESHOLD;
    /**
     * Analyze hook health from execution logs
     *
     * @param hookName - Name of the hook
     * @param logs - Log entries (should be sorted by timestamp, most recent first)
     * @param referenceTime - Reference time for 24h window (default: now)
     * @returns Health analysis
     */
    analyze(hookName: string, logs: HookLogEntry[], referenceTime?: Date): HookHealth;
    private static readonly STATUS_ORDER;
    /**
     * Analyze health for multiple hooks
     * @returns Array of health analyses sorted by severity, then by name
     */
    analyzeAll(hooks: Map<string, HookLogEntry[]>): HookHealth[];
}
//# sourceMappingURL=hook-health-tracker.d.ts.map