import { ConnectionConfig, ConnectionProfile, ResolvedConfig, CLIOverrides } from "../config/index.js";
/**
 * User-level settings stored in ~/.codebuddy/user-settings.json
 * These are global settings that apply across all projects
 */
export interface UserSettings {
    apiKey?: string;
    baseURL?: string;
    defaultModel?: string;
    models?: string[];
    provider?: string;
    model?: string;
    connection?: ConnectionConfig;
}
/**
 * Project-level settings stored in .codebuddy/settings.json
 * These are project-specific settings
 */
export interface ProjectSettings {
    model?: string;
    mcpServers?: Record<string, unknown>;
}
/**
 * Unified settings manager that handles both user-level and project-level settings
 */
export declare class SettingsManager {
    private static instance;
    private userSettingsPath;
    private projectSettingsPath;
    private configResolver;
    private constructor();
    /**
     * Get singleton instance
     */
    static getInstance(): SettingsManager;
    /**
     * Ensure directory exists for a given file path
     */
    private ensureDirectoryExists;
    /**
     * Load user settings from ~/.codebuddy/user-settings.json
     * Uses Zod validation for type safety and defaults
     */
    loadUserSettings(): UserSettings;
    /**
     * Save user settings to ~/.codebuddy/user-settings.json
     */
    saveUserSettings(settings: Partial<UserSettings>): void;
    /**
     * Update a specific user setting
     */
    updateUserSetting<K extends keyof UserSettings>(key: K, value: UserSettings[K]): void;
    /**
     * Get a specific user setting
     */
    getUserSetting<K extends keyof UserSettings>(key: K): UserSettings[K];
    /**
     * Load project settings from .codebuddy/settings.json
     * Uses Zod validation for type safety and defaults
     */
    loadProjectSettings(): ProjectSettings;
    /**
     * Save project settings to .codebuddy/settings.json
     */
    saveProjectSettings(settings: Partial<ProjectSettings>): void;
    /**
     * Update a specific project setting
     */
    updateProjectSetting<K extends keyof ProjectSettings>(key: K, value: ProjectSettings[K]): void;
    /**
     * Get a specific project setting
     */
    getProjectSetting<K extends keyof ProjectSettings>(key: K): ProjectSettings[K];
    /**
     * Get the current model with proper fallback logic:
     * 1. Project-specific model setting
     * 2. User's default model
     * 3. System default
     */
    getCurrentModel(): string;
    /**
     * Set the current model for the project
     */
    setCurrentModel(model: string): void;
    /**
     * Get available models list from user settings
     */
    getAvailableModels(): string[];
    /**
     * Get API key from user settings or environment
     * @deprecated Use getResolvedConfig() instead for proper priority handling
     */
    getApiKey(): string | undefined;
    /**
     * Get base URL from user settings or environment
     * @deprecated Use getResolvedConfig() instead for proper priority handling
     */
    getBaseURL(): string;
    /**
     * Get or initialize the ConfigResolver
     */
    private getResolver;
    /**
     * Get resolved configuration with proper priority handling
     *
     * Priority (highest to lowest):
     * 1. CLI arguments
     * 2. Active profile
     * 3. Environment variables (fallback)
     * 4. Built-in defaults
     */
    getResolvedConfig(cliOverrides?: CLIOverrides): ResolvedConfig;
    /**
     * Get all available connection profiles
     */
    getProfiles(): ConnectionProfile[];
    /**
     * Get enabled connection profiles only
     */
    getEnabledProfiles(): ConnectionProfile[];
    /**
     * Get the active profile
     */
    getActiveProfile(): ConnectionProfile | undefined;
    /**
     * Get the active profile ID
     */
    getActiveProfileId(): string;
    /**
     * Switch to a different connection profile
     */
    setActiveProfile(profileId: string): boolean;
    /**
     * Add a new connection profile
     */
    addProfile(profile: ConnectionProfile): void;
    /**
     * Update an existing profile
     */
    updateProfile(profileId: string, updates: Partial<ConnectionProfile>): boolean;
    /**
     * Remove a connection profile
     */
    removeProfile(profileId: string): boolean;
    /**
     * Auto-detect available local servers
     */
    detectLocalServers(): Promise<Array<{
        profileId: string;
        available: boolean;
        error?: string;
    }>>;
    /**
     * Test connection for the active profile
     */
    testConnection(): Promise<{
        available: boolean;
        error?: string;
        responseTime?: number;
    }>;
    /**
     * Get connection configuration
     */
    getConnectionConfig(): ConnectionConfig;
    /**
     * Update connection configuration
     */
    updateConnectionConfig(config: Partial<ConnectionConfig>): void;
    /**
     * Reset connection config to defaults
     */
    resetConnectionConfig(): void;
}
/**
 * Convenience function to get the singleton instance
 */
export declare function getSettingsManager(): SettingsManager;
