ccjk 13.3.7 → 13.3.9
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/api-cli.mjs +1 -1
- package/dist/chunks/auto-fix.mjs +6 -7
- package/dist/chunks/ccr.mjs +2 -2
- package/dist/chunks/claude-code-config-manager.mjs +9 -12
- package/dist/chunks/claude-code-incremental-manager.mjs +1 -1
- package/dist/chunks/codex.mjs +1 -1
- package/dist/chunks/config.mjs +31 -11
- package/dist/chunks/doctor.mjs +1 -1
- package/dist/chunks/index5.mjs +9 -1
- package/dist/chunks/init.mjs +4 -4
- package/dist/chunks/menu-hierarchical.mjs +2 -2
- package/dist/chunks/menu.mjs +2 -2
- package/dist/chunks/onboarding-wizard.mjs +1 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/quick-setup.mjs +2 -2
- package/dist/chunks/slash-commands.mjs +1 -1
- package/dist/chunks/update.mjs +2 -2
- package/dist/cli.mjs +0 -0
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccjk.DfZKjHvG.mjs → ccjk.CvIIxgUS.mjs} +1 -1
- package/dist/shared/{ccjk.DxWqH-EF.mjs → ccjk.D9VwKRaD.mjs} +14 -26
- package/package.json +68 -65
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 { e 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.D9VwKRaD.mjs';
|
|
5
5
|
import './index2.mjs';
|
|
6
6
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
7
7
|
import './constants.mjs';
|
|
@@ -82,15 +82,14 @@ async function detectSettingsIssues() {
|
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
if (!settings.apiKey && !process.env.ANTHROPIC_API_KEY) {
|
|
85
|
+
if (settings.apiType === "anthropic" && !settings.apiKey && !process.env.ANTHROPIC_API_KEY) {
|
|
86
86
|
issues.push({
|
|
87
87
|
type: "missing",
|
|
88
|
-
severity: "
|
|
88
|
+
severity: "info",
|
|
89
|
+
// 降级为 info,不会在启动时自动修复
|
|
89
90
|
description: "No API key configured",
|
|
90
|
-
fix: async () =>
|
|
91
|
-
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
91
|
+
fix: async () => false
|
|
92
|
+
// 不输出任何内容
|
|
94
93
|
});
|
|
95
94
|
}
|
|
96
95
|
} catch (_error) {
|
package/dist/chunks/ccr.mjs
CHANGED
|
@@ -52,10 +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.CvIIxgUS.mjs';
|
|
56
56
|
import './auto-updater.mjs';
|
|
57
57
|
import './version-checker.mjs';
|
|
58
|
-
import '../shared/ccjk.
|
|
58
|
+
import '../shared/ccjk.D9VwKRaD.mjs';
|
|
59
59
|
import './claude-code-config-manager.mjs';
|
|
60
60
|
import './installer.mjs';
|
|
61
61
|
import '../shared/ccjk._dESH4Rk.mjs';
|
|
@@ -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 } from './config.mjs';
|
|
4
|
+
import { a as clearModelEnv, d as applyAdaptiveModelEnv } 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.l; });
|
|
210
210
|
switchToOfficialLogin();
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
@@ -243,19 +243,16 @@ class ClaudeCodeConfigManager {
|
|
|
243
243
|
delete settings.env.ANTHROPIC_BASE_URL;
|
|
244
244
|
}
|
|
245
245
|
const hasAdaptiveModelConfig = Boolean(
|
|
246
|
-
profile.defaultHaikuModel || profile.defaultSonnetModel || profile.defaultOpusModel
|
|
246
|
+
profile.primaryModel || profile.defaultHaikuModel || profile.defaultSonnetModel || profile.defaultOpusModel
|
|
247
247
|
);
|
|
248
248
|
if (hasAdaptiveModelConfig) {
|
|
249
249
|
delete settings.model;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
} else if (profile.primaryModel) {
|
|
257
|
-
delete settings.model;
|
|
258
|
-
settings.env.ANTHROPIC_MODEL = profile.primaryModel;
|
|
250
|
+
applyAdaptiveModelEnv(settings.env, {
|
|
251
|
+
primaryModel: profile.primaryModel,
|
|
252
|
+
defaultHaikuModel: profile.defaultHaikuModel,
|
|
253
|
+
defaultSonnetModel: profile.defaultSonnetModel,
|
|
254
|
+
defaultOpusModel: profile.defaultOpusModel
|
|
255
|
+
});
|
|
259
256
|
} else {
|
|
260
257
|
clearModelEnv(settings.env);
|
|
261
258
|
}
|
|
@@ -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.CvIIxgUS.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 { f 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,11 +12,10 @@ 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",
|
|
15
16
|
"ANTHROPIC_DEFAULT_HAIKU_MODEL",
|
|
16
17
|
"ANTHROPIC_DEFAULT_SONNET_MODEL",
|
|
17
|
-
"ANTHROPIC_DEFAULT_OPUS_MODEL"
|
|
18
|
-
// Deprecated but still cleaned to avoid stale values
|
|
19
|
-
"ANTHROPIC_SMALL_FAST_MODEL"
|
|
18
|
+
"ANTHROPIC_DEFAULT_OPUS_MODEL"
|
|
20
19
|
];
|
|
21
20
|
function clearModelEnv(env) {
|
|
22
21
|
for (const key of MODEL_ENV_KEYS) {
|
|
@@ -24,6 +23,26 @@ function clearModelEnv(env) {
|
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
|
|
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
|
+
}
|
|
45
|
+
|
|
27
46
|
function ensureClaudeDir() {
|
|
28
47
|
ensureDir(CLAUDE_DIR);
|
|
29
48
|
}
|
|
@@ -158,12 +177,12 @@ function updateCustomModel(primaryModel, haikuModel, sonnetModel, opusModel) {
|
|
|
158
177
|
delete settings.model;
|
|
159
178
|
settings.env = settings.env || {};
|
|
160
179
|
clearModelEnv(settings.env);
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
180
|
+
applyAdaptiveModelEnv(settings.env, {
|
|
181
|
+
primaryModel,
|
|
182
|
+
defaultHaikuModel: haikuModel,
|
|
183
|
+
defaultSonnetModel: sonnetModel,
|
|
184
|
+
defaultOpusModel: opusModel
|
|
185
|
+
});
|
|
167
186
|
writeJsonConfig(SETTINGS_FILE, settings);
|
|
168
187
|
}
|
|
169
188
|
function updateDefaultModel(model) {
|
|
@@ -267,6 +286,7 @@ function getExistingCustomModelConfig() {
|
|
|
267
286
|
}
|
|
268
287
|
const {
|
|
269
288
|
ANTHROPIC_MODEL,
|
|
289
|
+
ANTHROPIC_SMALL_FAST_MODEL,
|
|
270
290
|
ANTHROPIC_DEFAULT_HAIKU_MODEL,
|
|
271
291
|
ANTHROPIC_DEFAULT_SONNET_MODEL,
|
|
272
292
|
ANTHROPIC_DEFAULT_OPUS_MODEL
|
|
@@ -276,7 +296,7 @@ function getExistingCustomModelConfig() {
|
|
|
276
296
|
}
|
|
277
297
|
return {
|
|
278
298
|
primaryModel: ANTHROPIC_MODEL,
|
|
279
|
-
haikuModel: ANTHROPIC_DEFAULT_HAIKU_MODEL,
|
|
299
|
+
haikuModel: ANTHROPIC_DEFAULT_HAIKU_MODEL || ANTHROPIC_SMALL_FAST_MODEL,
|
|
280
300
|
sonnetModel: ANTHROPIC_DEFAULT_SONNET_MODEL,
|
|
281
301
|
opusModel: ANTHROPIC_DEFAULT_OPUS_MODEL
|
|
282
302
|
};
|
|
@@ -396,4 +416,4 @@ const config = {
|
|
|
396
416
|
updateDefaultModel: updateDefaultModel
|
|
397
417
|
};
|
|
398
418
|
|
|
399
|
-
export { clearModelEnv as a, backupExistingConfig as b, copyConfigFiles as c,
|
|
419
|
+
export { clearModelEnv as a, backupExistingConfig as b, copyConfigFiles as c, applyAdaptiveModelEnv as d, configureApi as e, applyAiLanguageDirective as f, getExistingApiConfig as g, getExistingModelConfig as h, getExistingCustomModelConfig as i, updateDefaultModel as j, ensureClaudeDir as k, config as l, 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.l; });
|
|
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
|
@@ -7523,6 +7523,9 @@ async function initI18n(language = "zh-CN") {
|
|
|
7523
7523
|
}
|
|
7524
7524
|
return;
|
|
7525
7525
|
}
|
|
7526
|
+
const originalLog = console.log;
|
|
7527
|
+
console.log = () => {
|
|
7528
|
+
};
|
|
7526
7529
|
await i18n.use(Backend).init({
|
|
7527
7530
|
lng: language,
|
|
7528
7531
|
fallbackLng: "en",
|
|
@@ -7577,8 +7580,13 @@ async function initI18n(language = "zh-CN") {
|
|
|
7577
7580
|
keySeparator: ".",
|
|
7578
7581
|
nsSeparator: ":",
|
|
7579
7582
|
// Debugging (disable for clean output)
|
|
7580
|
-
debug: false
|
|
7583
|
+
debug: false,
|
|
7584
|
+
// Suppress i18next promotional messages
|
|
7585
|
+
saveMissing: false,
|
|
7586
|
+
updateMissing: false,
|
|
7587
|
+
missingKeyHandler: false
|
|
7581
7588
|
});
|
|
7589
|
+
console.log = originalLog;
|
|
7582
7590
|
}
|
|
7583
7591
|
function format(template, values) {
|
|
7584
7592
|
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.CvIIxgUS.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, k as ensureClaudeDir, g as getExistingApiConfig, s as switchToOfficialLogin, b as backupExistingConfig, c as copyConfigFiles, f as applyAiLanguageDirective, e as configureApi } from './config.mjs';
|
|
21
|
+
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration } from '../shared/ccjk.D9VwKRaD.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.l; });
|
|
1034
1034
|
updateCustomModel(
|
|
1035
1035
|
options.apiModel || void 0,
|
|
1036
1036
|
options.apiHaikuModel || void 0,
|
|
@@ -52,10 +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.CvIIxgUS.mjs';
|
|
56
56
|
import './auto-updater.mjs';
|
|
57
57
|
import './version-checker.mjs';
|
|
58
|
-
import '../shared/ccjk.
|
|
58
|
+
import '../shared/ccjk.D9VwKRaD.mjs';
|
|
59
59
|
import './claude-code-config-manager.mjs';
|
|
60
60
|
import './installer.mjs';
|
|
61
61
|
import '../shared/ccjk._dESH4Rk.mjs';
|
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 { f as applyAiLanguageDirective, h as getExistingModelConfig, i as getExistingCustomModelConfig, u as updateCustomModel, j as updateDefaultModel, g as getExistingApiConfig, p as promptApiConfigurationAction, e 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.CvIIxgUS.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';
|
|
@@ -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.l; });
|
|
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
|
@@ -47,13 +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.CvIIxgUS.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.
|
|
56
|
+
import '../shared/ccjk.D9VwKRaD.mjs';
|
|
57
57
|
import './claude-code-config-manager.mjs';
|
|
58
58
|
import '../shared/ccjk.BIxuVL3_.mjs';
|
|
59
59
|
import './installer.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.l; });
|
|
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,8 +8,8 @@ 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.D9VwKRaD.mjs';
|
|
12
|
+
import { u as updatePromptOnly, s as selectAndInstallWorkflows } from '../shared/ccjk.CvIIxgUS.mjs';
|
|
13
13
|
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
|
|
14
14
|
import { a as installMcpServices } from '../shared/ccjk.KpFl2RDA.mjs';
|
|
15
15
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
package/dist/cli.mjs
CHANGED
|
File without changes
|
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 { l 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';
|
|
@@ -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, e as configureApi, s as switchToOfficialLogin, b as backupExistingConfig, f 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';
|
|
@@ -40,12 +40,9 @@ function migrateSettingsForTokenRetrieval() {
|
|
|
40
40
|
modified = true;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
settings.env.
|
|
45
|
-
|
|
46
|
-
if (hasAdaptiveModelDefaults && settings.env.ANTHROPIC_MODEL) {
|
|
47
|
-
delete settings.env.ANTHROPIC_MODEL;
|
|
48
|
-
result.changes.push("Removed stale ANTHROPIC_MODEL override so Claude Code can use adaptive Haiku/Sonnet/Opus routing");
|
|
43
|
+
if (settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL && !settings.env.ANTHROPIC_SMALL_FAST_MODEL) {
|
|
44
|
+
settings.env.ANTHROPIC_SMALL_FAST_MODEL = settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
|
|
45
|
+
result.changes.push("Restored ANTHROPIC_SMALL_FAST_MODEL from defaultHaikuModel so Claude Code can auto-route lightweight requests again");
|
|
49
46
|
modified = true;
|
|
50
47
|
}
|
|
51
48
|
}
|
|
@@ -56,20 +53,11 @@ function migrateSettingsForTokenRetrieval() {
|
|
|
56
53
|
}
|
|
57
54
|
const profileConfig = ClaudeCodeConfigManager.readConfig();
|
|
58
55
|
if (profileConfig) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
);
|
|
64
|
-
if (hasAdaptiveModelDefaults && profile.primaryModel) {
|
|
65
|
-
delete profile.primaryModel;
|
|
66
|
-
result.changes.push(`Removed stale primaryModel override from Claude Code profile "${profile.name || profileId}"`);
|
|
67
|
-
profileModified = true;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
if (profileModified) {
|
|
71
|
-
ClaudeCodeConfigManager.writeConfig(profileConfig);
|
|
72
|
-
modified = true;
|
|
56
|
+
const hasAdaptiveProfiles = Object.entries(profileConfig.profiles).some(
|
|
57
|
+
([_profileId, profile]) => Boolean(profile.primaryModel || profile.defaultHaikuModel || profile.defaultSonnetModel || profile.defaultOpusModel)
|
|
58
|
+
);
|
|
59
|
+
if (hasAdaptiveProfiles) {
|
|
60
|
+
result.changes.push("Preserved profile-level primaryModel values; migration now keeps primary routing and restores fast-model compatibility instead of deleting them");
|
|
73
61
|
}
|
|
74
62
|
}
|
|
75
63
|
if (!modified) {
|
|
@@ -104,12 +92,12 @@ function needsMigration() {
|
|
|
104
92
|
const hasAdaptiveModelDefaults = Boolean(
|
|
105
93
|
settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL || settings.env.ANTHROPIC_DEFAULT_SONNET_MODEL || settings.env.ANTHROPIC_DEFAULT_OPUS_MODEL
|
|
106
94
|
);
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return Boolean(hasProblematicVar || hasExcessiveTimeout || hasPinnedAdaptiveOverride || hasProfilePinnedAdaptiveOverride);
|
|
95
|
+
const isMissingFastModelCompat = Boolean(
|
|
96
|
+
settings.env.ANTHROPIC_DEFAULT_HAIKU_MODEL && !settings.env.ANTHROPIC_SMALL_FAST_MODEL
|
|
97
|
+
);
|
|
98
|
+
const hasPinnedAdaptiveOverride = Boolean(settings.model && hasAdaptiveModelDefaults);
|
|
99
|
+
const hasProfilePinnedAdaptiveOverride = false;
|
|
100
|
+
return Boolean(hasProblematicVar || hasExcessiveTimeout || hasPinnedAdaptiveOverride || hasProfilePinnedAdaptiveOverride || isMissingFastModelCompat);
|
|
113
101
|
} catch {
|
|
114
102
|
return false;
|
|
115
103
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccjk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "13.3.
|
|
4
|
+
"version": "13.3.9",
|
|
5
|
+
"packageManager": "pnpm@10.17.1",
|
|
5
6
|
"description": "CLI toolkit for Claude Code and Codex setup. Simplifies MCP service installation, API configuration, workflow management, and multi-provider support with guided interactive setup.",
|
|
6
7
|
"author": {
|
|
7
8
|
"name": "CCJK Team",
|
|
@@ -80,69 +81,6 @@
|
|
|
80
81
|
"engines": {
|
|
81
82
|
"node": ">=20"
|
|
82
83
|
},
|
|
83
|
-
"dependencies": {
|
|
84
|
-
"better-sqlite3": "^12.6.2",
|
|
85
|
-
"fdir": "^6.5.0",
|
|
86
|
-
"globby": "^14.1.0",
|
|
87
|
-
"ioredis": "^5.9.3",
|
|
88
|
-
"node-cron": "^4.2.1",
|
|
89
|
-
"sql.js": "^1.14.0",
|
|
90
|
-
"tar": "^7.5.9",
|
|
91
|
-
"tinyglobby": "^0.2.15",
|
|
92
|
-
"web-tree-sitter": "^0.26.5"
|
|
93
|
-
},
|
|
94
|
-
"devDependencies": {
|
|
95
|
-
"@antfu/eslint-config": "^5.4.1",
|
|
96
|
-
"@anthropic-ai/sdk": "^0.52.0",
|
|
97
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
98
|
-
"@types/fs-extra": "^11.0.4",
|
|
99
|
-
"@types/inquirer": "^9.0.9",
|
|
100
|
-
"@types/node": "^22.18.6",
|
|
101
|
-
"@types/node-cron": "^3.0.11",
|
|
102
|
-
"@types/semver": "^7.7.1",
|
|
103
|
-
"@types/uuid": "^11.0.0",
|
|
104
|
-
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
105
|
-
"@typescript-eslint/parser": "^6.0.0",
|
|
106
|
-
"@vitest/coverage-v8": "^3.2.4",
|
|
107
|
-
"@vitest/ui": "^3.2.4",
|
|
108
|
-
"ansis": "^4.2.0",
|
|
109
|
-
"cac": "^6.7.14",
|
|
110
|
-
"chokidar": "^4.0.3",
|
|
111
|
-
"concurrently": "^9.2.1",
|
|
112
|
-
"consola": "^3.4.2",
|
|
113
|
-
"dayjs": "^1.11.19",
|
|
114
|
-
"eslint": "^9.36.0",
|
|
115
|
-
"eslint-plugin-format": "^1.4.0",
|
|
116
|
-
"find-up-simple": "^1.0.1",
|
|
117
|
-
"fs-extra": "^11.3.3",
|
|
118
|
-
"gray-matter": "^4.0.3",
|
|
119
|
-
"handlebars": "^4.7.8",
|
|
120
|
-
"husky": "^9.1.7",
|
|
121
|
-
"i18next": "^25.8.13",
|
|
122
|
-
"i18next-fs-backend": "^2.6.1",
|
|
123
|
-
"inquirer": "^12.9.6",
|
|
124
|
-
"inquirer-toggle": "^1.0.1",
|
|
125
|
-
"lint-staged": "^16.2.7",
|
|
126
|
-
"lowdb": "^7.0.1",
|
|
127
|
-
"nanoid": "^5.1.6",
|
|
128
|
-
"ofetch": "^1.5.1",
|
|
129
|
-
"ohash": "^1.1.4",
|
|
130
|
-
"ora": "^8.2.0",
|
|
131
|
-
"pathe": "^2.0.3",
|
|
132
|
-
"pkgroll": "^2.26.3",
|
|
133
|
-
"prettier": "^3.8.1",
|
|
134
|
-
"semver": "^7.7.4",
|
|
135
|
-
"shx": "^0.4.0",
|
|
136
|
-
"smol-toml": "^1.6.0",
|
|
137
|
-
"tinyexec": "^1.0.2",
|
|
138
|
-
"trash": "^10.1.0",
|
|
139
|
-
"tsx": "^4.21.0",
|
|
140
|
-
"tweetnacl": "^1.0.3",
|
|
141
|
-
"typescript": "^5.9.3",
|
|
142
|
-
"unbuild": "^3.6.1",
|
|
143
|
-
"uuid": "^11.1.0",
|
|
144
|
-
"vitest": "^3.2.4"
|
|
145
|
-
},
|
|
146
84
|
"scripts": {
|
|
147
85
|
"dev": "tsx ./src/cli.ts",
|
|
148
86
|
"build": "unbuild",
|
|
@@ -150,6 +88,7 @@
|
|
|
150
88
|
"typecheck": "tsc --noEmit",
|
|
151
89
|
"release:verify": "node scripts/release-verify.mjs",
|
|
152
90
|
"release:verify:full": "node scripts/release-verify.mjs --with-tests",
|
|
91
|
+
"prepublishOnly": "node scripts/validate-prepublish.mjs && pnpm contract:check && pnpm build",
|
|
153
92
|
"lint": "eslint",
|
|
154
93
|
"lint:fix": "eslint --fix",
|
|
155
94
|
"test": "vitest",
|
|
@@ -171,6 +110,7 @@
|
|
|
171
110
|
"test:integration:run": "NODE_ENV=test vitest run --config vitest.integration.config.ts",
|
|
172
111
|
"test:integration:ui": "NODE_ENV=test vitest --config vitest.integration.config.ts --ui",
|
|
173
112
|
"test:integration:coverage": "NODE_ENV=test vitest run --config vitest.integration.config.ts --coverage",
|
|
113
|
+
"prepare": "husky",
|
|
174
114
|
"format": "prettier --write src/**/*.ts",
|
|
175
115
|
"prepublish:fix": "node scripts/fix-package-catalog.mjs",
|
|
176
116
|
"cleanup": "node scripts/cleanup.js",
|
|
@@ -205,5 +145,68 @@
|
|
|
205
145
|
"i18n:check": "tsx scripts/check-i18n.ts",
|
|
206
146
|
"i18n:report": "tsx scripts/check-i18n.ts --report",
|
|
207
147
|
"contract:check": "node scripts/check-remote-contract.mjs"
|
|
148
|
+
},
|
|
149
|
+
"dependencies": {
|
|
150
|
+
"better-sqlite3": "^12.6.2",
|
|
151
|
+
"fdir": "^6.5.0",
|
|
152
|
+
"globby": "^14.1.0",
|
|
153
|
+
"ioredis": "^5.9.3",
|
|
154
|
+
"node-cron": "^4.2.1",
|
|
155
|
+
"sql.js": "^1.14.0",
|
|
156
|
+
"tar": "^7.5.9",
|
|
157
|
+
"tinyglobby": "^0.2.15",
|
|
158
|
+
"web-tree-sitter": "^0.26.5"
|
|
159
|
+
},
|
|
160
|
+
"devDependencies": {
|
|
161
|
+
"@antfu/eslint-config": "^5.4.1",
|
|
162
|
+
"@anthropic-ai/sdk": "^0.52.0",
|
|
163
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
164
|
+
"@types/fs-extra": "^11.0.4",
|
|
165
|
+
"@types/inquirer": "^9.0.9",
|
|
166
|
+
"@types/node": "^22.18.6",
|
|
167
|
+
"@types/node-cron": "^3.0.11",
|
|
168
|
+
"@types/semver": "^7.7.1",
|
|
169
|
+
"@types/uuid": "^11.0.0",
|
|
170
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
171
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
172
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
173
|
+
"@vitest/ui": "^3.2.4",
|
|
174
|
+
"ansis": "^4.2.0",
|
|
175
|
+
"cac": "^6.7.14",
|
|
176
|
+
"chokidar": "^4.0.3",
|
|
177
|
+
"concurrently": "^9.2.1",
|
|
178
|
+
"consola": "^3.4.2",
|
|
179
|
+
"dayjs": "^1.11.19",
|
|
180
|
+
"eslint": "^9.36.0",
|
|
181
|
+
"eslint-plugin-format": "^1.4.0",
|
|
182
|
+
"find-up-simple": "^1.0.1",
|
|
183
|
+
"fs-extra": "^11.3.3",
|
|
184
|
+
"gray-matter": "^4.0.3",
|
|
185
|
+
"handlebars": "^4.7.8",
|
|
186
|
+
"husky": "^9.1.7",
|
|
187
|
+
"i18next": "^25.8.13",
|
|
188
|
+
"i18next-fs-backend": "^2.6.1",
|
|
189
|
+
"inquirer": "^12.9.6",
|
|
190
|
+
"inquirer-toggle": "^1.0.1",
|
|
191
|
+
"lint-staged": "^16.2.7",
|
|
192
|
+
"lowdb": "^7.0.1",
|
|
193
|
+
"nanoid": "^5.1.6",
|
|
194
|
+
"ofetch": "^1.5.1",
|
|
195
|
+
"ohash": "^1.1.4",
|
|
196
|
+
"ora": "^8.2.0",
|
|
197
|
+
"pathe": "^2.0.3",
|
|
198
|
+
"pkgroll": "^2.26.3",
|
|
199
|
+
"prettier": "^3.8.1",
|
|
200
|
+
"semver": "^7.7.4",
|
|
201
|
+
"shx": "^0.4.0",
|
|
202
|
+
"smol-toml": "^1.6.0",
|
|
203
|
+
"tinyexec": "^1.0.2",
|
|
204
|
+
"trash": "^10.1.0",
|
|
205
|
+
"tsx": "^4.21.0",
|
|
206
|
+
"tweetnacl": "^1.0.3",
|
|
207
|
+
"typescript": "^5.9.3",
|
|
208
|
+
"unbuild": "^3.6.1",
|
|
209
|
+
"uuid": "^11.1.0",
|
|
210
|
+
"vitest": "^3.2.4"
|
|
208
211
|
}
|
|
209
|
-
}
|
|
212
|
+
}
|