@hueyexe/opencode-ensemble 0.20.0 → 0.21.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/README.md +29 -16
- package/dist/index.js +13617 -13116
- package/package.json +1 -1
- package/src/config.ts +33 -0
- package/src/dashboard-html.ts +34 -1
- package/src/dashboard-js-events.ts +9 -0
- package/src/dashboard-js-graph-layout.ts +40 -0
- package/src/dashboard-js-graph.ts +99 -0
- package/src/dashboard.ts +8 -19
- package/src/hooks.ts +3 -3
- package/src/index.ts +11 -23
- package/src/member-model.ts +107 -3
- package/src/messaging.ts +4 -2
- package/src/notify.ts +9 -18
- package/src/recovery.ts +23 -16
- package/src/schema.ts +4 -0
- package/src/system-prompt.ts +79 -50
- package/src/task-graph.ts +116 -0
- package/src/tools/team-broadcast.ts +21 -3
- package/src/tools/team-message.ts +4 -5
- package/src/tools/team-results.ts +15 -5
- package/src/tools/team-spawn.ts +41 -13
- package/src/tools/team-tasks-add.ts +41 -5
- package/src/tools/team-tasks-complete.ts +2 -1
- package/src/types.ts +1 -1
- package/src/v2-client.ts +5 -1
- package/src/v2-setup.ts +2 -2
- package/src/wake.ts +198 -0
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Built on the public OpenCode SDKs — no OpenCode internals. Runtime dependencie
|
|
|
20
20
|
Install the plugin and you're done:
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
opencode plugin add @hueyexe/opencode-ensemble@
|
|
23
|
+
opencode plugin add @hueyexe/opencode-ensemble@latest
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Then restart OpenCode and ask it to do something that benefits from parallel work. The agent handles the rest. See [Install](#install) for worktree permissions and other options.
|
|
@@ -148,21 +148,26 @@ A real-time mission control dashboard runs at `http://localhost:4747` while Open
|
|
|
148
148
|
- **Agent cards** — status, current task, activity sparklines, timing. Click to open detail drawer
|
|
149
149
|
- **Agent drawer** — full prompt, model, execution status, chat-style message history with markdown rendering
|
|
150
150
|
- **Task board** — progress bar, collapsible status groups, dependency arrows
|
|
151
|
+
- **Dependency graph tab** — task cards with agent ownership, prerequisite arrows,
|
|
152
|
+
dependency inspection, live updates, and missing/cyclic dependency warnings
|
|
151
153
|
- **Activity feed** — chat-style message bubbles with avatars, expandable with full markdown
|
|
152
154
|
- **Timeline** — horizontal event strip showing spawns, messages, completions, shutdowns
|
|
153
155
|
- **Keyboard shortcuts** — `j/k` navigate agents, `Enter` opens drawer, `Esc` closes, `?` shows help
|
|
154
156
|
- **Live clock** — current time + team session duration
|
|
155
157
|
- **Project outline** — collapsible per-project grouping when teams span multiple working directories
|
|
156
158
|
|
|
159
|
+
The **Dependency graph** tab lays out every task as a card, with arrows from each prerequisite to its dependent, live agent ownership/status, a detail panel for prerequisites and dependents, and warnings for missing or cyclic dependency IDs. Add dependencies with the `depends_on` field on `team_tasks_add`.
|
|
160
|
+
|
|
157
161
|
Configure the port in `.opencode/ensemble.json`:
|
|
158
162
|
|
|
159
163
|
```json
|
|
160
164
|
{
|
|
161
|
-
"dashboardPort": 4747
|
|
165
|
+
"dashboardPort": 4747,
|
|
166
|
+
"dashboardHost": "127.0.0.1"
|
|
162
167
|
}
|
|
163
168
|
```
|
|
164
169
|
|
|
165
|
-
Set to `0` to disable. The dashboard starts automatically when OpenCode loads the plugin.
|
|
170
|
+
Set `dashboardPort` to `0` to disable. The dashboard starts automatically when OpenCode loads the plugin. `dashboardHost` defaults to loopback; changing it can expose dashboard data to other machines on your network.
|
|
166
171
|
|
|
167
172
|
## Install
|
|
168
173
|
|
|
@@ -180,19 +185,19 @@ The plugin uses SQLite via the host's runtime adapter:
|
|
|
180
185
|
The simplest install is the CLI (npm registry or Git package specifiers both work):
|
|
181
186
|
|
|
182
187
|
```sh
|
|
183
|
-
opencode plugin add @hueyexe/opencode-ensemble@
|
|
188
|
+
opencode plugin add @hueyexe/opencode-ensemble@latest
|
|
184
189
|
```
|
|
185
190
|
|
|
186
191
|
This installs globally and writes the config entry for you. To update later: `opencode plugin update @hueyexe/opencode-ensemble`.
|
|
187
192
|
|
|
188
|
-
**Manual config** — add to your OpenCode config with
|
|
193
|
+
**Manual config** — add to your OpenCode config with `@latest`, or pin an exact version for reproducibility. Project-level or global.
|
|
189
194
|
|
|
190
195
|
**Project-level** (`opencode.json` in your project root):
|
|
191
196
|
|
|
192
197
|
```jsonc
|
|
193
198
|
{
|
|
194
199
|
// OpenCode v2:
|
|
195
|
-
"plugins": ["@hueyexe/opencode-ensemble@
|
|
200
|
+
"plugins": ["@hueyexe/opencode-ensemble@latest"]
|
|
196
201
|
}
|
|
197
202
|
```
|
|
198
203
|
|
|
@@ -201,15 +206,13 @@ This installs globally and writes the config entry for you. To update later: `op
|
|
|
201
206
|
```jsonc
|
|
202
207
|
{
|
|
203
208
|
// OpenCode v1:
|
|
204
|
-
"plugin": ["@hueyexe/opencode-ensemble@
|
|
209
|
+
"plugin": ["@hueyexe/opencode-ensemble@latest"]
|
|
205
210
|
}
|
|
206
211
|
```
|
|
207
212
|
|
|
208
|
-
OpenCode auto-installs npm plugins at startup. To update,
|
|
209
|
-
|
|
210
|
-
**Why pin versions?** OpenCode has a [known bug](https://github.com/anomalyco/opencode/issues/6774) where unpinned plugins (e.g., `"@hueyexe/opencode-ensemble"`) get cached on first install and never auto-update, even after restarting. Pinning to a specific version avoids this — when you change the version string, OpenCode sees a new package spec and installs it fresh.
|
|
213
|
+
OpenCode auto-installs npm plugins at startup. To update, change the version spec in your config (or keep `@latest`) and restart OpenCode.
|
|
211
214
|
|
|
212
|
-
If
|
|
215
|
+
**If updates do not appear:** OpenCode has a [known bug](https://github.com/anomalyco/opencode/issues/6774) where unpinned plugins (e.g., `"@hueyexe/opencode-ensemble"`) get cached on first install and never auto-update, even after restarting. If you hit it, pin an exact version tag (for example, `@0.21.0`) and bump it when you upgrade, or clear the cache manually:
|
|
213
216
|
|
|
214
217
|
```bash
|
|
215
218
|
rm -rf ~/.cache/opencode/packages/@hueyexe
|
|
@@ -328,7 +331,7 @@ What you get:
|
|
|
328
331
|
|
|
329
332
|
## Model Selection
|
|
330
333
|
|
|
331
|
-
Control which AI models your agents use. By default,
|
|
334
|
+
Control which AI models your agents use. By default, teammates inherit the lead conversation's current model, read at spawn time (including its variant on v2). You can override this per-agent, per-agent-type, or with automatic rotation.
|
|
332
335
|
|
|
333
336
|
**All agents use the same model:**
|
|
334
337
|
```json
|
|
@@ -370,7 +373,8 @@ When `promptForModels` is true, the lead uses the question tool to ask which mod
|
|
|
370
373
|
2. `modelsByAgent` mapping for this agent type
|
|
371
374
|
3. `modelAssignment` strategy (`rotate` or `random` from `modelPool`)
|
|
372
375
|
4. `defaultModel`
|
|
373
|
-
5.
|
|
376
|
+
5. The lead conversation's current model at spawn time (including its variant on v2)
|
|
377
|
+
6. OpenCode's default model
|
|
374
378
|
|
|
375
379
|
The lead can always override by passing `model` directly on `team_spawn`, regardless of config.
|
|
376
380
|
|
|
@@ -393,11 +397,15 @@ Configure via JSON files, environment variables, or both. Project config overrid
|
|
|
393
397
|
"timeoutMs": 1800000,
|
|
394
398
|
"rateLimitCapacity": 10,
|
|
395
399
|
"dashboardPort": 4747,
|
|
400
|
+
"dashboardHost": "127.0.0.1",
|
|
396
401
|
"defaultModel": "anthropic/claude-sonnet-4-6",
|
|
397
402
|
"modelPool": ["anthropic/claude-opus-4-7", "anthropic/claude-sonnet-4-6", "openai/gpt-5.4"],
|
|
398
403
|
"modelsByAgent": {},
|
|
399
404
|
"modelAssignment": "default",
|
|
400
|
-
"promptForModels": false
|
|
405
|
+
"promptForModels": false,
|
|
406
|
+
"systemPromptTeamState": "full",
|
|
407
|
+
"taskDepthLimit": 0,
|
|
408
|
+
"taskDepthLimitOverflowAction": "lead_resolve"
|
|
401
409
|
}
|
|
402
410
|
```
|
|
403
411
|
|
|
@@ -414,11 +422,15 @@ All fields are optional. Missing fields use defaults.
|
|
|
414
422
|
| `timeoutMs` | `1800000` (30 min) | Hard timeout for busy teammates. `0` disables. |
|
|
415
423
|
| `rateLimitCapacity` | `10` | Token bucket capacity for team tool calls. `0` disables. |
|
|
416
424
|
| `dashboardPort` | `4747` | Dashboard server port. `0` disables. |
|
|
417
|
-
| `
|
|
425
|
+
| `dashboardHost` | `127.0.0.1` | Dashboard network interface to bind. Keep the loopback default unless you intend to expose the dashboard on your network. |
|
|
426
|
+
| `defaultModel` | `""` | Default model for all agents (e.g. `"anthropic/claude-sonnet-4-6"`). Empty = inherit the lead conversation's current model, then OpenCode's default. |
|
|
418
427
|
| `modelPool` | `[]` | List of models for rotation/random assignment. |
|
|
419
428
|
| `modelsByAgent` | `{}` | Map agent type to model (e.g. `{"build": "anthropic/claude-opus-4-7"}`). |
|
|
420
429
|
| `modelAssignment` | `"default"` | How to assign models: `"default"`, `"rotate"`, or `"random"`. |
|
|
421
430
|
| `promptForModels` | `false` | Lead asks user about model preferences before spawning. |
|
|
431
|
+
| `systemPromptTeamState` | `"full"` | Live team state in the system prompt: `"full"` (statuses, tasks, message payloads), `"state-only"` (no message payloads; use `team_results`), or `"off"` (stable role/workflow guidance only). Lower settings avoid provider prefix-cache invalidation on every state change. |
|
|
432
|
+
| `taskDepthLimit` | `0` (unlimited) | Maximum active task dependency depth, counting unresolved roots as depth 1. Completed/cancelled prerequisites are treated as resolved and do not accumulate into a lifetime chain. `team_tasks_add` rejects a batch that would exceed it, before writing anything. The issue #42 `depth_limit` alias is accepted. |
|
|
433
|
+
| `taskDepthLimitOverflowAction` | `"lead_resolve"` | `"lead_resolve"` tells the lead to split the work; `"user_resolve"` tells the lead to ask the user first. Both reject the over-limit batch. The issue #42 `depth_limit_overflow_action` alias is accepted. |
|
|
422
434
|
|
|
423
435
|
### Environment variables
|
|
424
436
|
|
|
@@ -456,7 +468,8 @@ STALL_THRESHOLD_MS=0
|
|
|
456
468
|
|
|
457
469
|
## Known limitations
|
|
458
470
|
|
|
459
|
-
- **
|
|
471
|
+
- **Lead agent/model preservation is best-effort (v1).** On v1, Ensemble reads the lead's current agent and model and passes them on teammate wake prompts, so a Plan lead normally stays in Plan. If OpenCode cannot report the selection, it may fall back to Build/default; pass an explicit `model` on `team_spawn` when this matters. V2 wakes are synthetic and do not switch the lead's agent/model.
|
|
472
|
+
- **Model variants are v2-only.** A `provider/model#variant` reference is forwarded to v2's `session.switchModel`; v1 hosts do not have a variant field and ignore the suffix.
|
|
460
473
|
- **Session switching is opt-in (v2).** `team_view` reports the teammate's session ID by default; it switches the user's client only when asked for with `navigate: true` — agents never hijack the client unprompted. The live sidebar (terminal only) shows member status on every client's dashboard at `http://localhost:4747`.
|
|
461
474
|
- **Per-session shell env is unavailable (v2).** The v2 shell hook carries no session ID, so `ENSEMBLE_*` variables are not injected into teammate shells. Team identity travels in prompts and tool calls instead.
|
|
462
475
|
|