ccg-workflow 1.7.6 → 1.7.8

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/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import cac from 'cac';
3
3
  import ansis from 'ansis';
4
- import { y as diagnoseMcpConfig, z as isWindows, A as readClaudeCodeConfig, B as fixWindowsMcpConfig, C as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, D as configMcp, E as version, a as i18n } from './shared/ccg-workflow.B8xBuAaQ.mjs';
4
+ import { y as diagnoseMcpConfig, z as isWindows, A as readClaudeCodeConfig, B as fixWindowsMcpConfig, C as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, D as configMcp, E as version, a as i18n } from './shared/ccg-workflow.CSFmksBD.mjs';
5
5
  import 'inquirer';
6
6
  import 'node:os';
7
7
  import 'pathe';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as changeLanguage, v as checkForUpdates, x as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, q as getCurrentVersion, t as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, k as installWorkflows, o as migrateToV1_4_0, p as needsMigration, r as readCcgConfig, s as showMainMenu, n as uninstallAceTool, m as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.B8xBuAaQ.mjs';
1
+ export { c as changeLanguage, v as checkForUpdates, x as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, q as getCurrentVersion, t as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, k as installWorkflows, o as migrateToV1_4_0, p as needsMigration, r as readCcgConfig, s as showMainMenu, n as uninstallAceTool, m as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.CSFmksBD.mjs';
2
2
  import 'ansis';
3
3
  import 'inquirer';
4
4
  import 'node:os';
@@ -10,7 +10,7 @@ import { parse, stringify } from 'smol-toml';
10
10
  import { exec } from 'node:child_process';
11
11
  import { promisify } from 'node:util';
12
12
 
13
- const version = "1.7.6";
13
+ const version = "1.7.8";
14
14
 
15
15
  function isWindows() {
16
16
  return process.platform === "win32";
@@ -548,30 +548,22 @@ async function uninstallWorkflows(installDir) {
548
548
  errors: []
549
549
  };
550
550
  const commandsDir = join(installDir, "commands", "ccg");
551
- const promptsDir = join(installDir, ".ccg", "prompts");
551
+ join(installDir, ".ccg", "prompts");
552
552
  const agentsDir = join(installDir, "agents", "ccg");
553
553
  const skillsDir = join(installDir, "skills", "multi-model-collaboration");
554
554
  const binDir = join(installDir, "bin");
555
- join(installDir, ".ccg");
555
+ const ccgConfigDir = join(installDir, ".ccg");
556
556
  if (await fs.pathExists(commandsDir)) {
557
557
  try {
558
558
  const files = await fs.readdir(commandsDir);
559
559
  for (const file of files) {
560
560
  if (file.endsWith(".md")) {
561
- await fs.remove(join(commandsDir, file));
562
561
  result.removedCommands.push(file.replace(".md", ""));
563
562
  }
564
563
  }
565
- const agentsSubDir = join(commandsDir, "agents");
566
- if (await fs.pathExists(agentsSubDir)) {
567
- await fs.remove(agentsSubDir);
568
- }
569
- const remaining = await fs.readdir(commandsDir);
570
- if (remaining.length === 0) {
571
- await fs.remove(commandsDir);
572
- }
564
+ await fs.remove(commandsDir);
573
565
  } catch (error) {
574
- result.errors.push(`Failed to remove commands: ${error}`);
566
+ result.errors.push(`Failed to remove commands directory: ${error}`);
575
567
  result.success = false;
576
568
  }
577
569
  }
@@ -579,12 +571,11 @@ async function uninstallWorkflows(installDir) {
579
571
  try {
580
572
  const files = await fs.readdir(agentsDir);
581
573
  for (const file of files) {
582
- await fs.remove(join(agentsDir, file));
583
574
  result.removedAgents.push(file.replace(".md", ""));
584
575
  }
585
576
  await fs.remove(agentsDir);
586
577
  } catch (error) {
587
- result.errors.push(`Failed to remove agents: ${error}`);
578
+ result.errors.push(`Failed to remove agents directory: ${error}`);
588
579
  result.success = false;
589
580
  }
590
581
  }
@@ -600,15 +591,6 @@ async function uninstallWorkflows(installDir) {
600
591
  result.success = false;
601
592
  }
602
593
  }
603
- if (await fs.pathExists(promptsDir)) {
604
- try {
605
- await fs.remove(promptsDir);
606
- result.removedPrompts.push("codex", "gemini");
607
- } catch (error) {
608
- result.errors.push(`Failed to remove prompts: ${error}`);
609
- result.success = false;
610
- }
611
- }
612
594
  if (await fs.pathExists(binDir)) {
613
595
  try {
614
596
  const wrapperName = process.platform === "win32" ? "codeagent-wrapper.exe" : "codeagent-wrapper";
@@ -622,6 +604,14 @@ async function uninstallWorkflows(installDir) {
622
604
  result.success = false;
623
605
  }
624
606
  }
607
+ if (await fs.pathExists(ccgConfigDir)) {
608
+ try {
609
+ await fs.remove(ccgConfigDir);
610
+ result.removedPrompts.push("ALL_PROMPTS_AND_CONFIGS");
611
+ } catch (error) {
612
+ result.errors.push(`Failed to remove .ccg directory: ${error}`);
613
+ }
614
+ }
625
615
  return result;
626
616
  }
627
617
  async function uninstallAceTool() {
@@ -947,7 +937,7 @@ const zhCN = {
947
937
  }
948
938
  },
949
939
  uninstall: {
950
- confirm: "\u786E\u5B9A\u8981\u5378\u8F7D CCG \u5417\uFF1F\u8FD9\u5C06\u79FB\u9664\u6240\u6709\u5DF2\u5B89\u88C5\u7684\u547D\u4EE4\u548C\u914D\u7F6E\u3002",
940
+ confirm: "\u786E\u5B9A\u8981\u5378\u8F7D CCG \u5417\uFF1F\u8FD9\u5C06\u5F3A\u5236\u79FB\u9664\u6240\u6709\u547D\u4EE4\u76EE\u5F55\u3001\u914D\u7F6E\u6587\u4EF6\u548C\u6570\u636E\u3002",
951
941
  alsoRemoveAceTool: "\u540C\u65F6\u79FB\u9664 ace-tool MCP \u914D\u7F6E\uFF1F",
952
942
  uninstalling: "\u6B63\u5728\u5378\u8F7D...",
953
943
  success: "\u5378\u8F7D\u6210\u529F\uFF01",
@@ -1107,7 +1097,7 @@ const en = {
1107
1097
  }
1108
1098
  },
1109
1099
  uninstall: {
1110
- confirm: "Are you sure you want to uninstall CCG? This will remove all installed commands and configurations.",
1100
+ confirm: "Are you sure you want to uninstall CCG? This will force remove all command directories, config files and data.",
1111
1101
  alsoRemoveAceTool: "Also remove ace-tool MCP configuration?",
1112
1102
  uninstalling: "Uninstalling...",
1113
1103
  success: "Uninstallation successful!",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccg-workflow",
3
- "version": "1.7.6",
3
+ "version": "1.7.8",
4
4
  "description": "Claude-Codex-Gemini 多模型协作系统 - 智能路由多模型开发工作流",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.17.1",
@@ -32,8 +32,24 @@ description: '后端专项工作流(研究→构思→计划→执行→优化
32
32
  **调用语法**:
33
33
 
34
34
  ```
35
+ # 新会话调用
35
36
  Bash({
36
- command: "~/.claude/bin/codeagent-wrapper --backend codex [--resume <SESSION_ID>] - \"$PWD\" <<'EOF'
37
+ command: "~/.claude/bin/codeagent-wrapper --backend codex - \"$PWD\" <<'EOF'
38
+ ROLE_FILE: <角色提示词路径>
39
+ <TASK>
40
+ 需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
41
+ 上下文:<前序阶段收集的项目上下文、分析结果等>
42
+ </TASK>
43
+ OUTPUT: 期望输出格式
44
+ EOF",
45
+ run_in_background: false,
46
+ timeout: 3600000,
47
+ description: "简短描述"
48
+ })
49
+
50
+ # 复用会话调用
51
+ Bash({
52
+ command: "~/.claude/bin/codeagent-wrapper --backend codex resume <SESSION_ID> - \"$PWD\" <<'EOF'
37
53
  ROLE_FILE: <角色提示词路径>
38
54
  <TASK>
39
55
  需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
@@ -55,7 +71,7 @@ EOF",
55
71
  | 规划 | `~/.claude/.ccg/prompts/codex/architect.md` |
56
72
  | 审查 | `~/.claude/.ccg/prompts/codex/reviewer.md` |
57
73
 
58
- **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `--resume xxx` 复用上下文。阶段 2 保存 `CODEX_SESSION`,阶段 3 和 5 使用 `--resume` 复用。
74
+ **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 复用上下文。阶段 2 保存 `CODEX_SESSION`,阶段 3 和 5 使用 `resume` 复用。
59
75
 
60
76
  ---
61
77
 
@@ -93,7 +109,7 @@ EOF",
93
109
 
94
110
  `[模式:计划]` - Codex 主导规划
95
111
 
96
- 调用 Codex(`--resume $CODEX_SESSION`),使用规划提示词,输出文件结构、函数/类设计、依赖。
112
+ 调用 Codex(`resume $CODEX_SESSION`),使用规划提示词,输出文件结构、函数/类设计、依赖。
97
113
 
98
114
  Claude 综合规划,请求用户批准后存入 `.claude/plan/任务名.md`
99
115
 
@@ -13,8 +13,24 @@ $ARGUMENTS
13
13
  **调用语法**(并行用 `run_in_background: true`,串行用 `false`):
14
14
 
15
15
  ```
16
+ # 新会话调用
16
17
  Bash({
17
- command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini> [--resume <SESSION_ID>] - \"$PWD\" <<'EOF'
18
+ command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini> - \"$PWD\" <<'EOF'
19
+ ROLE_FILE: <角色提示词路径>
20
+ <TASK>
21
+ 需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
22
+ 上下文:<前序阶段收集的项目上下文、计划文件内容等>
23
+ </TASK>
24
+ OUTPUT: 期望输出格式
25
+ EOF",
26
+ run_in_background: true,
27
+ timeout: 3600000,
28
+ description: "简短描述"
29
+ })
30
+
31
+ # 复用会话调用
32
+ Bash({
33
+ command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini> resume <SESSION_ID> - \"$PWD\" <<'EOF'
18
34
  ROLE_FILE: <角色提示词路径>
19
35
  <TASK>
20
36
  需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
@@ -37,7 +53,7 @@ EOF",
37
53
  | 实施 | `~/.claude/.ccg/prompts/codex/architect.md` | `~/.claude/.ccg/prompts/gemini/frontend.md` |
38
54
  | 审查 | `~/.claude/.ccg/prompts/codex/reviewer.md` | `~/.claude/.ccg/prompts/gemini/reviewer.md` |
39
55
 
40
- **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `--resume xxx` 复用上下文。
56
+ **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 复用上下文。
41
57
 
42
58
  **并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
43
59
 
@@ -32,8 +32,24 @@ description: '前端专项工作流(研究→构思→计划→执行→优化
32
32
  **调用语法**:
33
33
 
34
34
  ```
35
+ # 新会话调用
35
36
  Bash({
36
- command: "~/.claude/bin/codeagent-wrapper --backend gemini [--resume <SESSION_ID>] - \"$PWD\" <<'EOF'
37
+ command: "~/.claude/bin/codeagent-wrapper --backend gemini - \"$PWD\" <<'EOF'
38
+ ROLE_FILE: <角色提示词路径>
39
+ <TASK>
40
+ 需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
41
+ 上下文:<前序阶段收集的项目上下文、分析结果等>
42
+ </TASK>
43
+ OUTPUT: 期望输出格式
44
+ EOF",
45
+ run_in_background: false,
46
+ timeout: 3600000,
47
+ description: "简短描述"
48
+ })
49
+
50
+ # 复用会话调用
51
+ Bash({
52
+ command: "~/.claude/bin/codeagent-wrapper --backend gemini resume <SESSION_ID> - \"$PWD\" <<'EOF'
37
53
  ROLE_FILE: <角色提示词路径>
38
54
  <TASK>
39
55
  需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
@@ -55,7 +71,7 @@ EOF",
55
71
  | 规划 | `~/.claude/.ccg/prompts/gemini/architect.md` |
56
72
  | 审查 | `~/.claude/.ccg/prompts/gemini/reviewer.md` |
57
73
 
58
- **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `--resume xxx` 复用上下文。阶段 2 保存 `GEMINI_SESSION`,阶段 3 和 5 使用 `--resume` 复用。
74
+ **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 复用上下文。阶段 2 保存 `GEMINI_SESSION`,阶段 3 和 5 使用 `resume` 复用。
59
75
 
60
76
  ---
61
77
 
@@ -93,7 +109,7 @@ EOF",
93
109
 
94
110
  `[模式:计划]` - Gemini 主导规划
95
111
 
96
- 调用 Gemini(`--resume $GEMINI_SESSION`),使用规划提示词,输出组件结构、UI流程、样式方案。
112
+ 调用 Gemini(`resume $GEMINI_SESSION`),使用规划提示词,输出组件结构、UI流程、样式方案。
97
113
 
98
114
  Claude 综合规划,请求用户批准后存入 `.claude/plan/任务名.md`
99
115
 
@@ -36,8 +36,24 @@ description: '多模型协作开发工作流(研究→构思→计划→执行
36
36
  **调用语法**(并行用 `run_in_background: true`,串行用 `false`):
37
37
 
38
38
  ```
39
+ # 新会话调用
39
40
  Bash({
40
- command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini> [--resume <SESSION_ID>] - \"$PWD\" <<'EOF'
41
+ command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini> - \"$PWD\" <<'EOF'
42
+ ROLE_FILE: <角色提示词路径>
43
+ <TASK>
44
+ 需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
45
+ 上下文:<前序阶段收集的项目上下文、分析结果等>
46
+ </TASK>
47
+ OUTPUT: 期望输出格式
48
+ EOF",
49
+ run_in_background: true,
50
+ timeout: 3600000,
51
+ description: "简短描述"
52
+ })
53
+
54
+ # 复用会话调用
55
+ Bash({
56
+ command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini> resume <SESSION_ID> - \"$PWD\" <<'EOF'
41
57
  ROLE_FILE: <角色提示词路径>
42
58
  <TASK>
43
59
  需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
@@ -104,9 +120,9 @@ EOF",
104
120
 
105
121
  `[模式:计划]` - 多模型协作规划:
106
122
 
107
- **并行调用**(复用会话 `--resume`):
108
- - Codex:使用规划提示词 + `--resume $CODEX_SESSION`,输出后端架构
109
- - Gemini:使用规划提示词 + `--resume $GEMINI_SESSION`,输出前端架构
123
+ **并行调用**(复用会话 `resume <SESSION_ID>`):
124
+ - Codex:使用规划提示词 + `resume $CODEX_SESSION`,输出后端架构
125
+ - Gemini:使用规划提示词 + `resume $GEMINI_SESSION`,输出前端架构
110
126
 
111
127
  用 `TaskOutput` 等待结果。
112
128