ccjk 11.1.1 → 11.1.2

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/README.md CHANGED
@@ -68,6 +68,8 @@ npx ccjk init --silent
68
68
  ❌ High API costs
69
69
  ❌ Configs lost when switching machines
70
70
  ❌ Single-threaded AI execution
71
+ ❌ Can't control Claude from mobile/web
72
+ ❌ Insecure defaults in production
71
73
  ```
72
74
 
73
75
  **After CCJK:**
@@ -77,6 +79,8 @@ npx ccjk init --silent
77
79
  ✅ 30-50% lower costs
78
80
  ✅ Cloud sync across devices
79
81
  ✅ Parallel AI agents (Agent Teams)
82
+ ✅ Remote control from any device (v11.1.1)
83
+ ✅ Production-hardened security (v11.1.1)
80
84
  ```
81
85
 
82
86
  ## 🎯 Why Developers Love CCJK
@@ -88,6 +92,8 @@ npx ccjk init --silent
88
92
  | ⏰ "Setup takes forever" | 🔧 **Minimal Config** | 30 seconds, one command |
89
93
  | 🔄 "Lost my configs again" | ☁️ **Cloud Sync** | GitHub Gist / WebDAV / S3 |
90
94
  | 🤖 "Need multiple AI agents" | 🎭 **Agent Teams** | One-click parallel execution |
95
+ | 📱 "Can't control Claude from my phone" | 🌐 **Remote Control** | Web/App control with one-command setup |
96
+ | 🔐 "Worried about production security" | 🛡️ **Production-Grade Security** | HTTPS enforcement, CORS hardening, secrets validation |
91
97
 
92
98
  ## 🔥 Features That Matter
93
99
 
@@ -133,6 +139,30 @@ ccjk mcp install filesystem puppeteer postgres
133
139
  # Done. No manual config.
134
140
  ```
135
141
 
142
+ ### 🌐 Remote Control (NEW in v11.1.1)
143
+ Control Claude Code from any device — browser, phone, or tablet.
144
+ ```bash
145
+ ccjk remote setup # One-command: configure server URL, auth token & binding in 30s
146
+ ccjk remote doctor # Diagnose connectivity, auth, daemon health
147
+ ccjk remote status # Live runtime status (daemon, server, auth)
148
+ ```
149
+
150
+ **Supports both interactive and non-interactive (CI/CD) modes:**
151
+ ```bash
152
+ ccjk remote setup --non-interactive \
153
+ --server-url https://your-server.com \
154
+ --auth-token <token> \
155
+ --binding-code <code>
156
+ ```
157
+
158
+ ### 🛡️ Production-Grade Security (NEW in v11.1.1)
159
+ All config defaults are now hardened for real-world deployments:
160
+ - ✅ **HTTPS enforcement** — All service URLs require `https://` in production
161
+ - ✅ **CORS hardening** — Wildcard `*` origins rejected in production
162
+ - ✅ **Secret validation** — Dev-default secrets (`dev-secret`, `dev-session-secret`) blocked at startup
163
+ - ✅ **Fail-fast boot** — Server exits immediately on misconfiguration, no silent fallbacks
164
+ - ✅ **Daemon config loading** — Reads from `~/.ccjk/daemon.json`, validates required fields
165
+
136
166
  ### 🔓 Zero-Config Permission Presets (NEW)
137
167
  One-click permission configuration for different use cases:
138
168
  ```bash
package/README.zh-CN.md CHANGED
@@ -37,6 +37,8 @@ CCJK 为 [Claude Code](https://github.com/anthropics/claude-code) 注入超能
37
37
  - **⚡ 节省 30-50% Token** — 智能上下文压缩
38
38
  - **🔧 最小配置** — 自动检测项目类型,一条命令搞定
39
39
  - **☁️ 云端同步** — 跨设备、跨团队共享配置
40
+ - **🌐 远程控制** — 手机/网页随时掌控 Claude Code(v11.1.1 新增)
41
+ - **🛡️ 生产级安全** — HTTPS 强制、CORS 加固、密钥校验(v11.1.1 新增)
40
42
 
41
43
  ## 快速开始
42
44
 
@@ -55,9 +57,45 @@ npx ccjk
55
57
  | 60+ 分钟手动配置 | 30 秒,一条命令 |
56
58
  | Token 成本高 | 降低 30-50% |
57
59
  | 配置只在单设备 | 云端同步所有设备 |
60
+ | 无法通过手机/网页控制 Claude | 远程控制,任意设备操作 |
61
+ | 生产环境配置存局隐患 | 生产级安全加固,开笄1秒失败 |
58
62
 
59
63
  ## 核心功能
60
64
 
65
+ <details>
66
+ <summary><b>🌐 远程控制(v11.1.1 新增)</b></summary>
67
+
68
+ 任意设备控制 Claude Code — 手机、浏览器、应用均可。
69
+
70
+ ```bash
71
+ ccjk remote setup # 一键远程初始化(互动引导)
72
+ ccjk remote doctor # 远程连接体检(容错、解决建议)
73
+ ccjk remote status # 实时运行状态(Daemon 、服务器、认证)
74
+ ```
75
+
76
+ 支持 CI/CD 非交互模式:
77
+ ```bash
78
+ ccjk remote setup --non-interactive \
79
+ --server-url https://your-server.com \
80
+ --auth-token <token> \
81
+ --binding-code <code>
82
+ ```
83
+
84
+ </details>
85
+
86
+ <details>
87
+ <summary><b>🛡️ 生产级安全加固(v11.1.1 新增)</b></summary>
88
+
89
+ 所有配置默认候均已适配生产环境安全标准:
90
+
91
+ - ✅ **HTTPS 强制** — 生产环境下所有服务地址必须为 `https://`
92
+ - ✅ **CORS 加固** — 生产环境拒绝通配符 `*` 源
93
+ - ✅ **密鑰校验** — 开发默认密鑰(`dev-secret` 等)启动时直接拦截
94
+ - ✅ **快速失败** — 配置错误即刻退出,没有静默退化
95
+ - ✅ **Daemon 配置** — 从 `~/.ccjk/daemon.json` 读取,必字段校验
96
+
97
+ </details>
98
+
61
99
  <details>
62
100
  <summary><b>🧠 智能技能系统</b></summary>
63
101
 
@@ -98,9 +136,17 @@ npx ccjk cloud enable --provider github-gist
98
136
  ```bash
99
137
  npx ccjk # 交互式设置
100
138
  npx ccjk i # 完整初始化
101
- npx ccjk remote setup # 一键远程初始化(推荐)
102
- npx ccjk remote doctor # 远程体检
103
- npx ccjk remote status # 远程状态
139
+
140
+ # 远程控制(v11.1.1 新增)
141
+ ccjk remote setup # 一键远程初始化(推荐)
142
+ ccjk remote setup --non-interactive \ # CI/CD 非交互模式
143
+ --server-url https://... \
144
+ --auth-token <token> \
145
+ --binding-code <code>
146
+ ccjk remote doctor # 远程体检(含修复建议)
147
+ ccjk remote status # 实时运行状态
148
+
149
+ # 其他
104
150
  npx ccjk u # 更新工作流
105
151
  npx ccjk sync # 云端同步
106
152
  npx ccjk doctor # 健康检查
@@ -1,8 +1,8 @@
1
+ import ansis from 'ansis';
2
+ import inquirer from 'inquirer';
1
3
  import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'node:fs';
2
4
  import { homedir } from 'node:os';
3
5
  import process__default from 'node:process';
4
- import ansis from 'ansis';
5
- import inquirer from 'inquirer';
6
6
  import { join } from 'pathe';
7
7
  import { d as selectMcpServices, g as getMcpServices } from './codex.mjs';
8
8
  import { SUPPORTED_LANGS, LANG_LABELS } from './constants.mjs';
@@ -428,8 +428,8 @@ async function configureAiMemoryFeature() {
428
428
  console.log(ansis.green.bold(`
429
429
  \u{1F52C} ${isZh ? "Postmortem \u62A5\u544A" : "Postmortem Reports"}:`));
430
430
  console.log(ansis.dim("\u2500".repeat(60)));
431
- const { readdirSync: readdirSync2 } = await import('node:fs');
432
- const files = readdirSync2(postmortemDir).filter((f) => f.endsWith(".md"));
431
+ const { readdirSync } = await import('node:fs');
432
+ const files = readdirSync(postmortemDir).filter((f) => f.endsWith(".md"));
433
433
  if (files.length === 0) {
434
434
  console.log(ansis.yellow(isZh ? "\u6682\u65E0 Postmortem \u62A5\u544A" : "No postmortem reports yet"));
435
435
  } else {
@@ -544,29 +544,113 @@ async function changeScriptLanguageFeature(currentLang) {
544
544
  console.log(ansis.green(`\u2714 ${i18n.t("language:languageChanged") || "Language changed"}`));
545
545
  return lang;
546
546
  }
547
- async function configureEnvPermissionFeature() {
547
+ async function mcpManagerFeature() {
548
548
  ensureI18nInitialized();
549
+ const isZh = i18n.language === "zh-CN";
549
550
  const { choice } = await inquirer.prompt({
550
551
  type: "list",
551
552
  name: "choice",
552
- message: i18n.t("configuration:selectEnvPermissionOption") || "Select option",
553
+ message: isZh ? "\u{1F527} MCP \u7BA1\u7406 \u2014 \u9009\u62E9\u64CD\u4F5C:" : "\u{1F527} MCP Manager \u2014 Select action:",
553
554
  choices: addNumbersToChoices([
554
555
  {
555
- name: `${i18n.t("configuration:importRecommendedEnv") || "Import environment"} ${ansis.gray(
556
- `- ${i18n.t("configuration:importRecommendedEnvDesc") || "Import env settings"}`
557
- )}`,
556
+ name: isZh ? `\u{1F4CA} \u67E5\u770B MCP \u72B6\u6001 ${ansis.gray("- \u5DF2\u5B89\u88C5\u670D\u52A1\u603B\u89C8 + \u6027\u80FD\u9884\u8B66")}` : `\u{1F4CA} MCP Status ${ansis.gray("- Installed services overview + performance warning")}`,
557
+ value: "status"
558
+ },
559
+ {
560
+ name: isZh ? `\u{1FA7A} MCP \u8BCA\u65AD ${ansis.gray("- \u5065\u5EB7\u68C0\u67E5\u3001\u51B2\u7A81\u68C0\u6D4B\u3001\u4F18\u5316\u5EFA\u8BAE")}` : `\u{1FA7A} MCP Doctor ${ansis.gray("- Health check, conflict detection, optimization tips")}`,
561
+ value: "doctor"
562
+ },
563
+ {
564
+ name: isZh ? `\u{1F4CB} \u5217\u51FA\u5DF2\u5B89\u88C5\u670D\u52A1 ${ansis.gray("- \u67E5\u770B\u5DF2\u914D\u7F6E\u7684 MCP \u670D\u52A1\u8BE6\u60C5")}` : `\u{1F4CB} List installed services ${ansis.gray("- View details of configured MCP services")}`,
565
+ value: "list"
566
+ },
567
+ {
568
+ name: isZh ? `\u{1F504} \u5207\u6362\u914D\u7F6E\u9884\u8BBE ${ansis.gray("- minimal\uFF08\u8F7B\u91CF\uFF09/ dev\uFF08\u5F00\u53D1\uFF09/ full\uFF08\u5B8C\u6574\uFF09")}` : `\u{1F504} Switch profile ${ansis.gray("- minimal / dev / full preset")}`,
569
+ value: "profile"
570
+ },
571
+ {
572
+ name: isZh ? `\u{1F5D1}\uFE0F \u91CA\u653E\u95F2\u7F6E\u670D\u52A1 ${ansis.gray("- \u505C\u7528\u957F\u671F\u672A\u4F7F\u7528\u7684\u670D\u52A1\u4EE5\u8282\u7701\u8D44\u6E90")}` : `\u{1F5D1}\uFE0F Release idle services ${ansis.gray("- Disable unused services to free resources")}`,
573
+ value: "release"
574
+ },
575
+ {
576
+ name: isZh ? `\u{1F4E6} \u5B89\u88C5/\u66F4\u65B0 MCP \u670D\u52A1 ${ansis.gray("- \u8FDB\u5165\u670D\u52A1\u9009\u62E9\u5411\u5BFC\uFF08\u540C\u83DC\u5355\u9009\u9879 4\uFF09")}` : `\u{1F4E6} Install / Update services ${ansis.gray("- Open install wizard (same as menu option 4)")}`,
577
+ value: "install"
578
+ }
579
+ ])
580
+ });
581
+ if (!choice) {
582
+ await handleCancellation();
583
+ return;
584
+ }
585
+ try {
586
+ switch (choice) {
587
+ case "status": {
588
+ const { mcpStatus } = await import('./mcp.mjs');
589
+ await mcpStatus();
590
+ break;
591
+ }
592
+ case "doctor": {
593
+ const { mcpDoctor } = await import('./mcp.mjs');
594
+ await mcpDoctor();
595
+ break;
596
+ }
597
+ case "list": {
598
+ const { mcpList } = await import('./mcp.mjs');
599
+ await mcpList();
600
+ break;
601
+ }
602
+ case "profile": {
603
+ const { listProfiles, useProfile } = await import('./mcp.mjs');
604
+ await listProfiles();
605
+ const { profileId } = await inquirer.prompt({
606
+ type: "list",
607
+ name: "profileId",
608
+ message: isZh ? "\u9009\u62E9\u8981\u5207\u6362\u7684\u9884\u8BBE:" : "Select profile to switch:",
609
+ choices: [
610
+ { name: isZh ? "minimal \u2014 \u4EC5\u6838\u5FC3\u670D\u52A1\uFF08\u6700\u4F4E\u8D44\u6E90\u5360\u7528\uFF09" : "minimal \u2014 Core services only (least resources)", value: "minimal" },
611
+ { name: isZh ? "dev \u2014 \u5F00\u53D1\u5E38\u7528\u670D\u52A1\u5957\u88C5" : "dev \u2014 Dev-oriented service bundle", value: "dev" },
612
+ { name: isZh ? "full \u2014 \u5B8C\u6574\u670D\u52A1\uFF08\u9AD8\u6027\u80FD\u673A\u5668\u63A8\u8350\uFF09" : "full \u2014 Full services (high-end machines)", value: "full" }
613
+ ]
614
+ });
615
+ await useProfile(profileId);
616
+ break;
617
+ }
618
+ case "release": {
619
+ const { mcpRelease } = await import('./mcp.mjs');
620
+ await mcpRelease();
621
+ break;
622
+ }
623
+ case "install": {
624
+ await configureMcpFeature();
625
+ break;
626
+ }
627
+ }
628
+ } catch (error) {
629
+ console.error(ansis.red(`${i18n.t("common:error")}: ${error.message}`));
630
+ }
631
+ }
632
+ async function configureMergedPermissionsFeature() {
633
+ ensureI18nInitialized();
634
+ const isZh = i18n.language === "zh-CN";
635
+ const { choice } = await inquirer.prompt({
636
+ type: "list",
637
+ name: "choice",
638
+ message: isZh ? "\u6743\u9650 & \u73AF\u5883\u914D\u7F6E \u2014 \u9009\u62E9\u64CD\u4F5C:" : "Permissions & Env Setup \u2014 Select action:",
639
+ choices: addNumbersToChoices([
640
+ {
641
+ name: isZh ? `\u5BFC\u5165\u63A8\u8350\u73AF\u5883\u53D8\u91CF ${ansis.gray("- \u5199\u5165\u9690\u79C1\u4FDD\u62A4 env \u5230 settings.json")}` : `Import recommended env vars ${ansis.gray("- Write privacy env to settings.json")}`,
558
642
  value: "env"
559
643
  },
560
644
  {
561
- name: `${i18n.t("configuration:importRecommendedPermissions") || "Import permissions"} ${ansis.gray(
562
- `- ${i18n.t("configuration:importRecommendedPermissionsDesc") || "Import permission settings"}`
563
- )}`,
645
+ name: isZh ? `\u5BFC\u5165\u63A8\u8350\u6743\u9650\u914D\u7F6E ${ansis.gray("- \u8FFD\u52A0\u63A8\u8350 allow \u89C4\u5219\u5230 settings.json")}` : `Import recommended permissions ${ansis.gray("- Append recommended allow rules")}`,
564
646
  value: "permissions"
565
647
  },
566
648
  {
567
- name: `${i18n.t("configuration:openSettingsJson") || "Open settings"} ${ansis.gray(
568
- `- ${i18n.t("configuration:openSettingsJsonDesc") || "View settings file"}`
569
- )}`,
649
+ name: isZh ? `\u4E00\u952E\u6743\u9650\u9884\u8BBE ${ansis.gray("- \u6700\u5927(max) / \u5F00\u53D1\u8005(dev) / \u5B89\u5168(safe) \u9884\u8BBE")}` : `Zero-config permission preset ${ansis.gray("- max / dev / safe preset")}`,
650
+ value: "preset"
651
+ },
652
+ {
653
+ name: isZh ? `\u6253\u5F00 settings.json ${ansis.gray("- \u5728\u7F16\u8F91\u5668\u4E2D\u67E5\u770B\u5F53\u524D\u914D\u7F6E")}` : `Open settings.json ${ansis.gray("- View current config in editor")}`,
570
654
  value: "open"
571
655
  }
572
656
  ])
@@ -585,6 +669,11 @@ async function configureEnvPermissionFeature() {
585
669
  await importRecommendedPermissions();
586
670
  console.log(ansis.green(`\u2705 ${i18n.t("configuration:permissionsImportSuccess") || "Permissions imported"}`));
587
671
  break;
672
+ case "preset": {
673
+ const { zeroConfig } = await import('./zero-config.mjs');
674
+ await zeroConfig();
675
+ break;
676
+ }
588
677
  case "open":
589
678
  console.log(ansis.green(i18n.t("configuration:openingSettingsJson") || "Opening settings.json..."));
590
679
  await openSettingsJson();
@@ -595,4 +684,4 @@ async function configureEnvPermissionFeature() {
595
684
  }
596
685
  }
597
686
 
598
- export { changeScriptLanguageFeature, configureAiMemoryFeature, configureApiFeature, configureDefaultModelFeature, configureEnvPermissionFeature, configureMcpFeature, handleCustomApiMode, promptCustomModels };
687
+ export { changeScriptLanguageFeature, configureAiMemoryFeature, configureApiFeature, configureDefaultModelFeature, configureMcpFeature, configureMergedPermissionsFeature, handleCustomApiMode, mcpManagerFeature, promptCustomModels };
@@ -1,7 +1,7 @@
1
- import { existsSync } from 'node:fs';
2
- import process__default from 'node:process';
3
1
  import ansis from 'ansis';
4
2
  import inquirer from 'inquirer';
3
+ import { existsSync } from 'node:fs';
4
+ import process__default from 'node:process';
5
5
  import { join } from 'pathe';
6
6
  import { M as MCP_SERVICE_CONFIGS } from './codex.mjs';
7
7
  import { CODE_TOOL_BANNERS, CLAUDE_DIR, isCodeToolType, DEFAULT_CODE_TOOL_TYPE } from './constants.mjs';
@@ -11,7 +11,7 @@ import { updateZcfConfig, readZcfConfig } from './ccjk-config.mjs';
11
11
  import { r as readMcpConfig } from './claude-config.mjs';
12
12
  import { r as resolveCodeType } from '../shared/ccjk.CxtuJxaS.mjs';
13
13
  import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.DrMygfCF.mjs';
14
- import { changeScriptLanguageFeature, configureMcpFeature, configureEnvPermissionFeature, configureAiMemoryFeature, configureDefaultModelFeature, configureApiFeature } from './features.mjs';
14
+ import { changeScriptLanguageFeature, mcpManagerFeature, configureMergedPermissionsFeature, configureAiMemoryFeature, configureDefaultModelFeature, configureMcpFeature, configureApiFeature } from './features.mjs';
15
15
  import { p as promptBoolean } from '../shared/ccjk.DHbrGcgg.mjs';
16
16
  import { homedir } from 'node:os';
17
17
  import { runCcrStop, runCcrStart, runCcrRestart, runCcrStatus, runCcrUi } from './commands.mjs';
@@ -359,15 +359,14 @@ async function showSimplifiedMenu() {
359
359
  console.log(` ${ansis.green("1.")} ${isZh ? "\u5B8C\u6574\u521D\u59CB\u5316" : "Full Init"} ${ansis.dim(isZh ? "- \u5B89\u88C5 Claude Code + \u5BFC\u5165\u5DE5\u4F5C\u6D41 + \u914D\u7F6E API \u6216 CCR \u4EE3\u7406 + \u914D\u7F6E MCP \u670D\u52A1" : "- Install Claude Code + Import workflows + Configure API or CCR proxy + Configure MCP")}`);
360
360
  console.log(` ${ansis.green("2.")} ${isZh ? "\u5BFC\u5165\u5DE5\u4F5C\u6D41" : "Import Workflows"} ${ansis.dim(isZh ? "- \u4EC5\u5BFC\u5165/\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173\u6587\u4EF6" : "- Import/update workflow files only")}`);
361
361
  console.log(` ${ansis.green("3.")} ${isZh ? "\u914D\u7F6E API \u6216 CCR \u4EE3\u7406" : "Configure API or CCR Proxy"} ${ansis.dim(isZh ? "- \u914D\u7F6E API URL\u3001\u8BA4\u8BC1\u4FE1\u606F\u6216 CCR \u4EE3\u7406" : "- Configure API URL, auth info or CCR proxy")}`);
362
- console.log(` ${ansis.green("4.")} ${isZh ? "\u914D\u7F6E MCP" : "Configure MCP"} ${ansis.dim(isZh ? "- \u914D\u7F6E MCP \u670D\u52A1\uFF08\u542B Windows \u4FEE\u590D\uFF09" : "- Configure MCP services (with Windows fix)")}`);
362
+ console.log(` ${ansis.green("4.")} ${isZh ? "\u5B89\u88C5/\u66F4\u65B0 MCP \u670D\u52A1" : "Install / Update MCP Services"} ${ansis.dim(isZh ? "- \u591A\u9009\u5B89\u88C5\u63A8\u8350\u670D\u52A1\uFF0C\u81EA\u52A8\u5408\u5E76/\u4FEE\u590D Windows \u914D\u7F6E" : "- Multi-select & install recommended services, auto-fix Windows config")}`);
363
363
  console.log(` ${ansis.green("5.")} ${isZh ? "\u914D\u7F6E\u9ED8\u8BA4\u6A21\u578B" : "Configure Default Model"} ${ansis.dim(isZh ? "- \u8BBE\u7F6E\u9ED8\u8BA4\u6A21\u578B\uFF08opus/sonnet/sonnet 1m/\u81EA\u5B9A\u4E49\uFF09" : "- Set default model (opus/sonnet/sonnet 1m/custom)")}`);
364
364
  console.log(` ${ansis.green("6.")} ${isZh ? "\u914D\u7F6E Claude \u5168\u5C40\u8BB0\u5FC6" : "Configure Claude Memory"} ${ansis.dim(isZh ? "- \u914D\u7F6E AI \u8F93\u51FA\u8BED\u8A00\u548C\u8F93\u51FA\u98CE\u683C" : "- Configure AI output language and style")}`);
365
- console.log(` ${ansis.green("7.")} ${isZh ? "\u5BFC\u5165\u63A8\u8350\u73AF\u5883\u53D8\u91CF\u548C\u6743\u9650\u914D\u7F6E" : "Import Recommended Env & Permissions"} ${ansis.dim(isZh ? "- \u5BFC\u5165\u9690\u79C1\u4FDD\u62A4\u73AF\u5883\u53D8\u91CF\u548C\u7CFB\u7EDF\u6743\u9650\u914D\u7F6E" : "- Import privacy env vars and system permissions")}`);
366
- console.log(` ${ansis.green("8.")} ${isZh ? "\u96F6\u914D\u7F6E\u6743\u9650\u9884\u8BBE" : "Zero-Config Permission Presets"} ${ansis.dim(isZh ? "- \u4E00\u952E\u5E94\u7528\u6743\u9650\u9884\u8BBE\uFF08\u6700\u5927/\u5F00\u53D1\u8005/\u5B89\u5168\uFF09" : "- One-click permission presets (max/dev/safe)")}`);
365
+ console.log(` ${ansis.green("7.")} ${isZh ? "\u6743\u9650 & \u73AF\u5883\u914D\u7F6E" : "Permissions & Env Setup"} ${ansis.dim(isZh ? "- \u5BFC\u5165\u73AF\u5883\u53D8\u91CF / \u5BFC\u5165\u63A8\u8350\u6743\u9650 / \u4E00\u952E\u6743\u9650\u9884\u8BBE\uFF08\u6700\u5927/\u5F00\u53D1\u8005/\u5B89\u5168\uFF09" : "- Import env vars / import permissions / one-click presets (max/dev/safe)")}`);
367
366
  console.log("");
368
367
  console.log(ansis.dim(` --------- ${isZh ? "\u5176\u4ED6\u5DE5\u5177" : "Other Tools"} ----------`));
369
368
  console.log(` ${ansis.green("K.")} ${isZh ? "Skills \u7BA1\u7406" : "Skills Manager"} ${ansis.dim(isZh ? "- \u5B89\u88C5/\u66F4\u65B0/\u5220\u9664\u5DE5\u4F5C\u6D41\u6280\u80FD" : "- Install/update/remove workflow skills")}`);
370
- console.log(` ${ansis.green("M.")} ${isZh ? "MCP \u7BA1\u7406" : "MCP Manager"} ${ansis.dim(isZh ? "- \u914D\u7F6E Model Context Protocol \u670D\u52A1" : "- Configure MCP services")}`);
369
+ console.log(` ${ansis.green("M.")} ${isZh ? "MCP \u7BA1\u7406" : "MCP Manager"} ${ansis.dim(isZh ? "- \u72B6\u6001/\u8BCA\u65AD/\u5DF2\u88C5\u5217\u8868/\u5207\u6362\u9884\u8BBE/\u91CA\u653E\u95F2\u7F6E\u670D\u52A1" : "- Status / doctor / list / switch profile / release idle services")}`);
371
370
  console.log(` ${ansis.green("A.")} ${isZh ? "Agents \u7BA1\u7406" : "Agents Manager"} ${ansis.dim(isZh ? "- \u521B\u5EFA/\u7BA1\u7406 AI \u667A\u80FD\u4F53" : "- Create/manage AI agents")}`);
372
371
  console.log(` ${ansis.green("P.")} ${isZh ? "\u6301\u4E45\u5316\u7BA1\u7406" : "Persistence Manager"} ${ansis.dim(isZh ? "- \u7BA1\u7406\u4E0A\u4E0B\u6587\u5B58\u50A8\u548C\u5C42\u7EA7" : "- Manage context storage and tiers")}`);
373
372
  console.log(` ${ansis.green("R.")} ${isZh ? "CCR" : "CCR"} ${ansis.dim(isZh ? "- \u914D\u7F6E Claude Code Router \u4EE5\u4F7F\u7528\u591A\u4E2A AI \u6A21\u578B" : "- Configure Claude Code Router for multiple AI models")}`);
@@ -377,8 +376,7 @@ async function showSimplifiedMenu() {
377
376
  console.log(` ${ansis.green("S.")} ${isZh ? "\u5207\u6362\u4EE3\u7801\u5DE5\u5177" : "Switch Code Tool"} ${ansis.dim(isZh ? "- \u5728\u652F\u6301\u7684\u4EE3\u7801\u5DE5\u5177\u4E4B\u95F4\u5207\u6362 (Claude Code, Codex)" : "- Switch between supported code tools (Claude Code, Codex)")}`);
378
377
  console.log(` ${ansis.green("-.")} ${isZh ? "\u5378\u8F7D\u548C\u5220\u9664\u914D\u7F6E" : "Uninstall & Remove Config"} ${ansis.dim(isZh ? "- \u4ECE\u7CFB\u7EDF\u4E2D\u5220\u9664 Claude Code \u914D\u7F6E\u548C\u5DE5\u5177" : "- Remove Claude Code config and tools from system")}`);
379
378
  console.log(` ${ansis.green("+.")} ${isZh ? "\u68C0\u67E5\u66F4\u65B0" : "Check Updates"} ${ansis.dim(isZh ? "- \u68C0\u67E5\u5E76\u66F4\u65B0 Claude Code\u3001CCR \u7684\u7248\u672C" : "- Check and update Claude Code, CCR versions")}`);
380
- console.log(` ${ansis.green("D.")} ${isZh ? "\u4E00\u952E\u4F53\u68C0" : "Diagnostics"} ${ansis.dim(isZh ? "- \u8BCA\u65AD\u95EE\u9898\u5E76\u81EA\u52A8\u4FEE\u590D" : "- Diagnose issues and auto-fix")}`);
381
- console.log(` ${ansis.green("B.")} ${isZh ? "\u{1F9E0} Brain Dashboard" : "\u{1F9E0} Brain Dashboard"} ${ansis.dim(isZh ? "- \u67E5\u770B\u914D\u7F6E\u5065\u5EB7\u5206\u6570\u548C\u4F18\u5316\u5EFA\u8BAE" : "- Setup health score & recommendations")}`);
379
+ console.log(` ${ansis.green("D.")} ${isZh ? "\u{1F9E0} \u4F53\u68C0 & \u5065\u5EB7\u770B\u677F" : "\u{1F9E0} Health Check & Dashboard"} ${ansis.dim(isZh ? "- \u5065\u5EB7\u5206\u6570 + \u4F18\u5316\u5EFA\u8BAE + \u81EA\u52A8\u4FEE\u590D" : "- Health score + recommendations + auto-fix")}`);
382
380
  console.log(` ${ansis.green("H.")} ${isZh ? "\u5E2E\u52A9\u6587\u6863" : "Help"} ${ansis.dim(isZh ? "- \u67E5\u770B\u4F7F\u7528\u6307\u5357" : "- View user guide")}`);
383
381
  console.log(` ${ansis.green("Q.")} ${isZh ? "\u9000\u51FA" : "Exit"}`);
384
382
  console.log("");
@@ -388,7 +386,7 @@ async function showSimplifiedMenu() {
388
386
  message: isZh ? "\u8BF7\u8F93\u5165\u9009\u9879:" : "Enter option:",
389
387
  validate: (value) => {
390
388
  const normalized2 = normalizeMenuInput(value);
391
- const valid = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "k", "m", "a", "p", "r", "b", "s", "-", "+", "d", "h", "q"];
389
+ const valid = ["0", "1", "2", "3", "4", "5", "6", "7", "k", "m", "a", "p", "r", "s", "-", "+", "d", "h", "q"];
392
390
  return valid.includes(normalized2) || (isZh ? "\u8BF7\u8F93\u5165\u6709\u6548\u9009\u9879" : "Please enter a valid option");
393
391
  }
394
392
  });
@@ -424,12 +422,7 @@ async function showSimplifiedMenu() {
424
422
  break;
425
423
  }
426
424
  case "7": {
427
- await configureEnvPermissionFeature();
428
- break;
429
- }
430
- case "8": {
431
- const { zeroConfig } = await import('./zero-config.mjs');
432
- await zeroConfig();
425
+ await configureMergedPermissionsFeature();
433
426
  break;
434
427
  }
435
428
  // --------- 其他工具 ----------
@@ -438,7 +431,7 @@ async function showSimplifiedMenu() {
438
431
  break;
439
432
  }
440
433
  case "m": {
441
- await configureMcpFeature();
434
+ await mcpManagerFeature();
442
435
  break;
443
436
  }
444
437
  case "a": {
@@ -456,12 +449,6 @@ async function showSimplifiedMenu() {
456
449
  printSeparator();
457
450
  return void 0;
458
451
  }
459
- case "b": {
460
- const { dashboardCommand } = await import('./dashboard.mjs');
461
- await dashboardCommand();
462
- await inquirer.prompt({ type: "input", name: "_", message: isZh ? "\u6309\u56DE\u8F66\u8FD4\u56DE\u83DC\u5355..." : "Press Enter to return..." });
463
- return void 0;
464
- }
465
452
  // ------------ CCJK ------------
466
453
  case "0": {
467
454
  const currentLang = i18n.language;
@@ -488,7 +475,18 @@ async function showSimplifiedMenu() {
488
475
  return void 0;
489
476
  }
490
477
  case "d": {
491
- await doctor();
478
+ const { dashboardCommand } = await import('./dashboard.mjs');
479
+ await dashboardCommand();
480
+ const isZhD = i18n.language === "zh-CN";
481
+ const { runDoctor } = await inquirer.prompt({
482
+ type: "confirm",
483
+ name: "runDoctor",
484
+ message: isZhD ? "\u662F\u5426\u540C\u65F6\u8FD0\u884C\u81EA\u52A8\u4FEE\u590D\u8BCA\u65AD\uFF1F" : "Also run auto-fix diagnostics?",
485
+ default: false
486
+ });
487
+ if (runDoctor) {
488
+ await doctor();
489
+ }
492
490
  printSeparator();
493
491
  return void 0;
494
492
  }
@@ -1,4 +1,4 @@
1
- const version = "11.1.1";
1
+ const version = "11.1.2";
2
2
  const homepage = "https://github.com/miounet11/ccjk";
3
3
 
4
4
  export { homepage, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ccjk",
3
3
  "type": "module",
4
- "version": "11.1.1",
4
+ "version": "11.1.2",
5
5
  "packageManager": "pnpm@10.17.1",
6
6
  "description": "CLI toolkit for Claude Code and Codex setup. Simplifies MCP service installation, API configuration, workflow management, and multi-provider support with guided interactive setup.",
7
7
  "author": {
@@ -1,53 +1,37 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
3
  "description": "CCJK settings template — auto-migrated on upgrade",
4
-
5
4
  "model": "default",
6
-
7
5
  "env": {
8
6
  "ANTHROPIC_MODEL": "",
9
7
  "ANTHROPIC_DEFAULT_HAIKU_MODEL": "",
10
8
  "ANTHROPIC_DEFAULT_SONNET_MODEL": "",
11
9
  "ANTHROPIC_DEFAULT_OPUS_MODEL": ""
12
10
  },
13
-
14
11
  "language": "",
15
-
16
12
  "showTurnDuration": false,
17
-
18
13
  "respectGitignore": true,
19
-
20
14
  "auto": {
21
15
  "mcp": 0
22
16
  },
23
-
24
17
  "agent": "",
25
-
26
18
  "thinking": {
27
19
  "enabled": false,
28
20
  "budgetTokens": 10240
29
21
  },
30
-
31
22
  "fileSuggestion": {
32
23
  "type": "command",
33
24
  "command": "git"
34
25
  },
35
-
36
26
  "allowUnsandboxedCommands": false,
37
-
38
27
  "disallowedTools": [],
39
-
40
28
  "attribution": {},
41
-
42
29
  "index": {
43
30
  "maxFiles": 10000,
44
31
  "maxFileSize": 2097152
45
32
  },
46
-
47
33
  "allowBrowser": false,
48
-
49
34
  "statusLine": {},
50
-
51
35
  "plansDirectory": ".claude/plans",
52
36
  "hooks": {
53
37
  "PreToolUse": [],
@@ -85,13 +69,37 @@
85
69
  "Read(*)",
86
70
  "Edit(*)",
87
71
  "Write(*)",
88
- "NotebookEdit(*)"
72
+ "NotebookEdit(*)",
73
+ "Bash(cd *)",
74
+ "Bash(for *)",
75
+ "Bash(while *)",
76
+ "Bash(if *)",
77
+ "Bash(source *)",
78
+ "Bash(export *)",
79
+ "Bash(unset *)",
80
+ "Bash(rm *)",
81
+ "Bash(rmdir *)",
82
+ "Bash(tee *)",
83
+ "Bash(env *)",
84
+ "Bash(time *)",
85
+ "Bash(printf *)",
86
+ "Bash(sed *)",
87
+ "Bash(awk *)",
88
+ "Bash(tr *)",
89
+ "Bash(xargs *)",
90
+ "Bash(cut *)",
91
+ "Bash(curl *)",
92
+ "Bash(node *)",
93
+ "Bash(python *)",
94
+ "Bash(python3 *)",
95
+ "Bash(pip *)",
96
+ "Bash(pip3 *)",
97
+ "WebFetch(*)",
98
+ "MCP(*)"
89
99
  ]
90
100
  },
91
-
92
101
  "chat": {
93
102
  "alwaysApprove": []
94
103
  },
95
-
96
104
  "experimental": {}
97
- }
105
+ }