vidspotai-shared 1.0.82-dev.0 → 1.0.83
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 +11 -1
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +24 -1
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +2 -0
- package/lib/globals/aiModels/providers/anthropic.d.ts +12 -0
- package/lib/globals/aiModels/providers/anthropic.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/anthropic.js +88 -0
- package/lib/globals/aiModels/providers/google.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/google.js +115 -10
- package/lib/globals/aiModels/providers/openai.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/openai.js +63 -4
- package/lib/globals/aiModels/tierHelpers.d.ts +12 -0
- package/lib/globals/aiModels/tierHelpers.d.ts.map +1 -1
- package/lib/globals/aiModels/tierHelpers.js +83 -0
- package/lib/globals/aiModels/types.d.ts +19 -0
- package/lib/globals/aiModels/types.d.ts.map +1 -1
- package/lib/globals/types.d.ts +120 -1
- package/lib/globals/types.d.ts.map +1 -1
- package/lib/globals/types.js +135 -1
- package/lib/models/agent.model.d.ts +41 -1
- package/lib/models/agent.model.d.ts.map +1 -1
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +1 -0
- package/lib/models/social.model.d.ts +180 -0
- package/lib/models/social.model.d.ts.map +1 -0
- package/lib/models/social.model.js +2 -0
- package/lib/models/user.model.d.ts +10 -0
- package/lib/models/user.model.d.ts.map +1 -1
- package/lib/models/video.model.d.ts +6 -0
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/schemas/brief.schema.d.ts +46 -0
- package/lib/schemas/brief.schema.d.ts.map +1 -1
- package/lib/schemas/brief.schema.js +72 -1
- package/lib/schemas/index.d.ts +1 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +1 -0
- package/lib/schemas/project.schema.d.ts +70 -3
- package/lib/schemas/project.schema.d.ts.map +1 -1
- package/lib/schemas/project.schema.js +12 -0
- package/lib/schemas/social.schema.d.ts +91 -0
- package/lib/schemas/social.schema.d.ts.map +1 -0
- package/lib/schemas/social.schema.js +114 -0
- package/lib/schemas/videoPlan.schema.d.ts +117 -3
- package/lib/schemas/videoPlan.schema.d.ts.map +1 -1
- package/lib/schemas/videoPlan.schema.js +141 -1
- package/lib/services/agent/chatAgent.d.ts +25 -1
- package/lib/services/agent/chatAgent.d.ts.map +1 -1
- package/lib/services/agent/chatAgent.js +145 -9
- package/lib/services/agent/costPreflight.d.ts +11 -1
- package/lib/services/agent/costPreflight.d.ts.map +1 -1
- package/lib/services/agent/costPreflight.js +18 -1
- package/lib/services/agent/covers/coverPlanner.d.ts +41 -0
- package/lib/services/agent/covers/coverPlanner.d.ts.map +1 -0
- package/lib/services/agent/covers/coverPlanner.js +278 -0
- package/lib/services/agent/covers/covers.schema.d.ts +158 -0
- package/lib/services/agent/covers/covers.schema.d.ts.map +1 -0
- package/lib/services/agent/covers/covers.schema.js +166 -0
- package/lib/services/agent/covers/index.d.ts +3 -0
- package/lib/services/agent/covers/index.d.ts.map +1 -0
- package/lib/services/agent/covers/index.js +18 -0
- package/lib/services/agent/critic.d.ts +10 -0
- package/lib/services/agent/critic.d.ts.map +1 -1
- package/lib/services/agent/critic.js +37 -1
- package/lib/services/agent/editClassifier.d.ts +4 -4
- package/lib/services/agent/editClassifier.js +2 -2
- package/lib/services/agent/editExisting/editAssembler.d.ts +78 -0
- package/lib/services/agent/editExisting/editAssembler.d.ts.map +1 -0
- package/lib/services/agent/editExisting/editAssembler.js +172 -0
- package/lib/services/agent/editExisting/editExisting.schema.d.ts +119 -0
- package/lib/services/agent/editExisting/editExisting.schema.d.ts.map +1 -0
- package/lib/services/agent/editExisting/editExisting.schema.js +157 -0
- package/lib/services/agent/editExisting/highlightPicker.d.ts +48 -0
- package/lib/services/agent/editExisting/highlightPicker.d.ts.map +1 -0
- package/lib/services/agent/editExisting/highlightPicker.js +199 -0
- package/lib/services/agent/editExisting/index.d.ts +4 -0
- package/lib/services/agent/editExisting/index.d.ts.map +1 -0
- package/lib/services/agent/editExisting/index.js +19 -0
- package/lib/services/agent/eval/recorder.d.ts +13 -1
- package/lib/services/agent/eval/recorder.d.ts.map +1 -1
- package/lib/services/agent/eval/recorder.js +59 -0
- package/lib/services/agent/eval/seedBriefs.d.ts +4 -3
- package/lib/services/agent/eval/seedBriefs.d.ts.map +1 -1
- package/lib/services/agent/eval/seedBriefs.js +283 -3
- package/lib/services/agent/eval/types.d.ts +10 -0
- package/lib/services/agent/eval/types.d.ts.map +1 -1
- package/lib/services/agent/executor/core.d.ts +70 -0
- package/lib/services/agent/executor/core.d.ts.map +1 -0
- package/lib/services/agent/executor/core.js +250 -0
- package/lib/services/agent/executor/duration.d.ts +20 -0
- package/lib/services/agent/executor/duration.d.ts.map +1 -0
- package/lib/services/agent/executor/duration.js +46 -0
- package/lib/services/agent/executor/index.d.ts +15 -0
- package/lib/services/agent/executor/index.d.ts.map +1 -0
- package/lib/services/agent/executor/index.js +32 -0
- package/lib/services/agent/executor/types.d.ts +183 -0
- package/lib/services/agent/executor/types.d.ts.map +1 -0
- package/lib/services/agent/executor/types.js +29 -0
- package/lib/services/agent/executor/visual.d.ts +32 -0
- package/lib/services/agent/executor/visual.d.ts.map +1 -0
- package/lib/services/agent/executor/visual.js +400 -0
- package/lib/services/agent/executor/voice.d.ts +17 -0
- package/lib/services/agent/executor/voice.d.ts.map +1 -0
- package/lib/services/agent/executor/voice.js +119 -0
- package/lib/services/agent/extendChain.d.ts +101 -0
- package/lib/services/agent/extendChain.d.ts.map +1 -0
- package/lib/services/agent/extendChain.js +177 -0
- package/lib/services/agent/index.d.ts +11 -1
- package/lib/services/agent/index.d.ts.map +1 -1
- package/lib/services/agent/index.js +11 -1
- package/lib/services/agent/llmCaller.d.ts +7 -8
- package/lib/services/agent/llmCaller.d.ts.map +1 -1
- package/lib/services/agent/llmCallerAnthropic.d.ts +44 -31
- package/lib/services/agent/llmCallerAnthropic.d.ts.map +1 -1
- package/lib/services/agent/llmCallerAnthropic.js +135 -60
- package/lib/services/agent/llmCallerFactory.d.ts +34 -0
- package/lib/services/agent/llmCallerFactory.d.ts.map +1 -0
- package/lib/services/agent/llmCallerFactory.js +31 -0
- package/lib/services/agent/llmCallerGemini.d.ts +62 -0
- package/lib/services/agent/llmCallerGemini.d.ts.map +1 -0
- package/lib/services/agent/llmCallerGemini.js +235 -0
- package/lib/services/agent/llmCallerOpenai.d.ts +56 -0
- package/lib/services/agent/llmCallerOpenai.d.ts.map +1 -0
- package/lib/services/agent/llmCallerOpenai.js +230 -0
- package/lib/services/agent/llmCallerRegistry.d.ts.map +1 -1
- package/lib/services/agent/llmCallerRegistry.js +7 -7
- package/lib/services/agent/llmCallerRouting.d.ts +63 -0
- package/lib/services/agent/llmCallerRouting.d.ts.map +1 -0
- package/lib/services/agent/llmCallerRouting.js +124 -0
- package/lib/services/agent/llmModelRegistry.d.ts +59 -0
- package/lib/services/agent/llmModelRegistry.d.ts.map +1 -0
- package/lib/services/agent/llmModelRegistry.js +168 -0
- package/lib/services/agent/llmRetry.d.ts +57 -0
- package/lib/services/agent/llmRetry.d.ts.map +1 -0
- package/lib/services/agent/llmRetry.js +102 -0
- package/lib/services/agent/modelRouter.d.ts +3 -3
- package/lib/services/agent/modelRouter.d.ts.map +1 -1
- package/lib/services/agent/modelRouter.js +27 -13
- package/lib/services/agent/planMutations.d.ts +54 -1
- package/lib/services/agent/planMutations.d.ts.map +1 -1
- package/lib/services/agent/planMutations.js +78 -0
- package/lib/services/agent/planner/Planner.d.ts +0 -17
- package/lib/services/agent/planner/Planner.d.ts.map +1 -1
- package/lib/services/agent/planner/Planner.js +67 -303
- package/lib/services/agent/planner/overlayRegen.d.ts +38 -0
- package/lib/services/agent/planner/overlayRegen.d.ts.map +1 -0
- package/lib/services/agent/planner/overlayRegen.js +145 -0
- package/lib/services/agent/planner/plannerMessages.d.ts +34 -0
- package/lib/services/agent/planner/plannerMessages.d.ts.map +1 -0
- package/lib/services/agent/planner/plannerMessages.js +185 -0
- package/lib/services/agent/planner/promptSections.d.ts +12 -0
- package/lib/services/agent/planner/promptSections.d.ts.map +1 -1
- package/lib/services/agent/planner/promptSections.js +57 -0
- package/lib/services/agent/planner/scriptFirstPlanner.d.ts +35 -0
- package/lib/services/agent/planner/scriptFirstPlanner.d.ts.map +1 -0
- package/lib/services/agent/planner/scriptFirstPlanner.js +140 -0
- package/lib/services/agent/planner/structuralRules.d.ts +10 -0
- package/lib/services/agent/planner/structuralRules.d.ts.map +1 -1
- package/lib/services/agent/planner/structuralRules.js +92 -9
- package/lib/services/agent/planner/validators.d.ts +18 -0
- package/lib/services/agent/planner/validators.d.ts.map +1 -1
- package/lib/services/agent/planner/validators.js +97 -0
- package/lib/services/agent/planner.d.ts +2 -1
- package/lib/services/agent/planner.d.ts.map +1 -1
- package/lib/services/agent/planner.js +5 -1
- package/lib/services/agent/priorProject.d.ts +26 -0
- package/lib/services/agent/priorProject.d.ts.map +1 -0
- package/lib/services/agent/priorProject.js +51 -0
- package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
- package/lib/services/agent/providerFallback/chains.js +27 -15
- package/lib/services/agent/repurpose/index.d.ts +3 -0
- package/lib/services/agent/repurpose/index.d.ts.map +1 -0
- package/lib/services/agent/repurpose/index.js +18 -0
- package/lib/services/agent/repurpose/repurpose.schema.d.ts +132 -0
- package/lib/services/agent/repurpose/repurpose.schema.d.ts.map +1 -0
- package/lib/services/agent/repurpose/repurpose.schema.js +144 -0
- package/lib/services/agent/repurpose/shortsPicker.d.ts +25 -0
- package/lib/services/agent/repurpose/shortsPicker.d.ts.map +1 -0
- package/lib/services/agent/repurpose/shortsPicker.js +218 -0
- package/lib/services/agent/runHelpers.d.ts +21 -2
- package/lib/services/agent/runHelpers.d.ts.map +1 -1
- package/lib/services/agent/runHelpers.js +71 -2
- package/lib/services/agent/tools/animateImage.tool.d.ts +1 -0
- package/lib/services/agent/tools/animateImage.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/animateImage.tool.js +12 -0
- package/lib/services/agent/tools/chapterOutline.tool.d.ts +42 -0
- package/lib/services/agent/tools/chapterOutline.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/chapterOutline.tool.js +115 -0
- package/lib/services/agent/tools/composeScene.tool.d.ts +65 -2
- package/lib/services/agent/tools/composeScene.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/estimateCost.tool.d.ts +28 -1
- package/lib/services/agent/tools/estimateCost.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/estimateCost.tool.js +55 -7
- package/lib/services/agent/tools/extendVideo.tool.d.ts +26 -0
- package/lib/services/agent/tools/extendVideo.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/extendVideo.tool.js +149 -0
- package/lib/services/agent/tools/generateScript.tool.d.ts +184 -0
- package/lib/services/agent/tools/generateScript.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/generateScript.tool.js +123 -0
- package/lib/services/agent/tools/generateVideo.tool.d.ts +1 -0
- package/lib/services/agent/tools/generateVideo.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/generateVideo.tool.js +20 -1
- package/lib/services/agent/tools/index.d.ts +4 -0
- package/lib/services/agent/tools/index.d.ts.map +1 -1
- package/lib/services/agent/tools/index.js +4 -0
- package/lib/services/agent/tools/matchBrollToScript.tool.d.ts +50 -0
- package/lib/services/agent/tools/matchBrollToScript.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/matchBrollToScript.tool.js +139 -0
- package/lib/services/agent/tools/planVideo.tool.d.ts +57 -1
- package/lib/services/agent/tools/planVideo.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/planVideo.tool.js +3 -3
- package/lib/services/agent/tools/render.tool.d.ts +22 -1
- package/lib/services/agent/tools/render.tool.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +18 -3
- package/lib/services/aiGen/helpers.d.ts +8 -0
- package/lib/services/aiGen/helpers.d.ts.map +1 -1
- package/lib/services/aiGen/helpers.js +12 -0
- package/lib/services/aiGen/providers/anthropic/anthropic.service.d.ts +26 -0
- package/lib/services/aiGen/providers/anthropic/anthropic.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/anthropic/anthropic.service.js +95 -0
- package/lib/services/aiGen/providers/google/google.service.d.ts +25 -1
- package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/google.service.js +136 -237
- package/lib/services/aiGen/providers/google/googleApiKeys.d.ts +71 -0
- package/lib/services/aiGen/providers/google/googleApiKeys.d.ts.map +1 -0
- package/lib/services/aiGen/providers/google/googleApiKeys.js +137 -0
- package/lib/services/aiGen/providers/google/googleErrors.d.ts +13 -0
- package/lib/services/aiGen/providers/google/googleErrors.d.ts.map +1 -0
- package/lib/services/aiGen/providers/google/googleErrors.js +102 -0
- package/lib/services/aiGen/providers/google/googleFetch.d.ts +8 -0
- package/lib/services/aiGen/providers/google/googleFetch.d.ts.map +1 -0
- package/lib/services/aiGen/providers/google/googleFetch.js +96 -0
- package/lib/services/aiGen/providers/google/googleKeyPool.d.ts +52 -0
- package/lib/services/aiGen/providers/google/googleKeyPool.d.ts.map +1 -0
- package/lib/services/aiGen/providers/google/googleKeyPool.js +129 -0
- package/lib/services/aiGen/providers/google/googleMusic.d.ts +15 -0
- package/lib/services/aiGen/providers/google/googleMusic.d.ts.map +1 -0
- package/lib/services/aiGen/providers/google/googleMusic.js +77 -0
- package/lib/services/aiGen/providers/kling/kling.service.d.ts +7 -3
- package/lib/services/aiGen/providers/kling/kling.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/kling.service.js +23 -367
- package/lib/services/aiGen/providers/kling/klingCredits.d.ts +9 -0
- package/lib/services/aiGen/providers/kling/klingCredits.d.ts.map +1 -0
- package/lib/services/aiGen/providers/kling/klingCredits.js +63 -0
- package/lib/services/aiGen/providers/kling/klingRequests.d.ts +32 -0
- package/lib/services/aiGen/providers/kling/klingRequests.d.ts.map +1 -0
- package/lib/services/aiGen/providers/kling/klingRequests.js +194 -0
- package/lib/services/aiGen/providers/kling/klingStatus.d.ts +16 -0
- package/lib/services/aiGen/providers/kling/klingStatus.d.ts.map +1 -0
- package/lib/services/aiGen/providers/kling/klingStatus.js +173 -0
- package/lib/services/aiGen/providers/pixverse/pixverse.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/pixverse/pixverse.service.js +7 -1
- package/lib/services/bullmq.service.d.ts +61 -0
- package/lib/services/bullmq.service.d.ts.map +1 -1
- package/lib/services/bullmq.service.js +124 -2
- package/lib/services/crypto/index.d.ts +2 -0
- package/lib/services/crypto/index.d.ts.map +1 -0
- package/lib/services/crypto/index.js +17 -0
- package/lib/services/crypto/tokenVault.d.ts +47 -0
- package/lib/services/crypto/tokenVault.d.ts.map +1 -0
- package/lib/services/crypto/tokenVault.js +179 -0
- package/lib/services/editor/captionStyleHint.d.ts +3 -0
- package/lib/services/editor/captionStyleHint.d.ts.map +1 -0
- package/lib/services/editor/captionStyleHint.js +112 -0
- package/lib/services/editor/planToProject.d.ts +7 -66
- package/lib/services/editor/planToProject.d.ts.map +1 -1
- package/lib/services/editor/planToProject.helpers.d.ts +40 -0
- package/lib/services/editor/planToProject.helpers.d.ts.map +1 -0
- package/lib/services/editor/planToProject.helpers.js +177 -0
- package/lib/services/editor/planToProject.js +197 -180
- package/lib/services/editor/planToProject.types.d.ts +94 -0
- package/lib/services/editor/planToProject.types.d.ts.map +1 -0
- package/lib/services/editor/planToProject.types.js +2 -0
- package/lib/services/firestore.service.d.ts +5 -0
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +13 -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/promptEnhancer/index.d.ts +18 -0
- package/lib/services/promptEnhancer/index.d.ts.map +1 -0
- package/lib/services/promptEnhancer/index.js +33 -0
- package/lib/services/promptEnhancer/models.d.ts +54 -0
- package/lib/services/promptEnhancer/models.d.ts.map +1 -0
- package/lib/services/promptEnhancer/models.js +37 -0
- package/lib/services/promptEnhancer/profiles/agent.profile.d.ts +14 -0
- package/lib/services/promptEnhancer/profiles/agent.profile.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/agent.profile.js +40 -0
- package/lib/services/promptEnhancer/profiles/avatar.profile.d.ts +13 -0
- package/lib/services/promptEnhancer/profiles/avatar.profile.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/avatar.profile.js +40 -0
- package/lib/services/promptEnhancer/profiles/base.d.ts +28 -0
- package/lib/services/promptEnhancer/profiles/base.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/base.js +35 -0
- package/lib/services/promptEnhancer/profiles/image.profile.d.ts +11 -0
- package/lib/services/promptEnhancer/profiles/image.profile.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/image.profile.js +42 -0
- package/lib/services/promptEnhancer/profiles/index.d.ts +12 -0
- package/lib/services/promptEnhancer/profiles/index.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/index.js +33 -0
- package/lib/services/promptEnhancer/profiles/video.profile.d.ts +15 -0
- package/lib/services/promptEnhancer/profiles/video.profile.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/video.profile.js +81 -0
- package/lib/services/promptEnhancer/promptEnhancer.service.d.ts +45 -0
- package/lib/services/promptEnhancer/promptEnhancer.service.d.ts.map +1 -0
- package/lib/services/promptEnhancer/promptEnhancer.service.js +157 -0
- package/lib/services/promptEnhancer/schema.d.ts +19 -0
- package/lib/services/promptEnhancer/schema.d.ts.map +1 -0
- package/lib/services/promptEnhancer/schema.js +43 -0
- package/lib/services/promptEnhancer/types.d.ts +112 -0
- package/lib/services/promptEnhancer/types.d.ts.map +1 -0
- package/lib/services/promptEnhancer/types.js +2 -0
- package/lib/services/rateLimiter/distributedRateLimiter.service.d.ts +60 -5
- package/lib/services/rateLimiter/distributedRateLimiter.service.d.ts.map +1 -1
- package/lib/services/rateLimiter/distributedRateLimiter.service.js +184 -16
- package/lib/services/socialAI/captionGen.d.ts +81 -0
- package/lib/services/socialAI/captionGen.d.ts.map +1 -0
- package/lib/services/socialAI/captionGen.js +206 -0
- package/lib/services/socialAI/hookScore.d.ts +85 -0
- package/lib/services/socialAI/hookScore.d.ts.map +1 -0
- package/lib/services/socialAI/hookScore.js +170 -0
- package/lib/services/socialAI/index.d.ts +3 -0
- package/lib/services/socialAI/index.d.ts.map +1 -0
- package/lib/services/socialAI/index.js +18 -0
- package/lib/services/socialAccounts/index.d.ts +2 -0
- package/lib/services/socialAccounts/index.d.ts.map +1 -0
- package/lib/services/socialAccounts/index.js +17 -0
- package/lib/services/socialAccounts/socialAccountService.d.ts +25 -0
- package/lib/services/socialAccounts/socialAccountService.d.ts.map +1 -0
- package/lib/services/socialAccounts/socialAccountService.js +105 -0
- package/lib/services/socialEngage/factory.d.ts +7 -0
- package/lib/services/socialEngage/factory.d.ts.map +1 -0
- package/lib/services/socialEngage/factory.js +25 -0
- package/lib/services/socialEngage/index.d.ts +6 -0
- package/lib/services/socialEngage/index.d.ts.map +1 -0
- package/lib/services/socialEngage/index.js +21 -0
- package/lib/services/socialEngage/meta.engage.d.ts +17 -0
- package/lib/services/socialEngage/meta.engage.d.ts.map +1 -0
- package/lib/services/socialEngage/meta.engage.js +128 -0
- package/lib/services/socialEngage/metaWebhook.d.ts +50 -0
- package/lib/services/socialEngage/metaWebhook.d.ts.map +1 -0
- package/lib/services/socialEngage/metaWebhook.js +93 -0
- package/lib/services/socialEngage/types.d.ts +72 -0
- package/lib/services/socialEngage/types.d.ts.map +1 -0
- package/lib/services/socialEngage/types.js +10 -0
- package/lib/services/socialEngage/youtube.engage.d.ts +9 -0
- package/lib/services/socialEngage/youtube.engage.d.ts.map +1 -0
- package/lib/services/socialEngage/youtube.engage.js +87 -0
- package/lib/services/socialFormat/aspectGeometry.d.ts +74 -0
- package/lib/services/socialFormat/aspectGeometry.d.ts.map +1 -0
- package/lib/services/socialFormat/aspectGeometry.js +135 -0
- package/lib/services/socialFormat/index.d.ts +2 -0
- package/lib/services/socialFormat/index.d.ts.map +1 -0
- package/lib/services/socialFormat/index.js +19 -0
- package/lib/services/socialInsights/index.d.ts +3 -0
- package/lib/services/socialInsights/index.d.ts.map +1 -0
- package/lib/services/socialInsights/index.js +18 -0
- package/lib/services/socialInsights/recommendations.d.ts +131 -0
- package/lib/services/socialInsights/recommendations.d.ts.map +1 -0
- package/lib/services/socialInsights/recommendations.js +277 -0
- package/lib/services/socialInsights/timeBuckets.d.ts +35 -0
- package/lib/services/socialInsights/timeBuckets.d.ts.map +1 -0
- package/lib/services/socialInsights/timeBuckets.js +78 -0
- package/lib/services/socialMetrics/factory.d.ts +5 -0
- package/lib/services/socialMetrics/factory.d.ts.map +1 -0
- package/lib/services/socialMetrics/factory.js +24 -0
- package/lib/services/socialMetrics/index.d.ts +6 -0
- package/lib/services/socialMetrics/index.d.ts.map +1 -0
- package/lib/services/socialMetrics/index.js +21 -0
- package/lib/services/socialMetrics/meta.metrics.d.ts +22 -0
- package/lib/services/socialMetrics/meta.metrics.d.ts.map +1 -0
- package/lib/services/socialMetrics/meta.metrics.js +137 -0
- package/lib/services/socialMetrics/tiktok.metrics.d.ts +8 -0
- package/lib/services/socialMetrics/tiktok.metrics.d.ts.map +1 -0
- package/lib/services/socialMetrics/tiktok.metrics.js +43 -0
- package/lib/services/socialMetrics/types.d.ts +54 -0
- package/lib/services/socialMetrics/types.d.ts.map +1 -0
- package/lib/services/socialMetrics/types.js +2 -0
- package/lib/services/socialMetrics/youtube.metrics.d.ts +8 -0
- package/lib/services/socialMetrics/youtube.metrics.d.ts.map +1 -0
- package/lib/services/socialMetrics/youtube.metrics.js +43 -0
- package/lib/services/socialOAuth/factory.d.ts +7 -0
- package/lib/services/socialOAuth/factory.d.ts.map +1 -0
- package/lib/services/socialOAuth/factory.js +42 -0
- package/lib/services/socialOAuth/index.d.ts +11 -0
- package/lib/services/socialOAuth/index.d.ts.map +1 -0
- package/lib/services/socialOAuth/index.js +26 -0
- package/lib/services/socialOAuth/linkedin.oauth.d.ts +14 -0
- package/lib/services/socialOAuth/linkedin.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/linkedin.oauth.js +127 -0
- package/lib/services/socialOAuth/meta.oauth.d.ts +31 -0
- package/lib/services/socialOAuth/meta.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/meta.oauth.js +214 -0
- package/lib/services/socialOAuth/oauthState.d.ts +14 -0
- package/lib/services/socialOAuth/oauthState.d.ts.map +1 -0
- package/lib/services/socialOAuth/oauthState.js +66 -0
- package/lib/services/socialOAuth/pinterest.oauth.d.ts +15 -0
- package/lib/services/socialOAuth/pinterest.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/pinterest.oauth.js +126 -0
- package/lib/services/socialOAuth/threads.oauth.d.ts +14 -0
- package/lib/services/socialOAuth/threads.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/threads.oauth.js +129 -0
- package/lib/services/socialOAuth/tiktok.oauth.d.ts +15 -0
- package/lib/services/socialOAuth/tiktok.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/tiktok.oauth.js +151 -0
- package/lib/services/socialOAuth/types.d.ts +67 -0
- package/lib/services/socialOAuth/types.d.ts.map +1 -0
- package/lib/services/socialOAuth/types.js +2 -0
- package/lib/services/socialOAuth/x.oauth.d.ts +17 -0
- package/lib/services/socialOAuth/x.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/x.oauth.js +134 -0
- package/lib/services/socialOAuth/youtube.oauth.d.ts +15 -0
- package/lib/services/socialOAuth/youtube.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/youtube.oauth.js +156 -0
- package/lib/services/socialPublish/factory.d.ts +5 -0
- package/lib/services/socialPublish/factory.d.ts.map +1 -0
- package/lib/services/socialPublish/factory.js +32 -0
- package/lib/services/socialPublish/index.d.ts +10 -0
- package/lib/services/socialPublish/index.d.ts.map +1 -0
- package/lib/services/socialPublish/index.js +25 -0
- package/lib/services/socialPublish/linkedin.publish.d.ts +9 -0
- package/lib/services/socialPublish/linkedin.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/linkedin.publish.js +143 -0
- package/lib/services/socialPublish/meta.publish.d.ts +28 -0
- package/lib/services/socialPublish/meta.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/meta.publish.js +149 -0
- package/lib/services/socialPublish/pinterest.publish.d.ts +13 -0
- package/lib/services/socialPublish/pinterest.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/pinterest.publish.js +130 -0
- package/lib/services/socialPublish/threads.publish.d.ts +12 -0
- package/lib/services/socialPublish/threads.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/threads.publish.js +96 -0
- package/lib/services/socialPublish/tiktok.publish.d.ts +13 -0
- package/lib/services/socialPublish/tiktok.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/tiktok.publish.js +118 -0
- package/lib/services/socialPublish/types.d.ts +47 -0
- package/lib/services/socialPublish/types.d.ts.map +1 -0
- package/lib/services/socialPublish/types.js +2 -0
- package/lib/services/socialPublish/x.publish.d.ts +12 -0
- package/lib/services/socialPublish/x.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/x.publish.js +147 -0
- package/lib/services/socialPublish/youtube.publish.d.ts +9 -0
- package/lib/services/socialPublish/youtube.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/youtube.publish.js +107 -0
- package/lib/services/stock/index.d.ts +2 -0
- package/lib/services/stock/index.d.ts.map +1 -0
- package/lib/services/stock/index.js +17 -0
- package/lib/services/stock/realPersonSafety.d.ts +99 -0
- package/lib/services/stock/realPersonSafety.d.ts.map +1 -0
- package/lib/services/stock/realPersonSafety.js +248 -0
- package/lib/services/translation/index.d.ts +2 -0
- package/lib/services/translation/index.d.ts.map +1 -0
- package/lib/services/translation/index.js +9 -0
- package/lib/services/translation/translation.service.d.ts +50 -0
- package/lib/services/translation/translation.service.d.ts.map +1 -0
- package/lib/services/translation/translation.service.js +211 -0
- package/lib/utils/helpers.d.ts +2 -4
- package/lib/utils/helpers.d.ts.map +1 -1
- package/lib/utils/helpers.js +9 -63
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/renderTier.d.ts +26 -0
- package/lib/utils/renderTier.d.ts.map +1 -0
- package/lib/utils/renderTier.js +34 -0
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AgentPersona } from "../../../schemas/agentPersona.schema";
|
|
2
|
+
import { VideoBrief } from "../../../schemas/brief.schema";
|
|
3
|
+
import { AgentVisualBible, PlannedScene, TextOverlay } from "../../../schemas/videoPlan.schema";
|
|
4
|
+
import { IBrandKitModel } from "../../../models/agent.model";
|
|
5
|
+
import { LlmCaller } from "../llmCaller";
|
|
6
|
+
import { ModelRouter } from "../modelRouter";
|
|
7
|
+
/** Bound Planner helpers needed to regenerate a single scene's overlays. */
|
|
8
|
+
export interface OverlayRegenDeps {
|
|
9
|
+
llm: LlmCaller;
|
|
10
|
+
router: ModelRouter;
|
|
11
|
+
maxRetries: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Stage 6 slice 4 — focused overlay regeneration for a single scene. The
|
|
15
|
+
* full `plan()` path is too expensive (and too lossy) for "I just want
|
|
16
|
+
* different headline / CTA copy on scene 3": it would re-validate every
|
|
17
|
+
* structural rule (duration / pacing / model capability / VO budget /
|
|
18
|
+
* narration density) against the unchanged scenes, then re-emit the
|
|
19
|
+
* whole plan — burning planner tokens and risking drift on fields the
|
|
20
|
+
* caller didn't ask to change.
|
|
21
|
+
*
|
|
22
|
+
* Instead we run a small structured-output call that ONLY emits
|
|
23
|
+
* `{ overlays: TextOverlay[] }` for one scene, keeping the prompt tight
|
|
24
|
+
* (just the scene context + the overlay-content rules + a free-form
|
|
25
|
+
* `instruction`) and the validator surface tiny (TextOverlaySchema +
|
|
26
|
+
* the style-leak sanity check). Caller is responsible for splicing the
|
|
27
|
+
* returned overlays into projectJson — this is pure, no I/O beyond the
|
|
28
|
+
* LLM call.
|
|
29
|
+
*/
|
|
30
|
+
export declare function regenerateOverlaysForScene(deps: OverlayRegenDeps, scene: PlannedScene, brief: VideoBrief, opts?: {
|
|
31
|
+
persona?: AgentPersona;
|
|
32
|
+
brandKit?: IBrandKitModel | null;
|
|
33
|
+
bible?: AgentVisualBible | null;
|
|
34
|
+
isClosingScene?: boolean;
|
|
35
|
+
/** Free-form caller hint, e.g. "punchier CTA" or "drop the watermark". */
|
|
36
|
+
instruction?: string;
|
|
37
|
+
}): Promise<TextOverlay[]>;
|
|
38
|
+
//# sourceMappingURL=overlayRegen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlayRegen.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/planner/overlayRegen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,WAAW,EAGZ,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,4EAA4E;AAC5E,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,SAAS,CAAC;IACf,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,UAAU,EACjB,IAAI,GAAE;IACJ,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;CACjB,GACL,OAAO,CAAC,WAAW,EAAE,CAAC,CAwIxB"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.regenerateOverlaysForScene = regenerateOverlaysForScene;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const videoPlan_schema_1 = require("../../../schemas/videoPlan.schema");
|
|
6
|
+
const personas_1 = require("../personas");
|
|
7
|
+
const promptSections_1 = require("./promptSections");
|
|
8
|
+
const overlaySanity_1 = require("./overlaySanity");
|
|
9
|
+
/**
|
|
10
|
+
* Stage 6 slice 4 — focused overlay regeneration for a single scene. The
|
|
11
|
+
* full `plan()` path is too expensive (and too lossy) for "I just want
|
|
12
|
+
* different headline / CTA copy on scene 3": it would re-validate every
|
|
13
|
+
* structural rule (duration / pacing / model capability / VO budget /
|
|
14
|
+
* narration density) against the unchanged scenes, then re-emit the
|
|
15
|
+
* whole plan — burning planner tokens and risking drift on fields the
|
|
16
|
+
* caller didn't ask to change.
|
|
17
|
+
*
|
|
18
|
+
* Instead we run a small structured-output call that ONLY emits
|
|
19
|
+
* `{ overlays: TextOverlay[] }` for one scene, keeping the prompt tight
|
|
20
|
+
* (just the scene context + the overlay-content rules + a free-form
|
|
21
|
+
* `instruction`) and the validator surface tiny (TextOverlaySchema +
|
|
22
|
+
* the style-leak sanity check). Caller is responsible for splicing the
|
|
23
|
+
* returned overlays into projectJson — this is pure, no I/O beyond the
|
|
24
|
+
* LLM call.
|
|
25
|
+
*/
|
|
26
|
+
async function regenerateOverlaysForScene(deps, scene, brief, opts = {}) {
|
|
27
|
+
const model = deps.router.pickFor("planner", {
|
|
28
|
+
premium: brief.tierBudget === "T3",
|
|
29
|
+
});
|
|
30
|
+
const fallbackModel = deps.router.fallbackFor("planner");
|
|
31
|
+
const FocusedOverlaySchema = zod_1.z.object({
|
|
32
|
+
overlays: zod_1.z.array(videoPlan_schema_1.TextOverlaySchema).max(4),
|
|
33
|
+
});
|
|
34
|
+
const personaPack = opts.persona ? personas_1.PERSONA_PACKS[opts.persona] : null;
|
|
35
|
+
const brandKitSection = (0, promptSections_1.buildBrandKitSection)(opts.brandKit ?? null);
|
|
36
|
+
const bibleSection = (0, promptSections_1.buildBibleSection)(opts.bible ?? null);
|
|
37
|
+
const closingHint = opts.isClosingScene
|
|
38
|
+
? " - This IS the CLOSING scene — you MUST include role='cta' (max 5 words, brand + verb, e.g. 'Get HydraPure Today')."
|
|
39
|
+
: " - This is NOT the closing scene — do NOT emit role='cta' (CTA belongs only on the final scene).";
|
|
40
|
+
const watermarkHint = scene.sceneIndex === 0
|
|
41
|
+
? " - This IS scene 0 — you MAY include exactly one role='watermark' overlay with persistAcrossScenes:true (max 2 words, brand name)."
|
|
42
|
+
: " - This is NOT scene 0 — do NOT emit role='watermark' (watermark is emitted once on scene 0 and auto-carries forward).";
|
|
43
|
+
const overlayContract = [
|
|
44
|
+
"Emit ONLY this scene's overlays (array of TextOverlay, max 4 entries).",
|
|
45
|
+
"Each overlay = { text, role, position?, persistAcrossScenes?, emphasis?, animation?, startMs?, endMs? }.",
|
|
46
|
+
"CRITICAL: `text` is the LITERAL on-screen copy users will read — NOT a description of how it should look. Styling (font, color, position, drop-shadow) is applied automatically from the role.",
|
|
47
|
+
" GOOD: text:\"Your eyes lie to you\"",
|
|
48
|
+
" BAD: text:\"Bold white sans-serif subtitle in the lower third of a 9:16 frame\" (REJECTED as styling description)",
|
|
49
|
+
"Roles + word limits:",
|
|
50
|
+
" headline — top, big-bold, max 6 words (the hook).",
|
|
51
|
+
" subheadline — lower-third, medium, max 8 words.",
|
|
52
|
+
" body — lower-third, small, max 14 words (a supporting line of actual copy).",
|
|
53
|
+
" cta — bottom pill, bold, max 5 words, MUST combine brand + verb.",
|
|
54
|
+
" watermark — bottom-right tiny, max 2 words, just the brand name.",
|
|
55
|
+
" disclaimer — tiny bottom legal copy.",
|
|
56
|
+
" label — in-frame object/person label, max 3 words.",
|
|
57
|
+
"Max 4 overlays per scene. Don't emit two headlines on the same scene.",
|
|
58
|
+
"Emojis are OK — the renderer supports color glyphs natively.",
|
|
59
|
+
closingHint,
|
|
60
|
+
watermarkHint,
|
|
61
|
+
].join("\n");
|
|
62
|
+
const personaLine = personaPack
|
|
63
|
+
? `Persona: ${opts.persona} — ${personaPack.plannerPrompt.split("\n")[0]}`
|
|
64
|
+
: "";
|
|
65
|
+
const system = [
|
|
66
|
+
"You are a video-overlay copywriter.",
|
|
67
|
+
"Given ONE scene from a VideoPlan, emit a fresh `overlays[]` for that scene.",
|
|
68
|
+
"The rest of the plan (other scenes, VO, visuals, music) is fixed — do not comment on it, do not return it.",
|
|
69
|
+
"",
|
|
70
|
+
overlayContract,
|
|
71
|
+
personaLine,
|
|
72
|
+
brandKitSection,
|
|
73
|
+
bibleSection,
|
|
74
|
+
]
|
|
75
|
+
.filter(Boolean)
|
|
76
|
+
.join("\n");
|
|
77
|
+
const sceneContext = {
|
|
78
|
+
sceneIndex: scene.sceneIndex,
|
|
79
|
+
intent: scene.intent,
|
|
80
|
+
prompt: scene.prompt,
|
|
81
|
+
voiceoverLine: scene.voiceoverLine,
|
|
82
|
+
onScreenText: scene.onScreenText,
|
|
83
|
+
durationMs: scene.durationMs,
|
|
84
|
+
currentOverlays: scene.overlays ?? [],
|
|
85
|
+
};
|
|
86
|
+
const userParts = [
|
|
87
|
+
`Brief context:\n${JSON.stringify({
|
|
88
|
+
rawPrompt: brief.rawPrompt,
|
|
89
|
+
tone: brief.tone,
|
|
90
|
+
niche: brief.niche,
|
|
91
|
+
}, null, 2)}`,
|
|
92
|
+
`Scene:\n${JSON.stringify(sceneContext, null, 2)}`,
|
|
93
|
+
];
|
|
94
|
+
if (opts.instruction?.trim()) {
|
|
95
|
+
userParts.push(`Caller instruction: ${opts.instruction.trim()}`);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
userParts.push("No specific instruction — produce a fresh, on-brand overlay set that fits the scene's intent and voiceoverLine.");
|
|
99
|
+
}
|
|
100
|
+
const user = userParts.join("\n\n");
|
|
101
|
+
let lastErrors;
|
|
102
|
+
for (let attempt = 0; attempt <= deps.maxRetries; attempt++) {
|
|
103
|
+
const messages = [
|
|
104
|
+
{ role: "system", content: system },
|
|
105
|
+
{
|
|
106
|
+
role: "user",
|
|
107
|
+
content: lastErrors
|
|
108
|
+
? `${user}\n\nPrevious attempt failed validation: ${lastErrors}\nFix and try again.`
|
|
109
|
+
: user,
|
|
110
|
+
},
|
|
111
|
+
];
|
|
112
|
+
try {
|
|
113
|
+
const result = await deps.llm.structured({
|
|
114
|
+
model,
|
|
115
|
+
fallbackModel,
|
|
116
|
+
messages,
|
|
117
|
+
schema: FocusedOverlaySchema,
|
|
118
|
+
schemaName: "SceneOverlays",
|
|
119
|
+
temperature: attempt === 0 ? 0.6 : 0.3,
|
|
120
|
+
});
|
|
121
|
+
const overlays = result.data.overlays;
|
|
122
|
+
// Re-use the same style-leak validator the full-plan path uses by
|
|
123
|
+
// wrapping the overlays in a single-scene VideoPlan-shaped object.
|
|
124
|
+
// Cheaper than re-implementing the regex set here.
|
|
125
|
+
const probe = {
|
|
126
|
+
scenes: [{ ...scene, overlays }],
|
|
127
|
+
};
|
|
128
|
+
const leak = (0, overlaySanity_1.checkOverlayContentSanity)(probe);
|
|
129
|
+
if (leak) {
|
|
130
|
+
lastErrors = leak;
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
return overlays;
|
|
134
|
+
}
|
|
135
|
+
catch (e) {
|
|
136
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
137
|
+
if (/schema validation failed|non-JSON|empty response/i.test(msg)) {
|
|
138
|
+
lastErrors = `Previous attempt failed validation: ${msg.slice(0, 400)}.`;
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
throw e;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
throw new Error(`Planner failed to produce valid overlays for scene ${scene.sceneIndex} after ${deps.maxRetries + 1} attempts. Last errors: ${lastErrors}`);
|
|
145
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AgentPersona } from "../../../schemas/agentPersona.schema";
|
|
2
|
+
import { VideoBrief } from "../../../schemas/brief.schema";
|
|
3
|
+
import { AgentVisualBible } from "../../../schemas/videoPlan.schema";
|
|
4
|
+
import { IBrandKitModel, IStyleMemoryModel } from "../../../models/agent.model";
|
|
5
|
+
/**
|
|
6
|
+
* Planner prompt assembly + the web-research heuristic. Pure functions (no LLM
|
|
7
|
+
* call, no class state) so the Planner class stays focused on the
|
|
8
|
+
* call/validate/retry loop. buildPlannerMessages is shared by plan() and
|
|
9
|
+
* planStream().
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildPlannerMessages(brief: VideoBrief, persona: AgentPersona | undefined, brandKit: IBrandKitModel | null, styleMemory: IStyleMemoryModel | null, bible: AgentVisualBible | null, lastErrors?: string, useResearchCall?: boolean): ({
|
|
12
|
+
role: "system";
|
|
13
|
+
content: string;
|
|
14
|
+
} | {
|
|
15
|
+
role: "user";
|
|
16
|
+
content: string;
|
|
17
|
+
})[];
|
|
18
|
+
/**
|
|
19
|
+
* Heuristic — does the brief mention real-world entities that benefit from
|
|
20
|
+
* web grounding? A planner without research will happily invent fake app
|
|
21
|
+
* names, fabricate statistics, and miss real-world brand details. Triggers
|
|
22
|
+
* when the brief contains:
|
|
23
|
+
* - explicit "top N / best / popular / list of" framings
|
|
24
|
+
* - proper-noun-heavy briefs (≥2 capitalized non-sentence-start words)
|
|
25
|
+
* - listicle/comparison/news/review keywords
|
|
26
|
+
* - explicit time markers ("2026", "latest", "this year", "recent")
|
|
27
|
+
* - statistics signals ("statistics", "data", "percent", "study")
|
|
28
|
+
*
|
|
29
|
+
* Deliberately conservative — false negatives are fine (we just skip the
|
|
30
|
+
* search), false positives waste $0.01 per planner call. Override via
|
|
31
|
+
* `useWebResearch: true|false` when the caller knows better.
|
|
32
|
+
*/
|
|
33
|
+
export declare function briefNeedsWebResearch(brief: VideoBrief): boolean;
|
|
34
|
+
//# sourceMappingURL=plannerMessages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plannerMessages.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/planner/plannerMessages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAchF;;;;;GAKG;AAEH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,YAAY,GAAG,SAAS,EACjC,QAAQ,EAAE,cAAc,GAAG,IAAI,EAC/B,WAAW,EAAE,iBAAiB,GAAG,IAAI,EACrC,KAAK,EAAE,gBAAgB,GAAG,IAAI,EAC9B,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,UAAQ;;;;;;KAmIxB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAiChE"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildPlannerMessages = buildPlannerMessages;
|
|
4
|
+
exports.briefNeedsWebResearch = briefNeedsWebResearch;
|
|
5
|
+
const personas_1 = require("../personas");
|
|
6
|
+
const modelQualityNotes_1 = require("../modelQualityNotes");
|
|
7
|
+
const promptSections_1 = require("./promptSections");
|
|
8
|
+
const structuralRules_1 = require("./structuralRules");
|
|
9
|
+
/**
|
|
10
|
+
* Planner prompt assembly + the web-research heuristic. Pure functions (no LLM
|
|
11
|
+
* call, no class state) so the Planner class stays focused on the
|
|
12
|
+
* call/validate/retry loop. buildPlannerMessages is shared by plan() and
|
|
13
|
+
* planStream().
|
|
14
|
+
*/
|
|
15
|
+
function buildPlannerMessages(brief, persona, brandKit, styleMemory, bible, lastErrors, useResearchCall = false) {
|
|
16
|
+
const structuralRulesSection = (0, structuralRules_1.buildStructuralRulesSection)(brief);
|
|
17
|
+
const personaSection = persona
|
|
18
|
+
? [
|
|
19
|
+
"",
|
|
20
|
+
`Selected persona: ${persona}.`,
|
|
21
|
+
`Set plan.persona to "${persona}" in the output.`,
|
|
22
|
+
"Persona-specific structural rules (apply on top of the global tier rules):",
|
|
23
|
+
personas_1.PERSONA_PACKS[persona].plannerPrompt,
|
|
24
|
+
].join("\n")
|
|
25
|
+
: "";
|
|
26
|
+
const brandKitSection = (0, promptSections_1.buildBrandKitSection)(brandKit);
|
|
27
|
+
const styleMemorySection = (0, promptSections_1.buildStyleMemorySection)(styleMemory);
|
|
28
|
+
const bibleSection = (0, promptSections_1.buildBibleSection)(bible);
|
|
29
|
+
const modelCatalogSection = (0, promptSections_1.buildModelCatalogSection)();
|
|
30
|
+
const preferredModelsSection = (0, promptSections_1.buildPreferredModelsSection)(brief.preferredModelKeys);
|
|
31
|
+
const videoStrategySection = (0, promptSections_1.buildVideoStrategySection)(brief.videoStrategy);
|
|
32
|
+
// AG-39: warn the planner away from models with known capability gaps for
|
|
33
|
+
// dimensions this brief signals it cares about (brand text on product
|
|
34
|
+
// labels is the immediate driver). Empty string when nothing rated.
|
|
35
|
+
const modelQualitySection = (0, modelQualityNotes_1.renderModelQualityHintsForSystemPrompt)({
|
|
36
|
+
needsBrandText: (0, promptSections_1.briefMentionsBrandText)(brief),
|
|
37
|
+
needsCharacterContinuity: persona === "ugc-ad" || persona === "talking-head",
|
|
38
|
+
needsFastMotion: brief.tone?.toLowerCase()?.includes("energetic") || brief.tone?.toLowerCase()?.includes("action"),
|
|
39
|
+
needsCinematic: brief.tone?.toLowerCase()?.includes("cinematic"),
|
|
40
|
+
});
|
|
41
|
+
const researchSection = useResearchCall
|
|
42
|
+
? [
|
|
43
|
+
"",
|
|
44
|
+
"RESEARCH MODE — `web_search` is enabled. The brief mentions real-world",
|
|
45
|
+
"subjects (products, companies, people, places, events, or statistics).",
|
|
46
|
+
"Before planning, run targeted `web_search` calls (max 5) to ground the",
|
|
47
|
+
"plan in real facts: real product names, real feature lists, real logos,",
|
|
48
|
+
"real statistics, real quotes. Use the results to populate scene prompts,",
|
|
49
|
+
"voiceover lines, and overlay copy — NEVER fabricate company names,",
|
|
50
|
+
"product specs, or numbers. Cite findings implicitly via accurate copy;",
|
|
51
|
+
"do not embed raw URLs in the plan. When done researching, call the",
|
|
52
|
+
"`submit_VideoPlan` tool with the final plan.",
|
|
53
|
+
"",
|
|
54
|
+
].join("\n")
|
|
55
|
+
: "";
|
|
56
|
+
const system = [
|
|
57
|
+
"You are a video-production planner.",
|
|
58
|
+
"Given a VideoBrief, produce a VideoPlan: an ordered list of scenes",
|
|
59
|
+
"with per-scene asset strategy, tier, prompt, duration, and voiceover.",
|
|
60
|
+
researchSection,
|
|
61
|
+
"",
|
|
62
|
+
"Tier rules — respect brief.tierBudget as the maximum tier:",
|
|
63
|
+
" T0: stock footage / image with Ken-Burns motion.",
|
|
64
|
+
" T1: AI-generated still + camera motion.",
|
|
65
|
+
" T2: AI image-to-video on key frames only.",
|
|
66
|
+
" T3: full text-to-video (most expensive — use sparingly).",
|
|
67
|
+
"",
|
|
68
|
+
"Stock strategy bias — when budget is T0 and the scene depicts something",
|
|
69
|
+
"with natural motion (skies, light, water, traffic, hands at work,",
|
|
70
|
+
"animals, machinery, weather, crowds), prefer strategy='stock-video' over",
|
|
71
|
+
"'stock-image-ken-burns'. Static images with synthesized zoom feel like",
|
|
72
|
+
"a slideshow when chained for >3 cuts; real stock clips give the same",
|
|
73
|
+
"T0 cost with genuine motion. Only fall back to stock-image-ken-burns",
|
|
74
|
+
"when the subject is inherently still (diagrams, infographics, single",
|
|
75
|
+
"objects on a table, frozen moments) OR when the brief explicitly asks",
|
|
76
|
+
"for a poster/title-card feel.",
|
|
77
|
+
"",
|
|
78
|
+
videoStrategySection,
|
|
79
|
+
"",
|
|
80
|
+
"talking-head-avatar is wired and runs the kling-avatar pipeline (face",
|
|
81
|
+
"still + TTS lipsync). Pick it ONLY when the brand kit exposes a",
|
|
82
|
+
"presenterFaceUrl — set scene.avatarFaceUrl to that URL on every avatar",
|
|
83
|
+
"scene. If no presenter face is available, fall back to ai-image-to-video",
|
|
84
|
+
"or stock-video of a presenter instead.",
|
|
85
|
+
"",
|
|
86
|
+
"user-asset is wired and reuses the requesting user's existing library",
|
|
87
|
+
"(their previously generated images / videos / audio) instead of spending",
|
|
88
|
+
"credits to make a new asset. Pick user-asset when the brief mentions a",
|
|
89
|
+
"recurring brand subject (their product photo, spokesperson, b-roll) —",
|
|
90
|
+
"the executor falls back to stock-video if no library match scores high",
|
|
91
|
+
"enough, so picking it is safe.",
|
|
92
|
+
"",
|
|
93
|
+
"Keep total estimated credits as low as possible while honoring the",
|
|
94
|
+
"brief. Mix tiers within a single video where it helps cost without",
|
|
95
|
+
"harming quality (e.g. T2 hero shot + T0 b-roll between).",
|
|
96
|
+
"",
|
|
97
|
+
"Smart model routing — set preferredModel per scene from the catalog:",
|
|
98
|
+
" - Hero / opening-hook / product-reveal scenes: pick the highest-",
|
|
99
|
+
" quality model in the chosen tier (most expensive in that tier).",
|
|
100
|
+
" - B-roll / filler / transition scenes: pick the cheapest model in",
|
|
101
|
+
" the chosen tier — the audience won't notice the difference and",
|
|
102
|
+
" cost drops 3–5x.",
|
|
103
|
+
" - When in doubt for a non-hero scene, pick the median-cost model.",
|
|
104
|
+
" - preferredModel must match a key from the catalog below; the",
|
|
105
|
+
" executor will swap on rate-limit, so picking is best-effort, not",
|
|
106
|
+
" a hard contract.",
|
|
107
|
+
modelCatalogSection,
|
|
108
|
+
preferredModelsSection,
|
|
109
|
+
modelQualitySection,
|
|
110
|
+
// AG-14 fix: persona section moved above structuralRulesSection and
|
|
111
|
+
// bibleSection. The bible block has multiple "MUST" rules that were
|
|
112
|
+
// crowding out persona.hookStyle when persona was the last item before
|
|
113
|
+
// brandKit; on `seed-ugc-skincare` this regressed hookStrength to 0.4
|
|
114
|
+
// (planner picked a generic "Wait…" opener instead of the brief's
|
|
115
|
+
// problem-statement hook). Order is now: persona (voice + hookStyle) →
|
|
116
|
+
// structural rules → bible (entity verbatim re-statement).
|
|
117
|
+
personaSection,
|
|
118
|
+
structuralRulesSection,
|
|
119
|
+
bibleSection,
|
|
120
|
+
brandKitSection,
|
|
121
|
+
styleMemorySection,
|
|
122
|
+
]
|
|
123
|
+
.filter(Boolean)
|
|
124
|
+
.join("\n");
|
|
125
|
+
const user = [
|
|
126
|
+
`Brief:\n${JSON.stringify(brief, null, 2)}`,
|
|
127
|
+
lastErrors
|
|
128
|
+
? `\nYour previous attempt failed validation: ${lastErrors}\nFix the structure and try again.`
|
|
129
|
+
: "",
|
|
130
|
+
]
|
|
131
|
+
.filter(Boolean)
|
|
132
|
+
.join("\n");
|
|
133
|
+
return [
|
|
134
|
+
{ role: "system", content: system },
|
|
135
|
+
{ role: "user", content: user },
|
|
136
|
+
];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Heuristic — does the brief mention real-world entities that benefit from
|
|
140
|
+
* web grounding? A planner without research will happily invent fake app
|
|
141
|
+
* names, fabricate statistics, and miss real-world brand details. Triggers
|
|
142
|
+
* when the brief contains:
|
|
143
|
+
* - explicit "top N / best / popular / list of" framings
|
|
144
|
+
* - proper-noun-heavy briefs (≥2 capitalized non-sentence-start words)
|
|
145
|
+
* - listicle/comparison/news/review keywords
|
|
146
|
+
* - explicit time markers ("2026", "latest", "this year", "recent")
|
|
147
|
+
* - statistics signals ("statistics", "data", "percent", "study")
|
|
148
|
+
*
|
|
149
|
+
* Deliberately conservative — false negatives are fine (we just skip the
|
|
150
|
+
* search), false positives waste $0.01 per planner call. Override via
|
|
151
|
+
* `useWebResearch: true|false` when the caller knows better.
|
|
152
|
+
*/
|
|
153
|
+
function briefNeedsWebResearch(brief) {
|
|
154
|
+
const text = [
|
|
155
|
+
brief.rawPrompt ?? "",
|
|
156
|
+
brief.tone ?? "",
|
|
157
|
+
brief.niche ?? "",
|
|
158
|
+
]
|
|
159
|
+
.filter(Boolean)
|
|
160
|
+
.join(" ");
|
|
161
|
+
if (!text.trim())
|
|
162
|
+
return false;
|
|
163
|
+
const lower = text.toLowerCase();
|
|
164
|
+
const listicleSignals = /\b(top\s+\d+|best\s+\d*\s*\w+|popular|list\s+of|review|comparison|vs\.?|versus|trending|latest|recent|news|breaking|study|statistics?|data|percent|%|million|billion|industry|market|report)\b/;
|
|
165
|
+
if (listicleSignals.test(lower))
|
|
166
|
+
return true;
|
|
167
|
+
const yearMarker = /\b(20\d{2}|this\s+year|last\s+year)\b/;
|
|
168
|
+
if (yearMarker.test(lower))
|
|
169
|
+
return true;
|
|
170
|
+
// Count proper nouns that aren't sentence-starters — heuristic for
|
|
171
|
+
// "specific brands / people / places".
|
|
172
|
+
const words = text.split(/\s+/);
|
|
173
|
+
let properNouns = 0;
|
|
174
|
+
for (let i = 0; i < words.length; i++) {
|
|
175
|
+
const w = words[i] ?? "";
|
|
176
|
+
const prev = i > 0 ? words[i - 1] ?? "" : "";
|
|
177
|
+
const isSentenceStart = i === 0 || /[.!?]$/.test(prev);
|
|
178
|
+
if (!isSentenceStart && /^[A-Z][a-zA-Z0-9]{2,}/.test(w)) {
|
|
179
|
+
properNouns++;
|
|
180
|
+
if (properNouns >= 2)
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
@@ -12,6 +12,18 @@ export declare function briefMentionsBrandText(brief: VideoBrief): boolean;
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function buildVideoStrategySection(strategy: "direct" | "indirect" | "auto" | undefined): string;
|
|
14
14
|
export declare function buildModelCatalogSection(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Render the user's soft model preference (`brief.preferredModelKeys`, fed by
|
|
17
|
+
* the composer's "@Models" mention category) into a planner-readable rule.
|
|
18
|
+
*
|
|
19
|
+
* Each key is annotated with its REAL modality from the catalog so the planner
|
|
20
|
+
* can tell a video model from an image-generation-only one. The instruction
|
|
21
|
+
* makes the preference advisory: favor a preferred model when it can produce
|
|
22
|
+
* the scene, and gracefully fall back (same provider first) when it can't —
|
|
23
|
+
* which is exactly the "user @-mentioned an image-gen model for a video"
|
|
24
|
+
* false-request case. Returns "" when the user expressed no preference.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildPreferredModelsSection(preferredModelKeys: string[] | undefined): string;
|
|
15
27
|
export declare function buildBrandKitSection(brandKit: IBrandKitModel | null): string;
|
|
16
28
|
/**
|
|
17
29
|
* AG-12 — render the Visual Bible into the planner system prompt. When a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptSections.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/planner/promptSections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"promptSections.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/planner/promptSections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAShF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAGjE;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GACnD,MAAM,CAkCR;AAED,wBAAgB,wBAAwB,IAAI,MAAM,CAWjD;AAYD;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,kBAAkB,EAAE,MAAM,EAAE,GAAG,SAAS,GACvC,MAAM,CAmCR;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,GAAG,MAAM,CAgC5E;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,MAAM,CAqCxE;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,MAAM,CAsBhF"}
|
|
@@ -3,10 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.briefMentionsBrandText = briefMentionsBrandText;
|
|
4
4
|
exports.buildVideoStrategySection = buildVideoStrategySection;
|
|
5
5
|
exports.buildModelCatalogSection = buildModelCatalogSection;
|
|
6
|
+
exports.buildPreferredModelsSection = buildPreferredModelsSection;
|
|
6
7
|
exports.buildBrandKitSection = buildBrandKitSection;
|
|
7
8
|
exports.buildBibleSection = buildBibleSection;
|
|
8
9
|
exports.buildStyleMemorySection = buildStyleMemorySection;
|
|
9
10
|
const tierHelpers_1 = require("../../../globals/aiModels/tierHelpers");
|
|
11
|
+
const aiModels_1 = require("../../../globals/aiModels");
|
|
10
12
|
// AG-39: heuristic — does the brief signal that the planner should care
|
|
11
13
|
// about on-screen brand text (so scenes get steered away from models
|
|
12
14
|
// known to mangle text)? Looks at brief.brandName, brief.productName,
|
|
@@ -73,6 +75,61 @@ function buildModelCatalogSection() {
|
|
|
73
75
|
sections.push("", "Image-to-video models by tier (cheapest first):", i2v);
|
|
74
76
|
return sections.join("\n");
|
|
75
77
|
}
|
|
78
|
+
const VIDEO_MODALITIES = new Set([
|
|
79
|
+
"text-to-video",
|
|
80
|
+
"image-to-video",
|
|
81
|
+
"video-to-video",
|
|
82
|
+
"audio-to-video",
|
|
83
|
+
"avatar-video",
|
|
84
|
+
"motion-control",
|
|
85
|
+
"lip-sync",
|
|
86
|
+
]);
|
|
87
|
+
/**
|
|
88
|
+
* Render the user's soft model preference (`brief.preferredModelKeys`, fed by
|
|
89
|
+
* the composer's "@Models" mention category) into a planner-readable rule.
|
|
90
|
+
*
|
|
91
|
+
* Each key is annotated with its REAL modality from the catalog so the planner
|
|
92
|
+
* can tell a video model from an image-generation-only one. The instruction
|
|
93
|
+
* makes the preference advisory: favor a preferred model when it can produce
|
|
94
|
+
* the scene, and gracefully fall back (same provider first) when it can't —
|
|
95
|
+
* which is exactly the "user @-mentioned an image-gen model for a video"
|
|
96
|
+
* false-request case. Returns "" when the user expressed no preference.
|
|
97
|
+
*/
|
|
98
|
+
function buildPreferredModelsSection(preferredModelKeys) {
|
|
99
|
+
if (!preferredModelKeys || preferredModelKeys.length === 0)
|
|
100
|
+
return "";
|
|
101
|
+
const lines = preferredModelKeys.map((key) => {
|
|
102
|
+
const config = aiModels_1.aiModelConfigs[key];
|
|
103
|
+
if (!config) {
|
|
104
|
+
return ` - ${key} (unknown model — ignore unless it matches a catalog key)`;
|
|
105
|
+
}
|
|
106
|
+
const modality = config.type.join(", ");
|
|
107
|
+
const videoCapable = config.type.some((t) => VIDEO_MODALITIES.has(t));
|
|
108
|
+
const note = videoCapable
|
|
109
|
+
? ""
|
|
110
|
+
: " ← image-generation only, cannot produce a video scene";
|
|
111
|
+
return ` - ${key} (modality: ${modality})${note}`;
|
|
112
|
+
});
|
|
113
|
+
return [
|
|
114
|
+
"",
|
|
115
|
+
"User model preference (SOFT hint — NOT a hard constraint):",
|
|
116
|
+
"The user @-mentioned the following generation model(s), strongest first:",
|
|
117
|
+
...lines,
|
|
118
|
+
"Apply this preference as follows:",
|
|
119
|
+
" - For each AI video scene, if a preferred model's modality supports the",
|
|
120
|
+
" scene's strategy (text-to-video → ai-text-to-video; image-to-video →",
|
|
121
|
+
" ai-image-to-video), set scene.preferredModel to it — favor the",
|
|
122
|
+
" earliest-listed compatible one.",
|
|
123
|
+
" - If NONE of the preferred models can produce a given scene (e.g. the",
|
|
124
|
+
" user only named an image-generation model but the scene needs video),",
|
|
125
|
+
" DO NOT force it. Prefer the closest model from the SAME provider/family",
|
|
126
|
+
" that can (e.g. a Kling image model → a Kling video model), otherwise",
|
|
127
|
+
" fall back to the best catalog model per the routing rules above.",
|
|
128
|
+
" - NEVER set scene.preferredModel to a model that can't output the scene's",
|
|
129
|
+
" required modality. The preference improves model choice; it must not",
|
|
130
|
+
" break the plan.",
|
|
131
|
+
].join("\n");
|
|
132
|
+
}
|
|
76
133
|
function buildBrandKitSection(brandKit) {
|
|
77
134
|
if (!brandKit)
|
|
78
135
|
return "";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AgentPersona } from "../../../schemas/agentPersona.schema";
|
|
2
|
+
import { VideoBrief } from "../../../schemas/brief.schema";
|
|
3
|
+
import { AgentVisualBible, VideoPlan } from "../../../schemas/videoPlan.schema";
|
|
4
|
+
import { LlmCaller } from "../llmCaller";
|
|
5
|
+
/**
|
|
6
|
+
* Stream L (L-3) — script-first authoring pipeline for long-form (L1/L2) plans.
|
|
7
|
+
*
|
|
8
|
+
* The scene-first Planner (single structured LLM call → VideoPlan) is tuned for
|
|
9
|
+
* shorts; on a 3-60min video its per-scene voiceoverLines drift because each is
|
|
10
|
+
* written in isolation and the through-line is lost. Script-first fixes that
|
|
11
|
+
* with three passes (the L-4 tool cores):
|
|
12
|
+
*
|
|
13
|
+
* 1. generate_script — brief → full coherent narration (one writer pass)
|
|
14
|
+
* 2. chapter_outline — script → titled chapters (verbatim slices)
|
|
15
|
+
* 3. match_broll_to_script — per chapter: narration → B-roll scenes whose
|
|
16
|
+
* voiceoverLines are verbatim sentence slices
|
|
17
|
+
*
|
|
18
|
+
* The scenes are concatenated in chapter order (sceneIndex contiguous from 0),
|
|
19
|
+
* each chapter's sceneIndices back-filled, and the result assembled + validated
|
|
20
|
+
* into a VideoPlan that already satisfies the L-2 chapter contract by
|
|
21
|
+
* construction. Credit/duration/warning stamps mirror the scene-first finalize.
|
|
22
|
+
*
|
|
23
|
+
* Note: this path does NOT use the LLM to author scene durations or pick
|
|
24
|
+
* preferredModel — durations come from TTS length (3-8s band, in the core) and
|
|
25
|
+
* model selection is left to the executor's default + autoCorrectPreferredModels
|
|
26
|
+
* at execute time, same as a scene-first plan that omits preferredModel.
|
|
27
|
+
*/
|
|
28
|
+
export interface ScriptFirstDeps {
|
|
29
|
+
llm: LlmCaller;
|
|
30
|
+
}
|
|
31
|
+
export declare function planScriptFirst(deps: ScriptFirstDeps, brief: VideoBrief, opts?: {
|
|
32
|
+
persona?: AgentPersona;
|
|
33
|
+
bible?: AgentVisualBible | null;
|
|
34
|
+
}): Promise<VideoPlan>;
|
|
35
|
+
//# sourceMappingURL=scriptFirstPlanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scriptFirstPlanner.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/planner/scriptFirstPlanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAoB,MAAM,+BAA+B,CAAC;AAE7E,OAAO,EACL,gBAAgB,EAGhB,SAAS,EAEV,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAYzC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,SAAS,CAAC;CAChB;AAQD,wBAAsB,eAAe,CACnC,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,UAAU,EACjB,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,YAAY,CAAC;IAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAAO,GACrE,OAAO,CAAC,SAAS,CAAC,CAuIpB"}
|