ccjk 12.0.6 → 12.0.7

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 (62) hide show
  1. package/README.md +14 -0
  2. package/README.zh-CN.md +13 -0
  3. package/dist/chunks/api-cli.mjs +1 -1
  4. package/dist/chunks/ccjk-agents.mjs +3 -2
  5. package/dist/chunks/ccjk-all.mjs +129 -1764
  6. package/dist/chunks/ccjk-hooks.mjs +5 -4
  7. package/dist/chunks/ccjk-mcp.mjs +7 -6
  8. package/dist/chunks/ccjk-setup.mjs +3 -2
  9. package/dist/chunks/ccjk-skills.mjs +6 -5
  10. package/dist/chunks/ccr.mjs +6 -5
  11. package/dist/chunks/check-updates.mjs +8 -8
  12. package/dist/chunks/claude-code-config-manager.mjs +1 -1
  13. package/dist/chunks/claude-code-incremental-manager.mjs +2 -2
  14. package/dist/chunks/codex-config-switch.mjs +1 -1
  15. package/dist/chunks/codex-provider-manager.mjs +1 -1
  16. package/dist/chunks/config-switch.mjs +1 -1
  17. package/dist/chunks/config.mjs +1 -1
  18. package/dist/chunks/config2.mjs +1 -1
  19. package/dist/chunks/config3.mjs +1 -1
  20. package/dist/chunks/constants.mjs +33 -2
  21. package/dist/chunks/dashboard.mjs +115 -3
  22. package/dist/chunks/features.mjs +3 -3
  23. package/dist/chunks/init.mjs +108 -4
  24. package/dist/chunks/installer2.mjs +7 -7
  25. package/dist/chunks/manager.mjs +1048 -0
  26. package/dist/chunks/mcp-cli.mjs +1 -1
  27. package/dist/chunks/mcp.mjs +1 -1
  28. package/dist/chunks/menu.mjs +22 -1
  29. package/dist/chunks/notification.mjs +5 -2
  30. package/dist/chunks/package.mjs +1 -1
  31. package/dist/chunks/quick-provider.mjs +1 -269
  32. package/dist/chunks/quick-setup.mjs +10 -10
  33. package/dist/chunks/remote.mjs +4 -1
  34. package/dist/chunks/simple-config.mjs +1 -1
  35. package/dist/chunks/skill.mjs +117 -9003
  36. package/dist/chunks/skill2.mjs +9003 -0
  37. package/dist/chunks/skills-sync.mjs +536 -55
  38. package/dist/chunks/skills.mjs +7 -1156
  39. package/dist/chunks/smart-defaults.mjs +87 -9
  40. package/dist/chunks/status.mjs +1 -1
  41. package/dist/chunks/uninstall.mjs +1 -1
  42. package/dist/chunks/update.mjs +2 -2
  43. package/dist/chunks/zero-config.mjs +6 -2
  44. package/dist/cli.mjs +3 -1
  45. package/dist/i18n/locales/en/cloud.json +40 -0
  46. package/dist/i18n/locales/zh-CN/cloud.json +40 -0
  47. package/dist/index.d.mts +2586 -2
  48. package/dist/index.d.ts +2586 -2
  49. package/dist/index.mjs +1340 -7
  50. package/dist/shared/ccjk.B364Fu0N.mjs +1819 -0
  51. package/dist/shared/ccjk.BtB1e5jm.mjs +171 -0
  52. package/dist/shared/{ccjk.BnpWvs9V.mjs → ccjk.BwfbSKN2.mjs} +1 -1
  53. package/dist/shared/{ccjk.AqnXPAzw.mjs → ccjk.C2jHOZVP.mjs} +1 -1
  54. package/dist/shared/{ccjk.BSYWk9ML.mjs → ccjk.Cjj8SVrn.mjs} +1 -1
  55. package/dist/shared/ccjk.D6ycHbak.mjs +270 -0
  56. package/dist/shared/ccjk.D8ZLYSZZ.mjs +299 -0
  57. package/dist/shared/{ccjk.s7OCVzdd.mjs → ccjk.DS7UESmF.mjs} +2 -1483
  58. package/dist/shared/{ccjk.BiCrMV5O.mjs → ccjk.DXRAZcix.mjs} +0 -28
  59. package/dist/shared/ccjk.UIvifqNE.mjs +1486 -0
  60. package/dist/shared/{ccjk.BDKUdmLk.mjs → ccjk.c-ETfBZ_.mjs} +208 -86
  61. package/package.json +5 -1
  62. package/templates/claude-code/common/settings.json +3 -1
@@ -1,15 +1,13 @@
1
1
  import { performance } from 'node:perf_hooks';
2
- import { c as consola, P as ProjectAnalyzer, g as getTemplatesClient } from '../shared/ccjk.s7OCVzdd.mjs';
2
+ import { c as consola, g as getTemplatesClient } from '../shared/ccjk.UIvifqNE.mjs';
3
3
  import { i as inquirer } from './index3.mjs';
4
+ import { P as ProjectAnalyzer } from '../shared/ccjk.DS7UESmF.mjs';
4
5
  import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'node:fs';
5
6
  import process__default from 'node:process';
6
7
  import { exec } from 'node:child_process';
7
8
  import { promisify } from 'node:util';
8
9
  import { j as join, d as dirname } from '../shared/ccjk.bQ7Dh1g4.mjs';
9
10
  import { i18n } from './index5.mjs';
10
- import './index8.mjs';
11
- import 'tinyglobby';
12
- import '../shared/ccjk.BBtCGd_g.mjs';
13
11
  import 'node:readline';
14
12
  import '../shared/ccjk.BAGoDD49.mjs';
15
13
  import 'stream';
@@ -24,6 +22,9 @@ import 'node:os';
24
22
  import 'node:crypto';
25
23
  import 'buffer';
26
24
  import 'string_decoder';
25
+ import './index8.mjs';
26
+ import 'tinyglobby';
27
+ import '../shared/ccjk.BBtCGd_g.mjs';
27
28
  import 'node:url';
28
29
 
29
30
  var HookType = /* @__PURE__ */ ((HookType2) => {
@@ -1,18 +1,14 @@
1
1
  import { join } from 'node:path';
2
2
  import { cwd } from 'node:process';
3
3
  import a from './index2.mjs';
4
- import { c as consola, a as analyzeProject, g as getTemplatesClient } from '../shared/ccjk.s7OCVzdd.mjs';
4
+ import { c as consola, g as getTemplatesClient } from '../shared/ccjk.UIvifqNE.mjs';
5
5
  import { i as inquirer } from './index3.mjs';
6
+ import { a as analyzeProject } from '../shared/ccjk.DS7UESmF.mjs';
6
7
  import { CLAUDE_DIR } from './constants.mjs';
7
8
  import { ensureI18nInitialized, i18n } from './index5.mjs';
8
9
  import { b as backupMcpConfig, r as readMcpConfig, m as mergeMcpServers, w as writeMcpConfig } from './claude-config.mjs';
9
10
  import { h as commandExists } from './platform.mjs';
10
11
  import '../shared/ccjk.BAGoDD49.mjs';
11
- import 'node:fs';
12
- import './index8.mjs';
13
- import '../shared/ccjk.bQ7Dh1g4.mjs';
14
- import 'tinyglobby';
15
- import '../shared/ccjk.BBtCGd_g.mjs';
16
12
  import 'node:readline';
17
13
  import 'stream';
18
14
  import 'node:tty';
@@ -26,6 +22,11 @@ import 'node:os';
26
22
  import 'node:crypto';
27
23
  import 'buffer';
28
24
  import 'string_decoder';
25
+ import 'node:fs';
26
+ import './index8.mjs';
27
+ import '../shared/ccjk.bQ7Dh1g4.mjs';
28
+ import 'tinyglobby';
29
+ import '../shared/ccjk.BBtCGd_g.mjs';
29
30
  import 'node:url';
30
31
  import './json-config.mjs';
31
32
  import '../shared/ccjk.RyizuzOI.mjs';
@@ -1,5 +1,6 @@
1
1
  import a from './index2.mjs';
2
- import { c as consola, P as ProjectAnalyzer } from '../shared/ccjk.s7OCVzdd.mjs';
2
+ import { c as consola } from '../shared/ccjk.UIvifqNE.mjs';
3
+ import { P as ProjectAnalyzer } from '../shared/ccjk.DS7UESmF.mjs';
3
4
  import { i18n } from './index5.mjs';
4
5
  import { promises } from 'node:fs';
5
6
  import { performance } from 'node:perf_hooks';
@@ -18,7 +19,7 @@ import 'node:url';
18
19
  import './constants.mjs';
19
20
  import 'node:os';
20
21
  import '../shared/ccjk.CfKKcvWy.mjs';
21
- import '../shared/ccjk.AqnXPAzw.mjs';
22
+ import '../shared/ccjk.C2jHOZVP.mjs';
22
23
  import './index3.mjs';
23
24
  import 'node:readline';
24
25
  import 'stream';
@@ -3,15 +3,12 @@ import { homedir } from 'node:os';
3
3
  import { join, dirname } from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import a from './index2.mjs';
6
- import { c as consola, a as analyzeProject, g as getTemplatesClient } from '../shared/ccjk.s7OCVzdd.mjs';
6
+ import { c as consola, g as getTemplatesClient } from '../shared/ccjk.UIvifqNE.mjs';
7
7
  import { i as inquirer } from './index3.mjs';
8
+ import { a as analyzeProject } from '../shared/ccjk.DS7UESmF.mjs';
8
9
  import { i18n } from './index5.mjs';
9
10
  import { g as getSkillParser } from '../shared/ccjk.DsYaCCx4.mjs';
10
11
  import '../shared/ccjk.BAGoDD49.mjs';
11
- import './index8.mjs';
12
- import '../shared/ccjk.bQ7Dh1g4.mjs';
13
- import 'tinyglobby';
14
- import '../shared/ccjk.BBtCGd_g.mjs';
15
12
  import 'node:readline';
16
13
  import 'stream';
17
14
  import 'node:tty';
@@ -25,6 +22,10 @@ import 'child_process';
25
22
  import 'node:crypto';
26
23
  import 'buffer';
27
24
  import 'string_decoder';
25
+ import './index8.mjs';
26
+ import '../shared/ccjk.bQ7Dh1g4.mjs';
27
+ import 'tinyglobby';
28
+ import '../shared/ccjk.BBtCGd_g.mjs';
28
29
 
29
30
  const __filename = fileURLToPath(import.meta.url);
30
31
  const __dirname = dirname(__filename);
@@ -42,17 +42,17 @@ import './json-config.mjs';
42
42
  import './config.mjs';
43
43
  import './claude-config.mjs';
44
44
  import './platform.mjs';
45
- import '../shared/ccjk.BiCrMV5O.mjs';
45
+ import '../shared/ccjk.DXRAZcix.mjs';
46
46
  import '../shared/ccjk.BFQ7yr5S.mjs';
47
47
  import './prompts.mjs';
48
48
  import '../shared/ccjk.DOwtZMk8.mjs';
49
- import '../shared/ccjk.BSYWk9ML.mjs';
49
+ import '../shared/ccjk.Cjj8SVrn.mjs';
50
50
  import './smart-defaults.mjs';
51
51
  import '../shared/ccjk.BrPUmTqm.mjs';
52
52
  import './features.mjs';
53
53
  import './config2.mjs';
54
54
  import './init.mjs';
55
- import '../shared/ccjk.BnpWvs9V.mjs';
55
+ import '../shared/ccjk.BwfbSKN2.mjs';
56
56
  import './auto-updater.mjs';
57
57
  import './version-checker.mjs';
58
58
  import './installer.mjs';
@@ -60,11 +60,12 @@ import '../shared/ccjk._dESH4Rk.mjs';
60
60
  import './simple-config.mjs';
61
61
  import './commands.mjs';
62
62
  import './ccjk-agents.mjs';
63
- import '../shared/ccjk.s7OCVzdd.mjs';
63
+ import '../shared/ccjk.UIvifqNE.mjs';
64
+ import '../shared/ccjk.DS7UESmF.mjs';
64
65
  import './index8.mjs';
65
66
  import 'tinyglobby';
66
67
  import '../shared/ccjk.CfKKcvWy.mjs';
67
- import '../shared/ccjk.AqnXPAzw.mjs';
68
+ import '../shared/ccjk.C2jHOZVP.mjs';
68
69
  import './ccjk-skills.mjs';
69
70
  import '../shared/ccjk.DsYaCCx4.mjs';
70
71
  import './check-updates.mjs';
@@ -1,7 +1,7 @@
1
1
  import process__default from 'node:process';
2
2
  import a from './index2.mjs';
3
3
  import { ensureI18nInitialized, i18n } from './index5.mjs';
4
- import { r as resolveCodeType } from '../shared/ccjk.BSYWk9ML.mjs';
4
+ import { r as resolveCodeType } from '../shared/ccjk.Cjj8SVrn.mjs';
5
5
  import { checkAndUpdateTools } from './auto-updater.mjs';
6
6
  import { r as runCodexUpdate } from './codex.mjs';
7
7
  import '../shared/ccjk.BAGoDD49.mjs';
@@ -11,6 +11,12 @@ import '../shared/ccjk.bQ7Dh1g4.mjs';
11
11
  import './smart-defaults.mjs';
12
12
  import 'node:child_process';
13
13
  import 'node:os';
14
+ import './constants.mjs';
15
+ import './json-config.mjs';
16
+ import '../shared/ccjk.RyizuzOI.mjs';
17
+ import './fs-operations.mjs';
18
+ import 'node:crypto';
19
+ import 'node:fs/promises';
14
20
  import './platform.mjs';
15
21
  import './main.mjs';
16
22
  import 'module';
@@ -18,15 +24,9 @@ import 'node:path';
18
24
  import 'node:stream';
19
25
  import 'node:readline';
20
26
  import '../shared/ccjk.BrPUmTqm.mjs';
21
- import './constants.mjs';
22
27
  import './ccjk-config.mjs';
23
28
  import '../shared/ccjk.BBtCGd_g.mjs';
24
29
  import './index6.mjs';
25
- import './fs-operations.mjs';
26
- import 'node:crypto';
27
- import 'node:fs/promises';
28
- import './json-config.mjs';
29
- import '../shared/ccjk.RyizuzOI.mjs';
30
30
  import './index7.mjs';
31
31
  import 'node:util';
32
32
  import '../shared/ccjk.Cjgrln_h.mjs';
@@ -44,7 +44,7 @@ import './version-checker.mjs';
44
44
  import '../shared/ccjk.CxpGa6MC.mjs';
45
45
  import './config.mjs';
46
46
  import './claude-config.mjs';
47
- import '../shared/ccjk.BiCrMV5O.mjs';
47
+ import '../shared/ccjk.DXRAZcix.mjs';
48
48
  import '../shared/ccjk.BFQ7yr5S.mjs';
49
49
  import './prompts.mjs';
50
50
  import '../shared/ccjk.gDEDGD_t.mjs';
@@ -35,7 +35,7 @@ import './main.mjs';
35
35
  import 'module';
36
36
  import 'node:child_process';
37
37
  import 'node:stream';
38
- import '../shared/ccjk.BiCrMV5O.mjs';
38
+ import '../shared/ccjk.DXRAZcix.mjs';
39
39
 
40
40
  class ClaudeCodeConfigManager {
41
41
  static CONFIG_FILE = ZCF_CONFIG_FILE;
@@ -4,7 +4,7 @@ import { ensureI18nInitialized, i18n } from './index5.mjs';
4
4
  import { ClaudeCodeConfigManager } from './claude-code-config-manager.mjs';
5
5
  import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
6
6
  import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
7
- import { v as validateApiKey } from '../shared/ccjk.BnpWvs9V.mjs';
7
+ import { v as validateApiKey } from '../shared/ccjk.BwfbSKN2.mjs';
8
8
  import '../shared/ccjk.BAGoDD49.mjs';
9
9
  import 'node:readline';
10
10
  import 'stream';
@@ -39,7 +39,7 @@ import './main.mjs';
39
39
  import 'module';
40
40
  import 'node:child_process';
41
41
  import 'node:stream';
42
- import '../shared/ccjk.BiCrMV5O.mjs';
42
+ import '../shared/ccjk.DXRAZcix.mjs';
43
43
 
44
44
  function getAuthTypeLabel(authType) {
45
45
  ensureI18nInitialized();
@@ -41,7 +41,7 @@ import './index6.mjs';
41
41
  import './config.mjs';
42
42
  import './claude-config.mjs';
43
43
  import './platform.mjs';
44
- import '../shared/ccjk.BiCrMV5O.mjs';
44
+ import '../shared/ccjk.DXRAZcix.mjs';
45
45
  import './prompts.mjs';
46
46
  import '../shared/ccjk.gDEDGD_t.mjs';
47
47
 
@@ -38,7 +38,7 @@ import './json-config.mjs';
38
38
  import './config.mjs';
39
39
  import './claude-config.mjs';
40
40
  import './platform.mjs';
41
- import '../shared/ccjk.BiCrMV5O.mjs';
41
+ import '../shared/ccjk.DXRAZcix.mjs';
42
42
  import '../shared/ccjk.BFQ7yr5S.mjs';
43
43
  import './prompts.mjs';
44
44
  import '../shared/ccjk.gDEDGD_t.mjs';
@@ -39,7 +39,7 @@ import './main.mjs';
39
39
  import 'module';
40
40
  import 'node:child_process';
41
41
  import 'node:stream';
42
- import '../shared/ccjk.BiCrMV5O.mjs';
42
+ import '../shared/ccjk.DXRAZcix.mjs';
43
43
  import './index7.mjs';
44
44
  import '../shared/ccjk.CxpGa6MC.mjs';
45
45
  import './prompts.mjs';
@@ -7,7 +7,7 @@ import { ensureI18nInitialized, i18n } from './index5.mjs';
7
7
  import { s as setPrimaryApiKey, c as addCompletedOnboarding, d as deepMerge } from './claude-config.mjs';
8
8
  import { exists, ensureDir, copyDir, writeFileAtomic, copyFile } from './fs-operations.mjs';
9
9
  import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
10
- import { m as mergeAndCleanPermissions } from '../shared/ccjk.BiCrMV5O.mjs';
10
+ import { m as mergeAndCleanPermissions } from '../shared/ccjk.DXRAZcix.mjs';
11
11
  import { j as join, d as dirname } from '../shared/ccjk.bQ7Dh1g4.mjs';
12
12
 
13
13
  const MODEL_ENV_KEYS = [
@@ -33,7 +33,7 @@ import 'module';
33
33
  import 'node:stream';
34
34
  import './fs-operations.mjs';
35
35
  import 'node:fs/promises';
36
- import '../shared/ccjk.BiCrMV5O.mjs';
36
+ import '../shared/ccjk.DXRAZcix.mjs';
37
37
 
38
38
  const PROVIDER_PRESETS_URL = "https://pub-0dc3e1677e894f07bbea11b17a29e032.r2.dev/providers.json";
39
39
  async function fetchProviderPresets() {
@@ -33,7 +33,7 @@ import './main.mjs';
33
33
  import 'module';
34
34
  import 'node:child_process';
35
35
  import 'node:stream';
36
- import '../shared/ccjk.BiCrMV5O.mjs';
36
+ import '../shared/ccjk.DXRAZcix.mjs';
37
37
 
38
38
  async function getConfig(key, options = {}) {
39
39
  const isZh = i18n.language === "zh-CN";
@@ -35,7 +35,38 @@ const CCJK_CLOUD_PLUGINS_DIR = join(CCJK_CONFIG_DIR, "cloud-plugins");
35
35
  const CCJK_CLOUD_PLUGINS_CACHE_DIR = join(CCJK_CLOUD_PLUGINS_DIR, "cache");
36
36
  join(CCJK_CLOUD_PLUGINS_CACHE_DIR, "plugins.json");
37
37
  const CCJK_CLOUD_PLUGINS_INSTALLED_DIR = join(CCJK_CLOUD_PLUGINS_DIR, "installed");
38
- const CCJK_CLOUD_API_URL = "https://api.api.claudehome.cn/v1";
38
+ const CLOUD_ENDPOINTS = {
39
+ /**
40
+ * Main API - Core cloud services
41
+ * Used for: project analysis, templates, telemetry
42
+ */
43
+ MAIN: {
44
+ BASE_URL: "https://api.claudehome.cn",
45
+ API_VERSION: "/api/v1"
46
+ },
47
+ /**
48
+ * Plugins API - Marketplace and cloud plugins
49
+ * Used for: plugin discovery, installation, ratings
50
+ */
51
+ PLUGINS: {
52
+ BASE_URL: "https://api.api.claudehome.cn",
53
+ API_VERSION: "/v1"
54
+ },
55
+ /**
56
+ * Remote API - Real-time features
57
+ * Used for: notifications, WebSocket connections
58
+ */
59
+ REMOTE: {
60
+ BASE_URL: "https://remote-api.claudehome.cn",
61
+ API_VERSION: ""
62
+ // No version prefix for remote API
63
+ }
64
+ };
65
+ function getCloudApiUrl(endpoint) {
66
+ const config = CLOUD_ENDPOINTS[endpoint];
67
+ return `${config.BASE_URL}${config.API_VERSION}`;
68
+ }
69
+ const CCJK_CLOUD_API_URL = getCloudApiUrl("PLUGINS");
39
70
  const LEGACY_ZCF_CONFIG_DIR = join(homedir(), ".ufomiao", "zcf");
40
71
  const LEGACY_ZCF_CONFIG_FILE = join(LEGACY_ZCF_CONFIG_DIR, "config.toml");
41
72
  const LEGACY_ZCF_CONFIG_FILES = [
@@ -99,4 +130,4 @@ function getAiOutputLanguageLabel(lang) {
99
130
  return lang;
100
131
  }
101
132
 
102
- export { AIDER_DIR, AI_OUTPUT_LANGUAGES, API_DEFAULT_URL, CCJK_CLOUD_API_URL, CCJK_CLOUD_PLUGINS_CACHE_DIR, CCJK_CLOUD_PLUGINS_DIR, CCJK_CLOUD_PLUGINS_INSTALLED_DIR, CCJK_CONFIG_DIR, CCJK_CONFIG_FILE, CCJK_PLUGINS_DIR, CCJK_SKILLS_DIR, CLAUDE_AGENTS_DIR, CLAUDE_DIR, CLAUDE_VSC_CONFIG_FILE, CLINE_DIR, CODEX_AGENTS_FILE, CODEX_AUTH_FILE, CODEX_CONFIG_FILE, CODEX_DIR, CODEX_PROMPTS_DIR, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, CONTINUE_DIR, CURSOR_DIR, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_DIR, LEGACY_ZCF_CONFIG_FILE, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, getAiOutputLanguageLabel, isCodeToolType, resolveCodeToolType };
133
+ export { AIDER_DIR, AI_OUTPUT_LANGUAGES, API_DEFAULT_URL, CCJK_CLOUD_API_URL, CCJK_CLOUD_PLUGINS_CACHE_DIR, CCJK_CLOUD_PLUGINS_DIR, CCJK_CLOUD_PLUGINS_INSTALLED_DIR, CCJK_CONFIG_DIR, CCJK_CONFIG_FILE, CCJK_PLUGINS_DIR, CCJK_SKILLS_DIR, CLAUDE_AGENTS_DIR, CLAUDE_DIR, CLAUDE_VSC_CONFIG_FILE, CLINE_DIR, CLOUD_ENDPOINTS, CODEX_AGENTS_FILE, CODEX_AUTH_FILE, CODEX_CONFIG_FILE, CODEX_DIR, CODEX_PROMPTS_DIR, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, CONTINUE_DIR, CURSOR_DIR, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_DIR, LEGACY_ZCF_CONFIG_FILE, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, getAiOutputLanguageLabel, getCloudApiUrl, isCodeToolType, resolveCodeToolType };
@@ -1,11 +1,122 @@
1
+ import a from './index2.mjs';
1
2
  import { existsSync, statSync } from 'node:fs';
2
3
  import { homedir } from 'node:os';
3
4
  import process__default from 'node:process';
4
- import a from './index2.mjs';
5
5
  import { i18n } from './index5.mjs';
6
- import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
6
+ import { createHash } from 'node:crypto';
7
+ import { exec as q } from './main.mjs';
8
+ import { n as normalize, j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
7
9
  import '../shared/ccjk.BAGoDD49.mjs';
8
10
  import 'node:url';
11
+ import 'module';
12
+ import 'node:child_process';
13
+ import 'node:path';
14
+ import 'node:stream';
15
+ import 'node:readline';
16
+
17
+ async function generateProjectHash(projectPath) {
18
+ let normalizedPath = normalize(projectPath);
19
+ normalizedPath = normalizedPath.replace(/[/\\]+$/, "");
20
+ const gitInfo = await getGitInfo(normalizedPath);
21
+ const hashInput = [
22
+ normalizedPath,
23
+ gitInfo.remote || "",
24
+ gitInfo.branch || ""
25
+ ].join("|");
26
+ const hash = createHash("sha256").update(hashInput).digest("hex").substring(0, 16);
27
+ return {
28
+ path: normalizedPath,
29
+ gitRemote: gitInfo.remote,
30
+ gitBranch: gitInfo.branch,
31
+ hash
32
+ };
33
+ }
34
+ async function getGitInfo(projectPath) {
35
+ try {
36
+ const gitDir = join(projectPath, ".git");
37
+ if (!existsSync(gitDir)) {
38
+ return {};
39
+ }
40
+ let remote;
41
+ try {
42
+ const remoteResult = await q("git", ["remote", "get-url", "origin"], {
43
+ nodeOptions: { cwd: projectPath }
44
+ });
45
+ remote = remoteResult.stdout?.trim();
46
+ } catch {
47
+ }
48
+ let branch;
49
+ try {
50
+ const branchResult = await q("git", ["rev-parse", "--abbrev-ref", "HEAD"], {
51
+ nodeOptions: { cwd: projectPath }
52
+ });
53
+ branch = branchResult.stdout?.trim();
54
+ } catch {
55
+ }
56
+ return { remote, branch };
57
+ } catch {
58
+ return {};
59
+ }
60
+ }
61
+ class ProjectHashCache {
62
+ cache = /* @__PURE__ */ new Map();
63
+ cacheTimeout = 5 * 60 * 1e3;
64
+ // 5 minutes
65
+ timestamps = /* @__PURE__ */ new Map();
66
+ /**
67
+ * Get or generate project identity
68
+ *
69
+ * @param projectPath - Project directory path
70
+ * @param forceRefresh - Force cache refresh
71
+ * @returns Project identity
72
+ */
73
+ async get(projectPath, forceRefresh = false) {
74
+ let normalizedPath = normalize(projectPath);
75
+ normalizedPath = normalizedPath.replace(/[/\\]+$/, "");
76
+ const now = Date.now();
77
+ const timestamp = this.timestamps.get(normalizedPath);
78
+ if (!forceRefresh && timestamp && now - timestamp < this.cacheTimeout) {
79
+ const cached = this.cache.get(normalizedPath);
80
+ if (cached) {
81
+ return cached;
82
+ }
83
+ }
84
+ const identity = await generateProjectHash(normalizedPath);
85
+ this.cache.set(normalizedPath, identity);
86
+ this.timestamps.set(normalizedPath, now);
87
+ return identity;
88
+ }
89
+ /**
90
+ * Clear cache for specific project or all projects
91
+ *
92
+ * @param projectPath - Optional project path to clear
93
+ */
94
+ clear(projectPath) {
95
+ if (projectPath) {
96
+ let normalizedPath = normalize(projectPath);
97
+ normalizedPath = normalizedPath.replace(/[/\\]+$/, "");
98
+ this.cache.delete(normalizedPath);
99
+ this.timestamps.delete(normalizedPath);
100
+ } else {
101
+ this.cache.clear();
102
+ this.timestamps.clear();
103
+ }
104
+ }
105
+ /**
106
+ * Get cache statistics
107
+ */
108
+ getStats() {
109
+ const timestamps = Array.from(this.timestamps.values());
110
+ return {
111
+ size: this.cache.size,
112
+ oldestEntry: timestamps.length > 0 ? Math.min(...timestamps) : void 0
113
+ };
114
+ }
115
+ }
116
+ const projectHashCache = new ProjectHashCache();
117
+ async function getProjectIdentity(projectPath, forceRefresh = false) {
118
+ return projectHashCache.get(projectPath, forceRefresh);
119
+ }
9
120
 
10
121
  const DB_PATH = join(homedir(), ".ccjk", "context", "contexts.db");
11
122
  const WAL_PATH = `${DB_PATH}-wal`;
@@ -125,7 +236,8 @@ async function collectDashboardData() {
125
236
  );
126
237
  }
127
238
  try {
128
- const projectHash = "default";
239
+ const projectIdentity = await getProjectIdentity(process__default.cwd());
240
+ const projectHash = projectIdentity.hash;
129
241
  const hotContexts = persistence.getHotContexts(projectHash, 100);
130
242
  const warmContexts = persistence.getWarmContexts(projectHash, 100);
131
243
  const coldContexts = persistence.getColdContexts(projectHash, 100);
@@ -11,7 +11,7 @@ import { setupCcrConfiguration } from './config2.mjs';
11
11
  import { a as isCcrInstalled, b as installCcr } from './init.mjs';
12
12
  import { r as readMcpConfig, f as fixWindowsMcpConfig, w as writeMcpConfig, b as backupMcpConfig, a as buildMcpServerConfig, m as mergeMcpServers } from './claude-config.mjs';
13
13
  import { a as applyAiLanguageDirective, g as getExistingModelConfig, u as updateCustomModel, d as updateDefaultModel, e as getExistingApiConfig, p as promptApiConfigurationAction, f as configureApi, s as switchToOfficialLogin } from './config.mjs';
14
- import { c as configureOutputStyle, a as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.BnpWvs9V.mjs';
14
+ import { c as configureOutputStyle, a as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.BwfbSKN2.mjs';
15
15
  import { i as isWindows } from './platform.mjs';
16
16
  import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
17
17
  import { openSettingsJson, importRecommendedPermissions, importRecommendedEnv } from './simple-config.mjs';
@@ -49,13 +49,13 @@ import './index6.mjs';
49
49
  import './banner.mjs';
50
50
  import './auto-updater.mjs';
51
51
  import './version-checker.mjs';
52
- import '../shared/ccjk.BSYWk9ML.mjs';
52
+ import '../shared/ccjk.Cjj8SVrn.mjs';
53
53
  import './smart-defaults.mjs';
54
54
  import '../shared/ccjk.BrPUmTqm.mjs';
55
55
  import '../shared/ccjk.BIxuVL3_.mjs';
56
56
  import './installer.mjs';
57
57
  import '../shared/ccjk._dESH4Rk.mjs';
58
- import '../shared/ccjk.BiCrMV5O.mjs';
58
+ import '../shared/ccjk.DXRAZcix.mjs';
59
59
 
60
60
  async function handleCancellation() {
61
61
  ensureI18nInitialized();