@vibeframe/cli 0.104.3 → 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 +483 -291
  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,57 @@
1
+ /**
2
+ * @module _shared/hf-skill-bundle
3
+ *
4
+ * Loads the vendored Hyperframes skill content as a single concatenated
5
+ * system-prompt string. Used by `compose-scenes-with-skills` (v0.59+).
6
+ *
7
+ * Hyperframes (https://github.com/heygen-com/hyperframes, Apache 2.0)
8
+ * publishes this skill content as the agent-loadable definition of its
9
+ * composition craft. VibeFrame is not affiliated with HeyGen — see
10
+ * `/CREDITS.md` and `./NOTICE` for the relationship + license obligations
11
+ * VibeFrame honours.
12
+ *
13
+ * Sourcing order (highest precedence first):
14
+ * 1. User-installed skill — `~/.claude/skills/hyperframes/` (read at runtime
15
+ * via readFileSync — kept fresh by the user's `npx skills update` flow)
16
+ * 2. Vendored snapshot in this directory (always available, even after
17
+ * `npm install -g @vibeframe/cli` because the .md files are inlined
18
+ * into the esbuild bundle via the text loader — see `build.js`)
19
+ *
20
+ * The vendored copy is byte-identical to upstream: no semantic edits. We
21
+ * mirror Hyperframes' own treatment of prior art (see their CREDITS.md
22
+ * "Prior art" section about Remotion). Refresh the snapshot with
23
+ * `scripts/refresh-hf-bundle.sh`, which re-copies from a sibling clone of
24
+ * the upstream repo and bumps BUNDLE_VERSION.
25
+ *
26
+ * The cache for `compose-scenes-with-skills` keys on `BUNDLE_VERSION` (folded
27
+ * into the hash) so snapshot upgrades automatically invalidate previously-cached
28
+ * HTML.
29
+ */
30
+ /**
31
+ * Snapshot identifier. Bump on every refresh of the vendored MD files.
32
+ * Format: `<upstream-git-sha>-<YYYY-MM-DD>` so cache keys auto-invalidate
33
+ * even when the upstream sha alone is unchanged but our local copy wasn't
34
+ * actually re-fetched.
35
+ *
36
+ * **Update rule:** any time you change a file under this directory, also
37
+ * bump this constant. `scripts/refresh-hf-bundle.sh` does this automatically.
38
+ */
39
+ export declare const BUNDLE_VERSION = "970367f-2026-04-25";
40
+ /**
41
+ * Load the Hyperframes skill bundle as a single string. Prefers the
42
+ * user-installed skill (kept fresh by `npx skills add heygen-com/hyperframes`
43
+ * + `npx skills update`) and falls back to the vendored snapshot inlined
44
+ * into this bundle.
45
+ *
46
+ * Side-effect free except for the optional `~/.claude/skills/hyperframes/`
47
+ * filesystem read.
48
+ */
49
+ export declare function loadHyperframesSkillBundle(): {
50
+ content: string;
51
+ /** "installed" (user has ~/.claude/skills/hyperframes/) or "vendored" (esbuild-inlined snapshot). */
52
+ source: "installed" | "vendored";
53
+ /** Human-readable hint for first-load logging. */
54
+ hint: string;
55
+ /** Stable hash of (BUNDLE_VERSION + content). Used as cache-key input. */
56
+ hash: string;
57
+ };
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @module _shared/init-templates
3
+ *
4
+ * Templates the `vibe init` (v0.61 C2) project scaffolder writes. Pure
5
+ * string constants + tiny functions; no I/O. The orchestrator decides
6
+ * which files to render based on detected agent hosts.
7
+ *
8
+ * Template philosophy: keep generated content *short* and point at
9
+ * dynamic sources (`vibe schema --list`, `vibe doctor`) instead of
10
+ * baking exhaustive catalogs that go stale across releases. The user is
11
+ * expected to extend these with project-specific guidance.
12
+ */
13
+ /**
14
+ * agents.md spec-compliant cross-tool agent declaration. Recognised by
15
+ * OpenAI Codex, Cursor, Aider, Sourcegraph Cody, OpenCode, and (via
16
+ * the @AGENTS.md import) Claude Code. Gemini CLI users may want to
17
+ * also keep a sibling \`GEMINI.md\` since that's its primary context
18
+ * file. Keep this as the canonical source of truth for agent guidance —
19
+ * \`CLAUDE.md\` and \`GEMINI.md\` just import it.
20
+ */
21
+ export declare const AGENTS_MD = "# AGENTS.md\n\nThis project uses [VibeFrame](https://github.com/vericontext/vibeframe) \u2014\na CLI for AI-powered video editing. The `vibe` command provides 80+\nsubcommands for video generation, editing, analysis, and pipeline\norchestration. Cost tiers below \u2014 **always confirm with the user before\nrunning High / Very High tier commands**.\n\n## Agent host coverage\n\nVibeFrame's CLI works with any bash-capable AI coding agent. Six host\nfamilies have first-class auto-detection and scaffolds today:\n\n- **Claude Code** \u2014 `CLAUDE.md` (this file's import wrapper) +\n `AGENTS.md` + `/vibe-*` slash commands.\n- **OpenAI Codex** \u2014 reads `AGENTS.md` natively (agents.md spec).\n- **Cursor** \u2014 reads `AGENTS.md` plus `.cursor/rules/` for project\n rules; supports MCP via `.cursor/mcp.json`.\n- **Aider** \u2014 reads `AGENTS.md` (binary-only detection by VibeFrame).\n- **Gemini CLI** \u2014 primary context file is `GEMINI.md`; also reads\n `AGENTS.md` if present.\n- **OpenCode** \u2014 reads `AGENTS.md` (officially supported per\n `opencode.ai/docs/rules`); supports MCP via `.opencode/mcp.json`.\n\nRun `vibe doctor` to see which host(s) the CLI detects in your\nenvironment. Anyone running another bash-capable agent (Continue,\nSourcegraph Cody, etc.) still gets this `AGENTS.md` as the universal\nfallback.\n\n## Self-discovery\n\nDon't memorise the command surface \u2014 read it from the CLI:\n\n```bash\nvibe --help # command groups overview\nvibe schema --list # full machine-readable catalog (80+)\nvibe schema --list --surface public # small first-run/product command surface\nvibe schema generate.video # JSON Schema for any single command\nvibe doctor # available providers + system health\nvibe guide motion # choose text-overlay vs motion-overlay vs generate motion\nvibe guide scene # step-by-step authoring guide (scene)\nvibe guide pipeline # step-by-step authoring guide (pipeline)\n```\n\n## Route by the user's actual request\n\nRouting the user's request correctly is the most important judgement call\nyou'll make. Do not force everything into a scene project.\n\n**ASSET \u2014 default for any single-asset request OR ambiguous prompt.**\nIf the user asks for a single image, single video clip, sound effect, music\nbed, or narration file \u2014 **OR pastes a visual/audio brief without explicit\nstoryboard / scene / multi-scene language** \u2014 treat it as ASSET. Use\n`vibe generate ...` directly. Do **not** edit `DESIGN.md`,\n`STORYBOARD.md`, run `vibe scene ...`, or auto-load the hyperframes\nskill until BUILD intent is explicit. The visual-identity hard-gate\napplies to BUILD only.\n\nExamples:\n- \"make this image\" \u2192 `vibe generate image \"...\" -o assets/name.png`\n- \"use this image to make a video\" \u2192 `vibe generate video \"...\" -i image.png -o renders/name.mp4`\n- \"add a lower-third/title/animated overlay/grain/vignette to this clip\" \u2192 prefer `vibe edit motion-overlay clip.mp4 \"...\" --understand auto -o out.mp4` when the request asks for designed or animated motion graphics.\n- \"please add visuals using OpenAI image gen\" \u2192 `vibe generate image \"...\" -p openai ...`\n- *(verb-less paste)* \"aerial view of a misty mountain peak at sunrise...\" \u2192 `vibe generate image \"<paste>\" -o assets/mountain-peak.png`. **Don't** read it as a brief for DESIGN.md.\n\nIf genuinely uncertain, ask one short question: *\"single asset or\nmulti-scene project?\"* before authoring DESIGN.md or loading the\nhyperframes skill.\n\n**BUILD \u2014 create new video from text intent.**\nUse `vibe build` with a STORYBOARD.md + DESIGN.md. The\nskills-driven pipeline (v0.60+) dispatches narration TTS + backdrop\nimage-gen per beat, composes scene HTML via the bundled composition rules\nbundle, then renders to MP4. Idempotent re-runs reuse cached assets.\n\n**REMIX \u2014 transform existing video / audio.**\nUse `vibe remix`, `vibe edit`, or `vibe audio`. One-shot,\nbatch-oriented operations on a file the user already has on disk.\n`vibe edit text-overlay` is the free deterministic path for simple static\ntext burn-in. If the user asks for motion design, animated lower-thirds,\ndesigned titles, grain/vignette as part of a graphic treatment, or says\n\"motion graphics\", use `vibe edit motion-overlay ... --understand auto` instead.\n\nDecision rule: if the user asks for one asset, it's ASSET. If the user asks\nfor a multi-scene/storyboard/composed video, it's BUILD. If the user is\nstarting from a media file and wants it transformed, it's REMIX.\n\n## Common workflows\n\n### BUILD (new video from text)\n\n| Task | Command |\n|---|---|\n| One-shot storyboard \u2192 video | `vibe build [project-dir]` |\n| Render an existing scene project | `vibe render [project-dir] -o out.mp4` |\n| Lint scene HTML | `vibe scene lint --json` |\n| Generate a single image | `vibe generate image \"prompt\" -o img.png --quality hd` |\n| Generate a single video | `vibe generate video \"prompt\" -i image.png -o clip.mp4` |\n| Generate narration | `vibe generate narration \"text\" -o voice.mp3` |\n\n### REMIX (transform existing media)\n\n| Task | Command |\n|---|---|\n| Extract highlights from a long video | `vibe remix highlights file.mp4 -d 60` |\n| Long video \u2192 vertical shorts | `vibe remix auto-shorts file.mp4 -n 3 --add-captions` |\n| Add animated word-by-word captions | `vibe remix animated-caption file.mp4 -s karaoke-sweep` |\n| Add designed motion graphics overlay | `vibe edit motion-overlay file.mp4 \"lower-third...\" --understand auto -o out.mp4` |\n| Remove silence | `vibe edit silence-cut in.mp4 -o out.mp4` |\n| Add static captions | `vibe edit caption in.mp4 -o out.mp4` |\n| Translate audio (transcribe \u2192 TTS) | `vibe audio dub file.mp4 -t ko` |\n| Transcribe (Whisper, word-level) | `vibe audio transcribe file.mp4 --granularity word` |\n| Inspect media with Gemini | `vibe inspect media file.mp4 \"summarise\" --json` |\n\n### Compose pipelines (Video as Code)\n\n| Task | Command |\n|---|---|\n| Run a YAML pipeline | `vibe run pipeline.yaml --dry-run` |\n| Resume from last checkpoint | `vibe run pipeline.yaml --resume` |\n\n## Cost tiers\n\n| Tier | Examples | Approx. per call |\n|---|---|---|\n| **Free** | `schema/context/doctor`, `detect *`, `status *`, `plan`, `storyboard validate`, `inspect project/render --cheap`, deterministic edits | $0 |\n| **Low** | `generate narration/sound-effect/music`, `audio transcribe`, `inspect media`, optional AI review | $0.01\u2013$0.10 |\n| **High** | `generate image/motion`, `edit image/reframe/grade/speed-ramp` | $1\u2013$5 |\n| **Very High** | `generate video`, `edit fill-gaps`, `remix highlights/auto-shorts`, `build` with generated assets | $5\u2013$50+ |\n\n## Agent invariants\n\nWhen you run vibe commands programmatically:\n\n1. **Always `--json`** for structured output you can parse without regex\n2. **Always `--dry-run` first** for any High/Very-High tier command \u2014 it returns\n the cost estimate without spending API budget\n3. **Use `vibe schema <command>`** to discover parameters; do not guess flags\n4. **Pass complex options via `--stdin`**:\n ```bash\n echo '{\"video\":\"long.mp4\",\"count\":3,\"aspect\":\"9:16\"}' | vibe remix auto-shorts --stdin --json\n ```\n\n## Provider keys and project scope\n\nPrefer `vibe setup --scope project` for project-local keys. It writes\n`.vibeframe/config.yaml` in the setup directory; when you work from a\nnested scene directory, the `vibe` CLI automatically searches parent\ndirectories and uses the nearest project config. Do not assume the config\nfile must exist in the current subdirectory.\n\nRun `vibe doctor --json` from the directory where you will run commands\nand check `data.scope.project.configPath` / `data.scope.activeScope` before\ndeciding keys are missing. Never print or copy config file contents.\n\nFor generated project assets, use VibeFrame commands such as\n`vibe generate image|video|speech ...` so these project-scope keys are\nused. Do not switch to a host agent's built-in image/audio generation tool\nunless the user explicitly asks for a non-VibeFrame asset.\n\n`.env` is still supported as a gitignored fallback. Copy `.env.example`\nto start if you prefer environment variables.\n\n### Composition rules (scene HTML)\n\n`vibe init` installs local composition rules into your project. The\nuniversal copy lives at `SKILL.md` (with `references/*.md`), and\nhost-specific copies are placed where each agent expects them\n(`.claude/skills/hyperframes/` for Claude Code, `.cursor/rules/hyperframes.mdc`\nfor Cursor). **Read `SKILL.md` before authoring any scene composition HTML\nunder `compositions/`** \u2014 it defines the framework rules, motion\nprinciples, type system, and visual-identity hard-gate. The same skill\ngoverns `vibe scene lint` so your authored HTML and the linter stay in\nagreement.\n\nFor render-stable text, do not apply continuous `scale`, `x`, `y`,\n`filter`, or other transform tweens to `.scene-content` or any ancestor\ncontaining live text/cards. Put ambient zoom/parallax on background or media\nlayers only; text should enter briefly and then hold still at its final CSS\nposition.\n\nTo retro-install on a project scaffolded before this command existed, run\n`vibe scene install-skill [--host all]`.\n\n### Scene composer (batch / non-agent fallback)\n\nWhen you don't want to author HTML yourself, `vibe build --mode batch` runs an\nLLM internally with the same skill bundle. It auto-picks a provider based\non available keys (`claude > gemini > openai`) \u2014 pass `--composer <name>`\nto force one:\n\n| Provider | Env var | Spike notes (v0.70) |\n|---|---|---|\n| Claude (default) | `ANTHROPIC_API_KEY` | ~9 s/beat. Fastest, validated baseline. |\n| Gemini | `GOOGLE_API_KEY` | ~20 s/beat. ~2.6\u00D7 cheaper than Claude. |\n| OpenAI | `OPENAI_API_KEY` | ~70 s/beat. gpt-5 reasoning latency \u2014 opt-in only. |\n\nAll three pass first-shot lint at every effort tier on the `vibeframe-promo`\nfixture. Quality on more complex storyboards may differ \u2014 fall back to\n`--composer claude` if a non-default provider repeatedly fails lint.\n\n## Project conventions\n\n<!-- Edit this section with YOUR project's specifics. Examples below. -->\n\n- Default aspect ratio: `16:9`\n- Default scene duration: `3 seconds` (per beat)\n- Brand voice: <describe>\n- Output naming: `renders/<name>-<timestamp>.mp4`\n";
22
+ /**
23
+ * Claude Code project file. Imports AGENTS.md so guidance stays
24
+ * single-sourced; adds Claude-specific overrides (slash commands, etc.).
25
+ */
26
+ export declare const CLAUDE_MD = "@AGENTS.md\n\n# Claude Code overrides\n\nThis file imports `AGENTS.md` (above) \u2014 that's the canonical source.\nAdd anything Claude-Code-specific *below*; everything generic should\nstay in AGENTS.md so other agent hosts (Codex, Cursor, Aider, Gemini CLI, OpenCode) see it\ntoo.\n\n## Skills\n\nIf you ran `vibe init` with Claude Code detected, the VibeFrame skill\npack is available as slash commands (consolidated to 2 in v0.62 \u2014 the\noverview content moved into AGENTS.md above):\n\n- `/vibe-pipeline` \u2014 YAML pipeline authoring helper (Video as Code)\n- `/vibe-scene` \u2014 per-scene HTML authoring + `vibe build`\n\nClaude-specific routing note: follow the ASSET / BUILD / REMIX decision\nrules in `AGENTS.md`. In particular, a request for one generated image or\none generated video clip is an ASSET request: use `vibe generate image` or\n`vibe generate video` directly. A request for designed/animated overlays\non an existing clip is usually `vibe edit motion-overlay ... --understand auto`,\nnot `vibe edit text-overlay`, unless the user explicitly asks for a simple\nstatic text burn-in. Do not invoke `/vibe-scene`, edit\n`DESIGN.md`, or edit `STORYBOARD.md` unless the user explicitly asks for a\nscene, storyboard, or composed video.\n\nTo install / update them later:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/vericontext/vibeframe/main/scripts/install-skills.sh | bash\n```\n\n## Project-specific guidance\n\n<!-- Add Claude-specific notes here: which sub-agents to prefer, custom\n slash commands you've added, conversational style preferences, etc. -->\n";
27
+ /**
28
+ * Gemini CLI project file. Gemini CLI's primary context file is
29
+ * `GEMINI.md` (per https://geminicli.com/docs/cli/gemini-md/), so this
30
+ * scaffold gives Gemini CLI users a top-level entry point that points
31
+ * at the canonical `AGENTS.md`. The leading `@AGENTS.md` follows the
32
+ * same import convention Claude Code's `CLAUDE.md` uses; Gemini CLI
33
+ * also honours sibling-file references in context, and the
34
+ * human-readable note below ensures the agent picks up `AGENTS.md`
35
+ * either way.
36
+ */
37
+ export declare const GEMINI_MD = "@AGENTS.md\n\n# Gemini CLI overrides\n\nThis project's canonical agent guidance lives in `AGENTS.md` \u2014 read\nit first. The `@AGENTS.md` line above is the import marker; if\nGemini CLI doesn't inline imported files in your version, open\n`AGENTS.md` directly. Both files are kept in sync by `vibe init`.\n\n## Project-specific guidance\n\n<!-- Add Gemini-CLI-specific notes here: any conventions specific to\n how you drive vibe from Gemini CLI (preferred models, tone, etc.). -->\n";
38
+ /** Shape the init renderer can fill in for the .env.example body. */
39
+ export interface EnvExampleOptions {
40
+ /** When true, surfaces a "tier: free local fallbacks" section at the top. */
41
+ withLocalFallbackHeader?: boolean;
42
+ }
43
+ /**
44
+ * .env.example covering all 13 providers VibeFrame integrates, grouped
45
+ * by tier so a new user can skip "premium / paid" without losing sight
46
+ * of the free path.
47
+ */
48
+ export declare function renderEnvExample(opts?: EnvExampleOptions): string;
49
+ /** Lines vibe init merges into the project's .gitignore (idempotent). */
50
+ export declare const GITIGNORE_ADDITIONS = "\n# VibeFrame\n.env\n.env.local\nrenders/\n.pipeline-state.yaml\n*.vibe.json\n.vibeframe/\n";
51
+ /**
52
+ * vibe.project.yaml minimal scaffold. Only written when no project
53
+ * config exists — `vibe init` never overwrites an existing file unless
54
+ * --force.
55
+ */
56
+ export declare function renderProjectYaml(opts: {
57
+ name: string;
58
+ }): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @module _shared/install-skill
3
+ *
4
+ * Phase H1 — install the vendored Hyperframes skill bundle into a user's
5
+ * scene project so that the host agent (Claude Code, Cursor, Codex, Aider,
6
+ * etc.) can read the framework rules + house style directly. This is the
7
+ * agentic-CLI-native pattern: the host agent is the sole LLM that reasons
8
+ * about scene composition, and it does so with the skill files in its
9
+ * context — VibeFrame's CLI is the deterministic toolbelt.
10
+ *
11
+ * Layout written:
12
+ *
13
+ * <project>/
14
+ * SKILL.md # universal — all agents see this
15
+ * references/
16
+ * house-style.md
17
+ * motion-principles.md
18
+ * typography.md
19
+ * transitions.md
20
+ * .claude/skills/hyperframes/ # if hosts includes "claude-code"
21
+ * SKILL.md (copy)
22
+ * references/{house-style,...}.md
23
+ * .cursor/rules/hyperframes.mdc # if hosts includes "cursor"
24
+ *
25
+ * Codex + Aider are AGENTS.md-driven hosts; they read the project root
26
+ * SKILL.md via an `@SKILL.md` reference in AGENTS.md (handled by the
27
+ * init-templates AGENTS_MD section, not here).
28
+ *
29
+ * The content is byte-identical to what `loadHyperframesSkillBundle()`
30
+ * uses — same vendored files, same `BUNDLE_VERSION`. After install, the
31
+ * agentic compose path (Phase H2) reads these files instead of the
32
+ * vendored TS string constants, so users can edit them per project.
33
+ */
34
+ import type { AgentHostId } from "../../utils/agent-host-detect.js";
35
+ /** Hosts the install-skill command knows file layouts for. */
36
+ export type InstallSkillHost = "claude-code" | "cursor" | "all";
37
+ export interface InstallSkillOptions {
38
+ /** Project directory (must exist or be creatable). */
39
+ projectDir: string;
40
+ /**
41
+ * Hosts to install host-specific copies for. The universal `SKILL.md` +
42
+ * `references/` directory at the project root are always written.
43
+ * Pass `["all"]` to install every host-specific layout.
44
+ */
45
+ hosts: InstallSkillHost[];
46
+ /** Overwrite existing files. Default false (skip-on-exist). */
47
+ force?: boolean;
48
+ /** Don't write — just describe what would happen. */
49
+ dryRun?: boolean;
50
+ }
51
+ export type InstallSkillFileStatus = "wrote" | "skipped-exists" | "would-write" | "would-skip-exists";
52
+ export interface InstallSkillFileAction {
53
+ path: string;
54
+ status: InstallSkillFileStatus;
55
+ bytes: number;
56
+ }
57
+ export interface InstallSkillResult {
58
+ success: boolean;
59
+ bundleVersion: string;
60
+ files: InstallSkillFileAction[];
61
+ }
62
+ /**
63
+ * Install Hyperframes skill files at the project + host-specific paths.
64
+ *
65
+ * Idempotent by default — existing files are skipped (logged as
66
+ * `skipped-exists`). Pass `force: true` to overwrite. `dryRun: true`
67
+ * reports the same actions but with `would-*` status and writes nothing.
68
+ */
69
+ export declare function installHyperframesSkill(opts: InstallSkillOptions): Promise<InstallSkillResult>;
70
+ /**
71
+ * Map an `AgentHostId[]` (from `detectedAgentHosts()`) to the
72
+ * install-skill command's host vocabulary. Codex / Aider don't get
73
+ * host-specific layouts — they read the universal `SKILL.md` via
74
+ * AGENTS.md, so they're filtered out here.
75
+ */
76
+ export declare function deriveInstallHosts(detected: AgentHostId[]): InstallSkillHost[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @module _shared/openai-image
3
+ *
4
+ * Shared OpenAI `generateImage` helper for `vibe ai image` and
5
+ * `vibe generate image`. Both commands had their own near-identical
6
+ * provider initialisation + model-alias parsing + result construction.
7
+ * v0.52.0 added gpt-image-2 wiring to `ai-image.ts` only and
8
+ * `vibe generate image -m 2` silently fell back to gpt-image-1.5 — the
9
+ * duplication guarantees a recurrence next time the OpenAI image flow
10
+ * is touched.
11
+ *
12
+ * Each top-level command keeps its own CLI wiring and output formatting;
13
+ * this helper owns just the API call + label derivation.
14
+ *
15
+ * See issue #58.
16
+ */
17
+ import type { ImageResult } from "@vibeframe/ai-providers";
18
+ /** Subset of CLI options consumed by the helper. */
19
+ export interface OpenAIImageHelperOptions {
20
+ model?: string;
21
+ size?: string;
22
+ quality?: string;
23
+ style?: string;
24
+ /** Stringified count from commander; parsed inside the helper. */
25
+ count?: string;
26
+ }
27
+ export interface OpenAIImageHelperResult {
28
+ result: ImageResult;
29
+ /** Resolved model id passed to the API. */
30
+ openaiModel: "gpt-image-2" | "gpt-image-1.5";
31
+ /** Human-friendly label for spinner / success output. */
32
+ modelLabel: "GPT Image 2" | "GPT Image 1.5";
33
+ }
34
+ /**
35
+ * Resolve the user-supplied model alias to the API id + display label.
36
+ * Exported so unit tests can assert label↔model parity (regression cover
37
+ * for v0.52.0 bug).
38
+ */
39
+ export declare function resolveOpenAIImageModel(modelAlias?: string): {
40
+ openaiModel: "gpt-image-2" | "gpt-image-1.5";
41
+ modelLabel: "GPT Image 2" | "GPT Image 1.5";
42
+ };
43
+ /**
44
+ * Run an OpenAI image generation. Caller owns: api-key acquisition,
45
+ * spinner lifecycle, output formatting (JSON vs human), and file save.
46
+ */
47
+ export declare function executeOpenAIImageGenerate(prompt: string, options: OpenAIImageHelperOptions, ctx: {
48
+ apiKey: string;
49
+ }): Promise<OpenAIImageHelperResult>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ export declare const PRODUCT_SURFACES: readonly ["public", "agent", "advanced", "legacy", "internal"];
2
+ export type ProductSurface = (typeof PRODUCT_SURFACES)[number];
3
+ export interface ProductSurfaceMetadata {
4
+ surface: ProductSurface;
5
+ replacement?: string;
6
+ note?: string;
7
+ }
8
+ export declare function isProductSurface(value: string | undefined): value is ProductSurface;
9
+ export declare function productSurfaceForCommandPath(path: string): ProductSurfaceMetadata;
10
+ export declare function commandPathFromToolName(name: string): string;
11
+ export declare function productSurfaceForToolName(name: string): ProductSurfaceMetadata;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,60 @@
1
+ import type { SceneAspect } from "./scene-project.js";
2
+ export declare const VIBE_CONFIG_FILENAME = "vibe.config.json";
3
+ export declare const LEGACY_VIBE_PROJECT_FILENAME = "vibe.project.yaml";
4
+ export type CompositionEngine = "hyperframes";
5
+ export type ProjectImageProvider = "openai" | "gemini" | "grok" | null;
6
+ export type ProjectVideoProvider = "seedance" | "grok" | "kling" | "runway" | "veo" | null;
7
+ export type ProjectNarrationProvider = "elevenlabs" | "kokoro" | null;
8
+ export type ProjectComposerProvider = "claude" | "openai" | "gemini" | null;
9
+ export type ProjectQuality = "draft" | "standard" | "high";
10
+ export interface VibeProjectConfigV1 {
11
+ schemaVersion: "1";
12
+ name: string;
13
+ aspect: SceneAspect;
14
+ defaults: {
15
+ sceneDurationSec: number;
16
+ narrationPaddingSec: number;
17
+ fps: 24 | 30 | 60;
18
+ quality: ProjectQuality;
19
+ };
20
+ providers: {
21
+ image: ProjectImageProvider;
22
+ video: ProjectVideoProvider;
23
+ narration: ProjectNarrationProvider;
24
+ music: string | null;
25
+ composer: ProjectComposerProvider;
26
+ };
27
+ build: {
28
+ mode: "agent" | "batch" | "auto";
29
+ stage: "all" | "assets" | "compose" | "sync" | "render";
30
+ maxCostUsd: number | null;
31
+ imageQuality: "standard" | "hd";
32
+ imageSize: "1024x1024" | "1536x1024" | "1024x1536";
33
+ };
34
+ composition: {
35
+ engine: CompositionEngine;
36
+ entry: string;
37
+ compositionsDir: string;
38
+ assetsDir: string;
39
+ rendersDir: string;
40
+ };
41
+ }
42
+ export interface LoadedProjectConfig {
43
+ config: VibeProjectConfigV1;
44
+ /** `vibe.config.json`, `vibe.project.yaml`, or `default`. */
45
+ source: string;
46
+ path: string | null;
47
+ legacy: boolean;
48
+ }
49
+ export declare function defaultProjectConfig(opts: {
50
+ name: string;
51
+ aspect?: SceneAspect;
52
+ sceneDurationSec?: number;
53
+ }): VibeProjectConfigV1;
54
+ export declare function mergeProjectConfig(parsed: Partial<VibeProjectConfigV1> | null | undefined, fallback: VibeProjectConfigV1): VibeProjectConfigV1;
55
+ export declare function projectConfigJson(opts: {
56
+ name: string;
57
+ aspect?: SceneAspect;
58
+ sceneDurationSec?: number;
59
+ }): string;
60
+ export declare function readProjectConfig(projectDir: string): Promise<LoadedProjectConfig>;
@@ -0,0 +1,104 @@
1
+ import type { VideoReviewFeedback } from "../ai-edit.js";
2
+ import { type ReviewIssue, type ReviewSeverity, type ReviewSummary, type ReviewStatus } from "./review-report.js";
3
+ export interface TimeRange {
4
+ start: number;
5
+ end: number;
6
+ duration: number;
7
+ }
8
+ export interface BeatTiming {
9
+ id: string;
10
+ start: number;
11
+ end: number;
12
+ sceneDurationSec: number;
13
+ narrationDurationSec?: number;
14
+ }
15
+ export type RenderInspectModel = "flash" | "flash-2.5" | "pro";
16
+ export interface RenderInspectOptions {
17
+ projectDir: string;
18
+ beatId?: string;
19
+ videoPath?: string;
20
+ outputPath?: string;
21
+ writeReport?: boolean;
22
+ ai?: boolean;
23
+ model?: RenderInspectModel;
24
+ }
25
+ export interface RenderInspectDryRunResult {
26
+ schemaVersion: "1";
27
+ kind: "render";
28
+ project: string;
29
+ beat?: string;
30
+ videoPath: string | null;
31
+ reportPath?: string;
32
+ params: {
33
+ projectDir: string;
34
+ beatId?: string;
35
+ videoPath?: string;
36
+ outputPath?: string;
37
+ writeReport: boolean;
38
+ cheap: true;
39
+ ai: boolean;
40
+ model: RenderInspectModel;
41
+ };
42
+ checks: {
43
+ renderFound: boolean;
44
+ storyboardPath: string | null;
45
+ };
46
+ }
47
+ export interface RenderAiCheck {
48
+ enabled: true;
49
+ model: RenderInspectModel;
50
+ success: boolean;
51
+ overallScore?: number;
52
+ categories?: VideoReviewFeedback["categories"];
53
+ recommendations?: string[];
54
+ error?: string;
55
+ }
56
+ export interface RenderInspectResult {
57
+ schemaVersion: "1";
58
+ kind: "render";
59
+ mode: "render";
60
+ project: string;
61
+ beat?: string;
62
+ videoPath: string | null;
63
+ status: ReviewStatus;
64
+ score: number;
65
+ issues: ReviewIssue[];
66
+ summary: ReviewSummary;
67
+ sourceReports: string[];
68
+ checks: {
69
+ renderFound: boolean;
70
+ fileSizeBytes?: number;
71
+ durationSec?: number;
72
+ expectedDurationSec?: number;
73
+ durationDriftSec?: number;
74
+ width?: number;
75
+ height?: number;
76
+ expectedAspect?: string;
77
+ hasAudio?: boolean;
78
+ blackFrames: TimeRange[];
79
+ staticFrames: TimeRange[];
80
+ silences: TimeRange[];
81
+ ai?: RenderAiCheck;
82
+ };
83
+ retryWith: string[];
84
+ reportPath?: string;
85
+ }
86
+ export declare function parseBlackdetectOutput(output: string): TimeRange[];
87
+ export declare function parseSilencedetectOutput(output: string): TimeRange[];
88
+ export declare function parseFreezedetectOutput(output: string): TimeRange[];
89
+ export declare function staticFrameIssueForRange(range: TimeRange, beats: BeatTiming[], videoPath?: string): ReviewIssue;
90
+ export declare function blackFrameIssueForRange(range: TimeRange, beats: BeatTiming[], videoPath?: string): ReviewIssue;
91
+ export declare function durationDriftIssue(params: {
92
+ durationSec: number;
93
+ expectedDurationSec: number;
94
+ driftSec: number;
95
+ beats: BeatTiming[];
96
+ beatId?: string;
97
+ videoPath?: string;
98
+ }): ReviewIssue;
99
+ export declare function previewInspectRender(opts: RenderInspectOptions): Promise<RenderInspectDryRunResult>;
100
+ export declare function aiReviewSeverity(score: number): ReviewSeverity;
101
+ export declare function mapAiReviewFeedbackToIssues(feedback: VideoReviewFeedback, videoPath?: string): ReviewIssue[];
102
+ export declare function scoreRenderReview(issues: ReviewIssue[], aiOverallScore?: number): number;
103
+ export declare function inspectRender(opts: RenderInspectOptions): Promise<RenderInspectResult>;
104
+ export declare function resolveRenderVideoPath(projectDir: string, explicit?: string, beatId?: string): Promise<string | null>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,65 @@
1
+ export type ReviewSeverity = "error" | "warning" | "info";
2
+ export type ReviewStatus = "pass" | "warn" | "fail";
3
+ export type ReviewMode = "project" | "render";
4
+ export type ReviewFixOwner = "vibe" | "host-agent";
5
+ export interface ReviewIssue {
6
+ severity: ReviewSeverity;
7
+ code: string;
8
+ message: string;
9
+ file?: string;
10
+ scene?: string;
11
+ beatId?: string;
12
+ timeRange?: {
13
+ start: number;
14
+ end: number;
15
+ duration?: number;
16
+ };
17
+ sceneDurationSec?: number;
18
+ narrationDurationSec?: number;
19
+ audioCoverageRatio?: number;
20
+ fixOwner?: ReviewFixOwner;
21
+ suggestedFix?: string;
22
+ }
23
+ export interface ReviewSummary {
24
+ issueCount: number;
25
+ errorCount: number;
26
+ warningCount: number;
27
+ infoCount: number;
28
+ fixOwners: {
29
+ vibe: number;
30
+ hostAgent: number;
31
+ };
32
+ }
33
+ export interface ReviewReport {
34
+ schemaVersion: "1";
35
+ kind: "review";
36
+ project: string;
37
+ mode: ReviewMode;
38
+ beat?: string;
39
+ status: ReviewStatus;
40
+ score: number;
41
+ issues: ReviewIssue[];
42
+ summary: ReviewSummary;
43
+ retryWith: string[];
44
+ sourceReports: string[];
45
+ reportPath?: string;
46
+ }
47
+ export declare function statusFromIssues(issues: ReviewIssue[]): ReviewStatus;
48
+ export declare function scoreIssues(issues: ReviewIssue[]): number;
49
+ export declare function uniqueRetryWith(items: Array<string | undefined | null>): string[];
50
+ export declare function fixOwnerForIssue(issue: Pick<ReviewIssue, "code" | "fixOwner">): ReviewFixOwner;
51
+ export declare function normalizeReviewIssues(issues: ReviewIssue[], fallbackOwner?: ReviewFixOwner): ReviewIssue[];
52
+ export declare function summarizeReviewIssues(issues: ReviewIssue[]): ReviewSummary;
53
+ export declare function buildReviewReport(opts: {
54
+ project: string;
55
+ mode: ReviewMode;
56
+ beat?: string;
57
+ status: ReviewStatus;
58
+ score: number;
59
+ issues: ReviewIssue[];
60
+ retryWith: string[];
61
+ sourceReports?: string[];
62
+ reportPath?: string;
63
+ }): ReviewReport;
64
+ export declare function defaultReviewReportPath(projectDir: string): string;
65
+ export declare function writeReviewReport(path: string, report: Record<string, unknown>): Promise<void>;
@@ -0,0 +1,39 @@
1
+ import type { ReviewIssue } from "./review-report.js";
2
+ export declare const ROOT_SYNC_FIX_CODES: {
3
+ readonly clipRefs: "root_clip_refs_synced";
4
+ readonly duration: "root_duration_synced";
5
+ readonly narrationAudio: "root_narration_audio_synced";
6
+ readonly musicAudio: "root_music_audio_synced";
7
+ };
8
+ export interface RootSyncBeatInput {
9
+ id: string;
10
+ duration?: number;
11
+ narrationPath?: string;
12
+ musicPath?: string;
13
+ sceneDurationSec?: number;
14
+ }
15
+ export interface RootSyncPlan {
16
+ rootPath: string;
17
+ rootRel: string;
18
+ exists: boolean;
19
+ changed: boolean;
20
+ fixCodes: string[];
21
+ issues: ReviewIssue[];
22
+ nextHtml?: string;
23
+ totalDurationSec?: number;
24
+ }
25
+ export declare function createRootSyncPlan(opts: {
26
+ projectDir: string;
27
+ beats: RootSyncBeatInput[];
28
+ rootRel?: string;
29
+ }): Promise<RootSyncPlan>;
30
+ export declare function createProjectRootSyncPlan(opts: {
31
+ projectDir: string;
32
+ rootRel?: string;
33
+ }): Promise<RootSyncPlan>;
34
+ export declare function syncRootComposition(opts: {
35
+ projectDir: string;
36
+ beats: RootSyncBeatInput[];
37
+ rootRel?: string;
38
+ }): Promise<RootSyncPlan>;
39
+ export declare function loadProjectRootSyncBeats(projectDir: string): Promise<RootSyncBeatInput[]>;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @module _shared/scene-audio-mux
3
+ *
4
+ * Lay every `<audio>` element discovered by `scene-audio-scan.ts` onto a
5
+ * single audio track and mux it into the producer's silent video output.
6
+ *
7
+ * Why this exists: `@hyperframes/producer` renders frames + assembles the
8
+ * MP4 but does not embed audio from sub-composition `<audio>` elements
9
+ * (verified against the upstream Hyperframes reference example). We do the
10
+ * mux ourselves with one ffmpeg pass, copying the producer's video stream
11
+ * untouched so we don't pay a re-encode tax.
12
+ *
13
+ * The filter graph for N audio inputs is:
14
+ *
15
+ * [1:a]adelay=Sms:all=1,volume=V[a1];
16
+ * [2:a]adelay=Sms:all=1,volume=V[a2];
17
+ * ...
18
+ * [a1][a2]...amix=inputs=N:dropout_transition=0:normalize=0[mixed]
19
+ *
20
+ * Single-input case skips the amix (cheaper and avoids amix's auto-gain).
21
+ *
22
+ * Pure construction lives in `buildAudioMuxFilter`. The async `muxAudioIntoVideo`
23
+ * shells out to ffmpeg via the project's existing `execSafe` wrapper.
24
+ */
25
+ import type { SceneAudioElement } from "./scene-audio-scan.js";
26
+ export interface AudioMuxFilter {
27
+ /** ffmpeg `-filter_complex` string. */
28
+ filterComplex: string;
29
+ /** Output stream label inside the graph (e.g. `[mixed]` or `[a0]`). */
30
+ outLabel: string;
31
+ /** Number of audio inputs the caller must `-i` before this filter. */
32
+ inputCount: number;
33
+ }
34
+ /**
35
+ * Build a filter_complex for the given audio elements. Pure — no I/O.
36
+ *
37
+ * Each element becomes one ffmpeg input (input index 1, 2, ... — input 0 is
38
+ * the silent video). `adelay` shifts the audio to its absolute timeline
39
+ * start, `volume` applies per-element gain, and `amix` blends them. When
40
+ * there's only one element we skip `amix` entirely.
41
+ */
42
+ export declare function buildAudioMuxFilter(audios: SceneAudioElement[]): AudioMuxFilter | null;
43
+ export interface AudioMuxOptions {
44
+ /** Producer's silent video output (will be replaced with the mux'd file). */
45
+ videoPath: string;
46
+ /** Audio elements with absolute timing, from `scanSceneAudio`. */
47
+ audios: SceneAudioElement[];
48
+ /** Final output container — drives the audio codec choice. */
49
+ format: "mp4" | "webm" | "mov";
50
+ /** Cap output to this many seconds via ffmpeg `-t`. Falls back to `videoDuration`. */
51
+ totalDuration?: number;
52
+ /** Producer's video duration (probed by ffprobe). Used as default cap. */
53
+ videoDuration?: number;
54
+ /** Callback for ffmpeg stderr lines (progress / errors). */
55
+ onProgress?: (line: string) => void;
56
+ }
57
+ export interface AudioMuxResult {
58
+ /** True when ffmpeg succeeded. */
59
+ success: boolean;
60
+ /** Absolute path of the produced file (overwrites the input on success). */
61
+ outputPath: string;
62
+ /** ffmpeg stderr tail when success === false. */
63
+ error?: string;
64
+ /** Number of audio inputs muxed. */
65
+ audioCount: number;
66
+ }
67
+ /**
68
+ * Run ffmpeg to overlay every `<audio>` element onto the producer's silent
69
+ * video. Replaces the input file on success. Idempotent — re-running on the
70
+ * same project repeats the work but produces an equivalent result.
71
+ *
72
+ * No-op (`success: true, audioCount: 0`) when `audios` is empty.
73
+ */
74
+ export declare function muxAudioIntoVideo(opts: AudioMuxOptions): Promise<AudioMuxResult>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Unit tests for scene-audio-mux. Pure construction only — `muxAudioIntoVideo`
3
+ * is exercised by the C3 smoke test, not here, so CI doesn't depend on
4
+ * ffmpeg installation.
5
+ */
6
+ export {};