post-engineer-mcp 1.52.627 → 1.52.629
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 +1 -1
- package/dist/account-shapes.d.ts +4 -4
- package/dist/account-shapes.js +2 -1
- package/dist/account-shapes.js.map +1 -1
- package/dist/client-posts.d.ts +1 -1
- package/dist/client-publish-existing.js +10 -72
- package/dist/client-publish-existing.js.map +1 -1
- package/dist/client-publish-uploaded.js +11 -12
- package/dist/client-publish-uploaded.js.map +1 -1
- package/dist/client-types.d.ts +28 -43
- package/dist/client-user-media.d.ts +12 -4
- package/dist/client-user-media.js +14 -6
- package/dist/client-user-media.js.map +1 -1
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/cloned-voice-client.js +2 -2
- package/dist/cloned-voice-client.js.map +1 -1
- package/dist/connect-account.d.ts +6 -4
- package/dist/connect-account.js +2 -1
- package/dist/connect-account.js.map +1 -1
- package/dist/contracts/accounts.d.ts +0 -5
- package/dist/contracts/accounts.js +1 -5
- package/dist/contracts/accounts.js.map +1 -1
- package/dist/contracts/metrics.d.ts +13 -17
- package/dist/contracts/metrics.js +1 -17
- package/dist/contracts/metrics.js.map +1 -1
- package/dist/contracts/posts.d.ts +10 -15
- package/dist/contracts/posts.js +2 -17
- package/dist/contracts/posts.js.map +1 -1
- package/dist/contracts/providers.d.ts +18 -0
- package/dist/contracts/providers.js +48 -0
- package/dist/contracts/providers.js.map +1 -0
- package/dist/contracts/schedule.d.ts +4 -4
- package/dist/contracts/upload-types.d.ts +13 -0
- package/dist/contracts/upload-types.js +22 -0
- package/dist/contracts/upload-types.js.map +1 -0
- package/dist/contracts/videos.d.ts +25 -20
- package/dist/contracts/videos.js +13 -20
- package/dist/contracts/videos.js.map +1 -1
- package/dist/generate-video.d.ts +10 -6
- package/dist/generate-video.js +4 -17
- package/dist/generate-video.js.map +1 -1
- package/dist/intent-content.js +9 -4
- package/dist/intent-content.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/public-ip.d.ts +1 -0
- package/dist/public-ip.js +50 -27
- package/dist/public-ip.js.map +1 -1
- package/dist/publish-direct-shape.d.ts +4 -4
- package/dist/publish-direct-shape.js +2 -1
- package/dist/publish-direct-shape.js.map +1 -1
- package/dist/publish-existing-shape.d.ts +75 -44
- package/dist/publish-existing-shape.js +62 -47
- package/dist/publish-existing-shape.js.map +1 -1
- package/dist/publish-uploaded-shape.d.ts +8 -4
- package/dist/publish-uploaded-shape.js +5 -4
- package/dist/publish-uploaded-shape.js.map +1 -1
- package/dist/schedule-shapes.js +32 -5
- package/dist/schedule-shapes.js.map +1 -1
- package/dist/single-video-shape.d.ts +4 -4
- package/dist/single-video-shape.js +2 -1
- package/dist/single-video-shape.js.map +1 -1
- package/dist/tools-batch.d.ts +6 -6
- package/dist/tools-experiments.d.ts +4 -4
- package/dist/tools-posts.d.ts +4 -4
- package/dist/tools-publish-existing.d.ts +2 -3
- package/dist/tools-publish-existing.js +125 -49
- package/dist/tools-publish-existing.js.map +1 -1
- package/dist/tools-single-video.d.ts +4 -4
- package/dist/tools-single-video.js +2 -1
- package/dist/tools-single-video.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,33 +7,17 @@ export declare const PublishExistingShape: {
|
|
|
7
7
|
}>;
|
|
8
8
|
taskId: z.ZodOptional<z.ZodString>;
|
|
9
9
|
uploadId: z.ZodOptional<z.ZodString>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"image/jpeg": "image/jpeg";
|
|
13
|
-
"image/png": "image/png";
|
|
14
|
-
}>>;
|
|
15
|
-
provider: z.ZodEnum<{
|
|
16
|
-
youtube: "youtube";
|
|
17
|
-
instagram: "instagram";
|
|
18
|
-
linkedin: "linkedin";
|
|
19
|
-
bluesky: "bluesky";
|
|
20
|
-
threads: "threads";
|
|
21
|
-
facebook: "facebook";
|
|
22
|
-
pinterest: "pinterest";
|
|
23
|
-
fanvue: "fanvue";
|
|
24
|
-
"3speak": "3speak";
|
|
25
|
-
rumble: "rumble";
|
|
26
|
-
}>;
|
|
27
|
-
accountIds: z.ZodArray<z.ZodString>;
|
|
10
|
+
imagePath: z.ZodOptional<z.ZodString>;
|
|
11
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
12
|
title: z.ZodString;
|
|
29
13
|
description: z.ZodString;
|
|
14
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
30
15
|
personaId: z.ZodOptional<z.ZodString>;
|
|
31
|
-
mode: z.
|
|
16
|
+
mode: z.ZodEnum<{
|
|
32
17
|
scheduled: "scheduled";
|
|
33
18
|
asap: "asap";
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
times: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
}>;
|
|
20
|
+
publishAt: z.ZodOptional<z.ZodString>;
|
|
37
21
|
timezone: z.ZodDefault<z.ZodString>;
|
|
38
22
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
23
|
privacyStatus: z.ZodOptional<z.ZodEnum<{
|
|
@@ -41,11 +25,45 @@ export declare const PublishExistingShape: {
|
|
|
41
25
|
private: "private";
|
|
42
26
|
unlisted: "unlisted";
|
|
43
27
|
}>>;
|
|
28
|
+
boardId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The remote server reads no local files: an image arrives as a signed
|
|
33
|
+
* upload (mediaKind upload). The advertised kind says so, because the stdio
|
|
34
|
+
* description's "image = a local JPEG/PNG (imagePath)" would send a remote
|
|
35
|
+
* agent at a field this transport does not have.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PublishExistingRemoteShape: {
|
|
38
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
39
|
+
uploadId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
title: z.ZodString;
|
|
42
|
+
description: z.ZodString;
|
|
44
43
|
caption: z.ZodOptional<z.ZodString>;
|
|
44
|
+
personaId: z.ZodOptional<z.ZodString>;
|
|
45
|
+
mode: z.ZodEnum<{
|
|
46
|
+
scheduled: "scheduled";
|
|
47
|
+
asap: "asap";
|
|
48
|
+
}>;
|
|
49
|
+
publishAt: z.ZodOptional<z.ZodString>;
|
|
50
|
+
timezone: z.ZodDefault<z.ZodString>;
|
|
51
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
privacyStatus: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
public: "public";
|
|
54
|
+
private: "private";
|
|
55
|
+
unlisted: "unlisted";
|
|
56
|
+
}>>;
|
|
45
57
|
boardId: z.ZodOptional<z.ZodString>;
|
|
46
58
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
59
|
+
mediaKind: z.ZodEnum<{
|
|
60
|
+
image: "image";
|
|
61
|
+
task: "task";
|
|
62
|
+
upload: "upload";
|
|
63
|
+
}>;
|
|
47
64
|
};
|
|
48
|
-
|
|
65
|
+
/** The stdio server reads the image from disk. */
|
|
66
|
+
export declare const PublishExistingLocalShape: {
|
|
49
67
|
mediaKind: z.ZodEnum<{
|
|
50
68
|
image: "image";
|
|
51
69
|
task: "task";
|
|
@@ -53,33 +71,46 @@ export declare const PublishExistingSchema: z.ZodObject<{
|
|
|
53
71
|
}>;
|
|
54
72
|
taskId: z.ZodOptional<z.ZodString>;
|
|
55
73
|
uploadId: z.ZodOptional<z.ZodString>;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
74
|
+
imagePath: z.ZodOptional<z.ZodString>;
|
|
75
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
76
|
+
title: z.ZodString;
|
|
77
|
+
description: z.ZodString;
|
|
78
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
79
|
+
personaId: z.ZodOptional<z.ZodString>;
|
|
80
|
+
mode: z.ZodEnum<{
|
|
81
|
+
scheduled: "scheduled";
|
|
82
|
+
asap: "asap";
|
|
83
|
+
}>;
|
|
84
|
+
publishAt: z.ZodOptional<z.ZodString>;
|
|
85
|
+
timezone: z.ZodDefault<z.ZodString>;
|
|
86
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
privacyStatus: z.ZodOptional<z.ZodEnum<{
|
|
88
|
+
public: "public";
|
|
89
|
+
private: "private";
|
|
90
|
+
unlisted: "unlisted";
|
|
60
91
|
}>>;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
fanvue: "fanvue";
|
|
70
|
-
"3speak": "3speak";
|
|
71
|
-
rumble: "rumble";
|
|
92
|
+
boardId: z.ZodOptional<z.ZodString>;
|
|
93
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
94
|
+
};
|
|
95
|
+
export declare const PublishExistingSchema: z.ZodObject<{
|
|
96
|
+
mediaKind: z.ZodEnum<{
|
|
97
|
+
image: "image";
|
|
98
|
+
task: "task";
|
|
99
|
+
upload: "upload";
|
|
72
100
|
}>;
|
|
73
|
-
|
|
101
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
102
|
+
uploadId: z.ZodOptional<z.ZodString>;
|
|
103
|
+
imagePath: z.ZodOptional<z.ZodString>;
|
|
104
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
74
105
|
title: z.ZodString;
|
|
75
106
|
description: z.ZodString;
|
|
107
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
76
108
|
personaId: z.ZodOptional<z.ZodString>;
|
|
77
|
-
mode: z.
|
|
109
|
+
mode: z.ZodEnum<{
|
|
78
110
|
scheduled: "scheduled";
|
|
79
111
|
asap: "asap";
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
times: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
112
|
+
}>;
|
|
113
|
+
publishAt: z.ZodOptional<z.ZodString>;
|
|
83
114
|
timezone: z.ZodDefault<z.ZodString>;
|
|
84
115
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
85
116
|
privacyStatus: z.ZodOptional<z.ZodEnum<{
|
|
@@ -87,7 +118,7 @@ export declare const PublishExistingSchema: z.ZodObject<{
|
|
|
87
118
|
private: "private";
|
|
88
119
|
unlisted: "unlisted";
|
|
89
120
|
}>>;
|
|
90
|
-
caption: z.ZodOptional<z.ZodString>;
|
|
91
121
|
boardId: z.ZodOptional<z.ZodString>;
|
|
92
122
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
93
123
|
}, z.core.$strict>;
|
|
124
|
+
export type PublishExistingArgs = z.infer<typeof PublishExistingSchema>;
|
|
@@ -1,80 +1,100 @@
|
|
|
1
1
|
// Shape for publish_video (action: publish_existing) (issue #384):
|
|
2
2
|
// publish or schedule media that already exists — a finished engine
|
|
3
3
|
// video by task id, a ready signed-upload video by upload id, or a plain
|
|
4
|
-
// image
|
|
5
|
-
//
|
|
6
|
-
//
|
|
4
|
+
// image — with no generation and no token charge.
|
|
5
|
+
//
|
|
6
|
+
// Accounts are names or ids, like generate_video: the network is read
|
|
7
|
+
// from each account, so one call reaches every network (an upload is
|
|
8
|
+
// single-use, so one call is the only way to cross-post it). A scheduled
|
|
9
|
+
// post is one moment (publishAt), and mode is required: a publish tool
|
|
10
|
+
// never guesses "now" or "later". An image goes to the image networks
|
|
11
|
+
// (IMAGE_PROVIDERS). On the stdio server it comes from a local file
|
|
12
|
+
// (imagePath); the remote server never takes image bytes in a tool
|
|
13
|
+
// argument: the image goes through create_upload → PUT → complete_upload
|
|
14
|
+
// and is published as mediaKind upload (intent-content.ts offers
|
|
15
|
+
// imagePath on stdio only).
|
|
7
16
|
// Kept in a new module so intent-content.ts stays under the file-size
|
|
8
17
|
// ratchet.
|
|
9
18
|
import { z } from 'zod';
|
|
19
|
+
import { MAX_SEGMENT_MEDIA_MB } from './limits.js';
|
|
10
20
|
import { PublishVideoDirectShape } from './publish-direct-shape.js';
|
|
11
21
|
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
12
22
|
export const PublishExistingShape = {
|
|
13
23
|
mediaKind: z
|
|
14
24
|
.enum(['task', 'upload', 'image'])
|
|
15
|
-
.describe('task = finished video
|
|
25
|
+
.describe('task = a finished generated video (taskId); upload = a completed signed upload, video or image (uploadId); image = a local JPEG/PNG (imagePath).'),
|
|
16
26
|
taskId: z
|
|
17
27
|
.string()
|
|
18
28
|
.min(1, 'taskId is required')
|
|
19
29
|
.optional()
|
|
20
|
-
.describe('mediaKind task: the
|
|
30
|
+
.describe('mediaKind task: the task id of the finished video.'),
|
|
21
31
|
uploadId: z
|
|
22
32
|
.string()
|
|
23
33
|
.regex(UUID_PATTERN, 'uploadId must be a UUID')
|
|
24
34
|
.optional()
|
|
25
|
-
.describe('mediaKind upload: the uploadId
|
|
26
|
-
|
|
35
|
+
.describe('mediaKind upload: the uploadId from create_upload + complete_upload. Single-use: publish it to every network in this one call.'),
|
|
36
|
+
imagePath: z
|
|
27
37
|
.string()
|
|
28
|
-
.min(1, '
|
|
38
|
+
.min(1, 'imagePath is required')
|
|
29
39
|
.optional()
|
|
30
|
-
.describe(
|
|
31
|
-
|
|
32
|
-
.
|
|
40
|
+
.describe(`mediaKind image: local path of the JPEG or PNG (max ${MAX_SEGMENT_MEDIA_MB} MB).`),
|
|
41
|
+
accounts: z
|
|
42
|
+
.array(z.string().min(1))
|
|
43
|
+
.min(1, 'Provide at least one account')
|
|
33
44
|
.optional()
|
|
34
|
-
.describe(
|
|
35
|
-
provider: PublishVideoDirectShape.provider,
|
|
36
|
-
accountIds: PublishVideoDirectShape.accountIds,
|
|
45
|
+
.describe("Accounts to publish to, each an account name or id from accounts (action: list); the network is read from the account, so one call can reach several networks. Omit to use the persona's bound publishing accounts."),
|
|
37
46
|
title: z
|
|
38
47
|
.string()
|
|
39
48
|
.min(1, 'title is required')
|
|
40
49
|
.max(100, 'title must be at most 100 characters')
|
|
41
|
-
.describe('The title (required).'),
|
|
50
|
+
.describe('The title (YouTube, Rumble, Fanvue, Pinterest show it; required for every post).'),
|
|
42
51
|
description: z
|
|
43
52
|
.string()
|
|
44
53
|
.min(1, 'description is required')
|
|
45
54
|
.max(5000, 'description must be at most 5000 characters')
|
|
46
|
-
.describe('The
|
|
55
|
+
.describe('The post text: the video description, and the caption on Instagram, Bluesky, LinkedIn, Threads, Facebook and 3Speak.'),
|
|
56
|
+
caption: z
|
|
57
|
+
.string()
|
|
58
|
+
.min(1)
|
|
59
|
+
.optional()
|
|
60
|
+
.describe('Optional: a different text for the caption networks. Omit to use description.'),
|
|
47
61
|
personaId: z
|
|
48
62
|
.string()
|
|
49
63
|
.optional()
|
|
50
64
|
.describe('The persona id. Omit for a faceless post.'),
|
|
51
65
|
mode: z
|
|
52
|
-
.enum(['
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
startAt: z
|
|
66
|
+
.enum(['asap', 'scheduled'])
|
|
67
|
+
.describe("Required. 'asap' publishes now; 'scheduled' publishes once at publishAt."),
|
|
68
|
+
publishAt: z
|
|
56
69
|
.string()
|
|
57
70
|
.refine((value) => !Number.isNaN(Date.parse(value)), {
|
|
58
|
-
message: '
|
|
71
|
+
message: 'publishAt must be an ISO datetime (e.g. "2026-12-01T20:00:00")',
|
|
59
72
|
})
|
|
60
73
|
.optional()
|
|
61
|
-
.describe(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
.optional()
|
|
66
|
-
.describe('Daily publish times (HH:MM). Required unless mode is \'asap\'.'),
|
|
67
|
-
timezone: z.string().min(1).default('UTC').describe('IANA timezone for startAt and times. Defaults to UTC.'),
|
|
68
|
-
tags: PublishVideoDirectShape.tags,
|
|
69
|
-
privacyStatus: PublishVideoDirectShape.privacyStatus,
|
|
70
|
-
caption: PublishVideoDirectShape.caption,
|
|
74
|
+
.describe("mode scheduled: when to publish, 3h-30d ahead. Wall-clock in timezone (e.g. \"2026-12-01T20:00:00\"), or with an offset."),
|
|
75
|
+
timezone: z.string().min(1).default('UTC').describe('IANA timezone for a publishAt without an offset. Defaults to UTC.'),
|
|
76
|
+
tags: PublishVideoDirectShape.tags.describe('YouTube only: required with mode asap (scheduled derives them from the title).'),
|
|
77
|
+
privacyStatus: PublishVideoDirectShape.privacyStatus.describe('YouTube only: required with mode asap.'),
|
|
71
78
|
boardId: PublishVideoDirectShape.boardId,
|
|
72
79
|
idempotencyKey: z
|
|
73
80
|
.string()
|
|
74
81
|
.min(1)
|
|
75
82
|
.optional()
|
|
76
|
-
.describe('
|
|
83
|
+
.describe('Retry a timed-out call with the SAME key: the server returns the original result (the schedule, or the posts already published per account) instead of publishing again. Omitted: a key is generated per call.'),
|
|
84
|
+
};
|
|
85
|
+
const { imagePath: _imagePath, mediaKind: _mediaKind, ...remoteFields } = PublishExistingShape;
|
|
86
|
+
/**
|
|
87
|
+
* The remote server reads no local files: an image arrives as a signed
|
|
88
|
+
* upload (mediaKind upload). The advertised kind says so, because the stdio
|
|
89
|
+
* description's "image = a local JPEG/PNG (imagePath)" would send a remote
|
|
90
|
+
* agent at a field this transport does not have.
|
|
91
|
+
*/
|
|
92
|
+
export const PublishExistingRemoteShape = {
|
|
93
|
+
mediaKind: PublishExistingShape.mediaKind.describe('task = a finished generated video (taskId); upload = a completed signed upload, video or image (uploadId); image is not offered on a remote server — send the image through create_upload → PUT → complete_upload and publish it as mediaKind upload.'),
|
|
94
|
+
...remoteFields,
|
|
77
95
|
};
|
|
96
|
+
/** The stdio server reads the image from disk. */
|
|
97
|
+
export const PublishExistingLocalShape = PublishExistingShape;
|
|
78
98
|
export const PublishExistingSchema = z.object(PublishExistingShape).strict().superRefine((value, ctx) => {
|
|
79
99
|
// One media reference per kind: the server 400s a missing one, so fail
|
|
80
100
|
// here, locally, before any fetch.
|
|
@@ -84,23 +104,18 @@ export const PublishExistingSchema = z.object(PublishExistingShape).strict().sup
|
|
|
84
104
|
if (value.mediaKind === 'upload' && value.uploadId === undefined) {
|
|
85
105
|
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ['uploadId'], message: 'uploadId is required when mediaKind is upload.' });
|
|
86
106
|
}
|
|
87
|
-
if (value.mediaKind === 'image') {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
// Images post only where a handler accepts them: Instagram today.
|
|
95
|
-
if (value.provider !== 'instagram') {
|
|
96
|
-
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ['provider'], message: 'Images can only be published to instagram for now: its handler is the only one that accepts image files.' });
|
|
97
|
-
}
|
|
107
|
+
if (value.mediaKind === 'image' && value.imagePath === undefined) {
|
|
108
|
+
ctx.addIssue({
|
|
109
|
+
code: z.ZodIssueCode.custom,
|
|
110
|
+
path: ['imagePath'],
|
|
111
|
+
message: 'mediaKind image needs imagePath (a local JPEG or PNG). On a remote server, upload the image with create_upload → PUT → complete_upload and publish it as mediaKind upload.',
|
|
112
|
+
});
|
|
98
113
|
}
|
|
99
|
-
if (value.mode === 'scheduled' &&
|
|
100
|
-
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ['
|
|
114
|
+
if (value.mode === 'scheduled' && value.publishAt === undefined) {
|
|
115
|
+
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ['publishAt'], message: 'publishAt is required when mode is scheduled.' });
|
|
101
116
|
}
|
|
102
|
-
if (value.mode === 'asap' &&
|
|
103
|
-
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ['
|
|
117
|
+
if (value.mode === 'asap' && value.publishAt !== undefined) {
|
|
118
|
+
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ['publishAt'], message: "publishAt must not be set when mode is asap: asap publishes now. Use mode 'scheduled' to publish later." });
|
|
104
119
|
}
|
|
105
120
|
});
|
|
106
121
|
//# sourceMappingURL=publish-existing-shape.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-existing-shape.js","sourceRoot":"","sources":["../src/publish-existing-shape.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,oEAAoE;AACpE,yEAAyE;AACzE,yEAAyE;AACzE,uEAAuE;AACvE,
|
|
1
|
+
{"version":3,"file":"publish-existing-shape.js","sourceRoot":"","sources":["../src/publish-existing-shape.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,oEAAoE;AACpE,yEAAyE;AACzE,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,qEAAqE;AACrE,yEAAyE;AACzE,uEAAuE;AACvE,sEAAsE;AACtE,oEAAoE;AACpE,mEAAmE;AACnE,yEAAyE;AACzE,iEAAiE;AACjE,4BAA4B;AAC5B,sEAAsE;AACtE,WAAW;AACX,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,YAAY,GAAG,iEAAiE,CAAC;AAEvF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,SAAS,EAAE,CAAC;SACT,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;SACjC,QAAQ,CAAC,kJAAkJ,CAAC;IAC/J,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC;SAC5B,QAAQ,EAAE;SACV,QAAQ,CAAC,oDAAoD,CAAC;IACjE,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,KAAK,CAAC,YAAY,EAAE,yBAAyB,CAAC;SAC9C,QAAQ,EAAE;SACV,QAAQ,CAAC,gIAAgI,CAAC;IAC7I,SAAS,EAAE,CAAC;S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eg": "image/jpeg";
|
|
7
|
+
"image/png": "image/png";
|
|
6
8
|
}>;
|
|
7
9
|
sizeBytes: z.ZodNumber;
|
|
8
10
|
};
|
|
@@ -10,6 +12,8 @@ export declare const CreateVideoUploadSchema: z.ZodObject<{
|
|
|
10
12
|
contentType: z.ZodEnum<{
|
|
11
13
|
"video/mp4": "video/mp4";
|
|
12
14
|
"video/quicktime": "video/quicktime";
|
|
15
|
+
"image/jpeg": "image/jpeg";
|
|
16
|
+
"image/png": "image/png";
|
|
13
17
|
}>;
|
|
14
18
|
sizeBytes: z.ZodNumber;
|
|
15
19
|
}, z.core.$strict>;
|
|
@@ -23,14 +27,14 @@ export declare const PublishUploadedVideoShape: {
|
|
|
23
27
|
provider: z.ZodEnum<{
|
|
24
28
|
youtube: "youtube";
|
|
25
29
|
instagram: "instagram";
|
|
26
|
-
linkedin: "linkedin";
|
|
27
30
|
bluesky: "bluesky";
|
|
31
|
+
linkedin: "linkedin";
|
|
28
32
|
threads: "threads";
|
|
29
33
|
facebook: "facebook";
|
|
30
34
|
pinterest: "pinterest";
|
|
31
|
-
fanvue: "fanvue";
|
|
32
35
|
"3speak": "3speak";
|
|
33
36
|
rumble: "rumble";
|
|
37
|
+
fanvue: "fanvue";
|
|
34
38
|
}>;
|
|
35
39
|
uploadId: z.ZodString;
|
|
36
40
|
accountIds: z.ZodArray<z.ZodString>;
|
|
@@ -49,14 +53,14 @@ export declare const PublishUploadedVideoSchema: z.ZodObject<{
|
|
|
49
53
|
provider: z.ZodEnum<{
|
|
50
54
|
youtube: "youtube";
|
|
51
55
|
instagram: "instagram";
|
|
52
|
-
linkedin: "linkedin";
|
|
53
56
|
bluesky: "bluesky";
|
|
57
|
+
linkedin: "linkedin";
|
|
54
58
|
threads: "threads";
|
|
55
59
|
facebook: "facebook";
|
|
56
60
|
pinterest: "pinterest";
|
|
57
|
-
fanvue: "fanvue";
|
|
58
61
|
"3speak": "3speak";
|
|
59
62
|
rumble: "rumble";
|
|
63
|
+
fanvue: "fanvue";
|
|
60
64
|
}>;
|
|
61
65
|
uploadId: z.ZodString;
|
|
62
66
|
accountIds: z.ZodArray<z.ZodString>;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
// Shapes for the signed-upload publish flow (issue #561): the remote
|
|
2
2
|
// (HTTP) replacement for publish_video (action: from_file). JSON only — no field
|
|
3
3
|
// names a file on disk. The caller first mints a signed upload with
|
|
4
|
-
// publish_video (action: create_upload), PUTs the video bytes to the returned signedUrl,
|
|
4
|
+
// publish_video (action: create_upload), PUTs the video (or image) bytes to the returned signedUrl,
|
|
5
5
|
// completes it with publish_video (action: complete_upload), and finally publishes by id
|
|
6
6
|
// with publish_video (action: publish_upload). Kept in a new module so tools.ts stays
|
|
7
7
|
// under the file-size ratchet.
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { MAX_UPLOAD_VIDEO_BYTES, MAX_UPLOAD_VIDEO_GB } from './limits.js';
|
|
10
10
|
import { PublishVideoDirectShape } from './publish-direct-shape.js';
|
|
11
|
+
import { MAX_IMAGE_UPLOAD_BYTES, UPLOAD_CONTENT_TYPES } from './contracts/videos.js';
|
|
11
12
|
export const CreateVideoUploadShape = {
|
|
12
13
|
contentType: z
|
|
13
|
-
.enum(
|
|
14
|
-
.describe('The real
|
|
14
|
+
.enum(UPLOAD_CONTENT_TYPES)
|
|
15
|
+
.describe('The real type: video/mp4 (.mp4), video/quicktime (.mov), image/jpeg or image/png. The server verifies the bytes at completion.'),
|
|
15
16
|
sizeBytes: z
|
|
16
17
|
.number()
|
|
17
18
|
.int()
|
|
18
19
|
.min(1)
|
|
19
20
|
.max(MAX_UPLOAD_VIDEO_BYTES)
|
|
20
|
-
.describe(`Exact size
|
|
21
|
+
.describe(`Exact size in bytes (max ${MAX_UPLOAD_VIDEO_GB}GB video, ${MAX_IMAGE_UPLOAD_BYTES / (1024 * 1024)} MB image).`),
|
|
21
22
|
};
|
|
22
23
|
export const CreateVideoUploadSchema = z.object(CreateVideoUploadShape).strict();
|
|
23
24
|
export const CompleteVideoUploadShape = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-uploaded-shape.js","sourceRoot":"","sources":["../src/publish-uploaded-shape.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,iFAAiF;AACjF,oEAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"publish-uploaded-shape.js","sourceRoot":"","sources":["../src/publish-uploaded-shape.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,iFAAiF;AACjF,oEAAoE;AACpE,oGAAoG;AACpG,yFAAyF;AACzF,sFAAsF;AACtF,+BAA+B;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAErF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW,EAAE,CAAC;SACX,IAAI,CAAC,oBAAoB,CAAC;SAC1B,QAAQ,CAAC,gIAAgI,CAAC;IAC7I,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,sBAAsB,CAAC;SAC3B,QAAQ,CAAC,4BAA4B,mBAAmB,aAAa,sBAAsB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC;CAC7H,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,MAAM,EAAE,CAAC;AAEjF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;SAC9B,QAAQ,CAAC,4GAA4G,CAAC;CAC1H,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,MAAM,EAAE,CAAC;AAErF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,QAAQ,EAAE,uBAAuB,CAAC,QAAQ;IAC1C,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;SAC9B,QAAQ,CAAC,mKAAmK,CAAC;IAChL,UAAU,EAAE,uBAAuB,CAAC,UAAU;IAC9C,KAAK,EAAE,uBAAuB,CAAC,KAAK;IACpC,WAAW,EAAE,uBAAuB,CAAC,WAAW;IAChD,IAAI,EAAE,uBAAuB,CAAC,IAAI;IAClC,aAAa,EAAE,uBAAuB,CAAC,aAAa;IACpD,OAAO,EAAE,uBAAuB,CAAC,OAAO;IACxC,OAAO,EAAE,uBAAuB,CAAC,OAAO;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
package/dist/schedule-shapes.js
CHANGED
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
// Extracted from tools.ts so the tools module stays under the file-size
|
|
5
5
|
// ratchet. tools.ts re-exports every name here, so existing import sites
|
|
6
6
|
// keep working.
|
|
7
|
+
import { isIP } from 'node:net';
|
|
7
8
|
import { z } from 'zod';
|
|
8
9
|
import { isEnglishLanguage, ONLY_ENGLISH_VIDEOS_MESSAGE } from './language.js';
|
|
10
|
+
import { isPublicIp } from './public-ip.js';
|
|
9
11
|
import { VIDEO_LAYOUTS } from './limits.js';
|
|
10
12
|
import { VIDEO_TYPES, VIDEO_TYPE_ERROR_SUFFIX, unknownVideoTypeMessage } from './video-type.js';
|
|
11
13
|
import { personaVoiceField } from './voice-filters.js';
|
|
@@ -54,9 +56,9 @@ export const DeleteSlotShape = {
|
|
|
54
56
|
.describe('The slot ID to delete. Only pending (awaiting) or failed slots can be deleted; published or mid-flight slots are rejected. The schedule\'s last slot cannot be deleted — delete the whole schedule with schedules (action: cancel) instead.'),
|
|
55
57
|
};
|
|
56
58
|
export const DeleteSlotSchema = z.object(DeleteSlotShape);
|
|
57
|
-
// Loopback hosts for which a plain http: media
|
|
58
|
-
//
|
|
59
|
-
//
|
|
59
|
+
// Loopback hosts for which a plain http: media URL is tolerated (local
|
|
60
|
+
// dev). Anything else must be https so the bytes never travel in cleartext.
|
|
61
|
+
// webhookUrl does not use this list: a callback is https on a public host.
|
|
60
62
|
const LOOPBACK_HOSTS = new Set(['localhost', '127.0.0.1', '::1', '[::1]']);
|
|
61
63
|
function isHttpsOrLoopbackHttp(url) {
|
|
62
64
|
let parsed;
|
|
@@ -70,7 +72,7 @@ function isHttpsOrLoopbackHttp(url) {
|
|
|
70
72
|
return true;
|
|
71
73
|
return parsed.protocol === 'http:' && LOOPBACK_HOSTS.has(parsed.hostname);
|
|
72
74
|
}
|
|
73
|
-
/** URL field for user-supplied media
|
|
75
|
+
/** URL field for user-supplied media URLs: https, or http on loopback only. */
|
|
74
76
|
function httpsUrlField(fieldName) {
|
|
75
77
|
return z
|
|
76
78
|
.string()
|
|
@@ -79,6 +81,31 @@ function httpsUrlField(fieldName) {
|
|
|
79
81
|
message: `${fieldName} must be an https URL (http is allowed only for loopback hosts like localhost)`,
|
|
80
82
|
});
|
|
81
83
|
}
|
|
84
|
+
/** https only. A loopback or private literal host is rejected; a name is left to the engine. */
|
|
85
|
+
function isPublicHttpsWebhookUrl(url) {
|
|
86
|
+
// Zod still runs this refine when `.url()` failed, so a malformed string
|
|
87
|
+
// must be a validation issue here, never a thrown TypeError.
|
|
88
|
+
if (!URL.canParse(url))
|
|
89
|
+
return false;
|
|
90
|
+
const parsed = new URL(url);
|
|
91
|
+
if (parsed.protocol !== 'https:')
|
|
92
|
+
return false;
|
|
93
|
+
// Node keeps the brackets on an IPv6 hostname (`[::1]`).
|
|
94
|
+
const host = parsed.hostname.replace(/^\[|\]$/g, '');
|
|
95
|
+
if (host.toLowerCase() === 'localhost')
|
|
96
|
+
return false;
|
|
97
|
+
if (isIP(host) !== 0 && !isPublicIp(host))
|
|
98
|
+
return false;
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
function webhookUrlField() {
|
|
102
|
+
return z
|
|
103
|
+
.string()
|
|
104
|
+
.url('webhookUrl must be a valid URL')
|
|
105
|
+
.refine(isPublicHttpsWebhookUrl, {
|
|
106
|
+
message: 'webhookUrl must be https on a public host',
|
|
107
|
+
});
|
|
108
|
+
}
|
|
82
109
|
export const GeneratePersonaVideoOptionsShape = {
|
|
83
110
|
// The one video mode (issue #542 follow-up): required — it decides the
|
|
84
111
|
// render path and the price. The `error` callback gives the
|
|
@@ -96,7 +123,7 @@ export const GeneratePersonaVideoOptionsShape = {
|
|
|
96
123
|
audioUrl: httpsUrlField('audioUrl').optional().describe('Public URL of custom audio for the videos (overrides the persona voice).'),
|
|
97
124
|
imageId: z.string().min(1, 'imageId must be a non-empty string').optional().describe('Library image ID to use for every video (overrides the deterministic per-video selection; see persona_media (action: list_images)).'),
|
|
98
125
|
voiceId: personaVoiceField().optional().describe('Voice ID override: id or label from voices (action: list). Never type a provider prefix.'),
|
|
99
|
-
webhookUrl:
|
|
126
|
+
webhookUrl: webhookUrlField().optional().describe('Callback URL the server POSTs to when each video reaches a terminal state (completed/failed).'),
|
|
100
127
|
videoAspect: z.enum(['9:16', '16:9', '1:1']).optional().describe('Frame shape. Overrides the persona when one is given; a post without a persona defaults to 9:16.'),
|
|
101
128
|
videoLayout: z
|
|
102
129
|
.enum(VIDEO_LAYOUTS)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-shapes.js","sourceRoot":"","sources":["../src/schedule-shapes.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,gDAAgD;AAChD,EAAE;AACF,wEAAwE;AACxE,yEAAyE;AACzE,gBAAg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,qIAAqI,CAAC;IAC3N,OAAO,EAAE,iBAAiB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0FAA0F,CAAC;IAC5I,UAAU,EAAE,eAAe,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+FAA+F,CAAC;IAClJ,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kGAAkG,CAAC;IACpK,WAAW,EAAE,CAAC;SACX,IAAI,CAAC,aAAa,CAAC;SACnB,QAAQ,EAAE;SACV,QAAQ,CAAC,qMAAqM,CAAC;IAClN,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kEAAkE,CAAC;IACxI,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,MAAM,CAAC,iBAAiB,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;SACnE,QAAQ,EAAE;SACV,QAAQ,CAAC,mGAAmG,CAAC;IAChH,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;CACjH,CAAC"}
|
|
@@ -50,14 +50,14 @@ export declare const GeneratePersonaVideoShape: {
|
|
|
50
50
|
providers: z.ZodArray<z.ZodEnum<{
|
|
51
51
|
youtube: "youtube";
|
|
52
52
|
instagram: "instagram";
|
|
53
|
-
linkedin: "linkedin";
|
|
54
53
|
bluesky: "bluesky";
|
|
54
|
+
linkedin: "linkedin";
|
|
55
55
|
threads: "threads";
|
|
56
56
|
facebook: "facebook";
|
|
57
57
|
pinterest: "pinterest";
|
|
58
|
-
fanvue: "fanvue";
|
|
59
58
|
"3speak": "3speak";
|
|
60
59
|
rumble: "rumble";
|
|
60
|
+
fanvue: "fanvue";
|
|
61
61
|
}>>;
|
|
62
62
|
youtubeAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
63
|
instagramAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -135,14 +135,14 @@ export declare const GeneratePersonaVideoSchema: z.ZodObject<{
|
|
|
135
135
|
providers: z.ZodArray<z.ZodEnum<{
|
|
136
136
|
youtube: "youtube";
|
|
137
137
|
instagram: "instagram";
|
|
138
|
-
linkedin: "linkedin";
|
|
139
138
|
bluesky: "bluesky";
|
|
139
|
+
linkedin: "linkedin";
|
|
140
140
|
threads: "threads";
|
|
141
141
|
facebook: "facebook";
|
|
142
142
|
pinterest: "pinterest";
|
|
143
|
-
fanvue: "fanvue";
|
|
144
143
|
"3speak": "3speak";
|
|
145
144
|
rumble: "rumble";
|
|
145
|
+
fanvue: "fanvue";
|
|
146
146
|
}>>;
|
|
147
147
|
youtubeAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
148
|
instagramAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -9,6 +9,7 @@ import { RECIPE_SLUG_PATTERN } from './recipe-session.js';
|
|
|
9
9
|
import { EXPERIMENT_TARGET_PAIRS_MAX, EXPERIMENT_VARIANT_ID_PATTERN } from './limits.js';
|
|
10
10
|
import { VIDEO_TYPES, VIDEO_TYPE_ERROR_SUFFIX, unknownVideoTypeMessage } from './video-type.js';
|
|
11
11
|
import { MAX_IMAGES_MODE_MEDIAS, MAX_OVERLAY_BADGE_CHARS, MAX_OVERLAY_SUBTITLE_CHARS, MAX_OVERLAY_TITLE_CHARS, } from './script-segments.js';
|
|
12
|
+
import { SOCIAL_PROVIDERS } from './contracts/providers.js';
|
|
12
13
|
export const SegmentOverlayShape = z
|
|
13
14
|
.object({
|
|
14
15
|
title: z.string().min(1).max(MAX_OVERLAY_TITLE_CHARS).describe('The real place name, shown large on the card.'),
|
|
@@ -63,7 +64,7 @@ export const GeneratePersonaVideoShape = {
|
|
|
63
64
|
.optional()
|
|
64
65
|
.describe('Spoken language code — English only for now, e.g. en-US.'),
|
|
65
66
|
providers: z
|
|
66
|
-
.array(z.enum(
|
|
67
|
+
.array(z.enum(SOCIAL_PROVIDERS))
|
|
67
68
|
.min(1, 'Provide at least one provider')
|
|
68
69
|
.describe('Where to publish the video.'),
|
|
69
70
|
youtubeAccountIds: z.array(z.string().min(1)).optional().describe('YouTube channel IDs (the channelId field from accounts (action: list)).'),
|