/**
 * Plugin Health & Compatibility Types
 *
 * Type definitions for the health scoring and compatibility system.
 *
 * @since v1.66.0
 */
/**
 * Health issue severity levels
 */
export type HealthSeverity = 'critical' | 'warning' | 'info';
/**
 * Health status categories
 */
export type HealthStatus = 'good' | 'warning' | 'critical';
/**
 * Health grade levels (A+ through F)
 */
export type HealthGrade = 'A+' | 'A' | 'B+' | 'B' | 'C+' | 'C' | 'D' | 'F';
/**
 * Types of health issues that can be detected
 */
export type HealthIssueType = 'outdated_version' | 'mc_incompatible' | 'missing_dependency' | 'conflicting_dependency' | 'unmaintained' | 'security_vulnerability' | 'known_bug' | 'deprecated' | 'abandoned' | 'load_order_issue';
/**
 * Health component (individual score category)
 */
export interface HealthComponent {
    /** Score from 0-100 */
    score: number;
    /** Weight contribution to overall score (0-1) */
    weight: number;
    /** Current status */
    status: HealthStatus;
    /** Human-readable details */
    details: string;
    /** When this component was last evaluated */
    lastChecked: number;
}
/**
 * Health issue detected for a plugin
 */
export interface HealthIssue {
    /** Unique issue ID */
    id: string;
    /** Severity level */
    severity: HealthSeverity;
    /** Issue type for categorization */
    type: HealthIssueType;
    /** Short title */
    title: string;
    /** Detailed description */
    description: string;
    /** How to fix the issue */
    remediation?: string;
    /** Whether this can be auto-fixed */
    autoFixable: boolean;
    /** Auto-fix action ID if applicable */
    autoFixAction?: string;
    /** Related plugin (for dependency issues) */
    relatedPlugin?: string;
    /** When the issue was first detected */
    detectedAt: number;
}
/**
 * Health recommendation for improving plugin health
 */
export interface HealthRecommendation {
    /** Unique recommendation ID */
    id: string;
    /** Priority (higher = more important) */
    priority: number;
    /** Short title */
    title: string;
    /** Detailed description */
    description: string;
    /** Expected score improvement if applied */
    expectedImprovement: number;
    /** Action to take */
    action: RecommendationAction;
}
/**
 * Types of recommendation actions
 */
export type RecommendationAction = {
    type: 'update';
    targetVersion: string;
} | {
    type: 'install';
    pluginName: string;
} | {
    type: 'remove';
    reason: string;
} | {
    type: 'configure';
    setting: string;
    value: string;
} | {
    type: 'review';
    url: string;
};
/**
 * Complete health score for a plugin
 */
export interface PluginHealthScore {
    /** Plugin identifier */
    pluginId: string;
    /** Plugin name for display */
    pluginName: string;
    /** Overall health score (0-100) */
    overall: number;
    /** Letter grade */
    grade: HealthGrade;
    /** Individual component scores */
    components: {
        /** Is the plugin version current? */
        version: HealthComponent;
        /** Is the plugin compatible with current MC version? */
        compatibility: HealthComponent;
        /** Is the plugin actively maintained? */
        maintenance: HealthComponent;
        /** Are dependencies healthy? */
        dependencies: HealthComponent;
        /** Any known security vulnerabilities? */
        security: HealthComponent;
        /** Error history and stability */
        stability: HealthComponent;
    };
    /** Detected issues */
    issues: HealthIssue[];
    /** Improvement recommendations */
    recommendations: HealthRecommendation[];
    /** When the score was last calculated */
    lastChecked: number;
    /** Score trend (positive = improving) */
    trend?: number;
}
/**
 * Server-wide health summary
 */
export interface ServerHealthSummary {
    /** Overall server health score (0-100) */
    overallScore: number;
    /** Server health grade */
    grade: HealthGrade;
    /** Total plugins analyzed */
    totalPlugins: number;
    /** Plugins by health status */
    byStatus: {
        healthy: number;
        warning: number;
        outdated: number;
        critical: number;
    };
    /** Plugins by grade */
    byGrade: Record<HealthGrade, number>;
    /** All critical issues across plugins */
    criticalIssues: Array<{
        pluginId: string;
        pluginName: string;
        issue: HealthIssue;
    }>;
    /** Top recommendations across all plugins */
    topRecommendations: Array<{
        pluginId: string;
        pluginName: string;
        recommendation: HealthRecommendation;
    }>;
    /** When the summary was generated */
    generatedAt: number;
    /** Score trend over time */
    trend: number;
}
/**
 * Health check configuration
 */
export interface HealthCheckConfig {
    /** Component weights (must sum to 1.0) */
    weights: {
        version: number;
        compatibility: number;
        maintenance: number;
        dependencies: number;
        security: number;
        stability: number;
    };
    /** Grade thresholds */
    gradeThresholds: {
        'A+': number;
        A: number;
        'B+': number;
        B: number;
        'C+': number;
        C: number;
        D: number;
    };
    /** Version freshness scoring */
    versionScoring: {
        current: number;
        oneMinorBehind: number;
        twoMinorBehind: number;
        oneMajorBehind: number;
        twoMajorBehind: number;
    };
    /** Maintenance activity scoring (days since update) */
    maintenanceScoring: {
        within30Days: number;
        within90Days: number;
        within180Days: number;
        within1Year: number;
        over1Year: number;
        over2Years: number;
    };
    /** MC version compatibility scoring */
    compatibilityScoring: {
        exactMatch: number;
        oneMinorBehind: number;
        twoMinorBehind: number;
        moreThanTwoBehind: number;
        knownIncompatible: number;
    };
}
/**
 * Default health check configuration
 */
export declare const DEFAULT_HEALTH_CONFIG: HealthCheckConfig;
/**
 * Plugin metadata needed for health checks
 */
export interface PluginHealthMetadata {
    /** Plugin identifier */
    pluginId: string;
    /** Plugin display name */
    name: string;
    /** Currently installed version */
    currentVersion: string;
    /** Latest available version */
    latestVersion?: string;
    /** When the plugin was last updated upstream */
    lastUpdatedAt?: number;
    /** Supported Minecraft versions */
    supportedMcVersions?: string[];
    /** Hard dependencies */
    dependencies?: string[];
    /** Soft dependencies */
    softDependencies?: string[];
    /** Known security vulnerabilities */
    knownVulnerabilities?: SecurityVulnerability[];
    /** Is the plugin deprecated? */
    deprecated?: boolean;
    /** Deprecation reason/alternative */
    deprecationInfo?: string;
}
/**
 * Security vulnerability information
 */
export interface SecurityVulnerability {
    /** CVE or internal ID */
    id: string;
    /** Severity (CVSS-based) */
    severity: 'critical' | 'high' | 'medium' | 'low';
    /** Description of the vulnerability */
    description: string;
    /** Affected versions */
    affectedVersions: string;
    /** Fixed in version (if patched) */
    fixedInVersion?: string;
    /** Reference URL */
    referenceUrl?: string;
}
/**
 * Health check result for a single plugin
 */
export interface HealthCheckResult {
    /** Plugin ID */
    pluginId: string;
    /** Whether the check succeeded */
    success: boolean;
    /** The health score if successful */
    score?: PluginHealthScore;
    /** Error message if failed */
    error?: string;
    /** Duration of the check in ms */
    durationMs: number;
}
/**
 * Batch health check result
 */
export interface BatchHealthCheckResult {
    /** Individual results */
    results: HealthCheckResult[];
    /** Server-wide summary */
    summary: ServerHealthSummary;
    /** Total duration in ms */
    totalDurationMs: number;
    /** Timestamp */
    timestamp: number;
}
//# sourceMappingURL=health-types.d.ts.map