stigmergy 1.0.57

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 (94) hide show
  1. package/LICENSE +19 -0
  2. package/README.de.md +301 -0
  3. package/README.en.md +301 -0
  4. package/README.es.md +301 -0
  5. package/README.fr.md +301 -0
  6. package/README.ja.md +301 -0
  7. package/README.ko.md +301 -0
  8. package/README.md +301 -0
  9. package/README.ru.md +301 -0
  10. package/README.zh.md +301 -0
  11. package/package.json +82 -0
  12. package/src/adapters/claude/__init__.py +13 -0
  13. package/src/adapters/claude/claude_skills_integration.py +609 -0
  14. package/src/adapters/claude/hook_adapter.py +663 -0
  15. package/src/adapters/claude/install_claude_integration.py +265 -0
  16. package/src/adapters/claude/skills_hook_adapter.py +841 -0
  17. package/src/adapters/claude/standalone_claude_adapter.py +384 -0
  18. package/src/adapters/cline/__init__.py +20 -0
  19. package/src/adapters/cline/config.py +108 -0
  20. package/src/adapters/cline/install_cline_integration.py +617 -0
  21. package/src/adapters/cline/mcp_server.py +713 -0
  22. package/src/adapters/cline/standalone_cline_adapter.py +459 -0
  23. package/src/adapters/codebuddy/__init__.py +13 -0
  24. package/src/adapters/codebuddy/buddy_adapter.py +1125 -0
  25. package/src/adapters/codebuddy/install_codebuddy_integration.py +279 -0
  26. package/src/adapters/codebuddy/skills_hook_adapter.py +672 -0
  27. package/src/adapters/codebuddy/skills_integration.py +395 -0
  28. package/src/adapters/codebuddy/standalone_codebuddy_adapter.py +403 -0
  29. package/src/adapters/codex/__init__.py +11 -0
  30. package/src/adapters/codex/base.py +46 -0
  31. package/src/adapters/codex/install_codex_integration.py +311 -0
  32. package/src/adapters/codex/mcp_server.py +493 -0
  33. package/src/adapters/codex/natural_language_parser.py +82 -0
  34. package/src/adapters/codex/slash_command_adapter.py +326 -0
  35. package/src/adapters/codex/standalone_codex_adapter.py +362 -0
  36. package/src/adapters/copilot/__init__.py +13 -0
  37. package/src/adapters/copilot/install_copilot_integration.py +564 -0
  38. package/src/adapters/copilot/mcp_adapter.py +772 -0
  39. package/src/adapters/copilot/mcp_server.py +168 -0
  40. package/src/adapters/copilot/standalone_copilot_adapter.py +114 -0
  41. package/src/adapters/gemini/__init__.py +13 -0
  42. package/src/adapters/gemini/extension_adapter.py +690 -0
  43. package/src/adapters/gemini/install_gemini_integration.py +257 -0
  44. package/src/adapters/gemini/standalone_gemini_adapter.py +366 -0
  45. package/src/adapters/iflow/__init__.py +7 -0
  46. package/src/adapters/iflow/hook_adapter.py +1038 -0
  47. package/src/adapters/iflow/hook_installer.py +536 -0
  48. package/src/adapters/iflow/install_iflow_integration.py +271 -0
  49. package/src/adapters/iflow/official_hook_adapter.py +1272 -0
  50. package/src/adapters/iflow/standalone_iflow_adapter.py +48 -0
  51. package/src/adapters/iflow/workflow_adapter.py +793 -0
  52. package/src/adapters/qoder/hook_installer.py +732 -0
  53. package/src/adapters/qoder/install_qoder_integration.py +265 -0
  54. package/src/adapters/qoder/notification_hook_adapter.py +863 -0
  55. package/src/adapters/qoder/standalone_qoder_adapter.py +48 -0
  56. package/src/adapters/qwen/__init__.py +17 -0
  57. package/src/adapters/qwencode/__init__.py +13 -0
  58. package/src/adapters/qwencode/inheritance_adapter.py +818 -0
  59. package/src/adapters/qwencode/install_qwencode_integration.py +276 -0
  60. package/src/adapters/qwencode/standalone_qwencode_adapter.py +399 -0
  61. package/src/atomic_collaboration_handler.py +461 -0
  62. package/src/cli_collaboration_agent.py +697 -0
  63. package/src/collaboration/hooks.py +315 -0
  64. package/src/core/__init__.py +21 -0
  65. package/src/core/ai_environment_scanner.py +331 -0
  66. package/src/core/base_adapter.py +220 -0
  67. package/src/core/cli_hook_integration.py +406 -0
  68. package/src/core/cross_cli_executor.py +713 -0
  69. package/src/core/cross_cli_mapping.py +1163 -0
  70. package/src/core/cross_platform_encoding.py +365 -0
  71. package/src/core/cross_platform_safe_cli.py +894 -0
  72. package/src/core/direct_cli_executor.py +805 -0
  73. package/src/core/direct_cli_hook_system.py +958 -0
  74. package/src/core/enhanced_init_processor.py +427 -0
  75. package/src/core/graceful_cli_executor.py +912 -0
  76. package/src/core/md_enhancer.py +342 -0
  77. package/src/core/md_generator.py +619 -0
  78. package/src/core/models.py +218 -0
  79. package/src/core/parser.py +108 -0
  80. package/src/core/real_cli_hook_system.py +852 -0
  81. package/src/core/real_cross_cli_system.py +925 -0
  82. package/src/core/verified_cross_cli_system.py +961 -0
  83. package/src/deploy.js +737 -0
  84. package/src/enhanced_deploy.js +303 -0
  85. package/src/enhanced_universal_cli_setup.py +930 -0
  86. package/src/kimi_wrapper.py +104 -0
  87. package/src/main.js +1309 -0
  88. package/src/shell_integration.py +398 -0
  89. package/src/simple-main.js +315 -0
  90. package/src/smart_router_creator.py +323 -0
  91. package/src/universal_cli_setup.py +1289 -0
  92. package/src/utils/__init__.py +12 -0
  93. package/src/utils/cli_detector.py +445 -0
  94. package/src/utils/file_utils.py +246 -0
package/README.zh.md ADDED
@@ -0,0 +1,301 @@
1
+ # 🔧 Stigmergy CLI - Multi-Agents跨AI CLI工具协作系统
2
+
3
+ > **⚠️ 重要澄清:这不是一个独立的CLI工具,而是一个增强系统!**
4
+ >
5
+ > Stigmergy CLI 通过插件系统让现有的AI CLI工具能够相互协作,而不是替代它们。
6
+
7
+ [![Node.js](https://img.shields.io/badge/node-16+-green.svg)](https://nodejs.org)
8
+ [![NPM](https://img.shields.io/badge/npm-stigmergy-cli-blue.svg)](https://www.npmjs.com/package/stigmergy-cli)
9
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
10
+ [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg)]()
11
+
12
+ ## 🚀 快速开始
13
+
14
+ ### 一键部署(推荐)
15
+
16
+ ```bash
17
+ # 一键部署完整协作系统(检测+安装+配置)
18
+ npx -y git+https://github.com/ptreezh/stigmergy-CLI-Multi-Agents.git#main quick-deploy
19
+ ```
20
+
21
+ 或者,如果您已全局安装了stigmergy-cli:
22
+
23
+ ```bash
24
+ # 通过已安装的CLI运行
25
+ npx stigmergy-cli quick-deploy
26
+ ```
27
+
28
+ ### 手动安装
29
+
30
+ ```bash
31
+ # 通过NPM全局安装
32
+ npm install -g stigmergy-cli
33
+
34
+ # 初始化项目
35
+ stigmergy-cli init
36
+
37
+ # 智能部署(扫描环境+询问+自动安装)
38
+ stigmergy-cli deploy
39
+
40
+ # 或者使用npx(无需安装)
41
+ npx stigmergy-cli init
42
+ npx stigmergy-cli deploy
43
+ ```
44
+
45
+ ## ✨ 核心特性
46
+
47
+ ### 🎯 跨CLI直接协作
48
+ - **自然语言调用**: 在任何支持的CLI中直接调用其他AI工具
49
+ - **无缝集成**: 不改变现有CLI工具的使用方式
50
+ - **智能路由**: 自动识别协作意图并委派到合适的工具
51
+
52
+ ### 📋 支持的CLI工具
53
+
54
+ #### 核心工具(必需)
55
+ - **Claude CLI** - Anthropic Claude CLI工具
56
+ - **Gemini CLI** - Google Gemini CLI工具
57
+
58
+ #### 扩展工具(可选)
59
+ - **QwenCode CLI** - 阿里云QwenCode CLI工具
60
+ - **iFlow CLI** - iFlow工作流CLI工具
61
+ - **Qoder CLI** - Qoder代码生成CLI工具
62
+ - **CodeBuddy CLI** - CodeBuddy编程助手CLI工具
63
+ - **GitHub Copilot CLI** - GitHub Copilot CLI工具
64
+ - **Codex CLI** - OpenAI Codex代码分析CLI工具
65
+
66
+ ### 🧩 智能部署系统
67
+
68
+ ```bash
69
+ # 智能部署(推荐)
70
+ stigmergy-cli deploy
71
+
72
+ # 输出示例:
73
+ 🔍 扫描系统CLI工具状态...
74
+
75
+ 🔴 ❌ Claude CLI | CLI: 未安装 | 集成: 未安装
76
+ 🟢 ✅ Gemini CLI | CLI: 可用 | 集成: 已安装
77
+ 🔴 ❌ QwenCode CLI | CLI: 未安装 | 集成: 未安装
78
+
79
+ 📋 检测到以下未安装的工具:
80
+
81
+ 🔴 未安装的CLI工具:
82
+ - Claude CLI (必需) - Anthropic Claude CLI工具
83
+ - QwenCode CLI (可选) - 阿里云QwenCode CLI工具
84
+
85
+ 是否要尝试自动安装 2 个CLI工具? (Y/n): Y
86
+ ```
87
+
88
+ ## 🎯 跨CLI协作示例
89
+
90
+ 安装完成后,在任何支持的CLI中都可以直接调用其他工具:
91
+
92
+ ### 在Claude CLI中
93
+ ```bash
94
+ # 调用其他AI工具
95
+ 请用gemini帮我翻译这段代码
96
+ 调用qwen分析这个需求
97
+ 用iflow创建工作流
98
+ 让qoder生成Python代码
99
+ 启动codebuddy助手
100
+ ```
101
+
102
+ ### 在Gemini CLI中
103
+ ```bash
104
+ # 跨工具协作
105
+ 用claude检查代码质量
106
+ 让qwen帮我写文档
107
+ 使用copilot生成代码片段
108
+ ```
109
+
110
+ ## 🛠️ 完整命令列表
111
+
112
+ ```bash
113
+ # 基本命令
114
+ stigmergy-cli init # 初始化项目
115
+ stigmergy-cli status # 查看状态
116
+ stigmergy-cli scan # 扫描环境
117
+
118
+ # 部署命令
119
+ stigmergy-cli deploy # 智能部署(默认)
120
+ stigmergy-cli deploy-all # 全量部署
121
+
122
+ # 项目管理
123
+ stigmergy-cli check-project # 检查项目
124
+ stigmergy-cli validate # 验证配置
125
+ stigmergy-cli clean # 清理环境
126
+
127
+ # 开发命令
128
+ npm run build # 构建项目
129
+ npm run publish-to-npm # 发布到NPM
130
+ npm run test # 运行测试
131
+ ```
132
+
133
+ ## 📁 项目结构
134
+
135
+ ```
136
+ stigmergy-CLI-Multi-Agents/
137
+ ├── package.json # NPM包配置
138
+ ├── src/
139
+ │ ├── main.js # 主入口文件
140
+ │ ├── deploy.js # 智能部署脚本
141
+ │ ├── adapters/ # CLI适配器
142
+ │ │ ├── claude/
143
+ │ │ ├── gemini/
144
+ │ │ ├── qwencode/
145
+ │ │ └── ...
146
+ │ └── core/ # 核心模块
147
+ ├── adapters/ # CLI安装脚本
148
+ │ ├── claude/install_claude_integration.py
149
+ │ ├── gemini/install_gemini_integration.py
150
+ │ └── ...
151
+ └── templates/ # 配置模板
152
+ ```
153
+
154
+ ## 🔧 自动安装CLI工具
155
+
156
+ 智能部署脚本支持自动安装所有CLI工具:
157
+
158
+ ### 核心工具
159
+ ```bash
160
+ npm install -g @anthropic-ai/claude-code
161
+ npm install -g @google/gemini-cli
162
+ ```
163
+
164
+ ### 扩展工具
165
+ ```bash
166
+ npm install -g @qwen-code/qwen-code@latest
167
+ npm install -g @iflow-ai/iflow-cli@latest
168
+ npm install -g @qoder-ai/qodercli
169
+ npm install -g @tencent-ai/codebuddy-code
170
+ npm install -g @github/copilot
171
+ npm i -g @openai/codex --registry=https://registry.npmmirror.com
172
+ ```
173
+
174
+ ## 🎯 使用场景
175
+
176
+ ### 场景1:个人开发者环境
177
+ ```bash
178
+ # 新开发环境快速配置
179
+ git clone my-project
180
+ cd my-project
181
+ stigmergy-cli deploy
182
+
183
+ # 现在可以在任何CLI中跨工具协作
184
+ claude-cli "请用gemini帮我优化这段代码的性能"
185
+ ```
186
+
187
+ ### 场景2:团队协作
188
+ ```bash
189
+ # 团队共享项目配置
190
+ git clone team-project
191
+ cd team-project
192
+ stigmergy-cli init
193
+
194
+ # 所有团队成员使用相同的协作背景
195
+ gemini-cli "用claude检查这个模块的设计模式"
196
+ ```
197
+
198
+ ### 场景3:多语言开发
199
+ ```bash
200
+ # 不同AI工具专长互补
201
+ qwen-cli "用copilot生成前端组件"
202
+ iflow-cli "让gemini创建API文档"
203
+ ```
204
+
205
+ ## 🔧 开发环境设置
206
+
207
+ ```bash
208
+ # 克隆项目
209
+ git clone https://github.com/ptreezh/stigmergy-CLI-Multi-Agents.git
210
+ cd stigmergy-CLI-Multi-Agents
211
+
212
+ # 安装依赖
213
+ npm install
214
+
215
+ # 开发模式运行
216
+ npm run start
217
+ npm run status
218
+ npm run scan
219
+
220
+ # 构建和发布
221
+ npm run build
222
+ npm run publish-to-npm
223
+ ```
224
+
225
+ ## 🚀 发布新版本
226
+
227
+ ```bash
228
+ # 更新版本号
229
+ npm version patch # 补丁版本
230
+ npm version minor # 次版本
231
+ npm version major # 主版本
232
+
233
+ # 发布到NPM
234
+ npm run publish-to-npm
235
+
236
+ # 验证发布
237
+ npx stigmergy-cli --version
238
+ ```
239
+
240
+ ## 🛠️ 故障排除
241
+
242
+ ### 常见问题
243
+
244
+ 1. **Node.js版本不兼容**
245
+ ```bash
246
+ # 确保使用Node.js 16+
247
+ node --version
248
+ ```
249
+
250
+ 2. **权限错误**
251
+ ```bash
252
+ # 使用管理员权限
253
+ sudo npm install -g stigmergy-cli
254
+ ```
255
+
256
+ 3. **网络连接问题**
257
+ ```bash
258
+ # 设置NPM镜像
259
+ npm config set registry https://registry.npmmirror.com
260
+ ```
261
+
262
+ 4. **CLI工具安装失败**
263
+ ```bash
264
+ # 手动安装特定工具
265
+ npm install -g @anthropic-ai/claude-code
266
+ ```
267
+
268
+ ### 调试模式
269
+
270
+ ```bash
271
+ # 详细调试输出
272
+ DEBUG=stigmergy:* stigmergy-cli deploy
273
+
274
+ # 仅扫描状态
275
+ stigmergy-cli scan
276
+ ```
277
+
278
+ ## 📚 更多信息
279
+
280
+ - **GitHub**: https://github.com/ptreezh/stigmergy-CLI-Multi-Agents
281
+ - **NPM**: https://www.npmjs.com/package/stigmergy-cli
282
+ - **文档**: https://github.com/ptreezh/stigmergy-CLI-Multi-Agents#readme
283
+ - **问题反馈**: https://github.com/ptreezh/stigmergy-CLI-Multi-Agents/issues
284
+
285
+ ## 🤝 贡献
286
+
287
+ 欢迎提交 Pull Request 和 Issue!
288
+
289
+ 1. Fork 项目
290
+ 2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
291
+ 3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
292
+ 4. 推送到分支 (`git push origin feature/AmazingFeature`)
293
+ 5. 打开 Pull Request
294
+
295
+ ## 📄 许可证
296
+
297
+ 本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情。
298
+
299
+ ---
300
+
301
+ **🎯 Stigmergy CLI - 真正的跨CLI协作,让每个AI工具都能发挥最大价值!**
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "stigmergy",
3
+ "version": "1.0.57",
4
+ "type": "module",
5
+ "description": "Stigmergy CLI - Multi-Agents跨AI CLI工具协作系统",
6
+ "main": "src/main.js",
7
+ "bin": {
8
+ "stigmergy-cli": "src/main.js"
9
+ },
10
+
11
+ "scripts": {
12
+ "start": "node src/main.js",
13
+ "deploy": "node src/deploy.js",
14
+ "deploy-tools": "node deployment/deploy.js",
15
+ "deploy-tools-all": "node deployment/deploy-with-install.js",
16
+ "status": "node src/main.js status",
17
+ "scan": "node src/main.js scan",
18
+ "init": "node src/main.js init",
19
+ "check-project": "node src/main.js check-project",
20
+ "validate": "node src/main.js validate",
21
+ "clean": "node src/main.js clean",
22
+ "build": "node src/build.js",
23
+ "build-only": "node src/deploy.js --build",
24
+ "quick-install": "node src/quick_install.js",
25
+ "quick-deploy": "node src/main.js quick-deploy",
26
+ "publish-to-npm": "node publish.js",
27
+ "unpublish": "npm unpublish",
28
+ "version": "npm version patch",
29
+ "test": "npm run validate"
30
+ },
31
+ "keywords": [
32
+ "ai",
33
+ "cli",
34
+ "router",
35
+ "collaboration",
36
+ "smart-cli",
37
+ "claude-cli",
38
+ "gemini-cli",
39
+ "qwen-cli",
40
+ "iflow-cli",
41
+ "qoder-cli",
42
+ "codebuddy-cli",
43
+ "copilot-cli",
44
+ "cross-platform",
45
+ "automation",
46
+ "tools",
47
+ "stigmergy",
48
+ "multi-agents"
49
+ ],
50
+ "files": [
51
+ "src/**/*.js",
52
+ "src/**/*.py",
53
+ "config/**/*.json",
54
+ "templates/**/*.md",
55
+ "bin/**/*.bat",
56
+ "adapters/**/*"
57
+ ],
58
+ "repository": {
59
+ "type": "git",
60
+ "url": "git+https://github.com/ptreezh/stigmergy-CLI-Multi-Agents.git"
61
+ },
62
+ "author": "Stigmergy CLI Team",
63
+ "license": "MIT",
64
+ "engines": {
65
+ "node": ">=16.0.0"
66
+ },
67
+ "dependencies": {
68
+ "commander": "^12.0.0",
69
+ "inquirer": "^9.0.0",
70
+ "chalk": "^5.0.0",
71
+ "js-yaml": "^4.1.0",
72
+ "node-fetch": "^3.3.2"
73
+ },
74
+ "devDependencies": {},
75
+ "npx": {
76
+ "stigmergy-cli": "src/main.js"
77
+ },
78
+ "homepage": "https://github.com/ptreezh/stigmergy-CLI-Multi-Agents#readme",
79
+ "bugs": {
80
+ "url": "https://github.com/ptreezh/stigmergy-CLI-Multi-Agents/issues"
81
+ }
82
+ }
@@ -0,0 +1,13 @@
1
+ """
2
+ Claude CLI 适配器包
3
+
4
+ 基于 Claude CLI 官方 Hook 系统的原生集成
5
+ 支持多种实现方式,全部无抽象层
6
+ """
7
+
8
+ from .standalone_claude_adapter import get_standalone_claude_adapter, StandaloneClaudeAdapter
9
+
10
+ # 向后兼容的别名
11
+ ClaudeHookAdapter = StandaloneClaudeAdapter
12
+
13
+ __all__ = ['StandaloneClaudeAdapter', 'get_standalone_claude_adapter', 'ClaudeHookAdapter']