vidspotai-shared 1.0.95 → 1.0.97
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/lib/globals/aiModels/enums.d.ts +3 -0
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +9 -0
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +2 -0
- package/lib/globals/aiModels/providers/hostedAvatars.d.ts +22 -0
- package/lib/globals/aiModels/providers/hostedAvatars.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/hostedAvatars.js +129 -0
- package/lib/globals/aiModels/providers/kling.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/kling.js +85 -1
- package/lib/globals/creditUnit.d.ts +29 -0
- package/lib/globals/creditUnit.d.ts.map +1 -1
- package/lib/globals/creditUnit.js +30 -1
- package/lib/globals/types.d.ts +58 -1
- package/lib/globals/types.d.ts.map +1 -1
- package/lib/globals/types.js +61 -1
- package/lib/models/demoVideoProject.model.d.ts +244 -0
- package/lib/models/demoVideoProject.model.d.ts.map +1 -0
- package/lib/models/demoVideoProject.model.js +2 -0
- package/lib/models/githubConnection.model.d.ts +35 -0
- package/lib/models/githubConnection.model.d.ts.map +1 -0
- package/lib/models/githubConnection.model.js +2 -0
- package/lib/models/index.d.ts +3 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +3 -0
- package/lib/models/outreach.model.d.ts +175 -0
- package/lib/models/outreach.model.d.ts.map +1 -0
- package/lib/models/outreach.model.js +2 -0
- package/lib/models/video.model.d.ts +4 -0
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/schemas/brandKit.schema.d.ts +4 -0
- package/lib/schemas/brandKit.schema.d.ts.map +1 -1
- package/lib/schemas/brandKit.schema.js +10 -0
- package/lib/schemas/demoQuestion.schema.d.ts +286 -0
- package/lib/schemas/demoQuestion.schema.d.ts.map +1 -0
- package/lib/schemas/demoQuestion.schema.js +210 -0
- package/lib/schemas/demoSpec.schema.d.ts +109 -6
- package/lib/schemas/demoSpec.schema.d.ts.map +1 -1
- package/lib/schemas/demoSpec.schema.js +95 -7
- package/lib/schemas/index.d.ts +1 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +1 -0
- package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
- package/lib/services/agent/providerFallback/chains.js +9 -1
- package/lib/services/agent/taskPoller.d.ts.map +1 -1
- package/lib/services/agent/taskPoller.js +17 -6
- package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts +21 -9
- package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/generateAvatarVideo.tool.js +135 -39
- package/lib/services/aiGen/aiGenFactory.service.d.ts +1 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +11 -2
- package/lib/services/aiGen/providers/kling/kling.service.d.ts +36 -1
- package/lib/services/aiGen/providers/kling/kling.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/kling.service.js +62 -5
- package/lib/services/aiGen/providers/kling/klingCredits.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/klingCredits.js +12 -0
- package/lib/services/aiGen/providers/kling/klingRequests.d.ts +14 -1
- package/lib/services/aiGen/providers/kling/klingRequests.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/klingRequests.js +44 -0
- package/lib/services/aiGen/providers/kling/klingStatus.d.ts +13 -1
- package/lib/services/aiGen/providers/kling/klingStatus.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/klingStatus.js +111 -0
- package/lib/services/aiGen/providers/kling/types.d.ts +71 -0
- package/lib/services/aiGen/providers/kling/types.d.ts.map +1 -1
- package/lib/services/avatarGen/IAvatarVideoProvider.d.ts +136 -0
- package/lib/services/avatarGen/IAvatarVideoProvider.d.ts.map +1 -0
- package/lib/services/avatarGen/IAvatarVideoProvider.js +42 -0
- package/lib/services/avatarGen/avatarProviderFactory.d.ts +18 -0
- package/lib/services/avatarGen/avatarProviderFactory.d.ts.map +1 -0
- package/lib/services/avatarGen/avatarProviderFactory.js +54 -0
- package/lib/services/avatarGen/index.d.ts +6 -0
- package/lib/services/avatarGen/index.d.ts.map +1 -0
- package/lib/services/avatarGen/index.js +21 -0
- package/lib/services/avatarGen/providers/heygenAvatarProvider.d.ts +45 -0
- package/lib/services/avatarGen/providers/heygenAvatarProvider.d.ts.map +1 -0
- package/lib/services/avatarGen/providers/heygenAvatarProvider.js +190 -0
- package/lib/services/avatarGen/providers/klingAvatarProvider.d.ts +32 -0
- package/lib/services/avatarGen/providers/klingAvatarProvider.d.ts.map +1 -0
- package/lib/services/avatarGen/providers/klingAvatarProvider.js +69 -0
- package/lib/services/avatarGen/providers/tavusAvatarProvider.d.ts +56 -0
- package/lib/services/avatarGen/providers/tavusAvatarProvider.d.ts.map +1 -0
- package/lib/services/avatarGen/providers/tavusAvatarProvider.js +183 -0
- package/lib/services/demo/demoAuthor.d.ts +45 -0
- package/lib/services/demo/demoAuthor.d.ts.map +1 -0
- package/lib/services/demo/demoAuthor.js +75 -0
- package/lib/services/demo/demoAuthorNormalize.d.ts +49 -0
- package/lib/services/demo/demoAuthorNormalize.d.ts.map +1 -0
- package/lib/services/demo/demoAuthorNormalize.js +327 -0
- package/lib/services/demo/demoAuthorPrompt.d.ts +102 -0
- package/lib/services/demo/demoAuthorPrompt.d.ts.map +1 -0
- package/lib/services/demo/demoAuthorPrompt.js +243 -0
- package/lib/services/demo/demoCredits.d.ts +20 -0
- package/lib/services/demo/demoCredits.d.ts.map +1 -0
- package/lib/services/demo/demoCredits.js +51 -0
- package/lib/services/demo/demoMediaGuard.d.ts +43 -0
- package/lib/services/demo/demoMediaGuard.d.ts.map +1 -0
- package/lib/services/demo/demoMediaGuard.js +207 -0
- package/lib/services/demo/demoMusic.d.ts +13 -0
- package/lib/services/demo/demoMusic.d.ts.map +1 -0
- package/lib/services/demo/demoMusic.js +93 -0
- package/lib/services/demo/demoPrefill.d.ts +76 -0
- package/lib/services/demo/demoPrefill.d.ts.map +1 -0
- package/lib/services/demo/demoPrefill.js +435 -0
- package/lib/services/demo/demoRevisePrompt.d.ts +17 -0
- package/lib/services/demo/demoRevisePrompt.d.ts.map +1 -0
- package/lib/services/demo/demoRevisePrompt.js +85 -0
- package/lib/services/demo/demoReviser.d.ts +63 -0
- package/lib/services/demo/demoReviser.d.ts.map +1 -0
- package/lib/services/demo/demoReviser.js +81 -0
- package/lib/services/demo/demoScriptPrompt.d.ts +63 -0
- package/lib/services/demo/demoScriptPrompt.d.ts.map +1 -0
- package/lib/services/demo/demoScriptPrompt.js +234 -0
- package/lib/services/demo/demoScriptWriter.d.ts +65 -0
- package/lib/services/demo/demoScriptWriter.d.ts.map +1 -0
- package/lib/services/demo/demoScriptWriter.js +211 -0
- package/lib/services/demo/demoTriage.d.ts +65 -0
- package/lib/services/demo/demoTriage.d.ts.map +1 -0
- package/lib/services/demo/demoTriage.js +130 -0
- package/lib/services/demo/githubOAuth.d.ts +78 -0
- package/lib/services/demo/githubOAuth.d.ts.map +1 -0
- package/lib/services/demo/githubOAuth.js +209 -0
- package/lib/services/demo/githubOAuthState.d.ts +10 -0
- package/lib/services/demo/githubOAuthState.d.ts.map +1 -0
- package/lib/services/demo/githubOAuthState.js +63 -0
- package/lib/services/demo/index.d.ts +24 -0
- package/lib/services/demo/index.d.ts.map +1 -0
- package/lib/services/demo/index.js +39 -0
- package/lib/services/firestore.service.d.ts +11 -0
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +24 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +2 -0
- package/lib/services/tts/providers/elevenlabs.service.d.ts.map +1 -1
- package/lib/services/tts/providers/elevenlabs.service.js +16 -8
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/outreachTemplate.d.ts +46 -0
- package/lib/utils/outreachTemplate.d.ts.map +1 -0
- package/lib/utils/outreachTemplate.js +174 -0
- package/package.json +1 -1
|
@@ -23,11 +23,14 @@ export declare enum EVideoGenModels {
|
|
|
23
23
|
KLING_V2_5_TURBO = "kling-v2.5-turbo",
|
|
24
24
|
KLING_V2_6 = "kling-v2.6",
|
|
25
25
|
KLING_V3_0 = "kling-v3.0",
|
|
26
|
+
KLING_V3_0_TURBO = "kling-v3.0-turbo",
|
|
26
27
|
KLING_AVATAR = "kling-avatar",
|
|
27
28
|
KLING_VIDEO_O1 = "kling-video-o1",
|
|
28
29
|
KLING_V3_OMNI_VIDEO = "kling-v3-omni-video",
|
|
29
30
|
KLING_MOTION_CONTROL = "kling-motion-control",
|
|
30
31
|
KLING_LIP_SYNC = "kling-lip-sync",
|
|
32
|
+
HEYGEN_AVATAR = "heygen-avatar",
|
|
33
|
+
TAVUS_AVATAR = "tavus-avatar",
|
|
31
34
|
MINIMAX_HAILUO_2_3_FAST = "minimax-hailuo-2.3-fast",
|
|
32
35
|
MINIMAX_HAILUO_2_3 = "minimax-hailuo-2.3",
|
|
33
36
|
MINIMAX_HAILUO_02 = "minimax-hailuo-02",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/globals/aiModels/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,0BAA0B,+BAA+B;IACzD,+BAA+B,oCAAoC;IACnE,0BAA0B,+BAA+B;IACzD,sBAAsB,2BAA2B;IACjD,2BAA2B,gCAAgC;IAC3D,cAAc,mBAAmB;IACjC,mBAAmB,wBAAwB;IAC3C,mBAAmB,wBAAwB;IAC3C,YAAY,iBAAiB;IAC7B,iBAAiB,sBAAsB;IACvC,YAAY,iBAAiB;IAC7B,a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AAmB,wBAAwB;IAG3C,mBAAmB,wBAAwB;IAC3C,aAAa,kBAAkB;IAC/B,iBAAiB,sBAAsB;CACxC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;CAgDlB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEvF;;;;GAIG;AACH,oBAAY,eAAe;IACzB,iBAAiB,sBAAsB;IACvC,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;CAC1C;AAED,oBAAY,cAAc;IAIxB,cAAc,mBAAmB;IACjC,mBAAmB,wBAAwB;IAC3C,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IAQzC,wBAAwB,6BAA6B;IACrD,yBAAyB,8BAA8B;IACvD,2BAA2B,gCAAgC;IAC3D,0BAA0B,+BAA+B;IAIzD,uBAAuB,4BAA4B;IACnD,qBAAqB,0BAA0B;IAC/C,uBAAuB,4BAA4B;IACnD,qBAAqB,0BAA0B;CAChD;AAED;;;;GAIG;AACH,oBAAY,aAAa;IACvB,wBAAwB,6BAA6B;CACtD;AAED,MAAM,MAAM,WAAW,GACnB,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,eAAe,GACf,aAAa,CAAC"}
|
|
@@ -27,6 +27,10 @@ var EVideoGenModels;
|
|
|
27
27
|
EVideoGenModels["KLING_V2_5_TURBO"] = "kling-v2.5-turbo";
|
|
28
28
|
EVideoGenModels["KLING_V2_6"] = "kling-v2.6";
|
|
29
29
|
EVideoGenModels["KLING_V3_0"] = "kling-v3.0";
|
|
30
|
+
// Kling API 2.0 surface (POST /text-to-video/kling-3.0-turbo) — NOT the
|
|
31
|
+
// /v1/videos/* family every other Kling key above uses. See the config in
|
|
32
|
+
// globals/aiModels/providers/kling.ts for the full delta.
|
|
33
|
+
EVideoGenModels["KLING_V3_0_TURBO"] = "kling-v3.0-turbo";
|
|
30
34
|
EVideoGenModels["KLING_AVATAR"] = "kling-avatar";
|
|
31
35
|
// OmniVideo endpoint (/v1/videos/omni-video) — different from standard text2video/image2video
|
|
32
36
|
EVideoGenModels["KLING_VIDEO_O1"] = "kling-video-o1";
|
|
@@ -35,6 +39,11 @@ var EVideoGenModels;
|
|
|
35
39
|
EVideoGenModels["KLING_MOTION_CONTROL"] = "kling-motion-control";
|
|
36
40
|
// Lip sync (/v1/videos/identify-face + /v1/videos/advanced-lip-sync)
|
|
37
41
|
EVideoGenModels["KLING_LIP_SYNC"] = "kling-lip-sync";
|
|
42
|
+
// ── Hosted avatar engines (own seam: IAvatarVideoProvider, NOT the generic
|
|
43
|
+
// video factory). "hosted" inputMode — caller supplies a provider-hosted
|
|
44
|
+
// avatar + voice + script; the engine does its own TTS + lipsync. ──────────
|
|
45
|
+
EVideoGenModels["HEYGEN_AVATAR"] = "heygen-avatar";
|
|
46
|
+
EVideoGenModels["TAVUS_AVATAR"] = "tavus-avatar";
|
|
38
47
|
EVideoGenModels["MINIMAX_HAILUO_2_3_FAST"] = "minimax-hailuo-2.3-fast";
|
|
39
48
|
EVideoGenModels["MINIMAX_HAILUO_2_3"] = "minimax-hailuo-2.3";
|
|
40
49
|
EVideoGenModels["MINIMAX_HAILUO_02"] = "minimax-hailuo-02";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/globals/aiModels/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/globals/aiModels/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAcvC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,YAAY,CAYvB,CAAC;AAEvC,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAMnE,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
|
@@ -23,6 +23,7 @@ const bytedance_1 = require("./providers/bytedance");
|
|
|
23
23
|
const google_1 = require("./providers/google");
|
|
24
24
|
const runway_1 = require("./providers/runway");
|
|
25
25
|
const kling_1 = require("./providers/kling");
|
|
26
|
+
const hostedAvatars_1 = require("./providers/hostedAvatars");
|
|
26
27
|
const minimax_1 = require("./providers/minimax");
|
|
27
28
|
const openai_1 = require("./providers/openai");
|
|
28
29
|
const alibaba_1 = require("./providers/alibaba");
|
|
@@ -34,6 +35,7 @@ exports.aiModelConfigs = {
|
|
|
34
35
|
...google_1.googleConfigs,
|
|
35
36
|
...runway_1.runwayConfigs,
|
|
36
37
|
...kling_1.klingConfigs,
|
|
38
|
+
...hostedAvatars_1.hostedAvatarConfigs,
|
|
37
39
|
...minimax_1.minimaxConfigs,
|
|
38
40
|
...openai_1.openaiConfigs,
|
|
39
41
|
...alibaba_1.alibabaConfigs,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IModelSchema } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Hosted avatar-engine model configs (HeyGen, Tavus).
|
|
4
|
+
*
|
|
5
|
+
* Unlike kling-avatar ("byo-media": we supply a face image + audio we TTS'd),
|
|
6
|
+
* these are "hosted" engines — the caller picks a provider-hosted avatar/replica
|
|
7
|
+
* + voice and supplies a SCRIPT; the engine does its own TTS + lipsync in one
|
|
8
|
+
* render (no multi-scene split). The provider seam (IAvatarVideoProvider) owns
|
|
9
|
+
* those behavioral differences via `capabilities`; this config carries only the
|
|
10
|
+
* static metadata (cost, guidance, poll cadence, duration bounds).
|
|
11
|
+
*
|
|
12
|
+
* ⚠️ COST IS UNVERIFIED — both engines bill per-credit/per-minute on tiered API
|
|
13
|
+
* plans. The `perMinute` USD figures below are conservative (higher-side)
|
|
14
|
+
* estimates so we never under-bill; confirm against the HeyGen + Tavus API
|
|
15
|
+
* dashboards before prod launch and update here.
|
|
16
|
+
*
|
|
17
|
+
* The `avatar.ttsProvider` field is required by IAvatarModelConfig but UNUSED
|
|
18
|
+
* for hosted engines (they synthesize natively — `capabilities.nativeTts` is
|
|
19
|
+
* true). It's left as "elevenlabs" purely to satisfy the type.
|
|
20
|
+
*/
|
|
21
|
+
export declare const hostedAvatarConfigs: Record<string, IModelSchema>;
|
|
22
|
+
//# sourceMappingURL=hostedAvatars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostedAvatars.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/hostedAvatars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,YAAY,EAAE,MAAM,UAAU,CAAC;AAE5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAkH5D,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hostedAvatarConfigs = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Hosted avatar-engine model configs (HeyGen, Tavus).
|
|
6
|
+
*
|
|
7
|
+
* Unlike kling-avatar ("byo-media": we supply a face image + audio we TTS'd),
|
|
8
|
+
* these are "hosted" engines — the caller picks a provider-hosted avatar/replica
|
|
9
|
+
* + voice and supplies a SCRIPT; the engine does its own TTS + lipsync in one
|
|
10
|
+
* render (no multi-scene split). The provider seam (IAvatarVideoProvider) owns
|
|
11
|
+
* those behavioral differences via `capabilities`; this config carries only the
|
|
12
|
+
* static metadata (cost, guidance, poll cadence, duration bounds).
|
|
13
|
+
*
|
|
14
|
+
* ⚠️ COST IS UNVERIFIED — both engines bill per-credit/per-minute on tiered API
|
|
15
|
+
* plans. The `perMinute` USD figures below are conservative (higher-side)
|
|
16
|
+
* estimates so we never under-bill; confirm against the HeyGen + Tavus API
|
|
17
|
+
* dashboards before prod launch and update here.
|
|
18
|
+
*
|
|
19
|
+
* The `avatar.ttsProvider` field is required by IAvatarModelConfig but UNUSED
|
|
20
|
+
* for hosted engines (they synthesize natively — `capabilities.nativeTts` is
|
|
21
|
+
* true). It's left as "elevenlabs" purely to satisfy the type.
|
|
22
|
+
*/
|
|
23
|
+
exports.hostedAvatarConfigs = {
|
|
24
|
+
// ── HeyGen ────────────────────────────────────────────────────────────────
|
|
25
|
+
// Endpoint: POST /v2/video/generate (hosted avatar_id + voice_id + input_text)
|
|
26
|
+
"heygen-avatar": {
|
|
27
|
+
modelId: "heygen-avatar",
|
|
28
|
+
type: ["avatar-video"],
|
|
29
|
+
tier: "T2",
|
|
30
|
+
fields: {
|
|
31
|
+
hostedAvatarId: { required: true },
|
|
32
|
+
hostedVoiceId: { required: true },
|
|
33
|
+
ttsText: { required: true },
|
|
34
|
+
mode: { allowedValues: ["std", "pro"], default: "std" },
|
|
35
|
+
},
|
|
36
|
+
concurrentRequests: 5,
|
|
37
|
+
cost: {
|
|
38
|
+
// UNVERIFIED estimate — HeyGen API bills per credit (≈ per 30s of video).
|
|
39
|
+
// ~$0.30/min as a safe upper bound; confirm from the HeyGen dashboard.
|
|
40
|
+
perMinute: 0.3,
|
|
41
|
+
},
|
|
42
|
+
guidance: {
|
|
43
|
+
quality: 4,
|
|
44
|
+
speed: 3,
|
|
45
|
+
bestFor: "Studio-grade talking-head presenters from a hosted avatar catalog; pick when you want a polished spokesperson without supplying your own face image.",
|
|
46
|
+
notes: "Hosted engine — renders the whole script in one shot (no scene split). Cost UNVERIFIED.",
|
|
47
|
+
},
|
|
48
|
+
avatar: {
|
|
49
|
+
audioDurationMin: 1,
|
|
50
|
+
audioDurationMax: 1800, // 30 min — HeyGen handles long scripts in one render
|
|
51
|
+
ttsProvider: "elevenlabs", // UNUSED (native TTS) — see file header
|
|
52
|
+
pollIntervalMs: 8000,
|
|
53
|
+
pollTimeoutMs: 12 * 60 * 1000,
|
|
54
|
+
maxAutoRequeueAttempts: 5,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
// ── Tavus ───────────────────────────────────────────────────────────────
|
|
58
|
+
// Endpoint: POST /v2/videos (replica_id + script). Hosted "avatar" = replica.
|
|
59
|
+
"tavus-avatar": {
|
|
60
|
+
modelId: "tavus-avatar",
|
|
61
|
+
type: ["avatar-video"],
|
|
62
|
+
tier: "T2",
|
|
63
|
+
fields: {
|
|
64
|
+
hostedAvatarId: { required: true }, // → replica_id
|
|
65
|
+
ttsText: { required: true }, // → script
|
|
66
|
+
mode: { allowedValues: ["std", "pro"], default: "std" },
|
|
67
|
+
},
|
|
68
|
+
concurrentRequests: 5,
|
|
69
|
+
cost: {
|
|
70
|
+
// UNVERIFIED estimate — Tavus bills per minute of generated video on
|
|
71
|
+
// tiered plans. ~$0.50/min as a safe upper bound; confirm from dashboard.
|
|
72
|
+
perMinute: 0.5,
|
|
73
|
+
},
|
|
74
|
+
guidance: {
|
|
75
|
+
quality: 4,
|
|
76
|
+
speed: 3,
|
|
77
|
+
bestFor: "Personalized presenters from a trained replica + multilingual delivery (the dubbing wedge); pick when you want the user's own likeness to speak.",
|
|
78
|
+
notes: "Hosted engine — replica IS the avatar (its cloned voice; hostedVoiceId unused). Dedicated dubbing endpoint pending verification. Cost UNVERIFIED.",
|
|
79
|
+
},
|
|
80
|
+
avatar: {
|
|
81
|
+
audioDurationMin: 1,
|
|
82
|
+
audioDurationMax: 1800,
|
|
83
|
+
ttsProvider: "elevenlabs", // UNUSED (native TTS) — see file header
|
|
84
|
+
pollIntervalMs: 8000,
|
|
85
|
+
pollTimeoutMs: 12 * 60 * 1000,
|
|
86
|
+
maxAutoRequeueAttempts: 5,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
// ── Synthesia (CATALOG-ONLY — enterprise tier, provider NOT wired) ────────
|
|
90
|
+
// Endpoint (for when it lands): POST /v2/videos (templateId/avatar + script).
|
|
91
|
+
// Deliberately absent from avatarProviderFactory: this entry exists ONLY so
|
|
92
|
+
// the model surfaces in catalogs/list_models with real cost + guidance (per
|
|
93
|
+
// the model-config cost/guidance rule). Because no IAvatarVideoProvider is
|
|
94
|
+
// registered, isAvatarModel("synthesia-avatar") is false and any attempt to
|
|
95
|
+
// generate throws "No avatar provider registered" — that's the intended
|
|
96
|
+
// deferred state. Wiring the provider (+ enum member + factory line) is the
|
|
97
|
+
// Reach enterprise-tier follow-up.
|
|
98
|
+
"synthesia-avatar": {
|
|
99
|
+
modelId: "synthesia-avatar",
|
|
100
|
+
type: ["avatar-video"],
|
|
101
|
+
tier: "T3",
|
|
102
|
+
fields: {
|
|
103
|
+
hostedAvatarId: { required: true }, // → avatar / template id
|
|
104
|
+
ttsText: { required: true }, // → script
|
|
105
|
+
mode: { allowedValues: ["std", "pro"], default: "std" },
|
|
106
|
+
},
|
|
107
|
+
concurrentRequests: 3,
|
|
108
|
+
cost: {
|
|
109
|
+
// UNVERIFIED estimate — Synthesia is enterprise/seat-priced (no public
|
|
110
|
+
// per-minute API rate). ~$0.60/min as a safe upper bound placeholder;
|
|
111
|
+
// confirm against the enterprise contract before enabling.
|
|
112
|
+
perMinute: 0.6,
|
|
113
|
+
},
|
|
114
|
+
guidance: {
|
|
115
|
+
quality: 5,
|
|
116
|
+
speed: 2,
|
|
117
|
+
bestFor: "Enterprise/compliance-grade avatars across 140+ languages; pick for regulated buyers who need studio presenters and localization at scale.",
|
|
118
|
+
notes: "CATALOG-ONLY — provider not yet wired (enterprise tier deferred). Selecting it will NOT generate until the Synthesia provider lands. Cost UNVERIFIED.",
|
|
119
|
+
},
|
|
120
|
+
avatar: {
|
|
121
|
+
audioDurationMin: 1,
|
|
122
|
+
audioDurationMax: 1800,
|
|
123
|
+
ttsProvider: "elevenlabs", // UNUSED (native TTS) — see file header
|
|
124
|
+
pollIntervalMs: 10000,
|
|
125
|
+
pollTimeoutMs: 15 * 60 * 1000,
|
|
126
|
+
maxAutoRequeueAttempts: 3,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kling.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/kling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAsB,YAAY,EAAE,MAAM,UAAU,CAAC;AAqC5D,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"kling.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/kling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAsB,YAAY,EAAE,MAAM,UAAU,CAAC;AAqC5D,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CA6bnE,CAAC"}
|
|
@@ -234,7 +234,15 @@ exports.klingConfigs = {
|
|
|
234
234
|
},
|
|
235
235
|
concurrentRequests: 10,
|
|
236
236
|
// Verified 2026-05-20 from kling.ai/dev/pricing (V3 tab): std=$0.084/s, pro=$0.112/s, 4k=$0.42/s (no-audio).
|
|
237
|
-
// With generate_audio=true: std=$0.126/s, pro=$0.168/s (1.5× upcharge)
|
|
237
|
+
// With generate_audio=true: std=$0.126/s, pro=$0.168/s (1.5× upcharge).
|
|
238
|
+
//
|
|
239
|
+
// ⚠️ The table below holds the NO-AUDIO base rates. The audio upcharge is
|
|
240
|
+
// NOT encoded here — it is applied in code at
|
|
241
|
+
// services/aiGen/providers/kling/klingCredits.ts:71-73 (`modelKey ===
|
|
242
|
+
// "kling-v3.0" && audio → cost *= 1.5`). Do NOT also add an `audio:` branch
|
|
243
|
+
// to this table: that would double-apply the 1.5× and overcharge every
|
|
244
|
+
// audio generation. If you ever move the upcharge into the table, delete
|
|
245
|
+
// the code path in the same commit.
|
|
238
246
|
cost: {
|
|
239
247
|
table: {
|
|
240
248
|
std: { 5: 0.42, 10: 0.84 },
|
|
@@ -243,6 +251,82 @@ exports.klingConfigs = {
|
|
|
243
251
|
},
|
|
244
252
|
},
|
|
245
253
|
},
|
|
254
|
+
// ─── Kling 3.0 Turbo — API 2.0 surface ──────────────────────────────────────
|
|
255
|
+
// ⚠️ This model does NOT speak the /v1/videos/* API the rest of this file
|
|
256
|
+
// targets. Kling shipped it on their new "API 2.0" surface, which differs in
|
|
257
|
+
// every layer. Verified 2026-07-22 against the official docs:
|
|
258
|
+
//
|
|
259
|
+
// submit POST /text-to-video/kling-3.0-turbo (model in the PATH, no
|
|
260
|
+
// POST /image-to-video/kling-3.0-turbo `model_name` field)
|
|
261
|
+
// body nested { contents[] | prompt, settings{}, options{} }
|
|
262
|
+
// — not the flat v1 body
|
|
263
|
+
// quality settings.resolution: "720p" | "1080p" — there is no `mode`
|
|
264
|
+
// poll GET /tasks?task_ids=<id> → data[] array
|
|
265
|
+
// status "succeeded" (NOT v1's "succeed" — a one-character difference that
|
|
266
|
+
// would silently hang a job forever if the v1 parser were reused)
|
|
267
|
+
// result data[0].outputs[] → find type === "video" → .url
|
|
268
|
+
//
|
|
269
|
+
// Handled by dedicated code paths: buildTurboVideoBody (klingRequests.ts),
|
|
270
|
+
// KlingService.generateTurboVideo, and checkTurboVideoStatus (klingStatus.ts).
|
|
271
|
+
// The v1 status prober must never be pointed at a turbo task id.
|
|
272
|
+
//
|
|
273
|
+
// Capability deltas vs kling-v3.0 (official capability map, 2026-07-22):
|
|
274
|
+
// • no 4K (720p/1080p only) • no first/last-frame (first_frame only)
|
|
275
|
+
// • no element control • no motion control / video reference
|
|
276
|
+
// • no camera control • no cfg_scale / negative_prompt fields
|
|
277
|
+
// • multi-shot is encoded IN THE PROMPT ("shot 1, 3s, …; shot 2, 4s, …"),
|
|
278
|
+
// not as a multi_prompt[] array — so `multiShot` is deliberately NOT
|
|
279
|
+
// declared here; the canonical adapter would emit the wrong shape.
|
|
280
|
+
"kling-v3.0-turbo": {
|
|
281
|
+
modelId: "kling-3.0-turbo", // also the URL path segment — keep exact
|
|
282
|
+
type: ["text-to-video", "image-to-video"],
|
|
283
|
+
tier: "T3",
|
|
284
|
+
fields: {
|
|
285
|
+
prompt: { required: true },
|
|
286
|
+
aspectRatio: { allowedValues: ["16:9", "9:16", "1:1"] },
|
|
287
|
+
duration: { allowedValues: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] },
|
|
288
|
+
// We keep `mode` as the canonical quality knob for UI/cost-table
|
|
289
|
+
// uniformity and map std→720p, pro→1080p at request-build time. That is
|
|
290
|
+
// Kling's own legacy mapping (their billing ledger documents
|
|
291
|
+
// "720p=std, 1080p=pro"). An explicit `resolution` param wins if passed.
|
|
292
|
+
mode: { allowedValues: ["std", "pro"] },
|
|
293
|
+
resolution: { allowedValues: ["720p", "1080p"] },
|
|
294
|
+
inputImageUrl: {}, // → contents[{ type: "first_frame", url }]
|
|
295
|
+
callbackUrl: {},
|
|
296
|
+
externalTaskId: {},
|
|
297
|
+
watermark: {},
|
|
298
|
+
},
|
|
299
|
+
concurrentRequests: 10,
|
|
300
|
+
// Verified 2026-07-22 from /document-api/pricing/base/video.
|
|
301
|
+
//
|
|
302
|
+
// Turbo has ONE price tier and native audio is always included — there is
|
|
303
|
+
// no audio/no-audio split and therefore NO 1.5× upcharge to apply (unlike
|
|
304
|
+
// kling-v3.0, whose upcharge lives in klingCredits.ts). Do not add one.
|
|
305
|
+
//
|
|
306
|
+
// 720p: 0.8 units/s = $0.112/s 1080p: 1.0 unit/s = $0.14/s
|
|
307
|
+
//
|
|
308
|
+
// So Turbo is cheaper than v3.0 ONLY when you want audio:
|
|
309
|
+
// with audio v3.0 std $0.126/s → turbo $0.112/s (-11%)
|
|
310
|
+
// v3.0 pro $0.168/s → turbo $0.14/s (-17%)
|
|
311
|
+
// without audio v3.0 std $0.084/s → turbo $0.112/s (+33% — WORSE)
|
|
312
|
+
// Route no-audio work to kling-v3.0, audio work here.
|
|
313
|
+
//
|
|
314
|
+
// Priced per-second rather than via a duration table because Turbo allows
|
|
315
|
+
// every duration 3–15s; a {5,10} table would miss 13 of 13 other values and
|
|
316
|
+
// fall through to the $1.00 fallback in getKlingCreditUsed.
|
|
317
|
+
cost: {
|
|
318
|
+
perMode: {
|
|
319
|
+
std: { perSecond: 0.112 },
|
|
320
|
+
pro: { perSecond: 0.14 },
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
guidance: {
|
|
324
|
+
quality: 4,
|
|
325
|
+
speed: 4,
|
|
326
|
+
bestFor: "Cheapest Kling tier with native audio. Prefer over kling-v3.0 whenever the scene needs sound.",
|
|
327
|
+
notes: "Audio is always on and always billed — for silent output kling-v3.0 std is 33% cheaper. No 4K, no last-frame, no camera control, no element/motion control.",
|
|
328
|
+
},
|
|
329
|
+
},
|
|
246
330
|
"kling-v2.6": {
|
|
247
331
|
modelId: "kling-v2-6",
|
|
248
332
|
type: ["text-to-video", "image-to-video"],
|
|
@@ -41,4 +41,33 @@ export declare const MIN_CREDITS_PER_PAID_OP = 10;
|
|
|
41
41
|
* MIN_CREDITS_PER_PAID_OP.
|
|
42
42
|
*/
|
|
43
43
|
export declare const MIN_CREDITS_PER_IMAGE_OP = 2;
|
|
44
|
+
/**
|
|
45
|
+
* Credits granted on SIGNUP. Zero since 2026-07-22 — signing up no longer buys
|
|
46
|
+
* anything.
|
|
47
|
+
*
|
|
48
|
+
* It used to be 10 (= one full floored generation = $1.00 of provider cost),
|
|
49
|
+
* handed to every new account with no card, no email verification, and no
|
|
50
|
+
* device/IP dedup. Measured against production: 23,962 users, 15,021 of whom
|
|
51
|
+
* consumed credits, and only 88 who ever spent past the free grant — a 0.59%
|
|
52
|
+
* conversion on roughly $15k of given-away provider cost. Combined with the
|
|
53
|
+
* refund-on-failure path, single accounts reached 274 jobs and 100 delivered
|
|
54
|
+
* videos on a 10-credit balance.
|
|
55
|
+
*
|
|
56
|
+
* The free generation now lives behind the free trial, which requires a card
|
|
57
|
+
* (Stripe Checkout, `trialDays: 1` — payment.controller.ts). Same product
|
|
58
|
+
* experience, but the grant is tied to a payment instrument that Stripe can
|
|
59
|
+
* fingerprint, so it cannot be farmed by making another Google account.
|
|
60
|
+
*
|
|
61
|
+
* Set this back above zero ONLY together with an anti-abuse gate (verified
|
|
62
|
+
* email + App Check at minimum) — otherwise the farming loop reopens.
|
|
63
|
+
*/
|
|
64
|
+
export declare const SIGNUP_GRANT_CREDITS = 0;
|
|
65
|
+
/**
|
|
66
|
+
* Credits granted when a card-backed free trial actually starts (the
|
|
67
|
+
* `isTrialInvoice` branch in payment.service.handleInvoiceSucceeded). This is
|
|
68
|
+
* the value the signup grant used to hand out for free, now earned by adding a
|
|
69
|
+
* payment method. Deliberately equal to MIN_CREDITS_PER_PAID_OP so the trial is
|
|
70
|
+
* exactly one full generation of any kind.
|
|
71
|
+
*/
|
|
72
|
+
export declare const TRIAL_GRANT_CREDITS = 10;
|
|
44
73
|
//# sourceMappingURL=creditUnit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditUnit.d.ts","sourceRoot":"","sources":["../../src/globals/creditUnit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,iDAAiD;AACjD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,0EAA0E;AAC1E,eAAO,MAAM,eAAe,QAAqB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"creditUnit.d.ts","sourceRoot":"","sources":["../../src/globals/creditUnit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,iDAAiD;AACjD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,0EAA0E;AAC1E,eAAO,MAAM,eAAe,QAAqB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,KAA0B,CAAC"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* underlying cost. Both now derive from the values below.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.MIN_CREDITS_PER_IMAGE_OP = exports.MIN_CREDITS_PER_PAID_OP = exports.CREDITS_PER_USD = exports.USD_PER_CREDIT = void 0;
|
|
19
|
+
exports.TRIAL_GRANT_CREDITS = exports.SIGNUP_GRANT_CREDITS = exports.MIN_CREDITS_PER_IMAGE_OP = exports.MIN_CREDITS_PER_PAID_OP = exports.CREDITS_PER_USD = exports.USD_PER_CREDIT = void 0;
|
|
20
20
|
/** Provider cost (USD) covered by one credit. */
|
|
21
21
|
exports.USD_PER_CREDIT = 0.1;
|
|
22
22
|
/** Credits per USD of provider cost. Equals 1 / USD_PER_CREDIT (= 10). */
|
|
@@ -44,3 +44,32 @@ exports.MIN_CREDITS_PER_PAID_OP = 10;
|
|
|
44
44
|
* MIN_CREDITS_PER_PAID_OP.
|
|
45
45
|
*/
|
|
46
46
|
exports.MIN_CREDITS_PER_IMAGE_OP = 2;
|
|
47
|
+
/**
|
|
48
|
+
* Credits granted on SIGNUP. Zero since 2026-07-22 — signing up no longer buys
|
|
49
|
+
* anything.
|
|
50
|
+
*
|
|
51
|
+
* It used to be 10 (= one full floored generation = $1.00 of provider cost),
|
|
52
|
+
* handed to every new account with no card, no email verification, and no
|
|
53
|
+
* device/IP dedup. Measured against production: 23,962 users, 15,021 of whom
|
|
54
|
+
* consumed credits, and only 88 who ever spent past the free grant — a 0.59%
|
|
55
|
+
* conversion on roughly $15k of given-away provider cost. Combined with the
|
|
56
|
+
* refund-on-failure path, single accounts reached 274 jobs and 100 delivered
|
|
57
|
+
* videos on a 10-credit balance.
|
|
58
|
+
*
|
|
59
|
+
* The free generation now lives behind the free trial, which requires a card
|
|
60
|
+
* (Stripe Checkout, `trialDays: 1` — payment.controller.ts). Same product
|
|
61
|
+
* experience, but the grant is tied to a payment instrument that Stripe can
|
|
62
|
+
* fingerprint, so it cannot be farmed by making another Google account.
|
|
63
|
+
*
|
|
64
|
+
* Set this back above zero ONLY together with an anti-abuse gate (verified
|
|
65
|
+
* email + App Check at minimum) — otherwise the farming loop reopens.
|
|
66
|
+
*/
|
|
67
|
+
exports.SIGNUP_GRANT_CREDITS = 0;
|
|
68
|
+
/**
|
|
69
|
+
* Credits granted when a card-backed free trial actually starts (the
|
|
70
|
+
* `isTrialInvoice` branch in payment.service.handleInvoiceSucceeded). This is
|
|
71
|
+
* the value the signup grant used to hand out for free, now earned by adding a
|
|
72
|
+
* payment method. Deliberately equal to MIN_CREDITS_PER_PAID_OP so the trial is
|
|
73
|
+
* exactly one full generation of any kind.
|
|
74
|
+
*/
|
|
75
|
+
exports.TRIAL_GRANT_CREDITS = exports.MIN_CREDITS_PER_PAID_OP;
|
package/lib/globals/types.d.ts
CHANGED
|
@@ -123,7 +123,25 @@ export declare enum ERedisQueues {
|
|
|
123
123
|
* the metrics into the `socialAnalytics` time-series. Enqueued as a repeatable
|
|
124
124
|
* job (no platform pushes analytics; data lags 24–72h). See SOCIAL_SUITE_PLAN.md.
|
|
125
125
|
*/
|
|
126
|
-
SOCIAL_METRICS_JOBS = "social-metrics-job-queue"
|
|
126
|
+
SOCIAL_METRICS_JOBS = "social-metrics-job-queue",
|
|
127
|
+
/**
|
|
128
|
+
* SaaS Demo Video Generator — one job per `demoVideoProjects/{id}` build/rebuild
|
|
129
|
+
* request. The Cloud Function only validates inputs + deducts credits + writes
|
|
130
|
+
* the project doc; the worker owns the long multi-stage pipeline (gather →
|
|
131
|
+
* plan → render-draft → script → voice → mux → finalize) and streams stage
|
|
132
|
+
* progress onto the project doc so the wizard subscribes via onSnapshot. The
|
|
133
|
+
* pipeline itself is mostly I/O-bound orchestration; the heavy Remotion render
|
|
134
|
+
* sub-step is delegated to RENDER_JOBS. See notes/SAAS_DEMO_GENERATOR_PLAN.md.
|
|
135
|
+
*/
|
|
136
|
+
DEMO_VIDEO_JOBS = "demo-video-job-queue",
|
|
137
|
+
/**
|
|
138
|
+
* VidSpot Reach — Phase 2 fan-out. One job per `outreachCampaigns/{id}/generate`
|
|
139
|
+
* call. The worker iterates all `pending` recipients, resolves {{variables}},
|
|
140
|
+
* consumes credits, enqueues each per-recipient videoJob on VIDEO_JOBS, and
|
|
141
|
+
* generates a landing-page slug per recipient. The per-recipient renders are
|
|
142
|
+
* ordinary avatar jobs handled by the existing AvatarJobProcessor.
|
|
143
|
+
*/
|
|
144
|
+
OUTREACH_PERSONALIZE_JOBS = "outreach-personalize-job-queue"
|
|
127
145
|
}
|
|
128
146
|
export declare const REDIS_QUEUES: ERedisQueues[];
|
|
129
147
|
/** X8 Social Suite — connected social platforms. Value = stable storage key. */
|
|
@@ -201,6 +219,45 @@ export declare enum EImageJobStatus {
|
|
|
201
219
|
COMPLETED = "completed",
|
|
202
220
|
FAILED = "failed"
|
|
203
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Lifecycle of a SaaS Demo Video Generator build. The pipeline is multi-stage
|
|
224
|
+
* and long-running, so — unlike the simple QUEUED/IN_PROGRESS/COMPLETED/FAILED
|
|
225
|
+
* job enums — the status doubles as a coarse PROGRESS signal the wizard renders
|
|
226
|
+
* live via onSnapshot. Stages map 1:1 to the orchestration job (plan §4):
|
|
227
|
+
* gather inputs → plan DemoSpec → render draft MP4 → write script → synth
|
|
228
|
+
* voiceover → mux audio+video → finalize. `READY` is the terminal success state;
|
|
229
|
+
* `FAILED` carries `errorMessage`. A user "change X" re-run re-enters at PLANNING.
|
|
230
|
+
* See notes/SAAS_DEMO_GENERATOR_PLAN.md.
|
|
231
|
+
*/
|
|
232
|
+
export declare enum EDemoVideoStatus {
|
|
233
|
+
QUEUED = "queued",
|
|
234
|
+
GATHERING = "gathering",
|
|
235
|
+
/** "Request a change" — applying a natural-language edit to the persisted spec. */
|
|
236
|
+
REVISING = "revising",
|
|
237
|
+
/**
|
|
238
|
+
* Paused waiting on the user's answers to the agent's dynamic clarifying
|
|
239
|
+
* questions (the mid-run half of the clarification loop). NOT terminal and NOT
|
|
240
|
+
* heartbeat-bearing — the worker has RETURNED (freed its slot); a POST to
|
|
241
|
+
* /v1/demo-video/:id/answer re-enqueues. Modeled on the agent gate's
|
|
242
|
+
* "awaiting_approval". No demo reaper touches this doc, so it can't be reaped.
|
|
243
|
+
*/
|
|
244
|
+
AWAITING_INPUT = "awaitingInput",
|
|
245
|
+
PLANNING = "planning",
|
|
246
|
+
/**
|
|
247
|
+
* Materializing the spec's `generatedAssets` (AI images/clips the planner
|
|
248
|
+
* requested for scenes) before render. Skipped when the spec declares none —
|
|
249
|
+
* most demos generate nothing.
|
|
250
|
+
*/
|
|
251
|
+
GENERATING_ASSETS = "generatingAssets",
|
|
252
|
+
RENDERING_DRAFT = "renderingDraft",
|
|
253
|
+
SCRIPTING = "scripting",
|
|
254
|
+
VOICING = "voicing",
|
|
255
|
+
MUXING = "muxing",
|
|
256
|
+
FINALIZING = "finalizing",
|
|
257
|
+
READY = "ready",
|
|
258
|
+
FAILED = "failed",
|
|
259
|
+
CANCELLED = "cancelled"
|
|
260
|
+
}
|
|
204
261
|
/**
|
|
205
262
|
* Taxonomy of in-app notifications surfaced through the bell dropdown.
|
|
206
263
|
* Each value is also a preference toggle key — users can mute any type from
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/globals/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,cAAc,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AAED,oBAAY,eAAe;IACzB,MAAM,WAAW,CAAE,wCAAwC;IAC3D,WAAW,eAAe,CAAE,2DAA2D;IAGvF,SAAS,cAAc,CAAE,8CAA8C;IACvE,MAAM,WAAW,CAAE,+BAA+B;IAClD,mBAAmB,uBAAuB,CAAE,oEAAoE;IAChH,SAAS,cAAc;CACxB;AAED,oBAAY,iBAAiB;IAC3B,WAAW,eAAe,CAAE,qFAAqF;IACjH,SAAS,cAAc,CAAE,2FAA2F;IACpH,OAAO,YAAY,CAAE,kKAAkK;IACvL,MAAM,WAAW,CAAE,kEAAkE;IACrF,SAAS,cAAc,CAAE,sCAAsC;IAC/D;;;;;OAKG;IACH,SAAS,aAAa;IACtB;;;;;;OAMG;IACH,SAAS,cAAc;CACxB;AAMD,oBAAY,YAAY;I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,OAAO,qBAAqB,CAAC,CAAC"}
|
package/lib/globals/types.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ConsistentSceneSchema = exports.ConsistentSceneItemSchema = exports.VisualBibleSchema = exports.VisualBibleObject = exports.VisualBibleCharacter = exports.EGPT_LANGUAGE_CODE = exports.ELANGUAGE_CODE = exports.ERROR_CODE = exports.EENVS = exports.ECURRENCY = exports.ESUBSCRIPTION_STATUS = exports.ERENEWAL_FREQUENCY = exports.ESUBSCRIPTION_PLANS = exports.ESCHEDULE_UPDATE_STATUS = exports.EVideoDurationType = exports.ENotificationSeverity = exports.DEFAULT_NOTIFICATION_PREFERENCES = exports.ENotificationType = exports.EImageJobStatus = exports.ESocialInboxStatus = exports.ESocialInboxType = exports.ESocialApprovalState = exports.ESocialTargetStatus = exports.ESocialPostStatus = exports.ESocialAccountStatus = exports.ESocialAccountKind = exports.ESocialProvider = exports.REDIS_QUEUES = exports.ERedisQueues = exports.EVideoSceneStatus = exports.EVideoJobStatus = void 0;
|
|
6
|
+
exports.ConsistentSceneSchema = exports.ConsistentSceneItemSchema = exports.VisualBibleSchema = exports.VisualBibleObject = exports.VisualBibleCharacter = exports.EGPT_LANGUAGE_CODE = exports.ELANGUAGE_CODE = exports.ERROR_CODE = exports.EENVS = exports.ECURRENCY = exports.ESUBSCRIPTION_STATUS = exports.ERENEWAL_FREQUENCY = exports.ESUBSCRIPTION_PLANS = exports.ESCHEDULE_UPDATE_STATUS = exports.EVideoDurationType = exports.ENotificationSeverity = exports.DEFAULT_NOTIFICATION_PREFERENCES = exports.ENotificationType = exports.EDemoVideoStatus = exports.EImageJobStatus = exports.ESocialInboxStatus = exports.ESocialInboxType = exports.ESocialApprovalState = exports.ESocialTargetStatus = exports.ESocialPostStatus = exports.ESocialAccountStatus = exports.ESocialAccountKind = exports.ESocialProvider = exports.REDIS_QUEUES = exports.ERedisQueues = exports.EVideoSceneStatus = exports.EVideoJobStatus = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
var EVideoJobStatus;
|
|
9
9
|
(function (EVideoJobStatus) {
|
|
@@ -125,6 +125,24 @@ var ERedisQueues;
|
|
|
125
125
|
* job (no platform pushes analytics; data lags 24–72h). See SOCIAL_SUITE_PLAN.md.
|
|
126
126
|
*/
|
|
127
127
|
ERedisQueues["SOCIAL_METRICS_JOBS"] = "social-metrics-job-queue";
|
|
128
|
+
/**
|
|
129
|
+
* SaaS Demo Video Generator — one job per `demoVideoProjects/{id}` build/rebuild
|
|
130
|
+
* request. The Cloud Function only validates inputs + deducts credits + writes
|
|
131
|
+
* the project doc; the worker owns the long multi-stage pipeline (gather →
|
|
132
|
+
* plan → render-draft → script → voice → mux → finalize) and streams stage
|
|
133
|
+
* progress onto the project doc so the wizard subscribes via onSnapshot. The
|
|
134
|
+
* pipeline itself is mostly I/O-bound orchestration; the heavy Remotion render
|
|
135
|
+
* sub-step is delegated to RENDER_JOBS. See notes/SAAS_DEMO_GENERATOR_PLAN.md.
|
|
136
|
+
*/
|
|
137
|
+
ERedisQueues["DEMO_VIDEO_JOBS"] = "demo-video-job-queue";
|
|
138
|
+
/**
|
|
139
|
+
* VidSpot Reach — Phase 2 fan-out. One job per `outreachCampaigns/{id}/generate`
|
|
140
|
+
* call. The worker iterates all `pending` recipients, resolves {{variables}},
|
|
141
|
+
* consumes credits, enqueues each per-recipient videoJob on VIDEO_JOBS, and
|
|
142
|
+
* generates a landing-page slug per recipient. The per-recipient renders are
|
|
143
|
+
* ordinary avatar jobs handled by the existing AvatarJobProcessor.
|
|
144
|
+
*/
|
|
145
|
+
ERedisQueues["OUTREACH_PERSONALIZE_JOBS"] = "outreach-personalize-job-queue";
|
|
128
146
|
})(ERedisQueues || (exports.ERedisQueues = ERedisQueues = {}));
|
|
129
147
|
exports.REDIS_QUEUES = [
|
|
130
148
|
ERedisQueues.VIDEO_JOBS,
|
|
@@ -141,6 +159,8 @@ exports.REDIS_QUEUES = [
|
|
|
141
159
|
ERedisQueues.WATERMARK_JOBS,
|
|
142
160
|
ERedisQueues.SOCIAL_PUBLISH_JOBS,
|
|
143
161
|
ERedisQueues.SOCIAL_METRICS_JOBS,
|
|
162
|
+
ERedisQueues.DEMO_VIDEO_JOBS,
|
|
163
|
+
ERedisQueues.OUTREACH_PERSONALIZE_JOBS,
|
|
144
164
|
];
|
|
145
165
|
/** X8 Social Suite — connected social platforms. Value = stable storage key. */
|
|
146
166
|
var ESocialProvider;
|
|
@@ -227,6 +247,46 @@ var EImageJobStatus;
|
|
|
227
247
|
EImageJobStatus["COMPLETED"] = "completed";
|
|
228
248
|
EImageJobStatus["FAILED"] = "failed";
|
|
229
249
|
})(EImageJobStatus || (exports.EImageJobStatus = EImageJobStatus = {}));
|
|
250
|
+
/**
|
|
251
|
+
* Lifecycle of a SaaS Demo Video Generator build. The pipeline is multi-stage
|
|
252
|
+
* and long-running, so — unlike the simple QUEUED/IN_PROGRESS/COMPLETED/FAILED
|
|
253
|
+
* job enums — the status doubles as a coarse PROGRESS signal the wizard renders
|
|
254
|
+
* live via onSnapshot. Stages map 1:1 to the orchestration job (plan §4):
|
|
255
|
+
* gather inputs → plan DemoSpec → render draft MP4 → write script → synth
|
|
256
|
+
* voiceover → mux audio+video → finalize. `READY` is the terminal success state;
|
|
257
|
+
* `FAILED` carries `errorMessage`. A user "change X" re-run re-enters at PLANNING.
|
|
258
|
+
* See notes/SAAS_DEMO_GENERATOR_PLAN.md.
|
|
259
|
+
*/
|
|
260
|
+
var EDemoVideoStatus;
|
|
261
|
+
(function (EDemoVideoStatus) {
|
|
262
|
+
EDemoVideoStatus["QUEUED"] = "queued";
|
|
263
|
+
EDemoVideoStatus["GATHERING"] = "gathering";
|
|
264
|
+
/** "Request a change" — applying a natural-language edit to the persisted spec. */
|
|
265
|
+
EDemoVideoStatus["REVISING"] = "revising";
|
|
266
|
+
/**
|
|
267
|
+
* Paused waiting on the user's answers to the agent's dynamic clarifying
|
|
268
|
+
* questions (the mid-run half of the clarification loop). NOT terminal and NOT
|
|
269
|
+
* heartbeat-bearing — the worker has RETURNED (freed its slot); a POST to
|
|
270
|
+
* /v1/demo-video/:id/answer re-enqueues. Modeled on the agent gate's
|
|
271
|
+
* "awaiting_approval". No demo reaper touches this doc, so it can't be reaped.
|
|
272
|
+
*/
|
|
273
|
+
EDemoVideoStatus["AWAITING_INPUT"] = "awaitingInput";
|
|
274
|
+
EDemoVideoStatus["PLANNING"] = "planning";
|
|
275
|
+
/**
|
|
276
|
+
* Materializing the spec's `generatedAssets` (AI images/clips the planner
|
|
277
|
+
* requested for scenes) before render. Skipped when the spec declares none —
|
|
278
|
+
* most demos generate nothing.
|
|
279
|
+
*/
|
|
280
|
+
EDemoVideoStatus["GENERATING_ASSETS"] = "generatingAssets";
|
|
281
|
+
EDemoVideoStatus["RENDERING_DRAFT"] = "renderingDraft";
|
|
282
|
+
EDemoVideoStatus["SCRIPTING"] = "scripting";
|
|
283
|
+
EDemoVideoStatus["VOICING"] = "voicing";
|
|
284
|
+
EDemoVideoStatus["MUXING"] = "muxing";
|
|
285
|
+
EDemoVideoStatus["FINALIZING"] = "finalizing";
|
|
286
|
+
EDemoVideoStatus["READY"] = "ready";
|
|
287
|
+
EDemoVideoStatus["FAILED"] = "failed";
|
|
288
|
+
EDemoVideoStatus["CANCELLED"] = "cancelled";
|
|
289
|
+
})(EDemoVideoStatus || (exports.EDemoVideoStatus = EDemoVideoStatus = {}));
|
|
230
290
|
/**
|
|
231
291
|
* Taxonomy of in-app notifications surfaced through the bell dropdown.
|
|
232
292
|
* Each value is also a preference toggle key — users can mute any type from
|