Presentation Config
Last refreshed: 2026-07-28
Source Files
- Bento consumer boundary:
vendor/anuva-bento/1.1.0/. - Server-safe contract import:
src/lib/presentation-config/bento-contract.ts. - v2 compiler and surface-plan schema:
src/lib/presentation-config/v2.ts. - Runtime public-config validation:
src/lib/presentation-config/schema.ts. - Immutable revision service:
src/lib/presentation-config/revisions.ts. - Payload collections:
src/collections/anuvax/index.ts. - Render-package assembly:
src/lib/render-worker/service.ts.
Aggregate Boundary
The public presentation config is the production Anuva Bento aggregate. Its
root format is anuva/bento-presentation and its contract, protocol, player,
Bento, and renderer versions are pinned to the reviewed ANU-11 artifacts.
The aggregate contains:
- stable presentation identity and immutable revision identity
- exact consumer compatibility requirements and capabilities
- structurally equal Main, Companion, and Emphasis surface documents
- one ordered absolute-time timeline
- content-addressed external asset declarations
- template declarations and bindings
The compiler normalizes and validates the completed aggregate with the vendored
@anuva/bento-contract runtime before it can be persisted.
flowchart LR
narrative["Narrative scenes"] --> plan["Typed scene surface plans"]
timing["Authoritative scene timing"] --> compiler["Deterministic v2 compiler"]
assets["Persisted asset checksums"] --> compiler
plan --> compiler
compiler --> validation["Bento validation and compatibility"]
validation --> revision["Immutable compilation revision"]
revision --> preview["Preview"]
revision --> package["Immutable render package"]
Required Surfaces
Every aggregate contains the same document structure for all three surfaces:
- Main carries the primary explanatory structure.
- Companion carries supporting context, evidence, or a visual.
- Emphasis carries sparse, time-bounded callouts.
Each scene declares preserve, replace, or clear for every surface.
replace supports zero or many typed items. preserve and clear do not carry
items. Items can bind a content-addressed asset and can opt into deterministic
fragment visibility.
The compiler owns presentation, surface, document, slide, element, fragment, event, and asset identities. IDs are derived from immutable source identities and semantic positions, not mutable display text.
Timeline Authority
The compiler emits a single ordered timeline with absolute millisecond events:
- slide selection
- surface show and hide
- surface clear
- fragment visibility
Main and Companion can persist between scenes. Emphasis always receives an explicit end state. Equal-time events use deterministic surface, action, and ID ordering.
Scene duration authority is:
- actual TTS word-timing maximum
- persisted voiceover duration
- deterministic text estimate
The persisted scene pause is added once between scenes. Compiler inputs must be non-negative and monotonic.
Assets And Security
External assets require:
- a path-safe stable asset ID
- a supported kind and media type
- a lowercase SHA-256 checksum
- a package-relative
/assets/...locator
Credentials, signed URLs, query strings, fragments, traversal, runtime update endpoints, and collaboration endpoints are forbidden in the aggregate and immutable package. Transport-only download grants are returned separately by the worker API.
The compiler rejects missing asset references, conflicting immutable metadata, unsupported media types, unsafe IDs, and executable text payloads.
Immutable Revisions
presentation_compilations is an append-only aggregate revision store.
Each record includes:
aggregateIdrevisionparentRevisioncontentChecksum- contract, player, and renderer versions
- asset manifest and validation result
- the validated public aggregate and internal evidence
- a database-unique revision key and optional idempotent editor request key
- authoring source, authenticated author, save trigger, and safe operation audit
presentations.latestCompilation points to the last accepted revision.
createPresentationRevision supports compare-and-swap checks with expected
revision and checksum. A conflict returns stable expected/current details and
does not create a revision or move the pointer.
Preview, audio refresh, and render requests create a new revision; they do not rewrite an existing compilation.
Editor proposals remain unaccepted in presentation_editor_drafts until a
compare-and-swap append succeeds. Drafts are scoped by workspace, presentation,
and user and contain a validated credential-free aggregate, base identity,
content checksum, lifecycle state, and safe conflict diagnostics.
The Web editor/player resolve immutable /assets/{stable-id}.{extension}
locators through an authenticated same-origin route. Authorization and signed
storage transport remain outside the aggregate and its checksum.
Render Package
video_generation_jobs.configSnapshot.publicConfig stores the exact validated
aggregate used for the job. /api/worker/v1/jobs/{jobId}/package returns:
- an immutable
anuva/bento-render-package - config and root package SHA-256 identities
- exact compatibility pins
- the vendored player manifest and per-file byte/checksum descriptors
- content-addressed media descriptors
- render settings
- a separate transport section containing short-lived download URLs
The package checksum excludes transport grants, so refreshing a signed URL does not change render identity.
Development Cutover
ANU-13 is a clean development-data cutover. Fixture export and import validate that compilation records contain PresentationConfig v2 and scene records contain typed surface plans. Legacy presentation compilation data is not migrated or dual-written.