@clipwright/core 0.17.0 → 0.19.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/CHANGELOG.md +60 -0
- package/dist/billing-terms.d.ts +19 -0
- package/dist/billing-terms.js +8 -0
- package/dist/billing-terms.js.map +1 -0
- package/dist/broll-policy.d.ts +31 -0
- package/dist/broll-policy.js +24 -0
- package/dist/broll-policy.js.map +1 -0
- package/dist/contract-dispositions.d.ts +65 -3
- package/dist/contract-dispositions.js +25 -21
- package/dist/contract-dispositions.js.map +1 -1
- package/dist/endpoints.d.ts +0 -2
- package/dist/endpoints.js +5 -0
- package/dist/endpoints.js.map +1 -1
- package/dist/face-billing.d.ts +116 -0
- package/dist/face-billing.js +83 -0
- package/dist/face-billing.js.map +1 -0
- package/dist/face-delivery.d.ts +17 -0
- package/dist/face-delivery.js +12 -0
- package/dist/face-delivery.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/long-form-pricing.d.ts +48 -0
- package/dist/long-form-pricing.js +73 -0
- package/dist/long-form-pricing.js.map +1 -0
- package/dist/long-form-profile.d.ts +5 -0
- package/dist/long-form-profile.js +6 -0
- package/dist/long-form-profile.js.map +1 -0
- package/dist/media-timebase.d.ts +2 -0
- package/dist/media-timebase.js +3 -0
- package/dist/media-timebase.js.map +1 -0
- package/dist/public-endpoints.d.ts +2 -0
- package/dist/public-endpoints.js +2 -0
- package/dist/public-endpoints.js.map +1 -1
- package/dist/render-backend.d.ts +3 -1
- package/dist/runs.d.ts +106 -0
- package/dist/runs.js +12 -0
- package/dist/runs.js.map +1 -1
- package/dist/semantic-inserts.d.ts +63 -0
- package/dist/semantic-inserts.js +160 -0
- package/dist/semantic-inserts.js.map +1 -0
- package/dist/skills.d.ts +210 -0
- package/dist/skills.js +69 -12
- package/dist/skills.js.map +1 -1
- package/dist/speech-rhythm-contract.d.ts +20 -0
- package/dist/speech-rhythm-contract.js +22 -0
- package/dist/speech-rhythm-contract.js.map +1 -0
- package/dist/speech-rhythm.d.ts +21 -0
- package/dist/speech-rhythm.js +47 -0
- package/dist/speech-rhythm.js.map +1 -0
- package/dist/tts-backend.d.ts +1 -0
- package/dist/tts-backend.js.map +1 -1
- package/dist/voice-admission.d.ts +40 -0
- package/dist/voice-preview-approval.d.ts +27 -0
- package/dist/voice-preview-approval.js +29 -0
- package/dist/voice-preview-approval.js.map +1 -0
- package/package.json +13 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,66 @@ a customer reading it should not miss what appeared in the product. Like *Server
|
|
|
16
16
|
they are live from the day the web app was deployed, not from the package release they are
|
|
17
17
|
listed under.
|
|
18
18
|
|
|
19
|
+
## [0.19.0] - 2026-09-22
|
|
20
|
+
|
|
21
|
+
A paid video that arrived after we stopped waiting can now be collected: the run
|
|
22
|
+
goes back to `queued` and drives the pipeline again. The server side was live
|
|
23
|
+
from the day it was deployed; this release carries the contract change to the
|
|
24
|
+
MCP tool description, which is where an agent reads the promise.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **Breaking:** `failed` is no longer always final. A run whose paid vendor job
|
|
29
|
+
we still hold can be reopened: it goes back to `queued` and may reach
|
|
30
|
+
`succeeded`. Every reopening is named in `warnings[]`, and one run is reopened
|
|
31
|
+
at most three times. An agent that stops polling the moment it reads `failed`
|
|
32
|
+
will miss a video that was paid for and delivered.
|
|
33
|
+
- *Server-side* A run that lost the video while the vendor was still working on
|
|
34
|
+
it no longer says its paid job "was retained for recovery" when this run's
|
|
35
|
+
terms cannot support recovery. Reading the terms fails soft: when they cannot
|
|
36
|
+
be read at all, the run promises nothing either way.
|
|
37
|
+
- *Server-side* A recovered delivery is written to the ledger under its own
|
|
38
|
+
reason, `run_recovered_delivery`, because the vendor spend was already counted
|
|
39
|
+
on the day the run first failed.
|
|
40
|
+
|
|
41
|
+
### Operations
|
|
42
|
+
|
|
43
|
+
- Migration 0036 adds `recovery_attempt` and `recovery_reopened_at` to `runs`,
|
|
44
|
+
and both are read on the main render path. **Apply the migration before
|
|
45
|
+
deploying any service**: an early deploy fails every `make_ugc` run, not one
|
|
46
|
+
feature. Order forward is migration, api, worker, web; backwards it is worker
|
|
47
|
+
and api first, then drop the columns.
|
|
48
|
+
|
|
49
|
+
## [0.18.0] - 2026-09-21
|
|
50
|
+
|
|
51
|
+
Long-form clips can now show a face for a fifth of their length instead of nearly
|
|
52
|
+
all of it, which is what the face-second meter was priced for.
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- `cover_words` on an insert says how many spoken words it covers, counted from
|
|
57
|
+
the first word of its anchor. The share of words left uncovered decides the
|
|
58
|
+
share of the clip that shows a face, and it does not move with the speed the
|
|
59
|
+
voice reads at. Word length still varies: at a 560-word script, asking for 19%
|
|
60
|
+
delivered 16 to 22 in nine hundred and ninety-seven simulated runs out of a
|
|
61
|
+
thousand, measured on this profile's voice. A shorter script scatters wider.
|
|
62
|
+
- A quote for a narrated clip carries `estimatedFaceWordShare`: the share of the
|
|
63
|
+
clip that will show a face, known before anything is synthesised.
|
|
64
|
+
|
|
65
|
+
### Changed
|
|
66
|
+
|
|
67
|
+
- **Up to 49 inserts per clip**, not two, and at most six appearances of the
|
|
68
|
+
actor between them. Both are counted from the word indexes you send, so an
|
|
69
|
+
input asking for more is refused before anything is paid for.
|
|
70
|
+
- *Server-side* An insert now ends where its first uncovered word begins rather
|
|
71
|
+
than where its last covered word ends, so the pause between two words belongs
|
|
72
|
+
to the insert. Inserts whose coverage meets are adjacent frame for frame and
|
|
73
|
+
no longer leave a fragment of actor footage between them.
|
|
74
|
+
- *Server-side* The credit hold for a narrated clip reserves the words you leave
|
|
75
|
+
uncovered instead of the whole narration. On a clip that covers four fifths of
|
|
76
|
+
its script the hold falls from 2170 credits to 630. Billing is unchanged: it
|
|
77
|
+
has always used the face intervals actually delivered.
|
|
78
|
+
|
|
19
79
|
## [0.17.0] - 2026-09-16
|
|
20
80
|
|
|
21
81
|
Everything here came out of the second dry run by a tester who had not seen the
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Server-authored terms, exposed read-only on runs; never accepted as skill input. */
|
|
3
|
+
export declare const faceBillingAdmissionTermsSchema: z.ZodReadonly<z.ZodObject<{
|
|
4
|
+
mode: z.ZodLiteral<"face_seconds">;
|
|
5
|
+
tariffSnapshot: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
6
|
+
version: z.ZodLiteral<1>;
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
creditsPerSecond: z.ZodNumber;
|
|
9
|
+
rounding: z.ZodLiteral<"ceil_aggregate_seconds">;
|
|
10
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
11
|
+
version: z.ZodLiteral<2>;
|
|
12
|
+
pricingVersion: z.ZodString;
|
|
13
|
+
rateCreditsPerFaceSecond: z.ZodNumber;
|
|
14
|
+
minimumCredits: z.ZodNumber;
|
|
15
|
+
rounding: z.ZodLiteral<"ceil_aggregate_seconds">;
|
|
16
|
+
failurePolicy: z.ZodLiteral<"verified_delivery_only">;
|
|
17
|
+
}, z.core.$strict>>]>;
|
|
18
|
+
}, z.core.$strict>>;
|
|
19
|
+
export type FaceBillingAdmissionTerms = z.infer<typeof faceBillingAdmissionTermsSchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { faceBillingTariffSchema } from "./face-billing.js";
|
|
3
|
+
/** Server-authored terms, exposed read-only on runs; never accepted as skill input. */
|
|
4
|
+
export const faceBillingAdmissionTermsSchema = z.object({
|
|
5
|
+
mode: z.literal("face_seconds"),
|
|
6
|
+
tariffSnapshot: faceBillingTariffSchema,
|
|
7
|
+
}).strict().readonly();
|
|
8
|
+
//# sourceMappingURL=billing-terms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-terms.js","sourceRoot":"","sources":["../src/billing-terms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,uFAAuF;AACvF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IAC/B,cAAc,EAAE,uBAAuB;CACxC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const BROLL_POLICIES: readonly ["anyone", "no_actor", "no_people"];
|
|
3
|
+
export declare const DEFAULT_BROLL_POLICY: "no_people";
|
|
4
|
+
export declare const BROLL_POLICY_DESCRIPTION: string;
|
|
5
|
+
export declare const brollPolicy: z.ZodEnum<{
|
|
6
|
+
anyone: "anyone";
|
|
7
|
+
no_actor: "no_actor";
|
|
8
|
+
no_people: "no_people";
|
|
9
|
+
}>;
|
|
10
|
+
export type BrollPolicy = z.infer<typeof brollPolicy>;
|
|
11
|
+
export declare const actorDefaultsInput: z.ZodObject<{
|
|
12
|
+
broll_policy: z.ZodEnum<{
|
|
13
|
+
anyone: "anyone";
|
|
14
|
+
no_actor: "no_actor";
|
|
15
|
+
no_people: "no_people";
|
|
16
|
+
}>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export declare const actorDefaults: z.ZodObject<{
|
|
19
|
+
actor_id: z.ZodString;
|
|
20
|
+
broll_policy: z.ZodEnum<{
|
|
21
|
+
anyone: "anyone";
|
|
22
|
+
no_actor: "no_actor";
|
|
23
|
+
no_people: "no_people";
|
|
24
|
+
}>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type ActorDefaultsInput = z.infer<typeof actorDefaultsInput>;
|
|
27
|
+
export type ActorDefaults = z.infer<typeof actorDefaults>;
|
|
28
|
+
export declare const ACTOR_DEFAULTS_PATH = "/v1/actors/:id/defaults";
|
|
29
|
+
export declare const actorDefaultsPath: (id: string) => string;
|
|
30
|
+
export declare function resolveBrollPolicy(override: BrollPolicy | undefined, actorDefault: unknown): BrollPolicy;
|
|
31
|
+
export declare function storedBrollPolicy(input: unknown): BrollPolicy;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const BROLL_POLICIES = ["anyone", "no_actor", "no_people"];
|
|
3
|
+
export const DEFAULT_BROLL_POLICY = "no_people";
|
|
4
|
+
export const BROLL_POLICY_DESCRIPTION = "Saved policy for B-roll: anyone allows people including the actor; no_actor excludes the actor; " +
|
|
5
|
+
"no_people excludes all people, including hands. Segmented media generation is closed. " +
|
|
6
|
+
"This setting is stored only and has no effect on actor-only videos. " +
|
|
7
|
+
"Run override wins over the account actor default; otherwise no_people.";
|
|
8
|
+
export const brollPolicy = z.enum(BROLL_POLICIES).describe(BROLL_POLICY_DESCRIPTION);
|
|
9
|
+
export const actorDefaultsInput = z.strictObject({ broll_policy: brollPolicy });
|
|
10
|
+
export const actorDefaults = z.object({ actor_id: z.string(), broll_policy: brollPolicy });
|
|
11
|
+
export const ACTOR_DEFAULTS_PATH = "/v1/actors/:id/defaults";
|
|
12
|
+
export const actorDefaultsPath = (id) => `/v1/actors/${encodeURIComponent(id)}/defaults`;
|
|
13
|
+
export function resolveBrollPolicy(override, actorDefault) {
|
|
14
|
+
if (override !== undefined)
|
|
15
|
+
return brollPolicy.parse(override);
|
|
16
|
+
const parsed = brollPolicy.safeParse(actorDefault);
|
|
17
|
+
return parsed.success ? parsed.data : DEFAULT_BROLL_POLICY;
|
|
18
|
+
}
|
|
19
|
+
export function storedBrollPolicy(input) {
|
|
20
|
+
const value = input && typeof input === "object" && "resolved_broll_policy" in input
|
|
21
|
+
? input.resolved_broll_policy : undefined;
|
|
22
|
+
return resolveBrollPolicy(undefined, value);
|
|
23
|
+
}
|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,CAAC,CAAC,oBAAoB,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,MAAM,KAAK,GAAG,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,uBAAuB,IAAI,KAAK;QAClF,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5C,OAAO,kBAAkB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -28,6 +28,9 @@ export declare const CONTRACT_VERSION_HEADER = "X-Clipwright-Contract";
|
|
|
28
28
|
* опциональных — `present`.
|
|
29
29
|
*/
|
|
30
30
|
export type Disposition = {
|
|
31
|
+
kind: "stored";
|
|
32
|
+
message: string;
|
|
33
|
+
} | {
|
|
31
34
|
kind: "implemented";
|
|
32
35
|
provenBy: "egress" | "composition";
|
|
33
36
|
} | {
|
|
@@ -108,9 +111,17 @@ export declare const FIELD_DISPOSITIONS: {
|
|
|
108
111
|
readonly kind: "implemented";
|
|
109
112
|
readonly provenBy: "egress";
|
|
110
113
|
};
|
|
114
|
+
readonly broll_policy: {
|
|
115
|
+
readonly kind: "stored";
|
|
116
|
+
readonly message: string;
|
|
117
|
+
};
|
|
111
118
|
readonly segments: {
|
|
112
|
-
readonly kind: "
|
|
113
|
-
readonly
|
|
119
|
+
readonly kind: "implemented";
|
|
120
|
+
readonly provenBy: "composition";
|
|
121
|
+
};
|
|
122
|
+
readonly inserts: {
|
|
123
|
+
readonly kind: "implemented";
|
|
124
|
+
readonly provenBy: "composition";
|
|
114
125
|
};
|
|
115
126
|
readonly character: {
|
|
116
127
|
readonly kind: "rejected";
|
|
@@ -149,6 +160,7 @@ export interface ContractFlags {
|
|
|
149
160
|
compose: boolean;
|
|
150
161
|
/** Генерация личных актёров (clipwright#120); отсутствие значит «выключено». */
|
|
151
162
|
actorGeneration?: boolean;
|
|
163
|
+
longForm?: boolean;
|
|
152
164
|
}
|
|
153
165
|
/** `create_actor` открыт только вместе с фетч-поверхностью: без неё личного актёра не отрендерить. */
|
|
154
166
|
export declare function isActorGenerationEnabled(env?: Record<string, string | undefined>): boolean;
|
|
@@ -158,6 +170,8 @@ export declare function isActorGenerationEnabled(env?: Record<string, string | u
|
|
|
158
170
|
* дрожать между двумя соседними вызовами.
|
|
159
171
|
*/
|
|
160
172
|
export declare function contractFlagsFromEnv(env?: Record<string, string | undefined>): ContractFlags;
|
|
173
|
+
export declare function isLongFormQualificationEnabled(env?: Record<string, string | undefined>): boolean;
|
|
174
|
+
export declare const LONG_FORM_DISABLED_MESSAGE = "long-form qualification is disabled on this deployment; pass script without segments or inserts";
|
|
161
175
|
export declare function resolveDispositions(flags: ContractFlags): Record<ContractField, Disposition>;
|
|
162
176
|
/**
|
|
163
177
|
* ДЕЙСТВУЮЩАЯ таблица процесса — то, из чего строятся все поверхности.
|
|
@@ -165,7 +179,7 @@ export declare function resolveDispositions(flags: ContractFlags): Record<Contra
|
|
|
165
179
|
* Отличается от `FIELD_DISPOSITIONS` ровно на применённые флаги: базовая
|
|
166
180
|
* таблица говорит, что код УМЕЕТ, эта — что он предлагает прямо сейчас.
|
|
167
181
|
*/
|
|
168
|
-
export declare const EFFECTIVE_DISPOSITIONS: Record<"actor_gender" | "actor_id" | "aspect_ratio" | "background" | "broll_url" | "caption_style" | "captions" | "character" | "disclosure_overlay" | "image" | "look" | "name" | "person" | "resolution" | "script" | "segments" | "tts_model" | "voice" | "voice_id" | "webhook_url", Disposition>;
|
|
182
|
+
export declare const EFFECTIVE_DISPOSITIONS: Record<"actor_gender" | "actor_id" | "aspect_ratio" | "background" | "broll_policy" | "broll_url" | "caption_style" | "captions" | "character" | "disclosure_overlay" | "image" | "inserts" | "look" | "name" | "person" | "resolution" | "script" | "segments" | "tts_model" | "voice" | "voice_id" | "webhook_url", Disposition>;
|
|
169
183
|
type RejectedField = {
|
|
170
184
|
[K in ContractField]: (typeof FIELD_DISPOSITIONS)[K]["kind"] extends "rejected" ? K : never;
|
|
171
185
|
}[ContractField];
|
|
@@ -242,6 +256,49 @@ export declare const offeredUgcInputShape: Pick<typeof makeUgcInputShape, Offere
|
|
|
242
256
|
*/
|
|
243
257
|
export declare const offeredUgcInput: z.ZodObject<{
|
|
244
258
|
script: z.ZodOptional<z.ZodString>;
|
|
259
|
+
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
260
|
+
kind: z.ZodEnum<{
|
|
261
|
+
actor: "actor";
|
|
262
|
+
media: "media";
|
|
263
|
+
}>;
|
|
264
|
+
script: z.ZodOptional<z.ZodString>;
|
|
265
|
+
media_url: z.ZodOptional<z.ZodString>;
|
|
266
|
+
media_type: z.ZodOptional<z.ZodEnum<{
|
|
267
|
+
image: "image";
|
|
268
|
+
video: "video";
|
|
269
|
+
}>>;
|
|
270
|
+
duration_seconds: z.ZodOptional<z.ZodNumber>;
|
|
271
|
+
image_motion: z.ZodOptional<z.ZodObject<{
|
|
272
|
+
direction: z.ZodEnum<{
|
|
273
|
+
in: "in";
|
|
274
|
+
out: "out";
|
|
275
|
+
}>;
|
|
276
|
+
amount: z.ZodNumber;
|
|
277
|
+
}, z.core.$strip>>;
|
|
278
|
+
}, z.core.$strip>>>;
|
|
279
|
+
inserts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
280
|
+
id: z.ZodString;
|
|
281
|
+
media_url: z.ZodString;
|
|
282
|
+
media_type: z.ZodEnum<{
|
|
283
|
+
image: "image";
|
|
284
|
+
video: "video";
|
|
285
|
+
}>;
|
|
286
|
+
anchor: z.ZodUnion<readonly [z.ZodObject<{
|
|
287
|
+
startWord: z.ZodNumber;
|
|
288
|
+
endWord: z.ZodNumber;
|
|
289
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
290
|
+
quote: z.ZodString;
|
|
291
|
+
occurrence: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
}, z.core.$strict>]>;
|
|
293
|
+
cover_words: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
image_motion: z.ZodOptional<z.ZodObject<{
|
|
295
|
+
direction: z.ZodEnum<{
|
|
296
|
+
in: "in";
|
|
297
|
+
out: "out";
|
|
298
|
+
}>;
|
|
299
|
+
amount: z.ZodNumber;
|
|
300
|
+
}, z.core.$strict>>;
|
|
301
|
+
}, z.core.$strict>>>;
|
|
245
302
|
person: z.ZodOptional<z.ZodString>;
|
|
246
303
|
actor_id: z.ZodOptional<z.ZodString>;
|
|
247
304
|
image: z.ZodOptional<z.ZodString>;
|
|
@@ -250,6 +307,11 @@ export declare const offeredUgcInput: z.ZodObject<{
|
|
|
250
307
|
male: "male";
|
|
251
308
|
}>>;
|
|
252
309
|
name: z.ZodOptional<z.ZodString>;
|
|
310
|
+
broll_policy: z.ZodOptional<z.ZodEnum<{
|
|
311
|
+
anyone: "anyone";
|
|
312
|
+
no_actor: "no_actor";
|
|
313
|
+
no_people: "no_people";
|
|
314
|
+
}>>;
|
|
253
315
|
captions: z.ZodDefault<z.ZodBoolean>;
|
|
254
316
|
caption_style: z.ZodDefault<z.ZodEnum<{
|
|
255
317
|
hormozi: "hormozi";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { makeUgcInputShape } from "./skills.js";
|
|
3
|
+
import { BROLL_POLICY_DESCRIPTION } from "./broll-policy.js";
|
|
3
4
|
/** РЕЕСТР ДИСПОЗИЦИЙ ПОЛЕЙ ВХОДА `make_ugc`: у каждого поля обязано быть записанное */
|
|
4
5
|
/** решение. Тип — страж ПОЛНОТЫ, истинность доказывает egress-тест. */
|
|
5
6
|
/**
|
|
@@ -62,27 +63,10 @@ export const FIELD_DISPOSITIONS = {
|
|
|
62
63
|
image: { kind: "implemented", provenBy: "egress" },
|
|
63
64
|
actor_id: { kind: "implemented", provenBy: "egress" },
|
|
64
65
|
actor_gender: { kind: "implemented", provenBy: "egress" },
|
|
65
|
-
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// страж и должен был сработать: поле добавили — компиляция упала, пока
|
|
70
|
-
// решение не записано. Новое поле без решения не проезжает, кем бы оно ни
|
|
71
|
-
// было добавлено, включая сам план.
|
|
72
|
-
//
|
|
73
|
-
// ПОЧЕМУ `rejected` ПЕРЕЖИЛ US-526 (решение владельца 2026-07-22). План
|
|
74
|
-
// переключал строку на `implemented` с `provenBy: "composition"` уже в
|
|
75
|
-
// US-526, но композиция приезжает только в US-527: без неё N клипов не
|
|
76
|
-
// сводятся в один файл и `final_output` предъявить нечем. `implemented`
|
|
77
|
-
// означает здесь «доказано тестом», а доказывать было бы нечем — то есть
|
|
78
|
-
// строка обещала бы работу, которой нет. US-526 построил механику
|
|
79
|
-
// (раскладку ключей, посегментную озвучку, вендорские области
|
|
80
|
-
// идемпотентности); переключение — одна строка в US-527, когда появится
|
|
81
|
-
// `composed.mp4`, который её докажет.
|
|
82
|
-
segments: {
|
|
83
|
-
kind: "rejected",
|
|
84
|
-
message: "segmented clips are not available yet: pass `script` with the full spoken text instead",
|
|
85
|
-
},
|
|
66
|
+
broll_policy: { kind: "stored", message: BROLL_POLICY_DESCRIPTION },
|
|
67
|
+
// Offered to clients; deployment qualification gates admission below.
|
|
68
|
+
segments: { kind: "implemented", provenBy: "composition" },
|
|
69
|
+
inserts: { kind: "implemented", provenBy: "composition" },
|
|
86
70
|
character: {
|
|
87
71
|
kind: "rejected",
|
|
88
72
|
message: "character is not supported: saved characters do not exist yet. Describe the actor with `person` instead, or omit it to use the default actor",
|
|
@@ -140,8 +124,14 @@ export function contractFlagsFromEnv(env = process.env) {
|
|
|
140
124
|
return {
|
|
141
125
|
remoteFetch: env.CLIPWRIGHT_REMOTE_FETCH === "1",
|
|
142
126
|
compose: env.CLIPWRIGHT_COMPOSE === "1",
|
|
127
|
+
longForm: isLongFormQualificationEnabled(env),
|
|
143
128
|
};
|
|
144
129
|
}
|
|
130
|
+
export function isLongFormQualificationEnabled(env = process.env) {
|
|
131
|
+
return env.CLIPWRIGHT_LONG_FORM_QUALIFICATION === "1" &&
|
|
132
|
+
env.CLIPWRIGHT_COMPOSE === "1" && env.CLIPWRIGHT_REMOTE_FETCH === "1";
|
|
133
|
+
}
|
|
134
|
+
export const LONG_FORM_DISABLED_MESSAGE = "long-form qualification is disabled on this deployment; pass script without segments or inserts";
|
|
145
135
|
const REMOTE_FETCH_DISABLED = {
|
|
146
136
|
kind: "rejected",
|
|
147
137
|
message: "image is temporarily disabled (remote media fetch is off); omit it to render with the default actor",
|
|
@@ -160,9 +150,18 @@ const DISCLOSURE_OVERLAY_DISABLED = {
|
|
|
160
150
|
kind: "rejected",
|
|
161
151
|
message: "disclosure_overlay is not available: composition is disabled on this deployment. The output is still marked in the run contract and in the file metadata",
|
|
162
152
|
};
|
|
153
|
+
/** Предпосылки длинной формы — ОДНО выражение на все её поля: разъехавшись, */
|
|
154
|
+
/** две копии открыли бы `segments` там, где `inserts` ещё закрыты. */
|
|
155
|
+
function longFormReady(flags) {
|
|
156
|
+
return flags.longForm === true && flags.remoteFetch && flags.compose;
|
|
157
|
+
}
|
|
158
|
+
const LONG_FORM_DISABLED = { kind: "rejected", message: LONG_FORM_DISABLED_MESSAGE };
|
|
163
159
|
export function resolveDispositions(flags) {
|
|
160
|
+
const longForm = longFormReady(flags);
|
|
164
161
|
return {
|
|
165
162
|
...FIELD_DISPOSITIONS,
|
|
163
|
+
segments: longForm ? FIELD_DISPOSITIONS.segments : LONG_FORM_DISABLED,
|
|
164
|
+
inserts: longForm ? FIELD_DISPOSITIONS.inserts : LONG_FORM_DISABLED,
|
|
166
165
|
person: flags.actorGeneration === true ? PERSON_WITH_ACTOR_GENERATION : FIELD_DISPOSITIONS.person,
|
|
167
166
|
image: flags.remoteFetch ? FIELD_DISPOSITIONS.image : REMOTE_FETCH_DISABLED,
|
|
168
167
|
actor_id: flags.remoteFetch ? FIELD_DISPOSITIONS.actor_id : {
|
|
@@ -223,6 +222,8 @@ export function dispositionNote(field) {
|
|
|
223
222
|
return noteFor(FIELD_DISPOSITIONS[field]);
|
|
224
223
|
}
|
|
225
224
|
function noteFor(disposition) {
|
|
225
|
+
if (disposition.kind === "stored")
|
|
226
|
+
return `STORED ONLY: ${disposition.message}`;
|
|
226
227
|
if (disposition.kind === "rejected") {
|
|
227
228
|
return `REJECTED: ${disposition.message}`;
|
|
228
229
|
}
|
|
@@ -336,6 +337,9 @@ export function dispositionWarnings(input) {
|
|
|
336
337
|
const warnings = [];
|
|
337
338
|
for (const field of CONTRACT_FIELDS) {
|
|
338
339
|
const disposition = EFFECTIVE_DISPOSITIONS[field];
|
|
340
|
+
if (disposition.kind === "stored" && input[field] !== undefined) {
|
|
341
|
+
warnings.push(disposition.message);
|
|
342
|
+
}
|
|
339
343
|
if (disposition.kind !== "warned")
|
|
340
344
|
continue;
|
|
341
345
|
const value = input[field];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-dispositions.js","sourceRoot":"","sources":["../src/contract-dispositions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"contract-dispositions.js","sourceRoot":"","sources":["../src/contract-dispositions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,uFAAuF;AACvF,uEAAuE;AAEvE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAC7C,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AA6B/D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE;IACnD,KAAK,EAAE,EAAE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,WAAW,CAAC,YAAY,KAAK,sBAAsB;YACnD,KAAK,KAAK,cAAc,CAAC,KAAK,CAAC,EAC/B,CAAC;YACD,SAAS;QACX,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAoB,eAAe,CAAC,MAAM,CACvE,CAAC,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,aAAa,CAC5D,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAoB,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;IACpF,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,WAAW,CAAC,IAAI,KAAK,aAAa,IAAI,WAAW,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACjF,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAoB,eAAe,CAAC,MAAM,CAC9E,CAAC,KAAK,EAAE,EAAE;IACR,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,WAAW,CAAC,IAAI,KAAK,aAAa,IAAI,WAAW,CAAC,QAAQ,KAAK,aAAa,CAAC;AACtF,CAAC,CACF,CAAC"}
|
package/dist/endpoints.d.ts
CHANGED
package/dist/endpoints.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** Маршруты API (clipwright#135): контрактный тест `apps/api` сверяет их с `app.routes`, */
|
|
2
|
+
/** квикстарт печатает отсюда список «что стоит денег». */
|
|
3
|
+
import { ACTOR_DEFAULTS_PATH } from "./broll-policy.js";
|
|
1
4
|
export const API_ENDPOINTS = [
|
|
2
5
|
{ method: "GET", path: "/health", billed: false, onQuickstart: true, jsonBody: false },
|
|
3
6
|
{ method: "GET", path: "/v1/voices", billed: false, onQuickstart: true, jsonBody: false },
|
|
@@ -8,6 +11,8 @@ export const API_ENDPOINTS = [
|
|
|
8
11
|
{ method: "GET", path: "/v1/public/skills", billed: false, onQuickstart: false, jsonBody: false },
|
|
9
12
|
{ method: "GET", path: "/v1/actors", billed: false, onQuickstart: false, jsonBody: false },
|
|
10
13
|
{ method: "DELETE", path: "/v1/actors/:id", billed: false, onQuickstart: false, jsonBody: false },
|
|
14
|
+
{ method: "GET", path: ACTOR_DEFAULTS_PATH, billed: false, onQuickstart: false, jsonBody: false },
|
|
15
|
+
{ method: "POST", path: ACTOR_DEFAULTS_PATH, billed: false, onQuickstart: false, jsonBody: true },
|
|
11
16
|
{ method: "POST", path: "/v1/skills/create_actor/quote", billed: false, onQuickstart: false, jsonBody: true },
|
|
12
17
|
{ method: "POST", path: "/v1/skills/create_actor/run", billed: true, onQuickstart: false, jsonBody: true },
|
|
13
18
|
{ method: "POST", path: "/v1/uploads", billed: false, onQuickstart: false, jsonBody: false },
|
package/dist/endpoints.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../src/endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../src/endpoints.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,0DAA0D;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAcxD,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;IACtF,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,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,EAAE;IACjG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,+BAA+B,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC7G,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,6BAA6B,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC1G,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;IAC5F,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,6BAA6B,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;CAC5G,CAAC;AAEF,2EAA2E;AAC3E,MAAM,UAAU,aAAa,CAAC,QAAqB;IACjD,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAA2B,aAAa,CAAC,MAAM,CAC9E,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,YAAY,CACpC,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const identifier: z.ZodString;
|
|
3
|
+
export declare const faceBillingIntervalSchema: z.ZodReadonly<z.ZodObject<{
|
|
4
|
+
startFrame: z.ZodNumber;
|
|
5
|
+
endFrame: z.ZodNumber;
|
|
6
|
+
}, z.core.$strict>>;
|
|
7
|
+
export declare const faceBillingTariffSchema: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
8
|
+
version: z.ZodLiteral<1>;
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
creditsPerSecond: z.ZodNumber;
|
|
11
|
+
rounding: z.ZodLiteral<"ceil_aggregate_seconds">;
|
|
12
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
13
|
+
version: z.ZodLiteral<2>;
|
|
14
|
+
pricingVersion: z.ZodString;
|
|
15
|
+
rateCreditsPerFaceSecond: z.ZodNumber;
|
|
16
|
+
minimumCredits: z.ZodNumber;
|
|
17
|
+
rounding: z.ZodLiteral<"ceil_aggregate_seconds">;
|
|
18
|
+
failurePolicy: z.ZodLiteral<"verified_delivery_only">;
|
|
19
|
+
}, z.core.$strict>>]>;
|
|
20
|
+
export type FaceBillingTariff = z.infer<typeof faceBillingTariffSchema>;
|
|
21
|
+
export declare const faceBillingPlanContentSchema: z.ZodReadonly<z.ZodObject<{
|
|
22
|
+
version: z.ZodLiteral<1>;
|
|
23
|
+
fps: z.ZodNumber;
|
|
24
|
+
outputFrames: z.ZodNumber;
|
|
25
|
+
fullSpeechDurationSec: z.ZodNumber;
|
|
26
|
+
units: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
27
|
+
unitId: z.ZodString;
|
|
28
|
+
requestHash: z.ZodString;
|
|
29
|
+
audioDurationSec: z.ZodNumber;
|
|
30
|
+
faceIntervals: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
31
|
+
startFrame: z.ZodNumber;
|
|
32
|
+
endFrame: z.ZodNumber;
|
|
33
|
+
}, z.core.$strict>>>>;
|
|
34
|
+
}, z.core.$strict>>>>;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
export declare const faceBillingPlanSchema: z.ZodReadonly<z.ZodObject<{
|
|
37
|
+
version: z.ZodLiteral<1>;
|
|
38
|
+
fps: z.ZodNumber;
|
|
39
|
+
outputFrames: z.ZodNumber;
|
|
40
|
+
fullSpeechDurationSec: z.ZodNumber;
|
|
41
|
+
units: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
42
|
+
unitId: z.ZodString;
|
|
43
|
+
requestHash: z.ZodString;
|
|
44
|
+
audioDurationSec: z.ZodNumber;
|
|
45
|
+
faceIntervals: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
46
|
+
startFrame: z.ZodNumber;
|
|
47
|
+
endFrame: z.ZodNumber;
|
|
48
|
+
}, z.core.$strict>>>>;
|
|
49
|
+
}, z.core.$strict>>>>;
|
|
50
|
+
hash: z.ZodString;
|
|
51
|
+
}, z.core.$strict>>;
|
|
52
|
+
export declare const faceBillingAcceptanceSchema: z.ZodReadonly<z.ZodObject<{
|
|
53
|
+
operationId: z.ZodString;
|
|
54
|
+
unitId: z.ZodString;
|
|
55
|
+
planHash: z.ZodString;
|
|
56
|
+
requestHash: z.ZodString;
|
|
57
|
+
providerJobId: z.ZodString;
|
|
58
|
+
}, z.core.$strict>>;
|
|
59
|
+
export declare const faceBillingFactsSchema: z.ZodReadonly<z.ZodObject<{
|
|
60
|
+
version: z.ZodLiteral<1>;
|
|
61
|
+
mode: z.ZodLiteral<"face_seconds">;
|
|
62
|
+
tariff: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
63
|
+
version: z.ZodLiteral<1>;
|
|
64
|
+
id: z.ZodString;
|
|
65
|
+
creditsPerSecond: z.ZodNumber;
|
|
66
|
+
rounding: z.ZodLiteral<"ceil_aggregate_seconds">;
|
|
67
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
68
|
+
version: z.ZodLiteral<2>;
|
|
69
|
+
pricingVersion: z.ZodString;
|
|
70
|
+
rateCreditsPerFaceSecond: z.ZodNumber;
|
|
71
|
+
minimumCredits: z.ZodNumber;
|
|
72
|
+
rounding: z.ZodLiteral<"ceil_aggregate_seconds">;
|
|
73
|
+
failurePolicy: z.ZodLiteral<"verified_delivery_only">;
|
|
74
|
+
}, z.core.$strict>>]>;
|
|
75
|
+
plan: z.ZodReadonly<z.ZodObject<{
|
|
76
|
+
version: z.ZodLiteral<1>;
|
|
77
|
+
fps: z.ZodNumber;
|
|
78
|
+
outputFrames: z.ZodNumber;
|
|
79
|
+
fullSpeechDurationSec: z.ZodNumber;
|
|
80
|
+
units: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
81
|
+
unitId: z.ZodString;
|
|
82
|
+
requestHash: z.ZodString;
|
|
83
|
+
audioDurationSec: z.ZodNumber;
|
|
84
|
+
faceIntervals: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
85
|
+
startFrame: z.ZodNumber;
|
|
86
|
+
endFrame: z.ZodNumber;
|
|
87
|
+
}, z.core.$strict>>>>;
|
|
88
|
+
}, z.core.$strict>>>>;
|
|
89
|
+
hash: z.ZodString;
|
|
90
|
+
}, z.core.$strict>>;
|
|
91
|
+
acceptedUnits: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
92
|
+
operationId: z.ZodString;
|
|
93
|
+
unitId: z.ZodString;
|
|
94
|
+
planHash: z.ZodString;
|
|
95
|
+
requestHash: z.ZodString;
|
|
96
|
+
providerJobId: z.ZodString;
|
|
97
|
+
}, z.core.$strict>>>>;
|
|
98
|
+
unknownUnitIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
99
|
+
}, z.core.$strict>>;
|
|
100
|
+
export declare const faceBillingOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
101
|
+
runState: z.ZodLiteral<"failed">;
|
|
102
|
+
haltedBySpendGuard: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
paidArtifactLost: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
vendorRefusedOnOurAccount: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
deliverableRejectedByUs: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
107
|
+
runState: z.ZodLiteral<"succeeded">;
|
|
108
|
+
delivered: z.ZodReadonly<z.ZodObject<{
|
|
109
|
+
planHash: z.ZodString;
|
|
110
|
+
outputFrames: z.ZodNumber;
|
|
111
|
+
}, z.core.$strict>>;
|
|
112
|
+
}, z.core.$strict>>], "runState">;
|
|
113
|
+
export type FaceBillingFacts = z.infer<typeof faceBillingFactsSchema>;
|
|
114
|
+
export type FaceBillingPlanContent = z.infer<typeof faceBillingPlanContentSchema>;
|
|
115
|
+
export type FaceBillingOutcome = z.infer<typeof faceBillingOutcomeSchema>;
|
|
116
|
+
export type FaceBillingInterval = z.infer<typeof faceBillingIntervalSchema>;
|