@clipwright/core 0.65.0 → 0.67.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/dist/ad-guide.d.ts +2 -1
- package/dist/ad-guide.js +1 -1
- package/dist/ads.d.ts +4 -0
- package/dist/ads.js +4 -1
- package/dist/film-cut.js +2 -1
- package/dist/film-guide.d.ts +4 -0
- package/dist/film-guide.js +5 -0
- package/dist/generations.d.ts +5 -1
- package/dist/generations.js +22 -5
- package/dist/own-agent-price.d.ts +1 -1
- package/dist/own-agent-price.js +2 -2
- package/dist/own-agent-runs.d.ts +2 -0
- package/dist/own-agent-runs.js +7 -2
- package/package.json +1 -1
package/dist/ad-guide.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const AD_GUIDE_PATH = "/v1/ad-guide";
|
|
3
|
-
export declare const AD_GUIDE_SECTION_IDS: readonly ["ugc", "order", "script", "product_sheet", "photo_edit", "hero", "location", "props", "states", "models", "motion_test", "shot_list", "devices", "takes", "audit", "repair", "edit", "final_check", "spend"];
|
|
3
|
+
export declare const AD_GUIDE_SECTION_IDS: readonly ["ugc", "order", "script", "product_sheet", "photo_edit", "hero", "location", "props", "states", "board", "models", "motion_test", "shot_list", "devices", "takes", "audit", "repair", "edit", "final_check", "spend"];
|
|
4
4
|
export type AdGuideSectionId = (typeof AD_GUIDE_SECTION_IDS)[number];
|
|
5
5
|
export declare const adGuideQuery: z.ZodObject<{
|
|
6
6
|
section: z.ZodOptional<z.ZodEnum<{
|
|
7
7
|
audit: "audit";
|
|
8
|
+
board: "board";
|
|
8
9
|
devices: "devices";
|
|
9
10
|
edit: "edit";
|
|
10
11
|
final_check: "final_check";
|
package/dist/ad-guide.js
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { brandGuideBlock } from "./design.js";
|
|
3
3
|
import { guideCatalog } from "./film-guide.js";
|
|
4
4
|
export const AD_GUIDE_PATH = "/v1/ad-guide";
|
|
5
|
-
export const AD_GUIDE_SECTION_IDS = ["ugc", "order", "script", "product_sheet", "photo_edit", "hero", "location", "props", "states", "models",
|
|
5
|
+
export const AD_GUIDE_SECTION_IDS = ["ugc", "order", "script", "product_sheet", "photo_edit", "hero", "location", "props", "states", "board", "models",
|
|
6
6
|
"motion_test", "shot_list", "devices", "takes", "audit", "repair", "edit", "final_check", "spend"];
|
|
7
7
|
export const adGuideQuery = z.strictObject({
|
|
8
8
|
section: z.enum(AD_GUIDE_SECTION_IDS).optional()
|
package/dist/ads.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type AdBrief = z.infer<typeof adBrief>;
|
|
|
17
17
|
export declare const adSlot: z.ZodObject<{
|
|
18
18
|
id: z.ZodString;
|
|
19
19
|
shot: z.ZodString;
|
|
20
|
+
people_only: z.ZodOptional<z.ZodBoolean>;
|
|
20
21
|
}, z.core.$strict>;
|
|
21
22
|
export type AdSlot = z.infer<typeof adSlot>;
|
|
22
23
|
export declare const createAdInput: z.ZodObject<{
|
|
@@ -29,6 +30,7 @@ export declare const createAdInput: z.ZodObject<{
|
|
|
29
30
|
slots: z.ZodArray<z.ZodObject<{
|
|
30
31
|
id: z.ZodString;
|
|
31
32
|
shot: z.ZodString;
|
|
33
|
+
people_only: z.ZodOptional<z.ZodBoolean>;
|
|
32
34
|
}, z.core.$strict>>;
|
|
33
35
|
}, z.core.$strict>;
|
|
34
36
|
export type CreateAdInput = z.infer<typeof createAdInput>;
|
|
@@ -42,6 +44,7 @@ export declare const updateAdInput: z.ZodObject<{
|
|
|
42
44
|
slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
43
45
|
id: z.ZodString;
|
|
44
46
|
shot: z.ZodString;
|
|
47
|
+
people_only: z.ZodOptional<z.ZodBoolean>;
|
|
45
48
|
}, z.core.$strict>>>;
|
|
46
49
|
}, z.core.$strict>;
|
|
47
50
|
export type UpdateAdInput = z.infer<typeof updateAdInput>;
|
|
@@ -123,6 +126,7 @@ export declare const adRecord: z.ZodObject<{
|
|
|
123
126
|
slots: z.ZodArray<z.ZodObject<{
|
|
124
127
|
id: z.ZodString;
|
|
125
128
|
shot: z.ZodString;
|
|
129
|
+
people_only: z.ZodBoolean;
|
|
126
130
|
state: z.ZodEnum<{
|
|
127
131
|
checking: "checking";
|
|
128
132
|
failed: "failed";
|
package/dist/ads.js
CHANGED
|
@@ -20,6 +20,9 @@ export const adBrief = z.strictObject({
|
|
|
20
20
|
export const adSlot = z.strictObject({
|
|
21
21
|
id: adSlotId,
|
|
22
22
|
shot: z.string().trim().min(1).max(500).describe("What the shot shows, in a line: its action and the spoken line it carries"),
|
|
23
|
+
people_only: z.boolean().optional().describe("Only people in this shot, with no product, label or detail anywhere in it (a face for " +
|
|
24
|
+
"the hook, a person talking): a take made with generate_video goes into the edit without check_take. Once a slot has a check, this " +
|
|
25
|
+
"cannot be turned on"),
|
|
23
26
|
});
|
|
24
27
|
const slots = z.array(adSlot).min(1).max(AD_MAX_SLOTS)
|
|
25
28
|
.refine(list => new Set(list.map(slot => slot.id)).size === list.length, "each slot id is used once")
|
|
@@ -48,7 +51,7 @@ export const adRecord = z.strictObject({
|
|
|
48
51
|
ad_id: adId,
|
|
49
52
|
brief: adBrief,
|
|
50
53
|
guide_version: z.string(),
|
|
51
|
-
slots: z.array(z.strictObject({ id: adSlotId, shot: z.string(), state: z.enum(AD_SLOT_STATES), takes: z.array(adTake) })),
|
|
54
|
+
slots: z.array(z.strictObject({ id: adSlotId, shot: z.string(), people_only: z.boolean(), state: z.enum(AD_SLOT_STATES), takes: z.array(adTake) })),
|
|
52
55
|
edits: z.array(z.strictObject({ run_id: runId, state: z.string(), credits_charged: z.number().int().nonnegative().nullable(), created_at: z.string() })),
|
|
53
56
|
next: diyNext.nullable(),
|
|
54
57
|
blocked: diyBlocked.nullable(),
|
package/dist/film-cut.js
CHANGED
|
@@ -163,6 +163,7 @@ export const filmCutCheck = z.strictObject({
|
|
|
163
163
|
live_sec: z.number().nonnegative(),
|
|
164
164
|
}).nullable(),
|
|
165
165
|
warnings: z.array(z.string()),
|
|
166
|
-
next: diyNext.optional().describe("A passed sheet: its quote_cut; a take not yet cleared to play: its check_take quote"
|
|
166
|
+
next: diyNext.optional().describe("A passed sheet: its quote_cut; a take not yet cleared to play: its check_take quote; a refused " +
|
|
167
|
+
"sheet: check_cut again, add naming the fields to fix"),
|
|
167
168
|
blocked: diyBlocked.optional().describe("Why a take of the cut cannot play yet, and what unblocks it"),
|
|
168
169
|
});
|
package/dist/film-guide.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ export declare const guideCatalog: z.ZodArray<z.ZodObject<{
|
|
|
24
24
|
version: z.ZodString;
|
|
25
25
|
}, z.core.$strict>>;
|
|
26
26
|
export type GuideCatalog = z.infer<typeof guideCatalog>;
|
|
27
|
+
export declare function guideModesOf(guides: GuideCatalog | undefined): {
|
|
28
|
+
adGuide: boolean;
|
|
29
|
+
facelessDiy: boolean;
|
|
30
|
+
};
|
|
27
31
|
export declare const filmGuideQuery: z.ZodObject<{
|
|
28
32
|
format: z.ZodOptional<z.ZodEnum<{
|
|
29
33
|
cartoon: "cartoon";
|
package/dist/film-guide.js
CHANGED
|
@@ -27,6 +27,11 @@ export const guideCatalog = z.array(z.strictObject({
|
|
|
27
27
|
use_when: z.string().min(1),
|
|
28
28
|
version: z.string().regex(/^[a-f0-9]{12}$/),
|
|
29
29
|
})).describe("Every guide this account can read, each with its version: read the one that fits the video before its first tool call");
|
|
30
|
+
export function guideModesOf(guides) {
|
|
31
|
+
const listed = guides ?? [];
|
|
32
|
+
return { adGuide: listed.some(entry => entry.tool === "get_ad_guide"),
|
|
33
|
+
facelessDiy: listed.some(entry => entry.tool === "get_film_guide" && entry.format !== undefined && entry.format !== "explainer") };
|
|
34
|
+
}
|
|
30
35
|
export const filmGuideQuery = z.strictObject({
|
|
31
36
|
format: z.enum(FILM_GUIDE_FORMATS).optional().describe("The video to make: explainer (the default, a coded film), story, list (facts or " +
|
|
32
37
|
"tips), own_pictures (the user's own pictures) or cartoon (a drawn hero in generated pictures)"),
|
package/dist/generations.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const GENERATE_IMAGE_QUOTE_PATH = "/v1/skills/generate_image/quot
|
|
|
4
4
|
export declare const GENERATE_IMAGE_RUN_PATH = "/v1/skills/generate_image/run";
|
|
5
5
|
export declare const GENERATE_VIDEO_QUOTE_PATH = "/v1/skills/generate_video/quote";
|
|
6
6
|
export declare const GENERATE_VIDEO_RUN_PATH = "/v1/skills/generate_video/run";
|
|
7
|
-
export declare const GENERATION_IMAGE_MODELS: readonly ["seedream-5.0-flash", "flare", "gemini-3-pro-image", "gemini-nano-banana-2.1"];
|
|
7
|
+
export declare const GENERATION_IMAGE_MODELS: readonly ["seedream-5.0-flash", "seedream-5.5", "flare", "gemini-3-pro-image", "gemini-nano-banana-2.1"];
|
|
8
8
|
export declare const GENERATION_VIDEO_MODELS: readonly ["seedance-2.0", "seedance-2.0-mini", "seedance-2.0-fast", "seedance-2.5", "seedance-2.5-flash", "kling-3.0", "kling-4.0", "kling-4.0-flash", "gemini-omni-flash-1.1", "gemini-omni-flash-1.2"];
|
|
9
9
|
export type GenerationImageModel = (typeof GENERATION_IMAGE_MODELS)[number];
|
|
10
10
|
export type GenerationVideoModel = (typeof GENERATION_VIDEO_MODELS)[number];
|
|
@@ -44,6 +44,7 @@ export interface GenerationVideoRow {
|
|
|
44
44
|
export interface GenerationImageCapability {
|
|
45
45
|
kind: "image";
|
|
46
46
|
max_references?: number;
|
|
47
|
+
min_references?: number;
|
|
47
48
|
rows: readonly GenerationImageRow[];
|
|
48
49
|
}
|
|
49
50
|
export interface GenerationVideoCapability {
|
|
@@ -87,6 +88,7 @@ export declare const generateImageRequest: z.ZodObject<{
|
|
|
87
88
|
"gemini-3-pro-image": "gemini-3-pro-image";
|
|
88
89
|
"gemini-nano-banana-2.1": "gemini-nano-banana-2.1";
|
|
89
90
|
"seedream-5.0-flash": "seedream-5.0-flash";
|
|
91
|
+
"seedream-5.5": "seedream-5.5";
|
|
90
92
|
}>;
|
|
91
93
|
aspect_ratio: z.ZodEnum<{
|
|
92
94
|
"16:9": "16:9";
|
|
@@ -301,6 +303,7 @@ declare const listedModel: z.ZodObject<{
|
|
|
301
303
|
}, z.core.$strict>>;
|
|
302
304
|
duration_values: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
303
305
|
max_references: z.ZodNumber;
|
|
306
|
+
min_references: z.ZodOptional<z.ZodNumber>;
|
|
304
307
|
audio: z.ZodOptional<z.ZodLiteral<true>>;
|
|
305
308
|
rows: z.ZodArray<z.ZodObject<{
|
|
306
309
|
aspect_ratio: z.ZodString;
|
|
@@ -338,6 +341,7 @@ export declare const generationModels: z.ZodObject<{
|
|
|
338
341
|
}, z.core.$strict>>;
|
|
339
342
|
duration_values: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
340
343
|
max_references: z.ZodNumber;
|
|
344
|
+
min_references: z.ZodOptional<z.ZodNumber>;
|
|
341
345
|
audio: z.ZodOptional<z.ZodLiteral<true>>;
|
|
342
346
|
rows: z.ZodArray<z.ZodObject<{
|
|
343
347
|
aspect_ratio: z.ZodString;
|
package/dist/generations.js
CHANGED
|
@@ -10,7 +10,7 @@ export const GENERATE_IMAGE_QUOTE_PATH = "/v1/skills/generate_image/quote";
|
|
|
10
10
|
export const GENERATE_IMAGE_RUN_PATH = "/v1/skills/generate_image/run";
|
|
11
11
|
export const GENERATE_VIDEO_QUOTE_PATH = "/v1/skills/generate_video/quote";
|
|
12
12
|
export const GENERATE_VIDEO_RUN_PATH = "/v1/skills/generate_video/run";
|
|
13
|
-
export const GENERATION_IMAGE_MODELS = ["seedream-5.0-flash", "flare", "gemini-3-pro-image", "gemini-nano-banana-2.1"];
|
|
13
|
+
export const GENERATION_IMAGE_MODELS = ["seedream-5.0-flash", "seedream-5.5", "flare", "gemini-3-pro-image", "gemini-nano-banana-2.1"];
|
|
14
14
|
export const GENERATION_VIDEO_MODELS = [
|
|
15
15
|
"seedance-2.0", "seedance-2.0-mini", "seedance-2.0-fast", "seedance-2.5", "seedance-2.5-flash", "kling-3.0", "kling-4.0", "kling-4.0-flash",
|
|
16
16
|
"gemini-omni-flash-1.1", "gemini-omni-flash-1.2",
|
|
@@ -56,9 +56,14 @@ export const GENERATION_CAPABILITIES = deepFreeze({
|
|
|
56
56
|
kind: "image",
|
|
57
57
|
rows: [image("9:16", 1440, 2560, 5, true), image("16:9", 2560, 1440, 5, true), image("1:1", 2048, 2048, 5, true)],
|
|
58
58
|
},
|
|
59
|
+
"seedream-5.5": {
|
|
60
|
+
kind: "image",
|
|
61
|
+
min_references: 1,
|
|
62
|
+
rows: [image("9:16", 1440, 2560, 17, true), image("21:9", 3024, 1296, 17, true)],
|
|
63
|
+
},
|
|
59
64
|
flare: {
|
|
60
65
|
kind: "image",
|
|
61
|
-
rows: [image("9:16", 1008, 1792,
|
|
66
|
+
rows: [image("9:16", 1008, 1792, 7, true), image("16:9", 1792, 1008, 7), image("1:1", 1024, 1024, 7), image("21:9", 2352, 1008, 16, true)],
|
|
62
67
|
},
|
|
63
68
|
"gemini-3-pro-image": {
|
|
64
69
|
kind: "image",
|
|
@@ -179,19 +184,26 @@ export function withNoTextClause(promptText, options) {
|
|
|
179
184
|
return `${promptText}\n${GENERATION_NO_TEXT_CLAUSE}`;
|
|
180
185
|
}
|
|
181
186
|
const imageMaxReferences = (model) => GENERATION_CAPABILITIES[model].max_references ?? GENERATION_MAX_REFERENCES;
|
|
187
|
+
const imageMinReferences = (model) => GENERATION_CAPABILITIES[model].min_references ?? 0;
|
|
182
188
|
export const generateImageRequest = z.strictObject({
|
|
183
189
|
prompt,
|
|
184
190
|
keep_text: keepText,
|
|
185
191
|
model: z.enum(GENERATION_IMAGE_MODELS),
|
|
186
192
|
aspect_ratio: z.enum(GENERATION_IMAGE_ASPECTS),
|
|
187
193
|
references: z.array(generationReference).max(Math.max(...GENERATION_IMAGE_MODELS.map(imageMaxReferences))).optional()
|
|
188
|
-
.describe("Pictures the image is made from; each model takes up to its max_references
|
|
194
|
+
.describe("Pictures the image is made from; each model takes up to its max_references, and at least its min_references where it " +
|
|
195
|
+
"lists one (list_generation_models)."),
|
|
189
196
|
max_credits: maxCreditsField,
|
|
190
197
|
}).superRefine((request, context) => {
|
|
191
198
|
const most = imageMaxReferences(request.model);
|
|
192
|
-
|
|
199
|
+
const count = request.references?.length ?? 0;
|
|
200
|
+
if (count > most) {
|
|
193
201
|
context.addIssue({ code: z.ZodIssueCode.custom, path: ["references"], message: `${request.model} takes up to ${most} references` });
|
|
194
202
|
}
|
|
203
|
+
if (count < imageMinReferences(request.model)) {
|
|
204
|
+
context.addIssue({ code: z.ZodIssueCode.custom, path: ["references"],
|
|
205
|
+
message: `${request.model} cleans up a picture: pass the picture, and any product photos, as references` });
|
|
206
|
+
}
|
|
195
207
|
});
|
|
196
208
|
const SHOT_DESCRIPTION = "The clip as a shot, in place of prompt: framing, subject, start_state, timed beats, camera, light and " +
|
|
197
209
|
"continuity. Write every field as what the frame shows: a state reads \"her fingertips are clean\", never as an absence.";
|
|
@@ -273,6 +285,8 @@ export function findCapabilityRow(request) {
|
|
|
273
285
|
return row?.measured ? { kind: "video", model: request.model, capability, row } : null;
|
|
274
286
|
}
|
|
275
287
|
const capability = GENERATION_CAPABILITIES[request.model];
|
|
288
|
+
if ((request.references?.length ?? 0) < imageMinReferences(request.model))
|
|
289
|
+
return null;
|
|
276
290
|
const row = capability.rows.find((one) => one.aspect_ratio === request.aspect_ratio);
|
|
277
291
|
return row?.measured ? { kind: "image", model: request.model, capability, row } : null;
|
|
278
292
|
}
|
|
@@ -313,6 +327,8 @@ const listedModel = z.strictObject({
|
|
|
313
327
|
duration_s: z.strictObject({ min: z.number().int().positive(), max: z.number().int().positive() }).nullable(),
|
|
314
328
|
duration_values: z.array(z.number().int().positive()).min(1).optional(),
|
|
315
329
|
max_references: z.number().int().nonnegative(),
|
|
330
|
+
min_references: z.number().int().positive().optional()
|
|
331
|
+
.describe("Present on a picture model that only cleans up pictures it is given: the fewest references a request takes."),
|
|
316
332
|
audio: z.literal(true).optional().describe("Present on a clip model that keeps its own sound on audio: true, at the same price."),
|
|
317
333
|
rows: z.array(listedRow).min(1),
|
|
318
334
|
});
|
|
@@ -326,8 +342,9 @@ export function listGenerationModels(options = {}) {
|
|
|
326
342
|
if (capability.kind === "image") {
|
|
327
343
|
const rows = capability.rows.filter((row) => row.measured)
|
|
328
344
|
.map(({ aspect_ratio, width, height, unit_credits }) => ({ aspect_ratio, resolution: null, width, height, unit_credits }));
|
|
345
|
+
const fewest = imageMinReferences(model);
|
|
329
346
|
return rows.length === 0 ? [] : [{ model, kind: "image", unit: "image", modes: null, duration_s: null,
|
|
330
|
-
max_references: imageMaxReferences(model), rows }];
|
|
347
|
+
max_references: imageMaxReferences(model), ...(fewest > 0 ? { min_references: fewest } : {}), rows }];
|
|
331
348
|
}
|
|
332
349
|
const modes = GENERATION_VIDEO_MODES.filter((mode) => capability.modes[mode]);
|
|
333
350
|
const rows = capability.rows.filter((row) => row.measured)
|
|
@@ -9,7 +9,7 @@ export declare const OWN_FILM_RENDER_CREDITS = 100, OWN_FILM_INCLUDED_SECONDS =
|
|
|
9
9
|
export declare const OWN_VOICE_CREDITS_PER_SECOND = 2;
|
|
10
10
|
export declare const OWN_STILLS_MAX_PER_CALL = 24, OWN_FILM_MAX_SECONDS = 120, OWN_VOICE_MAX_SECONDS = 120;
|
|
11
11
|
export declare const OWN_STILLS_SINGLE_MAX = 8;
|
|
12
|
-
export declare const OWN_HERO_POSE_CREDITS =
|
|
12
|
+
export declare const OWN_HERO_POSE_CREDITS = 9, OWN_HERO_POSES = 9;
|
|
13
13
|
export declare const OWN_EDIT_CREDITS = 10, OWN_EDIT_MAX_SECONDS = 60;
|
|
14
14
|
export declare const OWN_TAKE_FRAMES_MAX = 96, TAKE_FRAMES_PER_HOUR = 60, TAKE_FRAMES_WINDOW_SECONDS = 3600;
|
|
15
15
|
export declare const TAKE_PICTURE_CHECKS_PER_HOUR = 30;
|
package/dist/own-agent-price.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { FACELESS_EXPLAINER_POSE_PICTURES
|
|
2
|
+
import { FACELESS_EXPLAINER_POSE_PICTURES } from "./faceless-price.js";
|
|
3
3
|
import { MUSIC_BED_CREDITS } from "./music.js";
|
|
4
4
|
export const OWN_AGENT_TARIFF = "own-agent-v2";
|
|
5
5
|
export const OWN_AGENT_TARIFF_V1 = "own-agent-v1";
|
|
@@ -11,7 +11,7 @@ export const OWN_FILM_RENDER_CREDITS = 100, OWN_FILM_INCLUDED_SECONDS = 60, OWN_
|
|
|
11
11
|
export const OWN_VOICE_CREDITS_PER_SECOND = 2;
|
|
12
12
|
export const OWN_STILLS_MAX_PER_CALL = 24, OWN_FILM_MAX_SECONDS = 120, OWN_VOICE_MAX_SECONDS = 120;
|
|
13
13
|
export const OWN_STILLS_SINGLE_MAX = 8;
|
|
14
|
-
export const OWN_HERO_POSE_CREDITS =
|
|
14
|
+
export const OWN_HERO_POSE_CREDITS = 9, OWN_HERO_POSES = FACELESS_EXPLAINER_POSE_PICTURES;
|
|
15
15
|
export const OWN_EDIT_CREDITS = 10, OWN_EDIT_MAX_SECONDS = 60;
|
|
16
16
|
export const OWN_TAKE_FRAMES_MAX = 96, TAKE_FRAMES_PER_HOUR = 60, TAKE_FRAMES_WINDOW_SECONDS = 3600;
|
|
17
17
|
export const TAKE_PICTURE_CHECKS_PER_HOUR = 30;
|
package/dist/own-agent-runs.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export declare const filmEditInput: z.ZodObject<{
|
|
|
97
97
|
from: z.ZodNumber;
|
|
98
98
|
to: z.ZodNumber;
|
|
99
99
|
speed: z.ZodDefault<z.ZodNumber>;
|
|
100
|
+
sound: z.ZodOptional<z.ZodBoolean>;
|
|
100
101
|
slot: z.ZodOptional<z.ZodString>;
|
|
101
102
|
}, z.core.$strict>>;
|
|
102
103
|
voice: z.ZodOptional<z.ZodObject<{
|
|
@@ -366,6 +367,7 @@ export declare const takeCheckVerdict: z.ZodObject<{
|
|
|
366
367
|
}, z.core.$strict>;
|
|
367
368
|
export type TakeCheckVerdict = z.infer<typeof takeCheckVerdict>;
|
|
368
369
|
export declare const takeCheckPassed: (verdict: Pick<TakeCheckVerdict, "findings" | "clean">) => boolean;
|
|
370
|
+
export declare const TAKE_VOICE_MISMATCH: "VOICE_MISMATCH";
|
|
369
371
|
export declare const FILM_HERO_SOURCE_FIELDS: readonly ["character_reference", "character_details", "script", "voice_run_id"];
|
|
370
372
|
export declare const filmHeroInput: z.ZodObject<{
|
|
371
373
|
character_reference: z.ZodOptional<z.ZodString>;
|
package/dist/own-agent-runs.js
CHANGED
|
@@ -73,10 +73,14 @@ const editClip = z.strictObject({
|
|
|
73
73
|
from: editSecond.describe("The second of the clip the cut starts at"),
|
|
74
74
|
to: editSecond.describe("The second of the clip the cut ends at, after from"),
|
|
75
75
|
speed: z.number().min(0.5).max(2).default(1).describe("Play speed; the clip lasts (to - from) / speed in the edit. 1.2 lifts a slow beat"),
|
|
76
|
+
sound: z.boolean().optional().describe("Play this window's own sound (a clip made with audio: true) at the level of speech; at speed 1, " +
|
|
77
|
+
"never over the voice's words"),
|
|
76
78
|
slot: adSlotId.optional().describe("With ad_id: the slot of the ad this clip fills. A clip made with generate_video must have passed " +
|
|
77
79
|
"check_take in that slot; your own footage needs no check"),
|
|
78
80
|
}).refine(clip => (clip.run_id === undefined) !== (clip.asset_id === undefined), "name the clip by run_id or by asset_id, one of them")
|
|
79
|
-
.refine(clip => clip.to > clip.from, "to must be after from")
|
|
81
|
+
.refine(clip => clip.to > clip.from, "to must be after from")
|
|
82
|
+
.refine(clip => clip.sound !== true || clip.run_id !== undefined, { path: ["sound"], message: "a clip's own sound is kept only from a generate_video run made with audio: true" })
|
|
83
|
+
.refine(clip => clip.sound !== true || clip.speed === 1, { path: ["sound"], message: "a clip's own sound plays at speed 1 only" });
|
|
80
84
|
const voicePiece = z.strictObject({
|
|
81
85
|
from: editSecond.describe("The second of the take the piece starts at (make_voice words give each word's start and end)"),
|
|
82
86
|
to: editSecond.describe("The second of the take the piece ends at, after from"),
|
|
@@ -116,7 +120,7 @@ export const filmEditInput = z.strictObject({
|
|
|
116
120
|
music: editMusic.optional().describe("Music from at to the end: a library track (free) or one made for the cut (paid on delivery); " +
|
|
117
121
|
"under a voice it plays lower"),
|
|
118
122
|
ad_id: adId.optional().describe("The ad record this cut belongs to: every clip then names its slot, and a clip made with generate_video " +
|
|
119
|
-
"that has not passed check_take in its slot is refused before any credits; your own footage needs no check"),
|
|
123
|
+
"that has not passed check_take in its slot is refused before any credits, unless the slot is people_only; your own footage needs no check"),
|
|
120
124
|
max_credits: maxCreditsField,
|
|
121
125
|
}).refine(edit => edit.ad_id !== undefined || edit.clips.every(clip => clip.slot === undefined), "a clip's slot needs ad_id")
|
|
122
126
|
.refine(edit => edit.ad_id === undefined || edit.clips.every(clip => clip.slot !== undefined), "with ad_id, every clip names its slot");
|
|
@@ -226,6 +230,7 @@ export const takeCheckVerdict = z.strictObject({ duration_sec: z.number().positi
|
|
|
226
230
|
subject: z.strictObject({ x: z.number().min(0).max(1), y: z.number().min(0).max(1), w: z.number().min(0).max(1), h: z.number().min(0).max(1) })
|
|
227
231
|
.nullable().optional().describe("Against picture: the main subject's box at that second, shares of the frame from its top-left corner") });
|
|
228
232
|
export const takeCheckPassed = (verdict) => verdict.clean.length > 0 && !verdict.findings.some(finding => finding.whole_take);
|
|
233
|
+
export const TAKE_VOICE_MISMATCH = "VOICE_MISMATCH";
|
|
229
234
|
export const FILM_HERO_SOURCE_FIELDS = ["character_reference", "character_details", "script", "voice_run_id"];
|
|
230
235
|
export const filmHeroInput = z.strictObject({
|
|
231
236
|
character_reference: qualifiedImageUrl.optional().describe("https image of the character the poses are drawn after: a public picture, your upload, a " +
|