@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,55 @@
1
+ /**
2
+ * @module _shared/visual-styles
3
+ *
4
+ * Eight named visual identities used to seed `DESIGN.md` when scaffolding a
5
+ * scene project. The structured data below distils the rules that
6
+ * Hyperframes' `hyperframes` skill encodes in
7
+ * `skills/hyperframes/visual-styles.md` (Apache 2.0). VibeFrame vendors the
8
+ * data — not the prose — so a project scaffolded without an active agent
9
+ * still gets a credible DESIGN.md as a starting point.
10
+ *
11
+ * The agent-driven path (`/hyperframes` skill loaded in Claude Code) remains
12
+ * the canonical way to author final compositions; this module just ensures
13
+ * the visual contract exists in the project before any HTML is written.
14
+ *
15
+ * Source-of-truth attribution: HeyGen Hyperframes — https://hyperframes.heygen.com
16
+ * License: Apache 2.0 (see NOTICE)
17
+ */
18
+ /** One named visual identity. Designed to round-trip into DESIGN.md. */
19
+ export interface VisualStyle {
20
+ /** Display name, e.g. "Swiss Pulse". */
21
+ name: string;
22
+ /** URL/CLI-friendly slug, e.g. "swiss-pulse". */
23
+ slug: string;
24
+ /** Designer or movement the style references. */
25
+ designer: string;
26
+ /** One-line mood, e.g. "Clinical, precise". */
27
+ mood: string;
28
+ /** Content categories the style works best for. */
29
+ bestFor: string;
30
+ /** 2–3 hex colours that anchor the palette. */
31
+ palette: string[];
32
+ /** Free-form palette description (warm/cold, primary/accent). */
33
+ paletteNotes: string;
34
+ /** Typography rules — family, weights, role per weight. */
35
+ typography: string;
36
+ /** Composition rules — grid, spacing, framing. */
37
+ composition: string;
38
+ /** Motion rules — speed, easing, character. */
39
+ motion: string;
40
+ /** Hyperframes shader name(s) that match the energy. */
41
+ transition: string;
42
+ /** GSAP signature — easing functions and feel. */
43
+ gsapSignature: string;
44
+ /** 3 anti-patterns to avoid for this style. */
45
+ avoid: string[];
46
+ }
47
+ /** All vendored styles in display order. */
48
+ export declare function listVisualStyles(): readonly VisualStyle[];
49
+ /**
50
+ * Find a style by name (case-insensitive) or slug. Returns undefined if no
51
+ * match. Caller is responsible for surfacing a usage error.
52
+ */
53
+ export declare function getVisualStyle(query: string): VisualStyle | undefined;
54
+ /** Comma-joined list of valid `--visual-style` argument values, for help/error text. */
55
+ export declare function visualStyleNames(): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @module _shared/walkthroughs
3
+ *
4
+ * Universal CLI-equivalents of Claude Code's `/vibe-scene` and
5
+ * `/vibe-pipeline` slash commands. After Plan H, host agents
6
+ * (Claude Code, Codex, Cursor, Aider, Gemini CLI, OpenCode) all read
7
+ * SKILL.md from the user's project and can drive `vibe build`
8
+ * directly — but discoverability of the *workflow* itself was still
9
+ * Claude-Code-only via the slash menu.
10
+ *
11
+ * `vibe guide <topic>` closes that gap: any host (or a human at
12
+ * a terminal) gets the same step-by-step authoring guide that the
13
+ * slash commands deliver in Claude Code. The content is vendored as
14
+ * TS template-literal strings so the CLI binary ships with zero
15
+ * filesystem dependencies — same approach as `hf-skill-bundle`.
16
+ *
17
+ * Source of truth lives here. The Claude Code slash command files
18
+ * under `.claude/skills/vibe-{scene,pipeline}/SKILL.md` mirror this
19
+ * content (so the slash command and the CLI command stay in sync) and
20
+ * add a one-line frontmatter for the slash menu.
21
+ */
22
+ export type WalkthroughTopic = "motion" | "scene" | "pipeline" | "architecture";
23
+ export interface WalkthroughResult {
24
+ topic: WalkthroughTopic;
25
+ /** Short title, e.g. "Scene authoring with vibe". */
26
+ title: string;
27
+ /** One-line summary suitable for a `--list` output. */
28
+ summary: string;
29
+ /** Numbered action items the host agent walks the user through. */
30
+ steps: string[];
31
+ /** Related vibe CLI commands referenced by the walkthrough. */
32
+ relatedCommands: string[];
33
+ /** Full markdown body — same content the Claude Code slash command loads. */
34
+ content: string;
35
+ }
36
+ /** All walkthrough topics this CLI knows. */
37
+ export declare const WALKTHROUGH_TOPICS: readonly WalkthroughTopic[];
38
+ /** Pure data accessor — no I/O. Throws on unknown topic. */
39
+ export declare function loadWalkthrough(topic: WalkthroughTopic): WalkthroughResult;
40
+ /** List all walkthroughs (for `vibe guide --list` / no-arg invocation). */
41
+ export declare function listWalkthroughs(): Array<{
42
+ topic: WalkthroughTopic;
43
+ title: string;
44
+ summary: string;
45
+ }>;
46
+ /** Type guard for runtime topic validation. */
47
+ export declare function isWalkthroughTopic(value: unknown): value is WalkthroughTopic;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Agent Command - Interactive AI agent REPL
3
+ * Provides natural language interface with tool calling
4
+ */
5
+ import { Command } from "commander";
6
+ export interface StartAgentOptions {
7
+ provider?: string;
8
+ model?: string;
9
+ project?: string;
10
+ verbose?: boolean;
11
+ maxTurns?: string;
12
+ input?: string;
13
+ confirm?: boolean;
14
+ /** When true, suppress *all* confirm prompts including the cost gate. */
15
+ noConfirm?: boolean;
16
+ /** Cumulative USD ceiling — agent rejects further tool calls past this. */
17
+ budgetUsd?: number | string;
18
+ }
19
+ /**
20
+ * Start the AI agent
21
+ * @param options - Agent options
22
+ */
23
+ export declare function startAgent(options?: StartAgentOptions): Promise<void>;
24
+ export declare const agentCommand: Command;
@@ -0,0 +1,105 @@
1
+ /**
2
+ * @module ai-analyze
3
+ *
4
+ * Media analysis execute functions using Gemini multimodal AI.
5
+ *
6
+ * CLI commands: gemini-video, analyze
7
+ *
8
+ * Execute functions:
9
+ * executeGeminiVideo - Analyze video files or YouTube URLs with Gemini
10
+ * executeAnalyze - Unified analysis for images, videos, and YouTube URLs
11
+ *
12
+ * @dependencies Gemini (Google)
13
+ */
14
+ import { Command } from "commander";
15
+ /** Options for {@link executeGeminiVideo}. */
16
+ export interface GeminiVideoOptions {
17
+ /** Video file path or YouTube URL */
18
+ source: string;
19
+ /** Analysis prompt (e.g. "Summarize this video") */
20
+ prompt: string;
21
+ /** Gemini model shorthand (default: "flash") */
22
+ model?: "flash" | "flash-2.5" | "pro";
23
+ /** Frames per second for video sampling (default: 1) */
24
+ fps?: number;
25
+ /** Start offset in seconds for clipping */
26
+ start?: number;
27
+ /** End offset in seconds for clipping */
28
+ end?: number;
29
+ /** Use low-resolution mode (fewer tokens, longer videos) */
30
+ lowRes?: boolean;
31
+ }
32
+ /** Result from {@link executeGeminiVideo}. */
33
+ export interface GeminiVideoResult {
34
+ /** Whether the analysis succeeded */
35
+ success: boolean;
36
+ /** Gemini's text response */
37
+ response?: string;
38
+ /** Model used for analysis */
39
+ model?: string;
40
+ /** Total tokens consumed */
41
+ totalTokens?: number;
42
+ /** Prompt tokens consumed */
43
+ promptTokens?: number;
44
+ /** Response tokens generated */
45
+ responseTokens?: number;
46
+ /** Error message on failure */
47
+ error?: string;
48
+ }
49
+ /**
50
+ * Analyze a video file or YouTube URL using Gemini multimodal AI.
51
+ *
52
+ * Supports local video files and YouTube URLs. Provides structured responses
53
+ * with optional token usage reporting.
54
+ *
55
+ * @param options - Video analysis configuration
56
+ * @returns Result with Gemini's response text and token usage
57
+ */
58
+ export declare function executeGeminiVideo(options: GeminiVideoOptions): Promise<GeminiVideoResult>;
59
+ /** Options for {@link executeAnalyze}. */
60
+ export interface AnalyzeOptions {
61
+ /** Image/video file path, image URL, or YouTube URL */
62
+ source: string;
63
+ /** Analysis prompt (e.g. "Describe this image") */
64
+ prompt: string;
65
+ /** Gemini model shorthand (default: "flash") */
66
+ model?: "flash" | "flash-2.5" | "pro";
67
+ /** Frames per second for video sampling (default: 1) */
68
+ fps?: number;
69
+ /** Start offset in seconds (video only) */
70
+ start?: number;
71
+ /** End offset in seconds (video only) */
72
+ end?: number;
73
+ /** Use low-resolution mode (fewer tokens) */
74
+ lowRes?: boolean;
75
+ }
76
+ /** Result from {@link executeAnalyze}. */
77
+ export interface AnalyzeResult {
78
+ /** Whether the analysis succeeded */
79
+ success: boolean;
80
+ /** Gemini's text response */
81
+ response?: string;
82
+ /** Model used for analysis */
83
+ model?: string;
84
+ /** Detected source media type */
85
+ sourceType?: "image" | "video" | "youtube";
86
+ /** Total tokens consumed */
87
+ totalTokens?: number;
88
+ /** Prompt tokens consumed */
89
+ promptTokens?: number;
90
+ /** Response tokens generated */
91
+ responseTokens?: number;
92
+ /** Error message on failure */
93
+ error?: string;
94
+ }
95
+ /**
96
+ * Analyze any media source (image, video, or YouTube URL) using Gemini.
97
+ *
98
+ * Auto-detects source type from file extension or URL pattern. Supports
99
+ * local files, remote URLs, and YouTube links.
100
+ *
101
+ * @param options - Unified analysis configuration
102
+ * @returns Result with Gemini's response, detected source type, and token usage
103
+ */
104
+ export declare function executeAnalyze(options: AnalyzeOptions): Promise<AnalyzeResult>;
105
+ export declare function registerAnalyzeCommands(aiCommand: Command): void;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @module ai-animated-caption
3
+ * @description Animated caption pipeline — word-by-word TikTok/Reels-style captions.
4
+ *
5
+ * Pipeline: Video → FFmpeg audio extract → Whisper word-level transcribe
6
+ * → Word grouping → Style routing (ASS fast tier / Remotion tier) → Output MP4
7
+ *
8
+ * ## Commands: vibe pipeline animated-caption
9
+ * ## Dependencies: Whisper (OpenAI), FFmpeg, Remotion (optional)
10
+ * @see MODELS.md for AI model configuration
11
+ */
12
+ export interface WordTiming {
13
+ word: string;
14
+ start: number;
15
+ end: number;
16
+ }
17
+ export interface WordGroup {
18
+ words: WordTiming[];
19
+ startTime: number;
20
+ endTime: number;
21
+ text: string;
22
+ }
23
+ export type AnimatedCaptionStyle = "highlight" | "bounce" | "pop-in" | "neon" | "karaoke-sweep" | "typewriter";
24
+ export interface AnimatedCaptionOptions {
25
+ videoPath: string;
26
+ outputPath: string;
27
+ style: AnimatedCaptionStyle;
28
+ highlightColor: string;
29
+ fontSize?: number;
30
+ position: "top" | "center" | "bottom";
31
+ wordsPerGroup?: number;
32
+ maxChars?: number;
33
+ language?: string;
34
+ fast?: boolean;
35
+ }
36
+ export interface AnimatedCaptionResult {
37
+ success: boolean;
38
+ outputPath?: string;
39
+ wordCount?: number;
40
+ groupCount?: number;
41
+ style?: string;
42
+ tier?: "ass" | "remotion";
43
+ error?: string;
44
+ }
45
+ /**
46
+ * Group words into display groups for animated captions.
47
+ * Groups by natural sentence boundaries, pauses, and word/char limits.
48
+ */
49
+ export declare function groupWords(words: WordTiming[], options?: {
50
+ wordsPerGroup?: number;
51
+ maxChars?: number;
52
+ }): WordGroup[];
53
+ /**
54
+ * Generate ASS subtitle content for fast-tier animated captions.
55
+ */
56
+ export declare function generateASS(groups: WordGroup[], style: "karaoke-sweep" | "typewriter", options: {
57
+ highlightColor: string;
58
+ fontSize: number;
59
+ position: string;
60
+ width: number;
61
+ height: number;
62
+ }): string;
63
+ export declare function executeAnimatedCaption(options: AnimatedCaptionOptions): Promise<AnimatedCaptionResult>;
@@ -0,0 +1,92 @@
1
+ /**
2
+ * @module ai-audio
3
+ * @description Library functions for transcribe, isolate, voice-clone, dub,
4
+ * and duck. Powers the manifest tools `audio_transcribe`, `audio_isolate`,
5
+ * `audio_clone_voice`, `audio_dub`, `audio_duck` (the user reaches these
6
+ * via `vibe audio *`).
7
+ *
8
+ * The legacy `vibe ai transcribe / tts / sfx / isolate / voice-clone / music /
9
+ * music-status / audio-restore / dub / duck` Commander registrations were
10
+ * removed alongside the dead `commands/ai.ts` orchestrator (the `vibe ai *`
11
+ * namespace was never `addCommand`'d to `program`).
12
+ *
13
+ * @see MODELS.md for AI model configuration
14
+ */
15
+ export interface TranscribeOptions {
16
+ audioPath: string;
17
+ language?: string;
18
+ output?: string;
19
+ format?: string;
20
+ apiKey?: string;
21
+ }
22
+ export interface TranscribeResult {
23
+ success: boolean;
24
+ text?: string;
25
+ segments?: Array<{
26
+ startTime: number;
27
+ endTime: number;
28
+ text: string;
29
+ }>;
30
+ detectedLanguage?: string;
31
+ outputPath?: string;
32
+ error?: string;
33
+ }
34
+ export declare function executeTranscribe(options: TranscribeOptions): Promise<TranscribeResult>;
35
+ export interface IsolateOptions {
36
+ audioPath: string;
37
+ output?: string;
38
+ apiKey?: string;
39
+ }
40
+ export interface IsolateResult {
41
+ success: boolean;
42
+ outputPath?: string;
43
+ error?: string;
44
+ }
45
+ export declare function executeIsolate(options: IsolateOptions): Promise<IsolateResult>;
46
+ export interface VoiceCloneOptions {
47
+ samplePaths: string[];
48
+ name: string;
49
+ description?: string;
50
+ labels?: Record<string, string>;
51
+ removeNoise?: boolean;
52
+ apiKey?: string;
53
+ }
54
+ export interface VoiceCloneResult {
55
+ success: boolean;
56
+ voiceId?: string;
57
+ name?: string;
58
+ error?: string;
59
+ }
60
+ export declare function executeVoiceClone(options: VoiceCloneOptions): Promise<VoiceCloneResult>;
61
+ export interface DubOptions {
62
+ mediaPath: string;
63
+ language: string;
64
+ source?: string;
65
+ voice?: string;
66
+ analyzeOnly?: boolean;
67
+ output?: string;
68
+ }
69
+ export interface DubResult {
70
+ success: boolean;
71
+ outputPath?: string;
72
+ sourceLanguage?: string;
73
+ targetLanguage?: string;
74
+ segmentCount?: number;
75
+ error?: string;
76
+ }
77
+ export declare function executeDub(options: DubOptions): Promise<DubResult>;
78
+ export interface DuckOptions {
79
+ musicPath: string;
80
+ voicePath: string;
81
+ output?: string;
82
+ threshold?: string;
83
+ ratio?: string;
84
+ attack?: string;
85
+ release?: string;
86
+ }
87
+ export interface DuckResult {
88
+ success: boolean;
89
+ outputPath?: string;
90
+ error?: string;
91
+ }
92
+ export declare function executeDuck(options: DuckOptions): Promise<DuckResult>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * ai-edit-cli.ts — CLI command registrations for video/audio editing commands.
3
+ *
4
+ * Commands: silence-cut, caption, noise-reduce, fade, translate-srt, jump-cut
5
+ *
6
+ * This file contains only the Commander.js command definitions (UI layer).
7
+ * All execute functions and types live in ai-edit.ts.
8
+ *
9
+ * Extracted from ai-edit.ts as part of modularisation.
10
+ * ai.ts calls registerEditCommands(aiCommand).
11
+ */
12
+ import { type Command } from 'commander';
13
+ export declare function registerEditCommands(aiCommand: Command): void;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @module ai-edit
3
+ * @description Barrel re-exporting executeXxx functions and types for the
4
+ * `vibe edit *` subcommands. The real implementations live under
5
+ * `commands/_shared/edit/<name>.ts` (split out in v0.69 Plan G Phase 3).
6
+ *
7
+ * This barrel exists for backward compat: 9 consumer files (demo,
8
+ * edit-cmd, ai-edit-cli, ai-review, ai-script-pipeline-cli,
9
+ * ai-animated-caption, ai, ai-script-pipeline, ai.test) already import
10
+ * from `./ai-edit.js` and continue to work unchanged.
11
+ *
12
+ * Adding a new edit operation: create `commands/_shared/edit/<name>.ts`
13
+ * with `executeXxx` + `XxxOptions/Result`, then add a re-export here.
14
+ */
15
+ export { executeSilenceCut } from "./_shared/edit/silence-cut.js";
16
+ export type { SilencePeriod, SilenceCutOptions, SilenceCutResult, } from "./_shared/edit/silence-cut.js";
17
+ export { executeJumpCut, transcribeWithWords, detectFillerRanges, DEFAULT_FILLER_WORDS, } from "./_shared/edit/jump-cut.js";
18
+ export type { FillerWord, JumpCutOptions, JumpCutResult, } from "./_shared/edit/jump-cut.js";
19
+ export { executeCaption } from "./_shared/edit/caption.js";
20
+ export type { CaptionStyle, CaptionOptions, CaptionResult, } from "./_shared/edit/caption.js";
21
+ export { executeNoiseReduce } from "./_shared/edit/noise-reduce.js";
22
+ export type { NoiseReduceOptions, NoiseReduceResult, } from "./_shared/edit/noise-reduce.js";
23
+ export { executeFade } from "./_shared/edit/fade.js";
24
+ export type { FadeOptions, FadeResult } from "./_shared/edit/fade.js";
25
+ export { executeTranslateSrt } from "./_shared/edit/translate-srt.js";
26
+ export type { TranslateSrtOptions, TranslateSrtResult, } from "./_shared/edit/translate-srt.js";
27
+ export { applyTextOverlays, executeTextOverlay, } from "./_shared/edit/text-overlay.js";
28
+ export type { TextOverlayStyle, TextOverlayOptions, TextOverlayResult, } from "./_shared/edit/text-overlay.js";
29
+ export type { AutoFix, VideoReviewCategory, VideoReviewFeedback, } from "./_shared/edit/video-review.js";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @module ai-fill-gaps
3
+ * @description Fill timeline gaps with AI-generated video (Kling image-to-video).
4
+ *
5
+ * ## Commands: vibe edit fill-gaps
6
+ * ## Dependencies: Kling
7
+ *
8
+ * Post-v0.69 Phase 4: the 562-line `.action()` body is extracted into
9
+ * `executeFillGaps` (commands/_shared/execute-fill-gaps.ts) so the
10
+ * manifest entry `edit_fill_gaps` can call the same logic. This file
11
+ * remains the CLI registration site — it wires `onProgress` to ora
12
+ * spinners and prints `humanLines` on completion.
13
+ */
14
+ import { type Command } from "commander";
15
+ export declare function registerFillGapsCommand(aiCommand: Command): void;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * ai-helpers.ts — Shared utility functions used across AI commands.
3
+ *
4
+ * These were extracted from ai.ts to improve maintainability.
5
+ * ai.ts imports and re-uses these internally.
6
+ */
7
+ import type { EditSuggestion } from "@vibeframe/ai-providers";
8
+ import { Project } from "../engine/index.js";
9
+ /**
10
+ * Minimal shape required by {@link applySuggestion}. Accepts the canonical
11
+ * {@link EditSuggestion} from the AI provider as well as the CLI's local
12
+ * `SuggestEditEntry`, which omits the optional `id`/`previewUrl`.
13
+ */
14
+ export type ApplicableSuggestion = Pick<EditSuggestion, "type" | "clipIds" | "params">;
15
+ /**
16
+ * Download a video from URL, handling Veo/Google API authentication.
17
+ * Uses x-goog-api-key header (not query param) for Google API URLs.
18
+ *
19
+ * @param url - Video URL to download
20
+ * @param apiKey - Google API key (caller should resolve from env/config)
21
+ */
22
+ export declare function downloadVideo(url: string, apiKey?: string): Promise<Buffer>;
23
+ /** Format a duration in seconds to m:ss.s display format */
24
+ export declare function formatTime(seconds: number): string;
25
+ /** Apply a single AI edit suggestion to a project */
26
+ export declare function applySuggestion(project: Project, suggestion: ApplicableSuggestion): boolean;
@@ -0,0 +1,126 @@
1
+ /**
2
+ * @module ai-highlights
3
+ *
4
+ * Highlight extraction and auto-shorts generation for long-form content.
5
+ *
6
+ * CLI commands: highlights, auto-shorts
7
+ *
8
+ * Execute functions:
9
+ * executeHighlights - Extract best moments from video/audio (Whisper+Claude or Gemini)
10
+ * executeAutoShorts - Generate short-form vertical clips from long-form video
11
+ *
12
+ * @dependencies Whisper (OpenAI), Claude (Anthropic), Gemini (Google), FFmpeg
13
+ */
14
+ import { Command } from "commander";
15
+ import { type Highlight } from "@vibeframe/ai-providers";
16
+ /** Options for {@link executeHighlights}. */
17
+ export interface HighlightsOptions {
18
+ /** Path to the video or audio file */
19
+ media: string;
20
+ /** Path for the output JSON with highlight data */
21
+ output?: string;
22
+ /** Path for a timeline JSON file with highlight clips */
23
+ project?: string;
24
+ /** Target highlight reel duration in seconds */
25
+ duration?: number;
26
+ /** Maximum number of highlights to return */
27
+ count?: number;
28
+ /** Minimum confidence threshold 0-1 (default: 0.7) */
29
+ threshold?: number;
30
+ /** Selection criteria filter */
31
+ criteria?: "emotional" | "informative" | "funny" | "all";
32
+ /** Language code for Whisper transcription */
33
+ language?: string;
34
+ /** Use Gemini multimodal analysis instead of Whisper+Claude */
35
+ useGemini?: boolean;
36
+ /** Use low-resolution mode for Gemini (longer videos) */
37
+ lowRes?: boolean;
38
+ }
39
+ /** Result from {@link executeHighlights}. */
40
+ export interface HighlightsExtractResult {
41
+ /** Whether the extraction succeeded */
42
+ success: boolean;
43
+ /** Detected and filtered highlights */
44
+ highlights: Highlight[];
45
+ /** Total source media duration in seconds */
46
+ totalDuration: number;
47
+ /** Combined duration of all returned highlights in seconds */
48
+ totalHighlightDuration: number;
49
+ /** Path to the output JSON (if --output specified) */
50
+ outputPath?: string;
51
+ /** Path to the generated timeline file (if --project specified) */
52
+ projectPath?: string;
53
+ /** Error message on failure */
54
+ error?: string;
55
+ }
56
+ /**
57
+ * Extract the best highlights from a video or audio file.
58
+ *
59
+ * Supports two analysis backends:
60
+ * - Whisper + Claude (default): transcribe audio, then analyze text for highlights
61
+ * - Gemini (--useGemini): multimodal visual+audio analysis for richer detection
62
+ *
63
+ * @param options - Highlight extraction configuration
64
+ * @returns Result with filtered highlights sorted by time
65
+ */
66
+ export declare function executeHighlights(options: HighlightsOptions): Promise<HighlightsExtractResult>;
67
+ /** Options for {@link executeAutoShorts}. */
68
+ export interface AutoShortsOptions {
69
+ /** Path to the source video file */
70
+ video: string;
71
+ /** Output directory for generated short clips */
72
+ outputDir?: string;
73
+ /** Target duration per short in seconds (default: 60) */
74
+ duration?: number;
75
+ /** Number of shorts to generate (default: 1) */
76
+ count?: number;
77
+ /** Output aspect ratio (default: "9:16") */
78
+ aspect?: "9:16" | "1:1";
79
+ /** Add auto-generated captions to shorts */
80
+ addCaptions?: boolean;
81
+ /** Caption visual style preset */
82
+ captionStyle?: "minimal" | "bold" | "animated";
83
+ /** If true, only analyze without extracting clips */
84
+ analyzeOnly?: boolean;
85
+ /** Language code for Whisper transcription */
86
+ language?: string;
87
+ /** Use Gemini multimodal analysis instead of Whisper+Claude */
88
+ useGemini?: boolean;
89
+ /** Use low-resolution mode for Gemini (longer videos) */
90
+ lowRes?: boolean;
91
+ }
92
+ /** Result from {@link executeAutoShorts}. */
93
+ export interface AutoShortsResult {
94
+ /** Whether the operation succeeded */
95
+ success: boolean;
96
+ /** Generated short clips with metadata */
97
+ shorts: Array<{
98
+ /** 1-based index */
99
+ index: number;
100
+ /** Start time in the source video (seconds) */
101
+ startTime: number;
102
+ /** End time in the source video (seconds) */
103
+ endTime: number;
104
+ /** Duration of the short (seconds) */
105
+ duration: number;
106
+ /** Confidence/virality score 0-1 */
107
+ confidence: number;
108
+ /** Why this moment was selected */
109
+ reason: string;
110
+ /** Path to the extracted clip (undefined in analyze-only mode) */
111
+ outputPath?: string;
112
+ }>;
113
+ /** Error message on failure */
114
+ error?: string;
115
+ }
116
+ /**
117
+ * Auto-generate short-form vertical clips from a long-form video.
118
+ *
119
+ * Finds the best viral-worthy moments using Whisper+Claude or Gemini analysis,
120
+ * then extracts and crops them to the target aspect ratio using FFmpeg.
121
+ *
122
+ * @param options - Auto-shorts generation configuration
123
+ * @returns Result with extracted short clips and metadata
124
+ */
125
+ export declare function executeAutoShorts(options: AutoShortsOptions): Promise<AutoShortsResult>;
126
+ export declare function registerHighlightsCommands(aiCommand: Command): void;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @module ai-image
3
+ * @description Library functions for image generation, image editing, and
4
+ * thumbnail best-frame selection. Powers the manifest tools
5
+ * `generate_image`, `edit_image`, and `generate_thumbnail` (which the user
6
+ * actually reaches via `vibe generate image / edit image / generate thumbnail`).
7
+ *
8
+ * The legacy `vibe ai image / thumbnail / background / gemini / gemini-edit`
9
+ * Commander registrations were removed alongside the dead `commands/ai.ts`
10
+ * orchestrator (the `vibe ai *` namespace was never `addCommand`'d to
11
+ * `program`).
12
+ *
13
+ * @see MODELS.md for AI model configuration
14
+ */
15
+ export interface ImageGenerateOptions {
16
+ prompt: string;
17
+ provider?: string;
18
+ output?: string;
19
+ size?: string;
20
+ ratio?: string;
21
+ quality?: string;
22
+ style?: string;
23
+ count?: number;
24
+ model?: string;
25
+ apiKey?: string;
26
+ }
27
+ export interface ImageGenerateResult {
28
+ success: boolean;
29
+ outputPath?: string;
30
+ images?: Array<{
31
+ url?: string;
32
+ base64?: string;
33
+ mimeType?: string;
34
+ revisedPrompt?: string;
35
+ }>;
36
+ provider?: string;
37
+ model?: string;
38
+ error?: string;
39
+ }
40
+ export declare function executeImageGenerate(options: ImageGenerateOptions): Promise<ImageGenerateResult>;
41
+ export interface GeminiEditOptions {
42
+ imagePaths: string[];
43
+ prompt: string;
44
+ output?: string;
45
+ model?: string;
46
+ ratio?: string;
47
+ resolution?: string;
48
+ apiKey?: string;
49
+ }
50
+ export interface GeminiEditResult {
51
+ success: boolean;
52
+ outputPath?: string;
53
+ model?: string;
54
+ error?: string;
55
+ }
56
+ export declare function executeGeminiEdit(options: GeminiEditOptions): Promise<GeminiEditResult>;
57
+ export interface ThumbnailBestFrameOptions {
58
+ videoPath: string;
59
+ outputPath: string;
60
+ prompt?: string;
61
+ model?: string;
62
+ apiKey?: string;
63
+ }
64
+ export interface ThumbnailBestFrameResult {
65
+ success: boolean;
66
+ outputPath?: string;
67
+ timestamp?: number;
68
+ reason?: string;
69
+ error?: string;
70
+ }
71
+ export declare function executeThumbnailBestFrame(options: ThumbnailBestFrameOptions): Promise<ThumbnailBestFrameResult>;