ccg-workflow 1.1.1 → 1.1.2

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
@@ -95,8 +95,6 @@
95
95
  # 交互式配置安装
96
96
  npx ccg-workflow
97
97
 
98
- # 或简写
99
- npx ccg
100
98
  ```
101
99
 
102
100
  ### 方式二:全局安装
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.BJvXd6ru.mjs';
4
+ import { r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, a as i18n } from './shared/ccg-workflow.kbezU1LQ.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.1.1";
16
+ const version = "1.1.2";
17
17
 
18
18
  function customizeHelp(sections) {
19
19
  sections.unshift({
package/dist/index.d.mts CHANGED
@@ -75,6 +75,8 @@ interface InstallResult {
75
75
  installedPrompts: string[];
76
76
  errors: string[];
77
77
  configPath: string;
78
+ binPath?: string;
79
+ binInstalled?: boolean;
78
80
  }
79
81
  interface AceToolConfig {
80
82
  baseUrl: string;
package/dist/index.d.ts CHANGED
@@ -75,6 +75,8 @@ interface InstallResult {
75
75
  installedPrompts: string[];
76
76
  errors: string[];
77
77
  configPath: string;
78
+ binPath?: string;
79
+ binInstalled?: boolean;
78
80
  }
79
81
  interface AceToolConfig {
80
82
  baseUrl: string;
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.BJvXd6ru.mjs';
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.kbezU1LQ.mjs';
2
2
  import 'ansis';
3
3
  import 'inquirer';
4
4
  import 'node:os';
@@ -76,6 +76,9 @@ const zhCN = {
76
76
  installCancelled: "\u5B89\u88C5\u5DF2\u53D6\u6D88",
77
77
  installedCommands: "\u5DF2\u5B89\u88C5\u547D\u4EE4:",
78
78
  installedPrompts: "\u5DF2\u5B89\u88C5\u89D2\u8272\u63D0\u793A\u8BCD:",
79
+ installedBinary: "\u5DF2\u5B89\u88C5\u4E8C\u8FDB\u5236\u6587\u4EF6:",
80
+ pathWarning: "\u9700\u8981\u5C06 codeagent-wrapper \u6DFB\u52A0\u5230 PATH \u624D\u80FD\u4F7F\u7528",
81
+ addToShellConfig: "\u8BF7\u6DFB\u52A0\u4EE5\u4E0B\u547D\u4EE4\u5230 {{file}} \u5E76\u91CD\u542F\u7EC8\u7AEF",
79
82
  configSavedTo: "\u914D\u7F6E\u5DF2\u4FDD\u5B58\u81F3:",
80
83
  validation: {
81
84
  selectAtLeastOne: "\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u6A21\u578B"
@@ -220,6 +223,9 @@ const en = {
220
223
  installCancelled: "Installation cancelled",
221
224
  installedCommands: "Installed Commands:",
222
225
  installedPrompts: "Installed Role Prompts:",
226
+ installedBinary: "Installed Binary:",
227
+ pathWarning: "codeagent-wrapper needs to be added to PATH",
228
+ addToShellConfig: "Add the following command to {{file}} and restart your terminal",
223
229
  configSavedTo: "Config saved to:",
224
230
  validation: {
225
231
  selectAtLeastOne: "Please select at least one model"
@@ -716,6 +722,41 @@ ${workflow.description}
716
722
  }
717
723
  }
718
724
  }
725
+ try {
726
+ const binDir = join(installDir, "bin");
727
+ await fs.ensureDir(binDir);
728
+ const platform = process.platform;
729
+ const arch = process.arch;
730
+ let binaryName;
731
+ if (platform === "darwin") {
732
+ binaryName = arch === "arm64" ? "codeagent-wrapper-darwin-arm64" : "codeagent-wrapper-darwin-amd64";
733
+ } else if (platform === "linux") {
734
+ binaryName = "codeagent-wrapper-linux-amd64";
735
+ } else if (platform === "win32") {
736
+ binaryName = "codeagent-wrapper-windows-amd64.exe";
737
+ } else {
738
+ result.errors.push(`Unsupported platform: ${platform}`);
739
+ result.success = false;
740
+ result.configPath = commandsDir;
741
+ return result;
742
+ }
743
+ const srcBinary = join(PACKAGE_ROOT$1, "bin", binaryName);
744
+ const destBinary = join(binDir, platform === "win32" ? "codeagent-wrapper.exe" : "codeagent-wrapper");
745
+ if (await fs.pathExists(srcBinary)) {
746
+ await fs.copy(srcBinary, destBinary);
747
+ if (platform !== "win32") {
748
+ await fs.chmod(destBinary, 493);
749
+ }
750
+ result.binPath = binDir;
751
+ result.binInstalled = true;
752
+ } else {
753
+ result.errors.push(`Binary not found: ${binaryName}`);
754
+ result.success = false;
755
+ }
756
+ } catch (error) {
757
+ result.errors.push(`Failed to install codeagent-wrapper: ${error}`);
758
+ result.success = false;
759
+ }
719
760
  result.configPath = commandsDir;
720
761
  return result;
721
762
  }
@@ -1050,6 +1091,16 @@ async function init(options = {}) {
1050
1091
  console.log(` ${ansis.green("\u2713")} ${model}: ${roles.join(", ")}`);
1051
1092
  });
1052
1093
  }
1094
+ if (result.binInstalled && result.binPath) {
1095
+ console.log();
1096
+ console.log(ansis.cyan(` ${i18n.t("init:installedBinary")}`));
1097
+ console.log(` ${ansis.green("\u2713")} codeagent-wrapper ${ansis.gray(`\u2192 ${result.binPath}`)}`);
1098
+ console.log();
1099
+ console.log(ansis.yellow(` \u26A0 ${i18n.t("init:pathWarning")}`));
1100
+ const shellRc = process.env.SHELL?.includes("zsh") ? "~/.zshrc" : "~/.bashrc";
1101
+ console.log(ansis.gray(` export PATH="${result.binPath}:$PATH"`));
1102
+ console.log(ansis.gray(` ${i18n.t("init:addToShellConfig", { file: shellRc })}`));
1103
+ }
1053
1104
  console.log();
1054
1105
  console.log(ansis.gray(` ${i18n.t("init:configSavedTo")} ${getCcgDir()}/config.toml`));
1055
1106
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccg-workflow",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Claude-Codex-Gemini 多模型协作系统 - 智能路由多模型开发工作流",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.17.1",