mcp-swarm 1.1.4 → 1.1.6
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/.prettierignore +6 -6
- package/.prettierrc +8 -8
- package/CHANGELOG.md +215 -132
- package/CHANGELOG.ru.md +215 -132
- package/CONTRIBUTING.md +88 -88
- package/README.md +1129 -1119
- package/README.ru.md +8 -6
- package/RELEASE_NOTES.md +57 -57
- package/REMOTE.md +252 -252
- package/TELEGRAM.md +447 -447
- package/dist/dashboard.js +367 -136
- package/dist/dashboard.js.map +1 -1
- package/dist/doctor.js +2 -2
- package/dist/installer/index.js +6 -6
- package/dist/installer/index.js.map +1 -1
- package/dist/workflows/agentBooster.js +94 -2
- package/dist/workflows/agentBooster.js.map +1 -1
- package/eslint.config.js +15 -15
- package/examples/README.md +31 -31
- package/examples/claude-code/mcp_config.json +17 -17
- package/examples/cursor/mcp_config.json +17 -17
- package/examples/local-mode/mcp_config.json +12 -12
- package/examples/opencode/opencode.json +17 -17
- package/examples/windsurf/mcp_config.json +17 -17
- package/package.json +67 -67
- package/build-output.txt +0 -4
- package/dist/server.js +0 -280
- package/dist/server.js.map +0 -1
- package/dist/smartTools.js +0 -3513
- package/dist/smartTools.js.map +0 -1
- package/dist/smartTools.legacy.js +0 -3513
- package/dist/smartTools.legacy.js.map +0 -1
- package/dist/tests/newModules.test.js +0 -585
- package/dist/tests/newModules.test.js.map +0 -1
- package/dist/tests/projectId.test.js +0 -125
- package/dist/tests/projectId.test.js.map +0 -1
- package/dist/tools.js +0 -4170
- package/dist/tools.js.map +0 -1
- package/dist/workflows/agentSpecialization.js +0 -230
- package/dist/workflows/agentSpecialization.js.map +0 -1
- package/dist/workflows/autoDoc.js +0 -136
- package/dist/workflows/autoDoc.js.map +0 -1
- package/dist/workflows/codeReview.js +0 -97
- package/dist/workflows/codeReview.js.map +0 -1
- package/dist/workflows/conflictForecast.js +0 -117
- package/dist/workflows/conflictForecast.js.map +0 -1
- package/dist/workflows/costTracker.js +0 -249
- package/dist/workflows/costTracker.js.map +0 -1
- 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,215 @@
|
|
|
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.
|
|
13
|
-
|
|
14
|
-
### What's New
|
|
15
|
-
|
|
16
|
-
####
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- **
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- **
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
- **
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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.6] - 2026-02-10
|
|
13
|
+
|
|
14
|
+
### What's New
|
|
15
|
+
|
|
16
|
+
#### 🏗️ Hub Architecture Refactoring
|
|
17
|
+
- **Modular services** — Hub refactored from 846-line monolith into clean modules: `types.ts`, `services/events.ts`, `services/tasks.ts`, `services/agents.ts`
|
|
18
|
+
- **Thin entrypoint** — `index.ts` now delegates to services, making the codebase maintainable
|
|
19
|
+
- **Legacy cleanup** — Removed `smartTools.legacy.ts` (144KB dead code)
|
|
20
|
+
|
|
21
|
+
#### 📊 Dashboard 2.0
|
|
22
|
+
- **Chart.js graphs** — Bar chart for tasks over 24h, doughnut chart for agent activity
|
|
23
|
+
- **Pulse Timeline** — Live heartbeat visualization of all connected agents
|
|
24
|
+
- **WebSocket updates** — Replaced `meta http-equiv="refresh"` with WebSocket for real-time updates
|
|
25
|
+
- **Global Swarm Control** — Stop/Resume entire swarm directly from dashboard via Hub API
|
|
26
|
+
|
|
27
|
+
#### 🔒 API Security
|
|
28
|
+
- **X-Swarm-Secret middleware** — All `/api/*` endpoints validate `X-Swarm-Secret` header when `SWARM_AUTH_TOKEN` is set
|
|
29
|
+
- **Rate Limiting** — Built-in 100 requests/IP/minute limiter with `429 Too Many Requests` response
|
|
30
|
+
|
|
31
|
+
#### 🧪 E2E Testing
|
|
32
|
+
- **Full lifecycle test** — Hub → Task → Claim → Release → Lock → Unlock → Stop → Resume
|
|
33
|
+
- **Rate limit test** — Validates the 429 protection works correctly
|
|
34
|
+
- **Vitest-based** — Consistent with existing test suite
|
|
35
|
+
|
|
36
|
+
#### 🦙 Optional Ollama Integration
|
|
37
|
+
- **Local LLM support** — `swarm_booster` now supports `ollama_generate` task type for complex operations
|
|
38
|
+
- **Cost savings** — Use local Ollama models (codellama:7b) instead of expensive API calls
|
|
39
|
+
- **Fully optional** — Without `ollamaUrl` in config, everything works exactly as before
|
|
40
|
+
- **Smart detection** — `can_boost` detects refactoring/optimization tasks when Ollama is available
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## [1.1.5] - 2026-02-09
|
|
45
|
+
|
|
46
|
+
### What's New
|
|
47
|
+
|
|
48
|
+
#### 📱 Interactive Telegram Bot
|
|
49
|
+
- **Task creation from chat** — Send `/new` or just type a task description; the bot confirms and creates it via Hub API.
|
|
50
|
+
- **AI Intent Matching** — Natural language recognition for Russian and English. Type "статус", "задачи", "agents", "stop", "logs" — no slash commands needed.
|
|
51
|
+
- **Push notifications from Hub** — Hub automatically sends real-time events (task created/completed, agent died, swarm stopped/resumed) to your Telegram via `POST /notify`.
|
|
52
|
+
- **Inline task management** — View details, mark as done, cancel, or change priority using inline buttons directly in chat.
|
|
53
|
+
- **Stop/Resume from Telegram** — Control the swarm with buttons, no need to open IDE.
|
|
54
|
+
- **Event logs** — `/logs` command to view recent swarm events.
|
|
55
|
+
|
|
56
|
+
#### 📊 Mini App Dashboard
|
|
57
|
+
- **Telegram Web App** — Real-time dashboard accessible via `/app` endpoint inside Telegram.
|
|
58
|
+
- **WebSocket connection** — Live updates of agents, tasks, and events from Hub.
|
|
59
|
+
- **Dark theme** — Adapts to Telegram's theme variables (`--tg-theme-*`).
|
|
60
|
+
- **Control buttons** — Refresh status and stop swarm directly from the Mini App.
|
|
61
|
+
|
|
62
|
+
#### ⚡ Performance & Reliability
|
|
63
|
+
- **Notification batching** — Uses Durable Object Alarm API to batch multiple events into a single message (2s debounce).
|
|
64
|
+
- **Hub response caching** — Cached responses in Durable Object with 30s TTL to reduce Hub load.
|
|
65
|
+
- **Cron heartbeat** — Scheduled handler runs every 10 minutes; sends status digest if agents are active.
|
|
66
|
+
|
|
67
|
+
#### 🏗️ Hub Enhancements
|
|
68
|
+
- **Task CRUD API** — `POST /api/create_task`, `POST /api/update_task`, `GET /api/task/:id`, `GET /api/logs` endpoints.
|
|
69
|
+
- **Telegram webhook integration** — Hub calls `notifyTelegram()` on key events via `appendEvent()` hook.
|
|
70
|
+
- **Simplified config** — Only `TELEGRAM_BOT_URL` needed in Hub (no more `TELEGRAM_CHAT_ID`); chatId comes from Telegram updates.
|
|
71
|
+
|
|
72
|
+
#### 🔧 Deploy Your Own Telegram Bot
|
|
73
|
+
|
|
74
|
+
1. Create a bot via [@BotFather](https://t.me/BotFather) and copy the token
|
|
75
|
+
2. Deploy the worker:
|
|
76
|
+
```bash
|
|
77
|
+
cd cloudflare/telegram-bot
|
|
78
|
+
npx wrangler secret put TELEGRAM_BOT_TOKEN
|
|
79
|
+
npx wrangler deploy
|
|
80
|
+
```
|
|
81
|
+
3. Set up the webhook:
|
|
82
|
+
```bash
|
|
83
|
+
curl https://YOUR-TELEGRAM-BOT.workers.dev/setup
|
|
84
|
+
```
|
|
85
|
+
4. Add to your MCP config:
|
|
86
|
+
```json
|
|
87
|
+
"TELEGRAM_USER_ID": "YOUR_TELEGRAM_USER_ID",
|
|
88
|
+
"TELEGRAM_BOT_URL": "https://YOUR-TELEGRAM-BOT.workers.dev"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
> 📱 See [TELEGRAM.md](./TELEGRAM.md) for detailed instructions (English + Russian).
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## [1.1.3] - 2026-02-09
|
|
96
|
+
|
|
97
|
+
### What's New
|
|
98
|
+
|
|
99
|
+
#### 📱 Telegram Bot Integration
|
|
100
|
+
- **Full Telegram notifications** — Task events, agent status, CI errors, code reviews — all delivered to your Telegram.
|
|
101
|
+
- **Bilingual setup guide** — Complete `TELEGRAM.md` with step-by-step instructions in English and Russian.
|
|
102
|
+
- **@userinfobot support** — Easy way to discover your Telegram User ID.
|
|
103
|
+
- **Bot commands** — `/start`, `/projects`, `/status`, `/agents`, `/tasks`, `/myid`, `/reviews`, `/approve`, `/reject`.
|
|
104
|
+
- **Environment variables** — `TELEGRAM_USER_ID` and `TELEGRAM_BOT_URL` for all MCP configurations.
|
|
105
|
+
|
|
106
|
+
#### 🏗️ Code Quality & Security
|
|
107
|
+
- **ESLint + Prettier** — Full linting and formatting setup with `typescript-eslint`. Scripts: `lint`, `lint:fix`, `format`, `format:check`.
|
|
108
|
+
- **fs-sandbox** — File system sandbox (`src/fsSandbox.ts`) prevents path-traversal attacks by restricting agent file operations to the project boundary.
|
|
109
|
+
- **Dashboard refactoring** — Extracted 133-line inline HTML from `companion.ts` into `dashboard.ts` module.
|
|
110
|
+
|
|
111
|
+
#### 🔭 Observability & Control
|
|
112
|
+
- **File Logging** — Companion logs to `~/.mcp-swarm/logs/companion-YYYY-MM-DD.log` with 7-day rotation.
|
|
113
|
+
- **`mcp-swarm-doctor`** — CLI diagnostics: Node.js, Git, companion status, ports, logs, Hub URL, IDE configs.
|
|
114
|
+
- **Interactive Dashboard** — Pause/Resume/Shutdown buttons + Toast notifications at `http://localhost:37373`.
|
|
115
|
+
- **Auto-Update Notifier** — Warns on startup if a newer npm version is available.
|
|
116
|
+
|
|
117
|
+
#### 🐝 Web Dashboard
|
|
118
|
+
- **Dark-themed dashboard** at `http://localhost:37373` with auto-refresh every 5s.
|
|
119
|
+
- **PID file** + **Graceful shutdown** — `~/.mcp-swarm/companion.pid` with SIGTERM/SIGINT handlers.
|
|
120
|
+
- **`/health` endpoint** — `{ ok, pid, uptime }` for monitoring.
|
|
121
|
+
- **Unit tests** — Tests for `normalizeGitRemote` and PID file management.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
### Configuration
|
|
126
|
+
|
|
127
|
+
**Option A: Remote (Recommended)**
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"mcpServers": {
|
|
132
|
+
"mcp-swarm": {
|
|
133
|
+
"command": "npx",
|
|
134
|
+
"args": [
|
|
135
|
+
"-y", "-p", "mcp-swarm",
|
|
136
|
+
"mcp-swarm-remote",
|
|
137
|
+
"--url", "https://mcp-swarm-server.YOUR-SUBDOMAIN.workers.dev/mcp"
|
|
138
|
+
],
|
|
139
|
+
"env": {
|
|
140
|
+
"SWARM_HUB_URL": "wss://mcp-swarm-hub.YOUR-SUBDOMAIN.workers.dev/ws",
|
|
141
|
+
"TELEGRAM_USER_ID": "YOUR_TELEGRAM_USER_ID",
|
|
142
|
+
"TELEGRAM_BOT_URL": "https://YOUR-TELEGRAM-BOT.workers.dev"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Option B: Local with Hub**
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"mcpServers": {
|
|
154
|
+
"mcp-swarm": {
|
|
155
|
+
"command": "node",
|
|
156
|
+
"args": ["C:/path/to/Swarm_MCP/dist/serverSmart.js"],
|
|
157
|
+
"env": {
|
|
158
|
+
"SWARM_HUB_URL": "wss://mcp-swarm-hub.YOUR-SUBDOMAIN.workers.dev/ws",
|
|
159
|
+
"TELEGRAM_USER_ID": "YOUR_TELEGRAM_USER_ID",
|
|
160
|
+
"TELEGRAM_BOT_URL": "https://YOUR-TELEGRAM-BOT.workers.dev"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
| Variable | Required | Description |
|
|
168
|
+
|----------|----------|-------------|
|
|
169
|
+
| `SWARM_HUB_URL` | ✅ | WebSocket URL of your deployed Hub worker |
|
|
170
|
+
| `TELEGRAM_USER_ID` | Optional | Your Telegram User ID (get it via [@userinfobot](https://t.me/userinfobot)) |
|
|
171
|
+
| `TELEGRAM_BOT_URL` | Optional | URL of your deployed Telegram bot worker |
|
|
172
|
+
|
|
173
|
+
> 📱 See [TELEGRAM.md](./TELEGRAM.md) for full Telegram setup instructions.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### Platform Highlights
|
|
178
|
+
|
|
179
|
+
These are the key capabilities built into MCP Swarm across all versions:
|
|
180
|
+
|
|
181
|
+
#### 🛠 26 Smart Tools
|
|
182
|
+
Consolidated from 54 tools — zero feature loss, 2× fewer IDE slots. Each tool uses an `action` parameter for multiple operations.
|
|
183
|
+
|
|
184
|
+
#### 🧠 MoE Router — 19 AI Models
|
|
185
|
+
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).
|
|
186
|
+
|
|
187
|
+
#### 🛡️ AIDefence
|
|
188
|
+
<10ms threat detection: prompt injection, jailbreak, code injection, data exfiltration, social engineering. Configurable sensitivity levels.
|
|
189
|
+
|
|
190
|
+
#### 🤝 Distributed Consensus
|
|
191
|
+
Raft-like leader election, BFT mode, proposal system with configurable voting thresholds.
|
|
192
|
+
|
|
193
|
+
#### 🔍 HNSW Vector Search
|
|
194
|
+
150×–12,500× faster than brute force. Pure TypeScript, cosine/euclidean/dot product.
|
|
195
|
+
|
|
196
|
+
#### 🌐 Cloudflare Workers
|
|
197
|
+
Self-hosted infrastructure: Hub, MCP Server, Telegram Bot — all on Cloudflare Free Tier.
|
|
198
|
+
|
|
199
|
+
#### 🔄 Full Bridge Coverage
|
|
200
|
+
All 26 Smart Tools work through Remote Bridge. Universal delegation via `toolName.startsWith("swarm_")`.
|
|
201
|
+
|
|
202
|
+
#### 📦 One-Click Installer
|
|
203
|
+
`npx mcp-swarm-install` — auto-detects IDEs, merges configs, supports `--telegram-user-id`.
|
|
204
|
+
|
|
205
|
+
#### 🚀 Smart Router & Memory
|
|
206
|
+
Cost optimization (Opus → Sonnet downgrade), semantic cache, 3-tier hybrid memory system.
|
|
207
|
+
|
|
208
|
+
#### 👥 Agent Teams & Skills
|
|
209
|
+
Multi-agent coordination with roles. Cross-IDE skill discovery (Gemini, Claude, Cursor, Windsurf, Codex).
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
### Full Changelog
|
|
214
|
+
|
|
215
|
+
For the complete version-by-version changelog, see the [GitHub Releases](https://github.com/AbdrAbdr/MCP-Swarm/releases).
|