@kenkaiiii/gg-editor 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/LICENSE +21 -0
- package/README.md +453 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +173 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/ass.d.ts +75 -0
- package/dist/core/ass.d.ts.map +1 -0
- package/dist/core/ass.js +128 -0
- package/dist/core/ass.js.map +1 -0
- package/dist/core/ass.test.d.ts +2 -0
- package/dist/core/ass.test.d.ts.map +1 -0
- package/dist/core/ass.test.js +112 -0
- package/dist/core/ass.test.js.map +1 -0
- package/dist/core/audio-cleanup.d.ts +16 -0
- package/dist/core/audio-cleanup.d.ts.map +1 -0
- package/dist/core/audio-cleanup.js +79 -0
- package/dist/core/audio-cleanup.js.map +1 -0
- package/dist/core/audio-cleanup.test.d.ts +2 -0
- package/dist/core/audio-cleanup.test.d.ts.map +1 -0
- package/dist/core/audio-cleanup.test.js +41 -0
- package/dist/core/audio-cleanup.test.js.map +1 -0
- package/dist/core/audio-mix.d.ts +89 -0
- package/dist/core/audio-mix.d.ts.map +1 -0
- package/dist/core/audio-mix.js +156 -0
- package/dist/core/audio-mix.js.map +1 -0
- package/dist/core/audio-mix.test.d.ts +2 -0
- package/dist/core/audio-mix.test.d.ts.map +1 -0
- package/dist/core/audio-mix.test.js +91 -0
- package/dist/core/audio-mix.test.js.map +1 -0
- package/dist/core/auth/anthropic.d.ts +4 -0
- package/dist/core/auth/anthropic.d.ts.map +1 -0
- package/dist/core/auth/anthropic.js +78 -0
- package/dist/core/auth/anthropic.js.map +1 -0
- package/dist/core/auth/index.d.ts +7 -0
- package/dist/core/auth/index.d.ts.map +1 -0
- package/dist/core/auth/index.js +6 -0
- package/dist/core/auth/index.js.map +1 -0
- package/dist/core/auth/login.d.ts +13 -0
- package/dist/core/auth/login.d.ts.map +1 -0
- package/dist/core/auth/login.js +188 -0
- package/dist/core/auth/login.js.map +1 -0
- package/dist/core/auth/openai.d.ts +4 -0
- package/dist/core/auth/openai.d.ts.map +1 -0
- package/dist/core/auth/openai.js +170 -0
- package/dist/core/auth/openai.js.map +1 -0
- package/dist/core/auth/pkce.d.ts +5 -0
- package/dist/core/auth/pkce.d.ts.map +1 -0
- package/dist/core/auth/pkce.js +17 -0
- package/dist/core/auth/pkce.js.map +1 -0
- package/dist/core/auth/storage.d.ts +29 -0
- package/dist/core/auth/storage.d.ts.map +1 -0
- package/dist/core/auth/storage.js +127 -0
- package/dist/core/auth/storage.js.map +1 -0
- package/dist/core/auth/types.d.ts +22 -0
- package/dist/core/auth/types.d.ts.map +1 -0
- package/dist/core/auth/types.js +12 -0
- package/dist/core/auth/types.js.map +1 -0
- package/dist/core/clustering.d.ts +52 -0
- package/dist/core/clustering.d.ts.map +1 -0
- package/dist/core/clustering.js +163 -0
- package/dist/core/clustering.js.map +1 -0
- package/dist/core/clustering.test.d.ts +2 -0
- package/dist/core/clustering.test.d.ts.map +1 -0
- package/dist/core/clustering.test.js +112 -0
- package/dist/core/clustering.test.js.map +1 -0
- package/dist/core/color-match.d.ts +19 -0
- package/dist/core/color-match.d.ts.map +1 -0
- package/dist/core/color-match.js +118 -0
- package/dist/core/color-match.js.map +1 -0
- package/dist/core/color-match.test.d.ts +2 -0
- package/dist/core/color-match.test.d.ts.map +1 -0
- package/dist/core/color-match.test.js +40 -0
- package/dist/core/color-match.test.js.map +1 -0
- package/dist/core/ducking.d.ts +37 -0
- package/dist/core/ducking.d.ts.map +1 -0
- package/dist/core/ducking.js +71 -0
- package/dist/core/ducking.js.map +1 -0
- package/dist/core/ducking.test.d.ts +2 -0
- package/dist/core/ducking.test.d.ts.map +1 -0
- package/dist/core/ducking.test.js +38 -0
- package/dist/core/ducking.test.js.map +1 -0
- package/dist/core/edl-roundtrip.test.d.ts +2 -0
- package/dist/core/edl-roundtrip.test.d.ts.map +1 -0
- package/dist/core/edl-roundtrip.test.js +171 -0
- package/dist/core/edl-roundtrip.test.js.map +1 -0
- package/dist/core/edl.d.ts +41 -0
- package/dist/core/edl.d.ts.map +1 -0
- package/dist/core/edl.js +56 -0
- package/dist/core/edl.js.map +1 -0
- package/dist/core/edl.test.d.ts +2 -0
- package/dist/core/edl.test.d.ts.map +1 -0
- package/dist/core/edl.test.js +62 -0
- package/dist/core/edl.test.js.map +1 -0
- package/dist/core/envelope-sync.d.ts +52 -0
- package/dist/core/envelope-sync.d.ts.map +1 -0
- package/dist/core/envelope-sync.js +169 -0
- package/dist/core/envelope-sync.js.map +1 -0
- package/dist/core/envelope-sync.test.d.ts +2 -0
- package/dist/core/envelope-sync.test.d.ts.map +1 -0
- package/dist/core/envelope-sync.test.js +70 -0
- package/dist/core/envelope-sync.test.js.map +1 -0
- package/dist/core/fcpxml-roundtrip.test.d.ts +2 -0
- package/dist/core/fcpxml-roundtrip.test.d.ts.map +1 -0
- package/dist/core/fcpxml-roundtrip.test.js +251 -0
- package/dist/core/fcpxml-roundtrip.test.js.map +1 -0
- package/dist/core/fcpxml.d.ts +172 -0
- package/dist/core/fcpxml.d.ts.map +1 -0
- package/dist/core/fcpxml.js +406 -0
- package/dist/core/fcpxml.js.map +1 -0
- package/dist/core/fcpxml.test.d.ts +2 -0
- package/dist/core/fcpxml.test.d.ts.map +1 -0
- package/dist/core/fcpxml.test.js +360 -0
- package/dist/core/fcpxml.test.js.map +1 -0
- package/dist/core/filler-words.d.ts +107 -0
- package/dist/core/filler-words.d.ts.map +1 -0
- package/dist/core/filler-words.js +221 -0
- package/dist/core/filler-words.js.map +1 -0
- package/dist/core/filler-words.test.d.ts +2 -0
- package/dist/core/filler-words.test.d.ts.map +1 -0
- package/dist/core/filler-words.test.js +177 -0
- package/dist/core/filler-words.test.js.map +1 -0
- package/dist/core/format.d.ts +36 -0
- package/dist/core/format.d.ts.map +1 -0
- package/dist/core/format.js +57 -0
- package/dist/core/format.js.map +1 -0
- package/dist/core/format.test.d.ts +2 -0
- package/dist/core/format.test.d.ts.map +1 -0
- package/dist/core/format.test.js +81 -0
- package/dist/core/format.test.js.map +1 -0
- package/dist/core/frames.d.ts +35 -0
- package/dist/core/frames.d.ts.map +1 -0
- package/dist/core/frames.js +64 -0
- package/dist/core/frames.js.map +1 -0
- package/dist/core/hook-analysis.d.ts +90 -0
- package/dist/core/hook-analysis.d.ts.map +1 -0
- package/dist/core/hook-analysis.js +222 -0
- package/dist/core/hook-analysis.js.map +1 -0
- package/dist/core/hook-analysis.test.d.ts +2 -0
- package/dist/core/hook-analysis.test.d.ts.map +1 -0
- package/dist/core/hook-analysis.test.js +130 -0
- package/dist/core/hook-analysis.test.js.map +1 -0
- package/dist/core/hosts/detect.d.ts +17 -0
- package/dist/core/hosts/detect.d.ts.map +1 -0
- package/dist/core/hosts/detect.js +64 -0
- package/dist/core/hosts/detect.js.map +1 -0
- package/dist/core/hosts/detect.test.d.ts +2 -0
- package/dist/core/hosts/detect.test.d.ts.map +1 -0
- package/dist/core/hosts/detect.test.js +17 -0
- package/dist/core/hosts/detect.test.js.map +1 -0
- package/dist/core/hosts/index.d.ts +13 -0
- package/dist/core/hosts/index.d.ts.map +1 -0
- package/dist/core/hosts/index.js +30 -0
- package/dist/core/hosts/index.js.map +1 -0
- package/dist/core/hosts/lazy.d.ts +53 -0
- package/dist/core/hosts/lazy.d.ts.map +1 -0
- package/dist/core/hosts/lazy.js +125 -0
- package/dist/core/hosts/lazy.js.map +1 -0
- package/dist/core/hosts/lazy.test.d.ts +2 -0
- package/dist/core/hosts/lazy.test.d.ts.map +1 -0
- package/dist/core/hosts/lazy.test.js +117 -0
- package/dist/core/hosts/lazy.test.js.map +1 -0
- package/dist/core/hosts/none/adapter.d.ts +74 -0
- package/dist/core/hosts/none/adapter.d.ts.map +1 -0
- package/dist/core/hosts/none/adapter.js +99 -0
- package/dist/core/hosts/none/adapter.js.map +1 -0
- package/dist/core/hosts/premiere/adapter.d.ts +87 -0
- package/dist/core/hosts/premiere/adapter.d.ts.map +1 -0
- package/dist/core/hosts/premiere/adapter.js +218 -0
- package/dist/core/hosts/premiere/adapter.js.map +1 -0
- package/dist/core/hosts/premiere/bridge-source.d.ts +26 -0
- package/dist/core/hosts/premiere/bridge-source.d.ts.map +1 -0
- package/dist/core/hosts/premiere/bridge-source.js +326 -0
- package/dist/core/hosts/premiere/bridge-source.js.map +1 -0
- package/dist/core/hosts/premiere/bridge-source.test.d.ts +2 -0
- package/dist/core/hosts/premiere/bridge-source.test.d.ts.map +1 -0
- package/dist/core/hosts/premiere/bridge-source.test.js +36 -0
- package/dist/core/hosts/premiere/bridge-source.test.js.map +1 -0
- package/dist/core/hosts/premiere/bridge.d.ts +38 -0
- package/dist/core/hosts/premiere/bridge.d.ts.map +1 -0
- package/dist/core/hosts/premiere/bridge.js +238 -0
- package/dist/core/hosts/premiere/bridge.js.map +1 -0
- package/dist/core/hosts/premiere/http-bridge.d.ts +47 -0
- package/dist/core/hosts/premiere/http-bridge.d.ts.map +1 -0
- package/dist/core/hosts/premiere/http-bridge.js +82 -0
- package/dist/core/hosts/premiere/http-bridge.js.map +1 -0
- package/dist/core/hosts/premiere/http-bridge.test.d.ts +2 -0
- package/dist/core/hosts/premiere/http-bridge.test.d.ts.map +1 -0
- package/dist/core/hosts/premiere/http-bridge.test.js +113 -0
- package/dist/core/hosts/premiere/http-bridge.test.js.map +1 -0
- package/dist/core/hosts/premiere/ws-bridge.d.ts +91 -0
- package/dist/core/hosts/premiere/ws-bridge.d.ts.map +1 -0
- package/dist/core/hosts/premiere/ws-bridge.js +303 -0
- package/dist/core/hosts/premiere/ws-bridge.js.map +1 -0
- package/dist/core/hosts/premiere/ws-bridge.test.d.ts +2 -0
- package/dist/core/hosts/premiere/ws-bridge.test.d.ts.map +1 -0
- package/dist/core/hosts/premiere/ws-bridge.test.js +146 -0
- package/dist/core/hosts/premiere/ws-bridge.test.js.map +1 -0
- package/dist/core/hosts/resolve/adapter.d.ts +99 -0
- package/dist/core/hosts/resolve/adapter.d.ts.map +1 -0
- package/dist/core/hosts/resolve/adapter.js +187 -0
- package/dist/core/hosts/resolve/adapter.js.map +1 -0
- package/dist/core/hosts/resolve/bridge-source.d.ts +17 -0
- package/dist/core/hosts/resolve/bridge-source.d.ts.map +1 -0
- package/dist/core/hosts/resolve/bridge-source.js +660 -0
- package/dist/core/hosts/resolve/bridge-source.js.map +1 -0
- package/dist/core/hosts/resolve/bridge.d.ts +51 -0
- package/dist/core/hosts/resolve/bridge.d.ts.map +1 -0
- package/dist/core/hosts/resolve/bridge.integration.test.d.ts +2 -0
- package/dist/core/hosts/resolve/bridge.integration.test.d.ts.map +1 -0
- package/dist/core/hosts/resolve/bridge.integration.test.js +472 -0
- package/dist/core/hosts/resolve/bridge.integration.test.js.map +1 -0
- package/dist/core/hosts/resolve/bridge.js +270 -0
- package/dist/core/hosts/resolve/bridge.js.map +1 -0
- package/dist/core/hosts/resolve/bridge.test.d.ts +2 -0
- package/dist/core/hosts/resolve/bridge.test.d.ts.map +1 -0
- package/dist/core/hosts/resolve/bridge.test.js +50 -0
- package/dist/core/hosts/resolve/bridge.test.js.map +1 -0
- package/dist/core/hosts/types.d.ts +167 -0
- package/dist/core/hosts/types.d.ts.map +1 -0
- package/dist/core/hosts/types.js +27 -0
- package/dist/core/hosts/types.js.map +1 -0
- package/dist/core/keyframes.d.ts +35 -0
- package/dist/core/keyframes.d.ts.map +1 -0
- package/dist/core/keyframes.js +90 -0
- package/dist/core/keyframes.js.map +1 -0
- package/dist/core/keyframes.test.d.ts +2 -0
- package/dist/core/keyframes.test.d.ts.map +1 -0
- package/dist/core/keyframes.test.js +73 -0
- package/dist/core/keyframes.test.js.map +1 -0
- package/dist/core/keyword-captions.d.ts +75 -0
- package/dist/core/keyword-captions.d.ts.map +1 -0
- package/dist/core/keyword-captions.js +285 -0
- package/dist/core/keyword-captions.js.map +1 -0
- package/dist/core/keyword-captions.test.d.ts +2 -0
- package/dist/core/keyword-captions.test.d.ts.map +1 -0
- package/dist/core/keyword-captions.test.js +90 -0
- package/dist/core/keyword-captions.test.js.map +1 -0
- package/dist/core/loudness.d.ts +52 -0
- package/dist/core/loudness.d.ts.map +1 -0
- package/dist/core/loudness.js +120 -0
- package/dist/core/loudness.js.map +1 -0
- package/dist/core/loudness.test.d.ts +2 -0
- package/dist/core/loudness.test.d.ts.map +1 -0
- package/dist/core/loudness.test.js +34 -0
- package/dist/core/loudness.test.js.map +1 -0
- package/dist/core/marker-colors.d.ts +39 -0
- package/dist/core/marker-colors.d.ts.map +1 -0
- package/dist/core/marker-colors.js +83 -0
- package/dist/core/marker-colors.js.map +1 -0
- package/dist/core/marker-colors.test.d.ts +2 -0
- package/dist/core/marker-colors.test.d.ts.map +1 -0
- package/dist/core/marker-colors.test.js +116 -0
- package/dist/core/marker-colors.test.js.map +1 -0
- package/dist/core/media/ffmpeg.d.ts +27 -0
- package/dist/core/media/ffmpeg.d.ts.map +1 -0
- package/dist/core/media/ffmpeg.js +53 -0
- package/dist/core/media/ffmpeg.js.map +1 -0
- package/dist/core/multicam.d.ts +40 -0
- package/dist/core/multicam.d.ts.map +1 -0
- package/dist/core/multicam.js +77 -0
- package/dist/core/multicam.js.map +1 -0
- package/dist/core/multicam.test.d.ts +2 -0
- package/dist/core/multicam.test.d.ts.map +1 -0
- package/dist/core/multicam.test.js +56 -0
- package/dist/core/multicam.test.js.map +1 -0
- package/dist/core/punch-in.d.ts +72 -0
- package/dist/core/punch-in.d.ts.map +1 -0
- package/dist/core/punch-in.js +133 -0
- package/dist/core/punch-in.js.map +1 -0
- package/dist/core/punch-in.test.d.ts +2 -0
- package/dist/core/punch-in.test.d.ts.map +1 -0
- package/dist/core/punch-in.test.js +118 -0
- package/dist/core/punch-in.test.js.map +1 -0
- package/dist/core/reformat.d.ts +26 -0
- package/dist/core/reformat.d.ts.map +1 -0
- package/dist/core/reformat.js +31 -0
- package/dist/core/reformat.js.map +1 -0
- package/dist/core/reformat.test.d.ts +2 -0
- package/dist/core/reformat.test.d.ts.map +1 -0
- package/dist/core/reformat.test.js +29 -0
- package/dist/core/reformat.test.js.map +1 -0
- package/dist/core/reorder.d.ts +42 -0
- package/dist/core/reorder.d.ts.map +1 -0
- package/dist/core/reorder.js +80 -0
- package/dist/core/reorder.js.map +1 -0
- package/dist/core/reorder.test.d.ts +2 -0
- package/dist/core/reorder.test.d.ts.map +1 -0
- package/dist/core/reorder.test.js +88 -0
- package/dist/core/reorder.test.js.map +1 -0
- package/dist/core/review.d.ts +38 -0
- package/dist/core/review.d.ts.map +1 -0
- package/dist/core/review.js +128 -0
- package/dist/core/review.js.map +1 -0
- package/dist/core/review.test.d.ts +2 -0
- package/dist/core/review.test.d.ts.map +1 -0
- package/dist/core/review.test.js +76 -0
- package/dist/core/review.test.js.map +1 -0
- package/dist/core/sessions.d.ts +40 -0
- package/dist/core/sessions.d.ts.map +1 -0
- package/dist/core/sessions.js +61 -0
- package/dist/core/sessions.js.map +1 -0
- package/dist/core/sfx-on-cuts.d.ts +60 -0
- package/dist/core/sfx-on-cuts.d.ts.map +1 -0
- package/dist/core/sfx-on-cuts.js +90 -0
- package/dist/core/sfx-on-cuts.js.map +1 -0
- package/dist/core/sfx-on-cuts.test.d.ts +2 -0
- package/dist/core/sfx-on-cuts.test.d.ts.map +1 -0
- package/dist/core/sfx-on-cuts.test.js +53 -0
- package/dist/core/sfx-on-cuts.test.js.map +1 -0
- package/dist/core/silence.d.ts +41 -0
- package/dist/core/silence.d.ts.map +1 -0
- package/dist/core/silence.js +104 -0
- package/dist/core/silence.js.map +1 -0
- package/dist/core/silence.test.d.ts +2 -0
- package/dist/core/silence.test.d.ts.map +1 -0
- package/dist/core/silence.test.js +143 -0
- package/dist/core/silence.test.js.map +1 -0
- package/dist/core/skills-loader.d.ts +34 -0
- package/dist/core/skills-loader.d.ts.map +1 -0
- package/dist/core/skills-loader.js +80 -0
- package/dist/core/skills-loader.js.map +1 -0
- package/dist/core/skills-loader.test.d.ts +2 -0
- package/dist/core/skills-loader.test.d.ts.map +1 -0
- package/dist/core/skills-loader.test.js +68 -0
- package/dist/core/skills-loader.test.js.map +1 -0
- package/dist/core/skin-grade.d.ts +62 -0
- package/dist/core/skin-grade.d.ts.map +1 -0
- package/dist/core/skin-grade.js +270 -0
- package/dist/core/skin-grade.js.map +1 -0
- package/dist/core/skin-grade.test.d.ts +2 -0
- package/dist/core/skin-grade.test.d.ts.map +1 -0
- package/dist/core/skin-grade.test.js +182 -0
- package/dist/core/skin-grade.test.js.map +1 -0
- package/dist/core/speaker-changes.d.ts +30 -0
- package/dist/core/speaker-changes.d.ts.map +1 -0
- package/dist/core/speaker-changes.js +19 -0
- package/dist/core/speaker-changes.js.map +1 -0
- package/dist/core/speaker-changes.test.d.ts +2 -0
- package/dist/core/speaker-changes.test.d.ts.map +1 -0
- package/dist/core/speaker-changes.test.js +46 -0
- package/dist/core/speaker-changes.test.js.map +1 -0
- package/dist/core/speed-ramp.d.ts +60 -0
- package/dist/core/speed-ramp.d.ts.map +1 -0
- package/dist/core/speed-ramp.js +113 -0
- package/dist/core/speed-ramp.js.map +1 -0
- package/dist/core/speed-ramp.test.d.ts +2 -0
- package/dist/core/speed-ramp.test.d.ts.map +1 -0
- package/dist/core/speed-ramp.test.js +74 -0
- package/dist/core/speed-ramp.test.js.map +1 -0
- package/dist/core/srt.d.ts +56 -0
- package/dist/core/srt.d.ts.map +1 -0
- package/dist/core/srt.js +90 -0
- package/dist/core/srt.js.map +1 -0
- package/dist/core/srt.test.d.ts +2 -0
- package/dist/core/srt.test.d.ts.map +1 -0
- package/dist/core/srt.test.js +107 -0
- package/dist/core/srt.test.js.map +1 -0
- package/dist/core/stabilize.d.ts +15 -0
- package/dist/core/stabilize.d.ts.map +1 -0
- package/dist/core/stabilize.js +69 -0
- package/dist/core/stabilize.js.map +1 -0
- package/dist/core/styles-loader.d.ts +33 -0
- package/dist/core/styles-loader.d.ts.map +1 -0
- package/dist/core/styles-loader.js +67 -0
- package/dist/core/styles-loader.js.map +1 -0
- package/dist/core/styles-loader.test.d.ts +2 -0
- package/dist/core/styles-loader.test.d.ts.map +1 -0
- package/dist/core/styles-loader.test.js +72 -0
- package/dist/core/styles-loader.test.js.map +1 -0
- package/dist/core/text-overlay.d.ts +76 -0
- package/dist/core/text-overlay.d.ts.map +1 -0
- package/dist/core/text-overlay.js +233 -0
- package/dist/core/text-overlay.js.map +1 -0
- package/dist/core/text-overlay.test.d.ts +2 -0
- package/dist/core/text-overlay.test.d.ts.map +1 -0
- package/dist/core/text-overlay.test.js +103 -0
- package/dist/core/text-overlay.test.js.map +1 -0
- package/dist/core/vision.d.ts +53 -0
- package/dist/core/vision.d.ts.map +1 -0
- package/dist/core/vision.js +150 -0
- package/dist/core/vision.js.map +1 -0
- package/dist/core/vision.test.d.ts +2 -0
- package/dist/core/vision.test.d.ts.map +1 -0
- package/dist/core/vision.test.js +76 -0
- package/dist/core/vision.test.js.map +1 -0
- package/dist/core/whisper.d.ts +188 -0
- package/dist/core/whisper.d.ts.map +1 -0
- package/dist/core/whisper.js +380 -0
- package/dist/core/whisper.js.map +1 -0
- package/dist/core/whisper.test.d.ts +2 -0
- package/dist/core/whisper.test.d.ts.map +1 -0
- package/dist/core/whisper.test.js +262 -0
- package/dist/core/whisper.test.js.map +1 -0
- package/dist/director/delegate-tool.d.ts +22 -0
- package/dist/director/delegate-tool.d.ts.map +1 -0
- package/dist/director/delegate-tool.js +62 -0
- package/dist/director/delegate-tool.js.map +1 -0
- package/dist/director/delegate-tool.test.d.ts +2 -0
- package/dist/director/delegate-tool.test.d.ts.map +1 -0
- package/dist/director/delegate-tool.test.js +38 -0
- package/dist/director/delegate-tool.test.js.map +1 -0
- package/dist/director/director-prompt.d.ts +7 -0
- package/dist/director/director-prompt.d.ts.map +1 -0
- package/dist/director/director-prompt.js +52 -0
- package/dist/director/director-prompt.js.map +1 -0
- package/dist/director/director.d.ts +16 -0
- package/dist/director/director.d.ts.map +1 -0
- package/dist/director/director.js +28 -0
- package/dist/director/director.js.map +1 -0
- package/dist/director/executor.d.ts +19 -0
- package/dist/director/executor.d.ts.map +1 -0
- package/dist/director/executor.js +93 -0
- package/dist/director/executor.js.map +1 -0
- package/dist/director/index.d.ts +6 -0
- package/dist/director/index.d.ts.map +1 -0
- package/dist/director/index.js +5 -0
- package/dist/director/index.js.map +1 -0
- package/dist/director/types.d.ts +38 -0
- package/dist/director/types.d.ts.map +1 -0
- package/dist/director/types.js +2 -0
- package/dist/director/types.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/skills.d.ts +18 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +674 -0
- package/dist/skills.js.map +1 -0
- package/dist/system-prompt.d.ts +35 -0
- package/dist/system-prompt.d.ts.map +1 -0
- package/dist/system-prompt.js +478 -0
- package/dist/system-prompt.js.map +1 -0
- package/dist/system-prompt.test.d.ts +2 -0
- package/dist/system-prompt.test.d.ts.map +1 -0
- package/dist/system-prompt.test.js +87 -0
- package/dist/system-prompt.test.js.map +1 -0
- package/dist/tools/add-fades.d.ts +13 -0
- package/dist/tools/add-fades.d.ts.map +1 -0
- package/dist/tools/add-fades.js +88 -0
- package/dist/tools/add-fades.js.map +1 -0
- package/dist/tools/add-marker.d.ts +31 -0
- package/dist/tools/add-marker.d.ts.map +1 -0
- package/dist/tools/add-marker.js +56 -0
- package/dist/tools/add-marker.js.map +1 -0
- package/dist/tools/add-sfx-at-cuts.d.ts +24 -0
- package/dist/tools/add-sfx-at-cuts.d.ts.map +1 -0
- package/dist/tools/add-sfx-at-cuts.js +120 -0
- package/dist/tools/add-sfx-at-cuts.js.map +1 -0
- package/dist/tools/add-track.d.ts +13 -0
- package/dist/tools/add-track.d.ts.map +1 -0
- package/dist/tools/add-track.js +26 -0
- package/dist/tools/add-track.js.map +1 -0
- package/dist/tools/analyze-hook.d.ts +28 -0
- package/dist/tools/analyze-hook.d.ts.map +1 -0
- package/dist/tools/analyze-hook.js +126 -0
- package/dist/tools/analyze-hook.js.map +1 -0
- package/dist/tools/append-clip.d.ts +10 -0
- package/dist/tools/append-clip.d.ts.map +1 -0
- package/dist/tools/append-clip.js +27 -0
- package/dist/tools/append-clip.js.map +1 -0
- package/dist/tools/apply-lut.d.ts +11 -0
- package/dist/tools/apply-lut.d.ts.map +1 -0
- package/dist/tools/apply-lut.js +33 -0
- package/dist/tools/apply-lut.js.map +1 -0
- package/dist/tools/burn-subtitles.d.ts +28 -0
- package/dist/tools/burn-subtitles.d.ts.map +1 -0
- package/dist/tools/burn-subtitles.js +87 -0
- package/dist/tools/burn-subtitles.js.map +1 -0
- package/dist/tools/clean-audio.d.ts +18 -0
- package/dist/tools/clean-audio.d.ts.map +1 -0
- package/dist/tools/clean-audio.js +54 -0
- package/dist/tools/clean-audio.js.map +1 -0
- package/dist/tools/clone-timeline.d.ts +9 -0
- package/dist/tools/clone-timeline.d.ts.map +1 -0
- package/dist/tools/clone-timeline.js +28 -0
- package/dist/tools/clone-timeline.js.map +1 -0
- package/dist/tools/cluster-takes.d.ts +11 -0
- package/dist/tools/cluster-takes.d.ts.map +1 -0
- package/dist/tools/cluster-takes.js +71 -0
- package/dist/tools/cluster-takes.js.map +1 -0
- package/dist/tools/color-match.d.ts +16 -0
- package/dist/tools/color-match.d.ts.map +1 -0
- package/dist/tools/color-match.js +55 -0
- package/dist/tools/color-match.js.map +1 -0
- package/dist/tools/compose-layered.d.ts +47 -0
- package/dist/tools/compose-layered.d.ts.map +1 -0
- package/dist/tools/compose-layered.js +103 -0
- package/dist/tools/compose-layered.js.map +1 -0
- package/dist/tools/compose-thumbnail.d.ts +35 -0
- package/dist/tools/compose-thumbnail.d.ts.map +1 -0
- package/dist/tools/compose-thumbnail.js +130 -0
- package/dist/tools/compose-thumbnail.js.map +1 -0
- package/dist/tools/concat-videos.d.ts +18 -0
- package/dist/tools/concat-videos.d.ts.map +1 -0
- package/dist/tools/concat-videos.js +79 -0
- package/dist/tools/concat-videos.js.map +1 -0
- package/dist/tools/copy-grade.d.ts +10 -0
- package/dist/tools/copy-grade.d.ts.map +1 -0
- package/dist/tools/copy-grade.js +29 -0
- package/dist/tools/copy-grade.js.map +1 -0
- package/dist/tools/create-timeline.d.ts +12 -0
- package/dist/tools/create-timeline.d.ts.map +1 -0
- package/dist/tools/create-timeline.js +35 -0
- package/dist/tools/create-timeline.js.map +1 -0
- package/dist/tools/crossfade-videos.d.ts +49 -0
- package/dist/tools/crossfade-videos.d.ts.map +1 -0
- package/dist/tools/crossfade-videos.js +121 -0
- package/dist/tools/crossfade-videos.js.map +1 -0
- package/dist/tools/cut-at.d.ts +10 -0
- package/dist/tools/cut-at.d.ts.map +1 -0
- package/dist/tools/cut-at.js +24 -0
- package/dist/tools/cut-at.js.map +1 -0
- package/dist/tools/cut-filler-words.d.ts +27 -0
- package/dist/tools/cut-filler-words.d.ts.map +1 -0
- package/dist/tools/cut-filler-words.js +165 -0
- package/dist/tools/cut-filler-words.js.map +1 -0
- package/dist/tools/detect-silence.d.ts +13 -0
- package/dist/tools/detect-silence.d.ts.map +1 -0
- package/dist/tools/detect-silence.js +98 -0
- package/dist/tools/detect-silence.js.map +1 -0
- package/dist/tools/detect-speaker-changes.d.ts +9 -0
- package/dist/tools/detect-speaker-changes.d.ts.map +1 -0
- package/dist/tools/detect-speaker-changes.js +42 -0
- package/dist/tools/detect-speaker-changes.js.map +1 -0
- package/dist/tools/dry-run.d.ts +23 -0
- package/dist/tools/dry-run.d.ts.map +1 -0
- package/dist/tools/dry-run.js +66 -0
- package/dist/tools/dry-run.js.map +1 -0
- package/dist/tools/dry-run.test.d.ts +2 -0
- package/dist/tools/dry-run.test.d.ts.map +1 -0
- package/dist/tools/dry-run.test.js +66 -0
- package/dist/tools/dry-run.test.js.map +1 -0
- package/dist/tools/duck-audio.d.ts +16 -0
- package/dist/tools/duck-audio.d.ts.map +1 -0
- package/dist/tools/duck-audio.js +73 -0
- package/dist/tools/duck-audio.js.map +1 -0
- package/dist/tools/extract-audio.d.ts +10 -0
- package/dist/tools/extract-audio.d.ts.map +1 -0
- package/dist/tools/extract-audio.js +30 -0
- package/dist/tools/extract-audio.js.map +1 -0
- package/dist/tools/extract-frame.d.ts +12 -0
- package/dist/tools/extract-frame.d.ts.map +1 -0
- package/dist/tools/extract-frame.js +63 -0
- package/dist/tools/extract-frame.js.map +1 -0
- package/dist/tools/generate-gif.d.ts +13 -0
- package/dist/tools/generate-gif.d.ts.map +1 -0
- package/dist/tools/generate-gif.js +94 -0
- package/dist/tools/generate-gif.js.map +1 -0
- package/dist/tools/get-markers.d.ts +13 -0
- package/dist/tools/get-markers.d.ts.map +1 -0
- package/dist/tools/get-markers.js +71 -0
- package/dist/tools/get-markers.js.map +1 -0
- package/dist/tools/get-timeline.d.ts +9 -0
- package/dist/tools/get-timeline.d.ts.map +1 -0
- package/dist/tools/get-timeline.js +43 -0
- package/dist/tools/get-timeline.js.map +1 -0
- package/dist/tools/grade-skin-tones.d.ts +31 -0
- package/dist/tools/grade-skin-tones.d.ts.map +1 -0
- package/dist/tools/grade-skin-tones.js +92 -0
- package/dist/tools/grade-skin-tones.js.map +1 -0
- package/dist/tools/host-info.d.ts +7 -0
- package/dist/tools/host-info.d.ts.map +1 -0
- package/dist/tools/host-info.js +33 -0
- package/dist/tools/host-info.js.map +1 -0
- package/dist/tools/host-tools.test.d.ts +2 -0
- package/dist/tools/host-tools.test.d.ts.map +1 -0
- package/dist/tools/host-tools.test.js +83 -0
- package/dist/tools/host-tools.test.js.map +1 -0
- package/dist/tools/import-edl.d.ts +9 -0
- package/dist/tools/import-edl.d.ts.map +1 -0
- package/dist/tools/import-edl.js +25 -0
- package/dist/tools/import-edl.js.map +1 -0
- package/dist/tools/import-subtitles.d.ts +9 -0
- package/dist/tools/import-subtitles.d.ts.map +1 -0
- package/dist/tools/import-subtitles.js +31 -0
- package/dist/tools/import-subtitles.js.map +1 -0
- package/dist/tools/import-to-media-pool.d.ts +10 -0
- package/dist/tools/import-to-media-pool.d.ts.map +1 -0
- package/dist/tools/import-to-media-pool.js +27 -0
- package/dist/tools/import-to-media-pool.js.map +1 -0
- package/dist/tools/index.d.ts +94 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +242 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/index.test.d.ts +2 -0
- package/dist/tools/index.test.d.ts.map +1 -0
- package/dist/tools/index.test.js +128 -0
- package/dist/tools/index.test.js.map +1 -0
- package/dist/tools/insert-broll.d.ts +13 -0
- package/dist/tools/insert-broll.d.ts.map +1 -0
- package/dist/tools/insert-broll.js +56 -0
- package/dist/tools/insert-broll.js.map +1 -0
- package/dist/tools/ken-burns.d.ts +26 -0
- package/dist/tools/ken-burns.d.ts.map +1 -0
- package/dist/tools/ken-burns.js +125 -0
- package/dist/tools/ken-burns.js.map +1 -0
- package/dist/tools/list-render-presets.d.ts +7 -0
- package/dist/tools/list-render-presets.d.ts.map +1 -0
- package/dist/tools/list-render-presets.js +30 -0
- package/dist/tools/list-render-presets.js.map +1 -0
- package/dist/tools/match-clip-color.d.ts +29 -0
- package/dist/tools/match-clip-color.d.ts.map +1 -0
- package/dist/tools/match-clip-color.js +99 -0
- package/dist/tools/match-clip-color.js.map +1 -0
- package/dist/tools/measure-loudness.d.ts +8 -0
- package/dist/tools/measure-loudness.d.ts.map +1 -0
- package/dist/tools/measure-loudness.js +40 -0
- package/dist/tools/measure-loudness.js.map +1 -0
- package/dist/tools/mix-audio.d.ts +46 -0
- package/dist/tools/mix-audio.d.ts.map +1 -0
- package/dist/tools/mix-audio.js +101 -0
- package/dist/tools/mix-audio.js.map +1 -0
- package/dist/tools/multicam-sync.d.ts +14 -0
- package/dist/tools/multicam-sync.d.ts.map +1 -0
- package/dist/tools/multicam-sync.js +75 -0
- package/dist/tools/multicam-sync.js.map +1 -0
- package/dist/tools/new-tools.test.d.ts +2 -0
- package/dist/tools/new-tools.test.d.ts.map +1 -0
- package/dist/tools/new-tools.test.js +511 -0
- package/dist/tools/new-tools.test.js.map +1 -0
- package/dist/tools/normalize-loudness.d.ts +21 -0
- package/dist/tools/normalize-loudness.d.ts.map +1 -0
- package/dist/tools/normalize-loudness.js +94 -0
- package/dist/tools/normalize-loudness.js.map +1 -0
- package/dist/tools/open-page.d.ts +17 -0
- package/dist/tools/open-page.d.ts.map +1 -0
- package/dist/tools/open-page.js +27 -0
- package/dist/tools/open-page.js.map +1 -0
- package/dist/tools/overlay-watermark.d.ts +28 -0
- package/dist/tools/overlay-watermark.d.ts.map +1 -0
- package/dist/tools/overlay-watermark.js +98 -0
- package/dist/tools/overlay-watermark.js.map +1 -0
- package/dist/tools/pick-best-takes.d.ts +20 -0
- package/dist/tools/pick-best-takes.d.ts.map +1 -0
- package/dist/tools/pick-best-takes.js +147 -0
- package/dist/tools/pick-best-takes.js.map +1 -0
- package/dist/tools/post-tools.test.d.ts +2 -0
- package/dist/tools/post-tools.test.d.ts.map +1 -0
- package/dist/tools/post-tools.test.js +83 -0
- package/dist/tools/post-tools.test.js.map +1 -0
- package/dist/tools/pre-render-check.d.ts +23 -0
- package/dist/tools/pre-render-check.d.ts.map +1 -0
- package/dist/tools/pre-render-check.js +134 -0
- package/dist/tools/pre-render-check.js.map +1 -0
- package/dist/tools/probe-media.d.ts +8 -0
- package/dist/tools/probe-media.d.ts.map +1 -0
- package/dist/tools/probe-media.js +32 -0
- package/dist/tools/probe-media.js.map +1 -0
- package/dist/tools/punch-in.d.ts +30 -0
- package/dist/tools/punch-in.d.ts.map +1 -0
- package/dist/tools/punch-in.js +130 -0
- package/dist/tools/punch-in.js.map +1 -0
- package/dist/tools/read-skill.d.ts +9 -0
- package/dist/tools/read-skill.d.ts.map +1 -0
- package/dist/tools/read-skill.js +24 -0
- package/dist/tools/read-skill.js.map +1 -0
- package/dist/tools/read-transcript.d.ts +14 -0
- package/dist/tools/read-transcript.d.ts.map +1 -0
- package/dist/tools/read-transcript.js +85 -0
- package/dist/tools/read-transcript.js.map +1 -0
- package/dist/tools/read-transcript.test.d.ts +2 -0
- package/dist/tools/read-transcript.test.d.ts.map +1 -0
- package/dist/tools/read-transcript.test.js +136 -0
- package/dist/tools/read-transcript.test.js.map +1 -0
- package/dist/tools/reformat-timeline.d.ts +25 -0
- package/dist/tools/reformat-timeline.d.ts.map +1 -0
- package/dist/tools/reformat-timeline.js +60 -0
- package/dist/tools/reformat-timeline.js.map +1 -0
- package/dist/tools/render.d.ts +10 -0
- package/dist/tools/render.d.ts.map +1 -0
- package/dist/tools/render.js +26 -0
- package/dist/tools/render.js.map +1 -0
- package/dist/tools/reorder-timeline.d.ts +12 -0
- package/dist/tools/reorder-timeline.d.ts.map +1 -0
- package/dist/tools/reorder-timeline.js +65 -0
- package/dist/tools/reorder-timeline.js.map +1 -0
- package/dist/tools/replace-clip.d.ts +10 -0
- package/dist/tools/replace-clip.d.ts.map +1 -0
- package/dist/tools/replace-clip.js +28 -0
- package/dist/tools/replace-clip.js.map +1 -0
- package/dist/tools/review-edit.d.ts +23 -0
- package/dist/tools/review-edit.d.ts.map +1 -0
- package/dist/tools/review-edit.js +47 -0
- package/dist/tools/review-edit.js.map +1 -0
- package/dist/tools/ripple-delete.d.ts +11 -0
- package/dist/tools/ripple-delete.d.ts.map +1 -0
- package/dist/tools/ripple-delete.js +27 -0
- package/dist/tools/ripple-delete.js.map +1 -0
- package/dist/tools/save-project.d.ts +7 -0
- package/dist/tools/save-project.d.ts.map +1 -0
- package/dist/tools/save-project.js +22 -0
- package/dist/tools/save-project.js.map +1 -0
- package/dist/tools/score-shot.d.ts +18 -0
- package/dist/tools/score-shot.d.ts.map +1 -0
- package/dist/tools/score-shot.js +127 -0
- package/dist/tools/score-shot.js.map +1 -0
- package/dist/tools/set-clip-speed.d.ts +10 -0
- package/dist/tools/set-clip-speed.d.ts.map +1 -0
- package/dist/tools/set-clip-speed.js +28 -0
- package/dist/tools/set-clip-speed.js.map +1 -0
- package/dist/tools/set-clip-volume.d.ts +10 -0
- package/dist/tools/set-clip-volume.d.ts.map +1 -0
- package/dist/tools/set-clip-volume.js +33 -0
- package/dist/tools/set-clip-volume.js.map +1 -0
- package/dist/tools/set-primary-correction.d.ts +14 -0
- package/dist/tools/set-primary-correction.d.ts.map +1 -0
- package/dist/tools/set-primary-correction.js +45 -0
- package/dist/tools/set-primary-correction.js.map +1 -0
- package/dist/tools/smart-reframe.d.ts +22 -0
- package/dist/tools/smart-reframe.d.ts.map +1 -0
- package/dist/tools/smart-reframe.js +39 -0
- package/dist/tools/smart-reframe.js.map +1 -0
- package/dist/tools/speed-ramp.d.ts +14 -0
- package/dist/tools/speed-ramp.d.ts.map +1 -0
- package/dist/tools/speed-ramp.js +71 -0
- package/dist/tools/speed-ramp.js.map +1 -0
- package/dist/tools/stabilize-video.d.ts +12 -0
- package/dist/tools/stabilize-video.d.ts.map +1 -0
- package/dist/tools/stabilize-video.js +63 -0
- package/dist/tools/stabilize-video.js.map +1 -0
- package/dist/tools/transcribe.d.ts +29 -0
- package/dist/tools/transcribe.d.ts.map +1 -0
- package/dist/tools/transcribe.js +116 -0
- package/dist/tools/transcribe.js.map +1 -0
- package/dist/tools/transition-videos.d.ts +29 -0
- package/dist/tools/transition-videos.d.ts.map +1 -0
- package/dist/tools/transition-videos.js +129 -0
- package/dist/tools/transition-videos.js.map +1 -0
- package/dist/tools/write-ass.d.ts +34 -0
- package/dist/tools/write-ass.d.ts.map +1 -0
- package/dist/tools/write-ass.js +101 -0
- package/dist/tools/write-ass.js.map +1 -0
- package/dist/tools/write-edl.d.ts +24 -0
- package/dist/tools/write-edl.d.ts.map +1 -0
- package/dist/tools/write-edl.js +59 -0
- package/dist/tools/write-edl.js.map +1 -0
- package/dist/tools/write-fcpxml.d.ts +20 -0
- package/dist/tools/write-fcpxml.d.ts.map +1 -0
- package/dist/tools/write-fcpxml.js +52 -0
- package/dist/tools/write-fcpxml.js.map +1 -0
- package/dist/tools/write-keyword-captions.d.ts +36 -0
- package/dist/tools/write-keyword-captions.d.ts.map +1 -0
- package/dist/tools/write-keyword-captions.js +183 -0
- package/dist/tools/write-keyword-captions.js.map +1 -0
- package/dist/tools/write-lower-third.d.ts +34 -0
- package/dist/tools/write-lower-third.d.ts.map +1 -0
- package/dist/tools/write-lower-third.js +52 -0
- package/dist/tools/write-lower-third.js.map +1 -0
- package/dist/tools/write-srt.d.ts +20 -0
- package/dist/tools/write-srt.d.ts.map +1 -0
- package/dist/tools/write-srt.js +72 -0
- package/dist/tools/write-srt.js.map +1 -0
- package/dist/tools/write-title-card.d.ts +25 -0
- package/dist/tools/write-title-card.d.ts.map +1 -0
- package/dist/tools/write-title-card.js +57 -0
- package/dist/tools/write-title-card.js.map +1 -0
- package/dist/types.d.ts +83 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/App.d.ts +44 -0
- package/dist/ui/App.d.ts.map +1 -0
- package/dist/ui/App.js +454 -0
- package/dist/ui/App.js.map +1 -0
- package/dist/ui/components/Banner.d.ts +13 -0
- package/dist/ui/components/Banner.d.ts.map +1 -0
- package/dist/ui/components/Banner.js +59 -0
- package/dist/ui/components/Banner.js.map +1 -0
- package/dist/ui/components/Footer.d.ts +19 -0
- package/dist/ui/components/Footer.d.ts.map +1 -0
- package/dist/ui/components/Footer.js +20 -0
- package/dist/ui/components/Footer.js.map +1 -0
- package/dist/ui/components/Header.d.ts +16 -0
- package/dist/ui/components/Header.d.ts.map +1 -0
- package/dist/ui/components/Header.js +12 -0
- package/dist/ui/components/Header.js.map +1 -0
- package/dist/ui/components/InputBox.d.ts +21 -0
- package/dist/ui/components/InputBox.d.ts.map +1 -0
- package/dist/ui/components/InputBox.js +81 -0
- package/dist/ui/components/InputBox.js.map +1 -0
- package/dist/ui/components/Message.d.ts +14 -0
- package/dist/ui/components/Message.d.ts.map +1 -0
- package/dist/ui/components/Message.js +24 -0
- package/dist/ui/components/Message.js.map +1 -0
- package/dist/ui/components/SlashMenu.d.ts +19 -0
- package/dist/ui/components/SlashMenu.d.ts.map +1 -0
- package/dist/ui/components/SlashMenu.js +33 -0
- package/dist/ui/components/SlashMenu.js.map +1 -0
- package/dist/ui/components/SlashMenu.test.d.ts +2 -0
- package/dist/ui/components/SlashMenu.test.d.ts.map +1 -0
- package/dist/ui/components/SlashMenu.test.js +23 -0
- package/dist/ui/components/SlashMenu.test.js.map +1 -0
- package/dist/ui/components/Spinner.d.ts +6 -0
- package/dist/ui/components/Spinner.d.ts.map +1 -0
- package/dist/ui/components/Spinner.js +16 -0
- package/dist/ui/components/Spinner.js.map +1 -0
- package/dist/ui/components/ToolCallLine.d.ts +16 -0
- package/dist/ui/components/ToolCallLine.d.ts.map +1 -0
- package/dist/ui/components/ToolCallLine.js +35 -0
- package/dist/ui/components/ToolCallLine.js.map +1 -0
- package/dist/ui/render.d.ts +9 -0
- package/dist/ui/render.d.ts.map +1 -0
- package/dist/ui/render.js +56 -0
- package/dist/ui/render.js.map +1 -0
- package/dist/ui/spinner-frames.d.ts +3 -0
- package/dist/ui/spinner-frames.d.ts.map +1 -0
- package/dist/ui/spinner-frames.js +16 -0
- package/dist/ui/spinner-frames.js.map +1 -0
- package/dist/ui/theme.d.ts +27 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +26 -0
- package/dist/ui/theme.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frame extraction helpers. Used by score_shot and (later) any other tool
|
|
3
|
+
* that needs sampled frames.
|
|
4
|
+
*
|
|
5
|
+
* Two modes:
|
|
6
|
+
* - extractAtTimes: per-timestamp sampling (one ffmpeg call per frame). Slower
|
|
7
|
+
* but precise; agent picks exactly what to inspect.
|
|
8
|
+
* - extractAtInterval: regular sampling via the fps filter (one ffmpeg call
|
|
9
|
+
* total). Fast; ideal for "score this whole video".
|
|
10
|
+
*/
|
|
11
|
+
export interface ExtractedFrame {
|
|
12
|
+
path: string;
|
|
13
|
+
atSec: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ExtractOptions {
|
|
16
|
+
/** Output dir; defaults to a fresh temp dir. */
|
|
17
|
+
outDir?: string;
|
|
18
|
+
/** JPEG quality 1-31 (lower = better, ffmpeg convention). Default 4. */
|
|
19
|
+
quality?: number;
|
|
20
|
+
/** Optional max width to scale frames down to (saves vision tokens). */
|
|
21
|
+
maxWidth?: number;
|
|
22
|
+
signal?: AbortSignal;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Extract one frame per requested timestamp. Returns paths in the same order.
|
|
26
|
+
*/
|
|
27
|
+
export declare function extractAtTimes(inputPath: string, times: number[], opts?: ExtractOptions): Promise<ExtractedFrame[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Extract one frame every `intervalSec`. Returns frames in temporal order.
|
|
30
|
+
*
|
|
31
|
+
* Single ffmpeg invocation regardless of how many frames are produced; way
|
|
32
|
+
* faster than per-timestamp for whole-video sampling.
|
|
33
|
+
*/
|
|
34
|
+
export declare function extractAtInterval(inputPath: string, intervalSec: number, totalSec: number, opts?: ExtractOptions): Promise<ExtractedFrame[]>;
|
|
35
|
+
//# sourceMappingURL=frames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../../src/core/frames.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,GAAE,cAAmB,GACxB,OAAO,CAAC,cAAc,EAAE,CAAC,CAmB3B;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,cAAmB,GACxB,OAAO,CAAC,cAAc,EAAE,CAAC,CA6B3B"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { mkdtempSync } from "node:fs";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { runFfmpeg } from "./media/ffmpeg.js";
|
|
5
|
+
/**
|
|
6
|
+
* Extract one frame per requested timestamp. Returns paths in the same order.
|
|
7
|
+
*/
|
|
8
|
+
export async function extractAtTimes(inputPath, times, opts = {}) {
|
|
9
|
+
const dir = opts.outDir ?? mkdtempSync(join(tmpdir(), "gg-editor-frames-"));
|
|
10
|
+
const q = String(opts.quality ?? 4);
|
|
11
|
+
const out = [];
|
|
12
|
+
for (let i = 0; i < times.length; i++) {
|
|
13
|
+
const t = times[i];
|
|
14
|
+
const path = join(dir, `frame-t${t.toFixed(3)}-${i.toString().padStart(4, "0")}.jpg`);
|
|
15
|
+
const args = ["-ss", String(t), "-i", inputPath, "-frames:v", "1", "-q:v", q];
|
|
16
|
+
if (opts.maxWidth)
|
|
17
|
+
args.push("-vf", `scale=${opts.maxWidth}:-1`);
|
|
18
|
+
args.push(path);
|
|
19
|
+
const r = await runFfmpeg(args, { signal: opts.signal });
|
|
20
|
+
if (r.code !== 0) {
|
|
21
|
+
throw new Error(`ffmpeg failed extracting frame @${t}s: ${tail(r.stderr)}`);
|
|
22
|
+
}
|
|
23
|
+
out.push({ path, atSec: t });
|
|
24
|
+
}
|
|
25
|
+
return out;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Extract one frame every `intervalSec`. Returns frames in temporal order.
|
|
29
|
+
*
|
|
30
|
+
* Single ffmpeg invocation regardless of how many frames are produced; way
|
|
31
|
+
* faster than per-timestamp for whole-video sampling.
|
|
32
|
+
*/
|
|
33
|
+
export async function extractAtInterval(inputPath, intervalSec, totalSec, opts = {}) {
|
|
34
|
+
if (intervalSec <= 0)
|
|
35
|
+
throw new Error("intervalSec must be > 0");
|
|
36
|
+
const dir = opts.outDir ?? mkdtempSync(join(tmpdir(), "gg-editor-frames-"));
|
|
37
|
+
const q = String(opts.quality ?? 4);
|
|
38
|
+
const pattern = join(dir, "frame-%04d.jpg");
|
|
39
|
+
const filter = opts.maxWidth
|
|
40
|
+
? `fps=1/${intervalSec},scale=${opts.maxWidth}:-1`
|
|
41
|
+
: `fps=1/${intervalSec}`;
|
|
42
|
+
const r = await runFfmpeg(["-i", inputPath, "-vf", filter, "-q:v", q, pattern], {
|
|
43
|
+
signal: opts.signal,
|
|
44
|
+
});
|
|
45
|
+
if (r.code !== 0) {
|
|
46
|
+
throw new Error(`ffmpeg failed sampling frames: ${tail(r.stderr)}`);
|
|
47
|
+
}
|
|
48
|
+
// The fps filter starts the first frame at intervalSec/2 by ffmpeg
|
|
49
|
+
// convention; agent code shouldn't rely on exact alignment. We compute
|
|
50
|
+
// expected times as N * intervalSec offset by intervalSec/2.
|
|
51
|
+
// We can also list the directory, but predicting timestamps avoids fs walk.
|
|
52
|
+
const count = Math.floor(totalSec / intervalSec);
|
|
53
|
+
const out = [];
|
|
54
|
+
for (let i = 1; i <= count; i++) {
|
|
55
|
+
const path = join(dir, `frame-${i.toString().padStart(4, "0")}.jpg`);
|
|
56
|
+
const atSec = (i - 0.5) * intervalSec;
|
|
57
|
+
out.push({ path, atSec });
|
|
58
|
+
}
|
|
59
|
+
return out;
|
|
60
|
+
}
|
|
61
|
+
function tail(s) {
|
|
62
|
+
return s.split("\n").filter(Boolean).slice(-3).join(" | ").slice(-300);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=frames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frames.js","sourceRoot":"","sources":["../../src/core/frames.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;QACjB,MAAM,IAAI,KAAK,CAAC,kCAAkC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACtE,CAAC;IAED,mEAAmE;IACnE,uEAAuE;IACvE,6DAA6D;IAC7D,4EAA4E;IAC5E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,WAAW,CAAC,CAAC;IACjD,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;QACrE,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,WAAW,CAAC;QACtC,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,IAAI,CAAC,CAAS;IACrB,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook analysis — does the first 3 seconds of a video earn the
|
|
3
|
+
* scroll-stop?
|
|
4
|
+
*
|
|
5
|
+
* Platform algorithms (TikTok / Reels / Shorts / YouTube) treat the
|
|
6
|
+
* first 2-3 seconds as the algorithmic checkpoint. Videos with strong
|
|
7
|
+
* 3-second retention get pushed to larger audiences; videos that lose
|
|
8
|
+
* viewers immediately get buried. This module bundles the four checks
|
|
9
|
+
* every retention guide preaches:
|
|
10
|
+
*
|
|
11
|
+
* 1. Speech in the first 0.5s — silent openings = scroll death.
|
|
12
|
+
* 2. On-screen text — sound-off mobile is the default.
|
|
13
|
+
* 3. Visual motion — static openers fail (sample two frames).
|
|
14
|
+
* 4. Clear subject (face/etc.) — abstract intro cards underperform.
|
|
15
|
+
*
|
|
16
|
+
* #1 is a silencedetect probe (deterministic, free).
|
|
17
|
+
* #2-#4 are folded into ONE vision call against an early-frame sample.
|
|
18
|
+
*
|
|
19
|
+
* Returns a structured score plus a short list of issues the agent can
|
|
20
|
+
* surface verbatim. The agent's job is to drop a red marker if the
|
|
21
|
+
* score is below a threshold and propose a stronger opener.
|
|
22
|
+
*/
|
|
23
|
+
export interface HookAnalysisFinding {
|
|
24
|
+
/** Stable id for this issue. */
|
|
25
|
+
id: "silent_open" | "no_on_screen_text" | "static_first_frame" | "no_clear_subject" | "weak_emotional_hook";
|
|
26
|
+
severity: "info" | "warn" | "block";
|
|
27
|
+
/** One-line human description. */
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
30
|
+
export interface HookAnalysisResult {
|
|
31
|
+
/** 0-100. ≥70 = solid hook, 40-69 = weak, <40 = will tank retention. */
|
|
32
|
+
score: number;
|
|
33
|
+
/** True if score >= passThreshold (default 70). */
|
|
34
|
+
passes: boolean;
|
|
35
|
+
/** Sub-scores (0-1). */
|
|
36
|
+
speechAt0_5s: number;
|
|
37
|
+
onScreenText: number;
|
|
38
|
+
motion: number;
|
|
39
|
+
subjectClarity: number;
|
|
40
|
+
emotionalIntensity: number;
|
|
41
|
+
findings: HookAnalysisFinding[];
|
|
42
|
+
/** ≤120 char overall verdict from the vision pass. */
|
|
43
|
+
why: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Compute the speech-at-0.5s score from a list of silence ranges
|
|
47
|
+
* within the first `windowSec` seconds.
|
|
48
|
+
*
|
|
49
|
+
* 1.0 = speech is active throughout the first 500ms.
|
|
50
|
+
* 0.0 = totally silent for the entire first 500ms.
|
|
51
|
+
* Linear in between. Used both by the live tool and the unit tests.
|
|
52
|
+
*/
|
|
53
|
+
export declare function speechAt0_5sScore(silences: Array<{
|
|
54
|
+
startSec: number;
|
|
55
|
+
endSec: number;
|
|
56
|
+
}>, windowSec?: number): number;
|
|
57
|
+
export interface HookVisionResponse {
|
|
58
|
+
onScreenText: number;
|
|
59
|
+
motion: number;
|
|
60
|
+
subjectClarity: number;
|
|
61
|
+
emotionalIntensity: number;
|
|
62
|
+
why: string;
|
|
63
|
+
}
|
|
64
|
+
export declare function parseHookVisionResponse(content: string): HookVisionResponse;
|
|
65
|
+
export interface HookVisionOptions {
|
|
66
|
+
apiKey?: string;
|
|
67
|
+
model?: string;
|
|
68
|
+
detail?: "low" | "high";
|
|
69
|
+
signal?: AbortSignal;
|
|
70
|
+
}
|
|
71
|
+
export declare function runHookVision(earlyFramePath: string, laterFramePath: string, opts?: HookVisionOptions): Promise<HookVisionResponse>;
|
|
72
|
+
export interface ScoreOptions {
|
|
73
|
+
/** Pass threshold (default 70). */
|
|
74
|
+
passThreshold?: number;
|
|
75
|
+
/** Component weights (sum doesn't have to equal 1). */
|
|
76
|
+
weights?: {
|
|
77
|
+
speech?: number;
|
|
78
|
+
onScreenText?: number;
|
|
79
|
+
motion?: number;
|
|
80
|
+
subjectClarity?: number;
|
|
81
|
+
emotionalIntensity?: number;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Combine the deterministic speech score and the vision response into
|
|
86
|
+
* an overall HookAnalysisResult. Pure function — easy to unit-test the
|
|
87
|
+
* scoring rubric without booting ffmpeg or OpenAI.
|
|
88
|
+
*/
|
|
89
|
+
export declare function buildHookResult(speech: number, vision: HookVisionResponse, opts?: ScoreOptions): HookAnalysisResult;
|
|
90
|
+
//# sourceMappingURL=hook-analysis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-analysis.d.ts","sourceR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EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,wBAAsB,aAAa,CACjC,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,EACtB,IAAI,GAAE,iBAAsB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CAkD7B;AAID,MAAM,WAAW,YAAY;IAC3B,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;CACH;AAUD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,kBAAkB,EAC1B,IAAI,GAAE,YAAiB,GACtB,kBAAkB,CAiEpB"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook analysis — does the first 3 seconds of a video earn the
|
|
3
|
+
* scroll-stop?
|
|
4
|
+
*
|
|
5
|
+
* Platform algorithms (TikTok / Reels / Shorts / YouTube) treat the
|
|
6
|
+
* first 2-3 seconds as the algorithmic checkpoint. Videos with strong
|
|
7
|
+
* 3-second retention get pushed to larger audiences; videos that lose
|
|
8
|
+
* viewers immediately get buried. This module bundles the four checks
|
|
9
|
+
* every retention guide preaches:
|
|
10
|
+
*
|
|
11
|
+
* 1. Speech in the first 0.5s — silent openings = scroll death.
|
|
12
|
+
* 2. On-screen text — sound-off mobile is the default.
|
|
13
|
+
* 3. Visual motion — static openers fail (sample two frames).
|
|
14
|
+
* 4. Clear subject (face/etc.) — abstract intro cards underperform.
|
|
15
|
+
*
|
|
16
|
+
* #1 is a silencedetect probe (deterministic, free).
|
|
17
|
+
* #2-#4 are folded into ONE vision call against an early-frame sample.
|
|
18
|
+
*
|
|
19
|
+
* Returns a structured score plus a short list of issues the agent can
|
|
20
|
+
* surface verbatim. The agent's job is to drop a red marker if the
|
|
21
|
+
* score is below a threshold and propose a stronger opener.
|
|
22
|
+
*/
|
|
23
|
+
import { readFileSync } from "node:fs";
|
|
24
|
+
// ── Silence-side helpers ────────────────────────────────────
|
|
25
|
+
/**
|
|
26
|
+
* Compute the speech-at-0.5s score from a list of silence ranges
|
|
27
|
+
* within the first `windowSec` seconds.
|
|
28
|
+
*
|
|
29
|
+
* 1.0 = speech is active throughout the first 500ms.
|
|
30
|
+
* 0.0 = totally silent for the entire first 500ms.
|
|
31
|
+
* Linear in between. Used both by the live tool and the unit tests.
|
|
32
|
+
*/
|
|
33
|
+
export function speechAt0_5sScore(silences, windowSec = 0.5) {
|
|
34
|
+
if (windowSec <= 0)
|
|
35
|
+
return 1;
|
|
36
|
+
let silentSec = 0;
|
|
37
|
+
for (const s of silences) {
|
|
38
|
+
const lo = Math.max(0, s.startSec);
|
|
39
|
+
const hi = Math.min(windowSec, s.endSec);
|
|
40
|
+
if (hi > lo)
|
|
41
|
+
silentSec += hi - lo;
|
|
42
|
+
}
|
|
43
|
+
const speechSec = Math.max(0, windowSec - silentSec);
|
|
44
|
+
return +(speechSec / windowSec).toFixed(3);
|
|
45
|
+
}
|
|
46
|
+
// ── Vision-side: prompt + parser ────────────────────────────
|
|
47
|
+
const VISION_SYSTEM = `You are a short-form video retention analyst. You see ONE frame from the FIRST SECOND of a video and ONE frame from the THIRD SECOND. Your job is to score the OPENING for scroll-stop power on TikTok / Reels / YouTube Shorts.
|
|
48
|
+
|
|
49
|
+
Output a JSON object with these EXACT keys (no extras, no prose):
|
|
50
|
+
{
|
|
51
|
+
"onScreenText": <0..1>,
|
|
52
|
+
"motion": <0..1>,
|
|
53
|
+
"subjectClarity": <0..1>,
|
|
54
|
+
"emotionalIntensity": <0..1>,
|
|
55
|
+
"why": "<≤120 char rationale>"
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
Scoring rubric:
|
|
59
|
+
|
|
60
|
+
onScreenText — Is there bold, readable on-screen text in either frame?
|
|
61
|
+
1.0 = large hook text (e.g. "DON'T DO THIS"); 0.5 = small caption only;
|
|
62
|
+
0.0 = no text at all.
|
|
63
|
+
|
|
64
|
+
motion — Did the framing change between frame 1 and frame 2?
|
|
65
|
+
1.0 = camera move / cut to a new angle / clear visual change;
|
|
66
|
+
0.5 = subject moved within the frame; 0.0 = static lockoff.
|
|
67
|
+
|
|
68
|
+
subjectClarity — Is there an obvious focal point (face, product, action)?
|
|
69
|
+
1.0 = clear single subject filling significant frame area;
|
|
70
|
+
0.5 = subject present but small or off-centre; 0.0 = abstract / cluttered.
|
|
71
|
+
|
|
72
|
+
emotionalIntensity — Does anyone in frame display a strong emotion or
|
|
73
|
+
is something visually surprising happening?
|
|
74
|
+
1.0 = laughing / shouting / pointing / fail moment / dramatic action;
|
|
75
|
+
0.5 = neutral but engaged; 0.0 = blank / corporate / boring.
|
|
76
|
+
|
|
77
|
+
Be honest — this rubric exists so the creator knows when to recut their
|
|
78
|
+
opener. A bland but technically competent intro should score 0.3, not 0.7.`;
|
|
79
|
+
export function parseHookVisionResponse(content) {
|
|
80
|
+
const start = content.indexOf("{");
|
|
81
|
+
const end = content.lastIndexOf("}");
|
|
82
|
+
if (start < 0 || end < start) {
|
|
83
|
+
throw new Error("hook-analysis: no JSON object in response");
|
|
84
|
+
}
|
|
85
|
+
const parsed = JSON.parse(content.slice(start, end + 1));
|
|
86
|
+
return {
|
|
87
|
+
onScreenText: clamp01(num(parsed.onScreenText, 0)),
|
|
88
|
+
motion: clamp01(num(parsed.motion, 0)),
|
|
89
|
+
subjectClarity: clamp01(num(parsed.subjectClarity, 0)),
|
|
90
|
+
emotionalIntensity: clamp01(num(parsed.emotionalIntensity, 0)),
|
|
91
|
+
why: String(parsed.why ?? "").slice(0, 200),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export async function runHookVision(earlyFramePath, laterFramePath, opts = {}) {
|
|
95
|
+
const apiKey = opts.apiKey ?? process.env.OPENAI_API_KEY;
|
|
96
|
+
if (!apiKey)
|
|
97
|
+
throw new Error("OPENAI_API_KEY required for analyze_hook.");
|
|
98
|
+
const earlyB64 = readFileSync(earlyFramePath).toString("base64");
|
|
99
|
+
const laterB64 = readFileSync(laterFramePath).toString("base64");
|
|
100
|
+
const detail = opts.detail ?? "low";
|
|
101
|
+
const model = opts.model ?? "gpt-4o-mini";
|
|
102
|
+
const body = {
|
|
103
|
+
model,
|
|
104
|
+
messages: [
|
|
105
|
+
{ role: "system", content: VISION_SYSTEM },
|
|
106
|
+
{
|
|
107
|
+
role: "user",
|
|
108
|
+
content: [
|
|
109
|
+
{ type: "text", text: "FRAME 1 (~0.5s into video):" },
|
|
110
|
+
{
|
|
111
|
+
type: "image_url",
|
|
112
|
+
image_url: { url: `data:image/jpeg;base64,${earlyB64}`, detail },
|
|
113
|
+
},
|
|
114
|
+
{ type: "text", text: "FRAME 2 (~2.5s into video):" },
|
|
115
|
+
{
|
|
116
|
+
type: "image_url",
|
|
117
|
+
image_url: { url: `data:image/jpeg;base64,${laterB64}`, detail },
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
response_format: { type: "json_object" },
|
|
123
|
+
temperature: 0,
|
|
124
|
+
};
|
|
125
|
+
const res = await fetch("https://api.openai.com/v1/chat/completions", {
|
|
126
|
+
method: "POST",
|
|
127
|
+
headers: {
|
|
128
|
+
Authorization: `Bearer ${apiKey}`,
|
|
129
|
+
"Content-Type": "application/json",
|
|
130
|
+
},
|
|
131
|
+
body: JSON.stringify(body),
|
|
132
|
+
signal: opts.signal,
|
|
133
|
+
});
|
|
134
|
+
if (!res.ok) {
|
|
135
|
+
const text = await res.text().catch(() => "");
|
|
136
|
+
throw new Error(`OpenAI HTTP ${res.status}: ${text.slice(0, 200)}`);
|
|
137
|
+
}
|
|
138
|
+
const data = (await res.json());
|
|
139
|
+
const content = data.choices[0]?.message?.content;
|
|
140
|
+
if (!content)
|
|
141
|
+
throw new Error("analyze_hook: empty model response");
|
|
142
|
+
return parseHookVisionResponse(content);
|
|
143
|
+
}
|
|
144
|
+
const DEFAULT_WEIGHTS = {
|
|
145
|
+
speech: 25,
|
|
146
|
+
onScreenText: 25,
|
|
147
|
+
motion: 15,
|
|
148
|
+
subjectClarity: 20,
|
|
149
|
+
emotionalIntensity: 15,
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Combine the deterministic speech score and the vision response into
|
|
153
|
+
* an overall HookAnalysisResult. Pure function — easy to unit-test the
|
|
154
|
+
* scoring rubric without booting ffmpeg or OpenAI.
|
|
155
|
+
*/
|
|
156
|
+
export function buildHookResult(speech, vision, opts = {}) {
|
|
157
|
+
const w = { ...DEFAULT_WEIGHTS, ...(opts.weights ?? {}) };
|
|
158
|
+
const wSum = w.speech + w.onScreenText + w.motion + w.subjectClarity + w.emotionalIntensity;
|
|
159
|
+
const raw = w.speech * speech +
|
|
160
|
+
w.onScreenText * vision.onScreenText +
|
|
161
|
+
w.motion * vision.motion +
|
|
162
|
+
w.subjectClarity * vision.subjectClarity +
|
|
163
|
+
w.emotionalIntensity * vision.emotionalIntensity;
|
|
164
|
+
const score = Math.round((raw / wSum) * 100);
|
|
165
|
+
const findings = [];
|
|
166
|
+
if (speech < 0.5) {
|
|
167
|
+
findings.push({
|
|
168
|
+
id: "silent_open",
|
|
169
|
+
severity: speech < 0.2 ? "block" : "warn",
|
|
170
|
+
message: "Silent (or near-silent) opening detected. Move the punchline / strongest line to frame 1; cold-open instead of leading with breath/pause.",
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
if (vision.onScreenText < 0.4) {
|
|
174
|
+
findings.push({
|
|
175
|
+
id: "no_on_screen_text",
|
|
176
|
+
severity: "warn",
|
|
177
|
+
message: "No bold on-screen hook text. ~60% of mobile views are sound-off — burn the hook line large in the first 2 seconds.",
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
if (vision.motion < 0.3) {
|
|
181
|
+
findings.push({
|
|
182
|
+
id: "static_first_frame",
|
|
183
|
+
severity: "warn",
|
|
184
|
+
message: "First frames look static. Add a quick zoom, cut to a different angle, or open mid-action to give the eye something to lock onto.",
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
if (vision.subjectClarity < 0.4) {
|
|
188
|
+
findings.push({
|
|
189
|
+
id: "no_clear_subject",
|
|
190
|
+
severity: "warn",
|
|
191
|
+
message: "No clear focal subject. Re-frame so the face / product / action fills the frame in the first second.",
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
if (vision.emotionalIntensity < 0.3) {
|
|
195
|
+
findings.push({
|
|
196
|
+
id: "weak_emotional_hook",
|
|
197
|
+
severity: "info",
|
|
198
|
+
message: "Low emotional intensity in the opener. Consider starting with a reaction / surprise / dramatic line — neutral intros lose retention.",
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
const passThreshold = opts.passThreshold ?? 70;
|
|
202
|
+
return {
|
|
203
|
+
score,
|
|
204
|
+
passes: score >= passThreshold,
|
|
205
|
+
speechAt0_5s: speech,
|
|
206
|
+
onScreenText: vision.onScreenText,
|
|
207
|
+
motion: vision.motion,
|
|
208
|
+
subjectClarity: vision.subjectClarity,
|
|
209
|
+
emotionalIntensity: vision.emotionalIntensity,
|
|
210
|
+
findings,
|
|
211
|
+
why: vision.why,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
// ── Helpers ─────────────────────────────────────────────────
|
|
215
|
+
function num(v, fb) {
|
|
216
|
+
const n = typeof v === "number" ? v : Number(v);
|
|
217
|
+
return Number.isFinite(n) ? n : fb;
|
|
218
|
+
}
|
|
219
|
+
function clamp01(n) {
|
|
220
|
+
return Math.max(0, Math.min(1, n));
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=hook-analysis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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,SAAS,GAAG,CAAC,CAAU,EAAE,EAAU;IACjC,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACrC,CAAC;AAED,SAAS,OAAO,CAAC,CAAS;IACxB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-analysis.test.d.ts","sourceRoot":"","sources":["../../src/core/hook-analysis.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { buildHookResult, parseHookVisionResponse, speechAt0_5sScore } from "./hook-analysis.js";
|
|
3
|
+
describe("speechAt0_5sScore", () => {
|
|
4
|
+
it("returns 1.0 when there are no silences in the window", () => {
|
|
5
|
+
expect(speechAt0_5sScore([])).toBe(1);
|
|
6
|
+
});
|
|
7
|
+
it("returns 0.0 when the entire window is silent", () => {
|
|
8
|
+
expect(speechAt0_5sScore([{ startSec: 0, endSec: 1 }])).toBe(0);
|
|
9
|
+
});
|
|
10
|
+
it("returns 0.5 when half the window is silent", () => {
|
|
11
|
+
expect(speechAt0_5sScore([{ startSec: 0, endSec: 0.25 }])).toBeCloseTo(0.5, 3);
|
|
12
|
+
});
|
|
13
|
+
it("clips silences that start before / extend past the window", () => {
|
|
14
|
+
expect(speechAt0_5sScore([{ startSec: -1, endSec: 0.1 }])).toBeCloseTo(0.8, 3);
|
|
15
|
+
expect(speechAt0_5sScore([{ startSec: 0.4, endSec: 5 }])).toBeCloseTo(0.8, 3);
|
|
16
|
+
});
|
|
17
|
+
it("respects a custom windowSec", () => {
|
|
18
|
+
expect(speechAt0_5sScore([{ startSec: 0, endSec: 1 }], 2)).toBeCloseTo(0.5, 3);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
describe("parseHookVisionResponse", () => {
|
|
22
|
+
it("parses a well-formed response", () => {
|
|
23
|
+
const j = JSON.stringify({
|
|
24
|
+
onScreenText: 0.8,
|
|
25
|
+
motion: 0.6,
|
|
26
|
+
subjectClarity: 0.9,
|
|
27
|
+
emotionalIntensity: 0.7,
|
|
28
|
+
why: "bold hook text + reaction shot",
|
|
29
|
+
});
|
|
30
|
+
const r = parseHookVisionResponse(j);
|
|
31
|
+
expect(r.onScreenText).toBe(0.8);
|
|
32
|
+
expect(r.motion).toBe(0.6);
|
|
33
|
+
expect(r.subjectClarity).toBe(0.9);
|
|
34
|
+
expect(r.emotionalIntensity).toBe(0.7);
|
|
35
|
+
expect(r.why).toContain("hook");
|
|
36
|
+
});
|
|
37
|
+
it("falls back to 0 on missing fields", () => {
|
|
38
|
+
const r = parseHookVisionResponse("{}");
|
|
39
|
+
expect(r.onScreenText).toBe(0);
|
|
40
|
+
expect(r.motion).toBe(0);
|
|
41
|
+
expect(r.subjectClarity).toBe(0);
|
|
42
|
+
expect(r.emotionalIntensity).toBe(0);
|
|
43
|
+
});
|
|
44
|
+
it("clamps out-of-range values to [0,1]", () => {
|
|
45
|
+
const r = parseHookVisionResponse(JSON.stringify({ onScreenText: 99, motion: -5, subjectClarity: 0.5, emotionalIntensity: 1 }));
|
|
46
|
+
expect(r.onScreenText).toBe(1);
|
|
47
|
+
expect(r.motion).toBe(0);
|
|
48
|
+
});
|
|
49
|
+
it("survives prose wrapping around the JSON", () => {
|
|
50
|
+
const r = parseHookVisionResponse('Here:\n{"onScreenText":0.5,"motion":0.5,"subjectClarity":0.5,"emotionalIntensity":0.5}\nDone.');
|
|
51
|
+
expect(r.onScreenText).toBe(0.5);
|
|
52
|
+
});
|
|
53
|
+
it("throws on totally absent JSON", () => {
|
|
54
|
+
expect(() => parseHookVisionResponse("no json")).toThrow(/no JSON/);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
describe("buildHookResult", () => {
|
|
58
|
+
const strong = {
|
|
59
|
+
onScreenText: 0.9,
|
|
60
|
+
motion: 0.8,
|
|
61
|
+
subjectClarity: 0.9,
|
|
62
|
+
emotionalIntensity: 0.8,
|
|
63
|
+
why: "strong",
|
|
64
|
+
};
|
|
65
|
+
const weak = {
|
|
66
|
+
onScreenText: 0.1,
|
|
67
|
+
motion: 0.1,
|
|
68
|
+
subjectClarity: 0.1,
|
|
69
|
+
emotionalIntensity: 0.1,
|
|
70
|
+
why: "weak",
|
|
71
|
+
};
|
|
72
|
+
it("produces a high score for a strong hook", () => {
|
|
73
|
+
const r = buildHookResult(1, strong);
|
|
74
|
+
expect(r.score).toBeGreaterThanOrEqual(85);
|
|
75
|
+
expect(r.passes).toBe(true);
|
|
76
|
+
expect(r.findings).toEqual([]);
|
|
77
|
+
});
|
|
78
|
+
it("produces a low score for a weak hook", () => {
|
|
79
|
+
const r = buildHookResult(0, weak);
|
|
80
|
+
expect(r.score).toBeLessThanOrEqual(15);
|
|
81
|
+
expect(r.passes).toBe(false);
|
|
82
|
+
// All five findings should fire.
|
|
83
|
+
const ids = r.findings.map((f) => f.id);
|
|
84
|
+
expect(ids).toContain("silent_open");
|
|
85
|
+
expect(ids).toContain("no_on_screen_text");
|
|
86
|
+
expect(ids).toContain("static_first_frame");
|
|
87
|
+
expect(ids).toContain("no_clear_subject");
|
|
88
|
+
expect(ids).toContain("weak_emotional_hook");
|
|
89
|
+
});
|
|
90
|
+
it("flags silent_open with severity=block when speech < 0.2", () => {
|
|
91
|
+
const r = buildHookResult(0.05, strong);
|
|
92
|
+
const f = r.findings.find((x) => x.id === "silent_open");
|
|
93
|
+
expect(f?.severity).toBe("block");
|
|
94
|
+
});
|
|
95
|
+
it("flags silent_open with severity=warn when 0.2 <= speech < 0.5", () => {
|
|
96
|
+
const r = buildHookResult(0.3, strong);
|
|
97
|
+
const f = r.findings.find((x) => x.id === "silent_open");
|
|
98
|
+
expect(f?.severity).toBe("warn");
|
|
99
|
+
});
|
|
100
|
+
it("does not flag silent_open when speech >= 0.5", () => {
|
|
101
|
+
const r = buildHookResult(0.6, strong);
|
|
102
|
+
expect(r.findings.find((x) => x.id === "silent_open")).toBeUndefined();
|
|
103
|
+
});
|
|
104
|
+
it("respects a custom passThreshold", () => {
|
|
105
|
+
const r = buildHookResult(0.5, {
|
|
106
|
+
onScreenText: 0.5,
|
|
107
|
+
motion: 0.5,
|
|
108
|
+
subjectClarity: 0.5,
|
|
109
|
+
emotionalIntensity: 0.5,
|
|
110
|
+
why: "mid",
|
|
111
|
+
});
|
|
112
|
+
// Score ≈ 50 with default weights; passes at threshold 50.
|
|
113
|
+
expect(buildHookResult(0.5, r).score).toBeGreaterThanOrEqual(0);
|
|
114
|
+
expect(buildHookResult(0.5, {
|
|
115
|
+
onScreenText: 0.5,
|
|
116
|
+
motion: 0.5,
|
|
117
|
+
subjectClarity: 0.5,
|
|
118
|
+
emotionalIntensity: 0.5,
|
|
119
|
+
why: "mid",
|
|
120
|
+
}, { passThreshold: 40 }).passes).toBe(true);
|
|
121
|
+
expect(buildHookResult(0.5, {
|
|
122
|
+
onScreenText: 0.5,
|
|
123
|
+
motion: 0.5,
|
|
124
|
+
subjectClarity: 0.5,
|
|
125
|
+
emotionalIntensity: 0.5,
|
|
126
|
+
why: "mid",
|
|
127
|
+
}, { passThreshold: 90 }).passes).toBe(false);
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
//# sourceMappingURL=hook-analysis.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-analysis.test.js","sourceRoot":"","sources":["../../src/core/hook-analysis.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO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CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;QAChE,MAAM,CACJ,eAAe,CACb,GAAG,EACH;YACE,YAAY,EAAE,GAAG;YACjB,MAAM,EAAE,GAAG;YACX,cAAc,EAAE,GAAG;YACnB,kBAAkB,EAAE,GAAG;YACvB,GAAG,EAAE,KAAK;SACX,EACD,EAAE,aAAa,EAAE,EAAE,EAAE,CACtB,CAAC,MAAM,CACT,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,MAAM,CACJ,eAAe,CACb,GAAG,EACH;YACE,YAAY,EAAE,GAAG;YACjB,MAAM,EAAE,GAAG;YACX,cAAc,EAAE,GAAG;YACnB,kBAAkB,EAAE,GAAG;YACvB,GAAG,EAAE,KAAK;SACX,EACD,EAAE,aAAa,EAAE,EAAE,EAAE,CACtB,CAAC,MAAM,CACT,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HostName } from "../../types.js";
|
|
2
|
+
export interface DetectedHost {
|
|
3
|
+
name: HostName;
|
|
4
|
+
displayName: string;
|
|
5
|
+
/** Process name(s) we matched against. */
|
|
6
|
+
matched: string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Auto-detect what NLE is currently running. Returns the first match.
|
|
10
|
+
* If nothing is running, returns "none".
|
|
11
|
+
*
|
|
12
|
+
* Note: Resolve's process name is "resolve" lowercase on Linux which collides
|
|
13
|
+
* with all sorts of unrelated stuff; we restrict that match to look for the
|
|
14
|
+
* full app bundle path on macOS first, then fall back.
|
|
15
|
+
*/
|
|
16
|
+
export declare function detectHost(): DetectedHost;
|
|
17
|
+
//# sourceMappingURL=detect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../src/core/hosts/detect.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAoCD;;;;;;;GAOG;AACH,wBAAgB,UAAU,IAAI,YAAY,CAsBzC"}
|