@clipwright/core 0.15.0 → 0.17.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 +89 -0
- package/dist/account-actors.d.ts +292 -0
- package/dist/account-actors.js +222 -0
- package/dist/account-actors.js.map +1 -0
- package/dist/actor-bounds.d.ts +14 -0
- package/dist/actor-bounds.js +13 -0
- package/dist/actor-bounds.js.map +1 -0
- package/dist/actor-qualities.d.ts +8 -0
- package/dist/actor-qualities.js +7 -0
- package/dist/actor-qualities.js.map +1 -0
- package/dist/actors.d.ts +10 -0
- package/dist/actors.js +30 -0
- package/dist/actors.js.map +1 -1
- package/dist/aspect.d.ts +3 -0
- package/dist/aspect.js +15 -1
- package/dist/aspect.js.map +1 -1
- package/dist/contract-dispositions.d.ts +4 -0
- package/dist/contract-dispositions.js +15 -1
- package/dist/contract-dispositions.js.map +1 -1
- package/dist/endpoints.d.ts +3 -1
- package/dist/endpoints.js +13 -10
- package/dist/endpoints.js.map +1 -1
- package/dist/errors.d.ts +7 -1
- package/dist/errors.js +18 -1
- package/dist/errors.js.map +1 -1
- package/dist/idempotency.d.ts +3 -0
- package/dist/idempotency.js +9 -0
- package/dist/idempotency.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/public-endpoints.d.ts +1 -0
- package/dist/public-endpoints.js +1 -0
- package/dist/public-endpoints.js.map +1 -1
- package/dist/rate-limit.d.ts +25 -0
- package/dist/rate-limit.js +40 -0
- package/dist/rate-limit.js.map +1 -1
- package/dist/run-static-warnings.d.ts +12 -4
- package/dist/run-static-warnings.js +35 -12
- package/dist/run-static-warnings.js.map +1 -1
- package/dist/runs.d.ts +51 -2
- package/dist/runs.js +14 -1
- package/dist/runs.js.map +1 -1
- package/dist/skills.d.ts +11 -1
- package/dist/skills.js +29 -18
- package/dist/skills.js.map +1 -1
- package/dist/voice-admission.d.ts +13 -1
- package/dist/voice-admission.js +32 -1
- package/dist/voice-admission.js.map +1 -1
- package/dist/voice-listing.d.ts +5 -1
- package/dist/voice-listing.js +11 -1
- package/dist/voice-listing.js.map +1 -1
- package/dist/voices.d.ts +2 -0
- package/dist/voices.js +3 -0
- package/dist/voices.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,95 @@ 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.17.0] - 2026-09-16
|
|
20
|
+
|
|
21
|
+
Everything here came out of the second dry run by a tester who had not seen the
|
|
22
|
+
product before.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- The MCP server reports money. `make_ugc` carries `credits_reserved` and
|
|
27
|
+
`get_run` carries `credits_charged`, in every state, so an agent no longer has
|
|
28
|
+
to call `get_account` before and after and subtract. The field names come from
|
|
29
|
+
the run schema, so REST and MCP cannot drift apart. (clipwright#209)
|
|
30
|
+
- *Server-side:* in `GET /v1/voices`, each entry of `models` carries
|
|
31
|
+
`vendor_verifies_voices` — whether the vendor's library listing marks any voice
|
|
32
|
+
as verified for that model. It is `false` for `eleven_v3` (measured: none of
|
|
33
|
+
303 live catalog voices), so an empty `verified_models` on that model says
|
|
34
|
+
nothing about the voice. (clipwright#208)
|
|
35
|
+
- *Server-side:* a voice whose gender differs from the actor's is named in
|
|
36
|
+
`warnings`, in the quote and in the run. The combination still runs as asked —
|
|
37
|
+
voicing a man with a female voice is sometimes deliberate — but it is no longer
|
|
38
|
+
silent. (clipwright#210)
|
|
39
|
+
- *Server-side:* an `image` smaller than the output on its short side gets a
|
|
40
|
+
warning that the source is upscaled, with both sizes and the size to send
|
|
41
|
+
instead. The default actor is silent: its size is a property of our own image,
|
|
42
|
+
stated once in the docs. (clipwright#211)
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- *Server-side:* a request body that is not valid JSON answers 400
|
|
47
|
+
`malformed_body`, not 500. A 500 says the failure is ours, so an agent retries
|
|
48
|
+
bytes that will never parse; the new message says both what to fix and that a
|
|
49
|
+
retry fails the same way. (clipwright#212)
|
|
50
|
+
- *Server-side:* a source we cannot use — private or loopback host, http,
|
|
51
|
+
unreachable, redirecting, over 10 MB, or not PNG/JPEG/WebP — is refused with
|
|
52
|
+
400 `unusable_source` before any charge, in the quote and in the run alike.
|
|
53
|
+
It used to be priced: a loopback url answered 200 and an estimate, while the
|
|
54
|
+
tool description promised a refusal. (clipwright#213)
|
|
55
|
+
- *Server-side:* refusals on `script`, `voice`, `voice_id` and `image` are
|
|
56
|
+
written in the product's words instead of the schema library's, and the
|
|
57
|
+
description of `script` no longer names a field the API rejects.
|
|
58
|
+
(clipwright#212)
|
|
59
|
+
- *Dashboard:* the root of the cabinet host sends a signed-in visitor to their
|
|
60
|
+
dashboard instead of showing the landing page with a "Sign in" button.
|
|
61
|
+
(clipwright#214)
|
|
62
|
+
- *Dashboard:* every tile on `/videos` prints its `run_id` and links to the
|
|
63
|
+
support form with it. The id used to live only in the preview image's alt
|
|
64
|
+
text, so tiles without a preview had none at all. (clipwright#215)
|
|
65
|
+
- *Dashboard:* the REST example on `/quickstart` runs unchanged in any shell: one
|
|
66
|
+
line, no backslash continuations and no shell substitution. (clipwright#211)
|
|
67
|
+
|
|
68
|
+
## [0.16.0] - 2026-09-16
|
|
69
|
+
|
|
70
|
+
### Added
|
|
71
|
+
|
|
72
|
+
- *Server-side:* a new skill, `create_actor`, builds a personal actor for the
|
|
73
|
+
account from a description of a fictional adult: a 9:16 portrait with exactly
|
|
74
|
+
one face, plus the other requested formats edited from it. `POST
|
|
75
|
+
/v1/skills/create_actor/quote` and `/run` take the description, `gender`,
|
|
76
|
+
`approximate_age`, `name`, `quality` and `aspect_ratios`; the run reports
|
|
77
|
+
`created_actor` when it succeeds, and the returned `actor_id` goes to
|
|
78
|
+
`make_ugc` in the same field a catalog actor does. `GET /v1/actors` lists the
|
|
79
|
+
account's own actors after the catalog, and `DELETE /v1/actors/{id}` takes one
|
|
80
|
+
out of the choice. The skill appears in `GET /v1/public/skills` only while
|
|
81
|
+
generation is switched on; until then quote and run answer 503
|
|
82
|
+
`actor_generation_disabled` and no run is created. (clipwright#120)
|
|
83
|
+
- *Server-side:* runs have a new state, `generating`, which only `create_actor`
|
|
84
|
+
enters. The set of terminal states is unchanged: `succeeded` and `failed`, and
|
|
85
|
+
nothing else. (clipwright#120)
|
|
86
|
+
- Personal actors reached the clients. The SDK gained `quoteActor`,
|
|
87
|
+
`createActor` and `deleteActor`; the CLI gained `quote-actor`, `create-actor`
|
|
88
|
+
and `delete-actor`; the MCP server gained `quote_actor`, `create_actor` and
|
|
89
|
+
`delete_actor`, so `tools/list` now returns ten tools instead of seven. The
|
|
90
|
+
idempotency key of an actor run is built from the actor's own schema: two
|
|
91
|
+
different descriptions are two different keys, and a repeated call with the
|
|
92
|
+
same description returns the run already paid for. (clipwright#120)
|
|
93
|
+
- *Dashboard:* `/actors` shows the account's personal actors next to the
|
|
94
|
+
catalog and deletes one on confirmation. A deleted actor stops being offered
|
|
95
|
+
at once; its images are removed by a daily cleanup. (clipwright#120)
|
|
96
|
+
|
|
97
|
+
### Changed
|
|
98
|
+
|
|
99
|
+
- *Server-side:* a request with `person` and generation switched on gets a
|
|
100
|
+
warning that points at `create_actor` instead of only saying the field is not
|
|
101
|
+
honored. (clipwright#120)
|
|
102
|
+
- *Server-side:* `create_actor` is charged per published image, not per second:
|
|
103
|
+
the portrait and each extra format cost what the quote showed, a partial
|
|
104
|
+
result charges only what was published and names the rest in `warnings`, and a
|
|
105
|
+
failed run costs nothing at all. Refused descriptions and unusable portraits
|
|
106
|
+
are free. (clipwright#120)
|
|
107
|
+
|
|
19
108
|
## [0.15.0] - 2026-09-14
|
|
20
109
|
|
|
21
110
|
### Changed
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type ActorQuality } from "./actor-qualities.js";
|
|
3
|
+
import { type AspectRatio } from "./skills.js";
|
|
4
|
+
/** Личные актёры аккаунта (clipwright#120, этап 2). Решение и доводы — docs/adr/0003-account-actors.md. */
|
|
5
|
+
export { ACTOR_DEFAULT_QUALITY, ACTOR_QUALITIES_ACCEPTED, ACTOR_QUALITIES_KNOWN } from "./actor-qualities.js";
|
|
6
|
+
export type { ActorQuality, ActorQualityAccepted } from "./actor-qualities.js";
|
|
7
|
+
export { ACTOR_AGE_FLOOR, ACTOR_ASPECTS_KNOWN, ACTOR_DESCRIPTION_MAX_CHARS, ACTOR_GENDERS_ACCEPTED, ACTOR_GENDERS_KNOWN, ACTOR_MAX_AGE, ACTOR_MIN_AGE, ACTOR_NAME_MAX_CHARS, } from "./actor-bounds.js";
|
|
8
|
+
export type { ActorAspectKnown, ActorGender } from "./actor-bounds.js";
|
|
9
|
+
export declare const PERSONAL_ACTOR_ID_PREFIX = "actor_u_";
|
|
10
|
+
/** `actor_u_` и 26 знаков base32 (RFC 4648, строчные) — 128 случайных бит. */
|
|
11
|
+
export declare const personalActorId: z.ZodString;
|
|
12
|
+
export declare const ACTOR_SCOPES: readonly ["clipwright", "account"];
|
|
13
|
+
export type ActorScope = (typeof ACTOR_SCOPES)[number];
|
|
14
|
+
/** Чей актёр — по форме id. Каталог Clipwright префикс `actor_u_` не занимает: это сверяет тест. */
|
|
15
|
+
export declare function actorIdScope(actorId: string): ActorScope;
|
|
16
|
+
/** Случайность приходит снаружи: core не зависит от криптографии рантайма. */
|
|
17
|
+
export declare function newPersonalActorId(random: Uint8Array): string;
|
|
18
|
+
/** Портрет — всегда 9:16; остальные форматы правятся из него. */
|
|
19
|
+
export declare const ACTOR_PORTRAIT_ASPECT: "9:16";
|
|
20
|
+
/** Размеры генерации compact (решение владельца 2026-09-14, замер G0). */
|
|
21
|
+
export declare const ACTOR_SIZE_SET: {
|
|
22
|
+
readonly "9:16": {
|
|
23
|
+
readonly width: 1024;
|
|
24
|
+
readonly height: 1824;
|
|
25
|
+
};
|
|
26
|
+
readonly "1:1": {
|
|
27
|
+
readonly width: 1024;
|
|
28
|
+
readonly height: 1024;
|
|
29
|
+
};
|
|
30
|
+
readonly "16:9": {
|
|
31
|
+
readonly width: 1824;
|
|
32
|
+
readonly height: 1024;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
type AcceptedQualities = readonly [ActorQuality, ...ActorQuality[]];
|
|
36
|
+
/** Вход при данном множестве принимаемых качеств. */
|
|
37
|
+
export declare function createActorInputWith<const Q extends AcceptedQualities>(accepted: Q, defaultQuality: Q[number]): z.ZodObject<{
|
|
38
|
+
description: z.ZodString;
|
|
39
|
+
gender: z.ZodEnum<{
|
|
40
|
+
female: "female";
|
|
41
|
+
male: "male";
|
|
42
|
+
}>;
|
|
43
|
+
approximate_age: z.ZodNumber;
|
|
44
|
+
name: z.ZodString;
|
|
45
|
+
aspect_ratios: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
46
|
+
"16:9": "16:9";
|
|
47
|
+
"1:1": "1:1";
|
|
48
|
+
"9:16": "9:16";
|
|
49
|
+
}>>>;
|
|
50
|
+
quality: z.ZodDefault<z.ZodEnum<{ [k in Q[number]]: k; } extends infer T ? { [k in keyof T]: T[k]; } : never>>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
export declare const createActorInput: z.ZodObject<{
|
|
53
|
+
description: z.ZodString;
|
|
54
|
+
gender: z.ZodEnum<{
|
|
55
|
+
female: "female";
|
|
56
|
+
male: "male";
|
|
57
|
+
}>;
|
|
58
|
+
approximate_age: z.ZodNumber;
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
aspect_ratios: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
61
|
+
"16:9": "16:9";
|
|
62
|
+
"1:1": "1:1";
|
|
63
|
+
"9:16": "9:16";
|
|
64
|
+
}>>>;
|
|
65
|
+
quality: z.ZodDefault<z.ZodEnum<{
|
|
66
|
+
high: "high";
|
|
67
|
+
medium: "medium";
|
|
68
|
+
}>>;
|
|
69
|
+
}, z.core.$strict>;
|
|
70
|
+
export type CreateActorInput = z.infer<typeof createActorInput>;
|
|
71
|
+
/** Вход ДО дефолтов — то, что пишет вызыватель: `quality` и `aspect_ratios` необязательны. */
|
|
72
|
+
/** Тот же приём, что у `MakeUgcInputArgs`: клиенту нельзя навязывать поля со значением по умолчанию. */
|
|
73
|
+
export type CreateActorInputArgs = z.input<typeof createActorInput>;
|
|
74
|
+
/** Плоская форма для MCP: инструмент публикует ту же схему, что проверяет сервер. */
|
|
75
|
+
export declare const createActorInputShape: {
|
|
76
|
+
description: z.ZodString;
|
|
77
|
+
gender: z.ZodEnum<{
|
|
78
|
+
female: "female";
|
|
79
|
+
male: "male";
|
|
80
|
+
}>;
|
|
81
|
+
approximate_age: z.ZodNumber;
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
aspect_ratios: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
84
|
+
"16:9": "16:9";
|
|
85
|
+
"1:1": "1:1";
|
|
86
|
+
"9:16": "9:16";
|
|
87
|
+
}>>>;
|
|
88
|
+
quality: z.ZodDefault<z.ZodEnum<{
|
|
89
|
+
high: "high";
|
|
90
|
+
medium: "medium";
|
|
91
|
+
}>>;
|
|
92
|
+
};
|
|
93
|
+
export declare const actorUnitCredits: z.ZodObject<{
|
|
94
|
+
portrait: z.ZodNumber;
|
|
95
|
+
variant: z.ZodNumber;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
/** Цены единиц и запрошенные форматы, закреплённые при допуске; расчёт идёт по ним, а не по таблице. */
|
|
98
|
+
export declare const actorPricingSnapshot: z.ZodObject<{
|
|
99
|
+
quality: z.ZodEnum<{
|
|
100
|
+
high: "high";
|
|
101
|
+
medium: "medium";
|
|
102
|
+
}>;
|
|
103
|
+
unit_credits: z.ZodObject<{
|
|
104
|
+
portrait: z.ZodNumber;
|
|
105
|
+
variant: z.ZodNumber;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
requested_aspects: z.ZodArray<z.ZodEnum<{
|
|
108
|
+
"16:9": "16:9";
|
|
109
|
+
"1:1": "1:1";
|
|
110
|
+
"9:16": "9:16";
|
|
111
|
+
}>>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
export type ActorPricingSnapshot = z.infer<typeof actorPricingSnapshot>;
|
|
114
|
+
/** Снимок, который допуск создаёт: форматы приёма, портрет обязателен, повторов нет. */
|
|
115
|
+
export declare const admittedActorPricingSnapshot: z.ZodObject<{
|
|
116
|
+
quality: z.ZodEnum<{
|
|
117
|
+
high: "high";
|
|
118
|
+
medium: "medium";
|
|
119
|
+
}>;
|
|
120
|
+
unit_credits: z.ZodObject<{
|
|
121
|
+
portrait: z.ZodNumber;
|
|
122
|
+
variant: z.ZodNumber;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
requested_aspects: z.ZodArray<z.ZodEnum<{
|
|
125
|
+
"16:9": "16:9";
|
|
126
|
+
"1:1": "1:1";
|
|
127
|
+
"9:16": "9:16";
|
|
128
|
+
}>>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
/** Сохранённый вход рана. Качество и форматы обязаны совпасть со снимком: иначе генерация */
|
|
131
|
+
/** разошлась бы со списанием, поэтому такой ран не читается (`run_input_unreadable`, ноль кредитов). */
|
|
132
|
+
export declare const storedCreateActorInput: z.ZodObject<{
|
|
133
|
+
description: z.ZodString;
|
|
134
|
+
gender: z.ZodEnum<{
|
|
135
|
+
female: "female";
|
|
136
|
+
male: "male";
|
|
137
|
+
}>;
|
|
138
|
+
approximate_age: z.ZodNumber;
|
|
139
|
+
name: z.ZodString;
|
|
140
|
+
aspect_ratios: z.ZodArray<z.ZodEnum<{
|
|
141
|
+
"16:9": "16:9";
|
|
142
|
+
"1:1": "1:1";
|
|
143
|
+
"9:16": "9:16";
|
|
144
|
+
}>>;
|
|
145
|
+
quality: z.ZodEnum<{
|
|
146
|
+
high: "high";
|
|
147
|
+
medium: "medium";
|
|
148
|
+
}>;
|
|
149
|
+
pricing_snapshot: z.ZodObject<{
|
|
150
|
+
quality: z.ZodEnum<{
|
|
151
|
+
high: "high";
|
|
152
|
+
medium: "medium";
|
|
153
|
+
}>;
|
|
154
|
+
unit_credits: z.ZodObject<{
|
|
155
|
+
portrait: z.ZodNumber;
|
|
156
|
+
variant: z.ZodNumber;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
requested_aspects: z.ZodArray<z.ZodEnum<{
|
|
159
|
+
"16:9": "16:9";
|
|
160
|
+
"1:1": "1:1";
|
|
161
|
+
"9:16": "9:16";
|
|
162
|
+
}>>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type StoredCreateActorInput = z.infer<typeof storedCreateActorInput>;
|
|
166
|
+
export declare const createActorQuote: z.ZodObject<{
|
|
167
|
+
skill: z.ZodLiteral<"create_actor">;
|
|
168
|
+
credits_estimate: z.ZodNumber;
|
|
169
|
+
pricing_snapshot: z.ZodObject<{
|
|
170
|
+
quality: z.ZodEnum<{
|
|
171
|
+
high: "high";
|
|
172
|
+
medium: "medium";
|
|
173
|
+
}>;
|
|
174
|
+
unit_credits: z.ZodObject<{
|
|
175
|
+
portrait: z.ZodNumber;
|
|
176
|
+
variant: z.ZodNumber;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
requested_aspects: z.ZodArray<z.ZodEnum<{
|
|
179
|
+
"16:9": "16:9";
|
|
180
|
+
"1:1": "1:1";
|
|
181
|
+
"9:16": "9:16";
|
|
182
|
+
}>>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
warnings: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
185
|
+
contract_version: z.ZodString;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
export type CreateActorQuote = z.infer<typeof createActorQuote>;
|
|
188
|
+
/** Актёр, созданный раном, при чтении. Удаление актёра стирает имя и снимает форматы с публикации, */
|
|
189
|
+
/** а `get_run` старого рана обязан отвечать, поэтому пустые имя и форматы читаются. */
|
|
190
|
+
export declare const createdActor: z.ZodObject<{
|
|
191
|
+
actor_id: z.ZodString;
|
|
192
|
+
name: z.ZodString;
|
|
193
|
+
gender: z.ZodEnum<{
|
|
194
|
+
female: "female";
|
|
195
|
+
male: "male";
|
|
196
|
+
}>;
|
|
197
|
+
approximate_age: z.ZodNumber;
|
|
198
|
+
version: z.ZodNumber;
|
|
199
|
+
quality: z.ZodEnum<{
|
|
200
|
+
high: "high";
|
|
201
|
+
medium: "medium";
|
|
202
|
+
}>;
|
|
203
|
+
aspect_ratios: z.ZodArray<z.ZodEnum<{
|
|
204
|
+
"16:9": "16:9";
|
|
205
|
+
"1:1": "1:1";
|
|
206
|
+
"9:16": "9:16";
|
|
207
|
+
}>>;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
export type CreatedActor = z.infer<typeof createdActor>;
|
|
210
|
+
/** Итог, который пишет успешный ран: имя и опубликованные форматы, среди них портрет 9:16. */
|
|
211
|
+
export declare const producedCreatedActor: z.ZodObject<{
|
|
212
|
+
actor_id: z.ZodString;
|
|
213
|
+
gender: z.ZodEnum<{
|
|
214
|
+
female: "female";
|
|
215
|
+
male: "male";
|
|
216
|
+
}>;
|
|
217
|
+
approximate_age: z.ZodNumber;
|
|
218
|
+
version: z.ZodNumber;
|
|
219
|
+
quality: z.ZodEnum<{
|
|
220
|
+
high: "high";
|
|
221
|
+
medium: "medium";
|
|
222
|
+
}>;
|
|
223
|
+
name: z.ZodString;
|
|
224
|
+
aspect_ratios: z.ZodArray<z.ZodEnum<{
|
|
225
|
+
"16:9": "16:9";
|
|
226
|
+
"1:1": "1:1";
|
|
227
|
+
"9:16": "9:16";
|
|
228
|
+
}>>;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
/** Решение по полю входа `create_actor`; смысл видов — как у реестра `make_ugc` (contract-dispositions.ts). */
|
|
231
|
+
export type CreateActorDisposition = {
|
|
232
|
+
kind: "implemented";
|
|
233
|
+
provenBy: "egress" | "listing";
|
|
234
|
+
} | {
|
|
235
|
+
kind: "warned";
|
|
236
|
+
warning: string;
|
|
237
|
+
triggersWhen: "present";
|
|
238
|
+
};
|
|
239
|
+
export declare const CREATE_ACTOR_FIELD_DISPOSITIONS: {
|
|
240
|
+
readonly description: {
|
|
241
|
+
readonly kind: "implemented";
|
|
242
|
+
readonly provenBy: "egress";
|
|
243
|
+
};
|
|
244
|
+
readonly gender: {
|
|
245
|
+
readonly kind: "implemented";
|
|
246
|
+
readonly provenBy: "egress";
|
|
247
|
+
};
|
|
248
|
+
readonly approximate_age: {
|
|
249
|
+
readonly kind: "implemented";
|
|
250
|
+
readonly provenBy: "egress";
|
|
251
|
+
};
|
|
252
|
+
readonly name: {
|
|
253
|
+
readonly kind: "implemented";
|
|
254
|
+
readonly provenBy: "listing";
|
|
255
|
+
};
|
|
256
|
+
readonly quality: {
|
|
257
|
+
readonly kind: "implemented";
|
|
258
|
+
readonly provenBy: "egress";
|
|
259
|
+
};
|
|
260
|
+
readonly aspect_ratios: {
|
|
261
|
+
readonly kind: "implemented";
|
|
262
|
+
readonly provenBy: "egress";
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
/** Предупреждения допуска — только из реестра; пишутся в `runs.warnings` и не пересчитываются при чтении. */
|
|
266
|
+
export declare function createActorAdmissionWarnings(input: Readonly<Record<string, unknown>>, dispositions?: Readonly<Record<string, CreateActorDisposition>>): string[];
|
|
267
|
+
/** Коды провала рана `create_actor`: у каждого — ноль кредитов. Колонка `error` — `код: текст`. */
|
|
268
|
+
export declare const CREATE_ACTOR_RUN_ERRORS: {
|
|
269
|
+
readonly actor_portrait_unusable: "the generated portrait did not show exactly one face; no actor was created and nothing was charged";
|
|
270
|
+
readonly actor_prompt_refused: string;
|
|
271
|
+
readonly face_check_unavailable: "the face check is unavailable right now; no actor was created and nothing was charged. Retry later";
|
|
272
|
+
readonly prompt_check_unavailable: "the description check is unavailable right now; no actor was created and nothing was charged. Retry later";
|
|
273
|
+
readonly run_input_unreadable: "the stored run input could not be read; no actor was created and nothing was charged";
|
|
274
|
+
readonly actor_portrait_not_delivered: "the portrait could not be generated or stored; no actor was created and nothing was charged. Retry later";
|
|
275
|
+
readonly actor_generation_disabled: "actor generation is disabled right now; no actor was created and nothing was charged";
|
|
276
|
+
readonly actor_run_interrupted: "the run stopped before it finished; no actor was created and nothing was charged";
|
|
277
|
+
readonly actor_spend_refused: "our spend guard refused the paid call; no actor was created and nothing was charged. Retry later";
|
|
278
|
+
};
|
|
279
|
+
export type CreateActorRunErrorCode = keyof typeof CREATE_ACTOR_RUN_ERRORS;
|
|
280
|
+
export declare const CREATE_ACTOR_RUN_ERROR_CODES: CreateActorRunErrorCode[];
|
|
281
|
+
export declare function createActorRunError(code: CreateActorRunErrorCode): string;
|
|
282
|
+
/** Формат `runs.error` для кода с уточнением: код до двоеточия читают алерты. */
|
|
283
|
+
export declare function createActorRunErrorWith(code: CreateActorRunErrorCode, detail: string): string;
|
|
284
|
+
export declare const ACTOR_VARIANT_ASPECTS: ("16:9" | "1:1")[];
|
|
285
|
+
/** Вариант, не созданный по нашей причине: успешный ран несёт эту строку в `warnings`. */
|
|
286
|
+
export declare function actorVariantWarning(aspect: AspectRatio, reason: string): string;
|
|
287
|
+
/** Сорванная проверка лица на этапе вариантов: ран УСПЕШЕН, кода провала нет. */
|
|
288
|
+
/** Одно определение на писателя (таск) и счётчик (алерт 10), сравнение — целой строкой. */
|
|
289
|
+
export declare const ACTOR_VARIANT_FACE_CHECK_REASON = "the face check was unavailable";
|
|
290
|
+
export declare const ACTOR_VARIANT_FACE_CHECK_WARNINGS: readonly string[];
|
|
291
|
+
/** Что делает `create_actor` — один текст для публичного каталога скиллов и клиентов. */
|
|
292
|
+
export declare const CREATE_ACTOR_DESCRIPTION: string;
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ACTOR_DEFAULT_QUALITY, ACTOR_QUALITIES_ACCEPTED, ACTOR_QUALITIES_KNOWN, } from "./actor-qualities.js";
|
|
3
|
+
import { ACTOR_AGE_FLOOR, ACTOR_ASPECTS_KNOWN, ACTOR_DESCRIPTION_MAX_CHARS, ACTOR_GENDERS_ACCEPTED, ACTOR_GENDERS_KNOWN, ACTOR_MAX_AGE, ACTOR_MIN_AGE, ACTOR_NAME_MAX_CHARS, } from "./actor-bounds.js";
|
|
4
|
+
import { ASPECT_RATIOS } from "./skills.js";
|
|
5
|
+
/** Личные актёры аккаунта (clipwright#120, этап 2). Решение и доводы — docs/adr/0003-account-actors.md. */
|
|
6
|
+
export { ACTOR_DEFAULT_QUALITY, ACTOR_QUALITIES_ACCEPTED, ACTOR_QUALITIES_KNOWN } from "./actor-qualities.js";
|
|
7
|
+
export { ACTOR_AGE_FLOOR, ACTOR_ASPECTS_KNOWN, ACTOR_DESCRIPTION_MAX_CHARS, ACTOR_GENDERS_ACCEPTED, ACTOR_GENDERS_KNOWN, ACTOR_MAX_AGE, ACTOR_MIN_AGE, ACTOR_NAME_MAX_CHARS, } from "./actor-bounds.js";
|
|
8
|
+
export const PERSONAL_ACTOR_ID_PREFIX = "actor_u_";
|
|
9
|
+
const PERSONAL_ACTOR_ID_BYTES = 16;
|
|
10
|
+
const BASE32_ALPHABET = "abcdefghijklmnopqrstuvwxyz234567";
|
|
11
|
+
/** `actor_u_` и 26 знаков base32 (RFC 4648, строчные) — 128 случайных бит. */
|
|
12
|
+
export const personalActorId = z.string().regex(/^actor_u_[a-z2-7]{26}$/);
|
|
13
|
+
export const ACTOR_SCOPES = ["clipwright", "account"];
|
|
14
|
+
/** Чей актёр — по форме id. Каталог Clipwright префикс `actor_u_` не занимает: это сверяет тест. */
|
|
15
|
+
export function actorIdScope(actorId) {
|
|
16
|
+
return personalActorId.safeParse(actorId).success ? "account" : "clipwright";
|
|
17
|
+
}
|
|
18
|
+
/** Случайность приходит снаружи: core не зависит от криптографии рантайма. */
|
|
19
|
+
export function newPersonalActorId(random) {
|
|
20
|
+
if (random.length !== PERSONAL_ACTOR_ID_BYTES) {
|
|
21
|
+
throw new Error(`personal actor id needs ${PERSONAL_ACTOR_ID_BYTES} random bytes, got ${random.length}`);
|
|
22
|
+
}
|
|
23
|
+
let buffer = 0;
|
|
24
|
+
let bits = 0;
|
|
25
|
+
let encoded = "";
|
|
26
|
+
for (const byte of random) {
|
|
27
|
+
buffer = (buffer << 8) | byte;
|
|
28
|
+
bits += 8;
|
|
29
|
+
while (bits >= 5) {
|
|
30
|
+
bits -= 5;
|
|
31
|
+
encoded += BASE32_ALPHABET.charAt((buffer >> bits) & 31);
|
|
32
|
+
}
|
|
33
|
+
buffer &= (1 << bits) - 1;
|
|
34
|
+
}
|
|
35
|
+
if (bits > 0)
|
|
36
|
+
encoded += BASE32_ALPHABET.charAt((buffer << (5 - bits)) & 31);
|
|
37
|
+
return PERSONAL_ACTOR_ID_PREFIX + encoded;
|
|
38
|
+
}
|
|
39
|
+
/** Портрет — всегда 9:16; остальные форматы правятся из него. */
|
|
40
|
+
export const ACTOR_PORTRAIT_ASPECT = "9:16";
|
|
41
|
+
/** Размеры генерации compact (решение владельца 2026-09-14, замер G0). */
|
|
42
|
+
export const ACTOR_SIZE_SET = {
|
|
43
|
+
"9:16": { width: 1024, height: 1824 },
|
|
44
|
+
"1:1": { width: 1024, height: 1024 },
|
|
45
|
+
"16:9": { width: 1824, height: 1024 },
|
|
46
|
+
};
|
|
47
|
+
const includesPortrait = (ratios) => ratios.includes(ACTOR_PORTRAIT_ASPECT);
|
|
48
|
+
const hasNoRepeats = (ratios) => new Set(ratios).size === ratios.length;
|
|
49
|
+
/** Поля строгого входа без качества. Границы — из actor-bounds.ts; схемы чтения их не берут. */
|
|
50
|
+
const actorFieldShape = {
|
|
51
|
+
description: z
|
|
52
|
+
.string()
|
|
53
|
+
.min(1)
|
|
54
|
+
.max(ACTOR_DESCRIPTION_MAX_CHARS)
|
|
55
|
+
.describe("Words describing a fictional adult: appearance, clothing, setting. Naming a real person or a likeness " +
|
|
56
|
+
"to one is refused before any charge (actor_prompt_refused)."),
|
|
57
|
+
gender: z
|
|
58
|
+
.enum(ACTOR_GENDERS_ACCEPTED)
|
|
59
|
+
.describe(`${ACTOR_GENDERS_ACCEPTED.join(" | ")}. Fixes the actor's gender and the default voice of videos with this actor.`),
|
|
60
|
+
approximate_age: z
|
|
61
|
+
.number()
|
|
62
|
+
.int()
|
|
63
|
+
.min(ACTOR_MIN_AGE)
|
|
64
|
+
.max(ACTOR_MAX_AGE)
|
|
65
|
+
.describe(`Approximate age in years, ${ACTOR_MIN_AGE} to ${ACTOR_MAX_AGE}: actors are adults.`),
|
|
66
|
+
name: z.string().min(1).max(ACTOR_NAME_MAX_CHARS).describe("Name shown in list_actors."),
|
|
67
|
+
aspect_ratios: z
|
|
68
|
+
.array(z.enum(ASPECT_RATIOS))
|
|
69
|
+
.min(1)
|
|
70
|
+
.max(ASPECT_RATIOS.length)
|
|
71
|
+
.refine(includesPortrait, {
|
|
72
|
+
error: `aspect_ratios must include ${ACTOR_PORTRAIT_ASPECT}: every actor starts from a ${ACTOR_PORTRAIT_ASPECT} portrait`,
|
|
73
|
+
})
|
|
74
|
+
.refine(hasNoRepeats, { error: "aspect_ratios must not repeat a format" })
|
|
75
|
+
.default([...ASPECT_RATIOS])
|
|
76
|
+
.describe(`Formats to create: ${ASPECT_RATIOS.join(" | ")}, always including ${ACTOR_PORTRAIT_ASPECT}. Omitted means all ` +
|
|
77
|
+
"three. Formats that fail the identity check are not charged and are named in warnings."),
|
|
78
|
+
};
|
|
79
|
+
function unknownFieldsRefusal(keys) {
|
|
80
|
+
if (keys.includes("image")) {
|
|
81
|
+
return "create_actor takes no image or other reference: describe a fictional adult in description";
|
|
82
|
+
}
|
|
83
|
+
return `unknown field(s) ${keys.join(", ")}: create_actor accepts description, gender, approximate_age, name, quality, aspect_ratios`;
|
|
84
|
+
}
|
|
85
|
+
/** Вход при данном множестве принимаемых качеств. */
|
|
86
|
+
export function createActorInputWith(accepted, defaultQuality) {
|
|
87
|
+
return z.strictObject({
|
|
88
|
+
...actorFieldShape,
|
|
89
|
+
quality: z
|
|
90
|
+
.enum(accepted, {
|
|
91
|
+
error: (issue) => `quality ${JSON.stringify(issue.input)} is not accepted: choose one of ${accepted.join(" | ")}`,
|
|
92
|
+
})
|
|
93
|
+
.default(defaultQuality)
|
|
94
|
+
.describe(`Image quality: ${accepted.join(" | ")}. Omitted means ${defaultQuality}. The price per image depends on it; ` +
|
|
95
|
+
"quote shows it before any charge."),
|
|
96
|
+
}, {
|
|
97
|
+
error: (issue) => (issue.code === "unrecognized_keys" ? unknownFieldsRefusal(issue.keys) : undefined),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
export const createActorInput = createActorInputWith(ACTOR_QUALITIES_ACCEPTED, ACTOR_DEFAULT_QUALITY);
|
|
101
|
+
/** Плоская форма для MCP: инструмент публикует ту же схему, что проверяет сервер. */
|
|
102
|
+
export const createActorInputShape = createActorInput.shape;
|
|
103
|
+
export const actorUnitCredits = z.object({
|
|
104
|
+
portrait: z.number().int().positive(),
|
|
105
|
+
variant: z.number().int().positive(),
|
|
106
|
+
});
|
|
107
|
+
/** Схемы чтения зависят только от того, что могло быть записано: известных множеств и CHECK 0031. */
|
|
108
|
+
/** Границы приёма в них не входят, поэтому сужение приёма старых ранов не ломает. */
|
|
109
|
+
const storedAspects = z.array(z.enum(ACTOR_ASPECTS_KNOWN)).min(1);
|
|
110
|
+
/** Цены единиц и запрошенные форматы, закреплённые при допуске; расчёт идёт по ним, а не по таблице. */
|
|
111
|
+
export const actorPricingSnapshot = z.object({
|
|
112
|
+
quality: z.enum(ACTOR_QUALITIES_KNOWN),
|
|
113
|
+
unit_credits: actorUnitCredits,
|
|
114
|
+
requested_aspects: storedAspects,
|
|
115
|
+
});
|
|
116
|
+
/** Снимок, который допуск создаёт: форматы приёма, портрет обязателен, повторов нет. */
|
|
117
|
+
export const admittedActorPricingSnapshot = actorPricingSnapshot.extend({
|
|
118
|
+
requested_aspects: z
|
|
119
|
+
.array(z.enum(ASPECT_RATIOS))
|
|
120
|
+
.min(1)
|
|
121
|
+
.refine(includesPortrait, { error: `requested_aspects must include ${ACTOR_PORTRAIT_ASPECT}` })
|
|
122
|
+
.refine(hasNoRepeats, { error: "requested_aspects must not repeat a format" }),
|
|
123
|
+
});
|
|
124
|
+
function sameFormats(left, right) {
|
|
125
|
+
const a = new Set(left);
|
|
126
|
+
const b = new Set(right);
|
|
127
|
+
return a.size === b.size && [...a].every((ratio) => b.has(ratio));
|
|
128
|
+
}
|
|
129
|
+
/** Сохранённый вход рана. Качество и форматы обязаны совпасть со снимком: иначе генерация */
|
|
130
|
+
/** разошлась бы со списанием, поэтому такой ран не читается (`run_input_unreadable`, ноль кредитов). */
|
|
131
|
+
export const storedCreateActorInput = z
|
|
132
|
+
.object({
|
|
133
|
+
description: z.string().min(1),
|
|
134
|
+
gender: z.enum(ACTOR_GENDERS_KNOWN),
|
|
135
|
+
approximate_age: z.number().int().min(ACTOR_AGE_FLOOR),
|
|
136
|
+
name: z.string().min(1),
|
|
137
|
+
aspect_ratios: storedAspects,
|
|
138
|
+
quality: z.enum(ACTOR_QUALITIES_KNOWN),
|
|
139
|
+
pricing_snapshot: actorPricingSnapshot,
|
|
140
|
+
})
|
|
141
|
+
.refine((input) => input.quality === input.pricing_snapshot.quality, {
|
|
142
|
+
error: "stored quality differs from pricing_snapshot.quality",
|
|
143
|
+
path: ["quality"],
|
|
144
|
+
})
|
|
145
|
+
.refine((input) => sameFormats(input.aspect_ratios, input.pricing_snapshot.requested_aspects), {
|
|
146
|
+
error: "stored aspect_ratios differ from pricing_snapshot.requested_aspects",
|
|
147
|
+
path: ["aspect_ratios"],
|
|
148
|
+
});
|
|
149
|
+
export const createActorQuote = z.object({
|
|
150
|
+
skill: z.literal("create_actor"),
|
|
151
|
+
credits_estimate: z.number().int().nonnegative(),
|
|
152
|
+
pricing_snapshot: actorPricingSnapshot,
|
|
153
|
+
warnings: z.array(z.string()).default([]),
|
|
154
|
+
contract_version: z.string(),
|
|
155
|
+
});
|
|
156
|
+
/** Актёр, созданный раном, при чтении. Удаление актёра стирает имя и снимает форматы с публикации, */
|
|
157
|
+
/** а `get_run` старого рана обязан отвечать, поэтому пустые имя и форматы читаются. */
|
|
158
|
+
export const createdActor = z.object({
|
|
159
|
+
actor_id: personalActorId,
|
|
160
|
+
name: z.string(),
|
|
161
|
+
gender: z.enum(ACTOR_GENDERS_KNOWN),
|
|
162
|
+
approximate_age: z.number().int().min(ACTOR_AGE_FLOOR),
|
|
163
|
+
version: z.number().int().positive(),
|
|
164
|
+
quality: z.enum(ACTOR_QUALITIES_KNOWN),
|
|
165
|
+
aspect_ratios: z.array(z.enum(ACTOR_ASPECTS_KNOWN)),
|
|
166
|
+
});
|
|
167
|
+
/** Итог, который пишет успешный ран: имя и опубликованные форматы, среди них портрет 9:16. */
|
|
168
|
+
export const producedCreatedActor = createdActor.extend({
|
|
169
|
+
name: z.string().min(1),
|
|
170
|
+
aspect_ratios: storedAspects.refine(includesPortrait, {
|
|
171
|
+
error: `created_actor.aspect_ratios must include ${ACTOR_PORTRAIT_ASPECT}`,
|
|
172
|
+
}),
|
|
173
|
+
});
|
|
174
|
+
export const CREATE_ACTOR_FIELD_DISPOSITIONS = {
|
|
175
|
+
description: { kind: "implemented", provenBy: "egress" },
|
|
176
|
+
gender: { kind: "implemented", provenBy: "egress" },
|
|
177
|
+
approximate_age: { kind: "implemented", provenBy: "egress" },
|
|
178
|
+
name: { kind: "implemented", provenBy: "listing" },
|
|
179
|
+
quality: { kind: "implemented", provenBy: "egress" },
|
|
180
|
+
aspect_ratios: { kind: "implemented", provenBy: "egress" },
|
|
181
|
+
};
|
|
182
|
+
/** Предупреждения допуска — только из реестра; пишутся в `runs.warnings` и не пересчитываются при чтении. */
|
|
183
|
+
export function createActorAdmissionWarnings(input, dispositions = CREATE_ACTOR_FIELD_DISPOSITIONS) {
|
|
184
|
+
return Object.entries(dispositions).flatMap(([field, disposition]) => disposition.kind === "warned" && input[field] !== undefined ? [disposition.warning] : []);
|
|
185
|
+
}
|
|
186
|
+
/** Коды провала рана `create_actor`: у каждого — ноль кредитов. Колонка `error` — `код: текст`. */
|
|
187
|
+
export const CREATE_ACTOR_RUN_ERRORS = {
|
|
188
|
+
actor_portrait_unusable: "the generated portrait did not show exactly one face; no actor was created and nothing was charged",
|
|
189
|
+
actor_prompt_refused: "the description names or resembles a real person, or moderation refused the portrait; describe a fictional adult. " +
|
|
190
|
+
"No actor was created and nothing was charged",
|
|
191
|
+
face_check_unavailable: "the face check is unavailable right now; no actor was created and nothing was charged. Retry later",
|
|
192
|
+
prompt_check_unavailable: "the description check is unavailable right now; no actor was created and nothing was charged. Retry later",
|
|
193
|
+
run_input_unreadable: "the stored run input could not be read; no actor was created and nothing was charged",
|
|
194
|
+
actor_portrait_not_delivered: "the portrait could not be generated or stored; no actor was created and nothing was charged. Retry later",
|
|
195
|
+
actor_generation_disabled: "actor generation is disabled right now; no actor was created and nothing was charged",
|
|
196
|
+
actor_run_interrupted: "the run stopped before it finished; no actor was created and nothing was charged",
|
|
197
|
+
actor_spend_refused: "our spend guard refused the paid call; no actor was created and nothing was charged. Retry later",
|
|
198
|
+
};
|
|
199
|
+
export const CREATE_ACTOR_RUN_ERROR_CODES = Object.keys(CREATE_ACTOR_RUN_ERRORS);
|
|
200
|
+
export function createActorRunError(code) {
|
|
201
|
+
return `${code}: ${CREATE_ACTOR_RUN_ERRORS[code]}`;
|
|
202
|
+
}
|
|
203
|
+
/** Формат `runs.error` для кода с уточнением: код до двоеточия читают алерты. */
|
|
204
|
+
export function createActorRunErrorWith(code, detail) {
|
|
205
|
+
return `${createActorRunError(code)} (${detail})`;
|
|
206
|
+
}
|
|
207
|
+
export const ACTOR_VARIANT_ASPECTS = ASPECT_RATIOS.filter((aspect) => aspect !== ACTOR_PORTRAIT_ASPECT);
|
|
208
|
+
/** Вариант, не созданный по нашей причине: успешный ран несёт эту строку в `warnings`. */
|
|
209
|
+
export function actorVariantWarning(aspect, reason) {
|
|
210
|
+
return `${aspect} was not created: ${reason}; it was not charged`;
|
|
211
|
+
}
|
|
212
|
+
/** Сорванная проверка лица на этапе вариантов: ран УСПЕШЕН, кода провала нет. */
|
|
213
|
+
/** Одно определение на писателя (таск) и счётчик (алерт 10), сравнение — целой строкой. */
|
|
214
|
+
export const ACTOR_VARIANT_FACE_CHECK_REASON = "the face check was unavailable";
|
|
215
|
+
export const ACTOR_VARIANT_FACE_CHECK_WARNINGS = ACTOR_VARIANT_ASPECTS.map((aspect) => actorVariantWarning(aspect, ACTOR_VARIANT_FACE_CHECK_REASON));
|
|
216
|
+
/** Что делает `create_actor` — один текст для публичного каталога скиллов и клиентов. */
|
|
217
|
+
export const CREATE_ACTOR_DESCRIPTION = "Create a personal actor for this account from words describing a fictional adult: a 9:16 portrait with exactly " +
|
|
218
|
+
"one face, plus the other requested formats edited from it. Returns a run_id immediately; poll get_run until " +
|
|
219
|
+
"'succeeded' (created_actor.actor_id, then pass it as actor_id to make_ugc) or 'failed'. Each published image is " +
|
|
220
|
+
"charged at the price quote shows; refused descriptions and unusable portraits cost nothing. When generation is " +
|
|
221
|
+
"switched off the call fails with actor_generation_disabled.";
|
|
222
|
+
//# sourceMappingURL=account-actors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-actors.js","sourceRoot":"","sources":["../src/account-actors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,GAEtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAoB,MAAM,aAAa,CAAC;AAE9D,2GAA2G;A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,CAAC,CAAC,MAAM,EAAE,EAAE,CACvG,mBAAmB,CAAC,MAAM,EAAE,+BAA+B,CAAC,CAC7D,CAAC;AAEF,yFAAyF;AACzF,MAAM,CAAC,MAAM,wBAAwB,GACnC,iHAAiH;IACjH,8GAA8G;IAC9G,kHAAkH;IAClH,iHAAiH;IACjH,6DAA6D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Известное только пополняется и совпадает с CHECK 0031: по нему читаются сохранённые раны и ответы. */
|
|
2
|
+
export declare const ACTOR_GENDERS_KNOWN: readonly ["female", "male"];
|
|
3
|
+
export type ActorGender = (typeof ACTOR_GENDERS_KNOWN)[number];
|
|
4
|
+
export declare const ACTOR_ASPECTS_KNOWN: readonly ["9:16", "1:1", "16:9"];
|
|
5
|
+
export type ActorAspectKnown = (typeof ACTOR_ASPECTS_KNOWN)[number];
|
|
6
|
+
/** Нижняя граница `account_actors_adult`: младше неё не записано ничего. */
|
|
7
|
+
export declare const ACTOR_AGE_FLOOR = 18;
|
|
8
|
+
/** Границы приёма — решение продукта и могут сузиться. Отдельный модуль: тест сужает */
|
|
9
|
+
/** каждую подменой и проверяет, что ни одна схема чтения от них не зависит. */
|
|
10
|
+
export declare const ACTOR_DESCRIPTION_MAX_CHARS = 500;
|
|
11
|
+
export declare const ACTOR_NAME_MAX_CHARS = 100;
|
|
12
|
+
export declare const ACTOR_MIN_AGE = 18;
|
|
13
|
+
export declare const ACTOR_MAX_AGE = 90;
|
|
14
|
+
export declare const ACTOR_GENDERS_ACCEPTED: readonly ["female", "male"];
|