stigmergy 1.2.8 → 1.2.11

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.
Files changed (48) hide show
  1. package/README.md +40 -6
  2. package/STIGMERGY.md +10 -0
  3. package/package.json +19 -5
  4. package/scripts/preuninstall.js +10 -0
  5. package/src/adapters/claude/install_claude_integration.js +21 -21
  6. package/src/adapters/codebuddy/install_codebuddy_integration.js +54 -51
  7. package/src/adapters/codex/install_codex_integration.js +27 -28
  8. package/src/adapters/gemini/install_gemini_integration.js +60 -60
  9. package/src/adapters/iflow/install_iflow_integration.js +72 -72
  10. package/src/adapters/qoder/install_qoder_integration.js +64 -64
  11. package/src/adapters/qwen/install_qwen_integration.js +7 -7
  12. package/src/cli/router.js +581 -175
  13. package/src/commands/skill-bridge.js +39 -0
  14. package/src/commands/skill-handler.js +150 -0
  15. package/src/commands/skill.js +127 -0
  16. package/src/core/cli_path_detector.js +710 -0
  17. package/src/core/cli_tools.js +72 -1
  18. package/src/core/coordination/nodejs/AdapterManager.js +29 -1
  19. package/src/core/directory_permission_manager.js +568 -0
  20. package/src/core/enhanced_cli_installer.js +609 -0
  21. package/src/core/installer.js +232 -88
  22. package/src/core/multilingual/language-pattern-manager.js +78 -50
  23. package/src/core/persistent_shell_configurator.js +468 -0
  24. package/src/core/skills/StigmergySkillManager.js +357 -0
  25. package/src/core/skills/__tests__/SkillInstaller.test.js +275 -0
  26. package/src/core/skills/__tests__/SkillParser.test.js +202 -0
  27. package/src/core/skills/__tests__/SkillReader.test.js +189 -0
  28. package/src/core/skills/cli-command-test.js +201 -0
  29. package/src/core/skills/comprehensive-e2e-test.js +473 -0
  30. package/src/core/skills/e2e-test.js +267 -0
  31. package/src/core/skills/embedded-openskills/SkillInstaller.js +438 -0
  32. package/src/core/skills/embedded-openskills/SkillParser.js +123 -0
  33. package/src/core/skills/embedded-openskills/SkillReader.js +143 -0
  34. package/src/core/skills/integration-test.js +248 -0
  35. package/src/core/skills/package.json +6 -0
  36. package/src/core/skills/regression-test.js +285 -0
  37. package/src/core/skills/run-all-tests.js +129 -0
  38. package/src/core/skills/sync-test.js +210 -0
  39. package/src/core/skills/test-runner.js +242 -0
  40. package/src/utils/helpers.js +3 -20
  41. package/src/auth.js +0 -173
  42. package/src/auth_command.js +0 -208
  43. package/src/calculator.js +0 -313
  44. package/src/core/enhanced_installer.js +0 -479
  45. package/src/core/enhanced_uninstaller.js +0 -638
  46. package/src/data_encryption.js +0 -143
  47. package/src/data_structures.js +0 -440
  48. package/src/deploy.js +0 -55
package/README.md CHANGED
@@ -13,14 +13,26 @@ A comprehensive system for collaboration between multiple AI CLI tools. This sys
13
13
 
14
14
  ## Quick Start
15
15
 
16
- ```bash
17
- # Install the core system
16
+ ### Installation (One Command)
17
+
18
+ **Windows:**
19
+ ```powershell
20
+ # Method 1: Right-click PowerShell and "Run as Administrator"
18
21
  npm install -g stigmergy
19
22
 
20
- # Scan for available AI CLI tools
21
- stigmergy scan
23
+ # Method 2: Start PowerShell as Administrator from command line
24
+ Start-Process PowerShell -Verb RunAs -ArgumentList "npm install -g stigmergy"
25
+ ```
26
+
27
+ **macOS/Linux:**
28
+ ```bash
29
+ sudo npm install -g stigmergy
30
+ ```
22
31
 
23
- # Install missing tools
32
+ ### Setup and Use
33
+
34
+ ```bash
35
+ # Install all AI CLI tools
24
36
  stigmergy install
25
37
 
26
38
  # Deploy hooks for cross-CLI integration
@@ -32,6 +44,20 @@ stigmergy gemini "translate this text"
32
44
  stigmergy qwen "analyze this code"
33
45
  ```
34
46
 
47
+ ### Permission Issues?
48
+
49
+ **Windows:**
50
+ ```powershell
51
+ # If you get permission errors:
52
+ npm install -g stigmergy --force
53
+ ```
54
+
55
+ **macOS/Linux:**
56
+ ```bash
57
+ # If you get permission errors:
58
+ sudo npm install -g stigmergy --unsafe-perm=true --allow-root
59
+ ```
60
+
35
61
  ## Cross-CLI Communication
36
62
 
37
63
  When you need to call other AI tools, use the following format:
@@ -57,4 +83,12 @@ Available tools: claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, code
57
83
 
58
84
  ## Contributing
59
85
 
60
- This project follows the MIT License. Contributions are welcome!
86
+ This project is a collaboration between multiple AI systems:
87
+ - Claude (Anthropic)
88
+ - Qwen (Alibaba)
89
+ - iFlow (Intelligent Workflow)
90
+ - QoderCLI
91
+ - GLM4.5 (Zhipu AI)
92
+ - And other AI systems
93
+
94
+ Contributions are welcome!
package/STIGMERGY.md CHANGED
@@ -14,6 +14,16 @@ Cross-CLI communication is enabled between all supported AI tools:
14
14
  - GitHub Copilot
15
15
  - OpenAI Codex
16
16
 
17
+ ## Project Contributors
18
+
19
+ This project is made possible through the contribution of various AI systems:
20
+ - Claude (Anthropic)
21
+ - Qwen (Alibaba)
22
+ - iFlow (Intelligent Workflow)
23
+ - QoderCLI
24
+ - GLM4.5 (Zhipu AI)
25
+ - And other AI systems
26
+
17
27
  ## Cross-CLI Collaboration
18
28
 
19
29
  Stigmergy provides a unified command interface for cross-CLI communication:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stigmergy",
3
- "version": "1.2.8",
3
+ "version": "1.2.11",
4
4
  "description": "Stigmergy CLI - Multi-Agents Cross-AI CLI Tools Collaboration System",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -49,7 +49,13 @@
49
49
  "postinstall": "node src/index.js auto-install",
50
50
  "preuninstall": "node scripts/preuninstall.js",
51
51
  "postuninstall": "node scripts/postuninstall.js",
52
- "docs:update": "node scripts/generate-cli-docs.js"
52
+ "docs:update": "node scripts/generate-cli-docs.js",
53
+ "install": "node src/index.js install",
54
+ "install:check": "node src/index.js status",
55
+ "install:verbose": "node src/index.js install --verbose",
56
+ "install:force": "node src/index.js install --force",
57
+ "fix-perms": "node fix-permissions.js --auto",
58
+ "fix-perms:check": "node fix-permissions.js --check"
53
59
  },
54
60
  "keywords": [
55
61
  "ai",
@@ -88,20 +94,28 @@
88
94
  "url": "git+https://github.com/ptreezh/stigmergy-CLI-Multi-Agents.git"
89
95
  },
90
96
  "author": "Stigmergy CLI Team",
97
+ "contributors": [
98
+ "Claude",
99
+ "Qwen",
100
+ "iFlow",
101
+ "QoderCLI",
102
+ "GLM4.5",
103
+ "Other AI Systems"
104
+ ],
91
105
  "license": "MIT",
92
106
  "engines": {
93
107
  "node": ">=16.0.0"
94
108
  },
95
109
  "dependencies": {
96
110
  "chalk": "^4.1.2",
97
- "commander": "^14.0.2",
111
+ "commander": "^11.1.0",
98
112
  "inquirer": "^8.2.6",
99
113
  "js-yaml": "^4.1.1",
100
114
  "semver": "^7.7.3"
101
115
  },
102
116
  "devDependencies": {
103
- "eslint": "^8.50.0",
104
- "jest": "^30.2.0",
117
+ "eslint": "^8.57.1",
118
+ "jest": "^29.7.0",
105
119
  "prettier": "^3.7.4",
106
120
  "rimraf": "^6.1.2"
107
121
  },
@@ -8,6 +8,15 @@
8
8
  const path = require('path');
9
9
  const { spawnSync } = require('child_process');
10
10
 
11
+ // Detect npm environment for better output visibility
12
+ const isNpmUninstall = process.env.npm_lifecycle_event === 'preuninstall' ||
13
+ process.env.npm_lifecycle_event === 'uninstall';
14
+ const criticalLog = isNpmUninstall ? console.error : console.log;
15
+
16
+ criticalLog('🔄 STIGMERGY CLI PRE-UNINSTALL CLEANUP');
17
+ criticalLog('='.repeat(50));
18
+ criticalLog('Cleaning up configuration files and hooks...');
19
+ criticalLog('='.repeat(50));
11
20
  console.log('🔄 Running pre-uninstall cleanup for Stigmergy CLI...');
12
21
 
13
22
  try {
@@ -18,6 +27,7 @@ try {
18
27
  verbose: true // Show detailed output
19
28
  });
20
29
 
30
+ criticalLog('🗑️ Starting enhanced uninstallation process...\n');
21
31
  console.log('🗑️ Starting enhanced uninstallation process...\n');
22
32
 
23
33
  // Execute the uninstallation asynchronously
@@ -127,20 +127,20 @@ class ClaudeInstaller {
127
127
 
128
128
  async createGlobalCrossCliDocumentation(configDir) {
129
129
  try {
130
- const docContent = `# Claude CLI Cross-CLI 通信指南
130
+ const docContent = `# Claude CLI Cross-CLI Communication Guide
131
131
 
132
132
  ## Cross-CLI Communication
133
- 当您需要调用其他AI工具时,请使用以下提示<<<在shell中执行以下命令:stigmergy distcli "Prompt">>>
133
+ When you need to call other AI tools, use the following prompt<<<Execute the following command in shell: stigmergy distcli "Prompt">>>
134
134
 
135
- 示例:
136
- - shell中运行:stigmergy claude "写一个Python函数"
137
- - shell中运行:stigmergy gemini "翻译这段文字"
138
- - shell中运行:stigmergy qwen "分析这段代码"
135
+ Examples:
136
+ - Run in shell: stigmergy claude "Write a Python function"
137
+ - Run in shell: stigmergy gemini "Translate this text"
138
+ - Run in shell: stigmergy qwen "Analyze this code"
139
139
 
140
- 可用工具:claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, codex
140
+ Available tools: claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, codex
141
141
 
142
142
  ---
143
- *本文档由Stigmergy CLI自动生成和维护*
143
+ *This document is automatically generated and maintained by Stigmergy CLI*
144
144
  `;
145
145
 
146
146
  const docPath = path.join(configDir, 'CROSS_CLI_GUIDE.md');
@@ -154,17 +154,17 @@ class ClaudeInstaller {
154
154
  const crossCliContent = `
155
155
 
156
156
  ## Cross-CLI Communication
157
- 当您需要调用其他AI工具时,请使用以下提示<<<在shell中执行以下命令:stigmergy distcli "Prompt">>>
157
+ When you need to call other AI tools, use the following prompt<<<Execute the following command in shell: stigmergy distcli "Prompt">>>
158
158
 
159
- 示例:
160
- - shell中运行:stigmergy claude "写一个Python函数"
161
- - shell中运行:stigmergy gemini "翻译这段文字"
162
- - shell中运行:stigmergy qwen "分析这段代码"
159
+ Examples:
160
+ - Run in shell: stigmergy claude "Write a Python function"
161
+ - Run in shell: stigmergy gemini "Translate this text"
162
+ - Run in shell: stigmergy qwen "Analyze this code"
163
163
 
164
- 可用工具:claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, codex
164
+ Available tools: claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, codex
165
165
  `;
166
166
  await fs.appendFile(claudeMdPath, crossCliContent);
167
- console.log('[OK] CLAUDE.md末尾追加Cross-CLI通信提示');
167
+ console.log('[OK] Append Cross-CLI communication prompt to CLAUDE.md');
168
168
  } catch (e) {
169
169
  // File doesn't exist, that's ok
170
170
  }
@@ -177,7 +177,7 @@ class ClaudeInstaller {
177
177
  }
178
178
 
179
179
  async verifyInstallation() {
180
- console.log('\n验证Claude CLI集成安装...');
180
+ console.log('\nVerifying Claude CLI integration installation...');
181
181
 
182
182
  // Check config directory
183
183
  if (!await fs.access(this.configDir).then(() => true).catch(() => false)) {
@@ -243,19 +243,19 @@ class ClaudeInstaller {
243
243
  console.log('==========================================');
244
244
 
245
245
  // Execute installation
246
- console.log('Step 1. 创建配置目录...');
246
+ console.log('Step 1. Creating config directory...');
247
247
  await this.createConfigDirectory();
248
248
 
249
- console.log('\nStep 2. 安装配置...');
249
+ console.log('\nStep 2. Installing configuration...');
250
250
  const configSuccess = await this.installConfig();
251
251
 
252
- console.log('\nStep 3. 安装钩子...');
252
+ console.log('\nStep 3. Installing hooks...');
253
253
  const hooksSuccess = await this.installHooks();
254
254
 
255
- console.log('\nStep 4. 复制适配器文件...');
255
+ console.log('\nStep 4. Copying adapter files...');
256
256
  const adapterSuccess = await this.copyAdapterFiles();
257
257
 
258
- console.log('\nStep 5. 验证安装...');
258
+ console.log('\nStep 5. Verifying installation...');
259
259
  const verificationSuccess = await this.verifyInstallation();
260
260
 
261
261
  const overallSuccess = configSuccess && hooksSuccess && adapterSuccess && verificationSuccess;
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * CodeBuddy CLI Skills集成安装脚本
5
- * CodeBuddy CLI安装跨CLI协作感知能力
4
+ * CodeBuddy CLI Skills Integration Installation Script
5
+ * Install cross-CLI collaboration awareness capability for CodeBuddy CLI
6
6
  *
7
- * 使用方法:
7
+ * Usage:
8
8
  * node install_codebuddy_integration.js [--verify|--uninstall]
9
9
  */
10
10
 
@@ -12,7 +12,7 @@ const fs = require('fs').promises;
12
12
  const path = require('path');
13
13
  const os = require('os');
14
14
 
15
- // CodeBuddy CLI配置路径
15
+ // CodeBuddy CLI configuration paths
16
16
  const CODEBUDDY_CONFIG_DIR = path.join(os.homedir(), '.codebuddy');
17
17
  const CODEBUDDY_CONFIG_FILE = path.join(CODEBUDDY_CONFIG_DIR, 'buddy_config.json');
18
18
 
@@ -22,39 +22,39 @@ class CodeBuddyIntegrationInstaller {
22
22
  }
23
23
 
24
24
  /**
25
- * 创建CodeBuddy配置目录
25
+ * Create CodeBuddy configuration directory
26
26
  */
27
27
  async createCodeBuddyConfigDirectory() {
28
28
  try {
29
29
  await fs.mkdir(CODEBUDDY_CONFIG_DIR, { recursive: true });
30
- console.log(`[OK] 创建CodeBuddy配置目录: ${CODEBUDDY_CONFIG_DIR}`);
30
+ console.log(`[OK] Created CodeBuddy config directory: ${CODEBUDDY_CONFIG_DIR}`);
31
31
  return true;
32
32
  } catch (error) {
33
- console.log(`[ERROR] 创建CodeBuddy配置目录失败: ${error.message}`);
33
+ console.log(`[ERROR] Failed to create CodeBuddy config directory: ${error.message}`);
34
34
  return false;
35
35
  }
36
36
  }
37
37
 
38
38
  /**
39
- * 安装CodeBuddy Skills配置
39
+ * Install CodeBuddy Skills configuration
40
40
  */
41
41
  async installCodeBuddySkills() {
42
42
  try {
43
- // 读取现有buddy_config配置
43
+ // Read existing buddy_config configuration
44
44
  let existingConfig = {};
45
45
  try {
46
46
  const data = await fs.readFile(CODEBUDDY_CONFIG_FILE, 'utf8');
47
47
  existingConfig = JSON.parse(data);
48
48
  } catch (error) {
49
- console.log(`[WARN] 读取现有buddy_config配置失败: ${error.message}`);
49
+ console.log(`[WARN] Failed to read existing buddy_config: ${error.message}`);
50
50
  existingConfig = {};
51
51
  }
52
52
 
53
- // 定义跨CLI协作的Skills配置
53
+ // Define cross-CLI collaboration Skills configuration
54
54
  const crossCliSkills = {
55
55
  cross_cli_skill: {
56
56
  name: 'CrossCLICoordinationSkill',
57
- description: 'Cross-CLI工具协调技能',
57
+ description: 'Cross-CLI tool coordination skill',
58
58
  module: 'src.adapters.codebuddy.skills_hook_adapter',
59
59
  class: 'CodeBuddySkillsHookAdapter',
60
60
  enabled: true,
@@ -73,13 +73,13 @@ class CodeBuddyIntegrationInstaller {
73
73
  }
74
74
  };
75
75
 
76
- // 合并配置(保留现有skills,添加协作功能)
76
+ // Merge configurations (keep existing skills, add collaboration functionality)
77
77
  const mergedConfig = { ...existingConfig };
78
- if (!mergedConfig.skills) {
78
+ if (!mergedConfig.skills || !Array.isArray(mergedConfig.skills)) {
79
79
  mergedConfig.skills = [];
80
80
  }
81
81
 
82
- // 检查是否已存在跨CLI协调技能
82
+ // Check if cross-CLI coordination skill already exists
83
83
  const existingSkillNames = mergedConfig.skills.map(skill => skill.name);
84
84
  const crossCliSkillName = 'CrossCLICoordinationSkill';
85
85
 
@@ -87,11 +87,11 @@ class CodeBuddyIntegrationInstaller {
87
87
  mergedConfig.skills.push(crossCliSkills.cross_cli_skill);
88
88
  }
89
89
 
90
- // 写入配置文件
90
+ // Write configuration file
91
91
  await fs.writeFile(CODEBUDDY_CONFIG_FILE, JSON.stringify(mergedConfig, null, 2), 'utf8');
92
92
 
93
- console.log(`[OK] CodeBuddy配置已安装: ${CODEBUDDY_CONFIG_FILE}`);
94
- console.log('已安装的Skills:');
93
+ console.log(`[OK] CodeBuddy configuration installed: ${CODEBUDDY_CONFIG_FILE}`);
94
+ console.log('Installed Skills:');
95
95
  mergedConfig.skills.forEach(skill => {
96
96
  const status = skill.enabled ? '[OK]' : '[DISABLED]';
97
97
  console.log(` - ${skill.name}: ${status}`);
@@ -99,7 +99,7 @@ class CodeBuddyIntegrationInstaller {
99
99
 
100
100
  return true;
101
101
  } catch (error) {
102
- console.log(`[ERROR] 安装CodeBuddy配置失败: ${error.message}`);
102
+ console.log(`[ERROR] Failed to install CodeBuddy configuration: ${error.message}`);
103
103
  return false;
104
104
  }
105
105
  }
@@ -146,30 +146,33 @@ class CodeBuddyIntegrationInstaller {
146
146
  * 验证安装是否成功
147
147
  */
148
148
  async verifyInstallation() {
149
- console.log('\n验证CodeBuddy CLI集成安装...');
149
+ console.log('\nVerifying CodeBuddy CLI integration installation...');
150
150
 
151
151
  try {
152
- // 检查配置文件
152
+ // Check configuration file
153
153
  await fs.access(CODEBUDDY_CONFIG_FILE);
154
154
 
155
- // 检查配置文件内容
155
+ // Check configuration file content
156
156
  const data = await fs.readFile(CODEBUDDY_CONFIG_FILE, 'utf8');
157
157
  const config = JSON.parse(data);
158
158
 
159
- // 检查是否存在跨CLI技能
160
- const skills = config.skills || [];
159
+ // Check if cross-CLI skill exists
160
+ let skills = config.skills;
161
+ if (!Array.isArray(skills)) {
162
+ skills = [];
163
+ }
161
164
  const crossCliSkillFound = skills.some(skill => skill.name === 'CrossCLICoordinationSkill');
162
165
 
163
166
  if (crossCliSkillFound) {
164
- console.log('[OK] CLI协调技能已安装');
167
+ console.log('[OK] Cross-CLI coordination skill installed');
165
168
  } else {
166
- console.log('[WARN] 未找到跨CLI协调技能');
169
+ console.log('[WARN] Cross-CLI coordination skill not found');
167
170
  }
168
171
 
169
- console.log('[OK] CodeBuddy配置文件验证通过');
172
+ console.log('[OK] CodeBuddy configuration file verification passed');
170
173
  return true;
171
174
  } catch (error) {
172
- console.log(`[ERROR] 配置文件验证失败: ${error.message}`);
175
+ console.log(`[ERROR] Configuration file verification failed: ${error.message}`);
173
176
  return false;
174
177
  }
175
178
  }
@@ -226,20 +229,20 @@ class CodeBuddyIntegrationInstaller {
226
229
  */
227
230
  async createGlobalCrossCliDocumentation() {
228
231
  try {
229
- const docContent = `# CodeBuddy CLI CLI通信指南
232
+ const docContent = `# CodeBuddy CLI Cross-CLI Communication Guide
230
233
 
231
234
  ## Cross-CLI Communication
232
- 当您需要调用其他AI工具时,请使用以下提示<<<在shell中执行以下命令:stigmergy <工具名> <任务描述>>>>
235
+ When you need to call other AI tools, use the following prompt<<<Execute the following command in shell: stigmergy <tool_name> <task_description>>>>>
233
236
 
234
- 示例:
235
- - shell中运行:stigmergy claude "写一个Python函数"
236
- - shell中运行:stigmergy gemini "翻译这段文字"
237
- - shell中运行:stigmergy qwen "分析这段代码"
237
+ Examples:
238
+ - Run in shell: stigmergy claude "Write a Python function"
239
+ - Run in shell: stigmergy gemini "Translate this text"
240
+ - Run in shell: stigmergy qwen "Analyze this code"
238
241
 
239
- 可用工具:claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, codex
242
+ Available tools: claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, codex
240
243
 
241
244
  ---
242
- *本文档由Stigmergy CLI自动生成和维护*
245
+ *This document is automatically generated and maintained by Stigmergy CLI*
243
246
  `;
244
247
 
245
248
  const docPath = path.join(CODEBUDDY_CONFIG_DIR, 'CROSS_CLI_GUIDE.md');
@@ -254,17 +257,17 @@ class CodeBuddyIntegrationInstaller {
254
257
  const crossCliContent = `
255
258
 
256
259
  ## Cross-CLI Communication
257
- 当您需要调用其他AI工具时,请使用以下提示<<<在shell中执行以下命令:stigmergy <工具名> <任务描述>>>>
260
+ When you need to call other AI tools, use the following prompt<<<Execute the following command in shell: stigmergy <tool_name> <task_description>>>>>
258
261
 
259
- 示例:
260
- - shell中运行:stigmergy claude "写一个Python函数"
261
- - shell中运行:stigmergy gemini "翻译这段文字"
262
- - shell中运行:stigmergy qwen "分析这段代码"
262
+ Examples:
263
+ - Run in shell: stigmergy claude "Write a Python function"
264
+ - Run in shell: stigmergy gemini "Translate this text"
265
+ - Run in shell: stigmergy qwen "Analyze this code"
263
266
 
264
- 可用工具:claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, codex
267
+ Available tools: claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, codex
265
268
  `;
266
269
  await fs.appendFile(codebuddyMdPath, crossCliContent, 'utf8');
267
- console.log('[OK] CODEBUDDY.md末尾追加Cross-CLI通信提示');
270
+ console.log('[OK] Append Cross-CLI communication prompt to CODEBUDDY.md');
268
271
  } catch (error) {
269
272
  // 文件可能不存在,忽略
270
273
  }
@@ -299,26 +302,26 @@ class CodeBuddyIntegrationInstaller {
299
302
  console.log('\n步骤4. 创建Cross-CLI通信指南...');
300
303
  const guideSuccess = await this.createGlobalCrossCliDocumentation();
301
304
 
302
- // 步骤5. 验证安装
303
- console.log('\n步骤5. 验证安装...');
305
+ // Step 5. Verify installation
306
+ console.log('\nStep 5. Verifying installation...');
304
307
  const verificationSuccess = await this.verifyInstallation();
305
308
 
306
309
  const overallSuccess = configDirSuccess && skillsSuccess && adapterSuccess && guideSuccess && verificationSuccess;
307
310
 
308
311
  const duration = Date.now() - this.startTime;
309
- console.log(`\n[INFO] 安装耗时: ${duration}ms`);
312
+ console.log(`\n[INFO] Installation took: ${duration}ms`);
310
313
 
311
314
  if (overallSuccess) {
312
- console.log('\n[SUCCESS] CodeBuddy CLICLI集成安装成功!');
315
+ console.log('\n[SUCCESS] CodeBuddy CLI cross-CLI integration installed successfully!');
313
316
  } else {
314
- console.log('\n[WARNING] 安装过程中出现警告,请检查上述输出');
317
+ console.log('\n[WARNING] Warnings occurred during installation, please check above output');
315
318
  }
316
319
 
317
320
  return overallSuccess;
318
321
  }
319
322
  }
320
323
 
321
- // 主函数
324
+ // Main function
322
325
  async function main() {
323
326
  const args = process.argv.slice(2);
324
327
  const verify = args.includes('--verify');
@@ -335,10 +338,10 @@ async function main() {
335
338
  }
336
339
  }
337
340
 
338
- // 导出模块
341
+ // Export module
339
342
  module.exports = CodeBuddyIntegrationInstaller;
340
343
 
341
- // 如果直接运行此脚本
344
+ // If running this script directly
342
345
  if (require.main === module) {
343
346
  main().then(success => {
344
347
  process.exit(success ? 0 : 1);
@@ -273,12 +273,12 @@ class CodexIntegrationInstaller {
273
273
  const docContent = `# Codex CLI Cross-CLI Communication Guide
274
274
 
275
275
  ## Cross-CLI Communication
276
- When you need to call other AI tools, please use the following prompt <<<Execute the following command in shell: stigmergy <tool_name> <task_description>>>>
276
+ When you need to call other AI tools, please use the following prompt<<<Execute the following command in shell: stigmergy <tool_name> <task_description>>>>
277
277
 
278
278
  Examples:
279
- - Run in shell: stigmergy claude "write a Python function"
280
- - Run in shell: stigmergy gemini "translate this text"
281
- - Run in shell: stigmergy qwen "analyze this code"
279
+ - Run in shell: stigmergy claude "Write a Python function"
280
+ - Run in shell: stigmergy gemini "Translate this text"
281
+ - Run in shell: stigmergy qwen "Analyze this code"
282
282
 
283
283
  Available tools: claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, codex
284
284
 
@@ -309,7 +309,7 @@ Examples:
309
309
  Available tools: claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, codex
310
310
  `;
311
311
  await fs.appendFile(codexMdPath, crossCliContent);
312
- console.log('[OK] CODEX.md末尾追加Cross-CLI通信提示');
312
+ console.log('[OK] Append Cross-CLI communication prompt to CODEX.md');
313
313
  } catch (error) {
314
314
  // 文件可能不存在,忽略
315
315
  }
@@ -328,31 +328,30 @@ Available tools: claude, gemini, qwen, iflow, qodercli, codebuddy, copilot, code
328
328
  console.log('Codex CLI Cross-CLI Integration Installer');
329
329
  console.log('='.repeat(50));
330
330
 
331
- // 步骤1. 创建配置目录
332
- console.log('\n步骤1. 创建配置目录...');
333
- const configDirSuccess = await this.createCodexConfigDirectory();
334
-
335
- // 步骤2. 安装Slash Commands配置
336
- console.log('\n步骤2. 安装Slash Commands配置...');
337
- const slashCommandsSuccess = await this.installCodexSlashCommands(true);
338
-
339
- // 步骤3. 复制适配器文件
340
- console.log('\n步骤3. 复制适配器文件...');
341
- const adapterSuccess = await this.copyAdapterFile();
342
-
343
- // 步骤4. 创建Cross-CLI通信指南
344
- console.log('\n步骤4. 创建Cross-CLI通信指南...');
345
- const guideSuccess = await this.createGlobalCrossCliDocumentation();
346
-
347
- // 步骤5. 验证安装
348
- console.log('\n步骤5. 验证安装...');
349
- const verificationSuccess = await this.verifyInstallation();
350
-
351
- const overallSuccess = configDirSuccess && slashCommandsSuccess && adapterSuccess && guideSuccess && verificationSuccess;
331
+ // Step 1. Create config directory
332
+ console.log('\nStep 1. Creating config directory...');
333
+ const configDirSuccess = await this.createCodexConfigDirectory();
334
+
335
+ // Step 2. Install Slash Commands config
336
+ console.log('\nStep 2. Installing Slash Commands config...');
337
+ const slashCommandsSuccess = await this.installCodexSlashCommands(true);
338
+
339
+ // Step 3. Copy adapter files
340
+ console.log('\nStep 3. Copying adapter files...');
341
+ const adapterSuccess = await this.copyAdapterFile();
342
+
343
+ // Step 4. Create Cross-CLI communication guide
344
+ console.log('\nStep 4. Creating Cross-CLI communication guide...');
345
+ const guideSuccess = await this.createGlobalCrossCliDocumentation();
352
346
 
353
- const duration = Date.now() - this.startTime;
354
- console.log(`\n[INFO] 安装耗时: ${duration}ms`);
347
+ // Step 5. Verify installation
348
+ console.log('\nStep 5. Verifying installation...');
349
+ const verificationSuccess = await this.verifyInstallation();
355
350
 
351
+ const overallSuccess = configDirSuccess && slashCommandsSuccess && adapterSuccess && guideSuccess && verificationSuccess;
352
+
353
+ const duration = Date.now() - this.startTime;
354
+ console.log(`\n[INFO] Installation took: ${duration}ms`);
356
355
  if (overallSuccess) {
357
356
  console.log('\n[SUCCESS] Codex CLI cross-CLI integration installed successfully!');
358
357
  } else {