@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
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { artifactTypes } from "@hypit/artifact";
|
|
2
|
+
import { sealGenerationPortRequest, sealGenerationRequestDraft, sealGenerationPortTable } from "@hypit/generation";
|
|
3
|
+
import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";
|
|
4
|
+
import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/markup";
|
|
5
|
+
import { defineExactModelModule } from "@hypit/model-kit";
|
|
6
|
+
import { textTypes } from "@hypit/text";
|
|
7
|
+
|
|
8
|
+
export const elevenLabsSpeechModuleRef = { name: "@hypit/elevenlabs-speech", version: "1" } as const;
|
|
9
|
+
export const elevenLabsSpeechModels = ["eleven_ttv_v3"] as const;
|
|
10
|
+
export type ElevenLabsSpeechModel = typeof elevenLabsSpeechModels[number];
|
|
11
|
+
|
|
12
|
+
// ElevenLabs documents a 100 to 1000 character preview text. The port vocabulary
|
|
13
|
+
// carries the ceiling; the floor is stated to authors and enforced by the service.
|
|
14
|
+
const spokenText = { kind: "text", maxChars: 1000 } as const;
|
|
15
|
+
// Voice descriptions have their own documented 20 to 1000 character bounds.
|
|
16
|
+
const instruction = { kind: "text", maxChars: 1000 } as const;
|
|
17
|
+
|
|
18
|
+
function table(model: ElevenLabsSpeechModel): GenerationPortTable {
|
|
19
|
+
return sealGenerationPortTable({
|
|
20
|
+
model,
|
|
21
|
+
result: "audio",
|
|
22
|
+
ports: [
|
|
23
|
+
{ name: "text", value: spokenText, minItems: 1, maxItems: 1 },
|
|
24
|
+
{ name: "voiceDescription", value: instruction, minItems: 1, maxItems: 1 },
|
|
25
|
+
],
|
|
26
|
+
requires: [],
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const elevenLabsSpeechPorts: Readonly<Record<ElevenLabsSpeechModel, GenerationPortTable>> = {
|
|
31
|
+
"eleven_ttv_v3": table("eleven_ttv_v3"),
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export function sealElevenLabsSpeechRequest(
|
|
35
|
+
model: ElevenLabsSpeechModel,
|
|
36
|
+
ports: Readonly<Record<string, readonly GenerationPortValue[]>>,
|
|
37
|
+
): GenerationRequest {
|
|
38
|
+
return sealGenerationPortRequest(elevenLabsSpeechPorts[model], ports);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function sealElevenLabsSpeechRequestDraft(
|
|
42
|
+
model: ElevenLabsSpeechModel,
|
|
43
|
+
ports: Readonly<Record<string, readonly GenerationPortValue[]>>,
|
|
44
|
+
) {
|
|
45
|
+
return sealGenerationRequestDraft(elevenLabsSpeechPorts[model], ports);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const base = defineExactModelModule({
|
|
49
|
+
module: elevenLabsSpeechModuleRef,
|
|
50
|
+
endpoints: ([
|
|
51
|
+
["voiceDesign", "eleven_ttv_v3", "ElevenLabsVoiceDesignRequest"],
|
|
52
|
+
] as const).map(([key, model, requestTypeName]) => ({
|
|
53
|
+
key,
|
|
54
|
+
requestTypeName,
|
|
55
|
+
producerName: `request-${model}`,
|
|
56
|
+
ports: elevenLabsSpeechPorts[model],
|
|
57
|
+
})),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export const elevenLabsSpeechEndpoints = base.endpoints;
|
|
61
|
+
|
|
62
|
+
const spokenAttributes: readonly SurfaceAttributeVocabulary[] = [
|
|
63
|
+
{
|
|
64
|
+
name: "id",
|
|
65
|
+
kind: "identifier",
|
|
66
|
+
required: true,
|
|
67
|
+
summary: "Names this speech request and prefixes the binding it publishes.",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "speech",
|
|
71
|
+
kind: "reference",
|
|
72
|
+
required: true,
|
|
73
|
+
summary: "The Text edge whose exact words are spoken.",
|
|
74
|
+
accepts: [textTypes.text],
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
const referencePort: readonly SurfacePortVocabulary[] = [{
|
|
79
|
+
name: "reference",
|
|
80
|
+
type: artifactTypes.blob,
|
|
81
|
+
summary: "The designed voice reference, addressed as `<id>.reference`.",
|
|
82
|
+
}];
|
|
83
|
+
|
|
84
|
+
export const elevenLabsSpeechMarkupSurfaces = [
|
|
85
|
+
{
|
|
86
|
+
name: "voiceDesign", tag: "VoiceDesign", mode: "structured",
|
|
87
|
+
outputs: [elevenLabsSpeechEndpoints.voiceDesign.draftType],
|
|
88
|
+
vocabulary: {
|
|
89
|
+
summary: "Creates a reusable voice reference from a natural-language voice description.",
|
|
90
|
+
attributes: spokenAttributes,
|
|
91
|
+
ports: referencePort,
|
|
92
|
+
text: "The element's own text is the voice description and is required.",
|
|
93
|
+
example: `<eleven:VoiceDesign id="host" speech={story.segment.voiceSample.speech}>
|
|
94
|
+
A clear young woman with a grounded, confident conversational delivery.
|
|
95
|
+
</eleven:VoiceDesign>`,
|
|
96
|
+
notes: [
|
|
97
|
+
"The element accepts no child elements; only its text is read.",
|
|
98
|
+
"The spoken sample must be between 100 and 1000 characters.",
|
|
99
|
+
"The voice description must be between 20 and 1000 characters.",
|
|
100
|
+
"The result is an ordinary audio Resource that can be supplied anywhere an audio reference is accepted.",
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
] as const;
|
|
105
|
+
|
|
106
|
+
export const elevenLabsSpeechManifest = { ...base.manifest } as const;
|
|
107
|
+
export const elevenLabsSpeechComponent = base.component;
|
|
108
|
+
export const elevenLabsSpeechDefinition = { ...base, manifest: elevenLabsSpeechManifest };
|
|
109
|
+
|
|
110
|
+
export { createElevenLabsSpeechAudioFragment } from "./fragment.js";
|
|
111
|
+
export { decodeElevenLabsVoiceDesignSurface } from "./surface.js";
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { artifactTypes } from "@hypit/artifact";
|
|
2
|
+
import { generationPort, sealGenerationMediaBinding } from "@hypit/generation";
|
|
3
|
+
import type { GenerationMediaPort } from "@hypit/generation";
|
|
4
|
+
import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/model-kit";
|
|
5
|
+
import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";
|
|
6
|
+
import type { CanonicalValue } from "@hypit/protocol";
|
|
7
|
+
import { textTypes, verifyText } from "@hypit/text";
|
|
8
|
+
import type {
|
|
9
|
+
MarkupAttributeValue,
|
|
10
|
+
StructuredElement,
|
|
11
|
+
StructuredSurfaceHandler,
|
|
12
|
+
SurfaceResolvedReference,
|
|
13
|
+
} from "@hypit/markup";
|
|
14
|
+
|
|
15
|
+
import { createElevenLabsSpeechAudioFragment } from "./fragment.js";
|
|
16
|
+
import { elevenLabsSpeechEndpoints, sealElevenLabsSpeechRequestDraft } from "./index.js";
|
|
17
|
+
|
|
18
|
+
function sameType(left: SurfaceResolvedReference["type"], right: SurfaceResolvedReference["type"]): boolean {
|
|
19
|
+
return left.module.name === right.module.name && left.module.version === right.module.version && left.name === right.name;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function attributes(element: StructuredElement, required: readonly string[]): void {
|
|
23
|
+
const allowed = new Set(required);
|
|
24
|
+
const unknown = Object.keys(element.attributes).filter((name) => !allowed.has(name));
|
|
25
|
+
if (unknown.length > 0 || required.some((name) => element.attributes[name] === undefined)) {
|
|
26
|
+
throw new Error(`${element.name} requires ${required.join(", ")}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function stringAttribute(element: StructuredElement, name: string): string {
|
|
31
|
+
const value = element.attributes[name];
|
|
32
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
33
|
+
throw new Error(`${element.name}.${name} must be a non-empty string`);
|
|
34
|
+
}
|
|
35
|
+
return value.trim();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function referencePath(element: StructuredElement, name: string): string {
|
|
39
|
+
const value: MarkupAttributeValue | undefined = element.attributes[name];
|
|
40
|
+
if (typeof value !== "object" || value.kind !== "reference" || value.path.length === 0) {
|
|
41
|
+
throw new Error(`${element.name}.${name} must be a whole-value reference`);
|
|
42
|
+
}
|
|
43
|
+
return value.path;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function resolved(
|
|
47
|
+
element: StructuredElement,
|
|
48
|
+
name: string,
|
|
49
|
+
resolveReference: (path: string) => SurfaceResolvedReference | undefined,
|
|
50
|
+
): SurfaceResolvedReference {
|
|
51
|
+
const path = referencePath(element, name);
|
|
52
|
+
const value = resolveReference(path);
|
|
53
|
+
if (value === undefined) throw new Error(`${element.name}.${name} cannot resolve ${path}`);
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function speechText(reference: SurfaceResolvedReference, subject: string): SurfaceResolvedReference {
|
|
58
|
+
if (!sameType(reference.type, textTypes.text)) throw new Error(`${subject} must reference Text`);
|
|
59
|
+
const value = reference.record?.value;
|
|
60
|
+
if (value !== undefined) {
|
|
61
|
+
if (value.kind !== "inline") throw new Error(`${subject} has an invalid authored Text value`);
|
|
62
|
+
verifyText(value.value);
|
|
63
|
+
}
|
|
64
|
+
return reference;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
function body(element: StructuredElement, required: boolean): string | undefined {
|
|
69
|
+
if (element.children.some((child) => child.kind === "element")) {
|
|
70
|
+
throw new Error(`${element.name} accepts instruction text only`);
|
|
71
|
+
}
|
|
72
|
+
const lines = element.children.map((child) => child.kind === "text" ? child.value : "").join("")
|
|
73
|
+
.replaceAll("\r\n", "\n").split("\n");
|
|
74
|
+
while (lines[0]?.trim() === "") lines.shift();
|
|
75
|
+
while (lines.at(-1)?.trim() === "") lines.pop();
|
|
76
|
+
const indents = lines.filter((line) => line.trim()).map((line) => /^\s*/u.exec(line)?.[0].length ?? 0);
|
|
77
|
+
const indent = indents.length === 0 ? 0 : Math.min(...indents);
|
|
78
|
+
const value = lines.map((line) => line.slice(indent).trimEnd()).join("\n").trim();
|
|
79
|
+
if (value.length === 0) {
|
|
80
|
+
if (required) throw new Error(`${element.name} requires a voice description in its body`);
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function output(
|
|
87
|
+
element: StructuredElement,
|
|
88
|
+
endpoint: ExactModelEndpoint,
|
|
89
|
+
draft: ReturnType<typeof sealElevenLabsSpeechRequestDraft>,
|
|
90
|
+
outputName: "reference" | "audio",
|
|
91
|
+
text: readonly { readonly input: ExactModelTextInput; readonly source: SurfaceResolvedReference }[],
|
|
92
|
+
media: readonly { readonly input: ExactModelMediaInput; readonly source: SurfaceResolvedReference }[] = [],
|
|
93
|
+
) {
|
|
94
|
+
const id = stringAttribute(element, "id");
|
|
95
|
+
const draftId = `${id}.draft`;
|
|
96
|
+
const records: Array<{
|
|
97
|
+
readonly id: string;
|
|
98
|
+
readonly type: SurfaceResolvedReference["type"];
|
|
99
|
+
readonly value: { readonly kind: "inline"; readonly value: CanonicalValue };
|
|
100
|
+
readonly range: StructuredElement["range"];
|
|
101
|
+
}> = [{
|
|
102
|
+
id: draftId,
|
|
103
|
+
type: endpoint.draftType,
|
|
104
|
+
value: { kind: "inline", value: draft as unknown as CanonicalValue },
|
|
105
|
+
range: element.range,
|
|
106
|
+
}];
|
|
107
|
+
const inputs: Record<string, SurfaceResolvedReference["ref"] | { readonly kind: "record"; readonly id: string }> = {
|
|
108
|
+
draft: { kind: "record", id: draftId },
|
|
109
|
+
};
|
|
110
|
+
for (const item of text) inputs[exactModelTextInputName(item.input.name)] = item.source.ref;
|
|
111
|
+
for (const item of media) {
|
|
112
|
+
const binding = endpoint.mediaBindings[item.input.port];
|
|
113
|
+
if (binding === undefined) throw new Error(`${endpoint.ports.model} has no media port ${item.input.port}`);
|
|
114
|
+
const port = generationPort(endpoint.ports, item.input.port);
|
|
115
|
+
if (port.value.kind !== "media") throw new Error(`${endpoint.ports.model} port ${item.input.port} is not media`);
|
|
116
|
+
const names = exactModelMediaInputNames(item.input.name);
|
|
117
|
+
const bindingId = `${id}.${item.input.name}.binding`;
|
|
118
|
+
records.push({
|
|
119
|
+
id: bindingId,
|
|
120
|
+
type: binding.type,
|
|
121
|
+
value: {
|
|
122
|
+
kind: "inline",
|
|
123
|
+
value: sealGenerationMediaBinding(port as GenerationMediaPort, { role: "audio" }) as unknown as CanonicalValue,
|
|
124
|
+
},
|
|
125
|
+
range: element.range,
|
|
126
|
+
});
|
|
127
|
+
inputs[names.binding] = { kind: "record", id: bindingId };
|
|
128
|
+
inputs[names.artifact] = item.source.ref;
|
|
129
|
+
}
|
|
130
|
+
const fragment = createElevenLabsSpeechAudioFragment(
|
|
131
|
+
endpoint,
|
|
132
|
+
media.map((item) => item.input),
|
|
133
|
+
text.map((item) => item.input),
|
|
134
|
+
);
|
|
135
|
+
return {
|
|
136
|
+
records,
|
|
137
|
+
components: [{
|
|
138
|
+
id,
|
|
139
|
+
fragment: fragment.id,
|
|
140
|
+
inputs,
|
|
141
|
+
outputs: { audio: `${id}.${outputName}` },
|
|
142
|
+
range: element.range,
|
|
143
|
+
}],
|
|
144
|
+
fragments: [fragment],
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function speechInput(
|
|
149
|
+
element: StructuredElement,
|
|
150
|
+
resolveReference: (path: string) => SurfaceResolvedReference | undefined,
|
|
151
|
+
) {
|
|
152
|
+
return {
|
|
153
|
+
input: { name: "speech", port: "text" },
|
|
154
|
+
source: speechText(resolved(element, "speech", resolveReference), `${element.name}.speech`),
|
|
155
|
+
} as const;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export const decodeElevenLabsVoiceDesignSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
159
|
+
attributes(element, ["id", "speech"]);
|
|
160
|
+
return output(
|
|
161
|
+
element,
|
|
162
|
+
elevenLabsSpeechEndpoints.voiceDesign,
|
|
163
|
+
sealElevenLabsSpeechRequestDraft("eleven_ttv_v3", { voiceDescription: [body(element, true)!] }),
|
|
164
|
+
"reference",
|
|
165
|
+
[speechInput(element, resolveReference)],
|
|
166
|
+
);
|
|
167
|
+
};
|
|
@@ -13,6 +13,12 @@ import type { AsyncEndpoint, CredentialRef, EndpointRequest } from "@hypit/hypit
|
|
|
13
13
|
import { generationTypes, compileWireRequest, sealGeneratedImageSet } from "@hypit/hypit/generation";
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
The shipped [project Provider example](../../examples/provider-package/README.md) follows an image
|
|
17
|
+
request through configuration, support, upload, submission, receipt, polling, collection and pricing.
|
|
18
|
+
It uses an explicitly illustrative service protocol and imports only public SDK subpaths.
|
|
19
|
+
This SDK also exports `canonicalize`, `BlobRef`, `ResourceId`, `credentialRef` and
|
|
20
|
+
`isStreamingResourceStore` for Providers that construct stored results or use streaming resource IO.
|
|
21
|
+
|
|
16
22
|
For an existing model, name its exact versioned Capability and expected result Type. Map its request
|
|
17
23
|
ports into the service's wire format; the Provider need not import the model's implementation.
|
|
18
24
|
`@hypit/hypit/generation` supplies the common generated-media values and optional wire-mapping helpers.
|
|
@@ -29,6 +35,13 @@ without changing Core demand. Each resource declares a `limit` and optional `uni
|
|
|
29
35
|
A capability may add `resources` and a pure `unitsForRequest(request)` resolver for quantities of
|
|
30
36
|
already declared resources. Runtime admits all claims atomically for one `fulfill-need` Command.
|
|
31
37
|
|
|
38
|
+
A long immediate call can report its current activity with
|
|
39
|
+
`await context.reportProgress?.({ phase: "processing", completed: 12, total: 40, unit: "items" })`.
|
|
40
|
+
The Provider chooses meaningful phases and quantities and reports non-secret, human-readable facts.
|
|
41
|
+
The Runtime attaches them to the currently executing Command; they do not change its outcome,
|
|
42
|
+
scheduling or Core facts. Completion clears the live activity. Direct callers may omit the callback.
|
|
43
|
+
For asynchronous work, return `progress` in the existing pending outcome instead.
|
|
44
|
+
|
|
32
45
|
Asynchronous execution moves forward through `start`, `poll`, and optional `collect`. `start` returns
|
|
33
46
|
a task handle; `pending` means an acknowledged task is still running. `ready` records remote completion
|
|
34
47
|
and hands its artifacts to `collect`, allowing download capacity to differ from task capacity.
|
|
@@ -109,3 +122,14 @@ represented by a semantic `pendingInputs` slot instead. A Provider may use the s
|
|
|
109
122
|
media role to enforce support limits, but it never receives graph traversal rules or future bytes.
|
|
110
123
|
It returns either `supported`, or `unsupported` with the Provider's reason. Selection infrastructure
|
|
111
124
|
preserves that reason without interpreting request fields or maintaining a central limitation table.
|
|
125
|
+
|
|
126
|
+
An Endpoint can additionally emit explicit, non-secret diagnostics:
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
await context.reportDiagnostic?.({ level: "info", message: "Encoder initialized" });
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The Runtime binds each message to this call's Build, Command and Endpoint and owns persistence.
|
|
133
|
+
The Provider does not select a log path or Result repository. Messages describe operational evidence;
|
|
134
|
+
credentials, request bodies and opaque vendor payloads remain private. `reportProgress` continues to
|
|
135
|
+
report current activity; repeated counters are not an append-only log. Phase names belong to the Provider.
|
|
@@ -20,7 +20,9 @@ import type {
|
|
|
20
20
|
} from "@hypit/runtime";
|
|
21
21
|
import { capacityUnits, verifyCredentialRef } from "@hypit/runtime";
|
|
22
22
|
|
|
23
|
-
export
|
|
23
|
+
export { canonicalize } from "@hypit/protocol";
|
|
24
|
+
export type { BlobRef, CanonicalValue, CapabilityRef, ModuleRef, ResourceId, StoredValue, TypeRef } from "@hypit/protocol";
|
|
25
|
+
export { credentialRef, isStreamingResourceStore } from "@hypit/runtime";
|
|
24
26
|
export type {
|
|
25
27
|
CapacityResourceClaim,
|
|
26
28
|
CredentialAcquisition,
|
|
@@ -97,6 +99,10 @@ export type EndpointInvocationContext = {
|
|
|
97
99
|
readonly resources: ResourceStore;
|
|
98
100
|
/** Only slots explicitly declared by this configured Endpoint instance are present. */
|
|
99
101
|
readonly credentials: Readonly<Record<string, EndpointCredential>>;
|
|
102
|
+
/** Explicit non-secret diagnostic output. The Provider owns its content, never its storage. */
|
|
103
|
+
readonly reportDiagnostic?: (diagnostic: import("@hypit/runtime").ExecutionDiagnostic) => Promise<void>;
|
|
104
|
+
/** Report non-secret activity of a long local call without creating a remote Operation. */
|
|
105
|
+
readonly reportProgress?: (progress: OperationProgress) => Promise<void>;
|
|
100
106
|
};
|
|
101
107
|
|
|
102
108
|
export type ImmediateEndpointHandler = (
|
|
@@ -14,9 +14,46 @@ hypit measure main.svml --segment opening --language en --pace normal
|
|
|
14
14
|
hypit measure --text "Video editing begins with meaning." --language en --pace normal --rounding ceil
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
## Units and delivery
|
|
18
|
+
|
|
19
|
+
English counts pronunciation syllables, not words or letters. Mandarin Chinese counts each Han
|
|
20
|
+
character as one approximate syllable, with English syllables for embedded English words.
|
|
21
|
+
Traditional and simplified Han use the same counting rule; punctuation separates words without
|
|
22
|
+
adding units. This remains an approximation: connected English speech can reduce syllables,
|
|
23
|
+
and Mandarin erhua can combine written characters into one syllable. An explicit `--language zh`
|
|
24
|
+
keeps a Chinese passage with many English names under its intended delivery policy.
|
|
25
|
+
|
|
26
|
+
Measure the spoken wording. `--segment` reads the Script's pronunciation side of Dual Text;
|
|
27
|
+
`--text` reads literal speech, so spell numbers and letter names as they will be said. A count
|
|
28
|
+
cannot resolve an unspecified pronunciation.
|
|
29
|
+
|
|
30
|
+
| Language | slow | normal | fast | Unit |
|
|
31
|
+
| --- | ---: | ---: | ---: | --- |
|
|
32
|
+
| English (`en`) | 4.2 | 4.6 | 5.6 | syllables/s |
|
|
33
|
+
| Mandarin Chinese (`zh`) | 4.2 | 5.25 | 6.5625 | approximate syllables/s |
|
|
34
|
+
|
|
35
|
+
These are authoring starting points for whole-passage delivery, including ordinary speech pauses.
|
|
36
|
+
`normal` suits conversational explanation; `fast` gives brisk, tightly delivered copy less time.
|
|
37
|
+
The English fast preset is deliberately separated from normal so that choosing brisk delivery
|
|
38
|
+
meaningfully changes the estimate. The Chinese normal preset is retained: available research
|
|
39
|
+
does not establish that it is systematically too slow for whole passages. Neither table is a
|
|
40
|
+
calibration of a particular video or voice model. For a specific delivery, a positive numeric
|
|
41
|
+
`--rate` replaces the preset, including rates outside this table.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
hypit measure main.svml --segment opening --language zh --pace fast --rounding round
|
|
45
|
+
hypit measure main.svml --segment opening --language zh --rate 6 --rounding none
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`seconds = pronunciation units / rate + padding`, followed by rounding. Add `--padding` for extra
|
|
49
|
+
time deliberately reserved for a reaction, demonstration or held pause. Ordinary phrasing is
|
|
50
|
+
already part of the chosen density; adding a generic pause allowance on top lengthens the passage
|
|
51
|
+
again. `round` selects the nearest whole second, `ceil` rounds upward, and `none` keeps the fraction.
|
|
52
|
+
The CLI shows the resolved rate and padding; JSON retains full numeric precision.
|
|
53
|
+
|
|
54
|
+
For 60 Mandarin units, normal gives 11.43 seconds and fast gives 9.14 seconds before rounding.
|
|
55
|
+
For 60 English syllables, normal gives 13.04 seconds and fast gives 10.71 seconds. Equal unit counts
|
|
56
|
+
do not imply equal information, and 60 English words need not contain 60 syllables.
|
|
20
57
|
|
|
21
58
|
The estimate reports the time the wording needs at that delivery. Use it to decide whether a passage
|
|
22
59
|
needs merging, fuller wording, tightening, or splitting, then choose the request duration with the
|
|
@@ -30,3 +67,19 @@ performed media's semantic preparation.
|
|
|
30
67
|
```ts
|
|
31
68
|
import { estimateSpeechDuration, sealSpeechEstimatePolicy, speechEstimatePolicyFromRecipe } from "@hypit/estimate";
|
|
32
69
|
```
|
|
70
|
+
|
|
71
|
+
## Research basis and limits
|
|
72
|
+
|
|
73
|
+
[Burchfield and Bradlow (2014)](https://doi.org/10.1121/1.4874357) measured Mandarin and English
|
|
74
|
+
across clear reading, plain reading and spontaneous speech. Plain-reading means were 5.97 and
|
|
75
|
+
5.39 canonical syllables/s respectively. Their articulation measure excludes errors, silence
|
|
76
|
+
and non-speech, so those means cannot directly size an entire performance containing pauses.
|
|
77
|
+
[Coupé et al. (2019)](https://doi.org/10.1126/sciadv.aaw2594) likewise counted canonical syllables
|
|
78
|
+
and excluded pauses longer than 150 ms in their cross-language reading study. These studies
|
|
79
|
+
support distinguishing language, pronunciation units and timing denominator; they do not
|
|
80
|
+
establish one ideal pace for social video or validate these preset values.
|
|
81
|
+
|
|
82
|
+
When an already understood reference passage provides useful timing, its spoken-unit count
|
|
83
|
+
divided by its first-to-last-word span offers a starting density, including internal pauses.
|
|
84
|
+
Choose how much of that rhythm belongs in the new performance. Requested clip length alone
|
|
85
|
+
is not measured speaking time, and delivery density does not describe emphasis or expression.
|
|
@@ -14,9 +14,9 @@ const PACE_RATE: Readonly<Record<
|
|
|
14
14
|
ResolvedSpeechEstimateLanguage,
|
|
15
15
|
Readonly<Record<SpeechEstimatePace, number>>
|
|
16
16
|
>> = {
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
// Authoring delivery densities, including ordinary pauses, not measured model
|
|
18
|
+
// guarantees or pause-free articulation rates. See README for units and rationale.
|
|
19
|
+
en: { slow: 4.2, normal: 4.6, fast: 5.6 },
|
|
20
20
|
zh: { slow: 4.2, normal: 5.25, fast: 6.5625 },
|
|
21
21
|
ja: { slow: 6, normal: 7.5, fast: 9.375 },
|
|
22
22
|
es: { slow: 4.72, normal: 5.9, fast: 7.375 },
|
|
@@ -35,7 +35,7 @@ function looksSpanish(text: string): boolean {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export function detectSpeechEstimateLanguage(text: string): ResolvedSpeechEstimateLanguage {
|
|
38
|
-
const han = (text.match(/
|
|
38
|
+
const han = (text.match(/\p{Script=Han}/gu) ?? []).length;
|
|
39
39
|
const kana = (text.match(/[\u3040-\u30ff]/gu) ?? []).length;
|
|
40
40
|
const ascii = (text.match(/[A-Za-z]/gu) ?? []).length;
|
|
41
41
|
if (kana > Math.max(han, ascii / 4)) return "ja";
|
|
@@ -117,10 +117,9 @@ export function countSpeechEstimateUnits(
|
|
|
117
117
|
language: ResolvedSpeechEstimateLanguage,
|
|
118
118
|
): number {
|
|
119
119
|
if (language === "zh" || language === "ja") {
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
.split(/\s+/u)
|
|
120
|
+
const characters = /[\p{Script=Han}\u3040-\u30ff]/gu;
|
|
121
|
+
const cjk = (text.match(characters) ?? []).length;
|
|
122
|
+
const latin = words(text.replace(characters, " "))
|
|
124
123
|
.filter((word) => /[A-Za-z]/u.test(word));
|
|
125
124
|
return cjk + latin.reduce((sum, word) => sum + englishSyllables(word), 0);
|
|
126
125
|
}
|
package/packages/film/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# `@hypit/film`
|
|
2
2
|
|
|
3
|
-
The Surface
|
|
4
|
-
|
|
5
|
-
or prepared performance media. Both time sources use the same frame and audio pipeline.
|
|
3
|
+
The Surface, Fragment and assembly Producers receive the same Timeline through a `timeline` input.
|
|
4
|
+
Partial, overlapping or absent semantic coverage all use that complete range.
|
|
6
5
|
|
|
7
6
|
Official package-owned assembly layer between peer Tracks and the generic Composition waist.
|
|
8
7
|
Film is an ordinary author component and an optional Target, not a Core root or a privileged video
|
|
@@ -21,9 +20,9 @@ belongs to each Present's absolute stacking key.
|
|
|
21
20
|
|
|
22
21
|
The official Structured Surface validates an imported generic SVS Recipe into a nominal
|
|
23
22
|
`FilmProgram`, receives CanvasSpace and the selected time source through separate explicit edges,
|
|
24
|
-
|
|
23
|
+
passes the Timeline directly, type-checks
|
|
25
24
|
each `<film:Track source={...}/>` reference and generates the finite fold. CanvasSpace is the only
|
|
26
|
-
dimension truth,
|
|
25
|
+
dimension truth, Timeline is the only time-range truth, and FilmProgram owns only assembly
|
|
27
26
|
identity and clear color.
|
|
28
27
|
Child order is organizational: Track and Present identity, timing and absolute stacking remain in
|
|
29
28
|
their own typed values. Final rendering is a separate author package and capability.
|
|
@@ -31,10 +30,16 @@ their own typed values. Final rendering is a separate author package and capabil
|
|
|
31
30
|
For example, after the named inputs are declared:
|
|
32
31
|
|
|
33
32
|
```svml
|
|
34
|
-
<
|
|
33
|
+
<import as="sound" from="@hypit/sound@1"/>
|
|
34
|
+
<sound:Style id="voice-style"/>
|
|
35
|
+
<sound:Track id="voice" timeline={speech.timeline}>
|
|
36
|
+
<sound:Use style={voice-style}/>
|
|
37
|
+
</sound:Track>
|
|
38
|
+
|
|
39
|
+
<film:Film id="main" canvas={vertical} timeline={speech.timeline}
|
|
35
40
|
appearance={recipes.film.vertical}>
|
|
36
41
|
<film:Track source={performance.visual}/>
|
|
37
|
-
<film:Track source={
|
|
42
|
+
<film:Track source={voice.audio}/>
|
|
38
43
|
<film:Track source={coverage.visual}/>
|
|
39
44
|
<film:Track source={captions.track}/>
|
|
40
45
|
<film:Track source={music.track}/>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@hypit/elaborator": "workspace:*",
|
|
17
17
|
"@hypit/program-space": "workspace:*",
|
|
18
18
|
"@hypit/protocol": "workspace:*",
|
|
19
|
-
"@hypit/
|
|
19
|
+
"@hypit/timeline": "workspace:*",
|
|
20
20
|
"@hypit/spatial": "workspace:*",
|
|
21
21
|
"@hypit/svs": "workspace:*",
|
|
22
22
|
"@hypit/markup": "workspace:*",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
2
|
import type { ComponentPackage } from "@hypit/component-kit";
|
|
2
|
-
import type { ProgramSpace } from "@hypit/program-space";
|
|
3
3
|
import type { CanvasSpace } from "@hypit/spatial";
|
|
4
4
|
import type { AudioTrack, VisualTrack } from "@hypit/composition";
|
|
5
5
|
import type { StoredValue } from "@hypit/protocol";
|
|
@@ -28,7 +28,7 @@ export const filmComponent = {
|
|
|
28
28
|
handler: ({ inputs }) => ({
|
|
29
29
|
outputs: { set: { kind: "inline", value: canonicalize(appendFilmVisualTrack(
|
|
30
30
|
inline<FilmTrackSet>(inputs.set?.value, "FilmTrackSet"),
|
|
31
|
-
inline<
|
|
31
|
+
inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
32
32
|
inline<VisualTrack>(inputs.track?.value, "VisualTrack"),
|
|
33
33
|
)) } },
|
|
34
34
|
needs: {},
|
|
@@ -39,7 +39,7 @@ export const filmComponent = {
|
|
|
39
39
|
handler: ({ inputs }) => ({
|
|
40
40
|
outputs: { set: { kind: "inline", value: canonicalize(appendFilmAudioTrack(
|
|
41
41
|
inline<FilmTrackSet>(inputs.set?.value, "FilmTrackSet"),
|
|
42
|
-
inline<
|
|
42
|
+
inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
43
43
|
inline<AudioTrack>(inputs.track?.value, "AudioTrack"),
|
|
44
44
|
)) } },
|
|
45
45
|
needs: {},
|
|
@@ -51,7 +51,7 @@ export const filmComponent = {
|
|
|
51
51
|
outputs: { composition: { kind: "inline", value: canonicalize(compileFilmComposition(
|
|
52
52
|
inline<FilmProgram>(inputs.program?.value, "FilmProgram"),
|
|
53
53
|
inline<CanvasSpace>(inputs.canvas?.value, "CanvasSpace"),
|
|
54
|
-
inline<
|
|
54
|
+
inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
55
55
|
inline<FilmTrackSet>(inputs.set?.value, "FilmTrackSet"),
|
|
56
56
|
)) } },
|
|
57
57
|
needs: {},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
2
|
+
|
|
2
3
|
import { spatialTypes } from "@hypit/spatial";
|
|
3
4
|
import { compositionTypes } from "@hypit/composition";
|
|
4
5
|
import type { Track } from "@hypit/composition";
|
|
@@ -12,7 +13,7 @@ const input = (name: string) => ({ kind: "fragment-input" as const, name });
|
|
|
12
13
|
const operation = (id: string) => ({ kind: "fragment-operation" as const, operation: id });
|
|
13
14
|
|
|
14
15
|
function assertTrackInputs(tracks: readonly FilmTrackInput[]): FilmTrackInput[] {
|
|
15
|
-
const names = new Set(["program", "canvas", "
|
|
16
|
+
const names = new Set(["program", "canvas", "timeline"]);
|
|
16
17
|
return [...tracks]
|
|
17
18
|
.map((track) => ({ name: track.name.trim(), kind: track.kind }))
|
|
18
19
|
.sort((left, right) => left.name.localeCompare(right.name))
|
|
@@ -45,7 +46,7 @@ export function createFilmAssemblyFragment(options: FilmAssemblyFragmentOptions)
|
|
|
45
46
|
operations.push({
|
|
46
47
|
id,
|
|
47
48
|
producer: track.kind === "visual" ? filmProducers.appendVisualTrack : filmProducers.appendAudioTrack,
|
|
48
|
-
inputs: { set: operation(current),
|
|
49
|
+
inputs: { set: operation(current), timeline: input("timeline"), track: input(track.name) },
|
|
49
50
|
result: { kind: "output" as const, name: "set" },
|
|
50
51
|
});
|
|
51
52
|
current = id;
|
|
@@ -56,7 +57,7 @@ export function createFilmAssemblyFragment(options: FilmAssemblyFragmentOptions)
|
|
|
56
57
|
inputs: {
|
|
57
58
|
program: input("program"),
|
|
58
59
|
canvas: input("canvas"),
|
|
59
|
-
|
|
60
|
+
timeline: input("timeline"),
|
|
60
61
|
set: operation(current),
|
|
61
62
|
},
|
|
62
63
|
result: { kind: "output" as const, name: "composition" },
|
|
@@ -65,7 +66,7 @@ export function createFilmAssemblyFragment(options: FilmAssemblyFragmentOptions)
|
|
|
65
66
|
inputs: [
|
|
66
67
|
{ name: "program", type: filmTypes.program },
|
|
67
68
|
{ name: "canvas", type: spatialTypes.canvas },
|
|
68
|
-
{ name: "
|
|
69
|
+
{ name: "timeline", type: timelineTypes.track },
|
|
69
70
|
...tracks.map((track) => ({
|
|
70
71
|
name: track.name,
|
|
71
72
|
type: track.kind === "visual" ? compositionTypes.visualTrack : compositionTypes.audioTrack,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
2
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
3
|
import { temporalContextAttributeVocabulary } from "@hypit/temporal-markup";
|
|
2
4
|
import { audioTrackSchema, compositionDependency, compositionTypes, visualTrackSchema } from "@hypit/composition";
|
|
3
|
-
|
|
5
|
+
|
|
4
6
|
import type { ModuleManifest, ProducerRef, TypeRef, ValueSchema } from "@hypit/protocol";
|
|
5
|
-
import {
|
|
7
|
+
import { timelineDependency } from "@hypit/timeline";
|
|
6
8
|
import { spatialDependency, spatialTypes } from "@hypit/spatial";
|
|
7
9
|
import { svsManifest, svsModuleRef, svsRecipeType } from "@hypit/svs";
|
|
8
10
|
|
|
@@ -47,7 +49,7 @@ export const filmMarkupSurfaces = [{
|
|
|
47
49
|
outputs: [filmTypes.program],
|
|
48
50
|
vocabulary: {
|
|
49
51
|
summary:
|
|
50
|
-
"Assembles any number of peer VisualTrack and AudioTrack references into one Composition against a Canvas and a
|
|
52
|
+
"Assembles any number of peer VisualTrack and AudioTrack references into one Composition against a Canvas and a Timeline.",
|
|
51
53
|
appearance:
|
|
52
54
|
"One flat fill of the entire Canvas, in the single hexadecimal color the Recipe's `background` carries, lying behind everything else in the Frame. It covers the full Canvas width and height, holds that one color from the first Frame to the last, and never moves, fades or changes. Wherever nothing is painted over it, that color is what the Frame shows; the Film puts no mark of its own on top of it.",
|
|
53
55
|
attributes: [
|
|
@@ -79,9 +81,9 @@ export const filmMarkupSurfaces = [{
|
|
|
79
81
|
summary: "The assembled Composition, addressed as `<id>.composition`." },
|
|
80
82
|
],
|
|
81
83
|
example: [
|
|
82
|
-
'<film:Film id="main" canvas={vertical}
|
|
84
|
+
'<film:Film id="main" canvas={vertical} timeline={speech.timeline} appearance={recipes.film.vertical}>',
|
|
83
85
|
" <film:Track source={performance.visual}/>",
|
|
84
|
-
" <film:Track source={
|
|
86
|
+
" <film:Track source={voice.audio}/>",
|
|
85
87
|
" <film:Track source={captions.track}/>",
|
|
86
88
|
"</film:Film>",
|
|
87
89
|
].join("\n"),
|
|
@@ -99,8 +101,7 @@ export const filmManifest: ModuleManifest = {
|
|
|
99
101
|
name: filmModuleRef.name,
|
|
100
102
|
version: filmModuleRef.version,
|
|
101
103
|
dependencies: [
|
|
102
|
-
|
|
103
|
-
semanticTrackDependency,
|
|
104
|
+
timelineDependency,
|
|
104
105
|
spatialDependency,
|
|
105
106
|
compositionDependency,
|
|
106
107
|
{ module: svsModuleRef },
|
|
@@ -121,7 +122,7 @@ export const filmManifest: ModuleManifest = {
|
|
|
121
122
|
name: filmProducers.appendVisualTrack.name,
|
|
122
123
|
inputs: [
|
|
123
124
|
{ name: "set", type: filmTypes.trackSet },
|
|
124
|
-
{ name: "
|
|
125
|
+
{ name: "timeline", type: timelineTypes.track },
|
|
125
126
|
{ name: "track", type: compositionTypes.visualTrack },
|
|
126
127
|
],
|
|
127
128
|
outputs: [{ name: "set", type: filmTypes.trackSet }],
|
|
@@ -131,7 +132,7 @@ export const filmManifest: ModuleManifest = {
|
|
|
131
132
|
name: filmProducers.appendAudioTrack.name,
|
|
132
133
|
inputs: [
|
|
133
134
|
{ name: "set", type: filmTypes.trackSet },
|
|
134
|
-
{ name: "
|
|
135
|
+
{ name: "timeline", type: timelineTypes.track },
|
|
135
136
|
{ name: "track", type: compositionTypes.audioTrack },
|
|
136
137
|
],
|
|
137
138
|
outputs: [{ name: "set", type: filmTypes.trackSet }],
|
|
@@ -142,7 +143,7 @@ export const filmManifest: ModuleManifest = {
|
|
|
142
143
|
inputs: [
|
|
143
144
|
{ name: "program", type: filmTypes.program },
|
|
144
145
|
{ name: "canvas", type: spatialTypes.canvas },
|
|
145
|
-
{ name: "
|
|
146
|
+
{ name: "timeline", type: timelineTypes.track },
|
|
146
147
|
{ name: "set", type: filmTypes.trackSet },
|
|
147
148
|
],
|
|
148
149
|
outputs: [{ name: "composition", type: compositionTypes.composition }],
|