Edit files in a context document tree
Edit files in a tree.
Supports three edit kinds — all persist to the tree_edits table so
they survive subsequent regens:
files: content edits (map of path → new content)renames: rename edits (map of old path → new path)deletions: soft-delete (list of paths)
Editable when status is COMPLETED or PUBLISHED. PROCESSING is rejected
(the workflow is mid-write); FAILED has nothing meaningful to edit.
The tree’s files JSONB is updated in-place so the dashboard sees
immediate results without waiting for the next regen.
Authorizations
API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.
Path Parameters
Body
Request body for editing files in a tree.
All three edit kinds persist to the tree_edits table so they survive
subsequent regens. Editable when status is COMPLETED or PUBLISHED;
files / renames / deletions can all be sent in a single call.
Map of file path → new content (content edits).
Map of old path → new path (rename edits).
List of file paths to soft-delete (sticky until cleared).
Map of file path → initial content for user-declared files at paths the LLM doesn't produce. Sticky until cleared.