@@ -8,6 +8,90 @@ may contain breaking changes. |
8 | 8 |
|
9 | 9 | ## [Unreleased] |
10 | 10 |
|
| 11 | +### Added |
| 12 | + |
| 13 | +- **Steering a running agent** (an extension beyond Claude Code; PARITY X01–X09). Send an instruction |
| 14 | + to a running workflow agent without restarting it: `/workflows msg <runId> <target> <text>` (user), |
| 15 | + or `workflow_control` with `action: "message"` (the parent model, when you ask). Targets: an agent |
| 16 | + index (`3`/`#3`), an exact label, `@phase` or `*`. The agent reads the message at its next step |
| 17 | + boundary, and its `agent()` result is its reply after the message; a message that arrives as the |
| 18 | + agent finishes is still answered. `msg!` / `urgent: true` also interrupts the current step (its |
| 19 | + tokens are lost). Messages to a queued agent are held and added to its first prompt. Messages are |
| 20 | + journaled; a steered agent is never reused on resume, so it and every later agent run again. |
| 21 | + `/workflows <runId>`, `agents/<i>.json` and the task notification (`<steering>`) show them. |
| 22 | +- **Live progress tree in the TUI** (an extension; PARITY X10–X16). `ctrl+x o` (or `/wf`) opens a |
| 23 | + panel with the session's runs → phases (model label, counts, tokens, elapsed) → agents (status, |
| 24 | + tokens, elapsed, the model it runs on, and what each running agent is doing right now). Enter |
| 25 | + opens an agent's child session, `x` stops an agent or the run after a confirmation, `p` |
| 26 | + pauses/resumes, `m`/`M` sends a message (steering), `a` switches between this session's runs and the whole project. The prompt |
| 27 | + footer shows `wf <name> <done>/<total> · <tokens> · $<cost>`. A finished run sends a desktop |
| 28 | + notification when the terminal is unfocused (with `attention.notifications` in `cli.json`), or a |
| 29 | + toast. The package gains a `./tui` export (`dist/tui.js`, precompiled; no new runtime |
| 30 | + dependencies) and the repo a root `tui.tsx` for directory installs. |
| 31 | +- **`dynamic-workflows` RPC** (X12, X13): `list`, `status` and `control` over opencode's server API |
| 32 | + (`POST /api/rpc/dynamic-workflows/<method>`), and `delta` (at most 4 per second) / `finished` |
| 33 | + events on `/api/event`. The TUI uses it; scripts and other clients can too. |
| 34 | +- **Phase model labels** (X10): the `model` of a `meta.phases` entry is now shown next to the phase |
| 35 | + in `/workflows`, `/workflows <runId>`, `workflow_control` status/list, run.json and the tree, as |
| 36 | + Claude Code shows it. It is a label only: agents still take their model from `agent(…, {model})`. |
| 37 | +- **Live agent activity** (X11): `/workflows <runId>` shows, for each running agent, its last tool |
| 38 | + call or the last words it wrote and its live tokens/cost. `workflow_control status` shows the tool calls but only `writing…` / `thinking…` for text, so the |
| 39 | + model never gets a partial result (P77). Display only: recorded usage and `budget.spent()` are |
| 40 | + unchanged. |
| 41 | +- **The model each agent actually runs on** (X18, X19). Each agent records its model as |
| 42 | + `provider/model#variant` (the variant only when set; opencode's `default` variant counts as none): |
| 43 | + the child session's model as opencode reports it, else the requested one (`opts.model`, else the |
| 44 | + parent session's model, plus the `effort` variant). It is saved in `agents/<i>.json` (`model`) as |
| 45 | + soon as the child session exists and on the journal result line, and a cached agent keeps it on |
| 46 | + resume (older journals take it from the old run's agent record). If opencode runs the agent on |
| 47 | + another model than requested, the agent gets the warning |
| 48 | + `model: requested X but the agent runs on Y`. Shown as a `model:` line per agent in |
| 49 | + `/workflows <runId>` and `workflow_control` status, in the RPC agent views and on the tree's agent |
| 50 | + rows (shortened when the panel is narrow: provider first, then variant). A phase without a |
| 51 | + `meta.phases[].model` label shows the model its agents share (`agentModel` in run.json). |
| 52 | +- **Read-only RPC switch** (X17): `OPENCODE_WORKFLOW_RPC_CONTROL=0` or the plugin option |
| 53 | + `rpcControl: false` keeps the tree live but refuses its stop, pause and message actions. |
| 54 | +- Docs: the design (`docs/design/steering-and-live-tree.md`), PARITY rows X01–X19, the TUI live |
| 55 | + check in `docs/E2E.md`, opencode API notes on steering, RPC and the TUI, and README sections with |
| 56 | + new screenshots (live tree, message dialog, narrow panel, stop, finished run). |
| 57 | + |
| 58 | +### Changed |
| 59 | + |
| 60 | +- `/workflows`: phase lines show how many agents are running, and the run line shows the cost. |
| 61 | +- Both subagent preambles (P78) now say that `<orchestrator-message>` blocks may arrive while the agent |
| 62 | + works. Resume keys are unchanged. |
| 63 | +- `journal.jsonl` can contain `{"type":"message"}` lines, and a result line can carry `steered: true` |
| 64 | + and `model`. Readers that only know `result` lines (0.1.0) skip them. Agent keys, and so resume, |
| 65 | + are unchanged. |
| 66 | +- `/workflows <runId>`: the `now:` line of a running agent no longer ends with `· model: …`; the new |
| 67 | + per-agent `model:` line replaces it. |
| 68 | +- run.json records the project directory (`directory`) that started the run. The RPC only serves |
| 69 | + runs of its own project, so runs from 0.1.0 (without it) do not appear in the tree; `/workflows` |
| 70 | + still lists them. |
| 71 | + |
| 72 | +### Fixed |
| 73 | + |
| 74 | +- `meta.phases[].model` was validated and then dropped: the phase label a script declared never |
| 75 | + appeared anywhere (X10). |
| 76 | +- Pre-release fixes to the new features, from a review and a live verification: |
| 77 | + - A steering message that missed the agent's turn could start a turn after the agent's result was |
| 78 | + read; nobody read that turn and its tokens were not counted. Messages are now sent with |
| 79 | + `resume:false`, and the plugin itself starts the turn that reads a late message (X03). |
| 80 | + - A message whose delivery id was unknown was reported `undelivered` after a 2 s wait, with a |
| 81 | + warning, even when it had been delivered (X03). |
| 82 | + - After the server plugin restarted (reload, idle eviction), the tree ignored every update of a new |
| 83 | + run until you switched sessions; a slow resync could also show a finished run as running again |
| 84 | + (X13, X15). |
| 85 | + - The RPC could read and control runs of other projects in the same opencode process (X12). |
| 86 | + - Tree rows and the footer lost their middle when too long (cost, elapsed time, progress); they are |
| 87 | + now shortened from the least useful part (X14, X15). |
| 88 | + - `<orchestrator-message>` escaping missed look-alike characters and other tags (X09); control |
| 89 | + characters are stripped from the tree's text (X11); RPC and tool string inputs are size-bounded; |
| 90 | + a failed setup no longer leaves the RPC registered; a notification fires once per run (X16). |
| 91 | + - The urgent (`msg!`) reply said the message would be read at the next step boundary (X08). |
| 92 | + - A `workflow` call reaching a plugin instance that opencode had just reloaded started a run that |
| 93 | + nothing could control; it is now refused (P06). |
| 94 | + |
11 | 95 | ## [0.1.0] - 2026-09-23 |
12 | 96 |
|
13 | 97 | First public release. Requires **opencode 2.0.15** exactly (other versions are untested). |
|