@hypit/hypit 0.1.4 → 0.1.6
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 +4 -2
- 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 +77 -15
- 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 +8 -1
- package/examples/semantic-composition/chat.svml +6 -5
- package/examples/semantic-composition/hypit.runtime.json +1 -1
- 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 +28 -17
- 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 +11 -0
- package/packages/build-result/src/decode.ts +2 -0
- package/packages/build-result/src/execution-log.ts +17 -0
- package/packages/build-result/src/index.ts +1 -0
- package/packages/build-result/src/store.ts +14 -1
- package/packages/build-result/src/types.ts +3 -0
- package/packages/build-result-s3/src/repository.ts +4 -0
- 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 +21 -9
- 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 +26 -17
- package/packages/caption-fine/src/recipe.ts +7 -0
- package/packages/caption-fine/src/render.ts +14 -13
- 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 +3 -1
- package/packages/caption-fine-studio/src/activation.ts +3 -3
- package/packages/caption-fine-studio/src/index.ts +54 -42
- package/packages/cli/README.md +57 -4
- package/packages/cli/package.json +1 -0
- package/packages/cli/src/arguments.ts +25 -6
- package/packages/cli/src/build-planning.ts +3 -2
- package/packages/cli/src/command.ts +6 -0
- package/packages/cli/src/commands/environment.ts +28 -18
- 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 +3 -2
- package/packages/cli/src/main.ts +34 -42
- package/packages/cli/src/observation.ts +7 -1
- package/packages/cli/src/output.ts +65 -23
- package/packages/cli/src/view.ts +66 -19
- 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/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/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 +10 -7
- 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/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 +16 -11
- 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/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 +22 -26
- package/packages/ranking/src/schedule.ts +16 -19
- package/packages/ranking/src/surface.ts +12 -13
- package/packages/ranking-studio/README.md +18 -0
- package/packages/ranking-studio/src/index.ts +61 -9
- 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/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 +24 -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 +109 -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 +2 -1
- package/packages/runtime-local/src/result-writer.ts +2 -0
- package/packages/runtime-local/src/runtime.ts +8 -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 +30 -5
- package/packages/script/src/manifest.ts +4 -3
- package/packages/script/src/narrative.ts +1 -0
- package/packages/script/src/parser.ts +45 -6
- package/packages/script/src/surface.ts +4 -3
- package/packages/script/src/types.ts +1 -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 +7 -1
- 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/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 +15 -2
- package/packages/studio/LOCALIZATION.md +98 -0
- package/packages/studio/README.md +101 -14
- package/packages/studio/locales/en.json +197 -0
- package/packages/studio/locales/zh-CN.json +191 -0
- package/packages/studio/package.json +8 -7
- 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/localization-node.ts +46 -0
- package/packages/studio/src/localization.ts +85 -0
- package/packages/studio/src/parameter-values.ts +43 -1
- package/packages/studio/src/parameters.ts +114 -24
- 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 +10 -6
- package/packages/studio/src/shared.ts +4 -2
- package/packages/studio/src/snapshot.ts +21 -132
- package/packages/studio/src/studio-preflight.ts +3 -3
- package/packages/studio/src/studio-registry.ts +50 -6
- package/packages/studio/src/style.css +223 -50
- package/packages/studio/src/ui/artifact-name.ts +8 -6
- package/packages/studio/src/ui/artifact-preview.ts +5 -4
- package/packages/studio/src/ui/code.ts +17 -16
- package/packages/studio/src/ui/comments.ts +234 -0
- package/packages/studio/src/ui/dropdown.ts +68 -0
- package/packages/studio/src/ui/i18n.ts +109 -0
- package/packages/studio/src/ui/icons.ts +6 -0
- package/packages/studio/src/ui/library.ts +76 -65
- package/packages/studio/src/ui/main.ts +223 -211
- package/packages/studio/src/ui/overlay.ts +12 -8
- package/packages/studio/src/ui/scrub-preview.ts +110 -0
- package/packages/studio/src/ui/stage.ts +93 -29
- package/packages/studio/src/ui/timeline.ts +190 -118
- package/packages/studio/start.ts +41 -22
- package/packages/studio-adapter/README.md +130 -11
- package/packages/studio-adapter/src/index.ts +100 -13
- 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 +2 -2
- package/packages/temporal-markup/README.md +27 -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/video-cli/README.md +4 -1
- package/packages/video-cli/package.json +2 -1
- package/packages/video-cli/src/creation.ts +14 -4
- 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 +1 -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,30 +42,38 @@ 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: "when",
|
|
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
70
|
binding, label: binding === "trim-start" ? "Trim Start" : "Trim End", domain: "when" as const,
|
|
57
71
|
page: { id: "playback", label: "Playback" }, section: { id: "trim", label: "Trim" }, control: "number" as const,
|
|
58
72
|
number: { suffixes: ["ms", "s", "f"], minimum: 0 },
|
|
59
73
|
})),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
control: "number" as const,
|
|
64
|
-
unit: "%", number: { scale: 100, minimum: 0, step: 1 },
|
|
65
|
-
})),
|
|
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 } },
|
|
66
77
|
...(["fade-in", "fade-out"] as const).map((binding) => ({
|
|
67
78
|
binding, label: binding === "fade-in" ? "Fade In" : "Fade Out", domain: "when" as const,
|
|
68
79
|
page: { id: "fade", label: "Fade" }, section: { id: "fade", label: "Fade" }, control: "number" as const,
|
|
@@ -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
|
|
@@ -56,3 +56,14 @@ It is presentation text only: Output names, forwarding and file ownership do not
|
|
|
56
56
|
`updatePresentation` accepts `outputDisplayNames`, keyed by exact public Output name. Each
|
|
57
57
|
nonempty string sets that Output’s `displayName`; null removes it. Like title and note editing,
|
|
58
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.
|
|
@@ -202,6 +202,7 @@ export function decodeBuildResultManifest(
|
|
|
202
202
|
throw new Error(`${subject} must be either unfinished or have both outcome and finishedAt`);
|
|
203
203
|
}
|
|
204
204
|
const failure = optionalString(item.failure, `${subject}.failure`);
|
|
205
|
+
if (item.executionLog !== undefined) assertBuildResultFileRef(item.executionLog, `${subject}.executionLog`);
|
|
205
206
|
return {
|
|
206
207
|
format: "hypit.build-result@1",
|
|
207
208
|
id,
|
|
@@ -215,6 +216,7 @@ export function decodeBuildResultManifest(
|
|
|
215
216
|
...(outcome === undefined ? {} : { outcome }),
|
|
216
217
|
...(failure === undefined ? {} : { failure }),
|
|
217
218
|
outputs: outputs(item.outputs, `${subject}.outputs`),
|
|
219
|
+
...(item.executionLog === undefined ? {} : { executionLog: item.executionLog }),
|
|
218
220
|
...(item.operations === undefined ? {} : { operations: operationReceipts(item.operations, `${subject}.operations`) }),
|
|
219
221
|
};
|
|
220
222
|
}
|
|
@@ -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
|
+
}
|
|
@@ -26,3 +26,4 @@ export type * from "./writer.js";
|
|
|
26
26
|
|
|
27
27
|
export { currentFileReference, fileReferenceIdentity, ownedFileReference, localExternalFiles } from "./file-reference.js";
|
|
28
28
|
export type { ExternalFileAccess } from "./file-reference.js";
|
|
29
|
+
export { preserveExecutionLog } from "./execution-log.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { preserveExecutionLog } from "./execution-log.js";
|
|
1
2
|
import { currentFileReference, localExternalFiles } from "./file-reference.js";
|
|
2
3
|
import type { ExternalFileAccess } from "./file-reference.js";
|
|
3
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -134,12 +135,21 @@ async function copyArtifactAtomic(
|
|
|
134
135
|
await mkdir(dirname(destination), { recursive: true });
|
|
135
136
|
const input = await source.open(artifact);
|
|
136
137
|
if (input === undefined) throw new Error(`Build resource ${artifact.resource} is unavailable`);
|
|
138
|
+
await writeStreamAtomic(destination, input);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
async function writeStreamAtomic(destination: string, input: AsyncIterable<Uint8Array>): Promise<void> {
|
|
142
|
+
await mkdir(dirname(destination), { recursive: true });
|
|
137
143
|
const temporary = `${destination}.part-${randomUUID()}`;
|
|
138
144
|
const output = await open(temporary, "wx");
|
|
139
145
|
try {
|
|
140
146
|
for await (const value of input) {
|
|
141
147
|
const chunk = Uint8Array.from(value);
|
|
142
|
-
|
|
148
|
+
let offset = 0;
|
|
149
|
+
while (offset < chunk.byteLength) {
|
|
150
|
+
const { bytesWritten } = await output.write(chunk, offset, chunk.byteLength - offset);
|
|
151
|
+
offset += bytesWritten;
|
|
152
|
+
}
|
|
143
153
|
}
|
|
144
154
|
await output.close();
|
|
145
155
|
await replaceFile(temporary, destination);
|
|
@@ -442,10 +452,13 @@ export class FileBuildResult {
|
|
|
442
452
|
await rm(join(this.directory, writerStateName), { force: true });
|
|
443
453
|
return manifest;
|
|
444
454
|
}
|
|
455
|
+
const executionLog = await preserveExecutionLog(input.executionLog,
|
|
456
|
+
async (path, chunks) => await writeStreamAtomic(join(this.directory, path), chunks));
|
|
445
457
|
const now = Date.now();
|
|
446
458
|
const updated: BuildResultManifest = {
|
|
447
459
|
...manifest,
|
|
448
460
|
outcome: input.outcome,
|
|
461
|
+
...(executionLog === undefined ? {} : { executionLog }),
|
|
449
462
|
...(input.operations === undefined ? {} : { operations: input.operations }),
|
|
450
463
|
finishedAt: manifest.finishedAt ?? now,
|
|
451
464
|
...(input.failure === undefined ? {} : { failure: input.failure }),
|
|
@@ -206,6 +206,7 @@ export type BuildResultManifest = {
|
|
|
206
206
|
readonly failure?: string;
|
|
207
207
|
readonly outputs: Readonly<Record<string, BuildResultOutput>>;
|
|
208
208
|
readonly operations?: readonly BuildResultOperation[];
|
|
209
|
+
readonly executionLog?: BuildResultFileRef;
|
|
209
210
|
};
|
|
210
211
|
|
|
211
212
|
export type FinishedBuildResultManifest = BuildResultManifest & {
|
|
@@ -294,6 +295,8 @@ export type BuildResultSync = {
|
|
|
294
295
|
};
|
|
295
296
|
|
|
296
297
|
export type BuildResultFinish = {
|
|
298
|
+
/** Closed execution evidence; Repository stores it before publishing the terminal manifest. */
|
|
299
|
+
readonly executionLog?: AsyncIterable<Uint8Array>;
|
|
297
300
|
readonly operations?: readonly BuildResultOperation[];
|
|
298
301
|
readonly outcome: BuildResultOutcome;
|
|
299
302
|
readonly failure?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { preserveExecutionLog } from "@hypit/build-result";
|
|
1
2
|
import type {
|
|
2
3
|
BuildResultFileRef,
|
|
3
4
|
ExternalFileAccess,
|
|
@@ -120,10 +121,13 @@ class S3BuildResultWriter implements BuildResultWriter {
|
|
|
120
121
|
await this.#repository.deleteWriter(this.#build);
|
|
121
122
|
return manifest;
|
|
122
123
|
}
|
|
124
|
+
const executionLog = await preserveExecutionLog(input.executionLog,
|
|
125
|
+
async (path, chunks, mediaType) => await this.#repository.writeFile(this.#build, path, chunks, mediaType));
|
|
123
126
|
const now = Date.now();
|
|
124
127
|
const updated: BuildResultManifest = {
|
|
125
128
|
...manifest,
|
|
126
129
|
outcome: input.outcome,
|
|
130
|
+
...(executionLog === undefined ? {} : { executionLog }),
|
|
127
131
|
...(input.operations === undefined ? {} : { operations: input.operations }),
|
|
128
132
|
finishedAt: manifest.finishedAt ?? now,
|
|
129
133
|
...(input.failure === undefined ? {} : { failure: input.failure }),
|