@clipwright/core 0.80.0 → 0.81.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.
@@ -235,6 +235,33 @@ export declare const workflowQuoteBinding: z.ZodObject<{
235
235
  standard: z.ZodNumber;
236
236
  pro: z.ZodNumber;
237
237
  }, z.core.$strict>>;
238
+ alternatives: z.ZodOptional<z.ZodArray<z.ZodObject<{
239
+ route: z.ZodEnum<{
240
+ cartoon: "cartoon";
241
+ explainer: "explainer";
242
+ pictures: "pictures";
243
+ }>;
244
+ available: z.ZodBoolean;
245
+ reason: z.ZodOptional<z.ZodString>;
246
+ from: z.ZodNumber;
247
+ parts: z.ZodArray<z.ZodObject<{
248
+ part: z.ZodString;
249
+ count: z.ZodNumber;
250
+ credits_each: z.ZodNumber;
251
+ quote_tool: z.ZodString;
252
+ }, z.core.$strict>>;
253
+ add_ons: z.ZodArray<z.ZodObject<{
254
+ part: z.ZodString;
255
+ credits_each: z.ZodNumber;
256
+ quote_tool: z.ZodString;
257
+ }, z.core.$strict>>;
258
+ looks: z.ZodOptional<z.ZodArray<z.ZodObject<{
259
+ id: z.ZodString;
260
+ name: z.ZodString;
261
+ sample: z.ZodURL;
262
+ }, z.core.$strict>>>;
263
+ note: z.ZodString;
264
+ }, z.core.$strict>>>;
238
265
  warnings: z.ZodDefault<z.ZodArray<z.ZodString>>;
239
266
  contract_version: z.ZodString;
240
267
  }, z.core.$strict>;
@@ -457,6 +484,33 @@ export declare const workflowQuoteBindingRead: z.ZodObject<{
457
484
  standard: z.ZodNumber;
458
485
  pro: z.ZodNumber;
459
486
  }, z.core.$strict>>;
487
+ alternatives: z.ZodOptional<z.ZodArray<z.ZodObject<{
488
+ route: z.ZodEnum<{
489
+ cartoon: "cartoon";
490
+ explainer: "explainer";
491
+ pictures: "pictures";
492
+ }>;
493
+ available: z.ZodBoolean;
494
+ reason: z.ZodOptional<z.ZodString>;
495
+ from: z.ZodNumber;
496
+ parts: z.ZodArray<z.ZodObject<{
497
+ part: z.ZodString;
498
+ count: z.ZodNumber;
499
+ credits_each: z.ZodNumber;
500
+ quote_tool: z.ZodString;
501
+ }, z.core.$strict>>;
502
+ add_ons: z.ZodArray<z.ZodObject<{
503
+ part: z.ZodString;
504
+ credits_each: z.ZodNumber;
505
+ quote_tool: z.ZodString;
506
+ }, z.core.$strict>>;
507
+ looks: z.ZodOptional<z.ZodArray<z.ZodObject<{
508
+ id: z.ZodString;
509
+ name: z.ZodString;
510
+ sample: z.ZodURL;
511
+ }, z.core.$strict>>>;
512
+ note: z.ZodString;
513
+ }, z.core.$strict>>>;
460
514
  warnings: z.ZodDefault<z.ZodArray<z.ZodString>>;
461
515
  contract_version: z.ZodString;
462
516
  tariffId: z.ZodString;
@@ -229,6 +229,33 @@ export declare const workflowQuoteAnswer: z.ZodObject<{
229
229
  standard: z.ZodNumber;
230
230
  pro: z.ZodNumber;
231
231
  }, z.core.$strict>>;
232
+ alternatives: z.ZodOptional<z.ZodArray<z.ZodObject<{
233
+ route: z.ZodEnum<{
234
+ cartoon: "cartoon";
235
+ explainer: "explainer";
236
+ pictures: "pictures";
237
+ }>;
238
+ available: z.ZodBoolean;
239
+ reason: z.ZodOptional<z.ZodString>;
240
+ from: z.ZodNumber;
241
+ parts: z.ZodArray<z.ZodObject<{
242
+ part: z.ZodString;
243
+ count: z.ZodNumber;
244
+ credits_each: z.ZodNumber;
245
+ quote_tool: z.ZodString;
246
+ }, z.core.$strict>>;
247
+ add_ons: z.ZodArray<z.ZodObject<{
248
+ part: z.ZodString;
249
+ credits_each: z.ZodNumber;
250
+ quote_tool: z.ZodString;
251
+ }, z.core.$strict>>;
252
+ looks: z.ZodOptional<z.ZodArray<z.ZodObject<{
253
+ id: z.ZodString;
254
+ name: z.ZodString;
255
+ sample: z.ZodURL;
256
+ }, z.core.$strict>>>;
257
+ note: z.ZodString;
258
+ }, z.core.$strict>>>;
232
259
  warnings: z.ZodDefault<z.ZodArray<z.ZodString>>;
233
260
  contract_version: z.ZodString;
234
261
  }, z.core.$strict>;
@@ -7339,6 +7339,33 @@ export declare const facelessQuoteResponse: z.ZodObject<{
7339
7339
  standard: z.ZodNumber;
7340
7340
  pro: z.ZodNumber;
7341
7341
  }, z.core.$strict>>;
7342
+ alternatives: z.ZodOptional<z.ZodArray<z.ZodObject<{
7343
+ route: z.ZodEnum<{
7344
+ cartoon: "cartoon";
7345
+ explainer: "explainer";
7346
+ pictures: "pictures";
7347
+ }>;
7348
+ available: z.ZodBoolean;
7349
+ reason: z.ZodOptional<z.ZodString>;
7350
+ from: z.ZodNumber;
7351
+ parts: z.ZodArray<z.ZodObject<{
7352
+ part: z.ZodString;
7353
+ count: z.ZodNumber;
7354
+ credits_each: z.ZodNumber;
7355
+ quote_tool: z.ZodString;
7356
+ }, z.core.$strict>>;
7357
+ add_ons: z.ZodArray<z.ZodObject<{
7358
+ part: z.ZodString;
7359
+ credits_each: z.ZodNumber;
7360
+ quote_tool: z.ZodString;
7361
+ }, z.core.$strict>>;
7362
+ looks: z.ZodOptional<z.ZodArray<z.ZodObject<{
7363
+ id: z.ZodString;
7364
+ name: z.ZodString;
7365
+ sample: z.ZodURL;
7366
+ }, z.core.$strict>>>;
7367
+ note: z.ZodString;
7368
+ }, z.core.$strict>>>;
7342
7369
  warnings: z.ZodDefault<z.ZodArray<z.ZodString>>;
7343
7370
  contract_version: z.ZodString;
7344
7371
  }, z.core.$strict>;
@@ -22,6 +22,7 @@ import { pauseTrim } from "./reference-voice.js";
22
22
  import { pinnedMascot } from "./mascots.js";
23
23
  import { filmDirections } from "./film-directions.js";
24
24
  import { maxCreditsField } from "./max-credits.js";
25
+ import { FACELESS_ROUTE_ESTIMATE_TEXT, facelessAlternative } from "./faceless-route-estimate.js";
25
26
  import { sceneBible, sceneDirectionMark, storedSceneProposal } from "./scene-bible.js";
26
27
  export const qualifiedImageUrl = uploadResponse.shape.url.max(MAX_URL_LENGTH).refine((value) => {
27
28
  const host = new URL(value).hostname.toLowerCase();
@@ -333,6 +334,8 @@ export const facelessQuoteResponse = facelessQuote.extend({
333
334
  skill: z.literal("make_faceless"),
334
335
  explainer_fit: z.strictObject({ fits: z.boolean(), reason: z.string(), rewrite: z.string().optional() }).optional(),
335
336
  explainer_tiers: z.strictObject({ tier: z.enum(EXPLAINER_TIERS), standard: z.number().int().positive(), pro: z.number().int().positive() }).optional(),
337
+ alternatives: z.array(facelessAlternative).optional().describe("The ways to make this video, this quote first as route pictures, each " +
338
+ `with the credits it starts from and the price of each add-on. Beside this quote, each is ${FACELESS_ROUTE_ESTIMATE_TEXT}.`),
336
339
  warnings: z.array(z.string()).default([]),
337
340
  contract_version: z.string().min(1),
338
341
  }).strict();
@@ -0,0 +1,82 @@
1
+ import { z } from "zod";
2
+ export declare const FACELESS_ROUTE_ESTIMATE_TEXT = "an estimate, not a quote: each part is quoted and approved before it is made";
3
+ export declare const FACELESS_CARTOON_TRIAL_REASON = "pictures and clips need a gift code or a purchase";
4
+ export declare const CARTOON_ESTIMATE: {
5
+ readonly pictureRestS: 1.5;
6
+ readonly poseEveryS: 1;
7
+ readonly takeShare: {
8
+ readonly low: number;
9
+ readonly high: number;
10
+ };
11
+ readonly take: {
12
+ readonly model: "seedance-2.0-mini";
13
+ readonly resolution: "480p";
14
+ readonly duration_s: 4;
15
+ };
16
+ readonly pictureModel: "seedream-5.0-flash";
17
+ };
18
+ declare const routePart: z.ZodObject<{
19
+ part: z.ZodString;
20
+ count: z.ZodNumber;
21
+ credits_each: z.ZodNumber;
22
+ quote_tool: z.ZodString;
23
+ }, z.core.$strict>;
24
+ export type FacelessRoutePart = z.infer<typeof routePart>;
25
+ declare const routeAddOn: z.ZodObject<{
26
+ part: z.ZodString;
27
+ credits_each: z.ZodNumber;
28
+ quote_tool: z.ZodString;
29
+ }, z.core.$strict>;
30
+ export type FacelessRouteAddOn = z.infer<typeof routeAddOn>;
31
+ export declare const facelessRouteLook: z.ZodObject<{
32
+ id: z.ZodString;
33
+ name: z.ZodString;
34
+ sample: z.ZodURL;
35
+ }, z.core.$strict>;
36
+ export type FacelessRouteLook = z.infer<typeof facelessRouteLook>;
37
+ export declare const facelessAlternative: z.ZodObject<{
38
+ route: z.ZodEnum<{
39
+ cartoon: "cartoon";
40
+ explainer: "explainer";
41
+ pictures: "pictures";
42
+ }>;
43
+ available: z.ZodBoolean;
44
+ reason: z.ZodOptional<z.ZodString>;
45
+ from: z.ZodNumber;
46
+ parts: z.ZodArray<z.ZodObject<{
47
+ part: z.ZodString;
48
+ count: z.ZodNumber;
49
+ credits_each: z.ZodNumber;
50
+ quote_tool: z.ZodString;
51
+ }, z.core.$strict>>;
52
+ add_ons: z.ZodArray<z.ZodObject<{
53
+ part: z.ZodString;
54
+ credits_each: z.ZodNumber;
55
+ quote_tool: z.ZodString;
56
+ }, z.core.$strict>>;
57
+ looks: z.ZodOptional<z.ZodArray<z.ZodObject<{
58
+ id: z.ZodString;
59
+ name: z.ZodString;
60
+ sample: z.ZodURL;
61
+ }, z.core.$strict>>>;
62
+ note: z.ZodString;
63
+ }, z.core.$strict>;
64
+ export type FacelessAlternative = z.infer<typeof facelessAlternative>;
65
+ export declare function cartoonRouteEstimate(seconds: number): Pick<FacelessAlternative, "from" | "parts" | "add_ons"> | undefined;
66
+ export declare function explainerRouteEstimate(seconds: number): Pick<FacelessAlternative, "from" | "parts" | "add_ons">;
67
+ export interface FacelessAlternativesInput {
68
+ seconds: number;
69
+ totalCredits: number;
70
+ cartoon: {
71
+ available: boolean;
72
+ looks: readonly FacelessRouteLook[];
73
+ } | null;
74
+ explainer: {
75
+ fit?: {
76
+ fits: boolean;
77
+ reason: string;
78
+ };
79
+ } | null;
80
+ }
81
+ export declare function facelessAlternatives(input: FacelessAlternativesInput): FacelessAlternative[] | undefined;
82
+ export {};
@@ -0,0 +1,102 @@
1
+ import { z } from "zod";
2
+ import { FACELESS_ROUTE_IDS, FACELESS_ROUTES } from "./faceless-routes.js";
3
+ import { priceGeneration } from "./generations.js";
4
+ import { OWN_CUT_MAX_SECONDS, OWN_CUT_MIN_SECONDS, OWN_FILM_MAX_SECONDS, OWN_HERO_POSES, ownAgentTermsNow } from "./own-agent-price.js";
5
+ export const FACELESS_ROUTE_ESTIMATE_TEXT = "an estimate, not a quote: each part is quoted and approved before it is made";
6
+ export const FACELESS_CARTOON_TRIAL_REASON = "pictures and clips need a gift code or a purchase";
7
+ export const CARTOON_ESTIMATE = {
8
+ pictureRestS: 1.5,
9
+ poseEveryS: 1,
10
+ takeShare: { low: 2 / 11, high: 7 / 8 },
11
+ take: { model: "seedance-2.0-mini", resolution: "480p", duration_s: 4 },
12
+ pictureModel: "seedream-5.0-flash",
13
+ };
14
+ const routePart = z.strictObject({
15
+ part: z.string().min(1),
16
+ count: z.number().int().nonnegative().describe("How many units the starting price carries."),
17
+ credits_each: z.number().int().nonnegative(),
18
+ quote_tool: z.string().min(1),
19
+ });
20
+ const routeAddOn = z.strictObject({
21
+ part: z.string().min(1),
22
+ credits_each: z.number().int().nonnegative().describe("What each extra unit adds on top of the starting price."),
23
+ quote_tool: z.string().min(1),
24
+ });
25
+ export const facelessRouteLook = z.strictObject({ id: z.string().min(1), name: z.string().min(1), sample: z.url() });
26
+ export const facelessAlternative = z.strictObject({
27
+ route: z.enum(FACELESS_ROUTE_IDS),
28
+ available: z.boolean(),
29
+ reason: z.string().min(1).optional().describe("Why the route is not available on this account."),
30
+ from: z.number().int().nonnegative().describe("What the way starts from at this length: the sum of its parts."),
31
+ parts: z.array(routePart).min(1).describe("What the starting price is made of."),
32
+ add_ons: z.array(routeAddOn).describe("What can raise the way above its start, each at its price per unit."),
33
+ looks: z.array(facelessRouteLook).optional().describe("The cartoon's drawing styles, each with a sample picture."),
34
+ note: z.string().min(1),
35
+ });
36
+ const wholeSeconds = (seconds, min, max) => {
37
+ if (!Number.isFinite(seconds) || seconds <= 0)
38
+ throw new Error(`${seconds} s is not a length`);
39
+ return Math.min(max, Math.max(min, Math.ceil(seconds - 1e-9)));
40
+ };
41
+ const row = (part, low, high, each, tool, addOn) => ({ part, low, high, each, tool, ...addOn ? { addOn } : {} });
42
+ const priced = (rows) => ({
43
+ from: rows.reduce((total, one) => total + one.low * one.each, 0),
44
+ parts: rows.filter(one => one.low > 0).map(one => ({ part: one.part, count: one.low, credits_each: one.each, quote_tool: one.tool })),
45
+ add_ons: rows.filter(one => one.high > one.low)
46
+ .map(one => ({ part: one.addOn?.part ?? one.part, credits_each: one.addOn?.each ?? one.each, quote_tool: one.tool })),
47
+ });
48
+ export function cartoonRouteEstimate(seconds) {
49
+ const s = wholeSeconds(seconds, OWN_CUT_MIN_SECONDS, OWN_CUT_MAX_SECONDS), terms = ownAgentTermsNow(), plan = CARTOON_ESTIMATE;
50
+ const picture = priceGeneration({ model: plan.pictureModel, prompt: "-", aspect_ratio: "9:16" })?.unit_credits;
51
+ const takeSecond = priceGeneration({ model: plan.take.model, prompt: "-", mode: "first_frame", aspect_ratio: "9:16", resolution: plan.take.resolution,
52
+ duration_s: plan.take.duration_s })?.unit_credits;
53
+ if (picture === undefined || takeSecond === undefined)
54
+ return undefined;
55
+ const beats = { low: Math.ceil(s / plan.pictureRestS), high: Math.ceil(s / plan.poseEveryS) };
56
+ const takes = { low: Math.ceil(beats.low * plan.takeShare.low), high: Math.ceil(beats.low * plan.takeShare.high) };
57
+ const over = Math.max(0, s - terms.cut_included_seconds);
58
+ return priced([
59
+ row("voice, seconds", s, s, terms.voice_credits_per_second, "quote_voice"),
60
+ row("character sheet", 1, 1, picture, "quote_image"),
61
+ row("pictures, one a beat", beats.low, beats.high, picture, "quote_image", { part: "an extra picture", each: picture }),
62
+ row(`clip seconds, ${plan.take.duration_s} s a clip`, takes.low * plan.take.duration_s, takes.high * plan.take.duration_s, takeSecond, "quote_video", { part: "an extra moving shot", each: takeSecond * plan.take.duration_s }),
63
+ row("the cut", 1, 1, terms.cut_credits, "quote_cut"),
64
+ ...over > 0 ? [row(`cut seconds over ${terms.cut_included_seconds}`, over, over, terms.cut_extra_second_credits, "quote_cut")] : [],
65
+ row("described sound bed", 0, 1, terms.cut_bed_credits, "quote_cut", { part: "a described sound bed", each: terms.cut_bed_credits }),
66
+ ]);
67
+ }
68
+ export function explainerRouteEstimate(seconds) {
69
+ const s = wholeSeconds(seconds, 1, OWN_FILM_MAX_SECONDS), terms = ownAgentTermsNow();
70
+ const over = Math.max(0, s - terms.included_seconds);
71
+ return priced([
72
+ row("the film", 1, 1, terms.render_credits, "quote_render"),
73
+ ...over > 0 ? [row(`film seconds over ${terms.included_seconds}`, over, over, terms.extra_second_credits, "quote_render")] : [],
74
+ row("voice, seconds", s, s, terms.voice_credits_per_second, "quote_voice"),
75
+ row("hero poses", 0, OWN_HERO_POSES, terms.pose_credits, "quote_film_hero", { part: "a new hero (a saved mascot costs nothing)", each: OWN_HERO_POSES * terms.pose_credits }),
76
+ ]);
77
+ }
78
+ const routeName = (route) => FACELESS_ROUTES.find(one => one.route === route).name;
79
+ export function facelessAlternatives(input) {
80
+ if (input.cartoon === null && input.explainer === null)
81
+ return undefined;
82
+ const pictures = { route: "pictures", available: true,
83
+ ...priced([row("the whole video: this make_faceless quote", 1, 1, input.totalCredits, "quote_faceless")]),
84
+ note: `${routeName("pictures")}: this quote. make_faceless makes the whole video in one run.` };
85
+ const cartoonParts = input.cartoon === null ? undefined : cartoonRouteEstimate(input.seconds);
86
+ const cartoon = input.cartoon === null || cartoonParts === undefined ? [] : [{ route: "cartoon",
87
+ available: input.cartoon.available, ...input.cartoon.available ? {} : { reason: FACELESS_CARTOON_TRIAL_REASON }, ...cartoonParts,
88
+ looks: [...input.cartoon.looks],
89
+ note: `${routeName("cartoon")}: your agent makes it part by part from get_film_guide format cartoon: a voice, a character sheet, a ` +
90
+ "picture a beat, short clips where the hero moves, and the cut. It starts at a picture every 1.5 s and few clips; extra " +
91
+ "pictures, moving shots and a described sound bed are add_ons, each at its price. Other picture and clip models: quote_image and quote_video. " +
92
+ `This is ${FACELESS_ROUTE_ESTIMATE_TEXT}.` }];
93
+ const fit = input.explainer?.fit;
94
+ const explainer = input.explainer === null ? [] : [{ route: "explainer", available: true,
95
+ ...explainerRouteEstimate(input.seconds),
96
+ note: `${routeName("explainer")}: your agent writes the film from get_film_guide format explainer and renders it with render_film, ` +
97
+ "about half an hour of your own model time. A saved mascot as the hero costs nothing; a new hero is an add_on. " +
98
+ "Stills inside the free daily allowance cost nothing, and music only when asked." +
99
+ (fit ? ` ${fit.fits ? "This script fits an explainer" : "This script fits an explainer poorly"}: ${fit.reason}` : "") +
100
+ ` This is ${FACELESS_ROUTE_ESTIMATE_TEXT}.` }];
101
+ return cartoon.length + explainer.length > 0 ? [pictures, ...cartoon, ...explainer] : undefined;
102
+ }
@@ -0,0 +1,15 @@
1
+ export declare const FACELESS_ROUTES: readonly [{
2
+ readonly route: "pictures";
3
+ readonly name: "Still pictures";
4
+ readonly tool: "make_faceless";
5
+ }, {
6
+ readonly route: "cartoon";
7
+ readonly name: "Cartoon";
8
+ readonly tool: "render_cut";
9
+ }, {
10
+ readonly route: "explainer";
11
+ readonly name: "Explainer";
12
+ readonly tool: "render_film";
13
+ }];
14
+ export type FacelessRoute = (typeof FACELESS_ROUTES)[number]["route"];
15
+ export declare const FACELESS_ROUTE_IDS: [FacelessRoute, ...FacelessRoute[]];
@@ -0,0 +1,6 @@
1
+ export const FACELESS_ROUTES = [
2
+ { route: "pictures", name: "Still pictures", tool: "make_faceless" },
3
+ { route: "cartoon", name: "Cartoon", tool: "render_cut" },
4
+ { route: "explainer", name: "Explainer", tool: "render_film" },
5
+ ];
6
+ export const FACELESS_ROUTE_IDS = FACELESS_ROUTES.map(r => r.route);
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from "./skills.js";
2
+ export * from "./faceless-routes.js";
3
+ export * from "./faceless-route-estimate.js";
2
4
  export * from "./service-offer.js";
3
5
  export * from "./design.js";
4
6
  export * from "./skill-theme.js";
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from "./skills.js";
2
+ export * from "./faceless-routes.js";
3
+ export * from "./faceless-route-estimate.js";
2
4
  export * from "./service-offer.js";
3
5
  export * from "./design.js";
4
6
  export * from "./skill-theme.js";
@@ -51,7 +51,9 @@ const NO_SCRIPT_MAKES = { get_ad_guide: "a multi-shot ad", get_film_guide: "a fa
51
51
  export const NO_SCRIPT_LINE_HEAD = "**No script or product of your own?**";
52
52
  export const noScriptLine = ({ tools, credits_from }) => `${NO_SCRIPT_LINE_HEAD} Make a video on this reel's topic anyway; you write the script on its mechanic. Start with ` +
53
53
  `${tools.map(tool => NO_SCRIPT_MAKES[tool] ? `${tool} (${NO_SCRIPT_MAKES[tool]})` : tool).join(", ")}` +
54
- `${credits_from === undefined ? "" : `; a video made for you costs at least ${credits_from} credits`}.`;
54
+ `${credits_from === undefined ? "" : `; a video made for you costs at least ${credits_from} credits`}.` +
55
+ `${!tools.includes("make_faceless") ? "" : tools.includes("get_film_guide") ? " With no product, show quote_faceless's ways and prices first."
56
+ : " With no product, quote_faceless first."}`;
55
57
  export function referenceAnalysisMarkdown(analysis) {
56
58
  const profile = analysis.reference_profile, data = analysis.data, source = analysis.source, lines = [];
57
59
  const duration = profile?.source.duration_s ?? data?.duration_s ?? source?.duration_s ?? null;
package/dist/skills.d.ts CHANGED
@@ -103,7 +103,7 @@ export declare const STOPS_RULE: string;
103
103
  export declare const LOOK_STEP: string;
104
104
  export declare const AD_GUIDE_INSTRUCTION: string;
105
105
  export declare const adMethodInstruction: (adGuide: boolean) => string;
106
- export declare const FACELESS_DIY_INSTRUCTION: string;
106
+ export declare const FACELESS_DIY_INSTRUCTION = "An estimate is no go-ahead; follow the pick's get_film_guide workflow, keeping its look.";
107
107
  export interface InstructionModes {
108
108
  ownAgent: boolean;
109
109
  explainer: boolean;
@@ -113,7 +113,7 @@ export interface InstructionModes {
113
113
  export declare const ROUTER_HEAD = "Pick the format first, then follow its workflow:";
114
114
  export declare const AD_ROUTE: string;
115
115
  export declare const PRESENTER_ROUTE = "- An ad, a product video or a person talking to camera: make_ugc, with the five choices below.";
116
- export declare function formatRouter({ ownAgent, explainer, adGuide, facelessDiy }: InstructionModes): string;
116
+ export declare function formatRouter(modes: InstructionModes): string;
117
117
  export declare const UNTRUSTED_RULE: string;
118
118
  export declare const NO_SCRIPT: string;
119
119
  export declare const mcpServerInstructions: ({ ownAgent, explainer, adGuide, facelessDiy }: {
package/dist/skills.js CHANGED
@@ -187,23 +187,29 @@ export const adMethodInstruction = (adGuide) => "Ads: a make_ugc video is the pr
187
187
  "the product's name, the offer, the call to action), the hook, live shots of the actor (shots) and edit_sounds on cuts. "
188
188
  : "list_moves moves fit a number, the name, the offer, the call to action; a live shot (shots) the hook; edit_sounds the cuts. ") +
189
189
  "A quote_ugc with no device names suggestions[] and adds nothing.";
190
- export const FACELESS_DIY_INSTRUCTION = "A faceless story, list, kids, own-pictures or cartoon video: offer make_faceless, or your own " +
191
- "cut from get_film_guide in that format: create_cut, check_cut, quote_cut, render_cut, each quoted first.";
190
+ const facelessHead = (guides) => `- A faceless story, list, how-to, kids${guides ? ", own-pictures" : ""} or cartoon video, or a topic with no product: `;
191
+ export const FACELESS_DIY_INSTRUCTION = "An estimate is no go-ahead; follow the pick's get_film_guide workflow, keeping its look.";
192
+ const SOLD_EXPLAINER = "make_faceless, format explainer";
193
+ const facelessQuoteStep = (ownAgent) => (ownAgent ? "show quote_faceless's ways" : "quote_faceless");
194
+ function facelessRoute({ ownAgent, explainer, facelessDiy }) {
195
+ const first = `${facelessQuoteStep(ownAgent)} first`;
196
+ if (!ownAgent)
197
+ return `${facelessHead(false)}${first}, then make_faceless${explainer ? `, or an explainer (${SOLD_EXPLAINER})` : ""}.`;
198
+ if (!facelessDiy)
199
+ return `${facelessHead(false)}${first}: make_faceless, or an explainer ` +
200
+ `${explainer ? `(${SOLD_EXPLAINER}, or yours from get_film_guide)` : "you write from get_film_guide (format explainer)"}.`;
201
+ return `${facelessHead(true)}show quote_faceless's ways and prices first; the user picks still pictures (make_faceless), cartoon or ` +
202
+ `explainer${explainer ? ` (yours or ${SOLD_EXPLAINER})` : ""}. ${FACELESS_DIY_INSTRUCTION}`;
203
+ }
192
204
  export const ROUTER_HEAD = "Pick the format first, then follow its workflow:";
193
205
  export const AD_ROUTE = "- An ad or a product video: by default a multi-shot ad from generated clips (generate_image, generate_video, " +
194
206
  "make_voice, render_edit); read get_ad_guide section workflow first. Not for a person talking to camera.";
195
207
  export const PRESENTER_ROUTE = "- An ad, a product video or a person talking to camera: make_ugc, with the five choices below.";
196
- const EXPLAINER_ROUTE = "- A how-to or N mistakes or N ways: ";
197
- export function formatRouter({ ownAgent, explainer, adGuide, facelessDiy }) {
198
- const explainerLine = explainer ? `${EXPLAINER_ROUTE}an explainer (make_faceless, format explainer)` +
199
- (ownAgent ? " or yours from get_film_guide." : ".")
200
- : ownAgent ? `${EXPLAINER_ROUTE}an explainer you write from get_film_guide (format explainer).` : "";
208
+ export function formatRouter(modes) {
201
209
  return [ROUTER_HEAD,
202
- ...adGuide ? [AD_ROUTE, "- A person talking to camera (UGC, a testimonial, a talking head), when asked for one: make_ugc, with the five " +
210
+ ...modes.adGuide ? [AD_ROUTE, "- A person talking to camera (UGC, a testimonial, a talking head), when asked for one: make_ugc, with the five " +
203
211
  "choices of get_ad_guide section workflow."] : [PRESENTER_ROUTE],
204
- facelessDiy ? `- ${FACELESS_DIY_INSTRUCTION}` : "- A faceless story, list, kids or cartoon video: make_faceless from a script or a few " +
205
- "words of topic.",
206
- ...explainerLine ? [explainerLine] : [],
212
+ facelessRoute(modes),
207
213
  "- One image or one clip: generate_image or generate_video directly.",
208
214
  "- Like a reel the user brings: analyze_reference (quote_analysis first), then its format.",
209
215
  ].join("\n");
@@ -219,7 +225,7 @@ const serverInstructions = (offer, modes) => "Clipwright makes presenter (UGC) a
219
225
  "file; it publishes nothing anywhere.\n\n" +
220
226
  "describe_tool answers a tool's or a field's full guidance, free: read it before its first use, such as quote_ugc templates.\n\n" +
221
227
  "Quote first. Call the matching quote tool before every paid tool: quote_ugc before make_ugc, quote_faceless before " +
222
- "make_faceless, and so on for every paid tool. Show the user the credits and wait for the user's go-ahead before the paid call; a go-ahead for " +
228
+ "make_faceless. Show the user the credits and wait for the user's go-ahead before the paid call; a go-ahead for " +
223
229
  "this order with unchanged terms needs no second ask. A quote_ugc price is an estimate: the charge follows the " +
224
230
  "measured video and can land above or below it, so say so before the run. Take prices from the quote or list_prices, " +
225
231
  "never from memory.\n\n" +
@@ -237,7 +243,8 @@ const serverInstructions = (offer, modes) => "Clipwright makes presenter (UGC) a
237
243
  `${HOOK_STOP} ${MUSIC_STOP} ${STOPS_RULE}\n\n${LOOK_STEP}\n\n${adMethodInstruction(false)}\n\n`) +
238
244
  "If no tool fits, or an answer or a result disappoints, offer to tell Clipwright with " +
239
245
  "send_feedback (free; pass run_id). Send it once the user agrees.\n\n" +
240
- "Start from what works. When the user asks for a video with only a product, a topic, a link or a plain script, don't go " +
246
+ `Start from what works. Only a topic, no product: ${facelessQuoteStep(modes.ownAgent)} first. When the user asks for a video with only a ` +
247
+ "product, a link or a plain script, don't go " +
241
248
  "straight to one talking-head make_ugc; lead this brief. 1. Ask the topic in a few words, then run find_trends on it over the " +
242
249
  "last 7 days (its default) and show 3 to 5 reels that took off, with views and x_median; when few are on topic or took off, " +
243
250
  "try 2 or 3 other wordings of the topic, then a longer window. The user picks one or brings their own reel. 2. Break the " +
@@ -246,7 +253,7 @@ const serverInstructions = (offer, modes) => "Clipwright makes presenter (UGC) a
246
253
  "(x to the author, the questions in the comments, who speaks in the reference), show the choice and its reason to the user, " +
247
254
  "then pick the presenter, setting and the script's voice to match and pass it as audience. Write the script on the " +
248
255
  "reference's mechanic (hook, structure, pacing), never its words: the user's own, or yours from a few words of topic when the user has " +
249
- "none; with no product, offer a faceless or cartoon video on the topic instead. " +
256
+ `none; with no product, ${facelessQuoteStep(modes.ownAgent)} on the topic instead. ` +
250
257
  "3. Compile it with plan_reference_remake, passing the analysis_id (the analysis's next), not the profile, and show the script for approval. " +
251
258
  "A user who brings a reel and asks for a video like it starts at step 2. Turn the user's notes into a revised script " +
252
259
  "and compile it again with plan_id, base_version and review_notes; a note about a picture or graphic on a line goes in " +
@@ -288,7 +295,8 @@ const serverInstructions = (offer, modes) => "Clipwright makes presenter (UGC) a
288
295
  export const MCP_SERVER_INSTRUCTIONS = mcpServerInstructions({ ownAgent: false });
289
296
  export const MAKE_FACELESS_DESCRIPTION = "Start a paid finished faceless video from a script or brief. You select 30–90 seconds; " +
290
297
  "the video ends with its narration, runs at least 25 seconds (an explainer, as long as its narration) and at most a quarter past the selection, never beyond 90. " +
291
- "The video has an opening animated clip and image scenes. Captions are on by default and can be turned off.";
298
+ "The video has an opening animated clip and image scenes. Captions are on by default and can be turned off. " +
299
+ "Its quote can also name the other faceless ways, each with an estimate.";
292
300
  export const MAKE_FACELESS_AGENT_PROTOCOL = "It answers a run_id at once; poll get_run with its poll.arguments until 'succeeded' (video_url) or 'failed'. " +
293
301
  "attempt=2,3,… starts a new run for the same input.";
294
302
  const IMAGE_MOTION_DESCRIPTION = "Optional picture zoom. A picture fills the frame, cut to its shape when the shapes differ " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipwright/core",
3
- "version": "0.80.0",
3
+ "version": "0.81.0",
4
4
  "description": "Zod schemas and the shared request/response contract of the Clipwright UGC video API",
5
5
  "repository": {
6
6
  "type": "git",