ccjk 12.0.7 → 12.0.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.
- package/package.json +1 -1
- package/dist/chunks/agent-teams.mjs +0 -136
- package/dist/chunks/agent.mjs +0 -1439
- package/dist/chunks/agents.mjs +0 -3778
- package/dist/chunks/api-cli.mjs +0 -132
- package/dist/chunks/api-providers.mjs +0 -129
- package/dist/chunks/api.mjs +0 -112
- package/dist/chunks/auto-bootstrap.mjs +0 -358
- package/dist/chunks/auto-init.mjs +0 -7584
- package/dist/chunks/auto-updater.mjs +0 -410
- package/dist/chunks/banner.mjs +0 -188
- package/dist/chunks/bash.mjs +0 -187
- package/dist/chunks/boost.mjs +0 -397
- package/dist/chunks/ccjk-agents.mjs +0 -414
- package/dist/chunks/ccjk-all.mjs +0 -1028
- package/dist/chunks/ccjk-config.mjs +0 -261
- package/dist/chunks/ccjk-hooks.mjs +0 -1074
- package/dist/chunks/ccjk-mcp.mjs +0 -761
- package/dist/chunks/ccjk-setup.mjs +0 -763
- package/dist/chunks/ccjk-skills.mjs +0 -514
- package/dist/chunks/ccr.mjs +0 -98
- package/dist/chunks/ccu.mjs +0 -40
- package/dist/chunks/check-updates.mjs +0 -108
- package/dist/chunks/claude-code-config-manager.mjs +0 -750
- package/dist/chunks/claude-code-incremental-manager.mjs +0 -623
- package/dist/chunks/claude-config.mjs +0 -236
- package/dist/chunks/claude-wrapper.mjs +0 -85
- package/dist/chunks/cleanup-migration.mjs +0 -20
- package/dist/chunks/cli-hook.mjs +0 -2285
- package/dist/chunks/cloud-sync.mjs +0 -29
- package/dist/chunks/codex-config-switch.mjs +0 -451
- package/dist/chunks/codex-provider-manager.mjs +0 -236
- package/dist/chunks/codex-uninstaller.mjs +0 -404
- package/dist/chunks/codex.mjs +0 -2077
- package/dist/chunks/commands.mjs +0 -108
- package/dist/chunks/commands2.mjs +0 -413
- package/dist/chunks/commit.mjs +0 -138
- package/dist/chunks/completion.mjs +0 -515
- package/dist/chunks/config-consolidator.mjs +0 -172
- package/dist/chunks/config-switch.mjs +0 -317
- package/dist/chunks/config.mjs +0 -379
- package/dist/chunks/config2.mjs +0 -477
- package/dist/chunks/config3.mjs +0 -470
- package/dist/chunks/constants.mjs +0 -133
- package/dist/chunks/context-loader.mjs +0 -343
- package/dist/chunks/context.mjs +0 -372
- package/dist/chunks/convoy-manager.mjs +0 -880
- package/dist/chunks/dashboard.mjs +0 -476
- package/dist/chunks/doctor.mjs +0 -964
- package/dist/chunks/evolution.mjs +0 -382
- package/dist/chunks/features.mjs +0 -698
- package/dist/chunks/fish.mjs +0 -181
- package/dist/chunks/fs-operations.mjs +0 -192
- package/dist/chunks/health-alerts.mjs +0 -304
- package/dist/chunks/health-check.mjs +0 -532
- package/dist/chunks/help.mjs +0 -340
- package/dist/chunks/hook-installer.mjs +0 -45
- package/dist/chunks/index.mjs +0 -24
- package/dist/chunks/index10.mjs +0 -1171
- package/dist/chunks/index11.mjs +0 -1008
- package/dist/chunks/index12.mjs +0 -193
- package/dist/chunks/index13.mjs +0 -218
- package/dist/chunks/index14.mjs +0 -663
- package/dist/chunks/index2.mjs +0 -19
- package/dist/chunks/index3.mjs +0 -19092
- package/dist/chunks/index4.mjs +0 -8
- package/dist/chunks/index5.mjs +0 -7600
- package/dist/chunks/index6.mjs +0 -171
- package/dist/chunks/index7.mjs +0 -3583
- package/dist/chunks/index8.mjs +0 -19
- package/dist/chunks/index9.mjs +0 -616
- package/dist/chunks/init.mjs +0 -1606
- package/dist/chunks/installer.mjs +0 -690
- package/dist/chunks/installer2.mjs +0 -179
- package/dist/chunks/interview.mjs +0 -2927
- package/dist/chunks/json-config.mjs +0 -60
- package/dist/chunks/linux.mjs +0 -3863
- package/dist/chunks/macos.mjs +0 -69
- package/dist/chunks/main.mjs +0 -635
- package/dist/chunks/manager.mjs +0 -1048
- package/dist/chunks/marketplace.mjs +0 -949
- package/dist/chunks/mcp-cli.mjs +0 -204
- package/dist/chunks/mcp-performance.mjs +0 -187
- package/dist/chunks/mcp.mjs +0 -1231
- package/dist/chunks/menu.mjs +0 -652
- package/dist/chunks/metrics-display.mjs +0 -153
- package/dist/chunks/migrator.mjs +0 -178
- package/dist/chunks/monitor.mjs +0 -1856
- package/dist/chunks/notification.mjs +0 -1864
- package/dist/chunks/onboarding.mjs +0 -385
- package/dist/chunks/package.mjs +0 -3
- package/dist/chunks/paradigm.mjs +0 -74
- package/dist/chunks/permission-manager.mjs +0 -132
- package/dist/chunks/permissions.mjs +0 -265
- package/dist/chunks/persistence-manager.mjs +0 -794
- package/dist/chunks/persistence.mjs +0 -667
- package/dist/chunks/platform.mjs +0 -391
- package/dist/chunks/plugin.mjs +0 -1936
- package/dist/chunks/powershell.mjs +0 -213
- package/dist/chunks/prompts.mjs +0 -241
- package/dist/chunks/providers.mjs +0 -260
- package/dist/chunks/quick-actions.mjs +0 -320
- package/dist/chunks/quick-provider.mjs +0 -682
- package/dist/chunks/quick-setup.mjs +0 -412
- package/dist/chunks/remote.mjs +0 -497
- package/dist/chunks/session.mjs +0 -878
- package/dist/chunks/sessions.mjs +0 -106
- package/dist/chunks/silent-updater.mjs +0 -396
- package/dist/chunks/simple-config.mjs +0 -98
- package/dist/chunks/skill.mjs +0 -117
- package/dist/chunks/skill2.mjs +0 -9003
- package/dist/chunks/skills-sync.mjs +0 -6460
- package/dist/chunks/skills.mjs +0 -567
- package/dist/chunks/slash-commands.mjs +0 -207
- package/dist/chunks/smart-defaults.mjs +0 -412
- package/dist/chunks/smart-guide.mjs +0 -194
- package/dist/chunks/startup.mjs +0 -487
- package/dist/chunks/stats.mjs +0 -410
- package/dist/chunks/status.mjs +0 -289
- package/dist/chunks/team.mjs +0 -63
- package/dist/chunks/thinking.mjs +0 -626
- package/dist/chunks/trace.mjs +0 -57
- package/dist/chunks/uninstall.mjs +0 -849
- package/dist/chunks/update.mjs +0 -167
- package/dist/chunks/upgrade-manager.mjs +0 -204
- package/dist/chunks/version-checker.mjs +0 -881
- package/dist/chunks/vim.mjs +0 -903
- package/dist/chunks/windows.mjs +0 -14
- package/dist/chunks/workflows.mjs +0 -633
- package/dist/chunks/wsl.mjs +0 -129
- package/dist/chunks/zero-config.mjs +0 -374
- package/dist/chunks/zsh.mjs +0 -182
- package/dist/cli.d.mts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.mjs +0 -2199
- package/dist/i18n/locales/en/agent-teams.json +0 -18
- package/dist/i18n/locales/en/agentBrowser.json +0 -79
- package/dist/i18n/locales/en/agents.json +0 -135
- package/dist/i18n/locales/en/api.json +0 -63
- package/dist/i18n/locales/en/ccjk-agents.json +0 -33
- package/dist/i18n/locales/en/ccjk-all.json +0 -23
- package/dist/i18n/locales/en/ccjk-skills.json +0 -22
- package/dist/i18n/locales/en/ccjk.json +0 -276
- package/dist/i18n/locales/en/ccr.json +0 -65
- package/dist/i18n/locales/en/claude-md.json +0 -73
- package/dist/i18n/locales/en/cli.json +0 -152
- package/dist/i18n/locales/en/cloud-setup.json +0 -31
- package/dist/i18n/locales/en/cloud-sync.json +0 -147
- package/dist/i18n/locales/en/cloud.json +0 -40
- package/dist/i18n/locales/en/cloudPlugins.json +0 -118
- package/dist/i18n/locales/en/codex.json +0 -127
- package/dist/i18n/locales/en/cometix.json +0 -29
- package/dist/i18n/locales/en/common.json +0 -68
- package/dist/i18n/locales/en/config.json +0 -108
- package/dist/i18n/locales/en/configuration.json +0 -226
- package/dist/i18n/locales/en/context.json +0 -85
- package/dist/i18n/locales/en/dashboard.json +0 -78
- package/dist/i18n/locales/en/errors.json +0 -26
- package/dist/i18n/locales/en/evolution.json +0 -54
- package/dist/i18n/locales/en/hooks.json +0 -74
- package/dist/i18n/locales/en/hooksSync.json +0 -133
- package/dist/i18n/locales/en/installation.json +0 -83
- package/dist/i18n/locales/en/interview.json +0 -104
- package/dist/i18n/locales/en/language.json +0 -19
- package/dist/i18n/locales/en/lsp.json +0 -78
- package/dist/i18n/locales/en/marketplace.json +0 -116
- package/dist/i18n/locales/en/mcp.json +0 -178
- package/dist/i18n/locales/en/memory.json +0 -92
- package/dist/i18n/locales/en/menu.json +0 -143
- package/dist/i18n/locales/en/multi-config.json +0 -79
- package/dist/i18n/locales/en/notification.json +0 -307
- package/dist/i18n/locales/en/permissions.json +0 -95
- package/dist/i18n/locales/en/persistence.json +0 -127
- package/dist/i18n/locales/en/plugins.json +0 -146
- package/dist/i18n/locales/en/quick-actions.json +0 -78
- package/dist/i18n/locales/en/registry.json +0 -54
- package/dist/i18n/locales/en/remote.json +0 -93
- package/dist/i18n/locales/en/sandbox.json +0 -44
- package/dist/i18n/locales/en/setup.json +0 -44
- package/dist/i18n/locales/en/shencha.json +0 -14
- package/dist/i18n/locales/en/skills.json +0 -100
- package/dist/i18n/locales/en/skillsSync.json +0 -74
- package/dist/i18n/locales/en/smartGuide.json +0 -49
- package/dist/i18n/locales/en/stats.json +0 -20
- package/dist/i18n/locales/en/subagent.json +0 -69
- package/dist/i18n/locales/en/superpowers.json +0 -117
- package/dist/i18n/locales/en/team.json +0 -7
- package/dist/i18n/locales/en/thinking.json +0 -65
- package/dist/i18n/locales/en/tools.json +0 -42
- package/dist/i18n/locales/en/uninstall.json +0 -56
- package/dist/i18n/locales/en/updater.json +0 -29
- package/dist/i18n/locales/en/vim.json +0 -169
- package/dist/i18n/locales/en/workflow.json +0 -55
- package/dist/i18n/locales/en/workspace.json +0 -108
- package/dist/i18n/locales/zh-CN/agent-teams.json +0 -18
- package/dist/i18n/locales/zh-CN/agentBrowser.json +0 -79
- package/dist/i18n/locales/zh-CN/agents.json +0 -135
- package/dist/i18n/locales/zh-CN/api.json +0 -63
- package/dist/i18n/locales/zh-CN/ccjk-agents.json +0 -33
- package/dist/i18n/locales/zh-CN/ccjk-all.json +0 -23
- package/dist/i18n/locales/zh-CN/ccjk-skills.json +0 -22
- package/dist/i18n/locales/zh-CN/ccjk.json +0 -276
- package/dist/i18n/locales/zh-CN/ccr.json +0 -65
- package/dist/i18n/locales/zh-CN/claude-md.json +0 -73
- package/dist/i18n/locales/zh-CN/cli.json +0 -152
- package/dist/i18n/locales/zh-CN/cloud-setup.json +0 -31
- package/dist/i18n/locales/zh-CN/cloud-sync.json +0 -147
- package/dist/i18n/locales/zh-CN/cloud.json +0 -40
- package/dist/i18n/locales/zh-CN/cloudPlugins.json +0 -118
- package/dist/i18n/locales/zh-CN/codex.json +0 -127
- package/dist/i18n/locales/zh-CN/cometix.json +0 -29
- package/dist/i18n/locales/zh-CN/common.json +0 -68
- package/dist/i18n/locales/zh-CN/config.json +0 -108
- package/dist/i18n/locales/zh-CN/configuration.json +0 -224
- package/dist/i18n/locales/zh-CN/context.json +0 -85
- package/dist/i18n/locales/zh-CN/dashboard.json +0 -78
- package/dist/i18n/locales/zh-CN/errors.json +0 -26
- package/dist/i18n/locales/zh-CN/evolution.json +0 -54
- package/dist/i18n/locales/zh-CN/hooks.json +0 -74
- package/dist/i18n/locales/zh-CN/hooksSync.json +0 -133
- package/dist/i18n/locales/zh-CN/installation.json +0 -83
- package/dist/i18n/locales/zh-CN/interview.json +0 -104
- package/dist/i18n/locales/zh-CN/language.json +0 -19
- package/dist/i18n/locales/zh-CN/lsp.json +0 -78
- package/dist/i18n/locales/zh-CN/marketplace.json +0 -116
- package/dist/i18n/locales/zh-CN/mcp.json +0 -178
- package/dist/i18n/locales/zh-CN/memory.json +0 -92
- package/dist/i18n/locales/zh-CN/menu.json +0 -143
- package/dist/i18n/locales/zh-CN/multi-config.json +0 -79
- package/dist/i18n/locales/zh-CN/notification.json +0 -307
- package/dist/i18n/locales/zh-CN/permissions.json +0 -95
- package/dist/i18n/locales/zh-CN/persistence.json +0 -127
- package/dist/i18n/locales/zh-CN/plugins.json +0 -146
- package/dist/i18n/locales/zh-CN/quick-actions.json +0 -78
- package/dist/i18n/locales/zh-CN/registry.json +0 -54
- package/dist/i18n/locales/zh-CN/remote.json +0 -93
- package/dist/i18n/locales/zh-CN/sandbox.json +0 -44
- package/dist/i18n/locales/zh-CN/setup.json +0 -44
- package/dist/i18n/locales/zh-CN/shencha.json +0 -14
- package/dist/i18n/locales/zh-CN/skills.json +0 -100
- package/dist/i18n/locales/zh-CN/skillsSync.json +0 -74
- package/dist/i18n/locales/zh-CN/smartGuide.json +0 -49
- package/dist/i18n/locales/zh-CN/stats.json +0 -20
- package/dist/i18n/locales/zh-CN/subagent.json +0 -69
- package/dist/i18n/locales/zh-CN/superpowers.json +0 -117
- package/dist/i18n/locales/zh-CN/team.json +0 -7
- package/dist/i18n/locales/zh-CN/thinking.json +0 -65
- package/dist/i18n/locales/zh-CN/tools.json +0 -42
- package/dist/i18n/locales/zh-CN/uninstall.json +0 -56
- package/dist/i18n/locales/zh-CN/updater.json +0 -29
- package/dist/i18n/locales/zh-CN/vim.json +0 -169
- package/dist/i18n/locales/zh-CN/workflow.json +0 -55
- package/dist/i18n/locales/zh-CN/workspace.json +0 -108
- package/dist/index.d.mts +0 -5295
- package/dist/index.d.ts +0 -5295
- package/dist/index.mjs +0 -4941
- package/dist/shared/ccjk.B364Fu0N.mjs +0 -1819
- package/dist/shared/ccjk.BAGoDD49.mjs +0 -36
- package/dist/shared/ccjk.BBtCGd_g.mjs +0 -899
- package/dist/shared/ccjk.BFQ7yr5S.mjs +0 -16
- package/dist/shared/ccjk.BFxsJM0k.mjs +0 -599
- package/dist/shared/ccjk.BIxuVL3_.mjs +0 -25
- package/dist/shared/ccjk.BRZ9ww8S.mjs +0 -142
- package/dist/shared/ccjk.BoApaI4j.mjs +0 -28
- package/dist/shared/ccjk.BrPUmTqm.mjs +0 -266
- package/dist/shared/ccjk.BtB1e5jm.mjs +0 -171
- package/dist/shared/ccjk.BwfbSKN2.mjs +0 -1051
- package/dist/shared/ccjk.BxSmJ8B7.mjs +0 -243
- package/dist/shared/ccjk.Bx_rmYfN.mjs +0 -69
- package/dist/shared/ccjk.C2jHOZVP.mjs +0 -52
- package/dist/shared/ccjk.CL4Yat0G.mjs +0 -303
- package/dist/shared/ccjk.COweQ1RR.mjs +0 -5
- package/dist/shared/ccjk.CePkJq2S.mjs +0 -223
- package/dist/shared/ccjk.CfKKcvWy.mjs +0 -126
- package/dist/shared/ccjk.Cjgrln_h.mjs +0 -297
- package/dist/shared/ccjk.Cjj8SVrn.mjs +0 -54
- package/dist/shared/ccjk.CxpGa6MC.mjs +0 -2724
- package/dist/shared/ccjk.D5MFQT7w.mjs +0 -400
- package/dist/shared/ccjk.D6ycHbak.mjs +0 -270
- package/dist/shared/ccjk.D8ZLYSZZ.mjs +0 -299
- package/dist/shared/ccjk.DG_o24cZ.mjs +0 -88
- package/dist/shared/ccjk.DLLw-h4Y.mjs +0 -460
- package/dist/shared/ccjk.DOwtZMk8.mjs +0 -4019
- package/dist/shared/ccjk.DS7UESmF.mjs +0 -2451
- package/dist/shared/ccjk.DTdjs-qK.mjs +0 -1447
- package/dist/shared/ccjk.DXRAZcix.mjs +0 -66
- package/dist/shared/ccjk.DsYaCCx4.mjs +0 -317
- package/dist/shared/ccjk.J8YiPsOw.mjs +0 -259
- package/dist/shared/ccjk.KfSWcGlE.mjs +0 -38
- package/dist/shared/ccjk.RyizuzOI.mjs +0 -21
- package/dist/shared/ccjk.SPoXMvZD.mjs +0 -1242
- package/dist/shared/ccjk.T_cX87dY.mjs +0 -15
- package/dist/shared/ccjk.UIvifqNE.mjs +0 -1486
- package/dist/shared/ccjk._dESH4Rk.mjs +0 -111
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +0 -249
- package/dist/shared/ccjk.c-ETfBZ_.mjs +0 -617
- package/dist/shared/ccjk.gDEDGD_t.mjs +0 -38
- package/dist/shared/ccjk.hoqrwWdN.mjs +0 -333
- package/dist/shared/ccjk.waa2ikKJ.mjs +0 -351
package/dist/chunks/mcp-cli.mjs
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import a from './index2.mjs';
|
|
2
|
-
import { i18n } from './index5.mjs';
|
|
3
|
-
import { g as getMcpServices } from './codex.mjs';
|
|
4
|
-
import { r as readMcpConfig } from './claude-config.mjs';
|
|
5
|
-
import { i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.waa2ikKJ.mjs';
|
|
6
|
-
import '../shared/ccjk.BAGoDD49.mjs';
|
|
7
|
-
import 'node:fs';
|
|
8
|
-
import 'node:process';
|
|
9
|
-
import 'node:url';
|
|
10
|
-
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
11
|
-
import '../shared/ccjk.RyizuzOI.mjs';
|
|
12
|
-
import './index3.mjs';
|
|
13
|
-
import 'node:readline';
|
|
14
|
-
import 'stream';
|
|
15
|
-
import 'node:tty';
|
|
16
|
-
import 'node:async_hooks';
|
|
17
|
-
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
18
|
-
import 'node:util';
|
|
19
|
-
import 'tty';
|
|
20
|
-
import 'fs';
|
|
21
|
-
import 'child_process';
|
|
22
|
-
import 'node:path';
|
|
23
|
-
import 'node:os';
|
|
24
|
-
import 'node:crypto';
|
|
25
|
-
import 'buffer';
|
|
26
|
-
import 'string_decoder';
|
|
27
|
-
import './index7.mjs';
|
|
28
|
-
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
29
|
-
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
30
|
-
import './main.mjs';
|
|
31
|
-
import 'module';
|
|
32
|
-
import 'node:child_process';
|
|
33
|
-
import 'node:stream';
|
|
34
|
-
import './constants.mjs';
|
|
35
|
-
import './ccjk-config.mjs';
|
|
36
|
-
import './index6.mjs';
|
|
37
|
-
import './fs-operations.mjs';
|
|
38
|
-
import 'node:fs/promises';
|
|
39
|
-
import './json-config.mjs';
|
|
40
|
-
import './config.mjs';
|
|
41
|
-
import '../shared/ccjk.DXRAZcix.mjs';
|
|
42
|
-
import './platform.mjs';
|
|
43
|
-
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
44
|
-
import './prompts.mjs';
|
|
45
|
-
import '../shared/ccjk.gDEDGD_t.mjs';
|
|
46
|
-
import '../shared/ccjk.DOwtZMk8.mjs';
|
|
47
|
-
|
|
48
|
-
async function mcpInstallCli(options) {
|
|
49
|
-
const lang = options.lang || i18n.language || "en";
|
|
50
|
-
const isZh = lang === "zh-CN";
|
|
51
|
-
if (!options.services || options.services.length === 0) {
|
|
52
|
-
console.log(a.red(isZh ? "\u9519\u8BEF: \u5FC5\u987B\u6307\u5B9A\u670D\u52A1\u540D\u79F0" : "Error: Service names required"));
|
|
53
|
-
console.log(a.dim(isZh ? "\u7528\u6CD5: ccjk mcp install <service1> [service2...]" : "Usage: ccjk mcp install <service1> [service2...]"));
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
|
56
|
-
const availableServices = await getMcpServices();
|
|
57
|
-
const invalidServices = options.services.filter(
|
|
58
|
-
(s) => !availableServices.some((svc) => svc.id === s)
|
|
59
|
-
);
|
|
60
|
-
if (invalidServices.length > 0) {
|
|
61
|
-
console.log(a.red(isZh ? `\u9519\u8BEF: \u672A\u77E5\u7684\u670D\u52A1: ${invalidServices.join(", ")}` : `Error: Unknown services: ${invalidServices.join(", ")}`));
|
|
62
|
-
console.log(a.dim(isZh ? "\u63D0\u793A: \u4F7F\u7528 ccjk mcp list \u67E5\u770B\u53EF\u7528\u670D\u52A1" : "Tip: Use ccjk mcp list to see available services"));
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
if (!options.yes) {
|
|
66
|
-
const inquirer = await import('./index3.mjs').then(function (n) { return n.c; });
|
|
67
|
-
const { confirm } = await inquirer.default.prompt([{
|
|
68
|
-
type: "confirm",
|
|
69
|
-
name: "confirm",
|
|
70
|
-
message: isZh ? `\u786E\u8BA4\u5B89\u88C5 ${options.services.length} \u4E2A MCP \u670D\u52A1?` : `Install ${options.services.length} MCP service(s)?`,
|
|
71
|
-
default: true
|
|
72
|
-
}]);
|
|
73
|
-
if (!confirm) {
|
|
74
|
-
console.log(a.yellow(isZh ? "\u5DF2\u53D6\u6D88" : "Cancelled"));
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
let successCount = 0;
|
|
79
|
-
let failCount = 0;
|
|
80
|
-
for (const serviceId of options.services) {
|
|
81
|
-
const result = await installMcpService(serviceId, options.tool);
|
|
82
|
-
if (result.success) {
|
|
83
|
-
successCount++;
|
|
84
|
-
} else {
|
|
85
|
-
failCount++;
|
|
86
|
-
console.log(a.red(isZh ? `\u2717 \u5B89\u88C5 ${serviceId} \u5931\u8D25: ${result.error || "\u672A\u77E5\u9519\u8BEF"}` : `\u2717 Failed to install ${serviceId}: ${result.error || "Unknown error"}`));
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (successCount > 0) {
|
|
90
|
-
console.log(a.green(isZh ? `\u2713 \u5DF2\u5B89\u88C5 ${successCount} \u4E2A\u670D\u52A1` : `\u2713 Installed ${successCount} service(s)`));
|
|
91
|
-
}
|
|
92
|
-
if (failCount > 0) {
|
|
93
|
-
console.log(a.red(isZh ? `\u2717 ${failCount} \u4E2A\u670D\u52A1\u5B89\u88C5\u5931\u8D25` : `\u2717 ${failCount} service(s) failed`));
|
|
94
|
-
}
|
|
95
|
-
if (successCount > 0) {
|
|
96
|
-
console.log(a.dim(isZh ? "\u63D0\u793A: \u91CD\u542F Claude Code \u4EE5\u5E94\u7528\u66F4\u6539" : "Tip: Restart Claude Code to apply changes"));
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
async function mcpUninstallCli(options) {
|
|
100
|
-
const lang = options.lang || i18n.language || "en";
|
|
101
|
-
const isZh = lang === "zh-CN";
|
|
102
|
-
if (!options.services || options.services.length === 0) {
|
|
103
|
-
console.log(a.red(isZh ? "\u9519\u8BEF: \u5FC5\u987B\u6307\u5B9A\u670D\u52A1\u540D\u79F0" : "Error: Service names required"));
|
|
104
|
-
console.log(a.dim(isZh ? "\u7528\u6CD5: ccjk mcp uninstall <service1> [service2...]" : "Usage: ccjk mcp uninstall <service1> [service2...]"));
|
|
105
|
-
process.exit(1);
|
|
106
|
-
}
|
|
107
|
-
const config = readMcpConfig();
|
|
108
|
-
if (!config || !config.mcpServers) {
|
|
109
|
-
console.log(a.yellow(isZh ? "\u672A\u5B89\u88C5\u4EFB\u4F55 MCP \u670D\u52A1" : "No MCP services installed"));
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
const notInstalled = options.services.filter((s) => !config.mcpServers[s]);
|
|
113
|
-
if (notInstalled.length > 0) {
|
|
114
|
-
console.log(a.yellow(isZh ? `\u8B66\u544A: \u4EE5\u4E0B\u670D\u52A1\u672A\u5B89\u88C5: ${notInstalled.join(", ")}` : `Warning: Not installed: ${notInstalled.join(", ")}`));
|
|
115
|
-
}
|
|
116
|
-
const toRemove = options.services.filter((s) => config.mcpServers[s]);
|
|
117
|
-
if (toRemove.length === 0) {
|
|
118
|
-
console.log(a.yellow(isZh ? "\u6CA1\u6709\u670D\u52A1\u9700\u8981\u5378\u8F7D" : "No services to uninstall"));
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
if (!options.yes) {
|
|
122
|
-
const inquirer = await import('./index3.mjs').then(function (n) { return n.c; });
|
|
123
|
-
const { confirm } = await inquirer.default.prompt([{
|
|
124
|
-
type: "confirm",
|
|
125
|
-
name: "confirm",
|
|
126
|
-
message: isZh ? `\u786E\u8BA4\u5378\u8F7D ${toRemove.length} \u4E2A MCP \u670D\u52A1?` : `Uninstall ${toRemove.length} MCP service(s)?`,
|
|
127
|
-
default: true
|
|
128
|
-
}]);
|
|
129
|
-
if (!confirm) {
|
|
130
|
-
console.log(a.yellow(isZh ? "\u5DF2\u53D6\u6D88" : "Cancelled"));
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
let successCount = 0;
|
|
135
|
-
let failCount = 0;
|
|
136
|
-
for (const serviceId of toRemove) {
|
|
137
|
-
const result = await uninstallMcpService(serviceId, options.tool);
|
|
138
|
-
if (result.success) {
|
|
139
|
-
successCount++;
|
|
140
|
-
} else {
|
|
141
|
-
failCount++;
|
|
142
|
-
console.log(a.red(isZh ? `\u2717 \u5378\u8F7D ${serviceId} \u5931\u8D25: ${result.error || "\u672A\u77E5\u9519\u8BEF"}` : `\u2717 Failed to uninstall ${serviceId}: ${result.error || "Unknown error"}`));
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
if (successCount > 0) {
|
|
146
|
-
console.log(a.green(isZh ? `\u2713 \u5DF2\u5378\u8F7D ${successCount} \u4E2A\u670D\u52A1` : `\u2713 Uninstalled ${successCount} service(s)`));
|
|
147
|
-
}
|
|
148
|
-
if (failCount > 0) {
|
|
149
|
-
console.log(a.red(isZh ? `\u2717 ${failCount} \u4E2A\u670D\u52A1\u5378\u8F7D\u5931\u8D25` : `\u2717 ${failCount} service(s) failed`));
|
|
150
|
-
}
|
|
151
|
-
if (successCount > 0) {
|
|
152
|
-
console.log(a.dim(isZh ? "\u63D0\u793A: \u91CD\u542F Claude Code \u4EE5\u5E94\u7528\u66F4\u6539" : "Tip: Restart Claude Code to apply changes"));
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
async function mcpListCli(options = {}) {
|
|
156
|
-
const lang = options.lang || i18n.language || "en";
|
|
157
|
-
const isZh = lang === "zh-CN";
|
|
158
|
-
const availableServices = await getMcpServices();
|
|
159
|
-
const config = readMcpConfig();
|
|
160
|
-
const installedServices = Object.keys(config?.mcpServers || {});
|
|
161
|
-
if (options.json) {
|
|
162
|
-
const output = {
|
|
163
|
-
installed: installedServices,
|
|
164
|
-
available: availableServices.map((s) => ({
|
|
165
|
-
id: s.id,
|
|
166
|
-
name: s.name,
|
|
167
|
-
description: s.description,
|
|
168
|
-
installed: installedServices.includes(s.id)
|
|
169
|
-
}))
|
|
170
|
-
};
|
|
171
|
-
console.log(JSON.stringify(output, null, 2));
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
console.log("");
|
|
175
|
-
console.log(a.bold.cyan(isZh ? "\u{1F4E6} MCP \u670D\u52A1" : "\u{1F4E6} MCP Services"));
|
|
176
|
-
console.log(a.dim("\u2500".repeat(50)));
|
|
177
|
-
console.log("");
|
|
178
|
-
if (options.installed) {
|
|
179
|
-
if (installedServices.length === 0) {
|
|
180
|
-
console.log(a.yellow(isZh ? "\u672A\u5B89\u88C5\u4EFB\u4F55\u670D\u52A1" : "No services installed"));
|
|
181
|
-
} else {
|
|
182
|
-
console.log(a.green(isZh ? `\u5DF2\u5B89\u88C5 ${installedServices.length} \u4E2A\u670D\u52A1:` : `${installedServices.length} service(s) installed:`));
|
|
183
|
-
for (const serviceId of installedServices) {
|
|
184
|
-
const service = availableServices.find((s) => s.id === serviceId);
|
|
185
|
-
const name = service ? service.name : serviceId;
|
|
186
|
-
console.log(` ${a.green("\u25CF")} ${name} ${a.dim(`(${serviceId})`)}`);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
} else {
|
|
190
|
-
console.log(a.dim(isZh ? "\u53EF\u7528\u670D\u52A1:" : "Available services:"));
|
|
191
|
-
for (const service of availableServices) {
|
|
192
|
-
const installed = installedServices.includes(service.id);
|
|
193
|
-
const icon = installed ? a.green("\u2713") : a.dim("\u25CB");
|
|
194
|
-
const name = service.name;
|
|
195
|
-
const desc = service.description;
|
|
196
|
-
console.log(` ${icon} ${a.bold(name)} ${a.dim(`(${service.id})`)}`);
|
|
197
|
-
console.log(` ${a.dim(desc)}`);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
console.log("");
|
|
201
|
-
console.log(a.dim(isZh ? "\u63D0\u793A: \u4F7F\u7528 ccjk mcp install <service> \u5B89\u88C5\u670D\u52A1" : "Tip: Use ccjk mcp install <service> to install a service"));
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export { mcpInstallCli, mcpListCli, mcpUninstallCli };
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
const MCP_TIER_DEFAULTS = {
|
|
2
|
-
core: {
|
|
3
|
-
tier: "core",
|
|
4
|
-
autoStart: true,
|
|
5
|
-
idleTimeout: void 0,
|
|
6
|
-
// Never timeout
|
|
7
|
-
description: "Essential services, always available"
|
|
8
|
-
},
|
|
9
|
-
ondemand: {
|
|
10
|
-
tier: "ondemand",
|
|
11
|
-
autoStart: false,
|
|
12
|
-
idleTimeout: 300,
|
|
13
|
-
// 5 minutes
|
|
14
|
-
description: "Loaded when needed, auto-released after idle"
|
|
15
|
-
},
|
|
16
|
-
scenario: {
|
|
17
|
-
tier: "scenario",
|
|
18
|
-
autoStart: false,
|
|
19
|
-
idleTimeout: 600,
|
|
20
|
-
// 10 minutes
|
|
21
|
-
description: "Loaded for specific scenarios"
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
const MCP_SERVICE_TIERS = {
|
|
25
|
-
// Core services - high frequency, essential
|
|
26
|
-
"context7": "core",
|
|
27
|
-
"open-websearch": "core",
|
|
28
|
-
// On-demand services - medium frequency
|
|
29
|
-
"mcp-deepwiki": "ondemand",
|
|
30
|
-
"Playwright": "ondemand",
|
|
31
|
-
// Removed: puppeteer (duplicate of Playwright), filesystem (buggy),
|
|
32
|
-
// memory (Claude built-in), sequential-thinking (limited value), fetch (Claude WebFetch)
|
|
33
|
-
// Scenario services - low frequency, specific use cases
|
|
34
|
-
"sqlite": "scenario",
|
|
35
|
-
"spec-workflow": "scenario",
|
|
36
|
-
"serena": "scenario"
|
|
37
|
-
};
|
|
38
|
-
function getMcpTierConfig(serviceId) {
|
|
39
|
-
const tier = MCP_SERVICE_TIERS[serviceId] || "ondemand";
|
|
40
|
-
return MCP_TIER_DEFAULTS[tier];
|
|
41
|
-
}
|
|
42
|
-
function getServicesByTier(tier) {
|
|
43
|
-
return Object.entries(MCP_SERVICE_TIERS).filter(([_, t]) => t === tier).map(([id]) => id);
|
|
44
|
-
}
|
|
45
|
-
function isCoreService(serviceId) {
|
|
46
|
-
return MCP_SERVICE_TIERS[serviceId] === "core";
|
|
47
|
-
}
|
|
48
|
-
const MCP_PERFORMANCE_THRESHOLDS = {
|
|
49
|
-
/** Warning threshold for number of services */
|
|
50
|
-
warningCount: 5,
|
|
51
|
-
/** Critical threshold for number of services */
|
|
52
|
-
criticalCount: 8,
|
|
53
|
-
/** Maximum recommended services */
|
|
54
|
-
maxRecommended: 6,
|
|
55
|
-
/** Estimated memory per service (MB) */
|
|
56
|
-
estimatedMemoryPerService: 50,
|
|
57
|
-
/** Estimated CPU overhead per service (%) */
|
|
58
|
-
estimatedCpuPerService: 5
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const mcpTiers = {
|
|
62
|
-
__proto__: null,
|
|
63
|
-
MCP_PERFORMANCE_THRESHOLDS: MCP_PERFORMANCE_THRESHOLDS,
|
|
64
|
-
MCP_SERVICE_TIERS: MCP_SERVICE_TIERS,
|
|
65
|
-
MCP_TIER_DEFAULTS: MCP_TIER_DEFAULTS,
|
|
66
|
-
getMcpTierConfig: getMcpTierConfig,
|
|
67
|
-
getServicesByTier: getServicesByTier,
|
|
68
|
-
isCoreService: isCoreService
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
function checkMcpPerformance(serviceCount) {
|
|
72
|
-
const { warningCount, criticalCount, estimatedMemoryPerService, estimatedCpuPerService } = MCP_PERFORMANCE_THRESHOLDS;
|
|
73
|
-
const estimatedMemory = serviceCount * estimatedMemoryPerService;
|
|
74
|
-
const estimatedCpu = serviceCount * estimatedCpuPerService;
|
|
75
|
-
if (serviceCount >= criticalCount) {
|
|
76
|
-
return {
|
|
77
|
-
level: "critical",
|
|
78
|
-
message: `\u26A0\uFE0F ${serviceCount} MCP services configured - may cause severe performance issues`,
|
|
79
|
-
messageZh: `\u26A0\uFE0F \u5DF2\u914D\u7F6E ${serviceCount} \u4E2A MCP \u670D\u52A1\uFF0C\u53EF\u80FD\u5BFC\u81F4\u4E25\u91CD\u6027\u80FD\u95EE\u9898`,
|
|
80
|
-
suggestion: "Use `ccjk mcp profile use minimal` to switch to minimal mode",
|
|
81
|
-
suggestionZh: "\u5EFA\u8BAE\u4F7F\u7528 `ccjk mcp profile use minimal` \u5207\u6362\u5230\u6781\u7B80\u6A21\u5F0F",
|
|
82
|
-
serviceCount,
|
|
83
|
-
estimatedMemory,
|
|
84
|
-
estimatedCpu
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
if (serviceCount >= warningCount) {
|
|
88
|
-
return {
|
|
89
|
-
level: "warning",
|
|
90
|
-
message: `\u26A1 ${serviceCount} MCP services configured - may affect response speed`,
|
|
91
|
-
messageZh: `\u26A1 \u5DF2\u914D\u7F6E ${serviceCount} \u4E2A MCP \u670D\u52A1\uFF0C\u53EF\u80FD\u5F71\u54CD\u54CD\u5E94\u901F\u5EA6`,
|
|
92
|
-
suggestion: "Consider disabling unused services or use `ccjk mcp profile` to manage",
|
|
93
|
-
suggestionZh: "\u5EFA\u8BAE\u7981\u7528\u4E0D\u5E38\u7528\u7684\u670D\u52A1\uFF0C\u6216\u4F7F\u7528 `ccjk mcp profile` \u7BA1\u7406",
|
|
94
|
-
serviceCount,
|
|
95
|
-
estimatedMemory,
|
|
96
|
-
estimatedCpu
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
return null;
|
|
100
|
-
}
|
|
101
|
-
function analyzeServices(serviceIds) {
|
|
102
|
-
return serviceIds.map((serviceId) => {
|
|
103
|
-
const tierConfig = getMcpTierConfig(serviceId);
|
|
104
|
-
const tier = MCP_SERVICE_TIERS[serviceId] || "ondemand";
|
|
105
|
-
const analysis = {
|
|
106
|
-
serviceId,
|
|
107
|
-
tier,
|
|
108
|
-
autoStart: tierConfig.autoStart,
|
|
109
|
-
idleTimeout: tierConfig.idleTimeout
|
|
110
|
-
};
|
|
111
|
-
if (tier !== "core") {
|
|
112
|
-
analysis.recommendation = `Consider using on-demand loading for ${serviceId}`;
|
|
113
|
-
analysis.recommendationZh = `\u5EFA\u8BAE\u5BF9 ${serviceId} \u4F7F\u7528\u6309\u9700\u52A0\u8F7D`;
|
|
114
|
-
}
|
|
115
|
-
return analysis;
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
function getOptimizationSuggestions(serviceIds) {
|
|
119
|
-
const suggestions = [];
|
|
120
|
-
const analysis = analyzeServices(serviceIds);
|
|
121
|
-
const tierCounts = {
|
|
122
|
-
core: 0,
|
|
123
|
-
ondemand: 0,
|
|
124
|
-
scenario: 0
|
|
125
|
-
};
|
|
126
|
-
for (const a of analysis) {
|
|
127
|
-
tierCounts[a.tier]++;
|
|
128
|
-
}
|
|
129
|
-
if (tierCounts.scenario > 2) {
|
|
130
|
-
suggestions.push("Consider disabling some scenario-specific services when not needed");
|
|
131
|
-
}
|
|
132
|
-
const hasBothBrowserServices = serviceIds.includes("Playwright") && serviceIds.includes("puppeteer");
|
|
133
|
-
if (hasBothBrowserServices) {
|
|
134
|
-
suggestions.push("Both Playwright and Puppeteer are enabled - consider using only one");
|
|
135
|
-
}
|
|
136
|
-
if (serviceIds.length > MCP_PERFORMANCE_THRESHOLDS.maxRecommended) {
|
|
137
|
-
suggestions.push(`You have ${serviceIds.length} services. Recommended maximum is ${MCP_PERFORMANCE_THRESHOLDS.maxRecommended}`);
|
|
138
|
-
}
|
|
139
|
-
if (tierCounts.core === 0) {
|
|
140
|
-
suggestions.push("Consider enabling core services (context7, open-websearch) for better experience");
|
|
141
|
-
}
|
|
142
|
-
return suggestions;
|
|
143
|
-
}
|
|
144
|
-
function calculateResourceUsage(serviceCount) {
|
|
145
|
-
const { estimatedMemoryPerService, estimatedCpuPerService, warningCount, criticalCount } = MCP_PERFORMANCE_THRESHOLDS;
|
|
146
|
-
const memory = serviceCount * estimatedMemoryPerService;
|
|
147
|
-
const cpu = serviceCount * estimatedCpuPerService;
|
|
148
|
-
let rating;
|
|
149
|
-
if (serviceCount >= criticalCount) {
|
|
150
|
-
rating = "critical";
|
|
151
|
-
} else if (serviceCount >= warningCount) {
|
|
152
|
-
rating = "high";
|
|
153
|
-
} else if (serviceCount >= 3) {
|
|
154
|
-
rating = "medium";
|
|
155
|
-
} else {
|
|
156
|
-
rating = "low";
|
|
157
|
-
}
|
|
158
|
-
return {
|
|
159
|
-
memory: { value: memory, unit: "MB" },
|
|
160
|
-
cpu: { value: cpu, unit: "%" },
|
|
161
|
-
rating
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
function formatPerformanceWarning(warning, lang = "en") {
|
|
165
|
-
const message = lang === "zh-CN" ? warning.messageZh : warning.message;
|
|
166
|
-
const suggestion = lang === "zh-CN" ? warning.suggestionZh : warning.suggestion;
|
|
167
|
-
const lines = [
|
|
168
|
-
message,
|
|
169
|
-
"",
|
|
170
|
-
` ${lang === "zh-CN" ? "\u9884\u4F30\u5185\u5B58" : "Est. Memory"}: ~${warning.estimatedMemory}MB`,
|
|
171
|
-
` ${lang === "zh-CN" ? "\u9884\u4F30CPU" : "Est. CPU"}: ~${warning.estimatedCpu}%`,
|
|
172
|
-
"",
|
|
173
|
-
`\u{1F4A1} ${suggestion}`
|
|
174
|
-
];
|
|
175
|
-
return lines.join("\n");
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const mcpPerformance = {
|
|
179
|
-
__proto__: null,
|
|
180
|
-
analyzeServices: analyzeServices,
|
|
181
|
-
calculateResourceUsage: calculateResourceUsage,
|
|
182
|
-
checkMcpPerformance: checkMcpPerformance,
|
|
183
|
-
formatPerformanceWarning: formatPerformanceWarning,
|
|
184
|
-
getOptimizationSuggestions: getOptimizationSuggestions
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
export { MCP_SERVICE_TIERS as M, calculateResourceUsage as a, getOptimizationSuggestions as b, checkMcpPerformance as c, getMcpTierConfig as d, mcpPerformance as e, formatPerformanceWarning as f, getServicesByTier as g, isCoreService as i, mcpTiers as m };
|