ccjk 9.5.6 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/agent.mjs +1 -1
- package/dist/chunks/api-providers.mjs +1 -1
- package/dist/chunks/api.mjs +3 -3
- package/dist/chunks/auto-bootstrap.mjs +1 -1
- package/dist/chunks/auto-updater.mjs +1 -1
- package/dist/chunks/boost.mjs +160 -0
- package/dist/chunks/ccjk-agents.mjs +1 -1
- package/dist/chunks/ccjk-all.mjs +1 -1
- package/dist/chunks/ccjk-config.mjs +1 -1
- package/dist/chunks/ccjk-hooks.mjs +1 -1
- package/dist/chunks/ccjk-mcp.mjs +2 -2
- package/dist/chunks/ccjk-setup.mjs +1 -1
- package/dist/chunks/ccjk-skills.mjs +1 -1
- package/dist/chunks/ccr.mjs +25 -30
- package/dist/chunks/ccu.mjs +1 -1
- package/dist/chunks/check-updates.mjs +3 -4
- package/dist/chunks/claude-code-config-manager.mjs +7 -7
- package/dist/chunks/claude-code-incremental-manager.mjs +2 -2
- package/dist/chunks/claude-config.mjs +4 -4
- package/dist/chunks/claude-wrapper.mjs +2 -2
- package/dist/chunks/codex-config-switch.mjs +4 -5
- package/dist/chunks/codex-provider-manager.mjs +2 -3
- package/dist/chunks/codex-uninstaller.mjs +2 -2
- package/dist/chunks/codex.mjs +207 -6
- package/dist/chunks/commands.mjs +391 -88
- package/dist/chunks/commands2.mjs +88 -391
- package/dist/chunks/completion.mjs +1 -1
- package/dist/chunks/config-consolidator.mjs +2 -2
- package/dist/chunks/config-switch.mjs +3 -4
- package/dist/chunks/config.mjs +78 -7
- package/dist/chunks/config2.mjs +400 -410
- package/dist/chunks/config3.mjs +410 -400
- package/dist/chunks/constants.mjs +1 -1
- package/dist/chunks/doctor.mjs +4 -4
- package/dist/chunks/features.mjs +24 -17
- package/dist/chunks/index.mjs +178 -7
- package/dist/chunks/index2.mjs +1162 -169
- package/dist/chunks/index3.mjs +910 -1076
- package/dist/chunks/index4.mjs +137 -947
- package/dist/chunks/index5.mjs +635 -167
- package/dist/chunks/init.mjs +141 -99
- package/dist/chunks/installer.mjs +147 -649
- package/dist/chunks/installer2.mjs +649 -147
- package/dist/chunks/interview.mjs +2 -2
- package/dist/chunks/marketplace.mjs +1 -1
- package/dist/chunks/mcp.mjs +1058 -17
- package/dist/chunks/menu.mjs +147 -56
- package/dist/chunks/monitor.mjs +2 -2
- package/dist/chunks/notification.mjs +1 -1
- package/dist/chunks/onboarding.mjs +2 -2
- package/dist/chunks/package.mjs +2 -210
- package/dist/chunks/permission-manager.mjs +2 -2
- package/dist/chunks/permissions.mjs +1 -1
- package/dist/chunks/platform.mjs +1 -1
- package/dist/chunks/plugin.mjs +1 -1
- package/dist/chunks/prompts.mjs +1 -1
- package/dist/chunks/providers.mjs +1 -1
- package/dist/chunks/quick-setup.mjs +16 -20
- package/dist/chunks/silent-updater.mjs +1 -1
- package/dist/chunks/simple-config.mjs +2 -2
- package/dist/chunks/skill.mjs +1 -1
- package/dist/chunks/skills-sync.mjs +1 -1
- package/dist/chunks/skills.mjs +1 -1
- package/dist/chunks/startup.mjs +1 -1
- package/dist/chunks/stats.mjs +1 -1
- package/dist/chunks/status.mjs +159 -0
- package/dist/chunks/team.mjs +1 -1
- package/dist/chunks/thinking.mjs +2 -2
- package/dist/chunks/uninstall.mjs +6 -6
- package/dist/chunks/update.mjs +6 -9
- package/dist/chunks/upgrade-manager.mjs +2 -2
- package/dist/chunks/version-checker.mjs +3 -3
- package/dist/chunks/vim.mjs +1 -1
- package/dist/chunks/workflows.mjs +616 -215
- package/dist/cli.mjs +70 -121
- package/dist/index.d.mts +17 -1482
- package/dist/index.d.ts +17 -1482
- package/dist/index.mjs +950 -4740
- package/dist/shared/{ccjk.zCqdxT2Y.mjs → ccjk.Br91zBIG.mjs} +2 -2
- package/dist/shared/ccjk.CSkyCZIM.mjs +638 -0
- package/dist/shared/{ccjk.BKoi8-Hy.mjs → ccjk.DE91nClQ.mjs} +1 -1
- package/dist/shared/{ccjk.f40us0yY.mjs → ccjk.DvIrK0wz.mjs} +2 -2
- package/dist/shared/ccjk.LsPZ2PYo.mjs +1048 -0
- package/dist/shared/{ccjk.DRweXU5F.mjs → ccjk.q1koQxEE.mjs} +2 -2
- package/package.json +1 -1
- package/templates/claude-code/common/settings.json +15 -111
- package/dist/chunks/api-adapter.mjs +0 -180
- package/dist/chunks/cli.mjs +0 -2227
- package/dist/chunks/context-menu.mjs +0 -913
- package/dist/chunks/hooks-sync.mjs +0 -1627
- package/dist/chunks/index6.mjs +0 -663
- package/dist/chunks/mcp-market.mjs +0 -1077
- package/dist/chunks/mcp-server.mjs +0 -776
- package/dist/chunks/project-detector.mjs +0 -131
- package/dist/chunks/provider-registry.mjs +0 -92
- package/dist/chunks/setup-wizard.mjs +0 -362
- package/dist/chunks/tools.mjs +0 -143
- package/dist/chunks/workflows2.mjs +0 -633
- package/dist/shared/ccjk.BM_HZogn.mjs +0 -347
- package/dist/shared/ccjk.BaEp4UHQ.mjs +0 -75
- package/dist/shared/ccjk.CS0ybJCf.mjs +0 -490
- package/dist/shared/ccjk.CZgIwikC.mjs +0 -209
- package/dist/shared/ccjk.tO8zeFh1.mjs +0 -397
package/dist/chunks/tools.mjs
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import ansis from 'ansis';
|
|
2
|
-
import inquirer from 'inquirer';
|
|
3
|
-
import { existsSync } from 'node:fs';
|
|
4
|
-
import { homedir } from 'node:os';
|
|
5
|
-
import { join } from 'pathe';
|
|
6
|
-
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
7
|
-
import { runCcrStop, runCcrStart, runCcrRestart, runCcrStatus, runCcrUi } from './commands.mjs';
|
|
8
|
-
import { readCcrConfig, configureCcrFeature } from './config2.mjs';
|
|
9
|
-
import { i as isCcrInstalled, a as installCcr } from '../shared/ccjk.BaEp4UHQ.mjs';
|
|
10
|
-
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.f40us0yY.mjs';
|
|
11
|
-
import { p as promptBoolean } from '../shared/ccjk.DHbrGcgg.mjs';
|
|
12
|
-
|
|
13
|
-
function isCcrConfigured() {
|
|
14
|
-
const CCR_CONFIG_FILE = join(homedir(), ".claude-code-router", "config.json");
|
|
15
|
-
if (!existsSync(CCR_CONFIG_FILE)) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
const config = readCcrConfig();
|
|
19
|
-
return config !== null;
|
|
20
|
-
}
|
|
21
|
-
async function showCcrMenu() {
|
|
22
|
-
try {
|
|
23
|
-
ensureI18nInitialized();
|
|
24
|
-
console.log(`
|
|
25
|
-
${ansis.green("\u2550".repeat(50))}`);
|
|
26
|
-
console.log(ansis.bold.cyan(` ${i18n.t("ccr:ccrMenuTitle")}`));
|
|
27
|
-
console.log(`${ansis.green("\u2550".repeat(50))}
|
|
28
|
-
`);
|
|
29
|
-
console.log(` ${ansis.green("1.")} ${i18n.t("ccr:ccrMenuOptions.initCcr")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.initCcr")}`)}`);
|
|
30
|
-
console.log(` ${ansis.green("2.")} ${i18n.t("ccr:ccrMenuOptions.startUi")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.startUi")}`)}`);
|
|
31
|
-
console.log(` ${ansis.green("3.")} ${i18n.t("ccr:ccrMenuOptions.checkStatus")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.checkStatus")}`)}`);
|
|
32
|
-
console.log(` ${ansis.green("4.")} ${i18n.t("ccr:ccrMenuOptions.restart")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.restart")}`)}`);
|
|
33
|
-
console.log(` ${ansis.green("5.")} ${i18n.t("ccr:ccrMenuOptions.start")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.start")}`)}`);
|
|
34
|
-
console.log(` ${ansis.green("6.")} ${i18n.t("ccr:ccrMenuOptions.stop")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.stop")}`)}`);
|
|
35
|
-
console.log(` ${ansis.yellow("0.")} ${i18n.t("ccr:ccrMenuOptions.back")}`);
|
|
36
|
-
console.log("");
|
|
37
|
-
const { choice } = await inquirer.prompt({
|
|
38
|
-
type: "input",
|
|
39
|
-
name: "choice",
|
|
40
|
-
message: i18n.t("common:enterChoice"),
|
|
41
|
-
validate: (value) => {
|
|
42
|
-
const valid = ["1", "2", "3", "4", "5", "6", "0"];
|
|
43
|
-
return valid.includes(value) || i18n.t("common:invalidChoice");
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
switch (choice) {
|
|
47
|
-
case "1": {
|
|
48
|
-
const ccrStatus = await isCcrInstalled();
|
|
49
|
-
if (!ccrStatus.hasCorrectPackage) {
|
|
50
|
-
await installCcr();
|
|
51
|
-
} else {
|
|
52
|
-
console.log(ansis.green(`\u2714 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
|
|
53
|
-
}
|
|
54
|
-
await configureCcrFeature();
|
|
55
|
-
console.log(ansis.green(`
|
|
56
|
-
\u2714 ${i18n.t("ccr:ccrSetupComplete")}`));
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
case "2":
|
|
60
|
-
if (!isCcrConfigured()) {
|
|
61
|
-
console.log(ansis.yellow(`
|
|
62
|
-
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
63
|
-
console.log(ansis.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
64
|
-
`));
|
|
65
|
-
} else {
|
|
66
|
-
const config = readCcrConfig();
|
|
67
|
-
await runCcrUi(config?.APIKEY);
|
|
68
|
-
}
|
|
69
|
-
break;
|
|
70
|
-
case "3":
|
|
71
|
-
if (!isCcrConfigured()) {
|
|
72
|
-
console.log(ansis.yellow(`
|
|
73
|
-
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
74
|
-
console.log(ansis.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
75
|
-
`));
|
|
76
|
-
} else {
|
|
77
|
-
await runCcrStatus();
|
|
78
|
-
}
|
|
79
|
-
break;
|
|
80
|
-
case "4":
|
|
81
|
-
if (!isCcrConfigured()) {
|
|
82
|
-
console.log(ansis.yellow(`
|
|
83
|
-
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
84
|
-
console.log(ansis.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
85
|
-
`));
|
|
86
|
-
} else {
|
|
87
|
-
await runCcrRestart();
|
|
88
|
-
}
|
|
89
|
-
break;
|
|
90
|
-
case "5":
|
|
91
|
-
if (!isCcrConfigured()) {
|
|
92
|
-
console.log(ansis.yellow(`
|
|
93
|
-
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
94
|
-
console.log(ansis.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
95
|
-
`));
|
|
96
|
-
} else {
|
|
97
|
-
await runCcrStart();
|
|
98
|
-
}
|
|
99
|
-
break;
|
|
100
|
-
case "6":
|
|
101
|
-
if (!isCcrConfigured()) {
|
|
102
|
-
console.log(ansis.yellow(`
|
|
103
|
-
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
104
|
-
console.log(ansis.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
105
|
-
`));
|
|
106
|
-
} else {
|
|
107
|
-
await runCcrStop();
|
|
108
|
-
}
|
|
109
|
-
break;
|
|
110
|
-
case "0":
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
if (choice !== "0") {
|
|
114
|
-
console.log(`
|
|
115
|
-
${ansis.dim("\u2500".repeat(50))}
|
|
116
|
-
`);
|
|
117
|
-
const continueInCcr = await promptBoolean({
|
|
118
|
-
message: i18n.t("common:returnToMenu"),
|
|
119
|
-
defaultValue: true
|
|
120
|
-
});
|
|
121
|
-
if (continueInCcr) {
|
|
122
|
-
return await showCcrMenu();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return false;
|
|
126
|
-
} catch (error) {
|
|
127
|
-
if (!handleExitPromptError(error)) {
|
|
128
|
-
handleGeneralError(error);
|
|
129
|
-
}
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
async function runCcrMenuFeature() {
|
|
135
|
-
await showCcrMenu();
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
const tools = {
|
|
139
|
-
__proto__: null,
|
|
140
|
-
runCcrMenuFeature: runCcrMenuFeature
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export { runCcrMenuFeature as r, showCcrMenu as s, tools as t };
|