@vibeframe/cli 0.105.1 → 0.105.2

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.
Files changed (245) hide show
  1. package/dist/agent/adapters/claude.d.ts +14 -0
  2. package/dist/agent/adapters/gemini.d.ts +14 -0
  3. package/dist/agent/adapters/index.d.ts +27 -0
  4. package/dist/agent/adapters/ollama.d.ts +19 -0
  5. package/dist/agent/adapters/openai.d.ts +14 -0
  6. package/dist/agent/adapters/openrouter.d.ts +15 -0
  7. package/dist/agent/adapters/openrouter.test.d.ts +4 -0
  8. package/dist/agent/adapters/xai.d.ts +14 -0
  9. package/dist/agent/index.d.ts +109 -0
  10. package/dist/agent/memory/index.d.ts +69 -0
  11. package/dist/agent/prompts/system.d.ts +5 -0
  12. package/dist/agent/tools/e2e.test.d.ts +25 -0
  13. package/dist/agent/tools/index.d.ts +59 -0
  14. package/dist/agent/tools/integration.test.d.ts +10 -0
  15. package/dist/agent/tools/scene.test.d.ts +1 -0
  16. package/dist/agent/types.d.ts +72 -0
  17. package/dist/commands/_shared/build-asset-metadata.d.ts +43 -0
  18. package/dist/commands/_shared/build-asset-reference.d.ts +18 -0
  19. package/dist/commands/_shared/build-backdrop-prompt.d.ts +8 -0
  20. package/dist/commands/_shared/build-backdrop-prompt.test.d.ts +1 -0
  21. package/dist/commands/_shared/build-cache.d.ts +37 -0
  22. package/dist/commands/_shared/build-plan.d.ts +107 -0
  23. package/dist/commands/_shared/build-plan.test.d.ts +1 -0
  24. package/dist/commands/_shared/compose-prompts.d.ts +97 -0
  25. package/dist/commands/_shared/compose-prompts.test.d.ts +1 -0
  26. package/dist/commands/_shared/compose-scenes-skills.d.ts +282 -0
  27. package/dist/commands/_shared/compose-scenes-skills.test.d.ts +1 -0
  28. package/dist/commands/_shared/composer-resolve.d.ts +47 -0
  29. package/dist/commands/_shared/composer-resolve.test.d.ts +1 -0
  30. package/dist/commands/_shared/cost-tier.d.ts +58 -0
  31. package/dist/commands/_shared/edit/_helpers.d.ts +12 -0
  32. package/dist/commands/_shared/edit/caption.d.ts +47 -0
  33. package/dist/commands/_shared/edit/fade.d.ts +38 -0
  34. package/dist/commands/_shared/edit/jump-cut.d.ts +80 -0
  35. package/dist/commands/_shared/edit/noise-reduce.d.ts +33 -0
  36. package/dist/commands/_shared/edit/silence-cut.d.ts +63 -0
  37. package/dist/commands/_shared/edit/text-overlay.d.ts +50 -0
  38. package/dist/commands/_shared/edit/translate-srt.d.ts +40 -0
  39. package/dist/commands/_shared/edit/video-review.d.ts +62 -0
  40. package/dist/commands/_shared/execute-fill-gaps.d.ts +97 -0
  41. package/dist/commands/_shared/hf-skill-bundle/bundle-content.d.ts +16 -0
  42. package/dist/commands/_shared/hf-skill-bundle/bundle.d.ts +57 -0
  43. package/dist/commands/_shared/hf-skill-bundle/bundle.test.d.ts +1 -0
  44. package/dist/commands/_shared/init-templates.d.ts +58 -0
  45. package/dist/commands/_shared/init-templates.test.d.ts +1 -0
  46. package/dist/commands/_shared/install-skill.d.ts +76 -0
  47. package/dist/commands/_shared/install-skill.test.d.ts +1 -0
  48. package/dist/commands/_shared/openai-image.d.ts +49 -0
  49. package/dist/commands/_shared/openai-image.test.d.ts +1 -0
  50. package/dist/commands/_shared/product-surface.d.ts +11 -0
  51. package/dist/commands/_shared/product-surface.test.d.ts +1 -0
  52. package/dist/commands/_shared/project-config.d.ts +60 -0
  53. package/dist/commands/_shared/render-inspect.d.ts +104 -0
  54. package/dist/commands/_shared/render-inspect.test.d.ts +1 -0
  55. package/dist/commands/_shared/review-report.d.ts +65 -0
  56. package/dist/commands/_shared/root-sync.d.ts +39 -0
  57. package/dist/commands/_shared/scene-audio-mux.d.ts +74 -0
  58. package/dist/commands/_shared/scene-audio-mux.test.d.ts +6 -0
  59. package/dist/commands/_shared/scene-audio-scan.d.ts +93 -0
  60. package/dist/commands/_shared/scene-audio-scan.test.d.ts +5 -0
  61. package/dist/commands/_shared/scene-build-mode.d.ts +4 -0
  62. package/dist/commands/_shared/scene-build-mode.test.d.ts +1 -0
  63. package/dist/commands/_shared/scene-build.d.ts +452 -0
  64. package/dist/commands/_shared/scene-build.test.d.ts +1 -0
  65. package/dist/commands/_shared/scene-html-emit.d.ts +139 -0
  66. package/dist/commands/_shared/scene-html-emit.test.d.ts +1 -0
  67. package/dist/commands/_shared/scene-inspect.d.ts +56 -0
  68. package/dist/commands/_shared/scene-inspect.test.d.ts +1 -0
  69. package/dist/commands/_shared/scene-lint.d.ts +109 -0
  70. package/dist/commands/_shared/scene-lint.test.d.ts +1 -0
  71. package/dist/commands/_shared/scene-project.d.ts +147 -0
  72. package/dist/commands/_shared/scene-project.test.d.ts +1 -0
  73. package/dist/commands/_shared/scene-render.d.ts +109 -0
  74. package/dist/commands/_shared/scene-render.test.d.ts +1 -0
  75. package/dist/commands/_shared/scene-repair.d.ts +22 -0
  76. package/dist/commands/_shared/scene-repair.test.d.ts +1 -0
  77. package/dist/commands/_shared/status-jobs.d.ts +197 -0
  78. package/dist/commands/_shared/status-jobs.test.d.ts +1 -0
  79. package/dist/commands/_shared/storyboard-draft.d.ts +13 -0
  80. package/dist/commands/_shared/storyboard-draft.test.d.ts +1 -0
  81. package/dist/commands/_shared/storyboard-edit.d.ts +26 -0
  82. package/dist/commands/_shared/storyboard-edit.test.d.ts +1 -0
  83. package/dist/commands/_shared/storyboard-parse.d.ts +159 -0
  84. package/dist/commands/_shared/storyboard-parse.test.d.ts +1 -0
  85. package/dist/commands/_shared/storyboard-revise.d.ts +32 -0
  86. package/dist/commands/_shared/storyboard-revise.test.d.ts +1 -0
  87. package/dist/commands/_shared/timeline-project.d.ts +32 -0
  88. package/dist/commands/_shared/tts-resolve.d.ts +75 -0
  89. package/dist/commands/_shared/tts-resolve.test.d.ts +5 -0
  90. package/dist/commands/_shared/video-providers.d.ts +44 -0
  91. package/dist/commands/_shared/video-utils.d.ts +71 -0
  92. package/dist/commands/_shared/visual-styles.d.ts +55 -0
  93. package/dist/commands/_shared/visual-styles.test.d.ts +1 -0
  94. package/dist/commands/_shared/walkthroughs/walkthroughs.d.ts +47 -0
  95. package/dist/commands/_shared/walkthroughs/walkthroughs.test.d.ts +1 -0
  96. package/dist/commands/agent.d.ts +24 -0
  97. package/dist/commands/ai-analyze.d.ts +105 -0
  98. package/dist/commands/ai-animated-caption.d.ts +63 -0
  99. package/dist/commands/ai-audio.d.ts +92 -0
  100. package/dist/commands/ai-edit-cli.d.ts +13 -0
  101. package/dist/commands/ai-edit.d.ts +29 -0
  102. package/dist/commands/ai-fill-gaps.d.ts +15 -0
  103. package/dist/commands/ai-helpers.d.ts +26 -0
  104. package/dist/commands/ai-highlights.d.ts +126 -0
  105. package/dist/commands/ai-image.d.ts +71 -0
  106. package/dist/commands/ai-motion.d.ts +53 -0
  107. package/dist/commands/ai-review.d.ts +58 -0
  108. package/dist/commands/ai-script-pipeline-cli.d.ts +10 -0
  109. package/dist/commands/ai-script-pipeline.d.ts +74 -0
  110. package/dist/commands/ai-suggest-edit.d.ts +32 -0
  111. package/dist/commands/ai-video.d.ts +95 -0
  112. package/dist/commands/ai.test.d.ts +1 -0
  113. package/dist/commands/audio.d.ts +17 -0
  114. package/dist/commands/batch.d.ts +2 -0
  115. package/dist/commands/batch.test.d.ts +1 -0
  116. package/dist/commands/build.d.ts +2 -0
  117. package/dist/commands/completion.d.ts +20 -0
  118. package/dist/commands/completion.test.d.ts +1 -0
  119. package/dist/commands/context.d.ts +7 -0
  120. package/dist/commands/context.test.d.ts +1 -0
  121. package/dist/commands/demo.d.ts +6 -0
  122. package/dist/commands/detect.d.ts +55 -0
  123. package/dist/commands/doctor.d.ts +5 -0
  124. package/dist/commands/doctor.test.d.ts +1 -0
  125. package/dist/commands/edit/motion-overlay.d.ts +30 -0
  126. package/dist/commands/edit-cmd.d.ts +112 -0
  127. package/dist/commands/envelope-snapshots.test.d.ts +32 -0
  128. package/dist/commands/export.d.ts +60 -0
  129. package/dist/commands/export.test.d.ts +1 -0
  130. package/dist/commands/generate/background.d.ts +22 -0
  131. package/dist/commands/generate/image.d.ts +8 -0
  132. package/dist/commands/generate/music-status.d.ts +20 -0
  133. package/dist/commands/generate/music.d.ts +27 -0
  134. package/dist/commands/generate/sound-effect.d.ts +19 -0
  135. package/dist/commands/generate/speech.d.ts +21 -0
  136. package/dist/commands/generate/storyboard.d.ts +27 -0
  137. package/dist/commands/generate/thumbnail.d.ts +8 -0
  138. package/dist/commands/generate/video-cancel.d.ts +8 -0
  139. package/dist/commands/generate/video-extend.d.ts +8 -0
  140. package/dist/commands/generate/video-status.d.ts +8 -0
  141. package/dist/commands/generate/video.d.ts +8 -0
  142. package/dist/commands/generate.d.ts +36 -0
  143. package/dist/commands/init.d.ts +24 -0
  144. package/dist/commands/init.test.d.ts +1 -0
  145. package/dist/commands/inspect.d.ts +20 -0
  146. package/dist/commands/media.d.ts +2 -0
  147. package/dist/commands/output.d.ts +80 -0
  148. package/dist/commands/output.test.d.ts +1 -0
  149. package/dist/commands/plan.d.ts +2 -0
  150. package/dist/commands/project.d.ts +2 -0
  151. package/dist/commands/project.test.d.ts +1 -0
  152. package/dist/commands/provider-config-cli.test.d.ts +1 -0
  153. package/dist/commands/q-flag-collision.test.d.ts +1 -0
  154. package/dist/commands/remix.d.ts +20 -0
  155. package/dist/commands/render.d.ts +2 -0
  156. package/dist/commands/run.d.ts +14 -0
  157. package/dist/commands/sanitize.d.ts +20 -0
  158. package/dist/commands/scene.d.ts +92 -0
  159. package/dist/commands/scene.test.d.ts +1 -0
  160. package/dist/commands/schema.d.ts +12 -0
  161. package/dist/commands/setup.d.ts +5 -0
  162. package/dist/commands/setup.test.d.ts +1 -0
  163. package/dist/commands/status.d.ts +2 -0
  164. package/dist/commands/storyboard.d.ts +2 -0
  165. package/dist/commands/timeline.d.ts +2 -0
  166. package/dist/commands/timeline.test.d.ts +1 -0
  167. package/dist/commands/validate.d.ts +33 -0
  168. package/dist/commands/walkthrough.d.ts +21 -0
  169. package/dist/config/config.test.d.ts +1 -0
  170. package/dist/config/index.d.ts +110 -0
  171. package/dist/config/schema.d.ts +64 -0
  172. package/dist/config/scope.test.d.ts +1 -0
  173. package/dist/engine/index.d.ts +2 -0
  174. package/dist/engine/index.js +345 -0
  175. package/dist/engine/project.d.ts +93 -0
  176. package/dist/engine/project.test.d.ts +1 -0
  177. package/dist/index.d.ts +6 -0
  178. package/dist/index.js +234 -258
  179. package/dist/pipeline/executor.d.ts +27 -0
  180. package/dist/pipeline/generate-actions.test.d.ts +1 -0
  181. package/dist/pipeline/index.d.ts +3 -0
  182. package/dist/pipeline/renderers/__tests__/html-template.test.d.ts +1 -0
  183. package/dist/pipeline/renderers/__tests__/integration.test.d.ts +1 -0
  184. package/dist/pipeline/renderers/chrome.d.ts +25 -0
  185. package/dist/pipeline/renderers/html-clips.d.ts +19 -0
  186. package/dist/pipeline/renderers/html-runtime.d.ts +6 -0
  187. package/dist/pipeline/renderers/html-template.d.ts +2 -0
  188. package/dist/pipeline/renderers/hyperframes.d.ts +7 -0
  189. package/dist/pipeline/renderers/project-builder.d.ts +7 -0
  190. package/dist/pipeline/renderers/types.d.ts +39 -0
  191. package/dist/pipeline/resolver.d.ts +19 -0
  192. package/dist/pipeline/scene-actions.test.d.ts +1 -0
  193. package/dist/pipeline/types.d.ts +81 -0
  194. package/dist/tools/adapters/agent.d.ts +9 -0
  195. package/dist/tools/adapters/agent.js +188 -0
  196. package/dist/tools/adapters/mcp.d.ts +34 -0
  197. package/dist/tools/adapters/mcp.js +173 -0
  198. package/dist/tools/define-tool.d.ts +82 -0
  199. package/dist/tools/define-tool.js +214 -0
  200. package/dist/tools/manifest/_project-io.d.ts +13 -0
  201. package/dist/tools/manifest/agent-only.d.ts +236 -0
  202. package/dist/tools/manifest/audio.d.ts +93 -0
  203. package/dist/tools/manifest/detect.d.ts +47 -0
  204. package/dist/tools/manifest/edit.d.ts +398 -0
  205. package/dist/tools/manifest/export.d.ts +27 -0
  206. package/dist/tools/manifest/generate.d.ts +307 -0
  207. package/dist/tools/manifest/index.d.ts +22 -0
  208. package/dist/tools/manifest/index.js +60628 -0
  209. package/dist/tools/manifest/inspect.d.ts +139 -0
  210. package/dist/tools/manifest/project.d.ts +33 -0
  211. package/dist/tools/manifest/remix.d.ts +154 -0
  212. package/dist/tools/manifest/scene.d.ts +221 -0
  213. package/dist/tools/manifest/status.d.ts +36 -0
  214. package/dist/tools/manifest/storyboard.d.ts +136 -0
  215. package/dist/tools/manifest/timeline.d.ts +173 -0
  216. package/dist/tools/manifest/walkthrough.d.ts +22 -0
  217. package/dist/tools/manifest.test.d.ts +13 -0
  218. package/dist/tools/zod-to-json-schema.d.ts +47 -0
  219. package/dist/utils/agent-host-detect.d.ts +61 -0
  220. package/dist/utils/agent-host-detect.test.d.ts +1 -0
  221. package/dist/utils/api-key.d.ts +58 -0
  222. package/dist/utils/api-key.test.d.ts +1 -0
  223. package/dist/utils/audio.d.ts +22 -0
  224. package/dist/utils/clipboard.d.ts +27 -0
  225. package/dist/utils/clipboard.test.d.ts +1 -0
  226. package/dist/utils/exec-safe.d.ts +21 -0
  227. package/dist/utils/first-run.d.ts +16 -0
  228. package/dist/utils/input-validation.d.ts +26 -0
  229. package/dist/utils/key-format.d.ts +15 -0
  230. package/dist/utils/key-live-test.d.ts +29 -0
  231. package/dist/utils/key-live-test.test.d.ts +1 -0
  232. package/dist/utils/open-url.d.ts +26 -0
  233. package/dist/utils/open-url.test.d.ts +1 -0
  234. package/dist/utils/project-resolver.d.ts +30 -0
  235. package/dist/utils/project-resolver.test.d.ts +8 -0
  236. package/dist/utils/provider-resolver.d.ts +32 -0
  237. package/dist/utils/provider-resolver.test.d.ts +13 -0
  238. package/dist/utils/remotion.d.ts +201 -0
  239. package/dist/utils/subtitle.d.ts +64 -0
  240. package/dist/utils/subtitle.test.d.ts +1 -0
  241. package/dist/utils/tty.d.ts +86 -0
  242. package/dist/utils/tty.test.d.ts +1 -0
  243. package/dist/utils/upload-host.d.ts +15 -0
  244. package/dist/utils/upload-host.test.d.ts +1 -0
  245. package/package.json +15 -115
@@ -0,0 +1,139 @@
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
+ export interface EmitSceneInput {
31
+ /** Kebab-case scene id; appears in `data-composition-id` and template id. */
32
+ id: string;
33
+ preset: ScenePreset;
34
+ /** Canvas width in px (must match the root composition). */
35
+ width: number;
36
+ /** Canvas height in px (must match the root composition). */
37
+ height: number;
38
+ /** Visible composition duration in seconds. */
39
+ duration: number;
40
+ /** Headline text — required for non-simple presets; defaulted from id. */
41
+ headline?: string;
42
+ /** Secondary text (subhead/caption). Often the narration. */
43
+ subhead?: string;
44
+ /** Optional small label above the headline (explainer / product-shot). */
45
+ kicker?: string;
46
+ /** Project-relative image path (e.g. "assets/scene-intro.png"). */
47
+ imagePath?: string;
48
+ /** Project-relative narration audio path (e.g. "assets/narration-intro.mp3"). */
49
+ audioPath?: string;
50
+ /**
51
+ * Word-level timings (Whisper output) for narration sync. When supplied, the
52
+ * `simple`, `explainer`, and `kinetic-type` presets render each word as its
53
+ * own `<span class="word">` and animate them at their absolute audio start
54
+ * times via GSAP. `announcement` and `product-shot` ignore this field —
55
+ * their headlines are intentionally static.
56
+ */
57
+ transcript?: SceneTranscriptWord[];
58
+ }
59
+ /**
60
+ * Slugify a free-form scene name to a kebab-case id usable in HTML attributes
61
+ * and filenames. Strips diacritics, collapses whitespace, lowercases.
62
+ */
63
+ export declare function slugifySceneName(name: string): string;
64
+ /**
65
+ * Render a transcript as `<span class="word" data-i="N">…</span>` markup,
66
+ * separated by literal whitespace so kerning and wrapping behave naturally.
67
+ * Returns the empty string when there's nothing to render.
68
+ */
69
+ export declare function renderTranscriptSpans(transcript: SceneTranscriptWord[]): string;
70
+ /**
71
+ * Build absolute-timing GSAP tweens that fade each transcript word in at its
72
+ * narration `start` time. The `targetSelector` parametrises the scope so the
73
+ * same routine can drive `simple` (`.caption .word`), `explainer`
74
+ * (`#subtitle .word`), or `kinetic-type` (`.kinetic .word`).
75
+ *
76
+ * Each tween is `tl.fromTo(sel, {opacity:0,y:10}, {opacity:1,y:0,duration:0.18}, start)`
77
+ * — short enough to feel responsive at any speech rate, long enough to avoid
78
+ * popping at 30fps. Words clamp to non-negative starts.
79
+ */
80
+ export declare function buildTranscriptTweens(transcript: SceneTranscriptWord[], targetSelector: string): string;
81
+ /**
82
+ * Length of the scope opacity fade-in / fade-out applied at every scene's
83
+ * boundaries. When two adjacent clips overlap by this amount in the parent
84
+ * timeline (`scene.ts` and `segments-to-scenes.ts` lay them out that way),
85
+ * the outgoing scene's last `SCENE_OVERLAP_SECONDS` fades to opacity 0
86
+ * while the incoming scene's first `SCENE_OVERLAP_SECONDS` fades from 0,
87
+ * yielding a smooth crossfade instead of the hard cut the previous
88
+ * architecture produced.
89
+ *
90
+ * Tuned at 0.4 s — long enough that the eye perceives a soft transition,
91
+ * short enough that the text content of the next scene is fully present
92
+ * by the time the entrance animation finishes (entrance starts at 0.05 s).
93
+ */
94
+ export declare const SCENE_OVERLAP_SECONDS = 0.4;
95
+ /**
96
+ * Emit the full per-scene HTML. Returns a complete `<template>`-wrapped
97
+ * composition ready to write to `compositions/scene-<id>.html`.
98
+ */
99
+ export declare function emitSceneHtml(input: EmitSceneInput): string;
100
+ /**
101
+ * Sum existing `<div class="clip">` end-times to find where the next scene
102
+ * should start. Returns 0 for an empty root.
103
+ *
104
+ * `overlap` (default 0) is subtracted from the max end-time so callers can
105
+ * place the new clip to overlap with the previous one — used by the
106
+ * crossfade architecture (`vibe scene add` and `segments-to-scenes.ts`
107
+ * pass `SCENE_OVERLAP_SECONDS` here so each new scene's first
108
+ * `SCENE_OVERLAP_SECONDS` blend with the previous scene's last).
109
+ */
110
+ export declare function nextSceneStart(rootHtml: string, overlap?: number): number;
111
+ export interface ClipReferenceInput {
112
+ /** Scene id — used to derive the composition src path. */
113
+ id: string;
114
+ start: number;
115
+ duration: number;
116
+ trackIndex?: number;
117
+ /** Override the default `compositions/scene-<id>.html` src. */
118
+ src?: string;
119
+ }
120
+ /** Build the `<div class="clip" data-composition-id=... data-composition-src=...>` reference string. */
121
+ export declare function buildClipReference(opts: ClipReferenceInput): string;
122
+ /**
123
+ * Insert a clip reference inside the root composition's `#root` div, just
124
+ * before its closing `</div>`. Throws if the expected closing tag isn't
125
+ * found — callers should surface this as a structured error so users know
126
+ * to inspect a hand-edited root.
127
+ *
128
+ * Also grows the root's `data-duration` to fit the new clip's end-time.
129
+ */
130
+ export declare function insertClipIntoRoot(rootHtml: string, clip: ClipReferenceInput): string;
131
+ /**
132
+ * Read the root composition's canvas dims by parsing `data-width`/`data-height`
133
+ * on the `#root` div. Returns null if either is missing — caller should fall
134
+ * back to the project's aspect config.
135
+ */
136
+ export declare function readRootDims(rootHtml: string): {
137
+ width: number;
138
+ height: number;
139
+ } | 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 {};