Live: sync to workspace
live_sync_to_workspaceSave the current live SVG document into the workspace as a new tracked file, enabling further headless operations on it.
Instructions
Save the live document's current state into the workspace as a NEW tracked document.
When to use: capturing live work into the headless workspace so the typed tools can act on it.
For pixels-only feedback use live_render_view; to save a HEADLESS doc to disk use
save_document_as.
Key params: dest_path is the new workspace file; RELATIVE anchors to the first workspace root
(NOT the server CWD) and a not-yet-existing SUBFOLDER is created in-sandbox first (matching
save_document_as; a ..-escaping / out-of-sandbox dest creates nothing and is rejected with
path rejected: outside workspace). Reads the live SVG and writes it through the policy layer
(sandbox + symlink guard), registers it (working copy), and records an Operation Record +
snapshot (ADR-004). An existing destination is REFUSED — sync never overwrites, so a live fault
cannot damage a workspace file. Requires an established session.
Return shape: LiveSyncResult — the new doc_id, operation_id, and snapshot links.
Example: live_sync_to_workspace("from-live.svg")
Risk class: medium (writes a new workspace document, reversible + recorded).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dest_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| saved_path | Yes | ||
| size_bytes | Yes | ||
| snapshot_id | Yes | ||
| operation_id | Yes |