/**
 * Strategy Registry
 *
 * Manages the collection of available analysis strategies and provides
 * query-based matching to select the appropriate strategy.
 *
 * v2.0: Enhanced with LLM-driven semantic matching alongside keyword triggers.
 * The registry now supports both:
 * 1. Fast keyword-based matching (legacy, for deterministic triggers)
 * 2. LLM semantic matching (for understanding variant expressions)
 */
import { StagedAnalysisStrategy } from './types';
import { LLMStrategySelector, StrategyDefinition, TraceContext } from '../core/strategySelector';
import type { ModelRouter } from '../core/modelRouter';
import type { Intent } from '../types';
/**
 * Result of strategy matching with additional metadata.
 */
export interface StrategyMatchResult {
    /** Matched strategy (null if no match) */
    strategy: StagedAnalysisStrategy | null;
    /** How the strategy was matched */
    matchMethod: 'keyword' | 'llm' | 'none';
    /** Confidence of the match (1.0 for keyword, 0-1 for LLM) */
    confidence: number;
    /** LLM reasoning if LLM was used */
    reasoning?: string;
    /** Whether to fall back to hypothesis-driven analysis */
    shouldFallback: boolean;
    /** Reason for fallback if applicable */
    fallbackReason?: string;
}
/**
 * Registry that holds all available staged analysis strategies.
 *
 * Matching modes:
 * - Keyword-first: Try keyword triggers, fall back to LLM if no match
 * - LLM-only: Skip keywords, always use LLM semantic understanding
 * - Keyword-only: Only use keyword triggers (legacy mode)
 */
export declare class StrategyRegistry {
    private strategies;
    private llmSelector;
    private matchMode;
    /**
     * Register a new strategy. Strategies are matched in registration order,
     * so register more specific strategies before general ones.
     */
    register(strategy: StagedAnalysisStrategy): void;
    /**
     * Set the LLM selector for semantic matching.
     */
    setLLMSelector(selector: LLMStrategySelector): void;
    /**
     * Set the match mode.
     */
    setMatchMode(mode: 'keyword_first' | 'llm_only' | 'keyword_only'): void;
    /**
     * Find the first strategy whose trigger matches the given query.
     * Returns null if no strategy matches (analysis falls through to generic path).
     *
     * This is the legacy synchronous method that only uses keyword matching.
     */
    match(query: string): StagedAnalysisStrategy | null;
    /**
     * Enhanced matching with optional LLM semantic understanding.
     *
     * @param query - User's natural language query
     * @param intent - Parsed intent (if available)
     * @param traceContext - Trace metadata (for LLM context)
     * @returns Match result with strategy and metadata
     */
    matchEnhanced(query: string, intent?: Intent, traceContext?: TraceContext): Promise<StrategyMatchResult>;
    /**
     * Keyword-only matching (legacy mode).
     */
    private matchKeywordOnly;
    /**
     * LLM-only matching (semantic understanding).
     */
    private matchLLMOnly;
    /**
     * Match using LLM semantic understanding.
     */
    private matchWithLLM;
    /**
     * Process LLM selection result.
     */
    private processLLMResult;
    /**
     * Get strategy definitions for LLM prompt context.
     */
    getDefinitions(): StrategyDefinition[];
    /** Get all registered strategies (for debugging/introspection) */
    getAll(): StagedAnalysisStrategy[];
    /** Get strategy by ID */
    getById(id: string): StagedAnalysisStrategy | undefined;
}
/**
 * Create a pre-configured strategy registry with all built-in strategies.
 */
export declare function createStrategyRegistry(): StrategyRegistry;
/**
 * Create a strategy registry with LLM semantic matching enabled.
 *
 * @param modelRouter - Model router for LLM calls
 * @param matchMode - Matching mode (default: keyword_first)
 */
export declare function createEnhancedStrategyRegistry(modelRouter: ModelRouter, matchMode?: 'keyword_first' | 'llm_only' | 'keyword_only'): StrategyRegistry;
//# sourceMappingURL=registry.d.ts.map