ccjk 9.12.0 → 9.12.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.
@@ -15,6 +15,9 @@ import 'node:crypto';
15
15
  import 'node:fs/promises';
16
16
 
17
17
  const ENV_KEY = "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS";
18
+ function t(key, opts) {
19
+ return i18n.t(`agent-teams:${key}`, opts);
20
+ }
18
21
  function readSettings() {
19
22
  if (!existsSync(SETTINGS_FILE)) return {};
20
23
  try {
@@ -48,26 +51,24 @@ function setTeammateMode(mode) {
48
51
  }
49
52
  async function agentTeamsCommand(options) {
50
53
  ensureI18nInitialized();
51
- const isZh = i18n.language === "zh-CN";
52
54
  if (options.status) {
53
- printStatus(isZh);
55
+ printStatus();
54
56
  return;
55
57
  }
56
58
  if (options.on !== void 0 || options.off !== void 0) {
57
59
  const enable = options.on === true;
58
60
  setAgentTeams(enable);
59
- const label = enable ? isZh ? "\u2705 Agent Teams \u5DF2\u542F\u7528" : "\u2705 Agent Teams enabled" : isZh ? "\u2B1C Agent Teams \u5DF2\u7981\u7528" : "\u2B1C Agent Teams disabled";
60
- console.log(ansis.green(label));
61
+ console.log(ansis.green(t(enable ? "enabled" : "disabled")));
61
62
  return;
62
63
  }
63
64
  if (options.mode) {
64
65
  const valid = ["auto", "in-process", "tmux"];
65
66
  if (!valid.includes(options.mode)) {
66
- console.log(ansis.red(`Invalid mode. Use: ${valid.join(", ")}`));
67
+ console.log(ansis.red(t("invalidMode")));
67
68
  return;
68
69
  }
69
70
  setTeammateMode(options.mode);
70
- console.log(ansis.green(`Teammate mode set to: ${options.mode}`));
71
+ console.log(ansis.green(t("modeSet", { mode: options.mode })));
71
72
  return;
72
73
  }
73
74
  const current = isAgentTeamsEnabled();
@@ -75,36 +76,35 @@ async function agentTeamsCommand(options) {
75
76
  const { action } = await inquirer.prompt([{
76
77
  type: "list",
77
78
  name: "action",
78
- message: isZh ? "Agent Teams \u8BBE\u7F6E" : "Agent Teams Settings",
79
+ message: t("settings"),
79
80
  choices: [
80
81
  {
81
- name: current ? isZh ? "\u{1F534} \u5173\u95ED Agent Teams" : "\u{1F534} Disable Agent Teams" : isZh ? "\u{1F7E2} \u542F\u7528 Agent Teams" : "\u{1F7E2} Enable Agent Teams",
82
+ name: current ? t("toggleDisable") : t("toggleEnable"),
82
83
  value: "toggle"
83
84
  },
84
85
  {
85
- name: isZh ? "\u{1F5A5}\uFE0F \u8BBE\u7F6E Teammate \u663E\u793A\u6A21\u5F0F" : "\u{1F5A5}\uFE0F Set teammate display mode",
86
+ name: t("setMode"),
86
87
  value: "mode"
87
88
  },
88
89
  {
89
- name: isZh ? "\u{1F4CA} \u67E5\u770B\u72B6\u6001" : "\u{1F4CA} View status",
90
+ name: t("viewStatus"),
90
91
  value: "status"
91
92
  },
92
93
  {
93
- name: isZh ? "\u21A9\uFE0F \u8FD4\u56DE" : "\u21A9\uFE0F Back",
94
+ name: t("back"),
94
95
  value: "back"
95
96
  }
96
97
  ]
97
98
  }]);
98
99
  if (action === "toggle") {
99
100
  setAgentTeams(!current);
100
- const label = !current ? isZh ? "\u2705 Agent Teams \u5DF2\u542F\u7528" : "\u2705 Agent Teams enabled" : isZh ? "\u2B1C Agent Teams \u5DF2\u7981\u7528" : "\u2B1C Agent Teams disabled";
101
- console.log(ansis.green(label));
101
+ console.log(ansis.green(t(!current ? "enabled" : "disabled")));
102
102
  } else if (action === "mode") {
103
103
  const currentMode = getTeammateMode();
104
104
  const { mode } = await inquirer.prompt([{
105
105
  type: "list",
106
106
  name: "mode",
107
- message: isZh ? "\u9009\u62E9 Teammate \u663E\u793A\u6A21\u5F0F" : "Select teammate display mode",
107
+ message: t("selectMode"),
108
108
  choices: [
109
109
  { name: `auto ${currentMode === "auto" ? "(current)" : ""}`, value: "auto" },
110
110
  { name: `in-process ${currentMode === "in-process" ? "(current)" : ""}`, value: "in-process" },
@@ -112,24 +112,24 @@ async function agentTeamsCommand(options) {
112
112
  ]
113
113
  }]);
114
114
  setTeammateMode(mode);
115
- console.log(ansis.green(`Teammate mode: ${mode}`));
115
+ console.log(ansis.green(t("modeSet", { mode })));
116
116
  } else if (action === "status") {
117
- printStatus(isZh);
117
+ printStatus();
118
118
  }
119
119
  }
120
- function printStatus(isZh) {
120
+ function printStatus() {
121
121
  const enabled = isAgentTeamsEnabled();
122
122
  const mode = getTeammateMode();
123
123
  console.log();
124
- console.log(ansis.bold(isZh ? "\u{1F916} Agent Teams \u72B6\u6001" : "\u{1F916} Agent Teams Status"));
124
+ console.log(ansis.bold(t("statusTitle")));
125
125
  console.log(ansis.gray("\u2500".repeat(40)));
126
- console.log(` ${isZh ? "\u72B6\u6001" : "Status"}: ${enabled ? ansis.green("\u2705 Enabled") : ansis.dim("\u2B1C Disabled")}`);
127
- console.log(` ${isZh ? "\u6A21\u5F0F" : "Mode"}: ${ansis.cyan(mode)}`);
126
+ console.log(` ${t("statusLabel")}: ${enabled ? ansis.green("\u2705 Enabled") : ansis.dim("\u2B1C Disabled")}`);
127
+ console.log(` ${t("modeLabel")}: ${ansis.cyan(mode)}`);
128
128
  console.log();
129
129
  if (!enabled) {
130
- console.log(ansis.dim(isZh ? " \u542F\u7528: ccjk agent-teams --on" : " Enable: ccjk agent-teams --on"));
130
+ console.log(ansis.dim(` ${t("enableHint")}`));
131
131
  } else {
132
- console.log(ansis.dim(isZh ? ' \u4F7F\u7528: \u5728 Claude Code \u4E2D\u8BF4 "Create an agent team to..."' : ' Usage: Tell Claude "Create an agent team to..."'));
132
+ console.log(ansis.dim(` ${t("usageHint")}`));
133
133
  }
134
134
  console.log();
135
135
  }
@@ -7,6 +7,8 @@ import { dirname, join } from 'pathe';
7
7
 
8
8
  const i18n = i18next.createInstance();
9
9
  const NAMESPACES = [
10
+ "agent-teams",
11
+ // Agent Teams quick-enable
10
12
  "agentBrowser",
11
13
  // Agent Browser - AI browser automation
12
14
  "common",
@@ -1,4 +1,4 @@
1
- const version = "9.12.0";
1
+ const version = "9.12.1";
2
2
  const homepage = "https://github.com/miounet11/ccjk";
3
3
 
4
4
  export { homepage, version };
@@ -0,0 +1,18 @@
1
+ {
2
+ "settings": "Agent Teams Settings",
3
+ "enabled": "✅ Agent Teams enabled",
4
+ "disabled": "⬜ Agent Teams disabled",
5
+ "invalidMode": "Invalid mode. Use: auto, in-process, tmux",
6
+ "modeSet": "Teammate mode set to: {{mode}}",
7
+ "toggleEnable": "🟢 Enable Agent Teams",
8
+ "toggleDisable": "🔴 Disable Agent Teams",
9
+ "setMode": "🖥️ Set teammate display mode",
10
+ "viewStatus": "📊 View status",
11
+ "back": "↩️ Back",
12
+ "selectMode": "Select teammate display mode",
13
+ "statusTitle": "🤖 Agent Teams Status",
14
+ "statusLabel": "Status",
15
+ "modeLabel": "Mode",
16
+ "enableHint": "Enable: ccjk agent-teams --on",
17
+ "usageHint": "Usage: Tell Claude \"Create an agent team to...\""
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "settings": "Agent Teams 设置",
3
+ "enabled": "✅ Agent Teams 已启用",
4
+ "disabled": "⬜ Agent Teams 已禁用",
5
+ "invalidMode": "无效模式,可选:auto, in-process, tmux",
6
+ "modeSet": "Teammate 显示模式已设为:{{mode}}",
7
+ "toggleEnable": "🟢 启用 Agent Teams",
8
+ "toggleDisable": "🔴 关闭 Agent Teams",
9
+ "setMode": "🖥️ 设置 Teammate 显示模式",
10
+ "viewStatus": "📊 查看状态",
11
+ "back": "↩️ 返回",
12
+ "selectMode": "选择 Teammate 显示模式",
13
+ "statusTitle": "🤖 Agent Teams 状态",
14
+ "statusLabel": "状态",
15
+ "modeLabel": "模式",
16
+ "enableHint": "启用:ccjk agent-teams --on",
17
+ "usageHint": "使用:在 Claude Code 中说 \"Create an agent team to...\""
18
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ccjk",
3
3
  "type": "module",
4
- "version": "9.12.0",
4
+ "version": "9.12.1",
5
5
  "packageManager": "pnpm@10.17.1",
6
6
  "description": "CCJK v9.0.0 - Revolutionary AI Development Platform with Enterprise Security, Streaming Cloud Sync, CRDT Conflict Resolution, and Unified V3 Architecture",
7
7
  "author": {