@vibeframe/mcp-server 0.48.4 → 0.48.6

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 (2) hide show
  1. package/dist/index.js +83 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -444566,7 +444566,89 @@ async function executeRegenerateScene(options) {
444566
444566
  const imageBuffer = await readFile9(imagePath);
444567
444567
  const videoDuration = segment.duration > 5 ? 10 : 5;
444568
444568
  const maxRetries = options.retries ?? DEFAULT_VIDEO_RETRIES;
444569
- if (options.generator === "kling" || !options.generator) {
444569
+ if (options.generator === "grok") {
444570
+ const grok = new GrokProvider();
444571
+ await grok.initialize({ apiKey: videoApiKey });
444572
+ const ext = extname7(imagePath).toLowerCase().slice(1);
444573
+ const mimeType = ext === "jpg" || ext === "jpeg" ? "image/jpeg" : "image/png";
444574
+ const referenceImage = `data:${mimeType};base64,${imageBuffer.toString("base64")}`;
444575
+ const grokDuration = Math.min(15, Math.max(1, segment.duration));
444576
+ const taskResult = await generateVideoWithRetryGrok(
444577
+ grok,
444578
+ segment,
444579
+ {
444580
+ duration: grokDuration,
444581
+ aspectRatio: options.aspectRatio || "16:9",
444582
+ referenceImage
444583
+ },
444584
+ maxRetries
444585
+ );
444586
+ if (taskResult) {
444587
+ try {
444588
+ const waitResult = await grok.waitForCompletion(taskResult.requestId, void 0, 3e5);
444589
+ if (waitResult.status === "completed" && waitResult.videoUrl) {
444590
+ const buffer = await downloadVideo(waitResult.videoUrl, videoApiKey);
444591
+ await writeFile10(videoPath, buffer);
444592
+ const targetDuration = segment.duration;
444593
+ const actualVideoDuration = await getVideoDuration(videoPath);
444594
+ if (actualVideoDuration < targetDuration - 0.1) {
444595
+ const extendedPath = resolve20(outputDir, `scene-${sceneNum}-extended.mp4`);
444596
+ await extendVideoNaturally(videoPath, targetDuration, extendedPath);
444597
+ await unlink4(videoPath);
444598
+ await rename4(extendedPath, videoPath);
444599
+ }
444600
+ result.regeneratedScenes.push(sceneNum);
444601
+ } else {
444602
+ result.failedScenes.push(sceneNum);
444603
+ }
444604
+ } catch {
444605
+ result.failedScenes.push(sceneNum);
444606
+ }
444607
+ } else {
444608
+ result.failedScenes.push(sceneNum);
444609
+ }
444610
+ } else if (options.generator === "veo") {
444611
+ const veo = new GeminiProvider();
444612
+ await veo.initialize({ apiKey: videoApiKey });
444613
+ const ext = extname7(imagePath).toLowerCase().slice(1);
444614
+ const mimeType = ext === "jpg" || ext === "jpeg" ? "image/jpeg" : "image/png";
444615
+ const referenceImage = `data:${mimeType};base64,${imageBuffer.toString("base64")}`;
444616
+ const veoDuration = segment.duration > 6 ? 8 : segment.duration > 4 ? 6 : 4;
444617
+ const taskResult = await generateVideoWithRetryVeo(
444618
+ veo,
444619
+ segment,
444620
+ {
444621
+ duration: veoDuration,
444622
+ aspectRatio: options.aspectRatio || "16:9",
444623
+ referenceImage
444624
+ },
444625
+ maxRetries
444626
+ );
444627
+ if (taskResult) {
444628
+ try {
444629
+ const waitResult = await veo.waitForVideoCompletion(taskResult.operationName, void 0, 3e5);
444630
+ if (waitResult.status === "completed" && waitResult.videoUrl) {
444631
+ const buffer = await downloadVideo(waitResult.videoUrl, videoApiKey);
444632
+ await writeFile10(videoPath, buffer);
444633
+ const targetDuration = segment.duration;
444634
+ const actualVideoDuration = await getVideoDuration(videoPath);
444635
+ if (actualVideoDuration < targetDuration - 0.1) {
444636
+ const extendedPath = resolve20(outputDir, `scene-${sceneNum}-extended.mp4`);
444637
+ await extendVideoNaturally(videoPath, targetDuration, extendedPath);
444638
+ await unlink4(videoPath);
444639
+ await rename4(extendedPath, videoPath);
444640
+ }
444641
+ result.regeneratedScenes.push(sceneNum);
444642
+ } else {
444643
+ result.failedScenes.push(sceneNum);
444644
+ }
444645
+ } catch {
444646
+ result.failedScenes.push(sceneNum);
444647
+ }
444648
+ } else {
444649
+ result.failedScenes.push(sceneNum);
444650
+ }
444651
+ } else if (options.generator === "kling" || !options.generator) {
444570
444652
  const kling = new KlingProvider();
444571
444653
  await kling.initialize({ apiKey: videoApiKey });
444572
444654
  if (!kling.isConfigured()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeframe/mcp-server",
3
- "version": "0.48.4",
3
+ "version": "0.48.6",
4
4
  "description": "VibeFrame MCP Server - AI-native video editing via Model Context Protocol",
5
5
  "type": "module",
6
6
  "bin": {
@@ -57,8 +57,8 @@
57
57
  "tsx": "^4.21.0",
58
58
  "typescript": "^5.3.3",
59
59
  "vitest": "^1.2.2",
60
- "@vibeframe/cli": "0.48.4",
61
- "@vibeframe/core": "0.48.4"
60
+ "@vibeframe/cli": "0.48.6",
61
+ "@vibeframe/core": "0.48.6"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=20"