ccg-workflow 1.7.96 → 1.7.98

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.CW80f46-.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.ahSyRaRM.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.CW80f46-.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.ahSyRaRM.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.96";
13
+ const version = "1.7.98";
14
14
 
15
15
  function cmd(id, order, category, name, nameEn, description, descriptionEn, cmdOverride) {
16
16
  return {
@@ -625,7 +625,7 @@ async function removeFastContextPrompt() {
625
625
  await removeFromFile(join(homedir(), ".gemini", "GEMINI.md"));
626
626
  }
627
627
 
628
- const EXPECTED_BINARY_VERSION = "5.8.0";
628
+ const EXPECTED_BINARY_VERSION = "5.9.0";
629
629
  const GITHUB_REPO = "fengshao1227/ccg-workflow";
630
630
  const RELEASE_TAG = "preset";
631
631
  const BINARY_SOURCES = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccg-workflow",
3
- "version": "1.7.96",
3
+ "version": "1.7.98",
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",
@@ -142,7 +142,7 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
142
142
  - 技术方案
143
143
  - 实施步骤
144
144
  - 关键文件列表
145
- - SESSION_ID(`CODEX_SESSION` / `GEMINI_SESSION`)
145
+ - SESSION_ID(`CODEX_SESSION`)。Gemini 无需 SESSION_ID,用 `resume latest`
146
146
 
147
147
  3. **执行前确认**:
148
148
  向用户展示计划摘要,确认后执行:
@@ -31,7 +31,7 @@ $ARGUMENTS
31
31
  ```
32
32
  # 复用会话调用(推荐)- 原型生成(Implementation Prototype)
33
33
  Bash({
34
- command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--progress --backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID> - \"{{WORKDIR}}\" <<'EOF'
34
+ command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--progress --backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID|latest> - \"{{WORKDIR}}\" <<'EOF'
35
35
  ROLE_FILE: <角色提示词路径>
36
36
  <TASK>
37
37
  需求:<任务描述>
@@ -64,7 +64,7 @@ EOF",
64
64
 
65
65
  ```
66
66
  Bash({
67
- command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--progress --backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID> - \"{{WORKDIR}}\" <<'EOF'
67
+ command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--progress --backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID|latest> - \"{{WORKDIR}}\" <<'EOF'
68
68
  ROLE_FILE: <角色提示词路径>
69
69
  <TASK>
70
70
  Scope: Audit the final code changes.
@@ -95,7 +95,7 @@ EOF",
95
95
  | 实施 | `~/.claude/.ccg/prompts/codex/architect.md` | `~/.claude/.ccg/prompts/gemini/frontend.md` |
96
96
  | 审查 | `~/.claude/.ccg/prompts/codex/reviewer.md` | `~/.claude/.ccg/prompts/gemini/reviewer.md` |
97
97
 
98
- **会话复用**:如果 `/ccg:plan` 提供了 SESSION_ID,使用 `resume <SESSION_ID>` 复用上下文。
98
+ **会话复用**:Codex 用 `resume <SESSION_ID>`(从 `/ccg:plan` 获取)。Gemini 的 stream-json 不输出 SESSION_ID,**Gemini 始终用 `resume latest`**。
99
99
 
100
100
  **等待后台任务**(最大超时 600000ms = 10 分钟):
101
101
 
@@ -185,7 +185,7 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
185
185
  3. OUTPUT: `Unified Diff Patch ONLY. Strictly prohibit any actual modifications.`
186
186
  4. **Gemini 是前端设计的权威,其 CSS/React/Vue 原型为最终视觉基准**
187
187
  5. ⚠️ **警告**:忽略 Gemini 对后端逻辑的建议
188
- 6. 若计划包含 `GEMINI_SESSION`:优先 `resume <GEMINI_SESSION>`
188
+ 6. Gemini 复用会话始终使用 `resume latest`(无需 GEMINI_SESSION
189
189
 
190
190
  #### Route B: 后端/逻辑/算法 → Codex
191
191
 
@@ -258,7 +258,7 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
258
258
  - 输入:变更的 Diff + 目标文件
259
259
  - 关注:可访问性、设计一致性、用户体验
260
260
 
261
- 用 `TaskOutput` 等待两个模型的完整审查结果。优先复用 Phase 3 的会话(`resume <SESSION_ID>`)以保持上下文一致。
261
+ 用 `TaskOutput` 等待两个模型的完整审查结果。优先复用 Phase 3 的会话(`resume <SESSION_ID|latest>`)以保持上下文一致。
262
262
 
263
263
  #### 5.2 整合修复
264
264
 
@@ -36,7 +36,7 @@ EOF",
36
36
 
37
37
  # 复用会话调用
38
38
  Bash({
39
- command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--progress --backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID> - \"{{WORKDIR}}\" <<'EOF'
39
+ command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--progress --backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID|latest> - \"{{WORKDIR}}\" <<'EOF'
40
40
  ROLE_FILE: <角色提示词路径>
41
41
  <TASK>
42
42
  需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
@@ -62,7 +62,7 @@ EOF",
62
62
  | 实施 | `~/.claude/.ccg/prompts/codex/architect.md` | `~/.claude/.ccg/prompts/gemini/frontend.md` |
63
63
  | 审查 | `~/.claude/.ccg/prompts/codex/reviewer.md` | `~/.claude/.ccg/prompts/gemini/reviewer.md` |
64
64
 
65
- **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 复用上下文。
65
+ **会话复用**:Codex 调用返回 `SESSION_ID: xxx`,后续用 `resume xxx`。Gemini 不输出 SESSION_ID,**Gemini 始终用 `resume latest`**。
66
66
 
67
67
  **并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
68
68
 
@@ -55,7 +55,7 @@ EOF",
55
55
 
56
56
  # 复用会话调用
57
57
  Bash({
58
- command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--progress --backend gemini --gemini-model gemini-3.1-pro-preview resume <SESSION_ID> - \"{{WORKDIR}}\" <<'EOF'
58
+ command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--progress --backend gemini --gemini-model gemini-3.1-pro-preview resume latest - \"{{WORKDIR}}\" <<'EOF'
59
59
  ROLE_FILE: <角色提示词路径>
60
60
  <TASK>
61
61
  需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
@@ -77,7 +77,7 @@ EOF",
77
77
  | 规划 | `~/.claude/.ccg/prompts/gemini/architect.md` |
78
78
  | 审查 | `~/.claude/.ccg/prompts/gemini/reviewer.md` |
79
79
 
80
- **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 复用上下文。阶段 2 保存 `GEMINI_SESSION`,阶段 3 和 5 使用 `resume` 复用。
80
+ **会话复用**:Gemini stream-json 不输出 SESSION_ID,因此 Gemini 复用会话始终使用 `resume latest`(恢复最近一次会话)。
81
81
 
82
82
  ⛔ **Gemini 失败必须重试**:若 Gemini 调用失败(非零退出码或输出包含错误信息),最多重试 2 次(间隔 5 秒)。仅当 3 次全部失败时才报告错误并终止。
83
83
 
@@ -114,7 +114,7 @@ EOF",
114
114
  - 上下文:阶段 1 收集的项目上下文
115
115
  - OUTPUT: UI 可行性分析、推荐方案(至少 2 个)、用户体验评估
116
116
 
117
- **📌 保存 SESSION_ID**(`GEMINI_SESSION`)用于后续阶段复用。
117
+ **📌 Gemini 使用 `resume latest` 复用会话**(无需保存 SESSION_ID)。
118
118
 
119
119
  输出方案(至少 2 个),等待用户选择。
120
120
 
@@ -122,7 +122,7 @@ EOF",
122
122
 
123
123
  `[模式:计划]` - Gemini 主导规划
124
124
 
125
- **⚠️ 必须调用 Gemini**(使用 `resume <GEMINI_SESSION>` 复用会话):
125
+ **⚠️ 必须调用 Gemini**(使用 `resume latest` 复用会话):
126
126
  - ROLE_FILE: `~/.claude/.ccg/prompts/gemini/architect.md`
127
127
  - 需求:用户选择的方案
128
128
  - 上下文:阶段 2 的分析结果
@@ -54,7 +54,7 @@ EOF",
54
54
  | 分析 | `~/.claude/.ccg/prompts/codex/analyzer.md` | `~/.claude/.ccg/prompts/gemini/analyzer.md` |
55
55
  | 规划 | `~/.claude/.ccg/prompts/codex/architect.md` | `~/.claude/.ccg/prompts/gemini/architect.md` |
56
56
 
57
- **会话复用**:每次调用返回 `SESSION_ID: xxx`(通常由 wrapper 输出),**必须保存**以供后续 `/ccg:execute` 使用。
57
+ **会话复用**:Codex 调用返回 `SESSION_ID: xxx`,**必须保存**供 `/ccg:execute` 使用。Gemini 不输出 SESSION_ID,**Gemini 后续用 `resume latest`**。
58
58
 
59
59
  **等待后台任务**(最大超时 600000ms = 10 分钟):
60
60
 
@@ -129,7 +129,7 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
129
129
  - 关注:UI/UX 影响、用户体验、视觉设计
130
130
  - OUTPUT: 多角度解决方案 + 优劣势分析
131
131
 
132
- 用 `TaskOutput` 等待两个模型的完整结果。**📌 保存 SESSION_ID**(`CODEX_SESSION` `GEMINI_SESSION`)。
132
+ 用 `TaskOutput` 等待两个模型的完整结果。**📌 保存 Codex 的 SESSION_ID**(`CODEX_SESSION`)。Gemini 无需保存,后续用 `resume latest`。
133
133
 
134
134
  #### 2.2 交叉验证
135
135
 
@@ -185,7 +185,7 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
185
185
 
186
186
  ### SESSION_ID(供 /ccg:execute 使用)
187
187
  - CODEX_SESSION: <session_id>
188
- - GEMINI_SESSION: <session_id>
188
+ - GEMINI_SESSION: latest(Gemini 始终用 `resume latest`)
189
189
  ```
190
190
 
191
191
  ### ⛔ Phase 2 结束:计划交付(非执行)
@@ -258,4 +258,4 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
258
258
  2. **不问 Y/N** – 只展示计划,让用户决定下一步
259
259
  3. **信任规则** – 后端以 Codex 为准,前端以 Gemini 为准
260
260
  4. 外部模型对文件系统**零写入权限**
261
- 5. **SESSION_ID 交接** – 计划末尾必须包含 `CODEX_SESSION` / `GEMINI_SESSION`(供 `/ccg:execute resume <SESSION_ID>` 使用)
261
+ 5. **SESSION_ID 交接** – 计划末尾必须包含 `CODEX_SESSION`(供 `/ccg:execute resume <SESSION_ID>` 使用)。Gemini 无需交接,execute 阶段用 `resume latest`
@@ -58,7 +58,7 @@ EOF",
58
58
 
59
59
  # 复用会话调用
60
60
  Bash({
61
- command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--progress --backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID> - \"{{WORKDIR}}\" <<'EOF'
61
+ command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--progress --backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID|latest> - \"{{WORKDIR}}\" <<'EOF'
62
62
  ROLE_FILE: <角色提示词路径>
63
63
  <TASK>
64
64
  需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
@@ -83,7 +83,7 @@ EOF",
83
83
  | 规划 | `~/.claude/.ccg/prompts/codex/architect.md` | `~/.claude/.ccg/prompts/gemini/architect.md` |
84
84
  | 审查 | `~/.claude/.ccg/prompts/codex/reviewer.md` | `~/.claude/.ccg/prompts/gemini/reviewer.md` |
85
85
 
86
- **会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 子命令复用上下文(注意:是 `resume`,不是 `--resume`)。
86
+ **会话复用**:Codex 调用返回 `SESSION_ID: xxx`,后续用 `resume xxx` 复用。Gemini 的 stream-json 不输出 SESSION_ID,**Gemini 始终用 `resume latest`**。
87
87
 
88
88
  **并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
89
89
 
@@ -134,7 +134,7 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
134
134
  - Codex:使用分析提示词,输出技术可行性、方案、风险
135
135
  - Gemini:使用分析提示词,输出 UI 可行性、方案、体验
136
136
 
137
- 用 `TaskOutput` 等待结果。**📌 保存 SESSION_ID**(`CODEX_SESSION` `GEMINI_SESSION`)。
137
+ 用 `TaskOutput` 等待结果。**📌 保存 Codex 的 SESSION_ID**(`CODEX_SESSION`)。Gemini 无需保存,后续用 `resume latest`。
138
138
 
139
139
  **务必遵循上方 `多模型调用规范` 的 `重要` 指示**
140
140
 
@@ -144,9 +144,9 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
144
144
 
145
145
  `[模式:计划]` - 多模型协作规划:
146
146
 
147
- **并行调用**(复用会话 `resume <SESSION_ID>`):
147
+ **并行调用**(复用会话):
148
148
  - Codex:使用规划提示词 + `resume $CODEX_SESSION`,输出后端架构
149
- - Gemini:使用规划提示词 + `resume $GEMINI_SESSION`,输出前端架构
149
+ - Gemini:使用规划提示词 + `resume latest`,输出前端架构
150
150
 
151
151
  用 `TaskOutput` 等待结果。
152
152