mcp-swarm 0.9.16 → 1.0.0

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 (182) hide show
  1. package/CHANGELOG.md +1037 -1471
  2. package/CHANGELOG.ru.md +1667 -0
  3. package/CONTRIBUTING.md +88 -0
  4. package/README.md +65 -10
  5. package/README.ru.md +51 -9
  6. package/assets/banner.png +0 -0
  7. package/build-output.txt +4 -0
  8. package/dist/serverSmart.js +4 -4
  9. package/dist/serverSmart.js.map +1 -1
  10. package/dist/smartTools/analytics.js +472 -0
  11. package/dist/smartTools/analytics.js.map +1 -0
  12. package/dist/smartTools/collaboration.js +391 -0
  13. package/dist/smartTools/collaboration.js.map +1 -0
  14. package/dist/smartTools/core.js +154 -0
  15. package/dist/smartTools/core.js.map +1 -0
  16. package/dist/smartTools/files.js +245 -0
  17. package/dist/smartTools/files.js.map +1 -0
  18. package/dist/smartTools/git.js +113 -0
  19. package/dist/smartTools/git.js.map +1 -0
  20. package/dist/smartTools/index.js +71 -0
  21. package/dist/smartTools/index.js.map +1 -0
  22. package/dist/smartTools/infra.js +988 -0
  23. package/dist/smartTools/infra.js.map +1 -0
  24. package/dist/smartTools/intelligence.js +597 -0
  25. package/dist/smartTools/intelligence.js.map +1 -0
  26. package/dist/smartTools/security.js +231 -0
  27. package/dist/smartTools/security.js.map +1 -0
  28. package/dist/smartTools/tasks.js +333 -0
  29. package/dist/smartTools/tasks.js.map +1 -0
  30. package/dist/smartTools.js +8 -8
  31. package/dist/smartTools.js.map +1 -1
  32. package/dist/workflows/agentTeams.js +425 -0
  33. package/dist/workflows/agentTeams.js.map +1 -0
  34. package/dist/workflows/autoDocumentation.js +32 -0
  35. package/dist/workflows/autoDocumentation.js.map +1 -1
  36. package/dist/workflows/autoReview.js +49 -0
  37. package/dist/workflows/autoReview.js.map +1 -1
  38. package/dist/workflows/claudeFlowBridge.js +426 -0
  39. package/dist/workflows/claudeFlowBridge.js.map +1 -0
  40. package/dist/workflows/conflictPrediction.js +64 -0
  41. package/dist/workflows/conflictPrediction.js.map +1 -1
  42. package/dist/workflows/costOptimization.js +77 -0
  43. package/dist/workflows/costOptimization.js.map +1 -1
  44. package/dist/workflows/mcpContext7Bridge.js +302 -0
  45. package/dist/workflows/mcpContext7Bridge.js.map +1 -0
  46. package/dist/workflows/mcpLinearBridge.js +195 -0
  47. package/dist/workflows/mcpLinearBridge.js.map +1 -0
  48. package/dist/workflows/moeRouter.js +210 -23
  49. package/dist/workflows/moeRouter.js.map +1 -1
  50. package/dist/workflows/skillsDiscovery.js +420 -0
  51. package/dist/workflows/skillsDiscovery.js.map +1 -0
  52. package/dist/workflows/smartRouterProxy.js +726 -0
  53. package/dist/workflows/smartRouterProxy.js.map +1 -0
  54. package/dist/workflows/smartRouting.js +70 -0
  55. package/dist/workflows/smartRouting.js.map +1 -1
  56. package/dist/workflows/sona.js +162 -7
  57. package/dist/workflows/sona.js.map +1 -1
  58. package/dist/workflows/swarmMemory.js +601 -0
  59. package/dist/workflows/swarmMemory.js.map +1 -0
  60. package/package.json +2 -2
  61. package/.clinerules +0 -105
  62. package/.cursorrules +0 -51
  63. package/.windsurfrules +0 -51
  64. package/AGENT.md +0 -163
  65. package/AGENTS.md +0 -163
  66. package/CLAUDE.md +0 -163
  67. package/GEMINI.md +0 -169
  68. package/cloudflare/hub/README.md +0 -30
  69. package/cloudflare/hub/src/index.ts +0 -735
  70. package/cloudflare/hub/tsconfig.json +0 -19
  71. package/cloudflare/hub/wrangler.toml +0 -24
  72. package/cloudflare/mcp-server/README.md +0 -74
  73. package/cloudflare/mcp-server/src/index.ts +0 -887
  74. package/cloudflare/mcp-server/tsconfig.json +0 -19
  75. package/cloudflare/mcp-server/wrangler.toml +0 -41
  76. package/cloudflare/telegram-bot/worker.ts +0 -802
  77. package/cloudflare/telegram-bot/wrangler.toml +0 -45
  78. package/dashboard/.env.example +0 -8
  79. package/dashboard/next.config.js +0 -15
  80. package/dashboard/package-lock.json +0 -3171
  81. package/dashboard/package.json +0 -39
  82. package/dashboard/postcss.config.js +0 -6
  83. package/dashboard/src/app/globals.css +0 -104
  84. package/dashboard/src/app/layout.tsx +0 -26
  85. package/dashboard/src/app/page.tsx +0 -564
  86. package/dashboard/src/components/ui/badge.tsx +0 -39
  87. package/dashboard/src/components/ui/button.tsx +0 -52
  88. package/dashboard/src/components/ui/card.tsx +0 -75
  89. package/dashboard/src/components/ui/progress.tsx +0 -27
  90. package/dashboard/src/components/ui/tooltip.tsx +0 -29
  91. package/dashboard/src/components/widgets/AdvancedWidgets.tsx +0 -794
  92. package/dashboard/src/components/widgets/CoreWidgets.tsx +0 -589
  93. package/dashboard/src/hooks/useSwarmData.ts +0 -104
  94. package/dashboard/src/hooks/useWebSocket.ts +0 -215
  95. package/dashboard/src/lib/utils.ts +0 -37
  96. package/dashboard/tailwind.config.js +0 -80
  97. package/dashboard/tsconfig.json +0 -22
  98. package/dist/scripts/install.js +0 -128
  99. package/dist/scripts/install.js.map +0 -1
  100. package/install.ps1 +0 -310
  101. package/install.sh +0 -380
  102. package/src/bridge.ts +0 -368
  103. package/src/companion.ts +0 -592
  104. package/src/dashboardApi.ts +0 -1127
  105. package/src/installer/index.ts +0 -470
  106. package/src/integrations/telegram.ts +0 -1188
  107. package/src/remote/index.ts +0 -378
  108. package/src/scripts/install.ts +0 -144
  109. package/src/server.ts +0 -471
  110. package/src/serverSmart.ts +0 -38
  111. package/src/smartTools.ts +0 -3783
  112. package/src/tests/newModules.test.ts +0 -706
  113. package/src/tools.ts +0 -4520
  114. package/src/workers/heartbeatManager.ts +0 -87
  115. package/src/workers/heartbeatWorker.ts +0 -91
  116. package/src/workflows/agentBooster.ts +0 -1260
  117. package/src/workflows/agentHealth.ts +0 -254
  118. package/src/workflows/agentRegistry.ts +0 -230
  119. package/src/workflows/agentSpecialization.ts +0 -310
  120. package/src/workflows/aiDefence.ts +0 -1074
  121. package/src/workflows/auction.ts +0 -150
  122. package/src/workflows/autoDoc.ts +0 -167
  123. package/src/workflows/autoDocumentation.ts +0 -242
  124. package/src/workflows/autoReview.ts +0 -503
  125. package/src/workflows/batching.ts +0 -666
  126. package/src/workflows/brainstorming.ts +0 -719
  127. package/src/workflows/briefings.ts +0 -158
  128. package/src/workflows/codeReview.ts +0 -128
  129. package/src/workflows/collectiveAdvice.ts +0 -202
  130. package/src/workflows/companionControl.ts +0 -48
  131. package/src/workflows/conflictForecast.ts +0 -156
  132. package/src/workflows/conflictPrediction.ts +0 -301
  133. package/src/workflows/consensus.ts +0 -1207
  134. package/src/workflows/constants.ts +0 -73
  135. package/src/workflows/contextCompressor.ts +0 -237
  136. package/src/workflows/contextPool.ts +0 -500
  137. package/src/workflows/costOptimization.ts +0 -832
  138. package/src/workflows/costTracker.ts +0 -353
  139. package/src/workflows/crossPlatform.ts +0 -189
  140. package/src/workflows/decompose.ts +0 -127
  141. package/src/workflows/dependencySync.ts +0 -92
  142. package/src/workflows/externalSync.ts +0 -764
  143. package/src/workflows/fileLocks.ts +0 -142
  144. package/src/workflows/ghostMode.ts +0 -170
  145. package/src/workflows/git.ts +0 -53
  146. package/src/workflows/githubPr.ts +0 -99
  147. package/src/workflows/guardHooks.ts +0 -381
  148. package/src/workflows/hnsw.ts +0 -1155
  149. package/src/workflows/immuneSystem.ts +0 -171
  150. package/src/workflows/knowledgeBase.ts +0 -169
  151. package/src/workflows/mcpScanner.ts +0 -231
  152. package/src/workflows/moeRouter.ts +0 -1522
  153. package/src/workflows/orchestrator.ts +0 -726
  154. package/src/workflows/preemption.ts +0 -160
  155. package/src/workflows/projectId.ts +0 -151
  156. package/src/workflows/pulse.ts +0 -147
  157. package/src/workflows/qaLoop.ts +0 -398
  158. package/src/workflows/qualityGate.ts +0 -307
  159. package/src/workflows/regressionDetector.ts +0 -412
  160. package/src/workflows/remoteCleanup.ts +0 -103
  161. package/src/workflows/repo.ts +0 -35
  162. package/src/workflows/screenshot.ts +0 -93
  163. package/src/workflows/sessionRecording.ts +0 -290
  164. package/src/workflows/smartRouting.ts +0 -463
  165. package/src/workflows/snapshot.ts +0 -176
  166. package/src/workflows/sona.ts +0 -1155
  167. package/src/workflows/specPipeline.ts +0 -402
  168. package/src/workflows/specialization.ts +0 -183
  169. package/src/workflows/stopFlag.ts +0 -94
  170. package/src/workflows/swarmThoughts.ts +0 -105
  171. package/src/workflows/systematicDebugging.ts +0 -670
  172. package/src/workflows/taskFile.ts +0 -195
  173. package/src/workflows/taskState.ts +0 -131
  174. package/src/workflows/teamFiles.ts +0 -88
  175. package/src/workflows/timeline.ts +0 -182
  176. package/src/workflows/toolClusters.ts +0 -510
  177. package/src/workflows/voting.ts +0 -197
  178. package/src/workflows/worktree.ts +0 -116
  179. package/src/workflows/writingPlans.ts +0 -666
  180. package/swarm/tasks/.gitkeep +0 -0
  181. package/tsconfig.json +0 -17
  182. /package/{swarm/agents/.gitkeep → ts-errors.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,1471 +1,1037 @@
1
- # Changelog
2
-
3
- Все значимые изменения в проекте MCP Swarm документируются в этом файле.
4
-
5
- Формат основан на [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- версионирование следует [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ---
9
-
10
- ## [0.9.16] - 2026-02-08
11
-
12
- ### 🐛 Критический фикс: Zod совместимость
13
-
14
- **BREAKING FIX:** Исправлена ошибка `keyValidator._parse is not a function`, которая делала все 54 Smart Tools полностью неработоспособными в Antigravity и подобных клиентах.
15
-
16
- #### Причина
17
- - `zod@^3.23.8` в `package.json` автоматически устанавливал `3.25.76` — по сути Zod v4 bridge-версию
18
- - Zod v4 удалил внутренний метод `_parse()`, который используется клиентами для валидации JSON Schema
19
- - Результат: **ни один Smart Tool не работал** из-за ошибки парсинга входных схем
20
-
21
- #### Исправление
22
- - `zod` закреплён на точной версии `3.23.8` (чистый Zod v3, без v4 bridge)
23
- - Предотвращает автоматический апгрейд до несовместимых версий
24
-
25
- > 🙏 Приносим извинения за неудобства. Баг затронул всех пользователей, обновившихся через npm.
26
-
27
- ### 🔒 Безопасность: Cloudflare Workers
28
-
29
- - Удалены задеплоенные воркеры `mcp-swarm-hub` и `mcp-swarm-server` (URL-ы были засвечены в коммитах)
30
- - Исходники воркеров **сохранены** в `cloudflare/` будут передеплоены с новыми именами
31
-
32
- ### 📦 Обновления
33
-
34
- - `serverSmart.ts` динамическая версия из `package.json` вместо хардкода
35
- - `server.ts` помечен как deprecated (`@ts-nocheck`), используйте `serverSmart.ts`
36
- - `.gitignore` — добавлены паттерны для тестовых файлов
37
-
38
- ### 🔄 Обновление
39
-
40
- ```bash
41
- npm install -g mcp-swarm@latest
42
- # или
43
- npm update mcp-swarm
44
- ```
45
-
46
- ---
47
-
48
- ## [0.9.13] - 2026-02-05
49
-
50
- ### Self-Hosted Infrastructure
51
-
52
- **BREAKING CHANGE:** Removed hardcoded public server URLs. Users must now deploy their own Cloudflare Workers.
53
-
54
- #### Changed
55
-
56
- - **README.md** Complete rewrite of installation section
57
- - Added Cloudflare Free Tier explanation and limits
58
- - Step-by-step deployment guide for Hub, MCP Server, Telegram Bot
59
- - Explained what YOUR-SUBDOMAIN means
60
-
61
- - **wrangler.toml files** — All 3 Workers now have placeholders
62
- - `cloudflare/hub/wrangler.toml` Added deployment instructions
63
- - `cloudflare/mcp-server/wrangler.toml` — HUB_URL placeholder
64
- - `cloudflare/telegram-bot/wrangler.toml` — SWARM_HUB_URL placeholder
65
-
66
- - **install.ps1 / install.sh** — Now ask for user's server URLs
67
- - No more hardcoded URLs
68
- - Instructions for deploying first
69
-
70
- - **mcp-swarm-remote**`--url` is now **required**
71
- - Shows helpful error message with deployment link
72
- - Added `--help` option
73
-
74
- - **Dashboard** — `.env.example` uses placeholder
75
- - `useWebSocket.ts` warns if HUB_URL not configured
76
-
77
- - **Agent rules** (AGENTS.md, CLAUDE.md, GEMINI.md, AGENT.md)
78
- - Updated with YOUR-SUBDOMAIN placeholders
79
-
80
- #### Why This Change?
81
-
82
- - **Privacy**: Your data stays on your infrastructure
83
- - **No shared limits**: Full Cloudflare Free Tier for yourself
84
- - **Customization**: Modify Workers as needed
85
- - **Transparency**: No hidden public server
86
-
87
- ---
88
-
89
- ## [0.9.12] - 2026-02-05
90
-
91
- ### Dashboard Real-time Updates
92
-
93
- #### Added
94
-
95
- - **WebSocket Hook** (`dashboard/src/hooks/useWebSocket.ts`)
96
- - Real-time connection to Swarm Hub
97
- - Auto-reconnect with exponential backoff
98
- - Keep-alive ping every 25 seconds
99
- - Event filtering for specific event types
100
-
101
- - **New Core Widgets** (`dashboard/src/components/widgets/CoreWidgets.tsx`)
102
- - **ConnectionStatusWidget**Shows Hub connection status with reconnect button
103
- - **ActivityTimelineWidget**Real-time event stream from Hub
104
- - **FileLocksWidget**Active file reservations with live updates
105
- - **CostTrackingWidget**API usage and budget progress bars
106
- - **VotingWidget**Distributed consensus proposals and votes
107
-
108
- - **Live Indicators**
109
- - Green pulsing dot for connected/active status
110
- - LIVE/OFFLINE badges for real-time widgets
111
- - Last update timestamps with relative time format
112
-
113
- ### Telegram Bot Enhancements
114
-
115
- #### Added
116
-
117
- - **New Commands**
118
- - `/reviews`List pending code reviews with inline approve/reject buttons
119
- - `/approve [id]` Approve a review directly from Telegram
120
- - `/reject [id] [reason]` — Reject a review with optional reason
121
-
122
- - **Enhanced Inline Keyboards**
123
- - Reviews list shows approve/reject buttons for each pending review
124
- - Help menu now includes Reviews button
125
-
126
- ### Auto-start Companion
127
-
128
- #### Added
129
-
130
- - **Companion Auto-start** in `mcp-swarm-remote`
131
- - Checks if companion daemon is running on port 37373
132
- - Automatically spawns companion in background if not running
133
- - Can be disabled with `--no-companion` flag
134
-
135
- #### Changed
136
-
137
- - Dashboard now uses WebSocket for real-time updates instead of polling-only
138
- - Added "Real-time Monitoring" section with new widgets
139
- - Updated version to 0.9.12 in footer
140
-
141
- ---
142
-
143
- ## [0.9.11] - 2026-02-04
144
-
145
- ### One-Click Installer & Streamable HTTP
146
-
147
- #### Added
148
-
149
- - **One-Click Install Scripts**
150
- - `install.ps1` — PowerShell installer for Windows
151
- - `install.sh` Bash installer for macOS/Linux
152
- - `npx mcp-swarm-install` — Interactive Node.js installer
153
-
154
- - **Streamable HTTP Transport** (MCP spec 2025-03-26)
155
- - Single `POST /mcp` endpoint instead of SSE
156
- - Session management via `Mcp-Session-Id` header
157
- - Works on Cloudflare Workers without SSE issues
158
-
159
- - **mcp-swarm-remote Proxy** (`src/remote/index.ts`)
160
- - stdio → Streamable HTTP proxy for IDE integration
161
- - Windows stdin compatibility fix
162
-
163
- #### Changed
164
-
165
- - Installer now **merges** configs instead of overwriting
166
- - Auto-detects IDE installations (Claude Desktop, Cursor, Windsurf, OpenCode, VS Code)
167
-
168
- ---
169
-
170
- ## [0.9.10] - 2026-02-03
171
-
172
- ### 🧠 MoE Router Mixture of Experts Model Selection
173
-
174
- #### Added
175
-
176
- - **MoE Router Module** (`src/workflows/moeRouter.ts`)
177
- - Intelligent model routing based on task characteristics
178
- - Gating network for expert selection
179
- - Cost-performance optimization
180
- - Learning from feedback
181
-
182
- - **Expert Classification**
183
- - 14 task categories: code_generation, code_review, debugging, reasoning, math, creative, etc.
184
- - 4 model tiers: economy, standard, premium, flagship
185
- - 6 providers: anthropic, openai, google, mistral, local, custom
186
-
187
- - **Built-in Experts (16 models, verified pricing February 2026)**
188
- - **Anthropic Claude 4.5 Series:**
189
- - Claude Opus 4.5 (flagship, 200K, $5/$25 MTok)
190
- - Claude Sonnet 4.5 (premium, 200K, $3/$15 MTok)
191
- - Claude Haiku 4.5 (economy, 200K, $1/$5 MTok)
192
- - **OpenAI GPT-5.x Series:**
193
- - GPT-5.2 (flagship, 256K, $1.75/$14 MTok)
194
- - GPT-5.2 Pro (flagship, 256K, $21/$168 MTok)
195
- - GPT-5 Mini (standard, 128K, $0.25/$2 MTok)
196
- - GPT-4.1 (premium, 128K, $3/$12 MTok)
197
- - GPT-4.1 Mini (standard, 128K, $0.80/$3.20 MTok)
198
- - GPT-4.1 Nano (economy, 128K, $0.20/$0.80 MTok)
199
- - **OpenAI Reasoning Models:**
200
- - o4-mini (reasoning, 128K, $4/$16 MTok)
201
- - **Google Gemini 3.x Series:**
202
- - Gemini 3 Pro (flagship, 1M, $2/$12 MTok)
203
- - Gemini 3 Flash (standard, 1M, $0.50/$3 MTok)
204
- - **Google Gemini 2.5 Series:**
205
- - Gemini 2.5 Pro (premium, 1M, $1.25/$10 MTok)
206
- - Gemini 2.5 Flash (standard, 1M, $0.30/$2.50 MTok)
207
- - Gemini 2.5 Flash Lite (economy, 1M, $0.10/$0.40 MTok)
208
-
209
- - **Routing Factors**
210
- - Task match score (category-specific strength)
211
- - Cost efficiency
212
- - Performance history (success rate)
213
- - Load balancing (prefer less recently used)
214
- - Latency constraints
215
- - Context window requirements
216
-
217
- - **Learning System**
218
- - Feedback recording
219
- - Exponential moving average for success rate
220
- - Automatic latency calibration
221
- - Per-expert statistics
222
-
223
- - **Smart Tool #54: `swarm_moe`**
224
- - `route`: Route task to best expert
225
- - `feedback`: Record routing feedback
226
- - `experts`: List available experts
227
- - `add_expert` / `remove_expert`: Manage experts
228
- - `config` / `set_config`: Configuration
229
- - `stats`: Routing statistics
230
- - `history`: Routing history
231
- - `classify`: Classify task category
232
- - `reset`: Reset statistics
233
-
234
- - **Dashboard API Endpoint** (`/api/moe`)
235
- - Routing statistics
236
- - Expert list and usage
237
- - Configuration status
238
-
239
- #### Example Usage
240
-
241
- ```typescript
242
- // Route task to best model
243
- swarm_moe({
244
- action: "route",
245
- content: "Write a React component for user authentication",
246
- preferredTier: "premium",
247
- maxCost: 0.05,
248
- repoPath
249
- });
250
- // { selectedExpert: "claude-sonnet", confidence: 0.92, estimatedCost: $0.02 }
251
-
252
- // Record feedback for learning
253
- swarm_moe({
254
- action: "feedback",
255
- expertId: "claude-sonnet",
256
- success: true,
257
- quality: 5,
258
- actualLatencyMs: 1800,
259
- repoPath
260
- });
261
-
262
- // Get routing statistics
263
- swarm_moe({ action: "stats", repoPath });
264
- // { totalRequests: 150, successRate: 94%, totalCost: $1.23 }
265
- ```
266
-
267
- ---
268
-
269
- ## [0.9.9] - 2026-02-03
270
-
271
- ### 🤝 Consensus — Distributed Agreement Protocols
272
-
273
- #### Added
274
-
275
- - **Consensus Module** (`src/workflows/consensus.ts`)
276
- - Raft-like leader election with term-based leadership
277
- - Log replication for ordered command execution
278
- - Byzantine Fault Tolerance (BFT) mode for untrusted environments
279
- - Proposal system with configurable voting thresholds
280
- - Automatic failover when leader becomes unresponsive
281
-
282
- - **Consensus Modes**
283
- - `simple_majority`: 50%+ votes for approval
284
- - `raft`: Term-based leadership, log replication
285
- - `bft`: Byzantine fault tolerant (2/3+1 quorum)
286
-
287
- - **Node Management**
288
- - Join/leave cluster
289
- - Heartbeat monitoring
290
- - Trusted/untrusted node classification
291
- - Automatic dead node detection
292
-
293
- - **Proposal System**
294
- - Types: config_change, task_assignment, architecture, rollback, emergency, custom
295
- - Vote types: approve, reject, abstain
296
- - Configurable majority thresholds (0.5 to 1.0)
297
- - Expiration timeout handling
298
- - Signature verification for BFT mode
299
-
300
- - **Log Replication**
301
- - Ordered command log
302
- - Commit confirmation from leader
303
- - State machine replication across nodes
304
-
305
- - **Smart Tool #53: `swarm_consensus`**
306
- - `join`: Join consensus cluster
307
- - `leave`: Leave cluster
308
- - `heartbeat`: Send heartbeat
309
- - `status`: Get cluster status
310
- - `elect`: Start leader election
311
- - `leader`: Get current leader
312
- - `propose`: Create proposal
313
- - `vote`: Vote on proposal
314
- - `proposals`: List proposals
315
- - `get_proposal`: Get proposal details
316
- - `execute`: Execute approved proposal
317
- - `log` / `append` / `commit`: Log management
318
- - `config` / `set_config`: Configuration
319
- - `stats`: Statistics
320
-
321
- - **Dashboard API Endpoint** (`/api/consensus`)
322
- - Cluster status and node list
323
- - Leader information
324
- - Proposal statistics
325
- - Recent proposals
326
-
327
- #### Example Usage
328
-
329
- ```typescript
330
- // Join cluster
331
- swarm_consensus({
332
- action: "join",
333
- nodeId: "agent-1",
334
- nodeName: "RadiantWolf",
335
- repoPath: "/path/to/project"
336
- });
337
-
338
- // Start leader election
339
- swarm_consensus({
340
- action: "elect",
341
- nodeId: "agent-1",
342
- nodeName: "RadiantWolf",
343
- repoPath
344
- });
345
-
346
- // Create a proposal
347
- swarm_consensus({
348
- action: "propose",
349
- nodeId: "agent-1",
350
- nodeName: "RadiantWolf",
351
- title: "Add dark mode",
352
- description: "Implement dark mode for dashboard",
353
- type: "architecture",
354
- requiredMajority: 0.67, // 2/3 majority
355
- repoPath
356
- });
357
-
358
- // Vote on proposal
359
- swarm_consensus({
360
- action: "vote",
361
- proposalId: "prop_xxx",
362
- nodeId: "agent-2",
363
- nodeName: "BrilliantFox",
364
- vote: "approve",
365
- reason: "Good idea!",
366
- repoPath
367
- });
368
- ```
369
-
370
- ---
371
-
372
- ## [0.9.8] - 2026-02-03
373
-
374
- ### 🛡️ AIDefence — Security & Threat Detection
375
-
376
- #### Added
377
-
378
- - **AIDefence Module** (`src/workflows/aiDefence.ts`)
379
- - <10ms threat detection latency
380
- - Pattern-based detection with regex + heuristics
381
- - Behavioral anomaly detection
382
- - Quarantine system for suspicious content
383
- - Audit logging for security events
384
- - Configurable sensitivity levels
385
-
386
- - **Threat Categories**
387
- - `prompt_injection`: Instruction override, role hijacking, delimiter attacks
388
- - `jailbreak`: DAN mode, hypothetical bypasses, character hijacking
389
- - `code_injection`: Shell commands, eval, SQL injection, path traversal
390
- - `data_exfiltration`: API keys, credentials, external uploads
391
- - `sensitive_data`: PII, private keys, passwords
392
- - `unsafe_command`: rm -rf, sudo, crypto mining
393
- - `social_engineering`: Authority claims, urgency manipulation
394
- - `impersonation`: Agent identity spoofing
395
- - `dos_attack`: Request flooding
396
- - `unauthorized_tool`: Restricted tool access
397
-
398
- - **Sensitivity Levels**
399
- - `low`: Only critical threats
400
- - `medium`: Balanced (default)
401
- - `high`: Strict checking
402
- - `paranoid`: Maximum security
403
-
404
- - **Smart Tool #52: `swarm_defence`**
405
- - `scan`: Scan text for threats
406
- - `validate_agent`: Validate agent identity
407
- - `validate_tool`: Validate tool usage
408
- - `events`: Get security events log
409
- - `quarantine`: Get quarantined items
410
- - `release`: Release from quarantine
411
- - `stats`: Get defence statistics
412
- - `config` / `set_config`: Configuration
413
- - `trust` / `untrust`: Agent whitelist management
414
- - `clear_events`: Clear event log
415
-
416
- - **Dashboard API Endpoint** (`/api/defence`)
417
- - Security statistics
418
- - Threat distribution by category/severity
419
- - Quarantine status
420
- - Recent events log
421
-
422
- #### Example Usage
423
-
424
- ```typescript
425
- // Scan text for threats
426
- swarm_defence({
427
- action: "scan",
428
- text: "Ignore all previous instructions...",
429
- source: "user",
430
- repoPath: "/path/to/project"
431
- });
432
- // Returns: { detected: true, category: "prompt_injection", severity: "high", action: "block" }
433
-
434
- // Configure sensitivity
435
- swarm_defence({
436
- action: "set_config",
437
- config: { sensitivity: "high", blockOnHighThreat: true },
438
- repoPath: "/path/to/project"
439
- });
440
-
441
- // Add trusted agent
442
- swarm_defence({
443
- action: "trust",
444
- agentName: "RadiantWolf",
445
- repoPath: "/path/to/project"
446
- });
447
- ```
448
-
449
- ---
450
-
451
- ## [0.9.7] - 2026-02-03
452
-
453
- ### 🔍 HNSW Hierarchical Navigable Small World
454
-
455
- #### Added
456
-
457
- - **HNSW Module** (`src/workflows/hnsw.ts`)
458
- - Fast approximate nearest neighbor search
459
- - 150x-12,500x faster than brute force
460
- - Pure TypeScript implementation (no dependencies)
461
- - Based on Malkov & Yashunin (2016) algorithm
462
-
463
- - **Vector Operations**
464
- - Cosine similarity (default)
465
- - Euclidean distance
466
- - Dot product
467
- - Configurable dimensions (384, 768, 1536)
468
-
469
- - **Simple Embeddings**
470
- - Built-in bag-of-words embedder for demos
471
- - Works without external API
472
- - Can use custom vectors from OpenAI/Cohere/etc.
473
-
474
- - **Smart Tool #51: `swarm_vector`**
475
- - `init`: Initialize vector index
476
- - `add`: Add document with text or vector
477
- - `add_batch`: Add multiple documents
478
- - `search`: Find similar documents
479
- - `get`: Get document by ID
480
- - `delete`: Remove document
481
- - `list`: List all documents
482
- - `stats`: Index statistics
483
- - `config` / `set_config`: Configuration
484
- - `clear`: Clear entire index
485
- - `duplicates`: Find duplicate documents
486
- - `embed`: Get embedding for text
487
-
488
- - **Dashboard API Endpoint** (`/api/vector`)
489
- - Index statistics
490
- - Configuration status
491
- - Memory usage tracking
492
-
493
- #### Use Cases
494
-
495
- - Semantic search in knowledge base
496
- - Finding similar code snippets
497
- - Context retrieval for agents
498
- - Duplicate detection
499
- - Clustering related tasks
500
-
501
- #### Example Usage
502
-
503
- ```typescript
504
- // Initialize index
505
- swarm_vector({
506
- action: "init",
507
- repoPath,
508
- config: { dimensions: 384, distanceMetric: "cosine" }
509
- })
510
-
511
- // Add documents
512
- swarm_vector({
513
- action: "add",
514
- repoPath,
515
- id: "doc-1",
516
- text: "How to configure authentication in Express.js",
517
- metadata: { category: "backend", language: "javascript" }
518
- })
519
-
520
- // Search for similar
521
- swarm_vector({
522
- action: "search",
523
- repoPath,
524
- query: "setting up JWT auth",
525
- k: 5,
526
- filter: { category: "backend" }
527
- })
528
- // → [{ id: "doc-1", score: 0.85, ... }, ...]
529
-
530
- // Find duplicates
531
- swarm_vector({
532
- action: "duplicates",
533
- repoPath,
534
- threshold: 0.95
535
- })
536
- // → [{ id1: "doc-1", id2: "doc-5", similarity: 0.97 }, ...]
537
-
538
- // Get statistics
539
- swarm_vector({ action: "stats", repoPath })
540
- // → { totalDocuments: 150, dimensions: 384, memoryKB: 245, ... }
541
- ```
542
-
543
- #### Performance
544
-
545
- | Documents | Brute Force | HNSW | Speedup |
546
- |-----------|-------------|------|---------|
547
- | 1,000 | 10ms | 0.5ms | 20x |
548
- | 10,000 | 100ms | 0.8ms | 125x |
549
- | 100,000 | 1,000ms | 1.2ms | 833x |
550
- | 1,000,000 | 10,000ms | 2ms | 5,000x |
551
-
552
- ---
553
-
554
- ## [0.9.6] - 2026-02-03
555
-
556
- ### Agent Booster Fast Local Execution
557
-
558
- #### Added
559
-
560
- - **Agent Booster Module** (`src/workflows/agentBooster.ts`)
561
- - Executes trivial tasks locally without LLM API calls
562
- - 352x faster than LLM (local execution)
563
- - $0 cost (no API calls needed)
564
- - Works offline
565
- - Deterministic results
566
-
567
- - **Supported Task Types** (14 types)
568
- - `rename_variable` Rename variables/functions across file
569
- - `fix_typo` Fix typos in strings and comments only
570
- - `find_replace` Simple find and replace
571
- - `add_console_log` — Add debug logging at specific line
572
- - `remove_console_log` Remove all console.log statements
573
- - `toggle_flag` Toggle boolean flags (true ↔ false)
574
- - `update_version` Update version numbers
575
- - `update_import` Update import paths
576
- - `add_comment` Add comment at specific line
577
- - `remove_comment` Remove single-line comments
578
- - `format_json` Format JSON files
579
- - `sort_imports` Sort imports alphabetically
580
- - `add_export` Add export to function/class
581
- - `extract_constant` Extract magic number to constant
582
-
583
- - **Smart Detection**
584
- - `can_boost` action analyzes task description
585
- - Auto-detects boostable tasks with confidence score
586
- - Extracts parameters from natural language
587
-
588
- - **Smart Tool #50: `swarm_booster`**
589
- - `execute`: Run a booster task
590
- - `can_boost`: Check if task can be boosted
591
- - `stats`: Get booster statistics
592
- - `history`: Get execution history
593
- - `config`: Get configuration
594
- - `set_config`: Update configuration
595
- - `types`: List supported task types
596
-
597
- - **Dashboard API Endpoint** (`/api/booster`)
598
- - Booster statistics and type distribution
599
- - Recent execution history
600
- - Configuration status
601
- - Cost savings tracking
602
-
603
- #### Example Usage
604
-
605
- ```typescript
606
- // Check if task can be boosted
607
- swarm_booster({
608
- action: "can_boost",
609
- repoPath,
610
- description: "rename variable oldName to newName in file.ts"
611
- })
612
- // Returns: { canBoost: true, taskType: "rename_variable", confidence: 0.9, ... }
613
-
614
- // Execute a booster task
615
- swarm_booster({
616
- action: "execute",
617
- repoPath,
618
- task: {
619
- type: "rename_variable",
620
- filePath: "src/utils.ts",
621
- oldName: "getData",
622
- newName: "fetchUserData"
623
- }
624
- })
625
- // Returns: { success: true, changes: 5, timeMs: 2, savedCost: 0.01, ... }
626
-
627
- // Remove all console.log from file
628
- swarm_booster({
629
- action: "execute",
630
- repoPath,
631
- task: {
632
- type: "remove_console_log",
633
- filePath: "src/debug.ts"
634
- }
635
- })
636
-
637
- // Preview changes without applying (dry run)
638
- swarm_booster({
639
- action: "execute",
640
- repoPath,
641
- dryRun: true,
642
- task: {
643
- type: "find_replace",
644
- filePath: "src/config.ts",
645
- searchText: "localhost",
646
- replaceText: "production.api.com"
647
- }
648
- })
649
-
650
- // Get statistics
651
- swarm_booster({ action: "stats", repoPath })
652
- // Returns: { totalTasks: 50, successRate: 98, costSaved: "$0.50", ... }
653
- ```
654
-
655
- #### Benefits
656
-
657
- | Metric | LLM | Agent Booster | Improvement |
658
- |--------|-----|---------------|-------------|
659
- | Speed | ~3000ms | ~8ms | 352x faster |
660
- | Cost | $0.01/task | $0 | 100% savings |
661
- | Offline | ❌ | ✅ | Works anywhere |
662
- | Deterministic | ⚠️ | ✅ | Same input = same output |
663
-
664
- ---
665
-
666
- ## [0.9.5] - 2026-02-03
667
-
668
- ### 🧠 SONA Self-Optimizing Neural Architecture
669
-
670
- #### Added
671
-
672
- - **SONA Module** (`src/workflows/sona.ts`)
673
- - Self-learning task routing system inspired by Claude-Flow
674
- - Records which agents perform best for each task type
675
- - Routes new tasks to best-performing agents
676
- - Learns from outcomes with <0.05ms adaptation
677
- - Improves over time with reinforcement learning
678
-
679
- - **Task Classification**
680
- - Automatic category detection: frontend_ui, backend_api, database, testing, devops, documentation, refactoring, bugfix, feature, security, performance, infrastructure
681
- - Complexity estimation: trivial, simple, medium, complex, epic
682
- - Keyword-based pattern matching
683
- - Affected path analysis
684
-
685
- - **Agent Performance Tracking**
686
- - Success rate tracking per category
687
- - Quality score averaging
688
- - Completion time tracking
689
- - Statistical confidence calculation
690
- - Specialization detection (top 3 categories per agent)
691
-
692
- - **Online Learning**
693
- - Exponential moving average for rolling metrics
694
- - Configurable learning rate and decay
695
- - Elastic Weight Consolidation (EWC++) to prevent forgetting
696
- - Exploration/exploitation balance (10% exploration by default)
697
-
698
- - **Smart Tool #49: `swarm_sona`**
699
- - `route`: Get routing recommendation for a task
700
- - `learn`: Record task outcome and update model
701
- - `classify`: Classify a task (category, complexity)
702
- - `profile`: Get agent's performance profile
703
- - `profiles`: Get all agent profiles
704
- - `specialists`: Get top agents for a category
705
- - `history`: Get learning history
706
- - `stats`: Get SONA statistics
707
- - `config`: Get configuration
708
- - `set_config`: Update configuration
709
- - `reset`: Reset the model
710
-
711
- - **Dashboard API Endpoint** (`/api/sona`)
712
- - Get SONA statistics and agent profiles
713
- - View category distribution
714
- - Monitor recent learning events
715
- - Check top performing agents
716
-
717
- #### How SONA Works
718
-
719
- 1. **Classification**: When a new task arrives, SONA classifies it by category and complexity
720
- 2. **Routing**: SONA recommends the best agent based on historical performance
721
- 3. **Execution**: The agent completes the task
722
- 4. **Learning**: SONA records the outcome and updates agent profiles
723
- 5. **Improvement**: Over time, routing becomes more accurate
724
-
725
- #### Example Usage
726
-
727
- ```typescript
728
- // Get routing recommendation
729
- swarm_sona({
730
- action: "route",
731
- repoPath,
732
- title: "Fix login button styling",
733
- description: "Button is not visible on dark theme",
734
- affectedFiles: ["src/components/Login.tsx", "src/styles/buttons.css"]
735
- })
736
- // Returns: { recommendedAgent: "RadiantWolf", confidence: 0.85, category: "frontend_ui", ... }
737
-
738
- // Record learning after task completion
739
- swarm_sona({
740
- action: "learn",
741
- repoPath,
742
- taskId: "task-123",
743
- agentName: "RadiantWolf",
744
- title: "Fix login button styling",
745
- description: "Button is not visible on dark theme",
746
- success: true,
747
- qualityScore: 0.9,
748
- timeMinutes: 15
749
- })
750
-
751
- // Get specialists for backend work
752
- swarm_sona({
753
- action: "specialists",
754
- repoPath,
755
- category: "backend_api",
756
- limit: 3
757
- })
758
- // Returns: [{ agent: "StormyOwl", score: 0.92, ... }, ...]
759
-
760
- // Configure SONA
761
- swarm_sona({
762
- action: "set_config",
763
- repoPath,
764
- config: {
765
- explorationRate: 0.15, // More exploration
766
- autoLearn: true,
767
- preferSpecialists: true
768
- }
769
- })
770
- ```
771
-
772
- #### Comparison with Claude-Flow SONA
773
-
774
- | Feature | Claude-Flow | MCP Swarm v0.9.5 |
775
- |---------|-------------|------------------|
776
- | Self-learning | | |
777
- | Category classification | | 13 categories |
778
- | Complexity estimation | ⚠️ Basic | ✅ 5 levels |
779
- | EWC++ (prevent forgetting) | ✅ | ✅ |
780
- | Distributed coordination | Local only | ✅ Cloudflare Hub |
781
- | Dashboard integration | ⚠️ Limited | ✅ /api/sona |
782
- | Telegram notifications | | ✅ |
783
-
784
- ---
785
-
786
- ## [0.9.4] - 2026-02-03
787
-
788
- ### 📱 Telegram Bot Integration
789
-
790
- #### Added
791
-
792
- - **Telegram Bot** (`src/integrations/telegram.ts`)
793
- - Full-featured Telegram bot for notifications and control
794
- - Event notifications: task created/completed/failed, agent joined/died, CI errors
795
- - Commands: `/status`, `/agents`, `/tasks`, `/create_task`, `/stop`, `/resume`, `/config`
796
- - Interactive inline buttons for quick actions
797
- - Priority setting via buttons (Critical, High, Medium)
798
- - Approve/Reject/Comment on reviews via Telegram
799
- - Vote on architecture decisions via Telegram
800
-
801
- - **Smart Tool #47: `swarm_telegram`**
802
- - Actions: `setup`, `config`, `enable`, `disable`, `send`
803
- - Notifications: `notify_task_created`, `notify_task_completed`, `notify_task_failed`, `notify_agent_joined`, `notify_agent_died`
804
- - Bot control: `start_polling`, `stop_polling`, `command`
805
-
806
- - **Dashboard API Endpoint** (`/api/telegram`)
807
- - Get Telegram configuration status
808
- - Setup instructions if not configured
809
-
810
- #### Setup
811
-
812
- 1. Create a bot via @BotFather in Telegram
813
- 2. Set `TELEGRAM_BOT_TOKEN` environment variable
814
- 3. Get your chat ID (send /start to @userinfobot)
815
- 4. Configure via `swarm_telegram({ action: "setup", chatId: "YOUR_CHAT_ID" })`
816
-
817
- #### Example Usage
818
-
819
- ```typescript
820
- // Setup
821
- swarm_telegram({ action: "setup", repoPath, chatId: "123456789", enabled: true })
822
-
823
- // Send notification
824
- swarm_telegram({ action: "notify_task_created", repoPath, taskId: "task-1", title: "Fix bug", priority: "high" })
825
-
826
- // Start bot polling (for receiving commands)
827
- swarm_telegram({ action: "start_polling", repoPath })
828
- ```
829
-
830
- - **Cloudflare Worker for Telegram** (`cloudflare/telegram-bot/`)
831
- - Webhook-based (no polling required)
832
- - Deploy to Cloudflare Workers
833
- - `/setup` endpoint for webhook registration
834
-
835
- - **Smart Tool #48: `swarm_batch`**
836
- - Request batching for 50% cost savings
837
- - Supports Anthropic Message Batches API
838
- - Supports OpenAI Batch API
839
- - Actions: `queue`, `config`, `set_config`, `job`, `jobs`, `result`, `stats`, `flush`
840
-
841
- - **Batching Module** (`src/workflows/batching.ts`)
842
- - Automatic request grouping
843
- - Configurable batch size and wait time
844
- - Async batch processing with result polling
845
- - Cost savings estimation
846
-
847
- ---
848
-
849
- ## [0.9.3] - 2026-02-03
850
-
851
- ### 🧠 Smart Features & Cost Optimization
852
-
853
- #### Added
854
-
855
- - **Smart Task Routing** (`src/workflows/smartRouting.ts`)
856
- - Automatic task assignment based on file expertise
857
- - Tracks which agent edited which files
858
- - Calculates expertise scores (exact match 10x, folder 3x, extension 2x)
859
- - `recordFileEdit()`, `findBestAgent()`, `autoAssignTask()`
860
-
861
- - **Shared Context Pool** (`src/workflows/contextPool.ts`)
862
- - Agents share notes about code to avoid re-reading
863
- - Auto-staleness detection (if file hash changed)
864
- - Tags, categories, and helpful counter
865
- - `addContextNote()`, `getContextNotes()`, `searchContext()`
866
-
867
- - **Auto Code Review** (`src/workflows/autoReview.ts`)
868
- - Automatic review assignment when task completes
869
- - Finds reviewer who knows the affected files
870
- - Comment severity levels (critical, major, minor, suggestion)
871
- - `createReviewRequest()`, `addReviewComment()`, `completeReview()`
872
-
873
- - **GitHub/Linear Sync** (`src/workflows/externalSync.ts`)
874
- - Two-way sync with GitHub Issues
875
- - Linear.app integration (GraphQL API)
876
- - Auto-import issues as swarm tasks
877
- - Auto-close issues when task is done
878
- - `syncFromGitHub()`, `syncFromLinear()`, `exportTaskToGitHub()`
879
-
880
- - **Cost Optimization** (`src/workflows/costOptimization.ts`)
881
- - Task complexity analysis (simple/medium/complex)
882
- - Smart model routing (cheap/standard/premium tiers)
883
- - Budget management with daily/weekly/monthly limits
884
- - Alert thresholds (50%, 80%, 95%)
885
- - Supports GPT-3.5, GPT-4o, Claude 3 Haiku/Sonnet/Opus, Gemini, o1
886
- - `analyzeTaskComplexity()`, `routeTask()`, `checkBudget()`, `generateCostReport()`
887
-
888
- - **Background Heartbeat Worker** (`src/workers/`)
889
- - Uses Node.js `worker_threads` for continuous heartbeat
890
- - Works even when agent is "thinking"
891
- - `startHeartbeatWorker()`, `stopHeartbeatWorker()`
892
-
893
- - **Web Dashboard** (`dashboard/`)
894
- - Real-time agent status monitoring
895
- - Orchestrator status banner with glow effects
896
- - Stats cards (agents, tasks, messages, uptime)
897
- - Task list with priority indicators
898
- - Built with Next.js + ShadCN UI
899
-
900
- - **Dashboard API** (`src/dashboardApi.ts`)
901
- - HTTP API server on port 3334
902
- - Endpoints: `/api/agents`, `/api/tasks`, `/api/messages`, `/api/orchestrator`
903
- - **New v0.9.3 endpoints:**
904
- - `GET /api/expertise`Smart Routing expertise map
905
- - `GET /api/context` — Context Pool notes
906
- - `GET /api/reviews` — Auto Review status
907
- - `GET /api/budget` — Cost budget and usage
908
- - `GET /api/sync`External Sync status
909
-
910
- #### Smart Tools (42-46)
911
-
912
- | # | Tool | Actions | Description |
913
- |---|------|---------|-------------|
914
- | 42 | `swarm_routing` | record, find_agent, expertise, predict, auto_assign | Smart task routing based on file expertise |
915
- | 43 | `swarm_context_pool` | add, get, search_tag, search, helpful, update, cleanup, stats | Shared context notes between agents |
916
- | 44 | `swarm_autoreview` | create, assign, comment, complete, resolve, for_reviewer, for_author, pending, stats | Automatic code review assignment |
917
- | 45 | `swarm_external` | enable_github, enable_linear, sync_github, sync_linear, sync_all, export_github, export_linear, status, create_issue, close_issue, comment | GitHub/Linear sync |
918
- | 46 | `swarm_budget` | analyze, models, select, recommend, route, log_usage, usage, stats, config, set_config, check, remaining, report | Cost optimization and model routing |
919
-
920
- ---
921
-
922
- ## [0.9.1] - 2026-02-02
923
-
924
- ### 📚 Documentation & UX Improvements
925
-
926
- #### Added
927
- - **Linux Installation Instructions** — полные инструкции для Linux
928
- - **IDE-Specific Configs** — отдельные конфигурации для:
929
- - Claude Desktop (Windows/macOS/Linux)
930
- - Cursor
931
- - Windsurf
932
- - OpenCode CLI
933
- - VS Code + Copilot/Continue
934
- - **Troubleshooting Section** — решения частых проблем:
935
- - "Cannot find module" errors
936
- - Agent не становится оркестратором
937
- - "repoPath is required" ошибка
938
- - Cloudflare Hub недоступен
939
- - Файлы заблокированы другим агентом
940
- - **Architecture Diagram** — ASCII-схема архитектуры Cloudflare Hub + Local Agents
941
- - **Contributing Guidelines** — правила для PR
942
-
943
- #### Changed
944
- - README.md полностью переработан с collapsible секциями (`<details>`)
945
-
946
- ### 🔮 Future Improvements (Roadmap)
947
-
948
- #### Heartbeat Daemon Enhancement (Planned)
949
- Текущая проблема: когда агент "думает" (processing), он не может отправлять heartbeat, что может привести к ложному срабатыванию dead-detection после 60 секунд.
950
-
951
- Планируемые решения:
952
- 1. **Background Worker** — отдельный процесс для heartbeat (требует Node.js worker_threads)
953
- 2. **Longer Timeout** — увеличить HEARTBEAT_TIMEOUT_MS до 5 минут
954
- 3. **Thinking State** — добавить состояние "thinking" которое не считается dead
955
- 4. **Companion Daemon** — использовать существующий companion.ts для heartbeat
956
-
957
- ---
958
-
959
- ## [0.9.0] - 2026-02-02
960
-
961
- ### 🚀 MAJOR: Smart Tools Consolidation
962
-
963
- **Reduces 168+ individual tools 41 Smart Tools with `action` parameter**
964
-
965
- This is a major UX improvement. Instead of agents needing to remember 168+ tool names,
966
- they now work with 41 logical groups where related functionality is accessed via the `action` parameter.
967
-
968
- ### Added
969
-
970
- - **Smart Tools System** — 41 unified tools replacing 168+ individual tools
971
- - Each Smart Tool groups 3-15 related functions via `action` parameter
972
- - Better discoverability and easier to remember
973
- - Consistent parameter patterns across all tools
974
-
975
- ### Smart Tools List (41 tools)
976
-
977
- | # | Tool Name | Actions | Description |
978
- |---|-----------|---------|-------------|
979
- | 1 | `swarm_agent` | register, whoami | Agent identity |
980
- | 2 | `swarm_task` | create, list, update, decompose, get_decomposition | Task management |
981
- | 3 | `swarm_file` | reserve, release, list, forecast, conflicts, safety | File locking |
982
- | 4 | `swarm_git` | sync, pr, health, cleanup, cleanup_all | Git operations |
983
- | 5 | `swarm_worktree` | create, list, remove | Git worktrees |
984
- | 6 | `swarm_companion` | status, stop, pause, resume | Companion daemon |
985
- | 7 | `swarm_control` | stop, resume, status | Swarm control |
986
- | 8 | `swarm_chat` | broadcast, dashboard, thought, thoughts | Team chat |
987
- | 9 | `swarm_review` | request, respond, list | Code review |
988
- | 10 | `swarm_voting` | start, vote, list, get | Voting system |
989
- | 11 | `swarm_auction` | announce, bid, poll | Task auction |
990
- | 12 | `swarm_mcp` | scan, authorize, policy | MCP scanning |
991
- | 13 | `swarm_orchestrator` | elect, info, heartbeat, resign, executors, executor_heartbeat | Orchestrator |
992
- | 14 | `swarm_message` | send, inbox, ack, reply, search, thread | Messaging |
993
- | 15 | `swarm_briefing` | save, load | Briefings |
994
- | 16 | `swarm_pulse` | update, get | Real-time status |
995
- | 17 | `swarm_knowledge` | archive, search | Knowledge base |
996
- | 18 | `swarm_snapshot` | create, rollback, list | Snapshots |
997
- | 19 | `swarm_health` | check, dead, reassign, summary | Agent health |
998
- | 20 | `swarm_quality` | run, report, threshold, pr_ready | Quality gate |
999
- | 21 | `swarm_cost` | log, agent, project, limit, remaining | Cost tracking |
1000
- | 22 | `swarm_brainstorm` | start, ask, answer, propose, present, validate, save, get, list | Brainstorming |
1001
- | 23 | `swarm_plan` | create, add, next, start, step, complete, prompt, export, status, list, ready | Plans |
1002
- | 24 | `swarm_debug` | start, investigate, evidence, phase1, patterns, phase2, hypothesis, test, fix, verify, get, list, redflags | Debugging |
1003
- | 25 | `swarm_spec` | start, phase, complete, get, list, export | Spec pipeline |
1004
- | 26 | `swarm_qa` | start, iterate, fix, get, list, suggest, report | QA loop |
1005
- | 27 | `swarm_hooks` | install, uninstall, run, config, update, list | Git hooks |
1006
- | 28 | `swarm_screenshot` | share, list | Screenshots |
1007
- | 29 | `swarm_dependency` | signal, sync | Dependencies |
1008
- | 30 | `swarm_platform` | request, respond, list | Cross-platform |
1009
- | 31 | `swarm_immune` | alert, resolve, status, test, patrol | Immune system |
1010
- | 32 | `swarm_context` | estimate, compress, compress_many, stats | Context compression |
1011
- | 33 | `swarm_regression` | baseline, check, list, resolve, baselines | Regression detection |
1012
- | 34 | `swarm_expertise` | track, suggest, record, experts, list | Agent expertise |
1013
- | 35 | `swarm_conflict` | predict, analyze, hotspots, record | Conflict prediction |
1014
- | 36 | `swarm_timeline` | generate, visualize | Timeline |
1015
- | 37 | `swarm_docs` | generate, task_docs, list, get | Documentation |
1016
- | 38 | `swarm_advice` | request, provide, list | Collective advice |
1017
- | 39 | `swarm_preemption` | trigger, resolve, active | Urgent preemption |
1018
- | 40 | `swarm_clusters` | init, list, tools, find, add, create, summary | Tool clusters |
1019
- | 41 | `swarm_session` | start, log, stop, list, replay | Session recording |
1020
-
1021
- ### Example Usage
1022
-
1023
- **Before (v0.8.x):**
1024
- ```
1025
- tool: task_create
1026
- tool: task_list
1027
- tool: task_assign
1028
- tool: task_set_status
1029
- tool: task_mark_done
1030
- ... (9 separate tools)
1031
- ```
1032
-
1033
- **After (v0.9.0):**
1034
- ```
1035
- tool: swarm_task
1036
- action: "create" | "list" | "update" | "decompose" | "get_decomposition"
1037
- ```
1038
-
1039
- ### Files Changed
1040
-
1041
- - `src/smartTools.ts` — All 41 Smart Tools with correct workflow signatures
1042
- - `src/serverSmart.ts` — New server entry point for Smart Tools
1043
- - `package.json` — v0.9.0, added `dev:legacy` script for backward compatibility
1044
-
1045
- ### Backward Compatibility
1046
-
1047
- - Legacy 168+ tools server available via `npm run dev:legacy`
1048
- - Smart Tools server via `npm run dev` (default)
1049
-
1050
- ---
1051
-
1052
- ## [0.8.1] - 2026-02-02
1053
-
1054
- ### Добавлено
1055
- - **Smart Tools Draft** — прототип объединения 168+ tools в 41 Smart Tool
1056
- - Файлы `smartTools.ts.draft` и `serverSmart.ts.draft` — прототип для будущей версии
1057
- - Каждый Smart Tool объединяет 3-15 похожих tools через параметр `action`
1058
- - Пример: `swarm_task(action: "create|list|assign|done|cancel|...")` вместо 9 отдельных tools
1059
-
1060
- ### В процессе (для v0.9.0)
1061
- - Smart Tools требует адаптации к актуальным сигнатурам workflow функций
1062
- - Будет завершено в следующей версии
1063
-
1064
- ---
1065
-
1066
- ## [0.8.0] - 2026-02-02
1067
-
1068
- ### Добавлено
1069
- - **Orchestrator Election** (6 tools) — первый агент становится оркестратором
1070
- - `orchestrator_elect` — выбор оркестратора (first-come-first-served)
1071
- - `orchestrator_info` — информация об оркестраторе
1072
- - `orchestrator_heartbeat` — heartbeat оркестратора
1073
- - `orchestrator_resign` — отставка оркестратора
1074
- - `executor_list` — список всех исполнителей
1075
- - `executor_heartbeat` — heartbeat исполнителя
1076
-
1077
- - **Agent Messaging** (6 tools) — полная система обмена сообщениями между агентами
1078
- - `agent_message_send` — отправить сообщение (direct или broadcast)
1079
- - `agent_inbox_fetch` — получить входящие сообщения
1080
- - `agent_message_ack` — подтвердить получение
1081
- - `agent_message_reply` — ответить на сообщение
1082
- - `agent_message_search` — поиск по сообщениям
1083
- - `agent_thread_get` — получить тред сообщений
1084
-
1085
- - **Infinite Loop Mode** — оркестратор работает бесконечно
1086
- - Companion daemon с автоматическим orchestrator election
1087
- - Оркестратор НЕ останавливается по API — только пользователем
1088
- - Исполнители регистрируются у оркестратора
1089
- - Heartbeat система для мониторинга "живости"
1090
-
1091
- ### Изменено
1092
- - **companion.ts** — полностью переписан для Orchestrator mode
1093
- - **Installer** — обновлён до v0.8.0 (168+ tools, 14 категорий)
1094
-
1095
- ### Архитектура
1096
-
1097
- ```
1098
- ┌─────────────────────────────────────────────────────┐
1099
- │ FIRST AGENT │
1100
- │ (ORCHESTRATOR) │
1101
- │ - Elected automatically (first-come-first-served) │
1102
- │ - Runs in INFINITE LOOP │
1103
- │ - Only user can stop (stdin) │
1104
- │ - Coordinates all executors │
1105
- └────────────────────────┬────────────────────────────┘
1106
-
1107
- ┌───────────────┼───────────────┐
1108
- ▼ ▼ ▼
1109
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
1110
- │ EXECUTOR 1 │ │ EXECUTOR 2 │ │ EXECUTOR N │
1111
- │ (Claude) │ │ (Cursor) │ │ (Windsurf) │
1112
- │ - Registers │ │ - Registers │ │ - Registers │
1113
- │ - Gets tasks│ │ - Gets tasks│ │ - Gets tasks│
1114
- │ - Heartbeat │ │ - Heartbeat │ │ - Heartbeat │
1115
- └─────────────┘ └─────────────┘ └─────────────┘
1116
- ```
1117
-
1118
- ### Хранение данных
1119
-
1120
- ```
1121
- .swarm/
1122
- ├── ORCHESTRATOR.json # Состояние оркестратора
1123
- ├── messages/ # Canonical сообщения
1124
- │ └── msg-*.json
1125
- └── inbox/ # Inbox каждого агента
1126
- ├── RadiantWolf/
1127
- └── SilentFox/
1128
- ```
1129
-
1130
- ---
1131
-
1132
- ## [0.7.0] - 2026-02-02
1133
-
1134
- ### Добавлено
1135
- - **Spec Pipeline** (6 tools) — структурированный pipeline для создания спецификаций
1136
- - `start_spec_pipeline` — начать pipeline с 4 ролями
1137
- - `start_spec_phase` — начать фазу (gatherer/researcher/writer/critic)
1138
- - `complete_spec_phase` — завершить фазу с output
1139
- - `get_spec_pipeline` — получить статус pipeline
1140
- - `list_spec_pipelines` — список всех pipelines
1141
- - `export_spec_as_markdown` — экспорт спецификации в markdown
1142
-
1143
- - **QA Loop** (7 tools) — итеративные циклы review/fix
1144
- - `start_qa_loop` — начать QA loop для задачи
1145
- - `run_qa_iteration` — запустить итерацию проверок
1146
- - `log_qa_fix` — записать применённый fix
1147
- - `get_qa_loop` — получить статус loop
1148
- - `list_qa_loops` — список всех loops
1149
- - `get_qa_fix_suggestions` — получить предложения по fix
1150
- - `generate_qa_report` — сгенерировать markdown отчёт
1151
-
1152
- - **Guard Hooks** (6 tools) — pre-commit/pre-push safety hooks
1153
- - `install_guard_hooks` — установить hooks в репозиторий
1154
- - `uninstall_guard_hooks` — удалить hooks
1155
- - `run_guard_hooks` — запустить hooks вручную (для тестирования)
1156
- - `get_guard_config` — получить конфигурацию hooks
1157
- - `update_guard_hook` — обновить конфигурацию hook
1158
- - `list_guard_hooks` — список всех hooks
1159
-
1160
- - **Tool Clusters** (7 tools) — организация tools по категориям
1161
- - `init_tool_clusters` — инициализировать кластеры tools
1162
- - `list_tool_clusters` — список всех кластеров
1163
- - `get_cluster_tools` — получить tools в кластере
1164
- - `find_tool_cluster` — найти кластер для tool
1165
- - `add_tool_to_cluster` — добавить tool в кластер
1166
- - `create_tool_cluster` — создать новый кластер
1167
- - `get_tool_cluster_summary` — получить summary всех кластеров
1168
-
1169
- ### Методологии
1170
- - **Spec Pipeline:** 4 роли (gatherer → researcher → writer → critic) с итерациями
1171
- - **QA Loop:** reviewer → fixer → loop до прохождения всех проверок
1172
- - **Guard Hooks:** bypass с ключевым словом [skip-hooks] в commit message
1173
- - **Tool Clusters:** 13 категорий (agent, task, file, git, collab, safety, quality, debug, plan, hooks, session, cost, docs)
1174
-
1175
- ---
1176
-
1177
- ## [0.6.0] - 2026-01-30
1178
-
1179
- ### Добавлено
1180
- - **Brainstorming Skill** (9 tools) — интерактивный дизайн через вопросы по одному
1181
- - `start_brainstorm` — начать сессию brainstorming
1182
- - `ask_brainstorm_question` — задать вопрос (ONE at a time, multiple choice preferred)
1183
- - `answer_brainstorm_question` — записать ответ пользователя
1184
- - `propose_approaches` — предложить варианты с pros/cons
1185
- - `present_design_section` — представить секцию дизайна (200-300 слов max)
1186
- - `validate_design_section` — валидация секции дизайна
1187
- - `save_design_document` — сохранить результат в `docs/plans/`
1188
- - `get_brainstorm_session` — получить статус сессии
1189
- - `list_brainstorm_sessions` — список всех сессий
1190
-
1191
- - **Writing Plans Skill** (11 tools) — TDD-планы с bite-sized задачами
1192
- - `create_implementation_plan` — создать план имплементации
1193
- - `add_plan_task` — добавить задачу с TDD-шагами
1194
- - `get_next_task` — следующая задача (учитывает dependencies)
1195
- - `start_plan_task` — начать работу над задачей
1196
- - `complete_step` — завершить шаг TDD (write_test/run_test/implement/verify/commit)
1197
- - `complete_plan_task` — завершить задачу
1198
- - `generate_subagent_prompt` — генерировать детальный промпт для субагента
1199
- - `export_plan_as_markdown` — экспорт плана в markdown
1200
- - `get_plan_status` — статус плана
1201
- - `list_plans` — список всех планов
1202
- - `mark_plan_ready` — пометить план готовым к выполнению
1203
-
1204
- - **Systematic Debugging** (13 tools) — 4-фазный процесс дебага (NO FIXES WITHOUT ROOT CAUSE!)
1205
- - `start_debug_session` — Phase 1: Investigation (NO FIXES YET!)
1206
- - `log_investigation` — логировать анализ ошибок
1207
- - `add_evidence` — добавить evidence (input/output компонентов)
1208
- - `complete_phase_1` — перейти к Phase 2: Pattern Analysis
1209
- - `log_patterns` — логировать working examples
1210
- - `complete_phase_2` — перейти к Phase 3: Hypothesis
1211
- - `form_hypothesis` — сформулировать гипотезу
1212
- - `test_hypothesis` — проверить гипотезу
1213
- - `implement_fix` — Phase 4: реализовать исправление
1214
- - `verify_fix` — верифицировать и завершить сессию
1215
- - `get_debug_session` — получить статус сессии
1216
- - `list_debug_sessions` — список всех сессий
1217
- - `check_red_flags` — проверить на анти-паттерны мышления
1218
-
1219
- ### Методологии (из obra/superpowers)
1220
- - **Brainstorming:** вопросы по одному, валидация секций (200-300 слов max)
1221
- - **Writing Plans:** TDD bite-sized tasks (2-5 мин), DRY/YAGNI
1222
- - **Systematic Debugging:** 4 фазы, Iron Law — NO FIXES WITHOUT ROOT CAUSE
1223
- - **Red Flags:** "Let me just try...", "Maybe if I...", "This should fix it..."
1224
-
1225
- ---
1226
-
1227
- ## [0.5.0] - 2026-01-30
1228
-
1229
- ### Добавлено
1230
- - **Agent Health Monitor** — мониторинг "живости" агентов
1231
- - `check_agent_health` — проверить статус конкретного агента
1232
- - `get_dead_agents` — найти агентов без активности > N минут
1233
- - `force_reassign_task` — переназначить задачу от мёртвого агента
1234
- - `get_swarm_health_summary` — общее здоровье swarm
1235
-
1236
- - **Session Recording** — запись действий для replay
1237
- - `start_session_recording` — начать запись сессии
1238
- - `log_session_action` — записать действие (tool, edit, command)
1239
- - `stop_session_recording` — остановить запись
1240
- - `list_session_recordings` — список всех записей
1241
- - `replay_session` — воспроизвести запись step-by-step
1242
-
1243
- - **Quality Gate** — автопроверки перед merge
1244
- - `run_quality_gate` — запустить проверки (lint, tests, types, coverage)
1245
- - `get_quality_report` — получить отчёт с баллами
1246
- - `set_quality_threshold` — установить минимальные пороги
1247
- - `check_pr_ready` — готовность PR к merge
1248
-
1249
- - **Cost Tracker** — отслеживание расходов на API
1250
- - `log_api_usage` — записать использование (tokens, cost)
1251
- - `get_agent_costs` — расходы конкретного агента
1252
- - `get_project_costs` — общие расходы проекта
1253
- - `set_budget_limit` — установить лимит
1254
- - `check_budget_remaining` — остаток до лимита
1255
-
1256
- - **Context Compressor** — сжатие briefings
1257
- - `estimate_context_size` — оценить размер в токенах
1258
- - `compress_briefing` — сжать briefing (ratio 0.1-0.9)
1259
- - `compress_multiple_briefings` — сжать несколько briefings
1260
- - `get_compression_stats` — статистика сжатия
1261
-
1262
- - **Regression Detector** — обнаружение регрессий
1263
- - `save_baseline` — сохранить эталонные метрики
1264
- - `check_regression` — сравнить с baseline
1265
- - `list_regressions` — список найденных регрессий
1266
- - `resolve_regression` — отметить регрессию исправленной
1267
- - `list_baselines` — список сохранённых baseline
1268
-
1269
- ### Исправлено
1270
- - **Installer** — улучшен детект установленных IDE
1271
- - Проверка исполняемых файлов через `where`/`which`
1272
- - Проверка стандартных путей установки (Program Files, /Applications)
1273
- - Функция `isIdeInstalled()` с 3 методами проверки
1274
- - Конфиги создаются только для реально установленных IDE
1275
-
1276
- ---
1277
-
1278
- ## [0.4.2] - 2026-01-28
1279
-
1280
- ### Добавлено
1281
- - **Timeline Visualization** — визуализация хода задачи
1282
- - `generate_timeline` — создать таймлайн для задачи
1283
- - `get_timeline_visualization` — красивый ASCII таймлайн с milestone
1284
-
1285
- ---
1286
-
1287
- ## [0.4.1] - 2026-01-25
1288
-
1289
- ### Добавлено
1290
- - **Auto-Documentation** — автогенерация документации при завершении задач
1291
- - `generate_task_docs` — создать markdown с diff и summary
1292
- - `list_task_docs` — список всех документов
1293
- - `get_task_doc` — получить конкретный документ
1294
- - Хранение в `swarm/docs/` с индексом INDEX.md
1295
-
1296
- - **Agent Specialization (ML-based)** — запоминание экспертизы агентов
1297
- - `record_agent_edit` — записать какие файлы агент правил
1298
- - `suggest_agent_advanced` — рекомендовать лучшего агента для задачи
1299
- - `get_top_experts` — топ экспертов в конкретной области
1300
- - `list_all_agent_expertise` — полная карта экспертизы
1301
-
1302
- - **Conflict Prediction (ML-based)** — предсказание merge-конфликтов
1303
- - `analyze_conflict_history` — сканировать историю Git
1304
- - `get_conflict_hotspots` — файлы с наибольшим риском конфликтов
1305
- - `check_file_safety` — безопасно ли редактировать файл
1306
- - `record_conflict_event` — записать событие конфликта
1307
-
1308
- ---
1309
-
1310
- ## [0.4.0] - 2026-01-20
1311
-
1312
- ### Добавлено
1313
- - **Cloudflare Hub** — real-time WebSocket координация
1314
- - Durable Object для хранения состояния
1315
- - WebSocket broadcast между агентами
1316
- - Anti-duplication для task claims
1317
- - Hybrid mode (WS + Git fallback)
1318
-
1319
- - **Orchestrator Directory** — центр управления `/orchestrator/`
1320
- - PULSE.md — живая карта агентов
1321
- - KNOWLEDGE_BASE.md — коллективная база знаний
1322
- - briefings/ — ментальные слепки
1323
- - snapshots/ — снапшоты для отката
1324
-
1325
- ---
1326
-
1327
- ## [0.3.0] - 2026-01-15
1328
-
1329
- ### Добавлено
1330
- - **Collective Advice** — коллективный мозговой штурм
1331
- - `request_collective_advice` — запросить помощь у всех агентов
1332
- - `provide_advice` — дать совет на запрос
1333
- - `get_advice_responses` — получить все ответы
1334
-
1335
- - **Urgent Preemption** — приоритетный захват файлов
1336
- - `trigger_urgent_preemption` — экстренный приоритет для критичных багов
1337
- - Автоматическое освобождение файлов другими агентами
1338
-
1339
- - **Snapshot & Rollback** — откат изменений
1340
- - `create_snapshot` — создать снапшот перед изменениями
1341
- - `trigger_rollback` — откатить к снапшоту
1342
- - `list_snapshots` — список снапшотов
1343
-
1344
- - **Immune System** — автореакция на падение CI/тестов
1345
- - `report_ci_alert` — сообщить о CI ошибке
1346
- - `get_immune_status` — статус immune system
1347
- - Автоматическая блокировка опасных веток
1348
-
1349
- ---
1350
-
1351
- ## [0.2.0] - 2026-01-10
1352
-
1353
- ### Добавлено
1354
- - **Architecture Voting** — голосование для опасных действий
1355
- - `start_voting` — начать голосование
1356
- - `cast_vote` — проголосовать
1357
- - `list_open_votings` — открытые голосования
1358
- - `get_voting_result` — результат голосования
1359
-
1360
- - **Git Worktrees** — изолированные рабочие пространства
1361
- - `worktree_create` — создать worktree
1362
- - `worktree_list` — список worktrees
1363
- - `worktree_remove` — удалить worktree
1364
-
1365
- - **GitHub Integration** — интеграция с GitHub
1366
- - `create_github_pr` — создать Pull Request
1367
- - `sync_with_base_branch` — rebase на main
1368
- - `auto_delete_merged_branch` — удалить merged ветки
1369
- - `check_main_health` — здоровье main ветки
1370
-
1371
- - **Cross-Agent Review** — ревью между агентами
1372
- - `request_cross_agent_review` — запросить ревью
1373
- - `respond_to_review` — ответить на ревью
1374
- - `list_pending_reviews` — ожидающие ревью
1375
-
1376
- ---
1377
-
1378
- ## [0.1.0] - 2026-01-05
1379
-
1380
- ### Добавлено
1381
- - **Agent Registry** — регистрация агентов
1382
- - `agent_register` — регистрация с уникальным именем
1383
- - `agent_whoami` — информация о текущем агенте
1384
- - Генерация имён типа RadiantWolf, SilentFox
1385
-
1386
- - **Task Management** — управление задачами
1387
- - `task_create` — создать задачу
1388
- - `task_list` — список задач
1389
- - `task_assign` — назначить агенту
1390
- - `task_set_status` — изменить статус
1391
- - `task_mark_done` — отметить выполненной
1392
- - `task_cancel` — отменить
1393
- - `task_link` — связать задачи
1394
- - `decompose_task` — разбить на подзадачи
1395
-
1396
- - **File Locking** — блокировка файлов
1397
- - `file_reserve` — заблокировать файл (exclusive/shared)
1398
- - `file_release` — освободить файл
1399
- - `list_file_locks` — список блокировок
1400
- - `forecast_file_touches` — анонсировать будущие изменения
1401
- - `check_file_conflicts` — проверить конфликты
1402
-
1403
- - **Collaboration** — базовая коллаборация
1404
- - `broadcast_chat` — отправить сообщение всем
1405
- - `update_team_dashboard` — обновить статус
1406
- - `share_screenshot` — поделиться скриншотом
1407
- - `log_swarm_thought` — записать мысль
1408
-
1409
- - **Auction System** — аукцион для задач
1410
- - `announce_task_for_bidding` — объявить задачу
1411
- - `bid_for_task` — сделать ставку
1412
- - `get_auction_winner` — получить победителя
1413
-
1414
- - **Briefings** — ментальные слепки
1415
- - `save_briefing` — сохранить состояние
1416
- - `load_briefing` — загрузить состояние
1417
- - `list_briefings` — список briefings
1418
-
1419
- - **Pulse** — живая карта агентов
1420
- - `update_swarm_pulse` — обновить статус
1421
- - `get_swarm_pulse` — получить статусы всех
1422
-
1423
- - **Knowledge Base** — база знаний
1424
- - `archive_finding` — сохранить находку
1425
- - `search_knowledge` — поиск в базе
1426
-
1427
- - **Ghost Mode** — патрулирование без задач
1428
- - `patrol_mode` — проверка lint ошибок
1429
- - Автоисправление мелких проблем
1430
-
1431
- - **Stop Flag** — экстренная остановка
1432
- - `swarm_stop` — остановить всех агентов
1433
- - `swarm_resume` — возобновить работу
1434
- - `swarm_stop_status` — проверить статус
1435
-
1436
- ### Инфраструктура
1437
- - MCP Server на базе @modelcontextprotocol/sdk
1438
- - TypeScript компиляция
1439
- - Installer для IDE (Windsurf, Cursor, Claude Desktop, OpenCode, VS Code)
1440
- - Правила агента (.windsurfrules, .cursorrules, CLAUDE.md, GEMINI.md)
1441
- - Companion daemon для фоновых задач
1442
-
1443
- ---
1444
-
1445
- ## [Unreleased]
1446
-
1447
- ### В планах
1448
- - Web Dashboard для мониторинга swarm
1449
- - Unit тесты для всех workflows
1450
- - Интеграция с Jira/Linear
1451
- - Мультиязычная поддержка (i18n)
1452
- - Plugin system для расширений
1453
-
1454
- ---
1455
-
1456
- ## Semantic Versioning
1457
-
1458
- - **MAJOR (X.0.0)** — несовместимые изменения API
1459
- - **MINOR (0.X.0)** — новые фичи, обратно совместимые
1460
- - **PATCH (0.0.X)** — багфиксы, обратно совместимые
1461
-
1462
- ## Legend
1463
-
1464
- | Тип | Описание |
1465
- |-----|----------|
1466
- | **Добавлено** | Новые фичи |
1467
- | **Изменено** | Изменения в существующей функциональности |
1468
- | **Устарело** | Фичи, которые будут удалены |
1469
- | **Удалено** | Удалённые фичи |
1470
- | **Исправлено** | Багфиксы |
1471
- | **Безопасность** | Исправления уязвимостей |
1
+ > 🇷🇺 [Читать на русском](./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
+ ## [0.9.19] - 2026-02-08
13
+
14
+ ### 🚀 Major Release: Smart Routing, Memory, Agent Teams, MCP Bridges
15
+
16
+ #### Added
17
+
18
+ - **Smart Router Proxy** (`smartRouterProxy.ts`) Cost optimization engine inspired by distiq-code
19
+ - Automatic model tier downgrade (Opus Sonnet when safe)
20
+ - Semantic cache for repeated/similar requests (SHA-256 + similarity)
21
+ - Prompt caching suggestions (cache_control breakpoints for Anthropic API)
22
+ - Request classification: complexity analysis, token estimation, tier recommendation
23
+ - Real-time cost savings tracking and statistics
24
+
25
+ - **Swarm Memory** (`swarmMemory.ts`) Hybrid memory system (claude-mem + claude-cognitive)
26
+ - 3-tier Context Router: hot (current session) / warm (24h) / cold (archive)
27
+ - Pool Coordinator for multi-agent memory synchronization
28
+ - Lifecycle hooks: session_start, prompt_submit, response_ready, session_end
29
+ - 3-layer search: keyword/tag timeline full observations
30
+ - Auto-compression for older entries (context window savings)
31
+
32
+ - **MCP Linear Bridge** (`mcpLinearBridge.ts`) — Auto-sync swarm tasks ↔ Linear issues
33
+ - Status mapping: open → Todo, in_progress → In Progress, done → Done
34
+ - Task registration and bidirectional sync
35
+ - Passive activation (only when mcp-linear MCP is detected)
36
+
37
+ - **MCP Context7 Bridge** (`mcpContext7Bridge.ts`) — Up-to-date documentation integration
38
+ - Auto-detect project tech stack (React, Next.js, Express, Prisma, Supabase, Tailwind...)
39
+ - Documentation cache with configurable TTL (default 24h)
40
+ - Lookup with cache-first strategy
41
+
42
+ - **Claude-Flow Bridge** (`claudeFlowBridge.ts`) — Skills routing and RAG pipeline
43
+ - Q-learning based skill routing (epsilon-greedy exploration/exploitation)
44
+ - Skill registry with quality tracking (Q-values, success rates)
45
+ - RAG configuration for vector search → context injection
46
+
47
+ - **Agent Teams** (`agentTeams.ts`) — Multi-agent team coordination
48
+ - Team creation with roles: lead, developer, reviewer, tester, specialist
49
+ - Task delegation with dependency tracking
50
+ - Auto-rebalancing: redistribute tasks when agent goes offline
51
+ - Team-level broadcast messaging
52
+ - RAC (Retrieval Augmented Coding) search placeholder
53
+
54
+ - **Skills Discovery** (`skillsDiscovery.ts`) — IDE-agnostic skill detection
55
+ - Scans 6+ IDE formats: Gemini, Antigravity, Claude, Cursor, Codex, Windsurf
56
+ - Normalizes skills to unified format
57
+ - Task-based skill recommendation (keyword scoring)
58
+ - Cross-IDE skill import/export
59
+
60
+ ## [0.9.18] - 2026-02-08
61
+
62
+ ### 🧠 Интеграция новых AI-моделей
63
+
64
+ #### Добавлено
65
+
66
+ - **Claude Opus 4.6** — новый флагман Anthropic в MoE Router
67
+ - 1M токенов контекст (первый Opus с миллионным контекстом)
68
+ - Adaptive thinking модель сама решает когда использовать extended thinking
69
+ - Context compaction — автоматическое сжатие при приближении к лимиту
70
+ - 128K output tokens большие ответы без разбиения
71
+ - Agent Teams координация нескольких агентов через tmux
72
+ - $5/$25 per MTok (≤200K), $10/$37.50 (>200K)
73
+
74
+ - **GPT-5.3 Codex** — новый флагман OpenAI для агентного кодинга
75
+ - 256K контекст
76
+ - Оптимизирован для code_generation, debugging, reasoning
77
+ - ~$2/$15 per MTok (estimated)
78
+
79
+ - **Kimi K2.5** — premium модель Moonshot AI
80
+ - 128K контекст, фокус на code_generation, code_review, debugging
81
+ - ~$1/$5 per MTok (estimated)
82
+
83
+ #### Изменено
84
+
85
+ - `ModelProvider` расширен на `"moonshot"` (Kimi/Moonshot AI)
86
+ - Claude Opus 4.5 понижен с `flagship` → `premium` (заменён Opus 4.6)
87
+ - MoE Router: **19 моделей** (было 16) — 4 Anthropic, 9 OpenAI, 5 Google, 1 Moonshot
88
+
89
+ ---
90
+
91
+ ## [0.9.17] - 2026-02-08
92
+
93
+ ### 🏗️ Smart Tools Modularization
94
+
95
+ #### Changed
96
+
97
+ - **`src/smartTools.ts`** split into **9 modules** in `src/smartTools/`:
98
+ - `core.ts` swarm_agent, swarm_control, swarm_pulse, swarm_companion
99
+ - `tasks.ts` swarm_task, swarm_plan, swarm_briefing, swarm_spec
100
+ - `files.ts` — swarm_file, swarm_worktree, swarm_snapshot
101
+ - `git.ts` swarm_git, swarm_hooks, swarm_dependency
102
+ - `collaboration.ts`swarm_chat, swarm_message, swarm_review, swarm_voting, swarm_auction, swarm_brainstorm
103
+ - `security.ts`swarm_defence, swarm_consensus, swarm_mcp
104
+ - `analytics.ts`swarm_cost, swarm_quality, swarm_regression, swarm_session
105
+ - `intelligence.ts`swarm_sona, swarm_moe, swarm_vector, swarm_booster, swarm_context_pool, swarm_context
106
+ - `infra.ts`swarm_health, swarm_immune, swarm_external, swarm_platform, swarm_knowledge, etc.
107
+ - **`src/smartTools/index.ts`** — centralized re-export of all modules
108
+ - **`src/serverSmart.ts`** — updated to import from `smartTools/index.js`
109
+
110
+ ### 🔒 Cloudflare Workers with Authentication
111
+
112
+ #### Added
113
+
114
+ - **`cloudflare/abdr-hub/`** — new Cloudflare Worker `abdr-swarm-hub`
115
+ - Bearer Token + Query parameter authentication
116
+ - WebSocket bridge for agents
117
+ - REST API for swarm management
118
+ - **`cloudflare/abdr-server/`**new Cloudflare Worker `abdr-swarm-server`
119
+ - Streamable HTTP Transport (MCP spec 2025-03-26)
120
+ - All 54 Smart Tools
121
+ - Automatic Bearer Token forwarding to Hub
122
+ - **`cloudflare/telegram-bot/`** renamed to `abdr-swarm-telegram`
123
+ - `SWARM_AUTH_TOKEN` protection for `/register` endpoint
124
+ - Bearer Token for Hub API calls
125
+
126
+ ### 🔄 CI/CD Pipeline
127
+
128
+ #### Changed
129
+
130
+ - **`.github/workflows/ci.yml`** improvements:
131
+ - Triggers for `main` and `develop` branches
132
+ - TypeScript check (`tsc --noEmit`) before build
133
+ - Node.js matrix: 18, 20, 22
134
+ - Automatic npm publish on push to `main`
135
+
136
+ ### 🗑️ Legacy Code Removed
137
+
138
+ #### Removed
139
+
140
+ - **`src/tools.ts`** — old 41 tools (replaced by `smartTools/`)
141
+ - **`src/server.ts`** — old server (replaced by `serverSmart.ts`)
142
+
143
+ ### 📊 Dashboard
144
+
145
+ #### Changed
146
+
147
+ - Updated version in footer: v0.9.12 → v0.9.17
148
+
149
+ ### 📦 Updates
150
+
151
+ - `package.json` version `0.9.17`
152
+
153
+ ### 🔄 How to Update
154
+
155
+ ```bash
156
+ npm install -g mcp-swarm@latest
157
+ # or
158
+ npm update mcp-swarm
159
+ ```
160
+
161
+ ---
162
+
163
+ ## [0.9.16] - 2026-02-08
164
+
165
+ ### 🐛 Critical Fix: Zod Compatibility
166
+
167
+ **BREAKING FIX:** Fixed `keyValidator._parse is not a function` error that made all 54 Smart Tools completely non-functional in Antigravity and similar clients.
168
+
169
+ #### Root Cause
170
+ - `zod@^3.23.8` in `package.json` auto-installed `3.25.76` — essentially a Zod v4 bridge version
171
+ - Zod v4 removed the internal `_parse()` method used by clients for JSON Schema validation
172
+ - Result: **no Smart Tool worked** due to input schema parsing errors
173
+
174
+ #### Fix
175
+ - `zod` pinned to exact version `3.23.8` (pure Zod v3, no v4 bridge)
176
+ - Prevents automatic upgrades to incompatible versions
177
+
178
+ > 🙏 We apologize for the inconvenience. This bug affected all users who updated via npm.
179
+
180
+ ### 🔒 Security: Cloudflare Workers
181
+
182
+ - Removed deployed workers `mcp-swarm-hub` and `mcp-swarm-server` (URLs were exposed in commits)
183
+ - Worker sources **preserved** in `cloudflare/` will be redeployed with new names
184
+
185
+ ### 📦 Updates
186
+
187
+ - `serverSmart.ts` dynamic version from `package.json` instead of hardcode
188
+ - `server.ts` marked as deprecated (`@ts-nocheck`), use `serverSmart.ts`
189
+ - `.gitignore` added patterns for test files
190
+
191
+ ### 🔄 How to Update
192
+
193
+ ```bash
194
+ npm install -g mcp-swarm@latest
195
+ # or
196
+ npm update mcp-swarm
197
+ ```
198
+
199
+ ---
200
+
201
+ ## [0.9.15] - 2026-02-08
202
+
203
+ ### 📖 Bilingual Documentation
204
+
205
+ #### Changed
206
+
207
+ - **`README.md`** fully translated to **English** (~1100 lines)
208
+ - Professional translation of all sections: tools, installation, configuration, architecture
209
+ - Added link to Russian version: `🇷🇺 Читать на русском`
210
+ - **`package.json`** description updated to English
211
+ - **Version updated in heading** — v0.9.15
212
+
213
+ #### Added
214
+
215
+ - **`README.ru.md`** Russian version of README created
216
+ - Full original README content in Russian
217
+ - Link to English version: `🇬🇧 Read in English`
218
+
219
+ ---
220
+
221
+ ## [0.9.14] - 2026-02-08
222
+
223
+ ### 🐛 npx Command Fix
224
+
225
+ #### Fixed
226
+
227
+ - **`README.md`** fixed `npx mcp-swarm-remote` commands:
228
+ - Before: `npx mcp-swarm-remote --url ...` (E404 error, package not found)
229
+ - After: `npx -y -p mcp-swarm mcp-swarm-remote --url ...`
230
+ - **`REMOTE.md`** same fix applied to all IDE configuration examples
231
+ - **Version updated** v0.9.14
232
+
233
+ #### Root Cause
234
+
235
+ - `npx mcp-swarm-remote` tried to find a **separate** package `mcp-swarm-remote` on npm
236
+ - `mcp-swarm-remote` is a binary within the `mcp-swarm` package, so the `-p mcp-swarm` flag is required
237
+
238
+ ---
239
+
240
+ ## [0.9.13] - 2026-02-05
241
+
242
+ ### Self-Hosted Infrastructure
243
+
244
+ **BREAKING CHANGE:** Removed hardcoded public server URLs. Users must now deploy their own Cloudflare Workers.
245
+
246
+ #### Changed
247
+
248
+ - **README.md** — Complete rewrite of installation section
249
+ - Added Cloudflare Free Tier explanation and limits
250
+ - Step-by-step deployment guide for Hub, MCP Server, Telegram Bot
251
+ - Explained what YOUR-SUBDOMAIN means
252
+
253
+ - **wrangler.toml files** — All 3 Workers now have placeholders
254
+ - `cloudflare/hub/wrangler.toml` — Added deployment instructions
255
+ - `cloudflare/mcp-server/wrangler.toml` — HUB_URL placeholder
256
+ - `cloudflare/telegram-bot/wrangler.toml` — SWARM_HUB_URL placeholder
257
+
258
+ - **install.ps1 / install.sh** — Now ask for user's server URLs
259
+ - No more hardcoded URLs
260
+ - Instructions for deploying first
261
+
262
+ - **mcp-swarm-remote** `--url` is now **required**
263
+ - Shows helpful error message with deployment link
264
+ - Added `--help` option
265
+
266
+ - **Dashboard** — `.env.example` uses placeholder
267
+ - `useWebSocket.ts` warns if HUB_URL not configured
268
+
269
+ - **Agent rules** (AGENTS.md, CLAUDE.md, GEMINI.md, AGENT.md)
270
+ - Updated with YOUR-SUBDOMAIN placeholders
271
+
272
+ #### Why This Change?
273
+
274
+ - **Privacy**: Your data stays on your infrastructure
275
+ - **No shared limits**: Full Cloudflare Free Tier for yourself
276
+ - **Customization**: Modify Workers as needed
277
+ - **Transparency**: No hidden public server
278
+
279
+ ---
280
+
281
+ ## [0.9.12] - 2026-02-05
282
+
283
+ ### Dashboard Real-time Updates
284
+
285
+ #### Added
286
+
287
+ - **WebSocket Hook** (`dashboard/src/hooks/useWebSocket.ts`)
288
+ - Real-time connection to Swarm Hub
289
+ - Auto-reconnect with exponential backoff
290
+ - Keep-alive ping every 25 seconds
291
+ - Event filtering for specific event types
292
+
293
+ - **New Core Widgets** (`dashboard/src/components/widgets/CoreWidgets.tsx`)
294
+ - **ConnectionStatusWidget** Shows Hub connection status with reconnect button
295
+ - **ActivityTimelineWidget** Real-time event stream from Hub
296
+ - **FileLocksWidget** Active file reservations with live updates
297
+ - **CostTrackingWidget** API usage and budget progress bars
298
+ - **VotingWidget** Distributed consensus proposals and votes
299
+
300
+ - **Live Indicators**
301
+ - Green pulsing dot for connected/active status
302
+ - LIVE/OFFLINE badges for real-time widgets
303
+ - Last update timestamps with relative time format
304
+
305
+ ### Telegram Bot Enhancements
306
+
307
+ #### Added
308
+
309
+ - **New Commands**
310
+ - `/reviews` List pending code reviews with inline approve/reject buttons
311
+ - `/approve [id]` Approve a review directly from Telegram
312
+ - `/reject [id] [reason]` Reject a review with optional reason
313
+
314
+ - **Enhanced Inline Keyboards**
315
+ - Reviews list shows approve/reject buttons for each pending review
316
+ - Help menu now includes Reviews button
317
+
318
+ ### Auto-start Companion
319
+
320
+ #### Added
321
+
322
+ - **Companion Auto-start** in `mcp-swarm-remote`
323
+ - Checks if companion daemon is running on port 37373
324
+ - Automatically spawns companion in background if not running
325
+ - Can be disabled with `--no-companion` flag
326
+
327
+ #### Changed
328
+
329
+ - Dashboard now uses WebSocket for real-time updates instead of polling-only
330
+ - Added "Real-time Monitoring" section with new widgets
331
+ - Updated version to 0.9.12 in footer
332
+
333
+ ---
334
+
335
+ ## [0.9.11] - 2026-02-04
336
+
337
+ ### One-Click Installer & Streamable HTTP
338
+
339
+ #### Added
340
+
341
+ - **One-Click Install Scripts**
342
+ - `install.ps1` — PowerShell installer for Windows
343
+ - `install.sh` — Bash installer for macOS/Linux
344
+ - `npx mcp-swarm-install` — Interactive Node.js installer
345
+
346
+ - **Streamable HTTP Transport** (MCP spec 2025-03-26)
347
+ - Single `POST /mcp` endpoint instead of SSE
348
+ - Session management via `Mcp-Session-Id` header
349
+ - Works on Cloudflare Workers without SSE issues
350
+
351
+ - **mcp-swarm-remote Proxy** (`src/remote/index.ts`)
352
+ - stdio Streamable HTTP proxy for IDE integration
353
+ - Windows stdin compatibility fix
354
+
355
+ #### Changed
356
+
357
+ - Installer now **merges** configs instead of overwriting
358
+ - Auto-detects IDE installations (Claude Desktop, Cursor, Windsurf, OpenCode, VS Code)
359
+
360
+ ---
361
+
362
+ ## [0.9.10] - 2026-02-03
363
+
364
+ ### 🧠 MoE Router — Mixture of Experts Model Selection
365
+
366
+ #### Added
367
+
368
+ - **MoE Router Module** (`src/workflows/moeRouter.ts`)
369
+ - Intelligent model routing based on task characteristics
370
+ - Gating network for expert selection
371
+ - Cost-performance optimization
372
+ - Learning from feedback
373
+
374
+ - **Expert Classification**
375
+ - 14 task categories: code_generation, code_review, debugging, reasoning, math, creative, etc.
376
+ - 4 model tiers: economy, standard, premium, flagship
377
+ - 6 providers: anthropic, openai, google, mistral, local, custom
378
+
379
+ - **Built-in Experts (19 models, verified pricing February 2026)**
380
+ - **Anthropic Claude Series:**
381
+ - Claude Opus 4.6 (flagship, 1M, $5/$25 MTok) ← NEW
382
+ - Claude Opus 4.5 (flagship, 200K, $5/$25 MTok)
383
+ - Claude Sonnet 4.5 (premium, 200K, $3/$15 MTok)
384
+ - Claude Haiku 4.5 (economy, 200K, $1/$5 MTok)
385
+ - **OpenAI GPT-5.x Series:**
386
+ - GPT-5.3 Codex (flagship, 256K, ~$2/~$15 MTok) ← NEW
387
+ - GPT-5.2 (flagship, 256K, $1.75/$14 MTok)
388
+ - GPT-5.2 Pro (flagship, 256K, $21/$168 MTok)
389
+ - GPT-5 Mini (standard, 128K, $0.25/$2 MTok)
390
+ - GPT-4.1 (premium, 128K, $3/$12 MTok)
391
+ - GPT-4.1 Mini (standard, 128K, $0.80/$3.20 MTok)
392
+ - GPT-4.1 Nano (economy, 128K, $0.20/$0.80 MTok)
393
+ - **OpenAI Reasoning Models:**
394
+ - o4-mini (reasoning, 128K, $4/$16 MTok)
395
+ - **Moonshot AI:**
396
+ - Kimi K2.5 (premium, 128K, ~$1/~$5 MTok) ← NEW
397
+ - **Google Gemini 3.x Series:**
398
+ - Gemini 3 Pro (flagship, 1M, $2/$12 MTok)
399
+ - Gemini 3 Flash (standard, 1M, $0.50/$3 MTok)
400
+ - **Google Gemini 2.5 Series:**
401
+ - Gemini 2.5 Pro (premium, 1M, $1.25/$10 MTok)
402
+ - Gemini 2.5 Flash (standard, 1M, $0.30/$2.50 MTok)
403
+ - Gemini 2.5 Flash Lite (economy, 1M, $0.10/$0.40 MTok)
404
+
405
+ - **Routing Factors**
406
+ - Task match score (category-specific strength)
407
+ - Cost efficiency
408
+ - Performance history (success rate)
409
+ - Load balancing (prefer less recently used)
410
+ - Latency constraints
411
+ - Context window requirements
412
+
413
+ - **Learning System**
414
+ - Feedback recording
415
+ - Exponential moving average for success rate
416
+ - Automatic latency calibration
417
+ - Per-expert statistics
418
+
419
+ - **Smart Tool #54: `swarm_moe`**
420
+ - `route`: Route task to best expert
421
+ - `feedback`: Record routing feedback
422
+ - `experts`: List available experts
423
+ - `add_expert` / `remove_expert`: Manage experts
424
+ - `config` / `set_config`: Configuration
425
+ - `stats`: Routing statistics
426
+ - `history`: Routing history
427
+ - `classify`: Classify task category
428
+ - `reset`: Reset statistics
429
+
430
+ - **Dashboard API Endpoint** (`/api/moe`)
431
+ - Routing statistics
432
+ - Expert list and usage
433
+ - Configuration status
434
+
435
+ ---
436
+
437
+ ## [0.9.9] - 2026-02-03
438
+
439
+ ### 🤝 Consensus — Distributed Agreement Protocols
440
+
441
+ #### Added
442
+
443
+ - **Consensus Module** (`src/workflows/consensus.ts`)
444
+ - Raft-like leader election with term-based leadership
445
+ - Log replication for ordered command execution
446
+ - Byzantine Fault Tolerance (BFT) mode for untrusted environments
447
+ - Proposal system with configurable voting thresholds
448
+ - Automatic failover when leader becomes unresponsive
449
+
450
+ - **Consensus Modes**
451
+ - `simple_majority`: 50%+ votes for approval
452
+ - `raft`: Term-based leadership, log replication
453
+ - `bft`: Byzantine fault tolerant (2/3+1 quorum)
454
+
455
+ - **Node Management**
456
+ - Join/leave cluster
457
+ - Heartbeat monitoring
458
+ - Trusted/untrusted node classification
459
+ - Automatic dead node detection
460
+
461
+ - **Proposal System**
462
+ - Types: config_change, task_assignment, architecture, rollback, emergency, custom
463
+ - Vote types: approve, reject, abstain
464
+ - Configurable majority thresholds (0.5 to 1.0)
465
+ - Expiration timeout handling
466
+ - Signature verification for BFT mode
467
+
468
+ - **Log Replication**
469
+ - Ordered command log
470
+ - Commit confirmation from leader
471
+ - State machine replication across nodes
472
+
473
+ - **Smart Tool #53: `swarm_consensus`**
474
+ - `join`: Join consensus cluster
475
+ - `leave`: Leave cluster
476
+ - `heartbeat`: Send heartbeat
477
+ - `status`: Get cluster status
478
+ - `elect`: Start leader election
479
+ - `leader`: Get current leader
480
+ - `propose`: Create proposal
481
+ - `vote`: Vote on proposal
482
+ - `proposals`: List proposals
483
+ - `get_proposal`: Get proposal details
484
+ - `execute`: Execute approved proposal
485
+ - `log` / `append` / `commit`: Log management
486
+ - `config` / `set_config`: Configuration
487
+ - `stats`: Statistics
488
+
489
+ - **Dashboard API Endpoint** (`/api/consensus`)
490
+ - Cluster status and node list
491
+ - Leader information
492
+ - Proposal statistics
493
+ - Recent proposals
494
+
495
+ ---
496
+
497
+ ## [0.9.8] - 2026-02-03
498
+
499
+ ### 🛡️ AIDefence — Security & Threat Detection
500
+
501
+ #### Added
502
+
503
+ - **AIDefence Module** (`src/workflows/aiDefence.ts`)
504
+ - <10ms threat detection latency
505
+ - Pattern-based detection with regex + heuristics
506
+ - Behavioral anomaly detection
507
+ - Quarantine system for suspicious content
508
+ - Audit logging for security events
509
+ - Configurable sensitivity levels
510
+
511
+ - **Threat Categories**
512
+ - `prompt_injection`: Instruction override, role hijacking, delimiter attacks
513
+ - `jailbreak`: DAN mode, hypothetical bypasses, character hijacking
514
+ - `code_injection`: Shell commands, eval, SQL injection, path traversal
515
+ - `data_exfiltration`: API keys, credentials, external uploads
516
+ - `sensitive_data`: PII, private keys, passwords
517
+ - `unsafe_command`: rm -rf, sudo, crypto mining
518
+ - `social_engineering`: Authority claims, urgency manipulation
519
+ - `impersonation`: Agent identity spoofing
520
+ - `dos_attack`: Request flooding
521
+ - `unauthorized_tool`: Restricted tool access
522
+
523
+ - **Sensitivity Levels**
524
+ - `low`: Only critical threats
525
+ - `medium`: Balanced (default)
526
+ - `high`: Strict checking
527
+ - `paranoid`: Maximum security
528
+
529
+ - **Smart Tool #52: `swarm_defence`**
530
+ - `scan`: Scan text for threats
531
+ - `validate_agent`: Validate agent identity
532
+ - `validate_tool`: Validate tool usage
533
+ - `events`: Get security events log
534
+ - `quarantine`: Get quarantined items
535
+ - `release`: Release from quarantine
536
+ - `stats`: Get defence statistics
537
+ - `config` / `set_config`: Configuration
538
+ - `trust` / `untrust`: Agent whitelist management
539
+ - `clear_events`: Clear event log
540
+
541
+ - **Dashboard API Endpoint** (`/api/defence`)
542
+ - Security statistics
543
+ - Threat distribution by category/severity
544
+ - Quarantine status
545
+ - Recent events log
546
+
547
+ ---
548
+
549
+ ## [0.9.7] - 2026-02-03
550
+
551
+ ### 🔍 HNSW — Hierarchical Navigable Small World
552
+
553
+ #### Added
554
+
555
+ - **HNSW Module** (`src/workflows/hnsw.ts`)
556
+ - Fast approximate nearest neighbor search
557
+ - 150x-12,500x faster than brute force
558
+ - Pure TypeScript implementation (no dependencies)
559
+ - Based on Malkov & Yashunin (2016) algorithm
560
+
561
+ - **Vector Operations**
562
+ - Cosine similarity (default)
563
+ - Euclidean distance
564
+ - Dot product
565
+ - Configurable dimensions (384, 768, 1536)
566
+
567
+ - **Simple Embeddings**
568
+ - Built-in bag-of-words embedder for demos
569
+ - Works without external API
570
+ - Can use custom vectors from OpenAI/Cohere/etc.
571
+
572
+ - **Smart Tool #51: `swarm_vector`**
573
+ - `init`: Initialize vector index
574
+ - `add`: Add document with text or vector
575
+ - `add_batch`: Add multiple documents
576
+ - `search`: Find similar documents
577
+ - `get`: Get document by ID
578
+ - `delete`: Remove document
579
+ - `list`: List all documents
580
+ - `stats`: Index statistics
581
+ - `config` / `set_config`: Configuration
582
+ - `clear`: Clear entire index
583
+ - `duplicates`: Find duplicate documents
584
+ - `embed`: Get embedding for text
585
+
586
+ - **Dashboard API Endpoint** (`/api/vector`)
587
+ - Index statistics
588
+ - Configuration status
589
+ - Memory usage tracking
590
+
591
+ #### Performance
592
+
593
+ | Documents | Brute Force | HNSW | Speedup |
594
+ |-----------|-------------|------|---------|
595
+ | 1,000 | 10ms | 0.5ms | 20x |
596
+ | 10,000 | 100ms | 0.8ms | 125x |
597
+ | 100,000 | 1,000ms | 1.2ms | 833x |
598
+ | 1,000,000 | 10,000ms | 2ms | 5,000x |
599
+
600
+ ---
601
+
602
+ ## [0.9.6] - 2026-02-03
603
+
604
+ ### ⚡ Agent Booster — Fast Local Execution
605
+
606
+ #### Added
607
+
608
+ - **Agent Booster Module** (`src/workflows/agentBooster.ts`)
609
+ - Executes trivial tasks locally without LLM API calls
610
+ - 352x faster than LLM (local execution)
611
+ - $0 cost (no API calls needed)
612
+ - Works offline
613
+ - Deterministic results
614
+
615
+ - **Supported Task Types** (14 types)
616
+ - `rename_variable` — Rename variables/functions across file
617
+ - `fix_typo` — Fix typos in strings and comments only
618
+ - `find_replace` — Simple find and replace
619
+ - `add_console_log` — Add debug logging at specific line
620
+ - `remove_console_log` — Remove all console.log statements
621
+ - `toggle_flag` — Toggle boolean flags (true ↔ false)
622
+ - `update_version` — Update version numbers
623
+ - `update_import` — Update import paths
624
+ - `add_comment` — Add comment at specific line
625
+ - `remove_comment` Remove single-line comments
626
+ - `format_json` — Format JSON files
627
+ - `sort_imports` Sort imports alphabetically
628
+ - `add_export` — Add export to function/class
629
+ - `extract_constant` — Extract magic number to constant
630
+
631
+ - **Smart Detection**
632
+ - `can_boost` action analyzes task description
633
+ - Auto-detects boostable tasks with confidence score
634
+ - Extracts parameters from natural language
635
+
636
+ - **Smart Tool #50: `swarm_booster`**
637
+ - `execute`: Run a booster task
638
+ - `can_boost`: Check if task can be boosted
639
+ - `stats`: Get booster statistics
640
+ - `history`: Get execution history
641
+ - `config`: Get configuration
642
+ - `set_config`: Update configuration
643
+ - `types`: List supported task types
644
+
645
+ - **Dashboard API Endpoint** (`/api/booster`)
646
+ - Booster statistics and type distribution
647
+ - Recent execution history
648
+ - Configuration status
649
+ - Cost savings tracking
650
+
651
+ #### Performance
652
+
653
+ | Metric | LLM | Agent Booster | Improvement |
654
+ |--------|-----|---------------|-------------|
655
+ | Speed | ~3000ms | ~8ms | 352x faster |
656
+ | Cost | $0.01/task | $0 | 100% savings |
657
+ | Offline | | | Works anywhere |
658
+ | Deterministic | ⚠️ | ✅ | Same input = same output |
659
+
660
+ ---
661
+
662
+ ## [0.9.5] - 2026-02-03
663
+
664
+ ### 🧠 SONA — Self-Optimizing Neural Architecture
665
+
666
+ #### Added
667
+
668
+ - **SONA Module** (`src/workflows/sona.ts`)
669
+ - Self-learning task routing system inspired by Claude-Flow
670
+ - Records which agents perform best for each task type
671
+ - Routes new tasks to best-performing agents
672
+ - Learns from outcomes with <0.05ms adaptation
673
+ - Improves over time with reinforcement learning
674
+
675
+ - **Task Classification**
676
+ - Automatic category detection: frontend_ui, backend_api, database, testing, devops, documentation, refactoring, bugfix, feature, security, performance, infrastructure
677
+ - Complexity estimation: trivial, simple, medium, complex, epic
678
+ - Keyword-based pattern matching
679
+ - Affected path analysis
680
+
681
+ - **Agent Performance Tracking**
682
+ - Success rate tracking per category
683
+ - Quality score averaging
684
+ - Completion time tracking
685
+ - Statistical confidence calculation
686
+ - Specialization detection (top 3 categories per agent)
687
+
688
+ - **Online Learning**
689
+ - Exponential moving average for rolling metrics
690
+ - Configurable learning rate and decay
691
+ - Elastic Weight Consolidation (EWC++) to prevent forgetting
692
+ - Exploration/exploitation balance (10% exploration by default)
693
+
694
+ - **Smart Tool #49: `swarm_sona`**
695
+ - `route`: Get routing recommendation for a task
696
+ - `learn`: Record task outcome and update model
697
+ - `classify`: Classify a task (category, complexity)
698
+ - `profile`: Get agent's performance profile
699
+ - `profiles`: Get all agent profiles
700
+ - `specialists`: Get top agents for a category
701
+ - `history`: Get learning history
702
+ - `stats`: Get SONA statistics
703
+ - `config`: Get configuration
704
+ - `set_config`: Update configuration
705
+ - `reset`: Reset the model
706
+
707
+ - **Dashboard API Endpoint** (`/api/sona`)
708
+ - SONA statistics and agent profiles
709
+ - Category distribution
710
+ - Recent learning events
711
+ - Top performing agents
712
+
713
+ ---
714
+
715
+ ## [0.9.4] - 2026-02-03
716
+
717
+ ### 📱 Telegram Bot Integration
718
+
719
+ #### Added
720
+
721
+ - **Telegram Bot** (`src/integrations/telegram.ts`)
722
+ - Full-featured Telegram bot for notifications and control
723
+ - Event notifications: task created/completed/failed, agent joined/died, CI errors
724
+ - Commands: `/status`, `/agents`, `/tasks`, `/create_task`, `/stop`, `/resume`, `/config`
725
+ - Interactive inline buttons for quick actions
726
+ - Priority setting via buttons (Critical, High, Medium)
727
+ - Approve/Reject/Comment on reviews via Telegram
728
+ - Vote on architecture decisions via Telegram
729
+
730
+ - **Smart Tool #47: `swarm_telegram`**
731
+ - Actions: `setup`, `config`, `enable`, `disable`, `send`
732
+ - Notifications: `notify_task_created`, `notify_task_completed`, `notify_task_failed`, `notify_agent_joined`, `notify_agent_died`
733
+ - Bot control: `start_polling`, `stop_polling`, `command`
734
+
735
+ - **Dashboard API Endpoint** (`/api/telegram`)
736
+ - Telegram configuration status
737
+ - Setup instructions if not configured
738
+
739
+ - **Cloudflare Worker for Telegram** (`cloudflare/telegram-bot/`)
740
+ - Webhook-based (no polling required)
741
+ - Deploy to Cloudflare Workers
742
+ - `/setup` endpoint for webhook registration
743
+
744
+ - **Smart Tool #48: `swarm_batch`**
745
+ - Request batching for 50% cost savings
746
+ - Supports Anthropic Message Batches API
747
+ - Supports OpenAI Batch API
748
+ - Actions: `queue`, `config`, `set_config`, `job`, `jobs`, `result`, `stats`, `flush`
749
+
750
+ - **Batching Module** (`src/workflows/batching.ts`)
751
+ - Automatic request grouping
752
+ - Configurable batch size and wait time
753
+ - Async batch processing with result polling
754
+ - Cost savings estimation
755
+
756
+ ---
757
+
758
+ ## [0.9.3] - 2026-02-03
759
+
760
+ ### 🧠 Smart Features & Cost Optimization
761
+
762
+ #### Added
763
+
764
+ - **Smart Task Routing** (`src/workflows/smartRouting.ts`)
765
+ - Automatic task assignment based on file expertise
766
+ - Tracks which agent edited which files
767
+ - Calculates expertise scores (exact match 10x, folder 3x, extension 2x)
768
+
769
+ - **Shared Context Pool** (`src/workflows/contextPool.ts`)
770
+ - Agents share notes about code to avoid re-reading
771
+ - Auto-staleness detection (if file hash changed)
772
+ - Tags, categories, and helpful counter
773
+
774
+ - **Auto Code Review** (`src/workflows/autoReview.ts`)
775
+ - Automatic review assignment when task completes
776
+ - Finds reviewer who knows the affected files
777
+ - Comment severity levels (critical, major, minor, suggestion)
778
+
779
+ - **GitHub/Linear Sync** (`src/workflows/externalSync.ts`)
780
+ - Two-way sync with GitHub Issues
781
+ - Linear.app integration (GraphQL API)
782
+ - Auto-import issues as swarm tasks
783
+ - Auto-close issues when task is done
784
+
785
+ - **Cost Optimization** (`src/workflows/costOptimization.ts`)
786
+ - Task complexity analysis (simple/medium/complex)
787
+ - Smart model routing (cheap/standard/premium tiers)
788
+ - Budget management with daily/weekly/monthly limits
789
+ - Alert thresholds (50%, 80%, 95%)
790
+
791
+ - **Background Heartbeat Worker** (`src/workers/`)
792
+ - Uses Node.js `worker_threads` for continuous heartbeat
793
+ - Works even when agent is "thinking"
794
+
795
+ - **Web Dashboard** (`dashboard/`)
796
+ - Real-time agent status monitoring
797
+ - Orchestrator status banner with glow effects
798
+ - Stats cards (agents, tasks, messages, uptime)
799
+ - Task list with priority indicators
800
+ - Built with Next.js + ShadCN UI
801
+
802
+ - **Dashboard API** (`src/dashboardApi.ts`)
803
+ - HTTP API server on port 3334
804
+ - New v0.9.3 endpoints: `/api/expertise`, `/api/context`, `/api/reviews`, `/api/budget`, `/api/sync`
805
+
806
+ #### Smart Tools (42-46)
807
+
808
+ | # | Tool | Actions | Description |
809
+ |---|------|---------|-------------|
810
+ | 42 | `swarm_routing` | record, find_agent, expertise, predict, auto_assign | Smart task routing based on file expertise |
811
+ | 43 | `swarm_context_pool` | add, get, search_tag, search, helpful, update, cleanup, stats | Shared context notes between agents |
812
+ | 44 | `swarm_autoreview` | create, assign, comment, complete, resolve, for_reviewer, for_author, pending, stats | Automatic code review assignment |
813
+ | 45 | `swarm_external` | enable_github, enable_linear, sync_github, sync_linear, sync_all, export_github, export_linear, status, create_issue, close_issue, comment | GitHub/Linear sync |
814
+ | 46 | `swarm_budget` | analyze, models, select, recommend, route, log_usage, usage, stats, config, set_config, check, remaining, report | Cost optimization and model routing |
815
+
816
+ ---
817
+
818
+ ## [0.9.1] - 2026-02-02
819
+
820
+ ### 📚 Documentation & UX Improvements
821
+
822
+ #### Added
823
+ - **Linux Installation Instructions** — full instructions for Linux
824
+ - **IDE-Specific Configs** separate configurations for:
825
+ - Claude Desktop (Windows/macOS/Linux)
826
+ - Cursor, Windsurf, OpenCode CLI, VS Code + Copilot/Continue
827
+ - **Troubleshooting Section** solutions for common issues:
828
+ - "Cannot find module" errors
829
+ - Agent not becoming orchestrator
830
+ - "repoPath is required" error
831
+ - Cloudflare Hub unavailable
832
+ - Files locked by another agent
833
+ - **Architecture Diagram** ASCII diagram of Cloudflare Hub + Local Agents
834
+ - **Contributing Guidelines** — rules for PRs
835
+
836
+ #### Changed
837
+ - README.md completely reworked with collapsible sections (`<details>`)
838
+
839
+ ---
840
+
841
+ ## [0.9.0] - 2026-02-02
842
+
843
+ ### 🚀 MAJOR: Smart Tools Consolidation
844
+
845
+ **Reduces 168+ individual tools → 41 Smart Tools with `action` parameter**
846
+
847
+ #### Added
848
+
849
+ - **Smart Tools System** — 41 unified tools replacing 168+ individual tools
850
+ - Each Smart Tool groups 3-15 related functions via `action` parameter
851
+ - Better discoverability and easier to remember
852
+ - Consistent parameter patterns across all tools
853
+
854
+ #### Smart Tools List (41 tools)
855
+
856
+ | # | Tool Name | Actions | Description |
857
+ |---|-----------|---------|-------------|
858
+ | 1 | `swarm_agent` | register, whoami | Agent identity |
859
+ | 2 | `swarm_task` | create, list, update, decompose, get_decomposition | Task management |
860
+ | 3 | `swarm_file` | reserve, release, list, forecast, conflicts, safety | File locking |
861
+ | 4 | `swarm_git` | sync, pr, health, cleanup, cleanup_all | Git operations |
862
+ | 5 | `swarm_worktree` | create, list, remove | Git worktrees |
863
+ | 6 | `swarm_companion` | status, stop, pause, resume | Companion daemon |
864
+ | 7 | `swarm_control` | stop, resume, status | Swarm control |
865
+ | 8 | `swarm_chat` | broadcast, dashboard, thought, thoughts | Team chat |
866
+ | 9 | `swarm_review` | request, respond, list | Code review |
867
+ | 10 | `swarm_voting` | start, vote, list, get | Voting system |
868
+ | 11 | `swarm_auction` | announce, bid, poll | Task auction |
869
+ | 12 | `swarm_mcp` | scan, authorize, policy | MCP scanning |
870
+ | 13 | `swarm_orchestrator` | elect, info, heartbeat, resign, executors, executor_heartbeat | Orchestrator |
871
+ | 14 | `swarm_message` | send, inbox, ack, reply, search, thread | Messaging |
872
+ | 15 | `swarm_briefing` | save, load | Briefings |
873
+ | 16 | `swarm_pulse` | update, get | Real-time status |
874
+ | 17 | `swarm_knowledge` | archive, search | Knowledge base |
875
+ | 18 | `swarm_snapshot` | create, rollback, list | Snapshots |
876
+ | 19 | `swarm_health` | check, dead, reassign, summary | Agent health |
877
+ | 20 | `swarm_quality` | run, report, threshold, pr_ready | Quality gate |
878
+ | 21 | `swarm_cost` | log, agent, project, limit, remaining | Cost tracking |
879
+ | 22-41 | ... | ... | Brainstorming, Plans, Debug, Spec, QA, Hooks, etc. |
880
+
881
+ ### Backward Compatibility
882
+
883
+ - Legacy 168+ tools server available via `npm run dev:legacy`
884
+ - Smart Tools server via `npm run dev` (default)
885
+
886
+ ---
887
+
888
+ ## [0.8.1] - 2026-02-02
889
+
890
+ ### Added
891
+ - **Smart Tools Draft** — prototype of consolidating 168+ tools into 41 Smart Tools
892
+ - Files `smartTools.ts.draft` and `serverSmart.ts.draft`
893
+ - Each Smart Tool combines 3-15 similar tools via `action` parameter
894
+
895
+ ---
896
+
897
+ ## [0.8.0] - 2026-02-02
898
+
899
+ ### Added
900
+ - **Orchestrator Election** (6 tools) — first agent becomes orchestrator
901
+ - `orchestrator_elect`, `orchestrator_info`, `orchestrator_heartbeat`, `orchestrator_resign`
902
+ - `executor_list`, `executor_heartbeat`
903
+
904
+ - **Agent Messaging** (6 tools) full inter-agent messaging system
905
+ - `agent_message_send`, `agent_inbox_fetch`, `agent_message_ack`
906
+ - `agent_message_reply`, `agent_message_search`, `agent_thread_get`
907
+
908
+ - **Infinite Loop Mode** orchestrator runs continuously
909
+ - Companion daemon with automatic orchestrator election
910
+ - Orchestrator does NOT stop via API — only by user
911
+ - Executors register with orchestrator
912
+ - Heartbeat system for liveness monitoring
913
+
914
+ ---
915
+
916
+ ## [0.7.0] - 2026-02-02
917
+
918
+ ### Added
919
+ - **Spec Pipeline** (6 tools) — structured pipeline for specification creation
920
+ - 4 roles: gatherer → researcher → writer → critic
921
+ - **QA Loop** (7 tools) — iterative review/fix cycles
922
+ - **Guard Hooks** (6 tools) — pre-commit/pre-push safety hooks
923
+ - Bypass with `[skip-hooks]` keyword in commit message
924
+ - **Tool Clusters** (7 tools) — tool organization by categories
925
+ - 13 categories (agent, task, file, git, collab, safety, quality, debug, plan, hooks, session, cost, docs)
926
+
927
+ ---
928
+
929
+ ## [0.6.0] - 2026-01-30
930
+
931
+ ### Added
932
+ - **Brainstorming Skill** (9 tools) — interactive design through step-by-step questions
933
+ - **Writing Plans Skill** (11 tools) — TDD plans with bite-sized tasks (2-5 min)
934
+ - **Systematic Debugging** (13 tools) 4-phase debugging process
935
+ - Iron Law: NO FIXES WITHOUT ROOT CAUSE
936
+ - Red Flags detection: "Let me just try...", "Maybe if I...", "This should fix it..."
937
+
938
+ ---
939
+
940
+ ## [0.5.0] - 2026-01-30
941
+
942
+ ### Added
943
+ - **Agent Health Monitor** — liveness monitoring for agents
944
+ - **Session Recording** action recording for replay
945
+ - **Quality Gate** — automated pre-merge checks (lint, tests, types, coverage)
946
+ - **Cost Tracker** API usage cost tracking per agent/project
947
+ - **Context Compressor** — briefing compression (ratio 0.1-0.9)
948
+ - **Regression Detector** baseline comparison and regression detection
949
+
950
+ ---
951
+
952
+ ## [0.4.2] - 2026-01-28
953
+
954
+ ### Added
955
+ - **Timeline Visualization** — task progress visualization with ASCII milestones
956
+
957
+ ---
958
+
959
+ ## [0.4.1] - 2026-01-25
960
+
961
+ ### Added
962
+ - **Auto-Documentation** — automatic documentation generation on task completion
963
+ - **Agent Specialization (ML-based)** expertise tracking per agent
964
+ - **Conflict Prediction (ML-based)** — merge conflict prediction using Git history
965
+
966
+ ---
967
+
968
+ ## [0.4.0] - 2026-01-20
969
+
970
+ ### Added
971
+ - **Cloudflare Hub** real-time WebSocket coordination
972
+ - Durable Object for state storage
973
+ - WebSocket broadcast between agents
974
+ - Hybrid mode (WS + Git fallback)
975
+ - **Orchestrator Directory** central management (`/orchestrator/`)
976
+
977
+ ---
978
+
979
+ ## [0.3.0] - 2026-01-15
980
+
981
+ ### Added
982
+ - **Collective Advice** collective brainstorming across all agents
983
+ - **Urgent Preemption** priority file acquisition for critical bugs
984
+ - **Snapshot & Rollback** change rollback capability
985
+ - **Immune System** automatic CI/test failure response
986
+
987
+ ---
988
+
989
+ ## [0.2.0] - 2026-01-10
990
+
991
+ ### Added
992
+ - **Architecture Voting** voting system for dangerous actions
993
+ - **Git Worktrees** isolated workspaces for parallel tasks
994
+ - **GitHub Integration** PR creation, branch sync, auto-cleanup
995
+ - **Cross-Agent Review** code review between agents
996
+
997
+ ---
998
+
999
+ ## [0.1.0] - 2026-01-05
1000
+
1001
+ ### Added
1002
+ - **Agent Registry** agent registration with generated names (RadiantWolf, SilentFox, etc.)
1003
+ - **Task Management** full task lifecycle (create, assign, update, complete, cancel)
1004
+ - **File Locking** exclusive/shared file locks with conflict prediction
1005
+ - **Collaboration** broadcast chat, screenshots, thought logging
1006
+ - **Auction System** task bidding for agents
1007
+ - **Briefings** mental snapshots for context transfer between agent shifts
1008
+ - **Pulse** live agent activity map
1009
+ - **Knowledge Base** findings and patterns archive
1010
+ - **Ghost Mode** autonomous code patrol and lint fixing
1011
+ - **Stop Flag** emergency stop for all agents
1012
+
1013
+ ### Infrastructure
1014
+ - MCP Server based on @modelcontextprotocol/sdk
1015
+ - TypeScript compilation
1016
+ - Installer for IDEs (Windsurf, Cursor, Claude Desktop, OpenCode, VS Code)
1017
+ - Agent rules (.windsurfrules, .cursorrules, CLAUDE.md, GEMINI.md)
1018
+ - Companion daemon for background tasks
1019
+
1020
+ ---
1021
+
1022
+ ## Semantic Versioning
1023
+
1024
+ - **MAJOR (X.0.0)** — incompatible API changes
1025
+ - **MINOR (0.X.0)** — new features, backward compatible
1026
+ - **PATCH (0.0.X)** — bug fixes, backward compatible
1027
+
1028
+ ## Legend
1029
+
1030
+ | Type | Description |
1031
+ |------|-------------|
1032
+ | **Added** | New features |
1033
+ | **Changed** | Changes to existing functionality |
1034
+ | **Deprecated** | Features to be removed |
1035
+ | **Removed** | Removed features |
1036
+ | **Fixed** | Bug fixes |
1037
+ | **Security** | Vulnerability fixes |