vidspotai-shared 1.0.68 → 1.0.69-dev.0
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 +63 -6
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +78 -9
- package/lib/globals/aiModels/index.d.ts +2 -30
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +7 -35
- 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 +194 -0
- package/lib/globals/aiModels/providers/bytedance.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/bytedance.js +19 -0
- package/lib/globals/aiModels/providers/elevenlabs.d.ts +14 -0
- package/lib/globals/aiModels/providers/elevenlabs.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/elevenlabs.js +29 -0
- package/lib/globals/aiModels/providers/google.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/google.js +150 -2
- package/lib/globals/aiModels/providers/kling.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/kling.js +280 -37
- package/lib/globals/aiModels/providers/minimax.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/minimax.js +76 -11
- package/lib/globals/aiModels/providers/openai.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/openai.js +90 -6
- package/lib/globals/aiModels/providers/pixverse.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/pixverse.js +111 -29
- 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/providers/runway.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/runway.js +64 -2
- package/lib/globals/aiModels/tierHelpers.d.ts +33 -0
- package/lib/globals/aiModels/tierHelpers.d.ts.map +1 -0
- package/lib/globals/aiModels/tierHelpers.js +109 -0
- package/lib/globals/aiModels/types.d.ts +20 -1
- package/lib/globals/aiModels/types.d.ts.map +1 -1
- package/lib/globals/ttsModels/index.d.ts +2 -0
- package/lib/globals/ttsModels/index.d.ts.map +1 -1
- package/lib/globals/ttsModels/index.js +9 -1
- 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 +12 -0
- package/lib/globals/ttsModels/providers/openai.d.ts.map +1 -0
- package/lib/globals/ttsModels/providers/openai.js +22 -0
- 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 +39 -4
- package/lib/globals/ttsModels/voices.d.ts.map +1 -1
- package/lib/globals/ttsModels/voices.js +273 -26
- package/lib/globals/types.d.ts +59 -1
- package/lib/globals/types.d.ts.map +1 -1
- package/lib/globals/types.js +81 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/models/agent.model.d.ts +357 -0
- package/lib/models/agent.model.d.ts.map +1 -0
- package/lib/models/agent.model.js +21 -0
- 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/image.model.d.ts +47 -0
- package/lib/models/image.model.d.ts.map +1 -0
- package/lib/models/image.model.js +2 -0
- package/lib/models/index.d.ts +6 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +6 -0
- package/lib/models/notification.model.d.ts +25 -0
- package/lib/models/notification.model.d.ts.map +1 -0
- package/lib/models/notification.model.js +2 -0
- package/lib/models/ref.model.d.ts +80 -0
- package/lib/models/ref.model.d.ts.map +1 -0
- package/lib/models/ref.model.js +13 -0
- package/lib/models/share.model.d.ts +29 -0
- package/lib/models/share.model.d.ts.map +1 -0
- package/lib/models/share.model.js +2 -0
- package/lib/models/user.model.d.ts +12 -1
- package/lib/models/user.model.d.ts.map +1 -1
- package/lib/models/video.model.d.ts +120 -8
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/models/video.model.js +10 -0
- 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/agentRunJob.schema.d.ts +105 -0
- package/lib/schemas/agentRunJob.schema.d.ts.map +1 -0
- package/lib/schemas/agentRunJob.schema.js +88 -0
- package/lib/schemas/brandKit.schema.d.ts +113 -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 +263 -0
- package/lib/schemas/brief.schema.d.ts.map +1 -0
- package/lib/schemas/brief.schema.js +157 -0
- package/lib/schemas/index.d.ts +7 -0
- package/lib/schemas/index.d.ts.map +1 -0
- package/lib/schemas/index.js +22 -0
- package/lib/schemas/project.schema.d.ts +1025 -0
- package/lib/schemas/project.schema.d.ts.map +1 -0
- package/lib/schemas/project.schema.js +256 -0
- package/lib/schemas/videoPlan.schema.d.ts +590 -0
- package/lib/schemas/videoPlan.schema.d.ts.map +1 -0
- package/lib/schemas/videoPlan.schema.js +412 -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/bibleBuilder.d.ts +43 -0
- package/lib/services/agent/bibleBuilder.d.ts.map +1 -0
- package/lib/services/agent/bibleBuilder.js +102 -0
- package/lib/services/agent/bibleImageVision.d.ts +45 -0
- package/lib/services/agent/bibleImageVision.d.ts.map +1 -0
- package/lib/services/agent/bibleImageVision.js +169 -0
- package/lib/services/agent/chatAgent.d.ts +79 -0
- package/lib/services/agent/chatAgent.d.ts.map +1 -0
- package/lib/services/agent/chatAgent.js +136 -0
- package/lib/services/agent/costPreflight.d.ts +61 -0
- package/lib/services/agent/costPreflight.d.ts.map +1 -0
- package/lib/services/agent/costPreflight.js +143 -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 +139 -0
- package/lib/services/agent/editClassifier.d.ts +262 -0
- package/lib/services/agent/editClassifier.d.ts.map +1 -0
- package/lib/services/agent/editClassifier.js +186 -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 +96 -0
- package/lib/services/agent/eval/recorder.d.ts +28 -0
- package/lib/services/agent/eval/recorder.d.ts.map +1 -0
- package/lib/services/agent/eval/recorder.js +100 -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 +230 -0
- package/lib/services/agent/eval/types.d.ts.map +1 -0
- package/lib/services/agent/eval/types.js +73 -0
- package/lib/services/agent/executor.d.ts +141 -0
- package/lib/services/agent/executor.d.ts.map +1 -0
- package/lib/services/agent/executor.js +561 -0
- package/lib/services/agent/globalActions.d.ts +49 -0
- package/lib/services/agent/globalActions.d.ts.map +1 -0
- package/lib/services/agent/globalActions.js +328 -0
- package/lib/services/agent/index.d.ts +38 -0
- package/lib/services/agent/index.d.ts.map +1 -0
- package/lib/services/agent/index.js +53 -0
- package/lib/services/agent/llmCaller.d.ts +144 -0
- package/lib/services/agent/llmCaller.d.ts.map +1 -0
- package/lib/services/agent/llmCaller.js +16 -0
- package/lib/services/agent/llmCallerAnthropic.d.ts +90 -0
- package/lib/services/agent/llmCallerAnthropic.d.ts.map +1 -0
- package/lib/services/agent/llmCallerAnthropic.js +255 -0
- package/lib/services/agent/llmCallerGateway.d.ts +61 -0
- package/lib/services/agent/llmCallerGateway.d.ts.map +1 -0
- package/lib/services/agent/llmCallerGateway.js +360 -0
- package/lib/services/agent/llmCallerRegistry.d.ts +6 -0
- package/lib/services/agent/llmCallerRegistry.d.ts.map +1 -0
- package/lib/services/agent/llmCallerRegistry.js +39 -0
- package/lib/services/agent/modelQualityNotes.d.ts +100 -0
- package/lib/services/agent/modelQualityNotes.d.ts.map +1 -0
- package/lib/services/agent/modelQualityNotes.js +248 -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 +65 -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 +109 -0
- package/lib/services/agent/overlayRenderer.d.ts +67 -0
- package/lib/services/agent/overlayRenderer.d.ts.map +1 -0
- package/lib/services/agent/overlayRenderer.js +253 -0
- package/lib/services/agent/perSceneCritic.d.ts +90 -0
- package/lib/services/agent/perSceneCritic.d.ts.map +1 -0
- package/lib/services/agent/perSceneCritic.js +125 -0
- package/lib/services/agent/personas.d.ts +78 -0
- package/lib/services/agent/personas.d.ts.map +1 -0
- package/lib/services/agent/personas.js +177 -0
- package/lib/services/agent/planDiff.d.ts +76 -0
- package/lib/services/agent/planDiff.d.ts.map +1 -0
- package/lib/services/agent/planDiff.js +182 -0
- package/lib/services/agent/planMutations.d.ts +46 -0
- package/lib/services/agent/planMutations.d.ts.map +1 -0
- package/lib/services/agent/planMutations.js +120 -0
- package/lib/services/agent/planner/Planner.d.ts +107 -0
- package/lib/services/agent/planner/Planner.d.ts.map +1 -0
- package/lib/services/agent/planner/Planner.js +591 -0
- package/lib/services/agent/planner/overlaySanity.d.ts +7 -0
- package/lib/services/agent/planner/overlaySanity.d.ts.map +1 -0
- package/lib/services/agent/planner/overlaySanity.js +86 -0
- package/lib/services/agent/planner/promptSections.d.ts +25 -0
- package/lib/services/agent/planner/promptSections.d.ts.map +1 -0
- package/lib/services/agent/planner/promptSections.js +174 -0
- package/lib/services/agent/planner/repair.d.ts +16 -0
- package/lib/services/agent/planner/repair.d.ts.map +1 -0
- package/lib/services/agent/planner/repair.js +51 -0
- package/lib/services/agent/planner/structuralRules.d.ts +10 -0
- package/lib/services/agent/planner/structuralRules.d.ts.map +1 -0
- package/lib/services/agent/planner/structuralRules.js +111 -0
- package/lib/services/agent/planner/validators.d.ts +65 -0
- package/lib/services/agent/planner/validators.d.ts.map +1 -0
- package/lib/services/agent/planner/validators.js +284 -0
- package/lib/services/agent/planner.d.ts +3 -0
- package/lib/services/agent/planner.d.ts.map +1 -0
- package/lib/services/agent/planner.js +14 -0
- package/lib/services/agent/providerFallback/chains.d.ts +100 -0
- package/lib/services/agent/providerFallback/chains.d.ts.map +1 -0
- package/lib/services/agent/providerFallback/chains.js +198 -0
- package/lib/services/agent/providerFallback/classifier.d.ts +36 -0
- package/lib/services/agent/providerFallback/classifier.d.ts.map +1 -0
- package/lib/services/agent/providerFallback/classifier.js +103 -0
- package/lib/services/agent/providerFallback/index.d.ts +4 -0
- package/lib/services/agent/providerFallback/index.d.ts.map +1 -0
- package/lib/services/agent/providerFallback/index.js +19 -0
- package/lib/services/agent/providerFallback/withFallback.d.ts +60 -0
- package/lib/services/agent/providerFallback/withFallback.d.ts.map +1 -0
- package/lib/services/agent/providerFallback/withFallback.js +93 -0
- package/lib/services/agent/providerTaskCache.d.ts +50 -0
- package/lib/services/agent/providerTaskCache.d.ts.map +1 -0
- package/lib/services/agent/providerTaskCache.js +98 -0
- package/lib/services/agent/qualityGate.d.ts +82 -0
- package/lib/services/agent/qualityGate.d.ts.map +1 -0
- package/lib/services/agent/qualityGate.js +232 -0
- package/lib/services/agent/referenceImageRenderer.d.ts +37 -0
- package/lib/services/agent/referenceImageRenderer.d.ts.map +1 -0
- package/lib/services/agent/referenceImageRenderer.js +92 -0
- package/lib/services/agent/regenCore.d.ts +60 -0
- package/lib/services/agent/regenCore.d.ts.map +1 -0
- package/lib/services/agent/regenCore.js +487 -0
- package/lib/services/agent/runHelpers.d.ts +44 -0
- package/lib/services/agent/runHelpers.d.ts.map +1 -0
- package/lib/services/agent/runHelpers.js +196 -0
- package/lib/services/agent/sceneLayoutVision.d.ts +90 -0
- package/lib/services/agent/sceneLayoutVision.d.ts.map +1 -0
- package/lib/services/agent/sceneLayoutVision.js +212 -0
- package/lib/services/agent/stitchedVideoCritic.d.ts +136 -0
- package/lib/services/agent/stitchedVideoCritic.d.ts.map +1 -0
- package/lib/services/agent/stitchedVideoCritic.gemini.d.ts +26 -0
- package/lib/services/agent/stitchedVideoCritic.gemini.d.ts.map +1 -0
- package/lib/services/agent/stitchedVideoCritic.gemini.js +198 -0
- package/lib/services/agent/stitchedVideoCritic.js +162 -0
- package/lib/services/agent/taskPoller.d.ts +65 -0
- package/lib/services/agent/taskPoller.d.ts.map +1 -0
- package/lib/services/agent/taskPoller.js +176 -0
- package/lib/services/agent/textOverlayStyles.d.ts +60 -0
- package/lib/services/agent/textOverlayStyles.d.ts.map +1 -0
- package/lib/services/agent/textOverlayStyles.js +174 -0
- package/lib/services/agent/toolRegistry.d.ts +73 -0
- package/lib/services/agent/toolRegistry.d.ts.map +1 -0
- package/lib/services/agent/toolRegistry.js +95 -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 +24 -0
- package/lib/services/agent/tools/animateImage.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/animateImage.tool.js +115 -0
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.d.ts +32 -0
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.js +135 -0
- package/lib/services/agent/tools/composeScene.tool.d.ts +978 -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 +352 -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 +143 -0
- package/lib/services/agent/tools/generateCaptions.tool.d.ts +42 -0
- package/lib/services/agent/tools/generateCaptions.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/generateCaptions.tool.js +196 -0
- package/lib/services/agent/tools/generateImage.tool.d.ts +74 -0
- package/lib/services/agent/tools/generateImage.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/generateImage.tool.js +206 -0
- package/lib/services/agent/tools/generateVideo.tool.d.ts +31 -0
- package/lib/services/agent/tools/generateVideo.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/generateVideo.tool.js +153 -0
- package/lib/services/agent/tools/generateVoiceover.tool.d.ts +44 -0
- package/lib/services/agent/tools/generateVoiceover.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/generateVoiceover.tool.js +206 -0
- package/lib/services/agent/tools/index.d.ts +20 -0
- package/lib/services/agent/tools/index.d.ts.map +1 -0
- package/lib/services/agent/tools/index.js +35 -0
- package/lib/services/agent/tools/planVideo.tool.d.ts +343 -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 +367 -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 +41 -0
- package/lib/services/agent/tools/searchStock.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/searchStock.tool.js +314 -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/agent/ttsDuration.d.ts +29 -0
- package/lib/services/agent/ttsDuration.d.ts.map +1 -0
- package/lib/services/agent/ttsDuration.js +60 -0
- package/lib/services/aiGen/aiGenFactory.service.d.ts +21 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +84 -21
- 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/helpers.d.ts.map +1 -1
- package/lib/services/aiGen/helpers.js +10 -0
- package/lib/services/aiGen/providers/alibaba/alibaba.d.ts +14 -3
- package/lib/services/aiGen/providers/alibaba/alibaba.d.ts.map +1 -1
- package/lib/services/aiGen/providers/alibaba/alibaba.js +155 -22
- package/lib/services/aiGen/providers/baseAiGenProvider.service.d.ts +22 -4
- package/lib/services/aiGen/providers/baseAiGenProvider.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/baseAiGenProvider.service.js +32 -0
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.js +13 -19
- 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 +102 -0
- package/lib/services/aiGen/providers/fal/falImage.service.d.ts +15 -0
- package/lib/services/aiGen/providers/fal/falImage.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/fal/falImage.service.js +141 -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/google/google.service.d.ts +11 -2
- package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/google.service.js +245 -28
- package/lib/services/aiGen/providers/index.d.ts +3 -0
- package/lib/services/aiGen/providers/index.d.ts.map +1 -1
- package/lib/services/aiGen/providers/index.js +3 -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/kling/index.d.ts +1 -0
- package/lib/services/aiGen/providers/kling/index.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/index.js +1 -0
- package/lib/services/aiGen/providers/kling/kling.service.d.ts +12 -1
- package/lib/services/aiGen/providers/kling/kling.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/kling.service.js +357 -26
- package/lib/services/aiGen/providers/kling/klingImage.service.d.ts +21 -0
- package/lib/services/aiGen/providers/kling/klingImage.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/kling/klingImage.service.js +208 -0
- package/lib/services/aiGen/providers/kling/types.d.ts +105 -0
- package/lib/services/aiGen/providers/kling/types.d.ts.map +1 -1
- package/lib/services/aiGen/providers/minimax/minimax.service.d.ts +15 -2
- package/lib/services/aiGen/providers/minimax/minimax.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/minimax/minimax.service.js +128 -5
- package/lib/services/aiGen/providers/minimax/types.d.ts +10 -1
- package/lib/services/aiGen/providers/minimax/types.d.ts.map +1 -1
- package/lib/services/aiGen/providers/openai/openai.service.d.ts +8 -2
- package/lib/services/aiGen/providers/openai/openai.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/openai/openai.service.js +184 -7
- 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/{azure → pexels}/index.js +1 -1
- 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 +150 -0
- package/lib/services/aiGen/providers/pixabay/index.d.ts +2 -0
- package/lib/services/aiGen/providers/pixabay/index.d.ts.map +1 -0
- package/lib/services/aiGen/providers/pixabay/index.js +17 -0
- package/lib/services/aiGen/providers/pixabay/pixabay.service.d.ts +12 -0
- package/lib/services/aiGen/providers/pixabay/pixabay.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/pixabay/pixabay.service.js +156 -0
- package/lib/services/aiGen/providers/pixverse/pixverse.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/pixverse/pixverse.service.js +125 -2
- 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/aiGen/providers/runway/runway.service.d.ts +12 -2
- package/lib/services/aiGen/providers/runway/runway.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/runway/runway.service.js +224 -21
- package/lib/services/aiGen/providers/types.d.ts +263 -6
- package/lib/services/aiGen/providers/types.d.ts.map +1 -1
- package/lib/services/aiGen/providers/unsplash/index.d.ts +2 -0
- package/lib/services/aiGen/providers/unsplash/index.d.ts.map +1 -0
- package/lib/services/aiGen/providers/unsplash/index.js +17 -0
- package/lib/services/aiGen/providers/unsplash/unsplash.service.d.ts +16 -0
- package/lib/services/aiGen/providers/unsplash/unsplash.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/unsplash/unsplash.service.js +131 -0
- package/lib/services/analytics.service.js +2 -4
- package/lib/services/apiUsageCounter.service.d.ts +20 -0
- package/lib/services/apiUsageCounter.service.d.ts.map +1 -0
- package/lib/services/apiUsageCounter.service.js +84 -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 +3 -0
- package/lib/services/asr/index.d.ts.map +1 -0
- package/lib/services/asr/index.js +18 -0
- package/lib/services/asr/whisper.service.d.ts +18 -0
- package/lib/services/asr/whisper.service.d.ts.map +1 -0
- package/lib/services/asr/whisper.service.js +151 -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 +109 -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 +140 -0
- package/lib/services/bullmq.service.d.ts +6 -1
- package/lib/services/bullmq.service.d.ts.map +1 -1
- package/lib/services/bullmq.service.js +62 -14
- package/lib/services/credit.service.d.ts.map +1 -1
- package/lib/services/credit.service.js +45 -7
- package/lib/services/credits/pricing.d.ts +58 -0
- package/lib/services/credits/pricing.d.ts.map +1 -0
- package/lib/services/credits/pricing.js +111 -0
- package/lib/services/editor/designToProject.d.ts +75 -0
- package/lib/services/editor/designToProject.d.ts.map +1 -0
- package/lib/services/editor/designToProject.js +295 -0
- package/lib/services/editor/planToProject.d.ts +84 -0
- package/lib/services/editor/planToProject.d.ts.map +1 -0
- package/lib/services/editor/planToProject.js +395 -0
- package/lib/services/editor/projectToDesign.d.ts +4 -0
- package/lib/services/editor/projectToDesign.d.ts.map +1 -0
- package/lib/services/editor/projectToDesign.js +186 -0
- package/lib/services/firestore.service.d.ts +17 -0
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +30 -0
- package/lib/services/gcp/index.d.ts +1 -0
- package/lib/services/gcp/index.d.ts.map +1 -1
- package/lib/services/gcp/index.js +1 -0
- package/lib/services/gcp/uploadAudioBuffer.d.ts +13 -0
- package/lib/services/gcp/uploadAudioBuffer.d.ts.map +1 -0
- package/lib/services/gcp/uploadAudioBuffer.js +28 -0
- package/lib/services/index.d.ts +13 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +13 -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 +24 -0
- package/lib/services/musicGen/providers/curated.service.d.ts.map +1 -0
- package/lib/services/musicGen/providers/curated.service.js +173 -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 +113 -0
- package/lib/services/musicGen/providers/mubert.service.d.ts +10 -0
- package/lib/services/musicGen/providers/mubert.service.d.ts.map +1 -0
- package/lib/services/musicGen/providers/mubert.service.js +128 -0
- package/lib/services/musicGen/types.d.ts +46 -0
- package/lib/services/musicGen/types.d.ts.map +1 -0
- package/lib/services/musicGen/types.js +10 -0
- package/lib/services/notification.service.d.ts +22 -0
- package/lib/services/notification.service.d.ts.map +1 -0
- package/lib/services/notification.service.js +76 -0
- package/lib/services/rateLimiter/distributedRateLimiter.service.d.ts +78 -0
- package/lib/services/rateLimiter/distributedRateLimiter.service.d.ts.map +1 -0
- package/lib/services/rateLimiter/distributedRateLimiter.service.js +269 -0
- package/lib/services/rateLimiter/index.d.ts +2 -0
- package/lib/services/rateLimiter/index.d.ts.map +1 -0
- package/lib/services/rateLimiter/index.js +17 -0
- package/lib/services/redis.service.d.ts +9 -0
- package/lib/services/redis.service.d.ts.map +1 -1
- package/lib/services/redis.service.js +20 -11
- package/lib/services/redisOptions.d.ts +22 -0
- package/lib/services/redisOptions.d.ts.map +1 -0
- package/lib/services/redisOptions.js +51 -0
- package/lib/services/tts/index.d.ts +2 -0
- package/lib/services/tts/index.d.ts.map +1 -1
- package/lib/services/tts/index.js +2 -0
- package/lib/services/tts/providers/elevenlabs.service.d.ts.map +1 -1
- package/lib/services/tts/providers/elevenlabs.service.js +91 -24
- 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 +73 -0
- package/lib/services/tts/ttsFactory.service.d.ts.map +1 -1
- package/lib/services/tts/ttsFactory.service.js +6 -0
- package/lib/services/tts/types.d.ts +33 -0
- package/lib/services/tts/types.d.ts.map +1 -1
- package/lib/utils/errors.d.ts +8 -0
- package/lib/utils/errors.d.ts.map +1 -1
- package/lib/utils/errors.js +8 -0
- package/lib/utils/helpers.d.ts +13 -0
- package/lib/utils/helpers.d.ts.map +1 -1
- package/lib/utils/helpers.js +48 -11
- package/lib/utils/logger.d.ts.map +1 -1
- package/lib/utils/logger.js +37 -1
- package/package.json +5 -1
- package/lib/services/aiGen/providers/azure/azure.service.d.ts +0 -14
- package/lib/services/aiGen/providers/azure/azure.service.d.ts.map +0 -1
- package/lib/services/aiGen/providers/azure/azure.service.js +0 -108
- package/lib/services/aiGen/providers/azure/index.d.ts +0 -2
- package/lib/services/aiGen/providers/azure/index.d.ts.map +0 -1
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VideoPlanSchema = exports.PlannerWarningSchema = exports.PlannedSceneSchema = exports.SceneLayoutSchema = exports.TextOverlaySchema = exports.TextBgStyleSchema = exports.TextAnimationSchema = exports.TextPositionSchema = exports.TextRoleSchema = exports.TransitionKindSchema = exports.SceneAssetStrategySchema = exports.AgentVisualBibleSchema = exports.BibleEntitySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const agentPersona_schema_1 = require("./agentPersona.schema");
|
|
6
|
+
const project_schema_1 = require("./project.schema");
|
|
7
|
+
/**
|
|
8
|
+
* VideoPlan — the planner LLM's structured output. Reviewed by the user as a
|
|
9
|
+
* storyboard BEFORE any generation spend. Once approved, the executor walks
|
|
10
|
+
* the scenes in order and runs the prescribed tools per scene.
|
|
11
|
+
*
|
|
12
|
+
* Validated against this Zod schema; if validation fails, the planner is
|
|
13
|
+
* retried up to N=2 with the validation errors fed back as correction context.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* AG-12 — Agent-side Visual Bible. The legacy non-agent flow has its own
|
|
17
|
+
* VisualBibleSchema in globals/types.ts; this is the agent-flavored variant
|
|
18
|
+
* that the planner threads through every scene prompt. Built by an LLM
|
|
19
|
+
* pre-pass (BibleBuilder) before plan(), persisted on the plan, and used to
|
|
20
|
+
* keep characters / objects / environment visually consistent across scenes.
|
|
21
|
+
*
|
|
22
|
+
* Entity IDs (CHAR_1, OBJ_1) are stable strings that scenes reference; the
|
|
23
|
+
* planner injects the full description verbatim whenever a scene's prompt
|
|
24
|
+
* mentions an id. AG-13 fills in optional `referenceImageUrl` for premium
|
|
25
|
+
* tier where we image-anchor identity (image-to-image / subject reference).
|
|
26
|
+
*/
|
|
27
|
+
exports.BibleEntitySchema = zod_1.z.object({
|
|
28
|
+
id: zod_1.z.string().regex(/^(CHAR|OBJ|ENV)_\d+$/, "id must be CHAR_<n>, OBJ_<n>, or ENV_<n>"),
|
|
29
|
+
name: zod_1.z.string().describe("Short label, e.g. 'Maya', 'amber dropper bottle'."),
|
|
30
|
+
description: zod_1.z
|
|
31
|
+
.string()
|
|
32
|
+
.describe("Verbatim visual description re-stated in every scene prompt referencing this entity. For characters: age, ethnicity, hair, build, wardrobe. For objects: shape, material, color, distinctive features. For environment: lighting, palette, era."),
|
|
33
|
+
/**
|
|
34
|
+
* AG-13 — pre-rendered reference image for this entity. Populated by the
|
|
35
|
+
* C2 pre-pass when consistencyTier >= "C2". Threaded as inputImageUrl /
|
|
36
|
+
* inputImageUrls on every scene's image-gen call where this id appears.
|
|
37
|
+
*/
|
|
38
|
+
referenceImageUrl: zod_1.z.string().url().optional(),
|
|
39
|
+
});
|
|
40
|
+
exports.AgentVisualBibleSchema = zod_1.z.object({
|
|
41
|
+
/** Recurring people / mascots / spokes-characters. */
|
|
42
|
+
characters: zod_1.z.array(exports.BibleEntitySchema).default([]),
|
|
43
|
+
/** Recurring physical objects (product, key prop). */
|
|
44
|
+
objects: zod_1.z.array(exports.BibleEntitySchema).default([]),
|
|
45
|
+
/** Recurring environment (palette, lighting, location). Usually 0 or 1 entry. */
|
|
46
|
+
environments: zod_1.z.array(exports.BibleEntitySchema).default([]),
|
|
47
|
+
/** Tier signal: "C0" none, "C1" description-only, "C2" reference-image anchored. */
|
|
48
|
+
consistencyTier: zod_1.z.enum(["C0", "C1", "C2"]).default("C1"),
|
|
49
|
+
});
|
|
50
|
+
exports.SceneAssetStrategySchema = zod_1.z.enum([
|
|
51
|
+
"stock-video",
|
|
52
|
+
"stock-image-ken-burns",
|
|
53
|
+
"ai-image-static",
|
|
54
|
+
"ai-image-motion",
|
|
55
|
+
"ai-image-to-video",
|
|
56
|
+
"ai-text-to-video",
|
|
57
|
+
"user-asset",
|
|
58
|
+
"talking-head-avatar",
|
|
59
|
+
]);
|
|
60
|
+
exports.TransitionKindSchema = zod_1.z.enum([
|
|
61
|
+
"none",
|
|
62
|
+
"cut",
|
|
63
|
+
"fade",
|
|
64
|
+
"crossfade",
|
|
65
|
+
"wipe",
|
|
66
|
+
"whipPan",
|
|
67
|
+
"dipToBlack",
|
|
68
|
+
"dipToWhite",
|
|
69
|
+
]);
|
|
70
|
+
/**
|
|
71
|
+
* AG-40 — text overlay role. Each role has a default style (font, size, position,
|
|
72
|
+
* color, animation) defined in `agent/textOverlayStyles.ts`. The planner picks
|
|
73
|
+
* the role per overlay; the stitcher resolves the role → ffmpeg drawtext args.
|
|
74
|
+
*
|
|
75
|
+
* - headline: big bold attention-grab line (top or center)
|
|
76
|
+
* - subheadline: secondary supporting line under a headline
|
|
77
|
+
* - body: multi-line explainer / feature copy (lower-third)
|
|
78
|
+
* - cta: call-to-action button-style text (bottom)
|
|
79
|
+
* - watermark: persistent brand mark across all scenes (corner)
|
|
80
|
+
* - disclaimer: fine-print legal / "results may vary" (bottom, small)
|
|
81
|
+
* - label: in-frame label for an object or person (anchored to frame area)
|
|
82
|
+
*/
|
|
83
|
+
exports.TextRoleSchema = zod_1.z.enum([
|
|
84
|
+
"headline",
|
|
85
|
+
"subheadline",
|
|
86
|
+
"body",
|
|
87
|
+
"cta",
|
|
88
|
+
"watermark",
|
|
89
|
+
"disclaimer",
|
|
90
|
+
"label",
|
|
91
|
+
]);
|
|
92
|
+
exports.TextPositionSchema = zod_1.z.enum([
|
|
93
|
+
"top",
|
|
94
|
+
"top-left",
|
|
95
|
+
"top-right",
|
|
96
|
+
"top-banner", // top 15%, full-width strip
|
|
97
|
+
"center",
|
|
98
|
+
"left-rail", // left 33%, vertically centered (product shots)
|
|
99
|
+
"lower-third",
|
|
100
|
+
"bottom",
|
|
101
|
+
"bottom-left",
|
|
102
|
+
"bottom-right",
|
|
103
|
+
"caption-strip", // bottom-pinned word-by-word captions (TikTok feel)
|
|
104
|
+
]);
|
|
105
|
+
exports.TextAnimationSchema = zod_1.z.enum([
|
|
106
|
+
"none",
|
|
107
|
+
"fade",
|
|
108
|
+
"pop",
|
|
109
|
+
"type",
|
|
110
|
+
"slide-up",
|
|
111
|
+
"word-pop", // each word pops in sequentially
|
|
112
|
+
"highlight-current", // active word highlighted, others dim (VO-aligned)
|
|
113
|
+
]);
|
|
114
|
+
/**
|
|
115
|
+
* Background treatment for text legibility against any underlying frame.
|
|
116
|
+
* Distinct from `bgColor` (the actual color hex) — `bgStyle` is the shape /
|
|
117
|
+
* decoration the renderer draws. `pill` and `bar` both honor `bgColor`;
|
|
118
|
+
* `shadow` and `outline` ignore it.
|
|
119
|
+
*/
|
|
120
|
+
exports.TextBgStyleSchema = zod_1.z.enum([
|
|
121
|
+
"none",
|
|
122
|
+
"shadow", // drop shadow behind glyphs (no fill)
|
|
123
|
+
"pill", // rounded-rect fill hugging the text bbox
|
|
124
|
+
"bar", // full-width edge-to-edge horizontal bar
|
|
125
|
+
"outline", // glyph stroke (no fill)
|
|
126
|
+
]);
|
|
127
|
+
/**
|
|
128
|
+
* AG-40: Per-overlay spec. Multiple overlays can live on one scene (e.g. a
|
|
129
|
+
* persistent watermark + a headline + a CTA pill on the closing scene). The
|
|
130
|
+
* role drives sensible defaults from textOverlayStyles.ts; explicit overrides
|
|
131
|
+
* below win when present. Use `persistFromScene` to carry an overlay across
|
|
132
|
+
* subsequent scenes (e.g. watermark set on scene 0 with persistFromScene=0 is
|
|
133
|
+
* burned onto every scene until another overlay with the same role replaces it).
|
|
134
|
+
*/
|
|
135
|
+
exports.TextOverlaySchema = zod_1.z.object({
|
|
136
|
+
text: zod_1.z.string().min(1).max(140),
|
|
137
|
+
role: exports.TextRoleSchema,
|
|
138
|
+
position: exports.TextPositionSchema.optional(),
|
|
139
|
+
/** "primary" gets stronger styling (larger, stroked, animated); "secondary" subdued. */
|
|
140
|
+
emphasis: zod_1.z.enum(["primary", "secondary"]).optional(),
|
|
141
|
+
/** Per-overlay style overrides — usually unnecessary because role defaults are good. */
|
|
142
|
+
font: zod_1.z.string().optional(),
|
|
143
|
+
fontSize: zod_1.z.union([zod_1.z.literal("auto"), zod_1.z.number().int().positive()]).optional(),
|
|
144
|
+
/**
|
|
145
|
+
* Alternative to `fontSize` expressed as % of frame height (2–20). Resolution-
|
|
146
|
+
* independent, so the same plan renders proportionally on 9:16 phone vs
|
|
147
|
+
* 16:9 desktop. When both are set, `fontSize` (px) wins.
|
|
148
|
+
*/
|
|
149
|
+
sizePct: zod_1.z.number().min(2).max(20).optional(),
|
|
150
|
+
weight: zod_1.z.enum(["regular", "medium", "bold", "black"]).optional(),
|
|
151
|
+
color: zod_1.z.string().optional(),
|
|
152
|
+
bgColor: zod_1.z.string().optional(),
|
|
153
|
+
/**
|
|
154
|
+
* Background decoration drawn behind the text for legibility. Distinct from
|
|
155
|
+
* `bgColor` (which is the fill hex used by `pill` / `bar`). Default driven by
|
|
156
|
+
* role + auto-contrast pass when omitted.
|
|
157
|
+
*/
|
|
158
|
+
bgStyle: exports.TextBgStyleSchema.optional(),
|
|
159
|
+
animation: exports.TextAnimationSchema.optional(),
|
|
160
|
+
/** Start/end times in ms within the scene; default = whole scene. */
|
|
161
|
+
startMs: zod_1.z.number().nonnegative().optional(),
|
|
162
|
+
endMs: zod_1.z.number().nonnegative().optional(),
|
|
163
|
+
/** If set, this overlay carries forward to subsequent scenes until replaced. */
|
|
164
|
+
persistAcrossScenes: zod_1.z.boolean().optional(),
|
|
165
|
+
});
|
|
166
|
+
/**
|
|
167
|
+
* Per-scene composition decision. Drives how the scene's visual asset fills
|
|
168
|
+
* (or doesn't fill) the target aspect ratio. Critical when source aspect ≠
|
|
169
|
+
* target aspect — without this the renderer just stretches, which destroys
|
|
170
|
+
* intent on horizontal stock on a 9:16 target (or vice-versa).
|
|
171
|
+
*
|
|
172
|
+
* `composition` is required when SceneLayout is present; the others are
|
|
173
|
+
* progressive enhancements. Planner picks via the layout decision table
|
|
174
|
+
* (source aspect × target aspect × content type from the vision pass).
|
|
175
|
+
*/
|
|
176
|
+
exports.SceneLayoutSchema = zod_1.z.object({
|
|
177
|
+
composition: zod_1.z.enum([
|
|
178
|
+
"full-bleed", // asset fills frame, crop excess (uses focalPoint)
|
|
179
|
+
"letterbox", // asset native ratio centered, bars top/bottom
|
|
180
|
+
"blur-fill", // asset native ratio centered, blurred copy fills bars
|
|
181
|
+
"split-top", // asset top 60%, solid/gradient bottom 40% (text area)
|
|
182
|
+
"split-bottom", // asset bottom 60%, solid/gradient top 40%
|
|
183
|
+
"pip-bottom-right", // asset 35% size, bottom-right corner; bg fill
|
|
184
|
+
]),
|
|
185
|
+
/**
|
|
186
|
+
* Asset's focal point — anchor when cropping (full-bleed) or composing
|
|
187
|
+
* (split / pip). Normalized 0–1 coords; (0.5, 0.5) = dead center. Driven
|
|
188
|
+
* by the vision pass on the scene's first frame; planner emits if known.
|
|
189
|
+
*/
|
|
190
|
+
focalPoint: zod_1.z
|
|
191
|
+
.object({
|
|
192
|
+
x: zod_1.z.number().min(0).max(1),
|
|
193
|
+
y: zod_1.z.number().min(0).max(1),
|
|
194
|
+
})
|
|
195
|
+
.optional(),
|
|
196
|
+
/**
|
|
197
|
+
* Background fill for compositions that reveal dead space (letterbox /
|
|
198
|
+
* split / pip). Renderer interprets brand-* via persona/brandKit colors.
|
|
199
|
+
* `blur-extend` reuses the asset's own pixels blurred — usually safest.
|
|
200
|
+
*/
|
|
201
|
+
backgroundFill: zod_1.z
|
|
202
|
+
.enum([
|
|
203
|
+
"black",
|
|
204
|
+
"white",
|
|
205
|
+
"brand-primary",
|
|
206
|
+
"brand-secondary",
|
|
207
|
+
"blur-extend",
|
|
208
|
+
"gradient",
|
|
209
|
+
])
|
|
210
|
+
.optional(),
|
|
211
|
+
});
|
|
212
|
+
exports.PlannedSceneSchema = zod_1.z.object({
|
|
213
|
+
sceneIndex: zod_1.z.number().int().nonnegative(),
|
|
214
|
+
/** Plain-English description of what this scene shows. */
|
|
215
|
+
intent: zod_1.z.string(),
|
|
216
|
+
/** Asset acquisition strategy for this scene. */
|
|
217
|
+
strategy: exports.SceneAssetStrategySchema,
|
|
218
|
+
/** Tier the planner picked for this scene; usually <= brief.tierBudget. */
|
|
219
|
+
tier: project_schema_1.TierSchema,
|
|
220
|
+
/** Provider key the planner suggests; executor may swap on rate-limit. */
|
|
221
|
+
preferredProvider: zod_1.z.string().optional(),
|
|
222
|
+
/** Suggested model key, if applicable. */
|
|
223
|
+
preferredModel: zod_1.z.string().optional(),
|
|
224
|
+
/** Visual prompt (for AI generation strategies) or stock query terms. */
|
|
225
|
+
prompt: zod_1.z.string(),
|
|
226
|
+
// AG-25: was `.positive()` (exclusiveMinimum: 0). LLM kept emitting `0` on
|
|
227
|
+
// medium-pacing briefs across 3 retries — strict-JSON `>0` is a weak signal.
|
|
228
|
+
// 500ms is a practical sub-floor (real provider floor is 2000ms, enforced by
|
|
229
|
+
// the per-scene capability validator); this just keeps the model honest.
|
|
230
|
+
durationMs: zod_1.z.number().min(500),
|
|
231
|
+
voiceoverLine: zod_1.z.string().optional(),
|
|
232
|
+
/**
|
|
233
|
+
* AG-44: per-scene voice delivery override. Tone can shift across the arc
|
|
234
|
+
* (frustrated → curious → excited), so a single global voiceStyle is too
|
|
235
|
+
* coarse. When present, executor passes this instead of plan.voiceStyle for
|
|
236
|
+
* just this scene's TTS call. Examples: "frustrated", "calm", "excited",
|
|
237
|
+
* "whispered", "authoritative". Adjective only; the executor maps to
|
|
238
|
+
* ElevenLabs voice_settings.
|
|
239
|
+
*/
|
|
240
|
+
voiceStyle: zod_1.z.string().optional(),
|
|
241
|
+
/**
|
|
242
|
+
* AG-40 legacy: a single bottom-center caption string. Kept for back-compat
|
|
243
|
+
* with traces / replay scripts. Prefer `overlays[]` for new plans — it lets
|
|
244
|
+
* you mix headline + watermark + CTA on the same scene with role-driven
|
|
245
|
+
* styling, animations, word-wrap, and persist-across-scenes.
|
|
246
|
+
*/
|
|
247
|
+
onScreenText: zod_1.z.string().optional(),
|
|
248
|
+
/**
|
|
249
|
+
* AG-40: Structured text overlays. When present, the stitcher uses these
|
|
250
|
+
* instead of `onScreenText`. Each entry carries a role (headline/cta/etc.)
|
|
251
|
+
* that the renderer maps to font/size/position/animation defaults. Up to
|
|
252
|
+
* 4 overlays per scene — beyond that gets visually noisy.
|
|
253
|
+
*/
|
|
254
|
+
overlays: zod_1.z.array(exports.TextOverlaySchema).max(4).optional(),
|
|
255
|
+
transitionIn: exports.TransitionKindSchema.default("cut"),
|
|
256
|
+
/** Up-front estimated credit cost for this scene. */
|
|
257
|
+
estimatedCredits: zod_1.z.number().nonnegative(),
|
|
258
|
+
/**
|
|
259
|
+
* Required only when strategy = "talking-head-avatar". URL of the presenter
|
|
260
|
+
* face still the avatar pipeline animates. Planner sources from
|
|
261
|
+
* brandKit.presenterFaceUrl; if absent, planner must NOT pick this strategy.
|
|
262
|
+
*/
|
|
263
|
+
avatarFaceUrl: zod_1.z.string().url().optional(),
|
|
264
|
+
/**
|
|
265
|
+
* AG-11 — character anchoring across scenes. When the same person/mascot
|
|
266
|
+
* appears in multiple scenes, set this on the LATER scene to the sceneIndex
|
|
267
|
+
* of the first scene where that character appeared. The planner must also
|
|
268
|
+
* re-state the character's core identity descriptors verbatim in this
|
|
269
|
+
* scene's prompt (age, ethnicity, hair, build, wardrobe) so even text-only
|
|
270
|
+
* generation keeps the look. The executor will additionally pass the
|
|
271
|
+
* anchor scene's generated image as `inputImageUrl` once generate_image is
|
|
272
|
+
* re-enabled (image-to-image identity transfer).
|
|
273
|
+
*/
|
|
274
|
+
characterAnchorSceneIndex: zod_1.z.number().int().nonnegative().optional(),
|
|
275
|
+
/**
|
|
276
|
+
* AG-12/13 — Bible entity ids this scene references (CHAR_1, OBJ_1, ENV_1).
|
|
277
|
+
* Used at two places: (a) planner injects each id's verbatim description
|
|
278
|
+
* into scene.prompt when the entity appears; (b) AG-13 executor pre-pass
|
|
279
|
+
* threads `referenceImageUrl` of each id as inputImageUrls on the scene's
|
|
280
|
+
* image-gen call to lock identity.
|
|
281
|
+
*/
|
|
282
|
+
bibleEntityIds: zod_1.z.array(zod_1.z.string()).default([]),
|
|
283
|
+
/**
|
|
284
|
+
* User-set escape hatch for the trailing-silence warning. When true, the
|
|
285
|
+
* trailing-silence validator skips this scene — useful for visual-led
|
|
286
|
+
* moments (real-estate showcase, product close-up, cinematic beat) where
|
|
287
|
+
* the VO ends and the audience is meant to take in the visual.
|
|
288
|
+
*/
|
|
289
|
+
allowTrailingSilence: zod_1.z.boolean().optional(),
|
|
290
|
+
/**
|
|
291
|
+
* Per-scene composition decision (text-layout v1). Optional for back-compat:
|
|
292
|
+
* when absent the renderer falls back to "stretch / cover" behavior. When
|
|
293
|
+
* present, the renderer honors composition / focalPoint / backgroundFill
|
|
294
|
+
* to fit the scene asset onto the target aspect intentionally rather than
|
|
295
|
+
* mechanically. Planner picks based on source aspect × target aspect × the
|
|
296
|
+
* vision pass's content classification (center / edges / face / broll).
|
|
297
|
+
*/
|
|
298
|
+
layout: exports.SceneLayoutSchema.optional(),
|
|
299
|
+
});
|
|
300
|
+
/**
|
|
301
|
+
* Soft validator output. Unlike planner-rejection strings, warnings travel
|
|
302
|
+
* WITH an approved plan so the UI can flag risky scenes the user has chosen
|
|
303
|
+
* to ship. Two emitters today:
|
|
304
|
+
* - `vo-clip`: even after the executor's 1.15× speedup the VO will overrun.
|
|
305
|
+
* - `trailing-silence`: VO ends >threshold before the scene ends, no
|
|
306
|
+
* allowTrailingSilence override set.
|
|
307
|
+
*/
|
|
308
|
+
exports.PlannerWarningSchema = zod_1.z.object({
|
|
309
|
+
sceneIndex: zod_1.z.number().int().nonnegative(),
|
|
310
|
+
kind: zod_1.z.enum(["vo-clip", "trailing-silence"]),
|
|
311
|
+
message: zod_1.z.string(),
|
|
312
|
+
/** Stage-1 sceneIndex-keyed signals; UI groups by scene. */
|
|
313
|
+
meta: zod_1.z
|
|
314
|
+
.object({
|
|
315
|
+
voEstimateMs: zod_1.z.number().nonnegative().optional(),
|
|
316
|
+
sceneDurationMs: zod_1.z.number().nonnegative().optional(),
|
|
317
|
+
silenceMs: zod_1.z.number().nonnegative().optional(),
|
|
318
|
+
overrunMs: zod_1.z.number().nonnegative().optional(),
|
|
319
|
+
})
|
|
320
|
+
.optional(),
|
|
321
|
+
});
|
|
322
|
+
exports.VideoPlanSchema = zod_1.z.object({
|
|
323
|
+
briefId: zod_1.z.string().optional(),
|
|
324
|
+
/** Persona the router selected (UGC ad / faceless YT / etc.). */
|
|
325
|
+
persona: agentPersona_schema_1.AgentPersonaSchema,
|
|
326
|
+
aspect: project_schema_1.AspectSchema,
|
|
327
|
+
totalDurationMs: zod_1.z.number().positive(),
|
|
328
|
+
totalEstimatedCredits: zod_1.z.number().nonnegative(),
|
|
329
|
+
/** Scene list, in render order. */
|
|
330
|
+
scenes: zod_1.z.array(exports.PlannedSceneSchema).min(1),
|
|
331
|
+
/** Music recommendation for the whole video. */
|
|
332
|
+
music: zod_1.z
|
|
333
|
+
.object({
|
|
334
|
+
strategy: zod_1.z.enum(["stock-track", "generated", "none"]),
|
|
335
|
+
query: zod_1.z.string().optional(),
|
|
336
|
+
moodTag: zod_1.z.string().optional(),
|
|
337
|
+
/**
|
|
338
|
+
* Beats-per-minute of the chosen / target track. Drives the beat-snap
|
|
339
|
+
* pass so scene cuts land on bar boundaries. Optional: when absent the
|
|
340
|
+
* snap pass falls back to a persona default (or no-ops for cinematic
|
|
341
|
+
* personas where free-form pacing reads better).
|
|
342
|
+
*/
|
|
343
|
+
bpm: zod_1.z.number().int().positive().optional(),
|
|
344
|
+
/**
|
|
345
|
+
* URL of the chosen music track. Set by the post-planner music selection
|
|
346
|
+
* step (selectMusicForPlan) when strategy = "stock-track" / "generated"
|
|
347
|
+
* and a provider returns a hit.
|
|
348
|
+
*/
|
|
349
|
+
url: zod_1.z.string().url().optional(),
|
|
350
|
+
/** Track length in seconds, when known. */
|
|
351
|
+
durationSec: zod_1.z.number().positive().optional(),
|
|
352
|
+
/** Source label for attribution / debugging ("curated", "jamendo", "mubert"). */
|
|
353
|
+
source: zod_1.z.string().optional(),
|
|
354
|
+
/** Best-effort attribution text; surface in UI when present. */
|
|
355
|
+
attribution: zod_1.z.string().optional(),
|
|
356
|
+
/**
|
|
357
|
+
* Onset timestamps (seconds) from essentia.js RhythmExtractor2013.
|
|
358
|
+
* When present, the snap pass aligns scene cuts to the nearest onset
|
|
359
|
+
* instead of the uniform BPM grid — cuts land on actual transients
|
|
360
|
+
* (kicks / snares / vocal entries) rather than mathematical bars.
|
|
361
|
+
*/
|
|
362
|
+
onsets: zod_1.z.array(zod_1.z.number().nonnegative()).optional(),
|
|
363
|
+
})
|
|
364
|
+
.optional(),
|
|
365
|
+
/**
|
|
366
|
+
* Voice id to use across all VO scenes. ORCHESTRATOR-ONLY: the LLM must NOT
|
|
367
|
+
* fill this — leave undefined. The orchestrator injects the real ElevenLabs
|
|
368
|
+
* voice ID from brief.voice.voiceId post-parse. Descriptive labels like
|
|
369
|
+
* "female-young-adult-excited" are not valid ElevenLabs IDs and get stripped
|
|
370
|
+
* by the executor (AG-37). Use voiceStyle below to convey delivery instead.
|
|
371
|
+
*/
|
|
372
|
+
voiceId: zod_1.z.string().optional(),
|
|
373
|
+
/**
|
|
374
|
+
* AG-31: voice delivery style — adjective forwarded from brief.voice.style.
|
|
375
|
+
* Executor maps it to ElevenLabs voice_settings (style/stability/speed).
|
|
376
|
+
* Kept as a string so the schema doesn't drag the VoiceStyleSchema enum
|
|
377
|
+
* into every consumer — executor validates at use-time.
|
|
378
|
+
*/
|
|
379
|
+
voiceStyle: zod_1.z.string().optional(),
|
|
380
|
+
/** Free-form planner notes — e.g. why a particular tier mix was chosen. */
|
|
381
|
+
notes: zod_1.z.string().optional(),
|
|
382
|
+
/**
|
|
383
|
+
* AG-12 — Visual Bible built by the BibleBuilder pre-pass and threaded
|
|
384
|
+
* into every scene that references entity ids. Optional because legacy
|
|
385
|
+
* plans (built before AG-12) and dry-runs without a bible step are still
|
|
386
|
+
* valid. When present, executor consults it for reference-image threading
|
|
387
|
+
* (AG-13).
|
|
388
|
+
*/
|
|
389
|
+
bible: exports.AgentVisualBibleSchema.optional(),
|
|
390
|
+
/**
|
|
391
|
+
* Soft validation warnings attached at planner finalize-time and refreshed
|
|
392
|
+
* by sceneEdit patches. Plan is still shippable; UI surfaces these so the
|
|
393
|
+
* user can fix or acknowledge.
|
|
394
|
+
*/
|
|
395
|
+
warnings: zod_1.z.array(exports.PlannerWarningSchema).default([]),
|
|
396
|
+
/**
|
|
397
|
+
* Billing/provenance metadata stamped by the planner + plan controller so
|
|
398
|
+
* /execute can compute the right overhead charge. Optional for back-compat
|
|
399
|
+
* with plans built before the overhead-billing change — `estimatePlanOverheadCredits`
|
|
400
|
+
* treats all flags as false when absent.
|
|
401
|
+
*/
|
|
402
|
+
meta: zod_1.z
|
|
403
|
+
.object({
|
|
404
|
+
/** True when the Anthropic web_search path actually ran (not just the heuristic). */
|
|
405
|
+
usedWebResearch: zod_1.z.boolean().optional(),
|
|
406
|
+
/** True when extended-thinking budget was attached (T3 premium briefs). */
|
|
407
|
+
usedThinking: zod_1.z.boolean().optional(),
|
|
408
|
+
/** True only when a fresh bible was built; cache hits stay false. */
|
|
409
|
+
bibleBuilt: zod_1.z.boolean().optional(),
|
|
410
|
+
})
|
|
411
|
+
.optional(),
|
|
412
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VideoPlan } from "../../schemas/videoPlan.schema";
|
|
2
|
+
export interface SnapOptions {
|
|
3
|
+
/** Used only when neither plan.music.bpm nor the persona default exists. */
|
|
4
|
+
fallbackBpm?: number;
|
|
5
|
+
/** Override beats-per-bar (default 4 — cut on whole bars, not individual beats). */
|
|
6
|
+
beatsPerBar?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function resolveBpm(plan: VideoPlan, opts?: SnapOptions): number | undefined;
|
|
9
|
+
export declare function snapPlanToBeats(plan: VideoPlan, opts?: SnapOptions): VideoPlan;
|
|
10
|
+
//# sourceMappingURL=beatSnap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beatSnap.d.ts","sourceRoot":"","sources":["../../../src/services/agent/beatSnap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAE,MAAM,gCAAgC,CAAC;AA+BzE,MAAM,WAAW,WAAW;IAC1B,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,GAAE,WAAgB,GAAG,MAAM,GAAG,SAAS,CAKtF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,GAAE,WAAgB,GAAG,SAAS,CAMlF"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveBpm = resolveBpm;
|
|
4
|
+
exports.snapPlanToBeats = snapPlanToBeats;
|
|
5
|
+
const personas_1 = require("./personas");
|
|
6
|
+
/**
|
|
7
|
+
* Beat-snap pass — adjusts each scene's durationMs so cuts land on bar
|
|
8
|
+
* boundaries of the chosen music. Cuts that land on bars feel produced;
|
|
9
|
+
* arbitrary durations feel like a slideshow with music laid over the top.
|
|
10
|
+
*
|
|
11
|
+
* Two modes, picked automatically:
|
|
12
|
+
*
|
|
13
|
+
* 1. ONSET MODE (preferred). When plan.music.onsets is populated by
|
|
14
|
+
* detectOnsets() (essentia.js), each scene's cumulative end time snaps
|
|
15
|
+
* to the nearest detected onset — cuts land on actual transients
|
|
16
|
+
* (kicks / snares / vocal entries), not a uniform grid. This is what
|
|
17
|
+
* a human editor does.
|
|
18
|
+
*
|
|
19
|
+
* 2. BPM MODE (fallback). When no onsets are available we fall back to
|
|
20
|
+
* uniform bar math at the resolved BPM:
|
|
21
|
+
* - plan.music.bpm → PERSONA_PACKS[plan.persona].defaultBpm
|
|
22
|
+
* → opts.fallbackBpm → no-op
|
|
23
|
+
* Each scene rounds to the nearest barMs (4 beats by default).
|
|
24
|
+
*
|
|
25
|
+
* Both modes:
|
|
26
|
+
* - never go below 1 bar of duration
|
|
27
|
+
* - never go shorter than the voiceover line needs (~3 wps), rounded up
|
|
28
|
+
* - recompute plan.totalDurationMs from the snapped sum
|
|
29
|
+
*/
|
|
30
|
+
const BEATS_PER_BAR = 4;
|
|
31
|
+
const ESTIMATED_WORDS_PER_SECOND = 3;
|
|
32
|
+
function resolveBpm(plan, opts = {}) {
|
|
33
|
+
if (plan.music?.bpm)
|
|
34
|
+
return plan.music.bpm;
|
|
35
|
+
const personaDefault = personas_1.PERSONA_PACKS[plan.persona]?.defaultBpm;
|
|
36
|
+
if (personaDefault)
|
|
37
|
+
return personaDefault;
|
|
38
|
+
return opts.fallbackBpm;
|
|
39
|
+
}
|
|
40
|
+
function snapPlanToBeats(plan, opts = {}) {
|
|
41
|
+
const onsets = plan.music?.onsets;
|
|
42
|
+
if (onsets && onsets.length >= plan.scenes.length) {
|
|
43
|
+
return snapToOnsets(plan, onsets);
|
|
44
|
+
}
|
|
45
|
+
return snapToBpmGrid(plan, opts);
|
|
46
|
+
}
|
|
47
|
+
function snapToOnsets(plan, onsets) {
|
|
48
|
+
// Build cumulative target end-times then snap each to the nearest onset.
|
|
49
|
+
// Scenes flow sequentially, so the second scene's start = first scene's end.
|
|
50
|
+
const sortedOnsets = [...onsets].sort((a, b) => a - b);
|
|
51
|
+
const snappedScenes = [];
|
|
52
|
+
let cumulativeMs = 0;
|
|
53
|
+
for (const scene of plan.scenes) {
|
|
54
|
+
const minDurMs = sceneMinMs(scene);
|
|
55
|
+
const targetEndMs = cumulativeMs + Math.max(scene.durationMs, minDurMs);
|
|
56
|
+
const snappedEndMs = Math.max(cumulativeMs + minDurMs, nearestOnsetMs(targetEndMs, sortedOnsets, cumulativeMs + minDurMs));
|
|
57
|
+
const newDurationMs = snappedEndMs - cumulativeMs;
|
|
58
|
+
snappedScenes.push(newDurationMs === scene.durationMs ? scene : { ...scene, durationMs: newDurationMs });
|
|
59
|
+
cumulativeMs = snappedEndMs;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
...plan,
|
|
63
|
+
scenes: snappedScenes,
|
|
64
|
+
totalDurationMs: cumulativeMs,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function snapToBpmGrid(plan, opts) {
|
|
68
|
+
const bpm = resolveBpm(plan, opts);
|
|
69
|
+
if (!bpm)
|
|
70
|
+
return plan;
|
|
71
|
+
const beatsPerBar = opts.beatsPerBar ?? BEATS_PER_BAR;
|
|
72
|
+
const barMs = (60000 / bpm) * beatsPerBar;
|
|
73
|
+
const snappedScenes = plan.scenes.map((scene) => snapScene(scene, barMs));
|
|
74
|
+
const totalDurationMs = snappedScenes.reduce((sum, s) => sum + s.durationMs, 0);
|
|
75
|
+
return {
|
|
76
|
+
...plan,
|
|
77
|
+
music: {
|
|
78
|
+
strategy: plan.music?.strategy ?? "stock-track",
|
|
79
|
+
...plan.music,
|
|
80
|
+
bpm,
|
|
81
|
+
},
|
|
82
|
+
scenes: snappedScenes,
|
|
83
|
+
totalDurationMs,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function snapScene(scene, barMs) {
|
|
87
|
+
const minMs = Math.max(barMs, ceilToBar(sceneMinMs(scene), barMs));
|
|
88
|
+
const snapped = Math.max(minMs, roundToBar(scene.durationMs, barMs));
|
|
89
|
+
return snapped === scene.durationMs ? scene : { ...scene, durationMs: snapped };
|
|
90
|
+
}
|
|
91
|
+
function sceneMinMs(scene) {
|
|
92
|
+
return scene.voiceoverLine ? estimateVoMs(scene.voiceoverLine) : 0;
|
|
93
|
+
}
|
|
94
|
+
function nearestOnsetMs(targetMs, onsetsSec, minMs) {
|
|
95
|
+
// Binary search would be faster but onsets list is short (1 per beat for a
|
|
96
|
+
// 3-min track at 120bpm = ~360 entries) and snap runs once per plan.
|
|
97
|
+
let bestMs = targetMs;
|
|
98
|
+
let bestDiff = Infinity;
|
|
99
|
+
for (const sec of onsetsSec) {
|
|
100
|
+
const ms = sec * 1000;
|
|
101
|
+
if (ms < minMs)
|
|
102
|
+
continue;
|
|
103
|
+
const diff = Math.abs(ms - targetMs);
|
|
104
|
+
if (diff < bestDiff) {
|
|
105
|
+
bestDiff = diff;
|
|
106
|
+
bestMs = ms;
|
|
107
|
+
}
|
|
108
|
+
else if (ms > targetMs && diff > bestDiff) {
|
|
109
|
+
// Past the target — onsets are sorted, so no closer match ahead.
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return bestMs;
|
|
114
|
+
}
|
|
115
|
+
function roundToBar(ms, barMs) {
|
|
116
|
+
return Math.max(barMs, Math.round(ms / barMs) * barMs);
|
|
117
|
+
}
|
|
118
|
+
function ceilToBar(ms, barMs) {
|
|
119
|
+
if (ms <= 0)
|
|
120
|
+
return 0;
|
|
121
|
+
return Math.ceil(ms / barMs) * barMs;
|
|
122
|
+
}
|
|
123
|
+
function estimateVoMs(line) {
|
|
124
|
+
const words = line.trim().split(/\s+/).filter(Boolean).length;
|
|
125
|
+
if (words === 0)
|
|
126
|
+
return 0;
|
|
127
|
+
return Math.ceil((words / ESTIMATED_WORDS_PER_SECOND) * 1000);
|
|
128
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BibleBuilder — AG-12 pre-pass that builds an AgentVisualBible from a brief
|
|
3
|
+
* BEFORE the planner runs. The bible captures recurring characters / objects /
|
|
4
|
+
* environment with verbatim descriptions; the planner injects each entity's
|
|
5
|
+
* description whenever a scene references it, and AG-13 image-anchors them.
|
|
6
|
+
*
|
|
7
|
+
* Runs as a single LLM structured-output call (~$0.01). Skippable: if the
|
|
8
|
+
* brief is too short or describes a one-off scene (no recurring entities),
|
|
9
|
+
* the bible comes back with empty arrays and the agent degrades to AG-11's
|
|
10
|
+
* per-scene-prompt re-state. Either way the planner gets a defined shape.
|
|
11
|
+
*
|
|
12
|
+
* Tier behavior:
|
|
13
|
+
* - C0: builder is skipped entirely by the caller (fastest, no consistency).
|
|
14
|
+
* - C1 (default for paid): bible is built with descriptions only.
|
|
15
|
+
* - C2 (premium): builder runs same as C1; the C2 pre-pass (renderReferenceImages
|
|
16
|
+
* in a separate module) then fills referenceImageUrl on each entity.
|
|
17
|
+
*/
|
|
18
|
+
import { z } from "zod";
|
|
19
|
+
import { AgentPersona } from "../../schemas/agentPersona.schema";
|
|
20
|
+
import { VideoBrief } from "../../schemas/brief.schema";
|
|
21
|
+
import { AgentVisualBible } from "../../schemas/videoPlan.schema";
|
|
22
|
+
import { IBrandKitModel } from "../../models/agent.model";
|
|
23
|
+
import { LlmCaller } from "./llmCaller";
|
|
24
|
+
import { ModelRouter } from "./modelRouter";
|
|
25
|
+
export interface BibleBuilderOptions {
|
|
26
|
+
llm: LlmCaller;
|
|
27
|
+
router?: ModelRouter;
|
|
28
|
+
}
|
|
29
|
+
export interface BuildBibleArgs {
|
|
30
|
+
brief: VideoBrief;
|
|
31
|
+
persona?: AgentPersona;
|
|
32
|
+
brandKit?: IBrandKitModel | null;
|
|
33
|
+
/** "C1" (description-only) or "C2" (description + ref-image placeholder slots). */
|
|
34
|
+
consistencyTier?: "C1" | "C2";
|
|
35
|
+
}
|
|
36
|
+
export declare class BibleBuilder {
|
|
37
|
+
private readonly opts;
|
|
38
|
+
private readonly router;
|
|
39
|
+
constructor(opts: BibleBuilderOptions);
|
|
40
|
+
build({ brief, persona, brandKit, consistencyTier, }: BuildBibleArgs): Promise<AgentVisualBible>;
|
|
41
|
+
}
|
|
42
|
+
export type { z };
|
|
43
|
+
//# sourceMappingURL=bibleBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bibleBuilder.d.ts","sourceRoot":"","sources":["../../../src/services/agent/bibleBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EACL,gBAAgB,EAEjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,SAAS,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACjC,mFAAmF;IACnF,eAAe,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAC/B;AAED,qBAAa,YAAY;IAGX,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAER,IAAI,EAAE,mBAAmB;IAIhD,KAAK,CAAC,EACV,KAAK,EACL,OAAO,EACP,QAAQ,EACR,eAAsB,GACvB,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;CA+F9C;AAGD,YAAY,EAAE,CAAC,EAAE,CAAC"}
|