/**
 * Base Expert Class
 *
 * Abstract base class for domain expert agents.
 * Experts encapsulate domain-specific knowledge and use decision trees
 * for intelligent, hypothesis-driven analysis.
 *
 * Key capabilities:
 * - Decision tree execution with conditional branching
 * - Skill invocation for data gathering
 * - Session forking for deep exploration
 * - Architecture-aware analysis strategy selection
 */
import { EventEmitter } from 'events';
import { ExpertConfig, ExpertInput, ExpertOutput, ExpertConclusion, ExpertState, ExpertForkRequest, ExpertForkResult, BaseExpertInterface, AnalysisIntent } from './types';
import { DecisionTree, DecisionContext, DecisionTreeExecutionResult } from '../../decision/types';
import { DecisionTreeExecutor, SkillExecutorAdapter } from '../../decision';
import { ArchitectureInfo } from '../../detectors';
import { Finding } from '../../types';
/**
 * Abstract base class for domain experts
 */
export declare abstract class BaseExpert extends EventEmitter implements BaseExpertInterface {
    readonly config: ExpertConfig;
    protected state: ExpertState | null;
    protected treeExecutor: DecisionTreeExecutor;
    protected skillAdapter: SkillExecutorAdapter;
    constructor(config: ExpertConfig);
    /**
     * Main analysis entry point
     */
    analyze(input: ExpertInput): Promise<ExpertOutput>;
    /**
     * Check if this expert can handle the given intent
     */
    canHandle(intent: AnalysisIntent): boolean;
    /**
     * Get decision tree by analysis type
     */
    getDecisionTree(analysisType?: string): DecisionTree | undefined;
    /**
     * Get current state
     */
    getState(): ExpertState | null;
    /**
     * Detect architecture (can be overridden by subclasses)
     */
    protected detectArchitecture(input: ExpertInput): Promise<ArchitectureInfo | undefined>;
    /**
     * Select analysis strategy based on intent and architecture
     * Subclasses should override this for domain-specific strategies
     */
    protected abstract selectStrategy(intent: AnalysisIntent, architecture?: ArchitectureInfo): AnalysisStrategy;
    /**
     * Perform custom analysis when no decision tree is available
     * Subclasses should override this for domain-specific logic
     */
    protected abstract performCustomAnalysis(input: ExpertInput, architecture?: ArchitectureInfo): Promise<DecisionTreeExecutionResult>;
    /**
     * Transform conclusion from decision tree to expert conclusion
     * Subclasses can override for domain-specific transformations
     */
    protected transformConclusion(treeConclusion: any, collectedData: Map<string, any>): ExpertConclusion;
    /**
     * Extract findings from collected data
     * Subclasses can override for domain-specific extraction
     */
    protected extractFindings(collectedData: Map<string, any>): Finding[];
    /**
     * Execute a skill
     */
    protected executeSkill(skillId: string, params: Record<string, any>, context: DecisionContext): Promise<any>;
    /**
     * Fork a session for deeper analysis
     */
    protected forkSession(request: ExpertForkRequest, input: ExpertInput): Promise<ExpertForkResult>;
    /**
     * Execute decision tree
     */
    protected executeDecisionTree(tree: DecisionTree, input: ExpertInput, architecture?: ArchitectureInfo): Promise<DecisionTreeExecutionResult>;
    /**
     * Build output from decision tree result
     */
    protected buildOutput(treeResult: DecisionTreeExecutionResult | null, input: ExpertInput, startTime: number): ExpertOutput;
    /**
     * Update state phase
     */
    protected updateState(phase: ExpertState['phase']): void;
    /**
     * Log message with expert context
     */
    protected log(message: string): void;
}
/**
 * Analysis strategy selected by expert
 */
export interface AnalysisStrategy {
    /** Strategy name */
    name: string;
    /** Decision tree to use (if any) */
    decisionTree?: DecisionTree;
    /** Skills to execute in order (if no decision tree) */
    skillSequence?: string[];
    /** Architecture-specific adjustments */
    architectureAdjustments?: Record<string, any>;
}
export default BaseExpert;
//# sourceMappingURL=baseExpert.d.ts.map