@vibeframe/cli 0.27.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 (420) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/.turbo/turbo-lint.log +21 -0
  3. package/.turbo/turbo-test.log +689 -0
  4. package/dist/agent/adapters/claude.d.ts +15 -0
  5. package/dist/agent/adapters/claude.d.ts.map +1 -0
  6. package/dist/agent/adapters/claude.js +119 -0
  7. package/dist/agent/adapters/claude.js.map +1 -0
  8. package/dist/agent/adapters/gemini.d.ts +15 -0
  9. package/dist/agent/adapters/gemini.d.ts.map +1 -0
  10. package/dist/agent/adapters/gemini.js +132 -0
  11. package/dist/agent/adapters/gemini.js.map +1 -0
  12. package/dist/agent/adapters/index.d.ts +27 -0
  13. package/dist/agent/adapters/index.d.ts.map +1 -0
  14. package/dist/agent/adapters/index.js +38 -0
  15. package/dist/agent/adapters/index.js.map +1 -0
  16. package/dist/agent/adapters/ollama.d.ts +20 -0
  17. package/dist/agent/adapters/ollama.d.ts.map +1 -0
  18. package/dist/agent/adapters/ollama.js +186 -0
  19. package/dist/agent/adapters/ollama.js.map +1 -0
  20. package/dist/agent/adapters/openai.d.ts +15 -0
  21. package/dist/agent/adapters/openai.d.ts.map +1 -0
  22. package/dist/agent/adapters/openai.js +92 -0
  23. package/dist/agent/adapters/openai.js.map +1 -0
  24. package/dist/agent/adapters/xai.d.ts +15 -0
  25. package/dist/agent/adapters/xai.d.ts.map +1 -0
  26. package/dist/agent/adapters/xai.js +95 -0
  27. package/dist/agent/adapters/xai.js.map +1 -0
  28. package/dist/agent/index.d.ts +69 -0
  29. package/dist/agent/index.d.ts.map +1 -0
  30. package/dist/agent/index.js +180 -0
  31. package/dist/agent/index.js.map +1 -0
  32. package/dist/agent/memory/index.d.ts +70 -0
  33. package/dist/agent/memory/index.d.ts.map +1 -0
  34. package/dist/agent/memory/index.js +132 -0
  35. package/dist/agent/memory/index.js.map +1 -0
  36. package/dist/agent/prompts/system.d.ts +6 -0
  37. package/dist/agent/prompts/system.d.ts.map +1 -0
  38. package/dist/agent/prompts/system.js +103 -0
  39. package/dist/agent/prompts/system.js.map +1 -0
  40. package/dist/agent/tools/ai-editing.d.ts +15 -0
  41. package/dist/agent/tools/ai-editing.d.ts.map +1 -0
  42. package/dist/agent/tools/ai-editing.js +763 -0
  43. package/dist/agent/tools/ai-editing.js.map +1 -0
  44. package/dist/agent/tools/ai-generation.d.ts +13 -0
  45. package/dist/agent/tools/ai-generation.d.ts.map +1 -0
  46. package/dist/agent/tools/ai-generation.js +973 -0
  47. package/dist/agent/tools/ai-generation.js.map +1 -0
  48. package/dist/agent/tools/ai-pipeline.d.ts +14 -0
  49. package/dist/agent/tools/ai-pipeline.d.ts.map +1 -0
  50. package/dist/agent/tools/ai-pipeline.js +961 -0
  51. package/dist/agent/tools/ai-pipeline.js.map +1 -0
  52. package/dist/agent/tools/ai.d.ts +13 -0
  53. package/dist/agent/tools/ai.d.ts.map +1 -0
  54. package/dist/agent/tools/ai.js +19 -0
  55. package/dist/agent/tools/ai.js.map +1 -0
  56. package/dist/agent/tools/batch.d.ts +6 -0
  57. package/dist/agent/tools/batch.d.ts.map +1 -0
  58. package/dist/agent/tools/batch.js +383 -0
  59. package/dist/agent/tools/batch.js.map +1 -0
  60. package/dist/agent/tools/e2e.test.d.ts +26 -0
  61. package/dist/agent/tools/e2e.test.d.ts.map +1 -0
  62. package/dist/agent/tools/e2e.test.js +397 -0
  63. package/dist/agent/tools/e2e.test.js.map +1 -0
  64. package/dist/agent/tools/export.d.ts +6 -0
  65. package/dist/agent/tools/export.d.ts.map +1 -0
  66. package/dist/agent/tools/export.js +171 -0
  67. package/dist/agent/tools/export.js.map +1 -0
  68. package/dist/agent/tools/filesystem.d.ts +6 -0
  69. package/dist/agent/tools/filesystem.d.ts.map +1 -0
  70. package/dist/agent/tools/filesystem.js +212 -0
  71. package/dist/agent/tools/filesystem.js.map +1 -0
  72. package/dist/agent/tools/index.d.ts +65 -0
  73. package/dist/agent/tools/index.d.ts.map +1 -0
  74. package/dist/agent/tools/index.js +120 -0
  75. package/dist/agent/tools/index.js.map +1 -0
  76. package/dist/agent/tools/integration.test.d.ts +11 -0
  77. package/dist/agent/tools/integration.test.d.ts.map +1 -0
  78. package/dist/agent/tools/integration.test.js +659 -0
  79. package/dist/agent/tools/integration.test.js.map +1 -0
  80. package/dist/agent/tools/media.d.ts +6 -0
  81. package/dist/agent/tools/media.d.ts.map +1 -0
  82. package/dist/agent/tools/media.js +616 -0
  83. package/dist/agent/tools/media.js.map +1 -0
  84. package/dist/agent/tools/project.d.ts +6 -0
  85. package/dist/agent/tools/project.d.ts.map +1 -0
  86. package/dist/agent/tools/project.js +284 -0
  87. package/dist/agent/tools/project.js.map +1 -0
  88. package/dist/agent/tools/timeline.d.ts +6 -0
  89. package/dist/agent/tools/timeline.d.ts.map +1 -0
  90. package/dist/agent/tools/timeline.js +873 -0
  91. package/dist/agent/tools/timeline.js.map +1 -0
  92. package/dist/agent/types.d.ts +59 -0
  93. package/dist/agent/types.d.ts.map +1 -0
  94. package/dist/agent/types.js +5 -0
  95. package/dist/agent/types.js.map +1 -0
  96. package/dist/commands/agent.d.ts +21 -0
  97. package/dist/commands/agent.d.ts.map +1 -0
  98. package/dist/commands/agent.js +290 -0
  99. package/dist/commands/agent.js.map +1 -0
  100. package/dist/commands/ai-analyze.d.ts +106 -0
  101. package/dist/commands/ai-analyze.d.ts.map +1 -0
  102. package/dist/commands/ai-analyze.js +327 -0
  103. package/dist/commands/ai-analyze.js.map +1 -0
  104. package/dist/commands/ai-animated-caption.d.ts +64 -0
  105. package/dist/commands/ai-animated-caption.d.ts.map +1 -0
  106. package/dist/commands/ai-animated-caption.js +272 -0
  107. package/dist/commands/ai-animated-caption.js.map +1 -0
  108. package/dist/commands/ai-audio.d.ts +20 -0
  109. package/dist/commands/ai-audio.d.ts.map +1 -0
  110. package/dist/commands/ai-audio.js +808 -0
  111. package/dist/commands/ai-audio.js.map +1 -0
  112. package/dist/commands/ai-broll.d.ts +15 -0
  113. package/dist/commands/ai-broll.d.ts.map +1 -0
  114. package/dist/commands/ai-broll.js +406 -0
  115. package/dist/commands/ai-broll.js.map +1 -0
  116. package/dist/commands/ai-edit-cli.d.ts +14 -0
  117. package/dist/commands/ai-edit-cli.d.ts.map +1 -0
  118. package/dist/commands/ai-edit-cli.js +579 -0
  119. package/dist/commands/ai-edit-cli.js.map +1 -0
  120. package/dist/commands/ai-edit.d.ts +398 -0
  121. package/dist/commands/ai-edit.d.ts.map +1 -0
  122. package/dist/commands/ai-edit.js +1019 -0
  123. package/dist/commands/ai-edit.js.map +1 -0
  124. package/dist/commands/ai-fill-gaps.d.ts +14 -0
  125. package/dist/commands/ai-fill-gaps.d.ts.map +1 -0
  126. package/dist/commands/ai-fill-gaps.js +451 -0
  127. package/dist/commands/ai-fill-gaps.js.map +1 -0
  128. package/dist/commands/ai-helpers.d.ts +20 -0
  129. package/dist/commands/ai-helpers.d.ts.map +1 -0
  130. package/dist/commands/ai-helpers.js +59 -0
  131. package/dist/commands/ai-helpers.js.map +1 -0
  132. package/dist/commands/ai-highlights.d.ts +127 -0
  133. package/dist/commands/ai-highlights.d.ts.map +1 -0
  134. package/dist/commands/ai-highlights.js +1026 -0
  135. package/dist/commands/ai-highlights.js.map +1 -0
  136. package/dist/commands/ai-image.d.ts +34 -0
  137. package/dist/commands/ai-image.d.ts.map +1 -0
  138. package/dist/commands/ai-image.js +653 -0
  139. package/dist/commands/ai-image.js.map +1 -0
  140. package/dist/commands/ai-motion.d.ts +50 -0
  141. package/dist/commands/ai-motion.d.ts.map +1 -0
  142. package/dist/commands/ai-motion.js +271 -0
  143. package/dist/commands/ai-motion.js.map +1 -0
  144. package/dist/commands/ai-narrate.d.ts +66 -0
  145. package/dist/commands/ai-narrate.d.ts.map +1 -0
  146. package/dist/commands/ai-narrate.js +329 -0
  147. package/dist/commands/ai-narrate.js.map +1 -0
  148. package/dist/commands/ai-review.d.ts +57 -0
  149. package/dist/commands/ai-review.d.ts.map +1 -0
  150. package/dist/commands/ai-review.js +251 -0
  151. package/dist/commands/ai-review.js.map +1 -0
  152. package/dist/commands/ai-script-pipeline-cli.d.ts +9 -0
  153. package/dist/commands/ai-script-pipeline-cli.d.ts.map +1 -0
  154. package/dist/commands/ai-script-pipeline-cli.js +1494 -0
  155. package/dist/commands/ai-script-pipeline-cli.js.map +1 -0
  156. package/dist/commands/ai-script-pipeline.d.ts +259 -0
  157. package/dist/commands/ai-script-pipeline.d.ts.map +1 -0
  158. package/dist/commands/ai-script-pipeline.js +1027 -0
  159. package/dist/commands/ai-script-pipeline.js.map +1 -0
  160. package/dist/commands/ai-suggest-edit.d.ts +14 -0
  161. package/dist/commands/ai-suggest-edit.d.ts.map +1 -0
  162. package/dist/commands/ai-suggest-edit.js +220 -0
  163. package/dist/commands/ai-suggest-edit.js.map +1 -0
  164. package/dist/commands/ai-video-fx.d.ts +14 -0
  165. package/dist/commands/ai-video-fx.d.ts.map +1 -0
  166. package/dist/commands/ai-video-fx.js +395 -0
  167. package/dist/commands/ai-video-fx.js.map +1 -0
  168. package/dist/commands/ai-video.d.ts +15 -0
  169. package/dist/commands/ai-video.d.ts.map +1 -0
  170. package/dist/commands/ai-video.js +785 -0
  171. package/dist/commands/ai-video.js.map +1 -0
  172. package/dist/commands/ai-viral.d.ts +15 -0
  173. package/dist/commands/ai-viral.d.ts.map +1 -0
  174. package/dist/commands/ai-viral.js +519 -0
  175. package/dist/commands/ai-viral.js.map +1 -0
  176. package/dist/commands/ai-visual-fx.d.ts +14 -0
  177. package/dist/commands/ai-visual-fx.d.ts.map +1 -0
  178. package/dist/commands/ai-visual-fx.js +505 -0
  179. package/dist/commands/ai-visual-fx.js.map +1 -0
  180. package/dist/commands/ai.d.ts +38 -0
  181. package/dist/commands/ai.d.ts.map +1 -0
  182. package/dist/commands/ai.js +225 -0
  183. package/dist/commands/ai.js.map +1 -0
  184. package/dist/commands/ai.test.d.ts +2 -0
  185. package/dist/commands/ai.test.d.ts.map +1 -0
  186. package/dist/commands/ai.test.js +554 -0
  187. package/dist/commands/ai.test.js.map +1 -0
  188. package/dist/commands/analyze.d.ts +16 -0
  189. package/dist/commands/analyze.d.ts.map +1 -0
  190. package/dist/commands/analyze.js +247 -0
  191. package/dist/commands/analyze.js.map +1 -0
  192. package/dist/commands/audio.d.ts +18 -0
  193. package/dist/commands/audio.d.ts.map +1 -0
  194. package/dist/commands/audio.js +539 -0
  195. package/dist/commands/audio.js.map +1 -0
  196. package/dist/commands/batch.d.ts +3 -0
  197. package/dist/commands/batch.d.ts.map +1 -0
  198. package/dist/commands/batch.js +366 -0
  199. package/dist/commands/batch.js.map +1 -0
  200. package/dist/commands/batch.test.d.ts +2 -0
  201. package/dist/commands/batch.test.d.ts.map +1 -0
  202. package/dist/commands/batch.test.js +203 -0
  203. package/dist/commands/batch.test.js.map +1 -0
  204. package/dist/commands/detect.d.ts +3 -0
  205. package/dist/commands/detect.d.ts.map +1 -0
  206. package/dist/commands/detect.js +273 -0
  207. package/dist/commands/detect.js.map +1 -0
  208. package/dist/commands/doctor.d.ts +6 -0
  209. package/dist/commands/doctor.d.ts.map +1 -0
  210. package/dist/commands/doctor.js +191 -0
  211. package/dist/commands/doctor.js.map +1 -0
  212. package/dist/commands/edit-cmd.d.ts +26 -0
  213. package/dist/commands/edit-cmd.d.ts.map +1 -0
  214. package/dist/commands/edit-cmd.js +870 -0
  215. package/dist/commands/edit-cmd.js.map +1 -0
  216. package/dist/commands/export.d.ts +39 -0
  217. package/dist/commands/export.d.ts.map +1 -0
  218. package/dist/commands/export.js +730 -0
  219. package/dist/commands/export.js.map +1 -0
  220. package/dist/commands/generate.d.ts +25 -0
  221. package/dist/commands/generate.d.ts.map +1 -0
  222. package/dist/commands/generate.js +1885 -0
  223. package/dist/commands/generate.js.map +1 -0
  224. package/dist/commands/media.d.ts +3 -0
  225. package/dist/commands/media.d.ts.map +1 -0
  226. package/dist/commands/media.js +165 -0
  227. package/dist/commands/media.js.map +1 -0
  228. package/dist/commands/output.d.ts +45 -0
  229. package/dist/commands/output.d.ts.map +1 -0
  230. package/dist/commands/output.js +122 -0
  231. package/dist/commands/output.js.map +1 -0
  232. package/dist/commands/pipeline.d.ts +19 -0
  233. package/dist/commands/pipeline.d.ts.map +1 -0
  234. package/dist/commands/pipeline.js +345 -0
  235. package/dist/commands/pipeline.js.map +1 -0
  236. package/dist/commands/project.d.ts +3 -0
  237. package/dist/commands/project.d.ts.map +1 -0
  238. package/dist/commands/project.js +139 -0
  239. package/dist/commands/project.js.map +1 -0
  240. package/dist/commands/project.test.d.ts +2 -0
  241. package/dist/commands/project.test.d.ts.map +1 -0
  242. package/dist/commands/project.test.js +105 -0
  243. package/dist/commands/project.test.js.map +1 -0
  244. package/dist/commands/sanitize.d.ts +21 -0
  245. package/dist/commands/sanitize.d.ts.map +1 -0
  246. package/dist/commands/sanitize.js +56 -0
  247. package/dist/commands/sanitize.js.map +1 -0
  248. package/dist/commands/schema.d.ts +11 -0
  249. package/dist/commands/schema.d.ts.map +1 -0
  250. package/dist/commands/schema.js +101 -0
  251. package/dist/commands/schema.js.map +1 -0
  252. package/dist/commands/setup.d.ts +6 -0
  253. package/dist/commands/setup.d.ts.map +1 -0
  254. package/dist/commands/setup.js +440 -0
  255. package/dist/commands/setup.js.map +1 -0
  256. package/dist/commands/timeline.d.ts +3 -0
  257. package/dist/commands/timeline.d.ts.map +1 -0
  258. package/dist/commands/timeline.js +469 -0
  259. package/dist/commands/timeline.js.map +1 -0
  260. package/dist/commands/timeline.test.d.ts +2 -0
  261. package/dist/commands/timeline.test.d.ts.map +1 -0
  262. package/dist/commands/timeline.test.js +320 -0
  263. package/dist/commands/timeline.test.js.map +1 -0
  264. package/dist/commands/validate.d.ts +32 -0
  265. package/dist/commands/validate.d.ts.map +1 -0
  266. package/dist/commands/validate.js +63 -0
  267. package/dist/commands/validate.js.map +1 -0
  268. package/dist/config/config.test.d.ts +2 -0
  269. package/dist/config/config.test.d.ts.map +1 -0
  270. package/dist/config/config.test.js +164 -0
  271. package/dist/config/config.test.js.map +1 -0
  272. package/dist/config/index.d.ts +35 -0
  273. package/dist/config/index.d.ts.map +1 -0
  274. package/dist/config/index.js +101 -0
  275. package/dist/config/index.js.map +1 -0
  276. package/dist/config/schema.d.ts +43 -0
  277. package/dist/config/schema.d.ts.map +1 -0
  278. package/dist/config/schema.js +42 -0
  279. package/dist/config/schema.js.map +1 -0
  280. package/dist/engine/index.d.ts +3 -0
  281. package/dist/engine/index.d.ts.map +1 -0
  282. package/dist/engine/index.js +2 -0
  283. package/dist/engine/index.js.map +1 -0
  284. package/dist/engine/project.d.ts +84 -0
  285. package/dist/engine/project.d.ts.map +1 -0
  286. package/dist/engine/project.js +355 -0
  287. package/dist/engine/project.js.map +1 -0
  288. package/dist/engine/project.test.d.ts +2 -0
  289. package/dist/engine/project.test.d.ts.map +1 -0
  290. package/dist/engine/project.test.js +599 -0
  291. package/dist/engine/project.test.js.map +1 -0
  292. package/dist/index.d.ts +7 -0
  293. package/dist/index.d.ts.map +1 -0
  294. package/dist/index.js +131 -0
  295. package/dist/index.js.map +1 -0
  296. package/dist/utils/api-key.d.ts +36 -0
  297. package/dist/utils/api-key.d.ts.map +1 -0
  298. package/dist/utils/api-key.js +211 -0
  299. package/dist/utils/api-key.js.map +1 -0
  300. package/dist/utils/api-key.test.d.ts +2 -0
  301. package/dist/utils/api-key.test.d.ts.map +1 -0
  302. package/dist/utils/api-key.test.js +35 -0
  303. package/dist/utils/api-key.test.js.map +1 -0
  304. package/dist/utils/audio.d.ts +23 -0
  305. package/dist/utils/audio.d.ts.map +1 -0
  306. package/dist/utils/audio.js +79 -0
  307. package/dist/utils/audio.js.map +1 -0
  308. package/dist/utils/exec-safe.d.ts +22 -0
  309. package/dist/utils/exec-safe.d.ts.map +1 -0
  310. package/dist/utils/exec-safe.js +62 -0
  311. package/dist/utils/exec-safe.js.map +1 -0
  312. package/dist/utils/first-run.d.ts +13 -0
  313. package/dist/utils/first-run.d.ts.map +1 -0
  314. package/dist/utils/first-run.js +48 -0
  315. package/dist/utils/first-run.js.map +1 -0
  316. package/dist/utils/provider-resolver.d.ts +15 -0
  317. package/dist/utils/provider-resolver.d.ts.map +1 -0
  318. package/dist/utils/provider-resolver.js +42 -0
  319. package/dist/utils/provider-resolver.js.map +1 -0
  320. package/dist/utils/remotion.d.ts +210 -0
  321. package/dist/utils/remotion.d.ts.map +1 -0
  322. package/dist/utils/remotion.js +731 -0
  323. package/dist/utils/remotion.js.map +1 -0
  324. package/dist/utils/subtitle.d.ts +65 -0
  325. package/dist/utils/subtitle.d.ts.map +1 -0
  326. package/dist/utils/subtitle.js +135 -0
  327. package/dist/utils/subtitle.js.map +1 -0
  328. package/dist/utils/subtitle.test.d.ts +2 -0
  329. package/dist/utils/subtitle.test.d.ts.map +1 -0
  330. package/dist/utils/subtitle.test.js +175 -0
  331. package/dist/utils/subtitle.test.js.map +1 -0
  332. package/dist/utils/tty.d.ts +45 -0
  333. package/dist/utils/tty.d.ts.map +1 -0
  334. package/dist/utils/tty.js +172 -0
  335. package/dist/utils/tty.js.map +1 -0
  336. package/package.json +102 -0
  337. package/src/agent/adapters/claude.ts +143 -0
  338. package/src/agent/adapters/gemini.ts +159 -0
  339. package/src/agent/adapters/index.ts +61 -0
  340. package/src/agent/adapters/ollama.ts +231 -0
  341. package/src/agent/adapters/openai.ts +116 -0
  342. package/src/agent/adapters/xai.ts +119 -0
  343. package/src/agent/index.ts +251 -0
  344. package/src/agent/memory/index.ts +151 -0
  345. package/src/agent/prompts/system.ts +106 -0
  346. package/src/agent/tools/ai-editing.ts +845 -0
  347. package/src/agent/tools/ai-generation.ts +1073 -0
  348. package/src/agent/tools/ai-pipeline.ts +1055 -0
  349. package/src/agent/tools/ai.ts +21 -0
  350. package/src/agent/tools/batch.ts +429 -0
  351. package/src/agent/tools/e2e.test.ts +545 -0
  352. package/src/agent/tools/export.ts +184 -0
  353. package/src/agent/tools/filesystem.ts +237 -0
  354. package/src/agent/tools/index.ts +150 -0
  355. package/src/agent/tools/integration.test.ts +775 -0
  356. package/src/agent/tools/media.ts +697 -0
  357. package/src/agent/tools/project.ts +313 -0
  358. package/src/agent/tools/timeline.ts +951 -0
  359. package/src/agent/types.ts +68 -0
  360. package/src/commands/agent.ts +340 -0
  361. package/src/commands/ai-analyze.ts +429 -0
  362. package/src/commands/ai-animated-caption.ts +390 -0
  363. package/src/commands/ai-audio.ts +941 -0
  364. package/src/commands/ai-broll.ts +490 -0
  365. package/src/commands/ai-edit-cli.ts +658 -0
  366. package/src/commands/ai-edit.ts +1542 -0
  367. package/src/commands/ai-fill-gaps.ts +566 -0
  368. package/src/commands/ai-helpers.ts +65 -0
  369. package/src/commands/ai-highlights.ts +1303 -0
  370. package/src/commands/ai-image.ts +761 -0
  371. package/src/commands/ai-motion.ts +347 -0
  372. package/src/commands/ai-narrate.ts +451 -0
  373. package/src/commands/ai-review.ts +309 -0
  374. package/src/commands/ai-script-pipeline-cli.ts +1710 -0
  375. package/src/commands/ai-script-pipeline.ts +1365 -0
  376. package/src/commands/ai-suggest-edit.ts +264 -0
  377. package/src/commands/ai-video-fx.ts +445 -0
  378. package/src/commands/ai-video.ts +915 -0
  379. package/src/commands/ai-viral.ts +595 -0
  380. package/src/commands/ai-visual-fx.ts +601 -0
  381. package/src/commands/ai.test.ts +627 -0
  382. package/src/commands/ai.ts +307 -0
  383. package/src/commands/analyze.ts +282 -0
  384. package/src/commands/audio.ts +644 -0
  385. package/src/commands/batch.test.ts +279 -0
  386. package/src/commands/batch.ts +440 -0
  387. package/src/commands/detect.ts +329 -0
  388. package/src/commands/doctor.ts +237 -0
  389. package/src/commands/edit-cmd.ts +1014 -0
  390. package/src/commands/export.ts +918 -0
  391. package/src/commands/generate.ts +2146 -0
  392. package/src/commands/media.ts +177 -0
  393. package/src/commands/output.ts +142 -0
  394. package/src/commands/pipeline.ts +398 -0
  395. package/src/commands/project.test.ts +127 -0
  396. package/src/commands/project.ts +149 -0
  397. package/src/commands/sanitize.ts +60 -0
  398. package/src/commands/schema.ts +130 -0
  399. package/src/commands/setup.ts +509 -0
  400. package/src/commands/timeline.test.ts +499 -0
  401. package/src/commands/timeline.ts +529 -0
  402. package/src/commands/validate.ts +77 -0
  403. package/src/config/config.test.ts +197 -0
  404. package/src/config/index.ts +125 -0
  405. package/src/config/schema.ts +82 -0
  406. package/src/engine/index.ts +2 -0
  407. package/src/engine/project.test.ts +702 -0
  408. package/src/engine/project.ts +439 -0
  409. package/src/index.ts +146 -0
  410. package/src/utils/api-key.test.ts +41 -0
  411. package/src/utils/api-key.ts +247 -0
  412. package/src/utils/audio.ts +83 -0
  413. package/src/utils/exec-safe.ts +75 -0
  414. package/src/utils/first-run.ts +52 -0
  415. package/src/utils/provider-resolver.ts +56 -0
  416. package/src/utils/remotion.ts +951 -0
  417. package/src/utils/subtitle.test.ts +227 -0
  418. package/src/utils/subtitle.ts +169 -0
  419. package/src/utils/tty.ts +196 -0
  420. package/tsconfig.json +20 -0
@@ -0,0 +1,545 @@
1
+ /**
2
+ * E2E Tests: AI Pipeline Tools with Real API Calls
3
+ *
4
+ * āš ļø WARNING: These tests make REAL API calls and incur COSTS!
5
+ *
6
+ * To run these tests:
7
+ * RUN_E2E=1 pnpm vitest run src/agent/tools/e2e.test.ts
8
+ *
9
+ * Required API keys (set in ~/.vibeframe/config.yaml or env):
10
+ * - ANTHROPIC_API_KEY (Claude - storyboard)
11
+ * - GOOGLE_API_KEY (Gemini - image, video analysis)
12
+ * - OPENAI_API_KEY (Whisper - transcription)
13
+ * - ELEVENLABS_API_KEY (TTS)
14
+ *
15
+ * Estimated costs per full run:
16
+ * - ai_gemini_video: ~$0.01-0.05 (depending on video length)
17
+ * - ai_storyboard: ~$0.01-0.02
18
+ * - ai_image (gemini): Free tier available
19
+ * - ai_tts: ~$0.01-0.05 (depending on text length)
20
+ * - ai_script_to_video (images-only): ~$0.05-0.20
21
+ * - ai_highlights (with Gemini): ~$0.05-0.20
22
+ *
23
+ * Total estimated cost: $0.10-0.50 per full run
24
+ */
25
+
26
+ import { describe, it, expect, beforeAll, afterAll } from "vitest";
27
+ import { existsSync, mkdirSync } from "node:fs";
28
+ import { resolve, join } from "node:path";
29
+ import { execSync } from "node:child_process";
30
+ import { ToolRegistry } from "./index.js";
31
+ import { registerAITools } from "./ai.js";
32
+ import type { AgentContext } from "../types.js";
33
+
34
+ // Skip all tests unless RUN_E2E is set
35
+ const RUN_E2E = process.env.RUN_E2E === "1" || process.env.RUN_E2E === "true";
36
+
37
+ // Test output directory
38
+ const TEST_OUTPUT_DIR = resolve(process.cwd(), ".e2e-test-output");
39
+
40
+ // Mock context for tool execution
41
+ const createContext = (subdir?: string): AgentContext => ({
42
+ workingDirectory: subdir ? join(TEST_OUTPUT_DIR, subdir) : TEST_OUTPUT_DIR,
43
+ projectPath: null,
44
+ });
45
+
46
+ // Check if required API keys are available
47
+ function checkApiKey(keyName: string): boolean {
48
+ // Check environment
49
+ if (process.env[keyName]) return true;
50
+
51
+ // Check config file
52
+ try {
53
+ const configPath = resolve(
54
+ process.env.HOME || "~",
55
+ ".vibeframe",
56
+ "config.yaml"
57
+ );
58
+ if (existsSync(configPath)) {
59
+ const content = execSync(`cat "${configPath}"`, { encoding: "utf-8" });
60
+ const keyMapping: Record<string, string> = {
61
+ GOOGLE_API_KEY: "google:",
62
+ ANTHROPIC_API_KEY: "anthropic:",
63
+ OPENAI_API_KEY: "openai:",
64
+ ELEVENLABS_API_KEY: "elevenlabs:",
65
+ };
66
+ if (keyMapping[keyName] && content.includes(keyMapping[keyName])) {
67
+ return true;
68
+ }
69
+ }
70
+ } catch {
71
+ // Ignore errors
72
+ }
73
+ return false;
74
+ }
75
+
76
+ // Print cost warning
77
+ function printCostWarning() {
78
+ console.log("\n");
79
+ console.log("āš ļø ═══════════════════════════════════════════════════════════");
80
+ console.log("āš ļø E2E TESTS - REAL API CALLS - COSTS WILL BE INCURRED");
81
+ console.log("āš ļø ═══════════════════════════════════════════════════════════");
82
+ console.log("āš ļø Estimated cost: $0.10-0.50 per full run");
83
+ console.log("āš ļø ═══════════════════════════════════════════════════════════");
84
+ console.log("\n");
85
+ }
86
+
87
+ describe.skipIf(!RUN_E2E)("E2E: AI Pipeline Tools", () => {
88
+ let registry: ToolRegistry;
89
+
90
+ beforeAll(() => {
91
+ printCostWarning();
92
+
93
+ // Setup registry
94
+ registry = new ToolRegistry();
95
+ registerAITools(registry);
96
+
97
+ // Create test output directory
98
+ if (!existsSync(TEST_OUTPUT_DIR)) {
99
+ mkdirSync(TEST_OUTPUT_DIR, { recursive: true });
100
+ }
101
+
102
+ console.log(`šŸ“ Test output directory: ${TEST_OUTPUT_DIR}`);
103
+ });
104
+
105
+ afterAll(() => {
106
+ console.log("\n");
107
+ console.log("āœ… E2E tests completed");
108
+ console.log(`šŸ“ Output files saved to: ${TEST_OUTPUT_DIR}`);
109
+ console.log("šŸ’” Run 'rm -rf .e2e-test-output' to clean up");
110
+ console.log("\n");
111
+ });
112
+
113
+ describe("analyze_video", () => {
114
+ const hasKey = checkApiKey("GOOGLE_API_KEY");
115
+
116
+ it.skipIf(!hasKey)(
117
+ "analyzes a sample video with Gemini",
118
+ async () => {
119
+ console.log("\nšŸŽ¬ Testing ai_gemini_video...");
120
+
121
+ // Create a simple test video using FFmpeg
122
+ const testVideoPath = join(TEST_OUTPUT_DIR, "test-video.mp4");
123
+
124
+ if (!existsSync(testVideoPath)) {
125
+ console.log(" Creating test video with FFmpeg...");
126
+ try {
127
+ execSync(
128
+ `ffmpeg -f lavfi -i color=c=blue:s=320x240:d=3 -f lavfi -i anullsrc=r=44100:cl=stereo -t 3 -c:v libx264 -c:a aac "${testVideoPath}" -y`,
129
+ { stdio: "pipe" }
130
+ );
131
+ } catch {
132
+ console.log(" āš ļø FFmpeg not available, skipping video creation");
133
+ return;
134
+ }
135
+ }
136
+
137
+ const handler = registry.getHandler("analyze_video");
138
+ expect(handler).toBeDefined();
139
+
140
+ const result = await handler!(
141
+ {
142
+ source: testVideoPath,
143
+ prompt: "Describe what you see in this video in one sentence.",
144
+ model: "flash",
145
+ },
146
+ createContext()
147
+ );
148
+
149
+ console.log(` Result: ${result.success ? "āœ…" : "āŒ"}`);
150
+ if (result.success) {
151
+ console.log(` Response: ${result.output.substring(0, 100)}...`);
152
+ } else {
153
+ console.log(` Error: ${result.error}`);
154
+ }
155
+
156
+ expect(result.success).toBe(true);
157
+ expect(result.output).toBeTruthy();
158
+ },
159
+ 60000 // 60s timeout
160
+ );
161
+
162
+ it.skipIf(!hasKey)(
163
+ "handles YouTube URL",
164
+ async () => {
165
+ console.log("\nšŸŽ¬ Testing ai_gemini_video with YouTube URL...");
166
+
167
+ const handler = registry.getHandler("analyze_video");
168
+
169
+ // Use a short, public domain video
170
+ const result = await handler!(
171
+ {
172
+ source: "https://www.youtube.com/watch?v=jNQXAC9IVRw", // "Me at the zoo" - first YouTube video
173
+ prompt: "What is shown in this video? Answer in one sentence.",
174
+ model: "flash",
175
+ },
176
+ createContext()
177
+ );
178
+
179
+ console.log(` Result: ${result.success ? "āœ…" : "āŒ"}`);
180
+ if (result.success) {
181
+ console.log(` Response: ${result.output.substring(0, 100)}...`);
182
+ } else {
183
+ console.log(` Error: ${result.error}`);
184
+ }
185
+
186
+ // YouTube support may vary, so we just check it doesn't crash
187
+ expect(result).toBeDefined();
188
+ },
189
+ 120000 // 120s timeout for YouTube
190
+ );
191
+ });
192
+
193
+ describe("generate_storyboard", () => {
194
+ const hasKey = checkApiKey("ANTHROPIC_API_KEY");
195
+
196
+ it.skipIf(!hasKey)(
197
+ "generates storyboard from script",
198
+ async () => {
199
+ console.log("\nšŸ“ Testing ai_storyboard...");
200
+
201
+ const handler = registry.getHandler("generate_storyboard");
202
+ expect(handler).toBeDefined();
203
+
204
+ const result = await handler!(
205
+ {
206
+ script: "A robot learns to dance. First awkward moves, then graceful spins.",
207
+ targetDuration: 10,
208
+ output: "test-storyboard.json",
209
+ },
210
+ createContext()
211
+ );
212
+
213
+ console.log(` Result: ${result.success ? "āœ…" : "āŒ"}`);
214
+ if (result.success) {
215
+ console.log(` Output: ${result.output.substring(0, 150)}...`);
216
+ } else {
217
+ console.log(` Error: ${result.error}`);
218
+ }
219
+
220
+ expect(result.success).toBe(true);
221
+ },
222
+ 60000
223
+ );
224
+ });
225
+
226
+ describe("generate_image", () => {
227
+ const hasGeminiKey = checkApiKey("GOOGLE_API_KEY");
228
+
229
+ it.skipIf(!hasGeminiKey)(
230
+ "generates image with Gemini",
231
+ async () => {
232
+ console.log("\nšŸ–¼ļø Testing ai_image (Gemini)...");
233
+
234
+ const handler = registry.getHandler("generate_image");
235
+ expect(handler).toBeDefined();
236
+
237
+ const result = await handler!(
238
+ {
239
+ prompt: "A simple blue square on white background",
240
+ output: "test-image-gemini.png",
241
+ provider: "gemini",
242
+ },
243
+ createContext()
244
+ );
245
+
246
+ console.log(` Result: ${result.success ? "āœ…" : "āŒ"}`);
247
+ if (result.success) {
248
+ console.log(` Output: ${result.output}`);
249
+ const imagePath = join(TEST_OUTPUT_DIR, "test-image-gemini.png");
250
+ console.log(` File exists: ${existsSync(imagePath)}`);
251
+ } else {
252
+ console.log(` Error: ${result.error}`);
253
+ }
254
+
255
+ expect(result.success).toBe(true);
256
+ },
257
+ 60000
258
+ );
259
+ });
260
+
261
+ describe("generate_speech", () => {
262
+ const hasKey = checkApiKey("ELEVENLABS_API_KEY");
263
+
264
+ it.skipIf(!hasKey)(
265
+ "generates speech from text",
266
+ async () => {
267
+ console.log("\nšŸŽ™ļø Testing ai_tts...");
268
+
269
+ const handler = registry.getHandler("generate_speech");
270
+ expect(handler).toBeDefined();
271
+
272
+ const result = await handler!(
273
+ {
274
+ text: "Hello, this is a test of the text to speech system.",
275
+ output: "test-tts.mp3",
276
+ },
277
+ createContext()
278
+ );
279
+
280
+ console.log(` Result: ${result.success ? "āœ…" : "āŒ"}`);
281
+ if (result.success) {
282
+ console.log(` Output: ${result.output}`);
283
+ const audioPath = join(TEST_OUTPUT_DIR, "test-tts.mp3");
284
+ console.log(` File exists: ${existsSync(audioPath)}`);
285
+ } else {
286
+ console.log(` Error: ${result.error}`);
287
+ }
288
+
289
+ expect(result.success).toBe(true);
290
+ },
291
+ 30000
292
+ );
293
+ });
294
+
295
+ describe("generate_sound_effect", () => {
296
+ const hasKey = checkApiKey("ELEVENLABS_API_KEY");
297
+
298
+ it.skipIf(!hasKey)(
299
+ "generates sound effect",
300
+ async () => {
301
+ console.log("\nšŸ”Š Testing ai_sfx...");
302
+
303
+ const handler = registry.getHandler("generate_sound_effect");
304
+ expect(handler).toBeDefined();
305
+
306
+ const result = await handler!(
307
+ {
308
+ prompt: "short beep notification sound",
309
+ output: "test-sfx.mp3",
310
+ duration: 1,
311
+ },
312
+ createContext()
313
+ );
314
+
315
+ console.log(` Result: ${result.success ? "āœ…" : "āŒ"}`);
316
+ if (result.success) {
317
+ console.log(` Output: ${result.output}`);
318
+ } else {
319
+ console.log(` Error: ${result.error}`);
320
+ }
321
+
322
+ expect(result.success).toBe(true);
323
+ },
324
+ 30000
325
+ );
326
+ });
327
+
328
+ describe("pipeline_script_to_video (images-only)", () => {
329
+ const hasClaudeKey = checkApiKey("ANTHROPIC_API_KEY");
330
+ const hasGeminiKey = checkApiKey("GOOGLE_API_KEY");
331
+ const hasTTSKey = checkApiKey("ELEVENLABS_API_KEY");
332
+
333
+ it.skipIf(!hasClaudeKey || !hasGeminiKey)(
334
+ "generates images from script (no video, no voiceover)",
335
+ async () => {
336
+ console.log("\nšŸŽ¬ Testing ai_script_to_video (images-only)...");
337
+ console.log(" āš ļø This test may take 1-2 minutes");
338
+
339
+ // Create subdirectory for this test
340
+ const outputDir = join(TEST_OUTPUT_DIR, "script-to-video-test");
341
+ if (!existsSync(outputDir)) {
342
+ mkdirSync(outputDir, { recursive: true });
343
+ }
344
+
345
+ const handler = registry.getHandler("pipeline_script_to_video");
346
+ expect(handler).toBeDefined();
347
+
348
+ const result = await handler!(
349
+ {
350
+ script: "A sunrise over mountains. Birds flying in the sky.",
351
+ outputDir: "script-to-video-test",
352
+ imageProvider: "gemini",
353
+ imagesOnly: true,
354
+ noVoiceover: true,
355
+ },
356
+ createContext()
357
+ );
358
+
359
+ console.log(` Result: ${result.success ? "āœ…" : "āŒ"}`);
360
+ if (result.success) {
361
+ console.log(` Output: ${result.output.substring(0, 200)}...`);
362
+
363
+ // Check if files were created
364
+ const storyboardPath = join(outputDir, "storyboard.json");
365
+ console.log(` Storyboard exists: ${existsSync(storyboardPath)}`);
366
+ } else {
367
+ console.log(` Error: ${result.error}`);
368
+ }
369
+
370
+ expect(result.success).toBe(true);
371
+ },
372
+ 180000 // 3 minutes timeout
373
+ );
374
+
375
+ it.skipIf(!hasClaudeKey || !hasGeminiKey || !hasTTSKey)(
376
+ "generates images with voiceover (no video)",
377
+ async () => {
378
+ console.log("\nšŸŽ¬ Testing ai_script_to_video (images + voiceover)...");
379
+ console.log(" āš ļø This test may take 2-3 minutes");
380
+
381
+ const outputDir = join(TEST_OUTPUT_DIR, "script-to-video-with-tts");
382
+ if (!existsSync(outputDir)) {
383
+ mkdirSync(outputDir, { recursive: true });
384
+ }
385
+
386
+ const handler = registry.getHandler("pipeline_script_to_video");
387
+
388
+ const result = await handler!(
389
+ {
390
+ script: "Welcome to our demo. This is amazing technology.",
391
+ outputDir: "script-to-video-with-tts",
392
+ imageProvider: "gemini",
393
+ imagesOnly: true,
394
+ // voiceover enabled by default
395
+ },
396
+ createContext()
397
+ );
398
+
399
+ console.log(` Result: ${result.success ? "āœ…" : "āŒ"}`);
400
+ if (result.success) {
401
+ console.log(` Output: ${result.output.substring(0, 200)}...`);
402
+ } else {
403
+ console.log(` Error: ${result.error}`);
404
+ }
405
+
406
+ expect(result.success).toBe(true);
407
+ },
408
+ 300000 // 5 minutes timeout
409
+ );
410
+ });
411
+
412
+ describe("pipeline_highlights (with Gemini)", () => {
413
+ const hasGeminiKey = checkApiKey("GOOGLE_API_KEY");
414
+
415
+ it.skipIf(!hasGeminiKey)(
416
+ "extracts highlights from video using Gemini",
417
+ async () => {
418
+ console.log("\nšŸŽÆ Testing ai_highlights (Gemini)...");
419
+
420
+ // Create test video with FFmpeg
421
+ const testVideoPath = join(TEST_OUTPUT_DIR, "test-highlights-video.mp4");
422
+
423
+ if (!existsSync(testVideoPath)) {
424
+ console.log(" Creating 10s test video with FFmpeg...");
425
+ try {
426
+ // Create a 10 second video with changing colors
427
+ execSync(
428
+ `ffmpeg -f lavfi -i "color=c=red:s=320x240:d=3,format=yuv420p[v0];` +
429
+ `color=c=green:s=320x240:d=4,format=yuv420p[v1];` +
430
+ `color=c=blue:s=320x240:d=3,format=yuv420p[v2];` +
431
+ `[v0][v1][v2]concat=n=3:v=1:a=0" ` +
432
+ `-f lavfi -i anullsrc=r=44100:cl=stereo -t 10 ` +
433
+ `-c:v libx264 -c:a aac "${testVideoPath}" -y`,
434
+ { stdio: "pipe" }
435
+ );
436
+ } catch {
437
+ console.log(" āš ļø FFmpeg not available, skipping");
438
+ return;
439
+ }
440
+ }
441
+
442
+ const handler = registry.getHandler("pipeline_highlights");
443
+ expect(handler).toBeDefined();
444
+
445
+ const result = await handler!(
446
+ {
447
+ media: testVideoPath,
448
+ useGemini: true,
449
+ count: 2,
450
+ criteria: "all",
451
+ },
452
+ createContext()
453
+ );
454
+
455
+ console.log(` Result: ${result.success ? "āœ…" : "āŒ"}`);
456
+ if (result.success) {
457
+ console.log(` Output: ${result.output.substring(0, 200)}...`);
458
+ } else {
459
+ console.log(` Error: ${result.error}`);
460
+ }
461
+
462
+ // May not find highlights in simple test video, but should not error
463
+ expect(result.success).toBe(true);
464
+ },
465
+ 120000
466
+ );
467
+ });
468
+
469
+ describe("pipeline_auto_shorts (analyze-only)", () => {
470
+ const hasGeminiKey = checkApiKey("GOOGLE_API_KEY");
471
+
472
+ it.skipIf(!hasGeminiKey)(
473
+ "analyzes video for shorts (no generation)",
474
+ async () => {
475
+ console.log("\nšŸ“± Testing ai_auto_shorts (analyze-only)...");
476
+
477
+ const testVideoPath = join(TEST_OUTPUT_DIR, "test-highlights-video.mp4");
478
+
479
+ // Reuse video from highlights test or create if needed
480
+ if (!existsSync(testVideoPath)) {
481
+ console.log(" Creating test video...");
482
+ try {
483
+ execSync(
484
+ `ffmpeg -f lavfi -i color=c=blue:s=320x240:d=10 -f lavfi -i anullsrc=r=44100:cl=stereo -t 10 -c:v libx264 -c:a aac "${testVideoPath}" -y`,
485
+ { stdio: "pipe" }
486
+ );
487
+ } catch {
488
+ console.log(" āš ļø FFmpeg not available, skipping");
489
+ return;
490
+ }
491
+ }
492
+
493
+ const handler = registry.getHandler("pipeline_auto_shorts");
494
+ expect(handler).toBeDefined();
495
+
496
+ const result = await handler!(
497
+ {
498
+ video: testVideoPath,
499
+ analyzeOnly: true,
500
+ useGemini: true,
501
+ count: 1,
502
+ },
503
+ createContext()
504
+ );
505
+
506
+ console.log(` Result: ${result.success ? "āœ…" : "āŒ"}`);
507
+ if (result.success) {
508
+ console.log(` Output: ${result.output.substring(0, 200)}...`);
509
+ } else {
510
+ console.log(` Error: ${result.error}`);
511
+ }
512
+
513
+ expect(result.success).toBe(true);
514
+ },
515
+ 120000
516
+ );
517
+ });
518
+ });
519
+
520
+ // Summary test to show what was tested
521
+ describe.skipIf(!RUN_E2E)("E2E Summary", () => {
522
+ it("prints API key status", () => {
523
+ console.log("\n");
524
+ console.log("šŸ“Š API Key Status:");
525
+ console.log("─".repeat(50));
526
+
527
+ const keys = [
528
+ { name: "GOOGLE_API_KEY", desc: "Gemini (image, video)" },
529
+ { name: "ANTHROPIC_API_KEY", desc: "Claude (storyboard)" },
530
+ { name: "OPENAI_API_KEY", desc: "Whisper (transcription)" },
531
+ { name: "ELEVENLABS_API_KEY", desc: "TTS, SFX" },
532
+ { name: "RUNWAY_API_SECRET", desc: "Video generation" },
533
+ { name: "KLING_API_KEY", desc: "Video generation" },
534
+ ];
535
+
536
+ for (const key of keys) {
537
+ const hasKey = checkApiKey(key.name);
538
+ const status = hasKey ? "āœ…" : "āŒ";
539
+ console.log(` ${status} ${key.name.padEnd(25)} - ${key.desc}`);
540
+ }
541
+
542
+ console.log("─".repeat(50));
543
+ console.log("\n");
544
+ });
545
+ });