videobook 0.0.0-stage → 0.1.0
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/CHANGELOG.md +18 -0
- package/LICENSE +21 -0
- package/README.md +133 -2
- package/bin/videobook.js +7 -0
- package/dist/acestep/client.js +203 -0
- package/dist/acestep/config.js +62 -0
- package/dist/acestep/errors.js +8 -0
- package/dist/acestep/process.js +175 -0
- package/dist/alive-captions/analyze.js +117 -0
- package/dist/alive-captions/audio.js +179 -0
- package/dist/alive-captions/frames.js +59 -0
- package/dist/alive-captions/model.js +37 -0
- package/dist/alive-captions/schema.js +49 -0
- package/dist/alive-captions/track.js +9 -0
- package/dist/api-key.js +33 -0
- package/dist/app-state.js +56 -0
- package/dist/app.js +257 -0
- package/dist/archive-b2.js +332 -0
- package/dist/archive-store.js +169 -0
- package/dist/artifact-label.js +36 -0
- package/dist/artifact-refs.js +49 -0
- package/dist/asset-tag-extraction.js +169 -0
- package/dist/asset-tags.js +228 -0
- package/dist/asset-usage.js +23 -0
- package/dist/audio-cue.js +71 -0
- package/dist/audio-encoding.js +32 -0
- package/dist/audio-sync-request.js +1 -0
- package/dist/audio-sync.js +223 -0
- package/dist/audio-trim-range.js +31 -0
- package/dist/book-context.js +31 -0
- package/dist/book-manager.js +374 -0
- package/dist/catalog-gc.js +26 -0
- package/dist/chain-executor.js +815 -0
- package/dist/chain-generation.js +115 -0
- package/dist/chain-plan.js +746 -0
- package/dist/chain-step-review.js +60 -0
- package/dist/character-name.js +25 -0
- package/dist/chat-generation-routing.js +73 -0
- package/dist/chat-generation-settings.js +78 -0
- package/dist/chat-models.js +44 -0
- package/dist/chat-prompt-rewrite.js +67 -0
- package/dist/chat-router.js +628 -0
- package/dist/chat-view-actions.js +49 -0
- package/dist/cli/args.js +192 -0
- package/dist/cli/doctor-command.js +255 -0
- package/dist/cli/entry.js +2 -0
- package/dist/cli/main.js +91 -0
- package/dist/cli/mcp-command.js +82 -0
- package/dist/cli/mcp-relay.js +51 -0
- package/dist/cli/open-browser.js +14 -0
- package/dist/cli/run-command.js +187 -0
- package/dist/cli/serve-command.js +57 -0
- package/dist/cli/stdio-guard.js +8 -0
- package/dist/cold-open-model.js +7 -0
- package/dist/cold-open.js +79 -0
- package/dist/command-reference.js +95 -0
- package/dist/content-store.js +74 -0
- package/dist/cost.js +8 -0
- package/dist/crop-geometry.js +23 -0
- package/dist/dancing-workflow.js +446 -0
- package/dist/data-home.js +44 -0
- package/dist/diagnostics.js +109 -0
- package/dist/dialog-quality.js +34 -0
- package/dist/downloads-dest.js +56 -0
- package/dist/editing-moments.js +194 -0
- package/dist/elevenlabs-audio-extension.js +66 -0
- package/dist/engine.js +54 -0
- package/dist/env-secrets.js +184 -0
- package/dist/ffmpeg-binary.js +12 -0
- package/dist/ffmpeg.js +425 -0
- package/dist/ffprobe-binary.js +55 -0
- package/dist/forget-asset.js +216 -0
- package/dist/frame-utils.js +27 -0
- package/dist/generation-credit-error.js +11 -0
- package/dist/generation-input-mentions.js +117 -0
- package/dist/generation-input-policy.js +68 -0
- package/dist/generation-reference-mentions.js +97 -0
- package/dist/goal-characters.js +49 -0
- package/dist/goal-plan-v3.js +273 -0
- package/dist/goal-plan.js +220 -0
- package/dist/goal-planner-prompt.js +28 -0
- package/dist/goal-prompt-budget.js +4 -0
- package/dist/goal-reference-images.js +25 -0
- package/dist/goal-state.js +261 -0
- package/dist/goal-stills.js +153 -0
- package/dist/goal-store.js +144 -0
- package/dist/goal-styles.js +144 -0
- package/dist/goal-v3-runtime.js +157 -0
- package/dist/guides/character_schema_guide.md +70 -0
- package/dist/guides/gpt_image_2_5_prompting_guide.md +21 -0
- package/dist/guides/grok_imagine_prompting_guide.md +72 -0
- package/dist/guides/image_reproduction_guide.md +84 -0
- package/dist/guides/kling_3_0_prompting_guide.md +136 -0
- package/dist/guides/nano_banana_pro_prompting_guide.md +28 -0
- package/dist/guides/seedance_2_prompting_guide.md +172 -0
- package/dist/http-access.js +49 -0
- package/dist/http-byte-range.js +31 -0
- package/dist/image-compress.js +77 -0
- package/dist/image-edit-default.js +1 -0
- package/dist/image-edit-models.js +41 -0
- package/dist/image-edit-settings.js +11 -0
- package/dist/image-region-edit.js +32 -0
- package/dist/image-subject-map.js +523 -0
- package/dist/image.js +46 -0
- package/dist/index.js +12 -0
- package/dist/job-deadline.js +60 -0
- package/dist/jobs/_alibaba-upload.js +30 -0
- package/dist/jobs/_audio-chunks.js +31 -0
- package/dist/jobs/_download-into-asset.js +15 -0
- package/dist/jobs/_fal-shared.js +22 -0
- package/dist/jobs/_fal-upload.js +35 -0
- package/dist/jobs/_image-edit-adapter.js +213 -0
- package/dist/jobs/_kie-poll.js +119 -0
- package/dist/jobs/_kie-upload.js +32 -0
- package/dist/jobs/_lease.js +163 -0
- package/dist/jobs/_persist-output.js +19 -0
- package/dist/jobs/_storage-retry.js +21 -0
- package/dist/jobs/_transcribe.js +245 -0
- package/dist/jobs/_translate-transcript.js +270 -0
- package/dist/jobs/analyze-alive-captions.js +10 -0
- package/dist/jobs/analyze-editing-moments.js +104 -0
- package/dist/jobs/analyze-jokes.js +143 -0
- package/dist/jobs/analyze-keyword-placement.js +155 -0
- package/dist/jobs/analyze-music.js +14 -0
- package/dist/jobs/analyze-video.js +282 -0
- package/dist/jobs/apply-cuts.js +83 -0
- package/dist/jobs/apply-sfx.js +107 -0
- package/dist/jobs/archive-clip.js +457 -0
- package/dist/jobs/assemble-goal.js +98 -0
- package/dist/jobs/audio-boost.js +71 -0
- package/dist/jobs/audio-mix.js +161 -0
- package/dist/jobs/backfill-asset-tags.js +144 -0
- package/dist/jobs/burn-watermark.js +316 -0
- package/dist/jobs/change-video-speed.js +176 -0
- package/dist/jobs/clean-video-audio.js +207 -0
- package/dist/jobs/cold-open.js +166 -0
- package/dist/jobs/combine-goal.js +108 -0
- package/dist/jobs/complete-provider-task.js +185 -0
- package/dist/jobs/copy-library-asset.js +33 -0
- package/dist/jobs/cost-estimate-assessment.js +113 -0
- package/dist/jobs/crop-image.js +47 -0
- package/dist/jobs/crop-video.js +71 -0
- package/dist/jobs/describe-image.js +181 -0
- package/dist/jobs/detect-scenes.js +33 -0
- package/dist/jobs/doctor-fix.js +100 -0
- package/dist/jobs/download-video.js +426 -0
- package/dist/jobs/enqueue-search-index.js +24 -0
- package/dist/jobs/even-split.js +122 -0
- package/dist/jobs/export-sequence.js +365 -0
- package/dist/jobs/extend-audio.js +229 -0
- package/dist/jobs/extract-audio.js +72 -0
- package/dist/jobs/extract-frame.js +58 -0
- package/dist/jobs/extract-notebook-audio.js +82 -0
- package/dist/jobs/extract-notebook-frame.js +93 -0
- package/dist/jobs/extract-video-clip.js +8 -0
- package/dist/jobs/extract-video-poster.js +55 -0
- package/dist/jobs/extract-waveform.js +25 -0
- package/dist/jobs/finish-goal.js +255 -0
- package/dist/jobs/forget-asset.js +11 -0
- package/dist/jobs/generate-acestep-cover.js +219 -0
- package/dist/jobs/generate-media.js +70 -0
- package/dist/jobs/image-subjects.js +1059 -0
- package/dist/jobs/index.js +18 -0
- package/dist/jobs/inject-first-frame.js +175 -0
- package/dist/jobs/isolate-vocals.js +69 -0
- package/dist/jobs/kie-paygate.js +177 -0
- package/dist/jobs/label-music-sections.js +5 -0
- package/dist/jobs/osg-placement.js +135 -0
- package/dist/jobs/pad-video.js +72 -0
- package/dist/jobs/plan-goal.js +97 -0
- package/dist/jobs/post-record.js +21 -0
- package/dist/jobs/post-to-x.js +21 -0
- package/dist/jobs/prepare-search-reference.js +190 -0
- package/dist/jobs/prepare-temporal-search.js +16 -0
- package/dist/jobs/process-audio.js +67 -0
- package/dist/jobs/process-image.js +58 -0
- package/dist/jobs/process-upload.js +166 -0
- package/dist/jobs/process-video.js +438 -0
- package/dist/jobs/register-all.js +161 -0
- package/dist/jobs/relayout-notebook.js +78 -0
- package/dist/jobs/remove-sound.js +299 -0
- package/dist/jobs/render-project.js +380 -0
- package/dist/jobs/render-qr-outro.js +138 -0
- package/dist/jobs/render-timeline.js +283 -0
- package/dist/jobs/repair-search-indexes.js +42 -0
- package/dist/jobs/replace-video-audio.js +64 -0
- package/dist/jobs/restore-archive-clip.js +53 -0
- package/dist/jobs/reverse-video.js +53 -0
- package/dist/jobs/rewrite-script.js +173 -0
- package/dist/jobs/run-notebook.js +3335 -0
- package/dist/jobs/semantic-index.js +797 -0
- package/dist/jobs/smooth-scene-concat.js +257 -0
- package/dist/jobs/splice-video.js +280 -0
- package/dist/jobs/split-video.js +127 -0
- package/dist/jobs/suggest-cuts.js +149 -0
- package/dist/jobs/suggest-sfx.js +135 -0
- package/dist/jobs/sync-video-to-audio.js +329 -0
- package/dist/jobs/tag-asset.js +266 -0
- package/dist/jobs/task-failure.js +16 -0
- package/dist/jobs/timewarp-video.js +152 -0
- package/dist/jobs/transcribe-video-audio.js +117 -0
- package/dist/jobs/transcribe.js +35 -0
- package/dist/jobs/translate-transcript.js +55 -0
- package/dist/jobs/trim-audio.js +133 -0
- package/dist/jobs/trim-video.js +291 -0
- package/dist/jobs/xai-paygate.js +26 -0
- package/dist/keyword-placement-cache.js +74 -0
- package/dist/lazy-render.js +142 -0
- package/dist/library-browse.js +78 -0
- package/dist/lightning-defaults.js +206 -0
- package/dist/load-env.js +9 -0
- package/dist/local-search-models.js +206 -0
- package/dist/local-upload.js +318 -0
- package/dist/logger.js +69 -0
- package/dist/media/adapters/alibaba.js +20 -0
- package/dist/media/adapters/elevenlabs.js +58 -0
- package/dist/media/adapters/fal.js +45 -0
- package/dist/media/adapters/index.js +26 -0
- package/dist/media/adapters/kie.js +120 -0
- package/dist/media/adapters/pending.js +21 -0
- package/dist/media/adapters/types.js +5 -0
- package/dist/media/adapters/xai.js +18 -0
- package/dist/media/catalog.js +236 -0
- package/dist/media/complete.js +191 -0
- package/dist/media/cost.js +45 -0
- package/dist/media/descriptor.js +157 -0
- package/dist/media/endpoints.js +11 -0
- package/dist/media/frame-options.js +18 -0
- package/dist/media/insert-video-timing.js +17 -0
- package/dist/media/json-schema.js +75 -0
- package/dist/media/legacy-task-types.js +129 -0
- package/dist/media/listing.js +24 -0
- package/dist/media/model-id.js +14 -0
- package/dist/media/preview.js +86 -0
- package/dist/media/prompt-dialects.js +65 -0
- package/dist/media/ref-fields.js +106 -0
- package/dist/media/refs.js +131 -0
- package/dist/media/request.js +188 -0
- package/dist/media/types.js +6 -0
- package/dist/media/wire.js +161 -0
- package/dist/media-library.js +535 -0
- package/dist/media-output-path.js +33 -0
- package/dist/multyculty-workflow.js +757 -0
- package/dist/notebook-action-catalog.js +608 -0
- package/dist/notebook-cell-outputs.js +726 -0
- package/dist/notebook-credit-retry.js +45 -0
- package/dist/notebook-fixtures.js +8 -0
- package/dist/notebook-generation-contract.js +77 -0
- package/dist/notebook-generation-controls.js +145 -0
- package/dist/notebook-goal-layout.js +40 -0
- package/dist/notebook-graph.js +37 -0
- package/dist/notebook-image-edit.js +84 -0
- package/dist/notebook-initial-generation-prompt.js +222 -0
- package/dist/notebook-live-analysis.js +941 -0
- package/dist/notebook-media-ops.js +579 -0
- package/dist/notebook-mutations.js +20 -0
- package/dist/notebook-placement.js +41 -0
- package/dist/notebook-provider-failure.js +87 -0
- package/dist/notebook-published-post.js +26 -0
- package/dist/notebook-reference-resolver.js +227 -0
- package/dist/notebook-relayout.js +270 -0
- package/dist/notebook-run-plan.js +519 -0
- package/dist/notebook-shots.js +162 -0
- package/dist/notebook-workflow.js +856 -0
- package/dist/openai-intelligence.js +99 -0
- package/dist/original-media-file.js +12 -0
- package/dist/osg-assets.js +36 -0
- package/dist/osg-placement-cache.js +64 -0
- package/dist/osg-settings.js +27 -0
- package/dist/paid-tools.js +22 -0
- package/dist/platform-guidance.js +26 -0
- package/dist/posts/dropbox-auth.js +91 -0
- package/dist/posts/dropbox-upload.js +132 -0
- package/dist/posts/icloud-drive.js +134 -0
- package/dist/posts/icloud-status.js +64 -0
- package/dist/posts/post-contract.js +2 -0
- package/dist/posts/post-copy-format.js +43 -0
- package/dist/posts/post-copy.js +193 -0
- package/dist/posts/post-folder.js +18 -0
- package/dist/posts/post-metrics.js +119 -0
- package/dist/posts/post-store.js +340 -0
- package/dist/posts/x-post-target.js +43 -0
- package/dist/preview-payload.js +90 -0
- package/dist/prompt-surfaces.js +22 -0
- package/dist/provider-prompt-transform.js +77 -0
- package/dist/provider-status-link.js +21 -0
- package/dist/provider-task-record.js +78 -0
- package/dist/provider-task-status.js +47 -0
- package/dist/provider-usage.js +294 -0
- package/dist/queue.js +806 -0
- package/dist/reference-video-duration.js +17 -0
- package/dist/remotion/BlurFillVideo.js +51 -0
- package/dist/remotion/KeywordGraphicsOverlay.js +68 -0
- package/dist/remotion/OsgOverlay.js +30 -0
- package/dist/remotion/QrOutroComposition.js +47 -0
- package/dist/remotion/RenderComposition.js +11 -0
- package/dist/remotion/browser.js +59 -0
- package/dist/remotion/constants.js +35 -0
- package/dist/remotion/index.js +66 -0
- package/dist/remotion/keyword-graphics.js +151 -0
- package/dist/remotion/keyword-placement.js +182 -0
- package/dist/remotion/osg-spec.js +198 -0
- package/dist/remotion/public/qr-outro-impact.wav +0 -0
- package/dist/remotion/qr-outro-audio.js +1 -0
- package/dist/remotion/qr-outro-spec.js +211 -0
- package/dist/remotion/shared-bundle.js +37 -0
- package/dist/remotion/subtitles/AliveCaptions.js +83 -0
- package/dist/remotion/subtitles/Highlight.js +58 -0
- package/dist/remotion/subtitles/Impact.js +67 -0
- package/dist/remotion/subtitles/SubtitleOverlay.js +9 -0
- package/dist/remotion/subtitles/alive-layout.js +321 -0
- package/dist/remotion/subtitles/alive-types.js +17 -0
- package/dist/remotion/subtitles/chunker.js +68 -0
- package/dist/remotion/subtitles/segments.js +42 -0
- package/dist/remotion/subtitles/styles.js +4 -0
- package/dist/remotion/subtitles/types.js +1 -0
- package/dist/remotion/util.js +18 -0
- package/dist/remotion-cancellation.js +15 -0
- package/dist/rename-helpers.js +204 -0
- package/dist/rhythm/analyze.js +128 -0
- package/dist/rhythm/contract.js +14 -0
- package/dist/rhythm/draft-model.js +19 -0
- package/dist/rhythm/energy.js +133 -0
- package/dist/rhythm/fft.js +44 -0
- package/dist/rhythm/model.js +71 -0
- package/dist/rhythm/music-analysis.js +124 -0
- package/dist/rhythm/music-draft.js +261 -0
- package/dist/rhythm/onset.js +101 -0
- package/dist/rhythm/run-worker.js +51 -0
- package/dist/rhythm/score.js +47 -0
- package/dist/rhythm/section-labels.js +168 -0
- package/dist/rhythm/sequence-rhythm.js +67 -0
- package/dist/rhythm/synthesize.js +103 -0
- package/dist/rhythm/timing.js +98 -0
- package/dist/rhythm/track.js +320 -0
- package/dist/rhythm/visual-fit.js +4 -0
- package/dist/rhythm/worker.js +25 -0
- package/dist/scene-detect.js +200 -0
- package/dist/scene-transition.js +12 -0
- package/dist/scheduled-posts.js +200 -0
- package/dist/search-index-coverage.js +13 -0
- package/dist/search-index-media.js +71 -0
- package/dist/search-reference-store.js +60 -0
- package/dist/search-scoring.js +17 -0
- package/dist/serve.js +150 -0
- package/dist/server-lock.js +143 -0
- package/dist/server.js +42 -0
- package/dist/srt.js +16 -0
- package/dist/tag-backfill-state.js +121 -0
- package/dist/tag-settings.js +30 -0
- package/dist/tag-vocabulary.js +237 -0
- package/dist/test-queue-cleanup.js +1 -0
- package/dist/time-parse.js +50 -0
- package/dist/timeline-helpers.js +554 -0
- package/dist/timewarp.js +87 -0
- package/dist/tools/_image-inputs.js +9 -0
- package/dist/tools/_media-refs.js +84 -0
- package/dist/tools/_shared.js +59 -0
- package/dist/tools/_suggest-shared.js +279 -0
- package/dist/tools/add-timeline-audio.js +73 -0
- package/dist/tools/alive-captions.js +157 -0
- package/dist/tools/analyze-jokes.js +56 -0
- package/dist/tools/analyze-video.js +66 -0
- package/dist/tools/animate-keywords.js +217 -0
- package/dist/tools/api-status.js +42 -0
- package/dist/tools/application-commands.js +34 -0
- package/dist/tools/apply-cuts.js +112 -0
- package/dist/tools/apply-sfx.js +152 -0
- package/dist/tools/apply-watermark.js +670 -0
- package/dist/tools/archive-clip.js +74 -0
- package/dist/tools/asset-history.js +61 -0
- package/dist/tools/asset-manifest.js +24 -0
- package/dist/tools/asset-tags.js +151 -0
- package/dist/tools/assign-slot.js +97 -0
- package/dist/tools/audio-boost.js +107 -0
- package/dist/tools/audio-mix.js +121 -0
- package/dist/tools/book-usage.js +16 -0
- package/dist/tools/chain.js +136 -0
- package/dist/tools/change-video-speed.js +105 -0
- package/dist/tools/chat-history.js +5 -0
- package/dist/tools/chat.js +848 -0
- package/dist/tools/clean-video-audio.js +97 -0
- package/dist/tools/clear-failed-tasks.js +66 -0
- package/dist/tools/cold-open.js +114 -0
- package/dist/tools/command-plan.js +1680 -0
- package/dist/tools/commands.js +1666 -0
- package/dist/tools/concat-images.js +236 -0
- package/dist/tools/connect-service.js +55 -0
- package/dist/tools/copy-file-to-clipboard.js +58 -0
- package/dist/tools/create-character.js +114 -0
- package/dist/tools/create-qart.js +253 -0
- package/dist/tools/create-qr-outro.js +149 -0
- package/dist/tools/create-qrbtf.js +215 -0
- package/dist/tools/create-watermark.js +97 -0
- package/dist/tools/crop-asset.js +18 -0
- package/dist/tools/crop-image.js +120 -0
- package/dist/tools/crop-video.js +97 -0
- package/dist/tools/delete-asset.js +104 -0
- package/dist/tools/describe-image.js +69 -0
- package/dist/tools/detect-scenes.js +44 -0
- package/dist/tools/doctor.js +126 -0
- package/dist/tools/download-video.js +114 -0
- package/dist/tools/duplicate-asset.js +184 -0
- package/dist/tools/edit-timeline.js +59 -0
- package/dist/tools/editing-moments.js +105 -0
- package/dist/tools/estimate-cost.js +171 -0
- package/dist/tools/even-split.js +295 -0
- package/dist/tools/export-asset-file.js +22 -0
- package/dist/tools/export-asset.js +140 -0
- package/dist/tools/export-sequence.js +250 -0
- package/dist/tools/export-to-downloads.js +54 -0
- package/dist/tools/export-transcript-srt.js +79 -0
- package/dist/tools/extend-audio.js +100 -0
- package/dist/tools/extract-audio.js +174 -0
- package/dist/tools/extract-frame.js +108 -0
- package/dist/tools/extract-notebook-audio.js +173 -0
- package/dist/tools/extract-notebook-frame.js +160 -0
- package/dist/tools/extract-video-clip.js +101 -0
- package/dist/tools/generate-media.js +157 -0
- package/dist/tools/generation-payload.js +48 -0
- package/dist/tools/get-timeline.js +12 -0
- package/dist/tools/get-watermark-config.js +38 -0
- package/dist/tools/goal.js +644 -0
- package/dist/tools/image-subjects.js +711 -0
- package/dist/tools/index.js +323 -0
- package/dist/tools/inject-first-frame.js +154 -0
- package/dist/tools/invert-image.js +70 -0
- package/dist/tools/isolate-vocals.js +66 -0
- package/dist/tools/list-assets.js +98 -0
- package/dist/tools/list-cell-generations.js +225 -0
- package/dist/tools/list-elevenlabs-voices.js +163 -0
- package/dist/tools/log-wrapper.js +29 -0
- package/dist/tools/make-cover-song.js +95 -0
- package/dist/tools/mark-asset-seen.js +23 -0
- package/dist/tools/media-library.js +245 -0
- package/dist/tools/move-timeline-audio.js +35 -0
- package/dist/tools/music-analysis.js +60 -0
- package/dist/tools/music-draft.js +29 -0
- package/dist/tools/pad-video.js +87 -0
- package/dist/tools/post-record.js +83 -0
- package/dist/tools/post.js +168 -0
- package/dist/tools/prompt-history.js +164 -0
- package/dist/tools/provider-key-status.js +248 -0
- package/dist/tools/qrbtf-render.js +849 -0
- package/dist/tools/read-asset-metadata.js +26 -0
- package/dist/tools/read-file-at-commit.js +29 -0
- package/dist/tools/read-transcript.js +41 -0
- package/dist/tools/reconcile-project-work.js +1452 -0
- package/dist/tools/recover-asset.js +28 -0
- package/dist/tools/remove-sound.js +72 -0
- package/dist/tools/remove-timeline-audio.js +34 -0
- package/dist/tools/remove-timeline-slot.js +40 -0
- package/dist/tools/rename-all.js +434 -0
- package/dist/tools/rename-asset.js +34 -0
- package/dist/tools/render-settings.js +47 -0
- package/dist/tools/render-timeline.js +120 -0
- package/dist/tools/render.js +384 -0
- package/dist/tools/reorder-character-images.js +45 -0
- package/dist/tools/replace-video-audio.js +133 -0
- package/dist/tools/restore-archive-clips.js +209 -0
- package/dist/tools/restore-asset-version.js +37 -0
- package/dist/tools/retry-generation.js +54 -0
- package/dist/tools/reverse-video.js +74 -0
- package/dist/tools/rewrite-prompt.js +388 -0
- package/dist/tools/rewrite-script.js +67 -0
- package/dist/tools/schema-from-apicity.js +66 -0
- package/dist/tools/search-archive.js +150 -0
- package/dist/tools/semantic-search.js +1214 -0
- package/dist/tools/sequence-rhythm.js +43 -0
- package/dist/tools/set-character-metadata.js +84 -0
- package/dist/tools/set-env-secret.js +40 -0
- package/dist/tools/set-osg.js +143 -0
- package/dist/tools/show-folder.js +37 -0
- package/dist/tools/smooth-scene-concat.js +122 -0
- package/dist/tools/splice-video.js +149 -0
- package/dist/tools/split-video.js +202 -0
- package/dist/tools/suggest-cuts.js +45 -0
- package/dist/tools/suggest-sfx.js +43 -0
- package/dist/tools/sync-video-to-audio.js +115 -0
- package/dist/tools/tag-backfill.js +177 -0
- package/dist/tools/timewarp-video.js +85 -0
- package/dist/tools/tool-def.js +1 -0
- package/dist/tools/tool-json-schema.js +116 -0
- package/dist/tools/transcribe.js +90 -0
- package/dist/tools/translate-subtitles.js +59 -0
- package/dist/tools/trim-audio.js +139 -0
- package/dist/tools/trim-video.js +168 -0
- package/dist/tools/update-script.js +25 -0
- package/dist/tools/update-timeline-audio.js +40 -0
- package/dist/tools/upload-file.js +41 -0
- package/dist/tools/verify-x-mentions.js +141 -0
- package/dist/tools/video-editing-command-contract.js +291 -0
- package/dist/tools/video-source-reference.js +30 -0
- package/dist/tools/video-time-input.js +18 -0
- package/dist/tools/videobook-domain.js +2006 -0
- package/dist/tools/wait-for-asset-ready.js +143 -0
- package/dist/tools/workspace-actions.js +54 -0
- package/dist/transcript-projection.js +202 -0
- package/dist/transcript-srt.js +33 -0
- package/dist/upload.js +76 -0
- package/dist/usage-providers.js +25 -0
- package/dist/video-analysis-projection.js +46 -0
- package/dist/video-poster.js +33 -0
- package/dist/video-proxy.js +99 -0
- package/dist/vision-regions.js +111 -0
- package/dist/voice-actions.js +90 -0
- package/dist/voice-audio.js +55 -0
- package/dist/voice-config.js +122 -0
- package/dist/voice-continuation.js +54 -0
- package/dist/voice-contract.js +1 -0
- package/dist/voice-http.js +145 -0
- package/dist/voice-reply-progress.js +55 -0
- package/dist/voice-session.js +992 -0
- package/dist/watermark-badge.js +259 -0
- package/dist/watermark-config.js +111 -0
- package/dist/watermark-handle-position.js +55 -0
- package/dist/watermark-platform.js +15 -0
- package/dist/watermark-timing.js +16 -0
- package/dist/workspace-action-catalog.js +315 -0
- package/dist/workspace-action-contract.js +21 -0
- package/dist/workspace-action-groups.js +98 -0
- package/dist/workspace-action-surfaces.js +7 -0
- package/dist/x/account.js +88 -0
- package/dist/x/authenticated-handle.js +30 -0
- package/dist/x/oauth-flow.js +191 -0
- package/dist/x/post-contract.js +1 -0
- package/dist/x/post-metadata.js +44 -0
- package/dist/x/post-to-x.js +456 -0
- package/dist/x/published-post-cell.js +90 -0
- package/dist/x/x-tokens.js +69 -0
- package/dist/zod-slots.js +334 -0
- package/package.json +92 -4
- package/ui/assets/alive-captions-BWb5nLKj.css +1 -0
- package/ui/assets/alive-captions-DPEr1nKM.js +1 -0
- package/ui/assets/confirm-bodies-D8ouHXKy.js +1 -0
- package/ui/assets/confirm-bodies-DrMhaXC6.css +1 -0
- package/ui/assets/fullscreen-B7nw4YbE.js +1 -0
- package/ui/assets/goal-ui-DK-xTCK0.js +2 -0
- package/ui/assets/goal-ui-DXdUM2KF.css +1 -0
- package/ui/assets/index-DzPAnCUj.css +1 -0
- package/ui/assets/index-kS1905s5.js +37 -0
- package/ui/assets/inspector-MlzQbTVo.js +1 -0
- package/ui/assets/jobs-ui-CoinOWx0.js +1 -0
- package/ui/assets/music-video-Cbe80kmQ.js +1 -0
- package/ui/assets/music-video-DPaiKKEq.css +1 -0
- package/ui/assets/ui-Oirr9VOf.css +1 -0
- package/ui/assets/ui-xo_Y1yQg.js +2 -0
- package/ui/assets/vendor-D2rfiZ5j.css +1 -0
- package/ui/assets/vendor-DfTCWgKm.js +19 -0
- package/ui/assets/vendor-flow-BXbeWxW7.js +7 -0
- package/ui/assets/vendor-flow-BnuhLJ6X.css +1 -0
- package/ui/assets/vendor-icons-CGqhCIXV.js +1 -0
- package/ui/assets/vendor-mcp-BTlEJcHV.js +67 -0
- package/ui/assets/vendor-react-Dj7D1fD4.js +9 -0
- package/ui/assets/vendor-remotion-CH1HXrlc.js +95 -0
- package/ui/assets/videobook-Qlp9HQFu.js +20 -0
- package/ui/favicon.svg +8 -0
- package/ui/index.html +126 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { toolError } from "./_shared.js";
|
|
3
|
+
import { INTELLIGENCE_MODEL, buildIntelligenceResponses, firstResponseText, intelligenceRequest, } from "../openai-intelligence.js";
|
|
4
|
+
export const MENTION_VERIFICATION_MODEL = INTELLIGENCE_MODEL;
|
|
5
|
+
const XAI_TIMEOUT_MS = 60_000;
|
|
6
|
+
const MAX_MENTIONS = 10;
|
|
7
|
+
const MAX_TEXT_CHARS = 1_000;
|
|
8
|
+
/** Extract unique X handles from post text. X usernames are 1-15 chars of
|
|
9
|
+
* [A-Za-z0-9_]; tokens followed by a hyphen (asset slugs like @vid-clip) and
|
|
10
|
+
* email-style @s preceded by a word character are excluded. */
|
|
11
|
+
export function extractXMentions(text) {
|
|
12
|
+
const handles = [];
|
|
13
|
+
const seen = new Set();
|
|
14
|
+
for (const match of text.matchAll(/(^|[^\w@])@([A-Za-z0-9_]{1,15})(?![\w-])/g)) {
|
|
15
|
+
const handle = match[2];
|
|
16
|
+
const key = handle.toLowerCase();
|
|
17
|
+
if (seen.has(key))
|
|
18
|
+
continue;
|
|
19
|
+
seen.add(key);
|
|
20
|
+
handles.push(handle);
|
|
21
|
+
}
|
|
22
|
+
return handles;
|
|
23
|
+
}
|
|
24
|
+
const VERDICTS_JSON_SCHEMA = {
|
|
25
|
+
type: "object",
|
|
26
|
+
additionalProperties: false,
|
|
27
|
+
properties: {
|
|
28
|
+
mentions: {
|
|
29
|
+
type: "array",
|
|
30
|
+
items: {
|
|
31
|
+
type: "object",
|
|
32
|
+
additionalProperties: false,
|
|
33
|
+
properties: {
|
|
34
|
+
handle: { type: "string" },
|
|
35
|
+
exists: { type: ["boolean", "null"] },
|
|
36
|
+
display_name: { type: ["string", "null"] },
|
|
37
|
+
summary: { type: ["string", "null"] },
|
|
38
|
+
},
|
|
39
|
+
required: ["handle", "exists", "display_name", "summary"],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
required: ["mentions"],
|
|
44
|
+
};
|
|
45
|
+
const VERIFY_INSTRUCTIONS = [
|
|
46
|
+
"You verify X (Twitter) handles using web search.",
|
|
47
|
+
"For each handle, determine whether an account with EXACTLY that username exists on X.",
|
|
48
|
+
"Usernames are case-insensitive; ignore lookalike or similar usernames.",
|
|
49
|
+
"Set exists=true only when you confirm the exact username.",
|
|
50
|
+
"Set exists=false only when search results positively indicate the username is nonexistent, unclaimed, or suspended.",
|
|
51
|
+
"When you can neither confirm nor refute the exact profile (for example a small account you cannot load), set exists=null.",
|
|
52
|
+
"display_name is the account's current display name and summary is one short sentence about the account from its bio or posts; use null for either when unknown.",
|
|
53
|
+
"Never guess.",
|
|
54
|
+
].join(" ");
|
|
55
|
+
function responseText(response) {
|
|
56
|
+
const citations = [];
|
|
57
|
+
for (const item of response.output) {
|
|
58
|
+
if (item.type !== "message")
|
|
59
|
+
continue;
|
|
60
|
+
for (const content of item.content) {
|
|
61
|
+
if (content.type !== "output_text")
|
|
62
|
+
continue;
|
|
63
|
+
for (const annotation of content.annotations ?? []) {
|
|
64
|
+
if (annotation.type === "url_citation" && annotation.url && !citations.includes(annotation.url)) {
|
|
65
|
+
citations.push(annotation.url);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return { text: firstResponseText(response), citations };
|
|
71
|
+
}
|
|
72
|
+
export async function verifyXMentionsWithOpenAi(responses, handles, signal) {
|
|
73
|
+
const response = await responses(intelligenceRequest({
|
|
74
|
+
input: [
|
|
75
|
+
{ role: "user", content: `Verify these X handles: ${handles.map((handle) => `@${handle}`).join(", ")}` },
|
|
76
|
+
],
|
|
77
|
+
instructions: VERIFY_INSTRUCTIONS,
|
|
78
|
+
tools: [{ type: "web_search_preview" }],
|
|
79
|
+
text: {
|
|
80
|
+
format: {
|
|
81
|
+
type: "json_schema",
|
|
82
|
+
name: "x_mention_verdicts",
|
|
83
|
+
schema: VERDICTS_JSON_SCHEMA,
|
|
84
|
+
strict: true,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
}), signal);
|
|
88
|
+
const { text, citations } = responseText(response);
|
|
89
|
+
const parsed = JSON.parse(text);
|
|
90
|
+
if (!Array.isArray(parsed.mentions)) {
|
|
91
|
+
throw new Error("OpenAI verification response is missing the mentions array");
|
|
92
|
+
}
|
|
93
|
+
const byHandle = new Map(parsed.mentions.map((verdict) => [verdict.handle.replace(/^@/, "").toLowerCase(), verdict]));
|
|
94
|
+
const mentions = handles.map((handle) => {
|
|
95
|
+
const verdict = byHandle.get(handle.toLowerCase());
|
|
96
|
+
return {
|
|
97
|
+
handle,
|
|
98
|
+
exists: verdict?.exists ?? null,
|
|
99
|
+
display_name: verdict?.display_name ?? null,
|
|
100
|
+
summary: verdict?.summary ?? null,
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
return { mentions, citations, model: response.model };
|
|
104
|
+
}
|
|
105
|
+
export function verifyXMentionsDef() {
|
|
106
|
+
return {
|
|
107
|
+
name: "verify_x_mentions",
|
|
108
|
+
description: "Verify that @-mentions in post text are real X (Twitter) accounts using OpenAI web search. Returns per-handle verdicts (exists true/false/null) with display names and one-line summaries.",
|
|
109
|
+
schema: {
|
|
110
|
+
text: z.string().min(1).max(MAX_TEXT_CHARS).describe("Post text containing @handles to verify"),
|
|
111
|
+
book_id: z.string().describe("Book id"),
|
|
112
|
+
},
|
|
113
|
+
handler: async (args) => {
|
|
114
|
+
const { text } = args;
|
|
115
|
+
if (!process.env.OPENAI_API_KEY) {
|
|
116
|
+
return toolError("OPENAI_API_KEY environment variable is not set");
|
|
117
|
+
}
|
|
118
|
+
const handles = extractXMentions(text).slice(0, MAX_MENTIONS);
|
|
119
|
+
if (handles.length === 0) {
|
|
120
|
+
return {
|
|
121
|
+
content: [{
|
|
122
|
+
type: "text",
|
|
123
|
+
text: JSON.stringify({ mentions: [], citations: [], model: MENTION_VERIFICATION_MODEL }),
|
|
124
|
+
}],
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const responses = buildIntelligenceResponses(process.env.OPENAI_API_KEY, {
|
|
128
|
+
timeout: XAI_TIMEOUT_MS,
|
|
129
|
+
});
|
|
130
|
+
try {
|
|
131
|
+
const verification = await verifyXMentionsWithOpenAi(responses, handles);
|
|
132
|
+
return {
|
|
133
|
+
content: [{ type: "text", text: JSON.stringify(verification) }],
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
return toolError(`Mention verification failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
export const COMMAND_ADAPTER_NAMES = [
|
|
2
|
+
"apply_cuts",
|
|
3
|
+
"apply_sfx",
|
|
4
|
+
"change_speed",
|
|
5
|
+
"duplicate",
|
|
6
|
+
"keywords",
|
|
7
|
+
"qr_outro",
|
|
8
|
+
"qrbtf",
|
|
9
|
+
"rewrite_script",
|
|
10
|
+
"sync_audio",
|
|
11
|
+
"timewarp",
|
|
12
|
+
"translate_subtitles",
|
|
13
|
+
"trim",
|
|
14
|
+
];
|
|
15
|
+
export const VIDEO_EDITING_COMMANDS = [
|
|
16
|
+
{
|
|
17
|
+
command: "/trim-video",
|
|
18
|
+
description: "Trim video clip",
|
|
19
|
+
example: "/trim-video @hero-intro 0:05 0:12",
|
|
20
|
+
category: "action",
|
|
21
|
+
icon: "Scissors",
|
|
22
|
+
size: "lg",
|
|
23
|
+
variant: "default",
|
|
24
|
+
chevron: "right",
|
|
25
|
+
params: [
|
|
26
|
+
{ name: "asset_id", type: "string", required: true, description: "Asset to trim" },
|
|
27
|
+
{ name: "start", type: "string", required: false, description: "Start timestamp" },
|
|
28
|
+
{ name: "end", type: "string", required: false, description: "End timestamp" },
|
|
29
|
+
],
|
|
30
|
+
mcpTool: { tool: "trim_video", adapter: "trim", autoInject: ["book_id"] },
|
|
31
|
+
exposure: "direct",
|
|
32
|
+
aliases: ["/trim"],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
command: "/trim-audio",
|
|
36
|
+
description: "Trim audio clip",
|
|
37
|
+
example: "/trim-audio @aud-voiceover-main 0:00 0:30",
|
|
38
|
+
category: "action",
|
|
39
|
+
icon: "Scissors",
|
|
40
|
+
size: "default",
|
|
41
|
+
variant: "emerald",
|
|
42
|
+
chevron: "right",
|
|
43
|
+
params: [
|
|
44
|
+
{ name: "asset_id", type: "string", required: true, description: "Audio asset to trim (aud-*)" },
|
|
45
|
+
{ name: "start", type: "string", required: false, description: "Start timestamp" },
|
|
46
|
+
{ name: "end", type: "string", required: false, description: "End timestamp" },
|
|
47
|
+
],
|
|
48
|
+
mcpTool: { tool: "trim_audio", adapter: "trim", autoInject: ["book_id"] },
|
|
49
|
+
exposure: "direct",
|
|
50
|
+
aliases: [],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
command: "/split-chunks",
|
|
54
|
+
description: "Split a video into targeted chunks plus a leftover while preserving the source",
|
|
55
|
+
example: "/split-chunks @vid-source 10 15",
|
|
56
|
+
category: "context_menu",
|
|
57
|
+
icon: "Scissors",
|
|
58
|
+
size: "default",
|
|
59
|
+
variant: "violet",
|
|
60
|
+
chevron: "right",
|
|
61
|
+
params: [
|
|
62
|
+
{ name: "asset_id", type: "string", required: true, description: "Video asset to split" },
|
|
63
|
+
{ name: "target_secs", type: "string[]", required: false, description: "Ordered chunk lengths (default 7 seconds)" },
|
|
64
|
+
],
|
|
65
|
+
mcpTool: { tool: "split_video_by_durations", autoInject: ["book_id"] },
|
|
66
|
+
exposure: "direct",
|
|
67
|
+
aliases: ["/even-split"],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
command: "/overlay",
|
|
71
|
+
description: "Place an on-screen graphic overlay on a video",
|
|
72
|
+
example: "/overlay @vid-yt-clip @img-logo",
|
|
73
|
+
category: "context_menu",
|
|
74
|
+
icon: "Tv",
|
|
75
|
+
size: "default",
|
|
76
|
+
variant: "default",
|
|
77
|
+
chevron: "right",
|
|
78
|
+
params: [
|
|
79
|
+
{ name: "asset_id", type: "string", required: true, description: "Video asset to overlay" },
|
|
80
|
+
{ name: "image", type: "string", required: false, description: "Image asset to use as the overlay" },
|
|
81
|
+
],
|
|
82
|
+
uiAction: "open_osg",
|
|
83
|
+
exposure: "ui",
|
|
84
|
+
aliases: ["/osg"],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
command: "/apply-cuts",
|
|
88
|
+
description: "Apply trim cuts to a video clip in place",
|
|
89
|
+
example: "/apply-cuts @vid-clip 0-5 10-15",
|
|
90
|
+
category: "action",
|
|
91
|
+
icon: "Scissors",
|
|
92
|
+
size: "default",
|
|
93
|
+
variant: "violet",
|
|
94
|
+
chevron: "right",
|
|
95
|
+
params: [
|
|
96
|
+
{ name: "asset_id", type: "string", required: true, description: "Video asset ID" },
|
|
97
|
+
{ name: "cuts", type: "string[]", required: true, description: "Cut ranges, e.g. 0-5 10-15" },
|
|
98
|
+
],
|
|
99
|
+
mcpTool: { tool: "apply_cuts", adapter: "apply_cuts", autoInject: ["book_id"] },
|
|
100
|
+
exposure: "direct",
|
|
101
|
+
aliases: [],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
command: "/extract-frame",
|
|
105
|
+
description: "Extract a frame at a specific timestamp from a video as an image asset",
|
|
106
|
+
example: "/extract-frame @vid-clip 2.5",
|
|
107
|
+
category: "context_menu",
|
|
108
|
+
icon: "Image",
|
|
109
|
+
size: "default",
|
|
110
|
+
variant: "default",
|
|
111
|
+
chevron: "right",
|
|
112
|
+
params: [
|
|
113
|
+
{ name: "asset_id", type: "string", required: true, description: "Video asset to extract from" },
|
|
114
|
+
{ name: "timestamp", type: "number", required: true, description: "Timestamp in seconds" },
|
|
115
|
+
],
|
|
116
|
+
mcpTool: { tool: "extract_frame", autoInject: ["book_id"] },
|
|
117
|
+
exposure: "direct",
|
|
118
|
+
aliases: [],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
command: "/transcript",
|
|
122
|
+
description: "Read transcript of a video or audio asset",
|
|
123
|
+
example: "/transcript @vid-interview",
|
|
124
|
+
category: "action",
|
|
125
|
+
icon: "FileText",
|
|
126
|
+
size: "default",
|
|
127
|
+
variant: "violet",
|
|
128
|
+
chevron: "right",
|
|
129
|
+
params: [
|
|
130
|
+
{ name: "asset_id", type: "string", required: true, description: "Asset ID to read transcript for" },
|
|
131
|
+
],
|
|
132
|
+
mcpTool: { tool: "read_transcript", autoInject: ["book_id"] },
|
|
133
|
+
exposure: "direct",
|
|
134
|
+
aliases: [],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
command: "/translate-subs",
|
|
138
|
+
description: "Translate video subtitles to a target language",
|
|
139
|
+
example: "/translate-subs @vid-clip es",
|
|
140
|
+
category: "action",
|
|
141
|
+
icon: "Languages",
|
|
142
|
+
size: "default",
|
|
143
|
+
variant: "violet",
|
|
144
|
+
chevron: "right",
|
|
145
|
+
params: [
|
|
146
|
+
{ name: "asset_id", type: "string", required: true, description: "Video asset ID" },
|
|
147
|
+
{ name: "target_language", type: "string", required: true, description: "Two-letter target language code" },
|
|
148
|
+
],
|
|
149
|
+
mcpTool: { tool: "translate_subtitles", adapter: "translate_subtitles", autoInject: ["book_id"] },
|
|
150
|
+
exposure: "direct",
|
|
151
|
+
aliases: [],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
command: "/final",
|
|
155
|
+
description: "Finalize and export the project timeline",
|
|
156
|
+
example: "/final portrait",
|
|
157
|
+
category: "action",
|
|
158
|
+
icon: "Clapperboard",
|
|
159
|
+
size: "default",
|
|
160
|
+
variant: "default",
|
|
161
|
+
chevron: "right",
|
|
162
|
+
params: [
|
|
163
|
+
{ name: "orientation", type: "string", required: false, description: "landscape, portrait, or square (default: active tab)" },
|
|
164
|
+
],
|
|
165
|
+
mcpTool: { tool: "render_timeline", autoInject: ["book_id"] },
|
|
166
|
+
exposure: "direct",
|
|
167
|
+
aliases: [],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
command: "/render-video",
|
|
171
|
+
description: "Render a video asset",
|
|
172
|
+
example: "/render-video @hero-intro portrait",
|
|
173
|
+
category: "action",
|
|
174
|
+
icon: "Film",
|
|
175
|
+
size: "lg",
|
|
176
|
+
variant: "violet",
|
|
177
|
+
chevron: "right",
|
|
178
|
+
params: [
|
|
179
|
+
{ name: "asset_id", type: "string", required: true, description: "Video asset to render" },
|
|
180
|
+
{ name: "orientation", type: "string", required: false, description: "landscape, portrait, or square (default: all)" },
|
|
181
|
+
],
|
|
182
|
+
mcpTool: { tool: "render_video", autoInject: ["book_id"] },
|
|
183
|
+
exposure: "direct",
|
|
184
|
+
aliases: ["/render"],
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
command: "/audio-settings",
|
|
188
|
+
description: "Audio viewer settings for volume and fades",
|
|
189
|
+
example: "/audio-settings volume 80",
|
|
190
|
+
category: "viewer",
|
|
191
|
+
icon: "volume-2",
|
|
192
|
+
size: "sm",
|
|
193
|
+
variant: "default",
|
|
194
|
+
chevron: "right",
|
|
195
|
+
params: [
|
|
196
|
+
{ name: "field", type: "string", required: true, description: "volume, fade-in, or fade-out" },
|
|
197
|
+
{ name: "value", type: "string", required: false, description: "Numeric value" },
|
|
198
|
+
],
|
|
199
|
+
uiAction: "settings_audio",
|
|
200
|
+
exposure: "ui",
|
|
201
|
+
aliases: ["/audio"],
|
|
202
|
+
},
|
|
203
|
+
];
|
|
204
|
+
export const VIDEO_EDITING_TOOL_CONTRACTS = [
|
|
205
|
+
{ tool: "prepare_cold_open", exposure: "composite", command: "/edit-cold-open", purpose: "Select an AI highlight for review" },
|
|
206
|
+
{ tool: "edit_cold_open", exposure: "composite", command: "/edit-cold-open", purpose: "Render a reviewed cold-open copy" },
|
|
207
|
+
{ tool: "trim_video", exposure: "direct", command: "/trim-video", purpose: "Keep or remove a time range from video" },
|
|
208
|
+
{ tool: "trim_audio", exposure: "direct", command: "/trim-audio", purpose: "Keep or remove a time range from audio" },
|
|
209
|
+
{ tool: "split_video", exposure: "composite", command: "/split", purpose: "Create and run two notebook split branches" },
|
|
210
|
+
{ tool: "split_video_by_durations", exposure: "direct", command: "/split-chunks", purpose: "Split video into target-duration chunks" },
|
|
211
|
+
{ tool: "pad_video", exposure: "direct", command: "/pad", purpose: "Append black frames and silence" },
|
|
212
|
+
{ tool: "crop_asset", exposure: "ui", command: "/crop", purpose: "Interactive image or video crop" },
|
|
213
|
+
{ tool: "invert_image", exposure: "direct", command: "/invert", purpose: "Invert image colors" },
|
|
214
|
+
{ tool: "set_video_overlay", exposure: "ui", command: "/overlay", purpose: "Configure an on-screen graphic" },
|
|
215
|
+
{ tool: "animate_keywords", exposure: "direct", command: "/keywords", purpose: "Configure transcript-timed keyword graphics" },
|
|
216
|
+
{ tool: "alive_captions", exposure: "ui", command: "/alive", purpose: "Analyze a video for stacked, frame-aware alive captions" },
|
|
217
|
+
{ tool: "set_alive_captions", exposure: "ui", command: "/alive", purpose: "Save alive caption style, motion and placement" },
|
|
218
|
+
{ tool: "detect_scenes", exposure: "direct", command: "/detect-scenes", purpose: "Detect visual scene boundaries" },
|
|
219
|
+
{ tool: "suggest_cuts", exposure: "direct", command: "/suggest-cuts", purpose: "Suggest removable video ranges" },
|
|
220
|
+
{ tool: "analyze_jokes", exposure: "direct", command: "/analyze-jokes", purpose: "Analyze edit points around jokes" },
|
|
221
|
+
{ tool: "suggest_sfx", exposure: "direct", command: "/suggest-sfx", purpose: "Suggest sound-effect placements" },
|
|
222
|
+
{ tool: "apply_cuts", exposure: "direct", command: "/apply-cuts", purpose: "Remove one or more video ranges" },
|
|
223
|
+
{ tool: "apply_sfx", exposure: "direct", command: "/apply-sfx", purpose: "Generate and mix sound effects" },
|
|
224
|
+
{ tool: "inject_first_frame", exposure: "direct", command: "/inject-first-frame", purpose: "Replace frame zero with an image" },
|
|
225
|
+
{ tool: "extract_frame", exposure: "direct", command: "/extract-frame", purpose: "Extract the first, last or a timed video frame" },
|
|
226
|
+
{ tool: "extract_notebook_frame", exposure: "internal", purpose: "Extract a frame from a video cell into a new image cell" },
|
|
227
|
+
{ tool: "extract_notebook_audio", exposure: "internal", purpose: "Extract audio from a video cell into a new audio cell" },
|
|
228
|
+
{ tool: "extract_video_clip", exposure: "internal", purpose: "Extract a notebook video clip" },
|
|
229
|
+
{ tool: "extract_audio", exposure: "direct", command: "/extract-audio", purpose: "Extract a video soundtrack" },
|
|
230
|
+
{ tool: "make_cover_song", exposure: "direct", command: "/make-cover-song", purpose: "Make an exact-duration instrumental cover from video or audio" },
|
|
231
|
+
{ tool: "extend_audio_asset", exposure: "direct", command: "/extend-audio", purpose: "Extend an audio asset" },
|
|
232
|
+
{ tool: "remove_sound", exposure: "direct", command: "/remove-sound", purpose: "Remove a described sound" },
|
|
233
|
+
{ tool: "audio_boost", exposure: "direct", command: "/audio-boost", purpose: "Increase audio volume" },
|
|
234
|
+
{ tool: "audio_mix", exposure: "direct", command: "/audio-mix", purpose: "Mix an audio layer into an asset" },
|
|
235
|
+
{ tool: "replace_video_audio", exposure: "direct", command: "/replace-audio", purpose: "Replace a video soundtrack" },
|
|
236
|
+
{ tool: "splice_video", exposure: "direct", command: "/splice", purpose: "Splice two or more videos" },
|
|
237
|
+
{ tool: "smooth_scene_concat", exposure: "direct", command: "/scene-concat", purpose: "Join scenes with aligned audio" },
|
|
238
|
+
{ tool: "reverse_video", exposure: "direct", command: "/reverse", purpose: "Reverse video playback" },
|
|
239
|
+
{ tool: "change_video_speed", exposure: "direct", command: "/speed", purpose: "Change playback speed or duration" },
|
|
240
|
+
{ tool: "timewarp_video", exposure: "direct", command: "/timewarp", purpose: "Retime a selected scene" },
|
|
241
|
+
{ tool: "sync_video_to_audio", exposure: "direct", command: "/sync-audio", purpose: "Retime video to audio anchors" },
|
|
242
|
+
{ tool: "transcribe", exposure: "direct", command: "/transcribe", purpose: "Transcribe an asset" },
|
|
243
|
+
{ tool: "read_transcript", exposure: "direct", command: "/transcript", purpose: "Read an asset transcript" },
|
|
244
|
+
{ tool: "analyze_video", exposure: "internal", purpose: "Describe a video from sampled frames and its transcript" },
|
|
245
|
+
{ tool: "translate_subtitles", exposure: "direct", command: "/translate-subs", purpose: "Translate timed subtitles" },
|
|
246
|
+
{ tool: "clean_video_audio", exposure: "direct", command: "/clean-audio", purpose: "Clean a video soundtrack" },
|
|
247
|
+
{ tool: "isolate_vocals", exposure: "direct", command: "/vocals", purpose: "Isolate vocals" },
|
|
248
|
+
{ tool: "render_video", exposure: "direct", command: "/render-video", purpose: "Render a video asset" },
|
|
249
|
+
{ tool: "render_timeline", exposure: "direct", command: "/final", purpose: "Render the project timeline" },
|
|
250
|
+
{ tool: "get_timeline", exposure: "internal", purpose: "Read raw timeline state" },
|
|
251
|
+
{ tool: "set_timeline", exposure: "internal", purpose: "Replace raw timeline state" },
|
|
252
|
+
{ tool: "assign_slot", exposure: "direct", command: "/assign", purpose: "Assign an asset to a timeline slot" },
|
|
253
|
+
{ tool: "remove_timeline_slot", exposure: "direct", command: "/remove-slot", purpose: "Remove a timeline slot" },
|
|
254
|
+
{ tool: "add_timeline_audio", exposure: "ui", command: "/audio-add", purpose: "Add timeline audio" },
|
|
255
|
+
{ tool: "move_timeline_audio", exposure: "ui", command: "/audio-move", purpose: "Move timeline audio" },
|
|
256
|
+
{ tool: "remove_timeline_audio", exposure: "ui", command: "/audio-remove", purpose: "Remove timeline audio" },
|
|
257
|
+
{ tool: "update_timeline_audio", exposure: "ui", command: "/audio-set", purpose: "Update timeline audio settings" },
|
|
258
|
+
{ tool: "get_render_settings", exposure: "ui", command: "/settings", purpose: "Read render settings" },
|
|
259
|
+
{ tool: "create_watermark_card", exposure: "composite", command: "/watermark", purpose: "Create and apply a watermark card" },
|
|
260
|
+
{ tool: "apply_watermark", exposure: "composite", command: "/watermark", purpose: "Preview and apply optional positioned QR and floating handle watermarks" },
|
|
261
|
+
];
|
|
262
|
+
function inferredExposure(command) {
|
|
263
|
+
if (command.exposure)
|
|
264
|
+
return command.exposure;
|
|
265
|
+
if (command.mcpTool)
|
|
266
|
+
return "direct";
|
|
267
|
+
return "ui";
|
|
268
|
+
}
|
|
269
|
+
export function canonicalizeCommands(commands) {
|
|
270
|
+
const names = new Set();
|
|
271
|
+
const canonicalCommands = [];
|
|
272
|
+
for (const command of commands) {
|
|
273
|
+
const aliases = command.aliases ?? [];
|
|
274
|
+
const canonical = {
|
|
275
|
+
...command,
|
|
276
|
+
canonical: command.command,
|
|
277
|
+
aliases,
|
|
278
|
+
deprecated: false,
|
|
279
|
+
exposure: inferredExposure(command),
|
|
280
|
+
};
|
|
281
|
+
for (const name of [canonical.command, ...aliases]) {
|
|
282
|
+
if (!name.startsWith("/"))
|
|
283
|
+
throw new Error(`Invalid slash command name: ${name}`);
|
|
284
|
+
if (names.has(name))
|
|
285
|
+
throw new Error(`Duplicate slash command name or alias: ${name}`);
|
|
286
|
+
names.add(name);
|
|
287
|
+
}
|
|
288
|
+
canonicalCommands.push(canonical);
|
|
289
|
+
}
|
|
290
|
+
return canonicalCommands;
|
|
291
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { normalizeNotebookReference } from "videobook-engine/notebook-mentions";
|
|
2
|
+
import { resolveNotebookArtifactReference } from "../notebook-reference-resolver.js";
|
|
3
|
+
function notebookCandidates(engine, notebookId) {
|
|
4
|
+
if (!notebookId)
|
|
5
|
+
return engine.notebooks.list();
|
|
6
|
+
const notebook = engine.notebooks.read(notebookId);
|
|
7
|
+
if (!notebook.ok)
|
|
8
|
+
throw new Error(notebook.error.message);
|
|
9
|
+
return [notebook.value];
|
|
10
|
+
}
|
|
11
|
+
export function resolveVideoAssetReference(engine, reference, notebookId) {
|
|
12
|
+
const normalized = normalizeNotebookReference(reference);
|
|
13
|
+
if (!normalized)
|
|
14
|
+
throw new Error("asset_id is required");
|
|
15
|
+
const notebooks = notebookCandidates(engine, notebookId);
|
|
16
|
+
const result = resolveNotebookArtifactReference({
|
|
17
|
+
engine,
|
|
18
|
+
documents: notebooks,
|
|
19
|
+
reference: normalized,
|
|
20
|
+
});
|
|
21
|
+
if (!("code" in result))
|
|
22
|
+
return result.artifactId;
|
|
23
|
+
if (result.code === "ambiguous") {
|
|
24
|
+
throw new Error(`Video source @${normalized} is ambiguous; include notebook_id`);
|
|
25
|
+
}
|
|
26
|
+
if (result.code === "no_output" || result.code === "not_media") {
|
|
27
|
+
throw new Error(`Video source @${normalized} has no media output yet`);
|
|
28
|
+
}
|
|
29
|
+
throw new Error(`Video source @${normalized} was not found`);
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { parseTime } from "../time-parse.js";
|
|
3
|
+
export const videoTimestampSchema = z.union([
|
|
4
|
+
z.number(),
|
|
5
|
+
z.string().min(1),
|
|
6
|
+
]);
|
|
7
|
+
export function parseVideoTimestamp(value, name) {
|
|
8
|
+
try {
|
|
9
|
+
const parsed = parseTime(value);
|
|
10
|
+
if (value !== undefined && parsed === undefined) {
|
|
11
|
+
throw new Error(`${name} is required`);
|
|
12
|
+
}
|
|
13
|
+
return parsed;
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
throw new Error(`${name} must be seconds or a timestamp such as 15s or 1:30`);
|
|
17
|
+
}
|
|
18
|
+
}
|