post-engineer-mcp 1.52.671 → 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/README.md +1 -2
- package/dist/account-shapes.d.ts +2 -0
- 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.d.ts +4 -0
- package/dist/client-telegram.js +13 -0
- package/dist/client-telegram.js.map +1 -0
- package/dist/client-tool-config.js +0 -7
- package/dist/client-tool-config.js.map +1 -1
- package/dist/client-types.d.ts +11 -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 +6 -119
- 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.d.ts +14 -0
- package/dist/connect-account.js +47 -26
- 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 +114 -11
- package/dist/contracts/accounts.js +32 -56
- 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 +6 -15
- package/dist/contracts/metrics.js +0 -74
- package/dist/contracts/metrics.js.map +1 -1
- package/dist/contracts/personas.d.ts +98 -19
- package/dist/contracts/personas.js +24 -93
- package/dist/contracts/personas.js.map +1 -1
- package/dist/contracts/posts.d.ts +9 -11
- package/dist/contracts/posts.js +1 -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 +4 -17
- package/dist/contracts/providers.js +5 -30
- package/dist/contracts/providers.js.map +1 -1
- package/dist/contracts/schedule-warnings.d.ts +2 -0
- package/dist/contracts/schedule-warnings.js +0 -3
- package/dist/contracts/schedule-warnings.js.map +1 -1
- package/dist/contracts/schedule.d.ts +7 -14
- package/dist/contracts/schedule.js +1 -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 +40 -38
- 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 +48 -4
- package/dist/generate-video.js +2 -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 +1 -6
- 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.d.ts +2 -0
- 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.d.ts +2 -0
- 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 +1 -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 +35 -1
- package/dist/single-video-shape.js +7 -18
- package/dist/single-video-shape.js.map +1 -1
- package/dist/slot-detail-present.d.ts +67 -0
- package/dist/slot-detail-present.js +47 -0
- package/dist/slot-detail-present.js.map +1 -0
- package/dist/tool-annotations.js.map +1 -1
- package/dist/tools-batch.d.ts +51 -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 +6 -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.d.ts +2 -0
- 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 +1 -11
- package/dist/tools-publishing-accounts.js.map +1 -1
- package/dist/tools-single-video.d.ts +2 -4
- package/dist/tools-single-video.js +2 -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 +5 -131
- 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-publishing-accounts.js","sourceRoot":"","sources":["../src/client-publishing-accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EACL,4BAA4B,IAAI,oCAAoC,EACpE,4BAA4B,IAAI,oCAAoC,GACrE,MAAM,yBAAyB,CAAC;AAEjC,
|
|
1
|
+
{"version":3,"file":"client-publishing-accounts.js","sourceRoot":"","sources":["../src/client-publishing-accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EACL,4BAA4B,IAAI,oCAAoC,EACpE,4BAA4B,IAAI,oCAAoC,GACrE,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,MAA0B,EAC1B,SAAiB;IAEjB,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,8CAA8C,kBAAkB,CAAC,SAAS,CAAC,EAAE,EAC7E,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,EAC/C,iCAAiC,CAClC,CAAC;IACF,OAAO,qBAAqB,CAAC,oCAAoC,EAAE,GAAG,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,MAA0B,EAC1B,SAAiB,EACjB,QAAkC;IAElC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,8CAA8C,kBAAkB,CAAC,SAAS,CAAC,EAAE,EAC7E;QACE,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE;QAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;KACnC,EACD,iCAAiC,CAClC,CAAC;IACF,OAAO,qBAAqB,CAAC,oCAAoC,EAAE,GAAG,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PostEngineerClient } from './client.js';
|
|
2
|
+
import type { ResponseOf } from './contracts/endpoint.js';
|
|
3
|
+
import { connectTelegramAccount as connectTelegramAccountContract } from './contracts/accounts.js';
|
|
4
|
+
export declare function connectTelegramAccount(client: PostEngineerClient, botToken: string, chatId: string, chatType: 'channel' | 'group'): Promise<ResponseOf<typeof connectTelegramAccountContract>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { parseContractResponse } from './contract-response.js';
|
|
2
|
+
import { connectTelegramAccount as connectTelegramAccountContract } from './contracts/accounts.js';
|
|
3
|
+
import { redactSecretFromError } from './secret-redaction.js';
|
|
4
|
+
export async function connectTelegramAccount(client, botToken, chatId, chatType) {
|
|
5
|
+
try {
|
|
6
|
+
const raw = await client.request('/api/telegram-connect', { method: 'POST', headers: client.getHeaders(), body: JSON.stringify({ botToken, chatId, chatType }) }, 'connect Telegram account');
|
|
7
|
+
return parseContractResponse(connectTelegramAccountContract, raw);
|
|
8
|
+
}
|
|
9
|
+
catch (error) {
|
|
10
|
+
throw redactSecretFromError(error, botToken);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=client-telegram.js.map
|
|
@@ -0,0 +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,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,27 +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
|
-
|
|
91
|
-
* Publish mode. 'scheduled' (default) slots the video at startAt + times;
|
|
92
|
-
* 'asap' publishes it the moment generation finishes, with no scheduled
|
|
93
|
-
* time. In 'asap' mode startAt/times must not be set.
|
|
94
|
-
*/
|
|
63
|
+
telegramAccountIds?: string[];
|
|
95
64
|
mode?: 'scheduled' | 'asap';
|
|
96
|
-
/** ISO datetime when the publish slot may start; naive values are wall-clock in timezone. Required unless mode is 'asap'. */
|
|
97
65
|
startAt?: string;
|
|
98
|
-
/** Daily publish times (HH:MM, 24h). Required unless mode is 'asap'. */
|
|
99
66
|
times?: string[];
|
|
100
|
-
/** IANA timezone for a naive startAt and the times (display-only in 'asap' mode). Defaults to UTC. */
|
|
101
67
|
timezone?: string;
|
|
102
68
|
options?: {
|
|
103
|
-
/** The one video mode: full_lipsync, hook_lipsync or faceless. Required — it decides the render path and the price. */
|
|
104
69
|
videoType: VideoType;
|
|
105
|
-
/** 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. */
|
|
106
70
|
musicMood?: string;
|
|
107
71
|
audioUrl?: string;
|
|
108
72
|
imageId?: string;
|
|
@@ -113,10 +77,10 @@ export interface GeneratePersonaVideoInput {
|
|
|
113
77
|
paragraphNumber?: number;
|
|
114
78
|
language?: string;
|
|
115
79
|
niche?: string;
|
|
116
|
-
/** Segments script (MCP first, Phase 1): first hook, then content takes in order. Validated by the web route before any token debit. */
|
|
117
80
|
segments?: Array<{
|
|
118
81
|
kind: 'hook' | 'content';
|
|
119
82
|
text: string;
|
|
83
|
+
cta?: boolean;
|
|
120
84
|
media?: Array<{
|
|
121
85
|
mediaId?: string;
|
|
122
86
|
url?: string;
|
|
@@ -128,7 +92,6 @@ export interface GeneratePersonaVideoInput {
|
|
|
128
92
|
}>;
|
|
129
93
|
}>;
|
|
130
94
|
};
|
|
131
|
-
/** Omitted: a UUID is generated per call, so a retry cannot double-generate. */
|
|
132
95
|
idempotencyKey?: string;
|
|
133
96
|
}
|
|
134
97
|
export interface UpdatePersonaInput {
|
|
@@ -144,56 +107,31 @@ export interface UpdatePersonaInput {
|
|
|
144
107
|
paragraphNumber?: number;
|
|
145
108
|
niche?: string;
|
|
146
109
|
faceQuality?: FaceQuality;
|
|
110
|
+
cta?: PersonaCtaInput;
|
|
147
111
|
}
|
|
148
|
-
/** Input for publishing a user-provided video directly, without generation. */
|
|
149
112
|
export interface PublishVideoDirectInput {
|
|
150
113
|
provider: SocialProvider;
|
|
151
|
-
/** Local path to the video file (.mp4 or .mov, max 2GB). */
|
|
152
114
|
videoPath: string;
|
|
153
|
-
/** 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). */
|
|
154
115
|
accountIds: string[];
|
|
155
|
-
/** YouTube, Rumble and Fanvue: required. Pinterest: pin title (optional). */
|
|
156
116
|
title?: string;
|
|
157
|
-
/** YouTube, Rumble and Fanvue: required. Pinterest: pin description (optional; caption is used when omitted). */
|
|
158
117
|
description?: string;
|
|
159
|
-
/** YouTube only: required, at least one tag. */
|
|
160
118
|
tags?: string[];
|
|
161
|
-
/** YouTube only: required. */
|
|
162
119
|
privacyStatus?: 'public' | 'private' | 'unlisted';
|
|
163
|
-
/** Instagram/Bluesky/LinkedIn/Threads/Facebook/3Speak: required. Pinterest: pin description when description is omitted. */
|
|
164
120
|
caption?: string;
|
|
165
|
-
/** Pinterest only: required. The board the pin goes to (the id from accounts (action: list_boards)). */
|
|
166
121
|
boardId?: string;
|
|
167
|
-
/**
|
|
168
|
-
* Omitted: a UUID is generated per call. Reuse the same key when retrying
|
|
169
|
-
* a timed-out call so the server replays the original result instead of
|
|
170
|
-
* publishing the video again. Exception: a result with errorCode
|
|
171
|
-
* publish_unknown means the post may already be live but its record was
|
|
172
|
-
* lost — do not retry it, check the provider account first.
|
|
173
|
-
*/
|
|
174
122
|
idempotencyKey?: string;
|
|
175
123
|
}
|
|
176
|
-
/** Input for publishing a signed-upload video by id, without generation. */
|
|
177
124
|
export interface PublishUploadedVideoInput {
|
|
178
125
|
provider: SocialProvider;
|
|
179
|
-
/** The uploadId of a completed signed upload (create + complete). Single-use. */
|
|
180
126
|
uploadId: string;
|
|
181
|
-
/** Target accounts (same IDs as PublishVideoDirectInput). */
|
|
182
127
|
accountIds: string[];
|
|
183
|
-
/** YouTube, Rumble and Fanvue: required. Pinterest: pin title (optional). */
|
|
184
128
|
title?: string;
|
|
185
|
-
/** YouTube, Rumble and Fanvue: required. Pinterest: pin description (optional; caption is used when omitted). */
|
|
186
129
|
description?: string;
|
|
187
|
-
/** YouTube only: required, at least one tag. */
|
|
188
130
|
tags?: string[];
|
|
189
|
-
/** YouTube only: required. */
|
|
190
131
|
privacyStatus?: 'public' | 'private' | 'unlisted';
|
|
191
|
-
/** Instagram/Bluesky/LinkedIn/Threads/Facebook/3Speak: required. Pinterest: pin description when description is omitted. */
|
|
192
132
|
caption?: string;
|
|
193
|
-
/** Pinterest only: required. The board the pin goes to (the id from accounts (action: list_boards)). */
|
|
194
133
|
boardId?: string;
|
|
195
134
|
}
|
|
196
|
-
/** A minted signed video upload: PUT the bytes to signedUrl, then complete. */
|
|
197
135
|
export interface MintedVideoUpload {
|
|
198
136
|
uploadId: string;
|
|
199
137
|
signedUrl: string;
|
|
@@ -201,14 +139,12 @@ export interface MintedVideoUpload {
|
|
|
201
139
|
expiresAt: string;
|
|
202
140
|
maxBytes: number;
|
|
203
141
|
}
|
|
204
|
-
/** A completed (verified) signed video upload, ready to publish by id. */
|
|
205
142
|
export interface CompletedVideoUpload {
|
|
206
143
|
uploadId: string;
|
|
207
144
|
status: 'ready';
|
|
208
145
|
contentType: string;
|
|
209
146
|
sizeBytes: number;
|
|
210
147
|
}
|
|
211
|
-
/** POST /api/media/publish-existing body fields, built by the publish_existing handler once every reference is resolved. */
|
|
212
148
|
export interface PublishExistingInput {
|
|
213
149
|
media: {
|
|
214
150
|
kind: 'task';
|
|
@@ -221,31 +157,25 @@ export interface PublishExistingInput {
|
|
|
221
157
|
imageData: string;
|
|
222
158
|
contentType: 'image/jpeg' | 'image/png';
|
|
223
159
|
};
|
|
224
|
-
/** Resolved account ids per network; the networks are its keys. */
|
|
225
160
|
accounts: Partial<Record<SocialProvider, string[]>>;
|
|
226
161
|
title: string;
|
|
227
162
|
description: string;
|
|
228
|
-
/** Caption-network text override; the server falls back to description. */
|
|
229
163
|
caption?: string;
|
|
230
164
|
personaId?: string;
|
|
231
165
|
mode: 'asap' | 'scheduled';
|
|
232
|
-
/** mode scheduled: the one publish moment (wall-clock in timezone, or with an offset). */
|
|
233
166
|
publishAt?: string;
|
|
234
167
|
timezone: string;
|
|
235
168
|
tags?: string[];
|
|
236
169
|
privacyStatus?: 'public' | 'private' | 'unlisted';
|
|
237
170
|
boardId?: string;
|
|
238
|
-
/** Sent on every call: a retry with the same key replays the original result (schedule or recorded posts). */
|
|
239
171
|
idempotencyKey: string;
|
|
240
172
|
}
|
|
241
|
-
/** One scheduled slot from POST /api/media/publish-existing. */
|
|
242
173
|
export interface PublishExistingSlot {
|
|
243
174
|
id: string;
|
|
244
175
|
slot_at: string;
|
|
245
176
|
title: string;
|
|
246
177
|
status: string;
|
|
247
178
|
}
|
|
248
|
-
/** A stored login is already dead. The slot was still scheduled. */
|
|
249
179
|
export interface PublishExistingReconnectWarning {
|
|
250
180
|
code: 'account_needs_reconnect';
|
|
251
181
|
accounts: Array<{
|
|
@@ -253,7 +183,6 @@ export interface PublishExistingReconnectWarning {
|
|
|
253
183
|
accountId: string;
|
|
254
184
|
}>;
|
|
255
185
|
}
|
|
256
|
-
/** Narrowed POST /api/media/publish-existing response. */
|
|
257
186
|
export type PublishExistingResult = {
|
|
258
187
|
mode: 'scheduled';
|
|
259
188
|
success: true;
|
|
@@ -264,7 +193,6 @@ export type PublishExistingResult = {
|
|
|
264
193
|
} | {
|
|
265
194
|
mode: 'asap';
|
|
266
195
|
success: boolean;
|
|
267
|
-
/** True when every account answered from the publish ledger: nothing was posted again. */
|
|
268
196
|
replayed: boolean;
|
|
269
197
|
mediaKind: 'task' | 'upload' | 'image';
|
|
270
198
|
publishes: Array<{
|
|
@@ -274,20 +202,16 @@ export type PublishExistingResult = {
|
|
|
274
202
|
}>;
|
|
275
203
|
logId: string;
|
|
276
204
|
};
|
|
277
|
-
/** One per-account outcome from a direct-publish upload. */
|
|
278
205
|
export interface DirectPublishAccountResult {
|
|
279
206
|
accountId: string;
|
|
280
207
|
success: boolean;
|
|
281
208
|
videoId?: string;
|
|
282
209
|
videoUrl?: string;
|
|
283
210
|
postId?: string;
|
|
284
|
-
/** Ready-made post URL (Pinterest pin URL, Instagram/Threads/Facebook permalink). */
|
|
285
211
|
permalink?: string;
|
|
286
212
|
error?: string;
|
|
287
|
-
/** Stable failure code (e.g. publish_unknown: the post may already be live but its record was lost — do not retry). */
|
|
288
213
|
errorCode?: string;
|
|
289
214
|
}
|
|
290
|
-
/** Narrowed POST /api/upload-content response. */
|
|
291
215
|
export interface DirectPublishResult {
|
|
292
216
|
success: boolean;
|
|
293
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,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE5G,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE5E,
|
|
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,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,qBAAqB,EAAE,MAAM,w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D;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"}
|