ccg-workflow 1.7.77 → 1.7.78
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 +23 -3
- package/README.zh-CN.md +23 -3
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccg-workflow.Dgh3VYDe.mjs → ccg-workflow.CiXIRxs4.mjs} +54 -31
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/ccg-workflow)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://claude.ai/code)
|
|
8
|
-
[]()
|
|
9
9
|
|
|
10
10
|
[简体中文](./README.zh-CN.md) | English
|
|
11
11
|
|
|
@@ -268,7 +268,7 @@ Add to `~/.claude/settings.json`:
|
|
|
268
268
|
"hooks": [
|
|
269
269
|
{
|
|
270
270
|
"type": "command",
|
|
271
|
-
"command": "jq -r '.tool_input.command' | grep -q 'codeagent-wrapper' && echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PreToolUse\", \"permissionDecision\": \"allow\", \"permissionDecisionReason\": \"codeagent-wrapper auto-approved\"}}' ||
|
|
271
|
+
"command": "jq -r '.tool_input.command' 2>/dev/null | grep -q 'codeagent-wrapper' && echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PreToolUse\", \"permissionDecision\": \"allow\", \"permissionDecisionReason\": \"codeagent-wrapper auto-approved\"}}' || true",
|
|
272
272
|
"timeout": 1
|
|
273
273
|
}
|
|
274
274
|
]
|
|
@@ -315,6 +315,20 @@ We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guideline
|
|
|
315
315
|
|
|
316
316
|
Looking for a place to start? Check out issues labeled [`good first issue`](https://github.com/fengshao1227/ccg-workflow/labels/good%20first%20issue).
|
|
317
317
|
|
|
318
|
+
## Contributors
|
|
319
|
+
|
|
320
|
+
<!-- readme: contributors,claude/-,bots/- -start -->
|
|
321
|
+
<table>
|
|
322
|
+
<tr>
|
|
323
|
+
<td align="center"><a href="https://github.com/fengshao1227"><img src="https://avatars.githubusercontent.com/fengshao1227?v=4&s=100" width="100;" alt="fengshao1227"/><br /><sub><b>fengshao1227</b></sub></a></td>
|
|
324
|
+
<td align="center"><a href="https://github.com/RebornQ"><img src="https://avatars.githubusercontent.com/RebornQ?v=4&s=100" width="100;" alt="RebornQ"/><br /><sub><b>RebornQ</b></sub></a></td>
|
|
325
|
+
<td align="center"><a href="https://github.com/23q3"><img src="https://avatars.githubusercontent.com/23q3?v=4&s=100" width="100;" alt="23q3"/><br /><sub><b>23q3</b></sub></a></td>
|
|
326
|
+
<td align="center"><a href="https://github.com/MrNine-666"><img src="https://avatars.githubusercontent.com/MrNine-666?v=4&s=100" width="100;" alt="MrNine-666"/><br /><sub><b>MrNine-666</b></sub></a></td>
|
|
327
|
+
<td align="center"><a href="https://github.com/GGzili"><img src="https://avatars.githubusercontent.com/GGzili?v=4&s=100" width="100;" alt="GGzili"/><br /><sub><b>GGzili</b></sub></a></td>
|
|
328
|
+
</tr>
|
|
329
|
+
</table>
|
|
330
|
+
<!-- readme: contributors,claude/-,bots/- -end -->
|
|
331
|
+
|
|
318
332
|
## Credits
|
|
319
333
|
|
|
320
334
|
- [cexll/myclaude](https://github.com/cexll/myclaude) — codeagent-wrapper
|
|
@@ -326,10 +340,16 @@ Looking for a place to start? Check out issues labeled [`good first issue`](http
|
|
|
326
340
|
|
|
327
341
|
[](https://www.star-history.com/#fengshao1227/ccg-workflow&type=timeline&legend=top-left)
|
|
328
342
|
|
|
343
|
+
## Contact
|
|
344
|
+
|
|
345
|
+
- **Email**: [fengshao1227@gmail.com](mailto:fengshao1227@gmail.com) — Sponsorship, collaboration, or development ideas
|
|
346
|
+
- **Issues**: [GitHub Issues](https://github.com/fengshao1227/ccg-workflow/issues) — Bug reports and feature requests
|
|
347
|
+
- **Discussions**: [GitHub Discussions](https://github.com/fengshao1227/ccg-workflow/discussions) — Questions and community chat
|
|
348
|
+
|
|
329
349
|
## License
|
|
330
350
|
|
|
331
351
|
MIT
|
|
332
352
|
|
|
333
353
|
---
|
|
334
354
|
|
|
335
|
-
v1.7.
|
|
355
|
+
v1.7.78 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues) | [Contributing](./CONTRIBUTING.md)
|
package/README.zh-CN.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/ccg-workflow)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://claude.ai/code)
|
|
8
|
-
[]()
|
|
9
9
|
|
|
10
10
|
简体中文 | [English](./README.md)
|
|
11
11
|
|
|
@@ -268,7 +268,7 @@ CCG 安装时自动写入 Hook,自动授权 `codeagent-wrapper` 命令(需 [
|
|
|
268
268
|
"hooks": [
|
|
269
269
|
{
|
|
270
270
|
"type": "command",
|
|
271
|
-
"command": "jq -r '.tool_input.command' | grep -q 'codeagent-wrapper' && echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PreToolUse\", \"permissionDecision\": \"allow\", \"permissionDecisionReason\": \"codeagent-wrapper auto-approved\"}}' ||
|
|
271
|
+
"command": "jq -r '.tool_input.command' 2>/dev/null | grep -q 'codeagent-wrapper' && echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PreToolUse\", \"permissionDecision\": \"allow\", \"permissionDecisionReason\": \"codeagent-wrapper auto-approved\"}}' || true",
|
|
272
272
|
"timeout": 1
|
|
273
273
|
}
|
|
274
274
|
]
|
|
@@ -315,6 +315,20 @@ npm uninstall -g ccg-workflow # npm 全局用户需额外执行
|
|
|
315
315
|
|
|
316
316
|
想找一个入手点?查看标记为 [`good first issue`](https://github.com/fengshao1227/ccg-workflow/labels/good%20first%20issue) 的 Issue。
|
|
317
317
|
|
|
318
|
+
## 贡献者
|
|
319
|
+
|
|
320
|
+
<!-- readme: contributors,claude/-,bots/- -start -->
|
|
321
|
+
<table>
|
|
322
|
+
<tr>
|
|
323
|
+
<td align="center"><a href="https://github.com/fengshao1227"><img src="https://avatars.githubusercontent.com/fengshao1227?v=4&s=100" width="100;" alt="fengshao1227"/><br /><sub><b>fengshao1227</b></sub></a></td>
|
|
324
|
+
<td align="center"><a href="https://github.com/RebornQ"><img src="https://avatars.githubusercontent.com/RebornQ?v=4&s=100" width="100;" alt="RebornQ"/><br /><sub><b>RebornQ</b></sub></a></td>
|
|
325
|
+
<td align="center"><a href="https://github.com/23q3"><img src="https://avatars.githubusercontent.com/23q3?v=4&s=100" width="100;" alt="23q3"/><br /><sub><b>23q3</b></sub></a></td>
|
|
326
|
+
<td align="center"><a href="https://github.com/MrNine-666"><img src="https://avatars.githubusercontent.com/MrNine-666?v=4&s=100" width="100;" alt="MrNine-666"/><br /><sub><b>MrNine-666</b></sub></a></td>
|
|
327
|
+
<td align="center"><a href="https://github.com/GGzili"><img src="https://avatars.githubusercontent.com/GGzili?v=4&s=100" width="100;" alt="GGzili"/><br /><sub><b>GGzili</b></sub></a></td>
|
|
328
|
+
</tr>
|
|
329
|
+
</table>
|
|
330
|
+
<!-- readme: contributors,claude/-,bots/- -end -->
|
|
331
|
+
|
|
318
332
|
## 致谢
|
|
319
333
|
|
|
320
334
|
- [cexll/myclaude](https://github.com/cexll/myclaude) — codeagent-wrapper
|
|
@@ -326,10 +340,16 @@ npm uninstall -g ccg-workflow # npm 全局用户需额外执行
|
|
|
326
340
|
|
|
327
341
|
[](https://www.star-history.com/#fengshao1227/ccg-workflow&type=timeline&legend=top-left)
|
|
328
342
|
|
|
343
|
+
## 联系方式
|
|
344
|
+
|
|
345
|
+
- **邮箱**: [fengshao1227@gmail.com](mailto:fengshao1227@gmail.com) — 赞助、合作洽谈、开发交流
|
|
346
|
+
- **Issues**: [GitHub Issues](https://github.com/fengshao1227/ccg-workflow/issues) — Bug 反馈与功能建议
|
|
347
|
+
- **讨论区**: [GitHub Discussions](https://github.com/fengshao1227/ccg-workflow/discussions) — 问题咨询与社区交流
|
|
348
|
+
|
|
329
349
|
## License
|
|
330
350
|
|
|
331
351
|
MIT
|
|
332
352
|
|
|
333
353
|
---
|
|
334
354
|
|
|
335
|
-
v1.7.
|
|
355
|
+
v1.7.78 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues) | [参与贡献](./CONTRIBUTING.md)
|
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.
|
|
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.CiXIRxs4.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.
|
|
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.CiXIRxs4.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.
|
|
13
|
+
const version = "1.7.78";
|
|
14
14
|
|
|
15
15
|
function isWindows() {
|
|
16
16
|
return process.platform === "win32";
|
|
@@ -746,21 +746,7 @@ ${workflow.description}
|
|
|
746
746
|
return result;
|
|
747
747
|
}
|
|
748
748
|
const destBinary = join(binDir, platform === "win32" ? "codeagent-wrapper.exe" : "codeagent-wrapper");
|
|
749
|
-
|
|
750
|
-
try {
|
|
751
|
-
installed = await downloadBinaryFromRelease(binaryName, destBinary);
|
|
752
|
-
} catch {
|
|
753
|
-
}
|
|
754
|
-
if (!installed) {
|
|
755
|
-
const srcBinary = join(PACKAGE_ROOT$1, "bin", binaryName);
|
|
756
|
-
if (await fs.pathExists(srcBinary)) {
|
|
757
|
-
await fs.copy(srcBinary, destBinary);
|
|
758
|
-
if (platform !== "win32") {
|
|
759
|
-
await fs.chmod(destBinary, 493);
|
|
760
|
-
}
|
|
761
|
-
installed = true;
|
|
762
|
-
}
|
|
763
|
-
}
|
|
749
|
+
const installed = await downloadBinaryFromRelease(binaryName, destBinary);
|
|
764
750
|
if (installed) {
|
|
765
751
|
try {
|
|
766
752
|
const { execSync } = await import('node:child_process');
|
|
@@ -772,7 +758,7 @@ ${workflow.description}
|
|
|
772
758
|
result.success = false;
|
|
773
759
|
}
|
|
774
760
|
} else {
|
|
775
|
-
result.errors.push(`Failed to
|
|
761
|
+
result.errors.push(`Failed to download binary: ${binaryName} from GitHub Release. Check network or visit https://github.com/${GITHUB_REPO}/releases/tag/${RELEASE_TAG}`);
|
|
776
762
|
result.success = false;
|
|
777
763
|
}
|
|
778
764
|
} catch (error) {
|
|
@@ -2503,26 +2489,58 @@ async function installHook(settingsPath) {
|
|
|
2503
2489
|
if (await fs.pathExists(settingsPath)) {
|
|
2504
2490
|
settings = await fs.readJSON(settingsPath);
|
|
2505
2491
|
}
|
|
2492
|
+
if (isWindows()) {
|
|
2493
|
+
if (settings.hooks?.PreToolUse) {
|
|
2494
|
+
const hookIdx = settings.hooks.PreToolUse.findIndex(
|
|
2495
|
+
(h) => h.matcher === "Bash" && h.hooks?.some((hh) => hh.command?.includes("codeagent-wrapper"))
|
|
2496
|
+
);
|
|
2497
|
+
if (hookIdx >= 0) {
|
|
2498
|
+
settings.hooks.PreToolUse.splice(hookIdx, 1);
|
|
2499
|
+
if (settings.hooks.PreToolUse.length === 0)
|
|
2500
|
+
delete settings.hooks.PreToolUse;
|
|
2501
|
+
if (settings.hooks && Object.keys(settings.hooks).length === 0)
|
|
2502
|
+
delete settings.hooks;
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
if (!settings.permissions)
|
|
2506
|
+
settings.permissions = {};
|
|
2507
|
+
if (!settings.permissions.allow)
|
|
2508
|
+
settings.permissions.allow = [];
|
|
2509
|
+
const permEntry = "Bash(codeagent-wrapper*)";
|
|
2510
|
+
if (!settings.permissions.allow.includes(permEntry)) {
|
|
2511
|
+
settings.permissions.allow.push(permEntry);
|
|
2512
|
+
}
|
|
2513
|
+
await fs.writeJSON(settingsPath, settings, { spaces: 2 });
|
|
2514
|
+
return "permission";
|
|
2515
|
+
}
|
|
2506
2516
|
if (!settings.hooks)
|
|
2507
2517
|
settings.hooks = {};
|
|
2508
2518
|
if (!settings.hooks.PreToolUse)
|
|
2509
2519
|
settings.hooks.PreToolUse = [];
|
|
2510
|
-
const
|
|
2520
|
+
const newCommand = `jq -r '.tool_input.command' 2>/dev/null | grep -q 'codeagent-wrapper' && echo '{"hookSpecificOutput": {"hookEventName": "PreToolUse", "permissionDecision": "allow", "permissionDecisionReason": "codeagent-wrapper auto-approved"}}' || true`;
|
|
2521
|
+
const existingIdx = settings.hooks.PreToolUse.findIndex(
|
|
2511
2522
|
(h) => h.matcher === "Bash" && h.hooks?.some((hh) => hh.command?.includes("codeagent-wrapper"))
|
|
2512
2523
|
);
|
|
2513
|
-
if (
|
|
2524
|
+
if (existingIdx >= 0) {
|
|
2525
|
+
const oldCmd = settings.hooks.PreToolUse[existingIdx]?.hooks?.[0]?.command || "";
|
|
2526
|
+
if (oldCmd.includes("exit 1")) {
|
|
2527
|
+
settings.hooks.PreToolUse[existingIdx].hooks[0].command = newCommand;
|
|
2528
|
+
await fs.writeJSON(settingsPath, settings, { spaces: 2 });
|
|
2529
|
+
}
|
|
2530
|
+
} else {
|
|
2514
2531
|
settings.hooks.PreToolUse.push({
|
|
2515
2532
|
matcher: "Bash",
|
|
2516
2533
|
hooks: [
|
|
2517
2534
|
{
|
|
2518
2535
|
type: "command",
|
|
2519
|
-
command:
|
|
2536
|
+
command: newCommand,
|
|
2520
2537
|
timeout: 1
|
|
2521
2538
|
}
|
|
2522
2539
|
]
|
|
2523
2540
|
});
|
|
2524
2541
|
await fs.writeJSON(settingsPath, settings, { spaces: 2 });
|
|
2525
2542
|
}
|
|
2543
|
+
return "hook";
|
|
2526
2544
|
}
|
|
2527
2545
|
async function appendGrokSearchPrompt() {
|
|
2528
2546
|
const rulesDir = join(homedir(), ".claude", "rules");
|
|
@@ -2999,9 +3017,13 @@ async function init(options = {}) {
|
|
|
2999
3017
|
console.log();
|
|
3000
3018
|
console.log(` ${ansis.green("\u2713")} API ${ansis.gray(`\u2192 ${settingsPath}`)}`);
|
|
3001
3019
|
}
|
|
3002
|
-
await installHook(settingsPath);
|
|
3020
|
+
const hookMethod = await installHook(settingsPath);
|
|
3003
3021
|
console.log();
|
|
3004
|
-
|
|
3022
|
+
if (hookMethod === "permission") {
|
|
3023
|
+
console.log(` ${ansis.green("\u2713")} ${i18n.t("init:hooks.installed")} ${ansis.gray("(permissions.allow)")}`);
|
|
3024
|
+
} else {
|
|
3025
|
+
console.log(` ${ansis.green("\u2713")} ${i18n.t("init:hooks.installed")}`);
|
|
3026
|
+
}
|
|
3005
3027
|
if (wantGrokSearch && (tavilyKey || firecrawlKey || grokApiUrl || grokApiKey)) {
|
|
3006
3028
|
spinner.text = i18n.t("init:grok.installing");
|
|
3007
3029
|
const grokResult = await installGrokSearchMcp({
|
|
@@ -3045,15 +3067,16 @@ async function init(options = {}) {
|
|
|
3045
3067
|
console.log(ansis.gray(` ${codexSyncResult.message}`));
|
|
3046
3068
|
}
|
|
3047
3069
|
}
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3070
|
+
if (hookMethod === "hook") {
|
|
3071
|
+
const hasJq = await checkJqAvailable();
|
|
3072
|
+
if (!hasJq) {
|
|
3073
|
+
console.log();
|
|
3074
|
+
console.log(ansis.yellow(` \u26A0 ${i18n.t("init:hooks.jqNotFound")}`));
|
|
3075
|
+
console.log();
|
|
3076
|
+
console.log(ansis.cyan(` \u{1F4D6} ${i18n.t("init:hooks.jqInstallHint")}:`));
|
|
3077
|
+
console.log(ansis.gray(` ${i18n.t("init:hooks.jqMac")}`));
|
|
3078
|
+
console.log(ansis.gray(` ${i18n.t("init:hooks.jqLinux")}`));
|
|
3079
|
+
}
|
|
3057
3080
|
}
|
|
3058
3081
|
console.log();
|
|
3059
3082
|
console.log(ansis.cyan(` ${i18n.t("init:installedCommands")}`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccg-workflow",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.78",
|
|
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",
|
|
@@ -91,7 +91,6 @@
|
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@antfu/eslint-config": "^5.4.1",
|
|
93
93
|
"@types/fs-extra": "^11.0.4",
|
|
94
|
-
"@types/inquirer": "^9.0.9",
|
|
95
94
|
"@types/node": "^22.0.0",
|
|
96
95
|
"eslint": "^9.36.0",
|
|
97
96
|
"tsx": "^4.20.5",
|