@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
|
@@ -3,7 +3,6 @@ import { randomUUID } from "node:crypto";
|
|
|
3
3
|
import { mkdir, open, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
4
4
|
import { dirname, join, resolve } from "node:path";
|
|
5
5
|
|
|
6
|
-
import { canonicalStringify } from "@hypit/protocol";
|
|
7
6
|
|
|
8
7
|
import { processAlive, stopProcessTree } from "./process-control.js";
|
|
9
8
|
import { readProcessLogs } from "./process-logs.js";
|
|
@@ -17,7 +16,6 @@ export type RuntimeWorkerLaunch = {
|
|
|
17
16
|
|
|
18
17
|
export type RuntimeProcessState = {
|
|
19
18
|
readonly state: "running" | "stopped";
|
|
20
|
-
readonly configuration?: "current" | "changed";
|
|
21
19
|
readonly profile: string;
|
|
22
20
|
readonly pid?: number;
|
|
23
21
|
readonly startedAt?: number;
|
|
@@ -26,7 +24,6 @@ export type RuntimeProcessState = {
|
|
|
26
24
|
|
|
27
25
|
type ProcessRecord = {
|
|
28
26
|
readonly profile: string;
|
|
29
|
-
readonly profileConfig: string;
|
|
30
27
|
readonly owner: string;
|
|
31
28
|
readonly pid: number;
|
|
32
29
|
readonly startedAt: number;
|
|
@@ -68,12 +65,11 @@ async function rotateLog(path: string): Promise<void> {
|
|
|
68
65
|
await rename(path, previous);
|
|
69
66
|
}
|
|
70
67
|
|
|
71
|
-
async function record(
|
|
68
|
+
async function record(dataRoot: string): Promise<ProcessRecord | undefined> {
|
|
72
69
|
const path = paths(dataRoot).pid;
|
|
73
70
|
try {
|
|
74
71
|
const value = JSON.parse(await readFile(path, "utf8")) as ProcessRecord;
|
|
75
|
-
if (value.profile !==
|
|
76
|
-
|| typeof value.profileConfig !== "string" || value.profileConfig.length === 0
|
|
72
|
+
if (typeof value.profile !== "string" || value.profile.length === 0
|
|
77
73
|
|| typeof value.owner !== "string" || value.owner.length === 0
|
|
78
74
|
|| !Number.isSafeInteger(value.pid) || value.pid < 1
|
|
79
75
|
|| !Number.isSafeInteger(value.startedAt) || value.startedAt < 0) {
|
|
@@ -86,10 +82,6 @@ async function record(profile: string, dataRoot: string): Promise<ProcessRecord
|
|
|
86
82
|
}
|
|
87
83
|
}
|
|
88
84
|
|
|
89
|
-
async function profileConfig(profile: string): Promise<string> {
|
|
90
|
-
return canonicalStringify(JSON.parse(await readFile(resolve(profile), "utf8")));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
85
|
async function readyOwner(path: string): Promise<string | undefined> {
|
|
94
86
|
try {
|
|
95
87
|
const value = (await readFile(path, "utf8")).trim();
|
|
@@ -105,13 +97,12 @@ export async function runtimeProcessStatus(
|
|
|
105
97
|
dataRoot: string,
|
|
106
98
|
): Promise<RuntimeProcessState> {
|
|
107
99
|
const location = paths(dataRoot);
|
|
108
|
-
const current = await record(
|
|
100
|
+
const current = await record(dataRoot);
|
|
109
101
|
if (current === undefined || !processAlive(current.pid)) {
|
|
110
102
|
return { state: "stopped", profile: resolve(profile), logPath: location.log };
|
|
111
103
|
}
|
|
112
104
|
return {
|
|
113
105
|
state: "running",
|
|
114
|
-
configuration: current.profileConfig === await profileConfig(profile) ? "current" : "changed",
|
|
115
106
|
profile: current.profile,
|
|
116
107
|
pid: current.pid,
|
|
117
108
|
startedAt: current.startedAt,
|
|
@@ -159,7 +150,7 @@ async function waitForReady(
|
|
|
159
150
|
const location = paths(dataRoot);
|
|
160
151
|
const deadline = Date.now() + timeoutMs;
|
|
161
152
|
while (Date.now() <= deadline) {
|
|
162
|
-
const current = await record(
|
|
153
|
+
const current = await record(dataRoot);
|
|
163
154
|
if (current === undefined || !processAlive(current.pid)) {
|
|
164
155
|
const log = await readProcessLogs(location.log, LOG_TAIL_BYTES);
|
|
165
156
|
throw new Error(`Runtime Worker exited before becoming ready${log.length === 0 ? "" : `: ${log.trim().split("\n").at(-1)}`}`);
|
|
@@ -197,18 +188,14 @@ export async function ensureRuntimeProcess(
|
|
|
197
188
|
try {
|
|
198
189
|
const current = await runtimeProcessStatus(profile, dataRoot);
|
|
199
190
|
if (current.state === "running") {
|
|
200
|
-
if (current.configuration === "changed") {
|
|
201
|
-
throw new Error("Runtime Profile changed while its Worker is running; stop and start the Worker to activate it");
|
|
202
|
-
}
|
|
203
191
|
return current;
|
|
204
192
|
}
|
|
205
|
-
const stale = await record(
|
|
193
|
+
const stale = await record(dataRoot).catch(() => undefined);
|
|
206
194
|
if (stale !== undefined && !processAlive(stale.pid)) {
|
|
207
195
|
await rm(location.pid, { force: true });
|
|
208
196
|
await rm(location.ready, { force: true });
|
|
209
197
|
}
|
|
210
198
|
const owner = `worker_${randomUUID()}`;
|
|
211
|
-
const activeProfileConfig = await profileConfig(absolute);
|
|
212
199
|
await rm(location.ready, { force: true });
|
|
213
200
|
await rotateLog(location.log);
|
|
214
201
|
const log = await open(location.log, "a");
|
|
@@ -252,7 +239,6 @@ export async function ensureRuntimeProcess(
|
|
|
252
239
|
const startedAt = Date.now();
|
|
253
240
|
await writeFile(location.pid, JSON.stringify({
|
|
254
241
|
profile: absolute,
|
|
255
|
-
profileConfig: activeProfileConfig,
|
|
256
242
|
owner,
|
|
257
243
|
pid: child.pid,
|
|
258
244
|
startedAt,
|
|
@@ -260,9 +246,6 @@ export async function ensureRuntimeProcess(
|
|
|
260
246
|
child.unref?.();
|
|
261
247
|
try {
|
|
262
248
|
const ready = await waitForReady(absolute, dataRoot, owner, timeoutMs);
|
|
263
|
-
if (ready.configuration === "changed") {
|
|
264
|
-
throw new Error("Runtime Profile changed while its Worker was starting; start it again to activate the new Profile");
|
|
265
|
-
}
|
|
266
249
|
return ready;
|
|
267
250
|
} catch (error) {
|
|
268
251
|
const stopped = await stopProcessTree(child.pid, true).catch(() => "denied" as const);
|
|
@@ -272,7 +255,7 @@ export async function ensureRuntimeProcess(
|
|
|
272
255
|
{ cause: error },
|
|
273
256
|
);
|
|
274
257
|
}
|
|
275
|
-
const saved = await record(
|
|
258
|
+
const saved = await record(dataRoot).catch(() => undefined);
|
|
276
259
|
if (saved?.owner === owner) {
|
|
277
260
|
await rm(location.pid, { force: true });
|
|
278
261
|
await rm(location.ready, { force: true });
|
|
@@ -288,7 +271,7 @@ export async function ensureRuntimeProcess(
|
|
|
288
271
|
}
|
|
289
272
|
|
|
290
273
|
async function stopRuntimeProcessUnlocked(profile: string, dataRoot: string, timeoutMs: number): Promise<RuntimeProcessState> {
|
|
291
|
-
const current = await record(
|
|
274
|
+
const current = await record(dataRoot);
|
|
292
275
|
const location = paths(dataRoot);
|
|
293
276
|
if (current === undefined || !processAlive(current.pid)) {
|
|
294
277
|
await rm(location.pid, { force: true });
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { setImmediate } from "node:timers/promises";
|
|
3
2
|
import type { BuildState } from "@hypit/protocol";
|
|
4
3
|
import type {
|
|
5
4
|
ResourceStore,
|
|
@@ -10,12 +9,13 @@ import type {
|
|
|
10
9
|
RuntimePreparation,
|
|
11
10
|
RuntimeRunnableCommand,
|
|
12
11
|
ScheduledBuildResult,
|
|
13
|
-
RuntimeWorkerRunOptions,
|
|
14
12
|
} from "@hypit/runtime";
|
|
15
13
|
import { LocalBuildScheduler } from "@hypit/runtime";
|
|
16
14
|
import { BuildMachine } from "@hypit/core";
|
|
17
15
|
|
|
18
16
|
type LocalWorkerOptions = {
|
|
17
|
+
readonly executionBuild?: string;
|
|
18
|
+
readonly executionLogs?: import("./log.js").LocalExecutionLogs;
|
|
19
19
|
readonly stores: {
|
|
20
20
|
readonly builds: import("@hypit/runtime").BuildStore;
|
|
21
21
|
readonly operations: import("@hypit/runtime").OperationStore;
|
|
@@ -25,7 +25,6 @@ type LocalWorkerOptions = {
|
|
|
25
25
|
readonly resourceStore: ResourceStore;
|
|
26
26
|
readonly resourceStoreForBuild?: (build: string) => ResourceStore;
|
|
27
27
|
readonly openBuildResultRepository: NonNullable<import("./types.js").CreateLocalRuntimeOptions["openBuildResultRepository"]>;
|
|
28
|
-
readonly assertEnvironment?: () => Promise<void> | void;
|
|
29
28
|
readonly installComponentPackages: (specifiers: readonly string[]) => Promise<void>;
|
|
30
29
|
readonly resultWriter: import("./types.js").LocalResultWriter;
|
|
31
30
|
};
|
|
@@ -36,28 +35,6 @@ function assert(condition: unknown, message: string): asserts condition {
|
|
|
36
35
|
if (!condition) throw new Error(message);
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
function positive(value: number, subject: string): number {
|
|
40
|
-
assert(Number.isSafeInteger(value) && value > 0, `${subject} must be a positive safe integer`);
|
|
41
|
-
return value;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
async function pause(ms: number, signal?: AbortSignal): Promise<void> {
|
|
45
|
-
if (signal?.aborted === true) throw signal.reason ?? new Error("Worker stopped");
|
|
46
|
-
await new Promise<void>((resolve, reject) => {
|
|
47
|
-
const done = (): void => {
|
|
48
|
-
signal?.removeEventListener("abort", abort);
|
|
49
|
-
resolve();
|
|
50
|
-
};
|
|
51
|
-
const timer = setTimeout(done, ms);
|
|
52
|
-
const abort = (): void => {
|
|
53
|
-
clearTimeout(timer);
|
|
54
|
-
signal?.removeEventListener("abort", abort);
|
|
55
|
-
reject(signal?.reason ?? new Error("Worker stopped"));
|
|
56
|
-
};
|
|
57
|
-
signal?.addEventListener("abort", abort, { once: true });
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
38
|
/** Shares declared capacity across independently advancing Builds. */
|
|
62
39
|
class CapacityExecutor implements RuntimeCommandExecutor {
|
|
63
40
|
readonly #delegate: RuntimeCommandExecutor;
|
|
@@ -87,9 +64,13 @@ class CapacityExecutor implements RuntimeCommandExecutor {
|
|
|
87
64
|
context: { readonly build: string },
|
|
88
65
|
): Promise<RuntimeExecutionResult> {
|
|
89
66
|
const store = this.#options.stores.executions;
|
|
67
|
+
const recordExecution = this.#options.executionLogs === undefined ? {} : {
|
|
68
|
+
recordExecution: (event: import("@hypit/runtime").ExecutionLogEvent) =>
|
|
69
|
+
this.#options.executionLogs!.record(context.build, descriptor.command.id, event),
|
|
70
|
+
};
|
|
90
71
|
if (descriptor.capacityMode === "asynchronous") {
|
|
91
72
|
return await this.#delegate.executeCommand(state, descriptor, {
|
|
92
|
-
...context, releaseOperationCapacity: () => this.#options.stores.execution.releaseCapacity(context.build, descriptor.command.id),
|
|
73
|
+
...context, ...recordExecution, releaseOperationCapacity: () => this.#options.stores.execution.releaseCapacity(context.build, descriptor.command.id),
|
|
93
74
|
});
|
|
94
75
|
}
|
|
95
76
|
const begun = await store.begin(context.build, descriptor.command.id);
|
|
@@ -107,7 +88,10 @@ class CapacityExecutor implements RuntimeCommandExecutor {
|
|
|
107
88
|
return { status: "completed", event };
|
|
108
89
|
}
|
|
109
90
|
try {
|
|
110
|
-
const result = await this.#delegate.executeCommand(state, descriptor,
|
|
91
|
+
const result = await this.#delegate.executeCommand(state, descriptor, {
|
|
92
|
+
...context, ...recordExecution,
|
|
93
|
+
reportProgress: (activity) => store.reportProgress(context.build, descriptor.command.id, activity),
|
|
94
|
+
});
|
|
111
95
|
assert(result.status === "completed",
|
|
112
96
|
`Immediate Command ${descriptor.command.id} returned ${result.status}`);
|
|
113
97
|
await store.complete(context.build, descriptor.command.id, result.event);
|
|
@@ -190,11 +174,13 @@ class DurableLocalWorker {
|
|
|
190
174
|
readonly #options: LocalWorkerOptions;
|
|
191
175
|
readonly #executorWithCapacity: CapacityExecutor;
|
|
192
176
|
readonly #owner = randomUUID();
|
|
177
|
+
readonly #ownedBuilds = new Set<string>();
|
|
193
178
|
#buildRead = Promise.resolve();
|
|
194
179
|
|
|
195
180
|
constructor(executor: RuntimeCommandExecutor, options: LocalWorkerOptions) {
|
|
196
181
|
this.#executor = executor;
|
|
197
182
|
this.#options = options;
|
|
183
|
+
if (options.executionBuild !== undefined) this.#ownedBuilds.add(options.executionBuild);
|
|
198
184
|
this.#executorWithCapacity = new CapacityExecutor(executor, options, this.#owner);
|
|
199
185
|
}
|
|
200
186
|
|
|
@@ -247,7 +233,14 @@ class DurableLocalWorker {
|
|
|
247
233
|
}
|
|
248
234
|
if (execution.stop.cause === "user-cancelled") {
|
|
249
235
|
for (const operation of await this.#options.stores.operations.list({ build: execution.build })) {
|
|
250
|
-
if (operation.status === "pending")
|
|
236
|
+
if (operation.status === "pending") {
|
|
237
|
+
const cancelled = await this.#executor.cancelOperation?.(machine.view(), operation);
|
|
238
|
+
if (cancelled !== undefined) await this.#options.executionLogs?.record(operation.build, operation.command, {
|
|
239
|
+
endpoint: operation.endpoint, kind: "diagnostic", level: "info",
|
|
240
|
+
message: `Cancellation: ${cancelled.cancellation?.outcome ?? "unsupported"}${
|
|
241
|
+
cancelled.cancellation?.message === undefined ? "" : `; ${cancelled.cancellation.message}`}`,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
251
244
|
}
|
|
252
245
|
}
|
|
253
246
|
}
|
|
@@ -322,7 +315,13 @@ class DurableLocalWorker {
|
|
|
322
315
|
hydrated?.();
|
|
323
316
|
const actions = await Promise.allSettled(pending.map(async (operation) => {
|
|
324
317
|
if (operation === undefined) throw new Error(`Build ${execution.build} lost a waiting Operation`);
|
|
325
|
-
const result = await this.#executor.advanceOperation!(operation
|
|
318
|
+
const result = await this.#executor.advanceOperation!(operation, {
|
|
319
|
+
build: operation.build,
|
|
320
|
+
...(this.#options.executionLogs === undefined ? {} : {
|
|
321
|
+
recordExecution: (event: import("@hypit/runtime").ExecutionLogEvent) =>
|
|
322
|
+
this.#options.executionLogs!.record(operation.build, operation.command, event),
|
|
323
|
+
}),
|
|
324
|
+
});
|
|
326
325
|
if (result.remoteEnded || result.status !== "pending") {
|
|
327
326
|
await this.#options.stores.execution.releaseCapacity(execution.build, result.command);
|
|
328
327
|
}
|
|
@@ -380,65 +379,38 @@ class DurableLocalWorker {
|
|
|
380
379
|
return finished;
|
|
381
380
|
}
|
|
382
381
|
|
|
383
|
-
async runOnce(): Promise<WorkerTurnResult | undefined> {
|
|
384
|
-
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
387
|
-
|
|
388
|
-
return result;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
async run(options: RuntimeWorkerRunOptions): Promise<void> {
|
|
392
|
-
positive(options.idlePollMs, "Worker idlePollMs");
|
|
393
|
-
const active = new Set<Promise<void>>();
|
|
394
|
-
// The Runtime Host admits one Worker process. Any stored turn owner therefore belongs to the
|
|
395
|
-
// previous process; clearing it changes no external fact and performs no Result action.
|
|
396
|
-
await this.#options.assertEnvironment?.();
|
|
397
|
-
await this.#options.stores.execution.reclaimActionCapacity();
|
|
398
|
-
await this.#options.stores.execution.reclaimTurns(Date.now());
|
|
399
|
-
await this.#options.stores.execution.reclaimResultWrites();
|
|
400
|
-
for (const execution of await this.#options.stores.execution.list()) {
|
|
401
|
-
if (execution.decision !== undefined && execution.attention === undefined) {
|
|
402
|
-
await this.#options.stores.execution.setAttention(execution.build, {
|
|
403
|
-
step: "result",
|
|
404
|
-
error: "Result writing was interrupted; run `hypit result finish <build-id>`",
|
|
405
|
-
});
|
|
406
|
-
}
|
|
382
|
+
async runOnce(options: { readonly build?: string; readonly hydrated?: () => void } = {}): Promise<WorkerTurnResult | undefined> {
|
|
383
|
+
const store = this.#options.stores.execution;
|
|
384
|
+
const assigned = this.#options.executionBuild;
|
|
385
|
+
if (assigned !== undefined && options.build !== undefined && options.build !== assigned) {
|
|
386
|
+
throw new Error(`This execution context belongs to Build ${assigned}, not ${options.build}`);
|
|
407
387
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
// The next Build may execute concurrently, but its persisted snapshot is
|
|
423
|
-
// not hydrated until this one has left the single-threaded JSON boundary.
|
|
424
|
-
await Promise.race([hydration, task]);
|
|
425
|
-
// Awaiting synchronous stores only drains microtasks. Let sockets, timers and
|
|
426
|
-
// stop signals run before claiming another piece of ready work.
|
|
427
|
-
await setImmediate();
|
|
388
|
+
const selected = options.build ?? assigned;
|
|
389
|
+
for (const build of selected === undefined ? await store.listReady() : [selected]) {
|
|
390
|
+
const current = await store.read(build);
|
|
391
|
+
if (current === undefined || current.decision !== undefined) continue;
|
|
392
|
+
if (current.startedAt !== undefined && !this.#ownedBuilds.has(build)) {
|
|
393
|
+
if (selected === undefined) continue;
|
|
394
|
+
throw new Error(`Build ${build} already belongs to another execution context; create a new Build to continue`);
|
|
395
|
+
}
|
|
396
|
+
const execution = await store.claim(this.#owner, Date.now(), build);
|
|
397
|
+
if (execution === undefined) continue;
|
|
398
|
+
if (!this.#ownedBuilds.has(build)) {
|
|
399
|
+
if (execution.startedAt !== undefined) {
|
|
400
|
+
await store.releaseTurn(build, this.#owner, execution.wakeAt, execution.operationWait);
|
|
401
|
+
throw new Error(`Build ${build} was assigned to another execution context`);
|
|
428
402
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
try {
|
|
432
|
-
await Promise.race([...active, pause(options.idlePollMs, signal)]);
|
|
433
|
-
} catch (error) {
|
|
434
|
-
if (!Boolean(options.signal?.aborted)) throw error;
|
|
435
|
-
} finally { idle.abort(); }
|
|
436
|
-
|
|
403
|
+
await store.start(build);
|
|
404
|
+
this.#ownedBuilds.add(build);
|
|
437
405
|
}
|
|
438
|
-
|
|
439
|
-
|
|
406
|
+
const [result] = await this.#runClaimed([execution], options.hydrated);
|
|
407
|
+
if (result !== undefined && ("outcome" in result || result.decision !== undefined)) this.#ownedBuilds.delete(build);
|
|
408
|
+
return result;
|
|
440
409
|
}
|
|
410
|
+
return undefined;
|
|
441
411
|
}
|
|
412
|
+
|
|
413
|
+
|
|
442
414
|
}
|
|
443
415
|
|
|
444
416
|
export function createDurableLocalWorker(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# `@hypit/screen-overlay`
|
|
2
2
|
|
|
3
|
-
The Track Surface accepts `
|
|
4
|
-
|
|
3
|
+
The Track Surface accepts `timeline={program.timeline}`. The same Timeline supports authored
|
|
4
|
+
positions and, where prepared Takes supply evidence, Script Selections and Moments. Shared `at`
|
|
5
5
|
inputs accept a Moment or a time such as `2s`; `at` with `for` produces a Window where required.
|
|
6
6
|
|
|
7
7
|
Official provider-free self-contained screen-paint package.
|
|
8
8
|
|
|
9
|
-
Every item consumes its typed parameters, explicit Temporal source, CanvasSpace,
|
|
9
|
+
Every item consumes its typed parameters, explicit Temporal source, CanvasSpace, Timeline,
|
|
10
10
|
seed and local frame. Flash, ColorWash, Vignette, ScanLines, DirectionalMatte, WhipVeil,
|
|
11
11
|
GlitchVeil, Grain, LightLeak, Bokeh and TVStatic lower to ordinary absolute-stack `VisualTrack`
|
|
12
12
|
Presents. These effects generate their own pixels over the selected interval.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@hypit/narrative": "workspace:*",
|
|
14
14
|
"@hypit/protocol": "workspace:*",
|
|
15
15
|
"@hypit/program-space": "workspace:*",
|
|
16
|
-
"@hypit/
|
|
16
|
+
"@hypit/timeline": "workspace:*",
|
|
17
17
|
"@hypit/spatial": "workspace:*",
|
|
18
18
|
"@hypit/temporal": "workspace:*",
|
|
19
19
|
"@hypit/temporal-markup": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
2
|
import type { ComponentPackage } from "@hypit/component-kit";
|
|
2
3
|
import { canonicalize } from "@hypit/protocol";
|
|
3
4
|
import type { StoredValue } from "@hypit/protocol";
|
|
4
|
-
import type { ProgramSpace } from "@hypit/program-space";
|
|
5
5
|
import type { CanvasSpace } from "@hypit/spatial";
|
|
6
6
|
import { screenOverlayProducers, screenOverlayTypes } from "./manifest.js";
|
|
7
7
|
import { appendProjectedScreenOverlay, assertScreenOverlayProgram, createScreenOverlaySet, finalizeScreenOverlay, renderScreenOverlay } from "./program.js";
|
|
@@ -12,9 +12,9 @@ const output = (value: unknown) => ({ kind: "inline" as const, value: canonicali
|
|
|
12
12
|
export const screenOverlayComponent = {
|
|
13
13
|
producers: [
|
|
14
14
|
{ producer: screenOverlayProducers.createSet, handler: () => ({ outputs: { set: output(createScreenOverlaySet()) }, needs: {} }) },
|
|
15
|
-
{ producer: screenOverlayProducers.appendItem, handler: ({ inputs }) => ({ outputs: { set: output(appendProjectedScreenOverlay(inline<ScreenOverlaySet>(inputs.set?.value, "ScreenOverlaySet"), inline<ScreenOverlayHeader>(inputs.header?.value, "ScreenOverlayHeader"), inline<
|
|
15
|
+
{ producer: screenOverlayProducers.appendItem, handler: ({ inputs }) => ({ outputs: { set: output(appendProjectedScreenOverlay(inline<ScreenOverlaySet>(inputs.set?.value, "ScreenOverlaySet"), inline<ScreenOverlayHeader>(inputs.header?.value, "ScreenOverlayHeader"), inline<Timeline>(inputs.timeline?.value, "Timeline"), inline<ScreenOverlayItemSpec>(inputs.spec?.value, "ScreenOverlayItemSpec"), inline<TemporalWindow>(inputs.window?.value, "TemporalWindow"))) }, needs: {} }) },
|
|
16
16
|
{ producer: screenOverlayProducers.finalize, handler: ({ inputs }) => ({ outputs: { program: output(finalizeScreenOverlay(inline<ScreenOverlaySet>(inputs.set?.value, "ScreenOverlaySet"), inline<ScreenOverlayHeader>(inputs.header?.value, "ScreenOverlayHeader"))) }, needs: {} }) },
|
|
17
|
-
{ producer: screenOverlayProducers.render, handler: ({ inputs }) => ({ outputs: { track: output(renderScreenOverlay(inline<CanvasSpace>(inputs.canvas?.value, "CanvasSpace"), inline<
|
|
17
|
+
{ producer: screenOverlayProducers.render, handler: ({ inputs }) => ({ outputs: { track: output(renderScreenOverlay(inline<CanvasSpace>(inputs.canvas?.value, "CanvasSpace"), inline<Timeline>(inputs.timeline?.value, "Timeline"), inline<ScreenOverlayProgram>(inputs.program?.value, "ScreenOverlayProgram"))) }, needs: {} }) },
|
|
18
18
|
],
|
|
19
19
|
validators: [{ type: screenOverlayTypes.program, handler: ({ value }) => assertScreenOverlayProgram(inline<ScreenOverlayProgram>(value, "ScreenOverlayProgram")) }],
|
|
20
20
|
} satisfies ComponentPackage;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
2
|
+
|
|
2
3
|
import { compositionTypes } from "@hypit/composition";
|
|
3
4
|
import { sealGraphFragment } from "@hypit/elaborator";
|
|
4
5
|
import type { FragmentOperation } from "@hypit/elaborator";
|
|
@@ -22,16 +23,16 @@ export function createScreenOverlayFragment(items: readonly ScreenOverlayFragmen
|
|
|
22
23
|
const id = `overlay:set:append:${String(index + 1).padStart(4, "0")}`;
|
|
23
24
|
operations.push({ id, producer: screenOverlayProducers.appendItem,
|
|
24
25
|
inputs: { set: operation(current), header: input("header"), spec: input(item.specName),
|
|
25
|
-
|
|
26
|
+
timeline: input("timeline"), window: input(item.windowName) }, result: { kind: "output", name: "set" } });
|
|
26
27
|
current = id;
|
|
27
28
|
});
|
|
28
29
|
operations.push(
|
|
29
30
|
{ id: "overlay:program", producer: screenOverlayProducers.finalize, inputs: { set: operation(current), header: input("header") }, result: { kind: "output", name: "program" } },
|
|
30
|
-
{ id: "overlay:track", producer: screenOverlayProducers.render, inputs: { canvas: input("canvas"),
|
|
31
|
+
{ id: "overlay:track", producer: screenOverlayProducers.render, inputs: { canvas: input("canvas"), timeline: input("timeline"), program: operation("overlay:program") }, result: { kind: "output", name: "track" } },
|
|
31
32
|
);
|
|
32
33
|
return sealGraphFragment({ inputs: [
|
|
33
34
|
{ name: "canvas", type: spatialTypes.canvas }, { name: "header", type: screenOverlayTypes.header },
|
|
34
|
-
{ name: "
|
|
35
|
+
{ name: "timeline", type: timelineTypes.track }, ...[...types].map(([inputName, type]) => ({ name: inputName, type })),
|
|
35
36
|
], operations, exports: [
|
|
36
37
|
{ name: "program", type: screenOverlayTypes.program, root: operation("overlay:program") },
|
|
37
38
|
{ name: "track", type: compositionTypes.visualTrack, root: operation("overlay:track") },
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
1
2
|
import { temporalContextAttributeVocabulary } from "@hypit/temporal-markup";
|
|
2
3
|
import { readFile } from "node:fs/promises";
|
|
3
4
|
|
|
4
5
|
import { compositionDependency, compositionTypes } from "@hypit/composition";
|
|
5
6
|
import { narrativeDependency } from "@hypit/narrative";
|
|
6
|
-
|
|
7
|
+
|
|
7
8
|
import type { ModuleManifest, ProducerRef, TypeRef, ValueSchema } from "@hypit/protocol";
|
|
8
|
-
import {
|
|
9
|
+
import { timelineDependency } from "@hypit/timeline";
|
|
9
10
|
import { spatialDependency, spatialTypes } from "@hypit/spatial";
|
|
10
11
|
import { temporalDependency, temporalTypes } from "@hypit/temporal";
|
|
11
12
|
import { temporalWindowAttributeVocabulary } from "@hypit/temporal-markup";
|
|
@@ -65,7 +66,7 @@ export const screenOverlayHeaderSchema: ValueSchema = object({ id: { schema: str
|
|
|
65
66
|
export const screenOverlayItemSpecSchema: ValueSchema = itemSpec;
|
|
66
67
|
export const screenOverlaySetSchema: ValueSchema = object({ items: { schema: { kind: "array", items: item } } });
|
|
67
68
|
export const screenOverlayProgramSchema: ValueSchema = object({ id: { schema: string }, items: { schema: { kind: "array", minItems: 1, items: item } } });
|
|
68
|
-
const appendInputs = [{ name: "set", type: screenOverlayTypes.set }, { name: "header", type: screenOverlayTypes.header }, { name: "
|
|
69
|
+
const appendInputs = [{ name: "set", type: screenOverlayTypes.set }, { name: "header", type: screenOverlayTypes.header }, { name: "timeline", type: timelineTypes.track }, { name: "spec", type: screenOverlayTypes.itemSpec }, { name: "window", type: temporalTypes.window }] as const;
|
|
69
70
|
|
|
70
71
|
const itemAttributes = [
|
|
71
72
|
{ name: "id", kind: "identifier", required: false,
|
|
@@ -269,7 +270,7 @@ export const screenOverlayMarkupSurfaces = [
|
|
|
269
270
|
{ name: "track", type: compositionTypes.visualTrack,
|
|
270
271
|
summary: "The rendered overlay, an ordinary peer VisualTrack." },
|
|
271
272
|
],
|
|
272
|
-
example: `<screen:Track id="effects"
|
|
273
|
+
example: `<screen:Track id="effects" timeline={speech.timeline} canvas={vertical}>
|
|
273
274
|
<screen:Flash during={story.selection.overlay} z="80"
|
|
274
275
|
color="#ffffff" intensity="0.6" attack="2" hold="2" decay="6"/>
|
|
275
276
|
</screen:Track>`,
|
|
@@ -288,7 +289,7 @@ export const screenOverlayMarkupSurfaces = [
|
|
|
288
289
|
|
|
289
290
|
export const screenOverlayManifest: ModuleManifest = {
|
|
290
291
|
format: "hypit.module@1", name: screenOverlayModuleRef.name, version: screenOverlayModuleRef.version,
|
|
291
|
-
dependencies: [narrativeDependency,
|
|
292
|
+
dependencies: [narrativeDependency, timelineDependency, spatialDependency, temporalDependency, compositionDependency],
|
|
292
293
|
types: [
|
|
293
294
|
{ name: screenOverlayTypes.header.name },
|
|
294
295
|
{ name: screenOverlayTypes.itemSpec.name },
|
|
@@ -299,7 +300,7 @@ export const screenOverlayManifest: ModuleManifest = {
|
|
|
299
300
|
{ name: screenOverlayProducers.createSet.name, inputs: [], outputs: [{ name: "set", type: screenOverlayTypes.set }], needs: [] },
|
|
300
301
|
{ name: screenOverlayProducers.appendItem.name, inputs: [...appendInputs], outputs: [{ name: "set", type: screenOverlayTypes.set }], needs: [] },
|
|
301
302
|
{ name: screenOverlayProducers.finalize.name, inputs: [{ name: "set", type: screenOverlayTypes.set }, { name: "header", type: screenOverlayTypes.header }], outputs: [{ name: "program", type: screenOverlayTypes.program }], needs: [] },
|
|
302
|
-
{ name: screenOverlayProducers.render.name, inputs: [{ name: "canvas", type: spatialTypes.canvas }, { name: "
|
|
303
|
+
{ name: screenOverlayProducers.render.name, inputs: [{ name: "canvas", type: spatialTypes.canvas }, { name: "timeline", type: timelineTypes.track }, { name: "program", type: screenOverlayTypes.program }], outputs: [{ name: "track", type: compositionTypes.visualTrack }], needs: [] },
|
|
303
304
|
],
|
|
304
305
|
};
|
|
305
306
|
export const screenOverlayDependency = { module: screenOverlayModuleRef } as const;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
2
|
import { assertVisualTrackIdentity, sealVisualTrack } from "@hypit/composition";
|
|
2
3
|
import type { VisualAnimation, VisualElement, VisualStyleDeclaration, VisualTrack } from "@hypit/composition";
|
|
3
4
|
import { assertProgramSpaceIdentity } from "@hypit/program-space";
|
|
4
|
-
import type { ProgramSpace } from "@hypit/program-space";
|
|
5
5
|
import { canonicalize } from "@hypit/protocol";
|
|
6
6
|
import { assertCanvasSpace } from "@hypit/spatial";
|
|
7
7
|
import type { CanvasSpace } from "@hypit/spatial";
|
|
@@ -107,11 +107,11 @@ export function assertScreenOverlaySet(value: ScreenOverlaySet): void {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
function realized(
|
|
110
|
-
set: ScreenOverlaySet, header: ScreenOverlayHeader,
|
|
110
|
+
set: ScreenOverlaySet, header: ScreenOverlayHeader, timeline: Timeline, spec: ScreenOverlayItemSpec,
|
|
111
111
|
window: ProjectedWindow,
|
|
112
112
|
): ScreenOverlaySet {
|
|
113
113
|
assertScreenOverlaySet(set); assertScreenOverlayHeader(header); assertScreenOverlayItemSpec(spec);
|
|
114
|
-
assertTemporalWindowFor(window, { subjectId: spec.id, space });
|
|
114
|
+
assertTemporalWindowFor(window, { subjectId: spec.id, space: timeline });
|
|
115
115
|
const addition = {
|
|
116
116
|
id: window.id,
|
|
117
117
|
subjectId: spec.id,
|
|
@@ -128,11 +128,11 @@ function realized(
|
|
|
128
128
|
export function appendProjectedScreenOverlay(
|
|
129
129
|
set: ScreenOverlaySet,
|
|
130
130
|
header: ScreenOverlayHeader,
|
|
131
|
-
|
|
131
|
+
timeline: Timeline,
|
|
132
132
|
spec: ScreenOverlayItemSpec,
|
|
133
133
|
window: ProjectedWindow,
|
|
134
134
|
): ScreenOverlaySet {
|
|
135
|
-
return realized(set, header,
|
|
135
|
+
return realized(set, header, timeline, spec, window);
|
|
136
136
|
}
|
|
137
137
|
export function sealScreenOverlayProgram(value: ScreenOverlayProgram): ScreenOverlayProgram {
|
|
138
138
|
const normalized = { id: value.id,
|
|
@@ -307,15 +307,15 @@ function overlayElements(content: ScreenOverlayComponent, canvas: CanvasSpace, d
|
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
export function renderScreenOverlay(canvas: CanvasSpace,
|
|
311
|
-
assertCanvasSpace(canvas); assertProgramSpaceIdentity(
|
|
310
|
+
export function renderScreenOverlay(canvas: CanvasSpace, timeline: Timeline, program: ScreenOverlayProgram): VisualTrack {
|
|
311
|
+
assertCanvasSpace(canvas); assertProgramSpaceIdentity(timeline); assertScreenOverlayProgram(program);
|
|
312
312
|
const track = sealVisualTrack({
|
|
313
|
-
programSpaceId:
|
|
313
|
+
programSpaceId: timeline.id, visualIr: "hypit.visual-ir@1", id: program.id,
|
|
314
314
|
presents: program.items.map((item) => ({
|
|
315
315
|
id: item.id, subjectId: item.subjectId, span: { ...item.span }, stacking: { ...item.stacking },
|
|
316
316
|
elements: overlayElements(item.content, canvas, item.span.endFrameExclusive - item.span.startFrame),
|
|
317
317
|
})),
|
|
318
318
|
});
|
|
319
|
-
assertVisualTrackIdentity(track,
|
|
319
|
+
assertVisualTrackIdentity(track, timeline);
|
|
320
320
|
return track;
|
|
321
321
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveTemporalContext } from "@hypit/temporal-markup";
|
|
2
2
|
import { spatialTypes } from "@hypit/spatial";
|
|
3
3
|
import type { StructuredElement, StructuredSurfaceHandler, SurfaceComponentDraft, SurfaceRecordDraft, SurfaceResolvedReference, MarkupAttributeValue } from "@hypit/markup";
|
|
4
4
|
import { createTemporalWindowProjection, temporalWindowAttributeNames } from "@hypit/temporal-markup";
|
|
@@ -57,16 +57,15 @@ function content(element: StructuredElement): { readonly value: ScreenOverlayCom
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
export const decodeScreenOverlaySurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
60
|
-
allowed(element, ["id", "canvas", "
|
|
60
|
+
allowed(element, ["id", "canvas", "timeline"]); const id = text(element, "id");
|
|
61
61
|
const canvas = ref(element.attributes.canvas, `${element.name}.canvas`, spatialTypes.canvas, resolveReference);
|
|
62
62
|
const context = resolveTemporalContext({ element, resolveReference });
|
|
63
|
-
const time = createTemporalSpace({ id: id, element, ...context });
|
|
64
63
|
const headerId = `${id}.header`; const records: SurfaceRecordDraft[] = [{ id: headerId, type: screenOverlayTypes.header,
|
|
65
64
|
value: { kind: "inline", value: sealScreenOverlayHeader({ id }) }, range: element.range }];
|
|
66
|
-
const temporalComponents: SurfaceComponentDraft[] = [
|
|
67
|
-
const temporalFragments: ReturnType<typeof createTemporalWindowProjection>["fragments"][number][] = [
|
|
65
|
+
const temporalComponents: SurfaceComponentDraft[] = [];
|
|
66
|
+
const temporalFragments: ReturnType<typeof createTemporalWindowProjection>["fragments"][number][] = [];
|
|
68
67
|
const fragmentItems: Parameters<typeof createScreenOverlayFragment>[0][number][] = [];
|
|
69
|
-
const inputs: Record<string, typeof canvas.ref> = { canvas: canvas.ref, header: { kind: "record", id: headerId },
|
|
68
|
+
const inputs: Record<string, typeof canvas.ref> = { canvas: canvas.ref, header: { kind: "record", id: headerId }, timeline: context.timeline.ref };
|
|
70
69
|
let index = 0;
|
|
71
70
|
for (const child of element.children) {
|
|
72
71
|
if (child.kind === "text") { if (child.value.trim()) throw new Error(`${element.name} accepts only component children.`); continue; }
|
|
@@ -76,7 +75,7 @@ export const decodeScreenOverlaySurface: StructuredSurfaceHandler = ({ element,
|
|
|
76
75
|
const itemSpec = sealScreenOverlayItemSpec({
|
|
77
76
|
id: optionalText(child, "id") ?? `${id}.${decoded.value.kind}.${suffix}`, content: decoded.value,
|
|
78
77
|
stackingOrder: integer(child, "z") });
|
|
79
|
-
const temporal = createTemporalWindowProjection({ id: itemSpec.id, element: child, ...context,
|
|
78
|
+
const temporal = createTemporalWindowProjection({ id: itemSpec.id, element: child, ...context, resolveReference });
|
|
80
79
|
records.push(...temporal.records); temporalComponents.push(...temporal.components); temporalFragments.push(...temporal.fragments);
|
|
81
80
|
const specId = `${id}.item.${suffix}.spec`; const specName = `item-${suffix}-spec`;
|
|
82
81
|
records.push({ id: specId, type: screenOverlayTypes.itemSpec, value: { kind: "inline", value: itemSpec }, range: child.range });
|
|
@@ -53,8 +53,8 @@ The Surface exports one full Narrative plus narrow, immutable views:
|
|
|
53
53
|
- `script.moment.<id>` is a reusable explicit Moment.
|
|
54
54
|
|
|
55
55
|
`@hypit/caption` projects `script.selection.<id>` or a Role onto complete Caption Alignment Units;
|
|
56
|
-
it then joins those units to a
|
|
57
|
-
Estimate and TTS consume speech `Text`, and
|
|
56
|
+
it then joins those units to a Timeline for frame timing. Seedance consumes dialogue `Text`,
|
|
57
|
+
Estimate and TTS consume speech `Text`, and semantic preparation consumes the Segment excerpt. None imports
|
|
58
58
|
Script's parser AST. Another authoring package may produce the same ordinary Text, Narrative and
|
|
59
59
|
CaptionDocument contracts.
|
|
60
60
|
|
|
@@ -135,3 +135,38 @@ These are alternative spellings, not two occurrences to put in the same Script.
|
|
|
135
135
|
pause. In the second, the next “my” starts both touching boundaries, so the coffee Selection owns it.
|
|
136
136
|
Plain `@/coffee @smoothie` leaves the gap between previous word end and next word start outside both.
|
|
137
137
|
The media consumer still decides playback and visual coverage inside those projected Windows.
|
|
138
|
+
|
|
139
|
+
## Marker writeback
|
|
140
|
+
|
|
141
|
+
`adjustScriptSelection` and `adjustScriptMoment` accept explicit anchor identities. A Selection's
|
|
142
|
+
two endpoints are written together. Script owns their legal source sites: token punctuation and
|
|
143
|
+
postfix attributes stay attached, Segment boundaries stay structural, and coincident markers are
|
|
144
|
+
ordered together. Writeback reads the current source, removes the markers, normalizes ordinary
|
|
145
|
+
same-line prose, and places the markers at their requested anchors. Repeated spaces and tabs in
|
|
146
|
+
prose become necessary separators; punctuation uses the same attachment rules as Script's text
|
|
147
|
+
projection. Newlines, blank lines and each line's leading spaces/tabs remain intact. A marker at
|
|
148
|
+
the start of a line is placed after its indentation; whitespace after that marker is prose, not
|
|
149
|
+
additional indentation. Marker-only lines remain blank when the marker leaves. Comments, tags,
|
|
150
|
+
Dual Text and display attributes retain their own syntax and are not passed through prose cleanup.
|
|
151
|
+
|
|
152
|
+
Normalization keeps lexical units unchanged and does not restore earlier whitespace spellings.
|
|
153
|
+
It has no persistent formatting state: the same text structure and anchor relationships produce
|
|
154
|
+
the same spelling on repeated edits. Empty self-closing Segments expand when needed to make their
|
|
155
|
+
distinct boundaries writable.
|
|
156
|
+
|
|
157
|
+
Writeback reparses the result to retain the intended identities and unchanged narrative/caption
|
|
158
|
+
content. These checks concern authored order, not frame order. A consumer's temporal projection
|
|
159
|
+
determines whether the resulting Instant or Window is usable.
|
|
160
|
+
|
|
161
|
+
## Complete authored content and narrow exports
|
|
162
|
+
|
|
163
|
+
The root `story` Record contains the complete Narrative: speech structure, semantic references and
|
|
164
|
+
its CaptionDocument. `story.caption`, `story.selection.<id>`, Segment excerpts and dialogue/speech
|
|
165
|
+
Text outputs remain explicit narrow exports derived from that content. Caption rendering can read
|
|
166
|
+
the document and Timeline. Timed Uses change its presentation; their semantic references are
|
|
167
|
+
projected through the same Timeline as other components. Word attributes remain in the document
|
|
168
|
+
for families that give those words structural visual roles.
|
|
169
|
+
|
|
170
|
+
For content lookup, use the Narrative package's `narrativeTokensForSelection` or
|
|
171
|
+
`narrativeSelectionTokenRange`. These query authored order; Timeline separately locates the same
|
|
172
|
+
anchors in the assembled video. No timestamps or display Styles enter the Script value.
|