@hypit/hypit 0.1.4 → 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 +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 +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 +32 -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 +14 -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 +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/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 +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/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 +92 -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 +15 -2
- package/packages/script/src/manifest.ts +2 -2
- package/packages/script/src/narrative.ts +1 -0
- 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/README.md +88 -14
- 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/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 +209 -48
- package/packages/studio/src/ui/comments.ts +233 -0
- package/packages/studio/src/ui/icons.ts +5 -0
- package/packages/studio/src/ui/main.ts +145 -86
- package/packages/studio/src/ui/overlay.ts +12 -8
- package/packages/studio/src/ui/scrub-preview.ts +108 -0
- package/packages/studio/src/ui/stage.ts +67 -4
- package/packages/studio/src/ui/timeline.ts +177 -108
- package/packages/studio/start.ts +4 -2
- 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
|
@@ -143,11 +143,11 @@ type ProducerHandlerContext = {
|
|
|
143
143
|
readonly inputs: Readonly<Record<string, TypedRecord>>;
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
declare const
|
|
146
|
+
declare const timelineComponent: {
|
|
147
147
|
producers: ({
|
|
148
148
|
producer: {
|
|
149
149
|
module: {
|
|
150
|
-
readonly name: "@hypit/
|
|
150
|
+
readonly name: "@hypit/timeline";
|
|
151
151
|
readonly version: "1";
|
|
152
152
|
};
|
|
153
153
|
name: string;
|
|
@@ -164,7 +164,7 @@ declare const semanticTrackComponent: {
|
|
|
164
164
|
} | {
|
|
165
165
|
producer: {
|
|
166
166
|
module: {
|
|
167
|
-
readonly name: "@hypit/
|
|
167
|
+
readonly name: "@hypit/timeline";
|
|
168
168
|
readonly version: "1";
|
|
169
169
|
};
|
|
170
170
|
name: string;
|
|
@@ -182,7 +182,7 @@ declare const semanticTrackComponent: {
|
|
|
182
182
|
validators: {
|
|
183
183
|
type: {
|
|
184
184
|
module: {
|
|
185
|
-
readonly name: "@hypit/
|
|
185
|
+
readonly name: "@hypit/timeline";
|
|
186
186
|
readonly version: "1";
|
|
187
187
|
};
|
|
188
188
|
name: string;
|
|
@@ -191,6 +191,16 @@ declare const semanticTrackComponent: {
|
|
|
191
191
|
}[];
|
|
192
192
|
};
|
|
193
193
|
|
|
194
|
+
type ProgramSpace = {
|
|
195
|
+
/** Author-visible identity of this film time axis. */
|
|
196
|
+
readonly id: string;
|
|
197
|
+
readonly durationSec: number;
|
|
198
|
+
readonly frameRate: {
|
|
199
|
+
readonly numerator: number;
|
|
200
|
+
readonly denominator: number;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
|
|
194
204
|
type MediaRational = {
|
|
195
205
|
readonly numerator: number;
|
|
196
206
|
readonly denominator: number;
|
|
@@ -278,20 +288,17 @@ type NarrativeExcerpt = {
|
|
|
278
288
|
readonly tokenEndExclusive: number;
|
|
279
289
|
};
|
|
280
290
|
|
|
281
|
-
type
|
|
291
|
+
type TimelineItem = {
|
|
282
292
|
readonly take: SemanticTake;
|
|
293
|
+
readonly startFrame: number;
|
|
283
294
|
};
|
|
284
|
-
/**
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
type SemanticTrack = {
|
|
289
|
-
readonly id: string;
|
|
290
|
-
readonly narrativeId: string;
|
|
291
|
-
readonly items: readonly SemanticTrackItem[];
|
|
295
|
+
/** One complete film time range, with prepared material placed where it belongs. */
|
|
296
|
+
type Timeline = ProgramSpace & {
|
|
297
|
+
readonly narrativeId?: string;
|
|
298
|
+
readonly items: readonly TimelineItem[];
|
|
292
299
|
};
|
|
293
|
-
type
|
|
294
|
-
readonly item:
|
|
300
|
+
type TimelineSpan = {
|
|
301
|
+
readonly item: TimelineItem;
|
|
295
302
|
readonly startFrame: number;
|
|
296
303
|
readonly endFrameExclusive: number;
|
|
297
304
|
};
|
|
@@ -300,68 +307,74 @@ type LocatedFrameSpan = {
|
|
|
300
307
|
readonly endFrameExclusive: number;
|
|
301
308
|
};
|
|
302
309
|
|
|
303
|
-
declare function
|
|
304
|
-
declare function
|
|
305
|
-
declare function
|
|
306
|
-
declare function
|
|
310
|
+
declare function sealTimeline(value: Timeline): Timeline;
|
|
311
|
+
declare function assertTimelineIdentity(track: Timeline): void;
|
|
312
|
+
declare function timelineSpans(track: Timeline): readonly TimelineSpan[];
|
|
313
|
+
declare function timelineFrameCount(track: Timeline): number;
|
|
307
314
|
|
|
308
315
|
declare function assertNarrativeSelectionIdentity(selection: NarrativeSelectionRef): void;
|
|
309
316
|
declare function assertNarrativeMomentIdentity(moment: NarrativeMomentRef): void;
|
|
310
|
-
declare function semanticAnchorFrames(track:
|
|
311
|
-
declare function selectionFrameSpan(track:
|
|
312
|
-
declare function segmentFrameSpan(track:
|
|
313
|
-
declare function tokenFrameSpan(track:
|
|
314
|
-
declare function momentFrame(track:
|
|
317
|
+
declare function semanticAnchorFrames(track: Timeline): ReadonlyMap<string, number>;
|
|
318
|
+
declare function selectionFrameSpan(track: Timeline, selection: NarrativeSelectionRef): LocatedFrameSpan;
|
|
319
|
+
declare function segmentFrameSpan(track: Timeline, segment: NarrativeExcerpt): LocatedFrameSpan;
|
|
320
|
+
declare function tokenFrameSpan(track: Timeline, tokenIds: readonly string[]): LocatedFrameSpan | undefined;
|
|
321
|
+
declare function momentFrame(track: Timeline, moment: NarrativeMomentRef): number;
|
|
315
322
|
|
|
316
|
-
declare const
|
|
317
|
-
readonly name: "@hypit/
|
|
323
|
+
declare const timelineModuleRef: {
|
|
324
|
+
readonly name: "@hypit/timeline";
|
|
318
325
|
readonly version: "1";
|
|
319
326
|
};
|
|
320
|
-
declare const
|
|
327
|
+
declare const timelineTypes: {
|
|
321
328
|
track: {
|
|
322
329
|
module: {
|
|
323
|
-
readonly name: "@hypit/
|
|
330
|
+
readonly name: "@hypit/timeline";
|
|
324
331
|
readonly version: "1";
|
|
325
332
|
};
|
|
326
333
|
name: string;
|
|
327
334
|
};
|
|
328
335
|
};
|
|
329
|
-
declare const
|
|
336
|
+
declare const timelineProducers: {
|
|
330
337
|
projectProgramSpace: {
|
|
331
338
|
module: {
|
|
332
|
-
readonly name: "@hypit/
|
|
339
|
+
readonly name: "@hypit/timeline";
|
|
333
340
|
readonly version: "1";
|
|
334
341
|
};
|
|
335
342
|
name: string;
|
|
336
343
|
};
|
|
337
344
|
projectAudio: {
|
|
338
345
|
module: {
|
|
339
|
-
readonly name: "@hypit/
|
|
346
|
+
readonly name: "@hypit/timeline";
|
|
340
347
|
readonly version: "1";
|
|
341
348
|
};
|
|
342
349
|
name: string;
|
|
343
350
|
};
|
|
344
351
|
};
|
|
345
|
-
declare const
|
|
346
|
-
declare const
|
|
347
|
-
declare const
|
|
352
|
+
declare const timelineSchema: ValueSchema;
|
|
353
|
+
declare const timelineManifest: ModuleManifest;
|
|
354
|
+
declare const timelineDependency: {
|
|
348
355
|
readonly module: {
|
|
349
|
-
readonly name: "@hypit/
|
|
356
|
+
readonly name: "@hypit/timeline";
|
|
350
357
|
readonly version: "1";
|
|
351
358
|
};
|
|
352
359
|
};
|
|
353
360
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
readonly
|
|
357
|
-
readonly
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
361
|
+
/** Gain and audibility are measured on the complete 48 kHz program clock. */
|
|
362
|
+
type AudioSampleSpan = {
|
|
363
|
+
readonly startSample: number;
|
|
364
|
+
readonly endSampleExclusive: number;
|
|
365
|
+
};
|
|
366
|
+
type AudioGainPoint = {
|
|
367
|
+
readonly sample: number;
|
|
368
|
+
readonly gain: number;
|
|
369
|
+
};
|
|
370
|
+
type AudioPresentation = {
|
|
371
|
+
/** Linear interpolation; hold the first/last gain outside the supplied points. */
|
|
372
|
+
readonly gainEnvelope?: readonly AudioGainPoint[];
|
|
373
|
+
/** Half-open audible regions; omission means the complete target, [] means silence. */
|
|
374
|
+
readonly audibility?: readonly AudioSampleSpan[];
|
|
362
375
|
};
|
|
363
376
|
|
|
364
|
-
type AudioClip = {
|
|
377
|
+
type AudioClip = AudioPresentation & {
|
|
365
378
|
readonly id: string;
|
|
366
379
|
/** Optional domain entity implemented by this renderer Clip. */
|
|
367
380
|
readonly subjectId?: string;
|
|
@@ -396,7 +409,7 @@ type AudioTrack = {
|
|
|
396
409
|
};
|
|
397
410
|
|
|
398
411
|
/** Prepared material in an authored program interval, with its original source position retained. */
|
|
399
|
-
declare function
|
|
412
|
+
declare function projectTimelineMedia(track: Timeline, window?: {
|
|
400
413
|
startFrame: number;
|
|
401
414
|
endFrameExclusive: number;
|
|
402
415
|
}): {
|
|
@@ -411,8 +424,8 @@ declare function projectSemanticMedia(track: SemanticTrack, window?: {
|
|
|
411
424
|
endFrameExclusive: number;
|
|
412
425
|
};
|
|
413
426
|
}[];
|
|
414
|
-
declare function
|
|
415
|
-
declare function
|
|
427
|
+
declare function projectTimelineSpace(track: Timeline): ProgramSpace;
|
|
428
|
+
declare function projectTimelineAudio(track: Timeline): AudioTrack;
|
|
416
429
|
|
|
417
|
-
export { assertNarrativeMomentIdentity, assertNarrativeSelectionIdentity,
|
|
418
|
-
export type { LocatedFrameSpan,
|
|
430
|
+
export { assertNarrativeMomentIdentity, assertNarrativeSelectionIdentity, assertTimelineIdentity, momentFrame, projectTimelineAudio, projectTimelineMedia, projectTimelineSpace, sealTimeline, segmentFrameSpan, selectionFrameSpan, semanticAnchorFrames, timelineComponent, timelineDependency, timelineFrameCount, timelineManifest, timelineModuleRef, timelineProducers, timelineSchema, timelineSpans, timelineTypes, tokenFrameSpan };
|
|
431
|
+
export type { LocatedFrameSpan, Timeline, TimelineItem, TimelineSpan };
|
package/examples/README.md
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
# Video examples
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Build Result or manually supplied presenter, host or scene image.
|
|
3
|
+
These projects demonstrate different directing and composition decisions. Read the one closest to
|
|
4
|
+
the question, then trace its intent, component boundaries, semantic events and rendered behavior.
|
|
5
|
+
Adapt those relationships to a new work; its scene list and styling are choices for that production.
|
|
7
6
|
|
|
8
|
-
| Example | What
|
|
9
|
-
| --- | --- |
|
|
10
|
-
| [Football ranking](ranking-football/README.md) |
|
|
11
|
-
| [Podcast](podcast/README.md) | Related host views,
|
|
12
|
-
| [Street interview](interview/README.md) | A shared encounter
|
|
7
|
+
| Example | What to learn | Starting material |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| [Football ranking](ranking-football/README.md) | Independent speaking Takes, a persistent tier board and timed reveals | Generate from `reference.svrun` |
|
|
10
|
+
| [Podcast](podcast/README.md) | Related host views, product references, motivated cuts and a lifestyle montage | Generate from `reference.svrun` |
|
|
11
|
+
| [Street interview](interview/README.md) | A shared encounter, derived close views, coordinated Moments and Caption tracking | Generate from `reference.svrun` |
|
|
12
|
+
| [Complex spoken explainer](complex-explainer/README.md) | Coordinated project scenes, moving presenter framing, independent Caption, semantic graphic events and Take-free intervals | Download its accepted media/Result bundle; render locally |
|
|
13
|
+
|
|
14
|
+
The three generation entries use `reference.svml` and an adjacent `reference.svrun`. They generate
|
|
15
|
+
their main images, recurring voice references and video Takes, then normalize media, align the Script
|
|
16
|
+
and compose the video. They need no earlier Build Result or manually supplied presenter, host or scene
|
|
17
|
+
image. The explainer instead opens a complete 137-second production with 17 accepted Takes, recorded
|
|
18
|
+
demonstrations, pixel graphics and sound; its default Run reuses the supplied material.
|
|
13
19
|
|
|
14
20
|
Self-contained here means a project directory: SVML, its imported SVS/Kits and the selected local
|
|
15
21
|
assets. The installed Hypit Distribution supplies the imported packages. A Runtime Profile and
|
|
@@ -21,4 +27,6 @@ The other `swap-*` and nested projects preserve separate variations and reuse st
|
|
|
21
27
|
all been rebuilt to the same generation standard as these three reference entries. A linked showcase
|
|
22
28
|
video demonstrates the original production; a fresh generation is a new result and will differ.
|
|
23
29
|
|
|
24
|
-
`minimal-author-package/` demonstrates independent component packaging
|
|
30
|
+
For focused package work, `minimal-author-package/` demonstrates independent component packaging;
|
|
31
|
+
[provider-package](provider-package/README.md) demonstrates connecting a chosen service through a
|
|
32
|
+
project Provider. Each package's public inputs and behavior belong with its implementation.
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
Candidates are supplied, and a normal Build of the same Run can regenerate the catalogue frame. -->
|
|
5
5
|
<svml>
|
|
6
6
|
<import as="media-track" from="@hypit/media-track@1"/>
|
|
7
|
+
<import as="sound" from="@hypit/sound@1"/>
|
|
8
|
+
<import as="performance" from="@hypit/performance@1"/>
|
|
7
9
|
<import from="@hypit/script@1"/>
|
|
8
10
|
<import as="wording" from="@hypit/text@1"/>
|
|
9
11
|
<import as="seedance" from="@hypit/seedance@1"/>
|
|
10
12
|
<import as="pipeline" from="@hypit/media-pipeline@1"/>
|
|
11
|
-
<import as="
|
|
13
|
+
<import as="time" from="@hypit/timeline-author@1"/>
|
|
12
14
|
<import as="whisperx" from="@hypit/whisperx@1"/>
|
|
13
15
|
<import as="space" from="@hypit/spatial@1"/>
|
|
14
16
|
<import as="program" from="@hypit/program-space@1"/>
|
|
@@ -29,19 +31,24 @@
|
|
|
29
31
|
<seedance:TextVideo id="take" model="mini" prompt={direction} duration="4" generate-audio="true"/>
|
|
30
32
|
<pipeline:Normalize id="take-media" source={take.video} recipe={recipes.media.aroll} clock={clock}/>
|
|
31
33
|
<whisperx:SemanticTake id="showcase-semantic" narrative={story} segment={story.segment.showcase} media={take-media.media} language="en"/>
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
</
|
|
35
|
-
<media-track:Track id="speech-picture" semantic={speech.semantic} canvas={vertical}>
|
|
36
|
-
<media-track:Performance during="program" frame={speech-frame}
|
|
37
|
-
appearance={recipes.media.performance}/>
|
|
38
|
-
</media-track:Track>
|
|
34
|
+
<time:Timeline id="speech" clock={clock}>
|
|
35
|
+
<time:Take source={showcase-semantic.take}/>
|
|
36
|
+
</time:Timeline>
|
|
39
37
|
|
|
40
|
-
<
|
|
41
|
-
<
|
|
38
|
+
<sound:Style id="speech-sound-style"/>
|
|
39
|
+
<sound:Track id="speech-sound" timeline={speech.timeline}>
|
|
40
|
+
<sound:Use style={speech-sound-style}/>
|
|
41
|
+
</sound:Track>
|
|
42
|
+
<performance:Style id="speech-picture-style" frame={speech-frame} appearance={recipes.media.performance}/>
|
|
43
|
+
<performance:Track id="speech-picture" timeline={speech.timeline} canvas={vertical}>
|
|
44
|
+
<performance:Use style={speech-picture-style} during="program"/>
|
|
45
|
+
</performance:Track>
|
|
46
|
+
|
|
47
|
+
<example:Box id="box" timeline={speech.timeline}/>
|
|
48
|
+
<film:Film id="main" canvas={vertical} timeline={speech.timeline} appearance={recipes.film.vertical}>
|
|
42
49
|
<film:Track source={speech-picture.visual}/>
|
|
43
|
-
<film:Track source={speech.audio}/>
|
|
50
|
+
<film:Track source={speech-sound.audio}/>
|
|
44
51
|
<film:Track source={box.track}/>
|
|
45
52
|
</film:Film>
|
|
46
|
-
<render:Video id="final" composition={main.composition}
|
|
53
|
+
<render:Video id="final" composition={main.composition} timeline={speech.timeline}/>
|
|
47
54
|
</svml>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sealVisualTrack } from "@hypit/hypit/composition";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Timeline } from "@hypit/hypit/timeline";
|
|
3
3
|
import { canonicalize } from "@hypit/hypit/author-kit";
|
|
4
4
|
import type { BlobRef, ComponentPackage, ProducerHandler, TypedRecord } from "@hypit/hypit/author-kit";
|
|
5
5
|
import { VISUAL_IR_V1 } from "@hypit/hypit/visual-ir";
|
|
@@ -13,10 +13,10 @@ const output = (value: unknown) => ({ kind: "inline" as const, value: canonicali
|
|
|
13
13
|
function blob(record: TypedRecord | undefined): BlobRef | undefined {
|
|
14
14
|
return record?.value.kind === "blob" ? record.value : undefined;
|
|
15
15
|
}
|
|
16
|
-
function render(kind: string,
|
|
17
|
-
const frames = Math.max(1, Math.round(
|
|
16
|
+
function render(kind: string, timeline: Timeline, media?: BlobRef) {
|
|
17
|
+
const frames = Math.max(1, Math.round(timeline.durationSec * timeline.frameRate.numerator / timeline.frameRate.denominator));
|
|
18
18
|
return sealVisualTrack({
|
|
19
|
-
programSpaceId:
|
|
19
|
+
programSpaceId: timeline.id,
|
|
20
20
|
visualIr: VISUAL_IR_V1,
|
|
21
21
|
id: `example-${kind}`,
|
|
22
22
|
presents: [{ id: `present-${kind}`, span: { startFrame: 0, endFrameExclusive: frames }, stacking: { order: 0, tieBreak: kind }, elements: [{
|
|
@@ -26,7 +26,7 @@ function render(kind: string, space: ProgramSpace, media?: BlobRef) {
|
|
|
26
26
|
] }],
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
const producer = (kind: string): { readonly handler: ProducerHandler } => ({ handler: ({ inputs }) => ({ outputs: { track: output(render(kind, inline<
|
|
29
|
+
const producer = (kind: string): { readonly handler: ProducerHandler } => ({ handler: ({ inputs }) => ({ outputs: { track: output(render(kind, inline<Timeline>(inputs.timeline), blob(inputs.media))) }, needs: {} }) });
|
|
30
30
|
const appendItems: { readonly handler: ProducerHandler } = { handler: ({ inputs }) => ({ outputs: { set: output({ items: [inline<{ items: readonly unknown[] }>(inputs.previous).items, inline<{ items: readonly unknown[] }>(inputs.item).items].flat() }) }, needs: {} }) };
|
|
31
31
|
|
|
32
32
|
export const exampleComponent = {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { compositionTypes } from "@hypit/hypit/composition";
|
|
2
2
|
import { artifactTypes } from "@hypit/hypit/artifact";
|
|
3
3
|
import { sealGraphFragment } from "@hypit/hypit/author-kit";
|
|
4
|
-
import {
|
|
5
|
-
import { programSpaceTypes } from "@hypit/hypit/program-space";
|
|
4
|
+
import { timelineTypes } from "@hypit/hypit/timeline";
|
|
6
5
|
import { exampleProducers } from "./manifest.js";
|
|
7
6
|
import { exampleTypes } from "./manifest.js";
|
|
8
7
|
|
|
@@ -10,12 +9,11 @@ const input = (name: string) => ({ kind: "fragment-input" as const, name });
|
|
|
10
9
|
const operation = (id: string) => ({ kind: "fragment-operation" as const, operation: id });
|
|
11
10
|
|
|
12
11
|
export function createExampleFragment(producer: typeof exampleProducers[keyof typeof exampleProducers], id: string, media = false) {
|
|
13
|
-
const inputs = [{ name: "
|
|
14
|
-
const renderInputs = {
|
|
12
|
+
const inputs = [{ name: "timeline", type: timelineTypes.track }, ...(media ? [{ name: "media", type: artifactTypes.blob }] : [])];
|
|
13
|
+
const renderInputs = { timeline: input("timeline"), ...(media ? { media: input("media") } : {}) };
|
|
15
14
|
return sealGraphFragment({
|
|
16
15
|
inputs,
|
|
17
16
|
operations: [
|
|
18
|
-
{ id: "space", producer: semanticTrackProducers.projectProgramSpace, inputs: { track: input("semantic") }, result: { kind: "output", name: "space" } },
|
|
19
17
|
{ id, producer, inputs: renderInputs, result: { kind: "output", name: "track" } },
|
|
20
18
|
],
|
|
21
19
|
exports: [{ name: "track", type: compositionTypes.visualTrack, root: operation(id) }],
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { compositionTypes } from "@hypit/hypit/composition";
|
|
3
3
|
import type { ModuleManifest, ProducerRef, TypeRef } from "@hypit/hypit/author-kit";
|
|
4
|
-
import {
|
|
5
|
-
import { semanticTrackTypes } from "@hypit/hypit/semantic-track";
|
|
4
|
+
import { timelineTypes } from "@hypit/hypit/timeline";
|
|
6
5
|
import { temporalTypes } from "@hypit/hypit/temporal";
|
|
7
6
|
import { mediaTypes } from "@hypit/hypit/media";
|
|
8
7
|
import { svsRecipeType } from "@hypit/hypit/svs";
|
|
@@ -35,8 +34,7 @@ export const exampleManifest: ModuleManifest = {
|
|
|
35
34
|
{ module: artifactTypes.blob.module },
|
|
36
35
|
{ module: compositionTypes.visualTrack.module },
|
|
37
36
|
{ module: mediaTypes.fontStack.module },
|
|
38
|
-
{ module:
|
|
39
|
-
{ module: semanticTrackTypes.track.module },
|
|
37
|
+
{ module: timelineTypes.track.module },
|
|
40
38
|
{ module: svsRecipeType.module },
|
|
41
39
|
{ module: temporalTypes.window.module },
|
|
42
40
|
],
|
|
@@ -46,7 +44,7 @@ export const exampleManifest: ModuleManifest = {
|
|
|
46
44
|
name: producer.name,
|
|
47
45
|
inputs: producer === exampleProducers.appendItems
|
|
48
46
|
? [{ name: "previous", type: exampleTypes.itemSet }, { name: "item", type: exampleTypes.itemSet }]
|
|
49
|
-
: [{ name: "
|
|
47
|
+
: [{ name: "timeline", type: timelineTypes.track }, ...(producer === exampleProducers.renderMedia ? [{ name: "media", type: artifactTypes.blob }] : [])],
|
|
50
48
|
outputs: producer === exampleProducers.appendItems
|
|
51
49
|
? [{ name: "set", type: exampleTypes.itemSet }]
|
|
52
50
|
: [{ name: "track", type: compositionTypes.visualTrack }],
|
|
@@ -56,11 +54,11 @@ export const exampleManifest: ModuleManifest = {
|
|
|
56
54
|
|
|
57
55
|
const vocabulary = (summary: string, example: string) => ({
|
|
58
56
|
summary,
|
|
59
|
-
appearance: "A deterministic, self-contained example surface rendered on the supplied
|
|
57
|
+
appearance: "A deterministic, self-contained example surface rendered on the supplied Timeline.",
|
|
60
58
|
preview: previewImage("Box.png"),
|
|
61
59
|
attributes: [
|
|
62
60
|
{ name: "id", kind: "identifier" as const, required: true, summary: "Names this instance." },
|
|
63
|
-
{ name: "
|
|
61
|
+
{ name: "timeline", kind: "reference" as const, required: true, accepts: [timelineTypes.track], summary: "Selects the complete Timeline." },
|
|
64
62
|
],
|
|
65
63
|
ports: [{ name: "track", type: compositionTypes.visualTrack, summary: "The terminal VisualTrack." }],
|
|
66
64
|
example,
|
|
@@ -68,9 +66,9 @@ const vocabulary = (summary: string, example: string) => ({
|
|
|
68
66
|
});
|
|
69
67
|
|
|
70
68
|
export const exampleMarkupSurfaces = [
|
|
71
|
-
{ name: "box", tag: "Box", mode: "structured", outputs: [exampleTypes.box, compositionTypes.visualTrack], vocabulary: { ...vocabulary("A framed box surface.", "<example:Box id=\"box\"
|
|
72
|
-
{ name: "text", tag: "Text", mode: "structured", outputs: [exampleTypes.text, temporalTypes.instantSpec, temporalTypes.windowSpec, temporalTypes.instant, temporalTypes.window, compositionTypes.visualTrack], vocabulary: { ...vocabulary("A text-bearing surface.", "<example:Text id=\"title\"
|
|
73
|
-
{ name: "media-slot", tag: "MediaSlot", mode: "structured", outputs: [exampleTypes.mediaSlot, compositionTypes.visualTrack], vocabulary: { ...vocabulary("A media slot whose content is a graph input.", "<example:MediaSlot id=\"shot\"
|
|
69
|
+
{ name: "box", tag: "Box", mode: "structured", outputs: [exampleTypes.box, compositionTypes.visualTrack], vocabulary: { ...vocabulary("A framed box surface.", "<example:Box id=\"box\" timeline={speech.timeline}/>") , preview: previewImage("Box.png") } },
|
|
70
|
+
{ name: "text", tag: "Text", mode: "structured", outputs: [exampleTypes.text, temporalTypes.instantSpec, temporalTypes.windowSpec, temporalTypes.instant, temporalTypes.window, compositionTypes.visualTrack], vocabulary: { ...vocabulary("A text-bearing surface.", "<example:Text id=\"title\" timeline={speech.timeline}>Hello</example:Text>"), preview: previewImage("Box.png") } },
|
|
71
|
+
{ name: "media-slot", tag: "MediaSlot", mode: "structured", outputs: [exampleTypes.mediaSlot, compositionTypes.visualTrack], vocabulary: { ...vocabulary("A media slot whose content is a graph input.", "<example:MediaSlot id=\"shot\" timeline={speech.timeline} media={shot-media}/>") , attributes: [...vocabulary("", "").attributes, { name: "media", kind: "reference" as const, required: false, accepts: [artifactTypes.blob], summary: "Optional image or video Blob Artifact." }], preview: previewImage("Box.png") } },
|
|
74
72
|
{ name: "style", tag: "Style", mode: "structured", outputs: [exampleTypes.style], vocabulary: {
|
|
75
73
|
summary: "Decodes one SVS Recipe and exact FontStackRef into a Style value.",
|
|
76
74
|
attributes: [
|
|
@@ -28,7 +28,7 @@ export const decodeExampleSurface: StructuredSurfaceHandler = ({ element, resolv
|
|
|
28
28
|
if (recipe.record?.value.kind !== "inline" || font.record?.value.kind !== "inline") throw new Error("Style references must resolve to inline records.");
|
|
29
29
|
return { records: [{ id, type: exampleTypes.style, value: { kind: "inline", value: { recipe: recipe.record.value.value, fonts: font.record.value.value } }, range: element.range }], components: [], fragments: [], exports: [id] };
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const timeline = reference(element, "timeline", resolveReference);
|
|
32
32
|
const surface = exampleMarkupSurfaces.find((item) => item.tag === element.name.split(":").at(-1));
|
|
33
33
|
if (surface === undefined) throw new Error(`Unknown example surface ${element.name}`);
|
|
34
34
|
const fragment = surface.name === "box" ? exampleBoxFragment : surface.name === "text" ? exampleTextFragment : exampleMediaFragment;
|
|
@@ -36,6 +36,6 @@ export const decodeExampleSurface: StructuredSurfaceHandler = ({ element, resolv
|
|
|
36
36
|
const record: SurfaceRecordDraft = { id: `${id}.value`, type, value: { kind: "inline", value: { id } }, range: element.range };
|
|
37
37
|
const media = element.attributes.media === undefined ? undefined : reference(element, "media", resolveReference);
|
|
38
38
|
if (media !== undefined && (media.type.module.name !== artifactTypes.blob.module.name || media.type.name !== artifactTypes.blob.name)) throw new Error(`${element.name}.media must be a Blob Artifact.`);
|
|
39
|
-
const component: SurfaceComponentDraft = { id, fragment: fragment.id, inputs: {
|
|
39
|
+
const component: SurfaceComponentDraft = { id, fragment: fragment.id, inputs: { timeline: timeline.ref, ...(media === undefined ? {} : { media: media.ref }) }, outputs: { track: `${id}.track` }, range: element.range };
|
|
40
40
|
return { records: [record], components: [component], fragments: [fragment], exports: [`${id}.value`, `${id}.track`] };
|
|
41
41
|
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# A project-owned Provider
|
|
2
|
+
|
|
3
|
+
This complete package demonstrates an asynchronous image service through the public Hypit SDK.
|
|
4
|
+
The service protocol below is **illustrative**, not a live vendor API. Replace its mapping and
|
|
5
|
+
transport with the selected service's documented operations. The lifecycle test exercises the
|
|
6
|
+
example without a paid request. Implement the capabilities needed by the production; a service's
|
|
7
|
+
entire catalogue is not required.
|
|
8
|
+
|
|
9
|
+
## Follow one request
|
|
10
|
+
|
|
11
|
+
The existing GPT Image 2 Model produces `@hypit/gpt-image@1#gpt-image-2` with a generated image-set
|
|
12
|
+
result. This Provider supports 1K at three ratios, with optional reference images. It reports its
|
|
13
|
+
smaller support range without changing the Model. The Profile selects this implementation; the
|
|
14
|
+
Source's prompt, references and model remain ordinary generation inputs.
|
|
15
|
+
|
|
16
|
+
The example service uses Bearer authentication for these API operations:
|
|
17
|
+
|
|
18
|
+
| Operation | Example protocol |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| Upload reference | `POST /uploads`, image bytes and media Content-Type → `{ "url": "https://…" }` |
|
|
21
|
+
| Submit generation | `POST /tasks`, `{ "model": "gpt-image-2", "input": { "prompt": "…", "ratio": "9:16", "size": "1K", "references": [] } }` → `{ "id": "task-123" }` |
|
|
22
|
+
| Poll task | `GET /tasks/task-123` → `state`: `queued`, `running`, `failed`, or `succeeded`; success includes a signed image `url` |
|
|
23
|
+
| Read rates | `GET /rates?model=gpt-image-2` → service-owned fields and a `description` stating rates, units and conditions |
|
|
24
|
+
| Collect result | GET the signed image URL without the account key |
|
|
25
|
+
|
|
26
|
+
`start` records the received task ID through `checkpoint` before returning it. Runtime owns polling,
|
|
27
|
+
capacity and durable operation state. `poll` returns `ready` for completed remote work; `collect`
|
|
28
|
+
stores the image through `context.resources` and returns the Model's declared value. The Provider
|
|
29
|
+
chooses neither a Result folder nor a project media path. A failed call ends the attempt while the
|
|
30
|
+
received task ID remains evidence. This service defines no cancellation endpoint, so the package
|
|
31
|
+
does not claim remote cancellation.
|
|
32
|
+
|
|
33
|
+
`pricing` identifies the service page. `readPricing` maps the current request to its service rate
|
|
34
|
+
source and preserves the response with a concise description. It reads no graph and invents no
|
|
35
|
+
future media duration. Rates and credentials do not supply spending permission.
|
|
36
|
+
|
|
37
|
+
## Make it a package in the production
|
|
38
|
+
|
|
39
|
+
Copy `packages/provider-images` into the video's `packages/`. Choose your own package name and change
|
|
40
|
+
`providerModule.name` with it. Implement the actual service protocol, including its request limits,
|
|
41
|
+
upload/download limits and any OAuth or cancellation behavior it really offers. Configure the
|
|
42
|
+
selected service address; `images.example` is a placeholder that cannot generate media.
|
|
43
|
+
|
|
44
|
+
Use the active `@hypit/hypit` version as a development dependency. Build and install with the
|
|
45
|
+
project's package manager. In this repository the example uses `workspace:*` for that dependency;
|
|
46
|
+
replace it with your selected release when copying it out. The `@hypit/driver-node` and
|
|
47
|
+
`@hypit/gpt-image` development dependencies serve the repository test only and can be removed from
|
|
48
|
+
the copied package. For example:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
cd packages/provider-images
|
|
52
|
+
npm install
|
|
53
|
+
npm run build
|
|
54
|
+
cd ../..
|
|
55
|
+
npm install ./packages/provider-images
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The package ships JavaScript. Its `hypit.activation` exports a Profile-selected Runtime facet;
|
|
59
|
+
installation alone activates nothing. The active Distribution resolves public SDK imports when
|
|
60
|
+
loading project packages. Keep the chosen package version and lockfile with the project.
|
|
61
|
+
|
|
62
|
+
Merge the endpoint, credential store and binding from `hypit.runtime.json` into the project's
|
|
63
|
+
chosen Profile. Preserve its other services and resolve bindings explicitly. Once the user chooses
|
|
64
|
+
that account, `hypit auth login images.personal` securely enters the key into its declared store.
|
|
65
|
+
`plan` checks the requested parameters; `pricing` supplies the service's rates. Submitting a real
|
|
66
|
+
generation follows the agreed production scope and spending authority.
|
|
67
|
+
|
|
68
|
+
## Owners
|
|
69
|
+
|
|
70
|
+
- `src/provider.ts`: exact capability, mapping, service support, task lifecycle, pricing and capacity.
|
|
71
|
+
- `src/activation.ts`: configuration and package activation through the Runtime SDK.
|
|
72
|
+
- Model: author inputs and result meaning. No service URL or account is placed in it.
|
|
73
|
+
- Runtime: durable execution, scheduling, credentials supplied to declared slots, and Results.
|
|
74
|
+
|
|
75
|
+
The Endpoint SDK README owns the precise handler fields; the Runtime SDK README owns activation.
|
|
76
|
+
Both are included in the installed Distribution. A new service may need a small immediate handler,
|
|
77
|
+
a different upload protocol, or an asynchronous implementation like this one. Those are Provider
|
|
78
|
+
decisions within the same public boundary.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "hypit.runtime-local@1",
|
|
3
|
+
"dataRoot": ".hypit/execution",
|
|
4
|
+
"credentials": { "os": { "use": "@hypit/credential-store-os" } },
|
|
5
|
+
"endpoints": {
|
|
6
|
+
"images.personal": {
|
|
7
|
+
"use": "@example/provider-images",
|
|
8
|
+
"config": { "baseUrl": "https://images.example", "apiKey": { "store": "os", "key": "images.personal" } }
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"bindings": { "@hypit/gpt-image@1#gpt-image-2": "images.personal" }
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@example/provider-images",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"hypit": { "activation": "./dist/activation.js" },
|
|
7
|
+
"exports": { ".": "./dist/provider.js" },
|
|
8
|
+
"files": ["dist"],
|
|
9
|
+
"scripts": { "build": "tsc -p tsconfig.json" },
|
|
10
|
+
"devDependencies": { "@hypit/hypit": "workspace:*", "typescript": "5.9.3", "@hypit/driver-node": "workspace:*", "@hypit/gpt-image": "workspace:*" }
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createRuntimeEndpointAdapterFacet, runtimeConfigCredentialRef, runtimeConfigExact,
|
|
3
|
+
runtimeConfigObject, runtimeConfigPositiveInteger, runtimeConfigString,
|
|
4
|
+
} from "@hypit/hypit/runtime-kit";
|
|
5
|
+
import { createImageProvider, providerModule } from "./provider.js";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
format: "hypit.node-package@1" as const,
|
|
9
|
+
hostFacets: [createRuntimeEndpointAdapterFacet({
|
|
10
|
+
use: providerModule.name,
|
|
11
|
+
activate(context) {
|
|
12
|
+
const config = runtimeConfigObject(context.config, "Image service");
|
|
13
|
+
runtimeConfigExact(config, ["baseUrl", "apiKey", "concurrency", "pollIntervalMs"], "Image service");
|
|
14
|
+
const baseUrl = runtimeConfigString(config.baseUrl, "Image service baseUrl");
|
|
15
|
+
const apiKey = runtimeConfigCredentialRef(config.apiKey, "Image service apiKey");
|
|
16
|
+
if (!baseUrl || !apiKey || !context.pool) throw new Error("Image service requires baseUrl, apiKey and pool");
|
|
17
|
+
return { endpoint: createImageProvider({
|
|
18
|
+
instance: context.instance, pool: context.pool, baseUrl, apiKey,
|
|
19
|
+
concurrency: runtimeConfigPositiveInteger(config.concurrency, "concurrency") ?? 1,
|
|
20
|
+
pollIntervalMs: runtimeConfigPositiveInteger(config.pollIntervalMs, "pollIntervalMs") ?? 2_000,
|
|
21
|
+
}) };
|
|
22
|
+
},
|
|
23
|
+
})],
|
|
24
|
+
};
|