videoclaw 3.0.0-alpha.1
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/AGENTS.md +165 -0
- package/CLAUDE.md +232 -0
- package/LICENSE +36 -0
- package/README.md +737 -0
- package/dist/cli/args.d.ts +59 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +279 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/handlers/analysis.d.ts +3 -0
- package/dist/cli/handlers/analysis.d.ts.map +1 -0
- package/dist/cli/handlers/analysis.js +111 -0
- package/dist/cli/handlers/analysis.js.map +1 -0
- package/dist/cli/handlers/audio.d.ts +25 -0
- package/dist/cli/handlers/audio.d.ts.map +1 -0
- package/dist/cli/handlers/audio.js +321 -0
- package/dist/cli/handlers/audio.js.map +1 -0
- package/dist/cli/handlers/batch.d.ts +4 -0
- package/dist/cli/handlers/batch.d.ts.map +1 -0
- package/dist/cli/handlers/batch.js +424 -0
- package/dist/cli/handlers/batch.js.map +1 -0
- package/dist/cli/handlers/candidates.d.ts +10 -0
- package/dist/cli/handlers/candidates.d.ts.map +1 -0
- package/dist/cli/handlers/candidates.js +389 -0
- package/dist/cli/handlers/candidates.js.map +1 -0
- package/dist/cli/handlers/character.d.ts +8 -0
- package/dist/cli/handlers/character.d.ts.map +1 -0
- package/dist/cli/handlers/character.js +202 -0
- package/dist/cli/handlers/character.js.map +1 -0
- package/dist/cli/handlers/clone.d.ts +5 -0
- package/dist/cli/handlers/clone.d.ts.map +1 -0
- package/dist/cli/handlers/clone.js +303 -0
- package/dist/cli/handlers/clone.js.map +1 -0
- package/dist/cli/handlers/create.d.ts +5 -0
- package/dist/cli/handlers/create.d.ts.map +1 -0
- package/dist/cli/handlers/create.js +635 -0
- package/dist/cli/handlers/create.js.map +1 -0
- package/dist/cli/handlers/execution.d.ts +5 -0
- package/dist/cli/handlers/execution.d.ts.map +1 -0
- package/dist/cli/handlers/execution.js +132 -0
- package/dist/cli/handlers/execution.js.map +1 -0
- package/dist/cli/handlers/library.d.ts +8 -0
- package/dist/cli/handlers/library.d.ts.map +1 -0
- package/dist/cli/handlers/library.js +77 -0
- package/dist/cli/handlers/library.js.map +1 -0
- package/dist/cli/handlers/media-ops.d.ts +7 -0
- package/dist/cli/handlers/media-ops.d.ts.map +1 -0
- package/dist/cli/handlers/media-ops.js +120 -0
- package/dist/cli/handlers/media-ops.js.map +1 -0
- package/dist/cli/handlers/media-production.d.ts +56 -0
- package/dist/cli/handlers/media-production.d.ts.map +1 -0
- package/dist/cli/handlers/media-production.js +673 -0
- package/dist/cli/handlers/media-production.js.map +1 -0
- package/dist/cli/handlers/motion-overlay.d.ts +10 -0
- package/dist/cli/handlers/motion-overlay.d.ts.map +1 -0
- package/dist/cli/handlers/motion-overlay.js +651 -0
- package/dist/cli/handlers/motion-overlay.js.map +1 -0
- package/dist/cli/handlers/multi-shot.d.ts +2 -0
- package/dist/cli/handlers/multi-shot.d.ts.map +1 -0
- package/dist/cli/handlers/multi-shot.js +424 -0
- package/dist/cli/handlers/multi-shot.js.map +1 -0
- package/dist/cli/handlers/project-ops.d.ts +14 -0
- package/dist/cli/handlers/project-ops.d.ts.map +1 -0
- package/dist/cli/handlers/project-ops.js +241 -0
- package/dist/cli/handlers/project-ops.js.map +1 -0
- package/dist/cli/handlers/prompt-craft.d.ts +8 -0
- package/dist/cli/handlers/prompt-craft.d.ts.map +1 -0
- package/dist/cli/handlers/prompt-craft.js +397 -0
- package/dist/cli/handlers/prompt-craft.js.map +1 -0
- package/dist/cli/handlers/provider-registration.d.ts +29 -0
- package/dist/cli/handlers/provider-registration.d.ts.map +1 -0
- package/dist/cli/handlers/provider-registration.js +225 -0
- package/dist/cli/handlers/provider-registration.js.map +1 -0
- package/dist/cli/handlers/reference-sheets.d.ts +6 -0
- package/dist/cli/handlers/reference-sheets.d.ts.map +1 -0
- package/dist/cli/handlers/reference-sheets.js +181 -0
- package/dist/cli/handlers/reference-sheets.js.map +1 -0
- package/dist/cli/handlers/reporting.d.ts +18 -0
- package/dist/cli/handlers/reporting.d.ts.map +1 -0
- package/dist/cli/handlers/reporting.js +155 -0
- package/dist/cli/handlers/reporting.js.map +1 -0
- package/dist/cli/handlers/review-portal.d.ts +8 -0
- package/dist/cli/handlers/review-portal.d.ts.map +1 -0
- package/dist/cli/handlers/review-portal.js +276 -0
- package/dist/cli/handlers/review-portal.js.map +1 -0
- package/dist/cli/handlers/show.d.ts +11 -0
- package/dist/cli/handlers/show.d.ts.map +1 -0
- package/dist/cli/handlers/show.js +136 -0
- package/dist/cli/handlers/show.js.map +1 -0
- package/dist/cli/handlers/stages.d.ts +6 -0
- package/dist/cli/handlers/stages.d.ts.map +1 -0
- package/dist/cli/handlers/stages.js +333 -0
- package/dist/cli/handlers/stages.js.map +1 -0
- package/dist/cli/handlers/studio.d.ts +2 -0
- package/dist/cli/handlers/studio.d.ts.map +1 -0
- package/dist/cli/handlers/studio.js +159 -0
- package/dist/cli/handlers/studio.js.map +1 -0
- package/dist/cli/handlers/templates.d.ts +7 -0
- package/dist/cli/handlers/templates.d.ts.map +1 -0
- package/dist/cli/handlers/templates.js +61 -0
- package/dist/cli/handlers/templates.js.map +1 -0
- package/dist/cli/provider-adapter.d.ts +3 -0
- package/dist/cli/provider-adapter.d.ts.map +1 -0
- package/dist/cli/provider-adapter.js +96 -0
- package/dist/cli/provider-adapter.js.map +1 -0
- package/dist/cli/vclaw.d.ts +15 -0
- package/dist/cli/vclaw.d.ts.map +1 -0
- package/dist/cli/vclaw.js +318 -0
- package/dist/cli/vclaw.js.map +1 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +3 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +27 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +168 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +55 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +80 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/video/analyze-output.d.ts +5 -0
- package/dist/video/analyze-output.d.ts.map +1 -0
- package/dist/video/analyze-output.js +7 -0
- package/dist/video/analyze-output.js.map +1 -0
- package/dist/video/archive-project.d.ts +14 -0
- package/dist/video/archive-project.d.ts.map +1 -0
- package/dist/video/archive-project.js +41 -0
- package/dist/video/archive-project.js.map +1 -0
- package/dist/video/artifact-history.d.ts +8 -0
- package/dist/video/artifact-history.d.ts.map +1 -0
- package/dist/video/artifact-history.js +12 -0
- package/dist/video/artifact-history.js.map +1 -0
- package/dist/video/artifact-store.d.ts +8 -0
- package/dist/video/artifact-store.d.ts.map +1 -0
- package/dist/video/artifact-store.js +37 -0
- package/dist/video/artifact-store.js.map +1 -0
- package/dist/video/artifact-validation.d.ts +15 -0
- package/dist/video/artifact-validation.d.ts.map +1 -0
- package/dist/video/artifact-validation.js +287 -0
- package/dist/video/artifact-validation.js.map +1 -0
- package/dist/video/artifacts.d.ts +112 -0
- package/dist/video/artifacts.d.ts.map +1 -0
- package/dist/video/artifacts.js +31 -0
- package/dist/video/artifacts.js.map +1 -0
- package/dist/video/assemble/animate-slides.d.ts +108 -0
- package/dist/video/assemble/animate-slides.d.ts.map +1 -0
- package/dist/video/assemble/animate-slides.js +152 -0
- package/dist/video/assemble/animate-slides.js.map +1 -0
- package/dist/video/assemble/animation-styles.d.ts +21 -0
- package/dist/video/assemble/animation-styles.d.ts.map +1 -0
- package/dist/video/assemble/animation-styles.js +32 -0
- package/dist/video/assemble/animation-styles.js.map +1 -0
- package/dist/video/assemble/animation-styles.json +97 -0
- package/dist/video/assemble/assemble.d.ts +24 -0
- package/dist/video/assemble/assemble.d.ts.map +1 -0
- package/dist/video/assemble/assemble.js +457 -0
- package/dist/video/assemble/assemble.js.map +1 -0
- package/dist/video/assemble/audio-concat.d.ts +61 -0
- package/dist/video/assemble/audio-concat.d.ts.map +1 -0
- package/dist/video/assemble/audio-concat.js +108 -0
- package/dist/video/assemble/audio-concat.js.map +1 -0
- package/dist/video/assemble/audio-mix-plan.d.ts +84 -0
- package/dist/video/assemble/audio-mix-plan.d.ts.map +1 -0
- package/dist/video/assemble/audio-mix-plan.js +74 -0
- package/dist/video/assemble/audio-mix-plan.js.map +1 -0
- package/dist/video/assemble/audio-utils.d.ts +32 -0
- package/dist/video/assemble/audio-utils.d.ts.map +1 -0
- package/dist/video/assemble/audio-utils.js +91 -0
- package/dist/video/assemble/audio-utils.js.map +1 -0
- package/dist/video/assemble/cut-segment.d.ts +40 -0
- package/dist/video/assemble/cut-segment.d.ts.map +1 -0
- package/dist/video/assemble/cut-segment.js +77 -0
- package/dist/video/assemble/cut-segment.js.map +1 -0
- package/dist/video/assemble/ffmpeg.d.ts +91 -0
- package/dist/video/assemble/ffmpeg.d.ts.map +1 -0
- package/dist/video/assemble/ffmpeg.js +251 -0
- package/dist/video/assemble/ffmpeg.js.map +1 -0
- package/dist/video/assemble/gemini-vision-classify.d.ts +37 -0
- package/dist/video/assemble/gemini-vision-classify.d.ts.map +1 -0
- package/dist/video/assemble/gemini-vision-classify.js +123 -0
- package/dist/video/assemble/gemini-vision-classify.js.map +1 -0
- package/dist/video/assemble/index.d.ts +47 -0
- package/dist/video/assemble/index.d.ts.map +1 -0
- package/dist/video/assemble/index.js +40 -0
- package/dist/video/assemble/index.js.map +1 -0
- package/dist/video/assemble/media-qc.d.ts +44 -0
- package/dist/video/assemble/media-qc.d.ts.map +1 -0
- package/dist/video/assemble/media-qc.js +181 -0
- package/dist/video/assemble/media-qc.js.map +1 -0
- package/dist/video/assemble/music.d.ts +51 -0
- package/dist/video/assemble/music.d.ts.map +1 -0
- package/dist/video/assemble/music.js +171 -0
- package/dist/video/assemble/music.js.map +1 -0
- package/dist/video/assemble/narration-fit.d.ts +32 -0
- package/dist/video/assemble/narration-fit.d.ts.map +1 -0
- package/dist/video/assemble/narration-fit.js +59 -0
- package/dist/video/assemble/narration-fit.js.map +1 -0
- package/dist/video/assemble/overlay.d.ts +81 -0
- package/dist/video/assemble/overlay.d.ts.map +1 -0
- package/dist/video/assemble/overlay.js +141 -0
- package/dist/video/assemble/overlay.js.map +1 -0
- package/dist/video/assemble/pdf.d.ts +46 -0
- package/dist/video/assemble/pdf.d.ts.map +1 -0
- package/dist/video/assemble/pdf.js +111 -0
- package/dist/video/assemble/pdf.js.map +1 -0
- package/dist/video/assemble/qa-dialogue-lint.d.ts +56 -0
- package/dist/video/assemble/qa-dialogue-lint.d.ts.map +1 -0
- package/dist/video/assemble/qa-dialogue-lint.js +85 -0
- package/dist/video/assemble/qa-dialogue-lint.js.map +1 -0
- package/dist/video/assemble/qa-image-filter.d.ts +52 -0
- package/dist/video/assemble/qa-image-filter.d.ts.map +1 -0
- package/dist/video/assemble/qa-image-filter.js +102 -0
- package/dist/video/assemble/qa-image-filter.js.map +1 -0
- package/dist/video/assemble/qa-image-vision.d.ts +57 -0
- package/dist/video/assemble/qa-image-vision.d.ts.map +1 -0
- package/dist/video/assemble/qa-image-vision.js +96 -0
- package/dist/video/assemble/qa-image-vision.js.map +1 -0
- package/dist/video/assemble/qa-narration-vision.d.ts +53 -0
- package/dist/video/assemble/qa-narration-vision.d.ts.map +1 -0
- package/dist/video/assemble/qa-narration-vision.js +87 -0
- package/dist/video/assemble/qa-narration-vision.js.map +1 -0
- package/dist/video/assemble/qa-narration.d.ts +53 -0
- package/dist/video/assemble/qa-narration.d.ts.map +1 -0
- package/dist/video/assemble/qa-narration.js +85 -0
- package/dist/video/assemble/qa-narration.js.map +1 -0
- package/dist/video/assemble/stitch-ad.d.ts +88 -0
- package/dist/video/assemble/stitch-ad.d.ts.map +1 -0
- package/dist/video/assemble/stitch-ad.js +161 -0
- package/dist/video/assemble/stitch-ad.js.map +1 -0
- package/dist/video/assemble/stitch.d.ts +341 -0
- package/dist/video/assemble/stitch.d.ts.map +1 -0
- package/dist/video/assemble/stitch.js +607 -0
- package/dist/video/assemble/stitch.js.map +1 -0
- package/dist/video/assemble/text-card.d.ts +78 -0
- package/dist/video/assemble/text-card.d.ts.map +1 -0
- package/dist/video/assemble/text-card.js +210 -0
- package/dist/video/assemble/text-card.js.map +1 -0
- package/dist/video/assemble/title-card.d.ts +39 -0
- package/dist/video/assemble/title-card.d.ts.map +1 -0
- package/dist/video/assemble/title-card.js +127 -0
- package/dist/video/assemble/title-card.js.map +1 -0
- package/dist/video/assemble/transcript.d.ts +66 -0
- package/dist/video/assemble/transcript.d.ts.map +1 -0
- package/dist/video/assemble/transcript.js +200 -0
- package/dist/video/assemble/transcript.js.map +1 -0
- package/dist/video/assemble/tts-elevenlabs.d.ts +52 -0
- package/dist/video/assemble/tts-elevenlabs.d.ts.map +1 -0
- package/dist/video/assemble/tts-elevenlabs.js +118 -0
- package/dist/video/assemble/tts-elevenlabs.js.map +1 -0
- package/dist/video/assemble/tts.d.ts +79 -0
- package/dist/video/assemble/tts.d.ts.map +1 -0
- package/dist/video/assemble/tts.js +131 -0
- package/dist/video/assemble/tts.js.map +1 -0
- package/dist/video/assemble/types.d.ts +43 -0
- package/dist/video/assemble/types.d.ts.map +1 -0
- package/dist/video/assemble/types.js +2 -0
- package/dist/video/assemble/types.js.map +1 -0
- package/dist/video/assemble/upscale.d.ts +43 -0
- package/dist/video/assemble/upscale.d.ts.map +1 -0
- package/dist/video/assemble/upscale.js +52 -0
- package/dist/video/assemble/upscale.js.map +1 -0
- package/dist/video/asset-spec.d.ts +15 -0
- package/dist/video/asset-spec.d.ts.map +1 -0
- package/dist/video/asset-spec.js +43 -0
- package/dist/video/asset-spec.js.map +1 -0
- package/dist/video/asset-tag-lookup.d.ts +31 -0
- package/dist/video/asset-tag-lookup.d.ts.map +1 -0
- package/dist/video/asset-tag-lookup.js +45 -0
- package/dist/video/asset-tag-lookup.js.map +1 -0
- package/dist/video/atomic-write.d.ts +2 -0
- package/dist/video/atomic-write.d.ts.map +1 -0
- package/dist/video/atomic-write.js +7 -0
- package/dist/video/atomic-write.js.map +1 -0
- package/dist/video/audio-platform/native-elevenlabs-sfx.d.ts +29 -0
- package/dist/video/audio-platform/native-elevenlabs-sfx.d.ts.map +1 -0
- package/dist/video/audio-platform/native-elevenlabs-sfx.js +95 -0
- package/dist/video/audio-platform/native-elevenlabs-sfx.js.map +1 -0
- package/dist/video/audio-platform/native-elevenlabs-tts.d.ts +30 -0
- package/dist/video/audio-platform/native-elevenlabs-tts.d.ts.map +1 -0
- package/dist/video/audio-platform/native-elevenlabs-tts.js +95 -0
- package/dist/video/audio-platform/native-elevenlabs-tts.js.map +1 -0
- package/dist/video/audio-platform/native-flowmusic.d.ts +21 -0
- package/dist/video/audio-platform/native-flowmusic.d.ts.map +1 -0
- package/dist/video/audio-platform/native-flowmusic.js +137 -0
- package/dist/video/audio-platform/native-flowmusic.js.map +1 -0
- package/dist/video/audio-platform/native-gemini-tts.d.ts +26 -0
- package/dist/video/audio-platform/native-gemini-tts.d.ts.map +1 -0
- package/dist/video/audio-platform/native-gemini-tts.js +202 -0
- package/dist/video/audio-platform/native-gemini-tts.js.map +1 -0
- package/dist/video/audio-platform/native-lyria.d.ts +35 -0
- package/dist/video/audio-platform/native-lyria.d.ts.map +1 -0
- package/dist/video/audio-platform/native-lyria.js +189 -0
- package/dist/video/audio-platform/native-lyria.js.map +1 -0
- package/dist/video/audio-platform/native-lyria3.d.ts +36 -0
- package/dist/video/audio-platform/native-lyria3.d.ts.map +1 -0
- package/dist/video/audio-platform/native-lyria3.js +210 -0
- package/dist/video/audio-platform/native-lyria3.js.map +1 -0
- package/dist/video/audio-platform/registry.d.ts +82 -0
- package/dist/video/audio-platform/registry.d.ts.map +1 -0
- package/dist/video/audio-platform/registry.js +189 -0
- package/dist/video/audio-platform/registry.js.map +1 -0
- package/dist/video/audio-platform/suno-backend.d.ts +11 -0
- package/dist/video/audio-platform/suno-backend.d.ts.map +1 -0
- package/dist/video/audio-platform/suno-backend.js +33 -0
- package/dist/video/audio-platform/suno-backend.js.map +1 -0
- package/dist/video/audio-platform/types.d.ts +128 -0
- package/dist/video/audio-platform/types.d.ts.map +1 -0
- package/dist/video/audio-platform/types.js +9 -0
- package/dist/video/audio-platform/types.js.map +1 -0
- package/dist/video/batch-queue.d.ts +276 -0
- package/dist/video/batch-queue.d.ts.map +1 -0
- package/dist/video/batch-queue.js +519 -0
- package/dist/video/batch-queue.js.map +1 -0
- package/dist/video/blueprint-prompt.d.ts +37 -0
- package/dist/video/blueprint-prompt.d.ts.map +1 -0
- package/dist/video/blueprint-prompt.js +107 -0
- package/dist/video/blueprint-prompt.js.map +1 -0
- package/dist/video/brand-definition.d.ts +97 -0
- package/dist/video/brand-definition.d.ts.map +1 -0
- package/dist/video/brand-definition.js +206 -0
- package/dist/video/brand-definition.js.map +1 -0
- package/dist/video/brand-dna.d.ts +101 -0
- package/dist/video/brand-dna.d.ts.map +1 -0
- package/dist/video/brand-dna.js +370 -0
- package/dist/video/brand-dna.js.map +1 -0
- package/dist/video/brand-prompt.d.ts +13 -0
- package/dist/video/brand-prompt.d.ts.map +1 -0
- package/dist/video/brand-prompt.js +26 -0
- package/dist/video/brand-prompt.js.map +1 -0
- package/dist/video/candidate-migrate.d.ts +27 -0
- package/dist/video/candidate-migrate.d.ts.map +1 -0
- package/dist/video/candidate-migrate.js +119 -0
- package/dist/video/candidate-migrate.js.map +1 -0
- package/dist/video/category-registry.d.ts +38 -0
- package/dist/video/category-registry.d.ts.map +1 -0
- package/dist/video/category-registry.js +188 -0
- package/dist/video/category-registry.js.map +1 -0
- package/dist/video/chain-fallback.d.ts +39 -0
- package/dist/video/chain-fallback.d.ts.map +1 -0
- package/dist/video/chain-fallback.js +43 -0
- package/dist/video/chain-fallback.js.map +1 -0
- package/dist/video/character-auto-create.d.ts +72 -0
- package/dist/video/character-auto-create.d.ts.map +1 -0
- package/dist/video/character-auto-create.js +392 -0
- package/dist/video/character-auto-create.js.map +1 -0
- package/dist/video/character-consistency.d.ts +3 -0
- package/dist/video/character-consistency.d.ts.map +1 -0
- package/dist/video/character-consistency.js +69 -0
- package/dist/video/character-consistency.js.map +1 -0
- package/dist/video/characters.d.ts +44 -0
- package/dist/video/characters.d.ts.map +1 -0
- package/dist/video/characters.js +96 -0
- package/dist/video/characters.js.map +1 -0
- package/dist/video/checkpoints.d.ts +16 -0
- package/dist/video/checkpoints.d.ts.map +1 -0
- package/dist/video/checkpoints.js +29 -0
- package/dist/video/checkpoints.js.map +1 -0
- package/dist/video/cinema-profile.d.ts +57 -0
- package/dist/video/cinema-profile.d.ts.map +1 -0
- package/dist/video/cinema-profile.js +89 -0
- package/dist/video/cinema-profile.js.map +1 -0
- package/dist/video/cinematography.d.ts +299 -0
- package/dist/video/cinematography.d.ts.map +1 -0
- package/dist/video/cinematography.js +914 -0
- package/dist/video/cinematography.js.map +1 -0
- package/dist/video/cli-output.d.ts +52 -0
- package/dist/video/cli-output.d.ts.map +1 -0
- package/dist/video/cli-output.js +81 -0
- package/dist/video/cli-output.js.map +1 -0
- package/dist/video/cli-schema.d.ts +40 -0
- package/dist/video/cli-schema.d.ts.map +1 -0
- package/dist/video/cli-schema.js +447 -0
- package/dist/video/cli-schema.js.map +1 -0
- package/dist/video/cost-estimate.d.ts +37 -0
- package/dist/video/cost-estimate.d.ts.map +1 -0
- package/dist/video/cost-estimate.js +103 -0
- package/dist/video/cost-estimate.js.map +1 -0
- package/dist/video/csv-export.d.ts +8 -0
- package/dist/video/csv-export.d.ts.map +1 -0
- package/dist/video/csv-export.js +133 -0
- package/dist/video/csv-export.js.map +1 -0
- package/dist/video/dependencies.d.ts +23 -0
- package/dist/video/dependencies.d.ts.map +1 -0
- package/dist/video/dependencies.js +36 -0
- package/dist/video/dependencies.js.map +1 -0
- package/dist/video/dialogue-fit.d.ts +23 -0
- package/dist/video/dialogue-fit.d.ts.map +1 -0
- package/dist/video/dialogue-fit.js +38 -0
- package/dist/video/dialogue-fit.js.map +1 -0
- package/dist/video/dialogue.d.ts +77 -0
- package/dist/video/dialogue.d.ts.map +1 -0
- package/dist/video/dialogue.js +143 -0
- package/dist/video/dialogue.js.map +1 -0
- package/dist/video/director-defaults.d.ts +37 -0
- package/dist/video/director-defaults.d.ts.map +1 -0
- package/dist/video/director-defaults.js +383 -0
- package/dist/video/director-defaults.js.map +1 -0
- package/dist/video/director-preflight.d.ts +53 -0
- package/dist/video/director-preflight.d.ts.map +1 -0
- package/dist/video/director-preflight.js +462 -0
- package/dist/video/director-preflight.js.map +1 -0
- package/dist/video/doctor-portfolio.d.ts +43 -0
- package/dist/video/doctor-portfolio.d.ts.map +1 -0
- package/dist/video/doctor-portfolio.js +137 -0
- package/dist/video/doctor-portfolio.js.map +1 -0
- package/dist/video/doctor.d.ts +13 -0
- package/dist/video/doctor.d.ts.map +1 -0
- package/dist/video/doctor.js +449 -0
- package/dist/video/doctor.js.map +1 -0
- package/dist/video/emotion-cues.d.ts +15 -0
- package/dist/video/emotion-cues.d.ts.map +1 -0
- package/dist/video/emotion-cues.js +37 -0
- package/dist/video/emotion-cues.js.map +1 -0
- package/dist/video/environment-assets.d.ts +28 -0
- package/dist/video/environment-assets.d.ts.map +1 -0
- package/dist/video/environment-assets.js +43 -0
- package/dist/video/environment-assets.js.map +1 -0
- package/dist/video/environment-auto-create.d.ts +20 -0
- package/dist/video/environment-auto-create.d.ts.map +1 -0
- package/dist/video/environment-auto-create.js +88 -0
- package/dist/video/environment-auto-create.js.map +1 -0
- package/dist/video/errors.d.ts +35 -0
- package/dist/video/errors.d.ts.map +1 -0
- package/dist/video/errors.js +117 -0
- package/dist/video/errors.js.map +1 -0
- package/dist/video/events.d.ts +11 -0
- package/dist/video/events.d.ts.map +1 -0
- package/dist/video/events.js +32 -0
- package/dist/video/events.js.map +1 -0
- package/dist/video/execute-autochain.d.ts +65 -0
- package/dist/video/execute-autochain.d.ts.map +1 -0
- package/dist/video/execute-autochain.js +165 -0
- package/dist/video/execute-autochain.js.map +1 -0
- package/dist/video/execute.d.ts +27 -0
- package/dist/video/execute.d.ts.map +1 -0
- package/dist/video/execute.js +477 -0
- package/dist/video/execute.js.map +1 -0
- package/dist/video/execution-cancel.d.ts +11 -0
- package/dist/video/execution-cancel.d.ts.map +1 -0
- package/dist/video/execution-cancel.js +85 -0
- package/dist/video/execution-cancel.js.map +1 -0
- package/dist/video/execution-plan.d.ts +5 -0
- package/dist/video/execution-plan.d.ts.map +1 -0
- package/dist/video/execution-plan.js +145 -0
- package/dist/video/execution-plan.js.map +1 -0
- package/dist/video/execution-profile.d.ts +25 -0
- package/dist/video/execution-profile.d.ts.map +1 -0
- package/dist/video/execution-profile.js +124 -0
- package/dist/video/execution-profile.js.map +1 -0
- package/dist/video/execution-runtime.d.ts +104 -0
- package/dist/video/execution-runtime.d.ts.map +1 -0
- package/dist/video/execution-runtime.js +750 -0
- package/dist/video/execution-runtime.js.map +1 -0
- package/dist/video/execution-seed.d.ts +14 -0
- package/dist/video/execution-seed.d.ts.map +1 -0
- package/dist/video/execution-seed.js +29 -0
- package/dist/video/execution-seed.js.map +1 -0
- package/dist/video/execution-status.d.ts +12 -0
- package/dist/video/execution-status.d.ts.map +1 -0
- package/dist/video/execution-status.js +666 -0
- package/dist/video/execution-status.js.map +1 -0
- package/dist/video/filmmaking-prompts.d.ts +356 -0
- package/dist/video/filmmaking-prompts.d.ts.map +1 -0
- package/dist/video/filmmaking-prompts.js +1212 -0
- package/dist/video/filmmaking-prompts.js.map +1 -0
- package/dist/video/final-media.d.ts +17 -0
- package/dist/video/final-media.d.ts.map +1 -0
- package/dist/video/final-media.js +78 -0
- package/dist/video/final-media.js.map +1 -0
- package/dist/video/finish.d.ts +99 -0
- package/dist/video/finish.d.ts.map +1 -0
- package/dist/video/finish.js +159 -0
- package/dist/video/finish.js.map +1 -0
- package/dist/video/flow-character-library.d.ts +143 -0
- package/dist/video/flow-character-library.d.ts.map +1 -0
- package/dist/video/flow-character-library.js +211 -0
- package/dist/video/flow-character-library.js.map +1 -0
- package/dist/video/flow-markers.d.ts +107 -0
- package/dist/video/flow-markers.d.ts.map +1 -0
- package/dist/video/flow-markers.js +278 -0
- package/dist/video/flow-markers.js.map +1 -0
- package/dist/video/gemini-analyze.d.ts +44 -0
- package/dist/video/gemini-analyze.d.ts.map +1 -0
- package/dist/video/gemini-analyze.js +323 -0
- package/dist/video/gemini-analyze.js.map +1 -0
- package/dist/video/gemini-continuity.d.ts +40 -0
- package/dist/video/gemini-continuity.d.ts.map +1 -0
- package/dist/video/gemini-continuity.js +145 -0
- package/dist/video/gemini-continuity.js.map +1 -0
- package/dist/video/gemini-judge.d.ts +33 -0
- package/dist/video/gemini-judge.d.ts.map +1 -0
- package/dist/video/gemini-judge.js +218 -0
- package/dist/video/gemini-judge.js.map +1 -0
- package/dist/video/gemini-key-pool.d.ts +23 -0
- package/dist/video/gemini-key-pool.d.ts.map +1 -0
- package/dist/video/gemini-key-pool.js +107 -0
- package/dist/video/gemini-key-pool.js.map +1 -0
- package/dist/video/gen-image-flow.d.ts +187 -0
- package/dist/video/gen-image-flow.d.ts.map +1 -0
- package/dist/video/gen-image-flow.js +331 -0
- package/dist/video/gen-image-flow.js.map +1 -0
- package/dist/video/gen-image.d.ts +153 -0
- package/dist/video/gen-image.d.ts.map +1 -0
- package/dist/video/gen-image.js +263 -0
- package/dist/video/gen-image.js.map +1 -0
- package/dist/video/generation-telemetry.d.ts +60 -0
- package/dist/video/generation-telemetry.d.ts.map +1 -0
- package/dist/video/generation-telemetry.js +214 -0
- package/dist/video/generation-telemetry.js.map +1 -0
- package/dist/video/http-error-safety.d.ts +9 -0
- package/dist/video/http-error-safety.d.ts.map +1 -0
- package/dist/video/http-error-safety.js +14 -0
- package/dist/video/http-error-safety.js.map +1 -0
- package/dist/video/image-dimensions.d.ts +7 -0
- package/dist/video/image-dimensions.d.ts.map +1 -0
- package/dist/video/image-dimensions.js +54 -0
- package/dist/video/image-dimensions.js.map +1 -0
- package/dist/video/legacy-import.d.ts +11 -0
- package/dist/video/legacy-import.d.ts.map +1 -0
- package/dist/video/legacy-import.js +181 -0
- package/dist/video/legacy-import.js.map +1 -0
- package/dist/video/library-clean.d.ts +34 -0
- package/dist/video/library-clean.d.ts.map +1 -0
- package/dist/video/library-clean.js +340 -0
- package/dist/video/library-clean.js.map +1 -0
- package/dist/video/lipsync.d.ts +72 -0
- package/dist/video/lipsync.d.ts.map +1 -0
- package/dist/video/lipsync.js +136 -0
- package/dist/video/lipsync.js.map +1 -0
- package/dist/video/media-host.d.ts +41 -0
- package/dist/video/media-host.d.ts.map +1 -0
- package/dist/video/media-host.js +106 -0
- package/dist/video/media-host.js.map +1 -0
- package/dist/video/metrics.d.ts +30 -0
- package/dist/video/metrics.d.ts.map +1 -0
- package/dist/video/metrics.js +81 -0
- package/dist/video/metrics.js.map +1 -0
- package/dist/video/motion-overlay/analyze-reel.d.ts +38 -0
- package/dist/video/motion-overlay/analyze-reel.d.ts.map +1 -0
- package/dist/video/motion-overlay/analyze-reel.js +185 -0
- package/dist/video/motion-overlay/analyze-reel.js.map +1 -0
- package/dist/video/motion-overlay/animate-render.d.ts +63 -0
- package/dist/video/motion-overlay/animate-render.d.ts.map +1 -0
- package/dist/video/motion-overlay/animate-render.js +128 -0
- package/dist/video/motion-overlay/animate-render.js.map +1 -0
- package/dist/video/motion-overlay/animate.d.ts +37 -0
- package/dist/video/motion-overlay/animate.d.ts.map +1 -0
- package/dist/video/motion-overlay/animate.js +97 -0
- package/dist/video/motion-overlay/animate.js.map +1 -0
- package/dist/video/motion-overlay/avatar-host-transport.d.ts +161 -0
- package/dist/video/motion-overlay/avatar-host-transport.d.ts.map +1 -0
- package/dist/video/motion-overlay/avatar-host-transport.js +325 -0
- package/dist/video/motion-overlay/avatar-host-transport.js.map +1 -0
- package/dist/video/motion-overlay/avatar-host.d.ts +131 -0
- package/dist/video/motion-overlay/avatar-host.d.ts.map +1 -0
- package/dist/video/motion-overlay/avatar-host.js +131 -0
- package/dist/video/motion-overlay/avatar-host.js.map +1 -0
- package/dist/video/motion-overlay/compose-prompt.d.ts +48 -0
- package/dist/video/motion-overlay/compose-prompt.d.ts.map +1 -0
- package/dist/video/motion-overlay/compose-prompt.js +217 -0
- package/dist/video/motion-overlay/compose-prompt.js.map +1 -0
- package/dist/video/motion-overlay/execute.d.ts +190 -0
- package/dist/video/motion-overlay/execute.d.ts.map +1 -0
- package/dist/video/motion-overlay/execute.js +205 -0
- package/dist/video/motion-overlay/execute.js.map +1 -0
- package/dist/video/motion-overlay/flow-pack.d.ts +65 -0
- package/dist/video/motion-overlay/flow-pack.d.ts.map +1 -0
- package/dist/video/motion-overlay/flow-pack.js +178 -0
- package/dist/video/motion-overlay/flow-pack.js.map +1 -0
- package/dist/video/motion-overlay/ingest.d.ts +74 -0
- package/dist/video/motion-overlay/ingest.d.ts.map +1 -0
- package/dist/video/motion-overlay/ingest.js +172 -0
- package/dist/video/motion-overlay/ingest.js.map +1 -0
- package/dist/video/motion-overlay/motifs.d.ts +63 -0
- package/dist/video/motion-overlay/motifs.d.ts.map +1 -0
- package/dist/video/motion-overlay/motifs.js +192 -0
- package/dist/video/motion-overlay/motifs.js.map +1 -0
- package/dist/video/motion-overlay/motion-style.d.ts +56 -0
- package/dist/video/motion-overlay/motion-style.d.ts.map +1 -0
- package/dist/video/motion-overlay/motion-style.js +130 -0
- package/dist/video/motion-overlay/motion-style.js.map +1 -0
- package/dist/video/motion-overlay/plan.d.ts +49 -0
- package/dist/video/motion-overlay/plan.d.ts.map +1 -0
- package/dist/video/motion-overlay/plan.js +79 -0
- package/dist/video/motion-overlay/plan.js.map +1 -0
- package/dist/video/motion-overlay/preview.d.ts +36 -0
- package/dist/video/motion-overlay/preview.d.ts.map +1 -0
- package/dist/video/motion-overlay/preview.js +169 -0
- package/dist/video/motion-overlay/preview.js.map +1 -0
- package/dist/video/motion-overlay/render-local.d.ts +118 -0
- package/dist/video/motion-overlay/render-local.d.ts.map +1 -0
- package/dist/video/motion-overlay/render-local.js +298 -0
- package/dist/video/motion-overlay/render-local.js.map +1 -0
- package/dist/video/motion-overlay/run.d.ts +58 -0
- package/dist/video/motion-overlay/run.d.ts.map +1 -0
- package/dist/video/motion-overlay/run.js +147 -0
- package/dist/video/motion-overlay/run.js.map +1 -0
- package/dist/video/motion-overlay/slice.d.ts +29 -0
- package/dist/video/motion-overlay/slice.d.ts.map +1 -0
- package/dist/video/motion-overlay/slice.js +88 -0
- package/dist/video/motion-overlay/slice.js.map +1 -0
- package/dist/video/motion-overlay/transcribe.d.ts +49 -0
- package/dist/video/motion-overlay/transcribe.d.ts.map +1 -0
- package/dist/video/motion-overlay/transcribe.js +180 -0
- package/dist/video/motion-overlay/transcribe.js.map +1 -0
- package/dist/video/motion-overlay/types.d.ts +82 -0
- package/dist/video/motion-overlay/types.d.ts.map +1 -0
- package/dist/video/motion-overlay/types.js +12 -0
- package/dist/video/motion-overlay/types.js.map +1 -0
- package/dist/video/motion-overlay/v2v-transport.d.ts +37 -0
- package/dist/video/motion-overlay/v2v-transport.d.ts.map +1 -0
- package/dist/video/motion-overlay/v2v-transport.js +178 -0
- package/dist/video/motion-overlay/v2v-transport.js.map +1 -0
- package/dist/video/motion-overlay/write.d.ts +40 -0
- package/dist/video/motion-overlay/write.d.ts.map +1 -0
- package/dist/video/motion-overlay/write.js +113 -0
- package/dist/video/motion-overlay/write.js.map +1 -0
- package/dist/video/multi-shot-artifact.d.ts +19 -0
- package/dist/video/multi-shot-artifact.d.ts.map +1 -0
- package/dist/video/multi-shot-artifact.js +44 -0
- package/dist/video/multi-shot-artifact.js.map +1 -0
- package/dist/video/multi-shot-prompt.d.ts +99 -0
- package/dist/video/multi-shot-prompt.d.ts.map +1 -0
- package/dist/video/multi-shot-prompt.js +466 -0
- package/dist/video/multi-shot-prompt.js.map +1 -0
- package/dist/video/music-video.d.ts +110 -0
- package/dist/video/music-video.d.ts.map +1 -0
- package/dist/video/music-video.js +190 -0
- package/dist/video/music-video.js.map +1 -0
- package/dist/video/narrate.d.ts +58 -0
- package/dist/video/narrate.d.ts.map +1 -0
- package/dist/video/narrate.js +145 -0
- package/dist/video/narrate.js.map +1 -0
- package/dist/video/native-dreamina.d.ts +35 -0
- package/dist/video/native-dreamina.d.ts.map +1 -0
- package/dist/video/native-dreamina.js +532 -0
- package/dist/video/native-dreamina.js.map +1 -0
- package/dist/video/native-flow-r2v.d.ts +113 -0
- package/dist/video/native-flow-r2v.d.ts.map +1 -0
- package/dist/video/native-flow-r2v.js +223 -0
- package/dist/video/native-flow-r2v.js.map +1 -0
- package/dist/video/native-runway.d.ts +41 -0
- package/dist/video/native-runway.d.ts.map +1 -0
- package/dist/video/native-runway.js +523 -0
- package/dist/video/native-runway.js.map +1 -0
- package/dist/video/native-seedance.d.ts +74 -0
- package/dist/video/native-seedance.d.ts.map +1 -0
- package/dist/video/native-seedance.js +461 -0
- package/dist/video/native-seedance.js.map +1 -0
- package/dist/video/native-veo.d.ts +20 -0
- package/dist/video/native-veo.d.ts.map +1 -0
- package/dist/video/native-veo.js +390 -0
- package/dist/video/native-veo.js.map +1 -0
- package/dist/video/next-actions.d.ts +27 -0
- package/dist/video/next-actions.d.ts.map +1 -0
- package/dist/video/next-actions.js +201 -0
- package/dist/video/next-actions.js.map +1 -0
- package/dist/video/obsidian-export.d.ts +12 -0
- package/dist/video/obsidian-export.d.ts.map +1 -0
- package/dist/video/obsidian-export.js +285 -0
- package/dist/video/obsidian-export.js.map +1 -0
- package/dist/video/obsidian-sync.d.ts +13 -0
- package/dist/video/obsidian-sync.d.ts.map +1 -0
- package/dist/video/obsidian-sync.js +479 -0
- package/dist/video/obsidian-sync.js.map +1 -0
- package/dist/video/obsidian-vault.d.ts +8 -0
- package/dist/video/obsidian-vault.d.ts.map +1 -0
- package/dist/video/obsidian-vault.js +81 -0
- package/dist/video/obsidian-vault.js.map +1 -0
- package/dist/video/outfit-prompts.d.ts +10 -0
- package/dist/video/outfit-prompts.d.ts.map +1 -0
- package/dist/video/outfit-prompts.js +14 -0
- package/dist/video/outfit-prompts.js.map +1 -0
- package/dist/video/outpaint-keyframe.d.ts +95 -0
- package/dist/video/outpaint-keyframe.d.ts.map +1 -0
- package/dist/video/outpaint-keyframe.js +244 -0
- package/dist/video/outpaint-keyframe.js.map +1 -0
- package/dist/video/pipeline-manifest.d.ts +4 -0
- package/dist/video/pipeline-manifest.d.ts.map +1 -0
- package/dist/video/pipeline-manifest.js +13 -0
- package/dist/video/pipeline-manifest.js.map +1 -0
- package/dist/video/pipeline-manifests/director.json +46 -0
- package/dist/video/pipeline-manifests/storyboard.json +46 -0
- package/dist/video/platform-specs.d.ts +26 -0
- package/dist/video/platform-specs.d.ts.map +1 -0
- package/dist/video/platform-specs.js +34 -0
- package/dist/video/platform-specs.js.map +1 -0
- package/dist/video/playbooks.d.ts +11 -0
- package/dist/video/playbooks.d.ts.map +1 -0
- package/dist/video/playbooks.js +22 -0
- package/dist/video/playbooks.js.map +1 -0
- package/dist/video/post-production.d.ts +57 -0
- package/dist/video/post-production.d.ts.map +1 -0
- package/dist/video/post-production.js +210 -0
- package/dist/video/post-production.js.map +1 -0
- package/dist/video/preview-portal/audit.d.ts +4 -0
- package/dist/video/preview-portal/audit.d.ts.map +1 -0
- package/dist/video/preview-portal/audit.js +16 -0
- package/dist/video/preview-portal/audit.js.map +1 -0
- package/dist/video/preview-portal/discovery.d.ts +23 -0
- package/dist/video/preview-portal/discovery.d.ts.map +1 -0
- package/dist/video/preview-portal/discovery.js +733 -0
- package/dist/video/preview-portal/discovery.js.map +1 -0
- package/dist/video/preview-portal/generate.d.ts +42 -0
- package/dist/video/preview-portal/generate.d.ts.map +1 -0
- package/dist/video/preview-portal/generate.js +101 -0
- package/dist/video/preview-portal/generate.js.map +1 -0
- package/dist/video/preview-portal/index.d.ts +12 -0
- package/dist/video/preview-portal/index.d.ts.map +1 -0
- package/dist/video/preview-portal/index.js +8 -0
- package/dist/video/preview-portal/index.js.map +1 -0
- package/dist/video/preview-portal/publish.d.ts +48 -0
- package/dist/video/preview-portal/publish.d.ts.map +1 -0
- package/dist/video/preview-portal/publish.js +169 -0
- package/dist/video/preview-portal/publish.js.map +1 -0
- package/dist/video/preview-portal/render.d.ts +4 -0
- package/dist/video/preview-portal/render.d.ts.map +1 -0
- package/dist/video/preview-portal/render.js +822 -0
- package/dist/video/preview-portal/render.js.map +1 -0
- package/dist/video/preview-portal/shared-assets.d.ts +6 -0
- package/dist/video/preview-portal/shared-assets.d.ts.map +1 -0
- package/dist/video/preview-portal/shared-assets.js +452 -0
- package/dist/video/preview-portal/shared-assets.js.map +1 -0
- package/dist/video/preview-portal/templates.d.ts +4 -0
- package/dist/video/preview-portal/templates.d.ts.map +1 -0
- package/dist/video/preview-portal/templates.js +109 -0
- package/dist/video/preview-portal/templates.js.map +1 -0
- package/dist/video/preview-portal/types.d.ts +246 -0
- package/dist/video/preview-portal/types.d.ts.map +1 -0
- package/dist/video/preview-portal/types.js +28 -0
- package/dist/video/preview-portal/types.js.map +1 -0
- package/dist/video/product-references.d.ts +21 -0
- package/dist/video/product-references.d.ts.map +1 -0
- package/dist/video/product-references.js +25 -0
- package/dist/video/product-references.js.map +1 -0
- package/dist/video/project-blueprint.d.ts +178 -0
- package/dist/video/project-blueprint.d.ts.map +1 -0
- package/dist/video/project-blueprint.js +286 -0
- package/dist/video/project-blueprint.js.map +1 -0
- package/dist/video/project-index.d.ts +82 -0
- package/dist/video/project-index.d.ts.map +1 -0
- package/dist/video/project-index.js +89 -0
- package/dist/video/project-index.js.map +1 -0
- package/dist/video/projects.d.ts +3 -0
- package/dist/video/projects.d.ts.map +1 -0
- package/dist/video/projects.js +18 -0
- package/dist/video/projects.js.map +1 -0
- package/dist/video/prompt-guidance.d.ts +14 -0
- package/dist/video/prompt-guidance.d.ts.map +1 -0
- package/dist/video/prompt-guidance.js +44 -0
- package/dist/video/prompt-guidance.js.map +1 -0
- package/dist/video/prompt-library.d.ts +11 -0
- package/dist/video/prompt-library.d.ts.map +1 -0
- package/dist/video/prompt-library.js +85 -0
- package/dist/video/prompt-library.js.map +1 -0
- package/dist/video/prompt-lint.d.ts +146 -0
- package/dist/video/prompt-lint.d.ts.map +1 -0
- package/dist/video/prompt-lint.js +433 -0
- package/dist/video/prompt-lint.js.map +1 -0
- package/dist/video/prompt-quality.d.ts +29 -0
- package/dist/video/prompt-quality.d.ts.map +1 -0
- package/dist/video/prompt-quality.js +532 -0
- package/dist/video/prompt-quality.js.map +1 -0
- package/dist/video/prompt-rules.d.ts +94 -0
- package/dist/video/prompt-rules.d.ts.map +1 -0
- package/dist/video/prompt-rules.js +169 -0
- package/dist/video/prompt-rules.js.map +1 -0
- package/dist/video/provider-adapter-runner.d.ts +5 -0
- package/dist/video/provider-adapter-runner.d.ts.map +1 -0
- package/dist/video/provider-adapter-runner.js +92 -0
- package/dist/video/provider-adapter-runner.js.map +1 -0
- package/dist/video/provider-platform/index.d.ts +6 -0
- package/dist/video/provider-platform/index.d.ts.map +1 -0
- package/dist/video/provider-platform/index.js +6 -0
- package/dist/video/provider-platform/index.js.map +1 -0
- package/dist/video/provider-platform/registry.d.ts +5 -0
- package/dist/video/provider-platform/registry.d.ts.map +1 -0
- package/dist/video/provider-platform/registry.js +279 -0
- package/dist/video/provider-platform/registry.js.map +1 -0
- package/dist/video/provider-platform/route-capabilities.d.ts +133 -0
- package/dist/video/provider-platform/route-capabilities.d.ts.map +1 -0
- package/dist/video/provider-platform/route-capabilities.js +192 -0
- package/dist/video/provider-platform/route-capabilities.js.map +1 -0
- package/dist/video/provider-platform/router.d.ts +7 -0
- package/dist/video/provider-platform/router.d.ts.map +1 -0
- package/dist/video/provider-platform/router.js +150 -0
- package/dist/video/provider-platform/router.js.map +1 -0
- package/dist/video/provider-platform/security.d.ts +8 -0
- package/dist/video/provider-platform/security.d.ts.map +1 -0
- package/dist/video/provider-platform/security.js +21 -0
- package/dist/video/provider-platform/security.js.map +1 -0
- package/dist/video/provider-platform/telemetry.d.ts +24 -0
- package/dist/video/provider-platform/telemetry.d.ts.map +1 -0
- package/dist/video/provider-platform/telemetry.js +88 -0
- package/dist/video/provider-platform/telemetry.js.map +1 -0
- package/dist/video/provider-platform/types.d.ts +139 -0
- package/dist/video/provider-platform/types.d.ts.map +1 -0
- package/dist/video/provider-platform/types.js +17 -0
- package/dist/video/provider-platform/types.js.map +1 -0
- package/dist/video/provider-status.d.ts +12 -0
- package/dist/video/provider-status.d.ts.map +1 -0
- package/dist/video/provider-status.js +169 -0
- package/dist/video/provider-status.js.map +1 -0
- package/dist/video/providers/dreamina-useapi.d.ts +170 -0
- package/dist/video/providers/dreamina-useapi.d.ts.map +1 -0
- package/dist/video/providers/dreamina-useapi.js +176 -0
- package/dist/video/providers/dreamina-useapi.js.map +1 -0
- package/dist/video/providers/flowmusic-useapi.d.ts +114 -0
- package/dist/video/providers/flowmusic-useapi.d.ts.map +1 -0
- package/dist/video/providers/flowmusic-useapi.js +159 -0
- package/dist/video/providers/flowmusic-useapi.js.map +1 -0
- package/dist/video/providers/google-flow.d.ts +57 -0
- package/dist/video/providers/google-flow.d.ts.map +1 -0
- package/dist/video/providers/google-flow.js +63 -0
- package/dist/video/providers/google-flow.js.map +1 -0
- package/dist/video/providers/public-host.d.ts +40 -0
- package/dist/video/providers/public-host.d.ts.map +1 -0
- package/dist/video/providers/public-host.js +91 -0
- package/dist/video/providers/public-host.js.map +1 -0
- package/dist/video/providers/runway-useapi.d.ts +159 -0
- package/dist/video/providers/runway-useapi.d.ts.map +1 -0
- package/dist/video/providers/runway-useapi.js +200 -0
- package/dist/video/providers/runway-useapi.js.map +1 -0
- package/dist/video/providers/xskill.d.ts +108 -0
- package/dist/video/providers/xskill.d.ts.map +1 -0
- package/dist/video/providers/xskill.js +233 -0
- package/dist/video/providers/xskill.js.map +1 -0
- package/dist/video/readiness.d.ts +18 -0
- package/dist/video/readiness.d.ts.map +1 -0
- package/dist/video/readiness.js +221 -0
- package/dist/video/readiness.js.map +1 -0
- package/dist/video/reference-sheet-store.d.ts +5 -0
- package/dist/video/reference-sheet-store.d.ts.map +1 -0
- package/dist/video/reference-sheet-store.js +28 -0
- package/dist/video/reference-sheet-store.js.map +1 -0
- package/dist/video/reference-sheets.d.ts +40 -0
- package/dist/video/reference-sheets.d.ts.map +1 -0
- package/dist/video/reference-sheets.js +160 -0
- package/dist/video/reference-sheets.js.map +1 -0
- package/dist/video/remix-narrated.d.ts +12 -0
- package/dist/video/remix-narrated.d.ts.map +1 -0
- package/dist/video/remix-narrated.js +73 -0
- package/dist/video/remix-narrated.js.map +1 -0
- package/dist/video/report-diff.d.ts +89 -0
- package/dist/video/report-diff.d.ts.map +1 -0
- package/dist/video/report-diff.js +176 -0
- package/dist/video/report-diff.js.map +1 -0
- package/dist/video/report-history.d.ts +40 -0
- package/dist/video/report-history.d.ts.map +1 -0
- package/dist/video/report-history.js +74 -0
- package/dist/video/report-history.js.map +1 -0
- package/dist/video/report.d.ts +15 -0
- package/dist/video/report.d.ts.map +1 -0
- package/dist/video/report.js +21 -0
- package/dist/video/report.js.map +1 -0
- package/dist/video/review-ui.d.ts +180 -0
- package/dist/video/review-ui.d.ts.map +1 -0
- package/dist/video/review-ui.js +2008 -0
- package/dist/video/review-ui.js.map +1 -0
- package/dist/video/scene-candidate-store.d.ts +12 -0
- package/dist/video/scene-candidate-store.d.ts.map +1 -0
- package/dist/video/scene-candidate-store.js +134 -0
- package/dist/video/scene-candidate-store.js.map +1 -0
- package/dist/video/scene-candidates.d.ts +57 -0
- package/dist/video/scene-candidates.d.ts.map +1 -0
- package/dist/video/scene-candidates.js +149 -0
- package/dist/video/scene-candidates.js.map +1 -0
- package/dist/video/scene-selection-store.d.ts +5 -0
- package/dist/video/scene-selection-store.d.ts.map +1 -0
- package/dist/video/scene-selection-store.js +22 -0
- package/dist/video/scene-selection-store.js.map +1 -0
- package/dist/video/scene-selection.d.ts +83 -0
- package/dist/video/scene-selection.d.ts.map +1 -0
- package/dist/video/scene-selection.js +225 -0
- package/dist/video/scene-selection.js.map +1 -0
- package/dist/video/scheduling.d.ts +3 -0
- package/dist/video/scheduling.d.ts.map +1 -0
- package/dist/video/scheduling.js +16 -0
- package/dist/video/scheduling.js.map +1 -0
- package/dist/video/scorecard.d.ts +12 -0
- package/dist/video/scorecard.d.ts.map +1 -0
- package/dist/video/scorecard.js +68 -0
- package/dist/video/scorecard.js.map +1 -0
- package/dist/video/seedance-asset-library.d.ts +82 -0
- package/dist/video/seedance-asset-library.d.ts.map +1 -0
- package/dist/video/seedance-asset-library.js +146 -0
- package/dist/video/seedance-asset-library.js.map +1 -0
- package/dist/video/seedance-blocks.d.ts +56 -0
- package/dist/video/seedance-blocks.d.ts.map +1 -0
- package/dist/video/seedance-blocks.js +97 -0
- package/dist/video/seedance-blocks.js.map +1 -0
- package/dist/video/seedance-chain-host.d.ts +42 -0
- package/dist/video/seedance-chain-host.d.ts.map +1 -0
- package/dist/video/seedance-chain-host.js +128 -0
- package/dist/video/seedance-chain-host.js.map +1 -0
- package/dist/video/seedance-content-filter.d.ts +80 -0
- package/dist/video/seedance-content-filter.d.ts.map +1 -0
- package/dist/video/seedance-content-filter.js +293 -0
- package/dist/video/seedance-content-filter.js.map +1 -0
- package/dist/video/seedance-skill-loader.d.ts +40 -0
- package/dist/video/seedance-skill-loader.d.ts.map +1 -0
- package/dist/video/seedance-skill-loader.js +53 -0
- package/dist/video/seedance-skill-loader.js.map +1 -0
- package/dist/video/sfx.d.ts +49 -0
- package/dist/video/sfx.d.ts.map +1 -0
- package/dist/video/sfx.js +104 -0
- package/dist/video/sfx.js.map +1 -0
- package/dist/video/shot-grammar.d.ts +103 -0
- package/dist/video/shot-grammar.d.ts.map +1 -0
- package/dist/video/shot-grammar.js +286 -0
- package/dist/video/shot-grammar.js.map +1 -0
- package/dist/video/show-bible.d.ts +113 -0
- package/dist/video/show-bible.d.ts.map +1 -0
- package/dist/video/show-bible.js +140 -0
- package/dist/video/show-bible.js.map +1 -0
- package/dist/video/soundtrack.d.ts +72 -0
- package/dist/video/soundtrack.d.ts.map +1 -0
- package/dist/video/soundtrack.js +171 -0
- package/dist/video/soundtrack.js.map +1 -0
- package/dist/video/stage-guards.d.ts +4 -0
- package/dist/video/stage-guards.d.ts.map +1 -0
- package/dist/video/stage-guards.js +94 -0
- package/dist/video/stage-guards.js.map +1 -0
- package/dist/video/status.d.ts +69 -0
- package/dist/video/status.d.ts.map +1 -0
- package/dist/video/status.js +245 -0
- package/dist/video/status.js.map +1 -0
- package/dist/video/story-bible.d.ts +70 -0
- package/dist/video/story-bible.d.ts.map +1 -0
- package/dist/video/story-bible.js +181 -0
- package/dist/video/story-bible.js.map +1 -0
- package/dist/video/storyboard-grid.d.ts +28 -0
- package/dist/video/storyboard-grid.d.ts.map +1 -0
- package/dist/video/storyboard-grid.js +231 -0
- package/dist/video/storyboard-grid.js.map +1 -0
- package/dist/video/storyboard-markdown.d.ts +62 -0
- package/dist/video/storyboard-markdown.d.ts.map +1 -0
- package/dist/video/storyboard-markdown.js +332 -0
- package/dist/video/storyboard-markdown.js.map +1 -0
- package/dist/video/storyboard-still-candidates.d.ts +31 -0
- package/dist/video/storyboard-still-candidates.d.ts.map +1 -0
- package/dist/video/storyboard-still-candidates.js +57 -0
- package/dist/video/storyboard-still-candidates.js.map +1 -0
- package/dist/video/storyboard-templates.d.ts +28 -0
- package/dist/video/storyboard-templates.d.ts.map +1 -0
- package/dist/video/storyboard-templates.js +215 -0
- package/dist/video/storyboard-templates.js.map +1 -0
- package/dist/video/studio/execute.d.ts +142 -0
- package/dist/video/studio/execute.d.ts.map +1 -0
- package/dist/video/studio/execute.js +270 -0
- package/dist/video/studio/execute.js.map +1 -0
- package/dist/video/studio/planner.d.ts +3 -0
- package/dist/video/studio/planner.d.ts.map +1 -0
- package/dist/video/studio/planner.js +110 -0
- package/dist/video/studio/planner.js.map +1 -0
- package/dist/video/studio/project-context.d.ts +4 -0
- package/dist/video/studio/project-context.d.ts.map +1 -0
- package/dist/video/studio/project-context.js +20 -0
- package/dist/video/studio/project-context.js.map +1 -0
- package/dist/video/studio/recipes.d.ts +4 -0
- package/dist/video/studio/recipes.d.ts.map +1 -0
- package/dist/video/studio/recipes.js +343 -0
- package/dist/video/studio/recipes.js.map +1 -0
- package/dist/video/studio/session.d.ts +8 -0
- package/dist/video/studio/session.d.ts.map +1 -0
- package/dist/video/studio/session.js +17 -0
- package/dist/video/studio/session.js.map +1 -0
- package/dist/video/studio/types.d.ts +59 -0
- package/dist/video/studio/types.d.ts.map +1 -0
- package/dist/video/studio/types.js +2 -0
- package/dist/video/studio/types.js.map +1 -0
- package/dist/video/template-store.d.ts +65 -0
- package/dist/video/template-store.d.ts.map +1 -0
- package/dist/video/template-store.js +168 -0
- package/dist/video/template-store.js.map +1 -0
- package/dist/video/timeline.d.ts +8 -0
- package/dist/video/timeline.d.ts.map +1 -0
- package/dist/video/timeline.js +21 -0
- package/dist/video/timeline.js.map +1 -0
- package/dist/video/title-overlay.d.ts +85 -0
- package/dist/video/title-overlay.d.ts.map +1 -0
- package/dist/video/title-overlay.js +163 -0
- package/dist/video/title-overlay.js.map +1 -0
- package/dist/video/types.d.ts +403 -0
- package/dist/video/types.d.ts.map +1 -0
- package/dist/video/types.js +2 -0
- package/dist/video/types.js.map +1 -0
- package/dist/video/veo-subprocess.d.ts +27 -0
- package/dist/video/veo-subprocess.d.ts.map +1 -0
- package/dist/video/veo-subprocess.js +52 -0
- package/dist/video/veo-subprocess.js.map +1 -0
- package/dist/video/verify-env.d.ts +43 -0
- package/dist/video/verify-env.d.ts.map +1 -0
- package/dist/video/verify-env.js +156 -0
- package/dist/video/verify-env.js.map +1 -0
- package/dist/video/verify-final.d.ts +20 -0
- package/dist/video/verify-final.d.ts.map +1 -0
- package/dist/video/verify-final.js +39 -0
- package/dist/video/verify-final.js.map +1 -0
- package/dist/video/video-context.d.ts +10 -0
- package/dist/video/video-context.d.ts.map +1 -0
- package/dist/video/video-context.js +74 -0
- package/dist/video/video-context.js.map +1 -0
- package/dist/video/vocal-map.d.ts +55 -0
- package/dist/video/vocal-map.d.ts.map +1 -0
- package/dist/video/vocal-map.js +107 -0
- package/dist/video/vocal-map.js.map +1 -0
- package/dist/video/vocal-sync-plan.d.ts +76 -0
- package/dist/video/vocal-sync-plan.d.ts.map +1 -0
- package/dist/video/vocal-sync-plan.js +166 -0
- package/dist/video/vocal-sync-plan.js.map +1 -0
- package/dist/video/voice-clone.d.ts +152 -0
- package/dist/video/voice-clone.d.ts.map +1 -0
- package/dist/video/voice-clone.js +267 -0
- package/dist/video/voice-clone.js.map +1 -0
- package/dist/video/with-retry.d.ts +67 -0
- package/dist/video/with-retry.d.ts.map +1 -0
- package/dist/video/with-retry.js +105 -0
- package/dist/video/with-retry.js.map +1 -0
- package/dist/video/workload.d.ts +20 -0
- package/dist/video/workload.d.ts.map +1 -0
- package/dist/video/workload.js +55 -0
- package/dist/video/workload.js.map +1 -0
- package/dist/video/workspace.d.ts +109 -0
- package/dist/video/workspace.d.ts.map +1 -0
- package/dist/video/workspace.js +132 -0
- package/dist/video/workspace.js.map +1 -0
- package/docs/AGENT_INTEGRATION_RESEARCH.md +123 -0
- package/docs/AI_FILMMAKING_PROMPTS.md +195 -0
- package/docs/ARCHITECTURE.md +257 -0
- package/docs/ASSEMBLE.md +376 -0
- package/docs/BRAND_AGENCY.md +63 -0
- package/docs/CLAWBOT_COVERAGE_PROMPT.md +78 -0
- package/docs/CLI_REFERENCE.md +2638 -0
- package/docs/CONCIERGE_PROMPT.md +139 -0
- package/docs/Claude Code + Higgsfield MCP = FULL Creative Agency.md +179 -0
- package/docs/DEMO_RECORDING.md +61 -0
- package/docs/DEPRECATION.md +79 -0
- package/docs/DIAGRAMS_SOURCE.md +347 -0
- package/docs/DIRECTOR_BLUEPRINT.md +94 -0
- package/docs/GENERATION_TELEMETRY.md +81 -0
- package/docs/IMPROVE_PROMPT.md +76 -0
- package/docs/INFOGRAPHICS_PROMPT.md +83 -0
- package/docs/MASTER_PLAN_ALIGNMENT.md +563 -0
- package/docs/MIGRATION.md +213 -0
- package/docs/MOTION_OVERLAY.md +355 -0
- package/docs/OBSIDIAN.md +300 -0
- package/docs/OPERATIONS.md +142 -0
- package/docs/OPERATOR_HANDOFF.md +108 -0
- package/docs/PRODUCTION_WORKFLOW.md +148 -0
- package/docs/PROJECT_LAYOUT.md +262 -0
- package/docs/PROMPT_QUALITY.md +214 -0
- package/docs/PROVIDER_PLATFORM.md +195 -0
- package/docs/PUBLISHING.md +175 -0
- package/docs/PYTHON_PIPELINE.md +139 -0
- package/docs/REFERENCE_SHEETS.md +469 -0
- package/docs/REFERENCE_VIDEO_SEEDANCE_MOTION_DESIGN_WORKFLOW.md +465 -0
- package/docs/RELEASE_READINESS.md +573 -0
- package/docs/REVIEW_UI_STORYBOARD_WORKFLOW.md +200 -0
- package/docs/SCENE_CANDIDATES.md +518 -0
- package/docs/SKILLS.md +477 -0
- package/docs/SKILL_COHESION_PROMPT.md +88 -0
- package/docs/STORY_BIBLE.md +288 -0
- package/docs/STUDIO.md +96 -0
- package/docs/TEMPLATES.md +143 -0
- package/docs/UNIFICATION_AUDIT.md +321 -0
- package/docs/UPDATE_DOCS_PROMPT.md +78 -0
- package/docs/assets/demo-quickstart.cast +13 -0
- package/docs/assets/demo-quickstart.gif +0 -0
- package/docs/assets/diagram-architecture.jpg +0 -0
- package/docs/assets/diagram-assemble.jpg +0 -0
- package/docs/assets/diagram-lifecycle.jpg +0 -0
- package/docs/assets/diagram-obsidian-loop.jpg +0 -0
- package/docs/assets/diagram-obsidian-vault.jpg +0 -0
- package/docs/assets/diagram-routing.jpg +0 -0
- package/docs/assets/diagram-skills-ecosystem.jpg +0 -0
- package/docs/assets/diagram-story-bible.jpg +0 -0
- package/docs/assets/diagram-studio-goals.jpg +0 -0
- package/docs/assets/docsite-preview.png +0 -0
- package/docs/assets/logo.jpg +0 -0
- package/docs/assets/logo.png +0 -0
- package/docs/preview-portal-audit.md +151 -0
- package/package.json +119 -0
- package/playbooks/seedance-ugc.json +32 -0
- package/playbooks/veo-generic.json +26 -0
- package/references/video/.fixtures/multi-shot-runway-10s.txt +9 -0
- package/references/video/.fixtures/multi-shot-seedance-10s.txt +9 -0
- package/references/video/.fixtures/multi-shot-valid.txt +13 -0
- package/references/video/.fixtures/multi-shot-veo-8s.txt +9 -0
- package/references/video/ai-director-blueprint.md +614 -0
- package/references/video/camera-bible.md +294 -0
- package/references/video/character-reference-sheet.md +14 -0
- package/references/video/checkpoint-protocol.md +26 -0
- package/references/video/clone-ad-template-workflow.md +14 -0
- package/references/video/dialogue-duration-preflight.md +17 -0
- package/references/video/generation-telemetry.md +18 -0
- package/references/video/multi-shot-framework.md +455 -0
- package/references/video/seedance-skills/01-cinematic.md +1329 -0
- package/references/video/seedance-skills/02-3d-cgi.md +884 -0
- package/references/video/seedance-skills/03-cartoon.md +1668 -0
- package/references/video/seedance-skills/04-comic-to-video.md +1810 -0
- package/references/video/seedance-skills/05-fight-scenes.md +741 -0
- package/references/video/seedance-skills/06-motion-design-ad.md +1145 -0
- package/references/video/seedance-skills/07-ecommerce-ad.md +928 -0
- package/references/video/seedance-skills/08-anime-action.md +1145 -0
- package/references/video/seedance-skills/09-product-360.md +988 -0
- package/references/video/seedance-skills/10-music-video.md +1662 -0
- package/references/video/seedance-skills/11-social-hook.md +1874 -0
- package/references/video/seedance-skills/12-brand-story.md +1151 -0
- package/references/video/seedance-skills/13-fashion-lookbook.md +1236 -0
- package/references/video/seedance-skills/14-food-beverage.md +1110 -0
- package/references/video/seedance-skills/15-real-estate.md +2344 -0
- package/references/video/seedance-transport-payloads.md +144 -0
- package/references/video/seedance-ugc-formulas.md +104 -0
- package/references/video/stage-directors.md +47 -0
- package/references/video/style-template-schema.md +40 -0
- package/references/video/veo-prompting-guide.md +42 -0
- package/schemas/video/artifacts/analyze-output.schema.json +60 -0
- package/schemas/video/artifacts/assemble-report.schema.json +116 -0
- package/schemas/video/artifacts/asset-manifest.schema.json +23 -0
- package/schemas/video/artifacts/batch-queue-manifest.schema.json +59 -0
- package/schemas/video/artifacts/brand-definition.schema.json +93 -0
- package/schemas/video/artifacts/brand-dna.schema.json +55 -0
- package/schemas/video/artifacts/brief.schema.json +13 -0
- package/schemas/video/artifacts/clone-plan.schema.json +44 -0
- package/schemas/video/artifacts/dialogue.schema.json +52 -0
- package/schemas/video/artifacts/environment-assets.schema.json +30 -0
- package/schemas/video/artifacts/execution-plan.schema.json +64 -0
- package/schemas/video/artifacts/execution-report.schema.json +37 -0
- package/schemas/video/artifacts/filmmaking-prompts.schema.json +129 -0
- package/schemas/video/artifacts/flow-characters.schema.json +31 -0
- package/schemas/video/artifacts/flow-voices.schema.json +30 -0
- package/schemas/video/artifacts/motion-overlay-plan.schema.json +50 -0
- package/schemas/video/artifacts/multi-shot-prompt.schema.json +90 -0
- package/schemas/video/artifacts/music-video-config.schema.json +108 -0
- package/schemas/video/artifacts/narration.schema.json +54 -0
- package/schemas/video/artifacts/product-references.schema.json +29 -0
- package/schemas/video/artifacts/project-blueprint.schema.json +236 -0
- package/schemas/video/artifacts/publish-report.schema.json +12 -0
- package/schemas/video/artifacts/reference-sheets.schema.json +85 -0
- package/schemas/video/artifacts/review-report.schema.json +12 -0
- package/schemas/video/artifacts/scene-candidates.schema.json +86 -0
- package/schemas/video/artifacts/scene-selection.schema.json +50 -0
- package/schemas/video/artifacts/seedance-assets.schema.json +31 -0
- package/schemas/video/artifacts/sfx.schema.json +31 -0
- package/schemas/video/artifacts/show-bible.schema.json +66 -0
- package/schemas/video/artifacts/soundtrack.schema.json +39 -0
- package/schemas/video/artifacts/story-bible.schema.json +131 -0
- package/schemas/video/artifacts/storyboard.schema.json +58 -0
- package/schemas/video/artifacts/voice-clones.schema.json +37 -0
- package/schemas/video/brand-profile.schema.json +20 -0
- package/schemas/video/errors.json +48 -0
- package/schemas/video/pipeline-manifest.schema.json +51 -0
- package/skills/README.md +113 -0
- package/skills/ai-director/SKILL.md +140 -0
- package/skills/ai-filmmaking/SKILL.md +239 -0
- package/skills/ai-slop-cleaner/SKILL.md +114 -0
- package/skills/brand-agency/SKILL.md +181 -0
- package/skills/brand-presenter/SKILL.md +114 -0
- package/skills/build-fix/SKILL.md +145 -0
- package/skills/bunty/SKILL.md +41 -0
- package/skills/catalog.json +326 -0
- package/skills/character-ad/SKILL.md +154 -0
- package/skills/character-creator/SKILL.md +303 -0
- package/skills/character-library/README.md +12 -0
- package/skills/character-library/SKILL.md +110 -0
- package/skills/clawbot/SKILL.md +26 -0
- package/skills/concierge/SKILL.md +183 -0
- package/skills/configure-notifications/SKILL.md +286 -0
- package/skills/davendra-presenter/SKILL.md +27 -0
- package/skills/davendra-presenter/assets/davendra_intro_1.jpg +0 -0
- package/skills/davendra-presenter/assets/davendra_intro_2.jpg +0 -0
- package/skills/davendra-presenter/assets/davendra_outro_1.jpg +0 -0
- package/skills/davendra-presenter/assets/davendra_outro_2.jpg +0 -0
- package/skills/deep-interview/SKILL.md +358 -0
- package/skills/deepsearch/SKILL.md +38 -0
- package/skills/doctor/SKILL.md +200 -0
- package/skills/graphify/SKILL.md +616 -0
- package/skills/help/SKILL.md +200 -0
- package/skills/higgsfield-generate/SKILL.md +171 -0
- package/skills/improvement-run/SKILL.md +47 -0
- package/skills/motion-reel/SKILL.md +102 -0
- package/skills/movie-director/SKILL.md +338 -0
- package/skills/multi-shot-prompt/SKILL.md +77 -0
- package/skills/nex-presenter/SKILL.md +25 -0
- package/skills/nex-presenter/assets/logo_manifest.json +26 -0
- package/skills/nex-presenter/assets/logo_source.jpg +0 -0
- package/skills/nex-presenter/assets/nex_brief_intro.mp4 +0 -0
- package/skills/nex-presenter/assets/nex_intro_1.jpg +0 -0
- package/skills/nex-presenter/assets/nex_intro_2.jpg +0 -0
- package/skills/nex-presenter/assets/nex_outro_1.jpg +0 -0
- package/skills/nex-presenter/assets/nex_outro_2.jpg +0 -0
- package/skills/nex-presenter/assets/text_overlay.png +0 -0
- package/skills/note/SKILL.md +62 -0
- package/skills/pipeline/SKILL.md +86 -0
- package/skills/review/SKILL.md +38 -0
- package/skills/runway/SKILL.md +131 -0
- package/skills/seedance-prompts/SKILL.md +194 -0
- package/skills/skill/SKILL.md +835 -0
- package/skills/skills-auditor/SKILL.md +73 -0
- package/skills/studio-mode/SKILL.md +148 -0
- package/skills/ugc/SKILL.md +386 -0
- package/skills/ui-ux-pro-max/SKILL.md +386 -0
- package/skills/video-analyze-template/SKILL.md +77 -0
- package/skills/video-clone-ad/SKILL.md +67 -0
- package/skills/video-framework/SKILL.md +201 -0
- package/skills/video-portfolio-ops/SKILL.md +84 -0
- package/skills/video-post/SKILL.md +97 -0
- package/skills/video-production-handoff/SKILL.md +130 -0
- package/skills/video-release-readiness/SKILL.md +93 -0
- package/skills/video-replicator/SKILL.md +368 -0
- package/skills/video-review-ui-qa/SKILL.md +103 -0
- package/skills/video-storyboard/SKILL.md +71 -0
- package/skills/video-thumbnail-lab/SKILL.md +67 -0
- package/skills/web-clone/SKILL.md +366 -0
- package/skills/worker/SKILL.md +106 -0
- package/skills/youtube-audio/SKILL.md +114 -0
- package/src/video/analyze-output.ts +10 -0
- package/src/video/archive-project.ts +65 -0
- package/src/video/artifact-history.ts +23 -0
- package/src/video/artifact-store.ts +59 -0
- package/src/video/artifact-validation.ts +268 -0
- package/src/video/artifacts.ts +156 -0
- package/src/video/assemble/animate-slides.ts +199 -0
- package/src/video/assemble/animation-styles.json +97 -0
- package/src/video/assemble/animation-styles.ts +54 -0
- package/src/video/assemble/assemble.ts +547 -0
- package/src/video/assemble/audio-concat.ts +165 -0
- package/src/video/assemble/audio-mix-plan.ts +150 -0
- package/src/video/assemble/audio-utils.ts +101 -0
- package/src/video/assemble/cut-segment.ts +121 -0
- package/src/video/assemble/ffmpeg.ts +333 -0
- package/src/video/assemble/gemini-vision-classify.ts +153 -0
- package/src/video/assemble/index.ts +247 -0
- package/src/video/assemble/media-qc.ts +252 -0
- package/src/video/assemble/music.ts +261 -0
- package/src/video/assemble/narration-fit.ts +90 -0
- package/src/video/assemble/overlay.ts +225 -0
- package/src/video/assemble/pdf.ts +169 -0
- package/src/video/assemble/qa-dialogue-lint.ts +129 -0
- package/src/video/assemble/qa-image-filter.ts +147 -0
- package/src/video/assemble/qa-image-vision.ts +154 -0
- package/src/video/assemble/qa-narration-vision.ts +135 -0
- package/src/video/assemble/qa-narration.ts +139 -0
- package/src/video/assemble/stitch-ad.ts +222 -0
- package/src/video/assemble/stitch.ts +918 -0
- package/src/video/assemble/text-card.ts +285 -0
- package/src/video/assemble/title-card.ts +186 -0
- package/src/video/assemble/transcript.ts +240 -0
- package/src/video/assemble/tts-elevenlabs.ts +182 -0
- package/src/video/assemble/tts.ts +227 -0
- package/src/video/assemble/types.ts +45 -0
- package/src/video/assemble/upscale.ts +80 -0
- package/src/video/asset-spec.ts +53 -0
- package/src/video/asset-tag-lookup.ts +51 -0
- package/src/video/atomic-write.ts +7 -0
- package/src/video/audio-platform/native-elevenlabs-sfx.ts +128 -0
- package/src/video/audio-platform/native-elevenlabs-tts.ts +119 -0
- package/src/video/audio-platform/native-flowmusic.ts +167 -0
- package/src/video/audio-platform/native-gemini-tts.ts +226 -0
- package/src/video/audio-platform/native-lyria.ts +231 -0
- package/src/video/audio-platform/native-lyria3.ts +244 -0
- package/src/video/audio-platform/registry.ts +220 -0
- package/src/video/audio-platform/suno-backend.ts +36 -0
- package/src/video/audio-platform/types.ts +138 -0
- package/src/video/batch-queue.ts +685 -0
- package/src/video/blueprint-prompt.ts +118 -0
- package/src/video/brand-definition.ts +287 -0
- package/src/video/brand-dna.ts +478 -0
- package/src/video/brand-prompt.ts +28 -0
- package/src/video/candidate-migrate.ts +171 -0
- package/src/video/category-registry.ts +224 -0
- package/src/video/chain-fallback.ts +53 -0
- package/src/video/character-auto-create.ts +547 -0
- package/src/video/character-consistency.ts +85 -0
- package/src/video/characters.ts +145 -0
- package/src/video/checkpoints.ts +60 -0
- package/src/video/cinema-profile.ts +120 -0
- package/src/video/cinematography.ts +1229 -0
- package/src/video/cli-output.ts +94 -0
- package/src/video/cli-schema.ts +505 -0
- package/src/video/cost-estimate.ts +150 -0
- package/src/video/csv-export.ts +150 -0
- package/src/video/dependencies.ts +64 -0
- package/src/video/dialogue-fit.ts +62 -0
- package/src/video/dialogue.ts +221 -0
- package/src/video/director-defaults.ts +432 -0
- package/src/video/director-preflight.ts +543 -0
- package/src/video/doctor-portfolio.ts +197 -0
- package/src/video/doctor.ts +499 -0
- package/src/video/emotion-cues.ts +36 -0
- package/src/video/environment-assets.ts +69 -0
- package/src/video/environment-auto-create.ts +122 -0
- package/src/video/errors.ts +133 -0
- package/src/video/events.ts +42 -0
- package/src/video/execute-autochain.ts +226 -0
- package/src/video/execute.ts +569 -0
- package/src/video/execution-cancel.ts +103 -0
- package/src/video/execution-plan.ts +178 -0
- package/src/video/execution-profile.ts +162 -0
- package/src/video/execution-runtime.ts +975 -0
- package/src/video/execution-seed.ts +46 -0
- package/src/video/execution-status.ts +736 -0
- package/src/video/filmmaking-prompts.ts +1789 -0
- package/src/video/final-media.ts +118 -0
- package/src/video/finish.ts +255 -0
- package/src/video/flow-character-library.ts +342 -0
- package/src/video/flow-markers.ts +330 -0
- package/src/video/gemini-analyze.ts +387 -0
- package/src/video/gemini-continuity.ts +186 -0
- package/src/video/gemini-judge.ts +300 -0
- package/src/video/gemini-key-pool.ts +153 -0
- package/src/video/gen-image-flow.ts +491 -0
- package/src/video/gen-image.ts +392 -0
- package/src/video/generation-telemetry.ts +282 -0
- package/src/video/http-error-safety.ts +13 -0
- package/src/video/image-dimensions.ts +69 -0
- package/src/video/legacy-import.ts +197 -0
- package/src/video/library-clean.ts +399 -0
- package/src/video/lipsync.ts +200 -0
- package/src/video/media-host.ts +153 -0
- package/src/video/metrics.ts +116 -0
- package/src/video/motion-overlay/analyze-reel.ts +200 -0
- package/src/video/motion-overlay/animate-render.ts +176 -0
- package/src/video/motion-overlay/animate.ts +93 -0
- package/src/video/motion-overlay/avatar-host-transport.ts +458 -0
- package/src/video/motion-overlay/avatar-host.ts +238 -0
- package/src/video/motion-overlay/compose-prompt.ts +247 -0
- package/src/video/motion-overlay/execute.ts +355 -0
- package/src/video/motion-overlay/flow-pack.ts +223 -0
- package/src/video/motion-overlay/ingest.ts +210 -0
- package/src/video/motion-overlay/motifs.ts +223 -0
- package/src/video/motion-overlay/motion-style.ts +162 -0
- package/src/video/motion-overlay/plan.ts +111 -0
- package/src/video/motion-overlay/preview.ts +191 -0
- package/src/video/motion-overlay/render-local.ts +441 -0
- package/src/video/motion-overlay/run.ts +217 -0
- package/src/video/motion-overlay/slice.ts +98 -0
- package/src/video/motion-overlay/transcribe.ts +211 -0
- package/src/video/motion-overlay/types.ts +89 -0
- package/src/video/motion-overlay/v2v-transport.ts +209 -0
- package/src/video/motion-overlay/write.ts +142 -0
- package/src/video/multi-shot-artifact.ts +64 -0
- package/src/video/multi-shot-prompt.ts +608 -0
- package/src/video/music-video.ts +324 -0
- package/src/video/narrate.ts +221 -0
- package/src/video/native-dreamina.ts +638 -0
- package/src/video/native-flow-r2v.ts +279 -0
- package/src/video/native-runway.ts +647 -0
- package/src/video/native-seedance.ts +615 -0
- package/src/video/native-veo.ts +470 -0
- package/src/video/next-actions.ts +247 -0
- package/src/video/obsidian-export.ts +336 -0
- package/src/video/obsidian-sync.ts +649 -0
- package/src/video/obsidian-vault.ts +96 -0
- package/src/video/outfit-prompts.ts +14 -0
- package/src/video/outpaint-keyframe.ts +365 -0
- package/src/video/pipeline-manifest.ts +16 -0
- package/src/video/pipeline-manifests/director.json +46 -0
- package/src/video/pipeline-manifests/storyboard.json +46 -0
- package/src/video/platform-specs.ts +50 -0
- package/src/video/playbooks.ts +34 -0
- package/src/video/post-production.ts +277 -0
- package/src/video/preview-portal/audit.ts +20 -0
- package/src/video/preview-portal/discovery.ts +787 -0
- package/src/video/preview-portal/generate.ts +138 -0
- package/src/video/preview-portal/index.ts +41 -0
- package/src/video/preview-portal/publish.ts +215 -0
- package/src/video/preview-portal/render.ts +865 -0
- package/src/video/preview-portal/shared-assets.ts +455 -0
- package/src/video/preview-portal/templates.ts +112 -0
- package/src/video/preview-portal/types.ts +288 -0
- package/src/video/product-references.ts +43 -0
- package/src/video/project-blueprint.ts +458 -0
- package/src/video/project-index.ts +179 -0
- package/src/video/projects.ts +18 -0
- package/src/video/prompt-guidance.ts +64 -0
- package/src/video/prompt-library.ts +96 -0
- package/src/video/prompt-lint.ts +568 -0
- package/src/video/prompt-quality.ts +635 -0
- package/src/video/prompt-rules.ts +209 -0
- package/src/video/provider-adapter-runner.ts +104 -0
- package/src/video/provider-platform/index.ts +5 -0
- package/src/video/provider-platform/registry.ts +286 -0
- package/src/video/provider-platform/route-capabilities.ts +327 -0
- package/src/video/provider-platform/router.ts +221 -0
- package/src/video/provider-platform/security.ts +29 -0
- package/src/video/provider-platform/telemetry.ts +116 -0
- package/src/video/provider-platform/types.ts +192 -0
- package/src/video/provider-status.ts +199 -0
- package/src/video/providers/dreamina-useapi.ts +345 -0
- package/src/video/providers/flowmusic-useapi.ts +252 -0
- package/src/video/providers/google-flow.ts +110 -0
- package/src/video/providers/public-host.ts +128 -0
- package/src/video/providers/runway-useapi.ts +377 -0
- package/src/video/providers/xskill.ts +304 -0
- package/src/video/readiness.ts +284 -0
- package/src/video/reference-sheet-store.ts +40 -0
- package/src/video/reference-sheets.ts +224 -0
- package/src/video/remix-narrated.ts +92 -0
- package/src/video/report-diff.ts +299 -0
- package/src/video/report-history.ts +122 -0
- package/src/video/report.ts +35 -0
- package/src/video/review-ui.ts +2495 -0
- package/src/video/scene-candidate-store.ts +152 -0
- package/src/video/scene-candidates.ts +195 -0
- package/src/video/scene-selection-store.ts +36 -0
- package/src/video/scene-selection.ts +306 -0
- package/src/video/scheduling.ts +18 -0
- package/src/video/scorecard.ts +90 -0
- package/src/video/seedance-asset-library.ts +259 -0
- package/src/video/seedance-blocks.ts +118 -0
- package/src/video/seedance-chain-host.ts +152 -0
- package/src/video/seedance-content-filter.ts +354 -0
- package/src/video/seedance-skill-loader.ts +83 -0
- package/src/video/sfx.ts +159 -0
- package/src/video/shot-grammar.ts +349 -0
- package/src/video/show-bible.ts +235 -0
- package/src/video/soundtrack.ts +257 -0
- package/src/video/stage-guards.ts +112 -0
- package/src/video/status.ts +342 -0
- package/src/video/story-bible.ts +302 -0
- package/src/video/storyboard-grid.ts +320 -0
- package/src/video/storyboard-markdown.ts +434 -0
- package/src/video/storyboard-still-candidates.ts +82 -0
- package/src/video/storyboard-templates.ts +249 -0
- package/src/video/studio/execute.ts +401 -0
- package/src/video/studio/planner.ts +114 -0
- package/src/video/studio/project-context.ts +25 -0
- package/src/video/studio/recipes.ts +346 -0
- package/src/video/studio/session.ts +24 -0
- package/src/video/studio/types.ts +76 -0
- package/src/video/template-store.ts +241 -0
- package/src/video/timeline.ts +32 -0
- package/src/video/title-overlay.ts +234 -0
- package/src/video/types.ts +465 -0
- package/src/video/veo-subprocess.ts +77 -0
- package/src/video/verify-env.ts +206 -0
- package/src/video/verify-final.ts +65 -0
- package/src/video/video-context.ts +92 -0
- package/src/video/vocal-map.ts +155 -0
- package/src/video/vocal-sync-plan.ts +224 -0
- package/src/video/voice-clone.ts +410 -0
- package/src/video/with-retry.ts +149 -0
- package/src/video/workload.ts +87 -0
- package/src/video/workspace.ts +255 -0
- package/tmp/review-station/index.html +4194 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowMusic music backend — Google Lyria 3 Pro vocal songs via useapi.net.
|
|
3
|
+
*
|
|
4
|
+
* Unlike the instrumental-only Lyria backends (native-lyria / native-lyria3),
|
|
5
|
+
* FlowMusic generates FULL VOCAL SONGS (and instrumentals): it honors
|
|
6
|
+
* user-supplied `lyrics` and an `instrumental` toggle. It is an async, job-polled
|
|
7
|
+
* provider, so this backend wraps the providers/flowmusic-useapi.ts transport:
|
|
8
|
+
* submit (mode:async) → poll GET /jobs/{jobid} until terminal → download the
|
|
9
|
+
* first clip's mp3 via the auth'd /music/download endpoint → write `.mp3`.
|
|
10
|
+
*
|
|
11
|
+
* Availability reuses the shared USEAPI_API_TOKEN (the same token as the
|
|
12
|
+
* dreamina/runway routes) — gated in the registry via `requiresUseApi`, not a
|
|
13
|
+
* backend-specific requiredEnv. Optional: VCLAW_FLOWMUSIC_ACCOUNT pins the
|
|
14
|
+
* flowmusic.app account; VCLAW_FLOWMUSIC_GHOSTWRITER ('standard'|'pro') picks the
|
|
15
|
+
* lyrics-writer when the model writes lyrics. The poll cadence is configurable
|
|
16
|
+
* via VCLAW_FLOWMUSIC_POLL_INTERVAL_MS / VCLAW_FLOWMUSIC_POLL_MAX_ATTEMPTS
|
|
17
|
+
* (tests set the interval to 0 to stay fast + offline).
|
|
18
|
+
*/
|
|
19
|
+
import type { MusicBackend } from './types.js';
|
|
20
|
+
export declare const flowMusicBackend: MusicBackend;
|
|
21
|
+
//# sourceMappingURL=native-flowmusic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-flowmusic.d.ts","sourceRoot":"","sources":["../../../src/video/audio-platform/native-flowmusic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAYH,OAAO,KAAK,EAAE,YAAY,EAAiC,MAAM,YAAY,CAAC;AA4B9E,eAAO,MAAM,gBAAgB,EAAE,YA6G9B,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowMusic music backend — Google Lyria 3 Pro vocal songs via useapi.net.
|
|
3
|
+
*
|
|
4
|
+
* Unlike the instrumental-only Lyria backends (native-lyria / native-lyria3),
|
|
5
|
+
* FlowMusic generates FULL VOCAL SONGS (and instrumentals): it honors
|
|
6
|
+
* user-supplied `lyrics` and an `instrumental` toggle. It is an async, job-polled
|
|
7
|
+
* provider, so this backend wraps the providers/flowmusic-useapi.ts transport:
|
|
8
|
+
* submit (mode:async) → poll GET /jobs/{jobid} until terminal → download the
|
|
9
|
+
* first clip's mp3 via the auth'd /music/download endpoint → write `.mp3`.
|
|
10
|
+
*
|
|
11
|
+
* Availability reuses the shared USEAPI_API_TOKEN (the same token as the
|
|
12
|
+
* dreamina/runway routes) — gated in the registry via `requiresUseApi`, not a
|
|
13
|
+
* backend-specific requiredEnv. Optional: VCLAW_FLOWMUSIC_ACCOUNT pins the
|
|
14
|
+
* flowmusic.app account; VCLAW_FLOWMUSIC_GHOSTWRITER ('standard'|'pro') picks the
|
|
15
|
+
* lyrics-writer when the model writes lyrics. The poll cadence is configurable
|
|
16
|
+
* via VCLAW_FLOWMUSIC_POLL_INTERVAL_MS / VCLAW_FLOWMUSIC_POLL_MAX_ATTEMPTS
|
|
17
|
+
* (tests set the interval to 0 to stay fast + offline).
|
|
18
|
+
*/
|
|
19
|
+
import { mkdir, writeFile, rename } from 'node:fs/promises';
|
|
20
|
+
import { dirname, extname } from 'node:path';
|
|
21
|
+
import { VclawError } from '../errors.js';
|
|
22
|
+
import { submitFlowMusicJob, pollFlowMusicJob, downloadFlowMusicClipMp3, } from '../providers/flowmusic-useapi.js';
|
|
23
|
+
/** Lyria 3 Pro full songs land ~40–150s; used only as a fallback duration estimate. */
|
|
24
|
+
const DEFAULT_DURATION_SEC = 150;
|
|
25
|
+
const DEFAULT_POLL_INTERVAL_MS = 5000;
|
|
26
|
+
const DEFAULT_POLL_MAX_ATTEMPTS = 90; // ~7.5 min ceiling at 5s
|
|
27
|
+
/** Force a `.mp3` extension on the output path (we download mp3 bytes). */
|
|
28
|
+
function forceMp3Path(p) {
|
|
29
|
+
const ext = extname(p);
|
|
30
|
+
if (ext.toLowerCase() === '.mp3')
|
|
31
|
+
return p;
|
|
32
|
+
return ext ? `${p.slice(0, p.length - ext.length)}.mp3` : `${p}.mp3`;
|
|
33
|
+
}
|
|
34
|
+
function sleep(ms) {
|
|
35
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
36
|
+
}
|
|
37
|
+
function isGhostwriter(v) {
|
|
38
|
+
return v === 'standard' || v === 'pro';
|
|
39
|
+
}
|
|
40
|
+
function positiveIntFromEnv(raw, fallback) {
|
|
41
|
+
if (raw === undefined)
|
|
42
|
+
return fallback;
|
|
43
|
+
const n = Number(raw);
|
|
44
|
+
return Number.isFinite(n) && n >= 0 ? n : fallback;
|
|
45
|
+
}
|
|
46
|
+
export const flowMusicBackend = {
|
|
47
|
+
id: 'flowmusic',
|
|
48
|
+
kind: 'music',
|
|
49
|
+
displayName: 'FlowMusic (Lyria 3 Pro, useapi.net)',
|
|
50
|
+
// Reuses the shared USEAPI_API_TOKEN; gated in the registry via requiresUseApi
|
|
51
|
+
// rather than a backend-specific requiredEnv (no new token is introduced).
|
|
52
|
+
requiredEnv: [],
|
|
53
|
+
requiresUseApi: true,
|
|
54
|
+
summary: 'Full vocal songs (and instrumentals) via Google Lyria 3 Pro on useapi.net FlowMusic. ' +
|
|
55
|
+
'Honors --lyrics and --instrumental. Async submit → poll → mp3 download. Reuses USEAPI_API_TOKEN; ' +
|
|
56
|
+
'optional VCLAW_FLOWMUSIC_ACCOUNT / VCLAW_FLOWMUSIC_GHOSTWRITER.',
|
|
57
|
+
async generate(input) {
|
|
58
|
+
const env = input.env ?? process.env;
|
|
59
|
+
const outputPath = forceMp3Path(input.outputPath);
|
|
60
|
+
const fallbackDurationMs = (input.durationSec ?? DEFAULT_DURATION_SEC) * 1000;
|
|
61
|
+
if (!input.prompt.trim()) {
|
|
62
|
+
throw new VclawError('music_gen_failed', 'Cannot generate music with an empty prompt.', {
|
|
63
|
+
backend: 'flowmusic',
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// Dry-run: estimate duration, write a placeholder mp3, touch no network.
|
|
67
|
+
if (input.dryRun) {
|
|
68
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
69
|
+
await writeFile(outputPath, Buffer.alloc(0));
|
|
70
|
+
return { path: outputPath, durationMs: fallbackDurationMs, backendId: 'flowmusic' };
|
|
71
|
+
}
|
|
72
|
+
const apiToken = (env['USEAPI_API_TOKEN'] ?? '').trim();
|
|
73
|
+
if (!apiToken) {
|
|
74
|
+
throw new VclawError('music_gen_failed', 'FlowMusic requires USEAPI_API_TOKEN.', {
|
|
75
|
+
backend: 'flowmusic',
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
const account = env['VCLAW_FLOWMUSIC_ACCOUNT']?.trim() || undefined;
|
|
79
|
+
const ghostwriterRaw = env['VCLAW_FLOWMUSIC_GHOSTWRITER']?.trim();
|
|
80
|
+
const ghostwriter = isGhostwriter(ghostwriterRaw) ? ghostwriterRaw : undefined;
|
|
81
|
+
const fetchImpl = input.fetcher;
|
|
82
|
+
const pollIntervalMs = positiveIntFromEnv(env['VCLAW_FLOWMUSIC_POLL_INTERVAL_MS'], DEFAULT_POLL_INTERVAL_MS);
|
|
83
|
+
const maxAttempts = positiveIntFromEnv(env['VCLAW_FLOWMUSIC_POLL_MAX_ATTEMPTS'], DEFAULT_POLL_MAX_ATTEMPTS);
|
|
84
|
+
const submit = await submitFlowMusicJob({
|
|
85
|
+
apiToken,
|
|
86
|
+
prompt: input.prompt,
|
|
87
|
+
...(account ? { account } : {}),
|
|
88
|
+
...(input.instrumental !== undefined ? { instrumental: input.instrumental } : {}),
|
|
89
|
+
...(input.lyrics ? { lyrics: input.lyrics } : {}),
|
|
90
|
+
...(ghostwriter ? { ghostwriter } : {}),
|
|
91
|
+
...(fetchImpl ? { fetchImpl } : {}),
|
|
92
|
+
});
|
|
93
|
+
// Poll to a terminal state (bounded). The submit may already be terminal in
|
|
94
|
+
// some responses; the loop body re-polls on 'pending'.
|
|
95
|
+
let poll = await pollFlowMusicJob({
|
|
96
|
+
apiToken,
|
|
97
|
+
jobid: submit.jobid,
|
|
98
|
+
...(fetchImpl ? { fetchImpl } : {}),
|
|
99
|
+
});
|
|
100
|
+
for (let attempt = 0; poll.status === 'pending' && attempt < maxAttempts; attempt += 1) {
|
|
101
|
+
if (pollIntervalMs > 0)
|
|
102
|
+
await sleep(pollIntervalMs);
|
|
103
|
+
poll = await pollFlowMusicJob({
|
|
104
|
+
apiToken,
|
|
105
|
+
jobid: submit.jobid,
|
|
106
|
+
...(fetchImpl ? { fetchImpl } : {}),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (poll.status === 'failed') {
|
|
110
|
+
throw new VclawError('music_gen_failed', `FlowMusic generation failed: ${poll.error ?? 'unknown error'}`, { backend: 'flowmusic', jobid: submit.jobid, error: poll.error });
|
|
111
|
+
}
|
|
112
|
+
if (poll.status !== 'completed' || poll.clips.length === 0) {
|
|
113
|
+
throw new VclawError('music_gen_failed', 'FlowMusic job did not complete in time (no clips returned).', { backend: 'flowmusic', jobid: submit.jobid, status: poll.status });
|
|
114
|
+
}
|
|
115
|
+
const clip = poll.clips[0]; // A/B pair → MVP takes the first clip.
|
|
116
|
+
const bytes = await downloadFlowMusicClipMp3({
|
|
117
|
+
apiToken,
|
|
118
|
+
clip: clip.clip,
|
|
119
|
+
...(fetchImpl ? { fetchImpl } : {}),
|
|
120
|
+
});
|
|
121
|
+
if (bytes.length === 0) {
|
|
122
|
+
throw new VclawError('music_gen_failed', 'FlowMusic returned an empty audio payload.', {
|
|
123
|
+
backend: 'flowmusic',
|
|
124
|
+
jobid: submit.jobid,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
128
|
+
// Atomic write: tmp → rename (mirrors native-dreamina's downloadToFile).
|
|
129
|
+
const tmp = `${outputPath}.tmp`;
|
|
130
|
+
await writeFile(tmp, bytes);
|
|
131
|
+
await rename(tmp, outputPath);
|
|
132
|
+
// Prefer the clip's real duration; fall back to the request estimate.
|
|
133
|
+
const durationMs = clip.durationS != null ? Math.round(clip.durationS * 1000) : fallbackDurationMs;
|
|
134
|
+
return { path: outputPath, durationMs, backendId: 'flowmusic' };
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=native-flowmusic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-flowmusic.js","sourceRoot":"","sources":["../../../src/video/audio-platform/native-flowmusic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG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.googleapis.com
|
|
5
|
+
* `gemini-2.5-flash-preview-tts:generateContent` endpoint. This is an
|
|
6
|
+
* API-KEY product (NOT Vertex), so it resolves a key from the existing
|
|
7
|
+
* Gemini key pool (GEMINI_API_KEYS / GOOGLE_API_KEYS / GOOGLE_API_KEY) via
|
|
8
|
+
* `fetchGeminiWithPool`. When a caller passes `input.env` carrying a key the
|
|
9
|
+
* process.env-backed pool cannot see, that key is forwarded as the pool's
|
|
10
|
+
* `keyOverride` so library callers authenticate without mutating process.env.
|
|
11
|
+
*
|
|
12
|
+
* The model returns RAW PCM (signed 16-bit little-endian, 24kHz, mono) as
|
|
13
|
+
* base64 in candidates[0].content.parts[].inlineData.data. We wrap that PCM
|
|
14
|
+
* in a 44-byte WAV header and write the result to `outputPath` (a .wav).
|
|
15
|
+
*
|
|
16
|
+
* Duration is computed deterministically from the PCM byte count — no ffprobe:
|
|
17
|
+
* durationMs = round(pcmBytes / (24000 * 2) * 1000)
|
|
18
|
+
*
|
|
19
|
+
* Availability: a Gemini key is resolvable (pool size > 0 or one of the env
|
|
20
|
+
* vars is set). The backend is inert (unavailable) without a key and never
|
|
21
|
+
* throws on the default path; on a missing/empty audio response it throws
|
|
22
|
+
* VclawError('tts_failed', ...).
|
|
23
|
+
*/
|
|
24
|
+
import type { TtsBackend } from './types.js';
|
|
25
|
+
export declare const geminiTts: TtsBackend;
|
|
26
|
+
//# sourceMappingURL=native-gemini-tts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-gemini-tts.d.ts","sourceRoot":"","sources":["../../../src/video/audio-platform/native-gemini-tts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAMH,OAAO,KAAK,EAAE,UAAU,EAA6B,MAAM,YAAY,CAAC;AAqFxE,eAAO,MAAM,SAAS,EAAE,UAgHvB,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SCAFFOLD: Gemini TTS request/response per docs; verify against a real key.
|
|
3
|
+
*
|
|
4
|
+
* Gemini TTS backend — wraps the generativelanguage.googleapis.com
|
|
5
|
+
* `gemini-2.5-flash-preview-tts:generateContent` endpoint. This is an
|
|
6
|
+
* API-KEY product (NOT Vertex), so it resolves a key from the existing
|
|
7
|
+
* Gemini key pool (GEMINI_API_KEYS / GOOGLE_API_KEYS / GOOGLE_API_KEY) via
|
|
8
|
+
* `fetchGeminiWithPool`. When a caller passes `input.env` carrying a key the
|
|
9
|
+
* process.env-backed pool cannot see, that key is forwarded as the pool's
|
|
10
|
+
* `keyOverride` so library callers authenticate without mutating process.env.
|
|
11
|
+
*
|
|
12
|
+
* The model returns RAW PCM (signed 16-bit little-endian, 24kHz, mono) as
|
|
13
|
+
* base64 in candidates[0].content.parts[].inlineData.data. We wrap that PCM
|
|
14
|
+
* in a 44-byte WAV header and write the result to `outputPath` (a .wav).
|
|
15
|
+
*
|
|
16
|
+
* Duration is computed deterministically from the PCM byte count — no ffprobe:
|
|
17
|
+
* durationMs = round(pcmBytes / (24000 * 2) * 1000)
|
|
18
|
+
*
|
|
19
|
+
* Availability: a Gemini key is resolvable (pool size > 0 or one of the env
|
|
20
|
+
* vars is set). The backend is inert (unavailable) without a key and never
|
|
21
|
+
* throws on the default path; on a missing/empty audio response it throws
|
|
22
|
+
* VclawError('tts_failed', ...).
|
|
23
|
+
*/
|
|
24
|
+
import { mkdir, writeFile } from 'node:fs/promises';
|
|
25
|
+
import { dirname } from 'node:path';
|
|
26
|
+
import { fetchGeminiWithPool } from '../gemini-key-pool.js';
|
|
27
|
+
import { VclawError } from '../errors.js';
|
|
28
|
+
const TTS_MODEL = 'gemini-2.5-flash-preview-tts';
|
|
29
|
+
const TTS_SAMPLE_RATE_HZ = 24_000;
|
|
30
|
+
const TTS_BYTES_PER_SAMPLE = 2; // s16le
|
|
31
|
+
const TTS_CHANNELS = 1; // mono
|
|
32
|
+
const DEFAULT_VOICE = 'Kore';
|
|
33
|
+
/** Chars-per-second heuristic for dry-run duration estimation (~14 cps speech). */
|
|
34
|
+
const DRYRUN_CHARS_PER_SEC = 14;
|
|
35
|
+
/**
|
|
36
|
+
* Gemini API key sources, in the same precedence as the global key pool
|
|
37
|
+
* (gemini-key-pool.ts). Used to resolve an explicit key from a caller-supplied
|
|
38
|
+
* `input.env` so the pool (which only reads process.env) can be bypassed.
|
|
39
|
+
*/
|
|
40
|
+
const GEMINI_KEY_VARS = ['GEMINI_API_KEYS', 'GOOGLE_API_KEYS', 'GOOGLE_API_KEY'];
|
|
41
|
+
/**
|
|
42
|
+
* Resolve the first key from a caller-supplied env that differs from
|
|
43
|
+
* process.env. Returns undefined when no env was passed, or when the passed env
|
|
44
|
+
* adds no key beyond what process.env already exposes (in which case the global
|
|
45
|
+
* pool handles key selection). Splits on the same delimiters the pool uses and
|
|
46
|
+
* returns the first token.
|
|
47
|
+
*/
|
|
48
|
+
function resolveKeyOverrideFromEnv(env) {
|
|
49
|
+
if (!env || env === process.env)
|
|
50
|
+
return undefined;
|
|
51
|
+
for (const varName of GEMINI_KEY_VARS) {
|
|
52
|
+
const raw = env[varName];
|
|
53
|
+
if (typeof raw !== 'string' || raw.trim() === '')
|
|
54
|
+
continue;
|
|
55
|
+
// process.env already carries this exact value → let the pool handle it.
|
|
56
|
+
if (process.env[varName] === raw)
|
|
57
|
+
continue;
|
|
58
|
+
const first = raw.split(/[,;\n\s]+/).map((t) => t.trim()).find((t) => t.length > 0);
|
|
59
|
+
if (first)
|
|
60
|
+
return first;
|
|
61
|
+
}
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
function buildTtsUrl(key) {
|
|
65
|
+
return `https://generativelanguage.googleapis.com/v1beta/models/${TTS_MODEL}:generateContent?key=${encodeURIComponent(key)}`;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* durationMs from raw PCM byte count (s16le 24kHz mono).
|
|
69
|
+
* pcmBytes / (sampleRate * bytesPerSample * channels) * 1000
|
|
70
|
+
*/
|
|
71
|
+
function pcmDurationMs(pcmBytes) {
|
|
72
|
+
return Math.round((pcmBytes / (TTS_SAMPLE_RATE_HZ * TTS_BYTES_PER_SAMPLE * TTS_CHANNELS)) * 1000);
|
|
73
|
+
}
|
|
74
|
+
/** Wrap raw PCM (s16le 24kHz mono) bytes in a canonical 44-byte WAV header. */
|
|
75
|
+
function wrapPcmInWav(pcm) {
|
|
76
|
+
const byteRate = TTS_SAMPLE_RATE_HZ * TTS_CHANNELS * TTS_BYTES_PER_SAMPLE;
|
|
77
|
+
const blockAlign = TTS_CHANNELS * TTS_BYTES_PER_SAMPLE;
|
|
78
|
+
const header = Buffer.alloc(44);
|
|
79
|
+
header.write('RIFF', 0, 'ascii');
|
|
80
|
+
header.writeUInt32LE(36 + pcm.length, 4); // ChunkSize
|
|
81
|
+
header.write('WAVE', 8, 'ascii');
|
|
82
|
+
header.write('fmt ', 12, 'ascii');
|
|
83
|
+
header.writeUInt32LE(16, 16); // Subchunk1Size (PCM)
|
|
84
|
+
header.writeUInt16LE(1, 20); // AudioFormat = PCM
|
|
85
|
+
header.writeUInt16LE(TTS_CHANNELS, 22);
|
|
86
|
+
header.writeUInt32LE(TTS_SAMPLE_RATE_HZ, 24);
|
|
87
|
+
header.writeUInt32LE(byteRate, 28);
|
|
88
|
+
header.writeUInt16LE(blockAlign, 32);
|
|
89
|
+
header.writeUInt16LE(TTS_BYTES_PER_SAMPLE * 8, 34); // BitsPerSample
|
|
90
|
+
header.write('data', 36, 'ascii');
|
|
91
|
+
header.writeUInt32LE(pcm.length, 40); // Subchunk2Size
|
|
92
|
+
return Buffer.concat([header, pcm]);
|
|
93
|
+
}
|
|
94
|
+
/** Defensive extraction of the first base64 inlineData audio payload. */
|
|
95
|
+
function extractAudioBase64(parsed) {
|
|
96
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
97
|
+
return undefined;
|
|
98
|
+
const candidates = parsed.candidates;
|
|
99
|
+
if (!Array.isArray(candidates) || candidates.length === 0)
|
|
100
|
+
return undefined;
|
|
101
|
+
const parts = candidates[0]?.content?.parts;
|
|
102
|
+
if (!Array.isArray(parts))
|
|
103
|
+
return undefined;
|
|
104
|
+
for (const part of parts) {
|
|
105
|
+
const data = part?.inlineData?.data;
|
|
106
|
+
if (typeof data === 'string' && data.length > 0)
|
|
107
|
+
return data;
|
|
108
|
+
}
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
export const geminiTts = {
|
|
112
|
+
id: 'gemini-tts',
|
|
113
|
+
kind: 'tts',
|
|
114
|
+
outputExtension: 'wav',
|
|
115
|
+
displayName: 'Gemini TTS (gemini-2.5-flash-preview-tts)',
|
|
116
|
+
// API-key product, not Vertex. Availability is resolved from the Gemini key
|
|
117
|
+
// pool (see isTtsBackendAvailable), so requiredEnv stays empty and the
|
|
118
|
+
// registry gates on requiresGeminiKey instead of this backend's id.
|
|
119
|
+
requiredEnv: [],
|
|
120
|
+
requiresVertex: false,
|
|
121
|
+
requiresGeminiKey: true,
|
|
122
|
+
summary: 'Single-speaker text-to-speech via the Gemini API (gemini-2.5-flash-preview-tts). Returns 24kHz mono PCM wrapped as WAV. Requires a Gemini API key (GEMINI_API_KEYS / GOOGLE_API_KEYS / GOOGLE_API_KEY).',
|
|
123
|
+
async generate(input) {
|
|
124
|
+
const voice = input.voice && input.voice.trim() ? input.voice.trim() : DEFAULT_VOICE;
|
|
125
|
+
if (!input.text || !input.text.trim()) {
|
|
126
|
+
throw new VclawError('tts_failed', 'Cannot synthesize narration from empty text.', {
|
|
127
|
+
backendId: 'gemini-tts',
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
// Dry-run: estimate duration from text length; do NOT touch network or do
|
|
131
|
+
// real synthesis. Write a placeholder WAV (44-byte header, no samples) so
|
|
132
|
+
// downstream existsSync() checks stay consistent.
|
|
133
|
+
if (input.dryRun) {
|
|
134
|
+
const estSec = Math.max(1, input.text.trim().length / DRYRUN_CHARS_PER_SEC);
|
|
135
|
+
const durationMs = Math.round(estSec * 1000);
|
|
136
|
+
await mkdir(dirname(input.outputPath), { recursive: true });
|
|
137
|
+
await writeFile(input.outputPath, wrapPcmInWav(Buffer.alloc(0)));
|
|
138
|
+
return { path: input.outputPath, durationMs, backendId: 'gemini-tts' };
|
|
139
|
+
}
|
|
140
|
+
const requestBody = JSON.stringify({
|
|
141
|
+
contents: [{ parts: [{ text: input.text }] }],
|
|
142
|
+
generationConfig: {
|
|
143
|
+
responseModalities: ['AUDIO'],
|
|
144
|
+
speechConfig: {
|
|
145
|
+
voiceConfig: {
|
|
146
|
+
prebuiltVoiceConfig: { voiceName: voice },
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
// Resolve a key from input.env when it carries one the global pool (which
|
|
152
|
+
// only reads process.env) cannot see, so a library caller passing
|
|
153
|
+
// env: { GEMINI_API_KEYS: '...' } actually authenticates instead of hitting
|
|
154
|
+
// 'No Gemini API keys configured'. Absent that, the pool handles selection.
|
|
155
|
+
const keyOverride = resolveKeyOverrideFromEnv(input.env);
|
|
156
|
+
const poolOptions = {};
|
|
157
|
+
if (input.fetcher)
|
|
158
|
+
poolOptions.fetcher = input.fetcher;
|
|
159
|
+
if (keyOverride)
|
|
160
|
+
poolOptions.keyOverride = keyOverride;
|
|
161
|
+
const response = await fetchGeminiWithPool(buildTtsUrl, {
|
|
162
|
+
method: 'POST',
|
|
163
|
+
headers: { 'Content-Type': 'application/json' },
|
|
164
|
+
body: requestBody,
|
|
165
|
+
}, poolOptions);
|
|
166
|
+
if (!response.ok) {
|
|
167
|
+
const body = await response.text().catch(() => '');
|
|
168
|
+
throw new VclawError('tts_failed', `Gemini TTS request failed with HTTP ${response.status}.`, { backendId: 'gemini-tts', status: response.status, body: body.slice(0, 500) });
|
|
169
|
+
}
|
|
170
|
+
let parsed;
|
|
171
|
+
try {
|
|
172
|
+
parsed = await response.json();
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
throw new VclawError('tts_failed', 'Gemini TTS returned a non-JSON response.', {
|
|
176
|
+
backendId: 'gemini-tts',
|
|
177
|
+
error: err instanceof Error ? err.message : String(err),
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
const b64 = extractAudioBase64(parsed);
|
|
181
|
+
if (!b64) {
|
|
182
|
+
throw new VclawError('tts_failed', 'Gemini TTS response contained no audio data.', {
|
|
183
|
+
backendId: 'gemini-tts',
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
const pcm = Buffer.from(b64, 'base64');
|
|
187
|
+
if (pcm.length === 0) {
|
|
188
|
+
throw new VclawError('tts_failed', 'Gemini TTS returned an empty audio payload.', {
|
|
189
|
+
backendId: 'gemini-tts',
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
const wav = wrapPcmInWav(pcm);
|
|
193
|
+
await mkdir(dirname(input.outputPath), { recursive: true });
|
|
194
|
+
await writeFile(input.outputPath, wav);
|
|
195
|
+
return {
|
|
196
|
+
path: input.outputPath,
|
|
197
|
+
durationMs: pcmDurationMs(pcm.length),
|
|
198
|
+
backendId: 'gemini-tts',
|
|
199
|
+
};
|
|
200
|
+
},
|
|
201
|
+
};
|
|
202
|
+
//# sourceMappingURL=native-gemini-tts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-gemini-tts.js","sourceRoot":"","sources":["../../../src/video/audio-platform/native-gemini-tts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,SAAS,GAAG,8BAA8B,CAAC;AACjD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAA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,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC,CAAC;QACL,CAAC;QAED,MAAM,GAAG,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,IAAI,UAAU,CAAC,YAAY,EAAE,8CAA8C,EAAE;gBACjF,SAAS,EAAE,YAAY;aACxB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACvC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACrB,MAAM,IAAI,UAAU,CAAC,YAAY,EAAE,6CAA6C,EAAE;gBAChF,SAAS,EAAE,YAAY;aACxB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,MAAM,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAEvC,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,UAAU;YACtB,UAAU,EAAE,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC;YACrC,SAAS,EAAE,YAAY;SACxB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Music generation via Google Vertex AI Lyria (predict endpoint).
|
|
3
|
+
*
|
|
4
|
+
* VERIFIED LIVE against `lyria-002` (Lyria 2, GA) on 2026-06-01 — the request
|
|
5
|
+
* body and response field below match the real API. INERT / unavailable
|
|
6
|
+
* without a Vertex project (GOOGLE_CLOUD_PROJECT or VERTEX_PROJECT must be set).
|
|
7
|
+
*
|
|
8
|
+
* POST https://{REGION}-aiplatform.googleapis.com/v1/projects/{PROJECT}/
|
|
9
|
+
* locations/{REGION}/publishers/google/models/{MODEL}:predict
|
|
10
|
+
* Authorization: Bearer <token>
|
|
11
|
+
* Body: { instances: [{ prompt: string }], parameters: { sampleCount: 1 } }
|
|
12
|
+
* Response: { predictions: [{ bytesBase64Encoded: string (WAV), mimeType }] }
|
|
13
|
+
*
|
|
14
|
+
* MODEL (via LYRIA_MODEL env, default lyria-002):
|
|
15
|
+
* - lyria-002 Lyria 2, GA, 30s, text-only ($0.06/30s)
|
|
16
|
+
* - lyria-3-clip-preview Lyria 3, 30s, text+image (PREVIEW — needs project allowlist)
|
|
17
|
+
* - lyria-3-pro-preview Lyria 3 Pro, ~184s full song, text+image (PREVIEW — allowlist)
|
|
18
|
+
* NOTE: the Lyria 3 image-input (multimodal) request shape is NOT yet wired or
|
|
19
|
+
* verified here — it needs preview allowlist access; add + verify once granted.
|
|
20
|
+
*
|
|
21
|
+
* Auth (tried in order): GOOGLE_ACCESS_TOKEN env -> GCE metadata server ->
|
|
22
|
+
* `gcloud auth print-access-token` (local dev, dependency-free). For prod/CI,
|
|
23
|
+
* set GOOGLE_ACCESS_TOKEN or run on a GCE/Cloud Run service account.
|
|
24
|
+
* requiresVertex: true.
|
|
25
|
+
*/
|
|
26
|
+
import type { MusicBackend } from './types.js';
|
|
27
|
+
/**
|
|
28
|
+
* True duration (ms) of a RIFF/WAVE buffer, read from its fmt byteRate + data
|
|
29
|
+
* chunk size. Lyria returns a full WAV, so this reports the real clip length
|
|
30
|
+
* (~32.8s for lyria-002) rather than the requested-duration default. Returns
|
|
31
|
+
* null for a non-WAV / unparseable buffer (caller falls back to the request).
|
|
32
|
+
*/
|
|
33
|
+
export declare function wavDurationMs(buf: Buffer): number | null;
|
|
34
|
+
export declare const lyriaBackend: MusicBackend;
|
|
35
|
+
//# sourceMappingURL=native-lyria.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-lyria.d.ts","sourceRoot":"","sources":["../../../src/video/audio-platform/native-lyria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAiC,MAAM,YAAY,CAAC;AAO9E;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAwBxD;AA6DD,eAAO,MAAM,YAAY,EAAE,YAqG1B,CAAC"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Music generation via Google Vertex AI Lyria (predict endpoint).
|
|
3
|
+
*
|
|
4
|
+
* VERIFIED LIVE against `lyria-002` (Lyria 2, GA) on 2026-06-01 — the request
|
|
5
|
+
* body and response field below match the real API. INERT / unavailable
|
|
6
|
+
* without a Vertex project (GOOGLE_CLOUD_PROJECT or VERTEX_PROJECT must be set).
|
|
7
|
+
*
|
|
8
|
+
* POST https://{REGION}-aiplatform.googleapis.com/v1/projects/{PROJECT}/
|
|
9
|
+
* locations/{REGION}/publishers/google/models/{MODEL}:predict
|
|
10
|
+
* Authorization: Bearer <token>
|
|
11
|
+
* Body: { instances: [{ prompt: string }], parameters: { sampleCount: 1 } }
|
|
12
|
+
* Response: { predictions: [{ bytesBase64Encoded: string (WAV), mimeType }] }
|
|
13
|
+
*
|
|
14
|
+
* MODEL (via LYRIA_MODEL env, default lyria-002):
|
|
15
|
+
* - lyria-002 Lyria 2, GA, 30s, text-only ($0.06/30s)
|
|
16
|
+
* - lyria-3-clip-preview Lyria 3, 30s, text+image (PREVIEW — needs project allowlist)
|
|
17
|
+
* - lyria-3-pro-preview Lyria 3 Pro, ~184s full song, text+image (PREVIEW — allowlist)
|
|
18
|
+
* NOTE: the Lyria 3 image-input (multimodal) request shape is NOT yet wired or
|
|
19
|
+
* verified here — it needs preview allowlist access; add + verify once granted.
|
|
20
|
+
*
|
|
21
|
+
* Auth (tried in order): GOOGLE_ACCESS_TOKEN env -> GCE metadata server ->
|
|
22
|
+
* `gcloud auth print-access-token` (local dev, dependency-free). For prod/CI,
|
|
23
|
+
* set GOOGLE_ACCESS_TOKEN or run on a GCE/Cloud Run service account.
|
|
24
|
+
* requiresVertex: true.
|
|
25
|
+
*/
|
|
26
|
+
import { mkdir, writeFile } from 'node:fs/promises';
|
|
27
|
+
import { dirname } from 'node:path';
|
|
28
|
+
import { execFile } from 'node:child_process';
|
|
29
|
+
import { promisify } from 'node:util';
|
|
30
|
+
import { VclawError } from '../errors.js';
|
|
31
|
+
const execFileAsync = promisify(execFile);
|
|
32
|
+
const DEFAULT_LYRIA_REGION = 'us-central1';
|
|
33
|
+
const DEFAULT_LYRIA_MODEL = 'lyria-002';
|
|
34
|
+
/**
|
|
35
|
+
* True duration (ms) of a RIFF/WAVE buffer, read from its fmt byteRate + data
|
|
36
|
+
* chunk size. Lyria returns a full WAV, so this reports the real clip length
|
|
37
|
+
* (~32.8s for lyria-002) rather than the requested-duration default. Returns
|
|
38
|
+
* null for a non-WAV / unparseable buffer (caller falls back to the request).
|
|
39
|
+
*/
|
|
40
|
+
export function wavDurationMs(buf) {
|
|
41
|
+
if (buf.length < 44 ||
|
|
42
|
+
buf.toString('ascii', 0, 4) !== 'RIFF' ||
|
|
43
|
+
buf.toString('ascii', 8, 12) !== 'WAVE') {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
let byteRate = 0;
|
|
47
|
+
let dataSize = 0;
|
|
48
|
+
let off = 12;
|
|
49
|
+
while (off + 8 <= buf.length) {
|
|
50
|
+
const id = buf.toString('ascii', off, off + 4);
|
|
51
|
+
const size = buf.readUInt32LE(off + 4);
|
|
52
|
+
if (id === 'fmt ' && off + 24 <= buf.length) {
|
|
53
|
+
byteRate = buf.readUInt32LE(off + 16); // fmt body: +8 fmt/chan, +12 rate, +16 byteRate
|
|
54
|
+
}
|
|
55
|
+
else if (id === 'data') {
|
|
56
|
+
dataSize = size;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
off += 8 + size + (size % 2); // chunks are word-aligned
|
|
60
|
+
}
|
|
61
|
+
if (byteRate > 0 && dataSize > 0)
|
|
62
|
+
return Math.round((dataSize / byteRate) * 1000);
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Resolve the Vertex project id from explicit env or well-known fallback vars.
|
|
67
|
+
*/
|
|
68
|
+
function resolveVertexProject(env) {
|
|
69
|
+
return env['GOOGLE_CLOUD_PROJECT'] ?? env['VERTEX_PROJECT'] ?? env['GCLOUD_PROJECT'];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Obtain a Vertex bearer token. Tries GOOGLE_APPLICATION_CREDENTIALS / ADC
|
|
73
|
+
* via the metadata server token endpoint; falls back to the
|
|
74
|
+
* GOOGLE_ACCESS_TOKEN env var for local-dev / CI injection.
|
|
75
|
+
*
|
|
76
|
+
* SCAFFOLD: In production this should use the Google Auth Library
|
|
77
|
+
* (e.g. google-auth-library) to obtain a proper access token via ADC.
|
|
78
|
+
* The current implementation accepts a pre-resolved token via env var
|
|
79
|
+
* GOOGLE_ACCESS_TOKEN for testability without a real service account.
|
|
80
|
+
*/
|
|
81
|
+
async function resolveVertexToken(env, fetcher) {
|
|
82
|
+
const explicit = env['GOOGLE_ACCESS_TOKEN'];
|
|
83
|
+
if (explicit)
|
|
84
|
+
return explicit;
|
|
85
|
+
// Attempt GCE metadata server (works on Cloud Run / GCE VMs).
|
|
86
|
+
try {
|
|
87
|
+
const metaResp = await fetcher('http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token', { headers: { 'Metadata-Flavor': 'Google' } });
|
|
88
|
+
if (metaResp.ok) {
|
|
89
|
+
const json = (await metaResp.json());
|
|
90
|
+
if (json.access_token)
|
|
91
|
+
return json.access_token;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
// Not on GCE — fall through.
|
|
96
|
+
}
|
|
97
|
+
// Local-dev fallback: mint a token via the gcloud CLI if present. Keeps the
|
|
98
|
+
// Lyria backend dependency-free (no google-auth-library) while removing the
|
|
99
|
+
// need to refresh GOOGLE_ACCESS_TOKEN by hand. videoclaw already shells out
|
|
100
|
+
// to provider CLIs elsewhere (e.g. the veo-useapi Bun transport).
|
|
101
|
+
try {
|
|
102
|
+
const { stdout } = await execFileAsync('gcloud', ['auth', 'print-access-token'], {
|
|
103
|
+
timeout: 15_000,
|
|
104
|
+
});
|
|
105
|
+
const tok = stdout.trim();
|
|
106
|
+
if (tok)
|
|
107
|
+
return tok;
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
// gcloud absent / not authenticated — fall through to the clear error.
|
|
111
|
+
}
|
|
112
|
+
throw new VclawError('env_var_missing', 'No Vertex access token available. Set GOOGLE_ACCESS_TOKEN, run on a GCE/Cloud Run service account, or `gcloud auth login` (the CLI fallback).', { backend: 'lyria' });
|
|
113
|
+
}
|
|
114
|
+
export const lyriaBackend = {
|
|
115
|
+
id: 'lyria',
|
|
116
|
+
kind: 'music',
|
|
117
|
+
displayName: 'Lyria (Vertex AI)',
|
|
118
|
+
requiredEnv: [],
|
|
119
|
+
requiresVertex: true,
|
|
120
|
+
summary: 'Music generation via Google Vertex AI Lyria. Default lyria-002 (verified); LYRIA_MODEL can target lyria-3-clip-preview / lyria-3-pro-preview (preview, allowlist). Requires GOOGLE_CLOUD_PROJECT / VERTEX_PROJECT + a Vertex token.',
|
|
121
|
+
async generate(input) {
|
|
122
|
+
const env = input.env ?? process.env;
|
|
123
|
+
const fetcher = input.fetcher ?? fetch;
|
|
124
|
+
const durationSec = input.durationSec ?? 30;
|
|
125
|
+
if (!input.prompt.trim()) {
|
|
126
|
+
throw new VclawError('music_gen_failed', 'Cannot generate music with an empty prompt.', {
|
|
127
|
+
backend: 'lyria',
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
const project = resolveVertexProject(env);
|
|
131
|
+
if (!project) {
|
|
132
|
+
throw new VclawError('env_var_missing', 'GOOGLE_CLOUD_PROJECT (or VERTEX_PROJECT) is not set. The Lyria backend requires a Vertex project.', { backend: 'lyria' });
|
|
133
|
+
}
|
|
134
|
+
const region = env['VERTEX_REGION'] ?? DEFAULT_LYRIA_REGION;
|
|
135
|
+
const model = env['LYRIA_MODEL'] ?? DEFAULT_LYRIA_MODEL;
|
|
136
|
+
if (input.dryRun) {
|
|
137
|
+
// Write an empty placeholder so downstream existsSync() stays consistent
|
|
138
|
+
// with every other audio backend's dry-run path (lyria3/elevenlabs/etc.).
|
|
139
|
+
const dir = dirname(input.outputPath);
|
|
140
|
+
if (dir)
|
|
141
|
+
await mkdir(dir, { recursive: true });
|
|
142
|
+
await writeFile(input.outputPath, Buffer.alloc(0));
|
|
143
|
+
return { path: input.outputPath, durationMs: durationSec * 1000, backendId: 'lyria' };
|
|
144
|
+
}
|
|
145
|
+
const token = await resolveVertexToken(env, fetcher);
|
|
146
|
+
const endpoint = `https://${region}-aiplatform.googleapis.com/v1/projects/${project}` +
|
|
147
|
+
`/locations/${region}/publishers/google/models/${model}:predict`;
|
|
148
|
+
// Verified against lyria-002 (Lyria 2). Lyria 3 adds optional image input.
|
|
149
|
+
const body = {
|
|
150
|
+
instances: [{ prompt: input.prompt }],
|
|
151
|
+
parameters: { sampleCount: 1 },
|
|
152
|
+
};
|
|
153
|
+
const resp = await fetcher(endpoint, {
|
|
154
|
+
method: 'POST',
|
|
155
|
+
headers: {
|
|
156
|
+
Authorization: `Bearer ${token}`,
|
|
157
|
+
'Content-Type': 'application/json',
|
|
158
|
+
},
|
|
159
|
+
body: JSON.stringify(body),
|
|
160
|
+
});
|
|
161
|
+
if (!resp.ok) {
|
|
162
|
+
let detail = '';
|
|
163
|
+
try {
|
|
164
|
+
detail = await resp.text();
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
/* ignore */
|
|
168
|
+
}
|
|
169
|
+
throw new VclawError('music_gen_failed', `Vertex Lyria predict request failed: ${resp.status} ${resp.statusText}`, { status: resp.status, detail: detail.slice(0, 300), backend: 'lyria' });
|
|
170
|
+
}
|
|
171
|
+
// Verified response shape (lyria-002): predictions[0].bytesBase64Encoded (WAV).
|
|
172
|
+
const json = (await resp.json());
|
|
173
|
+
const prediction = json.predictions?.[0];
|
|
174
|
+
const b64 = prediction?.bytesBase64Encoded;
|
|
175
|
+
if (!b64) {
|
|
176
|
+
throw new VclawError('music_gen_failed', 'Vertex Lyria response did not include bytesBase64Encoded audio data.', { backend: 'lyria' });
|
|
177
|
+
}
|
|
178
|
+
const bytes = Buffer.from(b64, 'base64');
|
|
179
|
+
const dir = dirname(input.outputPath);
|
|
180
|
+
if (dir)
|
|
181
|
+
await mkdir(dir, { recursive: true });
|
|
182
|
+
await writeFile(input.outputPath, bytes);
|
|
183
|
+
// Report the WAV's true length when parseable (Lyria clips are ~32.8s),
|
|
184
|
+
// falling back to the requested duration only if the header is unreadable.
|
|
185
|
+
const durationMs = wavDurationMs(bytes) ?? durationSec * 1000;
|
|
186
|
+
return { path: input.outputPath, durationMs, backendId: 'lyria' };
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
//# sourceMappingURL=native-lyria.js.map
|