ccg-workflow 1.7.36 → 1.7.37

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 { 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.CWv0qU_o.mjs';
4
+ import { z as diagnoseMcpConfig, A as isWindows, B as readClaudeCodeConfig, C as fixWindowsMcpConfig, D as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, E as configMcp, F as version, a as i18n } from './shared/ccg-workflow.PIrYD2kE.mjs';
5
5
  import 'inquirer';
6
6
  import 'node:child_process';
7
7
  import 'node:util';
package/dist/index.d.mts CHANGED
@@ -166,6 +166,15 @@ declare function installAceTool(config: AceToolConfig): Promise<{
166
166
  message: string;
167
167
  configPath?: string;
168
168
  }>;
169
+ /**
170
+ * Install and configure ace-tool-rs MCP for Claude Code
171
+ * ace-tool-rs is a Rust implementation of ace-tool, more lightweight and faster
172
+ */
173
+ declare function installAceToolRs(config: AceToolConfig): Promise<{
174
+ success: boolean;
175
+ message: string;
176
+ configPath?: string;
177
+ }>;
169
178
 
170
179
  /**
171
180
  * Migration utilities for v1.4.0
@@ -212,5 +221,5 @@ declare function checkForUpdates(): Promise<{
212
221
  latestVersion: string | null;
213
222
  }>;
214
223
 
215
- export { changeLanguage, checkForUpdates, compareVersions, createDefaultConfig, createDefaultRouting, getCcgDir, getConfigPath, getCurrentVersion, getLatestVersion, getWorkflowById, getWorkflowConfigs, i18n, init, initI18n, installAceTool, installWorkflows, migrateToV1_4_0, needsMigration, readCcgConfig, showMainMenu, uninstallAceTool, uninstallWorkflows, update, writeCcgConfig };
224
+ export { changeLanguage, checkForUpdates, compareVersions, createDefaultConfig, createDefaultRouting, getCcgDir, getConfigPath, getCurrentVersion, getLatestVersion, getWorkflowById, getWorkflowConfigs, i18n, init, initI18n, installAceTool, installAceToolRs, installWorkflows, migrateToV1_4_0, needsMigration, readCcgConfig, showMainMenu, uninstallAceTool, uninstallWorkflows, update, writeCcgConfig };
216
225
  export type { AceToolConfig, CcgConfig, CliOptions, CollaborationMode, InitOptions, InstallResult, ModelRouting, ModelType, RoutingStrategy, SupportedLang, WorkflowConfig };
package/dist/index.d.ts CHANGED
@@ -166,6 +166,15 @@ declare function installAceTool(config: AceToolConfig): Promise<{
166
166
  message: string;
167
167
  configPath?: string;
168
168
  }>;
169
+ /**
170
+ * Install and configure ace-tool-rs MCP for Claude Code
171
+ * ace-tool-rs is a Rust implementation of ace-tool, more lightweight and faster
172
+ */
173
+ declare function installAceToolRs(config: AceToolConfig): Promise<{
174
+ success: boolean;
175
+ message: string;
176
+ configPath?: string;
177
+ }>;
169
178
 
170
179
  /**
171
180
  * Migration utilities for v1.4.0
@@ -212,5 +221,5 @@ declare function checkForUpdates(): Promise<{
212
221
  latestVersion: string | null;
213
222
  }>;
214
223
 
215
- export { changeLanguage, checkForUpdates, compareVersions, createDefaultConfig, createDefaultRouting, getCcgDir, getConfigPath, getCurrentVersion, getLatestVersion, getWorkflowById, getWorkflowConfigs, i18n, init, initI18n, installAceTool, installWorkflows, migrateToV1_4_0, needsMigration, readCcgConfig, showMainMenu, uninstallAceTool, uninstallWorkflows, update, writeCcgConfig };
224
+ export { changeLanguage, checkForUpdates, compareVersions, createDefaultConfig, createDefaultRouting, getCcgDir, getConfigPath, getCurrentVersion, getLatestVersion, getWorkflowById, getWorkflowConfigs, i18n, init, initI18n, installAceTool, installAceToolRs, installWorkflows, migrateToV1_4_0, needsMigration, readCcgConfig, showMainMenu, uninstallAceTool, uninstallWorkflows, update, writeCcgConfig };
216
225
  export type { AceToolConfig, CcgConfig, CliOptions, CollaborationMode, InitOptions, InstallResult, ModelRouting, ModelType, RoutingStrategy, SupportedLang, WorkflowConfig };
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.CWv0qU_o.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.PIrYD2kE.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.36";
13
+ const version = "1.7.37";
14
14
 
15
15
  function isWindows() {
16
16
  return process.platform === "win32";
@@ -723,18 +723,67 @@ async function installAceTool(config) {
723
723
  };
724
724
  }
725
725
  }
726
+ async function installAceToolRs(config) {
727
+ const { baseUrl, token } = config;
728
+ try {
729
+ let existingConfig = await readClaudeCodeConfig();
730
+ if (!existingConfig) {
731
+ existingConfig = { mcpServers: {} };
732
+ }
733
+ if (existingConfig.mcpServers && Object.keys(existingConfig.mcpServers).length > 0) {
734
+ const backupPath = await backupClaudeCodeConfig();
735
+ if (backupPath) {
736
+ console.log(` \u2713 Backup created: ${backupPath}`);
737
+ }
738
+ }
739
+ const args = ["ace-tool-rs"];
740
+ if (baseUrl) {
741
+ args.push("--base-url", baseUrl);
742
+ }
743
+ if (token) {
744
+ args.push("--token", token);
745
+ }
746
+ const aceToolRsConfig = buildMcpServerConfig({
747
+ type: "stdio",
748
+ command: "npx",
749
+ args,
750
+ env: {
751
+ RUST_LOG: "info"
752
+ }
753
+ });
754
+ let mergedConfig = mergeMcpServers(existingConfig, {
755
+ "ace-tool": aceToolRsConfig
756
+ });
757
+ if (isWindows()) {
758
+ mergedConfig = fixWindowsMcpConfig(mergedConfig);
759
+ console.log(" \u2713 Applied Windows MCP configuration fixes");
760
+ }
761
+ await writeClaudeCodeConfig(mergedConfig);
762
+ return {
763
+ success: true,
764
+ message: isWindows() ? "ace-tool-rs MCP configured successfully with Windows compatibility" : "ace-tool-rs MCP configured successfully",
765
+ configPath: join(homedir(), ".claude.json")
766
+ };
767
+ } catch (error) {
768
+ return {
769
+ success: false,
770
+ message: `Failed to configure ace-tool-rs: ${error}`
771
+ };
772
+ }
773
+ }
726
774
 
727
775
  async function configMcp() {
728
776
  console.log();
729
- console.log(ansis.cyan.bold(` \u914D\u7F6E ace-tool MCP`));
777
+ console.log(ansis.cyan.bold(` \u914D\u7F6E MCP \u5DE5\u5177`));
730
778
  console.log();
731
779
  const { action } = await inquirer.prompt([{
732
780
  type: "list",
733
781
  name: "action",
734
782
  message: "\u9009\u62E9\u64CD\u4F5C",
735
783
  choices: [
736
- { name: `${ansis.green("\u279C")} \u5B89\u88C5/\u66F4\u65B0 ace-tool MCP`, value: "install" },
737
- { name: `${ansis.red("\u2715")} \u5378\u8F7D ace-tool MCP`, value: "uninstall" },
784
+ { name: `${ansis.green("\u279C")} \u5B89\u88C5/\u66F4\u65B0 ace-tool MCP ${ansis.gray("(Node.js \u5B9E\u73B0)")}`, value: "install-ace-tool" },
785
+ { name: `${ansis.green("\u279C")} \u5B89\u88C5/\u66F4\u65B0 ace-tool-rs MCP ${ansis.yellow("(\u63A8\u8350)")} ${ansis.gray("(Rust \u5B9E\u73B0)")}`, value: "install-ace-tool-rs" },
786
+ { name: `${ansis.red("\u2715")} \u5378\u8F7D MCP \u914D\u7F6E`, value: "uninstall" },
738
787
  new inquirer.Separator(),
739
788
  { name: `${ansis.gray("\u8FD4\u56DE")}`, value: "cancel" }
740
789
  ]
@@ -746,8 +795,10 @@ async function configMcp() {
746
795
  await handleUninstall();
747
796
  return;
748
797
  }
798
+ const isAceToolRs = action === "install-ace-tool-rs";
799
+ const toolName = isAceToolRs ? "ace-tool-rs" : "ace-tool";
749
800
  console.log();
750
- console.log(ansis.cyan(`\u{1F4D6} \u83B7\u53D6 ace-tool \u8BBF\u95EE\u65B9\u5F0F\uFF1A`));
801
+ console.log(ansis.cyan(`\u{1F4D6} \u83B7\u53D6 ${toolName} \u8BBF\u95EE\u65B9\u5F0F\uFF1A`));
751
802
  console.log(` ${ansis.gray("\u2022")} ${ansis.cyan("\u5B98\u65B9\u670D\u52A1")}: ${ansis.underline("https://augmentcode.com/")}`);
752
803
  console.log(` ${ansis.gray("\u2022")} ${ansis.cyan("\u4E2D\u8F6C\u670D\u52A1")} ${ansis.yellow("(\u65E0\u9700\u6CE8\u518C)")}: ${ansis.underline("https://linux.do/t/topic/1291730")}`);
753
804
  console.log();
@@ -765,14 +816,15 @@ async function configMcp() {
765
816
  }
766
817
  ]);
767
818
  console.log();
768
- console.log(ansis.yellow("\u23F3 \u6B63\u5728\u914D\u7F6E ace-tool MCP..."));
819
+ console.log(ansis.yellow(`\u23F3 \u6B63\u5728\u914D\u7F6E ${toolName} MCP...`));
769
820
  console.log();
770
- const result = await installAceTool({
821
+ const installFn = isAceToolRs ? installAceToolRs : installAceTool;
822
+ const result = await installFn({
771
823
  baseUrl: aceAnswers.baseUrl?.trim() || void 0,
772
824
  token: aceAnswers.token.trim()
773
825
  });
774
826
  if (result.success) {
775
- console.log(ansis.green("\u2713 ace-tool MCP \u914D\u7F6E\u6210\u529F\uFF01"));
827
+ console.log(ansis.green(`\u2713 ${toolName} MCP \u914D\u7F6E\u6210\u529F\uFF01`));
776
828
  if (result.configPath) {
777
829
  console.log(ansis.gray(` \u914D\u7F6E\u6587\u4EF6: ${result.configPath}`));
778
830
  }
@@ -781,7 +833,7 @@ async function configMcp() {
781
833
  console.log(ansis.gray(" 1. \u91CD\u542F Claude Code CLI \u4F7F\u914D\u7F6E\u751F\u6548"));
782
834
  console.log(ansis.gray(" 2. \u8FD0\u884C /ccg:dev \u547D\u4EE4\u6D4B\u8BD5 MCP \u529F\u80FD"));
783
835
  } else {
784
- console.log(ansis.red("\u2717 ace-tool MCP \u914D\u7F6E\u5931\u8D25"));
836
+ console.log(ansis.red(`\u2717 ${toolName} MCP \u914D\u7F6E\u5931\u8D25`));
785
837
  console.log(ansis.gray(` \u9519\u8BEF\u4FE1\u606F: ${result.message}`));
786
838
  }
787
839
  console.log();
@@ -936,6 +988,16 @@ const zhCN = {
936
988
  token: "API Token:",
937
989
  installing: "\u6B63\u5728\u914D\u7F6E ace-tool MCP...",
938
990
  failed: "ace-tool \u914D\u7F6E\u5931\u8D25\uFF08\u53EF\u7A0D\u540E\u624B\u52A8\u914D\u7F6E\uFF09"
991
+ },
992
+ aceToolRs: {
993
+ title: "ace-tool-rs MCP \u914D\u7F6E",
994
+ description: "Rust \u5B9E\u73B0\u7684 ace-tool\uFF0C\u66F4\u8F7B\u91CF\u3001\u66F4\u5FEB\u901F",
995
+ getToken: "\u83B7\u53D6 Token",
996
+ configure: "\u662F\u5426\u914D\u7F6E ace-tool-rs MCP\uFF1F",
997
+ baseUrl: "API Base URL:",
998
+ token: "API Token:",
999
+ installing: "\u6B63\u5728\u914D\u7F6E ace-tool-rs MCP...",
1000
+ failed: "ace-tool-rs \u914D\u7F6E\u5931\u8D25\uFF08\u53EF\u7A0D\u540E\u624B\u52A8\u914D\u7F6E\uFF09"
939
1001
  }
940
1002
  },
941
1003
  menu: {
@@ -1096,6 +1158,16 @@ const en = {
1096
1158
  token: "API Token:",
1097
1159
  installing: "Configuring ace-tool MCP...",
1098
1160
  failed: "ace-tool configuration failed (can be configured manually later)"
1161
+ },
1162
+ aceToolRs: {
1163
+ title: "ace-tool-rs MCP Configuration",
1164
+ description: "Rust implementation of ace-tool, more lightweight and faster",
1165
+ getToken: "Get Token",
1166
+ configure: "Configure ace-tool-rs MCP?",
1167
+ baseUrl: "API Base URL:",
1168
+ token: "API Token:",
1169
+ installing: "Configuring ace-tool-rs MCP...",
1170
+ failed: "ace-tool-rs configuration failed (can be configured manually later)"
1099
1171
  }
1100
1172
  },
1101
1173
  menu: {
@@ -1331,24 +1403,30 @@ async function init(options = {}) {
1331
1403
  const { selectedMcp } = await inquirer.prompt([{
1332
1404
  type: "list",
1333
1405
  name: "selectedMcp",
1334
- message: "\u662F\u5426\u5B89\u88C5 ace-tool MCP\uFF1F",
1406
+ message: "\u9009\u62E9 MCP \u5DE5\u5177",
1335
1407
  choices: [
1336
1408
  {
1337
- name: `\u5B89\u88C5 ace-tool ${ansis.gray("(\u63A8\u8350) - \u4E00\u952E\u5B89\u88C5\uFF0C\u542B Prompt \u589E\u5F3A + \u4EE3\u7801\u68C0\u7D22")}`,
1409
+ name: `ace-tool ${ansis.gray("(Node.js \u5B9E\u73B0) - \u4E00\u952E\u5B89\u88C5\uFF0C\u542B Prompt \u589E\u5F3A + \u4EE3\u7801\u68C0\u7D22")}`,
1338
1410
  value: "ace-tool"
1339
1411
  },
1412
+ {
1413
+ name: `ace-tool-rs ${ansis.green("(\u63A8\u8350)")} ${ansis.gray("(Rust \u5B9E\u73B0) - \u66F4\u8F7B\u91CF\u3001\u66F4\u5FEB\u901F")}`,
1414
+ value: "ace-tool-rs"
1415
+ },
1340
1416
  {
1341
1417
  name: `\u8DF3\u8FC7 ${ansis.gray("- \u7A0D\u540E\u624B\u52A8\u914D\u7F6E\uFF08\u53EF\u9009 auggie \u7B49\u5176\u4ED6 MCP\uFF09")}`,
1342
1418
  value: "skip"
1343
1419
  }
1344
1420
  ],
1345
- default: "ace-tool"
1421
+ default: "ace-tool-rs"
1346
1422
  }]);
1347
1423
  mcpProvider = selectedMcp;
1348
- if (selectedMcp === "ace-tool") {
1424
+ if (selectedMcp === "ace-tool" || selectedMcp === "ace-tool-rs") {
1425
+ const toolName = selectedMcp === "ace-tool-rs" ? "ace-tool-rs" : "ace-tool";
1426
+ const toolDesc = selectedMcp === "ace-tool-rs" ? i18n.t("init:aceToolRs.description") : i18n.t("init:aceTool.description");
1349
1427
  console.log();
1350
- console.log(ansis.cyan.bold(` \u{1F527} ace-tool MCP \u914D\u7F6E`));
1351
- console.log(ansis.gray(` ${i18n.t("init:aceTool.description")}`));
1428
+ console.log(ansis.cyan.bold(` \u{1F527} ${toolName} MCP \u914D\u7F6E`));
1429
+ console.log(ansis.gray(` ${toolDesc}`));
1352
1430
  console.log();
1353
1431
  const { skipToken } = await inquirer.prompt([{
1354
1432
  type: "confirm",
@@ -1499,24 +1577,27 @@ async function init(options = {}) {
1499
1577
  routing,
1500
1578
  liteMode
1501
1579
  });
1502
- if (mcpProvider === "ace-tool" && aceToolToken) {
1503
- spinner.text = i18n.t("init:aceTool.installing");
1504
- const aceResult = await installAceTool({
1580
+ if ((mcpProvider === "ace-tool" || mcpProvider === "ace-tool-rs") && aceToolToken) {
1581
+ const toolName = mcpProvider === "ace-tool-rs" ? "ace-tool-rs" : "ace-tool";
1582
+ const installFn = mcpProvider === "ace-tool-rs" ? installAceToolRs : installAceTool;
1583
+ spinner.text = mcpProvider === "ace-tool-rs" ? i18n.t("init:aceToolRs.installing") : i18n.t("init:aceTool.installing");
1584
+ const aceResult = await installFn({
1505
1585
  baseUrl: aceToolBaseUrl,
1506
1586
  token: aceToolToken
1507
1587
  });
1508
1588
  if (aceResult.success) {
1509
1589
  spinner.succeed(ansis.green(i18n.t("init:installSuccess")));
1510
1590
  console.log();
1511
- console.log(` ${ansis.green("\u2713")} ace-tool MCP ${ansis.gray(`\u2192 ${aceResult.configPath}`)}`);
1591
+ console.log(` ${ansis.green("\u2713")} ${toolName} MCP ${ansis.gray(`\u2192 ${aceResult.configPath}`)}`);
1512
1592
  } else {
1513
- spinner.warn(ansis.yellow(i18n.t("init:aceTool.failed")));
1593
+ spinner.warn(ansis.yellow(mcpProvider === "ace-tool-rs" ? i18n.t("init:aceToolRs.failed") : i18n.t("init:aceTool.failed")));
1514
1594
  console.log(ansis.gray(` ${aceResult.message}`));
1515
1595
  }
1516
- } else if (mcpProvider === "ace-tool" && !aceToolToken) {
1596
+ } else if ((mcpProvider === "ace-tool" || mcpProvider === "ace-tool-rs") && !aceToolToken) {
1597
+ const toolName = mcpProvider === "ace-tool-rs" ? "ace-tool-rs" : "ace-tool";
1517
1598
  spinner.succeed(ansis.green(i18n.t("init:installSuccess")));
1518
1599
  console.log();
1519
- console.log(` ${ansis.yellow("\u26A0")} ace-tool MCP \u672A\u5B89\u88C5 ${ansis.gray("(Token \u672A\u63D0\u4F9B)")}`);
1600
+ console.log(` ${ansis.yellow("\u26A0")} ${toolName} MCP \u672A\u5B89\u88C5 ${ansis.gray("(Token \u672A\u63D0\u4F9B)")}`);
1520
1601
  console.log(` ${ansis.gray("\u2192")} \u7A0D\u540E\u8FD0\u884C ${ansis.cyan("npx ccg config mcp")} \u5B8C\u6210\u914D\u7F6E`);
1521
1602
  } else {
1522
1603
  spinner.succeed(ansis.green(i18n.t("init:installSuccess")));
@@ -2024,4 +2105,4 @@ async function uninstall() {
2024
2105
  console.log();
2025
2106
  }
2026
2107
 
2027
- export { readClaudeCodeConfig as A, fixWindowsMcpConfig as B, writeClaudeCodeConfig as C, configMcp as D, version as E, i18n as a, initI18n as b, changeLanguage as c, createDefaultConfig as d, createDefaultRouting as e, getConfigPath as f, getCcgDir as g, getWorkflowConfigs as h, init as i, getWorkflowById as j, installWorkflows as k, installAceTool as l, uninstallWorkflows as m, uninstallAceTool as n, migrateToV1_4_0 as o, needsMigration as p, getCurrentVersion as q, readCcgConfig as r, showMainMenu as s, getLatestVersion as t, update as u, checkForUpdates as v, writeCcgConfig as w, compareVersions as x, diagnoseMcpConfig as y, isWindows as z };
2108
+ export { isWindows as A, readClaudeCodeConfig as B, fixWindowsMcpConfig as C, writeClaudeCodeConfig as D, configMcp as E, version as F, i18n as a, initI18n as b, changeLanguage as c, createDefaultConfig as d, createDefaultRouting as e, getConfigPath as f, getCcgDir as g, getWorkflowConfigs as h, init as i, getWorkflowById as j, installWorkflows as k, installAceTool as l, installAceToolRs as m, uninstallWorkflows as n, uninstallAceTool as o, migrateToV1_4_0 as p, needsMigration as q, readCcgConfig as r, showMainMenu as s, getCurrentVersion as t, update as u, getLatestVersion as v, writeCcgConfig as w, checkForUpdates as x, compareVersions as y, diagnoseMcpConfig as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccg-workflow",
3
- "version": "1.7.36",
3
+ "version": "1.7.37",
4
4
  "description": "Claude-Codex-Gemini 多模型协作系统 - 智能路由多模型开发工作流",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.17.1",