ccjk 9.5.6 → 9.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/chunks/agent.mjs +1 -1
  2. package/dist/chunks/api-providers.mjs +1 -1
  3. package/dist/chunks/api.mjs +3 -3
  4. package/dist/chunks/auto-bootstrap.mjs +1 -1
  5. package/dist/chunks/auto-updater.mjs +1 -1
  6. package/dist/chunks/boost.mjs +160 -0
  7. package/dist/chunks/ccjk-agents.mjs +1 -1
  8. package/dist/chunks/ccjk-all.mjs +1 -1
  9. package/dist/chunks/ccjk-config.mjs +1 -1
  10. package/dist/chunks/ccjk-hooks.mjs +1 -1
  11. package/dist/chunks/ccjk-mcp.mjs +2 -2
  12. package/dist/chunks/ccjk-setup.mjs +1 -1
  13. package/dist/chunks/ccjk-skills.mjs +1 -1
  14. package/dist/chunks/ccr.mjs +25 -30
  15. package/dist/chunks/ccu.mjs +1 -1
  16. package/dist/chunks/check-updates.mjs +3 -4
  17. package/dist/chunks/claude-code-config-manager.mjs +7 -7
  18. package/dist/chunks/claude-code-incremental-manager.mjs +2 -2
  19. package/dist/chunks/claude-config.mjs +4 -4
  20. package/dist/chunks/claude-wrapper.mjs +2 -2
  21. package/dist/chunks/codex-config-switch.mjs +4 -5
  22. package/dist/chunks/codex-provider-manager.mjs +2 -3
  23. package/dist/chunks/codex-uninstaller.mjs +2 -2
  24. package/dist/chunks/codex.mjs +207 -6
  25. package/dist/chunks/commands.mjs +391 -88
  26. package/dist/chunks/commands2.mjs +88 -391
  27. package/dist/chunks/completion.mjs +1 -1
  28. package/dist/chunks/config-consolidator.mjs +2 -2
  29. package/dist/chunks/config-switch.mjs +3 -4
  30. package/dist/chunks/config.mjs +78 -7
  31. package/dist/chunks/config2.mjs +400 -410
  32. package/dist/chunks/config3.mjs +410 -400
  33. package/dist/chunks/constants.mjs +1 -1
  34. package/dist/chunks/doctor.mjs +4 -4
  35. package/dist/chunks/features.mjs +24 -17
  36. package/dist/chunks/index.mjs +178 -7
  37. package/dist/chunks/index2.mjs +1162 -169
  38. package/dist/chunks/index3.mjs +910 -1076
  39. package/dist/chunks/index4.mjs +137 -947
  40. package/dist/chunks/index5.mjs +635 -167
  41. package/dist/chunks/init.mjs +141 -99
  42. package/dist/chunks/installer.mjs +147 -649
  43. package/dist/chunks/installer2.mjs +649 -147
  44. package/dist/chunks/interview.mjs +2 -2
  45. package/dist/chunks/marketplace.mjs +1 -1
  46. package/dist/chunks/mcp.mjs +1058 -17
  47. package/dist/chunks/menu.mjs +147 -56
  48. package/dist/chunks/monitor.mjs +2 -2
  49. package/dist/chunks/notification.mjs +1 -1
  50. package/dist/chunks/onboarding.mjs +2 -2
  51. package/dist/chunks/package.mjs +2 -210
  52. package/dist/chunks/permission-manager.mjs +2 -2
  53. package/dist/chunks/permissions.mjs +1 -1
  54. package/dist/chunks/platform.mjs +1 -1
  55. package/dist/chunks/plugin.mjs +1 -1
  56. package/dist/chunks/prompts.mjs +1 -1
  57. package/dist/chunks/providers.mjs +1 -1
  58. package/dist/chunks/quick-setup.mjs +16 -20
  59. package/dist/chunks/silent-updater.mjs +1 -1
  60. package/dist/chunks/simple-config.mjs +2 -2
  61. package/dist/chunks/skill.mjs +1 -1
  62. package/dist/chunks/skills-sync.mjs +1 -1
  63. package/dist/chunks/skills.mjs +1 -1
  64. package/dist/chunks/startup.mjs +1 -1
  65. package/dist/chunks/stats.mjs +1 -1
  66. package/dist/chunks/status.mjs +159 -0
  67. package/dist/chunks/team.mjs +1 -1
  68. package/dist/chunks/thinking.mjs +2 -2
  69. package/dist/chunks/uninstall.mjs +6 -6
  70. package/dist/chunks/update.mjs +6 -9
  71. package/dist/chunks/upgrade-manager.mjs +2 -2
  72. package/dist/chunks/version-checker.mjs +3 -3
  73. package/dist/chunks/vim.mjs +1 -1
  74. package/dist/chunks/workflows.mjs +616 -215
  75. package/dist/cli.mjs +70 -121
  76. package/dist/index.d.mts +17 -1482
  77. package/dist/index.d.ts +17 -1482
  78. package/dist/index.mjs +950 -4740
  79. package/dist/shared/{ccjk.zCqdxT2Y.mjs → ccjk.Br91zBIG.mjs} +2 -2
  80. package/dist/shared/ccjk.CSkyCZIM.mjs +638 -0
  81. package/dist/shared/{ccjk.BKoi8-Hy.mjs → ccjk.DE91nClQ.mjs} +1 -1
  82. package/dist/shared/{ccjk.f40us0yY.mjs → ccjk.DvIrK0wz.mjs} +2 -2
  83. package/dist/shared/ccjk.LsPZ2PYo.mjs +1048 -0
  84. package/dist/shared/{ccjk.DRweXU5F.mjs → ccjk.q1koQxEE.mjs} +2 -2
  85. package/package.json +1 -1
  86. package/templates/claude-code/common/settings.json +15 -111
  87. package/dist/chunks/api-adapter.mjs +0 -180
  88. package/dist/chunks/cli.mjs +0 -2227
  89. package/dist/chunks/context-menu.mjs +0 -913
  90. package/dist/chunks/hooks-sync.mjs +0 -1627
  91. package/dist/chunks/index6.mjs +0 -663
  92. package/dist/chunks/mcp-market.mjs +0 -1077
  93. package/dist/chunks/mcp-server.mjs +0 -776
  94. package/dist/chunks/project-detector.mjs +0 -131
  95. package/dist/chunks/provider-registry.mjs +0 -92
  96. package/dist/chunks/setup-wizard.mjs +0 -362
  97. package/dist/chunks/tools.mjs +0 -143
  98. package/dist/chunks/workflows2.mjs +0 -633
  99. package/dist/shared/ccjk.BM_HZogn.mjs +0 -347
  100. package/dist/shared/ccjk.BaEp4UHQ.mjs +0 -75
  101. package/dist/shared/ccjk.CS0ybJCf.mjs +0 -490
  102. package/dist/shared/ccjk.CZgIwikC.mjs +0 -209
  103. package/dist/shared/ccjk.tO8zeFh1.mjs +0 -397
@@ -3,47 +3,106 @@ import process__default from 'node:process';
3
3
  import ansis from 'ansis';
4
4
  import inquirer from 'inquirer';
5
5
  import { version } from './package.mjs';
6
- import { s as selectMcpServices, g as getMcpServices, M as MCP_SERVICE_CONFIGS } from '../shared/ccjk.CZgIwikC.mjs';
7
- import { WORKFLOW_CONFIG_BASE } from './workflows.mjs';
6
+ import { b as runCodexFullInit, s as selectMcpServices, c as getMcpServices, M as MCP_SERVICE_CONFIGS } from './codex.mjs';
7
+ import { m as modifyApiConfigPartially, c as configureApiCompletely, n as needsMigration, a as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, s as selectAndInstallWorkflows, b as configureOutputStyle, f as formatApiKeyDisplay, W as WORKFLOW_CONFIG_BASE } from '../shared/ccjk.LsPZ2PYo.mjs';
8
8
  import { SETTINGS_FILE, DEFAULT_CODE_TOOL_TYPE, CODE_TOOL_BANNERS, API_DEFAULT_URL } from './constants.mjs';
9
- import { ensureI18nInitialized, i18n } from './index2.mjs';
10
- import { a as displayBannerWithInfo, p as padToDisplayWidth } from '../shared/ccjk.zCqdxT2Y.mjs';
9
+ import { ensureI18nInitialized, i18n } from './index.mjs';
10
+ import { d as displayBannerWithInfo, p as padToDisplayWidth } from '../shared/ccjk.Br91zBIG.mjs';
11
11
  import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
12
- import { readCcrConfig, backupCcrConfig, createDefaultCcrConfig, writeCcrConfig, configureCcrProxy, setupCcrConfiguration } from './config2.mjs';
13
- import { i as isCcrInstalled, a as installCcr } from '../shared/ccjk.BaEp4UHQ.mjs';
14
- import { c as addCompletedOnboarding, s as setPrimaryApiKey, b as backupMcpConfig, a as buildMcpServerConfig, r as readMcpConfig, e as replaceMcpServers, f as fixWindowsMcpConfig, w as writeMcpConfig, g as syncMcpPermissions } from './claude-config.mjs';
15
- import { h as runCodexFullInit } from './codex.mjs';
16
- import { r as resolveCodeType } from '../shared/ccjk.DRweXU5F.mjs';
12
+ import { readCcrConfig, backupCcrConfig, createDefaultCcrConfig, writeCcrConfig, configureCcrProxy, setupCcrConfiguration } from './config3.mjs';
17
13
  import { exec } from 'node:child_process';
18
14
  import { promisify } from 'node:util';
15
+ import { updateCcr } from './auto-updater.mjs';
16
+ import { w as wrapCommandWithSudo, i as isWindows, a as isTermux } from './platform.mjs';
17
+ import { c as addCompletedOnboarding, s as setPrimaryApiKey, b as backupMcpConfig, a as buildMcpServerConfig, r as readMcpConfig, e as replaceMcpServers, f as fixWindowsMcpConfig, w as writeMcpConfig, g as syncMcpPermissions } from './claude-config.mjs';
18
+ import { r as resolveCodeType } from '../shared/ccjk.q1koQxEE.mjs';
19
19
  import { exists } from './fs-operations.mjs';
20
20
  import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
21
- import { j as isWindows, w as wrapCommandWithSudo, i as isTermux } from './platform.mjs';
22
- import { p as promptApiConfigurationAction, i as ensureClaudeDir, e as getExistingApiConfig, s as switchToOfficialLogin, b as backupExistingConfig, h as copyConfigFiles, a as applyAiLanguageDirective, f as configureApi } from './config.mjs';
23
- import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, s as selectAndInstallWorkflows } from '../shared/ccjk.BM_HZogn.mjs';
24
- import { m as modifyApiConfigPartially, a as configureApiCompletely, c as configureOutputStyle, f as formatApiKeyDisplay } from '../shared/ccjk.CS0ybJCf.mjs';
25
- import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.f40us0yY.mjs';
26
- import { getInstallationStatus, installClaudeCode } from './installer.mjs';
21
+ import { p as promptApiConfigurationAction, e as ensureClaudeDir, g as getExistingApiConfig, s as switchToOfficialLogin, b as backupExistingConfig, a as copyConfigFiles, d as applyAiLanguageDirective, f as configureApi } from './config.mjs';
22
+ import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.DvIrK0wz.mjs';
23
+ import { getInstallationStatus, installClaudeCode } from './installer2.mjs';
27
24
  import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
28
25
  import { resolveAiOutputLanguage } from './prompts.mjs';
29
- import { c as checkSuperpowersInstalled, i as installSuperpowers } from '../shared/ccjk.BKoi8-Hy.mjs';
26
+ import { c as checkSuperpowersInstalled, i as installSuperpowers } from '../shared/ccjk.DE91nClQ.mjs';
30
27
  import { p as promptBoolean } from '../shared/ccjk.DHbrGcgg.mjs';
31
28
  import { checkClaudeCodeVersionAndPrompt } from './version-checker.mjs';
32
- import 'node:os';
33
- import 'pathe';
34
- import 'node:url';
35
- import 'i18next';
36
- import 'i18next-fs-backend';
37
- import 'smol-toml';
38
- import 'node:crypto';
39
- import 'node:fs/promises';
40
- import 'dayjs';
41
- import 'tinyexec';
42
- import 'inquirer-toggle';
43
- import './auto-updater.mjs';
44
- import 'ora';
45
- import 'node:path';
46
- import 'semver';
29
+
30
+ const execAsync$1 = promisify(exec);
31
+ async function isCcrInstalled() {
32
+ let commandExists = false;
33
+ try {
34
+ await execAsync$1("ccr version");
35
+ commandExists = true;
36
+ } catch {
37
+ try {
38
+ await execAsync$1("which ccr");
39
+ commandExists = true;
40
+ } catch {
41
+ commandExists = false;
42
+ }
43
+ }
44
+ let hasCorrectPackage = false;
45
+ try {
46
+ await execAsync$1("npm list -g @musistudio/claude-code-router");
47
+ hasCorrectPackage = true;
48
+ } catch {
49
+ hasCorrectPackage = false;
50
+ }
51
+ return {
52
+ isInstalled: commandExists,
53
+ hasCorrectPackage
54
+ };
55
+ }
56
+ async function installCcr() {
57
+ ensureI18nInitialized();
58
+ const { isInstalled, hasCorrectPackage } = await isCcrInstalled();
59
+ if (hasCorrectPackage) {
60
+ console.log(ansis.green(`\u2714 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
61
+ await updateCcr();
62
+ return;
63
+ }
64
+ if (isInstalled && !hasCorrectPackage) {
65
+ try {
66
+ await execAsync$1("npm list -g claude-code-router");
67
+ console.log(ansis.yellow(`\u26A0 ${i18n.t("ccr:detectedIncorrectPackage")}`));
68
+ try {
69
+ await execAsync$1("npm uninstall -g claude-code-router");
70
+ console.log(ansis.green(`\u2714 ${i18n.t("ccr:uninstalledIncorrectPackage")}`));
71
+ } catch {
72
+ console.log(ansis.yellow(`\u26A0 ${i18n.t("ccr:failedToUninstallIncorrectPackage")}`));
73
+ }
74
+ } catch {
75
+ }
76
+ }
77
+ console.log(ansis.green(`\u{1F4E6} ${i18n.t("ccr:installingCcr")}`));
78
+ try {
79
+ const installArgs = ["install", "-g", "@musistudio/claude-code-router", "--force"];
80
+ const { command, args, usedSudo } = wrapCommandWithSudo("npm", installArgs);
81
+ if (usedSudo) {
82
+ console.log(ansis.yellow(`\u2139 ${i18n.t("installation:usingSudo")}`));
83
+ }
84
+ await execAsync$1([command, ...args].join(" "));
85
+ console.log(ansis.green(`\u2714 ${i18n.t("ccr:ccrInstallSuccess")}`));
86
+ } catch (error) {
87
+ if (error.message?.includes("EEXIST")) {
88
+ console.log(ansis.yellow(`\u26A0 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
89
+ await updateCcr();
90
+ return;
91
+ }
92
+ console.error(ansis.red(`\u2716 ${i18n.t("ccr:ccrInstallFailed")}`));
93
+ throw error;
94
+ }
95
+ }
96
+
97
+ const COMETIX_PACKAGE_NAME = "@cometix/ccline";
98
+ const COMETIX_COMMAND_NAME = "ccline";
99
+ const COMETIX_COMMANDS = {
100
+ CHECK_INSTALL: `npm list -g ${COMETIX_PACKAGE_NAME}`,
101
+ INSTALL: `npm install -g ${COMETIX_PACKAGE_NAME}`,
102
+ UPDATE: `npm update -g ${COMETIX_PACKAGE_NAME}`,
103
+ PRINT_CONFIG: `${COMETIX_COMMAND_NAME} --print`,
104
+ TUI_CONFIG: `${COMETIX_COMMAND_NAME} -c`
105
+ };
47
106
 
48
107
  function getPlatformStatusLineConfig() {
49
108
  return {
@@ -80,16 +139,6 @@ function hasCCometixLineConfig() {
80
139
  }
81
140
  }
82
141
 
83
- const COMETIX_PACKAGE_NAME = "@cometix/ccline";
84
- const COMETIX_COMMAND_NAME = "ccline";
85
- const COMETIX_COMMANDS = {
86
- CHECK_INSTALL: `npm list -g ${COMETIX_PACKAGE_NAME}`,
87
- INSTALL: `npm install -g ${COMETIX_PACKAGE_NAME}`,
88
- UPDATE: `npm update -g ${COMETIX_PACKAGE_NAME}`,
89
- PRINT_CONFIG: `${COMETIX_COMMAND_NAME} --print`,
90
- TUI_CONFIG: `${COMETIX_COMMAND_NAME} -c`
91
- };
92
-
93
142
  const execAsync = promisify(exec);
94
143
  async function isCometixLineInstalled() {
95
144
  try {
@@ -414,7 +463,7 @@ async function init(options = {}) {
414
463
  try {
415
464
  setPrimaryApiKey();
416
465
  } catch (error) {
417
- const { ensureI18nInitialized, i18n: i18nModule } = await import('./index2.mjs');
466
+ const { ensureI18nInitialized, i18n: i18nModule } = await import('./index.mjs');
418
467
  ensureI18nInitialized();
419
468
  console.error(i18nModule.t("mcp:primaryApiKeySetFailed"), error);
420
469
  }
@@ -520,7 +569,7 @@ async function init(options = {}) {
520
569
  const aiOutputLang = await resolveAiOutputLanguage(i18n.language, options.aiOutputLang, zcfConfig, options.skipPrompt);
521
570
  const installationStatus = await getInstallationStatus();
522
571
  if (installationStatus.hasGlobal) {
523
- const { verifyInstallation, displayVerificationResult } = await import('./installer.mjs');
572
+ const { verifyInstallation, displayVerificationResult } = await import('./installer2.mjs');
524
573
  const verification = await verifyInstallation("claude-code");
525
574
  if (verification.symlinkCreated) {
526
575
  console.log(ansis.green(`\u2714 ${i18n.t("installation:alreadyInstalled")}`));
@@ -746,7 +795,7 @@ async function init(options = {}) {
746
795
  const hasModelParams = options.apiModel || options.apiHaikuModel || options.apiSonnetModel || options.apiOpusModel;
747
796
  if (hasModelParams && action !== "docs-only" && codeToolType === "claude-code") {
748
797
  if (options.skipPrompt) {
749
- const { updateCustomModel } = await import('./config.mjs').then(function (n) { return n.j; });
798
+ const { updateCustomModel } = await import('./config.mjs').then(function (n) { return n.c; });
750
799
  updateCustomModel(
751
800
  options.apiModel || void 0,
752
801
  options.apiHaikuModel || void 0,
@@ -940,7 +989,7 @@ async function init(options = {}) {
940
989
  }
941
990
  }
942
991
  async function handleMultiConfigurations(options, codeToolType) {
943
- const { ensureI18nInitialized } = await import('./index2.mjs');
992
+ const { ensureI18nInitialized } = await import('./index.mjs');
944
993
  ensureI18nInitialized();
945
994
  try {
946
995
  let configs = [];
@@ -1063,7 +1112,7 @@ async function handleCodexConfigs(configs) {
1063
1112
  }
1064
1113
  const defaultConfig = configs.find((c) => c.default);
1065
1114
  if (defaultConfig) {
1066
- const { switchCodexProvider } = await import('./codex.mjs').then(function (n) { return n.i; });
1115
+ const { switchCodexProvider } = await import('./codex.mjs').then(function (n) { return n.m; });
1067
1116
  const displayName = defaultConfig.name || defaultConfig.provider || "custom";
1068
1117
  const providerId = displayName.toLowerCase().replace(/[^a-z0-9]/g, "-");
1069
1118
  if (addedProviderIds.includes(providerId)) {
@@ -1093,20 +1142,15 @@ async function saveSingleConfigToToml(apiConfig, provider, options) {
1093
1142
  console.warn(ansis.yellow(`${i18n.t("configuration:singleConfigSaveFailed")}: ${error instanceof Error ? error.message : String(error)}`));
1094
1143
  }
1095
1144
  }
1096
- async function convertSingleConfigToProfile(apiConfig, provider, options) {
1145
+ async function buildClaudeCodeProfile(params) {
1097
1146
  const { ClaudeCodeConfigManager } = await import('./claude-code-config-manager.mjs');
1098
- const configName = provider && provider !== "custom" ? provider : "custom-config";
1099
- let baseUrl = apiConfig.url || API_DEFAULT_URL;
1100
- let primaryModel = options?.apiModel;
1101
- let defaultHaikuModel = options?.apiHaikuModel;
1102
- let defaultSonnetModel = options?.apiSonnetModel;
1103
- let defaultOpusModel = options?.apiOpusModel;
1104
- let authType = apiConfig.authType;
1105
- if (provider && provider !== "custom") {
1147
+ let { url: baseUrl, authType, primaryModel, defaultHaikuModel, defaultSonnetModel, defaultOpusModel } = params;
1148
+ baseUrl = baseUrl || API_DEFAULT_URL;
1149
+ if (params.provider && params.provider !== "custom") {
1106
1150
  const { getProviderPreset } = await import('./api-providers.mjs');
1107
- const preset = getProviderPreset(provider);
1151
+ const preset = getProviderPreset(params.provider);
1108
1152
  if (preset?.claudeCode) {
1109
- baseUrl = apiConfig.url || preset.claudeCode.baseUrl;
1153
+ baseUrl = params.url || preset.claudeCode.baseUrl;
1110
1154
  authType = preset.claudeCode.authType;
1111
1155
  if (preset.claudeCode.defaultModels && preset.claudeCode.defaultModels.length > 0) {
1112
1156
  const [p, h, s, o] = preset.claudeCode.defaultModels;
@@ -1117,54 +1161,43 @@ async function convertSingleConfigToProfile(apiConfig, provider, options) {
1117
1161
  }
1118
1162
  }
1119
1163
  }
1120
- const profile = {
1121
- name: configName,
1164
+ return {
1165
+ name: params.name,
1122
1166
  authType,
1123
- apiKey: apiConfig.key,
1167
+ apiKey: params.key,
1124
1168
  baseUrl,
1125
1169
  primaryModel,
1126
1170
  defaultHaikuModel,
1127
1171
  defaultSonnetModel,
1128
1172
  defaultOpusModel,
1129
- id: ClaudeCodeConfigManager.generateProfileId(configName)
1173
+ id: ClaudeCodeConfigManager.generateProfileId(params.name)
1130
1174
  };
1131
- return profile;
1175
+ }
1176
+ async function convertSingleConfigToProfile(apiConfig, provider, options) {
1177
+ return buildClaudeCodeProfile({
1178
+ name: provider && provider !== "custom" ? provider : "custom-config",
1179
+ key: apiConfig.key,
1180
+ authType: apiConfig.authType,
1181
+ url: apiConfig.url,
1182
+ provider,
1183
+ primaryModel: options?.apiModel,
1184
+ defaultHaikuModel: options?.apiHaikuModel,
1185
+ defaultSonnetModel: options?.apiSonnetModel,
1186
+ defaultOpusModel: options?.apiOpusModel
1187
+ });
1132
1188
  }
1133
1189
  async function convertToClaudeCodeProfile(config) {
1134
- const { ClaudeCodeConfigManager } = await import('./claude-code-config-manager.mjs');
1135
- let baseUrl = config.url;
1136
- let primaryModel = config.primaryModel;
1137
- let defaultHaikuModel = config.defaultHaikuModel;
1138
- let defaultSonnetModel = config.defaultSonnetModel;
1139
- let defaultOpusModel = config.defaultOpusModel;
1140
- let authType = config.type || "api_key";
1141
- if (config.provider && config.provider !== "custom") {
1142
- const { getProviderPreset } = await import('./api-providers.mjs');
1143
- const preset = getProviderPreset(config.provider);
1144
- if (preset?.claudeCode) {
1145
- baseUrl = baseUrl || preset.claudeCode.baseUrl;
1146
- authType = preset.claudeCode.authType;
1147
- if (preset.claudeCode.defaultModels && preset.claudeCode.defaultModels.length > 0) {
1148
- const [p, h, s, o] = preset.claudeCode.defaultModels;
1149
- primaryModel = primaryModel || p;
1150
- defaultHaikuModel = defaultHaikuModel || h;
1151
- defaultSonnetModel = defaultSonnetModel || s;
1152
- defaultOpusModel = defaultOpusModel || o;
1153
- }
1154
- }
1155
- }
1156
- const profile = {
1190
+ return buildClaudeCodeProfile({
1157
1191
  name: config.name,
1158
- authType,
1159
- apiKey: config.key,
1160
- baseUrl,
1161
- primaryModel,
1162
- defaultHaikuModel,
1163
- defaultSonnetModel,
1164
- defaultOpusModel,
1165
- id: ClaudeCodeConfigManager.generateProfileId(config.name)
1166
- };
1167
- return profile;
1192
+ key: config.key,
1193
+ authType: (config.type === "ccr_proxy" ? "api_key" : config.type) || "api_key",
1194
+ url: config.url,
1195
+ provider: config.provider,
1196
+ primaryModel: config.primaryModel,
1197
+ defaultHaikuModel: config.defaultHaikuModel,
1198
+ defaultSonnetModel: config.defaultSonnetModel,
1199
+ defaultOpusModel: config.defaultOpusModel
1200
+ });
1168
1201
  }
1169
1202
  async function convertToCodexProvider(config) {
1170
1203
  const displayName = config.name || config.provider || "custom";
@@ -1195,7 +1228,7 @@ async function smartInit(options = {}) {
1195
1228
  try {
1196
1229
  console.log(ansis.bold.green("\n\u{1F9E0} Smart Initialization Mode\n"));
1197
1230
  console.log(ansis.gray("Analyzing your project to generate optimal configuration...\n"));
1198
- const { analyzeProject } = await import('./index6.mjs');
1231
+ const { analyzeProject } = await import('./index5.mjs');
1199
1232
  const analysis = await analyzeProject();
1200
1233
  console.log(ansis.cyan("\u{1F4CA} Project Analysis:"));
1201
1234
  console.log(ansis.gray(` \u2022 Type: ${analysis.projectType}`));
@@ -1214,7 +1247,7 @@ async function smartInit(options = {}) {
1214
1247
  console.log(ansis.gray(` \u2022 CI/CD: ${analysis.cicd.join(", ")}`));
1215
1248
  }
1216
1249
  console.log("");
1217
- const { selectTemplates } = await import('./index6.mjs');
1250
+ const { selectTemplates } = await import('./index5.mjs');
1218
1251
  const selection = await selectTemplates(analysis);
1219
1252
  console.log(ansis.cyan("\u{1F3AF} Template Selection:"));
1220
1253
  console.log(ansis.gray(` \u2022 Agents: ${selection.agents.length} selected`));
@@ -1240,7 +1273,7 @@ async function smartInit(options = {}) {
1240
1273
  }
1241
1274
  }
1242
1275
  console.log(ansis.gray("\n\u{1F527} Generating configurations...\n"));
1243
- const { generateConfigs, writeConfigs } = await import('./index6.mjs');
1276
+ const { generateConfigs, writeConfigs } = await import('./index5.mjs');
1244
1277
  const config = await generateConfigs(selection);
1245
1278
  await writeConfigs(config);
1246
1279
  console.log(ansis.green("\u2714 Configurations generated successfully!"));
@@ -1271,4 +1304,13 @@ async function smartInit(options = {}) {
1271
1304
  }
1272
1305
  }
1273
1306
 
1274
- export { handleMultiConfigurations, init, smartInit, validateApiConfigs, validateSkipPromptOptions };
1307
+ const init$1 = {
1308
+ __proto__: null,
1309
+ handleMultiConfigurations: handleMultiConfigurations,
1310
+ init: init,
1311
+ smartInit: smartInit,
1312
+ validateApiConfigs: validateApiConfigs,
1313
+ validateSkipPromptOptions: validateSkipPromptOptions
1314
+ };
1315
+
1316
+ export { isCcrInstalled as a, installCcr as b, init$1 as c, init as i };