Adds Cursor-style "canvases" — interactive artifacts (markdown / diff /
table / stats) rendered in a right-side rail next to the session terminal
so structured agent output (diffs, test results, stats) doesn't get buried
in scrollback.
Architecture is plugin-friendly without inventing a new plugin slot:
agents emit JSON files at `{workspacePath}/.ao/canvases/{id}.json`, core
validates and serves them via `GET /api/sessions/[id]/canvases`, and the
web layer ships a fixed renderer set so third parties can produce data
without shipping React components into the supervisor dashboard. The
`CanvasProducer` interface is declared for v0.2 plugin invocation but not
yet called.
v0.1 also synthesizes a `core-git-diff` canvas from `git diff` against
the merge-base with `origin/<default>` (with local-ref + uncommitted +
untracked-file fallbacks), so the feature is useful for every session
even before any agent integration.
Hardened across 10 codex review passes:
- working-tree diffs (not just committed changes)
- merge-base against origin/<base>, not stale local ref
- untracked files included with file/byte/lstat caps
- `.ao/` files excluded from synthesized diffs
- reserved `core-` id prefix for synthesized canvases
- per-effect cancellation + sequence-guarded poll responses
- lstat (not stat) on canvas files to reject FIFO/symlink bypass
- partial-stdout recovery on oversized diffs
- session.projectId (not prefix-matching) for project resolution
- empty canvases for sessions without a workspacePath
- diff parser preserves `+++`/`---` content lines, strips marker prefix
- size caps: 256 KB per canvas, 32 canvases per session, 200 files /
5000 lines per diff, 50 untracked files / 4 MB budget
Tests: 17 core + 8 web, all passing. Docs at docs/canvases.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>