Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/MCP.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ The session starts in `default` and stays there unless it is told otherwise.
| `use_workspace(name)` | `name` | Work in that workspace for the rest of the session - every later call reads and writes there. This is how to keep your work out of another agent's namespace rather than sharing the default one. Checked against the server, so a typo fails here rather than scoping every later call to nothing |
| `create_workspace(name, use=False)` | `name`, `use` | Create a workspace. Pass use=true to switch this session to it as well; otherwise the session stays where it was and the result says so |
| `delete_workspace(name, acknowledged_cost=False)` | `name`, `acknowledged_cost` | Permanently delete a workspace and everything in it. Refuses without the acknowledgement, reporting what it would remove |
| `list_assets()` | — | The input media on the server, each with the `asset:` reference a workflow argument carries. Look here before asking for a file - what a workflow needs may already be there |
| `list_assets()` | — | The input media on the server, each with the `asset:` reference a workflow argument carries. Look here before asking for a file - what a workflow needs may already be there. `libraries` names the roots searched and which are writable; `shadowed` lists names a nearer library hides |
| `keep_output(name, asset_name=None, overwrite=False, shared=False, workspace=None)` | `name`, optional `asset_name`, `overwrite`, `shared`, `workspace` | Keep a generated file as an input asset under a stable `asset:` name, so a later workflow can rely on it. The copy happens on the server: nothing is downloaded or re-uploaded. `asset_name` may name a folder and takes the kept file's extension when it has none; `shared=true` keeps it in the library every workspace shares, which is where a recurring cast belongs. `workspace` names the workspace for this one call without switching the session to it - the same pin `run_workflow` takes, so a job run into another workspace stays reachable from the session that queued it |
| `upload_asset(file_path, asset_name=None, shared=False)` | `file_path` | Push a local image, video or audio file into the server's asset library and get back its `asset:` reference. The file is read from the machine the MCP server runs on, so this is how an input reaches a dw.serve running somewhere else. `asset_name` stores it under a readable name (`cast/priya-voice.wav`) instead of a random one; `shared=true` puts it in the library every workspace shares |
| `delete_asset(name)` | `name` | Permanently remove one file from the asset library, by the name `list_assets` reports. Deletes from whichever library holds it - this workspace's own before the shared one; one from a read-only examples library is refused. Any workflow still carrying that `asset:` reference stops loading |
Expand Down
23 changes: 22 additions & 1 deletion docs/SERVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,12 @@ The editor's forms come from these; they are just as usable from scripts:
- `GET /api/assets` — the asset library: input media, each with the
`asset:` reference a workflow carries rather than a path, since a path
only means something on the server's own machine. Empty rather than an
error when no library is configured
error when no library is configured. `libraries` lists the roots searched,
in order, each `{origin, dir, writable}` — what `asset_dirs` names without
saying which of them an upload or delete can actually reach. `shadowed`
lists the entries a nearer library hides: same shape as an `assets` entry
but without `url` (that URL would serve the shadowing file, not this one),
plus `shadowed_by` naming the origin that won
- `POST /api/assets/keep` (`{"name": ..., "asset_name": ..., "overwrite": false, "shared": false}`)
— keep a generated file as an input asset under a stable name, returning
its `asset:` reference. A run's files are named by the run that made them,
Expand All @@ -455,6 +460,22 @@ The editor's forms come from these; they are just as usable from scripts:
workspace's own before the shared one, the order `asset:` resolves in).
An asset from a read-only examples library answers 403, the same as a
read-only prompt or workflow; a name nothing holds answers 404
- `POST /api/assets/archive` — `{"names": [...]}` (1-1000) bundles a
multi-file asset selection into one zip, named by each file's
library-relative path, which is the name its `asset:` reference carries.
The gallery archive's counterpart on the input side; it resolves down the
same search path a run does, so a selection spanning this workspace's
library, the shared one and an examples tree downloads as one archive, and
an unknown or out-of-library name 404s the whole request rather than
yielding a partial one. A duplicate name (repeated in the selection, or
differing only by leading/trailing whitespace) collapses onto the one zip
entry. Media (image/video/audio) stores rather than deflates, unless it's
a raw format that still compresses (`.bmp`, `.wav`) - everything else the
libraries hold is an already-compressed container, and the response does
not start until the archive is complete, so deflating it is latency the
caller waits through for nothing. Everything else - `.json`, `.md`,
`.txt`, an unrecognized extension - deflates; so does the export zip's
text files (`workflow.json`, `manifest.json`, `job.json`, the README)
- `POST /api/uploads?filename=...` — the raw bytes of one image, video or audio file
(200MB ceiling, checked from `Content-Length` before a byte is read, and
again on the body; extension held to the allowed image/video list), saved
Expand Down
Loading
Loading