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,975 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { mkdir, readFile } from 'node:fs/promises';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { spawn } from 'node:child_process';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { artifactPathFor } from './artifact-store.js';
|
|
7
|
+
import { readSceneCandidatesArtifact } from './scene-candidate-store.js';
|
|
8
|
+
import { readSceneSelectionArtifact } from './scene-selection-store.js';
|
|
9
|
+
import { readSeedanceAssets } from './seedance-asset-library.js';
|
|
10
|
+
import { readFlowCharacters } from './flow-character-library.js';
|
|
11
|
+
import { assertReferenceBudget } from './native-seedance.js';
|
|
12
|
+
import { assertRouteRequestValid, isOmniFirstFrameEnabled } from './provider-platform/route-capabilities.js';
|
|
13
|
+
import { resolveProjectWorkspace } from './workspace.js';
|
|
14
|
+
import { augmentPromptWithContinuity } from './gemini-continuity.js';
|
|
15
|
+
import { repasteContinuityDescriptors, resolveAssetTags } from './prompt-rules.js';
|
|
16
|
+
import {
|
|
17
|
+
extractFlowMarkers,
|
|
18
|
+
injectFlowCharacterMarkers,
|
|
19
|
+
planFlowCharacterSlots,
|
|
20
|
+
stripFlowMarkers,
|
|
21
|
+
type FlowCharacterSlotPlan,
|
|
22
|
+
} from './flow-markers.js';
|
|
23
|
+
import { buildAssetTagLookup } from './asset-tag-lookup.js';
|
|
24
|
+
import { listCharacterProfiles } from './characters.js';
|
|
25
|
+
import { readEnvironmentAssets } from './environment-assets.js';
|
|
26
|
+
import { readVoiceClones } from './voice-clone.js';
|
|
27
|
+
import {
|
|
28
|
+
hostChainSeedAsImage,
|
|
29
|
+
defaultChainSeedHostDeps,
|
|
30
|
+
type ChainSeedHostDeps,
|
|
31
|
+
} from './seedance-chain-host.js';
|
|
32
|
+
import type { StoryBibleArtifact } from './story-bible.js';
|
|
33
|
+
import type { FilmmakingPromptsArtifact, FilmmakingSeedancePacket } from './filmmaking-prompts.js';
|
|
34
|
+
import type { ProviderRouteId } from './provider-platform/types.js';
|
|
35
|
+
import type {
|
|
36
|
+
VideoExecutionCancelResult,
|
|
37
|
+
VideoExecutionPayload,
|
|
38
|
+
VideoExecutionPlan,
|
|
39
|
+
VideoExecutionPollResult,
|
|
40
|
+
VideoExecutionTask,
|
|
41
|
+
} from './types.js';
|
|
42
|
+
|
|
43
|
+
function adapterEnvVarForRoute(routeId: ProviderRouteId): string {
|
|
44
|
+
switch (routeId) {
|
|
45
|
+
case 'veo-useapi':
|
|
46
|
+
return 'VCLAW_VEO_USEAPI_ADAPTER';
|
|
47
|
+
case 'seedance-direct':
|
|
48
|
+
return 'VCLAW_SEEDANCE_DIRECT_ADAPTER';
|
|
49
|
+
case 'runway-useapi':
|
|
50
|
+
return 'VCLAW_RUNWAY_USEAPI_ADAPTER';
|
|
51
|
+
case 'dreamina-useapi':
|
|
52
|
+
return 'VCLAW_DREAMINA_USEAPI_ADAPTER';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function builtinAdapterCommandForRoute(routeId: ProviderRouteId): string | null {
|
|
57
|
+
if (!(routeId === 'seedance-direct' || routeId === 'veo-useapi' || routeId === 'runway-useapi' || routeId === 'dreamina-useapi')) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const scriptPath = fileURLToPath(new URL('../cli/provider-adapter.js', import.meta.url));
|
|
61
|
+
return `${JSON.stringify(process.execPath)} ${JSON.stringify(scriptPath)} --route ${routeId}`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function resolveAdapterCommand(routeId: ProviderRouteId, env: NodeJS.ProcessEnv): string {
|
|
65
|
+
const override = env[adapterEnvVarForRoute(routeId)];
|
|
66
|
+
if (override && override.trim()) {
|
|
67
|
+
return override;
|
|
68
|
+
}
|
|
69
|
+
const builtin = builtinAdapterCommandForRoute(routeId);
|
|
70
|
+
if (builtin) {
|
|
71
|
+
return builtin;
|
|
72
|
+
}
|
|
73
|
+
throw new Error(`Live execution for ${routeId} requires ${adapterEnvVarForRoute(routeId)} to point at an adapter command.`);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function unique(values: string[]): string[] {
|
|
77
|
+
return [...new Set(values.map((value) => value.trim()).filter(Boolean))];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Assemble a scene's reference set, merging continuity + identity instead of
|
|
82
|
+
* choosing one. A chain-from-prev keyframe video (when present) leads so
|
|
83
|
+
* downstream adapters treat it as the primary seed; character Asset:// identity
|
|
84
|
+
* refs follow. Only the "assets + chain" case differs from legacy behavior —
|
|
85
|
+
* the other three branches are byte-identical to the prior either/or.
|
|
86
|
+
*
|
|
87
|
+
* Routing note: on seedance-direct, classifyReferencePaths sends Asset:// to
|
|
88
|
+
* reference_images and the .mp4 keyframe to reference_videos, so the merged
|
|
89
|
+
* array lands in the correct provider slots within the ≤9 img / ≤3 vid budget.
|
|
90
|
+
*/
|
|
91
|
+
export function resolveSceneReferencePaths(input: {
|
|
92
|
+
resolvedAssetUris: string[];
|
|
93
|
+
chainSeedPath: string | null;
|
|
94
|
+
packetOrBaseReferencePaths: string[];
|
|
95
|
+
/**
|
|
96
|
+
* Always-appended references (e.g. a voice-clone video). Unlike image identity
|
|
97
|
+
* URIs, these do NOT replace the base/packet refs — a voice clip is additive, so
|
|
98
|
+
* a scene keeps its identity image (in packetOrBaseReferencePaths on Runway, or
|
|
99
|
+
* the Asset:// URI on seedance) AND gains the voice. Default [] -> byte-identical.
|
|
100
|
+
*/
|
|
101
|
+
additionalReferencePaths?: string[];
|
|
102
|
+
}): string[] {
|
|
103
|
+
const { resolvedAssetUris, chainSeedPath, packetOrBaseReferencePaths, additionalReferencePaths = [] } = input;
|
|
104
|
+
// The image-identity "winner" set (Asset:// URIs / @tag image refs) replaces the
|
|
105
|
+
// base/packet refs as before; voice clips are appended on top of whichever wins.
|
|
106
|
+
const base = resolvedAssetUris.length > 0
|
|
107
|
+
? (chainSeedPath ? [chainSeedPath, ...resolvedAssetUris] : resolvedAssetUris)
|
|
108
|
+
: (chainSeedPath ? [chainSeedPath, ...packetOrBaseReferencePaths] : packetOrBaseReferencePaths);
|
|
109
|
+
return unique([...base, ...additionalReferencePaths]);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const REFERENCE_VIDEO_EXTS = new Set(['.mp4', '.mov', '.webm', '.avi', '.mkv']);
|
|
113
|
+
const REFERENCE_AUDIO_EXTS = new Set(['.mp3', '.wav', '.m4a', '.aac', '.flac', '.ogg']);
|
|
114
|
+
|
|
115
|
+
// Routes that consume a blank-video-with-audio voice clone as a video reference to
|
|
116
|
+
// lock a cloned voice (the black-frame video carries the voice; a raw MP3 does NOT
|
|
117
|
+
// lock it as reliably — that is the whole point of the trick):
|
|
118
|
+
// • seedance-direct — the .mp4 rides into `reference_videos`
|
|
119
|
+
// • runway-useapi — Seedance-2 via the UseAPI gateway → `videoAssetId` + audio:true
|
|
120
|
+
// • dreamina-useapi — Seedance-2 via Dreamina Omni Reference → `omni_N_videoRef`
|
|
121
|
+
// (the omni video ref is EXPECTED to drive the voice on its own; unverified
|
|
122
|
+
// live — if a render is mute, VCLAW_DREAMINA_AUDIO=1 forces `audio:true`)
|
|
123
|
+
// Other routes leave voice clones un-injected (byte-identical).
|
|
124
|
+
const VOICE_REF_ROUTES = new Set<ProviderRouteId>(['seedance-direct', 'runway-useapi', 'dreamina-useapi']);
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Classifies a scene's reference paths into image/video/audio counts using the
|
|
128
|
+
* same extension buckets the native transports use. Anything that is not a
|
|
129
|
+
* recognized video/audio file (including `Asset://` URIs, which the Seedance
|
|
130
|
+
* transport routes into `reference_images`) is counted as an image reference.
|
|
131
|
+
*/
|
|
132
|
+
function countReferencesByKind(referencePaths: string[]): { images: number; videos: number; audios: number } {
|
|
133
|
+
let images = 0;
|
|
134
|
+
let videos = 0;
|
|
135
|
+
let audios = 0;
|
|
136
|
+
for (const path of referencePaths) {
|
|
137
|
+
if (!path) continue;
|
|
138
|
+
const ext = (path.split('?')[0]?.match(/\.[^.\\/]+$/)?.[0] ?? '').toLowerCase();
|
|
139
|
+
if (REFERENCE_VIDEO_EXTS.has(ext)) videos += 1;
|
|
140
|
+
else if (REFERENCE_AUDIO_EXTS.has(ext)) audios += 1;
|
|
141
|
+
else images += 1;
|
|
142
|
+
}
|
|
143
|
+
return { images, videos, audios };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface BuildExecutionPayloadOptions {
|
|
147
|
+
/**
|
|
148
|
+
* Restricts the payload to these scene indices. When omitted, all storyboard
|
|
149
|
+
* scenes are included (legacy behavior). When provided, scenes not in the
|
|
150
|
+
* list are dropped.
|
|
151
|
+
*/
|
|
152
|
+
sceneIndices?: number[];
|
|
153
|
+
/**
|
|
154
|
+
* When true, resolves `chainFromPrev` seeds from the previous scene's
|
|
155
|
+
* selected candidate. Only honored in candidate mode.
|
|
156
|
+
*/
|
|
157
|
+
resolveChainSeeds?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Environment used for the pre-submission route-capability check (reads the
|
|
160
|
+
* `VCLAW_ALLOW_UNSAFE_MODELS` escape hatch). Defaults to `process.env`.
|
|
161
|
+
*/
|
|
162
|
+
env?: NodeJS.ProcessEnv;
|
|
163
|
+
/**
|
|
164
|
+
* Opt-in PHASE-3 continuity loop. When true, for each task that has a
|
|
165
|
+
* chain-from-prev seed we enrich `task.prompt` with a continuity cue derived
|
|
166
|
+
* from the prior scene's rendered keyframe (Gemini when a key + an image seed
|
|
167
|
+
* are available, else deterministic story-bible descriptors), and re-paste
|
|
168
|
+
* the full cast/setting/prop descriptor block (StoryCraft anti-drift).
|
|
169
|
+
*
|
|
170
|
+
* When false/absent the payload is BYTE-IDENTICAL to today: no Gemini call,
|
|
171
|
+
* no prompt mutation. Honored only when `resolveChainSeeds` produced seeds.
|
|
172
|
+
*/
|
|
173
|
+
continuityFeedback?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Injected fetch for the continuity Gemini call (tests). Defaults to global
|
|
176
|
+
* fetch via the key pool. Only used when `continuityFeedback` is true.
|
|
177
|
+
*/
|
|
178
|
+
continuityFetcher?: typeof fetch;
|
|
179
|
+
/**
|
|
180
|
+
* Injected I/O for hosting an auto-chain seed on the seedance-direct route
|
|
181
|
+
* (ffmpeg last-frame extraction + Go Bananas upload). Tests pass fakes; in
|
|
182
|
+
* production this defaults to `defaultChainSeedHostDeps(env)`. Only consulted
|
|
183
|
+
* when the route is seedance-direct AND a local-video chain seed was resolved.
|
|
184
|
+
*/
|
|
185
|
+
chainSeedHost?: ChainSeedHostDeps;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Error thrown when `resolveChainSeeds` is enabled and the upstream scene has
|
|
190
|
+
* no selected candidate (or no usable video output).
|
|
191
|
+
*/
|
|
192
|
+
export class ChainFromPrevSourceMissingError extends Error {
|
|
193
|
+
readonly code = 'chain-from-prev-source-missing';
|
|
194
|
+
readonly sceneIndex: number;
|
|
195
|
+
readonly sourceSceneIndex: number;
|
|
196
|
+
constructor(sceneIndex: number, sourceSceneIndex: number, reason: string) {
|
|
197
|
+
super(
|
|
198
|
+
`chain-from-prev-source-missing: scene ${sceneIndex} requested chain from scene ${sourceSceneIndex} but ${reason}`,
|
|
199
|
+
);
|
|
200
|
+
this.sceneIndex = sceneIndex;
|
|
201
|
+
this.sourceSceneIndex = sourceSceneIndex;
|
|
202
|
+
this.name = 'ChainFromPrevSourceMissingError';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export async function buildExecutionPayload(
|
|
207
|
+
projectSlug: string,
|
|
208
|
+
plan: VideoExecutionPlan,
|
|
209
|
+
root = process.cwd(),
|
|
210
|
+
options: BuildExecutionPayloadOptions = {},
|
|
211
|
+
): Promise<VideoExecutionPayload> {
|
|
212
|
+
if (!plan.recommendedRouteId) {
|
|
213
|
+
throw new Error(`Cannot build execution payload for ${projectSlug}: recommendedRouteId missing.`);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const workspace = resolveProjectWorkspace(projectSlug, root);
|
|
217
|
+
const storyboard = JSON.parse(await readFile(artifactPathFor(workspace, 'storyboard'), 'utf-8')) as {
|
|
218
|
+
scenes?: Array<{
|
|
219
|
+
sceneIndex?: number;
|
|
220
|
+
description?: string;
|
|
221
|
+
scenePrompt?: {
|
|
222
|
+
animationPrompt?: string;
|
|
223
|
+
};
|
|
224
|
+
characters?: string[];
|
|
225
|
+
durationSeconds?: number;
|
|
226
|
+
voicePreset?: string;
|
|
227
|
+
referenceVideoMediaId?: string;
|
|
228
|
+
firstFrame?: boolean;
|
|
229
|
+
}>;
|
|
230
|
+
};
|
|
231
|
+
const assetManifest = existsSync(artifactPathFor(workspace, 'asset-manifest'))
|
|
232
|
+
? JSON.parse(await readFile(artifactPathFor(workspace, 'asset-manifest'), 'utf-8')) as {
|
|
233
|
+
assets?: Array<{ id?: string; kind?: string; path?: string; sceneIndex?: number; backend?: string }>;
|
|
234
|
+
}
|
|
235
|
+
: { assets: [] };
|
|
236
|
+
const filmmakingPrompts = existsSync(artifactPathFor(workspace, 'filmmaking-prompts'))
|
|
237
|
+
? JSON.parse(await readFile(artifactPathFor(workspace, 'filmmaking-prompts'), 'utf-8')) as FilmmakingPromptsArtifact
|
|
238
|
+
: null;
|
|
239
|
+
const readyPromptPacketsByScene = new Map<number, FilmmakingSeedancePacket>();
|
|
240
|
+
for (const packet of filmmakingPrompts?.seedancePackets ?? []) {
|
|
241
|
+
if (isExecutionReadyPromptPacket(packet)) {
|
|
242
|
+
readyPromptPacketsByScene.set(packet.sceneIndex, packet);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const assetsByScene = new Map<number, Array<{ id?: string; kind?: string; path?: string; backend?: string }>>();
|
|
247
|
+
for (const asset of assetManifest.assets ?? []) {
|
|
248
|
+
if (!Number.isInteger(asset.sceneIndex)) continue;
|
|
249
|
+
const sceneAssets = assetsByScene.get(asset.sceneIndex as number) ?? [];
|
|
250
|
+
sceneAssets.push(asset);
|
|
251
|
+
assetsByScene.set(asset.sceneIndex as number, sceneAssets);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Chain-from-prev resolution is only considered when the caller opts in.
|
|
255
|
+
// Reads both selection + candidates so we can locate the upstream scene's
|
|
256
|
+
// selected candidate's video output.
|
|
257
|
+
const chainSeedsByScene = new Map<number, { path: string; sourceCandidateId: string }>();
|
|
258
|
+
if (options.resolveChainSeeds) {
|
|
259
|
+
const selection = await readSceneSelectionArtifact(root, projectSlug);
|
|
260
|
+
const candidates = await readSceneCandidatesArtifact(root, projectSlug);
|
|
261
|
+
const sceneList = (storyboard.scenes ?? []).map((s) => s.sceneIndex ?? 0);
|
|
262
|
+
const sceneIndexFilter = options.sceneIndices
|
|
263
|
+
? new Set(options.sceneIndices)
|
|
264
|
+
: new Set(sceneList);
|
|
265
|
+
|
|
266
|
+
for (const sel of selection.scenes) {
|
|
267
|
+
if (!sel.chainFromPrev) continue;
|
|
268
|
+
if (!sceneIndexFilter.has(sel.sceneIndex)) continue;
|
|
269
|
+
// Explicit chain source (auto-chain fallback ladder) wins; absent → the
|
|
270
|
+
// immediately previous scene (legacy behavior).
|
|
271
|
+
const sourceSceneIndex = sel.chainFromSceneIndex ?? sel.sceneIndex - 1;
|
|
272
|
+
const upstreamSelection = selection.scenes.find((s) => s.sceneIndex === sourceSceneIndex);
|
|
273
|
+
if (!upstreamSelection || !upstreamSelection.selectedCandidateId) {
|
|
274
|
+
throw new ChainFromPrevSourceMissingError(
|
|
275
|
+
sel.sceneIndex,
|
|
276
|
+
sourceSceneIndex,
|
|
277
|
+
upstreamSelection ? 'upstream scene has no selected candidate' : 'upstream scene has no selection entry',
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
const upstreamEntry = candidates.scenes.find((s) => s.sceneIndex === sourceSceneIndex);
|
|
281
|
+
const upstreamCandidate = upstreamEntry?.candidates.find(
|
|
282
|
+
(c) => c.id === upstreamSelection.selectedCandidateId,
|
|
283
|
+
);
|
|
284
|
+
if (!upstreamCandidate) {
|
|
285
|
+
throw new ChainFromPrevSourceMissingError(
|
|
286
|
+
sel.sceneIndex,
|
|
287
|
+
sourceSceneIndex,
|
|
288
|
+
`candidate ${upstreamSelection.selectedCandidateId} missing from candidates artifact`,
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
const firstVideo = upstreamCandidate.outputs.find((o) => o.kind === 'video');
|
|
292
|
+
if (!firstVideo) {
|
|
293
|
+
throw new ChainFromPrevSourceMissingError(
|
|
294
|
+
sel.sceneIndex,
|
|
295
|
+
sourceSceneIndex,
|
|
296
|
+
`candidate ${upstreamSelection.selectedCandidateId} has no video output to chain from`,
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
chainSeedsByScene.set(sel.sceneIndex, {
|
|
300
|
+
path: firstVideo.path,
|
|
301
|
+
sourceCandidateId: upstreamCandidate.id,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// seedance-direct rejects local file references (a chain seed is the prior
|
|
306
|
+
// scene's downloaded `.mp4`), so host it: extract the last frame and upload
|
|
307
|
+
// it as an image, replacing the seed path with a hosted URL that seedance
|
|
308
|
+
// routes into `reference_images` (the keyframe). runway/dreamina upload
|
|
309
|
+
// local refs themselves, so this is gated to seedance-direct; non-local
|
|
310
|
+
// seeds (already a URL / Asset://) pass through `hostChainSeedAsImage`
|
|
311
|
+
// untouched. Off-route the map is byte-identical to today.
|
|
312
|
+
if (plan.recommendedRouteId === 'seedance-direct') {
|
|
313
|
+
const env = options.env ?? process.env;
|
|
314
|
+
const chainSeedHost = options.chainSeedHost ?? defaultChainSeedHostDeps(env);
|
|
315
|
+
const chainSeedWorkDir = join(workspace.projectDir, 'artifacts', 'chain-seeds');
|
|
316
|
+
for (const [sceneIndex, seed] of chainSeedsByScene) {
|
|
317
|
+
const hosted = await hostChainSeedAsImage(seed.path, chainSeedWorkDir, chainSeedHost);
|
|
318
|
+
if (hosted !== seed.path) {
|
|
319
|
+
chainSeedsByScene.set(sceneIndex, { ...seed, path: hosted });
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const sceneFilter = options.sceneIndices ? new Set(options.sceneIndices) : null;
|
|
326
|
+
|
|
327
|
+
// Seedance character/product identity is locked via managed Asset Library
|
|
328
|
+
// avatars (Asset:// URIs). When the project has registered them, each scene's
|
|
329
|
+
// cast names resolve to Asset:// URIs that become that scene's reference set.
|
|
330
|
+
// Absent artifact -> empty map -> behavior identical to today (no injection).
|
|
331
|
+
// Gated to the Seedance route so Veo/Runway payloads are untouched.
|
|
332
|
+
const assetUriByName = plan.recommendedRouteId === 'seedance-direct'
|
|
333
|
+
? (await readSeedanceAssets(workspace.root, projectSlug)).assetUriByName
|
|
334
|
+
: new Map<string, string>();
|
|
335
|
+
|
|
336
|
+
// Google Flow saved-character refs (flow-characters.json) → scene characters
|
|
337
|
+
// become `character_1..7` on the veo-useapi route. Absent artifact -> empty map
|
|
338
|
+
// -> no `--character` flags emitted (byte-identical to today). Gated to the
|
|
339
|
+
// veo-useapi route so Seedance/Runway/Dreamina payloads are untouched.
|
|
340
|
+
const characterRefByName = plan.recommendedRouteId === 'veo-useapi'
|
|
341
|
+
? (await readFlowCharacters(workspace.root, projectSlug)).characterRefByName
|
|
342
|
+
: new Map<string, string>();
|
|
343
|
+
|
|
344
|
+
// Voice clones (the blank-video-with-audio trick). The .mp4 voice clip becomes a
|
|
345
|
+
// video reference the transport routes into the provider's voice slot to lock the
|
|
346
|
+
// cloned voice — see VOICE_REF_ROUTES for the routes + their slots (seedance-direct
|
|
347
|
+
// reference_videos, runway-useapi videoAssetId, dreamina-useapi omni_N_videoRef).
|
|
348
|
+
// Other routes -> null -> byte-identical no-op; absent artifact -> empty -> no-op.
|
|
349
|
+
// • `@VoiceName` tags -> voiceEntryByName (explicit, resolved via assetTagLookup)
|
|
350
|
+
// • a character bound with `voice-clone --character <name>` -> voiceByCharacter,
|
|
351
|
+
// auto-injected into every scene that features that character (no tag needed).
|
|
352
|
+
const voiceClones = VOICE_REF_ROUTES.has(plan.recommendedRouteId)
|
|
353
|
+
? await readVoiceClones(workspace.root, projectSlug)
|
|
354
|
+
: null;
|
|
355
|
+
const voicesByName = voiceClones?.voiceEntryByName ?? new Map();
|
|
356
|
+
|
|
357
|
+
// @Name tagging lookup: characters (+ seedance Asset:// URIs) + locked
|
|
358
|
+
// environment plates (so @location tags resolve) + voice clones (so @VoiceName
|
|
359
|
+
// tags resolve). Built once per payload; empty -> resolveAssetTags is a no-op
|
|
360
|
+
// (byte-identical to today).
|
|
361
|
+
const assetTagLookup = buildAssetTagLookup({
|
|
362
|
+
characters: await listCharacterProfiles(workspace),
|
|
363
|
+
assetUriByName,
|
|
364
|
+
// On seedance-direct a raw character portrait both fails submit (needs a
|
|
365
|
+
// hosted URL / Asset:// URI) and trips the real-person filter, so an @Name
|
|
366
|
+
// tag only injects a reference when the character is registered in the Asset
|
|
367
|
+
// Library — its descriptor text still substitutes. Off-route: unchanged.
|
|
368
|
+
assetUriOnly: plan.recommendedRouteId === 'seedance-direct',
|
|
369
|
+
environmentsByName: (await readEnvironmentAssets(workspace.root, projectSlug)).environmentEntryByName,
|
|
370
|
+
voicesByName,
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
// omni-flash First-Frame is gated: when the operator has not opted in, a
|
|
374
|
+
// stored scene.firstFrame is dropped (warned) so behavior is byte-identical.
|
|
375
|
+
const omniFirstFrameEnabled = isOmniFirstFrameEnabled(options.env ?? process.env);
|
|
376
|
+
const droppedFirstFrameScenes: number[] = [];
|
|
377
|
+
|
|
378
|
+
const tasks: VideoExecutionTask[] = (storyboard.scenes ?? [])
|
|
379
|
+
.filter((scene) => {
|
|
380
|
+
if (!sceneFilter) return true;
|
|
381
|
+
const sceneIndex = scene.sceneIndex ?? 0;
|
|
382
|
+
return sceneFilter.has(sceneIndex);
|
|
383
|
+
})
|
|
384
|
+
.map((scene) => {
|
|
385
|
+
if (scene.firstFrame && !omniFirstFrameEnabled) {
|
|
386
|
+
droppedFirstFrameScenes.push(scene.sceneIndex ?? 0);
|
|
387
|
+
}
|
|
388
|
+
const sceneIndex = scene.sceneIndex ?? 0;
|
|
389
|
+
const sceneAssets = assetsByScene.get(sceneIndex) ?? [];
|
|
390
|
+
const chainSeed = chainSeedsByScene.get(sceneIndex);
|
|
391
|
+
const promptPacket = readyPromptPacketsByScene.get(sceneIndex);
|
|
392
|
+
const promptPacketReferencePaths = promptPacket
|
|
393
|
+
? promptPacket.references.map((reference) => reference.path ?? '')
|
|
394
|
+
: [];
|
|
395
|
+
// A chain seed is normally the prior scene's video, but on seedance-direct
|
|
396
|
+
// it was hosted as a last-frame IMAGE above — so classify by its actual
|
|
397
|
+
// extension rather than assuming a chain seed is always a video.
|
|
398
|
+
const chainSeedIsVideo = chainSeed
|
|
399
|
+
? REFERENCE_VIDEO_EXTS.has((chainSeed.path.split('?')[0]?.match(/\.[^.\\/]+$/)?.[0] ?? '').toLowerCase())
|
|
400
|
+
: false;
|
|
401
|
+
const hasVideo = chainSeedIsVideo || sceneAssets.some((asset) => asset.kind === 'video');
|
|
402
|
+
// A non-video chain seed (the seedance hosted last-frame image) counts as
|
|
403
|
+
// an image input so `inputKind` resolves to 'image', not 'text'.
|
|
404
|
+
const chainSeedIsImage = !!chainSeed && !chainSeedIsVideo;
|
|
405
|
+
const hasImage = chainSeedIsImage
|
|
406
|
+
|| sceneAssets.some((asset) => asset.kind === 'image')
|
|
407
|
+
|| promptPacketReferencePaths.length > 0;
|
|
408
|
+
|
|
409
|
+
// When we chain from the previous scene's output, the seed video path
|
|
410
|
+
// must lead `referencePaths` so downstream adapters pick it as the
|
|
411
|
+
// primary input. We also force `inputKind: 'video'`.
|
|
412
|
+
const baseReferencePaths = unique(
|
|
413
|
+
sceneAssets
|
|
414
|
+
.filter((asset) => asset.kind === 'image' || asset.kind === 'video' || asset.kind === 'audio')
|
|
415
|
+
.map((asset) => asset.path ?? ''),
|
|
416
|
+
);
|
|
417
|
+
// A ready prompt packet supplies the IMAGE references, but the scene's
|
|
418
|
+
// own audio/video reference assets must still survive — otherwise
|
|
419
|
+
// reference_audios (and any non-packet video reference) silently
|
|
420
|
+
// disappears from the provider payload for packet-driven scenes.
|
|
421
|
+
const baseNonImageReferencePaths = unique(
|
|
422
|
+
sceneAssets
|
|
423
|
+
.filter((asset) => asset.kind === 'video' || asset.kind === 'audio')
|
|
424
|
+
.map((asset) => asset.path ?? ''),
|
|
425
|
+
);
|
|
426
|
+
const packetOrBaseReferencePaths = promptPacketReferencePaths.length > 0
|
|
427
|
+
? unique([...promptPacketReferencePaths, ...baseNonImageReferencePaths])
|
|
428
|
+
: baseReferencePaths;
|
|
429
|
+
// When the project has registered Seedance Asset Library avatars, this
|
|
430
|
+
// scene's resolved cast/product Asset:// URIs become its reference set
|
|
431
|
+
// (the proven identity-lock mechanism). Names that don't resolve are
|
|
432
|
+
// dropped. Empty map (no artifact) -> falls through to today's behavior.
|
|
433
|
+
// Resolve @Name tags in the scene prompt: substitute descriptors and
|
|
434
|
+
// collect tagged references. No '@' tokens -> unchanged text, no refs.
|
|
435
|
+
const rawPrompt =
|
|
436
|
+
promptPacket?.promptText.trim() || scene.scenePrompt?.animationPrompt?.trim() || scene.description || '';
|
|
437
|
+
// veo-useapi auto-inject (useapi blog 260609): plan the character_1..7
|
|
438
|
+
// body slots FIRST (cast order, then tag-only registered names), then
|
|
439
|
+
// rewrite each registered @Name tag into its canonical @character_N
|
|
440
|
+
// marker BEFORE resolveAssetTags — the reserved marker grammar there
|
|
441
|
+
// preserves the injected tokens verbatim. INTENDED behavior change: a
|
|
442
|
+
// replaced @Name is no longer seen by resolveAssetTags, so its loose
|
|
443
|
+
// portrait referencePath is NOT collected — the saved Flow character
|
|
444
|
+
// already bundles its identity images, and the loose portrait would
|
|
445
|
+
// waste the shared image-reference budget. Characters WITHOUT a Flow ref
|
|
446
|
+
// keep today's descriptor-substitution path (incl. referencePath
|
|
447
|
+
// collection). Tagless prompts: the planned refs equal today's list and
|
|
448
|
+
// the text is unchanged → byte-identical payload. Off-route (empty map)
|
|
449
|
+
// this block is skipped entirely.
|
|
450
|
+
let flowSlotPlan: FlowCharacterSlotPlan | null = null;
|
|
451
|
+
let taggedPrompt = rawPrompt;
|
|
452
|
+
if (plan.recommendedRouteId === 'veo-useapi' && characterRefByName.size > 0) {
|
|
453
|
+
flowSlotPlan = planFlowCharacterSlots(rawPrompt, scene.characters ?? [], characterRefByName);
|
|
454
|
+
if (flowSlotPlan.overflow.length > 0) {
|
|
455
|
+
// Operator-visible, never fatal (stdout stays clean JSON) — same
|
|
456
|
+
// channel as the unresolved-tag and marker-strip warnings.
|
|
457
|
+
console.warn(
|
|
458
|
+
`Flow character slots are capped at 7; scene ${sceneIndex} drops: ${flowSlotPlan.overflow.join(', ')}.`,
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
taggedPrompt = injectFlowCharacterMarkers(rawPrompt, flowSlotPlan.slotByLowerName).text;
|
|
462
|
+
}
|
|
463
|
+
const tagResult = resolveAssetTags(taggedPrompt, assetTagLookup);
|
|
464
|
+
let promptText = tagResult.text;
|
|
465
|
+
for (const name of tagResult.unresolved) {
|
|
466
|
+
// Operator-visible, never fatal (stdout stays clean JSON).
|
|
467
|
+
console.warn(`@Name tag "@${name}" in scene ${sceneIndex} did not resolve to a known character/asset; left as plain text.`);
|
|
468
|
+
}
|
|
469
|
+
// Google Flow inline @-markers (useapi blog 260609) are a veo-useapi-only
|
|
470
|
+
// grammar; on every other route the literal tokens would leak into the
|
|
471
|
+
// provider prompt, so strip them and warn (same operator-visible channel
|
|
472
|
+
// as unresolved tags, never fatal). On veo-useapi they pass through
|
|
473
|
+
// untouched. Marker-free prompts are byte-identical either way.
|
|
474
|
+
if (plan.recommendedRouteId !== 'veo-useapi' && extractFlowMarkers(promptText).length > 0) {
|
|
475
|
+
const strippedMarkers = stripFlowMarkers(promptText);
|
|
476
|
+
promptText = strippedMarkers.text;
|
|
477
|
+
console.warn(
|
|
478
|
+
`Flow @-markers are veo-useapi only; removed for ${plan.recommendedRouteId} in scene ${sceneIndex}: ${strippedMarkers.stripped.join(', ')}.`,
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
// A character bound to a voice clone (`voice-clone --character`) auto-injects
|
|
482
|
+
// its black-frame voice clip into every scene it appears in — the cartoon-show
|
|
483
|
+
// voice-lock, no @tag required. The .mp4 routes into Seedance `reference_videos`
|
|
484
|
+
// and is counted against the video budget below. No bound voice -> no-op.
|
|
485
|
+
const sceneVoiceClips = unique(scene.characters ?? [])
|
|
486
|
+
.map((name) => {
|
|
487
|
+
const v = voiceClones?.voiceByCharacter.get(name.toLowerCase());
|
|
488
|
+
// Prefer the durable hosted URL — the remote seedance-direct API can't
|
|
489
|
+
// read a local path. Fall back to the local clip when unhosted.
|
|
490
|
+
return v?.hostedUrl ?? v?.clipPath;
|
|
491
|
+
})
|
|
492
|
+
.filter((path): path is string => Boolean(path));
|
|
493
|
+
// Image identity refs (Asset:// URIs + @tag image paths) are the "winner" set
|
|
494
|
+
// that replaces the base/packet refs. Voice clips are NOT folded in here —
|
|
495
|
+
// they are additive (see resolveSceneReferencePaths) so the identity image is
|
|
496
|
+
// never dropped to make room for the voice (the runway talking-head case).
|
|
497
|
+
const resolvedAssetUris = unique([
|
|
498
|
+
...unique(scene.characters ?? [])
|
|
499
|
+
.map((name) => assetUriByName.get(name))
|
|
500
|
+
.filter((uri): uri is string => Boolean(uri)),
|
|
501
|
+
...tagResult.referencedPaths,
|
|
502
|
+
]);
|
|
503
|
+
const referencePaths = resolveSceneReferencePaths({
|
|
504
|
+
resolvedAssetUris,
|
|
505
|
+
chainSeedPath: chainSeed ? chainSeed.path : null,
|
|
506
|
+
packetOrBaseReferencePaths,
|
|
507
|
+
additionalReferencePaths: sceneVoiceClips,
|
|
508
|
+
});
|
|
509
|
+
// Fail fast if the injected reference set exceeds the per-generation limits
|
|
510
|
+
// (reuses the canonical budget; does not duplicate the limits). Runs whenever
|
|
511
|
+
// this feature populated references — identity URIs OR a voice clip — so
|
|
512
|
+
// non-asset payloads stay byte-identical to today.
|
|
513
|
+
if (resolvedAssetUris.length > 0 || sceneVoiceClips.length > 0) {
|
|
514
|
+
assertReferenceBudget(referencePaths);
|
|
515
|
+
}
|
|
516
|
+
const backendHints = unique([
|
|
517
|
+
...sceneAssets.map((asset) => asset.backend ?? ''),
|
|
518
|
+
...(promptPacket ? ['filmmaking-prompts', `prompt-variant:${promptPacket.variant}`] : []),
|
|
519
|
+
]);
|
|
520
|
+
const durationSeconds = promptPacket?.durationSeconds ?? scene.durationSeconds;
|
|
521
|
+
// OUTPUT-DEPENDENT render resolution, threaded from the prompt packet.
|
|
522
|
+
// Absent on legacy packets -> field omitted (no change to existing tasks).
|
|
523
|
+
const resolution = promptPacket?.resolution;
|
|
524
|
+
|
|
525
|
+
// Tag how these references should be DELIVERED so the transport never
|
|
526
|
+
// turns a lone character sheet into the video's first frame (which made
|
|
527
|
+
// solo clips open on the character grid). Asset-Library avatars and
|
|
528
|
+
// filmmaking-prompts packet images are identity references ('character');
|
|
529
|
+
// a chain-from-prev seed is a continuity keyframe ('keyframe'); plain
|
|
530
|
+
// ambiguous scene assets stay unset → today's first-frame behavior.
|
|
531
|
+
const referenceRole: 'character' | 'keyframe' | undefined =
|
|
532
|
+
resolvedAssetUris.length > 0
|
|
533
|
+
? 'character'
|
|
534
|
+
: chainSeed
|
|
535
|
+
? 'keyframe'
|
|
536
|
+
: promptPacketReferencePaths.length > 0
|
|
537
|
+
? 'character'
|
|
538
|
+
: undefined;
|
|
539
|
+
|
|
540
|
+
return {
|
|
541
|
+
sceneIndex,
|
|
542
|
+
prompt: promptText,
|
|
543
|
+
inputKind: hasVideo ? 'video' : hasImage ? 'image' : 'text',
|
|
544
|
+
referencePaths,
|
|
545
|
+
...(referenceRole ? { referenceRole } : {}),
|
|
546
|
+
...(promptPacket ? {
|
|
547
|
+
referenceSlots: promptPacket.references.map((reference) => ({
|
|
548
|
+
slot: reference.slot,
|
|
549
|
+
role: reference.role,
|
|
550
|
+
label: reference.label,
|
|
551
|
+
...(reference.path ? { path: reference.path } : {}),
|
|
552
|
+
})),
|
|
553
|
+
promptPacketVariant: promptPacket.variant,
|
|
554
|
+
} : {}),
|
|
555
|
+
// Asset ids only — packet reference slot names are surfaced separately
|
|
556
|
+
// via `referenceSlots` and must not pollute the asset-id provenance
|
|
557
|
+
// contract (telemetry/reports join these back to the asset manifest).
|
|
558
|
+
sourceAssetIds: unique(sceneAssets.map((asset) => asset.id ?? '')),
|
|
559
|
+
backendHints,
|
|
560
|
+
characters: unique(scene.characters ?? []),
|
|
561
|
+
// veo-useapi only: scene characters registered in flow-characters.json
|
|
562
|
+
// resolve to their Flow character refs (character_1..7). The slot plan
|
|
563
|
+
// built above is the single source of truth — its ordering contract is
|
|
564
|
+
// "cast order first, then tag-only characters", so a tagless scene
|
|
565
|
+
// yields exactly the legacy cast-derived list. Empty/absent -> no
|
|
566
|
+
// characterRefs field (byte-identical legacy on every other route).
|
|
567
|
+
...(flowSlotPlan && flowSlotPlan.orderedRefs.length > 0
|
|
568
|
+
? { characterRefs: flowSlotPlan.orderedRefs }
|
|
569
|
+
: {}),
|
|
570
|
+
...(Number.isFinite(durationSeconds) ? { durationSeconds } : {}),
|
|
571
|
+
...(resolution ? { resolution } : {}),
|
|
572
|
+
...(scene.voicePreset ? { voicePreset: scene.voicePreset } : {}),
|
|
573
|
+
...(scene.referenceVideoMediaId ? { referenceVideoMediaId: scene.referenceVideoMediaId } : {}),
|
|
574
|
+
// omni-flash First-Frame carrier — only stamped when the operator has
|
|
575
|
+
// opted in via VCLAW_OMNI_FIRST_FRAME. Gate off → a stored scene.firstFrame
|
|
576
|
+
// is silently dropped here (warned below), so behavior is byte-identical.
|
|
577
|
+
...(scene.firstFrame && omniFirstFrameEnabled ? { firstFrame: true } : {}),
|
|
578
|
+
...(chainSeed ? { chainedFromCandidateId: chainSeed.sourceCandidateId } : {}),
|
|
579
|
+
};
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
// PHASE-3 opt-in continuity loop. Only mutates prompts for tasks that carry a
|
|
583
|
+
// chain-from-prev seed, and only when the caller opts in. Default-off path is
|
|
584
|
+
// byte-identical to today (no Gemini call, no prompt change).
|
|
585
|
+
if (options.continuityFeedback && chainSeedsByScene.size > 0) {
|
|
586
|
+
// Deterministic continuity source + Gemini fallback: the project's
|
|
587
|
+
// story-bible cast/setting/prop descriptors (graceful when absent).
|
|
588
|
+
let storyBible: StoryBibleArtifact | null = null;
|
|
589
|
+
const storyBiblePath = artifactPathFor(workspace, 'story-bible');
|
|
590
|
+
if (existsSync(storyBiblePath)) {
|
|
591
|
+
try {
|
|
592
|
+
storyBible = JSON.parse(await readFile(storyBiblePath, 'utf-8')) as StoryBibleArtifact;
|
|
593
|
+
} catch {
|
|
594
|
+
storyBible = null;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
const castDescriptors = (storyBible?.characters ?? [])
|
|
598
|
+
.map((character) => (character.description ? `${character.name}: ${character.description}` : character.name))
|
|
599
|
+
.filter(Boolean);
|
|
600
|
+
const settingDescriptors = (storyBible?.settings ?? [])
|
|
601
|
+
.map((setting) => `${setting.name}: ${setting.description}`)
|
|
602
|
+
.filter(Boolean);
|
|
603
|
+
const propDescriptors = (storyBible?.props ?? [])
|
|
604
|
+
.map((prop) => `${prop.name}: ${prop.description}`)
|
|
605
|
+
.filter(Boolean);
|
|
606
|
+
const priorDescriptors = [...castDescriptors, ...settingDescriptors, ...propDescriptors];
|
|
607
|
+
|
|
608
|
+
for (const task of tasks) {
|
|
609
|
+
const chainSeed = chainSeedsByScene.get(task.sceneIndex);
|
|
610
|
+
if (!chainSeed) continue;
|
|
611
|
+
// Defense-in-depth: augmentPromptWithContinuity is documented to never
|
|
612
|
+
// throw (it catches all Gemini/network/parse/readFile errors and falls
|
|
613
|
+
// back to the deterministic path), but an unexpected escape (e.g. an OOM
|
|
614
|
+
// or a V8-internal error from a very large base64 image conversion) must
|
|
615
|
+
// NOT abort the whole payload build. Wrap per-task so one task degrading
|
|
616
|
+
// leaves its prompt unchanged and the remaining tasks still process.
|
|
617
|
+
try {
|
|
618
|
+
const augmented = await augmentPromptWithContinuity({
|
|
619
|
+
nextPrompt: task.prompt,
|
|
620
|
+
priorReferenceImagePath: chainSeed.path,
|
|
621
|
+
priorDescriptors,
|
|
622
|
+
...(options.continuityFetcher ? { fetcher: options.continuityFetcher } : {}),
|
|
623
|
+
env: options.env ?? process.env,
|
|
624
|
+
});
|
|
625
|
+
// StoryCraft anti-drift: re-state the full descriptor block verbatim
|
|
626
|
+
// (idempotent — won't double-inject if already present).
|
|
627
|
+
task.prompt = repasteContinuityDescriptors(augmented.prompt, {
|
|
628
|
+
cast: castDescriptors,
|
|
629
|
+
settings: settingDescriptors,
|
|
630
|
+
props: propDescriptors,
|
|
631
|
+
});
|
|
632
|
+
} catch (error) {
|
|
633
|
+
// Preserve the documented degradation contract unconditionally: keep
|
|
634
|
+
// the original prompt for this task and continue with the rest.
|
|
635
|
+
// eslint-disable-next-line no-console
|
|
636
|
+
console.warn(
|
|
637
|
+
`[continuity] scene ${task.sceneIndex} continuity augmentation failed; using original prompt: ${
|
|
638
|
+
error instanceof Error ? error.message : String(error)
|
|
639
|
+
}`,
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
const outputDir = join(workspace.projectDir, 'outputs');
|
|
646
|
+
await mkdir(outputDir, { recursive: true });
|
|
647
|
+
|
|
648
|
+
// Pre-submission route-capability check. Validates only the profile-level
|
|
649
|
+
// resolution (always 720p|1080p, both in every live route's matrix) and the
|
|
650
|
+
// worst-case per-task reference-budget counts against the target route's
|
|
651
|
+
// declared limits. Refs are already capped downstream by the transports at
|
|
652
|
+
// the same numbers, so a valid payload is never newly rejected here; this
|
|
653
|
+
// only fails fast on a genuinely out-of-matrix combo (and downgrades to
|
|
654
|
+
// warnings when VCLAW_ALLOW_UNSAFE_MODELS is set). Durations are intentionally
|
|
655
|
+
// not validated here because the transports clamp per-task durations.
|
|
656
|
+
const maxImageRefs = tasks.reduce(
|
|
657
|
+
(max, task) => Math.max(max, countReferencesByKind(task.referencePaths).images),
|
|
658
|
+
0,
|
|
659
|
+
);
|
|
660
|
+
const maxVideoRefs = tasks.reduce(
|
|
661
|
+
(max, task) => Math.max(max, countReferencesByKind(task.referencePaths).videos),
|
|
662
|
+
0,
|
|
663
|
+
);
|
|
664
|
+
// Audio refs are intentionally NOT validated here: some transports (e.g.
|
|
665
|
+
// runway-useapi) silently ignore audio reference assets today rather than
|
|
666
|
+
// erroring, so failing on them would change existing behavior. Image/video
|
|
667
|
+
// ref budgets are the proven, transport-enforced limits.
|
|
668
|
+
// Advisory: a stored storyboard requested omni-flash First-Frame but the gate
|
|
669
|
+
// is off, so those scenes fall back to legacy R2V. Emit to stderr (JSON stdout
|
|
670
|
+
// stays clean) so the operator knows why nothing changed.
|
|
671
|
+
if (droppedFirstFrameScenes.length > 0) {
|
|
672
|
+
console.warn(
|
|
673
|
+
`[vclaw] omni-flash First-Frame requested for scene(s) [${droppedFirstFrameScenes.join(', ')}] but VCLAW_OMNI_FIRST_FRAME is not set — ignoring (legacy R2V). Set VCLAW_OMNI_FIRST_FRAME=1 to enable (build-ahead; unverified-live until useapi.net ships omni-flash frames mode).`,
|
|
674
|
+
);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
// veo-useapi model gate: voice narration is omni-flash-only. We resolve the
|
|
678
|
+
// model the transport will actually pass (veoModel ?? quality) and flag any
|
|
679
|
+
// scene voice preset. hasVideoRef (dedicated V2V edit, not the scene-chaining
|
|
680
|
+
// seed) is wired once referenceVideoMediaId exists. Both are no-ops for legacy
|
|
681
|
+
// payloads (no voicePreset / non-veo route) so nothing is newly rejected.
|
|
682
|
+
assertRouteRequestValid(
|
|
683
|
+
plan.recommendedRouteId,
|
|
684
|
+
{
|
|
685
|
+
resolution: plan.executionProfile.resolution,
|
|
686
|
+
imageRefs: maxImageRefs,
|
|
687
|
+
videoRefs: maxVideoRefs,
|
|
688
|
+
veoModel: plan.executionProfile.veoModel ?? plan.executionProfile.quality,
|
|
689
|
+
hasVoice: tasks.some((task) => !!task.voicePreset),
|
|
690
|
+
hasVideoRef: tasks.some((task) => !!task.referenceVideoMediaId),
|
|
691
|
+
// First-Frame is already gated when stamping task.firstFrame above, so any
|
|
692
|
+
// present firstFrame means the operator opted in — it satisfies the
|
|
693
|
+
// omni-flash voice-needs-a-visual-anchor precondition.
|
|
694
|
+
hasStartImage: tasks.some((task) => !!task.firstFrame),
|
|
695
|
+
},
|
|
696
|
+
{ env: options.env ?? process.env },
|
|
697
|
+
);
|
|
698
|
+
|
|
699
|
+
return {
|
|
700
|
+
workspaceRoot: workspace.root,
|
|
701
|
+
projectSlug,
|
|
702
|
+
productionMode: plan.productionMode,
|
|
703
|
+
routeId: plan.recommendedRouteId,
|
|
704
|
+
operationKind: plan.operationKind,
|
|
705
|
+
executionProfile: plan.executionProfile,
|
|
706
|
+
generatedAt: new Date().toISOString(),
|
|
707
|
+
outputDir,
|
|
708
|
+
tasks,
|
|
709
|
+
promptGuidance: plan.promptGuidance,
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
function isExecutionReadyPromptPacket(packet: FilmmakingSeedancePacket): boolean {
|
|
714
|
+
if (!packet.promptText.trim()) return false;
|
|
715
|
+
if (packet.references.some((reference) => reference.status !== 'ready')) return false;
|
|
716
|
+
if (packet.references.some((reference) => !reference.path?.trim())) return false;
|
|
717
|
+
return true;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export async function submitExecutionPayload(
|
|
721
|
+
payload: VideoExecutionPayload,
|
|
722
|
+
options: {
|
|
723
|
+
env?: NodeJS.ProcessEnv;
|
|
724
|
+
} = {},
|
|
725
|
+
): Promise<{
|
|
726
|
+
adapterCommand: string;
|
|
727
|
+
externalJobId: string | null;
|
|
728
|
+
rawResult: unknown;
|
|
729
|
+
}> {
|
|
730
|
+
const env = options.env ?? process.env;
|
|
731
|
+
const adapterCommand = resolveAdapterCommand(payload.routeId, env);
|
|
732
|
+
|
|
733
|
+
const result = await new Promise<{
|
|
734
|
+
stdout: string;
|
|
735
|
+
stderr: string;
|
|
736
|
+
code: number | null;
|
|
737
|
+
}>((resolve, reject) => {
|
|
738
|
+
const child = spawn('sh', ['-lc', adapterCommand], {
|
|
739
|
+
env,
|
|
740
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
741
|
+
});
|
|
742
|
+
|
|
743
|
+
let stdout = '';
|
|
744
|
+
let stderr = '';
|
|
745
|
+
child.stdout.on('data', (chunk) => {
|
|
746
|
+
stdout += String(chunk);
|
|
747
|
+
});
|
|
748
|
+
child.stderr.on('data', (chunk) => {
|
|
749
|
+
stderr += String(chunk);
|
|
750
|
+
});
|
|
751
|
+
child.on('error', reject);
|
|
752
|
+
child.on('close', (code) => {
|
|
753
|
+
resolve({ stdout, stderr, code });
|
|
754
|
+
});
|
|
755
|
+
child.stdin.write(JSON.stringify(payload));
|
|
756
|
+
child.stdin.end();
|
|
757
|
+
});
|
|
758
|
+
|
|
759
|
+
if (result.code !== 0) {
|
|
760
|
+
throw new Error(`Adapter command failed for ${payload.routeId}: ${result.stderr.trim() || `exit ${result.code}`}`);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
const trimmed = result.stdout.trim();
|
|
764
|
+
let rawResult: unknown = trimmed;
|
|
765
|
+
if (trimmed) {
|
|
766
|
+
try {
|
|
767
|
+
rawResult = JSON.parse(trimmed) as unknown;
|
|
768
|
+
} catch {
|
|
769
|
+
rawResult = trimmed;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
const externalJobId = rawResult && typeof rawResult === 'object' && 'externalJobId' in rawResult
|
|
774
|
+
? String((rawResult as { externalJobId?: unknown }).externalJobId ?? '') || null
|
|
775
|
+
: null;
|
|
776
|
+
|
|
777
|
+
// Adapter submit contract (CLAUDE.md "Provider routes and adapters"): submit
|
|
778
|
+
// MUST print JSON with an externalJobId. Silently accepting a malformed
|
|
779
|
+
// response used to leave the scene permanently "submitted" with nothing to
|
|
780
|
+
// poll — fail loudly instead.
|
|
781
|
+
if (!externalJobId) {
|
|
782
|
+
throw new Error(
|
|
783
|
+
`Adapter submit for ${payload.routeId} returned no externalJobId ` +
|
|
784
|
+
`(stdout: ${trimmed ? trimmed.slice(0, 200) : '<empty>'}). ` +
|
|
785
|
+
'Adapters must print JSON {"externalJobId":"..."} on submit.',
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
return {
|
|
790
|
+
adapterCommand,
|
|
791
|
+
externalJobId,
|
|
792
|
+
rawResult,
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
export async function pollExecutionPayload(
|
|
797
|
+
input: {
|
|
798
|
+
projectSlug: string;
|
|
799
|
+
routeId: ProviderRouteId;
|
|
800
|
+
externalJobId: string;
|
|
801
|
+
outputDir: string;
|
|
802
|
+
// Required so the adapter can load `<workspaceRoot>/.env.local` for provider
|
|
803
|
+
// credentials (e.g. SUTUI_API_KEY) on the poll path — exactly as submit and
|
|
804
|
+
// cancel already do. Omitting it made seedance-direct polls fail with
|
|
805
|
+
// "requires SUTUI_API_KEY" even though submit succeeded.
|
|
806
|
+
workspaceRoot: string;
|
|
807
|
+
},
|
|
808
|
+
options: {
|
|
809
|
+
env?: NodeJS.ProcessEnv;
|
|
810
|
+
} = {},
|
|
811
|
+
): Promise<VideoExecutionPollResult> {
|
|
812
|
+
const env = options.env ?? process.env;
|
|
813
|
+
const adapterCommand = resolveAdapterCommand(input.routeId, env);
|
|
814
|
+
|
|
815
|
+
const result = await new Promise<{
|
|
816
|
+
stdout: string;
|
|
817
|
+
stderr: string;
|
|
818
|
+
code: number | null;
|
|
819
|
+
}>((resolve, reject) => {
|
|
820
|
+
const child = spawn('sh', ['-lc', adapterCommand], {
|
|
821
|
+
env,
|
|
822
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
823
|
+
});
|
|
824
|
+
|
|
825
|
+
let stdout = '';
|
|
826
|
+
let stderr = '';
|
|
827
|
+
child.stdout.on('data', (chunk) => {
|
|
828
|
+
stdout += String(chunk);
|
|
829
|
+
});
|
|
830
|
+
child.stderr.on('data', (chunk) => {
|
|
831
|
+
stderr += String(chunk);
|
|
832
|
+
});
|
|
833
|
+
child.on('error', reject);
|
|
834
|
+
child.on('close', (code) => {
|
|
835
|
+
resolve({ stdout, stderr, code });
|
|
836
|
+
});
|
|
837
|
+
child.stdin.write(JSON.stringify({
|
|
838
|
+
action: 'poll',
|
|
839
|
+
...input,
|
|
840
|
+
}));
|
|
841
|
+
child.stdin.end();
|
|
842
|
+
});
|
|
843
|
+
|
|
844
|
+
if (result.code !== 0) {
|
|
845
|
+
throw new Error(`Adapter poll failed for ${input.routeId}: ${result.stderr.trim() || `exit ${result.code}`}`);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
const trimmed = result.stdout.trim();
|
|
849
|
+
let rawResult: unknown = trimmed;
|
|
850
|
+
if (trimmed) {
|
|
851
|
+
try {
|
|
852
|
+
rawResult = JSON.parse(trimmed) as unknown;
|
|
853
|
+
} catch {
|
|
854
|
+
rawResult = trimmed;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
const status = rawResult && typeof rawResult === 'object' && 'status' in rawResult
|
|
859
|
+
? String((rawResult as { status?: unknown }).status ?? '')
|
|
860
|
+
: '';
|
|
861
|
+
if (!(status === 'pending' || status === 'completed' || status === 'failed')) {
|
|
862
|
+
throw new Error(`Adapter poll for ${input.routeId} returned invalid status: ${status || 'missing'}`);
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
const outputs = rawResult && typeof rawResult === 'object' && 'outputs' in rawResult && Array.isArray((rawResult as { outputs?: unknown }).outputs)
|
|
866
|
+
? ((rawResult as { outputs: Array<{ id?: unknown; kind?: unknown; path?: unknown; sceneIndex?: unknown; backend?: unknown }> }).outputs
|
|
867
|
+
.filter((asset) => typeof asset.id === 'string' && typeof asset.kind === 'string' && typeof asset.path === 'string')
|
|
868
|
+
.map((asset) => ({
|
|
869
|
+
id: String(asset.id),
|
|
870
|
+
kind: ['image', 'video', 'audio', 'subtitle', 'other'].includes(String(asset.kind))
|
|
871
|
+
? String(asset.kind) as 'image' | 'video' | 'audio' | 'subtitle' | 'other'
|
|
872
|
+
: 'other',
|
|
873
|
+
path: String(asset.path),
|
|
874
|
+
...(Number.isInteger(asset.sceneIndex) ? { sceneIndex: asset.sceneIndex as number } : {}),
|
|
875
|
+
...(typeof asset.backend === 'string' && asset.backend.trim() ? { backend: asset.backend } : {}),
|
|
876
|
+
})))
|
|
877
|
+
: [];
|
|
878
|
+
|
|
879
|
+
const issues = rawResult && typeof rawResult === 'object' && 'issues' in rawResult && Array.isArray((rawResult as { issues?: unknown }).issues)
|
|
880
|
+
? (rawResult as { issues: unknown[] }).issues.map((value) => String(value))
|
|
881
|
+
: [];
|
|
882
|
+
|
|
883
|
+
const externalJobId = rawResult && typeof rawResult === 'object' && 'externalJobId' in rawResult
|
|
884
|
+
? String((rawResult as { externalJobId?: unknown }).externalJobId ?? '') || input.externalJobId
|
|
885
|
+
: input.externalJobId;
|
|
886
|
+
|
|
887
|
+
return {
|
|
888
|
+
status,
|
|
889
|
+
externalJobId,
|
|
890
|
+
outputs,
|
|
891
|
+
issues,
|
|
892
|
+
rawResult,
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
export async function cancelExecutionPayload(
|
|
897
|
+
input: {
|
|
898
|
+
projectSlug: string;
|
|
899
|
+
routeId: ProviderRouteId;
|
|
900
|
+
externalJobId: string;
|
|
901
|
+
outputDir: string;
|
|
902
|
+
workspaceRoot: string;
|
|
903
|
+
},
|
|
904
|
+
options: {
|
|
905
|
+
env?: NodeJS.ProcessEnv;
|
|
906
|
+
} = {},
|
|
907
|
+
): Promise<VideoExecutionCancelResult> {
|
|
908
|
+
const env = options.env ?? process.env;
|
|
909
|
+
const adapterCommand = resolveAdapterCommand(input.routeId, env);
|
|
910
|
+
|
|
911
|
+
const result = await new Promise<{
|
|
912
|
+
stdout: string;
|
|
913
|
+
stderr: string;
|
|
914
|
+
code: number | null;
|
|
915
|
+
}>((resolve, reject) => {
|
|
916
|
+
const child = spawn('sh', ['-lc', adapterCommand], {
|
|
917
|
+
env,
|
|
918
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
919
|
+
});
|
|
920
|
+
|
|
921
|
+
let stdout = '';
|
|
922
|
+
let stderr = '';
|
|
923
|
+
child.stdout.on('data', (chunk) => {
|
|
924
|
+
stdout += String(chunk);
|
|
925
|
+
});
|
|
926
|
+
child.stderr.on('data', (chunk) => {
|
|
927
|
+
stderr += String(chunk);
|
|
928
|
+
});
|
|
929
|
+
child.on('error', reject);
|
|
930
|
+
child.on('close', (code) => {
|
|
931
|
+
resolve({ stdout, stderr, code });
|
|
932
|
+
});
|
|
933
|
+
child.stdin.write(JSON.stringify({
|
|
934
|
+
action: 'cancel',
|
|
935
|
+
...input,
|
|
936
|
+
}));
|
|
937
|
+
child.stdin.end();
|
|
938
|
+
});
|
|
939
|
+
|
|
940
|
+
if (result.code !== 0) {
|
|
941
|
+
throw new Error(`Adapter cancel failed for ${input.routeId}: ${result.stderr.trim() || `exit ${result.code}`}`);
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
const trimmed = result.stdout.trim();
|
|
945
|
+
let rawResult: unknown = trimmed;
|
|
946
|
+
if (trimmed) {
|
|
947
|
+
try {
|
|
948
|
+
rawResult = JSON.parse(trimmed) as unknown;
|
|
949
|
+
} catch {
|
|
950
|
+
rawResult = trimmed;
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
const status = rawResult && typeof rawResult === 'object' && 'status' in rawResult
|
|
955
|
+
? String((rawResult as { status?: unknown }).status ?? '')
|
|
956
|
+
: '';
|
|
957
|
+
if (!(status === 'cancelled' || status === 'unsupported')) {
|
|
958
|
+
throw new Error(`Adapter cancel for ${input.routeId} returned invalid status: ${status || 'missing'}`);
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
const issues = rawResult && typeof rawResult === 'object' && 'issues' in rawResult && Array.isArray((rawResult as { issues?: unknown }).issues)
|
|
962
|
+
? (rawResult as { issues: unknown[] }).issues.map((value) => String(value))
|
|
963
|
+
: [];
|
|
964
|
+
|
|
965
|
+
const externalJobId = rawResult && typeof rawResult === 'object' && 'externalJobId' in rawResult
|
|
966
|
+
? String((rawResult as { externalJobId?: unknown }).externalJobId ?? '') || input.externalJobId
|
|
967
|
+
: input.externalJobId;
|
|
968
|
+
|
|
969
|
+
return {
|
|
970
|
+
status: status as 'cancelled' | 'unsupported',
|
|
971
|
+
externalJobId,
|
|
972
|
+
issues,
|
|
973
|
+
rawResult,
|
|
974
|
+
};
|
|
975
|
+
}
|