@hypit/hypit 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/public/caption.d.ts +206 -183
- package/dist/public/composition.d.ts +25 -3
- package/dist/public/endpoint-kit.d.ts +24 -2
- package/dist/public/generation.d.ts +5 -1
- package/dist/public/hyperframes.d.ts +19 -1
- package/dist/public/narrative.d.ts +17 -3
- package/dist/public/performance.d.ts +1590 -0
- package/dist/public/program-space.d.ts +179 -32
- package/dist/public/runtime-kit.d.ts +21 -8
- package/dist/public/sound.d.ts +822 -0
- package/dist/public/speech.d.ts +41 -0
- package/dist/public/studio-adapter.d.ts +77 -15
- package/dist/public/temporal-markup.d.ts +9 -44
- package/dist/public/temporal.d.ts +37 -28
- package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
- package/examples/README.md +18 -10
- package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
- package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
- package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
- package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
- package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
- package/examples/provider-package/README.md +78 -0
- package/examples/provider-package/hypit.runtime.json +12 -0
- package/examples/provider-package/packages/provider-images/package.json +11 -0
- package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
- package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
- package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
- package/examples/semantic-composition/README.md +8 -1
- package/examples/semantic-composition/chat.svml +6 -5
- package/examples/semantic-composition/hypit.runtime.json +1 -1
- package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
- package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
- package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
- package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
- package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
- package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
- package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
- package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
- package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
- package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
- package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
- package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
- package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
- package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
- package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
- package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
- package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
- package/package.json +35 -15
- package/packages/audio-track/README.md +20 -13
- package/packages/audio-track/package.json +1 -1
- package/packages/audio-track/src/component.ts +4 -4
- package/packages/audio-track/src/fragment.ts +6 -5
- package/packages/audio-track/src/index.ts +1 -1
- package/packages/audio-track/src/manifest.ts +17 -16
- package/packages/audio-track/src/program.ts +21 -25
- package/packages/audio-track/src/surface.ts +19 -18
- package/packages/audio-track-studio/README.md +23 -0
- package/packages/audio-track-studio/src/index.ts +28 -17
- package/packages/author-kit/README.md +1 -1
- package/packages/background-removal/README.md +4 -7
- package/packages/browser-capture/package.json +1 -1
- package/packages/build-result/README.md +11 -0
- package/packages/build-result/src/decode.ts +2 -0
- package/packages/build-result/src/execution-log.ts +17 -0
- package/packages/build-result/src/index.ts +1 -0
- package/packages/build-result/src/store.ts +14 -1
- package/packages/build-result/src/types.ts +3 -0
- package/packages/build-result-s3/src/repository.ts +4 -0
- package/packages/caption/README.md +61 -73
- package/packages/caption/package.json +3 -2
- package/packages/caption/src/activation.ts +2 -2
- package/packages/caption/src/component.ts +20 -5
- package/packages/caption/src/display.ts +3 -18
- package/packages/caption/src/fragment.ts +3 -7
- package/packages/caption/src/index.ts +6 -5
- package/packages/caption/src/manifest.ts +29 -46
- package/packages/caption/src/style.ts +24 -135
- package/packages/caption/src/surface.ts +12 -92
- package/packages/caption/src/temporalize.ts +18 -53
- package/packages/caption/src/types.ts +8 -35
- package/packages/caption/src/visibility.ts +23 -0
- package/packages/caption-fine/README.md +21 -9
- package/packages/caption-fine/package.json +4 -2
- package/packages/caption-fine/src/component.ts +3 -3
- package/packages/caption-fine/src/fragment.ts +7 -19
- package/packages/caption-fine/src/index.ts +2 -0
- package/packages/caption-fine/src/manifest.ts +26 -17
- package/packages/caption-fine/src/recipe.ts +7 -0
- package/packages/caption-fine/src/render.ts +14 -13
- package/packages/caption-fine/src/schedule.ts +39 -35
- package/packages/caption-fine/src/style.ts +10 -9
- package/packages/caption-fine/src/surface.ts +62 -35
- package/packages/caption-fine/src/types.ts +2 -0
- package/packages/caption-fine-studio/README.md +24 -2
- package/packages/caption-fine-studio/package.json +3 -1
- package/packages/caption-fine-studio/src/activation.ts +3 -3
- package/packages/caption-fine-studio/src/index.ts +54 -42
- package/packages/cli/README.md +57 -4
- package/packages/cli/package.json +1 -0
- package/packages/cli/src/arguments.ts +25 -6
- package/packages/cli/src/build-planning.ts +3 -2
- package/packages/cli/src/command.ts +6 -0
- package/packages/cli/src/commands/environment.ts +28 -18
- package/packages/cli/src/commands/execution.ts +81 -26
- package/packages/cli/src/commands/results.ts +7 -11
- package/packages/cli/src/index.ts +2 -2
- package/packages/cli/src/machine-view.ts +3 -2
- package/packages/cli/src/main.ts +34 -42
- package/packages/cli/src/observation.ts +7 -1
- package/packages/cli/src/output.ts +65 -23
- package/packages/cli/src/view.ts +66 -19
- package/packages/comment-sticker/README.md +3 -3
- package/packages/comment-sticker/package.json +1 -1
- package/packages/comment-sticker/src/component.ts +4 -4
- package/packages/comment-sticker/src/fragment.ts +5 -4
- package/packages/comment-sticker/src/manifest.ts +7 -6
- package/packages/comment-sticker/src/program.ts +9 -9
- package/packages/comment-sticker/src/surface.ts +6 -7
- package/packages/composition/README.md +21 -0
- package/packages/composition/src/audio-presentation.ts +44 -0
- package/packages/composition/src/index.ts +3 -0
- package/packages/composition/src/schema.ts +8 -3
- package/packages/composition/src/track.ts +15 -1
- package/packages/credential-store-env/README.md +1 -1
- package/packages/deck-track/README.md +3 -3
- package/packages/deck-track/package.json +1 -1
- package/packages/deck-track/src/component.ts +5 -5
- package/packages/deck-track/src/fragment.ts +6 -5
- package/packages/deck-track/src/lower.ts +12 -12
- package/packages/deck-track/src/manifest.ts +8 -7
- package/packages/deck-track/src/program.ts +13 -16
- package/packages/deck-track/src/surface.ts +9 -10
- package/packages/driver-node/src/driver.ts +41 -3
- package/packages/elevenlabs-speech/README.md +27 -0
- package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
- package/packages/elevenlabs-speech/src/activation.ts +26 -0
- package/packages/elevenlabs-speech/src/fragment.ts +11 -0
- package/packages/elevenlabs-speech/src/index.ts +111 -0
- package/packages/elevenlabs-speech/src/surface.ts +167 -0
- package/packages/endpoint-kit/README.md +24 -0
- package/packages/endpoint-kit/src/index.ts +7 -1
- package/packages/film/README.md +12 -7
- package/packages/film/package.json +1 -1
- package/packages/film/src/component.ts +4 -4
- package/packages/film/src/fragment.ts +6 -5
- package/packages/film/src/manifest.ts +11 -10
- package/packages/film/src/program.ts +5 -5
- package/packages/film/src/recipe.ts +2 -1
- package/packages/film/src/surface.ts +10 -7
- package/packages/film-studio/package.json +1 -1
- package/packages/film-studio/src/index.ts +2 -2
- package/packages/fishaudio-speech/README.md +33 -0
- package/packages/fishaudio-speech/package.json +21 -0
- package/packages/fishaudio-speech/src/activation.ts +32 -0
- package/packages/fishaudio-speech/src/fragment.ts +11 -0
- package/packages/fishaudio-speech/src/index.ts +156 -0
- package/packages/fishaudio-speech/src/surface.ts +192 -0
- package/packages/generation/README.md +11 -1
- package/packages/generation/src/mapping.ts +28 -30
- package/packages/gpt-image/README.md +1 -2
- package/packages/grok-imagine/README.md +1 -2
- package/packages/hyperframes/README.md +7 -3
- package/packages/hyperframes/src/browser-program.ts +11 -2
- package/packages/hyperframes/src/document.ts +15 -2
- package/packages/interview-emoji-reveal/README.md +4 -4
- package/packages/interview-emoji-reveal/package.json +1 -1
- package/packages/interview-emoji-reveal/src/component.ts +4 -4
- package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
- package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
- package/packages/interview-emoji-reveal/src/program.ts +14 -14
- package/packages/interview-emoji-reveal/src/surface.ts +8 -9
- package/packages/media-execution/README.md +7 -3
- package/packages/media-execution/src/audio-presentation.ts +23 -0
- package/packages/media-execution/src/execute.ts +2 -0
- package/packages/media-pipeline/README.md +7 -3
- package/packages/media-pipeline/src/audio-plan.ts +4 -1
- package/packages/media-pipeline/src/component.ts +16 -2
- package/packages/media-pipeline/src/manifest.ts +3 -1
- package/packages/media-pipeline/src/types.ts +2 -1
- package/packages/media-track/README.md +14 -47
- package/packages/media-track/package.json +1 -1
- package/packages/media-track/preview/preview.svml +5 -5
- package/packages/media-track/src/author.ts +12 -6
- package/packages/media-track/src/component.ts +10 -16
- package/packages/media-track/src/fragment.ts +8 -7
- package/packages/media-track/src/index.ts +3 -1
- package/packages/media-track/src/lower.ts +7 -7
- package/packages/media-track/src/manifest.ts +16 -38
- package/packages/media-track/src/program.ts +62 -67
- package/packages/media-track/src/sampling.ts +6 -6
- package/packages/media-track/src/sequence.ts +8 -8
- package/packages/media-track/src/surface.ts +25 -43
- package/packages/media-track-studio/README.md +9 -0
- package/packages/media-track-studio/src/index.ts +16 -11
- package/packages/mimo-speech/README.md +1 -1
- package/packages/minimax-h3/README.md +1 -1
- package/packages/nano-banana/README.md +1 -1
- package/packages/narrative/README.md +23 -1
- package/packages/narrative/src/identity.ts +11 -0
- package/packages/narrative/src/index.ts +3 -0
- package/packages/narrative/src/schema.ts +28 -27
- package/packages/narrative/src/selection.ts +52 -0
- package/packages/narrative/src/types.ts +2 -0
- package/packages/package-loader-node/README.md +30 -0
- package/packages/package-loader-node/package.json +5 -2
- package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
- package/packages/package-loader-node/src/index.ts +1 -0
- package/packages/package-loader-node/src/loader.ts +12 -15
- package/packages/package-loader-node/src/location.ts +27 -1
- package/packages/package-loader-node/src/module-scope.ts +183 -0
- package/packages/package-loader-node/src/types.ts +4 -0
- package/packages/performance/README.md +83 -0
- package/packages/performance/package.json +30 -0
- package/packages/performance/src/activation.ts +11 -0
- package/packages/performance/src/component.ts +46 -0
- package/packages/performance/src/index.ts +6 -0
- package/packages/performance/src/manifest.ts +53 -0
- package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
- package/packages/performance/src/program.ts +51 -0
- package/packages/performance/src/style.ts +35 -0
- package/packages/performance/src/surface.ts +99 -0
- package/packages/performance-studio/README.md +25 -0
- package/packages/performance-studio/package.json +21 -0
- package/packages/performance-studio/src/activation.ts +6 -0
- package/packages/performance-studio/src/index.ts +84 -0
- package/packages/program-space/README.md +9 -18
- package/packages/program-space/src/activation.ts +1 -5
- package/packages/program-space/src/index.ts +2 -11
- package/packages/program-space/src/surface.ts +1 -20
- package/packages/project-context-node/README.md +20 -0
- package/packages/project-context-node/package.json +10 -0
- package/packages/project-context-node/src/index.ts +3 -0
- package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
- package/packages/provider-hyperframes-local/README.md +43 -15
- package/packages/provider-hyperframes-local/src/activation.ts +4 -3
- package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
- package/packages/provider-hyperframes-local/src/capture.ts +96 -26
- package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
- package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
- package/packages/provider-hyperframes-local/src/options.ts +2 -0
- package/packages/provider-hyperframes-local/src/program.ts +6 -3
- package/packages/provider-hyperframes-local/src/progress.ts +53 -0
- package/packages/provider-hyperframes-local/src/provider.ts +18 -5
- package/packages/provider-hyperframes-local/src/render.ts +48 -7
- package/packages/provider-hypihub/README.md +48 -17
- package/packages/provider-hypihub/package.json +2 -0
- package/packages/provider-hypihub/src/mapping.ts +31 -7
- package/packages/provider-hypihub/src/oauth.ts +6 -0
- package/packages/provider-hypihub/src/provider.ts +25 -13
- package/packages/provider-hypihub/src/routes.ts +1 -2
- package/packages/provider-hypihub/src/upload.ts +2 -0
- package/packages/provider-media-local/README.md +3 -4
- package/packages/provider-whisperx-local/src/program.ts +1 -0
- package/packages/provider-whisperx-local/src/provider.ts +3 -0
- package/packages/ranking/README.md +8 -6
- package/packages/ranking/package.json +1 -1
- package/packages/ranking/src/component.ts +6 -6
- package/packages/ranking/src/fragment.ts +11 -7
- package/packages/ranking/src/manifest.ts +21 -14
- package/packages/ranking/src/render.ts +22 -26
- package/packages/ranking/src/schedule.ts +16 -19
- package/packages/ranking/src/surface.ts +12 -13
- package/packages/ranking-studio/README.md +18 -0
- package/packages/ranking-studio/src/index.ts +61 -9
- package/packages/render-hyperframes/README.md +7 -7
- package/packages/render-hyperframes/package.json +1 -1
- package/packages/render-hyperframes/src/component.ts +11 -1
- package/packages/render-hyperframes/src/fragment.ts +7 -4
- package/packages/render-hyperframes/src/manifest.ts +4 -4
- package/packages/render-hyperframes/src/surface.ts +6 -6
- package/packages/runtime/README.md +8 -1
- package/packages/runtime/src/execution.ts +15 -4
- package/packages/runtime/src/index.ts +2 -1
- package/packages/runtime/src/log.ts +51 -0
- package/packages/runtime/src/types.ts +5 -8
- package/packages/runtime-host-node/README.md +30 -0
- package/packages/runtime-host-node/package.json +1 -0
- package/packages/runtime-host-node/src/index.ts +24 -9
- package/packages/runtime-host-node/src/packages.ts +47 -50
- package/packages/runtime-kit/README.md +5 -0
- package/packages/runtime-kit/src/index.ts +3 -1
- package/packages/runtime-local/README.md +109 -4
- package/packages/runtime-local/src/config.ts +202 -56
- package/packages/runtime-local/src/control.ts +9 -1
- package/packages/runtime-local/src/executor.ts +66 -0
- package/packages/runtime-local/src/host.ts +37 -17
- package/packages/runtime-local/src/log.ts +48 -0
- package/packages/runtime-local/src/programs.ts +2 -1
- package/packages/runtime-local/src/result-writer.ts +2 -0
- package/packages/runtime-local/src/runtime.ts +8 -6
- package/packages/runtime-local/src/supervisor.ts +142 -0
- package/packages/runtime-local/src/types.ts +9 -2
- package/packages/runtime-local/src/worker-process.ts +7 -24
- package/packages/runtime-local/src/worker.ts +55 -83
- package/packages/screen-overlay/README.md +3 -3
- package/packages/screen-overlay/package.json +1 -1
- package/packages/screen-overlay/src/component.ts +3 -3
- package/packages/screen-overlay/src/fragment.ts +5 -4
- package/packages/screen-overlay/src/manifest.ts +7 -6
- package/packages/screen-overlay/src/program.ts +9 -9
- package/packages/screen-overlay/src/surface.ts +6 -7
- package/packages/script/README.md +30 -5
- package/packages/script/src/manifest.ts +4 -3
- package/packages/script/src/narrative.ts +1 -0
- package/packages/script/src/parser.ts +45 -6
- package/packages/script/src/surface.ts +4 -3
- package/packages/script/src/types.ts +1 -1
- package/packages/script-studio/package.json +9 -3
- package/packages/script-studio/src/index.ts +2 -0
- package/packages/script-studio/src/projection.ts +105 -0
- package/packages/seedance/README.md +30 -1
- package/packages/seedance/src/index.ts +18 -7
- package/packages/seedance/src/surface.ts +17 -4
- package/packages/seedance-kits/README.md +7 -1
- package/packages/seedream/README.md +1 -1
- package/packages/sound/README.md +81 -0
- package/packages/sound/package.json +25 -0
- package/packages/sound/src/activation.ts +11 -0
- package/packages/sound/src/component.ts +28 -0
- package/packages/sound/src/index.ts +5 -0
- package/packages/sound/src/manifest.ts +47 -0
- package/packages/sound/src/program.ts +84 -0
- package/packages/sound/src/style.ts +34 -0
- package/packages/sound/src/surface.ts +90 -0
- package/packages/sound-studio/README.md +22 -0
- package/packages/sound-studio/package.json +20 -0
- package/packages/sound-studio/src/activation.ts +6 -0
- package/packages/sound-studio/src/index.ts +74 -0
- package/packages/speech/README.md +2 -2
- package/packages/speech-alignment/src/local.ts +8 -0
- package/packages/speech-alignment/src/locate.ts +1 -1
- package/packages/store-sqlite/README.md +7 -0
- package/packages/store-sqlite/src/store.ts +84 -83
- package/packages/studio/INSPECTOR.md +15 -2
- package/packages/studio/LOCALIZATION.md +98 -0
- package/packages/studio/README.md +101 -14
- package/packages/studio/locales/en.json +197 -0
- package/packages/studio/locales/zh-CN.json +191 -0
- package/packages/studio/package.json +8 -7
- package/packages/studio/src/companion-assembly.ts +1 -0
- package/packages/studio/src/domain.ts +1 -1
- package/packages/studio/src/fallback-companions.ts +3 -3
- package/packages/studio/src/feedback-server.ts +51 -0
- package/packages/studio/src/feedback-store.ts +66 -0
- package/packages/studio/src/feedback.ts +60 -0
- package/packages/studio/src/localization-node.ts +46 -0
- package/packages/studio/src/localization.ts +85 -0
- package/packages/studio/src/parameter-values.ts +43 -1
- package/packages/studio/src/parameters.ts +114 -24
- package/packages/studio/src/preview/render.ts +5 -1
- package/packages/studio/src/preview/runtime-shim.ts +49 -3
- package/packages/studio/src/programme.ts +14 -30
- package/packages/studio/src/server.ts +10 -6
- package/packages/studio/src/shared.ts +4 -2
- package/packages/studio/src/snapshot.ts +21 -132
- package/packages/studio/src/studio-preflight.ts +3 -3
- package/packages/studio/src/studio-registry.ts +50 -6
- package/packages/studio/src/style.css +223 -50
- package/packages/studio/src/ui/artifact-name.ts +8 -6
- package/packages/studio/src/ui/artifact-preview.ts +5 -4
- package/packages/studio/src/ui/code.ts +17 -16
- package/packages/studio/src/ui/comments.ts +234 -0
- package/packages/studio/src/ui/dropdown.ts +68 -0
- package/packages/studio/src/ui/i18n.ts +109 -0
- package/packages/studio/src/ui/icons.ts +6 -0
- package/packages/studio/src/ui/library.ts +76 -65
- package/packages/studio/src/ui/main.ts +223 -211
- package/packages/studio/src/ui/overlay.ts +12 -8
- package/packages/studio/src/ui/scrub-preview.ts +110 -0
- package/packages/studio/src/ui/stage.ts +93 -29
- package/packages/studio/src/ui/timeline.ts +190 -118
- package/packages/studio/start.ts +41 -22
- package/packages/studio-adapter/README.md +130 -11
- package/packages/studio-adapter/src/index.ts +100 -13
- package/packages/temporal/README.md +6 -6
- package/packages/temporal/package.json +1 -1
- package/packages/temporal/src/component.ts +5 -6
- package/packages/temporal/src/index.ts +8 -6
- package/packages/temporal/src/location.ts +11 -11
- package/packages/temporal/src/projection.ts +19 -19
- package/packages/temporal/src/rational.ts +4 -4
- package/packages/temporal-markup/EDITING.md +2 -2
- package/packages/temporal-markup/README.md +27 -11
- package/packages/temporal-markup/package.json +1 -1
- package/packages/temporal-markup/src/index.ts +20 -25
- package/packages/temporal-markup/src/space.ts +10 -41
- package/packages/timeline/README.md +31 -0
- package/packages/{semantic-track → timeline}/package.json +1 -1
- package/packages/timeline/src/activation.ts +8 -0
- package/packages/timeline/src/component.ts +24 -0
- package/packages/timeline/src/identity.ts +60 -0
- package/packages/timeline/src/index.ts +6 -0
- package/packages/{semantic-track → timeline}/src/location.ts +20 -20
- package/packages/timeline/src/manifest.ts +39 -0
- package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
- package/packages/timeline/src/types.ts +24 -0
- package/packages/timeline-author/README.md +68 -0
- package/packages/{speech-track → timeline-author}/package.json +6 -4
- package/packages/timeline-author/src/activation.ts +22 -0
- package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
- package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
- package/packages/timeline-author/src/index.ts +7 -0
- package/packages/timeline-author/src/manifest.ts +78 -0
- package/packages/timeline-author/src/program.ts +107 -0
- package/packages/timeline-author/src/surface.ts +46 -0
- package/packages/timeline-author/src/types.ts +6 -0
- package/packages/typography-track/README.md +4 -4
- package/packages/typography-track/package.json +1 -1
- package/packages/typography-track/src/component.ts +4 -4
- package/packages/typography-track/src/fragment.ts +4 -3
- package/packages/typography-track/src/manifest.ts +11 -9
- package/packages/typography-track/src/program.ts +15 -15
- package/packages/typography-track/src/surface.ts +17 -18
- package/packages/video-cli/README.md +4 -1
- package/packages/video-cli/package.json +2 -1
- package/packages/video-cli/src/creation.ts +14 -4
- package/packages/video-cli/src/index.ts +1 -1
- package/packages/video-cli/src/studio-distribution.ts +2 -1
- package/packages/volcengine-matting/README.md +3 -3
- package/packages/whisperx/README.md +1 -1
- package/services/whisperx/README.md +14 -0
- package/services/whisperx/pyproject.toml +2 -0
- package/services/whisperx/uv.lock +20 -20
- package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
- package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
- package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
- package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
- package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
- package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
- package/packages/provider-kie/README.md +0 -134
- package/packages/provider-kie/package.json +0 -43
- package/packages/provider-kie/src/activation.ts +0 -71
- package/packages/provider-kie/src/index.ts +0 -10
- package/packages/provider-kie/src/mapping.ts +0 -182
- package/packages/provider-kie/src/provider.ts +0 -657
- package/packages/provider-kie/src/routes.ts +0 -150
- package/packages/provider-xiaomi-mimo/README.md +0 -32
- package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
- package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
- package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
- package/packages/runtime/src/environment.ts +0 -6
- package/packages/semantic-track/README.md +0 -21
- package/packages/semantic-track/src/activation.ts +0 -8
- package/packages/semantic-track/src/component.ts +0 -24
- package/packages/semantic-track/src/identity.ts +0 -58
- package/packages/semantic-track/src/index.ts +0 -6
- package/packages/semantic-track/src/manifest.ts +0 -38
- package/packages/semantic-track/src/types.ts +0 -26
- package/packages/speech-track/README.md +0 -51
- package/packages/speech-track/src/activation.ts +0 -19
- package/packages/speech-track/src/index.ts +0 -7
- package/packages/speech-track/src/manifest.ts +0 -73
- package/packages/speech-track/src/program.ts +0 -64
- package/packages/speech-track/src/surface.ts +0 -35
- package/packages/speech-track/src/types.ts +0 -6
- package/packages/speech-track-studio/README.md +0 -3
- package/packages/speech-track-studio/package.json +0 -14
- package/packages/speech-track-studio/src/activation.ts +0 -7
- package/packages/speech-track-studio/src/index.ts +0 -40
- /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
- /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
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 { createFishAudioSpeechAudioFragment } from "./fragment.js";
|
|
16
|
+
import { fishAudioSpeechEndpoints, sealFishAudioSpeechRequestDraft } 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
|
+
function voiceReference(reference: SurfaceResolvedReference, subject: string): SurfaceResolvedReference {
|
|
68
|
+
if (!sameType(reference.type, artifactTypes.blob)) throw new Error(`${subject} must reference an audio Resource`);
|
|
69
|
+
const value = reference.record?.value;
|
|
70
|
+
if (value !== undefined && (value.kind !== "blob" || !value.mediaType.startsWith("audio/"))) {
|
|
71
|
+
throw new Error(`${subject} must reference audio media`);
|
|
72
|
+
}
|
|
73
|
+
return reference;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function body(element: StructuredElement): string {
|
|
77
|
+
if (element.children.some((child) => child.kind === "element")) {
|
|
78
|
+
throw new Error(`${element.name} accepts instruction text only`);
|
|
79
|
+
}
|
|
80
|
+
const lines = element.children.map((child) => child.kind === "text" ? child.value : "").join("")
|
|
81
|
+
.replaceAll("\r\n", "\n").split("\n");
|
|
82
|
+
while (lines[0]?.trim() === "") lines.shift();
|
|
83
|
+
while (lines.at(-1)?.trim() === "") lines.pop();
|
|
84
|
+
const indents = lines.filter((line) => line.trim()).map((line) => /^\s*/u.exec(line)?.[0].length ?? 0);
|
|
85
|
+
const indent = indents.length === 0 ? 0 : Math.min(...indents);
|
|
86
|
+
const value = lines.map((line) => line.slice(indent).trimEnd()).join("\n").trim();
|
|
87
|
+
if (value.length === 0) {
|
|
88
|
+
throw new Error(`${element.name} requires a voice description in its body`);
|
|
89
|
+
}
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function output(
|
|
94
|
+
element: StructuredElement,
|
|
95
|
+
endpoint: ExactModelEndpoint,
|
|
96
|
+
draft: ReturnType<typeof sealFishAudioSpeechRequestDraft>,
|
|
97
|
+
outputName: "reference" | "audio",
|
|
98
|
+
text: readonly { readonly input: ExactModelTextInput; readonly source: SurfaceResolvedReference }[],
|
|
99
|
+
media: readonly { readonly input: ExactModelMediaInput; readonly source: SurfaceResolvedReference }[] = [],
|
|
100
|
+
) {
|
|
101
|
+
const id = stringAttribute(element, "id");
|
|
102
|
+
const draftId = `${id}.draft`;
|
|
103
|
+
const records: Array<{
|
|
104
|
+
readonly id: string;
|
|
105
|
+
readonly type: SurfaceResolvedReference["type"];
|
|
106
|
+
readonly value: { readonly kind: "inline"; readonly value: CanonicalValue };
|
|
107
|
+
readonly range: StructuredElement["range"];
|
|
108
|
+
}> = [{
|
|
109
|
+
id: draftId,
|
|
110
|
+
type: endpoint.draftType,
|
|
111
|
+
value: { kind: "inline", value: draft as unknown as CanonicalValue },
|
|
112
|
+
range: element.range,
|
|
113
|
+
}];
|
|
114
|
+
const inputs: Record<string, SurfaceResolvedReference["ref"] | { readonly kind: "record"; readonly id: string }> = {
|
|
115
|
+
draft: { kind: "record", id: draftId },
|
|
116
|
+
};
|
|
117
|
+
for (const item of text) inputs[exactModelTextInputName(item.input.name)] = item.source.ref;
|
|
118
|
+
for (const item of media) {
|
|
119
|
+
const binding = endpoint.mediaBindings[item.input.port];
|
|
120
|
+
if (binding === undefined) throw new Error(`${endpoint.ports.model} has no media port ${item.input.port}`);
|
|
121
|
+
const port = generationPort(endpoint.ports, item.input.port);
|
|
122
|
+
if (port.value.kind !== "media") throw new Error(`${endpoint.ports.model} port ${item.input.port} is not media`);
|
|
123
|
+
const names = exactModelMediaInputNames(item.input.name);
|
|
124
|
+
const bindingId = `${id}.${item.input.name}.binding`;
|
|
125
|
+
records.push({
|
|
126
|
+
id: bindingId,
|
|
127
|
+
type: binding.type,
|
|
128
|
+
value: {
|
|
129
|
+
kind: "inline",
|
|
130
|
+
value: sealGenerationMediaBinding(port as GenerationMediaPort, { role: "audio" }) as unknown as CanonicalValue,
|
|
131
|
+
},
|
|
132
|
+
range: element.range,
|
|
133
|
+
});
|
|
134
|
+
inputs[names.binding] = { kind: "record", id: bindingId };
|
|
135
|
+
inputs[names.artifact] = item.source.ref;
|
|
136
|
+
}
|
|
137
|
+
const fragment = createFishAudioSpeechAudioFragment(
|
|
138
|
+
endpoint,
|
|
139
|
+
media.map((item) => item.input),
|
|
140
|
+
text.map((item) => item.input),
|
|
141
|
+
);
|
|
142
|
+
return {
|
|
143
|
+
records,
|
|
144
|
+
components: [{
|
|
145
|
+
id,
|
|
146
|
+
fragment: fragment.id,
|
|
147
|
+
inputs,
|
|
148
|
+
outputs: { audio: `${id}.${outputName}` },
|
|
149
|
+
range: element.range,
|
|
150
|
+
}],
|
|
151
|
+
fragments: [fragment],
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function speechInput(
|
|
156
|
+
element: StructuredElement,
|
|
157
|
+
resolveReference: (path: string) => SurfaceResolvedReference | undefined,
|
|
158
|
+
) {
|
|
159
|
+
return {
|
|
160
|
+
input: { name: "speech", port: "text" },
|
|
161
|
+
source: speechText(resolved(element, "speech", resolveReference), `${element.name}.speech`),
|
|
162
|
+
} as const;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export const decodeFishAudioVoiceDesignSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
166
|
+
attributes(element, ["id", "speech"]);
|
|
167
|
+
return output(
|
|
168
|
+
element,
|
|
169
|
+
fishAudioSpeechEndpoints.voiceDesign,
|
|
170
|
+
sealFishAudioSpeechRequestDraft("voice-design-1", { voiceDescription: [body(element)] }),
|
|
171
|
+
"reference",
|
|
172
|
+
[speechInput(element, resolveReference)],
|
|
173
|
+
);
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export const decodeFishAudioVoiceCloneSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
177
|
+
attributes(element, ["id", "speech", "voice"]);
|
|
178
|
+
if (element.children.some((child) => child.kind === "element" || child.value.trim().length > 0)) {
|
|
179
|
+
throw new Error(`${element.name} accepts speech and voice references, with no body input`);
|
|
180
|
+
}
|
|
181
|
+
return output(
|
|
182
|
+
element,
|
|
183
|
+
fishAudioSpeechEndpoints.voiceClone,
|
|
184
|
+
sealFishAudioSpeechRequestDraft("voice-clone", {}),
|
|
185
|
+
"audio",
|
|
186
|
+
[speechInput(element, resolveReference)],
|
|
187
|
+
[{
|
|
188
|
+
input: { name: "voice", port: "voiceReference" },
|
|
189
|
+
source: voiceReference(resolved(element, "voice", resolveReference), `${element.name}.voice`),
|
|
190
|
+
}],
|
|
191
|
+
);
|
|
192
|
+
};
|
|
@@ -15,5 +15,15 @@ schemas, validators and graph facets. Generated sets are atomic Products: a Prov
|
|
|
15
15
|
returned bytes in an ResourceStore and returns typed Blob references rather than transient URLs.
|
|
16
16
|
|
|
17
17
|
This package does not choose a model, Provider, credential, queue or retry policy. Model packages
|
|
18
|
-
declare exact request Capabilities; Endpoint packages
|
|
18
|
+
declare exact request Capabilities; selected Endpoint packages implement those
|
|
19
19
|
Capabilities in a selected Runtime Profile.
|
|
20
|
+
|
|
21
|
+
## Reference fields in resource transport
|
|
22
|
+
|
|
23
|
+
A service may consume per-media metadata while preparing a URL rather than in its generation JSON.
|
|
24
|
+
Media wire mappings (`url`, `urlArray`, `itemObject`) may declare `resourceFields: ["fieldName"]`.
|
|
25
|
+
`compileWireRequest` supplies those present item fields as the second argument to its URL resolver;
|
|
26
|
+
`itemObject.fieldKeys` separately maps fields into the generation body. Port coverage checks both
|
|
27
|
+
paths against the declared media fields. False, zero and empty strings remain values; omitted fields
|
|
28
|
+
remain absent. The resolver implements the service protocol; this package knows no particular
|
|
29
|
+
service or classification. Providers using custom transports carry those fields through that boundary.
|
|
@@ -2,10 +2,16 @@ import { canonicalize } from "@hypit/protocol";
|
|
|
2
2
|
import type { BlobRef, CanonicalValue, CapabilityRef } from "@hypit/protocol";
|
|
3
3
|
|
|
4
4
|
import { isMediaPort } from "./ports.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { GenerationMediaValue, GenerationPortTable } from "./ports.js";
|
|
6
6
|
import { presentPorts } from "./request.js";
|
|
7
7
|
import type { GenerationRequest } from "./request.js";
|
|
8
8
|
|
|
9
|
+
/** Per-reference fields consumed by the service's resource transport rather than its generation body. */
|
|
10
|
+
export type GenerationArtifactUrlResolver = (
|
|
11
|
+
artifact: BlobRef,
|
|
12
|
+
fields?: Readonly<Record<string, string | number | boolean>>,
|
|
13
|
+
) => Promise<string>;
|
|
14
|
+
|
|
9
15
|
/**
|
|
10
16
|
* How one service names the fields of one model's declared input ports.
|
|
11
17
|
*
|
|
@@ -13,8 +19,6 @@ import type { GenerationRequest } from "./request.js";
|
|
|
13
19
|
* Provider package therefore never imports a model package: the model owns what
|
|
14
20
|
* it eats, the service owns what it calls that on the wire.
|
|
15
21
|
*/
|
|
16
|
-
export type GenerationArtifactUrlResolver = (artifact: BlobRef) => Promise<string>;
|
|
17
|
-
|
|
18
22
|
export type GenerationFieldMapping =
|
|
19
23
|
/** One scalar written as-is. */
|
|
20
24
|
| { readonly as: "value"; readonly field: string; readonly whenAbsent?: CanonicalValue }
|
|
@@ -23,14 +27,15 @@ export type GenerationFieldMapping =
|
|
|
23
27
|
/** Several scalars written as one array. */
|
|
24
28
|
| { readonly as: "valueArray"; readonly field: string; readonly whenAbsent?: CanonicalValue }
|
|
25
29
|
/** One media item written as a resolved URL. */
|
|
26
|
-
| { readonly as: "url"; readonly field: string; readonly whenAbsent?: CanonicalValue }
|
|
30
|
+
| { readonly as: "url"; readonly field: string; readonly resourceFields?: readonly string[]; readonly whenAbsent?: CanonicalValue }
|
|
27
31
|
/** Several media items written as one array of resolved URLs. */
|
|
28
|
-
| { readonly as: "urlArray"; readonly field: string; readonly whenAbsent?: CanonicalValue }
|
|
32
|
+
| { readonly as: "urlArray"; readonly field: string; readonly resourceFields?: readonly string[]; readonly whenAbsent?: CanonicalValue }
|
|
29
33
|
/** Media items written as objects carrying the resolved URL and their item fields. */
|
|
30
34
|
| {
|
|
31
35
|
readonly as: "itemObject";
|
|
32
36
|
readonly field: string;
|
|
33
37
|
readonly urlKey: string;
|
|
38
|
+
readonly resourceFields?: readonly string[];
|
|
34
39
|
readonly fieldKeys: Readonly<Record<string, string>>;
|
|
35
40
|
readonly whenAbsent?: CanonicalValue;
|
|
36
41
|
};
|
|
@@ -95,11 +100,9 @@ export function selectWireModelForRequest(
|
|
|
95
100
|
return selectWireModel(mapping, present);
|
|
96
101
|
}
|
|
97
102
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
): Promise<string[]> {
|
|
102
|
-
return await Promise.all(values.map((item) => resolve(item.artifact)));
|
|
103
|
+
function resourceFields(item: GenerationMediaValue, names: readonly string[] = []) {
|
|
104
|
+
return Object.fromEntries(names.filter((name) => item.fields?.[name] !== undefined)
|
|
105
|
+
.map((name) => [name, item.fields![name]!]));
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
/**
|
|
@@ -127,13 +130,15 @@ export async function compileWireRequest(
|
|
|
127
130
|
} else if (field.as === "valueArray") {
|
|
128
131
|
input[field.field] = supplied as readonly CanonicalValue[];
|
|
129
132
|
} else if (field.as === "url") {
|
|
130
|
-
|
|
133
|
+
const item = supplied[0] as GenerationMediaValue;
|
|
134
|
+
input[field.field] = await resolve(item.artifact, resourceFields(item, field.resourceFields));
|
|
131
135
|
} else if (field.as === "urlArray") {
|
|
132
|
-
input[field.field] = await
|
|
136
|
+
input[field.field] = await Promise.all((supplied as readonly GenerationMediaValue[])
|
|
137
|
+
.map((item) => resolve(item.artifact, resourceFields(item, field.resourceFields))));
|
|
133
138
|
} else {
|
|
134
139
|
const media = supplied as readonly GenerationMediaValue[];
|
|
135
140
|
input[field.field] = await Promise.all(media.map(async (item) => ({
|
|
136
|
-
[field.urlKey]: await resolve(item.artifact),
|
|
141
|
+
[field.urlKey]: await resolve(item.artifact, resourceFields(item, field.resourceFields)),
|
|
137
142
|
...Object.fromEntries(Object.entries(field.fieldKeys)
|
|
138
143
|
.filter(([source]) => item.fields?.[source] !== undefined)
|
|
139
144
|
.map(([source, target]) => [target, item.fields![source] as CanonicalValue])),
|
|
@@ -178,30 +183,23 @@ export function assertMappingCoversPorts(
|
|
|
178
183
|
if (isMediaPort(port)) {
|
|
179
184
|
const media = port.value;
|
|
180
185
|
const itemFields = media.itemFields ?? [];
|
|
181
|
-
|
|
182
|
-
assert(field.as === "itemObject", `${subject} must use itemObject because the port carries item fields`);
|
|
183
|
-
for (const item of itemFields) {
|
|
184
|
-
if (item.optional === true) continue;
|
|
185
|
-
assert(field.fieldKeys[item.name] !== undefined,
|
|
186
|
-
`${subject} does not map required item field ${item.name}`);
|
|
187
|
-
}
|
|
188
|
-
Object.keys(field.fieldKeys).forEach((name) => assert(
|
|
189
|
-
itemFields.some((item) => item.name === name),
|
|
190
|
-
`${subject} maps unknown item field ${name}`,
|
|
191
|
-
));
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
assert(media.accepts.length === 1,
|
|
186
|
+
assert(itemFields.length > 0 || media.accepts.length === 1,
|
|
195
187
|
`${subject} accepts ${media.accepts.join(", ")}; declare one port per media role so each maps to one wire field`);
|
|
196
188
|
assert(field.as === "url" || field.as === "urlArray" || field.as === "itemObject",
|
|
197
189
|
`${subject} must resolve media to a URL`);
|
|
198
190
|
if (field.as === "url") {
|
|
199
191
|
assert(port.maxItems === 1, `${subject} uses url but the port accepts up to ${port.maxItems} items`);
|
|
200
192
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
193
|
+
const mappedFields = [
|
|
194
|
+
...(field.resourceFields ?? []),
|
|
195
|
+
...(field.as === "itemObject" ? Object.keys(field.fieldKeys) : []),
|
|
196
|
+
];
|
|
197
|
+
for (const item of itemFields) {
|
|
198
|
+
if (item.optional !== true) assert(mappedFields.includes(item.name),
|
|
199
|
+
`${subject} does not map required item field ${item.name}`);
|
|
204
200
|
}
|
|
201
|
+
for (const name of mappedFields) assert(itemFields.some((item) => item.name === name),
|
|
202
|
+
`${subject} maps unknown item field ${name}`);
|
|
205
203
|
continue;
|
|
206
204
|
}
|
|
207
205
|
if (port.maxItems > 1) {
|
|
@@ -5,8 +5,7 @@ Exact model/compute contracts for GPT Image 2 requests.
|
|
|
5
5
|
One closed Port Table accepts the supported scalar settings and optional reference images. Runtime-
|
|
6
6
|
produced references remain explicit Blob edges: the model-owned Draft is bound one edge at a time,
|
|
7
7
|
then finalized into the only `GenerationRequest` a Provider can receive. The package owns model
|
|
8
|
-
semantics but no API key, Provider selection, queue or network code.
|
|
9
|
-
one optional Runtime implementation.
|
|
8
|
+
semantics but no API key, Provider selection, queue or network code. The selected Provider implements its exact capability.
|
|
10
9
|
|
|
11
10
|
Provider-specific combination limits are checked by that Provider before any paid operation. They
|
|
12
11
|
do not narrow this model-owned vocabulary or leak into author source.
|
|
@@ -4,8 +4,7 @@ Exact author/compute contracts and package-owned author Surfaces for Grok Imagin
|
|
|
4
4
|
|
|
5
5
|
It exposes the standard and 1.5-preview models as distinct Surfaces. Each request is nominally typed and
|
|
6
6
|
validated before yielding an ordinary video Artifact. The package declares the model
|
|
7
|
-
choice; it does not route to another model or access a Provider.
|
|
8
|
-
optional Runtime implementation.
|
|
7
|
+
choice; it does not route to another model or access a Provider. The selected Provider implements its exact capability.
|
|
9
8
|
|
|
10
9
|
```xml
|
|
11
10
|
<grok:Video id="clip" prompt={prompt} duration="6" aspect-ratio="9:16" resolution="720p">
|
|
@@ -55,13 +55,17 @@ This keeps actual video available to the renderer's exact source-frame preparati
|
|
|
55
55
|
CSS is scoped to the generated program root with `@scope`; `:scope` styles that root. The HTML can
|
|
56
56
|
contain arbitrary local structure, SVG, internal stacking, masks and backdrop filters. The optional
|
|
57
57
|
`setup` string is a JavaScript function body with `root` and `data` arguments. It returns a synchronous
|
|
58
|
-
`render(localFrame)` function, evaluated on initial load and
|
|
59
|
-
|
|
58
|
+
`render(localFrame)` function, evaluated on initial load and active `hf-seek` events. Outside the
|
|
59
|
+
Present's lifetime, the dispatcher settles the boundary pose once instead of repeatedly updating
|
|
60
|
+
an invisible program. Active seeks always redraw, including the same frame after resources become
|
|
61
|
+
ready, and seeking back into the Present computes its requested pose directly. Prepare stable
|
|
62
|
+
objects in `setup`; express animation state as a function of frame and inputs so any worker can
|
|
63
|
+
begin at any frame. Async work belongs to
|
|
60
64
|
material preparation before rendering; browser resources belong in the program's declared artifacts.
|
|
61
65
|
Use `hyperframesResourceUri(artifact.resource)` in resource-bearing markup or CSS.
|
|
62
66
|
|
|
63
67
|
Ordinary child sampling follows the Present clock. Reframing the parent leaves source playback
|
|
64
|
-
unchanged. `
|
|
68
|
+
unchanged. `projectTimelineMedia` from `@hypit/hypit/timeline` gives a component selected prepared
|
|
65
69
|
clips with their exact program and source spans. Speech audio is an independently selected Track.
|
|
66
70
|
|
|
67
71
|
`program.format` is explicit: this backend reports an unsupported format rather than interpreting
|
|
@@ -63,13 +63,22 @@ export function browserProgramScript(entries: readonly {
|
|
|
63
63
|
const render = entry.program.setup === undefined ? () => {} :
|
|
64
64
|
new Function('root', 'data', entry.program.setup)(root, entry.program.data);
|
|
65
65
|
if (typeof render !== 'function') throw new Error('Browser program setup must return render(localFrame).');
|
|
66
|
-
return { ...entry, render };
|
|
66
|
+
return { ...entry, render, region: undefined };
|
|
67
67
|
} catch (error) { fail(error); return { ...entry, render: () => {} }; }
|
|
68
68
|
});
|
|
69
69
|
const apply = time => {
|
|
70
70
|
const frame = Math.round(Number(time || 0) * ${numerator} / ${denominator});
|
|
71
71
|
for (const entry of renders) {
|
|
72
|
-
|
|
72
|
+
const local = frame - entry.startFrame;
|
|
73
|
+
const region = local < 0 ? 'before' : local >= entry.durationFrames ? 'after' : 'active';
|
|
74
|
+
// Preserve the initial/boundary pose, but stop updating an invisible
|
|
75
|
+
// program at the same clamped endpoint. Active seeks always render,
|
|
76
|
+
// including repeated frame 0 after images/fonts finish loading.
|
|
77
|
+
if (region !== 'active' && entry.region === region) continue;
|
|
78
|
+
try {
|
|
79
|
+
entry.render(Math.max(0, Math.min(entry.durationFrames, local)));
|
|
80
|
+
entry.region = region;
|
|
81
|
+
}
|
|
73
82
|
catch (error) { fail(error); }
|
|
74
83
|
}
|
|
75
84
|
};
|
|
@@ -461,7 +461,7 @@ function renderVisualPresent(
|
|
|
461
461
|
emittedFilterIds,
|
|
462
462
|
stableId,
|
|
463
463
|
});
|
|
464
|
-
return `<div class="clip hypit-visual-present" data-hypit-track-id="${escapeHtml(track.id)}" data-hypit-present-id="${escapeHtml(present.id)}" data-hypit-stack-order="${present.stacking.order}" data-hypit-stack-tie="${escapeHtml(present.stacking.tieBreak)}" data-track-index="${stackIndex}" data-start="${start}" data-duration="${duration}" style="position:absolute;inset:0;z-index:${stackIndex};overflow:hidden;pointer-events:none">${contents}</div>`;
|
|
464
|
+
return `<div class="clip hypit-visual-present" data-hypit-track-id="${escapeHtml(track.id)}" data-hypit-present-id="${escapeHtml(present.id)}" data-hypit-stack-order="${present.stacking.order}" data-hypit-stack-tie="${escapeHtml(present.stacking.tieBreak)}" data-track-index="${stackIndex}" data-start="${start}" data-duration="${duration}" style="position:absolute;inset:0;z-index:${stackIndex};overflow:hidden;pointer-events:none">${present.visibility === undefined ? contents : `<div data-hypit-visibility="${escapeHtml(JSON.stringify(present.visibility))}" style="position:absolute;inset:0">${contents}</div>`}</div>`;
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
function renderAnimationRules(track: VisualTrack, present: VisualPresent, stableId: StableDomId): string[] {
|
|
@@ -667,6 +667,18 @@ function emitHtml(composition: Composition, programSpace: ProgramSpace): string
|
|
|
667
667
|
}]));
|
|
668
668
|
const programCss = programs.map(entry => `@scope (#${entry.id}) { ${entry.program.css ?? ""} }`).join("\n");
|
|
669
669
|
const programRuntime = programs.length === 0 ? "" : `<script>${browserProgramScript(programs, numerator, denominator)}</script>`;
|
|
670
|
+
const visibilityRuntime = visuals.some(({ present }) => present.visibility !== undefined) ? `<script>
|
|
671
|
+
(() => {
|
|
672
|
+
const entries = [...document.querySelectorAll('[data-hypit-visibility]')].map(element => ({ element, spans: JSON.parse(element.dataset.hypitVisibility) }));
|
|
673
|
+
const apply = time => {
|
|
674
|
+
const frame = Math.round(Number(time || 0) * ${numerator} / ${denominator});
|
|
675
|
+
// A presentation mask controls painting, not layout or animation existence.
|
|
676
|
+
// display:none removes CSS animations and prevents hidden text from being measured.
|
|
677
|
+
for (const { element, spans } of entries) element.style.opacity = spans.some(s => frame >= s.startFrame && frame < s.endFrameExclusive) ? '' : '0';
|
|
678
|
+
};
|
|
679
|
+
apply(0);
|
|
680
|
+
window.addEventListener('hf-seek', event => apply(event.detail?.time));
|
|
681
|
+
})();</script>` : "";
|
|
670
682
|
const duration = frameSeconds(programSpaceFrameCount(programSpace), numerator, denominator);
|
|
671
683
|
const fps = fpsRational(numerator, denominator);
|
|
672
684
|
const frameCount = programSpaceFrameCount(programSpace);
|
|
@@ -693,7 +705,8 @@ function emitHtml(composition: Composition, programSpace: ProgramSpace): string
|
|
|
693
705
|
<body>
|
|
694
706
|
<div data-composition-id="${escapeHtml(composition.id)}" data-start="0" data-no-timeline data-width="${composition.canvas.width}" data-height="${composition.canvas.height}" data-duration="${duration}" data-fps="${fps}" data-hypit-frame-count="${frameCount}">
|
|
695
707
|
${visualHtml}
|
|
696
|
-
</div>${programRuntime}
|
|
708
|
+
</div>${programRuntime}
|
|
709
|
+
${visibilityRuntime}${animationRuntime}${textRuntime}
|
|
697
710
|
</body>
|
|
698
711
|
</html>
|
|
699
712
|
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Emoji Reveal
|
|
2
2
|
|
|
3
|
-
The Track Surface accepts `
|
|
4
|
-
|
|
3
|
+
The Track Surface accepts `timeline={program.timeline}`. The same Timeline supports authored
|
|
4
|
+
positions and, where prepared Takes supply evidence, Script Selections and Moments. Shared `at`
|
|
5
5
|
inputs accept a Moment or a time such as `2s`; `at` with `for` produces a Window where required.
|
|
6
6
|
|
|
7
7
|
Reusable Hypit author vocabulary for a top-of-frame icon answer strip.
|
|
@@ -21,7 +21,7 @@ answers remain and later slots remain unanswered.
|
|
|
21
21
|
|
|
22
22
|
<emoji:Style id="emoji-strip" recipe={styles.emoji-strip}/>
|
|
23
23
|
|
|
24
|
-
<emoji:Track id="rules"
|
|
24
|
+
<emoji:Track id="rules" timeline={speech.timeline} canvas={vertical}
|
|
25
25
|
style={emoji-strip} placeholder={question-icon} during="program">
|
|
26
26
|
<emoji:Item id="manifest" icon={manifest-icon} preset="true"/>
|
|
27
27
|
<emoji:Item id="real-estate" icon={real-estate-icon} at={story.moment.real-estate}/>
|
|
@@ -30,7 +30,7 @@ answers remain and later slots remain unanswered.
|
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
`Selection`, `Segment`, numeric instants and a `boundary` fallback are deliberately not part of an
|
|
33
|
-
Item's vocabulary. The component consumes
|
|
33
|
+
Item's vocabulary. The component consumes the shared `Timeline`, the projected outer Window and the
|
|
34
34
|
projected Instants; it does not interpret Script semantics itself and has no Studio dependency.
|
|
35
35
|
|
|
36
36
|
The bundled preview icons come from [Tabler Icons](https://tabler.io/icons), distributed under the
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@hypit/narrative": "workspace:*",
|
|
15
15
|
"@hypit/program-space": "workspace:*",
|
|
16
16
|
"@hypit/protocol": "workspace:*",
|
|
17
|
-
"@hypit/
|
|
17
|
+
"@hypit/timeline": "workspace:*",
|
|
18
18
|
"@hypit/spatial": "workspace:*",
|
|
19
19
|
"@hypit/svs": "workspace:*",
|
|
20
20
|
"@hypit/temporal": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
2
|
import type { ComponentPackage } from "@hypit/component-kit";
|
|
2
3
|
import { canonicalize } from "@hypit/protocol";
|
|
3
4
|
import type { BlobRef, StoredValue } from "@hypit/protocol";
|
|
4
|
-
import type { ProgramSpace } from "@hypit/program-space";
|
|
5
5
|
import type { CanvasSpace } from "@hypit/spatial";
|
|
6
6
|
import type { TemporalInstant, TemporalWindow } from "@hypit/temporal";
|
|
7
7
|
|
|
@@ -23,7 +23,7 @@ export const emojiRevealComponent = {
|
|
|
23
23
|
producers: [
|
|
24
24
|
{ producer: emojiRevealProducers.createSet, handler: () => ({ outputs: { set: output(createEmojiRevealSet()) }, needs: {} }) },
|
|
25
25
|
{ producer: emojiRevealProducers.appendItem, handler: ({ inputs }) => ({ outputs: { set: output(appendEmojiRevealItem(
|
|
26
|
-
inline<EmojiRevealSet>(inputs.set?.value, "EmojiRevealSet"), inline<
|
|
26
|
+
inline<EmojiRevealSet>(inputs.set?.value, "EmojiRevealSet"), inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
27
27
|
inline<EmojiRevealItemSpec>(inputs.spec?.value, "EmojiRevealItemSpec"), blob(inputs.icon?.value, "Emoji Reveal icon"),
|
|
28
28
|
inline<TemporalInstant>(inputs.activation?.value, "TemporalInstant"),
|
|
29
29
|
)) }, needs: {} }) },
|
|
@@ -32,12 +32,12 @@ export const emojiRevealComponent = {
|
|
|
32
32
|
inline<EmojiRevealItemSpec>(inputs.spec?.value, "EmojiRevealItemSpec"), blob(inputs.icon?.value, "Emoji Reveal icon"),
|
|
33
33
|
)) }, needs: {} }) },
|
|
34
34
|
{ producer: emojiRevealProducers.finalize, handler: ({ inputs }) => ({ outputs: { program: output(finalizeEmojiReveal(
|
|
35
|
-
inline<EmojiRevealHeader>(inputs.header?.value, "EmojiRevealHeader"), inline<
|
|
35
|
+
inline<EmojiRevealHeader>(inputs.header?.value, "EmojiRevealHeader"), inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
36
36
|
inline<TemporalWindow>(inputs.outer?.value, "TemporalWindow"), inline<EmojiRevealStyle>(inputs.style?.value, "EmojiRevealStyle"),
|
|
37
37
|
blob(inputs.placeholder?.value, "Emoji Reveal placeholder"), inline<EmojiRevealSet>(inputs.set?.value, "EmojiRevealSet"),
|
|
38
38
|
)) }, needs: {} }) },
|
|
39
39
|
{ producer: emojiRevealProducers.render, handler: ({ inputs }) => ({ outputs: { track: output(renderEmojiReveal(
|
|
40
|
-
inline<CanvasSpace>(inputs.canvas?.value, "CanvasSpace"), inline<
|
|
40
|
+
inline<CanvasSpace>(inputs.canvas?.value, "CanvasSpace"), inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
41
41
|
inline<EmojiRevealProgram>(inputs.program?.value, "EmojiRevealProgram"),
|
|
42
42
|
)) }, needs: {} }) },
|
|
43
43
|
],
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
2
|
+
|
|
2
3
|
import { compositionTypes } from "@hypit/composition";
|
|
3
4
|
import { artifactTypes } from "@hypit/artifact";
|
|
4
5
|
import { sealGraphFragment } from "@hypit/elaborator";
|
|
@@ -29,23 +30,23 @@ export function createEmojiRevealFragment(items: readonly EmojiRevealFragmentIte
|
|
|
29
30
|
: emojiRevealProducers.appendItem, inputs: {
|
|
30
31
|
set: operation(current), spec: input(item.specName), icon: input(item.iconName),
|
|
31
32
|
...(item.activationName === undefined ? {} : {
|
|
32
|
-
|
|
33
|
+
timeline: input("timeline"), activation: input(item.activationName),
|
|
33
34
|
}),
|
|
34
35
|
}, result: { kind: "output", name: "set" } });
|
|
35
36
|
current = id;
|
|
36
37
|
});
|
|
37
38
|
operations.push(
|
|
38
39
|
{ id: "emoji:program", producer: emojiRevealProducers.finalize, inputs: {
|
|
39
|
-
header: input("header"),
|
|
40
|
+
header: input("header"), timeline: input("timeline"), outer: input("outer"), style: input("style"),
|
|
40
41
|
placeholder: input("placeholder"), set: operation(current),
|
|
41
42
|
}, result: { kind: "output", name: "program" } },
|
|
42
43
|
{ id: "emoji:track", producer: emojiRevealProducers.render, inputs: {
|
|
43
|
-
canvas: input("canvas"),
|
|
44
|
+
canvas: input("canvas"), timeline: input("timeline"), program: operation("emoji:program"),
|
|
44
45
|
}, result: { kind: "output", name: "track" } },
|
|
45
46
|
);
|
|
46
47
|
return sealGraphFragment({
|
|
47
48
|
inputs: [
|
|
48
|
-
{ name: "header", type: emojiRevealTypes.header }, { name: "
|
|
49
|
+
{ name: "header", type: emojiRevealTypes.header }, { name: "timeline", type: timelineTypes.track },
|
|
49
50
|
{ name: "canvas", type: spatialTypes.canvas }, { name: "outer", type: temporalTypes.window }, { name: "style", type: emojiRevealTypes.style },
|
|
50
51
|
{ name: "placeholder", type: artifactTypes.blob },
|
|
51
52
|
...items.flatMap((item) => [
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
1
2
|
import { temporalContextAttributeVocabulary } from "@hypit/temporal-markup";
|
|
2
3
|
import { readFile } from "node:fs/promises";
|
|
3
4
|
|
|
4
5
|
import { artifactDependency, artifactTypes } from "@hypit/artifact";
|
|
5
6
|
import { compositionDependency, compositionTypes } from "@hypit/composition";
|
|
6
7
|
import { narrativeDependency, narrativeTypes } from "@hypit/narrative";
|
|
7
|
-
|
|
8
|
+
|
|
8
9
|
import type { ModuleManifest, ProducerRef, TypeRef, ValueSchema } from "@hypit/protocol";
|
|
9
|
-
import {
|
|
10
|
+
import { timelineDependency } from "@hypit/timeline";
|
|
10
11
|
import { spatialDependency, spatialTypes } from "@hypit/spatial";
|
|
11
12
|
import { svsRecipeType } from "@hypit/svs";
|
|
12
13
|
import { temporalDependency, temporalInstantSchema, temporalTypes, temporalWindowSchema } from "@hypit/temporal";
|
|
@@ -107,7 +108,7 @@ export const emojiRevealMarkupSurfaces = [
|
|
|
107
108
|
recipe: recipe.map(([name, fallback, summary]) => ({ name, required: false, fallback, summary })) },
|
|
108
109
|
],
|
|
109
110
|
example: `<emoji:Style id="emoji-strip" recipe={styles.emoji-strip}/>` ,
|
|
110
|
-
notes: ["The Style owns appearance and placement, but never
|
|
111
|
+
notes: ["The Style owns appearance and placement, but never event timing."],
|
|
111
112
|
} },
|
|
112
113
|
{ name: "track", tag: "Track", mode: "structured",
|
|
113
114
|
outputs: [emojiRevealTypes.header, emojiRevealTypes.itemSpec, temporalTypes.instantSpec, temporalTypes.windowSpec, temporalTypes.instant, temporalTypes.window, emojiRevealTypes.program, compositionTypes.visualTrack],
|
|
@@ -133,7 +134,7 @@ export const emojiRevealMarkupSurfaces = [
|
|
|
133
134
|
{ name: "program", type: emojiRevealTypes.program, summary: "The adaptive strip with its projected outer Window and fully traced Moment activations." },
|
|
134
135
|
{ name: "track", type: compositionTypes.visualTrack, summary: "That Program rendered as an ordinary VisualTrack." },
|
|
135
136
|
],
|
|
136
|
-
example: `<emoji:Track id="rules"
|
|
137
|
+
example: `<emoji:Track id="rules" timeline={speech.timeline} canvas={vertical} style={emoji-strip} placeholder={question-icon} during="program">
|
|
137
138
|
<emoji:Item id="manifest" icon={manifest-icon} preset="true"/>
|
|
138
139
|
<emoji:Item id="real-estate" icon={real-estate-icon} at={story.moment.real-estate}/>
|
|
139
140
|
<emoji:Item id="bitcoin" icon={bitcoin-icon} at={story.moment.bitcoin}/>
|
|
@@ -148,7 +149,7 @@ export const emojiRevealMarkupSurfaces = [
|
|
|
148
149
|
|
|
149
150
|
export const emojiRevealManifest: ModuleManifest = {
|
|
150
151
|
format: "hypit.module@1", name: emojiRevealModuleRef.name, version: emojiRevealModuleRef.version,
|
|
151
|
-
dependencies: [artifactDependency, narrativeDependency,
|
|
152
|
+
dependencies: [artifactDependency, narrativeDependency, timelineDependency, spatialDependency, temporalDependency, compositionDependency],
|
|
152
153
|
types: [
|
|
153
154
|
{ name: emojiRevealTypes.header.name }, { name: emojiRevealTypes.style.name },
|
|
154
155
|
{ name: emojiRevealTypes.itemSpec.name }, { name: emojiRevealTypes.set.name }, { name: emojiRevealTypes.program.name },
|
|
@@ -157,16 +158,16 @@ export const emojiRevealManifest: ModuleManifest = {
|
|
|
157
158
|
producers: [
|
|
158
159
|
{ name: emojiRevealProducers.createSet.name, inputs: [], outputs: [{ name: "set", type: emojiRevealTypes.set }], needs: [] },
|
|
159
160
|
{ name: emojiRevealProducers.appendItem.name,
|
|
160
|
-
inputs: [{ name: "set", type: emojiRevealTypes.set }, { name: "
|
|
161
|
+
inputs: [{ name: "set", type: emojiRevealTypes.set }, { name: "timeline", type: timelineTypes.track }, { name: "spec", type: emojiRevealTypes.itemSpec }, { name: "icon", type: artifactTypes.blob }, { name: "activation", type: temporalTypes.instant }],
|
|
161
162
|
outputs: [{ name: "set", type: emojiRevealTypes.set }], needs: [] },
|
|
162
163
|
{ name: emojiRevealProducers.appendPresetItem.name,
|
|
163
164
|
inputs: [{ name: "set", type: emojiRevealTypes.set }, { name: "spec", type: emojiRevealTypes.itemSpec }, { name: "icon", type: artifactTypes.blob }],
|
|
164
165
|
outputs: [{ name: "set", type: emojiRevealTypes.set }], needs: [] },
|
|
165
166
|
{ name: emojiRevealProducers.finalize.name,
|
|
166
|
-
inputs: [{ name: "header", type: emojiRevealTypes.header }, { name: "
|
|
167
|
+
inputs: [{ name: "header", type: emojiRevealTypes.header }, { name: "timeline", type: timelineTypes.track }, { name: "outer", type: temporalTypes.window }, { name: "style", type: emojiRevealTypes.style }, { name: "placeholder", type: artifactTypes.blob }, { name: "set", type: emojiRevealTypes.set }],
|
|
167
168
|
outputs: [{ name: "program", type: emojiRevealTypes.program }], needs: [] },
|
|
168
169
|
{ name: emojiRevealProducers.render.name,
|
|
169
|
-
inputs: [{ name: "canvas", type: spatialTypes.canvas }, { name: "
|
|
170
|
+
inputs: [{ name: "canvas", type: spatialTypes.canvas }, { name: "timeline", type: timelineTypes.track }, { name: "program", type: emojiRevealTypes.program }],
|
|
170
171
|
outputs: [{ name: "track", type: compositionTypes.visualTrack }], needs: [] },
|
|
171
172
|
],
|
|
172
173
|
};
|