import type { TitleShape } from '../components/ui/styled-title.js';
import type { NanocoderShape, ThemePreset } from '../types/ui.js';
export type SdkProvider = 'openai-compatible' | 'google' | 'anthropic' | 'chatgpt-codex' | 'github-copilot';
export interface AIProviderConfig {
    name: string;
    type: string;
    models: string[];
    contextWindow?: number;
    contextWindows?: Record<string, number>;
    requestTimeout?: number;
    socketTimeout?: number;
    maxRetries?: number;
    connectionPool?: {
        idleTimeout?: number;
        cumulativeMaxIdleTimeout?: number;
    };
    disableTools?: boolean;
    disableToolModels?: string[];
    sdkProvider?: SdkProvider;
    tune?: Partial<TuneConfig>;
    openrouter?: OpenRouterParameters;
    config: {
        baseURL?: string;
        apiKey?: string;
        caCertPath?: string;
        headers?: Record<string, string>;
        [key: string]: unknown;
    };
}
export interface ProviderConfig {
    name: string;
    baseUrl?: string;
    apiKey?: string;
    caCertPath?: string;
    models: string[];
    contextWindow?: number;
    contextWindows?: Record<string, number>;
    requestTimeout?: number;
    socketTimeout?: number;
    maxRetries?: number;
    organizationId?: string;
    timeout?: number;
    connectionPool?: {
        idleTimeout?: number;
        cumulativeMaxIdleTimeout?: number;
    };
    disableTools?: boolean;
    disableToolModels?: string[];
    headers?: Record<string, string>;
    sdkProvider?: SdkProvider;
    openrouter?: OpenRouterParameters;
    [key: string]: unknown;
}
export type CompressionMode = 'default' | 'aggressive' | 'conservative';
export type CompressionStrategy = 'llm' | 'mechanical';
export interface AutoCompactConfig {
    enabled: boolean;
    threshold: number;
    mode: CompressionMode;
    strategy: CompressionStrategy;
    notifyUser: boolean;
}
export interface PasteConfig {
    singleLineThreshold: number;
}
export interface SystemPromptConfig {
    mode?: 'replace' | 'append';
    content?: string;
    file?: string;
}
export interface NotificationsConfig {
    enabled: boolean;
    sound?: boolean;
    timeout?: number;
    events?: {
        toolConfirmation?: boolean;
        questionPrompt?: boolean;
        generationComplete?: boolean;
        triggeredRunComplete?: boolean;
    };
    customMessages?: {
        toolConfirmation?: {
            title: string;
            message: string;
        };
        questionPrompt?: {
            title: string;
            message: string;
        };
        generationComplete?: {
            title: string;
            message: string;
        };
        triggeredRunComplete?: {
            title: string;
            message: string;
        };
    };
}
export interface AppConfig {
    providers?: {
        name: string;
        baseUrl?: string;
        apiKey?: string;
        caCertPath?: string;
        models: string[];
        contextWindow?: number;
        contextWindows?: Record<string, number>;
        requestTimeout?: number;
        socketTimeout?: number;
        maxRetries?: number;
        connectionPool?: {
            idleTimeout?: number;
            cumulativeMaxIdleTimeout?: number;
        };
        disableTools?: boolean;
        disableToolModels?: string[];
        sdkProvider?: SdkProvider;
        openrouter?: OpenRouterParameters;
        [key: string]: unknown;
    }[];
    mcpServers?: MCPServerConfig[];
    lspServers?: {
        name: string;
        command: string;
        args?: string[];
        languages: string[];
        env?: Record<string, string>;
    }[];
    alwaysAllow?: string[];
    disabledTools?: string[];
    systemPrompt?: SystemPromptConfig;
    nanocoderTools?: {
        webSearch?: {
            apiKey?: string;
        };
    };
    autoCompact?: AutoCompactConfig;
    paste?: PasteConfig;
    notifications?: NotificationsConfig;
    tune?: Partial<TuneConfig>;
    sessions?: {
        autoSave?: boolean;
        saveInterval?: number;
        maxSessions?: number;
        maxMessages?: number;
        retentionDays?: number;
        directory?: string;
    };
    headless?: {
        maxTurns?: number;
    };
}
export interface MCPServerConfig {
    name: string;
    transport: 'stdio' | 'websocket' | 'http';
    command?: string;
    args?: string[];
    env?: Record<string, string>;
    url?: string;
    headers?: Record<string, string>;
    timeout?: number;
    alwaysAllow?: string[];
    description?: string;
    tags?: string[];
    enabled?: boolean;
    source?: 'project' | 'global' | 'env';
}
export type ToolProfile = 'auto' | 'full' | 'minimal' | 'nano';
export interface OpenRouterReasoning {
    effort?: 'xhigh' | 'high' | 'medium' | 'low' | 'minimal' | 'none';
    max_tokens?: number;
    exclude?: boolean;
    enabled?: boolean;
}
export interface OpenRouterPercentile {
    p50?: number;
    p75?: number;
    p90?: number;
    p99?: number;
}
export interface OpenRouterMaxPrice {
    prompt?: number;
    completion?: number;
    request?: number;
    image?: number;
}
export interface OpenRouterProviderRouting {
    order?: string[];
    allow_fallbacks?: boolean;
    require_parameters?: boolean;
    data_collection?: 'allow' | 'deny';
    only?: string[];
    ignore?: string[];
    quantizations?: string[];
    sort?: 'price' | 'throughput' | 'latency' | {
        by: 'price' | 'throughput' | 'latency';
        partition?: 'model' | 'none';
    };
    zdr?: boolean;
    enforce_distillable_text?: boolean;
    max_price?: OpenRouterMaxPrice;
    preferred_min_throughput?: number | OpenRouterPercentile;
    preferred_max_latency?: number | OpenRouterPercentile;
}
export interface OpenRouterPlugin {
    id: string;
    [key: string]: unknown;
}
export interface OpenRouterParameters {
    provider?: OpenRouterProviderRouting;
    reasoning?: OpenRouterReasoning;
    models?: string[];
    service_tier?: 'flex' | 'priority';
    route?: 'fallback';
    plugins?: OpenRouterPlugin[];
    user?: string;
    extraBody?: Record<string, unknown>;
}
export interface ModelParameters {
    temperature?: number;
    topP?: number;
    topK?: number;
    maxTokens?: number;
    frequencyPenalty?: number;
    presencePenalty?: number;
    stop?: string[];
    reasoningEffort?: 'minimal' | 'low' | 'medium' | 'high';
    reasoningSummary?: 'auto' | 'concise' | 'detailed';
}
export type ToolMode = 'native' | 'xml' | 'json';
export interface TuneConfig {
    enabled: boolean;
    toolProfile: ToolProfile;
    aggressiveCompact: boolean;
    toolMode?: ToolMode;
    disableNativeTools?: boolean;
    includeAgentsMd?: boolean;
    modelParameters?: ModelParameters;
}
/**
 * Resolves the active tool mode from a TuneConfig, applying the back-compat
 * mapping for legacy `disableNativeTools` flags.
 */
export declare function getTuneToolMode(tune: TuneConfig | undefined): ToolMode;
export declare const TUNE_DEFAULTS: TuneConfig;
export interface UserPreferences {
    lastProvider?: string;
    lastModel?: string;
    providerModels?: {
        [key in string]?: string;
    };
    lastUpdateCheck?: number;
    selectedTheme?: ThemePreset;
    trustedDirectories?: string[];
    titleShape?: TitleShape;
    nanocoderShape?: NanocoderShape;
    tune?: TuneConfig;
    notifications?: NotificationsConfig;
    paste?: PasteConfig;
    reasoningExpanded?: boolean;
    compactToolDisplay?: boolean;
}
//# sourceMappingURL=config.d.ts.map