ccg-workflow 1.3.4 → 1.3.6
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 +97 -28
- 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-windows-amd64.exe +0 -0
- package/dist/cli.mjs +2 -2
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccg-workflow.B-YN9p9d.mjs → ccg-workflow.D6FQGeQd.mjs} +60 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/ccg-workflow) [](https://opensource.org/licenses/MIT) [](https://claude.ai/code) [](https://github.com/openai/openai-python) [](https://ai.google.dev/)
|
|
8
8
|
|
|
9
|
-
> **最新版本 v1.3.
|
|
9
|
+
> **最新版本 v1.3.6**:修复 Codex API 客户端认证问题
|
|
10
10
|
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -14,12 +14,33 @@
|
|
|
14
14
|
|
|
15
15
|
## 🎉 最新更新
|
|
16
16
|
|
|
17
|
-
### v1.3.
|
|
17
|
+
### v1.3.6 - Codex API 认证修复 🔧
|
|
18
|
+
- ✅ **环境变量开关**:新增 `CODEX_DISABLE_SKIP_GIT_CHECK` 环境变量
|
|
19
|
+
- ✅ **认证兼容**:修复部分用户 Codex API 返回 403 "Client not allowed" 错误
|
|
20
|
+
- ✅ **灵活配置**:保持默认行为,允许用户按需禁用 `--skip-git-repo-check`
|
|
21
|
+
- ✅ **故障排除**:README 添加完整的 Codex 认证问题解决方案
|
|
22
|
+
|
|
23
|
+
### v1.3.5 - MCP 工具选择功能 🎯
|
|
24
|
+
- ✅ **交互式选择**:新增 MCP 工具选择菜单(ace-tool / auggie / 跳过)
|
|
25
|
+
- ✅ **ace-tool**:推荐选项,开箱即用含 Prompt 增强 + 代码检索
|
|
26
|
+
- ✅ **auggie**:官方版本,代码检索 + 可选 Prompt 增强(提示配置教程)
|
|
27
|
+
- ✅ **灵活配置**:允许跳过 MCP 配置,稍后手动配置
|
|
28
|
+
- ✅ **智能保存**:用户选择自动保存到 `~/.ccg/config.toml`
|
|
29
|
+
|
|
30
|
+
### v1.3.4 - 默认语言修复 🌏
|
|
31
|
+
- ✅ **中文界面**:修复 `npx ccg-workflow` 默认显示英文的问题
|
|
32
|
+
- ✅ **默认设置**:将默认语言改为中文(zh-CN)
|
|
33
|
+
- ✅ **用户体验**:国内用户无需手动选择语言
|
|
34
|
+
|
|
35
|
+
<details>
|
|
36
|
+
<summary>v1.3.3 - Windows PATH 配置安全修复 (2026-01-05)</summary>
|
|
37
|
+
|
|
18
38
|
- ✅ **安全修复**:Windows PATH 配置改用安全追加方法,避免 `setx` 1024 字符限制
|
|
19
39
|
- ✅ **新方法**:使用 PowerShell `[System.Environment]::GetEnvironmentVariable` 先读取后追加
|
|
20
40
|
- ✅ **重复检测**:自动检查路径是否已存在,避免重复添加
|
|
21
41
|
- ✅ **无字符限制**:支持超长 PATH(最大 32767 字符)
|
|
22
42
|
- ✅ **向下兼容**:不影响现有用户配置
|
|
43
|
+
</details>
|
|
23
44
|
|
|
24
45
|
<details>
|
|
25
46
|
<summary>v1.3.2 - MCP 配置缺失修复 (2026-01-05)</summary>
|
|
@@ -39,46 +60,44 @@
|
|
|
39
60
|
- ✅ **用户体验**:提供配置教程链接,不再误导用户认为 auggie 不支持 Prompt 增强
|
|
40
61
|
</details>
|
|
41
62
|
|
|
42
|
-
|
|
63
|
+
<details>
|
|
64
|
+
<summary>v1.3.0 - MCP 动态选择系统 (2026-01-05)</summary>
|
|
65
|
+
|
|
43
66
|
- ✅ **多 MCP 支持**:安装时可选 ace-tool(开箱即用Prompt增强+代码检索)或 auggie(官方原版,代码检索+可选Prompt增强)
|
|
44
67
|
- ✅ **交互式选择**:友好的 MCP 选择界面,对比功能差异,支持跳过安装
|
|
45
68
|
- ✅ **配置驱动**:生成 `~/.ccg/config.toml`,记录工具映射和参数名
|
|
46
69
|
- ✅ **自包含模板**:命令模板减少 50% 提示词长度,直接读取配置无需外部文档
|
|
47
70
|
- ✅ **完全兼容**:12个命令模板(dev, code, frontend, backend, review, analyze, enhance 等)支持动态 MCP 工具调用
|
|
48
71
|
- ✅ **灵活配置**:auggie 可通过配置支持 Prompt 增强(参考 [配置教程](https://linux.do/t/topic/1280612))
|
|
72
|
+
</details>
|
|
73
|
+
|
|
74
|
+
<details>
|
|
75
|
+
<summary>查看历史版本 (v1.0.0 - v1.2.3)</summary>
|
|
49
76
|
|
|
50
77
|
### v1.2.3 - 安装体验优化
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
- ✅ **文档清理**:删除过时提示,优化用户体验
|
|
78
|
+
- 安装后自动验证 `codeagent-wrapper` 可用性
|
|
79
|
+
- 安装失败时显示详细错误信息和解决方案
|
|
54
80
|
|
|
55
|
-
### v1.2.0 - ROLE_FILE 动态注入
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
- ✅ **自动化管理**:一行 `ROLE_FILE:` 搞定,无需手动粘贴
|
|
59
|
-
- ✅ **完整日志**:注入过程可追溯(文件路径、大小)
|
|
81
|
+
### v1.2.0 - ROLE_FILE 动态注入
|
|
82
|
+
- `codeagent-wrapper` 自动识别 `ROLE_FILE:` 指令
|
|
83
|
+
- 专家提示词零 token 消耗,不占用主会话
|
|
60
84
|
|
|
61
85
|
### v1.1.3 - PATH 自动配置
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
- ✅ **智能检测**:避免重复配置
|
|
65
|
-
- ✅ **开箱即用**:安装后直接可用 `codeagent-wrapper`
|
|
86
|
+
- Mac/Linux 自动添加到 shell 配置文件
|
|
87
|
+
- Windows 提供 PowerShell 一键命令
|
|
66
88
|
|
|
67
89
|
### v1.1.0 - 智能更新系统
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
- ✅ **增量更新**:仅更新命令模板和提示词,保留用户配置
|
|
71
|
-
- ✅ **强制修复**:支持强制重装,修复损坏的文件
|
|
72
|
-
- ✅ **零权限**:无需 sudo,无需全局安装
|
|
90
|
+
- 一键更新,无需卸载重装
|
|
91
|
+
- 保留用户配置和 MCP 设置
|
|
73
92
|
|
|
74
93
|
### v1.0.0 - npm 首次发布
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
|
|
94
|
+
- `npx ccg-workflow` 一键安装
|
|
95
|
+
- 三模型协作(Claude + Codex + Gemini)
|
|
96
|
+
- 18 个专家提示词
|
|
97
|
+
|
|
98
|
+
**完整变更记录**: [CHANGELOG.md](https://github.com/fengshao1227/ccg-workflow/blob/main/CHANGELOG.md)
|
|
99
|
+
|
|
100
|
+
</details>
|
|
82
101
|
|
|
83
102
|
---
|
|
84
103
|
|
|
@@ -612,6 +631,54 @@ EOF
|
|
|
612
631
|
|
|
613
632
|
## 常见问题
|
|
614
633
|
|
|
634
|
+
<details>
|
|
635
|
+
<summary><strong>Q: Codex API 返回 403 "Client not allowed" 错误</strong></summary>
|
|
636
|
+
|
|
637
|
+
**问题描述**:
|
|
638
|
+
```json
|
|
639
|
+
{
|
|
640
|
+
"error": "Client not allowed",
|
|
641
|
+
"message": "Your client is not authorized to use this API key"
|
|
642
|
+
}
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
**原因**:Codex API 对客户端验证有严格限制,`--skip-git-repo-check` 参数可能触发不同的认证逻辑。
|
|
646
|
+
|
|
647
|
+
**解决方案 1:禁用 git-repo-check(推荐)**
|
|
648
|
+
|
|
649
|
+
设置环境变量来禁用该参数:
|
|
650
|
+
```bash
|
|
651
|
+
# 临时禁用
|
|
652
|
+
export CODEX_DISABLE_SKIP_GIT_CHECK=true
|
|
653
|
+
/ccg:dev "your task"
|
|
654
|
+
|
|
655
|
+
# 永久禁用(添加到 ~/.zshrc 或 ~/.bashrc)
|
|
656
|
+
echo 'export CODEX_DISABLE_SKIP_GIT_CHECK=true' >> ~/.zshrc
|
|
657
|
+
source ~/.zshrc
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
**解决方案 2:检查 Codex 配置**
|
|
661
|
+
|
|
662
|
+
如果方案 1 无效,检查 Codex CLI 配置:
|
|
663
|
+
```bash
|
|
664
|
+
# 重新登录 Codex
|
|
665
|
+
codex logout
|
|
666
|
+
codex login
|
|
667
|
+
|
|
668
|
+
# 验证直接调用是否正常
|
|
669
|
+
codex e "test task"
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
**解决方案 3:更新 Codex CLI**
|
|
673
|
+
|
|
674
|
+
```bash
|
|
675
|
+
# 更新到最新版本
|
|
676
|
+
pip install --upgrade codex-cli
|
|
677
|
+
# 或
|
|
678
|
+
npm install -g @codex/cli
|
|
679
|
+
```
|
|
680
|
+
</details>
|
|
681
|
+
|
|
615
682
|
<details>
|
|
616
683
|
<summary><strong>Q: codex 总是思考太久超时该怎么办?</strong></summary>
|
|
617
684
|
|
|
@@ -664,7 +731,9 @@ npx ccg-workflow
|
|
|
664
731
|
<details>
|
|
665
732
|
<summary><strong>更多问题?</strong></summary>
|
|
666
733
|
|
|
667
|
-
|
|
734
|
+
查看完整讨论和 Q&A:
|
|
735
|
+
- [linux.do 社区讨论帖](https://linux.do/t/topic/1405588) - 包含 11 个常见问题的详细解答
|
|
736
|
+
- [GitHub Issues](https://github.com/fengshao1227/ccg-workflow/issues) - 提交问题和建议
|
|
668
737
|
</details>
|
|
669
738
|
|
|
670
739
|
---
|
|
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 { r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, a as i18n } from './shared/ccg-workflow.
|
|
4
|
+
import { r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, a as i18n } from './shared/ccg-workflow.D6FQGeQd.mjs';
|
|
5
5
|
import 'inquirer';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'pathe';
|
|
@@ -13,7 +13,7 @@ import 'smol-toml';
|
|
|
13
13
|
import 'node:child_process';
|
|
14
14
|
import 'node:util';
|
|
15
15
|
|
|
16
|
-
const version = "1.3.
|
|
16
|
+
const version = "1.3.6";
|
|
17
17
|
|
|
18
18
|
function customizeHelp(sections) {
|
|
19
19
|
sections.unshift({
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as changeLanguage, q as checkForUpdates, t as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, o as getCurrentVersion, p as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, k as installWorkflows, 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, q as checkForUpdates, t as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, o as getCurrentVersion, p as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, k as installWorkflows, r as readCcgConfig, s as showMainMenu, n as uninstallAceTool, m as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.D6FQGeQd.mjs';
|
|
2
2
|
import 'ansis';
|
|
3
3
|
import 'inquirer';
|
|
4
4
|
import 'node:os';
|
|
@@ -381,7 +381,7 @@ async function writeCcgConfig(config) {
|
|
|
381
381
|
function createDefaultConfig(options) {
|
|
382
382
|
return {
|
|
383
383
|
general: {
|
|
384
|
-
version: "1.3.
|
|
384
|
+
version: "1.3.5",
|
|
385
385
|
language: options.language,
|
|
386
386
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
387
387
|
},
|
|
@@ -395,7 +395,7 @@ function createDefaultConfig(options) {
|
|
|
395
395
|
backup: join(CCG_DIR, "backup")
|
|
396
396
|
},
|
|
397
397
|
mcp: {
|
|
398
|
-
provider: "ace-tool",
|
|
398
|
+
provider: options.mcpProvider || "ace-tool",
|
|
399
399
|
setup_url: "https://linux.do/t/topic/284963",
|
|
400
400
|
tools: {
|
|
401
401
|
code_search_ace: "mcp__ace-tool__search_context",
|
|
@@ -1025,30 +1025,67 @@ async function init(options = {}) {
|
|
|
1025
1025
|
}]);
|
|
1026
1026
|
selectedWorkflows = selected;
|
|
1027
1027
|
}
|
|
1028
|
+
let mcpProvider = "ace-tool";
|
|
1028
1029
|
let aceToolBaseUrl = "";
|
|
1029
1030
|
let aceToolToken = "";
|
|
1030
1031
|
if (!options.skipPrompt) {
|
|
1031
1032
|
console.log();
|
|
1032
|
-
console.log(ansis.cyan.bold(` \u{1F527}
|
|
1033
|
-
console.log(ansis.gray(` ${i18n.t("init:aceTool.description")}`));
|
|
1034
|
-
console.log(ansis.gray(` ${i18n.t("init:aceTool.getToken")}: https://augmentcode.com/`));
|
|
1033
|
+
console.log(ansis.cyan.bold(` \u{1F527} MCP \u5DE5\u5177\u9009\u62E9`));
|
|
1035
1034
|
console.log();
|
|
1036
|
-
const
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1035
|
+
const { selectedMcp } = await inquirer.prompt([{
|
|
1036
|
+
type: "list",
|
|
1037
|
+
name: "selectedMcp",
|
|
1038
|
+
message: "\u9009\u62E9 MCP \u4EE3\u7801\u68C0\u7D22\u5DE5\u5177",
|
|
1039
|
+
choices: [
|
|
1040
|
+
{
|
|
1041
|
+
name: `ace-tool ${ansis.gray("(\u63A8\u8350) - \u5F00\u7BB1\u5373\u7528\uFF0C\u542B Prompt \u589E\u5F3A + \u4EE3\u7801\u68C0\u7D22")}`,
|
|
1042
|
+
value: "ace-tool"
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
name: `auggie ${ansis.gray("(\u5B98\u65B9) - \u4EE3\u7801\u68C0\u7D22 + \u53EF\u9009 Prompt \u589E\u5F3A\uFF08\u9700\u989D\u5916\u914D\u7F6E\uFF09")}`,
|
|
1046
|
+
value: "auggie"
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
name: `\u8DF3\u8FC7 ${ansis.gray("- \u7A0D\u540E\u624B\u52A8\u914D\u7F6E")}`,
|
|
1050
|
+
value: "skip"
|
|
1051
|
+
}
|
|
1052
|
+
],
|
|
1053
|
+
default: "ace-tool"
|
|
1054
|
+
}]);
|
|
1055
|
+
mcpProvider = selectedMcp;
|
|
1056
|
+
if (selectedMcp === "ace-tool") {
|
|
1057
|
+
console.log();
|
|
1058
|
+
console.log(ansis.cyan.bold(` \u{1F527} ace-tool MCP \u914D\u7F6E`));
|
|
1059
|
+
console.log(ansis.gray(` ${i18n.t("init:aceTool.description")}`));
|
|
1060
|
+
console.log(ansis.gray(` ${i18n.t("init:aceTool.getToken")}: https://augmentcode.com/`));
|
|
1061
|
+
console.log();
|
|
1062
|
+
const aceAnswers = await inquirer.prompt([
|
|
1063
|
+
{
|
|
1064
|
+
type: "input",
|
|
1065
|
+
name: "baseUrl",
|
|
1066
|
+
message: `${i18n.t("init:aceTool.baseUrl")} ${ansis.gray("(Enter to skip)")}`,
|
|
1067
|
+
default: ""
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
type: "password",
|
|
1071
|
+
name: "token",
|
|
1072
|
+
message: `${i18n.t("init:aceTool.token")} ${ansis.gray("(Enter to skip)")}`,
|
|
1073
|
+
mask: "*"
|
|
1074
|
+
}
|
|
1075
|
+
]);
|
|
1076
|
+
aceToolBaseUrl = aceAnswers.baseUrl || "";
|
|
1077
|
+
aceToolToken = aceAnswers.token || "";
|
|
1078
|
+
} else if (selectedMcp === "auggie") {
|
|
1079
|
+
console.log();
|
|
1080
|
+
console.log(ansis.yellow(` \u2139\uFE0F auggie \u5DF2\u9009\u62E9`));
|
|
1081
|
+
console.log(ansis.gray(` \u4EE3\u7801\u68C0\u7D22\u529F\u80FD\u5F00\u7BB1\u5373\u7528`));
|
|
1082
|
+
console.log(ansis.gray(` Prompt \u589E\u5F3A\u9700\u989D\u5916\u914D\u7F6E: https://linux.do/t/topic/1280612`));
|
|
1083
|
+
console.log();
|
|
1084
|
+
} else {
|
|
1085
|
+
console.log();
|
|
1086
|
+
console.log(ansis.yellow(` \u2139\uFE0F \u5DF2\u8DF3\u8FC7 MCP \u914D\u7F6E\uFF0C\u53EF\u7A0D\u540E\u624B\u52A8\u914D\u7F6E`));
|
|
1087
|
+
console.log();
|
|
1088
|
+
}
|
|
1052
1089
|
}
|
|
1053
1090
|
const routing = {
|
|
1054
1091
|
frontend: {
|
|
@@ -1095,7 +1132,8 @@ async function init(options = {}) {
|
|
|
1095
1132
|
const config = createDefaultConfig({
|
|
1096
1133
|
language,
|
|
1097
1134
|
routing,
|
|
1098
|
-
installedWorkflows: selectedWorkflows
|
|
1135
|
+
installedWorkflows: selectedWorkflows,
|
|
1136
|
+
mcpProvider
|
|
1099
1137
|
});
|
|
1100
1138
|
await writeCcgConfig(config);
|
|
1101
1139
|
const installDir = options.installDir || join(homedir(), ".claude");
|