/**
 * Recommendation Types
 *
 * Type definitions for the plugin recommendation system.
 *
 * @since v1.66.0
 */
import type { RegistryPlugin } from '../registry/registry-types.js';
/**
 * Types of recommendations the system can generate
 */
export type RecommendationType = 'similar' | 'complementary' | 'popular' | 'trending' | 'missing' | 'upgrade';
/**
 * Source of the recommendation
 */
export type RecommendationSource = 'algorithm' | 'curated' | 'community';
/**
 * Reason types for recommendations
 */
export type ReasonType = 'similar_to' | 'works_with' | 'popular_in' | 'replaces' | 'extends' | 'required_by' | 'trending' | 'new_release';
/**
 * A reason why a plugin is recommended
 */
export interface RecommendationReason {
    /** Type of reason */
    type: ReasonType;
    /** Reference plugin name or category */
    reference?: string;
    /** Human-readable description */
    description: string;
    /** Weight of this reason (0-1) */
    weight: number;
}
/**
 * A plugin recommendation
 */
export interface Recommendation {
    /** The recommended plugin */
    plugin: RegistryPlugin;
    /** Type of recommendation */
    type: RecommendationType;
    /** Confidence score (0-1) */
    score: number;
    /** Reasons for the recommendation */
    reasons: RecommendationReason[];
    /** Source of the recommendation */
    source: RecommendationSource;
    /** Timestamp when generated */
    generatedAt: number;
    /** Whether user has dismissed this */
    dismissed?: boolean;
    /** Whether user has saved this */
    saved?: boolean;
}
/**
 * User feedback on a recommendation
 */
export interface RecommendationFeedback {
    /** Plugin ID */
    pluginId: string;
    /** Feedback type */
    action: 'dismiss' | 'save' | 'install' | 'view';
    /** Timestamp */
    timestamp: number;
    /** Recommendation type that led to this */
    recommendationType: RecommendationType;
}
/**
 * User preferences for recommendations
 */
export interface RecommendationPreferences {
    /** Dismissed plugin IDs */
    dismissedPlugins: Set<string>;
    /** Saved plugin IDs */
    savedPlugins: Set<string>;
    /** Preferred categories */
    preferredCategories: string[];
    /** Excluded categories */
    excludedCategories: string[];
    /** Minimum score threshold */
    minScore: number;
    /** Maximum recommendations to show */
    maxRecommendations: number;
}
/**
 * Context for generating recommendations
 */
export interface RecommendationContext {
    /** Currently installed plugins */
    installedPlugins: RegistryPlugin[];
    /** All available plugins from registry */
    registryPlugins: RegistryPlugin[];
    /** User preferences */
    preferences: RecommendationPreferences;
    /** Plugin categories in use */
    activeCategories: string[];
    /** Plugin tags in use */
    activeTags: string[];
}
/**
 * Result from a recommendation algorithm
 */
export interface AlgorithmResult {
    /** Algorithm name */
    algorithm: string;
    /** Recommendations from this algorithm */
    recommendations: Recommendation[];
    /** Execution time in ms */
    executionTime: number;
    /** Whether algorithm completed successfully */
    success: boolean;
    /** Error message if failed */
    error?: string;
}
/**
 * Combined recommendations from all algorithms
 */
export interface RecommendationResults {
    /** Final ranked recommendations */
    recommendations: Recommendation[];
    /** Results from individual algorithms */
    algorithmResults: AlgorithmResult[];
    /** Total execution time */
    totalTime: number;
    /** Generation timestamp */
    generatedAt: number;
    /** Context hash for cache invalidation */
    contextHash: string;
}
/**
 * Configuration for the recommendation engine
 */
export interface RecommendationConfig {
    /** Enable/disable specific algorithms */
    algorithms: {
        similar: boolean;
        complementary: boolean;
        popular: boolean;
        trending: boolean;
        missing: boolean;
        upgrade: boolean;
    };
    /** Algorithm weights for final scoring */
    weights: {
        similar: number;
        complementary: number;
        popular: number;
        trending: number;
        missing: number;
        upgrade: number;
    };
    /** Boost factors for plugin qualities */
    boosts: {
        verified: number;
        popular: number;
        recentUpdate: number;
        highRating: number;
        manyDownloads: number;
    };
    /** Minimum score to include in results */
    minScore: number;
    /** Maximum results per algorithm */
    maxPerAlgorithm: number;
    /** Maximum total results */
    maxTotal: number;
    /** Cache TTL in milliseconds */
    cacheTtl: number;
}
/**
 * Default recommendation configuration
 */
export declare const DEFAULT_RECOMMENDATION_CONFIG: RecommendationConfig;
/**
 * Default user preferences
 */
export declare const DEFAULT_RECOMMENDATION_PREFERENCES: RecommendationPreferences;
/**
 * Plugin similarity data
 */
export interface PluginSimilarity {
    /** Plugin ID */
    pluginId: string;
    /** Similarity score (0-1) */
    similarity: number;
    /** Common tags */
    commonTags: string[];
    /** Same category */
    sameCategory: boolean;
}
/**
 * Co-occurrence entry
 */
export interface CooccurrenceEntry {
    /** Plugin A ID */
    pluginA: string;
    /** Plugin B ID */
    pluginB: string;
    /** Probability of co-occurrence (0-1) */
    probability: number;
    /** Sample size (number of servers observed) */
    sampleSize: number;
}
/**
 * Trending data for a plugin
 */
export interface TrendingData {
    /** Plugin ID */
    pluginId: string;
    /** Download count this period */
    periodDownloads: number;
    /** Download count previous period */
    previousDownloads: number;
    /** Growth rate */
    growthRate: number;
    /** Trending score */
    trendingScore: number;
}
/**
 * Curated collection of plugins
 */
export interface CuratedCollection {
    /** Collection ID */
    id: string;
    /** Collection name */
    name: string;
    /** Description */
    description: string;
    /** Plugin IDs in this collection */
    pluginIds: string[];
    /** Category/theme */
    category?: string;
    /** Icon */
    icon?: string;
    /** Featured flag */
    featured: boolean;
    /** Creation date */
    createdAt: number;
}
/**
 * Built-in curated collections
 */
export declare const BUILTIN_COLLECTIONS: CuratedCollection[];
//# sourceMappingURL=recommendation-types.d.ts.map