ccg-workflow 1.7.31 → 1.7.33
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
CHANGED
|
@@ -126,6 +126,10 @@ Codex Gemini
|
|
|
126
126
|
- [GudaStudio/skills](https://github.com/GuDaStudio/skills) - 路由设计
|
|
127
127
|
- [ace-tool](https://linux.do/t/topic/1344562) - MCP 工具
|
|
128
128
|
|
|
129
|
+
## Star History
|
|
130
|
+
|
|
131
|
+
[](https://www.star-history.com/#fengshao1227/ccg-workflow&type=timeline&legend=top-left)
|
|
132
|
+
|
|
129
133
|
## License
|
|
130
134
|
|
|
131
135
|
MIT
|
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.DIXwmkbk.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, 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.DIXwmkbk.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.33";
|
|
14
14
|
|
|
15
15
|
function isWindows() {
|
|
16
16
|
return process.platform === "win32";
|
|
@@ -1553,35 +1553,50 @@ async function init(options = {}) {
|
|
|
1553
1553
|
console.log(` ${ansis.green("\u2713")} codeagent-wrapper ${ansis.gray(`\u2192 ${result.binPath}`)}`);
|
|
1554
1554
|
const platform = process.platform;
|
|
1555
1555
|
if (platform === "win32") {
|
|
1556
|
-
const windowsPath = result.binPath.replace(/\//g, "\\");
|
|
1556
|
+
const windowsPath = result.binPath.replace(/\//g, "\\").replace(/\\$/, "");
|
|
1557
1557
|
try {
|
|
1558
1558
|
const { execSync } = await import('node:child_process');
|
|
1559
|
-
const
|
|
1560
|
-
|
|
1561
|
-
|
|
1559
|
+
const psFlags = "-NoProfile -NonInteractive -ExecutionPolicy Bypass";
|
|
1560
|
+
const currentPath = execSync(`powershell ${psFlags} -Command "[System.Environment]::GetEnvironmentVariable('PATH', 'User')"`, { encoding: "utf-8" }).trim();
|
|
1561
|
+
const currentPathNorm = currentPath.toLowerCase().replace(/\\$/g, "");
|
|
1562
|
+
const windowsPathNorm = windowsPath.toLowerCase();
|
|
1563
|
+
if (!currentPathNorm.includes(windowsPathNorm) && !currentPathNorm.includes(".claude\\bin")) {
|
|
1564
|
+
const escapedPath = windowsPath.replace(/'/g, "''");
|
|
1565
|
+
const psScript = currentPath ? `$p=[System.Environment]::GetEnvironmentVariable('PATH','User');[System.Environment]::SetEnvironmentVariable('PATH',($p+';'+'${escapedPath}'),'User')` : `[System.Environment]::SetEnvironmentVariable('PATH','${escapedPath}','User')`;
|
|
1566
|
+
execSync(`powershell ${psFlags} -Command "${psScript}"`, { stdio: "pipe" });
|
|
1562
1567
|
console.log(` ${ansis.green("\u2713")} PATH ${ansis.gray("\u2192 \u7528\u6237\u73AF\u5883\u53D8\u91CF")}`);
|
|
1563
1568
|
}
|
|
1564
1569
|
} catch {
|
|
1565
1570
|
}
|
|
1566
1571
|
} else if (!options.skipPrompt) {
|
|
1567
1572
|
const exportCommand = `export PATH="${result.binPath}:$PATH"`;
|
|
1568
|
-
const
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1573
|
+
const shell = process.env.SHELL || "";
|
|
1574
|
+
const isZsh = shell.includes("zsh");
|
|
1575
|
+
const isBash = shell.includes("bash");
|
|
1576
|
+
const isMacDefaultZsh = process.platform === "darwin" && !shell;
|
|
1577
|
+
if (isZsh || isBash || isMacDefaultZsh) {
|
|
1578
|
+
const shellRc = isZsh || isMacDefaultZsh ? join(homedir(), ".zshrc") : join(homedir(), ".bashrc");
|
|
1579
|
+
const shellRcDisplay = isZsh || isMacDefaultZsh ? "~/.zshrc" : "~/.bashrc";
|
|
1580
|
+
try {
|
|
1581
|
+
let rcContent = "";
|
|
1582
|
+
if (await fs.pathExists(shellRc)) {
|
|
1583
|
+
rcContent = await fs.readFile(shellRc, "utf-8");
|
|
1584
|
+
}
|
|
1585
|
+
if (rcContent.includes(result.binPath) || rcContent.includes("/.claude/bin")) {
|
|
1586
|
+
console.log(` ${ansis.green("\u2713")} PATH ${ansis.gray(`\u2192 ${shellRcDisplay} (\u5DF2\u914D\u7F6E)`)}`);
|
|
1587
|
+
} else {
|
|
1588
|
+
const configLine = `
|
|
1578
1589
|
# CCG multi-model collaboration system
|
|
1579
1590
|
${exportCommand}
|
|
1580
1591
|
`;
|
|
1581
|
-
|
|
1582
|
-
|
|
1592
|
+
await fs.appendFile(shellRc, configLine, "utf-8");
|
|
1593
|
+
console.log(` ${ansis.green("\u2713")} PATH ${ansis.gray(`\u2192 ${shellRcDisplay}`)}`);
|
|
1594
|
+
}
|
|
1595
|
+
} catch {
|
|
1583
1596
|
}
|
|
1584
|
-
}
|
|
1597
|
+
} else {
|
|
1598
|
+
console.log(` ${ansis.yellow("\u26A0")} PATH ${ansis.gray("\u2192 \u8BF7\u624B\u52A8\u6DFB\u52A0\u5230 shell \u914D\u7F6E:")}`);
|
|
1599
|
+
console.log(` ${ansis.cyan(exportCommand)}`);
|
|
1585
1600
|
}
|
|
1586
1601
|
}
|
|
1587
1602
|
}
|