ccg-workflow 1.7.86 → 1.7.87

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 { z as diagnoseMcpConfig, A as isWindows, B as readClaudeCodeConfig, C as fixWindowsMcpConfig, D as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, E as configMcp, F as version } from './shared/ccg-workflow.BzAMcd9h.mjs';
4
+ import { z as diagnoseMcpConfig, A as isWindows, B as readClaudeCodeConfig, C as fixWindowsMcpConfig, D as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, E as configMcp, F as version } from './shared/ccg-workflow.CJXxHH9w.mjs';
5
5
  import 'inquirer';
6
6
  import 'node:child_process';
7
7
  import 'node:util';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as changeLanguage, x as checkForUpdates, y as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, t as getCurrentVersion, v as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, k as installWorkflows, p as migrateToV1_4_0, q as needsMigration, r as readCcgConfig, s as showMainMenu, o as uninstallAceTool, n as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.BzAMcd9h.mjs';
1
+ export { c as changeLanguage, x as checkForUpdates, y as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, t as getCurrentVersion, v as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, k as installWorkflows, p as migrateToV1_4_0, q as needsMigration, r as readCcgConfig, s as showMainMenu, o as uninstallAceTool, n as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.CJXxHH9w.mjs';
2
2
  import 'ansis';
3
3
  import 'inquirer';
4
4
  import 'node:child_process';
@@ -10,7 +10,7 @@ import { parse, stringify } from 'smol-toml';
10
10
  import i18next from 'i18next';
11
11
  import ora from 'ora';
12
12
 
13
- const version = "1.7.86";
13
+ const version = "1.7.87";
14
14
 
15
15
  function cmd(id, order, category, name, nameEn, description, descriptionEn, cmdOverride) {
16
16
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccg-workflow",
3
- "version": "1.7.86",
3
+ "version": "1.7.87",
4
4
  "description": "Claude + Codex + Gemini multi-model collaboration system - smart routing development workflow",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.17.1",
@@ -70,6 +70,8 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
70
70
  - 必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
71
71
  如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
72
72
  - 若因等待时间过长跳过了等待 TaskOutput 结果,则**必须调用 `AskUserQuestion` 工具询问用户选择继续等待还是 Kill Task。禁止直接 Kill Task。**
73
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
74
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续用 TaskOutput 轮询,**绝对禁止在 Codex 未返回结果时直接跳过或继续下一阶段**。已启动的 Codex 任务若被跳过 = 浪费 token + 丢失结果。
73
75
 
74
76
  ---
75
77
 
@@ -79,6 +79,8 @@ EOF",
79
79
 
80
80
  **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 复用上下文。阶段 2 保存 `CODEX_SESSION`,阶段 3 和 5 使用 `resume` 复用。
81
81
 
82
+ ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。若调用超时,继续等待,禁止跳过或提前终止。
83
+
82
84
  ---
83
85
 
84
86
  ## 沟通守则
@@ -120,6 +120,8 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
120
120
  - 必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时
121
121
  - 若 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**
122
122
  - 若因等待时间过长跳过了等待,**必须调用 `AskUserQuestion` 询问用户选择继续等待还是 Kill Task**
123
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
124
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续用 TaskOutput 轮询,**绝对禁止在 Codex 未返回结果时直接跳过或继续下一阶段**。已启动的 Codex 任务若被跳过 = 浪费 token + 丢失结果。
123
125
 
124
126
  ---
125
127
 
@@ -70,6 +70,8 @@ EOF
70
70
  - 必须指定 `timeout: 600000`,否则默认 30 秒会超时
71
71
  - 如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**
72
72
  - 若等待时间过长,**必须用 `AskUserQuestion` 询问用户是否继续等待,禁止直接 Kill**
73
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
74
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续用 TaskOutput 轮询,**绝对禁止在 Codex 未返回结果时直接跳过或继续下一阶段**。已启动的 Codex 任务若被跳过 = 浪费 token + 丢失结果。
73
75
 
74
76
  ---
75
77
 
@@ -107,6 +107,8 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
107
107
  - 必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时
108
108
  - 若 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**
109
109
  - 若因等待时间过长跳过了等待,**必须调用 `AskUserQuestion` 询问用户选择继续等待还是 Kill Task**
110
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
111
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续用 TaskOutput 轮询,**绝对禁止在 Codex 未返回结果时直接跳过或继续下一阶段**。已启动的 Codex 任务若被跳过 = 浪费 token + 丢失结果。
110
112
 
111
113
  ---
112
114
 
@@ -76,6 +76,8 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
76
76
  - 必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
77
77
  如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
78
78
  - 若因等待时间过长跳过了等待 TaskOutput 结果,则**必须调用 `AskUserQuestion` 工具询问用户选择继续等待还是 Kill Task。禁止直接 Kill Task。**
79
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
80
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续用 TaskOutput 轮询,**绝对禁止在 Codex 未返回结果时直接跳过或继续下一阶段**。已启动的 Codex 任务若被跳过 = 浪费 token + 丢失结果。
79
81
 
80
82
  ---
81
83
 
@@ -79,6 +79,8 @@ EOF",
79
79
 
80
80
  **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 复用上下文。阶段 2 保存 `GEMINI_SESSION`,阶段 3 和 5 使用 `resume` 复用。
81
81
 
82
+ ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才报告错误并终止。
83
+
82
84
  ---
83
85
 
84
86
  ## 沟通守则
@@ -75,6 +75,8 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
75
75
  - 必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
76
76
  如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
77
77
  - 若因等待时间过长跳过了等待 TaskOutput 结果,则**必须调用 `AskUserQuestion` 工具询问用户选择继续等待还是 Kill Task。禁止直接 Kill Task。**
78
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
79
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续用 TaskOutput 轮询,**绝对禁止在 Codex 未返回结果时直接跳过或继续下一阶段**。已启动的 Codex 任务若被跳过 = 浪费 token + 丢失结果。
78
80
 
79
81
  ---
80
82
 
@@ -66,6 +66,8 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
66
66
  - 必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时
67
67
  - 若 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**
68
68
  - 若因等待时间过长跳过了等待,**必须调用 `AskUserQuestion` 询问用户选择继续等待还是 Kill Task**
69
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
70
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续用 TaskOutput 轮询,**绝对禁止在 Codex 未返回结果时直接跳过或继续下一阶段**。已启动的 Codex 任务若被跳过 = 浪费 token + 丢失结果。
69
71
 
70
72
  ---
71
73
 
@@ -65,6 +65,8 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
65
65
  - 必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
66
66
  如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
67
67
  - 若因等待时间过长跳过了等待 TaskOutput 结果,则**必须调用 `AskUserQuestion` 工具询问用户选择继续等待还是 Kill Task。禁止直接 Kill Task。**
68
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
69
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续用 TaskOutput 轮询,**绝对禁止在 Codex 未返回结果时直接跳过或继续下一阶段**。已启动的 Codex 任务若被跳过 = 浪费 token + 丢失结果。
68
70
 
69
71
  ---
70
72
 
@@ -106,6 +106,9 @@ description: '按规范执行 + 多模型协作 + 归档'
106
106
  TaskOutput({ task_id: "<gemini_task_id>", block: true, timeout: 600000 })
107
107
  ```
108
108
 
109
+ ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败,最多重试 2 次(间隔 5 秒)。3 次全败才跳过。
110
+ ⛔ **Codex 结果必须等待**:Codex 执行 5-15 分钟属正常,超时后继续轮询,禁止跳过。
111
+
109
112
  Address any critical findings before proceeding.
110
113
 
111
114
  8. **Update Task Status**
@@ -56,6 +56,9 @@ description: '多模型分析 → 消除歧义 → 零决策可执行计划'
56
56
  TaskOutput({ task_id: "<gemini_task_id>", block: true, timeout: 600000 })
57
57
  ```
58
58
 
59
+ ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败,最多重试 2 次(间隔 5 秒)。3 次全败才跳过。
60
+ ⛔ **Codex 结果必须等待**:Codex 执行 5-15 分钟属正常,超时后继续轮询,禁止跳过。
61
+
59
62
  - Synthesize responses and present consolidated options to user.
60
63
 
61
64
  3. **Uncertainty Elimination Audit**
@@ -95,6 +95,9 @@ description: '需求 → 约束集(并行探索 + OPSX 提案)'
95
95
  TaskOutput({ task_id: "<gemini_task_id>", block: true, timeout: 600000 })
96
96
  ```
97
97
 
98
+ ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败,最多重试 2 次(间隔 5 秒)。3 次全败才跳过。
99
+ ⛔ **Codex 结果必须等待**:Codex 执行 5-15 分钟属正常,超时后继续轮询,禁止跳过。
100
+
98
101
  5. **Aggregate and Synthesize**
99
102
  - Collect all subagent outputs.
100
103
  - Merge into unified constraint sets:
@@ -57,6 +57,9 @@ description: '双模型交叉审查(独立工具,随时可用)'
57
57
  TaskOutput({ task_id: "<gemini_task_id>", block: true, timeout: 600000 })
58
58
  ```
59
59
 
60
+ ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败,最多重试 2 次(间隔 5 秒)。3 次全败才跳过。
61
+ ⛔ **Codex 结果必须等待**:Codex 执行 5-15 分钟属正常,超时后继续轮询,禁止跳过。
62
+
60
63
  4. **Synthesize Findings**
61
64
  - Merge findings from both models.
62
65
  - Deduplicate overlapping issues.
@@ -36,9 +36,12 @@ description: 'Agent Teams 并行实施 - 读取计划文件,spawn Builder team
36
36
  确认开始?
37
37
  ```
38
38
 
39
- 3. **创建 Team + spawn Builders**
40
- - 创建 Agent Team。
41
- - Layer 分组 spawn Builder teammates(Sonnet)。
39
+ 3. **使用 TeamCreate 创建 Team,然后 spawn teammates 加入该 Team**
40
+ - ⛔ **禁止使用普通 Agent 子代理。必须通过 TeamCreate 创建 team,再通过 Agent(team_name=...) spawn teammates 加入 team。**
41
+ - 先调用 TeamCreate 创建 team。
42
+ - 为每个子任务调用 TaskCreate 创建 task。
43
+ - 按 Layer 分组,通过 Agent(team_name=..., name="builder-N") spawn Builder teammates(Sonnet)。
44
+ - 通过 TaskUpdate(owner="builder-N") 将 task 分配给对应 Builder。
42
45
  - 每个 Builder 的 spawn prompt 必须包含:
43
46
 
44
47
  ```
@@ -70,10 +73,11 @@ description: 'Agent Teams 并行实施 - 读取计划文件,spawn Builder team
70
73
  - **依赖关系**:Layer 2 的 Builder 任务设为依赖 Layer 1 的对应任务,等 Layer 1 完成后自动解锁。
71
74
  - spawn 完成后,进入 **delegate 模式**,只协调不写码。
72
75
 
73
- 4. **监控进度**
74
- - 等待所有 Builder 完成。
76
+ 4. **通过 TaskList + SendMessage 监控进度**
77
+ - 通过 TaskList 查看各 task 状态,通过 SendMessage 与 Builder 沟通。
78
+ - teammates 完成 task 后会自动发消息通知你,无需轮询。
75
79
  - 如果某个 Builder 遇到问题并发消息求助:
76
- * 分析问题,给出指导建议
80
+ * 通过 SendMessage 回复指导建议
77
81
  * 不要自己写代码替它完成
78
82
  - 如果某个 Builder 失败:
79
83
  * 记录失败原因
@@ -98,7 +102,7 @@ description: 'Agent Teams 并行实施 - 读取计划文件,spawn Builder team
98
102
  3. 提交代码:`git add -A && git commit`
99
103
  ```
100
104
 
101
- - 关闭所有 teammates,清理 team。
105
+ - 通过 SendMessage 发送 shutdown_request 关闭所有 teammates,清理 team。
102
106
 
103
107
  **Exit Criteria**
104
108
  - [ ] 所有 Builder 任务完成(或明确失败并记录原因)
@@ -51,6 +51,8 @@ description: 'Agent Teams 规划 - Lead 调用 Codex/Gemini 并行分析,产
51
51
 
52
52
  - 必须指定 `timeout: 600000`,否则默认 30 秒会提前超时。
53
53
  - 若 10 分钟后仍未完成,继续轮询,**绝对不要 Kill 进程**。
54
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
55
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续轮询,**绝对禁止在 Codex 未返回结果时直接跳过**。
54
56
 
55
57
  3. **综合分析 + 任务拆分**
56
58
  - 后端方案以 Codex 为准,前端方案以 Gemini 为准。
@@ -62,6 +62,9 @@ description: 'Agent Teams 需求研究 - 并行探索代码库,产出约束集
62
62
  TaskOutput({ task_id: "<gemini_task_id>", block: true, timeout: 600000 })
63
63
  ```
64
64
 
65
+ ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败,最多重试 2 次(间隔 5 秒)。3 次全败才跳过。
66
+ ⛔ **Codex 结果必须等待**:Codex 执行 5-15 分钟属正常,超时后继续轮询,禁止跳过。
67
+
65
68
  4. **聚合与综合**
66
69
  - 合并所有探索输出为统一约束集:
67
70
  * **硬约束**:技术限制、不可违反的模式
@@ -48,6 +48,9 @@ description: 'Agent Teams 审查 - 双模型交叉审查并行实施的产出,
48
48
  TaskOutput({ task_id: "<gemini_task_id>", block: true, timeout: 600000 })
49
49
  ```
50
50
 
51
+ ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败,最多重试 2 次(间隔 5 秒)。3 次全败才跳过。
52
+ ⛔ **Codex 结果必须等待**:Codex 执行 5-15 分钟属正常,超时后继续轮询,禁止跳过。
53
+
51
54
  3. **综合发现**
52
55
  - 合并两个模型的发现。
53
56
  - 去重重叠问题。
@@ -87,6 +87,8 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
87
87
  - 必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
88
88
  如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
89
89
  - 若因等待时间过长跳过了等待 TaskOutput 结果,则**必须调用 `AskUserQuestion` 工具询问用户选择继续等待还是 Kill Task。禁止直接 Kill Task。**
90
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
91
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续用 TaskOutput 轮询,**绝对禁止在 Codex 未返回结果时直接跳过或继续下一阶段**。已启动的 Codex 任务若被跳过 = 浪费 token + 丢失结果。
90
92
 
91
93
  ---
92
94
 
@@ -97,6 +97,8 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
97
97
  - 必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
98
98
  如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
99
99
  - 若因等待时间过长跳过了等待 TaskOutput 结果,则**必须调用 `AskUserQuestion` 工具询问用户选择继续等待还是 Kill Task。禁止直接 Kill Task。**
100
+ - ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才跳过 Gemini 结果并使用单模型结果继续。
101
+ - ⛔ **Codex 结果必须等待**:Codex 执行时间较长(5-15 分钟)属于正常。TaskOutput 超时后必须继续用 TaskOutput 轮询,**绝对禁止在 Codex 未返回结果时直接跳过或继续下一阶段**。已启动的 Codex 任务若被跳过 = 浪费 token + 丢失结果。
100
102
 
101
103
  ---
102
104