export interface ClaudeCliTool {
    enabled: boolean;
    primaryModel?: string;
    secondaryModel?: string;
    /**
     * Available models for this tool (shown in UI dropdown)
     * If not provided, defaults will be used based on tool type
     */
    availableModels?: string[];
    tags: string[];
    /**
     * Tool type determines routing:
     * - 'builtin': Built-in CLI tools (gemini, qwen, codex, etc.)
     * - 'cli-wrapper': Routes to `claude --settings` (CLI Settings endpoints)
     * - 'api-endpoint': Routes to LiteLLM (LiteLLM endpoints)
     */
    type?: 'builtin' | 'cli-wrapper' | 'api-endpoint';
    /**
     * Endpoint ID for type: 'api-endpoint'
     * Used to lookup endpoint configuration in litellm-api-config.json
     */
    id?: string;
    /**
     * Path to .env file for loading environment variables before CLI execution
     * Supports both absolute paths and paths relative to home directory (e.g., ~/.my-env)
     */
    envFile?: string;
    /**
     * Path to Claude CLI settings.json file (builtin claude only)
     * Passed to Claude CLI via --settings parameter
     * Supports ~, absolute, relative, and Windows paths
     */
    settingsFile?: string;
}
export type CliToolName = 'gemini' | 'qwen' | 'codex' | 'claude' | 'opencode' | string;
export interface ClaudeApiEndpoint {
    id: string;
    name: string;
    enabled: boolean;
}
export interface ClaudeCustomEndpoint {
    id: string;
    name: string;
    enabled: boolean;
    tags: string[];
}
export interface ClaudeCacheSettings {
    injectionMode: 'auto' | 'manual' | 'disabled';
    defaultPrefix: string;
    defaultSuffix: string;
}
export interface ClaudeCliToolsConfig {
    $schema?: string;
    version: string;
    tools: Record<string, ClaudeCliTool>;
    apiEndpoints?: ClaudeApiEndpoint[];
    customEndpoints?: ClaudeCustomEndpoint[];
}
export interface ClaudeCliSettingsConfig {
    $schema?: string;
    version: string;
    defaultTool: string;
    promptFormat: 'plain' | 'yaml' | 'json';
    smartContext: {
        enabled: boolean;
        maxFiles: number;
    };
    nativeResume: boolean;
    recursiveQuery: boolean;
    cache: ClaudeCacheSettings;
    codeIndexMcp: 'codexlens' | 'ace' | 'none';
}
export interface ClaudeCliCombinedConfig extends ClaudeCliToolsConfig {
    defaultTool?: string;
    settings?: {
        promptFormat?: 'plain' | 'yaml' | 'json';
        smartContext?: {
            enabled?: boolean;
            maxFiles?: number;
        };
        nativeResume?: boolean;
        recursiveQuery?: boolean;
        cache?: Partial<ClaudeCacheSettings>;
        codeIndexMcp?: 'codexlens' | 'ace' | 'none';
    };
}
/**
 * Ensure CLI tools configuration file exists
 * Creates default config in global ~/.claude directory (user-level config)
 * @param projectDir - Project directory path (used for reading existing project config)
 * @param createInProject - DEPRECATED: Always creates in global dir. Kept for backward compatibility.
 * @returns The config that was created/exists
 */
export declare function ensureClaudeCliTools(projectDir: string, createInProject?: boolean): ClaudeCliToolsConfig & {
    _source?: string;
};
/**
 * Async version of ensureClaudeCliTools with automatic availability sync
 * Creates default config in global ~/.claude directory and syncs with actual tool availability
 * @param projectDir - Project directory path (used for reading existing project config)
 * @param createInProject - DEPRECATED: Always creates in global dir. Kept for backward compatibility.
 * @returns The config that was created/exists
 */
export declare function ensureClaudeCliToolsAsync(projectDir: string, createInProject?: boolean): Promise<ClaudeCliToolsConfig & {
    _source?: string;
}>;
/**
 * Load CLI tools configuration from global ~/.claude/cli-tools.json
 * Falls back to default config if not found.
 *
 * Automatically migrates older config versions to v3.2.0
 */
export declare function loadClaudeCliTools(projectDir: string): ClaudeCliToolsConfig & {
    _source?: string;
};
/**
 * Save CLI tools configuration to global ~/.claude/cli-tools.json
 * Always saves to global directory (user-level config)
 */
export declare function saveClaudeCliTools(projectDir: string, config: ClaudeCliToolsConfig & {
    _source?: string;
}): void;
/**
 * Load CLI settings configuration from global ~/.claude/cli-settings.json
 * Falls back to default settings if not found.
 */
export declare function loadClaudeCliSettings(projectDir: string): ClaudeCliSettingsConfig & {
    _source?: string;
};
/**
 * Save CLI settings configuration to global ~/.claude/cli-settings.json
 * Always saves to global directory (user-level config)
 */
export declare function saveClaudeCliSettings(projectDir: string, config: ClaudeCliSettingsConfig & {
    _source?: string;
}): void;
/**
 * Update enabled status for a specific tool
 */
export declare function updateClaudeToolEnabled(projectDir: string, toolName: string, enabled: boolean): ClaudeCliToolsConfig;
/**
 * Update cache settings
 */
export declare function updateClaudeCacheSettings(projectDir: string, cacheSettings: Partial<ClaudeCacheSettings>): ClaudeCliSettingsConfig;
/**
 * Update default tool
 */
export declare function updateClaudeDefaultTool(projectDir: string, defaultTool: string): ClaudeCliSettingsConfig;
/**
 * Get the default tool from config
 * Returns the configured defaultTool or 'gemini' as fallback
 */
export declare function getDefaultTool(projectDir: string): string;
/**
 * Update prompt format setting
 * @param projectDir - Project directory path
 * @param format - Prompt format: 'plain' | 'yaml' | 'json'
 * @returns Updated settings config
 */
export declare function setPromptFormat(projectDir: string, format: 'plain' | 'yaml' | 'json'): ClaudeCliSettingsConfig;
/**
 * Get prompt format setting
 * @param projectDir - Project directory path
 * @returns Current prompt format or 'plain' as fallback
 */
export declare function getPromptFormat(projectDir: string): 'plain' | 'yaml' | 'json';
/**
 * Update smart context enabled setting
 * @param projectDir - Project directory path
 * @param enabled - Whether smart context is enabled
 * @returns Updated settings config
 */
export declare function setSmartContextEnabled(projectDir: string, enabled: boolean): ClaudeCliSettingsConfig;
/**
 * Get smart context enabled setting
 * @param projectDir - Project directory path
 * @returns Current smart context status or false as fallback
 */
export declare function getSmartContextEnabled(projectDir: string): boolean;
/**
 * Update native resume setting
 * @param projectDir - Project directory path
 * @param enabled - Whether native resume is enabled
 * @returns Updated settings config
 */
export declare function setNativeResume(projectDir: string, enabled: boolean): ClaudeCliSettingsConfig;
/**
 * Get native resume setting
 * @param projectDir - Project directory path
 * @returns Current native resume status or true as fallback
 */
export declare function getNativeResume(projectDir: string): boolean;
/**
 * Add API endpoint as a tool with type: 'api-endpoint'
 * Usage: --tool <name> or --tool custom --model <id>
 */
export declare function addClaudeApiEndpoint(projectDir: string, endpoint: {
    id: string;
    name: string;
    enabled: boolean;
    model?: string;
}): ClaudeCliToolsConfig;
/**
 * Remove API endpoint tool by id or name
 */
export declare function removeClaudeApiEndpoint(projectDir: string, endpointId: string): ClaudeCliToolsConfig;
/**
 * @deprecated Use addClaudeApiEndpoint instead
 * Adds tool to config based on tags:
 * - cli-wrapper tag -> type: 'cli-wrapper'
 * - others -> type: 'api-endpoint'
 */
export declare function addClaudeCustomEndpoint(projectDir: string, endpoint: {
    id: string;
    name: string;
    enabled: boolean;
    tags?: string[];
}): ClaudeCliToolsConfig;
/**
 * Remove endpoint tool (cli-wrapper or api-endpoint)
 */
export declare function removeClaudeCustomEndpoint(projectDir: string, endpointId: string): ClaudeCliToolsConfig;
/**
 * Get config source info
 */
export declare function getClaudeCliToolsInfo(projectDir: string): {
    projectPath: string;
    globalPath: string;
    activePath: string;
    source: 'project' | 'global' | 'default';
};
/**
 * Update Code Index MCP provider and switch CLAUDE.md reference
 * Strategy: Only modify global user-level CLAUDE.md (~/.claude/CLAUDE.md)
 * This is consistent with Chinese response and Windows platform settings
 */
export declare function updateCodeIndexMcp(projectDir: string, provider: 'codexlens' | 'ace' | 'none'): {
    success: boolean;
    error?: string;
    settings?: ClaudeCliSettingsConfig;
};
/**
 * Get current Code Index MCP provider
 */
export declare function getCodeIndexMcp(projectDir: string): 'codexlens' | 'ace' | 'none';
/**
 * Get the context-tools file path based on provider
 */
export declare function getContextToolsPath(provider: 'codexlens' | 'ace' | 'none'): string;
/**
 * Get tool configuration (compatible with cli-config-manager interface)
 */
export declare function getToolConfig(projectDir: string, tool: string): {
    enabled: boolean;
    primaryModel: string;
    secondaryModel: string;
    tags?: string[];
    envFile?: string;
    settingsFile?: string;
};
/**
 * Update tool configuration
 */
export declare function updateToolConfig(projectDir: string, tool: string, updates: Partial<{
    enabled: boolean;
    primaryModel: string;
    secondaryModel: string;
    availableModels: string[];
    tags: string[];
    envFile: string | null;
    settingsFile: string | null;
}>): ClaudeCliToolsConfig;
/**
 * Get primary model for a tool
 */
export declare function getPrimaryModel(projectDir: string, tool: string): string;
/**
 * Get secondary model for a tool
 */
export declare function getSecondaryModel(projectDir: string, tool: string): string;
/**
 * Check if a tool is enabled
 */
export declare function isToolEnabled(projectDir: string, tool: string): boolean;
/**
 * Get full config response for API
 * Note: Provider model reference has been moved to system reference (see provider-routes.ts)
 */
export declare function getFullConfigResponse(projectDir: string): {
    config: ClaudeCliToolsConfig;
};
/**
 * Sync builtin tools availability with cli-tools.json
 *
 * For builtin tools (gemini, qwen, codex, claude, opencode):
 * - Checks actual tool availability using system PATH
 * - Updates enabled status based on actual availability
 *
 * For non-builtin tools (cli-wrapper, api-endpoint):
 * - Leaves them unchanged as they have different availability mechanisms
 *
 * @returns Updated config and sync results
 */
export declare function syncBuiltinToolsAvailability(projectDir: string): Promise<{
    config: ClaudeCliToolsConfig;
    changes: {
        enabled: string[];
        disabled: string[];
        unchanged: string[];
    };
}>;
/**
 * Get sync status report without actually modifying config
 *
 * @returns Report showing what would change if sync were run
 */
export declare function getBuiltinToolsSyncReport(projectDir: string): Promise<{
    current: Record<string, {
        available: boolean;
        enabled: boolean;
    }>;
    recommended: Record<string, {
        shouldEnable: boolean;
        reason: string;
    }>;
}>;
//# sourceMappingURL=claude-cli-tools.d.ts.map