ccjk 14.0.0 → 14.0.1

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.
@@ -991,6 +991,36 @@ 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 = detectMyclaudeProviderMode({
1005
+ authType: profile.authType,
1006
+ baseUrl: profile.baseUrl
1007
+ });
1008
+ const hasAdaptiveRouting = Boolean(profile.defaultHaikuModel || profile.defaultSonnetModel || profile.defaultOpusModel);
1009
+ 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.";
1014
+ 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
1022
+ };
1023
+ }
994
1024
  function toMyclaudeProviderProfile(profile, existing) {
995
1025
  return {
996
1026
  id: profile.id || existing?.id || profile.name,
@@ -1004,7 +1034,16 @@ function toMyclaudeProviderProfile(profile, existing) {
1004
1034
  primaryModel: profile.primaryModel,
1005
1035
  defaultHaikuModel: profile.defaultHaikuModel,
1006
1036
  defaultSonnetModel: profile.defaultSonnetModel,
1007
- defaultOpusModel: profile.defaultOpusModel
1037
+ defaultOpusModel: profile.defaultOpusModel,
1038
+ ...describeMyclaudeProviderProfile({
1039
+ authType: profile.authType,
1040
+ baseUrl: profile.baseUrl,
1041
+ model: profile.primaryModel,
1042
+ primaryModel: profile.primaryModel,
1043
+ defaultHaikuModel: profile.defaultHaikuModel,
1044
+ defaultSonnetModel: profile.defaultSonnetModel,
1045
+ defaultOpusModel: profile.defaultOpusModel
1046
+ })
1008
1047
  };
1009
1048
  }
1010
1049
  function syncMyclaudeActiveProfileToSettings(profile) {
@@ -1094,6 +1133,7 @@ const claudeConfig = {
1094
1133
  backupMcpConfig: backupMcpConfig,
1095
1134
  buildMcpServerConfig: buildMcpServerConfig,
1096
1135
  clearMyclaudeProviderProfiles: clearMyclaudeProviderProfiles,
1136
+ describeMyclaudeProviderProfile: describeMyclaudeProviderProfile,
1097
1137
  ensureApiKeyApproved: ensureApiKeyApproved,
1098
1138
  fixWindowsMcpConfig: fixWindowsMcpConfig,
1099
1139
  manageApiKeyApproval: manageApiKeyApproval,
@@ -5,7 +5,7 @@ import { ensureI18nInitialized, i18n, resolveSupportedLanguage, changeLanguage }
5
5
  import { displayBannerWithInfo } from './banner.mjs';
6
6
  import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
7
7
  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 '../shared/ccjk.yYQMbHH3.mjs';
8
+ import { S as STARTUP_CODE_TOOL_CHOICES, a as resolveStartupCodeType } from './code-type-resolver.mjs';
9
9
  import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.DGllfVCZ.mjs';
10
10
  import { changeScriptLanguageFeature } from './features.mjs';
11
11
  import { c as checkForUpdates, a as getInstalledPackages, s as searchPackages } from '../shared/ccjk.DbigonEQ.mjs';
@@ -31,6 +31,7 @@ import { notificationCommand } from './notification.mjs';
31
31
  import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
32
32
  import { uninstall } from './uninstall.mjs';
33
33
  import { update } from './update.mjs';
34
+ import { g as getRuntimeCapabilityDescriptor } from '../shared/ccjk.BO45TPXJ.mjs';
34
35
  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
36
 
36
37
  const execAsync = promisify(exec);
@@ -3163,6 +3164,29 @@ async function runOnboardingWizard(options = {}) {
3163
3164
  }
3164
3165
 
3165
3166
  const NON_CODEX_TOOLS = ["claude-code", "myclaude", "aider", "continue", "cline", "cursor"];
3167
+ const CLAUDE_FAMILY_SLASH_RULE = (descriptor) => descriptor.native.slashCommands && descriptor.configBackend === "claude-family";
3168
+ const MENU_ITEM_CAPABILITY_RULES = {
3169
+ "diagnostics": (descriptor) => descriptor.managedByCcjk.doctor,
3170
+ "doctor": (descriptor) => descriptor.managedByCcjk.doctor,
3171
+ "workspace": (descriptor) => descriptor.managedByCcjk.doctor,
3172
+ "api-config": (descriptor) => descriptor.managedByCcjk.configSync || descriptor.managedByCcjk.providerProfiles,
3173
+ "mcp-config": (descriptor) => descriptor.native.mcp && descriptor.managedByCcjk.mcpBundles,
3174
+ "model-config": (descriptor) => descriptor.managedByCcjk.modelRouting,
3175
+ "memory-config": (descriptor) => descriptor.native.memory,
3176
+ "permission-config": (descriptor) => descriptor.native.permissions && descriptor.managedByCcjk.permissionRepair,
3177
+ "config-switch": (descriptor) => descriptor.managedByCcjk.configSync || descriptor.managedByCcjk.providerProfiles,
3178
+ "ccr": (descriptor) => descriptor.configBackend === "claude-family",
3179
+ "ccusage": (descriptor) => descriptor.configBackend === "claude-family",
3180
+ "cometix": (descriptor) => descriptor.native.statusline,
3181
+ "superpowers": CLAUDE_FAMILY_SLASH_RULE,
3182
+ "mcp-market": (descriptor) => descriptor.native.mcp && descriptor.managedByCcjk.mcpBundles,
3183
+ "marketplace": (descriptor) => descriptor.configBackend === "claude-family",
3184
+ "hooks-sync": (descriptor) => descriptor.configBackend === "claude-family",
3185
+ "quick-actions": CLAUDE_FAMILY_SLASH_RULE,
3186
+ "smart-guide": CLAUDE_FAMILY_SLASH_RULE,
3187
+ "workflows": CLAUDE_FAMILY_SLASH_RULE,
3188
+ "output-styles": CLAUDE_FAMILY_SLASH_RULE
3189
+ };
3166
3190
  const quickActionsItems = [
3167
3191
  {
3168
3192
  id: "init",
@@ -3502,8 +3526,20 @@ const menuItemsByCategory = {
3502
3526
  // Reserved for experimental features
3503
3527
  system: systemItems
3504
3528
  };
3529
+ function isItemSupportedByCapabilities(item, codeTool) {
3530
+ const descriptor = getRuntimeCapabilityDescriptor(codeTool);
3531
+ if (!descriptor) {
3532
+ return true;
3533
+ }
3534
+ const rule = MENU_ITEM_CAPABILITY_RULES[item.id];
3535
+ return rule ? rule(descriptor) : true;
3536
+ }
3505
3537
  function isItemSupportedForTool(item, codeTool) {
3506
- return !item.supportedTools || item.supportedTools.includes(codeTool);
3538
+ const toolSupported = !item.supportedTools || item.supportedTools.includes(codeTool);
3539
+ if (!toolSupported) {
3540
+ return false;
3541
+ }
3542
+ return isItemSupportedByCapabilities(item, codeTool);
3507
3543
  }
3508
3544
  function getVisibleItems(level, codeTool = "claude-code") {
3509
3545
  const visible = [];
@@ -3929,9 +3965,18 @@ function renderToolModeHero(codeTool, width = 76, runtimeSummary) {
3929
3965
  if (runtimeSummary?.profileLabel) {
3930
3966
  content.push(`${colors.shortcut("Profile")} ${colors.itemText(runtimeSummary.profileLabel)}`);
3931
3967
  }
3968
+ if (runtimeSummary?.modeLabel) {
3969
+ content.push(`${colors.shortcut("Mode")} ${colors.itemText(runtimeSummary.modeLabel)}`);
3970
+ }
3971
+ if (runtimeSummary?.sourceLabel) {
3972
+ content.push(`${colors.shortcut("Source")} ${colors.itemText(runtimeSummary.sourceLabel)}`);
3973
+ }
3932
3974
  if (runtimeSummary?.routeLabel) {
3933
3975
  content.push(`${colors.shortcut("Route")} ${colors.itemText(runtimeSummary.routeLabel)}`);
3934
3976
  }
3977
+ if (runtimeSummary?.strategyLabel) {
3978
+ content.push(`${colors.shortcut("Strategy")} ${colors.itemText(runtimeSummary.strategyLabel)}`);
3979
+ }
3935
3980
  if (runtimeSummary?.modelLabel) {
3936
3981
  content.push(`${colors.shortcut("Models")} ${colors.itemText(runtimeSummary.modelLabel)}`);
3937
3982
  }
@@ -4361,19 +4406,23 @@ function buildMyclaudeRuntimeSummary(syncResult) {
4361
4406
  };
4362
4407
  }
4363
4408
  const profile = syncResult.activeProfile;
4364
- const routeFamily = profile.baseUrl ? "OpenAI-compatible gateway" : "Official runtime route";
4365
4409
  const primaryModel = typeof profile.primaryModel === "string" ? profile.primaryModel : profile.model;
4366
4410
  const fastModel = typeof profile.defaultHaikuModel === "string" ? profile.defaultHaikuModel : profile.fastModel;
4367
4411
  const sonnetModel = typeof profile.defaultSonnetModel === "string" ? profile.defaultSonnetModel : void 0;
4412
+ const opusModel = typeof profile.defaultOpusModel === "string" ? profile.defaultOpusModel : void 0;
4368
4413
  const modelParts = [
4369
4414
  primaryModel ? `primary ${primaryModel}` : void 0,
4370
- fastModel ? `fast ${fastModel}` : void 0,
4371
- sonnetModel ? `exec ${sonnetModel}` : void 0
4415
+ fastModel ? `haiku ${fastModel}` : void 0,
4416
+ sonnetModel ? `sonnet ${sonnetModel}` : void 0,
4417
+ opusModel ? `opus ${opusModel}` : void 0
4372
4418
  ].filter(Boolean);
4373
4419
  return {
4374
4420
  runtimeLabel: "myclaude",
4375
4421
  profileLabel: `${profile.name} (${syncResult.activeProfileId || profile.id})`,
4376
- routeLabel: profile.baseUrl ? `${routeFamily} \xB7 ${profile.baseUrl}` : routeFamily,
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,
4377
4426
  modelLabel: modelParts.join(" \xB7 ") || void 0
4378
4427
  };
4379
4428
  }
@@ -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 '../shared/ccjk.yYQMbHH3.mjs';
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('./smart-defaults.mjs').then(function (n) { return n.s; });
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");
@@ -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);
@@ -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(` ${i18n.t("configuration:guidanceStep1")}`, 62) + a.bold.green("\u2551")
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(` ${i18n.t("configuration:guidanceStep1Detail")}`, 62)) + a.bold.green("\u2551")
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(` ${i18n.t("configuration:guidanceStep1Detail2")}`, 62)) + a.bold.green("\u2551")
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(` ${i18n.t("configuration:guidanceStep2")}`, 62) + a.bold.green("\u2551")
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(` ${i18n.t("configuration:guidanceStep2Example")}`, 62)) + a.bold.green("\u2551")
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(` ${i18n.t("configuration:guidanceStep3")} `, 44) + a.yellow(padToDisplayWidth(i18n.t("configuration:guidanceStep3Command"), 18)) + a.bold.green("\u2551")
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(` ${i18n.t("configuration:guidanceStep4")} `, 44) + a.yellow(padToDisplayWidth(i18n.t("configuration:guidanceStep4Command"), 18)) + a.bold.green("\u2551")
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,
@@ -1,3 +1,3 @@
1
- const version = "14.0.0";
1
+ const version = "14.0.1";
2
2
 
3
3
  export { version };
@@ -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 './smart-defaults.mjs';
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';
@@ -2,31 +2,49 @@ import { existsSync, readFileSync } from 'node:fs';
2
2
  import { homedir } from 'node:os';
3
3
  import process__default from 'node:process';
4
4
  import a from './index5.mjs';
5
- import { s as scanProject } from '../shared/ccjk.DJuyfrlL.mjs';
5
+ import { g as getRuntimeCapabilityDescriptor } from '../shared/ccjk.BO45TPXJ.mjs';
6
+ import { s as scanProject, r as resolveCodeType } from './code-type-resolver.mjs';
6
7
  import { MetricsDisplay } from './metrics-display.mjs';
7
8
  import { getContextPersistence } from './persistence.mjs';
8
9
  import { r as runHealthCheck } from '../shared/ccjk.xkKNsC02.mjs';
9
10
  import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
10
11
  import '../shared/ccjk.BAGoDD49.mjs';
11
12
  import 'node:child_process';
12
- import 'better-sqlite3';
13
+ import 'node:path';
14
+ import 'node:util';
15
+ import './index6.mjs';
16
+ import 'node:readline';
17
+ import 'stream';
18
+ import 'node:tty';
19
+ import 'node:async_hooks';
20
+ import '../shared/ccjk.Cjgrln_h.mjs';
21
+ import 'tty';
22
+ import 'fs';
23
+ import 'child_process';
24
+ import 'node:crypto';
25
+ import 'buffer';
26
+ import 'string_decoder';
13
27
  import './constants.mjs';
14
28
  import './index2.mjs';
15
29
  import 'node:url';
30
+ import './json-config.mjs';
31
+ import '../shared/ccjk.RyizuzOI.mjs';
32
+ import './fs-operations.mjs';
33
+ import 'node:fs/promises';
34
+ import './platform.mjs';
35
+ import './main.mjs';
36
+ import 'module';
37
+ import 'node:stream';
38
+ import './ccjk-config.mjs';
39
+ import '../shared/ccjk.BBtCGd_g.mjs';
40
+ import './index3.mjs';
41
+ import 'better-sqlite3';
16
42
  import './memory-check.mjs';
17
- import 'node:path';
18
- import 'fs';
19
43
  import 'constants';
20
- import 'stream';
21
44
  import 'util';
22
45
  import 'assert';
23
46
  import 'path';
24
47
  import './memory-paths.mjs';
25
- import '../shared/ccjk.BBtCGd_g.mjs';
26
- import './index3.mjs';
27
- import './fs-operations.mjs';
28
- import 'node:crypto';
29
- import 'node:fs/promises';
30
48
 
31
49
  const GRADE_COLORS = {
32
50
  S: (s) => a.magenta.bold(s),
@@ -83,7 +101,7 @@ function loadInstalledSettings() {
83
101
  }
84
102
  async function loadSmartDefaults() {
85
103
  try {
86
- const { detectSmartDefaults } = await import('./smart-defaults.mjs').then(function (n) { return n.s; });
104
+ const { detectSmartDefaults } = await import('./code-type-resolver.mjs').then(function (n) { return n.b; });
87
105
  return await detectSmartDefaults();
88
106
  } catch {
89
107
  return null;
@@ -121,7 +139,7 @@ function renderProjectSection(ctx) {
121
139
  }
122
140
  return lines;
123
141
  }
124
- function renderRuntimeSection(ctx) {
142
+ function renderRuntimeSection(ctx, capability) {
125
143
  const lines = [];
126
144
  lines.push(heading("Runtime"));
127
145
  const rt = ctx.runtime;
@@ -143,6 +161,31 @@ function renderRuntimeSection(ctx) {
143
161
  lines.push(` ${label("Environment:".padEnd(14))} ${a.gray("standard")}`);
144
162
  }
145
163
  lines.push(` ${label("Browser:".padEnd(14))} ${rt.hasBrowser ? a.green("available") : a.gray("unavailable")}`);
164
+ if (capability) {
165
+ const nativeFeatures = [
166
+ capability.native.agentLoop && "agent-loop",
167
+ capability.native.planTask && "plan/task",
168
+ capability.native.subagents && "subagents",
169
+ capability.native.slashCommands && "slash-commands",
170
+ capability.native.mcp && "mcp",
171
+ capability.native.permissions && "permissions",
172
+ capability.native.memory && "memory",
173
+ capability.native.ideIntegration && "ide",
174
+ capability.native.worktree && "worktree",
175
+ capability.native.statusline && "statusline"
176
+ ].filter(Boolean);
177
+ const managedByCcjk = [
178
+ capability.managedByCcjk.providerProfiles && "profiles",
179
+ capability.managedByCcjk.modelRouting && "models",
180
+ capability.managedByCcjk.configSync && "config-sync",
181
+ capability.managedByCcjk.permissionRepair && "permission-repair",
182
+ capability.managedByCcjk.mcpBundles && "mcp-bundles",
183
+ capability.managedByCcjk.doctor && "doctor"
184
+ ].filter(Boolean);
185
+ lines.push(` ${label("Ownership:".padEnd(14))} ${val(capability.ownership)}`);
186
+ lines.push(` ${label("Native:".padEnd(14))} ${nativeFeatures.length > 0 ? val(nativeFeatures.join(", ")) : a.gray("none")}`);
187
+ lines.push(` ${label("CCJK:".padEnd(14))} ${managedByCcjk.length > 0 ? val(managedByCcjk.join(", ")) : a.gray("none")}`);
188
+ }
146
189
  return lines;
147
190
  }
148
191
  function renderMcpSection(recommended, installed) {
@@ -325,24 +368,28 @@ function suggestNextAction(health, _ctx) {
325
368
  }
326
369
  async function statusCommand(options = {}) {
327
370
  try {
328
- const [ctx, defaults, installed, health] = await Promise.all([
371
+ const [ctx, defaults, installed, health, codeTool] = await Promise.all([
329
372
  scanProject(),
330
373
  loadSmartDefaults(),
331
374
  Promise.resolve(loadInstalledSettings()),
332
- runHealthCheck()
375
+ runHealthCheck(),
376
+ resolveCodeType()
333
377
  ]);
378
+ const capability = getRuntimeCapabilityDescriptor(codeTool);
334
379
  if (options.json) {
335
380
  console.log(JSON.stringify({
336
381
  project: ctx,
337
382
  smartDefaults: defaults,
338
383
  installed,
339
- health
384
+ health,
385
+ codeTool,
386
+ capability
340
387
  }, null, 2));
341
388
  return;
342
389
  }
343
390
  const sections = [];
344
391
  sections.push(renderProjectSection(ctx));
345
- sections.push(renderRuntimeSection(ctx));
392
+ sections.push(renderRuntimeSection(ctx, capability));
346
393
  if (defaults) {
347
394
  sections.push(renderMcpSection(defaults.mcpServices, installed.mcpServers));
348
395
  sections.push(renderHooksSection(defaults.recommendedHooks, installed.hooks));
@@ -3,7 +3,7 @@ import { i as inquirer } from './index6.mjs';
3
3
  import { ZCF_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, isCodeToolType } from './constants.mjs';
4
4
  import { i18n, ensureI18nInitialized, resolveSupportedLanguage } from './index2.mjs';
5
5
  import { readZcfConfig } from './ccjk-config.mjs';
6
- import { r as resolveCodeType } from '../shared/ccjk.yYQMbHH3.mjs';
6
+ import { r as resolveCodeType } from './code-type-resolver.mjs';
7
7
  import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.DGllfVCZ.mjs';
8
8
  import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
9
9
  import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
@@ -34,10 +34,8 @@ import './index3.mjs';
34
34
  import './fs-operations.mjs';
35
35
  import 'node:fs/promises';
36
36
  import '../shared/ccjk.RyizuzOI.mjs';
37
- import './smart-defaults.mjs';
38
37
  import 'node:child_process';
39
38
  import './platform.mjs';
40
- import '../shared/ccjk.DJuyfrlL.mjs';
41
39
  import '../shared/ccjk.DeWpAShp.mjs';
42
40
  import 'module';
43
41
  import 'node:stream';
package/dist/cli.mjs CHANGED
@@ -1964,6 +1964,57 @@ ${ansis.yellow("By Status:")}`);
1964
1964
  }
1965
1965
  ];
1966
1966
 
1967
+ const SPECIAL_STARTUP_COMMANDS = [
1968
+ "cloud",
1969
+ "c",
1970
+ "system",
1971
+ "sys",
1972
+ "plugin",
1973
+ "completion",
1974
+ "skills-sync",
1975
+ "agents-sync",
1976
+ "marketplace",
1977
+ "quick",
1978
+ "deep",
1979
+ "setup",
1980
+ "sync",
1981
+ "versions",
1982
+ "permissions",
1983
+ "config-scan",
1984
+ "workspace"
1985
+ ];
1986
+ const EXPLICIT_STARTUP_COMMANDS = /* @__PURE__ */ new Set([
1987
+ ...COMMANDS.flatMap((command) => {
1988
+ const primaryName = command.name.split(/[ <[]/, 1)[0]?.toLowerCase();
1989
+ const aliases = command.aliases?.map((alias) => alias.toLowerCase()) || [];
1990
+ return primaryName ? [primaryName, ...aliases] : aliases;
1991
+ }),
1992
+ ...SPECIAL_STARTUP_COMMANDS
1993
+ ]);
1994
+ function shouldBootstrapCloudServicesForArgs(args) {
1995
+ if (args.length === 0) {
1996
+ return false;
1997
+ }
1998
+ const optionArgsWithValue = /* @__PURE__ */ new Set(["-l", "--lang", "-g", "--all-lang", "-T", "--code-type"]);
1999
+ for (let index = 0; index < args.length; index += 1) {
2000
+ const arg = args[index];
2001
+ if (!arg) {
2002
+ continue;
2003
+ }
2004
+ if (optionArgsWithValue.has(arg)) {
2005
+ index += 1;
2006
+ continue;
2007
+ }
2008
+ if (arg.startsWith("--lang=") || arg.startsWith("--all-lang=") || arg.startsWith("--code-type=")) {
2009
+ continue;
2010
+ }
2011
+ if (arg.startsWith("-") || arg.startsWith("/")) {
2012
+ continue;
2013
+ }
2014
+ return EXPLICIT_STARTUP_COMMANDS.has(arg.toLowerCase());
2015
+ }
2016
+ return false;
2017
+ }
1967
2018
  async function registerSpecialCommands(cli) {
1968
2019
  cli.command("cloud [resource] [action]", "Cloud sync (skills/agents/plugins)").alias("c").option("--dry-run, -d", "Preview changes").option("--force, -f", "Force sync").action(async (resource, action, options) => {
1969
2020
  const resourceStr = resource || "menu";
@@ -2286,8 +2337,7 @@ async function tryQuickProviderLaunch() {
2286
2337
  }
2287
2338
  function bootstrapCloudServices() {
2288
2339
  const args = process.argv.slice(2);
2289
- const isInteractiveMenu = args.length === 0 || args.length === 1 && ["-l", "--lang"].includes(args[0]);
2290
- if (isInteractiveMenu) {
2340
+ if (!shouldBootstrapCloudServicesForArgs(args)) {
2291
2341
  return;
2292
2342
  }
2293
2343
  setImmediate(async () => {
@@ -2432,21 +2482,12 @@ async function runLazyCli() {
2432
2482
  return;
2433
2483
  }
2434
2484
  const args = process__default.argv.slice(2);
2435
- if (args.length > 0) {
2436
- if (args[0].startsWith("/")) {
2437
- spinner?.stop();
2438
- const { executeSlashCommand } = await import('./chunks/slash-commands.mjs');
2439
- const slashHandled = await executeSlashCommand(args.join(" "));
2440
- if (slashHandled) {
2441
- return;
2442
- }
2443
- } else {
2444
- const { handleIntentRecognition } = await import('./chunks/intent-engine.mjs');
2445
- const intentHandled = await handleIntentRecognition();
2446
- if (intentHandled) {
2447
- spinner?.stop();
2448
- return;
2449
- }
2485
+ if (args.length > 0 && args[0].startsWith("/")) {
2486
+ spinner?.stop();
2487
+ const { executeSlashCommand } = await import('./chunks/slash-commands.mjs');
2488
+ const slashHandled = await executeSlashCommand(args.join(" "));
2489
+ if (slashHandled) {
2490
+ return;
2450
2491
  }
2451
2492
  }
2452
2493
  const cac = (await import('./chunks/index7.mjs')).default;
@@ -87,13 +87,17 @@
87
87
  "windowsMcpConfigFixed": "Windows MCP configuration fixed",
88
88
  "setupCompleteTitle": "✅ CCJK Configuration Complete!",
89
89
  "nextSteps": "🎯 Next Steps:",
90
- "guidanceStep1": "1. Open Claude Code and use slash commands:",
90
+ "guidanceStep1": "1. Open {{runtime}} and use slash commands:",
91
91
  "guidanceStep1Detail": "/ccjk:feat - Feature Dev /ccjk:git-commit - Smart Commit",
92
- "guidanceStep1Detail2": "/ccjk:init-project - Init Project /ccjk - View All",
92
+ "guidanceStep1Detail2": "/ccjk:init-project - Init Project /commands - View installed",
93
+ "guidanceStep1MyclaudeDetail": "/ccjk:feat - Feature Dev /ccjk:init-project - Init Project",
94
+ "guidanceStep1MyclaudeDetail2": "/commit - Smart Commit /workflow - Plan Feature",
93
95
  "guidanceStep2": "2. Example:",
94
96
  "guidanceStep2Example": "/ccjk:feat implement user login feature",
95
97
  "guidanceStep3": "3. View all features:",
96
98
  "guidanceStep3Command": "npx ccjk features",
99
+ "guidanceStep3Myclaude": "3. View installed commands:",
100
+ "guidanceStep3MyclaudeCommand": "/commands",
97
101
  "guidanceStep4": "4. Having issues? Run:",
98
102
  "guidanceStep4Command": "npx ccjk doctor",
99
103
  "migration": {
@@ -85,13 +85,17 @@
85
85
  "windowsMcpConfigFixed": "Windows MCP 配置已修复",
86
86
  "setupCompleteTitle": "✅ CCJK 配置完成!",
87
87
  "nextSteps": "🎯 下一步:",
88
- "guidanceStep1": "1. 打开 Claude Code,使用斜杠命令:",
88
+ "guidanceStep1": "1. 打开 {{runtime}},使用斜杠命令:",
89
89
  "guidanceStep1Detail": "/ccjk:feat - 功能开发 /ccjk:git-commit - 智能提交",
90
- "guidanceStep1Detail2": "/ccjk:init-project - 初始化项目 /ccjk - 查看全部",
90
+ "guidanceStep1Detail2": "/ccjk:init-project - 初始化项目 /commands - 查看已安装",
91
+ "guidanceStep1MyclaudeDetail": "/ccjk:feat - 功能开发 /ccjk:init-project - 初始化项目",
92
+ "guidanceStep1MyclaudeDetail2": "/commit - 智能提交 /workflow - 规划功能",
91
93
  "guidanceStep2": "2. 示例:",
92
94
  "guidanceStep2Example": "/ccjk:feat 实现用户登录功能",
93
95
  "guidanceStep3": "3. 查看所有功能:",
94
96
  "guidanceStep3Command": "npx ccjk features",
97
+ "guidanceStep3Myclaude": "3. 查看已安装命令:",
98
+ "guidanceStep3MyclaudeCommand": "/commands",
95
99
  "guidanceStep4": "4. 遇到问题?运行:",
96
100
  "guidanceStep4Command": "npx ccjk doctor",
97
101
  "migration": {