@realblxckcodex/opencode-swarm 0.6.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.
- package/CHANGELOG.md +560 -0
- package/LICENSE +21 -0
- package/README.md +504 -0
- package/package.json +58 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
> **Languages:** 🇩🇪 [Deutsch](#deutsch) | 🇬🇧 [English](#english)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<details>
|
|
8
|
+
<summary>🇩🇪 <strong>Deutsch</strong> | German</summary>
|
|
9
|
+
|
|
10
|
+
<a name="deutsch"></a>
|
|
11
|
+
|
|
12
|
+
## 0.6.0 - 2026-02-28 - 🎉 TRUE SUBAGENT BREAKTHROUGH
|
|
13
|
+
|
|
14
|
+
### Phase 6: True Subagent Orchestration ✅
|
|
15
|
+
|
|
16
|
+
**Das fehlende Puzzle-Teil ist gefunden!** Nach Analyse von subtask2 haben wir die echte Subtask-Implementierung übernommen.
|
|
17
|
+
|
|
18
|
+
#### Phase 6.1: True Subtask Parts (`type: "subtask"`)
|
|
19
|
+
- **SwarmManager vollständig überarbeitet** (`swarm-manager.ts`)
|
|
20
|
+
- Nutzt jetzt `client.session.promptAsync()` mit `type: "subtask"` Parts
|
|
21
|
+
- Jeder Worker ist als eigener Subtask im Chat sichtbar
|
|
22
|
+
- Echte Session-Isolation für jeden Worker
|
|
23
|
+
- Named Result Capture mit `as: "name"` und `$RESULT[name]`
|
|
24
|
+
|
|
25
|
+
**Vorher vs Nachher:**
|
|
26
|
+
```typescript
|
|
27
|
+
// VORHER (nicht sichtbar):
|
|
28
|
+
await session.prompt({ sessionID, prompt, agent: "coder" })
|
|
29
|
+
|
|
30
|
+
// NACHHER (eigener Subtask im Chat):
|
|
31
|
+
await client.session.promptAsync({
|
|
32
|
+
path: { id: sessionID },
|
|
33
|
+
body: {
|
|
34
|
+
parts: [{
|
|
35
|
+
type: "subtask",
|
|
36
|
+
agent: "coder",
|
|
37
|
+
model: modelSelection,
|
|
38
|
+
description: "Worker: Implement feature",
|
|
39
|
+
prompt: "...",
|
|
40
|
+
as: "worker_1"
|
|
41
|
+
}]
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### Phase 6.2: Swarm Master Agent
|
|
47
|
+
- **Neuer Default Agent** (`agents/swarm-master.md`)
|
|
48
|
+
- Automatische Erkennung wann Swarm nötig ist
|
|
49
|
+
- Einfache Tasks → Direkte Antwort
|
|
50
|
+
- Komplexe Tasks → Automatischer `/swarm_run` Aufruf
|
|
51
|
+
- Intelligente Task-Klassifizierung
|
|
52
|
+
|
|
53
|
+
#### Phase 6.3: Complete Agent Army
|
|
54
|
+
- **14 spezialisierte Agenten** erstellt:
|
|
55
|
+
- **Queens:** strategic-queen, tactical-queen, adaptive-queen
|
|
56
|
+
- **Workers:** researcher, coder, tester, analyst, architect, reviewer, optimizer, documenter
|
|
57
|
+
- **Swarm-Spezialisten:** swarm-planner, swarm-implementer, swarm-reviewer
|
|
58
|
+
- **Master:** swarm-master (User Interface)
|
|
59
|
+
- Alle konsistent mit .env Modellen konfiguriert
|
|
60
|
+
- Jeder Agent mit spezifischem Model, Tools und Instructions
|
|
61
|
+
|
|
62
|
+
#### Phase 6.4: Subtask Parsing & Role Detection
|
|
63
|
+
- **`parseSubtasksFromPlan()`** - Extrahiert nummerierte Listen aus Planner-Output
|
|
64
|
+
- **`detectRoleFromTask()`** - Weist automatisch Rollen basierend auf Task-Inhalt zu
|
|
65
|
+
- Dynamische Worker-Zuweisung (nicht mehr statisch)
|
|
66
|
+
|
|
67
|
+
#### Phase 6.5: Comprehensive Logging System
|
|
68
|
+
- **Logger** (`logger.ts`) mit 5 Levels: error, warn, info, debug, trace
|
|
69
|
+
- Component-basierte Logger für detaillierte Debugging
|
|
70
|
+
- **`swarm_logs` Tool** - Abrufen und Filtern von Logs
|
|
71
|
+
- Vollständige Transparenz bei Subtask-Ausführung
|
|
72
|
+
|
|
73
|
+
### Erfolgsnachweis
|
|
74
|
+
|
|
75
|
+
**Test-Ergebnis:**
|
|
76
|
+
```
|
|
77
|
+
User: /swarm_run task="Analyze the swarm plugin architecture"
|
|
78
|
+
|
|
79
|
+
Output:
|
|
80
|
+
✅ Strategic-Queen erstellt Plan (5 Subtasks) - SICHTBAR als Subtask
|
|
81
|
+
✅ Swarm-Implementer führt Analyse durch - SICHTBAR als Subtask
|
|
82
|
+
✅ 764-Zeilen Architektur-Report generiert
|
|
83
|
+
✅ Alle Komponenten dokumentiert
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Technical Details
|
|
87
|
+
|
|
88
|
+
**Key Insight aus subtask2:**
|
|
89
|
+
- OpenCode's `task` Tool zeigt keine Subtasks an
|
|
90
|
+
- `type: "subtask"` Parts erzeugen echte Subtask-Sessions
|
|
91
|
+
- Dies ist undokumentiert aber funktioniert perfekt
|
|
92
|
+
|
|
93
|
+
**Implementierte Patterns:**
|
|
94
|
+
- Result Capture: `{as: "name"}` → `$RESULT[name]`
|
|
95
|
+
- Parallel Execution: Alle Worker gleichzeitig
|
|
96
|
+
- Return Chains: Post-execution Actions
|
|
97
|
+
- Progress Reporting: Live-Updates während Ausführung
|
|
98
|
+
|
|
99
|
+
#### Neue Files
|
|
100
|
+
- `.opencode/swarm/core/logger.ts` (170 Zeilen)
|
|
101
|
+
- `.opencode/swarm/core/swarm-manager.ts` (vollständig überarbeitet, 450 Zeilen)
|
|
102
|
+
- `.opencode/plugins/swarm/tools/swarm-logs.ts` (54 Zeilen)
|
|
103
|
+
- `.opencode/agents/swarm-master.md` (90 Zeilen)
|
|
104
|
+
- Alle 14 Agent-Definitionen
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 0.5.0 - 2026-02-28
|
|
109
|
+
|
|
110
|
+
### Phase 5: Advanced Features ✅
|
|
111
|
+
|
|
112
|
+
#### Phase 5.1: MCP-Server Integration
|
|
113
|
+
- **MCP Types** (`mcp.ts`) - MCP Protokoll Typen
|
|
114
|
+
- **MCP Server** (`createMCPServer()`) - Ressourcen-, Tool- & Prompt-Registrierung
|
|
115
|
+
- **MCP Client** (`createMCPClient()`) - Ressourcen-Zugriff, Tool-Ausführung, Prompt-Abruf
|
|
116
|
+
- **Swarm Integration** (`createSwarmMCPAdapter()`) - Kompatibilität mit Claude Desktop
|
|
117
|
+
|
|
118
|
+
#### Phase 5.2: Dynamic Agent Discovery
|
|
119
|
+
- **Service Registry** (`discovery.ts`) - Agent-Registrierung und Discovery
|
|
120
|
+
- **Load Balancing** - `selectLeastLoaded()`, `selectRoundRobin()`
|
|
121
|
+
- **Health Monitoring** - Automatische Health-Checks, TTL-basierte Cleanup
|
|
122
|
+
- **Agent Watcher** (`createAgentWatcher()`) - Echtzeit-Updates
|
|
123
|
+
- **Hot Reload** (`createHotReloadManager()`) - Automatisches Reload
|
|
124
|
+
|
|
125
|
+
#### Phase 5.3: Swarm-Mail System
|
|
126
|
+
- **Mailbox** (`mail.ts`) - Per-Agent Mailbox mit Prioritäten
|
|
127
|
+
- **Mail Features** - Threading, Attachments, Metadata
|
|
128
|
+
- **Mail Server** (`createMailServer()`) - Multi-Agent Routing
|
|
129
|
+
- **Templates** (`createTemplate()`, `renderTemplate()`)
|
|
130
|
+
|
|
131
|
+
#### Phase 5.4: Dashboard/API
|
|
132
|
+
- **Dashboard API** (`dashboard.ts`) - Aggregierte Statistiken
|
|
133
|
+
- **Control Operations** - Pause/Resume/Cancel/Retry
|
|
134
|
+
- **Export** - Prometheus/JSON Export
|
|
135
|
+
- **REST Server** (`createRESTServer()`)
|
|
136
|
+
- **WebSocket Server** (`createWebSocketServer()`)
|
|
137
|
+
- **HTML Dashboard** (`generateDashboardHTML()`)
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 0.4.6 - 2026-02-28
|
|
142
|
+
|
|
143
|
+
### Phase 4: Production-Readiness ✅
|
|
144
|
+
|
|
145
|
+
#### Phase 4.1: Erweiterte Observability
|
|
146
|
+
- **Metrics Collector** (`metrics.ts`) - Prometheus-kompatibler Export
|
|
147
|
+
- **Tracer** (`tracer()`) - Distributed Tracing mit Parent-Child Spans
|
|
148
|
+
|
|
149
|
+
#### Phase 4.2: SQLite Task Queue (In-Memory)
|
|
150
|
+
- **Task Queue** (`queue.ts`) - Prioritäts-basiertes Scheduling
|
|
151
|
+
- **Queue Processor** (`createQueueProcessor()`) - Concurrency-Limiting
|
|
152
|
+
|
|
153
|
+
#### Phase 4.3: State Recovery & Checkpointing
|
|
154
|
+
- **State Manager** (`recovery.ts`) - JSON-Persistenz
|
|
155
|
+
- **Recovery Coordinator** - Crash-Recovery
|
|
156
|
+
|
|
157
|
+
#### Phase 4.4: Integration Tests
|
|
158
|
+
- **E2E Test Suite** (`integration.spec.ts`) - 689 Zeilen
|
|
159
|
+
|
|
160
|
+
#### Phase 4.5: Error Enrichment
|
|
161
|
+
- **Hierarchische Fehlerklassen** (`errors.ts`)
|
|
162
|
+
- **Error Codes** - 25+ spezifische Codes
|
|
163
|
+
- **Recovery Suggestions** - Automatische Vorschläge
|
|
164
|
+
- **Error Factory** - `ErrorFactory.sessionNotFound()`, etc.
|
|
165
|
+
- **Retry Decorator** - `withRetry()` mit Exponential Backoff
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 0.4.5 - 2026-02-28
|
|
170
|
+
|
|
171
|
+
### Phase 3: Echte Subagenten-Implementierung ✅
|
|
172
|
+
|
|
173
|
+
#### Phase 3.1: Task/Subagent Dispatcher
|
|
174
|
+
- **Dispatcher** (`dispatcher.ts`) mit 3 Strategien
|
|
175
|
+
- Native → Fork → Prompt graceful degradation
|
|
176
|
+
|
|
177
|
+
#### Phase 3.2: Worker-Isolation
|
|
178
|
+
- **Worker Factory** (`worker.ts`) - Isolierte Worker-Erstellung
|
|
179
|
+
- **Worker Pool** - Queue und Concurrency-Limiting
|
|
180
|
+
|
|
181
|
+
#### Phase 3.3: Message-Bus
|
|
182
|
+
- **Message Bus** (`messaging.ts`) - P2P, Broadcast, Request/Response
|
|
183
|
+
|
|
184
|
+
#### Phase 3.4: Context Propagation
|
|
185
|
+
- **Context Manager** (`context.ts`) - Parent-Child Hierarchie
|
|
186
|
+
- **Checkpoint Manager** - Automatische Checkpoints
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 0.4.4 - 2026-02-28
|
|
191
|
+
|
|
192
|
+
### Phase 2.5: Workflow Engine (subtask2-Konzepte) ✅
|
|
193
|
+
|
|
194
|
+
- **Complete Workflow Engine** - Sequential, Parallel, Hierarchical
|
|
195
|
+
- **Result Store** (`results.ts`) - `$RESULT[name]` Variable Resolution
|
|
196
|
+
- **Workflow Executor** (`executor.ts`) - Step Execution mit Retry
|
|
197
|
+
- **Loop Engine** (`loop.ts`) - LLM-basierte Loop Evaluation
|
|
198
|
+
- **Parallel Coordinator** (`parallel.ts`) - Dependency Graph, Topological Sort
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## 0.4.3 - 2026-02-28
|
|
203
|
+
|
|
204
|
+
### Phase 2.4: Adapter-Interface vereinheitlichen ✅
|
|
205
|
+
|
|
206
|
+
- **Vereinheitlichtes Adapter-Interface** (`base.ts`)
|
|
207
|
+
- `BaseSessionAdapter` Interface mit Required/Optional Methoden
|
|
208
|
+
- `AdapterError` Klasse mit Error-Codes
|
|
209
|
+
- Retry-Logic mit Exponential Backoff
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## 0.4.2 - 2026-02-28
|
|
214
|
+
|
|
215
|
+
### Phase 2.3: Agent-Registry als eigenes Modul ✅
|
|
216
|
+
|
|
217
|
+
- **Agent Registry** (`registry.ts`) - CRUD mit Capability-Erkennung
|
|
218
|
+
- Neue Tools: `swarm_agent_list`, `swarm_agent_find`, `swarm_agent_get`, `swarm_agent_stats`
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## 0.4.1 - 2026-02-28
|
|
223
|
+
|
|
224
|
+
### Phase 2.2: Config-System mit Zod-Validation ✅
|
|
225
|
+
|
|
226
|
+
- **Erweitertes Config-System** - File-Support und Hot-Reload
|
|
227
|
+
- `createConfigManager()` mit `.opencode/swarm.config.json`
|
|
228
|
+
- Env-Validation mit klaren Fehlermeldungen
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## 0.4.0 - 2026-02-28
|
|
233
|
+
|
|
234
|
+
### Phase 2.1: Plugin Modularisierung ✅
|
|
235
|
+
|
|
236
|
+
- **Komplette Architektur-Überarbeitung** (950 → ~580 Zeilen, 12 Module)
|
|
237
|
+
- Neue Struktur: `swarm/{types,constants,config,utils,tools,hooks}/`
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## 0.3.1 - 2026-02-28
|
|
242
|
+
|
|
243
|
+
### Hotfix
|
|
244
|
+
|
|
245
|
+
- **ProviderModelNotFoundError behoben**
|
|
246
|
+
- Models werden nur gesetzt wenn definiert
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## 0.3.0 - 2026-02-28
|
|
251
|
+
|
|
252
|
+
### Phase 1: Kritische Stabilitäts-Fixes ✅
|
|
253
|
+
|
|
254
|
+
- **Binding-Bug behoben** (`this._client is undefined`)
|
|
255
|
+
- **Concurrency-Limiter** (max 3 parallele Worker)
|
|
256
|
+
- **Retry-Logic** mit Exponential Backoff
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## 0.2.0 - 2026-02-28
|
|
261
|
+
|
|
262
|
+
- Coordinator guard enforcement mit dokumentierten Hooks
|
|
263
|
+
- Compaction-resume context injection
|
|
264
|
+
- Diagnostic tools: `swarm_trace`, `swarm_guard_status`
|
|
265
|
+
- Child-session isolation für `swarm_run`
|
|
266
|
+
- Prompt timeout handling
|
|
267
|
+
- Role-based model mapping via env
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## 0.1.0 - 2026-02-27
|
|
272
|
+
|
|
273
|
+
- Initial production-focused Swarm plugin baseline
|
|
274
|
+
- SDK-first session orchestration
|
|
275
|
+
- Security hooks für tool execution
|
|
276
|
+
- Persistent JSON memory
|
|
277
|
+
- Session utility tools
|
|
278
|
+
|
|
279
|
+
</details>
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
<details open>
|
|
284
|
+
<summary>🇬🇧 <strong>English</strong> | Englisch</summary>
|
|
285
|
+
|
|
286
|
+
<a name="english"></a>
|
|
287
|
+
|
|
288
|
+
## 0.6.0 - 2026-02-28 - 🎉 TRUE SUBAGENT BREAKTHROUGH
|
|
289
|
+
|
|
290
|
+
### Phase 6: True Subagent Orchestration ✅
|
|
291
|
+
|
|
292
|
+
**The missing puzzle piece is found!** After analyzing subtask2, we adopted the true subtask implementation.
|
|
293
|
+
|
|
294
|
+
#### Phase 6.1: True Subtask Parts (`type: "subtask"`)
|
|
295
|
+
- **Complete SwarmManager rewrite** (`swarm-manager.ts`)
|
|
296
|
+
- Now uses `client.session.promptAsync()` with `type: "subtask"` parts
|
|
297
|
+
- Each worker visible as separate subtask in chat
|
|
298
|
+
- True session isolation for each worker
|
|
299
|
+
- Named Result Capture with `as: "name"` and `$RESULT[name]`
|
|
300
|
+
|
|
301
|
+
**Before vs After:**
|
|
302
|
+
```typescript
|
|
303
|
+
// BEFORE (not visible):
|
|
304
|
+
await session.prompt({ sessionID, prompt, agent: "coder" })
|
|
305
|
+
|
|
306
|
+
// AFTER (own subtask in chat):
|
|
307
|
+
await client.session.promptAsync({
|
|
308
|
+
path: { id: sessionID },
|
|
309
|
+
body: {
|
|
310
|
+
parts: [{
|
|
311
|
+
type: "subtask",
|
|
312
|
+
agent: "coder",
|
|
313
|
+
model: modelSelection,
|
|
314
|
+
description: "Worker: Implement feature",
|
|
315
|
+
prompt: "...",
|
|
316
|
+
as: "worker_1"
|
|
317
|
+
}]
|
|
318
|
+
}
|
|
319
|
+
})
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
#### Phase 6.2: Swarm Master Agent
|
|
323
|
+
- **New Default Agent** (`agents/swarm-master.md`)
|
|
324
|
+
- Auto-detects when swarm is needed
|
|
325
|
+
- Simple tasks → Direct answer
|
|
326
|
+
- Complex tasks → Automatic `/swarm_run` call
|
|
327
|
+
- Intelligent task classification
|
|
328
|
+
|
|
329
|
+
#### Phase 6.3: Complete Agent Army
|
|
330
|
+
- **14 specialized agents** created:
|
|
331
|
+
- **Queens:** strategic-queen, tactical-queen, adaptive-queen
|
|
332
|
+
- **Workers:** researcher, coder, tester, analyst, architect, reviewer, optimizer, documenter
|
|
333
|
+
- **Swarm Specialists:** swarm-planner, swarm-implementer, swarm-reviewer
|
|
334
|
+
- **Master:** swarm-master (User Interface)
|
|
335
|
+
- All consistently configured with .env models
|
|
336
|
+
- Each agent with specific model, tools and instructions
|
|
337
|
+
|
|
338
|
+
#### Phase 6.4: Subtask Parsing & Role Detection
|
|
339
|
+
- **`parseSubtasksFromPlan()`** - Extracts numbered lists from planner output
|
|
340
|
+
- **`detectRoleFromTask()`** - Auto-assigns roles based on task content
|
|
341
|
+
- Dynamic worker assignment (no longer static)
|
|
342
|
+
|
|
343
|
+
#### Phase 6.5: Comprehensive Logging System
|
|
344
|
+
- **Logger** (`logger.ts`) with 5 levels: error, warn, info, debug, trace
|
|
345
|
+
- Component-based loggers for detailed debugging
|
|
346
|
+
- **`swarm_logs` Tool** - Retrieve and filter logs
|
|
347
|
+
- Full transparency in subtask execution
|
|
348
|
+
|
|
349
|
+
### Success Proof
|
|
350
|
+
|
|
351
|
+
**Test Result:**
|
|
352
|
+
```
|
|
353
|
+
User: /swarm_run task="Analyze the swarm plugin architecture"
|
|
354
|
+
|
|
355
|
+
Output:
|
|
356
|
+
✅ Strategic-Queen creates plan (5 subtasks) - VISIBLE as subtask
|
|
357
|
+
✅ Swarm-Implementer performs analysis - VISIBLE as subtask
|
|
358
|
+
✅ 764-line architecture report generated
|
|
359
|
+
✅ All components documented
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Technical Details
|
|
363
|
+
|
|
364
|
+
**Key Insight from subtask2:**
|
|
365
|
+
- OpenCode's `task` Tool doesn't show subtasks
|
|
366
|
+
- `type: "subtask"` Parts create true subtask sessions
|
|
367
|
+
- This is undocumented but works perfectly
|
|
368
|
+
|
|
369
|
+
**Implemented Patterns:**
|
|
370
|
+
- Result Capture: `{as: "name"}` → `$RESULT[name]`
|
|
371
|
+
- Parallel Execution: All workers simultaneously
|
|
372
|
+
- Return Chains: Post-execution Actions
|
|
373
|
+
- Progress Reporting: Live updates during execution
|
|
374
|
+
|
|
375
|
+
#### New Files
|
|
376
|
+
- `.opencode/swarm/core/logger.ts` (170 lines)
|
|
377
|
+
- `.opencode/swarm/core/swarm-manager.ts` (completely rewritten, 450 lines)
|
|
378
|
+
- `.opencode/plugins/swarm/tools/swarm-logs.ts` (54 lines)
|
|
379
|
+
- All 14 agent definitions
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## 0.5.0 - 2026-02-28
|
|
384
|
+
|
|
385
|
+
### Phase 5: Advanced Features ✅
|
|
386
|
+
|
|
387
|
+
#### Phase 5.1: MCP-Server Integration
|
|
388
|
+
- **MCP Types** (`mcp.ts`) - MCP protocol types
|
|
389
|
+
- **MCP Server** (`createMCPServer()`) - Resource, Tool & Prompt registration
|
|
390
|
+
- **MCP Client** (`createMCPClient()`) - Resource access, Tool execution, Prompt retrieval
|
|
391
|
+
- **Swarm Integration** (`createSwarmMCPAdapter()`) - Claude Desktop compatibility
|
|
392
|
+
|
|
393
|
+
#### Phase 5.2: Dynamic Agent Discovery
|
|
394
|
+
- **Service Registry** (`discovery.ts`) - Agent registration and discovery
|
|
395
|
+
- **Load Balancing** - `selectLeastLoaded()`, `selectRoundRobin()`
|
|
396
|
+
- **Health Monitoring** - Automatic health-checks, TTL-based cleanup
|
|
397
|
+
- **Agent Watcher** (`createAgentWatcher()`) - Real-time updates
|
|
398
|
+
- **Hot Reload** (`createHotReloadManager()`) - Automatic reload
|
|
399
|
+
|
|
400
|
+
#### Phase 5.3: Swarm-Mail System
|
|
401
|
+
- **Mailbox** (`mail.ts`) - Per-agent mailbox with priorities
|
|
402
|
+
- **Mail Features** - Threading, Attachments, Metadata
|
|
403
|
+
- **Mail Server** (`createMailServer()`) - Multi-agent routing
|
|
404
|
+
- **Templates** (`createTemplate()`, `renderTemplate()`)
|
|
405
|
+
|
|
406
|
+
#### Phase 5.4: Dashboard/API
|
|
407
|
+
- **Dashboard API** (`dashboard.ts`) - Aggregated statistics
|
|
408
|
+
- **Control Operations** - Pause/Resume/Cancel/Retry
|
|
409
|
+
- **Export** - Prometheus/JSON export
|
|
410
|
+
- **REST Server** (`createRESTServer()`)
|
|
411
|
+
- **WebSocket Server** (`createWebSocketServer()`)
|
|
412
|
+
- **HTML Dashboard** (`generateDashboardHTML()`)
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## 0.4.6 - 2026-02-28
|
|
417
|
+
|
|
418
|
+
### Phase 4: Production-Readiness ✅
|
|
419
|
+
|
|
420
|
+
#### Phase 4.1: Extended Observability
|
|
421
|
+
- **Metrics Collector** (`metrics.ts`) - Prometheus-compatible export
|
|
422
|
+
- **Tracer** (`tracer()`) - Distributed tracing with parent-child spans
|
|
423
|
+
|
|
424
|
+
#### Phase 4.2: SQLite Task Queue (In-Memory)
|
|
425
|
+
- **Task Queue** (`queue.ts`) - Priority-based scheduling
|
|
426
|
+
- **Queue Processor** (`createQueueProcessor()`) - Concurrency limiting
|
|
427
|
+
|
|
428
|
+
#### Phase 4.3: State Recovery & Checkpointing
|
|
429
|
+
- **State Manager** (`recovery.ts`) - JSON persistence
|
|
430
|
+
- **Recovery Coordinator** - Crash recovery
|
|
431
|
+
|
|
432
|
+
#### Phase 4.4: Integration Tests
|
|
433
|
+
- **E2E Test Suite** (`integration.spec.ts`) - 689 lines
|
|
434
|
+
|
|
435
|
+
#### Phase 4.5: Error Enrichment
|
|
436
|
+
- **Hierarchical Error Classes** (`errors.ts`)
|
|
437
|
+
- **Error Codes** - 25+ specific codes
|
|
438
|
+
- **Recovery Suggestions** - Automatic suggestions
|
|
439
|
+
- **Error Factory** - `ErrorFactory.sessionNotFound()`, etc.
|
|
440
|
+
- **Retry Decorator** - `withRetry()` with exponential backoff
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
## 0.4.5 - 2026-02-28
|
|
445
|
+
|
|
446
|
+
### Phase 3: True Subagent Implementation ✅
|
|
447
|
+
|
|
448
|
+
#### Phase 3.1: Task/Subagent Dispatcher
|
|
449
|
+
- **Dispatcher** (`dispatcher.ts`) with 3 strategies
|
|
450
|
+
- Native → Fork → Prompt graceful degradation
|
|
451
|
+
|
|
452
|
+
#### Phase 3.2: Worker Isolation
|
|
453
|
+
- **Worker Factory** (`worker.ts`) - Isolated worker creation
|
|
454
|
+
- **Worker Pool** - Queue and concurrency limiting
|
|
455
|
+
|
|
456
|
+
#### Phase 3.3: Message Bus
|
|
457
|
+
- **Message Bus** (`messaging.ts`) - P2P, Broadcast, Request/Response
|
|
458
|
+
|
|
459
|
+
#### Phase 3.4: Context Propagation
|
|
460
|
+
- **Context Manager** (`context.ts`) - Parent-child hierarchy
|
|
461
|
+
- **Checkpoint Manager** - Automatic checkpoints
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## 0.4.4 - 2026-02-28
|
|
466
|
+
|
|
467
|
+
### Phase 2.5: Workflow Engine (subtask2 concepts) ✅
|
|
468
|
+
|
|
469
|
+
- **Complete Workflow Engine** - Sequential, Parallel, Hierarchical
|
|
470
|
+
- **Result Store** (`results.ts`) - `$RESULT[name]` variable resolution
|
|
471
|
+
- **Workflow Executor** (`executor.ts`) - Step execution with retry
|
|
472
|
+
- **Loop Engine** (`loop.ts`) - LLM-based loop evaluation
|
|
473
|
+
- **Parallel Coordinator** (`parallel.ts`) - Dependency graph, topological sort
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## 0.4.3 - 2026-02-28
|
|
478
|
+
|
|
479
|
+
### Phase 2.4: Unified Adapter Interface ✅
|
|
480
|
+
|
|
481
|
+
- **Unified Adapter Interface** (`base.ts`)
|
|
482
|
+
- `BaseSessionAdapter` interface with required/optional methods
|
|
483
|
+
- `AdapterError` class with error codes
|
|
484
|
+
- Retry logic with exponential backoff
|
|
485
|
+
|
|
486
|
+
---
|
|
487
|
+
|
|
488
|
+
## 0.4.2 - 2026-02-28
|
|
489
|
+
|
|
490
|
+
### Phase 2.3: Agent Registry as Separate Module ✅
|
|
491
|
+
|
|
492
|
+
- **Agent Registry** (`registry.ts`) - CRUD with capability detection
|
|
493
|
+
- New tools: `swarm_agent_list`, `swarm_agent_find`, `swarm_agent_get`, `swarm_agent_stats`
|
|
494
|
+
|
|
495
|
+
---
|
|
496
|
+
|
|
497
|
+
## 0.4.1 - 2026-02-28
|
|
498
|
+
|
|
499
|
+
### Phase 2.2: Config System with Zod Validation ✅
|
|
500
|
+
|
|
501
|
+
- **Extended Config System** - File support and hot-reload
|
|
502
|
+
- `createConfigManager()` with `.opencode/swarm.config.json`
|
|
503
|
+
- Env validation with clear error messages
|
|
504
|
+
|
|
505
|
+
---
|
|
506
|
+
|
|
507
|
+
## 0.4.0 - 2026-02-28
|
|
508
|
+
|
|
509
|
+
### Phase 2.1: Plugin Modularization ✅
|
|
510
|
+
|
|
511
|
+
- **Complete Architecture Overhaul** (950 → ~580 lines, 12 modules)
|
|
512
|
+
- New structure: `swarm/{types,constants,config,utils,tools,hooks}/`
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
## 0.3.1 - 2026-02-28
|
|
517
|
+
|
|
518
|
+
### Hotfix
|
|
519
|
+
|
|
520
|
+
- **Fixed ProviderModelNotFoundError**
|
|
521
|
+
- Models only set when defined
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## 0.3.0 - 2026-02-28
|
|
526
|
+
|
|
527
|
+
### Phase 1: Critical Stability Fixes ✅
|
|
528
|
+
|
|
529
|
+
- **Fixed binding bug** (`this._client is undefined`)
|
|
530
|
+
- **Concurrency Limiter** (max 3 parallel workers)
|
|
531
|
+
- **Retry Logic** with exponential backoff
|
|
532
|
+
|
|
533
|
+
---
|
|
534
|
+
|
|
535
|
+
## 0.2.0 - 2026-02-28
|
|
536
|
+
|
|
537
|
+
- Coordinator guard enforcement with documented hooks
|
|
538
|
+
- Compaction-resume context injection
|
|
539
|
+
- Diagnostic tools: `swarm_trace`, `swarm_guard_status`
|
|
540
|
+
- Child-session isolation for `swarm_run`
|
|
541
|
+
- Prompt timeout handling
|
|
542
|
+
- Role-based model mapping via env
|
|
543
|
+
|
|
544
|
+
---
|
|
545
|
+
|
|
546
|
+
## 0.1.0 - 2026-02-27
|
|
547
|
+
|
|
548
|
+
- Initial production-focused Swarm plugin baseline
|
|
549
|
+
- SDK-first session orchestration
|
|
550
|
+
- Security hooks for tool execution
|
|
551
|
+
- Persistent JSON memory
|
|
552
|
+
- Session utility tools
|
|
553
|
+
|
|
554
|
+
</details>
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
558
|
+
<p align="center">
|
|
559
|
+
<a href="README.md">← Back to README</a>
|
|
560
|
+
</p>
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kevin (RealBlxckCodex)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
# 🐝 OpenCode Swarm Plugin
|
|
2
|
+
|
|
3
|
+
> **Multi-Agent Orchestration System** with true subagent support for OpenCode AI
|
|
4
|
+
|
|
5
|
+
[](CHANGELOG.md)
|
|
6
|
+
[](ROADMAP.md)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<details>
|
|
12
|
+
<summary>🇩🇪 <strong>Deutsch</strong> | German</summary>
|
|
13
|
+
|
|
14
|
+
## 🎯 Was ist OpenCode Swarm?
|
|
15
|
+
|
|
16
|
+
OpenCode Swarm ist ein **produktionsreifes Multi-Agent-Orchestrierungssystem**, das komplexe Entwicklungsaufgaben durch koordinierte Teams von KI-Agenten ausführt. Im Gegensatz zu einfachen Agent-Ketten implementiert Swarm ein **echtes Subagent-Pattern**, bei dem jeder Worker als isolierter Subtask mit voller Sichtbarkeit in der OpenCode-Chat-Oberfläche läuft.
|
|
17
|
+
|
|
18
|
+
### ✨ Hauptfunktionen
|
|
19
|
+
|
|
20
|
+
- 🎭 **14 Spezialisierte Agents** - Von strategischen Planern bis zu Code-Reviewern
|
|
21
|
+
- 🔄 **Echte Subagent-Orchestrierung** - Jeder Worker als separater Subtask sichtbar
|
|
22
|
+
- 🏗️ **Hierarchische & Mesh-Workflows** - Flexible Ausführungsmuster
|
|
23
|
+
- 🗳️ **Konsens-Mechanismen** - Byzantinisch, Abstimmung und gewichteter Konsens
|
|
24
|
+
- 🧠 **Intelligente Modellauswahl** - Automatische Model-Tier-Zuweisung
|
|
25
|
+
- 📊 **Kosten-Tracking** - API-Nutzung pro Run überwachen
|
|
26
|
+
- 🔒 **Security Guard** - Eingabe-Sanitisierung und Validierung
|
|
27
|
+
- 📈 **Umfassendes Logging** - Debuggen mit detaillierten Ausführungs-Logs
|
|
28
|
+
|
|
29
|
+
## 🚀 Schnellstart
|
|
30
|
+
|
|
31
|
+
### Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Repository klonen
|
|
35
|
+
git clone https://github.com/RealBlxckCodex/OpenSwarm.git
|
|
36
|
+
cd OpenSwarm
|
|
37
|
+
|
|
38
|
+
# Abhängigkeiten installieren
|
|
39
|
+
npm install
|
|
40
|
+
|
|
41
|
+
# Umgebung konfigurieren
|
|
42
|
+
cp .env.example .env
|
|
43
|
+
# .env mit deinen API-Keys bearbeiten
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Konfiguration
|
|
47
|
+
|
|
48
|
+
Erstelle `.env` mit deinen bevorzugten Modellen:
|
|
49
|
+
|
|
50
|
+
```env
|
|
51
|
+
# Model Tiers
|
|
52
|
+
THINKING=kimi-k2-thinking
|
|
53
|
+
CODING=kimi-k2-5
|
|
54
|
+
STRONG=gpt-5-codex
|
|
55
|
+
REVIEWER=gpt-5-codex
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Nutzung
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Swarm-Run starten
|
|
62
|
+
/swarm_run task="Benutzer-Authentifizierungssystem implementieren"
|
|
63
|
+
|
|
64
|
+
# Ausführungs-Logs prüfen
|
|
65
|
+
/swarm_logs
|
|
66
|
+
|
|
67
|
+
# Mit spezifischem Modus ausführen
|
|
68
|
+
/swarm_run task="Datenbank-Layer refactoren" mode=hierarchical
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 🏗️ Architektur
|
|
72
|
+
|
|
73
|
+
### Drei-Ebenen-Agent-System
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
┌─────────────────────────────────────────┐
|
|
77
|
+
│ Benutzer-Oberflächen-Ebene │
|
|
78
|
+
│ (swarm-master) │
|
|
79
|
+
└─────────────────┬───────────────────────┘
|
|
80
|
+
│
|
|
81
|
+
┌─────────────────▼───────────────────────┐
|
|
82
|
+
│ Strategische Ebene │
|
|
83
|
+
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
84
|
+
│ │strategic│ │tactical │ │adaptive │ │
|
|
85
|
+
│ │ -queen │ │ -queen │ │ -queen │ │
|
|
86
|
+
│ └────┬────┘ └────┬────┘ └────┬────┘ │
|
|
87
|
+
└───────┼──────────┼──────────┼────────┘
|
|
88
|
+
│ │ │
|
|
89
|
+
┌───────▼──────────▼──────────▼────────┐
|
|
90
|
+
│ Ausführungs-Ebene │
|
|
91
|
+
│ researcher │ coder │ tester │ │
|
|
92
|
+
│ architect │reviewer│optimizer│ │
|
|
93
|
+
│ analyst │documenter │
|
|
94
|
+
└───────────────────────────────────────┘
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
</details>
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
<details open>
|
|
102
|
+
<summary>🇬🇧 <strong>English</strong> | Englisch</summary>
|
|
103
|
+
|
|
104
|
+
## 🎯 What is OpenCode Swarm?
|
|
105
|
+
|
|
106
|
+
OpenCode Swarm is a **production-ready multi-agent orchestration system** that enables complex development tasks to be executed by coordinated teams of AI agents. Unlike simple agent chains, Swarm implements a **true subagent pattern** where each worker runs as an isolated subtask with full visibility in the OpenCode chat interface.
|
|
107
|
+
|
|
108
|
+
### ✨ Key Features
|
|
109
|
+
|
|
110
|
+
- 🎭 **14 Specialized Agents** - From strategic planners to code reviewers
|
|
111
|
+
- 🔄 **True Subagent Orchestration** - Each worker visible as separate subtask
|
|
112
|
+
- 🏗️ **Hierarchical & Mesh Workflows** - Flexible execution patterns
|
|
113
|
+
- 🗳️ **Consensus Mechanisms** - Byzantine, voting, and weighted consensus
|
|
114
|
+
- 🧠 **Smart Model Selection** - Automatic model tier assignment
|
|
115
|
+
- 📊 **Cost Tracking** - Monitor API usage per run
|
|
116
|
+
- 🔒 **Security Guard** - Input sanitization and validation
|
|
117
|
+
- 📈 **Comprehensive Logging** - Debug with detailed execution logs
|
|
118
|
+
|
|
119
|
+
## 🚀 Quick Start
|
|
120
|
+
|
|
121
|
+
### Installation
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Clone the repository
|
|
125
|
+
git clone https://github.com/RealBlxckCodex/OpenSwarm.git
|
|
126
|
+
cd OpenSwarm
|
|
127
|
+
|
|
128
|
+
# Install dependencies
|
|
129
|
+
npm install
|
|
130
|
+
|
|
131
|
+
# Configure environment
|
|
132
|
+
cp .env.example .env
|
|
133
|
+
# Edit .env with your API keys
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Configuration
|
|
137
|
+
|
|
138
|
+
Create `.env` with your preferred models:
|
|
139
|
+
|
|
140
|
+
```env
|
|
141
|
+
# Model Tiers
|
|
142
|
+
THINKING=kimi-k2-thinking
|
|
143
|
+
CODING=kimi-k2-5
|
|
144
|
+
STRONG=gpt-5-codex
|
|
145
|
+
REVIEWER=gpt-5-codex
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Usage
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Start a swarm run
|
|
152
|
+
/swarm_run task="Implement user authentication system"
|
|
153
|
+
|
|
154
|
+
# Check execution logs
|
|
155
|
+
/swarm_logs
|
|
156
|
+
|
|
157
|
+
# Run with specific mode
|
|
158
|
+
/swarm_run task="Refactor database layer" mode=hierarchical
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## 🏗️ Architecture
|
|
162
|
+
|
|
163
|
+
### Three-Tier Agent System
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
┌─────────────────────────────────────────┐
|
|
167
|
+
│ User Interface Layer │
|
|
168
|
+
│ (swarm-master) │
|
|
169
|
+
└─────────────────┬───────────────────────┘
|
|
170
|
+
│
|
|
171
|
+
┌─────────────────▼───────────────────────┐
|
|
172
|
+
│ Strategic Layer │
|
|
173
|
+
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
174
|
+
│ │strategic│ │tactical │ │adaptive │ │
|
|
175
|
+
│ │ -queen │ │ -queen │ │ -queen │ │
|
|
176
|
+
│ └────┬────┘ └────┬────┘ └────┬────┘ │
|
|
177
|
+
└───────┼──────────┼──────────┼────────┘
|
|
178
|
+
│ │ │
|
|
179
|
+
┌───────▼──────────▼──────────▼────────┐
|
|
180
|
+
│ Execution Layer │
|
|
181
|
+
│ researcher │ coder │ tester │ │
|
|
182
|
+
│ architect │reviewer│optimizer│ │
|
|
183
|
+
│ analyst │documenter │
|
|
184
|
+
└───────────────────────────────────────┘
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
</details>
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
<details>
|
|
192
|
+
<summary>🇩🇪 <strong>Workflow-Modi</strong> | Workflow Modes</summary>
|
|
193
|
+
|
|
194
|
+
**Hierarchischer Modus:**
|
|
195
|
+
```
|
|
196
|
+
strategic-queen → planner → workers → consensus → reviewer
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Mesh-Modus:**
|
|
200
|
+
```
|
|
201
|
+
Alle Worker führen parallel mit Peer-Konsens aus
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
</details>
|
|
205
|
+
|
|
206
|
+
<details open>
|
|
207
|
+
<summary>🇬🇧 <strong>Workflow Modes</strong> | Workflow-Modi</summary>
|
|
208
|
+
|
|
209
|
+
**Hierarchical Mode:**
|
|
210
|
+
```
|
|
211
|
+
strategic-queen → planner → workers → consensus → reviewer
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Mesh Mode:**
|
|
215
|
+
```
|
|
216
|
+
All workers execute in parallel with peer consensus
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
</details>
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
<details>
|
|
224
|
+
<summary>🇩🇪 <strong>Verfügbare Agents</strong> | Available Agents</summary>
|
|
225
|
+
|
|
226
|
+
### Queens (Strategische Ebene)
|
|
227
|
+
- **strategic-queen** - Hochrangige Planung & Dekomposition
|
|
228
|
+
- **tactical-queen** - Ausführungs-fokussierte Planung
|
|
229
|
+
- **adaptive-queen** - Selbst-optimierend mit Feedback-Loops
|
|
230
|
+
|
|
231
|
+
### Worker (Ausführungs-Ebene)
|
|
232
|
+
- **researcher** - Codebase-Analyse & Dokumentation
|
|
233
|
+
- **coder** - Implementierungs-Spezialist
|
|
234
|
+
- **tester** - Test-Generierung & Validierung
|
|
235
|
+
- **architect** - System-Design & Patterns
|
|
236
|
+
- **reviewer** - Code-Review & Qualitätssicherung
|
|
237
|
+
- **analyst** - Anforderungsanalyse
|
|
238
|
+
- **optimizer** - Performance-Optimierung
|
|
239
|
+
- **documenter** - Dokumentations-Generierung
|
|
240
|
+
|
|
241
|
+
### Swarm-Spezialisten
|
|
242
|
+
- **swarm-planner** - Swarm-spezifische Planung
|
|
243
|
+
- **swarm-implementer** - Multi-Agent-Ausführung
|
|
244
|
+
- **swarm-reviewer** - Swarm-Output-Review
|
|
245
|
+
- **swarm-master** - Benutzeroberfläche & Delegation
|
|
246
|
+
|
|
247
|
+
</details>
|
|
248
|
+
|
|
249
|
+
<details open>
|
|
250
|
+
<summary>🇬🇧 <strong>Available Agents</strong> | Verfügbare Agents</summary>
|
|
251
|
+
|
|
252
|
+
### Queens (Strategic Layer)
|
|
253
|
+
- **strategic-queen** - High-level planning & decomposition
|
|
254
|
+
- **tactical-queen** - Execution-focused planning
|
|
255
|
+
- **adaptive-queen** - Self-optimizing with feedback loops
|
|
256
|
+
|
|
257
|
+
### Workers (Execution Layer)
|
|
258
|
+
- **researcher** - Codebase analysis & documentation
|
|
259
|
+
- **coder** - Implementation specialist
|
|
260
|
+
- **tester** - Test generation & validation
|
|
261
|
+
- **architect** - System design & patterns
|
|
262
|
+
- **reviewer** - Code review & quality assurance
|
|
263
|
+
- **analyst** - Requirements analysis
|
|
264
|
+
- **optimizer** - Performance optimization
|
|
265
|
+
- **documenter** - Documentation generation
|
|
266
|
+
|
|
267
|
+
### Swarm Specialists
|
|
268
|
+
- **swarm-planner** - Swarm-specific planning
|
|
269
|
+
- **swarm-implementer** - Multi-agent execution
|
|
270
|
+
- **swarm-reviewer** - Swarm output review
|
|
271
|
+
- **swarm-master** - User interface & delegation
|
|
272
|
+
|
|
273
|
+
</details>
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
<details>
|
|
278
|
+
<summary>🇩🇪 <strong>Befehle</strong> | Commands</summary>
|
|
279
|
+
|
|
280
|
+
| Befehl | Beschreibung |
|
|
281
|
+
|--------|-------------|
|
|
282
|
+
| `/swarm_run` | Task mit dem Swarm ausführen |
|
|
283
|
+
| `/swarm_logs` | Ausführungs-Logs abrufen |
|
|
284
|
+
| `/swarm_debug` | Diagnose ausführen |
|
|
285
|
+
|
|
286
|
+
### Befehls-Optionen
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
/swarm_run
|
|
290
|
+
task="Deine Task-Beschreibung" # Erforderlich
|
|
291
|
+
mode=hierarchical|mesh # Workflow-Modus
|
|
292
|
+
consensus=byzantine|voting # Konsens-Typ
|
|
293
|
+
depth=3 # Planungs-Tiefe
|
|
294
|
+
verbose=true # Detaillierte Ausgabe
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
</details>
|
|
298
|
+
|
|
299
|
+
<details open>
|
|
300
|
+
<summary>🇬🇧 <strong>Commands</strong> | Befehle</summary>
|
|
301
|
+
|
|
302
|
+
| Command | Description |
|
|
303
|
+
|---------|-------------|
|
|
304
|
+
| `/swarm_run` | Execute a task with the swarm |
|
|
305
|
+
| `/swarm_logs` | Retrieve execution logs |
|
|
306
|
+
| `/swarm_debug` | Run diagnostics |
|
|
307
|
+
|
|
308
|
+
### Command Options
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
/swarm_run
|
|
312
|
+
task="Your task description" # Required
|
|
313
|
+
mode=hierarchical|mesh # Workflow mode
|
|
314
|
+
consensus=byzantine|voting # Consensus type
|
|
315
|
+
depth=3 # Planning depth
|
|
316
|
+
verbose=true # Detailed output
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
</details>
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
<details>
|
|
324
|
+
<summary>🇩🇪 <strong>Projektstruktur</strong> | Project Structure</summary>
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
OpenCode-Swarm/
|
|
328
|
+
├── .opencode/
|
|
329
|
+
│ ├── agents/ # 14 Agent-Definitionen
|
|
330
|
+
│ ├── plugins/swarm/ # Plugin-Implementierung
|
|
331
|
+
│ ├── swarm/
|
|
332
|
+
│ │ ├── core/ # Core-Orchestrierung (~11.200 Zeilen)
|
|
333
|
+
│ │ ├── adapters/ # Plattform-Adapter
|
|
334
|
+
│ │ └── modules/ # Erweiterungssystem
|
|
335
|
+
│ └── commands/ # Debug-Befehle
|
|
336
|
+
├── .github/ # GitHub-Templates
|
|
337
|
+
├── CHANGELOG.md # Versions-Historie
|
|
338
|
+
├── ROADMAP.md # Feature-Roadmap
|
|
339
|
+
└── FEATURE_BRAINSTORMING.md # Zukünftige Features
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
</details>
|
|
343
|
+
|
|
344
|
+
<details open>
|
|
345
|
+
<summary>🇬🇧 <strong>Project Structure</strong> | Projektstruktur</summary>
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
OpenCode-Swarm/
|
|
349
|
+
├── .opencode/
|
|
350
|
+
│ ├── agents/ # 14 agent definitions
|
|
351
|
+
│ ├── plugins/swarm/ # Plugin implementation
|
|
352
|
+
│ ├── swarm/
|
|
353
|
+
│ │ ├── core/ # Core orchestration (~11,200 lines)
|
|
354
|
+
│ │ ├── adapters/ # Platform adapters
|
|
355
|
+
│ │ └── modules/ # Extension system
|
|
356
|
+
│ └── commands/ # Debug commands
|
|
357
|
+
├── .github/ # GitHub templates
|
|
358
|
+
├── CHANGELOG.md # Version history
|
|
359
|
+
├── ROADMAP.md # Feature roadmap
|
|
360
|
+
└── FEATURE_BRAINSTORMING.md # Future ideas
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
</details>
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
<details>
|
|
368
|
+
<summary>🇩🇪 <strong>Dokumentation</strong> | Documentation</summary>
|
|
369
|
+
|
|
370
|
+
| Dokument | Beschreibung |
|
|
371
|
+
|----------|-------------|
|
|
372
|
+
| [ROADMAP.md](ROADMAP.md) | Entwicklungs-Roadmap & Meilensteine |
|
|
373
|
+
| [CHANGELOG.md](CHANGELOG.md) | Versions-Historie & Änderungen |
|
|
374
|
+
| [FEATURE_BRAINSTORMING.md](FEATURE_BRAINSTORMING.md) | Zukünftige Feature-Ideen |
|
|
375
|
+
| [SWARM_ARCHITECTURE_REPORT.md](SWARM_ARCHITECTURE_REPORT.md) | Detaillierte Architektur-Analyse |
|
|
376
|
+
| [TEST_PLAN.md](TEST_PLAN.md) | Test-Strategie & Validierung |
|
|
377
|
+
|
|
378
|
+
</details>
|
|
379
|
+
|
|
380
|
+
<details open>
|
|
381
|
+
<summary>🇬🇧 <strong>Documentation</strong> | Dokumentation</summary>
|
|
382
|
+
|
|
383
|
+
| Document | Description |
|
|
384
|
+
|----------|-------------|
|
|
385
|
+
| [ROADMAP.md](ROADMAP.md) | Development roadmap & milestones |
|
|
386
|
+
| [CHANGELOG.md](CHANGELOG.md) | Version history & changes |
|
|
387
|
+
| [FEATURE_BRAINSTORMING.md](FEATURE_BRAINSTORMING.md) | Future feature ideas |
|
|
388
|
+
| [SWARM_ARCHITECTURE_REPORT.md](SWARM_ARCHITECTURE_REPORT.md) | Detailed architecture analysis |
|
|
389
|
+
| [TEST_PLAN.md](TEST_PLAN.md) | Testing strategy & validation |
|
|
390
|
+
|
|
391
|
+
</details>
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
<details>
|
|
396
|
+
<summary>🇩🇪 <strong>Tests</strong> | Testing</summary>
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
# Einfachen Test ausführen
|
|
400
|
+
/swarm_run task="Teste Grundfunktionalität"
|
|
401
|
+
|
|
402
|
+
# Parallelen Ausführungs-Test ausführen
|
|
403
|
+
/swarm_run task="Teste parallele Worker" mode=mesh
|
|
404
|
+
|
|
405
|
+
# System-Status prüfen
|
|
406
|
+
/swarm_debug
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
</details>
|
|
410
|
+
|
|
411
|
+
<details open>
|
|
412
|
+
<summary>🇬🇧 <strong>Testing</strong> | Tests</summary>
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
# Run simple test
|
|
416
|
+
/swarm_run task="Test basic functionality"
|
|
417
|
+
|
|
418
|
+
# Run parallel execution test
|
|
419
|
+
/swarm_run task="Test parallel workers" mode=mesh
|
|
420
|
+
|
|
421
|
+
# Check system health
|
|
422
|
+
/swarm_debug
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
</details>
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
<details>
|
|
430
|
+
<summary>🇩🇪 <strong>Performance</strong> | Performance</summary>
|
|
431
|
+
|
|
432
|
+
- **Ausführungszeit:** 4-5 Minuten für komplexe Tasks
|
|
433
|
+
- **Erfolgsrate:** >90%% für gut definierte Tasks
|
|
434
|
+
- **Kosteneffizienz:** Intelligente Model-Tier-Auswahl
|
|
435
|
+
- **Parallelisierung:** Bis zu 8 gleichzeitige Worker
|
|
436
|
+
|
|
437
|
+
</details>
|
|
438
|
+
|
|
439
|
+
<details open>
|
|
440
|
+
<summary>🇬🇧 <strong>Performance</strong> | Performance</summary>
|
|
441
|
+
|
|
442
|
+
- **Execution Time:** 4-5 minutes for complex tasks
|
|
443
|
+
- **Success Rate:** >90% for well-defined tasks
|
|
444
|
+
- **Cost Efficiency:** Smart model tier selection
|
|
445
|
+
- **Parallelism:** Up to 8 concurrent workers
|
|
446
|
+
|
|
447
|
+
</details>
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
<details>
|
|
452
|
+
<summary>🇩🇪 <strong>Mitwirken</strong> | Contributing</summary>
|
|
453
|
+
|
|
454
|
+
Mitwirkungen sind willkommen! Siehe unsere [GitHub Issues](https://github.com/RealBlxckCodex/OpenSwarm/issues) für:
|
|
455
|
+
|
|
456
|
+
- 🐛 Bug-Reports
|
|
457
|
+
- 💡 Feature-Requests
|
|
458
|
+
- 📖 Dokumentations-Verbesserungen
|
|
459
|
+
|
|
460
|
+
## 📝 Lizenz
|
|
461
|
+
|
|
462
|
+
Dieses Projekt ist unter der MIT-Lizenz lizenziert.
|
|
463
|
+
|
|
464
|
+
## 🙏 Danksagungen
|
|
465
|
+
|
|
466
|
+
- Gebaut für [OpenCode AI](https://opencode.ai)
|
|
467
|
+
- Inspiriert durch Multi-Agent-Forschung
|
|
468
|
+
- Dank an das OpenCode-Team für das `type: "subtask"` Pattern
|
|
469
|
+
|
|
470
|
+
</details>
|
|
471
|
+
|
|
472
|
+
<details open>
|
|
473
|
+
<summary>🇬🇧 <strong>Contributing</strong> | Mitwirken</summary>
|
|
474
|
+
|
|
475
|
+
Contributions are welcome! Please see our [GitHub Issues](https://github.com/RealBlxckCodex/OpenSwarm/issues) for:
|
|
476
|
+
|
|
477
|
+
- 🐛 Bug reports
|
|
478
|
+
- 💡 Feature requests
|
|
479
|
+
- 📖 Documentation improvements
|
|
480
|
+
|
|
481
|
+
## 📝 License
|
|
482
|
+
|
|
483
|
+
This project is licensed under the MIT License.
|
|
484
|
+
|
|
485
|
+
## 🙏 Acknowledgments
|
|
486
|
+
|
|
487
|
+
- Built for [OpenCode AI](https://opencode.ai)
|
|
488
|
+
- Inspired by multi-agent research
|
|
489
|
+
- Thanks to the OpenCode team for the `type: "subtask"` pattern
|
|
490
|
+
|
|
491
|
+
</details>
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
<p align="center">
|
|
496
|
+
<strong>🐝 Swarm Intelligence for Better Code 🐝</strong><br>
|
|
497
|
+
<em>🐝 Schwarm-Intelligenz für besseren Code 🐝</em>
|
|
498
|
+
</p>
|
|
499
|
+
|
|
500
|
+
<p align="center">
|
|
501
|
+
<a href="CHANGELOG.md">Changelog</a> •
|
|
502
|
+
<a href="ROADMAP.md">Roadmap</a> •
|
|
503
|
+
<a href="FEATURE_BRAINSTORMING.md">Ideas/Ideen</a>
|
|
504
|
+
</p>
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@realblxckcodex/opencode-swarm",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Multi-Agent Orchestration System with true subagent support for OpenCode AI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/**/*",
|
|
10
|
+
"README.md",
|
|
11
|
+
"LICENSE",
|
|
12
|
+
"CHANGELOG.md"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc -p tsconfig.json",
|
|
16
|
+
"test": "tsx --test .opencode/swarm/core/swarm-core.spec.ts",
|
|
17
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
18
|
+
"lint": "tsc --noEmit",
|
|
19
|
+
"release:check": "npm run typecheck && npm run test",
|
|
20
|
+
"ci:local": "npm run release:check",
|
|
21
|
+
"prepublishOnly": "npm run build && npm run release:check"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"opencode",
|
|
25
|
+
"swarm",
|
|
26
|
+
"multi-agent",
|
|
27
|
+
"orchestration",
|
|
28
|
+
"ai",
|
|
29
|
+
"llm",
|
|
30
|
+
"typescript",
|
|
31
|
+
"plugin"
|
|
32
|
+
],
|
|
33
|
+
"author": "Kevin (RealBlxckCodex) <your.email@example.com>",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/RealBlxckCodex/OpenSwarm.git"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/RealBlxckCodex/OpenSwarm/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/RealBlxckCodex/OpenSwarm#readme",
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=18.0.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@opencode-ai/plugin": "latest",
|
|
48
|
+
"@types/node": "^24.0.0",
|
|
49
|
+
"tsx": "^4.19.0",
|
|
50
|
+
"typescript": "^5.8.0"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"zod": "^4.3.6"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
}
|
|
58
|
+
}
|