import * as i18next from 'i18next'; interface CliOptions { lang?: SupportedLang; force?: boolean; skipPrompt?: boolean; skipMcp?: boolean; frontend?: string; backend?: string; mode?: CollaborationMode; workflows?: string; installDir?: string; } type SupportedLang = 'zh-CN' | 'en'; type ModelType = 'codex' | 'gemini' | 'claude' | 'antigravity'; type CollaborationMode = 'parallel' | 'smart' | 'sequential'; type RoutingStrategy = 'parallel' | 'fallback' | 'round-robin'; interface ModelRouting { frontend: { models: ModelType[]; primary: ModelType; strategy: RoutingStrategy; }; backend: { models: ModelType[]; primary: ModelType; strategy: RoutingStrategy; }; review: { models: ModelType[]; strategy: 'parallel'; }; mode: CollaborationMode; geminiModel?: string; } interface CcgConfig { general: { version: string; language: SupportedLang; createdAt: string; }; routing: ModelRouting; workflows: { installed: string[]; }; paths: { commands: string; prompts: string; backup: string; }; mcp: { provider: string; setup_url: string; }; performance?: { liteMode?: boolean; skipImpeccable?: boolean; }; } interface WorkflowConfig { id: string; name: string; nameEn: string; category: string; commands: string[]; defaultSelected: boolean; order: number; description?: string; descriptionEn?: string; } interface InitOptions { lang?: SupportedLang; skipPrompt?: boolean; skipMcp?: boolean; force?: boolean; frontend?: string; backend?: string; mode?: CollaborationMode; workflows?: string; installDir?: string; } interface InstallResult { success: boolean; installedCommands: string[]; installedPrompts: string[]; installedSkills?: number; installedSkillCommands?: number; installedRules?: boolean; errors: string[]; configPath: string; binPath?: string; binInstalled?: boolean; } interface AceToolConfig { baseUrl: string; token: string; } interface FastContextConfig { apiKey?: string; includeSnippets?: boolean; } declare function init(options?: InitOptions): Promise; declare function showMainMenu(): Promise; /** * Main update command - checks for updates and installs if available */ declare function update(): Promise; declare const i18n: i18next.i18n; declare function initI18n(lang?: SupportedLang): Promise; declare function changeLanguage(lang: SupportedLang): Promise; declare function getCcgDir(): string; declare function getConfigPath(): string; declare function readCcgConfig(): Promise; declare function writeCcgConfig(config: CcgConfig): Promise; declare function createDefaultConfig(options: { language: SupportedLang; routing: ModelRouting; installedWorkflows: string[]; mcpProvider?: string; liteMode?: boolean; skipImpeccable?: boolean; }): CcgConfig; declare function createDefaultRouting(): ModelRouting; declare function getWorkflowConfigs(): WorkflowConfig[]; declare function getWorkflowById(id: string): WorkflowConfig | undefined; type McpInstallResult = { success: boolean; message: string; configPath?: string; }; /** * Uninstall ace-tool MCP configuration from ~/.claude.json */ declare function uninstallAceTool(): Promise<{ success: boolean; message: string; }>; /** * Install and configure ace-tool MCP for Claude Code. */ declare function installAceTool(config: AceToolConfig): Promise; /** * Install and configure ace-tool-rs MCP for Claude Code. * ace-tool-rs is a Rust implementation — more lightweight and faster. */ declare function installAceToolRs(config: AceToolConfig): Promise; /** * Install Codex-mode files: AGENTS.md + .codex/config.toml + .codex/agents/*.toml * These enable Codex CLI as an alternative lead orchestrator (Codex-led multi-model mode). * Files are installed to ~/.codex/ (global) and user copies AGENTS.md to project root. */ declare function installCodexMode(): Promise<{ success: boolean; message: string; }>; /** * Uninstall CCG Codex mode — only removes files installed by CCG, preserves user files. */ declare function uninstallCodexMode(): Promise<{ success: boolean; removed: string[]; skipped: string[]; }>; declare function installWorkflows(workflowIds: string[], installDir: string, force?: boolean, config?: { routing?: { mode?: string; frontend?: { models?: string[]; primary?: string; }; backend?: { models?: string[]; primary?: string; }; review?: { models?: string[]; }; }; liteMode?: boolean; mcpProvider?: string; skipImpeccable?: boolean; }): Promise; interface UninstallResult { success: boolean; removedCommands: string[]; removedPrompts: string[]; removedAgents: string[]; removedSkills: string[]; removedRules: boolean; removedBin: boolean; errors: string[]; } /** * Uninstall workflows by removing their command files. * @param options.preserveBinary — when true, skip binary removal (used during update) */ declare function uninstallWorkflows(installDir: string, options?: { preserveBinary?: boolean; }): Promise; /** * Migration utilities for v1.4.0 * Handles automatic migration from old directory structure to new one */ interface MigrationResult { success: boolean; migratedFiles: string[]; errors: string[]; skipped: string[]; } /** * Migrate from v1.3.x to v1.4.0 * * Changes: * 1. ~/.ccg/ → ~/.claude/.ccg/ * 2. ~/.claude/prompts/ccg/ → ~/.claude/.ccg/prompts/ */ declare function migrateToV1_4_0(): Promise; /** * Check if migration is needed */ declare function needsMigration(): Promise; /** * Get current installed version from package.json */ declare function getCurrentVersion(): Promise; /** * Get latest version from npm registry */ declare function getLatestVersion(packageName?: string): Promise; /** * Compare two semantic versions * @returns 1 if v1 > v2, -1 if v1 < v2, 0 if equal */ declare function compareVersions(v1: string, v2: string): number; /** * Check if update is available */ declare function checkForUpdates(): Promise<{ hasUpdate: boolean; currentVersion: string; latestVersion: string | null; }>; export { changeLanguage, checkForUpdates, compareVersions, createDefaultConfig, createDefaultRouting, getCcgDir, getConfigPath, getCurrentVersion, getLatestVersion, getWorkflowById, getWorkflowConfigs, i18n, init, initI18n, installAceTool, installAceToolRs, installCodexMode, installWorkflows, migrateToV1_4_0, needsMigration, readCcgConfig, showMainMenu, uninstallAceTool, uninstallCodexMode, uninstallWorkflows, update, writeCcgConfig }; export type { AceToolConfig, CcgConfig, CliOptions, CollaborationMode, FastContextConfig, InitOptions, InstallResult, ModelRouting, ModelType, RoutingStrategy, SupportedLang, WorkflowConfig };