Skip to content
Merged

Develop #1533

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b732d37
chore: open 0.22.0-alpha.1 on develop
dkackman Nov 21, 2026
c619f44
Refactor button and span elements for improved readability and consis…
dkackman Nov 21, 2026
6caf6aa
fix: update license format in pyproject.toml for consistency
dkackman Nov 21, 2026
f8a522c
docs(plan): the review hold (refs #1521)
dkackman Nov 21, 2026
3896452
feat(ledger): a planned item can be held for review until a deadline …
dkackman Nov 21, 2026
9a001f7
fix(ledger): a request stored before the review hold still reads (ref…
dkackman Nov 21, 2026
216e972
feat(mcp): the notes channel says when a review hold is due (refs #1521)
dkackman Nov 21, 2026
9b1ba6c
docs: the review hold in the request skill, the guides, the map and t…
dkackman Nov 21, 2026
d18bd75
fix(mcp): a review hold this session did not see set is announced as …
dkackman Nov 21, 2026
d1749eb
docs: a review hold the session did not see set is stale (refs #1521)
dkackman Nov 21, 2026
71e6f27
feat(ui): the request page shows items held for review, with a countd…
dkackman Nov 21, 2026
da9a694
docs: review-hold wording fixes from review (refs #1521)
dkackman Nov 21, 2026
a90935b
fix(ui): an undone drop comes back unheld, and the hold banner does n…
dkackman Nov 21, 2026
5b8dae0
fix(mcp): a hold set with its request is fresh; a changed price clear…
dkackman Nov 21, 2026
0d83ed6
docs: the review hold's price and omission rules (refs #1521)
dkackman Nov 21, 2026
d86da62
fix(ui): a new note goes out only with words, and a picked item with …
dkackman Nov 21, 2026
f3f334c
fix(mcp): the notes channel watches every workspace unless --workspac…
dkackman Nov 21, 2026
9aa2039
fix(mcp): a notes channel keeps what it knew of a workspace it cannot…
dkackman Nov 21, 2026
5330cad
fix(ui): the note box puts the words first and labels what the note i…
dkackman Nov 21, 2026
3eb4a43
docs(release): the 0.22.0 note describes the reworked note box (refs …
dkackman Nov 21, 2026
9518fe6
Merge branch 'fix/notes-1529-1530' into feat/review-gate
dkackman Nov 21, 2026
728f845
Merge branch 'fix/notes-1529-1530' into feat/review-gate
dkackman Nov 21, 2026
ea591e9
Merge branch 'fix/notes-1529-1530' into develop: the notes channel wa…
dkackman Nov 21, 2026
aa67039
Merge branch 'feat/review-gate' into develop: the review hold (#1521)
dkackman Nov 21, 2026
5e738cf
fix(validate): refuse an H3 references entry that names no reference …
dkackman Nov 21, 2026
5a99ea0
fix(trust): the worker's pre-check reads keys only and refuses what t…
dkackman Nov 21, 2026
bf38cab
feat(ui): the request page says what the agent last said, and an item…
dkackman Nov 21, 2026
0b2e4eb
test(validate): the reference-class check leaves variables, strings a…
dkackman Nov 21, 2026
1ae7760
docs(skill): after a note at the same price the agent re-holds, and a…
dkackman Nov 21, 2026
555e59d
docs(trust): the worker pre-check covers top-level steps; a sub-workf…
dkackman Nov 21, 2026
fec1b8b
Merge branch 'fix/trust-gate-1510-1511' into develop
dkackman Nov 21, 2026
e363085
Merge branch 'fix/h3-refs-1512' into develop
dkackman Nov 21, 2026
a820452
docs(release): 0.22.0 notes name the trust-check and H3 references fixes
dkackman Nov 22, 2026
aaf94a3
Merge branch 'feat/request-card-respin' into develop: the request hea…
dkackman Nov 22, 2026
d4847a3
docs(release): 0.22.0 notes name the request page refinements
dkackman Nov 22, 2026
0b7bee2
chore(arch): both ratchets green again - the gallery grid's order mov…
dkackman Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/ARCHITECTURE.md

Large diffs are not rendered by default.

71 changes: 60 additions & 11 deletions docs/MCP.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ the client needs a command it can find (see below). `dw-mcp` (or
| `--workspace` | `$DW_MCP_WORKSPACE`, else the server's default | Which of the server's workspaces the session works in. A *name* on the server, not a local directory (`DW_WORKSPACE` means something else to the engine). `use_workspace` switches it mid-session |
| `--timeout` | `30` | Seconds to wait on any one API request |
| `--no-probe` | off | Skip the startup `GET /api/health` that confirms the server is reachable and the token is accepted |
| `--notes-channel` | off | Serve no tools: be [the notes channel](#the-notes-channel), which tells an open Claude Code session when the user saves a note for the agent |
| `--notes-channel` | off | Serve no tools: be [the notes channel](#the-notes-channel), which tells an open Claude Code session when the user saves a note for the agent. It watches every workspace unless `--workspace` is given |
| `--interval` | `10` | With `--notes-channel`: seconds between reads of the request list, at least 2 |

A non-loopback `--url` with no token makes `dw-mcp` exit 2. The startup probe
Expand Down Expand Up @@ -163,8 +163,8 @@ When the user saves a **Note for the agent** on a request or one of its
items in the web UI ([WORKSPACES.md](WORKSPACES.md#requests)), nothing is
sent anywhere: the agent reads the note the next time it reads the plan. The
notes channel closes that gap for an open Claude Code session. It is a
second, small stdio process, `dw-mcp --notes-channel`, that watches one
workspace's requests and tells the session about each note as it is saved.
second, small stdio process, `dw-mcp --notes-channel`, that watches the
server's requests and tells the session about each note as it is saved.

A note can carry references to the items, takes and files it is about, so the
event says which. This one was written from the request page and names two
Expand Down Expand Up @@ -199,6 +199,29 @@ The tag's attributes are the event's `meta`: `kind` (`note`), `workspace`,
item) and `items` (the item keys its references name, comma separated, only
when it has any). Every value is a string.

A third kind, `review_due`, says a review hold has run out. When the agent
holds planned items for the user to look at ([WORKSPACES.md](WORKSPACES.md#requests),
*Review hold*), nothing on the server starts them at the deadline: the
channel announces them, once for each item and deadline, and the agent runs
what is still ready under the cost it quoted. The event lists the items
(`- shot3: Shot 3: lamp room (about 4 min)`) and tells the agent to run only
those still ready and without a newer note, and not to run one whose plan
changed or whose quote moved well off what the user was told: it clears the
hold and puts the new figure in the `why`, so the user runs it from the
request page or says yes in chat. Its `meta`
has `kind` (`review_due`), `workspace`, `request`, `revision`, `items` (the
due item keys, comma separated) and `until` (the earliest deadline among
them), all strings. A hold that was already on the item the first time
the channel read a request that the channel's first listing held, whatever its state then, is announced at its
deadline as the same kind with `stale` set to `1`; only a hold set while the
channel ran is announced fresh. A channel that connects, or restarts, after a
hold was set announces it as stale: the agent asks the user before spending.
If no session is listening at the deadline, nothing is announced and the items
wait. One poll can carry a stale event and a fresh one. An item held
behind a dependency is announced when the dependency finishes. A request
whose revision does not move still produces the event once its deadline
passes: the channel reads it again then.

It uses Claude Code [channels](https://code.claude.com/docs/en/channels-reference),
a **research preview**: the flag, the capability and the notification below
are Claude Code's and may change. It works only in an interactive session
Expand All @@ -212,12 +235,25 @@ saved while no session is open waits as it always did.
through the dw tools it already has (the `dw` registration above, or
`dw.serve --mcp`); run the channel beside that connection, not instead of
it.
- **One workspace.** It watches `--workspace` (`DW_MCP_WORKSPACE`, else the
server's default) and does not follow `use_workspace`. Run one channel per
workspace to watch several.
- **Every workspace.** With no `--workspace` it watches the whole server, so
a session that moves with `use_workspace`, or works in a workspace other
than the default, still hears its notes. Each event names its workspace,
and its `get_request` call passes it. `DW_MCP_WORKSPACE` does not narrow
the channel: it picks where a session starts, not what it hears.
`--workspace` pins the channel to one workspace. On a server older than
`GET /api/requests` it watches the default workspace (or
`DW_MCP_WORKSPACE`), as before, says so once on stderr, and asks for the
route again about every five minutes, so a server updated under a running
channel is found without restarting the session.
- **Two sessions on one server.** A channel that watches everything tells its
session about notes on every workspace's requests. Two sessions open on
one server both hear each note; the agent acts only on a request it is
working on (the event names it). Pin each session's channel with
`--workspace` to keep them apart.
- **Polling.** Every `--interval` seconds (default 10, at least 2) it reads
the request list, and then only the open requests whose revision moved: an
idle ledger costs one request a tick.
the server's open requests (`GET /api/requests`, one read for every
workspace; the workspace's list when pinned), and then only the open
requests whose revision moved: an idle server costs one request a tick.
- **Which notes.** A note *waits* while its request is open, its item is not
dropped, and the agent has not written the request since the note was
saved - the rule behind the page's "Nothing is sent to the agent" line. A
Expand All @@ -227,7 +263,7 @@ saved while no session is open waits as it always did.
has written (`set_request`) it is not announced again.
- **At connect.** A few seconds after the handshake (one interval, at most
5 seconds, so Claude Code is listening), notes already waiting are
announced as one `kind="notes_waiting"` event that lists them (each
announced as one `kind="notes_waiting"` event per workspace that lists them (each
clipped to 300 characters, its references on the lines under it). Those predate the session, so the agent is told to say what
is waiting and to confirm before spending GPU time on them. A note saved
after that is a `kind="note"` event, quoted whole (the ledger's 4000
Expand All @@ -240,7 +276,11 @@ saved while no session is open waits as it always did.
is sent back through the channel.
- **When the server is away.** An unreachable server, a rejected token, a
timeout or an unreadable `requests.json` is written to stderr once and
retried, the delay doubling up to five minutes; the process stays up.
retried, the delay doubling up to five minutes; the process stays up. A
fault in part of the ledger (one request, or one workspace's unreadable
`requests.json`) is named on stderr once but does not slow the poll: the
rest is still read every interval, and what the channel knew of the part
it could not read is kept, so its notes are not announced twice.
Events are not queued across a restart: a note is either still waiting
(and in the next session's digest) or answered.

Expand All @@ -249,11 +289,15 @@ saved while no session is open waits as it always did.
The web UI labels the note's save button by whether a channel is running. The
channel marks each read of the request list with an `X-DW-Notes-Channel: 1`
header, and the server remembers, in memory only, when a marked read last
came for each workspace. `GET /api/workspaces/{name}/notes-channel` answers
came for each workspace; a marked `GET /api/requests` counts for every
workspace, including one made after it. `GET /api/workspaces/{name}/notes-channel` answers
`{listening, last_seen}`: `listening` is true when a marked read came in the
last 30 seconds (three intervals at the default 10). A server restart
forgets it until the next read. The button reads **Send to agent** when a
session is listening and **Save note** when none is; saving works either way.
The request page's review-hold banner reads the same answer: it says whether
a session is listening, and when none is, that nothing will run at the
deadline.

"Listening" means a session has the channel set up and is polling, nothing
more. A session started without `--dangerously-load-development-channels`
Expand Down Expand Up @@ -304,6 +348,11 @@ If nothing arrives:
- It is connected but no event comes: the session was started without the
flag (Claude Code then drops the events silently), or an organization
policy blocks channels.
- The request page says no session is listening while one is open: the
channel is pinned with `--workspace` to a workspace other than the
request's, or it is talking to a server older than `GET /api/requests`
and so watches only the default workspace. Drop `--workspace`, or update
the server.
- **Protocol revision.** Claude Code does not register a server that
negotiates MCP protocol revision 2026-07-28 as a channel. This process
declines that revision by itself: it answers the `server/discover` probe
Expand Down
75 changes: 75 additions & 0 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,81 @@ A PyPI install gets released `diffusers`, which may lag the newest pipelines; in

GitHub generates notes from commits at tag time. The sections below are the hand-written notes: the newest is drafted at release prep and pasted into the GitHub release body once the tag has published (`gh release edit v<version> --notes-file ...`). Items a branch's author wants the next note to name go in a new section at the top.

### 0.22.0

<!-- Branch notes (feat/review-gate, with fix/notes-1529-1530 merged). Fold into the release-prep draft for 0.22.0 and paste into the GitHub release body once the tag has published: gh release edit v0.22.0 --notes-file ... -->

**The review hold** (#1521)

- An agent that has planned and priced a request can hold its items for you
to look at before they run. Each held item carries a deadline,
`review_until`; the request page shows how many items are held, counts
down to the deadline and says whether an agent session is listening. A
note you leave on the request or the item redirects the hold: the agent
revises instead of running. **Run now** opens the same priced dialog as
any other run, so a held item is never started for you.
- A hold defers a run you already approved in chat; it does not replace
that approval. When the deadline passes with no note, the agent runs
exactly what it quoted, and a changed plan or a quote well off the one
you were given means no run and no new hold: the agent clears the hold and
gives the new figure, and you run it from the priced dialog or say yes. Nothing on the server starts
a job at the deadline: the notes channel tells the open session with a new
`review_due` event (`stale` when the hold was set before the session
connected). With no session listening, which needs Claude Code started
with the development-channels flag, nothing runs and the items wait for you.
- The `script-to-video` skill's request reference says when to hold and how
the agent answers each event.
- REST: a request item takes `review_until` (an ISO time with an offset,
60 seconds to 24 hours ahead) and reads back `review_set_at` and a derived
`review` (`{until, state, seconds_left}`). The same fields are on the MCP
`set_request` and `get_request` items.

**Notes reach the session whichever workspace it is in** (#1529, #1530)

- The notes channel (`dw-mcp --notes-channel`) now watches every workspace
on the server unless `--workspace` pins it. Before, it watched only the
default workspace (or `DW_MCP_WORKSPACE`), so a session that worked in
another workspace never heard its notes and the request page said no
session was listening. Each event names its workspace. Against a server
older than this release the channel falls back to the default workspace.
- The note box puts your words first. Under the text, an **About** line
holds the items, takes and files the note is about, with a small "+ Add
an item" control that lists items by key; before, the item picker sat
above the text box and read as a list of suggested notes. A note goes
out only with words, and a closed box shows nothing pending, so nothing
looks sent that was not.
- REST: `GET /api/requests` lists every workspace's open requests in one
read (each row a request summary with its `workspace`; `unreadable` names
a workspace whose ledger cannot be read). Marked `X-DW-Notes-Channel: 1`,
it counts as a channel poll of every workspace for
`GET /api/workspaces/{name}/notes-channel`.

**The request page, from a first real run** (#1532)

- The header gives the agent's latest word under what needs you, so an
answer like "ready for take 2, not run" or "awaiting go-ahead" is on the
page, not only in Plan changes. A note's own status line now says when
the agent answered rather than quoting it.
- A done item has **Another take…** on its row. Open, an item shows its
takes once, its buttons lined up, and keeps its jobs and outputs links in
its menu. A take and its file are one reference chip on a note.
- The request skill: after a note at the same price the agent holds the
revised items again with a fresh countdown, and a note that changes
something the whole set shares is carried over to the other items.

**Fixes**

- The worker's trust check no longer decodes each input clip and fetches
each URL input a second time on every job; with `--trust-workflows` it
does no work at all (#1510).
- A workflow naming a refused `pre_load_modules` entry is refused at
validate and at submit, with no job, instead of being queued and evicting
the models warm on the card before the loader refused it (#1511).
- An H3 `references` entry that names no loadable reference class (a `type`
key instead of `reference_type`, or a bare class name) is now a validate
error at its path, instead of passing and being skipped by every
reference check (#1512).

### 0.21.0

<!-- Drafted from v0.20.0..develop at release prep (2026-11-20). Paste into the GitHub release body once the tag has published: gh release edit v0.21.0 --notes-file ... -->
Expand Down
10 changes: 9 additions & 1 deletion docs/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,15 @@ triggered it and pointing at `--trust-workflows`:
the task does not take.

`validate_workflow` reports each refusal at the key's path (a variable's
default at `variables.<name>`), so nothing is queued to find out. Every
default at `variables.<name>`, a `pre_load_modules` entry or a loader key at
the step's `pipeline`), so nothing is queued to find out, and a submit that
fails it makes no job. The worker repeats the pipeline, `pre_load_modules`,
dotted-type and `constant:` checks over the same expansion before it releases
the previous workflow's models (`workflow_run.require_trusted_pipelines`), so
a refused job leaves them loaded. That check reads keys only: it loads no
asset, clip or URL, and with `--trust-workflows` it does nothing. It covers
the top-level steps; a sub-workflow's steps are refused by validate at
submit and by the loader when they load. Every
bundled workflow loads untrusted: `tests/test_workflow_trust.py` sweeps the
catalog, and `tests/test_catalog_structure.py` refuses a catalog entry that
sets `trust_remote_code` or `custom_pipeline`. `--trust-workflows` lifts all
Expand Down
31 changes: 28 additions & 3 deletions docs/SERVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,13 @@ icon, a finish-alert toggle, the theme toggle, and links to these docs and
one started without the development-channels flag still counts, and Claude
Code drops its events ([MCP.md](MCP.md#is-a-session-listening)).

When the agent holds items for your review, a banner says how many are
held, counts down to the deadline, and says whether an agent session is
listening ([the notes channel](MCP.md#the-notes-channel)); with none, it
says nothing will run at the deadline. A note you leave redirects the hold,
and the banner then says the agent will revise. **Run now…** opens the
priced dialog below; the page never starts a held item itself.

The page queues jobs only when you ask, and only after pricing them.
**Run {n} ready…** in the header takes every ready item; a ready row has
**Run…**, a failed or cancelled one whose dependencies are done **Run
Expand Down Expand Up @@ -1081,8 +1088,17 @@ The editor's forms come from these; they are just as usable from scripts:
whole-plan write keeps the stored ones. `DELETE` removes the ledger entry at
that revision and answers `{id, workspace, deleted, revision,
linked_jobs}`; the linked jobs keep their rows, link and files. Reads
derive from the jobs linked through `POST /api/jobs` `request`/`item`:
each item carries `status` (`dropped`, `done`, `running`, `queued`,
derive from the jobs linked through `POST /api/jobs` `request`/`item`.
An item also takes `review_until` on write, an ISO time with an offset 60
seconds to 24 hours ahead (422 `invalid_review_until`, `review_too_soon`
or `review_too_far` otherwise), and reads back `review_set_at` and a
derived `review` (`{until, state, seconds_left}`, `state` one of
`holding`, `redirected`, `due`; only while the item is `planned` on an
open request); the rules are under [WORKSPACES.md](WORKSPACES.md#requests).
`review_set_at` and `review` are ignored on write. The server never starts
a job at the deadline.

Each item carries `status` (`dropped`, `done`, `running`, `queued`,
`failed`, `planned`), `ready`, `attempts` (`[{job, status, note?,
minutes, output}]`, oldest first), `result` (`{job, run_id, output}` or
null), `accepted_missing` (only when true) and `spent_minutes`, where
Expand Down Expand Up @@ -1114,9 +1130,18 @@ The editor's forms come from these; they are just as usable from scripts:
linked to the item, an output not in its manifest, a job still running
with an `output`), `too_many_refs`, `too_many_notes` (20 per item or
request), `unknown_item`, `item_dropped`.
- `GET /api/requests` — every workspace's open requests, newest change
first, as `{requests, unreadable?}`: each row is a request summary (the
list route's) with its `workspace`, and `unreadable` maps a workspace
whose `requests.json` is not a ledger, or that could not be resolved
while it was listed, to why; the others still list. It
is the one read a notes channel makes when it watches the whole server,
and marked `X-DW-Notes-Channel: 1` it counts as a poll of every
workspace, including one made after it.
- `GET /api/workspaces/{name}/notes-channel` — `{listening, last_seen}`:
whether a notes channel polled this workspace's request list in the last
30 seconds. The channel marks its polls with an `X-DW-Notes-Channel: 1`
30 seconds. A marked `GET /api/requests` counts
for every workspace. The channel marks its polls with an `X-DW-Notes-Channel: 1`
header, and the server keeps the time in memory only. It means a session
has the channel set up, not that Claude Code is passing its events on
([MCP.md](MCP.md#is-a-session-listening)).
Expand Down
Loading