AI Can Now Add Images to the Online Whiteboard
The local CLI and stdio MCP can upload, download, and append real images in the current room. A production gate fix now passes exact raster uploads into full Agent authorization while rejecting other origins, paths, and MIME types; remote MCP remains undeployed.
# AI Can Now Add Images to the Online Whiteboard
Phase five of the AI capability layer completes a real-image loop for Online Whiteboard. The local CLI and stdio MCP can upload and download current-room images, then append a verified asset through a high-level `image` element.
## Image operations
- Inputs are limited to PNG, JPEG, or WebP files up to 5 MiB whose container boundaries, critical chunks or segments, declared dimensions, and pixel limits pass strict checks; this does not claim full pixel decoding.
- Uploads use an operation ID plus the image SHA-256 for idempotency. Identical bytes can be retried safely; reusing the ID for different bytes conflicts.
- Downloads never overwrite an existing file by default. The stdio MCP also enforces allow-root, real-path, and regular-file checks, while tool output omits local paths and internal room identifiers.
## Authorization and room isolation
`whiteboard:assets` is a separate, non-default permission. Upload requires it together with `whiteboard:write`; raw image download requires it plus scene read, which write already satisfies. A token-bound room credential is still required in addition to the Agent Bearer. Images remain in the current room's private R2 namespace and cannot be referenced across rooms.
## Still append-only
The server accepts only current-room images whose storage commit is complete and whose metadata matches field by field. A write-only caller, pending asset, URL, Base64 data, SVG, HTML, forged metadata, orphan asset record, modification or deletion of existing data, link, binding, or arbitrary Yjs input is rejected. One canonical asset may be placed more than once. Simplified Agent SVG and PNG exports still omit image bytes and report a warning.
## Production entry-point fix
Production checks found that the Pages mutation gate omitted the Agent image-upload path, causing safe raster requests to return 415 before Bearer authorization. Version 1.0.6 passes only exact `POST /api/whiteboard/agent/assets` PNG, JPEG, and WebP requests into full Agent authorization. Cross-origin requests, adjacent paths, non-POST methods, and other MIME types remain rejected; existing permissions, room isolation, capacity, and image validation are unchanged.
Online Whiteboard is now version 1.0.6. Quick Transfer remains 1.0.6 with no transfer-protocol change. The separate remote MCP Worker remains undeployed.