ccjk 13.3.10 → 13.3.12
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/bin/ccjk.mjs +2 -0
- package/dist/chunks/api-cli.mjs +1 -1
- package/dist/chunks/auto-fix.mjs +6 -10
- package/dist/chunks/ccr.mjs +3 -4
- package/dist/chunks/claude-code-config-manager.mjs +14 -12
- package/dist/chunks/claude-code-incremental-manager.mjs +1 -1
- package/dist/chunks/codex.mjs +1 -1
- package/dist/chunks/config.mjs +15 -48
- package/dist/chunks/doctor.mjs +1 -1
- package/dist/chunks/index5.mjs +6 -2
- package/dist/chunks/init.mjs +4 -4
- package/dist/chunks/mcp-cli.mjs +1 -1
- package/dist/chunks/mcp.mjs +1 -1
- package/dist/chunks/menu-hierarchical.mjs +3 -4
- package/dist/chunks/menu.mjs +4 -7
- package/dist/chunks/onboarding-wizard.mjs +1 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/quick-provider.mjs +1 -1
- package/dist/chunks/quick-setup.mjs +2 -3
- package/dist/chunks/slash-commands.mjs +1 -1
- package/dist/chunks/update.mjs +3 -4
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccjk.DwbhKZGA.mjs → ccjk.DZ4ehAHg.mjs} +8 -45
- package/dist/shared/{ccjk.CvIIxgUS.mjs → ccjk.DfZKjHvG.mjs} +1 -1
- package/dist/shared/{ccjk.BHBpQsHd.mjs → ccjk.KpFl2RDA.mjs} +0 -2
- package/package.json +1 -1
- package/templates/claude-code/common/settings.json +6 -3
- package/dist/templates/agents/fullstack-developer.json +0 -70
- package/dist/templates/agents/go-expert.json +0 -69
- package/dist/templates/agents/index.json +0 -64
- package/dist/templates/agents/python-expert.json +0 -69
- package/dist/templates/agents/react-specialist.json +0 -69
- package/dist/templates/agents/testing-automation-expert.json +0 -70
- package/dist/templates/agents/typescript-architect.json +0 -69
- package/dist/templates/claude-code/common/settings.json +0 -104
- package/dist/templates/hooks/post-test/coverage.json +0 -21
- package/dist/templates/hooks/post-test/summary.json +0 -21
- package/dist/templates/hooks/pre-commit/eslint.json +0 -22
- package/dist/templates/hooks/pre-commit/prettier.json +0 -22
- package/dist/templates/skills/index.json +0 -132
package/bin/ccjk.mjs
CHANGED
package/dist/chunks/api-cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import a from './index2.mjs';
|
|
2
2
|
import { i18n } from './index5.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { d as configureApi, g as getExistingApiConfig } from './config.mjs';
|
|
4
4
|
import { g as getAllPresets } from '../shared/ccjk.DopKzo3z.mjs';
|
|
5
5
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
6
6
|
import 'node:fs';
|
package/dist/chunks/auto-fix.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { n as needsMigration, m as migrateSettingsForTokenRetrieval } from '../shared/ccjk.
|
|
4
|
+
import { n as needsMigration, m as migrateSettingsForTokenRetrieval } from '../shared/ccjk.DZ4ehAHg.mjs';
|
|
5
5
|
import './index2.mjs';
|
|
6
6
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
7
7
|
import './constants.mjs';
|
|
@@ -9,16 +9,8 @@ import './index5.mjs';
|
|
|
9
9
|
import 'node:process';
|
|
10
10
|
import 'node:url';
|
|
11
11
|
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
12
|
-
import './claude-code-config-manager.mjs';
|
|
13
|
-
import '../shared/ccjk.RyizuzOI.mjs';
|
|
14
|
-
import './ccjk-config.mjs';
|
|
15
|
-
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
16
|
-
import './index6.mjs';
|
|
17
|
-
import './fs-operations.mjs';
|
|
18
|
-
import 'node:crypto';
|
|
19
|
-
import 'node:fs/promises';
|
|
20
|
-
import './json-config.mjs';
|
|
21
12
|
import './config.mjs';
|
|
13
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
22
14
|
import './index3.mjs';
|
|
23
15
|
import 'node:readline';
|
|
24
16
|
import 'stream';
|
|
@@ -29,9 +21,13 @@ import 'node:util';
|
|
|
29
21
|
import 'tty';
|
|
30
22
|
import 'fs';
|
|
31
23
|
import 'child_process';
|
|
24
|
+
import 'node:crypto';
|
|
32
25
|
import 'buffer';
|
|
33
26
|
import 'string_decoder';
|
|
34
27
|
import './claude-config.mjs';
|
|
28
|
+
import './json-config.mjs';
|
|
29
|
+
import './fs-operations.mjs';
|
|
30
|
+
import 'node:fs/promises';
|
|
35
31
|
import './platform.mjs';
|
|
36
32
|
import './main.mjs';
|
|
37
33
|
import 'module';
|
package/dist/chunks/ccr.mjs
CHANGED
|
@@ -52,11 +52,10 @@ import './smart-defaults.mjs';
|
|
|
52
52
|
import '../shared/ccjk.DJuyfrlL.mjs';
|
|
53
53
|
import './config2.mjs';
|
|
54
54
|
import './init.mjs';
|
|
55
|
-
import '../shared/ccjk.
|
|
55
|
+
import '../shared/ccjk.DfZKjHvG.mjs';
|
|
56
56
|
import './auto-updater.mjs';
|
|
57
57
|
import './version-checker.mjs';
|
|
58
|
-
import '../shared/ccjk.
|
|
59
|
-
import './claude-code-config-manager.mjs';
|
|
58
|
+
import '../shared/ccjk.DZ4ehAHg.mjs';
|
|
60
59
|
import './installer.mjs';
|
|
61
60
|
import '../shared/ccjk._dESH4Rk.mjs';
|
|
62
61
|
import './simple-config.mjs';
|
|
@@ -78,7 +77,7 @@ import './uninstall.mjs';
|
|
|
78
77
|
import '../shared/ccjk.CvChMYvB.mjs';
|
|
79
78
|
import 'globby';
|
|
80
79
|
import './update.mjs';
|
|
81
|
-
import '../shared/ccjk.
|
|
80
|
+
import '../shared/ccjk.KpFl2RDA.mjs';
|
|
82
81
|
|
|
83
82
|
async function ccr(options = {}) {
|
|
84
83
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as dayjs } from '../shared/ccjk.RyizuzOI.mjs';
|
|
2
2
|
import { ZCF_CONFIG_FILE, ZCF_CONFIG_DIR, SETTINGS_FILE } from './constants.mjs';
|
|
3
3
|
import { readDefaultTomlConfig, createDefaultTomlConfig, writeTomlConfig } from './ccjk-config.mjs';
|
|
4
|
-
import { a as clearModelEnv
|
|
4
|
+
import { a as clearModelEnv } from './config.mjs';
|
|
5
5
|
import { ensureDir, exists, copyFile } from './fs-operations.mjs';
|
|
6
6
|
import { readJsonConfig } from './json-config.mjs';
|
|
7
7
|
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
@@ -206,7 +206,7 @@ class ClaudeCodeConfigManager {
|
|
|
206
206
|
ensureI18nInitialized();
|
|
207
207
|
try {
|
|
208
208
|
if (!profile) {
|
|
209
|
-
const { switchToOfficialLogin } = await import('./config.mjs').then(function (n) { return n.
|
|
209
|
+
const { switchToOfficialLogin } = await import('./config.mjs').then(function (n) { return n.k; });
|
|
210
210
|
switchToOfficialLogin();
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
@@ -242,21 +242,23 @@ class ClaudeCodeConfigManager {
|
|
|
242
242
|
else
|
|
243
243
|
delete settings.env.ANTHROPIC_BASE_URL;
|
|
244
244
|
}
|
|
245
|
-
const
|
|
245
|
+
const hasModelConfig = Boolean(
|
|
246
246
|
profile.primaryModel || profile.defaultHaikuModel || profile.defaultSonnetModel || profile.defaultOpusModel
|
|
247
247
|
);
|
|
248
|
-
if (
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
248
|
+
if (hasModelConfig) {
|
|
249
|
+
if (profile.primaryModel)
|
|
250
|
+
settings.env.ANTHROPIC_MODEL = profile.primaryModel;
|
|
251
|
+
if (profile.defaultHaikuModel) {
|
|
252
|
+
settings.env.ANTHROPIC_SMALL_FAST_MODEL = profile.defaultHaikuModel;
|
|
253
|
+
settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL = profile.defaultHaikuModel;
|
|
254
|
+
}
|
|
255
|
+
if (profile.defaultSonnetModel)
|
|
256
|
+
settings.env.ANTHROPIC_DEFAULT_SONNET_MODEL = profile.defaultSonnetModel;
|
|
257
|
+
if (profile.defaultOpusModel)
|
|
258
|
+
settings.env.ANTHROPIC_DEFAULT_OPUS_MODEL = profile.defaultOpusModel;
|
|
256
259
|
} else {
|
|
257
260
|
clearModelEnv(settings.env);
|
|
258
261
|
}
|
|
259
|
-
normalizeAdaptiveModelSettings(settings);
|
|
260
262
|
writeJsonConfig(SETTINGS_FILE, settings);
|
|
261
263
|
const { setPrimaryApiKey, addCompletedOnboarding } = await import('./claude-config.mjs').then(function (n) { return n.h; });
|
|
262
264
|
setPrimaryApiKey();
|
|
@@ -4,7 +4,7 @@ import { ensureI18nInitialized, i18n } from './index5.mjs';
|
|
|
4
4
|
import { ClaudeCodeConfigManager } from './claude-code-config-manager.mjs';
|
|
5
5
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
6
6
|
import { p as promptBoolean } from '../shared/ccjk.BWFpnOr3.mjs';
|
|
7
|
-
import { v as validateApiKey } from '../shared/ccjk.
|
|
7
|
+
import { v as validateApiKey } from '../shared/ccjk.DfZKjHvG.mjs';
|
|
8
8
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
9
9
|
import 'node:readline';
|
|
10
10
|
import 'stream';
|
package/dist/chunks/codex.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { x as K } from './main.mjs';
|
|
|
10
10
|
import { CODEX_AUTH_FILE, SUPPORTED_LANGS, CODEX_DIR, CODEX_AGENTS_FILE, CODEX_PROMPTS_DIR, CODEX_CONFIG_FILE, AI_OUTPUT_LANGUAGES, ZCF_CONFIG_FILE } from './constants.mjs';
|
|
11
11
|
import { ensureI18nInitialized, i18n, format } from './index5.mjs';
|
|
12
12
|
import { updateZcfConfig, readZcfConfig, readDefaultTomlConfig, updateTomlConfig } from './ccjk-config.mjs';
|
|
13
|
-
import {
|
|
13
|
+
import { e as applyAiLanguageDirective } from './config.mjs';
|
|
14
14
|
import { exists, readFile, ensureDir, writeFileAtomic, writeFile, copyFile, copyDir } from './fs-operations.mjs';
|
|
15
15
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
16
16
|
import { k as isWindows, m as getMcpCommand, l as getSystemRoot, w as wrapCommandWithSudo, n as normalizeTomlPath } from './platform.mjs';
|
package/dist/chunks/config.mjs
CHANGED
|
@@ -12,10 +12,11 @@ import { j as join, d as dirname } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
|
12
12
|
|
|
13
13
|
const MODEL_ENV_KEYS = [
|
|
14
14
|
"ANTHROPIC_MODEL",
|
|
15
|
-
"ANTHROPIC_SMALL_FAST_MODEL",
|
|
16
15
|
"ANTHROPIC_DEFAULT_HAIKU_MODEL",
|
|
17
16
|
"ANTHROPIC_DEFAULT_SONNET_MODEL",
|
|
18
|
-
"ANTHROPIC_DEFAULT_OPUS_MODEL"
|
|
17
|
+
"ANTHROPIC_DEFAULT_OPUS_MODEL",
|
|
18
|
+
// Deprecated but still cleaned to avoid stale values
|
|
19
|
+
"ANTHROPIC_SMALL_FAST_MODEL"
|
|
19
20
|
];
|
|
20
21
|
function clearModelEnv(env) {
|
|
21
22
|
for (const key of MODEL_ENV_KEYS) {
|
|
@@ -23,43 +24,6 @@ function clearModelEnv(env) {
|
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
function applyAdaptiveModelEnv(env, models) {
|
|
27
|
-
const primaryModel = models.primaryModel?.trim();
|
|
28
|
-
const defaultHaikuModel = models.defaultHaikuModel?.trim();
|
|
29
|
-
const defaultSonnetModel = models.defaultSonnetModel?.trim();
|
|
30
|
-
const defaultOpusModel = models.defaultOpusModel?.trim();
|
|
31
|
-
if (primaryModel) {
|
|
32
|
-
env.ANTHROPIC_MODEL = primaryModel;
|
|
33
|
-
}
|
|
34
|
-
if (defaultHaikuModel) {
|
|
35
|
-
env.ANTHROPIC_SMALL_FAST_MODEL = defaultHaikuModel;
|
|
36
|
-
env.ANTHROPIC_DEFAULT_HAIKU_MODEL = defaultHaikuModel;
|
|
37
|
-
}
|
|
38
|
-
if (defaultSonnetModel) {
|
|
39
|
-
env.ANTHROPIC_DEFAULT_SONNET_MODEL = defaultSonnetModel;
|
|
40
|
-
}
|
|
41
|
-
if (defaultOpusModel) {
|
|
42
|
-
env.ANTHROPIC_DEFAULT_OPUS_MODEL = defaultOpusModel;
|
|
43
|
-
}
|
|
44
|
-
cleanAdaptiveModelEnv(env);
|
|
45
|
-
}
|
|
46
|
-
function cleanAdaptiveModelEnv(env) {
|
|
47
|
-
for (const key of MODEL_ENV_KEYS) {
|
|
48
|
-
const value = env[key];
|
|
49
|
-
if (typeof value === "string" && value.trim() === "") {
|
|
50
|
-
delete env[key];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function normalizeAdaptiveModelSettings(settings) {
|
|
55
|
-
if (settings.env) {
|
|
56
|
-
cleanAdaptiveModelEnv(settings.env);
|
|
57
|
-
}
|
|
58
|
-
if (settings.model === "default") {
|
|
59
|
-
delete settings.model;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
27
|
function ensureClaudeDir() {
|
|
64
28
|
ensureDir(CLAUDE_DIR);
|
|
65
29
|
}
|
|
@@ -194,13 +158,17 @@ function updateCustomModel(primaryModel, haikuModel, sonnetModel, opusModel) {
|
|
|
194
158
|
delete settings.model;
|
|
195
159
|
settings.env = settings.env || {};
|
|
196
160
|
clearModelEnv(settings.env);
|
|
197
|
-
|
|
198
|
-
primaryModel
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
161
|
+
if (primaryModel?.trim()) {
|
|
162
|
+
settings.env.ANTHROPIC_MODEL = primaryModel.trim();
|
|
163
|
+
}
|
|
164
|
+
if (haikuModel?.trim()) {
|
|
165
|
+
settings.env.ANTHROPIC_SMALL_FAST_MODEL = haikuModel.trim();
|
|
166
|
+
settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL = haikuModel.trim();
|
|
167
|
+
}
|
|
168
|
+
if (sonnetModel?.trim())
|
|
169
|
+
settings.env.ANTHROPIC_DEFAULT_SONNET_MODEL = sonnetModel.trim();
|
|
170
|
+
if (opusModel?.trim())
|
|
171
|
+
settings.env.ANTHROPIC_DEFAULT_OPUS_MODEL = opusModel.trim();
|
|
204
172
|
writeJsonConfig(SETTINGS_FILE, settings);
|
|
205
173
|
}
|
|
206
174
|
function updateDefaultModel(model) {
|
|
@@ -220,7 +188,6 @@ function updateDefaultModel(model) {
|
|
|
220
188
|
} else {
|
|
221
189
|
settings.model = model;
|
|
222
190
|
}
|
|
223
|
-
normalizeAdaptiveModelSettings(settings);
|
|
224
191
|
writeJsonConfig(SETTINGS_FILE, settings);
|
|
225
192
|
}
|
|
226
193
|
function mergeSettingsFile(templatePath, targetPath) {
|
|
@@ -435,4 +402,4 @@ const config = {
|
|
|
435
402
|
updateDefaultModel: updateDefaultModel
|
|
436
403
|
};
|
|
437
404
|
|
|
438
|
-
export { clearModelEnv as a, backupExistingConfig as b, copyConfigFiles as c,
|
|
405
|
+
export { clearModelEnv as a, backupExistingConfig as b, copyConfigFiles as c, configureApi as d, applyAiLanguageDirective as e, getExistingModelConfig as f, getExistingApiConfig as g, getExistingCustomModelConfig as h, updateDefaultModel as i, ensureClaudeDir as j, config as k, promptApiConfigurationAction as p, switchToOfficialLogin as s, updateCustomModel as u };
|
package/dist/chunks/doctor.mjs
CHANGED
|
@@ -814,7 +814,7 @@ async function checkPermissionRules() {
|
|
|
814
814
|
}
|
|
815
815
|
async function fixSettingsFile() {
|
|
816
816
|
const isZh = i18n.language === "zh-CN";
|
|
817
|
-
const { copyConfigFiles } = await import('./config.mjs').then(function (n) { return n.
|
|
817
|
+
const { copyConfigFiles } = await import('./config.mjs').then(function (n) { return n.k; });
|
|
818
818
|
console.log("");
|
|
819
819
|
console.log(a.bold.cyan("\u{1F527} Fixing settings.json"));
|
|
820
820
|
console.log(a.dim("\u2500".repeat(50)));
|
package/dist/chunks/index5.mjs
CHANGED
|
@@ -7428,6 +7428,10 @@ var Backend = function () {
|
|
|
7428
7428
|
}();
|
|
7429
7429
|
Backend.type = 'backend';
|
|
7430
7430
|
|
|
7431
|
+
const originalLog = console.log;
|
|
7432
|
+
console.log = () => {
|
|
7433
|
+
};
|
|
7434
|
+
console.log = originalLog;
|
|
7431
7435
|
const i18n = instance.createInstance();
|
|
7432
7436
|
const NAMESPACES = [
|
|
7433
7437
|
"agent-teams",
|
|
@@ -7523,7 +7527,7 @@ async function initI18n(language = "zh-CN") {
|
|
|
7523
7527
|
}
|
|
7524
7528
|
return;
|
|
7525
7529
|
}
|
|
7526
|
-
const
|
|
7530
|
+
const originalLog2 = console.log;
|
|
7527
7531
|
console.log = () => {
|
|
7528
7532
|
};
|
|
7529
7533
|
await i18n.use(Backend).init({
|
|
@@ -7586,7 +7590,7 @@ async function initI18n(language = "zh-CN") {
|
|
|
7586
7590
|
updateMissing: false,
|
|
7587
7591
|
missingKeyHandler: false
|
|
7588
7592
|
});
|
|
7589
|
-
console.log =
|
|
7593
|
+
console.log = originalLog2;
|
|
7590
7594
|
}
|
|
7591
7595
|
function format(template, values) {
|
|
7592
7596
|
if (!values)
|
package/dist/chunks/init.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import process__default from 'node:process';
|
|
|
3
3
|
import a from './index2.mjs';
|
|
4
4
|
import { i as inquirer } from './index3.mjs';
|
|
5
5
|
import { m as runCodexFullInit, k as selectMcpServices, g as getMcpServices, M as MCP_SERVICE_CONFIGS } from './codex.mjs';
|
|
6
|
-
import { m as modifyApiConfigPartially, a as configureApiCompletely, s as selectAndInstallWorkflows, c as configureOutputStyle, f as formatApiKeyDisplay, W as WORKFLOW_CONFIG_BASE } from '../shared/ccjk.
|
|
6
|
+
import { m as modifyApiConfigPartially, a as configureApiCompletely, s as selectAndInstallWorkflows, c as configureOutputStyle, f as formatApiKeyDisplay, W as WORKFLOW_CONFIG_BASE } from '../shared/ccjk.DfZKjHvG.mjs';
|
|
7
7
|
import { SETTINGS_FILE, DEFAULT_CODE_TOOL_TYPE, CODE_TOOL_BANNERS, API_DEFAULT_URL } from './constants.mjs';
|
|
8
8
|
import { ensureI18nInitialized, i18n } from './index5.mjs';
|
|
9
9
|
import { displayBannerWithInfo, padToDisplayWidth } from './banner.mjs';
|
|
@@ -17,8 +17,8 @@ import { a as addCompletedOnboarding, s as setPrimaryApiKey, c as backupMcpConfi
|
|
|
17
17
|
import { r as resolveCodeType } from '../shared/ccjk.Cjj8SVrn.mjs';
|
|
18
18
|
import { exists } from './fs-operations.mjs';
|
|
19
19
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
20
|
-
import { p as promptApiConfigurationAction,
|
|
21
|
-
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration } from '../shared/ccjk.
|
|
20
|
+
import { p as promptApiConfigurationAction, j as ensureClaudeDir, g as getExistingApiConfig, s as switchToOfficialLogin, b as backupExistingConfig, c as copyConfigFiles, e as applyAiLanguageDirective, d as configureApi } from './config.mjs';
|
|
21
|
+
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration } from '../shared/ccjk.DZ4ehAHg.mjs';
|
|
22
22
|
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
|
|
23
23
|
import { getInstallationStatus, installClaudeCode } from './installer.mjs';
|
|
24
24
|
import { p as parseOrchestrationLevel, w as writeOrchestrationPolicy } from './smart-defaults.mjs';
|
|
@@ -1030,7 +1030,7 @@ async function init(options = {}) {
|
|
|
1030
1030
|
const hasModelParams = options.apiModel || options.apiHaikuModel || options.apiSonnetModel || options.apiOpusModel;
|
|
1031
1031
|
if (hasModelParams && action !== "docs-only" && codeToolType === "claude-code") {
|
|
1032
1032
|
if (options.skipPrompt) {
|
|
1033
|
-
const { updateCustomModel } = await import('./config.mjs').then(function (n) { return n.
|
|
1033
|
+
const { updateCustomModel } = await import('./config.mjs').then(function (n) { return n.k; });
|
|
1034
1034
|
updateCustomModel(
|
|
1035
1035
|
options.apiModel || void 0,
|
|
1036
1036
|
options.apiHaikuModel || void 0,
|
package/dist/chunks/mcp-cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import a from './index2.mjs';
|
|
|
2
2
|
import { g as getMcpServices } from './codex.mjs';
|
|
3
3
|
import { i18n } from './index5.mjs';
|
|
4
4
|
import { r as readMcpConfig } from './claude-config.mjs';
|
|
5
|
-
import { i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.
|
|
5
|
+
import { i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.KpFl2RDA.mjs';
|
|
6
6
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
7
7
|
import 'node:process';
|
|
8
8
|
import 'node:url';
|
package/dist/chunks/mcp.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { M as MCP_SERVICE_TIERS, i as isCoreService, g as getServicesByTier, c a
|
|
|
6
6
|
import { r as readMcpConfig, c as backupMcpConfig, w as writeMcpConfig } from './claude-config.mjs';
|
|
7
7
|
import { i as inquirer } from './index3.mjs';
|
|
8
8
|
import { M as MCP_SERVICE_CONFIGS } from './codex.mjs';
|
|
9
|
-
import { d as displayInstalledMcpServices, b as isMcpServiceInstalled, i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.
|
|
9
|
+
import { d as displayInstalledMcpServices, b as isMcpServiceInstalled, i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.KpFl2RDA.mjs';
|
|
10
10
|
import { existsSync, unlinkSync, statSync, mkdirSync, readFileSync } from 'node:fs';
|
|
11
11
|
import { homedir } from 'node:os';
|
|
12
12
|
import { writeFileAtomic } from './fs-operations.mjs';
|
|
@@ -52,11 +52,10 @@ import '../shared/ccjk.DJuyfrlL.mjs';
|
|
|
52
52
|
import '../shared/ccjk.BIxuVL3_.mjs';
|
|
53
53
|
import './config2.mjs';
|
|
54
54
|
import './init.mjs';
|
|
55
|
-
import '../shared/ccjk.
|
|
55
|
+
import '../shared/ccjk.DfZKjHvG.mjs';
|
|
56
56
|
import './auto-updater.mjs';
|
|
57
57
|
import './version-checker.mjs';
|
|
58
|
-
import '../shared/ccjk.
|
|
59
|
-
import './claude-code-config-manager.mjs';
|
|
58
|
+
import '../shared/ccjk.DZ4ehAHg.mjs';
|
|
60
59
|
import './installer.mjs';
|
|
61
60
|
import '../shared/ccjk._dESH4Rk.mjs';
|
|
62
61
|
import './simple-config.mjs';
|
|
@@ -78,7 +77,7 @@ import './uninstall.mjs';
|
|
|
78
77
|
import '../shared/ccjk.CvChMYvB.mjs';
|
|
79
78
|
import 'globby';
|
|
80
79
|
import './update.mjs';
|
|
81
|
-
import '../shared/ccjk.
|
|
80
|
+
import '../shared/ccjk.KpFl2RDA.mjs';
|
|
82
81
|
|
|
83
82
|
function renderMenuHeader(context, _isZh) {
|
|
84
83
|
const title = context.breadcrumb.join(i18n.t("menu:menu.breadcrumb.separator"));
|
package/dist/chunks/menu.mjs
CHANGED
|
@@ -13,8 +13,8 @@ import { h as handleExitPromptError, a as handleGeneralError } from '../shared/c
|
|
|
13
13
|
import { homedir } from 'node:os';
|
|
14
14
|
import { setupCcrConfiguration, readCcrConfig, configureCcrFeature } from './config2.mjs';
|
|
15
15
|
import { a as isCcrInstalled, b as installCcr, i as init } from './init.mjs';
|
|
16
|
-
import {
|
|
17
|
-
import { c as configureOutputStyle, m as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.
|
|
16
|
+
import { e as applyAiLanguageDirective, f as getExistingModelConfig, h as getExistingCustomModelConfig, u as updateCustomModel, i as updateDefaultModel, g as getExistingApiConfig, p as promptApiConfigurationAction, d as configureApi, s as switchToOfficialLogin } from './config.mjs';
|
|
17
|
+
import { c as configureOutputStyle, m as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.DfZKjHvG.mjs';
|
|
18
18
|
import { k as isWindows } from './platform.mjs';
|
|
19
19
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
20
20
|
import { openSettingsJson, importRecommendedPermissions, importRecommendedEnv } from './simple-config.mjs';
|
|
@@ -38,11 +38,8 @@ async function ensureModelConfigPriority() {
|
|
|
38
38
|
const settings = readJsonConfig(SETTINGS_FILE);
|
|
39
39
|
if (!settings)
|
|
40
40
|
return;
|
|
41
|
-
|
|
42
|
-
settings.env
|
|
43
|
-
);
|
|
44
|
-
if (hasCustomModels && settings.model) {
|
|
45
|
-
delete settings.model;
|
|
41
|
+
if (settings.env?.ANTHROPIC_DEFAULT_HAIKU_MODEL && settings.env.ANTHROPIC_SMALL_FAST_MODEL !== settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL) {
|
|
42
|
+
settings.env.ANTHROPIC_SMALL_FAST_MODEL = settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
|
|
46
43
|
writeJsonConfig(SETTINGS_FILE, settings);
|
|
47
44
|
}
|
|
48
45
|
}
|
|
@@ -79,7 +79,7 @@ async function runOnboardingWizard(options = {}) {
|
|
|
79
79
|
console.log(a.bold(`${isZh ? "\u6B65\u9AA4 2/3" : "Step 2/3"}: ${isZh ? "API \u914D\u7F6E" : "API Configuration"}${step2Done ? a.green(" \u2714") : ""}`));
|
|
80
80
|
if (!step2Done) {
|
|
81
81
|
try {
|
|
82
|
-
const { getExistingApiConfig } = await import('./config.mjs').then(function (n) { return n.
|
|
82
|
+
const { getExistingApiConfig } = await import('./config.mjs').then(function (n) { return n.k; });
|
|
83
83
|
const existing = getExistingApiConfig();
|
|
84
84
|
if (existing?.key || existing?.url) {
|
|
85
85
|
console.log(a.green(` \u2714 ${isZh ? "\u5DF2\u914D\u7F6E" : "Already configured"}`));
|
package/dist/chunks/package.mjs
CHANGED
|
@@ -649,7 +649,7 @@ async function saveProviderConfig(config) {
|
|
|
649
649
|
settings.apiProvider = "custom";
|
|
650
650
|
settings.apiUrl = config.provider.apiUrl;
|
|
651
651
|
settings.apiKey = config.apiKey;
|
|
652
|
-
|
|
652
|
+
settings.model = config.model;
|
|
653
653
|
const envConfig = {
|
|
654
654
|
ANTHROPIC_BASE_URL: config.provider.apiUrl,
|
|
655
655
|
ANTHROPIC_API_KEY: config.apiKey,
|
|
@@ -47,14 +47,13 @@ import '../shared/ccjk.DScm_NnL.mjs';
|
|
|
47
47
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
48
48
|
import './prompts.mjs';
|
|
49
49
|
import '../shared/ccjk.BWFpnOr3.mjs';
|
|
50
|
-
import '../shared/ccjk.
|
|
50
|
+
import '../shared/ccjk.DfZKjHvG.mjs';
|
|
51
51
|
import './banner.mjs';
|
|
52
52
|
import './config2.mjs';
|
|
53
53
|
import './auto-updater.mjs';
|
|
54
54
|
import './version-checker.mjs';
|
|
55
55
|
import '../shared/ccjk.Cjj8SVrn.mjs';
|
|
56
|
-
import '../shared/ccjk.
|
|
57
|
-
import './claude-code-config-manager.mjs';
|
|
56
|
+
import '../shared/ccjk.DZ4ehAHg.mjs';
|
|
58
57
|
import '../shared/ccjk.BIxuVL3_.mjs';
|
|
59
58
|
import './installer.mjs';
|
|
60
59
|
import '../shared/ccjk._dESH4Rk.mjs';
|
|
@@ -122,7 +122,7 @@ function getSlashCommands() {
|
|
|
122
122
|
descriptionZh: "\u521B\u5EFA\u914D\u7F6E\u5907\u4EFD",
|
|
123
123
|
category: "system",
|
|
124
124
|
handler: async () => {
|
|
125
|
-
const { backupExistingConfig } = await import('./config.mjs').then(function (n) { return n.
|
|
125
|
+
const { backupExistingConfig } = await import('./config.mjs').then(function (n) { return n.k; });
|
|
126
126
|
const backupPath = backupExistingConfig();
|
|
127
127
|
if (backupPath) {
|
|
128
128
|
console.log(a.green(`\u2705 Backup created: ${backupPath}`));
|
package/dist/chunks/update.mjs
CHANGED
|
@@ -8,10 +8,10 @@ import { displayBanner } from './banner.mjs';
|
|
|
8
8
|
import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
|
|
9
9
|
import { r as readMcpConfig } from './claude-config.mjs';
|
|
10
10
|
import { c as copyConfigFiles } from './config.mjs';
|
|
11
|
-
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration } from '../shared/ccjk.
|
|
12
|
-
import { u as updatePromptOnly, s as selectAndInstallWorkflows } from '../shared/ccjk.
|
|
11
|
+
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration } from '../shared/ccjk.DZ4ehAHg.mjs';
|
|
12
|
+
import { u as updatePromptOnly, s as selectAndInstallWorkflows } from '../shared/ccjk.DfZKjHvG.mjs';
|
|
13
13
|
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
|
|
14
|
-
import { a as installMcpServices } from '../shared/ccjk.
|
|
14
|
+
import { a as installMcpServices } from '../shared/ccjk.KpFl2RDA.mjs';
|
|
15
15
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
16
16
|
import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
|
|
17
17
|
import { checkClaudeCodeVersionAndPrompt } from './version-checker.mjs';
|
|
@@ -50,7 +50,6 @@ import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
|
50
50
|
import '../shared/ccjk.BWFpnOr3.mjs';
|
|
51
51
|
import './index6.mjs';
|
|
52
52
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
53
|
-
import './claude-code-config-manager.mjs';
|
|
54
53
|
|
|
55
54
|
const ccjkVersion = getRuntimeVersion();
|
|
56
55
|
function resolveCodeToolType(optionValue, savedValue) {
|
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { promisify } from 'node:util';
|
|
|
13
13
|
import a from './chunks/index2.mjs';
|
|
14
14
|
import { g as getRuntimeVersion } from './shared/ccjk.gDEDGD_t.mjs';
|
|
15
15
|
import { j as join$1 } from './shared/ccjk.bQ7Dh1g4.mjs';
|
|
16
|
-
export {
|
|
16
|
+
export { k as config } from './chunks/config.mjs';
|
|
17
17
|
export { a as loggerUtils } from './shared/ccjk.BJMRY2Ra.mjs';
|
|
18
18
|
export { p as platform } from './chunks/platform.mjs';
|
|
19
19
|
import { Transform } from 'node:stream';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import a from '../chunks/index2.mjs';
|
|
2
2
|
import { SETTINGS_FILE } from '../chunks/constants.mjs';
|
|
3
3
|
import { ensureI18nInitialized, i18n } from '../chunks/index5.mjs';
|
|
4
|
-
import {
|
|
5
|
-
import { n as normalizeAdaptiveModelSettings, b as backupExistingConfig } from '../chunks/config.mjs';
|
|
4
|
+
import { b as backupExistingConfig } from '../chunks/config.mjs';
|
|
6
5
|
import { exists } from '../chunks/fs-operations.mjs';
|
|
7
6
|
import { readJsonConfig, writeJsonConfig } from '../chunks/json-config.mjs';
|
|
8
7
|
|
|
@@ -25,24 +24,12 @@ function migrateSettingsForTokenRetrieval() {
|
|
|
25
24
|
return result;
|
|
26
25
|
}
|
|
27
26
|
let modified = false;
|
|
28
|
-
const hadDefaultModelSentinel = settings.model === "default";
|
|
29
|
-
const hadEmptyModelEnv = Boolean(settings.env && [
|
|
30
|
-
settings.env.ANTHROPIC_MODEL,
|
|
31
|
-
settings.env.ANTHROPIC_SMALL_FAST_MODEL,
|
|
32
|
-
settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL,
|
|
33
|
-
settings.env.ANTHROPIC_DEFAULT_SONNET_MODEL,
|
|
34
|
-
settings.env.ANTHROPIC_DEFAULT_OPUS_MODEL
|
|
35
|
-
].some((value) => typeof value === "string" && value.trim() === ""));
|
|
36
|
-
normalizeAdaptiveModelSettings(settings);
|
|
37
|
-
if (hadDefaultModelSentinel) {
|
|
38
|
-
result.changes.push('Removed stale settings.model = "default" sentinel so Claude Code falls back to native auto-selection');
|
|
39
|
-
modified = true;
|
|
40
|
-
}
|
|
41
|
-
if (hadEmptyModelEnv) {
|
|
42
|
-
result.changes.push("Removed empty model environment variables left by the template/config merge path");
|
|
43
|
-
modified = true;
|
|
44
|
-
}
|
|
45
27
|
if (settings.env) {
|
|
28
|
+
if (settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL && !settings.env.ANTHROPIC_SMALL_FAST_MODEL) {
|
|
29
|
+
settings.env.ANTHROPIC_SMALL_FAST_MODEL = settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
|
|
30
|
+
result.changes.push("Restored ANTHROPIC_SMALL_FAST_MODEL from ANTHROPIC_DEFAULT_HAIKU_MODEL for Haiku fast-path compatibility");
|
|
31
|
+
modified = true;
|
|
32
|
+
}
|
|
46
33
|
if ("CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC" in settings.env) {
|
|
47
34
|
delete settings.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC;
|
|
48
35
|
result.changes.push("Removed CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC (was blocking token retrieval)");
|
|
@@ -57,25 +44,6 @@ function migrateSettingsForTokenRetrieval() {
|
|
|
57
44
|
modified = true;
|
|
58
45
|
}
|
|
59
46
|
}
|
|
60
|
-
if (settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL && !settings.env.ANTHROPIC_SMALL_FAST_MODEL) {
|
|
61
|
-
settings.env.ANTHROPIC_SMALL_FAST_MODEL = settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
|
|
62
|
-
result.changes.push("Restored ANTHROPIC_SMALL_FAST_MODEL from defaultHaikuModel so Claude Code can auto-route lightweight requests again");
|
|
63
|
-
modified = true;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (settings.model && (settings.env?.ANTHROPIC_DEFAULT_HAIKU_MODEL || settings.env?.ANTHROPIC_DEFAULT_SONNET_MODEL || settings.env?.ANTHROPIC_DEFAULT_OPUS_MODEL)) {
|
|
67
|
-
delete settings.model;
|
|
68
|
-
result.changes.push("Removed stale settings.model override because adaptive default model variants are configured");
|
|
69
|
-
modified = true;
|
|
70
|
-
}
|
|
71
|
-
const profileConfig = ClaudeCodeConfigManager.readConfig();
|
|
72
|
-
if (profileConfig) {
|
|
73
|
-
const hasAdaptiveProfiles = Object.entries(profileConfig.profiles).some(
|
|
74
|
-
([_profileId, profile]) => Boolean(profile.primaryModel || profile.defaultHaikuModel || profile.defaultSonnetModel || profile.defaultOpusModel)
|
|
75
|
-
);
|
|
76
|
-
if (hasAdaptiveProfiles) {
|
|
77
|
-
result.changes.push("Preserved profile-level primaryModel values; migration now keeps primary routing and restores fast-model compatibility instead of deleting them");
|
|
78
|
-
}
|
|
79
47
|
}
|
|
80
48
|
if (!modified) {
|
|
81
49
|
result.success = true;
|
|
@@ -106,15 +74,10 @@ function needsMigration() {
|
|
|
106
74
|
}
|
|
107
75
|
const hasProblematicVar = "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC" in settings.env;
|
|
108
76
|
const hasExcessiveTimeout = settings.env.MCP_TIMEOUT && Number.parseInt(settings.env.MCP_TIMEOUT, 10) > 2e4;
|
|
109
|
-
const
|
|
110
|
-
settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL || settings.env.ANTHROPIC_DEFAULT_SONNET_MODEL || settings.env.ANTHROPIC_DEFAULT_OPUS_MODEL
|
|
111
|
-
);
|
|
112
|
-
const isMissingFastModelCompat = Boolean(
|
|
77
|
+
const hasMissingHaikuFastCompat = Boolean(
|
|
113
78
|
settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL && !settings.env.ANTHROPIC_SMALL_FAST_MODEL
|
|
114
79
|
);
|
|
115
|
-
|
|
116
|
-
const hasProfilePinnedAdaptiveOverride = false;
|
|
117
|
-
return Boolean(hasProblematicVar || hasExcessiveTimeout || hasPinnedAdaptiveOverride || hasProfilePinnedAdaptiveOverride || isMissingFastModelCompat);
|
|
80
|
+
return Boolean(hasProblematicVar || hasExcessiveTimeout || hasMissingHaikuFastCompat);
|
|
118
81
|
} catch {
|
|
119
82
|
return false;
|
|
120
83
|
}
|
|
@@ -2,7 +2,7 @@ import a from '../chunks/index2.mjs';
|
|
|
2
2
|
import { i as inquirer } from '../chunks/index3.mjs';
|
|
3
3
|
import { CLAUDE_DIR, SETTINGS_FILE } from '../chunks/constants.mjs';
|
|
4
4
|
import { ensureI18nInitialized, i18n } from '../chunks/index5.mjs';
|
|
5
|
-
import { g as getExistingApiConfig,
|
|
5
|
+
import { g as getExistingApiConfig, d as configureApi, s as switchToOfficialLogin, b as backupExistingConfig, e as applyAiLanguageDirective } from '../chunks/config.mjs';
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import { updateZcfConfig } from '../chunks/ccjk-config.mjs';
|
|
8
8
|
import { exists, removeFile, ensureDir, copyFile } from '../chunks/fs-operations.mjs';
|
|
@@ -4,7 +4,6 @@ import { h as getMcpService, i as dynamicMcpRegistry, a as readCodexConfig, j as
|
|
|
4
4
|
import { SETTINGS_FILE, CLAUDE_DIR, ClAUDE_CONFIG_FILE, CODEX_CONFIG_FILE } from '../chunks/constants.mjs';
|
|
5
5
|
import { exists, ensureDir } from '../chunks/fs-operations.mjs';
|
|
6
6
|
import { readJsonConfig, writeJsonConfig } from '../chunks/json-config.mjs';
|
|
7
|
-
import { n as normalizeAdaptiveModelSettings } from '../chunks/config.mjs';
|
|
8
7
|
import { d as deepMerge, r as readMcpConfig, b as buildMcpServerConfig, w as writeMcpConfig } from '../chunks/claude-config.mjs';
|
|
9
8
|
import { ensureI18nInitialized, i18n } from '../chunks/index5.mjs';
|
|
10
9
|
import { k as isWindows, l as getSystemRoot } from '../chunks/platform.mjs';
|
|
@@ -23,7 +22,6 @@ function readClaudeConfig(configPath = SETTINGS_FILE) {
|
|
|
23
22
|
function writeClaudeConfig(config, options = {}, configPath = SETTINGS_FILE) {
|
|
24
23
|
try {
|
|
25
24
|
ensureDir(CLAUDE_DIR);
|
|
26
|
-
normalizeAdaptiveModelSettings(config);
|
|
27
25
|
writeJsonConfig(configPath, config, {
|
|
28
26
|
atomic: options.atomic !== false,
|
|
29
27
|
pretty: true,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccjk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "13.3.
|
|
4
|
+
"version": "13.3.12",
|
|
5
5
|
"packageManager": "pnpm@10.17.1",
|
|
6
6
|
"description": "Turn Claude Code into a production-ready AI dev environment with one-command setup, persistent memory, MCP automation, cloud sync, and zero-config browser workflows.",
|
|
7
7
|
"author": {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
3
3
|
"description": "CCJK settings template — auto-migrated on upgrade",
|
|
4
|
+
"model": "default",
|
|
4
5
|
"env": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
6
|
+
"ANTHROPIC_MODEL": "",
|
|
7
|
+
"ANTHROPIC_SMALL_FAST_MODEL": "",
|
|
8
|
+
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "",
|
|
9
|
+
"ANTHROPIC_DEFAULT_SONNET_MODEL": "",
|
|
10
|
+
"ANTHROPIC_DEFAULT_OPUS_MODEL": ""
|
|
7
11
|
},
|
|
8
12
|
"language": "",
|
|
9
13
|
"showTurnDuration": false,
|
|
@@ -38,7 +42,6 @@
|
|
|
38
42
|
},
|
|
39
43
|
"permissions": {
|
|
40
44
|
"allow": [
|
|
41
|
-
"Bash(*)",
|
|
42
45
|
"Bash(sips *)",
|
|
43
46
|
"Bash(pnpm *)",
|
|
44
47
|
"Bash(npm *)",
|