ccjk 13.6.5 → 14.0.0
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.
- package/dist/chunks/api-cli.mjs +4 -2
- package/dist/chunks/api-config-selector.mjs +7 -7
- package/dist/chunks/auto-fix.mjs +3 -1
- package/dist/chunks/auto-updater.mjs +100 -2
- package/dist/chunks/banner.mjs +0 -16
- package/dist/chunks/ccjk-all.mjs +5 -2
- package/dist/chunks/ccjk-mcp.mjs +6 -3
- package/dist/chunks/ccjk-setup.mjs +4 -1
- package/dist/chunks/ccr.mjs +5 -5
- package/dist/chunks/check-updates.mjs +12 -2
- package/dist/chunks/claude-code-incremental-manager.mjs +45 -21
- package/dist/chunks/claude-wrapper.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +4 -5
- package/dist/chunks/codex-config-switch.mjs +3 -3
- package/dist/chunks/codex-provider-manager.mjs +1 -1
- package/dist/chunks/codex.mjs +4 -360
- package/dist/chunks/config-switch.mjs +22 -11
- package/dist/chunks/config.mjs +1104 -5
- package/dist/chunks/config2.mjs +6 -4
- package/dist/chunks/config3.mjs +4 -2
- package/dist/chunks/constants.mjs +1 -1
- package/dist/chunks/doctor.mjs +2 -2
- package/dist/chunks/evolution.mjs +47 -27
- package/dist/chunks/features.mjs +76 -12
- package/dist/chunks/index10.mjs +78 -24
- package/dist/chunks/init.mjs +18 -35
- package/dist/chunks/installer.mjs +3 -3
- package/dist/chunks/mcp-cli.mjs +16 -16
- package/dist/chunks/mcp.mjs +9 -9
- package/dist/chunks/memory-check.mjs +1 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/platform.mjs +1 -1
- package/dist/chunks/quick-setup.mjs +11 -10
- package/dist/chunks/research.mjs +225 -27
- package/dist/chunks/slash-commands.mjs +1 -1
- package/dist/chunks/smart-defaults.mjs +2 -2
- package/dist/chunks/uninstall.mjs +1 -1
- package/dist/chunks/update.mjs +16 -16
- package/dist/chunks/version-checker.mjs +11 -1
- package/dist/cli.mjs +5 -1
- package/dist/i18n/locales/en/cli.json +0 -4
- package/dist/i18n/locales/en/menu.json +10 -3
- package/dist/i18n/locales/en/notification.json +2 -2
- package/dist/i18n/locales/zh-CN/cli.json +0 -4
- package/dist/i18n/locales/zh-CN/menu.json +10 -3
- package/dist/i18n/locales/zh-CN/notification.json +2 -2
- package/dist/index.mjs +3 -2
- package/dist/shared/{ccjk.C4m4ypdk.mjs → ccjk.B6VCKdyy.mjs} +4 -3
- package/dist/shared/ccjk.BI-hdI7P.mjs +30 -0
- package/dist/shared/{ccjk.DvAP4XfP.mjs → ccjk.CVjfbEIj.mjs} +2 -2
- package/dist/shared/ccjk.DKXs7Fbm.mjs +361 -0
- package/dist/shared/{ccjk.BP5hsTZQ.mjs → ccjk.Dh6Be-ef.mjs} +2 -2
- package/package.json +3 -1
- package/templates/common/workflow/essential/en/feat.md +68 -291
- package/templates/common/workflow/sixStep/en/workflow.md +56 -330
- package/dist/chunks/claude-code-config-manager.mjs +0 -809
- package/dist/chunks/claude-config.mjs +0 -253
package/dist/chunks/api-cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import a from './index5.mjs';
|
|
2
2
|
import { i18n } from './index2.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { i as configureApi, h 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,7 +24,6 @@ import 'node:crypto';
|
|
|
24
24
|
import 'buffer';
|
|
25
25
|
import 'string_decoder';
|
|
26
26
|
import './constants.mjs';
|
|
27
|
-
import './claude-config.mjs';
|
|
28
27
|
import './json-config.mjs';
|
|
29
28
|
import './fs-operations.mjs';
|
|
30
29
|
import 'node:fs/promises';
|
|
@@ -34,6 +33,9 @@ import 'module';
|
|
|
34
33
|
import 'node:child_process';
|
|
35
34
|
import 'node:stream';
|
|
36
35
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
36
|
+
import './ccjk-config.mjs';
|
|
37
|
+
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
38
|
+
import './index3.mjs';
|
|
37
39
|
|
|
38
40
|
async function apiConfigure(options = {}) {
|
|
39
41
|
const lang = options.lang || i18n.language || "en";
|
|
@@ -3,7 +3,7 @@ import { i as inquirer } from './index6.mjs';
|
|
|
3
3
|
import { isCodeToolType, DEFAULT_CODE_TOOL_TYPE } from './constants.mjs';
|
|
4
4
|
import { i18n } from './index2.mjs';
|
|
5
5
|
import { readZcfConfig } from './ccjk-config.mjs';
|
|
6
|
-
import { ClaudeCodeConfigManager } from './
|
|
6
|
+
import { C as ClaudeCodeConfigManager } from './config.mjs';
|
|
7
7
|
import { handleCustomApiMode } from './features.mjs';
|
|
8
8
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
9
9
|
import 'node:readline';
|
|
@@ -30,18 +30,18 @@ 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 './config.mjs';
|
|
34
|
-
import './claude-config.mjs';
|
|
35
33
|
import './platform.mjs';
|
|
36
34
|
import './main.mjs';
|
|
37
35
|
import 'module';
|
|
38
36
|
import 'node:child_process';
|
|
39
37
|
import 'node:stream';
|
|
40
38
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
41
|
-
import '../shared/ccjk.
|
|
39
|
+
import '../shared/ccjk.DKXs7Fbm.mjs';
|
|
40
|
+
import '../shared/ccjk.Dh6Be-ef.mjs';
|
|
42
41
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
43
42
|
import '../shared/ccjk.DZ2LLOa-.mjs';
|
|
44
43
|
import '../shared/ccjk.DeWpAShp.mjs';
|
|
44
|
+
import '../shared/ccjk.BI-hdI7P.mjs';
|
|
45
45
|
|
|
46
46
|
function getCurrentCodeTool() {
|
|
47
47
|
const config = readZcfConfig();
|
|
@@ -85,7 +85,7 @@ async function showApiConfigMenu(title, options) {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
async function handleOfficialLogin(codeTool, isZh) {
|
|
88
|
-
if (codeTool === "claude-code") {
|
|
88
|
+
if (codeTool === "claude-code" || codeTool === "myclaude") {
|
|
89
89
|
const result = await ClaudeCodeConfigManager.switchToOfficial();
|
|
90
90
|
if (result.success) {
|
|
91
91
|
console.log("");
|
|
@@ -108,7 +108,7 @@ async function handleOfficialLogin(codeTool, isZh) {
|
|
|
108
108
|
async function handleCustomConfig(_isZh, context) {
|
|
109
109
|
try {
|
|
110
110
|
const codeTool = getCurrentCodeTool();
|
|
111
|
-
if (codeTool === "claude-code" && context === "init") {
|
|
111
|
+
if ((codeTool === "claude-code" || codeTool === "myclaude") && context === "init") {
|
|
112
112
|
const { addProfileDirect } = await import('./claude-code-incremental-manager.mjs');
|
|
113
113
|
await addProfileDirect();
|
|
114
114
|
} else {
|
|
@@ -120,7 +120,7 @@ async function handleCustomConfig(_isZh, context) {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
async function handleCcrProxy(codeTool, isZh) {
|
|
123
|
-
if (codeTool === "claude-code") {
|
|
123
|
+
if (codeTool === "claude-code" || codeTool === "myclaude") {
|
|
124
124
|
const result = await ClaudeCodeConfigManager.switchToCcr();
|
|
125
125
|
if (result.success) {
|
|
126
126
|
console.log("");
|
package/dist/chunks/auto-fix.mjs
CHANGED
|
@@ -24,7 +24,6 @@ import 'child_process';
|
|
|
24
24
|
import 'node:crypto';
|
|
25
25
|
import 'buffer';
|
|
26
26
|
import 'string_decoder';
|
|
27
|
-
import './claude-config.mjs';
|
|
28
27
|
import './json-config.mjs';
|
|
29
28
|
import './fs-operations.mjs';
|
|
30
29
|
import 'node:fs/promises';
|
|
@@ -34,6 +33,9 @@ import 'module';
|
|
|
34
33
|
import 'node:child_process';
|
|
35
34
|
import 'node:stream';
|
|
36
35
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
36
|
+
import './ccjk-config.mjs';
|
|
37
|
+
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
38
|
+
import './index3.mjs';
|
|
37
39
|
|
|
38
40
|
const AUTO_UPGRADE_STATE_FILE = join(homedir(), ".ccjk", ".auto-upgrade-state.json");
|
|
39
41
|
const AUTO_UPGRADE_INTERVAL = 7 * 24 * 60 * 60 * 1e3;
|
|
@@ -4,7 +4,7 @@ import { exec as q } from './main.mjs';
|
|
|
4
4
|
import { ensureI18nInitialized, i18n, format } from './index2.mjs';
|
|
5
5
|
import { s as shouldUseSudoForGlobalInstall } from './platform.mjs';
|
|
6
6
|
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
7
|
-
import { checkClaudeCodeVersion, fixBrokenNpmSymlink, checkCcrVersion, handleDuplicateInstallations, checkCometixLineVersion } from './version-checker.mjs';
|
|
7
|
+
import { checkClaudeCodeVersion, fixBrokenNpmSymlink, checkCcrVersion, handleDuplicateInstallations, checkCometixLineVersion, checkMyclaudeVersion } from './version-checker.mjs';
|
|
8
8
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
9
9
|
import 'node:process';
|
|
10
10
|
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
@@ -290,6 +290,58 @@ async function updateCometixLine(force = false, skipPrompt = false) {
|
|
|
290
290
|
return false;
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
+
async function updateMyclaude(force = false, skipPrompt = false) {
|
|
294
|
+
ensureI18nInitialized();
|
|
295
|
+
const spinner = ora(i18n.t("updater:checkingVersion")).start();
|
|
296
|
+
try {
|
|
297
|
+
const { installed, currentVersion, latestVersion, needsUpdate } = await checkMyclaudeVersion();
|
|
298
|
+
spinner.stop();
|
|
299
|
+
if (!installed) {
|
|
300
|
+
console.log(a.yellow("myclaude is not installed"));
|
|
301
|
+
return false;
|
|
302
|
+
}
|
|
303
|
+
if (!needsUpdate && !force) {
|
|
304
|
+
console.log(a.green(`myclaude is up to date (v${currentVersion || ""})`));
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
if (!latestVersion) {
|
|
308
|
+
console.log(a.yellow(i18n.t("updater:cannotCheckVersion")));
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
console.log(a.green(format(i18n.t("updater:currentVersion"), { version: currentVersion || "" })));
|
|
312
|
+
console.log(a.green(format(i18n.t("updater:latestVersion"), { version: latestVersion })));
|
|
313
|
+
if (!skipPrompt) {
|
|
314
|
+
const confirm = await promptBoolean({
|
|
315
|
+
message: format(i18n.t("updater:confirmUpdate"), { tool: "myclaude" }),
|
|
316
|
+
defaultValue: true
|
|
317
|
+
});
|
|
318
|
+
if (!confirm) {
|
|
319
|
+
console.log(a.gray(i18n.t("updater:updateSkipped")));
|
|
320
|
+
return true;
|
|
321
|
+
}
|
|
322
|
+
} else {
|
|
323
|
+
console.log(a.green(format(i18n.t("updater:autoUpdating"), { tool: "myclaude" })));
|
|
324
|
+
}
|
|
325
|
+
const updateSpinner = ora(format(i18n.t("updater:updating"), { tool: "myclaude" })).start();
|
|
326
|
+
try {
|
|
327
|
+
await execWithSudoIfNeeded("npm", ["update", "-g", "myclaude-code"]);
|
|
328
|
+
const installResult = await q("myclaude", ["install", "--force"]);
|
|
329
|
+
if (installResult.exitCode !== 0) {
|
|
330
|
+
throw new Error(installResult.stderr || `Command failed with exit code ${installResult.exitCode}`);
|
|
331
|
+
}
|
|
332
|
+
updateSpinner.succeed(format(i18n.t("updater:updateSuccess"), { tool: "myclaude" }));
|
|
333
|
+
return true;
|
|
334
|
+
} catch (error) {
|
|
335
|
+
updateSpinner.fail(format(i18n.t("updater:updateFailed"), { tool: "myclaude" }));
|
|
336
|
+
console.error(a.red(error instanceof Error ? error.message : String(error)));
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
} catch (error) {
|
|
340
|
+
spinner.fail(i18n.t("updater:checkFailed"));
|
|
341
|
+
console.error(a.red(error instanceof Error ? error.message : String(error)));
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
293
345
|
async function checkAndUpdateTools(skipPrompt = false) {
|
|
294
346
|
ensureI18nInitialized();
|
|
295
347
|
console.log(a.bold.cyan(`
|
|
@@ -363,6 +415,52 @@ async function checkAndUpdateTools(skipPrompt = false) {
|
|
|
363
415
|
process.exit(0);
|
|
364
416
|
}
|
|
365
417
|
}
|
|
418
|
+
async function checkAndUpdateMyclaudeTools(skipPrompt = false) {
|
|
419
|
+
ensureI18nInitialized();
|
|
420
|
+
console.log(a.bold.cyan(`
|
|
421
|
+
\u{1F50D} ${i18n.t("updater:checkingTools")}
|
|
422
|
+
`));
|
|
423
|
+
const results = [];
|
|
424
|
+
let ccjkUpdated = false;
|
|
425
|
+
let ccjkResult = null;
|
|
426
|
+
console.log(a.bold("\u2728 myclaude"));
|
|
427
|
+
try {
|
|
428
|
+
const success = await updateMyclaude(false, skipPrompt);
|
|
429
|
+
results.push({ tool: "myclaude", success });
|
|
430
|
+
} catch (error) {
|
|
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 });
|
|
434
|
+
}
|
|
435
|
+
console.log();
|
|
436
|
+
console.log(a.bold("\u{1F4E6} CCJK"));
|
|
437
|
+
try {
|
|
438
|
+
const result = await checkCcjkVersionAndPrompt(skipPrompt);
|
|
439
|
+
ccjkUpdated = result.updated;
|
|
440
|
+
ccjkResult = {
|
|
441
|
+
tool: "CCJK",
|
|
442
|
+
success: result.success,
|
|
443
|
+
error: result.error
|
|
444
|
+
};
|
|
445
|
+
} catch (error) {
|
|
446
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
447
|
+
console.error(a.red(`\u274C ${format(i18n.t("updater:updateFailed"), { tool: "CCJK" })}: ${errorMessage}`));
|
|
448
|
+
ccjkResult = { tool: "CCJK", success: false, error: errorMessage };
|
|
449
|
+
}
|
|
450
|
+
console.log(a.bold.cyan(`
|
|
451
|
+
\u{1F4CB} ${i18n.t("updater:updateSummary")}`));
|
|
452
|
+
for (const result of ccjkResult ? [ccjkResult, ...results] : results) {
|
|
453
|
+
if (result.success) {
|
|
454
|
+
console.log(a.green(`\u2714 ${result.tool}: ${i18n.t("updater:success")}`));
|
|
455
|
+
} else {
|
|
456
|
+
console.log(a.red(`\u274C ${result.tool}: ${i18n.t("updater:failed")} ${result.error ? `(${result.error})` : ""}`));
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
if (ccjkUpdated) {
|
|
460
|
+
console.log(a.yellow("\n\u26A0 Please run ccjk again to use the new version"));
|
|
461
|
+
process.exit(0);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
366
464
|
async function checkCcjkVersionAndPrompt(skipPrompt) {
|
|
367
465
|
try {
|
|
368
466
|
const { readFileSync } = await import('node:fs');
|
|
@@ -406,4 +504,4 @@ async function checkCcjkVersionAndPrompt(skipPrompt) {
|
|
|
406
504
|
}
|
|
407
505
|
}
|
|
408
506
|
|
|
409
|
-
export { checkAndUpdateTools, execWithSudoIfNeeded, updateCcr, updateClaudeCode, updateCometixLine };
|
|
507
|
+
export { checkAndUpdateMyclaudeTools, checkAndUpdateTools, execWithSudoIfNeeded, updateCcr, updateClaudeCode, updateCometixLine, updateMyclaude };
|
package/dist/chunks/banner.mjs
CHANGED
|
@@ -156,22 +156,6 @@ ${i18n.t("cli:commandDiscovery.title")}`));
|
|
|
156
156
|
console.log(` ${a.cyan(cmdPadded)} - ${a.white(desc)}`);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
console.log(a.green.bold(`
|
|
160
|
-
${i18n.t("cli:commandDiscovery.claudeCodeTitle")}`));
|
|
161
|
-
console.log(a.gray("\u2500".repeat(60)));
|
|
162
|
-
const claudeCommands = [
|
|
163
|
-
{ cmd: "/help", desc: i18n.t("cli:commandDiscovery.help"), descEn: "Show all commands" },
|
|
164
|
-
{ cmd: "/clear", desc: i18n.t("cli:commandDiscovery.clear"), descEn: "Clear conversation" },
|
|
165
|
-
{ cmd: "/reset", desc: i18n.t("cli:commandDiscovery.reset"), descEn: "Reset session" }
|
|
166
|
-
];
|
|
167
|
-
for (const { cmd, desc, descEn } of claudeCommands) {
|
|
168
|
-
const cmdPadded = cmd.padEnd(12);
|
|
169
|
-
if (isZhCN) {
|
|
170
|
-
console.log(` ${a.cyan(cmdPadded)} - ${a.white(desc)} ${a.gray(`(${descEn})`)}`);
|
|
171
|
-
} else {
|
|
172
|
-
console.log(` ${a.cyan(cmdPadded)} - ${a.white(desc)}`);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
159
|
console.log(a.gray(`
|
|
176
160
|
${"\u2500".repeat(60)}`));
|
|
177
161
|
console.log(a.gray(` ${i18n.t("cli:commandDiscovery.footer")}
|
package/dist/chunks/ccjk-all.mjs
CHANGED
|
@@ -36,15 +36,18 @@ import 'child_process';
|
|
|
36
36
|
import 'buffer';
|
|
37
37
|
import 'string_decoder';
|
|
38
38
|
import 'node:child_process';
|
|
39
|
-
import './
|
|
40
|
-
import './json-config.mjs';
|
|
39
|
+
import './config.mjs';
|
|
41
40
|
import '../shared/ccjk.RyizuzOI.mjs';
|
|
41
|
+
import './json-config.mjs';
|
|
42
42
|
import './fs-operations.mjs';
|
|
43
43
|
import 'node:fs/promises';
|
|
44
44
|
import './platform.mjs';
|
|
45
45
|
import './main.mjs';
|
|
46
46
|
import 'module';
|
|
47
47
|
import 'node:stream';
|
|
48
|
+
import '../shared/ccjk.DScm_NnL.mjs';
|
|
49
|
+
import './ccjk-config.mjs';
|
|
50
|
+
import './index3.mjs';
|
|
48
51
|
import '../shared/ccjk.DsYaCCx4.mjs';
|
|
49
52
|
|
|
50
53
|
const packageJson = JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8"));
|
package/dist/chunks/ccjk-mcp.mjs
CHANGED
|
@@ -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 {
|
|
9
|
-
import {
|
|
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';
|
|
10
10
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
11
11
|
import 'node:fs';
|
|
12
12
|
import './index9.mjs';
|
|
@@ -27,10 +27,13 @@ import 'node:crypto';
|
|
|
27
27
|
import 'buffer';
|
|
28
28
|
import 'string_decoder';
|
|
29
29
|
import 'node:url';
|
|
30
|
-
import './json-config.mjs';
|
|
31
30
|
import '../shared/ccjk.RyizuzOI.mjs';
|
|
31
|
+
import './json-config.mjs';
|
|
32
32
|
import './fs-operations.mjs';
|
|
33
33
|
import 'node:fs/promises';
|
|
34
|
+
import '../shared/ccjk.DScm_NnL.mjs';
|
|
35
|
+
import './ccjk-config.mjs';
|
|
36
|
+
import './index3.mjs';
|
|
34
37
|
import './main.mjs';
|
|
35
38
|
import 'module';
|
|
36
39
|
import 'node:child_process';
|
|
@@ -34,7 +34,7 @@ import 'node:crypto';
|
|
|
34
34
|
import 'buffer';
|
|
35
35
|
import 'string_decoder';
|
|
36
36
|
import 'node:child_process';
|
|
37
|
-
import './
|
|
37
|
+
import './config.mjs';
|
|
38
38
|
import './json-config.mjs';
|
|
39
39
|
import './fs-operations.mjs';
|
|
40
40
|
import 'node:fs/promises';
|
|
@@ -42,6 +42,9 @@ import './platform.mjs';
|
|
|
42
42
|
import './main.mjs';
|
|
43
43
|
import 'module';
|
|
44
44
|
import 'node:stream';
|
|
45
|
+
import '../shared/ccjk.DScm_NnL.mjs';
|
|
46
|
+
import './ccjk-config.mjs';
|
|
47
|
+
import './index3.mjs';
|
|
45
48
|
import '../shared/ccjk.DsYaCCx4.mjs';
|
|
46
49
|
|
|
47
50
|
async function createBackup(operation, options = {}) {
|
package/dist/chunks/ccr.mjs
CHANGED
|
@@ -41,17 +41,18 @@ import 'module';
|
|
|
41
41
|
import 'node:child_process';
|
|
42
42
|
import 'node:stream';
|
|
43
43
|
import './config.mjs';
|
|
44
|
-
import './claude-config.mjs';
|
|
45
44
|
import './platform.mjs';
|
|
46
45
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
47
46
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
48
47
|
import './prompts.mjs';
|
|
49
48
|
import '../shared/ccjk.DZ2LLOa-.mjs';
|
|
49
|
+
import '../shared/ccjk.DKXs7Fbm.mjs';
|
|
50
50
|
import '../shared/ccjk.yYQMbHH3.mjs';
|
|
51
51
|
import './smart-defaults.mjs';
|
|
52
52
|
import '../shared/ccjk.DJuyfrlL.mjs';
|
|
53
53
|
import './features.mjs';
|
|
54
|
-
import '../shared/ccjk.
|
|
54
|
+
import '../shared/ccjk.Dh6Be-ef.mjs';
|
|
55
|
+
import '../shared/ccjk.BI-hdI7P.mjs';
|
|
55
56
|
import '../shared/ccjk.DbigonEQ.mjs';
|
|
56
57
|
import 'node:stream/promises';
|
|
57
58
|
import 'tar';
|
|
@@ -68,13 +69,12 @@ import '../shared/ccjk.Bq8TqZG_.mjs';
|
|
|
68
69
|
import './commands.mjs';
|
|
69
70
|
import './check-updates.mjs';
|
|
70
71
|
import './config-switch.mjs';
|
|
71
|
-
import './claude-code-config-manager.mjs';
|
|
72
72
|
import './doctor.mjs';
|
|
73
73
|
import './api-providers.mjs';
|
|
74
74
|
import '../shared/ccjk.SPoXMvZD.mjs';
|
|
75
75
|
import '../shared/ccjk.J8YiPsOw.mjs';
|
|
76
|
-
import '../shared/ccjk.
|
|
77
|
-
import '../shared/ccjk.
|
|
76
|
+
import '../shared/ccjk.CVjfbEIj.mjs';
|
|
77
|
+
import '../shared/ccjk.B6VCKdyy.mjs';
|
|
78
78
|
import './notification.mjs';
|
|
79
79
|
import '../shared/ccjk.BBizCO6_.mjs';
|
|
80
80
|
import '../shared/ccjk.D0g2ABGg.mjs';
|
|
@@ -2,7 +2,7 @@ import process__default from 'node:process';
|
|
|
2
2
|
import a from './index5.mjs';
|
|
3
3
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
4
4
|
import { r as resolveCodeType } from '../shared/ccjk.yYQMbHH3.mjs';
|
|
5
|
-
import { checkAndUpdateTools } from './auto-updater.mjs';
|
|
5
|
+
import { checkAndUpdateTools, checkAndUpdateMyclaudeTools } from './auto-updater.mjs';
|
|
6
6
|
import { c as runCodexUpdate } from './codex.mjs';
|
|
7
7
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
8
8
|
import 'node:fs';
|
|
@@ -44,11 +44,11 @@ import '../shared/ccjk.DZ2LLOa-.mjs';
|
|
|
44
44
|
import './version-checker.mjs';
|
|
45
45
|
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
46
46
|
import './config.mjs';
|
|
47
|
-
import './claude-config.mjs';
|
|
48
47
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
49
48
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
50
49
|
import './prompts.mjs';
|
|
51
50
|
import '../shared/ccjk.gDEDGD_t.mjs';
|
|
51
|
+
import '../shared/ccjk.DKXs7Fbm.mjs';
|
|
52
52
|
|
|
53
53
|
class ToolUpdateScheduler {
|
|
54
54
|
/**
|
|
@@ -62,6 +62,9 @@ class ToolUpdateScheduler {
|
|
|
62
62
|
case "claude-code":
|
|
63
63
|
await this.updateClaudeCodeTools(skipPrompt);
|
|
64
64
|
break;
|
|
65
|
+
case "myclaude":
|
|
66
|
+
await this.updateMyclaudeTools(skipPrompt);
|
|
67
|
+
break;
|
|
65
68
|
case "codex":
|
|
66
69
|
await this.updateCodexTools(skipPrompt);
|
|
67
70
|
break;
|
|
@@ -76,6 +79,13 @@ class ToolUpdateScheduler {
|
|
|
76
79
|
async updateClaudeCodeTools(skipPrompt) {
|
|
77
80
|
await checkAndUpdateTools(skipPrompt);
|
|
78
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Update myclaude related tools
|
|
84
|
+
* @param skipPrompt - Whether to skip interactive prompts
|
|
85
|
+
*/
|
|
86
|
+
async updateMyclaudeTools(skipPrompt) {
|
|
87
|
+
await checkAndUpdateMyclaudeTools(skipPrompt);
|
|
88
|
+
}
|
|
79
89
|
/**
|
|
80
90
|
* Update Codex tools
|
|
81
91
|
* @param skipPrompt - Whether to skip interactive prompts
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import a from './index5.mjs';
|
|
2
2
|
import { i as inquirer } from './index6.mjs';
|
|
3
3
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
4
|
-
import { ClaudeCodeConfigManager } from './
|
|
4
|
+
import { C as ClaudeCodeConfigManager } from './config.mjs';
|
|
5
5
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
6
|
+
import { readZcfConfig } from './ccjk-config.mjs';
|
|
6
7
|
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
7
|
-
import { v as validateApiKey } from '../shared/ccjk.
|
|
8
|
+
import { v as validateApiKey } from '../shared/ccjk.Dh6Be-ef.mjs';
|
|
8
9
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
9
10
|
import 'node:readline';
|
|
10
11
|
import 'stream';
|
|
@@ -26,20 +27,17 @@ import 'node:url';
|
|
|
26
27
|
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
27
28
|
import '../shared/ccjk.RyizuzOI.mjs';
|
|
28
29
|
import './constants.mjs';
|
|
29
|
-
import './
|
|
30
|
-
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
31
|
-
import './index3.mjs';
|
|
30
|
+
import './json-config.mjs';
|
|
32
31
|
import './fs-operations.mjs';
|
|
33
32
|
import 'node:fs/promises';
|
|
34
|
-
import './json-config.mjs';
|
|
35
|
-
import './config.mjs';
|
|
36
|
-
import './claude-config.mjs';
|
|
37
33
|
import './platform.mjs';
|
|
38
34
|
import './main.mjs';
|
|
39
35
|
import 'module';
|
|
40
36
|
import 'node:child_process';
|
|
41
37
|
import 'node:stream';
|
|
42
38
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
39
|
+
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
40
|
+
import './index3.mjs';
|
|
43
41
|
import '../shared/ccjk.DeWpAShp.mjs';
|
|
44
42
|
|
|
45
43
|
function getAuthTypeLabel(authType) {
|
|
@@ -55,11 +53,20 @@ function getAuthTypeLabel(authType) {
|
|
|
55
53
|
return authType;
|
|
56
54
|
}
|
|
57
55
|
}
|
|
56
|
+
async function syncMyclaudeProfilesIfNeeded() {
|
|
57
|
+
const zcfConfig = readZcfConfig();
|
|
58
|
+
if (zcfConfig?.codeToolType !== "myclaude") {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.E; });
|
|
62
|
+
syncMyclaudeProviderProfilesFromCurrentClaudeConfig();
|
|
63
|
+
}
|
|
58
64
|
async function configureIncrementalManagement() {
|
|
59
65
|
ensureI18nInitialized();
|
|
60
66
|
const config = ClaudeCodeConfigManager.readConfig();
|
|
61
67
|
if (!config || !config.profiles || Object.keys(config.profiles).length === 0) {
|
|
62
68
|
await handleAddProfile();
|
|
69
|
+
await syncMyclaudeProfilesIfNeeded();
|
|
63
70
|
return;
|
|
64
71
|
}
|
|
65
72
|
const profiles = Object.values(config.profiles);
|
|
@@ -100,6 +107,7 @@ async function configureIncrementalManagement() {
|
|
|
100
107
|
await handleDeleteProfile(profiles);
|
|
101
108
|
break;
|
|
102
109
|
}
|
|
110
|
+
await syncMyclaudeProfilesIfNeeded();
|
|
103
111
|
}
|
|
104
112
|
async function promptContinueAdding() {
|
|
105
113
|
return await promptBoolean({
|
|
@@ -109,7 +117,17 @@ async function promptContinueAdding() {
|
|
|
109
117
|
}
|
|
110
118
|
async function addProfileDirect() {
|
|
111
119
|
ensureI18nInitialized();
|
|
112
|
-
|
|
120
|
+
await handleAddProfile();
|
|
121
|
+
await syncMyclaudeProfilesIfNeeded();
|
|
122
|
+
}
|
|
123
|
+
function getProviderDefaultModels(provider) {
|
|
124
|
+
const defaults = provider?.claudeCode?.defaultModels || [];
|
|
125
|
+
return {
|
|
126
|
+
primaryModel: defaults[0],
|
|
127
|
+
haikuModel: defaults[1] || defaults[0],
|
|
128
|
+
sonnetModel: defaults[2] || defaults[0],
|
|
129
|
+
opusModel: defaults[3]
|
|
130
|
+
};
|
|
113
131
|
}
|
|
114
132
|
async function handleAddProfile() {
|
|
115
133
|
console.log(a.green(`
|
|
@@ -128,20 +146,18 @@ ${i18n.t("multi-config:addingNewProfile")}`));
|
|
|
128
146
|
}]);
|
|
129
147
|
let prefilledBaseUrl;
|
|
130
148
|
let prefilledAuthType;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
console.log(a.gray(i18n.t("api:providerSelected", { name: provider.name })));
|
|
137
|
-
}
|
|
149
|
+
const selectedProviderPreset = selectedProvider !== "custom" ? providers.find((p) => p.id === selectedProvider) : void 0;
|
|
150
|
+
if (selectedProviderPreset?.claudeCode) {
|
|
151
|
+
prefilledBaseUrl = selectedProviderPreset.claudeCode.baseUrl;
|
|
152
|
+
prefilledAuthType = selectedProviderPreset.claudeCode.authType;
|
|
153
|
+
console.log(a.gray(i18n.t("api:providerSelected", { name: selectedProviderPreset.name })));
|
|
138
154
|
}
|
|
139
155
|
const answers = await inquirer.prompt([
|
|
140
156
|
{
|
|
141
157
|
type: "input",
|
|
142
158
|
name: "profileName",
|
|
143
159
|
message: i18n.t("multi-config:profileNamePrompt"),
|
|
144
|
-
default:
|
|
160
|
+
default: selectedProviderPreset?.name,
|
|
145
161
|
validate: (input) => {
|
|
146
162
|
const trimmed = input.trim();
|
|
147
163
|
if (!trimmed) {
|
|
@@ -187,7 +203,7 @@ ${i18n.t("multi-config:addingNewProfile")}`));
|
|
|
187
203
|
{
|
|
188
204
|
type: "input",
|
|
189
205
|
name: "apiKey",
|
|
190
|
-
message: selectedProvider !== "custom" ? i18n.t("api:enterProviderApiKey", { provider:
|
|
206
|
+
message: selectedProvider !== "custom" ? i18n.t("api:enterProviderApiKey", { provider: selectedProviderPreset?.name || selectedProvider }) : i18n.t("multi-config:apiKeyPrompt"),
|
|
191
207
|
when: (answers2) => selectedProvider === "custom" ? answers2.authType !== "ccr_proxy" : true,
|
|
192
208
|
validate: (input) => {
|
|
193
209
|
const trimmed = input.trim();
|
|
@@ -203,9 +219,15 @@ ${i18n.t("multi-config:addingNewProfile")}`));
|
|
|
203
219
|
}
|
|
204
220
|
]);
|
|
205
221
|
let modelConfig = null;
|
|
206
|
-
|
|
222
|
+
{
|
|
207
223
|
const { promptCustomModels } = await import('./features.mjs');
|
|
208
|
-
|
|
224
|
+
const defaults = getProviderDefaultModels(selectedProviderPreset);
|
|
225
|
+
modelConfig = await promptCustomModels(
|
|
226
|
+
defaults.primaryModel,
|
|
227
|
+
defaults.haikuModel,
|
|
228
|
+
defaults.sonnetModel,
|
|
229
|
+
defaults.opusModel
|
|
230
|
+
);
|
|
209
231
|
}
|
|
210
232
|
const setAsDefault = await promptBoolean({
|
|
211
233
|
message: i18n.t("multi-config:setAsDefaultPrompt"),
|
|
@@ -216,7 +238,8 @@ ${i18n.t("multi-config:addingNewProfile")}`));
|
|
|
216
238
|
const profile = {
|
|
217
239
|
id: profileId,
|
|
218
240
|
name: profileName,
|
|
219
|
-
authType: selectedProvider === "custom" ? answers.authType : prefilledAuthType
|
|
241
|
+
authType: selectedProvider === "custom" ? answers.authType : prefilledAuthType,
|
|
242
|
+
provider: selectedProvider
|
|
220
243
|
};
|
|
221
244
|
if (profile.authType !== "ccr_proxy") {
|
|
222
245
|
profile.apiKey = answers.apiKey.trim();
|
|
@@ -253,6 +276,7 @@ ${i18n.t("multi-config:addingNewProfile")}`));
|
|
|
253
276
|
const updateResult = await ClaudeCodeConfigManager.updateProfile(existingProfile.id, {
|
|
254
277
|
name: profile.name,
|
|
255
278
|
authType: profile.authType,
|
|
279
|
+
provider: profile.provider,
|
|
256
280
|
apiKey: profile.apiKey,
|
|
257
281
|
baseUrl: profile.baseUrl,
|
|
258
282
|
primaryModel: profile.primaryModel,
|
|
@@ -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 {
|
|
4
|
+
import { k as findRealCommandPath } from './platform.mjs';
|
|
5
5
|
import 'module';
|
|
6
6
|
import 'node:child_process';
|
|
7
7
|
import 'node:path';
|
package/dist/chunks/cli-hook.mjs
CHANGED
|
@@ -2802,7 +2802,7 @@ class AutoExecutor extends EventEmitter {
|
|
|
2802
2802
|
};
|
|
2803
2803
|
}
|
|
2804
2804
|
/**
|
|
2805
|
-
* Execute user request
|
|
2805
|
+
* Execute a user request after a router has selected this executor.
|
|
2806
2806
|
*/
|
|
2807
2807
|
async execute(userInput) {
|
|
2808
2808
|
const executionId = `exec-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -3578,7 +3578,7 @@ class CliInterceptor extends EventEmitter {
|
|
|
3578
3578
|
};
|
|
3579
3579
|
}
|
|
3580
3580
|
/**
|
|
3581
|
-
* Intercept user input
|
|
3581
|
+
* Intercept user input when this component is explicitly integrated.
|
|
3582
3582
|
*/
|
|
3583
3583
|
async intercept(userInput) {
|
|
3584
3584
|
if (!this.config.enabled) {
|
|
@@ -3646,9 +3646,8 @@ class CliInterceptor extends EventEmitter {
|
|
|
3646
3646
|
* Show intent message to user
|
|
3647
3647
|
*/
|
|
3648
3648
|
showIntentMessage(_input) {
|
|
3649
|
-
console.log("\n\u{1F9E0}
|
|
3650
|
-
console.log("
|
|
3651
|
-
console.log(" Smart mode: ambiguity checks + capability-ranked tool selection + telemetry\n");
|
|
3649
|
+
console.log("\n\u{1F9E0} Brain router is handling this request...");
|
|
3650
|
+
console.log(" It may use skills, agents, and MCP tools based on the active routing config.\n");
|
|
3652
3651
|
}
|
|
3653
3652
|
async handleBypassedCommand(input, reason) {
|
|
3654
3653
|
const normalized = input.trim().toLowerCase();
|
|
@@ -40,11 +40,11 @@ import 'node:stream';
|
|
|
40
40
|
import './ccjk-config.mjs';
|
|
41
41
|
import './index3.mjs';
|
|
42
42
|
import './config.mjs';
|
|
43
|
-
import './claude-config.mjs';
|
|
44
43
|
import './platform.mjs';
|
|
45
44
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
46
45
|
import './prompts.mjs';
|
|
47
46
|
import '../shared/ccjk.gDEDGD_t.mjs';
|
|
47
|
+
import '../shared/ccjk.DKXs7Fbm.mjs';
|
|
48
48
|
|
|
49
49
|
async function configureIncrementalManagement() {
|
|
50
50
|
ensureI18nInitialized();
|
|
@@ -193,7 +193,7 @@ async function handleAddProvider() {
|
|
|
193
193
|
defaultValue: true
|
|
194
194
|
});
|
|
195
195
|
if (setAsDefault) {
|
|
196
|
-
const { switchToProvider } = await import('./codex.mjs').then(function (n) { return n.
|
|
196
|
+
const { switchToProvider } = await import('./codex.mjs').then(function (n) { return n.q; });
|
|
197
197
|
const switched = await switchToProvider(provider.id);
|
|
198
198
|
if (switched) {
|
|
199
199
|
console.log(a.green(i18n.t("multi-config:profileSetAsDefault", { name: provider.name })));
|
|
@@ -388,7 +388,7 @@ ${i18n.t("codex:copyingProvider", { name: provider.name })}`));
|
|
|
388
388
|
defaultValue: false
|
|
389
389
|
});
|
|
390
390
|
if (setAsDefault) {
|
|
391
|
-
const { switchToProvider } = await import('./codex.mjs').then(function (n) { return n.
|
|
391
|
+
const { switchToProvider } = await import('./codex.mjs').then(function (n) { return n.q; });
|
|
392
392
|
const switched = await switchToProvider(copiedProvider.id);
|
|
393
393
|
if (switched) {
|
|
394
394
|
console.log(a.green(i18n.t("multi-config:profileSetAsDefault", { name: copiedProvider.name })));
|
|
@@ -37,13 +37,13 @@ import './fs-operations.mjs';
|
|
|
37
37
|
import 'node:fs/promises';
|
|
38
38
|
import './json-config.mjs';
|
|
39
39
|
import './config.mjs';
|
|
40
|
-
import './claude-config.mjs';
|
|
41
40
|
import './platform.mjs';
|
|
42
41
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
43
42
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
44
43
|
import './prompts.mjs';
|
|
45
44
|
import '../shared/ccjk.gDEDGD_t.mjs';
|
|
46
45
|
import '../shared/ccjk.DZ2LLOa-.mjs';
|
|
46
|
+
import '../shared/ccjk.DKXs7Fbm.mjs';
|
|
47
47
|
|
|
48
48
|
async function addProviderToExisting(provider, apiKey, allowOverwrite = false) {
|
|
49
49
|
ensureI18nInitialized();
|