ccjk 13.5.2 → 13.5.4
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/README.md +5 -5
- package/dist/chunks/boost.mjs +8 -1
- package/dist/chunks/ccjk-config.mjs +17 -0
- package/dist/chunks/ccr.mjs +2 -2
- package/dist/chunks/check-updates.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +1 -1
- package/dist/chunks/codex-provider-manager.mjs +1 -1
- package/dist/chunks/codex.mjs +2 -2
- package/dist/chunks/completion.mjs +1 -1
- package/dist/chunks/config-switch.mjs +1 -1
- package/dist/chunks/context.mjs +316 -1
- package/dist/chunks/features.mjs +43 -14
- package/dist/chunks/index4.mjs +8 -1
- package/dist/chunks/init.mjs +2 -2
- package/dist/chunks/mcp-cli.mjs +3 -3
- package/dist/chunks/mcp.mjs +177 -35
- package/dist/{shared/ccjk.Crd_nEfj.mjs → chunks/memory-check.mjs} +18 -424
- package/dist/chunks/memory-paths.mjs +259 -0
- package/dist/chunks/memory-sync.mjs +209 -0
- package/dist/chunks/memory.mjs +140 -17
- package/dist/chunks/menu-hierarchical.mjs +2 -2
- package/dist/chunks/menu.mjs +1 -1
- package/dist/chunks/onboarding-wizard.mjs +8 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/quick-actions.mjs +8 -1
- package/dist/chunks/quick-setup.mjs +1 -1
- package/dist/chunks/smart-defaults.mjs +1 -20
- package/dist/chunks/status.mjs +8 -1
- package/dist/chunks/update.mjs +2 -2
- package/dist/cli.mjs +16 -4
- package/dist/shared/{ccjk.LTONy3IS.mjs → ccjk.BOfPON0N.mjs} +1 -1
- package/dist/shared/{ccjk.0aJQmVxS.mjs → ccjk.miT0g_vA.mjs} +3 -160
- package/dist/shared/ccjk.xkKNsC02.mjs +421 -0
- package/package.json +1 -1
- package/dist/chunks/auto-memory-bridge.mjs +0 -221
package/dist/chunks/init.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import process__default from 'node:process';
|
|
3
3
|
import a from './index2.mjs';
|
|
4
4
|
import { i as inquirer } from './index3.mjs';
|
|
5
|
-
import { s as selectMcpServices, g as getMcpServices, M as MCP_SERVICE_CONFIGS } from '../shared/ccjk.
|
|
5
|
+
import { s as selectMcpServices, g as getMcpServices, M as MCP_SERVICE_CONFIGS } from '../shared/ccjk.miT0g_vA.mjs';
|
|
6
6
|
import { s as selectAndInstallWorkflows, W as WORKFLOW_CONFIG_BASE } from '../shared/ccjk.C3o4BXvM.mjs';
|
|
7
7
|
import { SETTINGS_FILE, DEFAULT_CODE_TOOL_TYPE, CODE_TOOL_BANNERS, API_DEFAULT_URL } from './constants.mjs';
|
|
8
8
|
import { ensureI18nInitialized, i18n } from './index5.mjs';
|
|
@@ -44,9 +44,9 @@ import 'node:os';
|
|
|
44
44
|
import 'node:crypto';
|
|
45
45
|
import 'buffer';
|
|
46
46
|
import 'string_decoder';
|
|
47
|
-
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
48
47
|
import 'node:fs/promises';
|
|
49
48
|
import 'node:url';
|
|
49
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
50
50
|
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
51
51
|
import './index6.mjs';
|
|
52
52
|
import '../shared/ccjk.RyizuzOI.mjs';
|
package/dist/chunks/mcp-cli.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import a from './index2.mjs';
|
|
2
|
-
import { g as getMcpServices } from '../shared/ccjk.
|
|
2
|
+
import { g as getMcpServices } from '../shared/ccjk.miT0g_vA.mjs';
|
|
3
3
|
import { i18n } from './index5.mjs';
|
|
4
4
|
import { r as readMcpConfig } from './claude-config.mjs';
|
|
5
|
-
import { i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.
|
|
5
|
+
import { i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.BOfPON0N.mjs';
|
|
6
6
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
7
7
|
import './index3.mjs';
|
|
8
8
|
import 'node:readline';
|
|
@@ -21,9 +21,9 @@ import 'node:crypto';
|
|
|
21
21
|
import 'buffer';
|
|
22
22
|
import 'string_decoder';
|
|
23
23
|
import 'node:child_process';
|
|
24
|
-
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
25
24
|
import 'node:fs';
|
|
26
25
|
import 'node:url';
|
|
26
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
27
27
|
import './constants.mjs';
|
|
28
28
|
import './json-config.mjs';
|
|
29
29
|
import '../shared/ccjk.RyizuzOI.mjs';
|
package/dist/chunks/mcp.mjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import a from './index2.mjs';
|
|
2
|
+
import { CLOUD_ENDPOINTS, isCodeToolType } from './constants.mjs';
|
|
2
3
|
import { i18n } from './index5.mjs';
|
|
4
|
+
import { readZcfConfig } from './ccjk-config.mjs';
|
|
3
5
|
import 'node:child_process';
|
|
4
6
|
import 'node:process';
|
|
5
7
|
import { M as MCP_SERVICE_TIERS, i as isCoreService, g as getServicesByTier, c as checkMcpPerformance, f as formatPerformanceWarning, a as calculateResourceUsage, b as getOptimizationSuggestions, d as getMcpTierConfig } from './mcp-performance.mjs';
|
|
6
8
|
import { r as readMcpConfig, b as backupMcpConfig, w as writeMcpConfig } from './claude-config.mjs';
|
|
7
9
|
import { i as inquirer } from './index3.mjs';
|
|
8
|
-
import { M as MCP_SERVICE_CONFIGS } from '../shared/ccjk.
|
|
9
|
-
import { d as displayInstalledMcpServices, b as isMcpServiceInstalled, i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.
|
|
10
|
+
import { M as MCP_SERVICE_CONFIGS } from '../shared/ccjk.miT0g_vA.mjs';
|
|
11
|
+
import { d as displayInstalledMcpServices, b as isMcpServiceInstalled, i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.BOfPON0N.mjs';
|
|
10
12
|
import { existsSync, unlinkSync, statSync, mkdirSync, readFileSync } from 'node:fs';
|
|
11
13
|
import { homedir } from 'node:os';
|
|
12
14
|
import { writeFileAtomic } from './fs-operations.mjs';
|
|
13
|
-
import { CLOUD_ENDPOINTS } from './constants.mjs';
|
|
14
15
|
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
16
|
+
import { a as readCodexConfig, d as backupCodexComplete, w as writeCodexConfig, g as applyCodexPlatformCommand } from './codex.mjs';
|
|
17
|
+
import { i as isWindows, l as getSystemRoot } from './platform.mjs';
|
|
15
18
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
16
19
|
import 'node:url';
|
|
20
|
+
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
21
|
+
import './index6.mjs';
|
|
17
22
|
import './json-config.mjs';
|
|
18
23
|
import '../shared/ccjk.RyizuzOI.mjs';
|
|
19
24
|
import 'node:crypto';
|
|
20
25
|
import 'node:fs/promises';
|
|
21
|
-
import './platform.mjs';
|
|
22
|
-
import './main.mjs';
|
|
23
|
-
import 'module';
|
|
24
|
-
import 'node:path';
|
|
25
|
-
import 'node:stream';
|
|
26
26
|
import 'node:readline';
|
|
27
27
|
import 'stream';
|
|
28
28
|
import 'node:tty';
|
|
@@ -32,15 +32,15 @@ import 'node:util';
|
|
|
32
32
|
import 'tty';
|
|
33
33
|
import 'fs';
|
|
34
34
|
import 'child_process';
|
|
35
|
+
import 'node:path';
|
|
35
36
|
import 'buffer';
|
|
36
37
|
import 'string_decoder';
|
|
37
|
-
import './codex.mjs';
|
|
38
38
|
import './index7.mjs';
|
|
39
39
|
import '../shared/ccjk.DeWpAShp.mjs';
|
|
40
40
|
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
41
|
-
import '
|
|
42
|
-
import '
|
|
43
|
-
import '
|
|
41
|
+
import './main.mjs';
|
|
42
|
+
import 'module';
|
|
43
|
+
import 'node:stream';
|
|
44
44
|
import './config2.mjs';
|
|
45
45
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
46
46
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
@@ -1082,6 +1082,97 @@ function getProfileDescription(profile, lang = "en") {
|
|
|
1082
1082
|
return lang === "zh-CN" ? profile.descriptionZh : profile.description;
|
|
1083
1083
|
}
|
|
1084
1084
|
|
|
1085
|
+
function resolveProfileTool(options = {}) {
|
|
1086
|
+
if (options.tool === "codex" || options.tool === "claude-code") {
|
|
1087
|
+
return options.tool;
|
|
1088
|
+
}
|
|
1089
|
+
const zcfConfig = readZcfConfig();
|
|
1090
|
+
if (zcfConfig?.codeToolType && isCodeToolType(zcfConfig.codeToolType)) {
|
|
1091
|
+
return zcfConfig.codeToolType === "codex" ? "codex" : "claude-code";
|
|
1092
|
+
}
|
|
1093
|
+
return "claude-code";
|
|
1094
|
+
}
|
|
1095
|
+
function getToolDisplayName(tool, isZh) {
|
|
1096
|
+
if (tool === "codex") {
|
|
1097
|
+
return "Codex";
|
|
1098
|
+
}
|
|
1099
|
+
return isZh ? "Claude Code" : "Claude Code";
|
|
1100
|
+
}
|
|
1101
|
+
function getConfiguredServiceIds(tool) {
|
|
1102
|
+
if (tool === "codex") {
|
|
1103
|
+
const config2 = readCodexConfig();
|
|
1104
|
+
return (config2?.mcpServices || []).map((service) => service.id);
|
|
1105
|
+
}
|
|
1106
|
+
const config = readMcpConfig();
|
|
1107
|
+
return config?.mcpServers ? Object.keys(config.mcpServers) : [];
|
|
1108
|
+
}
|
|
1109
|
+
function buildCodexProfileService(serviceId) {
|
|
1110
|
+
const serviceConfig = MCP_SERVICE_CONFIGS.find((service) => service.id.toLowerCase() === serviceId.toLowerCase());
|
|
1111
|
+
if (!serviceConfig) {
|
|
1112
|
+
return null;
|
|
1113
|
+
}
|
|
1114
|
+
let command = serviceConfig.config.command || serviceId;
|
|
1115
|
+
let args = (serviceConfig.config.args || []).map((arg) => String(arg));
|
|
1116
|
+
if (serviceId === "serena") {
|
|
1117
|
+
const idx = args.indexOf("--context");
|
|
1118
|
+
if (idx >= 0 && idx + 1 < args.length) {
|
|
1119
|
+
args[idx + 1] = "codex";
|
|
1120
|
+
} else {
|
|
1121
|
+
args.push("--context", "codex");
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
const normalizedService = {
|
|
1125
|
+
id: serviceId.toLowerCase(),
|
|
1126
|
+
command,
|
|
1127
|
+
args
|
|
1128
|
+
};
|
|
1129
|
+
applyCodexPlatformCommand(normalizedService);
|
|
1130
|
+
const env = { ...serviceConfig.config.env || {} };
|
|
1131
|
+
if (isWindows()) {
|
|
1132
|
+
const systemRoot = getSystemRoot();
|
|
1133
|
+
if (systemRoot) {
|
|
1134
|
+
env.SYSTEMROOT = systemRoot;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
return {
|
|
1138
|
+
id: normalizedService.id,
|
|
1139
|
+
command: normalizedService.command,
|
|
1140
|
+
args: normalizedService.args || [],
|
|
1141
|
+
env: Object.keys(env).length > 0 ? env : void 0,
|
|
1142
|
+
startup_timeout_sec: 30
|
|
1143
|
+
};
|
|
1144
|
+
}
|
|
1145
|
+
function backupProfileConfig(tool) {
|
|
1146
|
+
return tool === "codex" ? backupCodexComplete() : backupMcpConfig();
|
|
1147
|
+
}
|
|
1148
|
+
function writeProfileForTool(tool, servicesToEnable) {
|
|
1149
|
+
if (tool === "codex") {
|
|
1150
|
+
const existingConfig2 = readCodexConfig();
|
|
1151
|
+
const mcpServices = servicesToEnable.map(buildCodexProfileService).filter((service) => service !== null);
|
|
1152
|
+
const newConfig = {
|
|
1153
|
+
model: existingConfig2?.model || null,
|
|
1154
|
+
modelProvider: existingConfig2?.modelProvider || null,
|
|
1155
|
+
providers: existingConfig2?.providers || [],
|
|
1156
|
+
mcpServices,
|
|
1157
|
+
otherConfig: existingConfig2?.otherConfig || [],
|
|
1158
|
+
modelProviderCommented: existingConfig2?.modelProviderCommented
|
|
1159
|
+
};
|
|
1160
|
+
writeCodexConfig(newConfig);
|
|
1161
|
+
return;
|
|
1162
|
+
}
|
|
1163
|
+
const newServers = {};
|
|
1164
|
+
for (const serviceId of servicesToEnable) {
|
|
1165
|
+
const serviceConfig = MCP_SERVICE_CONFIGS.find((s) => s.id.toLowerCase() === serviceId.toLowerCase());
|
|
1166
|
+
if (serviceConfig) {
|
|
1167
|
+
newServers[serviceId] = serviceConfig.config;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
const existingConfig = readMcpConfig() || {};
|
|
1171
|
+
writeMcpConfig({
|
|
1172
|
+
...existingConfig,
|
|
1173
|
+
mcpServers: newServers
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1085
1176
|
async function listProfiles(options = {}) {
|
|
1086
1177
|
const lang = options.lang || i18n.language || "en";
|
|
1087
1178
|
const isZh = lang === "zh-CN";
|
|
@@ -1106,16 +1197,54 @@ async function listProfiles(options = {}) {
|
|
|
1106
1197
|
console.log(a.dim(isZh ? "\u4F7F\u7528 `ccjk mcp profile use <id>` \u5207\u6362\u914D\u7F6E" : "Use `ccjk mcp profile use <id>` to switch profile"));
|
|
1107
1198
|
console.log("");
|
|
1108
1199
|
}
|
|
1200
|
+
async function showCurrentProfile(options = {}) {
|
|
1201
|
+
const lang = options.lang || i18n.language || "en";
|
|
1202
|
+
const isZh = lang === "zh-CN";
|
|
1203
|
+
const tool = resolveProfileTool(options);
|
|
1204
|
+
const toolName = getToolDisplayName(tool, isZh);
|
|
1205
|
+
const currentServices = getConfiguredServiceIds(tool);
|
|
1206
|
+
const normalizedServices = currentServices.map((service) => service.toLowerCase());
|
|
1207
|
+
console.log("");
|
|
1208
|
+
console.log(a.bold.cyan(isZh ? `\u{1F4CA} \u5F53\u524D ${toolName} MCP \u914D\u7F6E\u72B6\u6001` : `\u{1F4CA} Current ${toolName} MCP Configuration`));
|
|
1209
|
+
console.log(a.dim("\u2500".repeat(50)));
|
|
1210
|
+
console.log("");
|
|
1211
|
+
console.log(`${a.bold(isZh ? "\u5DF2\u914D\u7F6E\u670D\u52A1" : "Configured Services")}: ${currentServices.length}`);
|
|
1212
|
+
if (currentServices.length > 0) {
|
|
1213
|
+
console.log(a.dim(` ${currentServices.join(", ")}`));
|
|
1214
|
+
}
|
|
1215
|
+
const warning = checkMcpPerformance(currentServices.length);
|
|
1216
|
+
if (warning) {
|
|
1217
|
+
console.log("");
|
|
1218
|
+
console.log(formatPerformanceWarning(warning, lang));
|
|
1219
|
+
}
|
|
1220
|
+
const matchedProfile = MCP_PROFILES.find((profile) => {
|
|
1221
|
+
if (profile.services.length === 0)
|
|
1222
|
+
return false;
|
|
1223
|
+
if (profile.services.length !== currentServices.length)
|
|
1224
|
+
return false;
|
|
1225
|
+
return profile.services.every((s) => normalizedServices.includes(s.toLowerCase()));
|
|
1226
|
+
});
|
|
1227
|
+
if (matchedProfile) {
|
|
1228
|
+
console.log("");
|
|
1229
|
+
console.log(`${a.bold(isZh ? "\u5339\u914D\u9884\u8BBE" : "Matched Profile")}: ${a.green(matchedProfile.id)}`);
|
|
1230
|
+
} else {
|
|
1231
|
+
console.log("");
|
|
1232
|
+
console.log(a.dim(isZh ? "\u5F53\u524D\u914D\u7F6E\u4E0D\u5339\u914D\u4EFB\u4F55\u9884\u8BBE" : "Current config does not match any profile"));
|
|
1233
|
+
}
|
|
1234
|
+
console.log("");
|
|
1235
|
+
}
|
|
1109
1236
|
async function useProfile(profileId, options = {}) {
|
|
1110
1237
|
const lang = options.lang || i18n.language || "en";
|
|
1111
1238
|
const isZh = lang === "zh-CN";
|
|
1239
|
+
const tool = resolveProfileTool(options);
|
|
1240
|
+
const toolName = getToolDisplayName(tool, isZh);
|
|
1112
1241
|
const profile = getProfileById(profileId);
|
|
1113
1242
|
if (!profile) {
|
|
1114
1243
|
console.log(a.red(isZh ? `\u274C \u672A\u627E\u5230\u914D\u7F6E\u9884\u8BBE: ${profileId}` : `\u274C Profile not found: ${profileId}`));
|
|
1115
1244
|
console.log(a.dim(isZh ? `\u53EF\u7528\u9884\u8BBE: ${getProfileIds().join(", ")}` : `Available profiles: ${getProfileIds().join(", ")}`));
|
|
1116
1245
|
return;
|
|
1117
1246
|
}
|
|
1118
|
-
const backupPath =
|
|
1247
|
+
const backupPath = backupProfileConfig(tool);
|
|
1119
1248
|
if (backupPath) {
|
|
1120
1249
|
console.log(a.gray(`\u2714 ${isZh ? "\u5DF2\u5907\u4EFD\u5F53\u524D\u914D\u7F6E" : "Backed up current config"}: ${backupPath}`));
|
|
1121
1250
|
}
|
|
@@ -1125,21 +1254,9 @@ async function useProfile(profileId, options = {}) {
|
|
|
1125
1254
|
} else {
|
|
1126
1255
|
servicesToEnable = profile.services;
|
|
1127
1256
|
}
|
|
1128
|
-
|
|
1129
|
-
for (const serviceId of servicesToEnable) {
|
|
1130
|
-
const serviceConfig = MCP_SERVICE_CONFIGS.find((s) => s.id === serviceId);
|
|
1131
|
-
if (serviceConfig) {
|
|
1132
|
-
newServers[serviceId] = serviceConfig.config;
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
const existingConfig = readMcpConfig() || {};
|
|
1136
|
-
const newConfig = {
|
|
1137
|
-
...existingConfig,
|
|
1138
|
-
mcpServers: newServers
|
|
1139
|
-
};
|
|
1140
|
-
writeMcpConfig(newConfig);
|
|
1257
|
+
writeProfileForTool(tool, servicesToEnable);
|
|
1141
1258
|
const profileName = getProfileName(profile, lang);
|
|
1142
|
-
console.log(a.green(`\u2714 ${isZh ? "\u5DF2\u5207\u6362\u5230\u914D\u7F6E\u9884\u8BBE" : "
|
|
1259
|
+
console.log(a.green(`\u2714 ${isZh ? "\u5DF2\u4E3A" : "Switched"} ${toolName}${isZh ? " \u5207\u6362\u5230\u914D\u7F6E\u9884\u8BBE" : " profile"}: ${profileName}`));
|
|
1143
1260
|
console.log(a.dim(` ${isZh ? "\u5DF2\u542F\u7528\u670D\u52A1" : "Enabled services"}: ${servicesToEnable.length}`));
|
|
1144
1261
|
const warning = checkMcpPerformance(servicesToEnable.length);
|
|
1145
1262
|
if (warning) {
|
|
@@ -1147,25 +1264,46 @@ async function useProfile(profileId, options = {}) {
|
|
|
1147
1264
|
console.log(formatPerformanceWarning(warning, lang));
|
|
1148
1265
|
}
|
|
1149
1266
|
console.log("");
|
|
1150
|
-
console.log(a.yellow(isZh ?
|
|
1267
|
+
console.log(a.yellow(isZh ? `\u26A0\uFE0F \u8BF7\u91CD\u542F ${toolName} \u4EE5\u4F7F\u66F4\u6539\u751F\u6548` : `\u26A0\uFE0F Please restart ${toolName} for changes to take effect`));
|
|
1151
1268
|
}
|
|
1152
1269
|
|
|
1270
|
+
function resolveMcpTool(options = {}) {
|
|
1271
|
+
if (options.tool === "codex" || options.tool === "claude-code") {
|
|
1272
|
+
return options.tool;
|
|
1273
|
+
}
|
|
1274
|
+
const zcfConfig = readZcfConfig();
|
|
1275
|
+
if (zcfConfig?.codeToolType && isCodeToolType(zcfConfig.codeToolType)) {
|
|
1276
|
+
return zcfConfig.codeToolType === "codex" ? "codex" : "claude-code";
|
|
1277
|
+
}
|
|
1278
|
+
return "claude-code";
|
|
1279
|
+
}
|
|
1280
|
+
function getServiceTier(serviceId, tiers) {
|
|
1281
|
+
const directMatch = tiers[serviceId];
|
|
1282
|
+
if (directMatch) {
|
|
1283
|
+
return directMatch;
|
|
1284
|
+
}
|
|
1285
|
+
const caseInsensitiveMatch = Object.entries(tiers).find(
|
|
1286
|
+
([id]) => id.toLowerCase() === serviceId.toLowerCase()
|
|
1287
|
+
);
|
|
1288
|
+
return caseInsensitiveMatch?.[1] || "ondemand";
|
|
1289
|
+
}
|
|
1153
1290
|
async function mcpStatus(options = {}) {
|
|
1154
1291
|
const { readMcpConfig } = await import('./claude-config.mjs').then(function (n) { return n.h; });
|
|
1292
|
+
const { readCodexConfig } = await import('./codex.mjs').then(function (n) { return n.i; });
|
|
1155
1293
|
const { checkMcpPerformance, formatPerformanceWarning } = await import('./mcp-performance.mjs').then(function (n) { return n.e; });
|
|
1156
1294
|
const { MCP_SERVICE_TIERS } = await import('./mcp-performance.mjs').then(function (n) { return n.m; });
|
|
1157
1295
|
const lang = options.lang || i18n.language || "en";
|
|
1158
1296
|
const isZh = lang === "zh-CN";
|
|
1297
|
+
const targetTool = resolveMcpTool(options);
|
|
1298
|
+
const services = targetTool === "codex" ? (readCodexConfig()?.mcpServices || []).map((service) => service.id) : Object.keys((await readMcpConfig())?.mcpServers || {});
|
|
1159
1299
|
console.log("");
|
|
1160
|
-
console.log(a.bold.cyan(isZh ?
|
|
1300
|
+
console.log(a.bold.cyan(isZh ? `\u26A1 ${targetTool === "codex" ? "Codex" : "Claude Code"} MCP \u5FEB\u901F\u72B6\u6001` : `\u26A1 ${targetTool === "codex" ? "Codex" : "Claude Code"} MCP Quick Status`));
|
|
1161
1301
|
console.log(a.dim("\u2500".repeat(40)));
|
|
1162
|
-
const config = await readMcpConfig();
|
|
1163
|
-
const services = Object.keys(config?.mcpServers || {});
|
|
1164
1302
|
let coreCount = 0;
|
|
1165
1303
|
let ondemandCount = 0;
|
|
1166
1304
|
let scenarioCount = 0;
|
|
1167
1305
|
for (const svc of services) {
|
|
1168
|
-
const tier =
|
|
1306
|
+
const tier = getServiceTier(svc, MCP_SERVICE_TIERS);
|
|
1169
1307
|
if (tier === "core")
|
|
1170
1308
|
coreCount++;
|
|
1171
1309
|
else if (tier === "ondemand")
|
|
@@ -1186,7 +1324,7 @@ async function mcpStatus(options = {}) {
|
|
|
1186
1324
|
console.log(a.green(isZh ? "\u2713 \u6027\u80FD\u72B6\u6001\u826F\u597D" : "\u2713 Performance OK"));
|
|
1187
1325
|
}
|
|
1188
1326
|
console.log("");
|
|
1189
|
-
console.log(a.dim(isZh ?
|
|
1327
|
+
console.log(a.dim(isZh ? `\u63D0\u793A: \u4F7F\u7528 ccjk mcp doctor${targetTool === "codex" ? " -T codex" : ""} \u67E5\u770B\u8BE6\u7EC6\u8BCA\u65AD` : `Tip: Use ccjk mcp doctor${targetTool === "codex" ? " -T codex" : ""} for detailed diagnostics`));
|
|
1190
1328
|
}
|
|
1191
1329
|
function mcpHelp(options = {}) {
|
|
1192
1330
|
const lang = options.lang || i18n.language || "en";
|
|
@@ -1206,7 +1344,11 @@ function mcpHelp(options = {}) {
|
|
|
1206
1344
|
},
|
|
1207
1345
|
{
|
|
1208
1346
|
cmd: "ccjk mcp profile [name]",
|
|
1209
|
-
desc: isZh ? "\u5207\u6362\u914D\u7F6E\u9884\u8BBE (minimal/
|
|
1347
|
+
desc: isZh ? "\u5207\u6362\u914D\u7F6E\u9884\u8BBE (minimal/development/full)" : "Switch profile (minimal/development/full)"
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
cmd: "ccjk mcp profile use minimal -T codex",
|
|
1351
|
+
desc: isZh ? "\u5207\u6362 Codex \u542F\u52A8\u65F6\u52A0\u8F7D\u7684 MCP \u7EC4\u5408" : "Switch the MCP set loaded on Codex startup"
|
|
1210
1352
|
},
|
|
1211
1353
|
{
|
|
1212
1354
|
cmd: "ccjk mcp release",
|
|
@@ -1230,4 +1372,4 @@ function mcpHelp(options = {}) {
|
|
|
1230
1372
|
console.log(a.dim(isZh ? "\u{1F4A1} \u63A8\u8350: \u4F7F\u7528 minimal \u9884\u8BBE\u53EF\u663E\u8457\u63D0\u5347\u6027\u80FD" : "\u{1F4A1} Tip: Use minimal profile for best performance"));
|
|
1231
1373
|
}
|
|
1232
1374
|
|
|
1233
|
-
export { listProfiles, mcpDoctor, mcpHelp, mcpInstall, mcpList, mcpRelease, mcpSearch, mcpStatus, mcpUninstall, useProfile };
|
|
1375
|
+
export { listProfiles, mcpDoctor, mcpHelp, mcpInstall, mcpList, mcpRelease, mcpSearch, mcpStatus, mcpUninstall, showCurrentProfile, useProfile };
|