vidspotai-shared 1.0.53 → 1.0.54
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/providers/alibaba.d.ts +4 -0
- package/lib/globals/aiModels/providers/alibaba.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/alibaba.js +183 -0
- package/lib/globals/aiModels/providers/elevenlabs.d.ts +13 -0
- package/lib/globals/aiModels/providers/elevenlabs.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/elevenlabs.js +25 -0
- package/lib/globals/aiModels/providers/pixverseTemplates.d.ts +36 -0
- package/lib/globals/aiModels/providers/pixverseTemplates.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/pixverseTemplates.js +42 -0
- package/lib/globals/aiModels/tierHelpers.d.ts +27 -0
- package/lib/globals/aiModels/tierHelpers.d.ts.map +1 -0
- package/lib/globals/aiModels/tierHelpers.js +73 -0
- package/lib/globals/ttsModels/providers/minimax.d.ts +8 -0
- package/lib/globals/ttsModels/providers/minimax.d.ts.map +1 -0
- package/lib/globals/ttsModels/providers/minimax.js +18 -0
- package/lib/globals/ttsModels/providers/openai.d.ts +8 -0
- package/lib/globals/ttsModels/providers/openai.d.ts.map +1 -0
- package/lib/globals/ttsModels/providers/openai.js +18 -0
- package/lib/models/agent.model.d.ts +117 -0
- package/lib/models/agent.model.d.ts.map +1 -0
- package/lib/models/agent.model.js +13 -0
- package/lib/models/analytics.model.d.ts +4 -0
- package/lib/models/analytics.model.d.ts.map +1 -1
- package/lib/models/cachedAsset.model.d.ts +18 -0
- package/lib/models/cachedAsset.model.d.ts.map +1 -0
- package/lib/models/cachedAsset.model.js +2 -0
- package/lib/models/cachedRawAsset.model.d.ts +20 -0
- package/lib/models/cachedRawAsset.model.d.ts.map +1 -0
- package/lib/models/cachedRawAsset.model.js +2 -0
- package/lib/models/video.model.d.ts +1 -0
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/schemas/agentPersona.schema.d.ts +10 -0
- package/lib/schemas/agentPersona.schema.d.ts.map +1 -0
- package/lib/schemas/agentPersona.schema.js +11 -0
- package/lib/schemas/brandKit.schema.d.ts +101 -0
- package/lib/schemas/brandKit.schema.d.ts.map +1 -0
- package/lib/schemas/brandKit.schema.js +46 -0
- package/lib/schemas/brief.schema.d.ts +216 -0
- package/lib/schemas/brief.schema.d.ts.map +1 -0
- package/lib/schemas/brief.schema.js +118 -0
- package/lib/schemas/index.d.ts +6 -0
- package/lib/schemas/index.d.ts.map +1 -0
- package/lib/schemas/index.js +21 -0
- package/lib/schemas/project.schema.d.ts +1005 -0
- package/lib/schemas/project.schema.d.ts.map +1 -0
- package/lib/schemas/project.schema.js +238 -0
- package/lib/schemas/videoPlan.schema.d.ts +145 -0
- package/lib/schemas/videoPlan.schema.d.ts.map +1 -0
- package/lib/schemas/videoPlan.schema.js +109 -0
- package/lib/services/agent/beatSnap.d.ts +10 -0
- package/lib/services/agent/beatSnap.d.ts.map +1 -0
- package/lib/services/agent/beatSnap.js +128 -0
- package/lib/services/agent/costPreflight.d.ts +22 -0
- package/lib/services/agent/costPreflight.d.ts.map +1 -0
- package/lib/services/agent/costPreflight.js +75 -0
- package/lib/services/agent/critic.d.ts +103 -0
- package/lib/services/agent/critic.d.ts.map +1 -0
- package/lib/services/agent/critic.js +132 -0
- package/lib/services/agent/eval/index.d.ts +5 -0
- package/lib/services/agent/eval/index.d.ts.map +1 -0
- package/lib/services/agent/eval/index.js +20 -0
- package/lib/services/agent/eval/judge.d.ts +14 -0
- package/lib/services/agent/eval/judge.d.ts.map +1 -0
- package/lib/services/agent/eval/judge.js +95 -0
- package/lib/services/agent/eval/recorder.d.ts +17 -0
- package/lib/services/agent/eval/recorder.d.ts.map +1 -0
- package/lib/services/agent/eval/recorder.js +65 -0
- package/lib/services/agent/eval/seedBriefs.d.ts +16 -0
- package/lib/services/agent/eval/seedBriefs.d.ts.map +1 -0
- package/lib/services/agent/eval/seedBriefs.js +1188 -0
- package/lib/services/agent/eval/types.d.ts +196 -0
- package/lib/services/agent/eval/types.d.ts.map +1 -0
- package/lib/services/agent/eval/types.js +65 -0
- package/lib/services/agent/executor.d.ts +50 -0
- package/lib/services/agent/executor.d.ts.map +1 -0
- package/lib/services/agent/executor.js +188 -0
- package/lib/services/agent/index.d.ts +15 -0
- package/lib/services/agent/index.d.ts.map +1 -0
- package/lib/services/agent/index.js +30 -0
- package/lib/services/agent/llmCaller.d.ts +77 -0
- package/lib/services/agent/llmCaller.d.ts.map +1 -0
- package/lib/services/agent/llmCaller.js +16 -0
- package/lib/services/agent/llmCallerGateway.d.ts +39 -0
- package/lib/services/agent/llmCallerGateway.d.ts.map +1 -0
- package/lib/services/agent/llmCallerGateway.js +246 -0
- package/lib/services/agent/llmCallerRegistry.d.ts +4 -0
- package/lib/services/agent/llmCallerRegistry.d.ts.map +1 -0
- package/lib/services/agent/llmCallerRegistry.js +19 -0
- package/lib/services/agent/modelRouter.d.ts +41 -0
- package/lib/services/agent/modelRouter.d.ts.map +1 -0
- package/lib/services/agent/modelRouter.js +57 -0
- package/lib/services/agent/musicSelect.d.ts +23 -0
- package/lib/services/agent/musicSelect.d.ts.map +1 -0
- package/lib/services/agent/musicSelect.js +65 -0
- package/lib/services/agent/personas.d.ts +60 -0
- package/lib/services/agent/personas.d.ts.map +1 -0
- package/lib/services/agent/personas.js +156 -0
- package/lib/services/agent/planner.d.ts +56 -0
- package/lib/services/agent/planner.d.ts.map +1 -0
- package/lib/services/agent/planner.js +237 -0
- package/lib/services/agent/toolRegistry.d.ts +64 -0
- package/lib/services/agent/toolRegistry.d.ts.map +1 -0
- package/lib/services/agent/toolRegistry.js +78 -0
- package/lib/services/agent/tools/analyzeReference.tool.d.ts +36 -0
- package/lib/services/agent/tools/analyzeReference.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/analyzeReference.tool.js +44 -0
- package/lib/services/agent/tools/animateImage.tool.d.ts +23 -0
- package/lib/services/agent/tools/animateImage.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/animateImage.tool.js +58 -0
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.d.ts +30 -0
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.js +90 -0
- package/lib/services/agent/tools/composeScene.tool.d.ts +948 -0
- package/lib/services/agent/tools/composeScene.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/composeScene.tool.js +90 -0
- package/lib/services/agent/tools/estimateCost.tool.d.ts +342 -0
- package/lib/services/agent/tools/estimateCost.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/estimateCost.tool.js +62 -0
- package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts +32 -0
- package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/generateAvatarVideo.tool.js +112 -0
- package/lib/services/agent/tools/generateImage.tool.d.ts +28 -0
- package/lib/services/agent/tools/generateImage.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/generateImage.tool.js +97 -0
- package/lib/services/agent/tools/generateVideo.tool.d.ts +30 -0
- package/lib/services/agent/tools/generateVideo.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/generateVideo.tool.js +84 -0
- package/lib/services/agent/tools/generateVoiceover.tool.d.ts +18 -0
- package/lib/services/agent/tools/generateVoiceover.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/generateVoiceover.tool.js +72 -0
- package/lib/services/agent/tools/index.d.ts +19 -0
- package/lib/services/agent/tools/index.d.ts.map +1 -0
- package/lib/services/agent/tools/index.js +34 -0
- package/lib/services/agent/tools/planVideo.tool.d.ts +191 -0
- package/lib/services/agent/tools/planVideo.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/planVideo.tool.js +46 -0
- package/lib/services/agent/tools/render.tool.d.ts +357 -0
- package/lib/services/agent/tools/render.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/render.tool.js +48 -0
- package/lib/services/agent/tools/searchMusic.tool.d.ts +49 -0
- package/lib/services/agent/tools/searchMusic.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/searchMusic.tool.js +74 -0
- package/lib/services/agent/tools/searchStock.tool.d.ts +37 -0
- package/lib/services/agent/tools/searchStock.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/searchStock.tool.js +101 -0
- package/lib/services/agent/tools/searchUserLibrary.tool.d.ts +59 -0
- package/lib/services/agent/tools/searchUserLibrary.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/searchUserLibrary.tool.js +58 -0
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.d.ts +31 -0
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.d.ts.map +1 -0
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.js +2 -0
- package/lib/services/aiGen/canonicalAdapters/index.d.ts +3 -0
- package/lib/services/aiGen/canonicalAdapters/index.d.ts.map +1 -0
- package/lib/services/aiGen/canonicalAdapters/index.js +18 -0
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.d.ts +23 -0
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.d.ts.map +1 -0
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.js +12 -0
- package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.d.ts +18 -0
- package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.js +100 -0
- package/lib/services/aiGen/providers/fal/falImage.service.d.ts +9 -0
- package/lib/services/aiGen/providers/fal/falImage.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/fal/falImage.service.js +102 -0
- package/lib/services/aiGen/providers/fal/index.d.ts +2 -0
- package/lib/services/aiGen/providers/fal/index.d.ts.map +1 -0
- package/lib/services/aiGen/providers/fal/index.js +17 -0
- package/lib/services/aiGen/providers/kling/cameraAdapter.d.ts +4 -0
- package/lib/services/aiGen/providers/kling/cameraAdapter.d.ts.map +1 -0
- package/lib/services/aiGen/providers/kling/cameraAdapter.js +53 -0
- package/lib/services/aiGen/providers/pexels/index.d.ts +2 -0
- package/lib/services/aiGen/providers/pexels/index.d.ts.map +1 -0
- package/lib/services/aiGen/providers/pexels/index.js +17 -0
- package/lib/services/aiGen/providers/pexels/pexels.service.d.ts +11 -0
- package/lib/services/aiGen/providers/pexels/pexels.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/pexels/pexels.service.js +118 -0
- package/lib/services/aiGen/providers/runway/cameraAdapter.d.ts +3 -0
- package/lib/services/aiGen/providers/runway/cameraAdapter.d.ts.map +1 -0
- package/lib/services/aiGen/providers/runway/cameraAdapter.js +46 -0
- package/lib/services/analytics.service.d.ts +10 -0
- package/lib/services/analytics.service.d.ts.map +1 -1
- package/lib/services/analytics.service.js +27 -0
- package/lib/services/asr/assemblyai.service.d.ts +72 -0
- package/lib/services/asr/assemblyai.service.d.ts.map +1 -0
- package/lib/services/asr/assemblyai.service.js +89 -0
- package/lib/services/asr/index.d.ts +2 -0
- package/lib/services/asr/index.d.ts.map +1 -0
- package/lib/services/asr/index.js +17 -0
- package/lib/services/assetCache.service.d.ts +54 -0
- package/lib/services/assetCache.service.d.ts.map +1 -0
- package/lib/services/assetCache.service.js +96 -0
- package/lib/services/audioAnalysis/index.d.ts +2 -0
- package/lib/services/audioAnalysis/index.d.ts.map +1 -0
- package/lib/services/audioAnalysis/index.js +17 -0
- package/lib/services/audioAnalysis/onsetDetection.service.d.ts +50 -0
- package/lib/services/audioAnalysis/onsetDetection.service.d.ts.map +1 -0
- package/lib/services/audioAnalysis/onsetDetection.service.js +136 -0
- package/lib/services/editor/designToProject.d.ts +60 -0
- package/lib/services/editor/designToProject.d.ts.map +1 -0
- package/lib/services/editor/designToProject.js +194 -0
- package/lib/services/musicGen/index.d.ts +6 -0
- package/lib/services/musicGen/index.d.ts.map +1 -0
- package/lib/services/musicGen/index.js +26 -0
- package/lib/services/musicGen/musicSearchFactory.service.d.ts +14 -0
- package/lib/services/musicGen/musicSearchFactory.service.d.ts.map +1 -0
- package/lib/services/musicGen/musicSearchFactory.service.js +59 -0
- package/lib/services/musicGen/providers/curated.service.d.ts +22 -0
- package/lib/services/musicGen/providers/curated.service.d.ts.map +1 -0
- package/lib/services/musicGen/providers/curated.service.js +171 -0
- package/lib/services/musicGen/providers/jamendo.service.d.ts +8 -0
- package/lib/services/musicGen/providers/jamendo.service.d.ts.map +1 -0
- package/lib/services/musicGen/providers/jamendo.service.js +93 -0
- package/lib/services/musicGen/providers/mubert.service.d.ts +9 -0
- package/lib/services/musicGen/providers/mubert.service.d.ts.map +1 -0
- package/lib/services/musicGen/providers/mubert.service.js +113 -0
- package/lib/services/musicGen/types.d.ts +42 -0
- package/lib/services/musicGen/types.d.ts.map +1 -0
- package/lib/services/musicGen/types.js +10 -0
- package/lib/services/tts/providers/minimax.service.d.ts +14 -0
- package/lib/services/tts/providers/minimax.service.d.ts.map +1 -0
- package/lib/services/tts/providers/minimax.service.js +78 -0
- package/lib/services/tts/providers/openai.service.d.ts +14 -0
- package/lib/services/tts/providers/openai.service.d.ts.map +1 -0
- package/lib/services/tts/providers/openai.service.js +71 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alibaba.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/alibaba.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAaxC,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAiLrE,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.alibabaConfigs = void 0;
|
|
4
|
+
const wanCommonFields = {
|
|
5
|
+
prompt: { required: true },
|
|
6
|
+
aspectRatio: { allowedValues: ["16:9", "9:16", "1:1", "4:3", "3:4"] },
|
|
7
|
+
resolution: { allowedValues: ["480p", "720p", "1080p"] },
|
|
8
|
+
duration: { allowedValues: [5, 10] },
|
|
9
|
+
negative_prompt: {},
|
|
10
|
+
seed: {},
|
|
11
|
+
watermark: {},
|
|
12
|
+
promptOptimizer: {},
|
|
13
|
+
};
|
|
14
|
+
exports.alibabaConfigs = {
|
|
15
|
+
// --- Wan 2.7 i2v --- (image2video; supports first-last-frame interpolation)
|
|
16
|
+
"alibaba-wan-2.7-i2v": {
|
|
17
|
+
modelId: "wan2.7-i2v-plus",
|
|
18
|
+
type: ["image-to-video"],
|
|
19
|
+
tier: "T3",
|
|
20
|
+
fields: {
|
|
21
|
+
...wanCommonFields,
|
|
22
|
+
inputImageUrl: { required: true },
|
|
23
|
+
lastFrameImageUrl: {}, // FLF interpolation
|
|
24
|
+
},
|
|
25
|
+
cost: {
|
|
26
|
+
table: {
|
|
27
|
+
"832x480": { 5: 0.10, 10: 0.20 },
|
|
28
|
+
"1280x720": { 5: 0.20, 10: 0.40 },
|
|
29
|
+
"1920x1080": { 5: 0.40, 10: 0.80 },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
// --- Wan 2.6 t2v ---
|
|
34
|
+
"alibaba-wan-2.6-t2v": {
|
|
35
|
+
modelId: "wan2.6-t2v-plus",
|
|
36
|
+
type: ["text-to-video"],
|
|
37
|
+
tier: "T3",
|
|
38
|
+
fields: { ...wanCommonFields },
|
|
39
|
+
cost: {
|
|
40
|
+
table: {
|
|
41
|
+
"832x480": { 5: 0.08, 10: 0.16 },
|
|
42
|
+
"1280x720": { 5: 0.18, 10: 0.36 },
|
|
43
|
+
"1920x1080": { 5: 0.36, 10: 0.72 },
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
// --- Wan 2.5 t2v ---
|
|
48
|
+
"alibaba-wan-2.5-t2v": {
|
|
49
|
+
modelId: "wan2.5-t2v-plus",
|
|
50
|
+
type: ["text-to-video"],
|
|
51
|
+
tier: "T2",
|
|
52
|
+
fields: { ...wanCommonFields },
|
|
53
|
+
cost: {
|
|
54
|
+
table: {
|
|
55
|
+
"832x480": { 5: 0.06, 10: 0.12 },
|
|
56
|
+
"1280x720": { 5: 0.14, 10: 0.28 },
|
|
57
|
+
"1920x1080": { 5: 0.28, 10: 0.56 },
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
// --- Wan 2.2 t2v ---
|
|
62
|
+
"alibaba-wan-2.2-t2v": {
|
|
63
|
+
modelId: "wan2.2-t2v-plus",
|
|
64
|
+
type: ["text-to-video"],
|
|
65
|
+
tier: "T2",
|
|
66
|
+
fields: { ...wanCommonFields },
|
|
67
|
+
cost: {
|
|
68
|
+
table: {
|
|
69
|
+
"832x480": { 5: 0.05, 10: 0.10 },
|
|
70
|
+
"1280x720": { 5: 0.10, 10: 0.20 },
|
|
71
|
+
"1920x1080": { 5: 0.20, 10: 0.40 },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
// --- Wan 2.2 s2v --- (sound2video; audio drives motion, optional image for visual reference)
|
|
76
|
+
"alibaba-wan-2.2-s2v": {
|
|
77
|
+
modelId: "wan2.2-s2v",
|
|
78
|
+
type: ["audio-to-video"],
|
|
79
|
+
tier: "T2",
|
|
80
|
+
fields: {
|
|
81
|
+
prompt: {},
|
|
82
|
+
inputAudioUrl: { required: true },
|
|
83
|
+
inputImageUrl: {}, // optional visual reference
|
|
84
|
+
duration: { allowedValues: [5, 10] },
|
|
85
|
+
seed: {},
|
|
86
|
+
watermark: {},
|
|
87
|
+
},
|
|
88
|
+
cost: {
|
|
89
|
+
table: {
|
|
90
|
+
// Pricing varies less by size for s2v; use a flat-ish table keyed on duration.
|
|
91
|
+
"auto": { 5: 0.18, 10: 0.36 },
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
// ───────────────────────────────────────────────────────────────────────
|
|
96
|
+
// Image-gen — Qwen-Image + Kolors (both via DashScope text2image / image2image)
|
|
97
|
+
// ───────────────────────────────────────────────────────────────────────
|
|
98
|
+
"alibaba-qwen-image-2.0-pro": {
|
|
99
|
+
modelId: "qwen-image-2.0-pro",
|
|
100
|
+
type: ["text-to-image"],
|
|
101
|
+
tier: "T2",
|
|
102
|
+
fields: {
|
|
103
|
+
prompt: { required: true },
|
|
104
|
+
aspectRatio: { allowedValues: ["1:1", "9:16", "16:9", "3:4", "4:3", "2:3", "3:2"] },
|
|
105
|
+
numImages: { default: 1 },
|
|
106
|
+
seed: {},
|
|
107
|
+
watermark: {},
|
|
108
|
+
promptOptimizer: {},
|
|
109
|
+
negativePrompt: {},
|
|
110
|
+
},
|
|
111
|
+
cost: { fixed: 0.04 },
|
|
112
|
+
},
|
|
113
|
+
"alibaba-qwen-image-2.0": {
|
|
114
|
+
modelId: "qwen-image-2.0",
|
|
115
|
+
type: ["text-to-image"],
|
|
116
|
+
tier: "T1",
|
|
117
|
+
fields: {
|
|
118
|
+
prompt: { required: true },
|
|
119
|
+
aspectRatio: { allowedValues: ["1:1", "9:16", "16:9", "3:4", "4:3", "2:3", "3:2"] },
|
|
120
|
+
numImages: { default: 1 },
|
|
121
|
+
seed: {},
|
|
122
|
+
watermark: {},
|
|
123
|
+
promptOptimizer: {},
|
|
124
|
+
negativePrompt: {},
|
|
125
|
+
},
|
|
126
|
+
cost: { fixed: 0.02 },
|
|
127
|
+
},
|
|
128
|
+
// Qwen-Image edit — instruction edit (1–3 reference images)
|
|
129
|
+
"alibaba-qwen-image-edit-max": {
|
|
130
|
+
modelId: "qwen-image-edit-max",
|
|
131
|
+
type: ["image-to-image"],
|
|
132
|
+
tier: "T2",
|
|
133
|
+
fields: {
|
|
134
|
+
prompt: { required: true },
|
|
135
|
+
inputImageUrls: { required: true },
|
|
136
|
+
seed: {},
|
|
137
|
+
watermark: {},
|
|
138
|
+
promptOptimizer: {},
|
|
139
|
+
},
|
|
140
|
+
cost: { fixed: 0.05 },
|
|
141
|
+
},
|
|
142
|
+
"alibaba-qwen-image-edit-plus": {
|
|
143
|
+
modelId: "qwen-image-edit-plus",
|
|
144
|
+
type: ["image-to-image"],
|
|
145
|
+
tier: "T2",
|
|
146
|
+
fields: {
|
|
147
|
+
prompt: { required: true },
|
|
148
|
+
inputImageUrls: { required: true },
|
|
149
|
+
seed: {},
|
|
150
|
+
watermark: {},
|
|
151
|
+
promptOptimizer: {},
|
|
152
|
+
},
|
|
153
|
+
cost: { fixed: 0.04 },
|
|
154
|
+
},
|
|
155
|
+
"alibaba-qwen-image-edit": {
|
|
156
|
+
modelId: "qwen-image-edit",
|
|
157
|
+
type: ["image-to-image"],
|
|
158
|
+
tier: "T1",
|
|
159
|
+
fields: {
|
|
160
|
+
prompt: { required: true },
|
|
161
|
+
inputImageUrls: { required: true },
|
|
162
|
+
seed: {},
|
|
163
|
+
watermark: {},
|
|
164
|
+
promptOptimizer: {},
|
|
165
|
+
},
|
|
166
|
+
cost: { fixed: 0.03 },
|
|
167
|
+
},
|
|
168
|
+
// Kolors (Kling) — hosted on DashScope; routed to AlibabaService in factory.
|
|
169
|
+
"kling-kolors": {
|
|
170
|
+
modelId: "kolors-v2",
|
|
171
|
+
type: ["text-to-image"],
|
|
172
|
+
tier: "T1",
|
|
173
|
+
fields: {
|
|
174
|
+
prompt: { required: true },
|
|
175
|
+
aspectRatio: { allowedValues: ["1:1", "9:16", "16:9", "3:4", "4:3"] },
|
|
176
|
+
numImages: { default: 1 },
|
|
177
|
+
seed: {},
|
|
178
|
+
watermark: {},
|
|
179
|
+
negativePrompt: {},
|
|
180
|
+
},
|
|
181
|
+
cost: { fixed: 0.03 },
|
|
182
|
+
},
|
|
183
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IModelSchema } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* ElevenLabs sound-effects model configs. Sync — POST /v1/sound-generation
|
|
4
|
+
* returns mp3 binary inline.
|
|
5
|
+
*
|
|
6
|
+
* Pricing: ElevenLabs charges ~40 character-credits per second of generated
|
|
7
|
+
* audio on Creator/Pro tiers (~$0.0036/sec ≈ $0.08 for the 22s max clip).
|
|
8
|
+
* Cost block exposes both `perSecond` (preferred when caller knows duration)
|
|
9
|
+
* and `fixed` (worst-case ceiling, used when duration is absent).
|
|
10
|
+
* Verified 2026-05-11 against ElevenLabs Creator-tier credit conversion.
|
|
11
|
+
*/
|
|
12
|
+
export declare const elevenlabsConfigs: Record<string, IModelSchema>;
|
|
13
|
+
//# sourceMappingURL=elevenlabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elevenlabs.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/elevenlabs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAW1D,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.elevenlabsConfigs = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* ElevenLabs sound-effects model configs. Sync — POST /v1/sound-generation
|
|
6
|
+
* returns mp3 binary inline.
|
|
7
|
+
*
|
|
8
|
+
* Pricing: ElevenLabs charges ~40 character-credits per second of generated
|
|
9
|
+
* audio on Creator/Pro tiers (~$0.0036/sec ≈ $0.08 for the 22s max clip).
|
|
10
|
+
* Cost block exposes both `perSecond` (preferred when caller knows duration)
|
|
11
|
+
* and `fixed` (worst-case ceiling, used when duration is absent).
|
|
12
|
+
* Verified 2026-05-11 against ElevenLabs Creator-tier credit conversion.
|
|
13
|
+
*/
|
|
14
|
+
exports.elevenlabsConfigs = {
|
|
15
|
+
"elevenlabs-sound-effects": {
|
|
16
|
+
modelId: "eleven_text_to_sound_v2",
|
|
17
|
+
type: ["sound-effects"],
|
|
18
|
+
tier: "T1",
|
|
19
|
+
fields: {
|
|
20
|
+
prompt: { required: true },
|
|
21
|
+
// ElevenLabs SFX duration range: 0.5–22 seconds
|
|
22
|
+
},
|
|
23
|
+
cost: { perSecond: 0.0036, fixed: 0.08 },
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pixverse Effects / Template registry.
|
|
3
|
+
*
|
|
4
|
+
* Pixverse exposes a curated library of "Effects" templates (Hug, Kiss, Squish,
|
|
5
|
+
* AI Baby Podcast, etc.) accessible via POST /openapi/v2/video/template/generate
|
|
6
|
+
* with a numeric `template_id` plus a `customer_img_url`. Most templates are
|
|
7
|
+
* image-to-video — the user supplies a face/photo and the template animates it.
|
|
8
|
+
*
|
|
9
|
+
* Real IDs must be pulled from the Pixverse dashboard / template library API
|
|
10
|
+
* (each template's ID is the numeric `template_id` shown in the docs UI).
|
|
11
|
+
* The few entries below are placeholders documenting the shape — populate
|
|
12
|
+
* with real IDs before exposing in the frontend.
|
|
13
|
+
*/
|
|
14
|
+
export interface IPixverseEffectTemplate {
|
|
15
|
+
/** Numeric Pixverse template_id (sent to /template/generate). */
|
|
16
|
+
templateId: number;
|
|
17
|
+
/** Slug used in the API surface (kebab-case, stable). */
|
|
18
|
+
slug: string;
|
|
19
|
+
/** Display label shown to users. */
|
|
20
|
+
name: string;
|
|
21
|
+
/** Coarse grouping for the picker UI. */
|
|
22
|
+
category: "couple" | "transform" | "stylize" | "podcast" | "selfie" | "anime" | "other";
|
|
23
|
+
/** Whether the template requires a user-supplied image (almost always true). */
|
|
24
|
+
requiresImage: boolean;
|
|
25
|
+
/** Optional default Pixverse model to pair with this template. */
|
|
26
|
+
preferredModelId?: "v5" | "v5.5" | "v5.6";
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Curated list — POPULATE WITH REAL PIXVERSE TEMPLATE IDs from the dashboard.
|
|
30
|
+
* Slugs are stable; templateIds are placeholder zeros until filled in.
|
|
31
|
+
*/
|
|
32
|
+
export declare const PIXVERSE_EFFECT_TEMPLATES: IPixverseEffectTemplate[];
|
|
33
|
+
export declare const PIXVERSE_TEMPLATES_BY_SLUG: Record<string, IPixverseEffectTemplate>;
|
|
34
|
+
export declare function getPixverseTemplateBySlug(slug: string): IPixverseEffectTemplate | undefined;
|
|
35
|
+
export declare function listPixverseTemplates(category?: IPixverseEffectTemplate["category"]): IPixverseEffectTemplate[];
|
|
36
|
+
//# sourceMappingURL=pixverseTemplates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pixverseTemplates.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/pixverseTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,uBAAuB;IACtC,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,QAAQ,EACJ,QAAQ,GACR,WAAW,GACX,SAAS,GACT,SAAS,GACT,QAAQ,GACR,OAAO,GACP,OAAO,CAAC;IACZ,gFAAgF;IAChF,aAAa,EAAE,OAAO,CAAC;IACvB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;CAC3C;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,uBAAuB,EAY9D,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CACR,CAAC;AAExE,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS,CAE3F;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,CAAC,EAAE,uBAAuB,CAAC,UAAU,CAAC,GAAG,uBAAuB,EAAE,CAG/G"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pixverse Effects / Template registry.
|
|
4
|
+
*
|
|
5
|
+
* Pixverse exposes a curated library of "Effects" templates (Hug, Kiss, Squish,
|
|
6
|
+
* AI Baby Podcast, etc.) accessible via POST /openapi/v2/video/template/generate
|
|
7
|
+
* with a numeric `template_id` plus a `customer_img_url`. Most templates are
|
|
8
|
+
* image-to-video — the user supplies a face/photo and the template animates it.
|
|
9
|
+
*
|
|
10
|
+
* Real IDs must be pulled from the Pixverse dashboard / template library API
|
|
11
|
+
* (each template's ID is the numeric `template_id` shown in the docs UI).
|
|
12
|
+
* The few entries below are placeholders documenting the shape — populate
|
|
13
|
+
* with real IDs before exposing in the frontend.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PIXVERSE_TEMPLATES_BY_SLUG = exports.PIXVERSE_EFFECT_TEMPLATES = void 0;
|
|
17
|
+
exports.getPixverseTemplateBySlug = getPixverseTemplateBySlug;
|
|
18
|
+
exports.listPixverseTemplates = listPixverseTemplates;
|
|
19
|
+
/**
|
|
20
|
+
* Curated list — POPULATE WITH REAL PIXVERSE TEMPLATE IDs from the dashboard.
|
|
21
|
+
* Slugs are stable; templateIds are placeholder zeros until filled in.
|
|
22
|
+
*/
|
|
23
|
+
exports.PIXVERSE_EFFECT_TEMPLATES = [
|
|
24
|
+
// --- Couple / interaction effects ---
|
|
25
|
+
{ templateId: 0, slug: "hug", name: "Hug", category: "couple", requiresImage: true, preferredModelId: "v5.6" },
|
|
26
|
+
{ templateId: 0, slug: "kiss", name: "Kiss", category: "couple", requiresImage: true, preferredModelId: "v5.6" },
|
|
27
|
+
{ templateId: 0, slug: "squish", name: "Squish", category: "transform", requiresImage: true, preferredModelId: "v5.6" },
|
|
28
|
+
// --- Podcast / narration effects ---
|
|
29
|
+
{ templateId: 0, slug: "ai-baby-podcast", name: "AI Baby Podcast", category: "podcast", requiresImage: true, preferredModelId: "v5.6" },
|
|
30
|
+
// --- Stylize / transform ---
|
|
31
|
+
{ templateId: 0, slug: "anime-me", name: "Anime Me", category: "anime", requiresImage: true, preferredModelId: "v5.5" },
|
|
32
|
+
{ templateId: 0, slug: "muscle", name: "Muscle Up", category: "transform", requiresImage: true, preferredModelId: "v5.6" },
|
|
33
|
+
];
|
|
34
|
+
exports.PIXVERSE_TEMPLATES_BY_SLUG = Object.fromEntries(exports.PIXVERSE_EFFECT_TEMPLATES.map((t) => [t.slug, t]));
|
|
35
|
+
function getPixverseTemplateBySlug(slug) {
|
|
36
|
+
return exports.PIXVERSE_TEMPLATES_BY_SLUG[slug];
|
|
37
|
+
}
|
|
38
|
+
function listPixverseTemplates(category) {
|
|
39
|
+
if (!category)
|
|
40
|
+
return exports.PIXVERSE_EFFECT_TEMPLATES;
|
|
41
|
+
return exports.PIXVERSE_EFFECT_TEMPLATES.filter((t) => t.category === category);
|
|
42
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Tier } from "../../schemas/project.schema";
|
|
2
|
+
import type { GenerationType, IModelSchema } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Helpers for the agent planner to query models by tier and capability.
|
|
5
|
+
* Designed to be cheap and side-effect free — safe to call inside hot planner loops.
|
|
6
|
+
*/
|
|
7
|
+
export interface ModelMatch {
|
|
8
|
+
modelKey: string;
|
|
9
|
+
config: IModelSchema;
|
|
10
|
+
}
|
|
11
|
+
/** Return every model whose tier matches. Optionally filter by GenerationType. */
|
|
12
|
+
export declare function getModelsByTier(tier: Tier, type?: GenerationType): ModelMatch[];
|
|
13
|
+
/** Return the cheapest model satisfying (tier, type). Uses cost.fixed → cost.perSecond → 0. */
|
|
14
|
+
export declare function getCheapestModel(tier: Tier, type: GenerationType): ModelMatch | undefined;
|
|
15
|
+
/** Return all models supporting a generation type, regardless of tier. */
|
|
16
|
+
export declare function getModelsByType(type: GenerationType): ModelMatch[];
|
|
17
|
+
/**
|
|
18
|
+
* Build a compact, planner-readable summary of the model catalog grouped by
|
|
19
|
+
* tier. Injected into the planner system prompt so the LLM can pick a concrete
|
|
20
|
+
* `preferredModel` per scene with cost/quality awareness — e.g. cheap Kling
|
|
21
|
+
* for b-roll, premium Veo for hero shots.
|
|
22
|
+
*
|
|
23
|
+
* Token budget matters here: ~10–20 lines, no JSON, sorted cheapest-first per
|
|
24
|
+
* tier so the planner's default tendency aligns with cost minimization.
|
|
25
|
+
*/
|
|
26
|
+
export declare function summarizeModelsForPlanner(type?: GenerationType): string;
|
|
27
|
+
//# sourceMappingURL=tierHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tierHelpers.d.ts","sourceRoot":"","sources":["../../../src/globals/aiModels/tierHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5D;;;GAGG;AAEH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,UAAU,EAAE,CAQ/E;AAED,+FAA+F;AAC/F,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,cAAc,GACnB,UAAU,GAAG,SAAS,CAIxB;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU,EAAE,CAMlE;AAQD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,GAAE,cAAgC,GACrC,MAAM,CAaR"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getModelsByTier = getModelsByTier;
|
|
4
|
+
exports.getCheapestModel = getCheapestModel;
|
|
5
|
+
exports.getModelsByType = getModelsByType;
|
|
6
|
+
exports.summarizeModelsForPlanner = summarizeModelsForPlanner;
|
|
7
|
+
const index_1 = require("./index");
|
|
8
|
+
/** Return every model whose tier matches. Optionally filter by GenerationType. */
|
|
9
|
+
function getModelsByTier(tier, type) {
|
|
10
|
+
const matches = [];
|
|
11
|
+
for (const [modelKey, config] of Object.entries(index_1.aiModelConfigs)) {
|
|
12
|
+
if (config.tier !== tier)
|
|
13
|
+
continue;
|
|
14
|
+
if (type && !config.type.includes(type))
|
|
15
|
+
continue;
|
|
16
|
+
matches.push({ modelKey, config });
|
|
17
|
+
}
|
|
18
|
+
return matches;
|
|
19
|
+
}
|
|
20
|
+
/** Return the cheapest model satisfying (tier, type). Uses cost.fixed → cost.perSecond → 0. */
|
|
21
|
+
function getCheapestModel(tier, type) {
|
|
22
|
+
const candidates = getModelsByTier(tier, type);
|
|
23
|
+
if (candidates.length === 0)
|
|
24
|
+
return undefined;
|
|
25
|
+
return candidates.sort((a, b) => costScore(a.config) - costScore(b.config))[0];
|
|
26
|
+
}
|
|
27
|
+
/** Return all models supporting a generation type, regardless of tier. */
|
|
28
|
+
function getModelsByType(type) {
|
|
29
|
+
const matches = [];
|
|
30
|
+
for (const [modelKey, config] of Object.entries(index_1.aiModelConfigs)) {
|
|
31
|
+
if (config.type.includes(type))
|
|
32
|
+
matches.push({ modelKey, config });
|
|
33
|
+
}
|
|
34
|
+
return matches;
|
|
35
|
+
}
|
|
36
|
+
function costScore(c) {
|
|
37
|
+
if (c.cost?.fixed != null)
|
|
38
|
+
return c.cost.fixed;
|
|
39
|
+
if (c.cost?.perSecond != null)
|
|
40
|
+
return c.cost.perSecond;
|
|
41
|
+
return Number.POSITIVE_INFINITY;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Build a compact, planner-readable summary of the model catalog grouped by
|
|
45
|
+
* tier. Injected into the planner system prompt so the LLM can pick a concrete
|
|
46
|
+
* `preferredModel` per scene with cost/quality awareness — e.g. cheap Kling
|
|
47
|
+
* for b-roll, premium Veo for hero shots.
|
|
48
|
+
*
|
|
49
|
+
* Token budget matters here: ~10–20 lines, no JSON, sorted cheapest-first per
|
|
50
|
+
* tier so the planner's default tendency aligns with cost minimization.
|
|
51
|
+
*/
|
|
52
|
+
function summarizeModelsForPlanner(type = "text-to-video") {
|
|
53
|
+
const lines = [];
|
|
54
|
+
for (const tier of ["T0", "T1", "T2", "T3"]) {
|
|
55
|
+
const matches = getModelsByTier(tier, type);
|
|
56
|
+
if (matches.length === 0)
|
|
57
|
+
continue;
|
|
58
|
+
matches.sort((a, b) => costScore(a.config) - costScore(b.config));
|
|
59
|
+
lines.push(` ${tier}:`);
|
|
60
|
+
for (const m of matches) {
|
|
61
|
+
const cost = formatCost(m.config);
|
|
62
|
+
lines.push(` - ${m.modelKey}${cost ? ` (${cost})` : ""}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return lines.length ? lines.join("\n") : "";
|
|
66
|
+
}
|
|
67
|
+
function formatCost(c) {
|
|
68
|
+
if (c.cost?.fixed != null)
|
|
69
|
+
return `$${c.cost.fixed.toFixed(2)} fixed`;
|
|
70
|
+
if (c.cost?.perSecond != null)
|
|
71
|
+
return `$${c.cost.perSecond.toFixed(2)}/s`;
|
|
72
|
+
return "";
|
|
73
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ITtsProviderConfig } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* MiniMax Speech-02-HD — high-fidelity multilingual TTS.
|
|
4
|
+
* API: POST https://api.minimax.io/v1/t2a_v2 returns hex-encoded audio inline.
|
|
5
|
+
* Pricing: roughly $0.10 per 1K chars (T2A HD tier).
|
|
6
|
+
*/
|
|
7
|
+
export declare const minimaxTtsConfig: ITtsProviderConfig;
|
|
8
|
+
//# sourceMappingURL=minimax.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minimax.d.ts","sourceRoot":"","sources":["../../../../src/globals/ttsModels/providers/minimax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,kBAS9B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.minimaxTtsConfig = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* MiniMax Speech-02-HD — high-fidelity multilingual TTS.
|
|
6
|
+
* API: POST https://api.minimax.io/v1/t2a_v2 returns hex-encoded audio inline.
|
|
7
|
+
* Pricing: roughly $0.10 per 1K chars (T2A HD tier).
|
|
8
|
+
*/
|
|
9
|
+
exports.minimaxTtsConfig = {
|
|
10
|
+
name: "MiniMax Speech-02 HD",
|
|
11
|
+
costPer1KChars: 0.1,
|
|
12
|
+
defaultVoiceId: "male-qn-qingse",
|
|
13
|
+
modelId: "speech-02-hd",
|
|
14
|
+
wordsPerSecond: 2.5,
|
|
15
|
+
maxCharsPerRequest: 5000,
|
|
16
|
+
durationSafetyBufferSeconds: 100,
|
|
17
|
+
concurrentRequests: 5,
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ITtsProviderConfig } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* OpenAI gpt-4o-mini-tts — cheap, fast TTS with optional `instructions` styling.
|
|
4
|
+
* API: POST https://api.openai.com/v1/audio/speech returns mp3 binary directly.
|
|
5
|
+
* Pricing: ~$0.015/1K chars (gpt-4o-mini-tts).
|
|
6
|
+
*/
|
|
7
|
+
export declare const openaiTtsConfig: ITtsProviderConfig;
|
|
8
|
+
//# sourceMappingURL=openai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../../src/globals/ttsModels/providers/openai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,kBAS7B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.openaiTtsConfig = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* OpenAI gpt-4o-mini-tts — cheap, fast TTS with optional `instructions` styling.
|
|
6
|
+
* API: POST https://api.openai.com/v1/audio/speech returns mp3 binary directly.
|
|
7
|
+
* Pricing: ~$0.015/1K chars (gpt-4o-mini-tts).
|
|
8
|
+
*/
|
|
9
|
+
exports.openaiTtsConfig = {
|
|
10
|
+
name: "OpenAI gpt-4o-mini-tts",
|
|
11
|
+
costPer1KChars: 0.015,
|
|
12
|
+
defaultVoiceId: "alloy",
|
|
13
|
+
modelId: "gpt-4o-mini-tts",
|
|
14
|
+
wordsPerSecond: 2.5,
|
|
15
|
+
maxCharsPerRequest: 4096,
|
|
16
|
+
durationSafetyBufferSeconds: 60,
|
|
17
|
+
concurrentRequests: 5,
|
|
18
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { VideoBrief } from "../schemas/brief.schema";
|
|
2
|
+
import { VideoPlan } from "../schemas/videoPlan.schema";
|
|
3
|
+
import { AgentPersona } from "../schemas/agentPersona.schema";
|
|
4
|
+
import { CriticReport } from "../services/agent/critic";
|
|
5
|
+
/**
|
|
6
|
+
* BrandKit — set-once-per-user identity. Auto-injected into every brief by
|
|
7
|
+
* the agent so brand consistency lifts free across runs. Lives at
|
|
8
|
+
* /brandKits/{userId} (single doc per user).
|
|
9
|
+
*/
|
|
10
|
+
export interface IBrandKitModel {
|
|
11
|
+
userId: string;
|
|
12
|
+
brandName?: string;
|
|
13
|
+
logoUrl?: string;
|
|
14
|
+
primaryColorHex?: string;
|
|
15
|
+
secondaryColorHex?: string;
|
|
16
|
+
fontFamily?: string;
|
|
17
|
+
/** Preferred TTS voice id. */
|
|
18
|
+
voiceId?: string;
|
|
19
|
+
/** Music tempo / mood preference. */
|
|
20
|
+
musicMoods?: string[];
|
|
21
|
+
/** Phrases the agent must never produce. */
|
|
22
|
+
bannedClaims?: string[];
|
|
23
|
+
/** Phrases the agent should prefer. */
|
|
24
|
+
preferredClaims?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* Presenter face still URL — set once by the user; required for the
|
|
27
|
+
* talking-head-avatar strategy. Planner injects into PlannedScene.avatarFaceUrl.
|
|
28
|
+
*/
|
|
29
|
+
presenterFaceUrl?: string;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* StyleMemory — per-user record of recent accepted/rejected scene decisions.
|
|
35
|
+
* Used as few-shot examples by the planner to bias future plans toward
|
|
36
|
+
* choices the user has previously accepted. Lives at /styleMemory/{userId}
|
|
37
|
+
* (single doc per user, like the brand kit).
|
|
38
|
+
*
|
|
39
|
+
* Capped to MAX_STYLE_MEMORY_ENTRIES per side; older entries fall off when
|
|
40
|
+
* `recordSceneDecision` is called.
|
|
41
|
+
*/
|
|
42
|
+
export declare const MAX_STYLE_MEMORY_ENTRIES = 10;
|
|
43
|
+
export interface IStyleMemoryEntry {
|
|
44
|
+
/** Snapshot of the planner's PlannedScene for this decision. */
|
|
45
|
+
scene: unknown;
|
|
46
|
+
/** Project this came from. */
|
|
47
|
+
projectId: string;
|
|
48
|
+
/** Which scene index in that project. */
|
|
49
|
+
sceneIndex: number;
|
|
50
|
+
/** ISO timestamp the decision was recorded. */
|
|
51
|
+
recordedAt: string;
|
|
52
|
+
}
|
|
53
|
+
export interface IStyleMemoryModel {
|
|
54
|
+
userId: string;
|
|
55
|
+
/** Scenes the user shipped without changes. */
|
|
56
|
+
acceptedScenes: IStyleMemoryEntry[];
|
|
57
|
+
/** Scenes the user explicitly rejected (regenerated, deleted, swapped). */
|
|
58
|
+
rejectedScenes: IStyleMemoryEntry[];
|
|
59
|
+
createdAt: string;
|
|
60
|
+
updatedAt: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* AgentProject — one chat session / one Project JSON in flight. Holds the
|
|
64
|
+
* current Brief and VideoPlan. Multiple AgentRuns may attach to a single
|
|
65
|
+
* project (each "regenerate scene" is a new run).
|
|
66
|
+
*/
|
|
67
|
+
export interface IAgentProjectModel {
|
|
68
|
+
id: string;
|
|
69
|
+
userId: string;
|
|
70
|
+
title?: string;
|
|
71
|
+
brief?: VideoBrief;
|
|
72
|
+
plan?: VideoPlan;
|
|
73
|
+
/** Latest Project JSON (Remotion editor schema). */
|
|
74
|
+
projectJson?: unknown;
|
|
75
|
+
status: "draft" | "planned" | "executing" | "ready-to-render" | "rendered" | "failed";
|
|
76
|
+
/** Persona persisted across the session. */
|
|
77
|
+
persona?: AgentPersona;
|
|
78
|
+
/** Latest critic report from execute. */
|
|
79
|
+
criticReport?: CriticReport;
|
|
80
|
+
/** Most recent render output for this project. */
|
|
81
|
+
lastRender?: {
|
|
82
|
+
renderJobId: string;
|
|
83
|
+
mp4Url: string;
|
|
84
|
+
durationMs: number;
|
|
85
|
+
quality: "draft" | "standard" | "premium";
|
|
86
|
+
renderedAt: string;
|
|
87
|
+
};
|
|
88
|
+
createdAt: string;
|
|
89
|
+
updatedAt: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* AgentRun — one planner+executor+critic invocation. Stored for replay,
|
|
93
|
+
* eval, and debugging. The recorder writes to this collection at end of run.
|
|
94
|
+
*/
|
|
95
|
+
export interface IAgentRunModel {
|
|
96
|
+
id: string;
|
|
97
|
+
userId: string;
|
|
98
|
+
projectId: string;
|
|
99
|
+
persona?: AgentPersona;
|
|
100
|
+
brief?: VideoBrief;
|
|
101
|
+
plan?: VideoPlan;
|
|
102
|
+
/** Logged tool calls in order. Shape mirrors the trace recorder's ToolCallTrace. */
|
|
103
|
+
toolCalls: Array<{
|
|
104
|
+
ts: number;
|
|
105
|
+
tool: string;
|
|
106
|
+
input: unknown;
|
|
107
|
+
outcome: unknown;
|
|
108
|
+
}>;
|
|
109
|
+
/** RNG seed used (replay reproducibility). */
|
|
110
|
+
rngSeed?: number;
|
|
111
|
+
status: "running" | "succeeded" | "failed" | "aborted";
|
|
112
|
+
startedAt: string;
|
|
113
|
+
endedAt?: string;
|
|
114
|
+
totalCost?: number;
|
|
115
|
+
errorMessage?: string;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=agent.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.model.d.ts","sourceRoot":"","sources":["../../src/models/agent.model.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_STYLE_MEMORY_ENTRIES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* StyleMemory — per-user record of recent accepted/rejected scene decisions.
|
|
6
|
+
* Used as few-shot examples by the planner to bias future plans toward
|
|
7
|
+
* choices the user has previously accepted. Lives at /styleMemory/{userId}
|
|
8
|
+
* (single doc per user, like the brand kit).
|
|
9
|
+
*
|
|
10
|
+
* Capped to MAX_STYLE_MEMORY_ENTRIES per side; older entries fall off when
|
|
11
|
+
* `recordSceneDecision` is called.
|
|
12
|
+
*/
|
|
13
|
+
exports.MAX_STYLE_MEMORY_ENTRIES = 10;
|
|
@@ -17,6 +17,9 @@ export interface IAnalyticsDailyModel {
|
|
|
17
17
|
totalDurationSeconds: number;
|
|
18
18
|
jobLatencyMsSum: number;
|
|
19
19
|
jobLatencyMsCount: number;
|
|
20
|
+
/** Try-example / sample short-circuit count. Tracked separately so the
|
|
21
|
+
* jobs* fields stay real-generation-only. May be absent on historical docs. */
|
|
22
|
+
samplesCompleted?: number;
|
|
20
23
|
updatedAt: FieldValue;
|
|
21
24
|
}
|
|
22
25
|
/** Cross-model daily rollup for summary cards. */
|
|
@@ -30,6 +33,7 @@ export interface IAnalyticsDailyGlobalModel {
|
|
|
30
33
|
totalCreditsUsed: number;
|
|
31
34
|
jobLatencyMsSum: number;
|
|
32
35
|
jobLatencyMsCount: number;
|
|
36
|
+
samplesCompleted?: number;
|
|
33
37
|
updatedAt: FieldValue;
|
|
34
38
|
}
|
|
35
39
|
//# sourceMappingURL=analytics.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.model.d.ts","sourceRoot":"","sources":["../../src/models/analytics.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,UAAU,CAAC;CACvB;AAED,kDAAkD;AAClD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,UAAU,CAAC;CACvB"}
|
|
1
|
+
{"version":3,"file":"analytics.model.d.ts","sourceRoot":"","sources":["../../src/models/analytics.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B;mFAC+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,UAAU,CAAC;CACvB;AAED,kDAAkD;AAClD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,UAAU,CAAC;CACvB"}
|