@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
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { readExecutionLog } from "@hypit/runtime";
|
|
1
2
|
import type { BuildResultManifest, BuildResultRepository } from "@hypit/build-result";
|
|
2
3
|
import type { NodeRuntimeHost } from "@hypit/runtime-host-node";
|
|
3
4
|
|
|
4
5
|
import type { CliCommand, ExecutionCommand } from "../command.js";
|
|
5
|
-
import { activityObservationKey, buildProgressLines, observeBuildView } from "../observation.js";
|
|
6
|
+
import { activityObservationKey, buildProgressLines, buildProgressView, observeBuildView } from "../observation.js";
|
|
6
7
|
import type { CliIo } from "../output.js";
|
|
7
8
|
import type { CliRuntimeController } from "../runtime-port.js";
|
|
8
9
|
import { formatOperationProgress } from "../runtime-view.js";
|
|
9
10
|
import { buildStatusView } from "../view.js";
|
|
11
|
+
import type { CliBuildStatusView } from "../view.js";
|
|
10
12
|
import type { OperationalWriter } from "./types.js";
|
|
11
13
|
|
|
12
14
|
type OpenProjectResults = () => Promise<{
|
|
@@ -14,8 +16,21 @@ type OpenProjectResults = () => Promise<{
|
|
|
14
16
|
close(): void | Promise<void>;
|
|
15
17
|
}>;
|
|
16
18
|
|
|
19
|
+
function statusDetailLines(build: CliBuildStatusView | null): string[] {
|
|
20
|
+
return [
|
|
21
|
+
...(build?.failure === undefined ? [] : [`Reason ${build.failure}`]),
|
|
22
|
+
...(build?.commands ?? []).map((command) => `${command.endpoint}: ${formatOperationProgress(command.progress)}`),
|
|
23
|
+
...(build?.operations ?? []).map((operation) => {
|
|
24
|
+
const label = `${operation.endpoint}${operation.receipt === undefined ? "" : ` · task ${operation.receipt.id}`}`;
|
|
25
|
+
const detail = operation.failure !== undefined ? `${operation.failure.code} — ${operation.failure.message}`
|
|
26
|
+
: operation.progress === undefined ? operation.state : formatOperationProgress(operation.progress);
|
|
27
|
+
return `${label}: ${detail}${operation.count === undefined ? "" : ` ×${operation.count}`}`;
|
|
28
|
+
}),
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
|
|
17
32
|
export function isExecutionCommand(args: CliCommand): args is ExecutionCommand {
|
|
18
|
-
return args.command === "status" || args.command === "cancel" || args.command === "activity"
|
|
33
|
+
return args.command === "logs" || args.command === "status" || args.command === "cancel" || args.command === "activity"
|
|
19
34
|
|| (args.command === "result" && (args.action === "finish" || args.action === "discard"));
|
|
20
35
|
}
|
|
21
36
|
|
|
@@ -23,6 +38,7 @@ export function isExecutionCommand(args: CliCommand): args is ExecutionCommand {
|
|
|
23
38
|
export async function runExecutionCommand(input: {
|
|
24
39
|
readonly args: ExecutionCommand;
|
|
25
40
|
readonly runtimeProfile: string | undefined;
|
|
41
|
+
readonly resolveProjectRuntime?: () => Promise<string | undefined>;
|
|
26
42
|
readonly io: CliIo;
|
|
27
43
|
readonly runtimeHost: (profile: string) => Promise<NodeRuntimeHost>;
|
|
28
44
|
readonly runtimeController: (profile: string) => Promise<CliRuntimeController>;
|
|
@@ -30,6 +46,53 @@ export async function runExecutionCommand(input: {
|
|
|
30
46
|
readonly write: OperationalWriter;
|
|
31
47
|
}): Promise<void> {
|
|
32
48
|
const { args, runtimeProfile, io, runtimeHost, runtimeController, openProjectResults, write } = input;
|
|
49
|
+
if (args.command === "logs") {
|
|
50
|
+
const opened = await openProjectResults();
|
|
51
|
+
let source: "runtime" | "result" | "unavailable" = "unavailable";
|
|
52
|
+
let view: import("@hypit/runtime").ExecutionLogView | undefined;
|
|
53
|
+
let finished = false;
|
|
54
|
+
try {
|
|
55
|
+
const result = await opened.repository.read(args.build);
|
|
56
|
+
finished = result?.outcome !== undefined;
|
|
57
|
+
if (result?.executionLog !== undefined) {
|
|
58
|
+
const chunks = await opened.repository.openFile(args.build, result.executionLog);
|
|
59
|
+
if (chunks === undefined) throw new Error(`Build ${args.build} execution log file is unavailable`);
|
|
60
|
+
view = await readExecutionLog(chunks, args.lines);
|
|
61
|
+
source = "result";
|
|
62
|
+
}
|
|
63
|
+
} finally { await opened.close(); }
|
|
64
|
+
const activeProfile = !finished && view === undefined
|
|
65
|
+
? runtimeProfile ?? await input.resolveProjectRuntime?.() : undefined;
|
|
66
|
+
if (activeProfile !== undefined) {
|
|
67
|
+
const control = await (await runtimeHost(activeProfile)).openControl({ readOnly: true });
|
|
68
|
+
try { view = await control.logs?.(args.build, args.lines); }
|
|
69
|
+
finally { await control.close(); }
|
|
70
|
+
if (view !== undefined) source = "runtime";
|
|
71
|
+
// Result finishing can move the log between the first read and the active read.
|
|
72
|
+
if (view === undefined) {
|
|
73
|
+
const completed = await openProjectResults();
|
|
74
|
+
try {
|
|
75
|
+
const result = await completed.repository.read(args.build);
|
|
76
|
+
if (result?.executionLog !== undefined) {
|
|
77
|
+
const chunks = await completed.repository.openFile(args.build, result.executionLog);
|
|
78
|
+
if (chunks !== undefined) { view = await readExecutionLog(chunks, args.lines); source = "result"; }
|
|
79
|
+
}
|
|
80
|
+
} finally { await completed.close(); }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const records = view?.records ?? [];
|
|
84
|
+
const omitted = (view?.total ?? 0) - records.length;
|
|
85
|
+
write({ format: "hypit.cli-logs@1", build: args.build, source, records, omittedRecords: omitted },
|
|
86
|
+
view === undefined ? "No execution log recorded" : "Build execution log", "info",
|
|
87
|
+
[["Build", args.build], ["Source", source]], [
|
|
88
|
+
...(omitted > 0 ? [`Showing last ${records.length} records; ${omitted} earlier records omitted. Use --lines to read more.`] : []),
|
|
89
|
+
...records.map((record) => `${new Date(record.time).toISOString()} ${record.endpoint} ${record.command} ${
|
|
90
|
+
record.kind === "phase" ? record.phase : record.kind === "diagnostic" || record.kind === "failed"
|
|
91
|
+
? `${record.kind}: ${record.message}` : record.kind}`),
|
|
92
|
+
]);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
|
|
33
96
|
if (args.command === "status" && runtimeProfile === undefined) {
|
|
34
97
|
const openedResults = await openProjectResults();
|
|
35
98
|
let result;
|
|
@@ -42,7 +105,7 @@ export async function runExecutionCommand(input: {
|
|
|
42
105
|
throw new Error(`Build ${args.build} has no finished Result; select its Runtime to observe active execution`);
|
|
43
106
|
}
|
|
44
107
|
const finished = result?.outcome !== undefined;
|
|
45
|
-
const build = result === undefined ? null : buildStatusView({ id: result.id, result });
|
|
108
|
+
const build = result === undefined ? null : buildStatusView({ id: result.id, result, verbose: args.presentation.verbose });
|
|
46
109
|
const outcome = result?.outcome;
|
|
47
110
|
write({ format: "hypit.cli-status@1", build }, result === undefined
|
|
48
111
|
? "Build Result not found"
|
|
@@ -56,11 +119,12 @@ export async function runExecutionCommand(input: {
|
|
|
56
119
|
...(build?.title === undefined ? [] : [["Title", build.title] as const]),
|
|
57
120
|
...(outcome === undefined ? [] : [["Outcome", outcome] as const]),
|
|
58
121
|
...(!finished && result !== undefined ? [["Result", "open"] as const] : []),
|
|
59
|
-
...(build?.
|
|
60
|
-
],
|
|
61
|
-
|
|
62
|
-
: [])
|
|
63
|
-
|
|
122
|
+
...(build?.targets?.length ? [["Targets", build.targets.join(", ")] as const] : []),
|
|
123
|
+
], [
|
|
124
|
+
...statusDetailLines(build),
|
|
125
|
+
...(!finished && result !== undefined ? ["Select the Runtime to inspect active work."] : []),
|
|
126
|
+
]);
|
|
127
|
+
if (result === undefined || !finished || outcome === "failed") io.setExitCode?.(1);
|
|
64
128
|
return;
|
|
65
129
|
}
|
|
66
130
|
|
|
@@ -98,11 +162,12 @@ export async function runExecutionCommand(input: {
|
|
|
98
162
|
return {
|
|
99
163
|
id: item.id,
|
|
100
164
|
work: status.work,
|
|
101
|
-
|
|
165
|
+
phases: buildProgressView(item).phases,
|
|
102
166
|
...(status.attention === undefined ? {} : { attention: status.attention }),
|
|
103
167
|
};
|
|
104
168
|
});
|
|
105
|
-
const currentView =
|
|
169
|
+
const currentView = JSON.stringify([activity.builds.length,
|
|
170
|
+
activityObservationKey(worker.state, activity.builds.slice(0, args.limit))]);
|
|
106
171
|
if (args.watch && currentView === previous) return;
|
|
107
172
|
previous = currentView;
|
|
108
173
|
const value = {
|
|
@@ -111,7 +176,7 @@ export async function runExecutionCommand(input: {
|
|
|
111
176
|
worker: worker.state,
|
|
112
177
|
builds,
|
|
113
178
|
...(activity.builds.length <= args.limit ? {} : { omittedBuilds: activity.builds.length - args.limit }),
|
|
114
|
-
capacity: activity.capacity,
|
|
179
|
+
...(args.presentation.verbose ? { capacity: activity.capacity } : {}),
|
|
115
180
|
};
|
|
116
181
|
const buildLines = activity.builds.slice(0, args.limit).map((item) => {
|
|
117
182
|
const requestProgress = item.requests === undefined || item.requests.total === 0
|
|
@@ -119,20 +184,16 @@ export async function runExecutionCommand(input: {
|
|
|
119
184
|
: ` · ${item.requests.completed}/${item.requests.total} steps`;
|
|
120
185
|
return `${item.id}: ${buildStatusView({ id: item.id, runtime: item }).work.state}`
|
|
121
186
|
+ requestProgress
|
|
187
|
+
+ Object.entries(buildProgressView(item).phases).map(([phase, count]) => ` · ${count} ${phase}`).join("")
|
|
122
188
|
+ `${item.stop?.cause === "execution-failed" ? " · stopping after failure" : item.cancellationRequested ? " · cancelling" : ""}`
|
|
123
189
|
+ `${item.issue === undefined ? "" : ` · ${item.issue.message}`}`;
|
|
124
190
|
});
|
|
125
|
-
const activeOperations = activity.builds.flatMap((item) => item.operations)
|
|
126
|
-
.filter((item) => item.status === "pending");
|
|
127
191
|
const operationLines = args.presentation.verbose
|
|
128
|
-
? activity.builds.flatMap((build) => build
|
|
129
|
-
.map((
|
|
130
|
-
? item.status
|
|
131
|
-
: formatOperationProgress(item.progress)}`)).slice(0, args.limit)
|
|
192
|
+
? activity.builds.slice(0, args.limit).flatMap((build) => buildProgressView(build).details
|
|
193
|
+
.map((detail) => `${build.id} · ${detail}`))
|
|
132
194
|
: [];
|
|
133
195
|
write(value, "Runtime activity", activity.builds.length === 0 ? "success" : "info", [
|
|
134
196
|
["Active Builds", String(activity.builds.length)],
|
|
135
|
-
["Active Operations", String(activeOperations.length)],
|
|
136
197
|
["Worker", worker.state],
|
|
137
198
|
], [
|
|
138
199
|
...buildLines,
|
|
@@ -187,7 +248,6 @@ export async function runExecutionCommand(input: {
|
|
|
187
248
|
...(result === undefined ? {} : { result }),
|
|
188
249
|
...(resultReadError === undefined ? {} : { resultReadError }),
|
|
189
250
|
verbose: args.presentation.verbose,
|
|
190
|
-
operationLimit: args.limit,
|
|
191
251
|
});
|
|
192
252
|
const attention = build?.attention;
|
|
193
253
|
const humanTitle = !found
|
|
@@ -226,14 +286,9 @@ export async function runExecutionCommand(input: {
|
|
|
226
286
|
["Result", "saving"] as const,
|
|
227
287
|
] : resultOutcome !== undefined ? [
|
|
228
288
|
["Outcome", resultOutcome] as const,
|
|
229
|
-
...(build?.result.outputCount === undefined
|
|
230
|
-
? [] : [["Outputs", String(build.result.outputCount)] as const]),
|
|
231
289
|
] : [["State", build?.work.state ?? "unknown"] as const]),
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
: operation.progress === undefined
|
|
235
|
-
? `${operation.endpoint}${operation.receipt === undefined ? "" : ` · task ${operation.receipt.id}`}: ${operation.state}`
|
|
236
|
-
: `${operation.endpoint}${operation.receipt === undefined ? "" : ` · task ${operation.receipt.id}`}: ${formatOperationProgress(operation.progress)}`)
|
|
290
|
+
...(build?.targets?.length ? [["Targets", build.targets.join(", ")] as const] : []),
|
|
291
|
+
], statusDetailLines(build)
|
|
237
292
|
.concat(attention === undefined ? [] : [
|
|
238
293
|
`Attention ${attention.message}`,
|
|
239
294
|
...(attention.action === undefined ? [] : [`Action ${attention.action}`]),
|
|
@@ -100,13 +100,8 @@ export async function runProjectResultCommand(input: {
|
|
|
100
100
|
projectRoot,
|
|
101
101
|
...(args.outputName === undefined ? {} : { output: args.outputName }),
|
|
102
102
|
limit: args.limit,
|
|
103
|
+
verbose: args.presentation.verbose,
|
|
103
104
|
});
|
|
104
|
-
const focusedOutputs = args.outputName === undefined
|
|
105
|
-
? build.outputs.filter((item) => item.target || item.highlighted)
|
|
106
|
-
: build.outputs;
|
|
107
|
-
const visibleOutputs = args.presentation.verbose ? build.outputs : focusedOutputs;
|
|
108
|
-
const outputCount = build.outputs.length + (build.omittedOutputs ?? 0);
|
|
109
|
-
const hiddenOutputCount = args.outputName === undefined ? outputCount - focusedOutputs.length : 0;
|
|
110
105
|
write({ format: "hypit.cli-inspect@1", build }, "Build Result",
|
|
111
106
|
manifest.outcome === "failed" ? "error"
|
|
112
107
|
: manifest.outcome === "cancelled" ? "warning"
|
|
@@ -117,23 +112,24 @@ export async function runProjectResultCommand(input: {
|
|
|
117
112
|
["Outcome", build.outcome],
|
|
118
113
|
...(args.outputName === undefined ? [
|
|
119
114
|
["Targets", String(build.targetCount)] as const,
|
|
120
|
-
["Outputs", String(outputCount)] as const,
|
|
115
|
+
["Available Outputs", String(build.outputCount)] as const,
|
|
121
116
|
] : []),
|
|
122
117
|
], [
|
|
123
118
|
...(build.failure === undefined ? [] : [`Reason ${build.failure}`]),
|
|
119
|
+
...(build.executionLog === undefined ? [] : [`Execution log hypit logs ${build.id}`]),
|
|
124
120
|
...(build.operations ?? []).map((operation) =>
|
|
125
121
|
`${operation.endpoint}: ${operation.status}${operation.receipt === undefined ? "" : ` · task ${operation.receipt.id}`}`
|
|
126
122
|
+ (operation.failure === undefined ? "" : ` · ${operation.failure.code}: ${operation.failure.message}`)),
|
|
127
123
|
...(build.omittedOperations === undefined ? [] : [`${build.omittedOperations} more execution receipts · use --limit <count>`]),
|
|
128
124
|
...(build.note === undefined ? [] : [`Note ${build.note}`]),
|
|
129
|
-
...
|
|
125
|
+
...build.outputs.map((item) => `${item.highlighted ? "★" : item.target ? "Target" : "Output"} ${item.name}`
|
|
130
126
|
+ (!args.presentation.verbose ? "" : ` · ${item.type} · ${item.kind}`
|
|
131
127
|
+ `${item.mediaType === undefined ? "" : ` · ${item.mediaType}`}`
|
|
132
128
|
+ `${item.size === undefined ? "" : ` · ${item.size} bytes`}`)),
|
|
133
|
-
...(
|
|
134
|
-
`${
|
|
129
|
+
...(args.outputName === undefined && (build.otherOutputCount ?? 0) > 0 ? [
|
|
130
|
+
`${build.otherOutputCount} other Outputs · use --verbose or --output <name>`,
|
|
135
131
|
] : []),
|
|
136
|
-
...(
|
|
132
|
+
...(build.omittedOutputs !== undefined ? [
|
|
137
133
|
`${build.omittedOutputs} more Outputs · use --limit <count> or --output <name>`,
|
|
138
134
|
] : []),
|
|
139
135
|
]);
|
|
@@ -4,8 +4,8 @@ export { loadDiscoveredSourcePackages } from "./source-packages.js";
|
|
|
4
4
|
export { collectRunFrontends, loadRunFile, resolveBuildResultValue } from "./run-file.js";
|
|
5
5
|
export type { LoadedRunFile } from "./run-file.js";
|
|
6
6
|
export { hypitHostStateRoot, hypitProjectStateRoot } from "./paths.js";
|
|
7
|
-
export { resolvePackageRoot, resolveProjectRoot } from "
|
|
8
|
-
export { findRuntimeProfile } from "
|
|
7
|
+
export { resolvePackageRoot, resolveProjectRoot } from "@hypit/project-context-node";
|
|
8
|
+
export { findRuntimeProfile } from "@hypit/project-context-node";
|
|
9
9
|
export { renderCliError, writeCliHelp, writeCliOutput } from "./output.js";
|
|
10
10
|
export type {
|
|
11
11
|
CliColorMode,
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import type { CliBuildResultView, CliBuildStatusView, CliOutputView } from "./view.js";
|
|
2
2
|
|
|
3
|
-
type ProgramStateView = {
|
|
3
|
+
type ProgramStateView = {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly state: string;
|
|
6
|
+
readonly action?: string;
|
|
7
|
+
readonly endpoint?: string;
|
|
8
|
+
readonly stateDetail?: string;
|
|
9
|
+
readonly detail?: string;
|
|
10
|
+
readonly pid?: number;
|
|
11
|
+
readonly logPath?: string;
|
|
12
|
+
};
|
|
4
13
|
type AttentionView = { readonly message: string; readonly action?: string };
|
|
5
14
|
|
|
6
15
|
export type OperationalMachineView =
|
|
16
|
+
| { readonly format: "hypit.cli-logs@1"; readonly build: string; readonly source: "runtime" | "result" | "unavailable"; readonly records: readonly import("@hypit/runtime").ExecutionLogRecord[]; readonly omittedRecords: number }
|
|
7
17
|
| { readonly format: "hypit.cli-runtime-init@1"; readonly profile: string; readonly project: string; readonly selected: true }
|
|
8
18
|
| { readonly format: "hypit.cli-runtime-selection@1"; readonly selected: boolean; readonly removed?: boolean; readonly profile?: string; readonly project?: string }
|
|
9
|
-
| { readonly format: "hypit.cli-paths@1"; readonly project: string; readonly projectState: string; readonly profile?: string; readonly runtimeData?: string; readonly hostState: string; readonly machinePackages: string; readonly distribution?: string }
|
|
19
|
+
| { readonly format: "hypit.cli-paths@1"; readonly project: string; readonly projectState: string; readonly profileSource: "argument" | "project" | "none"; readonly selectionFile: string; readonly profile?: string; readonly runtimeData?: string; readonly hostState: string; readonly machinePackages: string; readonly distribution?: string }
|
|
10
20
|
| { readonly format: "hypit.cli-package@1"; readonly action: "install" | "status"; readonly package: string; readonly ready: boolean }
|
|
11
|
-
| { readonly format: "hypit.cli-programs@1"; readonly action: "up" | "down" | "status"; readonly ready: boolean; readonly programs: readonly ProgramStateView[]; readonly omittedPrograms?: number }
|
|
12
|
-
| { readonly format: "hypit.cli-runtime-up@1"; readonly ready: boolean; readonly worker: string; readonly preparedPackages: number; readonly programs: { readonly total: number; readonly ready: number } }
|
|
21
|
+
| { readonly format: "hypit.cli-programs@1"; readonly action: "up" | "down" | "status"; readonly ready: boolean; readonly programCount: number; readonly readyCount: number; readonly programs: readonly ProgramStateView[]; readonly omittedPrograms?: number }
|
|
22
|
+
| { readonly format: "hypit.cli-runtime-up@1"; readonly ready: boolean; readonly worker: string; readonly preparedPackages: number; readonly programs: { readonly total: number; readonly ready: number; readonly items: readonly ProgramStateView[] } }
|
|
13
23
|
| { readonly format: "hypit.cli-runtime-logs@1"; readonly lines: readonly string[]; readonly totalLines: number; readonly omittedLines: number; readonly path?: string }
|
|
14
24
|
| { readonly format: "hypit.cli-runtime-down@1"; readonly worker: string }
|
|
15
25
|
| { readonly format: "hypit.cli-runtime-status@1"; readonly ready: boolean; readonly attention: boolean; readonly worker: { readonly state: string; readonly configuration?: string }; readonly builds: Readonly<Record<string, number>>; readonly programs: { readonly total: number; readonly ready: number; readonly unavailable: readonly ProgramStateView[] }; readonly capacity: { readonly active: number } }
|
|
@@ -21,7 +31,7 @@ export type OperationalMachineView =
|
|
|
21
31
|
| { readonly format: "hypit.cli-result-edit@1"; readonly build: string; readonly title: string | null; readonly note: string | null; readonly highlightedOutputCount: number; readonly highlightedOutputs: readonly string[]; readonly omittedHighlightedOutputs?: number }
|
|
22
32
|
| { readonly format: "hypit.cli-get@1"; readonly build: string; readonly output: string; readonly type: string; readonly kind: "scalar" | "resource" | "composite"; readonly path: string }
|
|
23
33
|
| { readonly format: "hypit.cli-status@1"; readonly build: CliBuildStatusView | null }
|
|
24
|
-
| { readonly format: "hypit.cli-activity@1"; readonly at: number; readonly worker: string; readonly builds: readonly { readonly id: string; readonly work: CliBuildStatusView["work"]; readonly
|
|
34
|
+
| { readonly format: "hypit.cli-activity@1"; readonly at: number; readonly worker: string; readonly builds: readonly { readonly id: string; readonly work: CliBuildStatusView["work"]; readonly phases: Readonly<Record<string, number>>; readonly attention?: AttentionView }[]; readonly omittedBuilds?: number; readonly capacity?: readonly import("@hypit/runtime").CapacityReservation[] }
|
|
25
35
|
| { readonly format: "hypit.cli-result-discard@1"; readonly build: string; readonly discarded: boolean }
|
|
26
36
|
| { readonly format: "hypit.cli-result-finish@1"; readonly build: string; readonly found?: false; readonly outcome?: string; readonly attention?: AttentionView }
|
|
27
37
|
| { readonly format: "hypit.cli-cancel@1"; readonly requested: boolean; readonly build: CliBuildStatusView | null }
|
package/packages/cli/src/main.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
CliRuntime,
|
|
14
14
|
CliRuntimeController,
|
|
15
15
|
} from "./runtime-port.js";
|
|
16
|
-
import { createPricingOutput, writeCliHelp, writeCliOutput } from "./output.js";
|
|
16
|
+
import { createPlanOutput, createPricingOutput, writeCliHelp, writeCliOutput } from "./output.js";
|
|
17
17
|
import type { CliIo, CliMachineView } from "./output.js";
|
|
18
18
|
import { parseCommand } from "./arguments.js";
|
|
19
19
|
import type { CliCommand, RuntimeOption } from "./command.js";
|
|
@@ -23,13 +23,13 @@ import { isProjectResultCommand, runProjectResultCommand } from "./commands/resu
|
|
|
23
23
|
import { isEnvironmentCommand, runEnvironmentCommand } from "./commands/environment.js";
|
|
24
24
|
import { isExecutionCommand, runExecutionCommand } from "./commands/execution.js";
|
|
25
25
|
import { inlineValuePreview } from "./runtime-view.js";
|
|
26
|
-
import { resolvePackageRoot, resolveProjectRoot } from "
|
|
26
|
+
import { resolvePackageRoot, resolveProjectRoot } from "@hypit/project-context-node";
|
|
27
27
|
import { loadDiscoveredSourcePackages } from "./source-packages.js";
|
|
28
28
|
import {
|
|
29
29
|
clearRuntimeProfile,
|
|
30
30
|
findRuntimeProfile,
|
|
31
31
|
selectRuntimeProfile,
|
|
32
|
-
} from "
|
|
32
|
+
} from "@hypit/project-context-node";
|
|
33
33
|
import {
|
|
34
34
|
buildStatusView,
|
|
35
35
|
cliTypeName,
|
|
@@ -40,8 +40,8 @@ function createPublicBuildId(now = Date.now()): string {
|
|
|
40
40
|
return orderedBuildId(now, randomBytes(5).toString("hex").toUpperCase());
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
async function loadRuntime(host: NodeRuntimeHost): Promise<CliRuntime> {
|
|
44
|
-
return await host.createRuntime();
|
|
43
|
+
async function loadRuntime(host: NodeRuntimeHost, endpoints: readonly string[]): Promise<CliRuntime> {
|
|
44
|
+
return await host.createRuntime({ endpoints });
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
function commandWorkspaceRoot(command: CliCommand): string | undefined {
|
|
@@ -116,7 +116,8 @@ export async function runCli(
|
|
|
116
116
|
await (await runtimeHost(
|
|
117
117
|
args.profile,
|
|
118
118
|
args.packageRoot ?? await packageRootForProject(),
|
|
119
|
-
)).runWorker(args.readyFile, args.workerOwner
|
|
119
|
+
)).runWorker(args.readyFile, args.workerOwner,
|
|
120
|
+
args.executionRoot === undefined ? undefined : { dataRoot: args.executionRoot });
|
|
120
121
|
return;
|
|
121
122
|
}
|
|
122
123
|
if (args.command === "runtime" && args.action === "init") {
|
|
@@ -177,12 +178,14 @@ export async function runCli(
|
|
|
177
178
|
}
|
|
178
179
|
|
|
179
180
|
let runtimeProfile = acceptsRuntimeContext(args) ? args.runtimeProfile : undefined;
|
|
181
|
+
let runtimeSelectionFile: string | undefined;
|
|
180
182
|
const runtimeWasExplicit = runtimeProfile !== undefined;
|
|
181
183
|
let runtimeNeedsHint = runtimeWasExplicit;
|
|
182
|
-
if (acceptsRuntimeContext(args) && runtimeProfile === undefined) {
|
|
184
|
+
if (acceptsRuntimeContext(args) && runtimeProfile === undefined && args.command !== "logs") {
|
|
183
185
|
const selected = await findRuntimeProfile(await commandProjectRoot());
|
|
184
186
|
if (selected !== undefined) {
|
|
185
187
|
runtimeProfile = selected.profile;
|
|
188
|
+
runtimeSelectionFile = selected.selectionFile;
|
|
186
189
|
runtimeNeedsHint = false;
|
|
187
190
|
}
|
|
188
191
|
}
|
|
@@ -196,6 +199,7 @@ export async function runCli(
|
|
|
196
199
|
await runEnvironmentCommand({
|
|
197
200
|
args,
|
|
198
201
|
runtimeProfile,
|
|
202
|
+
runtimeSelectionFile,
|
|
199
203
|
io,
|
|
200
204
|
distribution,
|
|
201
205
|
projectRoot: await commandProjectRoot(),
|
|
@@ -228,6 +232,7 @@ export async function runCli(
|
|
|
228
232
|
runtimeHost,
|
|
229
233
|
runtimeController,
|
|
230
234
|
openProjectResults: projectResults,
|
|
235
|
+
resolveProjectRuntime: async () => (await findRuntimeProfile(await commandProjectRoot()))?.profile,
|
|
231
236
|
write: writeOperational,
|
|
232
237
|
});
|
|
233
238
|
return;
|
|
@@ -286,17 +291,18 @@ export async function runCli(
|
|
|
286
291
|
author: projectPath(loaded.authorSource, effectiveWorkspaceRoot),
|
|
287
292
|
frontend: sourceHeader.using,
|
|
288
293
|
targetCount: loaded.document.targets.length,
|
|
289
|
-
targets: loaded.document.targets.
|
|
294
|
+
targets: loaded.document.targets.map((item) => item.output),
|
|
290
295
|
candidates: loaded.document.candidates.length,
|
|
291
296
|
satisfactions: loaded.document.satisfactions.length,
|
|
292
|
-
|
|
297
|
+
historicalOutputCount: loaded.unresolvedHistoricalOutputs.length,
|
|
298
|
+
...(args.presentation.verbose ? { unresolvedHistoricalOutputs: loaded.unresolvedHistoricalOutputs.slice(0, args.limit).map((item) => ({
|
|
293
299
|
candidate: item.id,
|
|
294
300
|
build: item.build,
|
|
295
301
|
output: item.output,
|
|
296
302
|
})),
|
|
297
303
|
...(loaded.unresolvedHistoricalOutputs.length <= args.limit ? {} : {
|
|
298
304
|
omittedHistoricalOutputs: loaded.unresolvedHistoricalOutputs.length - args.limit,
|
|
299
|
-
}),
|
|
305
|
+
}) } : {}),
|
|
300
306
|
} as const;
|
|
301
307
|
writeCliOutput(io, args.presentation, {
|
|
302
308
|
kind: "check-run",
|
|
@@ -321,9 +327,10 @@ export async function runCli(
|
|
|
321
327
|
assets: result.attachments.length,
|
|
322
328
|
modules: modules.length,
|
|
323
329
|
outputCount: outputs.length,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
330
|
+
...(args.presentation.verbose ? {
|
|
331
|
+
outputs: outputs.slice(0, args.limit).map((item) => ({ name: item.name, type: cliTypeName(item.type) })),
|
|
332
|
+
...(outputs.length <= args.limit ? {} : { omittedOutputs: outputs.length - args.limit }),
|
|
333
|
+
details: {
|
|
327
334
|
modules: modules.slice(0, args.limit),
|
|
328
335
|
values: values.slice(0, args.limit).map((item) => ({ name: item.name, type: cliTypeName(item.type) })),
|
|
329
336
|
} } : {}),
|
|
@@ -387,6 +394,7 @@ export async function runCli(
|
|
|
387
394
|
result: {
|
|
388
395
|
repository: buildResults.location,
|
|
389
396
|
...(args.title === undefined ? {} : { title: args.title }),
|
|
397
|
+
resourceReferences: loadedRun.resultResourceReferences,
|
|
390
398
|
forwards: result.resultForwards.filter((forward) =>
|
|
391
399
|
catalog.publishedOutputs.some((published) => published.ref.id === forward.output)),
|
|
392
400
|
},
|
|
@@ -398,7 +406,7 @@ export async function runCli(
|
|
|
398
406
|
const evaluated = await evaluatePlanNeeds(result.definition, packageContributions);
|
|
399
407
|
const providers = await describePlanProviders(host, evaluated.state, evaluated);
|
|
400
408
|
assertPlannedRequests(evaluated.state, evaluated, providers);
|
|
401
|
-
const preflight = await preflightPlan(host, evaluated.state);
|
|
409
|
+
const preflight = await preflightPlan(host, evaluated.state, providers);
|
|
402
410
|
// Build is an execution boundary, not a provisioning command. The cheap
|
|
403
411
|
// preflight must already be clean; `runtime up` is the explicit place for
|
|
404
412
|
// installing or starting declared programs.
|
|
@@ -411,7 +419,8 @@ export async function runCli(
|
|
|
411
419
|
const detail = error instanceof Error ? error.message : String(error);
|
|
412
420
|
throw new Error(`Runtime Worker could not start; no Build was queued: ${detail}`);
|
|
413
421
|
}
|
|
414
|
-
runtime = await loadRuntime(await runtimeHost(runtimeProfile)
|
|
422
|
+
runtime = await loadRuntime(await runtimeHost(runtimeProfile, sourcePackageRoot),
|
|
423
|
+
[...new Set(providers.flatMap((item) => item.status === "resolved" && item.endpoint !== undefined ? [item.endpoint] : []))]);
|
|
415
424
|
let built = await runtime.build(request);
|
|
416
425
|
const requestCount = result.definition.plan.steps.reduce(
|
|
417
426
|
(total, step) => total + Object.keys(step.needs).length,
|
|
@@ -484,7 +493,6 @@ export async function runCli(
|
|
|
484
493
|
...(activeView === undefined ? {} : { runtime: activeView }),
|
|
485
494
|
...(finishedResult === undefined ? {} : { result: finishedResult }),
|
|
486
495
|
verbose: args.presentation.verbose,
|
|
487
|
-
operationLimit: args.limit,
|
|
488
496
|
});
|
|
489
497
|
const machine = {
|
|
490
498
|
format: "hypit.cli-build@1" as const,
|
|
@@ -586,8 +594,8 @@ export async function runCli(
|
|
|
586
594
|
});
|
|
587
595
|
return;
|
|
588
596
|
}
|
|
589
|
-
const preflight = planHost === undefined ? undefined : await preflightPlan(planHost, evaluated.state);
|
|
590
597
|
const providers = planHost === undefined ? undefined : await describePlanProviders(planHost, evaluated.state, evaluated);
|
|
598
|
+
const preflight = planHost === undefined ? undefined : await preflightPlan(planHost, evaluated.state, providers ?? []);
|
|
591
599
|
const needs = describePlanNeeds(evaluated.state, evaluated, providers ?? []);
|
|
592
600
|
const outputNames = Object.fromEntries(result.compilation.author.exports.flatMap((item) =>
|
|
593
601
|
item.ref.kind === "logical-output" ? [[item.ref.id, item.name]] : []));
|
|
@@ -596,8 +604,10 @@ export async function runCli(
|
|
|
596
604
|
const candidate = loaded.run.satisfactionNames[selection.output];
|
|
597
605
|
return output === undefined || candidate === undefined ? [] : [{ output, candidate }];
|
|
598
606
|
});
|
|
599
|
-
const allUnreached =
|
|
600
|
-
|
|
607
|
+
const allUnreached = args.presentation.verbose
|
|
608
|
+
? unreachedGenerations(result.compilation.author.graph, result.state, outputNames)
|
|
609
|
+
.map((item) => ({ output: item.name, operation: item.producer }))
|
|
610
|
+
: [];
|
|
601
611
|
const targets = loaded.run.document.targets.map((item) => item.output);
|
|
602
612
|
const unsupportedRequestCount = providers?.filter((item) => item.status === "unsupported").length ?? 0;
|
|
603
613
|
const unresolvedRequestCount = providers?.filter((item) => item.status === "unresolved" || item.status === "ambiguous").length ?? 0;
|
|
@@ -606,45 +616,31 @@ export async function runCli(
|
|
|
606
616
|
const requestIssueCount = needs.filter((item) => item.issue !== undefined).length;
|
|
607
617
|
writeCliOutput(io, args.presentation, {
|
|
608
618
|
kind: "plan",
|
|
609
|
-
machine: {
|
|
619
|
+
machine: createPlanOutput({
|
|
610
620
|
format: "hypit.cli-plan@1",
|
|
611
621
|
ok: (preflight?.ok ?? true) && unresolvedRequestCount === 0
|
|
612
622
|
&& unsupportedRequestCount === 0 && requestIssueCount === 0,
|
|
613
623
|
run: projectPath(loaded.path, effectiveWorkspaceRoot),
|
|
614
624
|
targetCount: targets.length,
|
|
615
|
-
targets
|
|
625
|
+
targets,
|
|
616
626
|
steps: result.definition.plan.steps.length,
|
|
617
627
|
requestCount: needs.length,
|
|
618
628
|
requestIssueCount,
|
|
619
629
|
...(providerRequestCount === undefined ? {} : { providerRequestCount }),
|
|
620
630
|
...(providers === undefined ? {} : { localRequestCount, unresolvedRequestCount, unsupportedRequestCount }),
|
|
621
631
|
choiceCount: allChoices.length,
|
|
622
|
-
choices: allChoices
|
|
623
|
-
|
|
624
|
-
...(
|
|
625
|
-
|
|
626
|
-
...(providers === undefined ? {} : {
|
|
627
|
-
providers: providers.slice(0, Math.max(args.limit, 50)),
|
|
628
|
-
...(providers.length <= Math.max(args.limit, 50)
|
|
629
|
-
? {}
|
|
630
|
-
: { omittedProviders: providers.length - Math.max(args.limit, 50) }),
|
|
631
|
-
}),
|
|
632
|
-
needs: needs.slice(0, Math.max(args.limit, 50)),
|
|
633
|
-
...(needs.length <= Math.max(args.limit, 50) ? {} : { omittedNeeds: needs.length - Math.max(args.limit, 50) }),
|
|
632
|
+
choices: allChoices,
|
|
633
|
+
unreached: allUnreached,
|
|
634
|
+
...(providers === undefined ? {} : { providers }),
|
|
635
|
+
needs,
|
|
634
636
|
...(preflight === undefined ? {} : { preflight: {
|
|
635
637
|
ok: preflight.ok,
|
|
636
638
|
capabilityCount: preflight.capabilities.length,
|
|
637
|
-
capabilities: preflight.capabilities
|
|
638
|
-
...(preflight.capabilities.length <= args.limit
|
|
639
|
-
? {}
|
|
640
|
-
: { omittedCapabilities: preflight.capabilities.length - args.limit }),
|
|
639
|
+
capabilities: preflight.capabilities,
|
|
641
640
|
diagnosticCount: preflight.diagnostics.length,
|
|
642
|
-
diagnostics: preflight.diagnostics
|
|
643
|
-
...(preflight.diagnostics.length <= args.limit
|
|
644
|
-
? {}
|
|
645
|
-
: { omittedDiagnostics: preflight.diagnostics.length - args.limit }),
|
|
641
|
+
diagnostics: preflight.diagnostics,
|
|
646
642
|
} }),
|
|
647
|
-
},
|
|
643
|
+
}, { verbose: args.presentation.verbose, limit: args.limit }),
|
|
648
644
|
});
|
|
649
645
|
if ((preflight !== undefined && !preflight.ok) || unresolvedRequestCount > 0
|
|
650
646
|
|| unsupportedRequestCount > 0 || requestIssueCount > 0) io.setExitCode?.(1);
|
|
@@ -5,7 +5,8 @@ import { formatOperationProgress } from "./runtime-view.js";
|
|
|
5
5
|
|
|
6
6
|
const FIRST_HEARTBEAT_MS = 30_000;
|
|
7
7
|
const LATER_HEARTBEAT_MS = 60_000;
|
|
8
|
-
|
|
8
|
+
// Coalesce live counters into readable terminal updates; persistence can advance more often.
|
|
9
|
+
const MIN_PROGRESS_INTERVAL_MS = 5_000;
|
|
9
10
|
|
|
10
11
|
export type BuildProgressView = {
|
|
11
12
|
readonly build: string;
|
|
@@ -22,6 +23,10 @@ function progressPhases(view: CliBuildView): Readonly<Record<string, number>> {
|
|
|
22
23
|
const phase = operation.progress?.phase ?? "in progress";
|
|
23
24
|
phases.set(phase, (phases.get(phase) ?? 0) + 1);
|
|
24
25
|
}
|
|
26
|
+
for (const command of view.commands ?? []) {
|
|
27
|
+
const label = formatOperationProgress(command.progress);
|
|
28
|
+
phases.set(label, (phases.get(label) ?? 0) + 1);
|
|
29
|
+
}
|
|
25
30
|
return Object.fromEntries([...phases].sort(([left], [right]) => left.localeCompare(right)));
|
|
26
31
|
}
|
|
27
32
|
|
|
@@ -41,6 +46,7 @@ export function buildProgressView(view: CliBuildView, now = Date.now()): BuildPr
|
|
|
41
46
|
phases: progressPhases(view),
|
|
42
47
|
elapsedMs: Math.max(0, now - view.createdAt),
|
|
43
48
|
details: [
|
|
49
|
+
...(view.commands ?? []).map((item) => `${item.endpoint}: ${formatOperationProgress(item.progress)}`),
|
|
44
50
|
...(view.stop === undefined ? [] : [view.stop.cause === "execution-failed"
|
|
45
51
|
? `Build stopping after failure${view.stop.reason === undefined ? "" : `: ${view.stop.reason}`}`
|
|
46
52
|
: `Build cancelling${view.stop.reason === undefined ? "" : `: ${view.stop.reason}`}`]),
|