/**
 * @file EvaluatorRegistry - Registry for evaluation strategies.
 * Extends BaseRegistry to provide dynamic strategy registration and lookup.
 */
import { BaseRegistry } from "../core/infrastructure/index.js";
import type { LanguageModelV3CallOptions } from "@ai-sdk/provider";
import type { GenerateResult } from "../types/generateTypes.js";
import type { EvaluationResult, EnhancedEvaluationContext } from "../types/evaluationTypes.js";
/**
 * A function that performs evaluation and returns results.
 */
export type EvaluationStrategyFunction = (options: LanguageModelV3CallOptions, result: GenerateResult, config?: EvaluationStrategyConfig) => Promise<{
    evaluationResult: EvaluationResult;
    evalContext: EnhancedEvaluationContext;
}>;
/**
 * Configuration for evaluation strategies.
 */
export interface EvaluationStrategyConfig {
    /** The model to use for evaluation */
    evaluationModel?: string;
    /** The provider to use for evaluation */
    provider?: string;
    /** The passing threshold (1-10) */
    threshold?: number;
    /** Custom prompt generator */
    promptGenerator?: (context: {
        userQuery: string;
        history: string;
        tools: string;
        retryInfo: string;
        aiResponse: string;
    }) => string;
    /** Additional strategy-specific options */
    options?: Record<string, unknown>;
}
/**
 * Metadata for registered evaluation strategies.
 */
export interface EvaluationStrategyMetadata {
    /** Human-readable name for the strategy */
    name: string;
    /** Description of what the strategy does */
    description: string;
    /** Whether the strategy requires an external LLM */
    requiresLLM: boolean;
    /** Default model for the strategy (if requiresLLM is true) */
    defaultModel?: string;
    /** Default provider for the strategy (if requiresLLM is true) */
    defaultProvider?: string;
    /** Version of the strategy */
    version: string;
    /** Supported features */
    features: string[];
}
/**
 * Registry for evaluation strategies.
 * Allows dynamic registration and retrieval of evaluation strategies.
 *
 * @example
 * ```typescript
 * // Register a custom strategy
 * EvaluatorRegistry.getInstance().registerStrategy(
 *   'custom-ragas',
 *   async () => ({
 *     evaluate: async (options, result) => { ... }
 *   }),
 *   {
 *     name: 'Custom RAGAS',
 *     description: 'Custom RAGAS implementation',
 *     requiresLLM: true,
 *     defaultModel: 'gpt-4',
 *     defaultProvider: 'openai',
 *     version: '1.0.0',
 *     features: ['custom-metrics']
 *   }
 * );
 *
 * // Get a strategy
 * const strategy = await EvaluatorRegistry.getInstance().getStrategy('ragas');
 * ```
 */
export declare class EvaluatorRegistry extends BaseRegistry<EvaluationStrategyFunction, EvaluationStrategyMetadata> {
    private static instance;
    private constructor();
    /**
     * Gets the singleton instance of the EvaluatorRegistry.
     */
    static getInstance(): EvaluatorRegistry;
    /**
     * Resets the singleton instance (useful for testing).
     */
    static resetInstance(): void;
    /**
     * Registers all built-in evaluation strategies.
     * This is called automatically on first access.
     */
    protected registerAll(): Promise<void>;
    /**
     * Registers an evaluation strategy with the registry.
     *
     * @param id - Unique identifier for the strategy
     * @param factory - Factory function that creates the strategy
     * @param metadata - Metadata about the strategy
     */
    registerStrategy(id: string, factory: () => Promise<EvaluationStrategyFunction>, metadata: EvaluationStrategyMetadata): void;
    /**
     * Gets an evaluation strategy by ID.
     *
     * @param id - The strategy identifier
     * @returns The evaluation strategy function
     * @throws {NeuroLinkFeatureError} If the strategy is not found
     */
    getStrategy(id: string): Promise<EvaluationStrategyFunction>;
    /**
     * Checks if a strategy exists in the registry.
     *
     * @param id - The strategy identifier
     * @returns true if the strategy exists
     */
    hasStrategy(id: string): Promise<boolean>;
    /**
     * Lists all registered strategies with their metadata.
     *
     * @returns Array of strategy IDs and their metadata
     */
    listStrategies(): Promise<Array<{
        id: string;
        metadata: EvaluationStrategyMetadata;
    }>>;
    /**
     * Gets the metadata for a specific strategy.
     *
     * @param id - The strategy identifier
     * @returns The strategy metadata or undefined if not found
     */
    getStrategyMetadata(id: string): Promise<EvaluationStrategyMetadata | undefined>;
    /**
     * Unregisters a strategy from the registry.
     *
     * @param id - The strategy identifier
     * @returns true if the strategy was removed, false if it didn't exist
     */
    unregisterStrategy(id: string): Promise<boolean>;
    /**
     * Gets strategies that support a specific feature.
     *
     * @param feature - The feature to filter by
     * @returns Array of strategy IDs that support the feature
     */
    getStrategiesWithFeature(feature: string): Promise<string[]>;
    /**
     * Gets strategies that use a specific provider.
     *
     * @param provider - The provider to filter by
     * @returns Array of strategy IDs that use the provider
     */
    getStrategiesByProvider(provider: string): Promise<string[]>;
}
export declare const getEvaluatorRegistry: () => EvaluatorRegistry;
