/**
 * Health Monitor
 *
 * Monitors daemon health: CPU/memory usage, auto-recovery, health endpoints.
 */
import { EventEmitter } from 'events';
export interface HealthMetrics {
    timestamp: Date;
    cpu: {
        usage: number;
        loadAvg: number[];
    };
    memory: {
        total: number;
        used: number;
        free: number;
        heapUsed: number;
        heapTotal: number;
        rss: number;
        percentage: number;
    };
    uptime: number;
    services: {
        name: string;
        healthy: boolean;
    }[];
}
export interface HealthMonitorConfig {
    /** Polling interval (ms) */
    intervalMs: number;
    /** Memory threshold for warning (percentage) */
    memoryWarningThreshold: number;
    /** Memory threshold for critical (percentage) */
    memoryCriticalThreshold: number;
    /** Max consecutive unhealthy checks before auto-recovery */
    maxUnhealthyChecks: number;
}
export declare class HealthMonitor extends EventEmitter {
    private config;
    private timer;
    private running;
    private startTime;
    private unhealthyCount;
    private lastMetrics;
    private serviceChecks;
    constructor(config?: Partial<HealthMonitorConfig>);
    /**
     * Register a service health check
     */
    registerServiceCheck(name: string, check: () => boolean): void;
    /**
     * Start monitoring
     */
    start(): void;
    /**
     * Stop monitoring
     */
    stop(): void;
    /**
     * Run a health check
     */
    check(): HealthMetrics;
    /**
     * Get last collected metrics
     */
    getLastMetrics(): HealthMetrics | null;
    /**
     * Get health summary for API endpoint
     */
    getHealthSummary(): {
        status: 'healthy' | 'warning' | 'critical';
        uptime: number;
        memory: {
            percentage: number;
            rss: number;
        };
        services: {
            name: string;
            healthy: boolean;
        }[];
    };
    isRunning(): boolean;
}
export declare function getHealthMonitor(config?: Partial<HealthMonitorConfig>): HealthMonitor;
export declare function resetHealthMonitor(): void;
