ccjk 9.12.0 → 9.12.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.
|
@@ -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(
|
|
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
|
-
|
|
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(
|
|
67
|
+
console.log(ansis.red(t("invalidMode")));
|
|
67
68
|
return;
|
|
68
69
|
}
|
|
69
70
|
setTeammateMode(options.mode);
|
|
70
|
-
console.log(ansis.green(
|
|
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:
|
|
79
|
+
message: t("settings"),
|
|
79
80
|
choices: [
|
|
80
81
|
{
|
|
81
|
-
name: current ?
|
|
82
|
+
name: current ? t("toggleDisable") : t("toggleEnable"),
|
|
82
83
|
value: "toggle"
|
|
83
84
|
},
|
|
84
85
|
{
|
|
85
|
-
name:
|
|
86
|
+
name: t("setMode"),
|
|
86
87
|
value: "mode"
|
|
87
88
|
},
|
|
88
89
|
{
|
|
89
|
-
name:
|
|
90
|
+
name: t("viewStatus"),
|
|
90
91
|
value: "status"
|
|
91
92
|
},
|
|
92
93
|
{
|
|
93
|
-
name:
|
|
94
|
+
name: t("back"),
|
|
94
95
|
value: "back"
|
|
95
96
|
}
|
|
96
97
|
]
|
|
97
98
|
}]);
|
|
98
99
|
if (action === "toggle") {
|
|
99
100
|
setAgentTeams(!current);
|
|
100
|
-
|
|
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:
|
|
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(
|
|
115
|
+
console.log(ansis.green(t("modeSet", { mode })));
|
|
116
116
|
} else if (action === "status") {
|
|
117
|
-
printStatus(
|
|
117
|
+
printStatus();
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
function printStatus(
|
|
120
|
+
function printStatus() {
|
|
121
121
|
const enabled = isAgentTeamsEnabled();
|
|
122
122
|
const mode = getTeammateMode();
|
|
123
123
|
console.log();
|
|
124
|
-
console.log(ansis.bold(
|
|
124
|
+
console.log(ansis.bold(t("statusTitle")));
|
|
125
125
|
console.log(ansis.gray("\u2500".repeat(40)));
|
|
126
|
-
console.log(` ${
|
|
127
|
-
console.log(` ${
|
|
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(
|
|
130
|
+
console.log(ansis.dim(` ${t("enableHint")}`));
|
|
131
131
|
} else {
|
|
132
|
-
console.log(ansis.dim(
|
|
132
|
+
console.log(ansis.dim(` ${t("usageHint")}`));
|
|
133
133
|
}
|
|
134
134
|
console.log();
|
|
135
135
|
}
|
package/dist/chunks/features.mjs
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import process__default from 'node:process';
|
|
1
4
|
import ansis from 'ansis';
|
|
2
5
|
import inquirer from 'inquirer';
|
|
6
|
+
import { join } from 'pathe';
|
|
3
7
|
import { s as selectMcpServices, c as getMcpServices } from './codex.mjs';
|
|
4
8
|
import { SUPPORTED_LANGS, LANG_LABELS } from './constants.mjs';
|
|
5
9
|
import { ensureI18nInitialized, i18n, changeLanguage } from './index.mjs';
|
|
@@ -13,23 +17,19 @@ import { i as isWindows } from './platform.mjs';
|
|
|
13
17
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
14
18
|
import { openSettingsJson, importRecommendedPermissions, importRecommendedEnv } from './simple-config.mjs';
|
|
15
19
|
import { p as promptBoolean } from '../shared/ccjk.DHbrGcgg.mjs';
|
|
16
|
-
import 'node:process';
|
|
17
20
|
import 'node:url';
|
|
18
21
|
import 'dayjs';
|
|
19
22
|
import 'ora';
|
|
20
|
-
import 'pathe';
|
|
21
23
|
import 'semver';
|
|
22
24
|
import 'smol-toml';
|
|
23
25
|
import 'tinyexec';
|
|
24
26
|
import './fs-operations.mjs';
|
|
25
27
|
import 'node:crypto';
|
|
26
|
-
import 'node:fs';
|
|
27
28
|
import 'node:fs/promises';
|
|
28
29
|
import './json-config.mjs';
|
|
29
30
|
import './prompts.mjs';
|
|
30
31
|
import './package.mjs';
|
|
31
32
|
import 'node:child_process';
|
|
32
|
-
import 'node:os';
|
|
33
33
|
import 'i18next';
|
|
34
34
|
import 'i18next-fs-backend';
|
|
35
35
|
import 'node:util';
|
|
@@ -376,12 +376,7 @@ async function configureAiMemoryFeature() {
|
|
|
376
376
|
if (!option) {
|
|
377
377
|
return;
|
|
378
378
|
}
|
|
379
|
-
const
|
|
380
|
-
const { homedir } = await import('node:os');
|
|
381
|
-
const { join } = await import('pathe');
|
|
382
|
-
const { execSync } = await import('node:child_process');
|
|
383
|
-
const nodeProcess = await import('node:process');
|
|
384
|
-
const cwd = nodeProcess.default.cwd();
|
|
379
|
+
const cwd = process__default.cwd();
|
|
385
380
|
const globalClaudeMdPath = join(homedir(), ".claude", "CLAUDE.md");
|
|
386
381
|
const projectClaudeMdPath = join(cwd, "CLAUDE.md");
|
|
387
382
|
const localClaudeMdPath = join(cwd, ".claude", "CLAUDE.md");
|
|
@@ -432,8 +427,8 @@ async function configureAiMemoryFeature() {
|
|
|
432
427
|
console.log(ansis.green.bold(`
|
|
433
428
|
\u{1F52C} ${isZh ? "Postmortem \u62A5\u544A" : "Postmortem Reports"}:`));
|
|
434
429
|
console.log(ansis.dim("\u2500".repeat(60)));
|
|
435
|
-
const { readdirSync } = await import('node:fs');
|
|
436
|
-
const files =
|
|
430
|
+
const { readdirSync: readdirSync2 } = await import('node:fs');
|
|
431
|
+
const files = readdirSync2(postmortemDir).filter((f) => f.endsWith(".md"));
|
|
437
432
|
if (files.length === 0) {
|
|
438
433
|
console.log(ansis.yellow(isZh ? "\u6682\u65E0 Postmortem \u62A5\u544A" : "No postmortem reports yet"));
|
|
439
434
|
} else {
|
|
@@ -467,10 +462,9 @@ ${isZh ? "\u76EE\u5F55" : "Directory"}: ${postmortemDir}`));
|
|
|
467
462
|
break;
|
|
468
463
|
}
|
|
469
464
|
case "editGlobalClaudeMd": {
|
|
470
|
-
const editor =
|
|
465
|
+
const editor = process__default.env.EDITOR || process__default.env.VISUAL || "vi";
|
|
471
466
|
if (!existsSync(globalClaudeMdPath)) {
|
|
472
467
|
const claudeDir = join(homedir(), ".claude");
|
|
473
|
-
const { mkdirSync } = await import('node:fs');
|
|
474
468
|
if (!existsSync(claudeDir)) {
|
|
475
469
|
mkdirSync(claudeDir, { recursive: true });
|
|
476
470
|
}
|
|
@@ -485,6 +479,7 @@ ${isZh ? "\u76EE\u5F55" : "Directory"}: ${postmortemDir}`));
|
|
|
485
479
|
console.log(ansis.gray(`${isZh ? "\u7F16\u8F91\u5668" : "Editor"}: ${editor}`));
|
|
486
480
|
console.log(ansis.gray(`${isZh ? "\u6587\u4EF6" : "File"}: ${globalClaudeMdPath}`));
|
|
487
481
|
try {
|
|
482
|
+
const { execSync } = await import('node:child_process');
|
|
488
483
|
execSync(`${editor} "${globalClaudeMdPath}"`, { stdio: "inherit" });
|
|
489
484
|
console.log(ansis.green(`
|
|
490
485
|
\u2705 ${isZh ? "\u7F16\u8F91\u5B8C\u6210" : "Edit complete"}`));
|
package/dist/chunks/index.mjs
CHANGED
|
@@ -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",
|
|
@@ -104,6 +106,8 @@ async function initI18n(language = "zh-CN") {
|
|
|
104
106
|
defaultNS: "common",
|
|
105
107
|
preload: [language],
|
|
106
108
|
// Preload the selected language
|
|
109
|
+
// Suppress i18next locize promotional banner in CLI output
|
|
110
|
+
partialBundledLanguages: true,
|
|
107
111
|
// Backend configuration for loading JSON files
|
|
108
112
|
backend: {
|
|
109
113
|
loadPath: (() => {
|
package/dist/chunks/package.mjs
CHANGED
|
@@ -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.
|
|
4
|
+
"version": "9.12.2",
|
|
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": {
|