/**
 * Health Alert Engine
 *
 * Evaluates alert rules against plugin health data and manages alerts.
 *
 * @since v1.66.0
 */
import { type Alert, type AlertCheckResult, type AlertCondition, type AlertConfig, type AlertEngineState, type AlertHistoryEntry, type AlertRule, type AlertSeverity } from './alert-types.js';
import type { PluginHealthScore, ServerHealthSummary } from './health-types.js';
/**
 * Plugin data for alert evaluation
 */
export interface PluginAlertData {
    pluginId: string;
    pluginName: string;
    healthScore: PluginHealthScore;
    previousScore?: PluginHealthScore;
    isAbandoned: boolean;
}
/**
 * Check if a value matches a condition
 */
export declare function evaluateCondition(condition: AlertCondition, value: number | string | boolean): boolean;
/**
 * Get value to check from plugin data based on condition type
 */
export declare function getConditionValue(condition: AlertCondition, plugin: PluginAlertData): number | string | boolean | null;
/**
 * Check if a rule should be skipped due to cooldown
 */
export declare function isOnCooldown(ruleId: string, cooldowns: Record<string, number>, cooldownHours: number): boolean;
/**
 * Evaluate a single rule against plugin data
 */
export declare function evaluateRule(rule: AlertRule, plugin: PluginAlertData, cooldowns: Record<string, number>, cooldownMultiplier?: number): Alert | null;
/**
 * Check if an alert should be resolved
 */
export declare function shouldResolveAlert(alert: Alert, rule: AlertRule, plugin: PluginAlertData | undefined): boolean;
/**
 * Health Alert Engine class
 */
export declare class HealthAlertEngine {
    private config;
    private state;
    private alertsToday;
    private lastDayReset;
    constructor(config?: AlertConfig);
    /**
     * Get current configuration
     */
    getConfig(): AlertConfig;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<AlertConfig>): void;
    /**
     * Get current state
     */
    getState(): AlertEngineState;
    /**
     * Get active alerts
     */
    getActiveAlerts(): Alert[];
    /**
     * Get alert history
     */
    getHistory(limit?: number): AlertHistoryEntry[];
    /**
     * Check plugins against all rules
     */
    checkPlugins(plugins: PluginAlertData[], summary?: ServerHealthSummary): AlertCheckResult;
    /**
     * Acknowledge an alert
     */
    acknowledgeAlert(alertId: string): boolean;
    /**
     * Manually resolve an alert
     */
    resolveAlert(alertId: string): boolean;
    /**
     * Add or update a rule
     */
    setRule(rule: AlertRule): void;
    /**
     * Remove a rule
     */
    removeRule(ruleId: string): boolean;
    /**
     * Enable/disable a rule
     */
    toggleRule(ruleId: string, enabled: boolean): boolean;
    /**
     * Get alerts by severity
     */
    getAlertsBySeverity(severity: AlertSeverity): Alert[];
    /**
     * Get critical alert count
     */
    getCriticalCount(): number;
    /**
     * Clear all alerts
     */
    clearAllAlerts(): void;
    /**
     * Clear alert history
     */
    clearHistory(): void;
    /**
     * Reset daily alert counter
     */
    private checkDailyReset;
    /**
     * Export state for persistence
     */
    exportState(): AlertEngineState;
    /**
     * Import state from persistence
     */
    importState(state: AlertEngineState): void;
}
/**
 * Create a health alert engine instance
 */
export declare function createAlertEngine(config?: AlertConfig): HealthAlertEngine;
//# sourceMappingURL=alert-engine.d.ts.map