ccg-workflow 1.7.24 → 1.7.26
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 +82 -356
- package/bin/codeagent-wrapper-darwin-amd64 +0 -0
- package/bin/codeagent-wrapper-darwin-arm64 +0 -0
- package/bin/codeagent-wrapper-linux-amd64 +0 -0
- package/bin/codeagent-wrapper-linux-arm64 +0 -0
- package/bin/codeagent-wrapper-windows-amd64.exe +0 -0
- package/bin/codeagent-wrapper-windows-arm64.exe +0 -0
- package/dist/cli.mjs +2 -2
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccg-workflow.D62jmTLV.mjs → ccg-workflow.CqFZ5tot.mjs} +59 -102
- package/package.json +1 -1
- package/templates/commands/analyze.md +9 -0
- package/templates/commands/debug.md +9 -0
- package/templates/commands/feat.md +9 -0
- package/templates/commands/optimize.md +9 -0
- package/templates/commands/review.md +9 -0
- package/templates/commands/test.md +9 -0
- package/templates/commands/workflow.md +9 -0
package/README.md
CHANGED
|
@@ -1,409 +1,135 @@
|
|
|
1
|
-
# CCG - Claude + Codex + Gemini
|
|
1
|
+
# CCG - Claude + Codex + Gemini Multi-Model Collaboration
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
**Claude Code 编排 Codex + Gemini 双模型协作的智能开发工作流系统**
|
|
6
|
-
|
|
7
5
|
[](https://www.npmjs.com/package/ccg-workflow)
|
|
8
6
|
[](https://opensource.org/licenses/MIT)
|
|
9
7
|
[](https://claude.ai/code)
|
|
10
8
|
|
|
11
|
-
[快速开始](#-快速开始) • [命令参考](#-命令参考) • [常见问题](#-常见问题) • [更新日志](CHANGELOG.md)
|
|
12
|
-
|
|
13
9
|
</div>
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## 💡 这是什么?
|
|
18
|
-
|
|
19
|
-
**CCG** = **Claude Code** (编排) + **Codex CLI** (后端) + **Gemini CLI** (前端)
|
|
20
|
-
|
|
21
|
-
一个让 Claude Code 专注于编排决策,把具体代码生成交给专业模型的多模型协作系统:
|
|
22
|
-
|
|
23
|
-
- **前端任务** → Gemini(擅长 UI/CSS/组件)
|
|
24
|
-
- **后端任务** → Codex(擅长逻辑/算法/调试)
|
|
25
|
-
- **全栈整合** → Claude(工作流控制、代码主权)
|
|
26
|
-
|
|
27
|
-
### 核心优势
|
|
28
|
-
|
|
29
|
-
- ✅ **智能路由** - 前端 → Gemini,后端 → Codex,自动选择
|
|
30
|
-
- ✅ **多模型并行** - Codex ∥ Gemini 同时分析,交叉验证减少错误
|
|
31
|
-
- ✅ **零写入权限** - 外部模型只返回 Patch,Claude 保持代码主权
|
|
32
|
-
- ✅ **Token 优化** - ROLE_FILE 动态注入,专家提示词零消耗
|
|
33
|
-
- ✅ **Web UI 实时输出** - 自动打开浏览器,流式显示思考过程、命令执行、生成结果
|
|
34
|
-
- ✅ **一键安装** - npx 运行,自动安装全部 15 个命令
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## 🚀 快速开始
|
|
39
|
-
|
|
40
|
-
### 前置要求
|
|
41
|
-
|
|
42
|
-
**必需**:
|
|
43
|
-
- [Claude Code CLI](https://claude.ai/code)
|
|
44
|
-
- Node.js 18+
|
|
11
|
+
Claude Code 编排 Codex + Gemini 的多模型协作开发系统。前端任务路由至 Gemini,后端任务路由至 Codex,Claude 负责编排决策和代码审核。
|
|
45
12
|
|
|
46
|
-
|
|
47
|
-
- Codex CLI - 用于后端任务
|
|
48
|
-
- Gemini CLI - 用于前端任务
|
|
49
|
-
|
|
50
|
-
> 💡 **只装 Claude Code 也能用!** 系统会自动降级为纯 Claude 工作流
|
|
51
|
-
|
|
52
|
-
### 一键安装
|
|
13
|
+
## 安装
|
|
53
14
|
|
|
54
15
|
```bash
|
|
55
16
|
npx ccg-workflow
|
|
56
17
|
```
|
|
57
18
|
|
|
58
|
-
|
|
59
|
-
1. 选择是否配置 ace-tool MCP(可跳过)
|
|
60
|
-
2. 确认安装
|
|
61
|
-
3. 自动安装全部 15 个命令
|
|
62
|
-
4. 配置 PATH(如需要)
|
|
19
|
+
**要求**:Claude Code CLI、Node.js 18+
|
|
63
20
|
|
|
64
|
-
|
|
21
|
+
**可选**:Codex CLI(后端)、Gemini CLI(前端)
|
|
65
22
|
|
|
66
|
-
|
|
23
|
+
## 命令
|
|
67
24
|
|
|
68
|
-
|
|
|
25
|
+
| 命令 | 说明 |
|
|
69
26
|
|------|------|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
# 阶段 1: 研究 - Prompt 增强 + 上下文检索
|
|
83
|
-
# 阶段 2: 构思 - 多模型分析 (Codex ∥ Gemini)
|
|
84
|
-
# 阶段 3: 计划 - 多模型规划 + 用户确认
|
|
85
|
-
# 阶段 4: 执行 - 代码实施
|
|
86
|
-
# 阶段 5: 优化 - 多模型审查
|
|
87
|
-
# 阶段 6: 评审 - 质量检查
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## 📚 命令参考
|
|
93
|
-
|
|
94
|
-
### 核心命令(记住这 3 个就够了)
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
/ccg:workflow # 完整任务(6 阶段工作流)
|
|
98
|
-
/ccg:feat # 新功能开发(自动规划)
|
|
99
|
-
/ccg:frontend # 纯前端任务(Gemini 主导,更快)
|
|
100
|
-
/ccg:backend # 纯后端任务(Codex 主导,更快)
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### 完整命令列表(15 个)
|
|
104
|
-
|
|
105
|
-
#### 开发工作流
|
|
106
|
-
|
|
107
|
-
| 命令 | 用途 | 模型 |
|
|
108
|
-
|-----|------|------|
|
|
109
|
-
| `/ccg:workflow` | 完整 6 阶段开发工作流 | Codex ∥ Gemini |
|
|
110
|
-
| `/ccg:frontend` | 前端专项(快速模式) | Gemini |
|
|
111
|
-
| `/ccg:backend` | 后端专项(快速模式) | Codex |
|
|
112
|
-
| `/ccg:feat` | 智能功能开发 | 规划 → 实施 |
|
|
113
|
-
| `/ccg:enhance` | Prompt 增强(ace-tool) | MCP |
|
|
114
|
-
| `/ccg:analyze` | 技术分析(仅分析不改代码) | Codex ∥ Gemini |
|
|
115
|
-
| `/ccg:debug` | 问题诊断 + 修复 | Codex ∥ Gemini |
|
|
116
|
-
| `/ccg:optimize` | 性能优化 | Codex ∥ Gemini |
|
|
117
|
-
| `/ccg:test` | 测试生成 | 智能路由 |
|
|
118
|
-
| `/ccg:review` | 代码审查(无参数自动审查 git diff) | Codex ∥ Gemini |
|
|
119
|
-
|
|
120
|
-
#### Git 工具
|
|
121
|
-
|
|
122
|
-
| 命令 | 用途 |
|
|
123
|
-
|-----|------|
|
|
124
|
-
| `/ccg:commit` | 智能提交(自动生成 conventional commit)|
|
|
125
|
-
| `/ccg:rollback` | 交互式回滚 |
|
|
126
|
-
| `/ccg:clean-branches` | 清理已合并分支 |
|
|
27
|
+
| `/ccg:workflow` | 6 阶段完整工作流 |
|
|
28
|
+
| `/ccg:feat` | 新功能开发 |
|
|
29
|
+
| `/ccg:frontend` | 前端任务 (Gemini) |
|
|
30
|
+
| `/ccg:backend` | 后端任务 (Codex) |
|
|
31
|
+
| `/ccg:analyze` | 技术分析 |
|
|
32
|
+
| `/ccg:debug` | 问题诊断 |
|
|
33
|
+
| `/ccg:optimize` | 性能优化 |
|
|
34
|
+
| `/ccg:test` | 测试生成 |
|
|
35
|
+
| `/ccg:review` | 代码审查 |
|
|
36
|
+
| `/ccg:commit` | Git 提交 |
|
|
37
|
+
| `/ccg:rollback` | Git 回滚 |
|
|
38
|
+
| `/ccg:clean-branches` | 清理分支 |
|
|
127
39
|
| `/ccg:worktree` | Worktree 管理 |
|
|
40
|
+
| `/ccg:init` | 初始化 CLAUDE.md |
|
|
41
|
+
| `/ccg:enhance` | Prompt 增强 |
|
|
128
42
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
| 命令 | 用途 |
|
|
132
|
-
|-----|------|
|
|
133
|
-
| `/ccg:init` | 初始化项目 CLAUDE.md |
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## 🎭 专家角色系统
|
|
138
|
-
|
|
139
|
-
### ROLE_FILE 动态注入机制
|
|
140
|
-
|
|
141
|
-
12 个专家提示词(Codex 6 + Gemini 6),**零 token 消耗**:
|
|
43
|
+
## 配置
|
|
142
44
|
|
|
143
|
-
|
|
144
|
-
- `architect.md` - 后端架构师
|
|
145
|
-
- `analyzer.md` - 技术分析师
|
|
146
|
-
- `debugger.md` - 调试专家
|
|
147
|
-
- `optimizer.md` - 性能优化师
|
|
148
|
-
- `reviewer.md` - 代码审查员
|
|
149
|
-
- `tester.md` - 测试工程师
|
|
150
|
-
|
|
151
|
-
**Gemini 专家**(前端):
|
|
152
|
-
- `frontend.md` - 前端架构师
|
|
153
|
-
- `analyzer.md` - UI/UX 分析师
|
|
154
|
-
- `debugger.md` - 前端调试专家
|
|
155
|
-
- `optimizer.md` - 前端性能优化
|
|
156
|
-
- `reviewer.md` - 代码审查员
|
|
157
|
-
- `tester.md` - 前端测试工程师
|
|
158
|
-
|
|
159
|
-
**工作原理**:
|
|
160
|
-
1. 每个命令自动注入对应角色提示词
|
|
161
|
-
2. 通过 `codeagent-wrapper` 子进程读取
|
|
162
|
-
3. 不占用主会话 token
|
|
163
|
-
4. 用户可自定义修改(路径:`~/.claude/.ccg/prompts/`)
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## 🗂️ 安装目录结构
|
|
45
|
+
### 目录结构
|
|
168
46
|
|
|
169
47
|
```
|
|
170
48
|
~/.claude/
|
|
171
|
-
├── commands/ccg/
|
|
172
|
-
├── agents/ccg/
|
|
173
|
-
├──
|
|
174
|
-
├── bin/
|
|
175
|
-
│ └── codeagent-wrapper # Go 多后端调用工具
|
|
49
|
+
├── commands/ccg/ # 斜杠命令
|
|
50
|
+
├── agents/ccg/ # 子智能体
|
|
51
|
+
├── bin/codeagent-wrapper
|
|
176
52
|
└── .ccg/
|
|
177
|
-
├── config.toml
|
|
178
|
-
└── prompts/
|
|
179
|
-
├── codex/
|
|
180
|
-
└── gemini/
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## 🏗️ 架构说明
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
┌─────────────────────────────────────────────────┐
|
|
189
|
-
│ Claude Code CLI (主导编排) │
|
|
190
|
-
│ 决策、编排、代码实施、质量把控 │
|
|
191
|
-
└──────────────┬──────────────────────────────────┘
|
|
192
|
-
│
|
|
193
|
-
┌───────┴────────┐
|
|
194
|
-
│ │
|
|
195
|
-
↓ ↓
|
|
196
|
-
┌─────────────┐ ┌─────────────┐
|
|
197
|
-
│ Codex CLI │ │ Gemini CLI │
|
|
198
|
-
│ 后端专家 │ │ 前端专家 │
|
|
199
|
-
│ 逻辑算法 │ │ UI 组件 │
|
|
200
|
-
└─────────────┘ └─────────────┘
|
|
201
|
-
│ │
|
|
202
|
-
└────────┬───────┘
|
|
203
|
-
↓
|
|
204
|
-
Unified Diff Patch
|
|
205
|
-
(零写入权限,仅返回补丁)
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**信任规则**:
|
|
209
|
-
- 后端问题 → **以 Codex 意见为准**
|
|
210
|
-
- 前端问题 → **以 Gemini 意见为准**
|
|
211
|
-
- 冲突时 → Claude 综合判断,向用户说明分歧
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## ❓ 常见问题
|
|
216
|
-
|
|
217
|
-
<details>
|
|
218
|
-
<summary><strong>Q1: 只装了 Claude Code,没装 Codex/Gemini 能用吗?</strong></summary>
|
|
219
|
-
|
|
220
|
-
✅ **可以!** 系统会自动降级为纯 Claude 工作流。
|
|
221
|
-
|
|
222
|
-
但会失去:
|
|
223
|
-
- 智能路由(前端/后端自动分配)
|
|
224
|
-
- 多模型并行(交叉验证)
|
|
225
|
-
- 专家角色系统(ROLE_FILE 注入)
|
|
226
|
-
|
|
227
|
-
建议至少安装 Codex 或 Gemini 其中一个以获得完整体验。
|
|
228
|
-
|
|
229
|
-
</details>
|
|
230
|
-
|
|
231
|
-
<details>
|
|
232
|
-
<summary><strong>Q2: MCP 工具如何配置?</strong></summary>
|
|
233
|
-
|
|
234
|
-
**安装时配置**(推荐):
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
npx ccg-workflow
|
|
238
|
-
# 选择 "安装 ace-tool"
|
|
53
|
+
├── config.toml
|
|
54
|
+
└── prompts/{codex,gemini}/
|
|
239
55
|
```
|
|
240
56
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
```bash
|
|
262
|
-
npx ccg-workflow@latest
|
|
263
|
-
# 选择 "更新工作流"
|
|
57
|
+
### 环境变量
|
|
58
|
+
|
|
59
|
+
| 变量 | 说明 | 默认值 |
|
|
60
|
+
|------|------|--------|
|
|
61
|
+
| `CODEAGENT_POST_MESSAGE_DELAY` | Codex 完成后等待时间(秒) | 5 |
|
|
62
|
+
| `CODEX_TIMEOUT` | codeagent-wrapper 执行超时(秒) | 7200 |
|
|
63
|
+
| `BASH_DEFAULT_TIMEOUT_MS` | Claude Code Bash 默认超时(毫秒) | 120000 |
|
|
64
|
+
| `BASH_MAX_TIMEOUT_MS` | Claude Code Bash 最大超时(毫秒) | 600000 |
|
|
65
|
+
|
|
66
|
+
配置方式(`~/.claude/settings.json`):
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"env": {
|
|
71
|
+
"CODEAGENT_POST_MESSAGE_DELAY": "1",
|
|
72
|
+
"CODEX_TIMEOUT": "7200",
|
|
73
|
+
"BASH_DEFAULT_TIMEOUT_MS": "600000",
|
|
74
|
+
"BASH_MAX_TIMEOUT_MS": "3600000"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
264
77
|
```
|
|
265
78
|
|
|
266
|
-
|
|
267
|
-
- 检测 npm 最新版本
|
|
268
|
-
- 增量更新命令和提示词
|
|
269
|
-
- 保留 MCP 配置
|
|
79
|
+
### MCP 配置
|
|
270
80
|
|
|
271
|
-
|
|
81
|
+
ace-tool 用于代码检索和 Prompt 增强,安装时可选配置。
|
|
272
82
|
|
|
273
|
-
|
|
274
|
-
<summary><strong>Q4: `/ccg:workflow` 和 `/ccg:frontend`/`/ccg:backend` 有什么区别?</strong></summary>
|
|
83
|
+
Token 获取:https://augmentcode.com/
|
|
275
84
|
|
|
276
|
-
|
|
277
|
-
- 每阶段都并行调用 Codex + Gemini
|
|
278
|
-
- 适合全栈任务、复杂任务
|
|
85
|
+
## 更新 / 卸载
|
|
279
86
|
|
|
280
|
-
- **`/ccg:frontend`** / **`/ccg:backend`** - 专项快速模式
|
|
281
|
-
- 只调用对应主导模型(更快)
|
|
282
|
-
- 适合明确的纯前端/纯后端任务
|
|
283
|
-
|
|
284
|
-
</details>
|
|
285
|
-
|
|
286
|
-
<details>
|
|
287
|
-
<summary><strong>Q5: 安装后提示 "codeagent-wrapper: command not found"?</strong></summary>
|
|
288
|
-
|
|
289
|
-
**原因**:PATH 未生效
|
|
290
|
-
|
|
291
|
-
**解决方案**:
|
|
292
|
-
|
|
293
|
-
Mac/Linux:
|
|
294
87
|
```bash
|
|
295
|
-
|
|
296
|
-
#
|
|
297
|
-
|
|
298
|
-
```
|
|
88
|
+
# 更新
|
|
89
|
+
npx ccg-workflow@latest # npx 用户
|
|
90
|
+
npm install -g ccg-workflow@latest # npm 全局用户
|
|
299
91
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
#
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
</details>
|
|
306
|
-
|
|
307
|
-
<details>
|
|
308
|
-
<summary><strong>Q6: 如何卸载?</strong></summary>
|
|
309
|
-
|
|
310
|
-
**⚠️ 重要:根据安装方式选择卸载方法**
|
|
311
|
-
|
|
312
|
-
#### 方式 1:npx 安装用户(推荐)
|
|
313
|
-
|
|
314
|
-
```bash
|
|
315
|
-
npx ccg-workflow
|
|
316
|
-
# 选择 "卸载工作流"
|
|
92
|
+
# 卸载
|
|
93
|
+
npx ccg-workflow # 选择 "卸载工作流"
|
|
94
|
+
npm uninstall -g ccg-workflow # npm 全局用户需额外执行
|
|
317
95
|
```
|
|
318
96
|
|
|
319
|
-
|
|
320
|
-
- `~/.claude/commands/ccg/` - 命令文件
|
|
321
|
-
- `~/.claude/agents/ccg/` - 子智能体
|
|
322
|
-
- `~/.claude/skills/` - skills
|
|
323
|
-
- `~/.claude/bin/codeagent-wrapper*` - 二进制文件
|
|
324
|
-
- `~/.claude/.ccg/` - 配置目录(可选保留)
|
|
97
|
+
## 已知问题
|
|
325
98
|
|
|
326
|
-
|
|
99
|
+
**Codex CLI 0.80.0 进程不退出**
|
|
327
100
|
|
|
328
|
-
|
|
101
|
+
`--json` 模式下 Codex 完成输出后进程不会自动退出。
|
|
329
102
|
|
|
330
|
-
|
|
331
|
-
# 第 1 步:卸载工作流文件
|
|
332
|
-
npx ccg-workflow
|
|
333
|
-
# 选择 "卸载工作流"
|
|
103
|
+
解决:设置 `CODEAGENT_POST_MESSAGE_DELAY=1`
|
|
334
104
|
|
|
335
|
-
|
|
336
|
-
npm uninstall -g ccg-workflow
|
|
337
|
-
```
|
|
105
|
+
## 架构
|
|
338
106
|
|
|
339
|
-
**v1.7.11 新增**:系统会自动检测全局安装并提示第 2 步操作。
|
|
340
|
-
|
|
341
|
-
#### 方式 3:手动清理
|
|
342
|
-
|
|
343
|
-
```bash
|
|
344
|
-
# 删除所有工作流文件
|
|
345
|
-
rm -rf ~/.claude/commands/ccg
|
|
346
|
-
rm -rf ~/.claude/agents/ccg
|
|
347
|
-
rm -rf ~/.claude/skills/multi-model-collaboration
|
|
348
|
-
rm -rf ~/.claude/bin/codeagent-wrapper*
|
|
349
|
-
rm -rf ~/.claude/.ccg
|
|
350
|
-
|
|
351
|
-
# 如果是全局安装,还需执行
|
|
352
|
-
npm uninstall -g ccg-workflow
|
|
353
|
-
|
|
354
|
-
# 清理 MCP 配置(如果安装了 ace-tool)
|
|
355
|
-
# 手动编辑 ~/.claude.json 删除 ace-tool 相关配置
|
|
356
107
|
```
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
# 然后重新安装
|
|
369
|
-
npx ccg-workflow@latest
|
|
108
|
+
Claude Code (编排)
|
|
109
|
+
│
|
|
110
|
+
┌───┴───┐
|
|
111
|
+
↓ ↓
|
|
112
|
+
Codex Gemini
|
|
113
|
+
(后端) (前端)
|
|
114
|
+
│ │
|
|
115
|
+
└───┬───┘
|
|
116
|
+
↓
|
|
117
|
+
Unified Patch
|
|
370
118
|
```
|
|
371
119
|
|
|
372
|
-
|
|
120
|
+
外部模型无写入权限,仅返回 Patch,由 Claude 审核后应用。
|
|
373
121
|
|
|
374
|
-
|
|
122
|
+
## 致谢
|
|
375
123
|
|
|
376
|
-
|
|
124
|
+
- [cexll/myclaude](https://github.com/cexll/myclaude) - codeagent-wrapper
|
|
125
|
+
- [UfoMiao/zcf](https://github.com/UfoMiao/zcf) - Git 工具
|
|
126
|
+
- [GudaStudio/skills](https://github.com/GuDaStudio/skills) - 路由设计
|
|
127
|
+
- [ace-tool](https://linux.do/t/topic/1344562) - MCP 工具
|
|
377
128
|
|
|
378
|
-
|
|
129
|
+
## License
|
|
379
130
|
|
|
380
|
-
|
|
381
|
-
- **[UfoMiao/zcf](https://github.com/UfoMiao/zcf)** - Git 工具与 MCP 配置逻辑
|
|
382
|
-
- **[GudaStudio/skills](https://github.com/GuDaStudio/skills)** - 智能路由设计理念
|
|
383
|
-
- **[ace-tool MCP](https://linux.do/t/topic/1344562)** - 轻量级代码检索和 Prompt 增强
|
|
384
|
-
- **[linux.do 社区](https://linux.do/)** - 活跃的 Vibe Coding 技术交流社区
|
|
131
|
+
MIT
|
|
385
132
|
|
|
386
133
|
---
|
|
387
134
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
- **GitHub Issues**: [提交问题](https://github.com/fengshao1227/ccg-workflow/issues)
|
|
391
|
-
- **讨论社区**: [linux.do - CCG 讨论帖](https://linux.do/t/topic/1405588)
|
|
392
|
-
|
|
393
|
-
---
|
|
394
|
-
|
|
395
|
-
## 📄 许可证
|
|
396
|
-
|
|
397
|
-
本项目采用 [MIT License](LICENSE) 开源协议。
|
|
398
|
-
|
|
399
|
-
Copyright (c) 2025 fengshao1227
|
|
400
|
-
|
|
401
|
-
---
|
|
402
|
-
|
|
403
|
-
<div align="center">
|
|
404
|
-
|
|
405
|
-
**版本**: v1.7.10 | **最后更新**: 2026-01-09
|
|
406
|
-
|
|
407
|
-
Made with ❤️ by the CCG Community
|
|
408
|
-
|
|
409
|
-
</div>
|
|
135
|
+
v1.7.24 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
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.
|
|
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.CqFZ5tot.mjs';
|
|
5
5
|
import 'inquirer';
|
|
6
6
|
import 'node:child_process';
|
|
7
7
|
import 'node:util';
|
|
@@ -141,7 +141,7 @@ async function setupCommands(cli) {
|
|
|
141
141
|
}
|
|
142
142
|
await showMainMenu();
|
|
143
143
|
});
|
|
144
|
-
cli.command("init", "Initialize CCG multi-model collaboration system").alias("i").option("--lang, -l <lang>", "Display language (zh-CN, en)").option("--force, -f", "Force overwrite existing configuration").option("--skip-prompt, -s", "Skip all interactive prompts (non-interactive mode)").option("--frontend, -F <models>", "Frontend models (comma-separated: gemini,codex,claude)").option("--backend, -B <models>", "Backend models (comma-separated: codex,gemini,claude)").option("--mode, -m <mode>", "Collaboration mode (parallel, smart, sequential)").option("--workflows, -w <workflows>", 'Workflows to install (comma-separated or "all")').option("--install-dir, -d <path>", "Installation directory (default: ~/.claude)").action(async (options) => {
|
|
144
|
+
cli.command("init", "Initialize CCG multi-model collaboration system").alias("i").option("--lang, -l <lang>", "Display language (zh-CN, en)").option("--force, -f", "Force overwrite existing configuration").option("--skip-prompt, -s", "Skip all interactive prompts (non-interactive mode)").option("--skip-mcp", "Skip MCP configuration (used during update)").option("--frontend, -F <models>", "Frontend models (comma-separated: gemini,codex,claude)").option("--backend, -B <models>", "Backend models (comma-separated: codex,gemini,claude)").option("--mode, -m <mode>", "Collaboration mode (parallel, smart, sequential)").option("--workflows, -w <workflows>", 'Workflows to install (comma-separated or "all")').option("--install-dir, -d <path>", "Installation directory (default: ~/.claude)").action(async (options) => {
|
|
145
145
|
if (options.lang) {
|
|
146
146
|
await initI18n(options.lang);
|
|
147
147
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ interface CliOptions {
|
|
|
4
4
|
lang?: SupportedLang;
|
|
5
5
|
force?: boolean;
|
|
6
6
|
skipPrompt?: boolean;
|
|
7
|
+
skipMcp?: boolean;
|
|
7
8
|
frontend?: string;
|
|
8
9
|
backend?: string;
|
|
9
10
|
mode?: CollaborationMode;
|
|
@@ -66,6 +67,7 @@ interface WorkflowConfig {
|
|
|
66
67
|
interface InitOptions {
|
|
67
68
|
lang?: SupportedLang;
|
|
68
69
|
skipPrompt?: boolean;
|
|
70
|
+
skipMcp?: boolean;
|
|
69
71
|
force?: boolean;
|
|
70
72
|
frontend?: string;
|
|
71
73
|
backend?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ interface CliOptions {
|
|
|
4
4
|
lang?: SupportedLang;
|
|
5
5
|
force?: boolean;
|
|
6
6
|
skipPrompt?: boolean;
|
|
7
|
+
skipMcp?: boolean;
|
|
7
8
|
frontend?: string;
|
|
8
9
|
backend?: string;
|
|
9
10
|
mode?: CollaborationMode;
|
|
@@ -66,6 +67,7 @@ interface WorkflowConfig {
|
|
|
66
67
|
interface InitOptions {
|
|
67
68
|
lang?: SupportedLang;
|
|
68
69
|
skipPrompt?: boolean;
|
|
70
|
+
skipMcp?: boolean;
|
|
69
71
|
force?: boolean;
|
|
70
72
|
frontend?: string;
|
|
71
73
|
backend?: string;
|
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.
|
|
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.CqFZ5tot.mjs';
|
|
2
2
|
import 'ansis';
|
|
3
3
|
import 'inquirer';
|
|
4
4
|
import 'node:child_process';
|
|
@@ -10,7 +10,7 @@ import i18next from 'i18next';
|
|
|
10
10
|
import ora from 'ora';
|
|
11
11
|
import { parse, stringify } from 'smol-toml';
|
|
12
12
|
|
|
13
|
-
const version = "1.7.
|
|
13
|
+
const version = "1.7.26";
|
|
14
14
|
|
|
15
15
|
function isWindows() {
|
|
16
16
|
return process.platform === "win32";
|
|
@@ -721,17 +721,6 @@ async function installAceTool(config) {
|
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
|
|
724
|
-
const installer = {
|
|
725
|
-
__proto__: null,
|
|
726
|
-
getAllCommandIds: getAllCommandIds,
|
|
727
|
-
getWorkflowById: getWorkflowById,
|
|
728
|
-
getWorkflowConfigs: getWorkflowConfigs,
|
|
729
|
-
installAceTool: installAceTool,
|
|
730
|
-
installWorkflows: installWorkflows,
|
|
731
|
-
uninstallAceTool: uninstallAceTool,
|
|
732
|
-
uninstallWorkflows: uninstallWorkflows
|
|
733
|
-
};
|
|
734
|
-
|
|
735
724
|
async function configMcp() {
|
|
736
725
|
console.log();
|
|
737
726
|
console.log(ansis.cyan.bold(` \u914D\u7F6E ace-tool MCP`));
|
|
@@ -1326,7 +1315,9 @@ async function init(options = {}) {
|
|
|
1326
1315
|
let mcpProvider = "ace-tool";
|
|
1327
1316
|
let aceToolBaseUrl = "";
|
|
1328
1317
|
let aceToolToken = "";
|
|
1329
|
-
if (
|
|
1318
|
+
if (options.skipMcp) {
|
|
1319
|
+
mcpProvider = "skip";
|
|
1320
|
+
} else if (!options.skipPrompt) {
|
|
1330
1321
|
console.log();
|
|
1331
1322
|
console.log(ansis.cyan.bold(` \u{1F527} MCP \u5DE5\u5177\u914D\u7F6E`));
|
|
1332
1323
|
console.log();
|
|
@@ -1532,75 +1523,37 @@ async function init(options = {}) {
|
|
|
1532
1523
|
console.log();
|
|
1533
1524
|
console.log(ansis.cyan(` ${i18n.t("init:installedBinary")}`));
|
|
1534
1525
|
console.log(` ${ansis.green("\u2713")} codeagent-wrapper ${ansis.gray(`\u2192 ${result.binPath}`)}`);
|
|
1535
|
-
console.log();
|
|
1536
1526
|
const platform = process.platform;
|
|
1537
|
-
const exportCommand = `export PATH="${result.binPath}:$PATH"`;
|
|
1538
1527
|
if (platform === "win32") {
|
|
1539
|
-
console.log(ansis.yellow(` \u26A0 ${i18n.t("init:pathWarning")}`));
|
|
1540
|
-
console.log();
|
|
1541
|
-
console.log(ansis.cyan(` ${i18n.t("init:windowsPathInstructions")}`));
|
|
1542
|
-
console.log(ansis.gray(` 1. ${i18n.t("init:windowsStep1")}`));
|
|
1543
|
-
console.log(ansis.gray(` 2. ${i18n.t("init:windowsStep2")}`));
|
|
1544
|
-
console.log(ansis.gray(` 3. ${i18n.t("init:windowsStep3")}`));
|
|
1545
|
-
console.log(ansis.gray(` ${result.binPath.replace(/\//g, "\\")}`));
|
|
1546
|
-
console.log(ansis.gray(` 4. ${i18n.t("init:windowsStep4")}`));
|
|
1547
|
-
console.log();
|
|
1548
|
-
console.log(ansis.cyan(` ${i18n.t("init:orUsePowerShell")}`));
|
|
1549
1528
|
const windowsPath = result.binPath.replace(/\//g, "\\");
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
if (
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
rcContent = await fs.readFile(shellRc, "utf-8");
|
|
1572
|
-
}
|
|
1573
|
-
if (rcContent.includes(result.binPath) || rcContent.includes("/.claude/bin")) {
|
|
1574
|
-
console.log(ansis.green(` \u2713 ${i18n.t("init:pathAlreadyConfigured", { file: shellRcDisplay })}`));
|
|
1575
|
-
} else {
|
|
1576
|
-
const configLine = `
|
|
1529
|
+
try {
|
|
1530
|
+
const { execSync } = await import('node:child_process');
|
|
1531
|
+
const currentPath = execSync(`powershell -Command "[System.Environment]::GetEnvironmentVariable('PATH', 'User')"`, { encoding: "utf-8" }).trim();
|
|
1532
|
+
if (!currentPath.includes(windowsPath) && !currentPath.includes(".claude\\bin")) {
|
|
1533
|
+
execSync(`powershell -Command "[System.Environment]::SetEnvironmentVariable('PATH', '$env:PATH;${windowsPath}', 'User')"`, { stdio: "pipe" });
|
|
1534
|
+
console.log(` ${ansis.green("\u2713")} PATH ${ansis.gray("\u2192 \u7528\u6237\u73AF\u5883\u53D8\u91CF")}`);
|
|
1535
|
+
}
|
|
1536
|
+
} catch {
|
|
1537
|
+
}
|
|
1538
|
+
} else if (!options.skipPrompt) {
|
|
1539
|
+
const exportCommand = `export PATH="${result.binPath}:$PATH"`;
|
|
1540
|
+
const shellRc = process.env.SHELL?.includes("zsh") ? join(homedir(), ".zshrc") : join(homedir(), ".bashrc");
|
|
1541
|
+
const shellRcDisplay = process.env.SHELL?.includes("zsh") ? "~/.zshrc" : "~/.bashrc";
|
|
1542
|
+
try {
|
|
1543
|
+
let rcContent = "";
|
|
1544
|
+
if (await fs.pathExists(shellRc)) {
|
|
1545
|
+
rcContent = await fs.readFile(shellRc, "utf-8");
|
|
1546
|
+
}
|
|
1547
|
+
if (rcContent.includes(result.binPath) || rcContent.includes("/.claude/bin")) {
|
|
1548
|
+
} else {
|
|
1549
|
+
const configLine = `
|
|
1577
1550
|
# CCG multi-model collaboration system
|
|
1578
1551
|
${exportCommand}
|
|
1579
1552
|
`;
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
console.log();
|
|
1583
|
-
console.log(ansis.cyan(` ${i18n.t("init:restartShellPrompt")}`));
|
|
1584
|
-
console.log(ansis.gray(` source ${shellRcDisplay}`));
|
|
1585
|
-
}
|
|
1586
|
-
} catch (error) {
|
|
1587
|
-
console.log(ansis.red(` \u2717 ${i18n.t("init:pathConfigFailed")}`));
|
|
1588
|
-
console.log(ansis.gray(` ${i18n.t("init:manualConfigInstructions", { file: shellRcDisplay })}`));
|
|
1589
|
-
console.log(ansis.gray(` ${exportCommand}`));
|
|
1590
|
-
}
|
|
1591
|
-
} else {
|
|
1592
|
-
const shellRc = process.env.SHELL?.includes("zsh") ? "~/.zshrc" : "~/.bashrc";
|
|
1593
|
-
console.log();
|
|
1594
|
-
console.log(ansis.cyan(` ${i18n.t("init:manualConfigInstructions", { file: shellRc })}`));
|
|
1595
|
-
console.log(ansis.gray(` ${exportCommand}`));
|
|
1596
|
-
console.log(ansis.gray(` source ${shellRc}`));
|
|
1553
|
+
await fs.appendFile(shellRc, configLine, "utf-8");
|
|
1554
|
+
console.log(` ${ansis.green("\u2713")} PATH ${ansis.gray(`\u2192 ${shellRcDisplay}`)}`);
|
|
1597
1555
|
}
|
|
1598
|
-
}
|
|
1599
|
-
const shellRc = process.env.SHELL?.includes("zsh") ? "~/.zshrc" : "~/.bashrc";
|
|
1600
|
-
console.log();
|
|
1601
|
-
console.log(ansis.cyan(` ${i18n.t("init:manualConfigInstructions", { file: shellRc })}`));
|
|
1602
|
-
console.log(ansis.gray(` ${exportCommand}`));
|
|
1603
|
-
console.log(ansis.gray(` source ${shellRc}`));
|
|
1556
|
+
} catch {
|
|
1604
1557
|
}
|
|
1605
1558
|
}
|
|
1606
1559
|
}
|
|
@@ -1827,42 +1780,46 @@ async function performUpdate(fromVersion, toVersion, isNewVersion) {
|
|
|
1827
1780
|
console.log();
|
|
1828
1781
|
}
|
|
1829
1782
|
}
|
|
1830
|
-
|
|
1831
|
-
spinner = ora("\u6B63\u5728\u66F4\u65B0\u5DE5\u4F5C\u6D41\u548C codeagent-wrapper \u4E8C\u8FDB\u5236...").start();
|
|
1783
|
+
spinner = ora("\u6B63\u5728\u5220\u9664\u65E7\u5DE5\u4F5C\u6D41...").start();
|
|
1832
1784
|
try {
|
|
1833
|
-
const { getAllCommandIds } = await Promise.resolve().then(function () { return installer; });
|
|
1834
|
-
const workflows = getAllCommandIds();
|
|
1835
1785
|
const installDir = join(homedir(), ".claude");
|
|
1836
|
-
const
|
|
1837
|
-
|
|
1838
|
-
|
|
1786
|
+
const uninstallResult = await uninstallWorkflows(installDir);
|
|
1787
|
+
if (uninstallResult.success) {
|
|
1788
|
+
spinner.succeed("\u65E7\u5DE5\u4F5C\u6D41\u5DF2\u5220\u9664");
|
|
1789
|
+
} else {
|
|
1790
|
+
spinner.warn("\u90E8\u5206\u6587\u4EF6\u5220\u9664\u5931\u8D25\uFF0C\u7EE7\u7EED\u5B89\u88C5...");
|
|
1791
|
+
for (const error of uninstallResult.errors) {
|
|
1792
|
+
console.log(ansis.yellow(` \u2022 ${error}`));
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
} catch (error) {
|
|
1796
|
+
spinner.warn(`\u5220\u9664\u65E7\u5DE5\u4F5C\u6D41\u65F6\u51FA\u9519: ${error}\uFF0C\u7EE7\u7EED\u5B89\u88C5...`);
|
|
1797
|
+
}
|
|
1798
|
+
spinner = ora("\u6B63\u5728\u5B89\u88C5\u65B0\u7248\u672C\u5DE5\u4F5C\u6D41\u548C\u4E8C\u8FDB\u5236...").start();
|
|
1799
|
+
try {
|
|
1800
|
+
await execAsync$1(`npx --yes ccg-workflow@latest init --force --skip-mcp`, {
|
|
1801
|
+
timeout: 12e4,
|
|
1802
|
+
env: {
|
|
1803
|
+
...process.env,
|
|
1804
|
+
CCG_UPDATE_MODE: "true"
|
|
1805
|
+
// Signal to init that this is an update
|
|
1806
|
+
}
|
|
1839
1807
|
});
|
|
1840
|
-
|
|
1841
|
-
|
|
1808
|
+
spinner.succeed("\u65B0\u7248\u672C\u5B89\u88C5\u6210\u529F");
|
|
1809
|
+
const config = await readCcgConfig();
|
|
1810
|
+
if (config?.workflows?.installed) {
|
|
1842
1811
|
console.log();
|
|
1843
|
-
console.log(ansis.cyan(`\u5DF2\
|
|
1844
|
-
for (const cmd of
|
|
1812
|
+
console.log(ansis.cyan(`\u5DF2\u5B89\u88C5 ${config.workflows.installed.length} \u4E2A\u547D\u4EE4:`));
|
|
1813
|
+
for (const cmd of config.workflows.installed) {
|
|
1845
1814
|
console.log(` ${ansis.gray("\u2022")} /ccg:${cmd}`);
|
|
1846
1815
|
}
|
|
1847
|
-
if (config) {
|
|
1848
|
-
config.general.version = toVersion;
|
|
1849
|
-
config.workflows = {
|
|
1850
|
-
installed: workflows
|
|
1851
|
-
// Update to include all current commands
|
|
1852
|
-
};
|
|
1853
|
-
await writeCcgConfig(config);
|
|
1854
|
-
}
|
|
1855
|
-
} else {
|
|
1856
|
-
spinner.fail("\u66F4\u65B0\u5931\u8D25");
|
|
1857
|
-
console.log(ansis.red("\u90E8\u5206\u6587\u4EF6\u66F4\u65B0\u5931\u8D25:"));
|
|
1858
|
-
for (const error of result.errors) {
|
|
1859
|
-
console.log(ansis.red(` \u2022 ${error}`));
|
|
1860
|
-
}
|
|
1861
|
-
return;
|
|
1862
1816
|
}
|
|
1863
1817
|
} catch (error) {
|
|
1864
|
-
spinner.fail("\
|
|
1818
|
+
spinner.fail("\u5B89\u88C5\u65B0\u7248\u672C\u5931\u8D25");
|
|
1865
1819
|
console.log(ansis.red(`\u9519\u8BEF: ${error}`));
|
|
1820
|
+
console.log();
|
|
1821
|
+
console.log(ansis.yellow("\u8BF7\u5C1D\u8BD5\u624B\u52A8\u8FD0\u884C:"));
|
|
1822
|
+
console.log(ansis.cyan(" npx ccg-workflow@latest"));
|
|
1866
1823
|
return;
|
|
1867
1824
|
}
|
|
1868
1825
|
console.log();
|
package/package.json
CHANGED
|
@@ -51,6 +51,15 @@ EOF",
|
|
|
51
51
|
|
|
52
52
|
**并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
|
|
53
53
|
|
|
54
|
+
**等待后台任务**(使用最大超时 600000ms = 10分钟):
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**重要**:必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
|
|
61
|
+
如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
|
|
62
|
+
|
|
54
63
|
---
|
|
55
64
|
|
|
56
65
|
## 执行工作流
|
|
@@ -42,6 +42,15 @@ EOF",
|
|
|
42
42
|
|
|
43
43
|
**并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
|
|
44
44
|
|
|
45
|
+
**等待后台任务**(使用最大超时 600000ms = 10分钟):
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**重要**:必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
|
|
52
|
+
如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
|
|
53
|
+
|
|
45
54
|
---
|
|
46
55
|
|
|
47
56
|
## 执行工作流
|
|
@@ -57,6 +57,15 @@ EOF",
|
|
|
57
57
|
|
|
58
58
|
**并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
|
|
59
59
|
|
|
60
|
+
**等待后台任务**(使用最大超时 600000ms = 10分钟):
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**重要**:必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
|
|
67
|
+
如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
|
|
68
|
+
|
|
60
69
|
---
|
|
61
70
|
|
|
62
71
|
## 核心工作流程
|
|
@@ -48,6 +48,15 @@ EOF",
|
|
|
48
48
|
|
|
49
49
|
**并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
|
|
50
50
|
|
|
51
|
+
**等待后台任务**(使用最大超时 600000ms = 10分钟):
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**重要**:必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
|
|
58
|
+
如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
|
|
59
|
+
|
|
51
60
|
---
|
|
52
61
|
|
|
53
62
|
## 执行工作流
|
|
@@ -38,6 +38,15 @@ EOF",
|
|
|
38
38
|
|
|
39
39
|
**并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
|
|
40
40
|
|
|
41
|
+
**等待后台任务**(使用最大超时 600000ms = 10分钟):
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**重要**:必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
|
|
48
|
+
如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
|
|
49
|
+
|
|
41
50
|
---
|
|
42
51
|
|
|
43
52
|
## 执行工作流
|
|
@@ -60,6 +60,15 @@ EOF",
|
|
|
60
60
|
|
|
61
61
|
**并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
|
|
62
62
|
|
|
63
|
+
**等待后台任务**(使用最大超时 600000ms = 10分钟):
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**重要**:必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
|
|
70
|
+
如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
|
|
71
|
+
|
|
63
72
|
---
|
|
64
73
|
|
|
65
74
|
## 执行工作流
|
|
@@ -79,6 +79,15 @@ EOF",
|
|
|
79
79
|
|
|
80
80
|
**并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
|
|
81
81
|
|
|
82
|
+
**等待后台任务**(使用最大超时 600000ms = 10分钟):
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**重要**:必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
|
|
89
|
+
如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
|
|
90
|
+
|
|
82
91
|
---
|
|
83
92
|
|
|
84
93
|
## 沟通守则
|