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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-telegram.js","sourceRoot":"","sources":["../src/client-telegram.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,IAAI,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,
|
|
1
|
+
{"version":3,"file":"client-telegram.js","sourceRoot":"","sources":["../src/client-telegram.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,IAAI,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAA0B,EAC1B,QAAgB,EAChB,MAAc,EACd,QAA6B;IAE7B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,uBAAuB,EACvB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,EACtG,0BAA0B,CAC3B,CAAC;QACF,OAAO,qBAAqB,CAAC,8BAA8B,EAAE,GAAG,CAAC,CAAC;IACpE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,qBAAqB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { parseContractResponse } from './contract-response.js';
|
|
2
2
|
import { getToolConfig as getToolConfigContract, saveToolConfig as saveToolConfigContract, } from './contracts/tool-config.js';
|
|
3
|
-
//---------------
|
|
4
|
-
// Tool configuration (issue #669) — HTTP calls.
|
|
5
|
-
//
|
|
6
|
-
// The saved configuration answers which research tool (Tavily/Exa) and
|
|
7
|
-
// which licensed stock sources (Pexels/Pixabay/Coverr) the user has keys
|
|
8
|
-
// for. Both endpoints return presence only — never a key value.
|
|
9
|
-
//---------------
|
|
10
3
|
export async function getToolConfig(client) {
|
|
11
4
|
const raw = await client.request('/api/tool-config', { method: 'GET', headers: client.getHeaders() }, 'get tool configuration');
|
|
12
5
|
return parseContractResponse(getToolConfigContract, raw);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-tool-config.js","sourceRoot":"","sources":["../src/client-tool-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EACL,aAAa,IAAI,qBAAqB,EACtC,cAAc,IAAI,sBAAsB,GACzC,MAAM,4BAA4B,CAAC;AAEpC,
|
|
1
|
+
{"version":3,"file":"client-tool-config.js","sourceRoot":"","sources":["../src/client-tool-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EACL,aAAa,IAAI,qBAAqB,EACtC,cAAc,IAAI,sBAAsB,GACzC,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAA0B;IAE1B,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,kBAAkB,EAClB,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,EAC/C,wBAAwB,CACzB,CAAC;IACF,OAAO,qBAAqB,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAA0B,EAC1B,MAA6C;IAE7C,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,kBAAkB,EAClB;QACE,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE;QAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;KAC7B,EACD,yBAAyB,CAC1B,CAAC;IACF,OAAO,qBAAqB,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC"}
|
package/dist/client-types.d.ts
CHANGED
|
@@ -1,41 +1,29 @@
|
|
|
1
1
|
import { VIDEO_LAYOUTS } from './limits.js';
|
|
2
2
|
import type { FaceQuality, VideoAspect } from './contracts/personas.js';
|
|
3
|
+
import type { PersonaCtaType } from './contracts/personas.js';
|
|
3
4
|
import type { VideoType } from './video-type.js';
|
|
4
5
|
import type { SocialProvider } from './contracts/providers.js';
|
|
5
6
|
export type { VideoType } from './video-type.js';
|
|
6
7
|
export interface PostEngineerClientOptions {
|
|
7
8
|
apiKey?: string;
|
|
8
9
|
baseUrl?: string;
|
|
9
|
-
/** Clock override used by schedule validation (tests); defaults to the real clock. */
|
|
10
10
|
now?: () => Date;
|
|
11
|
-
/**
|
|
12
|
-
* Suppress the X-MCP-Version header. Only the remote (HTTP) factory sets
|
|
13
|
-
* this: the package version (MAJOR.MINOR.PATCH) never equals the web
|
|
14
|
-
* gate's generated MAJOR.MINOR.PR requirement, so sending it would 426
|
|
15
|
-
* the remote's own calls. Stdio keeps sending it (the default).
|
|
16
|
-
*/
|
|
17
11
|
suppressVersionHeader?: boolean;
|
|
18
12
|
}
|
|
19
|
-
/** One image for a persona's image library, read from a local file. */
|
|
20
13
|
export interface PersonaLibraryImageInput {
|
|
21
|
-
/** Local file path (JPG/JPEG, PNG, or WebP, max 10MB). */
|
|
22
14
|
path: string;
|
|
23
|
-
/** Short tag for deterministic per-video matching (e.g. casual, formal). */
|
|
24
15
|
tag?: string;
|
|
25
|
-
/** Description of the photo for keyword matching. */
|
|
26
16
|
description?: string;
|
|
27
17
|
}
|
|
28
|
-
/**
|
|
29
|
-
* How the persona hook is composed with the video material. Mirrors the server's
|
|
30
|
-
* accepted values so an unknown layout is a compile error here rather than
|
|
31
|
-
* a 400 from the API.
|
|
32
|
-
*/
|
|
33
18
|
export type VideoLayout = (typeof VIDEO_LAYOUTS)[number];
|
|
19
|
+
export interface PersonaCtaInput {
|
|
20
|
+
type: PersonaCtaType;
|
|
21
|
+
url?: string;
|
|
22
|
+
instruction?: string;
|
|
23
|
+
}
|
|
34
24
|
export interface CreatePersonaInput {
|
|
35
25
|
name: string;
|
|
36
|
-
/** Every persona has a face: exactly one of avatarUrl or avatarPath. */
|
|
37
26
|
avatarUrl?: string;
|
|
38
|
-
/** Local face photo, uploaded as the multipart `photo` file. */
|
|
39
27
|
avatarPath?: string;
|
|
40
28
|
voiceId: string;
|
|
41
29
|
language?: string;
|
|
@@ -45,35 +33,21 @@ export interface CreatePersonaInput {
|
|
|
45
33
|
paragraphNumber?: number;
|
|
46
34
|
niche?: string;
|
|
47
35
|
faceQuality?: FaceQuality;
|
|
48
|
-
|
|
49
|
-
* Bound publishing accounts per provider (issue #572, required): at
|
|
50
|
-
* least one account, e.g. { youtube: ['UC...'] }. The persona publishes
|
|
51
|
-
* only to bound accounts; a persona with no bound account cannot exist.
|
|
52
|
-
*/
|
|
36
|
+
cta?: PersonaCtaInput;
|
|
53
37
|
accounts: Record<string, string[]>;
|
|
54
|
-
/** Up to 10 local images of the same person for the image library. */
|
|
55
38
|
images?: PersonaLibraryImageInput[];
|
|
56
|
-
/** Index into images[] marking the primary library image. */
|
|
57
39
|
imagePrimaryIndex?: number;
|
|
58
40
|
}
|
|
59
41
|
export interface GeneratePersonaVideoInput {
|
|
60
|
-
/**
|
|
61
|
-
* Optional. Omit it for a faceless post defined entirely by `options` —
|
|
62
|
-
* the persona is then not just a face: it is where the voice, the
|
|
63
|
-
* aspect ratio and the niche come from. A post without one
|
|
64
|
-
* MUST set options.videoType to 'faceless' and one of options.voiceId / options.audioUrl.
|
|
65
|
-
*/
|
|
66
42
|
personaId?: string;
|
|
67
|
-
/** The slot label for the single video. */
|
|
68
43
|
title: string;
|
|
69
|
-
/** Agent-supplied video description (issue #542 follow-up): the publish copy. Required — there is no fallback to the title. */
|
|
70
44
|
description: string;
|
|
71
|
-
/** Paired A/B experiment link (issue #476); checked server-side before the charge. */
|
|
72
45
|
experiment?: {
|
|
73
46
|
experimentId: string;
|
|
74
47
|
variantId: string;
|
|
75
48
|
pair: number;
|
|
76
49
|
};
|
|
50
|
+
cta?: PersonaCtaInput | null;
|
|
77
51
|
providers: SocialProvider[];
|
|
78
52
|
youtubeAccountIds?: string[];
|
|
79
53
|
instagramAccountIds?: string[];
|
|
@@ -82,28 +56,17 @@ export interface GeneratePersonaVideoInput {
|
|
|
82
56
|
threadsAccountIds?: string[];
|
|
83
57
|
facebookAccountIds?: string[];
|
|
84
58
|
pinterestAccountIds?: string[];
|
|
85
|
-
/** Pinterest only: the board the pin goes to (the id from accounts (action: list_boards)). Required when pinterest is selected. */
|
|
86
59
|
pinterestBoardId?: string;
|
|
87
60
|
fanvueAccountIds?: string[];
|
|
88
61
|
threespeakAccountIds?: string[];
|
|
89
62
|
rumbleAccountIds?: string[];
|
|
90
63
|
telegramAccountIds?: string[];
|
|
91
|
-
/**
|
|
92
|
-
* Publish mode. 'scheduled' (default) slots the video at startAt + times;
|
|
93
|
-
* 'asap' publishes it the moment generation finishes, with no scheduled
|
|
94
|
-
* time. In 'asap' mode startAt/times must not be set.
|
|
95
|
-
*/
|
|
96
64
|
mode?: 'scheduled' | 'asap';
|
|
97
|
-
/** ISO datetime when the publish slot may start; naive values are wall-clock in timezone. Required unless mode is 'asap'. */
|
|
98
65
|
startAt?: string;
|
|
99
|
-
/** Daily publish times (HH:MM, 24h). Required unless mode is 'asap'. */
|
|
100
66
|
times?: string[];
|
|
101
|
-
/** IANA timezone for a naive startAt and the times (display-only in 'asap' mode). Defaults to UTC. */
|
|
102
67
|
timezone?: string;
|
|
103
68
|
options?: {
|
|
104
|
-
/** The one video mode: full_lipsync, hook_lipsync or faceless. Required — it decides the render path and the price. */
|
|
105
69
|
videoType: VideoType;
|
|
106
|
-
/** Background-music mood: a mood from the engine BGM catalog, or "none" for explicit no music. Omitted lets the engine pick the first catalogued mood. */
|
|
107
70
|
musicMood?: string;
|
|
108
71
|
audioUrl?: string;
|
|
109
72
|
imageId?: string;
|
|
@@ -114,10 +77,10 @@ export interface GeneratePersonaVideoInput {
|
|
|
114
77
|
paragraphNumber?: number;
|
|
115
78
|
language?: string;
|
|
116
79
|
niche?: string;
|
|
117
|
-
/** Segments script (MCP first, Phase 1): first hook, then content takes in order. Validated by the web route before any token debit. */
|
|
118
80
|
segments?: Array<{
|
|
119
81
|
kind: 'hook' | 'content';
|
|
120
82
|
text: string;
|
|
83
|
+
cta?: boolean;
|
|
121
84
|
media?: Array<{
|
|
122
85
|
mediaId?: string;
|
|
123
86
|
url?: string;
|
|
@@ -129,7 +92,6 @@ export interface GeneratePersonaVideoInput {
|
|
|
129
92
|
}>;
|
|
130
93
|
}>;
|
|
131
94
|
};
|
|
132
|
-
/** Omitted: a UUID is generated per call, so a retry cannot double-generate. */
|
|
133
95
|
idempotencyKey?: string;
|
|
134
96
|
}
|
|
135
97
|
export interface UpdatePersonaInput {
|
|
@@ -145,56 +107,31 @@ export interface UpdatePersonaInput {
|
|
|
145
107
|
paragraphNumber?: number;
|
|
146
108
|
niche?: string;
|
|
147
109
|
faceQuality?: FaceQuality;
|
|
110
|
+
cta?: PersonaCtaInput;
|
|
148
111
|
}
|
|
149
|
-
/** Input for publishing a user-provided video directly, without generation. */
|
|
150
112
|
export interface PublishVideoDirectInput {
|
|
151
113
|
provider: SocialProvider;
|
|
152
|
-
/** Local path to the video file (.mp4 or .mov, max 2GB). */
|
|
153
114
|
videoPath: string;
|
|
154
|
-
/** Target accounts (channel IDs / IG user IDs / DIDs / LinkedIn member IDs or org URNs / Threads user IDs / Facebook Page IDs / Pinterest user IDs / Fanvue account IDs / Hive usernames / Rumble Channel IDs). */
|
|
155
115
|
accountIds: string[];
|
|
156
|
-
/** YouTube, Rumble and Fanvue: required. Pinterest: pin title (optional). */
|
|
157
116
|
title?: string;
|
|
158
|
-
/** YouTube, Rumble and Fanvue: required. Pinterest: pin description (optional; caption is used when omitted). */
|
|
159
117
|
description?: string;
|
|
160
|
-
/** YouTube only: required, at least one tag. */
|
|
161
118
|
tags?: string[];
|
|
162
|
-
/** YouTube only: required. */
|
|
163
119
|
privacyStatus?: 'public' | 'private' | 'unlisted';
|
|
164
|
-
/** Instagram/Bluesky/LinkedIn/Threads/Facebook/3Speak: required. Pinterest: pin description when description is omitted. */
|
|
165
120
|
caption?: string;
|
|
166
|
-
/** Pinterest only: required. The board the pin goes to (the id from accounts (action: list_boards)). */
|
|
167
121
|
boardId?: string;
|
|
168
|
-
/**
|
|
169
|
-
* Omitted: a UUID is generated per call. Reuse the same key when retrying
|
|
170
|
-
* a timed-out call so the server replays the original result instead of
|
|
171
|
-
* publishing the video again. Exception: a result with errorCode
|
|
172
|
-
* publish_unknown means the post may already be live but its record was
|
|
173
|
-
* lost — do not retry it, check the provider account first.
|
|
174
|
-
*/
|
|
175
122
|
idempotencyKey?: string;
|
|
176
123
|
}
|
|
177
|
-
/** Input for publishing a signed-upload video by id, without generation. */
|
|
178
124
|
export interface PublishUploadedVideoInput {
|
|
179
125
|
provider: SocialProvider;
|
|
180
|
-
/** The uploadId of a completed signed upload (create + complete). Single-use. */
|
|
181
126
|
uploadId: string;
|
|
182
|
-
/** Target accounts (same IDs as PublishVideoDirectInput). */
|
|
183
127
|
accountIds: string[];
|
|
184
|
-
/** YouTube, Rumble and Fanvue: required. Pinterest: pin title (optional). */
|
|
185
128
|
title?: string;
|
|
186
|
-
/** YouTube, Rumble and Fanvue: required. Pinterest: pin description (optional; caption is used when omitted). */
|
|
187
129
|
description?: string;
|
|
188
|
-
/** YouTube only: required, at least one tag. */
|
|
189
130
|
tags?: string[];
|
|
190
|
-
/** YouTube only: required. */
|
|
191
131
|
privacyStatus?: 'public' | 'private' | 'unlisted';
|
|
192
|
-
/** Instagram/Bluesky/LinkedIn/Threads/Facebook/3Speak: required. Pinterest: pin description when description is omitted. */
|
|
193
132
|
caption?: string;
|
|
194
|
-
/** Pinterest only: required. The board the pin goes to (the id from accounts (action: list_boards)). */
|
|
195
133
|
boardId?: string;
|
|
196
134
|
}
|
|
197
|
-
/** A minted signed video upload: PUT the bytes to signedUrl, then complete. */
|
|
198
135
|
export interface MintedVideoUpload {
|
|
199
136
|
uploadId: string;
|
|
200
137
|
signedUrl: string;
|
|
@@ -202,14 +139,12 @@ export interface MintedVideoUpload {
|
|
|
202
139
|
expiresAt: string;
|
|
203
140
|
maxBytes: number;
|
|
204
141
|
}
|
|
205
|
-
/** A completed (verified) signed video upload, ready to publish by id. */
|
|
206
142
|
export interface CompletedVideoUpload {
|
|
207
143
|
uploadId: string;
|
|
208
144
|
status: 'ready';
|
|
209
145
|
contentType: string;
|
|
210
146
|
sizeBytes: number;
|
|
211
147
|
}
|
|
212
|
-
/** POST /api/media/publish-existing body fields, built by the publish_existing handler once every reference is resolved. */
|
|
213
148
|
export interface PublishExistingInput {
|
|
214
149
|
media: {
|
|
215
150
|
kind: 'task';
|
|
@@ -222,31 +157,25 @@ export interface PublishExistingInput {
|
|
|
222
157
|
imageData: string;
|
|
223
158
|
contentType: 'image/jpeg' | 'image/png';
|
|
224
159
|
};
|
|
225
|
-
/** Resolved account ids per network; the networks are its keys. */
|
|
226
160
|
accounts: Partial<Record<SocialProvider, string[]>>;
|
|
227
161
|
title: string;
|
|
228
162
|
description: string;
|
|
229
|
-
/** Caption-network text override; the server falls back to description. */
|
|
230
163
|
caption?: string;
|
|
231
164
|
personaId?: string;
|
|
232
165
|
mode: 'asap' | 'scheduled';
|
|
233
|
-
/** mode scheduled: the one publish moment (wall-clock in timezone, or with an offset). */
|
|
234
166
|
publishAt?: string;
|
|
235
167
|
timezone: string;
|
|
236
168
|
tags?: string[];
|
|
237
169
|
privacyStatus?: 'public' | 'private' | 'unlisted';
|
|
238
170
|
boardId?: string;
|
|
239
|
-
/** Sent on every call: a retry with the same key replays the original result (schedule or recorded posts). */
|
|
240
171
|
idempotencyKey: string;
|
|
241
172
|
}
|
|
242
|
-
/** One scheduled slot from POST /api/media/publish-existing. */
|
|
243
173
|
export interface PublishExistingSlot {
|
|
244
174
|
id: string;
|
|
245
175
|
slot_at: string;
|
|
246
176
|
title: string;
|
|
247
177
|
status: string;
|
|
248
178
|
}
|
|
249
|
-
/** A stored login is already dead. The slot was still scheduled. */
|
|
250
179
|
export interface PublishExistingReconnectWarning {
|
|
251
180
|
code: 'account_needs_reconnect';
|
|
252
181
|
accounts: Array<{
|
|
@@ -254,7 +183,6 @@ export interface PublishExistingReconnectWarning {
|
|
|
254
183
|
accountId: string;
|
|
255
184
|
}>;
|
|
256
185
|
}
|
|
257
|
-
/** Narrowed POST /api/media/publish-existing response. */
|
|
258
186
|
export type PublishExistingResult = {
|
|
259
187
|
mode: 'scheduled';
|
|
260
188
|
success: true;
|
|
@@ -265,7 +193,6 @@ export type PublishExistingResult = {
|
|
|
265
193
|
} | {
|
|
266
194
|
mode: 'asap';
|
|
267
195
|
success: boolean;
|
|
268
|
-
/** True when every account answered from the publish ledger: nothing was posted again. */
|
|
269
196
|
replayed: boolean;
|
|
270
197
|
mediaKind: 'task' | 'upload' | 'image';
|
|
271
198
|
publishes: Array<{
|
|
@@ -275,20 +202,16 @@ export type PublishExistingResult = {
|
|
|
275
202
|
}>;
|
|
276
203
|
logId: string;
|
|
277
204
|
};
|
|
278
|
-
/** One per-account outcome from a direct-publish upload. */
|
|
279
205
|
export interface DirectPublishAccountResult {
|
|
280
206
|
accountId: string;
|
|
281
207
|
success: boolean;
|
|
282
208
|
videoId?: string;
|
|
283
209
|
videoUrl?: string;
|
|
284
210
|
postId?: string;
|
|
285
|
-
/** Ready-made post URL (Pinterest pin URL, Instagram/Threads/Facebook permalink). */
|
|
286
211
|
permalink?: string;
|
|
287
212
|
error?: string;
|
|
288
|
-
/** Stable failure code (e.g. publish_unknown: the post may already be live but its record was lost — do not retry). */
|
|
289
213
|
errorCode?: string;
|
|
290
214
|
}
|
|
291
|
-
/** Narrowed POST /api/upload-content response. */
|
|
292
215
|
export interface DirectPublishResult {
|
|
293
216
|
success: boolean;
|
|
294
217
|
provider: string;
|
|
@@ -2,42 +2,14 @@ import type { PostEngineerClient } from './client.js';
|
|
|
2
2
|
import type { CheckMediaCode, VideoAspect } from './contracts/media.js';
|
|
3
3
|
export { CHECK_MEDIA_CODES } from './contracts/media.js';
|
|
4
4
|
export type { CheckMediaCode } from './contracts/media.js';
|
|
5
|
-
/**
|
|
6
|
-
* Real image type from magic bytes — the extension is never trusted.
|
|
7
|
-
* Only the types the engine temp_assets flow accepts by suffix (JPG,
|
|
8
|
-
* PNG, WebP): the web route re-validates authoritatively with its own
|
|
9
|
-
* magic-byte check, so a drift here can only fail fast, never smuggle
|
|
10
|
-
* a bad file through.
|
|
11
|
-
*/
|
|
12
5
|
export declare function detectSegmentImageMimeType(buffer: Buffer): string | null;
|
|
13
|
-
/**
|
|
14
|
-
* Read one local image with the stat-before-read, size-guard-before-and-
|
|
15
|
-
* after-read pattern of the persona library uploads (8MB engine photo
|
|
16
|
-
* limit) and sniff its real type. Shared by the segment upload and the
|
|
17
|
-
* publish_existing image path, so both read local files the same way.
|
|
18
|
-
*/
|
|
19
6
|
export declare function readLocalImage(path: string): Promise<{
|
|
20
7
|
buffer: Buffer;
|
|
21
8
|
mimeType: string;
|
|
22
9
|
}>;
|
|
23
|
-
/**
|
|
24
|
-
* Upload one local image for a segment and return its mediaId.
|
|
25
|
-
* Only the mediaId reaches tool output: the local path and the temp
|
|
26
|
-
* asset URL never do.
|
|
27
|
-
*/
|
|
28
10
|
export declare function uploadSegmentMedia(client: PostEngineerClient, path: string): Promise<{
|
|
29
11
|
mediaId: string;
|
|
30
12
|
}>;
|
|
31
|
-
/**
|
|
32
|
-
* Mechanically check one image URL through the engine (no LLM, no
|
|
33
|
-
* relevance judgement): the agent, who sees the image, decides
|
|
34
|
-
* relevance. Returns exactly one code plus the probed dimensions when
|
|
35
|
-
* the engine measured them, plus has_face when the engine reported it
|
|
36
|
-
* (whether a detectable face is in the photo, or null when there is no
|
|
37
|
-
* file to check or the detector is unavailable — issue #589); the URL
|
|
38
|
-
* never reaches output. With a video aspect given, a photo that cannot
|
|
39
|
-
* fill the frame returns wrong_aspect instead of ok.
|
|
40
|
-
*/
|
|
41
13
|
export declare function checkSegmentMedia(client: PostEngineerClient, url: string, videoAspect?: VideoAspect): Promise<{
|
|
42
14
|
code: CheckMediaCode;
|
|
43
15
|
width?: number;
|
|
@@ -3,26 +3,8 @@ import { basename } from 'node:path';
|
|
|
3
3
|
import { parseContractResponse } from './contract-response.js';
|
|
4
4
|
import { checkMedia as checkMediaContract, uploadMedia as uploadMediaContract } from './contracts/media.js';
|
|
5
5
|
import { MAX_SEGMENT_MEDIA_BYTES, MAX_SEGMENT_MEDIA_MB } from './limits.js';
|
|
6
|
-
// The check codes live in the shared media contract; re-exported so
|
|
7
|
-
// existing import sites keep working.
|
|
8
6
|
export { CHECK_MEDIA_CODES } from './contracts/media.js';
|
|
9
|
-
//---------------
|
|
10
|
-
// Segment media client calls (Phase 2, user media per segment).
|
|
11
|
-
// Standalone functions (not client methods) because client.ts is
|
|
12
|
-
// grandfathered over the 500-line cap and may not grow — the same
|
|
13
|
-
// pattern as client-video-task.ts.
|
|
14
|
-
//---------------
|
|
15
|
-
// Multipart uploads can legitimately exceed the client's default budget;
|
|
16
|
-
// mirrors UPLOAD_TIMEOUT_MS in client.ts (kept as a literal here so
|
|
17
|
-
// client.ts stays untouched).
|
|
18
7
|
const UPLOAD_TIMEOUT_MS = 120_000;
|
|
19
|
-
/**
|
|
20
|
-
* Real image type from magic bytes — the extension is never trusted.
|
|
21
|
-
* Only the types the engine temp_assets flow accepts by suffix (JPG,
|
|
22
|
-
* PNG, WebP): the web route re-validates authoritatively with its own
|
|
23
|
-
* magic-byte check, so a drift here can only fail fast, never smuggle
|
|
24
|
-
* a bad file through.
|
|
25
|
-
*/
|
|
26
8
|
export function detectSegmentImageMimeType(buffer) {
|
|
27
9
|
if (buffer.length < 12)
|
|
28
10
|
return null;
|
|
@@ -41,12 +23,6 @@ function assertSegmentMediaSize(sizeBytes, path) {
|
|
|
41
23
|
throw new Error(`Image "${basename(path)}" is too large (${sizeBytes} bytes; max ${MAX_SEGMENT_MEDIA_MB}MB).`);
|
|
42
24
|
}
|
|
43
25
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Read one local image with the stat-before-read, size-guard-before-and-
|
|
46
|
-
* after-read pattern of the persona library uploads (8MB engine photo
|
|
47
|
-
* limit) and sniff its real type. Shared by the segment upload and the
|
|
48
|
-
* publish_existing image path, so both read local files the same way.
|
|
49
|
-
*/
|
|
50
26
|
export async function readLocalImage(path) {
|
|
51
27
|
let fileStat;
|
|
52
28
|
try {
|
|
@@ -73,34 +49,18 @@ export async function readLocalImage(path) {
|
|
|
73
49
|
}
|
|
74
50
|
return { buffer, mimeType };
|
|
75
51
|
}
|
|
76
|
-
/**
|
|
77
|
-
* Upload one local image for a segment and return its mediaId.
|
|
78
|
-
* Only the mediaId reaches tool output: the local path and the temp
|
|
79
|
-
* asset URL never do.
|
|
80
|
-
*/
|
|
81
52
|
export async function uploadSegmentMedia(client, path) {
|
|
82
53
|
const { buffer, mimeType } = await readLocalImage(path);
|
|
83
54
|
const formData = new FormData();
|
|
84
55
|
formData.append('file', new Blob([buffer], { type: mimeType }), basename(path));
|
|
85
56
|
const result = await client.request('/api/media/upload', {
|
|
86
57
|
method: 'POST',
|
|
87
|
-
// No JSON content type: fetch sets the multipart boundary itself.
|
|
88
58
|
headers: client.getHeaders(false),
|
|
89
59
|
body: formData,
|
|
90
60
|
}, 'upload segment media', UPLOAD_TIMEOUT_MS);
|
|
91
61
|
const parsed = parseContractResponse(uploadMediaContract, result);
|
|
92
62
|
return { mediaId: parsed.mediaId };
|
|
93
63
|
}
|
|
94
|
-
/**
|
|
95
|
-
* Mechanically check one image URL through the engine (no LLM, no
|
|
96
|
-
* relevance judgement): the agent, who sees the image, decides
|
|
97
|
-
* relevance. Returns exactly one code plus the probed dimensions when
|
|
98
|
-
* the engine measured them, plus has_face when the engine reported it
|
|
99
|
-
* (whether a detectable face is in the photo, or null when there is no
|
|
100
|
-
* file to check or the detector is unavailable — issue #589); the URL
|
|
101
|
-
* never reaches output. With a video aspect given, a photo that cannot
|
|
102
|
-
* fill the frame returns wrong_aspect instead of ok.
|
|
103
|
-
*/
|
|
104
64
|
export async function checkSegmentMedia(client, url, videoAspect) {
|
|
105
65
|
let parsed;
|
|
106
66
|
try {
|
|
@@ -123,8 +83,6 @@ export async function checkSegmentMedia(client, url, videoAspect) {
|
|
|
123
83
|
narrowed.width = checked.width;
|
|
124
84
|
if (checked.height !== undefined)
|
|
125
85
|
narrowed.height = checked.height;
|
|
126
|
-
// has_face is lenient by design (issue #589): a non-boolean value is
|
|
127
|
-
// dropped (older engines omit the key entirely), never an error.
|
|
128
86
|
if (checked.has_face === true || checked.has_face === false || checked.has_face === null) {
|
|
129
87
|
narrowed.has_face = checked.has_face;
|
|
130
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-user-media.js","sourceRoot":"","sources":["../src/client-user-media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,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CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IACD,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAChE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CACjC,kBAAkB,EAClB;QACE,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE;QAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,CAC3D;KACF,EACD,qBAAqB,CACtB,CAAC;IACF,MAAM,OAAO,GAAG,qBAAqB,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAyF,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;IAC9H,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS;QAAE,QAAQ,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAChE,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;QAAE,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACnE,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,IAAI,OAAO,CAAC,QAAQ,KAAK,KAAK,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;QACzF,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IACvC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { parseContractResponse } from './contract-response.js';
|
|
2
2
|
import { cancelVideoTask as cancelVideoTaskContract } from './contracts/video-tasks.js';
|
|
3
|
-
//---------------
|
|
4
|
-
// DELETE /api/persona/video-task/[taskId] — cancel/remove an engine task.
|
|
5
|
-
// Standalone function (not a client method) because client.ts is
|
|
6
|
-
// grandfathered over the 500-line cap and may not grow.
|
|
7
|
-
//---------------
|
|
8
3
|
export async function cancelVideoTask(client, taskId) {
|
|
9
4
|
const raw = await client.request(`/api/persona/video-task/${encodeURIComponent(taskId)}`, { method: 'DELETE', headers: client.getHeaders() }, 'cancel video task');
|
|
10
5
|
return parseContractResponse(cancelVideoTaskContract, raw);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-video-task.js","sourceRoot":"","sources":["../src/client-video-task.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAGxF,
|
|
1
|
+
{"version":3,"file":"client-video-task.js","sourceRoot":"","sources":["../src/client-video-task.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAGxF,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAA0B,EAC1B,MAAc;IAEd,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,2BAA2B,kBAAkB,CAAC,MAAM,CAAC,EAAE,EACvD,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,EAClD,mBAAmB,CACpB,CAAC;IACF,OAAO,qBAAqB,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC;AAC7D,CAAC"}
|