@vibeframe/cli 0.105.1 → 0.106.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/adapters/claude.d.ts +14 -0
- package/dist/agent/adapters/gemini.d.ts +14 -0
- package/dist/agent/adapters/index.d.ts +27 -0
- package/dist/agent/adapters/ollama.d.ts +19 -0
- package/dist/agent/adapters/openai.d.ts +14 -0
- package/dist/agent/adapters/openrouter.d.ts +15 -0
- package/dist/agent/adapters/openrouter.test.d.ts +4 -0
- package/dist/agent/adapters/xai.d.ts +14 -0
- package/dist/agent/index.d.ts +109 -0
- package/dist/agent/memory/index.d.ts +69 -0
- package/dist/agent/prompts/system.d.ts +5 -0
- package/dist/agent/tools/e2e.test.d.ts +25 -0
- package/dist/agent/tools/index.d.ts +59 -0
- package/dist/agent/tools/integration.test.d.ts +10 -0
- package/dist/agent/tools/scene.test.d.ts +1 -0
- package/dist/agent/types.d.ts +72 -0
- package/dist/commands/_shared/build-asset-metadata.d.ts +43 -0
- package/dist/commands/_shared/build-asset-reference.d.ts +18 -0
- package/dist/commands/_shared/build-backdrop-prompt.d.ts +8 -0
- package/dist/commands/_shared/build-backdrop-prompt.test.d.ts +1 -0
- package/dist/commands/_shared/build-cache.d.ts +37 -0
- package/dist/commands/_shared/build-plan.d.ts +107 -0
- package/dist/commands/_shared/build-plan.test.d.ts +1 -0
- package/dist/commands/_shared/compose-prompts.d.ts +97 -0
- package/dist/commands/_shared/compose-prompts.test.d.ts +1 -0
- package/dist/commands/_shared/compose-scenes-skills.d.ts +282 -0
- package/dist/commands/_shared/compose-scenes-skills.test.d.ts +1 -0
- package/dist/commands/_shared/composer-resolve.d.ts +47 -0
- package/dist/commands/_shared/composer-resolve.test.d.ts +1 -0
- package/dist/commands/_shared/cost-tier.d.ts +58 -0
- package/dist/commands/_shared/edit/_helpers.d.ts +12 -0
- package/dist/commands/_shared/edit/caption.d.ts +47 -0
- package/dist/commands/_shared/edit/fade.d.ts +38 -0
- package/dist/commands/_shared/edit/jump-cut.d.ts +80 -0
- package/dist/commands/_shared/edit/noise-reduce.d.ts +33 -0
- package/dist/commands/_shared/edit/silence-cut.d.ts +63 -0
- package/dist/commands/_shared/edit/text-overlay.d.ts +50 -0
- package/dist/commands/_shared/edit/translate-srt.d.ts +40 -0
- package/dist/commands/_shared/edit/video-review.d.ts +62 -0
- package/dist/commands/_shared/execute-fill-gaps.d.ts +97 -0
- package/dist/commands/_shared/hf-skill-bundle/bundle-content.d.ts +16 -0
- package/dist/commands/_shared/hf-skill-bundle/bundle.d.ts +57 -0
- package/dist/commands/_shared/hf-skill-bundle/bundle.test.d.ts +1 -0
- package/dist/commands/_shared/init-templates.d.ts +58 -0
- package/dist/commands/_shared/init-templates.test.d.ts +1 -0
- package/dist/commands/_shared/install-skill.d.ts +76 -0
- package/dist/commands/_shared/install-skill.test.d.ts +1 -0
- package/dist/commands/_shared/openai-image.d.ts +49 -0
- package/dist/commands/_shared/openai-image.test.d.ts +1 -0
- package/dist/commands/_shared/product-surface.d.ts +11 -0
- package/dist/commands/_shared/product-surface.test.d.ts +1 -0
- package/dist/commands/_shared/project-config.d.ts +60 -0
- package/dist/commands/_shared/render-inspect.d.ts +104 -0
- package/dist/commands/_shared/render-inspect.test.d.ts +1 -0
- package/dist/commands/_shared/review-report.d.ts +65 -0
- package/dist/commands/_shared/root-sync.d.ts +39 -0
- package/dist/commands/_shared/scene-audio-mux.d.ts +74 -0
- package/dist/commands/_shared/scene-audio-mux.test.d.ts +6 -0
- package/dist/commands/_shared/scene-audio-scan.d.ts +93 -0
- package/dist/commands/_shared/scene-audio-scan.test.d.ts +5 -0
- package/dist/commands/_shared/scene-build-mode.d.ts +4 -0
- package/dist/commands/_shared/scene-build-mode.test.d.ts +1 -0
- package/dist/commands/_shared/scene-build.d.ts +452 -0
- package/dist/commands/_shared/scene-build.test.d.ts +1 -0
- package/dist/commands/_shared/scene-html-emit.d.ts +163 -0
- package/dist/commands/_shared/scene-html-emit.test.d.ts +1 -0
- package/dist/commands/_shared/scene-inspect.d.ts +56 -0
- package/dist/commands/_shared/scene-inspect.test.d.ts +1 -0
- package/dist/commands/_shared/scene-lint.d.ts +109 -0
- package/dist/commands/_shared/scene-lint.test.d.ts +1 -0
- package/dist/commands/_shared/scene-project.d.ts +147 -0
- package/dist/commands/_shared/scene-project.test.d.ts +1 -0
- package/dist/commands/_shared/scene-render.d.ts +109 -0
- package/dist/commands/_shared/scene-render.test.d.ts +1 -0
- package/dist/commands/_shared/scene-repair.d.ts +22 -0
- package/dist/commands/_shared/scene-repair.test.d.ts +1 -0
- package/dist/commands/_shared/status-jobs.d.ts +197 -0
- package/dist/commands/_shared/status-jobs.test.d.ts +1 -0
- package/dist/commands/_shared/storyboard-draft.d.ts +13 -0
- package/dist/commands/_shared/storyboard-draft.test.d.ts +1 -0
- package/dist/commands/_shared/storyboard-edit.d.ts +26 -0
- package/dist/commands/_shared/storyboard-edit.test.d.ts +1 -0
- package/dist/commands/_shared/storyboard-parse.d.ts +159 -0
- package/dist/commands/_shared/storyboard-parse.test.d.ts +1 -0
- package/dist/commands/_shared/storyboard-revise.d.ts +32 -0
- package/dist/commands/_shared/storyboard-revise.test.d.ts +1 -0
- package/dist/commands/_shared/timeline-project.d.ts +32 -0
- package/dist/commands/_shared/tts-resolve.d.ts +75 -0
- package/dist/commands/_shared/tts-resolve.test.d.ts +5 -0
- package/dist/commands/_shared/video-providers.d.ts +44 -0
- package/dist/commands/_shared/video-utils.d.ts +71 -0
- package/dist/commands/_shared/visual-styles.d.ts +55 -0
- package/dist/commands/_shared/visual-styles.test.d.ts +1 -0
- package/dist/commands/_shared/walkthroughs/walkthroughs.d.ts +47 -0
- package/dist/commands/_shared/walkthroughs/walkthroughs.test.d.ts +1 -0
- package/dist/commands/agent.d.ts +24 -0
- package/dist/commands/ai-analyze.d.ts +105 -0
- package/dist/commands/ai-animated-caption.d.ts +63 -0
- package/dist/commands/ai-audio.d.ts +92 -0
- package/dist/commands/ai-edit-cli.d.ts +13 -0
- package/dist/commands/ai-edit.d.ts +29 -0
- package/dist/commands/ai-fill-gaps.d.ts +15 -0
- package/dist/commands/ai-helpers.d.ts +26 -0
- package/dist/commands/ai-highlights.d.ts +126 -0
- package/dist/commands/ai-image.d.ts +71 -0
- package/dist/commands/ai-motion.d.ts +53 -0
- package/dist/commands/ai-review.d.ts +58 -0
- package/dist/commands/ai-script-pipeline-cli.d.ts +10 -0
- package/dist/commands/ai-script-pipeline.d.ts +74 -0
- package/dist/commands/ai-suggest-edit.d.ts +32 -0
- package/dist/commands/ai-video.d.ts +95 -0
- package/dist/commands/ai.test.d.ts +1 -0
- package/dist/commands/audio.d.ts +17 -0
- package/dist/commands/batch.d.ts +2 -0
- package/dist/commands/batch.test.d.ts +1 -0
- package/dist/commands/build.d.ts +2 -0
- package/dist/commands/completion.d.ts +20 -0
- package/dist/commands/completion.test.d.ts +1 -0
- package/dist/commands/context.d.ts +7 -0
- package/dist/commands/context.test.d.ts +1 -0
- package/dist/commands/demo.d.ts +6 -0
- package/dist/commands/detect.d.ts +55 -0
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/doctor.test.d.ts +1 -0
- package/dist/commands/edit/motion-overlay.d.ts +30 -0
- package/dist/commands/edit-cmd.d.ts +112 -0
- package/dist/commands/envelope-snapshots.test.d.ts +32 -0
- package/dist/commands/export.d.ts +60 -0
- package/dist/commands/export.test.d.ts +1 -0
- package/dist/commands/generate/background.d.ts +22 -0
- package/dist/commands/generate/image.d.ts +8 -0
- package/dist/commands/generate/music-status.d.ts +20 -0
- package/dist/commands/generate/music.d.ts +27 -0
- package/dist/commands/generate/sound-effect.d.ts +19 -0
- package/dist/commands/generate/speech.d.ts +21 -0
- package/dist/commands/generate/storyboard.d.ts +27 -0
- package/dist/commands/generate/thumbnail.d.ts +8 -0
- package/dist/commands/generate/video-cancel.d.ts +8 -0
- package/dist/commands/generate/video-extend.d.ts +8 -0
- package/dist/commands/generate/video-status.d.ts +8 -0
- package/dist/commands/generate/video.d.ts +8 -0
- package/dist/commands/generate.d.ts +36 -0
- package/dist/commands/init.d.ts +24 -0
- package/dist/commands/init.test.d.ts +1 -0
- package/dist/commands/inspect.d.ts +20 -0
- package/dist/commands/media.d.ts +2 -0
- package/dist/commands/output.d.ts +80 -0
- package/dist/commands/output.test.d.ts +1 -0
- package/dist/commands/plan.d.ts +2 -0
- package/dist/commands/project.d.ts +2 -0
- package/dist/commands/project.test.d.ts +1 -0
- package/dist/commands/provider-config-cli.test.d.ts +1 -0
- package/dist/commands/q-flag-collision.test.d.ts +1 -0
- package/dist/commands/remix.d.ts +20 -0
- package/dist/commands/render.d.ts +2 -0
- package/dist/commands/run.d.ts +14 -0
- package/dist/commands/sanitize.d.ts +20 -0
- package/dist/commands/scene.d.ts +95 -0
- package/dist/commands/scene.test.d.ts +1 -0
- package/dist/commands/schema.d.ts +12 -0
- package/dist/commands/setup.d.ts +5 -0
- package/dist/commands/setup.test.d.ts +1 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/storyboard.d.ts +2 -0
- package/dist/commands/timeline.d.ts +2 -0
- package/dist/commands/timeline.test.d.ts +1 -0
- package/dist/commands/validate.d.ts +33 -0
- package/dist/commands/walkthrough.d.ts +21 -0
- package/dist/config/config.test.d.ts +1 -0
- package/dist/config/index.d.ts +110 -0
- package/dist/config/schema.d.ts +64 -0
- package/dist/config/scope.test.d.ts +1 -0
- package/dist/engine/index.d.ts +2 -0
- package/dist/engine/index.js +345 -0
- package/dist/engine/project.d.ts +93 -0
- package/dist/engine/project.test.d.ts +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +500 -330
- package/dist/pipeline/executor.d.ts +27 -0
- package/dist/pipeline/generate-actions.test.d.ts +1 -0
- package/dist/pipeline/index.d.ts +3 -0
- package/dist/pipeline/renderers/__tests__/html-template.test.d.ts +1 -0
- package/dist/pipeline/renderers/__tests__/integration.test.d.ts +1 -0
- package/dist/pipeline/renderers/chrome.d.ts +25 -0
- package/dist/pipeline/renderers/html-clips.d.ts +19 -0
- package/dist/pipeline/renderers/html-runtime.d.ts +6 -0
- package/dist/pipeline/renderers/html-template.d.ts +2 -0
- package/dist/pipeline/renderers/hyperframes.d.ts +7 -0
- package/dist/pipeline/renderers/project-builder.d.ts +7 -0
- package/dist/pipeline/renderers/types.d.ts +39 -0
- package/dist/pipeline/resolver.d.ts +19 -0
- package/dist/pipeline/scene-actions.test.d.ts +1 -0
- package/dist/pipeline/types.d.ts +81 -0
- package/dist/tools/adapters/agent.d.ts +9 -0
- package/dist/tools/adapters/agent.js +188 -0
- package/dist/tools/adapters/mcp.d.ts +34 -0
- package/dist/tools/adapters/mcp.js +173 -0
- package/dist/tools/define-tool.d.ts +82 -0
- package/dist/tools/define-tool.js +214 -0
- package/dist/tools/manifest/_project-io.d.ts +13 -0
- package/dist/tools/manifest/agent-only.d.ts +236 -0
- package/dist/tools/manifest/audio.d.ts +93 -0
- package/dist/tools/manifest/detect.d.ts +47 -0
- package/dist/tools/manifest/edit.d.ts +398 -0
- package/dist/tools/manifest/export.d.ts +27 -0
- package/dist/tools/manifest/generate.d.ts +310 -0
- package/dist/tools/manifest/index.d.ts +22 -0
- package/dist/tools/manifest/index.js +60812 -0
- package/dist/tools/manifest/inspect.d.ts +139 -0
- package/dist/tools/manifest/project.d.ts +33 -0
- package/dist/tools/manifest/remix.d.ts +154 -0
- package/dist/tools/manifest/scene.d.ts +221 -0
- package/dist/tools/manifest/status.d.ts +36 -0
- package/dist/tools/manifest/storyboard.d.ts +136 -0
- package/dist/tools/manifest/timeline.d.ts +173 -0
- package/dist/tools/manifest/walkthrough.d.ts +22 -0
- package/dist/tools/manifest.test.d.ts +13 -0
- package/dist/tools/zod-to-json-schema.d.ts +47 -0
- package/dist/utils/agent-host-detect.d.ts +61 -0
- package/dist/utils/agent-host-detect.test.d.ts +1 -0
- package/dist/utils/api-key.d.ts +58 -0
- package/dist/utils/api-key.test.d.ts +1 -0
- package/dist/utils/audio.d.ts +22 -0
- package/dist/utils/clipboard.d.ts +27 -0
- package/dist/utils/clipboard.test.d.ts +1 -0
- package/dist/utils/exec-safe.d.ts +21 -0
- package/dist/utils/first-run.d.ts +16 -0
- package/dist/utils/input-validation.d.ts +26 -0
- package/dist/utils/key-format.d.ts +15 -0
- package/dist/utils/key-live-test.d.ts +29 -0
- package/dist/utils/key-live-test.test.d.ts +1 -0
- package/dist/utils/open-url.d.ts +26 -0
- package/dist/utils/open-url.test.d.ts +1 -0
- package/dist/utils/project-resolver.d.ts +30 -0
- package/dist/utils/project-resolver.test.d.ts +8 -0
- package/dist/utils/provider-resolver.d.ts +32 -0
- package/dist/utils/provider-resolver.test.d.ts +13 -0
- package/dist/utils/remotion.d.ts +201 -0
- package/dist/utils/subtitle.d.ts +64 -0
- package/dist/utils/subtitle.test.d.ts +1 -0
- package/dist/utils/tty.d.ts +86 -0
- package/dist/utils/tty.test.d.ts +1 -0
- package/dist/utils/upload-host.d.ts +15 -0
- package/dist/utils/upload-host.test.d.ts +1 -0
- package/package.json +15 -115
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module _shared/scene-html-emit
|
|
3
|
+
*
|
|
4
|
+
* Pure HTML emitters for `vibe scene add`. Each preset produces a self-contained
|
|
5
|
+
* Hyperframes-compatible scene composition: a `<template>`-wrapped `<div
|
|
6
|
+
* data-composition-id>` with scoped CSS, optional audio/image, and a paused
|
|
7
|
+
* GSAP timeline registered on `window.__timelines`.
|
|
8
|
+
*
|
|
9
|
+
* Also exposes helpers that mutate the root index.html:
|
|
10
|
+
* - `nextSceneStart()` — sum existing clip end-times to choose the new start
|
|
11
|
+
* - `insertClipIntoRoot()` — splice a `<div class="clip">` reference before the
|
|
12
|
+
* root's closing div, preserving the user's hand-edited markup
|
|
13
|
+
* - `slugifySceneName()` — name → kebab-case scene id
|
|
14
|
+
*
|
|
15
|
+
* Pure functions only — no I/O. The orchestrating command (`scene add`) wires
|
|
16
|
+
* these to the filesystem.
|
|
17
|
+
*/
|
|
18
|
+
export type ScenePreset = "simple" | "announcement" | "explainer" | "kinetic-type" | "product-shot";
|
|
19
|
+
export declare const SCENE_PRESETS: readonly ScenePreset[];
|
|
20
|
+
/**
|
|
21
|
+
* One word from a Whisper word-level transcript. Mirrors
|
|
22
|
+
* {@link import("@vibeframe/ai-providers").TranscriptWord} but is duplicated
|
|
23
|
+
* here so this module stays pure (no provider package import).
|
|
24
|
+
*/
|
|
25
|
+
export interface SceneTranscriptWord {
|
|
26
|
+
text: string;
|
|
27
|
+
start: number;
|
|
28
|
+
end: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Position value for Lottie overlays. Mirrors the vocabulary used by
|
|
32
|
+
* `vibe edit motion-overlay --position`.
|
|
33
|
+
*/
|
|
34
|
+
export type LottiePosition = "full" | "center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
35
|
+
export declare const LOTTIE_POSITIONS: readonly LottiePosition[];
|
|
36
|
+
export interface LottieOverlayInput {
|
|
37
|
+
/** Project-relative path to the `.json` or `.lottie` file (e.g. "assets/logo.lottie"). */
|
|
38
|
+
src: string;
|
|
39
|
+
/** Overlay position. Defaults to "full". */
|
|
40
|
+
position?: LottiePosition;
|
|
41
|
+
/** Scale factor (0.01-2). Defaults to 1. */
|
|
42
|
+
scale?: number;
|
|
43
|
+
/** Opacity (0-1). Defaults to 1. */
|
|
44
|
+
opacity?: number;
|
|
45
|
+
/** Whether the animation loops. Defaults to true. */
|
|
46
|
+
loop?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface EmitSceneInput {
|
|
49
|
+
/** Kebab-case scene id; appears in `data-composition-id` and template id. */
|
|
50
|
+
id: string;
|
|
51
|
+
preset: ScenePreset;
|
|
52
|
+
/** Canvas width in px (must match the root composition). */
|
|
53
|
+
width: number;
|
|
54
|
+
/** Canvas height in px (must match the root composition). */
|
|
55
|
+
height: number;
|
|
56
|
+
/** Visible composition duration in seconds. */
|
|
57
|
+
duration: number;
|
|
58
|
+
/** Headline text — required for non-simple presets; defaulted from id. */
|
|
59
|
+
headline?: string;
|
|
60
|
+
/** Secondary text (subhead/caption). Often the narration. */
|
|
61
|
+
subhead?: string;
|
|
62
|
+
/** Optional small label above the headline (explainer / product-shot). */
|
|
63
|
+
kicker?: string;
|
|
64
|
+
/** Project-relative image path (e.g. "assets/scene-intro.png"). */
|
|
65
|
+
imagePath?: string;
|
|
66
|
+
/** Project-relative narration audio path (e.g. "assets/narration-intro.mp3"). */
|
|
67
|
+
audioPath?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Word-level timings (Whisper output) for narration sync. When supplied, the
|
|
70
|
+
* `simple`, `explainer`, and `kinetic-type` presets render each word as its
|
|
71
|
+
* own `<span class="word">` and animate them at their absolute audio start
|
|
72
|
+
* times via GSAP. `announcement` and `product-shot` ignore this field —
|
|
73
|
+
* their headlines are intentionally static.
|
|
74
|
+
*/
|
|
75
|
+
transcript?: SceneTranscriptWord[];
|
|
76
|
+
/**
|
|
77
|
+
* Optional Lottie animation overlay. When supplied, a `<dotlottie-wc>`
|
|
78
|
+
* element is layered on top of the preset's content. Uses the same
|
|
79
|
+
* position/scale/opacity vocabulary as `vibe edit motion-overlay`.
|
|
80
|
+
*/
|
|
81
|
+
lottie?: LottieOverlayInput;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Slugify a free-form scene name to a kebab-case id usable in HTML attributes
|
|
85
|
+
* and filenames. Strips diacritics, collapses whitespace, lowercases.
|
|
86
|
+
*/
|
|
87
|
+
export declare function slugifySceneName(name: string): string;
|
|
88
|
+
/**
|
|
89
|
+
* Render a transcript as `<span class="word" data-i="N">…</span>` markup,
|
|
90
|
+
* separated by literal whitespace so kerning and wrapping behave naturally.
|
|
91
|
+
* Returns the empty string when there's nothing to render.
|
|
92
|
+
*/
|
|
93
|
+
export declare function renderTranscriptSpans(transcript: SceneTranscriptWord[]): string;
|
|
94
|
+
/**
|
|
95
|
+
* Build absolute-timing GSAP tweens that fade each transcript word in at its
|
|
96
|
+
* narration `start` time. The `targetSelector` parametrises the scope so the
|
|
97
|
+
* same routine can drive `simple` (`.caption .word`), `explainer`
|
|
98
|
+
* (`#subtitle .word`), or `kinetic-type` (`.kinetic .word`).
|
|
99
|
+
*
|
|
100
|
+
* Each tween is `tl.fromTo(sel, {opacity:0,y:10}, {opacity:1,y:0,duration:0.18}, start)`
|
|
101
|
+
* — short enough to feel responsive at any speech rate, long enough to avoid
|
|
102
|
+
* popping at 30fps. Words clamp to non-negative starts.
|
|
103
|
+
*/
|
|
104
|
+
export declare function buildTranscriptTweens(transcript: SceneTranscriptWord[], targetSelector: string): string;
|
|
105
|
+
/**
|
|
106
|
+
* Length of the scope opacity fade-in / fade-out applied at every scene's
|
|
107
|
+
* boundaries. When two adjacent clips overlap by this amount in the parent
|
|
108
|
+
* timeline (`scene.ts` and `segments-to-scenes.ts` lay them out that way),
|
|
109
|
+
* the outgoing scene's last `SCENE_OVERLAP_SECONDS` fades to opacity 0
|
|
110
|
+
* while the incoming scene's first `SCENE_OVERLAP_SECONDS` fades from 0,
|
|
111
|
+
* yielding a smooth crossfade instead of the hard cut the previous
|
|
112
|
+
* architecture produced.
|
|
113
|
+
*
|
|
114
|
+
* Tuned at 0.4 s — long enough that the eye perceives a soft transition,
|
|
115
|
+
* short enough that the text content of the next scene is fully present
|
|
116
|
+
* by the time the entrance animation finishes (entrance starts at 0.05 s).
|
|
117
|
+
*/
|
|
118
|
+
export declare const SCENE_OVERLAP_SECONDS = 0.4;
|
|
119
|
+
/**
|
|
120
|
+
* Emit the full per-scene HTML. Returns a complete `<template>`-wrapped
|
|
121
|
+
* composition ready to write to `compositions/scene-<id>.html`.
|
|
122
|
+
*/
|
|
123
|
+
export declare function emitSceneHtml(input: EmitSceneInput): string;
|
|
124
|
+
/**
|
|
125
|
+
* Sum existing `<div class="clip">` end-times to find where the next scene
|
|
126
|
+
* should start. Returns 0 for an empty root.
|
|
127
|
+
*
|
|
128
|
+
* `overlap` (default 0) is subtracted from the max end-time so callers can
|
|
129
|
+
* place the new clip to overlap with the previous one — used by the
|
|
130
|
+
* crossfade architecture (`vibe scene add` and `segments-to-scenes.ts`
|
|
131
|
+
* pass `SCENE_OVERLAP_SECONDS` here so each new scene's first
|
|
132
|
+
* `SCENE_OVERLAP_SECONDS` blend with the previous scene's last).
|
|
133
|
+
*/
|
|
134
|
+
export declare function nextSceneStart(rootHtml: string, overlap?: number): number;
|
|
135
|
+
export interface ClipReferenceInput {
|
|
136
|
+
/** Scene id — used to derive the composition src path. */
|
|
137
|
+
id: string;
|
|
138
|
+
start: number;
|
|
139
|
+
duration: number;
|
|
140
|
+
trackIndex?: number;
|
|
141
|
+
/** Override the default `compositions/scene-<id>.html` src. */
|
|
142
|
+
src?: string;
|
|
143
|
+
}
|
|
144
|
+
/** Build the `<div class="clip" data-composition-id=... data-composition-src=...>` reference string. */
|
|
145
|
+
export declare function buildClipReference(opts: ClipReferenceInput): string;
|
|
146
|
+
/**
|
|
147
|
+
* Insert a clip reference inside the root composition's `#root` div, just
|
|
148
|
+
* before its closing `</div>`. Throws if the expected closing tag isn't
|
|
149
|
+
* found — callers should surface this as a structured error so users know
|
|
150
|
+
* to inspect a hand-edited root.
|
|
151
|
+
*
|
|
152
|
+
* Also grows the root's `data-duration` to fit the new clip's end-time.
|
|
153
|
+
*/
|
|
154
|
+
export declare function insertClipIntoRoot(rootHtml: string, clip: ClipReferenceInput): string;
|
|
155
|
+
/**
|
|
156
|
+
* Read the root composition's canvas dims by parsing `data-width`/`data-height`
|
|
157
|
+
* on the `#root` div. Returns null if either is missing — caller should fall
|
|
158
|
+
* back to the project's aspect config.
|
|
159
|
+
*/
|
|
160
|
+
export declare function readRootDims(rootHtml: string): {
|
|
161
|
+
width: number;
|
|
162
|
+
height: number;
|
|
163
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type ReviewIssue, type ReviewSummary, type ReviewStatus } from "./review-report.js";
|
|
2
|
+
export interface ProjectInspectOptions {
|
|
3
|
+
projectDir: string;
|
|
4
|
+
beatId?: string;
|
|
5
|
+
outputPath?: string;
|
|
6
|
+
writeReport?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ProjectInspectResult {
|
|
9
|
+
schemaVersion: "1";
|
|
10
|
+
kind: "project";
|
|
11
|
+
mode: "project";
|
|
12
|
+
project: string;
|
|
13
|
+
beat?: string;
|
|
14
|
+
status: ReviewStatus;
|
|
15
|
+
score: number;
|
|
16
|
+
issues: ReviewIssue[];
|
|
17
|
+
summary: ReviewSummary;
|
|
18
|
+
sourceReports: string[];
|
|
19
|
+
checks: {
|
|
20
|
+
files: Record<string, boolean>;
|
|
21
|
+
storyboard: {
|
|
22
|
+
ok: boolean;
|
|
23
|
+
beatCount: number;
|
|
24
|
+
};
|
|
25
|
+
compositions: {
|
|
26
|
+
expected: number;
|
|
27
|
+
found: number;
|
|
28
|
+
missing: string[];
|
|
29
|
+
};
|
|
30
|
+
lint: {
|
|
31
|
+
ok: boolean | null;
|
|
32
|
+
errorCount: number;
|
|
33
|
+
warningCount: number;
|
|
34
|
+
infoCount: number;
|
|
35
|
+
};
|
|
36
|
+
buildReport: {
|
|
37
|
+
exists: boolean;
|
|
38
|
+
outputPath?: string;
|
|
39
|
+
};
|
|
40
|
+
assets: {
|
|
41
|
+
checked: number;
|
|
42
|
+
missing: string[];
|
|
43
|
+
stale: string[];
|
|
44
|
+
unknownFreshness: string[];
|
|
45
|
+
};
|
|
46
|
+
rootSync: {
|
|
47
|
+
ok: boolean | null;
|
|
48
|
+
issueCount: number;
|
|
49
|
+
issues: string[];
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
retryWith: string[];
|
|
53
|
+
reportPath?: string;
|
|
54
|
+
}
|
|
55
|
+
export declare function inspectProject(opts: ProjectInspectOptions): Promise<ProjectInspectResult>;
|
|
56
|
+
export declare function displayIssue(issue: ReviewIssue): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module _shared/scene-lint
|
|
3
|
+
*
|
|
4
|
+
* In-process Hyperframes lint pipeline for VibeFrame scene projects. Wraps
|
|
5
|
+
* `runHyperframeLint` from `@hyperframes/producer` (its public lint entry
|
|
6
|
+
* point) and adapts the output to VibeFrame's two-tier file structure:
|
|
7
|
+
*
|
|
8
|
+
* project/
|
|
9
|
+
* index.html # root composition → linted as-is
|
|
10
|
+
* compositions/*.html # sub-compositions → producer's lint emits two
|
|
11
|
+
* spurious findings here, so
|
|
12
|
+
* we filter them out.
|
|
13
|
+
*
|
|
14
|
+
* Two findings are filtered for sub-compositions because they encode the
|
|
15
|
+
* inverse rule (sub-comps SHOULD be wrapped in `<template>` and SHOULD NOT
|
|
16
|
+
* have an `<html>` wrapper):
|
|
17
|
+
* - `standalone_composition_wrapped_in_template`
|
|
18
|
+
* - `root_composition_missing_html_wrapper`
|
|
19
|
+
*
|
|
20
|
+
* Pure helpers are exported for unit testing; `runProjectLint` does the
|
|
21
|
+
* filesystem walk + lint orchestration. Mechanical `--fix` is intentionally
|
|
22
|
+
* conservative — only `timed_element_missing_clip_class` is auto-fixed in
|
|
23
|
+
* MVP 1.
|
|
24
|
+
*/
|
|
25
|
+
export type LintSeverity = "error" | "warning" | "info";
|
|
26
|
+
export interface LintFinding {
|
|
27
|
+
code: string;
|
|
28
|
+
severity: LintSeverity;
|
|
29
|
+
message: string;
|
|
30
|
+
file?: string;
|
|
31
|
+
selector?: string;
|
|
32
|
+
elementId?: string;
|
|
33
|
+
fixHint?: string;
|
|
34
|
+
snippet?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface FileLintResult {
|
|
37
|
+
/** Path relative to the project directory. */
|
|
38
|
+
file: string;
|
|
39
|
+
/** True for files under `compositions/` — used to filter false positives. */
|
|
40
|
+
isSubComposition: boolean;
|
|
41
|
+
findings: LintFinding[];
|
|
42
|
+
}
|
|
43
|
+
export interface FileFixResult {
|
|
44
|
+
file: string;
|
|
45
|
+
/** Codes that were mechanically fixed. */
|
|
46
|
+
codes: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface ProjectLintResult {
|
|
49
|
+
ok: boolean;
|
|
50
|
+
errorCount: number;
|
|
51
|
+
warningCount: number;
|
|
52
|
+
infoCount: number;
|
|
53
|
+
files: FileLintResult[];
|
|
54
|
+
fixed: FileFixResult[];
|
|
55
|
+
}
|
|
56
|
+
/** Producer's two findings that are inverse-rules for sub-compositions. */
|
|
57
|
+
export declare const SUB_COMP_FALSE_POSITIVES: ReadonlySet<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Discover scene files in a project. Returns the root composition (or null
|
|
60
|
+
* if missing) plus every `*.html` file under `compositions/` recursively.
|
|
61
|
+
*
|
|
62
|
+
* Paths returned are absolute. The caller derives project-relative paths via
|
|
63
|
+
* `relative(projectDir, path)`.
|
|
64
|
+
*/
|
|
65
|
+
export declare function discoverSceneFiles(opts: {
|
|
66
|
+
projectDir: string;
|
|
67
|
+
rootRel?: string;
|
|
68
|
+
}): Promise<{
|
|
69
|
+
root: string | null;
|
|
70
|
+
subs: string[];
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Drop findings that producer's lint emits as inverse-rules for sub-comp
|
|
74
|
+
* files. Other findings pass through unchanged.
|
|
75
|
+
*/
|
|
76
|
+
export declare function filterSubCompFalsePositives(findings: LintFinding[], isSubComposition: boolean): LintFinding[];
|
|
77
|
+
/**
|
|
78
|
+
* Apply mechanical `--fix` rewrites for known-safe finding codes. Returns the
|
|
79
|
+
* (possibly unchanged) HTML and the list of codes that were fixed at least
|
|
80
|
+
* once.
|
|
81
|
+
*
|
|
82
|
+
* MVP 1 only auto-fixes `timed_element_missing_clip_class` — adding the
|
|
83
|
+
* `clip` class to elements that already carry timing attributes.
|
|
84
|
+
*
|
|
85
|
+
* Other "registration"/"paused" fixes are intentionally NOT mechanical —
|
|
86
|
+
* they require structural reasoning (where to insert the `window.__timelines`
|
|
87
|
+
* block, how to convert an unpaused timeline) that goes beyond a regex.
|
|
88
|
+
* The lint output still surfaces them with `fixHint` for the agent or human
|
|
89
|
+
* to apply.
|
|
90
|
+
*/
|
|
91
|
+
export declare function applyMechanicalFixes(html: string, findings: LintFinding[]): {
|
|
92
|
+
html: string;
|
|
93
|
+
fixedCodes: string[];
|
|
94
|
+
};
|
|
95
|
+
export interface RunProjectLintOptions {
|
|
96
|
+
projectDir: string;
|
|
97
|
+
rootRel?: string;
|
|
98
|
+
/** Apply mechanical fixes and write files back. */
|
|
99
|
+
fix?: boolean;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Walk the project, lint every HTML file, optionally apply mechanical fixes,
|
|
103
|
+
* and return aggregated counts. Throws only on FS errors; lint errors are
|
|
104
|
+
* surfaced as findings, not exceptions.
|
|
105
|
+
*/
|
|
106
|
+
export declare function runProjectLint(opts: RunProjectLintOptions): Promise<ProjectLintResult>;
|
|
107
|
+
/** True if `root` exists and is a regular file. Used by callers that want to
|
|
108
|
+
* pre-validate before invoking `runProjectLint`. */
|
|
109
|
+
export declare function rootExists(projectDir: string, rootRel?: string): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module _shared/scene-project
|
|
3
|
+
*
|
|
4
|
+
* Helpers for scaffolding a "scene project" — a directory that works as both
|
|
5
|
+
* a VibeFrame project (via `vibe.project.yaml`) AND a HeyGen Hyperframes
|
|
6
|
+
* project (via `hyperframes.json` + `meta.json` + `index.html`). Either
|
|
7
|
+
* toolchain can be run inside the directory.
|
|
8
|
+
*
|
|
9
|
+
* Pure functions; no I/O beyond `scaffoldSceneProject()` which orchestrates
|
|
10
|
+
* file writes. Everything else returns strings or JSON-serializable objects
|
|
11
|
+
* so it can be unit-tested without touching the filesystem.
|
|
12
|
+
*/
|
|
13
|
+
import type { VisualStyle } from "./visual-styles.js";
|
|
14
|
+
/** Supported aspect ratios for scene projects (maps to CSS canvas dims). */
|
|
15
|
+
export type SceneAspect = "16:9" | "9:16" | "1:1" | "4:5";
|
|
16
|
+
export type SceneScaffoldProfile = "minimal" | "agent" | "full";
|
|
17
|
+
export declare function aspectToDims(aspect: SceneAspect): {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
/** Shape of the Hyperframes project config file. */
|
|
22
|
+
export interface HyperframesConfig {
|
|
23
|
+
$schema?: string;
|
|
24
|
+
registry?: string;
|
|
25
|
+
paths?: {
|
|
26
|
+
blocks?: string;
|
|
27
|
+
components?: string;
|
|
28
|
+
assets?: string;
|
|
29
|
+
};
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
/** Shape of the Hyperframes meta file. */
|
|
33
|
+
export interface HyperframesMeta {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
}
|
|
39
|
+
/** Shape of the new VibeFrame-specific project config. */
|
|
40
|
+
export interface VibeProjectConfig {
|
|
41
|
+
name: string;
|
|
42
|
+
aspect: SceneAspect;
|
|
43
|
+
/** Default scene duration in seconds when none is inferred from narration. */
|
|
44
|
+
defaultSceneDuration: number;
|
|
45
|
+
/** Default providers per capability. `null` means "auto-resolve from env". */
|
|
46
|
+
providers: {
|
|
47
|
+
image: "openai" | "gemini" | "grok" | null;
|
|
48
|
+
tts: "elevenlabs" | "kokoro" | null;
|
|
49
|
+
transcribe: "whisper" | null;
|
|
50
|
+
};
|
|
51
|
+
/** Cost ceiling for `vibe remix` runs in this project. 0 disables. */
|
|
52
|
+
budget: {
|
|
53
|
+
maxUsd: number;
|
|
54
|
+
};
|
|
55
|
+
/** Scene composition renderer boundary. Hyperframes is the only supported engine today. */
|
|
56
|
+
composition: {
|
|
57
|
+
engine: "hyperframes";
|
|
58
|
+
entry: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** Defaults for a fresh scene project. */
|
|
62
|
+
export declare function defaultVibeProjectConfig(name: string): VibeProjectConfig;
|
|
63
|
+
/** The Hyperframes config we write on init. Matches the format at
|
|
64
|
+
* hyperframe-learn/my-first-video/hyperframes.json.
|
|
65
|
+
*/
|
|
66
|
+
export declare function buildHyperframesConfig(): HyperframesConfig;
|
|
67
|
+
export declare function buildHyperframesMeta(name: string, now?: Date): HyperframesMeta;
|
|
68
|
+
/**
|
|
69
|
+
* Merge an existing Hyperframes config with our defaults, preserving any
|
|
70
|
+
* user-authored keys and nested values. `vibe scene init` is idempotent:
|
|
71
|
+
* running it on a directory that already has `hyperframes.json` must never
|
|
72
|
+
* lose user config.
|
|
73
|
+
*/
|
|
74
|
+
export declare function mergeHyperframesConfig(existing: HyperframesConfig, defaults: HyperframesConfig): HyperframesConfig;
|
|
75
|
+
/**
|
|
76
|
+
* Minimal valid Hyperframes root composition — empty (no sub-compositions
|
|
77
|
+
* yet). A later `vibe scene add` inserts `<div class="clip" ...>` children.
|
|
78
|
+
*/
|
|
79
|
+
export declare function buildEmptyRootHtml(opts: {
|
|
80
|
+
aspect: SceneAspect;
|
|
81
|
+
duration: number;
|
|
82
|
+
}): string;
|
|
83
|
+
/**
|
|
84
|
+
* Project-local `DESIGN.md` template — the visual-identity hard-gate.
|
|
85
|
+
*
|
|
86
|
+
* Hyperframes' `hyperframes` skill teaches: "no scene HTML before DESIGN.md is
|
|
87
|
+
* authored." This template seeds that contract so the project never opens
|
|
88
|
+
* with a blank slate. When `style` is provided, the rules are pre-filled
|
|
89
|
+
* from the vendored named-style data (`visual-styles.ts`); otherwise the
|
|
90
|
+
* user (or agent) fills the placeholders.
|
|
91
|
+
*
|
|
92
|
+
* The agent-driven craft path expects this file as input — see
|
|
93
|
+
* `.claude/skills/vibe-scene/SKILL.md`.
|
|
94
|
+
*/
|
|
95
|
+
export declare function buildDesignMd(opts: {
|
|
96
|
+
name: string;
|
|
97
|
+
style?: VisualStyle;
|
|
98
|
+
}): string;
|
|
99
|
+
/** Starter `STORYBOARD.md` for the one-shot `vibe build` flow. */
|
|
100
|
+
export declare function buildStoryboardMd(name: string, duration?: number): string;
|
|
101
|
+
/** Project-local AGENTS.md that orients every agent host to both toolchains. */
|
|
102
|
+
export declare function buildProjectAgentsMd(name: string): string;
|
|
103
|
+
/** Claude Code wrapper. Keeps scene guidance single-sourced in AGENTS.md. */
|
|
104
|
+
export declare function buildProjectClaudeMd(name: string): string;
|
|
105
|
+
/** Minimal .gitignore for a scene project. */
|
|
106
|
+
export declare function buildSceneGitignore(): string;
|
|
107
|
+
export interface ScaffoldOptions {
|
|
108
|
+
dir: string;
|
|
109
|
+
name?: string;
|
|
110
|
+
aspect?: SceneAspect;
|
|
111
|
+
duration?: number;
|
|
112
|
+
now?: Date;
|
|
113
|
+
/**
|
|
114
|
+
* Optional named visual style (e.g. "Swiss Pulse"). When provided,
|
|
115
|
+
* `DESIGN.md` is seeded with the style's palette / typography / motion
|
|
116
|
+
* rules instead of placeholders. Resolved via `getVisualStyle()`.
|
|
117
|
+
*/
|
|
118
|
+
visualStyle?: VisualStyle;
|
|
119
|
+
/** Scaffold shape. Defaults to "full" for backward-compatible programmatic use. */
|
|
120
|
+
profile?: SceneScaffoldProfile;
|
|
121
|
+
}
|
|
122
|
+
export interface ScaffoldResult {
|
|
123
|
+
/** Files written (absolute paths). */
|
|
124
|
+
created: string[];
|
|
125
|
+
/** Files that already existed and were NOT overwritten. */
|
|
126
|
+
skipped: string[];
|
|
127
|
+
/** Files that were merge-updated (currently only hyperframes.json). */
|
|
128
|
+
merged: string[];
|
|
129
|
+
/** Files grouped by product purpose for human and JSON output. */
|
|
130
|
+
groups: SceneScaffoldGroups;
|
|
131
|
+
}
|
|
132
|
+
export interface SceneScaffoldGroups {
|
|
133
|
+
authoring: string[];
|
|
134
|
+
render: string[];
|
|
135
|
+
agent: string[];
|
|
136
|
+
}
|
|
137
|
+
export declare function isSceneScaffoldProfile(value: string): value is SceneScaffoldProfile;
|
|
138
|
+
export declare function describeSceneScaffold(opts: {
|
|
139
|
+
dir: string;
|
|
140
|
+
profile?: SceneScaffoldProfile;
|
|
141
|
+
}): SceneScaffoldGroups;
|
|
142
|
+
/**
|
|
143
|
+
* Scaffold (or update) a scene project at `dir`. Idempotent: running twice is
|
|
144
|
+
* a no-op; running on an existing Hyperframes project merges `hyperframes.json`
|
|
145
|
+
* instead of overwriting.
|
|
146
|
+
*/
|
|
147
|
+
export declare function scaffoldSceneProject(opts: ScaffoldOptions): Promise<ScaffoldResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module _shared/scene-render
|
|
3
|
+
*
|
|
4
|
+
* Render a VibeFrame scene project to MP4/WebM/MOV using the Hyperframes
|
|
5
|
+
* producer directly. Unlike the FFmpeg-bridge backend in
|
|
6
|
+
* `pipeline/renderers/hyperframes.ts` which has to convert a `TimelineState`
|
|
7
|
+
* into a temp Hyperframes project, scene projects already ARE Hyperframes
|
|
8
|
+
* projects — so we hand the producer the user's project dir and entry file
|
|
9
|
+
* verbatim.
|
|
10
|
+
*
|
|
11
|
+
* `executeSceneRender()` is decoupled from CLI flags so that the C6 agent
|
|
12
|
+
* tool and the C5 `--format scenes` pipeline can call it the same way. It
|
|
13
|
+
* returns a structured result instead of throwing or exiting.
|
|
14
|
+
*/
|
|
15
|
+
import { type RenderConfig } from "@hyperframes/producer";
|
|
16
|
+
import { type SceneAspect } from "./scene-project.js";
|
|
17
|
+
export type RenderFps = 24 | 30 | 60;
|
|
18
|
+
export type RenderQuality = "draft" | "standard" | "high";
|
|
19
|
+
export type RenderFormat = "mp4" | "webm" | "mov";
|
|
20
|
+
export interface SceneRenderOptions {
|
|
21
|
+
/** Project directory (defaults to cwd). */
|
|
22
|
+
projectDir?: string;
|
|
23
|
+
/** Root composition file relative to projectDir (default: "index.html"). */
|
|
24
|
+
root?: string;
|
|
25
|
+
/** Render only one storyboard beat by synthesizing a temporary root. */
|
|
26
|
+
beatId?: string;
|
|
27
|
+
/** Output file. When relative, resolved against projectDir. Default:
|
|
28
|
+
* `renders/<projectName>-<isoStamp>.<format>`. */
|
|
29
|
+
output?: string;
|
|
30
|
+
fps?: RenderFps;
|
|
31
|
+
quality?: RenderQuality;
|
|
32
|
+
format?: RenderFormat;
|
|
33
|
+
/** Hyperframes capture worker count. Default 1 (the existing backend's
|
|
34
|
+
* default — auto-worker mode times out on small comps). */
|
|
35
|
+
workers?: number;
|
|
36
|
+
signal?: AbortSignal;
|
|
37
|
+
onProgress?: (pct: number, stage: string) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface SceneRenderResult {
|
|
40
|
+
success: boolean;
|
|
41
|
+
kind?: "render";
|
|
42
|
+
beat?: string | null;
|
|
43
|
+
root?: string;
|
|
44
|
+
outputPath?: string;
|
|
45
|
+
durationMs?: number;
|
|
46
|
+
framesRendered?: number;
|
|
47
|
+
totalFrames?: number;
|
|
48
|
+
fps?: RenderFps;
|
|
49
|
+
quality?: RenderQuality;
|
|
50
|
+
format?: RenderFormat;
|
|
51
|
+
/** Number of `<audio>` elements muxed into the final file. 0 = silent project. */
|
|
52
|
+
audioCount?: number;
|
|
53
|
+
/** True when ffmpeg was invoked to overlay audio on the producer's video. */
|
|
54
|
+
audioMuxApplied?: boolean;
|
|
55
|
+
/** Non-fatal warning from the audio mux pass — caller may surface to the user. */
|
|
56
|
+
audioMuxWarning?: string;
|
|
57
|
+
reportPath?: string;
|
|
58
|
+
code?: string;
|
|
59
|
+
error?: string;
|
|
60
|
+
retryWith?: string[];
|
|
61
|
+
}
|
|
62
|
+
/** Map a quality preset to an x264 CRF (lower = higher quality). */
|
|
63
|
+
export declare function qualityToCrf(quality?: RenderQuality): number;
|
|
64
|
+
/**
|
|
65
|
+
* Compute the default output path for a render. Pure — does no I/O. Returns
|
|
66
|
+
* an absolute path under `<projectDir>/renders/`.
|
|
67
|
+
*
|
|
68
|
+
* `now` is injectable so tests get deterministic output.
|
|
69
|
+
*/
|
|
70
|
+
export declare function defaultOutputPath(opts: {
|
|
71
|
+
projectDir: string;
|
|
72
|
+
projectName?: string;
|
|
73
|
+
format?: RenderFormat;
|
|
74
|
+
beatId?: string;
|
|
75
|
+
now?: Date;
|
|
76
|
+
}): string;
|
|
77
|
+
/**
|
|
78
|
+
* Build the producer's `RenderConfig` from caller options. Pure — useful for
|
|
79
|
+
* unit tests that want to assert defaults without touching Chrome.
|
|
80
|
+
*/
|
|
81
|
+
export declare function buildRenderConfig(opts: {
|
|
82
|
+
fps?: RenderFps;
|
|
83
|
+
quality?: RenderQuality;
|
|
84
|
+
format?: RenderFormat;
|
|
85
|
+
workers?: number;
|
|
86
|
+
entryFile?: string;
|
|
87
|
+
}): RenderConfig;
|
|
88
|
+
/**
|
|
89
|
+
* Render a scene project. Mirrors the contract of the existing Hyperframes
|
|
90
|
+
* backend (preflight → execute → structured result), but skips the
|
|
91
|
+
* `TimelineState` → temp project conversion because the user's project is
|
|
92
|
+
* already a valid Hyperframes project.
|
|
93
|
+
*/
|
|
94
|
+
export declare function executeSceneRender(opts?: SceneRenderOptions): Promise<SceneRenderResult>;
|
|
95
|
+
export interface BeatRenderRootResult {
|
|
96
|
+
success: boolean;
|
|
97
|
+
root: string;
|
|
98
|
+
durationSec?: number;
|
|
99
|
+
compositionPath?: string;
|
|
100
|
+
narrationPath?: string;
|
|
101
|
+
code?: "BEAT_NOT_FOUND" | "BEAT_RENDER_NOT_READY";
|
|
102
|
+
error?: string;
|
|
103
|
+
retryWith?: string[];
|
|
104
|
+
}
|
|
105
|
+
export declare function prepareBeatRenderRoot(opts: {
|
|
106
|
+
projectDir: string;
|
|
107
|
+
beatId: string;
|
|
108
|
+
aspect: SceneAspect;
|
|
109
|
+
}): Promise<BeatRenderRootResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type FileFixResult, type FileLintResult } from "./scene-lint.js";
|
|
2
|
+
import { type ReviewIssue, type ReviewStatus } from "./review-report.js";
|
|
3
|
+
export interface SceneRepairOptions {
|
|
4
|
+
projectDir: string;
|
|
5
|
+
rootRel?: string;
|
|
6
|
+
dryRun?: boolean;
|
|
7
|
+
includeRoot?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SceneRepairResult {
|
|
10
|
+
schemaVersion: "1";
|
|
11
|
+
kind: "scene-repair";
|
|
12
|
+
project: string;
|
|
13
|
+
dryRun: boolean;
|
|
14
|
+
status: ReviewStatus;
|
|
15
|
+
score: number;
|
|
16
|
+
fixed: FileFixResult[];
|
|
17
|
+
wouldFix: FileFixResult[];
|
|
18
|
+
remainingIssues: ReviewIssue[];
|
|
19
|
+
files: FileLintResult[];
|
|
20
|
+
retryWith: string[];
|
|
21
|
+
}
|
|
22
|
+
export declare function executeSceneRepair(opts: SceneRepairOptions): Promise<SceneRepairResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|