/**
 * Tree-of-Thought Reasoning Types
 *
 * Types for advanced reasoning with Tree-of-Thought and MCTS.
 * Based on research from:
 * - Tree of Thoughts (ToT) - Yao et al., 2023
 * - RethinkMCTS (arXiv 2409.09584)
 * - Chain of Preference Optimization (NeurIPS 2024)
 */
/**
 * A thought node in the reasoning tree
 */
export interface ThoughtNode {
    id: string;
    content: string;
    type: ThoughtType;
    parent: ThoughtNode | null;
    children: ThoughtNode[];
    score: number;
    visits: number;
    depth: number;
    metadata: ThoughtMetadata;
    state: ThoughtState;
}
/**
 * Type of thought
 */
export type ThoughtType = "analysis" | "hypothesis" | "implementation" | "verification" | "refinement" | "conclusion";
/**
 * State of a thought node
 */
export type ThoughtState = "pending" | "exploring" | "evaluated" | "refined" | "completed" | "failed" | "pruned";
/**
 * Metadata for a thought node
 */
export interface ThoughtMetadata {
    generationRound: number;
    reasoning?: string;
    codeGenerated?: string;
    executionResult?: ExecutionResult;
    feedback?: string;
    alternatives?: string[];
    confidence?: number;
}
/**
 * Result of code execution
 */
export interface ExecutionResult {
    success: boolean;
    output?: string;
    error?: string;
    exitCode?: number;
}
/**
 * Configuration for MCTS
 */
export interface MCTSConfig {
    maxIterations: number;
    maxDepth: number;
    explorationConstant: number;
    expansionCount: number;
    simulationDepth: number;
    timeLimit?: number;
    useRethink: boolean;
    rethinkThreshold: number;
}
/**
 * Default MCTS configuration
 */
export declare const DEFAULT_MCTS_CONFIG: MCTSConfig;
/**
 * Statistics for MCTS run
 */
export interface MCTSStats {
    iterations: number;
    nodesCreated: number;
    nodesEvaluated: number;
    nodesRefined: number;
    maxDepthReached: number;
    totalTime: number;
    bestScore: number;
}
/**
 * Result from Tree-of-Thought reasoning
 */
export interface ReasoningResult {
    success: boolean;
    solution: ThoughtNode | null;
    path: ThoughtNode[];
    alternatives: ThoughtNode[];
    stats: MCTSStats;
    tree: ThoughtNode;
}
/**
 * Problem description for reasoning
 */
export interface Problem {
    description: string;
    context?: string;
    constraints?: string[];
    successCriteria?: string[];
    examples?: ProblemExample[];
}
/**
 * Example for a problem
 */
export interface ProblemExample {
    input: string;
    expectedOutput: string;
    explanation?: string;
}
/**
 * Evaluation criteria for thoughts
 */
export interface EvaluationCriteria {
    correctness: number;
    completeness: number;
    elegance: number;
    efficiency: number;
}
/**
 * Action types for the reasoning agent
 */
export type ReasoningAction = {
    type: "generate_thought";
    prompt: string;
} | {
    type: "evaluate_thought";
    thought: ThoughtNode;
} | {
    type: "execute_code";
    code: string;
} | {
    type: "refine_thought";
    thought: ThoughtNode;
    feedback: string;
} | {
    type: "backtrack";
    to: ThoughtNode;
} | {
    type: "conclude";
    solution: ThoughtNode;
};
/**
 * Thinking mode for the agent
 */
export type ThinkingMode = "shallow" | "medium" | "deep" | "exhaustive";
/**
 * Configuration for thinking mode
 */
export declare const THINKING_MODE_CONFIG: Record<ThinkingMode, Partial<MCTSConfig>>;
/**
 * Prompt template for thought generation
 */
export interface ThoughtPromptTemplate {
    system: string;
    userPrefix: string;
    format: string;
}
/**
 * Chain-of-thought step
 */
export interface CoTStep {
    step: number;
    thought: string;
    action?: string;
    observation?: string;
}
/**
 * Chain-of-thought result
 */
export interface CoTResult {
    steps: CoTStep[];
    finalAnswer: string;
    confidence: number;
}
