vidspotai-shared 1.0.69-dev.0 → 1.0.69
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 +6 -63
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +9 -78
- package/lib/globals/aiModels/index.d.ts +30 -2
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +35 -7
- package/lib/globals/aiModels/providers/bytedance.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/bytedance.js +0 -19
- package/lib/globals/aiModels/providers/google.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/google.js +2 -150
- package/lib/globals/aiModels/providers/kling.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/kling.js +37 -280
- package/lib/globals/aiModels/providers/minimax.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/minimax.js +11 -76
- package/lib/globals/aiModels/providers/openai.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/openai.js +6 -90
- package/lib/globals/aiModels/providers/pixverse.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/pixverse.js +29 -111
- package/lib/globals/aiModels/providers/runway.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/runway.js +2 -64
- package/lib/globals/aiModels/types.d.ts +1 -20
- package/lib/globals/aiModels/types.d.ts.map +1 -1
- package/lib/globals/ttsModels/index.d.ts +0 -2
- package/lib/globals/ttsModels/index.d.ts.map +1 -1
- package/lib/globals/ttsModels/index.js +1 -9
- package/lib/globals/ttsModels/types.d.ts +1 -1
- package/lib/globals/ttsModels/types.d.ts.map +1 -1
- package/lib/globals/ttsModels/voices.d.ts +4 -39
- package/lib/globals/ttsModels/voices.d.ts.map +1 -1
- package/lib/globals/ttsModels/voices.js +26 -273
- package/lib/globals/types.d.ts +1 -59
- package/lib/globals/types.d.ts.map +1 -1
- package/lib/globals/types.js +2 -81
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/models/index.d.ts +0 -6
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +0 -6
- package/lib/models/user.model.d.ts +1 -12
- package/lib/models/user.model.d.ts.map +1 -1
- package/lib/models/video.model.d.ts +8 -120
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/models/video.model.js +0 -10
- package/lib/services/aiGen/aiGenFactory.service.d.ts +1 -21
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +21 -84
- package/lib/services/aiGen/helpers.d.ts.map +1 -1
- package/lib/services/aiGen/helpers.js +0 -10
- package/lib/services/aiGen/providers/alibaba/alibaba.d.ts +3 -14
- package/lib/services/aiGen/providers/alibaba/alibaba.d.ts.map +1 -1
- package/lib/services/aiGen/providers/alibaba/alibaba.js +22 -155
- package/lib/services/aiGen/providers/azure/azure.service.d.ts +14 -0
- package/lib/services/aiGen/providers/azure/azure.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/azure/azure.service.js +108 -0
- package/lib/services/aiGen/providers/azure/index.d.ts +2 -0
- package/lib/services/aiGen/providers/azure/index.d.ts.map +1 -0
- package/lib/services/aiGen/providers/{pexels → azure}/index.js +1 -1
- package/lib/services/aiGen/providers/baseAiGenProvider.service.d.ts +4 -22
- package/lib/services/aiGen/providers/baseAiGenProvider.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/baseAiGenProvider.service.js +0 -32
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.js +25 -13
- package/lib/services/aiGen/providers/google/google.service.d.ts +2 -11
- package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/google.service.js +28 -245
- package/lib/services/aiGen/providers/index.d.ts +0 -3
- package/lib/services/aiGen/providers/index.d.ts.map +1 -1
- package/lib/services/aiGen/providers/index.js +0 -3
- package/lib/services/aiGen/providers/kling/index.d.ts +0 -1
- package/lib/services/aiGen/providers/kling/index.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/index.js +0 -1
- package/lib/services/aiGen/providers/kling/kling.service.d.ts +1 -12
- package/lib/services/aiGen/providers/kling/kling.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/kling.service.js +26 -357
- package/lib/services/aiGen/providers/kling/types.d.ts +0 -105
- package/lib/services/aiGen/providers/kling/types.d.ts.map +1 -1
- package/lib/services/aiGen/providers/minimax/minimax.service.d.ts +2 -15
- package/lib/services/aiGen/providers/minimax/minimax.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/minimax/minimax.service.js +5 -128
- package/lib/services/aiGen/providers/minimax/types.d.ts +1 -10
- package/lib/services/aiGen/providers/minimax/types.d.ts.map +1 -1
- package/lib/services/aiGen/providers/openai/openai.service.d.ts +2 -8
- package/lib/services/aiGen/providers/openai/openai.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/openai/openai.service.js +7 -184
- package/lib/services/aiGen/providers/pixverse/pixverse.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/pixverse/pixverse.service.js +2 -125
- package/lib/services/aiGen/providers/runway/runway.service.d.ts +2 -12
- package/lib/services/aiGen/providers/runway/runway.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/runway/runway.service.js +21 -224
- package/lib/services/aiGen/providers/types.d.ts +6 -263
- package/lib/services/aiGen/providers/types.d.ts.map +1 -1
- package/lib/services/analytics.service.js +4 -2
- package/lib/services/bullmq.service.d.ts +1 -6
- package/lib/services/bullmq.service.d.ts.map +1 -1
- package/lib/services/bullmq.service.js +14 -62
- package/lib/services/credit.service.d.ts.map +1 -1
- package/lib/services/credit.service.js +7 -45
- package/lib/services/firestore.service.d.ts +0 -17
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +0 -30
- package/lib/services/gcp/index.d.ts +0 -1
- package/lib/services/gcp/index.d.ts.map +1 -1
- package/lib/services/gcp/index.js +0 -1
- package/lib/services/index.d.ts +0 -13
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +0 -13
- package/lib/services/redis.service.d.ts +0 -9
- package/lib/services/redis.service.d.ts.map +1 -1
- package/lib/services/redis.service.js +11 -20
- package/lib/services/tts/index.d.ts +0 -2
- package/lib/services/tts/index.d.ts.map +1 -1
- package/lib/services/tts/index.js +0 -2
- package/lib/services/tts/providers/elevenlabs.service.d.ts.map +1 -1
- package/lib/services/tts/providers/elevenlabs.service.js +24 -91
- package/lib/services/tts/ttsFactory.service.d.ts.map +1 -1
- package/lib/services/tts/ttsFactory.service.js +0 -6
- package/lib/services/tts/types.d.ts +0 -33
- package/lib/services/tts/types.d.ts.map +1 -1
- package/lib/utils/errors.d.ts +0 -8
- package/lib/utils/errors.d.ts.map +1 -1
- package/lib/utils/errors.js +0 -8
- package/lib/utils/helpers.d.ts +0 -13
- package/lib/utils/helpers.d.ts.map +1 -1
- package/lib/utils/helpers.js +11 -48
- package/lib/utils/logger.d.ts.map +1 -1
- package/lib/utils/logger.js +1 -37
- package/package.json +1 -5
- package/lib/globals/aiModels/providers/alibaba.d.ts +0 -4
- package/lib/globals/aiModels/providers/alibaba.d.ts.map +0 -1
- package/lib/globals/aiModels/providers/alibaba.js +0 -194
- package/lib/globals/aiModels/providers/elevenlabs.d.ts +0 -14
- package/lib/globals/aiModels/providers/elevenlabs.d.ts.map +0 -1
- package/lib/globals/aiModels/providers/elevenlabs.js +0 -29
- package/lib/globals/aiModels/providers/pixverseTemplates.d.ts +0 -36
- package/lib/globals/aiModels/providers/pixverseTemplates.d.ts.map +0 -1
- package/lib/globals/aiModels/providers/pixverseTemplates.js +0 -42
- package/lib/globals/aiModels/tierHelpers.d.ts +0 -33
- package/lib/globals/aiModels/tierHelpers.d.ts.map +0 -1
- package/lib/globals/aiModels/tierHelpers.js +0 -109
- package/lib/globals/ttsModels/providers/minimax.d.ts +0 -8
- package/lib/globals/ttsModels/providers/minimax.d.ts.map +0 -1
- package/lib/globals/ttsModels/providers/minimax.js +0 -18
- package/lib/globals/ttsModels/providers/openai.d.ts +0 -12
- package/lib/globals/ttsModels/providers/openai.d.ts.map +0 -1
- package/lib/globals/ttsModels/providers/openai.js +0 -22
- package/lib/models/agent.model.d.ts +0 -357
- package/lib/models/agent.model.d.ts.map +0 -1
- package/lib/models/agent.model.js +0 -21
- package/lib/models/cachedAsset.model.d.ts +0 -18
- package/lib/models/cachedAsset.model.d.ts.map +0 -1
- package/lib/models/cachedAsset.model.js +0 -2
- package/lib/models/cachedRawAsset.model.d.ts +0 -20
- package/lib/models/cachedRawAsset.model.d.ts.map +0 -1
- package/lib/models/cachedRawAsset.model.js +0 -2
- package/lib/models/image.model.d.ts +0 -47
- package/lib/models/image.model.d.ts.map +0 -1
- package/lib/models/image.model.js +0 -2
- package/lib/models/notification.model.d.ts +0 -25
- package/lib/models/notification.model.d.ts.map +0 -1
- package/lib/models/notification.model.js +0 -2
- package/lib/models/ref.model.d.ts +0 -80
- package/lib/models/ref.model.d.ts.map +0 -1
- package/lib/models/ref.model.js +0 -13
- package/lib/models/share.model.d.ts +0 -29
- package/lib/models/share.model.d.ts.map +0 -1
- package/lib/models/share.model.js +0 -2
- package/lib/schemas/agentPersona.schema.d.ts +0 -10
- package/lib/schemas/agentPersona.schema.d.ts.map +0 -1
- package/lib/schemas/agentPersona.schema.js +0 -11
- package/lib/schemas/agentRunJob.schema.d.ts +0 -105
- package/lib/schemas/agentRunJob.schema.d.ts.map +0 -1
- package/lib/schemas/agentRunJob.schema.js +0 -88
- package/lib/schemas/brandKit.schema.d.ts +0 -113
- package/lib/schemas/brandKit.schema.d.ts.map +0 -1
- package/lib/schemas/brandKit.schema.js +0 -46
- package/lib/schemas/brief.schema.d.ts +0 -263
- package/lib/schemas/brief.schema.d.ts.map +0 -1
- package/lib/schemas/brief.schema.js +0 -157
- package/lib/schemas/index.d.ts +0 -7
- package/lib/schemas/index.d.ts.map +0 -1
- package/lib/schemas/index.js +0 -22
- package/lib/schemas/project.schema.d.ts +0 -1025
- package/lib/schemas/project.schema.d.ts.map +0 -1
- package/lib/schemas/project.schema.js +0 -256
- package/lib/schemas/videoPlan.schema.d.ts +0 -590
- package/lib/schemas/videoPlan.schema.d.ts.map +0 -1
- package/lib/schemas/videoPlan.schema.js +0 -412
- package/lib/services/agent/beatSnap.d.ts +0 -10
- package/lib/services/agent/beatSnap.d.ts.map +0 -1
- package/lib/services/agent/beatSnap.js +0 -128
- package/lib/services/agent/bibleBuilder.d.ts +0 -43
- package/lib/services/agent/bibleBuilder.d.ts.map +0 -1
- package/lib/services/agent/bibleBuilder.js +0 -102
- package/lib/services/agent/bibleImageVision.d.ts +0 -45
- package/lib/services/agent/bibleImageVision.d.ts.map +0 -1
- package/lib/services/agent/bibleImageVision.js +0 -169
- package/lib/services/agent/chatAgent.d.ts +0 -79
- package/lib/services/agent/chatAgent.d.ts.map +0 -1
- package/lib/services/agent/chatAgent.js +0 -136
- package/lib/services/agent/costPreflight.d.ts +0 -61
- package/lib/services/agent/costPreflight.d.ts.map +0 -1
- package/lib/services/agent/costPreflight.js +0 -143
- package/lib/services/agent/critic.d.ts +0 -103
- package/lib/services/agent/critic.d.ts.map +0 -1
- package/lib/services/agent/critic.js +0 -139
- package/lib/services/agent/editClassifier.d.ts +0 -262
- package/lib/services/agent/editClassifier.d.ts.map +0 -1
- package/lib/services/agent/editClassifier.js +0 -186
- package/lib/services/agent/eval/index.d.ts +0 -5
- package/lib/services/agent/eval/index.d.ts.map +0 -1
- package/lib/services/agent/eval/index.js +0 -20
- package/lib/services/agent/eval/judge.d.ts +0 -14
- package/lib/services/agent/eval/judge.d.ts.map +0 -1
- package/lib/services/agent/eval/judge.js +0 -96
- package/lib/services/agent/eval/recorder.d.ts +0 -28
- package/lib/services/agent/eval/recorder.d.ts.map +0 -1
- package/lib/services/agent/eval/recorder.js +0 -100
- package/lib/services/agent/eval/seedBriefs.d.ts +0 -16
- package/lib/services/agent/eval/seedBriefs.d.ts.map +0 -1
- package/lib/services/agent/eval/seedBriefs.js +0 -1188
- package/lib/services/agent/eval/types.d.ts +0 -230
- package/lib/services/agent/eval/types.d.ts.map +0 -1
- package/lib/services/agent/eval/types.js +0 -73
- package/lib/services/agent/executor.d.ts +0 -141
- package/lib/services/agent/executor.d.ts.map +0 -1
- package/lib/services/agent/executor.js +0 -561
- package/lib/services/agent/globalActions.d.ts +0 -49
- package/lib/services/agent/globalActions.d.ts.map +0 -1
- package/lib/services/agent/globalActions.js +0 -328
- package/lib/services/agent/index.d.ts +0 -38
- package/lib/services/agent/index.d.ts.map +0 -1
- package/lib/services/agent/index.js +0 -53
- package/lib/services/agent/llmCaller.d.ts +0 -144
- package/lib/services/agent/llmCaller.d.ts.map +0 -1
- package/lib/services/agent/llmCaller.js +0 -16
- package/lib/services/agent/llmCallerAnthropic.d.ts +0 -90
- package/lib/services/agent/llmCallerAnthropic.d.ts.map +0 -1
- package/lib/services/agent/llmCallerAnthropic.js +0 -255
- package/lib/services/agent/llmCallerGateway.d.ts +0 -61
- package/lib/services/agent/llmCallerGateway.d.ts.map +0 -1
- package/lib/services/agent/llmCallerGateway.js +0 -360
- package/lib/services/agent/llmCallerRegistry.d.ts +0 -6
- package/lib/services/agent/llmCallerRegistry.d.ts.map +0 -1
- package/lib/services/agent/llmCallerRegistry.js +0 -39
- package/lib/services/agent/modelQualityNotes.d.ts +0 -100
- package/lib/services/agent/modelQualityNotes.d.ts.map +0 -1
- package/lib/services/agent/modelQualityNotes.js +0 -248
- package/lib/services/agent/modelRouter.d.ts +0 -41
- package/lib/services/agent/modelRouter.d.ts.map +0 -1
- package/lib/services/agent/modelRouter.js +0 -65
- package/lib/services/agent/musicSelect.d.ts +0 -23
- package/lib/services/agent/musicSelect.d.ts.map +0 -1
- package/lib/services/agent/musicSelect.js +0 -109
- package/lib/services/agent/overlayRenderer.d.ts +0 -67
- package/lib/services/agent/overlayRenderer.d.ts.map +0 -1
- package/lib/services/agent/overlayRenderer.js +0 -253
- package/lib/services/agent/perSceneCritic.d.ts +0 -90
- package/lib/services/agent/perSceneCritic.d.ts.map +0 -1
- package/lib/services/agent/perSceneCritic.js +0 -125
- package/lib/services/agent/personas.d.ts +0 -78
- package/lib/services/agent/personas.d.ts.map +0 -1
- package/lib/services/agent/personas.js +0 -177
- package/lib/services/agent/planDiff.d.ts +0 -76
- package/lib/services/agent/planDiff.d.ts.map +0 -1
- package/lib/services/agent/planDiff.js +0 -182
- package/lib/services/agent/planMutations.d.ts +0 -46
- package/lib/services/agent/planMutations.d.ts.map +0 -1
- package/lib/services/agent/planMutations.js +0 -120
- package/lib/services/agent/planner/Planner.d.ts +0 -107
- package/lib/services/agent/planner/Planner.d.ts.map +0 -1
- package/lib/services/agent/planner/Planner.js +0 -591
- package/lib/services/agent/planner/overlaySanity.d.ts +0 -7
- package/lib/services/agent/planner/overlaySanity.d.ts.map +0 -1
- package/lib/services/agent/planner/overlaySanity.js +0 -86
- package/lib/services/agent/planner/promptSections.d.ts +0 -25
- package/lib/services/agent/planner/promptSections.d.ts.map +0 -1
- package/lib/services/agent/planner/promptSections.js +0 -174
- package/lib/services/agent/planner/repair.d.ts +0 -16
- package/lib/services/agent/planner/repair.d.ts.map +0 -1
- package/lib/services/agent/planner/repair.js +0 -51
- package/lib/services/agent/planner/structuralRules.d.ts +0 -10
- package/lib/services/agent/planner/structuralRules.d.ts.map +0 -1
- package/lib/services/agent/planner/structuralRules.js +0 -111
- package/lib/services/agent/planner/validators.d.ts +0 -65
- package/lib/services/agent/planner/validators.d.ts.map +0 -1
- package/lib/services/agent/planner/validators.js +0 -284
- package/lib/services/agent/planner.d.ts +0 -3
- package/lib/services/agent/planner.d.ts.map +0 -1
- package/lib/services/agent/planner.js +0 -14
- package/lib/services/agent/providerFallback/chains.d.ts +0 -100
- package/lib/services/agent/providerFallback/chains.d.ts.map +0 -1
- package/lib/services/agent/providerFallback/chains.js +0 -198
- package/lib/services/agent/providerFallback/classifier.d.ts +0 -36
- package/lib/services/agent/providerFallback/classifier.d.ts.map +0 -1
- package/lib/services/agent/providerFallback/classifier.js +0 -103
- package/lib/services/agent/providerFallback/index.d.ts +0 -4
- package/lib/services/agent/providerFallback/index.d.ts.map +0 -1
- package/lib/services/agent/providerFallback/index.js +0 -19
- package/lib/services/agent/providerFallback/withFallback.d.ts +0 -60
- package/lib/services/agent/providerFallback/withFallback.d.ts.map +0 -1
- package/lib/services/agent/providerFallback/withFallback.js +0 -93
- package/lib/services/agent/providerTaskCache.d.ts +0 -50
- package/lib/services/agent/providerTaskCache.d.ts.map +0 -1
- package/lib/services/agent/providerTaskCache.js +0 -98
- package/lib/services/agent/qualityGate.d.ts +0 -82
- package/lib/services/agent/qualityGate.d.ts.map +0 -1
- package/lib/services/agent/qualityGate.js +0 -232
- package/lib/services/agent/referenceImageRenderer.d.ts +0 -37
- package/lib/services/agent/referenceImageRenderer.d.ts.map +0 -1
- package/lib/services/agent/referenceImageRenderer.js +0 -92
- package/lib/services/agent/regenCore.d.ts +0 -60
- package/lib/services/agent/regenCore.d.ts.map +0 -1
- package/lib/services/agent/regenCore.js +0 -487
- package/lib/services/agent/runHelpers.d.ts +0 -44
- package/lib/services/agent/runHelpers.d.ts.map +0 -1
- package/lib/services/agent/runHelpers.js +0 -196
- package/lib/services/agent/sceneLayoutVision.d.ts +0 -90
- package/lib/services/agent/sceneLayoutVision.d.ts.map +0 -1
- package/lib/services/agent/sceneLayoutVision.js +0 -212
- package/lib/services/agent/stitchedVideoCritic.d.ts +0 -136
- package/lib/services/agent/stitchedVideoCritic.d.ts.map +0 -1
- package/lib/services/agent/stitchedVideoCritic.gemini.d.ts +0 -26
- package/lib/services/agent/stitchedVideoCritic.gemini.d.ts.map +0 -1
- package/lib/services/agent/stitchedVideoCritic.gemini.js +0 -198
- package/lib/services/agent/stitchedVideoCritic.js +0 -162
- package/lib/services/agent/taskPoller.d.ts +0 -65
- package/lib/services/agent/taskPoller.d.ts.map +0 -1
- package/lib/services/agent/taskPoller.js +0 -176
- package/lib/services/agent/textOverlayStyles.d.ts +0 -60
- package/lib/services/agent/textOverlayStyles.d.ts.map +0 -1
- package/lib/services/agent/textOverlayStyles.js +0 -174
- package/lib/services/agent/toolRegistry.d.ts +0 -73
- package/lib/services/agent/toolRegistry.d.ts.map +0 -1
- package/lib/services/agent/toolRegistry.js +0 -95
- package/lib/services/agent/tools/analyzeReference.tool.d.ts +0 -36
- package/lib/services/agent/tools/analyzeReference.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/analyzeReference.tool.js +0 -44
- package/lib/services/agent/tools/animateImage.tool.d.ts +0 -24
- package/lib/services/agent/tools/animateImage.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/animateImage.tool.js +0 -115
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.d.ts +0 -32
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.js +0 -135
- package/lib/services/agent/tools/composeScene.tool.d.ts +0 -978
- package/lib/services/agent/tools/composeScene.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/composeScene.tool.js +0 -90
- package/lib/services/agent/tools/estimateCost.tool.d.ts +0 -352
- package/lib/services/agent/tools/estimateCost.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/estimateCost.tool.js +0 -62
- package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts +0 -32
- package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/generateAvatarVideo.tool.js +0 -143
- package/lib/services/agent/tools/generateCaptions.tool.d.ts +0 -42
- package/lib/services/agent/tools/generateCaptions.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/generateCaptions.tool.js +0 -196
- package/lib/services/agent/tools/generateImage.tool.d.ts +0 -74
- package/lib/services/agent/tools/generateImage.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/generateImage.tool.js +0 -206
- package/lib/services/agent/tools/generateVideo.tool.d.ts +0 -31
- package/lib/services/agent/tools/generateVideo.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/generateVideo.tool.js +0 -153
- package/lib/services/agent/tools/generateVoiceover.tool.d.ts +0 -44
- package/lib/services/agent/tools/generateVoiceover.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/generateVoiceover.tool.js +0 -206
- package/lib/services/agent/tools/index.d.ts +0 -20
- package/lib/services/agent/tools/index.d.ts.map +0 -1
- package/lib/services/agent/tools/index.js +0 -35
- package/lib/services/agent/tools/planVideo.tool.d.ts +0 -343
- package/lib/services/agent/tools/planVideo.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/planVideo.tool.js +0 -46
- package/lib/services/agent/tools/render.tool.d.ts +0 -367
- package/lib/services/agent/tools/render.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/render.tool.js +0 -48
- package/lib/services/agent/tools/searchMusic.tool.d.ts +0 -49
- package/lib/services/agent/tools/searchMusic.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/searchMusic.tool.js +0 -74
- package/lib/services/agent/tools/searchStock.tool.d.ts +0 -41
- package/lib/services/agent/tools/searchStock.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/searchStock.tool.js +0 -314
- package/lib/services/agent/tools/searchUserLibrary.tool.d.ts +0 -59
- package/lib/services/agent/tools/searchUserLibrary.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/searchUserLibrary.tool.js +0 -58
- package/lib/services/agent/ttsDuration.d.ts +0 -29
- package/lib/services/agent/ttsDuration.d.ts.map +0 -1
- package/lib/services/agent/ttsDuration.js +0 -60
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.d.ts +0 -31
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.d.ts.map +0 -1
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.js +0 -2
- package/lib/services/aiGen/canonicalAdapters/index.d.ts +0 -3
- package/lib/services/aiGen/canonicalAdapters/index.d.ts.map +0 -1
- package/lib/services/aiGen/canonicalAdapters/index.js +0 -18
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.d.ts +0 -23
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.d.ts.map +0 -1
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.js +0 -12
- package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.d.ts +0 -18
- package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.d.ts.map +0 -1
- package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.js +0 -102
- package/lib/services/aiGen/providers/fal/falImage.service.d.ts +0 -15
- package/lib/services/aiGen/providers/fal/falImage.service.d.ts.map +0 -1
- package/lib/services/aiGen/providers/fal/falImage.service.js +0 -141
- package/lib/services/aiGen/providers/fal/index.d.ts +0 -2
- package/lib/services/aiGen/providers/fal/index.d.ts.map +0 -1
- package/lib/services/aiGen/providers/fal/index.js +0 -17
- package/lib/services/aiGen/providers/kling/cameraAdapter.d.ts +0 -4
- package/lib/services/aiGen/providers/kling/cameraAdapter.d.ts.map +0 -1
- package/lib/services/aiGen/providers/kling/cameraAdapter.js +0 -53
- package/lib/services/aiGen/providers/kling/klingImage.service.d.ts +0 -21
- package/lib/services/aiGen/providers/kling/klingImage.service.d.ts.map +0 -1
- package/lib/services/aiGen/providers/kling/klingImage.service.js +0 -208
- package/lib/services/aiGen/providers/pexels/index.d.ts +0 -2
- package/lib/services/aiGen/providers/pexels/index.d.ts.map +0 -1
- package/lib/services/aiGen/providers/pexels/pexels.service.d.ts +0 -11
- package/lib/services/aiGen/providers/pexels/pexels.service.d.ts.map +0 -1
- package/lib/services/aiGen/providers/pexels/pexels.service.js +0 -150
- package/lib/services/aiGen/providers/pixabay/index.d.ts +0 -2
- package/lib/services/aiGen/providers/pixabay/index.d.ts.map +0 -1
- package/lib/services/aiGen/providers/pixabay/index.js +0 -17
- package/lib/services/aiGen/providers/pixabay/pixabay.service.d.ts +0 -12
- package/lib/services/aiGen/providers/pixabay/pixabay.service.d.ts.map +0 -1
- package/lib/services/aiGen/providers/pixabay/pixabay.service.js +0 -156
- package/lib/services/aiGen/providers/runway/cameraAdapter.d.ts +0 -3
- package/lib/services/aiGen/providers/runway/cameraAdapter.d.ts.map +0 -1
- package/lib/services/aiGen/providers/runway/cameraAdapter.js +0 -46
- package/lib/services/aiGen/providers/unsplash/index.d.ts +0 -2
- package/lib/services/aiGen/providers/unsplash/index.d.ts.map +0 -1
- package/lib/services/aiGen/providers/unsplash/index.js +0 -17
- package/lib/services/aiGen/providers/unsplash/unsplash.service.d.ts +0 -16
- package/lib/services/aiGen/providers/unsplash/unsplash.service.d.ts.map +0 -1
- package/lib/services/aiGen/providers/unsplash/unsplash.service.js +0 -131
- package/lib/services/apiUsageCounter.service.d.ts +0 -20
- package/lib/services/apiUsageCounter.service.d.ts.map +0 -1
- package/lib/services/apiUsageCounter.service.js +0 -84
- package/lib/services/asr/assemblyai.service.d.ts +0 -72
- package/lib/services/asr/assemblyai.service.d.ts.map +0 -1
- package/lib/services/asr/assemblyai.service.js +0 -89
- package/lib/services/asr/index.d.ts +0 -3
- package/lib/services/asr/index.d.ts.map +0 -1
- package/lib/services/asr/index.js +0 -18
- package/lib/services/asr/whisper.service.d.ts +0 -18
- package/lib/services/asr/whisper.service.d.ts.map +0 -1
- package/lib/services/asr/whisper.service.js +0 -151
- package/lib/services/assetCache.service.d.ts +0 -54
- package/lib/services/assetCache.service.d.ts.map +0 -1
- package/lib/services/assetCache.service.js +0 -109
- package/lib/services/audioAnalysis/index.d.ts +0 -2
- package/lib/services/audioAnalysis/index.d.ts.map +0 -1
- package/lib/services/audioAnalysis/index.js +0 -17
- package/lib/services/audioAnalysis/onsetDetection.service.d.ts +0 -50
- package/lib/services/audioAnalysis/onsetDetection.service.d.ts.map +0 -1
- package/lib/services/audioAnalysis/onsetDetection.service.js +0 -140
- package/lib/services/credits/pricing.d.ts +0 -58
- package/lib/services/credits/pricing.d.ts.map +0 -1
- package/lib/services/credits/pricing.js +0 -111
- package/lib/services/editor/designToProject.d.ts +0 -75
- package/lib/services/editor/designToProject.d.ts.map +0 -1
- package/lib/services/editor/designToProject.js +0 -295
- package/lib/services/editor/planToProject.d.ts +0 -84
- package/lib/services/editor/planToProject.d.ts.map +0 -1
- package/lib/services/editor/planToProject.js +0 -395
- package/lib/services/editor/projectToDesign.d.ts +0 -4
- package/lib/services/editor/projectToDesign.d.ts.map +0 -1
- package/lib/services/editor/projectToDesign.js +0 -186
- package/lib/services/gcp/uploadAudioBuffer.d.ts +0 -13
- package/lib/services/gcp/uploadAudioBuffer.d.ts.map +0 -1
- package/lib/services/gcp/uploadAudioBuffer.js +0 -28
- package/lib/services/musicGen/index.d.ts +0 -6
- package/lib/services/musicGen/index.d.ts.map +0 -1
- package/lib/services/musicGen/index.js +0 -26
- package/lib/services/musicGen/musicSearchFactory.service.d.ts +0 -14
- package/lib/services/musicGen/musicSearchFactory.service.d.ts.map +0 -1
- package/lib/services/musicGen/musicSearchFactory.service.js +0 -59
- package/lib/services/musicGen/providers/curated.service.d.ts +0 -24
- package/lib/services/musicGen/providers/curated.service.d.ts.map +0 -1
- package/lib/services/musicGen/providers/curated.service.js +0 -173
- package/lib/services/musicGen/providers/jamendo.service.d.ts +0 -8
- package/lib/services/musicGen/providers/jamendo.service.d.ts.map +0 -1
- package/lib/services/musicGen/providers/jamendo.service.js +0 -113
- package/lib/services/musicGen/providers/mubert.service.d.ts +0 -10
- package/lib/services/musicGen/providers/mubert.service.d.ts.map +0 -1
- package/lib/services/musicGen/providers/mubert.service.js +0 -128
- package/lib/services/musicGen/types.d.ts +0 -46
- package/lib/services/musicGen/types.d.ts.map +0 -1
- package/lib/services/musicGen/types.js +0 -10
- package/lib/services/notification.service.d.ts +0 -22
- package/lib/services/notification.service.d.ts.map +0 -1
- package/lib/services/notification.service.js +0 -76
- package/lib/services/rateLimiter/distributedRateLimiter.service.d.ts +0 -78
- package/lib/services/rateLimiter/distributedRateLimiter.service.d.ts.map +0 -1
- package/lib/services/rateLimiter/distributedRateLimiter.service.js +0 -269
- package/lib/services/rateLimiter/index.d.ts +0 -2
- package/lib/services/rateLimiter/index.d.ts.map +0 -1
- package/lib/services/rateLimiter/index.js +0 -17
- package/lib/services/redisOptions.d.ts +0 -22
- package/lib/services/redisOptions.d.ts.map +0 -1
- package/lib/services/redisOptions.js +0 -51
- package/lib/services/tts/providers/minimax.service.d.ts +0 -14
- package/lib/services/tts/providers/minimax.service.d.ts.map +0 -1
- package/lib/services/tts/providers/minimax.service.js +0 -78
- package/lib/services/tts/providers/openai.service.d.ts +0 -14
- package/lib/services/tts/providers/openai.service.d.ts.map +0 -1
- package/lib/services/tts/providers/openai.service.js +0 -73
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchStockTool = void 0;
|
|
4
|
-
exports._clearStockDedupForTesting = _clearStockDedupForTesting;
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
const logger_1 = require("../../../utils/logger");
|
|
7
|
-
const pexels_service_1 = require("../../aiGen/providers/pexels/pexels.service");
|
|
8
|
-
const pixabay_service_1 = require("../../aiGen/providers/pixabay/pixabay.service");
|
|
9
|
-
const unsplash_service_1 = require("../../aiGen/providers/unsplash/unsplash.service");
|
|
10
|
-
const assetCache_service_1 = require("../../assetCache.service");
|
|
11
|
-
const toolRegistry_1 = require("../toolRegistry");
|
|
12
|
-
/**
|
|
13
|
-
* Persistent stock-search cache. Pexels is free but slow (~300–800ms) and
|
|
14
|
-
* rate-limited; bulk runs (100 variants of one template) hammer identical
|
|
15
|
-
* queries. A 30-min TTL is safe — Pexels' library moves slowly enough that
|
|
16
|
-
* fresher results aren't worth the extra hops, and any agent run completes
|
|
17
|
-
* well within the window. Persistent (Firestore) so cache survives across
|
|
18
|
-
* worker instances and restarts — in-process maps were per-pod only and
|
|
19
|
-
* useless under autoscale.
|
|
20
|
-
*/
|
|
21
|
-
const SEARCH_CACHE_TTL_MS = 30 * 60 * 1000;
|
|
22
|
-
/**
|
|
23
|
-
* Per-provider top-K we ask each provider for AND inspect during de-dup. The
|
|
24
|
-
* symptom we're fixing: when two scenes have semantically-similar queries
|
|
25
|
-
* (e.g. "sky violet" vs "violet science") Pexels returns the same #1 hit for
|
|
26
|
-
* both, and the stitched video shows the same 8s clip twice. By pulling 5
|
|
27
|
-
* candidates per provider we have headroom to skip already-used URLs before
|
|
28
|
-
* falling to the next provider in the cascade.
|
|
29
|
-
*/
|
|
30
|
-
const PROVIDER_TOP_K = 5;
|
|
31
|
-
/**
|
|
32
|
-
* Cross-scene de-dup state — keyed by agent run id, holds every visual URL the
|
|
33
|
-
* cascade has already handed out within that run. The Set is mutated as scenes
|
|
34
|
-
* pick candidates and consulted on every subsequent pick so two scenes in the
|
|
35
|
-
* same run never get the same URL when an unused alternative exists.
|
|
36
|
-
*
|
|
37
|
-
* In-memory (per-pod) is fine: the executor runs a single agent run within a
|
|
38
|
-
* single worker process, so all of its scene calls hit the same Map. We
|
|
39
|
-
* deliberately do NOT persist across pods — different runs are independent,
|
|
40
|
-
* and a single agent run does not migrate workers mid-flight.
|
|
41
|
-
*/
|
|
42
|
-
const RUN_DEDUP_TTL_MS = 30 * 60 * 1000;
|
|
43
|
-
const runUsedUrls = new Map();
|
|
44
|
-
/**
|
|
45
|
-
* Lazy GC: every time we touch the map, drop entries older than the TTL. Runs
|
|
46
|
-
* complete in minutes, so the map should stay tiny — this is belt-and-braces
|
|
47
|
-
* for crashed runs that never explicitly clear their entry.
|
|
48
|
-
*/
|
|
49
|
-
function pruneRunDedup(now) {
|
|
50
|
-
for (const [runId, entry] of runUsedUrls) {
|
|
51
|
-
if (now - entry.createdAt > RUN_DEDUP_TTL_MS) {
|
|
52
|
-
runUsedUrls.delete(runId);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function getOrCreateUsedSet(runId) {
|
|
57
|
-
const now = Date.now();
|
|
58
|
-
pruneRunDedup(now);
|
|
59
|
-
let entry = runUsedUrls.get(runId);
|
|
60
|
-
if (!entry) {
|
|
61
|
-
entry = { urls: new Set(), createdAt: now };
|
|
62
|
-
runUsedUrls.set(runId, entry);
|
|
63
|
-
}
|
|
64
|
-
return entry.urls;
|
|
65
|
-
}
|
|
66
|
-
/** Test-only: clear all per-run dedup state. */
|
|
67
|
-
function _clearStockDedupForTesting() {
|
|
68
|
-
runUsedUrls.clear();
|
|
69
|
-
}
|
|
70
|
-
const InputSchema = zod_1.z.object({
|
|
71
|
-
query: zod_1.z
|
|
72
|
-
.string()
|
|
73
|
-
.min(1)
|
|
74
|
-
.describe("Plain-English search terms. Be specific — 'cinematic golden-hour ocean cliff drone' beats 'ocean'."),
|
|
75
|
-
kind: zod_1.z
|
|
76
|
-
.enum(["video", "image"])
|
|
77
|
-
.describe("Asset kind. Music search is not yet supported."),
|
|
78
|
-
aspectRatio: zod_1.z
|
|
79
|
-
.enum(["9:16", "1:1", "4:5", "16:9"])
|
|
80
|
-
.optional()
|
|
81
|
-
.describe("Target aspect for filtering by orientation."),
|
|
82
|
-
minDurationSec: zod_1.z.number().positive().optional(),
|
|
83
|
-
maxDurationSec: zod_1.z.number().positive().optional(),
|
|
84
|
-
perPage: zod_1.z
|
|
85
|
-
.number()
|
|
86
|
-
.int()
|
|
87
|
-
.min(1)
|
|
88
|
-
.max(80)
|
|
89
|
-
.default(15)
|
|
90
|
-
.describe("Page size; capped at 80."),
|
|
91
|
-
});
|
|
92
|
-
const OutputSchema = zod_1.z.object({
|
|
93
|
-
assets: zod_1.z.array(zod_1.z.object({
|
|
94
|
-
id: zod_1.z.string(),
|
|
95
|
-
url: zod_1.z.string().url(),
|
|
96
|
-
thumbnailUrl: zod_1.z.string().url().optional(),
|
|
97
|
-
width: zod_1.z.number().optional(),
|
|
98
|
-
height: zod_1.z.number().optional(),
|
|
99
|
-
durationSec: zod_1.z.number().optional(),
|
|
100
|
-
source: zod_1.z.string(),
|
|
101
|
-
attribution: zod_1.z
|
|
102
|
-
.object({ name: zod_1.z.string(), url: zod_1.z.string().url().optional() })
|
|
103
|
-
.optional(),
|
|
104
|
-
trackingUrl: zod_1.z
|
|
105
|
-
.string()
|
|
106
|
-
.url()
|
|
107
|
-
.optional()
|
|
108
|
-
.describe("Provider-required download-tracking endpoint. Render path must GET it when this asset is committed to the final video (Unsplash ToS)."),
|
|
109
|
-
})),
|
|
110
|
-
totalAvailable: zod_1.z.number().optional(),
|
|
111
|
-
/**
|
|
112
|
-
* Ordered list of provider names the cascade actually attempted (whether
|
|
113
|
-
* skipped, errored, or succeeded). Mirrored into SceneAssetResult so
|
|
114
|
-
* post-mortems can see "Pexels was tried but rate-limited, Pixabay served".
|
|
115
|
-
*
|
|
116
|
-
* Annotated entries the cascade may add:
|
|
117
|
-
* "<name>" — provider succeeded with an un-used pick
|
|
118
|
-
* "<name>:dedup-skipped:<n>" — provider returned candidates but all <n>
|
|
119
|
-
* inspected were already used this run
|
|
120
|
-
* "<name>:empty" — provider returned 0 results
|
|
121
|
-
* "<name>:error" — provider threw
|
|
122
|
-
* "dedup-exhausted-accepted-repeat" — every provider's top-K was used;
|
|
123
|
-
* we accepted a repeat to avoid a hard
|
|
124
|
-
* failure (logged warn separately)
|
|
125
|
-
*/
|
|
126
|
-
attemptedProviders: zod_1.z.array(zod_1.z.string()).optional(),
|
|
127
|
-
});
|
|
128
|
-
function buildProviderChain(kind) {
|
|
129
|
-
const pexels = new pexels_service_1.PexelsProviderService();
|
|
130
|
-
const pixabay = new pixabay_service_1.PixabayProviderService();
|
|
131
|
-
const unsplash = new unsplash_service_1.UnsplashProviderService();
|
|
132
|
-
const chain = [
|
|
133
|
-
{
|
|
134
|
-
name: "pexels",
|
|
135
|
-
available: () => Boolean(process.env.PEXELS_API_KEY),
|
|
136
|
-
supports: () => true, // images + videos
|
|
137
|
-
search: (p) => pexels.searchStock(p),
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
name: "pixabay",
|
|
141
|
-
available: () => Boolean(process.env.PIXABAY_API_KEY),
|
|
142
|
-
supports: () => true, // images + videos
|
|
143
|
-
search: (p) => pixabay.searchStock(p),
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
name: "unsplash",
|
|
147
|
-
available: () => Boolean(process.env.UNSPLASH_ACCESS_KEY),
|
|
148
|
-
supports: (k) => k === "image", // photos-only
|
|
149
|
-
search: (p) => unsplash.searchStock(p),
|
|
150
|
-
},
|
|
151
|
-
];
|
|
152
|
-
return chain.filter((link) => link.supports(kind));
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Wrap a provider call with the Firestore cache lookup. We cache the FULL
|
|
156
|
-
* top-K candidate list per (provider, query, params) — not just the chosen
|
|
157
|
-
* URL — so a later scene with the same query but already-used #1 can still
|
|
158
|
-
* pull #2/#3/... from cache without re-hitting the API.
|
|
159
|
-
*/
|
|
160
|
-
async function searchProviderWithCache(link, params) {
|
|
161
|
-
const cacheParts = {
|
|
162
|
-
provider: link.name,
|
|
163
|
-
kind: "stock-search",
|
|
164
|
-
input: {
|
|
165
|
-
query: params.query,
|
|
166
|
-
kind: params.kind,
|
|
167
|
-
aspectRatio: params.aspectRatio,
|
|
168
|
-
minDurationSec: params.minDurationSec,
|
|
169
|
-
maxDurationSec: params.maxDurationSec,
|
|
170
|
-
perPage: params.perPage,
|
|
171
|
-
},
|
|
172
|
-
};
|
|
173
|
-
const hit = await assetCache_service_1.RawAssetCacheService.lookup(cacheParts);
|
|
174
|
-
if (hit)
|
|
175
|
-
return hit;
|
|
176
|
-
const fresh = await link.search(params);
|
|
177
|
-
if (fresh.assets.length > 0) {
|
|
178
|
-
void assetCache_service_1.RawAssetCacheService.store(cacheParts, fresh, {
|
|
179
|
-
ttlMs: SEARCH_CACHE_TTL_MS,
|
|
180
|
-
}).catch(() => undefined);
|
|
181
|
-
}
|
|
182
|
-
return fresh;
|
|
183
|
-
}
|
|
184
|
-
exports.searchStockTool = {
|
|
185
|
-
name: "search_stock",
|
|
186
|
-
description: [
|
|
187
|
-
"Search free stock video (Pexels → Pixabay) or image (Pexels → Pixabay → Unsplash)",
|
|
188
|
-
"footage. Tries each provider in order; if one is misconfigured / rate-limited /",
|
|
189
|
-
"returns zero results, falls through to the next so the agent always gets a usable",
|
|
190
|
-
"candidate when one exists somewhere.",
|
|
191
|
-
"Use when the scene needs filler / b-roll / generic visual context that doesn't",
|
|
192
|
-
"require AI generation — this is the cheapest option (T0 tier, ~free).",
|
|
193
|
-
"Do NOT use for: hero shots, product reveals, or branded subjects (use generate_image",
|
|
194
|
-
"or generate_video instead).",
|
|
195
|
-
"Examples:",
|
|
196
|
-
' { query: "person typing on laptop close-up", kind: "video", aspectRatio: "9:16" }',
|
|
197
|
-
' { query: "rolling green hills sunset", kind: "image", aspectRatio: "16:9" }',
|
|
198
|
-
].join(" "),
|
|
199
|
-
inputSchema: InputSchema,
|
|
200
|
-
outputSchema: OutputSchema,
|
|
201
|
-
estimateCost: async () => 0,
|
|
202
|
-
handler: async (input, ctx) => {
|
|
203
|
-
const providers = buildProviderChain(input.kind);
|
|
204
|
-
const attemptedProviders = [];
|
|
205
|
-
const usedUrls = getOrCreateUsedSet(ctx.agentRunId);
|
|
206
|
-
// Always ask each provider for at least PROVIDER_TOP_K candidates so we
|
|
207
|
-
// have room to skip used URLs without paging again. Honour the caller's
|
|
208
|
-
// explicit perPage if it's larger (planner sometimes wants 15 for variety).
|
|
209
|
-
const perPage = Math.max(input.perPage ?? PROVIDER_TOP_K, PROVIDER_TOP_K);
|
|
210
|
-
const searchParams = {
|
|
211
|
-
query: input.query,
|
|
212
|
-
kind: input.kind,
|
|
213
|
-
aspectRatio: input.aspectRatio,
|
|
214
|
-
minDurationSec: input.minDurationSec,
|
|
215
|
-
maxDurationSec: input.maxDurationSec,
|
|
216
|
-
perPage,
|
|
217
|
-
};
|
|
218
|
-
// Track the first non-empty candidate we saw, so if EVERY provider's
|
|
219
|
-
// top-K is already used we can fall back to a repeat rather than hard-fail.
|
|
220
|
-
// "Repeat is better than no scene" is the explicit product call.
|
|
221
|
-
let firstSeenCandidate = null;
|
|
222
|
-
for (const link of providers) {
|
|
223
|
-
if (!link.available()) {
|
|
224
|
-
// Skip silently — keep the log so ops can spot a misconfigured deploy
|
|
225
|
-
// ("why is the cascade always landing on Unsplash?").
|
|
226
|
-
logger_1.logger.info(`search_stock: skipping ${link.name} — env key missing`, { provider: link.name, kind: input.kind });
|
|
227
|
-
continue;
|
|
228
|
-
}
|
|
229
|
-
let result;
|
|
230
|
-
try {
|
|
231
|
-
result = await searchProviderWithCache(link, searchParams);
|
|
232
|
-
}
|
|
233
|
-
catch (err) {
|
|
234
|
-
// Log + continue to the next provider. The cascade exhausting is the
|
|
235
|
-
// only hard failure; an individual provider erroring is normal (rate
|
|
236
|
-
// limit, timeout, transient 5xx).
|
|
237
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
238
|
-
logger_1.logger.warn(`search_stock: ${link.name} threw, falling through`, {
|
|
239
|
-
provider: link.name,
|
|
240
|
-
query: input.query,
|
|
241
|
-
kind: input.kind,
|
|
242
|
-
error: message,
|
|
243
|
-
});
|
|
244
|
-
attemptedProviders.push(`${link.name}:error`);
|
|
245
|
-
continue;
|
|
246
|
-
}
|
|
247
|
-
if (result.assets.length === 0) {
|
|
248
|
-
logger_1.logger.info(`search_stock: ${link.name} returned 0 results, falling through`, { provider: link.name, query: input.query, kind: input.kind });
|
|
249
|
-
attemptedProviders.push(`${link.name}:empty`);
|
|
250
|
-
continue;
|
|
251
|
-
}
|
|
252
|
-
// Inspect at most PROVIDER_TOP_K of this provider's candidates.
|
|
253
|
-
const candidates = result.assets.slice(0, PROVIDER_TOP_K);
|
|
254
|
-
// Remember the very first candidate the cascade saw, in case every
|
|
255
|
-
// provider gets dedup-skipped and we have to accept a repeat.
|
|
256
|
-
if (!firstSeenCandidate) {
|
|
257
|
-
firstSeenCandidate = {
|
|
258
|
-
asset: candidates[0],
|
|
259
|
-
totalAvailable: result.totalAvailable,
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
const pick = candidates.find((a) => !usedUrls.has(a.url));
|
|
263
|
-
if (pick) {
|
|
264
|
-
usedUrls.add(pick.url);
|
|
265
|
-
attemptedProviders.push(link.name);
|
|
266
|
-
return {
|
|
267
|
-
assets: [pick],
|
|
268
|
-
totalAvailable: result.totalAvailable,
|
|
269
|
-
attemptedProviders,
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
// All top-K from this provider were already used this run. Annotate +
|
|
273
|
-
// fall through to the next provider.
|
|
274
|
-
logger_1.logger.info(`search_stock: ${link.name} top-${candidates.length} all already used this run, falling through`, {
|
|
275
|
-
provider: link.name,
|
|
276
|
-
query: input.query,
|
|
277
|
-
kind: input.kind,
|
|
278
|
-
agentRunId: ctx.agentRunId,
|
|
279
|
-
dedupSkipped: candidates.length,
|
|
280
|
-
});
|
|
281
|
-
attemptedProviders.push(`${link.name}:dedup-skipped:${candidates.length}`);
|
|
282
|
-
}
|
|
283
|
-
// Every provider was either unavailable, errored, empty, or dedup-skipped.
|
|
284
|
-
// If we saw at least one candidate anywhere, accept that repeat rather
|
|
285
|
-
// than fail the scene — the product call is "duplicate visual beats a
|
|
286
|
-
// missing scene". Surface the situation loudly so ops can audit.
|
|
287
|
-
if (firstSeenCandidate) {
|
|
288
|
-
logger_1.logger.warn("search_stock: dedup exhausted across cascade — accepting a repeat", {
|
|
289
|
-
query: input.query,
|
|
290
|
-
kind: input.kind,
|
|
291
|
-
agentRunId: ctx.agentRunId,
|
|
292
|
-
attemptedProviders,
|
|
293
|
-
repeatedUrl: firstSeenCandidate.asset.url,
|
|
294
|
-
});
|
|
295
|
-
// Don't add to usedUrls — it's already there by definition, and the
|
|
296
|
-
// bookkeeping invariant is "every URL handed out has been added once".
|
|
297
|
-
attemptedProviders.push("dedup-exhausted-accepted-repeat");
|
|
298
|
-
return {
|
|
299
|
-
assets: [firstSeenCandidate.asset],
|
|
300
|
-
totalAvailable: firstSeenCandidate.totalAvailable,
|
|
301
|
-
attemptedProviders,
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
// Truly nothing — every provider was unavailable / errored / empty. Return
|
|
305
|
-
// an empty result so the executor can raise NO_STOCK_RESULTS with full
|
|
306
|
-
// attemptedProviders context.
|
|
307
|
-
return {
|
|
308
|
-
assets: [],
|
|
309
|
-
totalAvailable: 0,
|
|
310
|
-
attemptedProviders,
|
|
311
|
-
};
|
|
312
|
-
},
|
|
313
|
-
};
|
|
314
|
-
(0, toolRegistry_1.registerTool)(exports.searchStockTool);
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { ToolDefinition } from "../toolRegistry";
|
|
3
|
-
/**
|
|
4
|
-
* Per-user asset library search — massive cost saver and consistency boost
|
|
5
|
-
* for serial creators. Looks across previously generated images, voiceovers,
|
|
6
|
-
* stock pulls, and uploads owned by the requesting user.
|
|
7
|
-
*
|
|
8
|
-
* The actual library backing (Firestore + GCS index, vector embeddings for
|
|
9
|
-
* semantic search) is host-side; tool layer accepts an injected searcher.
|
|
10
|
-
*/
|
|
11
|
-
export interface UserLibraryAsset {
|
|
12
|
-
id: string;
|
|
13
|
-
kind: "image" | "video" | "audio" | "stock-image" | "stock-video";
|
|
14
|
-
url: string;
|
|
15
|
-
prompt?: string;
|
|
16
|
-
width?: number;
|
|
17
|
-
height?: number;
|
|
18
|
-
durationMs?: number;
|
|
19
|
-
createdAt: string;
|
|
20
|
-
}
|
|
21
|
-
export type UserLibrarySearchFn = (params: {
|
|
22
|
-
userId: string;
|
|
23
|
-
query: string;
|
|
24
|
-
kind?: UserLibraryAsset["kind"];
|
|
25
|
-
limit: number;
|
|
26
|
-
}) => Promise<UserLibraryAsset[]>;
|
|
27
|
-
export declare function setUserLibrarySearch(fn: UserLibrarySearchFn): void;
|
|
28
|
-
declare const InputSchema: z.ZodObject<{
|
|
29
|
-
query: z.ZodString;
|
|
30
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
31
|
-
audio: "audio";
|
|
32
|
-
image: "image";
|
|
33
|
-
video: "video";
|
|
34
|
-
"stock-video": "stock-video";
|
|
35
|
-
"stock-image": "stock-image";
|
|
36
|
-
}>>;
|
|
37
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
38
|
-
}, z.core.$strip>;
|
|
39
|
-
declare const OutputSchema: z.ZodObject<{
|
|
40
|
-
assets: z.ZodArray<z.ZodObject<{
|
|
41
|
-
id: z.ZodString;
|
|
42
|
-
kind: z.ZodEnum<{
|
|
43
|
-
audio: "audio";
|
|
44
|
-
image: "image";
|
|
45
|
-
video: "video";
|
|
46
|
-
"stock-video": "stock-video";
|
|
47
|
-
"stock-image": "stock-image";
|
|
48
|
-
}>;
|
|
49
|
-
url: z.ZodString;
|
|
50
|
-
prompt: z.ZodOptional<z.ZodString>;
|
|
51
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
52
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
53
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
54
|
-
createdAt: z.ZodString;
|
|
55
|
-
}, z.core.$strip>>;
|
|
56
|
-
}, z.core.$strip>;
|
|
57
|
-
export declare const searchUserLibraryTool: ToolDefinition<typeof InputSchema, typeof OutputSchema>;
|
|
58
|
-
export {};
|
|
59
|
-
//# sourceMappingURL=searchUserLibrary.tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"searchUserLibrary.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/searchUserLibrary.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;;;;GAOG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,aAAa,CAAC;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;AAGlC,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,mBAAmB,GAAG,IAAI,CAElE;AAED,QAAA,MAAM,WAAW;;;;;;;;;;iBASf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;iBAahB,CAAC;AAEH,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAChD,OAAO,WAAW,EAClB,OAAO,YAAY,CA2BpB,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchUserLibraryTool = void 0;
|
|
4
|
-
exports.setUserLibrarySearch = setUserLibrarySearch;
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
const toolRegistry_1 = require("../toolRegistry");
|
|
7
|
-
let injectedSearch = null;
|
|
8
|
-
function setUserLibrarySearch(fn) {
|
|
9
|
-
injectedSearch = fn;
|
|
10
|
-
}
|
|
11
|
-
const InputSchema = zod_1.z.object({
|
|
12
|
-
query: zod_1.z
|
|
13
|
-
.string()
|
|
14
|
-
.min(1)
|
|
15
|
-
.describe("Free-text query — semantic match against asset prompts and tags."),
|
|
16
|
-
kind: zod_1.z
|
|
17
|
-
.enum(["image", "video", "audio", "stock-image", "stock-video"])
|
|
18
|
-
.optional(),
|
|
19
|
-
limit: zod_1.z.number().int().min(1).max(20).default(8),
|
|
20
|
-
});
|
|
21
|
-
const OutputSchema = zod_1.z.object({
|
|
22
|
-
assets: zod_1.z.array(zod_1.z.object({
|
|
23
|
-
id: zod_1.z.string(),
|
|
24
|
-
kind: zod_1.z.enum(["image", "video", "audio", "stock-image", "stock-video"]),
|
|
25
|
-
url: zod_1.z.string().url(),
|
|
26
|
-
prompt: zod_1.z.string().optional(),
|
|
27
|
-
width: zod_1.z.number().optional(),
|
|
28
|
-
height: zod_1.z.number().optional(),
|
|
29
|
-
durationMs: zod_1.z.number().optional(),
|
|
30
|
-
createdAt: zod_1.z.string(),
|
|
31
|
-
})),
|
|
32
|
-
});
|
|
33
|
-
exports.searchUserLibraryTool = {
|
|
34
|
-
name: "search_user_library",
|
|
35
|
-
description: [
|
|
36
|
-
"Search the requesting user's previously-generated/uploaded assets before",
|
|
37
|
-
"spending credits to make a new one. Always try this BEFORE generate_image",
|
|
38
|
-
"or search_stock when the brief calls for something the user has likely",
|
|
39
|
-
"produced before (their product photos, recurring characters, brand b-roll).",
|
|
40
|
-
"Returns ranked candidates; the agent picks the best fit by prompt/durationMs/aspect.",
|
|
41
|
-
].join(" "),
|
|
42
|
-
inputSchema: InputSchema,
|
|
43
|
-
outputSchema: OutputSchema,
|
|
44
|
-
idempotent: true,
|
|
45
|
-
handler: async (input, ctx) => {
|
|
46
|
-
if (!injectedSearch) {
|
|
47
|
-
throw new Error("search_user_library: no searcher wired. Host must call setUserLibrarySearch() at boot.");
|
|
48
|
-
}
|
|
49
|
-
const assets = await injectedSearch({
|
|
50
|
-
userId: ctx.userId,
|
|
51
|
-
query: input.query,
|
|
52
|
-
kind: input.kind,
|
|
53
|
-
limit: input.limit,
|
|
54
|
-
});
|
|
55
|
-
return { assets };
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
(0, toolRegistry_1.registerTool)(exports.searchUserLibraryTool);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AG-28: TTS duration estimator.
|
|
3
|
-
*
|
|
4
|
-
* The planner has no idea how long the TTS engine will speak the line it just
|
|
5
|
-
* wrote, so it picks scene.durationMs based on visual pacing alone. When the
|
|
6
|
-
* VO turns out longer than the scene, the stitcher (or any video-bound mux)
|
|
7
|
-
* clips the voice mid-sentence — fatal for a UGC ad.
|
|
8
|
-
*
|
|
9
|
-
* This estimator gives the planner + executor a shared "how long will this
|
|
10
|
-
* speak?" math so both sides can budget around it BEFORE the TTS call. We
|
|
11
|
-
* deliberately err high (slower wpm) so we under-budget rather than over-
|
|
12
|
-
* budget — clipped audio is worse than slight dead-air.
|
|
13
|
-
*
|
|
14
|
-
* Calibration: ElevenLabs `eleven_multilingual_v2` at default speed reads
|
|
15
|
-
* conversational English at ~150-165 wpm. Slower-paced narration drops to
|
|
16
|
-
* ~120 wpm. We use 150 wpm as the default to match the casual/UGC voices
|
|
17
|
-
* the platform uses most.
|
|
18
|
-
*/
|
|
19
|
-
/** Returns a conservative estimate (ms) of how long a TTS engine will speak `text`. */
|
|
20
|
-
export declare function estimateTtsMs(text: string, wpm?: number): number;
|
|
21
|
-
/**
|
|
22
|
-
* Inverse: max VO words that comfortably fit in `durationMs` at default speed.
|
|
23
|
-
* Used by the planner-prompt math hint so the LLM knows how long a line can be
|
|
24
|
-
* for a given scene without having to compute the formula itself.
|
|
25
|
-
*/
|
|
26
|
-
export declare function maxVoWordsForMs(durationMs: number, wpm?: number): number;
|
|
27
|
-
export declare const TTS_DEFAULT_WPM = 150;
|
|
28
|
-
export declare const TTS_DEFAULT_WPS: number;
|
|
29
|
-
//# sourceMappingURL=ttsDuration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ttsDuration.d.ts","sourceRoot":"","sources":["../../../src/services/agent/ttsDuration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,uFAAuF;AACvF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAoB,GAAG,MAAM,CAkB7E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,GAAE,MAAoB,GAAG,MAAM,CAKrF;AAED,eAAO,MAAM,eAAe,MAAc,CAAC;AAC3C,eAAO,MAAM,eAAe,QAAc,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* AG-28: TTS duration estimator.
|
|
4
|
-
*
|
|
5
|
-
* The planner has no idea how long the TTS engine will speak the line it just
|
|
6
|
-
* wrote, so it picks scene.durationMs based on visual pacing alone. When the
|
|
7
|
-
* VO turns out longer than the scene, the stitcher (or any video-bound mux)
|
|
8
|
-
* clips the voice mid-sentence — fatal for a UGC ad.
|
|
9
|
-
*
|
|
10
|
-
* This estimator gives the planner + executor a shared "how long will this
|
|
11
|
-
* speak?" math so both sides can budget around it BEFORE the TTS call. We
|
|
12
|
-
* deliberately err high (slower wpm) so we under-budget rather than over-
|
|
13
|
-
* budget — clipped audio is worse than slight dead-air.
|
|
14
|
-
*
|
|
15
|
-
* Calibration: ElevenLabs `eleven_multilingual_v2` at default speed reads
|
|
16
|
-
* conversational English at ~150-165 wpm. Slower-paced narration drops to
|
|
17
|
-
* ~120 wpm. We use 150 wpm as the default to match the casual/UGC voices
|
|
18
|
-
* the platform uses most.
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.TTS_DEFAULT_WPS = exports.TTS_DEFAULT_WPM = void 0;
|
|
22
|
-
exports.estimateTtsMs = estimateTtsMs;
|
|
23
|
-
exports.maxVoWordsForMs = maxVoWordsForMs;
|
|
24
|
-
const DEFAULT_WPM = 150;
|
|
25
|
-
/** Words per second derived from default wpm. */
|
|
26
|
-
const DEFAULT_WPS = DEFAULT_WPM / 60;
|
|
27
|
-
/** Returns a conservative estimate (ms) of how long a TTS engine will speak `text`. */
|
|
28
|
-
function estimateTtsMs(text, wpm = DEFAULT_WPM) {
|
|
29
|
-
if (!text)
|
|
30
|
-
return 0;
|
|
31
|
-
const words = text
|
|
32
|
-
.trim()
|
|
33
|
-
.split(/\s+/)
|
|
34
|
-
.filter(Boolean).length;
|
|
35
|
-
if (words === 0)
|
|
36
|
-
return 0;
|
|
37
|
-
// Add per-clause pause budget: each comma/semicolon/em-dash adds ~150ms,
|
|
38
|
-
// each terminal punctuation (. ? !) adds ~250ms. These dominate short lines
|
|
39
|
-
// where the word count alone under-counts.
|
|
40
|
-
const punctPauseMs = (text.match(/[,;–—]/g)?.length ?? 0) * 150 +
|
|
41
|
-
(text.match(/[.?!]/g)?.length ?? 0) * 250;
|
|
42
|
-
const wps = wpm / 60;
|
|
43
|
-
const wordsMs = (words / wps) * 1000;
|
|
44
|
-
// Floor at 800ms — even one-syllable utterances ("Yes." "Wait.") need
|
|
45
|
-
// setup + decay time on real TTS.
|
|
46
|
-
return Math.max(800, Math.round(wordsMs + punctPauseMs));
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Inverse: max VO words that comfortably fit in `durationMs` at default speed.
|
|
50
|
-
* Used by the planner-prompt math hint so the LLM knows how long a line can be
|
|
51
|
-
* for a given scene without having to compute the formula itself.
|
|
52
|
-
*/
|
|
53
|
-
function maxVoWordsForMs(durationMs, wpm = DEFAULT_WPM) {
|
|
54
|
-
const wps = wpm / 60;
|
|
55
|
-
// Subtract a 250ms terminal-punctuation budget to be safe.
|
|
56
|
-
const usableMs = Math.max(0, durationMs - 250);
|
|
57
|
-
return Math.max(1, Math.floor((usableMs / 1000) * wps));
|
|
58
|
-
}
|
|
59
|
-
exports.TTS_DEFAULT_WPM = DEFAULT_WPM;
|
|
60
|
-
exports.TTS_DEFAULT_WPS = DEFAULT_WPS;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canonical camera-control schema. Translated per-provider by adapters that
|
|
3
|
-
* live alongside each provider's service. The set is the union of camera
|
|
4
|
-
* primitives across Kling (typed presets + vector), Runway (named presets +
|
|
5
|
-
* motion intensity), MiniMax Director (in-prompt commands), Seedance (in-prompt),
|
|
6
|
-
* and Pixverse V6 (lens-control prompt vocabulary).
|
|
7
|
-
*
|
|
8
|
-
* Providers that don't expose camera control (Veo, OpenAI, Wan T2V) ignore the
|
|
9
|
-
* field with a logged warning rather than throwing.
|
|
10
|
-
*/
|
|
11
|
-
export type CameraPreset = "static" | "pan_left" | "pan_right" | "tilt_up" | "tilt_down" | "zoom_in" | "zoom_out" | "dolly_in" | "dolly_out" | "orbit_left" | "orbit_right" | "roll_left" | "roll_right" | "tracking" | "handheld" | "push_in" | "pull_out";
|
|
12
|
-
/**
|
|
13
|
-
* Six-axis vector control (mirrors Kling's `camera_control.config` shape).
|
|
14
|
-
* Each axis is in [-10, 10]. Adapters that don't support fine-grained vector
|
|
15
|
-
* control fall back to the closest preset.
|
|
16
|
-
*/
|
|
17
|
-
export interface CameraVector {
|
|
18
|
-
horizontal?: number;
|
|
19
|
-
vertical?: number;
|
|
20
|
-
pan?: number;
|
|
21
|
-
tilt?: number;
|
|
22
|
-
roll?: number;
|
|
23
|
-
zoom?: number;
|
|
24
|
-
}
|
|
25
|
-
export interface CameraControl {
|
|
26
|
-
preset?: CameraPreset;
|
|
27
|
-
vector?: CameraVector;
|
|
28
|
-
/** 0..1 — strength of the camera move; provider-mapped. */
|
|
29
|
-
intensity?: number;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=cameraControl.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cameraControl.types.d.ts","sourceRoot":"","sources":["../../../../src/services/aiGen/canonicalAdapters/cameraControl.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,UAAU,GACV,WAAW,GACX,SAAS,GACT,WAAW,GACX,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,YAAY,GACZ,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,UAAU,GACV,SAAS,GACT,UAAU,CAAC;AAEf;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/aiGen/canonicalAdapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./cameraControl.types"), exports);
|
|
18
|
-
__exportStar(require("./multiShot.types"), exports);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canonical multi-shot schema. Per-provider adapters translate this into:
|
|
3
|
-
* Kling v3.0 → `multi_prompt[]` (per-shot prompts) + companion `shot_type`
|
|
4
|
-
* (v3.0 only — v2.x has no public multi-shot API)
|
|
5
|
-
* Seedance → concatenated prompt with "--- CUT ---" separators
|
|
6
|
-
* Pixverse → `generate_multi_clip_switch=true` + concatenated prompt (≤2 shots)
|
|
7
|
-
* others → throw UnsupportedCapabilityError (gated by IModelSchema.fields.multiShot)
|
|
8
|
-
*/
|
|
9
|
-
export interface Shot {
|
|
10
|
-
prompt: string;
|
|
11
|
-
/** Seconds. Sum of all shot durations should match the request `duration`. */
|
|
12
|
-
duration?: number;
|
|
13
|
-
/** Optional first-frame image for this shot (Kling supports per-shot start frames). */
|
|
14
|
-
startFrame?: string;
|
|
15
|
-
}
|
|
16
|
-
/** 1..6 shots. Providers enforce their own caps in the adapter. */
|
|
17
|
-
export type MultiShot = Shot[];
|
|
18
|
-
export declare class UnsupportedCapabilityError extends Error {
|
|
19
|
-
readonly capability: string;
|
|
20
|
-
readonly modelKey: string;
|
|
21
|
-
constructor(capability: string, modelKey: string);
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=multiShot.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multiShot.types.d.ts","sourceRoot":"","sources":["../../../../src/services/aiGen/canonicalAdapters/multiShot.types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,IAAI;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,mEAAmE;AACnE,MAAM,MAAM,SAAS,GAAG,IAAI,EAAE,CAAC;AAE/B,qBAAa,0BAA2B,SAAQ,KAAK;aAEjC,UAAU,EAAE,MAAM;aAClB,QAAQ,EAAE,MAAM;gBADhB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM;CAKnC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnsupportedCapabilityError = void 0;
|
|
4
|
-
class UnsupportedCapabilityError extends Error {
|
|
5
|
-
constructor(capability, modelKey) {
|
|
6
|
-
super(`Capability "${capability}" is not supported by model "${modelKey}".`);
|
|
7
|
-
this.capability = capability;
|
|
8
|
-
this.modelKey = modelKey;
|
|
9
|
-
this.name = "UnsupportedCapabilityError";
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.UnsupportedCapabilityError = UnsupportedCapabilityError;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BaseAiGenProviderService } from "../baseAiGenProvider.service";
|
|
2
|
-
import { CreditUsageParams, SfxGenerationParams, SfxGenerationResult } from "../types";
|
|
3
|
-
/**
|
|
4
|
-
* ElevenLabs aiGen provider — currently only sound-effects.
|
|
5
|
-
* (TTS lives in the separate `services/tts/` subsystem.)
|
|
6
|
-
*/
|
|
7
|
-
export declare class ElevenLabsAiGenService extends BaseAiGenProviderService {
|
|
8
|
-
private readonly baseUrl;
|
|
9
|
-
private readonly apiKey;
|
|
10
|
-
constructor();
|
|
11
|
-
/**
|
|
12
|
-
* ElevenLabs Sound Effects. Sync — POST /v1/sound-generation returns mp3 binary.
|
|
13
|
-
* Body: { text, duration_seconds?, prompt_influence?, loop? }
|
|
14
|
-
*/
|
|
15
|
-
generateSoundEffects(params: SfxGenerationParams): Promise<SfxGenerationResult>;
|
|
16
|
-
getCreditUsed({ modelKey, duration, multiClip }: CreditUsageParams): number;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=elevenlabs.service.d.ts.map
|