ccjk 14.1.6 → 14.1.8

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 (95) hide show
  1. package/bin/ccjk.mjs +3 -2
  2. package/bin/ccjk.ts +104 -104
  3. package/dist/chunks/agent-teams.mjs +15 -8
  4. package/dist/chunks/agent.mjs +2 -2
  5. package/dist/chunks/api-cli.mjs +3 -3
  6. package/dist/chunks/api-config-selector.mjs +6 -6
  7. package/dist/chunks/auto-updater.mjs +4 -4
  8. package/dist/chunks/boost.mjs +1 -1
  9. package/dist/chunks/brain-config.mjs +1 -1
  10. package/dist/chunks/brain-status.mjs +13 -7
  11. package/dist/chunks/ccjk-all.mjs +4 -4
  12. package/dist/chunks/ccjk-config.mjs +15 -6
  13. package/dist/chunks/ccjk-mcp.mjs +4 -4
  14. package/dist/chunks/ccjk-setup.mjs +2 -2
  15. package/dist/chunks/ccjk-skills.mjs +1 -1
  16. package/dist/chunks/ccr.mjs +17 -13
  17. package/dist/chunks/check-updates.mjs +2 -3
  18. package/dist/chunks/claude-code-incremental-manager.mjs +13 -15
  19. package/dist/chunks/claude-config.mjs +10 -9
  20. package/dist/chunks/code-type-resolver.mjs +3 -5
  21. package/dist/chunks/codex-config-switch.mjs +4 -5
  22. package/dist/chunks/codex-provider-manager.mjs +3 -3
  23. package/dist/chunks/codex.mjs +102 -34
  24. package/dist/chunks/completion.mjs +4 -3
  25. package/dist/chunks/config-switch.mjs +9 -6
  26. package/dist/chunks/config.mjs +582 -27
  27. package/dist/chunks/config2.mjs +5 -4
  28. package/dist/chunks/config3.mjs +42 -30
  29. package/dist/chunks/constants.mjs +6 -2
  30. package/dist/chunks/context.mjs +2 -2
  31. package/dist/chunks/doctor.mjs +237 -71
  32. package/dist/chunks/evolution.mjs +10 -6
  33. package/dist/chunks/features.mjs +34 -19
  34. package/dist/chunks/index10.mjs +8 -7
  35. package/dist/chunks/init.mjs +491 -547
  36. package/dist/chunks/installer.mjs +3 -7
  37. package/dist/chunks/mcp-cli.mjs +9 -10
  38. package/dist/chunks/mcp.mjs +23 -19
  39. package/dist/chunks/memory-check.mjs +2 -2
  40. package/dist/chunks/memory-paths.mjs +1 -1
  41. package/dist/chunks/memory-sync.mjs +2 -2
  42. package/dist/chunks/memory.mjs +7 -7
  43. package/dist/chunks/notification.mjs +1 -1
  44. package/dist/chunks/package.mjs +1 -1
  45. package/dist/chunks/permission-manager.mjs +132 -14
  46. package/dist/chunks/permissions.mjs +1 -1
  47. package/dist/chunks/platform.mjs +1 -1
  48. package/dist/chunks/powershell.mjs +1 -1
  49. package/dist/chunks/providers.mjs +5 -2
  50. package/dist/chunks/quick-provider.mjs +82 -13
  51. package/dist/chunks/quick-setup.mjs +9 -6
  52. package/dist/chunks/remote.mjs +1 -1
  53. package/dist/chunks/research.mjs +118 -118
  54. package/dist/chunks/rollback.mjs +38 -0
  55. package/dist/chunks/simple-config.mjs +17 -3
  56. package/dist/chunks/skill2.mjs +129 -80
  57. package/dist/chunks/skills-sync.mjs +1 -1
  58. package/dist/chunks/slash-commands.mjs +1 -1
  59. package/dist/chunks/smart-guide.mjs +1 -1
  60. package/dist/chunks/snapshot.mjs +58 -0
  61. package/dist/chunks/status.mjs +1 -1
  62. package/dist/chunks/uninstall.mjs +1 -1
  63. package/dist/chunks/update.mjs +13 -12
  64. package/dist/chunks/zero-config.mjs +432 -44
  65. package/dist/cli.mjs +139 -37
  66. package/dist/index.d.mts +31 -7
  67. package/dist/index.d.ts +31 -7
  68. package/dist/index.mjs +10 -10
  69. package/dist/shared/ccjk.B2U7DsPy.mjs +31 -0
  70. package/dist/shared/{ccjk.MpkxXQJL.mjs → ccjk.B8oqkakg.mjs} +5 -160
  71. package/dist/shared/{ccjk.DZtwozOG.mjs → ccjk.B9OuS4xZ.mjs} +3 -3
  72. package/dist/shared/ccjk.BEiR3L4C.mjs +254 -0
  73. package/dist/shared/{ccjk.ygJzcD-n.mjs → ccjk.BJ3Zpjo5.mjs} +5 -220
  74. package/dist/shared/ccjk.BzPbSEP2.mjs +115 -0
  75. package/dist/shared/ccjk.BzxpiEPF.mjs +225 -0
  76. package/dist/shared/{ccjk.BI-hdI7P.mjs → ccjk.CbWVbtb9.mjs} +1 -1
  77. package/dist/shared/ccjk.DFRPtmK_.mjs +75 -0
  78. package/dist/shared/{ccjk.UhjQ1seV.mjs → ccjk.DMV3x5Sd.mjs} +1 -1
  79. package/dist/shared/ccjk.Di1IYU3u.mjs +63 -0
  80. package/dist/shared/{ccjk.SPoXMvZD.mjs → ccjk.DsZsc4LR.mjs} +52 -14
  81. package/dist/shared/{ccjk.DQXk596F.mjs → ccjk.DuzJZlgj.mjs} +107 -103
  82. package/dist/shared/ccjk.Hwoicrh8.mjs +170 -0
  83. package/dist/shared/{ccjk.DTdjs-qK.mjs → ccjk.MwtjAULc.mjs} +1 -1
  84. package/dist/shared/{ccjk.DsYaCCx4.mjs → ccjk.i_vn-9C3.mjs} +2 -2
  85. package/dist/shared/{ccjk.K8c6VnM2.mjs → ccjk.lG3ccFjm.mjs} +79 -1
  86. package/dist/shared/{ccjk.BXTrU9TN.mjs → ccjk.tI_s2uSh.mjs} +11 -7
  87. package/dist/templates/claude-code/common/settings.json +4 -1
  88. package/package.json +5 -5
  89. package/templates/claude-code/common/settings.json +4 -1
  90. package/templates/common/workflow/essential/en/goal.md +147 -0
  91. package/templates/common/workflow/essential/zh-CN/goal.md +146 -0
  92. package/dist/shared/ccjk.Ccrqt7u2.mjs +0 -99
  93. package/dist/shared/ccjk.DKXs7Fbm.mjs +0 -361
  94. package/dist/shared/{ccjk.BBizCO6_.mjs → ccjk.DcMvE7lf.mjs} +1 -1
  95. package/dist/shared/{ccjk.Dhu8ia5S.mjs → ccjk.zFGcZT7Y.mjs} +1 -1
package/bin/ccjk.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  // Suppress i18next promotional message
3
- process.env.I18NEXT_SUPPRESS_WARNING = '1'
4
- import '../dist/cli.mjs'
3
+ import '../dist/cli.mjs';
4
+
5
+ process.env.I18NEXT_SUPPRESS_WARNING = '1';
package/bin/ccjk.ts CHANGED
@@ -4,185 +4,185 @@
4
4
  * CLI tool for managing code tools
5
5
  */
6
6
 
7
- import { createTool, getRegistry } from '../src/index'
7
+ import { createTool, getRegistry } from '../src/index';
8
8
 
9
- const args = process.argv.slice(2)
10
- const command = args[0]
9
+ const args = process.argv.slice(2);
10
+ const command = args[0];
11
11
 
12
12
  async function main() {
13
13
  switch (command) {
14
14
  case 'list':
15
- await listTools()
16
- break
15
+ await listTools();
16
+ break;
17
17
  case 'info':
18
- await showToolInfo(args[1])
19
- break
18
+ await showToolInfo(args[1]);
19
+ break;
20
20
  case 'check':
21
- await checkInstallation(args[1])
22
- break
21
+ await checkInstallation(args[1]);
22
+ break;
23
23
  case 'install':
24
- await installTool(args[1])
25
- break
24
+ await installTool(args[1]);
25
+ break;
26
26
  case 'configure':
27
- await configureTool(args[1])
28
- break
27
+ await configureTool(args[1]);
28
+ break;
29
29
  case 'help':
30
30
  default:
31
- showHelp()
32
- break
31
+ showHelp();
32
+ break;
33
33
  }
34
34
  }
35
35
 
36
36
  async function listTools() {
37
- console.log('Available tools:\n')
38
- const registry = getRegistry()
39
- const metadata = await registry.getAllMetadata()
37
+ console.log('Available tools:\n');
38
+ const registry = getRegistry();
39
+ const metadata = await registry.getAllMetadata();
40
40
 
41
41
  for (const meta of metadata) {
42
- console.log(` ${meta.displayName} (${meta.name})`)
43
- console.log(` ${meta.description}`)
44
- console.log(` Homepage: ${meta.homepage || 'N/A'}`)
45
- console.log('')
42
+ console.log(` ${meta.displayName} (${meta.name})`);
43
+ console.log(` ${meta.description}`);
44
+ console.log(` Homepage: ${meta.homepage || 'N/A'}`);
45
+ console.log('');
46
46
  }
47
47
  }
48
48
 
49
49
  async function showToolInfo(toolName: string) {
50
50
  if (!toolName) {
51
- console.error('Error: Tool name required')
52
- console.log('Usage: ccjk info <tool-name>')
53
- process.exit(1)
51
+ console.error('Error: Tool name required');
52
+ console.log('Usage: ccjk info <tool-name>');
53
+ process.exit(1);
54
54
  }
55
55
 
56
56
  try {
57
- const tool = createTool(toolName)
58
- const metadata = tool.getMetadata()
59
- const status = await tool.isInstalled()
60
- const config = await tool.getConfig()
61
-
62
- console.log(`\n${metadata.displayName}`)
63
- console.log('='.repeat(metadata.displayName.length))
64
- console.log(`\nDescription: ${metadata.description}`)
65
- console.log(`Version: ${metadata.version}`)
66
- console.log(`Homepage: ${metadata.homepage || 'N/A'}`)
67
- console.log(`Documentation: ${metadata.documentation || 'N/A'}`)
68
- console.log(`\nInstalled: ${status.installed ? 'Yes' : 'No'}`)
57
+ const tool = createTool(toolName);
58
+ const metadata = tool.getMetadata();
59
+ const status = await tool.isInstalled();
60
+ const config = await tool.getConfig();
61
+
62
+ console.log(`\n${metadata.displayName}`);
63
+ console.log('='.repeat(metadata.displayName.length));
64
+ console.log(`\nDescription: ${metadata.description}`);
65
+ console.log(`Version: ${metadata.version}`);
66
+ console.log(`Homepage: ${metadata.homepage || 'N/A'}`);
67
+ console.log(`Documentation: ${metadata.documentation || 'N/A'}`);
68
+ console.log(`\nInstalled: ${status.installed ? 'Yes' : 'No'}`);
69
69
  if (status.installed) {
70
- console.log(` Version: ${status.version || 'Unknown'}`)
71
- console.log(` Path: ${status.path || 'Unknown'}`)
70
+ console.log(` Version: ${status.version || 'Unknown'}`);
71
+ console.log(` Path: ${status.path || 'Unknown'}`);
72
72
  }
73
- console.log('\nCapabilities:')
74
- console.log(` Chat: ${metadata.capabilities.supportsChat ? '✅' : '❌'}`)
75
- console.log(` File Edit: ${metadata.capabilities.supportsFileEdit ? '✅' : '❌'}`)
76
- console.log(` Code Gen: ${metadata.capabilities.supportsCodeGen ? '✅' : '❌'}`)
77
- console.log(` Review: ${metadata.capabilities.supportsReview ? '✅' : '❌'}`)
78
- console.log(` Testing: ${metadata.capabilities.supportsTesting ? '✅' : '❌'}`)
79
- console.log(` Debugging: ${metadata.capabilities.supportsDebugging ? '✅' : '❌'}`)
80
- console.log('\nConfiguration:')
81
- console.log(` Model: ${config.model || 'Not set'}`)
82
- console.log(` API Key: ${config.apiKey ? '***' : 'Not set'}`)
83
- console.log('')
73
+ console.log('\nCapabilities:');
74
+ console.log(` Chat: ${metadata.capabilities.supportsChat ? '✅' : '❌'}`);
75
+ console.log(` File Edit: ${metadata.capabilities.supportsFileEdit ? '✅' : '❌'}`);
76
+ console.log(` Code Gen: ${metadata.capabilities.supportsCodeGen ? '✅' : '❌'}`);
77
+ console.log(` Review: ${metadata.capabilities.supportsReview ? '✅' : '❌'}`);
78
+ console.log(` Testing: ${metadata.capabilities.supportsTesting ? '✅' : '❌'}`);
79
+ console.log(` Debugging: ${metadata.capabilities.supportsDebugging ? '✅' : '❌'}`);
80
+ console.log('\nConfiguration:');
81
+ console.log(` Model: ${config.model || 'Not set'}`);
82
+ console.log(` API Key: ${config.apiKey ? '***' : 'Not set'}`);
83
+ console.log('');
84
84
  }
85
85
  catch (error) {
86
- console.error(`Error: ${(error as Error).message}`)
87
- process.exit(1)
86
+ console.error(`Error: ${(error as Error).message}`);
87
+ process.exit(1);
88
88
  }
89
89
  }
90
90
 
91
91
  async function checkInstallation(toolName: string) {
92
92
  if (!toolName) {
93
- console.log('Checking all tools...\n')
94
- const registry = getRegistry()
95
- const toolNames = registry.getToolNames()
93
+ console.log('Checking all tools...\n');
94
+ const registry = getRegistry();
95
+ const toolNames = registry.getToolNames();
96
96
 
97
97
  for (const name of toolNames) {
98
- const tool = createTool(name)
99
- const metadata = tool.getMetadata()
100
- const status = await tool.isInstalled()
98
+ const tool = createTool(name);
99
+ const metadata = tool.getMetadata();
100
+ const status = await tool.isInstalled();
101
101
 
102
- console.log(`${metadata.displayName}: ${status.installed ? '✅' : '❌'}`)
102
+ console.log(`${metadata.displayName}: ${status.installed ? '✅' : '❌'}`);
103
103
  if (status.installed && status.version) {
104
- console.log(` Version: ${status.version}`)
104
+ console.log(` Version: ${status.version}`);
105
105
  }
106
106
  }
107
- console.log('')
107
+ console.log('');
108
108
  }
109
109
  else {
110
110
  try {
111
- const tool = createTool(toolName)
112
- const metadata = tool.getMetadata()
113
- const status = await tool.isInstalled()
111
+ const tool = createTool(toolName);
112
+ const metadata = tool.getMetadata();
113
+ const status = await tool.isInstalled();
114
114
 
115
- console.log(`\n${metadata.displayName}: ${status.installed ? '✅ Installed' : '❌ Not installed'}`)
115
+ console.log(`\n${metadata.displayName}: ${status.installed ? '✅ Installed' : '❌ Not installed'}`);
116
116
  if (status.installed) {
117
- console.log(`Version: ${status.version || 'Unknown'}`)
118
- console.log(`Path: ${status.path || 'Unknown'}`)
117
+ console.log(`Version: ${status.version || 'Unknown'}`);
118
+ console.log(`Path: ${status.path || 'Unknown'}`);
119
119
  }
120
120
  else {
121
- console.log('\nTo install, run:')
122
- console.log(` ccjk install ${toolName}`)
121
+ console.log('\nTo install, run:');
122
+ console.log(` ccjk install ${toolName}`);
123
123
  }
124
- console.log('')
124
+ console.log('');
125
125
  }
126
126
  catch (error) {
127
- console.error(`Error: ${(error as Error).message}`)
128
- process.exit(1)
127
+ console.error(`Error: ${(error as Error).message}`);
128
+ process.exit(1);
129
129
  }
130
130
  }
131
131
  }
132
132
 
133
133
  async function installTool(toolName: string) {
134
134
  if (!toolName) {
135
- console.error('Error: Tool name required')
136
- console.log('Usage: ccjk install <tool-name>')
137
- process.exit(1)
135
+ console.error('Error: Tool name required');
136
+ console.log('Usage: ccjk install <tool-name>');
137
+ process.exit(1);
138
138
  }
139
139
 
140
140
  try {
141
- const tool = createTool(toolName)
142
- const metadata = tool.getMetadata()
141
+ const tool = createTool(toolName);
142
+ const metadata = tool.getMetadata();
143
143
 
144
- console.log(`Installing ${metadata.displayName}...`)
145
- const result = await tool.install()
144
+ console.log(`Installing ${metadata.displayName}...`);
145
+ const result = await tool.install();
146
146
 
147
147
  if (result.success) {
148
- console.log(`✅ ${metadata.displayName} installed successfully!`)
148
+ console.log(`✅ ${metadata.displayName} installed successfully!`);
149
149
  if (result.output) {
150
- console.log(result.output)
150
+ console.log(result.output);
151
151
  }
152
152
  }
153
153
  else {
154
- console.error(`❌ Installation failed: ${result.error}`)
155
- process.exit(1)
154
+ console.error(`❌ Installation failed: ${result.error}`);
155
+ process.exit(1);
156
156
  }
157
157
  }
158
158
  catch (error) {
159
- console.error(`Error: ${(error as Error).message}`)
160
- process.exit(1)
159
+ console.error(`Error: ${(error as Error).message}`);
160
+ process.exit(1);
161
161
  }
162
162
  }
163
163
 
164
164
  async function configureTool(toolName: string) {
165
165
  if (!toolName) {
166
- console.error('Error: Tool name required')
167
- console.log('Usage: ccjk configure <tool-name>')
168
- process.exit(1)
166
+ console.error('Error: Tool name required');
167
+ console.log('Usage: ccjk configure <tool-name>');
168
+ process.exit(1);
169
169
  }
170
170
 
171
171
  try {
172
- const tool = createTool(toolName)
173
- const metadata = tool.getMetadata()
174
- const config = await tool.getConfig()
175
-
176
- console.log(`\nCurrent configuration for ${metadata.displayName}:`)
177
- console.log(JSON.stringify(config, null, 2))
178
- console.log('\nTo update configuration, use the API:')
179
- console.log(` const tool = createTool('${toolName}');`)
180
- console.log(` await tool.updateConfig({ apiKey: 'your-key' });`)
181
- console.log('')
172
+ const tool = createTool(toolName);
173
+ const metadata = tool.getMetadata();
174
+ const config = await tool.getConfig();
175
+
176
+ console.log(`\nCurrent configuration for ${metadata.displayName}:`);
177
+ console.log(JSON.stringify(config, null, 2));
178
+ console.log('\nTo update configuration, use the API:');
179
+ console.log(` const tool = createTool('${toolName}');`);
180
+ console.log(` await tool.updateConfig({ apiKey: 'your-key' });`);
181
+ console.log('');
182
182
  }
183
183
  catch (error) {
184
- console.error(`Error: ${(error as Error).message}`)
185
- process.exit(1)
184
+ console.error(`Error: ${(error as Error).message}`);
185
+ process.exit(1);
186
186
  }
187
187
  }
188
188
 
@@ -213,10 +213,10 @@ Available tools:
213
213
  claude-code, codex, aider, continue, cline, cursor
214
214
 
215
215
  For more information, visit: https://github.com/your-org/ccjk
216
- `)
216
+ `);
217
217
  }
218
218
 
219
219
  main().catch((error) => {
220
- console.error('Fatal error:', error)
221
- process.exit(1)
222
- })
220
+ console.error('Fatal error:', error);
221
+ process.exit(1);
222
+ });
@@ -1,27 +1,32 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
2
  import a from './index5.mjs';
3
- import { SETTINGS_FILE } from './constants.mjs';
4
3
  import { ensureI18nInitialized, i18n } from './index2.mjs';
4
+ import { n as normalizeClaudeFamilySettings, r as resolveClaudeFamilySettingsTarget } from '../shared/ccjk.Di1IYU3u.mjs';
5
5
  import { writeJsonConfig } from './json-config.mjs';
6
6
  import '../shared/ccjk.BAGoDD49.mjs';
7
- import 'node:os';
8
- import '../shared/ccjk.bQ7Dh1g4.mjs';
9
7
  import 'node:process';
10
8
  import 'node:url';
11
- import '../shared/ccjk.RyizuzOI.mjs';
9
+ import '../shared/ccjk.bQ7Dh1g4.mjs';
10
+ import './constants.mjs';
11
+ import 'node:os';
12
+ import './ccjk-config.mjs';
13
+ import '../shared/ccjk.BBtCGd_g.mjs';
14
+ import './index3.mjs';
12
15
  import './fs-operations.mjs';
13
16
  import 'node:crypto';
14
17
  import 'node:fs/promises';
18
+ import '../shared/ccjk.RyizuzOI.mjs';
15
19
 
16
20
  const ENV_KEY = "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS";
17
21
  function t(key, opts) {
18
22
  return i18n.t(`agent-teams:${key}`, opts);
19
23
  }
20
24
  function readSettings() {
21
- if (!existsSync(SETTINGS_FILE))
25
+ const target = resolveClaudeFamilySettingsTarget();
26
+ if (!existsSync(target.settingsFile))
22
27
  return {};
23
28
  try {
24
- return JSON.parse(readFileSync(SETTINGS_FILE, "utf-8"));
29
+ return JSON.parse(readFileSync(target.settingsFile, "utf-8"));
25
30
  } catch {
26
31
  return {};
27
32
  }
@@ -39,7 +44,8 @@ function setAgentTeams(enabled) {
39
44
  } else {
40
45
  delete settings.env[ENV_KEY];
41
46
  }
42
- writeJsonConfig(SETTINGS_FILE, settings);
47
+ normalizeClaudeFamilySettings(settings);
48
+ writeJsonConfig(resolveClaudeFamilySettingsTarget().settingsFile, settings);
43
49
  }
44
50
  function getTeammateMode() {
45
51
  const settings = readSettings();
@@ -48,7 +54,8 @@ function getTeammateMode() {
48
54
  function setTeammateMode(mode) {
49
55
  const settings = readSettings();
50
56
  settings.teammateMode = mode;
51
- writeJsonConfig(SETTINGS_FILE, settings);
57
+ normalizeClaudeFamilySettings(settings);
58
+ writeJsonConfig(resolveClaudeFamilySettingsTarget().settingsFile, settings);
52
59
  }
53
60
  async function agentTeamsCommand(options) {
54
61
  ensureI18nInitialized();
@@ -2,7 +2,7 @@ import a from './index5.mjs';
2
2
  import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from 'node:fs';
3
3
  import { CCJK_CONFIG_DIR } from './constants.mjs';
4
4
  import { w as writeAgentFile } from '../shared/ccjk.CfKKcvWy.mjs';
5
- import { g as getPluginManager } from '../shared/ccjk.DTdjs-qK.mjs';
5
+ import { g as getPluginManager } from '../shared/ccjk.MwtjAULc.mjs';
6
6
  import { homedir } from 'node:os';
7
7
  import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
8
8
  import '../shared/ccjk.BAGoDD49.mjs';
@@ -15,7 +15,7 @@ import 'node:child_process';
15
15
  import 'node:path';
16
16
  import 'node:stream';
17
17
  import 'node:readline';
18
- import '../shared/ccjk.DsYaCCx4.mjs';
18
+ import '../shared/ccjk.i_vn-9C3.mjs';
19
19
 
20
20
  const CLAUDE_CONFIG_PATH = join(homedir(), ".claude.json");
21
21
  const TOOL_CACHE_TTL = 5 * 60 * 1e3;
@@ -1,6 +1,6 @@
1
1
  import a from './index5.mjs';
2
2
  import { i18n } from './index2.mjs';
3
- import { i as configureApi, h as getExistingApiConfig } from './config.mjs';
3
+ import { j as configureApi, i as getExistingApiConfig } from './config.mjs';
4
4
  import { g as getAllPresets } from '../shared/ccjk.DopKzo3z.mjs';
5
5
  import '../shared/ccjk.BAGoDD49.mjs';
6
6
  import 'node:fs';
@@ -24,17 +24,17 @@ import 'node:crypto';
24
24
  import 'buffer';
25
25
  import 'string_decoder';
26
26
  import './constants.mjs';
27
+ import 'node:child_process';
27
28
  import './ccjk-config.mjs';
28
29
  import '../shared/ccjk.BBtCGd_g.mjs';
29
30
  import './index3.mjs';
30
31
  import './fs-operations.mjs';
31
32
  import 'node:fs/promises';
32
33
  import './json-config.mjs';
33
- import '../shared/ccjk.Ccrqt7u2.mjs';
34
+ import '../shared/ccjk.Di1IYU3u.mjs';
34
35
  import './platform.mjs';
35
36
  import './main.mjs';
36
37
  import 'module';
37
- import 'node:child_process';
38
38
  import 'node:stream';
39
39
 
40
40
  async function apiConfigure(options = {}) {
@@ -30,25 +30,25 @@ 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
+ import 'node:child_process';
34
+ import '../shared/ccjk.Di1IYU3u.mjs';
34
35
  import './platform.mjs';
35
36
  import './main.mjs';
36
37
  import 'module';
37
- import 'node:child_process';
38
38
  import 'node:stream';
39
- import '../shared/ccjk.DKXs7Fbm.mjs';
40
- import '../shared/ccjk.ygJzcD-n.mjs';
39
+ import '../shared/ccjk.BzxpiEPF.mjs';
40
+ import '../shared/ccjk.BJ3Zpjo5.mjs';
41
41
  import '../shared/ccjk.BFQ7yr5S.mjs';
42
42
  import '../shared/ccjk.DZ2LLOa-.mjs';
43
43
  import '../shared/ccjk.DeWpAShp.mjs';
44
- import '../shared/ccjk.BI-hdI7P.mjs';
44
+ import '../shared/ccjk.CbWVbtb9.mjs';
45
45
  import './simple-config.mjs';
46
46
 
47
47
  async function syncClavueProviderStateIfNeeded(codeTool, activeProfileId) {
48
48
  if (codeTool !== "clavue") {
49
49
  return;
50
50
  }
51
- const { syncMyclaudeProviderProfilesFromClaudeConfig } = await import('./config.mjs').then(function (n) { return n.H; });
51
+ const { syncMyclaudeProviderProfilesFromClaudeConfig } = await import('./config.mjs').then(function (n) { return n.P; });
52
52
  const config = ClaudeCodeConfigManager.readConfig();
53
53
  syncMyclaudeProviderProfilesFromClaudeConfig(
54
54
  activeProfileId === void 0 || !config ? config : { ...config, currentProfileId: activeProfileId }
@@ -325,9 +325,9 @@ async function updateMyclaude(force = false, skipPrompt = false) {
325
325
  const updateSpinner = ora(format(i18n.t("updater:updating"), { tool: "clavue" })).start();
326
326
  try {
327
327
  await execWithSudoIfNeeded("npm", ["update", "-g", "clavue"]);
328
- const installResult = await q("clavue", ["install", "--force"]);
329
- if (installResult.exitCode !== 0) {
330
- throw new Error(installResult.stderr || `Command failed with exit code ${installResult.exitCode}`);
328
+ const verifyResult = await q("clavue", ["--version"]);
329
+ if (verifyResult.exitCode !== 0) {
330
+ throw new Error(verifyResult.stderr || `Command failed with exit code ${verifyResult.exitCode}`);
331
331
  }
332
332
  updateSpinner.succeed(format(i18n.t("updater:updateSuccess"), { tool: "clavue" }));
333
333
  return true;
@@ -461,7 +461,7 @@ async function checkAndUpdateMyclaudeTools(skipPrompt = false) {
461
461
  process.exit(0);
462
462
  }
463
463
  }
464
- async function checkCcjkVersionAndPrompt(skipPrompt) {
464
+ async function checkCcjkVersionAndPrompt(_skipPrompt) {
465
465
  try {
466
466
  const { readFileSync } = await import('node:fs');
467
467
  const { fileURLToPath } = await import('node:url');
@@ -342,7 +342,7 @@ async function runCcjkCommand(args) {
342
342
  const sub = args[0];
343
343
  try {
344
344
  if (sub === "init") {
345
- const { init } = await import('./init.mjs').then(function (n) { return n.e; });
345
+ const { init } = await import('./init.mjs').then(function (n) { return n.c; });
346
346
  await init({ skipBanner: true, skipPrompt: true });
347
347
  return { success: true, message: "Initialization complete" };
348
348
  }
@@ -1,4 +1,4 @@
1
- import { a as getSmartRouter } from '../shared/ccjk.DQXk596F.mjs';
1
+ import { a as getSmartRouter } from '../shared/ccjk.DuzJZlgj.mjs';
2
2
  import 'node:fs';
3
3
  import 'node:fs/promises';
4
4
  import 'node:os';
@@ -1,4 +1,4 @@
1
- import { g as getTelemetry, a as getSmartRouter, b as getCapabilityName } from '../shared/ccjk.DQXk596F.mjs';
1
+ import { g as getTelemetry, a as getSmartRouter, b as getCapabilityName } from '../shared/ccjk.DuzJZlgj.mjs';
2
2
  import 'node:fs';
3
3
  import 'node:fs/promises';
4
4
  import 'node:os';
@@ -65,18 +65,24 @@ async function brainStatusCommand(options) {
65
65
  }
66
66
  }
67
67
  function getPreferenceLabel(pref) {
68
- if (pref <= 2) return "\u4F18\u5148\u7B80\u5355";
69
- if (pref >= 4) return "\u4F18\u5148\u590D\u6742";
68
+ if (pref <= 2)
69
+ return "\u4F18\u5148\u7B80\u5355";
70
+ if (pref >= 4)
71
+ return "\u4F18\u5148\u590D\u6742";
70
72
  return "\u5E73\u8861";
71
73
  }
72
74
  function getSuccessEmoji(rate) {
73
- if (rate >= 0.9) return "\u{1F7E2}";
74
- if (rate >= 0.7) return "\u{1F7E1}";
75
+ if (rate >= 0.9)
76
+ return "\u{1F7E2}";
77
+ if (rate >= 0.7)
78
+ return "\u{1F7E1}";
75
79
  return "\u{1F534}";
76
80
  }
77
81
  function getScoreEmoji(score) {
78
- if (score >= 8) return "\u{1F31F}";
79
- if (score >= 6) return "\u{1F44D}";
82
+ if (score >= 8)
83
+ return "\u{1F31F}";
84
+ if (score >= 6)
85
+ return "\u{1F44D}";
80
86
  return "\u{1F44E}";
81
87
  }
82
88
 
@@ -1,6 +1,6 @@
1
1
  import a from './index5.mjs';
2
2
  import { c as consola, a as analyzeProject } from '../shared/ccjk.Cv13QsGp.mjs';
3
- import { c as createCompleteCloudClient } from '../shared/ccjk.Dhu8ia5S.mjs';
3
+ import { c as createCompleteCloudClient } from '../shared/ccjk.zFGcZT7Y.mjs';
4
4
  import { i18n, ensureI18nInitialized } from './index2.mjs';
5
5
  import { createHash } from 'node:crypto';
6
6
  import { promises, readFileSync } from 'node:fs';
@@ -43,12 +43,12 @@ import './index3.mjs';
43
43
  import './fs-operations.mjs';
44
44
  import 'node:fs/promises';
45
45
  import './json-config.mjs';
46
- import '../shared/ccjk.Ccrqt7u2.mjs';
46
+ import '../shared/ccjk.Di1IYU3u.mjs';
47
47
  import './platform.mjs';
48
48
  import './main.mjs';
49
49
  import 'module';
50
50
  import 'node:stream';
51
- import '../shared/ccjk.DsYaCCx4.mjs';
51
+ import '../shared/ccjk.i_vn-9C3.mjs';
52
52
 
53
53
  const packageJson = JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8"));
54
54
  const CCJK_VERSION = packageJson.version;
@@ -56,7 +56,7 @@ class CloudSetupOrchestrator {
56
56
  gateway;
57
57
  logger = consola.withTag("cloud-setup");
58
58
  startTime = Date.now();
59
- constructor(options = {}) {
59
+ constructor(_options = {}) {
60
60
  this.gateway = createDefaultGateway();
61
61
  }
62
62
  /**
@@ -59,7 +59,8 @@ function normalizeTomlConfig(config) {
59
59
  enabled: typeof rawCodex.enabled === "boolean" ? rawCodex.enabled : hasLegacyToolType ? codeToolType === "codex" : defaultConfig.codex.enabled,
60
60
  systemPromptStyle: typeof rawCodex.systemPromptStyle === "string" ? rawCodex.systemPromptStyle : typeof legacyConfig?.systemPromptStyle === "string" ? legacyConfig.systemPromptStyle : defaultConfig.codex.systemPromptStyle,
61
61
  installMethod: rawCodex.installMethod,
62
- envKeyMigrated: rawCodex.envKeyMigrated
62
+ envKeyMigrated: rawCodex.envKeyMigrated,
63
+ goalsFeatureEnabled: rawCodex.goalsFeatureEnabled ?? defaultConfig.codex.goalsFeatureEnabled
63
64
  },
64
65
  storage: {
65
66
  ...defaultConfig.storage,
@@ -145,7 +146,8 @@ function createDefaultTomlConfig(preferredLang = "en", claudeCodeInstallType = "
145
146
  },
146
147
  codex: {
147
148
  enabled: false,
148
- systemPromptStyle: "senior-architect"
149
+ systemPromptStyle: "senior-architect",
150
+ goalsFeatureEnabled: true
149
151
  },
150
152
  storage: {
151
153
  memory: {}
@@ -219,7 +221,8 @@ function migrateFromJsonConfig(jsonConfig) {
219
221
  },
220
222
  codex: {
221
223
  enabled: jsonConfig.codeToolType === "codex",
222
- systemPromptStyle: jsonConfig.systemPromptStyle || defaultConfig.codex.systemPromptStyle
224
+ systemPromptStyle: jsonConfig.systemPromptStyle || defaultConfig.codex.systemPromptStyle,
225
+ goalsFeatureEnabled: true
223
226
  },
224
227
  storage: {
225
228
  memory: {}
@@ -228,9 +231,9 @@ function migrateFromJsonConfig(jsonConfig) {
228
231
  };
229
232
  return tomlConfig;
230
233
  }
231
- function updateTomlConfig(configPath, updates) {
234
+ function buildUpdatedTomlConfig(configPath, updates) {
232
235
  const existingConfig = readTomlConfig(configPath) || createDefaultTomlConfig();
233
- const updatedConfig = {
236
+ return {
234
237
  version: updates.version || existingConfig.version,
235
238
  lastUpdated: (/* @__PURE__ */ new Date()).toISOString(),
236
239
  general: {
@@ -286,6 +289,12 @@ function updateTomlConfig(configPath, updates) {
286
289
  } : existingConfig.adaptation?.uiProfile
287
290
  }
288
291
  };
292
+ }
293
+ function stringifyTomlConfig(config) {
294
+ return stringify(config);
295
+ }
296
+ function updateTomlConfig(configPath, updates) {
297
+ const updatedConfig = buildUpdatedTomlConfig(configPath, updates);
289
298
  writeTomlConfig(configPath, updatedConfig);
290
299
  return updatedConfig;
291
300
  }
@@ -433,4 +442,4 @@ function readDefaultTomlConfig() {
433
442
  return readTomlConfig(ZCF_CONFIG_FILE);
434
443
  }
435
444
 
436
- export { createDefaultTomlConfig, migrateFromJsonConfig, migrateZcfConfigIfNeeded, readDefaultTomlConfig, readTomlConfig, readZcfConfig, readZcfConfigAsync, updateTomlConfig, updateZcfConfig, writeTomlConfig, writeZcfConfig };
445
+ export { buildUpdatedTomlConfig, createDefaultTomlConfig, migrateFromJsonConfig, migrateZcfConfigIfNeeded, readDefaultTomlConfig, readTomlConfig, readZcfConfig, readZcfConfigAsync, stringifyTomlConfig, updateTomlConfig, updateZcfConfig, writeTomlConfig, writeZcfConfig };
@@ -5,8 +5,8 @@ import { c as consola, a as analyzeProject, g as getTemplatesClient } from '../s
5
5
  import { i as inquirer } from './index6.mjs';
6
6
  import { CLAUDE_DIR } from './constants.mjs';
7
7
  import { ensureI18nInitialized, i18n } from './index2.mjs';
8
- import { d as backupMcpConfig, r as readMcpConfig, m as mergeMcpServers, w as writeMcpConfig } from './config.mjs';
9
- import { h as commandExists } from './platform.mjs';
8
+ import { e as backupMcpConfig, r as readMcpConfig, m as mergeMcpServers, w as writeMcpConfig } from './config.mjs';
9
+ import { c as commandExists } from './platform.mjs';
10
10
  import '../shared/ccjk.BAGoDD49.mjs';
11
11
  import 'node:fs';
12
12
  import './index9.mjs';
@@ -28,15 +28,15 @@ import 'buffer';
28
28
  import 'string_decoder';
29
29
  import 'node:url';
30
30
  import '../shared/ccjk.RyizuzOI.mjs';
31
+ import 'node:child_process';
31
32
  import './ccjk-config.mjs';
32
33
  import './index3.mjs';
33
34
  import './fs-operations.mjs';
34
35
  import 'node:fs/promises';
35
36
  import './json-config.mjs';
36
- import '../shared/ccjk.Ccrqt7u2.mjs';
37
+ import '../shared/ccjk.Di1IYU3u.mjs';
37
38
  import './main.mjs';
38
39
  import 'module';
39
- import 'node:child_process';
40
40
  import 'node:stream';
41
41
 
42
42
  const mcpServiceTemplates = {