ccjk 14.0.0 → 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.
- package/dist/chunks/agents.mjs +1 -1
- package/dist/chunks/ccr.mjs +13 -14
- package/dist/chunks/check-updates.mjs +1 -3
- package/dist/chunks/claude-code-incremental-manager.mjs +1 -1
- package/dist/chunks/code-type-resolver.mjs +878 -0
- package/dist/chunks/config.mjs +42 -2
- package/dist/chunks/config2.mjs +2 -2
- package/dist/chunks/doctor.mjs +1 -1
- package/dist/chunks/index10.mjs +55 -11
- package/dist/chunks/init.mjs +42 -14
- package/dist/chunks/installer.mjs +2 -2
- package/dist/chunks/mcp.mjs +1 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/quick-setup.mjs +1 -3
- package/dist/chunks/research.mjs +733 -6
- package/dist/chunks/sessions.mjs +1 -1
- package/dist/chunks/skills-sync.mjs +5 -5126
- package/dist/chunks/slash-commands.mjs +1 -1
- package/dist/chunks/status.mjs +63 -16
- package/dist/chunks/uninstall.mjs +1 -3
- package/dist/cli.mjs +101 -20
- package/dist/i18n/locales/en/configuration.json +6 -2
- package/dist/i18n/locales/zh-CN/configuration.json +6 -2
- package/dist/index.d.mts +64 -17
- package/dist/index.d.ts +64 -17
- package/dist/index.mjs +11 -720
- package/dist/shared/ccjk.BO45TPXJ.mjs +807 -0
- package/dist/shared/{ccjk.BOO14f66.mjs → ccjk.CNhnT6uQ.mjs} +42 -6
- package/dist/shared/{ccjk.vO3d1ABk.mjs → ccjk.UhjQ1seV.mjs} +1 -1
- package/dist/shared/ccjk.y-a_1vK4.mjs +5127 -0
- package/package.json +1 -1
- package/dist/chunks/intent-engine.mjs +0 -142
- package/dist/chunks/smart-defaults.mjs +0 -425
- package/dist/shared/ccjk.DJuyfrlL.mjs +0 -348
- package/dist/shared/ccjk.yYQMbHH3.mjs +0 -115
package/dist/chunks/config.mjs
CHANGED
|
@@ -991,6 +991,39 @@ function setMyclaudeActiveProviderProfile(activeProfileId) {
|
|
|
991
991
|
config.myclaudeActiveProviderProfileId = activeProfileId ?? "";
|
|
992
992
|
writeMcpConfig(config);
|
|
993
993
|
}
|
|
994
|
+
function detectMyclaudeProviderMode(profile) {
|
|
995
|
+
if (profile.authType === "ccr_proxy") {
|
|
996
|
+
return "ccr-proxy";
|
|
997
|
+
}
|
|
998
|
+
if (profile.baseUrl) {
|
|
999
|
+
return "openai-native";
|
|
1000
|
+
}
|
|
1001
|
+
return "official";
|
|
1002
|
+
}
|
|
1003
|
+
function describeMyclaudeProviderProfile(profile) {
|
|
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({
|
|
1012
|
+
authType: profile.authType,
|
|
1013
|
+
baseUrl: profile.baseUrl
|
|
1014
|
+
});
|
|
1015
|
+
const hasAdaptiveRouting = Boolean(profile.defaultHaikuModel || profile.defaultSonnetModel || profile.defaultOpusModel);
|
|
1016
|
+
const hasPrimaryModel = Boolean(profile.primaryModel || profile.model);
|
|
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.";
|
|
1020
|
+
return {
|
|
1021
|
+
modeLabel,
|
|
1022
|
+
sourceLabel: "Imported from ccjk \xB7 Reusable profile imported from the compatible ccjk configuration.",
|
|
1023
|
+
routeLabel,
|
|
1024
|
+
strategyLabel
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
994
1027
|
function toMyclaudeProviderProfile(profile, existing) {
|
|
995
1028
|
return {
|
|
996
1029
|
id: profile.id || existing?.id || profile.name,
|
|
@@ -1004,7 +1037,12 @@ function toMyclaudeProviderProfile(profile, existing) {
|
|
|
1004
1037
|
primaryModel: profile.primaryModel,
|
|
1005
1038
|
defaultHaikuModel: profile.defaultHaikuModel,
|
|
1006
1039
|
defaultSonnetModel: profile.defaultSonnetModel,
|
|
1007
|
-
defaultOpusModel: profile.defaultOpusModel
|
|
1040
|
+
defaultOpusModel: profile.defaultOpusModel,
|
|
1041
|
+
...describeMyclaudeProviderProfile({
|
|
1042
|
+
authType: profile.authType,
|
|
1043
|
+
baseUrl: profile.baseUrl,
|
|
1044
|
+
mode: existing?.mode
|
|
1045
|
+
})
|
|
1008
1046
|
};
|
|
1009
1047
|
}
|
|
1010
1048
|
function syncMyclaudeActiveProfileToSettings(profile) {
|
|
@@ -1093,7 +1131,9 @@ const claudeConfig = {
|
|
|
1093
1131
|
addCompletedOnboarding: addCompletedOnboarding,
|
|
1094
1132
|
backupMcpConfig: backupMcpConfig,
|
|
1095
1133
|
buildMcpServerConfig: buildMcpServerConfig,
|
|
1134
|
+
buildMyclaudeProviderPresentation: buildMyclaudeProviderPresentation,
|
|
1096
1135
|
clearMyclaudeProviderProfiles: clearMyclaudeProviderProfiles,
|
|
1136
|
+
describeMyclaudeProviderProfile: describeMyclaudeProviderProfile,
|
|
1097
1137
|
ensureApiKeyApproved: ensureApiKeyApproved,
|
|
1098
1138
|
fixWindowsMcpConfig: fixWindowsMcpConfig,
|
|
1099
1139
|
manageApiKeyApproval: manageApiKeyApproval,
|
|
@@ -1537,4 +1577,4 @@ const config = {
|
|
|
1537
1577
|
updateDefaultModel: updateDefaultModel
|
|
1538
1578
|
};
|
|
1539
1579
|
|
|
1540
|
-
export { syncMcpPermissions as A,
|
|
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 };
|
package/dist/chunks/config2.mjs
CHANGED
|
@@ -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.
|
|
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.
|
|
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")}`));
|
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.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)));
|
package/dist/chunks/index10.mjs
CHANGED
|
@@ -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';
|
|
@@ -5,7 +6,7 @@ import { ensureI18nInitialized, i18n, resolveSupportedLanguage, changeLanguage }
|
|
|
5
6
|
import { displayBannerWithInfo } from './banner.mjs';
|
|
6
7
|
import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
|
|
7
8
|
import { c as runCodexUpdate, i as runCodexUninstall, j as configureCodexAiMemoryFeature, k as configureCodexDefaultModelFeature, m as configureCodexMcp, n as configureCodexApi, o as configureCodexPresetFeature, p as runCodexWorkflowImportWithLanguageSelection, h as runCodexFullInit } from './codex.mjs';
|
|
8
|
-
import { S as STARTUP_CODE_TOOL_CHOICES, a as resolveStartupCodeType } from '
|
|
9
|
+
import { S as STARTUP_CODE_TOOL_CHOICES, a as resolveStartupCodeType } from './code-type-resolver.mjs';
|
|
9
10
|
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.DGllfVCZ.mjs';
|
|
10
11
|
import { changeScriptLanguageFeature } from './features.mjs';
|
|
11
12
|
import { c as checkForUpdates, a as getInstalledPackages, s as searchPackages } from '../shared/ccjk.DbigonEQ.mjs';
|
|
@@ -31,6 +32,7 @@ import { notificationCommand } from './notification.mjs';
|
|
|
31
32
|
import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
|
|
32
33
|
import { uninstall } from './uninstall.mjs';
|
|
33
34
|
import { update } from './update.mjs';
|
|
35
|
+
import { g as getRuntimeCapabilityDescriptor } from '../shared/ccjk.BO45TPXJ.mjs';
|
|
34
36
|
import { c as checkSuperpowersInstalled, g as getSuperpowersSkills, u as updateSuperpowers, a as uninstallSuperpowers, i as installSuperpowers, b as installSuperpowersViaGit } from '../shared/ccjk.Bq8TqZG_.mjs';
|
|
35
37
|
|
|
36
38
|
const execAsync = promisify(exec);
|
|
@@ -3163,6 +3165,29 @@ async function runOnboardingWizard(options = {}) {
|
|
|
3163
3165
|
}
|
|
3164
3166
|
|
|
3165
3167
|
const NON_CODEX_TOOLS = ["claude-code", "myclaude", "aider", "continue", "cline", "cursor"];
|
|
3168
|
+
const CLAUDE_FAMILY_SLASH_RULE = (descriptor) => descriptor.native.slashCommands && descriptor.configBackend === "claude-family";
|
|
3169
|
+
const MENU_ITEM_CAPABILITY_RULES = {
|
|
3170
|
+
"diagnostics": (descriptor) => descriptor.managedByCcjk.doctor,
|
|
3171
|
+
"doctor": (descriptor) => descriptor.managedByCcjk.doctor,
|
|
3172
|
+
"workspace": (descriptor) => descriptor.managedByCcjk.doctor,
|
|
3173
|
+
"api-config": (descriptor) => descriptor.managedByCcjk.configSync || descriptor.managedByCcjk.providerProfiles,
|
|
3174
|
+
"mcp-config": (descriptor) => descriptor.native.mcp && descriptor.managedByCcjk.mcpBundles,
|
|
3175
|
+
"model-config": (descriptor) => descriptor.managedByCcjk.modelRouting,
|
|
3176
|
+
"memory-config": (descriptor) => descriptor.native.memory,
|
|
3177
|
+
"permission-config": (descriptor) => descriptor.native.permissions && descriptor.managedByCcjk.permissionRepair,
|
|
3178
|
+
"config-switch": (descriptor) => descriptor.managedByCcjk.configSync || descriptor.managedByCcjk.providerProfiles,
|
|
3179
|
+
"ccr": (descriptor) => descriptor.configBackend === "claude-family",
|
|
3180
|
+
"ccusage": (descriptor) => descriptor.configBackend === "claude-family",
|
|
3181
|
+
"cometix": (descriptor) => descriptor.native.statusline,
|
|
3182
|
+
"superpowers": CLAUDE_FAMILY_SLASH_RULE,
|
|
3183
|
+
"mcp-market": (descriptor) => descriptor.native.mcp && descriptor.managedByCcjk.mcpBundles,
|
|
3184
|
+
"marketplace": (descriptor) => descriptor.configBackend === "claude-family",
|
|
3185
|
+
"hooks-sync": (descriptor) => descriptor.configBackend === "claude-family",
|
|
3186
|
+
"quick-actions": CLAUDE_FAMILY_SLASH_RULE,
|
|
3187
|
+
"smart-guide": CLAUDE_FAMILY_SLASH_RULE,
|
|
3188
|
+
"workflows": CLAUDE_FAMILY_SLASH_RULE,
|
|
3189
|
+
"output-styles": CLAUDE_FAMILY_SLASH_RULE
|
|
3190
|
+
};
|
|
3166
3191
|
const quickActionsItems = [
|
|
3167
3192
|
{
|
|
3168
3193
|
id: "init",
|
|
@@ -3502,8 +3527,20 @@ const menuItemsByCategory = {
|
|
|
3502
3527
|
// Reserved for experimental features
|
|
3503
3528
|
system: systemItems
|
|
3504
3529
|
};
|
|
3530
|
+
function isItemSupportedByCapabilities(item, codeTool) {
|
|
3531
|
+
const descriptor = getRuntimeCapabilityDescriptor(codeTool);
|
|
3532
|
+
if (!descriptor) {
|
|
3533
|
+
return true;
|
|
3534
|
+
}
|
|
3535
|
+
const rule = MENU_ITEM_CAPABILITY_RULES[item.id];
|
|
3536
|
+
return rule ? rule(descriptor) : true;
|
|
3537
|
+
}
|
|
3505
3538
|
function isItemSupportedForTool(item, codeTool) {
|
|
3506
|
-
|
|
3539
|
+
const toolSupported = !item.supportedTools || item.supportedTools.includes(codeTool);
|
|
3540
|
+
if (!toolSupported) {
|
|
3541
|
+
return false;
|
|
3542
|
+
}
|
|
3543
|
+
return isItemSupportedByCapabilities(item, codeTool);
|
|
3507
3544
|
}
|
|
3508
3545
|
function getVisibleItems(level, codeTool = "claude-code") {
|
|
3509
3546
|
const visible = [];
|
|
@@ -3929,9 +3966,18 @@ function renderToolModeHero(codeTool, width = 76, runtimeSummary) {
|
|
|
3929
3966
|
if (runtimeSummary?.profileLabel) {
|
|
3930
3967
|
content.push(`${colors.shortcut("Profile")} ${colors.itemText(runtimeSummary.profileLabel)}`);
|
|
3931
3968
|
}
|
|
3969
|
+
if (runtimeSummary?.modeLabel) {
|
|
3970
|
+
content.push(`${colors.shortcut("Mode")} ${colors.itemText(runtimeSummary.modeLabel)}`);
|
|
3971
|
+
}
|
|
3972
|
+
if (runtimeSummary?.sourceLabel) {
|
|
3973
|
+
content.push(`${colors.shortcut("Source")} ${colors.itemText(runtimeSummary.sourceLabel)}`);
|
|
3974
|
+
}
|
|
3932
3975
|
if (runtimeSummary?.routeLabel) {
|
|
3933
3976
|
content.push(`${colors.shortcut("Route")} ${colors.itemText(runtimeSummary.routeLabel)}`);
|
|
3934
3977
|
}
|
|
3978
|
+
if (runtimeSummary?.strategyLabel) {
|
|
3979
|
+
content.push(`${colors.shortcut("Strategy")} ${colors.itemText(runtimeSummary.strategyLabel)}`);
|
|
3980
|
+
}
|
|
3935
3981
|
if (runtimeSummary?.modelLabel) {
|
|
3936
3982
|
content.push(`${colors.shortcut("Models")} ${colors.itemText(runtimeSummary.modelLabel)}`);
|
|
3937
3983
|
}
|
|
@@ -4361,19 +4407,21 @@ function buildMyclaudeRuntimeSummary(syncResult) {
|
|
|
4361
4407
|
};
|
|
4362
4408
|
}
|
|
4363
4409
|
const profile = syncResult.activeProfile;
|
|
4364
|
-
const
|
|
4410
|
+
const presentation = buildMyclaudeProviderPresentation(profile);
|
|
4365
4411
|
const primaryModel = typeof profile.primaryModel === "string" ? profile.primaryModel : profile.model;
|
|
4366
4412
|
const fastModel = typeof profile.defaultHaikuModel === "string" ? profile.defaultHaikuModel : profile.fastModel;
|
|
4367
4413
|
const sonnetModel = typeof profile.defaultSonnetModel === "string" ? profile.defaultSonnetModel : void 0;
|
|
4414
|
+
const opusModel = typeof profile.defaultOpusModel === "string" ? profile.defaultOpusModel : void 0;
|
|
4368
4415
|
const modelParts = [
|
|
4369
4416
|
primaryModel ? `primary ${primaryModel}` : void 0,
|
|
4370
|
-
fastModel ? `
|
|
4371
|
-
sonnetModel ? `
|
|
4417
|
+
fastModel ? `haiku ${fastModel}` : void 0,
|
|
4418
|
+
sonnetModel ? `sonnet ${sonnetModel}` : void 0,
|
|
4419
|
+
opusModel ? `opus ${opusModel}` : void 0
|
|
4372
4420
|
].filter(Boolean);
|
|
4373
4421
|
return {
|
|
4374
4422
|
runtimeLabel: "myclaude",
|
|
4375
4423
|
profileLabel: `${profile.name} (${syncResult.activeProfileId || profile.id})`,
|
|
4376
|
-
|
|
4424
|
+
...presentation,
|
|
4377
4425
|
modelLabel: modelParts.join(" \xB7 ") || void 0
|
|
4378
4426
|
};
|
|
4379
4427
|
}
|
|
@@ -5272,10 +5320,6 @@ async function showMainMenu(options = {}) {
|
|
|
5272
5320
|
console.log(a.green(`\u2714 Switched to ${resolvedType}`));
|
|
5273
5321
|
}
|
|
5274
5322
|
}
|
|
5275
|
-
if (resolvedType === "myclaude") {
|
|
5276
|
-
const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.E; });
|
|
5277
|
-
myclaudeRuntimeSyncResult = syncMyclaudeProviderProfilesFromCurrentClaudeConfig();
|
|
5278
|
-
}
|
|
5279
5323
|
} catch (err) {
|
|
5280
5324
|
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
5281
5325
|
console.error(a.yellow(errorMessage));
|
|
@@ -5285,7 +5329,7 @@ async function showMainMenu(options = {}) {
|
|
|
5285
5329
|
const codeTool = getCurrentCodeTool();
|
|
5286
5330
|
displayBannerWithInfo(CODE_TOOL_BANNERS[codeTool] || "CCJK");
|
|
5287
5331
|
if (codeTool === "myclaude") {
|
|
5288
|
-
const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.
|
|
5332
|
+
const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.F; });
|
|
5289
5333
|
myclaudeRuntimeSyncResult = syncMyclaudeProviderProfilesFromCurrentClaudeConfig();
|
|
5290
5334
|
}
|
|
5291
5335
|
const result = await showProgressiveMenu(codeTool, myclaudeRuntimeSyncResult);
|
package/dist/chunks/init.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { updateCcr } from './auto-updater.mjs';
|
|
|
14
14
|
import { w as wrapCommandWithSudo, i as isWindows, b as isTermux } from './platform.mjs';
|
|
15
15
|
import { v as setMyclaudeProviderProfiles, p as promptApiConfigurationAction, n as addCompletedOnboarding, l as setPrimaryApiKey, x as ensureClaudeDir, y as clearMyclaudeProviderProfiles, h as getExistingApiConfig, q as switchToOfficialLogin, b as backupExistingConfig, k as copyConfigFiles, t as applyAiLanguageDirective, i as configureApi, d as backupMcpConfig, e as buildMcpServerConfig, r as readMcpConfig, z as replaceMcpServers, f as fixWindowsMcpConfig, w as writeMcpConfig, A as syncMcpPermissions } from './config.mjs';
|
|
16
16
|
import { h as runCodexFullInit } from './codex.mjs';
|
|
17
|
-
import { a as resolveStartupCodeType, r as resolveCodeType } from '
|
|
17
|
+
import { p as parseOrchestrationLevel, a as resolveStartupCodeType, r as resolveCodeType, w as writeOrchestrationPolicy } from './code-type-resolver.mjs';
|
|
18
18
|
import { exists } from './fs-operations.mjs';
|
|
19
19
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
20
20
|
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration } from '../shared/ccjk.DDq2hqA5.mjs';
|
|
@@ -22,7 +22,6 @@ import { m as modifyApiConfigPartially, a as configureApiCompletely, c as config
|
|
|
22
22
|
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.DGllfVCZ.mjs';
|
|
23
23
|
import { getInstallationStatus, installMyclaude, installClaudeCode } from './installer.mjs';
|
|
24
24
|
import { s as selectMcpServices } from '../shared/ccjk.BI-hdI7P.mjs';
|
|
25
|
-
import { p as parseOrchestrationLevel, w as writeOrchestrationPolicy } from './smart-defaults.mjs';
|
|
26
25
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
27
26
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
28
27
|
import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
|
|
@@ -510,7 +509,7 @@ async function silentInit(options = {}) {
|
|
|
510
509
|
cleanupZcfNamespace();
|
|
511
510
|
} catch {
|
|
512
511
|
}
|
|
513
|
-
const { detectSmartDefaults } = await import('./
|
|
512
|
+
const { detectSmartDefaults } = await import('./code-type-resolver.mjs').then(function (n) { return n.b; });
|
|
514
513
|
const defaults = await detectSmartDefaults();
|
|
515
514
|
if (!defaults.apiKey) {
|
|
516
515
|
throw new Error("Silent mode requires ANTHROPIC_API_KEY environment variable");
|
|
@@ -769,7 +768,7 @@ async function validateApiConfigs(configs) {
|
|
|
769
768
|
}
|
|
770
769
|
}
|
|
771
770
|
async function handleClaudeCodeConfigs(configs) {
|
|
772
|
-
const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.
|
|
771
|
+
const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.E; });
|
|
773
772
|
const addedProfiles = [];
|
|
774
773
|
for (const config of configs) {
|
|
775
774
|
if (config.type === "ccr_proxy") {
|
|
@@ -860,7 +859,7 @@ async function handleCodexConfigs(configs) {
|
|
|
860
859
|
}
|
|
861
860
|
async function saveSingleConfigToToml(apiConfig, provider, options) {
|
|
862
861
|
try {
|
|
863
|
-
const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.
|
|
862
|
+
const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.E; });
|
|
864
863
|
const profile = await convertSingleConfigToProfile(apiConfig, provider, options);
|
|
865
864
|
const result = await ClaudeCodeConfigManager.addProfile(profile);
|
|
866
865
|
if (result.success) {
|
|
@@ -886,7 +885,7 @@ async function saveSingleConfigToToml(apiConfig, provider, options) {
|
|
|
886
885
|
}
|
|
887
886
|
}
|
|
888
887
|
async function buildClaudeCodeProfile(params) {
|
|
889
|
-
const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.
|
|
888
|
+
const { ClaudeCodeConfigManager } = await import('./config.mjs').then(function (n) { return n.E; });
|
|
890
889
|
let {
|
|
891
890
|
url: baseUrl,
|
|
892
891
|
authType,
|
|
@@ -987,6 +986,33 @@ async function convertToCodexProvider(config) {
|
|
|
987
986
|
}
|
|
988
987
|
|
|
989
988
|
const ccjkVersion = getRuntimeVersion();
|
|
989
|
+
function getSetupCompletionGuidance(codeToolType) {
|
|
990
|
+
if (codeToolType === "myclaude") {
|
|
991
|
+
return {
|
|
992
|
+
step1: i18n.t("configuration:guidanceStep1", { runtime: "myclaude" }),
|
|
993
|
+
step1Detail: i18n.t("configuration:guidanceStep1MyclaudeDetail"),
|
|
994
|
+
step1Detail2: i18n.t("configuration:guidanceStep1MyclaudeDetail2"),
|
|
995
|
+
step2: i18n.t("configuration:guidanceStep2"),
|
|
996
|
+
step2Example: i18n.t("configuration:guidanceStep2Example"),
|
|
997
|
+
step3: i18n.t("configuration:guidanceStep3Myclaude"),
|
|
998
|
+
step3Command: i18n.t("configuration:guidanceStep3MyclaudeCommand"),
|
|
999
|
+
step4: i18n.t("configuration:guidanceStep4"),
|
|
1000
|
+
step4Command: i18n.t("configuration:guidanceStep4Command")
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
const runtimeLabel = CODE_TOOL_INFO[codeToolType]?.name || "Claude Code";
|
|
1004
|
+
return {
|
|
1005
|
+
step1: i18n.t("configuration:guidanceStep1", { runtime: runtimeLabel }),
|
|
1006
|
+
step1Detail: i18n.t("configuration:guidanceStep1Detail"),
|
|
1007
|
+
step1Detail2: i18n.t("configuration:guidanceStep1Detail2"),
|
|
1008
|
+
step2: i18n.t("configuration:guidanceStep2"),
|
|
1009
|
+
step2Example: i18n.t("configuration:guidanceStep2Example"),
|
|
1010
|
+
step3: i18n.t("configuration:guidanceStep3"),
|
|
1011
|
+
step3Command: i18n.t("configuration:guidanceStep3Command"),
|
|
1012
|
+
step4: i18n.t("configuration:guidanceStep4"),
|
|
1013
|
+
step4Command: i18n.t("configuration:guidanceStep4Command")
|
|
1014
|
+
};
|
|
1015
|
+
}
|
|
990
1016
|
async function init(options = {}) {
|
|
991
1017
|
options.initSource = options.initSource || "init";
|
|
992
1018
|
options.orchestration = parseOrchestrationLevel(options.orchestration);
|
|
@@ -1508,7 +1534,7 @@ async function init(options = {}) {
|
|
|
1508
1534
|
const hasModelParams = options.apiModel || options.apiHaikuModel || options.apiSonnetModel || options.apiOpusModel;
|
|
1509
1535
|
if (hasModelParams && action !== "docs-only" && (codeToolType === "claude-code" || codeToolType === "myclaude")) {
|
|
1510
1536
|
if (options.skipPrompt) {
|
|
1511
|
-
const { updateCustomModel } = await import('./config.mjs').then(function (n) { return n.
|
|
1537
|
+
const { updateCustomModel } = await import('./config.mjs').then(function (n) { return n.D; });
|
|
1512
1538
|
updateCustomModel(
|
|
1513
1539
|
options.apiModel || void 0,
|
|
1514
1540
|
options.apiHaikuModel || void 0,
|
|
@@ -1753,6 +1779,7 @@ async function init(options = {}) {
|
|
|
1753
1779
|
}
|
|
1754
1780
|
if (!options.skipPrompt && !options.skipBanner)
|
|
1755
1781
|
tracker.complete();
|
|
1782
|
+
const completionGuidance = getSetupCompletionGuidance(codeToolType);
|
|
1756
1783
|
console.log("");
|
|
1757
1784
|
console.log(
|
|
1758
1785
|
a.bold.green("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")
|
|
@@ -1773,31 +1800,31 @@ async function init(options = {}) {
|
|
|
1773
1800
|
`${a.bold.green("\u2551")} ${a.bold.green("\u2551")}`
|
|
1774
1801
|
);
|
|
1775
1802
|
console.log(
|
|
1776
|
-
a.bold.green("\u2551") + padToDisplayWidth(` ${
|
|
1803
|
+
a.bold.green("\u2551") + padToDisplayWidth(` ${completionGuidance.step1}`, 62) + a.bold.green("\u2551")
|
|
1777
1804
|
);
|
|
1778
1805
|
console.log(
|
|
1779
|
-
a.bold.green("\u2551") + a.dim(padToDisplayWidth(` ${
|
|
1806
|
+
a.bold.green("\u2551") + a.dim(padToDisplayWidth(` ${completionGuidance.step1Detail}`, 62)) + a.bold.green("\u2551")
|
|
1780
1807
|
);
|
|
1781
1808
|
console.log(
|
|
1782
|
-
a.bold.green("\u2551") + a.dim(padToDisplayWidth(` ${
|
|
1809
|
+
a.bold.green("\u2551") + a.dim(padToDisplayWidth(` ${completionGuidance.step1Detail2}`, 62)) + a.bold.green("\u2551")
|
|
1783
1810
|
);
|
|
1784
1811
|
console.log(
|
|
1785
1812
|
`${a.bold.green("\u2551")} ${a.bold.green("\u2551")}`
|
|
1786
1813
|
);
|
|
1787
1814
|
console.log(
|
|
1788
|
-
a.bold.green("\u2551") + padToDisplayWidth(` ${
|
|
1815
|
+
a.bold.green("\u2551") + padToDisplayWidth(` ${completionGuidance.step2}`, 62) + a.bold.green("\u2551")
|
|
1789
1816
|
);
|
|
1790
1817
|
console.log(
|
|
1791
|
-
a.bold.green("\u2551") + a.green(padToDisplayWidth(` ${
|
|
1818
|
+
a.bold.green("\u2551") + a.green(padToDisplayWidth(` ${completionGuidance.step2Example}`, 62)) + a.bold.green("\u2551")
|
|
1792
1819
|
);
|
|
1793
1820
|
console.log(
|
|
1794
1821
|
`${a.bold.green("\u2551")} ${a.bold.green("\u2551")}`
|
|
1795
1822
|
);
|
|
1796
1823
|
console.log(
|
|
1797
|
-
a.bold.green("\u2551") + padToDisplayWidth(` ${
|
|
1824
|
+
a.bold.green("\u2551") + padToDisplayWidth(` ${completionGuidance.step3} `, 44) + a.yellow(padToDisplayWidth(completionGuidance.step3Command, 18)) + a.bold.green("\u2551")
|
|
1798
1825
|
);
|
|
1799
1826
|
console.log(
|
|
1800
|
-
a.bold.green("\u2551") + padToDisplayWidth(` ${
|
|
1827
|
+
a.bold.green("\u2551") + padToDisplayWidth(` ${completionGuidance.step4} `, 44) + a.yellow(padToDisplayWidth(completionGuidance.step4Command, 18)) + a.bold.green("\u2551")
|
|
1801
1828
|
);
|
|
1802
1829
|
console.log(
|
|
1803
1830
|
`${a.bold.green("\u2551")} ${a.bold.green("\u2551")}`
|
|
@@ -1852,6 +1879,7 @@ async function init(options = {}) {
|
|
|
1852
1879
|
const init$1 = {
|
|
1853
1880
|
__proto__: null,
|
|
1854
1881
|
convertSingleConfigToProfile: convertSingleConfigToProfile,
|
|
1882
|
+
getSetupCompletionGuidance: getSetupCompletionGuidance,
|
|
1855
1883
|
handleMultiConfigurations: handleMultiConfigurations,
|
|
1856
1884
|
init: init,
|
|
1857
1885
|
saveSingleConfigToToml: saveSingleConfigToToml,
|
|
@@ -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.
|
|
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.
|
|
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: {} };
|
package/dist/chunks/mcp.mjs
CHANGED
|
@@ -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.
|
|
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; });
|
package/dist/chunks/package.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import a from './index5.mjs';
|
|
2
2
|
import { i as inquirer } from './index6.mjs';
|
|
3
|
-
import { d as detectSmartDefaults } from './
|
|
3
|
+
import { d as detectSmartDefaults } from './code-type-resolver.mjs';
|
|
4
4
|
import { resolveSupportedLanguage, i18n } from './index2.mjs';
|
|
5
5
|
import { updateZcfConfig } from './ccjk-config.mjs';
|
|
6
6
|
import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
|
|
@@ -33,7 +33,6 @@ import './platform.mjs';
|
|
|
33
33
|
import './main.mjs';
|
|
34
34
|
import 'module';
|
|
35
35
|
import 'node:stream';
|
|
36
|
-
import '../shared/ccjk.DJuyfrlL.mjs';
|
|
37
36
|
import 'node:url';
|
|
38
37
|
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
39
38
|
import './index3.mjs';
|
|
@@ -51,7 +50,6 @@ import '../shared/ccjk.CxpGa6MC.mjs';
|
|
|
51
50
|
import './codex.mjs';
|
|
52
51
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
53
52
|
import './prompts.mjs';
|
|
54
|
-
import '../shared/ccjk.yYQMbHH3.mjs';
|
|
55
53
|
import '../shared/ccjk.DDq2hqA5.mjs';
|
|
56
54
|
import '../shared/ccjk.Dh6Be-ef.mjs';
|
|
57
55
|
import '../shared/ccjk.DGllfVCZ.mjs';
|