Completion Report: ANU-14 - Embed the Bento editor, AI Assistant, and shared preview
Outcome
ANU-14 implements the CMS-owned Bento editor, structured AI authoring, durable save/recovery, workspace asset delivery, and saved-revision Web preview boundary. The reviewed Bento runtime remains immutable and host persistence remains authoritative.
Delivered
- Exact reviewed Bento 1.1.0 editor/contract and exact 1.0.0 player provenance.
- Authenticated, path-safe, integrity-checked same-origin artifact hosting.
- Full-presentation editor load and stable selected-scene/surface focus.
- Serialized manual save and debounced autosave with idempotent immutable revisions.
- User-scoped durable drafts and explicit conflict reload/replace recovery.
- Collection-level workspace/user access and anti-spoof hooks for recoverable drafts.
- Checksummed Signal/Paper catalog integration and editor-owned atomic template/application undo behavior.
- Workspace-owned asset streaming without client-visible signed URLs.
- Mastra structured AI proposals restricted to allowlisted targets and operations, with review, metering, and safe attribution.
- Shared Mastra text-generation and web-search defaults use
gpt-5.6-terra. - Coordinated Main, Companion, and Emphasis saved-revision preview using the exact player, its load-before-ready lifecycle, and one absolute timeline clock.
- Closed runtime validation for every accepted editor/player bridge payload.
- Payload schema, generated types, migration, fake database support, tests, and durable/state documentation.
Verification Evidence
| Check | Result |
|---|---|
pnpm generate:types |
Passed |
pnpm lint |
Passed, 461 files |
pnpm test:int |
Passed, 23 files / 131 tests |
pnpm test:e2e |
Passed, 7 Chromium tests, including real packaged editor and three-surface player bridges |
| Focused Bento tests | Passed, 12 tests |
pnpm typecheck |
Passed |
| Docs strict build/live preview | Recorded after final docs update |
Residual Risk
- Live provider AI generation depends on configured provider credentials and is covered by deterministic schema/operation tests rather than a billable provider call.
- Browser behavior depends on configured object storage for real media. The server rejects missing, redirected, wrong-type, or checksum-mismatched bytes.
- A richer warning/confirmation UX for recompiling an already editor-authored accepted revision remains hardening work; current local simple scene edits must be compiled before Bento can open.
Rollback
Before editor-authored revisions exist, disable the Step 3 entry and remove the new host/draft/routes while retaining the ANU-13 compilation path. After editor-authored revisions exist, disable editor entry and select a prior compatible accepted immutable revision. Do not rewrite or delete accepted revisions or translate Bento documents back to legacy formats.