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
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SocialConnectRequestSchema = exports.SocialHookScoreRequestSchema = exports.SocialSuggestRequestSchema = exports.SocialInboxDraftSchema = exports.SocialInboxUpdateSchema = exports.SocialInboxReplySchema = exports.SocialPublishRequestSchema = exports.SocialPublishTargetSchema = exports.SocialProviderSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const types_1 = require("../globals/types");
|
|
6
|
+
/**
|
|
7
|
+
* X8 Social Suite — request-validation schemas for the `/v1/social/*` API.
|
|
8
|
+
* These validate untrusted client input at the Cloud Function boundary; the
|
|
9
|
+
* Firestore *models* (models/social.model.ts) are the persisted shape.
|
|
10
|
+
*/
|
|
11
|
+
exports.SocialProviderSchema = zod_1.z.nativeEnum(types_1.ESocialProvider);
|
|
12
|
+
/** One publish target: which connected account + optional per-platform overrides. */
|
|
13
|
+
exports.SocialPublishTargetSchema = zod_1.z.object({
|
|
14
|
+
socialAccountId: zod_1.z.string().min(1),
|
|
15
|
+
/** Per-platform caption override; falls back to the request-level caption. */
|
|
16
|
+
caption: zod_1.z.string().max(5000).optional(),
|
|
17
|
+
/** Provider visibility (e.g. "public" | "unlisted" | "private"). */
|
|
18
|
+
privacy: zod_1.z.string().max(40).optional(),
|
|
19
|
+
/** First comment to auto-post after publish (hashtags/links). */
|
|
20
|
+
firstComment: zod_1.z.string().max(2000).optional(),
|
|
21
|
+
/**
|
|
22
|
+
* Auto-format aspect chosen for this platform (e.g. "9:16" | "1:1" | "16:9").
|
|
23
|
+
* Persisted onto the target variant so a future render step can crop/letterbox
|
|
24
|
+
* the source to the platform's recommended spec (B2). No re-render happens yet
|
|
25
|
+
* — the source video is published as-is and this records intent.
|
|
26
|
+
*/
|
|
27
|
+
format: zod_1.z
|
|
28
|
+
.string()
|
|
29
|
+
.regex(/^\d{1,2}:\d{1,2}$/)
|
|
30
|
+
.max(8)
|
|
31
|
+
.optional(),
|
|
32
|
+
});
|
|
33
|
+
/** Body for POST /v1/social/publish. */
|
|
34
|
+
exports.SocialPublishRequestSchema = zod_1.z
|
|
35
|
+
.object({
|
|
36
|
+
/** Source video in our system. Optional iff an explicit mediaUrl is given. */
|
|
37
|
+
videoJobId: zod_1.z.string().min(1).optional(),
|
|
38
|
+
/** Explicit media URL when not publishing a videoJob. */
|
|
39
|
+
mediaUrl: zod_1.z.string().url().optional(),
|
|
40
|
+
/** Default caption; overridable per target. */
|
|
41
|
+
caption: zod_1.z.string().max(5000).default(""),
|
|
42
|
+
/** Title (used by YouTube). */
|
|
43
|
+
title: zod_1.z.string().max(200).optional(),
|
|
44
|
+
/** At least one target account. */
|
|
45
|
+
targets: zod_1.z.array(exports.SocialPublishTargetSchema).min(1).max(50),
|
|
46
|
+
/** Unix ms to publish at; omit/past = publish now. */
|
|
47
|
+
scheduledAt: zod_1.z.number().int().positive().optional(),
|
|
48
|
+
/** Client-supplied idempotency key to dedupe double-submits. */
|
|
49
|
+
idempotencyKey: zod_1.z.string().min(8).max(200),
|
|
50
|
+
})
|
|
51
|
+
.refine((v) => Boolean(v.videoJobId) || Boolean(v.mediaUrl), {
|
|
52
|
+
message: "Either videoJobId or mediaUrl is required",
|
|
53
|
+
path: ["videoJobId"],
|
|
54
|
+
});
|
|
55
|
+
/** Body for POST /v1/social/inbox/:id/reply — reply to a comment/mention. */
|
|
56
|
+
exports.SocialInboxReplySchema = zod_1.z.object({
|
|
57
|
+
message: zod_1.z.string().min(1).max(2000),
|
|
58
|
+
});
|
|
59
|
+
/** Body for PATCH /v1/social/inbox/:id — update handling state / moderation. */
|
|
60
|
+
exports.SocialInboxUpdateSchema = zod_1.z.object({
|
|
61
|
+
/** New handling state (unread → read → replied, or hidden). */
|
|
62
|
+
status: zod_1.z.enum(["unread", "read", "replied", "hidden"]).optional(),
|
|
63
|
+
/** When true/false, also hide/unhide the comment on the provider. */
|
|
64
|
+
hidden: zod_1.z.boolean().optional(),
|
|
65
|
+
});
|
|
66
|
+
/** Body for POST /v1/social/inbox/:id/draft — AI brand-voice reply draft. */
|
|
67
|
+
exports.SocialInboxDraftSchema = zod_1.z.object({
|
|
68
|
+
/** Optional brand-voice / tone steer (e.g. "warm, concise, no emojis"). */
|
|
69
|
+
tone: zod_1.z.string().max(200).optional(),
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* Body for POST /v1/social/compose/suggest — E1 AI caption/hashtag/title.
|
|
73
|
+
* Either `videoJobId` (we read the video's title/prompt to ground the copy) or
|
|
74
|
+
* a free-text `context` is the source material; both optional (the model can
|
|
75
|
+
* write generic copy from the platform list alone). `providers` drives the
|
|
76
|
+
* per-platform variants returned.
|
|
77
|
+
*/
|
|
78
|
+
exports.SocialSuggestRequestSchema = zod_1.z.object({
|
|
79
|
+
/** Source video to ground the copy in (owner-checked server-side). */
|
|
80
|
+
videoJobId: zod_1.z.string().min(1).optional(),
|
|
81
|
+
/** Free-text description of the video when no videoJobId is available. */
|
|
82
|
+
context: zod_1.z.string().max(2000).optional(),
|
|
83
|
+
/** Platforms to tailor variants for (the composer's selected targets). */
|
|
84
|
+
providers: zod_1.z.array(exports.SocialProviderSchema).min(1).max(8),
|
|
85
|
+
/** Optional brand-voice / tone steer. */
|
|
86
|
+
tone: zod_1.z.string().max(200).optional(),
|
|
87
|
+
/** Language to write the copy in (ISO-639-1 / locale). Defaults to "en". */
|
|
88
|
+
language: zod_1.z.string().max(20).optional(),
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* Body for POST /v1/social/compose/score — E4 hook / caption score predictor.
|
|
92
|
+
* Grades arbitrary copy the user already has (typed or AI-written). `provider`
|
|
93
|
+
* tunes the rubric to one platform's norms; `videoJobId` (owner-checked) grounds
|
|
94
|
+
* the relevance score in what the video actually delivers.
|
|
95
|
+
*/
|
|
96
|
+
exports.SocialHookScoreRequestSchema = zod_1.z.object({
|
|
97
|
+
/** The hook / caption opener to grade. */
|
|
98
|
+
hook: zod_1.z.string().min(1).max(600),
|
|
99
|
+
/** Platform the copy targets (optional — tunes the rubric). */
|
|
100
|
+
provider: exports.SocialProviderSchema.optional(),
|
|
101
|
+
/** Source video to judge relevance against (owner-checked server-side). */
|
|
102
|
+
videoJobId: zod_1.z.string().min(1).optional(),
|
|
103
|
+
/** Free-text description of the video when no videoJobId is available. */
|
|
104
|
+
context: zod_1.z.string().max(2000).optional(),
|
|
105
|
+
/** Language the copy is written in (ISO-639-1 / locale). Defaults to "en". */
|
|
106
|
+
language: zod_1.z.string().max(20).optional(),
|
|
107
|
+
});
|
|
108
|
+
/** Body for POST /v1/social/connect/:provider (start OAuth). */
|
|
109
|
+
exports.SocialConnectRequestSchema = zod_1.z.object({
|
|
110
|
+
/** Optional post-connect redirect path inside the app. */
|
|
111
|
+
returnTo: zod_1.z.string().max(500).optional(),
|
|
112
|
+
/** Request business-tier scopes (premium G-features) when the account supports it. */
|
|
113
|
+
requestBusinessScopes: zod_1.z.boolean().optional(),
|
|
114
|
+
});
|
|
@@ -232,6 +232,25 @@ export declare const SceneLayoutSchema: z.ZodObject<{
|
|
|
232
232
|
}>>;
|
|
233
233
|
}, z.core.$strip>;
|
|
234
234
|
export type SceneLayout = z.infer<typeof SceneLayoutSchema>;
|
|
235
|
+
/**
|
|
236
|
+
* CH-8 — persisted caption styling. Set by the chat `change_caption_style`
|
|
237
|
+
* tool ("make captions yellow", "bigger captions"). Lives on the plan (and
|
|
238
|
+
* optionally per-scene) so planToProject can apply it when building
|
|
239
|
+
* CaptionClips and the look survives every caption regen — without it, a
|
|
240
|
+
* regen resets to the renderer defaults. Every field maps 1:1 onto a
|
|
241
|
+
* CaptionClip property the renderer already consumes (CaptionClipView), so
|
|
242
|
+
* applying it is render-time only, never an AI regeneration. Colors are
|
|
243
|
+
* free-form CSS strings (hex or named). CH-1 added `fontWeight` (100–900),
|
|
244
|
+
* which the renderer now honours (falling back to 800 when unset).
|
|
245
|
+
*/
|
|
246
|
+
export declare const CaptionStyleSchema: z.ZodObject<{
|
|
247
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
248
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
249
|
+
fontWeight: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
color: z.ZodOptional<z.ZodString>;
|
|
251
|
+
highlightColor: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
export type CaptionStyle = z.infer<typeof CaptionStyleSchema>;
|
|
235
254
|
export declare const PlannedSceneSchema: z.ZodObject<{
|
|
236
255
|
sceneIndex: z.ZodNumber;
|
|
237
256
|
intent: z.ZodString;
|
|
@@ -256,7 +275,15 @@ export declare const PlannedSceneSchema: z.ZodObject<{
|
|
|
256
275
|
prompt: z.ZodString;
|
|
257
276
|
durationMs: z.ZodNumber;
|
|
258
277
|
voiceoverLine: z.ZodOptional<z.ZodString>;
|
|
278
|
+
autoCaptions: z.ZodOptional<z.ZodBoolean>;
|
|
259
279
|
voiceStyle: z.ZodOptional<z.ZodString>;
|
|
280
|
+
captionStyle: z.ZodOptional<z.ZodObject<{
|
|
281
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
282
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
283
|
+
fontWeight: z.ZodOptional<z.ZodNumber>;
|
|
284
|
+
color: z.ZodOptional<z.ZodString>;
|
|
285
|
+
highlightColor: z.ZodOptional<z.ZodString>;
|
|
286
|
+
}, z.core.$strip>>;
|
|
260
287
|
onScreenText: z.ZodOptional<z.ZodString>;
|
|
261
288
|
overlays: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
262
289
|
text: z.ZodString;
|
|
@@ -331,6 +358,7 @@ export declare const PlannedSceneSchema: z.ZodObject<{
|
|
|
331
358
|
avatarFaceUrl: z.ZodOptional<z.ZodString>;
|
|
332
359
|
characterAnchorSceneIndex: z.ZodOptional<z.ZodNumber>;
|
|
333
360
|
bibleEntityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
361
|
+
lastFramePrompt: z.ZodOptional<z.ZodString>;
|
|
334
362
|
allowTrailingSilence: z.ZodOptional<z.ZodBoolean>;
|
|
335
363
|
layout: z.ZodOptional<z.ZodObject<{
|
|
336
364
|
composition: z.ZodEnum<{
|
|
@@ -354,6 +382,15 @@ export declare const PlannedSceneSchema: z.ZodObject<{
|
|
|
354
382
|
gradient: "gradient";
|
|
355
383
|
}>>;
|
|
356
384
|
}, z.core.$strip>>;
|
|
385
|
+
broll: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
386
|
+
assetUrl: z.ZodString;
|
|
387
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
388
|
+
image: "image";
|
|
389
|
+
video: "video";
|
|
390
|
+
}>>;
|
|
391
|
+
startMs: z.ZodDefault<z.ZodNumber>;
|
|
392
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
393
|
+
}, z.core.$strip>>>;
|
|
357
394
|
}, z.core.$strip>;
|
|
358
395
|
/**
|
|
359
396
|
* Soft validator output. Unlike planner-rejection strings, warnings travel
|
|
@@ -378,6 +415,37 @@ export declare const PlannerWarningSchema: z.ZodObject<{
|
|
|
378
415
|
}, z.core.$strip>>;
|
|
379
416
|
}, z.core.$strip>;
|
|
380
417
|
export type PlannerWarning = z.infer<typeof PlannerWarningSchema>;
|
|
418
|
+
/**
|
|
419
|
+
* Stream L (L-1) — chapter structure for M1+ videos. A chapter groups a run of
|
|
420
|
+
* consecutive scenes under a titled section. Built two ways depending on tier:
|
|
421
|
+
* - M1: the planner emits chapters directly alongside scenes (mixed pacing).
|
|
422
|
+
* - L1/L2: `chapter_outline` (L-4) derives chapters from the script first,
|
|
423
|
+
* then L-3 explodes each chapter's narration into scenes and back-fills
|
|
424
|
+
* `sceneIndices`.
|
|
425
|
+
* Absent on S1/S2 plans (short-form has no chapter concept).
|
|
426
|
+
*/
|
|
427
|
+
export declare const ChapterSchema: z.ZodObject<{
|
|
428
|
+
id: z.ZodString;
|
|
429
|
+
title: z.ZodString;
|
|
430
|
+
narration: z.ZodOptional<z.ZodString>;
|
|
431
|
+
estimatedDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
432
|
+
sceneIndices: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
433
|
+
}, z.core.$strip>;
|
|
434
|
+
export type Chapter = z.infer<typeof ChapterSchema>;
|
|
435
|
+
/**
|
|
436
|
+
* Stream L (L-1) — full narration script for L1+ videos. Script-first authoring
|
|
437
|
+
* (L-3) generates this BEFORE scenes: `generate_script` produces the canonical
|
|
438
|
+
* narration, `chapter_outline` segments it, then each segment is exploded into
|
|
439
|
+
* scenes whose `voiceoverLine`s are sentence-boundary slices of `fullText`.
|
|
440
|
+
* Absent on S1/S2/M1 plans (those are scene-first).
|
|
441
|
+
*/
|
|
442
|
+
export declare const ScriptSchema: z.ZodObject<{
|
|
443
|
+
fullText: z.ZodString;
|
|
444
|
+
wordCount: z.ZodOptional<z.ZodNumber>;
|
|
445
|
+
estimatedDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
446
|
+
wpm: z.ZodOptional<z.ZodNumber>;
|
|
447
|
+
}, z.core.$strip>;
|
|
448
|
+
export type Script = z.infer<typeof ScriptSchema>;
|
|
381
449
|
export declare const VideoPlanSchema: z.ZodObject<{
|
|
382
450
|
briefId: z.ZodOptional<z.ZodString>;
|
|
383
451
|
persona: z.ZodEnum<{
|
|
@@ -395,6 +463,14 @@ export declare const VideoPlanSchema: z.ZodObject<{
|
|
|
395
463
|
}>;
|
|
396
464
|
totalDurationMs: z.ZodNumber;
|
|
397
465
|
totalEstimatedCredits: z.ZodNumber;
|
|
466
|
+
lengthTier: z.ZodOptional<z.ZodEnum<{
|
|
467
|
+
S1: "S1";
|
|
468
|
+
S2: "S2";
|
|
469
|
+
M1: "M1";
|
|
470
|
+
L1: "L1";
|
|
471
|
+
L2: "L2";
|
|
472
|
+
L3: "L3";
|
|
473
|
+
}>>;
|
|
398
474
|
scenes: z.ZodArray<z.ZodObject<{
|
|
399
475
|
sceneIndex: z.ZodNumber;
|
|
400
476
|
intent: z.ZodString;
|
|
@@ -419,7 +495,15 @@ export declare const VideoPlanSchema: z.ZodObject<{
|
|
|
419
495
|
prompt: z.ZodString;
|
|
420
496
|
durationMs: z.ZodNumber;
|
|
421
497
|
voiceoverLine: z.ZodOptional<z.ZodString>;
|
|
498
|
+
autoCaptions: z.ZodOptional<z.ZodBoolean>;
|
|
422
499
|
voiceStyle: z.ZodOptional<z.ZodString>;
|
|
500
|
+
captionStyle: z.ZodOptional<z.ZodObject<{
|
|
501
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
502
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
503
|
+
fontWeight: z.ZodOptional<z.ZodNumber>;
|
|
504
|
+
color: z.ZodOptional<z.ZodString>;
|
|
505
|
+
highlightColor: z.ZodOptional<z.ZodString>;
|
|
506
|
+
}, z.core.$strip>>;
|
|
423
507
|
onScreenText: z.ZodOptional<z.ZodString>;
|
|
424
508
|
overlays: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
425
509
|
text: z.ZodString;
|
|
@@ -494,6 +578,7 @@ export declare const VideoPlanSchema: z.ZodObject<{
|
|
|
494
578
|
avatarFaceUrl: z.ZodOptional<z.ZodString>;
|
|
495
579
|
characterAnchorSceneIndex: z.ZodOptional<z.ZodNumber>;
|
|
496
580
|
bibleEntityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
581
|
+
lastFramePrompt: z.ZodOptional<z.ZodString>;
|
|
497
582
|
allowTrailingSilence: z.ZodOptional<z.ZodBoolean>;
|
|
498
583
|
layout: z.ZodOptional<z.ZodObject<{
|
|
499
584
|
composition: z.ZodEnum<{
|
|
@@ -517,6 +602,28 @@ export declare const VideoPlanSchema: z.ZodObject<{
|
|
|
517
602
|
gradient: "gradient";
|
|
518
603
|
}>>;
|
|
519
604
|
}, z.core.$strip>>;
|
|
605
|
+
broll: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
606
|
+
assetUrl: z.ZodString;
|
|
607
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
608
|
+
image: "image";
|
|
609
|
+
video: "video";
|
|
610
|
+
}>>;
|
|
611
|
+
startMs: z.ZodDefault<z.ZodNumber>;
|
|
612
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
613
|
+
}, z.core.$strip>>>;
|
|
614
|
+
}, z.core.$strip>>;
|
|
615
|
+
chapters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
616
|
+
id: z.ZodString;
|
|
617
|
+
title: z.ZodString;
|
|
618
|
+
narration: z.ZodOptional<z.ZodString>;
|
|
619
|
+
estimatedDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
620
|
+
sceneIndices: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
621
|
+
}, z.core.$strip>>>;
|
|
622
|
+
script: z.ZodOptional<z.ZodObject<{
|
|
623
|
+
fullText: z.ZodString;
|
|
624
|
+
wordCount: z.ZodOptional<z.ZodNumber>;
|
|
625
|
+
estimatedDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
626
|
+
wpm: z.ZodOptional<z.ZodNumber>;
|
|
520
627
|
}, z.core.$strip>>;
|
|
521
628
|
music: z.ZodOptional<z.ZodObject<{
|
|
522
629
|
strategy: z.ZodEnum<{
|
|
@@ -536,6 +643,13 @@ export declare const VideoPlanSchema: z.ZodObject<{
|
|
|
536
643
|
voiceId: z.ZodOptional<z.ZodString>;
|
|
537
644
|
voiceStyle: z.ZodOptional<z.ZodString>;
|
|
538
645
|
notes: z.ZodOptional<z.ZodString>;
|
|
646
|
+
captionStyle: z.ZodOptional<z.ZodObject<{
|
|
647
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
648
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
649
|
+
fontWeight: z.ZodOptional<z.ZodNumber>;
|
|
650
|
+
color: z.ZodOptional<z.ZodString>;
|
|
651
|
+
highlightColor: z.ZodOptional<z.ZodString>;
|
|
652
|
+
}, z.core.$strip>>;
|
|
539
653
|
bible: z.ZodOptional<z.ZodObject<{
|
|
540
654
|
characters: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
541
655
|
id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"videoPlan.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/videoPlan.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"videoPlan.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/videoPlan.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;GAOG;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB;;;;;iBAc5B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AAC,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VideoPlanSchema = exports.PlannerWarningSchema = exports.PlannedSceneSchema = exports.SceneLayoutSchema = exports.TextOverlaySchema = exports.TextBgStyleSchema = exports.TextAnimationSchema = exports.TextPositionSchema = exports.TextRoleSchema = exports.TransitionKindSchema = exports.SceneAssetStrategySchema = exports.AgentVisualBibleSchema = exports.BibleEntitySchema = void 0;
|
|
3
|
+
exports.VideoPlanSchema = exports.ScriptSchema = exports.ChapterSchema = exports.PlannerWarningSchema = exports.PlannedSceneSchema = exports.CaptionStyleSchema = exports.SceneLayoutSchema = exports.TextOverlaySchema = exports.TextBgStyleSchema = exports.TextAnimationSchema = exports.TextPositionSchema = exports.TextRoleSchema = exports.TransitionKindSchema = exports.SceneAssetStrategySchema = exports.AgentVisualBibleSchema = exports.BibleEntitySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const agentPersona_schema_1 = require("./agentPersona.schema");
|
|
6
|
+
const brief_schema_1 = require("./brief.schema");
|
|
6
7
|
const project_schema_1 = require("./project.schema");
|
|
7
8
|
/**
|
|
8
9
|
* VideoPlan — the planner LLM's structured output. Reviewed by the user as a
|
|
@@ -209,6 +210,24 @@ exports.SceneLayoutSchema = zod_1.z.object({
|
|
|
209
210
|
])
|
|
210
211
|
.optional(),
|
|
211
212
|
});
|
|
213
|
+
/**
|
|
214
|
+
* CH-8 — persisted caption styling. Set by the chat `change_caption_style`
|
|
215
|
+
* tool ("make captions yellow", "bigger captions"). Lives on the plan (and
|
|
216
|
+
* optionally per-scene) so planToProject can apply it when building
|
|
217
|
+
* CaptionClips and the look survives every caption regen — without it, a
|
|
218
|
+
* regen resets to the renderer defaults. Every field maps 1:1 onto a
|
|
219
|
+
* CaptionClip property the renderer already consumes (CaptionClipView), so
|
|
220
|
+
* applying it is render-time only, never an AI regeneration. Colors are
|
|
221
|
+
* free-form CSS strings (hex or named). CH-1 added `fontWeight` (100–900),
|
|
222
|
+
* which the renderer now honours (falling back to 800 when unset).
|
|
223
|
+
*/
|
|
224
|
+
exports.CaptionStyleSchema = zod_1.z.object({
|
|
225
|
+
fontFamily: zod_1.z.string().min(1).max(80).optional(),
|
|
226
|
+
fontSize: zod_1.z.number().int().min(8).max(200).optional(),
|
|
227
|
+
fontWeight: zod_1.z.number().int().min(100).max(900).optional(),
|
|
228
|
+
color: zod_1.z.string().min(1).max(40).optional(),
|
|
229
|
+
highlightColor: zod_1.z.string().min(1).max(40).optional(),
|
|
230
|
+
});
|
|
212
231
|
exports.PlannedSceneSchema = zod_1.z.object({
|
|
213
232
|
sceneIndex: zod_1.z.number().int().nonnegative(),
|
|
214
233
|
/** Plain-English description of what this scene shows. */
|
|
@@ -229,6 +248,16 @@ exports.PlannedSceneSchema = zod_1.z.object({
|
|
|
229
248
|
// the per-scene capability validator); this just keeps the model honest.
|
|
230
249
|
durationMs: zod_1.z.number().min(500),
|
|
231
250
|
voiceoverLine: zod_1.z.string().optional(),
|
|
251
|
+
/**
|
|
252
|
+
* AG-3: word-timed auto-captions for this scene's voiceover. When true (and
|
|
253
|
+
* the scene actually produces a voiceoverLine), the host transcribes the
|
|
254
|
+
* generated VO audio post-landing via generate_captions (AssemblyAI →
|
|
255
|
+
* Whisper fallback) and renders a karaoke-style caption clip on the caption
|
|
256
|
+
* track. No effect on scenes without a voiceoverLine. Common for UGC ads,
|
|
257
|
+
* social recaps, faceless-YT, fitness — where on-screen captions drive
|
|
258
|
+
* retention + accessibility.
|
|
259
|
+
*/
|
|
260
|
+
autoCaptions: zod_1.z.boolean().optional(),
|
|
232
261
|
/**
|
|
233
262
|
* AG-44: per-scene voice delivery override. Tone can shift across the arc
|
|
234
263
|
* (frustrated → curious → excited), so a single global voiceStyle is too
|
|
@@ -238,6 +267,14 @@ exports.PlannedSceneSchema = zod_1.z.object({
|
|
|
238
267
|
* ElevenLabs voice_settings.
|
|
239
268
|
*/
|
|
240
269
|
voiceStyle: zod_1.z.string().optional(),
|
|
270
|
+
/**
|
|
271
|
+
* CH-8: per-scene caption-style override. Set by `change_caption_style` when
|
|
272
|
+
* the user restyles a single scene's captions. Takes precedence over the
|
|
273
|
+
* plan-level `captionStyle` in planToProject (per-scene > plan > defaults).
|
|
274
|
+
* Like the plan-level field this is a post-hoc user edit — the planner/LLM
|
|
275
|
+
* must not set it.
|
|
276
|
+
*/
|
|
277
|
+
captionStyle: exports.CaptionStyleSchema.optional(),
|
|
241
278
|
/**
|
|
242
279
|
* AG-40 legacy: a single bottom-center caption string. Kept for back-compat
|
|
243
280
|
* with traces / replay scripts. Prefer `overlays[]` for new plans — it lets
|
|
@@ -280,6 +317,19 @@ exports.PlannedSceneSchema = zod_1.z.object({
|
|
|
280
317
|
* image-gen call to lock identity.
|
|
281
318
|
*/
|
|
282
319
|
bibleEntityIds: zod_1.z.array(zod_1.z.string()).default([]),
|
|
320
|
+
/**
|
|
321
|
+
* AG-1 Phase 2 — first-last-frame (FLF) interpolation. When set (and the
|
|
322
|
+
* scene uses strategy=ai-image-to-video with an FLF-capable preferredModel),
|
|
323
|
+
* the executor generates a SECOND image from this prompt — the END
|
|
324
|
+
* composition — and the model animates FROM `prompt`'s frame TO this one,
|
|
325
|
+
* the cleanest way to direct motion between two specific compositions
|
|
326
|
+
* (e.g. wide establishing shot → product close-up; doors closed → open).
|
|
327
|
+
* This is a full image prompt for the END state, NOT a motion verb. The
|
|
328
|
+
* executor silently ignores it on non-FLF models / non-i2v strategies, so
|
|
329
|
+
* a stray value never breaks a plan; the planner should only set it when
|
|
330
|
+
* the scene genuinely has two distinct anchor compositions.
|
|
331
|
+
*/
|
|
332
|
+
lastFramePrompt: zod_1.z.string().optional(),
|
|
283
333
|
/**
|
|
284
334
|
* User-set escape hatch for the trailing-silence warning. When true, the
|
|
285
335
|
* trailing-silence validator skips this scene — useful for visual-led
|
|
@@ -296,6 +346,23 @@ exports.PlannedSceneSchema = zod_1.z.object({
|
|
|
296
346
|
* vision pass's content classification (center / edges / face / broll).
|
|
297
347
|
*/
|
|
298
348
|
layout: exports.SceneLayoutSchema.optional(),
|
|
349
|
+
/**
|
|
350
|
+
* CH-6 — B-roll overlays for this scene. Each entry overlays a secondary
|
|
351
|
+
* clip ON TOP of the scene's main visual (a true second video lane; see
|
|
352
|
+
* TRACK_ID.broll in planToProject), e.g. a product close-up cutaway over a
|
|
353
|
+
* talking-head. `assetUrl` points at an existing asset (a recent generation
|
|
354
|
+
* or upload) — the chat add_broll tool overlays user assets without
|
|
355
|
+
* generating. startMs/durationMs position the overlay within the scene
|
|
356
|
+
* window (durationMs defaults to "rest of scene").
|
|
357
|
+
*/
|
|
358
|
+
broll: zod_1.z
|
|
359
|
+
.array(zod_1.z.object({
|
|
360
|
+
assetUrl: zod_1.z.string().url(),
|
|
361
|
+
kind: zod_1.z.enum(["video", "image"]).default("video"),
|
|
362
|
+
startMs: zod_1.z.number().int().nonnegative().default(0),
|
|
363
|
+
durationMs: zod_1.z.number().int().positive().optional(),
|
|
364
|
+
}))
|
|
365
|
+
.optional(),
|
|
299
366
|
});
|
|
300
367
|
/**
|
|
301
368
|
* Soft validator output. Unlike planner-rejection strings, warnings travel
|
|
@@ -319,6 +386,51 @@ exports.PlannerWarningSchema = zod_1.z.object({
|
|
|
319
386
|
})
|
|
320
387
|
.optional(),
|
|
321
388
|
});
|
|
389
|
+
/**
|
|
390
|
+
* Stream L (L-1) — chapter structure for M1+ videos. A chapter groups a run of
|
|
391
|
+
* consecutive scenes under a titled section. Built two ways depending on tier:
|
|
392
|
+
* - M1: the planner emits chapters directly alongside scenes (mixed pacing).
|
|
393
|
+
* - L1/L2: `chapter_outline` (L-4) derives chapters from the script first,
|
|
394
|
+
* then L-3 explodes each chapter's narration into scenes and back-fills
|
|
395
|
+
* `sceneIndices`.
|
|
396
|
+
* Absent on S1/S2 plans (short-form has no chapter concept).
|
|
397
|
+
*/
|
|
398
|
+
exports.ChapterSchema = zod_1.z.object({
|
|
399
|
+
/** Stable id, CH_<n>, referenced by scenes / chapter markers. */
|
|
400
|
+
id: zod_1.z.string().regex(/^CH_\d+$/, "id must be CH_<n>"),
|
|
401
|
+
/** Short section title (e.g. "Why latency matters"). Drives YT chapter markers. */
|
|
402
|
+
title: zod_1.z.string(),
|
|
403
|
+
/**
|
|
404
|
+
* Narration text for this chapter (L1+ script-first authoring). The slice of
|
|
405
|
+
* `VideoPlan.script.fullText` that belongs to this section; scenes are
|
|
406
|
+
* exploded from it (L-3). Optional for M1 plans that aren't script-first.
|
|
407
|
+
*/
|
|
408
|
+
narration: zod_1.z.string().optional(),
|
|
409
|
+
/** Estimated spoken duration in ms (from chapter_outline, L-4). */
|
|
410
|
+
estimatedDurationMs: zod_1.z.number().nonnegative().optional(),
|
|
411
|
+
/**
|
|
412
|
+
* Scene indices belonging to this chapter, in render order. Empty until L-3
|
|
413
|
+
* explodes the chapter into scenes; back-filled at that point.
|
|
414
|
+
*/
|
|
415
|
+
sceneIndices: zod_1.z.array(zod_1.z.number().int().nonnegative()).default([]),
|
|
416
|
+
});
|
|
417
|
+
/**
|
|
418
|
+
* Stream L (L-1) — full narration script for L1+ videos. Script-first authoring
|
|
419
|
+
* (L-3) generates this BEFORE scenes: `generate_script` produces the canonical
|
|
420
|
+
* narration, `chapter_outline` segments it, then each segment is exploded into
|
|
421
|
+
* scenes whose `voiceoverLine`s are sentence-boundary slices of `fullText`.
|
|
422
|
+
* Absent on S1/S2/M1 plans (those are scene-first).
|
|
423
|
+
*/
|
|
424
|
+
exports.ScriptSchema = zod_1.z.object({
|
|
425
|
+
/** Canonical full narration text — the source of truth for L1+ voiceover. */
|
|
426
|
+
fullText: zod_1.z.string(),
|
|
427
|
+
/** Word count, drives the duration estimate. */
|
|
428
|
+
wordCount: zod_1.z.number().int().nonnegative().optional(),
|
|
429
|
+
/** Estimated spoken duration in ms at `wpm`. */
|
|
430
|
+
estimatedDurationMs: zod_1.z.number().nonnegative().optional(),
|
|
431
|
+
/** Words-per-minute used for the estimate (typical narration ≈ 150). */
|
|
432
|
+
wpm: zod_1.z.number().int().positive().optional(),
|
|
433
|
+
});
|
|
322
434
|
exports.VideoPlanSchema = zod_1.z.object({
|
|
323
435
|
briefId: zod_1.z.string().optional(),
|
|
324
436
|
/** Persona the router selected (UGC ad / faceless YT / etc.). */
|
|
@@ -326,8 +438,28 @@ exports.VideoPlanSchema = zod_1.z.object({
|
|
|
326
438
|
aspect: project_schema_1.AspectSchema,
|
|
327
439
|
totalDurationMs: zod_1.z.number().positive(),
|
|
328
440
|
totalEstimatedCredits: zod_1.z.number().nonnegative(),
|
|
441
|
+
/**
|
|
442
|
+
* Stream L (L-1) — length tier this plan was authored for. Stamped from
|
|
443
|
+
* `brief.lengthTier` (or derived via `deriveLengthTier`) so downstream
|
|
444
|
+
* consumers (executor cost guardrails L-6, editor chapter UI) don't have to
|
|
445
|
+
* re-derive it. Optional for back-compat with pre-L plans (treat absent as
|
|
446
|
+
* "S2").
|
|
447
|
+
*/
|
|
448
|
+
lengthTier: brief_schema_1.LengthTierSchema.optional(),
|
|
329
449
|
/** Scene list, in render order. */
|
|
330
450
|
scenes: zod_1.z.array(exports.PlannedSceneSchema).min(1),
|
|
451
|
+
/**
|
|
452
|
+
* Stream L (L-1) — chapter structure for M1+ videos. Groups scenes into
|
|
453
|
+
* titled sections; drives YT chapter markers and the script-first explode
|
|
454
|
+
* (L-3). Absent on short-form (S1/S2) plans.
|
|
455
|
+
*/
|
|
456
|
+
chapters: zod_1.z.array(exports.ChapterSchema).optional(),
|
|
457
|
+
/**
|
|
458
|
+
* Stream L (L-1) — full narration script for L1+ videos. Generated before
|
|
459
|
+
* scenes in script-first authoring (L-3); scenes' voiceoverLines are slices
|
|
460
|
+
* of `script.fullText`. Absent on scene-first (S1/S2/M1) plans.
|
|
461
|
+
*/
|
|
462
|
+
script: exports.ScriptSchema.optional(),
|
|
331
463
|
/** Music recommendation for the whole video. */
|
|
332
464
|
music: zod_1.z
|
|
333
465
|
.object({
|
|
@@ -379,6 +511,14 @@ exports.VideoPlanSchema = zod_1.z.object({
|
|
|
379
511
|
voiceStyle: zod_1.z.string().optional(),
|
|
380
512
|
/** Free-form planner notes — e.g. why a particular tier mix was chosen. */
|
|
381
513
|
notes: zod_1.z.string().optional(),
|
|
514
|
+
/**
|
|
515
|
+
* CH-8 — caption styling applied to every CaptionClip at planToProject time.
|
|
516
|
+
* Set by the chat `change_caption_style` tool; absent → renderer defaults
|
|
517
|
+
* (Poppins / 48 / white). Persisting here (not just on the rendered project)
|
|
518
|
+
* keeps the look stable across caption regens. ORCHESTRATOR/LLM must NOT set
|
|
519
|
+
* this in the planner — it's a post-hoc user edit.
|
|
520
|
+
*/
|
|
521
|
+
captionStyle: exports.CaptionStyleSchema.optional(),
|
|
382
522
|
/**
|
|
383
523
|
* AG-12 — Visual Bible built by the BibleBuilder pre-pass and threaded
|
|
384
524
|
* into every scene that references entity ids. Optional because legacy
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
/**
|
|
2
3
|
* Slice 2 — in-editor chat agent.
|
|
3
4
|
*
|
|
@@ -45,12 +46,35 @@ export type ChatTurnEvent = {
|
|
|
45
46
|
export interface ChatTurnTool {
|
|
46
47
|
name: string;
|
|
47
48
|
description: string;
|
|
48
|
-
/** JSON Schema
|
|
49
|
+
/** JSON Schema for tool input. Must be an object schema. Derived from `schema`
|
|
50
|
+
* when the tool is built via {@link defineTool}; may also be hand-authored. */
|
|
49
51
|
inputSchema: Record<string, unknown>;
|
|
52
|
+
/** Optional Zod schema. When present, `runChatTurn` validates the model's raw
|
|
53
|
+
* tool arguments against it before calling `run` — on failure it returns a
|
|
54
|
+
* structured `{ error, issues }` tool_result so the model can self-correct,
|
|
55
|
+
* rather than letting malformed args reach `run`. The single source of truth
|
|
56
|
+
* behind both `inputSchema` and this validation when built via `defineTool`. */
|
|
57
|
+
schema?: z.ZodType;
|
|
50
58
|
/** Execute the tool against its parsed input. Return value is JSON-serialized
|
|
51
59
|
* back to the model as the tool_result content. */
|
|
52
60
|
run: (input: unknown) => Promise<unknown> | unknown;
|
|
53
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Build a {@link ChatTurnTool} from a single Zod schema — the schema is the one
|
|
64
|
+
* source of truth for BOTH the Anthropic `input_schema` (derived here via Zod 4's
|
|
65
|
+
* native `z.toJSONSchema`) AND the runtime validation `runChatTurn` performs
|
|
66
|
+
* before dispatch. This kills the drift that hand-writing a JSON Schema next to a
|
|
67
|
+
* separate `input as {...}` cast invites, and hands `run` already-validated,
|
|
68
|
+
* fully-typed input (`z.infer<S>`) instead of `unknown`.
|
|
69
|
+
*/
|
|
70
|
+
export interface ToolSpec<S extends z.ZodType> {
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
schema: S;
|
|
74
|
+
/** Runs against ALREADY-VALIDATED, typed input. */
|
|
75
|
+
run: (input: z.infer<S>) => Promise<unknown> | unknown;
|
|
76
|
+
}
|
|
77
|
+
export declare function defineTool<S extends z.ZodType>(spec: ToolSpec<S>): ChatTurnTool;
|
|
54
78
|
export interface ChatTurnRequest {
|
|
55
79
|
apiKey: string;
|
|
56
80
|
model: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatAgent.d.ts","sourceRoot":"","sources":["../../../src/services/agent/chatAgent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chatAgent.d.ts","sourceRoot":"","sources":["../../../src/services/agent/chatAgent.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EA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