ccg-workflow 1.7.83 → 1.7.84
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
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.DPGNdJGO.mjs';
|
|
5
5
|
import 'inquirer';
|
|
6
6
|
import 'node:child_process';
|
|
7
7
|
import 'node:util';
|
package/dist/index.d.mts
CHANGED
|
@@ -178,9 +178,12 @@ interface UninstallResult {
|
|
|
178
178
|
errors: string[];
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
|
-
* Uninstall workflows by removing their command files
|
|
181
|
+
* Uninstall workflows by removing their command files.
|
|
182
|
+
* @param options.preserveBinary — when true, skip binary removal (used during update)
|
|
182
183
|
*/
|
|
183
|
-
declare function uninstallWorkflows(installDir: string
|
|
184
|
+
declare function uninstallWorkflows(installDir: string, options?: {
|
|
185
|
+
preserveBinary?: boolean;
|
|
186
|
+
}): Promise<UninstallResult>;
|
|
184
187
|
|
|
185
188
|
/**
|
|
186
189
|
* Migration utilities for v1.4.0
|
package/dist/index.d.ts
CHANGED
|
@@ -178,9 +178,12 @@ interface UninstallResult {
|
|
|
178
178
|
errors: string[];
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
|
-
* Uninstall workflows by removing their command files
|
|
181
|
+
* Uninstall workflows by removing their command files.
|
|
182
|
+
* @param options.preserveBinary — when true, skip binary removal (used during update)
|
|
182
183
|
*/
|
|
183
|
-
declare function uninstallWorkflows(installDir: string
|
|
184
|
+
declare function uninstallWorkflows(installDir: string, options?: {
|
|
185
|
+
preserveBinary?: boolean;
|
|
186
|
+
}): Promise<UninstallResult>;
|
|
184
187
|
|
|
185
188
|
/**
|
|
186
189
|
* Migration utilities for v1.4.0
|
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.DPGNdJGO.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.84";
|
|
14
14
|
|
|
15
15
|
function cmd(id, order, category, name, nameEn, description, descriptionEn, cmdOverride) {
|
|
16
16
|
return {
|
|
@@ -850,6 +850,52 @@ function getBinaryName() {
|
|
|
850
850
|
const ext = process.platform === "win32" ? ".exe" : "";
|
|
851
851
|
return `codeagent-wrapper-${os}-${arch}${ext}`;
|
|
852
852
|
}
|
|
853
|
+
async function verifyBinary(installDir) {
|
|
854
|
+
const binDir = join(installDir, "bin");
|
|
855
|
+
const wrapperName = process.platform === "win32" ? "codeagent-wrapper.exe" : "codeagent-wrapper";
|
|
856
|
+
const wrapperPath = join(binDir, wrapperName);
|
|
857
|
+
if (!await fs.pathExists(wrapperPath)) return false;
|
|
858
|
+
try {
|
|
859
|
+
const { execSync } = await import('node:child_process');
|
|
860
|
+
execSync(`"${wrapperPath}" --version`, { stdio: "pipe" });
|
|
861
|
+
return true;
|
|
862
|
+
} catch {
|
|
863
|
+
return false;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
function showBinaryDownloadWarning(binDir) {
|
|
867
|
+
const binaryExt = process.platform === "win32" ? ".exe" : "";
|
|
868
|
+
const platformLabel = process.platform === "darwin" ? process.arch === "arm64" ? "darwin-arm64" : "darwin-amd64" : process.platform === "linux" ? process.arch === "arm64" ? "linux-arm64" : "linux-amd64" : process.arch === "arm64" ? "windows-arm64" : "windows-amd64";
|
|
869
|
+
const binaryFileName = `codeagent-wrapper-${platformLabel}${binaryExt}`;
|
|
870
|
+
const destFileName = `codeagent-wrapper${binaryExt}`;
|
|
871
|
+
const releaseUrl = `https://github.com/${GITHUB_REPO}/releases/tag/${RELEASE_TAG}`;
|
|
872
|
+
console.log();
|
|
873
|
+
console.log(ansis.red.bold(` \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557`));
|
|
874
|
+
console.log(ansis.red.bold(` \u2551 \u26A0 codeagent-wrapper \u4E0B\u8F7D\u5931\u8D25 \u2551`));
|
|
875
|
+
console.log(ansis.red.bold(` \u2551 Binary download failed (network issue) \u2551`));
|
|
876
|
+
console.log(ansis.red.bold(` \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D`));
|
|
877
|
+
console.log();
|
|
878
|
+
console.log(ansis.yellow(` \u591A\u6A21\u578B\u534F\u4F5C\u547D\u4EE4 (/ccg:workflow, /ccg:plan \u7B49) \u9700\u8981\u6B64\u6587\u4EF6\u624D\u80FD\u5DE5\u4F5C\u3002`));
|
|
879
|
+
console.log(ansis.yellow(` Multi-model commands require this binary to work.`));
|
|
880
|
+
console.log();
|
|
881
|
+
console.log(ansis.cyan(` \u624B\u52A8\u4FEE\u590D / Manual fix:`));
|
|
882
|
+
console.log();
|
|
883
|
+
console.log(ansis.white(` 1. \u4E0B\u8F7D / Download:`));
|
|
884
|
+
console.log(ansis.cyan(` ${releaseUrl}`));
|
|
885
|
+
console.log(ansis.gray(` \u2192 \u627E\u5230 ${ansis.white(binaryFileName)} \u5E76\u4E0B\u8F7D`));
|
|
886
|
+
console.log();
|
|
887
|
+
console.log(ansis.white(` 2. \u653E\u5230 / Place at:`));
|
|
888
|
+
console.log(ansis.cyan(` ${binDir}/${destFileName}`));
|
|
889
|
+
console.log();
|
|
890
|
+
if (process.platform !== "win32") {
|
|
891
|
+
console.log(ansis.white(` 3. \u52A0\u6743\u9650 / Make executable:`));
|
|
892
|
+
console.log(ansis.cyan(` chmod +x "${binDir}/${destFileName}"`));
|
|
893
|
+
console.log();
|
|
894
|
+
}
|
|
895
|
+
console.log(ansis.white(` \u6216\u91CD\u65B0\u5B89\u88C5 / Or re-install:`));
|
|
896
|
+
console.log(ansis.cyan(` npx ccg-workflow@latest`));
|
|
897
|
+
console.log();
|
|
898
|
+
}
|
|
853
899
|
async function installBinaryFile(ctx) {
|
|
854
900
|
try {
|
|
855
901
|
const binDir = join(ctx.installDir, "bin");
|
|
@@ -861,6 +907,16 @@ async function installBinaryFile(ctx) {
|
|
|
861
907
|
return;
|
|
862
908
|
}
|
|
863
909
|
const destBinary = join(binDir, process.platform === "win32" ? "codeagent-wrapper.exe" : "codeagent-wrapper");
|
|
910
|
+
if (await fs.pathExists(destBinary)) {
|
|
911
|
+
try {
|
|
912
|
+
const { execSync } = await import('node:child_process');
|
|
913
|
+
execSync(`"${destBinary}" --version`, { stdio: "pipe" });
|
|
914
|
+
ctx.result.binPath = binDir;
|
|
915
|
+
ctx.result.binInstalled = true;
|
|
916
|
+
return;
|
|
917
|
+
} catch {
|
|
918
|
+
}
|
|
919
|
+
}
|
|
864
920
|
const installed = await downloadBinaryFromRelease(binaryName, destBinary);
|
|
865
921
|
if (installed) {
|
|
866
922
|
try {
|
|
@@ -913,7 +969,7 @@ async function installWorkflows(workflowIds, installDir, force = false, config)
|
|
|
913
969
|
ctx.result.configPath = join(installDir, "commands", "ccg");
|
|
914
970
|
return ctx.result;
|
|
915
971
|
}
|
|
916
|
-
async function uninstallWorkflows(installDir) {
|
|
972
|
+
async function uninstallWorkflows(installDir, options) {
|
|
917
973
|
const result = {
|
|
918
974
|
success: true,
|
|
919
975
|
removedCommands: [],
|
|
@@ -964,7 +1020,7 @@ async function uninstallWorkflows(installDir) {
|
|
|
964
1020
|
result.errors.push(`Failed to remove rules: ${error}`);
|
|
965
1021
|
}
|
|
966
1022
|
}
|
|
967
|
-
if (await fs.pathExists(binDir)) {
|
|
1023
|
+
if (!options?.preserveBinary && await fs.pathExists(binDir)) {
|
|
968
1024
|
try {
|
|
969
1025
|
const wrapperName = process.platform === "win32" ? "codeagent-wrapper.exe" : "codeagent-wrapper";
|
|
970
1026
|
const wrapperPath = join(binDir, wrapperName);
|
|
@@ -988,6 +1044,17 @@ async function uninstallWorkflows(installDir) {
|
|
|
988
1044
|
return result;
|
|
989
1045
|
}
|
|
990
1046
|
|
|
1047
|
+
async function syncMcpMirrors() {
|
|
1048
|
+
const [codex, gemini] = await Promise.all([syncMcpToCodex(), syncMcpToGemini()]);
|
|
1049
|
+
const synced = [];
|
|
1050
|
+
if (codex.success && codex.synced.length > 0) synced.push(`Codex(${codex.synced.join(",")})`);
|
|
1051
|
+
if (gemini.success && gemini.synced.length > 0) synced.push(`Gemini(${gemini.synced.join(",")})`);
|
|
1052
|
+
if (synced.length > 0) {
|
|
1053
|
+
console.log(ansis.green(`\u2713 MCP \u5DF2\u540C\u6B65\u5230 ${synced.join(" + ")}`));
|
|
1054
|
+
}
|
|
1055
|
+
if (!codex.success) console.log(ansis.yellow(`\u26A0 Codex \u540C\u6B65\u5931\u8D25: ${codex.message}`));
|
|
1056
|
+
if (!gemini.success) console.log(ansis.yellow(`\u26A0 Gemini \u540C\u6B65\u5931\u8D25: ${gemini.message}`));
|
|
1057
|
+
}
|
|
991
1058
|
async function configMcp() {
|
|
992
1059
|
console.log();
|
|
993
1060
|
console.log(ansis.cyan.bold(` \u914D\u7F6E MCP \u5DE5\u5177`));
|
|
@@ -1063,6 +1130,7 @@ async function handleInstallAceTool(isRs) {
|
|
|
1063
1130
|
console.log();
|
|
1064
1131
|
if (result.success) {
|
|
1065
1132
|
console.log(ansis.green(`\u2713 ${toolName} MCP \u914D\u7F6E\u6210\u529F\uFF01`));
|
|
1133
|
+
await syncMcpMirrors();
|
|
1066
1134
|
console.log(ansis.gray(` \u91CD\u542F Claude Code CLI \u4F7F\u914D\u7F6E\u751F\u6548`));
|
|
1067
1135
|
} else {
|
|
1068
1136
|
console.log(ansis.red(`\u2717 ${toolName} MCP \u914D\u7F6E\u5931\u8D25: ${result.message}`));
|
|
@@ -1088,6 +1156,7 @@ async function handleInstallContextWeaver() {
|
|
|
1088
1156
|
console.log();
|
|
1089
1157
|
if (result.success) {
|
|
1090
1158
|
console.log(ansis.green("\u2713 ContextWeaver MCP \u914D\u7F6E\u6210\u529F\uFF01"));
|
|
1159
|
+
await syncMcpMirrors();
|
|
1091
1160
|
console.log(ansis.gray(" \u91CD\u542F Claude Code CLI \u4F7F\u914D\u7F6E\u751F\u6548"));
|
|
1092
1161
|
} else {
|
|
1093
1162
|
console.log(ansis.red(`\u2717 ContextWeaver MCP \u914D\u7F6E\u5931\u8D25: ${result.message}`));
|
|
@@ -1121,6 +1190,7 @@ async function handleInstallFastContext() {
|
|
|
1121
1190
|
await writeFastContextPrompt();
|
|
1122
1191
|
console.log(ansis.green("\u2713 fast-context MCP \u914D\u7F6E\u6210\u529F\uFF01"));
|
|
1123
1192
|
console.log(ansis.green("\u2713 \u641C\u7D22\u63D0\u793A\u8BCD\u5DF2\u5199\u5165 ~/.claude/rules/ + ~/.codex/AGENTS.md + ~/.gemini/GEMINI.md"));
|
|
1193
|
+
await syncMcpMirrors();
|
|
1124
1194
|
console.log(ansis.gray(" \u91CD\u542F Claude Code CLI \u4F7F\u914D\u7F6E\u751F\u6548"));
|
|
1125
1195
|
} else {
|
|
1126
1196
|
console.log(ansis.red(`\u2717 fast-context MCP \u914D\u7F6E\u5931\u8D25: ${result.message}`));
|
|
@@ -1213,6 +1283,7 @@ async function handleGrokSearch() {
|
|
|
1213
1283
|
await writeGrokPromptToRules();
|
|
1214
1284
|
console.log(ansis.green("\u2713 grok-search MCP \u914D\u7F6E\u6210\u529F\uFF01"));
|
|
1215
1285
|
console.log(ansis.green("\u2713 \u5168\u5C40\u641C\u7D22\u63D0\u793A\u8BCD\u5DF2\u5199\u5165 ~/.claude/rules/ccg-grok-search.md"));
|
|
1286
|
+
await syncMcpMirrors();
|
|
1216
1287
|
console.log(ansis.gray(" \u91CD\u542F Claude Code CLI \u4F7F\u914D\u7F6E\u751F\u6548"));
|
|
1217
1288
|
} else {
|
|
1218
1289
|
console.log(ansis.red(`\u2717 grok-search MCP \u5B89\u88C5\u5931\u8D25: ${result.message}`));
|
|
@@ -1265,6 +1336,7 @@ async function handleAuxiliary() {
|
|
|
1265
1336
|
}
|
|
1266
1337
|
}
|
|
1267
1338
|
console.log();
|
|
1339
|
+
await syncMcpMirrors();
|
|
1268
1340
|
console.log(ansis.gray("\u91CD\u542F Claude Code CLI \u4F7F\u914D\u7F6E\u751F\u6548"));
|
|
1269
1341
|
}
|
|
1270
1342
|
async function handleUninstall() {
|
|
@@ -1306,6 +1378,7 @@ async function handleUninstall() {
|
|
|
1306
1378
|
console.log(ansis.red(`\u2717 ${target} \u5378\u8F7D\u5931\u8D25: ${result.message}`));
|
|
1307
1379
|
}
|
|
1308
1380
|
}
|
|
1381
|
+
await syncMcpMirrors();
|
|
1309
1382
|
console.log();
|
|
1310
1383
|
}
|
|
1311
1384
|
|
|
@@ -3103,38 +3176,7 @@ ${exportCommand}
|
|
|
3103
3176
|
}
|
|
3104
3177
|
}
|
|
3105
3178
|
} else {
|
|
3106
|
-
|
|
3107
|
-
const binaryExt = process.platform === "win32" ? ".exe" : "";
|
|
3108
|
-
const platformLabel = process.platform === "darwin" ? process.arch === "arm64" ? "darwin-arm64" : "darwin-amd64" : process.platform === "linux" ? process.arch === "arm64" ? "linux-arm64" : "linux-amd64" : process.arch === "arm64" ? "windows-arm64" : "windows-amd64";
|
|
3109
|
-
const binaryFileName = `codeagent-wrapper-${platformLabel}${binaryExt}`;
|
|
3110
|
-
const destFileName = `codeagent-wrapper${binaryExt}`;
|
|
3111
|
-
const releaseUrl = `https://github.com/fengshao1227/ccg-workflow/releases/tag/preset`;
|
|
3112
|
-
console.log();
|
|
3113
|
-
console.log(ansis.red.bold(` \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557`));
|
|
3114
|
-
console.log(ansis.red.bold(` \u2551 \u26A0 codeagent-wrapper \u4E0B\u8F7D\u5931\u8D25 \u2551`));
|
|
3115
|
-
console.log(ansis.red.bold(` \u2551 Binary download failed (network issue) \u2551`));
|
|
3116
|
-
console.log(ansis.red.bold(` \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D`));
|
|
3117
|
-
console.log();
|
|
3118
|
-
console.log(ansis.yellow(` \u591A\u6A21\u578B\u534F\u4F5C\u547D\u4EE4 (/ccg:workflow, /ccg:plan \u7B49) \u9700\u8981\u6B64\u6587\u4EF6\u624D\u80FD\u5DE5\u4F5C\u3002`));
|
|
3119
|
-
console.log(ansis.yellow(` Multi-model commands require this binary to work.`));
|
|
3120
|
-
console.log();
|
|
3121
|
-
console.log(ansis.cyan(` \u624B\u52A8\u4FEE\u590D / Manual fix:`));
|
|
3122
|
-
console.log();
|
|
3123
|
-
console.log(ansis.white(` 1. \u4E0B\u8F7D / Download:`));
|
|
3124
|
-
console.log(ansis.cyan(` ${releaseUrl}`));
|
|
3125
|
-
console.log(ansis.gray(` \u2192 \u627E\u5230 ${ansis.white(binaryFileName)} \u5E76\u4E0B\u8F7D`));
|
|
3126
|
-
console.log();
|
|
3127
|
-
console.log(ansis.white(` 2. \u653E\u5230 / Place at:`));
|
|
3128
|
-
console.log(ansis.cyan(` ${binDest}/${destFileName}`));
|
|
3129
|
-
console.log();
|
|
3130
|
-
if (process.platform !== "win32") {
|
|
3131
|
-
console.log(ansis.white(` 3. \u52A0\u6743\u9650 / Make executable:`));
|
|
3132
|
-
console.log(ansis.cyan(` chmod +x "${binDest}/${destFileName}"`));
|
|
3133
|
-
console.log();
|
|
3134
|
-
}
|
|
3135
|
-
console.log(ansis.white(` \u6216\u91CD\u65B0\u5B89\u88C5 / Or re-install:`));
|
|
3136
|
-
console.log(ansis.cyan(` npx ccg-workflow@latest`));
|
|
3137
|
-
console.log();
|
|
3179
|
+
showBinaryDownloadWarning(join(installDir, "bin"));
|
|
3138
3180
|
}
|
|
3139
3181
|
if (mcpProvider === "skip" || (mcpProvider === "ace-tool" || mcpProvider === "ace-tool-rs") && !aceToolToken || mcpProvider === "contextweaver" && !contextWeaverApiKey) {
|
|
3140
3182
|
console.log();
|
|
@@ -3376,18 +3418,8 @@ async function performUpdate(fromVersion, toVersion, isNewVersion) {
|
|
|
3376
3418
|
}
|
|
3377
3419
|
spinner = ora(i18n.t("update:removingOld")).start();
|
|
3378
3420
|
const installDir = join(homedir(), ".claude");
|
|
3379
|
-
const binDir = join(installDir, "bin");
|
|
3380
|
-
const wrapperName = process.platform === "win32" ? "codeagent-wrapper.exe" : "codeagent-wrapper";
|
|
3381
|
-
const wrapperPath = join(binDir, wrapperName);
|
|
3382
|
-
const wrapperBackup = join(binDir, `${wrapperName}.bak`);
|
|
3383
|
-
let binaryBackedUp = false;
|
|
3384
3421
|
try {
|
|
3385
|
-
const
|
|
3386
|
-
if (await fsExtra.pathExists(wrapperPath)) {
|
|
3387
|
-
await fsExtra.copy(wrapperPath, wrapperBackup);
|
|
3388
|
-
binaryBackedUp = true;
|
|
3389
|
-
}
|
|
3390
|
-
const uninstallResult = await uninstallWorkflows(installDir);
|
|
3422
|
+
const uninstallResult = await uninstallWorkflows(installDir, { preserveBinary: true });
|
|
3391
3423
|
if (uninstallResult.success) {
|
|
3392
3424
|
spinner.succeed(i18n.t("update:oldRemoved"));
|
|
3393
3425
|
} else {
|
|
@@ -3410,11 +3442,6 @@ async function performUpdate(fromVersion, toVersion, isNewVersion) {
|
|
|
3410
3442
|
}
|
|
3411
3443
|
});
|
|
3412
3444
|
spinner.succeed(i18n.t("update:installDone"));
|
|
3413
|
-
if (binaryBackedUp) {
|
|
3414
|
-
const fsExtra = await import('fs-extra');
|
|
3415
|
-
await fsExtra.remove(wrapperBackup).catch(() => {
|
|
3416
|
-
});
|
|
3417
|
-
}
|
|
3418
3445
|
const config = await readCcgConfig();
|
|
3419
3446
|
if (config?.workflows?.installed) {
|
|
3420
3447
|
console.log();
|
|
@@ -3423,19 +3450,11 @@ async function performUpdate(fromVersion, toVersion, isNewVersion) {
|
|
|
3423
3450
|
console.log(` ${ansis.gray("\u2022")} /ccg:${cmd}`);
|
|
3424
3451
|
}
|
|
3425
3452
|
}
|
|
3453
|
+
if (!await verifyBinary(installDir)) {
|
|
3454
|
+
showBinaryDownloadWarning(join(installDir, "bin"));
|
|
3455
|
+
}
|
|
3426
3456
|
} catch (error) {
|
|
3427
3457
|
spinner.fail(i18n.t("update:installFailed"));
|
|
3428
|
-
if (binaryBackedUp) {
|
|
3429
|
-
try {
|
|
3430
|
-
const fsExtra = await import('fs-extra');
|
|
3431
|
-
if (await fsExtra.pathExists(wrapperBackup)) {
|
|
3432
|
-
await fsExtra.ensureDir(binDir);
|
|
3433
|
-
await fsExtra.move(wrapperBackup, wrapperPath, { overwrite: true });
|
|
3434
|
-
console.log(ansis.yellow(` \u2022 codeagent-wrapper restored from backup`));
|
|
3435
|
-
}
|
|
3436
|
-
} catch {
|
|
3437
|
-
}
|
|
3438
|
-
}
|
|
3439
3458
|
console.log(ansis.red(`${i18n.t("common:error")}: ${error}`));
|
|
3440
3459
|
console.log();
|
|
3441
3460
|
console.log(ansis.yellow(i18n.t("update:manualRetry")));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccg-workflow",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.84",
|
|
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",
|
|
@@ -77,7 +77,10 @@
|
|
|
77
77
|
"prepublishOnly": "pnpm build",
|
|
78
78
|
"test": "vitest run",
|
|
79
79
|
"lint": "eslint",
|
|
80
|
-
"lint:fix": "eslint --fix"
|
|
80
|
+
"lint:fix": "eslint --fix",
|
|
81
|
+
"docs:dev": "vitepress dev docs",
|
|
82
|
+
"docs:build": "vitepress build docs",
|
|
83
|
+
"docs:preview": "vitepress preview docs"
|
|
81
84
|
},
|
|
82
85
|
"dependencies": {
|
|
83
86
|
"ansis": "^4.1.0",
|
|
@@ -90,6 +93,9 @@
|
|
|
90
93
|
"pathe": "^2.0.3",
|
|
91
94
|
"smol-toml": "^1.4.2"
|
|
92
95
|
},
|
|
96
|
+
"pnpm": {
|
|
97
|
+
"onlyBuiltDependencies": ["esbuild"]
|
|
98
|
+
},
|
|
93
99
|
"devDependencies": {
|
|
94
100
|
"@antfu/eslint-config": "^5.4.1",
|
|
95
101
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -98,6 +104,7 @@
|
|
|
98
104
|
"tsx": "^4.20.5",
|
|
99
105
|
"typescript": "^5.9.2",
|
|
100
106
|
"unbuild": "^3.6.1",
|
|
107
|
+
"vitepress": "^1.6.4",
|
|
101
108
|
"vitest": "^3.1.1"
|
|
102
109
|
}
|
|
103
110
|
}
|