@hypit/hypit 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/public/caption.d.ts +206 -183
- package/dist/public/composition.d.ts +25 -3
- package/dist/public/endpoint-kit.d.ts +24 -2
- package/dist/public/generation.d.ts +5 -1
- package/dist/public/hyperframes.d.ts +19 -1
- package/dist/public/narrative.d.ts +17 -3
- package/dist/public/performance.d.ts +1590 -0
- package/dist/public/program-space.d.ts +179 -32
- package/dist/public/runtime-kit.d.ts +21 -8
- package/dist/public/sound.d.ts +822 -0
- package/dist/public/speech.d.ts +41 -0
- package/dist/public/studio-adapter.d.ts +107 -16
- package/dist/public/temporal-markup.d.ts +9 -44
- package/dist/public/temporal.d.ts +37 -28
- package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
- package/examples/README.md +18 -10
- package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
- package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
- package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
- package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
- package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
- package/examples/provider-package/README.md +78 -0
- package/examples/provider-package/hypit.runtime.json +12 -0
- package/examples/provider-package/packages/provider-images/package.json +11 -0
- package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
- package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
- package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
- package/examples/semantic-composition/README.md +6 -0
- package/examples/semantic-composition/chat.svml +6 -5
- package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
- package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
- package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
- package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
- package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
- package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
- package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
- package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
- package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
- package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
- package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
- package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
- package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
- package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
- package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
- package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
- package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
- package/package.json +35 -15
- package/packages/audio-track/README.md +20 -13
- package/packages/audio-track/package.json +1 -1
- package/packages/audio-track/src/component.ts +4 -4
- package/packages/audio-track/src/fragment.ts +6 -5
- package/packages/audio-track/src/index.ts +1 -1
- package/packages/audio-track/src/manifest.ts +17 -16
- package/packages/audio-track/src/program.ts +21 -25
- package/packages/audio-track/src/surface.ts +19 -18
- package/packages/audio-track-studio/README.md +23 -0
- package/packages/audio-track-studio/src/index.ts +33 -19
- package/packages/author-kit/README.md +1 -1
- package/packages/background-removal/README.md +4 -7
- package/packages/browser-capture/package.json +1 -1
- package/packages/build-result/README.md +69 -0
- package/packages/build-result/package.json +2 -1
- package/packages/build-result/src/decode.ts +12 -8
- package/packages/build-result/src/execution-log.ts +17 -0
- package/packages/build-result/src/file-reference.ts +42 -0
- package/packages/build-result/src/index.ts +4 -0
- package/packages/build-result/src/replace-file-windows.ts +58 -0
- package/packages/build-result/src/replace-file.ts +11 -0
- package/packages/build-result/src/store.ts +58 -14
- package/packages/build-result/src/types.ts +41 -8
- package/packages/build-result/src/writer.ts +12 -1
- package/packages/build-result-fs/README.md +23 -1
- package/packages/build-result-s3/README.md +5 -0
- package/packages/build-result-s3/src/repository.ts +23 -5
- package/packages/caption/README.md +61 -73
- package/packages/caption/package.json +3 -2
- package/packages/caption/src/activation.ts +2 -2
- package/packages/caption/src/component.ts +20 -5
- package/packages/caption/src/display.ts +3 -18
- package/packages/caption/src/fragment.ts +3 -7
- package/packages/caption/src/index.ts +6 -5
- package/packages/caption/src/manifest.ts +29 -46
- package/packages/caption/src/style.ts +24 -135
- package/packages/caption/src/surface.ts +12 -92
- package/packages/caption/src/temporalize.ts +18 -53
- package/packages/caption/src/types.ts +8 -35
- package/packages/caption/src/visibility.ts +23 -0
- package/packages/caption-fine/README.md +31 -11
- package/packages/caption-fine/package.json +4 -2
- package/packages/caption-fine/src/component.ts +3 -3
- package/packages/caption-fine/src/fragment.ts +7 -19
- package/packages/caption-fine/src/index.ts +2 -0
- package/packages/caption-fine/src/manifest.ts +27 -18
- package/packages/caption-fine/src/recipe.ts +7 -0
- package/packages/caption-fine/src/render.ts +62 -49
- package/packages/caption-fine/src/schedule.ts +39 -35
- package/packages/caption-fine/src/style.ts +10 -9
- package/packages/caption-fine/src/surface.ts +62 -35
- package/packages/caption-fine/src/types.ts +2 -0
- package/packages/caption-fine-studio/README.md +24 -2
- package/packages/caption-fine-studio/package.json +10 -3
- package/packages/caption-fine-studio/src/activation.ts +3 -3
- package/packages/caption-fine-studio/src/index.ts +61 -40
- package/packages/cli/README.md +81 -3
- package/packages/cli/package.json +1 -0
- package/packages/cli/src/arguments.ts +39 -15
- package/packages/cli/src/build-planning.ts +9 -3
- package/packages/cli/src/command.ts +7 -1
- package/packages/cli/src/commands/environment.ts +66 -27
- package/packages/cli/src/commands/execution.ts +81 -26
- package/packages/cli/src/commands/results.ts +7 -11
- package/packages/cli/src/index.ts +2 -2
- package/packages/cli/src/machine-view.ts +15 -5
- package/packages/cli/src/main.ts +38 -42
- package/packages/cli/src/observation.ts +7 -1
- package/packages/cli/src/output.ts +92 -34
- package/packages/cli/src/result-export.ts +22 -13
- package/packages/cli/src/run-file.ts +19 -8
- package/packages/cli/src/view.ts +64 -18
- package/packages/comment-sticker/README.md +3 -3
- package/packages/comment-sticker/package.json +1 -1
- package/packages/comment-sticker/src/component.ts +4 -4
- package/packages/comment-sticker/src/fragment.ts +5 -4
- package/packages/comment-sticker/src/manifest.ts +7 -6
- package/packages/comment-sticker/src/program.ts +9 -9
- package/packages/comment-sticker/src/surface.ts +6 -7
- package/packages/comment-sticker-studio/src/index.ts +2 -1
- package/packages/compiler-node/src/compiler.ts +1 -0
- package/packages/composition/README.md +21 -0
- package/packages/composition/src/audio-presentation.ts +44 -0
- package/packages/composition/src/index.ts +3 -0
- package/packages/composition/src/schema.ts +8 -3
- package/packages/composition/src/track.ts +15 -1
- package/packages/credential-store-env/README.md +1 -1
- package/packages/deck-track/README.md +3 -3
- package/packages/deck-track/package.json +1 -1
- package/packages/deck-track/src/component.ts +5 -5
- package/packages/deck-track/src/fragment.ts +6 -5
- package/packages/deck-track/src/lower.ts +12 -12
- package/packages/deck-track/src/manifest.ts +8 -7
- package/packages/deck-track/src/program.ts +13 -16
- package/packages/deck-track/src/surface.ts +9 -10
- package/packages/driver-node/src/driver.ts +41 -3
- package/packages/elevenlabs-speech/README.md +27 -0
- package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
- package/packages/elevenlabs-speech/src/activation.ts +26 -0
- package/packages/elevenlabs-speech/src/fragment.ts +11 -0
- package/packages/elevenlabs-speech/src/index.ts +111 -0
- package/packages/elevenlabs-speech/src/surface.ts +167 -0
- package/packages/endpoint-kit/README.md +24 -0
- package/packages/endpoint-kit/src/index.ts +7 -1
- package/packages/estimate/README.md +56 -3
- package/packages/estimate/src/program.ts +7 -8
- package/packages/film/README.md +12 -7
- package/packages/film/package.json +1 -1
- package/packages/film/src/component.ts +4 -4
- package/packages/film/src/fragment.ts +6 -5
- package/packages/film/src/manifest.ts +11 -10
- package/packages/film/src/program.ts +5 -5
- package/packages/film/src/recipe.ts +2 -1
- package/packages/film/src/surface.ts +6 -6
- package/packages/film-studio/package.json +1 -1
- package/packages/film-studio/src/index.ts +2 -2
- package/packages/fishaudio-speech/README.md +33 -0
- package/packages/fishaudio-speech/package.json +21 -0
- package/packages/fishaudio-speech/src/activation.ts +32 -0
- package/packages/fishaudio-speech/src/fragment.ts +11 -0
- package/packages/fishaudio-speech/src/index.ts +156 -0
- package/packages/fishaudio-speech/src/surface.ts +192 -0
- package/packages/fonts-open/README.md +5 -0
- package/packages/fonts-open/package.json +5 -1
- package/packages/fonts-open/src/studio.ts +21 -0
- package/packages/generation/README.md +11 -1
- package/packages/generation/src/mapping.ts +28 -30
- package/packages/gpt-image/README.md +1 -2
- package/packages/grok-imagine/README.md +1 -2
- package/packages/hyperframes/README.md +7 -3
- package/packages/hyperframes/src/browser-program.ts +11 -2
- package/packages/hyperframes/src/document.ts +15 -2
- package/packages/interview-emoji-reveal/README.md +4 -4
- package/packages/interview-emoji-reveal/package.json +1 -1
- package/packages/interview-emoji-reveal/src/component.ts +4 -4
- package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
- package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
- package/packages/interview-emoji-reveal/src/program.ts +14 -14
- package/packages/interview-emoji-reveal/src/surface.ts +8 -9
- package/packages/media-execution/README.md +7 -3
- package/packages/media-execution/src/audio-presentation.ts +23 -0
- package/packages/media-execution/src/execute.ts +2 -0
- package/packages/media-pipeline/README.md +7 -3
- package/packages/media-pipeline/src/audio-plan.ts +4 -1
- package/packages/media-pipeline/src/component.ts +16 -2
- package/packages/media-pipeline/src/manifest.ts +3 -1
- package/packages/media-pipeline/src/types.ts +2 -1
- package/packages/media-track/README.md +14 -47
- package/packages/media-track/package.json +1 -1
- package/packages/media-track/preview/preview.svml +5 -5
- package/packages/media-track/src/author.ts +12 -6
- package/packages/media-track/src/component.ts +10 -16
- package/packages/media-track/src/fragment.ts +8 -7
- package/packages/media-track/src/index.ts +3 -1
- package/packages/media-track/src/lower.ts +7 -7
- package/packages/media-track/src/manifest.ts +16 -38
- package/packages/media-track/src/program.ts +62 -67
- package/packages/media-track/src/sampling.ts +6 -6
- package/packages/media-track/src/sequence.ts +8 -8
- package/packages/media-track/src/surface.ts +25 -43
- package/packages/media-track-studio/README.md +9 -0
- package/packages/media-track-studio/src/index.ts +23 -13
- package/packages/mimo-speech/README.md +1 -1
- package/packages/minimax-h3/README.md +1 -1
- package/packages/nano-banana/README.md +1 -1
- package/packages/narrative/README.md +23 -1
- package/packages/narrative/src/identity.ts +11 -0
- package/packages/narrative/src/index.ts +3 -0
- package/packages/narrative/src/schema.ts +28 -27
- package/packages/narrative/src/selection.ts +52 -0
- package/packages/narrative/src/types.ts +2 -0
- package/packages/package-loader-node/README.md +30 -0
- package/packages/package-loader-node/package.json +5 -2
- package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
- package/packages/package-loader-node/src/index.ts +1 -0
- package/packages/package-loader-node/src/loader.ts +12 -15
- package/packages/package-loader-node/src/location.ts +27 -1
- package/packages/package-loader-node/src/module-scope.ts +183 -0
- package/packages/package-loader-node/src/types.ts +4 -0
- package/packages/performance/README.md +83 -0
- package/packages/performance/package.json +30 -0
- package/packages/performance/src/activation.ts +11 -0
- package/packages/performance/src/component.ts +46 -0
- package/packages/performance/src/index.ts +6 -0
- package/packages/performance/src/manifest.ts +53 -0
- package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
- package/packages/performance/src/program.ts +51 -0
- package/packages/performance/src/style.ts +35 -0
- package/packages/performance/src/surface.ts +99 -0
- package/packages/performance-studio/README.md +25 -0
- package/packages/performance-studio/package.json +21 -0
- package/packages/performance-studio/src/activation.ts +6 -0
- package/packages/performance-studio/src/index.ts +84 -0
- package/packages/program-space/README.md +9 -18
- package/packages/program-space/src/activation.ts +1 -5
- package/packages/program-space/src/index.ts +2 -11
- package/packages/program-space/src/surface.ts +1 -20
- package/packages/project-context-node/README.md +20 -0
- package/packages/project-context-node/package.json +10 -0
- package/packages/project-context-node/src/index.ts +3 -0
- package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
- package/packages/provider-hyperframes-local/README.md +43 -15
- package/packages/provider-hyperframes-local/src/activation.ts +4 -3
- package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
- package/packages/provider-hyperframes-local/src/capture.ts +96 -26
- package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
- package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
- package/packages/provider-hyperframes-local/src/options.ts +2 -0
- package/packages/provider-hyperframes-local/src/program.ts +6 -3
- package/packages/provider-hyperframes-local/src/progress.ts +53 -0
- package/packages/provider-hyperframes-local/src/provider.ts +18 -5
- package/packages/provider-hyperframes-local/src/render.ts +48 -7
- package/packages/provider-hypihub/README.md +48 -17
- package/packages/provider-hypihub/package.json +2 -0
- package/packages/provider-hypihub/src/mapping.ts +31 -7
- package/packages/provider-hypihub/src/oauth.ts +6 -0
- package/packages/provider-hypihub/src/provider.ts +25 -13
- package/packages/provider-hypihub/src/routes.ts +1 -2
- package/packages/provider-hypihub/src/upload.ts +2 -0
- package/packages/provider-media-local/README.md +3 -4
- package/packages/provider-whisperx-local/README.md +57 -0
- package/packages/provider-whisperx-local/src/program.ts +1 -0
- package/packages/provider-whisperx-local/src/provider.ts +3 -0
- package/packages/ranking/README.md +8 -6
- package/packages/ranking/package.json +1 -1
- package/packages/ranking/src/component.ts +6 -6
- package/packages/ranking/src/fragment.ts +11 -7
- package/packages/ranking/src/manifest.ts +21 -14
- package/packages/ranking/src/render.ts +33 -35
- package/packages/ranking/src/schedule.ts +16 -19
- package/packages/ranking/src/surface.ts +12 -13
- package/packages/ranking-studio/README.md +29 -0
- package/packages/ranking-studio/package.json +8 -3
- package/packages/ranking-studio/src/index.ts +71 -12
- package/packages/render-hyperframes/README.md +7 -7
- package/packages/render-hyperframes/package.json +1 -1
- package/packages/render-hyperframes/src/component.ts +11 -1
- package/packages/render-hyperframes/src/fragment.ts +7 -4
- package/packages/render-hyperframes/src/manifest.ts +4 -4
- package/packages/render-hyperframes/src/surface.ts +6 -6
- package/packages/runtime/README.md +8 -1
- package/packages/runtime/src/catalog.ts +2 -0
- package/packages/runtime/src/execution.ts +15 -4
- package/packages/runtime/src/index.ts +2 -1
- package/packages/runtime/src/log.ts +51 -0
- package/packages/runtime/src/types.ts +5 -8
- package/packages/runtime-host-node/README.md +30 -0
- package/packages/runtime-host-node/package.json +1 -0
- package/packages/runtime-host-node/src/index.ts +25 -9
- package/packages/runtime-host-node/src/packages.ts +47 -50
- package/packages/runtime-kit/README.md +5 -0
- package/packages/runtime-kit/src/index.ts +3 -1
- package/packages/runtime-local/README.md +111 -4
- package/packages/runtime-local/src/config.ts +202 -56
- package/packages/runtime-local/src/control.ts +9 -1
- package/packages/runtime-local/src/executor.ts +66 -0
- package/packages/runtime-local/src/host.ts +37 -17
- package/packages/runtime-local/src/log.ts +48 -0
- package/packages/runtime-local/src/programs.ts +41 -25
- package/packages/runtime-local/src/result-writer.ts +2 -0
- package/packages/runtime-local/src/runtime.ts +10 -6
- package/packages/runtime-local/src/supervisor.ts +142 -0
- package/packages/runtime-local/src/types.ts +9 -2
- package/packages/runtime-local/src/worker-process.ts +7 -24
- package/packages/runtime-local/src/worker.ts +55 -83
- package/packages/screen-overlay/README.md +3 -3
- package/packages/screen-overlay/package.json +1 -1
- package/packages/screen-overlay/src/component.ts +3 -3
- package/packages/screen-overlay/src/fragment.ts +5 -4
- package/packages/screen-overlay/src/manifest.ts +7 -6
- package/packages/screen-overlay/src/program.ts +9 -9
- package/packages/screen-overlay/src/surface.ts +6 -7
- package/packages/script/README.md +37 -2
- package/packages/script/src/edit.ts +123 -73
- package/packages/script/src/lexical.ts +40 -6
- package/packages/script/src/manifest.ts +2 -2
- package/packages/script/src/narrative.ts +1 -0
- package/packages/script/src/parser.ts +36 -8
- package/packages/script/src/surface.ts +4 -3
- package/packages/script/src/types.ts +5 -1
- package/packages/script-studio/package.json +9 -3
- package/packages/script-studio/src/index.ts +2 -0
- package/packages/script-studio/src/projection.ts +105 -0
- package/packages/seedance/README.md +30 -1
- package/packages/seedance/src/index.ts +18 -7
- package/packages/seedance/src/surface.ts +17 -4
- package/packages/seedance-kits/README.md +10 -2
- package/packages/seedance-kits/kits/speaker-v1.svs +5 -5
- package/packages/seedream/README.md +1 -1
- package/packages/sound/README.md +81 -0
- package/packages/sound/package.json +25 -0
- package/packages/sound/src/activation.ts +11 -0
- package/packages/sound/src/component.ts +28 -0
- package/packages/sound/src/index.ts +5 -0
- package/packages/sound/src/manifest.ts +47 -0
- package/packages/sound/src/program.ts +84 -0
- package/packages/sound/src/style.ts +34 -0
- package/packages/sound/src/surface.ts +90 -0
- package/packages/sound-studio/README.md +22 -0
- package/packages/sound-studio/package.json +20 -0
- package/packages/sound-studio/src/activation.ts +6 -0
- package/packages/sound-studio/src/index.ts +74 -0
- package/packages/speech/README.md +2 -2
- package/packages/speech-alignment/src/align.ts +45 -21
- package/packages/speech-alignment/src/local.ts +8 -0
- package/packages/speech-alignment/src/locate.ts +1 -1
- package/packages/store-sqlite/README.md +7 -0
- package/packages/store-sqlite/src/store.ts +84 -83
- package/packages/studio/INSPECTOR.md +117 -0
- package/packages/studio/README.md +149 -14
- package/packages/studio/package.json +8 -7
- package/packages/studio/src/build-library.ts +99 -84
- package/packages/studio/src/companion-assembly.ts +1 -0
- package/packages/studio/src/domain.ts +1 -1
- package/packages/studio/src/fallback-companions.ts +3 -3
- package/packages/studio/src/feedback-server.ts +51 -0
- package/packages/studio/src/feedback-store.ts +66 -0
- package/packages/studio/src/feedback.ts +60 -0
- package/packages/studio/src/library-media.ts +19 -0
- package/packages/studio/src/parameter-values.ts +83 -1
- package/packages/studio/src/parameters.ts +132 -43
- package/packages/studio/src/preview/render.ts +5 -1
- package/packages/studio/src/preview/runtime-shim.ts +49 -3
- package/packages/studio/src/programme.ts +14 -30
- package/packages/studio/src/server.ts +66 -34
- package/packages/studio/src/shared.ts +24 -8
- package/packages/studio/src/snapshot.ts +21 -132
- package/packages/studio/src/studio-preflight.ts +3 -3
- package/packages/studio/src/studio-registry.ts +72 -6
- package/packages/studio/src/style.css +342 -190
- package/packages/studio/src/temporal-edit.ts +131 -0
- package/packages/studio/src/ui/artifact-name.ts +80 -0
- package/packages/studio/src/ui/artifact-preview.ts +99 -0
- package/packages/studio/src/ui/comments.ts +233 -0
- package/packages/studio/src/ui/icons.ts +10 -1
- package/packages/studio/src/ui/library.ts +373 -192
- package/packages/studio/src/ui/main.ts +291 -110
- package/packages/studio/src/ui/material-preview.ts +1 -1
- package/packages/studio/src/ui/overlay.ts +31 -26
- package/packages/studio/src/ui/scrub-preview.ts +108 -0
- package/packages/studio/src/ui/sidebar-panel.ts +31 -0
- package/packages/studio/src/ui/stage.ts +188 -9
- package/packages/studio/src/ui/timeline.ts +187 -281
- package/packages/studio/start.ts +19 -5
- package/packages/studio-adapter/README.md +151 -11
- package/packages/studio-adapter/src/index.ts +126 -14
- package/packages/temporal/README.md +6 -6
- package/packages/temporal/package.json +1 -1
- package/packages/temporal/src/component.ts +5 -6
- package/packages/temporal/src/index.ts +8 -6
- package/packages/temporal/src/location.ts +11 -11
- package/packages/temporal/src/projection.ts +19 -19
- package/packages/temporal/src/rational.ts +4 -4
- package/packages/temporal-markup/EDITING.md +183 -0
- package/packages/temporal-markup/README.md +31 -11
- package/packages/temporal-markup/package.json +1 -1
- package/packages/temporal-markup/src/index.ts +20 -25
- package/packages/temporal-markup/src/space.ts +10 -41
- package/packages/timeline/README.md +31 -0
- package/packages/{semantic-track → timeline}/package.json +1 -1
- package/packages/timeline/src/activation.ts +8 -0
- package/packages/timeline/src/component.ts +24 -0
- package/packages/timeline/src/identity.ts +60 -0
- package/packages/timeline/src/index.ts +6 -0
- package/packages/{semantic-track → timeline}/src/location.ts +20 -20
- package/packages/timeline/src/manifest.ts +39 -0
- package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
- package/packages/timeline/src/types.ts +24 -0
- package/packages/timeline-author/README.md +68 -0
- package/packages/{speech-track → timeline-author}/package.json +6 -4
- package/packages/timeline-author/src/activation.ts +22 -0
- package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
- package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
- package/packages/timeline-author/src/index.ts +7 -0
- package/packages/timeline-author/src/manifest.ts +78 -0
- package/packages/timeline-author/src/program.ts +107 -0
- package/packages/timeline-author/src/surface.ts +46 -0
- package/packages/timeline-author/src/types.ts +6 -0
- package/packages/typography-track/README.md +4 -4
- package/packages/typography-track/package.json +1 -1
- package/packages/typography-track/src/component.ts +4 -4
- package/packages/typography-track/src/fragment.ts +4 -3
- package/packages/typography-track/src/manifest.ts +11 -9
- package/packages/typography-track/src/program.ts +15 -15
- package/packages/typography-track/src/surface.ts +17 -18
- package/packages/typography-track-studio/package.json +8 -3
- package/packages/typography-track-studio/src/index.ts +5 -1
- package/packages/video-cli/README.md +16 -4
- package/packages/video-cli/package.json +2 -1
- package/packages/video-cli/src/creation.ts +25 -9
- package/packages/video-cli/src/index.ts +1 -1
- package/packages/video-cli/src/studio-distribution.ts +2 -1
- package/packages/volcengine-matting/README.md +3 -3
- package/packages/whisperx/README.md +8 -1
- package/packages/workspace/src/index.ts +2 -0
- package/packages/workspace-fs-node/README.md +4 -1
- package/packages/workspace-fs-node/src/workspace.ts +3 -1
- package/services/whisperx/README.md +14 -0
- package/services/whisperx/pyproject.toml +2 -0
- package/services/whisperx/uv.lock +20 -20
- package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
- package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
- package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
- package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
- package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
- package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
- package/packages/provider-kie/README.md +0 -134
- package/packages/provider-kie/package.json +0 -43
- package/packages/provider-kie/src/activation.ts +0 -71
- package/packages/provider-kie/src/index.ts +0 -10
- package/packages/provider-kie/src/mapping.ts +0 -182
- package/packages/provider-kie/src/provider.ts +0 -657
- package/packages/provider-kie/src/routes.ts +0 -150
- package/packages/provider-xiaomi-mimo/README.md +0 -32
- package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
- package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
- package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
- package/packages/runtime/src/environment.ts +0 -6
- package/packages/semantic-track/README.md +0 -21
- package/packages/semantic-track/src/activation.ts +0 -8
- package/packages/semantic-track/src/component.ts +0 -24
- package/packages/semantic-track/src/identity.ts +0 -58
- package/packages/semantic-track/src/index.ts +0 -6
- package/packages/semantic-track/src/manifest.ts +0 -38
- package/packages/semantic-track/src/types.ts +0 -26
- package/packages/speech-track/README.md +0 -51
- package/packages/speech-track/src/activation.ts +0 -19
- package/packages/speech-track/src/index.ts +0 -7
- package/packages/speech-track/src/manifest.ts +0 -73
- package/packages/speech-track/src/program.ts +0 -64
- package/packages/speech-track/src/surface.ts +0 -35
- package/packages/speech-track/src/types.ts +0 -6
- package/packages/speech-track-studio/README.md +0 -3
- package/packages/speech-track-studio/package.json +0 -14
- package/packages/speech-track-studio/src/activation.ts +0 -7
- package/packages/speech-track-studio/src/index.ts +0 -40
- /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
- /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
|
@@ -25,13 +25,6 @@ export type RuntimeRunnableCommand = {
|
|
|
25
25
|
|
|
26
26
|
export type RuntimeResourceClaim = import("./capacity.js").CapacityResourceClaim;
|
|
27
27
|
|
|
28
|
-
export type RuntimeWorkerRunOptions = {
|
|
29
|
-
readonly idlePollMs: number;
|
|
30
|
-
readonly signal?: AbortSignal;
|
|
31
|
-
/** Called after abandoned work is claimable and immediately before the claim loop starts. */
|
|
32
|
-
readonly ready?: () => void | Promise<void>;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
28
|
export type RuntimePreparation = {
|
|
36
29
|
readonly state: BuildState;
|
|
37
30
|
readonly runnable: readonly RuntimeRunnableCommand[];
|
|
@@ -41,6 +34,10 @@ export type RuntimePreparation = {
|
|
|
41
34
|
export type RuntimeExecutionContext = {
|
|
42
35
|
/** Stable Run-local identity; two identical BuildRequests may still be distinct Builds. */
|
|
43
36
|
readonly build: string;
|
|
37
|
+
/** Observational activity of this call; it never changes scheduling or Core facts. */
|
|
38
|
+
readonly reportProgress?: (activity: NonNullable<import("./execution.js").CommandExecutionReceipt["activity"]>) => Promise<void>;
|
|
39
|
+
/** Execution evidence; the Runtime owns persistence. Implementations keep logging failures out of Provider outcomes. */
|
|
40
|
+
readonly recordExecution?: (event: import("./log.js").ExecutionLogEvent) => Promise<void>;
|
|
44
41
|
/** Release only the asynchronous Operation's occupancy after its remote end is confirmed. */
|
|
45
42
|
readonly releaseOperationCapacity?: () => Promise<void>;
|
|
46
43
|
};
|
|
@@ -72,7 +69,7 @@ export type RuntimeCommandExecutor = {
|
|
|
72
69
|
state: BuildState,
|
|
73
70
|
operation: OperationSnapshot,
|
|
74
71
|
): Promise<OperationSnapshot>;
|
|
75
|
-
advanceOperation?(operation: OperationSnapshot): Promise<OperationSnapshot>;
|
|
72
|
+
advanceOperation?(operation: OperationSnapshot, context?: RuntimeExecutionContext): Promise<OperationSnapshot>;
|
|
76
73
|
/** Validate an already received result without invoking a Producer or contacting an Endpoint. */
|
|
77
74
|
acceptOperation?(state: BuildState, operation: OperationSnapshot): Promise<CommandResult | undefined>;
|
|
78
75
|
};
|
|
@@ -23,3 +23,33 @@ over a graph state, deterministic Producers, validators and temporary Resources;
|
|
|
23
23
|
Endpoint selection, handlers and concurrency for that disposable session private and returns the evaluated
|
|
24
24
|
state. This is an execution boundary, not a second Runtime Profile, Build type, cross-Build scheduler or
|
|
25
25
|
preview registry.
|
|
26
|
+
|
|
27
|
+
`RuntimeHostControl.logs(build, lines)` optionally exposes a bounded tail of active Build evidence.
|
|
28
|
+
Finished logs belong to `BuildResultManifest.executionLog` and are read through the project's Repository;
|
|
29
|
+
reading a finished log needs no Runtime or execution Provider. Runtime process logs keep their separate
|
|
30
|
+
process-control operation.
|
|
31
|
+
|
|
32
|
+
`prepare`, `preflight`, `doctor` and Program lifecycle operations accept explicit Endpoint instance
|
|
33
|
+
names. Build preflight uses resolved Endpoints, not every Provider offering the capability. Omitting
|
|
34
|
+
a scope retains whole-Profile inspection or preparation.
|
|
35
|
+
|
|
36
|
+
`prepareHostPackages` keeps exact releases in separate ordinary npm installations below the Host
|
|
37
|
+
package home. `HostPackageProgress.logPath` identifies live and retained npm output; failures include
|
|
38
|
+
that path. npm owns each installation's dependency tree and lockfile. No parallel package inventory is
|
|
39
|
+
maintained. `RuntimeInvocationObservation` passes direct-call progress and diagnostics through the
|
|
40
|
+
same Provider callbacks used in Builds, without giving immediate calls durable Operation semantics.
|
|
41
|
+
|
|
42
|
+
## Execution choices and lifetime
|
|
43
|
+
|
|
44
|
+
`createRuntime({ endpoints })` scopes a submission to the selected Endpoint instances. The local Host
|
|
45
|
+
records those choices and its project package root with the active execution request. Its long-lived
|
|
46
|
+
Worker supervises carriers with independent per-Build module and registry contexts. Managed
|
|
47
|
+
Programs remain independently warm. `runWorker` accepts an internal carrier entry point; execution
|
|
48
|
+
readiness and Endpoint capacity are independent of the number of unfinished Builds. Other Hosts own
|
|
49
|
+
their choice of code-loading and physical execution mechanisms.
|
|
50
|
+
|
|
51
|
+
Submission clients use `const controller = await host.controller(); await controller.worker.up()`
|
|
52
|
+
to start execution, then `const runtime = await host.createRuntime(); await runtime.build(request)`
|
|
53
|
+
to submit work. `RuntimeHostExecution` does not run a second embedded Worker loop. A local carrier
|
|
54
|
+
may stop accepting new Builds and drain; its assigned Builds stay in place and all carriers continue
|
|
55
|
+
using the same resource accounting. Process policy belongs to the local Runtime, not this Host ABI.
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"@hypit/build-result": "workspace:*",
|
|
12
12
|
"@hypit/build-result-kit": "workspace:*",
|
|
13
13
|
"@hypit/driver-node": "workspace:*",
|
|
14
|
+
"@hypit/package-loader-node": "workspace:*",
|
|
14
15
|
"@hypit/protocol": "workspace:*",
|
|
15
16
|
"@hypit/runtime": "workspace:*",
|
|
16
17
|
"@hypit/runtime-kit": "workspace:*",
|
|
@@ -16,7 +16,6 @@ import type {
|
|
|
16
16
|
CredentialRef,
|
|
17
17
|
OperationSnapshot,
|
|
18
18
|
ResourceStore,
|
|
19
|
-
RuntimeWorkerRunOptions,
|
|
20
19
|
} from "@hypit/runtime";
|
|
21
20
|
import type { RuntimeDoctorDiagnostic } from "@hypit/runtime-kit";
|
|
22
21
|
|
|
@@ -63,6 +62,12 @@ export type BuildView = {
|
|
|
63
62
|
readonly acceptedRecords: number;
|
|
64
63
|
readonly outstandingCommands: number;
|
|
65
64
|
readonly operations: readonly BuildOperationView[];
|
|
65
|
+
/** Activity reported by calls running in the local Worker. */
|
|
66
|
+
readonly commands?: readonly {
|
|
67
|
+
readonly id: string;
|
|
68
|
+
readonly endpoint: string;
|
|
69
|
+
readonly progress: NonNullable<OperationSnapshot["progress"]>;
|
|
70
|
+
}[];
|
|
66
71
|
};
|
|
67
72
|
|
|
68
73
|
export type RuntimeHostCredentialStatus = {
|
|
@@ -77,6 +82,8 @@ export type RuntimeHostCredentialStatus = {
|
|
|
77
82
|
};
|
|
78
83
|
|
|
79
84
|
export type RuntimeHostControl = {
|
|
85
|
+
/** Build evidence while active. Finished evidence is read through its Result Repository. */
|
|
86
|
+
logs?(build: string, lines: number): Promise<import("@hypit/runtime").ExecutionLogView | undefined>;
|
|
80
87
|
inspect(build: string): Promise<BuildView | undefined>;
|
|
81
88
|
activity(): Promise<{
|
|
82
89
|
readonly builds: readonly BuildView[];
|
|
@@ -119,6 +126,7 @@ export type RuntimeHostExecution = RuntimeHostControl & RuntimeHostCredentialCon
|
|
|
119
126
|
readonly repository: BuildResultRepositoryLocation;
|
|
120
127
|
readonly title?: string;
|
|
121
128
|
readonly forwards?: readonly BuildResultForward[];
|
|
129
|
+
readonly resourceReferences?: Readonly<Record<string, import("@hypit/build-result").BuildResultFileRef>>;
|
|
122
130
|
};
|
|
123
131
|
}, options?: {
|
|
124
132
|
readonly follow?: boolean;
|
|
@@ -126,7 +134,6 @@ export type RuntimeHostExecution = RuntimeHostControl & RuntimeHostCredentialCon
|
|
|
126
134
|
readonly maxWaitMs?: number;
|
|
127
135
|
readonly signal?: AbortSignal;
|
|
128
136
|
}): Promise<RuntimeHostBuildSubmission>;
|
|
129
|
-
work(options: RuntimeWorkerRunOptions): Promise<void>;
|
|
130
137
|
};
|
|
131
138
|
|
|
132
139
|
export type RuntimeHostDoctorResult = {
|
|
@@ -213,7 +220,6 @@ export type ManagedProgramReport = {
|
|
|
213
220
|
|
|
214
221
|
export type RuntimeWorkerState = {
|
|
215
222
|
readonly state: "running" | "stopped";
|
|
216
|
-
readonly configuration?: "current" | "changed";
|
|
217
223
|
readonly profile: string;
|
|
218
224
|
readonly pid?: number;
|
|
219
225
|
readonly startedAt?: number;
|
|
@@ -234,9 +240,10 @@ export type RuntimeController = {
|
|
|
234
240
|
readonly maxWaitMs?: number;
|
|
235
241
|
readonly onProgress?: (event: ManagedProgramProgress) => void;
|
|
236
242
|
readonly capabilities?: readonly CapabilityRef[];
|
|
243
|
+
readonly endpoints?: readonly string[];
|
|
237
244
|
}): Promise<{ readonly dataRoot: string; readonly programs: readonly ManagedProgramReport[] }>;
|
|
238
|
-
down(): Promise<{ readonly dataRoot: string; readonly programs: readonly ManagedProgramReport[] }>;
|
|
239
|
-
report(): Promise<{ readonly dataRoot: string; readonly programs: readonly ManagedProgramReport[] }>;
|
|
245
|
+
down(options?: { readonly endpoints?: readonly string[] }): Promise<{ readonly dataRoot: string; readonly programs: readonly ManagedProgramReport[] }>;
|
|
246
|
+
report(options?: { readonly endpoints?: readonly string[] }): Promise<{ readonly dataRoot: string; readonly programs: readonly ManagedProgramReport[] }>;
|
|
240
247
|
};
|
|
241
248
|
};
|
|
242
249
|
|
|
@@ -254,7 +261,7 @@ export type NodeRuntimeHost = {
|
|
|
254
261
|
controller(options?: {
|
|
255
262
|
readonly packageRoot?: string;
|
|
256
263
|
}): Promise<RuntimeController>;
|
|
257
|
-
createRuntime(): Promise<RuntimeHostExecution>;
|
|
264
|
+
createRuntime(options?: { readonly endpoints?: readonly string[] }): Promise<RuntimeHostExecution>;
|
|
258
265
|
openControl(options?: { readonly readOnly?: boolean }): Promise<RuntimeHostControl>;
|
|
259
266
|
/** Open only Result-writing dependencies; never construct execution Providers. */
|
|
260
267
|
openResultControl(): Promise<RuntimeHostResultControl>;
|
|
@@ -262,6 +269,7 @@ export type NodeRuntimeHost = {
|
|
|
262
269
|
/** Explicitly prepare upstream packages selected by this Runtime Profile. */
|
|
263
270
|
prepare(options?: {
|
|
264
271
|
readonly onProgress?: (event: import("./packages.js").HostPackageProgress) => void;
|
|
272
|
+
readonly endpoints?: readonly string[];
|
|
265
273
|
}): Promise<readonly import("./packages.js").HostPackageReport[]>;
|
|
266
274
|
/**
|
|
267
275
|
* Read-only, bounded deployment validation for one demanded Build slice.
|
|
@@ -270,10 +278,12 @@ export type NodeRuntimeHost = {
|
|
|
270
278
|
*/
|
|
271
279
|
preflight(options?: {
|
|
272
280
|
readonly capabilities?: readonly CapabilityRef[];
|
|
281
|
+
readonly endpoints?: readonly string[];
|
|
273
282
|
}): Promise<RuntimeHostDoctorResult>;
|
|
274
283
|
/** Active deployment diagnosis. Unlike preflight, adapters may contact their configured services. */
|
|
275
284
|
doctor(options?: {
|
|
276
285
|
readonly capabilities?: readonly CapabilityRef[];
|
|
286
|
+
readonly endpoints?: readonly string[];
|
|
277
287
|
}): Promise<RuntimeHostDoctorResult>;
|
|
278
288
|
/**
|
|
279
289
|
* Which selected Endpoint would serve each capability and where its Provider publishes prices.
|
|
@@ -287,10 +297,16 @@ export type NodeRuntimeHost = {
|
|
|
287
297
|
* The creation-time boundary for observation, transcription and other quick capabilities; it
|
|
288
298
|
* creates no Build, Result or state, and refuses asynchronous capabilities.
|
|
289
299
|
*/
|
|
290
|
-
invoke(need: Need, resources: ResourceStore): Promise<{ readonly value: StoredValue }>;
|
|
300
|
+
invoke(need: Need, resources: ResourceStore, observation?: RuntimeInvocationObservation): Promise<{ readonly value: StoredValue }>;
|
|
291
301
|
/** Open one disposable authoring execution. It creates no Build, Result or recoverable Operation. */
|
|
292
302
|
openTransientExecution(): Promise<RuntimeHostTransientExecution>;
|
|
293
|
-
runWorker(readyFile: string, owner: string): Promise<void>;
|
|
303
|
+
runWorker(readyFile: string, owner: string, execution?: { readonly dataRoot: string }): Promise<void>;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
/** Progress stays with the selected Provider; immediate calls need no synthetic Build. */
|
|
307
|
+
export type RuntimeInvocationObservation = {
|
|
308
|
+
readonly reportProgress?: (progress: import("@hypit/runtime").OperationProgress) => Promise<void>;
|
|
309
|
+
readonly reportDiagnostic?: (diagnostic: import("@hypit/runtime").ExecutionDiagnostic) => Promise<void>;
|
|
294
310
|
};
|
|
295
311
|
|
|
296
312
|
/**
|
|
@@ -320,7 +336,7 @@ export function hypitHostStateRoot(options: {
|
|
|
320
336
|
: state, "hypit");
|
|
321
337
|
}
|
|
322
338
|
|
|
323
|
-
/**
|
|
339
|
+
/** Home of version-isolated upstream npm installations shared across projects. */
|
|
324
340
|
export function hypitHostPackageRoot(hostStateRoot = hypitHostStateRoot()): string {
|
|
325
341
|
return join(resolve(hostStateRoot), "packages");
|
|
326
342
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
|
-
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { mkdir, open, readFile, realpath, writeFile } from "node:fs/promises";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
|
+
import { externalPackageInstallRoot } from "@hypit/package-loader-node";
|
|
4
5
|
|
|
5
6
|
export type RegistryPackageSpec = {
|
|
6
7
|
readonly name: string;
|
|
@@ -10,11 +11,13 @@ export type RegistryPackageSpec = {
|
|
|
10
11
|
|
|
11
12
|
export type HostPackageReport = RegistryPackageSpec & {
|
|
12
13
|
readonly root: string;
|
|
14
|
+
readonly logPath?: string;
|
|
13
15
|
readonly action: "already-installed" | "installed";
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
export type HostPackageProgress = RegistryPackageSpec & {
|
|
17
19
|
readonly phase: "checking" | "installing" | "ready";
|
|
20
|
+
readonly logPath?: string;
|
|
18
21
|
};
|
|
19
22
|
|
|
20
23
|
function exactVersion(value: string): boolean {
|
|
@@ -63,18 +66,20 @@ export async function inspectHostPackage(
|
|
|
63
66
|
root: string,
|
|
64
67
|
): Promise<HostPackageReport | undefined> {
|
|
65
68
|
const required = parseRegistryPackageSpec(specifier);
|
|
66
|
-
const
|
|
69
|
+
const installation = externalPackageInstallRoot(root, required.name, required.version);
|
|
70
|
+
const version = await installedVersion(installation, required.name);
|
|
67
71
|
return version === required.version
|
|
68
|
-
? { ...required, root:
|
|
72
|
+
? { ...required, root: installation, action: "already-installed" }
|
|
69
73
|
: undefined;
|
|
70
74
|
}
|
|
71
75
|
|
|
72
|
-
function runNpm(root: string, specifiers: readonly string[]): Promise<void> {
|
|
76
|
+
async function runNpm(root: string, specifiers: readonly string[], logPath: string): Promise<void> {
|
|
77
|
+
// npm's prefix and cwd must denote the same physical project (not /tmp vs /private/tmp).
|
|
78
|
+
const cwd = await realpath(root);
|
|
73
79
|
const npmArgs = [
|
|
74
80
|
"install",
|
|
75
|
-
"--prefix",
|
|
81
|
+
"--prefix", cwd,
|
|
76
82
|
"--save-exact",
|
|
77
|
-
"--package-lock=false",
|
|
78
83
|
"--no-audit",
|
|
79
84
|
"--no-fund",
|
|
80
85
|
"--omit=dev",
|
|
@@ -83,27 +88,30 @@ function runNpm(root: string, specifiers: readonly string[]): Promise<void> {
|
|
|
83
88
|
const windows = process.platform === "win32";
|
|
84
89
|
const command = windows ? (process.env.ComSpec ?? "cmd.exe") : "npm";
|
|
85
90
|
const args = windows ? ["/d", "/s", "/c", "npm.cmd", ...npmArgs] : npmArgs;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
const log = await open(logPath, "a");
|
|
92
|
+
await log.write(`\n${new Date().toISOString()} npm ${npmArgs.join(" ")}\n`);
|
|
93
|
+
try {
|
|
94
|
+
await new Promise<void>((done, reject) => {
|
|
95
|
+
const child = spawn(command, args, {
|
|
96
|
+
cwd,
|
|
97
|
+
shell: false,
|
|
98
|
+
windowsHide: true,
|
|
99
|
+
stdio: ["ignore", log.fd, log.fd],
|
|
100
|
+
});
|
|
101
|
+
child.on("error", (error) => reject(new Error(`Cannot start npm: ${error.message}. Log: ${logPath}`, { cause: error })));
|
|
102
|
+
child.on("close", (code) => {
|
|
103
|
+
if (code === 0) done();
|
|
104
|
+
else reject(new Error(`npm install failed (exit ${code ?? "signal"}). Log: ${logPath}`));
|
|
105
|
+
});
|
|
99
106
|
});
|
|
100
|
-
}
|
|
107
|
+
} finally {
|
|
108
|
+
await log.close();
|
|
109
|
+
}
|
|
101
110
|
}
|
|
102
111
|
|
|
103
112
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* creates no lock, receipt, hash inventory or project-local copy.
|
|
113
|
+
* Reuse each exact upstream release in its own npm installation. npm owns its
|
|
114
|
+
* package.json, lockfile and dependencies; Hypit keeps no parallel inventory.
|
|
107
115
|
*/
|
|
108
116
|
export async function prepareHostPackages(
|
|
109
117
|
specifiers: readonly string[],
|
|
@@ -113,46 +121,35 @@ export async function prepareHostPackages(
|
|
|
113
121
|
},
|
|
114
122
|
): Promise<readonly HostPackageReport[]> {
|
|
115
123
|
const root = resolve(options.root);
|
|
116
|
-
const
|
|
124
|
+
const bySpecifier = new Map<string, RegistryPackageSpec>();
|
|
117
125
|
for (const specifier of specifiers) {
|
|
118
126
|
const parsed = parseRegistryPackageSpec(specifier);
|
|
119
|
-
|
|
120
|
-
if (previous !== undefined && previous.version !== parsed.version) {
|
|
121
|
-
throw new Error(`${parsed.name} is required at both ${previous.version} and ${parsed.version}`);
|
|
122
|
-
}
|
|
123
|
-
byName.set(parsed.name, parsed);
|
|
127
|
+
bySpecifier.set(parsed.specifier, parsed);
|
|
124
128
|
}
|
|
125
|
-
const required = [...
|
|
126
|
-
const
|
|
129
|
+
const required = [...bySpecifier.values()].sort((left, right) => left.specifier.localeCompare(right.specifier));
|
|
130
|
+
const reports: HostPackageReport[] = [];
|
|
127
131
|
for (const item of required) {
|
|
132
|
+
const installation = externalPackageInstallRoot(root, item.name, item.version);
|
|
128
133
|
options.onProgress?.({ ...item, phase: "checking" });
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
await readFile(join(root, "package.json"), "utf8");
|
|
135
|
-
} catch (error) {
|
|
136
|
-
if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) throw error;
|
|
137
|
-
await writeFile(join(root, "package.json"), `${JSON.stringify({
|
|
134
|
+
const missing = await installedVersion(installation, item.name) !== item.version;
|
|
135
|
+
const logPath = join(installation, "install.log");
|
|
136
|
+
if (missing) {
|
|
137
|
+
await mkdir(installation, { recursive: true });
|
|
138
|
+
await writeFile(join(installation, "package.json"), `${JSON.stringify({
|
|
138
139
|
name: "hypit-machine-packages",
|
|
139
140
|
private: true,
|
|
140
141
|
description: "Upstream npm packages used on demand by Hypit",
|
|
141
|
-
dependencies: {},
|
|
142
|
+
dependencies: { [item.name]: item.version },
|
|
142
143
|
}, null, 2)}\n`, "utf8");
|
|
144
|
+
options.onProgress?.({ ...item, phase: "installing", logPath });
|
|
145
|
+
await runNpm(installation, [item.specifier], logPath);
|
|
143
146
|
}
|
|
144
|
-
|
|
145
|
-
await runNpm(root, missing.map((item) => item.specifier));
|
|
146
|
-
}
|
|
147
|
-
const installed = new Set(missing.map((item) => item.name));
|
|
148
|
-
const reports: HostPackageReport[] = [];
|
|
149
|
-
for (const item of required) {
|
|
150
|
-
const version = await installedVersion(root, item.name);
|
|
147
|
+
const version = await installedVersion(installation, item.name);
|
|
151
148
|
if (version !== item.version) {
|
|
152
|
-
throw new Error(`npm did not install ${item.specifier} into ${
|
|
149
|
+
throw new Error(`npm did not install ${item.specifier} into ${installation}. Log: ${logPath}`);
|
|
153
150
|
}
|
|
154
151
|
options.onProgress?.({ ...item, phase: "ready" });
|
|
155
|
-
reports.push({ ...item, root,
|
|
152
|
+
reports.push({ ...item, root: installation, ...(missing ? { logPath } : {}), action: missing ? "installed" : "already-installed" });
|
|
156
153
|
}
|
|
157
154
|
return reports;
|
|
158
155
|
}
|
|
@@ -40,3 +40,8 @@ WhisperX process. Credential adapters validate configuration before opening a st
|
|
|
40
40
|
storage belongs to the Runtime implementation, while project Build Result repositories use the
|
|
41
41
|
separate `@hypit/build-result-kit` boundary. Runtime Kit knows no Provider, filesystem, database or
|
|
42
42
|
video package by name.
|
|
43
|
+
|
|
44
|
+
`ManagedProgram.installation.prepareBeforeStart` lets a Provider reconcile its installed environment
|
|
45
|
+
before a cold start, even when the installation probe already passes. The declared commands use the
|
|
46
|
+
Provider's ordinary package manager. A healthy running Program is reused before this preparation is
|
|
47
|
+
considered; Runtime does not inspect source files or infer implementation versions.
|
|
@@ -42,7 +42,9 @@ export type ManagedProgramCommand = {
|
|
|
42
42
|
export type ManagedProgramInstallation = {
|
|
43
43
|
/** Truthful inspection of the installed program; no installer-owned receipt. */
|
|
44
44
|
probe(): Promise<ManagedProgramState>;
|
|
45
|
-
/**
|
|
45
|
+
/** Reconcile an installed environment before a cold start, using its package manager's cache. */
|
|
46
|
+
readonly prepareBeforeStart?: boolean;
|
|
47
|
+
/** Commands run when installation is missing, or before a cold start when requested above. */
|
|
46
48
|
readonly commands: readonly ManagedProgramCommand[];
|
|
47
49
|
};
|
|
48
50
|
|
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
The default local Runtime for Hypit. It owns the Worker, scheduler and active SQLite execution
|
|
4
4
|
worklist. Project-owned Build Results hold finished public Outputs.
|
|
5
5
|
|
|
6
|
+
Managed Program preparation writes subprocess stdout and stderr directly to that Program's
|
|
7
|
+
`install.log`, so dependency-download output is readable before installation finishes. Installation
|
|
8
|
+
and startup progress expose `logPath`; failed installation reports retain it with a short error.
|
|
9
|
+
The files belong to the Program's configured state directory. Service output uses `program.log`
|
|
10
|
+
and, on Windows, a separate `program.err.log` for stderr. Keeping installation output separate
|
|
11
|
+
preserves it when Windows opens fresh service logs at startup.
|
|
12
|
+
The CLI retains Program failure reasons, PIDs and log paths in `programs` and `runtime up` reports.
|
|
13
|
+
Human output stays compact for successful preparation; `programs status --verbose` also shows
|
|
14
|
+
ready helpers, and JSON retains the reported details independently of verbosity.
|
|
15
|
+
|
|
6
16
|
A Runtime Profile selects only the environmental parts that genuinely vary:
|
|
7
17
|
|
|
8
18
|
```json
|
|
@@ -60,7 +70,7 @@ quota; exact-model limits may narrow it further. Build identity is not a capacit
|
|
|
60
70
|
no second queue.
|
|
61
71
|
Claims may carry `units` (default 1): one render Need can occupy one request slot and four browser
|
|
62
72
|
slots at once. The same admission rule applies to total Provider capacity, exact models, and local
|
|
63
|
-
compute resources. SQLite retains the weighted reservation across
|
|
73
|
+
compute resources. SQLite retains the weighted reservation across execution turns; an ended attempt releases its reservations. This
|
|
64
74
|
coordinates Builds sharing this Runtime's Execution Store; it does not enforce a service's quotas
|
|
65
75
|
across other machines. Short-action limits are described below.
|
|
66
76
|
|
|
@@ -85,8 +95,7 @@ becomes available; known Operations are polled from their own lightweight record
|
|
|
85
95
|
serialized, while network actions and local work remain concurrent under their declared limits.
|
|
86
96
|
|
|
87
97
|
HypiHub can be the explicitly selected gateway for users without their own service keys. A bound
|
|
88
|
-
Provider's authentication, quota or transport error never changes that selection. Separate
|
|
89
|
-
HypiHub accounts use separate pools even when they implement the same model.
|
|
98
|
+
Provider's authentication, quota or transport error never changes that selection. Separate accounts use separate pools even when they implement the same model.
|
|
90
99
|
|
|
91
100
|
Without `hypit.results.json`, the official video Distribution selects the filesystem adapter at the
|
|
92
101
|
project's `.hypit/results` directory, with no cloud account or service. Runtime Local opens that default
|
|
@@ -94,6 +103,15 @@ through the same adapter registry as an explicit `@hypit/build-result-s3` select
|
|
|
94
103
|
filesystem Repository shortcut.
|
|
95
104
|
Runtime working Resources remain internal and Build-local; there is no ResourceStore selector. After
|
|
96
105
|
a Result has an outcome, history is read from the selected repository, not Runtime SQLite.
|
|
106
|
+
The submission passes known Resource references to the Result writer, separately from the execution
|
|
107
|
+
graph. Staging bytes for a running Build does not make them new Result files: external and reused
|
|
108
|
+
resources keep their addresses even when a Producer embeds them inside a new Composite value.
|
|
109
|
+
|
|
110
|
+
While execution advances, Result synchronization publishes newly accepted public Outputs. The
|
|
111
|
+
repository leaves its files or objects untouched when no new public Output is available; internal
|
|
112
|
+
execution progress remains in SQLite. Once execution has a final decision, all accepted public Outputs
|
|
113
|
+
and the outcome are saved before active state and working Resources are removed. This order applies
|
|
114
|
+
to completed, failed and cancelled Builds alike.
|
|
97
115
|
|
|
98
116
|
Saving a finished Result is a separate, idempotent storage action. If that write is interrupted, the
|
|
99
117
|
Build keeps its already-decided outcome and reports exact operator attention. `hypit result finish
|
|
@@ -109,7 +127,9 @@ The lifecycle commands have deliberately narrow meanings:
|
|
|
109
127
|
- `hypit runtime init` writes and selects the Distribution's starter Profile; it performs no setup or
|
|
110
128
|
network access and never overwrites an existing Profile.
|
|
111
129
|
- `hypit runtime up` prepares selected local dependencies, starts declared local Programs and starts
|
|
112
|
-
the Worker.
|
|
130
|
+
the Worker. Repeat `--endpoint <instance>` to limit preparation to chosen services; omission covers
|
|
131
|
+
the whole Profile. `doctor` and Program operations accept the same scope. Build preflight receives
|
|
132
|
+
actual resolved Endpoint IDs and checks only their credentials and Programs. `hypit runtime down` stops the Worker; `hypit programs down` stops the Programs.
|
|
113
133
|
Remote services have no lifecycle for Hypit to start or stop.
|
|
114
134
|
- `hypit runtime logs` reads the Worker's output, including separately redirected standard errors
|
|
115
135
|
on Windows. The files are `worker.log` and `worker.err.log` under the Runtime data directory's
|
|
@@ -117,3 +137,90 @@ The lifecycle commands have deliberately narrow meanings:
|
|
|
117
137
|
event order. A failure before readiness also includes the recorded error in its startup message.
|
|
118
138
|
- `hypit doctor` is the active, read-only check. Endpoint-owned diagnostics may authenticate and read a
|
|
119
139
|
remote capability catalog; normal preflight never does.
|
|
140
|
+
|
|
141
|
+
## Build execution evidence
|
|
142
|
+
|
|
143
|
+
The Worker records Endpoint calls independently of CLI follow. Local calls use the execution context;
|
|
144
|
+
remote Operations retain their existing receipts and contribute phase changes as they advance.
|
|
145
|
+
`fileExecutionLogs` appends `hypit.execution-log@1` records to `work/<build>/execution.jsonl` under the
|
|
146
|
+
Profile's `dataRoot`. Each record carries time, Command and Endpoint identity. Pure graph evaluation
|
|
147
|
+
and repeated progress counters do not become log entries. The latest counters remain active Runtime
|
|
148
|
+
state; Provider-authored diagnostics and phase changes are durable evidence.
|
|
149
|
+
|
|
150
|
+
Result finishing streams this log through the selected Repository before publishing the terminal
|
|
151
|
+
manifest or clearing the Build working directory. Complete, failed and cancelled Builds use the same
|
|
152
|
+
finishing path. A failed archive leaves Result attention and preserves the working directory; finishing
|
|
153
|
+
that Result performs no external execution. Log write failures also surface at the Result boundary,
|
|
154
|
+
without converting a successful Provider call into another generation attempt.
|
|
155
|
+
|
|
156
|
+
`hypit logs <build-id>` reads active evidence through Runtime control or finished evidence through the
|
|
157
|
+
project Result Repository. `runtime logs` remains the Worker's process log. Program installation and
|
|
158
|
+
service logs remain owned by their Program; they are shared service history, not copied into every Build.
|
|
159
|
+
The logger does not capture the process environment, credential values, request bodies or global console.
|
|
160
|
+
|
|
161
|
+
## Build-scoped execution
|
|
162
|
+
|
|
163
|
+
The long-lived Worker supervises execution carriers. Each Build has its own module scope,
|
|
164
|
+
component/Provider registries and selected configuration. Editing project code or Profile selections
|
|
165
|
+
applies to the next Build without restarting the Worker; already loaded modules remain bound to their
|
|
166
|
+
original Build. Installed Distribution modules stay process-owned. The Package Loader owns scoped
|
|
167
|
+
JavaScript/TypeScript loading, including transitive ESM and CommonJS dependencies.
|
|
168
|
+
|
|
169
|
+
One carrier shares a SQLite connection and event loop across active Builds. The database returns
|
|
170
|
+
ready Build IDs; the dispatcher opens that Build's context once, hydrates local work in sequence, then
|
|
171
|
+
lets asynchronous actions proceed concurrently. Pending remote submission does not hold a whole-Build
|
|
172
|
+
admission slot. Accepted Operations retain receipts and wake times; their next poll can advance without
|
|
173
|
+
materializing the whole graph. Endpoint-declared task limits, action concurrency and rates still govern
|
|
174
|
+
actual work. A remote task waiting in an eight-slot pool does not block another Build's unrelated local
|
|
175
|
+
step. CPU-heavy rendering belongs to its execution backend and declared resources.
|
|
176
|
+
|
|
177
|
+
The active execution request owns its opaque local context: project package root, Distribution root,
|
|
178
|
+
selected Endpoint configurations and bindings, and relevant Credential Store declarations. Source
|
|
179
|
+
compilation and execution use the same project package root. Core does not see these choices. Different
|
|
180
|
+
Profiles selecting the same Runtime data directory share its coordinator and capacity accounting; the
|
|
181
|
+
coordinator's startup directory and recorded Profile path do not select later Builds' project code.
|
|
182
|
+
|
|
183
|
+
`startedAt` records assignment to an execution carrier. Losing that carrier ends its assigned attempts
|
|
184
|
+
and preserves completed Outputs and external receipts, without resubmitting work. Unstarted queue
|
|
185
|
+
entries may still start. Result-writing failures retain the attention and `result finish` path. A live
|
|
186
|
+
carrier never reclaims another carrier's turns. These are module/registry contexts in trusted code,
|
|
187
|
+
not OS or security isolation: process globals, native libraries and a fatal process failure are shared.
|
|
188
|
+
The carrier has one working directory and inherited environment. Package-relative file access uses
|
|
189
|
+
module URLs; spawned tools receive their own explicit working directory and environment as needed.
|
|
190
|
+
|
|
191
|
+
After its assigned Builds end, the carrier exits and releases Node's module cache. The coordinator and
|
|
192
|
+
Managed Programs stay available. With continuous submissions, the coordinator can retire a carrier
|
|
193
|
+
from accepting new Builds while its assigned work continues in place. New work uses a fresh carrier;
|
|
194
|
+
all carriers share the same SQLite resource accounting. A live Build is never unloaded or moved.
|
|
195
|
+
|
|
196
|
+
The coordinator reads process policy from its startup Profile:
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
"worker": { "executionMemoryMb": 1024 }
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The default is 1024 MiB of execution-process RSS. It is a soft retirement budget, not a memory ceiling
|
|
203
|
+
or a limit on active Builds. Carriers report RSS after opening a Build context and when a Build ends.
|
|
204
|
+
Once a carrier has completed work and its reported RSS reaches the budget, it stops accepting new
|
|
205
|
+
Builds. Its remaining Builds finish before it exits. Live work alone does not trigger rotation, and
|
|
206
|
+
a fresh carrier can accept work even when its startup footprint exceeds the budget. There is no
|
|
207
|
+
forced timeout or replay. Draining carriers can still use substantial memory while long jobs run;
|
|
208
|
+
this policy reclaims finished-work accumulation, not the memory required by unfinished work.
|
|
209
|
+
The Profile that starts the coordinator owns this process policy until that coordinator exits.
|
|
210
|
+
|
|
211
|
+
Loaded module bindings are scoped, not the filesystem. Later file reads observe ordinary files;
|
|
212
|
+
a first-time dynamic import reads the implementation then available and subsequently remains cached
|
|
213
|
+
in that Build's scope. No source snapshot, filesystem scan, content hash or Build recovery is involved.
|
|
214
|
+
`createLocalRuntime` remains available for embeddings that explicitly supply their implementations.
|
|
215
|
+
Its `workOnce` advances fresh work or work already owned by that instance; an explicit request to
|
|
216
|
+
take over another context's started Build fails before any Provider call. The coordinator supplies
|
|
217
|
+
the assignment when opening each production Build context. Client code calls `worker.up()` on the
|
|
218
|
+
controller returned by `await host.controller()`, and calls `build(...)` on the Runtime returned by
|
|
219
|
+
`await host.createRuntime()`. There is one production process-lifecycle path.
|
|
220
|
+
|
|
221
|
+
Managed Programs have independent lifetimes. A healthy WhisperX service keeps its model loaded;
|
|
222
|
+
`prepareBeforeStart` reconciles a cold installation through uv's source-aware synchronization.
|
|
223
|
+
`runtime down` stops the coordinator and asks its executors to stop; Programs are stopped separately.
|
|
224
|
+
Distribution changes and shell environment changes still concern the coordinator's bootstrap process.
|
|
225
|
+
Inspect active work before restarting it. Environment-backed credentials use that inherited process
|
|
226
|
+
environment; external writable Credential Stores resolve through their own implementation.
|