@clipwright/core 0.19.0 → 0.21.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 +55 -0
- package/dist/__fixtures__/queue-promises.d.ts +5 -84
- package/dist/__fixtures__/queue-promises.js +7 -84
- package/dist/__fixtures__/queue-promises.js.map +1 -1
- package/dist/account-actors.d.ts +25 -25
- package/dist/account-actors.js +25 -25
- package/dist/account-actors.js.map +1 -1
- package/dist/account.d.ts +4 -10
- package/dist/account.js +6 -12
- package/dist/account.js.map +1 -1
- package/dist/actor-bounds.d.ts +4 -4
- package/dist/actor-bounds.js +4 -4
- package/dist/actor-bounds.js.map +1 -1
- package/dist/actor-qualities.d.ts +3 -3
- package/dist/actor-qualities.js +3 -3
- package/dist/actor-qualities.js.map +1 -1
- package/dist/actors.d.ts +8 -8
- package/dist/actors.js +9 -9
- package/dist/actors.js.map +1 -1
- package/dist/api-failure.d.ts +28 -129
- package/dist/api-failure.js +52 -225
- package/dist/api-failure.js.map +1 -1
- package/dist/aspect.d.ts +26 -96
- package/dist/aspect.js +32 -108
- package/dist/aspect.js.map +1 -1
- package/dist/contract-dispositions.d.ts +42 -167
- package/dist/contract-dispositions.js +54 -184
- package/dist/contract-dispositions.js.map +1 -1
- package/dist/endpoints.d.ts +5 -5
- package/dist/endpoints.js +5 -3
- package/dist/endpoints.js.map +1 -1
- package/dist/errors.d.ts +33 -101
- package/dist/errors.js +42 -108
- package/dist/errors.js.map +1 -1
- package/dist/faceless-cut-style.d.ts +115 -0
- package/dist/faceless-cut-style.js +109 -0
- package/dist/faceless-cut-style.js.map +1 -0
- package/dist/faceless-image-qualification.d.ts +97 -0
- package/dist/faceless-image-qualification.js +145 -0
- package/dist/faceless-image-qualification.js.map +1 -0
- package/dist/faceless-price.d.ts +21 -0
- package/dist/faceless-price.js +25 -0
- package/dist/faceless-price.js.map +1 -0
- package/dist/faceless-public-plan.d.ts +71 -0
- package/dist/faceless-public-plan.js +166 -0
- package/dist/faceless-public-plan.js.map +1 -0
- package/dist/faceless-public.d.ts +107 -0
- package/dist/faceless-public.js +74 -0
- package/dist/faceless-public.js.map +1 -0
- package/dist/faceless-short-61.d.ts +83 -0
- package/dist/faceless-short-61.js +152 -0
- package/dist/faceless-short-61.js.map +1 -0
- package/dist/faceless-storyboard-timing.d.ts +40 -0
- package/dist/faceless-storyboard-timing.js +97 -0
- package/dist/faceless-storyboard-timing.js.map +1 -0
- package/dist/faceless-storyboard-v2-plan.d.ts +3 -0
- package/dist/faceless-storyboard-v2-plan.js +112 -0
- package/dist/faceless-storyboard-v2-plan.js.map +1 -0
- package/dist/faceless-storyboard-v2-timing.d.ts +63 -0
- package/dist/faceless-storyboard-v2-timing.js +143 -0
- package/dist/faceless-storyboard-v2-timing.js.map +1 -0
- package/dist/faceless-storyboard-v2.d.ts +44 -0
- package/dist/faceless-storyboard-v2.js +43 -0
- package/dist/faceless-storyboard-v2.js.map +1 -0
- package/dist/faceless-storyboard.d.ts +55 -0
- package/dist/faceless-storyboard.js +105 -0
- package/dist/faceless-storyboard.js.map +1 -0
- package/dist/idempotency.d.ts +10 -44
- package/dist/idempotency.js +18 -44
- package/dist/idempotency.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +24 -25
- package/dist/index.js.map +1 -1
- package/dist/long-form-pricing.d.ts +4 -4
- package/dist/long-form-pricing.js +4 -4
- package/dist/long-form-pricing.js.map +1 -1
- package/dist/long-form-profile.d.ts +2 -2
- package/dist/long-form-profile.js +2 -2
- package/dist/long-form-profile.js.map +1 -1
- package/dist/pacing.d.ts +1 -1
- package/dist/pacing.js +1 -1
- package/dist/pacing.js.map +1 -1
- package/dist/public-endpoints.d.ts +9 -11
- package/dist/public-endpoints.js +11 -13
- package/dist/public-endpoints.js.map +1 -1
- package/dist/rate-limit.d.ts +23 -130
- package/dist/rate-limit.js +27 -132
- package/dist/rate-limit.js.map +1 -1
- package/dist/render-backend.d.ts +30 -145
- package/dist/render-backend.js +4 -27
- package/dist/render-backend.js.map +1 -1
- package/dist/run-preflight.d.ts +4 -4
- package/dist/run-preflight.js +10 -10
- package/dist/run-preflight.js.map +1 -1
- package/dist/run-static-warnings.d.ts +8 -8
- package/dist/run-static-warnings.js +26 -24
- package/dist/run-static-warnings.js.map +1 -1
- package/dist/runs.d.ts +34 -55
- package/dist/runs.js +28 -94
- package/dist/runs.js.map +1 -1
- package/dist/script-integrity.d.ts +6 -7
- package/dist/script-integrity.js +7 -8
- package/dist/script-integrity.js.map +1 -1
- package/dist/semantic-inserts.d.ts +4 -4
- package/dist/semantic-inserts.js +6 -6
- package/dist/semantic-inserts.js.map +1 -1
- package/dist/skills.d.ts +37 -108
- package/dist/skills.js +77 -161
- package/dist/skills.js.map +1 -1
- package/dist/tts-backend.d.ts +13 -42
- package/dist/tts-backend.js +2 -10
- package/dist/tts-backend.js.map +1 -1
- package/dist/uploads.d.ts +4 -4
- package/dist/uploads.js +4 -4
- package/dist/uploads.js.map +1 -1
- package/dist/vendor-response.d.ts +17 -80
- package/dist/vendor-response.js +19 -67
- package/dist/vendor-response.js.map +1 -1
- package/dist/voice-admission.d.ts +5 -5
- package/dist/voice-admission.js +6 -6
- package/dist/voice-admission.js.map +1 -1
- package/dist/voice-catalog-data.d.ts +2 -2
- package/dist/voice-catalog-data.js +2 -2
- package/dist/voice-catalog-data.js.map +1 -1
- package/dist/voice-catalog.d.ts +5 -5
- package/dist/voice-catalog.generated.json +56 -54
- package/dist/voice-catalog.js +6 -6
- package/dist/voice-catalog.js.map +1 -1
- package/dist/voice-listing.d.ts +4 -4
- package/dist/voice-listing.js +6 -6
- package/dist/voice-listing.js.map +1 -1
- package/dist/voices.d.ts +40 -82
- package/dist/voices.js +56 -99
- package/dist/voices.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,61 @@ 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.21.0] - 2026-09-27
|
|
20
|
+
|
|
21
|
+
Faceless videos: an agent can now make a video of up to 90 seconds without an on-camera presenter, from a script or
|
|
22
|
+
from a short brief, and see the price before anything is made.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- `quote_faceless` and `make_faceless` MCP tools, `quoteFaceless` and `startFaceless` in the SDK, and the
|
|
27
|
+
`quote-faceless` and `make-faceless` CLI commands. The video is narration over an opening animated clip and image
|
|
28
|
+
scenes, with captions on by default. `duration_seconds` (30 to 90) is a target: the video ends with its narration
|
|
29
|
+
and runs from 25 seconds to 5 seconds past `duration_seconds`, never past 90. `quote_faceless` is free;
|
|
30
|
+
`make_faceless` returns a `run_id`, and `get_run` reports progress. The MCP server now lists fourteen tools.
|
|
31
|
+
|
|
32
|
+
### Server-side
|
|
33
|
+
|
|
34
|
+
- A faceless run is charged for the video it delivers, by its actual length, and never more than its quote: seconds
|
|
35
|
+
past `duration_seconds` are free. A failed
|
|
36
|
+
run is charged nothing, including one we stop ourselves because a step did not meet our checks. A run held for
|
|
37
|
+
review keeps its credit hold until it is resolved.
|
|
38
|
+
- Captions drop surrounding punctuation, keep accents and other diacritics, and show numbers as written (`$3.50`,
|
|
39
|
+
`10:30`, `1,000`, `50%`, `-20`).
|
|
40
|
+
- With captions on, the script is checked against the caption font before speech is generated; a character the font
|
|
41
|
+
cannot draw fails the run without a customer charge.
|
|
42
|
+
- Narration uses automatic language detection.
|
|
43
|
+
- Pictures change about every three seconds, between spoken words.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- *Server-side* Voice catalog: `cs_female_jana` is now listed with use case `advertisement` (was `narrative_story`);
|
|
48
|
+
the notice period is 4015 days for `en_female_cassidy` (was 730) and 730 days for `fi_male_jaakko` (was 365).
|
|
49
|
+
`es_male_benjamin` is unchanged and remains available.
|
|
50
|
+
|
|
51
|
+
### Known limits
|
|
52
|
+
|
|
53
|
+
- The voice reads some abbreviations literally: write "1.5 million" rather than "1.5M".
|
|
54
|
+
- A generated picture can come out as a collage of two or three panels, and small character details (glasses,
|
|
55
|
+
for instance) can change between pictures.
|
|
56
|
+
- Narration is not loudness-normalized yet, so a video can play quieter than other clips in the same feed.
|
|
57
|
+
- *Server-side* A faceless run can fail when the opening clip shows a pattern our text check mistakes for lettering
|
|
58
|
+
(a chain, for instance). The run is charged nothing; running it again produces a new video.
|
|
59
|
+
|
|
60
|
+
## [0.20.0] - 2026-09-25
|
|
61
|
+
|
|
62
|
+
The MCP server is ready for directories: it has a name in the official MCP
|
|
63
|
+
Registry, and every tool tells the host whether it only reads or writes.
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
|
|
67
|
+
- Every MCP tool now carries a `title` and the `readOnlyHint`/`destructiveHint`
|
|
68
|
+
annotations: quotes, lists and reads are read-only, `delete_actor` is
|
|
69
|
+
destructive, and `make_ugc`, `create_actor`, `upload_image` and
|
|
70
|
+
`set_actor_defaults` write.
|
|
71
|
+
- `@clipwright/mcp-server` declares `mcpName: io.clipwright/mcp` for the official
|
|
72
|
+
MCP Registry.
|
|
73
|
+
|
|
19
74
|
## [0.19.0] - 2026-09-22
|
|
20
75
|
|
|
21
76
|
A paid video that arrived after we stopped waiting can now be collected: the run
|
|
@@ -1,87 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* ПРАВИЛО (держится чтением; проверка ниже — лишь регрессионный сторож против
|
|
5
|
-
* уже случавшихся формулировок, см. «что она не гарантирует»). Из 403 известно
|
|
6
|
-
* ровно одно: у аккаунта нет доступа. Тем же ответом
|
|
7
|
-
* отвечает аккаунт, у которого доступ СНЯЛИ (третья поверхность вентиля
|
|
8
|
-
* построена вокруг именно этого случая — `credit-guard.ts`), и обещание скорого
|
|
9
|
-
* приёма было бы для него ложью в самый неподходящий момент. Поэтому ни одна
|
|
10
|
-
* поверхность, объясняющая этот отказ, не называет ни срока, ни номера.
|
|
11
|
-
*
|
|
12
|
-
* ПОЧЕМУ СПИСОК ОДИН НА ВСЕХ. Правило нарушалось ПЯТЬ раз подряд, и каждый раз
|
|
13
|
-
* чинилось по адресу находки: совет агенту, `SKILL.md`, тело ответа, снова
|
|
14
|
-
* совет, публичная дока. Когда сторожей стало двое, список немедленно
|
|
15
|
-
* разошёлся: у одного было `yet`, у другого — русские корни. Два ответа на
|
|
16
|
-
* вопрос «что такое это правило» — тот же дефект, который эта же приёмка дважды
|
|
17
|
-
* признавала блокером (два перечня писателей `admitted_at`, два текста про
|
|
18
|
-
* очередь). Лечение одно и то же: одна копия, остальные ссылаются.
|
|
19
|
-
*
|
|
20
|
-
* ЯЗЫКА ДВА, ПОТОМУ ЧТО КОРПУС ДВУЯЗЫЧНЫЙ. Код и агентские тексты английские,
|
|
21
|
-
* документация и комментарии русские. Пятое вхождение уцелело ровно потому, что
|
|
22
|
-
* сторож знал только английский.
|
|
23
|
-
*
|
|
24
|
-
* КОРНИ, А НЕ СЛОВОФОРМЫ: `волн` ловит «волну» и «волнами», `очеред` —
|
|
25
|
-
* «очередь» и «очереди».
|
|
26
|
-
*
|
|
27
|
-
* ЧТО ЭТА ПРОВЕРКА НЕ ГАРАНТИРУЕТ, И ЭТО ГЛАВНОЕ ПРО НЕЁ.
|
|
28
|
-
*
|
|
29
|
-
* Она НЕ обеспечивает инвариант «не называет срока» — обеспечить смысловой
|
|
30
|
-
* инвариант списком подстрок невозможно в принципе. «access will be granted
|
|
31
|
-
* tomorrow», «доступ появится в пятницу», «soon» пройдут: их в списке нет, и
|
|
32
|
-
* добавить все нельзя — язык не кончается. Обещание, написанное вовсе без имени
|
|
33
|
-
* отказа, тоже пройдёт: якорь его не найдёт.
|
|
34
|
-
*
|
|
35
|
-
* ЧЕГО СПИСОК НЕ ЗНАЕТ, названо поимённо, чтобы следующий автор не полагался на
|
|
36
|
-
* сторожа там, где тот слеп: `soon`, `shortly`, `waitlist`, `invite`, `batch`,
|
|
37
|
-
* «скоро», «в ближайшее время», «лист ожидания», «пригласим», «завтра». Все они
|
|
38
|
-
* пройдут. Добавлять их нельзя: «скоро» и `soon` встречаются в верных текстах
|
|
39
|
-
* повсюду, и сторож станет шумным — а шумного снимают.
|
|
40
|
-
*
|
|
41
|
-
* Что она РЕАЛЬНО делает: не даёт вернуться ШЕСТИ формулировкам, которые в этой
|
|
42
|
-
* стори уже возвращались — по одной на круг приёмки, в шести разных местах.
|
|
43
|
-
* Регрессионный сторож против известного класса, а не доказательство свойства.
|
|
44
|
-
* Само свойство держит чтение: правило и его довод записаны у
|
|
45
|
-
* `accountNotAdmittedError`, и рецензент, читающий текст отказа, проверяет
|
|
46
|
-
* смысл, а не подстроки. Считать иначе — значит второй раз поверить, что
|
|
47
|
-
* зелёный тест равен верному коду.
|
|
48
|
-
*
|
|
49
|
-
* ЧЕМ ЭТА ПРОВЕРКА ПЛАТИТ, названо прямо. Подстрочный поиск не отличает
|
|
50
|
-
* обещание от его отрицания: верная фраза «отказ не ставит аккаунт в очередь»
|
|
51
|
-
* покраснеет. Это осознанный обмен — сторож ошибается ГРОМКО и чинится
|
|
52
|
-
* переписыванием фразы, тогда как сторож, разбирающий отрицания, ошибётся ТИХО
|
|
53
|
-
* и пропустит обещание. Тексты запретов в этом проекте пишутся без запрещаемых
|
|
54
|
-
* слов; так уже сделано в `SKILL.md` и в `docs/03-api.md`.
|
|
55
|
-
*
|
|
56
|
-
* ЛЕЖИТ В `__fixtures__`, а не в публичном экспорте пакета: это тестовый
|
|
57
|
-
* материал, а не часть контракта клиентов.
|
|
58
|
-
*/
|
|
1
|
+
/** One list for every guard, in both corpus languages; stems, not word forms. Substring */
|
|
2
|
+
/** matching also flags negations, which is accepted: the guard fails loudly, not silently. */
|
|
59
3
|
export declare const QUEUE_PROMISES: readonly ["in waves", "in the queue", "next wave", "yet", "волн", "очеред", "пока что", "подожди"];
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
*
|
|
63
|
-
* Скоуп по ИМЕНИ, а не по файлу, проводит границу по смыслу: `CLAUDE.md` вправе
|
|
64
|
-
* описывать приём волнами как операторский процесс, а `docs/03-api.md` §7 —
|
|
65
|
-
* очередь рендеров при превышении потолка. Ни то, ни другое не утверждает
|
|
66
|
-
* ничего про этот 403.
|
|
67
|
-
*
|
|
68
|
-
* НО ИМЯ У ПРЕДМЕТА НЕ ОДНО. Кодовая база называет его четырьмя написаниями:
|
|
69
|
-
* `account_not_admitted` (тело и документы), `accountNotAdmittedBody`
|
|
70
|
-
* (сборка), `NotAdmittedFailure` (вид отказа) и `kind: "not_admitted"` (вердикт
|
|
71
|
-
* на четырёх поверхностях). Сторож, знавший только первое, не видел ЧЕТЫРЕХ
|
|
72
|
-
* файлов, объясняющих тот же отказ, — включая сообщение `issue-token.ts`,
|
|
73
|
-
* которое читает человек. Обе приёмки нашли это независимо, и это та же форма,
|
|
74
|
-
* что «список слов английский, а корпус двуязычный»: скоуп по смыслу остаётся
|
|
75
|
-
* скоупом по написанию, пока опознание однодиалектное.
|
|
76
|
-
*
|
|
77
|
-
* Поэтому сравнение идёт по нормализованному тексту: снимаем `_`, приводим к
|
|
78
|
-
* нижнему регистру, ищем подстроку. Любое БУДУЩЕЕ написание ловится само, без
|
|
79
|
-
* правки сторожа.
|
|
80
|
-
*
|
|
81
|
-
* ЛОЖНЫХ СРАБАТЫВАНИЙ НА СОСЕДЯХ НЕТ, и это проверено, а не предположено:
|
|
82
|
-
* `already_admitted` (вердикт US-602 «у рана уже есть холд») нормализуется в
|
|
83
|
-
* `alreadyadmitted` и подстроки `notadmitted` не содержит.
|
|
84
|
-
*/
|
|
4
|
+
/** The subject in normalized form: `_` removed and lowercased, so every spelling of the */
|
|
5
|
+
/** refusal (`account_not_admitted`, `NotAdmittedFailure`) matches; `already_admitted` does not. */
|
|
85
6
|
export declare const NOT_ADMITTED_ANCHOR = "notadmitted";
|
|
86
|
-
/**
|
|
7
|
+
/** Removes spelling differences: `account_not_admitted` and `NotAdmittedFailure` are one. */
|
|
87
8
|
export declare function normalizeForAnchor(text: string): string;
|
|
@@ -1,61 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* уже случавшихся формулировок, см. «что она не гарантирует»). Из 403 известно
|
|
6
|
-
* ровно одно: у аккаунта нет доступа. Тем же ответом
|
|
7
|
-
* отвечает аккаунт, у которого доступ СНЯЛИ (третья поверхность вентиля
|
|
8
|
-
* построена вокруг именно этого случая — `credit-guard.ts`), и обещание скорого
|
|
9
|
-
* приёма было бы для него ложью в самый неподходящий момент. Поэтому ни одна
|
|
10
|
-
* поверхность, объясняющая этот отказ, не называет ни срока, ни номера.
|
|
11
|
-
*
|
|
12
|
-
* ПОЧЕМУ СПИСОК ОДИН НА ВСЕХ. Правило нарушалось ПЯТЬ раз подряд, и каждый раз
|
|
13
|
-
* чинилось по адресу находки: совет агенту, `SKILL.md`, тело ответа, снова
|
|
14
|
-
* совет, публичная дока. Когда сторожей стало двое, список немедленно
|
|
15
|
-
* разошёлся: у одного было `yet`, у другого — русские корни. Два ответа на
|
|
16
|
-
* вопрос «что такое это правило» — тот же дефект, который эта же приёмка дважды
|
|
17
|
-
* признавала блокером (два перечня писателей `admitted_at`, два текста про
|
|
18
|
-
* очередь). Лечение одно и то же: одна копия, остальные ссылаются.
|
|
19
|
-
*
|
|
20
|
-
* ЯЗЫКА ДВА, ПОТОМУ ЧТО КОРПУС ДВУЯЗЫЧНЫЙ. Код и агентские тексты английские,
|
|
21
|
-
* документация и комментарии русские. Пятое вхождение уцелело ровно потому, что
|
|
22
|
-
* сторож знал только английский.
|
|
23
|
-
*
|
|
24
|
-
* КОРНИ, А НЕ СЛОВОФОРМЫ: `волн` ловит «волну» и «волнами», `очеред` —
|
|
25
|
-
* «очередь» и «очереди».
|
|
26
|
-
*
|
|
27
|
-
* ЧТО ЭТА ПРОВЕРКА НЕ ГАРАНТИРУЕТ, И ЭТО ГЛАВНОЕ ПРО НЕЁ.
|
|
28
|
-
*
|
|
29
|
-
* Она НЕ обеспечивает инвариант «не называет срока» — обеспечить смысловой
|
|
30
|
-
* инвариант списком подстрок невозможно в принципе. «access will be granted
|
|
31
|
-
* tomorrow», «доступ появится в пятницу», «soon» пройдут: их в списке нет, и
|
|
32
|
-
* добавить все нельзя — язык не кончается. Обещание, написанное вовсе без имени
|
|
33
|
-
* отказа, тоже пройдёт: якорь его не найдёт.
|
|
34
|
-
*
|
|
35
|
-
* ЧЕГО СПИСОК НЕ ЗНАЕТ, названо поимённо, чтобы следующий автор не полагался на
|
|
36
|
-
* сторожа там, где тот слеп: `soon`, `shortly`, `waitlist`, `invite`, `batch`,
|
|
37
|
-
* «скоро», «в ближайшее время», «лист ожидания», «пригласим», «завтра». Все они
|
|
38
|
-
* пройдут. Добавлять их нельзя: «скоро» и `soon` встречаются в верных текстах
|
|
39
|
-
* повсюду, и сторож станет шумным — а шумного снимают.
|
|
40
|
-
*
|
|
41
|
-
* Что она РЕАЛЬНО делает: не даёт вернуться ШЕСТИ формулировкам, которые в этой
|
|
42
|
-
* стори уже возвращались — по одной на круг приёмки, в шести разных местах.
|
|
43
|
-
* Регрессионный сторож против известного класса, а не доказательство свойства.
|
|
44
|
-
* Само свойство держит чтение: правило и его довод записаны у
|
|
45
|
-
* `accountNotAdmittedError`, и рецензент, читающий текст отказа, проверяет
|
|
46
|
-
* смысл, а не подстроки. Считать иначе — значит второй раз поверить, что
|
|
47
|
-
* зелёный тест равен верному коду.
|
|
48
|
-
*
|
|
49
|
-
* ЧЕМ ЭТА ПРОВЕРКА ПЛАТИТ, названо прямо. Подстрочный поиск не отличает
|
|
50
|
-
* обещание от его отрицания: верная фраза «отказ не ставит аккаунт в очередь»
|
|
51
|
-
* покраснеет. Это осознанный обмен — сторож ошибается ГРОМКО и чинится
|
|
52
|
-
* переписыванием фразы, тогда как сторож, разбирающий отрицания, ошибётся ТИХО
|
|
53
|
-
* и пропустит обещание. Тексты запретов в этом проекте пишутся без запрещаемых
|
|
54
|
-
* слов; так уже сделано в `SKILL.md` и в `docs/03-api.md`.
|
|
55
|
-
*
|
|
56
|
-
* ЛЕЖИТ В `__fixtures__`, а не в публичном экспорте пакета: это тестовый
|
|
57
|
-
* материал, а не часть контракта клиентов.
|
|
58
|
-
*/
|
|
1
|
+
// Queue promises forbidden on an `account_not_admitted` refusal: a 403 says only that access is
|
|
2
|
+
// missing, possibly revoked. A regression guard against known phrasings, not a proof of the rule.
|
|
3
|
+
/** One list for every guard, in both corpus languages; stems, not word forms. Substring */
|
|
4
|
+
/** matching also flags negations, which is accepted: the guard fails loudly, not silently. */
|
|
59
5
|
export const QUEUE_PROMISES = [
|
|
60
6
|
"in waves",
|
|
61
7
|
"in the queue",
|
|
@@ -66,33 +12,10 @@ export const QUEUE_PROMISES = [
|
|
|
66
12
|
"пока что",
|
|
67
13
|
"подожди",
|
|
68
14
|
];
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
*
|
|
72
|
-
* Скоуп по ИМЕНИ, а не по файлу, проводит границу по смыслу: `CLAUDE.md` вправе
|
|
73
|
-
* описывать приём волнами как операторский процесс, а `docs/03-api.md` §7 —
|
|
74
|
-
* очередь рендеров при превышении потолка. Ни то, ни другое не утверждает
|
|
75
|
-
* ничего про этот 403.
|
|
76
|
-
*
|
|
77
|
-
* НО ИМЯ У ПРЕДМЕТА НЕ ОДНО. Кодовая база называет его четырьмя написаниями:
|
|
78
|
-
* `account_not_admitted` (тело и документы), `accountNotAdmittedBody`
|
|
79
|
-
* (сборка), `NotAdmittedFailure` (вид отказа) и `kind: "not_admitted"` (вердикт
|
|
80
|
-
* на четырёх поверхностях). Сторож, знавший только первое, не видел ЧЕТЫРЕХ
|
|
81
|
-
* файлов, объясняющих тот же отказ, — включая сообщение `issue-token.ts`,
|
|
82
|
-
* которое читает человек. Обе приёмки нашли это независимо, и это та же форма,
|
|
83
|
-
* что «список слов английский, а корпус двуязычный»: скоуп по смыслу остаётся
|
|
84
|
-
* скоупом по написанию, пока опознание однодиалектное.
|
|
85
|
-
*
|
|
86
|
-
* Поэтому сравнение идёт по нормализованному тексту: снимаем `_`, приводим к
|
|
87
|
-
* нижнему регистру, ищем подстроку. Любое БУДУЩЕЕ написание ловится само, без
|
|
88
|
-
* правки сторожа.
|
|
89
|
-
*
|
|
90
|
-
* ЛОЖНЫХ СРАБАТЫВАНИЙ НА СОСЕДЯХ НЕТ, и это проверено, а не предположено:
|
|
91
|
-
* `already_admitted` (вердикт US-602 «у рана уже есть холд») нормализуется в
|
|
92
|
-
* `alreadyadmitted` и подстроки `notadmitted` не содержит.
|
|
93
|
-
*/
|
|
15
|
+
/** The subject in normalized form: `_` removed and lowercased, so every spelling of the */
|
|
16
|
+
/** refusal (`account_not_admitted`, `NotAdmittedFailure`) matches; `already_admitted` does not. */
|
|
94
17
|
export const NOT_ADMITTED_ANCHOR = "notadmitted";
|
|
95
|
-
/**
|
|
18
|
+
/** Removes spelling differences: `account_not_admitted` and `NotAdmittedFailure` are one. */
|
|
96
19
|
export function normalizeForAnchor(text) {
|
|
97
20
|
return text.replaceAll("_", "").toLowerCase();
|
|
98
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-promises.js","sourceRoot":"","sources":["../../src/__fixtures__/queue-promises.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"queue-promises.js","sourceRoot":"","sources":["../../src/__fixtures__/queue-promises.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,kGAAkG;AAElG,2FAA2F;AAC3F,8FAA8F;AAC9F,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,UAAU;IACV,cAAc;IACd,WAAW;IACX,KAAK;IACL,MAAM;IACN,QAAQ;IACR,UAAU;IACV,SAAS;CACD,CAAC;AAEX,2FAA2F;AAC3F,mGAAmG;AACnG,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAEjD,6FAA6F;AAC7F,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAChD,CAAC"}
|
package/dist/account-actors.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type ActorQuality } from "./actor-qualities.js";
|
|
3
3
|
import { type AspectRatio } from "./skills.js";
|
|
4
|
-
/**
|
|
4
|
+
/** Personal actors of an account. */
|
|
5
5
|
export { ACTOR_DEFAULT_QUALITY, ACTOR_QUALITIES_ACCEPTED, ACTOR_QUALITIES_KNOWN } from "./actor-qualities.js";
|
|
6
6
|
export type { ActorQuality, ActorQualityAccepted } from "./actor-qualities.js";
|
|
7
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
8
|
export type { ActorAspectKnown, ActorGender } from "./actor-bounds.js";
|
|
9
9
|
export declare const PERSONAL_ACTOR_ID_PREFIX = "actor_u_";
|
|
10
|
-
/** `actor_u_`
|
|
10
|
+
/** `actor_u_` plus 26 base32 characters (RFC 4648, lowercase): 128 random bits. */
|
|
11
11
|
export declare const personalActorId: z.ZodString;
|
|
12
12
|
export declare const ACTOR_SCOPES: readonly ["clipwright", "account"];
|
|
13
13
|
export type ActorScope = (typeof ACTOR_SCOPES)[number];
|
|
14
|
-
/**
|
|
14
|
+
/** Whose actor, by id shape. The Clipwright catalog never uses the `actor_u_` prefix; a test checks it. */
|
|
15
15
|
export declare function actorIdScope(actorId: string): ActorScope;
|
|
16
|
-
/**
|
|
16
|
+
/** Randomness comes from outside: core does not depend on the runtime's crypto. */
|
|
17
17
|
export declare function newPersonalActorId(random: Uint8Array): string;
|
|
18
|
-
/**
|
|
18
|
+
/** The portrait is always 9:16; the other formats are edited from it. */
|
|
19
19
|
export declare const ACTOR_PORTRAIT_ASPECT: "9:16";
|
|
20
|
-
/**
|
|
20
|
+
/** Compact generation sizes, measured. */
|
|
21
21
|
export declare const ACTOR_SIZE_SET: {
|
|
22
22
|
readonly "9:16": {
|
|
23
23
|
readonly width: 1024;
|
|
@@ -33,7 +33,7 @@ export declare const ACTOR_SIZE_SET: {
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
type AcceptedQualities = readonly [ActorQuality, ...ActorQuality[]];
|
|
36
|
-
/**
|
|
36
|
+
/** The input for a given set of accepted qualities. */
|
|
37
37
|
export declare function createActorInputWith<const Q extends AcceptedQualities>(accepted: Q, defaultQuality: Q[number]): z.ZodObject<{
|
|
38
38
|
description: z.ZodString;
|
|
39
39
|
gender: z.ZodEnum<{
|
|
@@ -68,10 +68,10 @@ export declare const createActorInput: z.ZodObject<{
|
|
|
68
68
|
}>>;
|
|
69
69
|
}, z.core.$strict>;
|
|
70
70
|
export type CreateActorInput = z.infer<typeof createActorInput>;
|
|
71
|
-
/**
|
|
72
|
-
/**
|
|
71
|
+
/** The input BEFORE defaults, as the caller writes it: `quality` and `aspect_ratios` are optional, */
|
|
72
|
+
/** as with `MakeUgcInputArgs`, so callers are not forced to fill defaulted fields. */
|
|
73
73
|
export type CreateActorInputArgs = z.input<typeof createActorInput>;
|
|
74
|
-
/**
|
|
74
|
+
/** Flat shape for MCP: the tool publishes the same schema the server checks. */
|
|
75
75
|
export declare const createActorInputShape: {
|
|
76
76
|
description: z.ZodString;
|
|
77
77
|
gender: z.ZodEnum<{
|
|
@@ -94,7 +94,7 @@ export declare const actorUnitCredits: z.ZodObject<{
|
|
|
94
94
|
portrait: z.ZodNumber;
|
|
95
95
|
variant: z.ZodNumber;
|
|
96
96
|
}, z.core.$strip>;
|
|
97
|
-
/**
|
|
97
|
+
/** Unit prices and requested formats fixed at admission; settlement uses these, not the price table. */
|
|
98
98
|
export declare const actorPricingSnapshot: z.ZodObject<{
|
|
99
99
|
quality: z.ZodEnum<{
|
|
100
100
|
high: "high";
|
|
@@ -111,7 +111,7 @@ export declare const actorPricingSnapshot: z.ZodObject<{
|
|
|
111
111
|
}>>;
|
|
112
112
|
}, z.core.$strip>;
|
|
113
113
|
export type ActorPricingSnapshot = z.infer<typeof actorPricingSnapshot>;
|
|
114
|
-
/**
|
|
114
|
+
/** The snapshot admission creates: accepted formats, portrait required, no repeats. */
|
|
115
115
|
export declare const admittedActorPricingSnapshot: z.ZodObject<{
|
|
116
116
|
quality: z.ZodEnum<{
|
|
117
117
|
high: "high";
|
|
@@ -127,8 +127,8 @@ export declare const admittedActorPricingSnapshot: z.ZodObject<{
|
|
|
127
127
|
"9:16": "9:16";
|
|
128
128
|
}>>;
|
|
129
129
|
}, z.core.$strip>;
|
|
130
|
-
/**
|
|
131
|
-
/**
|
|
130
|
+
/** A stored run input. Quality and formats must match the snapshot, or generation would diverge */
|
|
131
|
+
/** from the charge, so such a run does not read (`run_input_unreadable`, zero credits). */
|
|
132
132
|
export declare const storedCreateActorInput: z.ZodObject<{
|
|
133
133
|
description: z.ZodString;
|
|
134
134
|
gender: z.ZodEnum<{
|
|
@@ -185,8 +185,8 @@ export declare const createActorQuote: z.ZodObject<{
|
|
|
185
185
|
contract_version: z.ZodString;
|
|
186
186
|
}, z.core.$strip>;
|
|
187
187
|
export type CreateActorQuote = z.infer<typeof createActorQuote>;
|
|
188
|
-
/**
|
|
189
|
-
/**
|
|
188
|
+
/** The actor a run created, as read. Deleting an actor erases the name and unpublishes formats, */
|
|
189
|
+
/** yet `get_run` on an old run must answer, so an empty name and formats read. */
|
|
190
190
|
export declare const createdActor: z.ZodObject<{
|
|
191
191
|
actor_id: z.ZodString;
|
|
192
192
|
name: z.ZodString;
|
|
@@ -207,7 +207,7 @@ export declare const createdActor: z.ZodObject<{
|
|
|
207
207
|
}>>;
|
|
208
208
|
}, z.core.$strip>;
|
|
209
209
|
export type CreatedActor = z.infer<typeof createdActor>;
|
|
210
|
-
/**
|
|
210
|
+
/** The result a successful run writes: a name and published formats, the 9:16 portrait among them. */
|
|
211
211
|
export declare const producedCreatedActor: z.ZodObject<{
|
|
212
212
|
actor_id: z.ZodString;
|
|
213
213
|
gender: z.ZodEnum<{
|
|
@@ -227,7 +227,7 @@ export declare const producedCreatedActor: z.ZodObject<{
|
|
|
227
227
|
"9:16": "9:16";
|
|
228
228
|
}>>;
|
|
229
229
|
}, z.core.$strip>;
|
|
230
|
-
/**
|
|
230
|
+
/** Decision for a `create_actor` input field; kinds mean what they do in the `make_ugc` registry. */
|
|
231
231
|
export type CreateActorDisposition = {
|
|
232
232
|
kind: "implemented";
|
|
233
233
|
provenBy: "egress" | "listing";
|
|
@@ -262,9 +262,9 @@ export declare const CREATE_ACTOR_FIELD_DISPOSITIONS: {
|
|
|
262
262
|
readonly provenBy: "egress";
|
|
263
263
|
};
|
|
264
264
|
};
|
|
265
|
-
/**
|
|
265
|
+
/** Admission warnings come only from the registry; written to `runs.warnings`, not recomputed on read. */
|
|
266
266
|
export declare function createActorAdmissionWarnings(input: Readonly<Record<string, unknown>>, dispositions?: Readonly<Record<string, CreateActorDisposition>>): string[];
|
|
267
|
-
/**
|
|
267
|
+
/** `create_actor` run failure codes, each charging zero credits. The `error` column reads `code: text`. */
|
|
268
268
|
export declare const CREATE_ACTOR_RUN_ERRORS: {
|
|
269
269
|
readonly actor_portrait_unusable: "the generated portrait did not show exactly one face; no actor was created and nothing was charged";
|
|
270
270
|
readonly actor_prompt_refused: string;
|
|
@@ -279,14 +279,14 @@ export declare const CREATE_ACTOR_RUN_ERRORS: {
|
|
|
279
279
|
export type CreateActorRunErrorCode = keyof typeof CREATE_ACTOR_RUN_ERRORS;
|
|
280
280
|
export declare const CREATE_ACTOR_RUN_ERROR_CODES: CreateActorRunErrorCode[];
|
|
281
281
|
export declare function createActorRunError(code: CreateActorRunErrorCode): string;
|
|
282
|
-
/**
|
|
282
|
+
/** The `runs.error` format for a code with a detail: alerts read the code up to the colon. */
|
|
283
283
|
export declare function createActorRunErrorWith(code: CreateActorRunErrorCode, detail: string): string;
|
|
284
284
|
export declare const ACTOR_VARIANT_ASPECTS: ("16:9" | "1:1")[];
|
|
285
|
-
/**
|
|
285
|
+
/** A variant not created for a reason of ours: the successful run carries this line in `warnings`. */
|
|
286
286
|
export declare function actorVariantWarning(aspect: AspectRatio, reason: string): string;
|
|
287
|
-
/**
|
|
288
|
-
/**
|
|
287
|
+
/** A face check that failed at the variant stage: the run SUCCEEDS, with no failure code. One */
|
|
288
|
+
/** definition for the writer (task) and the counter (alert), compared as whole lines. */
|
|
289
289
|
export declare const ACTOR_VARIANT_FACE_CHECK_REASON = "the face check was unavailable";
|
|
290
290
|
export declare const ACTOR_VARIANT_FACE_CHECK_WARNINGS: readonly string[];
|
|
291
|
-
/**
|
|
291
|
+
/** What `create_actor` does: one text for the public skill catalog and clients. */
|
|
292
292
|
export declare const CREATE_ACTOR_DESCRIPTION: string;
|
package/dist/account-actors.js
CHANGED
|
@@ -2,20 +2,20 @@ import { z } from "zod";
|
|
|
2
2
|
import { ACTOR_DEFAULT_QUALITY, ACTOR_QUALITIES_ACCEPTED, ACTOR_QUALITIES_KNOWN, } from "./actor-qualities.js";
|
|
3
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
4
|
import { ASPECT_RATIOS } from "./skills.js";
|
|
5
|
-
/**
|
|
5
|
+
/** Personal actors of an account. */
|
|
6
6
|
export { ACTOR_DEFAULT_QUALITY, ACTOR_QUALITIES_ACCEPTED, ACTOR_QUALITIES_KNOWN } from "./actor-qualities.js";
|
|
7
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
8
|
export const PERSONAL_ACTOR_ID_PREFIX = "actor_u_";
|
|
9
9
|
const PERSONAL_ACTOR_ID_BYTES = 16;
|
|
10
10
|
const BASE32_ALPHABET = "abcdefghijklmnopqrstuvwxyz234567";
|
|
11
|
-
/** `actor_u_`
|
|
11
|
+
/** `actor_u_` plus 26 base32 characters (RFC 4648, lowercase): 128 random bits. */
|
|
12
12
|
export const personalActorId = z.string().regex(/^actor_u_[a-z2-7]{26}$/);
|
|
13
13
|
export const ACTOR_SCOPES = ["clipwright", "account"];
|
|
14
|
-
/**
|
|
14
|
+
/** Whose actor, by id shape. The Clipwright catalog never uses the `actor_u_` prefix; a test checks it. */
|
|
15
15
|
export function actorIdScope(actorId) {
|
|
16
16
|
return personalActorId.safeParse(actorId).success ? "account" : "clipwright";
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
18
|
+
/** Randomness comes from outside: core does not depend on the runtime's crypto. */
|
|
19
19
|
export function newPersonalActorId(random) {
|
|
20
20
|
if (random.length !== PERSONAL_ACTOR_ID_BYTES) {
|
|
21
21
|
throw new Error(`personal actor id needs ${PERSONAL_ACTOR_ID_BYTES} random bytes, got ${random.length}`);
|
|
@@ -36,9 +36,9 @@ export function newPersonalActorId(random) {
|
|
|
36
36
|
encoded += BASE32_ALPHABET.charAt((buffer << (5 - bits)) & 31);
|
|
37
37
|
return PERSONAL_ACTOR_ID_PREFIX + encoded;
|
|
38
38
|
}
|
|
39
|
-
/**
|
|
39
|
+
/** The portrait is always 9:16; the other formats are edited from it. */
|
|
40
40
|
export const ACTOR_PORTRAIT_ASPECT = "9:16";
|
|
41
|
-
/**
|
|
41
|
+
/** Compact generation sizes, measured. */
|
|
42
42
|
export const ACTOR_SIZE_SET = {
|
|
43
43
|
"9:16": { width: 1024, height: 1824 },
|
|
44
44
|
"1:1": { width: 1024, height: 1024 },
|
|
@@ -46,7 +46,7 @@ export const ACTOR_SIZE_SET = {
|
|
|
46
46
|
};
|
|
47
47
|
const includesPortrait = (ratios) => ratios.includes(ACTOR_PORTRAIT_ASPECT);
|
|
48
48
|
const hasNoRepeats = (ratios) => new Set(ratios).size === ratios.length;
|
|
49
|
-
/**
|
|
49
|
+
/** Strict input fields without quality. Bounds come from actor-bounds.ts; read schemas do not use them. */
|
|
50
50
|
const actorFieldShape = {
|
|
51
51
|
description: z
|
|
52
52
|
.string()
|
|
@@ -82,7 +82,7 @@ function unknownFieldsRefusal(keys) {
|
|
|
82
82
|
}
|
|
83
83
|
return `unknown field(s) ${keys.join(", ")}: create_actor accepts description, gender, approximate_age, name, quality, aspect_ratios`;
|
|
84
84
|
}
|
|
85
|
-
/**
|
|
85
|
+
/** The input for a given set of accepted qualities. */
|
|
86
86
|
export function createActorInputWith(accepted, defaultQuality) {
|
|
87
87
|
return z.strictObject({
|
|
88
88
|
...actorFieldShape,
|
|
@@ -98,22 +98,22 @@ export function createActorInputWith(accepted, defaultQuality) {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
export const createActorInput = createActorInputWith(ACTOR_QUALITIES_ACCEPTED, ACTOR_DEFAULT_QUALITY);
|
|
101
|
-
/**
|
|
101
|
+
/** Flat shape for MCP: the tool publishes the same schema the server checks. */
|
|
102
102
|
export const createActorInputShape = createActorInput.shape;
|
|
103
103
|
export const actorUnitCredits = z.object({
|
|
104
104
|
portrait: z.number().int().positive(),
|
|
105
105
|
variant: z.number().int().positive(),
|
|
106
106
|
});
|
|
107
|
-
/**
|
|
108
|
-
/**
|
|
107
|
+
/** Read schemas depend only on what could have been written: the known sets and the DB check. */
|
|
108
|
+
/** Intake bounds stay out, so narrowing intake never breaks old runs. */
|
|
109
109
|
const storedAspects = z.array(z.enum(ACTOR_ASPECTS_KNOWN)).min(1);
|
|
110
|
-
/**
|
|
110
|
+
/** Unit prices and requested formats fixed at admission; settlement uses these, not the price table. */
|
|
111
111
|
export const actorPricingSnapshot = z.object({
|
|
112
112
|
quality: z.enum(ACTOR_QUALITIES_KNOWN),
|
|
113
113
|
unit_credits: actorUnitCredits,
|
|
114
114
|
requested_aspects: storedAspects,
|
|
115
115
|
});
|
|
116
|
-
/**
|
|
116
|
+
/** The snapshot admission creates: accepted formats, portrait required, no repeats. */
|
|
117
117
|
export const admittedActorPricingSnapshot = actorPricingSnapshot.extend({
|
|
118
118
|
requested_aspects: z
|
|
119
119
|
.array(z.enum(ASPECT_RATIOS))
|
|
@@ -126,8 +126,8 @@ function sameFormats(left, right) {
|
|
|
126
126
|
const b = new Set(right);
|
|
127
127
|
return a.size === b.size && [...a].every((ratio) => b.has(ratio));
|
|
128
128
|
}
|
|
129
|
-
/**
|
|
130
|
-
/**
|
|
129
|
+
/** A stored run input. Quality and formats must match the snapshot, or generation would diverge */
|
|
130
|
+
/** from the charge, so such a run does not read (`run_input_unreadable`, zero credits). */
|
|
131
131
|
export const storedCreateActorInput = z
|
|
132
132
|
.object({
|
|
133
133
|
description: z.string().min(1),
|
|
@@ -153,8 +153,8 @@ export const createActorQuote = z.object({
|
|
|
153
153
|
warnings: z.array(z.string()).default([]),
|
|
154
154
|
contract_version: z.string(),
|
|
155
155
|
});
|
|
156
|
-
/**
|
|
157
|
-
/**
|
|
156
|
+
/** The actor a run created, as read. Deleting an actor erases the name and unpublishes formats, */
|
|
157
|
+
/** yet `get_run` on an old run must answer, so an empty name and formats read. */
|
|
158
158
|
export const createdActor = z.object({
|
|
159
159
|
actor_id: personalActorId,
|
|
160
160
|
name: z.string(),
|
|
@@ -164,7 +164,7 @@ export const createdActor = z.object({
|
|
|
164
164
|
quality: z.enum(ACTOR_QUALITIES_KNOWN),
|
|
165
165
|
aspect_ratios: z.array(z.enum(ACTOR_ASPECTS_KNOWN)),
|
|
166
166
|
});
|
|
167
|
-
/**
|
|
167
|
+
/** The result a successful run writes: a name and published formats, the 9:16 portrait among them. */
|
|
168
168
|
export const producedCreatedActor = createdActor.extend({
|
|
169
169
|
name: z.string().min(1),
|
|
170
170
|
aspect_ratios: storedAspects.refine(includesPortrait, {
|
|
@@ -179,11 +179,11 @@ export const CREATE_ACTOR_FIELD_DISPOSITIONS = {
|
|
|
179
179
|
quality: { kind: "implemented", provenBy: "egress" },
|
|
180
180
|
aspect_ratios: { kind: "implemented", provenBy: "egress" },
|
|
181
181
|
};
|
|
182
|
-
/**
|
|
182
|
+
/** Admission warnings come only from the registry; written to `runs.warnings`, not recomputed on read. */
|
|
183
183
|
export function createActorAdmissionWarnings(input, dispositions = CREATE_ACTOR_FIELD_DISPOSITIONS) {
|
|
184
184
|
return Object.entries(dispositions).flatMap(([field, disposition]) => disposition.kind === "warned" && input[field] !== undefined ? [disposition.warning] : []);
|
|
185
185
|
}
|
|
186
|
-
/**
|
|
186
|
+
/** `create_actor` run failure codes, each charging zero credits. The `error` column reads `code: text`. */
|
|
187
187
|
export const CREATE_ACTOR_RUN_ERRORS = {
|
|
188
188
|
actor_portrait_unusable: "the generated portrait did not show exactly one face; no actor was created and nothing was charged",
|
|
189
189
|
actor_prompt_refused: "the description names or resembles a real person, or moderation refused the portrait; describe a fictional adult. " +
|
|
@@ -200,20 +200,20 @@ export const CREATE_ACTOR_RUN_ERROR_CODES = Object.keys(CREATE_ACTOR_RUN_ERRORS)
|
|
|
200
200
|
export function createActorRunError(code) {
|
|
201
201
|
return `${code}: ${CREATE_ACTOR_RUN_ERRORS[code]}`;
|
|
202
202
|
}
|
|
203
|
-
/**
|
|
203
|
+
/** The `runs.error` format for a code with a detail: alerts read the code up to the colon. */
|
|
204
204
|
export function createActorRunErrorWith(code, detail) {
|
|
205
205
|
return `${createActorRunError(code)} (${detail})`;
|
|
206
206
|
}
|
|
207
207
|
export const ACTOR_VARIANT_ASPECTS = ASPECT_RATIOS.filter((aspect) => aspect !== ACTOR_PORTRAIT_ASPECT);
|
|
208
|
-
/**
|
|
208
|
+
/** A variant not created for a reason of ours: the successful run carries this line in `warnings`. */
|
|
209
209
|
export function actorVariantWarning(aspect, reason) {
|
|
210
210
|
return `${aspect} was not created: ${reason}; it was not charged`;
|
|
211
211
|
}
|
|
212
|
-
/**
|
|
213
|
-
/**
|
|
212
|
+
/** A face check that failed at the variant stage: the run SUCCEEDS, with no failure code. One */
|
|
213
|
+
/** definition for the writer (task) and the counter (alert), compared as whole lines. */
|
|
214
214
|
export const ACTOR_VARIANT_FACE_CHECK_REASON = "the face check was unavailable";
|
|
215
215
|
export const ACTOR_VARIANT_FACE_CHECK_WARNINGS = ACTOR_VARIANT_ASPECTS.map((aspect) => actorVariantWarning(aspect, ACTOR_VARIANT_FACE_CHECK_REASON));
|
|
216
|
-
/**
|
|
216
|
+
/** What `create_actor` does: one text for the public skill catalog and clients. */
|
|
217
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
218
|
"one face, plus the other requested formats edited from it. Returns a run_id immediately; poll get_run until " +
|
|
219
219
|
"'succeeded' (created_actor.actor_id, then pass it as actor_id to make_ugc) or 'failed'. Each published image is " +
|