@hypit/hypit 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (462) hide show
  1. package/README.md +4 -2
  2. package/dist/public/caption.d.ts +206 -183
  3. package/dist/public/composition.d.ts +25 -3
  4. package/dist/public/endpoint-kit.d.ts +24 -2
  5. package/dist/public/generation.d.ts +5 -1
  6. package/dist/public/hyperframes.d.ts +19 -1
  7. package/dist/public/narrative.d.ts +17 -3
  8. package/dist/public/performance.d.ts +1590 -0
  9. package/dist/public/program-space.d.ts +179 -32
  10. package/dist/public/runtime-kit.d.ts +21 -8
  11. package/dist/public/sound.d.ts +822 -0
  12. package/dist/public/speech.d.ts +41 -0
  13. package/dist/public/studio-adapter.d.ts +77 -15
  14. package/dist/public/temporal-markup.d.ts +9 -44
  15. package/dist/public/temporal.d.ts +37 -28
  16. package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
  17. package/examples/README.md +18 -10
  18. package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
  19. package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
  20. package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
  21. package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
  22. package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
  23. package/examples/provider-package/README.md +78 -0
  24. package/examples/provider-package/hypit.runtime.json +12 -0
  25. package/examples/provider-package/packages/provider-images/package.json +11 -0
  26. package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
  27. package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
  28. package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
  29. package/examples/semantic-composition/README.md +8 -1
  30. package/examples/semantic-composition/chat.svml +6 -5
  31. package/examples/semantic-composition/hypit.runtime.json +1 -1
  32. package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
  33. package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
  34. package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
  35. package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
  36. package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
  37. package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
  38. package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
  39. package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
  40. package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
  41. package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
  42. package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
  43. package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
  44. package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
  45. package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
  46. package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
  47. package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
  48. package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
  49. package/package.json +35 -15
  50. package/packages/audio-track/README.md +20 -13
  51. package/packages/audio-track/package.json +1 -1
  52. package/packages/audio-track/src/component.ts +4 -4
  53. package/packages/audio-track/src/fragment.ts +6 -5
  54. package/packages/audio-track/src/index.ts +1 -1
  55. package/packages/audio-track/src/manifest.ts +17 -16
  56. package/packages/audio-track/src/program.ts +21 -25
  57. package/packages/audio-track/src/surface.ts +19 -18
  58. package/packages/audio-track-studio/README.md +23 -0
  59. package/packages/audio-track-studio/src/index.ts +28 -17
  60. package/packages/author-kit/README.md +1 -1
  61. package/packages/background-removal/README.md +4 -7
  62. package/packages/browser-capture/package.json +1 -1
  63. package/packages/build-result/README.md +11 -0
  64. package/packages/build-result/src/decode.ts +2 -0
  65. package/packages/build-result/src/execution-log.ts +17 -0
  66. package/packages/build-result/src/index.ts +1 -0
  67. package/packages/build-result/src/store.ts +14 -1
  68. package/packages/build-result/src/types.ts +3 -0
  69. package/packages/build-result-s3/src/repository.ts +4 -0
  70. package/packages/caption/README.md +61 -73
  71. package/packages/caption/package.json +3 -2
  72. package/packages/caption/src/activation.ts +2 -2
  73. package/packages/caption/src/component.ts +20 -5
  74. package/packages/caption/src/display.ts +3 -18
  75. package/packages/caption/src/fragment.ts +3 -7
  76. package/packages/caption/src/index.ts +6 -5
  77. package/packages/caption/src/manifest.ts +29 -46
  78. package/packages/caption/src/style.ts +24 -135
  79. package/packages/caption/src/surface.ts +12 -92
  80. package/packages/caption/src/temporalize.ts +18 -53
  81. package/packages/caption/src/types.ts +8 -35
  82. package/packages/caption/src/visibility.ts +23 -0
  83. package/packages/caption-fine/README.md +21 -9
  84. package/packages/caption-fine/package.json +4 -2
  85. package/packages/caption-fine/src/component.ts +3 -3
  86. package/packages/caption-fine/src/fragment.ts +7 -19
  87. package/packages/caption-fine/src/index.ts +2 -0
  88. package/packages/caption-fine/src/manifest.ts +26 -17
  89. package/packages/caption-fine/src/recipe.ts +7 -0
  90. package/packages/caption-fine/src/render.ts +14 -13
  91. package/packages/caption-fine/src/schedule.ts +39 -35
  92. package/packages/caption-fine/src/style.ts +10 -9
  93. package/packages/caption-fine/src/surface.ts +62 -35
  94. package/packages/caption-fine/src/types.ts +2 -0
  95. package/packages/caption-fine-studio/README.md +24 -2
  96. package/packages/caption-fine-studio/package.json +3 -1
  97. package/packages/caption-fine-studio/src/activation.ts +3 -3
  98. package/packages/caption-fine-studio/src/index.ts +54 -42
  99. package/packages/cli/README.md +57 -4
  100. package/packages/cli/package.json +1 -0
  101. package/packages/cli/src/arguments.ts +25 -6
  102. package/packages/cli/src/build-planning.ts +3 -2
  103. package/packages/cli/src/command.ts +6 -0
  104. package/packages/cli/src/commands/environment.ts +28 -18
  105. package/packages/cli/src/commands/execution.ts +81 -26
  106. package/packages/cli/src/commands/results.ts +7 -11
  107. package/packages/cli/src/index.ts +2 -2
  108. package/packages/cli/src/machine-view.ts +3 -2
  109. package/packages/cli/src/main.ts +34 -42
  110. package/packages/cli/src/observation.ts +7 -1
  111. package/packages/cli/src/output.ts +65 -23
  112. package/packages/cli/src/view.ts +66 -19
  113. package/packages/comment-sticker/README.md +3 -3
  114. package/packages/comment-sticker/package.json +1 -1
  115. package/packages/comment-sticker/src/component.ts +4 -4
  116. package/packages/comment-sticker/src/fragment.ts +5 -4
  117. package/packages/comment-sticker/src/manifest.ts +7 -6
  118. package/packages/comment-sticker/src/program.ts +9 -9
  119. package/packages/comment-sticker/src/surface.ts +6 -7
  120. package/packages/composition/README.md +21 -0
  121. package/packages/composition/src/audio-presentation.ts +44 -0
  122. package/packages/composition/src/index.ts +3 -0
  123. package/packages/composition/src/schema.ts +8 -3
  124. package/packages/composition/src/track.ts +15 -1
  125. package/packages/credential-store-env/README.md +1 -1
  126. package/packages/deck-track/README.md +3 -3
  127. package/packages/deck-track/package.json +1 -1
  128. package/packages/deck-track/src/component.ts +5 -5
  129. package/packages/deck-track/src/fragment.ts +6 -5
  130. package/packages/deck-track/src/lower.ts +12 -12
  131. package/packages/deck-track/src/manifest.ts +8 -7
  132. package/packages/deck-track/src/program.ts +13 -16
  133. package/packages/deck-track/src/surface.ts +9 -10
  134. package/packages/driver-node/src/driver.ts +41 -3
  135. package/packages/elevenlabs-speech/README.md +27 -0
  136. package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
  137. package/packages/elevenlabs-speech/src/activation.ts +26 -0
  138. package/packages/elevenlabs-speech/src/fragment.ts +11 -0
  139. package/packages/elevenlabs-speech/src/index.ts +111 -0
  140. package/packages/elevenlabs-speech/src/surface.ts +167 -0
  141. package/packages/endpoint-kit/README.md +24 -0
  142. package/packages/endpoint-kit/src/index.ts +7 -1
  143. package/packages/film/README.md +12 -7
  144. package/packages/film/package.json +1 -1
  145. package/packages/film/src/component.ts +4 -4
  146. package/packages/film/src/fragment.ts +6 -5
  147. package/packages/film/src/manifest.ts +11 -10
  148. package/packages/film/src/program.ts +5 -5
  149. package/packages/film/src/recipe.ts +2 -1
  150. package/packages/film/src/surface.ts +10 -7
  151. package/packages/film-studio/package.json +1 -1
  152. package/packages/film-studio/src/index.ts +2 -2
  153. package/packages/fishaudio-speech/README.md +33 -0
  154. package/packages/fishaudio-speech/package.json +21 -0
  155. package/packages/fishaudio-speech/src/activation.ts +32 -0
  156. package/packages/fishaudio-speech/src/fragment.ts +11 -0
  157. package/packages/fishaudio-speech/src/index.ts +156 -0
  158. package/packages/fishaudio-speech/src/surface.ts +192 -0
  159. package/packages/generation/README.md +11 -1
  160. package/packages/generation/src/mapping.ts +28 -30
  161. package/packages/gpt-image/README.md +1 -2
  162. package/packages/grok-imagine/README.md +1 -2
  163. package/packages/hyperframes/README.md +7 -3
  164. package/packages/hyperframes/src/browser-program.ts +11 -2
  165. package/packages/hyperframes/src/document.ts +15 -2
  166. package/packages/interview-emoji-reveal/README.md +4 -4
  167. package/packages/interview-emoji-reveal/package.json +1 -1
  168. package/packages/interview-emoji-reveal/src/component.ts +4 -4
  169. package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
  170. package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
  171. package/packages/interview-emoji-reveal/src/program.ts +14 -14
  172. package/packages/interview-emoji-reveal/src/surface.ts +8 -9
  173. package/packages/media-execution/README.md +7 -3
  174. package/packages/media-execution/src/audio-presentation.ts +23 -0
  175. package/packages/media-execution/src/execute.ts +2 -0
  176. package/packages/media-pipeline/README.md +7 -3
  177. package/packages/media-pipeline/src/audio-plan.ts +4 -1
  178. package/packages/media-pipeline/src/component.ts +16 -2
  179. package/packages/media-pipeline/src/manifest.ts +3 -1
  180. package/packages/media-pipeline/src/types.ts +2 -1
  181. package/packages/media-track/README.md +14 -47
  182. package/packages/media-track/package.json +1 -1
  183. package/packages/media-track/preview/preview.svml +5 -5
  184. package/packages/media-track/src/author.ts +12 -6
  185. package/packages/media-track/src/component.ts +10 -16
  186. package/packages/media-track/src/fragment.ts +8 -7
  187. package/packages/media-track/src/index.ts +3 -1
  188. package/packages/media-track/src/lower.ts +7 -7
  189. package/packages/media-track/src/manifest.ts +16 -38
  190. package/packages/media-track/src/program.ts +62 -67
  191. package/packages/media-track/src/sampling.ts +6 -6
  192. package/packages/media-track/src/sequence.ts +8 -8
  193. package/packages/media-track/src/surface.ts +25 -43
  194. package/packages/media-track-studio/README.md +9 -0
  195. package/packages/media-track-studio/src/index.ts +16 -11
  196. package/packages/mimo-speech/README.md +1 -1
  197. package/packages/minimax-h3/README.md +1 -1
  198. package/packages/nano-banana/README.md +1 -1
  199. package/packages/narrative/README.md +23 -1
  200. package/packages/narrative/src/identity.ts +11 -0
  201. package/packages/narrative/src/index.ts +3 -0
  202. package/packages/narrative/src/schema.ts +28 -27
  203. package/packages/narrative/src/selection.ts +52 -0
  204. package/packages/narrative/src/types.ts +2 -0
  205. package/packages/package-loader-node/README.md +30 -0
  206. package/packages/package-loader-node/package.json +5 -2
  207. package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
  208. package/packages/package-loader-node/src/index.ts +1 -0
  209. package/packages/package-loader-node/src/loader.ts +12 -15
  210. package/packages/package-loader-node/src/location.ts +27 -1
  211. package/packages/package-loader-node/src/module-scope.ts +183 -0
  212. package/packages/package-loader-node/src/types.ts +4 -0
  213. package/packages/performance/README.md +83 -0
  214. package/packages/performance/package.json +30 -0
  215. package/packages/performance/src/activation.ts +11 -0
  216. package/packages/performance/src/component.ts +46 -0
  217. package/packages/performance/src/index.ts +6 -0
  218. package/packages/performance/src/manifest.ts +53 -0
  219. package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
  220. package/packages/performance/src/program.ts +51 -0
  221. package/packages/performance/src/style.ts +35 -0
  222. package/packages/performance/src/surface.ts +99 -0
  223. package/packages/performance-studio/README.md +25 -0
  224. package/packages/performance-studio/package.json +21 -0
  225. package/packages/performance-studio/src/activation.ts +6 -0
  226. package/packages/performance-studio/src/index.ts +84 -0
  227. package/packages/program-space/README.md +9 -18
  228. package/packages/program-space/src/activation.ts +1 -5
  229. package/packages/program-space/src/index.ts +2 -11
  230. package/packages/program-space/src/surface.ts +1 -20
  231. package/packages/project-context-node/README.md +20 -0
  232. package/packages/project-context-node/package.json +10 -0
  233. package/packages/project-context-node/src/index.ts +3 -0
  234. package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
  235. package/packages/provider-hyperframes-local/README.md +43 -15
  236. package/packages/provider-hyperframes-local/src/activation.ts +4 -3
  237. package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
  238. package/packages/provider-hyperframes-local/src/capture.ts +96 -26
  239. package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
  240. package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
  241. package/packages/provider-hyperframes-local/src/options.ts +2 -0
  242. package/packages/provider-hyperframes-local/src/program.ts +6 -3
  243. package/packages/provider-hyperframes-local/src/progress.ts +53 -0
  244. package/packages/provider-hyperframes-local/src/provider.ts +18 -5
  245. package/packages/provider-hyperframes-local/src/render.ts +48 -7
  246. package/packages/provider-hypihub/README.md +48 -17
  247. package/packages/provider-hypihub/package.json +2 -0
  248. package/packages/provider-hypihub/src/mapping.ts +31 -7
  249. package/packages/provider-hypihub/src/oauth.ts +6 -0
  250. package/packages/provider-hypihub/src/provider.ts +25 -13
  251. package/packages/provider-hypihub/src/routes.ts +1 -2
  252. package/packages/provider-hypihub/src/upload.ts +2 -0
  253. package/packages/provider-media-local/README.md +3 -4
  254. package/packages/provider-whisperx-local/src/program.ts +1 -0
  255. package/packages/provider-whisperx-local/src/provider.ts +3 -0
  256. package/packages/ranking/README.md +8 -6
  257. package/packages/ranking/package.json +1 -1
  258. package/packages/ranking/src/component.ts +6 -6
  259. package/packages/ranking/src/fragment.ts +11 -7
  260. package/packages/ranking/src/manifest.ts +21 -14
  261. package/packages/ranking/src/render.ts +22 -26
  262. package/packages/ranking/src/schedule.ts +16 -19
  263. package/packages/ranking/src/surface.ts +12 -13
  264. package/packages/ranking-studio/README.md +18 -0
  265. package/packages/ranking-studio/src/index.ts +61 -9
  266. package/packages/render-hyperframes/README.md +7 -7
  267. package/packages/render-hyperframes/package.json +1 -1
  268. package/packages/render-hyperframes/src/component.ts +11 -1
  269. package/packages/render-hyperframes/src/fragment.ts +7 -4
  270. package/packages/render-hyperframes/src/manifest.ts +4 -4
  271. package/packages/render-hyperframes/src/surface.ts +6 -6
  272. package/packages/runtime/README.md +8 -1
  273. package/packages/runtime/src/execution.ts +15 -4
  274. package/packages/runtime/src/index.ts +2 -1
  275. package/packages/runtime/src/log.ts +51 -0
  276. package/packages/runtime/src/types.ts +5 -8
  277. package/packages/runtime-host-node/README.md +30 -0
  278. package/packages/runtime-host-node/package.json +1 -0
  279. package/packages/runtime-host-node/src/index.ts +24 -9
  280. package/packages/runtime-host-node/src/packages.ts +47 -50
  281. package/packages/runtime-kit/README.md +5 -0
  282. package/packages/runtime-kit/src/index.ts +3 -1
  283. package/packages/runtime-local/README.md +109 -4
  284. package/packages/runtime-local/src/config.ts +202 -56
  285. package/packages/runtime-local/src/control.ts +9 -1
  286. package/packages/runtime-local/src/executor.ts +66 -0
  287. package/packages/runtime-local/src/host.ts +37 -17
  288. package/packages/runtime-local/src/log.ts +48 -0
  289. package/packages/runtime-local/src/programs.ts +2 -1
  290. package/packages/runtime-local/src/result-writer.ts +2 -0
  291. package/packages/runtime-local/src/runtime.ts +8 -6
  292. package/packages/runtime-local/src/supervisor.ts +142 -0
  293. package/packages/runtime-local/src/types.ts +9 -2
  294. package/packages/runtime-local/src/worker-process.ts +7 -24
  295. package/packages/runtime-local/src/worker.ts +55 -83
  296. package/packages/screen-overlay/README.md +3 -3
  297. package/packages/screen-overlay/package.json +1 -1
  298. package/packages/screen-overlay/src/component.ts +3 -3
  299. package/packages/screen-overlay/src/fragment.ts +5 -4
  300. package/packages/screen-overlay/src/manifest.ts +7 -6
  301. package/packages/screen-overlay/src/program.ts +9 -9
  302. package/packages/screen-overlay/src/surface.ts +6 -7
  303. package/packages/script/README.md +30 -5
  304. package/packages/script/src/manifest.ts +4 -3
  305. package/packages/script/src/narrative.ts +1 -0
  306. package/packages/script/src/parser.ts +45 -6
  307. package/packages/script/src/surface.ts +4 -3
  308. package/packages/script/src/types.ts +1 -1
  309. package/packages/script-studio/package.json +9 -3
  310. package/packages/script-studio/src/index.ts +2 -0
  311. package/packages/script-studio/src/projection.ts +105 -0
  312. package/packages/seedance/README.md +30 -1
  313. package/packages/seedance/src/index.ts +18 -7
  314. package/packages/seedance/src/surface.ts +17 -4
  315. package/packages/seedance-kits/README.md +7 -1
  316. package/packages/seedream/README.md +1 -1
  317. package/packages/sound/README.md +81 -0
  318. package/packages/sound/package.json +25 -0
  319. package/packages/sound/src/activation.ts +11 -0
  320. package/packages/sound/src/component.ts +28 -0
  321. package/packages/sound/src/index.ts +5 -0
  322. package/packages/sound/src/manifest.ts +47 -0
  323. package/packages/sound/src/program.ts +84 -0
  324. package/packages/sound/src/style.ts +34 -0
  325. package/packages/sound/src/surface.ts +90 -0
  326. package/packages/sound-studio/README.md +22 -0
  327. package/packages/sound-studio/package.json +20 -0
  328. package/packages/sound-studio/src/activation.ts +6 -0
  329. package/packages/sound-studio/src/index.ts +74 -0
  330. package/packages/speech/README.md +2 -2
  331. package/packages/speech-alignment/src/local.ts +8 -0
  332. package/packages/speech-alignment/src/locate.ts +1 -1
  333. package/packages/store-sqlite/README.md +7 -0
  334. package/packages/store-sqlite/src/store.ts +84 -83
  335. package/packages/studio/INSPECTOR.md +15 -2
  336. package/packages/studio/LOCALIZATION.md +98 -0
  337. package/packages/studio/README.md +101 -14
  338. package/packages/studio/locales/en.json +197 -0
  339. package/packages/studio/locales/zh-CN.json +191 -0
  340. package/packages/studio/package.json +8 -7
  341. package/packages/studio/src/companion-assembly.ts +1 -0
  342. package/packages/studio/src/domain.ts +1 -1
  343. package/packages/studio/src/fallback-companions.ts +3 -3
  344. package/packages/studio/src/feedback-server.ts +51 -0
  345. package/packages/studio/src/feedback-store.ts +66 -0
  346. package/packages/studio/src/feedback.ts +60 -0
  347. package/packages/studio/src/localization-node.ts +46 -0
  348. package/packages/studio/src/localization.ts +85 -0
  349. package/packages/studio/src/parameter-values.ts +43 -1
  350. package/packages/studio/src/parameters.ts +114 -24
  351. package/packages/studio/src/preview/render.ts +5 -1
  352. package/packages/studio/src/preview/runtime-shim.ts +49 -3
  353. package/packages/studio/src/programme.ts +14 -30
  354. package/packages/studio/src/server.ts +10 -6
  355. package/packages/studio/src/shared.ts +4 -2
  356. package/packages/studio/src/snapshot.ts +21 -132
  357. package/packages/studio/src/studio-preflight.ts +3 -3
  358. package/packages/studio/src/studio-registry.ts +50 -6
  359. package/packages/studio/src/style.css +223 -50
  360. package/packages/studio/src/ui/artifact-name.ts +8 -6
  361. package/packages/studio/src/ui/artifact-preview.ts +5 -4
  362. package/packages/studio/src/ui/code.ts +17 -16
  363. package/packages/studio/src/ui/comments.ts +234 -0
  364. package/packages/studio/src/ui/dropdown.ts +68 -0
  365. package/packages/studio/src/ui/i18n.ts +109 -0
  366. package/packages/studio/src/ui/icons.ts +6 -0
  367. package/packages/studio/src/ui/library.ts +76 -65
  368. package/packages/studio/src/ui/main.ts +223 -211
  369. package/packages/studio/src/ui/overlay.ts +12 -8
  370. package/packages/studio/src/ui/scrub-preview.ts +110 -0
  371. package/packages/studio/src/ui/stage.ts +93 -29
  372. package/packages/studio/src/ui/timeline.ts +190 -118
  373. package/packages/studio/start.ts +41 -22
  374. package/packages/studio-adapter/README.md +130 -11
  375. package/packages/studio-adapter/src/index.ts +100 -13
  376. package/packages/temporal/README.md +6 -6
  377. package/packages/temporal/package.json +1 -1
  378. package/packages/temporal/src/component.ts +5 -6
  379. package/packages/temporal/src/index.ts +8 -6
  380. package/packages/temporal/src/location.ts +11 -11
  381. package/packages/temporal/src/projection.ts +19 -19
  382. package/packages/temporal/src/rational.ts +4 -4
  383. package/packages/temporal-markup/EDITING.md +2 -2
  384. package/packages/temporal-markup/README.md +27 -11
  385. package/packages/temporal-markup/package.json +1 -1
  386. package/packages/temporal-markup/src/index.ts +20 -25
  387. package/packages/temporal-markup/src/space.ts +10 -41
  388. package/packages/timeline/README.md +31 -0
  389. package/packages/{semantic-track → timeline}/package.json +1 -1
  390. package/packages/timeline/src/activation.ts +8 -0
  391. package/packages/timeline/src/component.ts +24 -0
  392. package/packages/timeline/src/identity.ts +60 -0
  393. package/packages/timeline/src/index.ts +6 -0
  394. package/packages/{semantic-track → timeline}/src/location.ts +20 -20
  395. package/packages/timeline/src/manifest.ts +39 -0
  396. package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
  397. package/packages/timeline/src/types.ts +24 -0
  398. package/packages/timeline-author/README.md +68 -0
  399. package/packages/{speech-track → timeline-author}/package.json +6 -4
  400. package/packages/timeline-author/src/activation.ts +22 -0
  401. package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
  402. package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
  403. package/packages/timeline-author/src/index.ts +7 -0
  404. package/packages/timeline-author/src/manifest.ts +78 -0
  405. package/packages/timeline-author/src/program.ts +107 -0
  406. package/packages/timeline-author/src/surface.ts +46 -0
  407. package/packages/timeline-author/src/types.ts +6 -0
  408. package/packages/typography-track/README.md +4 -4
  409. package/packages/typography-track/package.json +1 -1
  410. package/packages/typography-track/src/component.ts +4 -4
  411. package/packages/typography-track/src/fragment.ts +4 -3
  412. package/packages/typography-track/src/manifest.ts +11 -9
  413. package/packages/typography-track/src/program.ts +15 -15
  414. package/packages/typography-track/src/surface.ts +17 -18
  415. package/packages/video-cli/README.md +4 -1
  416. package/packages/video-cli/package.json +2 -1
  417. package/packages/video-cli/src/creation.ts +14 -4
  418. package/packages/video-cli/src/index.ts +1 -1
  419. package/packages/video-cli/src/studio-distribution.ts +2 -1
  420. package/packages/volcengine-matting/README.md +3 -3
  421. package/packages/whisperx/README.md +1 -1
  422. package/services/whisperx/README.md +14 -0
  423. package/services/whisperx/pyproject.toml +2 -0
  424. package/services/whisperx/uv.lock +20 -20
  425. package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
  426. package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
  427. package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
  428. package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
  429. package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
  430. package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
  431. package/packages/provider-kie/README.md +0 -134
  432. package/packages/provider-kie/package.json +0 -43
  433. package/packages/provider-kie/src/activation.ts +0 -71
  434. package/packages/provider-kie/src/index.ts +0 -10
  435. package/packages/provider-kie/src/mapping.ts +0 -182
  436. package/packages/provider-kie/src/provider.ts +0 -657
  437. package/packages/provider-kie/src/routes.ts +0 -150
  438. package/packages/provider-xiaomi-mimo/README.md +0 -32
  439. package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
  440. package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
  441. package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
  442. package/packages/runtime/src/environment.ts +0 -6
  443. package/packages/semantic-track/README.md +0 -21
  444. package/packages/semantic-track/src/activation.ts +0 -8
  445. package/packages/semantic-track/src/component.ts +0 -24
  446. package/packages/semantic-track/src/identity.ts +0 -58
  447. package/packages/semantic-track/src/index.ts +0 -6
  448. package/packages/semantic-track/src/manifest.ts +0 -38
  449. package/packages/semantic-track/src/types.ts +0 -26
  450. package/packages/speech-track/README.md +0 -51
  451. package/packages/speech-track/src/activation.ts +0 -19
  452. package/packages/speech-track/src/index.ts +0 -7
  453. package/packages/speech-track/src/manifest.ts +0 -73
  454. package/packages/speech-track/src/program.ts +0 -64
  455. package/packages/speech-track/src/surface.ts +0 -35
  456. package/packages/speech-track/src/types.ts +0 -6
  457. package/packages/speech-track-studio/README.md +0 -3
  458. package/packages/speech-track-studio/package.json +0 -14
  459. package/packages/speech-track-studio/src/activation.ts +0 -7
  460. package/packages/speech-track-studio/src/index.ts +0 -40
  461. /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
  462. /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
@@ -0,0 +1,5 @@
1
+ export * from "./style.js";
2
+ export * from "./program.js";
3
+ export * from "./component.js";
4
+ export * from "./surface.js";
5
+ export * from "./manifest.js";
@@ -0,0 +1,47 @@
1
+ import { compositionDependency, compositionTypes } from "@hypit/composition";
2
+ import { timelineDependency, timelineTypes } from "@hypit/timeline";
3
+ import { temporalDependency, temporalTypes } from "@hypit/temporal";
4
+ import { temporalWindowAttributeVocabulary } from "@hypit/temporal-markup";
5
+ import type { ModuleManifest, ProducerRef, TypeRef } from "@hypit/protocol";
6
+
7
+ export const soundModuleRef = { name: "@hypit/sound", version: "1" } as const;
8
+ export const soundTypes = Object.fromEntries(["Style", "Set", "Header", "Gain"].map(name => [name.toLowerCase(), { module: soundModuleRef, name: `Sound${name}` }])) as Record<"style" | "set" | "header" | "gain", TypeRef>;
9
+ export const soundProducers = Object.fromEntries(["create", "append", "resolve", "ordinary"].map(name => [name, { module: soundModuleRef, name }])) as Record<"create" | "append" | "resolve" | "ordinary", ProducerRef>;
10
+ export const ordinaryInputs = [
11
+ { name: "timeline", type: timelineTypes.track }, { name: "window", type: temporalTypes.window },
12
+ { name: "spec", type: soundTypes.gain },
13
+ ];
14
+ export const soundManifest: ModuleManifest = {
15
+ format: "hypit.module@1", ...soundModuleRef,
16
+ dependencies: [compositionDependency, timelineDependency, temporalDependency],
17
+ types: Object.values(soundTypes).map(type => ({ name: type.name })), capabilities: [],
18
+ producers: [
19
+ { name: "create", inputs: [], outputs: [{ name: "set", type: soundTypes.set }], needs: [] },
20
+ { name: "append", inputs: [{ name: "set", type: soundTypes.set }, { name: "window", type: temporalTypes.window }, { name: "audio", type: compositionTypes.audioTrack }], outputs: [{ name: "set", type: soundTypes.set }], needs: [] },
21
+ { name: "resolve", inputs: [{ name: "set", type: soundTypes.set }, { name: "timeline", type: timelineTypes.track }, { name: "header", type: soundTypes.header }], outputs: [{ name: "audio", type: compositionTypes.audioTrack }], needs: [] },
22
+ { name: "ordinary", inputs: ordinaryInputs, outputs: [{ name: "audio", type: compositionTypes.audioTrack }], needs: [] },
23
+ ],
24
+ };
25
+ export const soundMarkupSurfaces = [
26
+ { name: "style", tag: "Style", mode: "structured", outputs: [soundTypes.style, soundTypes.gain], vocabulary: {
27
+ summary: "Presents existing Timeline sound, choosing the last declared active audio source. Gain may change linearly across each Use.",
28
+ example: `<sound:Style id="fade-in" gain="0" end-gain="1"/>`,
29
+ attributes: [
30
+ { name: "id", kind: "identifier", required: true, summary: "Style name." },
31
+ { name: "gain", kind: "literal", required: false, summary: "Linear gain at the beginning of a Use; defaults to 1. Zero silences the presentation." },
32
+ { name: "end-gain", kind: "literal", required: false, summary: "Linear gain at the end of a Use; defaults to gain. The original Use interval owns the ramp." },
33
+ ],
34
+ } },
35
+ { name: "track", tag: "Track", mode: "structured", outputs: [compositionTypes.audioTrack, soundTypes.set, soundTypes.header, temporalTypes.instantSpec, temporalTypes.windowSpec, temporalTypes.instant, temporalTypes.window], vocabulary: {
36
+ summary: "Presents Timeline sound through ordered Uses. Later Uses replace earlier presentation locally without restarting source playback or gain curves.",
37
+ example: `<sound:Track id="voice" timeline={program.timeline}><sound:Use style={normal}/><sound:Use at="0f" for="2s" style={fade-in}/></sound:Track>`,
38
+ attributes: [
39
+ { name: "id", kind: "identifier", required: true, summary: "Sound presentation name." },
40
+ { name: "timeline", kind: "reference", required: true, accepts: [timelineTypes.track], summary: "Complete film time and placed sources." },
41
+ ], children: [{ tag: "Use", cardinality: "many", summary: "Last matching Use wins, including silence. No time selector covers the complete Timeline.", attributes: [
42
+ { name: "id", kind: "identifier", required: false, summary: "Optional occurrence identity." },
43
+ { name: "style", kind: "reference", required: true, accepts: [soundTypes.style], summary: "Ordinary or project-authored sound Style. Explicit source bindings belong to the Style." },
44
+ ...temporalWindowAttributeVocabulary,
45
+ ] }],
46
+ } },
47
+ ] as const;
@@ -0,0 +1,84 @@
1
+ import { sealAudioTrack, assertAudioTrackIdentity } from "@hypit/composition";
2
+ import type { AudioTrack, AudioClip, AudioSampleSpan, AudioGainPoint } from "@hypit/composition";
3
+ import { assertTemporalWindowFor } from "@hypit/temporal";
4
+ import type { TemporalWindow } from "@hypit/temporal";
5
+ import { projectTimelineAudio } from "@hypit/timeline";
6
+ import type { Timeline } from "@hypit/timeline";
7
+ import type { NarrativeExcerpt } from "@hypit/narrative";
8
+ import { programFrameSampleBoundary } from "@hypit/program-space";
9
+
10
+ export type SoundUse = { readonly window: TemporalWindow; readonly audio: AudioTrack };
11
+ export type SoundSet = { readonly uses: readonly SoundUse[] };
12
+ export type SoundGain = { readonly gain: number; readonly endGain: number };
13
+
14
+ export function soundWindow(timeline: Timeline, window: TemporalWindow): AudioSampleSpan {
15
+ assertTemporalWindowFor(window, { subjectId: window.subjectId, space: timeline });
16
+ return { startSample: programFrameSampleBoundary(timeline, window.span.startFrame, 48000),
17
+ endSampleExclusive: programFrameSampleBoundary(timeline, window.span.endFrameExclusive, 48000) };
18
+ }
19
+ export function intersectAudioSpans(left: readonly AudioSampleSpan[], right: readonly AudioSampleSpan[]): AudioSampleSpan[] {
20
+ return left.flatMap(a => right.flatMap(b => {
21
+ const startSample = Math.max(a.startSample, b.startSample), endSampleExclusive = Math.min(a.endSampleExclusive, b.endSampleExclusive);
22
+ return endSampleExclusive > startSample ? [{ startSample, endSampleExclusive }] : [];
23
+ }));
24
+ }
25
+ function subtract(spans: readonly AudioSampleSpan[], cut: AudioSampleSpan): AudioSampleSpan[] {
26
+ return spans.flatMap(span => {
27
+ if (cut.endSampleExclusive <= span.startSample || cut.startSample >= span.endSampleExclusive) return [span];
28
+ return [
29
+ ...(cut.startSample > span.startSample ? [{ startSample: span.startSample, endSampleExclusive: cut.startSample }] : []),
30
+ ...(cut.endSampleExclusive < span.endSampleExclusive ? [{ startSample: cut.endSampleExclusive, endSampleExclusive: span.endSampleExclusive }] : []),
31
+ ];
32
+ });
33
+ }
34
+ function envelope(span: AudioSampleSpan, gain: SoundGain): readonly AudioGainPoint[] {
35
+ if (![gain.gain, gain.endGain].every(value => Number.isFinite(value) && value >= 0 && value <= 64)) throw new Error("Sound gain must be from 0 to 64.");
36
+ return [{ sample: span.startSample, gain: gain.gain }, { sample: span.endSampleExclusive, gain: gain.endGain }];
37
+ }
38
+ const unity = { gain: 1, endGain: 1 };
39
+
40
+ /** Default source choice is declaration order, independently of the order of Use rules. */
41
+ export function ordinarySound(timeline: Timeline, window: TemporalWindow, gain: SoundGain = unity): AudioTrack {
42
+ const span = soundWindow(timeline, window), gainEnvelope = envelope(span, gain);
43
+ const sources = new Map(projectTimelineAudio(timeline).clips.map(clip => [clip.id, clip]));
44
+ const clips = timeline.items.flatMap(item => { const clip = sources.get(item.take.segment.segmentId); return clip ? [clip] : []; });
45
+ const result: AudioClip[] = [];
46
+ for (const [index, clip] of clips.entries()) {
47
+ let audibility = intersectAudioSpans([span], [clip.target]);
48
+ for (const later of clips.slice(index + 1)) audibility = subtract(audibility, later.target);
49
+ if (audibility.length && (gain.gain !== 0 || gain.endGain !== 0)) result.push({ ...clip, gainEnvelope, audibility });
50
+ }
51
+ return sealAudioTrack({ id: window.subjectId, programSpaceId: timeline.id, clips: result });
52
+ }
53
+
54
+ /** Explicit source selection for project Styles, with its original placement/sampling retained. */
55
+ export function sourceSound(timeline: Timeline, window: TemporalWindow, segment: NarrativeExcerpt, gain: SoundGain = unity): AudioTrack {
56
+ if (segment.kind !== "segment" || segment.narrativeId !== timeline.narrativeId) throw new Error("Sound source must be a Segment of this Timeline's Narrative.");
57
+ if (!timeline.items.some(item => item.take.segment.segmentId === segment.id)) throw new Error(`Unknown Sound Segment ${segment.id}.`);
58
+ const span = soundWindow(timeline, window), gainEnvelope = envelope(span, gain);
59
+ const clip = projectTimelineAudio(timeline).clips.find(clip => clip.id === segment.id);
60
+ const audibility = clip ? intersectAudioSpans([span], [clip.target]) : [];
61
+ return sealAudioTrack({ id: `${window.subjectId}:${segment.id}`, programSpaceId: timeline.id,
62
+ clips: clip && audibility.length && (gain.gain !== 0 || gain.endGain !== 0) ? [{ ...clip, gainEnvelope, audibility }] : [] });
63
+ }
64
+ export function appendSoundUse(set: SoundSet, window: TemporalWindow, audio: AudioTrack): SoundSet {
65
+ assertAudioTrackIdentity(audio);
66
+ if (audio.programSpaceId !== window.start.source.spaceId) throw new Error("Sound Use and audio belong to different Timelines.");
67
+ return { uses: [...set.uses, { window, audio }] };
68
+ }
69
+ /** Resolve presentation coverage without changing original targets, source clocks or envelopes. */
70
+ export function resolveSound(timeline: Timeline, id: string, set: SoundSet): AudioTrack {
71
+ const windows = set.uses.map(use => { assertAudioTrackIdentity(use.audio, timeline); return soundWindow(timeline, use.window); });
72
+ const clips: AudioClip[] = [];
73
+ for (const [index, use] of set.uses.entries()) {
74
+ let active = [windows[index]!];
75
+ for (const cut of windows.slice(index + 1)) active = subtract(active, cut);
76
+ for (const clip of use.audio.clips) {
77
+ const audibility = intersectAudioSpans(active, clip.audibility ?? [clip.target]);
78
+ if (audibility.length) clips.push({ ...clip, id: `${index + 1}:${clip.id}`, audibility });
79
+ }
80
+ }
81
+ const result = sealAudioTrack({ id, programSpaceId: timeline.id, clips });
82
+ assertAudioTrackIdentity(result, timeline);
83
+ return result;
84
+ }
@@ -0,0 +1,34 @@
1
+ import { sealGraphFragment } from "@hypit/elaborator";
2
+ import type { GraphFragment } from "@hypit/elaborator";
3
+ import { compositionTypes } from "@hypit/composition";
4
+ import { timelineTypes } from "@hypit/timeline";
5
+ import { temporalTypes } from "@hypit/temporal";
6
+ import { sameType } from "@hypit/protocol";
7
+ import type { SurfaceResolvedReference } from "@hypit/markup";
8
+
9
+ /** Author-time closure: bound references become ordinary graph edges at each Use. */
10
+ export type SoundStyle = {
11
+ readonly fragment: GraphFragment;
12
+ readonly bindings: Readonly<Record<string, { readonly type: SurfaceResolvedReference["type"]; readonly ref: SurfaceResolvedReference["ref"] }>>;
13
+ };
14
+ export function soundStyle(fragment: GraphFragment, bindings: SoundStyle["bindings"] = {}): SoundStyle {
15
+ fragment = sealGraphFragment(fragment);
16
+ const common = { timeline: timelineTypes.track, window: temporalTypes.window };
17
+ for (const [name, type] of Object.entries(common)) {
18
+ const port = fragment.inputs.find(port => port.name === name);
19
+ if (port === undefined || !sameType(port.type, type)) throw new Error(`Sound Style requires ${name} input.`);
20
+ if (bindings[name] !== undefined) throw new Error(`Sound supplies ${name} at each Use.`);
21
+ }
22
+ for (const port of fragment.inputs) {
23
+ if (port.name in common) continue;
24
+ const binding = bindings[port.name];
25
+ if (binding === undefined || !sameType(port.type, binding.type)) throw new Error(`Sound Style binding ${port.name} has the wrong Type.`);
26
+ }
27
+ for (const name of Object.keys(bindings)) {
28
+ if (!fragment.inputs.some(port => port.name === name)) throw new Error(`Sound Style has unknown binding ${name}.`);
29
+ }
30
+ if (fragment.exports.length !== 1 || fragment.exports[0]?.name !== "audio" || !sameType(fragment.exports[0].type, compositionTypes.audioTrack)) {
31
+ throw new Error("Sound Style must export audio: AudioTrack.");
32
+ }
33
+ return { fragment, bindings: Object.fromEntries(Object.entries(bindings).map(([name, value]) => [name, { ref: value.ref, type: value.type }])) };
34
+ }
@@ -0,0 +1,90 @@
1
+ import { assertAttributes, assertEmptyElement, textAttribute, optionalTextAttribute } from "@hypit/markup";
2
+ import type { StructuredSurfaceHandler, SurfaceResolvedReference, SurfaceRecordDraft, SurfaceComponentDraft, StructuredElement } from "@hypit/markup";
3
+ import { canonicalize, sameType } from "@hypit/protocol";
4
+ import type { TypeRef } from "@hypit/protocol";
5
+ import { sealGraphFragment } from "@hypit/elaborator";
6
+ import type { FragmentOperation } from "@hypit/elaborator";
7
+ import { createTemporalWindowProjection, resolveTemporalContext, temporalWindowAttributeNames } from "@hypit/temporal-markup";
8
+ import { temporalTypes } from "@hypit/temporal";
9
+ import { compositionTypes } from "@hypit/composition";
10
+ import { timelineTypes } from "@hypit/timeline";
11
+ import { soundStyle } from "./style.js";
12
+ import type { SoundStyle } from "./style.js";
13
+ import { soundTypes, soundProducers, ordinaryInputs } from "./manifest.js";
14
+
15
+ const input = (name: string) => ({ kind: "fragment-input" as const, name });
16
+ const operation = (id: string) => ({ kind: "fragment-operation" as const, operation: id });
17
+ function reference(element: StructuredElement, name: string, type: TypeRef, resolve: (path: string) => SurfaceResolvedReference | undefined): SurfaceResolvedReference {
18
+ const raw = element.attributes[name];
19
+ if (typeof raw !== "object" || raw.kind !== "reference") throw new Error(`${element.name}.${name} must be a reference.`);
20
+ const found = resolve(raw.path);
21
+ if (found === undefined || !sameType(found.type, type)) throw new Error(`${element.name}.${name} has the wrong Type.`);
22
+ return found;
23
+ }
24
+ function authored<T>(value: SurfaceResolvedReference): T {
25
+ if (value.record?.value.kind !== "inline") throw new Error("A presentation Style or Recipe must be an authored inline value.");
26
+ return value.record.value.value as unknown as T;
27
+ }
28
+ export const decodeSoundTrackSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
29
+ assertAttributes(element, ["id", "timeline"]);
30
+ const id = textAttribute(element, "id"), context = resolveTemporalContext({ element, resolveReference });
31
+ const records: SurfaceRecordDraft[] = [{ id: `${id}.header`, type: soundTypes.header, value: { kind: "inline", value: { id } }, range: element.range }];
32
+ const components: SurfaceComponentDraft[] = [];
33
+ const fragments = [] as ReturnType<typeof sealGraphFragment>[];
34
+ const collectorInputs = [{ name: "timeline", type: timelineTypes.track }, { name: "header", type: soundTypes.header }];
35
+ const bindings: Record<string, SurfaceResolvedReference["ref"]> = { timeline: context.timeline.ref, header: { kind: "record", id: `${id}.header` } };
36
+ const operations: FragmentOperation[] = [{ id: "empty", producer: soundProducers.create, inputs: {}, result: { kind: "output", name: "set" } }];
37
+ let previous = "empty", index = 0;
38
+ for (const child of element.children) {
39
+ if (child.kind === "text") { if (child.value.trim()) throw new Error("Sound Track accepts Use children."); continue; }
40
+ if (child.name.split(":").at(-1) !== "Use") throw new Error("Sound Track accepts Use children.");
41
+ assertAttributes(child, ["id", "style", ...temporalWindowAttributeNames]); assertEmptyElement(child);
42
+ const useId = optionalTextAttribute(child, "id") ?? `${id}.use.${index + 1}`;
43
+ index += 1;
44
+ const hasTime = temporalWindowAttributeNames.some(name => child.attributes[name] !== undefined);
45
+ const temporal = createTemporalWindowProjection({ id: useId, ...context, resolveReference,
46
+ element: hasTime ? child : { ...child, attributes: { ...child.attributes, during: "program" } } });
47
+ records.push(...temporal.records); components.push(...temporal.components); fragments.push(...temporal.fragments);
48
+ const value = authored<SoundStyle>(reference(child, "style", soundTypes.style, resolveReference));
49
+ const style = soundStyle(value.fragment, value.bindings);
50
+ fragments.push(style.fragment);
51
+ const audioId = `${useId}.audio`;
52
+ components.push({ id: `${useId}.__style`, fragment: style.fragment.id,
53
+ inputs: { ...Object.fromEntries(Object.entries(style.bindings).map(([key, bound]) => [key, bound.ref])),
54
+ timeline: context.timeline.ref, window: temporal.ref }, outputs: { audio: audioId }, range: child.range });
55
+ const suffix = `use-${operations.length}`;
56
+ collectorInputs.push({ name: `${suffix}-window`, type: temporalTypes.window }, { name: `${suffix}-audio`, type: compositionTypes.audioTrack });
57
+ bindings[`${suffix}-window`] = temporal.ref; bindings[`${suffix}-audio`] = { kind: "component-output", component: `${useId}.__style`, output: "audio" };
58
+ operations.push({ id: suffix, producer: soundProducers.append, inputs: { set: operation(previous), window: input(`${suffix}-window`), audio: input(`${suffix}-audio`) }, result: { kind: "output", name: "set" } });
59
+ previous = suffix;
60
+ }
61
+ operations.push({ id: "resolve", producer: soundProducers.resolve, inputs: { set: operation(previous), timeline: input("timeline"), header: input("header") }, result: { kind: "output", name: "audio" } });
62
+ const collector = sealGraphFragment({ inputs: collectorInputs, operations, exports: [{ name: "audio", type: compositionTypes.audioTrack, root: operation("resolve") }, { name: "program", type: soundTypes.set, root: operation(previous) }] });
63
+ fragments.push(collector);
64
+ components.push({ id, fragment: collector.id, inputs: bindings, outputs: { audio: `${id}.audio`, program: `${id}.program` }, range: element.range });
65
+ return { records, components, fragments, exports: [`${id}.audio`, `${id}.program`] };
66
+ };
67
+
68
+ export const ordinarySoundFragment = sealGraphFragment({
69
+ inputs: ordinaryInputs,
70
+ operations: [{ id: "ordinary", producer: soundProducers.ordinary,
71
+ inputs: Object.fromEntries(ordinaryInputs.map(port => [port.name, input(port.name)])), result: { kind: "output", name: "audio" } }],
72
+ exports: [{ name: "audio", type: compositionTypes.audioTrack, root: operation("ordinary") }],
73
+ });
74
+ export const decodeSoundStyleSurface: StructuredSurfaceHandler = ({ element }) => {
75
+ assertAttributes(element, ["id", "gain", "end-gain"]); assertEmptyElement(element);
76
+ const id = textAttribute(element, "id");
77
+ const number = (name: string, fallback: number): number => {
78
+ const raw = optionalTextAttribute(element, name);
79
+ const value = raw === undefined ? fallback : raw.trim() === "" ? NaN : Number(raw);
80
+ if (!Number.isFinite(value) || value < 0 || value > 64) throw new Error(`Sound Style ${name} must be a gain from 0 to 64.`);
81
+ return value;
82
+ };
83
+ const gain = number("gain", 1), endGain = number("end-gain", gain);
84
+ const specId = `${id}.gain`;
85
+ const style = soundStyle(ordinarySoundFragment, { spec: { ref: { kind: "record", id: specId }, type: soundTypes.gain } });
86
+ return { records: [
87
+ { id: specId, type: soundTypes.gain, value: { kind: "inline", value: { gain, endGain } }, range: element.range },
88
+ { id, type: soundTypes.style, value: { kind: "inline", value: canonicalize(style) }, range: element.range },
89
+ ], components: [], fragments: [] };
90
+ };
@@ -0,0 +1,22 @@
1
+ # Sound Studio Companion
2
+
3
+ Sound contributes one Track with content and a bottom Uses band through the public Companion interface:
4
+
5
+ - The content lane shows placed audio Takes with waveforms. Each Take retains its actual interval, including gaps and overlaps. Picture-only Takes contribute no sound item.
6
+ - The Uses label band shows each authored Style application. Later declarations appear over earlier ones; selection raises an item for editing without changing that priority. Silent and fully covered Uses remain selectable.
7
+
8
+ One Sound label spans the waveform content and Uses band. Selecting a Take shows its Segment and placed frame range.
9
+ Selecting a Use shows its Style and resolved frame range, alongside the ordinary Style's authored
10
+ `gain` and `end-gain` parameters. Gain is displayed as a percentage: 100% writes the linear value 1.
11
+ The end gain defaults to the start gain. The parameter Companion exposes this dependent default;
12
+ the first edit inserts an explicit attribute into the Style.
13
+
14
+ The fields live in When and How. Shared Style edits affect all Uses selecting that Style.
15
+ Temporal gestures follow the existing Selection/Moment/clock projection and exact source endpoint
16
+ rules. Project Styles expose their own parameters through `createStudioCompanionHostFacet({ parameters })`,
17
+ matching their own Module and Surface. The Track opts `style` into this owner with `companion: true`.
18
+
19
+ `Sound Track.program` exports the already-computed ordered Use set before presentation coverage
20
+ is resolved. `Sound Track.audio` exports the effective audio arrangement. The Companion reads the
21
+ former to preserve editing choices even when they currently produce no sound; rendering consumes
22
+ the latter. Studio does not reconstruct the rule set from audible output or inspect Sound internals.
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@hypit/sound-studio",
3
+ "version": "0.0.0-dev",
4
+ "license": "SEE LICENSE IN LICENSE",
5
+ "private": true,
6
+ "type": "module",
7
+ "exports": {
8
+ ".": "./src/index.ts"
9
+ },
10
+ "hypit": {
11
+ "activation": "./src/activation.ts"
12
+ },
13
+ "dependencies": {
14
+ "@hypit/timeline": "workspace:*",
15
+ "@hypit/temporal": "workspace:*",
16
+ "@hypit/composition": "workspace:*",
17
+ "@hypit/studio-adapter": "workspace:*",
18
+ "@hypit/sound": "workspace:*"
19
+ }
20
+ }
@@ -0,0 +1,6 @@
1
+ import { createStudioCompanionHostFacet } from "@hypit/studio-adapter";
2
+ import { soundStudioTrackCompanions, soundStudioParameterCompanions } from "./index.js";
3
+ export default {
4
+ format: "hypit.node-package@1" as const,
5
+ hostFacets: [createStudioCompanionHostFacet({ tracks: soundStudioTrackCompanions, parameters: soundStudioParameterCompanions })],
6
+ };
@@ -0,0 +1,74 @@
1
+ import { soundModuleRef } from "@hypit/sound";
2
+ import type { SoundSet } from "@hypit/sound";
3
+ import { projectTimelineMedia, timelineTypes } from "@hypit/timeline";
4
+ import type { Timeline } from "@hypit/timeline";
5
+ import { temporalTypes } from "@hypit/temporal";
6
+ import { compositionTypes } from "@hypit/composition";
7
+ import { artifactPreview, authoredChildFor, previewLayer, requiredReferencedValue, requiredSurfaceValue, temporalLineageFor, temporalSemanticSource } from "@hypit/studio-adapter";
8
+ import type { StudioTrackCompanion, StudioTrackCompanionContext, StudioEntityDraft } from "@hypit/studio-adapter";
9
+
10
+ export function projectSound(context: StudioTrackCompanionContext): readonly StudioEntityDraft[] {
11
+ const timeline = requiredReferencedValue(context, "timeline", timelineTypes.track) as Timeline;
12
+ const program = requiredSurfaceValue(context, "program") as SoundSet;
13
+ // Source content keeps its own placement. A Use changes its presentation, not its media clock.
14
+ const content: StudioEntityDraft[] = projectTimelineMedia(timeline).flatMap((clip, index) => {
15
+ if (clip.media.audio === undefined) return [];
16
+ return [{
17
+ id: `${context.track.outputRef}:content:${clip.segmentId}`,
18
+ authoredId: clip.segmentId,
19
+ display: { title: clip.segmentId, layers: [previewLayer(artifactPreview("audio", clip.media.audio.artifact.resource), "waveform")] },
20
+ ...clip.span, stackOrder: index,
21
+ inspector: [
22
+ { id: "segment", label: "Segment", domain: "how", section: { id: "content", label: "Content" }, value: clip.segmentId },
23
+ { id: "range", label: "Range", domain: "when", section: { id: "placement", label: "Placement" }, value: `${clip.span.startFrame}–${clip.span.endFrameExclusive}`, unit: "f", summary: "Placed interval; the end frame is exclusive." },
24
+ ],
25
+ presentation: { entity: "sound-content", chrome: "standard" },
26
+ }];
27
+ });
28
+ const uses: StudioEntityDraft[] = program.uses.map((use, index) => {
29
+ const authoredId = use.window.subjectId;
30
+ const child = authoredChildFor(context, authoredId, [temporalTypes.windowSpec]);
31
+ if (child === undefined) throw new Error(`Sound Use ${authoredId} has no author provenance.`);
32
+ const style = child.referenceAttributes.style;
33
+ const temporal = temporalLineageFor(context, authoredId, "window");
34
+ const semantic = temporalSemanticSource(temporal);
35
+ return {
36
+ id: `${context.track.outputRef}:use:${authoredId}`, authoredId,
37
+ display: { title: style ?? authoredId, layers: [] },
38
+ ...use.window.span, stackOrder: index,
39
+ elementRange: child.range,
40
+ ...(temporal === undefined ? {} : { temporal }),
41
+ ...(semantic === undefined ? {} : { markerId: semantic.id }),
42
+ presentation: { entity: "sound-use", chrome: "standard" },
43
+ band: "uses",
44
+ inspector: [{ id: "range", label: "Range", domain: "when", section: { id: "placement", label: "Placement" }, value: `${use.window.span.startFrame}–${use.window.span.endFrameExclusive}`, unit: "f", summary: "Resolved Use interval; the end frame is exclusive. Timeline gestures follow this Use's author timing." }],
45
+ };
46
+ });
47
+ return [...content, ...uses];
48
+ }
49
+
50
+ export const soundStudioTrackCompanions: readonly StudioTrackCompanion[] = [{
51
+ id: "audio", role: "track",
52
+ output: { type: compositionTypes.audioTrack, surface: "track", modules: [soundModuleRef] },
53
+ family: "sound", label: "Sound", tone: "green", icon: "waveform",
54
+ lane: { heightPx: 48 },
55
+ requiredValues: ["program"],
56
+ bands: [{
57
+ id: "uses", placement: "after", heightPx: 15, display: "label",
58
+ bindings: [{ name: "style", companion: true }],
59
+ inspector: [{ binding: "style", label: "Style", domain: "how", section: { id: "sound", label: "Sound" }, control: "text", summary: "This Style is shared by every Use that selects it." }],
60
+ }],
61
+ project: projectSound,
62
+ }];
63
+
64
+ export const soundStudioParameterCompanions: readonly import("@hypit/studio-adapter").StudioParameterCompanion[] = [{
65
+ id: "style", match: { module: soundModuleRef, surface: "style" },
66
+ bindings: [ { name: "gain", writable: true, fallback: 1 },
67
+ { name: "end-gain", writable: true, fallback: authored => Number(authored.gain ?? 1) } ],
68
+ inspector: (["gain", "end-gain"] as const).map(name => ({
69
+ binding: name, label: name === "gain" ? "Gain" : "End Gain", domain: "how",
70
+ section: { id: "sound", label: "Sound" }, control: "number", unit: "%",
71
+ number: { scale: 100, minimum: 0, maximum: 6400, step: 1 },
72
+ summary: name === "gain" ? "Linear gain at the start of each Use. 100% preserves the source level." : "Linear gain at the end of each Use. The Use interval owns the ramp.",
73
+ })),
74
+ }];
@@ -6,8 +6,8 @@ owns the types and helpers below; Source imports retain the `@hypit/speech@1` Mo
6
6
 
7
7
  Public contracts for speech duration, normalized semantic Takes and provider-neutral evidence audio.
8
8
  A `SemanticTake` contains one normalized media product, one authored Segment, its words and local
9
- frame anchors. Ordered Takes are assembled by `@hypit/speech-track` into a `SemanticTrack`, which is
10
- the program's continuous semantic skeleton. `SpeechEvidenceAudio` carries canonical 16 kHz WAV bytes
9
+ frame anchors. Ordered Takes are assembled by `@hypit/timeline-author` into a `Timeline`, which is
10
+ the complete Program range and Take placements, including gaps or overlap. `SpeechEvidenceAudio` carries canonical 16 kHz WAV bytes
11
11
  and their exact sample count; it never carries Script or Segment identity.
12
12
 
13
13
  The package also owns deterministic boundary materialization for a Segment with no Tokens. It maps
@@ -16,8 +16,16 @@ function segmentNarrative(narrative: Narrative, excerpt: NarrativeExcerpt): Narr
16
16
  throw new Error(`NarrativeExcerpt ${excerpt.id} does not describe its authored Segment.`);
17
17
  }
18
18
  const tokens = narrative.tokens.slice(segment.tokenStart, segment.tokenEndExclusive);
19
+ const units = narrative.caption.units.filter((unit) => unit.segmentId === segment.id);
20
+ const unitIds = new Set(units.map((unit) => unit.id));
19
21
  return {
20
22
  id: narrative.id,
23
+ caption: {
24
+ ...narrative.caption,
25
+ units,
26
+ words: narrative.caption.words.filter((word) => unitIds.has(word.unitId)),
27
+ cueBreaks: narrative.caption.cueBreaks.filter((cue) => unitIds.has(cue.afterUnitId)),
28
+ },
21
29
  segments: [{ ...segment, tokenStart: 0, tokenEndExclusive: tokens.length }],
22
30
  tokens,
23
31
  turns: narrative.turns
@@ -456,7 +456,7 @@ export function locateAlignedSegmentTiming(
456
456
  const tokensById = new Map(timedTokens.map((token) => [token.tokenId, token]));
457
457
  const segmentsById = new Map(timedSegments.map((segment) => [segment.segmentId, segment]));
458
458
  const anchors: LocalSemanticTimePoint[] = narrative.semanticIndex.anchors.flatMap((anchor): LocalSemanticTimePoint[] => {
459
- // Program boundaries belong to the assembled SemanticTrack, never to one Segment-local Take.
459
+ // Program boundaries belong to the assembled Timeline, never to one Segment-local Take.
460
460
  if (anchor.kind === "program-start" || anchor.kind === "program-end") return [];
461
461
  if (anchor.kind === "segment-start" || anchor.kind === "segment-end") {
462
462
  const segment = segmentsById.get(anchor.segmentId)!;
@@ -12,3 +12,10 @@ has recorded them. Unknown remote outcomes do not keep a failed Build active.
12
12
  Artifact bytes and secret credential values never enter this database. Components and Endpoint packages do not import
13
13
  SQLite. `SqliteRuntimeState` exposes the narrow stores needed by the local Runtime and owns their shared
14
14
  connection.
15
+
16
+ Execution choices live in `context_json` on the existing submission/execution records. The store treats
17
+ that value as opaque Host data. `started_at` distinguishes queued work from an executor that was lost.
18
+ `listUnstarted` and `listReady` return only IDs for dispatch, without parsing every Profile or graph.
19
+ Scoped claims and shared capacity updates remain atomic across execution contexts and processes. No global Profile
20
+ pin prevents a new Build from using new selections. An interrupted executor is concluded only after
21
+ its supervisor knows the process has exited; stored Operation receipts are retained for Result writing.