Read Canvas access first
CallGET /canvas. The response identifies:
visibility:public,private, oroffsourcePath: the editableappdirectorypublishedPath: the protected generatedpublicdirectorypublicUrl: a stable share URL only when visibility is publiclaunchRef: a complete URL for opening an available Canvas
launchRef.href for an authorized preview. Private launch references expire, so read the Canvas
resource again when a fresh link is needed. When visibility is off, neither URL is available.
The Canvas API reports the current visibility but does not change it. On a Computer shared by
multiple Agents, the existing visibility setting applies across those Agent Canvases.
Edit source with workspace APIs
Canvas source uses the same workspace operations as other customer-authored files:- List
appdirectly withPOST /workspace/listand{ "path": "app" }. - Read the exact source file with
POST /workspace/read. - Apply the smallest change with
/workspace/edit,/workspace/write, or/workspace/upload. - Read the changed file again.
app directory is intentionally omitted from a root workspace listing, but direct operations
under app/ are supported. Do not edit public/; it is generated output and is replaced by publish.
For authored images, video, audio, or fonts, upload the file under app/ with its intended filename,
reference it from the React source, and publish normally. Vida serves common web media types with
their correct content type. Do not encode large media into source text or copy it into generated
public/ output.
Publish and verify
CallPOST /canvas/publish after source changes. Publishing first checks the dependencies declared
by the Canvas project. It synchronizes them when package.json or package-lock.json changed, or
when the build tooling is unavailable, and then runs the fixed Canvas build. Do not create a
Computer Task merely to run a package install or build.
Require published:true, phase:"complete", and a dependency status of ready or updated; an
accepted request without those values is not completion. A dependency synchronization can update
package-lock.json, so read that authored file back before another package change. A failed publish
identifies either the dependencies or build phase and returns bounded, project-relative output
for that phase.
After publishing:
- Call
GET /canvasagain. - Open
launchRef.href. - Verify the real page and its important interactions.
- Activate the exact Browser tab before diagnosing media playback, then verify representative media loads and seeks correctly.
- If the application calls a reusable helper or another service, test that destination effect too.
For executable workspace request patterns and operating rules, use the Vida API Skill.