mcp-swarm 1.1.4 → 1.1.5

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 (40) hide show
  1. package/.prettierignore +6 -6
  2. package/.prettierrc +8 -8
  3. package/CHANGELOG.md +183 -132
  4. package/CHANGELOG.ru.md +183 -132
  5. package/CONTRIBUTING.md +88 -88
  6. package/README.md +1129 -1119
  7. package/README.ru.md +8 -6
  8. package/RELEASE_NOTES.md +57 -57
  9. package/REMOTE.md +252 -252
  10. package/TELEGRAM.md +447 -447
  11. package/dist/dashboard.js +132 -132
  12. package/dist/doctor.js +2 -2
  13. package/dist/installer/index.js +6 -6
  14. package/dist/installer/index.js.map +1 -1
  15. package/eslint.config.js +15 -15
  16. package/examples/README.md +31 -31
  17. package/examples/claude-code/mcp_config.json +17 -17
  18. package/examples/cursor/mcp_config.json +17 -17
  19. package/examples/local-mode/mcp_config.json +12 -12
  20. package/examples/opencode/opencode.json +17 -17
  21. package/examples/windsurf/mcp_config.json +17 -17
  22. package/package.json +67 -67
  23. package/build-output.txt +0 -4
  24. package/dist/server.js +0 -280
  25. package/dist/server.js.map +0 -1
  26. package/dist/smartTools.js +0 -3513
  27. package/dist/smartTools.js.map +0 -1
  28. package/dist/tools.js +0 -4170
  29. package/dist/tools.js.map +0 -1
  30. package/dist/workflows/agentSpecialization.js +0 -230
  31. package/dist/workflows/agentSpecialization.js.map +0 -1
  32. package/dist/workflows/autoDoc.js +0 -136
  33. package/dist/workflows/autoDoc.js.map +0 -1
  34. package/dist/workflows/codeReview.js +0 -97
  35. package/dist/workflows/codeReview.js.map +0 -1
  36. package/dist/workflows/conflictForecast.js +0 -117
  37. package/dist/workflows/conflictForecast.js.map +0 -1
  38. package/dist/workflows/costTracker.js +0 -249
  39. package/dist/workflows/costTracker.js.map +0 -1
  40. package/ts-errors.txt +0 -0
package/.prettierignore CHANGED
@@ -1,6 +1,6 @@
1
- dist
2
- node_modules
3
- dashboard
4
- cloudflare
5
- -p
6
- *.md
1
+ dist
2
+ node_modules
3
+ dashboard
4
+ cloudflare
5
+ -p
6
+ *.md
package/.prettierrc CHANGED
@@ -1,8 +1,8 @@
1
- {
2
- "semi": true,
3
- "singleQuote": false,
4
- "trailingComma": "all",
5
- "printWidth": 120,
6
- "tabWidth": 2,
7
- "endOfLine": "lf"
8
- }
1
+ {
2
+ "semi": true,
3
+ "singleQuote": false,
4
+ "trailingComma": "all",
5
+ "printWidth": 120,
6
+ "tabWidth": 2,
7
+ "endOfLine": "lf"
8
+ }
package/CHANGELOG.md CHANGED
@@ -1,132 +1,183 @@
1
- > <img src="https://flagcdn.com/20x15/ru.png" alt="RU" /> [Читать на русском](./CHANGELOG.ru.md)
2
-
3
- # Changelog
4
-
5
- All notable changes to the MCP Swarm project are documented in this file.
6
-
7
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
-
10
- ---
11
-
12
- ## [1.1.3] - 2026-02-09
13
-
14
- ### What's New
15
-
16
- #### 📱 Telegram Bot Integration
17
- - **Full Telegram notifications** — Task events, agent status, CI errors, code reviews all delivered to your Telegram.
18
- - **Bilingual setup guide** — Complete `TELEGRAM.md` with step-by-step instructions in English and Russian.
19
- - **@userinfobot support** — Easy way to discover your Telegram User ID.
20
- - **Bot commands** — `/start`, `/projects`, `/status`, `/agents`, `/tasks`, `/myid`, `/reviews`, `/approve`, `/reject`.
21
- - **Environment variables** — `TELEGRAM_USER_ID` and `TELEGRAM_BOT_URL` for all MCP configurations.
22
-
23
- #### 🏗️ Code Quality & Security
24
- - **ESLint + Prettier** — Full linting and formatting setup with `typescript-eslint`. Scripts: `lint`, `lint:fix`, `format`, `format:check`.
25
- - **fs-sandbox** — File system sandbox (`src/fsSandbox.ts`) prevents path-traversal attacks by restricting agent file operations to the project boundary.
26
- - **Dashboard refactoring** — Extracted 133-line inline HTML from `companion.ts` into `dashboard.ts` module.
27
-
28
- #### 🔭 Observability & Control
29
- - **File Logging** — Companion logs to `~/.mcp-swarm/logs/companion-YYYY-MM-DD.log` with 7-day rotation.
30
- - **`mcp-swarm-doctor`** CLI diagnostics: Node.js, Git, companion status, ports, logs, Hub URL, IDE configs.
31
- - **Interactive Dashboard** — Pause/Resume/Shutdown buttons + Toast notifications at `http://localhost:37373`.
32
- - **Auto-Update Notifier** — Warns on startup if a newer npm version is available.
33
-
34
- #### 🐝 Web Dashboard
35
- - **Dark-themed dashboard** at `http://localhost:37373` with auto-refresh every 5s.
36
- - **PID file** + **Graceful shutdown** `~/.mcp-swarm/companion.pid` with SIGTERM/SIGINT handlers.
37
- - **`/health` endpoint** — `{ ok, pid, uptime }` for monitoring.
38
- - **Unit tests** — Tests for `normalizeGitRemote` and PID file management.
39
-
40
- ---
41
-
42
- ### Configuration
43
-
44
- **Option A: Remote (Recommended)**
45
-
46
- ```json
47
- {
48
- "mcpServers": {
49
- "mcp-swarm": {
50
- "command": "npx",
51
- "args": [
52
- "-y", "-p", "mcp-swarm",
53
- "mcp-swarm-remote",
54
- "--url", "https://mcp-swarm-server.YOUR-SUBDOMAIN.workers.dev/mcp"
55
- ],
56
- "env": {
57
- "SWARM_HUB_URL": "wss://mcp-swarm-hub.YOUR-SUBDOMAIN.workers.dev/ws",
58
- "TELEGRAM_USER_ID": "YOUR_TELEGRAM_USER_ID",
59
- "TELEGRAM_BOT_URL": "https://YOUR-TELEGRAM-BOT.workers.dev"
60
- }
61
- }
62
- }
63
- }
64
- ```
65
-
66
- **Option B: Local with Hub**
67
-
68
- ```json
69
- {
70
- "mcpServers": {
71
- "mcp-swarm": {
72
- "command": "node",
73
- "args": ["C:/path/to/Swarm_MCP/dist/serverSmart.js"],
74
- "env": {
75
- "SWARM_HUB_URL": "wss://mcp-swarm-hub.YOUR-SUBDOMAIN.workers.dev/ws",
76
- "TELEGRAM_USER_ID": "YOUR_TELEGRAM_USER_ID",
77
- "TELEGRAM_BOT_URL": "https://YOUR-TELEGRAM-BOT.workers.dev"
78
- }
79
- }
80
- }
81
- }
82
- ```
83
-
84
- | Variable | Required | Description |
85
- |----------|----------|-------------|
86
- | `SWARM_HUB_URL` | | WebSocket URL of your deployed Hub worker |
87
- | `TELEGRAM_USER_ID` | Optional | Your Telegram User ID (get it via [@userinfobot](https://t.me/userinfobot)) |
88
- | `TELEGRAM_BOT_URL` | Optional | URL of your deployed Telegram bot worker |
89
-
90
- > 📱 See [TELEGRAM.md](./TELEGRAM.md) for full Telegram setup instructions.
91
-
92
- ---
93
-
94
- ### Platform Highlights
95
-
96
- These are the key capabilities built into MCP Swarm across all versions:
97
-
98
- #### 🛠 26 Smart Tools
99
- Consolidated from 54 tools — zero feature loss, 2× fewer IDE slots. Each tool uses an `action` parameter for multiple operations.
100
-
101
- #### 🧠 MoE Router — 19 AI Models
102
- Intelligent model routing with cost optimization. Supports Anthropic (Claude Opus 4.6), OpenAI (GPT-5.3 Codex), Google (Gemini 3), and Moonshot (Kimi K2.5).
103
-
104
- #### 🛡️ AIDefence
105
- <10ms threat detection: prompt injection, jailbreak, code injection, data exfiltration, social engineering. Configurable sensitivity levels.
106
-
107
- #### 🤝 Distributed Consensus
108
- Raft-like leader election, BFT mode, proposal system with configurable voting thresholds.
109
-
110
- #### 🔍 HNSW Vector Search
111
- 150×–12,500× faster than brute force. Pure TypeScript, cosine/euclidean/dot product.
112
-
113
- #### 🌐 Cloudflare Workers
114
- Self-hosted infrastructure: Hub, MCP Server, Telegram Bot — all on Cloudflare Free Tier.
115
-
116
- #### 🔄 Full Bridge Coverage
117
- All 26 Smart Tools work through Remote Bridge. Universal delegation via `toolName.startsWith("swarm_")`.
118
-
119
- #### 📦 One-Click Installer
120
- `npx mcp-swarm-install` — auto-detects IDEs, merges configs, supports `--telegram-user-id`.
121
-
122
- #### 🚀 Smart Router & Memory
123
- Cost optimization (Opus → Sonnet downgrade), semantic cache, 3-tier hybrid memory system.
124
-
125
- #### 👥 Agent Teams & Skills
126
- Multi-agent coordination with roles. Cross-IDE skill discovery (Gemini, Claude, Cursor, Windsurf, Codex).
127
-
128
- ---
129
-
130
- ### Full Changelog
131
-
132
- For the complete version-by-version changelog, see the [GitHub Releases](https://github.com/AbdrAbdr/MCP-Swarm/releases).
1
+ > <img src="https://flagcdn.com/20x15/ru.png" alt="RU" /> [Читать на русском](./CHANGELOG.ru.md)
2
+
3
+ # Changelog
4
+
5
+ All notable changes to the MCP Swarm project are documented in this file.
6
+
7
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
+
10
+ ---
11
+
12
+ ## [1.1.5] - 2026-02-09
13
+
14
+ ### What's New
15
+
16
+ #### 📱 Interactive Telegram Bot
17
+ - **Task creation from chat** — Send `/new` or just type a task description; the bot confirms and creates it via Hub API.
18
+ - **AI Intent Matching** — Natural language recognition for Russian and English. Type "статус", "задачи", "agents", "stop", "logs" — no slash commands needed.
19
+ - **Push notifications from Hub** — Hub automatically sends real-time events (task created/completed, agent died, swarm stopped/resumed) to your Telegram via `POST /notify`.
20
+ - **Inline task management** — View details, mark as done, cancel, or change priority using inline buttons directly in chat.
21
+ - **Stop/Resume from Telegram** — Control the swarm with buttons, no need to open IDE.
22
+ - **Event logs** — `/logs` command to view recent swarm events.
23
+
24
+ #### 📊 Mini App Dashboard
25
+ - **Telegram Web App** — Real-time dashboard accessible via `/app` endpoint inside Telegram.
26
+ - **WebSocket connection** — Live updates of agents, tasks, and events from Hub.
27
+ - **Dark theme** — Adapts to Telegram's theme variables (`--tg-theme-*`).
28
+ - **Control buttons** Refresh status and stop swarm directly from the Mini App.
29
+
30
+ #### Performance & Reliability
31
+ - **Notification batching** — Uses Durable Object Alarm API to batch multiple events into a single message (2s debounce).
32
+ - **Hub response caching** — Cached responses in Durable Object with 30s TTL to reduce Hub load.
33
+ - **Cron heartbeat** — Scheduled handler runs every 10 minutes; sends status digest if agents are active.
34
+
35
+ #### 🏗️ Hub Enhancements
36
+ - **Task CRUD API** `POST /api/create_task`, `POST /api/update_task`, `GET /api/task/:id`, `GET /api/logs` endpoints.
37
+ - **Telegram webhook integration** — Hub calls `notifyTelegram()` on key events via `appendEvent()` hook.
38
+ - **Simplified config** — Only `TELEGRAM_BOT_URL` needed in Hub (no more `TELEGRAM_CHAT_ID`); chatId comes from Telegram updates.
39
+
40
+ #### 🔧 Deploy Your Own Telegram Bot
41
+
42
+ 1. Create a bot via [@BotFather](https://t.me/BotFather) and copy the token
43
+ 2. Deploy the worker:
44
+ ```bash
45
+ cd cloudflare/telegram-bot
46
+ npx wrangler secret put TELEGRAM_BOT_TOKEN
47
+ npx wrangler deploy
48
+ ```
49
+ 3. Set up the webhook:
50
+ ```bash
51
+ curl https://YOUR-TELEGRAM-BOT.workers.dev/setup
52
+ ```
53
+ 4. Add to your MCP config:
54
+ ```json
55
+ "TELEGRAM_USER_ID": "YOUR_TELEGRAM_USER_ID",
56
+ "TELEGRAM_BOT_URL": "https://YOUR-TELEGRAM-BOT.workers.dev"
57
+ ```
58
+
59
+ > 📱 See [TELEGRAM.md](./TELEGRAM.md) for detailed instructions (English + Russian).
60
+
61
+ ---
62
+
63
+ ## [1.1.3] - 2026-02-09
64
+
65
+ ### What's New
66
+
67
+ #### 📱 Telegram Bot Integration
68
+ - **Full Telegram notifications** — Task events, agent status, CI errors, code reviews — all delivered to your Telegram.
69
+ - **Bilingual setup guide** — Complete `TELEGRAM.md` with step-by-step instructions in English and Russian.
70
+ - **@userinfobot support** — Easy way to discover your Telegram User ID.
71
+ - **Bot commands** — `/start`, `/projects`, `/status`, `/agents`, `/tasks`, `/myid`, `/reviews`, `/approve`, `/reject`.
72
+ - **Environment variables** — `TELEGRAM_USER_ID` and `TELEGRAM_BOT_URL` for all MCP configurations.
73
+
74
+ #### 🏗️ Code Quality & Security
75
+ - **ESLint + Prettier** — Full linting and formatting setup with `typescript-eslint`. Scripts: `lint`, `lint:fix`, `format`, `format:check`.
76
+ - **fs-sandbox** — File system sandbox (`src/fsSandbox.ts`) prevents path-traversal attacks by restricting agent file operations to the project boundary.
77
+ - **Dashboard refactoring** — Extracted 133-line inline HTML from `companion.ts` into `dashboard.ts` module.
78
+
79
+ #### 🔭 Observability & Control
80
+ - **File Logging** — Companion logs to `~/.mcp-swarm/logs/companion-YYYY-MM-DD.log` with 7-day rotation.
81
+ - **`mcp-swarm-doctor`** — CLI diagnostics: Node.js, Git, companion status, ports, logs, Hub URL, IDE configs.
82
+ - **Interactive Dashboard** — Pause/Resume/Shutdown buttons + Toast notifications at `http://localhost:37373`.
83
+ - **Auto-Update Notifier** — Warns on startup if a newer npm version is available.
84
+
85
+ #### 🐝 Web Dashboard
86
+ - **Dark-themed dashboard** at `http://localhost:37373` with auto-refresh every 5s.
87
+ - **PID file** + **Graceful shutdown** `~/.mcp-swarm/companion.pid` with SIGTERM/SIGINT handlers.
88
+ - **`/health` endpoint** `{ ok, pid, uptime }` for monitoring.
89
+ - **Unit tests** — Tests for `normalizeGitRemote` and PID file management.
90
+
91
+ ---
92
+
93
+ ### Configuration
94
+
95
+ **Option A: Remote (Recommended)**
96
+
97
+ ```json
98
+ {
99
+ "mcpServers": {
100
+ "mcp-swarm": {
101
+ "command": "npx",
102
+ "args": [
103
+ "-y", "-p", "mcp-swarm",
104
+ "mcp-swarm-remote",
105
+ "--url", "https://mcp-swarm-server.YOUR-SUBDOMAIN.workers.dev/mcp"
106
+ ],
107
+ "env": {
108
+ "SWARM_HUB_URL": "wss://mcp-swarm-hub.YOUR-SUBDOMAIN.workers.dev/ws",
109
+ "TELEGRAM_USER_ID": "YOUR_TELEGRAM_USER_ID",
110
+ "TELEGRAM_BOT_URL": "https://YOUR-TELEGRAM-BOT.workers.dev"
111
+ }
112
+ }
113
+ }
114
+ }
115
+ ```
116
+
117
+ **Option B: Local with Hub**
118
+
119
+ ```json
120
+ {
121
+ "mcpServers": {
122
+ "mcp-swarm": {
123
+ "command": "node",
124
+ "args": ["C:/path/to/Swarm_MCP/dist/serverSmart.js"],
125
+ "env": {
126
+ "SWARM_HUB_URL": "wss://mcp-swarm-hub.YOUR-SUBDOMAIN.workers.dev/ws",
127
+ "TELEGRAM_USER_ID": "YOUR_TELEGRAM_USER_ID",
128
+ "TELEGRAM_BOT_URL": "https://YOUR-TELEGRAM-BOT.workers.dev"
129
+ }
130
+ }
131
+ }
132
+ }
133
+ ```
134
+
135
+ | Variable | Required | Description |
136
+ |----------|----------|-------------|
137
+ | `SWARM_HUB_URL` | ✅ | WebSocket URL of your deployed Hub worker |
138
+ | `TELEGRAM_USER_ID` | Optional | Your Telegram User ID (get it via [@userinfobot](https://t.me/userinfobot)) |
139
+ | `TELEGRAM_BOT_URL` | Optional | URL of your deployed Telegram bot worker |
140
+
141
+ > 📱 See [TELEGRAM.md](./TELEGRAM.md) for full Telegram setup instructions.
142
+
143
+ ---
144
+
145
+ ### Platform Highlights
146
+
147
+ These are the key capabilities built into MCP Swarm across all versions:
148
+
149
+ #### 🛠 26 Smart Tools
150
+ Consolidated from 54 tools — zero feature loss, 2× fewer IDE slots. Each tool uses an `action` parameter for multiple operations.
151
+
152
+ #### 🧠 MoE Router — 19 AI Models
153
+ Intelligent model routing with cost optimization. Supports Anthropic (Claude Opus 4.6), OpenAI (GPT-5.3 Codex), Google (Gemini 3), and Moonshot (Kimi K2.5).
154
+
155
+ #### 🛡️ AIDefence
156
+ <10ms threat detection: prompt injection, jailbreak, code injection, data exfiltration, social engineering. Configurable sensitivity levels.
157
+
158
+ #### 🤝 Distributed Consensus
159
+ Raft-like leader election, BFT mode, proposal system with configurable voting thresholds.
160
+
161
+ #### 🔍 HNSW Vector Search
162
+ 150×–12,500× faster than brute force. Pure TypeScript, cosine/euclidean/dot product.
163
+
164
+ #### 🌐 Cloudflare Workers
165
+ Self-hosted infrastructure: Hub, MCP Server, Telegram Bot — all on Cloudflare Free Tier.
166
+
167
+ #### 🔄 Full Bridge Coverage
168
+ All 26 Smart Tools work through Remote Bridge. Universal delegation via `toolName.startsWith("swarm_")`.
169
+
170
+ #### 📦 One-Click Installer
171
+ `npx mcp-swarm-install` — auto-detects IDEs, merges configs, supports `--telegram-user-id`.
172
+
173
+ #### 🚀 Smart Router & Memory
174
+ Cost optimization (Opus → Sonnet downgrade), semantic cache, 3-tier hybrid memory system.
175
+
176
+ #### 👥 Agent Teams & Skills
177
+ Multi-agent coordination with roles. Cross-IDE skill discovery (Gemini, Claude, Cursor, Windsurf, Codex).
178
+
179
+ ---
180
+
181
+ ### Full Changelog
182
+
183
+ For the complete version-by-version changelog, see the [GitHub Releases](https://github.com/AbdrAbdr/MCP-Swarm/releases).