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/cli.mjs
DELETED
|
@@ -1,2199 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import process__default from 'node:process';
|
|
3
|
-
|
|
4
|
-
const COMMANDS = [
|
|
5
|
-
// ==================== Core Commands ====================
|
|
6
|
-
{
|
|
7
|
-
name: "",
|
|
8
|
-
description: "Show interactive menu (default)",
|
|
9
|
-
tier: "core",
|
|
10
|
-
options: [
|
|
11
|
-
{ flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" },
|
|
12
|
-
{ flags: "--code-type, -T <type>", description: "Code tool type" }
|
|
13
|
-
],
|
|
14
|
-
loader: async () => {
|
|
15
|
-
const { showMainMenu } = await import('./chunks/menu.mjs').then(function (n) { return n.m; });
|
|
16
|
-
return async (options) => {
|
|
17
|
-
await showMainMenu({ codeType: options.codeType });
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: "init",
|
|
23
|
-
description: "Initialize Claude Code configuration",
|
|
24
|
-
aliases: ["i"],
|
|
25
|
-
tier: "core",
|
|
26
|
-
options: [
|
|
27
|
-
{ flags: "--lang, -l <lang>", description: "Display language" },
|
|
28
|
-
{ flags: "--config-lang, -c <lang>", description: "Configuration language" },
|
|
29
|
-
{ flags: "--force, -f", description: "Force overwrite" },
|
|
30
|
-
{ flags: "--skip-prompt, -s", description: "Skip prompts" },
|
|
31
|
-
{ flags: "--silent", description: "Silent mode - fully non-interactive with smart defaults" },
|
|
32
|
-
{ flags: "--api-type, -t <type>", description: "API type" },
|
|
33
|
-
{ flags: "--api-key, -k <key>", description: "API key" },
|
|
34
|
-
{ flags: "--code-type, -T <type>", description: "Code tool type" },
|
|
35
|
-
{ flags: "--orchestration <level>", description: "Workflow orchestration level (off|minimal|standard|max)" },
|
|
36
|
-
{ flags: "--install-agent-browser <boolean>", description: "Install Agent Browser during init (default: true)" },
|
|
37
|
-
{ flags: "--smart", description: "Smart generation mode - auto-detect project and generate agents/skills" },
|
|
38
|
-
{ flags: "--dry-run", description: "Preview changes without writing files" },
|
|
39
|
-
{ flags: "--yes, -y", description: "Skip confirmation prompts (auto-confirm)" }
|
|
40
|
-
],
|
|
41
|
-
loader: async () => {
|
|
42
|
-
const { init } = await import('./chunks/init.mjs').then(function (n) { return n.c; });
|
|
43
|
-
return async (options) => {
|
|
44
|
-
await init(options);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: "quick-setup",
|
|
50
|
-
description: "One-click configuration for CCJK",
|
|
51
|
-
aliases: ["quick", "qs"],
|
|
52
|
-
tier: "core",
|
|
53
|
-
options: [
|
|
54
|
-
{ flags: "--api-key <key>", description: "API key" },
|
|
55
|
-
{ flags: "--provider <provider>", description: "API provider" },
|
|
56
|
-
{ flags: "--skip-prompt, -s", description: "Skip all prompts" },
|
|
57
|
-
{ flags: "--lang, -l <lang>", description: "Display language" }
|
|
58
|
-
],
|
|
59
|
-
loader: async () => {
|
|
60
|
-
const { quickSetup } = await import('./chunks/quick-setup.mjs');
|
|
61
|
-
return async (options) => {
|
|
62
|
-
await quickSetup(options);
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: "update",
|
|
68
|
-
description: "Update Claude Code prompts",
|
|
69
|
-
aliases: ["u"],
|
|
70
|
-
tier: "core",
|
|
71
|
-
options: [
|
|
72
|
-
{ flags: "--lang, -l <lang>", description: "Display language" },
|
|
73
|
-
{ flags: "--config-lang, -c <lang>", description: "Configuration language" }
|
|
74
|
-
],
|
|
75
|
-
loader: async () => {
|
|
76
|
-
const { update } = await import('./chunks/update.mjs');
|
|
77
|
-
return async (options) => {
|
|
78
|
-
await update({
|
|
79
|
-
codeType: options.codeType,
|
|
80
|
-
configLang: options.configLang,
|
|
81
|
-
aiOutputLang: options.aiOutputLang
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: "doctor",
|
|
88
|
-
description: "Run environment health check",
|
|
89
|
-
tier: "core",
|
|
90
|
-
options: [
|
|
91
|
-
{ flags: "--check-providers", description: "Check API provider health" },
|
|
92
|
-
{ flags: "--code-type, -T <type>", description: "Code tool type" },
|
|
93
|
-
{ flags: "--fix-settings", description: "Fix settings.json validation issues" },
|
|
94
|
-
{ flags: "--json", description: "Output in JSON format" }
|
|
95
|
-
],
|
|
96
|
-
loader: async () => {
|
|
97
|
-
const { doctor } = await import('./chunks/doctor.mjs');
|
|
98
|
-
return async (options) => {
|
|
99
|
-
await doctor({
|
|
100
|
-
checkProviders: options.checkProviders,
|
|
101
|
-
codeType: options.codeType,
|
|
102
|
-
fixSettings: options.fixSettings,
|
|
103
|
-
json: options.json
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
name: "help [topic]",
|
|
110
|
-
description: "Show help and quick reference",
|
|
111
|
-
aliases: ["h", "?"],
|
|
112
|
-
tier: "core",
|
|
113
|
-
loader: async () => {
|
|
114
|
-
const { help } = await import('./chunks/help.mjs');
|
|
115
|
-
return async (_options, topic) => {
|
|
116
|
-
await help(topic);
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
// ==================== Extended Commands ====================
|
|
121
|
-
{
|
|
122
|
-
name: "mcp <action> [...args]",
|
|
123
|
-
description: "MCP Server management",
|
|
124
|
-
tier: "extended",
|
|
125
|
-
options: [
|
|
126
|
-
{ flags: "--verbose, -v", description: "Verbose output" },
|
|
127
|
-
{ flags: "--dry-run, -d", description: "Preview changes" },
|
|
128
|
-
{ flags: "--yes, -y", description: "Skip confirmation prompts" },
|
|
129
|
-
{ flags: "--installed", description: "Show only installed services" },
|
|
130
|
-
{ flags: "--json", description: "Output in JSON format" }
|
|
131
|
-
],
|
|
132
|
-
loader: async () => {
|
|
133
|
-
return async (options, action, args) => {
|
|
134
|
-
const actionStr = action;
|
|
135
|
-
const argsArr = args;
|
|
136
|
-
if (actionStr === "status" || !actionStr) {
|
|
137
|
-
const { mcpStatus } = await import('./chunks/mcp.mjs');
|
|
138
|
-
await mcpStatus(options);
|
|
139
|
-
} else if (actionStr === "doctor") {
|
|
140
|
-
const { mcpDoctor } = await import('./chunks/mcp.mjs');
|
|
141
|
-
await mcpDoctor(options);
|
|
142
|
-
} else if (actionStr === "profile") {
|
|
143
|
-
const { listProfiles, useProfile } = await import('./chunks/mcp.mjs');
|
|
144
|
-
if (!argsArr[0] || argsArr[0] === "list") {
|
|
145
|
-
await listProfiles(options);
|
|
146
|
-
} else {
|
|
147
|
-
await useProfile(argsArr[0], options);
|
|
148
|
-
}
|
|
149
|
-
} else if (actionStr === "release") {
|
|
150
|
-
const { mcpRelease } = await import('./chunks/mcp.mjs');
|
|
151
|
-
await mcpRelease(options);
|
|
152
|
-
} else if (actionStr === "help") {
|
|
153
|
-
const { mcpHelp } = await import('./chunks/mcp.mjs');
|
|
154
|
-
mcpHelp(options);
|
|
155
|
-
} else if (actionStr === "list") {
|
|
156
|
-
if (options.json || options.installed) {
|
|
157
|
-
const { mcpListCli } = await import('./chunks/mcp-cli.mjs');
|
|
158
|
-
await mcpListCli({
|
|
159
|
-
json: options.json,
|
|
160
|
-
installed: options.installed,
|
|
161
|
-
lang: options.lang
|
|
162
|
-
});
|
|
163
|
-
} else {
|
|
164
|
-
const { mcpList } = await import('./chunks/mcp.mjs');
|
|
165
|
-
await mcpList(options);
|
|
166
|
-
}
|
|
167
|
-
} else if (actionStr === "search") {
|
|
168
|
-
const { mcpSearch } = await import('./chunks/mcp.mjs');
|
|
169
|
-
await mcpSearch(argsArr[0] || "", options);
|
|
170
|
-
} else if (actionStr === "install") {
|
|
171
|
-
if (argsArr.length > 1 || options.yes) {
|
|
172
|
-
const { mcpInstallCli } = await import('./chunks/mcp-cli.mjs');
|
|
173
|
-
await mcpInstallCli({
|
|
174
|
-
services: argsArr,
|
|
175
|
-
yes: options.yes,
|
|
176
|
-
tool: options.tool,
|
|
177
|
-
lang: options.lang
|
|
178
|
-
});
|
|
179
|
-
} else {
|
|
180
|
-
const { mcpInstall } = await import('./chunks/mcp.mjs');
|
|
181
|
-
await mcpInstall(argsArr[0] || "", options);
|
|
182
|
-
}
|
|
183
|
-
} else if (actionStr === "uninstall") {
|
|
184
|
-
if (argsArr.length > 1 || options.yes) {
|
|
185
|
-
const { mcpUninstallCli } = await import('./chunks/mcp-cli.mjs');
|
|
186
|
-
await mcpUninstallCli({
|
|
187
|
-
services: argsArr,
|
|
188
|
-
yes: options.yes,
|
|
189
|
-
tool: options.tool,
|
|
190
|
-
lang: options.lang
|
|
191
|
-
});
|
|
192
|
-
} else {
|
|
193
|
-
const { mcpUninstall } = await import('./chunks/mcp.mjs');
|
|
194
|
-
await mcpUninstall(argsArr[0] || "", options);
|
|
195
|
-
}
|
|
196
|
-
} else {
|
|
197
|
-
const { mcpHelp } = await import('./chunks/mcp.mjs');
|
|
198
|
-
mcpHelp(options);
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
name: "agents <action> [...args]",
|
|
205
|
-
description: "Agent Teams - Multi-agent orchestration",
|
|
206
|
-
aliases: ["team", "teams"],
|
|
207
|
-
tier: "extended",
|
|
208
|
-
options: [
|
|
209
|
-
{ flags: "--task <task>", description: "Task description" },
|
|
210
|
-
{ flags: "--workflow <id>", description: "Workflow preset (analyze, fix, test, optimize)" },
|
|
211
|
-
{ flags: "--verbose, -v", description: "Verbose output" },
|
|
212
|
-
{ flags: "--json", description: "JSON output" }
|
|
213
|
-
],
|
|
214
|
-
loader: async () => {
|
|
215
|
-
return async (options, action, args) => {
|
|
216
|
-
const actionStr = action;
|
|
217
|
-
const argsArr = args;
|
|
218
|
-
const { handleAgentsCommand } = await import('./chunks/agents.mjs');
|
|
219
|
-
await handleAgentsCommand([actionStr, ...argsArr], {
|
|
220
|
-
task: options.task,
|
|
221
|
-
workflow: options.workflow,
|
|
222
|
-
verbose: options.verbose,
|
|
223
|
-
json: options.json
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
name: "browser <action> [...args]",
|
|
230
|
-
description: "Agent Browser management",
|
|
231
|
-
aliases: ["ab"],
|
|
232
|
-
tier: "extended",
|
|
233
|
-
options: [
|
|
234
|
-
{ flags: "--verbose, -v", description: "Verbose output" }
|
|
235
|
-
],
|
|
236
|
-
loader: async () => {
|
|
237
|
-
return async (options, action, args) => {
|
|
238
|
-
const actionStr = action;
|
|
239
|
-
const argsArr = args;
|
|
240
|
-
if (actionStr === "install") {
|
|
241
|
-
const { installAgentBrowser } = await import('./chunks/installer2.mjs');
|
|
242
|
-
await installAgentBrowser(options);
|
|
243
|
-
} else if (actionStr === "uninstall") {
|
|
244
|
-
const { uninstallAgentBrowser } = await import('./chunks/installer2.mjs');
|
|
245
|
-
await uninstallAgentBrowser(options);
|
|
246
|
-
} else if (actionStr === "status") {
|
|
247
|
-
const { agentBrowserStatus } = await import('./chunks/commands2.mjs');
|
|
248
|
-
await agentBrowserStatus(options);
|
|
249
|
-
} else if (actionStr === "start") {
|
|
250
|
-
const { startBrowserSession } = await import('./chunks/commands2.mjs');
|
|
251
|
-
await startBrowserSession(argsArr[0], options);
|
|
252
|
-
} else if (actionStr === "stop") {
|
|
253
|
-
const { stopBrowserSession } = await import('./chunks/commands2.mjs');
|
|
254
|
-
await stopBrowserSession(options);
|
|
255
|
-
} else if (actionStr === "config") {
|
|
256
|
-
const { configureBrowser } = await import('./chunks/commands2.mjs');
|
|
257
|
-
await configureBrowser(options);
|
|
258
|
-
} else {
|
|
259
|
-
const { agentBrowserHelp } = await import('./chunks/commands2.mjs');
|
|
260
|
-
agentBrowserHelp(options);
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
name: "interview [specFile]",
|
|
267
|
-
description: "Interview-Driven Development",
|
|
268
|
-
aliases: ["iv"],
|
|
269
|
-
tier: "extended",
|
|
270
|
-
options: [
|
|
271
|
-
{ flags: "--template, -t <template>", description: "Interview template" },
|
|
272
|
-
{ flags: "--depth, -d <depth>", description: "Interview depth" },
|
|
273
|
-
{ flags: "--resume, -r", description: "Resume session" },
|
|
274
|
-
{ flags: "--list", description: "List sessions" }
|
|
275
|
-
],
|
|
276
|
-
loader: async () => {
|
|
277
|
-
const { interview, quickInterview, deepInterview, listInterviewSessions, resumeInterview } = await import('./chunks/interview.mjs');
|
|
278
|
-
return async (options, specFile) => {
|
|
279
|
-
if (options.list) {
|
|
280
|
-
await listInterviewSessions();
|
|
281
|
-
} else if (options.resume) {
|
|
282
|
-
await resumeInterview();
|
|
283
|
-
} else if (options.depth === "quick") {
|
|
284
|
-
await quickInterview(specFile, {
|
|
285
|
-
specFile,
|
|
286
|
-
depth: "quick",
|
|
287
|
-
resume: !!options.resume,
|
|
288
|
-
lang: options.lang
|
|
289
|
-
});
|
|
290
|
-
} else if (options.depth === "deep") {
|
|
291
|
-
await deepInterview(specFile, {
|
|
292
|
-
specFile,
|
|
293
|
-
depth: "deep",
|
|
294
|
-
resume: !!options.resume,
|
|
295
|
-
lang: options.lang
|
|
296
|
-
});
|
|
297
|
-
} else {
|
|
298
|
-
await interview({
|
|
299
|
-
specFile,
|
|
300
|
-
depth: options.depth,
|
|
301
|
-
template: options.template,
|
|
302
|
-
resume: !!options.resume,
|
|
303
|
-
lang: options.lang
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
name: "commit",
|
|
311
|
-
description: "Smart git commit",
|
|
312
|
-
tier: "extended",
|
|
313
|
-
options: [
|
|
314
|
-
{ flags: "--auto, -a", description: "Auto-generate message" },
|
|
315
|
-
{ flags: "--dry-run, -d", description: "Preview only" },
|
|
316
|
-
{ flags: "--message, -m <msg>", description: "Custom message" }
|
|
317
|
-
],
|
|
318
|
-
loader: async () => {
|
|
319
|
-
const { commit } = await import('./chunks/commit.mjs');
|
|
320
|
-
return async (options) => {
|
|
321
|
-
await commit({
|
|
322
|
-
auto: options.auto,
|
|
323
|
-
dryRun: options.dryRun,
|
|
324
|
-
message: options.message
|
|
325
|
-
});
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
name: "config [action] [...args]",
|
|
331
|
-
description: "Manage CCJK configuration",
|
|
332
|
-
tier: "extended",
|
|
333
|
-
options: [
|
|
334
|
-
{ flags: "--format, -f <format>", description: "Output format (table|json|yaml)" },
|
|
335
|
-
{ flags: "--global, -g", description: "Use global config" }
|
|
336
|
-
],
|
|
337
|
-
loader: async () => {
|
|
338
|
-
return async (options, action, args) => {
|
|
339
|
-
const actionStr = action;
|
|
340
|
-
const argsArr = args;
|
|
341
|
-
const configOptions = { global: !!options.global, json: options.format === "json" };
|
|
342
|
-
if (!actionStr || actionStr === "list") {
|
|
343
|
-
const { listConfig } = await import('./chunks/config3.mjs');
|
|
344
|
-
await listConfig(configOptions);
|
|
345
|
-
} else if (actionStr === "get") {
|
|
346
|
-
const { getConfig } = await import('./chunks/config3.mjs');
|
|
347
|
-
await getConfig(argsArr[0] || "", configOptions);
|
|
348
|
-
} else if (actionStr === "set") {
|
|
349
|
-
const { setConfig } = await import('./chunks/config3.mjs');
|
|
350
|
-
await setConfig(argsArr[0] || "", argsArr[1] || "", configOptions);
|
|
351
|
-
} else if (actionStr === "unset") {
|
|
352
|
-
const { unsetConfig } = await import('./chunks/config3.mjs');
|
|
353
|
-
await unsetConfig(argsArr[0] || "", configOptions);
|
|
354
|
-
} else if (actionStr === "reset") {
|
|
355
|
-
const { resetConfig } = await import('./chunks/config3.mjs');
|
|
356
|
-
await resetConfig(configOptions);
|
|
357
|
-
} else if (actionStr === "edit") {
|
|
358
|
-
const { editConfig } = await import('./chunks/config3.mjs');
|
|
359
|
-
await editConfig(configOptions);
|
|
360
|
-
} else if (actionStr === "validate") {
|
|
361
|
-
const { validateConfig } = await import('./chunks/config3.mjs');
|
|
362
|
-
await validateConfig(configOptions);
|
|
363
|
-
} else {
|
|
364
|
-
console.error(`Unknown config action: ${actionStr}`);
|
|
365
|
-
console.log("Available actions: list, get, set, unset, reset, edit, validate");
|
|
366
|
-
}
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
name: "providers [action] [...args]",
|
|
372
|
-
description: "Manage API providers",
|
|
373
|
-
tier: "extended",
|
|
374
|
-
options: [
|
|
375
|
-
{ flags: "--format, -f <format>", description: "Output format (table|json)" },
|
|
376
|
-
{ flags: "--code-type, -T <type>", description: "Code tool type" },
|
|
377
|
-
{ flags: "--verbose, -v", description: "Verbose output" }
|
|
378
|
-
],
|
|
379
|
-
loader: async () => {
|
|
380
|
-
return async (options, action) => {
|
|
381
|
-
const actionStr = action;
|
|
382
|
-
const { providersCommand } = await import('./chunks/providers.mjs');
|
|
383
|
-
await providersCommand(actionStr || "list", {
|
|
384
|
-
lang: options.lang,
|
|
385
|
-
codeType: options.codeType,
|
|
386
|
-
verbose: options.verbose
|
|
387
|
-
});
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
// ==================== New v8.0.0 Commands ====================
|
|
392
|
-
// Note: task, keybinding, and history commands use Commander.js subcommand pattern
|
|
393
|
-
// They are registered via registerSpecialCommands() instead of lazy loading
|
|
394
|
-
// {
|
|
395
|
-
// name: 'task [action]',
|
|
396
|
-
// description: 'Task management (create, list, update, delete, graph, stats, schedule)',
|
|
397
|
-
// aliases: ['tasks'],
|
|
398
|
-
// tier: 'extended',
|
|
399
|
-
// options: [
|
|
400
|
-
// { flags: '--lang, -l <lang>', description: 'Display language' },
|
|
401
|
-
// ],
|
|
402
|
-
// loader: async () => {
|
|
403
|
-
// // Task command handler - future enhancement
|
|
404
|
-
// return async () => {
|
|
405
|
-
// console.log('Task command not yet implemented for CAC')
|
|
406
|
-
// }
|
|
407
|
-
// },
|
|
408
|
-
// },
|
|
409
|
-
// ========================================================================
|
|
410
|
-
{
|
|
411
|
-
name: "ccr",
|
|
412
|
-
description: "Configure Claude Code Router",
|
|
413
|
-
tier: "extended",
|
|
414
|
-
loader: async () => {
|
|
415
|
-
const { ccr } = await import('./chunks/ccr.mjs');
|
|
416
|
-
return async () => {
|
|
417
|
-
await ccr();
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
name: "zero-config [preset]",
|
|
423
|
-
description: "Apply zero-config permission presets (max, dev, safe)",
|
|
424
|
-
aliases: ["zc"],
|
|
425
|
-
tier: "extended",
|
|
426
|
-
options: [
|
|
427
|
-
{ flags: "--preset, -p <preset>", description: "Preset to apply (max, dev, safe)" },
|
|
428
|
-
{ flags: "--list, -l", description: "List available presets" },
|
|
429
|
-
{ flags: "--skip-backup", description: "Skip backup before applying" }
|
|
430
|
-
],
|
|
431
|
-
loader: async () => {
|
|
432
|
-
const { zeroConfig } = await import('./chunks/zero-config.mjs');
|
|
433
|
-
return async (options, preset) => {
|
|
434
|
-
await zeroConfig({
|
|
435
|
-
preset: preset || options.preset,
|
|
436
|
-
list: options.list,
|
|
437
|
-
skipBackup: options.skipBackup
|
|
438
|
-
});
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
name: "vim",
|
|
444
|
-
description: "Vim mode configuration and keybindings",
|
|
445
|
-
tier: "extended",
|
|
446
|
-
options: [
|
|
447
|
-
{ flags: "--enable, -e", description: "Enable Vim mode" },
|
|
448
|
-
{ flags: "--disable, -d", description: "Disable Vim mode" },
|
|
449
|
-
{ flags: "--toggle, -t", description: "Toggle Vim mode" },
|
|
450
|
-
{ flags: "--status, -s", description: "Show status" },
|
|
451
|
-
{ flags: "--install", description: "Install keybindings" },
|
|
452
|
-
{ flags: "--uninstall", description: "Uninstall keybindings" },
|
|
453
|
-
{ flags: "--keys, -k", description: "Show keybinding reference" },
|
|
454
|
-
{ flags: "--test <cmd>", description: "Test command parsing" },
|
|
455
|
-
{ flags: "--lang, -l <lang>", description: "Language (en, zh-CN)" }
|
|
456
|
-
],
|
|
457
|
-
loader: async () => {
|
|
458
|
-
return async (options) => {
|
|
459
|
-
const { vimCommand } = await import('./chunks/vim.mjs');
|
|
460
|
-
await vimCommand({
|
|
461
|
-
lang: options.lang,
|
|
462
|
-
enable: options.enable,
|
|
463
|
-
disable: options.disable,
|
|
464
|
-
toggle: options.toggle,
|
|
465
|
-
status: options.status,
|
|
466
|
-
install: options.install,
|
|
467
|
-
uninstall: options.uninstall,
|
|
468
|
-
keys: options.keys,
|
|
469
|
-
test: options.test
|
|
470
|
-
});
|
|
471
|
-
};
|
|
472
|
-
}
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
name: "permissions [action] [...args]",
|
|
476
|
-
description: "Manage CCJK permissions",
|
|
477
|
-
aliases: ["perm"],
|
|
478
|
-
tier: "extended",
|
|
479
|
-
options: [
|
|
480
|
-
{ flags: "--format, -f <format>", description: "Output format (table|json|list)" },
|
|
481
|
-
{ flags: "--verbose, -v", description: "Verbose output" }
|
|
482
|
-
],
|
|
483
|
-
loader: async () => {
|
|
484
|
-
return async (options, action, args) => {
|
|
485
|
-
const actionStr = action;
|
|
486
|
-
const argsArr = args;
|
|
487
|
-
if (!actionStr || actionStr === "list") {
|
|
488
|
-
const { listPermissions } = await import('./chunks/permissions.mjs');
|
|
489
|
-
await listPermissions(options);
|
|
490
|
-
} else if (actionStr === "check") {
|
|
491
|
-
const { checkPermission } = await import('./chunks/permissions.mjs');
|
|
492
|
-
await checkPermission(argsArr[0] || "", options);
|
|
493
|
-
} else if (actionStr === "grant") {
|
|
494
|
-
const { grantPermission } = await import('./chunks/permissions.mjs');
|
|
495
|
-
await grantPermission(argsArr[0] || "", options);
|
|
496
|
-
} else if (actionStr === "revoke") {
|
|
497
|
-
const { revokePermission } = await import('./chunks/permissions.mjs');
|
|
498
|
-
await revokePermission(argsArr[0] || "", options);
|
|
499
|
-
} else if (actionStr === "reset") {
|
|
500
|
-
const { resetPermissions } = await import('./chunks/permissions.mjs');
|
|
501
|
-
await resetPermissions(options);
|
|
502
|
-
} else if (actionStr === "export") {
|
|
503
|
-
const { exportPermissions } = await import('./chunks/permissions.mjs');
|
|
504
|
-
await exportPermissions(argsArr[0], options);
|
|
505
|
-
} else if (actionStr === "import") {
|
|
506
|
-
const { importPermissions } = await import('./chunks/permissions.mjs');
|
|
507
|
-
await importPermissions(argsArr[0] || "", options);
|
|
508
|
-
} else {
|
|
509
|
-
const { permissionsHelp } = await import('./chunks/permissions.mjs');
|
|
510
|
-
permissionsHelp(options);
|
|
511
|
-
}
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
name: "skills [action] [...args]",
|
|
517
|
-
description: "Manage CCJK skills",
|
|
518
|
-
aliases: ["sk"],
|
|
519
|
-
tier: "extended",
|
|
520
|
-
options: [
|
|
521
|
-
{ flags: "--category, -c <category>", description: "Filter by category" },
|
|
522
|
-
{ flags: "--show-disabled", description: "Show disabled skills" },
|
|
523
|
-
{ flags: "--format, -f <format>", description: "Output format (table|json|list)" },
|
|
524
|
-
{ flags: "--batch", description: "Batch create skills" }
|
|
525
|
-
],
|
|
526
|
-
loader: async () => {
|
|
527
|
-
return async (options, action, args) => {
|
|
528
|
-
const { initI18n } = await import('./chunks/index5.mjs');
|
|
529
|
-
await initI18n(options.lang || "zh-CN");
|
|
530
|
-
const actionStr = action;
|
|
531
|
-
const argsArr = args;
|
|
532
|
-
if (!actionStr) {
|
|
533
|
-
const { skillsMenu } = await import('./chunks/skills.mjs');
|
|
534
|
-
await skillsMenu(options);
|
|
535
|
-
} else if (actionStr === "list" || actionStr === "ls") {
|
|
536
|
-
const { listSkills } = await import('./chunks/skills.mjs');
|
|
537
|
-
await listSkills(options);
|
|
538
|
-
} else if (actionStr === "run") {
|
|
539
|
-
const { runSkill } = await import('./chunks/skills.mjs');
|
|
540
|
-
await runSkill(argsArr[0] || "", options);
|
|
541
|
-
} else if (actionStr === "info") {
|
|
542
|
-
const { showSkillInfo } = await import('./chunks/skills.mjs');
|
|
543
|
-
await showSkillInfo(argsArr[0] || "", options);
|
|
544
|
-
} else if (actionStr === "create") {
|
|
545
|
-
const { createSkill } = await import('./chunks/skills.mjs');
|
|
546
|
-
await createSkill(argsArr[0] || "", options);
|
|
547
|
-
} else if (actionStr === "enable") {
|
|
548
|
-
const { enableSkill } = await import('./chunks/skills.mjs');
|
|
549
|
-
await enableSkill(argsArr[0] || "", options);
|
|
550
|
-
} else if (actionStr === "disable") {
|
|
551
|
-
const { disableSkill } = await import('./chunks/skills.mjs');
|
|
552
|
-
await disableSkill(argsArr[0] || "", options);
|
|
553
|
-
} else if (actionStr === "delete" || actionStr === "remove" || actionStr === "rm") {
|
|
554
|
-
const { deleteSkill } = await import('./chunks/skills.mjs');
|
|
555
|
-
await deleteSkill(argsArr[0] || "", options);
|
|
556
|
-
} else {
|
|
557
|
-
const { runSkill } = await import('./chunks/skills.mjs');
|
|
558
|
-
await runSkill(actionStr, options);
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
},
|
|
563
|
-
// ==================== Plugins-v2 Commands ====================
|
|
564
|
-
{
|
|
565
|
-
name: "skill [action] [...args]",
|
|
566
|
-
description: "Manage plugins-v2 skills (SKILL.md based)",
|
|
567
|
-
tier: "extended",
|
|
568
|
-
options: [
|
|
569
|
-
{ flags: "--force, -f", description: "Force reinstall" },
|
|
570
|
-
{ flags: "--json", description: "Output as JSON" }
|
|
571
|
-
],
|
|
572
|
-
loader: async () => {
|
|
573
|
-
const { handleSkillCommand } = await import('./chunks/skill2.mjs');
|
|
574
|
-
return async (options, action, args) => {
|
|
575
|
-
const actionStr = action;
|
|
576
|
-
const argsArr = args;
|
|
577
|
-
await handleSkillCommand([actionStr, ...argsArr], {
|
|
578
|
-
force: options.force,
|
|
579
|
-
json: options.json
|
|
580
|
-
});
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
},
|
|
584
|
-
{
|
|
585
|
-
name: "agent [action] [...args]",
|
|
586
|
-
description: "Manage AI agents (Skills + MCP composition)",
|
|
587
|
-
aliases: ["ag"],
|
|
588
|
-
tier: "extended",
|
|
589
|
-
options: [
|
|
590
|
-
{ flags: "--template, -t <template>", description: "Use agent template" },
|
|
591
|
-
{ flags: "--skills, -s <skills>", description: "Comma-separated skill IDs" },
|
|
592
|
-
{ flags: "--mcp, -m <servers>", description: "Comma-separated MCP servers" },
|
|
593
|
-
{ flags: "--persona, -p <persona>", description: "Custom persona" },
|
|
594
|
-
{ flags: "--json", description: "Output as JSON" }
|
|
595
|
-
],
|
|
596
|
-
loader: async () => {
|
|
597
|
-
const { handleAgentCommand } = await import('./chunks/agent.mjs');
|
|
598
|
-
return async (options, action, args) => {
|
|
599
|
-
const actionStr = action;
|
|
600
|
-
const argsArr = args;
|
|
601
|
-
await handleAgentCommand([actionStr, ...argsArr], {
|
|
602
|
-
template: options.template,
|
|
603
|
-
skills: options.skills ? options.skills.split(",") : void 0,
|
|
604
|
-
mcp: options.mcp ? options.mcp.split(",") : void 0,
|
|
605
|
-
persona: options.persona,
|
|
606
|
-
json: options.json
|
|
607
|
-
});
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
},
|
|
611
|
-
{
|
|
612
|
-
name: "ccu [...args]",
|
|
613
|
-
description: "Claude Code usage analysis",
|
|
614
|
-
tier: "extended",
|
|
615
|
-
loader: async () => {
|
|
616
|
-
const { executeCcusage } = await import('./chunks/ccu.mjs');
|
|
617
|
-
return async (_options, args) => {
|
|
618
|
-
await executeCcusage(args);
|
|
619
|
-
};
|
|
620
|
-
}
|
|
621
|
-
},
|
|
622
|
-
{
|
|
623
|
-
name: "stats [action]",
|
|
624
|
-
description: "Usage statistics and analytics",
|
|
625
|
-
tier: "extended",
|
|
626
|
-
options: [
|
|
627
|
-
{ flags: "--period, -p <period>", description: "Time period (1d, 7d, 30d, 90d, all)" },
|
|
628
|
-
{ flags: "--format, -f <format>", description: "Output format (table, json, csv)" },
|
|
629
|
-
{ flags: "--export, -e <file>", description: "Export to file" },
|
|
630
|
-
{ flags: "--provider <provider>", description: "Filter by provider" },
|
|
631
|
-
{ flags: "--days <days>", description: "Days to keep for cleanup action" }
|
|
632
|
-
],
|
|
633
|
-
loader: async () => {
|
|
634
|
-
return async (options, action) => {
|
|
635
|
-
const actionStr = action;
|
|
636
|
-
if (actionStr === "dates") {
|
|
637
|
-
const { listStatsDates } = await import('./chunks/stats.mjs');
|
|
638
|
-
await listStatsDates();
|
|
639
|
-
} else if (actionStr === "storage") {
|
|
640
|
-
const { storageStats } = await import('./chunks/stats.mjs');
|
|
641
|
-
await storageStats();
|
|
642
|
-
} else if (actionStr === "cleanup") {
|
|
643
|
-
const { cleanupStats } = await import('./chunks/stats.mjs');
|
|
644
|
-
const days = options.days ? Number.parseInt(options.days, 10) : 90;
|
|
645
|
-
await cleanupStats(days);
|
|
646
|
-
} else {
|
|
647
|
-
const { stats } = await import('./chunks/stats.mjs');
|
|
648
|
-
await stats(options);
|
|
649
|
-
}
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
},
|
|
653
|
-
{
|
|
654
|
-
name: "uninstall",
|
|
655
|
-
description: "Remove CCJK configurations",
|
|
656
|
-
tier: "extended",
|
|
657
|
-
options: [
|
|
658
|
-
{ flags: "--mode, -m <mode>", description: "Uninstall mode" },
|
|
659
|
-
{ flags: "--code-type, -T <type>", description: "Code tool type" }
|
|
660
|
-
],
|
|
661
|
-
loader: async () => {
|
|
662
|
-
const { uninstall } = await import('./chunks/uninstall.mjs');
|
|
663
|
-
return async (options) => {
|
|
664
|
-
await uninstall(options);
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
name: "check-updates",
|
|
670
|
-
description: "Check for updates",
|
|
671
|
-
aliases: ["check"],
|
|
672
|
-
tier: "extended",
|
|
673
|
-
options: [
|
|
674
|
-
{ flags: "--code-type, -T <type>", description: "Code tool type" },
|
|
675
|
-
{ flags: "--skip-prompt, -s", description: "Skip prompts" }
|
|
676
|
-
],
|
|
677
|
-
loader: async () => {
|
|
678
|
-
const { checkUpdates } = await import('./chunks/check-updates.mjs');
|
|
679
|
-
return async (options) => {
|
|
680
|
-
await checkUpdates(options);
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
},
|
|
684
|
-
{
|
|
685
|
-
name: "config-switch [target]",
|
|
686
|
-
description: "Switch configuration",
|
|
687
|
-
aliases: ["cs"],
|
|
688
|
-
tier: "extended",
|
|
689
|
-
options: [
|
|
690
|
-
{ flags: "--code-type, -T <type>", description: "Code tool type" },
|
|
691
|
-
{ flags: "--list, -l", description: "List configurations" }
|
|
692
|
-
],
|
|
693
|
-
loader: async () => {
|
|
694
|
-
const { configSwitchCommand } = await import('./chunks/config-switch.mjs');
|
|
695
|
-
return async (options, target) => {
|
|
696
|
-
await configSwitchCommand({
|
|
697
|
-
target,
|
|
698
|
-
codeType: options.codeType,
|
|
699
|
-
list: options.list
|
|
700
|
-
});
|
|
701
|
-
};
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
{
|
|
705
|
-
name: "workflows",
|
|
706
|
-
description: "Manage workflows",
|
|
707
|
-
aliases: ["wf"],
|
|
708
|
-
tier: "extended",
|
|
709
|
-
loader: async () => {
|
|
710
|
-
const { listWorkflowsQuick } = await import('./chunks/workflows.mjs');
|
|
711
|
-
return async () => {
|
|
712
|
-
await listWorkflowsQuick();
|
|
713
|
-
};
|
|
714
|
-
}
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
name: "notification [action]",
|
|
718
|
-
description: "Task notifications",
|
|
719
|
-
aliases: ["notify"],
|
|
720
|
-
tier: "extended",
|
|
721
|
-
loader: async () => {
|
|
722
|
-
const { notificationCommand } = await import('./chunks/notification.mjs');
|
|
723
|
-
return async (_options, action) => {
|
|
724
|
-
await notificationCommand(action);
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
name: "session <action> [id]",
|
|
730
|
-
description: "Session management (save, restore, list, delete)",
|
|
731
|
-
tier: "extended",
|
|
732
|
-
options: [
|
|
733
|
-
{ flags: "--name, -n <name>", description: "Session name" }
|
|
734
|
-
],
|
|
735
|
-
loader: async () => {
|
|
736
|
-
const { handleSessionCommand } = await import('./chunks/session.mjs');
|
|
737
|
-
return async (_options, action, id) => {
|
|
738
|
-
const args = [];
|
|
739
|
-
if (action)
|
|
740
|
-
args.push(action);
|
|
741
|
-
if (id)
|
|
742
|
-
args.push(id);
|
|
743
|
-
await handleSessionCommand(args);
|
|
744
|
-
};
|
|
745
|
-
}
|
|
746
|
-
},
|
|
747
|
-
{
|
|
748
|
-
name: "context <action> [id]",
|
|
749
|
-
description: "Context management (analyze, compress, optimize, status)",
|
|
750
|
-
aliases: ["ctx"],
|
|
751
|
-
tier: "extended",
|
|
752
|
-
options: [
|
|
753
|
-
{ flags: "--verbose, -v", description: "Verbose output" },
|
|
754
|
-
{ flags: "--show", description: "Show context layers" },
|
|
755
|
-
{ flags: "--layers <layers>", description: "Specific layers to show" },
|
|
756
|
-
{ flags: "--task <task>", description: "Preview context for task" },
|
|
757
|
-
{ flags: "--clear", description: "Clear context cache" },
|
|
758
|
-
{ flags: "--health", description: "Run database health check" },
|
|
759
|
-
{ flags: "--alerts", description: "Show current health alerts" },
|
|
760
|
-
{ flags: "--alert-history", description: "Show alert history" },
|
|
761
|
-
{ flags: "--checkpoint", description: "Checkpoint WAL file" },
|
|
762
|
-
{ flags: "--vacuum", description: "Vacuum database" },
|
|
763
|
-
{ flags: "--backup", description: "Create database backup" },
|
|
764
|
-
{ flags: "--recover", description: "Attempt database recovery" }
|
|
765
|
-
],
|
|
766
|
-
loader: async () => {
|
|
767
|
-
const { contextCommand } = await import('./chunks/context.mjs');
|
|
768
|
-
return async (options) => {
|
|
769
|
-
await contextCommand(options);
|
|
770
|
-
};
|
|
771
|
-
}
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
name: "api [action] [...args]",
|
|
775
|
-
description: "Configure API providers",
|
|
776
|
-
tier: "extended",
|
|
777
|
-
options: [
|
|
778
|
-
{ flags: "--provider, -p <provider>", description: "Provider ID" },
|
|
779
|
-
{ flags: "--key, -k <key>", description: "API key" },
|
|
780
|
-
{ flags: "--url <url>", description: "API URL" },
|
|
781
|
-
{ flags: "--model <model>", description: "Default model" },
|
|
782
|
-
{ flags: "--fast-model <model>", description: "Fast model" },
|
|
783
|
-
{ flags: "--yes, -y", description: "Skip confirmation prompts" },
|
|
784
|
-
{ flags: "--json", description: "Output in JSON format" },
|
|
785
|
-
{ flags: "--test, -t", description: "Test connection" }
|
|
786
|
-
],
|
|
787
|
-
loader: async () => {
|
|
788
|
-
return async (options, action, args) => {
|
|
789
|
-
const actionStr = action || "wizard";
|
|
790
|
-
const argsArr = args || [];
|
|
791
|
-
if (actionStr === "configure" || actionStr === "setup" && (options.provider || options.yes)) {
|
|
792
|
-
const { apiConfigure } = await import('./chunks/api-cli.mjs');
|
|
793
|
-
await apiConfigure({
|
|
794
|
-
provider: options.provider,
|
|
795
|
-
key: options.key,
|
|
796
|
-
url: options.url,
|
|
797
|
-
model: options.model,
|
|
798
|
-
fastModel: options.fastModel,
|
|
799
|
-
yes: options.yes,
|
|
800
|
-
lang: options.lang
|
|
801
|
-
});
|
|
802
|
-
} else if (actionStr === "list" && options.json) {
|
|
803
|
-
const { apiList } = await import('./chunks/api-cli.mjs');
|
|
804
|
-
await apiList({
|
|
805
|
-
json: options.json,
|
|
806
|
-
lang: options.lang
|
|
807
|
-
});
|
|
808
|
-
} else {
|
|
809
|
-
const { apiCommand } = await import('./chunks/api.mjs');
|
|
810
|
-
await apiCommand(actionStr, argsArr, options);
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
},
|
|
815
|
-
{
|
|
816
|
-
name: "team <action>",
|
|
817
|
-
description: "Team collaboration",
|
|
818
|
-
tier: "extended",
|
|
819
|
-
loader: async () => {
|
|
820
|
-
const { teamInit, teamShare, teamSync } = await import('./chunks/team.mjs');
|
|
821
|
-
return async (_options, action) => {
|
|
822
|
-
const actionStr = action;
|
|
823
|
-
if (actionStr === "init")
|
|
824
|
-
await teamInit();
|
|
825
|
-
else if (actionStr === "share")
|
|
826
|
-
await teamShare();
|
|
827
|
-
else if (actionStr === "sync")
|
|
828
|
-
await teamSync();
|
|
829
|
-
};
|
|
830
|
-
}
|
|
831
|
-
},
|
|
832
|
-
// ==================== Thinking Mode Commands ====================
|
|
833
|
-
{
|
|
834
|
-
name: "agent-teams",
|
|
835
|
-
description: "Toggle Claude Code Agent Teams (experimental)",
|
|
836
|
-
aliases: ["teams"],
|
|
837
|
-
tier: "extended",
|
|
838
|
-
options: [
|
|
839
|
-
{ flags: "--on", description: "Enable Agent Teams" },
|
|
840
|
-
{ flags: "--off", description: "Disable Agent Teams" },
|
|
841
|
-
{ flags: "--status", description: "Show current status" },
|
|
842
|
-
{ flags: "--mode <mode>", description: "Set teammate mode (auto/in-process/tmux)" }
|
|
843
|
-
],
|
|
844
|
-
loader: async () => {
|
|
845
|
-
const { agentTeamsCommand } = await import('./chunks/agent-teams.mjs');
|
|
846
|
-
return async (options) => {
|
|
847
|
-
await agentTeamsCommand(options);
|
|
848
|
-
};
|
|
849
|
-
}
|
|
850
|
-
},
|
|
851
|
-
{
|
|
852
|
-
name: "thinking [action] [...args]",
|
|
853
|
-
description: "Thinking Mode (Opus 4.5+ extended reasoning)",
|
|
854
|
-
aliases: ["think"],
|
|
855
|
-
tier: "extended",
|
|
856
|
-
options: [
|
|
857
|
-
{ flags: "--json", description: "Output in JSON format" },
|
|
858
|
-
{ flags: "--verbose, -v", description: "Verbose output" }
|
|
859
|
-
],
|
|
860
|
-
loader: async () => {
|
|
861
|
-
const { thinking } = await import('./chunks/thinking.mjs');
|
|
862
|
-
return async (options, action, args) => {
|
|
863
|
-
await thinking(action, args, options);
|
|
864
|
-
};
|
|
865
|
-
}
|
|
866
|
-
},
|
|
867
|
-
// ==================== Postmortem System ====================
|
|
868
|
-
{
|
|
869
|
-
name: "postmortem <action> [...args]",
|
|
870
|
-
description: "\u{1F52C} Postmortem Intelligence - Learn from historical bugs",
|
|
871
|
-
aliases: ["pm"],
|
|
872
|
-
tier: "extended",
|
|
873
|
-
options: [
|
|
874
|
-
{ flags: "--severity <level>", description: "Filter by severity (critical/high/medium/low)" },
|
|
875
|
-
{ flags: "--category <cat>", description: "Filter by category" },
|
|
876
|
-
{ flags: "--status <status>", description: "Filter by status" },
|
|
877
|
-
{ flags: "--staged", description: "Check staged files only" },
|
|
878
|
-
{ flags: "--ci", description: "CI mode, exit with error on issues" },
|
|
879
|
-
{ flags: "--since <tag>", description: "Start version/commit" },
|
|
880
|
-
{ flags: "--until <tag>", description: "End version/commit" },
|
|
881
|
-
{ flags: "--version <ver>", description: "Associated version" }
|
|
882
|
-
],
|
|
883
|
-
loader: async () => {
|
|
884
|
-
return async (options, action, args) => {
|
|
885
|
-
const actionStr = action;
|
|
886
|
-
const argsArr = args || [];
|
|
887
|
-
const { getPostmortemManager } = await import('./chunks/index10.mjs');
|
|
888
|
-
const manager = getPostmortemManager(process__default.cwd());
|
|
889
|
-
if (actionStr === "init") {
|
|
890
|
-
const ora = (await import('./chunks/index7.mjs')).default;
|
|
891
|
-
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
892
|
-
const spinner = ora("Analyzing historical fix commits...").start();
|
|
893
|
-
try {
|
|
894
|
-
const result = await manager.init();
|
|
895
|
-
spinner.succeed(ansis.green("Postmortem system initialized"));
|
|
896
|
-
console.log(`
|
|
897
|
-
${ansis.yellow("Reports generated:")} ${result.created}`);
|
|
898
|
-
console.log(` ${ansis.yellow("Directory:")} ${result.directory}
|
|
899
|
-
`);
|
|
900
|
-
} catch (error) {
|
|
901
|
-
spinner.fail(ansis.red("Initialization failed"));
|
|
902
|
-
console.error(error);
|
|
903
|
-
}
|
|
904
|
-
} else if (actionStr === "generate" || actionStr === "gen") {
|
|
905
|
-
const ora = (await import('./chunks/index7.mjs')).default;
|
|
906
|
-
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
907
|
-
const spinner = ora("Analyzing commits...").start();
|
|
908
|
-
try {
|
|
909
|
-
if (options.version) {
|
|
910
|
-
const summary = await manager.generateReleaseSummary({
|
|
911
|
-
version: options.version,
|
|
912
|
-
since: options.since,
|
|
913
|
-
until: options.until
|
|
914
|
-
});
|
|
915
|
-
spinner.succeed(ansis.green("Release summary generated"));
|
|
916
|
-
console.log(`
|
|
917
|
-
${ansis.yellow("Version:")} ${summary.version}`);
|
|
918
|
-
console.log(` ${ansis.yellow("Fix commits:")} ${summary.fixCommitCount}`);
|
|
919
|
-
console.log(` ${ansis.yellow("New postmortems:")} ${summary.newPostmortems.length}
|
|
920
|
-
`);
|
|
921
|
-
} else {
|
|
922
|
-
const result = await manager.init();
|
|
923
|
-
spinner.succeed(ansis.green("Postmortem generation complete"));
|
|
924
|
-
console.log(`
|
|
925
|
-
${ansis.yellow("Reports:")} ${result.created}
|
|
926
|
-
`);
|
|
927
|
-
}
|
|
928
|
-
} catch (error) {
|
|
929
|
-
spinner.fail(ansis.red("Generation failed"));
|
|
930
|
-
console.error(error);
|
|
931
|
-
}
|
|
932
|
-
} else if (actionStr === "list" || actionStr === "ls") {
|
|
933
|
-
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
934
|
-
let reports = manager.listReports();
|
|
935
|
-
if (options.severity)
|
|
936
|
-
reports = reports.filter((r) => r.severity === options.severity);
|
|
937
|
-
if (options.category)
|
|
938
|
-
reports = reports.filter((r) => r.category === options.category);
|
|
939
|
-
if (options.status)
|
|
940
|
-
reports = reports.filter((r) => r.status === options.status);
|
|
941
|
-
if (reports.length === 0) {
|
|
942
|
-
console.log(ansis.yellow("\nNo postmortem reports found"));
|
|
943
|
-
console.log(ansis.gray('Run "ccjk postmortem init" to initialize\n'));
|
|
944
|
-
return;
|
|
945
|
-
}
|
|
946
|
-
const severityEmoji = { critical: "\u{1F534}", high: "\u{1F7E0}", medium: "\u{1F7E1}", low: "\u{1F7E2}" };
|
|
947
|
-
console.log(ansis.cyan.bold("\n\u{1F4CB} Postmortem Reports"));
|
|
948
|
-
console.log(ansis.gray("\u2500".repeat(50)));
|
|
949
|
-
for (const r of reports) {
|
|
950
|
-
console.log(`
|
|
951
|
-
${severityEmoji[r.severity] || "\u26AA"} ${ansis.bold(r.id)}: ${r.title}`);
|
|
952
|
-
console.log(` ${ansis.gray("Category:")} ${r.category} ${ansis.gray("Status:")} ${r.status}`);
|
|
953
|
-
}
|
|
954
|
-
console.log(ansis.gray(`
|
|
955
|
-
\u2500 Total: ${reports.length} reports \u2500
|
|
956
|
-
`));
|
|
957
|
-
} else if (actionStr === "show") {
|
|
958
|
-
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
959
|
-
const id = argsArr[0];
|
|
960
|
-
if (!id) {
|
|
961
|
-
console.log(ansis.red("Please specify a postmortem ID"));
|
|
962
|
-
return;
|
|
963
|
-
}
|
|
964
|
-
const report = manager.getReport(id);
|
|
965
|
-
if (!report) {
|
|
966
|
-
console.log(ansis.red(`Postmortem not found: ${id}`));
|
|
967
|
-
return;
|
|
968
|
-
}
|
|
969
|
-
console.log(ansis.cyan.bold(`
|
|
970
|
-
\u2550\u2550\u2550 ${report.id}: ${report.title} \u2550\u2550\u2550
|
|
971
|
-
`));
|
|
972
|
-
console.log(`${ansis.yellow("Severity:")} ${report.severity.toUpperCase()}`);
|
|
973
|
-
console.log(`${ansis.yellow("Category:")} ${report.category}`);
|
|
974
|
-
console.log(`${ansis.yellow("Status:")} ${report.status}`);
|
|
975
|
-
console.log(`
|
|
976
|
-
${ansis.cyan("Description:")}
|
|
977
|
-
${report.description}`);
|
|
978
|
-
console.log(`
|
|
979
|
-
${ansis.cyan("Root Cause:")}
|
|
980
|
-
${report.rootCause.map((c) => ` \u2022 ${c}`).join("\n")}`);
|
|
981
|
-
console.log(`
|
|
982
|
-
${ansis.cyan("Prevention:")}
|
|
983
|
-
${report.preventionMeasures.map((m) => ` \u2022 ${m}`).join("\n")}`);
|
|
984
|
-
console.log(`
|
|
985
|
-
${ansis.cyan("AI Directives:")}
|
|
986
|
-
${report.aiDirectives.map((d) => ` \u2022 ${d}`).join("\n")}
|
|
987
|
-
`);
|
|
988
|
-
} else if (actionStr === "check") {
|
|
989
|
-
const ora = (await import('./chunks/index7.mjs')).default;
|
|
990
|
-
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
991
|
-
const spinner = ora("Checking code...").start();
|
|
992
|
-
try {
|
|
993
|
-
const result = await manager.checkCode({
|
|
994
|
-
staged: options.staged,
|
|
995
|
-
files: argsArr.length > 0 ? argsArr : void 0
|
|
996
|
-
});
|
|
997
|
-
spinner.stop();
|
|
998
|
-
console.log(ansis.cyan.bold("\n\u{1F50D} Postmortem Code Check"));
|
|
999
|
-
console.log(ansis.gray("\u2500".repeat(40)));
|
|
1000
|
-
console.log(` Files checked: ${result.filesChecked}`);
|
|
1001
|
-
console.log(` Issues found: ${result.issuesFound.length}`);
|
|
1002
|
-
console.log(`
|
|
1003
|
-
\u{1F534} Critical: ${result.summary.critical}`);
|
|
1004
|
-
console.log(` \u{1F7E0} High: ${result.summary.high}`);
|
|
1005
|
-
console.log(` \u{1F7E1} Medium: ${result.summary.medium}`);
|
|
1006
|
-
console.log(` \u{1F7E2} Low: ${result.summary.low}`);
|
|
1007
|
-
if (result.issuesFound.length > 0) {
|
|
1008
|
-
console.log(ansis.yellow("\n\u26A0\uFE0F Issues:"));
|
|
1009
|
-
for (const issue of result.issuesFound.slice(0, 10)) {
|
|
1010
|
-
console.log(`
|
|
1011
|
-
${issue.file}:${issue.line}`);
|
|
1012
|
-
console.log(` ${issue.message}`);
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
console.log(result.passed ? ansis.green("\n\u2705 Check passed\n") : ansis.red("\n\u274C Check failed\n"));
|
|
1016
|
-
if (!result.passed && options.ci)
|
|
1017
|
-
process__default.exit(1);
|
|
1018
|
-
} catch (error) {
|
|
1019
|
-
spinner.fail(ansis.red("Check failed"));
|
|
1020
|
-
console.error(error);
|
|
1021
|
-
}
|
|
1022
|
-
} else if (actionStr === "sync") {
|
|
1023
|
-
const ora = (await import('./chunks/index7.mjs')).default;
|
|
1024
|
-
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
1025
|
-
const spinner = ora("Syncing to CLAUDE.md...").start();
|
|
1026
|
-
try {
|
|
1027
|
-
const result = await manager.syncToClaudeMd();
|
|
1028
|
-
spinner.succeed(ansis.green("Sync complete"));
|
|
1029
|
-
console.log(`
|
|
1030
|
-
${ansis.yellow("Synced:")} ${result.synced} items`);
|
|
1031
|
-
console.log(` ${ansis.yellow("File:")} ${result.claudeMdPath}
|
|
1032
|
-
`);
|
|
1033
|
-
} catch (error) {
|
|
1034
|
-
spinner.fail(ansis.red("Sync failed"));
|
|
1035
|
-
console.error(error);
|
|
1036
|
-
}
|
|
1037
|
-
} else if (actionStr === "stats") {
|
|
1038
|
-
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
1039
|
-
const index = manager.loadIndex();
|
|
1040
|
-
if (!index) {
|
|
1041
|
-
console.log(ansis.yellow("\nNo statistics available"));
|
|
1042
|
-
console.log(ansis.gray('Run "ccjk postmortem init" to initialize\n'));
|
|
1043
|
-
return;
|
|
1044
|
-
}
|
|
1045
|
-
console.log(ansis.cyan.bold("\n\u{1F4CA} Postmortem Statistics"));
|
|
1046
|
-
console.log(ansis.gray("\u2500".repeat(40)));
|
|
1047
|
-
console.log(`
|
|
1048
|
-
${ansis.yellow("Total:")} ${index.stats.total} reports`);
|
|
1049
|
-
console.log(`
|
|
1050
|
-
${ansis.yellow("By Severity:")}`);
|
|
1051
|
-
console.log(` \u{1F534} Critical: ${index.stats.bySeverity.critical}`);
|
|
1052
|
-
console.log(` \u{1F7E0} High: ${index.stats.bySeverity.high}`);
|
|
1053
|
-
console.log(` \u{1F7E1} Medium: ${index.stats.bySeverity.medium}`);
|
|
1054
|
-
console.log(` \u{1F7E2} Low: ${index.stats.bySeverity.low}`);
|
|
1055
|
-
console.log(`
|
|
1056
|
-
${ansis.yellow("By Status:")}`);
|
|
1057
|
-
console.log(` \u26A1 Active: ${index.stats.byStatus.active}`);
|
|
1058
|
-
console.log(` \u2705 Resolved: ${index.stats.byStatus.resolved}`);
|
|
1059
|
-
console.log(` \u{1F440} Monitoring: ${index.stats.byStatus.monitoring}`);
|
|
1060
|
-
console.log(` \u{1F4E6} Archived: ${index.stats.byStatus.archived}
|
|
1061
|
-
`);
|
|
1062
|
-
} else {
|
|
1063
|
-
console.log("\n\u{1F52C} Postmortem Commands:");
|
|
1064
|
-
console.log(" ccjk postmortem init - Initialize system");
|
|
1065
|
-
console.log(" ccjk postmortem generate - Generate from commits");
|
|
1066
|
-
console.log(" ccjk postmortem list - List all reports");
|
|
1067
|
-
console.log(" ccjk postmortem show <id> - Show report details");
|
|
1068
|
-
console.log(" ccjk postmortem check - Check code for issues");
|
|
1069
|
-
console.log(" ccjk postmortem sync - Sync to CLAUDE.md");
|
|
1070
|
-
console.log(" ccjk postmortem stats - Show statistics\n");
|
|
1071
|
-
}
|
|
1072
|
-
};
|
|
1073
|
-
}
|
|
1074
|
-
},
|
|
1075
|
-
// ==================== Context Compression System ====================
|
|
1076
|
-
{
|
|
1077
|
-
name: "claude",
|
|
1078
|
-
description: "Transparent claude command wrapper with context compression",
|
|
1079
|
-
tier: "extended",
|
|
1080
|
-
options: [
|
|
1081
|
-
{ flags: "--debug", description: "Enable debug output" },
|
|
1082
|
-
{ flags: "--no-wrap", description: "Disable wrapping (pass through)" }
|
|
1083
|
-
],
|
|
1084
|
-
loader: async () => {
|
|
1085
|
-
const { claudeWrapper } = await import('./chunks/claude-wrapper.mjs');
|
|
1086
|
-
return async (options) => {
|
|
1087
|
-
const argv = process__default.argv;
|
|
1088
|
-
const claudeIndex = argv.findIndex((arg) => arg === "claude");
|
|
1089
|
-
const rawArgs = claudeIndex >= 0 ? argv.slice(claudeIndex + 1) : [];
|
|
1090
|
-
const args = rawArgs.filter((arg) => arg !== "--debug" && arg !== "--no-wrap");
|
|
1091
|
-
await claudeWrapper(args, {
|
|
1092
|
-
debug: options.debug,
|
|
1093
|
-
noWrap: options.noWrap
|
|
1094
|
-
});
|
|
1095
|
-
};
|
|
1096
|
-
}
|
|
1097
|
-
},
|
|
1098
|
-
// ==================== Performance Monitoring ====================
|
|
1099
|
-
{
|
|
1100
|
-
name: "monitor [action]",
|
|
1101
|
-
description: "Real-time performance monitoring dashboard",
|
|
1102
|
-
tier: "extended",
|
|
1103
|
-
options: [
|
|
1104
|
-
{ flags: "--refresh, -r <ms>", description: "Refresh interval (milliseconds)" },
|
|
1105
|
-
{ flags: "--range <timeRange>", description: "Report time range (hourly|daily|weekly|monthly)" },
|
|
1106
|
-
{ flags: "--format, -f <format>", description: "Export format (json|csv|html)" },
|
|
1107
|
-
{ flags: "--output, -o <file>", description: "Output file path" },
|
|
1108
|
-
{ flags: "--json", description: "Also output JSON format" },
|
|
1109
|
-
{ flags: "--no-banner", description: "Do not display banner" }
|
|
1110
|
-
],
|
|
1111
|
-
loader: async () => {
|
|
1112
|
-
return async (options, action) => {
|
|
1113
|
-
const { monitor } = await import('./chunks/monitor.mjs');
|
|
1114
|
-
await monitor(action || void 0, options);
|
|
1115
|
-
};
|
|
1116
|
-
}
|
|
1117
|
-
},
|
|
1118
|
-
// ==================== Configuration Management ====================
|
|
1119
|
-
{
|
|
1120
|
-
name: "config [action] [key] [value]",
|
|
1121
|
-
description: "Manage configuration",
|
|
1122
|
-
tier: "extended",
|
|
1123
|
-
options: [
|
|
1124
|
-
{ flags: "--json", description: "Output in JSON format" }
|
|
1125
|
-
],
|
|
1126
|
-
loader: async () => {
|
|
1127
|
-
const { configCommand } = await import('./chunks/config3.mjs');
|
|
1128
|
-
return async (options, action, key, value) => {
|
|
1129
|
-
const args = [];
|
|
1130
|
-
if (key !== void 0)
|
|
1131
|
-
args.push(key);
|
|
1132
|
-
if (value !== void 0)
|
|
1133
|
-
args.push(value);
|
|
1134
|
-
await configCommand(action || "list", args, {
|
|
1135
|
-
lang: options.lang,
|
|
1136
|
-
codeType: options.codeType,
|
|
1137
|
-
global: options.global,
|
|
1138
|
-
json: options.json
|
|
1139
|
-
});
|
|
1140
|
-
};
|
|
1141
|
-
}
|
|
1142
|
-
},
|
|
1143
|
-
// context 命令已在上面定义(第 435 行),使用 context-compression/commands/context.ts
|
|
1144
|
-
// shell hook 管理功能通过 'ccjk context hook install/uninstall' 子命令访问
|
|
1145
|
-
// Deprecated commands removed in v2.x cleanup
|
|
1146
|
-
// - shencha: replaced by 'ccjk doctor'
|
|
1147
|
-
// - features: replaced by 'ccjk' menu
|
|
1148
|
-
// - tools: replaced by 'ccjk' menu
|
|
1149
|
-
// ==================== CCJK v8.0.0 Commands ====================
|
|
1150
|
-
{
|
|
1151
|
-
name: "ccjk:mcp",
|
|
1152
|
-
description: "Intelligent MCP service management based on project analysis",
|
|
1153
|
-
aliases: ["ccjk-mcp"],
|
|
1154
|
-
tier: "extended",
|
|
1155
|
-
options: [
|
|
1156
|
-
{ flags: "--tier <tier>", description: "Service tier filter (core, ondemand, scenario, all)" },
|
|
1157
|
-
{ flags: "--services <services>", description: "Specific services to install (comma-separated)" },
|
|
1158
|
-
{ flags: "--exclude <services>", description: "Services to exclude (comma-separated)" },
|
|
1159
|
-
{ flags: "--auto-install", description: "Auto-install dependencies" },
|
|
1160
|
-
{ flags: "--skip-verification", description: "Skip service verification" },
|
|
1161
|
-
{ flags: "--dry-run", description: "Preview without installing" },
|
|
1162
|
-
{ flags: "--json", description: "JSON output for automation" },
|
|
1163
|
-
{ flags: "--force", description: "Force reinstallation" },
|
|
1164
|
-
{ flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" }
|
|
1165
|
-
],
|
|
1166
|
-
loader: async () => {
|
|
1167
|
-
return async (options) => {
|
|
1168
|
-
const { ccjkMcp, formatResultAsJson, formatResultForConsole } = await import('./chunks/ccjk-mcp.mjs');
|
|
1169
|
-
const services = options.services ? options.services.split(",").map((s) => s.trim()) : void 0;
|
|
1170
|
-
const exclude = options.exclude ? options.exclude.split(",").map((s) => s.trim()) : void 0;
|
|
1171
|
-
const result = await ccjkMcp({
|
|
1172
|
-
interactive: !options.json && !options.dryRun,
|
|
1173
|
-
tier: options.tier,
|
|
1174
|
-
services,
|
|
1175
|
-
exclude,
|
|
1176
|
-
autoInstall: options.autoInstall,
|
|
1177
|
-
skipVerification: options.skipVerification,
|
|
1178
|
-
dryRun: options.dryRun,
|
|
1179
|
-
json: options.json,
|
|
1180
|
-
lang: options.lang,
|
|
1181
|
-
force: options.force
|
|
1182
|
-
});
|
|
1183
|
-
if (options.json) {
|
|
1184
|
-
console.log(formatResultAsJson(result));
|
|
1185
|
-
} else {
|
|
1186
|
-
console.log(formatResultForConsole(result));
|
|
1187
|
-
}
|
|
1188
|
-
};
|
|
1189
|
-
}
|
|
1190
|
-
},
|
|
1191
|
-
{
|
|
1192
|
-
name: "ccjk:skills",
|
|
1193
|
-
description: "Auto-recommend and install CCJK skills based on project analysis",
|
|
1194
|
-
aliases: ["ccjk-skills"],
|
|
1195
|
-
tier: "extended",
|
|
1196
|
-
options: [
|
|
1197
|
-
{ flags: "--category <category>", description: "Filter by skill category" },
|
|
1198
|
-
{ flags: "--tags <tags>", description: "Filter by tags (comma-separated)" },
|
|
1199
|
-
{ flags: "--exclude <skills>", description: "Exclude specific skills (comma-separated)" },
|
|
1200
|
-
{ flags: "--dry-run", description: "Show recommendations without installing" },
|
|
1201
|
-
{ flags: "--force", description: "Force installation even if already installed" },
|
|
1202
|
-
{ flags: "--json", description: "JSON output" },
|
|
1203
|
-
{ flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" }
|
|
1204
|
-
],
|
|
1205
|
-
loader: async () => {
|
|
1206
|
-
return async (options) => {
|
|
1207
|
-
const { ccjkSkills } = await import('./chunks/ccjk-skills.mjs');
|
|
1208
|
-
await ccjkSkills({
|
|
1209
|
-
category: options.category,
|
|
1210
|
-
tags: options.tags ? options.tags.split(",") : void 0,
|
|
1211
|
-
exclude: options.exclude ? options.exclude.split(",") : void 0,
|
|
1212
|
-
dryRun: options.dryRun,
|
|
1213
|
-
force: options.force,
|
|
1214
|
-
json: options.json,
|
|
1215
|
-
lang: options.lang
|
|
1216
|
-
});
|
|
1217
|
-
};
|
|
1218
|
-
}
|
|
1219
|
-
},
|
|
1220
|
-
{
|
|
1221
|
-
name: "ccjk:agents",
|
|
1222
|
-
description: "Create and manage CCJK agents",
|
|
1223
|
-
aliases: ["ccjk-agents"],
|
|
1224
|
-
tier: "extended",
|
|
1225
|
-
options: [
|
|
1226
|
-
{ flags: "--create <name>", description: "Create a new agent" },
|
|
1227
|
-
{ flags: "--list", description: "List available agents" },
|
|
1228
|
-
{ flags: "--delete <name>", description: "Delete an agent" },
|
|
1229
|
-
{ flags: "--template <template>", description: "Use specific template" },
|
|
1230
|
-
{ flags: "--json", description: "JSON output" },
|
|
1231
|
-
{ flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" }
|
|
1232
|
-
],
|
|
1233
|
-
loader: async () => {
|
|
1234
|
-
return async (options) => {
|
|
1235
|
-
const { ccjkAgents } = await import('./chunks/ccjk-agents.mjs');
|
|
1236
|
-
await ccjkAgents({
|
|
1237
|
-
create: options.create,
|
|
1238
|
-
list: options.list,
|
|
1239
|
-
delete: options.delete,
|
|
1240
|
-
template: options.template,
|
|
1241
|
-
json: options.json,
|
|
1242
|
-
lang: options.lang
|
|
1243
|
-
});
|
|
1244
|
-
};
|
|
1245
|
-
}
|
|
1246
|
-
},
|
|
1247
|
-
{
|
|
1248
|
-
name: "ccjk:persistence",
|
|
1249
|
-
description: "Manage context persistence and storage tiers",
|
|
1250
|
-
aliases: ["ccjk-persistence", "persistence"],
|
|
1251
|
-
tier: "extended",
|
|
1252
|
-
options: [
|
|
1253
|
-
{ flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" }
|
|
1254
|
-
],
|
|
1255
|
-
loader: async () => {
|
|
1256
|
-
return async (options) => {
|
|
1257
|
-
const { persistenceManager } = await import('./chunks/persistence-manager.mjs');
|
|
1258
|
-
await persistenceManager();
|
|
1259
|
-
};
|
|
1260
|
-
}
|
|
1261
|
-
},
|
|
1262
|
-
{
|
|
1263
|
-
name: "ccjk:hooks",
|
|
1264
|
-
description: "Auto-recommend and configure CCJK hooks based on project analysis",
|
|
1265
|
-
aliases: ["ccjk-hooks"],
|
|
1266
|
-
tier: "extended",
|
|
1267
|
-
options: [
|
|
1268
|
-
{ flags: "--type <type>", description: "Filter by hook type (pre-commit, post-commit, etc.)" },
|
|
1269
|
-
{ flags: "--category <category>", description: "Filter by category (quality, security, etc.)" },
|
|
1270
|
-
{ flags: "--exclude <hooks>", description: "Exclude specific hooks (comma-separated)" },
|
|
1271
|
-
{ flags: "--enabled", description: "Only show enabled hooks" },
|
|
1272
|
-
{ flags: "--dry-run", description: "Show recommendations without installing" },
|
|
1273
|
-
{ flags: "--json", description: "JSON output" },
|
|
1274
|
-
{ flags: "--verbose", description: "Verbose output" }
|
|
1275
|
-
],
|
|
1276
|
-
loader: async () => {
|
|
1277
|
-
return async (options) => {
|
|
1278
|
-
const { ccjkHooks } = await import('./chunks/ccjk-hooks.mjs');
|
|
1279
|
-
await ccjkHooks({
|
|
1280
|
-
type: options.type,
|
|
1281
|
-
category: options.category,
|
|
1282
|
-
exclude: options.exclude ? options.exclude.split(",") : void 0,
|
|
1283
|
-
enabled: options.enabled,
|
|
1284
|
-
dryRun: options.dryRun,
|
|
1285
|
-
json: options.json,
|
|
1286
|
-
verbose: options.verbose
|
|
1287
|
-
});
|
|
1288
|
-
};
|
|
1289
|
-
}
|
|
1290
|
-
},
|
|
1291
|
-
{
|
|
1292
|
-
name: "ccjk:skills",
|
|
1293
|
-
description: "Auto-install skills based on project analysis",
|
|
1294
|
-
aliases: ["ccjk-skills"],
|
|
1295
|
-
tier: "extended",
|
|
1296
|
-
options: [
|
|
1297
|
-
{ flags: "--interactive, -i", description: "Interactive mode (default: true)" },
|
|
1298
|
-
{ flags: "--category <category>", description: "Filter by skill category" },
|
|
1299
|
-
{ flags: "--tags <tags>", description: "Filter by tags (comma-separated)" },
|
|
1300
|
-
{ flags: "--exclude <skills>", description: "Exclude specific skills (comma-separated)" },
|
|
1301
|
-
{ flags: "--dry-run", description: "Show what would be installed without installing" },
|
|
1302
|
-
{ flags: "--json", description: "Output in JSON format" },
|
|
1303
|
-
{ flags: "--force", description: "Force installation (overwrite existing)" },
|
|
1304
|
-
{ flags: "--target-dir <dir>", description: "Target directory (default: current)" },
|
|
1305
|
-
{ flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" }
|
|
1306
|
-
],
|
|
1307
|
-
loader: async () => {
|
|
1308
|
-
return async (options) => {
|
|
1309
|
-
const { ccjkSkills } = await import('./chunks/ccjk-skills.mjs');
|
|
1310
|
-
await ccjkSkills({
|
|
1311
|
-
interactive: options.interactive !== false,
|
|
1312
|
-
category: options.category,
|
|
1313
|
-
tags: options.tags ? options.tags.split(",") : void 0,
|
|
1314
|
-
exclude: options.exclude ? options.exclude.split(",") : void 0,
|
|
1315
|
-
dryRun: options.dryRun,
|
|
1316
|
-
json: options.json,
|
|
1317
|
-
force: options.force,
|
|
1318
|
-
targetDir: options.targetDir,
|
|
1319
|
-
lang: options.lang
|
|
1320
|
-
});
|
|
1321
|
-
};
|
|
1322
|
-
}
|
|
1323
|
-
},
|
|
1324
|
-
// ==================== CCJK v8.0.0 Setup Commands ====================
|
|
1325
|
-
{
|
|
1326
|
-
name: "ccjk:all",
|
|
1327
|
-
description: "Cloud AI-powered complete setup (Recommended)",
|
|
1328
|
-
aliases: ["ccjk-all"],
|
|
1329
|
-
tier: "extended",
|
|
1330
|
-
options: [
|
|
1331
|
-
{ flags: "--strategy <type>", description: "Cloud strategy (cloud-smart/cloud-conservative/local-fallback)" },
|
|
1332
|
-
{ flags: "--use-cloud", description: "Use cloud recommendations" },
|
|
1333
|
-
{ flags: "--cloud-endpoint <url>", description: "Cloud API endpoint" },
|
|
1334
|
-
{ flags: "--cache-strategy <type>", description: "Cache strategy" },
|
|
1335
|
-
{ flags: "--show-reasons", description: "Show recommendation reasons" },
|
|
1336
|
-
{ flags: "--show-confidence", description: "Show confidence scores" },
|
|
1337
|
-
{ flags: "--show-comparison", description: "Show community comparison" },
|
|
1338
|
-
{ flags: "--submit-telemetry", description: "Submit anonymous telemetry" },
|
|
1339
|
-
{ flags: "--dry-run", description: "Preview without installing" },
|
|
1340
|
-
{ flags: "--json", description: "JSON output" },
|
|
1341
|
-
{ flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" }
|
|
1342
|
-
],
|
|
1343
|
-
loader: async () => {
|
|
1344
|
-
return async (options) => {
|
|
1345
|
-
const { ccjkAll } = await import('./chunks/ccjk-all.mjs');
|
|
1346
|
-
await ccjkAll({
|
|
1347
|
-
strategy: options.strategy,
|
|
1348
|
-
useCloud: options.useCloud,
|
|
1349
|
-
cloudEndpoint: options.cloudEndpoint,
|
|
1350
|
-
cacheStrategy: options.cacheStrategy,
|
|
1351
|
-
showRecommendationReason: options.showReasons,
|
|
1352
|
-
showConfidence: options.showConfidence,
|
|
1353
|
-
showComparison: options.showComparison,
|
|
1354
|
-
submitTelemetry: options.submitTelemetry,
|
|
1355
|
-
dryRun: options.dryRun,
|
|
1356
|
-
json: options.json,
|
|
1357
|
-
lang: options.lang
|
|
1358
|
-
});
|
|
1359
|
-
};
|
|
1360
|
-
}
|
|
1361
|
-
},
|
|
1362
|
-
{
|
|
1363
|
-
name: "ccjk:setup",
|
|
1364
|
-
description: "Complete local setup with project analysis",
|
|
1365
|
-
aliases: ["ccjk-setup"],
|
|
1366
|
-
tier: "extended",
|
|
1367
|
-
options: [
|
|
1368
|
-
{ flags: "--profile <profile>", description: "Setup profile (minimal/recommended/full/custom)" },
|
|
1369
|
-
{ flags: "--resources <resources>", description: "Resources to install (comma-separated)" },
|
|
1370
|
-
{ flags: "--parallel", description: "Enable parallel execution" },
|
|
1371
|
-
{ flags: "--max-concurrency <number>", description: "Maximum parallel operations" },
|
|
1372
|
-
{ flags: "--interactive", description: "Interactive mode" },
|
|
1373
|
-
{ flags: "--auto-confirm, -y", description: "Auto-confirm all prompts" },
|
|
1374
|
-
{ flags: "--dry-run", description: "Preview without installing" },
|
|
1375
|
-
{ flags: "--json", description: "JSON output" },
|
|
1376
|
-
{ flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" }
|
|
1377
|
-
],
|
|
1378
|
-
loader: async () => {
|
|
1379
|
-
return async (options) => {
|
|
1380
|
-
const { ccjkSetup } = await import('./chunks/ccjk-setup.mjs');
|
|
1381
|
-
const exitCode = await ccjkSetup({
|
|
1382
|
-
profile: options.profile,
|
|
1383
|
-
resources: options.resources ? options.resources.split(",") : void 0,
|
|
1384
|
-
parallel: options.parallel,
|
|
1385
|
-
maxConcurrency: options.maxConcurrency ? Number(options.maxConcurrency) : void 0,
|
|
1386
|
-
interactive: options.interactive !== false,
|
|
1387
|
-
autoConfirm: options.autoConfirm,
|
|
1388
|
-
dryRun: options.dryRun,
|
|
1389
|
-
json: options.json,
|
|
1390
|
-
lang: options.lang
|
|
1391
|
-
});
|
|
1392
|
-
if (exitCode !== 0) {
|
|
1393
|
-
process__default.exit(exitCode);
|
|
1394
|
-
}
|
|
1395
|
-
};
|
|
1396
|
-
}
|
|
1397
|
-
},
|
|
1398
|
-
// ==================== Brain Dashboard ====================
|
|
1399
|
-
{
|
|
1400
|
-
name: "sessions",
|
|
1401
|
-
description: "Manage and restore Brain System sessions",
|
|
1402
|
-
tier: "extended",
|
|
1403
|
-
options: [
|
|
1404
|
-
{ flags: "--list", description: "List all sessions" },
|
|
1405
|
-
{ flags: "--show <id>", description: "Show session details" },
|
|
1406
|
-
{ flags: "--restore <id>", description: "Restore incomplete session" },
|
|
1407
|
-
{ flags: "--cleanup", description: "Clean up old sessions" }
|
|
1408
|
-
],
|
|
1409
|
-
loader: async () => {
|
|
1410
|
-
const { sessionsCommand } = await import('./chunks/sessions.mjs');
|
|
1411
|
-
return async (options) => {
|
|
1412
|
-
await sessionsCommand({
|
|
1413
|
-
list: options.list,
|
|
1414
|
-
show: options.show,
|
|
1415
|
-
restore: options.restore,
|
|
1416
|
-
cleanup: options.cleanup
|
|
1417
|
-
});
|
|
1418
|
-
};
|
|
1419
|
-
}
|
|
1420
|
-
},
|
|
1421
|
-
{
|
|
1422
|
-
name: "context",
|
|
1423
|
-
description: "View and manage hierarchical context loading",
|
|
1424
|
-
tier: "extended",
|
|
1425
|
-
options: [
|
|
1426
|
-
{ flags: "--show", description: "Show loaded context" },
|
|
1427
|
-
{ flags: "--layers <layers>", description: "Specify layers (comma-separated)" },
|
|
1428
|
-
{ flags: "--task <name>", description: "Preview context for task" },
|
|
1429
|
-
{ flags: "--clear", description: "Clear context cache" }
|
|
1430
|
-
],
|
|
1431
|
-
loader: async () => {
|
|
1432
|
-
const { contextCommand } = await import('./chunks/context.mjs');
|
|
1433
|
-
return async (options) => {
|
|
1434
|
-
await contextCommand({
|
|
1435
|
-
show: options.show,
|
|
1436
|
-
layers: options.layers,
|
|
1437
|
-
task: options.task,
|
|
1438
|
-
clear: options.clear
|
|
1439
|
-
});
|
|
1440
|
-
};
|
|
1441
|
-
}
|
|
1442
|
-
},
|
|
1443
|
-
{
|
|
1444
|
-
name: "paradigm",
|
|
1445
|
-
description: "Detect and display project file system paradigm",
|
|
1446
|
-
tier: "extended",
|
|
1447
|
-
options: [
|
|
1448
|
-
{ flags: "--verbose", description: "Show detailed information" },
|
|
1449
|
-
{ flags: "--role <role>", description: "Show files for specific role" }
|
|
1450
|
-
],
|
|
1451
|
-
loader: async () => {
|
|
1452
|
-
const { paradigmCommand } = await import('./chunks/paradigm.mjs');
|
|
1453
|
-
return async (options) => {
|
|
1454
|
-
await paradigmCommand({
|
|
1455
|
-
verbose: options.verbose,
|
|
1456
|
-
role: options.role
|
|
1457
|
-
});
|
|
1458
|
-
};
|
|
1459
|
-
}
|
|
1460
|
-
},
|
|
1461
|
-
{
|
|
1462
|
-
name: "trace",
|
|
1463
|
-
description: "View execution traces for Brain System operations",
|
|
1464
|
-
tier: "extended",
|
|
1465
|
-
options: [
|
|
1466
|
-
{ flags: "--list", description: "List all traces" },
|
|
1467
|
-
{ flags: "--last", description: "Show last trace" },
|
|
1468
|
-
{ flags: "--session-id <id>", description: "Show specific trace" },
|
|
1469
|
-
{ flags: "--cleanup", description: "Clean up old traces" }
|
|
1470
|
-
],
|
|
1471
|
-
loader: async () => {
|
|
1472
|
-
const { traceCommand } = await import('./chunks/trace.mjs');
|
|
1473
|
-
return async (options) => {
|
|
1474
|
-
await traceCommand({
|
|
1475
|
-
list: options.list,
|
|
1476
|
-
last: options.last,
|
|
1477
|
-
sessionId: options.sessionId,
|
|
1478
|
-
cleanup: options.cleanup
|
|
1479
|
-
});
|
|
1480
|
-
};
|
|
1481
|
-
}
|
|
1482
|
-
},
|
|
1483
|
-
{
|
|
1484
|
-
name: "status",
|
|
1485
|
-
description: "Brain Dashboard - setup health score and recommendations",
|
|
1486
|
-
aliases: ["st", "brain"],
|
|
1487
|
-
tier: "core",
|
|
1488
|
-
options: [
|
|
1489
|
-
{ flags: "--json", description: "Output as JSON" },
|
|
1490
|
-
{ flags: "--compact", description: "Compact output" }
|
|
1491
|
-
],
|
|
1492
|
-
loader: async () => {
|
|
1493
|
-
const { statusCommand } = await import('./chunks/status.mjs');
|
|
1494
|
-
return async (options) => {
|
|
1495
|
-
await statusCommand({
|
|
1496
|
-
json: options.json,
|
|
1497
|
-
compact: options.compact
|
|
1498
|
-
});
|
|
1499
|
-
};
|
|
1500
|
-
}
|
|
1501
|
-
},
|
|
1502
|
-
{
|
|
1503
|
-
name: "dashboard",
|
|
1504
|
-
description: "Brain Dashboard - context compression and persistence monitoring",
|
|
1505
|
-
aliases: ["dash", "db"],
|
|
1506
|
-
tier: "core",
|
|
1507
|
-
options: [
|
|
1508
|
-
{ flags: "--json", description: "Output as JSON" },
|
|
1509
|
-
{ flags: "--compact", description: "Compact output" }
|
|
1510
|
-
],
|
|
1511
|
-
loader: async () => {
|
|
1512
|
-
const { dashboardCommand } = await import('./chunks/dashboard.mjs');
|
|
1513
|
-
return async (options) => {
|
|
1514
|
-
await dashboardCommand({
|
|
1515
|
-
json: options.json,
|
|
1516
|
-
compact: options.compact
|
|
1517
|
-
});
|
|
1518
|
-
};
|
|
1519
|
-
}
|
|
1520
|
-
},
|
|
1521
|
-
{
|
|
1522
|
-
name: "remote",
|
|
1523
|
-
description: "Remote control management",
|
|
1524
|
-
tier: "core",
|
|
1525
|
-
options: [
|
|
1526
|
-
{ flags: "setup", description: "One-command remote setup" },
|
|
1527
|
-
{ flags: "doctor", description: "Diagnose remote setup" },
|
|
1528
|
-
{ flags: "enable", description: "Enable remote control" },
|
|
1529
|
-
{ flags: "disable", description: "Disable remote control" },
|
|
1530
|
-
{ flags: "status", description: "Show remote status" },
|
|
1531
|
-
{ flags: "qr", description: "Show pairing QR code" },
|
|
1532
|
-
{ flags: "--json", description: "Output as JSON" },
|
|
1533
|
-
{ flags: "--non-interactive", description: "Fail instead of prompting" },
|
|
1534
|
-
{ flags: "--server-url <url>", description: "Remote server URL for setup" },
|
|
1535
|
-
{ flags: "--auth-token <token>", description: "Remote auth token for setup" },
|
|
1536
|
-
{ flags: "--binding-code <code>", description: "Binding code for setup" }
|
|
1537
|
-
],
|
|
1538
|
-
loader: async () => {
|
|
1539
|
-
const { doctorRemote, enableRemote, disableRemote, remoteStatus, setupRemote, showQRCode } = await import('./chunks/remote.mjs');
|
|
1540
|
-
return async (options, ...args) => {
|
|
1541
|
-
const action = args[0];
|
|
1542
|
-
switch (action) {
|
|
1543
|
-
case "setup":
|
|
1544
|
-
await setupRemote({
|
|
1545
|
-
json: options.json,
|
|
1546
|
-
nonInteractive: options.nonInteractive,
|
|
1547
|
-
serverUrl: options.serverUrl,
|
|
1548
|
-
authToken: options.authToken,
|
|
1549
|
-
bindingCode: options.bindingCode
|
|
1550
|
-
});
|
|
1551
|
-
break;
|
|
1552
|
-
case "doctor":
|
|
1553
|
-
await doctorRemote({
|
|
1554
|
-
json: options.json
|
|
1555
|
-
});
|
|
1556
|
-
break;
|
|
1557
|
-
case "enable":
|
|
1558
|
-
await enableRemote();
|
|
1559
|
-
break;
|
|
1560
|
-
case "disable":
|
|
1561
|
-
await disableRemote();
|
|
1562
|
-
break;
|
|
1563
|
-
case "status":
|
|
1564
|
-
await remoteStatus();
|
|
1565
|
-
break;
|
|
1566
|
-
case "qr":
|
|
1567
|
-
await showQRCode();
|
|
1568
|
-
break;
|
|
1569
|
-
default:
|
|
1570
|
-
await remoteStatus();
|
|
1571
|
-
}
|
|
1572
|
-
};
|
|
1573
|
-
}
|
|
1574
|
-
},
|
|
1575
|
-
{
|
|
1576
|
-
name: "evolution",
|
|
1577
|
-
description: "Evolution Layer - AI knowledge sharing",
|
|
1578
|
-
tier: "core",
|
|
1579
|
-
options: [
|
|
1580
|
-
{ flags: "top", description: "Show top capabilities" },
|
|
1581
|
-
{ flags: "search <query>", description: "Search for solutions" },
|
|
1582
|
-
{ flags: "show <geneId>", description: "Show gene details" },
|
|
1583
|
-
{ flags: "stats", description: "Show statistics" }
|
|
1584
|
-
],
|
|
1585
|
-
loader: async () => {
|
|
1586
|
-
const { handleEvolutionCommand } = await import('./chunks/evolution.mjs');
|
|
1587
|
-
return async (options, ...args) => {
|
|
1588
|
-
const action = args[0];
|
|
1589
|
-
const restArgs = args.slice(1);
|
|
1590
|
-
await handleEvolutionCommand(action, restArgs, options);
|
|
1591
|
-
};
|
|
1592
|
-
}
|
|
1593
|
-
},
|
|
1594
|
-
{
|
|
1595
|
-
name: "daemon",
|
|
1596
|
-
description: "Daemon management",
|
|
1597
|
-
tier: "core",
|
|
1598
|
-
options: [
|
|
1599
|
-
{ flags: "start", description: "Start daemon" },
|
|
1600
|
-
{ flags: "stop", description: "Stop daemon" },
|
|
1601
|
-
{ flags: "status", description: "Daemon status" }
|
|
1602
|
-
],
|
|
1603
|
-
loader: async () => {
|
|
1604
|
-
const { startDaemon, stopDaemon, remoteStatus } = await import('./chunks/remote.mjs');
|
|
1605
|
-
return async (options, ...args) => {
|
|
1606
|
-
const action = args[0];
|
|
1607
|
-
switch (action) {
|
|
1608
|
-
case "start":
|
|
1609
|
-
await startDaemon();
|
|
1610
|
-
break;
|
|
1611
|
-
case "stop":
|
|
1612
|
-
await stopDaemon();
|
|
1613
|
-
break;
|
|
1614
|
-
case "status":
|
|
1615
|
-
await remoteStatus();
|
|
1616
|
-
break;
|
|
1617
|
-
default:
|
|
1618
|
-
await remoteStatus();
|
|
1619
|
-
}
|
|
1620
|
-
};
|
|
1621
|
-
}
|
|
1622
|
-
},
|
|
1623
|
-
{
|
|
1624
|
-
name: "morning",
|
|
1625
|
-
description: "Morning health check + stats summary",
|
|
1626
|
-
tier: "core",
|
|
1627
|
-
options: [
|
|
1628
|
-
{ flags: "--json", description: "Output as JSON" },
|
|
1629
|
-
{ flags: "--silent", description: "Silent mode" }
|
|
1630
|
-
],
|
|
1631
|
-
loader: async () => {
|
|
1632
|
-
const { morningCommand } = await import('./chunks/quick-actions.mjs');
|
|
1633
|
-
return async (options) => {
|
|
1634
|
-
await morningCommand({
|
|
1635
|
-
json: options.json,
|
|
1636
|
-
silent: options.silent
|
|
1637
|
-
});
|
|
1638
|
-
};
|
|
1639
|
-
}
|
|
1640
|
-
},
|
|
1641
|
-
{
|
|
1642
|
-
name: "review",
|
|
1643
|
-
description: "Daily review - contexts used, tokens saved",
|
|
1644
|
-
tier: "core",
|
|
1645
|
-
options: [
|
|
1646
|
-
{ flags: "--json", description: "Output as JSON" },
|
|
1647
|
-
{ flags: "--silent", description: "Silent mode" }
|
|
1648
|
-
],
|
|
1649
|
-
loader: async () => {
|
|
1650
|
-
const { reviewCommand } = await import('./chunks/quick-actions.mjs');
|
|
1651
|
-
return async (options) => {
|
|
1652
|
-
await reviewCommand({
|
|
1653
|
-
json: options.json,
|
|
1654
|
-
silent: options.silent
|
|
1655
|
-
});
|
|
1656
|
-
};
|
|
1657
|
-
}
|
|
1658
|
-
},
|
|
1659
|
-
{
|
|
1660
|
-
name: "cleanup",
|
|
1661
|
-
description: "Weekly cleanup - old contexts, VACUUM",
|
|
1662
|
-
tier: "core",
|
|
1663
|
-
options: [
|
|
1664
|
-
{ flags: "--json", description: "Output as JSON" },
|
|
1665
|
-
{ flags: "--silent", description: "Silent mode" }
|
|
1666
|
-
],
|
|
1667
|
-
loader: async () => {
|
|
1668
|
-
const { cleanupCommand } = await import('./chunks/quick-actions.mjs');
|
|
1669
|
-
return async (options) => {
|
|
1670
|
-
await cleanupCommand({
|
|
1671
|
-
json: options.json,
|
|
1672
|
-
silent: options.silent
|
|
1673
|
-
});
|
|
1674
|
-
};
|
|
1675
|
-
}
|
|
1676
|
-
},
|
|
1677
|
-
{
|
|
1678
|
-
name: "boost",
|
|
1679
|
-
description: "One-click optimization - auto-apply all recommendations",
|
|
1680
|
-
tier: "core",
|
|
1681
|
-
options: [
|
|
1682
|
-
{ flags: "--dry-run, -d", description: "Preview without applying" },
|
|
1683
|
-
{ flags: "--yes, -y", description: "Skip confirmation" }
|
|
1684
|
-
],
|
|
1685
|
-
loader: async () => {
|
|
1686
|
-
const { boost } = await import('./chunks/boost.mjs');
|
|
1687
|
-
return async (options) => {
|
|
1688
|
-
await boost({
|
|
1689
|
-
dryRun: options.dryRun,
|
|
1690
|
-
yes: options.yes
|
|
1691
|
-
});
|
|
1692
|
-
};
|
|
1693
|
-
}
|
|
1694
|
-
},
|
|
1695
|
-
// ==================== Plugin Management ====================
|
|
1696
|
-
{
|
|
1697
|
-
name: "add <source>",
|
|
1698
|
-
description: "Add plugins from GitHub, npm, or local path",
|
|
1699
|
-
tier: "extended",
|
|
1700
|
-
options: [
|
|
1701
|
-
{ flags: "--type, -t <type>", description: "Plugin type (skill, mcp, agent, hook)" },
|
|
1702
|
-
{ flags: "--force, -f", description: "Force overwrite existing" },
|
|
1703
|
-
{ flags: "--dry-run, -d", description: "Preview without installing" },
|
|
1704
|
-
{ flags: "--json", description: "JSON output" },
|
|
1705
|
-
{ flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" }
|
|
1706
|
-
],
|
|
1707
|
-
loader: async () => {
|
|
1708
|
-
const { addCommand } = await import('./chunks/index11.mjs');
|
|
1709
|
-
return async (options, source) => {
|
|
1710
|
-
await addCommand(source, {
|
|
1711
|
-
type: options.type,
|
|
1712
|
-
force: options.force,
|
|
1713
|
-
dryRun: options.dryRun,
|
|
1714
|
-
json: options.json,
|
|
1715
|
-
lang: options.lang
|
|
1716
|
-
});
|
|
1717
|
-
};
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
];
|
|
1721
|
-
let i18nInitialized = false;
|
|
1722
|
-
let currentLang = "en";
|
|
1723
|
-
async function initI18nLazy(lang) {
|
|
1724
|
-
if (i18nInitialized && lang === currentLang)
|
|
1725
|
-
return;
|
|
1726
|
-
const { initI18n, changeLanguage } = await import('./chunks/index5.mjs');
|
|
1727
|
-
if (!i18nInitialized) {
|
|
1728
|
-
await initI18n(lang || "en");
|
|
1729
|
-
i18nInitialized = true;
|
|
1730
|
-
} else if (lang && lang !== currentLang) {
|
|
1731
|
-
await changeLanguage(lang);
|
|
1732
|
-
}
|
|
1733
|
-
currentLang = lang || "en";
|
|
1734
|
-
}
|
|
1735
|
-
async function resolveLanguage(options) {
|
|
1736
|
-
const envLang = process__default.env.CCJK_LANG;
|
|
1737
|
-
if (options?.allLang)
|
|
1738
|
-
return options.allLang;
|
|
1739
|
-
if (options?.lang)
|
|
1740
|
-
return options.lang;
|
|
1741
|
-
if (envLang)
|
|
1742
|
-
return envLang;
|
|
1743
|
-
try {
|
|
1744
|
-
const { readZcfConfigAsync } = await import('./chunks/ccjk-config.mjs');
|
|
1745
|
-
const config = await readZcfConfigAsync();
|
|
1746
|
-
if (config?.preferredLang)
|
|
1747
|
-
return config.preferredLang;
|
|
1748
|
-
} catch {
|
|
1749
|
-
}
|
|
1750
|
-
if (!options?.skipPrompt) {
|
|
1751
|
-
const { selectScriptLanguage } = await import('./chunks/prompts.mjs');
|
|
1752
|
-
return await selectScriptLanguage();
|
|
1753
|
-
}
|
|
1754
|
-
return "en";
|
|
1755
|
-
}
|
|
1756
|
-
function extractLanguageOptions(options) {
|
|
1757
|
-
if (!options || typeof options !== "object")
|
|
1758
|
-
return {};
|
|
1759
|
-
const obj = options;
|
|
1760
|
-
return {
|
|
1761
|
-
lang: typeof obj.lang === "string" ? obj.lang : void 0,
|
|
1762
|
-
allLang: typeof obj.allLang === "string" ? obj.allLang : void 0,
|
|
1763
|
-
skipPrompt: typeof obj.skipPrompt === "boolean" ? obj.skipPrompt : void 0
|
|
1764
|
-
};
|
|
1765
|
-
}
|
|
1766
|
-
async function setupCommandsLazy(cli) {
|
|
1767
|
-
const envLang = process__default.env.CCJK_LANG;
|
|
1768
|
-
if (envLang) {
|
|
1769
|
-
await initI18nLazy(envLang);
|
|
1770
|
-
}
|
|
1771
|
-
for (const cmd of COMMANDS) {
|
|
1772
|
-
const command = cli.command(cmd.name, cmd.description);
|
|
1773
|
-
if (cmd.aliases) {
|
|
1774
|
-
for (const alias of cmd.aliases) {
|
|
1775
|
-
command.alias(alias);
|
|
1776
|
-
}
|
|
1777
|
-
}
|
|
1778
|
-
if (cmd.options) {
|
|
1779
|
-
for (const opt of cmd.options) {
|
|
1780
|
-
command.option(opt.flags, opt.description);
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
if (cmd.name !== "claude") {
|
|
1784
|
-
command.option("--lang, -l <lang>", "Display language (zh-CN, en)");
|
|
1785
|
-
command.option("--all-lang, -g <lang>", "Set all language parameters");
|
|
1786
|
-
command.option("--no-banner", "Skip command discovery banner");
|
|
1787
|
-
} else {
|
|
1788
|
-
command.allowUnknownOptions();
|
|
1789
|
-
}
|
|
1790
|
-
command.action(async (...args) => {
|
|
1791
|
-
const options = args[args.length - 1];
|
|
1792
|
-
if (cmd.name !== "claude") {
|
|
1793
|
-
const langOptions = extractLanguageOptions(options);
|
|
1794
|
-
const lang = await resolveLanguage(langOptions);
|
|
1795
|
-
await initI18nLazy(lang);
|
|
1796
|
-
}
|
|
1797
|
-
if (cmd.tier === "deprecated" && cmd.deprecationMessage) {
|
|
1798
|
-
console.warn(`
|
|
1799
|
-
${cmd.deprecationMessage}
|
|
1800
|
-
`);
|
|
1801
|
-
}
|
|
1802
|
-
const handler = await cmd.loader();
|
|
1803
|
-
await handler(options, ...args.slice(0, -1));
|
|
1804
|
-
});
|
|
1805
|
-
}
|
|
1806
|
-
await registerSpecialCommands(cli);
|
|
1807
|
-
const { version } = await import('./chunks/package.mjs');
|
|
1808
|
-
cli.help((sections) => customizeHelpLazy(sections, version));
|
|
1809
|
-
cli.version(version);
|
|
1810
|
-
}
|
|
1811
|
-
async function registerSpecialCommands(cli) {
|
|
1812
|
-
cli.command("cloud [resource] [action]", "Cloud sync (skills/agents/plugins)").alias("c").option("--dry-run, -d", "Preview changes").option("--force, -f", "Force sync").action(async (resource, action, options) => {
|
|
1813
|
-
const resourceStr = resource || "menu";
|
|
1814
|
-
if (resourceStr === "skills" || resourceStr === "sk") {
|
|
1815
|
-
const { skillsSyncMenu, syncSkills, pushSkillsCommand, pullSkillsCommand } = await import('./chunks/skills-sync.mjs');
|
|
1816
|
-
if (!action)
|
|
1817
|
-
await skillsSyncMenu(options);
|
|
1818
|
-
else if (action === "sync")
|
|
1819
|
-
await syncSkills(options);
|
|
1820
|
-
else if (action === "push")
|
|
1821
|
-
await pushSkillsCommand(options);
|
|
1822
|
-
else if (action === "pull")
|
|
1823
|
-
await pullSkillsCommand(options);
|
|
1824
|
-
} else if (resourceStr === "agents" || resourceStr === "ag") {
|
|
1825
|
-
console.log("\n\u{1F916} Agent Commands:");
|
|
1826
|
-
console.log(" ccjk agents list - List installed agents");
|
|
1827
|
-
console.log(" ccjk agents search - Search agents in cloud");
|
|
1828
|
-
console.log(" ccjk agents install - Install an agent");
|
|
1829
|
-
console.log(" ccjk agents sync - Sync with cloud");
|
|
1830
|
-
console.log(" ccjk agents templates - View templates\n");
|
|
1831
|
-
} else if (resourceStr === "plugins" || resourceStr === "pl") {
|
|
1832
|
-
const { marketplaceMenu } = await import('./chunks/marketplace.mjs');
|
|
1833
|
-
await marketplaceMenu(action, options);
|
|
1834
|
-
} else {
|
|
1835
|
-
console.log("\n\u2601\uFE0F Cloud Sync Commands:");
|
|
1836
|
-
console.log(" ccjk cloud skills [action] - Sync custom skills");
|
|
1837
|
-
console.log(" ccjk cloud agents [action] - Sync AI agents");
|
|
1838
|
-
console.log(" ccjk cloud plugins [action] - Plugin marketplace\n");
|
|
1839
|
-
}
|
|
1840
|
-
});
|
|
1841
|
-
cli.command("skills-sync [action]", '[DEPRECATED] Use "ccjk cloud skills"').action(async () => {
|
|
1842
|
-
console.warn('\n\u26A0\uFE0F skills-sync \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk cloud skills" \u66FF\u4EE3\n');
|
|
1843
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk cloud skills\n");
|
|
1844
|
-
});
|
|
1845
|
-
cli.command("agents-sync [action]", '[DEPRECATED] Use "ccjk agents"').action(async () => {
|
|
1846
|
-
console.warn('\n\u26A0\uFE0F agents-sync \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk agents" \u66FF\u4EE3\n');
|
|
1847
|
-
console.log("\u{1F916} Agent Commands:");
|
|
1848
|
-
console.log(" ccjk agents list - List installed agents");
|
|
1849
|
-
console.log(" ccjk agents search - Search agents in cloud");
|
|
1850
|
-
console.log(" ccjk agents install - Install an agent");
|
|
1851
|
-
console.log(" ccjk agents sync - Sync with cloud\n");
|
|
1852
|
-
});
|
|
1853
|
-
cli.command("marketplace [action]", '[DEPRECATED] Use "ccjk cloud plugins"').action(async () => {
|
|
1854
|
-
console.warn('\n\u26A0\uFE0F marketplace \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk cloud plugins" \u66FF\u4EE3\n');
|
|
1855
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk cloud plugins\n");
|
|
1856
|
-
});
|
|
1857
|
-
cli.command("plugin [action] [...args]", "Plugin marketplace (install/search/list)").option("--verbose, -v", "Show verbose output").option("--force, -f", "Force operation").option("--version, -V <version>", "Specify plugin version").action(async (action, args, _options) => {
|
|
1858
|
-
const { handlePluginCommand } = await import('./chunks/plugin.mjs');
|
|
1859
|
-
const allArgs = [action, ...args || []].filter(Boolean);
|
|
1860
|
-
await handlePluginCommand(allArgs);
|
|
1861
|
-
});
|
|
1862
|
-
cli.command("quick [specFile]", '[DEPRECATED] Use "ccjk interview -d quick"').action(async () => {
|
|
1863
|
-
console.warn('\n\u26A0\uFE0F quick \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk interview -d quick" \u66FF\u4EE3\n');
|
|
1864
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk interview -d quick\n");
|
|
1865
|
-
});
|
|
1866
|
-
cli.command("deep [specFile]", '[DEPRECATED] Use "ccjk interview -d deep"').action(async () => {
|
|
1867
|
-
console.warn('\n\u26A0\uFE0F deep \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk interview -d deep" \u66FF\u4EE3\n');
|
|
1868
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk interview -d deep\n");
|
|
1869
|
-
});
|
|
1870
|
-
cli.command("system [action]", "System management (setup/upgrade/info)").alias("sys").action(async (action) => {
|
|
1871
|
-
const actionStr = action || "info";
|
|
1872
|
-
if (actionStr === "setup" || actionStr === "s") {
|
|
1873
|
-
const { runOnboarding } = await import('./chunks/onboarding.mjs');
|
|
1874
|
-
await runOnboarding();
|
|
1875
|
-
} else if (actionStr === "sync") {
|
|
1876
|
-
const { quickSync } = await import('./chunks/onboarding.mjs');
|
|
1877
|
-
await quickSync();
|
|
1878
|
-
} else if (actionStr === "versions" || actionStr === "ver") {
|
|
1879
|
-
const { checkAllVersions } = await import('./chunks/upgrade-manager.mjs');
|
|
1880
|
-
await checkAllVersions();
|
|
1881
|
-
} else if (actionStr === "upgrade" || actionStr === "up") {
|
|
1882
|
-
const { upgradeAll } = await import('./chunks/upgrade-manager.mjs');
|
|
1883
|
-
await upgradeAll();
|
|
1884
|
-
} else if (actionStr === "permissions" || actionStr === "perm") {
|
|
1885
|
-
const { displayPermissions } = await import('./chunks/permission-manager.mjs');
|
|
1886
|
-
displayPermissions();
|
|
1887
|
-
} else if (actionStr === "config" || actionStr === "cfg") {
|
|
1888
|
-
const { detectAllConfigs, displayConfigScan } = await import('./chunks/config-consolidator.mjs');
|
|
1889
|
-
const configs = detectAllConfigs();
|
|
1890
|
-
displayConfigScan(configs);
|
|
1891
|
-
} else if (actionStr === "workspace" || actionStr === "ws") {
|
|
1892
|
-
const { workspaceDiagnostics } = await import('./chunks/doctor.mjs');
|
|
1893
|
-
await workspaceDiagnostics();
|
|
1894
|
-
} else {
|
|
1895
|
-
console.log("\n\u{1F527} System Commands:");
|
|
1896
|
-
console.log(" ccjk system setup - First-time setup");
|
|
1897
|
-
console.log(" ccjk system sync - Quick knowledge sync");
|
|
1898
|
-
console.log(" ccjk system versions - Check all versions");
|
|
1899
|
-
console.log(" ccjk system upgrade - Upgrade all components");
|
|
1900
|
-
console.log(" ccjk system permissions- Show permissions");
|
|
1901
|
-
console.log(" ccjk system config - Scan config files");
|
|
1902
|
-
console.log(" ccjk system workspace - Workspace diagnostics\n");
|
|
1903
|
-
}
|
|
1904
|
-
});
|
|
1905
|
-
cli.command("setup", '[DEPRECATED] Use "ccjk system setup"').action(async () => {
|
|
1906
|
-
console.warn('\n\u26A0\uFE0F setup \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk system setup" \u66FF\u4EE3\n');
|
|
1907
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk system setup\n");
|
|
1908
|
-
});
|
|
1909
|
-
cli.command("sync", '[DEPRECATED] Use "ccjk system sync"').action(async () => {
|
|
1910
|
-
console.warn('\n\u26A0\uFE0F sync \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk system sync" \u66FF\u4EE3\n');
|
|
1911
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk system sync\n");
|
|
1912
|
-
});
|
|
1913
|
-
cli.command("versions", '[DEPRECATED] Use "ccjk system versions"').action(async () => {
|
|
1914
|
-
console.warn('\n\u26A0\uFE0F versions \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk system versions" \u66FF\u4EE3\n');
|
|
1915
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk system versions\n");
|
|
1916
|
-
});
|
|
1917
|
-
cli.command("upgrade", '[DEPRECATED] Use "ccjk system upgrade"').action(async () => {
|
|
1918
|
-
console.warn('\n\u26A0\uFE0F upgrade \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk system upgrade" \u66FF\u4EE3\n');
|
|
1919
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk system upgrade\n");
|
|
1920
|
-
});
|
|
1921
|
-
cli.command("permissions", '[DEPRECATED] Use "ccjk system permissions"').action(async () => {
|
|
1922
|
-
console.warn('\n\u26A0\uFE0F permissions \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk system permissions" \u66FF\u4EE3\n');
|
|
1923
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk system permissions\n");
|
|
1924
|
-
});
|
|
1925
|
-
cli.command("config-scan", '[DEPRECATED] Use "ccjk system config"').action(async () => {
|
|
1926
|
-
console.warn('\n\u26A0\uFE0F config-scan \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk system config" \u66FF\u4EE3\n');
|
|
1927
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk system config\n");
|
|
1928
|
-
});
|
|
1929
|
-
cli.command("workspace [dir]", '[DEPRECATED] Use "ccjk system workspace"').action(async () => {
|
|
1930
|
-
console.warn('\n\u26A0\uFE0F workspace \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 "ccjk system workspace" \u66FF\u4EE3\n');
|
|
1931
|
-
console.log("\u{1F4A1} \u65B0\u547D\u4EE4\uFF1Accjk system workspace\n");
|
|
1932
|
-
});
|
|
1933
|
-
cli.command("completion <action> [shell]", "Shell completion management").option("--lang, -l <lang>", "Display language").action(async (action, shell, options) => {
|
|
1934
|
-
const { completionCommand } = await import('./chunks/completion.mjs');
|
|
1935
|
-
await completionCommand(action, shell, options);
|
|
1936
|
-
});
|
|
1937
|
-
}
|
|
1938
|
-
function customizeHelpLazy(_sections, version) {
|
|
1939
|
-
const cyan = (s) => `\x1B[36m${s}\x1B[0m`;
|
|
1940
|
-
const yellow = (s) => `\x1B[33m${s}\x1B[0m`;
|
|
1941
|
-
const gray = (s) => `\x1B[90m${s}\x1B[0m`;
|
|
1942
|
-
const green = (s) => `\x1B[32m${s}\x1B[0m`;
|
|
1943
|
-
const bold = (s) => `\x1B[1m${s}\x1B[0m`;
|
|
1944
|
-
const cyanBold = (s) => bold(cyan(s));
|
|
1945
|
-
const newSections = [];
|
|
1946
|
-
newSections.push({
|
|
1947
|
-
title: "",
|
|
1948
|
-
body: cyanBold(`CCJK - Claude Code Jailbreak Kit v${version}
|
|
1949
|
-
`) + gray("Lightweight CLI for Claude Code enhancement")
|
|
1950
|
-
});
|
|
1951
|
-
newSections.push({
|
|
1952
|
-
title: yellow("\u{1F4E6} Core Commands"),
|
|
1953
|
-
body: [
|
|
1954
|
-
` ${cyan("ccjk")} Interactive menu ${green("(default)")}`,
|
|
1955
|
-
` ${cyan("ccjk quick-setup")} ${gray("qs")} One-click configuration ${green("NEW")}`,
|
|
1956
|
-
` ${cyan("ccjk status")} ${gray("st")} Brain Dashboard - health score ${green("NEW")}`,
|
|
1957
|
-
` ${cyan("ccjk boost")} One-click optimization ${green("NEW")}`,
|
|
1958
|
-
` ${cyan("ccjk init")} ${gray("i")} Initialize configuration`,
|
|
1959
|
-
` ${cyan("ccjk update")} ${gray("u")} Update prompts & workflows`,
|
|
1960
|
-
` ${cyan("ccjk doctor")} Health check & diagnostics`,
|
|
1961
|
-
` ${cyan("ccjk help")} ${gray("h")} Help center & quick reference ${green("NEW")}`
|
|
1962
|
-
].join("\n")
|
|
1963
|
-
});
|
|
1964
|
-
newSections.push({
|
|
1965
|
-
title: yellow("\u{1F6E0}\uFE0F Development"),
|
|
1966
|
-
body: [
|
|
1967
|
-
` ${cyan("ccjk mcp")} <action> MCP server management`,
|
|
1968
|
-
` ${cyan("ccjk browser")} ${gray("ab")} Agent Browser automation ${green("NEW")}`,
|
|
1969
|
-
` ${cyan("ccjk skills")} ${gray("sk")} Manage CCJK skills ${green("NEW")}`,
|
|
1970
|
-
` ${cyan("ccjk monitor")} ${gray("mon")} Performance monitoring ${green("NEW")}`,
|
|
1971
|
-
` ${cyan("ccjk interview")} ${gray("iv")} Interview-driven development`,
|
|
1972
|
-
` ${cyan("ccjk commit")} Smart git commit`,
|
|
1973
|
-
` ${cyan("ccjk config-switch")} ${gray("cs")} Switch configuration`,
|
|
1974
|
-
` ${cyan("ccjk postmortem")} ${gray("pm")} Postmortem intelligence`
|
|
1975
|
-
].join("\n")
|
|
1976
|
-
});
|
|
1977
|
-
newSections.push({
|
|
1978
|
-
title: yellow("\u2601\uFE0F Unified Commands") + green(" NEW"),
|
|
1979
|
-
body: [
|
|
1980
|
-
` ${cyan("ccjk cloud")} <resource> Cloud sync (skills/agents/plugins)`,
|
|
1981
|
-
` ${cyan("ccjk system")} <action> System management (setup/upgrade)`,
|
|
1982
|
-
"",
|
|
1983
|
-
gray(" Examples:"),
|
|
1984
|
-
gray(" ccjk cloud skills sync - Sync custom skills"),
|
|
1985
|
-
gray(" ccjk system upgrade - Upgrade all components")
|
|
1986
|
-
].join("\n")
|
|
1987
|
-
});
|
|
1988
|
-
newSections.push({
|
|
1989
|
-
title: yellow("\u{1F4CB} Other"),
|
|
1990
|
-
body: [
|
|
1991
|
-
` ${cyan("ccjk workflows")} ${gray("wf")} Manage workflows`,
|
|
1992
|
-
` ${cyan("ccjk ccr")} CCR proxy management`,
|
|
1993
|
-
` ${cyan("ccjk ccu")} Usage statistics`,
|
|
1994
|
-
` ${cyan("ccjk completion")} Shell completion ${green("NEW")}`,
|
|
1995
|
-
` ${cyan("ccjk uninstall")} Remove configurations`
|
|
1996
|
-
].join("\n")
|
|
1997
|
-
});
|
|
1998
|
-
newSections.push({
|
|
1999
|
-
title: yellow("\u2699\uFE0F Options"),
|
|
2000
|
-
body: [
|
|
2001
|
-
` ${green("--lang, -l")} <lang> Display language (zh-CN, en)`,
|
|
2002
|
-
` ${green("--force, -f")} Force overwrite`,
|
|
2003
|
-
` ${green("--help, -h")} Show help`,
|
|
2004
|
-
` ${green("--version, -v")} Show version`
|
|
2005
|
-
].join("\n")
|
|
2006
|
-
});
|
|
2007
|
-
newSections.push({
|
|
2008
|
-
title: "",
|
|
2009
|
-
body: [
|
|
2010
|
-
gray("\u2500".repeat(50)),
|
|
2011
|
-
gray('Run "ccjk <command> --help" for detailed usage'),
|
|
2012
|
-
gray('Run "ccjk" for interactive menu')
|
|
2013
|
-
].join("\n")
|
|
2014
|
-
});
|
|
2015
|
-
return newSections;
|
|
2016
|
-
}
|
|
2017
|
-
async function runHealthAlertsCheck() {
|
|
2018
|
-
try {
|
|
2019
|
-
const args = process__default.argv.slice(2);
|
|
2020
|
-
if (args.includes("--silent")) {
|
|
2021
|
-
return;
|
|
2022
|
-
}
|
|
2023
|
-
const shouldCheck = args.length === 0 || args[0] === "status" || args[0] === "doctor";
|
|
2024
|
-
if (!shouldCheck) {
|
|
2025
|
-
return;
|
|
2026
|
-
}
|
|
2027
|
-
const { join } = await import('./chunks/index8.mjs');
|
|
2028
|
-
const dbPath = join(
|
|
2029
|
-
process__default.env.HOME || process__default.env.USERPROFILE || ".",
|
|
2030
|
-
".ccjk",
|
|
2031
|
-
"context",
|
|
2032
|
-
"contexts.db"
|
|
2033
|
-
);
|
|
2034
|
-
const { runStartupHealthCheck } = await import('./chunks/health-alerts.mjs');
|
|
2035
|
-
await runStartupHealthCheck(dbPath, { silent: false });
|
|
2036
|
-
} catch {
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
async function showCommandDiscoveryBanner() {
|
|
2040
|
-
try {
|
|
2041
|
-
const args = process__default.argv.slice(2);
|
|
2042
|
-
if (args.includes("--no-banner")) {
|
|
2043
|
-
return;
|
|
2044
|
-
}
|
|
2045
|
-
if (args.length > 0 && !args[0].startsWith("-")) {
|
|
2046
|
-
return;
|
|
2047
|
-
}
|
|
2048
|
-
const { join } = await import('./chunks/index8.mjs');
|
|
2049
|
-
const { existsSync, writeFileSync } = await import('node:fs');
|
|
2050
|
-
const markerPath = join(
|
|
2051
|
-
process__default.env.HOME || process__default.env.USERPROFILE || ".",
|
|
2052
|
-
".ccjk",
|
|
2053
|
-
".banner-shown"
|
|
2054
|
-
);
|
|
2055
|
-
const isFirstRun = !existsSync(markerPath);
|
|
2056
|
-
const showHelp = args.includes("--help") || args.includes("-h");
|
|
2057
|
-
if (isFirstRun || showHelp) {
|
|
2058
|
-
const envLang = process__default.env.CCJK_LANG;
|
|
2059
|
-
if (envLang) {
|
|
2060
|
-
await initI18nLazy(envLang);
|
|
2061
|
-
}
|
|
2062
|
-
const { displayCommandDiscovery } = await import('./chunks/banner.mjs');
|
|
2063
|
-
displayCommandDiscovery();
|
|
2064
|
-
if (isFirstRun) {
|
|
2065
|
-
try {
|
|
2066
|
-
const { ensureDir } = await import('./chunks/fs-operations.mjs');
|
|
2067
|
-
await ensureDir(join(process__default.env.HOME || process__default.env.USERPROFILE || ".", ".ccjk"));
|
|
2068
|
-
writeFileSync(markerPath, (/* @__PURE__ */ new Date()).toISOString());
|
|
2069
|
-
} catch {
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
} catch {
|
|
2074
|
-
}
|
|
2075
|
-
}
|
|
2076
|
-
async function runLazyCli() {
|
|
2077
|
-
const spinner = await showStartupSpinner();
|
|
2078
|
-
try {
|
|
2079
|
-
try {
|
|
2080
|
-
const { runMigration } = await import('./chunks/migrator.mjs');
|
|
2081
|
-
runMigration();
|
|
2082
|
-
} catch {
|
|
2083
|
-
}
|
|
2084
|
-
bootstrapCloudServices();
|
|
2085
|
-
try {
|
|
2086
|
-
const { autoInitBrainHooks } = await import('./chunks/auto-init.mjs');
|
|
2087
|
-
await autoInitBrainHooks();
|
|
2088
|
-
} catch {
|
|
2089
|
-
}
|
|
2090
|
-
const handled = await tryQuickProviderLaunch();
|
|
2091
|
-
if (handled) {
|
|
2092
|
-
spinner?.stop();
|
|
2093
|
-
return;
|
|
2094
|
-
}
|
|
2095
|
-
const args = process__default.argv.slice(2);
|
|
2096
|
-
if (args.length > 0 && args[0].startsWith("/")) {
|
|
2097
|
-
spinner?.stop();
|
|
2098
|
-
const { executeSlashCommand } = await import('./chunks/slash-commands.mjs');
|
|
2099
|
-
const slashHandled = await executeSlashCommand(args.join(" "));
|
|
2100
|
-
if (slashHandled) {
|
|
2101
|
-
return;
|
|
2102
|
-
}
|
|
2103
|
-
}
|
|
2104
|
-
const cac = (await import('./chunks/index9.mjs')).default;
|
|
2105
|
-
const cli = cac("ccjk");
|
|
2106
|
-
await setupCommandsLazy(cli);
|
|
2107
|
-
spinner?.stop();
|
|
2108
|
-
await runHealthAlertsCheck();
|
|
2109
|
-
await showCommandDiscoveryBanner();
|
|
2110
|
-
cli.parse();
|
|
2111
|
-
} catch (error) {
|
|
2112
|
-
spinner?.stop();
|
|
2113
|
-
throw error;
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
async function showStartupSpinner() {
|
|
2117
|
-
const args = process__default.argv.slice(2);
|
|
2118
|
-
const quickFlags = ["--help", "-h", "--version", "-v", "-V"];
|
|
2119
|
-
if (args.some((arg) => quickFlags.includes(arg))) {
|
|
2120
|
-
return null;
|
|
2121
|
-
}
|
|
2122
|
-
try {
|
|
2123
|
-
const ora = (await import('./chunks/index7.mjs')).default;
|
|
2124
|
-
const isZh = process__default.env.CCJK_LANG === "zh-CN" || process__default.env.LANG?.includes("zh");
|
|
2125
|
-
const spinner = ora({
|
|
2126
|
-
text: isZh ? "\u6B63\u5728\u542F\u52A8 CCJK..." : "Starting CCJK...",
|
|
2127
|
-
spinner: "dots"
|
|
2128
|
-
}).start();
|
|
2129
|
-
return {
|
|
2130
|
-
stop: () => {
|
|
2131
|
-
spinner.stop();
|
|
2132
|
-
spinner.clear();
|
|
2133
|
-
}
|
|
2134
|
-
};
|
|
2135
|
-
} catch {
|
|
2136
|
-
const isZh = process__default.env.CCJK_LANG === "zh-CN" || process__default.env.LANG?.includes("zh");
|
|
2137
|
-
process__default.stdout.write(isZh ? "\u6B63\u5728\u542F\u52A8 CCJK...\r" : "Starting CCJK...\r");
|
|
2138
|
-
return {
|
|
2139
|
-
stop: () => {
|
|
2140
|
-
process__default.stdout.write("\x1B[2K\r");
|
|
2141
|
-
}
|
|
2142
|
-
};
|
|
2143
|
-
}
|
|
2144
|
-
}
|
|
2145
|
-
async function tryQuickProviderLaunch() {
|
|
2146
|
-
const args = process__default.argv.slice(2);
|
|
2147
|
-
if (args.length === 0 || args[0].startsWith("-")) {
|
|
2148
|
-
return false;
|
|
2149
|
-
}
|
|
2150
|
-
const firstArg = args[0].toLowerCase();
|
|
2151
|
-
const { couldBeShortcode, isKnownCommand } = await import('./chunks/quick-provider.mjs');
|
|
2152
|
-
if (isKnownCommand(firstArg)) {
|
|
2153
|
-
return false;
|
|
2154
|
-
}
|
|
2155
|
-
if (!couldBeShortcode(firstArg)) {
|
|
2156
|
-
return false;
|
|
2157
|
-
}
|
|
2158
|
-
const { quickProviderLaunch } = await import('./chunks/quick-provider.mjs');
|
|
2159
|
-
try {
|
|
2160
|
-
const handled = await quickProviderLaunch(firstArg, {
|
|
2161
|
-
lang: process__default.env.CCJK_LANG
|
|
2162
|
-
});
|
|
2163
|
-
if (handled) {
|
|
2164
|
-
return true;
|
|
2165
|
-
}
|
|
2166
|
-
return false;
|
|
2167
|
-
} catch {
|
|
2168
|
-
return false;
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
function bootstrapCloudServices() {
|
|
2172
|
-
const args = process__default.argv.slice(2);
|
|
2173
|
-
const isInteractiveMenu = args.length === 0 || args.length === 1 && ["-l", "--lang"].includes(args[0]);
|
|
2174
|
-
if (isInteractiveMenu) {
|
|
2175
|
-
return;
|
|
2176
|
-
}
|
|
2177
|
-
setImmediate(async () => {
|
|
2178
|
-
try {
|
|
2179
|
-
const { initializeContextFeatures } = await import('./chunks/startup.mjs');
|
|
2180
|
-
await initializeContextFeatures();
|
|
2181
|
-
const { autoBootstrap } = await import('./chunks/auto-bootstrap.mjs');
|
|
2182
|
-
await autoBootstrap();
|
|
2183
|
-
const { autoUpgrade } = await import('./chunks/silent-updater.mjs');
|
|
2184
|
-
await autoUpgrade();
|
|
2185
|
-
const { activateSuperpowers } = await import('./chunks/index12.mjs');
|
|
2186
|
-
await activateSuperpowers("zh-CN");
|
|
2187
|
-
const { setupBrainHook } = await import('./chunks/cli-hook.mjs');
|
|
2188
|
-
await setupBrainHook({
|
|
2189
|
-
enabled: true,
|
|
2190
|
-
silent: true,
|
|
2191
|
-
// 静默模式,不打扰用户
|
|
2192
|
-
fallbackToClaudeCode: true
|
|
2193
|
-
});
|
|
2194
|
-
} catch {
|
|
2195
|
-
}
|
|
2196
|
-
});
|
|
2197
|
-
}
|
|
2198
|
-
|
|
2199
|
-
runLazyCli().catch(console.error);
|