Presentation Config
Last refreshed: 2026-05-26
Source Files
- Public config schema:
src/lib/presentation-config/schema.ts. - v1 compilation contract:
src/lib/anuva/contracts-v1.ts. - Compiler tools:
src/lib/anuva/deterministic-tools.tsandsrc/mastra/tools/compiler/index.ts. - Persisted snapshots:
presentation_compilations. - External render handoff:
video_generation_jobs.configSnapshot.publicConfigand/api/worker/v1/jobs/{jobId}/package.
Public Config Shape
presentationConfigPublicSchema has:
schemaVersion: '1.0'.presentation: id, name, use case, mode, language, timebase, timestamps.studio: selected brand kit, set variant, and bot variant.scenes: ordered scene data.- optional
audio.background. - optional
render.target, watermark, and queue class.
flowchart TD
contracts["🧬 v1 contracts"] --> compiler["🧰 Deterministic compiler"]
compiler --> publicConfig["🌐 Presentation public config"]
publicConfig --> preview["👁️ Preview"]
publicConfig --> render["🎞️ RenderJobPackage.config"]
publicConfig --> snapshot["presentation_compilations"]
Scene Shape
Each public scene has:
sceneIdand 1-basedindex.- timing fields with optional start/end and editable pause seconds.
- voiceover text, optional word timings, timing source, and required audio reference.
- screen mode with optional Reveal markup, caption, up to two images, or one video.
- optional directing camera shot.
- optional explainability fields.
Invariant: a scene cannot contain both images and videos.
classDiagram
class PresentationConfigPublic {
schemaVersion
presentation
studio
scenes
audio
render
}
class Scene {
sceneId
index
timing
voiceover
screen
direction
}
class MediaReference {
assetId
url
mimeType
alt
}
PresentationConfigPublic "1" --> "*" Scene
Scene --> MediaReference
V1 Compilation Contract
PresentationCompilationConfig in src/lib/anuva/contracts-v1.ts has:
contractVersion: 'v1'.presentationId.voiceover: VoiceoverScriptJson.revealScenes: RevealSceneModel[].visualStrategy: SceneVisualStrategy[].sceneDirections: SceneDirectionModel[].
This contract is narrower than the public config. It is a deterministic intermediate used before persistence and public preview/render snapshots.
Reveal Slide Model
RevealSceneModel stores:
sceneId.revealSlideMarkup.- optional
slideIntent. - optional
fragmentCount.
Slide generation should preserve Reveal compatibility and keep fragment/timing decisions explicit.
Audio and Media References
Audio references require URL, duration, provider/checksum metadata where available, and supported MIME types. Image and video references include asset IDs, URLs, optional MIME/source/alt metadata, and user context.
Timing And Audio Authority
Scene timing and audio metadata now follow this precedence:
- actual ElevenLabs word timings from
wordTimestampsActual - persisted
voiceoverDurationSec - estimated duration fallback only when actual timings are unavailable
That precedence applies to:
scenes[].timing.startscenes[].timing.endscenes[].voiceover.audio.durationSecondsscenes[].voiceover.wordsscenes[].voiceover.words[].startscenes[].voiceover.words[].end
Step 3 popup voiceover regeneration does not immediately rewrite the compiled preview snapshot.
The committed scene becomes stale first, then Generate Slides Preview writes a new
presentation_compilations version. Deferred Generate VO Audio refreshes dirty or missing scene
audio and updates the latest compiled snapshot in place.
flowchart LR
draft["Popup draft audio"] --> commit["Commit scene text/audio"]
commit --> stale["Scene marked dirty"]
stale --> preview["Generate Slides Preview"]
preview --> snapshot["New presentation_compilations version"]
snapshot --> render["Render handoff uses compiled timing/audio"]
commit --> deferred["Generate VO Audio"]
deferred --> refresh["Latest compilation snapshot refresh"]
Preview and Render Invariant
Preview config, persisted compilation state, scene dirty flags, and audio readiness must agree. If a scene edit affects voiceover, caption, Reveal, visual, direction, or audio, downstream readiness must be invalidated until the relevant preview/audio path reruns.
External Render Contract
The external Python render worker receives PresentationConfigPublic exactly as
RenderJobPackage.config.
The worker package adds:
- top-level render-job identity fields
- a normalized asset manifest for referenced media
- render target metadata derived from
config.render
The package does not wrap or transform PresentationConfigPublic into a separate renderer-specific
schema before handoff.