@clipwright/core 0.77.0 → 0.79.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/account.d.ts +1 -0
- package/dist/account.js +1 -0
- package/dist/actors.js +2 -2
- package/dist/ad-guide.d.ts +2 -1
- package/dist/ad-guide.js +4 -4
- package/dist/api-failure.d.ts +1 -0
- package/dist/api-failure.js +6 -3
- package/dist/aspect.d.ts +1 -2
- package/dist/aspect.js +2 -18
- package/dist/contract-dispositions.d.ts +20 -4
- package/dist/contract-dispositions.js +3 -0
- package/dist/contracts/v1/workflow-brief.d.ts +34 -4
- package/dist/contracts/v1/workflow-brief.js +12 -3
- package/dist/contracts/v1/workflow-catalog.d.ts +52 -4
- package/dist/contracts/v1/workflow-client.d.ts +17 -2
- package/dist/contracts/v1/workflow-execution.d.ts +26 -0
- package/dist/contracts/v1/workflow-next.d.ts +13 -0
- package/dist/contracts/v1/workflow-plan.d.ts +69 -6
- package/dist/contracts/v1/workflow-run-read.d.ts +36 -0
- package/dist/edit-style-names.d.ts +9 -0
- package/dist/edit-style-names.js +4 -0
- package/dist/edit-style.d.ts +70 -0
- package/dist/edit-style.js +202 -0
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -0
- package/dist/film-guide.d.ts +2 -1
- package/dist/film-guide.js +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/long-form-pricing.d.ts +0 -1
- package/dist/long-form-pricing.js +0 -1
- package/dist/mcp-ugc-descriptions.d.ts +2 -1
- package/dist/mcp-ugc-descriptions.js +5 -3
- package/dist/reference-analysis.d.ts +13 -0
- package/dist/reference-analysis.js +10 -1
- package/dist/reference-display.d.ts +2 -0
- package/dist/reference-display.js +9 -1
- package/dist/render-backend.d.ts +1 -3
- package/dist/render-backend.js +0 -5
- package/dist/run-static-warnings.js +2 -2
- package/dist/skills.d.ts +186 -111
- package/dist/skills.js +97 -39
- package/dist/tts-backend.d.ts +1 -2
- package/dist/voice-admission.d.ts +33 -27
- package/dist/voice-admission.js +2 -2
- package/dist/voice-listing.d.ts +1 -2
- package/dist/voice-listing.js +2 -4
- package/dist/voice-verified-models.d.ts +3 -0
- package/dist/voice-verified-models.js +5 -0
- package/dist/workflows/methods/faceless-explainer.d.ts +7 -2
- package/dist/workflows/methods/kinetic-launch.d.ts +14 -4
- package/dist/workflows/methods/product-image-story.d.ts +7 -2
- package/dist/workflows/methods/reference-remake.d.ts +7 -2
- package/dist/workflows/methods/reference-remake.js +1 -1
- package/dist/workflows/methods/shared.d.ts +7 -2
- package/dist/workflows/methods/ugc-faq-answer.d.ts +7 -2
- package/dist/workflows/methods/ugc-faq-answer.js +1 -1
- package/dist/workflows/methods/ugc-product-intro.d.ts +7 -2
- package/dist/workflows/methods/ugc-product-intro.js +1 -1
- package/dist/workflows/methods/website-proof-demo.d.ts +14 -4
- package/dist/workflows/reference-remake.d.ts +9 -1
- package/dist/workflows/reference-remake.js +3 -2
- package/dist/workflows/validate.js +4 -2
- package/package.json +1 -1
- package/dist/vendor-response.d.ts +0 -20
- package/dist/vendor-response.js +0 -94
package/dist/account.d.ts
CHANGED
|
@@ -55,5 +55,6 @@ export declare const account: z.ZodObject<{
|
|
|
55
55
|
}, z.core.$strip>>>;
|
|
56
56
|
free_trend_searches_left: z.ZodOptional<z.ZodNumber>;
|
|
57
57
|
free_trend_searches_reset_at: z.ZodOptional<z.ZodString>;
|
|
58
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
58
59
|
}, z.core.$strip>;
|
|
59
60
|
export type Account = z.infer<typeof account>;
|
package/dist/account.js
CHANGED
|
@@ -30,4 +30,5 @@ export const account = z.object({
|
|
|
30
30
|
support_replies: z.array(supportReply).default([]),
|
|
31
31
|
free_trend_searches_left: z.number().int().nonnegative().optional(),
|
|
32
32
|
free_trend_searches_reset_at: z.string().datetime().optional(),
|
|
33
|
+
warnings: z.array(z.string()).optional(),
|
|
33
34
|
});
|
package/dist/actors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ACTOR_FULL_PORTRAIT_FACE_HEIGHT, ACTOR_WIDE_PORTRAIT_FACE_HEIGHT, actorIdScope } from "./account-actors.js";
|
|
3
|
-
import {
|
|
3
|
+
import { outputFrame } from "./aspect.js";
|
|
4
4
|
import { sharpCropOf } from "./scene-place.js";
|
|
5
5
|
import { ACTOR_FOR_GENDER, actorId, ASPECT_RATIOS, LEGACY_RUN_RESOLUTION, RESOLUTIONS } from "./skills.js";
|
|
6
6
|
import { defaultVoiceOf, DEFAULT_VOICE_PRESET, speaksOwnVoices, VOICE_PRESETS } from "./voices.js";
|
|
@@ -101,7 +101,7 @@ function presenterPlaceSoftness(input, pin) {
|
|
|
101
101
|
const aspect = ASPECT_RATIOS.find(ratio => ratio === asset?.aspect_ratio), resolution = RESOLUTIONS.find(entry => entry === input.resolution) ?? LEGACY_RUN_RESOLUTION;
|
|
102
102
|
if (!place || largest === undefined || !asset?.width || !aspect)
|
|
103
103
|
return undefined;
|
|
104
|
-
const sharp = sharpCropOf(asset.width,
|
|
104
|
+
const sharp = sharpCropOf(asset.width, outputFrame(resolution, aspect).width);
|
|
105
105
|
if (place.face_height / largest <= sharp)
|
|
106
106
|
return undefined;
|
|
107
107
|
return `presenter_place face height ${place.face_height.toFixed(2)}: the actor's ${view} portrait shows the face under ${largest} of its height, so a ` +
|
package/dist/ad-guide.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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", "board", "models", "motion_test", "shot_list", "devices", "takes", "audit", "repair", "edit", "final_check", "spend"];
|
|
3
|
+
export declare const AD_GUIDE_SECTION_IDS: readonly ["workflow", "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<{
|
|
@@ -24,6 +24,7 @@ export declare const adGuideQuery: z.ZodObject<{
|
|
|
24
24
|
states: "states";
|
|
25
25
|
takes: "takes";
|
|
26
26
|
ugc: "ugc";
|
|
27
|
+
workflow: "workflow";
|
|
27
28
|
}>>;
|
|
28
29
|
}, z.core.$strict>;
|
|
29
30
|
export type AdGuideQuery = z.infer<typeof adGuideQuery>;
|
package/dist/ad-guide.js
CHANGED
|
@@ -2,16 +2,16 @@ 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", "board", "models",
|
|
5
|
+
export const AD_GUIDE_SECTION_IDS = ["workflow", "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()
|
|
9
|
-
.describe("One part of the guide, whole: ugc (the make_ugc rules) or one step of making the
|
|
10
|
-
"and a list of the other sections"),
|
|
9
|
+
.describe("One part of the guide, whole: workflow (the format and its questions), ugc (the make_ugc rules) or one step of making the " +
|
|
10
|
+
"ad yourself. Without it you get workflow and a list of the other sections"),
|
|
11
11
|
});
|
|
12
12
|
export const adGuide = z.strictObject({
|
|
13
13
|
brand: brandGuideBlock.optional(),
|
|
14
|
-
guide: z.string().min(1).describe("The ad guide, Markdown. Without section: the
|
|
14
|
+
guide: z.string().min(1).describe("The ad guide, Markdown. Without section: the workflow (section workflow), then every other " +
|
|
15
15
|
"section's id and title. With section: that part"),
|
|
16
16
|
version: z.string().regex(/^[a-f0-9]{12}$/).optional().describe("The guide's version: it changes whenever any part of the guide does"),
|
|
17
17
|
guides: guideCatalog.optional(),
|
package/dist/api-failure.d.ts
CHANGED
|
@@ -146,6 +146,7 @@ export interface AgentFailureReport {
|
|
|
146
146
|
export declare const UPLOAD_NOT_FINISHED_NEXT_ACTION: string;
|
|
147
147
|
export declare const ASSET_NOT_READY_NEXT_ACTION: string;
|
|
148
148
|
export declare const UNAUTHORIZED_NEXT_ACTION: string;
|
|
149
|
+
export declare const PURCHASE_NEEDED_NEXT_ACTION: string;
|
|
149
150
|
export declare function refusalNextAction(next: DiyNext): string;
|
|
150
151
|
export declare function agentFailureReport(failure: ApiFailure): AgentFailureReport;
|
|
151
152
|
export {};
|
package/dist/api-failure.js
CHANGED
|
@@ -264,6 +264,8 @@ export const UNAUTHORIZED_NEXT_ACTION = "STOP. Clipwright did not accept this co
|
|
|
264
264
|
`${PUBLIC_APP_BASE_URL}/auth/sign-up comes with trial credits), puts it in the MCP server's environment as ` +
|
|
265
265
|
"CLIPWRIGHT_API_KEY, never in the chat, and restarts the host. With the hosted connector, the human reconnects it and " +
|
|
266
266
|
"signs in again. Then call get_account, which is free, to confirm.";
|
|
267
|
+
export const PURCHASE_NEEDED_NEXT_ACTION = "STOP. Do NOT retry: this call needs bought credits, and repeating it gives the same answer. Tell the user to buy a " +
|
|
268
|
+
`credit pack or pick a plan at ${PUBLIC_APP_BASE_URL}/billing, then call again. Nothing was charged and no run was created.`;
|
|
267
269
|
export function refusalNextAction(next) {
|
|
268
270
|
const fields = next.add.length ? ` Change ${next.add.join(", ")} first.` : "";
|
|
269
271
|
return `STOP. Do NOT retry unchanged: ${next.note}${fields} Then call ${next.action} (next has its route and arguments). ` +
|
|
@@ -445,9 +447,10 @@ export function agentFailureReport(failure) {
|
|
|
445
447
|
...(failure.next && { next: failure.next }),
|
|
446
448
|
next_action: failure.code === "upload_not_finished" ? UPLOAD_NOT_FINISHED_NEXT_ACTION :
|
|
447
449
|
failure.code === "unauthorized" ? UNAUTHORIZED_NEXT_ACTION :
|
|
448
|
-
failure.
|
|
449
|
-
|
|
450
|
-
"
|
|
450
|
+
failure.status === 402 && failure.code === "trial_excludes_generation" ? PURCHASE_NEEDED_NEXT_ACTION :
|
|
451
|
+
failure.next ? refusalNextAction(failure.next) :
|
|
452
|
+
"STOP. Do NOT retry: the request itself was rejected, so repeating it unchanged gives " +
|
|
453
|
+
"the same answer. Read the message, fix the call, or tell the user what is wrong.",
|
|
451
454
|
};
|
|
452
455
|
}
|
|
453
456
|
}
|
package/dist/aspect.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ export interface ResolveAspectInput {
|
|
|
20
20
|
}
|
|
21
21
|
export declare function resolveAspectRatio(input: ResolveAspectInput): AspectResolution;
|
|
22
22
|
export declare function exactAspectLabel(width: number, height: number): string;
|
|
23
|
-
export declare function vendorAspectFor(source: AspectSource, supported: readonly AspectRatio[]): AspectRatio;
|
|
24
23
|
export interface DeliveredClip {
|
|
25
24
|
width: number;
|
|
26
25
|
height: number;
|
|
@@ -37,7 +36,7 @@ export declare function deliveredResolutionWarning(requested: Resolution, delive
|
|
|
37
36
|
width: number;
|
|
38
37
|
height: number;
|
|
39
38
|
}): string | null;
|
|
40
|
-
export declare function
|
|
39
|
+
export declare function outputFrame(resolution: Resolution, aspectRatio: AspectRatio): {
|
|
41
40
|
width: number;
|
|
42
41
|
height: number;
|
|
43
42
|
};
|
package/dist/aspect.js
CHANGED
|
@@ -67,22 +67,6 @@ export function exactAspectLabel(width, height) {
|
|
|
67
67
|
const divisor = gcd(w, h);
|
|
68
68
|
return `${w / divisor}:${h / divisor}`;
|
|
69
69
|
}
|
|
70
|
-
export function vendorAspectFor(source, supported) {
|
|
71
|
-
if (supported.length === 0) {
|
|
72
|
-
throw new Error("vendorAspectFor: backend declares no supported aspect ratios");
|
|
73
|
-
}
|
|
74
|
-
const sourceRatio = source.width / source.height;
|
|
75
|
-
let best = supported[0];
|
|
76
|
-
let bestDistance = aspectDistance(ASPECT_RATIO_VALUES[best], sourceRatio);
|
|
77
|
-
for (const candidate of supported) {
|
|
78
|
-
const distance = aspectDistance(ASPECT_RATIO_VALUES[candidate], sourceRatio);
|
|
79
|
-
if (distance < bestDistance) {
|
|
80
|
-
best = candidate;
|
|
81
|
-
bestDistance = distance;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return best;
|
|
85
|
-
}
|
|
86
70
|
export function deliveryWarnings(args) {
|
|
87
71
|
const { predicted, actual } = args;
|
|
88
72
|
const tolerance = args.durationToleranceSec ?? 0.05;
|
|
@@ -102,7 +86,7 @@ export function deliveryWarnings(args) {
|
|
|
102
86
|
export function upscaleWarning(source, resolution, aspectRatio) {
|
|
103
87
|
if (source === null || source.origin !== "probed")
|
|
104
88
|
return null;
|
|
105
|
-
const frame =
|
|
89
|
+
const frame = outputFrame(resolution, aspectRatio);
|
|
106
90
|
const sourceShort = Math.min(source.width, source.height);
|
|
107
91
|
const frameShort = Math.min(frame.width, frame.height);
|
|
108
92
|
if (sourceShort >= frameShort)
|
|
@@ -122,7 +106,7 @@ export function deliveredResolutionWarning(requested, delivered) {
|
|
|
122
106
|
return `resolution ${requested} was requested, but the video is delivered at ` +
|
|
123
107
|
`${delivered.width}×${delivered.height}; resolution does not change the price`;
|
|
124
108
|
}
|
|
125
|
-
export function
|
|
109
|
+
export function outputFrame(resolution, aspectRatio) {
|
|
126
110
|
const short = SHORT_SIDE_BY_RESOLUTION[resolution];
|
|
127
111
|
const ratio = ASPECT_RATIO_VALUES[aspectRatio];
|
|
128
112
|
const even = (value) => {
|
|
@@ -72,6 +72,10 @@ export declare const FIELD_DISPOSITIONS: {
|
|
|
72
72
|
readonly kind: "implemented";
|
|
73
73
|
readonly provenBy: "composition";
|
|
74
74
|
};
|
|
75
|
+
readonly edit_style: {
|
|
76
|
+
readonly kind: "implemented";
|
|
77
|
+
readonly provenBy: "admission";
|
|
78
|
+
};
|
|
75
79
|
readonly caption_emphasis: {
|
|
76
80
|
readonly kind: "implemented";
|
|
77
81
|
readonly provenBy: "composition";
|
|
@@ -4406,8 +4410,8 @@ export declare const offeredUgcInput: z.ZodObject<{
|
|
|
4406
4410
|
no_actor: "no_actor";
|
|
4407
4411
|
no_people: "no_people";
|
|
4408
4412
|
}>>;
|
|
4409
|
-
captions: z.
|
|
4410
|
-
caption_style: z.
|
|
4413
|
+
captions: z.ZodOptional<z.ZodBoolean>;
|
|
4414
|
+
caption_style: z.ZodOptional<z.ZodEnum<{
|
|
4411
4415
|
accent: "accent";
|
|
4412
4416
|
arcade: "arcade";
|
|
4413
4417
|
bassdrop: "bassdrop";
|
|
@@ -4434,6 +4438,12 @@ export declare const offeredUgcInput: z.ZodObject<{
|
|
|
4434
4438
|
tiktok: "tiktok";
|
|
4435
4439
|
youtube: "youtube";
|
|
4436
4440
|
}>>;
|
|
4441
|
+
edit_style: z.ZodOptional<z.ZodEnum<{
|
|
4442
|
+
bare: "bare";
|
|
4443
|
+
"bold-v1": "bold-v1";
|
|
4444
|
+
"calm-v1": "calm-v1";
|
|
4445
|
+
"house-v1": "house-v1";
|
|
4446
|
+
}>>;
|
|
4437
4447
|
caption_emphasis: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
4438
4448
|
quote: z.ZodString;
|
|
4439
4449
|
look: z.ZodOptional<z.ZodEnum<{
|
|
@@ -4751,8 +4761,8 @@ export declare const mcpUgcInputShape: {
|
|
|
4751
4761
|
no_actor: "no_actor";
|
|
4752
4762
|
no_people: "no_people";
|
|
4753
4763
|
}>>;
|
|
4754
|
-
captions: z.
|
|
4755
|
-
caption_style: z.
|
|
4764
|
+
captions: z.ZodOptional<z.ZodBoolean>;
|
|
4765
|
+
caption_style: z.ZodOptional<z.ZodEnum<{
|
|
4756
4766
|
accent: "accent";
|
|
4757
4767
|
arcade: "arcade";
|
|
4758
4768
|
bassdrop: "bassdrop";
|
|
@@ -4779,6 +4789,12 @@ export declare const mcpUgcInputShape: {
|
|
|
4779
4789
|
tiktok: "tiktok";
|
|
4780
4790
|
youtube: "youtube";
|
|
4781
4791
|
}>>;
|
|
4792
|
+
edit_style: z.ZodOptional<z.ZodEnum<{
|
|
4793
|
+
bare: "bare";
|
|
4794
|
+
"bold-v1": "bold-v1";
|
|
4795
|
+
"calm-v1": "calm-v1";
|
|
4796
|
+
"house-v1": "house-v1";
|
|
4797
|
+
}>>;
|
|
4782
4798
|
caption_emphasis: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
4783
4799
|
quote: z.ZodString;
|
|
4784
4800
|
look: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AD_END_HOLD_WARNING, makeUgcInputShape, mcpCaptionPlace, mcpLiveShots, mcpPresenterGaze, mcpPresenterPlace, mcpUgcCall, mcpUgcInterview, mcpUgcOverlay, mcpUgcScene, mcpUgcTemplate } from "./skills.js";
|
|
3
3
|
import { MCP_UGC_DESCRIPTIONS } from "./mcp-ugc-descriptions.js";
|
|
4
|
+
import { editStyleLines } from "./edit-style.js";
|
|
4
5
|
import { interviewWarnings } from "./ugc-interview.js";
|
|
5
6
|
import { commentCtaFitWarnings, MAX_TEMPLATES, mcpTemplateSounds, seriesFitWarnings, templateFaceWarnings, templateMediaOf, templateSceneItems, templateSizeWarnings } from "./templates/index.js";
|
|
6
7
|
import { framingWarnings } from "./ugc-framing.js";
|
|
@@ -47,6 +48,7 @@ export const FIELD_DISPOSITIONS = {
|
|
|
47
48
|
},
|
|
48
49
|
captions: { kind: "implemented", provenBy: "composition" },
|
|
49
50
|
caption_style: { kind: "implemented", provenBy: "composition" },
|
|
51
|
+
edit_style: { kind: "implemented", provenBy: "admission" },
|
|
50
52
|
caption_emphasis: { kind: "implemented", provenBy: "composition" },
|
|
51
53
|
caption_mode: { kind: "implemented", provenBy: "composition" },
|
|
52
54
|
caption_position: { kind: "implemented", provenBy: "composition" },
|
|
@@ -280,6 +282,7 @@ export function dispositionWarnings(input) {
|
|
|
280
282
|
warnings.push(AD_PAUSE_TRIM_WARNING);
|
|
281
283
|
if (input.end_hold_source === "ad_default")
|
|
282
284
|
warnings.push(AD_END_HOLD_WARNING);
|
|
285
|
+
warnings.push(...editStyleLines(input));
|
|
283
286
|
warnings.push(...templateFaceWarnings(input), ...templateSizeWarnings(input), ...seriesFitWarnings(input), ...commentCtaFitWarnings(input), ...framingWarnings(input), ...callWarnings(input), ...placeWarnings(input, framing => templateSceneItems(scene, framing)), ...interviewWarnings(input));
|
|
284
287
|
return warnings;
|
|
285
288
|
}
|
|
@@ -1063,8 +1063,8 @@ export declare const workflowNativeInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1063
1063
|
no_actor: "no_actor";
|
|
1064
1064
|
no_people: "no_people";
|
|
1065
1065
|
}>>;
|
|
1066
|
-
captions: z.
|
|
1067
|
-
caption_style: z.
|
|
1066
|
+
captions: z.ZodOptional<z.ZodBoolean>;
|
|
1067
|
+
caption_style: z.ZodOptional<z.ZodEnum<{
|
|
1068
1068
|
accent: "accent";
|
|
1069
1069
|
arcade: "arcade";
|
|
1070
1070
|
bassdrop: "bassdrop";
|
|
@@ -1091,6 +1091,12 @@ export declare const workflowNativeInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1091
1091
|
tiktok: "tiktok";
|
|
1092
1092
|
youtube: "youtube";
|
|
1093
1093
|
}>>;
|
|
1094
|
+
edit_style: z.ZodOptional<z.ZodEnum<{
|
|
1095
|
+
bare: "bare";
|
|
1096
|
+
"bold-v1": "bold-v1";
|
|
1097
|
+
"calm-v1": "calm-v1";
|
|
1098
|
+
"house-v1": "house-v1";
|
|
1099
|
+
}>>;
|
|
1094
1100
|
caption_mode: z.ZodOptional<z.ZodEnum<{
|
|
1095
1101
|
full: "full";
|
|
1096
1102
|
highlights: "highlights";
|
|
@@ -8659,8 +8665,8 @@ export declare const workflowBrief: z.ZodObject<{
|
|
|
8659
8665
|
no_actor: "no_actor";
|
|
8660
8666
|
no_people: "no_people";
|
|
8661
8667
|
}>>;
|
|
8662
|
-
captions: z.
|
|
8663
|
-
caption_style: z.
|
|
8668
|
+
captions: z.ZodOptional<z.ZodBoolean>;
|
|
8669
|
+
caption_style: z.ZodOptional<z.ZodEnum<{
|
|
8664
8670
|
accent: "accent";
|
|
8665
8671
|
arcade: "arcade";
|
|
8666
8672
|
bassdrop: "bassdrop";
|
|
@@ -8687,6 +8693,12 @@ export declare const workflowBrief: z.ZodObject<{
|
|
|
8687
8693
|
tiktok: "tiktok";
|
|
8688
8694
|
youtube: "youtube";
|
|
8689
8695
|
}>>;
|
|
8696
|
+
edit_style: z.ZodOptional<z.ZodEnum<{
|
|
8697
|
+
bare: "bare";
|
|
8698
|
+
"bold-v1": "bold-v1";
|
|
8699
|
+
"calm-v1": "calm-v1";
|
|
8700
|
+
"house-v1": "house-v1";
|
|
8701
|
+
}>>;
|
|
8690
8702
|
caption_mode: z.ZodOptional<z.ZodEnum<{
|
|
8691
8703
|
full: "full";
|
|
8692
8704
|
highlights: "highlights";
|
|
@@ -16060,6 +16072,15 @@ export declare const workflowBrief: z.ZodObject<{
|
|
|
16060
16072
|
added: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16061
16073
|
move_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16062
16074
|
voice_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16075
|
+
edit_style_default: z.ZodOptional<z.ZodObject<{
|
|
16076
|
+
fields: z.ZodArray<z.ZodEnum<{
|
|
16077
|
+
caption_emphasis: "caption_emphasis";
|
|
16078
|
+
caption_style: "caption_style";
|
|
16079
|
+
captions: "captions";
|
|
16080
|
+
edit_sounds: "edit_sounds";
|
|
16081
|
+
}>>;
|
|
16082
|
+
left_out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16083
|
+
}, z.core.$strict>>;
|
|
16063
16084
|
review_notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16064
16085
|
review_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16065
16086
|
}, z.core.$strict>;
|
|
@@ -16078,6 +16099,15 @@ export declare const workflowBriefRead: z.ZodObject<{
|
|
|
16078
16099
|
added: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16079
16100
|
move_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16080
16101
|
voice_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16102
|
+
edit_style_default: z.ZodOptional<z.ZodObject<{
|
|
16103
|
+
fields: z.ZodArray<z.ZodEnum<{
|
|
16104
|
+
caption_emphasis: "caption_emphasis";
|
|
16105
|
+
caption_style: "caption_style";
|
|
16106
|
+
captions: "captions";
|
|
16107
|
+
edit_sounds: "edit_sounds";
|
|
16108
|
+
}>>;
|
|
16109
|
+
left_out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16110
|
+
}, z.core.$strict>>;
|
|
16081
16111
|
review_notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16082
16112
|
review_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16083
16113
|
requested_format: z.ZodOptional<z.ZodObject<{
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { makeUgcInput, ugcSegment } from '../../skills.js';
|
|
2
|
+
import { makeUgcInput, makeUgcInputShape, ugcSegment } from '../../skills.js';
|
|
3
3
|
import { makeFacelessInput } from '../../faceless-public.js';
|
|
4
4
|
import { MAX_MOVES } from '../../moves.js';
|
|
5
|
+
import { EDIT_STYLE_FIELDS, expandEditStyle, parseStyled } from '../../edit-style.js';
|
|
5
6
|
import { referenceProfileInput, referenceProfileRead } from '../../reference-profile.js';
|
|
6
7
|
import { workflowEvidenceSource } from './workflow-evidence.js';
|
|
7
8
|
import { workflowFormat, workflowFormatRead, workflowText } from './workflow-primitives.js';
|
|
@@ -17,9 +18,15 @@ const noneWhenEmpty = (key) => {
|
|
|
17
18
|
const { maxItems } = z.toJSONSchema(list, { io: 'input', unrepresentable: 'any' });
|
|
18
19
|
return z.array(list.element).max(maxItems).transform(items => items.length ? items : undefined).pipe(native).optional();
|
|
19
20
|
};
|
|
20
|
-
const workflowUgcInput =
|
|
21
|
+
const workflowUgcInput = z.strictObject(makeUgcInputShape).safeExtend({ segments: strictUgcSegments, inserts: noneWhenEmpty('inserts'), overlays: noneWhenEmpty('overlays'),
|
|
21
22
|
layout_windows: noneWhenEmpty('layout_windows'), framing: noneWhenEmpty('framing'), templates: noneWhenEmpty('templates'), scenes: noneWhenEmpty('scenes'),
|
|
22
|
-
presenter_gaze: noneWhenEmpty('presenter_gaze'), shots: noneWhenEmpty('shots'), caption_emphasis: noneWhenEmpty('caption_emphasis') })
|
|
23
|
+
presenter_gaze: noneWhenEmpty('presenter_gaze'), shots: noneWhenEmpty('shots'), caption_emphasis: noneWhenEmpty('caption_emphasis') })
|
|
24
|
+
.superRefine((value, context) => {
|
|
25
|
+
const parsed = parseStyled(makeUgcInput, expandEditStyle(value, { defaultStyle: false, longForm: false }));
|
|
26
|
+
if (!parsed.success)
|
|
27
|
+
for (const issue of parsed.error.issues)
|
|
28
|
+
context.addIssue({ code: z.ZodIssueCode.custom, path: issue.path, message: issue.message });
|
|
29
|
+
});
|
|
23
30
|
const [nativeFacelessScript, nativeFacelessBrief] = makeFacelessInput.options;
|
|
24
31
|
const nativeScript = nativeFacelessScript.shape.script;
|
|
25
32
|
const { minLength, maxLength } = z.toJSONSchema(nativeScript, { io: 'input' });
|
|
@@ -49,6 +56,8 @@ const briefShape = {
|
|
|
49
56
|
added: z.array(workflowText(200)).max(WORKFLOW_ADDED_MAX).optional(),
|
|
50
57
|
move_warnings: z.array(workflowText(400)).max(MAX_MOVES).optional(),
|
|
51
58
|
voice_warnings: z.array(workflowText(400)).max(WORKFLOW_VOICE_WARNINGS_MAX).optional(),
|
|
59
|
+
edit_style_default: z.strictObject({ fields: z.array(z.enum(EDIT_STYLE_FIELDS)).max(EDIT_STYLE_FIELDS.length),
|
|
60
|
+
left_out: z.array(workflowText(300)).max(20).optional() }).optional(),
|
|
52
61
|
review_notes: z.array(workflowText(2000)).max(50).optional(),
|
|
53
62
|
review_warnings: z.array(workflowText(400)).max(50).optional(),
|
|
54
63
|
};
|
|
@@ -1183,8 +1183,8 @@ export declare const methodDescriptor: z.ZodObject<{
|
|
|
1183
1183
|
no_actor: "no_actor";
|
|
1184
1184
|
no_people: "no_people";
|
|
1185
1185
|
}>>;
|
|
1186
|
-
captions: z.
|
|
1187
|
-
caption_style: z.
|
|
1186
|
+
captions: z.ZodOptional<z.ZodBoolean>;
|
|
1187
|
+
caption_style: z.ZodOptional<z.ZodEnum<{
|
|
1188
1188
|
accent: "accent";
|
|
1189
1189
|
arcade: "arcade";
|
|
1190
1190
|
bassdrop: "bassdrop";
|
|
@@ -1211,6 +1211,12 @@ export declare const methodDescriptor: z.ZodObject<{
|
|
|
1211
1211
|
tiktok: "tiktok";
|
|
1212
1212
|
youtube: "youtube";
|
|
1213
1213
|
}>>;
|
|
1214
|
+
edit_style: z.ZodOptional<z.ZodEnum<{
|
|
1215
|
+
bare: "bare";
|
|
1216
|
+
"bold-v1": "bold-v1";
|
|
1217
|
+
"calm-v1": "calm-v1";
|
|
1218
|
+
"house-v1": "house-v1";
|
|
1219
|
+
}>>;
|
|
1214
1220
|
caption_mode: z.ZodOptional<z.ZodEnum<{
|
|
1215
1221
|
full: "full";
|
|
1216
1222
|
highlights: "highlights";
|
|
@@ -8584,6 +8590,15 @@ export declare const methodDescriptor: z.ZodObject<{
|
|
|
8584
8590
|
added: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8585
8591
|
move_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8586
8592
|
voice_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8593
|
+
edit_style_default: z.ZodOptional<z.ZodObject<{
|
|
8594
|
+
fields: z.ZodArray<z.ZodEnum<{
|
|
8595
|
+
caption_emphasis: "caption_emphasis";
|
|
8596
|
+
caption_style: "caption_style";
|
|
8597
|
+
captions: "captions";
|
|
8598
|
+
edit_sounds: "edit_sounds";
|
|
8599
|
+
}>>;
|
|
8600
|
+
left_out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8601
|
+
}, z.core.$strict>>;
|
|
8587
8602
|
review_notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8588
8603
|
review_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8589
8604
|
}, z.core.$strict>;
|
|
@@ -8652,6 +8667,15 @@ export declare const methodDescriptorRead: z.ZodObject<{
|
|
|
8652
8667
|
added: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8653
8668
|
move_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8654
8669
|
voice_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8670
|
+
edit_style_default: z.ZodOptional<z.ZodObject<{
|
|
8671
|
+
fields: z.ZodArray<z.ZodEnum<{
|
|
8672
|
+
caption_emphasis: "caption_emphasis";
|
|
8673
|
+
caption_style: "caption_style";
|
|
8674
|
+
captions: "captions";
|
|
8675
|
+
edit_sounds: "edit_sounds";
|
|
8676
|
+
}>>;
|
|
8677
|
+
left_out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8678
|
+
}, z.core.$strict>>;
|
|
8655
8679
|
review_notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8656
8680
|
review_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8657
8681
|
requested_format: z.ZodOptional<z.ZodObject<{
|
|
@@ -9925,8 +9949,8 @@ export declare const workflowMethodResponse: z.ZodObject<{
|
|
|
9925
9949
|
no_actor: "no_actor";
|
|
9926
9950
|
no_people: "no_people";
|
|
9927
9951
|
}>>;
|
|
9928
|
-
captions: z.
|
|
9929
|
-
caption_style: z.
|
|
9952
|
+
captions: z.ZodOptional<z.ZodBoolean>;
|
|
9953
|
+
caption_style: z.ZodOptional<z.ZodEnum<{
|
|
9930
9954
|
accent: "accent";
|
|
9931
9955
|
arcade: "arcade";
|
|
9932
9956
|
bassdrop: "bassdrop";
|
|
@@ -9953,6 +9977,12 @@ export declare const workflowMethodResponse: z.ZodObject<{
|
|
|
9953
9977
|
tiktok: "tiktok";
|
|
9954
9978
|
youtube: "youtube";
|
|
9955
9979
|
}>>;
|
|
9980
|
+
edit_style: z.ZodOptional<z.ZodEnum<{
|
|
9981
|
+
bare: "bare";
|
|
9982
|
+
"bold-v1": "bold-v1";
|
|
9983
|
+
"calm-v1": "calm-v1";
|
|
9984
|
+
"house-v1": "house-v1";
|
|
9985
|
+
}>>;
|
|
9956
9986
|
caption_mode: z.ZodOptional<z.ZodEnum<{
|
|
9957
9987
|
full: "full";
|
|
9958
9988
|
highlights: "highlights";
|
|
@@ -17326,6 +17356,15 @@ export declare const workflowMethodResponse: z.ZodObject<{
|
|
|
17326
17356
|
added: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17327
17357
|
move_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17328
17358
|
voice_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17359
|
+
edit_style_default: z.ZodOptional<z.ZodObject<{
|
|
17360
|
+
fields: z.ZodArray<z.ZodEnum<{
|
|
17361
|
+
caption_emphasis: "caption_emphasis";
|
|
17362
|
+
caption_style: "caption_style";
|
|
17363
|
+
captions: "captions";
|
|
17364
|
+
edit_sounds: "edit_sounds";
|
|
17365
|
+
}>>;
|
|
17366
|
+
left_out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17367
|
+
}, z.core.$strict>>;
|
|
17329
17368
|
review_notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17330
17369
|
review_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17331
17370
|
}, z.core.$strict>;
|
|
@@ -17566,6 +17605,15 @@ export declare const workflowMethodResponseRead: z.ZodObject<{
|
|
|
17566
17605
|
added: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17567
17606
|
move_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17568
17607
|
voice_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17608
|
+
edit_style_default: z.ZodOptional<z.ZodObject<{
|
|
17609
|
+
fields: z.ZodArray<z.ZodEnum<{
|
|
17610
|
+
caption_emphasis: "caption_emphasis";
|
|
17611
|
+
caption_style: "caption_style";
|
|
17612
|
+
captions: "captions";
|
|
17613
|
+
edit_sounds: "edit_sounds";
|
|
17614
|
+
}>>;
|
|
17615
|
+
left_out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17616
|
+
}, z.core.$strict>>;
|
|
17569
17617
|
review_notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17570
17618
|
review_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17571
17619
|
requested_format: z.ZodOptional<z.ZodObject<{
|
|
@@ -1009,6 +1009,15 @@ export declare const workflowToolInputs: {
|
|
|
1009
1009
|
added: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1010
1010
|
move_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1011
1011
|
voice_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1012
|
+
edit_style_default: z.ZodOptional<z.ZodObject<{
|
|
1013
|
+
fields: z.ZodArray<z.ZodEnum<{
|
|
1014
|
+
caption_emphasis: "caption_emphasis";
|
|
1015
|
+
caption_style: "caption_style";
|
|
1016
|
+
captions: "captions";
|
|
1017
|
+
edit_sounds: "edit_sounds";
|
|
1018
|
+
}>>;
|
|
1019
|
+
left_out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1020
|
+
}, z.core.$strict>>;
|
|
1012
1021
|
review_notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1013
1022
|
review_warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1014
1023
|
native: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -2070,8 +2079,8 @@ export declare const workflowToolInputs: {
|
|
|
2070
2079
|
no_actor: "no_actor";
|
|
2071
2080
|
no_people: "no_people";
|
|
2072
2081
|
}>>;
|
|
2073
|
-
captions: z.
|
|
2074
|
-
caption_style: z.
|
|
2082
|
+
captions: z.ZodOptional<z.ZodBoolean>;
|
|
2083
|
+
caption_style: z.ZodOptional<z.ZodEnum<{
|
|
2075
2084
|
accent: "accent";
|
|
2076
2085
|
arcade: "arcade";
|
|
2077
2086
|
bassdrop: "bassdrop";
|
|
@@ -2098,6 +2107,12 @@ export declare const workflowToolInputs: {
|
|
|
2098
2107
|
tiktok: "tiktok";
|
|
2099
2108
|
youtube: "youtube";
|
|
2100
2109
|
}>>;
|
|
2110
|
+
edit_style: z.ZodOptional<z.ZodEnum<{
|
|
2111
|
+
bare: "bare";
|
|
2112
|
+
"bold-v1": "bold-v1";
|
|
2113
|
+
"calm-v1": "calm-v1";
|
|
2114
|
+
"house-v1": "house-v1";
|
|
2115
|
+
}>>;
|
|
2101
2116
|
caption_mode: z.ZodOptional<z.ZodEnum<{
|
|
2102
2117
|
full: "full";
|
|
2103
2118
|
highlights: "highlights";
|
|
@@ -55,6 +55,19 @@ export declare const workflowQuoteBinding: z.ZodObject<{
|
|
|
55
55
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
56
|
why: z.ZodString;
|
|
57
57
|
}, z.core.$strict>>>;
|
|
58
|
+
edit_style_applied: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
source: z.ZodString;
|
|
61
|
+
fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
62
|
+
left_out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
plan: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
65
|
+
words: z.ZodString;
|
|
66
|
+
device: z.ZodString;
|
|
67
|
+
field: z.ZodString;
|
|
68
|
+
source: z.ZodString;
|
|
69
|
+
credits: z.ZodNullable<z.ZodNumber>;
|
|
70
|
+
}, z.core.$strip>>>;
|
|
58
71
|
tariff: z.ZodOptional<z.ZodString>;
|
|
59
72
|
price_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
60
73
|
label: z.ZodString;
|
|
@@ -277,6 +290,19 @@ export declare const workflowQuoteBindingRead: z.ZodObject<{
|
|
|
277
290
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
278
291
|
why: z.ZodString;
|
|
279
292
|
}, z.core.$strict>>>;
|
|
293
|
+
edit_style_applied: z.ZodOptional<z.ZodObject<{
|
|
294
|
+
name: z.ZodString;
|
|
295
|
+
source: z.ZodString;
|
|
296
|
+
fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
297
|
+
left_out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
298
|
+
}, z.core.$strip>>;
|
|
299
|
+
plan: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
300
|
+
words: z.ZodString;
|
|
301
|
+
device: z.ZodString;
|
|
302
|
+
field: z.ZodString;
|
|
303
|
+
source: z.ZodString;
|
|
304
|
+
credits: z.ZodNullable<z.ZodNumber>;
|
|
305
|
+
}, z.core.$strip>>>;
|
|
280
306
|
tariff: z.ZodOptional<z.ZodString>;
|
|
281
307
|
price_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
282
308
|
label: z.ZodString;
|
|
@@ -49,6 +49,19 @@ export declare const workflowQuoteAnswer: z.ZodObject<{
|
|
|
49
49
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
50
50
|
why: z.ZodString;
|
|
51
51
|
}, z.core.$strict>>>;
|
|
52
|
+
edit_style_applied: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
source: z.ZodString;
|
|
55
|
+
fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
56
|
+
left_out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
plan: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
59
|
+
words: z.ZodString;
|
|
60
|
+
device: z.ZodString;
|
|
61
|
+
field: z.ZodString;
|
|
62
|
+
source: z.ZodString;
|
|
63
|
+
credits: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
}, z.core.$strip>>>;
|
|
52
65
|
tariff: z.ZodOptional<z.ZodString>;
|
|
53
66
|
price_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
67
|
label: z.ZodString;
|