ccjk 14.0.1 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ import { c as contextLoader, S as SessionIntelligence, g as getGlobalConvoyManag
5
5
  import { EventEmitter } from 'node:events';
6
6
  import { c as resolve } from '../shared/ccjk.bQ7Dh1g4.mjs';
7
7
  import { e as executionTracer } from '../shared/ccjk.DlTXS9rP.mjs';
8
- import { t as taskPersistence } from '../shared/ccjk.BOO14f66.mjs';
8
+ import { t as taskPersistence } from '../shared/ccjk.CNhnT6uQ.mjs';
9
9
  import '../shared/ccjk.BAGoDD49.mjs';
10
10
  import 'node:crypto';
11
11
  import 'node:process';
@@ -9,6 +9,8 @@ import 'node:process';
9
9
  import 'node:url';
10
10
  import '../shared/ccjk.bQ7Dh1g4.mjs';
11
11
  import '../shared/ccjk.gDEDGD_t.mjs';
12
+ import './config.mjs';
13
+ import '../shared/ccjk.RyizuzOI.mjs';
12
14
  import './index6.mjs';
13
15
  import 'node:readline';
14
16
  import 'stream';
@@ -25,24 +27,22 @@ import 'node:crypto';
25
27
  import 'buffer';
26
28
  import 'string_decoder';
27
29
  import './constants.mjs';
28
- import './ccjk-config.mjs';
29
- import '../shared/ccjk.BBtCGd_g.mjs';
30
- import './index3.mjs';
30
+ import './json-config.mjs';
31
31
  import './fs-operations.mjs';
32
32
  import 'node:fs/promises';
33
- import './json-config.mjs';
34
- import '../shared/ccjk.RyizuzOI.mjs';
35
- import './codex.mjs';
36
- import './index8.mjs';
37
- import '../shared/ccjk.DeWpAShp.mjs';
38
- import '../shared/ccjk.CxpGa6MC.mjs';
33
+ import './platform.mjs';
39
34
  import './main.mjs';
40
35
  import 'module';
41
36
  import 'node:child_process';
42
37
  import 'node:stream';
43
- import './config.mjs';
44
- import './platform.mjs';
45
38
  import '../shared/ccjk.DScm_NnL.mjs';
39
+ import './ccjk-config.mjs';
40
+ import '../shared/ccjk.BBtCGd_g.mjs';
41
+ import './index3.mjs';
42
+ import './codex.mjs';
43
+ import './index8.mjs';
44
+ import '../shared/ccjk.DeWpAShp.mjs';
45
+ import '../shared/ccjk.CxpGa6MC.mjs';
46
46
  import '../shared/ccjk.BFQ7yr5S.mjs';
47
47
  import './prompts.mjs';
48
48
  import '../shared/ccjk.DZ2LLOa-.mjs';
@@ -58,7 +58,7 @@ async function syncMyclaudeProfilesIfNeeded() {
58
58
  if (zcfConfig?.codeToolType !== "myclaude") {
59
59
  return;
60
60
  }
61
- const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.E; });
61
+ const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.F; });
62
62
  syncMyclaudeProviderProfilesFromCurrentClaudeConfig();
63
63
  }
64
64
  async function configureIncrementalManagement() {
@@ -1001,24 +1001,27 @@ function detectMyclaudeProviderMode(profile) {
1001
1001
  return "official";
1002
1002
  }
1003
1003
  function describeMyclaudeProviderProfile(profile) {
1004
- const mode = detectMyclaudeProviderMode({
1004
+ const mode = profile.mode || detectMyclaudeProviderMode({
1005
+ authType: profile.authType,
1006
+ baseUrl: profile.baseUrl
1007
+ });
1008
+ return { mode };
1009
+ }
1010
+ function buildMyclaudeProviderPresentation(profile) {
1011
+ const mode = profile.mode || detectMyclaudeProviderMode({
1005
1012
  authType: profile.authType,
1006
1013
  baseUrl: profile.baseUrl
1007
1014
  });
1008
1015
  const hasAdaptiveRouting = Boolean(profile.defaultHaikuModel || profile.defaultSonnetModel || profile.defaultOpusModel);
1009
1016
  const hasPrimaryModel = Boolean(profile.primaryModel || profile.model);
1010
- const routeFamily = mode === "ccr-proxy" ? "CCR-proxy" : mode === "openai-native" ? "OpenAI-native" : "Anthropic-native";
1011
- const pathLabel = mode === "ccr-proxy" ? profile.baseUrl ? `Claude-family route through CCR \xB7 ${profile.baseUrl}` : "Claude-family route through CCR" : mode === "openai-native" ? profile.baseUrl ? `OpenAI-family route through a compatible gateway \xB7 ${profile.baseUrl}` : "OpenAI-family route through a compatible gateway" : "Official Anthropic route";
1012
- const routingStrategy = hasAdaptiveRouting ? "Custom routing" : hasPrimaryModel ? "Single-model override" : "Native runtime default";
1013
- const strategyNote = hasAdaptiveRouting ? "Advanced custom routing. Validate carefully when mixing model families." : hasPrimaryModel ? "Primary model is pinned for the active profile." : "Runtime follows the official provider defaults.";
1017
+ const modeLabel = mode === "ccr-proxy" ? "CCR-proxy" : mode === "openai-native" ? "OpenAI-native" : "Anthropic-native";
1018
+ const routeLabel = mode === "ccr-proxy" ? profile.baseUrl ? `Claude-family route through CCR \xB7 ${profile.baseUrl}` : "Claude-family route through CCR" : mode === "openai-native" ? profile.baseUrl ? `OpenAI-family route through a compatible gateway \xB7 ${profile.baseUrl}` : "OpenAI-family route through a compatible gateway" : "Official Anthropic route";
1019
+ const strategyLabel = hasAdaptiveRouting ? "Custom routing \xB7 Advanced custom routing. Validate carefully when mixing model families." : hasPrimaryModel ? "Single-model override \xB7 Primary model is pinned for the active profile." : "Native runtime default \xB7 Runtime follows the official provider defaults.";
1014
1020
  return {
1015
- mode,
1016
- source: "Imported from ccjk",
1017
- sourceDetail: "Reusable profile imported from the compatible ccjk configuration.",
1018
- routeFamily,
1019
- pathLabel,
1020
- routingStrategy,
1021
- strategyNote
1021
+ modeLabel,
1022
+ sourceLabel: "Imported from ccjk \xB7 Reusable profile imported from the compatible ccjk configuration.",
1023
+ routeLabel,
1024
+ strategyLabel
1022
1025
  };
1023
1026
  }
1024
1027
  function toMyclaudeProviderProfile(profile, existing) {
@@ -1038,11 +1041,7 @@ function toMyclaudeProviderProfile(profile, existing) {
1038
1041
  ...describeMyclaudeProviderProfile({
1039
1042
  authType: profile.authType,
1040
1043
  baseUrl: profile.baseUrl,
1041
- model: profile.primaryModel,
1042
- primaryModel: profile.primaryModel,
1043
- defaultHaikuModel: profile.defaultHaikuModel,
1044
- defaultSonnetModel: profile.defaultSonnetModel,
1045
- defaultOpusModel: profile.defaultOpusModel
1044
+ mode: existing?.mode
1046
1045
  })
1047
1046
  };
1048
1047
  }
@@ -1132,6 +1131,7 @@ const claudeConfig = {
1132
1131
  addCompletedOnboarding: addCompletedOnboarding,
1133
1132
  backupMcpConfig: backupMcpConfig,
1134
1133
  buildMcpServerConfig: buildMcpServerConfig,
1134
+ buildMyclaudeProviderPresentation: buildMyclaudeProviderPresentation,
1135
1135
  clearMyclaudeProviderProfiles: clearMyclaudeProviderProfiles,
1136
1136
  describeMyclaudeProviderProfile: describeMyclaudeProviderProfile,
1137
1137
  ensureApiKeyApproved: ensureApiKeyApproved,
@@ -1577,4 +1577,4 @@ const config = {
1577
1577
  updateDefaultModel: updateDefaultModel
1578
1578
  };
1579
1579
 
1580
- export { syncMcpPermissions as A, config as B, ClaudeCodeConfigManager as C, claudeCodeConfigManager as D, claudeConfig as E, getExistingCustomModelConfig as a, backupExistingConfig as b, updateDefaultModel as c, backupMcpConfig as d, buildMcpServerConfig as e, fixWindowsMcpConfig as f, getExistingModelConfig as g, getExistingApiConfig as h, configureApi as i, syncMyclaudeProviderProfilesFromClaudeConfig as j, copyConfigFiles as k, setPrimaryApiKey as l, mergeMcpServers as m, addCompletedOnboarding as n, deepMerge as o, promptApiConfigurationAction as p, switchToOfficialLogin as q, readMcpConfig as r, setMyclaudeActiveProviderProfile as s, applyAiLanguageDirective as t, updateCustomModel as u, setMyclaudeProviderProfiles as v, writeMcpConfig as w, ensureClaudeDir as x, clearMyclaudeProviderProfiles as y, replaceMcpServers as z };
1580
+ export { syncMcpPermissions as A, buildMyclaudeProviderPresentation as B, ClaudeCodeConfigManager as C, config as D, claudeCodeConfigManager as E, claudeConfig as F, getExistingCustomModelConfig as a, backupExistingConfig as b, updateDefaultModel as c, backupMcpConfig as d, buildMcpServerConfig as e, fixWindowsMcpConfig as f, getExistingModelConfig as g, getExistingApiConfig as h, configureApi as i, syncMyclaudeProviderProfilesFromClaudeConfig as j, copyConfigFiles as k, setPrimaryApiKey as l, mergeMcpServers as m, addCompletedOnboarding as n, deepMerge as o, promptApiConfigurationAction as p, switchToOfficialLogin as q, readMcpConfig as r, setMyclaudeActiveProviderProfile as s, applyAiLanguageDirective as t, updateCustomModel as u, setMyclaudeProviderProfiles as v, writeMcpConfig as w, ensureClaudeDir as x, clearMyclaudeProviderProfiles as y, replaceMcpServers as z };
@@ -417,7 +417,7 @@ async function setupCcrConfiguration() {
417
417
  console.log(a.yellow(`${i18n.t("ccr:keepingExistingConfig")}`));
418
418
  await configureCcrProxy(existingConfig);
419
419
  try {
420
- const { manageApiKeyApproval } = await import('./config.mjs').then(function (n) { return n.E; });
420
+ const { manageApiKeyApproval } = await import('./config.mjs').then(function (n) { return n.F; });
421
421
  const apiKey = existingConfig.APIKEY || "sk-ccjk-x-ccr";
422
422
  manageApiKeyApproval(apiKey);
423
423
  console.log(a.green(`\u2714 ${i18n.t("ccr:apiKeyApprovalSuccess")}`));
@@ -451,7 +451,7 @@ async function setupCcrConfiguration() {
451
451
  console.error(a.red(i18n.t("errors:failedToSetOnboarding")), error);
452
452
  }
453
453
  try {
454
- const { manageApiKeyApproval } = await import('./config.mjs').then(function (n) { return n.E; });
454
+ const { manageApiKeyApproval } = await import('./config.mjs').then(function (n) { return n.F; });
455
455
  const apiKey = config.APIKEY || "sk-ccjk-x-ccr";
456
456
  manageApiKeyApproval(apiKey);
457
457
  console.log(a.green(`\u2714 ${i18n.t("ccr:apiKeyApprovalSuccess")}`));
@@ -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.B; });
817
+ const { copyConfigFiles } = await import('./config.mjs').then(function (n) { return n.D; });
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)));
@@ -1,3 +1,4 @@
1
+ import { B as buildMyclaudeProviderPresentation } from './config.mjs';
1
2
  import a from './index5.mjs';
2
3
  import { i as inquirer } from './index6.mjs';
3
4
  import { CLOUD_ENDPOINTS, CCJK_CONFIG_DIR, SUPPORTED_LANGS, LANG_LABELS, CODE_TOOL_BANNERS, isCodeToolType, DEFAULT_CODE_TOOL_TYPE } from './constants.mjs';
@@ -4406,6 +4407,7 @@ function buildMyclaudeRuntimeSummary(syncResult) {
4406
4407
  };
4407
4408
  }
4408
4409
  const profile = syncResult.activeProfile;
4410
+ const presentation = buildMyclaudeProviderPresentation(profile);
4409
4411
  const primaryModel = typeof profile.primaryModel === "string" ? profile.primaryModel : profile.model;
4410
4412
  const fastModel = typeof profile.defaultHaikuModel === "string" ? profile.defaultHaikuModel : profile.fastModel;
4411
4413
  const sonnetModel = typeof profile.defaultSonnetModel === "string" ? profile.defaultSonnetModel : void 0;
@@ -4419,10 +4421,7 @@ function buildMyclaudeRuntimeSummary(syncResult) {
4419
4421
  return {
4420
4422
  runtimeLabel: "myclaude",
4421
4423
  profileLabel: `${profile.name} (${syncResult.activeProfileId || profile.id})`,
4422
- modeLabel: profile.routeFamily,
4423
- sourceLabel: [profile.source, profile.sourceDetail].filter(Boolean).join(" \xB7 ") || void 0,
4424
- routeLabel: profile.pathLabel,
4425
- strategyLabel: [profile.routingStrategy, profile.strategyNote].filter(Boolean).join(" \xB7 ") || void 0,
4424
+ ...presentation,
4426
4425
  modelLabel: modelParts.join(" \xB7 ") || void 0
4427
4426
  };
4428
4427
  }
@@ -5321,10 +5320,6 @@ async function showMainMenu(options = {}) {
5321
5320
  console.log(a.green(`\u2714 Switched to ${resolvedType}`));
5322
5321
  }
5323
5322
  }
5324
- if (resolvedType === "myclaude") {
5325
- const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.E; });
5326
- myclaudeRuntimeSyncResult = syncMyclaudeProviderProfilesFromCurrentClaudeConfig();
5327
- }
5328
5323
  } catch (err) {
5329
5324
  const errorMessage = err instanceof Error ? err.message : String(err);
5330
5325
  console.error(a.yellow(errorMessage));
@@ -5334,7 +5329,7 @@ async function showMainMenu(options = {}) {
5334
5329
  const codeTool = getCurrentCodeTool();
5335
5330
  displayBannerWithInfo(CODE_TOOL_BANNERS[codeTool] || "CCJK");
5336
5331
  if (codeTool === "myclaude") {
5337
- const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.E; });
5332
+ const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.F; });
5338
5333
  myclaudeRuntimeSyncResult = syncMyclaudeProviderProfilesFromCurrentClaudeConfig();
5339
5334
  }
5340
5335
  const result = await showProgressiveMenu(codeTool, myclaudeRuntimeSyncResult);
@@ -768,7 +768,7 @@ async function validateApiConfigs(configs) {
768
768
  }
769
769
  }
770
770
  async function handleClaudeCodeConfigs(configs) {
771
- const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.D; });
771
+ const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.E; });
772
772
  const addedProfiles = [];
773
773
  for (const config of configs) {
774
774
  if (config.type === "ccr_proxy") {
@@ -859,7 +859,7 @@ async function handleCodexConfigs(configs) {
859
859
  }
860
860
  async function saveSingleConfigToToml(apiConfig, provider, options) {
861
861
  try {
862
- const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.D; });
862
+ const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.E; });
863
863
  const profile = await convertSingleConfigToProfile(apiConfig, provider, options);
864
864
  const result = await ClaudeCodeConfigManager.addProfile(profile);
865
865
  if (result.success) {
@@ -885,7 +885,7 @@ async function saveSingleConfigToToml(apiConfig, provider, options) {
885
885
  }
886
886
  }
887
887
  async function buildClaudeCodeProfile(params) {
888
- const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.D; });
888
+ const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.E; });
889
889
  let {
890
890
  url: baseUrl,
891
891
  authType,
@@ -1534,7 +1534,7 @@ async function init(options = {}) {
1534
1534
  const hasModelParams = options.apiModel || options.apiHaikuModel || options.apiSonnetModel || options.apiOpusModel;
1535
1535
  if (hasModelParams && action !== "docs-only" && (codeToolType === "claude-code" || codeToolType === "myclaude")) {
1536
1536
  if (options.skipPrompt) {
1537
- const { updateCustomModel } = await import('./config.mjs').then(function (n) { return n.B; });
1537
+ const { updateCustomModel } = await import('./config.mjs').then(function (n) { return n.D; });
1538
1538
  updateCustomModel(
1539
1539
  options.apiModel || void 0,
1540
1540
  options.apiHaikuModel || void 0,
@@ -224,7 +224,7 @@ async function getInstallationStatus(codeType = "claude-code") {
224
224
  async function getInstallMethodFromConfig(codeType) {
225
225
  try {
226
226
  if (isClaudeFamilyCodeTool(codeType)) {
227
- const { readMcpConfig } = await import('./config.mjs').then(function (n) { return n.E; });
227
+ const { readMcpConfig } = await import('./config.mjs').then(function (n) { return n.F; });
228
228
  const config = readMcpConfig();
229
229
  return config?.installMethod || null;
230
230
  }
@@ -348,7 +348,7 @@ async function uninstallCodeTool(codeType) {
348
348
  async function setInstallMethod(method, codeType = "claude-code") {
349
349
  try {
350
350
  if (isClaudeFamilyCodeTool(codeType)) {
351
- const { readMcpConfig, writeMcpConfig } = await import('./config.mjs').then(function (n) { return n.E; });
351
+ const { readMcpConfig, writeMcpConfig } = await import('./config.mjs').then(function (n) { return n.F; });
352
352
  let config = readMcpConfig();
353
353
  if (!config) {
354
354
  config = { mcpServers: {} };
@@ -575,7 +575,7 @@ function getServiceTier(serviceId, tiers) {
575
575
  return caseInsensitiveMatch?.[1] || "ondemand";
576
576
  }
577
577
  async function mcpStatus(options = {}) {
578
- const { readMcpConfig } = await import('./config.mjs').then(function (n) { return n.E; });
578
+ const { readMcpConfig } = await import('./config.mjs').then(function (n) { return n.F; });
579
579
  const { readCodexConfig } = await import('./codex.mjs').then(function (n) { return n.q; });
580
580
  const { checkMcpPerformance, formatPerformanceWarning } = await import('./mcp-performance.mjs').then(function (n) { return n.e; });
581
581
  const { MCP_SERVICE_TIERS } = await import('./mcp-performance.mjs').then(function (n) { return n.m; });
@@ -1,3 +1,3 @@
1
- const version = "14.0.1";
1
+ const version = "14.1.0";
2
2
 
3
3
  export { version };