@vibeframe/mcp-server 0.106.0 → 0.106.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +131 -23
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -452888,12 +452888,37 @@ async function executeVideoStatus(options) {
452888
452888
  } = options;
452889
452889
  try {
452890
452890
  const envKeyMap = {
452891
+ grok: "XAI_API_KEY",
452891
452892
  runway: "RUNWAY_API_SECRET",
452892
- kling: "KLING_API_KEY"
452893
+ kling: "KLING_API_KEY",
452894
+ veo: "GOOGLE_API_KEY"
452893
452895
  };
452894
452896
  const key2 = apiKey || process.env[envKeyMap[provider] || ""];
452895
452897
  if (!key2) return { success: false, error: `${envKeyMap[provider]} required` };
452896
- if (provider === "runway") {
452898
+ if (provider === "grok") {
452899
+ const grok = new GrokProvider();
452900
+ await grok.initialize({ apiKey: key2 });
452901
+ let result = await grok.getGenerationStatus(taskId);
452902
+ if (wait && result.status !== "completed" && result.status !== "failed") {
452903
+ result = await grok.waitForCompletion(taskId, () => {
452904
+ });
452905
+ }
452906
+ let outputPath;
452907
+ if (output3 && result.videoUrl) {
452908
+ const buffer = await downloadVideo(result.videoUrl);
452909
+ outputPath = resolve19(process.cwd(), output3);
452910
+ await writeFile14(outputPath, buffer);
452911
+ }
452912
+ return {
452913
+ success: true,
452914
+ taskId,
452915
+ status: result.status,
452916
+ progress: result.progress,
452917
+ videoUrl: result.videoUrl,
452918
+ outputPath,
452919
+ error: result.error
452920
+ };
452921
+ } else if (provider === "runway") {
452897
452922
  const runway = new RunwayProvider();
452898
452923
  await runway.initialize({ apiKey: key2 });
452899
452924
  let result = await runway.getGenerationStatus(taskId);
@@ -452935,7 +452960,31 @@ async function executeVideoStatus(options) {
452935
452960
  status: result.status,
452936
452961
  videoUrl: result.videoUrl,
452937
452962
  duration: result.duration,
452938
- outputPath
452963
+ outputPath,
452964
+ error: result.error
452965
+ };
452966
+ } else if (provider === "veo") {
452967
+ const gemini = new GeminiProvider();
452968
+ await gemini.initialize({ apiKey: key2 });
452969
+ let result = await gemini.getGenerationStatus(taskId);
452970
+ if (wait && result.status !== "completed" && result.status !== "failed" && result.status !== "cancelled") {
452971
+ result = await gemini.waitForVideoCompletion(taskId, () => {
452972
+ });
452973
+ }
452974
+ let outputPath;
452975
+ if (output3 && result.videoUrl) {
452976
+ const buffer = await downloadVideo(result.videoUrl, key2);
452977
+ outputPath = resolve19(process.cwd(), output3);
452978
+ await writeFile14(outputPath, buffer);
452979
+ }
452980
+ return {
452981
+ success: true,
452982
+ taskId,
452983
+ status: result.status,
452984
+ progress: result.progress,
452985
+ videoUrl: result.videoUrl,
452986
+ outputPath,
452987
+ error: result.error
452939
452988
  };
452940
452989
  }
452941
452990
  return { success: false, error: `Unsupported provider: ${provider}` };
@@ -453502,7 +453551,7 @@ function resolveRefreshOutput(record, opts) {
453502
453551
  return record.outputPath ? resolve21(record.outputPath) : void 0;
453503
453552
  }
453504
453553
  function liveSupport(record) {
453505
- if (record.jobType === "generate-video" && (record.provider === "runway" || record.provider === "kling")) {
453554
+ if (record.jobType === "generate-video" && (record.provider === "grok" || record.provider === "runway" || record.provider === "kling" || record.provider === "veo")) {
453506
453555
  return { supported: true };
453507
453556
  }
453508
453557
  if (record.jobType === "generate-music" && record.provider === "replicate") {
@@ -453884,7 +453933,9 @@ function isActiveStatus(status) {
453884
453933
  }
453885
453934
  function providerStatusCommand(record) {
453886
453935
  if (record.jobType === "generate-video") {
453887
- if (record.provider !== "runway" && record.provider !== "kling") return void 0;
453936
+ if (record.provider !== "grok" && record.provider !== "runway" && record.provider !== "kling" && record.provider !== "veo") {
453937
+ return void 0;
453938
+ }
453888
453939
  const type = record.provider === "kling" && record.providerTaskType ? ` --type ${record.providerTaskType}` : "";
453889
453940
  return `vibe generate video-status ${record.providerTaskId} -p ${record.provider}${type} --json`;
453890
453941
  }
@@ -463394,7 +463445,10 @@ function getStatusColor(status) {
463394
463445
  }
463395
463446
  }
463396
463447
  function registerVideoStatusCommand(parent) {
463397
- parent.command("video-status", { hidden: true }).description("Check video generation status (Grok, Runway, or Kling)").argument("<task-id>", "Task ID from video generation").option("-p, --provider <provider>", "Provider: grok, runway, kling", "grok").option("-k, --api-key <key>", "API key (or set XAI_API_KEY / RUNWAY_API_SECRET / KLING_API_KEY env)").option("--type <type>", "Task type: text2video or image2video (Kling only)", "text2video").option("--wait", "Wait for completion").option("-o, --output <path>", "Download video when complete").action(async (taskId, options) => {
463448
+ parent.command("video-status", { hidden: true }).description("Check video generation status (Grok, Runway, Kling, or Veo)").argument("<task-id>", "Task ID from video generation").option("-p, --provider <provider>", "Provider: grok, runway, kling, veo", "grok").option(
463449
+ "-k, --api-key <key>",
463450
+ "API key (or set XAI_API_KEY / RUNWAY_API_SECRET / KLING_API_KEY / GOOGLE_API_KEY env)"
463451
+ ).option("--type <type>", "Task type: text2video or image2video (Kling only)", "text2video").option("--wait", "Wait for completion").option("-o, --output <path>", "Download video when complete").action(async (taskId, options) => {
463398
463452
  const startedAt = Date.now();
463399
463453
  try {
463400
463454
  const provider = (options.provider || "grok").toLowerCase();
@@ -463454,18 +463508,12 @@ function registerVideoStatusCommand(parent) {
463454
463508
  downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
463455
463509
  } catch (err) {
463456
463510
  downloadSpinner.fail(
463457
- source_default.red(
463458
- `Failed to download video: ${err instanceof Error ? err.message : err}`
463459
- )
463511
+ source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
463460
463512
  );
463461
463513
  }
463462
463514
  }
463463
463515
  } else if (provider === "runway") {
463464
- const apiKey = await requireApiKey(
463465
- "RUNWAY_API_SECRET",
463466
- "Runway",
463467
- options.apiKey
463468
- );
463516
+ const apiKey = await requireApiKey("RUNWAY_API_SECRET", "Runway", options.apiKey);
463469
463517
  const spinner2 = ora("Checking status...").start();
463470
463518
  const runway = new RunwayProvider();
463471
463519
  await runway.initialize({ apiKey });
@@ -463526,9 +463574,7 @@ function registerVideoStatusCommand(parent) {
463526
463574
  downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
463527
463575
  } catch (err) {
463528
463576
  downloadSpinner.fail(
463529
- source_default.red(
463530
- `Failed to download video: ${err instanceof Error ? err.message : err}`
463531
- )
463577
+ source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
463532
463578
  );
463533
463579
  }
463534
463580
  }
@@ -463594,15 +463640,77 @@ function registerVideoStatusCommand(parent) {
463594
463640
  downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
463595
463641
  } catch (err) {
463596
463642
  downloadSpinner.fail(
463597
- source_default.red(
463598
- `Failed to download video: ${err instanceof Error ? err.message : err}`
463599
- )
463643
+ source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
463644
+ );
463645
+ }
463646
+ }
463647
+ } else if (provider === "veo") {
463648
+ const apiKey = await requireApiKey("GOOGLE_API_KEY", "Google", options.apiKey);
463649
+ const spinner2 = ora("Checking status...").start();
463650
+ const gemini = new GeminiProvider();
463651
+ await gemini.initialize({ apiKey });
463652
+ let result = await gemini.getGenerationStatus(taskId);
463653
+ if (options.wait && result.status !== "completed" && result.status !== "failed" && result.status !== "cancelled") {
463654
+ spinner2.text = "Waiting for completion...";
463655
+ result = await gemini.waitForVideoCompletion(taskId, (status) => {
463656
+ spinner2.text = status.progress !== void 0 ? `Generating... ${status.progress}%` : `Generating... ${status.status}`;
463657
+ });
463658
+ }
463659
+ spinner2.stop();
463660
+ if (isJsonMode()) {
463661
+ let outputPath;
463662
+ if (options.output && result.videoUrl) {
463663
+ const buffer = await downloadVideo(result.videoUrl, apiKey);
463664
+ outputPath = resolve47(process.cwd(), options.output);
463665
+ await writeFile35(outputPath, buffer);
463666
+ }
463667
+ outputSuccess({
463668
+ command: "generate video-status",
463669
+ startedAt,
463670
+ data: {
463671
+ taskId,
463672
+ provider: "veo",
463673
+ status: result.status,
463674
+ videoUrl: result.videoUrl,
463675
+ progress: result.progress,
463676
+ error: result.error,
463677
+ outputPath
463678
+ }
463679
+ });
463680
+ return;
463681
+ }
463682
+ console.log();
463683
+ console.log(source_default.bold.cyan("Generation Status"));
463684
+ console.log(source_default.dim("\u2500".repeat(60)));
463685
+ console.log(`Task ID: ${taskId}`);
463686
+ console.log(`Provider: Veo`);
463687
+ console.log(`Status: ${getStatusColor(result.status)}`);
463688
+ if (result.progress !== void 0) {
463689
+ console.log(`Progress: ${result.progress}%`);
463690
+ }
463691
+ if (result.videoUrl) {
463692
+ console.log(`Video URL: ${result.videoUrl}`);
463693
+ }
463694
+ if (result.error) {
463695
+ console.log(`Error: ${source_default.red(result.error)}`);
463696
+ }
463697
+ console.log();
463698
+ if (options.output && result.videoUrl) {
463699
+ const downloadSpinner = ora("Downloading video...").start();
463700
+ try {
463701
+ const buffer = await downloadVideo(result.videoUrl, apiKey);
463702
+ const outputPath = resolve47(process.cwd(), options.output);
463703
+ await writeFile35(outputPath, buffer);
463704
+ downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
463705
+ } catch (err) {
463706
+ downloadSpinner.fail(
463707
+ source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
463600
463708
  );
463601
463709
  }
463602
463710
  }
463603
463711
  } else {
463604
463712
  exitWithError(
463605
- usageError(`Invalid provider: ${provider}. Use grok, runway, or kling.`)
463713
+ usageError(`Invalid provider: ${provider}. Use grok, runway, kling, or veo.`)
463606
463714
  );
463607
463715
  }
463608
463716
  } catch (error) {
@@ -476480,10 +476588,10 @@ var generateVideoStatusTool = defineTool({
476480
476588
  name: "generate_video_status",
476481
476589
  category: "generate",
476482
476590
  cost: "free",
476483
- description: "Check video generation status for Runway or Kling tasks.",
476591
+ description: "Check video generation status for Grok, Runway, Kling, or Veo tasks.",
476484
476592
  schema: external_exports.object({
476485
476593
  taskId: external_exports.string().describe("Task ID from video generation"),
476486
- provider: external_exports.enum(["runway", "kling"]).optional().describe("Provider (default: runway)"),
476594
+ provider: external_exports.enum(["grok", "runway", "kling", "veo"]).optional().describe("Provider (default: runway)"),
476487
476595
  taskType: external_exports.enum(["text2video", "image2video"]).optional().describe("Kling task type (default: text2video)"),
476488
476596
  wait: external_exports.boolean().optional().describe("Wait for completion"),
476489
476597
  output: external_exports.string().optional().describe("Download video when complete")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeframe/mcp-server",
3
- "version": "0.106.0",
3
+ "version": "0.106.2",
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.106.0",
61
- "@vibeframe/core": "0.106.0"
60
+ "@vibeframe/core": "0.106.2",
61
+ "@vibeframe/cli": "0.106.2"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=20"