import { DialogueContext, ModuleQuery, ModuleResponse, Hypothesis, AnalysisDecision, CrossDomainEvent } from './types';
import { ArchitectureInfo } from '../../detectors';
/**
 * Configuration for dialogue sessions
 */
export interface DialogueConfig {
    /** Maximum number of dialogue turns */
    maxTurns: number;
    /** Confidence threshold to stop analysis */
    confidenceThreshold: number;
    /** Whether to allow user intervention */
    allowUserIntervention: boolean;
    /** Maximum hypotheses to track simultaneously */
    maxHypotheses: number;
    /** Timeout per turn in ms */
    turnTimeoutMs: number;
}
/**
 * Default dialogue configuration
 */
export declare const DEFAULT_DIALOGUE_CONFIG: DialogueConfig;
/**
 * Dialogue session state
 */
export type DialogueState = 'initialized' | 'running' | 'waiting_user' | 'concluded' | 'timeout' | 'error';
/**
 * Dialogue session statistics
 */
export interface DialogueStats {
    totalTurns: number;
    totalQueries: number;
    totalFindings: number;
    modulesQueried: Set<string>;
    hypothesesExplored: number;
    totalExecutionTimeMs: number;
    startTime: number;
    endTime?: number;
}
/**
 * Event handler type
 */
export type DialogueEventHandler = (event: CrossDomainEvent) => void;
/**
 * DialogueSession - Manages a single dialogue between expert and modules
 */
export declare class DialogueSession {
    readonly sessionId: string;
    readonly expertId: string;
    private context;
    private config;
    private state;
    private stats;
    private eventHandlers;
    constructor(expertId: string, traceId: string, originalQuery: string, config?: Partial<DialogueConfig>, options?: {
        architecture?: ArchitectureInfo;
        packageName?: string;
        traceProcessorService?: any;
    });
    /**
     * Get current dialogue state
     */
    getState(): DialogueState;
    /**
     * Get current context
     */
    getContext(): DialogueContext;
    /**
     * Get dialogue statistics
     */
    getStats(): DialogueStats;
    /**
     * Check if dialogue can continue
     */
    canContinue(): boolean;
    /**
     * Check if max turns reached
     */
    isMaxTurnsReached(): boolean;
    /**
     * Start a new dialogue turn
     */
    startTurn(): number;
    /**
     * Record a query sent to a module
     */
    recordQuery(query: ModuleQuery): void;
    /**
     * Record a response from a module
     */
    recordResponse(response: ModuleResponse): void;
    /**
     * Add a new hypothesis
     */
    addHypothesis(hypothesis: Hypothesis): void;
    /**
     * Update an existing hypothesis
     */
    updateHypothesis(hypothesisId: string, updates: Partial<Hypothesis>): Hypothesis | null;
    /**
     * Get the highest confidence hypothesis
     */
    getTopHypothesis(): Hypothesis | null;
    /**
     * Check if any hypothesis meets confidence threshold
     */
    hasConfidentHypothesis(): boolean;
    /**
     * Set a variable for use in subsequent queries
     */
    setVariable(key: string, value: any): void;
    /**
     * Get a variable
     */
    getVariable(key: string): any;
    /**
     * Get all variables
     */
    getVariables(): Record<string, any>;
    /**
     * Record a decision made by the expert
     */
    recordDecision(decision: AnalysisDecision): void;
    /**
     * Resume after user response
     */
    resumeWithUserResponse(response: string): void;
    /**
     * Conclude the dialogue
     */
    conclude(): void;
    /**
     * Mark as timed out
     */
    timeout(): void;
    /**
     * Mark as error
     */
    error(message: string): void;
    /**
     * Register an event handler
     */
    onEvent(handler: DialogueEventHandler): void;
    /**
     * Remove an event handler
     */
    offEvent(handler: DialogueEventHandler): void;
    /**
     * Emit an event
     */
    private emitEvent;
}
/**
 * Create a unique query ID
 */
export declare function createQueryId(moduleTarget: string, turnNumber: number): string;
/**
 * Create a unique hypothesis ID
 */
export declare function createHypothesisId(category: string, component: string): string;
/**
 * Build a ModuleQuery from parameters
 */
export declare function buildModuleQuery(targetModule: string, questionId: string, params: Record<string, any>, context: DialogueContext): ModuleQuery;
//# sourceMappingURL=dialogueProtocol.d.ts.map