@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/dist/errors.d.ts
CHANGED
|
@@ -1,29 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* До US-602 каждая ошибка API собиралась объектным литералом прямо в
|
|
6
|
-
* `apps/api/src/app.ts`, и это сходило с рук ровно потому, что все они несли
|
|
7
|
-
* одну и ту же пару `code`/`message`: разъехаться было нечему. С деньгами это
|
|
8
|
-
* перестаёт быть правдой — отказ 402 несёт ЧИСЛА, и агент по ним принимает
|
|
9
|
-
* решение (пополнить и повторить либо остановиться). Литерал в обработчике,
|
|
10
|
-
* потерявший `balance_credits`, оставил бы агента с сообщением «не хватило
|
|
11
|
-
* кредитов» без единой цифры, и обнаружилось бы это у клиента.
|
|
12
|
-
*
|
|
13
|
-
* Поэтому форма живёт здесь (правило проекта №2), а обработчик обязан пройти
|
|
14
|
-
* через `.parse()`: тело, собранное мимо схемы, не соберётся вовсе.
|
|
15
|
-
*
|
|
16
|
-
* ЧИСЛА ЛЕЖАТ ВНУТРИ `error`, А НЕ РЯДОМ С НИМ. Прецедент задан отказом по
|
|
17
|
-
* отклонённым полям (`error.fields`) и держится одним доводом: у ответа
|
|
18
|
-
* ошибки один конверт, и всё, что объясняет отказ, лежит в нём. Разложи числа
|
|
19
|
-
* по верхнему уровню — и клиенту придётся знать, для каких кодов смотреть в
|
|
20
|
-
* конверт, а для каких мимо него.
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* Общий конверт ошибки. Толерантен к дополнительным полям внутри `error`:
|
|
24
|
-
* типизированные отказы ниже — его расширения, и общий разбор не должен
|
|
25
|
-
* ломаться от того, что конкретный код принёс с собой числа.
|
|
26
|
-
*/
|
|
2
|
+
/** The generic error envelope. Tolerates extra fields inside `error`: the typed refusals */
|
|
3
|
+
/** below extend it, and generic parsing must not break when a code brings numbers. */
|
|
27
4
|
export declare const apiError: z.ZodObject<{
|
|
28
5
|
error: z.ZodObject<{
|
|
29
6
|
code: z.ZodString;
|
|
@@ -31,7 +8,7 @@ export declare const apiError: z.ZodObject<{
|
|
|
31
8
|
}, z.core.$strip>;
|
|
32
9
|
}, z.core.$strip>;
|
|
33
10
|
export type ApiError = z.infer<typeof apiError>;
|
|
34
|
-
/**
|
|
11
|
+
/** Fewer credits on the balance than the run weighs: "top up". */
|
|
35
12
|
export declare const insufficientCreditsError: z.ZodObject<{
|
|
36
13
|
error: z.ZodObject<{
|
|
37
14
|
code: z.ZodLiteral<"insufficient_credits">;
|
|
@@ -41,21 +18,8 @@ export declare const insufficientCreditsError: z.ZodObject<{
|
|
|
41
18
|
}, z.core.$strip>;
|
|
42
19
|
}, z.core.$strip>;
|
|
43
20
|
export type InsufficientCreditsError = z.infer<typeof insufficientCreditsError>;
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
*
|
|
47
|
-
* ОТДЕЛЬНЫЙ КОД, А НЕ ОТТЕНОК ПРЕДЫДУЩЕГО, и довод у этого ровно один: у счёта
|
|
48
|
-
* с долгом деньги на балансе БЫВАЮТ. Такое состояние оставляет `topUpHold`
|
|
49
|
-
* (ветка `deferred_to_debt`) — он наращивает долг, не трогая баланс; два других
|
|
50
|
-
* производителя долга обнуляют баланс, заводя его. Ответ «недостаточно
|
|
51
|
-
* кредитов» сказал бы такому счёту заведомую неправду.
|
|
52
|
-
*
|
|
53
|
-
* ⚠️ ВТОРАЯ ПОЛОВИНА ПРЕЖНЕГО ДОВОДА — «агента отправило бы покупать кредиты,
|
|
54
|
-
* которые не снимут блокировку» — СНЯТА КАК ЛОЖНАЯ (clipwright#27): кредиты
|
|
55
|
-
* снимают. Вывод пережил свою причину, и это стоит сказать прямо: оставь я
|
|
56
|
-
* старую формулировку, следующий читатель либо слил бы два кода, увидев, что
|
|
57
|
-
* лечение одно, либо заново вывел бы из неё неверный совет клиенту.
|
|
58
|
-
*/
|
|
21
|
+
/** The account carries an unpaid debt. A separate code because an indebted account may */
|
|
22
|
+
/** still hold a balance, so "insufficient credits" would be false. Buying credits clears it. */
|
|
59
23
|
export declare const debtOutstandingError: z.ZodObject<{
|
|
60
24
|
error: z.ZodObject<{
|
|
61
25
|
code: z.ZodLiteral<"debt_outstanding">;
|
|
@@ -64,34 +28,8 @@ export declare const debtOutstandingError: z.ZodObject<{
|
|
|
64
28
|
}, z.core.$strip>;
|
|
65
29
|
}, z.core.$strip>;
|
|
66
30
|
export type DebtOutstandingError = z.infer<typeof debtOutstandingError>;
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
* владелец, и деньги на это не влияют.
|
|
70
|
-
*
|
|
71
|
-
* Отдельный код по тому же доводу, что отделил долг от нехватки: у
|
|
72
|
-
* недопущенного аккаунта деньги на балансе БЫВАЮТ, и оба денежных ответа
|
|
73
|
-
* отправили бы его агента совершать действия, которые блокировку не снимут.
|
|
74
|
-
* Отказ терминальный: повтор того же запроса даст то же самое, пока владелец не
|
|
75
|
-
* допустит аккаунт командой `admit`.
|
|
76
|
-
*
|
|
77
|
-
* ЧИСЕЛ В ТЕЛЕ НЕТ, И ЭТО НЕ ЭКОНОМИЯ. Порядковый номер мы не считаем: доступ
|
|
78
|
-
* даётся решением человека, а не по счётчику, и назвать номер значило бы
|
|
79
|
-
* обещать срок, которого никто не давал.
|
|
80
|
-
*
|
|
81
|
-
* ПО ТОЙ ЖЕ ПРИЧИНЕ ТЕЛО НЕ НАЗЫВАЕТ НИ СРОКА, НИ НОМЕРА, НИ БЛИЗОСТИ РАЗВЯЗКИ.
|
|
82
|
-
* Из отказа известно ровно одно: доступа нет. Так же отвечает аккаунт, у
|
|
83
|
-
* которого доступ СНЯЛИ, — и обещание скорого приёма было бы для него ложью в
|
|
84
|
-
* самый неподходящий момент. Правило принималось трижды и трижды чинилось по адресу
|
|
85
|
-
* находки: сперва в совете агенту (`api-failure.ts`), потом в `SKILL.md`, и
|
|
86
|
-
* только тогда — ЗДЕСЬ, в единственном месте, которое порождает эту строку для
|
|
87
|
-
* всех остальных. Проверка стоит на этой функции, а не на её производных.
|
|
88
|
-
*
|
|
89
|
-
* ПРАВИЛО РАСПРОСТРАНЯЕТСЯ НА ЛЮБУЮ ПОВЕРХНОСТЬ, объясняющую этот отказ, а не
|
|
90
|
-
* только на те, что существуют сегодня. Ближайшие будущие — страница ключей
|
|
91
|
-
* (US-608) и лендинг US-614; там соблазн назвать срок сильнее всего. Сторож
|
|
92
|
-
* (`scripts/docs-consistency.test.ts`) их уже обходит, но HTML он читает как
|
|
93
|
-
* текст и поймает только то, что стоит рядом с именем кода.
|
|
94
|
-
*/
|
|
31
|
+
/** Account not admitted to the beta; money does not change that, so it has its own code. */
|
|
32
|
+
/** Terminal; the body names no timeline, since a revoked account answers the same way. */
|
|
95
33
|
export declare const accountNotAdmittedError: z.ZodObject<{
|
|
96
34
|
error: z.ZodObject<{
|
|
97
35
|
code: z.ZodLiteral<"account_not_admitted">;
|
|
@@ -99,23 +37,18 @@ export declare const accountNotAdmittedError: z.ZodObject<{
|
|
|
99
37
|
}, z.core.$strip>;
|
|
100
38
|
}, z.core.$strip>;
|
|
101
39
|
export type AccountNotAdmittedError = z.infer<typeof accountNotAdmittedError>;
|
|
102
|
-
/**
|
|
103
|
-
|
|
104
|
-
*
|
|
105
|
-
* Формулировка живёт ЗДЕСЬ, а не в обработчике, по той же причине, что и
|
|
106
|
-
* форма: два места, отвечающие 402 (сегодня — создание рана, завтра — любой
|
|
107
|
-
* другой платный вызов), обязаны объяснять отказ одинаково.
|
|
108
|
-
*/
|
|
40
|
+
/** Builds the "not enough credits" body. The wording lives here so every place that */
|
|
41
|
+
/** answers 402 explains the refusal the same way. */
|
|
109
42
|
export declare function insufficientCreditsBody(args: {
|
|
110
43
|
balanceCredits: number;
|
|
111
44
|
requiredCredits: number;
|
|
112
45
|
}): InsufficientCreditsError;
|
|
113
|
-
/**
|
|
46
|
+
/** One "needs / has / short" sentence for the 402 refusal and the `quote` warning. */
|
|
114
47
|
export declare function creditsNeededSentence(args: {
|
|
115
48
|
balanceCredits: number;
|
|
116
49
|
requiredCredits: number;
|
|
117
50
|
}): string;
|
|
118
|
-
/**
|
|
51
|
+
/** `quote` warning: `make_ugc` with the same input will get this refusal. */
|
|
119
52
|
export declare function insufficientCreditsWarning(args: {
|
|
120
53
|
balanceCredits: number;
|
|
121
54
|
requiredCredits: number;
|
|
@@ -124,14 +57,14 @@ export declare function debtOutstandingWarning(args: {
|
|
|
124
57
|
debtCredits: number;
|
|
125
58
|
}): string;
|
|
126
59
|
export declare function accountNotAdmittedWarning(): string;
|
|
127
|
-
/**
|
|
60
|
+
/** Builds the "not admitted to the beta" body; see the wording rule above. */
|
|
128
61
|
export declare function accountNotAdmittedBody(): AccountNotAdmittedError;
|
|
129
|
-
/**
|
|
62
|
+
/** Builds the "outstanding debt" body; see the wording rule above. */
|
|
130
63
|
export declare function debtOutstandingBody(args: {
|
|
131
64
|
debtCredits: number;
|
|
132
65
|
}): DebtOutstandingError;
|
|
133
|
-
/**
|
|
134
|
-
/**
|
|
66
|
+
/** The input holds a field the product rejects. `fields` names them: the agent cannot */
|
|
67
|
+
/** fix anything until it knows which one to drop. */
|
|
135
68
|
export declare const rejectedFieldError: z.ZodObject<{
|
|
136
69
|
error: z.ZodObject<{
|
|
137
70
|
code: z.ZodLiteral<"rejected_field">;
|
|
@@ -140,13 +73,13 @@ export declare const rejectedFieldError: z.ZodObject<{
|
|
|
140
73
|
}, z.core.$strip>;
|
|
141
74
|
}, z.core.$strip>;
|
|
142
75
|
export type RejectedFieldError = z.infer<typeof rejectedFieldError>;
|
|
143
|
-
/**
|
|
76
|
+
/** Builds the "field rejected" body. The reason comes from the disposition registry. */
|
|
144
77
|
export declare function rejectedFieldBody(hits: readonly {
|
|
145
78
|
field: string;
|
|
146
79
|
message: string;
|
|
147
80
|
}[]): RejectedFieldError;
|
|
148
|
-
/**
|
|
149
|
-
/** `aspectRatio`
|
|
81
|
+
/** A key outside the contract. The schema strips such keys silently, so a misspelled */
|
|
82
|
+
/** `aspectRatio` became the 9:16 default without a trace; hence a refusal. */
|
|
150
83
|
export declare const unknownFieldError: z.ZodObject<{
|
|
151
84
|
error: z.ZodObject<{
|
|
152
85
|
code: z.ZodLiteral<"unknown_field">;
|
|
@@ -155,13 +88,12 @@ export declare const unknownFieldError: z.ZodObject<{
|
|
|
155
88
|
}, z.core.$strip>;
|
|
156
89
|
}, z.core.$strip>;
|
|
157
90
|
export type UnknownFieldError = z.infer<typeof unknownFieldError>;
|
|
158
|
-
/**
|
|
91
|
+
/** Builds the "unknown key" body: each name, a suggestion and the accepted fields. */
|
|
159
92
|
export declare function unknownFieldBody(hits: readonly {
|
|
160
93
|
field: string;
|
|
161
94
|
suggestion?: string | undefined;
|
|
162
95
|
}[], acceptedFields: readonly string[]): UnknownFieldError;
|
|
163
|
-
/**
|
|
164
|
-
/** Разбор и границы проверки — `docs/18-render-contract.md` §13. */
|
|
96
|
+
/** Text arrived with lost bytes: a replacement character in a string leaf of the input. */
|
|
165
97
|
export declare const scriptEncodingLostError: z.ZodObject<{
|
|
166
98
|
error: z.ZodObject<{
|
|
167
99
|
code: z.ZodLiteral<"script_encoding_lost">;
|
|
@@ -170,28 +102,28 @@ export declare const scriptEncodingLostError: z.ZodObject<{
|
|
|
170
102
|
}, z.core.$strip>;
|
|
171
103
|
}, z.core.$strip>;
|
|
172
104
|
export type ScriptEncodingLostError = z.infer<typeof scriptEncodingLostError>;
|
|
173
|
-
/**
|
|
174
|
-
/**
|
|
105
|
+
/** Builds the "encoding lost" body. Takes BOTH numbers of the predicate, so the caller */
|
|
106
|
+
/** does not choose where the character count comes from. */
|
|
175
107
|
export declare function scriptEncodingLostBody(args: {
|
|
176
108
|
paths: readonly string[];
|
|
177
109
|
charCount: number;
|
|
178
110
|
}): ScriptEncodingLostError;
|
|
179
|
-
/**
|
|
180
|
-
/**
|
|
111
|
+
/** Keeps the tool description's promise ("refused before any charge"): an unusable */
|
|
112
|
+
/** source is refused, not estimated. */
|
|
181
113
|
export declare function unusableSourceMessage(errorClass: string, detail: string): string;
|
|
182
|
-
/**
|
|
183
|
-
/**
|
|
114
|
+
/** Says both "fix the input" and "a retry will not help": on a 500 agents re-sent bytes */
|
|
115
|
+
/** that would never parse. */
|
|
184
116
|
export declare const MALFORMED_BODY_MESSAGE: string;
|
|
185
|
-
/**
|
|
186
|
-
/**
|
|
117
|
+
/** Codes with a bare envelope, in one registry: the published list of error codes is */
|
|
118
|
+
/** declared exhaustive. */
|
|
187
119
|
declare const BARE_ERROR_CODES: readonly ["aspect_conflict", "actor_unavailable", "actor_format_unavailable", "actor_storage_unavailable", "actor_generation_disabled", "actor_in_use", "idempotency_key_required", "idempotency_key_reused", "internal_error", "invalid_image", "invalid_request", "malformed_body", "not_found", "paid_render_disabled", "payload_too_large", "unauthorized", "unsupported_media_type", "unusable_source", "upload_cap_exceeded", "upstream_error"];
|
|
188
|
-
/**
|
|
120
|
+
/** A refusal code whose body carries only `code` and `message`. */
|
|
189
121
|
export type BareApiErrorCode = (typeof BARE_ERROR_CODES)[number];
|
|
190
|
-
/**
|
|
191
|
-
/**
|
|
122
|
+
/** EVERY code the API can return: bare plus typed. Typed values come from their schemas, */
|
|
123
|
+
/** so a rename reaches here on its own. */
|
|
192
124
|
export declare const API_ERROR_CODES: readonly string[];
|
|
193
|
-
/**
|
|
194
|
-
/**
|
|
125
|
+
/** A bare refusal body. The only path to one: a code outside the registry does not */
|
|
126
|
+
/** compile, and an envelope built around this function fails the envelope guard test. */
|
|
195
127
|
export declare function apiErrorBody(args: {
|
|
196
128
|
code: BareApiErrorCode;
|
|
197
129
|
message: string;
|
package/dist/errors.js
CHANGED
|
@@ -1,64 +1,30 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// Imported only for the 429 codes in the registry below: the names come from their
|
|
3
|
+
// schemas, not literals (`rate-limit.ts` is the only home of the 429 shape).
|
|
4
4
|
import { actorCreationLimitedError, rateLimitedError } from "./rate-limit.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* `apps/api/src/app.ts`, и это сходило с рук ровно потому, что все они несли
|
|
10
|
-
* одну и ту же пару `code`/`message`: разъехаться было нечему. С деньгами это
|
|
11
|
-
* перестаёт быть правдой — отказ 402 несёт ЧИСЛА, и агент по ним принимает
|
|
12
|
-
* решение (пополнить и повторить либо остановиться). Литерал в обработчике,
|
|
13
|
-
* потерявший `balance_credits`, оставил бы агента с сообщением «не хватило
|
|
14
|
-
* кредитов» без единой цифры, и обнаружилось бы это у клиента.
|
|
15
|
-
*
|
|
16
|
-
* Поэтому форма живёт здесь (правило проекта №2), а обработчик обязан пройти
|
|
17
|
-
* через `.parse()`: тело, собранное мимо схемы, не соберётся вовсе.
|
|
18
|
-
*
|
|
19
|
-
* ЧИСЛА ЛЕЖАТ ВНУТРИ `error`, А НЕ РЯДОМ С НИМ. Прецедент задан отказом по
|
|
20
|
-
* отклонённым полям (`error.fields`) и держится одним доводом: у ответа
|
|
21
|
-
* ошибки один конверт, и всё, что объясняет отказ, лежит в нём. Разложи числа
|
|
22
|
-
* по верхнему уровню — и клиенту придётся знать, для каких кодов смотреть в
|
|
23
|
-
* конверт, а для каких мимо него.
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* Общий конверт ошибки. Толерантен к дополнительным полям внутри `error`:
|
|
27
|
-
* типизированные отказы ниже — его расширения, и общий разбор не должен
|
|
28
|
-
* ломаться от того, что конкретный код принёс с собой числа.
|
|
29
|
-
*/
|
|
5
|
+
// Refusal bodies are built through schemas, not handler literals: a 402 carries numbers the
|
|
6
|
+
// agent acts on. Numbers sit INSIDE `error`, since an error response has one envelope.
|
|
7
|
+
/** The generic error envelope. Tolerates extra fields inside `error`: the typed refusals */
|
|
8
|
+
/** below extend it, and generic parsing must not break when a code brings numbers. */
|
|
30
9
|
export const apiError = z.object({
|
|
31
10
|
error: z.object({
|
|
32
11
|
code: z.string().min(1),
|
|
33
12
|
message: z.string().min(1),
|
|
34
13
|
}),
|
|
35
14
|
});
|
|
36
|
-
/**
|
|
15
|
+
/** Fewer credits on the balance than the run weighs: "top up". */
|
|
37
16
|
export const insufficientCreditsError = z.object({
|
|
38
17
|
error: z.object({
|
|
39
18
|
code: z.literal("insufficient_credits"),
|
|
40
19
|
message: z.string().min(1),
|
|
41
|
-
/**
|
|
20
|
+
/** What the balance holds NOW. Zero is a legal value. */
|
|
42
21
|
balance_credits: z.number().int().nonnegative(),
|
|
43
|
-
/**
|
|
22
|
+
/** What this run needs: the same estimate `quote` returned. */
|
|
44
23
|
required_credits: z.number().int().positive(),
|
|
45
24
|
}),
|
|
46
25
|
});
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
* ОТДЕЛЬНЫЙ КОД, А НЕ ОТТЕНОК ПРЕДЫДУЩЕГО, и довод у этого ровно один: у счёта
|
|
51
|
-
* с долгом деньги на балансе БЫВАЮТ. Такое состояние оставляет `topUpHold`
|
|
52
|
-
* (ветка `deferred_to_debt`) — он наращивает долг, не трогая баланс; два других
|
|
53
|
-
* производителя долга обнуляют баланс, заводя его. Ответ «недостаточно
|
|
54
|
-
* кредитов» сказал бы такому счёту заведомую неправду.
|
|
55
|
-
*
|
|
56
|
-
* ⚠️ ВТОРАЯ ПОЛОВИНА ПРЕЖНЕГО ДОВОДА — «агента отправило бы покупать кредиты,
|
|
57
|
-
* которые не снимут блокировку» — СНЯТА КАК ЛОЖНАЯ (clipwright#27): кредиты
|
|
58
|
-
* снимают. Вывод пережил свою причину, и это стоит сказать прямо: оставь я
|
|
59
|
-
* старую формулировку, следующий читатель либо слил бы два кода, увидев, что
|
|
60
|
-
* лечение одно, либо заново вывел бы из неё неверный совет клиенту.
|
|
61
|
-
*/
|
|
26
|
+
/** The account carries an unpaid debt. A separate code because an indebted account may */
|
|
27
|
+
/** still hold a balance, so "insufficient credits" would be false. Buying credits clears it. */
|
|
62
28
|
export const debtOutstandingError = z.object({
|
|
63
29
|
error: z.object({
|
|
64
30
|
code: z.literal("debt_outstanding"),
|
|
@@ -66,47 +32,16 @@ export const debtOutstandingError = z.object({
|
|
|
66
32
|
debt_credits: z.number().int().positive(),
|
|
67
33
|
}),
|
|
68
34
|
});
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
* владелец, и деньги на это не влияют.
|
|
72
|
-
*
|
|
73
|
-
* Отдельный код по тому же доводу, что отделил долг от нехватки: у
|
|
74
|
-
* недопущенного аккаунта деньги на балансе БЫВАЮТ, и оба денежных ответа
|
|
75
|
-
* отправили бы его агента совершать действия, которые блокировку не снимут.
|
|
76
|
-
* Отказ терминальный: повтор того же запроса даст то же самое, пока владелец не
|
|
77
|
-
* допустит аккаунт командой `admit`.
|
|
78
|
-
*
|
|
79
|
-
* ЧИСЕЛ В ТЕЛЕ НЕТ, И ЭТО НЕ ЭКОНОМИЯ. Порядковый номер мы не считаем: доступ
|
|
80
|
-
* даётся решением человека, а не по счётчику, и назвать номер значило бы
|
|
81
|
-
* обещать срок, которого никто не давал.
|
|
82
|
-
*
|
|
83
|
-
* ПО ТОЙ ЖЕ ПРИЧИНЕ ТЕЛО НЕ НАЗЫВАЕТ НИ СРОКА, НИ НОМЕРА, НИ БЛИЗОСТИ РАЗВЯЗКИ.
|
|
84
|
-
* Из отказа известно ровно одно: доступа нет. Так же отвечает аккаунт, у
|
|
85
|
-
* которого доступ СНЯЛИ, — и обещание скорого приёма было бы для него ложью в
|
|
86
|
-
* самый неподходящий момент. Правило принималось трижды и трижды чинилось по адресу
|
|
87
|
-
* находки: сперва в совете агенту (`api-failure.ts`), потом в `SKILL.md`, и
|
|
88
|
-
* только тогда — ЗДЕСЬ, в единственном месте, которое порождает эту строку для
|
|
89
|
-
* всех остальных. Проверка стоит на этой функции, а не на её производных.
|
|
90
|
-
*
|
|
91
|
-
* ПРАВИЛО РАСПРОСТРАНЯЕТСЯ НА ЛЮБУЮ ПОВЕРХНОСТЬ, объясняющую этот отказ, а не
|
|
92
|
-
* только на те, что существуют сегодня. Ближайшие будущие — страница ключей
|
|
93
|
-
* (US-608) и лендинг US-614; там соблазн назвать срок сильнее всего. Сторож
|
|
94
|
-
* (`scripts/docs-consistency.test.ts`) их уже обходит, но HTML он читает как
|
|
95
|
-
* текст и поймает только то, что стоит рядом с именем кода.
|
|
96
|
-
*/
|
|
35
|
+
/** Account not admitted to the beta; money does not change that, so it has its own code. */
|
|
36
|
+
/** Terminal; the body names no timeline, since a revoked account answers the same way. */
|
|
97
37
|
export const accountNotAdmittedError = z.object({
|
|
98
38
|
error: z.object({
|
|
99
39
|
code: z.literal("account_not_admitted"),
|
|
100
40
|
message: z.string().min(1),
|
|
101
41
|
}),
|
|
102
42
|
});
|
|
103
|
-
/**
|
|
104
|
-
|
|
105
|
-
*
|
|
106
|
-
* Формулировка живёт ЗДЕСЬ, а не в обработчике, по той же причине, что и
|
|
107
|
-
* форма: два места, отвечающие 402 (сегодня — создание рана, завтра — любой
|
|
108
|
-
* другой платный вызов), обязаны объяснять отказ одинаково.
|
|
109
|
-
*/
|
|
43
|
+
/** Builds the "not enough credits" body. The wording lives here so every place that */
|
|
44
|
+
/** answers 402 explains the refusal the same way. */
|
|
110
45
|
export function insufficientCreditsBody(args) {
|
|
111
46
|
return insufficientCreditsError.parse({
|
|
112
47
|
error: {
|
|
@@ -118,13 +53,13 @@ export function insufficientCreditsBody(args) {
|
|
|
118
53
|
},
|
|
119
54
|
});
|
|
120
55
|
}
|
|
121
|
-
/**
|
|
56
|
+
/** One "needs / has / short" sentence for the 402 refusal and the `quote` warning. */
|
|
122
57
|
export function creditsNeededSentence(args) {
|
|
123
58
|
const short = args.requiredCredits - args.balanceCredits;
|
|
124
59
|
return (`This run needs ${args.requiredCredits} credits, the account has ${args.balanceCredits}` +
|
|
125
60
|
(short > 0 ? ` (${short} short).` : "."));
|
|
126
61
|
}
|
|
127
|
-
/**
|
|
62
|
+
/** `quote` warning: `make_ugc` with the same input will get this refusal. */
|
|
128
63
|
export function insufficientCreditsWarning(args) {
|
|
129
64
|
return (`${creditsNeededSentence(args)} make_ugc will be refused with insufficient_credits ` +
|
|
130
65
|
"until the account buys credits.");
|
|
@@ -137,7 +72,7 @@ export function accountNotAdmittedWarning() {
|
|
|
137
72
|
return ("This account is not admitted to the beta; make_ugc will be refused with " +
|
|
138
73
|
"account_not_admitted, and buying credits does not change that.");
|
|
139
74
|
}
|
|
140
|
-
/**
|
|
75
|
+
/** Builds the "not admitted to the beta" body; see the wording rule above. */
|
|
141
76
|
export function accountNotAdmittedBody() {
|
|
142
77
|
return accountNotAdmittedError.parse({
|
|
143
78
|
error: {
|
|
@@ -147,7 +82,7 @@ export function accountNotAdmittedBody() {
|
|
|
147
82
|
},
|
|
148
83
|
});
|
|
149
84
|
}
|
|
150
|
-
/**
|
|
85
|
+
/** Builds the "outstanding debt" body; see the wording rule above. */
|
|
151
86
|
export function debtOutstandingBody(args) {
|
|
152
87
|
return debtOutstandingError.parse({
|
|
153
88
|
error: {
|
|
@@ -160,8 +95,8 @@ export function debtOutstandingBody(args) {
|
|
|
160
95
|
},
|
|
161
96
|
});
|
|
162
97
|
}
|
|
163
|
-
/**
|
|
164
|
-
/**
|
|
98
|
+
/** The input holds a field the product rejects. `fields` names them: the agent cannot */
|
|
99
|
+
/** fix anything until it knows which one to drop. */
|
|
165
100
|
export const rejectedFieldError = z.object({
|
|
166
101
|
error: z.object({
|
|
167
102
|
code: z.literal("rejected_field"),
|
|
@@ -169,7 +104,7 @@ export const rejectedFieldError = z.object({
|
|
|
169
104
|
fields: z.array(z.string().min(1)).min(1),
|
|
170
105
|
}),
|
|
171
106
|
});
|
|
172
|
-
/**
|
|
107
|
+
/** Builds the "field rejected" body. The reason comes from the disposition registry. */
|
|
173
108
|
export function rejectedFieldBody(hits) {
|
|
174
109
|
return rejectedFieldError.parse({
|
|
175
110
|
error: {
|
|
@@ -179,8 +114,8 @@ export function rejectedFieldBody(hits) {
|
|
|
179
114
|
},
|
|
180
115
|
});
|
|
181
116
|
}
|
|
182
|
-
/**
|
|
183
|
-
/** `aspectRatio`
|
|
117
|
+
/** A key outside the contract. The schema strips such keys silently, so a misspelled */
|
|
118
|
+
/** `aspectRatio` became the 9:16 default without a trace; hence a refusal. */
|
|
184
119
|
export const unknownFieldError = z.object({
|
|
185
120
|
error: z.object({
|
|
186
121
|
code: z.literal("unknown_field"),
|
|
@@ -188,7 +123,7 @@ export const unknownFieldError = z.object({
|
|
|
188
123
|
fields: z.array(z.string()).min(1),
|
|
189
124
|
}),
|
|
190
125
|
});
|
|
191
|
-
/**
|
|
126
|
+
/** Builds the "unknown key" body: each name, a suggestion and the accepted fields. */
|
|
192
127
|
export function unknownFieldBody(hits, acceptedFields) {
|
|
193
128
|
const named = hits.map((hit) => hit.suggestion === undefined
|
|
194
129
|
? `unknown field "${hit.field}"`
|
|
@@ -202,8 +137,7 @@ export function unknownFieldBody(hits, acceptedFields) {
|
|
|
202
137
|
},
|
|
203
138
|
});
|
|
204
139
|
}
|
|
205
|
-
/**
|
|
206
|
-
/** Разбор и границы проверки — `docs/18-render-contract.md` §13. */
|
|
140
|
+
/** Text arrived with lost bytes: a replacement character in a string leaf of the input. */
|
|
207
141
|
export const scriptEncodingLostError = z.object({
|
|
208
142
|
error: z.object({
|
|
209
143
|
code: z.literal("script_encoding_lost"),
|
|
@@ -211,14 +145,14 @@ export const scriptEncodingLostError = z.object({
|
|
|
211
145
|
fields: z.array(z.string().min(1)).min(1),
|
|
212
146
|
}),
|
|
213
147
|
});
|
|
214
|
-
/**
|
|
215
|
-
/**
|
|
148
|
+
/** As many paths as `invalid_request` shows: a long list is unreadable, a silently */
|
|
149
|
+
/** shortened one lies, so the rest is given as a number. */
|
|
216
150
|
const MAX_LISTED_PATHS = 12;
|
|
217
|
-
/**
|
|
218
|
-
/**
|
|
151
|
+
/** An empty path means the root itself is corrupt (a string instead of an object). The */
|
|
152
|
+
/** schema requires a non-empty name, so the root gets a label. */
|
|
219
153
|
const ROOT_PATH_LABEL = "(root)";
|
|
220
|
-
/**
|
|
221
|
-
/**
|
|
154
|
+
/** Builds the "encoding lost" body. Takes BOTH numbers of the predicate, so the caller */
|
|
155
|
+
/** does not choose where the character count comes from. */
|
|
222
156
|
export function scriptEncodingLostBody(args) {
|
|
223
157
|
const named = args.paths.map((path) => (path === "" ? ROOT_PATH_LABEL : path));
|
|
224
158
|
const listed = named.slice(0, MAX_LISTED_PATHS);
|
|
@@ -236,19 +170,19 @@ export function scriptEncodingLostBody(args) {
|
|
|
236
170
|
},
|
|
237
171
|
});
|
|
238
172
|
}
|
|
239
|
-
/**
|
|
240
|
-
/**
|
|
173
|
+
/** Keeps the tool description's promise ("refused before any charge"): an unusable */
|
|
174
|
+
/** source is refused, not estimated. */
|
|
241
175
|
export function unusableSourceMessage(errorClass, detail) {
|
|
242
176
|
return (`image cannot be used: ${detail} (${errorClass}). It is refused before any charge, so ` +
|
|
243
177
|
"no credits were reserved and no run was created. Fix the url, or send the file through " +
|
|
244
178
|
"upload_image (POST /v1/uploads) and pass the url it returns.");
|
|
245
179
|
}
|
|
246
|
-
/**
|
|
247
|
-
/**
|
|
180
|
+
/** Says both "fix the input" and "a retry will not help": on a 500 agents re-sent bytes */
|
|
181
|
+
/** that would never parse. */
|
|
248
182
|
export const MALFORMED_BODY_MESSAGE = "the request body is not valid JSON, so no field of it was read. Send a JSON object as the body " +
|
|
249
183
|
"and check the quoting of whatever built it. The same bytes will fail the same way on a retry.";
|
|
250
|
-
/**
|
|
251
|
-
/**
|
|
184
|
+
/** Codes with a bare envelope, in one registry: the published list of error codes is */
|
|
185
|
+
/** declared exhaustive. */
|
|
252
186
|
const BARE_ERROR_CODES = [
|
|
253
187
|
"aspect_conflict",
|
|
254
188
|
"actor_unavailable",
|
|
@@ -271,8 +205,8 @@ const BARE_ERROR_CODES = [
|
|
|
271
205
|
"upload_cap_exceeded",
|
|
272
206
|
"upstream_error",
|
|
273
207
|
];
|
|
274
|
-
/**
|
|
275
|
-
/**
|
|
208
|
+
/** EVERY code the API can return: bare plus typed. Typed values come from their schemas, */
|
|
209
|
+
/** so a rename reaches here on its own. */
|
|
276
210
|
export const API_ERROR_CODES = [
|
|
277
211
|
...BARE_ERROR_CODES,
|
|
278
212
|
rejectedFieldError.shape.error.shape.code.value,
|
|
@@ -284,8 +218,8 @@ export const API_ERROR_CODES = [
|
|
|
284
218
|
rateLimitedError.shape.error.shape.code.value,
|
|
285
219
|
actorCreationLimitedError.shape.error.shape.code.value,
|
|
286
220
|
];
|
|
287
|
-
/**
|
|
288
|
-
/**
|
|
221
|
+
/** A bare refusal body. The only path to one: a code outside the registry does not */
|
|
222
|
+
/** compile, and an envelope built around this function fails the envelope guard test. */
|
|
289
223
|
export function apiErrorBody(args) {
|
|
290
224
|
return apiError.parse({ error: { code: args.code, message: args.message } });
|
|
291
225
|
}
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,mFAAmF;AACnF,6EAA6E;AAC7E,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE9E,4FAA4F;AAC5F,uFAAuF;AAEvF,4FAA4F;AAC5F,sFAAsF;AACtF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KAC3B,CAAC;CACH,CAAC,CAAC;AAGH,kEAAkE;AAClE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAsB,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