Whiteboard (local scene model)
Compose deterministic scenes from shapes + arrows + Chinese text; two presets, .excalidraw import/serialization round-trips, an explicit local draft, confirm-before-replace, a 48px brand bar and safety-policy audits.
Inputs and parameters
action— ActionpresetId— PresetsceneText— .excalidraw text (import / scene input)draftAction— Draft sub-actionsvgText— Arbitrary SVG text (scan only, never injected)confirm— Confirm replacement (export a backup first)
Real example
action=roundtrip, presetId=flow-sketch
Input scene: rectangle "Start" (80,120,160×72), "Refine" (320,120), "Review" (560,120), arrow flow-a1 points=[[0,0],[80,0]], Chinese label "Flow sketch: requirements → refine → review".
→ serializeScene → parseSceneDocument → {"positionsEqual":true,"elementCount":9,"chinesePreserved":true,"arrowPointsPreserved":true}; after re-import (80,120) and arrow points are byte-for-byte identical.
Limits and failure handling
The real Excalidraw React/Canvas engine, freehand strokes, PNG rasterization, self-hosted fonts, 390/768/1440 widths and on-device gestures are NOT integrated / NOT verified; this operation provides a deterministic scene model and testable contracts only. PNG export throws PNG_RASTERIZER_UNAVAILABLE without an injected rasterizer and never fabricates pixels.
FAQ
What are the two presets?
flow-sketch (start → refine → review, 9 elements) and product-idea (users / value / flow / risks, 15 elements), both with Chinese text and bound arrows.
What happens to imported remote images?
files are dropped with a REMOTE_FILES_DROPPED warning; image elements fail validation as REMOTE_IMAGE_REJECTED, with no fetching.
Do draft keys affect other sites?
No. The namespace is al:draw:v1:* and cleanup matches only that prefix; tests verify other-site keys keep their values.