ccjk 14.1.2 → 14.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/chunks/api-cli.mjs +5 -5
  2. package/dist/chunks/api-config-selector.mjs +18 -5
  3. package/dist/chunks/api-providers.mjs +24 -9
  4. package/dist/chunks/auto-updater.mjs +13 -13
  5. package/dist/chunks/boost.mjs +1 -1
  6. package/dist/chunks/ccjk-all.mjs +4 -4
  7. package/dist/chunks/ccjk-config.mjs +78 -1
  8. package/dist/chunks/ccjk-mcp.mjs +4 -4
  9. package/dist/chunks/ccjk-setup.mjs +4 -4
  10. package/dist/chunks/ccr.mjs +11 -11
  11. package/dist/chunks/check-updates.mjs +3 -3
  12. package/dist/chunks/claude-code-incremental-manager.mjs +8 -6
  13. package/dist/chunks/claude-config.mjs +73 -0
  14. package/dist/chunks/claude-wrapper.mjs +1 -1
  15. package/dist/chunks/cli-hook.mjs +76 -1
  16. package/dist/chunks/code-type-resolver.mjs +14 -13
  17. package/dist/chunks/codex-config-switch.mjs +2 -2
  18. package/dist/chunks/codex-provider-manager.mjs +2 -2
  19. package/dist/chunks/codex.mjs +3 -3
  20. package/dist/chunks/config-switch.mjs +5 -5
  21. package/dist/chunks/config.mjs +531 -158
  22. package/dist/chunks/config2.mjs +22 -20
  23. package/dist/chunks/config3.mjs +6 -6
  24. package/dist/chunks/constants.mjs +20 -13
  25. package/dist/chunks/doctor.mjs +1 -1
  26. package/dist/chunks/features.mjs +59 -4
  27. package/dist/chunks/fs-operations.mjs +2 -14
  28. package/dist/chunks/index.mjs +1 -1
  29. package/dist/chunks/index10.mjs +115 -100
  30. package/dist/chunks/init.mjs +121 -53
  31. package/dist/chunks/installer.mjs +28 -21
  32. package/dist/chunks/mcp-cli.mjs +6 -6
  33. package/dist/chunks/mcp.mjs +6 -6
  34. package/dist/chunks/package.mjs +1 -1
  35. package/dist/chunks/platform.mjs +3 -3
  36. package/dist/chunks/prompts.mjs +9 -7
  37. package/dist/chunks/quick-actions.mjs +1 -1
  38. package/dist/chunks/quick-provider.mjs +23 -31
  39. package/dist/chunks/quick-setup.mjs +3 -4
  40. package/dist/chunks/simple-config.mjs +57 -16
  41. package/dist/chunks/slash-commands.mjs +1 -1
  42. package/dist/chunks/smart-guide.mjs +23 -10
  43. package/dist/chunks/status.mjs +28 -24
  44. package/dist/chunks/update.mjs +19 -18
  45. package/dist/chunks/upgrade.mjs +88 -5
  46. package/dist/chunks/version-checker.mjs +2 -2
  47. package/dist/chunks/zero-config.mjs +121 -16
  48. package/dist/cli.mjs +50 -27
  49. package/dist/i18n/locales/en/configuration.json +5 -3
  50. package/dist/i18n/locales/en/language.json +1 -1
  51. package/dist/i18n/locales/en/menu.json +8 -7
  52. package/dist/i18n/locales/en/multi-config.json +1 -1
  53. package/dist/i18n/locales/zh-CN/configuration.json +5 -3
  54. package/dist/i18n/locales/zh-CN/language.json +1 -1
  55. package/dist/i18n/locales/zh-CN/menu.json +8 -7
  56. package/dist/i18n/locales/zh-CN/multi-config.json +1 -1
  57. package/dist/index.d.mts +13 -11
  58. package/dist/index.d.ts +13 -11
  59. package/dist/index.mjs +7 -7
  60. package/dist/shared/{ccjk.B6VCKdyy.mjs → ccjk.BXTrU9TN.mjs} +31 -68
  61. package/dist/shared/{ccjk.DScm_NnL.mjs → ccjk.Ccrqt7u2.mjs} +30 -1
  62. package/dist/shared/{ccjk.CVjfbEIj.mjs → ccjk.DZtwozOG.mjs} +1 -1
  63. package/dist/shared/{ccjk.D6wx-rxT.mjs → ccjk.Dxgd2vjc.mjs} +3 -3
  64. package/dist/shared/{ccjk.BO45TPXJ.mjs → ccjk.K8c6VnM2.mjs} +2 -2
  65. package/dist/shared/{ccjk.BJENIVf7.mjs → ccjk.MpkxXQJL.mjs} +179 -19
  66. package/dist/shared/{ccjk.Dh6Be-ef.mjs → ccjk.ygJzcD-n.mjs} +28 -24
  67. package/package.json +1 -30
  68. package/dist/chunks/auto-fix.mjs +0 -253
  69. package/dist/chunks/auto-init.mjs +0 -311
  70. package/dist/chunks/auto-upgrade.mjs +0 -152
  71. package/dist/chunks/migrator.mjs +0 -178
  72. package/dist/shared/ccjk.DDq2hqA5.mjs +0 -158
  73. package/dist/shared/ccjk.KPLeMP-o.mjs +0 -79
  74. package/templates/common/workflow/essential/en/agents/planner.md +0 -116
  75. package/templates/common/workflow/essential/zh-CN/agents/planner.md +0 -116
package/dist/index.d.mts CHANGED
@@ -2691,7 +2691,7 @@ declare class FallbackCloudClient {
2691
2691
  */
2692
2692
  declare function createCompleteCloudClient(config?: Partial<CloudClientConfig>): FallbackCloudClient;
2693
2693
 
2694
- declare const CODE_TOOL_TYPES: readonly ["claude-code", "myclaude", "codex", "aider", "continue", "cline", "cursor"];
2694
+ declare const CODE_TOOL_TYPES: readonly ["claude-code", "clavue", "codex", "aider", "continue", "cline", "cursor"];
2695
2695
  type CodeToolType = (typeof CODE_TOOL_TYPES)[number];
2696
2696
  declare const SUPPORTED_LANGS: readonly ["zh-CN", "en"];
2697
2697
  type SupportedLang = (typeof SUPPORTED_LANGS)[number];
@@ -4036,10 +4036,11 @@ interface ApiConfig {
4036
4036
  authType?: 'auth_token' | 'api_key';
4037
4037
  }
4038
4038
 
4039
- declare function ensureClaudeDir(): void;
4040
- declare function backupExistingConfig(): string | null;
4041
- declare function copyConfigFiles(onlyMd?: boolean): void;
4042
- declare function configureApi(apiConfig: ApiConfig | null): ApiConfig | null;
4039
+ declare function clearLegacyTopLevelRuntimeSettings(settings: Record<string, any>): void;
4040
+ declare function ensureClaudeDir(codeTool?: CodeToolType): void;
4041
+ declare function backupExistingConfig(codeTool?: CodeToolType): string | null;
4042
+ declare function copyConfigFiles(onlyMd?: boolean, codeTool?: CodeToolType): void;
4043
+ declare function configureApi(apiConfig: ApiConfig | null, codeTool?: CodeToolType): ApiConfig | null;
4043
4044
  /**
4044
4045
  * Configure hooks in settings.json
4045
4046
  * Adds default hooks configuration if the version supports it
@@ -4064,7 +4065,7 @@ declare function overwriteModelSettings(settings: ClaudeSettings, { primaryModel
4064
4065
  * @param sonnetModel - Default Sonnet model (optional)
4065
4066
  * @param opusModel - Default Opus model (optional)
4066
4067
  */
4067
- declare function updateCustomModel(primaryModel?: string, haikuModel?: string, sonnetModel?: string, opusModel?: string): void;
4068
+ declare function updateCustomModel(primaryModel?: string, haikuModel?: string, sonnetModel?: string, opusModel?: string, codeTool?: CodeToolType): void;
4068
4069
  /**
4069
4070
  * Update the default model configuration in settings.json
4070
4071
  * @param model - The model type to set: opus, sonnet, sonnet[1m], default, or custom
@@ -4093,14 +4094,14 @@ declare function getExistingCustomModelConfig(): {
4093
4094
  /**
4094
4095
  * Get existing API configuration from settings.json
4095
4096
  */
4096
- declare function getExistingApiConfig(): ApiConfig | null;
4097
- declare function applyAiLanguageDirective(aiOutputLang: AiOutputLanguage | string): void;
4097
+ declare function getExistingApiConfig(codeTool?: CodeToolType): ApiConfig | null;
4098
+ declare function applyAiLanguageDirective(aiOutputLang: AiOutputLanguage | string, codeTool?: CodeToolType): void;
4098
4099
  /**
4099
4100
  * Switch to official login mode - remove all third-party API configurations
4100
4101
  * Removes: ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY from settings.json
4101
4102
  * Removes: primaryApiKey from ~/.claude/config.json
4102
4103
  */
4103
- declare function switchToOfficialLogin(): boolean;
4104
+ declare function switchToOfficialLogin(codeTool?: CodeToolType): boolean;
4104
4105
  /**
4105
4106
  * Prompt user for API configuration action when existing config is found
4106
4107
  * Returns the user's choice for how to handle existing configuration
@@ -4111,6 +4112,7 @@ type config_ApiConfig = ApiConfig;
4111
4112
  type config_ModelConfigOverride = ModelConfigOverride;
4112
4113
  declare const config_applyAiLanguageDirective: typeof applyAiLanguageDirective;
4113
4114
  declare const config_backupExistingConfig: typeof backupExistingConfig;
4115
+ declare const config_clearLegacyTopLevelRuntimeSettings: typeof clearLegacyTopLevelRuntimeSettings;
4114
4116
  declare const config_configureApi: typeof configureApi;
4115
4117
  declare const config_configureHooks: typeof configureHooks;
4116
4118
  declare const config_copyConfigFiles: typeof copyConfigFiles;
@@ -4126,7 +4128,7 @@ declare const config_switchToOfficialLogin: typeof switchToOfficialLogin;
4126
4128
  declare const config_updateCustomModel: typeof updateCustomModel;
4127
4129
  declare const config_updateDefaultModel: typeof updateDefaultModel;
4128
4130
  declare namespace config {
4129
- export { config_applyAiLanguageDirective as applyAiLanguageDirective, config_backupExistingConfig as backupExistingConfig, config_configureApi as configureApi, config_configureHooks as configureHooks, config_copyConfigFiles as copyConfigFiles, config_ensureClaudeDir as ensureClaudeDir, config_getExistingApiConfig as getExistingApiConfig, config_getExistingCustomModelConfig as getExistingCustomModelConfig, config_getExistingModelConfig as getExistingModelConfig, config_mergeConfigs as mergeConfigs, config_mergeSettingsFile as mergeSettingsFile, config_overwriteModelSettings as overwriteModelSettings, config_promptApiConfigurationAction as promptApiConfigurationAction, config_switchToOfficialLogin as switchToOfficialLogin, config_updateCustomModel as updateCustomModel, config_updateDefaultModel as updateDefaultModel };
4131
+ export { config_applyAiLanguageDirective as applyAiLanguageDirective, config_backupExistingConfig as backupExistingConfig, config_clearLegacyTopLevelRuntimeSettings as clearLegacyTopLevelRuntimeSettings, config_configureApi as configureApi, config_configureHooks as configureHooks, config_copyConfigFiles as copyConfigFiles, config_ensureClaudeDir as ensureClaudeDir, config_getExistingApiConfig as getExistingApiConfig, config_getExistingCustomModelConfig as getExistingCustomModelConfig, config_getExistingModelConfig as getExistingModelConfig, config_mergeConfigs as mergeConfigs, config_mergeSettingsFile as mergeSettingsFile, config_overwriteModelSettings as overwriteModelSettings, config_promptApiConfigurationAction as promptApiConfigurationAction, config_switchToOfficialLogin as switchToOfficialLogin, config_updateCustomModel as updateCustomModel, config_updateDefaultModel as updateDefaultModel };
4130
4132
  export type { config_ApiConfig as ApiConfig, config_ModelConfigOverride as ModelConfigOverride };
4131
4133
  }
4132
4134
 
@@ -5049,7 +5051,7 @@ declare function findRealCommandPath(command: string): Promise<string | null>;
5049
5051
  * Get recommended install methods for a code tool based on current platform
5050
5052
  * Returns methods in priority order (most recommended first)
5051
5053
  */
5052
- type CodeType = 'claude-code' | 'myclaude' | 'codex';
5054
+ type CodeType = 'claude-code' | 'clavue' | 'codex';
5053
5055
  type InstallMethod = 'npm' | 'homebrew' | 'curl' | 'powershell' | 'cmd' | 'npm-global' | 'native';
5054
5056
  declare function getRecommendedInstallMethods(codeType: CodeType): InstallMethod[];
5055
5057
 
package/dist/index.d.ts CHANGED
@@ -2691,7 +2691,7 @@ declare class FallbackCloudClient {
2691
2691
  */
2692
2692
  declare function createCompleteCloudClient(config?: Partial<CloudClientConfig>): FallbackCloudClient;
2693
2693
 
2694
- declare const CODE_TOOL_TYPES: readonly ["claude-code", "myclaude", "codex", "aider", "continue", "cline", "cursor"];
2694
+ declare const CODE_TOOL_TYPES: readonly ["claude-code", "clavue", "codex", "aider", "continue", "cline", "cursor"];
2695
2695
  type CodeToolType = (typeof CODE_TOOL_TYPES)[number];
2696
2696
  declare const SUPPORTED_LANGS: readonly ["zh-CN", "en"];
2697
2697
  type SupportedLang = (typeof SUPPORTED_LANGS)[number];
@@ -4036,10 +4036,11 @@ interface ApiConfig {
4036
4036
  authType?: 'auth_token' | 'api_key';
4037
4037
  }
4038
4038
 
4039
- declare function ensureClaudeDir(): void;
4040
- declare function backupExistingConfig(): string | null;
4041
- declare function copyConfigFiles(onlyMd?: boolean): void;
4042
- declare function configureApi(apiConfig: ApiConfig | null): ApiConfig | null;
4039
+ declare function clearLegacyTopLevelRuntimeSettings(settings: Record<string, any>): void;
4040
+ declare function ensureClaudeDir(codeTool?: CodeToolType): void;
4041
+ declare function backupExistingConfig(codeTool?: CodeToolType): string | null;
4042
+ declare function copyConfigFiles(onlyMd?: boolean, codeTool?: CodeToolType): void;
4043
+ declare function configureApi(apiConfig: ApiConfig | null, codeTool?: CodeToolType): ApiConfig | null;
4043
4044
  /**
4044
4045
  * Configure hooks in settings.json
4045
4046
  * Adds default hooks configuration if the version supports it
@@ -4064,7 +4065,7 @@ declare function overwriteModelSettings(settings: ClaudeSettings, { primaryModel
4064
4065
  * @param sonnetModel - Default Sonnet model (optional)
4065
4066
  * @param opusModel - Default Opus model (optional)
4066
4067
  */
4067
- declare function updateCustomModel(primaryModel?: string, haikuModel?: string, sonnetModel?: string, opusModel?: string): void;
4068
+ declare function updateCustomModel(primaryModel?: string, haikuModel?: string, sonnetModel?: string, opusModel?: string, codeTool?: CodeToolType): void;
4068
4069
  /**
4069
4070
  * Update the default model configuration in settings.json
4070
4071
  * @param model - The model type to set: opus, sonnet, sonnet[1m], default, or custom
@@ -4093,14 +4094,14 @@ declare function getExistingCustomModelConfig(): {
4093
4094
  /**
4094
4095
  * Get existing API configuration from settings.json
4095
4096
  */
4096
- declare function getExistingApiConfig(): ApiConfig | null;
4097
- declare function applyAiLanguageDirective(aiOutputLang: AiOutputLanguage | string): void;
4097
+ declare function getExistingApiConfig(codeTool?: CodeToolType): ApiConfig | null;
4098
+ declare function applyAiLanguageDirective(aiOutputLang: AiOutputLanguage | string, codeTool?: CodeToolType): void;
4098
4099
  /**
4099
4100
  * Switch to official login mode - remove all third-party API configurations
4100
4101
  * Removes: ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY from settings.json
4101
4102
  * Removes: primaryApiKey from ~/.claude/config.json
4102
4103
  */
4103
- declare function switchToOfficialLogin(): boolean;
4104
+ declare function switchToOfficialLogin(codeTool?: CodeToolType): boolean;
4104
4105
  /**
4105
4106
  * Prompt user for API configuration action when existing config is found
4106
4107
  * Returns the user's choice for how to handle existing configuration
@@ -4111,6 +4112,7 @@ type config_ApiConfig = ApiConfig;
4111
4112
  type config_ModelConfigOverride = ModelConfigOverride;
4112
4113
  declare const config_applyAiLanguageDirective: typeof applyAiLanguageDirective;
4113
4114
  declare const config_backupExistingConfig: typeof backupExistingConfig;
4115
+ declare const config_clearLegacyTopLevelRuntimeSettings: typeof clearLegacyTopLevelRuntimeSettings;
4114
4116
  declare const config_configureApi: typeof configureApi;
4115
4117
  declare const config_configureHooks: typeof configureHooks;
4116
4118
  declare const config_copyConfigFiles: typeof copyConfigFiles;
@@ -4126,7 +4128,7 @@ declare const config_switchToOfficialLogin: typeof switchToOfficialLogin;
4126
4128
  declare const config_updateCustomModel: typeof updateCustomModel;
4127
4129
  declare const config_updateDefaultModel: typeof updateDefaultModel;
4128
4130
  declare namespace config {
4129
- export { config_applyAiLanguageDirective as applyAiLanguageDirective, config_backupExistingConfig as backupExistingConfig, config_configureApi as configureApi, config_configureHooks as configureHooks, config_copyConfigFiles as copyConfigFiles, config_ensureClaudeDir as ensureClaudeDir, config_getExistingApiConfig as getExistingApiConfig, config_getExistingCustomModelConfig as getExistingCustomModelConfig, config_getExistingModelConfig as getExistingModelConfig, config_mergeConfigs as mergeConfigs, config_mergeSettingsFile as mergeSettingsFile, config_overwriteModelSettings as overwriteModelSettings, config_promptApiConfigurationAction as promptApiConfigurationAction, config_switchToOfficialLogin as switchToOfficialLogin, config_updateCustomModel as updateCustomModel, config_updateDefaultModel as updateDefaultModel };
4131
+ export { config_applyAiLanguageDirective as applyAiLanguageDirective, config_backupExistingConfig as backupExistingConfig, config_clearLegacyTopLevelRuntimeSettings as clearLegacyTopLevelRuntimeSettings, config_configureApi as configureApi, config_configureHooks as configureHooks, config_copyConfigFiles as copyConfigFiles, config_ensureClaudeDir as ensureClaudeDir, config_getExistingApiConfig as getExistingApiConfig, config_getExistingCustomModelConfig as getExistingCustomModelConfig, config_getExistingModelConfig as getExistingModelConfig, config_mergeConfigs as mergeConfigs, config_mergeSettingsFile as mergeSettingsFile, config_overwriteModelSettings as overwriteModelSettings, config_promptApiConfigurationAction as promptApiConfigurationAction, config_switchToOfficialLogin as switchToOfficialLogin, config_updateCustomModel as updateCustomModel, config_updateDefaultModel as updateDefaultModel };
4130
4132
  export type { config_ApiConfig as ApiConfig, config_ModelConfigOverride as ModelConfigOverride };
4131
4133
  }
4132
4134
 
@@ -5049,7 +5051,7 @@ declare function findRealCommandPath(command: string): Promise<string | null>;
5049
5051
  * Get recommended install methods for a code tool based on current platform
5050
5052
  * Returns methods in priority order (most recommended first)
5051
5053
  */
5052
- type CodeType = 'claude-code' | 'myclaude' | 'codex';
5054
+ type CodeType = 'claude-code' | 'clavue' | 'codex';
5053
5055
  type InstallMethod = 'npm' | 'homebrew' | 'curl' | 'powershell' | 'cmd' | 'npm-global' | 'native';
5054
5056
  declare function getRecommendedInstallMethods(codeType: CodeType): InstallMethod[];
5055
5057
 
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  export { P as ProjectAnalyzer, T as TemplatesClient, d as analyzeDependencies, a as analyzeProject, h as batchAnalyze, b as createTemplatesClient, e as detectProject, f as detectProjectType, g as getTemplatesClient } from './shared/ccjk.Cv13QsGp.mjs';
2
2
  import { a as createCloudClient } from './shared/ccjk.Dhu8ia5S.mjs';
3
3
  export { C as CachedCloudClient, b as CloudCache, d as CloudClient, F as FallbackCloudClient, R as RetryableCloudClient, T as TelemetryReporter, c as createCompleteCloudClient, g as getTelemetry, i as initializeTelemetry, r as retryUtils, s as stopTelemetry, t as telemetryUtils, e as trackEvent, w as withRetry } from './shared/ccjk.Dhu8ia5S.mjs';
4
- import { T as ToolRegistry } from './shared/ccjk.BO45TPXJ.mjs';
5
- export { A as AiderTool, B as BaseCodeTool, C as ClaudeCodeTool, b as ClineTool, c as CodexTool, d as ContinueTool, e as CursorTool, a as getRegistry, g as getRuntimeCapabilityDescriptor } from './shared/ccjk.BO45TPXJ.mjs';
4
+ import { T as ToolRegistry } from './shared/ccjk.K8c6VnM2.mjs';
5
+ export { A as AiderTool, B as BaseCodeTool, C as ClaudeCodeTool, b as ClineTool, c as CodexTool, d as ContinueTool, e as CursorTool, a as getRegistry, g as getRuntimeCapabilityDescriptor } from './shared/ccjk.K8c6VnM2.mjs';
6
6
  import { CLOUD_ENDPOINTS } from './chunks/constants.mjs';
7
7
  export { a as CloudError, b as CloudErrorCode, C as CloudErrorFactory, f as formatErrorForLogging, g as getRetryDelay, h as handleCloudError, i as isAuthError, c as isRateLimitError, d as isRetryableError, e as isRetryableErrorCode } from './shared/ccjk.UhjQ1seV.mjs';
8
8
  import { e as extractString } from './shared/ccjk.C2jHOZVP.mjs';
@@ -15,7 +15,7 @@ import * as os from 'node:os';
15
15
  import { homedir } from 'node:os';
16
16
  import { j as join$1 } from './shared/ccjk.bQ7Dh1g4.mjs';
17
17
  import { b as buildCommand, c as commandExists, a as escapeArgument, e as executeCommand, d as executeCommandParallel, f as executeCommandSequence, g as executeCommandStream, h as getCommandPath, i as getCommandVersion, p as parseVersion } from './shared/ccjk.BnsY5WxD.mjs';
18
- export { D as config } from './chunks/config.mjs';
18
+ export { F as config } from './chunks/config.mjs';
19
19
  import * as path from 'node:path';
20
20
  export { a as loggerUtils } from './shared/ccjk.8oaxX4iR.mjs';
21
21
  export { p as platform } from './chunks/platform.mjs';
@@ -42,12 +42,12 @@ import 'fs';
42
42
  import 'child_process';
43
43
  import 'buffer';
44
44
  import 'string_decoder';
45
- import './chunks/json-config.mjs';
46
- import './chunks/fs-operations.mjs';
47
- import 'node:fs/promises';
48
- import './shared/ccjk.DScm_NnL.mjs';
49
45
  import './chunks/ccjk-config.mjs';
50
46
  import './chunks/index3.mjs';
47
+ import './chunks/fs-operations.mjs';
48
+ import 'node:fs/promises';
49
+ import './chunks/json-config.mjs';
50
+ import './shared/ccjk.Ccrqt7u2.mjs';
51
51
  import './chunks/main.mjs';
52
52
  import 'module';
53
53
 
@@ -1,54 +1,13 @@
1
1
  import a from '../chunks/index5.mjs';
2
2
  import { i as inquirer } from '../chunks/index6.mjs';
3
3
  import { a as getMcpService, d as dynamicMcpRegistry, M as MCP_SERVICE_CONFIGS } from './ccjk.DKXs7Fbm.mjs';
4
- import { SETTINGS_FILE, CLAUDE_DIR, ClAUDE_CONFIG_FILE, CODEX_CONFIG_FILE } from '../chunks/constants.mjs';
5
- import { exists, ensureDir } from '../chunks/fs-operations.mjs';
6
- import { readJsonConfig, writeJsonConfig } from '../chunks/json-config.mjs';
7
- import { o as deepMerge, r as readMcpConfig, e as buildMcpServerConfig, w as writeMcpConfig } from '../chunks/config.mjs';
4
+ import { ClAUDE_CONFIG_FILE, CODEX_CONFIG_FILE } from '../chunks/constants.mjs';
8
5
  import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
9
- import { r as readCodexConfig, g as applyCodexPlatformCommand, w as writeCodexConfig } from '../chunks/codex.mjs';
10
- import { i as isWindows, l as getSystemRoot } from '../chunks/platform.mjs';
11
-
12
- function readClaudeConfig(configPath = SETTINGS_FILE) {
13
- try {
14
- if (!exists(configPath)) {
15
- return null;
16
- }
17
- return readJsonConfig(configPath) || null;
18
- } catch (error) {
19
- console.error(`Failed to read Claude config from ${configPath}:`, error);
20
- return null;
21
- }
22
- }
23
- function writeClaudeConfig(config, options = {}, configPath = SETTINGS_FILE) {
24
- try {
25
- ensureDir(CLAUDE_DIR);
26
- writeJsonConfig(configPath, config, {
27
- atomic: options.atomic !== false,
28
- pretty: true,
29
- backup: options.backup
30
- });
31
- } catch (error) {
32
- console.error(`Failed to write Claude config to ${configPath}:`, error);
33
- throw new Error(`Failed to write Claude config: ${error instanceof Error ? error.message : String(error)}`);
34
- }
35
- }
36
- function updateClaudeConfig(updates, options = {}, configPath = SETTINGS_FILE) {
37
- const existingConfig = readClaudeConfig(configPath) || {};
38
- const mergedConfig = deepMerge(existingConfig, updates, {
39
- mergeArrays: options.merge === "preserve",
40
- arrayMergeStrategy: "unique"
41
- });
42
- writeClaudeConfig(mergedConfig, options, configPath);
43
- return mergedConfig;
44
- }
45
-
46
- const claudeConfig = {
47
- __proto__: null,
48
- readClaudeConfig: readClaudeConfig,
49
- updateClaudeConfig: updateClaudeConfig,
50
- writeClaudeConfig: writeClaudeConfig
51
- };
6
+ import { r as readMcpConfig, e as buildMcpServerConfig, w as writeMcpConfig } from '../chunks/config.mjs';
7
+ import { r as readCodexConfig, d as applyCodexPlatformCommand, w as writeCodexConfig } from '../chunks/codex.mjs';
8
+ import { exists } from '../chunks/fs-operations.mjs';
9
+ import { i as isWindows, k as getSystemRoot } from '../chunks/platform.mjs';
10
+ import { r as resolveClaudeFamilySettingsTarget } from './ccjk.Ccrqt7u2.mjs';
52
11
 
53
12
  function detectActiveTool() {
54
13
  const hasClaudeConfig = exists(ClAUDE_CONFIG_FILE);
@@ -95,7 +54,7 @@ async function installMcpService(serviceId, tool, apiKey) {
95
54
  if (targetTool === "codex") {
96
55
  await installMcpServiceForCodex(serviceId, service.config, apiKey, service.apiKeyEnvVar);
97
56
  } else {
98
- await installMcpServiceForClaudeCode(serviceId, service.config, apiKey, service.apiKeyEnvVar);
57
+ await installMcpServiceForClaudeCode(targetTool, serviceId, service.config, apiKey, service.apiKeyEnvVar);
99
58
  }
100
59
  dynamicMcpRegistry.addService(serviceId, service.config);
101
60
  return {
@@ -112,8 +71,8 @@ async function installMcpService(serviceId, tool, apiKey) {
112
71
  };
113
72
  }
114
73
  }
115
- async function installMcpServiceForClaudeCode(serviceId, baseConfig, apiKey, apiKeyEnvVar) {
116
- let config = readMcpConfig();
74
+ async function installMcpServiceForClaudeCode(tool, serviceId, baseConfig, apiKey, apiKeyEnvVar) {
75
+ let config = readMcpConfig(tool);
117
76
  if (!config) {
118
77
  config = { mcpServers: {} };
119
78
  }
@@ -127,8 +86,8 @@ async function installMcpServiceForClaudeCode(serviceId, baseConfig, apiKey, api
127
86
  config.mcpServers = {};
128
87
  }
129
88
  config.mcpServers[serviceId] = serverConfig;
130
- writeMcpConfig(config);
131
- await autoAuthorizeMcpService(serviceId);
89
+ writeMcpConfig(config, tool);
90
+ await autoAuthorizeMcpService(tool, serviceId);
132
91
  }
133
92
  async function installMcpServiceForCodex(serviceId, baseConfig, apiKey, apiKeyEnvVar) {
134
93
  const existingConfig = readCodexConfig();
@@ -186,7 +145,7 @@ async function uninstallMcpService(serviceId, tool) {
186
145
  if (targetTool === "codex") {
187
146
  await uninstallMcpServiceFromCodex(serviceId);
188
147
  } else {
189
- await uninstallMcpServiceFromClaudeCode(serviceId);
148
+ await uninstallMcpServiceFromClaudeCode(targetTool, serviceId);
190
149
  }
191
150
  dynamicMcpRegistry.removeService(serviceId);
192
151
  return {
@@ -201,8 +160,8 @@ async function uninstallMcpService(serviceId, tool) {
201
160
  };
202
161
  }
203
162
  }
204
- async function uninstallMcpServiceFromClaudeCode(serviceId) {
205
- const config = readMcpConfig();
163
+ async function uninstallMcpServiceFromClaudeCode(tool, serviceId) {
164
+ const config = readMcpConfig(tool);
206
165
  if (!config || !config.mcpServers) {
207
166
  throw new Error(i18n.t("mcp:installer.noConfig"));
208
167
  }
@@ -214,8 +173,8 @@ async function uninstallMcpServiceFromClaudeCode(serviceId) {
214
173
  throw new Error(i18n.t("mcp:installer.serviceNotInstalled", { id: serviceId }));
215
174
  }
216
175
  delete config.mcpServers[existingKey];
217
- writeMcpConfig(config);
218
- await removeAuthorizeMcpService(serviceId);
176
+ writeMcpConfig(config, tool);
177
+ await removeAuthorizeMcpService(tool, serviceId);
219
178
  }
220
179
  async function uninstallMcpServiceFromCodex(serviceId) {
221
180
  const existingConfig = readCodexConfig();
@@ -238,11 +197,11 @@ async function listInstalledMcpServices(tool) {
238
197
  if (targetTool === "codex") {
239
198
  return listInstalledMcpServicesFromCodex();
240
199
  } else {
241
- return listInstalledMcpServicesFromClaudeCode();
200
+ return listInstalledMcpServicesFromClaudeCode(targetTool);
242
201
  }
243
202
  }
244
- function listInstalledMcpServicesFromClaudeCode() {
245
- const config = readMcpConfig();
203
+ function listInstalledMcpServicesFromClaudeCode(tool) {
204
+ const config = readMcpConfig(tool);
246
205
  if (!config || !config.mcpServers) {
247
206
  return [];
248
207
  }
@@ -317,10 +276,12 @@ ${i18n.t("mcp:installer.installedServices", { tool: targetTool })}
317
276
  console.log("");
318
277
  });
319
278
  }
320
- async function autoAuthorizeMcpService(serviceId) {
279
+ async function autoAuthorizeMcpService(tool, serviceId) {
321
280
  const mcpPermission = `mcp__${serviceId.toLowerCase().replace(/-/g, "_")}`;
322
- const { readClaudeConfig } = await Promise.resolve().then(function () { return claudeConfig; });
323
- const currentSettings = readClaudeConfig() || {};
281
+ const target = resolveClaudeFamilySettingsTarget(tool);
282
+ const { readClaudeConfig } = await import('../chunks/claude-config.mjs');
283
+ const { updateClaudeConfig } = await import('../chunks/claude-config.mjs');
284
+ const currentSettings = readClaudeConfig(target.settingsFile) || {};
324
285
  if (!currentSettings.permissions) {
325
286
  currentSettings.permissions = {};
326
287
  }
@@ -331,20 +292,22 @@ async function autoAuthorizeMcpService(serviceId) {
331
292
  currentSettings.permissions.allow.push(mcpPermission);
332
293
  updateClaudeConfig({
333
294
  permissions: currentSettings.permissions
334
- });
295
+ }, {}, target.settingsFile);
335
296
  }
336
297
  }
337
- async function removeAuthorizeMcpService(serviceId) {
298
+ async function removeAuthorizeMcpService(tool, serviceId) {
338
299
  const mcpPermission = `mcp__${serviceId.toLowerCase().replace(/-/g, "_")}`;
339
- const { readClaudeConfig } = await Promise.resolve().then(function () { return claudeConfig; });
340
- const currentSettings = readClaudeConfig() || {};
300
+ const target = resolveClaudeFamilySettingsTarget(tool);
301
+ const { readClaudeConfig } = await import('../chunks/claude-config.mjs');
302
+ const { updateClaudeConfig } = await import('../chunks/claude-config.mjs');
303
+ const currentSettings = readClaudeConfig(target.settingsFile) || {};
341
304
  if (currentSettings.permissions?.allow) {
342
305
  const index = currentSettings.permissions.allow.indexOf(mcpPermission);
343
306
  if (index !== -1) {
344
307
  currentSettings.permissions.allow.splice(index, 1);
345
308
  updateClaudeConfig({
346
309
  permissions: currentSettings.permissions
347
- });
310
+ }, {}, target.settingsFile);
348
311
  }
349
312
  }
350
313
  }
@@ -1,3 +1,32 @@
1
+ import { CLAVUE_CONFIG_FILE, CLAVUE_SETTINGS_FILE, CLAVUE_DIR, ClAUDE_CONFIG_FILE, SETTINGS_FILE, CLAUDE_DIR, isCodeToolType } from '../chunks/constants.mjs';
2
+ import { readZcfConfig } from '../chunks/ccjk-config.mjs';
3
+ import { j as join } from './ccjk.bQ7Dh1g4.mjs';
4
+
5
+ function resolveClaudeFamilySettingsTarget(codeTool) {
6
+ const configuredTool = readZcfConfig()?.codeToolType;
7
+ const resolvedTool = codeTool || (isCodeToolType(configuredTool) ? configuredTool : "claude-code");
8
+ if (resolvedTool === "clavue") {
9
+ return {
10
+ codeTool: "clavue",
11
+ configDir: CLAVUE_DIR,
12
+ settingsFile: CLAVUE_SETTINGS_FILE,
13
+ instructionsFile: join(CLAVUE_DIR, "clavue.md"),
14
+ runtimeConfigFile: CLAVUE_CONFIG_FILE,
15
+ runtimeBackupDirName: "backups",
16
+ displayName: "Clavue"
17
+ };
18
+ }
19
+ return {
20
+ codeTool: "claude-code",
21
+ configDir: CLAUDE_DIR,
22
+ settingsFile: SETTINGS_FILE,
23
+ instructionsFile: join(CLAUDE_DIR, "CLAUDE.md"),
24
+ runtimeConfigFile: ClAUDE_CONFIG_FILE,
25
+ runtimeBackupDirName: "backup",
26
+ displayName: "Claude Code"
27
+ };
28
+ }
29
+
1
30
  const INVALID_PERMISSION_NAMES = /* @__PURE__ */ new Set([
2
31
  "AllowEdit",
3
32
  "AllowWrite",
@@ -67,4 +96,4 @@ function mergeAndCleanPermissions(templatePermissions, userPermissions) {
67
96
  return result;
68
97
  }
69
98
 
70
- export { mergeAndCleanPermissions as m };
99
+ export { mergeAndCleanPermissions as m, resolveClaudeFamilySettingsTarget as r };
@@ -2,7 +2,7 @@ import a from '../chunks/index5.mjs';
2
2
  import { i as inquirer } from '../chunks/index6.mjs';
3
3
  import { M as MCP_SERVICE_CONFIGS } from './ccjk.DKXs7Fbm.mjs';
4
4
  import { i18n } from '../chunks/index2.mjs';
5
- import { d as displayInstalledMcpServices, b as isMcpServiceInstalled, i as installMcpService, u as uninstallMcpService } from './ccjk.B6VCKdyy.mjs';
5
+ import { d as displayInstalledMcpServices, b as isMcpServiceInstalled, i as installMcpService, u as uninstallMcpService } from './ccjk.BXTrU9TN.mjs';
6
6
  import { existsSync, unlinkSync, statSync, mkdirSync, readFileSync } from 'node:fs';
7
7
  import { homedir } from 'node:os';
8
8
  import { writeFileAtomic } from '../chunks/fs-operations.mjs';
@@ -198,10 +198,10 @@ const modelCheck = {
198
198
  };
199
199
  }
200
200
  const settings = JSON.parse(readFileSync(SETTINGS_FILE, "utf-8"));
201
- const hasModel = settings.model || settings.defaultModel || settings.preferredModel || settings.env?.ANTHROPIC_MODEL || settings.env?.ANTHROPIC_DEFAULT_HAIKU_MODEL || settings.env?.ANTHROPIC_SMALL_FAST_MODEL || settings.env?.ANTHROPIC_DEFAULT_SONNET_MODEL || settings.env?.ANTHROPIC_DEFAULT_OPUS_MODEL;
202
- const hasApiKey = settings.apiKey || settings.env?.ANTHROPIC_API_KEY || process__default.env.ANTHROPIC_API_KEY;
201
+ const hasModel = settings.model || settings.env?.ANTHROPIC_MODEL || settings.env?.ANTHROPIC_DEFAULT_HAIKU_MODEL || settings.env?.ANTHROPIC_SMALL_FAST_MODEL || settings.env?.ANTHROPIC_DEFAULT_SONNET_MODEL || settings.env?.ANTHROPIC_DEFAULT_OPUS_MODEL;
202
+ const hasCredential = settings.authToken || settings.apiKey || settings.env?.ANTHROPIC_AUTH_TOKEN || settings.env?.ANTHROPIC_API_KEY || process__default.env.ANTHROPIC_AUTH_TOKEN || process__default.env.ANTHROPIC_API_KEY;
203
203
  const details = collectModelDetails(settings);
204
- if (!hasApiKey) {
204
+ if (!hasCredential) {
205
205
  return {
206
206
  name: this.name,
207
207
  status: "warn",
@@ -766,8 +766,8 @@ function getRegistry() {
766
766
  }
767
767
 
768
768
  const RUNTIME_CAPABILITY_FALLBACKS = {
769
- myclaude: {
770
- runtime: "myclaude",
769
+ clavue: {
770
+ runtime: "clavue",
771
771
  ownership: "hybrid",
772
772
  configBackend: "claude-family",
773
773
  native: {