ccjk 12.0.0 → 12.0.2
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-teams.mjs +17 -18
- package/dist/chunks/agent.mjs +105 -102
- package/dist/chunks/agents.mjs +87 -77
- package/dist/chunks/api-cli.mjs +41 -27
- package/dist/chunks/api-providers.mjs +2 -4
- package/dist/chunks/api.mjs +22 -11
- package/dist/chunks/auto-bootstrap.mjs +3 -5
- package/dist/chunks/auto-init.mjs +3 -4
- package/dist/chunks/auto-updater.mjs +103 -91
- package/dist/chunks/banner.mjs +41 -42
- package/dist/chunks/boost.mjs +30 -31
- package/dist/chunks/ccjk-agents.mjs +6 -9
- package/dist/chunks/ccjk-all.mjs +703 -85
- package/dist/chunks/ccjk-config.mjs +6 -6
- package/dist/chunks/ccjk-hooks.mjs +20 -9
- package/dist/chunks/ccjk-mcp.mjs +64 -52
- package/dist/chunks/ccjk-setup.mjs +35 -25
- package/dist/chunks/ccjk-skills.mjs +51 -41
- package/dist/chunks/ccr.mjs +42 -32
- package/dist/chunks/ccu.mjs +16 -12
- package/dist/chunks/check-updates.mjs +30 -19
- package/dist/chunks/claude-code-config-manager.mjs +25 -10
- package/dist/chunks/claude-code-incremental-manager.mjs +65 -51
- package/dist/chunks/claude-config.mjs +2 -2
- package/dist/chunks/claude-wrapper.mjs +9 -6
- package/dist/chunks/cleanup-migration.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +10 -3
- package/dist/chunks/cloud-sync.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +58 -45
- package/dist/chunks/codex-provider-manager.mjs +29 -16
- package/dist/chunks/codex-uninstaller.mjs +5 -6
- package/dist/chunks/codex.mjs +89 -89
- package/dist/chunks/commands.mjs +28 -29
- package/dist/chunks/commands2.mjs +4 -3
- package/dist/chunks/commit.mjs +42 -23
- package/dist/chunks/completion.mjs +46 -47
- package/dist/chunks/config-consolidator.mjs +12 -13
- package/dist/chunks/config-switch.mjs +66 -53
- package/dist/chunks/config.mjs +10 -10
- package/dist/chunks/config2.mjs +53 -42
- package/dist/chunks/config3.mjs +107 -93
- package/dist/chunks/constants.mjs +2 -4
- package/dist/chunks/context-loader.mjs +5 -4
- package/dist/chunks/context.mjs +77 -76
- package/dist/chunks/convoy-manager.mjs +4 -4
- package/dist/chunks/dashboard.mjs +28 -29
- package/dist/chunks/doctor.mjs +68 -54
- package/dist/chunks/evolution.mjs +37 -38
- package/dist/chunks/features.mjs +103 -92
- package/dist/chunks/fs-operations.mjs +1 -1
- package/dist/chunks/health-alerts.mjs +1 -1
- package/dist/chunks/health-check.mjs +1 -1
- package/dist/chunks/help.mjs +117 -116
- package/dist/chunks/hook-installer.mjs +3 -2
- package/dist/chunks/index.mjs +20 -6
- package/dist/chunks/index10.mjs +1171 -0
- package/dist/chunks/index11.mjs +1008 -0
- package/dist/chunks/index12.mjs +193 -0
- package/dist/chunks/index13.mjs +218 -0
- package/dist/chunks/index14.mjs +663 -0
- package/dist/chunks/index2.mjs +19 -10
- package/dist/chunks/index3.mjs +19079 -164
- package/dist/chunks/index4.mjs +8 -1171
- package/dist/chunks/index5.mjs +7479 -884
- package/dist/chunks/index6.mjs +160 -184
- package/dist/chunks/index7.mjs +3573 -653
- package/dist/chunks/index8.mjs +19 -0
- package/dist/chunks/index9.mjs +616 -0
- package/dist/chunks/init.mjs +173 -173
- package/dist/chunks/installer.mjs +92 -82
- package/dist/chunks/installer2.mjs +3 -2
- package/dist/chunks/interview.mjs +118 -107
- package/dist/chunks/json-config.mjs +3 -2
- package/dist/chunks/linux.mjs +3863 -0
- package/dist/chunks/macos.mjs +69 -0
- package/dist/chunks/main.mjs +635 -0
- package/dist/chunks/marketplace.mjs +69 -66
- package/dist/chunks/mcp-cli.mjs +61 -48
- package/dist/chunks/mcp.mjs +140 -127
- package/dist/chunks/menu.mjs +85 -85
- package/dist/chunks/metrics-display.mjs +41 -40
- package/dist/chunks/migrator.mjs +4 -5
- package/dist/chunks/monitor.mjs +95 -95
- package/dist/chunks/notification.mjs +151 -141
- package/dist/chunks/onboarding.mjs +26 -15
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/paradigm.mjs +24 -23
- package/dist/chunks/permission-manager.mjs +10 -11
- package/dist/chunks/permissions.mjs +72 -57
- package/dist/chunks/persistence-manager.mjs +97 -84
- package/dist/chunks/persistence.mjs +1 -1
- package/dist/chunks/platform.mjs +29 -29
- package/dist/chunks/plugin.mjs +104 -105
- package/dist/chunks/prompts.mjs +36 -25
- package/dist/chunks/providers.mjs +68 -69
- package/dist/chunks/quick-actions.mjs +71 -72
- package/dist/chunks/quick-provider.mjs +56 -40
- package/dist/chunks/quick-setup.mjs +71 -60
- package/dist/chunks/remote.mjs +21 -12
- package/dist/chunks/session.mjs +116 -103
- package/dist/chunks/sessions.mjs +29 -28
- package/dist/chunks/silent-updater.mjs +8 -10
- package/dist/chunks/simple-config.mjs +13 -10
- package/dist/chunks/skill.mjs +8560 -103
- package/dist/chunks/skills-sync.mjs +5212 -79
- package/dist/chunks/skills.mjs +105 -94
- package/dist/chunks/slash-commands.mjs +36 -37
- package/dist/chunks/smart-defaults.mjs +7 -3
- package/dist/chunks/smart-guide.mjs +1 -1
- package/dist/chunks/startup.mjs +2 -4
- package/dist/chunks/stats.mjs +41 -42
- package/dist/chunks/status.mjs +49 -50
- package/dist/chunks/team.mjs +24 -12
- package/dist/chunks/thinking.mjs +74 -63
- package/dist/chunks/trace.mjs +20 -19
- package/dist/chunks/uninstall.mjs +69 -56
- package/dist/chunks/update.mjs +39 -28
- package/dist/chunks/upgrade-manager.mjs +24 -18
- package/dist/chunks/version-checker.mjs +45 -41
- package/dist/chunks/vim.mjs +81 -69
- package/dist/chunks/windows.mjs +14 -0
- package/dist/chunks/workflows.mjs +15 -15
- package/dist/chunks/wsl.mjs +129 -0
- package/dist/chunks/zero-config.mjs +45 -34
- package/dist/cli.mjs +20 -20
- package/dist/index.mjs +41 -31
- package/dist/shared/ccjk.BAGoDD49.mjs +36 -0
- package/dist/shared/ccjk.BBtCGd_g.mjs +899 -0
- package/dist/shared/{ccjk.CGcy7cNM.mjs → ccjk.BDKUdmLk.mjs} +1 -1
- package/dist/shared/{ccjk.DtMBiwVG.mjs → ccjk.BFxsJM0k.mjs} +1 -1
- package/dist/shared/{ccjk.j4uut26D.mjs → ccjk.BIxuVL3_.mjs} +5 -5
- package/dist/shared/ccjk.BRZ9ww8S.mjs +142 -0
- package/dist/shared/{ccjk.CN0edl87.mjs → ccjk.BSYWk9ML.mjs} +1 -1
- package/dist/shared/{ccjk.Dk1HDseQ.mjs → ccjk.BnpWvs9V.mjs} +75 -75
- package/dist/shared/ccjk.BoApaI4j.mjs +28 -0
- package/dist/shared/{ccjk.DKojSRzw.mjs → ccjk.BrPUmTqm.mjs} +1 -1
- package/dist/shared/{ccjk.C10pepYx.mjs → ccjk.BxSmJ8B7.mjs} +1 -1
- package/dist/shared/ccjk.Bx_rmYfN.mjs +69 -0
- package/dist/shared/ccjk.COweQ1RR.mjs +5 -0
- package/dist/shared/{ccjk.BN90X6oc.mjs → ccjk.CePkJq2S.mjs} +17 -17
- package/dist/shared/{ccjk.Bvoex4TZ.mjs → ccjk.CfKKcvWy.mjs} +1 -1
- package/dist/shared/ccjk.Cjgrln_h.mjs +297 -0
- package/dist/shared/ccjk.CxpGa6MC.mjs +2724 -0
- package/dist/shared/{ccjk.DfwJOEok.mjs → ccjk.D5MFQT7w.mjs} +1 -1
- package/dist/shared/{ccjk.cChAaGgT.mjs → ccjk.DG_o24cZ.mjs} +6 -6
- package/dist/shared/{ccjk.bhFAMRyc.mjs → ccjk.DLLw-h4Y.mjs} +32 -32
- package/dist/shared/ccjk.DOwtZMk8.mjs +4019 -0
- package/dist/shared/{ccjk.BsXQugfY.mjs → ccjk.DTdjs-qK.mjs} +13 -13
- package/dist/shared/{ccjk.Bdhyg3X-.mjs → ccjk.DsYaCCx4.mjs} +1 -1
- package/dist/shared/ccjk.KfSWcGlE.mjs +38 -0
- package/dist/shared/ccjk.RyizuzOI.mjs +21 -0
- package/dist/shared/{ccjk.h7_W-wTs.mjs → ccjk.SPoXMvZD.mjs} +1 -1
- package/dist/shared/ccjk.T_cX87dY.mjs +15 -0
- package/dist/shared/{ccjk.CrB6OYHv.mjs → ccjk._dESH4Rk.mjs} +2 -2
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +249 -0
- package/dist/shared/{ccjk.CBhIZiPz.mjs → ccjk.hoqrwWdN.mjs} +1 -1
- package/dist/shared/{ccjk.BNwRnWYx.mjs → ccjk.s7OCVzdd.mjs} +1230 -33
- package/dist/shared/{ccjk.BOIUTf5z.mjs → ccjk.waa2ikKJ.mjs} +8 -9
- package/package.json +31 -30
- package/dist/shared/ccjk.DHbrGcgg.mjs +0 -13
- package/dist/shared/ccjk.DntgA8fQ.mjs +0 -42
package/dist/chunks/features.mjs
CHANGED
|
@@ -1,62 +1,73 @@
|
|
|
1
|
-
import
|
|
2
|
-
import inquirer from '
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i as inquirer } from './index3.mjs';
|
|
3
3
|
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
5
|
import process__default from 'node:process';
|
|
6
|
-
import { join } from 'pathe';
|
|
7
6
|
import { d as selectMcpServices, g as getMcpServices } from './codex.mjs';
|
|
8
7
|
import { SUPPORTED_LANGS, LANG_LABELS } from './constants.mjs';
|
|
9
|
-
import { ensureI18nInitialized, i18n, changeLanguage } from './
|
|
8
|
+
import { ensureI18nInitialized, i18n, changeLanguage } from './index5.mjs';
|
|
10
9
|
import { updateZcfConfig, readZcfConfig } from './ccjk-config.mjs';
|
|
11
10
|
import { setupCcrConfiguration } from './config2.mjs';
|
|
12
11
|
import { a as isCcrInstalled, b as installCcr } from './init.mjs';
|
|
13
12
|
import { r as readMcpConfig, f as fixWindowsMcpConfig, w as writeMcpConfig, b as backupMcpConfig, a as buildMcpServerConfig, m as mergeMcpServers } from './claude-config.mjs';
|
|
14
13
|
import { a as applyAiLanguageDirective, g as getExistingModelConfig, u as updateCustomModel, d as updateDefaultModel, e as getExistingApiConfig, p as promptApiConfigurationAction, f as configureApi, s as switchToOfficialLogin } from './config.mjs';
|
|
15
|
-
import { c as configureOutputStyle, a as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.
|
|
14
|
+
import { c as configureOutputStyle, a as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.BnpWvs9V.mjs';
|
|
16
15
|
import { i as isWindows } from './platform.mjs';
|
|
17
16
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
18
17
|
import { openSettingsJson, importRecommendedPermissions, importRecommendedEnv } from './simple-config.mjs';
|
|
19
|
-
import { p as promptBoolean } from '../shared/ccjk.
|
|
18
|
+
import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
|
|
19
|
+
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
20
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
21
|
+
import 'node:readline';
|
|
22
|
+
import 'stream';
|
|
23
|
+
import 'node:tty';
|
|
24
|
+
import 'node:async_hooks';
|
|
25
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
26
|
+
import 'node:util';
|
|
27
|
+
import 'tty';
|
|
28
|
+
import 'fs';
|
|
29
|
+
import 'child_process';
|
|
30
|
+
import 'node:path';
|
|
31
|
+
import 'node:crypto';
|
|
32
|
+
import 'buffer';
|
|
33
|
+
import 'string_decoder';
|
|
20
34
|
import 'node:url';
|
|
21
|
-
import '
|
|
22
|
-
import '
|
|
23
|
-
import '
|
|
24
|
-
import '
|
|
25
|
-
import '
|
|
35
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
36
|
+
import './index7.mjs';
|
|
37
|
+
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
38
|
+
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
39
|
+
import './main.mjs';
|
|
40
|
+
import 'module';
|
|
41
|
+
import 'node:child_process';
|
|
42
|
+
import 'node:stream';
|
|
26
43
|
import './fs-operations.mjs';
|
|
27
|
-
import 'node:crypto';
|
|
28
44
|
import 'node:fs/promises';
|
|
29
45
|
import './json-config.mjs';
|
|
30
46
|
import './prompts.mjs';
|
|
31
47
|
import './package.mjs';
|
|
32
|
-
import '
|
|
33
|
-
import 'i18next';
|
|
34
|
-
import 'i18next-fs-backend';
|
|
35
|
-
import 'node:util';
|
|
48
|
+
import './index6.mjs';
|
|
36
49
|
import './banner.mjs';
|
|
37
50
|
import './auto-updater.mjs';
|
|
38
51
|
import './version-checker.mjs';
|
|
39
|
-
import '
|
|
40
|
-
import '../shared/ccjk.CN0edl87.mjs';
|
|
52
|
+
import '../shared/ccjk.BSYWk9ML.mjs';
|
|
41
53
|
import './smart-defaults.mjs';
|
|
42
|
-
import '../shared/ccjk.
|
|
43
|
-
import '../shared/ccjk.
|
|
54
|
+
import '../shared/ccjk.BrPUmTqm.mjs';
|
|
55
|
+
import '../shared/ccjk.BIxuVL3_.mjs';
|
|
44
56
|
import './installer.mjs';
|
|
45
|
-
import '../shared/ccjk.
|
|
57
|
+
import '../shared/ccjk._dESH4Rk.mjs';
|
|
46
58
|
import '../shared/ccjk.BiCrMV5O.mjs';
|
|
47
|
-
import 'inquirer-toggle';
|
|
48
59
|
|
|
49
60
|
async function handleCancellation() {
|
|
50
61
|
ensureI18nInitialized();
|
|
51
|
-
console.log(
|
|
62
|
+
console.log(a.yellow(i18n.t("common:cancelled")));
|
|
52
63
|
}
|
|
53
64
|
async function handleOfficialLoginMode() {
|
|
54
65
|
ensureI18nInitialized();
|
|
55
66
|
const success = switchToOfficialLogin();
|
|
56
67
|
if (success) {
|
|
57
|
-
console.log(
|
|
68
|
+
console.log(a.green(`\u2714 ${i18n.t("api:officialLoginConfigured")}`));
|
|
58
69
|
} else {
|
|
59
|
-
console.log(
|
|
70
|
+
console.log(a.red(i18n.t("api:officialLoginFailed")));
|
|
60
71
|
}
|
|
61
72
|
}
|
|
62
73
|
async function handleCustomApiMode() {
|
|
@@ -72,7 +83,7 @@ async function handleCustomApiMode() {
|
|
|
72
83
|
if (existingConfig) {
|
|
73
84
|
const configAction = await promptApiConfigurationAction();
|
|
74
85
|
if (configAction === "keep-existing") {
|
|
75
|
-
console.log(
|
|
86
|
+
console.log(a.green(`\u2714 ${i18n.t("api:keepExistingConfig")}`));
|
|
76
87
|
return;
|
|
77
88
|
} else if (configAction === "modify-partial") {
|
|
78
89
|
await modifyApiConfigPartially(existingConfig);
|
|
@@ -85,12 +96,12 @@ async function handleCustomApiMode() {
|
|
|
85
96
|
message: i18n.t("api:configureApi"),
|
|
86
97
|
choices: addNumbersToChoices([
|
|
87
98
|
{
|
|
88
|
-
name: `${i18n.t("api:useAuthToken")} - ${
|
|
99
|
+
name: `${i18n.t("api:useAuthToken")} - ${a.gray(i18n.t("api:authTokenDesc"))}`,
|
|
89
100
|
value: "auth_token",
|
|
90
101
|
short: i18n.t("api:useAuthToken")
|
|
91
102
|
},
|
|
92
103
|
{
|
|
93
|
-
name: `${i18n.t("api:useApiKey")} - ${
|
|
104
|
+
name: `${i18n.t("api:useApiKey")} - ${a.gray(i18n.t("api:apiKeyDesc"))}`,
|
|
94
105
|
value: "api_key",
|
|
95
106
|
short: i18n.t("api:useApiKey")
|
|
96
107
|
},
|
|
@@ -144,9 +155,9 @@ async function handleCustomApiMode() {
|
|
|
144
155
|
const apiConfig = { url, key, authType: apiChoice };
|
|
145
156
|
const configuredApi = configureApi(apiConfig);
|
|
146
157
|
if (configuredApi) {
|
|
147
|
-
console.log(
|
|
148
|
-
console.log(
|
|
149
|
-
console.log(
|
|
158
|
+
console.log(a.green(`\u2714 ${i18n.t("api:apiConfigSuccess")}`));
|
|
159
|
+
console.log(a.gray(` URL: ${configuredApi.url}`));
|
|
160
|
+
console.log(a.gray(` Key: ${formatApiKeyDisplay(configuredApi.key)}`));
|
|
150
161
|
}
|
|
151
162
|
}
|
|
152
163
|
async function handleCcrProxyMode() {
|
|
@@ -155,11 +166,11 @@ async function handleCcrProxyMode() {
|
|
|
155
166
|
if (!ccrStatus.hasCorrectPackage) {
|
|
156
167
|
await installCcr();
|
|
157
168
|
} else {
|
|
158
|
-
console.log(
|
|
169
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
|
|
159
170
|
}
|
|
160
171
|
const ccrConfigured = await setupCcrConfiguration();
|
|
161
172
|
if (ccrConfigured) {
|
|
162
|
-
console.log(
|
|
173
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrSetupComplete")}`));
|
|
163
174
|
}
|
|
164
175
|
}
|
|
165
176
|
async function handleSwitchConfigMode() {
|
|
@@ -214,7 +225,7 @@ async function configureMcpFeature() {
|
|
|
214
225
|
const existingConfig = readMcpConfig() || { mcpServers: {} };
|
|
215
226
|
const fixedConfig = fixWindowsMcpConfig(existingConfig);
|
|
216
227
|
writeMcpConfig(fixedConfig);
|
|
217
|
-
console.log(
|
|
228
|
+
console.log(a.green(`\u2714 ${i18n.t("configuration:windowsMcpConfigFixed")}`));
|
|
218
229
|
}
|
|
219
230
|
}
|
|
220
231
|
const selectedServices = await selectMcpServices();
|
|
@@ -224,7 +235,7 @@ async function configureMcpFeature() {
|
|
|
224
235
|
if (selectedServices.length > 0) {
|
|
225
236
|
const mcpBackupPath = backupMcpConfig();
|
|
226
237
|
if (mcpBackupPath) {
|
|
227
|
-
console.log(
|
|
238
|
+
console.log(a.gray(`\u2714 ${i18n.t("mcp:mcpBackupSuccess")}: ${mcpBackupPath}`));
|
|
228
239
|
}
|
|
229
240
|
const newServers = {};
|
|
230
241
|
for (const serviceId of selectedServices) {
|
|
@@ -251,7 +262,7 @@ async function configureMcpFeature() {
|
|
|
251
262
|
let mergedConfig = mergeMcpServers(existingConfig, newServers);
|
|
252
263
|
mergedConfig = fixWindowsMcpConfig(mergedConfig);
|
|
253
264
|
writeMcpConfig(mergedConfig);
|
|
254
|
-
console.log(
|
|
265
|
+
console.log(a.green(`\u2714 ${i18n.t("mcp:mcpConfigSuccess")}`));
|
|
255
266
|
}
|
|
256
267
|
}
|
|
257
268
|
async function configureDefaultModelFeature() {
|
|
@@ -259,16 +270,16 @@ async function configureDefaultModelFeature() {
|
|
|
259
270
|
const existingModel = getExistingModelConfig();
|
|
260
271
|
if (existingModel) {
|
|
261
272
|
console.log(`
|
|
262
|
-
${
|
|
273
|
+
${a.green(`\u2139 ${i18n.t("configuration:existingModelConfig") || "Existing model configuration"}`)}`);
|
|
263
274
|
const modelDisplay = existingModel === "default" ? i18n.t("configuration:defaultModelOption") || "Default (Let Claude Code choose)" : existingModel.charAt(0).toUpperCase() + existingModel.slice(1);
|
|
264
|
-
console.log(
|
|
275
|
+
console.log(a.gray(` ${i18n.t("configuration:currentModel") || "Current model"}: ${modelDisplay}
|
|
265
276
|
`));
|
|
266
277
|
const modify = await promptBoolean({
|
|
267
278
|
message: i18n.t("configuration:modifyModel") || "Modify model configuration?",
|
|
268
279
|
defaultValue: false
|
|
269
280
|
});
|
|
270
281
|
if (!modify) {
|
|
271
|
-
console.log(
|
|
282
|
+
console.log(a.green(`\u2714 ${i18n.t("configuration:keepModel") || "Keeping existing model configuration"}`));
|
|
272
283
|
return;
|
|
273
284
|
}
|
|
274
285
|
}
|
|
@@ -303,15 +314,15 @@ ${ansis.green(`\u2139 ${i18n.t("configuration:existingModelConfig") || "Existing
|
|
|
303
314
|
if (model === "custom") {
|
|
304
315
|
const { primaryModel, haikuModel, sonnetModel, opusModel } = await promptCustomModels();
|
|
305
316
|
if (!primaryModel.trim() && !haikuModel.trim() && !sonnetModel.trim() && !opusModel.trim()) {
|
|
306
|
-
console.log(
|
|
317
|
+
console.log(a.yellow(`\u26A0 ${i18n.t("configuration:customModelSkipped") || "Custom model configuration skipped"}`));
|
|
307
318
|
return;
|
|
308
319
|
}
|
|
309
320
|
updateCustomModel(primaryModel, haikuModel, sonnetModel, opusModel);
|
|
310
|
-
console.log(
|
|
321
|
+
console.log(a.green(`\u2714 ${i18n.t("configuration:customModelConfigured") || "Custom model configuration completed"}`));
|
|
311
322
|
return;
|
|
312
323
|
}
|
|
313
324
|
updateDefaultModel(model);
|
|
314
|
-
console.log(
|
|
325
|
+
console.log(a.green(`\u2714 ${i18n.t("configuration:modelConfigured") || "Default model configured"}`));
|
|
315
326
|
}
|
|
316
327
|
async function promptCustomModels(defaultPrimaryModel, defaultHaikuModel, defaultSonnetModel, defaultOpusModel) {
|
|
317
328
|
const { primaryModel } = await inquirer.prompt({
|
|
@@ -384,17 +395,17 @@ async function configureAiMemoryFeature() {
|
|
|
384
395
|
switch (option) {
|
|
385
396
|
case "viewGlobalClaudeMd": {
|
|
386
397
|
if (existsSync(globalClaudeMdPath)) {
|
|
387
|
-
console.log(
|
|
398
|
+
console.log(a.green.bold(`
|
|
388
399
|
\u{1F4C4} ${isZh ? "\u5168\u5C40 CLAUDE.md \u5185\u5BB9" : "Global CLAUDE.md Content"}:`));
|
|
389
|
-
console.log(
|
|
400
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
390
401
|
const content = readFileSync(globalClaudeMdPath, "utf-8");
|
|
391
402
|
console.log(content);
|
|
392
|
-
console.log(
|
|
393
|
-
console.log(
|
|
403
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
404
|
+
console.log(a.gray(`${isZh ? "\u8DEF\u5F84" : "Path"}: ${globalClaudeMdPath}`));
|
|
394
405
|
} else {
|
|
395
|
-
console.log(
|
|
406
|
+
console.log(a.yellow(`
|
|
396
407
|
\u26A0\uFE0F ${isZh ? "\u5168\u5C40 CLAUDE.md \u4E0D\u5B58\u5728" : "Global CLAUDE.md does not exist"}`));
|
|
397
|
-
console.log(
|
|
408
|
+
console.log(a.gray(`${isZh ? "\u9884\u671F\u8DEF\u5F84" : "Expected path"}: ${globalClaudeMdPath}`));
|
|
398
409
|
}
|
|
399
410
|
break;
|
|
400
411
|
}
|
|
@@ -406,34 +417,34 @@ async function configureAiMemoryFeature() {
|
|
|
406
417
|
foundPath = localClaudeMdPath;
|
|
407
418
|
}
|
|
408
419
|
if (foundPath) {
|
|
409
|
-
console.log(
|
|
420
|
+
console.log(a.green.bold(`
|
|
410
421
|
\u{1F4C1} ${isZh ? "\u9879\u76EE CLAUDE.md \u5185\u5BB9" : "Project CLAUDE.md Content"}:`));
|
|
411
|
-
console.log(
|
|
422
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
412
423
|
const content = readFileSync(foundPath, "utf-8");
|
|
413
424
|
console.log(content);
|
|
414
|
-
console.log(
|
|
415
|
-
console.log(
|
|
425
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
426
|
+
console.log(a.gray(`${isZh ? "\u8DEF\u5F84" : "Path"}: ${foundPath}`));
|
|
416
427
|
} else {
|
|
417
|
-
console.log(
|
|
428
|
+
console.log(a.yellow(`
|
|
418
429
|
\u26A0\uFE0F ${isZh ? "\u9879\u76EE CLAUDE.md \u4E0D\u5B58\u5728" : "Project CLAUDE.md does not exist"}`));
|
|
419
|
-
console.log(
|
|
420
|
-
console.log(
|
|
421
|
-
console.log(
|
|
430
|
+
console.log(a.gray(`${isZh ? "\u5DF2\u68C0\u67E5\u8DEF\u5F84" : "Checked paths"}:`));
|
|
431
|
+
console.log(a.gray(` - ${projectClaudeMdPath}`));
|
|
432
|
+
console.log(a.gray(` - ${localClaudeMdPath}`));
|
|
422
433
|
}
|
|
423
434
|
break;
|
|
424
435
|
}
|
|
425
436
|
case "viewPostmortem": {
|
|
426
437
|
const postmortemDir = join(cwd, ".postmortem");
|
|
427
438
|
if (existsSync(postmortemDir)) {
|
|
428
|
-
console.log(
|
|
439
|
+
console.log(a.green.bold(`
|
|
429
440
|
\u{1F52C} ${isZh ? "Postmortem \u62A5\u544A" : "Postmortem Reports"}:`));
|
|
430
|
-
console.log(
|
|
441
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
431
442
|
const { readdirSync } = await import('node:fs');
|
|
432
443
|
const files = readdirSync(postmortemDir).filter((f) => f.endsWith(".md"));
|
|
433
444
|
if (files.length === 0) {
|
|
434
|
-
console.log(
|
|
445
|
+
console.log(a.yellow(isZh ? "\u6682\u65E0 Postmortem \u62A5\u544A" : "No postmortem reports yet"));
|
|
435
446
|
} else {
|
|
436
|
-
console.log(
|
|
447
|
+
console.log(a.green(`${isZh ? "\u627E\u5230" : "Found"} ${files.length} ${isZh ? "\u4E2A\u62A5\u544A" : "reports"}:
|
|
437
448
|
`));
|
|
438
449
|
const { selectedFile } = await inquirer.prompt({
|
|
439
450
|
type: "list",
|
|
@@ -447,18 +458,18 @@ async function configureAiMemoryFeature() {
|
|
|
447
458
|
if (selectedFile !== "back") {
|
|
448
459
|
const reportPath = join(postmortemDir, selectedFile);
|
|
449
460
|
const content = readFileSync(reportPath, "utf-8");
|
|
450
|
-
console.log(
|
|
461
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
451
462
|
console.log(content);
|
|
452
|
-
console.log(
|
|
463
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
453
464
|
}
|
|
454
465
|
}
|
|
455
|
-
console.log(
|
|
466
|
+
console.log(a.gray(`
|
|
456
467
|
${isZh ? "\u76EE\u5F55" : "Directory"}: ${postmortemDir}`));
|
|
457
|
-
console.log(
|
|
468
|
+
console.log(a.gray(`\u{1F4A1} ${isZh ? "\u8FD0\u884C `ccjk postmortem init` \u4ECE\u5386\u53F2 fix commits \u751F\u6210\u62A5\u544A" : "Run `ccjk postmortem init` to generate reports from fix commits"}`));
|
|
458
469
|
} else {
|
|
459
|
-
console.log(
|
|
470
|
+
console.log(a.yellow(`
|
|
460
471
|
\u26A0\uFE0F ${isZh ? "Postmortem \u76EE\u5F55\u4E0D\u5B58\u5728" : "Postmortem directory does not exist"}`));
|
|
461
|
-
console.log(
|
|
472
|
+
console.log(a.gray(`\u{1F4A1} ${isZh ? "\u8FD0\u884C `ccjk postmortem init` \u521D\u59CB\u5316 Postmortem \u7CFB\u7EDF" : "Run `ccjk postmortem init` to initialize the Postmortem system"}`));
|
|
462
473
|
}
|
|
463
474
|
break;
|
|
464
475
|
}
|
|
@@ -473,19 +484,19 @@ ${isZh ? "\u76EE\u5F55" : "Directory"}: ${postmortemDir}`));
|
|
|
473
484
|
|
|
474
485
|
<!-- Add your global instructions here -->
|
|
475
486
|
`);
|
|
476
|
-
console.log(
|
|
487
|
+
console.log(a.green(`\u2705 ${isZh ? "\u5DF2\u521B\u5EFA\u5168\u5C40 CLAUDE.md" : "Created global CLAUDE.md"}`));
|
|
477
488
|
}
|
|
478
|
-
console.log(
|
|
489
|
+
console.log(a.green(`
|
|
479
490
|
\u{1F4DD} ${isZh ? "\u6B63\u5728\u6253\u5F00\u7F16\u8F91\u5668..." : "Opening editor..."}`));
|
|
480
|
-
console.log(
|
|
481
|
-
console.log(
|
|
491
|
+
console.log(a.gray(`${isZh ? "\u7F16\u8F91\u5668" : "Editor"}: ${editor}`));
|
|
492
|
+
console.log(a.gray(`${isZh ? "\u6587\u4EF6" : "File"}: ${globalClaudeMdPath}`));
|
|
482
493
|
try {
|
|
483
494
|
const { execSync } = await import('node:child_process');
|
|
484
495
|
execSync(`${editor} "${globalClaudeMdPath}"`, { stdio: "inherit" });
|
|
485
|
-
console.log(
|
|
496
|
+
console.log(a.green(`
|
|
486
497
|
\u2705 ${isZh ? "\u7F16\u8F91\u5B8C\u6210" : "Edit complete"}`));
|
|
487
498
|
} catch {
|
|
488
|
-
console.log(
|
|
499
|
+
console.log(a.yellow(`
|
|
489
500
|
\u26A0\uFE0F ${isZh ? "\u7F16\u8F91\u5668\u9000\u51FA" : "Editor exited"}`));
|
|
490
501
|
}
|
|
491
502
|
break;
|
|
@@ -496,16 +507,16 @@ ${isZh ? "\u76EE\u5F55" : "Directory"}: ${postmortemDir}`));
|
|
|
496
507
|
if (existingLang) {
|
|
497
508
|
console.log(
|
|
498
509
|
`
|
|
499
|
-
${
|
|
510
|
+
${a.green(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existing AI output language configuration"}`)}`
|
|
500
511
|
);
|
|
501
|
-
console.log(
|
|
512
|
+
console.log(a.gray(` ${i18n.t("configuration:currentLanguage") || "Current language"}: ${existingLang}
|
|
502
513
|
`));
|
|
503
514
|
const modify = await promptBoolean({
|
|
504
515
|
message: i18n.t("configuration:modifyLanguage") || "Modify AI output language?",
|
|
505
516
|
defaultValue: false
|
|
506
517
|
});
|
|
507
518
|
if (!modify) {
|
|
508
|
-
console.log(
|
|
519
|
+
console.log(a.green(`\u2714 ${i18n.t("configuration:keepLanguage") || "Keeping existing language configuration"}`));
|
|
509
520
|
return;
|
|
510
521
|
}
|
|
511
522
|
}
|
|
@@ -513,7 +524,7 @@ ${ansis.green(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Exist
|
|
|
513
524
|
const aiOutputLang = await selectAiOutputLanguage();
|
|
514
525
|
applyAiLanguageDirective(aiOutputLang);
|
|
515
526
|
updateZcfConfig({ aiOutputLang });
|
|
516
|
-
console.log(
|
|
527
|
+
console.log(a.green(`\u2714 ${i18n.t("configuration:aiLanguageConfigured") || "AI output language configured"}`));
|
|
517
528
|
break;
|
|
518
529
|
}
|
|
519
530
|
case "outputStyle": {
|
|
@@ -541,7 +552,7 @@ async function changeScriptLanguageFeature(currentLang) {
|
|
|
541
552
|
}
|
|
542
553
|
updateZcfConfig({ preferredLang: lang });
|
|
543
554
|
await changeLanguage(lang);
|
|
544
|
-
console.log(
|
|
555
|
+
console.log(a.green(`\u2714 ${i18n.t("language:languageChanged") || "Language changed"}`));
|
|
545
556
|
return lang;
|
|
546
557
|
}
|
|
547
558
|
async function mcpManagerFeature() {
|
|
@@ -553,27 +564,27 @@ async function mcpManagerFeature() {
|
|
|
553
564
|
message: isZh ? "\u{1F527} MCP \u7BA1\u7406 \u2014 \u9009\u62E9\u64CD\u4F5C:" : "\u{1F527} MCP Manager \u2014 Select action:",
|
|
554
565
|
choices: addNumbersToChoices([
|
|
555
566
|
{
|
|
556
|
-
name: isZh ? `\u{1F4CA} \u67E5\u770B MCP \u72B6\u6001 ${
|
|
567
|
+
name: isZh ? `\u{1F4CA} \u67E5\u770B MCP \u72B6\u6001 ${a.gray("- \u5DF2\u5B89\u88C5\u670D\u52A1\u603B\u89C8 + \u6027\u80FD\u9884\u8B66")}` : `\u{1F4CA} MCP Status ${a.gray("- Installed services overview + performance warning")}`,
|
|
557
568
|
value: "status"
|
|
558
569
|
},
|
|
559
570
|
{
|
|
560
|
-
name: isZh ? `\u{1FA7A} MCP \u8BCA\u65AD ${
|
|
571
|
+
name: isZh ? `\u{1FA7A} MCP \u8BCA\u65AD ${a.gray("- \u5065\u5EB7\u68C0\u67E5\u3001\u51B2\u7A81\u68C0\u6D4B\u3001\u4F18\u5316\u5EFA\u8BAE")}` : `\u{1FA7A} MCP Doctor ${a.gray("- Health check, conflict detection, optimization tips")}`,
|
|
561
572
|
value: "doctor"
|
|
562
573
|
},
|
|
563
574
|
{
|
|
564
|
-
name: isZh ? `\u{1F4CB} \u5217\u51FA\u5DF2\u5B89\u88C5\u670D\u52A1 ${
|
|
575
|
+
name: isZh ? `\u{1F4CB} \u5217\u51FA\u5DF2\u5B89\u88C5\u670D\u52A1 ${a.gray("- \u67E5\u770B\u5DF2\u914D\u7F6E\u7684 MCP \u670D\u52A1\u8BE6\u60C5")}` : `\u{1F4CB} List installed services ${a.gray("- View details of configured MCP services")}`,
|
|
565
576
|
value: "list"
|
|
566
577
|
},
|
|
567
578
|
{
|
|
568
|
-
name: isZh ? `\u{1F504} \u5207\u6362\u914D\u7F6E\u9884\u8BBE ${
|
|
579
|
+
name: isZh ? `\u{1F504} \u5207\u6362\u914D\u7F6E\u9884\u8BBE ${a.gray("- minimal\uFF08\u8F7B\u91CF\uFF09/ dev\uFF08\u5F00\u53D1\uFF09/ full\uFF08\u5B8C\u6574\uFF09")}` : `\u{1F504} Switch profile ${a.gray("- minimal / dev / full preset")}`,
|
|
569
580
|
value: "profile"
|
|
570
581
|
},
|
|
571
582
|
{
|
|
572
|
-
name: isZh ? `\u{1F5D1}\uFE0F \u91CA\u653E\u95F2\u7F6E\u670D\u52A1 ${
|
|
583
|
+
name: isZh ? `\u{1F5D1}\uFE0F \u91CA\u653E\u95F2\u7F6E\u670D\u52A1 ${a.gray("- \u505C\u7528\u957F\u671F\u672A\u4F7F\u7528\u7684\u670D\u52A1\u4EE5\u8282\u7701\u8D44\u6E90")}` : `\u{1F5D1}\uFE0F Release idle services ${a.gray("- Disable unused services to free resources")}`,
|
|
573
584
|
value: "release"
|
|
574
585
|
},
|
|
575
586
|
{
|
|
576
|
-
name: isZh ? `\u{1F4E6} \u5B89\u88C5/\u66F4\u65B0 MCP \u670D\u52A1 ${
|
|
587
|
+
name: isZh ? `\u{1F4E6} \u5B89\u88C5/\u66F4\u65B0 MCP \u670D\u52A1 ${a.gray("- \u8FDB\u5165\u670D\u52A1\u9009\u62E9\u5411\u5BFC\uFF08\u540C\u83DC\u5355\u9009\u9879 4\uFF09")}` : `\u{1F4E6} Install / Update services ${a.gray("- Open install wizard (same as menu option 4)")}`,
|
|
577
588
|
value: "install"
|
|
578
589
|
}
|
|
579
590
|
])
|
|
@@ -626,7 +637,7 @@ async function mcpManagerFeature() {
|
|
|
626
637
|
}
|
|
627
638
|
}
|
|
628
639
|
} catch (error) {
|
|
629
|
-
console.error(
|
|
640
|
+
console.error(a.red(`${i18n.t("common:error")}: ${error.message}`));
|
|
630
641
|
}
|
|
631
642
|
}
|
|
632
643
|
async function configureMergedPermissionsFeature() {
|
|
@@ -638,19 +649,19 @@ async function configureMergedPermissionsFeature() {
|
|
|
638
649
|
message: isZh ? "\u6743\u9650 & \u73AF\u5883\u914D\u7F6E \u2014 \u9009\u62E9\u64CD\u4F5C:" : "Permissions & Env Setup \u2014 Select action:",
|
|
639
650
|
choices: addNumbersToChoices([
|
|
640
651
|
{
|
|
641
|
-
name: isZh ? `\u5BFC\u5165\u63A8\u8350\u73AF\u5883\u53D8\u91CF ${
|
|
652
|
+
name: isZh ? `\u5BFC\u5165\u63A8\u8350\u73AF\u5883\u53D8\u91CF ${a.gray("- \u5199\u5165\u9690\u79C1\u4FDD\u62A4 env \u5230 settings.json")}` : `Import recommended env vars ${a.gray("- Write privacy env to settings.json")}`,
|
|
642
653
|
value: "env"
|
|
643
654
|
},
|
|
644
655
|
{
|
|
645
|
-
name: isZh ? `\u5BFC\u5165\u63A8\u8350\u6743\u9650\u914D\u7F6E ${
|
|
656
|
+
name: isZh ? `\u5BFC\u5165\u63A8\u8350\u6743\u9650\u914D\u7F6E ${a.gray("- \u8FFD\u52A0\u63A8\u8350 allow \u89C4\u5219\u5230 settings.json")}` : `Import recommended permissions ${a.gray("- Append recommended allow rules")}`,
|
|
646
657
|
value: "permissions"
|
|
647
658
|
},
|
|
648
659
|
{
|
|
649
|
-
name: isZh ? `\u4E00\u952E\u6743\u9650\u9884\u8BBE ${
|
|
660
|
+
name: isZh ? `\u4E00\u952E\u6743\u9650\u9884\u8BBE ${a.gray("- \u6700\u5927(max) / \u5F00\u53D1\u8005(dev) / \u5B89\u5168(safe) \u9884\u8BBE")}` : `Zero-config permission preset ${a.gray("- max / dev / safe preset")}`,
|
|
650
661
|
value: "preset"
|
|
651
662
|
},
|
|
652
663
|
{
|
|
653
|
-
name: isZh ? `\u6253\u5F00 settings.json ${
|
|
664
|
+
name: isZh ? `\u6253\u5F00 settings.json ${a.gray("- \u5728\u7F16\u8F91\u5668\u4E2D\u67E5\u770B\u5F53\u524D\u914D\u7F6E")}` : `Open settings.json ${a.gray("- View current config in editor")}`,
|
|
654
665
|
value: "open"
|
|
655
666
|
}
|
|
656
667
|
])
|
|
@@ -663,11 +674,11 @@ async function configureMergedPermissionsFeature() {
|
|
|
663
674
|
switch (choice) {
|
|
664
675
|
case "env":
|
|
665
676
|
await importRecommendedEnv();
|
|
666
|
-
console.log(
|
|
677
|
+
console.log(a.green(`\u2705 ${i18n.t("configuration:envImportSuccess")}`));
|
|
667
678
|
break;
|
|
668
679
|
case "permissions":
|
|
669
680
|
await importRecommendedPermissions();
|
|
670
|
-
console.log(
|
|
681
|
+
console.log(a.green(`\u2705 ${i18n.t("configuration:permissionsImportSuccess") || "Permissions imported"}`));
|
|
671
682
|
break;
|
|
672
683
|
case "preset": {
|
|
673
684
|
const { zeroConfig } = await import('./zero-config.mjs');
|
|
@@ -675,12 +686,12 @@ async function configureMergedPermissionsFeature() {
|
|
|
675
686
|
break;
|
|
676
687
|
}
|
|
677
688
|
case "open":
|
|
678
|
-
console.log(
|
|
689
|
+
console.log(a.green(i18n.t("configuration:openingSettingsJson") || "Opening settings.json..."));
|
|
679
690
|
await openSettingsJson();
|
|
680
691
|
break;
|
|
681
692
|
}
|
|
682
693
|
} catch (error) {
|
|
683
|
-
console.error(
|
|
694
|
+
console.error(a.red(`${i18n.t("common:error")}: ${error.message}`));
|
|
684
695
|
}
|
|
685
696
|
}
|
|
686
697
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomBytes } from 'node:crypto';
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync, renameSync, unlinkSync, copyFileSync, readdirSync, statSync } from 'node:fs';
|
|
3
3
|
import { mkdir, writeFile as writeFile$1, rename, unlink } from 'node:fs/promises';
|
|
4
|
-
import { dirname, join } from '
|
|
4
|
+
import { d as dirname, j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
5
5
|
|
|
6
6
|
class FileSystemError extends Error {
|
|
7
7
|
constructor(message, path, cause) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
-
import { join, dirname } from 'pathe';
|
|
3
2
|
import { DatabaseHealthMonitor } from './health-check.mjs';
|
|
3
|
+
import { j as join, d as dirname } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
4
4
|
import 'better-sqlite3';
|
|
5
5
|
|
|
6
6
|
const DEFAULT_CONFIG = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Database from 'better-sqlite3';
|
|
2
2
|
import { existsSync, mkdirSync, statSync, copyFileSync, readdirSync, unlinkSync } from 'node:fs';
|
|
3
|
-
import { join, dirname, basename } from '
|
|
3
|
+
import { j as join, d as dirname, b as basename } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
4
4
|
|
|
5
5
|
const CURRENT_SCHEMA_VERSION = 1;
|
|
6
6
|
class DatabaseHealthMonitor {
|