@vibeframe/cli 0.106.0 → 0.106.3
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.
|
@@ -46,7 +46,7 @@ export interface VideoGenerateResult {
|
|
|
46
46
|
export declare function executeVideoGenerate(options: VideoGenerateOptions): Promise<VideoGenerateResult>;
|
|
47
47
|
export interface VideoStatusOptions {
|
|
48
48
|
taskId: string;
|
|
49
|
-
provider?: "runway" | "kling";
|
|
49
|
+
provider?: "grok" | "runway" | "kling" | "veo";
|
|
50
50
|
taskType?: "text2video" | "image2video";
|
|
51
51
|
wait?: boolean;
|
|
52
52
|
output?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module generate/video-status
|
|
3
3
|
* @description `vibe generate video-status` (hidden) — check Grok/Runway/
|
|
4
|
-
* Kling video generation status, optionally wait + download. Split out
|
|
5
|
-
* `generate.ts` in v0.69 (Plan G Phase 2).
|
|
4
|
+
* Kling/Veo video generation status, optionally wait + download. Split out
|
|
5
|
+
* of `generate.ts` in v0.69 (Plan G Phase 2).
|
|
6
6
|
*/
|
|
7
7
|
import type { Command } from "commander";
|
|
8
8
|
export declare function registerVideoStatusCommand(parent: Command): void;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* generate motion - Standalone motion assets (Claude/Gemini + Remotion)
|
|
15
15
|
* generate thumbnail - Thumbnail generation/extraction
|
|
16
16
|
* generate background - AI background generation (OpenAI)
|
|
17
|
-
* generate video-status - Check video generation status (Grok/Runway/Kling)
|
|
17
|
+
* generate video-status - Check video generation status (Grok/Runway/Kling/Veo)
|
|
18
18
|
* generate video-cancel - Cancel video generation (Grok/Runway)
|
|
19
19
|
* generate video-extend - Extend video (Kling/Veo)
|
|
20
20
|
*
|
package/dist/index.js
CHANGED
|
@@ -34447,12 +34447,37 @@ async function executeVideoStatus(options) {
|
|
|
34447
34447
|
} = options;
|
|
34448
34448
|
try {
|
|
34449
34449
|
const envKeyMap = {
|
|
34450
|
+
grok: "XAI_API_KEY",
|
|
34450
34451
|
runway: "RUNWAY_API_SECRET",
|
|
34451
|
-
kling: "KLING_API_KEY"
|
|
34452
|
+
kling: "KLING_API_KEY",
|
|
34453
|
+
veo: "GOOGLE_API_KEY"
|
|
34452
34454
|
};
|
|
34453
34455
|
const key = apiKey || process.env[envKeyMap[provider] || ""];
|
|
34454
34456
|
if (!key) return { success: false, error: `${envKeyMap[provider]} required` };
|
|
34455
|
-
if (provider === "
|
|
34457
|
+
if (provider === "grok") {
|
|
34458
|
+
const grok = new GrokProvider();
|
|
34459
|
+
await grok.initialize({ apiKey: key });
|
|
34460
|
+
let result = await grok.getGenerationStatus(taskId);
|
|
34461
|
+
if (wait && result.status !== "completed" && result.status !== "failed") {
|
|
34462
|
+
result = await grok.waitForCompletion(taskId, () => {
|
|
34463
|
+
});
|
|
34464
|
+
}
|
|
34465
|
+
let outputPath;
|
|
34466
|
+
if (output && result.videoUrl) {
|
|
34467
|
+
const buffer = await downloadVideo(result.videoUrl);
|
|
34468
|
+
outputPath = resolve23(process.cwd(), output);
|
|
34469
|
+
await writeFile20(outputPath, buffer);
|
|
34470
|
+
}
|
|
34471
|
+
return {
|
|
34472
|
+
success: true,
|
|
34473
|
+
taskId,
|
|
34474
|
+
status: result.status,
|
|
34475
|
+
progress: result.progress,
|
|
34476
|
+
videoUrl: result.videoUrl,
|
|
34477
|
+
outputPath,
|
|
34478
|
+
error: result.error
|
|
34479
|
+
};
|
|
34480
|
+
} else if (provider === "runway") {
|
|
34456
34481
|
const runway = new RunwayProvider();
|
|
34457
34482
|
await runway.initialize({ apiKey: key });
|
|
34458
34483
|
let result = await runway.getGenerationStatus(taskId);
|
|
@@ -34494,7 +34519,31 @@ async function executeVideoStatus(options) {
|
|
|
34494
34519
|
status: result.status,
|
|
34495
34520
|
videoUrl: result.videoUrl,
|
|
34496
34521
|
duration: result.duration,
|
|
34497
|
-
outputPath
|
|
34522
|
+
outputPath,
|
|
34523
|
+
error: result.error
|
|
34524
|
+
};
|
|
34525
|
+
} else if (provider === "veo") {
|
|
34526
|
+
const gemini = new GeminiProvider();
|
|
34527
|
+
await gemini.initialize({ apiKey: key });
|
|
34528
|
+
let result = await gemini.getGenerationStatus(taskId);
|
|
34529
|
+
if (wait && result.status !== "completed" && result.status !== "failed" && result.status !== "cancelled") {
|
|
34530
|
+
result = await gemini.waitForVideoCompletion(taskId, () => {
|
|
34531
|
+
});
|
|
34532
|
+
}
|
|
34533
|
+
let outputPath;
|
|
34534
|
+
if (output && result.videoUrl) {
|
|
34535
|
+
const buffer = await downloadVideo(result.videoUrl, key);
|
|
34536
|
+
outputPath = resolve23(process.cwd(), output);
|
|
34537
|
+
await writeFile20(outputPath, buffer);
|
|
34538
|
+
}
|
|
34539
|
+
return {
|
|
34540
|
+
success: true,
|
|
34541
|
+
taskId,
|
|
34542
|
+
status: result.status,
|
|
34543
|
+
progress: result.progress,
|
|
34544
|
+
videoUrl: result.videoUrl,
|
|
34545
|
+
outputPath,
|
|
34546
|
+
error: result.error
|
|
34498
34547
|
};
|
|
34499
34548
|
}
|
|
34500
34549
|
return { success: false, error: `Unsupported provider: ${provider}` };
|
|
@@ -35024,7 +35073,7 @@ function resolveRefreshOutput(record, opts) {
|
|
|
35024
35073
|
return record.outputPath ? resolve24(record.outputPath) : void 0;
|
|
35025
35074
|
}
|
|
35026
35075
|
function liveSupport(record) {
|
|
35027
|
-
if (record.jobType === "generate-video" && (record.provider === "runway" || record.provider === "kling")) {
|
|
35076
|
+
if (record.jobType === "generate-video" && (record.provider === "grok" || record.provider === "runway" || record.provider === "kling" || record.provider === "veo")) {
|
|
35028
35077
|
return { supported: true };
|
|
35029
35078
|
}
|
|
35030
35079
|
if (record.jobType === "generate-music" && record.provider === "replicate") {
|
|
@@ -35406,7 +35455,9 @@ function isActiveStatus(status) {
|
|
|
35406
35455
|
}
|
|
35407
35456
|
function providerStatusCommand(record) {
|
|
35408
35457
|
if (record.jobType === "generate-video") {
|
|
35409
|
-
if (record.provider !== "runway" && record.provider !== "kling"
|
|
35458
|
+
if (record.provider !== "grok" && record.provider !== "runway" && record.provider !== "kling" && record.provider !== "veo") {
|
|
35459
|
+
return void 0;
|
|
35460
|
+
}
|
|
35410
35461
|
const type = record.provider === "kling" && record.providerTaskType ? ` --type ${record.providerTaskType}` : "";
|
|
35411
35462
|
return `vibe generate video-status ${record.providerTaskId} -p ${record.provider}${type} --json`;
|
|
35412
35463
|
}
|
|
@@ -36166,7 +36217,10 @@ function getStatusColor(status) {
|
|
|
36166
36217
|
}
|
|
36167
36218
|
}
|
|
36168
36219
|
function registerVideoStatusCommand(parent) {
|
|
36169
|
-
parent.command("video-status", { hidden: true }).description("Check video generation status (Grok, Runway, or
|
|
36220
|
+
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(
|
|
36221
|
+
"-k, --api-key <key>",
|
|
36222
|
+
"API key (or set XAI_API_KEY / RUNWAY_API_SECRET / KLING_API_KEY / GOOGLE_API_KEY env)"
|
|
36223
|
+
).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) => {
|
|
36170
36224
|
const startedAt = Date.now();
|
|
36171
36225
|
try {
|
|
36172
36226
|
const provider = (options.provider || "grok").toLowerCase();
|
|
@@ -36226,18 +36280,12 @@ function registerVideoStatusCommand(parent) {
|
|
|
36226
36280
|
downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
|
|
36227
36281
|
} catch (err) {
|
|
36228
36282
|
downloadSpinner.fail(
|
|
36229
|
-
source_default.red(
|
|
36230
|
-
`Failed to download video: ${err instanceof Error ? err.message : err}`
|
|
36231
|
-
)
|
|
36283
|
+
source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
|
|
36232
36284
|
);
|
|
36233
36285
|
}
|
|
36234
36286
|
}
|
|
36235
36287
|
} else if (provider === "runway") {
|
|
36236
|
-
const apiKey = await requireApiKey(
|
|
36237
|
-
"RUNWAY_API_SECRET",
|
|
36238
|
-
"Runway",
|
|
36239
|
-
options.apiKey
|
|
36240
|
-
);
|
|
36288
|
+
const apiKey = await requireApiKey("RUNWAY_API_SECRET", "Runway", options.apiKey);
|
|
36241
36289
|
const spinner2 = ora("Checking status...").start();
|
|
36242
36290
|
const runway = new RunwayProvider();
|
|
36243
36291
|
await runway.initialize({ apiKey });
|
|
@@ -36298,9 +36346,7 @@ function registerVideoStatusCommand(parent) {
|
|
|
36298
36346
|
downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
|
|
36299
36347
|
} catch (err) {
|
|
36300
36348
|
downloadSpinner.fail(
|
|
36301
|
-
source_default.red(
|
|
36302
|
-
`Failed to download video: ${err instanceof Error ? err.message : err}`
|
|
36303
|
-
)
|
|
36349
|
+
source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
|
|
36304
36350
|
);
|
|
36305
36351
|
}
|
|
36306
36352
|
}
|
|
@@ -36366,15 +36412,77 @@ function registerVideoStatusCommand(parent) {
|
|
|
36366
36412
|
downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
|
|
36367
36413
|
} catch (err) {
|
|
36368
36414
|
downloadSpinner.fail(
|
|
36369
|
-
source_default.red(
|
|
36370
|
-
|
|
36371
|
-
|
|
36415
|
+
source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
|
|
36416
|
+
);
|
|
36417
|
+
}
|
|
36418
|
+
}
|
|
36419
|
+
} else if (provider === "veo") {
|
|
36420
|
+
const apiKey = await requireApiKey("GOOGLE_API_KEY", "Google", options.apiKey);
|
|
36421
|
+
const spinner2 = ora("Checking status...").start();
|
|
36422
|
+
const gemini = new GeminiProvider();
|
|
36423
|
+
await gemini.initialize({ apiKey });
|
|
36424
|
+
let result = await gemini.getGenerationStatus(taskId);
|
|
36425
|
+
if (options.wait && result.status !== "completed" && result.status !== "failed" && result.status !== "cancelled") {
|
|
36426
|
+
spinner2.text = "Waiting for completion...";
|
|
36427
|
+
result = await gemini.waitForVideoCompletion(taskId, (status) => {
|
|
36428
|
+
spinner2.text = status.progress !== void 0 ? `Generating... ${status.progress}%` : `Generating... ${status.status}`;
|
|
36429
|
+
});
|
|
36430
|
+
}
|
|
36431
|
+
spinner2.stop();
|
|
36432
|
+
if (isJsonMode()) {
|
|
36433
|
+
let outputPath;
|
|
36434
|
+
if (options.output && result.videoUrl) {
|
|
36435
|
+
const buffer = await downloadVideo(result.videoUrl, apiKey);
|
|
36436
|
+
outputPath = resolve28(process.cwd(), options.output);
|
|
36437
|
+
await writeFile26(outputPath, buffer);
|
|
36438
|
+
}
|
|
36439
|
+
outputSuccess({
|
|
36440
|
+
command: "generate video-status",
|
|
36441
|
+
startedAt,
|
|
36442
|
+
data: {
|
|
36443
|
+
taskId,
|
|
36444
|
+
provider: "veo",
|
|
36445
|
+
status: result.status,
|
|
36446
|
+
videoUrl: result.videoUrl,
|
|
36447
|
+
progress: result.progress,
|
|
36448
|
+
error: result.error,
|
|
36449
|
+
outputPath
|
|
36450
|
+
}
|
|
36451
|
+
});
|
|
36452
|
+
return;
|
|
36453
|
+
}
|
|
36454
|
+
console.log();
|
|
36455
|
+
console.log(source_default.bold.cyan("Generation Status"));
|
|
36456
|
+
console.log(source_default.dim("\u2500".repeat(60)));
|
|
36457
|
+
console.log(`Task ID: ${taskId}`);
|
|
36458
|
+
console.log(`Provider: Veo`);
|
|
36459
|
+
console.log(`Status: ${getStatusColor(result.status)}`);
|
|
36460
|
+
if (result.progress !== void 0) {
|
|
36461
|
+
console.log(`Progress: ${result.progress}%`);
|
|
36462
|
+
}
|
|
36463
|
+
if (result.videoUrl) {
|
|
36464
|
+
console.log(`Video URL: ${result.videoUrl}`);
|
|
36465
|
+
}
|
|
36466
|
+
if (result.error) {
|
|
36467
|
+
console.log(`Error: ${source_default.red(result.error)}`);
|
|
36468
|
+
}
|
|
36469
|
+
console.log();
|
|
36470
|
+
if (options.output && result.videoUrl) {
|
|
36471
|
+
const downloadSpinner = ora("Downloading video...").start();
|
|
36472
|
+
try {
|
|
36473
|
+
const buffer = await downloadVideo(result.videoUrl, apiKey);
|
|
36474
|
+
const outputPath = resolve28(process.cwd(), options.output);
|
|
36475
|
+
await writeFile26(outputPath, buffer);
|
|
36476
|
+
downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
|
|
36477
|
+
} catch (err) {
|
|
36478
|
+
downloadSpinner.fail(
|
|
36479
|
+
source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
|
|
36372
36480
|
);
|
|
36373
36481
|
}
|
|
36374
36482
|
}
|
|
36375
36483
|
} else {
|
|
36376
36484
|
exitWithError(
|
|
36377
|
-
usageError(`Invalid provider: ${provider}. Use grok, runway, or
|
|
36485
|
+
usageError(`Invalid provider: ${provider}. Use grok, runway, kling, or veo.`)
|
|
36378
36486
|
);
|
|
36379
36487
|
}
|
|
36380
36488
|
} catch (error) {
|
|
@@ -68694,10 +68802,10 @@ var init_generate2 = __esm({
|
|
|
68694
68802
|
name: "generate_video_status",
|
|
68695
68803
|
category: "generate",
|
|
68696
68804
|
cost: "free",
|
|
68697
|
-
description: "Check video generation status for Runway or
|
|
68805
|
+
description: "Check video generation status for Grok, Runway, Kling, or Veo tasks.",
|
|
68698
68806
|
schema: external_exports.object({
|
|
68699
68807
|
taskId: external_exports.string().describe("Task ID from video generation"),
|
|
68700
|
-
provider: external_exports.enum(["runway", "kling"]).optional().describe("Provider (default: runway)"),
|
|
68808
|
+
provider: external_exports.enum(["grok", "runway", "kling", "veo"]).optional().describe("Provider (default: runway)"),
|
|
68701
68809
|
taskType: external_exports.enum(["text2video", "image2video"]).optional().describe("Kling task type (default: text2video)"),
|
|
68702
68810
|
wait: external_exports.boolean().optional().describe("Wait for completion"),
|
|
68703
68811
|
output: external_exports.string().optional().describe("Download video when complete")
|
|
@@ -71886,7 +71994,7 @@ init_source();
|
|
|
71886
71994
|
// package.json
|
|
71887
71995
|
var package_default = {
|
|
71888
71996
|
name: "@vibeframe/cli",
|
|
71889
|
-
version: "0.106.
|
|
71997
|
+
version: "0.106.3",
|
|
71890
71998
|
description: "VibeFrame CLI - natural language video editing from the terminal",
|
|
71891
71999
|
private: false,
|
|
71892
72000
|
license: "MIT",
|
|
@@ -84946,6 +85054,10 @@ function propagateErrorHandling(cmd) {
|
|
|
84946
85054
|
}
|
|
84947
85055
|
}
|
|
84948
85056
|
propagateErrorHandling(program2);
|
|
85057
|
+
if (process.argv.length === 3 && process.argv[2] === "version") {
|
|
85058
|
+
console.log(package_default.version);
|
|
85059
|
+
process.exit(0);
|
|
85060
|
+
}
|
|
84949
85061
|
if (process.argv.includes("--describe")) {
|
|
84950
85062
|
const args = process.argv.slice(2).filter((a) => a !== "--describe" && a !== "--json");
|
|
84951
85063
|
let cmd = program2;
|
|
@@ -84969,7 +85081,8 @@ if (process.argv.includes("--describe")) {
|
|
|
84969
85081
|
}
|
|
84970
85082
|
}
|
|
84971
85083
|
if (process.argv.length <= 2) {
|
|
84972
|
-
program2.
|
|
85084
|
+
program2.outputHelp();
|
|
85085
|
+
process.exit(0);
|
|
84973
85086
|
} else {
|
|
84974
85087
|
(async () => {
|
|
84975
85088
|
try {
|
|
@@ -255,20 +255,20 @@ export declare const generateVideoTool: import("../define-tool.js").ToolDefiniti
|
|
|
255
255
|
}>>;
|
|
256
256
|
export declare const generateVideoStatusTool: import("../define-tool.js").ToolDefinition<z.ZodObject<{
|
|
257
257
|
taskId: z.ZodString;
|
|
258
|
-
provider: z.ZodOptional<z.ZodEnum<["runway", "kling"]>>;
|
|
258
|
+
provider: z.ZodOptional<z.ZodEnum<["grok", "runway", "kling", "veo"]>>;
|
|
259
259
|
taskType: z.ZodOptional<z.ZodEnum<["text2video", "image2video"]>>;
|
|
260
260
|
wait: z.ZodOptional<z.ZodBoolean>;
|
|
261
261
|
output: z.ZodOptional<z.ZodString>;
|
|
262
262
|
}, "strip", z.ZodTypeAny, {
|
|
263
263
|
taskId: string;
|
|
264
264
|
output?: string | undefined;
|
|
265
|
-
provider?: "kling" | "runway" | undefined;
|
|
265
|
+
provider?: "grok" | "kling" | "runway" | "veo" | undefined;
|
|
266
266
|
wait?: boolean | undefined;
|
|
267
267
|
taskType?: "text2video" | "image2video" | undefined;
|
|
268
268
|
}, {
|
|
269
269
|
taskId: string;
|
|
270
270
|
output?: string | undefined;
|
|
271
|
-
provider?: "kling" | "runway" | undefined;
|
|
271
|
+
provider?: "grok" | "kling" | "runway" | "veo" | undefined;
|
|
272
272
|
wait?: boolean | undefined;
|
|
273
273
|
taskType?: "text2video" | "image2video" | undefined;
|
|
274
274
|
}>>;
|
|
@@ -31722,12 +31722,37 @@ async function executeVideoStatus(options) {
|
|
|
31722
31722
|
} = options;
|
|
31723
31723
|
try {
|
|
31724
31724
|
const envKeyMap = {
|
|
31725
|
+
grok: "XAI_API_KEY",
|
|
31725
31726
|
runway: "RUNWAY_API_SECRET",
|
|
31726
|
-
kling: "KLING_API_KEY"
|
|
31727
|
+
kling: "KLING_API_KEY",
|
|
31728
|
+
veo: "GOOGLE_API_KEY"
|
|
31727
31729
|
};
|
|
31728
31730
|
const key = apiKey || process.env[envKeyMap[provider] || ""];
|
|
31729
31731
|
if (!key) return { success: false, error: `${envKeyMap[provider]} required` };
|
|
31730
|
-
if (provider === "
|
|
31732
|
+
if (provider === "grok") {
|
|
31733
|
+
const grok = new GrokProvider();
|
|
31734
|
+
await grok.initialize({ apiKey: key });
|
|
31735
|
+
let result = await grok.getGenerationStatus(taskId);
|
|
31736
|
+
if (wait && result.status !== "completed" && result.status !== "failed") {
|
|
31737
|
+
result = await grok.waitForCompletion(taskId, () => {
|
|
31738
|
+
});
|
|
31739
|
+
}
|
|
31740
|
+
let outputPath;
|
|
31741
|
+
if (output && result.videoUrl) {
|
|
31742
|
+
const buffer = await downloadVideo(result.videoUrl);
|
|
31743
|
+
outputPath = resolve19(process.cwd(), output);
|
|
31744
|
+
await writeFile14(outputPath, buffer);
|
|
31745
|
+
}
|
|
31746
|
+
return {
|
|
31747
|
+
success: true,
|
|
31748
|
+
taskId,
|
|
31749
|
+
status: result.status,
|
|
31750
|
+
progress: result.progress,
|
|
31751
|
+
videoUrl: result.videoUrl,
|
|
31752
|
+
outputPath,
|
|
31753
|
+
error: result.error
|
|
31754
|
+
};
|
|
31755
|
+
} else if (provider === "runway") {
|
|
31731
31756
|
const runway = new RunwayProvider();
|
|
31732
31757
|
await runway.initialize({ apiKey: key });
|
|
31733
31758
|
let result = await runway.getGenerationStatus(taskId);
|
|
@@ -31769,7 +31794,31 @@ async function executeVideoStatus(options) {
|
|
|
31769
31794
|
status: result.status,
|
|
31770
31795
|
videoUrl: result.videoUrl,
|
|
31771
31796
|
duration: result.duration,
|
|
31772
|
-
outputPath
|
|
31797
|
+
outputPath,
|
|
31798
|
+
error: result.error
|
|
31799
|
+
};
|
|
31800
|
+
} else if (provider === "veo") {
|
|
31801
|
+
const gemini = new GeminiProvider();
|
|
31802
|
+
await gemini.initialize({ apiKey: key });
|
|
31803
|
+
let result = await gemini.getGenerationStatus(taskId);
|
|
31804
|
+
if (wait && result.status !== "completed" && result.status !== "failed" && result.status !== "cancelled") {
|
|
31805
|
+
result = await gemini.waitForVideoCompletion(taskId, () => {
|
|
31806
|
+
});
|
|
31807
|
+
}
|
|
31808
|
+
let outputPath;
|
|
31809
|
+
if (output && result.videoUrl) {
|
|
31810
|
+
const buffer = await downloadVideo(result.videoUrl, key);
|
|
31811
|
+
outputPath = resolve19(process.cwd(), output);
|
|
31812
|
+
await writeFile14(outputPath, buffer);
|
|
31813
|
+
}
|
|
31814
|
+
return {
|
|
31815
|
+
success: true,
|
|
31816
|
+
taskId,
|
|
31817
|
+
status: result.status,
|
|
31818
|
+
progress: result.progress,
|
|
31819
|
+
videoUrl: result.videoUrl,
|
|
31820
|
+
outputPath,
|
|
31821
|
+
error: result.error
|
|
31773
31822
|
};
|
|
31774
31823
|
}
|
|
31775
31824
|
return { success: false, error: `Unsupported provider: ${provider}` };
|
|
@@ -32347,7 +32396,7 @@ function resolveRefreshOutput(record, opts) {
|
|
|
32347
32396
|
return record.outputPath ? resolve21(record.outputPath) : void 0;
|
|
32348
32397
|
}
|
|
32349
32398
|
function liveSupport(record) {
|
|
32350
|
-
if (record.jobType === "generate-video" && (record.provider === "runway" || record.provider === "kling")) {
|
|
32399
|
+
if (record.jobType === "generate-video" && (record.provider === "grok" || record.provider === "runway" || record.provider === "kling" || record.provider === "veo")) {
|
|
32351
32400
|
return { supported: true };
|
|
32352
32401
|
}
|
|
32353
32402
|
if (record.jobType === "generate-music" && record.provider === "replicate") {
|
|
@@ -32729,7 +32778,9 @@ function isActiveStatus(status) {
|
|
|
32729
32778
|
}
|
|
32730
32779
|
function providerStatusCommand(record) {
|
|
32731
32780
|
if (record.jobType === "generate-video") {
|
|
32732
|
-
if (record.provider !== "runway" && record.provider !== "kling"
|
|
32781
|
+
if (record.provider !== "grok" && record.provider !== "runway" && record.provider !== "kling" && record.provider !== "veo") {
|
|
32782
|
+
return void 0;
|
|
32783
|
+
}
|
|
32733
32784
|
const type = record.provider === "kling" && record.providerTaskType ? ` --type ${record.providerTaskType}` : "";
|
|
32734
32785
|
return `vibe generate video-status ${record.providerTaskId} -p ${record.provider}${type} --json`;
|
|
32735
32786
|
}
|
|
@@ -42391,7 +42442,10 @@ function getStatusColor(status) {
|
|
|
42391
42442
|
}
|
|
42392
42443
|
}
|
|
42393
42444
|
function registerVideoStatusCommand(parent) {
|
|
42394
|
-
parent.command("video-status", { hidden: true }).description("Check video generation status (Grok, Runway, or
|
|
42445
|
+
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(
|
|
42446
|
+
"-k, --api-key <key>",
|
|
42447
|
+
"API key (or set XAI_API_KEY / RUNWAY_API_SECRET / KLING_API_KEY / GOOGLE_API_KEY env)"
|
|
42448
|
+
).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) => {
|
|
42395
42449
|
const startedAt = Date.now();
|
|
42396
42450
|
try {
|
|
42397
42451
|
const provider = (options.provider || "grok").toLowerCase();
|
|
@@ -42451,18 +42505,12 @@ function registerVideoStatusCommand(parent) {
|
|
|
42451
42505
|
downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
|
|
42452
42506
|
} catch (err) {
|
|
42453
42507
|
downloadSpinner.fail(
|
|
42454
|
-
source_default.red(
|
|
42455
|
-
`Failed to download video: ${err instanceof Error ? err.message : err}`
|
|
42456
|
-
)
|
|
42508
|
+
source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
|
|
42457
42509
|
);
|
|
42458
42510
|
}
|
|
42459
42511
|
}
|
|
42460
42512
|
} else if (provider === "runway") {
|
|
42461
|
-
const apiKey = await requireApiKey(
|
|
42462
|
-
"RUNWAY_API_SECRET",
|
|
42463
|
-
"Runway",
|
|
42464
|
-
options.apiKey
|
|
42465
|
-
);
|
|
42513
|
+
const apiKey = await requireApiKey("RUNWAY_API_SECRET", "Runway", options.apiKey);
|
|
42466
42514
|
const spinner2 = ora("Checking status...").start();
|
|
42467
42515
|
const runway = new RunwayProvider();
|
|
42468
42516
|
await runway.initialize({ apiKey });
|
|
@@ -42523,9 +42571,7 @@ function registerVideoStatusCommand(parent) {
|
|
|
42523
42571
|
downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
|
|
42524
42572
|
} catch (err) {
|
|
42525
42573
|
downloadSpinner.fail(
|
|
42526
|
-
source_default.red(
|
|
42527
|
-
`Failed to download video: ${err instanceof Error ? err.message : err}`
|
|
42528
|
-
)
|
|
42574
|
+
source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
|
|
42529
42575
|
);
|
|
42530
42576
|
}
|
|
42531
42577
|
}
|
|
@@ -42591,15 +42637,77 @@ function registerVideoStatusCommand(parent) {
|
|
|
42591
42637
|
downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
|
|
42592
42638
|
} catch (err) {
|
|
42593
42639
|
downloadSpinner.fail(
|
|
42594
|
-
source_default.red(
|
|
42595
|
-
|
|
42596
|
-
|
|
42640
|
+
source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
|
|
42641
|
+
);
|
|
42642
|
+
}
|
|
42643
|
+
}
|
|
42644
|
+
} else if (provider === "veo") {
|
|
42645
|
+
const apiKey = await requireApiKey("GOOGLE_API_KEY", "Google", options.apiKey);
|
|
42646
|
+
const spinner2 = ora("Checking status...").start();
|
|
42647
|
+
const gemini = new GeminiProvider();
|
|
42648
|
+
await gemini.initialize({ apiKey });
|
|
42649
|
+
let result = await gemini.getGenerationStatus(taskId);
|
|
42650
|
+
if (options.wait && result.status !== "completed" && result.status !== "failed" && result.status !== "cancelled") {
|
|
42651
|
+
spinner2.text = "Waiting for completion...";
|
|
42652
|
+
result = await gemini.waitForVideoCompletion(taskId, (status) => {
|
|
42653
|
+
spinner2.text = status.progress !== void 0 ? `Generating... ${status.progress}%` : `Generating... ${status.status}`;
|
|
42654
|
+
});
|
|
42655
|
+
}
|
|
42656
|
+
spinner2.stop();
|
|
42657
|
+
if (isJsonMode()) {
|
|
42658
|
+
let outputPath;
|
|
42659
|
+
if (options.output && result.videoUrl) {
|
|
42660
|
+
const buffer = await downloadVideo(result.videoUrl, apiKey);
|
|
42661
|
+
outputPath = resolve47(process.cwd(), options.output);
|
|
42662
|
+
await writeFile35(outputPath, buffer);
|
|
42663
|
+
}
|
|
42664
|
+
outputSuccess({
|
|
42665
|
+
command: "generate video-status",
|
|
42666
|
+
startedAt,
|
|
42667
|
+
data: {
|
|
42668
|
+
taskId,
|
|
42669
|
+
provider: "veo",
|
|
42670
|
+
status: result.status,
|
|
42671
|
+
videoUrl: result.videoUrl,
|
|
42672
|
+
progress: result.progress,
|
|
42673
|
+
error: result.error,
|
|
42674
|
+
outputPath
|
|
42675
|
+
}
|
|
42676
|
+
});
|
|
42677
|
+
return;
|
|
42678
|
+
}
|
|
42679
|
+
console.log();
|
|
42680
|
+
console.log(source_default.bold.cyan("Generation Status"));
|
|
42681
|
+
console.log(source_default.dim("\u2500".repeat(60)));
|
|
42682
|
+
console.log(`Task ID: ${taskId}`);
|
|
42683
|
+
console.log(`Provider: Veo`);
|
|
42684
|
+
console.log(`Status: ${getStatusColor(result.status)}`);
|
|
42685
|
+
if (result.progress !== void 0) {
|
|
42686
|
+
console.log(`Progress: ${result.progress}%`);
|
|
42687
|
+
}
|
|
42688
|
+
if (result.videoUrl) {
|
|
42689
|
+
console.log(`Video URL: ${result.videoUrl}`);
|
|
42690
|
+
}
|
|
42691
|
+
if (result.error) {
|
|
42692
|
+
console.log(`Error: ${source_default.red(result.error)}`);
|
|
42693
|
+
}
|
|
42694
|
+
console.log();
|
|
42695
|
+
if (options.output && result.videoUrl) {
|
|
42696
|
+
const downloadSpinner = ora("Downloading video...").start();
|
|
42697
|
+
try {
|
|
42698
|
+
const buffer = await downloadVideo(result.videoUrl, apiKey);
|
|
42699
|
+
const outputPath = resolve47(process.cwd(), options.output);
|
|
42700
|
+
await writeFile35(outputPath, buffer);
|
|
42701
|
+
downloadSpinner.succeed(source_default.green(`Saved to: ${outputPath}`));
|
|
42702
|
+
} catch (err) {
|
|
42703
|
+
downloadSpinner.fail(
|
|
42704
|
+
source_default.red(`Failed to download video: ${err instanceof Error ? err.message : err}`)
|
|
42597
42705
|
);
|
|
42598
42706
|
}
|
|
42599
42707
|
}
|
|
42600
42708
|
} else {
|
|
42601
42709
|
exitWithError(
|
|
42602
|
-
usageError(`Invalid provider: ${provider}. Use grok, runway, or
|
|
42710
|
+
usageError(`Invalid provider: ${provider}. Use grok, runway, kling, or veo.`)
|
|
42603
42711
|
);
|
|
42604
42712
|
}
|
|
42605
42713
|
} catch (error) {
|
|
@@ -55529,10 +55637,10 @@ var generateVideoStatusTool = defineTool({
|
|
|
55529
55637
|
name: "generate_video_status",
|
|
55530
55638
|
category: "generate",
|
|
55531
55639
|
cost: "free",
|
|
55532
|
-
description: "Check video generation status for Runway or
|
|
55640
|
+
description: "Check video generation status for Grok, Runway, Kling, or Veo tasks.",
|
|
55533
55641
|
schema: external_exports.object({
|
|
55534
55642
|
taskId: external_exports.string().describe("Task ID from video generation"),
|
|
55535
|
-
provider: external_exports.enum(["runway", "kling"]).optional().describe("Provider (default: runway)"),
|
|
55643
|
+
provider: external_exports.enum(["grok", "runway", "kling", "veo"]).optional().describe("Provider (default: runway)"),
|
|
55536
55644
|
taskType: external_exports.enum(["text2video", "image2video"]).optional().describe("Kling task type (default: text2video)"),
|
|
55537
55645
|
wait: external_exports.boolean().optional().describe("Wait for completion"),
|
|
55538
55646
|
output: external_exports.string().optional().describe("Download video when complete")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeframe/cli",
|
|
3
|
-
"version": "0.106.
|
|
3
|
+
"version": "0.106.3",
|
|
4
4
|
"description": "VibeFrame CLI - natural language video editing from the terminal",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"tsx": "^4.21.0",
|
|
84
84
|
"typescript": "^5.3.3",
|
|
85
85
|
"vitest": "^1.2.2",
|
|
86
|
-
"@vibeframe/
|
|
87
|
-
"@vibeframe/
|
|
86
|
+
"@vibeframe/ai-providers": "0.106.3",
|
|
87
|
+
"@vibeframe/core": "0.106.3"
|
|
88
88
|
},
|
|
89
89
|
"engines": {
|
|
90
90
|
"node": ">=20"
|