@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.
Files changed (486) hide show
  1. package/README.md +5 -3
  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 +107 -16
  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 +6 -0
  30. package/examples/semantic-composition/chat.svml +6 -5
  31. package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
  32. package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
  33. package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
  34. package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
  35. package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
  36. package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
  37. package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
  38. package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
  39. package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
  40. package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
  41. package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
  42. package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
  43. package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
  44. package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
  45. package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
  46. package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
  47. package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
  48. package/package.json +35 -15
  49. package/packages/audio-track/README.md +20 -13
  50. package/packages/audio-track/package.json +1 -1
  51. package/packages/audio-track/src/component.ts +4 -4
  52. package/packages/audio-track/src/fragment.ts +6 -5
  53. package/packages/audio-track/src/index.ts +1 -1
  54. package/packages/audio-track/src/manifest.ts +17 -16
  55. package/packages/audio-track/src/program.ts +21 -25
  56. package/packages/audio-track/src/surface.ts +19 -18
  57. package/packages/audio-track-studio/README.md +23 -0
  58. package/packages/audio-track-studio/src/index.ts +33 -19
  59. package/packages/author-kit/README.md +1 -1
  60. package/packages/background-removal/README.md +4 -7
  61. package/packages/browser-capture/package.json +1 -1
  62. package/packages/build-result/README.md +69 -0
  63. package/packages/build-result/package.json +2 -1
  64. package/packages/build-result/src/decode.ts +12 -8
  65. package/packages/build-result/src/execution-log.ts +17 -0
  66. package/packages/build-result/src/file-reference.ts +42 -0
  67. package/packages/build-result/src/index.ts +4 -0
  68. package/packages/build-result/src/replace-file-windows.ts +58 -0
  69. package/packages/build-result/src/replace-file.ts +11 -0
  70. package/packages/build-result/src/store.ts +58 -14
  71. package/packages/build-result/src/types.ts +41 -8
  72. package/packages/build-result/src/writer.ts +12 -1
  73. package/packages/build-result-fs/README.md +23 -1
  74. package/packages/build-result-s3/README.md +5 -0
  75. package/packages/build-result-s3/src/repository.ts +23 -5
  76. package/packages/caption/README.md +61 -73
  77. package/packages/caption/package.json +3 -2
  78. package/packages/caption/src/activation.ts +2 -2
  79. package/packages/caption/src/component.ts +20 -5
  80. package/packages/caption/src/display.ts +3 -18
  81. package/packages/caption/src/fragment.ts +3 -7
  82. package/packages/caption/src/index.ts +6 -5
  83. package/packages/caption/src/manifest.ts +29 -46
  84. package/packages/caption/src/style.ts +24 -135
  85. package/packages/caption/src/surface.ts +12 -92
  86. package/packages/caption/src/temporalize.ts +18 -53
  87. package/packages/caption/src/types.ts +8 -35
  88. package/packages/caption/src/visibility.ts +23 -0
  89. package/packages/caption-fine/README.md +31 -11
  90. package/packages/caption-fine/package.json +4 -2
  91. package/packages/caption-fine/src/component.ts +3 -3
  92. package/packages/caption-fine/src/fragment.ts +7 -19
  93. package/packages/caption-fine/src/index.ts +2 -0
  94. package/packages/caption-fine/src/manifest.ts +27 -18
  95. package/packages/caption-fine/src/recipe.ts +7 -0
  96. package/packages/caption-fine/src/render.ts +62 -49
  97. package/packages/caption-fine/src/schedule.ts +39 -35
  98. package/packages/caption-fine/src/style.ts +10 -9
  99. package/packages/caption-fine/src/surface.ts +62 -35
  100. package/packages/caption-fine/src/types.ts +2 -0
  101. package/packages/caption-fine-studio/README.md +24 -2
  102. package/packages/caption-fine-studio/package.json +10 -3
  103. package/packages/caption-fine-studio/src/activation.ts +3 -3
  104. package/packages/caption-fine-studio/src/index.ts +61 -40
  105. package/packages/cli/README.md +81 -3
  106. package/packages/cli/package.json +1 -0
  107. package/packages/cli/src/arguments.ts +39 -15
  108. package/packages/cli/src/build-planning.ts +9 -3
  109. package/packages/cli/src/command.ts +7 -1
  110. package/packages/cli/src/commands/environment.ts +66 -27
  111. package/packages/cli/src/commands/execution.ts +81 -26
  112. package/packages/cli/src/commands/results.ts +7 -11
  113. package/packages/cli/src/index.ts +2 -2
  114. package/packages/cli/src/machine-view.ts +15 -5
  115. package/packages/cli/src/main.ts +38 -42
  116. package/packages/cli/src/observation.ts +7 -1
  117. package/packages/cli/src/output.ts +92 -34
  118. package/packages/cli/src/result-export.ts +22 -13
  119. package/packages/cli/src/run-file.ts +19 -8
  120. package/packages/cli/src/view.ts +64 -18
  121. package/packages/comment-sticker/README.md +3 -3
  122. package/packages/comment-sticker/package.json +1 -1
  123. package/packages/comment-sticker/src/component.ts +4 -4
  124. package/packages/comment-sticker/src/fragment.ts +5 -4
  125. package/packages/comment-sticker/src/manifest.ts +7 -6
  126. package/packages/comment-sticker/src/program.ts +9 -9
  127. package/packages/comment-sticker/src/surface.ts +6 -7
  128. package/packages/comment-sticker-studio/src/index.ts +2 -1
  129. package/packages/compiler-node/src/compiler.ts +1 -0
  130. package/packages/composition/README.md +21 -0
  131. package/packages/composition/src/audio-presentation.ts +44 -0
  132. package/packages/composition/src/index.ts +3 -0
  133. package/packages/composition/src/schema.ts +8 -3
  134. package/packages/composition/src/track.ts +15 -1
  135. package/packages/credential-store-env/README.md +1 -1
  136. package/packages/deck-track/README.md +3 -3
  137. package/packages/deck-track/package.json +1 -1
  138. package/packages/deck-track/src/component.ts +5 -5
  139. package/packages/deck-track/src/fragment.ts +6 -5
  140. package/packages/deck-track/src/lower.ts +12 -12
  141. package/packages/deck-track/src/manifest.ts +8 -7
  142. package/packages/deck-track/src/program.ts +13 -16
  143. package/packages/deck-track/src/surface.ts +9 -10
  144. package/packages/driver-node/src/driver.ts +41 -3
  145. package/packages/elevenlabs-speech/README.md +27 -0
  146. package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
  147. package/packages/elevenlabs-speech/src/activation.ts +26 -0
  148. package/packages/elevenlabs-speech/src/fragment.ts +11 -0
  149. package/packages/elevenlabs-speech/src/index.ts +111 -0
  150. package/packages/elevenlabs-speech/src/surface.ts +167 -0
  151. package/packages/endpoint-kit/README.md +24 -0
  152. package/packages/endpoint-kit/src/index.ts +7 -1
  153. package/packages/estimate/README.md +56 -3
  154. package/packages/estimate/src/program.ts +7 -8
  155. package/packages/film/README.md +12 -7
  156. package/packages/film/package.json +1 -1
  157. package/packages/film/src/component.ts +4 -4
  158. package/packages/film/src/fragment.ts +6 -5
  159. package/packages/film/src/manifest.ts +11 -10
  160. package/packages/film/src/program.ts +5 -5
  161. package/packages/film/src/recipe.ts +2 -1
  162. package/packages/film/src/surface.ts +6 -6
  163. package/packages/film-studio/package.json +1 -1
  164. package/packages/film-studio/src/index.ts +2 -2
  165. package/packages/fishaudio-speech/README.md +33 -0
  166. package/packages/fishaudio-speech/package.json +21 -0
  167. package/packages/fishaudio-speech/src/activation.ts +32 -0
  168. package/packages/fishaudio-speech/src/fragment.ts +11 -0
  169. package/packages/fishaudio-speech/src/index.ts +156 -0
  170. package/packages/fishaudio-speech/src/surface.ts +192 -0
  171. package/packages/fonts-open/README.md +5 -0
  172. package/packages/fonts-open/package.json +5 -1
  173. package/packages/fonts-open/src/studio.ts +21 -0
  174. package/packages/generation/README.md +11 -1
  175. package/packages/generation/src/mapping.ts +28 -30
  176. package/packages/gpt-image/README.md +1 -2
  177. package/packages/grok-imagine/README.md +1 -2
  178. package/packages/hyperframes/README.md +7 -3
  179. package/packages/hyperframes/src/browser-program.ts +11 -2
  180. package/packages/hyperframes/src/document.ts +15 -2
  181. package/packages/interview-emoji-reveal/README.md +4 -4
  182. package/packages/interview-emoji-reveal/package.json +1 -1
  183. package/packages/interview-emoji-reveal/src/component.ts +4 -4
  184. package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
  185. package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
  186. package/packages/interview-emoji-reveal/src/program.ts +14 -14
  187. package/packages/interview-emoji-reveal/src/surface.ts +8 -9
  188. package/packages/media-execution/README.md +7 -3
  189. package/packages/media-execution/src/audio-presentation.ts +23 -0
  190. package/packages/media-execution/src/execute.ts +2 -0
  191. package/packages/media-pipeline/README.md +7 -3
  192. package/packages/media-pipeline/src/audio-plan.ts +4 -1
  193. package/packages/media-pipeline/src/component.ts +16 -2
  194. package/packages/media-pipeline/src/manifest.ts +3 -1
  195. package/packages/media-pipeline/src/types.ts +2 -1
  196. package/packages/media-track/README.md +14 -47
  197. package/packages/media-track/package.json +1 -1
  198. package/packages/media-track/preview/preview.svml +5 -5
  199. package/packages/media-track/src/author.ts +12 -6
  200. package/packages/media-track/src/component.ts +10 -16
  201. package/packages/media-track/src/fragment.ts +8 -7
  202. package/packages/media-track/src/index.ts +3 -1
  203. package/packages/media-track/src/lower.ts +7 -7
  204. package/packages/media-track/src/manifest.ts +16 -38
  205. package/packages/media-track/src/program.ts +62 -67
  206. package/packages/media-track/src/sampling.ts +6 -6
  207. package/packages/media-track/src/sequence.ts +8 -8
  208. package/packages/media-track/src/surface.ts +25 -43
  209. package/packages/media-track-studio/README.md +9 -0
  210. package/packages/media-track-studio/src/index.ts +23 -13
  211. package/packages/mimo-speech/README.md +1 -1
  212. package/packages/minimax-h3/README.md +1 -1
  213. package/packages/nano-banana/README.md +1 -1
  214. package/packages/narrative/README.md +23 -1
  215. package/packages/narrative/src/identity.ts +11 -0
  216. package/packages/narrative/src/index.ts +3 -0
  217. package/packages/narrative/src/schema.ts +28 -27
  218. package/packages/narrative/src/selection.ts +52 -0
  219. package/packages/narrative/src/types.ts +2 -0
  220. package/packages/package-loader-node/README.md +30 -0
  221. package/packages/package-loader-node/package.json +5 -2
  222. package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
  223. package/packages/package-loader-node/src/index.ts +1 -0
  224. package/packages/package-loader-node/src/loader.ts +12 -15
  225. package/packages/package-loader-node/src/location.ts +27 -1
  226. package/packages/package-loader-node/src/module-scope.ts +183 -0
  227. package/packages/package-loader-node/src/types.ts +4 -0
  228. package/packages/performance/README.md +83 -0
  229. package/packages/performance/package.json +30 -0
  230. package/packages/performance/src/activation.ts +11 -0
  231. package/packages/performance/src/component.ts +46 -0
  232. package/packages/performance/src/index.ts +6 -0
  233. package/packages/performance/src/manifest.ts +53 -0
  234. package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
  235. package/packages/performance/src/program.ts +51 -0
  236. package/packages/performance/src/style.ts +35 -0
  237. package/packages/performance/src/surface.ts +99 -0
  238. package/packages/performance-studio/README.md +25 -0
  239. package/packages/performance-studio/package.json +21 -0
  240. package/packages/performance-studio/src/activation.ts +6 -0
  241. package/packages/performance-studio/src/index.ts +84 -0
  242. package/packages/program-space/README.md +9 -18
  243. package/packages/program-space/src/activation.ts +1 -5
  244. package/packages/program-space/src/index.ts +2 -11
  245. package/packages/program-space/src/surface.ts +1 -20
  246. package/packages/project-context-node/README.md +20 -0
  247. package/packages/project-context-node/package.json +10 -0
  248. package/packages/project-context-node/src/index.ts +3 -0
  249. package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
  250. package/packages/provider-hyperframes-local/README.md +43 -15
  251. package/packages/provider-hyperframes-local/src/activation.ts +4 -3
  252. package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
  253. package/packages/provider-hyperframes-local/src/capture.ts +96 -26
  254. package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
  255. package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
  256. package/packages/provider-hyperframes-local/src/options.ts +2 -0
  257. package/packages/provider-hyperframes-local/src/program.ts +6 -3
  258. package/packages/provider-hyperframes-local/src/progress.ts +53 -0
  259. package/packages/provider-hyperframes-local/src/provider.ts +18 -5
  260. package/packages/provider-hyperframes-local/src/render.ts +48 -7
  261. package/packages/provider-hypihub/README.md +48 -17
  262. package/packages/provider-hypihub/package.json +2 -0
  263. package/packages/provider-hypihub/src/mapping.ts +31 -7
  264. package/packages/provider-hypihub/src/oauth.ts +6 -0
  265. package/packages/provider-hypihub/src/provider.ts +25 -13
  266. package/packages/provider-hypihub/src/routes.ts +1 -2
  267. package/packages/provider-hypihub/src/upload.ts +2 -0
  268. package/packages/provider-media-local/README.md +3 -4
  269. package/packages/provider-whisperx-local/README.md +57 -0
  270. package/packages/provider-whisperx-local/src/program.ts +1 -0
  271. package/packages/provider-whisperx-local/src/provider.ts +3 -0
  272. package/packages/ranking/README.md +8 -6
  273. package/packages/ranking/package.json +1 -1
  274. package/packages/ranking/src/component.ts +6 -6
  275. package/packages/ranking/src/fragment.ts +11 -7
  276. package/packages/ranking/src/manifest.ts +21 -14
  277. package/packages/ranking/src/render.ts +33 -35
  278. package/packages/ranking/src/schedule.ts +16 -19
  279. package/packages/ranking/src/surface.ts +12 -13
  280. package/packages/ranking-studio/README.md +29 -0
  281. package/packages/ranking-studio/package.json +8 -3
  282. package/packages/ranking-studio/src/index.ts +71 -12
  283. package/packages/render-hyperframes/README.md +7 -7
  284. package/packages/render-hyperframes/package.json +1 -1
  285. package/packages/render-hyperframes/src/component.ts +11 -1
  286. package/packages/render-hyperframes/src/fragment.ts +7 -4
  287. package/packages/render-hyperframes/src/manifest.ts +4 -4
  288. package/packages/render-hyperframes/src/surface.ts +6 -6
  289. package/packages/runtime/README.md +8 -1
  290. package/packages/runtime/src/catalog.ts +2 -0
  291. package/packages/runtime/src/execution.ts +15 -4
  292. package/packages/runtime/src/index.ts +2 -1
  293. package/packages/runtime/src/log.ts +51 -0
  294. package/packages/runtime/src/types.ts +5 -8
  295. package/packages/runtime-host-node/README.md +30 -0
  296. package/packages/runtime-host-node/package.json +1 -0
  297. package/packages/runtime-host-node/src/index.ts +25 -9
  298. package/packages/runtime-host-node/src/packages.ts +47 -50
  299. package/packages/runtime-kit/README.md +5 -0
  300. package/packages/runtime-kit/src/index.ts +3 -1
  301. package/packages/runtime-local/README.md +111 -4
  302. package/packages/runtime-local/src/config.ts +202 -56
  303. package/packages/runtime-local/src/control.ts +9 -1
  304. package/packages/runtime-local/src/executor.ts +66 -0
  305. package/packages/runtime-local/src/host.ts +37 -17
  306. package/packages/runtime-local/src/log.ts +48 -0
  307. package/packages/runtime-local/src/programs.ts +41 -25
  308. package/packages/runtime-local/src/result-writer.ts +2 -0
  309. package/packages/runtime-local/src/runtime.ts +10 -6
  310. package/packages/runtime-local/src/supervisor.ts +142 -0
  311. package/packages/runtime-local/src/types.ts +9 -2
  312. package/packages/runtime-local/src/worker-process.ts +7 -24
  313. package/packages/runtime-local/src/worker.ts +55 -83
  314. package/packages/screen-overlay/README.md +3 -3
  315. package/packages/screen-overlay/package.json +1 -1
  316. package/packages/screen-overlay/src/component.ts +3 -3
  317. package/packages/screen-overlay/src/fragment.ts +5 -4
  318. package/packages/screen-overlay/src/manifest.ts +7 -6
  319. package/packages/screen-overlay/src/program.ts +9 -9
  320. package/packages/screen-overlay/src/surface.ts +6 -7
  321. package/packages/script/README.md +37 -2
  322. package/packages/script/src/edit.ts +123 -73
  323. package/packages/script/src/lexical.ts +40 -6
  324. package/packages/script/src/manifest.ts +2 -2
  325. package/packages/script/src/narrative.ts +1 -0
  326. package/packages/script/src/parser.ts +36 -8
  327. package/packages/script/src/surface.ts +4 -3
  328. package/packages/script/src/types.ts +5 -1
  329. package/packages/script-studio/package.json +9 -3
  330. package/packages/script-studio/src/index.ts +2 -0
  331. package/packages/script-studio/src/projection.ts +105 -0
  332. package/packages/seedance/README.md +30 -1
  333. package/packages/seedance/src/index.ts +18 -7
  334. package/packages/seedance/src/surface.ts +17 -4
  335. package/packages/seedance-kits/README.md +10 -2
  336. package/packages/seedance-kits/kits/speaker-v1.svs +5 -5
  337. package/packages/seedream/README.md +1 -1
  338. package/packages/sound/README.md +81 -0
  339. package/packages/sound/package.json +25 -0
  340. package/packages/sound/src/activation.ts +11 -0
  341. package/packages/sound/src/component.ts +28 -0
  342. package/packages/sound/src/index.ts +5 -0
  343. package/packages/sound/src/manifest.ts +47 -0
  344. package/packages/sound/src/program.ts +84 -0
  345. package/packages/sound/src/style.ts +34 -0
  346. package/packages/sound/src/surface.ts +90 -0
  347. package/packages/sound-studio/README.md +22 -0
  348. package/packages/sound-studio/package.json +20 -0
  349. package/packages/sound-studio/src/activation.ts +6 -0
  350. package/packages/sound-studio/src/index.ts +74 -0
  351. package/packages/speech/README.md +2 -2
  352. package/packages/speech-alignment/src/align.ts +45 -21
  353. package/packages/speech-alignment/src/local.ts +8 -0
  354. package/packages/speech-alignment/src/locate.ts +1 -1
  355. package/packages/store-sqlite/README.md +7 -0
  356. package/packages/store-sqlite/src/store.ts +84 -83
  357. package/packages/studio/INSPECTOR.md +117 -0
  358. package/packages/studio/README.md +149 -14
  359. package/packages/studio/package.json +8 -7
  360. package/packages/studio/src/build-library.ts +99 -84
  361. package/packages/studio/src/companion-assembly.ts +1 -0
  362. package/packages/studio/src/domain.ts +1 -1
  363. package/packages/studio/src/fallback-companions.ts +3 -3
  364. package/packages/studio/src/feedback-server.ts +51 -0
  365. package/packages/studio/src/feedback-store.ts +66 -0
  366. package/packages/studio/src/feedback.ts +60 -0
  367. package/packages/studio/src/library-media.ts +19 -0
  368. package/packages/studio/src/parameter-values.ts +83 -1
  369. package/packages/studio/src/parameters.ts +132 -43
  370. package/packages/studio/src/preview/render.ts +5 -1
  371. package/packages/studio/src/preview/runtime-shim.ts +49 -3
  372. package/packages/studio/src/programme.ts +14 -30
  373. package/packages/studio/src/server.ts +66 -34
  374. package/packages/studio/src/shared.ts +24 -8
  375. package/packages/studio/src/snapshot.ts +21 -132
  376. package/packages/studio/src/studio-preflight.ts +3 -3
  377. package/packages/studio/src/studio-registry.ts +72 -6
  378. package/packages/studio/src/style.css +342 -190
  379. package/packages/studio/src/temporal-edit.ts +131 -0
  380. package/packages/studio/src/ui/artifact-name.ts +80 -0
  381. package/packages/studio/src/ui/artifact-preview.ts +99 -0
  382. package/packages/studio/src/ui/comments.ts +233 -0
  383. package/packages/studio/src/ui/icons.ts +10 -1
  384. package/packages/studio/src/ui/library.ts +373 -192
  385. package/packages/studio/src/ui/main.ts +291 -110
  386. package/packages/studio/src/ui/material-preview.ts +1 -1
  387. package/packages/studio/src/ui/overlay.ts +31 -26
  388. package/packages/studio/src/ui/scrub-preview.ts +108 -0
  389. package/packages/studio/src/ui/sidebar-panel.ts +31 -0
  390. package/packages/studio/src/ui/stage.ts +188 -9
  391. package/packages/studio/src/ui/timeline.ts +187 -281
  392. package/packages/studio/start.ts +19 -5
  393. package/packages/studio-adapter/README.md +151 -11
  394. package/packages/studio-adapter/src/index.ts +126 -14
  395. package/packages/temporal/README.md +6 -6
  396. package/packages/temporal/package.json +1 -1
  397. package/packages/temporal/src/component.ts +5 -6
  398. package/packages/temporal/src/index.ts +8 -6
  399. package/packages/temporal/src/location.ts +11 -11
  400. package/packages/temporal/src/projection.ts +19 -19
  401. package/packages/temporal/src/rational.ts +4 -4
  402. package/packages/temporal-markup/EDITING.md +183 -0
  403. package/packages/temporal-markup/README.md +31 -11
  404. package/packages/temporal-markup/package.json +1 -1
  405. package/packages/temporal-markup/src/index.ts +20 -25
  406. package/packages/temporal-markup/src/space.ts +10 -41
  407. package/packages/timeline/README.md +31 -0
  408. package/packages/{semantic-track → timeline}/package.json +1 -1
  409. package/packages/timeline/src/activation.ts +8 -0
  410. package/packages/timeline/src/component.ts +24 -0
  411. package/packages/timeline/src/identity.ts +60 -0
  412. package/packages/timeline/src/index.ts +6 -0
  413. package/packages/{semantic-track → timeline}/src/location.ts +20 -20
  414. package/packages/timeline/src/manifest.ts +39 -0
  415. package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
  416. package/packages/timeline/src/types.ts +24 -0
  417. package/packages/timeline-author/README.md +68 -0
  418. package/packages/{speech-track → timeline-author}/package.json +6 -4
  419. package/packages/timeline-author/src/activation.ts +22 -0
  420. package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
  421. package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
  422. package/packages/timeline-author/src/index.ts +7 -0
  423. package/packages/timeline-author/src/manifest.ts +78 -0
  424. package/packages/timeline-author/src/program.ts +107 -0
  425. package/packages/timeline-author/src/surface.ts +46 -0
  426. package/packages/timeline-author/src/types.ts +6 -0
  427. package/packages/typography-track/README.md +4 -4
  428. package/packages/typography-track/package.json +1 -1
  429. package/packages/typography-track/src/component.ts +4 -4
  430. package/packages/typography-track/src/fragment.ts +4 -3
  431. package/packages/typography-track/src/manifest.ts +11 -9
  432. package/packages/typography-track/src/program.ts +15 -15
  433. package/packages/typography-track/src/surface.ts +17 -18
  434. package/packages/typography-track-studio/package.json +8 -3
  435. package/packages/typography-track-studio/src/index.ts +5 -1
  436. package/packages/video-cli/README.md +16 -4
  437. package/packages/video-cli/package.json +2 -1
  438. package/packages/video-cli/src/creation.ts +25 -9
  439. package/packages/video-cli/src/index.ts +1 -1
  440. package/packages/video-cli/src/studio-distribution.ts +2 -1
  441. package/packages/volcengine-matting/README.md +3 -3
  442. package/packages/whisperx/README.md +8 -1
  443. package/packages/workspace/src/index.ts +2 -0
  444. package/packages/workspace-fs-node/README.md +4 -1
  445. package/packages/workspace-fs-node/src/workspace.ts +3 -1
  446. package/services/whisperx/README.md +14 -0
  447. package/services/whisperx/pyproject.toml +2 -0
  448. package/services/whisperx/uv.lock +20 -20
  449. package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
  450. package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
  451. package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
  452. package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
  453. package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
  454. package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
  455. package/packages/provider-kie/README.md +0 -134
  456. package/packages/provider-kie/package.json +0 -43
  457. package/packages/provider-kie/src/activation.ts +0 -71
  458. package/packages/provider-kie/src/index.ts +0 -10
  459. package/packages/provider-kie/src/mapping.ts +0 -182
  460. package/packages/provider-kie/src/provider.ts +0 -657
  461. package/packages/provider-kie/src/routes.ts +0 -150
  462. package/packages/provider-xiaomi-mimo/README.md +0 -32
  463. package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
  464. package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
  465. package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
  466. package/packages/runtime/src/environment.ts +0 -6
  467. package/packages/semantic-track/README.md +0 -21
  468. package/packages/semantic-track/src/activation.ts +0 -8
  469. package/packages/semantic-track/src/component.ts +0 -24
  470. package/packages/semantic-track/src/identity.ts +0 -58
  471. package/packages/semantic-track/src/index.ts +0 -6
  472. package/packages/semantic-track/src/manifest.ts +0 -38
  473. package/packages/semantic-track/src/types.ts +0 -26
  474. package/packages/speech-track/README.md +0 -51
  475. package/packages/speech-track/src/activation.ts +0 -19
  476. package/packages/speech-track/src/index.ts +0 -7
  477. package/packages/speech-track/src/manifest.ts +0 -73
  478. package/packages/speech-track/src/program.ts +0 -64
  479. package/packages/speech-track/src/surface.ts +0 -35
  480. package/packages/speech-track/src/types.ts +0 -6
  481. package/packages/speech-track-studio/README.md +0 -3
  482. package/packages/speech-track-studio/package.json +0 -14
  483. package/packages/speech-track-studio/src/activation.ts +0 -7
  484. package/packages/speech-track-studio/src/index.ts +0 -40
  485. /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
  486. /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
@@ -1,11 +1,12 @@
1
+ import { timelineTypes } from "@hypit/timeline";
1
2
  import { temporalContextAttributeVocabulary } from "@hypit/temporal-markup";
2
3
  import { compositionDependency, compositionTypes } from "@hypit/composition";
3
4
  import { mediaDependency, mediaTypes } from "@hypit/media";
4
5
  import { narrativeDependency } from "@hypit/narrative";
5
- import { programSpaceDependency, programSpaceTypes } from "@hypit/program-space";
6
+
6
7
  import { blobRefObjectSchema } from "@hypit/protocol";
7
8
  import type { ModuleManifest, ProducerRef, TypeRef, ValueSchema } from "@hypit/protocol";
8
- import { semanticTrackDependency } from "@hypit/semantic-track";
9
+ import { timelineDependency } from "@hypit/timeline";
9
10
  import { temporalDependency, temporalTypes } from "@hypit/temporal";
10
11
  import { temporalWindowAttributeVocabulary } from "@hypit/temporal-markup";
11
12
 
@@ -68,7 +69,7 @@ export const audioTrackProgramSchema: ValueSchema = object({
68
69
 
69
70
  const baseInputs = [
70
71
  { name: "set", type: audioTrackTypes.set }, { name: "header", type: audioTrackTypes.header },
71
- { name: "space", type: programSpaceTypes.programSpace }, { name: "media", type: mediaTypes.synchronized },
72
+ { name: "timeline", type: timelineTypes.track }, { name: "media", type: mediaTypes.synchronized },
72
73
  { name: "spec", type: audioTrackTypes.clipSpec }, { name: "window", type: temporalTypes.window },
73
74
  ] as const;
74
75
 
@@ -76,20 +77,20 @@ export const audioTrackMarkupSurfaces = [{
76
77
  name: "track", tag: "Track", mode: "structured",
77
78
  outputs: [audioTrackTypes.header, audioTrackTypes.clipSpec, temporalTypes.instantSpec, temporalTypes.windowSpec, temporalTypes.instant, temporalTypes.window, audioTrackTypes.program, compositionTypes.audioTrack],
78
79
  vocabulary: {
79
- summary: "One Audio Track: explicitly prepared audio Clips placed on the selected film time axis and lowered to one ordinary peer AudioTrack.",
80
+ summary: "One Audio Track: explicitly prepared audio Items placed on the selected film time axis and lowered to one ordinary peer AudioTrack.",
80
81
  attributes: [
81
- { name: "id", kind: "identifier", required: true, summary: "Names this Audio Track and prefixes the identity of every Clip that does not name itself." },
82
+ { name: "id", kind: "identifier", required: true, summary: "Names this Audio Track and prefixes the identity of every Item that does not name itself." },
82
83
  ...temporalContextAttributeVocabulary,
83
84
  ],
84
85
  children: [
85
- { tag: "Clip", cardinality: "many",
86
+ { tag: "Item", cardinality: "many",
86
87
  summary: "Places one SynchronizedMedia source on an exact program window with its own trim, occupancy and mix.",
87
88
  attributes: [
88
89
  { name: "id", kind: "identifier", required: false,
89
- summary: "Names this Clip; the Track derives `<track>.clip.<index>` when it is absent." },
90
+ summary: "Names this Item; the Track derives `<track>.item.<index>` when it is absent." },
90
91
  { name: "source", kind: "reference", required: true,
91
92
  accepts: [mediaTypes.synchronized],
92
- summary: "Selects the explicitly prepared audio this Clip plays." },
93
+ summary: "Selects the explicitly prepared audio this Item plays." },
93
94
  ...temporalWindowAttributeVocabulary,
94
95
  { name: "trim-start", kind: "literal", required: false,
95
96
  summary: "Sets the source start position; defaults to the source beginning." },
@@ -103,7 +104,7 @@ export const audioTrackMarkupSurfaces = [{
103
104
  { name: "max-rate", kind: "literal", required: false,
104
105
  summary: "Bounds the fastest rate bounded stretch may use." },
105
106
  { name: "gain", kind: "literal", required: false,
106
- summary: "Scales this Clip by a linear gain; defaults to `1`." },
107
+ summary: "Scales this Item by a linear gain; defaults to `1`." },
107
108
  { name: "fade-in", kind: "literal", required: false,
108
109
  summary: "Fixes the exact fade-in length; defaults to `0f`." },
109
110
  { name: "fade-out", kind: "literal", required: false,
@@ -112,15 +113,15 @@ export const audioTrackMarkupSurfaces = [{
112
113
  ],
113
114
  ports: [
114
115
  { name: "program", type: audioTrackTypes.program, summary: "The resolved sample-exact item list this Track renders from." },
115
- { name: "track", type: compositionTypes.audioTrack, summary: "The rendered AudioTrack that Film composes with its peers." },
116
+ { name: "audio", type: compositionTypes.audioTrack, summary: "The rendered AudioTrack that Film composes with its peers." },
116
117
  ],
117
- example: `<audio:Track id="music-bed" semantic={speech.semantic}>
118
- <audio:Clip source={music-media.media} during="program"
118
+ example: `<audio:Track id="music-bed" timeline={speech.timeline}>
119
+ <audio:Item source={music-media.media} during="program"
119
120
  playback="loop-end" gain="0.28" fade-in="600ms" fade-out="800ms"/>
120
121
  </audio:Track>`,
121
122
  notes: [
122
- "A Track requires at least one Clip, and neither a Track nor a Clip accepts text content.",
123
- "A Clip states exactly one window form: `during`, `at` with `for`, `until` with `for`, or `start` with `end`.",
123
+ "A Track requires at least one Item, and neither a Track nor a Item accepts text content.",
124
+ "A Item states exactly one window form: `during`, `at` with `for`, `until` with `for`, or `start` with `end`.",
124
125
  "A point expression is `program.start`, `program.end`, `selection.start`, `selection.end`, `segment.start`, `segment.end` or `moment.cue`, each optionally offset by `+` or `-` and a duration, or a bare duration read as an absolute position.",
125
126
  "Bind selection, segment and/or moment only when the start/end expressions use them; different endpoints can use different bindings.",
126
127
  "`min-rate` and `max-rate` are rejected unless `playback` is `stretch`.",
@@ -133,7 +134,7 @@ export const audioTrackManifest: ModuleManifest = {
133
134
  format: "hypit.module@1",
134
135
  name: audioTrackModuleRef.name,
135
136
  version: audioTrackModuleRef.version,
136
- dependencies: [mediaDependency, narrativeDependency, programSpaceDependency, semanticTrackDependency, temporalDependency, compositionDependency],
137
+ dependencies: [mediaDependency, narrativeDependency, timelineDependency, temporalDependency, compositionDependency],
137
138
  types: [
138
139
  { name: audioTrackTypes.header.name },
139
140
  { name: audioTrackTypes.clipSpec.name },
@@ -145,7 +146,7 @@ export const audioTrackManifest: ModuleManifest = {
145
146
  { name: audioTrackProducers.createSet.name, inputs: [], outputs: [{ name: "set", type: audioTrackTypes.set }], needs: [] },
146
147
  { name: audioTrackProducers.appendItem.name, inputs: [...baseInputs], outputs: [{ name: "set", type: audioTrackTypes.set }], needs: [] },
147
148
  { name: audioTrackProducers.finalize.name, inputs: [{ name: "set", type: audioTrackTypes.set }, { name: "header", type: audioTrackTypes.header }], outputs: [{ name: "program", type: audioTrackTypes.program }], needs: [] },
148
- { name: audioTrackProducers.render.name, inputs: [{ name: "space", type: programSpaceTypes.programSpace }, { name: "program", type: audioTrackTypes.program }], outputs: [{ name: "track", type: compositionTypes.audioTrack }], needs: [] },
149
+ { name: audioTrackProducers.render.name, inputs: [{ name: "timeline", type: timelineTypes.track }, { name: "program", type: audioTrackTypes.program }], outputs: [{ name: "track", type: compositionTypes.audioTrack }], needs: [] },
149
150
  ],
150
151
  };
151
152
  export const audioTrackDependency = { module: audioTrackModuleRef } as const;
@@ -1,13 +1,9 @@
1
+ import type { Timeline } from "@hypit/timeline";
1
2
  import { assertAudioTrackIdentity, sealAudioTrack } from "@hypit/composition";
2
3
  import type { AudioClip, AudioTrack } from "@hypit/composition";
3
4
  import { synchronizedMediaSampleFrames, verifySynchronizedMedia } from "@hypit/media";
4
5
  import type { SynchronizedMedia } from "@hypit/media";
5
- import {
6
- assertProgramSpaceIdentity,
7
- programFrameSampleBoundary,
8
- programSpaceSampleFrames,
9
- } from "@hypit/program-space";
10
- import type { ProgramSpace } from "@hypit/program-space";
6
+ import { assertProgramSpaceIdentity, programFrameSampleBoundary, programSpaceSampleFrames } from "@hypit/program-space";
11
7
  import { canonicalize, isResourceId } from "@hypit/protocol";
12
8
  import { assertTemporalWindowFor, temporalDurationInSamples } from "@hypit/temporal";
13
9
  import type { ProjectedWindow, TemporalDuration } from "@hypit/temporal";
@@ -94,23 +90,23 @@ function sourceFacts(media: SynchronizedMedia): AudioItemProgram["source"] {
94
90
  function realizedItems(
95
91
  set: AudioTrackSet,
96
92
  header: AudioTrackHeader,
97
- space: ProgramSpace,
93
+ timeline: Timeline,
98
94
  media: SynchronizedMedia,
99
95
  spec: AudioClipSpec,
100
96
  window: ProjectedWindow,
101
97
  ): AudioTrackSet {
102
98
  assertAudioTrackSet(set);
103
99
  assertAudioTrackHeader(header);
104
- assertProgramSpaceIdentity(space);
100
+ assertProgramSpaceIdentity(timeline);
105
101
  assertAudioClipSpec(spec);
106
- assertTemporalWindowFor(window, { subjectId: spec.id, space });
102
+ assertTemporalWindowFor(window, { subjectId: spec.id, space: timeline });
107
103
  const source = sourceFacts(media);
108
- const trimStart = spec.trim.start === undefined ? 0 : temporalDurationInSamples(spec.trim.start, space);
109
- const trimEnd = spec.trim.end === undefined ? source.sampleFrames : temporalDurationInSamples(spec.trim.end, space);
104
+ const trimStart = spec.trim.start === undefined ? 0 : temporalDurationInSamples(spec.trim.start, timeline);
105
+ const trimEnd = spec.trim.end === undefined ? source.sampleFrames : temporalDurationInSamples(spec.trim.end, timeline);
110
106
  assert(trimStart >= 0 && trimStart < source.sampleFrames, `Audio Clip ${spec.id} trim start is outside its source.`);
111
107
  assert(trimEnd > trimStart && trimEnd <= source.sampleFrames, `Audio Clip ${spec.id} trim end is outside its source.`);
112
- const fadeInSamples = temporalDurationInSamples(spec.mix.fadeIn, space);
113
- const fadeOutSamples = temporalDurationInSamples(spec.mix.fadeOut, space);
108
+ const fadeInSamples = temporalDurationInSamples(spec.mix.fadeIn, timeline);
109
+ const fadeOutSamples = temporalDurationInSamples(spec.mix.fadeOut, timeline);
114
110
  const addition = {
115
111
  id: window.id,
116
112
  subjectId: spec.id,
@@ -129,12 +125,12 @@ function realizedItems(
129
125
  export function appendProjectedAudioItem(
130
126
  set: AudioTrackSet,
131
127
  header: AudioTrackHeader,
132
- space: ProgramSpace,
128
+ timeline: Timeline,
133
129
  media: SynchronizedMedia,
134
130
  spec: AudioClipSpec,
135
131
  window: ProjectedWindow,
136
132
  ): AudioTrackSet {
137
- return realizedItems(set, header, space, media, spec, window);
133
+ return realizedItems(set, header, timeline, media, spec, window);
138
134
  }
139
135
 
140
136
  function normalizeProgram(value: AudioTrackProgram): AudioTrackProgram {
@@ -183,9 +179,9 @@ export function assertAudioTrackProgram(value: AudioTrackProgram): void {
183
179
  }
184
180
  }
185
181
 
186
- function terminalClip(item: AudioItemProgram, space: ProgramSpace): AudioClip {
187
- const windowStart = programFrameSampleBoundary(space, item.window.startFrame, 48_000);
188
- const windowEnd = programFrameSampleBoundary(space, item.window.endFrameExclusive, 48_000);
182
+ function terminalClip(item: AudioItemProgram, timeline: Timeline): AudioClip {
183
+ const windowStart = programFrameSampleBoundary(timeline, item.window.startFrame, 48_000);
184
+ const windowEnd = programFrameSampleBoundary(timeline, item.window.endFrameExclusive, 48_000);
189
185
  const windowLength = windowEnd - windowStart;
190
186
  const effectiveLength = item.trim.endSampleExclusive - item.trim.startSample;
191
187
  let targetStart = windowStart;
@@ -237,18 +233,18 @@ function terminalClip(item: AudioItemProgram, space: ProgramSpace): AudioClip {
237
233
  };
238
234
  }
239
235
 
240
- export function renderAudioTrack(space: ProgramSpace, program: AudioTrackProgram): AudioTrack {
241
- assertProgramSpaceIdentity(space);
236
+ export function renderAudioTrack(timeline: Timeline, program: AudioTrackProgram): AudioTrack {
237
+ assertProgramSpaceIdentity(timeline);
242
238
  assertAudioTrackProgram(program);
243
- const totalSamples = programSpaceSampleFrames(space, 48_000);
239
+ const totalSamples = programSpaceSampleFrames(timeline, 48_000);
244
240
  const track = sealAudioTrack({
245
- programSpaceId: space.id,
241
+ programSpaceId: timeline.id,
246
242
  id: program.id,
247
- clips: program.items.map((item) => terminalClip(item, space)),
243
+ clips: program.items.map((item) => terminalClip(item, timeline)),
248
244
  });
249
245
  for (const clip of track.clips) {
250
- assert(clip.target.endSampleExclusive <= totalSamples, `Audio Clip ${clip.id} is outside ProgramSpace.`);
246
+ assert(clip.target.endSampleExclusive <= totalSamples, `Audio Clip ${clip.id} is outside Timeline.`);
251
247
  }
252
- assertAudioTrackIdentity(track, space);
248
+ assertAudioTrackIdentity(track, timeline);
253
249
  return track;
254
250
  }
@@ -1,4 +1,4 @@
1
- import { createTemporalSpace, resolveTemporalContext } from "@hypit/temporal-markup";
1
+ import { resolveTemporalContext } from "@hypit/temporal-markup";
2
2
  import { mediaTypes } from "@hypit/media";
3
3
  import type {
4
4
  StructuredElement,
@@ -85,8 +85,10 @@ function numeric(element: StructuredElement, name: string, fallback?: number): n
85
85
  return value;
86
86
  }
87
87
 
88
+ export const audioItemDefaults = { playback: "once", gain: 1, "fade-in": "0f", "fade-out": "0f" } as const;
89
+
88
90
  function occupancy(element: StructuredElement): AudioOccupancy {
89
- switch (text(element, "playback", "once")) {
91
+ switch (text(element, "playback", audioItemDefaults.playback)) {
90
92
  case "once":
91
93
  case "once-start": return { mode: "once", align: "start" };
92
94
  case "once-end": return { mode: "once", align: "end" };
@@ -104,10 +106,9 @@ function occupancy(element: StructuredElement): AudioOccupancy {
104
106
  }
105
107
 
106
108
  export const decodeAudioTrackSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
107
- allowed(element, ["id", "semantic", "space"]);
109
+ allowed(element, ["id", "timeline"]);
108
110
  const id = text(element, "id");
109
111
  const context = resolveTemporalContext({ element, resolveReference });
110
- const time = createTemporalSpace({ id: id, element, ...context });
111
112
  const headerId = `${id}.header`;
112
113
  const records: SurfaceRecordDraft[] = [{
113
114
  id: headerId,
@@ -115,20 +116,20 @@ export const decodeAudioTrackSurface: StructuredSurfaceHandler = ({ element, res
115
116
  value: { kind: "inline", value: sealAudioTrackHeader({ id }) },
116
117
  range: element.range,
117
118
  }];
118
- const temporalComponents: SurfaceComponentDraft[] = [...time.components];
119
- const temporalFragments: ReturnType<typeof createTemporalWindowProjection>["fragments"][number][] = [...time.fragments];
119
+ const temporalComponents: SurfaceComponentDraft[] = [];
120
+ const temporalFragments: ReturnType<typeof createTemporalWindowProjection>["fragments"][number][] = [];
120
121
  const fragmentItems: Parameters<typeof createAudioTrackFragment>[0][number][] = [];
121
122
  const inputs: Record<string, { kind: "record"; id: string } | { kind: "component-output"; component: string; output: string }> = {
122
123
  header: { kind: "record", id: headerId },
123
- space: time.space.ref,
124
+ timeline: context.timeline.ref,
124
125
  };
125
126
  let itemIndex = 0;
126
127
  for (const child of element.children) {
127
128
  if (child.kind === "text") {
128
- if (child.value.trim()) throw new Error(`${element.name} accepts only Clip children.`);
129
+ if (child.value.trim()) throw new Error(`${element.name} accepts only Item children.`);
129
130
  continue;
130
131
  }
131
- if (!child.name.endsWith(":Clip") && child.name !== "Clip") throw new Error(`${element.name} accepts only Clip children.`);
132
+ if (!child.name.endsWith(":Item") && child.name !== "Item") throw new Error(`${element.name} accepts only Item children.`);
132
133
  if (child.children.some((node) => node.kind === "element" || node.value.trim())) throw new Error(`${child.name} must be empty.`);
133
134
  allowed(child, [
134
135
  "id", "source", ...temporalWindowAttributeNames,
@@ -136,9 +137,9 @@ export const decodeAudioTrackSurface: StructuredSurfaceHandler = ({ element, res
136
137
  ]);
137
138
  itemIndex += 1;
138
139
  const suffix = String(itemIndex).padStart(4, "0");
139
- const clipId = optionalText(child, "id") ?? `${id}.clip.${suffix}`;
140
+ const clipId = optionalText(child, "id") ?? `${id}.item.${suffix}`;
140
141
  const source = resolved(child.attributes.source, `${child.name}.source`, mediaTypes.synchronized, resolveReference);
141
- const temporal = createTemporalWindowProjection({ id: clipId, element: child, ...context, space: time.space, resolveReference });
142
+ const temporal = createTemporalWindowProjection({ id: clipId, element: child, ...context, resolveReference });
142
143
  records.push(...temporal.records);
143
144
  temporalComponents.push(...temporal.components);
144
145
  temporalFragments.push(...temporal.fragments);
@@ -155,22 +156,22 @@ export const decodeAudioTrackSurface: StructuredSurfaceHandler = ({ element, res
155
156
  },
156
157
  occupancy: playback,
157
158
  mix: {
158
- gain: numeric(child, "gain", 1),
159
- fadeIn: duration(text(child, "fade-in", "0f"), `${child.name}.fade-in`),
160
- fadeOut: duration(text(child, "fade-out", "0f"), `${child.name}.fade-out`),
159
+ gain: numeric(child, "gain", audioItemDefaults.gain),
160
+ fadeIn: duration(text(child, "fade-in", audioItemDefaults["fade-in"]), `${child.name}.fade-in`),
161
+ fadeOut: duration(text(child, "fade-out", audioItemDefaults["fade-out"]), `${child.name}.fade-out`),
161
162
  },
162
163
  });
163
164
  const windowName = `item-${suffix}-window`;
164
165
  inputs[windowName] = temporal.ref;
165
166
  const mediaName = `item-${suffix}-media`;
166
167
  const specName = `item-${suffix}-spec`;
167
- const specId = `${id}.clip.${suffix}.spec`;
168
+ const specId = `${id}.item.${suffix}.spec`;
168
169
  records.push({ id: specId, type: audioTrackTypes.clipSpec, value: { kind: "inline", value: clipSpec }, range: child.range });
169
170
  inputs[mediaName] = source.ref;
170
171
  inputs[specName] = { kind: "record", id: specId };
171
172
  fragmentItems.push({ mediaName, specName, windowName });
172
173
  }
173
- if (fragmentItems.length === 0) throw new Error(`${element.name} requires at least one Clip.`);
174
+ if (fragmentItems.length === 0) throw new Error(`${element.name} requires at least one Item.`);
174
175
  const fragment = createAudioTrackFragment(fragmentItems);
175
176
  return {
176
177
  records,
@@ -178,10 +179,10 @@ export const decodeAudioTrackSurface: StructuredSurfaceHandler = ({ element, res
178
179
  id,
179
180
  fragment: fragment.id,
180
181
  inputs,
181
- outputs: { program: `${id}.program`, track: `${id}.track` },
182
+ outputs: { program: `${id}.program`, audio: `${id}.audio` },
182
183
  range: element.range,
183
184
  }],
184
185
  fragments: [...temporalFragments, fragment],
185
- exports: [`${id}.program`, `${id}.track`],
186
+ exports: [`${id}.program`, `${id}.audio`],
186
187
  };
187
188
  };
@@ -1,3 +1,26 @@
1
1
  # `@hypit/audio-track-studio`
2
2
 
3
3
  Hypit Studio Companion for `@hypit/audio-track`. The domain package does not depend on this package.
4
+
5
+ Each Item has a title and waveform body. An explicit author `id` supplies its
6
+ title; otherwise the Companion displays the exact `source` reference. Display
7
+ names do not replace the Item's identity or writeback endpoint. This is the same
8
+ rule as Media Items. For example, `id="soundtrack" source={music.media}` shows
9
+ `soundtrack`; omitting the id shows `music.media`. Here `.media` is the source
10
+ output port, not an Audio-specific name suffix.
11
+
12
+ When groups placement, source trim, playback rates and fades. How contains gain.
13
+ Gain displays as a percentage (0–6400%) and writes back as a scalar; duration controls preserve their authored `f`, `ms` or `s` unit.
14
+ Omitted gain and fade defaults remain editable; the first edit writes an explicit
15
+ attribute. Playback uses the standard parameter controls and saves when editing ends. Stretch also
16
+ asks for minimum and maximum rate multipliers (1 means original speed). Switching
17
+ to once/loop removes these bounds in the same edit. The Surface retains final
18
+ validation of positive, ordered rates. No arbitrary bounds are supplied for the author.
19
+
20
+ The Companion declares a schema-described `attributes` group. Studio provides
21
+ record alternatives, completion hints and grouped source serialization without knowing
22
+ any Audio mode names.
23
+
24
+ Selecting an overlapping Item raises it in the editing lane while all sounds
25
+ continue to mix. Timing gestures use the same temporal projection bindings as
26
+ Media Track.
@@ -1,8 +1,8 @@
1
- import { audioTrackModuleRef, audioTrackTypes } from "@hypit/audio-track";
1
+ import { audioItemDefaults, audioTrackModuleRef, audioTrackTypes } from "@hypit/audio-track";
2
2
  import type { AudioTrackProgram } from "@hypit/audio-track";
3
3
  import { compositionTypes } from "@hypit/composition";
4
4
  import type { StudioTrackCompanion, StudioTrackCompanionContext, StudioEntityDraft } from "@hypit/studio-adapter";
5
- import { artifactPreview, childEntities, previewLayer, requiredSurfaceValue, temporalLineageFor, temporalSemanticSource } from "@hypit/studio-adapter";
5
+ import { artifactPreview, authoredItemTitle, childEntities, previewLayer, requiredSurfaceValue, temporalLineageFor, temporalSemanticSource } from "@hypit/studio-adapter";
6
6
 
7
7
  function projectAudio(context: StudioTrackCompanionContext): readonly StudioEntityDraft[] {
8
8
  const program = requiredSurfaceValue(context, "program") as AudioTrackProgram;
@@ -21,7 +21,10 @@ function projectAudio(context: StudioTrackCompanionContext): readonly StudioEnti
21
21
  const semanticSource = temporalSemanticSource(temporal);
22
22
  return {
23
23
  ...entity,
24
- display: { ...entity.display, layers: [previewLayer(item.preview, "waveform")] },
24
+ display: {
25
+ title: authoredItemTitle(context, entity.authoredId, item.sourceTypes, ["source"]),
26
+ layers: [previewLayer(item.preview, "waveform")],
27
+ },
25
28
  ...(semanticSource?.id === undefined
26
29
  ? {}
27
30
  : { markerId: semanticSource.id }),
@@ -39,31 +42,42 @@ export const audioTrackStudioTrackCompanions: readonly StudioTrackCompanion[] =
39
42
  { name: "source" },
40
43
  { name: "trim-start", writable: true },
41
44
  { name: "trim-end", writable: true },
42
- { name: "playback", writable: true },
43
- { name: "min-rate", writable: true },
44
- { name: "max-rate", writable: true },
45
- { name: "gain", writable: true },
46
- { name: "fade-in", writable: true },
47
- { name: "fade-out", writable: true },
45
+ { name: "playback-settings", writable: true,
46
+ attributes: ["playback", "min-rate", "max-rate"],
47
+ fallback: { playback: audioItemDefaults.playback },
48
+ schema: { kind: "oneOf", variants: ["once", "once-start", "once-end", "loop", "loop-start", "loop-end", "stretch"].map(mode => ({
49
+ kind: "object", fields: {
50
+ playback: { schema: { kind: "literal", value: mode } },
51
+ ...(mode === "stretch" ? {
52
+ "min-rate": { schema: { kind: "number", minimum: 0, maximum: 100 } },
53
+ "max-rate": { schema: { kind: "number", minimum: 0, maximum: 100 } },
54
+ } : {}),
55
+ },
56
+ })) },
57
+ },
58
+ { name: "gain", writable: true, fallback: audioItemDefaults.gain },
59
+ { name: "fade-in", writable: true, fallback: audioItemDefaults["fade-in"] },
60
+ { name: "fade-out", writable: true, fallback: audioItemDefaults["fade-out"] },
48
61
  ],
49
62
  inspector: [
50
63
  {
51
- binding: "playback", label: "Playback", domain: "how",
64
+ binding: "playback-settings", label: "Playback", domain: "when",
52
65
  page: { id: "playback", label: "Playback" }, section: { id: "playback", label: "Playback" },
53
- control: "select", options: ["once", "once-start", "once-end", "loop", "loop-start", "loop-end", "stretch"],
66
+ control: "record",
67
+ summary: "Rates are multipliers (1 = original speed). Stretch requires both rate bounds.",
54
68
  },
55
69
  ...(["trim-start", "trim-end"] as const).map((binding) => ({
56
- binding, label: binding === "trim-start" ? "Trim Start" : "Trim End", domain: "how" as const,
57
- page: { id: "playback", label: "Playback" }, section: { id: "trim", label: "Trim" }, control: "text" as const,
58
- })),
59
- ...(["min-rate", "max-rate", "gain"] as const).map((binding) => ({
60
- binding, label: binding === "min-rate" ? "Minimum Rate" : binding === "max-rate" ? "Maximum Rate" : "Gain",
61
- domain: "how" as const, page: { id: "mix", label: "Mix" }, section: { id: "mix", label: "Mix" },
62
- control: "number" as const,
70
+ binding, label: binding === "trim-start" ? "Trim Start" : "Trim End", domain: "when" as const,
71
+ page: { id: "playback", label: "Playback" }, section: { id: "trim", label: "Trim" }, control: "number" as const,
72
+ number: { suffixes: ["ms", "s", "f"], minimum: 0 },
63
73
  })),
74
+ { binding: "gain", label: "Gain", domain: "how",
75
+ page: { id: "mix", label: "Mix" }, section: { id: "mix", label: "Mix" },
76
+ control: "number", unit: "%", number: { scale: 100, minimum: 0, maximum: 6400, step: 1 } },
64
77
  ...(["fade-in", "fade-out"] as const).map((binding) => ({
65
78
  binding, label: binding === "fade-in" ? "Fade In" : "Fade Out", domain: "when" as const,
66
- page: { id: "fade", label: "Fade" }, section: { id: "fade", label: "Fade" }, control: "text" as const,
79
+ page: { id: "fade", label: "Fade" }, section: { id: "fade", label: "Fade" }, control: "number" as const,
80
+ number: { suffixes: ["ms", "s", "f"], minimum: 0 },
67
81
  })),
68
82
  ],
69
83
  requiredValues: ["program"], project: projectAudio,
@@ -4,7 +4,7 @@ Small public framework API for an Author Package.
4
4
 
5
5
  It joins four stable authoring boundaries: nominal Module declarations, deterministic component
6
6
  handlers, sealed Graph Fragments and Markup Surface handlers. Domain facts still come from their
7
- owners—for example `@hypit/composition`, `@hypit/semantic-track` and `@hypit/spatial`. This package
7
+ owners—for example `@hypit/composition`, `@hypit/timeline` and `@hypit/spatial`. This package
8
8
  does not re-export the video vocabulary or turn those packages into one central object.
9
9
 
10
10
  `@hypit/hypit/author-kit` contains no registry, package search, installer, Runtime, Provider or Studio
@@ -12,13 +12,10 @@ Use it for a product, portrait or graphic that will be composited over another p
12
12
  image Output. `{cutout.image}` publishes one image BlobArtifact with transparency. Keep its actual
13
13
  dimensions when placing it in Media Track, or use Image Compose when a flattened still is wanted.
14
14
 
15
- The package declares the visual operation; the selected Endpoint implements it. The existing
16
- `@hypit/provider-kie` route uses
17
- [KIE Recraft Remove Background](https://docs.kie.ai/market/recraft/remove-background), sending
18
- `model: "recraft/remove-background"` and `input.image`. It follows the ordinary submit, poll and
19
- collect lifecycle and expects one image result. Another Provider can fulfill the same capability
20
- without changing the Source. This operation therefore needs no separate Recraft-specific author
21
- Model to use the existing KIE implementation.
15
+ The package declares the visual operation; a project Provider implements the capability
16
+ `@hypit/background-removal@1#remove-background`, accepting `{ source: BlobRef }` and returning one
17
+ image BlobRef with transparency. The Provider owns its service's request mapping and task lifecycle.
18
+ A service-specific author Model is unnecessary when the operation has this same meaning.
22
19
 
23
20
  For a moving portrait, [Volcengine Matting](../volcengine-matting/README.md) provides
24
21
  `<matte:Portrait source={performance.video}/>` through HypiHub. Normalize its processed video
@@ -10,6 +10,6 @@
10
10
  "dependencies": {
11
11
  "@puppeteer/browsers": "3.2.2",
12
12
  "puppeteer-core": "25.10.0",
13
- "sharp": "0.35.3"
13
+ "sharp": "0.35.4"
14
14
  }
15
15
  }
@@ -0,0 +1,69 @@
1
+ # `@hypit/build-result`
2
+
3
+ Build Results retain accepted public Outputs and the attempt's final outcome. Execution state belongs
4
+ to Runtime. A Result records which value satisfied each Output; a new Output record does not imply a
5
+ new media file.
6
+
7
+ ## Values and file ownership
8
+
9
+ | Value source | Persisted representation |
10
+ | --- | --- |
11
+ | New Resource without an existing durable address | One file owned by this Build |
12
+ | Explicit Workspace file | `external-file` with the Workspace's URI |
13
+ | Resource from an earlier Result | `build-file` with its original `build` and `path` |
14
+ | Entire earlier public Output | `build-output` pointing to its terminal Build and Output |
15
+ | Composite value | A Value Document whose Resource bindings follow the same rules at every depth |
16
+
17
+ A local `build-file` omits `build` when its owner is the containing Result. When imported into another
18
+ Build, its owner becomes explicit. Arrays and nested objects do not change ownership: a new Composite
19
+ can save new structure while referencing old video, audio and images. Only newly produced Resources
20
+ get new files. The encoder recognizes Resource values, independently of their domain Type or field name.
21
+
22
+ An `external-file` stays live. Replacing that file changes subsequent reads; deleting it leaves an
23
+ unavailable dependency. The stored size describes the file when admitted; `describeFile` and public
24
+ Output resolution obtain its current size. Readers use the explicit address without searching for
25
+ alternatives or comparing file contents.
26
+
27
+ ## Passing references through execution
28
+
29
+ Workspace attachments may supply a `location` URI. The Node compiler preserves it, and the CLI maps
30
+ these addresses and explicitly imported Result files to the compilation's Resource identities. It
31
+ passes that map as `BuildResultSeed.resourceReferences` alongside whole-Output `forwards`.
32
+
33
+ The Result writer keeps this per-Build map in its private writer state while publishing. It uses the
34
+ map for both direct Resource Outputs and all nested Resource bindings. Persistent Output documents
35
+ contain the references they actually use; private writer state is removed at the terminal outcome.
36
+ Core still receives ordinary typed Records, Candidates and Resource identities. It has no knowledge
37
+ of file paths or Result repositories. Runtime may stage input bytes for execution independently of
38
+ Result publication.
39
+
40
+ Repositories own address access. `describeFile` obtains metadata and `openFile` streams bytes or a byte
41
+ range. The filesystem and S3 implementations accept `ExternalFileAccess` for external addresses; the
42
+ Node default opens Workspace `file:` URIs. A custom adapter can supply a different address reader.
43
+ Selecting S3 for Result storage does not implicitly upload external file dependencies.
44
+
45
+ `fileReferenceIdentity` identifies the explicit URI or owning Build and path. Studio uses this identity
46
+ to group multiple uses of a file. Separate files remain separate even when their bytes happen to match.
47
+
48
+ An explicit `hypit get` export collects the selected Output's referenced bytes into its destination.
49
+ Composite exports rewrite bindings to local files, including references with different owners but the
50
+ same relative filename. This makes that export self-contained; ordinary Build publication preserves
51
+ references. Moving editable projects also requires preserving or updating their external file addresses.
52
+
53
+ Published Outputs can carry an optional author `displayName` for browsers such as Studio.
54
+ It is presentation text only: Output names, forwarding and file ownership do not change.
55
+
56
+ `updatePresentation` accepts `outputDisplayNames`, keyed by exact public Output name. Each
57
+ nonempty string sets that Output’s `displayName`; null removes it. Like title and note editing,
58
+ this applies to finished Results and preserves all values, file references and Output identifiers.
59
+
60
+ ## Execution evidence
61
+
62
+ A finished manifest may contain `executionLog`, an ordinary Result file reference separate from
63
+ `outputs`. `BuildResultWriter.finish({ executionLog, outcome, ... })` accepts a byte stream. Repositories
64
+ preserve it as `execution.jsonl` before the terminal manifest is published. The filesystem and S3
65
+ implementations use the same interface. Repeating an already completed finish does not rewrite it.
66
+
67
+ This file describes how the Build ran; it is neither an authored Output nor a gallery asset. Consumers
68
+ read it with `openFile(build, manifest.executionLog)`. Its absence means no log was recorded, including
69
+ Results made before logging was available; readers do not reconstruct history from other projects.
@@ -8,6 +8,7 @@
8
8
  ".": "./src/index.ts"
9
9
  },
10
10
  "dependencies": {
11
- "@hypit/protocol": "workspace:*"
11
+ "@hypit/protocol": "workspace:*",
12
+ "koffi": "3.2.1"
12
13
  }
13
14
  }
@@ -70,14 +70,9 @@ function resultPath(value: unknown, subject: string): string {
70
70
 
71
71
  function outputValue(value: unknown, subject: string): BuildResultOutputValue {
72
72
  const item = object(value, subject);
73
- if (item.kind === "build-file") {
73
+ if (item.kind === "build-file" || item.kind === "external-file") {
74
74
  assertBuildResultFileRef(item, subject);
75
- return {
76
- kind: "build-file",
77
- path: item.path,
78
- size: item.size,
79
- mediaType: item.mediaType,
80
- };
75
+ return { ...item };
81
76
  }
82
77
  if (item.kind === "build-output") {
83
78
  return {
@@ -106,6 +101,7 @@ function outputs(value: unknown, subject: string): Readonly<Record<string, Build
106
101
  text(name, `${subject} Output name`);
107
102
  const item = object(value, `${subject}[${JSON.stringify(name)}]`);
108
103
  return [name, {
104
+ ...(item.displayName === undefined ? {} : { displayName: text(item.displayName, `${subject}.displayName`) }),
109
105
  type: typeRef(item.type, `${subject}[${JSON.stringify(name)}].type`),
110
106
  value: outputValue(item.value, `${subject}[${JSON.stringify(name)}].value`),
111
107
  }] as const;
@@ -206,6 +202,7 @@ export function decodeBuildResultManifest(
206
202
  throw new Error(`${subject} must be either unfinished or have both outcome and finishedAt`);
207
203
  }
208
204
  const failure = optionalString(item.failure, `${subject}.failure`);
205
+ if (item.executionLog !== undefined) assertBuildResultFileRef(item.executionLog, `${subject}.executionLog`);
209
206
  return {
210
207
  format: "hypit.build-result@1",
211
208
  id,
@@ -219,6 +216,7 @@ export function decodeBuildResultManifest(
219
216
  ...(outcome === undefined ? {} : { outcome }),
220
217
  ...(failure === undefined ? {} : { failure }),
221
218
  outputs: outputs(item.outputs, `${subject}.outputs`),
219
+ ...(item.executionLog === undefined ? {} : { executionLog: item.executionLog }),
222
220
  ...(item.operations === undefined ? {} : { operations: operationReceipts(item.operations, `${subject}.operations`) }),
223
221
  };
224
222
  }
@@ -255,7 +253,7 @@ export function decodeBuildResultWriterState(
255
253
  if (logicalOutputs.has(output)) throw new Error(`${subject} publishes Logical Output ${output} more than once`);
256
254
  names.add(name);
257
255
  logicalOutputs.add(output);
258
- return { name, output };
256
+ return { name, output, ...(published.displayName === undefined ? {} : { displayName: text(published.displayName, `${subject}.displayName`) }) };
259
257
  });
260
258
  const forwardedOutputs = new Set<string>();
261
259
  const forwards = item.forwards.map((value, index) => {
@@ -270,6 +268,12 @@ export function decodeBuildResultWriterState(
270
268
  };
271
269
  });
272
270
  return {
271
+ ...(item.resourceReferences === undefined ? {} : { resourceReferences: Object.fromEntries(
272
+ Object.entries(object(item.resourceReferences, `${subject}.resourceReferences`)).map(([resource, reference]) => {
273
+ assertBuildResultFileRef(reference, `${subject}.resourceReferences.${resource}`);
274
+ return [resource, reference];
275
+ }),
276
+ ) }),
273
277
  resources: pathMap(item.resources, `${subject}.resources`),
274
278
  values: pathMap(item.values, `${subject}.values`),
275
279
  publishedOutputs,
@@ -0,0 +1,17 @@
1
+ import type { BuildResultFileRef } from "./types.js";
2
+
3
+ /** Execution evidence is a Result file, not an authored Output or generated asset. */
4
+ export async function preserveExecutionLog(
5
+ chunks: AsyncIterable<Uint8Array> | undefined,
6
+ write: (path: string, chunks: AsyncIterable<Uint8Array>, mediaType: string) => Promise<void>,
7
+ ): Promise<BuildResultFileRef | undefined> {
8
+ if (chunks === undefined) return undefined;
9
+ let size = 0;
10
+ const counted = (async function* () {
11
+ for await (const chunk of chunks) { size += chunk.byteLength; yield chunk; }
12
+ })();
13
+ const path = "execution.jsonl";
14
+ const mediaType = "application/x-ndjson";
15
+ await write(path, counted, mediaType);
16
+ return { kind: "build-file", path, size, mediaType };
17
+ }