@hypit/hypit 0.1.3 → 0.1.5
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/README.md +5 -3
- package/dist/public/caption.d.ts +206 -183
- package/dist/public/composition.d.ts +25 -3
- package/dist/public/endpoint-kit.d.ts +24 -2
- package/dist/public/generation.d.ts +5 -1
- package/dist/public/hyperframes.d.ts +19 -1
- package/dist/public/narrative.d.ts +17 -3
- package/dist/public/performance.d.ts +1590 -0
- package/dist/public/program-space.d.ts +179 -32
- package/dist/public/runtime-kit.d.ts +21 -8
- package/dist/public/sound.d.ts +822 -0
- package/dist/public/speech.d.ts +41 -0
- package/dist/public/studio-adapter.d.ts +107 -16
- package/dist/public/temporal-markup.d.ts +9 -44
- package/dist/public/temporal.d.ts +37 -28
- package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
- package/examples/README.md +18 -10
- package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
- package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
- package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
- package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
- package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
- package/examples/provider-package/README.md +78 -0
- package/examples/provider-package/hypit.runtime.json +12 -0
- package/examples/provider-package/packages/provider-images/package.json +11 -0
- package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
- package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
- package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
- package/examples/semantic-composition/README.md +6 -0
- package/examples/semantic-composition/chat.svml +6 -5
- package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
- package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
- package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
- package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
- package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
- package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
- package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
- package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
- package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
- package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
- package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
- package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
- package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
- package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
- package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
- package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
- package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
- package/package.json +35 -15
- package/packages/audio-track/README.md +20 -13
- package/packages/audio-track/package.json +1 -1
- package/packages/audio-track/src/component.ts +4 -4
- package/packages/audio-track/src/fragment.ts +6 -5
- package/packages/audio-track/src/index.ts +1 -1
- package/packages/audio-track/src/manifest.ts +17 -16
- package/packages/audio-track/src/program.ts +21 -25
- package/packages/audio-track/src/surface.ts +19 -18
- package/packages/audio-track-studio/README.md +23 -0
- package/packages/audio-track-studio/src/index.ts +33 -19
- package/packages/author-kit/README.md +1 -1
- package/packages/background-removal/README.md +4 -7
- package/packages/browser-capture/package.json +1 -1
- package/packages/build-result/README.md +69 -0
- package/packages/build-result/package.json +2 -1
- package/packages/build-result/src/decode.ts +12 -8
- package/packages/build-result/src/execution-log.ts +17 -0
- package/packages/build-result/src/file-reference.ts +42 -0
- package/packages/build-result/src/index.ts +4 -0
- package/packages/build-result/src/replace-file-windows.ts +58 -0
- package/packages/build-result/src/replace-file.ts +11 -0
- package/packages/build-result/src/store.ts +58 -14
- package/packages/build-result/src/types.ts +41 -8
- package/packages/build-result/src/writer.ts +12 -1
- package/packages/build-result-fs/README.md +23 -1
- package/packages/build-result-s3/README.md +5 -0
- package/packages/build-result-s3/src/repository.ts +23 -5
- package/packages/caption/README.md +61 -73
- package/packages/caption/package.json +3 -2
- package/packages/caption/src/activation.ts +2 -2
- package/packages/caption/src/component.ts +20 -5
- package/packages/caption/src/display.ts +3 -18
- package/packages/caption/src/fragment.ts +3 -7
- package/packages/caption/src/index.ts +6 -5
- package/packages/caption/src/manifest.ts +29 -46
- package/packages/caption/src/style.ts +24 -135
- package/packages/caption/src/surface.ts +12 -92
- package/packages/caption/src/temporalize.ts +18 -53
- package/packages/caption/src/types.ts +8 -35
- package/packages/caption/src/visibility.ts +23 -0
- package/packages/caption-fine/README.md +31 -11
- package/packages/caption-fine/package.json +4 -2
- package/packages/caption-fine/src/component.ts +3 -3
- package/packages/caption-fine/src/fragment.ts +7 -19
- package/packages/caption-fine/src/index.ts +2 -0
- package/packages/caption-fine/src/manifest.ts +27 -18
- package/packages/caption-fine/src/recipe.ts +7 -0
- package/packages/caption-fine/src/render.ts +62 -49
- package/packages/caption-fine/src/schedule.ts +39 -35
- package/packages/caption-fine/src/style.ts +10 -9
- package/packages/caption-fine/src/surface.ts +62 -35
- package/packages/caption-fine/src/types.ts +2 -0
- package/packages/caption-fine-studio/README.md +24 -2
- package/packages/caption-fine-studio/package.json +10 -3
- package/packages/caption-fine-studio/src/activation.ts +3 -3
- package/packages/caption-fine-studio/src/index.ts +61 -40
- package/packages/cli/README.md +81 -3
- package/packages/cli/package.json +1 -0
- package/packages/cli/src/arguments.ts +39 -15
- package/packages/cli/src/build-planning.ts +9 -3
- package/packages/cli/src/command.ts +7 -1
- package/packages/cli/src/commands/environment.ts +66 -27
- package/packages/cli/src/commands/execution.ts +81 -26
- package/packages/cli/src/commands/results.ts +7 -11
- package/packages/cli/src/index.ts +2 -2
- package/packages/cli/src/machine-view.ts +15 -5
- package/packages/cli/src/main.ts +38 -42
- package/packages/cli/src/observation.ts +7 -1
- package/packages/cli/src/output.ts +92 -34
- package/packages/cli/src/result-export.ts +22 -13
- package/packages/cli/src/run-file.ts +19 -8
- package/packages/cli/src/view.ts +64 -18
- package/packages/comment-sticker/README.md +3 -3
- package/packages/comment-sticker/package.json +1 -1
- package/packages/comment-sticker/src/component.ts +4 -4
- package/packages/comment-sticker/src/fragment.ts +5 -4
- package/packages/comment-sticker/src/manifest.ts +7 -6
- package/packages/comment-sticker/src/program.ts +9 -9
- package/packages/comment-sticker/src/surface.ts +6 -7
- package/packages/comment-sticker-studio/src/index.ts +2 -1
- package/packages/compiler-node/src/compiler.ts +1 -0
- package/packages/composition/README.md +21 -0
- package/packages/composition/src/audio-presentation.ts +44 -0
- package/packages/composition/src/index.ts +3 -0
- package/packages/composition/src/schema.ts +8 -3
- package/packages/composition/src/track.ts +15 -1
- package/packages/credential-store-env/README.md +1 -1
- package/packages/deck-track/README.md +3 -3
- package/packages/deck-track/package.json +1 -1
- package/packages/deck-track/src/component.ts +5 -5
- package/packages/deck-track/src/fragment.ts +6 -5
- package/packages/deck-track/src/lower.ts +12 -12
- package/packages/deck-track/src/manifest.ts +8 -7
- package/packages/deck-track/src/program.ts +13 -16
- package/packages/deck-track/src/surface.ts +9 -10
- package/packages/driver-node/src/driver.ts +41 -3
- package/packages/elevenlabs-speech/README.md +27 -0
- package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
- package/packages/elevenlabs-speech/src/activation.ts +26 -0
- package/packages/elevenlabs-speech/src/fragment.ts +11 -0
- package/packages/elevenlabs-speech/src/index.ts +111 -0
- package/packages/elevenlabs-speech/src/surface.ts +167 -0
- package/packages/endpoint-kit/README.md +24 -0
- package/packages/endpoint-kit/src/index.ts +7 -1
- package/packages/estimate/README.md +56 -3
- package/packages/estimate/src/program.ts +7 -8
- package/packages/film/README.md +12 -7
- package/packages/film/package.json +1 -1
- package/packages/film/src/component.ts +4 -4
- package/packages/film/src/fragment.ts +6 -5
- package/packages/film/src/manifest.ts +11 -10
- package/packages/film/src/program.ts +5 -5
- package/packages/film/src/recipe.ts +2 -1
- package/packages/film/src/surface.ts +6 -6
- package/packages/film-studio/package.json +1 -1
- package/packages/film-studio/src/index.ts +2 -2
- package/packages/fishaudio-speech/README.md +33 -0
- package/packages/fishaudio-speech/package.json +21 -0
- package/packages/fishaudio-speech/src/activation.ts +32 -0
- package/packages/fishaudio-speech/src/fragment.ts +11 -0
- package/packages/fishaudio-speech/src/index.ts +156 -0
- package/packages/fishaudio-speech/src/surface.ts +192 -0
- package/packages/fonts-open/README.md +5 -0
- package/packages/fonts-open/package.json +5 -1
- package/packages/fonts-open/src/studio.ts +21 -0
- package/packages/generation/README.md +11 -1
- package/packages/generation/src/mapping.ts +28 -30
- package/packages/gpt-image/README.md +1 -2
- package/packages/grok-imagine/README.md +1 -2
- package/packages/hyperframes/README.md +7 -3
- package/packages/hyperframes/src/browser-program.ts +11 -2
- package/packages/hyperframes/src/document.ts +15 -2
- package/packages/interview-emoji-reveal/README.md +4 -4
- package/packages/interview-emoji-reveal/package.json +1 -1
- package/packages/interview-emoji-reveal/src/component.ts +4 -4
- package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
- package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
- package/packages/interview-emoji-reveal/src/program.ts +14 -14
- package/packages/interview-emoji-reveal/src/surface.ts +8 -9
- package/packages/media-execution/README.md +7 -3
- package/packages/media-execution/src/audio-presentation.ts +23 -0
- package/packages/media-execution/src/execute.ts +2 -0
- package/packages/media-pipeline/README.md +7 -3
- package/packages/media-pipeline/src/audio-plan.ts +4 -1
- package/packages/media-pipeline/src/component.ts +16 -2
- package/packages/media-pipeline/src/manifest.ts +3 -1
- package/packages/media-pipeline/src/types.ts +2 -1
- package/packages/media-track/README.md +14 -47
- package/packages/media-track/package.json +1 -1
- package/packages/media-track/preview/preview.svml +5 -5
- package/packages/media-track/src/author.ts +12 -6
- package/packages/media-track/src/component.ts +10 -16
- package/packages/media-track/src/fragment.ts +8 -7
- package/packages/media-track/src/index.ts +3 -1
- package/packages/media-track/src/lower.ts +7 -7
- package/packages/media-track/src/manifest.ts +16 -38
- package/packages/media-track/src/program.ts +62 -67
- package/packages/media-track/src/sampling.ts +6 -6
- package/packages/media-track/src/sequence.ts +8 -8
- package/packages/media-track/src/surface.ts +25 -43
- package/packages/media-track-studio/README.md +9 -0
- package/packages/media-track-studio/src/index.ts +23 -13
- package/packages/mimo-speech/README.md +1 -1
- package/packages/minimax-h3/README.md +1 -1
- package/packages/nano-banana/README.md +1 -1
- package/packages/narrative/README.md +23 -1
- package/packages/narrative/src/identity.ts +11 -0
- package/packages/narrative/src/index.ts +3 -0
- package/packages/narrative/src/schema.ts +28 -27
- package/packages/narrative/src/selection.ts +52 -0
- package/packages/narrative/src/types.ts +2 -0
- package/packages/package-loader-node/README.md +30 -0
- package/packages/package-loader-node/package.json +5 -2
- package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
- package/packages/package-loader-node/src/index.ts +1 -0
- package/packages/package-loader-node/src/loader.ts +12 -15
- package/packages/package-loader-node/src/location.ts +27 -1
- package/packages/package-loader-node/src/module-scope.ts +183 -0
- package/packages/package-loader-node/src/types.ts +4 -0
- package/packages/performance/README.md +83 -0
- package/packages/performance/package.json +30 -0
- package/packages/performance/src/activation.ts +11 -0
- package/packages/performance/src/component.ts +46 -0
- package/packages/performance/src/index.ts +6 -0
- package/packages/performance/src/manifest.ts +53 -0
- package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
- package/packages/performance/src/program.ts +51 -0
- package/packages/performance/src/style.ts +35 -0
- package/packages/performance/src/surface.ts +99 -0
- package/packages/performance-studio/README.md +25 -0
- package/packages/performance-studio/package.json +21 -0
- package/packages/performance-studio/src/activation.ts +6 -0
- package/packages/performance-studio/src/index.ts +84 -0
- package/packages/program-space/README.md +9 -18
- package/packages/program-space/src/activation.ts +1 -5
- package/packages/program-space/src/index.ts +2 -11
- package/packages/program-space/src/surface.ts +1 -20
- package/packages/project-context-node/README.md +20 -0
- package/packages/project-context-node/package.json +10 -0
- package/packages/project-context-node/src/index.ts +3 -0
- package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
- package/packages/provider-hyperframes-local/README.md +43 -15
- package/packages/provider-hyperframes-local/src/activation.ts +4 -3
- package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
- package/packages/provider-hyperframes-local/src/capture.ts +96 -26
- package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
- package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
- package/packages/provider-hyperframes-local/src/options.ts +2 -0
- package/packages/provider-hyperframes-local/src/program.ts +6 -3
- package/packages/provider-hyperframes-local/src/progress.ts +53 -0
- package/packages/provider-hyperframes-local/src/provider.ts +18 -5
- package/packages/provider-hyperframes-local/src/render.ts +48 -7
- package/packages/provider-hypihub/README.md +48 -17
- package/packages/provider-hypihub/package.json +2 -0
- package/packages/provider-hypihub/src/mapping.ts +31 -7
- package/packages/provider-hypihub/src/oauth.ts +6 -0
- package/packages/provider-hypihub/src/provider.ts +25 -13
- package/packages/provider-hypihub/src/routes.ts +1 -2
- package/packages/provider-hypihub/src/upload.ts +2 -0
- package/packages/provider-media-local/README.md +3 -4
- package/packages/provider-whisperx-local/README.md +57 -0
- package/packages/provider-whisperx-local/src/program.ts +1 -0
- package/packages/provider-whisperx-local/src/provider.ts +3 -0
- package/packages/ranking/README.md +8 -6
- package/packages/ranking/package.json +1 -1
- package/packages/ranking/src/component.ts +6 -6
- package/packages/ranking/src/fragment.ts +11 -7
- package/packages/ranking/src/manifest.ts +21 -14
- package/packages/ranking/src/render.ts +33 -35
- package/packages/ranking/src/schedule.ts +16 -19
- package/packages/ranking/src/surface.ts +12 -13
- package/packages/ranking-studio/README.md +29 -0
- package/packages/ranking-studio/package.json +8 -3
- package/packages/ranking-studio/src/index.ts +71 -12
- package/packages/render-hyperframes/README.md +7 -7
- package/packages/render-hyperframes/package.json +1 -1
- package/packages/render-hyperframes/src/component.ts +11 -1
- package/packages/render-hyperframes/src/fragment.ts +7 -4
- package/packages/render-hyperframes/src/manifest.ts +4 -4
- package/packages/render-hyperframes/src/surface.ts +6 -6
- package/packages/runtime/README.md +8 -1
- package/packages/runtime/src/catalog.ts +2 -0
- package/packages/runtime/src/execution.ts +15 -4
- package/packages/runtime/src/index.ts +2 -1
- package/packages/runtime/src/log.ts +51 -0
- package/packages/runtime/src/types.ts +5 -8
- package/packages/runtime-host-node/README.md +30 -0
- package/packages/runtime-host-node/package.json +1 -0
- package/packages/runtime-host-node/src/index.ts +25 -9
- package/packages/runtime-host-node/src/packages.ts +47 -50
- package/packages/runtime-kit/README.md +5 -0
- package/packages/runtime-kit/src/index.ts +3 -1
- package/packages/runtime-local/README.md +111 -4
- package/packages/runtime-local/src/config.ts +202 -56
- package/packages/runtime-local/src/control.ts +9 -1
- package/packages/runtime-local/src/executor.ts +66 -0
- package/packages/runtime-local/src/host.ts +37 -17
- package/packages/runtime-local/src/log.ts +48 -0
- package/packages/runtime-local/src/programs.ts +41 -25
- package/packages/runtime-local/src/result-writer.ts +2 -0
- package/packages/runtime-local/src/runtime.ts +10 -6
- package/packages/runtime-local/src/supervisor.ts +142 -0
- package/packages/runtime-local/src/types.ts +9 -2
- package/packages/runtime-local/src/worker-process.ts +7 -24
- package/packages/runtime-local/src/worker.ts +55 -83
- package/packages/screen-overlay/README.md +3 -3
- package/packages/screen-overlay/package.json +1 -1
- package/packages/screen-overlay/src/component.ts +3 -3
- package/packages/screen-overlay/src/fragment.ts +5 -4
- package/packages/screen-overlay/src/manifest.ts +7 -6
- package/packages/screen-overlay/src/program.ts +9 -9
- package/packages/screen-overlay/src/surface.ts +6 -7
- package/packages/script/README.md +37 -2
- package/packages/script/src/edit.ts +123 -73
- package/packages/script/src/lexical.ts +40 -6
- package/packages/script/src/manifest.ts +2 -2
- package/packages/script/src/narrative.ts +1 -0
- package/packages/script/src/parser.ts +36 -8
- package/packages/script/src/surface.ts +4 -3
- package/packages/script/src/types.ts +5 -1
- package/packages/script-studio/package.json +9 -3
- package/packages/script-studio/src/index.ts +2 -0
- package/packages/script-studio/src/projection.ts +105 -0
- package/packages/seedance/README.md +30 -1
- package/packages/seedance/src/index.ts +18 -7
- package/packages/seedance/src/surface.ts +17 -4
- package/packages/seedance-kits/README.md +10 -2
- package/packages/seedance-kits/kits/speaker-v1.svs +5 -5
- package/packages/seedream/README.md +1 -1
- package/packages/sound/README.md +81 -0
- package/packages/sound/package.json +25 -0
- package/packages/sound/src/activation.ts +11 -0
- package/packages/sound/src/component.ts +28 -0
- package/packages/sound/src/index.ts +5 -0
- package/packages/sound/src/manifest.ts +47 -0
- package/packages/sound/src/program.ts +84 -0
- package/packages/sound/src/style.ts +34 -0
- package/packages/sound/src/surface.ts +90 -0
- package/packages/sound-studio/README.md +22 -0
- package/packages/sound-studio/package.json +20 -0
- package/packages/sound-studio/src/activation.ts +6 -0
- package/packages/sound-studio/src/index.ts +74 -0
- package/packages/speech/README.md +2 -2
- package/packages/speech-alignment/src/align.ts +45 -21
- package/packages/speech-alignment/src/local.ts +8 -0
- package/packages/speech-alignment/src/locate.ts +1 -1
- package/packages/store-sqlite/README.md +7 -0
- package/packages/store-sqlite/src/store.ts +84 -83
- package/packages/studio/INSPECTOR.md +117 -0
- package/packages/studio/README.md +149 -14
- package/packages/studio/package.json +8 -7
- package/packages/studio/src/build-library.ts +99 -84
- package/packages/studio/src/companion-assembly.ts +1 -0
- package/packages/studio/src/domain.ts +1 -1
- package/packages/studio/src/fallback-companions.ts +3 -3
- package/packages/studio/src/feedback-server.ts +51 -0
- package/packages/studio/src/feedback-store.ts +66 -0
- package/packages/studio/src/feedback.ts +60 -0
- package/packages/studio/src/library-media.ts +19 -0
- package/packages/studio/src/parameter-values.ts +83 -1
- package/packages/studio/src/parameters.ts +132 -43
- package/packages/studio/src/preview/render.ts +5 -1
- package/packages/studio/src/preview/runtime-shim.ts +49 -3
- package/packages/studio/src/programme.ts +14 -30
- package/packages/studio/src/server.ts +66 -34
- package/packages/studio/src/shared.ts +24 -8
- package/packages/studio/src/snapshot.ts +21 -132
- package/packages/studio/src/studio-preflight.ts +3 -3
- package/packages/studio/src/studio-registry.ts +72 -6
- package/packages/studio/src/style.css +342 -190
- package/packages/studio/src/temporal-edit.ts +131 -0
- package/packages/studio/src/ui/artifact-name.ts +80 -0
- package/packages/studio/src/ui/artifact-preview.ts +99 -0
- package/packages/studio/src/ui/comments.ts +233 -0
- package/packages/studio/src/ui/icons.ts +10 -1
- package/packages/studio/src/ui/library.ts +373 -192
- package/packages/studio/src/ui/main.ts +291 -110
- package/packages/studio/src/ui/material-preview.ts +1 -1
- package/packages/studio/src/ui/overlay.ts +31 -26
- package/packages/studio/src/ui/scrub-preview.ts +108 -0
- package/packages/studio/src/ui/sidebar-panel.ts +31 -0
- package/packages/studio/src/ui/stage.ts +188 -9
- package/packages/studio/src/ui/timeline.ts +187 -281
- package/packages/studio/start.ts +19 -5
- package/packages/studio-adapter/README.md +151 -11
- package/packages/studio-adapter/src/index.ts +126 -14
- package/packages/temporal/README.md +6 -6
- package/packages/temporal/package.json +1 -1
- package/packages/temporal/src/component.ts +5 -6
- package/packages/temporal/src/index.ts +8 -6
- package/packages/temporal/src/location.ts +11 -11
- package/packages/temporal/src/projection.ts +19 -19
- package/packages/temporal/src/rational.ts +4 -4
- package/packages/temporal-markup/EDITING.md +183 -0
- package/packages/temporal-markup/README.md +31 -11
- package/packages/temporal-markup/package.json +1 -1
- package/packages/temporal-markup/src/index.ts +20 -25
- package/packages/temporal-markup/src/space.ts +10 -41
- package/packages/timeline/README.md +31 -0
- package/packages/{semantic-track → timeline}/package.json +1 -1
- package/packages/timeline/src/activation.ts +8 -0
- package/packages/timeline/src/component.ts +24 -0
- package/packages/timeline/src/identity.ts +60 -0
- package/packages/timeline/src/index.ts +6 -0
- package/packages/{semantic-track → timeline}/src/location.ts +20 -20
- package/packages/timeline/src/manifest.ts +39 -0
- package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
- package/packages/timeline/src/types.ts +24 -0
- package/packages/timeline-author/README.md +68 -0
- package/packages/{speech-track → timeline-author}/package.json +6 -4
- package/packages/timeline-author/src/activation.ts +22 -0
- package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
- package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
- package/packages/timeline-author/src/index.ts +7 -0
- package/packages/timeline-author/src/manifest.ts +78 -0
- package/packages/timeline-author/src/program.ts +107 -0
- package/packages/timeline-author/src/surface.ts +46 -0
- package/packages/timeline-author/src/types.ts +6 -0
- package/packages/typography-track/README.md +4 -4
- package/packages/typography-track/package.json +1 -1
- package/packages/typography-track/src/component.ts +4 -4
- package/packages/typography-track/src/fragment.ts +4 -3
- package/packages/typography-track/src/manifest.ts +11 -9
- package/packages/typography-track/src/program.ts +15 -15
- package/packages/typography-track/src/surface.ts +17 -18
- package/packages/typography-track-studio/package.json +8 -3
- package/packages/typography-track-studio/src/index.ts +5 -1
- package/packages/video-cli/README.md +16 -4
- package/packages/video-cli/package.json +2 -1
- package/packages/video-cli/src/creation.ts +25 -9
- package/packages/video-cli/src/index.ts +1 -1
- package/packages/video-cli/src/studio-distribution.ts +2 -1
- package/packages/volcengine-matting/README.md +3 -3
- package/packages/whisperx/README.md +8 -1
- package/packages/workspace/src/index.ts +2 -0
- package/packages/workspace-fs-node/README.md +4 -1
- package/packages/workspace-fs-node/src/workspace.ts +3 -1
- package/services/whisperx/README.md +14 -0
- package/services/whisperx/pyproject.toml +2 -0
- package/services/whisperx/uv.lock +20 -20
- package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
- package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
- package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
- package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
- package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
- package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
- package/packages/provider-kie/README.md +0 -134
- package/packages/provider-kie/package.json +0 -43
- package/packages/provider-kie/src/activation.ts +0 -71
- package/packages/provider-kie/src/index.ts +0 -10
- package/packages/provider-kie/src/mapping.ts +0 -182
- package/packages/provider-kie/src/provider.ts +0 -657
- package/packages/provider-kie/src/routes.ts +0 -150
- package/packages/provider-xiaomi-mimo/README.md +0 -32
- package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
- package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
- package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
- package/packages/runtime/src/environment.ts +0 -6
- package/packages/semantic-track/README.md +0 -21
- package/packages/semantic-track/src/activation.ts +0 -8
- package/packages/semantic-track/src/component.ts +0 -24
- package/packages/semantic-track/src/identity.ts +0 -58
- package/packages/semantic-track/src/index.ts +0 -6
- package/packages/semantic-track/src/manifest.ts +0 -38
- package/packages/semantic-track/src/types.ts +0 -26
- package/packages/speech-track/README.md +0 -51
- package/packages/speech-track/src/activation.ts +0 -19
- package/packages/speech-track/src/index.ts +0 -7
- package/packages/speech-track/src/manifest.ts +0 -73
- package/packages/speech-track/src/program.ts +0 -64
- package/packages/speech-track/src/surface.ts +0 -35
- package/packages/speech-track/src/types.ts +0 -6
- package/packages/speech-track-studio/README.md +0 -3
- package/packages/speech-track-studio/package.json +0 -14
- package/packages/speech-track-studio/src/activation.ts +0 -7
- package/packages/speech-track-studio/src/index.ts +0 -40
- /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
- /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
1
2
|
import { temporalContextAttributeVocabulary } from "@hypit/temporal-markup";
|
|
2
3
|
import { compositionDependency, compositionTypes } from "@hypit/composition";
|
|
3
4
|
import { mediaDependency, mediaTypes } from "@hypit/media";
|
|
4
5
|
import { narrativeDependency } from "@hypit/narrative";
|
|
5
|
-
|
|
6
|
+
|
|
6
7
|
import { blobRefObjectSchema } from "@hypit/protocol";
|
|
7
8
|
import type { ModuleManifest, ProducerRef, TypeRef, ValueSchema } from "@hypit/protocol";
|
|
8
|
-
import {
|
|
9
|
+
import { timelineDependency } from "@hypit/timeline";
|
|
9
10
|
import { temporalDependency, temporalTypes } from "@hypit/temporal";
|
|
10
11
|
import { temporalWindowAttributeVocabulary } from "@hypit/temporal-markup";
|
|
11
12
|
|
|
@@ -68,7 +69,7 @@ export const audioTrackProgramSchema: ValueSchema = object({
|
|
|
68
69
|
|
|
69
70
|
const baseInputs = [
|
|
70
71
|
{ name: "set", type: audioTrackTypes.set }, { name: "header", type: audioTrackTypes.header },
|
|
71
|
-
{ name: "
|
|
72
|
+
{ name: "timeline", type: timelineTypes.track }, { name: "media", type: mediaTypes.synchronized },
|
|
72
73
|
{ name: "spec", type: audioTrackTypes.clipSpec }, { name: "window", type: temporalTypes.window },
|
|
73
74
|
] as const;
|
|
74
75
|
|
|
@@ -76,20 +77,20 @@ export const audioTrackMarkupSurfaces = [{
|
|
|
76
77
|
name: "track", tag: "Track", mode: "structured",
|
|
77
78
|
outputs: [audioTrackTypes.header, audioTrackTypes.clipSpec, temporalTypes.instantSpec, temporalTypes.windowSpec, temporalTypes.instant, temporalTypes.window, audioTrackTypes.program, compositionTypes.audioTrack],
|
|
78
79
|
vocabulary: {
|
|
79
|
-
summary: "One Audio Track: explicitly prepared audio
|
|
80
|
+
summary: "One Audio Track: explicitly prepared audio Items placed on the selected film time axis and lowered to one ordinary peer AudioTrack.",
|
|
80
81
|
attributes: [
|
|
81
|
-
{ name: "id", kind: "identifier", required: true, summary: "Names this Audio Track and prefixes the identity of every
|
|
82
|
+
{ name: "id", kind: "identifier", required: true, summary: "Names this Audio Track and prefixes the identity of every Item that does not name itself." },
|
|
82
83
|
...temporalContextAttributeVocabulary,
|
|
83
84
|
],
|
|
84
85
|
children: [
|
|
85
|
-
{ tag: "
|
|
86
|
+
{ tag: "Item", cardinality: "many",
|
|
86
87
|
summary: "Places one SynchronizedMedia source on an exact program window with its own trim, occupancy and mix.",
|
|
87
88
|
attributes: [
|
|
88
89
|
{ name: "id", kind: "identifier", required: false,
|
|
89
|
-
summary: "Names this
|
|
90
|
+
summary: "Names this Item; the Track derives `<track>.item.<index>` when it is absent." },
|
|
90
91
|
{ name: "source", kind: "reference", required: true,
|
|
91
92
|
accepts: [mediaTypes.synchronized],
|
|
92
|
-
summary: "Selects the explicitly prepared audio this
|
|
93
|
+
summary: "Selects the explicitly prepared audio this Item plays." },
|
|
93
94
|
...temporalWindowAttributeVocabulary,
|
|
94
95
|
{ name: "trim-start", kind: "literal", required: false,
|
|
95
96
|
summary: "Sets the source start position; defaults to the source beginning." },
|
|
@@ -103,7 +104,7 @@ export const audioTrackMarkupSurfaces = [{
|
|
|
103
104
|
{ name: "max-rate", kind: "literal", required: false,
|
|
104
105
|
summary: "Bounds the fastest rate bounded stretch may use." },
|
|
105
106
|
{ name: "gain", kind: "literal", required: false,
|
|
106
|
-
summary: "Scales this
|
|
107
|
+
summary: "Scales this Item by a linear gain; defaults to `1`." },
|
|
107
108
|
{ name: "fade-in", kind: "literal", required: false,
|
|
108
109
|
summary: "Fixes the exact fade-in length; defaults to `0f`." },
|
|
109
110
|
{ name: "fade-out", kind: "literal", required: false,
|
|
@@ -112,15 +113,15 @@ export const audioTrackMarkupSurfaces = [{
|
|
|
112
113
|
],
|
|
113
114
|
ports: [
|
|
114
115
|
{ name: "program", type: audioTrackTypes.program, summary: "The resolved sample-exact item list this Track renders from." },
|
|
115
|
-
{ name: "
|
|
116
|
+
{ name: "audio", type: compositionTypes.audioTrack, summary: "The rendered AudioTrack that Film composes with its peers." },
|
|
116
117
|
],
|
|
117
|
-
example: `<audio:Track id="music-bed"
|
|
118
|
-
<audio:
|
|
118
|
+
example: `<audio:Track id="music-bed" timeline={speech.timeline}>
|
|
119
|
+
<audio:Item source={music-media.media} during="program"
|
|
119
120
|
playback="loop-end" gain="0.28" fade-in="600ms" fade-out="800ms"/>
|
|
120
121
|
</audio:Track>`,
|
|
121
122
|
notes: [
|
|
122
|
-
"A Track requires at least one
|
|
123
|
-
"A
|
|
123
|
+
"A Track requires at least one Item, and neither a Track nor a Item accepts text content.",
|
|
124
|
+
"A Item states exactly one window form: `during`, `at` with `for`, `until` with `for`, or `start` with `end`.",
|
|
124
125
|
"A point expression is `program.start`, `program.end`, `selection.start`, `selection.end`, `segment.start`, `segment.end` or `moment.cue`, each optionally offset by `+` or `-` and a duration, or a bare duration read as an absolute position.",
|
|
125
126
|
"Bind selection, segment and/or moment only when the start/end expressions use them; different endpoints can use different bindings.",
|
|
126
127
|
"`min-rate` and `max-rate` are rejected unless `playback` is `stretch`.",
|
|
@@ -133,7 +134,7 @@ export const audioTrackManifest: ModuleManifest = {
|
|
|
133
134
|
format: "hypit.module@1",
|
|
134
135
|
name: audioTrackModuleRef.name,
|
|
135
136
|
version: audioTrackModuleRef.version,
|
|
136
|
-
dependencies: [mediaDependency, narrativeDependency,
|
|
137
|
+
dependencies: [mediaDependency, narrativeDependency, timelineDependency, temporalDependency, compositionDependency],
|
|
137
138
|
types: [
|
|
138
139
|
{ name: audioTrackTypes.header.name },
|
|
139
140
|
{ name: audioTrackTypes.clipSpec.name },
|
|
@@ -145,7 +146,7 @@ export const audioTrackManifest: ModuleManifest = {
|
|
|
145
146
|
{ name: audioTrackProducers.createSet.name, inputs: [], outputs: [{ name: "set", type: audioTrackTypes.set }], needs: [] },
|
|
146
147
|
{ name: audioTrackProducers.appendItem.name, inputs: [...baseInputs], outputs: [{ name: "set", type: audioTrackTypes.set }], needs: [] },
|
|
147
148
|
{ name: audioTrackProducers.finalize.name, inputs: [{ name: "set", type: audioTrackTypes.set }, { name: "header", type: audioTrackTypes.header }], outputs: [{ name: "program", type: audioTrackTypes.program }], needs: [] },
|
|
148
|
-
{ name: audioTrackProducers.render.name, inputs: [{ name: "
|
|
149
|
+
{ name: audioTrackProducers.render.name, inputs: [{ name: "timeline", type: timelineTypes.track }, { name: "program", type: audioTrackTypes.program }], outputs: [{ name: "track", type: compositionTypes.audioTrack }], needs: [] },
|
|
149
150
|
],
|
|
150
151
|
};
|
|
151
152
|
export const audioTrackDependency = { module: audioTrackModuleRef } as const;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
2
|
import { assertAudioTrackIdentity, sealAudioTrack } from "@hypit/composition";
|
|
2
3
|
import type { AudioClip, AudioTrack } from "@hypit/composition";
|
|
3
4
|
import { synchronizedMediaSampleFrames, verifySynchronizedMedia } from "@hypit/media";
|
|
4
5
|
import type { SynchronizedMedia } from "@hypit/media";
|
|
5
|
-
import {
|
|
6
|
-
assertProgramSpaceIdentity,
|
|
7
|
-
programFrameSampleBoundary,
|
|
8
|
-
programSpaceSampleFrames,
|
|
9
|
-
} from "@hypit/program-space";
|
|
10
|
-
import type { ProgramSpace } from "@hypit/program-space";
|
|
6
|
+
import { assertProgramSpaceIdentity, programFrameSampleBoundary, programSpaceSampleFrames } from "@hypit/program-space";
|
|
11
7
|
import { canonicalize, isResourceId } from "@hypit/protocol";
|
|
12
8
|
import { assertTemporalWindowFor, temporalDurationInSamples } from "@hypit/temporal";
|
|
13
9
|
import type { ProjectedWindow, TemporalDuration } from "@hypit/temporal";
|
|
@@ -94,23 +90,23 @@ function sourceFacts(media: SynchronizedMedia): AudioItemProgram["source"] {
|
|
|
94
90
|
function realizedItems(
|
|
95
91
|
set: AudioTrackSet,
|
|
96
92
|
header: AudioTrackHeader,
|
|
97
|
-
|
|
93
|
+
timeline: Timeline,
|
|
98
94
|
media: SynchronizedMedia,
|
|
99
95
|
spec: AudioClipSpec,
|
|
100
96
|
window: ProjectedWindow,
|
|
101
97
|
): AudioTrackSet {
|
|
102
98
|
assertAudioTrackSet(set);
|
|
103
99
|
assertAudioTrackHeader(header);
|
|
104
|
-
assertProgramSpaceIdentity(
|
|
100
|
+
assertProgramSpaceIdentity(timeline);
|
|
105
101
|
assertAudioClipSpec(spec);
|
|
106
|
-
assertTemporalWindowFor(window, { subjectId: spec.id, space });
|
|
102
|
+
assertTemporalWindowFor(window, { subjectId: spec.id, space: timeline });
|
|
107
103
|
const source = sourceFacts(media);
|
|
108
|
-
const trimStart = spec.trim.start === undefined ? 0 : temporalDurationInSamples(spec.trim.start,
|
|
109
|
-
const trimEnd = spec.trim.end === undefined ? source.sampleFrames : temporalDurationInSamples(spec.trim.end,
|
|
104
|
+
const trimStart = spec.trim.start === undefined ? 0 : temporalDurationInSamples(spec.trim.start, timeline);
|
|
105
|
+
const trimEnd = spec.trim.end === undefined ? source.sampleFrames : temporalDurationInSamples(spec.trim.end, timeline);
|
|
110
106
|
assert(trimStart >= 0 && trimStart < source.sampleFrames, `Audio Clip ${spec.id} trim start is outside its source.`);
|
|
111
107
|
assert(trimEnd > trimStart && trimEnd <= source.sampleFrames, `Audio Clip ${spec.id} trim end is outside its source.`);
|
|
112
|
-
const fadeInSamples = temporalDurationInSamples(spec.mix.fadeIn,
|
|
113
|
-
const fadeOutSamples = temporalDurationInSamples(spec.mix.fadeOut,
|
|
108
|
+
const fadeInSamples = temporalDurationInSamples(spec.mix.fadeIn, timeline);
|
|
109
|
+
const fadeOutSamples = temporalDurationInSamples(spec.mix.fadeOut, timeline);
|
|
114
110
|
const addition = {
|
|
115
111
|
id: window.id,
|
|
116
112
|
subjectId: spec.id,
|
|
@@ -129,12 +125,12 @@ function realizedItems(
|
|
|
129
125
|
export function appendProjectedAudioItem(
|
|
130
126
|
set: AudioTrackSet,
|
|
131
127
|
header: AudioTrackHeader,
|
|
132
|
-
|
|
128
|
+
timeline: Timeline,
|
|
133
129
|
media: SynchronizedMedia,
|
|
134
130
|
spec: AudioClipSpec,
|
|
135
131
|
window: ProjectedWindow,
|
|
136
132
|
): AudioTrackSet {
|
|
137
|
-
return realizedItems(set, header,
|
|
133
|
+
return realizedItems(set, header, timeline, media, spec, window);
|
|
138
134
|
}
|
|
139
135
|
|
|
140
136
|
function normalizeProgram(value: AudioTrackProgram): AudioTrackProgram {
|
|
@@ -183,9 +179,9 @@ export function assertAudioTrackProgram(value: AudioTrackProgram): void {
|
|
|
183
179
|
}
|
|
184
180
|
}
|
|
185
181
|
|
|
186
|
-
function terminalClip(item: AudioItemProgram,
|
|
187
|
-
const windowStart = programFrameSampleBoundary(
|
|
188
|
-
const windowEnd = programFrameSampleBoundary(
|
|
182
|
+
function terminalClip(item: AudioItemProgram, timeline: Timeline): AudioClip {
|
|
183
|
+
const windowStart = programFrameSampleBoundary(timeline, item.window.startFrame, 48_000);
|
|
184
|
+
const windowEnd = programFrameSampleBoundary(timeline, item.window.endFrameExclusive, 48_000);
|
|
189
185
|
const windowLength = windowEnd - windowStart;
|
|
190
186
|
const effectiveLength = item.trim.endSampleExclusive - item.trim.startSample;
|
|
191
187
|
let targetStart = windowStart;
|
|
@@ -237,18 +233,18 @@ function terminalClip(item: AudioItemProgram, space: ProgramSpace): AudioClip {
|
|
|
237
233
|
};
|
|
238
234
|
}
|
|
239
235
|
|
|
240
|
-
export function renderAudioTrack(
|
|
241
|
-
assertProgramSpaceIdentity(
|
|
236
|
+
export function renderAudioTrack(timeline: Timeline, program: AudioTrackProgram): AudioTrack {
|
|
237
|
+
assertProgramSpaceIdentity(timeline);
|
|
242
238
|
assertAudioTrackProgram(program);
|
|
243
|
-
const totalSamples = programSpaceSampleFrames(
|
|
239
|
+
const totalSamples = programSpaceSampleFrames(timeline, 48_000);
|
|
244
240
|
const track = sealAudioTrack({
|
|
245
|
-
programSpaceId:
|
|
241
|
+
programSpaceId: timeline.id,
|
|
246
242
|
id: program.id,
|
|
247
|
-
clips: program.items.map((item) => terminalClip(item,
|
|
243
|
+
clips: program.items.map((item) => terminalClip(item, timeline)),
|
|
248
244
|
});
|
|
249
245
|
for (const clip of track.clips) {
|
|
250
|
-
assert(clip.target.endSampleExclusive <= totalSamples, `Audio Clip ${clip.id} is outside
|
|
246
|
+
assert(clip.target.endSampleExclusive <= totalSamples, `Audio Clip ${clip.id} is outside Timeline.`);
|
|
251
247
|
}
|
|
252
|
-
assertAudioTrackIdentity(track,
|
|
248
|
+
assertAudioTrackIdentity(track, timeline);
|
|
253
249
|
return track;
|
|
254
250
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveTemporalContext } from "@hypit/temporal-markup";
|
|
2
2
|
import { mediaTypes } from "@hypit/media";
|
|
3
3
|
import type {
|
|
4
4
|
StructuredElement,
|
|
@@ -85,8 +85,10 @@ function numeric(element: StructuredElement, name: string, fallback?: number): n
|
|
|
85
85
|
return value;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
export const audioItemDefaults = { playback: "once", gain: 1, "fade-in": "0f", "fade-out": "0f" } as const;
|
|
89
|
+
|
|
88
90
|
function occupancy(element: StructuredElement): AudioOccupancy {
|
|
89
|
-
switch (text(element, "playback",
|
|
91
|
+
switch (text(element, "playback", audioItemDefaults.playback)) {
|
|
90
92
|
case "once":
|
|
91
93
|
case "once-start": return { mode: "once", align: "start" };
|
|
92
94
|
case "once-end": return { mode: "once", align: "end" };
|
|
@@ -104,10 +106,9 @@ function occupancy(element: StructuredElement): AudioOccupancy {
|
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
export const decodeAudioTrackSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
107
|
-
allowed(element, ["id", "
|
|
109
|
+
allowed(element, ["id", "timeline"]);
|
|
108
110
|
const id = text(element, "id");
|
|
109
111
|
const context = resolveTemporalContext({ element, resolveReference });
|
|
110
|
-
const time = createTemporalSpace({ id: id, element, ...context });
|
|
111
112
|
const headerId = `${id}.header`;
|
|
112
113
|
const records: SurfaceRecordDraft[] = [{
|
|
113
114
|
id: headerId,
|
|
@@ -115,20 +116,20 @@ export const decodeAudioTrackSurface: StructuredSurfaceHandler = ({ element, res
|
|
|
115
116
|
value: { kind: "inline", value: sealAudioTrackHeader({ id }) },
|
|
116
117
|
range: element.range,
|
|
117
118
|
}];
|
|
118
|
-
const temporalComponents: SurfaceComponentDraft[] = [
|
|
119
|
-
const temporalFragments: ReturnType<typeof createTemporalWindowProjection>["fragments"][number][] = [
|
|
119
|
+
const temporalComponents: SurfaceComponentDraft[] = [];
|
|
120
|
+
const temporalFragments: ReturnType<typeof createTemporalWindowProjection>["fragments"][number][] = [];
|
|
120
121
|
const fragmentItems: Parameters<typeof createAudioTrackFragment>[0][number][] = [];
|
|
121
122
|
const inputs: Record<string, { kind: "record"; id: string } | { kind: "component-output"; component: string; output: string }> = {
|
|
122
123
|
header: { kind: "record", id: headerId },
|
|
123
|
-
|
|
124
|
+
timeline: context.timeline.ref,
|
|
124
125
|
};
|
|
125
126
|
let itemIndex = 0;
|
|
126
127
|
for (const child of element.children) {
|
|
127
128
|
if (child.kind === "text") {
|
|
128
|
-
if (child.value.trim()) throw new Error(`${element.name} accepts only
|
|
129
|
+
if (child.value.trim()) throw new Error(`${element.name} accepts only Item children.`);
|
|
129
130
|
continue;
|
|
130
131
|
}
|
|
131
|
-
if (!child.name.endsWith(":
|
|
132
|
+
if (!child.name.endsWith(":Item") && child.name !== "Item") throw new Error(`${element.name} accepts only Item children.`);
|
|
132
133
|
if (child.children.some((node) => node.kind === "element" || node.value.trim())) throw new Error(`${child.name} must be empty.`);
|
|
133
134
|
allowed(child, [
|
|
134
135
|
"id", "source", ...temporalWindowAttributeNames,
|
|
@@ -136,9 +137,9 @@ export const decodeAudioTrackSurface: StructuredSurfaceHandler = ({ element, res
|
|
|
136
137
|
]);
|
|
137
138
|
itemIndex += 1;
|
|
138
139
|
const suffix = String(itemIndex).padStart(4, "0");
|
|
139
|
-
const clipId = optionalText(child, "id") ?? `${id}.
|
|
140
|
+
const clipId = optionalText(child, "id") ?? `${id}.item.${suffix}`;
|
|
140
141
|
const source = resolved(child.attributes.source, `${child.name}.source`, mediaTypes.synchronized, resolveReference);
|
|
141
|
-
const temporal = createTemporalWindowProjection({ id: clipId, element: child, ...context,
|
|
142
|
+
const temporal = createTemporalWindowProjection({ id: clipId, element: child, ...context, resolveReference });
|
|
142
143
|
records.push(...temporal.records);
|
|
143
144
|
temporalComponents.push(...temporal.components);
|
|
144
145
|
temporalFragments.push(...temporal.fragments);
|
|
@@ -155,22 +156,22 @@ export const decodeAudioTrackSurface: StructuredSurfaceHandler = ({ element, res
|
|
|
155
156
|
},
|
|
156
157
|
occupancy: playback,
|
|
157
158
|
mix: {
|
|
158
|
-
gain: numeric(child, "gain",
|
|
159
|
-
fadeIn: duration(text(child, "fade-in", "
|
|
160
|
-
fadeOut: duration(text(child, "fade-out", "
|
|
159
|
+
gain: numeric(child, "gain", audioItemDefaults.gain),
|
|
160
|
+
fadeIn: duration(text(child, "fade-in", audioItemDefaults["fade-in"]), `${child.name}.fade-in`),
|
|
161
|
+
fadeOut: duration(text(child, "fade-out", audioItemDefaults["fade-out"]), `${child.name}.fade-out`),
|
|
161
162
|
},
|
|
162
163
|
});
|
|
163
164
|
const windowName = `item-${suffix}-window`;
|
|
164
165
|
inputs[windowName] = temporal.ref;
|
|
165
166
|
const mediaName = `item-${suffix}-media`;
|
|
166
167
|
const specName = `item-${suffix}-spec`;
|
|
167
|
-
const specId = `${id}.
|
|
168
|
+
const specId = `${id}.item.${suffix}.spec`;
|
|
168
169
|
records.push({ id: specId, type: audioTrackTypes.clipSpec, value: { kind: "inline", value: clipSpec }, range: child.range });
|
|
169
170
|
inputs[mediaName] = source.ref;
|
|
170
171
|
inputs[specName] = { kind: "record", id: specId };
|
|
171
172
|
fragmentItems.push({ mediaName, specName, windowName });
|
|
172
173
|
}
|
|
173
|
-
if (fragmentItems.length === 0) throw new Error(`${element.name} requires at least one
|
|
174
|
+
if (fragmentItems.length === 0) throw new Error(`${element.name} requires at least one Item.`);
|
|
174
175
|
const fragment = createAudioTrackFragment(fragmentItems);
|
|
175
176
|
return {
|
|
176
177
|
records,
|
|
@@ -178,10 +179,10 @@ export const decodeAudioTrackSurface: StructuredSurfaceHandler = ({ element, res
|
|
|
178
179
|
id,
|
|
179
180
|
fragment: fragment.id,
|
|
180
181
|
inputs,
|
|
181
|
-
outputs: { program: `${id}.program`,
|
|
182
|
+
outputs: { program: `${id}.program`, audio: `${id}.audio` },
|
|
182
183
|
range: element.range,
|
|
183
184
|
}],
|
|
184
185
|
fragments: [...temporalFragments, fragment],
|
|
185
|
-
exports: [`${id}.program`, `${id}.
|
|
186
|
+
exports: [`${id}.program`, `${id}.audio`],
|
|
186
187
|
};
|
|
187
188
|
};
|
|
@@ -1,3 +1,26 @@
|
|
|
1
1
|
# `@hypit/audio-track-studio`
|
|
2
2
|
|
|
3
3
|
Hypit Studio Companion for `@hypit/audio-track`. The domain package does not depend on this package.
|
|
4
|
+
|
|
5
|
+
Each Item has a title and waveform body. An explicit author `id` supplies its
|
|
6
|
+
title; otherwise the Companion displays the exact `source` reference. Display
|
|
7
|
+
names do not replace the Item's identity or writeback endpoint. This is the same
|
|
8
|
+
rule as Media Items. For example, `id="soundtrack" source={music.media}` shows
|
|
9
|
+
`soundtrack`; omitting the id shows `music.media`. Here `.media` is the source
|
|
10
|
+
output port, not an Audio-specific name suffix.
|
|
11
|
+
|
|
12
|
+
When groups placement, source trim, playback rates and fades. How contains gain.
|
|
13
|
+
Gain displays as a percentage (0–6400%) and writes back as a scalar; duration controls preserve their authored `f`, `ms` or `s` unit.
|
|
14
|
+
Omitted gain and fade defaults remain editable; the first edit writes an explicit
|
|
15
|
+
attribute. Playback uses the standard parameter controls and saves when editing ends. Stretch also
|
|
16
|
+
asks for minimum and maximum rate multipliers (1 means original speed). Switching
|
|
17
|
+
to once/loop removes these bounds in the same edit. The Surface retains final
|
|
18
|
+
validation of positive, ordered rates. No arbitrary bounds are supplied for the author.
|
|
19
|
+
|
|
20
|
+
The Companion declares a schema-described `attributes` group. Studio provides
|
|
21
|
+
record alternatives, completion hints and grouped source serialization without knowing
|
|
22
|
+
any Audio mode names.
|
|
23
|
+
|
|
24
|
+
Selecting an overlapping Item raises it in the editing lane while all sounds
|
|
25
|
+
continue to mix. Timing gestures use the same temporal projection bindings as
|
|
26
|
+
Media Track.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { audioTrackModuleRef, audioTrackTypes } from "@hypit/audio-track";
|
|
1
|
+
import { audioItemDefaults, audioTrackModuleRef, audioTrackTypes } from "@hypit/audio-track";
|
|
2
2
|
import type { AudioTrackProgram } from "@hypit/audio-track";
|
|
3
3
|
import { compositionTypes } from "@hypit/composition";
|
|
4
4
|
import type { StudioTrackCompanion, StudioTrackCompanionContext, StudioEntityDraft } from "@hypit/studio-adapter";
|
|
5
|
-
import { artifactPreview, childEntities, previewLayer, requiredSurfaceValue, temporalLineageFor, temporalSemanticSource } from "@hypit/studio-adapter";
|
|
5
|
+
import { artifactPreview, authoredItemTitle, childEntities, previewLayer, requiredSurfaceValue, temporalLineageFor, temporalSemanticSource } from "@hypit/studio-adapter";
|
|
6
6
|
|
|
7
7
|
function projectAudio(context: StudioTrackCompanionContext): readonly StudioEntityDraft[] {
|
|
8
8
|
const program = requiredSurfaceValue(context, "program") as AudioTrackProgram;
|
|
@@ -21,7 +21,10 @@ function projectAudio(context: StudioTrackCompanionContext): readonly StudioEnti
|
|
|
21
21
|
const semanticSource = temporalSemanticSource(temporal);
|
|
22
22
|
return {
|
|
23
23
|
...entity,
|
|
24
|
-
display: {
|
|
24
|
+
display: {
|
|
25
|
+
title: authoredItemTitle(context, entity.authoredId, item.sourceTypes, ["source"]),
|
|
26
|
+
layers: [previewLayer(item.preview, "waveform")],
|
|
27
|
+
},
|
|
25
28
|
...(semanticSource?.id === undefined
|
|
26
29
|
? {}
|
|
27
30
|
: { markerId: semanticSource.id }),
|
|
@@ -39,31 +42,42 @@ export const audioTrackStudioTrackCompanions: readonly StudioTrackCompanion[] =
|
|
|
39
42
|
{ name: "source" },
|
|
40
43
|
{ name: "trim-start", writable: true },
|
|
41
44
|
{ name: "trim-end", writable: true },
|
|
42
|
-
{ name: "playback", writable: true
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
{ name: "playback-settings", writable: true,
|
|
46
|
+
attributes: ["playback", "min-rate", "max-rate"],
|
|
47
|
+
fallback: { playback: audioItemDefaults.playback },
|
|
48
|
+
schema: { kind: "oneOf", variants: ["once", "once-start", "once-end", "loop", "loop-start", "loop-end", "stretch"].map(mode => ({
|
|
49
|
+
kind: "object", fields: {
|
|
50
|
+
playback: { schema: { kind: "literal", value: mode } },
|
|
51
|
+
...(mode === "stretch" ? {
|
|
52
|
+
"min-rate": { schema: { kind: "number", minimum: 0, maximum: 100 } },
|
|
53
|
+
"max-rate": { schema: { kind: "number", minimum: 0, maximum: 100 } },
|
|
54
|
+
} : {}),
|
|
55
|
+
},
|
|
56
|
+
})) },
|
|
57
|
+
},
|
|
58
|
+
{ name: "gain", writable: true, fallback: audioItemDefaults.gain },
|
|
59
|
+
{ name: "fade-in", writable: true, fallback: audioItemDefaults["fade-in"] },
|
|
60
|
+
{ name: "fade-out", writable: true, fallback: audioItemDefaults["fade-out"] },
|
|
48
61
|
],
|
|
49
62
|
inspector: [
|
|
50
63
|
{
|
|
51
|
-
binding: "playback", label: "Playback", domain: "
|
|
64
|
+
binding: "playback-settings", label: "Playback", domain: "when",
|
|
52
65
|
page: { id: "playback", label: "Playback" }, section: { id: "playback", label: "Playback" },
|
|
53
|
-
control: "
|
|
66
|
+
control: "record",
|
|
67
|
+
summary: "Rates are multipliers (1 = original speed). Stretch requires both rate bounds.",
|
|
54
68
|
},
|
|
55
69
|
...(["trim-start", "trim-end"] as const).map((binding) => ({
|
|
56
|
-
binding, label: binding === "trim-start" ? "Trim Start" : "Trim End", domain: "
|
|
57
|
-
page: { id: "playback", label: "Playback" }, section: { id: "trim", label: "Trim" }, control: "
|
|
58
|
-
|
|
59
|
-
...(["min-rate", "max-rate", "gain"] as const).map((binding) => ({
|
|
60
|
-
binding, label: binding === "min-rate" ? "Minimum Rate" : binding === "max-rate" ? "Maximum Rate" : "Gain",
|
|
61
|
-
domain: "how" as const, page: { id: "mix", label: "Mix" }, section: { id: "mix", label: "Mix" },
|
|
62
|
-
control: "number" as const,
|
|
70
|
+
binding, label: binding === "trim-start" ? "Trim Start" : "Trim End", domain: "when" as const,
|
|
71
|
+
page: { id: "playback", label: "Playback" }, section: { id: "trim", label: "Trim" }, control: "number" as const,
|
|
72
|
+
number: { suffixes: ["ms", "s", "f"], minimum: 0 },
|
|
63
73
|
})),
|
|
74
|
+
{ binding: "gain", label: "Gain", domain: "how",
|
|
75
|
+
page: { id: "mix", label: "Mix" }, section: { id: "mix", label: "Mix" },
|
|
76
|
+
control: "number", unit: "%", number: { scale: 100, minimum: 0, maximum: 6400, step: 1 } },
|
|
64
77
|
...(["fade-in", "fade-out"] as const).map((binding) => ({
|
|
65
78
|
binding, label: binding === "fade-in" ? "Fade In" : "Fade Out", domain: "when" as const,
|
|
66
|
-
page: { id: "fade", label: "Fade" }, section: { id: "fade", label: "Fade" }, control: "
|
|
79
|
+
page: { id: "fade", label: "Fade" }, section: { id: "fade", label: "Fade" }, control: "number" as const,
|
|
80
|
+
number: { suffixes: ["ms", "s", "f"], minimum: 0 },
|
|
67
81
|
})),
|
|
68
82
|
],
|
|
69
83
|
requiredValues: ["program"], project: projectAudio,
|
|
@@ -4,7 +4,7 @@ Small public framework API for an Author Package.
|
|
|
4
4
|
|
|
5
5
|
It joins four stable authoring boundaries: nominal Module declarations, deterministic component
|
|
6
6
|
handlers, sealed Graph Fragments and Markup Surface handlers. Domain facts still come from their
|
|
7
|
-
owners—for example `@hypit/composition`, `@hypit/
|
|
7
|
+
owners—for example `@hypit/composition`, `@hypit/timeline` and `@hypit/spatial`. This package
|
|
8
8
|
does not re-export the video vocabulary or turn those packages into one central object.
|
|
9
9
|
|
|
10
10
|
`@hypit/hypit/author-kit` contains no registry, package search, installer, Runtime, Provider or Studio
|
|
@@ -12,13 +12,10 @@ Use it for a product, portrait or graphic that will be composited over another p
|
|
|
12
12
|
image Output. `{cutout.image}` publishes one image BlobArtifact with transparency. Keep its actual
|
|
13
13
|
dimensions when placing it in Media Track, or use Image Compose when a flattened still is wanted.
|
|
14
14
|
|
|
15
|
-
The package declares the visual operation;
|
|
16
|
-
`@hypit/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
collect lifecycle and expects one image result. Another Provider can fulfill the same capability
|
|
20
|
-
without changing the Source. This operation therefore needs no separate Recraft-specific author
|
|
21
|
-
Model to use the existing KIE implementation.
|
|
15
|
+
The package declares the visual operation; a project Provider implements the capability
|
|
16
|
+
`@hypit/background-removal@1#remove-background`, accepting `{ source: BlobRef }` and returning one
|
|
17
|
+
image BlobRef with transparency. The Provider owns its service's request mapping and task lifecycle.
|
|
18
|
+
A service-specific author Model is unnecessary when the operation has this same meaning.
|
|
22
19
|
|
|
23
20
|
For a moving portrait, [Volcengine Matting](../volcengine-matting/README.md) provides
|
|
24
21
|
`<matte:Portrait source={performance.video}/>` through HypiHub. Normalize its processed video
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# `@hypit/build-result`
|
|
2
|
+
|
|
3
|
+
Build Results retain accepted public Outputs and the attempt's final outcome. Execution state belongs
|
|
4
|
+
to Runtime. A Result records which value satisfied each Output; a new Output record does not imply a
|
|
5
|
+
new media file.
|
|
6
|
+
|
|
7
|
+
## Values and file ownership
|
|
8
|
+
|
|
9
|
+
| Value source | Persisted representation |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| New Resource without an existing durable address | One file owned by this Build |
|
|
12
|
+
| Explicit Workspace file | `external-file` with the Workspace's URI |
|
|
13
|
+
| Resource from an earlier Result | `build-file` with its original `build` and `path` |
|
|
14
|
+
| Entire earlier public Output | `build-output` pointing to its terminal Build and Output |
|
|
15
|
+
| Composite value | A Value Document whose Resource bindings follow the same rules at every depth |
|
|
16
|
+
|
|
17
|
+
A local `build-file` omits `build` when its owner is the containing Result. When imported into another
|
|
18
|
+
Build, its owner becomes explicit. Arrays and nested objects do not change ownership: a new Composite
|
|
19
|
+
can save new structure while referencing old video, audio and images. Only newly produced Resources
|
|
20
|
+
get new files. The encoder recognizes Resource values, independently of their domain Type or field name.
|
|
21
|
+
|
|
22
|
+
An `external-file` stays live. Replacing that file changes subsequent reads; deleting it leaves an
|
|
23
|
+
unavailable dependency. The stored size describes the file when admitted; `describeFile` and public
|
|
24
|
+
Output resolution obtain its current size. Readers use the explicit address without searching for
|
|
25
|
+
alternatives or comparing file contents.
|
|
26
|
+
|
|
27
|
+
## Passing references through execution
|
|
28
|
+
|
|
29
|
+
Workspace attachments may supply a `location` URI. The Node compiler preserves it, and the CLI maps
|
|
30
|
+
these addresses and explicitly imported Result files to the compilation's Resource identities. It
|
|
31
|
+
passes that map as `BuildResultSeed.resourceReferences` alongside whole-Output `forwards`.
|
|
32
|
+
|
|
33
|
+
The Result writer keeps this per-Build map in its private writer state while publishing. It uses the
|
|
34
|
+
map for both direct Resource Outputs and all nested Resource bindings. Persistent Output documents
|
|
35
|
+
contain the references they actually use; private writer state is removed at the terminal outcome.
|
|
36
|
+
Core still receives ordinary typed Records, Candidates and Resource identities. It has no knowledge
|
|
37
|
+
of file paths or Result repositories. Runtime may stage input bytes for execution independently of
|
|
38
|
+
Result publication.
|
|
39
|
+
|
|
40
|
+
Repositories own address access. `describeFile` obtains metadata and `openFile` streams bytes or a byte
|
|
41
|
+
range. The filesystem and S3 implementations accept `ExternalFileAccess` for external addresses; the
|
|
42
|
+
Node default opens Workspace `file:` URIs. A custom adapter can supply a different address reader.
|
|
43
|
+
Selecting S3 for Result storage does not implicitly upload external file dependencies.
|
|
44
|
+
|
|
45
|
+
`fileReferenceIdentity` identifies the explicit URI or owning Build and path. Studio uses this identity
|
|
46
|
+
to group multiple uses of a file. Separate files remain separate even when their bytes happen to match.
|
|
47
|
+
|
|
48
|
+
An explicit `hypit get` export collects the selected Output's referenced bytes into its destination.
|
|
49
|
+
Composite exports rewrite bindings to local files, including references with different owners but the
|
|
50
|
+
same relative filename. This makes that export self-contained; ordinary Build publication preserves
|
|
51
|
+
references. Moving editable projects also requires preserving or updating their external file addresses.
|
|
52
|
+
|
|
53
|
+
Published Outputs can carry an optional author `displayName` for browsers such as Studio.
|
|
54
|
+
It is presentation text only: Output names, forwarding and file ownership do not change.
|
|
55
|
+
|
|
56
|
+
`updatePresentation` accepts `outputDisplayNames`, keyed by exact public Output name. Each
|
|
57
|
+
nonempty string sets that Output’s `displayName`; null removes it. Like title and note editing,
|
|
58
|
+
this applies to finished Results and preserves all values, file references and Output identifiers.
|
|
59
|
+
|
|
60
|
+
## Execution evidence
|
|
61
|
+
|
|
62
|
+
A finished manifest may contain `executionLog`, an ordinary Result file reference separate from
|
|
63
|
+
`outputs`. `BuildResultWriter.finish({ executionLog, outcome, ... })` accepts a byte stream. Repositories
|
|
64
|
+
preserve it as `execution.jsonl` before the terminal manifest is published. The filesystem and S3
|
|
65
|
+
implementations use the same interface. Repeating an already completed finish does not rewrite it.
|
|
66
|
+
|
|
67
|
+
This file describes how the Build ran; it is neither an authored Output nor a gallery asset. Consumers
|
|
68
|
+
read it with `openFile(build, manifest.executionLog)`. Its absence means no log was recorded, including
|
|
69
|
+
Results made before logging was available; readers do not reconstruct history from other projects.
|
|
@@ -70,14 +70,9 @@ function resultPath(value: unknown, subject: string): string {
|
|
|
70
70
|
|
|
71
71
|
function outputValue(value: unknown, subject: string): BuildResultOutputValue {
|
|
72
72
|
const item = object(value, subject);
|
|
73
|
-
if (item.kind === "build-file") {
|
|
73
|
+
if (item.kind === "build-file" || item.kind === "external-file") {
|
|
74
74
|
assertBuildResultFileRef(item, subject);
|
|
75
|
-
return {
|
|
76
|
-
kind: "build-file",
|
|
77
|
-
path: item.path,
|
|
78
|
-
size: item.size,
|
|
79
|
-
mediaType: item.mediaType,
|
|
80
|
-
};
|
|
75
|
+
return { ...item };
|
|
81
76
|
}
|
|
82
77
|
if (item.kind === "build-output") {
|
|
83
78
|
return {
|
|
@@ -106,6 +101,7 @@ function outputs(value: unknown, subject: string): Readonly<Record<string, Build
|
|
|
106
101
|
text(name, `${subject} Output name`);
|
|
107
102
|
const item = object(value, `${subject}[${JSON.stringify(name)}]`);
|
|
108
103
|
return [name, {
|
|
104
|
+
...(item.displayName === undefined ? {} : { displayName: text(item.displayName, `${subject}.displayName`) }),
|
|
109
105
|
type: typeRef(item.type, `${subject}[${JSON.stringify(name)}].type`),
|
|
110
106
|
value: outputValue(item.value, `${subject}[${JSON.stringify(name)}].value`),
|
|
111
107
|
}] as const;
|
|
@@ -206,6 +202,7 @@ export function decodeBuildResultManifest(
|
|
|
206
202
|
throw new Error(`${subject} must be either unfinished or have both outcome and finishedAt`);
|
|
207
203
|
}
|
|
208
204
|
const failure = optionalString(item.failure, `${subject}.failure`);
|
|
205
|
+
if (item.executionLog !== undefined) assertBuildResultFileRef(item.executionLog, `${subject}.executionLog`);
|
|
209
206
|
return {
|
|
210
207
|
format: "hypit.build-result@1",
|
|
211
208
|
id,
|
|
@@ -219,6 +216,7 @@ export function decodeBuildResultManifest(
|
|
|
219
216
|
...(outcome === undefined ? {} : { outcome }),
|
|
220
217
|
...(failure === undefined ? {} : { failure }),
|
|
221
218
|
outputs: outputs(item.outputs, `${subject}.outputs`),
|
|
219
|
+
...(item.executionLog === undefined ? {} : { executionLog: item.executionLog }),
|
|
222
220
|
...(item.operations === undefined ? {} : { operations: operationReceipts(item.operations, `${subject}.operations`) }),
|
|
223
221
|
};
|
|
224
222
|
}
|
|
@@ -255,7 +253,7 @@ export function decodeBuildResultWriterState(
|
|
|
255
253
|
if (logicalOutputs.has(output)) throw new Error(`${subject} publishes Logical Output ${output} more than once`);
|
|
256
254
|
names.add(name);
|
|
257
255
|
logicalOutputs.add(output);
|
|
258
|
-
return { name, output };
|
|
256
|
+
return { name, output, ...(published.displayName === undefined ? {} : { displayName: text(published.displayName, `${subject}.displayName`) }) };
|
|
259
257
|
});
|
|
260
258
|
const forwardedOutputs = new Set<string>();
|
|
261
259
|
const forwards = item.forwards.map((value, index) => {
|
|
@@ -270,6 +268,12 @@ export function decodeBuildResultWriterState(
|
|
|
270
268
|
};
|
|
271
269
|
});
|
|
272
270
|
return {
|
|
271
|
+
...(item.resourceReferences === undefined ? {} : { resourceReferences: Object.fromEntries(
|
|
272
|
+
Object.entries(object(item.resourceReferences, `${subject}.resourceReferences`)).map(([resource, reference]) => {
|
|
273
|
+
assertBuildResultFileRef(reference, `${subject}.resourceReferences.${resource}`);
|
|
274
|
+
return [resource, reference];
|
|
275
|
+
}),
|
|
276
|
+
) }),
|
|
273
277
|
resources: pathMap(item.resources, `${subject}.resources`),
|
|
274
278
|
values: pathMap(item.values, `${subject}.values`),
|
|
275
279
|
publishedOutputs,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BuildResultFileRef } from "./types.js";
|
|
2
|
+
|
|
3
|
+
/** Execution evidence is a Result file, not an authored Output or generated asset. */
|
|
4
|
+
export async function preserveExecutionLog(
|
|
5
|
+
chunks: AsyncIterable<Uint8Array> | undefined,
|
|
6
|
+
write: (path: string, chunks: AsyncIterable<Uint8Array>, mediaType: string) => Promise<void>,
|
|
7
|
+
): Promise<BuildResultFileRef | undefined> {
|
|
8
|
+
if (chunks === undefined) return undefined;
|
|
9
|
+
let size = 0;
|
|
10
|
+
const counted = (async function* () {
|
|
11
|
+
for await (const chunk of chunks) { size += chunk.byteLength; yield chunk; }
|
|
12
|
+
})();
|
|
13
|
+
const path = "execution.jsonl";
|
|
14
|
+
const mediaType = "application/x-ndjson";
|
|
15
|
+
await write(path, counted, mediaType);
|
|
16
|
+
return { kind: "build-file", path, size, mediaType };
|
|
17
|
+
}
|