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,44 @@
|
|
|
1
|
+
import type { VideoAnalyzeOutput } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Pure sampling-math seam: given a clip duration in seconds, produce the ffmpeg
|
|
4
|
+
* `-vf` value and frame cap that spread {@link count} frames EVENLY across the
|
|
5
|
+
* whole clip (one frame every `duration / count` seconds via the `fps` filter),
|
|
6
|
+
* not clustered at the head. Returns `null` when the duration is unusable
|
|
7
|
+
* (missing/non-finite/≤0) so the caller can fall back to head-clustered
|
|
8
|
+
* `thumbnail` sampling without breaking the local-file path.
|
|
9
|
+
*
|
|
10
|
+
* The `fps` filter can emit `count` or `count ± 1` frames at clip boundaries, so
|
|
11
|
+
* the caller MUST also pass `-frames:v frames` and tolerate fewer than `count`
|
|
12
|
+
* outputs (the caller already slices/handles the resulting array).
|
|
13
|
+
*/
|
|
14
|
+
export declare function analyzeFrameSampling(durationSeconds: number | undefined, count?: number): {
|
|
15
|
+
vf: string;
|
|
16
|
+
frames: number;
|
|
17
|
+
} | null;
|
|
18
|
+
export declare function generateAnalyzeOutputWithGemini(input: {
|
|
19
|
+
source: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
durationSeconds?: number;
|
|
22
|
+
endpoint?: string;
|
|
23
|
+
fetcher?: typeof fetch;
|
|
24
|
+
/**
|
|
25
|
+
* Injectable frame-extraction seam (returns base64-encoded JPEG frames).
|
|
26
|
+
* Defaults to the real ffmpeg helper; tests inject fakes so the suite never
|
|
27
|
+
* shells out to ffmpeg. Only invoked when `source` is a readable local file.
|
|
28
|
+
* The optional `durationSeconds` lets the extractor spread frames evenly
|
|
29
|
+
* across the clip; injected fakes may ignore it.
|
|
30
|
+
*/
|
|
31
|
+
extractFrames?: (videoPath: string, durationSeconds?: number) => Promise<string[]>;
|
|
32
|
+
}): Promise<VideoAnalyzeOutput>;
|
|
33
|
+
export declare function generateMultiShotWithGemini(input: {
|
|
34
|
+
preset: import('./multi-shot-prompt.js').MultiShotPreset;
|
|
35
|
+
imagePath: string;
|
|
36
|
+
character?: string;
|
|
37
|
+
action?: string;
|
|
38
|
+
location: string;
|
|
39
|
+
timeOfDay: string;
|
|
40
|
+
repairInstructions?: string;
|
|
41
|
+
/** Injectable fetch for tests; falls back to the global Gemini key pool. */
|
|
42
|
+
fetcher?: typeof fetch;
|
|
43
|
+
}): Promise<string>;
|
|
44
|
+
//# sourceMappingURL=gemini-analyze.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-analyze.d.ts","sourceRoot":"","sources":["../../src/video/gemini-analyze.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAUrD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,KAAK,SAAsB,GAC1B;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAWvC;AA+JD,wBAAsB,+BAA+B,CAAC,KAAK,EAAE;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IACvB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACpF,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA8E9B;AAoBD,wBAAsB,2BAA2B,CAAC,KAAK,EAAE;IACvD,MAAM,EAAE,OAAO,wBAAwB,EAAE,eAAe,CAAC;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;CACxB,GAAG,OAAO,CAAC,MAAM,CAAC,CA2DlB"}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { safeErrorBody } from './http-error-safety.js';
|
|
2
|
+
import { readFile, mkdtemp, readdir, rm } from 'node:fs/promises';
|
|
3
|
+
import { statSync } from 'node:fs';
|
|
4
|
+
import { execFile } from 'node:child_process';
|
|
5
|
+
import { extname, join } from 'node:path';
|
|
6
|
+
import { tmpdir } from 'node:os';
|
|
7
|
+
import { promisify } from 'node:util';
|
|
8
|
+
import { createAnalyzeOutput } from './analyze-output.js';
|
|
9
|
+
import { probeMedia } from './final-media.js';
|
|
10
|
+
import { fetchGeminiWithPool } from './gemini-key-pool.js';
|
|
11
|
+
const execFileAsync = promisify(execFile);
|
|
12
|
+
const DEFAULT_GEMINI_ANALYZE_ENDPOINT = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent';
|
|
13
|
+
/** Number of JPEG frames sampled (evenly across the clip) from a local source. */
|
|
14
|
+
const ANALYZE_FRAME_COUNT = 6;
|
|
15
|
+
/**
|
|
16
|
+
* Pure sampling-math seam: given a clip duration in seconds, produce the ffmpeg
|
|
17
|
+
* `-vf` value and frame cap that spread {@link count} frames EVENLY across the
|
|
18
|
+
* whole clip (one frame every `duration / count` seconds via the `fps` filter),
|
|
19
|
+
* not clustered at the head. Returns `null` when the duration is unusable
|
|
20
|
+
* (missing/non-finite/≤0) so the caller can fall back to head-clustered
|
|
21
|
+
* `thumbnail` sampling without breaking the local-file path.
|
|
22
|
+
*
|
|
23
|
+
* The `fps` filter can emit `count` or `count ± 1` frames at clip boundaries, so
|
|
24
|
+
* the caller MUST also pass `-frames:v frames` and tolerate fewer than `count`
|
|
25
|
+
* outputs (the caller already slices/handles the resulting array).
|
|
26
|
+
*/
|
|
27
|
+
export function analyzeFrameSampling(durationSeconds, count = ANALYZE_FRAME_COUNT) {
|
|
28
|
+
if (typeof durationSeconds !== 'number' ||
|
|
29
|
+
!Number.isFinite(durationSeconds) ||
|
|
30
|
+
durationSeconds <= 0 ||
|
|
31
|
+
count <= 0) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
// A frame every duration/count seconds → `count` frames spread across [0, D).
|
|
35
|
+
return { vf: `fps=${count}/${durationSeconds},scale=512:-1`, frames: count };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Extracts up to {@link ANALYZE_FRAME_COUNT} downscaled JPEG frames spread
|
|
39
|
+
* EVENLY across a local video file via ffmpeg and returns them base64-encoded.
|
|
40
|
+
*
|
|
41
|
+
* When the clip duration is known (passed in or probed via {@link probeMedia}),
|
|
42
|
+
* sampling uses the `fps=N/D` filter so frames cover the whole clip rather than
|
|
43
|
+
* clustering in the first ~20s the way `thumbnail` + `-frames:v` does. If the
|
|
44
|
+
* duration cannot be determined, it falls back to the legacy `thumbnail`
|
|
45
|
+
* sampling so the local-file path never breaks. The temp directory is always
|
|
46
|
+
* removed in the `finally`. Callers must guarantee the path is a readable local
|
|
47
|
+
* file; failures (ffmpeg missing, corrupt input) propagate so the live path can
|
|
48
|
+
* fall back to text-only analysis.
|
|
49
|
+
*/
|
|
50
|
+
async function extractAnalyzeFrames(videoPath, durationSeconds) {
|
|
51
|
+
const ffmpegBin = process.env.VCLAW_FFMPEG_BIN ?? 'ffmpeg';
|
|
52
|
+
// Resolve the clip duration: prefer the caller-supplied value, otherwise probe
|
|
53
|
+
// it. A failed probe is non-fatal — we just lose even spreading and fall back
|
|
54
|
+
// to head-clustered `thumbnail` sampling.
|
|
55
|
+
let resolvedDuration = durationSeconds;
|
|
56
|
+
if (analyzeFrameSampling(resolvedDuration) === null) {
|
|
57
|
+
try {
|
|
58
|
+
const probe = await probeMedia(videoPath);
|
|
59
|
+
resolvedDuration = probe.durationSeconds;
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
resolvedDuration = undefined;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const sampling = analyzeFrameSampling(resolvedDuration);
|
|
66
|
+
const dir = await mkdtemp(join(tmpdir(), 'vclaw-analyze-frames-'));
|
|
67
|
+
try {
|
|
68
|
+
// Even path: `fps=N/D` emits one frame every D/N seconds (spread across the
|
|
69
|
+
// whole clip); `-frames:v N` caps the count. Fallback path: `thumbnail`
|
|
70
|
+
// picks one representative frame per window (head-clustered) — only used when
|
|
71
|
+
// the duration is unknown so even sampling is impossible.
|
|
72
|
+
const vf = sampling ? sampling.vf : 'thumbnail,scale=512:-1';
|
|
73
|
+
const frameCap = sampling ? sampling.frames : ANALYZE_FRAME_COUNT;
|
|
74
|
+
await execFileAsync(ffmpegBin, [
|
|
75
|
+
'-v', 'error',
|
|
76
|
+
'-i', videoPath,
|
|
77
|
+
'-vf', vf,
|
|
78
|
+
'-frames:v', String(frameCap),
|
|
79
|
+
'-vsync', 'vfr',
|
|
80
|
+
join(dir, 'frame-%02d.jpg'),
|
|
81
|
+
], { encoding: 'buffer' });
|
|
82
|
+
const entries = (await readdir(dir))
|
|
83
|
+
.filter((name) => name.toLowerCase().endsWith('.jpg'))
|
|
84
|
+
.sort();
|
|
85
|
+
if (entries.length === 0) {
|
|
86
|
+
throw new Error('ffmpeg produced no frames for analyze ingestion.');
|
|
87
|
+
}
|
|
88
|
+
const frames = [];
|
|
89
|
+
// `fps` can yield N±1 at boundaries; cap at ANALYZE_FRAME_COUNT either way.
|
|
90
|
+
for (const name of entries.slice(0, ANALYZE_FRAME_COUNT)) {
|
|
91
|
+
const bytes = await readFile(join(dir, name));
|
|
92
|
+
frames.push(bytes.toString('base64'));
|
|
93
|
+
}
|
|
94
|
+
return frames;
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
await rm(dir, { recursive: true, force: true });
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const ANALYZE_PROMPT = `You analyze reference videos for reusable ad and short-form video templates.
|
|
101
|
+
|
|
102
|
+
Return ONLY valid JSON with this exact shape:
|
|
103
|
+
{
|
|
104
|
+
"pacing": { "label": "slow|medium|fast|mixed", "notes": ["..."] },
|
|
105
|
+
"structure": { "hook": "...", "beats": ["...", "..."], "ending": "..." },
|
|
106
|
+
"motionClassification": { "primaryMode": "motion-clips|animated-stills|mixed|unknown", "notes": ["..."] },
|
|
107
|
+
"keep": ["..."],
|
|
108
|
+
"change": ["..."],
|
|
109
|
+
"reusableVariables": ["..."],
|
|
110
|
+
"styleLayers": ["..."],
|
|
111
|
+
"beatCompression": { "targetDurationSeconds": 15, "maxBeats": 5, "dialogueWordBudget": 35, "notes": ["..."] },
|
|
112
|
+
"technicalNotes": ["..."],
|
|
113
|
+
"dialogueNotes": ["..."]
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
Rules:
|
|
117
|
+
- Keep beats short and reusable.
|
|
118
|
+
- Prefer 3-6 beats.
|
|
119
|
+
- Capture the reusable mechanism, not copied claims or brand-specific language.
|
|
120
|
+
- Include style layers for casting, setting, framing, lighting, pacing, and edit rhythm when visible.
|
|
121
|
+
- Compress long references into a 15-second default unless the source duration clearly demands otherwise.
|
|
122
|
+
- "keep", "change", and "reusableVariables" should be concise production notes.
|
|
123
|
+
- Do not wrap the JSON in markdown fences.`;
|
|
124
|
+
/**
|
|
125
|
+
* True only for an existing, regular file. A directory path (which `existsSync`
|
|
126
|
+
* alone would wave through to ffmpeg) returns false, as do missing paths and
|
|
127
|
+
* unstattable sources, so only real files take the frame-ingest path.
|
|
128
|
+
*/
|
|
129
|
+
function isReadableFile(source) {
|
|
130
|
+
try {
|
|
131
|
+
return statSync(source).isFile();
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function parseGeminiTextResponse(payload) {
|
|
138
|
+
const candidates = payload.candidates;
|
|
139
|
+
const text = candidates?.[0]?.content?.parts
|
|
140
|
+
?.map((part) => part.text ?? '')
|
|
141
|
+
.join('\n')
|
|
142
|
+
.trim();
|
|
143
|
+
if (!text) {
|
|
144
|
+
throw new Error('Gemini analyze response did not contain text output.');
|
|
145
|
+
}
|
|
146
|
+
return text;
|
|
147
|
+
}
|
|
148
|
+
function parseAnalyzeJson(text) {
|
|
149
|
+
const cleaned = text.replace(/^```json\s*/i, '').replace(/^```\s*/i, '').replace(/\s*```$/i, '').trim();
|
|
150
|
+
let parsed;
|
|
151
|
+
try {
|
|
152
|
+
parsed = JSON.parse(cleaned);
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
throw new Error(`Gemini analyze response was not valid JSON. First 200 chars: ${cleaned.slice(0, 200)}`);
|
|
156
|
+
}
|
|
157
|
+
const beats = parsed.structure?.beats ?? [];
|
|
158
|
+
if (!Array.isArray(beats) || beats.length === 0) {
|
|
159
|
+
throw new Error('Gemini analyze response did not include structure.beats.');
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
pacing: {
|
|
163
|
+
label: parsed.pacing?.label ?? 'mixed',
|
|
164
|
+
notes: parsed.pacing?.notes ?? [],
|
|
165
|
+
},
|
|
166
|
+
structure: {
|
|
167
|
+
...(parsed.structure?.hook ? { hook: parsed.structure.hook } : {}),
|
|
168
|
+
beats,
|
|
169
|
+
...(parsed.structure?.ending ? { ending: parsed.structure.ending } : {}),
|
|
170
|
+
},
|
|
171
|
+
motionClassification: {
|
|
172
|
+
primaryMode: parsed.motionClassification?.primaryMode ?? 'unknown',
|
|
173
|
+
notes: parsed.motionClassification?.notes ?? [],
|
|
174
|
+
},
|
|
175
|
+
keep: parsed.keep ?? [],
|
|
176
|
+
change: parsed.change ?? [],
|
|
177
|
+
reusableVariables: parsed.reusableVariables ?? [],
|
|
178
|
+
...(Array.isArray(parsed.styleLayers) ? { styleLayers: parsed.styleLayers } : {}),
|
|
179
|
+
...(parsed.beatCompression ? { beatCompression: parsed.beatCompression } : {}),
|
|
180
|
+
...(Array.isArray(parsed.technicalNotes) ? { technicalNotes: parsed.technicalNotes } : {}),
|
|
181
|
+
...(Array.isArray(parsed.dialogueNotes) ? { dialogueNotes: parsed.dialogueNotes } : {}),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
export async function generateAnalyzeOutputWithGemini(input) {
|
|
185
|
+
const endpoint = input.endpoint ?? process.env.VCLAW_GEMINI_API_ENDPOINT ?? DEFAULT_GEMINI_ANALYZE_ENDPOINT;
|
|
186
|
+
// Only attempt frame ingestion when the source is a readable LOCAL FILE.
|
|
187
|
+
// Directories (a `statSync().isFile()` rules them out), URLs, and missing
|
|
188
|
+
// paths fall back to today's exact text-only behavior, and any extraction
|
|
189
|
+
// failure (ffmpeg missing, corrupt file) also falls back — analyze must never
|
|
190
|
+
// be worse than before.
|
|
191
|
+
let frames = [];
|
|
192
|
+
if (isReadableFile(input.source)) {
|
|
193
|
+
const extractFrames = input.extractFrames ?? extractAnalyzeFrames;
|
|
194
|
+
try {
|
|
195
|
+
frames = await extractFrames(input.source, input.durationSeconds);
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
process.stderr.write(`[analyze/gemini] frame extraction failed (${error.message}); falling back to text-only analysis\n`);
|
|
199
|
+
frames = [];
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
const baseText = `${ANALYZE_PROMPT}\n\nSource: ${input.source}\nTitle: ${input.title ?? 'Untitled reference'}\nDuration: ${input.durationSeconds ?? 'unknown'} seconds`;
|
|
203
|
+
const promptText = frames.length > 0
|
|
204
|
+
? `${baseText}\n\nThe attached ${frames.length} image(s) are frames sampled evenly across the whole reference video (start to end), in order. Base your analysis on what they actually show.`
|
|
205
|
+
: baseText;
|
|
206
|
+
const parts = [
|
|
207
|
+
...frames.map((data) => ({ inlineData: { mimeType: 'image/jpeg', data } })),
|
|
208
|
+
{ text: promptText },
|
|
209
|
+
];
|
|
210
|
+
const response = await fetchGeminiWithPool((key) => `${endpoint}${endpoint.includes('?') ? '&' : '?'}key=${encodeURIComponent(key)}`, {
|
|
211
|
+
method: 'POST',
|
|
212
|
+
headers: {
|
|
213
|
+
'Content-Type': 'application/json',
|
|
214
|
+
'Connection': 'close',
|
|
215
|
+
},
|
|
216
|
+
body: JSON.stringify({
|
|
217
|
+
contents: [{
|
|
218
|
+
parts,
|
|
219
|
+
}],
|
|
220
|
+
generationConfig: {
|
|
221
|
+
temperature: 0.2,
|
|
222
|
+
maxOutputTokens: 4096,
|
|
223
|
+
responseMimeType: 'application/json',
|
|
224
|
+
},
|
|
225
|
+
}),
|
|
226
|
+
}, {
|
|
227
|
+
fetcher: input.fetcher,
|
|
228
|
+
onRetry: (label, status) => {
|
|
229
|
+
process.stderr.write(`[analyze/gemini] ${label} returned HTTP ${status}; rotating key\n`);
|
|
230
|
+
},
|
|
231
|
+
});
|
|
232
|
+
if (!response.ok) {
|
|
233
|
+
const body = await response.text().catch(() => '');
|
|
234
|
+
throw new Error(`Gemini analyze request failed with HTTP ${response.status}: ${safeErrorBody(body)}`);
|
|
235
|
+
}
|
|
236
|
+
let payload;
|
|
237
|
+
try {
|
|
238
|
+
payload = await response.json();
|
|
239
|
+
}
|
|
240
|
+
catch {
|
|
241
|
+
throw new Error('Gemini analyze request returned a 2xx response with an unparseable JSON body.');
|
|
242
|
+
}
|
|
243
|
+
const text = parseGeminiTextResponse(payload);
|
|
244
|
+
const generated = parseAnalyzeJson(text);
|
|
245
|
+
return createAnalyzeOutput({
|
|
246
|
+
reference: {
|
|
247
|
+
source: input.source,
|
|
248
|
+
...(input.title ? { title: input.title } : {}),
|
|
249
|
+
...(input.durationSeconds !== undefined ? { durationSeconds: input.durationSeconds } : {}),
|
|
250
|
+
},
|
|
251
|
+
...generated,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
function multiShotImageMimeType(imagePath) {
|
|
255
|
+
switch (extname(imagePath).toLowerCase()) {
|
|
256
|
+
case '.jpg':
|
|
257
|
+
case '.jpeg':
|
|
258
|
+
return 'image/jpeg';
|
|
259
|
+
case '.webp':
|
|
260
|
+
return 'image/webp';
|
|
261
|
+
case '.png':
|
|
262
|
+
default:
|
|
263
|
+
return 'image/png';
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// Authors a multi-shot cinematic prompt body via Gemini, conditioned on the
|
|
267
|
+
// actual reference image bytes (sent as an inlineData part). Requires a
|
|
268
|
+
// configured Gemini key pool (fetchGeminiWithPool throws if the pool is empty).
|
|
269
|
+
// The stub path (VCLAW_MULTISHOT_AUTO_STUB) is handled upstream in
|
|
270
|
+
// generateMultiShotPromptText; this function is only called for the live path.
|
|
271
|
+
export async function generateMultiShotWithGemini(input) {
|
|
272
|
+
const endpoint = process.env.VCLAW_GEMINI_API_ENDPOINT ?? DEFAULT_GEMINI_ANALYZE_ENDPOINT;
|
|
273
|
+
const brief = [
|
|
274
|
+
`Preset: ${input.preset.name} (${input.preset.totalSeconds}s total, ${input.preset.minShotSeconds}-${input.preset.maxShotSeconds}s per shot, max ${input.preset.maxChars} chars)`,
|
|
275
|
+
`Style: ${input.preset.styleLine}`,
|
|
276
|
+
`Audio: ${input.preset.audioLine}`,
|
|
277
|
+
`Location: ${input.location}, ${input.timeOfDay}`,
|
|
278
|
+
...(input.character ? [`Character: ${input.character}`] : []),
|
|
279
|
+
...(input.action ? [`Action: ${input.action}`] : []),
|
|
280
|
+
...(input.repairInstructions ? [`Repair required: ${input.repairInstructions}`] : []),
|
|
281
|
+
].join('\n');
|
|
282
|
+
const promptText = `You are a cinematographer authoring a compressed timecoded multi-shot prompt for an AI video generator, conditioned on the attached reference image.\n\nRules:\n- From the reference image, extract a compact 60-120 character visual description of the subject (hair, facial hair, skin tone, build, clothing, accessories, overall vibe) and weave those identifying details across the shots where they are visible (clothing in wider shots, face in close-ups); do not front-load them in one block\n- Use timecodes in [MM:SS - MM:SS] format, contiguous from 00:00 to ${String(Math.floor(input.preset.totalSeconds / 60)).padStart(2, '0')}:${String(input.preset.totalSeconds % 60).padStart(2, '0')}\n- Each shot: ${input.preset.minShotSeconds}-${input.preset.maxShotSeconds}s; vary shot size, lens, angle, movement shot-to-shot (never repeat consecutively)\n- End with three metadata lines: Location, Style, Audio\n- Total prompt under ${input.preset.maxChars} characters\n- Return ONLY the prompt body, no explanation\n\nBrief:\n${brief}`;
|
|
283
|
+
// Read the real image bytes; on the live path a missing/unreadable file
|
|
284
|
+
// surfaces as a propagated error.
|
|
285
|
+
const imageBytes = await readFile(input.imagePath);
|
|
286
|
+
const imageData = imageBytes.toString('base64');
|
|
287
|
+
const mimeType = multiShotImageMimeType(input.imagePath);
|
|
288
|
+
const response = await fetchGeminiWithPool((key) => `${endpoint}${endpoint.includes('?') ? '&' : '?'}key=${encodeURIComponent(key)}`, {
|
|
289
|
+
method: 'POST',
|
|
290
|
+
headers: { 'Content-Type': 'application/json', 'Connection': 'close' },
|
|
291
|
+
body: JSON.stringify({
|
|
292
|
+
contents: [{
|
|
293
|
+
parts: [
|
|
294
|
+
{ inlineData: { mimeType, data: imageData } },
|
|
295
|
+
{ text: promptText },
|
|
296
|
+
],
|
|
297
|
+
}],
|
|
298
|
+
generationConfig: {
|
|
299
|
+
temperature: 0.7,
|
|
300
|
+
maxOutputTokens: 800,
|
|
301
|
+
responseMimeType: 'text/plain',
|
|
302
|
+
},
|
|
303
|
+
}),
|
|
304
|
+
}, {
|
|
305
|
+
...(input.fetcher ? { fetcher: input.fetcher } : {}),
|
|
306
|
+
onRetry: (label, status) => {
|
|
307
|
+
process.stderr.write(`[multi-shot/gemini] ${label} returned HTTP ${status}; rotating key\n`);
|
|
308
|
+
},
|
|
309
|
+
});
|
|
310
|
+
if (!response.ok) {
|
|
311
|
+
const body = await response.text().catch(() => '');
|
|
312
|
+
throw new Error(`Gemini multi-shot request failed with HTTP ${response.status}: ${safeErrorBody(body)}`);
|
|
313
|
+
}
|
|
314
|
+
let payload;
|
|
315
|
+
try {
|
|
316
|
+
payload = await response.json();
|
|
317
|
+
}
|
|
318
|
+
catch {
|
|
319
|
+
throw new Error('Gemini multi-shot request returned a 2xx response with an unparseable JSON body.');
|
|
320
|
+
}
|
|
321
|
+
return parseGeminiTextResponse(payload).trim();
|
|
322
|
+
}
|
|
323
|
+
//# sourceMappingURL=gemini-analyze.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-analyze.js","sourceRoot":"","sources":["../../src/video/gemini-analyze.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAc,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAA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E,SAAS,EAAE,EAAE;wBAC7C,EAAE,IAAI,EAAE,UAAU,EAAE;qBACrB;iBACF,CAAC;YACF,gBAAgB,EAAE;gBAChB,WAAW,EAAE,GAAG;gBAChB,eAAe,EAAE,GAAG;gBACpB,gBAAgB,EAAE,YAAY;aAC/B;SACF,CAAC;KACH,EACD;QACE,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACzB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,KAAK,kBAAkB,MAAM,kBAAkB,CAAC,CAAC;QAC/F,CAAC;KACF,CACF,CAAC;IAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;QACnD,MAAM,IAAI,KAAK,CAAC,8CAA8C,QAAQ,CAAC,MAAM,KAAK,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED,IAAI,OAAgB,CAAC;IACrB,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;IACtG,CAAC;IACD,OAAO,uBAAuB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface AugmentPromptWithContinuityInput {
|
|
2
|
+
/** The next scene's prompt to augment. Returned unchanged when nothing applies. */
|
|
3
|
+
nextPrompt: string;
|
|
4
|
+
/**
|
|
5
|
+
* Path to the previous scene's already-rendered keyframe IMAGE. Only used for
|
|
6
|
+
* the Gemini path, and only when it exists on disk and has an image extension.
|
|
7
|
+
*/
|
|
8
|
+
priorReferenceImagePath?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Deterministic continuity descriptors (e.g. story-bible cast/setting/prop
|
|
11
|
+
* lines). Used as the Gemini fallback source and when no image is available.
|
|
12
|
+
*/
|
|
13
|
+
priorDescriptors?: string[];
|
|
14
|
+
/** Injected fetch (tests). Defaults to global fetch via the key pool. */
|
|
15
|
+
fetcher?: typeof fetch;
|
|
16
|
+
/** Env used to resolve the Gemini key. Defaults to process.env. */
|
|
17
|
+
env?: NodeJS.ProcessEnv;
|
|
18
|
+
}
|
|
19
|
+
export interface AugmentPromptWithContinuityResult {
|
|
20
|
+
prompt: string;
|
|
21
|
+
applied: boolean;
|
|
22
|
+
source: 'gemini' | 'deterministic' | 'none';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Opt-in continuity loop: enriches `nextPrompt` with a concise continuity cue
|
|
26
|
+
* derived from the prior scene's rendered keyframe.
|
|
27
|
+
*
|
|
28
|
+
* - Gemini path: when a key is configured AND `priorReferenceImagePath` exists
|
|
29
|
+
* on disk as an image, one structured Gemini call extracts comma-separated
|
|
30
|
+
* style/lighting/subject/setting cues and a `Continuity: <cues>` clause is
|
|
31
|
+
* prepended. source: 'gemini'.
|
|
32
|
+
* - Deterministic path: otherwise, when `priorDescriptors` are supplied, a
|
|
33
|
+
* `Continuity: <descriptors>` clause is prepended. source: 'deterministic'.
|
|
34
|
+
* - Otherwise the prompt is returned unchanged. source: 'none'.
|
|
35
|
+
*
|
|
36
|
+
* NEVER throws on a Gemini failure / network error / parse error: it falls back
|
|
37
|
+
* to the deterministic path (if descriptors exist) or to 'none'.
|
|
38
|
+
*/
|
|
39
|
+
export declare function augmentPromptWithContinuity(input: AugmentPromptWithContinuityInput): Promise<AugmentPromptWithContinuityResult>;
|
|
40
|
+
//# sourceMappingURL=gemini-continuity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-continuity.d.ts","sourceRoot":"","sources":["../../src/video/gemini-continuity.ts"],"names":[],"mappings":"AA4EA,MAAM,WAAW,gCAAgC;IAC/C,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IACvB,mEAAmE;IACnE,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,QAAQ,GAAG,eAAe,GAAG,MAAM,CAAC;CAC7C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,gCAAgC,GACtC,OAAO,CAAC,iCAAiC,CAAC,CAmE5C"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { extname } from 'node:path';
|
|
4
|
+
import { fetchGeminiWithPool } from './gemini-key-pool.js';
|
|
5
|
+
const DEFAULT_GEMINI_ENDPOINT = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent';
|
|
6
|
+
const IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.webp']);
|
|
7
|
+
const CONTINUITY_PROMPT = `You extract a compact continuity cue from a reference still so the NEXT shot of the same sequence stays visually consistent.
|
|
8
|
+
Return ONLY a single comma-separated list (no JSON, no markdown, no prose) of the dominant visual style, lighting, primary subject, and setting. Keep it under 25 words.`;
|
|
9
|
+
function imageMimeType(imagePath) {
|
|
10
|
+
switch (extname(imagePath).toLowerCase()) {
|
|
11
|
+
case '.jpg':
|
|
12
|
+
case '.jpeg':
|
|
13
|
+
return 'image/jpeg';
|
|
14
|
+
case '.webp':
|
|
15
|
+
return 'image/webp';
|
|
16
|
+
case '.png':
|
|
17
|
+
default:
|
|
18
|
+
return 'image/png';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Resolve a single Gemini API key from the supplied env WITHOUT mutating
|
|
23
|
+
* process.env or touching the global round-robin pool. Mirrors the pool's
|
|
24
|
+
* source precedence (`GEMINI_API_KEYS` → `GOOGLE_API_KEYS` → `GOOGLE_API_KEY`)
|
|
25
|
+
* and returns the first usable key. Undefined when no key is configured.
|
|
26
|
+
*/
|
|
27
|
+
function resolveKeyFromEnv(env) {
|
|
28
|
+
for (const source of [env.GEMINI_API_KEYS, env.GOOGLE_API_KEYS, env.GOOGLE_API_KEY]) {
|
|
29
|
+
if (typeof source !== 'string')
|
|
30
|
+
continue;
|
|
31
|
+
for (const raw of source.split(/[,;\n\s]+/)) {
|
|
32
|
+
const key = raw.trim();
|
|
33
|
+
if (key)
|
|
34
|
+
return key;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Defensive parse of a Gemini text response — mirrors `parseGeminiTextResponse`
|
|
41
|
+
* in gemini-analyze.ts but NEVER throws: returns undefined when no usable text
|
|
42
|
+
* is present so callers can fall back gracefully.
|
|
43
|
+
*/
|
|
44
|
+
function parseGeminiText(payload) {
|
|
45
|
+
const candidates = payload
|
|
46
|
+
.candidates;
|
|
47
|
+
const text = candidates?.[0]?.content?.parts
|
|
48
|
+
?.map((part) => part.text ?? '')
|
|
49
|
+
.join('\n')
|
|
50
|
+
.trim();
|
|
51
|
+
return text ? text : undefined;
|
|
52
|
+
}
|
|
53
|
+
/** Collapse a raw cue string into a single compact clause (no newlines). */
|
|
54
|
+
function tidyCues(raw) {
|
|
55
|
+
return raw
|
|
56
|
+
.replace(/^```[a-z]*\s*/i, '')
|
|
57
|
+
.replace(/\s*```$/i, '')
|
|
58
|
+
.replace(/\s*\n+\s*/g, ', ')
|
|
59
|
+
.replace(/\s{2,}/g, ' ')
|
|
60
|
+
.replace(/(,\s*)+/g, ', ')
|
|
61
|
+
.replace(/^[,\s]+|[,\s]+$/g, '')
|
|
62
|
+
.trim();
|
|
63
|
+
}
|
|
64
|
+
function prependContinuityClause(prompt, cues) {
|
|
65
|
+
const clause = `Continuity: ${cues}.`;
|
|
66
|
+
const trimmed = prompt.trim();
|
|
67
|
+
return trimmed ? `${clause}\n\n${trimmed}` : clause;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Opt-in continuity loop: enriches `nextPrompt` with a concise continuity cue
|
|
71
|
+
* derived from the prior scene's rendered keyframe.
|
|
72
|
+
*
|
|
73
|
+
* - Gemini path: when a key is configured AND `priorReferenceImagePath` exists
|
|
74
|
+
* on disk as an image, one structured Gemini call extracts comma-separated
|
|
75
|
+
* style/lighting/subject/setting cues and a `Continuity: <cues>` clause is
|
|
76
|
+
* prepended. source: 'gemini'.
|
|
77
|
+
* - Deterministic path: otherwise, when `priorDescriptors` are supplied, a
|
|
78
|
+
* `Continuity: <descriptors>` clause is prepended. source: 'deterministic'.
|
|
79
|
+
* - Otherwise the prompt is returned unchanged. source: 'none'.
|
|
80
|
+
*
|
|
81
|
+
* NEVER throws on a Gemini failure / network error / parse error: it falls back
|
|
82
|
+
* to the deterministic path (if descriptors exist) or to 'none'.
|
|
83
|
+
*/
|
|
84
|
+
export async function augmentPromptWithContinuity(input) {
|
|
85
|
+
const env = input.env ?? process.env;
|
|
86
|
+
const descriptors = (input.priorDescriptors ?? [])
|
|
87
|
+
.map((value) => value.trim())
|
|
88
|
+
.filter(Boolean);
|
|
89
|
+
const deterministicFallback = () => {
|
|
90
|
+
if (descriptors.length === 0) {
|
|
91
|
+
return { prompt: input.nextPrompt, applied: false, source: 'none' };
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
prompt: prependContinuityClause(input.nextPrompt, descriptors.join('; ')),
|
|
95
|
+
applied: true,
|
|
96
|
+
source: 'deterministic',
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
const key = resolveKeyFromEnv(env);
|
|
100
|
+
const imagePath = input.priorReferenceImagePath;
|
|
101
|
+
const imageUsable = typeof imagePath === 'string' &&
|
|
102
|
+
imagePath.trim() !== '' &&
|
|
103
|
+
IMAGE_EXTS.has(extname(imagePath).toLowerCase()) &&
|
|
104
|
+
existsSync(imagePath);
|
|
105
|
+
if (!key || !imageUsable) {
|
|
106
|
+
return deterministicFallback();
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
const imageBytes = await readFile(imagePath);
|
|
110
|
+
const endpoint = env.VCLAW_GEMINI_API_ENDPOINT ?? DEFAULT_GEMINI_ENDPOINT;
|
|
111
|
+
const response = await fetchGeminiWithPool((k) => `${endpoint}${endpoint.includes('?') ? '&' : '?'}key=${encodeURIComponent(k)}`, {
|
|
112
|
+
method: 'POST',
|
|
113
|
+
headers: { 'Content-Type': 'application/json', 'Connection': 'close' },
|
|
114
|
+
body: JSON.stringify({
|
|
115
|
+
contents: [{
|
|
116
|
+
parts: [
|
|
117
|
+
{ inlineData: { mimeType: imageMimeType(imagePath), data: imageBytes.toString('base64') } },
|
|
118
|
+
{ text: CONTINUITY_PROMPT },
|
|
119
|
+
],
|
|
120
|
+
}],
|
|
121
|
+
generationConfig: {
|
|
122
|
+
temperature: 0.2,
|
|
123
|
+
maxOutputTokens: 120,
|
|
124
|
+
responseMimeType: 'text/plain',
|
|
125
|
+
},
|
|
126
|
+
}),
|
|
127
|
+
}, { fetcher: input.fetcher, keyOverride: key, maxAttempts: 1 });
|
|
128
|
+
if (!response.ok)
|
|
129
|
+
return deterministicFallback();
|
|
130
|
+
const payload = await response.json().catch(() => undefined);
|
|
131
|
+
const text = parseGeminiText(payload);
|
|
132
|
+
const cues = text ? tidyCues(text) : '';
|
|
133
|
+
if (!cues)
|
|
134
|
+
return deterministicFallback();
|
|
135
|
+
return {
|
|
136
|
+
prompt: prependContinuityClause(input.nextPrompt, cues),
|
|
137
|
+
applied: true,
|
|
138
|
+
source: 'gemini',
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
return deterministicFallback();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=gemini-continuity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-continuity.js","sourceRoot":"","sources":["../../src/video/gemini-continuity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,uBAAuB,GAC3B,0FAA0F,CAAC;AAE7F,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAE/D,MAAM,iBAAiB,GAAG;yKAC+I,CAAC;AAE1K,SAAS,aAAa,CAAC,SAAiB;IACtC,QAAQ,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;QACzC,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACV,OAAO,YAAY,CAAC;QACtB,KAAK,OAAO;YACV,OAAO,YAAY,CAAC;QACtB,KAAK,MAAM,CAAC;QACZ;YACE,OAAO,WAAW,CAAC;IACvB,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,GAAsB;IAC/C,KAAK,MAAM,MAAM,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;Q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AI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACxC,IAAI,CAAC,IAAI;YAAE,OAAO,qBAAqB,EAAE,CAAC;QAC1C,OAAO;YACL,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC;YACvD,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,QAAQ;SACjB,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,qBAAqB,EAAE,CAAC;IACjC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface JudgeCandidate {
|
|
2
|
+
id: string;
|
|
3
|
+
prompt?: string;
|
|
4
|
+
imagePath?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface JudgeSceneInput {
|
|
7
|
+
sceneIndex: number;
|
|
8
|
+
intendedPrompt?: string;
|
|
9
|
+
candidates: JudgeCandidate[];
|
|
10
|
+
}
|
|
11
|
+
export interface JudgeResult {
|
|
12
|
+
sceneIndex: number;
|
|
13
|
+
bestCandidateId: string;
|
|
14
|
+
reasoning: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* LLM-as-judge auto-select. For each scene, asks Gemini to pick the best
|
|
18
|
+
* candidate, conditioned on the intended prompt, each candidate's image (when
|
|
19
|
+
* available on disk), and any shared reference images.
|
|
20
|
+
*
|
|
21
|
+
* Defensive by design: a scene whose response can't be parsed, returns an
|
|
22
|
+
* unknown candidate id, or errors at the network layer is OMITTED from the
|
|
23
|
+
* result (never throws the whole batch) — the caller treats omitted scenes as
|
|
24
|
+
* "leave to human". The network is only ever touched through the injected
|
|
25
|
+
* `fetcher` (via fetchGeminiWithPool), so this is unit-testable without keys.
|
|
26
|
+
*/
|
|
27
|
+
export declare function judgeBestCandidates(input: {
|
|
28
|
+
scenes: JudgeSceneInput[];
|
|
29
|
+
referenceImagePaths?: string[];
|
|
30
|
+
endpoint?: string;
|
|
31
|
+
fetcher?: typeof fetch;
|
|
32
|
+
}): Promise<JudgeResult[]>;
|
|
33
|
+
//# sourceMappingURL=gemini-judge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-judge.d.ts","sourceRoot":"","sources":["../../src/video/gemini-judge.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAmPD;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAC/C,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;CACxB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAiBzB"}
|