@clipwright/core 0.73.0 → 0.75.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-actors.d.ts +0 -3
- package/dist/account-actors.js +2 -9
- package/dist/ad-guide.js +4 -3
- package/dist/contract-dispositions.d.ts +6 -26
- package/dist/contract-dispositions.js +19 -74
- package/dist/contracts/v1/workflow-execution.d.ts +26 -0
- package/dist/contracts/v1/workflow-next.d.ts +13 -0
- package/dist/creator-profile.d.ts +5 -0
- package/dist/creator-profile.js +40 -14
- package/dist/design.js +6 -6
- package/dist/faceless-price.d.ts +0 -5
- package/dist/faceless-price.js +0 -5
- package/dist/faceless-public.d.ts +0 -2
- package/dist/faceless-public.js +0 -9
- package/dist/film-guide.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/mcp-ugc-descriptions.d.ts +1 -4
- package/dist/mcp-ugc-descriptions.js +2 -5
- package/dist/music.d.ts +0 -2
- package/dist/music.js +0 -4
- package/dist/own-agent-price.d.ts +0 -3
- package/dist/own-agent-price.js +0 -3
- package/dist/presenter-engine.d.ts +0 -1
- package/dist/presenter-engine.js +0 -3
- package/dist/presenter-matte.d.ts +0 -2
- package/dist/presenter-matte.js +0 -4
- package/dist/prices.d.ts +5 -5
- package/dist/prices.js +27 -28
- package/dist/public-endpoints.d.ts +10 -0
- package/dist/public-endpoints.js +5 -0
- package/dist/reference-analysis.js +2 -2
- package/dist/reference-display.js +3 -1
- package/dist/scene-bible.d.ts +0 -1
- package/dist/scene-bible.js +0 -7
- package/dist/service-offer.d.ts +11 -0
- package/dist/service-offer.js +6 -0
- package/dist/skills.d.ts +87 -0
- package/dist/skills.js +56 -24
- package/dist/templates/comment-cta.d.ts +0 -2
- package/dist/templates/comment-cta.js +0 -4
- package/dist/templates/index.d.ts +3 -3
- package/dist/templates/index.js +7 -17
- package/dist/templates/series-frame.d.ts +0 -2
- package/dist/templates/series-frame.js +0 -4
- package/dist/trend-keywords.js +1 -1
- package/dist/trend-niches.js +4 -4
- package/dist/uploads.js +1 -1
- package/dist/voices.js +1 -1
- package/package.json +1 -1
package/dist/faceless-price.js
CHANGED
|
@@ -57,16 +57,13 @@ export const FACELESS_SHOT_CREDITS_PER_SECOND = 30;
|
|
|
57
57
|
export const FACELESS_MAX_SHOTS = 10;
|
|
58
58
|
export const FACELESS_SHOT_MAX_SEC = 5;
|
|
59
59
|
export const FACELESS_MAX_CAP_USD_MICROS = 10_000_000;
|
|
60
|
-
export const facelessScenesEnabled = (env) => env.CLIPWRIGHT_FACELESS_SCENES === "1";
|
|
61
60
|
export const facelessShotSecondsCeiling = (shots) => shots * FACELESS_SHOT_MAX_SEC;
|
|
62
61
|
export function facelessPartsBase(images, outputFrames) {
|
|
63
62
|
return images * FACELESS_IMAGE_CREDITS + Math.ceil(FACELESS_CREDITS_PER_1500_FRAMES * outputFrames / 1500);
|
|
64
63
|
}
|
|
65
|
-
export const facelessExplainerEnabled = (env) => env.CLIPWRIGHT_FACELESS_EXPLAINER === "1";
|
|
66
64
|
export const FACELESS_EXPLAINER_POSE_PICTURES = 9;
|
|
67
65
|
export const EXPLAINER_BEAT_CREDITS = 65;
|
|
68
66
|
export const EXPLAINER_MAX_AUTHORED_BEATS = 8;
|
|
69
|
-
export const explainerBeatsEnabled = (env) => env.CLIPWRIGHT_EXPLAINER_BEATS === "1";
|
|
70
67
|
export const EXPLAINER_MAX_OBJECT_PICTURES = 12;
|
|
71
68
|
export const explainerObjectCeiling = (script) => Math.min(EXPLAINER_MAX_OBJECT_PICTURES, namedThings(script));
|
|
72
69
|
export const EXPLAINER_FILM_CREDITS = 500;
|
|
@@ -85,8 +82,6 @@ export const explainerFilmCredits = (outputFrames) => skillFilmCredits("skill-ex
|
|
|
85
82
|
export const EXPLAINER_TIERS = ["standard", "pro"];
|
|
86
83
|
export const EXPLAINER_TIER_TARIFFS = { standard: "skill-agent-sonnet-v2", pro: "skill-agent-opus-v1" };
|
|
87
84
|
export const explainerTierTariff = (tier) => EXPLAINER_TIER_TARIFFS[tier ?? "standard"];
|
|
88
|
-
export const skillAgentEnabled = (env) => env.CLIPWRIGHT_SKILL_AGENT === "1";
|
|
89
|
-
export const explainerFilmOffered = (env) => facelessExplainerEnabled(env) && skillAgentEnabled(env);
|
|
90
85
|
export const facelessImageCeilings = (selectedFrames) => [facelessMaxGeneratedImages(selectedFrames, FACELESS_PUBLIC_MAX_GENERATED_IMAGES), FACELESS_EXPLAINER_POSE_PICTURES, 0];
|
|
91
86
|
export function quoteFaceless(input) {
|
|
92
87
|
const outputFrames = z.number().int().min(FACELESS_MIN_OUTPUT_FRAMES).max(2250).parse(input.outputFrames);
|
|
@@ -109,8 +109,6 @@ export declare const facelessActionShot: z.ZodObject<{
|
|
|
109
109
|
}, z.core.$strict>;
|
|
110
110
|
export type FacelessActionShot = z.infer<typeof facelessActionShot>;
|
|
111
111
|
export declare const FACELESS_SHOTS_BRIEF_REFUSAL = "shots need input_mode script: they sit on the narration's words";
|
|
112
|
-
export declare const FACELESS_SHOTS_DISABLED_MESSAGE = "shots are not available on make_faceless right now; omit shots";
|
|
113
|
-
export declare const FACELESS_SCENES_DISABLED_MESSAGE = "scenes are not available on make_faceless right now; omit scenes";
|
|
114
112
|
export declare const makeFacelessInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
115
113
|
duration_seconds: z.ZodNumber;
|
|
116
114
|
style_reference: z.ZodOptional<z.ZodString>;
|
package/dist/faceless-public.js
CHANGED
|
@@ -8,7 +8,6 @@ import { MOTION_STYLE_UNUSED_WARNING, motionStyleAsked, motionStyleHasCanvas, mo
|
|
|
8
8
|
import { MAX_SCENES, sceneRefusals } from "./ugc-scenes.js";
|
|
9
9
|
import { MAX_MOVES, moveRefusals, MOVES_DESCRIPTION, ugcMove } from "./moves.js";
|
|
10
10
|
import { MAX_TEMPLATE_MEDIA, MAX_TEMPLATES, templateRefusals } from "./templates/index.js";
|
|
11
|
-
import { isPresenterMatteEnabled, needsPresenterCutout, PRESENTER_MATTE_DISABLED_MESSAGE } from "./presenter-matte.js";
|
|
12
11
|
import { assetId } from "./asset-identity.js";
|
|
13
12
|
import { FACELESS_REJECTED_FIELDS } from "./contract-dispositions.js";
|
|
14
13
|
import { FACELESS_MAX_OUTPUT_FRAMES, FACELESS_MAX_SELECTED_SECONDS, FACELESS_MAX_SHOTS, FACELESS_MIN_OUTPUT_FRAMES, FACELESS_MIN_SELECTED_SECONDS, EXPLAINER_TIER_TARIFFS, EXPLAINER_TIERS, explainerObjectCeiling, facelessQuote, quoteFaceless } from "./faceless-price.js";
|
|
@@ -160,12 +159,6 @@ function refuseTemplates(input, context) {
|
|
|
160
159
|
for (const { path, message } of templateRefusals({ script: input.script, templates: input.templates, aspect_ratio: "9:16" })) {
|
|
161
160
|
context.addIssue({ code: customIssue, path, message });
|
|
162
161
|
}
|
|
163
|
-
if (isPresenterMatteEnabled())
|
|
164
|
-
return;
|
|
165
|
-
input.templates.forEach((item, index) => {
|
|
166
|
-
if (needsPresenterCutout([item]))
|
|
167
|
-
context.addIssue({ code: customIssue, path: ["templates", index, "kind"], message: PRESENTER_MATTE_DISABLED_MESSAGE });
|
|
168
|
-
});
|
|
169
162
|
}
|
|
170
163
|
export const facelessActionShot = z.strictObject({
|
|
171
164
|
id: z.string().trim().min(1).max(64),
|
|
@@ -175,8 +168,6 @@ export const facelessActionShot = z.strictObject({
|
|
|
175
168
|
asset_id: assetId.optional(),
|
|
176
169
|
});
|
|
177
170
|
export const FACELESS_SHOTS_BRIEF_REFUSAL = "shots need input_mode script: they sit on the narration's words";
|
|
178
|
-
export const FACELESS_SHOTS_DISABLED_MESSAGE = "shots are not available on make_faceless right now; omit shots";
|
|
179
|
-
export const FACELESS_SCENES_DISABLED_MESSAGE = "scenes are not available on make_faceless right now; omit scenes";
|
|
180
171
|
const scriptShape = { ...common,
|
|
181
172
|
input_mode: z.literal("script"),
|
|
182
173
|
script: z.string().trim().min(1).max(10_000),
|
package/dist/film-guide.js
CHANGED
|
@@ -85,7 +85,7 @@ export const filmGuide = z.strictObject({
|
|
|
85
85
|
guides: guideCatalog.optional(),
|
|
86
86
|
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}$/) }))
|
|
87
87
|
.max(RECENT_LOOKS_MAX).optional()
|
|
88
|
-
.describe("The looks this account's latest faceless videos used, newest first
|
|
88
|
+
.describe("The looks this account's latest faceless videos used, newest first; a different look avoids repeating them"),
|
|
89
89
|
});
|
|
90
90
|
export const filmKitQuery = z.strictObject({
|
|
91
91
|
path: z.string().refine(isFilmKitFile, { message: "not a kit file: kit_files of get_film_guide lists them" }).optional()
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -11,10 +11,7 @@ export declare const MCP_UGC_DESCRIPTIONS: {
|
|
|
11
11
|
readonly segments: string;
|
|
12
12
|
readonly captions: "Burn word-timed captions in, over the presenter and inserts; not with segments.";
|
|
13
13
|
readonly caption_position: "top, middle, lower or bottom (80% of the height); omitted, the caption_style's own place. Requires captions=true.";
|
|
14
|
-
readonly
|
|
15
|
-
readonly name: "NOT HONORED YET: it does not reach the renderer.";
|
|
16
|
-
readonly look: "NOT HONORED YET: it does not reach the renderer.";
|
|
17
|
-
readonly actor_id: "Saved actor ID from list_actors; not with image, person or actor_gender. Without voice or voice_id the voice follows its gender.";
|
|
14
|
+
readonly actor_id: "Saved actor ID from list_actors; not with image or actor_gender. Without voice or voice_id the voice follows its gender.";
|
|
18
15
|
readonly voice_id: string;
|
|
19
16
|
readonly broll_policy: string;
|
|
20
17
|
readonly overlays: string;
|
|
@@ -58,7 +58,7 @@ const SCRIPT_TEXT = "The words the actor says; required unless segments supplies
|
|
|
58
58
|
`long-form qualification on the server. ${SCRIPT_LENGTH_DESCRIPTION} ` +
|
|
59
59
|
"Russian stress: a capital vowel inside a lowercase word (\"потОм\") reaches eleven_v4 and gemini-3.8-flash-tts as the mark U+0301; a " +
|
|
60
60
|
"typed mark is kept; a word-initial capital, all caps or a second capital is left as it is, so write \"Яндекс Еда\", not \"ЯндексЕда\". " +
|
|
61
|
-
"
|
|
61
|
+
"eleven_flash_v2_5 and eleven_turbo_v2_5 cost less but misread stress marks.";
|
|
62
62
|
export const MCP_UGC_DESCRIPTIONS = {
|
|
63
63
|
script: SCRIPT_TEXT,
|
|
64
64
|
tts_model: "Speech model; omitted, the chosen voice's (list_voices), eleven_v4 for presets, catalog voices and voice_id. eleven_v3 " +
|
|
@@ -81,10 +81,7 @@ export const MCP_UGC_DESCRIPTIONS = {
|
|
|
81
81
|
"needs broll_policy=anyone.",
|
|
82
82
|
captions: "Burn word-timed captions in, over the presenter and inserts; not with segments.",
|
|
83
83
|
caption_position: "top, middle, lower or bottom (80% of the height); omitted, the caption_style's own place. Requires captions=true.",
|
|
84
|
-
|
|
85
|
-
name: "NOT HONORED YET: it does not reach the renderer.",
|
|
86
|
-
look: "NOT HONORED YET: it does not reach the renderer.",
|
|
87
|
-
actor_id: "Saved actor ID from list_actors; not with image, person or actor_gender. Without voice or voice_id the voice follows its gender.",
|
|
84
|
+
actor_id: "Saved actor ID from list_actors; not with image or actor_gender. Without voice or voice_id the voice follows its gender.",
|
|
88
85
|
voice_id: "Raw vendor voice id (16–32 letters and digits) outside the catalog; an unknown id fails the run, not the request. Not with " +
|
|
89
86
|
"voice or tts_model=gemini-3.8-flash-tts.",
|
|
90
87
|
broll_policy: "anyone allows people and the actor, no_actor excludes the actor, no_people all people and hands. Templates with " +
|
package/dist/music.d.ts
CHANGED
|
@@ -10,6 +10,4 @@ export declare const musicRequest: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.
|
|
|
10
10
|
}, z.core.$strict>]>;
|
|
11
11
|
export type MusicRequest = z.infer<typeof musicRequest>;
|
|
12
12
|
export declare function musicLine(credits?: number): PartsLine;
|
|
13
|
-
export declare function isMusicEnabled(env?: Record<string, string | undefined>): boolean;
|
|
14
|
-
export declare const MUSIC_DISABLED_MESSAGE = "music is not available right now; omit it";
|
|
15
13
|
export declare function musicNotAddedWarning(reason: string): string;
|
package/dist/music.js
CHANGED
|
@@ -16,10 +16,6 @@ export const musicRequest = z.union([
|
|
|
16
16
|
export function musicLine(credits = MUSIC_BED_CREDITS) {
|
|
17
17
|
return { label: "music", unit: "track", quantity: 1, unit_credits: credits, credits };
|
|
18
18
|
}
|
|
19
|
-
export function isMusicEnabled(env = typeof process === "undefined" ? {} : process.env) {
|
|
20
|
-
return env.CLIPWRIGHT_MUSIC === "1";
|
|
21
|
-
}
|
|
22
|
-
export const MUSIC_DISABLED_MESSAGE = "music is not available right now; omit it";
|
|
23
19
|
export function musicNotAddedWarning(reason) {
|
|
24
20
|
return `music was not added: ${reason}; it was not charged`;
|
|
25
21
|
}
|
|
@@ -73,9 +73,6 @@ export type OwnAgentTerms = z.infer<typeof ownAgentTerms>;
|
|
|
73
73
|
export declare const ownAgentTermsNow: (options?: {
|
|
74
74
|
sprites?: boolean;
|
|
75
75
|
}) => OwnAgentTerms;
|
|
76
|
-
export declare const isOwnAgentEnabled: (env: Readonly<Record<string, string | undefined>>) => boolean;
|
|
77
|
-
export declare const isFilmHeadEnabled: (env: Readonly<Record<string, string | undefined>>) => boolean;
|
|
78
|
-
export declare const isHeroSpritesEnabled: (env: Readonly<Record<string, string | undefined>>) => boolean;
|
|
79
76
|
export declare function ownFilmRenderCredits(s: number, terms?: OwnAgentTerms, music?: boolean): number;
|
|
80
77
|
export declare const ownVoiceCredits: (s: number, terms?: OwnAgentTerms) => number;
|
|
81
78
|
export declare function ownStillsCredits(n: number, terms?: OwnAgentTerms, free?: number): number;
|
package/dist/own-agent-price.js
CHANGED
|
@@ -75,9 +75,6 @@ export const ownAgentTermsNow = (options = {}) => ({ tariff: OWN_AGENT_TARIFF, s
|
|
|
75
75
|
picture_check_credits: OWN_TAKE_CHECK_PICTURE_CREDITS, picture_check_long_credits: OWN_TAKE_CHECK_PICTURE_LONG_CREDITS, free_stills: OWN_FREE_STILLS, free_stills_window_hours: OWN_FREE_STILLS_WINDOW_HOURS, cut_credits: OWN_CUT_CREDITS, cut_included_seconds: OWN_CUT_INCLUDED_SECONDS,
|
|
76
76
|
cut_extra_second_credits: OWN_CUT_EXTRA_SECOND_CREDITS, cut_bed_credits: OWN_CUT_BED_CREDITS,
|
|
77
77
|
cut_take_sound_credits_per_second: OWN_CUT_TAKE_SOUND_CREDITS_PER_SECOND, cut_music_credits: MUSIC_BED_CREDITS });
|
|
78
|
-
export const isOwnAgentEnabled = (env) => env.CLIPWRIGHT_OWN_AGENT === "1";
|
|
79
|
-
export const isFilmHeadEnabled = (env) => env.CLIPWRIGHT_FILM_HEAD === "1";
|
|
80
|
-
export const isHeroSpritesEnabled = (env) => env.CLIPWRIGHT_HERO_SPRITES === "1";
|
|
81
78
|
const seconds = (s, max, what) => {
|
|
82
79
|
if (!Number.isFinite(s) || s <= 0 || s > max)
|
|
83
80
|
throw new Error(`${what} of ${s} s is outside 0–${max} s`);
|
|
@@ -3,7 +3,6 @@ export declare const PRESENTER_ENGINE_OF: Readonly<Record<PresenterEngineChoice,
|
|
|
3
3
|
export declare const AVATAR6_LEAD_SEC = 0.6;
|
|
4
4
|
export declare const TURBO_UNIT_MAX_SEC = 42;
|
|
5
5
|
export declare const TURBO_UNIT_MAX_ESTIMATE_SEC = 36;
|
|
6
|
-
export declare function isHeygenAvatar6Enabled(env?: Record<string, string | undefined>): boolean;
|
|
7
6
|
export interface PresenterEngineFacts {
|
|
8
7
|
source: {
|
|
9
8
|
width: number;
|
package/dist/presenter-engine.js
CHANGED
|
@@ -5,9 +5,6 @@ export const PRESENTER_ENGINE_OF = Object.freeze({
|
|
|
5
5
|
export const AVATAR6_LEAD_SEC = 0.6;
|
|
6
6
|
export const TURBO_UNIT_MAX_SEC = 42;
|
|
7
7
|
export const TURBO_UNIT_MAX_ESTIMATE_SEC = 36;
|
|
8
|
-
export function isHeygenAvatar6Enabled(env = typeof process === "undefined" ? {} : process.env) {
|
|
9
|
-
return env.CLIPWRIGHT_HEYGEN_AVATAR6 === "1";
|
|
10
|
-
}
|
|
11
8
|
const AVATAR6_FORMATS = ["9:16"];
|
|
12
9
|
const AS_IV = "so it renders on avatar_iv (HeyGen Avatar IV) at its price";
|
|
13
10
|
export function resolvePresenterEngine(input, aspectRatio, enabled, facts) {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { PartsLine } from "./parts-pricing.js";
|
|
2
|
-
export declare function isPresenterMatteEnabled(env?: Record<string, string | undefined>): boolean;
|
|
3
2
|
declare const CUTOUT_LABELS: {
|
|
4
3
|
readonly cover_story: "cover story, presenter in front";
|
|
5
4
|
readonly backdrop: "backdrop, presenter in front";
|
|
6
5
|
};
|
|
7
6
|
export declare const CUTOUT_TEMPLATE_KINDS: readonly (keyof typeof CUTOUT_LABELS)[];
|
|
8
|
-
export declare const PRESENTER_MATTE_DISABLED_MESSAGE = "cover_story and backdrop are not available right now; use another template kind";
|
|
9
7
|
export declare function needsPresenterCutout(templates: unknown): boolean;
|
|
10
8
|
export declare function cutoutTemplateLines(templates: unknown): PartsLine[];
|
|
11
9
|
export declare function pictureCutoutMissingWarning(id: string, photo?: boolean): string;
|
package/dist/presenter-matte.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
export function isPresenterMatteEnabled(env = typeof process === "undefined" ? {} : process.env) {
|
|
2
|
-
return env.CLIPWRIGHT_PRESENTER_MATTE === "1";
|
|
3
|
-
}
|
|
4
1
|
const CUTOUT_LABELS = { cover_story: "cover story, presenter in front", backdrop: "backdrop, presenter in front" };
|
|
5
2
|
export const CUTOUT_TEMPLATE_KINDS = Object.keys(CUTOUT_LABELS);
|
|
6
|
-
export const PRESENTER_MATTE_DISABLED_MESSAGE = "cover_story and backdrop are not available right now; use another template kind";
|
|
7
3
|
const cutoutKindOf = (item) => (typeof item === "object" && item !== null
|
|
8
4
|
? CUTOUT_TEMPLATE_KINDS.find(kind => kind === item.kind) : undefined);
|
|
9
5
|
export function needsPresenterCutout(templates) {
|
package/dist/prices.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import type { ServiceOffer } from "./service-offer.js";
|
|
2
3
|
export declare const PRICES_PATH = "/v1/public/prices";
|
|
3
4
|
export declare const PRICE_UNITS: readonly ["call", "second", "face_second", "image", "clip", "clip_second", "still", "scene", "track"];
|
|
4
5
|
export type PriceUnit = (typeof PRICE_UNITS)[number];
|
|
@@ -97,9 +98,8 @@ export interface DiyModesSold {
|
|
|
97
98
|
readonly faceless: boolean;
|
|
98
99
|
}
|
|
99
100
|
export declare const NO_DIY_MODES: DiyModesSold;
|
|
100
|
-
export declare const diyPriceEntries: (diy: DiyModesSold
|
|
101
|
-
export declare function priceListFor(
|
|
102
|
-
export declare const PRICE_LIST: readonly PriceEntry[];
|
|
101
|
+
export declare const diyPriceEntries: (diy: DiyModesSold) => PriceEntry[];
|
|
102
|
+
export declare function priceListFor(offer: ServiceOffer, diy?: DiyModesSold): readonly PriceEntry[];
|
|
103
103
|
export declare const priceText: (entry: PriceEntry) => string;
|
|
104
|
-
export declare function priceLine(tool: string, list
|
|
105
|
-
export declare const withPriceLine: (tool: string, description: string, list
|
|
104
|
+
export declare function priceLine(tool: string, list: readonly PriceEntry[]): string | null;
|
|
105
|
+
export declare const withPriceLine: (tool: string, description: string, list: readonly PriceEntry[]) => string;
|
package/dist/prices.js
CHANGED
|
@@ -3,17 +3,16 @@ import { ACTOR_PORTRAIT_ASPECT, ACTOR_UNIT_CREDITS, ACTOR_VIEW_PORTRAIT_CREDITS
|
|
|
3
3
|
import { CANDIDATE_CHARGE_TEXT } from "./edit-candidate.js";
|
|
4
4
|
import { EDIT_RENDER_PRICE, EDIT_UNIT_PRICES, EDIT_ZERO_UNIT_PRICE } from "./edit-billing.js";
|
|
5
5
|
import { REVISION_CHARGE_TEXT } from "./edit-revision.js";
|
|
6
|
-
import { FACELESS_CREDITS_PER_1500_FRAMES, FACELESS_IMAGE_CREDITS, FACELESS_MAX_SELECTED_SECONDS, FACELESS_MIN_BASE_CREDITS, FACELESS_MIN_SELECTED_SECONDS, FACELESS_OPENER_CREDITS, FACELESS_SHOT_CREDITS_PER_SECOND,
|
|
6
|
+
import { FACELESS_CREDITS_PER_1500_FRAMES, FACELESS_IMAGE_CREDITS, FACELESS_MAX_SELECTED_SECONDS, FACELESS_MIN_BASE_CREDITS, FACELESS_MIN_SELECTED_SECONDS, FACELESS_OPENER_CREDITS, FACELESS_SHOT_CREDITS_PER_SECOND, quoteFaceless, EXPLAINER_FILM_INCLUDED_SECONDS, EXPLAINER_TIER_TARIFFS, EXPLAINER_TIERS, FACELESS_EXPLAINER_POSE_PICTURES, SKILL_FILM_TARIFFS, } from "./faceless-price.js";
|
|
7
7
|
import { PRESENTER_ENGINES, SHOT_ENGINES } from "./face-billing.js";
|
|
8
8
|
import { listGenerationModels } from "./generations.js";
|
|
9
9
|
import { PARTS_DURATION_TARIFF, PARTS_FACE_TARIFF, PRESENTER_CREDITS_PER_SECOND, PRESENTER_ENGINE_LABELS, SCENE_CREDITS, SHOT_CREDITS_PER_SECOND, SHOT_ENGINE_LABELS } from "./parts-pricing.js";
|
|
10
|
-
import { isHeygenAvatar6Enabled } from "./presenter-engine.js";
|
|
11
10
|
import { UPSCALE_CAPABILITIES, UPSCALE_QUOTE_PATH, UPSCALE_RUN_PATH } from "./upscale.js";
|
|
12
11
|
import { REFERENCE_ANALYSIS_CREDITS, REFERENCE_DATA_CREDITS } from "./reference-analysis.js";
|
|
13
12
|
import { CREATOR_PROFILE_CREDITS, CREATOR_PROFILE_VIDEOS } from "./creator-profile.js";
|
|
14
13
|
import { TREND_FREE_PAGES_PER_DAY, TREND_FREE_SEARCHES_PER_MONTH, TREND_PAGE_PAID_CREDITS, TREND_PAGE_WINDOW_SECONDS, TREND_SEARCH_CREDITS, TREND_SEARCH_MAX_PAGES, TREND_SEARCH_REELS, } from "./trend-search.js";
|
|
15
|
-
import { FILM_MUSIC_BED_CREDITS,
|
|
16
|
-
import { HERO_RUNS_PER_HOUR,
|
|
14
|
+
import { FILM_MUSIC_BED_CREDITS, MUSIC_BED_CREDITS } from "./music.js";
|
|
15
|
+
import { HERO_RUNS_PER_HOUR, OWN_FILM_EXTRA_SECOND_CREDITS, OWN_FILM_INCLUDED_SECONDS, OWN_FILM_RENDER_CREDITS, OWN_HERO_POSE_CREDITS, OWN_HERO_POSES, OWN_HERO_FREE_POSES_PER_DAY, OWN_HERO_FREE_POSES_WINDOW_HOURS, OWN_FREE_STILLS, OWN_FREE_STILLS_WINDOW_HOURS, OWN_STILL_CREDITS, OWN_STILLS_MAX_PER_CALL, OWN_VOICE_CREDITS_PER_SECOND, OWN_EDIT_CREDITS, OWN_EDIT_MAX_SECONDS, OWN_TAKE_CHECK_CREDITS, OWN_CUT_BED_CREDITS, OWN_CUT_CREDITS, OWN_CUT_EXTRA_SECOND_CREDITS, OWN_CUT_INCLUDED_SECONDS, OWN_CUT_MAX_NEW_SOUNDS, OWN_CUT_MAX_SECONDS, OWN_CUT_MIN_SECONDS, OWN_CUT_TAKE_SOUND_CREDITS_PER_SECOND, OWN_TAKE_CHECK_PICTURE_CREDITS, OWN_TAKE_CHECK_PICTURE_LONG_CREDITS, OWN_TAKE_FRAMES_MAX, TAKE_PICTURE_SHORT_TIER_SECONDS, OWN_HERO_HEAD_CREDITS, OWN_HERO_MAX_SPRITES, OWN_HERO_SPRITE_CREDITS, OWN_HERO_TALKING_POSES, ownAgentTermsNow, ownHeroCredits } from "./own-agent-price.js";
|
|
17
16
|
import { CUT_PREVIEW_MAX_STILLS } from "./film-cut.js";
|
|
18
17
|
export const PRICES_PATH = "/v1/public/prices";
|
|
19
18
|
export const PRICE_UNITS = ["call", "second", "face_second", "image", "clip", "clip_second", "still", "scene", "track"];
|
|
@@ -133,13 +132,13 @@ function upscaleEntries() {
|
|
|
133
132
|
];
|
|
134
133
|
}
|
|
135
134
|
export const NO_DIY_MODES = Object.freeze({ ad: false, faceless: false });
|
|
136
|
-
const adDiyPrices = (
|
|
135
|
+
const adDiyPrices = () => [
|
|
137
136
|
paid({ tool: "render_edit", route: "POST /v1/film-edits", quote_tool: "quote_edit",
|
|
138
137
|
lines: [{ label: `the cut, up to ${OWN_EDIT_MAX_SECONDS} s`, unit: "call", credits: OWN_EDIT_CREDITS },
|
|
139
|
-
|
|
138
|
+
{ label: "music made for the cut", unit: "track", credits: MUSIC_BED_CREDITS }],
|
|
140
139
|
notes: `One cut of your own clips with your voice and captions, up to ${OWN_EDIT_MAX_SECONDS} s, vertical 720p. Charged only for a ` +
|
|
141
140
|
"delivered cut; an edit that fails costs nothing." +
|
|
142
|
-
|
|
141
|
+
" A library music bed is free; music made for the cut is charged only when the delivered cut carries it." }),
|
|
143
142
|
paid({ tool: "check_take", route: "POST /v1/take-checks", quote_tool: "quote_take_check", unit: "call", credits: OWN_TAKE_CHECK_CREDITS,
|
|
144
143
|
notes: "One of your clips judged frame by frame against the prompt it was made with: each defect with its seconds and how to repair " +
|
|
145
144
|
"it, and the clean windows. Charged only for a delivered verdict; a check that delivers no verdict costs nothing." }),
|
|
@@ -171,12 +170,14 @@ const facelessDiyPrices = () => [
|
|
|
171
170
|
notes: `Up to ${CUT_PREVIEW_MAX_STILLS} frames of your checked cut sheet as the video draws them, on the words you name. The first ` +
|
|
172
171
|
`${OWN_FREE_STILLS} preview stills of an account in any ${OWN_FREE_STILLS_WINDOW_HOURS} h are free; a preview that fails costs nothing.` }),
|
|
173
172
|
];
|
|
174
|
-
export const diyPriceEntries = (diy
|
|
175
|
-
...(diy.ad ? adDiyPrices(
|
|
173
|
+
export const diyPriceEntries = (diy) => [
|
|
174
|
+
...(diy.ad ? adDiyPrices() : []),
|
|
176
175
|
...(diy.faceless ? facelessDiyPrices() : []),
|
|
177
176
|
...(diy.ad || diy.faceless ? [TAKE_FRAMES_PRICE] : []),
|
|
178
177
|
];
|
|
179
|
-
function buildPriceList(
|
|
178
|
+
function buildPriceList(offer, diy) {
|
|
179
|
+
const liveShots = offer.longForm, scenes = offer.longForm;
|
|
180
|
+
const { explainerFilm: explainer, ownAgent, heygenAvatar6: avatar6, heroSprites, filmHead } = offer;
|
|
180
181
|
const unit = EDIT_UNIT_PRICES;
|
|
181
182
|
const parts = PARTS_FACE_TARIFF;
|
|
182
183
|
const shotRates = parts.shotCreditsPerSecond ?? SHOT_CREDITS_PER_SECOND;
|
|
@@ -189,14 +190,14 @@ function buildPriceList(liveShots, scenes, facelessShots = false, facelessScenes
|
|
|
189
190
|
{ label: "production (voice and render)", unit: "second", credits: parts.productionCreditsPerSecond },
|
|
190
191
|
{ label: "live avatar on a call", unit: "still", credits: parts.liveAvatarStillCredits },
|
|
191
192
|
...(scenes ? [{ label: "scene made for the video", unit: "scene", credits: SCENE_CREDITS }] : []),
|
|
192
|
-
|
|
193
|
+
{ label: "music under the voice", unit: "track", credits: MUSIC_BED_CREDITS }],
|
|
193
194
|
notes: "Short and long videos alike. Presenter seconds are the seconds a presenter take fills, covered by an insert, overlay, " +
|
|
194
195
|
"window or template or not, counted once over the video and rounded up; the engine that renders each take sets its rate " +
|
|
195
196
|
(engine === "heygen" ? "(today every take renders on HeyGen). " : "(no take renders on OmniHuman today). ") +
|
|
196
197
|
"Production seconds are every second of the finished video. A live avatar is charged per call still in the video." +
|
|
197
198
|
(liveShots ? " A live shot's seconds take its own line in place of the presenter's; talking shots stay on the presenter line." : "") +
|
|
198
199
|
(scenes ? " A scene made for the video is charged only when it is drawn in the delivered video." : "") +
|
|
199
|
-
|
|
200
|
+
" Music is added only when you ask for it and charged only when the delivered video carries it." })),
|
|
200
201
|
...(avatar6 ? [paid({ tool: "make_ugc", route: "POST /v1/skills/make_ugc/run", variant: "HeyGen Avatar 6 Turbo presenter",
|
|
201
202
|
quote_tool: "quote_ugc", minimum_credits: PARTS_DURATION_TARIFF.minimumCredits,
|
|
202
203
|
lines: [{ label: PRESENTER_ENGINE_LABELS.heygen_avatar6_turbo, unit: "face_second", credits: PRESENTER_CREDITS_PER_SECOND.heygen_avatar6_turbo },
|
|
@@ -229,15 +230,15 @@ function buildPriceList(liveShots, scenes, facelessShots = false, facelessScenes
|
|
|
229
230
|
lines: [{ label: "generated picture", unit: "image", credits: FACELESS_IMAGE_CREDITS },
|
|
230
231
|
{ label: "opening clip", unit: "clip", credits: FACELESS_OPENER_CREDITS },
|
|
231
232
|
{ label: "production (story, voice and render)", unit: "second", credits: FACELESS_CREDITS_PER_1500_FRAMES / 60 },
|
|
232
|
-
|
|
233
|
-
...(
|
|
234
|
-
|
|
233
|
+
{ label: "action shot", unit: "clip_second", credits: FACELESS_SHOT_CREDITS_PER_SECOND },
|
|
234
|
+
...(scenes ? [{ label: "scene made for the video", unit: "scene", credits: SCENE_CREDITS }] : []),
|
|
235
|
+
{ label: "music under the voice", unit: "track", credits: MUSIC_BED_CREDITS }],
|
|
235
236
|
minimum_credits: FACELESS_MIN_BASE_CREDITS,
|
|
236
237
|
notes: `Pictures we generated for the delivered video and its seconds, never above the selected length. The quote is the most a ` +
|
|
237
238
|
`selection is charged, every picture it may generate: ${facelessAt(FACELESS_MIN_SELECTED_SECONDS)} for ` +
|
|
238
239
|
`${FACELESS_MIN_SELECTED_SECONDS} s, ${facelessAt(FACELESS_MAX_SELECTED_SECONDS)} for ${FACELESS_MAX_SELECTED_SECONDS} s. ` +
|
|
239
240
|
"Captions do not change the price." +
|
|
240
|
-
|
|
241
|
+
" Music is added only when you ask for it and charged only when the delivered video carries it." }),
|
|
241
242
|
...(explainer ? EXPLAINER_TIERS.map(tier => paid({ tool: "make_faceless", route: "POST /v1/skills/make_faceless/run", quote_tool: "quote_faceless",
|
|
242
243
|
variant: `explainer ${tier}`,
|
|
243
244
|
lines: [{ label: `film up to ${EXPLAINER_FILM_INCLUDED_SECONDS} s`, unit: "call", credits: SKILL_FILM_TARIFFS[EXPLAINER_TIER_TARIFFS[tier]].filmCredits },
|
|
@@ -257,9 +258,9 @@ function buildPriceList(liveShots, scenes, facelessShots = false, facelessScenes
|
|
|
257
258
|
paid({ tool: "render_film", route: "POST /v1/film-renders", quote_tool: "quote_render",
|
|
258
259
|
lines: [{ label: `film up to ${OWN_FILM_INCLUDED_SECONDS} s`, unit: "call", credits: OWN_FILM_RENDER_CREDITS },
|
|
259
260
|
{ label: `each second over ${OWN_FILM_INCLUDED_SECONDS} s`, unit: "second", credits: OWN_FILM_EXTRA_SECOND_CREDITS },
|
|
260
|
-
|
|
261
|
+
{ label: "music made for the film", unit: "track", credits: FILM_MUSIC_BED_CREDITS }],
|
|
261
262
|
notes: "Charged only for a delivered film, by its length; a render that fails costs nothing." +
|
|
262
|
-
|
|
263
|
+
" A library music bed is free; music made for the film is charged only when the delivered film carries it." }),
|
|
263
264
|
paid({ tool: "make_film_hero", route: "POST /v1/film-heroes", quote_tool: "quote_film_hero",
|
|
264
265
|
lines: [{ label: null, unit: "image", credits: OWN_HERO_POSE_CREDITS },
|
|
265
266
|
...(heroSprites ? [{ label: "talking sprite", unit: "image", credits: OWN_HERO_SPRITE_CREDITS }] : [])],
|
|
@@ -278,7 +279,7 @@ function buildPriceList(liveShots, scenes, facelessShots = false, facelessScenes
|
|
|
278
279
|
notes: "head true with your photo or your actor's picture: the head drawn as a cartoon that talks, blinks and changes its look, saved " +
|
|
279
280
|
"as a mascot a film's actor wears. One price per head, charged only when the head is saved with all its pictures; a head that " +
|
|
280
281
|
"fails costs nothing." })] : []),
|
|
281
|
-
...diyPriceEntries(diy
|
|
282
|
+
...diyPriceEntries(diy),
|
|
282
283
|
] : []),
|
|
283
284
|
paid({ tool: "revise_run", route: "POST /v1/runs/{id}/revisions", quote_tool: "quote_revision",
|
|
284
285
|
formula: `each shot generated anew: picture ${unit.picture}, clip ${unit.clip}, clip with a new picture ${unit.clip_with_new_picture}; ` +
|
|
@@ -305,21 +306,19 @@ function buildPriceList(liveShots, scenes, facelessShots = false, facelessScenes
|
|
|
305
306
|
lines: [{ label: null, unit: "call", credits: 0 }], formula: null, minimum_credits: null, quote_tool: null, notes: null })),
|
|
306
307
|
];
|
|
307
308
|
}
|
|
308
|
-
export function priceListFor(
|
|
309
|
-
|
|
310
|
-
const liveShots = env.CLIPWRIGHT_LIVE_SHOTS === "1" && longForm, scenes = env.CLIPWRIGHT_SCENES === "1" && longForm;
|
|
311
|
-
return Object.freeze(pricesResponse.parse({ prices: buildPriceList(liveShots, scenes, env.CLIPWRIGHT_FACELESS_SHOTS === "1", scenes && facelessScenesEnabled(env), isMusicEnabled(env), explainerFilmOffered(env), isOwnAgentEnabled(env), isHeygenAvatar6Enabled(env), diy, isHeroSpritesEnabled(env), isFilmHeadEnabled(env)) }).prices);
|
|
309
|
+
export function priceListFor(offer, diy = NO_DIY_MODES) {
|
|
310
|
+
return Object.freeze(pricesResponse.parse({ prices: buildPriceList(offer, diy) }).prices);
|
|
312
311
|
}
|
|
313
|
-
export const PRICE_LIST = priceListFor(typeof process === "undefined" ? {} : process.env);
|
|
314
312
|
const UNIT_TEXT = {
|
|
315
313
|
call: "call", second: "second of video", face_second: "second the presenter is in the video, covered or not", image: "image", clip: "clip",
|
|
316
314
|
clip_second: "second of clip", still: "call still in the video", scene: "scene drawn in the video", track: "music track in the video",
|
|
317
315
|
};
|
|
318
316
|
const LISTED_PRICES = 4;
|
|
317
|
+
const RANGE_BASIS = { create_actor: "by quality and image kind" };
|
|
319
318
|
export const priceText = (entry) => entry.lines.length === 0 ? entry.formula ?? "" :
|
|
320
319
|
entry.lines.map(lineText).join(" plus ") + (entry.minimum_credits === null ? "" : `, at least ${entry.minimum_credits}`);
|
|
321
320
|
const lineText = (line) => `${line.label === null ? "" : `${line.label} `}${line.credits} credits per ${UNIT_TEXT[line.unit]}`;
|
|
322
|
-
export function priceLine(tool, list
|
|
321
|
+
export function priceLine(tool, list) {
|
|
323
322
|
const entries = list.filter((entry) => entry.tool === tool && isPaidEntry(entry));
|
|
324
323
|
const [first] = entries;
|
|
325
324
|
if (first === undefined)
|
|
@@ -330,16 +329,16 @@ export function priceLine(tool, list = PRICE_LIST) {
|
|
|
330
329
|
const rest = (entry) => JSON.stringify([entry.lines.slice(1), entry.minimum_credits]);
|
|
331
330
|
const shared = entries.length > 1 && entries.every((entry) => entry.formula === null && entry.lines.length > 1 && rest(entry) === rest(first));
|
|
332
331
|
const text = unit !== undefined && single.length === entries.length && single.length > LISTED_PRICES
|
|
333
|
-
? `${Math.min(...single)} to ${Math.max(...single)} credits per ${UNIT_TEXT[unit]}, by model and size`
|
|
332
|
+
? `${Math.min(...single)} to ${Math.max(...single)} credits per ${UNIT_TEXT[unit]}, ${RANGE_BASIS[tool] ?? "by model and size"}`
|
|
334
333
|
: shared
|
|
335
334
|
? `${entries.map((entry) => `${entry.variant === null ? "" : `${entry.variant}: `}${lineText(entry.lines[0])}`).join("; ")}; each plus ` +
|
|
336
335
|
`${first.lines.slice(1).map(lineText).join(" plus ")}${first.minimum_credits === null ? "" : `, at least ${first.minimum_credits}`}`
|
|
337
336
|
: entries.map((entry) => `${entry.variant === null ? "" : `${entry.variant}: `}${priceText(entry)}`).join("; ");
|
|
338
337
|
return `Price: ${text}. Quote first with ${first.quote_tool}.`;
|
|
339
338
|
}
|
|
340
|
-
export const withPriceLine = (tool, description, list
|
|
339
|
+
export const withPriceLine = (tool, description, list) => {
|
|
341
340
|
const line = priceLine(tool, list);
|
|
342
341
|
if (line === null)
|
|
343
|
-
throw new Error(`${tool} has no price in
|
|
342
|
+
throw new Error(`${tool} has no price in the list`);
|
|
344
343
|
return `${description} ${line}`;
|
|
345
344
|
};
|
|
@@ -2,6 +2,16 @@ export declare const PUBLIC_API_BASE_URL = "https://api.clipwright.io";
|
|
|
2
2
|
export declare const PUBLIC_APP_BASE_URL = "https://app.clipwright.io";
|
|
3
3
|
export declare const PUBLIC_SITE_BASE_URL = "https://clipwright.io";
|
|
4
4
|
export declare const PUBLIC_MCP_URL = "https://mcp.clipwright.io/mcp";
|
|
5
|
+
export declare const MCP_SERVER_TITLE = "Clipwright.io";
|
|
6
|
+
export declare const MCP_SERVER_ICONS: readonly [{
|
|
7
|
+
readonly src: "https://clipwright.io/brand/clipwright-512.png";
|
|
8
|
+
readonly mimeType: "image/png";
|
|
9
|
+
readonly sizes: readonly ["512x512"];
|
|
10
|
+
}, {
|
|
11
|
+
readonly src: "https://clipwright.io/brand/clipwright-400.png";
|
|
12
|
+
readonly mimeType: "image/png";
|
|
13
|
+
readonly sizes: readonly ["400x400"];
|
|
14
|
+
}];
|
|
5
15
|
export declare const CLI_PACKAGE = "@clipwright/cli";
|
|
6
16
|
export declare const CLI_BIN = "clipwright";
|
|
7
17
|
export declare const MCP_PACKAGE = "@clipwright/mcp-server";
|
package/dist/public-endpoints.js
CHANGED
|
@@ -2,6 +2,11 @@ export const PUBLIC_API_BASE_URL = "https://api.clipwright.io";
|
|
|
2
2
|
export const PUBLIC_APP_BASE_URL = "https://app.clipwright.io";
|
|
3
3
|
export const PUBLIC_SITE_BASE_URL = "https://clipwright.io";
|
|
4
4
|
export const PUBLIC_MCP_URL = "https://mcp.clipwright.io/mcp";
|
|
5
|
+
export const MCP_SERVER_TITLE = "Clipwright.io";
|
|
6
|
+
export const MCP_SERVER_ICONS = [
|
|
7
|
+
{ src: `${PUBLIC_SITE_BASE_URL}/brand/clipwright-512.png`, mimeType: "image/png", sizes: ["512x512"] },
|
|
8
|
+
{ src: `${PUBLIC_SITE_BASE_URL}/brand/clipwright-400.png`, mimeType: "image/png", sizes: ["400x400"] },
|
|
9
|
+
];
|
|
5
10
|
export const CLI_PACKAGE = "@clipwright/cli";
|
|
6
11
|
export const CLI_BIN = "clipwright";
|
|
7
12
|
export const MCP_PACKAGE = "@clipwright/mcp-server";
|
|
@@ -256,7 +256,7 @@ export const referenceAnalysisRead = referenceAnalysis.extend({
|
|
|
256
256
|
export function referenceAnalysisWarnings(profile) {
|
|
257
257
|
return [...profile.unmapped.map((entry) => `beat ${entry.beat_index}: ${entry.what} is not drawn by our templates; substitute: ${entry.suggested_substitute}`), ...profile.analysis.warnings ?? []];
|
|
258
258
|
}
|
|
259
|
-
export const ANALYZE_REFERENCE_DESCRIPTION = "
|
|
259
|
+
export const ANALYZE_REFERENCE_DESCRIPTION = "Break down any reel or ad into a reference_profile, for study or a remake: beats (role, timing as shares of the clip, presenter speaking, listening or off " +
|
|
260
260
|
"screen), graphics in our template vocabulary, captions, pacing, palette and music, with the words: timed transcript and " +
|
|
261
261
|
"transcript_language, segments by speaker, hook (first 3 s to the end of that sentence), each beat's spoken_summary and each " +
|
|
262
262
|
"graphic's label_hint. speakers names who talks, on or off screen, with their caption look; each beat names its speaker, gaze " +
|
|
@@ -296,5 +296,5 @@ export const GET_REFERENCE_ANALYSIS_DESCRIPTION = "Read an analysis started by a
|
|
|
296
296
|
export const QUOTE_ANALYSIS_DESCRIPTION = "Price analyze_reference for an asset_id or a source_url and a mode before starting it: credits_estimate is what a start " +
|
|
297
297
|
`holds and charges once it succeeds (${REFERENCE_ANALYSIS_CREDITS} full, ${REFERENCE_DATA_CREDITS} data), 0 when the ` +
|
|
298
298
|
"asset or the reel already has an analysis in that mode that a start would answer (replays_analysis_id), and 0 when a start " +
|
|
299
|
-
"would redo an analysis made before frames and speakers were added. repeat_note says
|
|
299
|
+
"would redo an analysis made before frames and speakers were added. repeat_note says, in a sentence for the user, what asking again costs. A YouTube or " +
|
|
300
300
|
"unknown link is refused here too. Free; starts nothing.";
|
|
@@ -19,6 +19,7 @@ const number = (value) => (value === null || value === undefined ? "—" : value
|
|
|
19
19
|
const seconds = (value) => `${Math.round(value * 100) / 100}`;
|
|
20
20
|
const BRING_NAMES = { screen_recording: "a screen recording", screenshot: "screenshots", product_photo: "product photos",
|
|
21
21
|
live_clip: "live clips" };
|
|
22
|
+
const MUSIC_ABSENT = /^(none|n\/a|nothing|silen\w*|absent|(no|without) (background |any )?(music|track|bed)\b)/i;
|
|
22
23
|
function cardLines(profile, lines) {
|
|
23
24
|
if (profile.shots?.length) {
|
|
24
25
|
const silent = profile.shots.filter(shot => shot.silent).map(shot => `${seconds(shot.start_s)}–${seconds(shot.end_s)} s`);
|
|
@@ -31,7 +32,8 @@ function cardLines(profile, lines) {
|
|
|
31
32
|
if (tempo) {
|
|
32
33
|
const beat = tempo.bpm === null ? "no clear beat" : `${tempo.bpm} BPM, ${tempo.edit_on_beat ? "the edit follows the beat" : "the edit does not follow the beat"}` +
|
|
33
34
|
`${tempo.cuts_on_beat === null ? "" : ` (${Math.round(tempo.cuts_on_beat * 100)}% of cuts on a beat, ${Math.round((tempo.cuts_on_beat_by_chance ?? 0) * 100)}% by chance)`}`;
|
|
34
|
-
|
|
35
|
+
const disagrees = !tempo.music_bed && profile.music.trim() !== "" && !MUSIC_ABSENT.test(profile.music.trim());
|
|
36
|
+
lines.push(`- Music: ${tempo.music_bed ? `a music bed, ${beat}` : disagrees ? `no music bed measured, but the reading hears: ${profile.music.trim()}` : "no music bed"}`);
|
|
35
37
|
}
|
|
36
38
|
if (profile.sound_events) {
|
|
37
39
|
const kinds = new Map();
|
package/dist/scene-bible.d.ts
CHANGED
|
@@ -46,4 +46,3 @@ export type RunSpeech = z.infer<typeof runSpeech>;
|
|
|
46
46
|
export declare const speechActions: z.ZodArray<z.ZodString>;
|
|
47
47
|
export declare function speechActionsOf(storedInput: unknown): ReadonlySet<string>;
|
|
48
48
|
export declare function runSpeechOf(storedInput: unknown): RunSpeech | undefined;
|
|
49
|
-
export declare function listedAccounts(raw: string | undefined): "all" | ReadonlySet<string> | null;
|
package/dist/scene-bible.js
CHANGED
|
@@ -56,10 +56,3 @@ export function runSpeechOf(storedInput) {
|
|
|
56
56
|
const parsed = runSpeech.safeParse(storedInput.speech);
|
|
57
57
|
return parsed.success ? parsed.data : undefined;
|
|
58
58
|
}
|
|
59
|
-
export function listedAccounts(raw) {
|
|
60
|
-
const value = raw?.trim();
|
|
61
|
-
if (value === "1")
|
|
62
|
-
return "all";
|
|
63
|
-
const ids = (value ?? "").split(",").map(id => id.trim()).filter(id => /^acc_[A-Za-z0-9_-]+$/.test(id));
|
|
64
|
-
return ids.length ? new Set(ids) : null;
|
|
65
|
-
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ServiceOffer {
|
|
2
|
+
readonly longForm: boolean;
|
|
3
|
+
readonly explainerFilm: boolean;
|
|
4
|
+
readonly ownAgent: boolean;
|
|
5
|
+
readonly heygenAvatar6: boolean;
|
|
6
|
+
readonly filmHead: boolean;
|
|
7
|
+
readonly heroSprites: boolean;
|
|
8
|
+
readonly outputMarking: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const BASE_OFFER: ServiceOffer;
|
|
11
|
+
export declare const FULL_OFFER: ServiceOffer;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const BASE_OFFER = Object.freeze({
|
|
2
|
+
longForm: false, explainerFilm: false, ownAgent: false, heygenAvatar6: false, filmHead: false, heroSprites: false, outputMarking: false,
|
|
3
|
+
});
|
|
4
|
+
export const FULL_OFFER = Object.freeze({
|
|
5
|
+
longForm: true, explainerFilm: true, ownAgent: true, heygenAvatar6: true, filmHead: true, heroSprites: true, outputMarking: false,
|
|
6
|
+
});
|