opencode-swarm 7.18.3 → 7.19.1
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/README.md +22 -35
- package/dist/cli/index.js +755 -480
- package/dist/commands/command-dispatch.d.ts +33 -0
- package/dist/commands/council.d.ts +1 -1
- package/dist/commands/doctor.d.ts +2 -7
- package/dist/commands/index.d.ts +11 -2
- package/dist/commands/registry.d.ts +0 -1
- package/dist/commands/tool-policy.d.ts +6 -0
- package/dist/config/plan-schema.d.ts +8 -0
- package/dist/evidence/lock.d.ts +1 -1
- package/dist/gate-evidence.d.ts +2 -2
- package/dist/hooks/guardrails.d.ts +21 -0
- package/dist/hooks/system-enhancer.d.ts +19 -0
- package/dist/index.js +2318 -2370
- package/dist/plan/ledger.d.ts +8 -3
- package/dist/plan/manager.d.ts +52 -0
- package/dist/services/config-doctor.d.ts +2 -15
- package/dist/services/evidence-service.d.ts +8 -0
- package/dist/services/plan-service.d.ts +16 -0
- package/dist/services/status-service.d.ts +8 -0
- package/dist/state/agent-run-context.d.ts +4 -4
- package/dist/state.d.ts +13 -8
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/save-plan.d.ts +19 -0
- package/dist/tools/swarm-command.d.ts +3 -0
- package/dist/tools/tool-names.d.ts +1 -1
- package/dist/tools/update-task-status.d.ts +1 -1
- package/dist/tools/write-final-council-evidence.d.ts +0 -12
- package/dist/types/events.d.ts +21 -1
- package/package.json +1 -1
- package/dist/parallel/runtime-config.d.ts +0 -11
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ bunx opencode-swarm install
|
|
|
24
24
|
|
|
25
25
|
> This single command installs the package, registers it as an OpenCode plugin, disables conflicting default agents, and creates a ready-to-edit config at `~/.config/opencode/opencode-swarm.json`. Requires [Bun](https://bun.sh) (`bun --version` to check). If you must use npm: `npm install -g opencode-swarm && opencode-swarm install`.
|
|
26
26
|
|
|
27
|
-
> ⚠️ **
|
|
27
|
+
> ⚠️ **On first run, Swarm auto-selects the architect and shows a welcome message.** The default OpenCode `Build` and `Plan` modes **bypass this plugin entirely** — none of the gates, reviewers, or test agents below run. If you ever need to switch architect manually, open the OpenCode mode/agent picker and choose the Swarm architect; it then coordinates every other agent automatically. If you ever see Swarm "do nothing," this is almost always the cause.
|
|
28
28
|
|
|
29
29
|
### Why Swarm?
|
|
30
30
|
|
|
@@ -41,7 +41,7 @@ Most AI coding tools let one model write code and ask that same model whether th
|
|
|
41
41
|
- 🆓 **Free tier** — works with OpenCode Zen's free model roster
|
|
42
42
|
- ⚙️ **Fully configurable** — override any agent's model, disable agents, tune guardrails
|
|
43
43
|
|
|
44
|
-
> **The Swarm architect coordinates all other agents automatically
|
|
44
|
+
> **The Swarm architect is auto-selected on first run and coordinates all other agents automatically.** You never manually switch between internal roles. If you use the default OpenCode `Build` / `Plan` modes, the plugin is bypassed entirely (see the install warning above).
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -126,9 +126,9 @@ The 15-minute guide covers:
|
|
|
126
126
|
- Troubleshooting common issues
|
|
127
127
|
|
|
128
128
|
On first run, Swarm automatically:
|
|
129
|
-
- Creates project config at `.opencode/opencode-swarm.json`
|
|
130
|
-
-
|
|
131
|
-
- Shows a welcome message with next steps
|
|
129
|
+
- Creates project config at `.opencode/opencode-swarm.json` with all agents enabled
|
|
130
|
+
- Selects the Swarm architect as the default
|
|
131
|
+
- Shows a welcome message with next steps
|
|
132
132
|
|
|
133
133
|
---
|
|
134
134
|
|
|
@@ -142,7 +142,8 @@ No animated GIF is shipped in the repo — instead, here is the exact terminal s
|
|
|
142
142
|
# 1. Install the plugin (5s)
|
|
143
143
|
bunx opencode-swarm install
|
|
144
144
|
|
|
145
|
-
# 2. Open opencode
|
|
145
|
+
# 2. Open opencode — Swarm auto-selects architect on first run
|
|
146
|
+
# (the architect is auto-selected; manual selection is only needed to override)
|
|
146
147
|
opencode
|
|
147
148
|
|
|
148
149
|
# 3. Inside the OpenCode session, verify Swarm is live (5s)
|
|
@@ -166,7 +167,7 @@ Build me a JWT auth helper with tests.
|
|
|
166
167
|
│ ✓ created .opencode/opencode-swarm.json │
|
|
167
168
|
│ │
|
|
168
169
|
│ $ opencode │
|
|
169
|
-
│ [Swarm] Welcome!
|
|
170
|
+
│ [Swarm] Welcome! Architect auto-selected. Type /swarm help │
|
|
170
171
|
│ │
|
|
171
172
|
│ > /swarm help │
|
|
172
173
|
│ Available commands: status, plan, agents, help, diagnose... │
|
|
@@ -217,7 +218,7 @@ in your `opencode-swarm.json`.
|
|
|
217
218
|
|
|
218
219
|
## Commands
|
|
219
220
|
|
|
220
|
-
|
|
221
|
+
All 43 subcommands at a glance:
|
|
221
222
|
|
|
222
223
|
```bash
|
|
223
224
|
/swarm help [command] # List all commands or get detailed help for a specific command
|
|
@@ -231,17 +232,9 @@ Core subcommands at a glance:
|
|
|
231
232
|
|
|
232
233
|
Use `/swarm help` to see all available commands categorized by function. Use `/swarm help <command>` for detailed usage information on a specific command.
|
|
233
234
|
|
|
234
|
-
> ⚠️ **Chat-typed `/swarm` is currently LLM-mediated.** The OpenCode runtime invokes the model unconditionally after the plugin handles a `command.execute.before` slash command (upstream issue [anomalyco/opencode#9306](https://github.com/anomalyco/opencode/issues/9306)). What you see in chat is the model's reformulation of the canonical handler output, which can drift on weak models or in long sessions. For deterministic, scriptable output, run the underlying command directly:
|
|
235
|
-
>
|
|
236
|
-
> ```bash
|
|
237
|
-
> bunx opencode-swarm run <subcommand> # e.g. bunx opencode-swarm run agents
|
|
238
|
-
> ```
|
|
239
|
-
>
|
|
240
|
-
> This is a temporary mitigation. A deterministic in-chat path (either a `swarm` MCP tool or upstream `noReply` support) is tracked separately.
|
|
241
|
-
|
|
242
235
|
Nine commands display a ⚠️ warning in help output because they share names with Claude Code built-in slash commands (e.g., `/plan`, `/reset`, `/status`). The warning reminds you to always use `/swarm <command>` — the bare CC command does something different and sometimes destructive. See [docs/commands.md#claude-code-command-conflicts](docs/commands.md#claude-code-command-conflicts) for the full conflict registry.
|
|
243
236
|
|
|
244
|
-
See [docs/commands.md](docs/commands.md) for the full
|
|
237
|
+
See [docs/commands.md](docs/commands.md) for the full reference (43 commands).
|
|
245
238
|
|
|
246
239
|
## Command Aliases
|
|
247
240
|
|
|
@@ -375,14 +368,11 @@ No API key required. Excellent starting point:
|
|
|
375
368
|
"agents": {
|
|
376
369
|
"coder": { "model": "opencode/minimax-m2.5-free" },
|
|
377
370
|
"reviewer": { "model": "opencode/big-pickle" },
|
|
378
|
-
"critic": { "model": "opencode/big-pickle" },
|
|
379
371
|
"explorer": { "model": "opencode/big-pickle" }
|
|
380
372
|
}
|
|
381
373
|
}
|
|
382
374
|
```
|
|
383
375
|
|
|
384
|
-
Zen's roster changes. Always confirm current IDs with `/models` in OpenCode or `https://opencode.ai/zen/v1/models` before pasting a model into config. Do not copy private workspace providers such as `grove-openai/*` unless that provider appears in your own OpenCode model list.
|
|
385
|
-
|
|
386
376
|
### Paid Providers
|
|
387
377
|
|
|
388
378
|
For production, mix providers by role:
|
|
@@ -391,14 +381,11 @@ For production, mix providers by role:
|
|
|
391
381
|
|---|---|---|
|
|
392
382
|
| architect | OpenCode UI selection | Needs strongest reasoning |
|
|
393
383
|
| coder | minimax-coding-plan/MiniMax-M2.5 | Fast, accurate code generation |
|
|
394
|
-
|
|
|
395
|
-
|
|
|
396
|
-
| test_engineer | opencode/big-pickle or another model distinct from coder | Catches test blind spots |
|
|
384
|
+
| reviewer | zai-coding-plan/glm-5 | Different training from coder |
|
|
385
|
+
| test_engineer | minimax-coding-plan/MiniMax-M2.5 | Same strengths as coder |
|
|
397
386
|
| explorer | google/gemini-2.5-flash | Fast read-heavy analysis |
|
|
398
387
|
| sme | kimi-for-coding/k2p5 | Strong domain expertise |
|
|
399
388
|
|
|
400
|
-
Model assignment rule of thumb: architect and critic should be your strongest pair, and they should not be the same blind spot. Coder/test_engineer can be faster coding models; explorer/docs/curator can be cheaper readers. Do not put a premium model on `designer` while leaving `critic` on a weaker model.
|
|
401
|
-
|
|
402
389
|
### Provider Formats
|
|
403
390
|
|
|
404
391
|
| Provider | Format | Example |
|
|
@@ -419,7 +406,7 @@ Automatic fallback to a secondary model on transient errors:
|
|
|
419
406
|
"agents": {
|
|
420
407
|
"coder": {
|
|
421
408
|
"model": "anthropic/claude-sonnet-4-20250514",
|
|
422
|
-
"fallback_models": ["opencode/
|
|
409
|
+
"fallback_models": ["opencode/gpt-5-nano"]
|
|
423
410
|
}
|
|
424
411
|
}
|
|
425
412
|
}
|
|
@@ -1157,15 +1144,15 @@ Config file location: `~/.config/opencode/opencode-swarm.json` (global) or `.ope
|
|
|
1157
1144
|
```json
|
|
1158
1145
|
{
|
|
1159
1146
|
"agents": {
|
|
1160
|
-
"architect": { "model": "
|
|
1161
|
-
"coder": { "model": "
|
|
1162
|
-
"explorer": { "model": "
|
|
1163
|
-
"sme": { "model": "
|
|
1164
|
-
"critic": { "model": "
|
|
1147
|
+
"architect": { "model": "anthropic/claude-opus-4-6" },
|
|
1148
|
+
"coder": { "model": "minimax-coding-plan/MiniMax-M2.5", "fallback_models": ["minimax-coding-plan/MiniMax-M2.1"] },
|
|
1149
|
+
"explorer": { "model": "minimax-coding-plan/MiniMax-M2.1" },
|
|
1150
|
+
"sme": { "model": "kimi-for-coding/k2p5" },
|
|
1151
|
+
"critic": { "model": "zai-coding-plan/glm-5" },
|
|
1165
1152
|
"reviewer": { "model": "zai-coding-plan/glm-5", "fallback_models": ["opencode/big-pickle"] },
|
|
1166
|
-
"test_engineer": { "model": "
|
|
1167
|
-
"docs": { "model": "
|
|
1168
|
-
"designer": { "model": "
|
|
1153
|
+
"test_engineer": { "model": "minimax-coding-plan/MiniMax-M2.5" },
|
|
1154
|
+
"docs": { "model": "zai-coding-plan/glm-4.7-flash" },
|
|
1155
|
+
"designer": { "model": "kimi-for-coding/k2p5" }
|
|
1169
1156
|
},
|
|
1170
1157
|
"guardrails": {
|
|
1171
1158
|
"max_tool_calls": 200,
|
|
@@ -1414,7 +1401,7 @@ bun test
|
|
|
1414
1401
|
- [Installation Guide](docs/installation.md) — comprehensive reference
|
|
1415
1402
|
- [Architecture Deep Dive](docs/architecture.md) — control model, pipeline, tools
|
|
1416
1403
|
- [Design Rationale](docs/design-rationale.md) — why every major decision
|
|
1417
|
-
- [Commands Reference](docs/commands.md) —
|
|
1404
|
+
- [Commands Reference](docs/commands.md) — all 41 `/swarm` subcommands
|
|
1418
1405
|
- [Modes Guide](docs/modes.md) — session modes (Turbo, Full-Auto) and project modes (strict/balanced/fast)
|
|
1419
1406
|
- [Configuration](docs/configuration.md) — all config keys and examples
|
|
1420
1407
|
- [Planning Guide](docs/planning.md) — task format, phase structure, sizing
|