opencode-swarm 6.13.3 → 6.14.11

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2025
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 CHANGED
@@ -76,7 +76,7 @@ This checks that everything is wired up correctly.
76
76
 
77
77
  ### Configure Models (Optional)
78
78
 
79
- By default, Swarm uses whatever model OpenCode is configured with. To route different agents to different models (recommended), create `.opencode/swarm.json` in your project:
79
+ By default, Swarm v6.14+ uses free OpenCode Zen models (no API key required). You can override any agent's model by creating `.opencode/swarm.json` in your project. See the [LLM Provider Guide](#llm-provider-guide) for all options.
80
80
 
81
81
  ```json
82
82
  {
@@ -127,6 +127,60 @@ Use `/swarm status` at any time to see where things stand.
127
127
 
128
128
  ---
129
129
 
130
+ ## LLM Provider Guide
131
+
132
+ Swarm works with any LLM provider supported by OpenCode. Different agents benefit from different models — the architect needs strong reasoning, the coder needs strong code generation, and the reviewer benefits from a model different from the coder (to catch blind spots).
133
+
134
+ ### Free Tier (OpenCode Zen Models)
135
+
136
+ OpenCode Zen provides free models via the `opencode/` provider prefix. These are excellent starting points and require no API key:
137
+
138
+ ```json
139
+ {
140
+ "agents": {
141
+ "coder": { "model": "opencode/minimax-m2.5-free" },
142
+ "reviewer": { "model": "opencode/big-pickle" },
143
+ "test_engineer":{ "model": "opencode/gpt-5-nano" },
144
+ "explorer": { "model": "opencode/trinity-large-preview-free" },
145
+ "sme": { "model": "opencode/trinity-large-preview-free" },
146
+ "critic": { "model": "opencode/trinity-large-preview-free" },
147
+ "docs": { "model": "opencode/trinity-large-preview-free" },
148
+ "designer": { "model": "opencode/trinity-large-preview-free" }
149
+ }
150
+ }
151
+ ```
152
+
153
+ > Save this configuration to `.opencode/swarm.json` in your project root (or `~/.config/opencode/opencode-swarm.json` for global config).
154
+
155
+ > **Note:** The `architect` key is intentionally omitted — it inherits whatever model you have selected in the OpenCode UI for maximum reasoning quality.
156
+
157
+ ### Paid Providers
158
+
159
+ For production use, mix providers to maximize quality across writing vs. reviewing:
160
+
161
+ | Agent | Recommended Model | Why |
162
+ |---|---|---|
163
+ | `architect` | OpenCode UI selection | Needs strongest reasoning |
164
+ | `coder` | `minimax-coding-plan/MiniMax-M2.5` | Fast, accurate code generation |
165
+ | `reviewer` | `zai-coding-plan/glm-5` | Different training data from coder |
166
+ | `test_engineer` | `minimax-coding-plan/MiniMax-M2.5` | Same strengths as coder |
167
+ | `explorer` | `google/gemini-2.5-flash` | Fast read-heavy analysis |
168
+ | `sme` | `kimi-for-coding/k2p5` | Strong domain expertise |
169
+ | `critic` | `zai-coding-plan/glm-5` | Independent plan review |
170
+ | `docs` | `zai-coding-plan/glm-4.7-flash` | Fast, cost-effective documentation generation |
171
+ | `designer` | `kimi-for-coding/k2p5` | Strong UI/UX generation capabilities |
172
+
173
+ ### Provider Formats
174
+
175
+ | Provider | Format | Example |
176
+ |---|---|---|
177
+ | OpenCode Zen (free) | `opencode/<model>` | `opencode/trinity-large-preview-free` |
178
+ | Anthropic | `anthropic/<model>` | `anthropic/claude-opus-4-6` |
179
+ | Google | `google/<model>` | `google/gemini-2.5-flash` |
180
+ | Z.ai | `zai-coding-plan/<model>` | `zai-coding-plan/glm-5` |
181
+ | MiniMax | `minimax-coding-plan/<model>` | `minimax-coding-plan/MiniMax-M2.5` |
182
+ | Kimi | `kimi-for-coding/<model>` | `kimi-for-coding/k2p5` |
183
+
130
184
  ## Useful Commands
131
185
 
132
186
  | Command | What It Does |
@@ -381,6 +435,35 @@ Config file location: `~/.config/opencode/opencode-swarm.json` (global) or `.ope
381
435
 
382
436
  ### Automation
383
437
 
438
+ ## Mode Detection (v6.13)
439
+
440
+ Swarm now explicitly distinguishes five architect modes:
441
+
442
+ - **`DISCOVER`** — After the explorer finishes scanning the codebase.
443
+ - **`PLAN`** — When the architect writes or updates the plan.
444
+ - **`EXECUTE`** — During task implementation (the normal pipeline).
445
+ - **`PHASE-WRAP`** — After all tasks in a phase are completed, before docs are updated.
446
+ - **`UNKNOWN`** — Fallback when the current state does not match any known mode.
447
+
448
+ Each mode determines which injection blocks are added to the LLM prompt (e.g., plan cursor is injected in `PLAN`, tool output truncation in `EXECUTE`, etc.).
449
+
450
+ Default mode: `manual`. No background automation — all actions require explicit slash commands.
451
+
452
+ Modes:
453
+
454
+ - `manual` — No background automation. All actions via slash commands (default).
455
+ - `hybrid` — Background automation for safe operations, manual for sensitive ones.
456
+ - `auto` — Full background automation.
457
+
458
+ Capability defaults:
459
+
460
+ - `plan_sync`: `true` — Background plan synchronization using `fs.watch` with debounced writes (300ms) and 2-second polling fallback
461
+ - `phase_preflight`: `false` — Phase preflight checks before agent execution (opt-in)
462
+ - `config_doctor_on_startup`: `false` — Validate configuration on startup
463
+ - `config_doctor_autofix`: `false` — Auto-fix for config doctor (opt-in, security-sensitive)
464
+ - `evidence_auto_summaries`: `true` — Automatic summaries for evidence bundles
465
+ - `decision_drift_detection`: `true` — Detect drift between planned and actual decisions
466
+
384
467
  ## Plan Cursor (v6.13)
385
468
 
386
469
  The `plan_cursor` config compresses the plan that is injected into the LLM context.
@@ -429,37 +512,6 @@ When truncation is active, a footer is appended:
429
512
  [output truncated to {maxLines} lines – use `tool_output.per_tool.<tool>` to adjust]
430
513
  ```
431
514
 
432
- ## Mode Detection (v6.13)
433
-
434
- Swarm now explicitly distinguishes five architect modes:
435
-
436
- | Mode | When Injected |
437
- |------|----------------|
438
- | `DISCOVER` | After the explorer finishes scanning the codebase. |
439
- | `PLAN` | When the architect writes or updates the plan. |
440
- | `EXECUTE` | During task implementation (the normal pipeline). |
441
- | `PHASE-WRAP` | After all tasks in a phase are completed, before docs are updated. |
442
- | `UNKNOWN` | Fallback when the current state does not match any known mode. |
443
-
444
- Each mode determines which injection blocks are added to the LLM prompt (e.g., plan cursor is injected in `PLAN`, tool output truncation in `EXECUTE`, etc.).
445
-
446
- Default mode: `manual`. No background automation — all actions require explicit slash commands.
447
-
448
- Modes:
449
-
450
- - `manual` — No background automation. All actions via slash commands (default).
451
- - `hybrid` — Background automation for safe operations, manual for sensitive ones.
452
- - `auto` — Full background automation.
453
-
454
- Capability defaults:
455
-
456
- - `plan_sync`: `true` — Background plan synchronization using `fs.watch` with debounced writes (300ms) and 2-second polling fallback
457
- - `phase_preflight`: `false` — Phase preflight checks before agent execution (opt-in)
458
- - `config_doctor_on_startup`: `false` — Validate configuration on startup
459
- - `config_doctor_autofix`: `false` — Auto-fix for config doctor (opt-in, security-sensitive)
460
- - `evidence_auto_summaries`: `true` — Automatic summaries for evidence bundles
461
- - `decision_drift_detection`: `true` — Detect drift between planned and actual decisions
462
-
463
515
  ---
464
516
 
465
517
  ### Disabling Agents
@@ -671,6 +723,7 @@ Upcoming: v6.14 focuses on further context optimization and agent coordination i
671
723
  - [Design Rationale](docs/design-rationale.md)
672
724
  - [Installation Guide](docs/installation.md)
673
725
  - [Linux + Docker Desktop Install Guide](docs/installation-linux-docker.md)
726
+ - [LLM Operator Installation Guide](docs/installation-llm-operator.md)
674
727
  - [Pre-Swarm Planning Guide](docs/planning.md)
675
728
  - [Swarm Briefing for LLMs](docs/swarm-briefing.md)
676
729
 
package/dist/cli/index.js CHANGED
@@ -53,11 +53,14 @@ async function install() {
53
53
  if (!fs.existsSync(PLUGIN_CONFIG_PATH)) {
54
54
  const defaultConfig = {
55
55
  agents: {
56
- architect: { model: "anthropic/claude-sonnet-4-20250514" },
57
- coder: { model: "anthropic/claude-sonnet-4-20250514" },
58
- sme: { model: "google/gemini-2.5-flash" },
59
- reviewer: { model: "google/gemini-2.5-flash" },
60
- test_engineer: { model: "google/gemini-2.5-flash" }
56
+ coder: { model: "opencode/minimax-m2.5-free" },
57
+ reviewer: { model: "opencode/big-pickle" },
58
+ test_engineer: { model: "opencode/gpt-5-nano" },
59
+ explorer: { model: "opencode/trinity-large-preview-free" },
60
+ sme: { model: "opencode/trinity-large-preview-free" },
61
+ critic: { model: "opencode/trinity-large-preview-free" },
62
+ docs: { model: "opencode/trinity-large-preview-free" },
63
+ designer: { model: "opencode/trinity-large-preview-free" }
61
64
  },
62
65
  max_iterations: 5
63
66
  };