post-engineer-mcp 1.52.672 → 1.53.662
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/account-shapes.js +0 -12
- package/dist/account-shapes.js.map +1 -1
- package/dist/action-tool.d.ts +0 -15
- package/dist/action-tool.js +0 -15
- package/dist/action-tool.js.map +1 -1
- package/dist/analytics.js +0 -39
- package/dist/analytics.js.map +1 -1
- package/dist/client-base-url.d.ts +2 -0
- package/dist/client-base-url.js +23 -0
- package/dist/client-base-url.js.map +1 -0
- package/dist/client-batch.js.map +1 -1
- package/dist/client-billing.js +0 -11
- package/dist/client-billing.js.map +1 -1
- package/dist/client-experiments.js +0 -9
- package/dist/client-experiments.js.map +1 -1
- package/dist/client-posts.js +0 -7
- package/dist/client-posts.js.map +1 -1
- package/dist/client-prompts.js +0 -2
- package/dist/client-prompts.js.map +1 -1
- package/dist/client-publish-existing.js +0 -13
- package/dist/client-publish-existing.js.map +1 -1
- package/dist/client-publish-uploaded.d.ts +0 -5
- package/dist/client-publish-uploaded.js +0 -48
- package/dist/client-publish-uploaded.js.map +1 -1
- package/dist/client-publishing-accounts.js +0 -7
- package/dist/client-publishing-accounts.js.map +1 -1
- package/dist/client-telegram.js +0 -7
- package/dist/client-telegram.js.map +1 -1
- package/dist/client-tool-config.js +0 -7
- package/dist/client-tool-config.js.map +1 -1
- package/dist/client-types.d.ts +10 -87
- package/dist/client-user-media.d.ts +0 -28
- package/dist/client-user-media.js +0 -42
- package/dist/client-user-media.js.map +1 -1
- package/dist/client-video-task.js +0 -5
- package/dist/client-video-task.js.map +1 -1
- package/dist/client.js +5 -118
- package/dist/client.js.map +1 -1
- package/dist/cloned-voice-client.d.ts +0 -8
- package/dist/cloned-voice-client.js +0 -49
- package/dist/cloned-voice-client.js.map +1 -1
- package/dist/cloned-voice-tools.d.ts +0 -5
- package/dist/cloned-voice-tools.js +0 -7
- package/dist/cloned-voice-tools.js.map +1 -1
- package/dist/connect-account.js +0 -23
- package/dist/connect-account.js.map +1 -1
- package/dist/contract-response.js +0 -12
- package/dist/contract-response.js.map +1 -1
- package/dist/contracts/accounts.d.ts +0 -11
- package/dist/contracts/accounts.js +0 -60
- package/dist/contracts/accounts.js.map +1 -1
- package/dist/contracts/billing.d.ts +0 -14
- package/dist/contracts/billing.js +0 -26
- package/dist/contracts/billing.js.map +1 -1
- package/dist/contracts/endpoint.d.ts +0 -11
- package/dist/contracts/endpoint.js +0 -4
- package/dist/contracts/endpoint.js.map +1 -1
- package/dist/contracts/experiments.d.ts +0 -20
- package/dist/contracts/experiments.js +0 -34
- package/dist/contracts/experiments.js.map +1 -1
- package/dist/contracts/media.d.ts +0 -19
- package/dist/contracts/media.js +0 -58
- package/dist/contracts/media.js.map +1 -1
- package/dist/contracts/metrics.d.ts +0 -15
- package/dist/contracts/metrics.js +0 -74
- package/dist/contracts/metrics.js.map +1 -1
- package/dist/contracts/personas.d.ts +95 -19
- package/dist/contracts/personas.js +24 -93
- package/dist/contracts/personas.js.map +1 -1
- package/dist/contracts/posts.d.ts +0 -11
- package/dist/contracts/posts.js +0 -17
- package/dist/contracts/posts.js.map +1 -1
- package/dist/contracts/prompts.d.ts +0 -11
- package/dist/contracts/prompts.js +0 -15
- package/dist/contracts/prompts.js.map +1 -1
- package/dist/contracts/providers.d.ts +0 -16
- package/dist/contracts/providers.js +0 -30
- package/dist/contracts/providers.js.map +1 -1
- package/dist/contracts/schedule-warnings.js +0 -3
- package/dist/contracts/schedule-warnings.js.map +1 -1
- package/dist/contracts/schedule.d.ts +0 -14
- package/dist/contracts/schedule.js +0 -46
- package/dist/contracts/schedule.js.map +1 -1
- package/dist/contracts/tool-config.d.ts +0 -11
- package/dist/contracts/tool-config.js +0 -26
- package/dist/contracts/tool-config.js.map +1 -1
- package/dist/contracts/upload-types.d.ts +0 -3
- package/dist/contracts/upload-types.js +0 -10
- package/dist/contracts/upload-types.js.map +1 -1
- package/dist/contracts/video-tasks.d.ts +0 -23
- package/dist/contracts/video-tasks.js +0 -42
- package/dist/contracts/video-tasks.js.map +1 -1
- package/dist/contracts/videos.d.ts +29 -37
- package/dist/contracts/videos.js +3 -137
- package/dist/contracts/videos.js.map +1 -1
- package/dist/contracts/voices.d.ts +0 -24
- package/dist/contracts/voices.js +0 -34
- package/dist/contracts/voices.js.map +1 -1
- package/dist/direct-publish-form.js +0 -15
- package/dist/direct-publish-form.js.map +1 -1
- package/dist/direct-publish-narrowing.js +0 -5
- package/dist/direct-publish-narrowing.js.map +1 -1
- package/dist/errors.d.ts +0 -35
- package/dist/errors.js +0 -48
- package/dist/errors.js.map +1 -1
- package/dist/generate-video.d.ts +45 -4
- package/dist/generate-video.js +0 -6
- package/dist/generate-video.js.map +1 -1
- package/dist/http-auth.d.ts +0 -1
- package/dist/http-auth.js +0 -37
- package/dist/http-auth.js.map +1 -1
- package/dist/http-rate-limit.d.ts +0 -1
- package/dist/http-rate-limit.js +0 -18
- package/dist/http-rate-limit.js.map +1 -1
- package/dist/http-transport.js +0 -95
- package/dist/http-transport.js.map +1 -1
- package/dist/http-web.js +0 -16
- package/dist/http-web.js.map +1 -1
- package/dist/image-guards.d.ts +0 -4
- package/dist/image-guards.js +0 -11
- package/dist/image-guards.js.map +1 -1
- package/dist/index.js +0 -20
- package/dist/index.js.map +1 -1
- package/dist/intent-accounts.js +0 -5
- package/dist/intent-accounts.js.map +1 -1
- package/dist/intent-content.js +0 -7
- package/dist/intent-content.js.map +1 -1
- package/dist/intent-library.js +0 -4
- package/dist/intent-library.js.map +1 -1
- package/dist/intent-personas.js +0 -10
- package/dist/intent-personas.js.map +1 -1
- package/dist/intent-tool-config.js +0 -5
- package/dist/intent-tool-config.js.map +1 -1
- package/dist/intent-video.js +0 -5
- package/dist/intent-video.js.map +1 -1
- package/dist/intent-voices.js +0 -6
- package/dist/intent-voices.js.map +1 -1
- package/dist/language.d.ts +0 -8
- package/dist/language.js +0 -11
- package/dist/language.js.map +1 -1
- package/dist/limits.d.ts +1 -79
- package/dist/limits.js +1 -79
- package/dist/limits.js.map +1 -1
- package/dist/music-mood-field.js +0 -25
- package/dist/music-mood-field.js.map +1 -1
- package/dist/persona-avatar.d.ts +0 -13
- package/dist/persona-avatar.js +0 -40
- package/dist/persona-avatar.js.map +1 -1
- package/dist/persona-create.d.ts +96 -0
- package/dist/persona-create.js +39 -0
- package/dist/persona-create.js.map +1 -0
- package/dist/persona-cta-shape.d.ts +16 -0
- package/dist/persona-cta-shape.js +45 -0
- package/dist/persona-cta-shape.js.map +1 -0
- package/dist/persona-delete.js +0 -1
- package/dist/persona-delete.js.map +1 -1
- package/dist/persona-update.d.ts +26 -0
- package/dist/persona-update.js +2 -6
- package/dist/persona-update.js.map +1 -1
- package/dist/progress-poll-hint.d.ts +0 -6
- package/dist/progress-poll-hint.js +0 -15
- package/dist/progress-poll-hint.js.map +1 -1
- package/dist/prompts.js +0 -12
- package/dist/prompts.js.map +1 -1
- package/dist/public-ip.js +25 -58
- package/dist/public-ip.js.map +1 -1
- package/dist/publish-direct-shape.js +0 -4
- package/dist/publish-direct-shape.js.map +1 -1
- package/dist/publish-existing-shape.d.ts +0 -7
- package/dist/publish-existing-shape.js +0 -26
- package/dist/publish-existing-shape.js.map +1 -1
- package/dist/publish-notices.js +0 -2
- package/dist/publish-notices.js.map +1 -1
- package/dist/publish-uploaded-shape.js +0 -7
- package/dist/publish-uploaded-shape.js.map +1 -1
- package/dist/recipe-session.d.ts +0 -4
- package/dist/recipe-session.js +0 -17
- package/dist/recipe-session.js.map +1 -1
- package/dist/refs.d.ts +0 -11
- package/dist/refs.js +0 -15
- package/dist/refs.js.map +1 -1
- package/dist/remote-shapes.d.ts +52 -2
- package/dist/remote-shapes.js +2 -16
- package/dist/remote-shapes.js.map +1 -1
- package/dist/require-api-key.js +0 -2
- package/dist/require-api-key.js.map +1 -1
- package/dist/require-publishing-accounts.js +0 -7
- package/dist/require-publishing-accounts.js.map +1 -1
- package/dist/require-title.js +0 -4
- package/dist/require-title.js.map +1 -1
- package/dist/schedule-shapes.js +0 -19
- package/dist/schedule-shapes.js.map +1 -1
- package/dist/script-segments.d.ts +1 -5
- package/dist/script-segments.js +1 -54
- package/dist/script-segments.js.map +1 -1
- package/dist/secret-redaction.js +0 -4
- package/dist/secret-redaction.js.map +1 -1
- package/dist/segment-media.js +0 -22
- package/dist/segment-media.js.map +1 -1
- package/dist/segment-text.js +0 -18
- package/dist/segment-text.js.map +1 -1
- package/dist/single-video-shape.d.ts +31 -1
- package/dist/single-video-shape.js +6 -18
- package/dist/single-video-shape.js.map +1 -1
- package/dist/slot-detail-present.d.ts +0 -4
- package/dist/slot-detail-present.js +0 -9
- package/dist/slot-detail-present.js.map +1 -1
- package/dist/tool-annotations.js.map +1 -1
- package/dist/tools-batch.d.ts +45 -3
- package/dist/tools-batch.js +0 -17
- package/dist/tools-batch.js.map +1 -1
- package/dist/tools-call.d.ts +0 -1
- package/dist/tools-call.js +0 -1
- package/dist/tools-call.js.map +1 -1
- package/dist/tools-experiments.d.ts +4 -3
- package/dist/tools-experiments.js +1 -31
- package/dist/tools-experiments.js.map +1 -1
- package/dist/tools-list-stats.d.ts +0 -4
- package/dist/tools-list-stats.js +0 -5
- package/dist/tools-list-stats.js.map +1 -1
- package/dist/tools-pinterest.js +0 -10
- package/dist/tools-pinterest.js.map +1 -1
- package/dist/tools-posts.js +0 -9
- package/dist/tools-posts.js.map +1 -1
- package/dist/tools-prompts.js +0 -23
- package/dist/tools-prompts.js.map +1 -1
- package/dist/tools-publish-existing.js +0 -17
- package/dist/tools-publish-existing.js.map +1 -1
- package/dist/tools-publish-uploaded.js +0 -8
- package/dist/tools-publish-uploaded.js.map +1 -1
- package/dist/tools-publishing-accounts.js +0 -10
- package/dist/tools-publishing-accounts.js.map +1 -1
- package/dist/tools-single-video.d.ts +0 -4
- package/dist/tools-single-video.js +1 -55
- package/dist/tools-single-video.js.map +1 -1
- package/dist/tools-tool-config.js +0 -13
- package/dist/tools-tool-config.js.map +1 -1
- package/dist/tools-user-media.js +0 -5
- package/dist/tools-user-media.js.map +1 -1
- package/dist/tools.d.ts +2 -76
- package/dist/tools.js +4 -82
- package/dist/tools.js.map +1 -1
- package/dist/video-task-tools.d.ts +0 -2
- package/dist/video-task-tools.js +0 -43
- package/dist/video-task-tools.js.map +1 -1
- package/dist/video-type.d.ts +0 -10
- package/dist/video-type.js +0 -17
- package/dist/video-type.js.map +1 -1
- package/dist/voice-filters.d.ts +0 -27
- package/dist/voice-filters.js +0 -62
- package/dist/voice-filters.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
// Shape for publish_video (action: publish_existing) (issue #384):
|
|
2
|
-
// publish or schedule media that already exists — a finished engine
|
|
3
|
-
// video by task id, a ready signed-upload video by upload id, or a plain
|
|
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).
|
|
16
|
-
// Kept in a new module so intent-content.ts stays under the file-size
|
|
17
|
-
// ratchet.
|
|
18
1
|
import { z } from 'zod';
|
|
19
2
|
import { MAX_SEGMENT_MEDIA_MB } from './limits.js';
|
|
20
3
|
import { PublishVideoDirectShape } from './publish-direct-shape.js';
|
|
@@ -83,21 +66,12 @@ export const PublishExistingShape = {
|
|
|
83
66
|
.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
67
|
};
|
|
85
68
|
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
69
|
export const PublishExistingRemoteShape = {
|
|
93
70
|
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
71
|
...remoteFields,
|
|
95
72
|
};
|
|
96
|
-
/** The stdio server reads the image from disk. */
|
|
97
73
|
export const PublishExistingLocalShape = PublishExistingShape;
|
|
98
74
|
export const PublishExistingSchema = z.object(PublishExistingShape).strict().superRefine((value, ctx) => {
|
|
99
|
-
// One media reference per kind: the server 400s a missing one, so fail
|
|
100
|
-
// here, locally, before any fetch.
|
|
101
75
|
if (value.mediaKind === 'task' && value.taskId === undefined) {
|
|
102
76
|
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ['taskId'], message: 'taskId is required when mediaKind is task.' });
|
|
103
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-existing-shape.js","sourceRoot":"","sources":["../src/publish-existing-shape.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"publish-existing-shape.js","sourceRoot":"","sources":["../src/publish-existing-shape.ts"],"names":[],"mappings":"AAAA,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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,EAAE,CAAC;QAC3D,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,yGAAyG,EAAE,CAAC,CAAC;IACzL,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/dist/publish-notices.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// User-account notices on posts (action: list) / schedules (action: get_slot) (issue #500). The sentences
|
|
2
|
-
// are already safe to show. The agent must relay them and must not retry.
|
|
3
1
|
export function readNoticeList(value) {
|
|
4
2
|
return Array.isArray(value) ? value : [];
|
|
5
3
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-notices.js","sourceRoot":"","sources":["../src/publish-notices.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"publish-notices.js","sourceRoot":"","sources":["../src/publish-notices.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,WAAsB;IAClD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;QAC/B,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;YAAE,SAAS;QACxD,MAAM,MAAM,GAAI,IAA6B,CAAC,MAAM,CAAC;QACrD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1E,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAClC,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oDAAoD,CAAC;AACjF,CAAC"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
// Shapes for the signed-upload publish flow (issue #561): the remote
|
|
2
|
-
// (HTTP) replacement for publish_video (action: from_file). JSON only — no field
|
|
3
|
-
// names a file on disk. The caller first mints a signed upload with
|
|
4
|
-
// publish_video (action: create_upload), PUTs the video (or image) bytes to the returned signedUrl,
|
|
5
|
-
// completes it with publish_video (action: complete_upload), and finally publishes by id
|
|
6
|
-
// with publish_video (action: publish_upload). Kept in a new module so tools.ts stays
|
|
7
|
-
// under the file-size ratchet.
|
|
8
1
|
import { z } from 'zod';
|
|
9
2
|
import { MAX_UPLOAD_VIDEO_BYTES, MAX_UPLOAD_VIDEO_GB } from './limits.js';
|
|
10
3
|
import { PublishVideoDirectShape } from './publish-direct-shape.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-uploaded-shape.js","sourceRoot":"","sources":["../src/publish-uploaded-shape.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"publish-uploaded-shape.js","sourceRoot":"","sources":["../src/publish-uploaded-shape.ts"],"names":[],"mappings":"AAAA,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/recipe-session.d.ts
CHANGED
|
@@ -24,16 +24,12 @@ export declare class RecipeSession {
|
|
|
24
24
|
private lastNudge;
|
|
25
25
|
private scriptRejections;
|
|
26
26
|
constructor(transport: McpTransportKind);
|
|
27
|
-
/** True once the agent listed or fetched a recipe in this session. */
|
|
28
27
|
knowsRecipes(): boolean;
|
|
29
28
|
recordNudgeShown(surface: RecipeNudgeSurface): void;
|
|
30
29
|
recordRecipesListed(): void;
|
|
31
|
-
/** Call only after the API returned the recipe, so the slug is real. */
|
|
32
30
|
recordRecipeFetched(slug: string): void;
|
|
33
31
|
recordScriptRejected(): void;
|
|
34
|
-
/** Headers for the API requests of one call; recipe is that call's slug. */
|
|
35
32
|
telemetryHeaders(recipe: unknown): Record<string, string>;
|
|
36
|
-
/** Run one call with this session's headers on every API request it sends. */
|
|
37
33
|
run<TResult>(recipe: unknown, call: () => Promise<TResult>): Promise<TResult>;
|
|
38
34
|
}
|
|
39
35
|
export declare function withRecipeNudge<TArgs>(session: RecipeSession, surface: RecipeNudgeSurface, handler: (args: TArgs) => Promise<McpToolResponse>): (args: TArgs) => Promise<McpToolResponse>;
|
package/dist/recipe-session.js
CHANGED
|
@@ -16,17 +16,10 @@ export const MCP_RECIPES_KNOWN_HEADER = 'X-MCP-Recipes-Known';
|
|
|
16
16
|
export const MCP_RECIPE_FETCHED_HEADER = 'X-MCP-Recipe-Fetched';
|
|
17
17
|
export const MCP_SCRIPT_REJECTIONS_HEADER = 'X-MCP-Script-Rejections';
|
|
18
18
|
export const MCP_RECIPE_HEADER = 'X-MCP-Recipe';
|
|
19
|
-
// A recipe slug as the web hub writes them; anything else is never sent.
|
|
20
19
|
export const RECIPE_SLUG_PATTERN = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
21
|
-
// Header values stay bounded: the counter saturates instead of growing.
|
|
22
20
|
const MAX_SCRIPT_REJECTIONS = 999;
|
|
23
21
|
export const RECIPE_NUDGE_TEXT = 'Next step for a video about a topic (news, a place, a product, GitHub PRs): call prompts (action: list) and follow the matching recipe with prompts (action: get) instead of improvising the script — recipes pre-validate the script, media, and price facts before any token is spent.';
|
|
24
22
|
export const SCRIPT_REJECTED_RECIPE_HINT = 'Recipes produce scripts that pass these limits: call prompts (action: list) and follow the matching recipe with prompts (action: get).';
|
|
25
|
-
//---------------
|
|
26
|
-
// The text an agent runs for a recipe: the hub text plus a footer asking
|
|
27
|
-
// it to declare the recipe on generate_video, so its request
|
|
28
|
-
// carries X-MCP-Recipe. Shared by prompts (action: get) and the slash commands.
|
|
29
|
-
//---------------
|
|
30
23
|
export function recipeRunText(slug, prompt) {
|
|
31
24
|
return `${prompt}\n\nWhen you call generate_video for this recipe, pass recipe: "${slug}".`;
|
|
32
25
|
}
|
|
@@ -43,7 +36,6 @@ export class RecipeSession {
|
|
|
43
36
|
constructor(transport) {
|
|
44
37
|
this.transport = transport;
|
|
45
38
|
}
|
|
46
|
-
/** True once the agent listed or fetched a recipe in this session. */
|
|
47
39
|
knowsRecipes() {
|
|
48
40
|
return this.recipesListed || this.lastRecipeFetched !== null;
|
|
49
41
|
}
|
|
@@ -53,7 +45,6 @@ export class RecipeSession {
|
|
|
53
45
|
recordRecipesListed() {
|
|
54
46
|
this.recipesListed = true;
|
|
55
47
|
}
|
|
56
|
-
/** Call only after the API returned the recipe, so the slug is real. */
|
|
57
48
|
recordRecipeFetched(slug) {
|
|
58
49
|
if (isRecipeSlug(slug))
|
|
59
50
|
this.lastRecipeFetched = slug;
|
|
@@ -61,7 +52,6 @@ export class RecipeSession {
|
|
|
61
52
|
recordScriptRejected() {
|
|
62
53
|
this.scriptRejections = Math.min(this.scriptRejections + 1, MAX_SCRIPT_REJECTIONS);
|
|
63
54
|
}
|
|
64
|
-
/** Headers for the API requests of one call; recipe is that call's slug. */
|
|
65
55
|
telemetryHeaders(recipe) {
|
|
66
56
|
const headers = {
|
|
67
57
|
[MCP_SESSION_ID_HEADER]: this.sessionId,
|
|
@@ -75,7 +65,6 @@ export class RecipeSession {
|
|
|
75
65
|
headers[MCP_RECIPE_HEADER] = recipe;
|
|
76
66
|
return headers;
|
|
77
67
|
}
|
|
78
|
-
/** Run one call with this session's headers on every API request it sends. */
|
|
79
68
|
run(recipe, call) {
|
|
80
69
|
return withTelemetryHeaders(() => this.telemetryHeaders(recipe), call);
|
|
81
70
|
}
|
|
@@ -83,12 +72,6 @@ export class RecipeSession {
|
|
|
83
72
|
function withExtraText(response, text) {
|
|
84
73
|
return { ...response, content: [...response.content, { type: 'text', text }] };
|
|
85
74
|
}
|
|
86
|
-
//---------------
|
|
87
|
-
// Wrap an entry tool: its requests carry the session headers and, on
|
|
88
|
-
// success while the agent has not met the recipes yet, the nudge is
|
|
89
|
-
// appended as its own text block (the first block stays the tool's own
|
|
90
|
-
// payload, so JSON consumers keep parsing it).
|
|
91
|
-
//---------------
|
|
92
75
|
export function withRecipeNudge(session, surface, handler) {
|
|
93
76
|
return async (args) => {
|
|
94
77
|
const response = await session.run(undefined, () => handler(args));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipe-session.js","sourceRoot":"","sources":["../src/recipe-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"recipe-session.js","sourceRoot":"","sources":["../src/recipe-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMxD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,uBAAuB;IACvB,gBAAgB;CACR,CAAC;AAMX,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AACxD,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AACtD,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AACt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QAAQ,CAAC,CAAC;QACnC,OAAO,aAAa,CAAC,QAAQ,EAAE,2BAA2B,CAAC,CAAC;IAC9D,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/refs.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export type RefOutcome<T> = {
|
|
|
10
10
|
};
|
|
11
11
|
export interface ResolvedPersona {
|
|
12
12
|
id: string;
|
|
13
|
-
/** The display name when it was resolved by name; null when the id was taken as given. */
|
|
14
13
|
name: string | null;
|
|
15
14
|
}
|
|
16
15
|
export interface ResolvedAccount {
|
|
@@ -22,31 +21,21 @@ export interface RefResolvers {
|
|
|
22
21
|
persona: (ref: string) => Promise<RefOutcome<ResolvedPersona>>;
|
|
23
22
|
account: (ref: string, provider?: string) => Promise<RefOutcome<ResolvedAccount>>;
|
|
24
23
|
}
|
|
25
|
-
/** Resolvers that share one personas listing and one accounts listing (a batch resolves many refs). */
|
|
26
24
|
export declare function createRefResolvers(client: PostEngineerClient): RefResolvers;
|
|
27
25
|
export declare function resolvePersonaRef(client: PostEngineerClient, ref: string): Promise<RefOutcome<ResolvedPersona>>;
|
|
28
26
|
export declare function resolveAccountRef(client: PostEngineerClient, ref: string, provider?: string): Promise<RefOutcome<ResolvedAccount>>;
|
|
29
|
-
/** The `persona` field of every action that acts on one persona. */
|
|
30
27
|
export declare const PERSONA_REF: z.ZodString;
|
|
31
|
-
/** A shape with its `personaId` replaced by the `persona` reference (the other fields are kept as they are). */
|
|
32
28
|
export declare function personaRefShape<TShape extends Record<string, z.ZodType>>(shape: TShape): {
|
|
33
29
|
persona: typeof PERSONA_REF;
|
|
34
30
|
} & Omit<TShape, 'personaId'>;
|
|
35
|
-
/**
|
|
36
|
-
* Resolves `args.persona` and runs `run` with the persona id as `personaId`
|
|
37
|
-
* (and the other fields untouched). An unknown or ambiguous persona ends the
|
|
38
|
-
* call with the resolver's response, before `run`.
|
|
39
|
-
*/
|
|
40
31
|
export declare function withPersona<TArgs extends {
|
|
41
32
|
persona: string;
|
|
42
33
|
}, TResult extends McpToolResponse>(client: PostEngineerClient, args: TArgs, run: (args: Omit<TArgs, 'persona'> & {
|
|
43
34
|
personaId: string;
|
|
44
35
|
}, persona: ResolvedPersona) => Promise<TResult>): Promise<McpToolResponse>;
|
|
45
|
-
/** Like personaRefShape, for an action where the persona is optional. */
|
|
46
36
|
export declare function optionalPersonaRefShape<TShape extends Record<string, z.ZodType>>(shape: TShape): {
|
|
47
37
|
persona: z.ZodOptional<typeof PERSONA_REF>;
|
|
48
38
|
} & Omit<TShape, 'personaId'>;
|
|
49
|
-
/** Like withPersona, when the persona is optional: absent stays absent (no personaId). */
|
|
50
39
|
export declare function withOptionalPersona<TArgs extends {
|
|
51
40
|
persona?: string | undefined;
|
|
52
41
|
}>(client: PostEngineerClient, args: TArgs, run: (args: Omit<TArgs, 'persona'> & {
|
package/dist/refs.js
CHANGED
|
@@ -55,8 +55,6 @@ async function resolvePersona(listPersonas, ref) {
|
|
|
55
55
|
return candidates('persona', wanted, matches);
|
|
56
56
|
return { kind: 'ok', value: { id: matches[0].id, name: matches[0].name } };
|
|
57
57
|
}
|
|
58
|
-
// The field that carries a listed account's id, by provider (the fields of
|
|
59
|
-
// the web registry's toPublicAccount: apps/web/lib/providers/registry.ts).
|
|
60
58
|
const ACCOUNT_ID_FIELDS = {
|
|
61
59
|
youtube: 'channelId',
|
|
62
60
|
instagram: 'igUserId',
|
|
@@ -70,8 +68,6 @@ const ACCOUNT_ID_FIELDS = {
|
|
|
70
68
|
fanvue: 'providerAccountId',
|
|
71
69
|
telegram: 'providerAccountId',
|
|
72
70
|
};
|
|
73
|
-
// The id and the names of one listed account, by provider (the fields of the
|
|
74
|
-
// web registry's toPublicAccount: apps/web/lib/providers/registry.ts).
|
|
75
71
|
function accountOf(entry) {
|
|
76
72
|
const item = record(entry);
|
|
77
73
|
const provider = text(item?.provider);
|
|
@@ -114,7 +110,6 @@ async function resolveAccount(listAccounts, ref, provider) {
|
|
|
114
110
|
}
|
|
115
111
|
return { kind: 'ok', value: { provider: matches[0].provider, id: matches[0].id, label: matches[0].label } };
|
|
116
112
|
}
|
|
117
|
-
/** Reads a listing once, whatever the number of references resolved against it. */
|
|
118
113
|
function once(read) {
|
|
119
114
|
let pending = null;
|
|
120
115
|
return () => {
|
|
@@ -122,7 +117,6 @@ function once(read) {
|
|
|
122
117
|
return pending;
|
|
123
118
|
};
|
|
124
119
|
}
|
|
125
|
-
/** Resolvers that share one personas listing and one accounts listing (a batch resolves many refs). */
|
|
126
120
|
export function createRefResolvers(client) {
|
|
127
121
|
const personas = once(() => client.listPersonas());
|
|
128
122
|
const accounts = once(() => client.listSocialAccounts());
|
|
@@ -137,18 +131,11 @@ export function resolvePersonaRef(client, ref) {
|
|
|
137
131
|
export function resolveAccountRef(client, ref, provider) {
|
|
138
132
|
return createRefResolvers(client).account(ref, provider);
|
|
139
133
|
}
|
|
140
|
-
/** The `persona` field of every action that acts on one persona. */
|
|
141
134
|
export const PERSONA_REF = z.string().min(1, 'persona is required').describe('The persona, by name or id (personas list shows both).');
|
|
142
|
-
/** A shape with its `personaId` replaced by the `persona` reference (the other fields are kept as they are). */
|
|
143
135
|
export function personaRefShape(shape) {
|
|
144
136
|
const { personaId: _replaced, ...rest } = shape;
|
|
145
137
|
return { persona: PERSONA_REF, ...rest };
|
|
146
138
|
}
|
|
147
|
-
/**
|
|
148
|
-
* Resolves `args.persona` and runs `run` with the persona id as `personaId`
|
|
149
|
-
* (and the other fields untouched). An unknown or ambiguous persona ends the
|
|
150
|
-
* call with the resolver's response, before `run`.
|
|
151
|
-
*/
|
|
152
139
|
export async function withPersona(client, args, run) {
|
|
153
140
|
const outcome = await resolvePersonaRef(client, args.persona);
|
|
154
141
|
if (outcome.kind === 'response')
|
|
@@ -156,12 +143,10 @@ export async function withPersona(client, args, run) {
|
|
|
156
143
|
const { persona: _ref, ...rest } = args;
|
|
157
144
|
return run({ ...rest, personaId: outcome.value.id }, outcome.value);
|
|
158
145
|
}
|
|
159
|
-
/** Like personaRefShape, for an action where the persona is optional. */
|
|
160
146
|
export function optionalPersonaRefShape(shape) {
|
|
161
147
|
const { personaId: _replaced, ...rest } = shape;
|
|
162
148
|
return { persona: PERSONA_REF.optional(), ...rest };
|
|
163
149
|
}
|
|
164
|
-
/** Like withPersona, when the persona is optional: absent stays absent (no personaId). */
|
|
165
150
|
export async function withOptionalPersona(client, args, run) {
|
|
166
151
|
const { persona, ...rest } = args;
|
|
167
152
|
if (persona === undefined)
|
package/dist/refs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refs.js","sourceRoot":"","sources":["../src/refs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"refs.js","sourceRoot":"","sources":["../src/refs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAgB9C,MAAM,IAAI,GAAG,iEAAiE,CAAC;AAE/E,SAAS,IAAI,CAAC,OAAe;IAC3B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;AACvG,CAAC;AAED,SAAS,UAAU,CAAC,IAAY,EAAE,GAAW,EAAE,OAA6D;IAC1G,MAAM,IAAI,GAAG;QACX,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,iBAAiB,IAAI,aAAa,GAAG,kEAAkE;QAChH,UAAU,EA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AAG,CAAC,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;AACvD,CAAC"}
|
package/dist/remote-shapes.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/** personas (action: create) over HTTP: avatarUrl only, no library image files. */
|
|
3
2
|
export declare const CreatePersonaRemoteShape: {
|
|
4
3
|
name: z.ZodString;
|
|
5
4
|
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -23,6 +22,19 @@ export declare const CreatePersonaRemoteShape: {
|
|
|
23
22
|
ok: "ok";
|
|
24
23
|
very_good: "very_good";
|
|
25
24
|
}>>;
|
|
25
|
+
cta: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
type: z.ZodEnum<{
|
|
27
|
+
link: "link";
|
|
28
|
+
follow: "follow";
|
|
29
|
+
comment: "comment";
|
|
30
|
+
share: "share";
|
|
31
|
+
save: "save";
|
|
32
|
+
buy: "buy";
|
|
33
|
+
other: "other";
|
|
34
|
+
}>;
|
|
35
|
+
url: z.ZodOptional<z.ZodString>;
|
|
36
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
26
38
|
accounts: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
27
39
|
};
|
|
28
40
|
export declare const CreatePersonaRemoteSchema: z.ZodObject<{
|
|
@@ -48,9 +60,21 @@ export declare const CreatePersonaRemoteSchema: z.ZodObject<{
|
|
|
48
60
|
ok: "ok";
|
|
49
61
|
very_good: "very_good";
|
|
50
62
|
}>>;
|
|
63
|
+
cta: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
type: z.ZodEnum<{
|
|
65
|
+
link: "link";
|
|
66
|
+
follow: "follow";
|
|
67
|
+
comment: "comment";
|
|
68
|
+
share: "share";
|
|
69
|
+
save: "save";
|
|
70
|
+
buy: "buy";
|
|
71
|
+
other: "other";
|
|
72
|
+
}>;
|
|
73
|
+
url: z.ZodOptional<z.ZodString>;
|
|
74
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
51
76
|
accounts: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
52
77
|
}, z.core.$strict>;
|
|
53
|
-
/** personas (action: update) over HTTP: avatarUrl only. */
|
|
54
78
|
export declare const UpdatePersonaRemoteShape: {
|
|
55
79
|
personaId: z.ZodString;
|
|
56
80
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -75,6 +99,19 @@ export declare const UpdatePersonaRemoteShape: {
|
|
|
75
99
|
ok: "ok";
|
|
76
100
|
very_good: "very_good";
|
|
77
101
|
}>>;
|
|
102
|
+
cta: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
type: z.ZodEnum<{
|
|
104
|
+
link: "link";
|
|
105
|
+
follow: "follow";
|
|
106
|
+
comment: "comment";
|
|
107
|
+
share: "share";
|
|
108
|
+
save: "save";
|
|
109
|
+
buy: "buy";
|
|
110
|
+
other: "other";
|
|
111
|
+
}>;
|
|
112
|
+
url: z.ZodOptional<z.ZodString>;
|
|
113
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
78
115
|
};
|
|
79
116
|
export declare const UpdatePersonaRemoteSchema: z.ZodObject<{
|
|
80
117
|
personaId: z.ZodString;
|
|
@@ -100,4 +137,17 @@ export declare const UpdatePersonaRemoteSchema: z.ZodObject<{
|
|
|
100
137
|
ok: "ok";
|
|
101
138
|
very_good: "very_good";
|
|
102
139
|
}>>;
|
|
140
|
+
cta: z.ZodOptional<z.ZodObject<{
|
|
141
|
+
type: z.ZodEnum<{
|
|
142
|
+
link: "link";
|
|
143
|
+
follow: "follow";
|
|
144
|
+
comment: "comment";
|
|
145
|
+
share: "share";
|
|
146
|
+
save: "save";
|
|
147
|
+
buy: "buy";
|
|
148
|
+
other: "other";
|
|
149
|
+
}>;
|
|
150
|
+
url: z.ZodOptional<z.ZodString>;
|
|
151
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
103
153
|
}, z.core.$strict>;
|
package/dist/remote-shapes.js
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
// Remote (HTTP) persona shapes: the same tools the stdio server offers,
|
|
2
|
-
// minus every field that names a file on disk.
|
|
3
|
-
//
|
|
4
|
-
// A path served over HTTP would resolve on the MCP server's filesystem,
|
|
5
|
-
// not on the agent's machine, so the remote surface cannot carry one:
|
|
6
|
-
// personas (action: create) keeps only avatarUrl (no avatarPath, no library images),
|
|
7
|
-
// and personas (action: update) keeps only avatarUrl. The SDK parses tool args with
|
|
8
|
-
// the registered raw shape, which strips unknown keys before the handler
|
|
9
|
-
// runs — so a smuggled path is dropped (never read), not loudly rejected.
|
|
10
|
-
// The strict re-parse is defense-in-depth for direct handler callers only.
|
|
11
1
|
import { z } from 'zod';
|
|
12
2
|
import { UpdatePersonaAvatarFields, refinePersonaAvatar } from './persona-avatar.js';
|
|
13
3
|
import { UpdatePersonaShape } from './persona-update.js';
|
|
14
4
|
import { CreatePersonaShape } from './tools.js';
|
|
15
|
-
/** personas (action: create) over HTTP: avatarUrl only, no library image files. */
|
|
16
5
|
export const CreatePersonaRemoteShape = {
|
|
17
6
|
name: CreatePersonaShape.name,
|
|
18
7
|
avatarUrl: z
|
|
@@ -28,17 +17,13 @@ export const CreatePersonaRemoteShape = {
|
|
|
28
17
|
paragraphNumber: CreatePersonaShape.paragraphNumber,
|
|
29
18
|
niche: CreatePersonaShape.niche,
|
|
30
19
|
faceQuality: CreatePersonaShape.faceQuality,
|
|
31
|
-
|
|
32
|
-
// bound to at least one publishing account. Without this field the
|
|
33
|
-
// handler's re-parse against CreatePersonaSchema (which requires
|
|
34
|
-
// accounts) would reject every remote personas (action: create) call.
|
|
20
|
+
cta: CreatePersonaShape.cta,
|
|
35
21
|
accounts: CreatePersonaShape.accounts,
|
|
36
22
|
};
|
|
37
23
|
export const CreatePersonaRemoteSchema = z
|
|
38
24
|
.object(CreatePersonaRemoteShape)
|
|
39
25
|
.strict()
|
|
40
26
|
.superRefine(refinePersonaAvatar(true));
|
|
41
|
-
/** personas (action: update) over HTTP: avatarUrl only. */
|
|
42
27
|
export const UpdatePersonaRemoteShape = {
|
|
43
28
|
personaId: UpdatePersonaShape.personaId,
|
|
44
29
|
name: UpdatePersonaShape.name,
|
|
@@ -51,6 +36,7 @@ export const UpdatePersonaRemoteShape = {
|
|
|
51
36
|
paragraphNumber: UpdatePersonaShape.paragraphNumber,
|
|
52
37
|
niche: UpdatePersonaShape.niche,
|
|
53
38
|
faceQuality: UpdatePersonaShape.faceQuality,
|
|
39
|
+
cta: UpdatePersonaShape.cta,
|
|
54
40
|
};
|
|
55
41
|
export const UpdatePersonaRemoteSchema = z
|
|
56
42
|
.object(UpdatePersonaRemoteShape)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-shapes.js","sourceRoot":"","sources":["../src/remote-shapes.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"remote-shapes.js","sourceRoot":"","sources":["../src/remote-shapes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,kBAAkB,CAAC,IAAI;IAC7B,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,CACP,6NAA6N,CAC9N;IACH,OAAO,EAAE,kBAAkB,CAAC,OAAO;IACnC,QAAQ,EAAE,kBAAkB,CA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,"file":"require-api-key.js","sourceRoot":"","sources":["../src/require-api-key.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"require-api-key.js","sourceRoot":"","sources":["../src/require-api-key.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAC,MAAyB,OAAO,CAAC,GAAG;IAChE,MAAM,MAAM,GAAG,GAAG,CAAC,qBAAqB,CAAC;IACzC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
//---------------
|
|
2
|
-
// requirePublishingAccounts — the client-side half of issue #572: a
|
|
3
|
-
// persona is born bound to at least one publishing account. Checked
|
|
4
|
-
// before any file is read, so a call the server would reject fails fast
|
|
5
|
-
// here instead of uploading bytes first. Returns the map unchanged so
|
|
6
|
-
// the caller can set it on the form in the same expression.
|
|
7
|
-
//---------------
|
|
8
1
|
export function requirePublishingAccounts(accounts) {
|
|
9
2
|
const total = Object.values(accounts ?? {}).reduce((sum, ids) => sum + (Array.isArray(ids) ? ids.length : 0), 0);
|
|
10
3
|
if (total === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-publishing-accounts.js","sourceRoot":"","sources":["../src/require-publishing-accounts.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"require-publishing-accounts.js","sourceRoot":"","sources":["../src/require-publishing-accounts.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,yBAAyB,CACvC,QAA8C;IAE9C,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,MAAM,CAChD,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EACzD,CAAC,CACF,CAAC;IACF,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CACb,qJAAqJ,CACtJ,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,IAAI,EAAE,CAAC;AACxB,CAAC"}
|
package/dist/require-title.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// Fail-fast for title inputs: the route 400s on an empty title, so trim
|
|
2
|
-
// and reject here, before any fetch goes out. Returns the trimmed title:
|
|
3
|
-
// the server stores the trimmed value, so the payload carries exactly
|
|
4
|
-
// what lands.
|
|
5
1
|
export function requireTitle(title) {
|
|
6
2
|
const trimmed = title.trim();
|
|
7
3
|
if (trimmed.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-title.js","sourceRoot":"","sources":["../src/require-title.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"require-title.js","sourceRoot":"","sources":["../src/require-title.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/schedule-shapes.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
// Schedule/slot tool shapes, plus the generate_video options
|
|
2
|
-
// shape and the URL-field helpers only it uses.
|
|
3
|
-
//
|
|
4
|
-
// Extracted from tools.ts so the tools module stays under the file-size
|
|
5
|
-
// ratchet. tools.ts re-exports every name here, so existing import sites
|
|
6
|
-
// keep working.
|
|
7
1
|
import { isIP } from 'node:net';
|
|
8
2
|
import { z } from 'zod';
|
|
9
3
|
import { isEnglishLanguage, ONLY_ENGLISH_VIDEOS_MESSAGE } from './language.js';
|
|
@@ -56,9 +50,6 @@ export const DeleteSlotShape = {
|
|
|
56
50
|
.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.'),
|
|
57
51
|
};
|
|
58
52
|
export const DeleteSlotSchema = z.object(DeleteSlotShape);
|
|
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.
|
|
62
53
|
const LOOPBACK_HOSTS = new Set(['localhost', '127.0.0.1', '::1', '[::1]']);
|
|
63
54
|
function isHttpsOrLoopbackHttp(url) {
|
|
64
55
|
let parsed;
|
|
@@ -72,7 +63,6 @@ function isHttpsOrLoopbackHttp(url) {
|
|
|
72
63
|
return true;
|
|
73
64
|
return parsed.protocol === 'http:' && LOOPBACK_HOSTS.has(parsed.hostname);
|
|
74
65
|
}
|
|
75
|
-
/** URL field for user-supplied media URLs: https, or http on loopback only. */
|
|
76
66
|
function httpsUrlField(fieldName) {
|
|
77
67
|
return z
|
|
78
68
|
.string()
|
|
@@ -81,16 +71,12 @@ function httpsUrlField(fieldName) {
|
|
|
81
71
|
message: `${fieldName} must be an https URL (http is allowed only for loopback hosts like localhost)`,
|
|
82
72
|
});
|
|
83
73
|
}
|
|
84
|
-
/** https only. A loopback or private literal host is rejected; a name is left to the engine. */
|
|
85
74
|
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
75
|
if (!URL.canParse(url))
|
|
89
76
|
return false;
|
|
90
77
|
const parsed = new URL(url);
|
|
91
78
|
if (parsed.protocol !== 'https:')
|
|
92
79
|
return false;
|
|
93
|
-
// Node keeps the brackets on an IPv6 hostname (`[::1]`).
|
|
94
80
|
const host = parsed.hostname.replace(/^\[|\]$/g, '');
|
|
95
81
|
if (host.toLowerCase() === 'localhost')
|
|
96
82
|
return false;
|
|
@@ -107,11 +93,6 @@ function webhookUrlField() {
|
|
|
107
93
|
});
|
|
108
94
|
}
|
|
109
95
|
export const GeneratePersonaVideoOptionsShape = {
|
|
110
|
-
// The one video mode (issue #542 follow-up): required — it decides the
|
|
111
|
-
// render path and the price. The `error` callback gives the
|
|
112
|
-
// missing/invalid message with every mode and its cost, so the agent can
|
|
113
|
-
// choose knowing the price. Zod 4 replaced v3's `errorMap`: a missing
|
|
114
|
-
// value arrives as `invalid_value` with no `input` (v3's `ctx.data`).
|
|
115
96
|
videoType: z
|
|
116
97
|
.enum(VIDEO_TYPES, {
|
|
117
98
|
error: (issue) => issue.input === undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-shapes.js","sourceRoot":"","sources":["../src/schedule-shapes.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"schedule-shapes.js","sourceRoot":"","sources":["../src/schedule-shapes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC,MAAM,CAAC,MAAM,mBAAm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