ccjk 9.3.2 → 9.3.3
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/ccr.mjs +1 -1
- package/dist/chunks/menu.mjs +83 -11
- package/dist/chunks/package.mjs +1 -1
- package/package.json +1 -1
package/dist/chunks/ccr.mjs
CHANGED
|
@@ -43,6 +43,7 @@ import 'node:path';
|
|
|
43
43
|
import '../shared/ccjk.SIo9I8q3.mjs';
|
|
44
44
|
import '../shared/ccjk.KfIN1Sqj.mjs';
|
|
45
45
|
import './installer.mjs';
|
|
46
|
+
import './claude-code-config-manager.mjs';
|
|
46
47
|
import './ccu.mjs';
|
|
47
48
|
import './commands.mjs';
|
|
48
49
|
import './update.mjs';
|
|
@@ -51,7 +52,6 @@ import './api-providers.mjs';
|
|
|
51
52
|
import '../shared/ccjk.pi0nsyn3.mjs';
|
|
52
53
|
import '../shared/ccjk.J8YiPsOw.mjs';
|
|
53
54
|
import './config-switch.mjs';
|
|
54
|
-
import './claude-code-config-manager.mjs';
|
|
55
55
|
import './uninstall.mjs';
|
|
56
56
|
import 'fs-extra';
|
|
57
57
|
import '../shared/ccjk.DGjQxTq_.mjs';
|
package/dist/chunks/menu.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { updateZcfConfig, readZcfConfig } from './ccjk-config.mjs';
|
|
|
9
9
|
import { configureMcpFeature, configureApiFeature, changeScriptLanguageFeature } from './features.mjs';
|
|
10
10
|
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.DvIrK0wz.mjs';
|
|
11
11
|
import { r as resolveCodeType } from '../shared/ccjk.SIo9I8q3.mjs';
|
|
12
|
+
import { ClaudeCodeConfigManager } from './claude-code-config-manager.mjs';
|
|
12
13
|
import { executeCcusage } from './ccu.mjs';
|
|
13
14
|
import { p as promptBoolean } from '../shared/ccjk.DHbrGcgg.mjs';
|
|
14
15
|
import { spawn, exec } from 'node:child_process';
|
|
@@ -379,15 +380,17 @@ async function showSimplifiedMenu() {
|
|
|
379
380
|
const doctorDesc = isZh ? "\u8BCA\u65AD\u95EE\u9898\u5E76\u81EA\u52A8\u4FEE\u590D" : "Diagnose issues and auto-fix";
|
|
380
381
|
const updateName = isZh ? "3. \u{1F504} \u4E00\u952E\u66F4\u65B0" : "3. \u{1F504} Update All";
|
|
381
382
|
const updateDesc = isZh ? "\u66F4\u65B0\u6240\u6709\u7EC4\u4EF6\u5230\u6700\u65B0\u7248\u672C" : "Update all components to latest version";
|
|
382
|
-
const
|
|
383
|
+
const apiName = isZh ? "4. \u{1F511} API \u7BA1\u7406" : "4. \u{1F511} API Manager";
|
|
384
|
+
const apiDesc = isZh ? "\u914D\u7F6E API URL\u3001\u8BA4\u8BC1\u4FE1\u606F\u6216 CCR \u4EE3\u7406" : "Configure API URL, auth or CCR proxy";
|
|
385
|
+
const skillsName = isZh ? "5. \u{1F4DA} Skills \u7BA1\u7406" : "5. \u{1F4DA} Skills Manager";
|
|
383
386
|
const skillsDesc = isZh ? "\u5B89\u88C5/\u66F4\u65B0/\u5220\u9664\u5DE5\u4F5C\u6D41\u6280\u80FD" : "Install/update/remove workflow skills";
|
|
384
|
-
const mcpName = isZh ? "
|
|
387
|
+
const mcpName = isZh ? "6. \u{1F50C} MCP \u7BA1\u7406" : "6. \u{1F50C} MCP Manager";
|
|
385
388
|
const mcpDesc = isZh ? "\u914D\u7F6E Model Context Protocol \u670D\u52A1" : "Configure Model Context Protocol services";
|
|
386
|
-
const agentsName = isZh ? "
|
|
389
|
+
const agentsName = isZh ? "7. \u{1F916} Agents \u7BA1\u7406" : "7. \u{1F916} Agents Manager";
|
|
387
390
|
const agentsDesc = isZh ? "\u521B\u5EFA/\u7BA1\u7406 AI \u667A\u80FD\u4F53" : "Create/manage AI agents";
|
|
388
|
-
const languageName = isZh ? "
|
|
391
|
+
const languageName = isZh ? "8. \u{1F30D} \u8BED\u8A00\u8BBE\u7F6E" : "8. \u{1F30D} Language";
|
|
389
392
|
const languageDesc = isZh ? "\u5207\u6362\u754C\u9762\u8BED\u8A00" : "Switch interface language";
|
|
390
|
-
const helpName = isZh ? "
|
|
393
|
+
const helpName = isZh ? "9. \u2753 \u5E2E\u52A9\u6587\u6863" : "9. \u2753 Help";
|
|
391
394
|
const helpDesc = isZh ? "\u67E5\u770B\u4F7F\u7528\u6307\u5357" : "View user guide";
|
|
392
395
|
const exitText = isZh ? "0. \u{1F6AA} \u9000\u51FA" : "0. \u{1F6AA} Exit";
|
|
393
396
|
console.log("");
|
|
@@ -399,6 +402,7 @@ async function showSimplifiedMenu() {
|
|
|
399
402
|
console.log("");
|
|
400
403
|
console.log(ansis.bold.green(`${advancedTitle}`));
|
|
401
404
|
console.log(ansis.dim("\u2500".repeat(50)));
|
|
405
|
+
console.log(` ${ansis.green(apiName)} ${ansis.dim(`- ${apiDesc}`)}`);
|
|
402
406
|
console.log(` ${ansis.green(skillsName)} ${ansis.dim(`- ${skillsDesc}`)}`);
|
|
403
407
|
console.log(` ${ansis.green(mcpName)} ${ansis.dim(`- ${mcpDesc}`)}`);
|
|
404
408
|
console.log(` ${ansis.green(agentsName)} ${ansis.dim(`- ${agentsDesc}`)}`);
|
|
@@ -413,9 +417,9 @@ async function showSimplifiedMenu() {
|
|
|
413
417
|
const { choice } = await inquirer.prompt({
|
|
414
418
|
type: "input",
|
|
415
419
|
name: "choice",
|
|
416
|
-
message: isZh ? "\u8BF7\u8F93\u5165\u9009\u9879 (0-
|
|
420
|
+
message: isZh ? "\u8BF7\u8F93\u5165\u9009\u9879 (0-9):" : "Enter option (0-9):",
|
|
417
421
|
validate: (value) => {
|
|
418
|
-
const valid = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "q", "Q"];
|
|
422
|
+
const valid = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "q", "Q"];
|
|
419
423
|
return valid.includes(value) || (isZh ? "\u8BF7\u8F93\u5165\u6709\u6548\u9009\u9879" : "Please enter a valid option");
|
|
420
424
|
}
|
|
421
425
|
});
|
|
@@ -447,31 +451,37 @@ async function showSimplifiedMenu() {
|
|
|
447
451
|
break;
|
|
448
452
|
// Advanced
|
|
449
453
|
case "4":
|
|
454
|
+
console.log("");
|
|
455
|
+
console.log(ansis.green(isZh ? "\u{1F511} API \u7BA1\u7406..." : "\u{1F511} API Manager..."));
|
|
456
|
+
console.log("");
|
|
457
|
+
await showApiConfigMenu();
|
|
458
|
+
break;
|
|
459
|
+
case "5":
|
|
450
460
|
console.log("");
|
|
451
461
|
console.log(ansis.green(isZh ? "\u{1F4DA} Skills \u7BA1\u7406..." : "\u{1F4DA} Skills Manager..."));
|
|
452
462
|
console.log("");
|
|
453
463
|
await ccjkSkills({});
|
|
454
464
|
break;
|
|
455
|
-
case "
|
|
465
|
+
case "6":
|
|
456
466
|
console.log("");
|
|
457
467
|
console.log(ansis.green(isZh ? "\u{1F50C} MCP \u7BA1\u7406..." : "\u{1F50C} MCP Manager..."));
|
|
458
468
|
console.log("");
|
|
459
469
|
await ccjkMcp({});
|
|
460
470
|
break;
|
|
461
|
-
case "
|
|
471
|
+
case "7":
|
|
462
472
|
console.log("");
|
|
463
473
|
console.log(ansis.green(isZh ? "\u{1F916} Agents \u7BA1\u7406..." : "\u{1F916} Agents Manager..."));
|
|
464
474
|
console.log("");
|
|
465
475
|
await ccjkAgents({});
|
|
466
476
|
break;
|
|
467
477
|
// System
|
|
468
|
-
case "
|
|
478
|
+
case "8":
|
|
469
479
|
{
|
|
470
480
|
const currentLang = i18n.language;
|
|
471
481
|
await changeScriptLanguageFeature(currentLang);
|
|
472
482
|
}
|
|
473
483
|
break;
|
|
474
|
-
case "
|
|
484
|
+
case "9":
|
|
475
485
|
console.log("");
|
|
476
486
|
console.log(ansis.bold.cyan(isZh ? "\u{1F4D6} CCJK \u4F7F\u7528\u6307\u5357" : "\u{1F4D6} CCJK User Guide"));
|
|
477
487
|
console.log("");
|
|
@@ -510,6 +520,68 @@ async function showSimplifiedMenu() {
|
|
|
510
520
|
}
|
|
511
521
|
return void 0;
|
|
512
522
|
}
|
|
523
|
+
async function showApiConfigMenu() {
|
|
524
|
+
const lang = i18n.language;
|
|
525
|
+
const isZh = lang === "zh-CN";
|
|
526
|
+
console.log("");
|
|
527
|
+
console.log(ansis.bold.cyan(isZh ? "\u{1F511} API \u914D\u7F6E\u7BA1\u7406" : "\u{1F511} API Configuration"));
|
|
528
|
+
console.log("");
|
|
529
|
+
const choices = [
|
|
530
|
+
{ name: isZh ? "1. \u4F7F\u7528\u5B98\u65B9\u767B\u5F55\uFF08\u4E0D\u914D\u7F6E API\uFF09" : "1. Use Official Login (No API Config)", value: "official" },
|
|
531
|
+
{ name: isZh ? "2. \u81EA\u5B9A\u4E49 API \u914D\u7F6E" : "2. Custom API Configuration", value: "custom" },
|
|
532
|
+
{ name: isZh ? "3. \u4F7F\u7528 CCR \u4EE3\u7406" : "3. Use CCR Proxy", value: "ccr" },
|
|
533
|
+
{ name: isZh ? "4. \u5207\u6362 API \u914D\u7F6E" : "4. Switch API Configuration", value: "switch" },
|
|
534
|
+
{ name: isZh ? "5. \u67E5\u770B\u5F53\u524D\u914D\u7F6E" : "5. View Current Configuration", value: "view" },
|
|
535
|
+
{ name: isZh ? "6. \u8FD4\u56DE\u4E3B\u83DC\u5355" : "6. Back to Main Menu", value: "back" }
|
|
536
|
+
];
|
|
537
|
+
const { choice } = await inquirer.prompt({
|
|
538
|
+
type: "list",
|
|
539
|
+
name: "choice",
|
|
540
|
+
message: isZh ? "\u8BF7\u9009\u62E9 API \u914D\u7F6E\u6A21\u5F0F:" : "Select API configuration mode:",
|
|
541
|
+
choices,
|
|
542
|
+
pageSize: 10
|
|
543
|
+
});
|
|
544
|
+
if (!choice || choice === "back") {
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
const codeTool = getCurrentCodeTool();
|
|
548
|
+
switch (choice) {
|
|
549
|
+
case "official":
|
|
550
|
+
if (codeTool === "claude-code") {
|
|
551
|
+
const result = await ClaudeCodeConfigManager.switchToOfficial();
|
|
552
|
+
if (result.success) {
|
|
553
|
+
console.log(ansis.green(isZh ? "\u2705 \u5DF2\u5207\u6362\u5230\u5B98\u65B9\u767B\u5F55" : "\u2705 Switched to official login"));
|
|
554
|
+
} else {
|
|
555
|
+
console.log(ansis.red(isZh ? `\u274C \u5207\u6362\u5931\u8D25: ${result.error}` : `\u274C Failed to switch: ${result.error}`));
|
|
556
|
+
}
|
|
557
|
+
} else {
|
|
558
|
+
console.log(ansis.yellow(isZh ? "\u26A0\uFE0F \u5F53\u524D\u4EE3\u7801\u5DE5\u5177\u4E0D\u652F\u6301\u6B64\u529F\u80FD" : "\u26A0\uFE0F Current code tool does not support this feature"));
|
|
559
|
+
}
|
|
560
|
+
break;
|
|
561
|
+
case "custom":
|
|
562
|
+
await configureApiFeature();
|
|
563
|
+
break;
|
|
564
|
+
case "ccr":
|
|
565
|
+
if (codeTool === "claude-code") {
|
|
566
|
+
const result = await ClaudeCodeConfigManager.switchToCcr();
|
|
567
|
+
if (result.success) {
|
|
568
|
+
console.log(ansis.green(isZh ? "\u2705 \u5DF2\u5207\u6362\u5230 CCR \u4EE3\u7406" : "\u2705 Switched to CCR proxy"));
|
|
569
|
+
} else {
|
|
570
|
+
console.log(ansis.red(isZh ? `\u274C \u5207\u6362\u5931\u8D25: ${result.error}` : `\u274C Failed to switch: ${result.error}`));
|
|
571
|
+
}
|
|
572
|
+
} else {
|
|
573
|
+
console.log(ansis.yellow(isZh ? "\u26A0\uFE0F \u5F53\u524D\u4EE3\u7801\u5DE5\u5177\u4E0D\u652F\u6301\u6B64\u529F\u80FD" : "\u26A0\uFE0F Current code tool does not support this feature"));
|
|
574
|
+
}
|
|
575
|
+
break;
|
|
576
|
+
case "switch":
|
|
577
|
+
await configSwitchCommand({ codeType: codeTool });
|
|
578
|
+
break;
|
|
579
|
+
case "view":
|
|
580
|
+
await configSwitchCommand({ codeType: codeTool, list: true });
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
printSeparator();
|
|
584
|
+
}
|
|
513
585
|
async function showAdvancedMenu() {
|
|
514
586
|
const lang = i18n.language;
|
|
515
587
|
const isZh = lang === "zh-CN";
|
package/dist/chunks/package.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccjk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "9.3.
|
|
4
|
+
"version": "9.3.3",
|
|
5
5
|
"packageManager": "pnpm@10.17.1",
|
|
6
6
|
"description": "CCJK v9.0.0 - Revolutionary AI Development Platform with Enterprise Security, Streaming Cloud Sync, CRDT Conflict Resolution, and Unified V3 Architecture",
|
|
7
7
|
"author": {
|