/**
 * AgentExecutor - Main Agentic Loop
 * Orchestrates LLM reasoning and tool execution
 */
import type { AgentMessage, AgentContext, ToolDefinition, LLMProvider } from "./types.js";
export interface AgentExecutorOptions {
    provider: LLMProvider;
    apiKey: string;
    model?: string;
    maxTurns?: number;
    verbose?: boolean;
    projectPath?: string;
    /**
     * Callback to confirm before executing each tool.
     * Return true to execute, false to skip.
     *
     * The `cost` argument is the tool's declared cost tier (free / low /
     * medium / high / very-high) so the prompt can warn about expensive
     * calls. `undefined` for tools that didn't declare a tier.
     */
    confirmCallback?: (toolName: string, args: Record<string, unknown>, cost: ToolDefinition["cost"]) => Promise<boolean>;
    /**
     * When true, prompt before every tool call. When false (default), the
     * cost gate in `executeTool` fires only for high/very-high tools.
     * Set by `--confirm` CLI flag.
     */
    confirmAlways?: boolean;
    /**
     * Disable all confirm prompts, even for high/very-high cost tools.
     * For automated agent sessions where every tool call must run
     * unattended. Set by `--no-confirm` CLI flag.
     */
    noConfirm?: boolean;
    /**
     * Cumulative USD ceiling for the agent session. When set, each tool
     * call's tier-derived estimate is added to a running total; if the
     * next call would push the total over `budgetUsd`, the executor
     * skips it and returns a "budget exceeded" tool result so the LLM
     * can adapt or stop. Mirrors `vibe run --budget-usd`. `undefined`
     * disables the cap.
     */
    budgetUsd?: number;
}
export interface ExecutionResult {
    response: string;
    toolsUsed: string[];
    turns: number;
}
export declare class AgentExecutor {
    private adapter;
    private registry;
    private memory;
    private cumulativeUsd;
    private context;
    private config;
    private initialized;
    constructor(options: AgentExecutorOptions);
    /**
     * Initialize the agent
     */
    initialize(): Promise<void>;
    /**
     * Execute a user request
     */
    execute(userInput: string): Promise<ExecutionResult>;
    /**
     * Execute a single tool
     *
     * Confirm-prompt logic:
     *   - `noConfirm: true`               → never prompt (automation / CI)
     *   - `confirmAlways: true`           → prompt for every tool call
     *   - default                         → prompt only when the tool's
     *                                       cost is high/very-high (the
     *                                       `costGate`)
     *
     * The two non-trivial cases require `confirmCallback` to be set; if
     * it isn't, no prompt fires and the tool runs.
     */
    private executeTool;
    /**
     * Cumulative tier-estimated USD spent in this session. Updates after
     * every successful tool call. Useful for status output / `tools` REPL.
     */
    getCumulativeUsd(): number;
    /**
     * Update context (e.g., when project changes)
     */
    updateContext(updates: Partial<AgentContext>): void;
    /**
     * Reset conversation memory
     */
    reset(): void;
    /**
     * Get current context
     */
    getContext(): AgentContext;
    /**
     * Get conversation history
     */
    getHistory(): AgentMessage[];
    /**
     * Get available tools
     */
    getTools(): string[];
}
export type { AgentConfig, AgentContext, AgentMessage, ToolCall, ToolResult } from "./types.js";
export type { LLMAdapter } from "./adapters/index.js";
export { ToolRegistry, registerAllTools } from "./tools/index.js";
export { ConversationMemory } from "./memory/index.js";
