ccjk 14.1.3 → 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 (73) 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 +112 -51
  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/language.json +1 -1
  50. package/dist/i18n/locales/en/menu.json +8 -7
  51. package/dist/i18n/locales/en/multi-config.json +1 -1
  52. package/dist/i18n/locales/zh-CN/language.json +1 -1
  53. package/dist/i18n/locales/zh-CN/menu.json +8 -7
  54. package/dist/i18n/locales/zh-CN/multi-config.json +1 -1
  55. package/dist/index.d.mts +13 -11
  56. package/dist/index.d.ts +13 -11
  57. package/dist/index.mjs +7 -7
  58. package/dist/shared/{ccjk.B6VCKdyy.mjs → ccjk.BXTrU9TN.mjs} +31 -68
  59. package/dist/shared/{ccjk.DScm_NnL.mjs → ccjk.Ccrqt7u2.mjs} +30 -1
  60. package/dist/shared/{ccjk.CVjfbEIj.mjs → ccjk.DZtwozOG.mjs} +1 -1
  61. package/dist/shared/{ccjk.D6wx-rxT.mjs → ccjk.Dxgd2vjc.mjs} +3 -3
  62. package/dist/shared/{ccjk.BO45TPXJ.mjs → ccjk.K8c6VnM2.mjs} +2 -2
  63. package/dist/shared/{ccjk.BJENIVf7.mjs → ccjk.MpkxXQJL.mjs} +179 -19
  64. package/dist/shared/{ccjk.Dh6Be-ef.mjs → ccjk.ygJzcD-n.mjs} +28 -24
  65. package/package.json +1 -30
  66. package/dist/chunks/auto-fix.mjs +0 -253
  67. package/dist/chunks/auto-init.mjs +0 -311
  68. package/dist/chunks/auto-upgrade.mjs +0 -152
  69. package/dist/chunks/migrator.mjs +0 -178
  70. package/dist/shared/ccjk.DDq2hqA5.mjs +0 -158
  71. package/dist/shared/ccjk.KPLeMP-o.mjs +0 -79
  72. package/templates/common/workflow/essential/en/agents/planner.md +0 -116
  73. package/templates/common/workflow/essential/zh-CN/agents/planner.md +0 -116
@@ -24,18 +24,18 @@ import 'node:crypto';
24
24
  import 'buffer';
25
25
  import 'string_decoder';
26
26
  import './constants.mjs';
27
- import './json-config.mjs';
27
+ import './ccjk-config.mjs';
28
+ import '../shared/ccjk.BBtCGd_g.mjs';
29
+ import './index3.mjs';
28
30
  import './fs-operations.mjs';
29
31
  import 'node:fs/promises';
32
+ import './json-config.mjs';
33
+ import '../shared/ccjk.Ccrqt7u2.mjs';
30
34
  import './platform.mjs';
31
35
  import './main.mjs';
32
36
  import 'module';
33
37
  import 'node:child_process';
34
38
  import 'node:stream';
35
- import '../shared/ccjk.DScm_NnL.mjs';
36
- import './ccjk-config.mjs';
37
- import '../shared/ccjk.BBtCGd_g.mjs';
38
- import './index3.mjs';
39
39
 
40
40
  async function apiConfigure(options = {}) {
41
41
  const lang = options.lang || i18n.language || "en";
@@ -30,19 +30,30 @@ import './fs-operations.mjs';
30
30
  import 'node:fs/promises';
31
31
  import './json-config.mjs';
32
32
  import '../shared/ccjk.RyizuzOI.mjs';
33
+ import '../shared/ccjk.Ccrqt7u2.mjs';
33
34
  import './platform.mjs';
34
35
  import './main.mjs';
35
36
  import 'module';
36
37
  import 'node:child_process';
37
38
  import 'node:stream';
38
- import '../shared/ccjk.DScm_NnL.mjs';
39
39
  import '../shared/ccjk.DKXs7Fbm.mjs';
40
- import '../shared/ccjk.Dh6Be-ef.mjs';
40
+ import '../shared/ccjk.ygJzcD-n.mjs';
41
41
  import '../shared/ccjk.BFQ7yr5S.mjs';
42
42
  import '../shared/ccjk.DZ2LLOa-.mjs';
43
43
  import '../shared/ccjk.DeWpAShp.mjs';
44
44
  import '../shared/ccjk.BI-hdI7P.mjs';
45
+ import './simple-config.mjs';
45
46
 
47
+ async function syncClavueProviderStateIfNeeded(codeTool, activeProfileId) {
48
+ if (codeTool !== "clavue") {
49
+ return;
50
+ }
51
+ const { syncMyclaudeProviderProfilesFromClaudeConfig } = await import('./config.mjs').then(function (n) { return n.H; });
52
+ const config = ClaudeCodeConfigManager.readConfig();
53
+ syncMyclaudeProviderProfilesFromClaudeConfig(
54
+ activeProfileId === void 0 || !config ? config : { ...config, currentProfileId: activeProfileId }
55
+ );
56
+ }
46
57
  function getCurrentCodeTool() {
47
58
  const config = readZcfConfig();
48
59
  if (config?.codeToolType && isCodeToolType(config.codeToolType)) {
@@ -85,9 +96,10 @@ async function showApiConfigMenu(title, options) {
85
96
  }
86
97
  }
87
98
  async function handleOfficialLogin(codeTool, isZh) {
88
- if (codeTool === "claude-code" || codeTool === "myclaude") {
99
+ if (codeTool === "claude-code" || codeTool === "clavue") {
89
100
  const result = await ClaudeCodeConfigManager.switchToOfficial();
90
101
  if (result.success) {
102
+ await syncClavueProviderStateIfNeeded(codeTool, "");
91
103
  console.log("");
92
104
  console.log(a.green(isZh ? "\u2705 \u5DF2\u5207\u6362\u5230\u5B98\u65B9\u767B\u5F55" : "\u2705 Switched to official login"));
93
105
  console.log("");
@@ -108,7 +120,7 @@ async function handleOfficialLogin(codeTool, isZh) {
108
120
  async function handleCustomConfig(_isZh, context) {
109
121
  try {
110
122
  const codeTool = getCurrentCodeTool();
111
- if ((codeTool === "claude-code" || codeTool === "myclaude") && context === "init") {
123
+ if ((codeTool === "claude-code" || codeTool === "clavue") && context === "init") {
112
124
  const { addProfileDirect } = await import('./claude-code-incremental-manager.mjs');
113
125
  await addProfileDirect();
114
126
  } else {
@@ -120,9 +132,10 @@ async function handleCustomConfig(_isZh, context) {
120
132
  }
121
133
  }
122
134
  async function handleCcrProxy(codeTool, isZh) {
123
- if (codeTool === "claude-code" || codeTool === "myclaude") {
135
+ if (codeTool === "claude-code" || codeTool === "clavue") {
124
136
  const result = await ClaudeCodeConfigManager.switchToCcr();
125
137
  if (result.success) {
138
+ await syncClavueProviderStateIfNeeded(codeTool, "ccr-proxy");
126
139
  console.log("");
127
140
  console.log(a.green(isZh ? "\u2705 \u5DF2\u5207\u6362\u5230 CCR \u4EE3\u7406" : "\u2705 Switched to CCR proxy"));
128
141
  console.log("");
@@ -6,11 +6,26 @@ import 'node:process';
6
6
  import 'node:url';
7
7
  import '../shared/ccjk.bQ7Dh1g4.mjs';
8
8
 
9
+ function normalizeProviderPreset(provider) {
10
+ if (provider.claudeCode && provider.supportedCodeTools.includes("claude-code") && !provider.supportedCodeTools.includes("clavue")) {
11
+ return {
12
+ ...provider,
13
+ supportedCodeTools: [...provider.supportedCodeTools, "clavue"]
14
+ };
15
+ }
16
+ return provider;
17
+ }
18
+ function supportsCodeTool(provider, codeToolType) {
19
+ if (provider.supportedCodeTools.includes(codeToolType)) {
20
+ return true;
21
+ }
22
+ return codeToolType === "clavue" && Boolean(provider.claudeCode) && provider.supportedCodeTools.includes("claude-code");
23
+ }
9
24
  const LOCAL_PROVIDER_PRESETS = [
10
25
  {
11
26
  id: "glm",
12
27
  name: "GLM",
13
- supportedCodeTools: ["claude-code", "codex"],
28
+ supportedCodeTools: ["claude-code", "clavue", "codex"],
14
29
  claudeCode: {
15
30
  baseUrl: "https://open.bigmodel.cn/api/anthropic",
16
31
  authType: "auth_token"
@@ -25,7 +40,7 @@ const LOCAL_PROVIDER_PRESETS = [
25
40
  {
26
41
  id: "minimax",
27
42
  name: "MiniMax",
28
- supportedCodeTools: ["claude-code", "codex"],
43
+ supportedCodeTools: ["claude-code", "clavue", "codex"],
29
44
  claudeCode: {
30
45
  baseUrl: "https://api.minimaxi.com/anthropic",
31
46
  authType: "auth_token",
@@ -41,7 +56,7 @@ const LOCAL_PROVIDER_PRESETS = [
41
56
  {
42
57
  id: "kimi",
43
58
  name: "Kimi",
44
- supportedCodeTools: ["claude-code", "codex"],
59
+ supportedCodeTools: ["claude-code", "clavue", "codex"],
45
60
  claudeCode: {
46
61
  baseUrl: "https://api.kimi.com/coding/",
47
62
  authType: "auth_token"
@@ -61,7 +76,7 @@ async function fetchCloudProviders(codeType) {
61
76
  try {
62
77
  const url = new URL(`${CCJK_CLOUD_API_URL}/providers`);
63
78
  if (codeType) {
64
- url.searchParams.set("codeType", codeType);
79
+ url.searchParams.set("codeType", codeType === "clavue" ? "claude-code" : codeType);
65
80
  }
66
81
  const response = await fetch(url.toString(), {
67
82
  method: "GET",
@@ -76,7 +91,7 @@ async function fetchCloudProviders(codeType) {
76
91
  }
77
92
  const result = await response.json();
78
93
  if (result.success && Array.isArray(result.data)) {
79
- return result.data.map((p) => ({ ...p, isCloud: true }));
94
+ return result.data.map((p) => normalizeProviderPreset({ ...p, isCloud: true }));
80
95
  }
81
96
  return [];
82
97
  } catch {
@@ -88,7 +103,7 @@ async function getApiProvidersAsync(codeToolType) {
88
103
  if (cloudProvidersCache && now - cloudProvidersCacheTime < CACHE_TTL) {
89
104
  const providers = cloudProvidersCache;
90
105
  if (codeToolType) {
91
- return providers.filter((p) => p.supportedCodeTools.includes(codeToolType));
106
+ return providers.filter((p) => supportsCodeTool(p, codeToolType));
92
107
  }
93
108
  return providers;
94
109
  }
@@ -99,15 +114,15 @@ async function getApiProvidersAsync(codeToolType) {
99
114
  return cloudProviders;
100
115
  }
101
116
  if (codeToolType) {
102
- return LOCAL_PROVIDER_PRESETS.filter((p) => p.supportedCodeTools.includes(codeToolType));
117
+ return LOCAL_PROVIDER_PRESETS.filter((p) => supportsCodeTool(p, codeToolType));
103
118
  }
104
119
  return LOCAL_PROVIDER_PRESETS;
105
120
  }
106
121
  function getApiProviders(codeToolType) {
107
122
  if (cloudProvidersCache) {
108
- return cloudProvidersCache.filter((p) => p.supportedCodeTools.includes(codeToolType));
123
+ return cloudProvidersCache.filter((p) => supportsCodeTool(p, codeToolType));
109
124
  }
110
- return LOCAL_PROVIDER_PRESETS.filter((p) => p.supportedCodeTools.includes(codeToolType));
125
+ return LOCAL_PROVIDER_PRESETS.filter((p) => supportsCodeTool(p, codeToolType));
111
126
  }
112
127
  function getProviderPreset(providerId) {
113
128
  if (cloudProvidersCache) {
@@ -297,11 +297,11 @@ async function updateMyclaude(force = false, skipPrompt = false) {
297
297
  const { installed, currentVersion, latestVersion, needsUpdate } = await checkMyclaudeVersion();
298
298
  spinner.stop();
299
299
  if (!installed) {
300
- console.log(a.yellow("myclaude is not installed"));
300
+ console.log(a.yellow("Clavue is not installed"));
301
301
  return false;
302
302
  }
303
303
  if (!needsUpdate && !force) {
304
- console.log(a.green(`myclaude is up to date (v${currentVersion || ""})`));
304
+ console.log(a.green(`Clavue is up to date (v${currentVersion || ""})`));
305
305
  return true;
306
306
  }
307
307
  if (!latestVersion) {
@@ -312,7 +312,7 @@ async function updateMyclaude(force = false, skipPrompt = false) {
312
312
  console.log(a.green(format(i18n.t("updater:latestVersion"), { version: latestVersion })));
313
313
  if (!skipPrompt) {
314
314
  const confirm = await promptBoolean({
315
- message: format(i18n.t("updater:confirmUpdate"), { tool: "myclaude" }),
315
+ message: format(i18n.t("updater:confirmUpdate"), { tool: "clavue" }),
316
316
  defaultValue: true
317
317
  });
318
318
  if (!confirm) {
@@ -320,19 +320,19 @@ async function updateMyclaude(force = false, skipPrompt = false) {
320
320
  return true;
321
321
  }
322
322
  } else {
323
- console.log(a.green(format(i18n.t("updater:autoUpdating"), { tool: "myclaude" })));
323
+ console.log(a.green(format(i18n.t("updater:autoUpdating"), { tool: "clavue" })));
324
324
  }
325
- const updateSpinner = ora(format(i18n.t("updater:updating"), { tool: "myclaude" })).start();
325
+ const updateSpinner = ora(format(i18n.t("updater:updating"), { tool: "clavue" })).start();
326
326
  try {
327
- await execWithSudoIfNeeded("npm", ["update", "-g", "myclaude-code"]);
328
- const installResult = await q("myclaude", ["install", "--force"]);
327
+ await execWithSudoIfNeeded("npm", ["update", "-g", "clavue"]);
328
+ const installResult = await q("clavue", ["install", "--force"]);
329
329
  if (installResult.exitCode !== 0) {
330
330
  throw new Error(installResult.stderr || `Command failed with exit code ${installResult.exitCode}`);
331
331
  }
332
- updateSpinner.succeed(format(i18n.t("updater:updateSuccess"), { tool: "myclaude" }));
332
+ updateSpinner.succeed(format(i18n.t("updater:updateSuccess"), { tool: "clavue" }));
333
333
  return true;
334
334
  } catch (error) {
335
- updateSpinner.fail(format(i18n.t("updater:updateFailed"), { tool: "myclaude" }));
335
+ updateSpinner.fail(format(i18n.t("updater:updateFailed"), { tool: "clavue" }));
336
336
  console.error(a.red(error instanceof Error ? error.message : String(error)));
337
337
  return false;
338
338
  }
@@ -423,14 +423,14 @@ async function checkAndUpdateMyclaudeTools(skipPrompt = false) {
423
423
  const results = [];
424
424
  let ccjkUpdated = false;
425
425
  let ccjkResult = null;
426
- console.log(a.bold("\u2728 myclaude"));
426
+ console.log(a.bold("\u2728 Clavue"));
427
427
  try {
428
428
  const success = await updateMyclaude(false, skipPrompt);
429
- results.push({ tool: "myclaude", success });
429
+ results.push({ tool: "clavue", success });
430
430
  } catch (error) {
431
431
  const errorMessage = error instanceof Error ? error.message : String(error);
432
- console.error(a.red(`\u274C ${format(i18n.t("updater:updateFailed"), { tool: "myclaude" })}: ${errorMessage}`));
433
- results.push({ tool: "myclaude", success: false, error: errorMessage });
432
+ console.error(a.red(`\u274C ${format(i18n.t("updater:updateFailed"), { tool: "clavue" })}: ${errorMessage}`));
433
+ results.push({ tool: "clavue", success: false, error: errorMessage });
434
434
  }
435
435
  console.log();
436
436
  console.log(a.bold("\u{1F4E6} CCJK"));
@@ -3,7 +3,7 @@ import { existsSync, readFileSync } from 'node:fs';
3
3
  import process__default from 'node:process';
4
4
  import { SETTINGS_FILE } from './constants.mjs';
5
5
  import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
6
- import { r as runHealthCheck } from '../shared/ccjk.D6wx-rxT.mjs';
6
+ import { r as runHealthCheck } from '../shared/ccjk.Dxgd2vjc.mjs';
7
7
  import '../shared/ccjk.BAGoDD49.mjs';
8
8
  import 'node:os';
9
9
  import './index2.mjs';
@@ -38,16 +38,16 @@ import 'string_decoder';
38
38
  import 'node:child_process';
39
39
  import './config.mjs';
40
40
  import '../shared/ccjk.RyizuzOI.mjs';
41
- import './json-config.mjs';
41
+ import './ccjk-config.mjs';
42
+ import './index3.mjs';
42
43
  import './fs-operations.mjs';
43
44
  import 'node:fs/promises';
45
+ import './json-config.mjs';
46
+ import '../shared/ccjk.Ccrqt7u2.mjs';
44
47
  import './platform.mjs';
45
48
  import './main.mjs';
46
49
  import 'module';
47
50
  import 'node:stream';
48
- import '../shared/ccjk.DScm_NnL.mjs';
49
- import './ccjk-config.mjs';
50
- import './index3.mjs';
51
51
  import '../shared/ccjk.DsYaCCx4.mjs';
52
52
 
53
53
  const packageJson = JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8"));
@@ -69,6 +69,50 @@ function createDefaultTomlConfig(preferredLang = "en", claudeCodeInstallType = "
69
69
  },
70
70
  storage: {
71
71
  memory: {}
72
+ },
73
+ adaptation: {
74
+ runtimeProfile: {
75
+ target: DEFAULT_CODE_TOOL_TYPE,
76
+ distribution: "clavue",
77
+ compatMode: "native" ,
78
+ providerStrategy: "profile-based"
79
+ },
80
+ archetypeProfile: {
81
+ id: "pc-dev",
82
+ name: "PC Software Development",
83
+ goal: "Build, debug, test, and ship software efficiently"
84
+ },
85
+ capabilityProfile: {
86
+ coding: true,
87
+ planning: true,
88
+ taskTracking: true,
89
+ memory: true,
90
+ browserAutomation: false,
91
+ research: true,
92
+ documentAuthoring: false,
93
+ serviceOps: false,
94
+ multiAgent: true
95
+ },
96
+ policyProfile: {
97
+ permissionPreset: "dev",
98
+ verificationMode: "required",
99
+ destructiveActionPolicy: "confirm",
100
+ workflowFallbackMode: "graceful"
101
+ },
102
+ contextProfile: {
103
+ memoryMode: "project-aware",
104
+ compressionMode: "runtime-native",
105
+ instructionLayering: "runtime-first"
106
+ },
107
+ profileSelection: {
108
+ workflowPack: "desktop-engineering",
109
+ toolPack: "typescript-node-react"
110
+ },
111
+ uiProfile: {
112
+ language: preferredLang,
113
+ outputStyle: "concise",
114
+ operatorMode: "execution-first"
115
+ }
72
116
  }
73
117
  };
74
118
  }
@@ -99,7 +143,8 @@ function migrateFromJsonConfig(jsonConfig) {
99
143
  },
100
144
  storage: {
101
145
  memory: {}
102
- }
146
+ },
147
+ adaptation: defaultConfig.adaptation
103
148
  };
104
149
  return tomlConfig;
105
150
  }
@@ -127,6 +172,38 @@ function updateTomlConfig(configPath, updates) {
127
172
  ...existingConfig.storage?.memory || {},
128
173
  ...updates.storage?.memory || {}
129
174
  }
175
+ },
176
+ adaptation: {
177
+ ...existingConfig.adaptation,
178
+ ...updates.adaptation,
179
+ runtimeProfile: updates.adaptation?.runtimeProfile ? {
180
+ ...existingConfig.adaptation?.runtimeProfile,
181
+ ...updates.adaptation.runtimeProfile
182
+ } : existingConfig.adaptation?.runtimeProfile,
183
+ archetypeProfile: updates.adaptation?.archetypeProfile ? {
184
+ ...existingConfig.adaptation?.archetypeProfile,
185
+ ...updates.adaptation.archetypeProfile
186
+ } : existingConfig.adaptation?.archetypeProfile,
187
+ capabilityProfile: updates.adaptation?.capabilityProfile ? {
188
+ ...existingConfig.adaptation?.capabilityProfile,
189
+ ...updates.adaptation.capabilityProfile
190
+ } : existingConfig.adaptation?.capabilityProfile,
191
+ policyProfile: updates.adaptation?.policyProfile ? {
192
+ ...existingConfig.adaptation?.policyProfile,
193
+ ...updates.adaptation.policyProfile
194
+ } : existingConfig.adaptation?.policyProfile,
195
+ contextProfile: updates.adaptation?.contextProfile ? {
196
+ ...existingConfig.adaptation?.contextProfile,
197
+ ...updates.adaptation.contextProfile
198
+ } : existingConfig.adaptation?.contextProfile,
199
+ profileSelection: updates.adaptation?.profileSelection ? {
200
+ ...existingConfig.adaptation?.profileSelection,
201
+ ...updates.adaptation.profileSelection
202
+ } : existingConfig.adaptation?.profileSelection,
203
+ uiProfile: updates.adaptation?.uiProfile ? {
204
+ ...existingConfig.adaptation?.uiProfile,
205
+ ...updates.adaptation.uiProfile
206
+ } : existingConfig.adaptation?.uiProfile
130
207
  }
131
208
  };
132
209
  writeTomlConfig(configPath, updatedConfig);
@@ -28,12 +28,12 @@ import 'buffer';
28
28
  import 'string_decoder';
29
29
  import 'node:url';
30
30
  import '../shared/ccjk.RyizuzOI.mjs';
31
- import './json-config.mjs';
32
- import './fs-operations.mjs';
33
- import 'node:fs/promises';
34
- import '../shared/ccjk.DScm_NnL.mjs';
35
31
  import './ccjk-config.mjs';
36
32
  import './index3.mjs';
33
+ import './fs-operations.mjs';
34
+ import 'node:fs/promises';
35
+ import './json-config.mjs';
36
+ import '../shared/ccjk.Ccrqt7u2.mjs';
37
37
  import './main.mjs';
38
38
  import 'module';
39
39
  import 'node:child_process';
@@ -35,16 +35,16 @@ import 'buffer';
35
35
  import 'string_decoder';
36
36
  import 'node:child_process';
37
37
  import './config.mjs';
38
- import './json-config.mjs';
38
+ import './ccjk-config.mjs';
39
+ import './index3.mjs';
39
40
  import './fs-operations.mjs';
40
41
  import 'node:fs/promises';
42
+ import './json-config.mjs';
43
+ import '../shared/ccjk.Ccrqt7u2.mjs';
41
44
  import './platform.mjs';
42
45
  import './main.mjs';
43
46
  import 'module';
44
47
  import 'node:stream';
45
- import '../shared/ccjk.DScm_NnL.mjs';
46
- import './ccjk-config.mjs';
47
- import './index3.mjs';
48
48
  import '../shared/ccjk.DsYaCCx4.mjs';
49
49
 
50
50
  async function createBackup(operation, options = {}) {
@@ -27,18 +27,18 @@ import 'node:crypto';
27
27
  import 'buffer';
28
28
  import 'string_decoder';
29
29
  import './constants.mjs';
30
- import './json-config.mjs';
30
+ import './ccjk-config.mjs';
31
+ import '../shared/ccjk.BBtCGd_g.mjs';
32
+ import './index3.mjs';
31
33
  import './fs-operations.mjs';
32
34
  import 'node:fs/promises';
35
+ import './json-config.mjs';
36
+ import '../shared/ccjk.Ccrqt7u2.mjs';
33
37
  import './platform.mjs';
34
38
  import './main.mjs';
35
39
  import 'module';
36
40
  import 'node:child_process';
37
41
  import 'node:stream';
38
- import '../shared/ccjk.DScm_NnL.mjs';
39
- import './ccjk-config.mjs';
40
- import '../shared/ccjk.BBtCGd_g.mjs';
41
- import './index3.mjs';
42
42
  import './codex.mjs';
43
43
  import './index8.mjs';
44
44
  import '../shared/ccjk.DeWpAShp.mjs';
@@ -49,8 +49,9 @@ import '../shared/ccjk.DZ2LLOa-.mjs';
49
49
  import '../shared/ccjk.DKXs7Fbm.mjs';
50
50
  import './code-type-resolver.mjs';
51
51
  import './features.mjs';
52
- import '../shared/ccjk.Dh6Be-ef.mjs';
52
+ import '../shared/ccjk.ygJzcD-n.mjs';
53
53
  import '../shared/ccjk.BI-hdI7P.mjs';
54
+ import './simple-config.mjs';
54
55
  import '../shared/ccjk.DbigonEQ.mjs';
55
56
  import 'node:stream/promises';
56
57
  import 'tar';
@@ -60,9 +61,8 @@ import './init.mjs';
60
61
  import './config2.mjs';
61
62
  import './auto-updater.mjs';
62
63
  import './version-checker.mjs';
63
- import '../shared/ccjk.DDq2hqA5.mjs';
64
+ import '../shared/ccjk.MpkxXQJL.mjs';
64
65
  import './installer.mjs';
65
- import '../shared/ccjk.BJENIVf7.mjs';
66
66
  import '../shared/ccjk.Bq8TqZG_.mjs';
67
67
  import './commands.mjs';
68
68
  import './check-updates.mjs';
@@ -71,8 +71,8 @@ import './doctor.mjs';
71
71
  import './api-providers.mjs';
72
72
  import '../shared/ccjk.SPoXMvZD.mjs';
73
73
  import '../shared/ccjk.J8YiPsOw.mjs';
74
- import '../shared/ccjk.CVjfbEIj.mjs';
75
- import '../shared/ccjk.B6VCKdyy.mjs';
74
+ import '../shared/ccjk.DZtwozOG.mjs';
75
+ import '../shared/ccjk.BXTrU9TN.mjs';
76
76
  import './notification.mjs';
77
77
  import '../shared/ccjk.BBizCO6_.mjs';
78
78
  import '../shared/ccjk.D0g2ABGg.mjs';
@@ -82,7 +82,7 @@ import './uninstall.mjs';
82
82
  import '../shared/ccjk.D75wivnp.mjs';
83
83
  import 'globby';
84
84
  import './update.mjs';
85
- import '../shared/ccjk.BO45TPXJ.mjs';
85
+ import '../shared/ccjk.K8c6VnM2.mjs';
86
86
 
87
87
  async function ccr(options = {}) {
88
88
  try {
@@ -42,7 +42,7 @@ import '../shared/ccjk.DZ2LLOa-.mjs';
42
42
  import './version-checker.mjs';
43
43
  import '../shared/ccjk.CxpGa6MC.mjs';
44
44
  import './config.mjs';
45
- import '../shared/ccjk.DScm_NnL.mjs';
45
+ import '../shared/ccjk.Ccrqt7u2.mjs';
46
46
  import '../shared/ccjk.BFQ7yr5S.mjs';
47
47
  import './prompts.mjs';
48
48
  import '../shared/ccjk.gDEDGD_t.mjs';
@@ -60,7 +60,7 @@ class ToolUpdateScheduler {
60
60
  case "claude-code":
61
61
  await this.updateClaudeCodeTools(skipPrompt);
62
62
  break;
63
- case "myclaude":
63
+ case "clavue":
64
64
  await this.updateMyclaudeTools(skipPrompt);
65
65
  break;
66
66
  case "codex":
@@ -78,7 +78,7 @@ class ToolUpdateScheduler {
78
78
  await checkAndUpdateTools(skipPrompt);
79
79
  }
80
80
  /**
81
- * Update myclaude related tools
81
+ * Update Clavue related tools
82
82
  * @param skipPrompt - Whether to skip interactive prompts
83
83
  */
84
84
  async updateMyclaudeTools(skipPrompt) {
@@ -5,7 +5,7 @@ import { C as ClaudeCodeConfigManager } from './config.mjs';
5
5
  import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
6
6
  import { readZcfConfig } from './ccjk-config.mjs';
7
7
  import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
8
- import { v as validateApiKey } from '../shared/ccjk.Dh6Be-ef.mjs';
8
+ import { v as validateApiKey } from '../shared/ccjk.ygJzcD-n.mjs';
9
9
  import '../shared/ccjk.BAGoDD49.mjs';
10
10
  import 'node:readline';
11
11
  import 'stream';
@@ -27,15 +27,15 @@ import 'node:url';
27
27
  import '../shared/ccjk.bQ7Dh1g4.mjs';
28
28
  import '../shared/ccjk.RyizuzOI.mjs';
29
29
  import './constants.mjs';
30
- import './json-config.mjs';
31
30
  import './fs-operations.mjs';
32
31
  import 'node:fs/promises';
32
+ import './json-config.mjs';
33
+ import '../shared/ccjk.Ccrqt7u2.mjs';
33
34
  import './platform.mjs';
34
35
  import './main.mjs';
35
36
  import 'module';
36
37
  import 'node:child_process';
37
38
  import 'node:stream';
38
- import '../shared/ccjk.DScm_NnL.mjs';
39
39
  import '../shared/ccjk.BBtCGd_g.mjs';
40
40
  import './index3.mjs';
41
41
  import '../shared/ccjk.DeWpAShp.mjs';
@@ -55,14 +55,16 @@ function getAuthTypeLabel(authType) {
55
55
  }
56
56
  async function syncMyclaudeProfilesIfNeeded() {
57
57
  const zcfConfig = readZcfConfig();
58
- if (zcfConfig?.codeToolType !== "myclaude") {
58
+ if (zcfConfig?.codeToolType !== "clavue") {
59
59
  return;
60
60
  }
61
- const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.F; });
61
+ const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.H; });
62
62
  syncMyclaudeProviderProfilesFromCurrentClaudeConfig();
63
63
  }
64
64
  async function configureIncrementalManagement() {
65
65
  ensureI18nInitialized();
66
+ const zcfConfig = readZcfConfig();
67
+ const runtimeLabel = zcfConfig?.codeToolType === "clavue" ? "Clavue" : "Claude Code";
66
68
  const config = ClaudeCodeConfigManager.readConfig();
67
69
  if (!config || !config.profiles || Object.keys(config.profiles).length === 0) {
68
70
  await handleAddProfile();
@@ -71,7 +73,7 @@ async function configureIncrementalManagement() {
71
73
  }
72
74
  const profiles = Object.values(config.profiles);
73
75
  const currentProfile = config.currentProfileId ? config.profiles[config.currentProfileId] : null;
74
- console.log(a.green(i18n.t("multi-config:incrementalManagementTitle")));
76
+ console.log(a.green(i18n.t("multi-config:incrementalManagementTitle", { runtime: runtimeLabel })));
75
77
  console.log(a.gray(i18n.t("multi-config:currentProfileCount", { count: profiles.length })));
76
78
  if (currentProfile) {
77
79
  console.log(a.gray(i18n.t("multi-config:currentDefaultProfile", { profile: currentProfile.name })));
@@ -0,0 +1,73 @@
1
+ import { SETTINGS_FILE, CLAUDE_DIR } from './constants.mjs';
2
+ import { exists, ensureDir } from './fs-operations.mjs';
3
+ import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
4
+ import { l as deepMerge } from './config.mjs';
5
+ import 'node:os';
6
+ import './index2.mjs';
7
+ import 'node:fs';
8
+ import 'node:process';
9
+ import 'node:url';
10
+ import '../shared/ccjk.bQ7Dh1g4.mjs';
11
+ import 'node:crypto';
12
+ import 'node:fs/promises';
13
+ import '../shared/ccjk.RyizuzOI.mjs';
14
+ import '../shared/ccjk.BAGoDD49.mjs';
15
+ import './index5.mjs';
16
+ import './index6.mjs';
17
+ import 'node:readline';
18
+ import 'stream';
19
+ import 'node:tty';
20
+ import 'node:async_hooks';
21
+ import '../shared/ccjk.Cjgrln_h.mjs';
22
+ import 'node:util';
23
+ import 'tty';
24
+ import 'fs';
25
+ import 'child_process';
26
+ import 'node:path';
27
+ import 'buffer';
28
+ import 'string_decoder';
29
+ import './ccjk-config.mjs';
30
+ import '../shared/ccjk.BBtCGd_g.mjs';
31
+ import './index3.mjs';
32
+ import '../shared/ccjk.Ccrqt7u2.mjs';
33
+ import './platform.mjs';
34
+ import './main.mjs';
35
+ import 'module';
36
+ import 'node:child_process';
37
+ import 'node:stream';
38
+
39
+ function readClaudeConfig(configPath = SETTINGS_FILE) {
40
+ try {
41
+ if (!exists(configPath)) {
42
+ return null;
43
+ }
44
+ return readJsonConfig(configPath) || null;
45
+ } catch (error) {
46
+ console.error(`Failed to read Claude config from ${configPath}:`, error);
47
+ return null;
48
+ }
49
+ }
50
+ function writeClaudeConfig(config, options = {}, configPath = SETTINGS_FILE) {
51
+ try {
52
+ ensureDir(CLAUDE_DIR);
53
+ writeJsonConfig(configPath, config, {
54
+ atomic: options.atomic !== false,
55
+ pretty: true,
56
+ backup: options.backup
57
+ });
58
+ } catch (error) {
59
+ console.error(`Failed to write Claude config to ${configPath}:`, error);
60
+ throw new Error(`Failed to write Claude config: ${error instanceof Error ? error.message : String(error)}`);
61
+ }
62
+ }
63
+ function updateClaudeConfig(updates, options = {}, configPath = SETTINGS_FILE) {
64
+ const existingConfig = readClaudeConfig(configPath) || {};
65
+ const mergedConfig = deepMerge(existingConfig, updates, {
66
+ mergeArrays: options.merge === "preserve",
67
+ arrayMergeStrategy: "unique"
68
+ });
69
+ writeClaudeConfig(mergedConfig, options, configPath);
70
+ return mergedConfig;
71
+ }
72
+
73
+ export { readClaudeConfig, updateClaudeConfig, writeClaudeConfig };
@@ -1,7 +1,7 @@
1
1
  import process__default from 'node:process';
2
2
  import { exec as q } from './main.mjs';
3
3
  import { i18n, initI18n } from './index2.mjs';
4
- import { k as findRealCommandPath } from './platform.mjs';
4
+ import { l as findRealCommandPath } from './platform.mjs';
5
5
  import 'module';
6
6
  import 'node:child_process';
7
7
  import 'node:path';