@vibeframe/cli 0.105.1 → 0.106.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +163 -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 +95 -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 +500 -330
  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 +310 -0
  207. package/dist/tools/manifest/index.d.ts +22 -0
  208. package/dist/tools/manifest/index.js +60812 -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,197 @@
1
+ import type { BuildAssetKind } from "./build-cache.js";
2
+ export type JobStatus = "queued" | "running" | "completed" | "failed" | "cancelled" | "unknown";
3
+ export type JobType = "generate-video" | "generate-music";
4
+ export type ProjectWorkflowStatus = "empty" | "ready" | "running" | "needs-author" | "failed" | "done" | "warn";
5
+ export type ProjectCurrentStage = "init" | "assets" | "compose" | "sync" | "render" | "review" | "done";
6
+ export interface JobRecord {
7
+ schemaVersion: "1";
8
+ id: string;
9
+ jobType: JobType;
10
+ status: JobStatus;
11
+ providerStatus?: string;
12
+ createdAt: string;
13
+ updatedAt: string;
14
+ projectDir: string;
15
+ workingDirectory: string;
16
+ command: string;
17
+ provider: string;
18
+ providerTaskId: string;
19
+ providerTaskType?: "text2video" | "image2video";
20
+ progress?: number;
21
+ resultUrl?: string;
22
+ beatId?: string;
23
+ outputPath?: string;
24
+ cachePath?: string;
25
+ assetKind?: BuildAssetKind;
26
+ assetCue?: string;
27
+ assetOptions?: Record<string, unknown>;
28
+ cacheKey?: string;
29
+ canonicalPath?: string;
30
+ metadataPath?: string;
31
+ error?: string;
32
+ promptPreview?: string;
33
+ retryWith: string[];
34
+ }
35
+ export interface CreateJobRecordOptions {
36
+ id?: string;
37
+ now?: Date;
38
+ jobType: JobType;
39
+ status?: JobStatus;
40
+ provider: string;
41
+ providerTaskId: string;
42
+ providerTaskType?: "text2video" | "image2video";
43
+ projectDir?: string;
44
+ workingDirectory?: string;
45
+ command: string;
46
+ prompt?: string;
47
+ progress?: number;
48
+ resultUrl?: string;
49
+ beatId?: string;
50
+ outputPath?: string;
51
+ cachePath?: string;
52
+ assetKind?: BuildAssetKind;
53
+ assetCue?: string;
54
+ assetOptions?: Record<string, unknown>;
55
+ cacheKey?: string;
56
+ canonicalPath?: string;
57
+ metadataPath?: string;
58
+ error?: string;
59
+ }
60
+ export interface RefreshJobOptions {
61
+ wait?: boolean;
62
+ output?: string;
63
+ workingDirectory?: string;
64
+ write?: boolean;
65
+ }
66
+ export interface JobStatusResult {
67
+ schemaVersion: "1";
68
+ kind: "job";
69
+ id: string;
70
+ jobType: JobType;
71
+ status: JobStatus;
72
+ provider: string;
73
+ providerTaskId: string;
74
+ providerTaskType?: "text2video" | "image2video";
75
+ createdAt: string;
76
+ updatedAt: string;
77
+ progress?: JobProgress;
78
+ result: JobResult | null;
79
+ job: JobRecord;
80
+ refreshed: boolean;
81
+ live: {
82
+ supported: boolean;
83
+ error?: string;
84
+ };
85
+ warnings: string[];
86
+ retryWith: string[];
87
+ }
88
+ export interface ProjectStatusResult {
89
+ schemaVersion: "1";
90
+ kind: "project";
91
+ project: string;
92
+ status: ProjectWorkflowStatus;
93
+ currentStage: ProjectCurrentStage;
94
+ beats: ProjectBeatReadiness;
95
+ build: BuildSummary | null;
96
+ review: ReviewSummary | null;
97
+ jobs: {
98
+ total: number;
99
+ active: number;
100
+ completed: number;
101
+ failed: number;
102
+ cancelled: number;
103
+ unknown: number;
104
+ latest: JobSummary[];
105
+ };
106
+ warnings: string[];
107
+ retryWith: string[];
108
+ }
109
+ export interface BuildSummary {
110
+ reportPath: string;
111
+ kind?: string;
112
+ success?: boolean;
113
+ phase?: string;
114
+ status?: string;
115
+ currentStage?: string;
116
+ selectedStage?: string;
117
+ outputPath?: string;
118
+ estimatedCostUsd?: number;
119
+ costUsd?: number;
120
+ beats?: ProjectBeatReadiness;
121
+ updatedAt?: string;
122
+ warnings: unknown[];
123
+ retryWith: string[];
124
+ }
125
+ export interface ReviewSummary {
126
+ reportPath: string;
127
+ kind?: string;
128
+ mode?: string;
129
+ status?: string;
130
+ score?: number;
131
+ issueCount: number;
132
+ errorCount: number;
133
+ warningCount: number;
134
+ infoCount: number;
135
+ fixOwners: {
136
+ vibe: number;
137
+ hostAgent: number;
138
+ };
139
+ sourceReports: string[];
140
+ updatedAt?: string;
141
+ retryWith: string[];
142
+ }
143
+ export interface JobSummary {
144
+ id: string;
145
+ jobType: JobType;
146
+ status: JobStatus;
147
+ provider: string;
148
+ providerTaskId: string;
149
+ providerTaskType?: string;
150
+ progress?: number;
151
+ resultUrl?: string;
152
+ beatId?: string;
153
+ outputPath?: string;
154
+ error?: string;
155
+ createdAt: string;
156
+ updatedAt: string;
157
+ retryWith: string[];
158
+ }
159
+ export interface JobProgress {
160
+ percent?: number;
161
+ phase: string;
162
+ providerStatus?: string;
163
+ }
164
+ export interface JobResult {
165
+ url?: string;
166
+ outputPath?: string;
167
+ cachePath?: string;
168
+ error?: string;
169
+ }
170
+ export interface ProjectBeatReadiness {
171
+ total: number;
172
+ assetsReady: number;
173
+ compositionsReady: number;
174
+ needsAuthor: string[];
175
+ }
176
+ export declare function findProjectRoot(start?: string): string;
177
+ export declare function jobsDir(projectDir: string): string;
178
+ export declare function normalizeJobStatus(status: unknown): JobStatus;
179
+ export declare function createJobRecord(opts: CreateJobRecordOptions): JobRecord;
180
+ export declare function createAndWriteJobRecord(opts: CreateJobRecordOptions): Promise<JobRecord>;
181
+ export declare function writeJobRecord(record: JobRecord): Promise<void>;
182
+ export declare function readJobRecord(jobId: string, projectDir?: string): Promise<JobRecord | null>;
183
+ export declare function listJobRecords(projectDir: string): Promise<JobRecord[]>;
184
+ export declare function refreshJobRecord(record: JobRecord, opts?: RefreshJobOptions): Promise<JobStatusResult>;
185
+ export declare function inspectProjectStatus(projectDirArg: string, opts?: {
186
+ refresh?: boolean;
187
+ }): Promise<ProjectStatusResult>;
188
+ export declare function summarizeJob(record: JobRecord): JobSummary;
189
+ export declare function retryWithForJob(record: JobRecord): string[];
190
+ export declare function makeJobStatusResult(record: JobRecord, opts: {
191
+ refreshed: boolean;
192
+ live: {
193
+ supported: boolean;
194
+ error?: string;
195
+ };
196
+ warnings?: string[];
197
+ }): JobStatusResult;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { VisualStyle } from "./visual-styles.js";
2
+ export interface StoryboardDraft {
3
+ storyboardMd: string;
4
+ designMd: string;
5
+ warnings: string[];
6
+ }
7
+ export declare function draftStoryboardFromBrief(opts: {
8
+ name: string;
9
+ brief: string;
10
+ durationSec?: number;
11
+ aspect?: string;
12
+ visualStyle?: VisualStyle;
13
+ }): StoryboardDraft;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,26 @@
1
+ import { type Beat } from "./storyboard-parse.js";
2
+ export declare const STORYBOARD_CUE_KEYS: readonly ["duration", "narration", "backdrop", "video", "motion", "voice", "music", "asset"];
3
+ export type StoryboardCueKey = (typeof STORYBOARD_CUE_KEYS)[number];
4
+ export interface StoryboardValidationIssue {
5
+ severity: "error" | "warning";
6
+ code: string;
7
+ message: string;
8
+ beatId?: string;
9
+ }
10
+ export interface StoryboardValidationResult {
11
+ ok: boolean;
12
+ beats: Beat[];
13
+ issues: StoryboardValidationIssue[];
14
+ }
15
+ export declare function validateStoryboardMarkdown(markdown: string): StoryboardValidationResult;
16
+ export declare function getStoryboardBeat(markdown: string, beatId: string): Beat | null;
17
+ export declare function setStoryboardCue(markdown: string, opts: {
18
+ beatId: string;
19
+ key: string;
20
+ value?: unknown;
21
+ unset?: boolean;
22
+ }): string;
23
+ export declare function moveStoryboardBeat(markdown: string, opts: {
24
+ beatId: string;
25
+ afterBeatId: string;
26
+ }): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,159 @@
1
+ /**
2
+ * @module _shared/storyboard-parse
3
+ *
4
+ * Parses a STORYBOARD.md document into the shape `compose-scenes-with-skills`
5
+ * (v0.59+) needs: a `global` direction block (everything before the first
6
+ * `## Beat …` heading) plus an array of `beats`.
7
+ *
8
+ * The format follows Hyperframes' step-4-storyboard.md convention, but stays
9
+ * forgiving on small variations (em-dash vs hyphen vs colon between "Beat N"
10
+ * and the title; explicit "Beat" prefix optional).
11
+ *
12
+ * v0.60 adds optional YAML cue extraction so a `vibe scene build` driver can
13
+ * dispatch TTS / image-gen / duration without separate flags:
14
+ * - **Project frontmatter** — `---\n…yaml…\n---` at the top of the file
15
+ * (standard markdown frontmatter). Holds project-wide defaults like
16
+ * providers, voice, default duration. Stripped from `global`.
17
+ * - **Per-beat cues** — the FIRST ```yaml fenced block inside a beat body,
18
+ * parsed into `Beat.cues`. Stripped from `body` so the LLM prompt
19
+ * stays free of machine-only metadata.
20
+ * Both are back-compat: storyboards without frontmatter or yaml blocks
21
+ * parse exactly as before.
22
+ *
23
+ * Pure function. No I/O.
24
+ */
25
+ export interface ParsedStoryboard {
26
+ /**
27
+ * Markdown content before the first `## …` heading. Holds project-wide
28
+ * direction (format, audio, style basis). Trimmed; may be empty.
29
+ * **Project frontmatter (`---\n…\n---`) is stripped from this field.**
30
+ */
31
+ global: string;
32
+ /** One entry per `## …` heading. Order matches the document. */
33
+ beats: Beat[];
34
+ /**
35
+ * Project-level YAML frontmatter parsed from the top of the document, if
36
+ * present. Holds defaults the `vibe scene build` driver applies to every
37
+ * beat unless overridden by a per-beat cue. Undefined when no frontmatter
38
+ * was present.
39
+ */
40
+ frontmatter?: ProjectFrontmatter;
41
+ }
42
+ /**
43
+ * Project-level cues from the document's top frontmatter. All fields are
44
+ * optional — the driver (or user) supplies CLI-flag fallbacks.
45
+ *
46
+ * Index signature stays open so projects can stash custom keys (e.g. brand
47
+ * colour palette overrides) without TypeScript pushback.
48
+ */
49
+ export interface ProjectFrontmatter {
50
+ /** Slug for the project — informational, not used by the parser. */
51
+ project?: string;
52
+ /**
53
+ * Per-primitive provider preferences. Keys match the CLI's `--tts`,
54
+ * `--image-provider`, `--music-provider` flags.
55
+ */
56
+ providers?: {
57
+ tts?: string;
58
+ image?: string;
59
+ video?: string;
60
+ music?: string;
61
+ };
62
+ /** Default voice id for TTS (provider-specific — see `--voice` flag). */
63
+ voice?: string;
64
+ /** Default beat duration in seconds when a beat omits both cue and `### Beat duration`. */
65
+ defaultDuration?: number;
66
+ /** Visual identity preset hint (informational; e.g. "Swiss Pulse"). */
67
+ style?: string;
68
+ [key: string]: unknown;
69
+ }
70
+ /**
71
+ * Per-beat cues extracted from the first ```yaml fenced block inside a beat
72
+ * body. The driver passes these to TTS / image / compose calls so the
73
+ * storyboard alone is enough source for `vibe scene build`.
74
+ */
75
+ export interface BeatCues {
76
+ /** Narration text for this beat (drives TTS + scene `<audio>` element). */
77
+ narration?: string;
78
+ /** Image prompt for the backdrop generation (drives T2I). */
79
+ backdrop?: string;
80
+ /** Beat duration in seconds — overrides `### Beat duration` subsection if both present. */
81
+ duration?: number;
82
+ /** Voice override for this beat (overrides project frontmatter `voice`). */
83
+ voice?: string;
84
+ [key: string]: unknown;
85
+ }
86
+ export interface Beat {
87
+ /**
88
+ * Stable id for the beat. Derivation order:
89
+ * 1. `## Beat <ID> [— or - or :] [Title]` → "<ID>" (lowercased, slugified
90
+ * if non-alphanumeric — e.g. "1", "hook", "scene-2").
91
+ * 2. `## <Title>` (no Beat prefix) → slug(<Title>).
92
+ * Always non-empty, kebab-case-or-numeric.
93
+ */
94
+ id: string;
95
+ /** The full original heading line (without the leading `## `). */
96
+ heading: string;
97
+ /**
98
+ * Markdown body of the beat, including any nested `### …` subsections.
99
+ * Trimmed. Excludes the `## …` line itself. **The leading ```yaml cue
100
+ * block (if present) is stripped** so this field stays clean for LLM
101
+ * prompts.
102
+ */
103
+ body: string;
104
+ /**
105
+ * Beat duration in seconds, derived from (in priority order):
106
+ * 1. `cues.duration` (per-beat YAML)
107
+ * 2. `### Beat duration` subsection
108
+ * Undefined when neither is present.
109
+ */
110
+ duration?: number;
111
+ /**
112
+ * Per-beat cues parsed from the first ```yaml block inside the body.
113
+ * Undefined when no yaml block was present.
114
+ */
115
+ cues?: BeatCues;
116
+ }
117
+ /**
118
+ * Parse a STORYBOARD.md document into structured beats.
119
+ *
120
+ * Empty input → `{ global: "", beats: [] }`.
121
+ * Input with no `##` headings → `{ global: <whole doc>, beats: [] }`.
122
+ */
123
+ export declare function parseStoryboard(md: string): ParsedStoryboard;
124
+ /**
125
+ * Strip a leading `---\n…\n---` YAML frontmatter block and return the parsed
126
+ * value. Returns `{ frontmatter: undefined, remaining: input }` when there's
127
+ * no frontmatter, when the YAML doesn't parse, or when the parsed root isn't
128
+ * an object — graceful degradation, since the downstream caller can always
129
+ * fall back on CLI flags.
130
+ */
131
+ export declare function extractProjectFrontmatter(md: string): {
132
+ frontmatter: ProjectFrontmatter | undefined;
133
+ remaining: string;
134
+ };
135
+ /**
136
+ * Pull a leading ```yaml cue block off a beat body and return both the parsed
137
+ * cues and the remaining body (cues stripped). Mirrors
138
+ * `extractProjectFrontmatter`'s "swallow only when valid" behaviour.
139
+ */
140
+ export declare function extractBeatCues(body: string): {
141
+ cues: BeatCues | undefined;
142
+ body: string;
143
+ };
144
+ /**
145
+ * Derive a stable id from a `## …` heading line (the part after `## `).
146
+ *
147
+ * Examples:
148
+ * "Beat 1 — Hook" → "1"
149
+ * "Beat hook : Intro" → "hook"
150
+ * "Beat 2 - Core" → "2"
151
+ * "Hook" → "hook"
152
+ * "Hook (3 seconds)" → "hook"
153
+ */
154
+ export declare function deriveBeatId(headingLine: string): string;
155
+ /**
156
+ * Look for a `### Beat duration` subsection inside a beat body and parse
157
+ * the first number. Returns undefined when absent or unparseable.
158
+ */
159
+ export declare function parseBeatDuration(body: string): number | undefined;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ import type { AgentMessage } from "../../agent/types.js";
2
+ import { type ComposerProvider } from "./composer-resolve.js";
3
+ import { type StoryboardValidationResult } from "./storyboard-edit.js";
4
+ export type StoryboardRevisionChat = (messages: AgentMessage[]) => Promise<string>;
5
+ export interface StoryboardRevisionOptions {
6
+ projectDir: string;
7
+ request: string;
8
+ durationSec?: number;
9
+ composer?: ComposerProvider;
10
+ dryRun?: boolean;
11
+ chat?: StoryboardRevisionChat;
12
+ }
13
+ export interface StoryboardRevisionResult {
14
+ schemaVersion: "1";
15
+ kind: "storyboard-revision";
16
+ success: boolean;
17
+ projectDir: string;
18
+ storyboardPath: string;
19
+ provider?: ComposerProvider;
20
+ summary: string;
21
+ changedBeats: string[];
22
+ validation: StoryboardValidationResult;
23
+ warnings: string[];
24
+ wrote: boolean;
25
+ retryWith: string[];
26
+ storyboard?: string;
27
+ code?: string;
28
+ message?: string;
29
+ suggestion?: string;
30
+ recoverable?: boolean;
31
+ }
32
+ export declare function executeStoryboardRevision(opts: StoryboardRevisionOptions): Promise<StoryboardRevisionResult>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @module _shared/timeline-project
3
+ *
4
+ * Shared action logic for `vibe timeline create/info/set` (and the
5
+ * deprecated `vibe project create/info/set` alias). Extracted so both
6
+ * surfaces call the same code path — the only difference is which
7
+ * default filename `create` writes to:
8
+ *
9
+ * - `vibe timeline create` → `timeline.json` (canonical)
10
+ * - `vibe project create` → `project.vibe.json` (legacy, deprecated)
11
+ *
12
+ * Read-side commands (`info`, `set`) use `resolveTimelineFile` which
13
+ * accepts both filenames. Existing `*.vibe.json` files keep working
14
+ * forever; only the on-disk filename for *new* creates differs.
15
+ */
16
+ import { TIMELINE_FILENAME, LEGACY_TIMELINE_FILENAME } from "../../utils/project-resolver.js";
17
+ export { TIMELINE_FILENAME, LEGACY_TIMELINE_FILENAME };
18
+ export interface TimelineCreateOptions {
19
+ output?: string;
20
+ ratio?: string;
21
+ fps?: string;
22
+ dryRun?: boolean;
23
+ }
24
+ export interface TimelineSetOptions {
25
+ name?: string;
26
+ ratio?: string;
27
+ fps?: string;
28
+ dryRun?: boolean;
29
+ }
30
+ export declare function executeTimelineCreate(name: string, options: TimelineCreateOptions, commandName: string, startedAt: number, defaultFilename?: string, createDirectoryByDefault?: boolean): Promise<void>;
31
+ export declare function executeTimelineInfo(file: string, commandName: string, startedAt: number): Promise<void>;
32
+ export declare function executeTimelineSet(file: string, options: TimelineSetOptions, commandName: string, startedAt: number): Promise<void>;
@@ -0,0 +1,75 @@
1
+ /**
2
+ * @module _shared/tts-resolve
3
+ *
4
+ * One-stop factory for picking a TTS provider at runtime. Used by every
5
+ * scene-authoring path that turns text into narration audio (currently
6
+ * `executeSceneAdd`; `script-to-video --format scenes` follows in C5+).
7
+ *
8
+ * Routes between:
9
+ * - **ElevenLabs** — cloud, API-key gated, paid (~$0.02/scene). Default
10
+ * when `ELEVENLABS_API_KEY` is set.
11
+ * - **Kokoro** — local Apache 2.0 model, free, ~330MB first-call download.
12
+ * The fallback for key-less users.
13
+ *
14
+ * The router exposes a uniform `TtsCallable` shape so call sites don't have
15
+ * to branch on provider id. Both providers already return the same
16
+ * `{ success, audioBuffer, error?, characterCount? }` result.
17
+ */
18
+ import type { KokoroLoadEvent } from "@vibeframe/ai-providers";
19
+ /** TTS providers VibeFrame can route to. `"auto"` picks based on key availability. */
20
+ export type TtsProviderName = "auto" | "elevenlabs" | "kokoro";
21
+ /** Concrete provider id surfaced in result metadata. Never `"auto"`. */
22
+ export type ResolvedTtsProvider = "elevenlabs" | "kokoro";
23
+ /** Options accepted by every {@link TtsCallable}. Subset of provider-specific options. */
24
+ export interface TtsCallOptions {
25
+ /**
26
+ * Provider-specific voice id. ElevenLabs takes voice names/ids
27
+ * (`"rachel"`, `"21m00Tcm..."`); Kokoro takes voice ids (`"af_heart"`,
28
+ * `"am_michael"`). The router does not map between the two.
29
+ */
30
+ voice?: string;
31
+ /** Speaking speed multiplier (Kokoro: 0.5–2; ElevenLabs: 0.7–1.2). */
32
+ speed?: number;
33
+ /** Cold-start progress callback (Kokoro only — fires on first ~330MB load). */
34
+ onProgress?: (event: KokoroLoadEvent) => void;
35
+ }
36
+ /** Result of a TTS call. Same shape both providers already return. */
37
+ export interface TtsCallResult {
38
+ success: boolean;
39
+ audioBuffer?: Buffer;
40
+ error?: string;
41
+ characterCount?: number;
42
+ }
43
+ /** Synthesise speech from text. Provider-specific implementation lives behind this. */
44
+ export type TtsCallable = (text: string, options?: TtsCallOptions) => Promise<TtsCallResult>;
45
+ export interface TtsResolution {
46
+ /** Concrete provider chosen. */
47
+ provider: ResolvedTtsProvider;
48
+ /** Output container — drives the narration filename extension. */
49
+ audioExtension: "mp3" | "wav";
50
+ /** Synthesise text → audio buffer. */
51
+ call: TtsCallable;
52
+ }
53
+ /**
54
+ * Resolve a TTS provider preference into a callable + metadata.
55
+ *
56
+ * Resolution policy:
57
+ * - `"elevenlabs"`: requires `ELEVENLABS_API_KEY`. Throws an `ApiKeyError`-style
58
+ * error via {@link getApiKey} (consumed by `requireApiKey`/`exitWithError`).
59
+ * - `"kokoro"`: always available (local). No key check.
60
+ * - `"auto"` (or `undefined`): if an ElevenLabs key is configured in
61
+ * project/user config.yaml, .env, or process env, picks ElevenLabs;
62
+ * otherwise falls back to Kokoro.
63
+ */
64
+ export declare function resolveTtsProvider(preferred?: TtsProviderName): Promise<TtsResolution>;
65
+ /**
66
+ * Thrown when the caller asked for a specific provider whose key/runtime is
67
+ * unavailable. Carries the provider id so the caller can format a clean
68
+ * `usageError`/`exitWithError`.
69
+ */
70
+ export declare class TtsKeyMissingError extends Error {
71
+ readonly provider: ResolvedTtsProvider;
72
+ constructor(provider: ResolvedTtsProvider);
73
+ }
74
+ /** Validate a free-form `--tts <value>` against {@link TtsProviderName}. */
75
+ export declare function parseTtsProviderName(value: string | undefined): TtsProviderName;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Unit tests for the TTS router. The actual provider classes are mocked at
3
+ * the module level so we can drive resolution outcomes deterministically.
4
+ */
5
+ export {};
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @module _shared/video-providers
3
+ * @description Per-provider `generateVideoWithRetry*` helpers used by the
4
+ * script-to-video pipeline. Each wraps a single AI provider's video
5
+ * generation API in a retry loop with onProgress callbacks. Split out of
6
+ * `ai-script-pipeline.ts` in v0.69 (Plan G Phase 4).
7
+ */
8
+ import type { GeminiProvider, GrokProvider, KlingProvider, RunwayProvider } from "@vibeframe/ai-providers";
9
+ import { type StoryboardSegment } from "./video-utils.js";
10
+ /** Generate video with retry logic for Grok provider. */
11
+ export declare function generateVideoWithRetryGrok(grok: GrokProvider, segment: StoryboardSegment, options: {
12
+ duration: number;
13
+ aspectRatio: "16:9" | "9:16" | "1:1";
14
+ referenceImage?: string;
15
+ }, maxRetries: number, onProgress?: (message: string) => void): Promise<{
16
+ requestId: string;
17
+ } | null>;
18
+ /**
19
+ * Generate video with retry logic for Kling provider.
20
+ * Supports image-to-video with URL (v2.5/v2.6 models).
21
+ */
22
+ export declare function generateVideoWithRetryKling(kling: KlingProvider, segment: StoryboardSegment, options: {
23
+ duration: 5 | 10;
24
+ aspectRatio: "16:9" | "9:16" | "1:1";
25
+ referenceImage?: string;
26
+ }, maxRetries: number, onProgress?: (message: string) => void): Promise<{
27
+ taskId: string;
28
+ type: "text2video" | "image2video";
29
+ } | null>;
30
+ /** Generate video with retry logic for Runway provider. */
31
+ export declare function generateVideoWithRetryRunway(runway: RunwayProvider, segment: StoryboardSegment, referenceImage: string, options: {
32
+ duration: 5 | 10;
33
+ aspectRatio: "16:9" | "9:16";
34
+ }, maxRetries: number, onProgress?: (message: string) => void): Promise<{
35
+ taskId: string;
36
+ } | null>;
37
+ /** Generate video with retry logic for Veo (Gemini) provider. */
38
+ export declare function generateVideoWithRetryVeo(gemini: GeminiProvider, segment: StoryboardSegment, options: {
39
+ duration: 4 | 6 | 8;
40
+ aspectRatio: "16:9" | "9:16" | "1:1";
41
+ referenceImage?: string;
42
+ }, maxRetries: number, onProgress?: (message: string) => void): Promise<{
43
+ operationName: string;
44
+ } | null>;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @module _shared/video-utils
3
+ * @description Shared helpers for the script-to-video pipeline:
4
+ * StoryboardSegment type, retry constants, ImgBB upload, FFmpeg/Kling
5
+ * video extension, error logging, and the generic wait-for-completion
6
+ * loop. Split out of `ai-script-pipeline.ts` in v0.69 (Plan G Phase 4).
7
+ */
8
+ import type { KlingProvider, RunwayProvider } from "@vibeframe/ai-providers";
9
+ /** A single scene segment from the Claude-generated storyboard. */
10
+ export interface StoryboardSegment {
11
+ /** 1-based scene index (assigned during generation) */
12
+ index?: number;
13
+ /** Narrative description of the scene */
14
+ description: string;
15
+ /** Visual prompt for image/video generation */
16
+ visuals: string;
17
+ /** Art style directive (e.g. "cinematic", "anime") */
18
+ visualStyle?: string;
19
+ /** Character appearance description for consistency */
20
+ characterDescription?: string;
21
+ /** Reference to previous scene for continuity */
22
+ previousSceneLink?: string;
23
+ /** Voiceover narration text */
24
+ narration?: string;
25
+ /** Audio direction (e.g. "upbeat music") */
26
+ audio?: string;
27
+ /** Text lines to overlay on the video */
28
+ textOverlays?: string[];
29
+ /** Scene duration in seconds (updated to match narration) */
30
+ duration: number;
31
+ /** Cumulative start time in seconds */
32
+ startTime: number;
33
+ }
34
+ /** Default retry count for video generation API calls. */
35
+ export declare const DEFAULT_VIDEO_RETRIES = 2;
36
+ /** Delay between retries in milliseconds. */
37
+ export declare const RETRY_DELAY_MS = 5000;
38
+ /** Sleep helper. */
39
+ export declare function sleep(ms: number): Promise<void>;
40
+ /**
41
+ * Upload image to ImgBB and return the URL.
42
+ * Used for Kling v2.5/v2.6 image-to-video which requires URL (not base64).
43
+ */
44
+ export declare function uploadToImgbb(imageBuffer: Buffer, apiKey: string): Promise<{
45
+ success: boolean;
46
+ url?: string;
47
+ error?: string;
48
+ }>;
49
+ /**
50
+ * Extend a video to target duration using Kling extend API when possible,
51
+ * with fallback to FFmpeg-based extendVideoNaturally.
52
+ *
53
+ * When the extension ratio > 1.4 and a Kling provider + videoId are available,
54
+ * uses the Kling video-extend API for natural continuation instead of freeze frames.
55
+ */
56
+ export declare function extendVideoToTarget(videoPath: string, targetDuration: number, outputDir: string, sceneLabel: string, options?: {
57
+ kling?: KlingProvider;
58
+ videoId?: string;
59
+ onProgress?: (message: string) => void;
60
+ }): Promise<void>;
61
+ /**
62
+ * Log a provider failure to stderr. Centralizes the "what went wrong" output
63
+ * so call sites stop silently dropping provider errors into failedScenes.
64
+ */
65
+ export declare function logSceneFailure(provider: string, sceneLabel: string, err: unknown): void;
66
+ /**
67
+ * Wait for video completion with retry logic.
68
+ */
69
+ export declare function waitForVideoWithRetry(provider: KlingProvider | RunwayProvider, taskId: string, providerType: "kling" | "runway", maxRetries: number, onProgress?: (message: string) => void, timeout?: number): Promise<{
70
+ videoUrl: string;
71
+ } | null>;