@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
|
@@ -18,6 +18,7 @@ type RawOptions = {
|
|
|
18
18
|
readonly presentation: CliOutputOptions;
|
|
19
19
|
readonly workspaceRoot?: string;
|
|
20
20
|
readonly assetRoots: readonly string[];
|
|
21
|
+
readonly endpoints: readonly string[];
|
|
21
22
|
readonly packageRoot?: string;
|
|
22
23
|
readonly runtimeProfile?: string;
|
|
23
24
|
readonly follow: boolean;
|
|
@@ -36,6 +37,7 @@ type RawOptions = {
|
|
|
36
37
|
readonly watch: boolean;
|
|
37
38
|
readonly readyFile?: string;
|
|
38
39
|
readonly workerOwner?: string;
|
|
40
|
+
readonly executionRoot?: string;
|
|
39
41
|
readonly reason?: string;
|
|
40
42
|
readonly slot?: string;
|
|
41
43
|
readonly credentialFile?: string;
|
|
@@ -155,9 +157,15 @@ export function parseCommand(argv: readonly string[]): CliCommand {
|
|
|
155
157
|
...optionalProject(options),
|
|
156
158
|
};
|
|
157
159
|
}
|
|
160
|
+
case "logs": {
|
|
161
|
+
const [build, rest] = requiredPositional(tail, "logs requires one Build id");
|
|
162
|
+
const options = commandOptions(command, rest, "--runtime", "--workspace", "--lines");
|
|
163
|
+
return { command, build, lines: options.lines, presentation: options.presentation,
|
|
164
|
+
...optionalProject(options), ...optionalRuntime(options) };
|
|
165
|
+
}
|
|
158
166
|
case "status": {
|
|
159
167
|
const [build, rest] = requiredPositional(tail, "status requires one Build id");
|
|
160
|
-
const options = commandOptions(command, rest, "--runtime", "--watch", "--max-wait-ms", "--limit");
|
|
168
|
+
const options = commandOptions(command, rest, "--runtime", "--workspace", "--watch", "--max-wait-ms", "--limit");
|
|
161
169
|
if (!options.watch && options.maxWaitMs !== undefined) {
|
|
162
170
|
throw new Error("--max-wait-ms applies to status --watch");
|
|
163
171
|
}
|
|
@@ -172,7 +180,7 @@ export function parseCommand(argv: readonly string[]): CliCommand {
|
|
|
172
180
|
};
|
|
173
181
|
}
|
|
174
182
|
case "activity": {
|
|
175
|
-
const options = commandOptions(command, tail, "--runtime", "--watch", "--jsonl", "--limit");
|
|
183
|
+
const options = commandOptions(command, tail, "--runtime", "--workspace", "--watch", "--jsonl", "--limit");
|
|
176
184
|
if (options.presentation.jsonl === true && !options.watch) {
|
|
177
185
|
throw new Error("--jsonl applies only to activity --watch");
|
|
178
186
|
}
|
|
@@ -189,7 +197,7 @@ export function parseCommand(argv: readonly string[]): CliCommand {
|
|
|
189
197
|
}
|
|
190
198
|
case "cancel": {
|
|
191
199
|
const [build, rest] = requiredPositional(tail, "cancel requires one Build id");
|
|
192
|
-
const options = commandOptions(command, rest, "--runtime", "--reason");
|
|
200
|
+
const options = commandOptions(command, rest, "--runtime", "--workspace", "--reason");
|
|
193
201
|
return {
|
|
194
202
|
command,
|
|
195
203
|
build,
|
|
@@ -205,22 +213,26 @@ export function parseCommand(argv: readonly string[]): CliCommand {
|
|
|
205
213
|
case "auth": return parseAuthCommand(tail);
|
|
206
214
|
case "doctor": {
|
|
207
215
|
const [profile, rest] = optionalPositional(tail);
|
|
208
|
-
const options = commandOptions(command, rest, "--workspace", "--limit");
|
|
216
|
+
const options = commandOptions(command, rest, "--workspace", "--runtime", "--limit", "--endpoint");
|
|
217
|
+
if (profile !== undefined && options.runtimeProfile !== undefined) {
|
|
218
|
+
throw new Error("doctor accepts the Runtime Profile either positionally or with --runtime, not both");
|
|
219
|
+
}
|
|
209
220
|
return {
|
|
210
221
|
command,
|
|
222
|
+
...(options.endpoints.length === 0 ? {} : { endpoints: options.endpoints }),
|
|
211
223
|
presentation: options.presentation,
|
|
212
224
|
limit: options.limit,
|
|
213
225
|
...optionalProject(options),
|
|
214
|
-
...runtimeOption(profile),
|
|
226
|
+
...runtimeOption(profile ?? options.runtimeProfile),
|
|
215
227
|
};
|
|
216
228
|
}
|
|
217
229
|
case "paths": {
|
|
218
|
-
const options = commandOptions(command, tail, "--runtime");
|
|
230
|
+
const options = commandOptions(command, tail, "--runtime", "--workspace");
|
|
219
231
|
return { command, presentation: options.presentation, ...optionalRuntime(options) };
|
|
220
232
|
}
|
|
221
233
|
case "_worker": {
|
|
222
234
|
const [profile, rest] = requiredPositional(tail, "internal Worker launch is incomplete");
|
|
223
|
-
const options = commandOptions(command, rest, "--ready-file", "--worker-owner", "--package-root");
|
|
235
|
+
const options = commandOptions(command, rest, "--ready-file", "--worker-owner", "--package-root", "--execution-root");
|
|
224
236
|
if (options.readyFile === undefined || options.workerOwner === undefined) {
|
|
225
237
|
throw new Error("internal Worker launch is incomplete");
|
|
226
238
|
}
|
|
@@ -229,6 +241,7 @@ export function parseCommand(argv: readonly string[]): CliCommand {
|
|
|
229
241
|
profile,
|
|
230
242
|
readyFile: options.readyFile,
|
|
231
243
|
workerOwner: options.workerOwner,
|
|
244
|
+
...(options.executionRoot === undefined ? {} : { executionRoot: options.executionRoot }),
|
|
232
245
|
presentation: options.presentation,
|
|
233
246
|
...optionalPackageRoot(options),
|
|
234
247
|
};
|
|
@@ -244,7 +257,7 @@ function parseResultCommand(tail: readonly string[]): ProjectResultCommand | Exe
|
|
|
244
257
|
}
|
|
245
258
|
const [build, rest] = requiredPositional(values, `result ${action} requires one Build id`);
|
|
246
259
|
if (action === "finish" || action === "discard") {
|
|
247
|
-
const options = commandOptions(`result ${action}`, rest, "--runtime");
|
|
260
|
+
const options = commandOptions(`result ${action}`, rest, "--runtime", "--workspace");
|
|
248
261
|
return { command: "result", action, build, presentation: options.presentation, ...optionalRuntime(options) };
|
|
249
262
|
}
|
|
250
263
|
const options = commandOptions("result edit", rest,
|
|
@@ -302,11 +315,11 @@ function parseRuntimeCommand(tail: readonly string[]): RuntimeSelectionCommand |
|
|
|
302
315
|
}
|
|
303
316
|
const [profile, rest] = optionalPositional(values);
|
|
304
317
|
const allowed = action === "up" || action === "down"
|
|
305
|
-
? ["--runtime", "--max-wait-ms"] as const
|
|
318
|
+
? action === "up" ? ["--runtime", "--max-wait-ms", "--endpoint"] as const : ["--runtime", "--max-wait-ms"] as const
|
|
306
319
|
: action === "status"
|
|
307
320
|
? ["--runtime", "--limit"] as const
|
|
308
321
|
: ["--runtime", "--lines"] as const;
|
|
309
|
-
const options = commandOptions(`runtime ${action}`, rest, ...allowed);
|
|
322
|
+
const options = commandOptions(`runtime ${action}`, rest, "--workspace", ...allowed);
|
|
310
323
|
rejectDuplicateProfile("runtime", profile, options.runtimeProfile);
|
|
311
324
|
const runtime = runtimeOption(profile ?? options.runtimeProfile);
|
|
312
325
|
const common = {
|
|
@@ -314,9 +327,10 @@ function parseRuntimeCommand(tail: readonly string[]): RuntimeSelectionCommand |
|
|
|
314
327
|
action,
|
|
315
328
|
presentation: options.presentation,
|
|
316
329
|
...runtime,
|
|
330
|
+
...optionalProject(options),
|
|
317
331
|
};
|
|
318
332
|
if (action === "up" || action === "down") {
|
|
319
|
-
return { ...common, action, ...(options.maxWaitMs === undefined ? {} : { maxWaitMs: options.maxWaitMs }) };
|
|
333
|
+
return { ...common, action, ...(action === "up" && options.endpoints.length > 0 ? { endpoints: options.endpoints } : {}), ...(options.maxWaitMs === undefined ? {} : { maxWaitMs: options.maxWaitMs }) };
|
|
320
334
|
}
|
|
321
335
|
if (action === "status") return { ...common, action, limit: options.limit };
|
|
322
336
|
return { ...common, action, lines: options.lines };
|
|
@@ -329,7 +343,7 @@ function parseProgramsCommand(tail: readonly string[]): ProgramsCommand {
|
|
|
329
343
|
}
|
|
330
344
|
const [profile, rest] = optionalPositional(values);
|
|
331
345
|
const options = commandOptions(`programs ${action}`, rest,
|
|
332
|
-
"--runtime", "--limit", "--max-wait-ms");
|
|
346
|
+
"--runtime", "--workspace", "--limit", "--max-wait-ms", "--endpoint");
|
|
333
347
|
if (action !== "up" && options.maxWaitMs !== undefined) {
|
|
334
348
|
throw new Error("--max-wait-ms applies to programs up");
|
|
335
349
|
}
|
|
@@ -337,10 +351,12 @@ function parseProgramsCommand(tail: readonly string[]): ProgramsCommand {
|
|
|
337
351
|
const runtime = runtimeOption(profile ?? options.runtimeProfile);
|
|
338
352
|
const common = {
|
|
339
353
|
command: "programs" as const,
|
|
354
|
+
...(options.endpoints.length === 0 ? {} : { endpoints: options.endpoints }),
|
|
340
355
|
action,
|
|
341
356
|
presentation: options.presentation,
|
|
342
357
|
limit: options.limit,
|
|
343
358
|
...runtime,
|
|
359
|
+
...optionalProject(options),
|
|
344
360
|
};
|
|
345
361
|
return action === "up"
|
|
346
362
|
? { ...common, action, ...(options.maxWaitMs === undefined ? {} : { maxWaitMs: options.maxWaitMs }) }
|
|
@@ -362,7 +378,7 @@ function parseAuthCommand(tail: readonly string[]): AuthCommand {
|
|
|
362
378
|
}
|
|
363
379
|
const [endpoint, rest] = requiredPositional(values, `auth ${action} requires one Endpoint instance`);
|
|
364
380
|
const options = commandOptions(`auth ${action}`, rest,
|
|
365
|
-
"--runtime", "--slot", ...(action === "login" ? ["--from"] as const : []),
|
|
381
|
+
"--runtime", "--workspace", "--slot", ...(action === "login" ? ["--from"] as const : []),
|
|
366
382
|
...(action === "status" ? ["--limit"] as const : []));
|
|
367
383
|
const common = {
|
|
368
384
|
command: "auth" as const,
|
|
@@ -398,6 +414,7 @@ function parseOptions(values: readonly string[]): RawOptions {
|
|
|
398
414
|
let runtimeProfile: string | undefined;
|
|
399
415
|
let follow = false;
|
|
400
416
|
let maxWaitMs: number | undefined;
|
|
417
|
+
const endpoints: string[] = [];
|
|
401
418
|
let outputName: string | undefined;
|
|
402
419
|
let title: string | undefined;
|
|
403
420
|
let note: string | undefined;
|
|
@@ -416,6 +433,7 @@ function parseOptions(values: readonly string[]): RawOptions {
|
|
|
416
433
|
let watch = false;
|
|
417
434
|
let readyFile: string | undefined;
|
|
418
435
|
let workerOwner: string | undefined;
|
|
436
|
+
let executionRoot: string | undefined;
|
|
419
437
|
let reason: string | undefined;
|
|
420
438
|
let slot: string | undefined;
|
|
421
439
|
let credentialFile: string | undefined;
|
|
@@ -424,7 +442,7 @@ function parseOptions(values: readonly string[]): RawOptions {
|
|
|
424
442
|
for (let index = 0; index < values.length; index += 1) {
|
|
425
443
|
const item = values[index]!;
|
|
426
444
|
if (!item.startsWith("--")) throw new Error(`unexpected positional argument ${item}`);
|
|
427
|
-
const repeatable = [
|
|
445
|
+
const repeatable = item === "--endpoint" || [
|
|
428
446
|
"--json", "--jsonl", "--watch", "--verbose", "--debug",
|
|
429
447
|
"--no-color", "--follow", "--asset-root", "--highlight",
|
|
430
448
|
].includes(item);
|
|
@@ -445,6 +463,7 @@ function parseOptions(values: readonly string[]): RawOptions {
|
|
|
445
463
|
index += 1;
|
|
446
464
|
continue;
|
|
447
465
|
}
|
|
466
|
+
if (item === "--endpoint") { endpoints.push(optionValue(values, index, "--endpoint requires an Endpoint name")); index += 1; continue; }
|
|
448
467
|
if (item === "--workspace") {
|
|
449
468
|
workspaceRoot = resolve(optionValue(values, index, "--workspace requires a directory")); index += 1; continue;
|
|
450
469
|
}
|
|
@@ -501,6 +520,9 @@ function parseOptions(values: readonly string[]): RawOptions {
|
|
|
501
520
|
if (item === "--worker-owner") {
|
|
502
521
|
workerOwner = optionValue(values, index, "--worker-owner requires an identity"); index += 1; continue;
|
|
503
522
|
}
|
|
523
|
+
if (item === "--execution-root") {
|
|
524
|
+
executionRoot = resolve(optionValue(values, index, "--execution-root requires a path")); index += 1; continue;
|
|
525
|
+
}
|
|
504
526
|
if (item === "--reason") {
|
|
505
527
|
reason = optionValue(values, index, "--reason requires text"); index += 1; continue;
|
|
506
528
|
}
|
|
@@ -522,6 +544,7 @@ function parseOptions(values: readonly string[]): RawOptions {
|
|
|
522
544
|
presentation: { json: json || jsonl, ...(jsonl ? { jsonl: true } : {}), color, verbose },
|
|
523
545
|
assetRoots,
|
|
524
546
|
follow,
|
|
547
|
+
endpoints,
|
|
525
548
|
highlightedOutputs,
|
|
526
549
|
clearTitle,
|
|
527
550
|
clearNote,
|
|
@@ -541,6 +564,7 @@ function parseOptions(values: readonly string[]): RawOptions {
|
|
|
541
564
|
...(destination === undefined ? {} : { destination }),
|
|
542
565
|
...(readyFile === undefined ? {} : { readyFile }),
|
|
543
566
|
...(workerOwner === undefined ? {} : { workerOwner }),
|
|
567
|
+
...(executionRoot === undefined ? {} : { executionRoot }),
|
|
544
568
|
...(reason === undefined ? {} : { reason }),
|
|
545
569
|
...(slot === undefined ? {} : { slot }),
|
|
546
570
|
...(credentialFile === undefined ? {} : { credentialFile }),
|
|
@@ -576,7 +600,7 @@ function optionalProject(options: RawOptions): ProjectOption {
|
|
|
576
600
|
}
|
|
577
601
|
|
|
578
602
|
function optionalRuntime(options: RawOptions): RuntimeOption {
|
|
579
|
-
return runtimeOption(options.runtimeProfile);
|
|
603
|
+
return { ...runtimeOption(options.runtimeProfile), ...optionalProject(options) };
|
|
580
604
|
}
|
|
581
605
|
|
|
582
606
|
function runtimeOption(profile: string | undefined): RuntimeOption {
|
|
@@ -24,7 +24,12 @@ export function createCatalogDescriptor(options: {
|
|
|
24
24
|
if (item.ref.kind === "operation-result") {
|
|
25
25
|
throw new Error(`public output ${item.name} was not lowered to a stable Record or Logical Output`);
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
if (item.ref.kind !== "logical-output") return [];
|
|
28
|
+
const outputId = item.ref.id;
|
|
29
|
+
const element = options.compilation.provenance.elements.find((element) => element.outputs.some((output) => output.id === outputId));
|
|
30
|
+
const authored = element?.outputs.find((output) => output.id === outputId);
|
|
31
|
+
const displayName = element?.components.find((component) => component.id === authored?.component)?.local;
|
|
32
|
+
return [{ name: item.name, ref: item.ref, ...(displayName === undefined ? {} : { displayName }) }];
|
|
28
33
|
});
|
|
29
34
|
const names = new Set<string>();
|
|
30
35
|
const outputs = new Set<string>();
|
|
@@ -416,9 +421,10 @@ export function assertPlannedRequests(
|
|
|
416
421
|
}
|
|
417
422
|
}
|
|
418
423
|
|
|
419
|
-
export async function preflightPlan(host: NodeRuntimeHost, state: BuildState) {
|
|
424
|
+
export async function preflightPlan(host: NodeRuntimeHost, state: BuildState, providers: readonly PlanProviderView[]) {
|
|
420
425
|
const capabilities = demandedCapabilities(state);
|
|
421
|
-
const
|
|
426
|
+
const endpoints = [...new Set(providers.flatMap((item) => item.status === "resolved" && item.endpoint !== undefined ? [item.endpoint] : []))];
|
|
427
|
+
const result = await host.preflight({ endpoints });
|
|
422
428
|
return {
|
|
423
429
|
ok: !result.diagnostics.some((item) => item.severity === "error"),
|
|
424
430
|
capabilities: capabilities.map(capabilityName),
|
|
@@ -4,7 +4,7 @@ type CommandBase = {
|
|
|
4
4
|
readonly presentation: CliOutputOptions;
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
export type RuntimeOption = {
|
|
7
|
+
export type RuntimeOption = ProjectOption & {
|
|
8
8
|
readonly runtimeProfile: string | undefined;
|
|
9
9
|
};
|
|
10
10
|
|
|
@@ -72,6 +72,7 @@ export type ProjectResultCommand =
|
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
export type ExecutionCommand =
|
|
75
|
+
| (CommandBase & RuntimeOption & { readonly command: "logs"; readonly build: string; readonly lines: number })
|
|
75
76
|
| (CommandBase & RuntimeOption & {
|
|
76
77
|
readonly command: "status";
|
|
77
78
|
readonly build: string;
|
|
@@ -115,6 +116,7 @@ export type RuntimeOperationCommand =
|
|
|
115
116
|
| (CommandBase & RuntimeOption & {
|
|
116
117
|
readonly command: "runtime";
|
|
117
118
|
readonly action: "up";
|
|
119
|
+
readonly endpoints?: readonly string[];
|
|
118
120
|
readonly maxWaitMs?: number;
|
|
119
121
|
})
|
|
120
122
|
| (CommandBase & RuntimeOption & {
|
|
@@ -136,12 +138,14 @@ export type RuntimeOperationCommand =
|
|
|
136
138
|
export type ProgramsCommand =
|
|
137
139
|
| (CommandBase & RuntimeOption & {
|
|
138
140
|
readonly command: "programs";
|
|
141
|
+
readonly endpoints?: readonly string[];
|
|
139
142
|
readonly action: "up";
|
|
140
143
|
readonly maxWaitMs?: number;
|
|
141
144
|
readonly limit: number;
|
|
142
145
|
})
|
|
143
146
|
| (CommandBase & RuntimeOption & {
|
|
144
147
|
readonly command: "programs";
|
|
148
|
+
readonly endpoints?: readonly string[];
|
|
145
149
|
readonly action: "down" | "status";
|
|
146
150
|
readonly limit: number;
|
|
147
151
|
});
|
|
@@ -182,6 +186,7 @@ export type EnvironmentCommand =
|
|
|
182
186
|
})
|
|
183
187
|
| (CommandBase & ProjectOption & RuntimeOption & {
|
|
184
188
|
readonly command: "doctor";
|
|
189
|
+
readonly endpoints?: readonly string[];
|
|
185
190
|
readonly limit: number;
|
|
186
191
|
});
|
|
187
192
|
|
|
@@ -190,6 +195,7 @@ export type WorkerCommand = CommandBase & {
|
|
|
190
195
|
readonly profile: string;
|
|
191
196
|
readonly readyFile: string;
|
|
192
197
|
readonly workerOwner: string;
|
|
198
|
+
readonly executionRoot?: string;
|
|
193
199
|
readonly packageRoot?: string;
|
|
194
200
|
};
|
|
195
201
|
|
|
@@ -10,9 +10,27 @@ import { acquireOAuthCredential } from "../oauth.js";
|
|
|
10
10
|
import { writeCliOutput } from "../output.js";
|
|
11
11
|
import type { CliIo } from "../output.js";
|
|
12
12
|
import { hypitHostStateRoot, hypitProjectStateRoot } from "../paths.js";
|
|
13
|
-
import type { CliRuntimeController } from "../runtime-port.js";
|
|
13
|
+
import type { CliManagedProgramReport, CliRuntimeController } from "../runtime-port.js";
|
|
14
14
|
import type { OperationalWriter } from "./types.js";
|
|
15
15
|
|
|
16
|
+
function programRecord(item: CliManagedProgramReport) {
|
|
17
|
+
return {
|
|
18
|
+
...item,
|
|
19
|
+
state: item.state.state,
|
|
20
|
+
...(item.state.state === "ready" ? {} : { stateDetail: item.state.detail }),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function programDescription(item: CliManagedProgramReport): string {
|
|
25
|
+
const details = [...new Set([
|
|
26
|
+
...(item.state.state === "ready" ? [] : [item.state.detail]),
|
|
27
|
+
...(item.detail === undefined ? [] : [item.detail]),
|
|
28
|
+
])];
|
|
29
|
+
return `${item.id}: ${item.state.state}${details.length === 0 ? "" : ` — ${details.join("; ")}`}`
|
|
30
|
+
+ (item.pid === undefined ? "" : ` · PID ${item.pid}`)
|
|
31
|
+
+ (item.logPath === undefined ? "" : ` · log ${item.logPath}`);
|
|
32
|
+
}
|
|
33
|
+
|
|
16
34
|
export function isEnvironmentCommand(args: CliCommand): args is EnvironmentCommand {
|
|
17
35
|
return args.command === "paths" || args.command === "packages" || args.command === "doctor"
|
|
18
36
|
|| args.command === "programs" || args.command === "auth"
|
|
@@ -23,6 +41,7 @@ export function isEnvironmentCommand(args: CliCommand): args is EnvironmentComma
|
|
|
23
41
|
export async function runEnvironmentCommand(input: {
|
|
24
42
|
readonly args: EnvironmentCommand;
|
|
25
43
|
readonly runtimeProfile: string | undefined;
|
|
44
|
+
readonly runtimeSelectionFile: string | undefined;
|
|
26
45
|
readonly io: CliIo;
|
|
27
46
|
readonly distribution: CliDistribution;
|
|
28
47
|
readonly projectRoot: string;
|
|
@@ -32,11 +51,16 @@ export async function runEnvironmentCommand(input: {
|
|
|
32
51
|
readonly write: OperationalWriter;
|
|
33
52
|
}): Promise<void> {
|
|
34
53
|
const {
|
|
35
|
-
args, runtimeProfile, io, distribution, projectRoot, packageRootForProject, runtimeHost, runtimeController, write,
|
|
54
|
+
args, runtimeProfile, runtimeSelectionFile, io, distribution, projectRoot, packageRootForProject, runtimeHost, runtimeController, write,
|
|
36
55
|
} = input;
|
|
56
|
+
const profileSource: "none" | "argument" | "project" = runtimeProfile === undefined
|
|
57
|
+
? "none" : runtimeSelectionFile === undefined ? "argument" : "project";
|
|
58
|
+
const selectionDescription = profileSource === "argument"
|
|
59
|
+
? "command argument (this invocation only)"
|
|
60
|
+
: runtimeSelectionFile ?? "none";
|
|
37
61
|
const reportProgramProgress = args.presentation.json
|
|
38
62
|
? undefined
|
|
39
|
-
: (event: { readonly id: string; readonly phase: "checking" | "installing" | "starting" | "waiting" | "ready" }): void => {
|
|
63
|
+
: (event: { readonly id: string; readonly phase: "checking" | "installing" | "starting" | "waiting" | "ready"; readonly logPath?: string }): void => {
|
|
40
64
|
if (!args.presentation.verbose && event.phase !== "installing" && event.phase !== "starting") return;
|
|
41
65
|
const verb = {
|
|
42
66
|
checking: "Checking",
|
|
@@ -45,12 +69,12 @@ export async function runEnvironmentCommand(input: {
|
|
|
45
69
|
waiting: "Waiting for",
|
|
46
70
|
ready: "Ready",
|
|
47
71
|
}[event.phase];
|
|
48
|
-
io.write(` · ${verb} ${event.id}\n`);
|
|
72
|
+
io.write(` · ${verb} ${event.id}${event.logPath === undefined ? "" : ` · log ${event.logPath}`}\n`);
|
|
49
73
|
};
|
|
50
74
|
const reportPackageProgress = args.presentation.json
|
|
51
75
|
? undefined
|
|
52
|
-
: (event: { readonly specifier: string; readonly phase: "checking" | "installing" | "ready" }): void => {
|
|
53
|
-
if (event.phase === "installing") io.write(` · Installing ${event.specifier}\n`);
|
|
76
|
+
: (event: { readonly specifier: string; readonly phase: "checking" | "installing" | "ready"; readonly logPath?: string }): void => {
|
|
77
|
+
if (event.phase === "installing") io.write(` · Installing ${event.specifier}${event.logPath === undefined ? "" : ` · log ${event.logPath}`}\n`);
|
|
54
78
|
};
|
|
55
79
|
const reportCredentialProgress = args.presentation.json
|
|
56
80
|
? io.writeProgress
|
|
@@ -63,6 +87,8 @@ export async function runEnvironmentCommand(input: {
|
|
|
63
87
|
const machine = {
|
|
64
88
|
format: "hypit.cli-paths@1" as const,
|
|
65
89
|
project: projectRoot,
|
|
90
|
+
profileSource,
|
|
91
|
+
selectionFile: resolve(projectRoot, ".hypit/runtime"),
|
|
66
92
|
projectState: hypitProjectStateRoot(projectRoot),
|
|
67
93
|
...(runtimeProfile === undefined ? {} : { profile: runtimeProfile }),
|
|
68
94
|
...(runtimePaths === undefined ? {} : { runtimeData: runtimePaths.runtimeDataRoot }),
|
|
@@ -74,11 +100,14 @@ export async function runEnvironmentCommand(input: {
|
|
|
74
100
|
["Project", machine.project],
|
|
75
101
|
["Project state", machine.projectState],
|
|
76
102
|
["Runtime Profile", machine.profile ?? "not selected"],
|
|
103
|
+
["Runtime selection", selectionDescription],
|
|
77
104
|
["Runtime data", machine.runtimeData ?? "not selected"],
|
|
78
105
|
["Host state", machine.hostState],
|
|
79
106
|
["Machine packages", machine.machinePackages],
|
|
80
107
|
["Distribution", machine.distribution ?? "embedded"],
|
|
81
|
-
]
|
|
108
|
+
], runtimeProfile === undefined
|
|
109
|
+
? ["Select an existing Profile with hypit runtime use <profile> --workspace <project>, or create one with hypit runtime init."]
|
|
110
|
+
: []);
|
|
82
111
|
return;
|
|
83
112
|
}
|
|
84
113
|
|
|
@@ -97,10 +126,13 @@ export async function runEnvironmentCommand(input: {
|
|
|
97
126
|
action: args.action,
|
|
98
127
|
package: args.package,
|
|
99
128
|
ready,
|
|
129
|
+
...(reports[0] === undefined ? {} : { installation: reports[0].root }),
|
|
130
|
+
...(reports[0]?.logPath === undefined ? {} : { logPath: reports[0].logPath }),
|
|
100
131
|
}, args.action === "install" ? "Machine package is ready" : "Machine package status",
|
|
101
132
|
ready ? "success" : "warning", [
|
|
102
133
|
["Package", args.package],
|
|
103
134
|
["Ready", String(ready)],
|
|
135
|
+
...(args.presentation.verbose && reports[0] !== undefined ? [["Installation", reports[0].root] as const] : []),
|
|
104
136
|
]);
|
|
105
137
|
if (!ready) io.setExitCode?.(1);
|
|
106
138
|
return;
|
|
@@ -109,7 +141,7 @@ export async function runEnvironmentCommand(input: {
|
|
|
109
141
|
if (args.command === "doctor") {
|
|
110
142
|
const profile = runtimeProfile === undefined ? undefined : resolve(runtimeProfile);
|
|
111
143
|
const [runtimeResult, projectResult] = await Promise.all([
|
|
112
|
-
profile === undefined ? undefined : (await runtimeHost(profile)).doctor(),
|
|
144
|
+
profile === undefined ? undefined : (await runtimeHost(profile)).doctor(args.endpoints === undefined ? {} : { endpoints: args.endpoints }),
|
|
113
145
|
distribution.diagnoseProjectResults(projectRoot, {
|
|
114
146
|
packageRoot: await packageRootForProject(),
|
|
115
147
|
...(distribution.packageRoot === undefined
|
|
@@ -122,10 +154,11 @@ export async function runEnvironmentCommand(input: {
|
|
|
122
154
|
format: "hypit.cli-doctor@1" as const,
|
|
123
155
|
ok: !diagnostics.some((item) => item.severity === "error"),
|
|
124
156
|
project: projectRoot,
|
|
157
|
+
profileSource,
|
|
158
|
+
...(runtimeSelectionFile === undefined ? {} : { selectionFile: runtimeSelectionFile }),
|
|
125
159
|
...(profile === undefined ? {} : { profile }),
|
|
126
160
|
diagnosticCount: diagnostics.length,
|
|
127
|
-
diagnostics
|
|
128
|
-
...(diagnostics.length <= args.limit ? {} : { omittedDiagnostics: diagnostics.length - args.limit }),
|
|
161
|
+
diagnostics,
|
|
129
162
|
};
|
|
130
163
|
writeCliOutput(io, args.presentation, { kind: "doctor", machine });
|
|
131
164
|
if (!machine.ok) io.setExitCode?.(1);
|
|
@@ -137,21 +170,27 @@ export async function runEnvironmentCommand(input: {
|
|
|
137
170
|
const profile = resolve(runtimeProfile);
|
|
138
171
|
const host = await runtimeHost(profile);
|
|
139
172
|
if (args.action === "up") {
|
|
140
|
-
await host.prepare(reportPackageProgress === undefined ? {} : { onProgress: reportPackageProgress });
|
|
173
|
+
await host.prepare({ ...(args.endpoints === undefined ? {} : { endpoints: args.endpoints }), ...(reportPackageProgress === undefined ? {} : { onProgress: reportPackageProgress }) });
|
|
141
174
|
}
|
|
142
175
|
const controller = await runtimeController(profile);
|
|
143
176
|
const result = args.action === "up"
|
|
144
177
|
? await controller.programs.up({
|
|
178
|
+
...(args.endpoints === undefined ? {} : { endpoints: args.endpoints }),
|
|
145
179
|
...(args.maxWaitMs === undefined ? {} : { maxWaitMs: args.maxWaitMs }),
|
|
146
180
|
...(reportProgramProgress === undefined ? {} : { onProgress: reportProgramProgress }),
|
|
147
181
|
})
|
|
148
182
|
: args.action === "down"
|
|
149
|
-
? await controller.programs.down()
|
|
150
|
-
: await controller.programs.report();
|
|
183
|
+
? await controller.programs.down(args.endpoints === undefined ? {} : { endpoints: args.endpoints })
|
|
184
|
+
: await controller.programs.report(args.endpoints === undefined ? {} : { endpoints: args.endpoints });
|
|
151
185
|
const ready = result.programs.every((item) => item.state.state === "ready");
|
|
152
186
|
const desiredState = args.action === "down" ? !result.programs.some((item) => item.state.state === "ready") : ready;
|
|
153
187
|
const lifecycleOk = args.action === "status" || desiredState;
|
|
154
|
-
const
|
|
188
|
+
const needsAttention = (item: typeof result.programs[number]) => args.action === "down"
|
|
189
|
+
? item.state.state === "ready" : item.state.state !== "ready";
|
|
190
|
+
const relevant = result.programs.filter((item) => args.presentation.verbose || args.action === "status" || needsAttention(item));
|
|
191
|
+
const urgent = relevant.filter(needsAttention);
|
|
192
|
+
const shownPrograms = [...urgent, ...relevant.filter((item) => !needsAttention(item)).slice(0, Math.max(0, args.limit - urgent.length))];
|
|
193
|
+
const omittedPrograms = relevant.length - shownPrograms.length;
|
|
155
194
|
const title = args.action === "up"
|
|
156
195
|
? desiredState ? "External programs ready" : "External programs need attention"
|
|
157
196
|
: args.action === "down"
|
|
@@ -161,19 +200,17 @@ export async function runEnvironmentCommand(input: {
|
|
|
161
200
|
format: "hypit.cli-programs@1",
|
|
162
201
|
action: args.action,
|
|
163
202
|
ready,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
})),
|
|
169
|
-
...(result.programs.length <= args.limit ? {} : { omittedPrograms: result.programs.length - args.limit }),
|
|
203
|
+
programCount: result.programs.length,
|
|
204
|
+
readyCount: result.programs.filter((item) => item.state.state === "ready").length,
|
|
205
|
+
programs: shownPrograms.map(programRecord),
|
|
206
|
+
...(omittedPrograms === 0 ? {} : { omittedPrograms }),
|
|
170
207
|
}, title,
|
|
171
208
|
args.action === "status" ? ready ? "success" : "info" : lifecycleOk ? "success" : "warning", [
|
|
172
209
|
...(!args.presentation.verbose && lifecycleOk && args.action !== "status" ? [] : [
|
|
173
210
|
["Programs", String(result.programs.length)] as const,
|
|
174
211
|
["Ready", String(result.programs.filter((item) => item.state.state === "ready").length)] as const,
|
|
175
212
|
]),
|
|
176
|
-
], shownPrograms.map((
|
|
213
|
+
], shownPrograms.map(programDescription).concat(omittedPrograms === 0 ? [] : [`${omittedPrograms} more programs · use --limit <count>`]));
|
|
177
214
|
if (!lifecycleOk) io.setExitCode?.(1);
|
|
178
215
|
return;
|
|
179
216
|
}
|
|
@@ -186,11 +223,12 @@ export async function runEnvironmentCommand(input: {
|
|
|
186
223
|
const packageRoot = await packageRootForProject();
|
|
187
224
|
const host = await runtimeHost(profile, packageRoot);
|
|
188
225
|
const prepared = await host.prepare(
|
|
189
|
-
reportPackageProgress === undefined ? {} : { onProgress: reportPackageProgress },
|
|
226
|
+
{ ...(args.endpoints === undefined ? {} : { endpoints: args.endpoints }), ...(reportPackageProgress === undefined ? {} : { onProgress: reportPackageProgress }) },
|
|
190
227
|
);
|
|
191
|
-
const validated = await host.createRuntime();
|
|
228
|
+
const validated = await host.createRuntime(args.endpoints === undefined ? {} : { endpoints: args.endpoints });
|
|
192
229
|
await validated.close();
|
|
193
230
|
const external = await controller.programs.up({
|
|
231
|
+
...(args.endpoints === undefined ? {} : { endpoints: args.endpoints }),
|
|
194
232
|
...(args.maxWaitMs === undefined ? {} : { maxWaitMs: args.maxWaitMs }),
|
|
195
233
|
...(reportProgramProgress === undefined ? {} : { onProgress: reportProgramProgress }),
|
|
196
234
|
});
|
|
@@ -207,6 +245,7 @@ export async function runEnvironmentCommand(input: {
|
|
|
207
245
|
programs: {
|
|
208
246
|
total: external.programs.length,
|
|
209
247
|
ready: external.programs.filter((item) => item.state.state === "ready").length,
|
|
248
|
+
items: external.programs.filter((item) => args.presentation.verbose || item.state.state !== "ready").map(programRecord),
|
|
210
249
|
},
|
|
211
250
|
}, ok ? "Local Runtime ready" : "Local Runtime needs attention", ok ? "success" : "warning", [
|
|
212
251
|
...(!args.presentation.verbose && ok ? [] : [
|
|
@@ -214,7 +253,8 @@ export async function runEnvironmentCommand(input: {
|
|
|
214
253
|
["Worker", processState.state] as const,
|
|
215
254
|
["Managed programs", `${external.programs.filter((item) => item.state.state === "ready").length}/${external.programs.length} ready`] as const,
|
|
216
255
|
]),
|
|
217
|
-
])
|
|
256
|
+
], external.programs.filter((item) => args.presentation.verbose || item.state.state !== "ready")
|
|
257
|
+
.map(programDescription));
|
|
218
258
|
if (!ok) io.setExitCode?.(1);
|
|
219
259
|
return;
|
|
220
260
|
}
|
|
@@ -271,13 +311,12 @@ export async function runEnvironmentCommand(input: {
|
|
|
271
311
|
attention,
|
|
272
312
|
worker: {
|
|
273
313
|
state: worker.state,
|
|
274
|
-
...(worker.configuration === undefined ? {} : { configuration: worker.configuration }),
|
|
275
314
|
},
|
|
276
315
|
builds: counts,
|
|
277
316
|
programs: {
|
|
278
317
|
total: external.programs.length,
|
|
279
318
|
ready: external.programs.length - unavailable.length,
|
|
280
|
-
unavailable: unavailable.
|
|
319
|
+
unavailable: unavailable.map(programRecord),
|
|
281
320
|
},
|
|
282
321
|
capacity: {
|
|
283
322
|
active: activity.capacity.length,
|
|
@@ -297,7 +336,7 @@ export async function runEnvironmentCommand(input: {
|
|
|
297
336
|
["Capacity in use", String(activity.capacity.length)] as const,
|
|
298
337
|
] : []),
|
|
299
338
|
], [
|
|
300
|
-
...unavailable.
|
|
339
|
+
...unavailable.map(programDescription),
|
|
301
340
|
]);
|
|
302
341
|
} finally {
|
|
303
342
|
if (runtime !== undefined) await runtime.close();
|