@clipwright/core 0.64.0 → 0.66.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.
Files changed (49) hide show
  1. package/dist/ad-guide.d.ts +17 -1
  2. package/dist/ad-guide.js +3 -1
  3. package/dist/api-failure.d.ts +1 -0
  4. package/dist/api-failure.js +10 -3
  5. package/dist/contract-dispositions.d.ts +1 -41
  6. package/dist/contract-dispositions.js +0 -9
  7. package/dist/contracts/v1/workflow-brief.d.ts +0 -96
  8. package/dist/contracts/v1/workflow-catalog.d.ts +0 -96
  9. package/dist/contracts/v1/workflow-client.d.ts +0 -48
  10. package/dist/contracts/v1/workflow-execution.d.ts +0 -172
  11. package/dist/contracts/v1/workflow-next.d.ts +0 -86
  12. package/dist/contracts/v1/workflow-plan.d.ts +0 -144
  13. package/dist/endpoint-notes.js +1 -1
  14. package/dist/errors.d.ts +13 -1
  15. package/dist/errors.js +3 -5
  16. package/dist/faceless-price.d.ts +0 -27
  17. package/dist/faceless-price.js +0 -28
  18. package/dist/faceless-public.d.ts +8 -120
  19. package/dist/faceless-public.js +9 -23
  20. package/dist/film-guide.d.ts +43 -0
  21. package/dist/film-guide.js +11 -0
  22. package/dist/generations.d.ts +9 -2
  23. package/dist/generations.js +18 -5
  24. package/dist/index.d.ts +0 -1
  25. package/dist/index.js +0 -1
  26. package/dist/openapi.d.ts +11 -0
  27. package/dist/openapi.js +3 -1
  28. package/dist/own-agent-price.d.ts +1 -1
  29. package/dist/own-agent-price.js +2 -2
  30. package/dist/own-agent-runs.d.ts +1 -0
  31. package/dist/own-agent-runs.js +5 -1
  32. package/dist/parts-pricing.d.ts +0 -2
  33. package/dist/parts-pricing.js +0 -2
  34. package/dist/scene-bible.d.ts +4 -12
  35. package/dist/scene-bible.js +6 -17
  36. package/dist/skills.d.ts +223 -223
  37. package/dist/skills.js +11 -13
  38. package/dist/voice-admission.d.ts +0 -48
  39. package/dist/workflows/methods/faceless-explainer.d.ts +0 -39
  40. package/dist/workflows/methods/kinetic-launch.d.ts +0 -78
  41. package/dist/workflows/methods/product-image-story.d.ts +0 -39
  42. package/dist/workflows/methods/reference-remake.d.ts +0 -39
  43. package/dist/workflows/methods/shared.d.ts +0 -39
  44. package/dist/workflows/methods/ugc-faq-answer.d.ts +0 -39
  45. package/dist/workflows/methods/ugc-product-intro.d.ts +0 -39
  46. package/dist/workflows/methods/website-proof-demo.d.ts +0 -78
  47. package/package.json +1 -1
  48. package/dist/scene-proposal.d.ts +0 -79
  49. package/dist/scene-proposal.js +0 -50
package/dist/errors.d.ts CHANGED
@@ -5,6 +5,17 @@ export declare const apiError: z.ZodObject<{
5
5
  error: z.ZodObject<{
6
6
  code: z.ZodString;
7
7
  message: z.ZodString;
8
+ next: z.ZodCatch<z.ZodOptional<z.ZodObject<{
9
+ action: z.ZodString;
10
+ method: z.ZodEnum<{
11
+ GET: "GET";
12
+ POST: "POST";
13
+ }>;
14
+ path: z.ZodString;
15
+ body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
16
+ add: z.ZodArray<z.ZodString>;
17
+ note: z.ZodString;
18
+ }, z.core.$strict>>>;
8
19
  }, z.core.$strip>;
9
20
  }, z.core.$strip>;
10
21
  export type ApiError = z.infer<typeof apiError>;
@@ -260,11 +271,12 @@ export type EditCeilingReachedError = z.infer<typeof editCeilingReachedError>;
260
271
  export declare function editCeilingReachedBody(args: Omit<EditCeilingReachedError["error"], "code" | "message">, counting?: "revision" | "candidate"): EditCeilingReachedError;
261
272
  export declare function unusableSourceMessage(errorClass: string, detail: string): string;
262
273
  export declare const MALFORMED_BODY_MESSAGE: string;
263
- declare const BARE_ERROR_CODES: readonly ["analysis_enqueue_failed", "aspect_conflict", "actor_unavailable", "actor_format_unavailable", "actor_storage_unavailable", "actor_generation_disabled", "actor_in_use", "ad_limited", "ad_not_found", "ad_slot_in_use", "ad_slot_unchecked", "asset_cap_exceeded", "asset_ingest_cap_exceeded", "asset_not_found", "asset_not_ready", "assets_disabled", "creator_profile_limited", "creator_profile_not_found", "creator_url_unsupported", "cut_limited", "cut_not_found", "cut_preview_limited", "cut_slot_in_use", "deletion_held", "editing_window_not_set", "explainer_busy", "feedback_limited", "film_draft_limited", "film_draft_not_found", "film_draft_stale", "film_run_not_found", "film_voice_not_ready", "generations_disabled", "generations_marking_pending", "idempotency_key_required", "idempotency_key_reused", "ingest_enqueue_failed", "insufficient_scope", "internal_error", "invalid_image", "invalid_request", "malformed_body", "no_changes", "not_found", "own_agent_disabled", "own_agent_marking_pending", "paid_render_disabled", "proposal_expired", "proposal_not_found", "proposal_not_ready", "proposal_stale", "payload_too_large", "reference_analysis_disabled", "reference_analysis_limited", "reference_analysis_not_found", "reference_not_analyzable", "reference_not_usable", "reference_url_unsupported", "revision_needs_generated_unit", "rights_not_confirmed", "run_media_in_use", "run_not_finished", "run_not_found", "source_aspect_mismatch", "source_not_usable", "take_check_limited", "take_frames_limited", "trend_page_unavailable", "trend_search_limited", "trend_search_not_found", "trends_unavailable", "unauthorized", "unsupported_combination", "unsupported_media_type", "unusable_source", "upload_cap_exceeded", "upload_digest_mismatch", "upload_expired", "upload_in_use", "upload_not_finished", "upload_size_mismatch", "upstream_error", "url_fetch_busy", "url_fetch_failed", "url_fetch_rate_limited", "url_fetch_refused", "url_import_disabled"];
274
+ declare const BARE_ERROR_CODES: readonly ["analysis_enqueue_failed", "aspect_conflict", "actor_unavailable", "actor_format_unavailable", "actor_storage_unavailable", "actor_generation_disabled", "actor_in_use", "ad_limited", "ad_not_found", "ad_slot_in_use", "ad_slot_unchecked", "asset_cap_exceeded", "asset_ingest_cap_exceeded", "asset_not_found", "asset_not_ready", "assets_disabled", "creator_profile_limited", "creator_profile_not_found", "creator_url_unsupported", "cut_limited", "cut_not_found", "cut_preview_limited", "cut_slot_in_use", "deletion_held", "editing_window_not_set", "explainer_busy", "feedback_limited", "film_draft_limited", "film_draft_not_found", "film_draft_stale", "film_run_not_found", "film_voice_not_ready", "generations_disabled", "generations_marking_pending", "idempotency_key_required", "idempotency_key_reused", "ingest_enqueue_failed", "insufficient_scope", "internal_error", "invalid_image", "invalid_request", "malformed_body", "no_changes", "not_found", "own_agent_disabled", "own_agent_marking_pending", "paid_render_disabled", "payload_too_large", "reference_analysis_disabled", "reference_analysis_limited", "reference_analysis_not_found", "reference_not_analyzable", "reference_not_usable", "reference_url_unsupported", "revision_needs_generated_unit", "rights_not_confirmed", "run_media_in_use", "run_not_finished", "run_not_found", "source_aspect_mismatch", "source_not_usable", "take_check_limited", "take_frames_limited", "trend_page_unavailable", "trend_search_limited", "trend_search_not_found", "trends_unavailable", "unauthorized", "unsupported_combination", "unsupported_media_type", "unusable_source", "upload_cap_exceeded", "upload_digest_mismatch", "upload_expired", "upload_in_use", "upload_not_finished", "upload_size_mismatch", "upstream_error", "url_fetch_busy", "url_fetch_failed", "url_fetch_rate_limited", "url_fetch_refused", "url_import_disabled"];
264
275
  export type BareApiErrorCode = (typeof BARE_ERROR_CODES)[number];
265
276
  export declare const API_ERROR_CODES: readonly string[];
266
277
  export declare function apiErrorBody(args: {
267
278
  code: BareApiErrorCode;
268
279
  message: string;
280
+ next?: DiyNext | undefined;
269
281
  }): ApiError;
270
282
  export {};
package/dist/errors.js CHANGED
@@ -7,6 +7,7 @@ export const apiError = z.object({
7
7
  error: z.object({
8
8
  code: z.string().min(1),
9
9
  message: z.string().min(1),
10
+ next: diyNext.optional().catch(undefined),
10
11
  }),
11
12
  });
12
13
  export function workflowCommandErrorBody(args) {
@@ -341,10 +342,6 @@ const BARE_ERROR_CODES = [
341
342
  "own_agent_disabled",
342
343
  "own_agent_marking_pending",
343
344
  "paid_render_disabled",
344
- "proposal_expired",
345
- "proposal_not_found",
346
- "proposal_not_ready",
347
- "proposal_stale",
348
345
  "payload_too_large",
349
346
  "reference_analysis_disabled",
350
347
  "reference_analysis_limited",
@@ -403,5 +400,6 @@ export const API_ERROR_CODES = [
403
400
  actorCreationLimitedError.shape.error.shape.code.value,
404
401
  ];
405
402
  export function apiErrorBody(args) {
406
- return apiError.parse({ error: { code: args.code, message: args.message } });
403
+ const next = args.next === undefined ? {} : { next: diyNext.parse(args.next) };
404
+ return apiError.parse({ error: { code: args.code, message: args.message, ...next } });
407
405
  }
@@ -143,31 +143,4 @@ export declare function quoteFaceless(input: {
143
143
  film?: SkillFilmTariff;
144
144
  } | undefined;
145
145
  }): FacelessQuote;
146
- export declare const FACELESS_DIRECTED_PLAIN_LIVE_CREDITS_PER_SECOND = 12;
147
- export declare const FACELESS_DIRECTED_TEXT_LIVE_CREDITS_PER_SECOND = 20;
148
- export declare const FACELESS_DIRECTED_DIRECTION_CREDITS = 120;
149
- export declare const FACELESS_DIRECTED_OWN_PICTURES_DIRECTION_CREDITS = 60;
150
- export declare const FACELESS_DIRECTED_IMAGE_CREDITS = 9;
151
146
  export declare const facelessDirectedPictures: (selectedSeconds: number) => number;
152
- export declare const FACELESS_DIRECTED_LIVE_SHARE: {
153
- readonly standard: number;
154
- readonly pro: 1;
155
- };
156
- export interface DirectedFacelessAsk {
157
- outputFrames: number;
158
- captions: boolean;
159
- music?: MusicRequest | undefined;
160
- ownPictures: number;
161
- tier: ExplainerTier;
162
- resolution: "720p" | "1080p";
163
- maxCredits?: number | undefined;
164
- }
165
- export interface DirectedFacelessTerms {
166
- quote: FacelessQuote;
167
- liveSecondsCeiling: number;
168
- plainLiveSeconds: number;
169
- stillsCeiling: number;
170
- ownPicturesRun: boolean;
171
- }
172
- export declare function quoteDirectedFaceless(ask: DirectedFacelessAsk): DirectedFacelessTerms;
173
- export declare function facelessPartsBaseAt(images: number, imageCredits: number, outputFrames: number): number;
@@ -113,32 +113,4 @@ export function quoteFaceless(input) {
113
113
  ...(shots ? { shotSeconds, shotCredits } : {}), ...(scenes ? { scenes, sceneCredits } : {}), ...(posePictures === undefined ? {} : { posePictures }),
114
114
  ...(authoredScenes ? { authoredScenes, authoredSceneCredits } : {}), ...(objectPictures ? { objectPictures, objectPictureCredits } : {}) };
115
115
  }
116
- export const FACELESS_DIRECTED_PLAIN_LIVE_CREDITS_PER_SECOND = 12;
117
- export const FACELESS_DIRECTED_TEXT_LIVE_CREDITS_PER_SECOND = 20;
118
- export const FACELESS_DIRECTED_DIRECTION_CREDITS = 120;
119
- export const FACELESS_DIRECTED_OWN_PICTURES_DIRECTION_CREDITS = 60;
120
- export const FACELESS_DIRECTED_IMAGE_CREDITS = 9;
121
116
  export const facelessDirectedPictures = (selectedSeconds) => Math.min(24, Math.ceil(selectedSeconds / 2.5));
122
- export const FACELESS_DIRECTED_LIVE_SHARE = { standard: 1 / 3, pro: 1 };
123
- export function quoteDirectedFaceless(ask) {
124
- const outputFrames = z.number().int().min(FACELESS_MIN_OUTPUT_FRAMES).max(2250).multipleOf(25).parse(ask.outputFrames);
125
- const seconds = outputFrames / 25, pictures = facelessDirectedPictures(seconds);
126
- const own = z.number().int().nonnegative().parse(ask.ownPictures), stillsCeiling = Math.max(0, pictures - own);
127
- const ownPicturesRun = own > 0 && own * 2 >= pictures;
128
- const directionCredits = ownPicturesRun ? FACELESS_DIRECTED_OWN_PICTURES_DIRECTION_CREDITS : FACELESS_DIRECTED_DIRECTION_CREDITS;
129
- const liveSecondsCeiling = ask.resolution === "1080p" ? 0 : Math.floor(seconds * FACELESS_DIRECTED_LIVE_SHARE[ask.tier]);
130
- const baseCredits = facelessPartsBaseAt(stillsCeiling, FACELESS_DIRECTED_IMAGE_CREDITS, outputFrames);
131
- const musicCredits = ask.music === undefined ? 0 : MUSIC_BED_CREDITS;
132
- const fixed = Math.max(FACELESS_MIN_BASE_CREDITS, baseCredits + directionCredits) + musicCredits;
133
- const text = FACELESS_DIRECTED_TEXT_LIVE_CREDITS_PER_SECOND, plain = FACELESS_DIRECTED_PLAIN_LIVE_CREDITS_PER_SECOND;
134
- const fits = ask.maxCredits === undefined ? liveSecondsCeiling : Math.floor((ask.maxCredits - fixed) / text);
135
- const shotSeconds = Math.max(0, Math.min(liveSecondsCeiling, fits)), shotCredits = shotSeconds * text;
136
- const plainLiveSeconds = shotSeconds;
137
- return { liveSecondsCeiling, plainLiveSeconds, stillsCeiling, ownPicturesRun, quote: { outputFrames, baseCredits, openerCredits: 0,
138
- totalCredits: fixed + shotCredits, totalCreditsWithoutText: fixed + plainLiveSeconds * plain, tariffId: FACELESS_DIRECTED_TARIFF_ID,
139
- captions: z.boolean().parse(ask.captions), images: stillsCeiling, imageCredits: FACELESS_DIRECTED_IMAGE_CREDITS, directionCredits, shotSeconds,
140
- shotCredits, ...(musicCredits ? { musicCredits } : {}) } };
141
- }
142
- export function facelessPartsBaseAt(images, imageCredits, outputFrames) {
143
- return images * imageCredits + Math.ceil(FACELESS_CREDITS_PER_1500_FRAMES * outputFrames / 1500);
144
- }
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { motionStyleAsked } from "./motion-styles.js";
3
3
  import { EXPLAINER_TIERS, type FacelessQuote, type SkillFilmTariff } from "./faceless-price.js";
4
+ import { sceneBible } from "./scene-bible.js";
4
5
  export declare const qualifiedImageUrl: z.ZodString;
5
6
  export declare const facelessSceneAnchor: z.ZodUnion<readonly [z.ZodObject<{
6
7
  startWord: z.ZodNumber;
@@ -68,10 +69,7 @@ export declare const EXPLAINER_TIER_REFUSAL = "tier needs format explainer: it p
68
69
  export declare function facelessTierRefusal(input: {
69
70
  tier?: unknown;
70
71
  format?: unknown;
71
- }, directed: boolean): string | null;
72
- export declare function directedFacelessTier(input: {
73
- tier?: (typeof EXPLAINER_TIERS)[number] | undefined;
74
- }): (typeof EXPLAINER_TIERS)[number];
72
+ }): string | null;
75
73
  export declare const facelessDirectedMark: z.ZodObject<{
76
74
  version: z.ZodLiteral<1>;
77
75
  tier: z.ZodEnum<{
@@ -383,21 +381,6 @@ export declare const makeFacelessInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
383
381
  "720p": "720p";
384
382
  }>>;
385
383
  max_credits: z.ZodOptional<z.ZodNumber>;
386
- scene: z.ZodOptional<z.ZodObject<{
387
- place: z.ZodOptional<z.ZodString>;
388
- posture: z.ZodOptional<z.ZodEnum<{
389
- seated: "seated";
390
- standing: "standing";
391
- }>>;
392
- wardrobe: z.ZodOptional<z.ZodString>;
393
- product: z.ZodOptional<z.ZodString>;
394
- props: z.ZodOptional<z.ZodArray<z.ZodString>>;
395
- light: z.ZodOptional<z.ZodString>;
396
- }, z.core.$strict>>;
397
- proposal: z.ZodOptional<z.ZodObject<{
398
- id: z.ZodString;
399
- accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
400
- }, z.core.$strict>>;
401
384
  propose: z.ZodOptional<z.ZodLiteral<false>>;
402
385
  input_mode: z.ZodLiteral<"script">;
403
386
  script: z.ZodString;
@@ -3153,7 +3136,6 @@ export declare const makeFacelessInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
3153
3136
  comma_s: z.ZodOptional<z.ZodNumber>;
3154
3137
  mid_phrase_s: z.ZodOptional<z.ZodNumber>;
3155
3138
  }, z.core.$strict>]>>;
3156
- keep_anchors: z.ZodOptional<z.ZodBoolean>;
3157
3139
  }, z.core.$strict>, z.ZodObject<{
3158
3140
  duration_seconds: z.ZodNumber;
3159
3141
  style_reference: z.ZodOptional<z.ZodString>;
@@ -3424,21 +3406,6 @@ export declare const makeFacelessInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
3424
3406
  "720p": "720p";
3425
3407
  }>>;
3426
3408
  max_credits: z.ZodOptional<z.ZodNumber>;
3427
- scene: z.ZodOptional<z.ZodObject<{
3428
- place: z.ZodOptional<z.ZodString>;
3429
- posture: z.ZodOptional<z.ZodEnum<{
3430
- seated: "seated";
3431
- standing: "standing";
3432
- }>>;
3433
- wardrobe: z.ZodOptional<z.ZodString>;
3434
- product: z.ZodOptional<z.ZodString>;
3435
- props: z.ZodOptional<z.ZodArray<z.ZodString>>;
3436
- light: z.ZodOptional<z.ZodString>;
3437
- }, z.core.$strict>>;
3438
- proposal: z.ZodOptional<z.ZodObject<{
3439
- id: z.ZodString;
3440
- accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
3441
- }, z.core.$strict>>;
3442
3409
  propose: z.ZodOptional<z.ZodLiteral<false>>;
3443
3410
  input_mode: z.ZodLiteral<"brief">;
3444
3411
  brief: z.ZodString;
@@ -3454,9 +3421,10 @@ export declare const makeFacelessInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
3454
3421
  scenes: z.ZodOptional<z.ZodNever>;
3455
3422
  moves: z.ZodOptional<z.ZodNever>;
3456
3423
  pause_trim: z.ZodOptional<z.ZodNever>;
3457
- keep_anchors: z.ZodOptional<z.ZodNever>;
3458
3424
  }, z.core.$strict>], "input_mode">;
3459
- export type MakeFacelessInput = z.infer<typeof makeFacelessInput>;
3425
+ export type MakeFacelessInput = z.infer<typeof makeFacelessInput> & {
3426
+ scene?: z.infer<typeof sceneBible> | undefined;
3427
+ };
3460
3428
  export type MakeFacelessInputArgs = z.input<typeof makeFacelessInput>;
3461
3429
  export declare const facelessRevisionInput: z.ZodObject<{
3462
3430
  input_mode: z.ZodLiteral<"revision">;
@@ -3843,6 +3811,7 @@ export declare const facelessStoredInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
3843
3811
  "720p": "720p";
3844
3812
  }>>;
3845
3813
  max_credits: z.ZodOptional<z.ZodNumber>;
3814
+ propose: z.ZodOptional<z.ZodLiteral<false>>;
3846
3815
  scene: z.ZodOptional<z.ZodObject<{
3847
3816
  place: z.ZodOptional<z.ZodString>;
3848
3817
  posture: z.ZodOptional<z.ZodEnum<{
@@ -3858,7 +3827,6 @@ export declare const facelessStoredInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
3858
3827
  id: z.ZodString;
3859
3828
  accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
3860
3829
  }, z.core.$strict>>;
3861
- propose: z.ZodOptional<z.ZodLiteral<false>>;
3862
3830
  input_mode: z.ZodLiteral<"script">;
3863
3831
  script: z.ZodString;
3864
3832
  transitions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
@@ -6613,7 +6581,6 @@ export declare const facelessStoredInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
6613
6581
  comma_s: z.ZodOptional<z.ZodNumber>;
6614
6582
  mid_phrase_s: z.ZodOptional<z.ZodNumber>;
6615
6583
  }, z.core.$strict>]>>;
6616
- keep_anchors: z.ZodOptional<z.ZodBoolean>;
6617
6584
  insert_assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
6618
6585
  insert_id: z.ZodString;
6619
6586
  slot: z.ZodOptional<z.ZodString>;
@@ -6712,6 +6679,7 @@ export declare const facelessStoredInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
6712
6679
  none: "none";
6713
6680
  }>;
6714
6681
  }, z.core.$strict>>;
6682
+ keep_anchors: z.ZodOptional<z.ZodBoolean>;
6715
6683
  }, z.core.$strict>, z.ZodObject<{
6716
6684
  duration_seconds: z.ZodNumber;
6717
6685
  style_reference: z.ZodOptional<z.ZodString>;
@@ -6982,6 +6950,7 @@ export declare const facelessStoredInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
6982
6950
  "720p": "720p";
6983
6951
  }>>;
6984
6952
  max_credits: z.ZodOptional<z.ZodNumber>;
6953
+ propose: z.ZodOptional<z.ZodLiteral<false>>;
6985
6954
  scene: z.ZodOptional<z.ZodObject<{
6986
6955
  place: z.ZodOptional<z.ZodString>;
6987
6956
  posture: z.ZodOptional<z.ZodEnum<{
@@ -6997,7 +6966,6 @@ export declare const facelessStoredInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
6997
6966
  id: z.ZodString;
6998
6967
  accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
6999
6968
  }, z.core.$strict>>;
7000
- propose: z.ZodOptional<z.ZodLiteral<false>>;
7001
6969
  input_mode: z.ZodLiteral<"brief">;
7002
6970
  brief: z.ZodString;
7003
6971
  transitions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
@@ -7012,7 +6980,6 @@ export declare const facelessStoredInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
7012
6980
  scenes: z.ZodOptional<z.ZodNever>;
7013
6981
  moves: z.ZodOptional<z.ZodNever>;
7014
6982
  pause_trim: z.ZodOptional<z.ZodNever>;
7015
- keep_anchors: z.ZodOptional<z.ZodNever>;
7016
6983
  scene_direction: z.ZodOptional<z.ZodObject<{
7017
6984
  mode: z.ZodLiteral<"complete">;
7018
6985
  proposal: z.ZodOptional<z.ZodObject<{
@@ -7219,28 +7186,12 @@ export declare const offeredFacelessInputShape: {
7219
7186
  standard: "standard";
7220
7187
  }>>;
7221
7188
  pause_trim: z.ZodOptional<z.ZodUnknown>;
7222
- keep_anchors: z.ZodOptional<z.ZodBoolean>;
7223
7189
  voice: z.ZodOptional<z.ZodString>;
7224
7190
  resolution: z.ZodOptional<z.ZodEnum<{
7225
7191
  "1080p": "1080p";
7226
7192
  "720p": "720p";
7227
7193
  }>>;
7228
7194
  max_credits: z.ZodOptional<z.ZodNumber>;
7229
- scene: z.ZodOptional<z.ZodObject<{
7230
- place: z.ZodOptional<z.ZodString>;
7231
- posture: z.ZodOptional<z.ZodEnum<{
7232
- seated: "seated";
7233
- standing: "standing";
7234
- }>>;
7235
- wardrobe: z.ZodOptional<z.ZodString>;
7236
- product: z.ZodOptional<z.ZodString>;
7237
- props: z.ZodOptional<z.ZodArray<z.ZodString>>;
7238
- light: z.ZodOptional<z.ZodString>;
7239
- }, z.core.$strict>>;
7240
- proposal: z.ZodOptional<z.ZodObject<{
7241
- id: z.ZodString;
7242
- accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
7243
- }, z.core.$strict>>;
7244
7195
  propose: z.ZodOptional<z.ZodLiteral<false>>;
7245
7196
  };
7246
7197
  export declare const offeredFacelessInput: z.ZodObject<{
@@ -7300,28 +7251,12 @@ export declare const offeredFacelessInput: z.ZodObject<{
7300
7251
  standard: "standard";
7301
7252
  }>>;
7302
7253
  pause_trim: z.ZodOptional<z.ZodUnknown>;
7303
- keep_anchors: z.ZodOptional<z.ZodBoolean>;
7304
7254
  voice: z.ZodOptional<z.ZodString>;
7305
7255
  resolution: z.ZodOptional<z.ZodEnum<{
7306
7256
  "1080p": "1080p";
7307
7257
  "720p": "720p";
7308
7258
  }>>;
7309
7259
  max_credits: z.ZodOptional<z.ZodNumber>;
7310
- scene: z.ZodOptional<z.ZodObject<{
7311
- place: z.ZodOptional<z.ZodString>;
7312
- posture: z.ZodOptional<z.ZodEnum<{
7313
- seated: "seated";
7314
- standing: "standing";
7315
- }>>;
7316
- wardrobe: z.ZodOptional<z.ZodString>;
7317
- product: z.ZodOptional<z.ZodString>;
7318
- props: z.ZodOptional<z.ZodArray<z.ZodString>>;
7319
- light: z.ZodOptional<z.ZodString>;
7320
- }, z.core.$strict>>;
7321
- proposal: z.ZodOptional<z.ZodObject<{
7322
- id: z.ZodString;
7323
- accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
7324
- }, z.core.$strict>>;
7325
7260
  propose: z.ZodOptional<z.ZodLiteral<false>>;
7326
7261
  }, z.core.$strict>;
7327
7262
  export declare const facelessPlannerInput: z.ZodObject<{
@@ -7377,53 +7312,6 @@ export declare const facelessQuoteResponse: z.ZodObject<{
7377
7312
  standard: z.ZodNumber;
7378
7313
  pro: z.ZodNumber;
7379
7314
  }, z.core.$strict>>;
7380
- tiers: z.ZodOptional<z.ZodObject<{
7381
- tier: z.ZodEnum<{
7382
- pro: "pro";
7383
- standard: "standard";
7384
- }>;
7385
- standard: z.ZodNumber;
7386
- pro: z.ZodNumber;
7387
- }, z.core.$strict>>;
7388
- scene_proposal: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7389
- state: z.ZodLiteral<"writing">;
7390
- retry_after_s: z.ZodNumber;
7391
- }, z.core.$strict>, z.ZodObject<{
7392
- state: z.ZodLiteral<"ready">;
7393
- id: z.ZodString;
7394
- expires_at: z.ZodString;
7395
- scene: z.ZodOptional<z.ZodObject<{
7396
- place: z.ZodOptional<z.ZodString>;
7397
- posture: z.ZodOptional<z.ZodEnum<{
7398
- seated: "seated";
7399
- standing: "standing";
7400
- }>>;
7401
- wardrobe: z.ZodOptional<z.ZodString>;
7402
- product: z.ZodOptional<z.ZodString>;
7403
- props: z.ZodOptional<z.ZodArray<z.ZodString>>;
7404
- light: z.ZodOptional<z.ZodString>;
7405
- }, z.core.$strict>>;
7406
- free: z.ZodArray<z.ZodObject<{
7407
- what: z.ZodString;
7408
- }, z.core.$strict>>;
7409
- options: z.ZodArray<z.ZodObject<{
7410
- id: z.ZodString;
7411
- what: z.ZodString;
7412
- field: z.ZodEnum<{
7413
- moves: "moves";
7414
- music: "music";
7415
- scenes: "scenes";
7416
- shots: "shots";
7417
- }>;
7418
- credits: z.ZodNumber;
7419
- item: z.ZodUnknown;
7420
- }, z.core.$strict>>;
7421
- base_credits: z.ZodNumber;
7422
- notes: z.ZodArray<z.ZodString>;
7423
- }, z.core.$strict>, z.ZodObject<{
7424
- state: z.ZodLiteral<"unavailable">;
7425
- reason: z.ZodString;
7426
- }, z.core.$strict>], "state">>;
7427
7315
  warnings: z.ZodDefault<z.ZodArray<z.ZodString>>;
7428
7316
  contract_version: z.ZodString;
7429
7317
  }, z.core.$strict>;
@@ -23,8 +23,7 @@ import { pauseTrim } from "./reference-voice.js";
23
23
  import { pinnedMascot } from "./mascots.js";
24
24
  import { filmDirections } from "./film-directions.js";
25
25
  import { maxCreditsField } from "./max-credits.js";
26
- import { FACELESS_SCENE_DESCRIPTION, sceneBible, sceneDirectionMark } from "./scene-bible.js";
27
- import { facelessProposeField, facelessSceneProposalAccept, sceneProposal } from "./scene-proposal.js";
26
+ import { sceneBible, sceneDirectionMark, storedSceneProposal } from "./scene-bible.js";
28
27
  export const qualifiedImageUrl = uploadResponse.shape.url.max(MAX_URL_LENGTH).refine((value) => {
29
28
  const host = new URL(value).hostname.toLowerCase();
30
29
  return host !== "localhost" && !host.endsWith(".localhost") &&
@@ -91,10 +90,10 @@ const common = {
91
90
  resolution: offeredResolution.optional().describe("Output resolution: 720p (720x1280) or 1080p (1080x1920). Omitted means 720p. " +
92
91
  "The price does not depend on it."),
93
92
  max_credits: maxCreditsField,
94
- scene: sceneBible.optional(),
95
- proposal: facelessSceneProposalAccept.optional(),
96
- propose: facelessProposeField,
93
+ propose: z.literal(false).optional().describe("Deprecated: quotes no longer propose a scene, so false changes nothing; accepted so an " +
94
+ "older body still parses."),
97
95
  };
96
+ const storedSceneFields = { scene: sceneBible.optional(), proposal: storedSceneProposal.optional() };
98
97
  export function facelessRunFrame(storedInput) {
99
98
  const resolution = storedInput !== null && typeof storedInput === "object" ? storedInput.resolution : undefined;
100
99
  return resolution === "720p" ? { width: 720, height: 1280 } : { width: 1080, height: 1920 };
@@ -147,11 +146,8 @@ function refuseExplainerFields(input, context) {
147
146
  for (const { path, message } of [...explainerFieldRefusals(input), ...mascotFieldRefusals(input)])
148
147
  context.addIssue({ code: customIssue, path, message });
149
148
  }
150
- export function facelessTierRefusal(input, directed) {
151
- return input.tier !== undefined && input.format !== "explainer" && !directed ? EXPLAINER_TIER_REFUSAL : null;
152
- }
153
- export function directedFacelessTier(input) {
154
- return input.tier ?? "standard";
149
+ export function facelessTierRefusal(input) {
150
+ return input.tier !== undefined && input.format !== "explainer" ? EXPLAINER_TIER_REFUSAL : null;
155
151
  }
156
152
  export const facelessDirectedMark = z.strictObject({ version: z.literal(1), tier: z.enum(EXPLAINER_TIERS),
157
153
  pairing: z.enum(["none", "keep", "by_meaning"]) });
@@ -190,7 +186,6 @@ const scriptShape = { ...common,
190
186
  scenes: z.array(ugcScene).min(1).max(MAX_SCENES).optional(),
191
187
  moves: z.array(ugcMove).min(1).max(MAX_MOVES).optional(),
192
188
  pause_trim: z.union([z.literal(false), pauseTrim]).optional(),
193
- keep_anchors: z.boolean().optional(),
194
189
  };
195
190
  const scriptBase = z.object(scriptShape).strict();
196
191
  function refineScript(input, context) {
@@ -223,12 +218,13 @@ function refineScript(input, context) {
223
218
  }
224
219
  }
225
220
  const scriptInput = scriptBase.superRefine(refineScript);
226
- const storedScriptInput = z.object({ ...scriptShape,
221
+ const storedScriptInput = z.object({ ...scriptShape, ...storedSceneFields,
227
222
  insert_assets: z.array(pinnedInsertAsset).min(1).max(MAX_TEMPLATE_MEDIA + FACELESS_MAX_SHOTS).optional(),
228
223
  mascot: pinnedMascot.optional(),
229
224
  workflow_directions: filmDirections.optional(),
230
225
  scene_direction: sceneDirectionMark.optional(),
231
226
  directed: facelessDirectedMark.optional(),
227
+ keep_anchors: z.boolean().optional(),
232
228
  }).strict().superRefine(refineScript);
233
229
  const briefShape = { ...common,
234
230
  input_mode: z.literal("brief"),
@@ -239,7 +235,6 @@ const briefShape = { ...common,
239
235
  scenes: z.never({ error: "scenes need input_mode script: they sit on the narration's words" }).optional(),
240
236
  moves: z.never({ error: "moves need input_mode script: they sit on the narration's words" }).optional(),
241
237
  pause_trim: z.never({ error: "pause_trim needs input_mode script" }).optional(),
242
- keep_anchors: z.never({ error: "keep_anchors needs input_mode script: it keeps your scene_images on the words you anchored them to" }).optional(),
243
238
  };
244
239
  function refineBrief(input, context) {
245
240
  refuseSounds(input, context);
@@ -249,7 +244,7 @@ function refineBrief(input, context) {
249
244
  message: "motion_style spans need input_mode script: they sit on the narration's words; a brief takes style only" });
250
245
  }
251
246
  const briefInput = z.object(briefShape).strict().superRefine(refineBrief);
252
- const storedBriefInput = z.object({ ...briefShape, scene_direction: sceneDirectionMark.optional(), directed: facelessDirectedMark.optional() })
247
+ const storedBriefInput = z.object({ ...briefShape, ...storedSceneFields, scene_direction: sceneDirectionMark.optional(), directed: facelessDirectedMark.optional() })
253
248
  .strict().superRefine(refineBrief);
254
249
  export const makeFacelessInput = z.discriminatedUnion("input_mode", [scriptInput, briefInput]);
255
250
  export const facelessRevisionInput = z.strictObject({
@@ -325,13 +320,8 @@ export const offeredFacelessInputShape = {
325
320
  "a film takes about half an hour. Without voice, an English script is read by our fastest voice."),
326
321
  tier: common.tier.describe(`Format explainer: 'standard' (default): ${tierPrice("standard")}. 'pro': more careful direction and ` +
327
322
  `richer scenes, ${tierPrice("pro")}. Pose pictures are on top. quote_faceless names both totals: show them and let the user pick. ` +
328
- "Other formats, where your account has the two levels: 'standard' (default) is your story in pictures that move, with captions and " +
329
- "sound and about a third of it live; 'pro' plays every shot as live footage. quote_faceless names both totals in tiers. " +
330
323
  "Elsewhere tier is refused."),
331
324
  pause_trim: z.unknown().optional().describe("Script only: as make_ugc pause_trim, same default with templates, scenes, shots or format explainer."),
332
- keep_anchors: scriptInput.shape.keep_anchors.describe("Script only, with scene_images. true keeps each picture on the words you anchored it to. " +
333
- "Omitted or false: a picture that plainly shows another sentence of the script may be shown on that sentence instead; warnings[] names " +
334
- "each move, and keep_anchors true keeps yours."),
335
325
  voice: common.voice
336
326
  .describe("Narration voice: a name from list_voices with skill=make_faceless (kind faceless_voice). " +
337
327
  `Omitted means ${DEFAULT_FACELESS_VOICE}; for an English explainer, the fastest voice. Choose a voice in the language of the narration: a voice reads any ` +
@@ -339,8 +329,6 @@ export const offeredFacelessInputShape = {
339
329
  "A raw voice_id is not accepted here."),
340
330
  resolution: common.resolution,
341
331
  max_credits: common.max_credits,
342
- scene: common.scene.describe(FACELESS_SCENE_DESCRIPTION),
343
- proposal: common.proposal,
344
332
  propose: common.propose,
345
333
  };
346
334
  const rejectedFacelessField = (key) => Object.hasOwn(FACELESS_REJECTED_FIELDS, key)
@@ -366,8 +354,6 @@ export const facelessQuoteResponse = facelessQuote.extend({
366
354
  skill: z.literal("make_faceless"),
367
355
  explainer_fit: z.strictObject({ fits: z.boolean(), reason: z.string(), rewrite: z.string().optional() }).optional(),
368
356
  explainer_tiers: z.strictObject({ tier: z.enum(EXPLAINER_TIERS), standard: z.number().int().positive(), pro: z.number().int().positive() }).optional(),
369
- tiers: z.strictObject({ tier: z.enum(EXPLAINER_TIERS), standard: z.number().int().positive(), pro: z.number().int().positive() }).optional(),
370
- scene_proposal: sceneProposal.optional(),
371
357
  warnings: z.array(z.string()).default([]),
372
358
  contract_version: z.string().min(1),
373
359
  }).strict();
@@ -7,6 +7,23 @@ export declare const FILM_GUIDE_FORMATS: readonly ["explainer", "story", "list",
7
7
  export type FilmGuideFormat = (typeof FILM_GUIDE_FORMATS)[number];
8
8
  export declare const FILM_GUIDE_SECTIONS: readonly ["steps", "story", "words", "captions", "voice", "consistency", "pictures", "motion", "density", "repair"];
9
9
  export type FilmGuideSection = (typeof FILM_GUIDE_SECTIONS)[number];
10
+ export declare const RECENT_LOOKS_MAX = 5;
11
+ export declare const guideCatalog: z.ZodArray<z.ZodObject<{
12
+ tool: z.ZodEnum<{
13
+ get_ad_guide: "get_ad_guide";
14
+ get_film_guide: "get_film_guide";
15
+ }>;
16
+ format: z.ZodOptional<z.ZodEnum<{
17
+ cartoon: "cartoon";
18
+ explainer: "explainer";
19
+ list: "list";
20
+ own_pictures: "own_pictures";
21
+ story: "story";
22
+ }>>;
23
+ use_when: z.ZodString;
24
+ version: z.ZodString;
25
+ }, z.core.$strict>>;
26
+ export type GuideCatalog = z.infer<typeof guideCatalog>;
10
27
  export declare const filmGuideQuery: z.ZodObject<{
11
28
  format: z.ZodOptional<z.ZodEnum<{
12
29
  cartoon: "cartoon";
@@ -63,6 +80,32 @@ export declare const filmGuide: z.ZodObject<{
63
80
  }, z.core.$strict>>;
64
81
  kept_sounds: z.ZodArray<z.ZodString>;
65
82
  version: z.ZodOptional<z.ZodString>;
83
+ guides: z.ZodOptional<z.ZodArray<z.ZodObject<{
84
+ tool: z.ZodEnum<{
85
+ get_ad_guide: "get_ad_guide";
86
+ get_film_guide: "get_film_guide";
87
+ }>;
88
+ format: z.ZodOptional<z.ZodEnum<{
89
+ cartoon: "cartoon";
90
+ explainer: "explainer";
91
+ list: "list";
92
+ own_pictures: "own_pictures";
93
+ story: "story";
94
+ }>>;
95
+ use_when: z.ZodString;
96
+ version: z.ZodString;
97
+ }, z.core.$strict>>>;
98
+ recent_looks: z.ZodOptional<z.ZodArray<z.ZodObject<{
99
+ look: z.ZodString;
100
+ format: z.ZodEnum<{
101
+ cartoon: "cartoon";
102
+ explainer: "explainer";
103
+ list: "list";
104
+ own_pictures: "own_pictures";
105
+ story: "story";
106
+ }>;
107
+ made_on: z.ZodString;
108
+ }, z.core.$strict>>>;
66
109
  }, z.core.$strict>;
67
110
  export type FilmGuide = z.infer<typeof filmGuide>;
68
111
  export declare const filmKitQuery: z.ZodObject<{
@@ -20,6 +20,13 @@ export const FILM_KIT_FILES = [
20
20
  ];
21
21
  export const FILM_GUIDE_FORMATS = ["explainer", "story", "list", "own_pictures", "cartoon"];
22
22
  export const FILM_GUIDE_SECTIONS = ["steps", "story", "words", "captions", "voice", "consistency", "pictures", "motion", "density", "repair"];
23
+ export const RECENT_LOOKS_MAX = 5;
24
+ export const guideCatalog = z.array(z.strictObject({
25
+ tool: z.enum(["get_ad_guide", "get_film_guide"]),
26
+ format: z.enum(FILM_GUIDE_FORMATS).optional(),
27
+ use_when: z.string().min(1),
28
+ version: z.string().regex(/^[a-f0-9]{12}$/),
29
+ })).describe("Every guide this account can read, each with its version: read the one that fits the video before its first tool call");
23
30
  export const filmGuideQuery = z.strictObject({
24
31
  format: z.enum(FILM_GUIDE_FORMATS).optional().describe("The video to make: explainer (the default, a coded film), story, list (facts or " +
25
32
  "tips), own_pictures (the user's own pictures) or cartoon (a drawn hero in generated pictures)"),
@@ -39,6 +46,10 @@ export const filmGuide = z.strictObject({
39
46
  .describe("Sounds your account's films made and kept, newest first: name one exactly in sfx and it plays again, made nothing new"),
40
47
  version: z.string().regex(/^[a-f0-9]{12}$/).optional()
41
48
  .describe("The guide's version: a digest of the whole guide of this format, the same whichever section is read"),
49
+ guides: guideCatalog.optional(),
50
+ recent_looks: z.array(z.strictObject({ look: z.string(), format: z.enum(FILM_GUIDE_FORMATS), made_on: z.string().regex(/^\d{4}-\d{2}-\d{2}$/) }))
51
+ .max(RECENT_LOOKS_MAX).optional()
52
+ .describe("The looks this account's latest faceless videos used, newest first: pick another unless the user keeps their style"),
42
53
  });
43
54
  export const filmKitQuery = z.strictObject({
44
55
  path: z.enum(FILM_KIT_FILES).optional().describe("One kit file; every file when omitted"),
@@ -9,7 +9,7 @@ export declare const GENERATION_VIDEO_MODELS: readonly ["seedance-2.0", "seedanc
9
9
  export type GenerationImageModel = (typeof GENERATION_IMAGE_MODELS)[number];
10
10
  export type GenerationVideoModel = (typeof GENERATION_VIDEO_MODELS)[number];
11
11
  export type GenerationModel = GenerationImageModel | GenerationVideoModel;
12
- export declare const GENERATION_IMAGE_ASPECTS: readonly ["9:16", "16:9", "1:1"];
12
+ export declare const GENERATION_IMAGE_ASPECTS: readonly ["9:16", "16:9", "1:1", "21:9"];
13
13
  export declare const GENERATION_VIDEO_ASPECTS: readonly ["9:16", "16:9"];
14
14
  export declare const GENERATION_RESOLUTIONS: readonly ["360p", "480p", "720p", "1080p"];
15
15
  export declare const GENERATION_VIDEO_MODES: readonly ["text", "first_frame", "reference"];
@@ -57,6 +57,7 @@ export interface GenerationVideoCapability {
57
57
  duration_values?: readonly number[];
58
58
  last_frame?: false;
59
59
  last_frame_max_s?: number;
60
+ audio?: true;
60
61
  rows: readonly GenerationVideoRow[];
61
62
  }
62
63
  type GenerationCapabilities = {
@@ -90,6 +91,7 @@ export declare const generateImageRequest: z.ZodObject<{
90
91
  aspect_ratio: z.ZodEnum<{
91
92
  "16:9": "16:9";
92
93
  "1:1": "1:1";
94
+ "21:9": "21:9";
93
95
  "9:16": "9:16";
94
96
  }>;
95
97
  references: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -231,6 +233,7 @@ export declare const generateVideoRequest: z.ZodObject<{
231
233
  static: "static";
232
234
  turntable: "turntable";
233
235
  }>>;
236
+ audio: z.ZodOptional<z.ZodBoolean>;
234
237
  max_credits: z.ZodOptional<z.ZodNumber>;
235
238
  }, z.core.$strict>;
236
239
  export type GenerateVideoRequest = z.infer<typeof generateVideoRequest>;
@@ -298,6 +301,7 @@ declare const listedModel: z.ZodObject<{
298
301
  }, z.core.$strict>>;
299
302
  duration_values: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
300
303
  max_references: z.ZodNumber;
304
+ audio: z.ZodOptional<z.ZodLiteral<true>>;
301
305
  rows: z.ZodArray<z.ZodObject<{
302
306
  aspect_ratio: z.ZodString;
303
307
  resolution: z.ZodNullable<z.ZodEnum<{
@@ -334,6 +338,7 @@ export declare const generationModels: z.ZodObject<{
334
338
  }, z.core.$strict>>;
335
339
  duration_values: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
336
340
  max_references: z.ZodNumber;
341
+ audio: z.ZodOptional<z.ZodLiteral<true>>;
337
342
  rows: z.ZodArray<z.ZodObject<{
338
343
  aspect_ratio: z.ZodString;
339
344
  resolution: z.ZodNullable<z.ZodEnum<{
@@ -352,5 +357,7 @@ export declare const generationModels: z.ZodObject<{
352
357
  }, z.core.$strict>;
353
358
  export type GenerationModels = z.infer<typeof generationModels>;
354
359
  export type ListedGenerationModel = z.infer<typeof listedModel>;
355
- export declare function listGenerationModels(): ListedGenerationModel[];
360
+ export declare function listGenerationModels(options?: {
361
+ audio?: boolean;
362
+ }): ListedGenerationModel[];
356
363
  export {};