vidspotai-shared 1.0.82 → 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 +82 -0
- 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 +67 -0
- 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 +114 -0
- 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 +2 -2
- 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/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 +63 -0
- package/lib/services/agent/tools/composeScene.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/estimateCost.tool.d.ts +27 -0
- 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 +56 -0
- 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 +21 -0
- 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/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 +24 -1
- package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/google.service.js +87 -243
- 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/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/bullmq.service.d.ts +61 -0
- package/lib/services/bullmq.service.d.ts.map +1 -1
- package/lib/services/bullmq.service.js +101 -1
- 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 +12 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +12 -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/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/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
|
@@ -5,12 +5,16 @@
|
|
|
5
5
|
export * from "./searchStock.tool";
|
|
6
6
|
export * from "./generateImage.tool";
|
|
7
7
|
export * from "./generateVideo.tool";
|
|
8
|
+
export * from "./extendVideo.tool";
|
|
8
9
|
export * from "./generateVoiceover.tool";
|
|
9
10
|
export * from "./generateCaptions.tool";
|
|
10
11
|
export * from "./animateImage.tool";
|
|
11
12
|
export * from "./animateImageWithMotionBrush.tool";
|
|
12
13
|
export * from "./generateAvatarVideo.tool";
|
|
13
14
|
export * from "./planVideo.tool";
|
|
15
|
+
export * from "./generateScript.tool";
|
|
16
|
+
export * from "./chapterOutline.tool";
|
|
17
|
+
export * from "./matchBrollToScript.tool";
|
|
14
18
|
export * from "./composeScene.tool";
|
|
15
19
|
export * from "./render.tool";
|
|
16
20
|
export * from "./analyzeReference.tool";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC"}
|
|
@@ -21,12 +21,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
__exportStar(require("./searchStock.tool"), exports);
|
|
22
22
|
__exportStar(require("./generateImage.tool"), exports);
|
|
23
23
|
__exportStar(require("./generateVideo.tool"), exports);
|
|
24
|
+
__exportStar(require("./extendVideo.tool"), exports);
|
|
24
25
|
__exportStar(require("./generateVoiceover.tool"), exports);
|
|
25
26
|
__exportStar(require("./generateCaptions.tool"), exports);
|
|
26
27
|
__exportStar(require("./animateImage.tool"), exports);
|
|
27
28
|
__exportStar(require("./animateImageWithMotionBrush.tool"), exports);
|
|
28
29
|
__exportStar(require("./generateAvatarVideo.tool"), exports);
|
|
29
30
|
__exportStar(require("./planVideo.tool"), exports);
|
|
31
|
+
__exportStar(require("./generateScript.tool"), exports);
|
|
32
|
+
__exportStar(require("./chapterOutline.tool"), exports);
|
|
33
|
+
__exportStar(require("./matchBrollToScript.tool"), exports);
|
|
30
34
|
__exportStar(require("./composeScene.tool"), exports);
|
|
31
35
|
__exportStar(require("./render.tool"), exports);
|
|
32
36
|
__exportStar(require("./analyzeReference.tool"), exports);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Aspect } from "../../../schemas/project.schema";
|
|
3
|
+
import { LlmCaller } from "../llmCaller";
|
|
4
|
+
import { ToolDefinition } from "../toolRegistry";
|
|
5
|
+
declare const InputSchema: z.ZodObject<{
|
|
6
|
+
narration: z.ZodString;
|
|
7
|
+
aspect: z.ZodEnum<{
|
|
8
|
+
"9:16": "9:16";
|
|
9
|
+
"1:1": "1:1";
|
|
10
|
+
"4:5": "4:5";
|
|
11
|
+
"16:9": "16:9";
|
|
12
|
+
}>;
|
|
13
|
+
niche: z.ZodOptional<z.ZodString>;
|
|
14
|
+
startSceneIndex: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
wpm: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
declare const BrollSceneSchema: z.ZodObject<{
|
|
18
|
+
sceneIndex: z.ZodNumber;
|
|
19
|
+
intent: z.ZodString;
|
|
20
|
+
prompt: z.ZodString;
|
|
21
|
+
voiceoverLine: z.ZodString;
|
|
22
|
+
strategy: z.ZodLiteral<"ai-image-to-video">;
|
|
23
|
+
durationMs: z.ZodNumber;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
declare const OutputSchema: z.ZodObject<{
|
|
26
|
+
scenes: z.ZodArray<z.ZodObject<{
|
|
27
|
+
sceneIndex: z.ZodNumber;
|
|
28
|
+
intent: z.ZodString;
|
|
29
|
+
prompt: z.ZodString;
|
|
30
|
+
voiceoverLine: z.ZodString;
|
|
31
|
+
strategy: z.ZodLiteral<"ai-image-to-video">;
|
|
32
|
+
durationMs: z.ZodNumber;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type BrollScene = z.infer<typeof BrollSceneSchema>;
|
|
36
|
+
/**
|
|
37
|
+
* Pure core, shared by the tool handler and the script-first planner (L-3).
|
|
38
|
+
*/
|
|
39
|
+
export declare function matchBrollToScriptCore(llm: LlmCaller, args: {
|
|
40
|
+
narration: string;
|
|
41
|
+
aspect: Aspect;
|
|
42
|
+
niche?: string;
|
|
43
|
+
startSceneIndex: number;
|
|
44
|
+
wpm?: number;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
scenes: BrollScene[];
|
|
47
|
+
}>;
|
|
48
|
+
export declare const matchBrollToScriptTool: ToolDefinition<typeof InputSchema, typeof OutputSchema>;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=matchBrollToScript.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchBrollToScript.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/matchBrollToScript.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAgB,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAkB/D,QAAA,MAAM,WAAW;;;;;;;;;;;iBAef,CAAC;AAyBH,QAAA,MAAM,gBAAgB;;;;;;;iBASpB,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;iBAEhB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,SAAS,EACd,IAAI,EAAE;IACJ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GACA,OAAO,CAAC;IAAE,MAAM,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC,CAmDnC;AAED,eAAO,MAAM,sBAAsB,EAAE,cAAc,CACjD,OAAO,WAAW,EAClB,OAAO,YAAY,CAoBpB,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.matchBrollToScriptTool = void 0;
|
|
4
|
+
exports.matchBrollToScriptCore = matchBrollToScriptCore;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const project_schema_1 = require("../../../schemas/project.schema");
|
|
7
|
+
const llmCallerRegistry_1 = require("../llmCallerRegistry");
|
|
8
|
+
const modelRouter_1 = require("../modelRouter");
|
|
9
|
+
const ttsDuration_1 = require("../ttsDuration");
|
|
10
|
+
const toolRegistry_1 = require("../toolRegistry");
|
|
11
|
+
/**
|
|
12
|
+
* Stream L (L-4) — match_broll_to_script. Third pass of script-first authoring:
|
|
13
|
+
* explodes ONE chapter's narration into a sequence of B-roll scenes. Each scene
|
|
14
|
+
* pairs a VERBATIM sentence-boundary slice of the narration (the voiceoverLine)
|
|
15
|
+
* with a concrete B-roll visual prompt that illustrates it. Run once per chapter
|
|
16
|
+
* (from chapter_outline); the orchestrator (L-3) concatenates the per-chapter
|
|
17
|
+
* scene lists into the plan and back-fills chapter.sceneIndices.
|
|
18
|
+
*
|
|
19
|
+
* Durations are computed deterministically from the voiceoverLine's TTS length
|
|
20
|
+
* (estimateTtsMs) clamped to the long-form 3-8s band — the model only writes
|
|
21
|
+
* the visual prompt + chooses the sentence grouping, it does NOT set durations.
|
|
22
|
+
*/
|
|
23
|
+
const LONGFORM_MIN_MS = 3000;
|
|
24
|
+
const LONGFORM_MAX_MS = 8000;
|
|
25
|
+
const InputSchema = zod_1.z.object({
|
|
26
|
+
narration: zod_1.z
|
|
27
|
+
.string()
|
|
28
|
+
.min(1)
|
|
29
|
+
.describe("A single chapter's narration text (verbatim slice of the script)."),
|
|
30
|
+
aspect: project_schema_1.AspectSchema.describe("Target aspect ratio — steers the visual prompts."),
|
|
31
|
+
niche: zod_1.z.string().optional().describe("Brief niche, for visual style steering."),
|
|
32
|
+
/**
|
|
33
|
+
* sceneIndex to assign to the FIRST scene of this chapter; subsequent scenes
|
|
34
|
+
* increment from here. Lets the orchestrator keep indices globally unique and
|
|
35
|
+
* contiguous across chapters.
|
|
36
|
+
*/
|
|
37
|
+
startSceneIndex: zod_1.z.number().int().nonnegative().default(0),
|
|
38
|
+
/** wpm for duration estimates; defaults to TTS calibration. */
|
|
39
|
+
wpm: zod_1.z.number().int().positive().optional(),
|
|
40
|
+
});
|
|
41
|
+
/** The model groups sentences + writes visuals; we stamp index + duration. */
|
|
42
|
+
const LlmBrollSchema = zod_1.z.object({
|
|
43
|
+
scenes: zod_1.z
|
|
44
|
+
.array(zod_1.z.object({
|
|
45
|
+
voiceoverLine: zod_1.z
|
|
46
|
+
.string()
|
|
47
|
+
.describe("One or a few consecutive sentences from the narration, VERBATIM. Concatenating all scenes' voiceoverLines in order must reproduce the chapter narration exactly."),
|
|
48
|
+
intent: zod_1.z
|
|
49
|
+
.string()
|
|
50
|
+
.describe("One-line plain-English description of what this scene shows."),
|
|
51
|
+
prompt: zod_1.z
|
|
52
|
+
.string()
|
|
53
|
+
.describe("A concrete B-roll visual prompt that illustrates the voiceoverLine — subject, setting, lighting, camera. Describe the VISUAL, not the words."),
|
|
54
|
+
}))
|
|
55
|
+
.min(1),
|
|
56
|
+
});
|
|
57
|
+
const BrollSceneSchema = zod_1.z.object({
|
|
58
|
+
sceneIndex: zod_1.z.number().int().nonnegative(),
|
|
59
|
+
intent: zod_1.z.string(),
|
|
60
|
+
prompt: zod_1.z.string(),
|
|
61
|
+
voiceoverLine: zod_1.z.string(),
|
|
62
|
+
/** Strategy hint — long-form B-roll defaults to ai-image-to-video. */
|
|
63
|
+
strategy: zod_1.z.literal("ai-image-to-video"),
|
|
64
|
+
/** TTS-derived duration, clamped to the long-form 3-8s band. */
|
|
65
|
+
durationMs: zod_1.z.number().int().positive(),
|
|
66
|
+
});
|
|
67
|
+
const OutputSchema = zod_1.z.object({
|
|
68
|
+
scenes: zod_1.z.array(BrollSceneSchema),
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* Pure core, shared by the tool handler and the script-first planner (L-3).
|
|
72
|
+
*/
|
|
73
|
+
async function matchBrollToScriptCore(llm, args) {
|
|
74
|
+
const router = new modelRouter_1.ModelRouter();
|
|
75
|
+
const wpm = args.wpm ?? ttsDuration_1.TTS_DEFAULT_WPM;
|
|
76
|
+
const system = [
|
|
77
|
+
"You are a video editor matching B-roll to narration. Split the chapter",
|
|
78
|
+
"narration into a sequence of short scenes. For each scene: (1) copy one or",
|
|
79
|
+
"a few CONSECUTIVE sentences VERBATIM as the voiceoverLine — together they",
|
|
80
|
+
"must reproduce the whole chapter narration with nothing added or dropped;",
|
|
81
|
+
"(2) write a concrete B-roll visual prompt illustrating that line. Prefer",
|
|
82
|
+
"one scene per sentence or two; aim for ~3-8s of speech per scene. Visuals",
|
|
83
|
+
"should vary shot-to-shot (don't repeat the same composition).",
|
|
84
|
+
].join(" ");
|
|
85
|
+
const user = [
|
|
86
|
+
`Target aspect: ${args.aspect}.`,
|
|
87
|
+
args.niche ? `Niche: ${args.niche}.` : "",
|
|
88
|
+
"",
|
|
89
|
+
"CHAPTER NARRATION:",
|
|
90
|
+
args.narration,
|
|
91
|
+
]
|
|
92
|
+
.filter(Boolean)
|
|
93
|
+
.join("\n");
|
|
94
|
+
const res = await llm.structured({
|
|
95
|
+
model: router.pickFor("planner"),
|
|
96
|
+
fallbackModel: router.fallbackFor("planner"),
|
|
97
|
+
schema: LlmBrollSchema,
|
|
98
|
+
schemaName: "BrollScenes",
|
|
99
|
+
messages: [
|
|
100
|
+
{ role: "system", content: system },
|
|
101
|
+
{ role: "user", content: user },
|
|
102
|
+
],
|
|
103
|
+
temperature: 0.6,
|
|
104
|
+
maxTokens: 8000,
|
|
105
|
+
});
|
|
106
|
+
const scenes = res.data.scenes.map((s, i) => {
|
|
107
|
+
const raw = (0, ttsDuration_1.estimateTtsMs)(s.voiceoverLine, wpm);
|
|
108
|
+
const durationMs = Math.min(LONGFORM_MAX_MS, Math.max(LONGFORM_MIN_MS, raw));
|
|
109
|
+
return {
|
|
110
|
+
sceneIndex: args.startSceneIndex + i,
|
|
111
|
+
intent: s.intent,
|
|
112
|
+
prompt: s.prompt,
|
|
113
|
+
voiceoverLine: s.voiceoverLine.trim(),
|
|
114
|
+
strategy: "ai-image-to-video",
|
|
115
|
+
durationMs,
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
return { scenes };
|
|
119
|
+
}
|
|
120
|
+
exports.matchBrollToScriptTool = {
|
|
121
|
+
name: "match_broll_to_script",
|
|
122
|
+
description: [
|
|
123
|
+
"Explode one chapter's narration into B-roll scenes: each scene = a verbatim",
|
|
124
|
+
"sentence slice (voiceoverLine) + a visual prompt. Third pass of script-first",
|
|
125
|
+
"authoring, run once per chapter from chapter_outline. Durations are computed",
|
|
126
|
+
"from TTS length (3-8s band), not chosen by the model.",
|
|
127
|
+
].join(" "),
|
|
128
|
+
inputSchema: InputSchema,
|
|
129
|
+
outputSchema: OutputSchema,
|
|
130
|
+
idempotent: false,
|
|
131
|
+
handler: async (input) => matchBrollToScriptCore((0, llmCallerRegistry_1.getLlmCaller)(), {
|
|
132
|
+
narration: input.narration,
|
|
133
|
+
aspect: input.aspect,
|
|
134
|
+
niche: input.niche,
|
|
135
|
+
startSceneIndex: input.startSceneIndex,
|
|
136
|
+
wpm: input.wpm,
|
|
137
|
+
}),
|
|
138
|
+
};
|
|
139
|
+
(0, toolRegistry_1.registerTool)(exports.matchBrollToScriptTool);
|
|
@@ -55,6 +55,14 @@ declare const InputSchema: z.ZodObject<{
|
|
|
55
55
|
"4:5": "4:5";
|
|
56
56
|
"16:9": "16:9";
|
|
57
57
|
}>>;
|
|
58
|
+
lengthTier: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
S1: "S1";
|
|
60
|
+
S2: "S2";
|
|
61
|
+
M1: "M1";
|
|
62
|
+
L1: "L1";
|
|
63
|
+
L2: "L2";
|
|
64
|
+
L3: "L3";
|
|
65
|
+
}>>;
|
|
58
66
|
voice: z.ZodOptional<z.ZodObject<{
|
|
59
67
|
gender: z.ZodOptional<z.ZodEnum<{
|
|
60
68
|
male: "male";
|
|
@@ -114,12 +122,14 @@ declare const InputSchema: z.ZodObject<{
|
|
|
114
122
|
transcriptExcerpt: z.ZodOptional<z.ZodString>;
|
|
115
123
|
}, z.core.$strip>>;
|
|
116
124
|
}, z.core.$strip>>>;
|
|
125
|
+
preferredModelKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
126
|
tierBudget: z.ZodDefault<z.ZodEnum<{
|
|
118
127
|
T0: "T0";
|
|
119
128
|
T1: "T1";
|
|
120
129
|
T2: "T2";
|
|
121
130
|
T3: "T3";
|
|
122
131
|
}>>;
|
|
132
|
+
maxSpendUSD: z.ZodOptional<z.ZodNumber>;
|
|
123
133
|
videoStrategy: z.ZodOptional<z.ZodEnum<{
|
|
124
134
|
auto: "auto";
|
|
125
135
|
direct: "direct";
|
|
@@ -151,6 +161,14 @@ declare const OutputSchema: z.ZodObject<{
|
|
|
151
161
|
}>;
|
|
152
162
|
totalDurationMs: z.ZodNumber;
|
|
153
163
|
totalEstimatedCredits: z.ZodNumber;
|
|
164
|
+
lengthTier: z.ZodOptional<z.ZodEnum<{
|
|
165
|
+
S1: "S1";
|
|
166
|
+
S2: "S2";
|
|
167
|
+
M1: "M1";
|
|
168
|
+
L1: "L1";
|
|
169
|
+
L2: "L2";
|
|
170
|
+
L3: "L3";
|
|
171
|
+
}>>;
|
|
154
172
|
scenes: z.ZodArray<z.ZodObject<{
|
|
155
173
|
sceneIndex: z.ZodNumber;
|
|
156
174
|
intent: z.ZodString;
|
|
@@ -175,7 +193,15 @@ declare const OutputSchema: z.ZodObject<{
|
|
|
175
193
|
prompt: z.ZodString;
|
|
176
194
|
durationMs: z.ZodNumber;
|
|
177
195
|
voiceoverLine: z.ZodOptional<z.ZodString>;
|
|
196
|
+
autoCaptions: z.ZodOptional<z.ZodBoolean>;
|
|
178
197
|
voiceStyle: z.ZodOptional<z.ZodString>;
|
|
198
|
+
captionStyle: z.ZodOptional<z.ZodObject<{
|
|
199
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
200
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
fontWeight: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
color: z.ZodOptional<z.ZodString>;
|
|
203
|
+
highlightColor: z.ZodOptional<z.ZodString>;
|
|
204
|
+
}, z.core.$strip>>;
|
|
179
205
|
onScreenText: z.ZodOptional<z.ZodString>;
|
|
180
206
|
overlays: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
181
207
|
text: z.ZodString;
|
|
@@ -250,6 +276,7 @@ declare const OutputSchema: z.ZodObject<{
|
|
|
250
276
|
avatarFaceUrl: z.ZodOptional<z.ZodString>;
|
|
251
277
|
characterAnchorSceneIndex: z.ZodOptional<z.ZodNumber>;
|
|
252
278
|
bibleEntityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
279
|
+
lastFramePrompt: z.ZodOptional<z.ZodString>;
|
|
253
280
|
allowTrailingSilence: z.ZodOptional<z.ZodBoolean>;
|
|
254
281
|
layout: z.ZodOptional<z.ZodObject<{
|
|
255
282
|
composition: z.ZodEnum<{
|
|
@@ -273,6 +300,28 @@ declare const OutputSchema: z.ZodObject<{
|
|
|
273
300
|
gradient: "gradient";
|
|
274
301
|
}>>;
|
|
275
302
|
}, z.core.$strip>>;
|
|
303
|
+
broll: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
304
|
+
assetUrl: z.ZodString;
|
|
305
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
306
|
+
image: "image";
|
|
307
|
+
video: "video";
|
|
308
|
+
}>>;
|
|
309
|
+
startMs: z.ZodDefault<z.ZodNumber>;
|
|
310
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
311
|
+
}, z.core.$strip>>>;
|
|
312
|
+
}, z.core.$strip>>;
|
|
313
|
+
chapters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
314
|
+
id: z.ZodString;
|
|
315
|
+
title: z.ZodString;
|
|
316
|
+
narration: z.ZodOptional<z.ZodString>;
|
|
317
|
+
estimatedDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
318
|
+
sceneIndices: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
319
|
+
}, z.core.$strip>>>;
|
|
320
|
+
script: z.ZodOptional<z.ZodObject<{
|
|
321
|
+
fullText: z.ZodString;
|
|
322
|
+
wordCount: z.ZodOptional<z.ZodNumber>;
|
|
323
|
+
estimatedDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
324
|
+
wpm: z.ZodOptional<z.ZodNumber>;
|
|
276
325
|
}, z.core.$strip>>;
|
|
277
326
|
music: z.ZodOptional<z.ZodObject<{
|
|
278
327
|
strategy: z.ZodEnum<{
|
|
@@ -292,6 +341,13 @@ declare const OutputSchema: z.ZodObject<{
|
|
|
292
341
|
voiceId: z.ZodOptional<z.ZodString>;
|
|
293
342
|
voiceStyle: z.ZodOptional<z.ZodString>;
|
|
294
343
|
notes: z.ZodOptional<z.ZodString>;
|
|
344
|
+
captionStyle: z.ZodOptional<z.ZodObject<{
|
|
345
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
346
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
fontWeight: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
color: z.ZodOptional<z.ZodString>;
|
|
349
|
+
highlightColor: z.ZodOptional<z.ZodString>;
|
|
350
|
+
}, z.core.$strip>>;
|
|
295
351
|
bible: z.ZodOptional<z.ZodObject<{
|
|
296
352
|
characters: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
297
353
|
id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planVideo.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/planVideo.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQ/D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAExD;AAED,QAAA,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"planVideo.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/planVideo.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQ/D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAExD;AAED,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEhB,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,cAAc,CACxC,OAAO,WAAW,EAClB,OAAO,YAAY,CAuBpB,CAAC"}
|
|
@@ -8,9 +8,9 @@ const videoPlan_schema_1 = require("../../../schemas/videoPlan.schema");
|
|
|
8
8
|
const planner_1 = require("../planner");
|
|
9
9
|
const toolRegistry_1 = require("../toolRegistry");
|
|
10
10
|
/**
|
|
11
|
-
* The Planner needs an LlmCaller, which is host-wired (
|
|
12
|
-
*
|
|
13
|
-
* the host calls once at boot. Until set, the tool errors loudly.
|
|
11
|
+
* The Planner needs an LlmCaller, which is host-wired (the native
|
|
12
|
+
* ProviderRoutingLlmCaller). The tool layer is host-agnostic, so we expose a
|
|
13
|
+
* setter that the host calls once at boot. Until set, the tool errors loudly.
|
|
14
14
|
*/
|
|
15
15
|
let injectedLlm = null;
|
|
16
16
|
function setPlannerLlmCaller(llm) {
|
|
@@ -98,6 +98,10 @@ declare const InputSchema: z.ZodObject<{
|
|
|
98
98
|
assetHash: z.ZodOptional<z.ZodString>;
|
|
99
99
|
creditsSpent: z.ZodOptional<z.ZodNumber>;
|
|
100
100
|
generationId: z.ZodOptional<z.ZodString>;
|
|
101
|
+
attribution: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
url: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
101
105
|
}, z.core.$strip>>;
|
|
102
106
|
effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
103
107
|
id: z.ZodString;
|
|
@@ -154,6 +158,10 @@ declare const InputSchema: z.ZodObject<{
|
|
|
154
158
|
assetHash: z.ZodOptional<z.ZodString>;
|
|
155
159
|
creditsSpent: z.ZodOptional<z.ZodNumber>;
|
|
156
160
|
generationId: z.ZodOptional<z.ZodString>;
|
|
161
|
+
attribution: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
name: z.ZodString;
|
|
163
|
+
url: z.ZodOptional<z.ZodString>;
|
|
164
|
+
}, z.core.$strip>>;
|
|
157
165
|
}, z.core.$strip>>;
|
|
158
166
|
effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
159
167
|
id: z.ZodString;
|
|
@@ -202,6 +210,10 @@ declare const InputSchema: z.ZodObject<{
|
|
|
202
210
|
assetHash: z.ZodOptional<z.ZodString>;
|
|
203
211
|
creditsSpent: z.ZodOptional<z.ZodNumber>;
|
|
204
212
|
generationId: z.ZodOptional<z.ZodString>;
|
|
213
|
+
attribution: z.ZodOptional<z.ZodObject<{
|
|
214
|
+
name: z.ZodString;
|
|
215
|
+
url: z.ZodOptional<z.ZodString>;
|
|
216
|
+
}, z.core.$strip>>;
|
|
205
217
|
}, z.core.$strip>>;
|
|
206
218
|
effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
207
219
|
id: z.ZodString;
|
|
@@ -253,6 +265,10 @@ declare const InputSchema: z.ZodObject<{
|
|
|
253
265
|
assetHash: z.ZodOptional<z.ZodString>;
|
|
254
266
|
creditsSpent: z.ZodOptional<z.ZodNumber>;
|
|
255
267
|
generationId: z.ZodOptional<z.ZodString>;
|
|
268
|
+
attribution: z.ZodOptional<z.ZodObject<{
|
|
269
|
+
name: z.ZodString;
|
|
270
|
+
url: z.ZodOptional<z.ZodString>;
|
|
271
|
+
}, z.core.$strip>>;
|
|
256
272
|
}, z.core.$strip>>;
|
|
257
273
|
effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
258
274
|
id: z.ZodString;
|
|
@@ -280,6 +296,7 @@ declare const InputSchema: z.ZodObject<{
|
|
|
280
296
|
}, z.core.$strip>>>;
|
|
281
297
|
fontFamily: z.ZodDefault<z.ZodString>;
|
|
282
298
|
fontSize: z.ZodDefault<z.ZodNumber>;
|
|
299
|
+
fontWeight: z.ZodOptional<z.ZodNumber>;
|
|
283
300
|
color: z.ZodDefault<z.ZodString>;
|
|
284
301
|
highlightColor: z.ZodOptional<z.ZodString>;
|
|
285
302
|
language: z.ZodDefault<z.ZodString>;
|
|
@@ -303,6 +320,10 @@ declare const InputSchema: z.ZodObject<{
|
|
|
303
320
|
assetHash: z.ZodOptional<z.ZodString>;
|
|
304
321
|
creditsSpent: z.ZodOptional<z.ZodNumber>;
|
|
305
322
|
generationId: z.ZodOptional<z.ZodString>;
|
|
323
|
+
attribution: z.ZodOptional<z.ZodObject<{
|
|
324
|
+
name: z.ZodString;
|
|
325
|
+
url: z.ZodOptional<z.ZodString>;
|
|
326
|
+
}, z.core.$strip>>;
|
|
306
327
|
}, z.core.$strip>>;
|
|
307
328
|
effects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
308
329
|
id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/render.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IACvC,OAAO,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;CAC3C,KAAK,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAGvC,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,eAAe,GAAG,IAAI,CAE5D;AAED,QAAA,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"render.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/render.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IACvC,OAAO,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;CAC3C,KAAK,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAGvC,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,eAAe,GAAG,IAAI,CAE5D;AAED,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQf,CAAC;AAEH,QAAA,MAAM,YAAY;;;iBAGhB,CAAC;AAEH,eAAO,MAAM,UAAU,EAAE,cAAc,CACrC,OAAO,WAAW,EAClB,OAAO,YAAY,CA2BpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiGenFactory.service.d.ts","sourceRoot":"","sources":["../../../src/services/aiGen/aiGenFactory.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EACL,iBAAiB,EAEjB,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EACf,WAAW,EACZ,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"aiGenFactory.service.d.ts","sourceRoot":"","sources":["../../../src/services/aiGen/aiGenFactory.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EACL,iBAAiB,EAEjB,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EACf,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAchC,KAAK,uBAAuB,GAAG,UAAU,wBAAwB,CAAC;AAElE,eAAO,MAAM,gBAAgB,EAAE,MAAM,CACnC,eAAe,EACf,uBAAuB,CA+DxB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CACnC,iBAAiB,EACjB,uBAAuB,CA2CxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CACnC,eAAe,EACf,uBAAuB,CAMxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,aAAa,EACb,uBAAuB,CAGxB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,uBAAuB,CAsBzE,CAAC;AAEJ,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,WAAW,GACpB,wBAAwB,CAkB1B"}
|
|
@@ -13,6 +13,7 @@ const alibaba_1 = require("./providers/alibaba/alibaba");
|
|
|
13
13
|
const pixverse_service_1 = require("./providers/pixverse/pixverse.service");
|
|
14
14
|
const bytedance_service_1 = require("./providers/bytedance/bytedance.service");
|
|
15
15
|
const elevenlabs_service_1 = require("./providers/elevenlabs/elevenlabs.service");
|
|
16
|
+
const anthropic_service_1 = require("./providers/anthropic/anthropic.service");
|
|
16
17
|
exports.videoServicesMap = {
|
|
17
18
|
// --- Pixverse ---
|
|
18
19
|
"pixverse-v6": pixverse_service_1.PixVerseService,
|
|
@@ -134,12 +135,26 @@ exports.sfxServicesMap = {
|
|
|
134
135
|
[aiModels_1.ESfxGenModels.ELEVENLABS_SOUND_EFFECTS]: elevenlabs_service_1.ElevenLabsAiGenService,
|
|
135
136
|
};
|
|
136
137
|
exports.textServicesMap = {
|
|
137
|
-
|
|
138
|
+
// --- OpenAI ---
|
|
139
|
+
"openai-gpt-5.5": openai_service_1.OpenaiService,
|
|
140
|
+
"openai-gpt-5.4-mini": openai_service_1.OpenaiService,
|
|
138
141
|
"openai-gpt-5-mini": openai_service_1.OpenaiService,
|
|
142
|
+
"openai-gpt-4o-mini": openai_service_1.OpenaiService,
|
|
143
|
+
// Native Anthropic / Gemini text-gen (LLM_NATIVE_MIGRATION_PLAN Phase 6).
|
|
144
|
+
// GoogleService gained a generateText() alongside its video/image/music
|
|
145
|
+
// methods; AnthropicService is text-only.
|
|
146
|
+
// --- Anthropic ---
|
|
147
|
+
"anthropic-claude-fable-5": anthropic_service_1.AnthropicService,
|
|
148
|
+
"anthropic-claude-opus-4-8": anthropic_service_1.AnthropicService,
|
|
149
|
+
"anthropic-claude-sonnet-4-6": anthropic_service_1.AnthropicService,
|
|
150
|
+
"anthropic-claude-haiku-4-5": anthropic_service_1.AnthropicService,
|
|
151
|
+
// --- Google ---
|
|
152
|
+
"google-gemini-3.5-flash": google_service_1.GoogleService,
|
|
153
|
+
"google-gemini-3.1-pro": google_service_1.GoogleService,
|
|
154
|
+
"google-gemini-2.5-flash": google_service_1.GoogleService,
|
|
155
|
+
"google-gemini-2.5-pro": google_service_1.GoogleService,
|
|
139
156
|
// "openai-gpt-4o": OpenaiService,
|
|
140
157
|
// "openai-gpt-3.5-turbo": OpenaiService,
|
|
141
|
-
// "anthropic-claude-3": ClaudeService,
|
|
142
|
-
// "anthropic-claude-instant-100k": ClaudeService,
|
|
143
158
|
};
|
|
144
159
|
function getAiGenProviderService(modelKey) {
|
|
145
160
|
if (modelKey in exports.videoServicesMap) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseAiGenProviderService } from "../baseAiGenProvider.service";
|
|
2
|
+
import { TextGenerationParams, TextGenerationResult } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Native Anthropic text-gen service for the aiGen text factory
|
|
5
|
+
* (LLM_NATIVE_MIGRATION_PLAN Phase 6). Anthropic is text-only in our stack, so
|
|
6
|
+
* this service implements `generateText` only — every other capability falls
|
|
7
|
+
* through to BaseAiGenProviderService's throw.
|
|
8
|
+
*
|
|
9
|
+
* Mirrors OpenaiService.generateText's contract: accepts a bare prompt string
|
|
10
|
+
* or an OpenAI-style message array (role + string content). System messages
|
|
11
|
+
* fold into Anthropic's top-level `system`; the rest map to user/assistant
|
|
12
|
+
* turns. Reads ANTHROPIC_API_KEY (same key the agent AnthropicLlmCaller uses).
|
|
13
|
+
*/
|
|
14
|
+
export declare class AnthropicService extends BaseAiGenProviderService {
|
|
15
|
+
private client;
|
|
16
|
+
constructor();
|
|
17
|
+
generateText(params: TextGenerationParams): Promise<TextGenerationResult>;
|
|
18
|
+
/**
|
|
19
|
+
* Map an OpenAI-style `input` (string | {role, content}[]) onto Anthropic's
|
|
20
|
+
* shape: a top-level `system` string + user/assistant MessageParam[]. Array
|
|
21
|
+
* `content` (vision parts) is flattened to its text segments — the text
|
|
22
|
+
* factory is text-only; image inputs go through the agent AnthropicLlmCaller.
|
|
23
|
+
*/
|
|
24
|
+
private encodeTextInput;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=anthropic.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/aiGen/providers/anthropic/anthropic.service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,qBAAa,gBAAiB,SAAQ,wBAAwB;IAC5D,OAAO,CAAC,MAAM,CAAY;;IAOpB,YAAY,CAChB,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,oBAAoB,CAAC;IAuChC;;;;;OAKG;IACH,OAAO,CAAC,eAAe;CAuCxB"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// anthropic.service.ts
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.AnthropicService = void 0;
|
|
8
|
+
const sdk_1 = __importDefault(require("@anthropic-ai/sdk"));
|
|
9
|
+
const aiModels_1 = require("../../../../globals/aiModels");
|
|
10
|
+
const baseAiGenProvider_service_1 = require("../baseAiGenProvider.service");
|
|
11
|
+
/**
|
|
12
|
+
* Native Anthropic text-gen service for the aiGen text factory
|
|
13
|
+
* (LLM_NATIVE_MIGRATION_PLAN Phase 6). Anthropic is text-only in our stack, so
|
|
14
|
+
* this service implements `generateText` only — every other capability falls
|
|
15
|
+
* through to BaseAiGenProviderService's throw.
|
|
16
|
+
*
|
|
17
|
+
* Mirrors OpenaiService.generateText's contract: accepts a bare prompt string
|
|
18
|
+
* or an OpenAI-style message array (role + string content). System messages
|
|
19
|
+
* fold into Anthropic's top-level `system`; the rest map to user/assistant
|
|
20
|
+
* turns. Reads ANTHROPIC_API_KEY (same key the agent AnthropicLlmCaller uses).
|
|
21
|
+
*/
|
|
22
|
+
class AnthropicService extends baseAiGenProvider_service_1.BaseAiGenProviderService {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
this.client = new sdk_1.default({ apiKey: process.env.ANTHROPIC_API_KEY });
|
|
26
|
+
}
|
|
27
|
+
async generateText(params) {
|
|
28
|
+
const { input, modelKey, options } = params;
|
|
29
|
+
const model = aiModels_1.aiModelConfigs[modelKey];
|
|
30
|
+
const modelId = model?.modelId || "claude-haiku-4-5";
|
|
31
|
+
const { system, messages } = this.encodeTextInput(input);
|
|
32
|
+
// Anthropic requires max_tokens; fall back to the config default.
|
|
33
|
+
const maxTokens = (typeof options?.maxOutputTokens === "number"
|
|
34
|
+
? options.maxOutputTokens
|
|
35
|
+
: undefined) ??
|
|
36
|
+
(typeof model?.fields?.maxOutputTokens?.default === "number"
|
|
37
|
+
? model.fields.maxOutputTokens.default
|
|
38
|
+
: 4096);
|
|
39
|
+
const temperature = model?.fields?.temperature?.default
|
|
40
|
+
? options?.temperature ?? model.fields.temperature.default
|
|
41
|
+
: undefined;
|
|
42
|
+
const msg = await this.client.messages.create({
|
|
43
|
+
model: modelId,
|
|
44
|
+
max_tokens: maxTokens,
|
|
45
|
+
messages,
|
|
46
|
+
...(system ? { system } : {}),
|
|
47
|
+
...(typeof temperature === "number" ? { temperature } : {}),
|
|
48
|
+
});
|
|
49
|
+
const text = msg.content
|
|
50
|
+
.filter((b) => b.type === "text")
|
|
51
|
+
.map((b) => b.text)
|
|
52
|
+
.join("")
|
|
53
|
+
.trim() || "No response";
|
|
54
|
+
return { text };
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Map an OpenAI-style `input` (string | {role, content}[]) onto Anthropic's
|
|
58
|
+
* shape: a top-level `system` string + user/assistant MessageParam[]. Array
|
|
59
|
+
* `content` (vision parts) is flattened to its text segments — the text
|
|
60
|
+
* factory is text-only; image inputs go through the agent AnthropicLlmCaller.
|
|
61
|
+
*/
|
|
62
|
+
encodeTextInput(input) {
|
|
63
|
+
if (typeof input === "string") {
|
|
64
|
+
return { messages: [{ role: "user", content: input }] };
|
|
65
|
+
}
|
|
66
|
+
const raw = Array.isArray(input)
|
|
67
|
+
? input
|
|
68
|
+
: [];
|
|
69
|
+
let system;
|
|
70
|
+
const messages = [];
|
|
71
|
+
for (const m of raw) {
|
|
72
|
+
const text = typeof m.content === "string"
|
|
73
|
+
? m.content
|
|
74
|
+
: Array.isArray(m.content)
|
|
75
|
+
? m.content
|
|
76
|
+
.map((p) => p?.text ?? "")
|
|
77
|
+
.join("")
|
|
78
|
+
: String(m.content ?? "");
|
|
79
|
+
if (m.role === "system") {
|
|
80
|
+
system = system ? `${system}\n\n${text}` : text;
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const role = m.role === "assistant" ? "assistant" : "user";
|
|
84
|
+
messages.push({ role, content: text });
|
|
85
|
+
}
|
|
86
|
+
// Anthropic rejects an empty messages array — guarantee at least one turn.
|
|
87
|
+
if (messages.length === 0) {
|
|
88
|
+
messages.push({ role: "user", content: system ?? "" });
|
|
89
|
+
if (system)
|
|
90
|
+
system = undefined;
|
|
91
|
+
}
|
|
92
|
+
return { system, messages };
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.AnthropicService = AnthropicService;
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { BaseAiGenProviderService } from "../baseAiGenProvider.service";
|
|
2
|
-
import { CreditUsageParams, ImageGenerationParams, ImageGenerationResult, MusicGenerationParams, MusicGenerationResult, VideoGenerationParams, VideoGenerationResult, VideoStatusParams, VideoStatusResult } from "../types";
|
|
2
|
+
import { CreditUsageParams, ImageGenerationParams, ImageGenerationResult, MusicGenerationParams, MusicGenerationResult, TextGenerationParams, TextGenerationResult, VideoGenerationParams, VideoGenerationResult, VideoStatusParams, VideoStatusResult } from "../types";
|
|
3
3
|
export declare class GoogleService extends BaseAiGenProviderService {
|
|
4
4
|
private ai;
|
|
5
5
|
private keyPool;
|
|
6
6
|
private static readonly MAX_RETRY_ATTEMPTS;
|
|
7
7
|
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Plain text generation via Gemini (`@google/genai` generateContent) for the
|
|
10
|
+
* aiGen text factory (LLM_NATIVE_MIGRATION_PLAN Phase 6). Accepts the same
|
|
11
|
+
* `input` shape as OpenaiService.generateText — a bare prompt string or an
|
|
12
|
+
* OpenAI-style message array (role + string content). System messages fold
|
|
13
|
+
* into Gemini's `systemInstruction`; assistant turns map to the "model" role.
|
|
14
|
+
* `options.responseFormat` of type json_object/json_schema flips on Gemini's
|
|
15
|
+
* native JSON mode (responseMimeType) so callers asking OpenAI for JSON get
|
|
16
|
+
* the same contract here.
|
|
17
|
+
*/
|
|
18
|
+
generateText(params: TextGenerationParams): Promise<TextGenerationResult>;
|
|
19
|
+
/**
|
|
20
|
+
* Map an OpenAI-style `input` (string | {role, content}[]) onto Gemini's
|
|
21
|
+
* shape: merged systemInstruction + Content[] (assistant→"model"). Array
|
|
22
|
+
* `content` (vision parts) is flattened to its text segments — the text
|
|
23
|
+
* factory is text-only; image inputs go through the agent GeminiLlmCaller.
|
|
24
|
+
*/
|
|
25
|
+
private encodeTextInput;
|
|
8
26
|
/**
|
|
9
27
|
* Retries `fn` on transient network errors (undici "fetch failed", ECONNRESET, ETIMEDOUT,
|
|
10
28
|
* DNS hiccups, etc.) with exponential backoff: 1s → 2s → 4s. Non-network errors
|
|
@@ -22,6 +40,11 @@ export declare class GoogleService extends BaseAiGenProviderService {
|
|
|
22
40
|
*
|
|
23
41
|
* Required env: GCP_PROJECT_ID. Optional: GCP_LOCATION (default us-central1).
|
|
24
42
|
*/
|
|
43
|
+
/**
|
|
44
|
+
* Lyria 2 (Vertex AI) — delegates to the standalone generateGoogleMusic
|
|
45
|
+
* (Vertex predict endpoint via ADC, not the GoogleGenAI client). See
|
|
46
|
+
* ./googleMusic.
|
|
47
|
+
*/
|
|
25
48
|
generateMusic(params: MusicGenerationParams): Promise<MusicGenerationResult>;
|
|
26
49
|
getCreditUsed({ modelKey, duration, resolution, multiClip, numImages, imageSize }: CreditUsageParams): number;
|
|
27
50
|
}
|