@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,184 @@
1
+ /**
2
+ * Export Tools - Export projects to video, audio, or subtitles
3
+ */
4
+
5
+ import { resolve, basename } from "node:path";
6
+ import type { ToolRegistry, ToolHandler } from "./index.js";
7
+ import type { ToolDefinition, ToolResult } from "../types.js";
8
+ import { runExport } from "../../commands/export.js";
9
+
10
+ // Tool Definitions
11
+ const exportVideoDef: ToolDefinition = {
12
+ name: "export_video",
13
+ description: "Export a project to a video file",
14
+ parameters: {
15
+ type: "object",
16
+ properties: {
17
+ project: {
18
+ type: "string",
19
+ description: "Project file path",
20
+ },
21
+ output: {
22
+ type: "string",
23
+ description: "Output video file path",
24
+ },
25
+ format: {
26
+ type: "string",
27
+ description: "Output format (mp4, webm, mov)",
28
+ enum: ["mp4", "webm", "mov"],
29
+ },
30
+ preset: {
31
+ type: "string",
32
+ description: "Quality preset (draft, standard, high, ultra)",
33
+ enum: ["draft", "standard", "high", "ultra"],
34
+ },
35
+ overwrite: {
36
+ type: "boolean",
37
+ description: "Overwrite existing file",
38
+ },
39
+ },
40
+ required: ["project"],
41
+ },
42
+ };
43
+
44
+ const exportAudioDef: ToolDefinition = {
45
+ name: "export_audio",
46
+ description: "Export audio track from a project",
47
+ parameters: {
48
+ type: "object",
49
+ properties: {
50
+ project: {
51
+ type: "string",
52
+ description: "Project file path",
53
+ },
54
+ output: {
55
+ type: "string",
56
+ description: "Output audio file path",
57
+ },
58
+ format: {
59
+ type: "string",
60
+ description: "Output format (mp3, wav, aac)",
61
+ enum: ["mp3", "wav", "aac"],
62
+ },
63
+ },
64
+ required: ["project"],
65
+ },
66
+ };
67
+
68
+ const exportSubtitlesDef: ToolDefinition = {
69
+ name: "export_subtitles",
70
+ description: "Export subtitles from transcription",
71
+ parameters: {
72
+ type: "object",
73
+ properties: {
74
+ project: {
75
+ type: "string",
76
+ description: "Project file path",
77
+ },
78
+ output: {
79
+ type: "string",
80
+ description: "Output subtitle file path",
81
+ },
82
+ format: {
83
+ type: "string",
84
+ description: "Subtitle format (srt, vtt)",
85
+ enum: ["srt", "vtt"],
86
+ },
87
+ },
88
+ required: ["project"],
89
+ },
90
+ };
91
+
92
+ // Tool Handlers
93
+ const exportVideo: ToolHandler = async (args, context): Promise<ToolResult> => {
94
+ const projectPath = args.project as string;
95
+ const format = (args.format as string) || "mp4";
96
+ const preset = (args.preset as "draft" | "standard" | "high" | "ultra") || "standard";
97
+ const overwrite = (args.overwrite as boolean) || false;
98
+
99
+ // Determine output path
100
+ const output = (args.output as string) ||
101
+ `${basename(projectPath, ".vibe.json")}.${format}`;
102
+
103
+ const absProjectPath = resolve(context.workingDirectory, projectPath);
104
+ const absOutputPath = resolve(context.workingDirectory, output);
105
+
106
+ try {
107
+ const result = await runExport(absProjectPath, absOutputPath, {
108
+ format: format as "mp4" | "webm" | "mov",
109
+ preset,
110
+ overwrite,
111
+ });
112
+
113
+ if (!result.success) {
114
+ return {
115
+ toolCallId: "",
116
+ success: false,
117
+ output: "",
118
+ error: result.message,
119
+ };
120
+ }
121
+
122
+ return {
123
+ toolCallId: "",
124
+ success: true,
125
+ output: `Video exported: ${output}\nFormat: ${format}\nPreset: ${preset}`,
126
+ };
127
+ } catch (error) {
128
+ return {
129
+ toolCallId: "",
130
+ success: false,
131
+ output: "",
132
+ error: `Failed to export video: ${error instanceof Error ? error.message : String(error)}`,
133
+ };
134
+ }
135
+ };
136
+
137
+ const exportAudio: ToolHandler = async (_args, _context): Promise<ToolResult> => {
138
+
139
+ try {
140
+ // Audio export would be implemented similarly to video export
141
+ // For now, provide a helpful message
142
+ return {
143
+ toolCallId: "",
144
+ success: false,
145
+ output: "",
146
+ error: "Audio-only export not yet implemented. Use export_video and extract audio with FFmpeg: ffmpeg -i video.mp4 -vn -acodec mp3 audio.mp3",
147
+ };
148
+ } catch (error) {
149
+ return {
150
+ toolCallId: "",
151
+ success: false,
152
+ output: "",
153
+ error: `Failed to export audio: ${error instanceof Error ? error.message : String(error)}`,
154
+ };
155
+ }
156
+ };
157
+
158
+ const exportSubtitles: ToolHandler = async (_args, _context): Promise<ToolResult> => {
159
+
160
+ try {
161
+ // Subtitle export would extract transcription data from project
162
+ // For now, provide a helpful message
163
+ return {
164
+ toolCallId: "",
165
+ success: false,
166
+ output: "",
167
+ error: "Subtitle export not yet implemented. Use ai_transcribe to generate subtitles from audio: ai_transcribe audio.mp3 --output subtitles.srt",
168
+ };
169
+ } catch (error) {
170
+ return {
171
+ toolCallId: "",
172
+ success: false,
173
+ output: "",
174
+ error: `Failed to export subtitles: ${error instanceof Error ? error.message : String(error)}`,
175
+ };
176
+ }
177
+ };
178
+
179
+ // Registration function
180
+ export function registerExportTools(registry: ToolRegistry): void {
181
+ registry.register(exportVideoDef, exportVideo);
182
+ registry.register(exportAudioDef, exportAudio);
183
+ registry.register(exportSubtitlesDef, exportSubtitles);
184
+ }
@@ -0,0 +1,237 @@
1
+ /**
2
+ * Filesystem Tools - List, read, write, and check files
3
+ */
4
+
5
+ import { readFile, writeFile, readdir, stat, access } from "node:fs/promises";
6
+ import { resolve, join } from "node:path";
7
+ import type { ToolRegistry, ToolHandler } from "./index.js";
8
+ import type { ToolDefinition, ToolResult } from "../types.js";
9
+
10
+ // Tool Definitions
11
+ const listDef: ToolDefinition = {
12
+ name: "fs_list",
13
+ description: "List files and directories in a path",
14
+ parameters: {
15
+ type: "object",
16
+ properties: {
17
+ path: {
18
+ type: "string",
19
+ description: "Directory path (default: current directory)",
20
+ },
21
+ pattern: {
22
+ type: "string",
23
+ description: "Filter pattern (e.g., *.mp4, *.json)",
24
+ },
25
+ },
26
+ required: [],
27
+ },
28
+ };
29
+
30
+ const readDef: ToolDefinition = {
31
+ name: "fs_read",
32
+ description: "Read contents of a text file",
33
+ parameters: {
34
+ type: "object",
35
+ properties: {
36
+ path: {
37
+ type: "string",
38
+ description: "File path to read",
39
+ },
40
+ },
41
+ required: ["path"],
42
+ },
43
+ };
44
+
45
+ const writeDef: ToolDefinition = {
46
+ name: "fs_write",
47
+ description: "Write content to a file",
48
+ parameters: {
49
+ type: "object",
50
+ properties: {
51
+ path: {
52
+ type: "string",
53
+ description: "File path to write",
54
+ },
55
+ content: {
56
+ type: "string",
57
+ description: "Content to write",
58
+ },
59
+ },
60
+ required: ["path", "content"],
61
+ },
62
+ };
63
+
64
+ const existsDef: ToolDefinition = {
65
+ name: "fs_exists",
66
+ description: "Check if a file or directory exists",
67
+ parameters: {
68
+ type: "object",
69
+ properties: {
70
+ path: {
71
+ type: "string",
72
+ description: "Path to check",
73
+ },
74
+ },
75
+ required: ["path"],
76
+ },
77
+ };
78
+
79
+ // Helper to match glob pattern
80
+ function matchPattern(filename: string, pattern: string): boolean {
81
+ // Simple glob matching (* = any characters)
82
+ const regex = new RegExp(
83
+ "^" +
84
+ pattern
85
+ .replace(/\./g, "\\.")
86
+ .replace(/\*/g, ".*")
87
+ .replace(/\?/g, ".") +
88
+ "$",
89
+ "i"
90
+ );
91
+ return regex.test(filename);
92
+ }
93
+
94
+ // Format file size
95
+ function formatSize(bytes: number): string {
96
+ const units = ["B", "KB", "MB", "GB"];
97
+ let size = bytes;
98
+ let unit = 0;
99
+ while (size >= 1024 && unit < units.length - 1) {
100
+ size /= 1024;
101
+ unit++;
102
+ }
103
+ return `${size.toFixed(1)}${units[unit]}`;
104
+ }
105
+
106
+ // Tool Handlers
107
+ const list: ToolHandler = async (args, context): Promise<ToolResult> => {
108
+ const dirPath = (args.path as string) || ".";
109
+ const pattern = args.pattern as string | undefined;
110
+
111
+ try {
112
+ const absPath = resolve(context.workingDirectory, dirPath);
113
+ const entries = await readdir(absPath, { withFileTypes: true });
114
+
115
+ const results: string[] = [];
116
+ for (const entry of entries) {
117
+ // Filter by pattern if provided
118
+ if (pattern && !matchPattern(entry.name, pattern)) {
119
+ continue;
120
+ }
121
+
122
+ const fullPath = join(absPath, entry.name);
123
+ const stats = await stat(fullPath);
124
+
125
+ if (entry.isDirectory()) {
126
+ results.push(`[DIR] ${entry.name}/`);
127
+ } else {
128
+ results.push(`[FILE] ${entry.name} (${formatSize(stats.size)})`);
129
+ }
130
+ }
131
+
132
+ if (results.length === 0) {
133
+ return {
134
+ toolCallId: "",
135
+ success: true,
136
+ output: pattern ? `No files matching "${pattern}" in ${dirPath}` : `Directory is empty: ${dirPath}`,
137
+ };
138
+ }
139
+
140
+ return {
141
+ toolCallId: "",
142
+ success: true,
143
+ output: `Contents of ${dirPath}:\n${results.join("\n")}`,
144
+ };
145
+ } catch (error) {
146
+ return {
147
+ toolCallId: "",
148
+ success: false,
149
+ output: "",
150
+ error: `Failed to list directory: ${error instanceof Error ? error.message : String(error)}`,
151
+ };
152
+ }
153
+ };
154
+
155
+ const read: ToolHandler = async (args, context): Promise<ToolResult> => {
156
+ const filePath = args.path as string;
157
+
158
+ try {
159
+ const absPath = resolve(context.workingDirectory, filePath);
160
+ const content = await readFile(absPath, "utf-8");
161
+
162
+ // Truncate if too long
163
+ const maxLength = 4000;
164
+ const truncated = content.length > maxLength;
165
+ const output = truncated
166
+ ? content.substring(0, maxLength) + "\n... (truncated)"
167
+ : content;
168
+
169
+ return {
170
+ toolCallId: "",
171
+ success: true,
172
+ output: `Contents of ${filePath}:\n${output}`,
173
+ };
174
+ } catch (error) {
175
+ return {
176
+ toolCallId: "",
177
+ success: false,
178
+ output: "",
179
+ error: `Failed to read file: ${error instanceof Error ? error.message : String(error)}`,
180
+ };
181
+ }
182
+ };
183
+
184
+ const write: ToolHandler = async (args, context): Promise<ToolResult> => {
185
+ const filePath = args.path as string;
186
+ const content = args.content as string;
187
+
188
+ try {
189
+ const absPath = resolve(context.workingDirectory, filePath);
190
+ await writeFile(absPath, content, "utf-8");
191
+
192
+ return {
193
+ toolCallId: "",
194
+ success: true,
195
+ output: `File written: ${filePath} (${formatSize(content.length)})`,
196
+ };
197
+ } catch (error) {
198
+ return {
199
+ toolCallId: "",
200
+ success: false,
201
+ output: "",
202
+ error: `Failed to write file: ${error instanceof Error ? error.message : String(error)}`,
203
+ };
204
+ }
205
+ };
206
+
207
+ const exists: ToolHandler = async (args, context): Promise<ToolResult> => {
208
+ const filePath = args.path as string;
209
+
210
+ try {
211
+ const absPath = resolve(context.workingDirectory, filePath);
212
+ await access(absPath);
213
+
214
+ const stats = await stat(absPath);
215
+ const type = stats.isDirectory() ? "directory" : "file";
216
+
217
+ return {
218
+ toolCallId: "",
219
+ success: true,
220
+ output: `${type} exists: ${filePath}`,
221
+ };
222
+ } catch {
223
+ return {
224
+ toolCallId: "",
225
+ success: true,
226
+ output: `Does not exist: ${filePath}`,
227
+ };
228
+ }
229
+ };
230
+
231
+ // Registration function
232
+ export function registerFilesystemTools(registry: ToolRegistry): void {
233
+ registry.register(listDef, list);
234
+ registry.register(readDef, read);
235
+ registry.register(writeDef, write);
236
+ registry.register(existsDef, exists);
237
+ }
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Tool Registry - Central registry for all agent tools
3
+ */
4
+
5
+ import type { ToolDefinition, ToolResult, AgentContext } from "../types.js";
6
+
7
+ export type ToolHandler = (
8
+ args: Record<string, unknown>,
9
+ context: AgentContext
10
+ ) => Promise<ToolResult>;
11
+
12
+ interface RegisteredTool {
13
+ definition: ToolDefinition;
14
+ handler: ToolHandler;
15
+ }
16
+
17
+ /**
18
+ * Tool Registry class
19
+ * Manages tool definitions and execution
20
+ */
21
+ export class ToolRegistry {
22
+ private tools: Map<string, RegisteredTool> = new Map();
23
+
24
+ /**
25
+ * Register a tool
26
+ */
27
+ register(definition: ToolDefinition, handler: ToolHandler): void {
28
+ this.tools.set(definition.name, { definition, handler });
29
+ }
30
+
31
+ /**
32
+ * Get all tool definitions
33
+ */
34
+ getDefinitions(): ToolDefinition[] {
35
+ return Array.from(this.tools.values()).map((t) => t.definition);
36
+ }
37
+
38
+ /**
39
+ * Get a specific tool definition
40
+ */
41
+ getDefinition(name: string): ToolDefinition | undefined {
42
+ return this.tools.get(name)?.definition;
43
+ }
44
+
45
+ /**
46
+ * Get a specific tool definition (alias for getDefinition)
47
+ */
48
+ get(name: string): ToolDefinition | undefined {
49
+ return this.getDefinition(name);
50
+ }
51
+
52
+ /**
53
+ * Get all tool definitions (alias for getDefinitions)
54
+ */
55
+ getAll(): ToolDefinition[] {
56
+ return this.getDefinitions();
57
+ }
58
+
59
+ /**
60
+ * Get a tool handler by name
61
+ */
62
+ getHandler(name: string): ToolHandler | undefined {
63
+ return this.tools.get(name)?.handler;
64
+ }
65
+
66
+ /**
67
+ * Execute a tool
68
+ */
69
+ async execute(
70
+ name: string,
71
+ args: Record<string, unknown>,
72
+ context: AgentContext
73
+ ): Promise<ToolResult> {
74
+ const tool = this.tools.get(name);
75
+ if (!tool) {
76
+ return {
77
+ toolCallId: "",
78
+ success: false,
79
+ output: "",
80
+ error: `Unknown tool: ${name}`,
81
+ };
82
+ }
83
+
84
+ try {
85
+ return await tool.handler(args, context);
86
+ } catch (error) {
87
+ const errorMessage = error instanceof Error ? error.message : String(error);
88
+ return {
89
+ toolCallId: "",
90
+ success: false,
91
+ output: "",
92
+ error: errorMessage,
93
+ };
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Check if a tool exists
99
+ */
100
+ has(name: string): boolean {
101
+ return this.tools.has(name);
102
+ }
103
+
104
+ /**
105
+ * Get tool count
106
+ */
107
+ get size(): number {
108
+ return this.tools.size;
109
+ }
110
+
111
+ /**
112
+ * List all tool names
113
+ */
114
+ list(): string[] {
115
+ return Array.from(this.tools.keys());
116
+ }
117
+ }
118
+
119
+ // Global registry instance
120
+ export const toolRegistry = new ToolRegistry();
121
+
122
+ // Re-export tool modules
123
+ export { registerProjectTools } from "./project.js";
124
+ export { registerTimelineTools } from "./timeline.js";
125
+ export { registerFilesystemTools } from "./filesystem.js";
126
+ export { registerMediaTools } from "./media.js";
127
+ export { registerAITools } from "./ai.js";
128
+ export { registerExportTools } from "./export.js";
129
+ export { registerBatchTools } from "./batch.js";
130
+
131
+ /**
132
+ * Register all tools
133
+ */
134
+ export async function registerAllTools(registry: ToolRegistry): Promise<void> {
135
+ const { registerProjectTools } = await import("./project.js");
136
+ const { registerTimelineTools } = await import("./timeline.js");
137
+ const { registerFilesystemTools } = await import("./filesystem.js");
138
+ const { registerMediaTools } = await import("./media.js");
139
+ const { registerAITools } = await import("./ai.js");
140
+ const { registerExportTools } = await import("./export.js");
141
+ const { registerBatchTools } = await import("./batch.js");
142
+
143
+ registerProjectTools(registry);
144
+ registerTimelineTools(registry);
145
+ registerFilesystemTools(registry);
146
+ registerMediaTools(registry);
147
+ registerAITools(registry);
148
+ registerExportTools(registry);
149
+ registerBatchTools(registry);
150
+ }