post-engineer-mcp 1.52.601 → 1.52.605
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client-batch.d.ts +3 -1
- package/dist/client-batch.js +4 -1
- package/dist/client-batch.js.map +1 -1
- package/dist/client-billing.d.ts +5 -0
- package/dist/client-billing.js +34 -0
- package/dist/client-billing.js.map +1 -0
- package/dist/client-experiments.d.ts +5 -14
- package/dist/client-experiments.js +17 -3
- package/dist/client-experiments.js.map +1 -1
- package/dist/client-posts.d.ts +12 -6
- package/dist/client-posts.js +22 -11
- package/dist/client-posts.js.map +1 -1
- package/dist/client-prompts.d.ts +4 -8
- package/dist/client-prompts.js +7 -24
- package/dist/client-prompts.js.map +1 -1
- package/dist/client-publish-uploaded.d.ts +8 -1
- package/dist/client-publish-uploaded.js +121 -49
- package/dist/client-publish-uploaded.js.map +1 -1
- package/dist/client-publishing-accounts.d.ts +4 -2
- package/dist/client-publishing-accounts.js +6 -2
- package/dist/client-publishing-accounts.js.map +1 -1
- package/dist/client-types.d.ts +5 -4
- package/dist/client-user-media.d.ts +4 -3
- package/dist/client-user-media.js +17 -47
- package/dist/client-user-media.js.map +1 -1
- package/dist/client-video-task.d.ts +3 -1
- package/dist/client-video-task.js +4 -1
- package/dist/client-video-task.js.map +1 -1
- package/dist/client.d.ts +40 -39
- package/dist/client.js +80 -148
- package/dist/client.js.map +1 -1
- package/dist/cloned-voice-client.d.ts +7 -5
- package/dist/cloned-voice-client.js +10 -4
- package/dist/cloned-voice-client.js.map +1 -1
- package/dist/connect-account.js +14 -6
- package/dist/connect-account.js.map +1 -1
- package/dist/contract-response.d.ts +8 -0
- package/dist/contract-response.js +24 -0
- package/dist/contract-response.js.map +1 -0
- package/dist/contracts/accounts.d.ts +844 -0
- package/dist/contracts/accounts.js +346 -0
- package/dist/contracts/accounts.js.map +1 -0
- package/dist/contracts/billing.d.ts +109 -0
- package/dist/contracts/billing.js +88 -0
- package/dist/contracts/billing.js.map +1 -0
- package/dist/contracts/endpoint.d.ts +45 -0
- package/dist/contracts/endpoint.js +8 -0
- package/dist/contracts/endpoint.js.map +1 -0
- package/dist/contracts/experiments.d.ts +271 -0
- package/dist/contracts/experiments.js +170 -0
- package/dist/contracts/experiments.js.map +1 -0
- package/dist/contracts/media.d.ts +165 -0
- package/dist/contracts/media.js +139 -0
- package/dist/contracts/media.js.map +1 -0
- package/dist/contracts/metrics.d.ts +351 -0
- package/dist/contracts/metrics.js +256 -0
- package/dist/contracts/metrics.js.map +1 -0
- package/dist/contracts/personas.d.ts +560 -0
- package/dist/contracts/personas.js +346 -0
- package/dist/contracts/personas.js.map +1 -0
- package/dist/contracts/posts.d.ts +485 -0
- package/dist/contracts/posts.js +153 -0
- package/dist/contracts/posts.js.map +1 -0
- package/dist/contracts/prompts.d.ts +90 -0
- package/dist/contracts/prompts.js +48 -0
- package/dist/contracts/prompts.js.map +1 -0
- package/dist/contracts/schedule.d.ts +691 -0
- package/dist/contracts/schedule.js +264 -0
- package/dist/contracts/schedule.js.map +1 -0
- package/dist/contracts/video-tasks.d.ts +181 -0
- package/dist/contracts/video-tasks.js +121 -0
- package/dist/contracts/video-tasks.js.map +1 -0
- package/dist/contracts/videos.d.ts +693 -0
- package/dist/contracts/videos.js +443 -0
- package/dist/contracts/videos.js.map +1 -0
- package/dist/contracts/voices.d.ts +237 -0
- package/dist/contracts/voices.js +118 -0
- package/dist/contracts/voices.js.map +1 -0
- package/dist/generate-video.d.ts +33 -33
- package/dist/generate-video.js +13 -1
- package/dist/generate-video.js.map +1 -1
- package/dist/intent-content.js +1 -1
- package/dist/intent-personas.js +17 -7
- package/dist/intent-personas.js.map +1 -1
- package/dist/limits.d.ts +27 -44
- package/dist/limits.js +27 -45
- package/dist/limits.js.map +1 -1
- package/dist/persona-delete.js +9 -9
- package/dist/persona-delete.js.map +1 -1
- package/dist/persona-update.js +3 -2
- package/dist/persona-update.js.map +1 -1
- package/dist/script-segments.d.ts +1 -1
- package/dist/script-segments.js +1 -1
- package/dist/single-video-shape.d.ts +5 -5
- package/dist/single-video-shape.js +1 -1
- package/dist/tools-batch.d.ts +42 -42
- package/dist/tools-batch.js +12 -36
- package/dist/tools-batch.js.map +1 -1
- package/dist/tools-experiments.d.ts +11 -11
- package/dist/tools-experiments.js +17 -9
- package/dist/tools-experiments.js.map +1 -1
- package/dist/tools-pinterest.js +5 -15
- package/dist/tools-pinterest.js.map +1 -1
- package/dist/tools-single-video.js +14 -51
- package/dist/tools-single-video.js.map +1 -1
- package/dist/tools-user-media.js +3 -1
- package/dist/tools-user-media.js.map +1 -1
- package/dist/tools.d.ts +0 -25
- package/dist/tools.js +56 -96
- package/dist/tools.js.map +1 -1
- package/dist/voice-filters.js +2 -1
- package/dist/voice-filters.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type EndpointMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
3
|
+
export interface EndpointDefinition<Body extends z.ZodType | undefined, Query extends z.ZodType | undefined, Response extends z.ZodType, Path extends string> {
|
|
4
|
+
method: EndpointMethod;
|
|
5
|
+
path: Path;
|
|
6
|
+
body?: Body;
|
|
7
|
+
query?: Query;
|
|
8
|
+
response: Response;
|
|
9
|
+
}
|
|
10
|
+
/** Define one endpoint contract. The literal path is preserved in the type
|
|
11
|
+
* so ParamsOf can read its `:param` segments. `Body`/`Query` default to
|
|
12
|
+
* `undefined` so an omitted optional schema stays `undefined` (not the
|
|
13
|
+
* bare `ZodType`) in the returned definition. */
|
|
14
|
+
export declare function defineEndpoint<Body extends z.ZodType | undefined = undefined, Query extends z.ZodType | undefined = undefined, Response extends z.ZodType = z.ZodType, Path extends string = string>(config: {
|
|
15
|
+
method: EndpointMethod;
|
|
16
|
+
path: Path;
|
|
17
|
+
body?: Body;
|
|
18
|
+
query?: Query;
|
|
19
|
+
response: Response;
|
|
20
|
+
}): EndpointDefinition<Body, Query, Response, Path>;
|
|
21
|
+
/** Request body input type (`z.input` of the `body` schema). Indexed
|
|
22
|
+
* access is used (not infer) so an optional `body?` property keeps its
|
|
23
|
+
* schema type instead of widening to `unknown`. */
|
|
24
|
+
export type BodyOf<Endpoint extends {
|
|
25
|
+
body?: z.ZodType | undefined;
|
|
26
|
+
}> = [
|
|
27
|
+
Exclude<Endpoint['body'], undefined>
|
|
28
|
+
] extends [never] ? never : Exclude<Endpoint['body'], undefined> extends z.ZodType ? z.input<Exclude<Endpoint['body'], undefined>> : never;
|
|
29
|
+
/** Query input type (`z.input` of the `query` schema). */
|
|
30
|
+
export type QueryOf<Endpoint extends {
|
|
31
|
+
query?: z.ZodType | undefined;
|
|
32
|
+
}> = [
|
|
33
|
+
Exclude<Endpoint['query'], undefined>
|
|
34
|
+
] extends [never] ? never : Exclude<Endpoint['query'], undefined> extends z.ZodType ? z.input<Exclude<Endpoint['query'], undefined>> : never;
|
|
35
|
+
/** Response output type (`z.output` of the `response` schema). */
|
|
36
|
+
export type ResponseOf<Endpoint extends {
|
|
37
|
+
response: z.ZodType;
|
|
38
|
+
}> = Endpoint['response'] extends z.ZodType ? z.output<Endpoint['response']> : never;
|
|
39
|
+
/** Path params from a path template: each `:name` segment becomes a
|
|
40
|
+
* `string` field. A path without segments is an empty record. */
|
|
41
|
+
export type ParamsOf<Path extends string> = Path extends `${string}:${infer Rest}` ? Rest extends `${infer Name}/${infer After}` ? {
|
|
42
|
+
[Key in Name]: string;
|
|
43
|
+
} & ParamsOf<`/${After}`> : {
|
|
44
|
+
[Key in Rest]: string;
|
|
45
|
+
} : Record<never, never>;
|
|
46
|
+
/** House voice catalog enums (also the MCP list filter values). */
|
|
47
|
+
export declare const VOICE_GENDERS: readonly ["female", "male"];
|
|
48
|
+
export declare const VOICE_ACCENTS: readonly ["us", "gb"];
|
|
49
|
+
export declare const VOICE_KINDS: readonly ["standard", "character", "cloned"];
|
|
50
|
+
/** One house voice catalog entry, as the engine serves it. The id is
|
|
51
|
+
* never empty (the web isVoiceOption guard requires it); gender and
|
|
52
|
+
* accent are null for voices that carry none. */
|
|
53
|
+
export declare const VoiceOptionSchema: z.ZodObject<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
label: z.ZodNullable<z.ZodString>;
|
|
56
|
+
provider: z.ZodString;
|
|
57
|
+
gender: z.ZodNullable<z.ZodEnum<{
|
|
58
|
+
female: "female";
|
|
59
|
+
male: "male";
|
|
60
|
+
}>>;
|
|
61
|
+
accent: z.ZodNullable<z.ZodEnum<{
|
|
62
|
+
us: "us";
|
|
63
|
+
gb: "gb";
|
|
64
|
+
}>>;
|
|
65
|
+
kind: z.ZodEnum<{
|
|
66
|
+
standard: "standard";
|
|
67
|
+
character: "character";
|
|
68
|
+
cloned: "cloned";
|
|
69
|
+
}>;
|
|
70
|
+
description: z.ZodNullable<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
export type VoiceOption = z.infer<typeof VoiceOptionSchema>;
|
|
73
|
+
export declare const ListVoicesResponseSchema: z.ZodObject<{
|
|
74
|
+
voices: z.ZodArray<z.ZodObject<{
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
label: z.ZodNullable<z.ZodString>;
|
|
77
|
+
provider: z.ZodString;
|
|
78
|
+
gender: z.ZodNullable<z.ZodEnum<{
|
|
79
|
+
female: "female";
|
|
80
|
+
male: "male";
|
|
81
|
+
}>>;
|
|
82
|
+
accent: z.ZodNullable<z.ZodEnum<{
|
|
83
|
+
us: "us";
|
|
84
|
+
gb: "gb";
|
|
85
|
+
}>>;
|
|
86
|
+
kind: z.ZodEnum<{
|
|
87
|
+
standard: "standard";
|
|
88
|
+
character: "character";
|
|
89
|
+
cloned: "cloned";
|
|
90
|
+
}>;
|
|
91
|
+
description: z.ZodNullable<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
/** One cloned voice row, snake_case as the engine stores it. */
|
|
95
|
+
export declare const ClonedVoiceRowSchema: z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
status: z.ZodString;
|
|
98
|
+
language: z.ZodNullable<z.ZodString>;
|
|
99
|
+
voice_id: z.ZodNullable<z.ZodString>;
|
|
100
|
+
error_code: z.ZodNullable<z.ZodString>;
|
|
101
|
+
consent_at: z.ZodNullable<z.ZodString>;
|
|
102
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
103
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
export type ClonedVoiceRow = z.infer<typeof ClonedVoiceRowSchema>;
|
|
106
|
+
export declare const ListClonedVoicesResponseSchema: z.ZodObject<{
|
|
107
|
+
success: z.ZodLiteral<true>;
|
|
108
|
+
voices: z.ZodArray<z.ZodObject<{
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
status: z.ZodString;
|
|
111
|
+
language: z.ZodNullable<z.ZodString>;
|
|
112
|
+
voice_id: z.ZodNullable<z.ZodString>;
|
|
113
|
+
error_code: z.ZodNullable<z.ZodString>;
|
|
114
|
+
consent_at: z.ZodNullable<z.ZodString>;
|
|
115
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
116
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
117
|
+
}, z.core.$strip>>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
/** The clone-create multipart fields (strings in the form). The reference
|
|
120
|
+
* audio file itself is binary and has no schema; the language English-only
|
|
121
|
+
* rule is enforced by the route and the tool, not here. */
|
|
122
|
+
export declare const CreateClonedVoiceBodySchema: z.ZodObject<{
|
|
123
|
+
consent: z.ZodLiteral<"true">;
|
|
124
|
+
denoise: z.ZodEnum<{
|
|
125
|
+
true: "true";
|
|
126
|
+
false: "false";
|
|
127
|
+
}>;
|
|
128
|
+
language: z.ZodString;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export declare const CreateClonedVoiceResponseSchema: z.ZodObject<{
|
|
131
|
+
success: z.ZodLiteral<true>;
|
|
132
|
+
voice: z.ZodObject<{
|
|
133
|
+
id: z.ZodString;
|
|
134
|
+
status: z.ZodString;
|
|
135
|
+
language: z.ZodNullable<z.ZodString>;
|
|
136
|
+
voice_id: z.ZodNullable<z.ZodString>;
|
|
137
|
+
error_code: z.ZodNullable<z.ZodString>;
|
|
138
|
+
consent_at: z.ZodNullable<z.ZodString>;
|
|
139
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
140
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export declare const GetClonedVoiceResponseSchema: z.ZodObject<{
|
|
144
|
+
success: z.ZodLiteral<true>;
|
|
145
|
+
voice: z.ZodObject<{
|
|
146
|
+
id: z.ZodString;
|
|
147
|
+
status: z.ZodString;
|
|
148
|
+
language: z.ZodNullable<z.ZodString>;
|
|
149
|
+
voice_id: z.ZodNullable<z.ZodString>;
|
|
150
|
+
error_code: z.ZodNullable<z.ZodString>;
|
|
151
|
+
consent_at: z.ZodNullable<z.ZodString>;
|
|
152
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
153
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
export declare const DeleteClonedVoiceResponseSchema: z.ZodObject<{
|
|
157
|
+
success: z.ZodLiteral<true>;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
/** Preview text cap, shared by the contract body schema, the MCP tool
|
|
160
|
+
* schemas (via limits.ts) and the web route parsers. */
|
|
161
|
+
export declare const PREVIEW_TEXT_MAX_CHARS = 300;
|
|
162
|
+
/** The optional JSON body of both preview routes: `{ text }` only.
|
|
163
|
+
* Strict: the routes 400 any other key. An absent text means the fixed
|
|
164
|
+
* sample; the routes trim and require 1-300 chars when present. */
|
|
165
|
+
export declare const PreviewVoiceBodySchema: z.ZodObject<{
|
|
166
|
+
text: z.ZodOptional<z.ZodString>;
|
|
167
|
+
}, z.core.$strict>;
|
|
168
|
+
export declare const listVoices: EndpointDefinition<undefined, undefined, z.ZodObject<{
|
|
169
|
+
voices: z.ZodArray<z.ZodObject<{
|
|
170
|
+
id: z.ZodString;
|
|
171
|
+
label: z.ZodNullable<z.ZodString>;
|
|
172
|
+
provider: z.ZodString;
|
|
173
|
+
gender: z.ZodNullable<z.ZodEnum<{
|
|
174
|
+
female: "female";
|
|
175
|
+
male: "male";
|
|
176
|
+
}>>;
|
|
177
|
+
accent: z.ZodNullable<z.ZodEnum<{
|
|
178
|
+
us: "us";
|
|
179
|
+
gb: "gb";
|
|
180
|
+
}>>;
|
|
181
|
+
kind: z.ZodEnum<{
|
|
182
|
+
standard: "standard";
|
|
183
|
+
character: "character";
|
|
184
|
+
cloned: "cloned";
|
|
185
|
+
}>;
|
|
186
|
+
description: z.ZodNullable<z.ZodString>;
|
|
187
|
+
}, z.core.$strip>>;
|
|
188
|
+
}, z.core.$strip>, "/api/persona/voices">;
|
|
189
|
+
export declare const listClonedVoices: EndpointDefinition<undefined, undefined, z.ZodObject<{
|
|
190
|
+
success: z.ZodLiteral<true>;
|
|
191
|
+
voices: z.ZodArray<z.ZodObject<{
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
status: z.ZodString;
|
|
194
|
+
language: z.ZodNullable<z.ZodString>;
|
|
195
|
+
voice_id: z.ZodNullable<z.ZodString>;
|
|
196
|
+
error_code: z.ZodNullable<z.ZodString>;
|
|
197
|
+
consent_at: z.ZodNullable<z.ZodString>;
|
|
198
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
199
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
}, z.core.$strip>, "/api/persona/cloned-voices">;
|
|
202
|
+
export declare const createClonedVoice: EndpointDefinition<z.ZodObject<{
|
|
203
|
+
consent: z.ZodLiteral<"true">;
|
|
204
|
+
denoise: z.ZodEnum<{
|
|
205
|
+
true: "true";
|
|
206
|
+
false: "false";
|
|
207
|
+
}>;
|
|
208
|
+
language: z.ZodString;
|
|
209
|
+
}, z.core.$strip>, undefined, z.ZodObject<{
|
|
210
|
+
success: z.ZodLiteral<true>;
|
|
211
|
+
voice: z.ZodObject<{
|
|
212
|
+
id: z.ZodString;
|
|
213
|
+
status: z.ZodString;
|
|
214
|
+
language: z.ZodNullable<z.ZodString>;
|
|
215
|
+
voice_id: z.ZodNullable<z.ZodString>;
|
|
216
|
+
error_code: z.ZodNullable<z.ZodString>;
|
|
217
|
+
consent_at: z.ZodNullable<z.ZodString>;
|
|
218
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
219
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
}, z.core.$strip>, "/api/persona/cloned-voices">;
|
|
222
|
+
export declare const getClonedVoice: EndpointDefinition<undefined, undefined, z.ZodObject<{
|
|
223
|
+
success: z.ZodLiteral<true>;
|
|
224
|
+
voice: z.ZodObject<{
|
|
225
|
+
id: z.ZodString;
|
|
226
|
+
status: z.ZodString;
|
|
227
|
+
language: z.ZodNullable<z.ZodString>;
|
|
228
|
+
voice_id: z.ZodNullable<z.ZodString>;
|
|
229
|
+
error_code: z.ZodNullable<z.ZodString>;
|
|
230
|
+
consent_at: z.ZodNullable<z.ZodString>;
|
|
231
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
232
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
}, z.core.$strip>, "/api/persona/cloned-voices/:cloneId">;
|
|
235
|
+
export declare const deleteClonedVoice: EndpointDefinition<undefined, undefined, z.ZodObject<{
|
|
236
|
+
success: z.ZodLiteral<true>;
|
|
237
|
+
}, z.core.$strip>, "/api/persona/cloned-voices/:cloneId">;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// GENERATED from shared/contracts — do not edit.
|
|
2
|
+
// Run `node scripts/sync-contracts.mjs` from the repo root to regenerate.
|
|
3
|
+
// Voices contract: the single source of truth for the house voice catalog
|
|
4
|
+
// and the cloned-voice exchanges. Both apps generate a copy of this file
|
|
5
|
+
// (see scripts/sync-contracts.mjs); never edit a generated copy by hand.
|
|
6
|
+
//
|
|
7
|
+
// GET /api/persona/voices proxies the engine catalog as `{ voices }` —
|
|
8
|
+
// no `success` envelope. The cloned-voice routes proxy the engine's
|
|
9
|
+
// cloned-voices API and narrow each row to the public fields below.
|
|
10
|
+
//
|
|
11
|
+
// The two preview routes (POST /api/persona/voices/[voiceId]/preview and
|
|
12
|
+
// POST /api/persona/cloned-voices/[cloneId]/preview) answer with raw audio
|
|
13
|
+
// bytes, not JSON, so they have no response schema here: the MCP fetches
|
|
14
|
+
// the bytes directly. What they share is the request body — the optional
|
|
15
|
+
// `{ text }` JSON body, trimmed to 1-300 chars — pinned below as
|
|
16
|
+
// PreviewVoiceBodySchema. The 300-char cap also lives in the engine
|
|
17
|
+
// validator and in each web route parser (they cannot import this file);
|
|
18
|
+
// the four-way pin is clone-preview-text-sync.test.ts.
|
|
19
|
+
import { z } from 'zod';
|
|
20
|
+
/** Define one endpoint contract. The literal path is preserved in the type
|
|
21
|
+
* so ParamsOf can read its `:param` segments. `Body`/`Query` default to
|
|
22
|
+
* `undefined` so an omitted optional schema stays `undefined` (not the
|
|
23
|
+
* bare `ZodType`) in the returned definition. */
|
|
24
|
+
export function defineEndpoint(config) {
|
|
25
|
+
return config;
|
|
26
|
+
}
|
|
27
|
+
/** House voice catalog enums (also the MCP list filter values). */
|
|
28
|
+
export const VOICE_GENDERS = ['female', 'male'];
|
|
29
|
+
export const VOICE_ACCENTS = ['us', 'gb'];
|
|
30
|
+
export const VOICE_KINDS = ['standard', 'character', 'cloned'];
|
|
31
|
+
/** One house voice catalog entry, as the engine serves it. The id is
|
|
32
|
+
* never empty (the web isVoiceOption guard requires it); gender and
|
|
33
|
+
* accent are null for voices that carry none. */
|
|
34
|
+
export const VoiceOptionSchema = z.object({
|
|
35
|
+
id: z.string().min(1),
|
|
36
|
+
label: z.string().nullable(),
|
|
37
|
+
provider: z.string(),
|
|
38
|
+
gender: z.enum(VOICE_GENDERS).nullable(),
|
|
39
|
+
accent: z.enum(VOICE_ACCENTS).nullable(),
|
|
40
|
+
kind: z.enum(VOICE_KINDS),
|
|
41
|
+
/** English text about how the voice sounds; null for OpenRouter and clones. */
|
|
42
|
+
description: z.string().nullable(),
|
|
43
|
+
});
|
|
44
|
+
export const ListVoicesResponseSchema = z.object({
|
|
45
|
+
voices: z.array(VoiceOptionSchema),
|
|
46
|
+
});
|
|
47
|
+
/** One cloned voice row, snake_case as the engine stores it. */
|
|
48
|
+
export const ClonedVoiceRowSchema = z.object({
|
|
49
|
+
id: z.string(),
|
|
50
|
+
status: z.string(),
|
|
51
|
+
language: z.string().nullable(),
|
|
52
|
+
voice_id: z.string().nullable(),
|
|
53
|
+
error_code: z.string().nullable(),
|
|
54
|
+
consent_at: z.string().nullable(),
|
|
55
|
+
created_at: z.string().nullable(),
|
|
56
|
+
updated_at: z.string().nullable(),
|
|
57
|
+
});
|
|
58
|
+
export const ListClonedVoicesResponseSchema = z.object({
|
|
59
|
+
success: z.literal(true),
|
|
60
|
+
voices: z.array(ClonedVoiceRowSchema),
|
|
61
|
+
});
|
|
62
|
+
/** The clone-create multipart fields (strings in the form). The reference
|
|
63
|
+
* audio file itself is binary and has no schema; the language English-only
|
|
64
|
+
* rule is enforced by the route and the tool, not here. */
|
|
65
|
+
export const CreateClonedVoiceBodySchema = z.object({
|
|
66
|
+
consent: z.literal('true'),
|
|
67
|
+
denoise: z.enum(['true', 'false']),
|
|
68
|
+
language: z.string().min(1),
|
|
69
|
+
});
|
|
70
|
+
export const CreateClonedVoiceResponseSchema = z.object({
|
|
71
|
+
success: z.literal(true),
|
|
72
|
+
voice: ClonedVoiceRowSchema,
|
|
73
|
+
});
|
|
74
|
+
export const GetClonedVoiceResponseSchema = z.object({
|
|
75
|
+
success: z.literal(true),
|
|
76
|
+
voice: ClonedVoiceRowSchema,
|
|
77
|
+
});
|
|
78
|
+
export const DeleteClonedVoiceResponseSchema = z.object({
|
|
79
|
+
success: z.literal(true),
|
|
80
|
+
});
|
|
81
|
+
/** Preview text cap, shared by the contract body schema, the MCP tool
|
|
82
|
+
* schemas (via limits.ts) and the web route parsers. */
|
|
83
|
+
export const PREVIEW_TEXT_MAX_CHARS = 300;
|
|
84
|
+
/** The optional JSON body of both preview routes: `{ text }` only.
|
|
85
|
+
* Strict: the routes 400 any other key. An absent text means the fixed
|
|
86
|
+
* sample; the routes trim and require 1-300 chars when present. */
|
|
87
|
+
export const PreviewVoiceBodySchema = z
|
|
88
|
+
.object({
|
|
89
|
+
text: z.string().trim().min(1).max(PREVIEW_TEXT_MAX_CHARS).optional(),
|
|
90
|
+
})
|
|
91
|
+
.strict();
|
|
92
|
+
export const listVoices = defineEndpoint({
|
|
93
|
+
method: 'GET',
|
|
94
|
+
path: '/api/persona/voices',
|
|
95
|
+
response: ListVoicesResponseSchema,
|
|
96
|
+
});
|
|
97
|
+
export const listClonedVoices = defineEndpoint({
|
|
98
|
+
method: 'GET',
|
|
99
|
+
path: '/api/persona/cloned-voices',
|
|
100
|
+
response: ListClonedVoicesResponseSchema,
|
|
101
|
+
});
|
|
102
|
+
export const createClonedVoice = defineEndpoint({
|
|
103
|
+
method: 'POST',
|
|
104
|
+
path: '/api/persona/cloned-voices',
|
|
105
|
+
body: CreateClonedVoiceBodySchema,
|
|
106
|
+
response: CreateClonedVoiceResponseSchema,
|
|
107
|
+
});
|
|
108
|
+
export const getClonedVoice = defineEndpoint({
|
|
109
|
+
method: 'GET',
|
|
110
|
+
path: '/api/persona/cloned-voices/:cloneId',
|
|
111
|
+
response: GetClonedVoiceResponseSchema,
|
|
112
|
+
});
|
|
113
|
+
export const deleteClonedVoice = defineEndpoint({
|
|
114
|
+
method: 'DELETE',
|
|
115
|
+
path: '/api/persona/cloned-voices/:cloneId',
|
|
116
|
+
response: DeleteClonedVoiceResponseSchema,
|
|
117
|
+
});
|
|
118
|
+
//# sourceMappingURL=voices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voices.js","sourceRoot":"","sources":["../../src/contracts/voices.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,0EAA0E;AAC1E,0EAA0E;AAC1E,yEAAyE;AACzE,yEAAyE;AACzE,EAAE;AACF,uEAAuE;AACvE,oEAAoE;AACpE,oEAAoE;AACpE,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,yEAAyE;AACzE,yEAAyE;AACzE,iEAAiE;AACjE,oEAAoE;AACpE,yEAAyE;AACzE,uDAAuD;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuBxB;;;iDAGiD;AACjD,MAAM,UAAU,cAAc,CAK5B,MAMD;IACC,OAAO,MAAM,CAAC;AAChB,CAAC;AAiCD,mEAAmE;AACnE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAU,CAAC;AACzD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,CAAU,CAAC;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAExE;;iDAEiD;AACjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IACxC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IACxC,IA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AAE,MAAM;IACd,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,2BAA2B;IACjC,QAAQ,EAAE,+BAA+B;CAC1C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;IAC3C,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,qCAAqC;IAC3C,QAAQ,EAAE,4BAA4B;CACvC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;IAC9C,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,qCAAqC;IAC3C,QAAQ,EAAE,+BAA+B;CAC1C,CAAC,CAAC"}
|
package/dist/generate-video.d.ts
CHANGED
|
@@ -5,7 +5,11 @@ import { GeneratePersonaVideoSchema } from './single-video-shape.js';
|
|
|
5
5
|
import type { McpToolResponse } from './tools-call.js';
|
|
6
6
|
export declare const GenerateVideoItemSchema: z.ZodObject<{
|
|
7
7
|
description: z.ZodString;
|
|
8
|
-
|
|
8
|
+
experiment: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
experimentId: z.ZodString;
|
|
10
|
+
variantId: z.ZodString;
|
|
11
|
+
pair: z.ZodNumber;
|
|
12
|
+
}, z.core.$strict>>;
|
|
9
13
|
options: z.ZodOptional<z.ZodObject<{
|
|
10
14
|
videoType: z.ZodEnum<{
|
|
11
15
|
full_lipsync: "full_lipsync";
|
|
@@ -32,22 +36,19 @@ export declare const GenerateVideoItemSchema: z.ZodObject<{
|
|
|
32
36
|
language: z.ZodOptional<z.ZodString>;
|
|
33
37
|
niche: z.ZodOptional<z.ZodString>;
|
|
34
38
|
}, z.core.$strip>>;
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
title: z.ZodString;
|
|
40
|
+
startAt: z.ZodOptional<z.ZodString>;
|
|
41
|
+
times: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
42
|
timezone: z.ZodDefault<z.ZodString>;
|
|
38
|
-
experiment: z.ZodOptional<z.ZodObject<{
|
|
39
|
-
experimentId: z.ZodString;
|
|
40
|
-
variantId: z.ZodString;
|
|
41
|
-
pair: z.ZodNumber;
|
|
42
|
-
}, z.core.$strict>>;
|
|
43
43
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
44
44
|
scheduled: "scheduled";
|
|
45
45
|
asap: "asap";
|
|
46
46
|
}>>;
|
|
47
|
+
pinterestBoardId: z.ZodOptional<z.ZodString>;
|
|
47
48
|
segments: z.ZodArray<z.ZodObject<{
|
|
48
49
|
kind: z.ZodEnum<{
|
|
49
|
-
content: "content";
|
|
50
50
|
hook: "hook";
|
|
51
|
+
content: "content";
|
|
51
52
|
}>;
|
|
52
53
|
text: z.ZodString;
|
|
53
54
|
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -60,8 +61,7 @@ export declare const GenerateVideoItemSchema: z.ZodObject<{
|
|
|
60
61
|
}, z.core.$strict>>;
|
|
61
62
|
}, z.core.$strict>>>;
|
|
62
63
|
}, z.core.$strict>>;
|
|
63
|
-
|
|
64
|
-
times: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
64
|
+
language: z.ZodOptional<z.ZodString>;
|
|
65
65
|
persona: z.ZodOptional<z.ZodString>;
|
|
66
66
|
providers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
67
67
|
youtube: "youtube";
|
|
@@ -80,7 +80,11 @@ export declare const GenerateVideoItemSchema: z.ZodObject<{
|
|
|
80
80
|
export declare const GenerateVideoShape: {
|
|
81
81
|
videos: z.ZodArray<z.ZodObject<{
|
|
82
82
|
description: z.ZodString;
|
|
83
|
-
|
|
83
|
+
experiment: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
experimentId: z.ZodString;
|
|
85
|
+
variantId: z.ZodString;
|
|
86
|
+
pair: z.ZodNumber;
|
|
87
|
+
}, z.core.$strict>>;
|
|
84
88
|
options: z.ZodOptional<z.ZodObject<{
|
|
85
89
|
videoType: z.ZodEnum<{
|
|
86
90
|
full_lipsync: "full_lipsync";
|
|
@@ -107,22 +111,19 @@ export declare const GenerateVideoShape: {
|
|
|
107
111
|
language: z.ZodOptional<z.ZodString>;
|
|
108
112
|
niche: z.ZodOptional<z.ZodString>;
|
|
109
113
|
}, z.core.$strip>>;
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
title: z.ZodString;
|
|
115
|
+
startAt: z.ZodOptional<z.ZodString>;
|
|
116
|
+
times: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
112
117
|
timezone: z.ZodDefault<z.ZodString>;
|
|
113
|
-
experiment: z.ZodOptional<z.ZodObject<{
|
|
114
|
-
experimentId: z.ZodString;
|
|
115
|
-
variantId: z.ZodString;
|
|
116
|
-
pair: z.ZodNumber;
|
|
117
|
-
}, z.core.$strict>>;
|
|
118
118
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
119
119
|
scheduled: "scheduled";
|
|
120
120
|
asap: "asap";
|
|
121
121
|
}>>;
|
|
122
|
+
pinterestBoardId: z.ZodOptional<z.ZodString>;
|
|
122
123
|
segments: z.ZodArray<z.ZodObject<{
|
|
123
124
|
kind: z.ZodEnum<{
|
|
124
|
-
content: "content";
|
|
125
125
|
hook: "hook";
|
|
126
|
+
content: "content";
|
|
126
127
|
}>;
|
|
127
128
|
text: z.ZodString;
|
|
128
129
|
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -135,8 +136,7 @@ export declare const GenerateVideoShape: {
|
|
|
135
136
|
}, z.core.$strict>>;
|
|
136
137
|
}, z.core.$strict>>>;
|
|
137
138
|
}, z.core.$strict>>;
|
|
138
|
-
|
|
139
|
-
times: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
|
+
language: z.ZodOptional<z.ZodString>;
|
|
140
140
|
persona: z.ZodOptional<z.ZodString>;
|
|
141
141
|
providers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
142
142
|
youtube: "youtube";
|
|
@@ -159,7 +159,11 @@ export declare const GenerateVideoShape: {
|
|
|
159
159
|
export declare const GenerateVideoSchema: z.ZodObject<{
|
|
160
160
|
videos: z.ZodArray<z.ZodObject<{
|
|
161
161
|
description: z.ZodString;
|
|
162
|
-
|
|
162
|
+
experiment: z.ZodOptional<z.ZodObject<{
|
|
163
|
+
experimentId: z.ZodString;
|
|
164
|
+
variantId: z.ZodString;
|
|
165
|
+
pair: z.ZodNumber;
|
|
166
|
+
}, z.core.$strict>>;
|
|
163
167
|
options: z.ZodOptional<z.ZodObject<{
|
|
164
168
|
videoType: z.ZodEnum<{
|
|
165
169
|
full_lipsync: "full_lipsync";
|
|
@@ -186,22 +190,19 @@ export declare const GenerateVideoSchema: z.ZodObject<{
|
|
|
186
190
|
language: z.ZodOptional<z.ZodString>;
|
|
187
191
|
niche: z.ZodOptional<z.ZodString>;
|
|
188
192
|
}, z.core.$strip>>;
|
|
189
|
-
|
|
190
|
-
|
|
193
|
+
title: z.ZodString;
|
|
194
|
+
startAt: z.ZodOptional<z.ZodString>;
|
|
195
|
+
times: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
191
196
|
timezone: z.ZodDefault<z.ZodString>;
|
|
192
|
-
experiment: z.ZodOptional<z.ZodObject<{
|
|
193
|
-
experimentId: z.ZodString;
|
|
194
|
-
variantId: z.ZodString;
|
|
195
|
-
pair: z.ZodNumber;
|
|
196
|
-
}, z.core.$strict>>;
|
|
197
197
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
198
198
|
scheduled: "scheduled";
|
|
199
199
|
asap: "asap";
|
|
200
200
|
}>>;
|
|
201
|
+
pinterestBoardId: z.ZodOptional<z.ZodString>;
|
|
201
202
|
segments: z.ZodArray<z.ZodObject<{
|
|
202
203
|
kind: z.ZodEnum<{
|
|
203
|
-
content: "content";
|
|
204
204
|
hook: "hook";
|
|
205
|
+
content: "content";
|
|
205
206
|
}>;
|
|
206
207
|
text: z.ZodString;
|
|
207
208
|
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -214,8 +215,7 @@ export declare const GenerateVideoSchema: z.ZodObject<{
|
|
|
214
215
|
}, z.core.$strict>>;
|
|
215
216
|
}, z.core.$strict>>>;
|
|
216
217
|
}, z.core.$strict>>;
|
|
217
|
-
|
|
218
|
-
times: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
218
|
+
language: z.ZodOptional<z.ZodString>;
|
|
219
219
|
persona: z.ZodOptional<z.ZodString>;
|
|
220
220
|
providers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
221
221
|
youtube: "youtube";
|
package/dist/generate-video.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { getPersonaPublishingAccounts } from './client-publishing-accounts.js';
|
|
3
|
+
import { MalformedContractResponseError } from './contract-response.js';
|
|
3
4
|
import { getErrorMessage } from './errors.js';
|
|
4
5
|
import { BATCH_FREE_EVERY, BATCH_KEY_MAX_LENGTH, BATCH_KEY_PATTERN, BATCH_WINDOW_MINUTES, MAX_BATCH_VIDEOS } from './limits.js';
|
|
5
6
|
import { createRefResolvers } from './refs.js';
|
|
@@ -88,7 +89,18 @@ function withVideoPrefix(response, index, total) {
|
|
|
88
89
|
}
|
|
89
90
|
/** The persona's bound accounts per provider, from GET /api/persona/publishing-accounts. */
|
|
90
91
|
async function boundAccounts(client, personaId) {
|
|
91
|
-
|
|
92
|
+
let payload;
|
|
93
|
+
try {
|
|
94
|
+
payload = await getPersonaPublishingAccounts(client, personaId);
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
// A malformed binding is no binding (the video then fails with "no
|
|
98
|
+
// bound publishing accounts"); a transport failure still propagates
|
|
99
|
+
// and surfaces as "Error reading the persona's publishing accounts".
|
|
100
|
+
if (error instanceof MalformedContractResponseError)
|
|
101
|
+
return new Map();
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
92
104
|
const defaults = typeof payload === 'object' && payload !== null ? payload.defaults : undefined;
|
|
93
105
|
const bound = new Map();
|
|
94
106
|
if (typeof defaults !==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AO,eAAe,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAChG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,2BAA2B,CAAC,MAAM,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;QACzG,OAAO,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;IACzE,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,+BAA+B,CAAC,MAAM,EAAE;QAC7D,QAAQ,EAAE,QAAkB;QAC5B,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;YACjC,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;YACxG,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC;KACH,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;AACzE,CAAC"}
|
package/dist/intent-content.js
CHANGED
|
@@ -41,7 +41,7 @@ export function registerContentTools(server, client, session, remote) {
|
|
|
41
41
|
upload: async (args) => handleUploadMedia(client, args),
|
|
42
42
|
check: async (args) => handleCheckMedia(client, args),
|
|
43
43
|
}, MEDIA_SPECS, 'media', mediaOptions));
|
|
44
|
-
server.tool('check_script', actionDescription('Check a script before spending tokens. validate: the mechanical rules (hook first, exactly one hook, no placeholders/links/markdown/emoji/stage directions, hook terminal punctuation, word limits: total 60-200, content at least 30, hook
|
|
44
|
+
server.tool('check_script', actionDescription('Check a script before spending tokens. validate: the mechanical rules (hook first, exactly one hook, no placeholders/links/markdown/emoji/stage directions, hook terminal punctuation, word limits: total 60-200, content at least 30, hook 25-40 words; a CTA is a content take, placed anywhere), no tokens spent. score: a 0-100 score of a draft against your own measured posts, every point explained.', CHECK_SCRIPT_SPECS), actionShape(CHECK_SCRIPT_SPECS), READ_ONLY, byAction({
|
|
45
45
|
validate: withScriptOutcome(session, 'check_script_validate', async (args) => handleValidateScript(client, args), (args) => [{ segments: args.segments, videoType: args.videoType }]),
|
|
46
46
|
score: (args) => withOptionalPersona(client, args, (resolved) => handleScoreDraft(client, resolved)),
|
|
47
47
|
}, CHECK_SCRIPT_SPECS, 'check_script'));
|
package/dist/intent-personas.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { actionDescription, actionShape, byAction, offeredSpecs } from './action-tool.js';
|
|
3
3
|
import { getPersonaPublishingAccounts } from './client-publishing-accounts.js';
|
|
4
|
+
import { MalformedContractResponseError } from './contract-response.js';
|
|
4
5
|
import { handlePersonaDelete } from './persona-delete.js';
|
|
5
6
|
import { UpdatePersonaShape, handleUpdatePersona } from './persona-update.js';
|
|
6
7
|
import { PERSONA_REF, personaRefShape, withPersona } from './refs.js';
|
|
@@ -35,16 +36,25 @@ async function getPersona(client, args) {
|
|
|
35
36
|
return handleLibraryCall(async () => {
|
|
36
37
|
const [listing, images, publishing] = await Promise.all([
|
|
37
38
|
client.listPersonas(),
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
// A malformed library listing degrades to a null size (same as a
|
|
40
|
+
// missing one); a transport failure still fails the read.
|
|
41
|
+
client.listPersonaImages(args.personaId).catch((error) => {
|
|
42
|
+
if (error instanceof MalformedContractResponseError)
|
|
43
|
+
return undefined;
|
|
44
|
+
throw error;
|
|
45
|
+
}),
|
|
46
|
+
// A malformed binding degrades to null bindings (same as a missing
|
|
47
|
+
// one); a transport failure still fails the read.
|
|
48
|
+
getPersonaPublishingAccounts(client, args.personaId).catch((error) => {
|
|
49
|
+
if (error instanceof MalformedContractResponseError)
|
|
50
|
+
return undefined;
|
|
51
|
+
throw error;
|
|
52
|
+
}),
|
|
40
53
|
]);
|
|
41
|
-
const
|
|
42
|
-
const persona = Array.isArray(personas) ? personas.find((entry) => typeof entry === 'object' && entry !== null && entry.id === args.personaId) : undefined;
|
|
54
|
+
const persona = listing.personas.find((entry) => entry.id === args.personaId);
|
|
43
55
|
if (persona === undefined)
|
|
44
56
|
throw new Error(`No persona with id ${args.personaId}. Call personas with action "list" to see them.`);
|
|
45
|
-
|
|
46
|
-
const defaults = typeof publishing === 'object' && publishing !== null ? publishing.defaults : undefined;
|
|
47
|
-
return { persona, libraryImages: Array.isArray(imageList) ? imageList.length : null, boundAccounts: defaults ?? null };
|
|
57
|
+
return { persona, libraryImages: images?.images.length ?? null, boundAccounts: publishing?.defaults ?? null };
|
|
48
58
|
}, 'getting persona');
|
|
49
59
|
}
|
|
50
60
|
export function registerPersonaTools(server, client, session, remote) {
|