/**
 * TOML Configuration System
 *
 * Hierarchical configuration using TOML format (mistral-vibe style).
 * Supports providers, models, tool configs, and user preferences.
 */
/**
 * Provider configuration
 */
export interface ProviderConfig {
    /** Base URL for the API */
    base_url?: string;
    /** Environment variable name for API key */
    api_key_env: string;
    /** Provider type */
    type: 'openai' | 'anthropic' | 'google' | 'xai' | 'custom';
    /** Whether this provider is enabled */
    enabled?: boolean;
}
/**
 * Model configuration
 */
export interface ModelConfig {
    /** Provider to use */
    provider: string;
    /** Actual model ID to send to API */
    model_id?: string;
    /** Price per million input tokens (USD) */
    price_per_m_input: number;
    /** Price per million output tokens (USD) */
    price_per_m_output: number;
    /** Maximum context window */
    max_context_tokens: number;
    /** Description */
    description?: string;
}
/**
 * Tool permission level
 */
export type ToolPermission = 'always' | 'ask' | 'never';
/**
 * Tool configuration
 */
export interface ToolConfig {
    /** Permission level */
    permission: ToolPermission;
    /** Timeout in seconds */
    timeout?: number;
    /** Allowed patterns (regex) */
    allowlist?: string[];
    /** Blocked patterns (regex) */
    denylist?: string[];
    /** Tool-specific settings */
    settings?: Record<string, unknown>;
}
/**
 * Middleware configuration
 */
export interface MiddlewareConfigOptions {
    /** Maximum conversation turns */
    max_turns?: number;
    /** Turn warning threshold (percentage) */
    turn_warning_threshold?: number;
    /** Maximum session cost (USD) */
    max_cost?: number;
    /** Cost warning threshold (percentage) */
    cost_warning_threshold?: number;
    /** Auto-compact token threshold */
    auto_compact_threshold?: number;
    /** Context warning percentage */
    context_warning_percentage?: number;
}
/**
 * UI/UX preferences
 */
export interface UIConfig {
    /** Enable vim keybindings */
    vim_keybindings?: boolean;
    /** Theme name */
    theme?: string;
    /** Show token count */
    show_tokens?: boolean;
    /** Show cost estimate */
    show_cost?: boolean;
    /** Enable streaming */
    streaming?: boolean;
    /** Enable sound effects */
    sound_effects?: boolean;
}
/**
 * Agent behavior configuration
 */
export interface AgentBehaviorConfig {
    /** Enable YOLO mode */
    yolo_mode?: boolean;
    /** Enable parallel tool execution */
    parallel_tools?: boolean;
    /** Enable RAG-based tool selection */
    rag_tool_selection?: boolean;
    /** Enable self-healing */
    self_healing?: boolean;
    /** Default system prompt ID */
    default_prompt?: string;
}
/**
 * Full configuration structure
 */
export interface CodeBuddyConfig {
    /** Active model name (key from models section) */
    active_model: string;
    /** Provider configurations */
    providers: Record<string, ProviderConfig>;
    /** Model configurations */
    models: Record<string, ModelConfig>;
    /** Tool configurations */
    tool_config: Record<string, ToolConfig>;
    /** Middleware settings */
    middleware: MiddlewareConfigOptions;
    /** UI preferences */
    ui: UIConfig;
    /** Agent behavior */
    agent: AgentBehaviorConfig;
}
export declare const DEFAULT_CONFIG: CodeBuddyConfig;
/**
 * Simple TOML parser for our config format
 * Note: This is a minimal implementation. For full TOML support, consider using a library.
 */
export declare function parseTOML(content: string): Record<string, unknown>;
/**
 * Serialize config to TOML format
 */
export declare function serializeTOML(config: CodeBuddyConfig): string;
/**
 * Configuration manager singleton
 */
declare class ConfigManager {
    private config;
    private loaded;
    constructor();
    /**
     * Load configuration from files
     * Priority: project > user > defaults
     */
    load(): CodeBuddyConfig;
    /**
     * Deep merge config
     */
    private mergeConfig;
    /**
     * Get current config
     */
    getConfig(): Readonly<CodeBuddyConfig>;
    /**
     * Get active model config
     */
    getActiveModel(): ModelConfig & {
        name: string;
    };
    /**
     * Get provider config for a model
     */
    getProviderForModel(modelName: string): ProviderConfig & {
        name: string;
    };
    /**
     * Get tool config
     */
    getToolConfig(toolName: string): ToolConfig | undefined;
    /**
     * Check if tool command is allowed
     */
    isToolCommandAllowed(toolName: string, command: string): {
        allowed: boolean;
        reason?: string;
    };
    /**
     * Save user config
     */
    saveUserConfig(): void;
    /**
     * Set active model
     */
    setActiveModel(modelName: string): void;
    /**
     * Reload configuration
     */
    reload(): CodeBuddyConfig;
    /**
     * Get config file path
     */
    getConfigPath(): string;
    /**
     * Check if config file exists
     */
    configExists(): boolean;
    /**
     * Initialize config file with defaults
     */
    initConfig(): void;
}
export declare function getConfigManager(): ConfigManager;
export type { ConfigManager };
