videodraft 0.13.2 → 0.14.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.
- package/README.md +10 -0
- package/dist/client.d.ts +4 -2
- package/dist/client.js +20 -4
- package/dist/index.js +117 -15
- package/package.json +2 -2
- package/skills/index.json +6 -6
- package/skills/videodraft/SKILL.md +10 -0
- package/skills/videodraft/references/models.md +6 -4
- package/skills/videodraft/references/pipeline.md +2 -0
package/README.md
CHANGED
|
@@ -91,9 +91,19 @@ videodraft create "<idea>" --ar 9:16 # idea → script → visual ass
|
|
|
91
91
|
videodraft shots <project> --grid --estimate # preview the cost…
|
|
92
92
|
videodraft shots <project> --grid # …then batch-generate every shot image
|
|
93
93
|
videodraft produce <project> # voiceovers + captions + production timeline
|
|
94
|
+
videodraft produce <project> --mode full_video --allow-real-people
|
|
94
95
|
videodraft export <project> --download final.mp4
|
|
95
96
|
```
|
|
96
97
|
|
|
98
|
+
Seedance 2.x uses Byteplus only at the default lower price. If supplied visual
|
|
99
|
+
input media, including a start/end frame or image/video reference, visibly
|
|
100
|
+
contains a real identifiable person, pass
|
|
101
|
+
`--allow-real-people` on the first request. It keeps Byteplus first, permits a
|
|
102
|
+
submit-time Fal fallback, and uses Fal's higher tier-specific rate. If an
|
|
103
|
+
unflagged request returns `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, estimate the
|
|
104
|
+
higher rate and retry once with the flag. Do not loop if it was already set;
|
|
105
|
+
late Byteplus output refusals are refunded but cannot be rerouted.
|
|
106
|
+
|
|
97
107
|
## Commands
|
|
98
108
|
|
|
99
109
|
| Group | Commands |
|
package/dist/client.d.ts
CHANGED
|
@@ -277,7 +277,9 @@ declare class CliError extends Error {
|
|
|
277
277
|
exitCode: number;
|
|
278
278
|
/** One-line remediation shown under the error (human mode only). */
|
|
279
279
|
hint?: string;
|
|
280
|
-
|
|
280
|
+
/** Optional machine-readable server recovery contract. */
|
|
281
|
+
data?: unknown;
|
|
282
|
+
constructor(message: string, exitCode?: number, hint?: string, data?: unknown);
|
|
281
283
|
}
|
|
282
284
|
declare class AuthError extends CliError {
|
|
283
285
|
constructor(message?: string);
|
|
@@ -291,7 +293,7 @@ declare class RpcError extends CliError {
|
|
|
291
293
|
/** A tools/call result that came back isError:true. */
|
|
292
294
|
declare class ToolError extends CliError {
|
|
293
295
|
toolName: string;
|
|
294
|
-
constructor(toolName: string, message: string);
|
|
296
|
+
constructor(toolName: string, message: string, data?: unknown);
|
|
295
297
|
}
|
|
296
298
|
declare class TimeoutError extends CliError {
|
|
297
299
|
constructor(message: string);
|
package/dist/client.js
CHANGED
|
@@ -10,11 +10,14 @@ var CliError = class extends Error {
|
|
|
10
10
|
exitCode;
|
|
11
11
|
/** One-line remediation shown under the error (human mode only). */
|
|
12
12
|
hint;
|
|
13
|
-
|
|
13
|
+
/** Optional machine-readable server recovery contract. */
|
|
14
|
+
data;
|
|
15
|
+
constructor(message, exitCode = EXIT.ERROR, hint, data) {
|
|
14
16
|
super(message);
|
|
15
17
|
this.name = "CliError";
|
|
16
18
|
this.exitCode = exitCode;
|
|
17
19
|
this.hint = hint;
|
|
20
|
+
this.data = data;
|
|
18
21
|
}
|
|
19
22
|
};
|
|
20
23
|
var AuthError = class extends CliError {
|
|
@@ -40,17 +43,26 @@ var RpcError = class extends CliError {
|
|
|
40
43
|
var CREDIT_ERROR_RE = /insufficient credits|not enough credits|credit balance/i;
|
|
41
44
|
var ToolError = class extends CliError {
|
|
42
45
|
toolName;
|
|
43
|
-
constructor(toolName, message) {
|
|
46
|
+
constructor(toolName, message, data) {
|
|
44
47
|
const isCredits = CREDIT_ERROR_RE.test(message);
|
|
48
|
+
const realPersonHint = seedanceRealPersonRetryHint(data);
|
|
45
49
|
super(
|
|
46
50
|
message,
|
|
47
51
|
isCredits ? EXIT.CREDITS : EXIT.ERROR,
|
|
48
|
-
isCredits ? "Check your balance with `videodraft credits` or top up at https://app.videodraft.ai/pricing" :
|
|
52
|
+
isCredits ? "Check your balance with `videodraft credits` or top up at https://app.videodraft.ai/pricing" : realPersonHint,
|
|
53
|
+
data
|
|
49
54
|
);
|
|
50
55
|
this.name = "ToolError";
|
|
51
56
|
this.toolName = toolName;
|
|
52
57
|
}
|
|
53
58
|
};
|
|
59
|
+
function seedanceRealPersonRetryHint(value) {
|
|
60
|
+
const payload = value;
|
|
61
|
+
if (payload?.code !== "SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED" && payload?.retry_with?.allow_real_people !== true) {
|
|
62
|
+
return void 0;
|
|
63
|
+
}
|
|
64
|
+
return "Retry this Seedance request once with --allow-real-people. This uses higher Fal-tier pricing.";
|
|
65
|
+
}
|
|
54
66
|
var TimeoutError = class extends CliError {
|
|
55
67
|
constructor(message) {
|
|
56
68
|
super(message, EXIT.ERROR);
|
|
@@ -383,7 +395,11 @@ var VideoDraftClient = class {
|
|
|
383
395
|
);
|
|
384
396
|
const text = result?.content?.[0]?.text ?? "";
|
|
385
397
|
if (result?.isError) {
|
|
386
|
-
throw new ToolError(
|
|
398
|
+
throw new ToolError(
|
|
399
|
+
name,
|
|
400
|
+
text.replace(/^Error:\s*/, "") || `Tool ${name} failed`,
|
|
401
|
+
result.structuredContent
|
|
402
|
+
);
|
|
387
403
|
}
|
|
388
404
|
try {
|
|
389
405
|
return JSON.parse(text);
|