post-engineer-mcp 1.35.0 → 1.37.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/README.md +10 -8
- package/dist/client-types.d.ts +5 -4
- package/dist/client.js +6 -10
- package/dist/client.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +1 -1
- package/dist/limits.js +1 -1
- package/dist/limits.js.map +1 -1
- package/dist/prompt-base.js +19 -9
- package/dist/prompt-base.js.map +1 -1
- package/dist/prompts.js +6 -3
- package/dist/prompts.js.map +1 -1
- package/dist/schedule-shapes.d.ts +1 -1
- package/dist/schedule-shapes.js +2 -1
- package/dist/schedule-shapes.js.map +1 -1
- package/dist/single-video-shape.d.ts +10 -6
- package/dist/single-video-shape.js +2 -1
- package/dist/single-video-shape.js.map +1 -1
- package/dist/tools-posts.d.ts +4 -4
- package/dist/tools-single-video.d.ts +5 -5
- package/dist/tools-single-video.js +14 -2
- package/dist/tools-single-video.js.map +1 -1
- package/dist/tools.d.ts +16 -16
- package/dist/tools.js +21 -24
- package/dist/tools.js.map +1 -1
- package/dist/voice-filters.d.ts +45 -0
- package/dist/voice-filters.js +269 -3
- package/dist/voice-filters.js.map +1 -1
- package/package.json +1 -1
|
@@ -49,11 +49,12 @@ export declare const GeneratePersonaVideoShape: {
|
|
|
49
49
|
}>, "many">;
|
|
50
50
|
title: z.ZodString;
|
|
51
51
|
language: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
52
|
-
providers: z.ZodArray<z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky"]>, "many">;
|
|
52
|
+
providers: z.ZodArray<z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky", "threads"]>, "many">;
|
|
53
53
|
youtubeAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
54
54
|
instagramAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
55
55
|
linkedinAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
56
56
|
blueskyAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
57
|
+
threadsAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
57
58
|
mode: z.ZodDefault<z.ZodEnum<["scheduled", "asap"]>>;
|
|
58
59
|
startAt: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
59
60
|
times: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -63,7 +64,7 @@ export declare const GeneratePersonaVideoShape: {
|
|
|
63
64
|
facelessMaterial: z.ZodOptional<z.ZodEnum<["broll", "svg"]>>;
|
|
64
65
|
audioUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
65
66
|
imageId: z.ZodOptional<z.ZodString>;
|
|
66
|
-
voiceId: z.ZodOptional<z.ZodString
|
|
67
|
+
voiceId: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<[string, ...string[]]>, z.ZodString]>, string, string>>;
|
|
67
68
|
webhookUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
68
69
|
videoAspect: z.ZodOptional<z.ZodEnum<["9:16", "16:9"]>>;
|
|
69
70
|
videoLayout: z.ZodOptional<z.ZodEnum<["standard", "react"]>>;
|
|
@@ -132,11 +133,12 @@ export declare const GeneratePersonaVideoSchema: z.ZodObject<{
|
|
|
132
133
|
}>, "many">;
|
|
133
134
|
title: z.ZodString;
|
|
134
135
|
language: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
135
|
-
providers: z.ZodArray<z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky"]>, "many">;
|
|
136
|
+
providers: z.ZodArray<z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky", "threads"]>, "many">;
|
|
136
137
|
youtubeAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
137
138
|
instagramAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
138
139
|
linkedinAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
139
140
|
blueskyAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
141
|
+
threadsAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
140
142
|
mode: z.ZodDefault<z.ZodEnum<["scheduled", "asap"]>>;
|
|
141
143
|
startAt: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
142
144
|
times: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -146,7 +148,7 @@ export declare const GeneratePersonaVideoSchema: z.ZodObject<{
|
|
|
146
148
|
facelessMaterial: z.ZodOptional<z.ZodEnum<["broll", "svg"]>>;
|
|
147
149
|
audioUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
148
150
|
imageId: z.ZodOptional<z.ZodString>;
|
|
149
|
-
voiceId: z.ZodOptional<z.ZodString
|
|
151
|
+
voiceId: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<[string, ...string[]]>, z.ZodString]>, string, string>>;
|
|
150
152
|
webhookUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
151
153
|
videoAspect: z.ZodOptional<z.ZodEnum<["9:16", "16:9"]>>;
|
|
152
154
|
videoLayout: z.ZodOptional<z.ZodEnum<["standard", "react"]>>;
|
|
@@ -182,7 +184,7 @@ export declare const GeneratePersonaVideoSchema: z.ZodObject<{
|
|
|
182
184
|
}, "strip", z.ZodTypeAny, {
|
|
183
185
|
timezone: string;
|
|
184
186
|
title: string;
|
|
185
|
-
providers: ("youtube" | "instagram" | "bluesky" | "linkedin")[];
|
|
187
|
+
providers: ("youtube" | "instagram" | "bluesky" | "linkedin" | "threads")[];
|
|
186
188
|
segments: {
|
|
187
189
|
kind: "hook" | "body" | "cta";
|
|
188
190
|
text: string;
|
|
@@ -196,6 +198,7 @@ export declare const GeneratePersonaVideoSchema: z.ZodObject<{
|
|
|
196
198
|
language?: string | undefined;
|
|
197
199
|
personaId?: string | undefined;
|
|
198
200
|
linkedinAccountIds?: string[] | undefined;
|
|
201
|
+
threadsAccountIds?: string[] | undefined;
|
|
199
202
|
options?: {
|
|
200
203
|
voiceId?: string | undefined;
|
|
201
204
|
language?: string | undefined;
|
|
@@ -217,7 +220,7 @@ export declare const GeneratePersonaVideoSchema: z.ZodObject<{
|
|
|
217
220
|
idempotencyKey?: string | undefined;
|
|
218
221
|
}, {
|
|
219
222
|
title: string;
|
|
220
|
-
providers: ("youtube" | "instagram" | "bluesky" | "linkedin")[];
|
|
223
|
+
providers: ("youtube" | "instagram" | "bluesky" | "linkedin" | "threads")[];
|
|
221
224
|
segments: {
|
|
222
225
|
kind: "hook" | "body" | "cta";
|
|
223
226
|
text: string;
|
|
@@ -231,6 +234,7 @@ export declare const GeneratePersonaVideoSchema: z.ZodObject<{
|
|
|
231
234
|
personaId?: string | undefined;
|
|
232
235
|
timezone?: string | undefined;
|
|
233
236
|
linkedinAccountIds?: string[] | undefined;
|
|
237
|
+
threadsAccountIds?: string[] | undefined;
|
|
234
238
|
options?: {
|
|
235
239
|
voiceId?: string | undefined;
|
|
236
240
|
language?: string | undefined;
|
|
@@ -35,13 +35,14 @@ export const GeneratePersonaVideoShape = {
|
|
|
35
35
|
.optional()
|
|
36
36
|
.describe('Spoken language code — English only for now, e.g. en-US.'),
|
|
37
37
|
providers: z
|
|
38
|
-
.array(z.enum(['youtube', 'instagram', 'linkedin', 'bluesky']))
|
|
38
|
+
.array(z.enum(['youtube', 'instagram', 'linkedin', 'bluesky', 'threads']))
|
|
39
39
|
.min(1, 'Provide at least one provider')
|
|
40
40
|
.describe('Where to publish the video.'),
|
|
41
41
|
youtubeAccountIds: z.array(z.string().min(1)).optional().describe('YouTube channel IDs (the channelId field from list_social_accounts).'),
|
|
42
42
|
instagramAccountIds: z.array(z.string().min(1)).optional().describe('Instagram account IDs (the igUserId field from list_social_accounts).'),
|
|
43
43
|
linkedinAccountIds: z.array(z.string().min(1)).optional().describe('LinkedIn account IDs (the providerAccountId field from list_social_accounts).'),
|
|
44
44
|
blueskyAccountIds: z.array(z.string().min(1)).optional().describe('Bluesky DIDs (the did field from list_social_accounts).'),
|
|
45
|
+
threadsAccountIds: z.array(z.string().min(1)).optional().describe('Threads account IDs (the providerAccountId field from list_social_accounts).'),
|
|
45
46
|
mode: z
|
|
46
47
|
.enum(['scheduled', 'asap'])
|
|
47
48
|
.default('scheduled')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-video-shape.js","sourceRoot":"","sources":["../src/single-video-shape.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,wEAAwE;AACxE,2EAA2E;AAC3E,qDAAqD;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,uFAAuF,CAAC;IACvI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,qCAAqC,CAAC,CAAC,QAAQ,CAAC,gFAAgF,CAAC;IACzJ,KAAK,EAAE,CAAC;SACL,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;SACpF,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,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kIAAkI,CAAC;CAC1L,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAE9E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ,EAAE,CAAC;SACR,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,MAAM,EAAE,CAAC;SAC5C,GAAG,CAAC,CAAC,EAAE,8BAA8B,CAAC;SACtC,GAAG,CAAC,EAAE,EAAE,+BAA+B,CAAC;SACxC,QAAQ,CAAC,oFAAoF,CAAC;CAClG,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC"}
|
package/dist/tools-posts.d.ts
CHANGED
|
@@ -15,24 +15,24 @@ export declare const GetPostMetricsShape: {
|
|
|
15
15
|
window: z.ZodEnum<["24h", "7d"]>;
|
|
16
16
|
persona: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
17
17
|
account: z.ZodOptional<z.ZodString>;
|
|
18
|
-
provider: z.ZodOptional<z.ZodEnum<["youtube", "instagram", "bluesky", "linkedin"]>>;
|
|
18
|
+
provider: z.ZodOptional<z.ZodEnum<["youtube", "instagram", "bluesky", "linkedin", "threads"]>>;
|
|
19
19
|
angle: z.ZodOptional<z.ZodString>;
|
|
20
20
|
};
|
|
21
21
|
export declare const GetPostMetricsSchema: z.ZodObject<{
|
|
22
22
|
window: z.ZodEnum<["24h", "7d"]>;
|
|
23
23
|
persona: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
24
24
|
account: z.ZodOptional<z.ZodString>;
|
|
25
|
-
provider: z.ZodOptional<z.ZodEnum<["youtube", "instagram", "bluesky", "linkedin"]>>;
|
|
25
|
+
provider: z.ZodOptional<z.ZodEnum<["youtube", "instagram", "bluesky", "linkedin", "threads"]>>;
|
|
26
26
|
angle: z.ZodOptional<z.ZodString>;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
28
|
window: "24h" | "7d";
|
|
29
|
-
provider?: "youtube" | "instagram" | "bluesky" | "linkedin" | undefined;
|
|
29
|
+
provider?: "youtube" | "instagram" | "bluesky" | "linkedin" | "threads" | undefined;
|
|
30
30
|
persona?: string | undefined;
|
|
31
31
|
account?: string | undefined;
|
|
32
32
|
angle?: string | undefined;
|
|
33
33
|
}, {
|
|
34
34
|
window: "24h" | "7d";
|
|
35
|
-
provider?: "youtube" | "instagram" | "bluesky" | "linkedin" | undefined;
|
|
35
|
+
provider?: "youtube" | "instagram" | "bluesky" | "linkedin" | "threads" | undefined;
|
|
36
36
|
persona?: string | undefined;
|
|
37
37
|
account?: string | undefined;
|
|
38
38
|
angle?: string | undefined;
|
|
@@ -10,25 +10,25 @@ export declare function handleGeneratePersonaVideo(client: PostEngineerClient, a
|
|
|
10
10
|
export declare const ValidateScriptDescription = "Validate a segments script mechanically, without spending tokens: hook first, CTA last, exactly one of each, no placeholders/links/markdown/emoji/stage directions, hook terminal punctuation, word limits (total 60-200, body at least 30, CTA 5-20, hook 15-40 words before TTS). Returns the word counts and the hook window (8-12 seconds spoken). Measured hook duration is pending a hook-only TTS endpoint and is reported as pending, never invented.";
|
|
11
11
|
export declare const ScoreDraftShape: {
|
|
12
12
|
draft: z.ZodString;
|
|
13
|
-
network: z.ZodOptional<z.ZodEnum<["linkedin", "youtube", "instagram", "bluesky"]>>;
|
|
13
|
+
network: z.ZodOptional<z.ZodEnum<["linkedin", "youtube", "instagram", "bluesky", "threads"]>>;
|
|
14
14
|
personaId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
15
15
|
kind: z.ZodOptional<z.ZodEnum<["post", "script"]>>;
|
|
16
16
|
};
|
|
17
17
|
export declare const ScoreDraftSchema: z.ZodObject<{
|
|
18
18
|
draft: z.ZodString;
|
|
19
|
-
network: z.ZodOptional<z.ZodEnum<["linkedin", "youtube", "instagram", "bluesky"]>>;
|
|
19
|
+
network: z.ZodOptional<z.ZodEnum<["linkedin", "youtube", "instagram", "bluesky", "threads"]>>;
|
|
20
20
|
personaId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
21
21
|
kind: z.ZodOptional<z.ZodEnum<["post", "script"]>>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
draft: string;
|
|
24
24
|
personaId?: string | undefined;
|
|
25
|
-
network?: "youtube" | "instagram" | "bluesky" | "linkedin" | undefined;
|
|
25
|
+
network?: "youtube" | "instagram" | "bluesky" | "linkedin" | "threads" | undefined;
|
|
26
26
|
kind?: "post" | "script" | undefined;
|
|
27
27
|
}, {
|
|
28
28
|
draft: string;
|
|
29
29
|
personaId?: string | undefined;
|
|
30
|
-
network?: "youtube" | "instagram" | "bluesky" | "linkedin" | undefined;
|
|
30
|
+
network?: "youtube" | "instagram" | "bluesky" | "linkedin" | "threads" | undefined;
|
|
31
31
|
kind?: "post" | "script" | undefined;
|
|
32
32
|
}>;
|
|
33
|
-
export declare const ScoreDraftDescription = "Score a draft mechanically against the caller's own measured posts, without spending tokens. Returns a 0-100 score where every point is explained (hook, length, hashtags, slop markers, links, top-theme match, call to action), the baseline it was scored against (top angles by engagement), and the publish check for the requested network (linkedin, youtube, instagram, bluesky): it fails only on an empty draft or the network's own ceiling where this repo has evidence for it (LinkedIn 3000 characters, Bluesky 300 graphemes); the rest are warnings. A failing publish check means: fix the draft before scheduling it for that network. Pass kind 'script' for a video script (segments joined by newlines, hook first, CTA last): hashtags are not scored and publishCheck is null.";
|
|
33
|
+
export declare const ScoreDraftDescription = "Score a draft mechanically against the caller's own measured posts, without spending tokens. Returns a 0-100 score where every point is explained (hook, length, hashtags, slop markers, links, top-theme match, call to action), the baseline it was scored against (top angles by engagement), and the publish check for the requested network (linkedin, youtube, instagram, bluesky, threads): it fails only on an empty draft or the network's own ceiling where this repo has evidence for it (LinkedIn 3000 characters, Threads 500 characters, Bluesky 300 graphemes); the rest are warnings. A failing publish check means: fix the draft before scheduling it for that network. Pass kind 'script' for a video script (segments joined by newlines, hook first, CTA last): hashtags are not scored and publishCheck is null.";
|
|
34
34
|
export declare function handleScoreDraft(client: PostEngineerClient, args: z.infer<typeof ScoreDraftSchema>): Promise<McpToolResponse>;
|
|
@@ -15,6 +15,7 @@ import { scoreDraft } from './client-posts.js';
|
|
|
15
15
|
import { getErrorMessage } from './errors.js';
|
|
16
16
|
import { sanitizeEngineError } from './tools.js';
|
|
17
17
|
import { HOOK_MAX_SECONDS, HOOK_MIN_SECONDS, countWords, joinSegments, validateSegments, } from './script-segments.js';
|
|
18
|
+
import { resolvePersonaVoiceId } from './voice-filters.js';
|
|
18
19
|
export { GeneratePersonaVideoShape, ValidateScriptShape } from './single-video-shape.js';
|
|
19
20
|
function errorResponse(message) {
|
|
20
21
|
return { content: [{ type: 'text', text: message }], isError: true };
|
|
@@ -92,6 +93,15 @@ export async function handleGeneratePersonaVideo(client, args) {
|
|
|
92
93
|
throw new Error(`${result.error.field}: ${result.error.rule} Fix: ${result.error.fix}`);
|
|
93
94
|
}
|
|
94
95
|
const script = joinSegments(args.segments);
|
|
96
|
+
// Voice resolution is an explicit pre-step after mechanical validation
|
|
97
|
+
// and before the generating call: an unknown voice fails without
|
|
98
|
+
// debiting tokens. A bare name/label resolves here (issue #353); with
|
|
99
|
+
// no voiceId (or options with only audioUrl) there is nothing to
|
|
100
|
+
// resolve — the persona's stored voice is used.
|
|
101
|
+
let voiceId = args.options?.voiceId;
|
|
102
|
+
if (voiceId !== undefined) {
|
|
103
|
+
voiceId = await resolvePersonaVoiceId(client, voiceId, 'generate_persona_video');
|
|
104
|
+
}
|
|
95
105
|
// The shape advertises a top-level language, but the web route only
|
|
96
106
|
// reads options.language: forward it there unless options already
|
|
97
107
|
// sets one, or the top-level value is silently dropped.
|
|
@@ -104,12 +114,14 @@ export async function handleGeneratePersonaVideo(client, args) {
|
|
|
104
114
|
instagramAccountIds: args.instagramAccountIds,
|
|
105
115
|
linkedinAccountIds: args.linkedinAccountIds,
|
|
106
116
|
blueskyAccountIds: args.blueskyAccountIds,
|
|
117
|
+
threadsAccountIds: args.threadsAccountIds,
|
|
107
118
|
mode,
|
|
108
119
|
startAt: args.startAt,
|
|
109
120
|
times: args.times,
|
|
110
121
|
timezone: args.timezone,
|
|
111
122
|
options: {
|
|
112
123
|
...args.options,
|
|
124
|
+
voiceId,
|
|
113
125
|
segments: args.segments,
|
|
114
126
|
...(language === undefined ? {} : { language }),
|
|
115
127
|
},
|
|
@@ -171,7 +183,7 @@ export const ScoreDraftShape = {
|
|
|
171
183
|
.max(10000, 'draft must be at most 10000 characters')
|
|
172
184
|
.describe('The text to score: a post body, or with kind "script" the video segments joined by newlines, hook first, CTA last.'),
|
|
173
185
|
network: z
|
|
174
|
-
.enum(['linkedin', 'youtube', 'instagram', 'bluesky'])
|
|
186
|
+
.enum(['linkedin', 'youtube', 'instagram', 'bluesky', 'threads'])
|
|
175
187
|
.optional()
|
|
176
188
|
.describe('Network the draft is for; the publish check uses that network\'s rules. Defaults to linkedin.'),
|
|
177
189
|
personaId: z
|
|
@@ -182,7 +194,7 @@ export const ScoreDraftShape = {
|
|
|
182
194
|
kind: z.enum(['post', 'script']).optional().describe('What the text is. Defaults to post.'),
|
|
183
195
|
};
|
|
184
196
|
export const ScoreDraftSchema = z.object(ScoreDraftShape);
|
|
185
|
-
export const ScoreDraftDescription = 'Score a draft mechanically against the caller\'s own measured posts, without spending tokens. Returns a 0-100 score where every point is explained (hook, length, hashtags, slop markers, links, top-theme match, call to action), the baseline it was scored against (top angles by engagement), and the publish check for the requested network (linkedin, youtube, instagram, bluesky): it fails only on an empty draft or the network\'s own ceiling where this repo has evidence for it (LinkedIn 3000 characters, Bluesky 300 graphemes); the rest are warnings. A failing publish check means: fix the draft before scheduling it for that network. Pass kind \'script\' for a video script (segments joined by newlines, hook first, CTA last): hashtags are not scored and publishCheck is null.';
|
|
197
|
+
export const ScoreDraftDescription = 'Score a draft mechanically against the caller\'s own measured posts, without spending tokens. Returns a 0-100 score where every point is explained (hook, length, hashtags, slop markers, links, top-theme match, call to action), the baseline it was scored against (top angles by engagement), and the publish check for the requested network (linkedin, youtube, instagram, bluesky, threads): it fails only on an empty draft or the network\'s own ceiling where this repo has evidence for it (LinkedIn 3000 characters, Threads 500 characters, Bluesky 300 graphemes); the rest are warnings. A failing publish check means: fix the draft before scheduling it for that network. Pass kind \'script\' for a video script (segments joined by newlines, hook first, CTA last): hashtags are not scored and publishCheck is null.';
|
|
186
198
|
export async function handleScoreDraft(client, args) {
|
|
187
199
|
try {
|
|
188
200
|
const result = await scoreDraft(client, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools-single-video.js","sourceRoot":"","sources":["../src/tools-single-video.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,kDAAkD;AAClD,6DAA6D;AAC7D,4EAA4E;AAC5E,uEAAuE;AACvE,sEAAsE;AACtE,yEAAyE;AACzE,yEAAyE;AACzE,wEAAwE;AACxE,uEAAuE;AACvE,oEAAoE;AACpE,oCAAoC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools-single-video.js","sourceRoot":"","sources":["../src/tools-single-video.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,kDAAkD;AAClD,6DAA6D;AAC7D,4EAA4E;AAC5E,uEAAuE;AACvE,sEAAsE;AACtE,yEAAyE;AACzE,yEAAyE;AACzE,wEAAwE;AACxE,uEAAuE;AACvE,oEAAoE;AACpE,oCAAoC;AACpC,OA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KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,+DAA+D;QAC/D,oEAAoE;QACpE,SAAS;QACT,OAAO,aAAa,CAAC,wBAAwB,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9F,CAAC;AACH,CAAC"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type { McpToolResponse } from './tools-call.js';
|
|
|
8
8
|
export declare const CreatePersonaShape: {
|
|
9
9
|
name: z.ZodString;
|
|
10
10
|
avatarUrl: z.ZodString;
|
|
11
|
-
voiceId: z.ZodString
|
|
11
|
+
voiceId: z.ZodEffects<z.ZodUnion<[z.ZodEnum<[string, ...string[]]>, z.ZodString]>, string, string>;
|
|
12
12
|
language: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
13
13
|
videoAspect: z.ZodDefault<z.ZodEnum<["9:16", "16:9"]>>;
|
|
14
14
|
videoLayout: z.ZodDefault<z.ZodEnum<["standard", "react"]>>;
|
|
@@ -34,7 +34,7 @@ export declare const CreatePersonaShape: {
|
|
|
34
34
|
export declare const CreatePersonaSchema: z.ZodObject<{
|
|
35
35
|
name: z.ZodString;
|
|
36
36
|
avatarUrl: z.ZodString;
|
|
37
|
-
voiceId: z.ZodString
|
|
37
|
+
voiceId: z.ZodEffects<z.ZodUnion<[z.ZodEnum<[string, ...string[]]>, z.ZodString]>, string, string>;
|
|
38
38
|
language: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
39
39
|
videoAspect: z.ZodDefault<z.ZodEnum<["9:16", "16:9"]>>;
|
|
40
40
|
videoLayout: z.ZodDefault<z.ZodEnum<["standard", "react"]>>;
|
|
@@ -101,7 +101,7 @@ export declare const UpdatePersonaShape: {
|
|
|
101
101
|
personaId: z.ZodString;
|
|
102
102
|
name: z.ZodOptional<z.ZodString>;
|
|
103
103
|
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
104
|
-
voiceId: z.ZodOptional<z.ZodString
|
|
104
|
+
voiceId: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<[string, ...string[]]>, z.ZodString]>, string, string>>;
|
|
105
105
|
language: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
106
106
|
videoAspect: z.ZodOptional<z.ZodEnum<["9:16", "16:9"]>>;
|
|
107
107
|
videoLayout: z.ZodOptional<z.ZodEnum<["standard", "react"]>>;
|
|
@@ -113,7 +113,7 @@ export declare const UpdatePersonaSchema: z.ZodObject<{
|
|
|
113
113
|
personaId: z.ZodString;
|
|
114
114
|
name: z.ZodOptional<z.ZodString>;
|
|
115
115
|
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
116
|
-
voiceId: z.ZodOptional<z.ZodString
|
|
116
|
+
voiceId: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<[string, ...string[]]>, z.ZodString]>, string, string>>;
|
|
117
117
|
language: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
118
118
|
videoAspect: z.ZodOptional<z.ZodEnum<["9:16", "16:9"]>>;
|
|
119
119
|
videoLayout: z.ZodOptional<z.ZodEnum<["standard", "react"]>>;
|
|
@@ -146,20 +146,20 @@ export declare const UpdatePersonaSchema: z.ZodObject<{
|
|
|
146
146
|
export declare const ListSocialAccountsShape: {};
|
|
147
147
|
export declare const ListSocialAccountsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
148
148
|
export declare const ConnectAccountShape: {
|
|
149
|
-
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky"]>;
|
|
149
|
+
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky", "threads"]>;
|
|
150
150
|
handle: z.ZodOptional<z.ZodString>;
|
|
151
151
|
appPassword: z.ZodOptional<z.ZodString>;
|
|
152
152
|
};
|
|
153
153
|
export declare const ConnectAccountSchema: z.ZodObject<{
|
|
154
|
-
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky"]>;
|
|
154
|
+
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky", "threads"]>;
|
|
155
155
|
handle: z.ZodOptional<z.ZodString>;
|
|
156
156
|
appPassword: z.ZodOptional<z.ZodString>;
|
|
157
157
|
}, "strip", z.ZodTypeAny, {
|
|
158
|
-
provider: "youtube" | "instagram" | "bluesky" | "linkedin";
|
|
158
|
+
provider: "youtube" | "instagram" | "bluesky" | "linkedin" | "threads";
|
|
159
159
|
handle?: string | undefined;
|
|
160
160
|
appPassword?: string | undefined;
|
|
161
161
|
}, {
|
|
162
|
-
provider: "youtube" | "instagram" | "bluesky" | "linkedin";
|
|
162
|
+
provider: "youtube" | "instagram" | "bluesky" | "linkedin" | "threads";
|
|
163
163
|
handle?: string | undefined;
|
|
164
164
|
appPassword?: string | undefined;
|
|
165
165
|
}>;
|
|
@@ -218,17 +218,17 @@ export declare const DeletePersonaSchema: z.ZodObject<{
|
|
|
218
218
|
personaId: string;
|
|
219
219
|
}>;
|
|
220
220
|
export declare const DisconnectAccountShape: {
|
|
221
|
-
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky"]>;
|
|
221
|
+
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky", "threads"]>;
|
|
222
222
|
providerAccountId: z.ZodString;
|
|
223
223
|
};
|
|
224
224
|
export declare const DisconnectAccountSchema: z.ZodObject<{
|
|
225
|
-
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky"]>;
|
|
225
|
+
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky", "threads"]>;
|
|
226
226
|
providerAccountId: z.ZodString;
|
|
227
227
|
}, "strip", z.ZodTypeAny, {
|
|
228
|
-
provider: "youtube" | "instagram" | "bluesky" | "linkedin";
|
|
228
|
+
provider: "youtube" | "instagram" | "bluesky" | "linkedin" | "threads";
|
|
229
229
|
providerAccountId: string;
|
|
230
230
|
}, {
|
|
231
|
-
provider: "youtube" | "instagram" | "bluesky" | "linkedin";
|
|
231
|
+
provider: "youtube" | "instagram" | "bluesky" | "linkedin" | "threads";
|
|
232
232
|
providerAccountId: string;
|
|
233
233
|
}>;
|
|
234
234
|
export declare const GetTokenBalanceShape: {};
|
|
@@ -367,7 +367,7 @@ export declare function handleGetVideoStatus(client: PostEngineerClient, args: z
|
|
|
367
367
|
export declare function sanitizeEngineError(error: string): string;
|
|
368
368
|
export declare function handleGetVideoTaskProgress(client: PostEngineerClient, args: z.infer<typeof GetVideoTaskProgressSchema>): Promise<McpToolResponse>;
|
|
369
369
|
export declare const PublishVideoDirectShape: {
|
|
370
|
-
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky"]>;
|
|
370
|
+
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky", "threads"]>;
|
|
371
371
|
videoPath: z.ZodString;
|
|
372
372
|
accountIds: z.ZodArray<z.ZodString, "many">;
|
|
373
373
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -377,7 +377,7 @@ export declare const PublishVideoDirectShape: {
|
|
|
377
377
|
caption: z.ZodOptional<z.ZodString>;
|
|
378
378
|
};
|
|
379
379
|
export declare const PublishVideoDirectSchema: z.ZodObject<{
|
|
380
|
-
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky"]>;
|
|
380
|
+
provider: z.ZodEnum<["youtube", "instagram", "linkedin", "bluesky", "threads"]>;
|
|
381
381
|
videoPath: z.ZodString;
|
|
382
382
|
accountIds: z.ZodArray<z.ZodString, "many">;
|
|
383
383
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -386,7 +386,7 @@ export declare const PublishVideoDirectSchema: z.ZodObject<{
|
|
|
386
386
|
privacyStatus: z.ZodOptional<z.ZodEnum<["public", "private", "unlisted"]>>;
|
|
387
387
|
caption: z.ZodOptional<z.ZodString>;
|
|
388
388
|
}, "strip", z.ZodTypeAny, {
|
|
389
|
-
provider: "youtube" | "instagram" | "bluesky" | "linkedin";
|
|
389
|
+
provider: "youtube" | "instagram" | "bluesky" | "linkedin" | "threads";
|
|
390
390
|
accountIds: string[];
|
|
391
391
|
videoPath: string;
|
|
392
392
|
description?: string | undefined;
|
|
@@ -395,7 +395,7 @@ export declare const PublishVideoDirectSchema: z.ZodObject<{
|
|
|
395
395
|
privacyStatus?: "public" | "private" | "unlisted" | undefined;
|
|
396
396
|
caption?: string | undefined;
|
|
397
397
|
}, {
|
|
398
|
-
provider: "youtube" | "instagram" | "bluesky" | "linkedin";
|
|
398
|
+
provider: "youtube" | "instagram" | "bluesky" | "linkedin" | "threads";
|
|
399
399
|
accountIds: string[];
|
|
400
400
|
videoPath: string;
|
|
401
401
|
description?: string | undefined;
|
package/dist/tools.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { filterVoicesPayload, ListVoicesSchema } from './voice-filters.js';
|
|
3
|
+
import { personaVoiceField, withResolvedPersonaVoice, withResolvedPersonaVoiceForUpdate } from './voice-filters.js';
|
|
3
4
|
import { CancelScheduleSchema, CancelScheduleShape, DeleteSlotSchema, DeleteSlotShape, GeneratePersonaVideoOptionsShape, GetSlotSchema, GetSlotShape, ListPostsSchema, ListPostsShape, ListSchedulesSchema, ListSchedulesShape, UpdateSlotTitleSchema, UpdateSlotTitleShape, } from './schedule-shapes.js';
|
|
4
5
|
// Re-exported so existing import sites (`./tools.js`) keep working.
|
|
5
6
|
export { CancelScheduleSchema, CancelScheduleShape, DeleteSlotSchema, DeleteSlotShape, GeneratePersonaVideoOptionsShape, GetSlotSchema, GetSlotShape, ListPostsSchema, ListPostsShape, ListSchedulesSchema, ListSchedulesShape, UpdateSlotTitleSchema, UpdateSlotTitleShape, };
|
|
@@ -26,7 +27,7 @@ export const CreatePersonaShape = {
|
|
|
26
27
|
.string()
|
|
27
28
|
.url()
|
|
28
29
|
.describe('REQUIRED. Public URL to the persona avatar image (use list_faces for stock face URLs). Every persona has a face; "no face" is chosen per video with generate_persona_video options.faceless.'),
|
|
29
|
-
voiceId:
|
|
30
|
+
voiceId: personaVoiceField('voiceId is required').describe('id or label from list_voices. Never type a provider prefix.'),
|
|
30
31
|
language: z
|
|
31
32
|
.string()
|
|
32
33
|
.refine(isEnglishLanguage, { message: ONLY_ENGLISH_VIDEOS_MESSAGE })
|
|
@@ -56,7 +57,7 @@ export const UpdatePersonaShape = {
|
|
|
56
57
|
name: z.string().min(1).optional().describe('New name for the persona'),
|
|
57
58
|
// No .nullable(): the API has no "clear avatar" sentinel — null would be silently ignored.
|
|
58
59
|
avatarUrl: z.string().url().optional().describe('New public avatar image URL'),
|
|
59
|
-
voiceId:
|
|
60
|
+
voiceId: personaVoiceField().optional().describe('New voice id or label from list_voices. Never type a provider prefix.'),
|
|
60
61
|
language: z
|
|
61
62
|
.string()
|
|
62
63
|
.refine(isEnglishLanguage, { message: ONLY_ENGLISH_VIDEOS_MESSAGE })
|
|
@@ -72,7 +73,7 @@ export const UpdatePersonaSchema = z.object(UpdatePersonaShape);
|
|
|
72
73
|
export const ListSocialAccountsShape = {};
|
|
73
74
|
export const ListSocialAccountsSchema = z.object(ListSocialAccountsShape);
|
|
74
75
|
export const ConnectAccountShape = {
|
|
75
|
-
provider: z.enum(['youtube', 'instagram', 'linkedin', 'bluesky']).describe('The social platform to connect'),
|
|
76
|
+
provider: z.enum(['youtube', 'instagram', 'linkedin', 'bluesky', 'threads']).describe('The social platform to connect'),
|
|
76
77
|
handle: z.string().min(1).optional().describe('Bluesky handle (e.g. user.bsky.social). Required only for bluesky.'),
|
|
77
78
|
appPassword: z.string().min(1).optional().describe('Bluesky app password (Settings > App passwords). Required only for bluesky. Never shared or logged.'),
|
|
78
79
|
};
|
|
@@ -126,7 +127,7 @@ export const DeletePersonaShape = {
|
|
|
126
127
|
export const DeletePersonaSchema = z.object(DeletePersonaShape);
|
|
127
128
|
export const DisconnectAccountShape = {
|
|
128
129
|
provider: z
|
|
129
|
-
.enum(['youtube', 'instagram', 'linkedin', 'bluesky'])
|
|
130
|
+
.enum(['youtube', 'instagram', 'linkedin', 'bluesky', 'threads'])
|
|
130
131
|
.describe('The social platform of the account to disconnect.'),
|
|
131
132
|
providerAccountId: z
|
|
132
133
|
.string()
|
|
@@ -144,9 +145,8 @@ export const AddPersonaImageShape = {
|
|
|
144
145
|
personaId: z.string().min(1, 'personaId is required').describe('The ID of the persona to add the image to'),
|
|
145
146
|
...LibraryImageFields,
|
|
146
147
|
// Swap-only, symmetric with update_persona_image: isPrimary:false on a new
|
|
147
|
-
// image is meaningless (
|
|
148
|
-
//
|
|
149
|
-
// silently dropping the flag.
|
|
148
|
+
// image is meaningless (never primary unless marked), so the schema accepts
|
|
149
|
+
// only true and surfaces the constraint at parse time, not as a silent drop.
|
|
150
150
|
isPrimary: z
|
|
151
151
|
.literal(true)
|
|
152
152
|
.optional()
|
|
@@ -158,8 +158,7 @@ export const UpdatePersonaImageShape = {
|
|
|
158
158
|
// Reuse the shared field definitions so tag/description limits can't drift
|
|
159
159
|
// from the create path; PATCH supports clearing via empty string, which the
|
|
160
160
|
// create schema's .min(1) path field doesn't need. Whitespace-only values
|
|
161
|
-
// trim to '' client-side and therefore clear too (
|
|
162
|
-
// undefined = keep, '' = clear) — the descriptions say so explicitly.
|
|
161
|
+
// trim to '' client-side and therefore clear too (undefined = keep, '' = clear).
|
|
163
162
|
tag: LibraryImageFields.tag.describe('New tag (empty or whitespace-only clears the stored value; omit to keep it)'),
|
|
164
163
|
description: LibraryImageFields.description.describe('New description (empty or whitespace-only clears the stored value; omit to keep it)'),
|
|
165
164
|
// Swap-only: the server rejects isPrimary:false, so the schema accepts only
|
|
@@ -188,11 +187,10 @@ export const GetVideoTaskProgressShape = {
|
|
|
188
187
|
};
|
|
189
188
|
export const GetVideoTaskProgressSchema = z.object(GetVideoTaskProgressShape);
|
|
190
189
|
export async function handleCreatePersona(client, args) {
|
|
191
|
-
// Re-
|
|
192
|
-
//
|
|
193
|
-
//
|
|
194
|
-
|
|
195
|
-
return handleLibraryCall(() => client.createPersona(CreatePersonaSchema.parse(args)), 'creating persona', 'Persona created successfully');
|
|
190
|
+
// Re-parses with the full schema (the SDK parses tool args from the raw
|
|
191
|
+
// shape only), then routes the voice BEFORE any POST: an unknown voice
|
|
192
|
+
// never debits tokens (issue #353).
|
|
193
|
+
return handleLibraryCall(async () => client.createPersona(await withResolvedPersonaVoice(client, CreatePersonaSchema.parse(args), 'create_persona')), 'creating persona', 'Persona created successfully');
|
|
196
194
|
}
|
|
197
195
|
export async function handleListPersonas(client) {
|
|
198
196
|
return handleLibraryCall(() => client.listPersonas(), 'listing personas');
|
|
@@ -205,7 +203,8 @@ export async function handleListFaces(client) {
|
|
|
205
203
|
return handleLibraryCall(() => client.listFaces(), 'listing faces');
|
|
206
204
|
}
|
|
207
205
|
export async function handleUpdatePersona(client, args) {
|
|
208
|
-
|
|
206
|
+
// Full-schema parse, then voice routing BEFORE the POST; no voiceId keeps the stored voice (#353).
|
|
207
|
+
return handleLibraryCall(async () => client.updatePersona(await withResolvedPersonaVoiceForUpdate(client, UpdatePersonaSchema.parse(args), 'update_persona')), 'updating persona', 'Persona updated successfully');
|
|
209
208
|
}
|
|
210
209
|
export async function handleListSocialAccounts(client) {
|
|
211
210
|
return handleLibraryCall(() => client.listSocialAccounts(), 'listing social accounts');
|
|
@@ -798,12 +797,10 @@ export async function handleAddPersonaImage(client, args) {
|
|
|
798
797
|
}
|
|
799
798
|
export async function handleUpdatePersonaImage(client, args) {
|
|
800
799
|
return handleLibraryCall(() => {
|
|
801
|
-
// Re-parse with the refined schema
|
|
802
|
-
//
|
|
803
|
-
//
|
|
804
|
-
//
|
|
805
|
-
// a loud isError, before any client call.
|
|
806
|
-
// (Same reason handleCreatePersona re-parses.)
|
|
800
|
+
// Re-parse with the refined schema (the SDK parses tool args from the
|
|
801
|
+
// raw shape only): the "at least one of tag/description/isPrimary"
|
|
802
|
+
// refine becomes a loud isError before any client call, and it pairs
|
|
803
|
+
// with the same reason handleCreatePersona re-parses.
|
|
807
804
|
const parsed = UpdatePersonaImageSchema.parse(args);
|
|
808
805
|
return client.updatePersonaImage({
|
|
809
806
|
id: parsed.id,
|
|
@@ -863,7 +860,7 @@ export async function handleGetVideoTaskProgress(client, args) {
|
|
|
863
860
|
}
|
|
864
861
|
export const PublishVideoDirectShape = {
|
|
865
862
|
provider: z
|
|
866
|
-
.enum(['youtube', 'instagram', 'linkedin', 'bluesky'])
|
|
863
|
+
.enum(['youtube', 'instagram', 'linkedin', 'bluesky', 'threads'])
|
|
867
864
|
.describe('The social platform to publish the video to.'),
|
|
868
865
|
videoPath: z
|
|
869
866
|
.string()
|
|
@@ -872,7 +869,7 @@ export const PublishVideoDirectShape = {
|
|
|
872
869
|
accountIds: z
|
|
873
870
|
.array(z.string().min(1))
|
|
874
871
|
.min(1, 'At least one account ID is required')
|
|
875
|
-
.describe('Target accounts: the IDs from list_social_accounts (channel IDs for YouTube, IG user IDs for Instagram, DIDs for Bluesky, member IDs or org URNs for LinkedIn).'),
|
|
872
|
+
.describe('Target accounts: the IDs from list_social_accounts (channel IDs for YouTube, IG user IDs for Instagram, DIDs for Bluesky, member IDs or org URNs for LinkedIn, user IDs for Threads).'),
|
|
876
873
|
title: z
|
|
877
874
|
.string()
|
|
878
875
|
.optional()
|
|
@@ -892,7 +889,7 @@ export const PublishVideoDirectShape = {
|
|
|
892
889
|
caption: z
|
|
893
890
|
.string()
|
|
894
891
|
.optional()
|
|
895
|
-
.describe('Instagram/Bluesky/LinkedIn: required caption.'),
|
|
892
|
+
.describe('Instagram/Bluesky/LinkedIn/Threads: required caption.'),
|
|
896
893
|
};
|
|
897
894
|
export const PublishVideoDirectSchema = z.object(PublishVideoDirectShape);
|
|
898
895
|
export async function handlePublishVideoDirect(client, args) {
|