@hypit/hypit 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/public/caption.d.ts +206 -183
- package/dist/public/composition.d.ts +25 -3
- package/dist/public/endpoint-kit.d.ts +24 -2
- package/dist/public/generation.d.ts +5 -1
- package/dist/public/hyperframes.d.ts +19 -1
- package/dist/public/narrative.d.ts +17 -3
- package/dist/public/performance.d.ts +1590 -0
- package/dist/public/program-space.d.ts +179 -32
- package/dist/public/runtime-kit.d.ts +21 -8
- package/dist/public/sound.d.ts +822 -0
- package/dist/public/speech.d.ts +41 -0
- package/dist/public/studio-adapter.d.ts +77 -15
- package/dist/public/temporal-markup.d.ts +9 -44
- package/dist/public/temporal.d.ts +37 -28
- package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
- package/examples/README.md +18 -10
- package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
- package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
- package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
- package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
- package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
- package/examples/provider-package/README.md +78 -0
- package/examples/provider-package/hypit.runtime.json +12 -0
- package/examples/provider-package/packages/provider-images/package.json +11 -0
- package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
- package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
- package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
- package/examples/semantic-composition/README.md +8 -1
- package/examples/semantic-composition/chat.svml +6 -5
- package/examples/semantic-composition/hypit.runtime.json +1 -1
- package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
- package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
- package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
- package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
- package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
- package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
- package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
- package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
- package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
- package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
- package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
- package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
- package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
- package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
- package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
- package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
- package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
- package/package.json +35 -15
- package/packages/audio-track/README.md +20 -13
- package/packages/audio-track/package.json +1 -1
- package/packages/audio-track/src/component.ts +4 -4
- package/packages/audio-track/src/fragment.ts +6 -5
- package/packages/audio-track/src/index.ts +1 -1
- package/packages/audio-track/src/manifest.ts +17 -16
- package/packages/audio-track/src/program.ts +21 -25
- package/packages/audio-track/src/surface.ts +19 -18
- package/packages/audio-track-studio/README.md +23 -0
- package/packages/audio-track-studio/src/index.ts +28 -17
- package/packages/author-kit/README.md +1 -1
- package/packages/background-removal/README.md +4 -7
- package/packages/browser-capture/package.json +1 -1
- package/packages/build-result/README.md +11 -0
- package/packages/build-result/src/decode.ts +2 -0
- package/packages/build-result/src/execution-log.ts +17 -0
- package/packages/build-result/src/index.ts +1 -0
- package/packages/build-result/src/store.ts +14 -1
- package/packages/build-result/src/types.ts +3 -0
- package/packages/build-result-s3/src/repository.ts +4 -0
- package/packages/caption/README.md +61 -73
- package/packages/caption/package.json +3 -2
- package/packages/caption/src/activation.ts +2 -2
- package/packages/caption/src/component.ts +20 -5
- package/packages/caption/src/display.ts +3 -18
- package/packages/caption/src/fragment.ts +3 -7
- package/packages/caption/src/index.ts +6 -5
- package/packages/caption/src/manifest.ts +29 -46
- package/packages/caption/src/style.ts +24 -135
- package/packages/caption/src/surface.ts +12 -92
- package/packages/caption/src/temporalize.ts +18 -53
- package/packages/caption/src/types.ts +8 -35
- package/packages/caption/src/visibility.ts +23 -0
- package/packages/caption-fine/README.md +21 -9
- package/packages/caption-fine/package.json +4 -2
- package/packages/caption-fine/src/component.ts +3 -3
- package/packages/caption-fine/src/fragment.ts +7 -19
- package/packages/caption-fine/src/index.ts +2 -0
- package/packages/caption-fine/src/manifest.ts +26 -17
- package/packages/caption-fine/src/recipe.ts +7 -0
- package/packages/caption-fine/src/render.ts +14 -13
- package/packages/caption-fine/src/schedule.ts +39 -35
- package/packages/caption-fine/src/style.ts +10 -9
- package/packages/caption-fine/src/surface.ts +62 -35
- package/packages/caption-fine/src/types.ts +2 -0
- package/packages/caption-fine-studio/README.md +24 -2
- package/packages/caption-fine-studio/package.json +3 -1
- package/packages/caption-fine-studio/src/activation.ts +3 -3
- package/packages/caption-fine-studio/src/index.ts +54 -42
- package/packages/cli/README.md +57 -4
- package/packages/cli/package.json +1 -0
- package/packages/cli/src/arguments.ts +25 -6
- package/packages/cli/src/build-planning.ts +3 -2
- package/packages/cli/src/command.ts +6 -0
- package/packages/cli/src/commands/environment.ts +28 -18
- package/packages/cli/src/commands/execution.ts +81 -26
- package/packages/cli/src/commands/results.ts +7 -11
- package/packages/cli/src/index.ts +2 -2
- package/packages/cli/src/machine-view.ts +3 -2
- package/packages/cli/src/main.ts +34 -42
- package/packages/cli/src/observation.ts +7 -1
- package/packages/cli/src/output.ts +65 -23
- package/packages/cli/src/view.ts +66 -19
- package/packages/comment-sticker/README.md +3 -3
- package/packages/comment-sticker/package.json +1 -1
- package/packages/comment-sticker/src/component.ts +4 -4
- package/packages/comment-sticker/src/fragment.ts +5 -4
- package/packages/comment-sticker/src/manifest.ts +7 -6
- package/packages/comment-sticker/src/program.ts +9 -9
- package/packages/comment-sticker/src/surface.ts +6 -7
- package/packages/composition/README.md +21 -0
- package/packages/composition/src/audio-presentation.ts +44 -0
- package/packages/composition/src/index.ts +3 -0
- package/packages/composition/src/schema.ts +8 -3
- package/packages/composition/src/track.ts +15 -1
- package/packages/credential-store-env/README.md +1 -1
- package/packages/deck-track/README.md +3 -3
- package/packages/deck-track/package.json +1 -1
- package/packages/deck-track/src/component.ts +5 -5
- package/packages/deck-track/src/fragment.ts +6 -5
- package/packages/deck-track/src/lower.ts +12 -12
- package/packages/deck-track/src/manifest.ts +8 -7
- package/packages/deck-track/src/program.ts +13 -16
- package/packages/deck-track/src/surface.ts +9 -10
- package/packages/driver-node/src/driver.ts +41 -3
- package/packages/elevenlabs-speech/README.md +27 -0
- package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
- package/packages/elevenlabs-speech/src/activation.ts +26 -0
- package/packages/elevenlabs-speech/src/fragment.ts +11 -0
- package/packages/elevenlabs-speech/src/index.ts +111 -0
- package/packages/elevenlabs-speech/src/surface.ts +167 -0
- package/packages/endpoint-kit/README.md +24 -0
- package/packages/endpoint-kit/src/index.ts +7 -1
- package/packages/film/README.md +12 -7
- package/packages/film/package.json +1 -1
- package/packages/film/src/component.ts +4 -4
- package/packages/film/src/fragment.ts +6 -5
- package/packages/film/src/manifest.ts +11 -10
- package/packages/film/src/program.ts +5 -5
- package/packages/film/src/recipe.ts +2 -1
- package/packages/film/src/surface.ts +10 -7
- package/packages/film-studio/package.json +1 -1
- package/packages/film-studio/src/index.ts +2 -2
- package/packages/fishaudio-speech/README.md +33 -0
- package/packages/fishaudio-speech/package.json +21 -0
- package/packages/fishaudio-speech/src/activation.ts +32 -0
- package/packages/fishaudio-speech/src/fragment.ts +11 -0
- package/packages/fishaudio-speech/src/index.ts +156 -0
- package/packages/fishaudio-speech/src/surface.ts +192 -0
- package/packages/generation/README.md +11 -1
- package/packages/generation/src/mapping.ts +28 -30
- package/packages/gpt-image/README.md +1 -2
- package/packages/grok-imagine/README.md +1 -2
- package/packages/hyperframes/README.md +7 -3
- package/packages/hyperframes/src/browser-program.ts +11 -2
- package/packages/hyperframes/src/document.ts +15 -2
- package/packages/interview-emoji-reveal/README.md +4 -4
- package/packages/interview-emoji-reveal/package.json +1 -1
- package/packages/interview-emoji-reveal/src/component.ts +4 -4
- package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
- package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
- package/packages/interview-emoji-reveal/src/program.ts +14 -14
- package/packages/interview-emoji-reveal/src/surface.ts +8 -9
- package/packages/media-execution/README.md +7 -3
- package/packages/media-execution/src/audio-presentation.ts +23 -0
- package/packages/media-execution/src/execute.ts +2 -0
- package/packages/media-pipeline/README.md +7 -3
- package/packages/media-pipeline/src/audio-plan.ts +4 -1
- package/packages/media-pipeline/src/component.ts +16 -2
- package/packages/media-pipeline/src/manifest.ts +3 -1
- package/packages/media-pipeline/src/types.ts +2 -1
- package/packages/media-track/README.md +14 -47
- package/packages/media-track/package.json +1 -1
- package/packages/media-track/preview/preview.svml +5 -5
- package/packages/media-track/src/author.ts +12 -6
- package/packages/media-track/src/component.ts +10 -16
- package/packages/media-track/src/fragment.ts +8 -7
- package/packages/media-track/src/index.ts +3 -1
- package/packages/media-track/src/lower.ts +7 -7
- package/packages/media-track/src/manifest.ts +16 -38
- package/packages/media-track/src/program.ts +62 -67
- package/packages/media-track/src/sampling.ts +6 -6
- package/packages/media-track/src/sequence.ts +8 -8
- package/packages/media-track/src/surface.ts +25 -43
- package/packages/media-track-studio/README.md +9 -0
- package/packages/media-track-studio/src/index.ts +16 -11
- package/packages/mimo-speech/README.md +1 -1
- package/packages/minimax-h3/README.md +1 -1
- package/packages/nano-banana/README.md +1 -1
- package/packages/narrative/README.md +23 -1
- package/packages/narrative/src/identity.ts +11 -0
- package/packages/narrative/src/index.ts +3 -0
- package/packages/narrative/src/schema.ts +28 -27
- package/packages/narrative/src/selection.ts +52 -0
- package/packages/narrative/src/types.ts +2 -0
- package/packages/package-loader-node/README.md +30 -0
- package/packages/package-loader-node/package.json +5 -2
- package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
- package/packages/package-loader-node/src/index.ts +1 -0
- package/packages/package-loader-node/src/loader.ts +12 -15
- package/packages/package-loader-node/src/location.ts +27 -1
- package/packages/package-loader-node/src/module-scope.ts +183 -0
- package/packages/package-loader-node/src/types.ts +4 -0
- package/packages/performance/README.md +83 -0
- package/packages/performance/package.json +30 -0
- package/packages/performance/src/activation.ts +11 -0
- package/packages/performance/src/component.ts +46 -0
- package/packages/performance/src/index.ts +6 -0
- package/packages/performance/src/manifest.ts +53 -0
- package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
- package/packages/performance/src/program.ts +51 -0
- package/packages/performance/src/style.ts +35 -0
- package/packages/performance/src/surface.ts +99 -0
- package/packages/performance-studio/README.md +25 -0
- package/packages/performance-studio/package.json +21 -0
- package/packages/performance-studio/src/activation.ts +6 -0
- package/packages/performance-studio/src/index.ts +84 -0
- package/packages/program-space/README.md +9 -18
- package/packages/program-space/src/activation.ts +1 -5
- package/packages/program-space/src/index.ts +2 -11
- package/packages/program-space/src/surface.ts +1 -20
- package/packages/project-context-node/README.md +20 -0
- package/packages/project-context-node/package.json +10 -0
- package/packages/project-context-node/src/index.ts +3 -0
- package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
- package/packages/provider-hyperframes-local/README.md +43 -15
- package/packages/provider-hyperframes-local/src/activation.ts +4 -3
- package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
- package/packages/provider-hyperframes-local/src/capture.ts +96 -26
- package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
- package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
- package/packages/provider-hyperframes-local/src/options.ts +2 -0
- package/packages/provider-hyperframes-local/src/program.ts +6 -3
- package/packages/provider-hyperframes-local/src/progress.ts +53 -0
- package/packages/provider-hyperframes-local/src/provider.ts +18 -5
- package/packages/provider-hyperframes-local/src/render.ts +48 -7
- package/packages/provider-hypihub/README.md +48 -17
- package/packages/provider-hypihub/package.json +2 -0
- package/packages/provider-hypihub/src/mapping.ts +31 -7
- package/packages/provider-hypihub/src/oauth.ts +6 -0
- package/packages/provider-hypihub/src/provider.ts +25 -13
- package/packages/provider-hypihub/src/routes.ts +1 -2
- package/packages/provider-hypihub/src/upload.ts +2 -0
- package/packages/provider-media-local/README.md +3 -4
- package/packages/provider-whisperx-local/src/program.ts +1 -0
- package/packages/provider-whisperx-local/src/provider.ts +3 -0
- package/packages/ranking/README.md +8 -6
- package/packages/ranking/package.json +1 -1
- package/packages/ranking/src/component.ts +6 -6
- package/packages/ranking/src/fragment.ts +11 -7
- package/packages/ranking/src/manifest.ts +21 -14
- package/packages/ranking/src/render.ts +22 -26
- package/packages/ranking/src/schedule.ts +16 -19
- package/packages/ranking/src/surface.ts +12 -13
- package/packages/ranking-studio/README.md +18 -0
- package/packages/ranking-studio/src/index.ts +61 -9
- package/packages/render-hyperframes/README.md +7 -7
- package/packages/render-hyperframes/package.json +1 -1
- package/packages/render-hyperframes/src/component.ts +11 -1
- package/packages/render-hyperframes/src/fragment.ts +7 -4
- package/packages/render-hyperframes/src/manifest.ts +4 -4
- package/packages/render-hyperframes/src/surface.ts +6 -6
- package/packages/runtime/README.md +8 -1
- package/packages/runtime/src/execution.ts +15 -4
- package/packages/runtime/src/index.ts +2 -1
- package/packages/runtime/src/log.ts +51 -0
- package/packages/runtime/src/types.ts +5 -8
- package/packages/runtime-host-node/README.md +30 -0
- package/packages/runtime-host-node/package.json +1 -0
- package/packages/runtime-host-node/src/index.ts +24 -9
- package/packages/runtime-host-node/src/packages.ts +47 -50
- package/packages/runtime-kit/README.md +5 -0
- package/packages/runtime-kit/src/index.ts +3 -1
- package/packages/runtime-local/README.md +109 -4
- package/packages/runtime-local/src/config.ts +202 -56
- package/packages/runtime-local/src/control.ts +9 -1
- package/packages/runtime-local/src/executor.ts +66 -0
- package/packages/runtime-local/src/host.ts +37 -17
- package/packages/runtime-local/src/log.ts +48 -0
- package/packages/runtime-local/src/programs.ts +2 -1
- package/packages/runtime-local/src/result-writer.ts +2 -0
- package/packages/runtime-local/src/runtime.ts +8 -6
- package/packages/runtime-local/src/supervisor.ts +142 -0
- package/packages/runtime-local/src/types.ts +9 -2
- package/packages/runtime-local/src/worker-process.ts +7 -24
- package/packages/runtime-local/src/worker.ts +55 -83
- package/packages/screen-overlay/README.md +3 -3
- package/packages/screen-overlay/package.json +1 -1
- package/packages/screen-overlay/src/component.ts +3 -3
- package/packages/screen-overlay/src/fragment.ts +5 -4
- package/packages/screen-overlay/src/manifest.ts +7 -6
- package/packages/screen-overlay/src/program.ts +9 -9
- package/packages/screen-overlay/src/surface.ts +6 -7
- package/packages/script/README.md +30 -5
- package/packages/script/src/manifest.ts +4 -3
- package/packages/script/src/narrative.ts +1 -0
- package/packages/script/src/parser.ts +45 -6
- package/packages/script/src/surface.ts +4 -3
- package/packages/script/src/types.ts +1 -1
- package/packages/script-studio/package.json +9 -3
- package/packages/script-studio/src/index.ts +2 -0
- package/packages/script-studio/src/projection.ts +105 -0
- package/packages/seedance/README.md +30 -1
- package/packages/seedance/src/index.ts +18 -7
- package/packages/seedance/src/surface.ts +17 -4
- package/packages/seedance-kits/README.md +7 -1
- package/packages/seedream/README.md +1 -1
- package/packages/sound/README.md +81 -0
- package/packages/sound/package.json +25 -0
- package/packages/sound/src/activation.ts +11 -0
- package/packages/sound/src/component.ts +28 -0
- package/packages/sound/src/index.ts +5 -0
- package/packages/sound/src/manifest.ts +47 -0
- package/packages/sound/src/program.ts +84 -0
- package/packages/sound/src/style.ts +34 -0
- package/packages/sound/src/surface.ts +90 -0
- package/packages/sound-studio/README.md +22 -0
- package/packages/sound-studio/package.json +20 -0
- package/packages/sound-studio/src/activation.ts +6 -0
- package/packages/sound-studio/src/index.ts +74 -0
- package/packages/speech/README.md +2 -2
- package/packages/speech-alignment/src/local.ts +8 -0
- package/packages/speech-alignment/src/locate.ts +1 -1
- package/packages/store-sqlite/README.md +7 -0
- package/packages/store-sqlite/src/store.ts +84 -83
- package/packages/studio/INSPECTOR.md +15 -2
- package/packages/studio/LOCALIZATION.md +98 -0
- package/packages/studio/README.md +101 -14
- package/packages/studio/locales/en.json +197 -0
- package/packages/studio/locales/zh-CN.json +191 -0
- package/packages/studio/package.json +8 -7
- package/packages/studio/src/companion-assembly.ts +1 -0
- package/packages/studio/src/domain.ts +1 -1
- package/packages/studio/src/fallback-companions.ts +3 -3
- package/packages/studio/src/feedback-server.ts +51 -0
- package/packages/studio/src/feedback-store.ts +66 -0
- package/packages/studio/src/feedback.ts +60 -0
- package/packages/studio/src/localization-node.ts +46 -0
- package/packages/studio/src/localization.ts +85 -0
- package/packages/studio/src/parameter-values.ts +43 -1
- package/packages/studio/src/parameters.ts +114 -24
- package/packages/studio/src/preview/render.ts +5 -1
- package/packages/studio/src/preview/runtime-shim.ts +49 -3
- package/packages/studio/src/programme.ts +14 -30
- package/packages/studio/src/server.ts +10 -6
- package/packages/studio/src/shared.ts +4 -2
- package/packages/studio/src/snapshot.ts +21 -132
- package/packages/studio/src/studio-preflight.ts +3 -3
- package/packages/studio/src/studio-registry.ts +50 -6
- package/packages/studio/src/style.css +223 -50
- package/packages/studio/src/ui/artifact-name.ts +8 -6
- package/packages/studio/src/ui/artifact-preview.ts +5 -4
- package/packages/studio/src/ui/code.ts +17 -16
- package/packages/studio/src/ui/comments.ts +234 -0
- package/packages/studio/src/ui/dropdown.ts +68 -0
- package/packages/studio/src/ui/i18n.ts +109 -0
- package/packages/studio/src/ui/icons.ts +6 -0
- package/packages/studio/src/ui/library.ts +76 -65
- package/packages/studio/src/ui/main.ts +223 -211
- package/packages/studio/src/ui/overlay.ts +12 -8
- package/packages/studio/src/ui/scrub-preview.ts +110 -0
- package/packages/studio/src/ui/stage.ts +93 -29
- package/packages/studio/src/ui/timeline.ts +190 -118
- package/packages/studio/start.ts +41 -22
- package/packages/studio-adapter/README.md +130 -11
- package/packages/studio-adapter/src/index.ts +100 -13
- package/packages/temporal/README.md +6 -6
- package/packages/temporal/package.json +1 -1
- package/packages/temporal/src/component.ts +5 -6
- package/packages/temporal/src/index.ts +8 -6
- package/packages/temporal/src/location.ts +11 -11
- package/packages/temporal/src/projection.ts +19 -19
- package/packages/temporal/src/rational.ts +4 -4
- package/packages/temporal-markup/EDITING.md +2 -2
- package/packages/temporal-markup/README.md +27 -11
- package/packages/temporal-markup/package.json +1 -1
- package/packages/temporal-markup/src/index.ts +20 -25
- package/packages/temporal-markup/src/space.ts +10 -41
- package/packages/timeline/README.md +31 -0
- package/packages/{semantic-track → timeline}/package.json +1 -1
- package/packages/timeline/src/activation.ts +8 -0
- package/packages/timeline/src/component.ts +24 -0
- package/packages/timeline/src/identity.ts +60 -0
- package/packages/timeline/src/index.ts +6 -0
- package/packages/{semantic-track → timeline}/src/location.ts +20 -20
- package/packages/timeline/src/manifest.ts +39 -0
- package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
- package/packages/timeline/src/types.ts +24 -0
- package/packages/timeline-author/README.md +68 -0
- package/packages/{speech-track → timeline-author}/package.json +6 -4
- package/packages/timeline-author/src/activation.ts +22 -0
- package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
- package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
- package/packages/timeline-author/src/index.ts +7 -0
- package/packages/timeline-author/src/manifest.ts +78 -0
- package/packages/timeline-author/src/program.ts +107 -0
- package/packages/timeline-author/src/surface.ts +46 -0
- package/packages/timeline-author/src/types.ts +6 -0
- package/packages/typography-track/README.md +4 -4
- package/packages/typography-track/package.json +1 -1
- package/packages/typography-track/src/component.ts +4 -4
- package/packages/typography-track/src/fragment.ts +4 -3
- package/packages/typography-track/src/manifest.ts +11 -9
- package/packages/typography-track/src/program.ts +15 -15
- package/packages/typography-track/src/surface.ts +17 -18
- package/packages/video-cli/README.md +4 -1
- package/packages/video-cli/package.json +2 -1
- package/packages/video-cli/src/creation.ts +14 -4
- package/packages/video-cli/src/index.ts +1 -1
- package/packages/video-cli/src/studio-distribution.ts +2 -1
- package/packages/volcengine-matting/README.md +3 -3
- package/packages/whisperx/README.md +1 -1
- package/services/whisperx/README.md +14 -0
- package/services/whisperx/pyproject.toml +2 -0
- package/services/whisperx/uv.lock +20 -20
- package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
- package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
- package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
- package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
- package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
- package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
- package/packages/provider-kie/README.md +0 -134
- package/packages/provider-kie/package.json +0 -43
- package/packages/provider-kie/src/activation.ts +0 -71
- package/packages/provider-kie/src/index.ts +0 -10
- package/packages/provider-kie/src/mapping.ts +0 -182
- package/packages/provider-kie/src/provider.ts +0 -657
- package/packages/provider-kie/src/routes.ts +0 -150
- package/packages/provider-xiaomi-mimo/README.md +0 -32
- package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
- package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
- package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
- package/packages/runtime/src/environment.ts +0 -6
- package/packages/semantic-track/README.md +0 -21
- package/packages/semantic-track/src/activation.ts +0 -8
- package/packages/semantic-track/src/component.ts +0 -24
- package/packages/semantic-track/src/identity.ts +0 -58
- package/packages/semantic-track/src/index.ts +0 -6
- package/packages/semantic-track/src/manifest.ts +0 -38
- package/packages/semantic-track/src/types.ts +0 -26
- package/packages/speech-track/README.md +0 -51
- package/packages/speech-track/src/activation.ts +0 -19
- package/packages/speech-track/src/index.ts +0 -7
- package/packages/speech-track/src/manifest.ts +0 -73
- package/packages/speech-track/src/program.ts +0 -64
- package/packages/speech-track/src/surface.ts +0 -35
- package/packages/speech-track/src/types.ts +0 -6
- package/packages/speech-track-studio/README.md +0 -3
- package/packages/speech-track-studio/package.json +0 -14
- package/packages/speech-track-studio/src/activation.ts +0 -7
- package/packages/speech-track-studio/src/index.ts +0 -40
- /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
- /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
|
@@ -1,522 +0,0 @@
|
|
|
1
|
-
import { mkdtemp, rm } from "node:fs/promises";
|
|
2
|
-
import { tmpdir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
defineEndpointPackage,
|
|
7
|
-
wakeAfter,
|
|
8
|
-
} from "@hypit/endpoint-kit";
|
|
9
|
-
import type {
|
|
10
|
-
EndpointFulfillment,
|
|
11
|
-
EndpointOutcome,
|
|
12
|
-
EndpointPollContext,
|
|
13
|
-
EndpointStartContext,
|
|
14
|
-
AsyncEndpoint,
|
|
15
|
-
} from "@hypit/endpoint-kit";
|
|
16
|
-
import {
|
|
17
|
-
assertHyperframesDocument,
|
|
18
|
-
} from "@hypit/hyperframes";
|
|
19
|
-
import type { HyperframesDocument } from "@hypit/hyperframes";
|
|
20
|
-
import { stageHyperframesProject } from "@hypit/hyperframes/project";
|
|
21
|
-
import {
|
|
22
|
-
mediaTypes,
|
|
23
|
-
sealRenderedVisual,
|
|
24
|
-
} from "@hypit/media";
|
|
25
|
-
import type { RenderedVisual } from "@hypit/media";
|
|
26
|
-
import {
|
|
27
|
-
canonicalize,
|
|
28
|
-
} from "@hypit/protocol";
|
|
29
|
-
import type {
|
|
30
|
-
BlobRef,
|
|
31
|
-
CanonicalValue,
|
|
32
|
-
} from "@hypit/protocol";
|
|
33
|
-
import { renderHyperframesCapabilities } from "@hypit/render-hyperframes";
|
|
34
|
-
import { isStreamingResourceStore } from "@hypit/runtime";
|
|
35
|
-
|
|
36
|
-
import {
|
|
37
|
-
createHyperframesAwsLambdaClient,
|
|
38
|
-
parseS3Uri,
|
|
39
|
-
} from "./client.js";
|
|
40
|
-
import type {
|
|
41
|
-
HyperframesAwsLambdaClient,
|
|
42
|
-
HyperframesLambdaProgress,
|
|
43
|
-
HyperframesLambdaRender,
|
|
44
|
-
HyperframesLambdaRenderConfig,
|
|
45
|
-
HyperframesLambdaSite,
|
|
46
|
-
} from "./client.js";
|
|
47
|
-
|
|
48
|
-
const HANDLE_CONTRACT = "hypit.hyperframes-aws-lambda-operation@1";
|
|
49
|
-
const SUPPORTED_FPS = new Set([24, 30, 60]);
|
|
50
|
-
|
|
51
|
-
export const awsLambdaHyperframesProviderModuleRef = {
|
|
52
|
-
name: "@hypit/provider-hyperframes-aws-lambda",
|
|
53
|
-
version: "1",
|
|
54
|
-
} as const;
|
|
55
|
-
export type HyperframesLambdaQuality = "draft" | "standard" | "high";
|
|
56
|
-
|
|
57
|
-
export type CreateAwsLambdaHyperframesProviderOptions = {
|
|
58
|
-
readonly instance?: string;
|
|
59
|
-
readonly pool?: string;
|
|
60
|
-
readonly stateMachineArn: string;
|
|
61
|
-
readonly bucketName: string;
|
|
62
|
-
readonly quality?: HyperframesLambdaQuality;
|
|
63
|
-
readonly chunkSize?: number;
|
|
64
|
-
readonly maxParallelChunks?: number;
|
|
65
|
-
readonly targetChunkFrames?: number;
|
|
66
|
-
readonly defaultMemorySizeMb?: number;
|
|
67
|
-
readonly defaultConcurrency?: number;
|
|
68
|
-
readonly pollIntervalMs?: number;
|
|
69
|
-
readonly maxOperationMs?: number;
|
|
70
|
-
readonly maxRenderedBytes?: number;
|
|
71
|
-
readonly client?: HyperframesAwsLambdaClient;
|
|
72
|
-
readonly now?: () => number;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
type HyperframesHandle = {
|
|
76
|
-
readonly contract: typeof HANDLE_CONTRACT;
|
|
77
|
-
readonly operationId: string;
|
|
78
|
-
readonly executionArn: string;
|
|
79
|
-
readonly outputS3Uri: string;
|
|
80
|
-
readonly bucketName: string;
|
|
81
|
-
readonly site: HyperframesLambdaSite;
|
|
82
|
-
readonly startedAt: number;
|
|
83
|
-
readonly polls: number;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
function assert(condition: unknown, message: string): asserts condition {
|
|
87
|
-
if (!condition) throw new Error(message);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function positiveInteger(value: number, subject: string): number {
|
|
91
|
-
assert(Number.isSafeInteger(value) && value > 0, `${subject} must be a positive integer`);
|
|
92
|
-
return value;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function nonNegativeInteger(value: number, subject: string): number {
|
|
96
|
-
assert(Number.isSafeInteger(value) && value >= 0, `${subject} must be a non-negative integer`);
|
|
97
|
-
return value;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function stateMachine(value: string): { readonly arn: string; readonly region: string; readonly name: string } {
|
|
101
|
-
const found = /^(arn:aws(?:-[a-z]+)*:states):([a-z0-9-]+):(\d{12}):stateMachine:([A-Za-z0-9_-]+)$/u.exec(value);
|
|
102
|
-
assert(found !== null,
|
|
103
|
-
`HyperFrames stateMachineArn must be an unqualified AWS Step Functions state-machine ARN; got ${value}`);
|
|
104
|
-
return { arn: value, region: found[2]!, name: found[4]! };
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function executionArn(machine: ReturnType<typeof stateMachine>, executionName: string): string {
|
|
108
|
-
const prefix = machine.arn.slice(0, machine.arn.indexOf(":states") + ":states".length);
|
|
109
|
-
const account = machine.arn.split(":")[4]!;
|
|
110
|
-
return `${prefix}:${machine.region}:${account}:execution:${machine.name}:${executionName}`;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function requestDocument(value: CanonicalValue): HyperframesDocument {
|
|
114
|
-
assert(value !== null && typeof value === "object" && !Array.isArray(value),
|
|
115
|
-
"HyperFrames visual request must be an object");
|
|
116
|
-
const request = value as { readonly document?: unknown };
|
|
117
|
-
assert(Object.keys(request).sort().join(",") === "document",
|
|
118
|
-
"HyperFrames visual request contains unsupported requirements");
|
|
119
|
-
assertHyperframesDocument(request.document as HyperframesDocument);
|
|
120
|
-
return request.document as HyperframesDocument;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function awsLambdaHyperframesRejection(value: CanonicalValue): string | undefined {
|
|
124
|
-
try {
|
|
125
|
-
const document = requestDocument(value);
|
|
126
|
-
if (document.surfaces.length > 0) return "AWS Lambda HyperFrames does not accept embedded Surfaces";
|
|
127
|
-
if (document.frameRate.denominator !== 1 || !SUPPORTED_FPS.has(document.frameRate.numerator)) {
|
|
128
|
-
return "AWS Lambda HyperFrames accepts integer 24, 30 or 60 fps";
|
|
129
|
-
}
|
|
130
|
-
return undefined;
|
|
131
|
-
} catch (error) {
|
|
132
|
-
return error instanceof Error ? error.message : String(error);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export function supportsAwsLambdaHyperframes(value: CanonicalValue): boolean {
|
|
137
|
-
return awsLambdaHyperframesRejection(value) === undefined;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function implementationFailure(code: string, error: unknown): EndpointOutcome {
|
|
141
|
-
return {
|
|
142
|
-
status: "failed",
|
|
143
|
-
failure: {
|
|
144
|
-
code,
|
|
145
|
-
message: error instanceof Error ? error.message : String(error),
|
|
146
|
-
},
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function operationName(operationId: string): string {
|
|
151
|
-
return operationId.replace(/[^A-Za-z0-9_-]/gu, "-").slice(0, 64);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function executionName(operationId: string): string {
|
|
155
|
-
return `hypit-${operationName(operationId)}`;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function outputKey(operationId: string): string {
|
|
159
|
-
return `renders/hypit/${operationName(operationId)}/visual.mp4`;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function alreadyStopped(error: unknown): boolean {
|
|
163
|
-
return error !== null && typeof error === "object"
|
|
164
|
-
&& ["ExecutionDoesNotExist", "SFN.ExecutionDoesNotExist", "ExecutionNotRunning"]
|
|
165
|
-
.includes(String((error as { readonly name?: unknown }).name));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
async function artifactBytes(
|
|
169
|
-
context: EndpointStartContext,
|
|
170
|
-
artifact: BlobRef,
|
|
171
|
-
): Promise<Uint8Array | AsyncIterable<Uint8Array>> {
|
|
172
|
-
if (isStreamingResourceStore(context.resources)) {
|
|
173
|
-
const chunks = await context.resources.open(artifact.resource);
|
|
174
|
-
assert(chunks !== undefined, `HyperFrames Artifact ${artifact.resource} is unavailable`);
|
|
175
|
-
return chunks;
|
|
176
|
-
}
|
|
177
|
-
const bytes = await context.resources.get(artifact.resource);
|
|
178
|
-
assert(bytes !== undefined, `HyperFrames Artifact ${artifact.resource} is unavailable`);
|
|
179
|
-
assert(bytes.byteLength === artifact.size, `HyperFrames Artifact ${artifact.resource} size differs`);
|
|
180
|
-
return bytes;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function verifySite(site: HyperframesLambdaSite, bucketName: string): void {
|
|
184
|
-
assert(/^[A-Za-z0-9._-]+$/u.test(site.siteId), "HyperFrames site id is invalid");
|
|
185
|
-
assert(site.bucketName === bucketName, "HyperFrames site was deployed to another bucket");
|
|
186
|
-
const target = parseS3Uri(site.projectS3Uri);
|
|
187
|
-
assert(target.bucket === bucketName && target.key === `sites/${site.siteId}/project.tar.gz`,
|
|
188
|
-
"HyperFrames site URI does not name its deployed project");
|
|
189
|
-
positiveInteger(site.bytes, "HyperFrames site bytes");
|
|
190
|
-
assert(Number.isFinite(Date.parse(site.uploadedAt)), "HyperFrames site upload timestamp is invalid");
|
|
191
|
-
assert(typeof site.uploaded === "boolean", "HyperFrames site upload state is invalid");
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function readHandle(value: CanonicalValue | undefined, context: EndpointPollContext): HyperframesHandle {
|
|
195
|
-
assert(value !== undefined && value !== null && typeof value === "object" && !Array.isArray(value),
|
|
196
|
-
"HyperFrames handle is absent or invalid");
|
|
197
|
-
const item = value as unknown as HyperframesHandle;
|
|
198
|
-
assert(item.contract === HANDLE_CONTRACT, "HyperFrames handle contract is invalid");
|
|
199
|
-
assert(item.operationId === context.operation, "HyperFrames handle Operation differs");
|
|
200
|
-
assert(typeof item.executionArn === "string" && item.executionArn.length > 0,
|
|
201
|
-
"HyperFrames handle execution ARN is missing");
|
|
202
|
-
assert(item.startedAt >= 0 && Number.isSafeInteger(item.startedAt), "HyperFrames handle start time is invalid");
|
|
203
|
-
nonNegativeInteger(item.polls, "HyperFrames handle polls");
|
|
204
|
-
return structuredClone(item);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function boundedChunks(
|
|
208
|
-
chunks: AsyncIterable<Uint8Array>,
|
|
209
|
-
maximum: number,
|
|
210
|
-
expected: number | null,
|
|
211
|
-
count: { value: number },
|
|
212
|
-
): AsyncIterable<Uint8Array> {
|
|
213
|
-
return (async function* () {
|
|
214
|
-
for await (const chunk of chunks) {
|
|
215
|
-
count.value += chunk.byteLength;
|
|
216
|
-
assert(count.value <= maximum, "HyperFrames output exceeded the configured byte limit");
|
|
217
|
-
if (expected !== null) assert(count.value <= expected, "HyperFrames output exceeded its reported byte count");
|
|
218
|
-
yield chunk;
|
|
219
|
-
}
|
|
220
|
-
assert(count.value > 0, "HyperFrames output is empty");
|
|
221
|
-
if (expected !== null) assert(count.value === expected, "HyperFrames output byte count differs from progress");
|
|
222
|
-
})();
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
async function storeOutput(
|
|
226
|
-
context: EndpointPollContext,
|
|
227
|
-
client: HyperframesAwsLambdaClient,
|
|
228
|
-
progress: HyperframesLambdaProgress,
|
|
229
|
-
handle: HyperframesHandle,
|
|
230
|
-
region: string,
|
|
231
|
-
maxRenderedBytes: number,
|
|
232
|
-
): Promise<BlobRef> {
|
|
233
|
-
const output = progress.outputFile;
|
|
234
|
-
assert(output !== null, "HyperFrames succeeded without an output file");
|
|
235
|
-
assert(output.s3Uri === handle.outputS3Uri, "HyperFrames completed at an unexpected output URI");
|
|
236
|
-
const target = parseS3Uri(output.s3Uri);
|
|
237
|
-
assert(target.bucket === handle.bucketName, "HyperFrames output is outside its configured bucket");
|
|
238
|
-
if (output.bytes !== null) positiveInteger(output.bytes, "HyperFrames output bytes");
|
|
239
|
-
const source = await client.openOutput({ s3Uri: output.s3Uri, region });
|
|
240
|
-
if (source.contentLength !== undefined) {
|
|
241
|
-
positiveInteger(source.contentLength, "HyperFrames S3 content length");
|
|
242
|
-
if (output.bytes !== null) assert(source.contentLength === output.bytes,
|
|
243
|
-
"HyperFrames S3 content length differs from progress");
|
|
244
|
-
}
|
|
245
|
-
const expected = output.bytes ?? source.contentLength ?? null;
|
|
246
|
-
if (expected !== null) assert(expected <= maxRenderedBytes,
|
|
247
|
-
"HyperFrames output exceeded the configured byte limit");
|
|
248
|
-
const count = { value: 0 };
|
|
249
|
-
const bounded = boundedChunks(source.chunks, maxRenderedBytes, expected, count);
|
|
250
|
-
if (isStreamingResourceStore(context.resources)) {
|
|
251
|
-
return await context.resources.putStream(bounded, "video/mp4");
|
|
252
|
-
}
|
|
253
|
-
const buffers: Uint8Array[] = [];
|
|
254
|
-
for await (const chunk of bounded) buffers.push(chunk);
|
|
255
|
-
const bytes = new Uint8Array(count.value);
|
|
256
|
-
let offset = 0;
|
|
257
|
-
for (const chunk of buffers) {
|
|
258
|
-
bytes.set(chunk, offset);
|
|
259
|
-
offset += chunk.byteLength;
|
|
260
|
-
}
|
|
261
|
-
return await context.resources.put(bytes, "video/mp4");
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
function fulfillment(
|
|
265
|
-
document: HyperframesDocument,
|
|
266
|
-
artifact: BlobRef,
|
|
267
|
-
): EndpointFulfillment {
|
|
268
|
-
const value: RenderedVisual = sealRenderedVisual({
|
|
269
|
-
frameRate: document.frameRate,
|
|
270
|
-
frameCount: document.frameCount,
|
|
271
|
-
canvas: document.canvas,
|
|
272
|
-
artifact,
|
|
273
|
-
});
|
|
274
|
-
return { value: { kind: "inline", value: canonicalize(value) } };
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
function renderConfiguration(document: HyperframesDocument, options: {
|
|
278
|
-
readonly quality: HyperframesLambdaQuality;
|
|
279
|
-
readonly chunkSize?: number;
|
|
280
|
-
readonly maxParallelChunks: number;
|
|
281
|
-
readonly targetChunkFrames?: number;
|
|
282
|
-
}): HyperframesLambdaRenderConfig {
|
|
283
|
-
assert(document.surfaces.length === 0,
|
|
284
|
-
"AWS Lambda HyperFrames has no deployed Surface-byte verifier");
|
|
285
|
-
assert(document.frameRate.denominator === 1 && SUPPORTED_FPS.has(document.frameRate.numerator),
|
|
286
|
-
"AWS Lambda HyperFrames supports only integer 24, 30 or 60 fps documents");
|
|
287
|
-
return {
|
|
288
|
-
fps: document.frameRate.numerator as 24 | 30 | 60,
|
|
289
|
-
width: document.canvas.width,
|
|
290
|
-
height: document.canvas.height,
|
|
291
|
-
format: "mp4",
|
|
292
|
-
codec: "h264",
|
|
293
|
-
quality: options.quality,
|
|
294
|
-
...(options.chunkSize === undefined ? {} : { chunkSize: options.chunkSize }),
|
|
295
|
-
maxParallelChunks: options.maxParallelChunks,
|
|
296
|
-
...(options.targetChunkFrames === undefined ? {} : { targetChunkFrames: options.targetChunkFrames }),
|
|
297
|
-
runtimeCap: "lambda",
|
|
298
|
-
rejectOnSystemFonts: true,
|
|
299
|
-
failClosedFontFetch: true,
|
|
300
|
-
hdrMode: "force-sdr",
|
|
301
|
-
cfr: true,
|
|
302
|
-
entryFile: "index.html",
|
|
303
|
-
strictness: "strict",
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
function verifyProgress(progress: HyperframesLambdaProgress, document: HyperframesDocument): void {
|
|
308
|
-
assert(["RUNNING", "SUCCEEDED", "FAILED", "TIMED_OUT", "ABORTED", "PENDING_REDRIVE"]
|
|
309
|
-
.includes(progress.status), "HyperFrames status is invalid");
|
|
310
|
-
assert(Number.isFinite(progress.overallProgress)
|
|
311
|
-
&& progress.overallProgress >= 0 && progress.overallProgress <= 1,
|
|
312
|
-
"HyperFrames overall progress is invalid");
|
|
313
|
-
nonNegativeInteger(progress.framesRendered, "HyperFrames rendered frames");
|
|
314
|
-
nonNegativeInteger(progress.lambdasInvoked, "HyperFrames Lambda invocation count");
|
|
315
|
-
assert(Array.isArray(progress.errors), "HyperFrames errors are invalid");
|
|
316
|
-
for (const error of progress.errors) {
|
|
317
|
-
assert(typeof error.state === "string" && typeof error.error === "string"
|
|
318
|
-
&& typeof error.cause === "string", "HyperFrames error entry is invalid");
|
|
319
|
-
}
|
|
320
|
-
assert(typeof progress.fatalErrorEncountered === "boolean",
|
|
321
|
-
"HyperFrames fatal-error marker is invalid");
|
|
322
|
-
assert(Number.isFinite(Date.parse(progress.startedAt)), "HyperFrames progress start time is invalid");
|
|
323
|
-
assert(progress.endedAt === null || Number.isFinite(Date.parse(progress.endedAt)),
|
|
324
|
-
"HyperFrames progress end time is invalid");
|
|
325
|
-
if (progress.totalFrames !== null) {
|
|
326
|
-
positiveInteger(progress.totalFrames, "HyperFrames planned frames");
|
|
327
|
-
assert(progress.totalFrames === document.frameCount,
|
|
328
|
-
`HyperFrames planned ${progress.totalFrames} frames for a ${document.frameCount}-frame document`);
|
|
329
|
-
assert(progress.framesRendered <= progress.totalFrames,
|
|
330
|
-
"HyperFrames rendered frame count exceeds its plan");
|
|
331
|
-
}
|
|
332
|
-
if (progress.status === "SUCCEEDED") {
|
|
333
|
-
assert(progress.fatalErrorEncountered === false,
|
|
334
|
-
"HyperFrames succeeded while reporting a fatal error");
|
|
335
|
-
assert(progress.overallProgress === 1,
|
|
336
|
-
"HyperFrames succeeded without reporting complete progress");
|
|
337
|
-
assert(progress.totalFrames === document.frameCount
|
|
338
|
-
&& progress.framesRendered === document.frameCount,
|
|
339
|
-
"HyperFrames succeeded without reporting the complete document frame domain");
|
|
340
|
-
assert(progress.outputFile !== null,
|
|
341
|
-
"HyperFrames succeeded without reporting an output file");
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export function createAwsLambdaHyperframesProvider(config: CreateAwsLambdaHyperframesProviderOptions) {
|
|
346
|
-
const machine = stateMachine(config.stateMachineArn);
|
|
347
|
-
const region = machine.region;
|
|
348
|
-
const quality = config.quality ?? "standard";
|
|
349
|
-
assert(["draft", "standard", "high"].includes(quality), "HyperFrames quality is invalid");
|
|
350
|
-
const chunkSize = config.chunkSize === undefined ? undefined : positiveInteger(config.chunkSize, "chunkSize");
|
|
351
|
-
const maxParallelChunks = positiveInteger(config.maxParallelChunks ?? 16, "maxParallelChunks");
|
|
352
|
-
const targetChunkFrames = config.targetChunkFrames === undefined
|
|
353
|
-
? undefined : positiveInteger(config.targetChunkFrames, "targetChunkFrames");
|
|
354
|
-
assert(chunkSize === undefined || targetChunkFrames === undefined,
|
|
355
|
-
"HyperFrames chunkSize and targetChunkFrames are mutually exclusive");
|
|
356
|
-
const defaultMemorySizeMb = positiveInteger(config.defaultMemorySizeMb ?? 10_240, "defaultMemorySizeMb");
|
|
357
|
-
const pollIntervalMs = positiveInteger(config.pollIntervalMs ?? 5_000, "pollIntervalMs");
|
|
358
|
-
const maxOperationMs = positiveInteger(config.maxOperationMs ?? 6 * 60 * 60_000, "maxOperationMs");
|
|
359
|
-
const maxRenderedBytes = positiveInteger(config.maxRenderedBytes ?? 16 * 1024 * 1024 * 1024,
|
|
360
|
-
"maxRenderedBytes");
|
|
361
|
-
const client = config.client ?? createHyperframesAwsLambdaClient(region);
|
|
362
|
-
const now = config.now ?? Date.now;
|
|
363
|
-
|
|
364
|
-
const makeHandle = (
|
|
365
|
-
context: EndpointStartContext,
|
|
366
|
-
site: HyperframesLambdaSite,
|
|
367
|
-
handle: HyperframesLambdaRender,
|
|
368
|
-
startedAt: number,
|
|
369
|
-
): HyperframesHandle => {
|
|
370
|
-
return {
|
|
371
|
-
contract: HANDLE_CONTRACT,
|
|
372
|
-
operationId: context.operation,
|
|
373
|
-
executionArn: handle.executionArn,
|
|
374
|
-
outputS3Uri: handle.outputS3Uri,
|
|
375
|
-
bucketName: handle.bucketName,
|
|
376
|
-
site,
|
|
377
|
-
startedAt,
|
|
378
|
-
polls: 0,
|
|
379
|
-
};
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
const submit = async (context: EndpointStartContext): Promise<EndpointOutcome> => {
|
|
383
|
-
const startedAt = now();
|
|
384
|
-
const document = requestDocument(context.need.constraints);
|
|
385
|
-
const renderConfig = renderConfiguration(document, {
|
|
386
|
-
quality,
|
|
387
|
-
...(chunkSize === undefined ? {} : { chunkSize }),
|
|
388
|
-
maxParallelChunks,
|
|
389
|
-
...(targetChunkFrames === undefined ? {} : { targetChunkFrames }),
|
|
390
|
-
});
|
|
391
|
-
let site: HyperframesLambdaSite;
|
|
392
|
-
const work = await mkdtemp(join(tmpdir(), "hypit-hyperframes-aws-"));
|
|
393
|
-
try {
|
|
394
|
-
await stageHyperframesProject({
|
|
395
|
-
document,
|
|
396
|
-
directory: work,
|
|
397
|
-
read: (artifact) => artifactBytes(context, artifact),
|
|
398
|
-
});
|
|
399
|
-
site = await client.deploySite({ projectDir: work, bucketName: config.bucketName, region });
|
|
400
|
-
} catch (error) {
|
|
401
|
-
return implementationFailure("HYPERFRAMES_SITE_DEPLOY_FAILED", error);
|
|
402
|
-
} finally {
|
|
403
|
-
await rm(work, { recursive: true, force: true }).catch(() => {});
|
|
404
|
-
}
|
|
405
|
-
verifySite(site, config.bucketName);
|
|
406
|
-
let render: HyperframesLambdaRender;
|
|
407
|
-
try {
|
|
408
|
-
render = await client.render({
|
|
409
|
-
siteHandle: site,
|
|
410
|
-
config: renderConfig,
|
|
411
|
-
bucketName: config.bucketName,
|
|
412
|
-
stateMachineArn: machine.arn,
|
|
413
|
-
region,
|
|
414
|
-
outputKey: outputKey(context.operation),
|
|
415
|
-
executionName: executionName(context.operation),
|
|
416
|
-
});
|
|
417
|
-
const handle = makeHandle(context, site, render, startedAt);
|
|
418
|
-
const receipt = { id: handle.executionArn };
|
|
419
|
-
await context.checkpoint?.({ handle: canonicalize(handle), receipt });
|
|
420
|
-
return { ...wakeAfter(canonicalize(handle), pollIntervalMs, now(), { phase: "submitted" }), receipt };
|
|
421
|
-
} catch (error) {
|
|
422
|
-
return implementationFailure("HYPERFRAMES_SUBMISSION_FAILED", error);
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
|
|
426
|
-
const safeSubmit = async (
|
|
427
|
-
context: EndpointStartContext,
|
|
428
|
-
): Promise<EndpointOutcome> => {
|
|
429
|
-
try {
|
|
430
|
-
return await submit(context);
|
|
431
|
-
} catch (error) {
|
|
432
|
-
return implementationFailure("HYPERFRAMES_SUBMISSION_INVALID", error);
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
|
|
436
|
-
const endpoint: AsyncEndpoint = {
|
|
437
|
-
start: async (context) => await safeSubmit(context),
|
|
438
|
-
async poll(context) {
|
|
439
|
-
let handle: HyperframesHandle;
|
|
440
|
-
try {
|
|
441
|
-
handle = readHandle(context.handle, context);
|
|
442
|
-
} catch (error) {
|
|
443
|
-
throw error;
|
|
444
|
-
}
|
|
445
|
-
if (now() - handle.startedAt >= maxOperationMs) {
|
|
446
|
-
return implementationFailure("HYPERFRAMES_OPERATION_TIMEOUT", new Error("HyperFrames deadline exceeded"));
|
|
447
|
-
}
|
|
448
|
-
let document: HyperframesDocument;
|
|
449
|
-
let progress: HyperframesLambdaProgress;
|
|
450
|
-
try {
|
|
451
|
-
document = requestDocument(context.need.constraints);
|
|
452
|
-
progress = await client.progress({
|
|
453
|
-
executionArn: handle.executionArn,
|
|
454
|
-
defaultMemorySizeMb,
|
|
455
|
-
region,
|
|
456
|
-
});
|
|
457
|
-
} catch (error) {
|
|
458
|
-
return implementationFailure("HYPERFRAMES_POLL_FAILED", error);
|
|
459
|
-
}
|
|
460
|
-
try {
|
|
461
|
-
verifyProgress(progress, document);
|
|
462
|
-
} catch (error) {
|
|
463
|
-
return implementationFailure("HYPERFRAMES_POLL_FAILED", error);
|
|
464
|
-
}
|
|
465
|
-
const next = { ...handle, polls: handle.polls + 1 };
|
|
466
|
-
if (progress.status === "RUNNING") {
|
|
467
|
-
return wakeAfter(canonicalize(next), pollIntervalMs, now(), {
|
|
468
|
-
phase: "rendering",
|
|
469
|
-
completed: progress.framesRendered,
|
|
470
|
-
...(progress.totalFrames === null ? {} : { total: progress.totalFrames }),
|
|
471
|
-
unit: "frames",
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
if (progress.status !== "SUCCEEDED") {
|
|
475
|
-
const details = progress.errors.map((item) => `${item.state}: ${item.error}: ${item.cause}`).join("; ");
|
|
476
|
-
return implementationFailure(`HYPERFRAMES_${progress.status}`,
|
|
477
|
-
new Error(details || `HyperFrames execution ended as ${progress.status}`));
|
|
478
|
-
}
|
|
479
|
-
try {
|
|
480
|
-
const artifact = await storeOutput(context, client, progress, next, region, maxRenderedBytes);
|
|
481
|
-
return {
|
|
482
|
-
status: "completed",
|
|
483
|
-
result: fulfillment(document, artifact),
|
|
484
|
-
};
|
|
485
|
-
} catch (error) {
|
|
486
|
-
return implementationFailure("HYPERFRAMES_OUTPUT_INVALID", error);
|
|
487
|
-
}
|
|
488
|
-
},
|
|
489
|
-
async cancel(context) {
|
|
490
|
-
const target = readHandle(context.handle, context).executionArn;
|
|
491
|
-
try {
|
|
492
|
-
await client.stop({
|
|
493
|
-
executionArn: target,
|
|
494
|
-
region,
|
|
495
|
-
reason: `Hypit cancelled Operation ${context.operation}`,
|
|
496
|
-
});
|
|
497
|
-
} catch (error) {
|
|
498
|
-
if (!alreadyStopped(error)) throw error;
|
|
499
|
-
}
|
|
500
|
-
return { status: "accepted" };
|
|
501
|
-
},
|
|
502
|
-
};
|
|
503
|
-
|
|
504
|
-
return defineEndpointPackage({
|
|
505
|
-
module: awsLambdaHyperframesProviderModuleRef,
|
|
506
|
-
facet: "render",
|
|
507
|
-
instance: config.instance ?? "hyperframes.aws-lambda",
|
|
508
|
-
pool: config.pool ?? config.instance ?? "hyperframes.aws-lambda",
|
|
509
|
-
pricing: { kind: "page", url: "https://aws.amazon.com/lambda/pricing/" },
|
|
510
|
-
defaultConcurrency: config.defaultConcurrency ?? 2,
|
|
511
|
-
capabilities: [{
|
|
512
|
-
lifecycle: "asynchronous" as const,
|
|
513
|
-
capability: renderHyperframesCapabilities.renderVisual,
|
|
514
|
-
returns: mediaTypes.renderedVisual,
|
|
515
|
-
supports: (need) => {
|
|
516
|
-
const reason = awsLambdaHyperframesRejection(need.constraints);
|
|
517
|
-
return reason === undefined ? { status: "supported" } : { status: "unsupported", reason };
|
|
518
|
-
},
|
|
519
|
-
endpoint,
|
|
520
|
-
}],
|
|
521
|
-
});
|
|
522
|
-
}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
# `@hypit/provider-kie`
|
|
2
|
-
|
|
3
|
-
Asynchronous KIE Market Provider for the eleven explicitly selected exact models and one generic
|
|
4
|
-
background-removal capability.
|
|
5
|
-
|
|
6
|
-
This package is deployment code. Author source imports model modules such as `@hypit/seedance` or
|
|
7
|
-
`@hypit/gpt-image`; trusted Runtime configuration installs `createKieProvider()`. The Provider binds
|
|
8
|
-
only those exact model capabilities and never interprets a generic image/video request as permission to
|
|
9
|
-
choose another model.
|
|
10
|
-
|
|
11
|
-
It imports no exact-model package. Every supported Capability contributes one `KieRoute`: exact
|
|
12
|
-
Capability, return Type, request compiler, media/count limits and result packer. All Routes share one
|
|
13
|
-
upload, paid submission, durable Operation polling, download and working-Resource write path. Model mappings
|
|
14
|
-
generate eleven Routes; Background Removal contributes the twelfth.
|
|
15
|
-
|
|
16
|
-
## Supported catalog
|
|
17
|
-
|
|
18
|
-
One Capability per exact model; a service that splits a model across endpoints expresses that as
|
|
19
|
-
routes rather than extra Capabilities.
|
|
20
|
-
|
|
21
|
-
| Author module | Exact models | KIE model slugs |
|
|
22
|
-
|---|---|---|
|
|
23
|
-
| `@hypit/seedance` | `seedance-2`, `-fast`, `-mini`, `seedance-2.5` | `bytedance/seedance-2*`, `bytedance/seedance-2-5` |
|
|
24
|
-
| `@hypit/minimax-h3` | `minimax-h3` | `minimax-h3/{text,image,reference}-to-video` |
|
|
25
|
-
| `@hypit/grok-imagine` | `grok-imagine-video`, `-1.5-preview` | Grok Imagine video endpoints |
|
|
26
|
-
| `@hypit/gpt-image` | `gpt-image-2` | `gpt-image-2-{text,image}-to-image` |
|
|
27
|
-
| `@hypit/nano-banana` | `nano-banana-2`, `-pro` | `nano-banana-2`, `nano-banana-pro` |
|
|
28
|
-
| `@hypit/seedream` | `seedream-5-lite` | `seedream/5-lite-{text,image}-to-image` |
|
|
29
|
-
| `@hypit/background-removal` | `remove-background` | `recraft/remove-background` |
|
|
30
|
-
|
|
31
|
-
KIE's current GPT Image 2 request surface is:
|
|
32
|
-
|
|
33
|
-
| Resolution | Ratios unavailable at this Endpoint | `background` |
|
|
34
|
-
| --- | --- | --- |
|
|
35
|
-
| `1K` | none | optional |
|
|
36
|
-
| `2K` | `5:4`, `4:5`, `3:1`, `1:3`, `9:21` | omit |
|
|
37
|
-
| `4K` | `3:1`, `1:3`, `9:21` | omit |
|
|
38
|
-
|
|
39
|
-
These facts were checked against KIE's live `createTask` endpoint on 2026-09-07. The live API accepts
|
|
40
|
-
`5:4` and `4:5` at 4K even though KIE's [model page](https://kie.ai/gpt-image-2) currently lists a
|
|
41
|
-
broader restriction. At 2K and 4K, any explicit `background` value is rejected, including `opaque`
|
|
42
|
-
and `auto`. The KIE Endpoint checks this boundary before upload or paid submission; the GPT Image
|
|
43
|
-
model package continues to expose the complete Provider-neutral vocabulary.
|
|
44
|
-
|
|
45
|
-
KIE's Grok Imagine endpoints accept up to seven reference images, but only one at 1080p. This is
|
|
46
|
-
also checked by the KIE Endpoint; the Grok model packages retain their model-level seven-image
|
|
47
|
-
capacity.
|
|
48
|
-
|
|
49
|
-
KIE publishes a public model-pricing catalogue at `POST /client/v1/model-pricing/page`. For each
|
|
50
|
-
selected Need, `readPricing` derives the same KIE wire model used for execution, reads the catalogue's
|
|
51
|
-
pages with that wire model in KIE's `modelDescription` query, and preserves the returned records. The
|
|
52
|
-
Provider contains no Hypit model-price table and does not interpret KIE's descriptions or formulas.
|
|
53
|
-
All returned parameter rows remain intact for the Agent to read beside the Need. Reading this public
|
|
54
|
-
catalogue does not resolve the generation API credential and submits no work.
|
|
55
|
-
The optional document summary presents each row's model description, USD price, credit price and
|
|
56
|
-
billing unit. Comparison prices and promotion fields remain in the original data for JSON or verbose
|
|
57
|
-
inspection; the summary does not guess a matching tier from KIE's description text.
|
|
58
|
-
|
|
59
|
-
There is deliberately no Grok image capability and no MiMo capability in this release. Seedream's
|
|
60
|
-
`nsfwCheck` is explicit author request content; KIE cannot silently enable or disable it. A
|
|
61
|
-
customer-specific “spicy” treatment belongs in a Recipe that selects and parameterizes exact model
|
|
62
|
-
requests, not in Provider routing.
|
|
63
|
-
|
|
64
|
-
## Local Runtime
|
|
65
|
-
|
|
66
|
-
Declarative activation names an ordinary CredentialRef, not an environment-specific Provider field:
|
|
67
|
-
|
|
68
|
-
```json
|
|
69
|
-
"kie.personal": {
|
|
70
|
-
"use": "@hypit/provider-kie",
|
|
71
|
-
"config": {
|
|
72
|
-
"apiKey": { "store": "os", "key": "kie.api-key" },
|
|
73
|
-
"defaultConcurrency": 8,
|
|
74
|
-
"capabilityConcurrency": {
|
|
75
|
-
"seedance-2.5": 4,
|
|
76
|
-
"gpt-image-2": 3
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
The selected writable CredentialStore then enables `hypit auth login kie.personal --runtime
|
|
83
|
-
hypit.runtime.json`; KIE contributes the credential description and the generic CLI contains no KIE
|
|
84
|
-
branch.
|
|
85
|
-
|
|
86
|
-
```ts
|
|
87
|
-
import { createKieProvider } from "@hypit/provider-kie";
|
|
88
|
-
import { credentialRef } from "@hypit/runtime";
|
|
89
|
-
|
|
90
|
-
const kie = createKieProvider({
|
|
91
|
-
instance: "kie.personal",
|
|
92
|
-
apiKey: credentialRef("env", "KIE_API_KEY"),
|
|
93
|
-
defaultConcurrency: 8,
|
|
94
|
-
capabilityConcurrency: {
|
|
95
|
-
"seedance-2.5": 4,
|
|
96
|
-
"gpt-image-2": 3,
|
|
97
|
-
},
|
|
98
|
-
});
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
`defaultConcurrency` is the total capacity of this configured KIE Endpoint across all Builds. Each
|
|
102
|
-
optional `capabilityConcurrency` entry narrows the capacity of one exact KIE model inside that total. By
|
|
103
|
-
default the Endpoint instance is the shared-resource identity. Set Profile `pool` only when multiple
|
|
104
|
-
Endpoint instances really use the same account or deployment quota. Another Provider is independent
|
|
105
|
-
unless the Profile explicitly gives it that same real-resource identity.
|
|
106
|
-
One Need execution acquires its total and model-specific capacity claims atomically. These are shared-resource
|
|
107
|
-
limits, not parent and child queues.
|
|
108
|
-
|
|
109
|
-
Optional `actionLimits` uses the shared Endpoint vocabulary for `submit`, `poll` and `collect`.
|
|
110
|
-
For example, `submit: { rate: { limit: 1, periodMs: 200 } }` admits one start action every 200 ms,
|
|
111
|
-
with an initial burst of one. It is shared by instances in the same pool. A start includes reference
|
|
112
|
-
preparation and submission; this is an action-admission limit, not a timestamp guarantee for each
|
|
113
|
-
HTTP request. `collect: { concurrency: 2 }` separately bounds concurrent result downloads.
|
|
114
|
-
Polling transport errors and operation deadlines fail the attempt and retain the task receipt.
|
|
115
|
-
|
|
116
|
-
An advanced embedding adds `kie` to its Endpoint list beside a complete, explicit set of Runtime
|
|
117
|
-
service packages and selections. The `.svml` Module Closure separately contains only the model
|
|
118
|
-
Manifests actually imported by the author document; installing KIE does not add author intent.
|
|
119
|
-
|
|
120
|
-
## Task execution and receipts
|
|
121
|
-
|
|
122
|
-
Reference Resources are uploaded before `createTask`. An acknowledged task ID is saved immediately;
|
|
123
|
-
normal polling uses that same ID. Submission, polling or collection errors end the attempt with the
|
|
124
|
-
actual error. A timeout without an ID records the missing acknowledgement; the next attempt can be a
|
|
125
|
-
new Build. No failure changes the selected Endpoint or account.
|
|
126
|
-
|
|
127
|
-
On success, poll reports artifacts ready and `collect` downloads them into the Build's working byte
|
|
128
|
-
area. The Result retains completed public Outputs and non-secret task receipts after active Runtime
|
|
129
|
-
state is removed. A task receipt identifies `/api/v1/jobs/recordInfo?taskId=<id>` on the configured
|
|
130
|
-
KIE API base URL; the selected credential reference supplies access without storing the key in Result.
|
|
131
|
-
These records support inspection and explicit reuse in a new Run, not restarting the old Build.
|
|
132
|
-
|
|
133
|
-
The automated tests exercise submission errors, accepted-task polling, full-response deadlines and
|
|
134
|
-
bounded downloads against fake services, without paid generation.
|