@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,6 +1,6 @@
1
1
  import { createReadStream } from "node:fs";
2
2
  import { mkdtemp, readFile, rm } from "node:fs/promises";
3
- import { availableParallelism, tmpdir } from "node:os";
3
+ import { tmpdir } from "node:os";
4
4
  import { join } from "node:path";
5
5
  import type { EndpointInvocationContext } from "@hypit/endpoint-kit";
6
6
  import { stageHyperframesProject } from "@hypit/hyperframes/project";
@@ -14,16 +14,23 @@ import type { HyperframesExecutionOptions } from "./options.js";
14
14
  import { assert, positiveInteger } from "./process.js";
15
15
  import { runCaptureProcess } from "./capture-process.js";
16
16
  import { finished } from "node:stream/promises";
17
+ import { autoWorkerLimit } from "./concurrency.js";
17
18
 
18
19
  export type HyperframesRenderProgress =
20
+ | { readonly phase: "staging" | "encoding" | "storing"; readonly elapsedMs: number }
21
+ | { readonly phase: "decoding"; readonly completed: number; readonly total: number; readonly elapsedMs: number }
22
+ | { readonly phase: "worker-progress"; readonly worker: number; readonly completed: number; readonly elapsedMs: number }
19
23
  | { readonly phase: "prepared"; readonly workers: number; readonly sourceFrames: number; readonly elapsedMs: number }
20
- | { readonly phase: "worker-initializing" | "worker-start" | "worker-complete"; readonly worker: number; readonly range: MediaFrameRange;
24
+ | { readonly phase: "worker-initializing" | "worker-start"; readonly worker: number; readonly range: MediaFrameRange;
25
+ readonly browserPid: number | undefined; readonly elapsedMs: number }
26
+ | { readonly phase: "worker-complete"; readonly worker: number; readonly completed: number;
21
27
  readonly browserPid: number | undefined; readonly elapsedMs: number }
22
28
  | { readonly phase: "complete"; readonly frames: number; readonly elapsedMs: number };
23
29
 
24
30
  export type RenderHyperframesVisualOptions = HyperframesExecutionOptions & {
25
31
  readonly resources: EndpointInvocationContext["resources"];
26
32
  readonly signal?: AbortSignal;
33
+ readonly onDiagnostic?: (diagnostic: import("@hypit/runtime").ExecutionDiagnostic) => Promise<void>;
27
34
  readonly onProgress?: (event: HyperframesRenderProgress) => void;
28
35
  };
29
36
 
@@ -36,7 +43,8 @@ export function resolveExecutionOptions(options: HyperframesExecutionOptions) {
36
43
  const browserGpu = options.browserGpu ?? "hardware";
37
44
  assert(["auto", "software", "hardware"].includes(browserGpu), "HyperFrames browserGpu is invalid");
38
45
  return {
39
- workers: workers === "auto" ? Math.min(4, Math.max(1, Math.floor(availableParallelism() / 2))) : workers,
46
+ workers,
47
+ maxWorkers: workers === "auto" ? positiveInteger(options.maxWorkers ?? autoWorkerLimit(), "maxWorkers") : workers,
40
48
  quality, browserGpu,
41
49
  ffmpegPath: options.ffmpegPath ?? "ffmpeg",
42
50
  ffprobePath: options.ffprobePath ?? "ffprobe",
@@ -52,6 +60,11 @@ export function resolveExecutionOptions(options: HyperframesExecutionOptions) {
52
60
  };
53
61
  }
54
62
 
63
+ /** Same deterministic reservation for Runtime admission and the capture attempt. */
64
+ export function renderWorkerLimit(config: ReturnType<typeof resolveExecutionOptions>, frameCount: number, fps: number): number {
65
+ return Math.min(config.maxWorkers, config.workers === "auto" ? Math.max(1, Math.ceil(frameCount / fps)) : frameCount);
66
+ }
67
+
55
68
  /** Execute one attempt. Its deadline includes resource preparation and output storage. */
56
69
  export async function renderHyperframesVisual(
57
70
  request: HyperframesVisualRequest,
@@ -61,14 +74,32 @@ export async function renderHyperframesVisual(
61
74
  const config = resolveExecutionOptions(options);
62
75
  const { document } = request;
63
76
  const range = request.range ?? { startFrame: 0, endFrameExclusive: document.frameCount };
77
+ const frameCount = range.endFrameExclusive - range.startFrame;
64
78
  const controller = new AbortController();
65
79
  const signal = options.signal === undefined ? controller.signal : AbortSignal.any([controller.signal, options.signal]);
66
80
  const started = performance.now();
81
+ let phaseStarted = started;
67
82
  let phase = "preparing resources";
68
83
  const timer = setTimeout(() => controller.abort(new Error(`HyperFrames render timed out during ${phase}`)), config.processTimeoutMs);
69
84
  let work: string | undefined;
85
+ const diagnostics: Promise<void>[] = [];
86
+ const diagnostic = (message: string) => {
87
+ if (options.onDiagnostic === undefined) return;
88
+ const pending = options.onDiagnostic({ level: "info", message });
89
+ diagnostics.push(pending);
90
+ void pending.catch(() => {});
91
+ };
92
+ const changePhase = (next: string) => {
93
+ const now = performance.now();
94
+ diagnostic(`${phase}: ${Math.round(now - phaseStarted)} ms`);
95
+ phaseStarted = now;
96
+ phase = next;
97
+ };
70
98
  try {
71
99
  signal.throwIfAborted();
100
+ await options.onDiagnostic?.({ level: "info", message:
101
+ `Render ${frameCount} frames; workers ${config.workers} (limit ${renderWorkerLimit(config, frameCount, document.frameRate.numerator / document.frameRate.denominator)}); opaque fast PNG; quality ${config.quality}; GPU ${config.browserGpu}; encoder ${config.ffmpegPath}` });
102
+ options.onProgress?.({ phase: "staging", elapsedMs: 0 });
72
103
  work = await mkdtemp(join(tmpdir(), "hypit-hyperframes-local-"));
73
104
  await stageHyperframesProject({ document, directory: work, signal,
74
105
  read: async (artifact, readSignal) => {
@@ -82,13 +113,20 @@ export async function renderHyperframesVisual(
82
113
  ffprobePath: config.ffprobePath, processTimeoutMs: config.processTimeoutMs,
83
114
  maxProbeOutputBytes: config.maxProcessOutputBytes, signal: probeSignal! }),
84
115
  });
85
- phase = "rendering frames";
116
+ changePhase("decoding source frames");
86
117
  await runCaptureProcess({ document, range, config, directory: work,
87
118
  engineModule: import.meta.resolve("@hyperframes/engine"),
88
119
  producerModule: import.meta.resolve("@hyperframes/producer"),
89
- }, signal, (event) => options.onProgress?.({ ...event, elapsedMs: Math.round(performance.now() - started) }));
120
+ }, signal, (event) => {
121
+ if (event.phase === "prepared") changePhase("starting browsers");
122
+ if (event.phase === "worker-start" && phase === "starting browsers") changePhase("capturing frames");
123
+ if (event.phase === "encoding") changePhase("encoding and verifying video");
124
+ options.onProgress?.({ ...event, elapsedMs: Math.round(performance.now() - started) });
125
+ },
126
+ undefined, options.onDiagnostic);
90
127
  signal.throwIfAborted();
91
- phase = "storing output";
128
+ changePhase("storing output");
129
+ options.onProgress?.({ phase: "storing", elapsedMs: Math.round(performance.now() - started) });
92
130
  const output = join(work, "visual.mp4");
93
131
  let artifact;
94
132
  if (isStreamingResourceStore(options.resources)) {
@@ -100,7 +138,9 @@ export async function renderHyperframesVisual(
100
138
  artifact = await options.resources.put(await readFile(output, { signal }), "video/mp4", { signal });
101
139
  }
102
140
  signal.throwIfAborted();
103
- const frameCount = range.endFrameExclusive - range.startFrame;
141
+
142
+ changePhase("complete");
143
+ await Promise.all(diagnostics);
104
144
  options.onProgress?.({ phase: "complete", frames: frameCount, elapsedMs: Math.round(performance.now() - started) });
105
145
  return sealRenderedVisual({ frameRate: document.frameRate, frameCount, canvas: document.canvas, artifact });
106
146
  } catch (error) {
@@ -110,5 +150,6 @@ export async function renderHyperframesVisual(
110
150
  } finally {
111
151
  clearTimeout(timer);
112
152
  if (work !== undefined) await rm(work, { recursive: true, force: true });
153
+ await Promise.all(diagnostics);
113
154
  }
114
155
  }
@@ -1,17 +1,26 @@
1
1
  # `@hypit/provider-hypihub`
2
2
 
3
3
  Thin Hypit Runtime Provider for a HypiHub deployment. It is an optional default gateway for
4
- paid generation and WhisperX alignment requests; callers may keep their own Provider and select HypiHub only
5
- when its OAuth login is configured.
4
+ paid generation and WhisperX alignment requests. Select it for a chosen HypiHub account, with OAuth
5
+ or an API key in the configured Credential Store; other Providers remain ordinary Profile choices.
6
6
 
7
- It maps the currently shipped image/video model capabilities to HypiHub, including image edits and
7
+ `doctor` is read-only. If a stored OAuth access token needs refresh, it reports that account access
8
+ and refresh validity remain unchecked; it does not rotate credentials or conclude that their Store
9
+ is read-only. Authorized execution and pricing reads retain the normal refresh-and-persist path.
10
+ An actual refresh rejection calls for reconnecting the selected account.
11
+
12
+ Its mapping table declares the image/video/speech model capabilities it implements, including image edits and
8
13
  image-to-video first-frame inputs, submits jobs, polls them, downloads the first-class assets and
9
14
  admits them into the current Build's working byte area. Image references use HypiHub's documented
10
15
  `reference_images` object shape (`[{ "url": "…" }]`); video references use the public
11
- `reference_image_urls`, `reference_videos`, and `reference_audios` fields (with `ref_video_url`
12
- for one video). First/last-frame images use `first_frame` and `last_frame`.
16
+ `reference_image_urls`, `reference_videos`, and `reference_audios` fields. A single reference video
17
+ remains in `reference_videos`; `ref_video_url` is reserved for a model's source-video port. First/last-frame images use `first_frame` and `last_frame`.
18
+
19
+ Seedance 2.5 (`@hypit/seedance` model `2.5`) maps to `bytedance/seedance-2-5` and supports
20
+ `480p`, `720p` and `1080p`. The Provider passes the authored `resolution` to `POST /v1/videos`;
21
+ omitting it in the Seedance Surface defaults to `720p`.
13
22
 
14
- The current HypiHub GPT Image 2 route exposes the same request surface as its KIE upstream:
23
+ The current HypiHub GPT Image 2 route has these service-specific limits:
15
24
 
16
25
  | Resolution | Ratios unavailable at this Endpoint | `background` |
17
26
  | --- | --- | --- |
@@ -19,10 +28,14 @@ The current HypiHub GPT Image 2 route exposes the same request surface as its KI
19
28
  | `2K` | `5:4`, `4:5`, `3:1`, `1:3`, `9:21` | omit |
20
29
  | `4K` | `3:1`, `1:3`, `9:21` | omit |
21
30
 
22
- HypiHub owns this support check independently: it neither imports the KIE Provider nor narrows the
23
- GPT Image model package. When the service surface changes, this Provider can change without changing
31
+ HypiHub owns this support check independently: it leaves the GPT Image model package unchanged. When the service surface changes, this Provider can change without changing
24
32
  the model or another Provider.
25
33
 
34
+ Model identity is preserved across input modes: Seedream 5 Lite references use the Lite image-edit
35
+ route, and Grok 1.5 Preview remains the Preview model. A deployment's current catalogue may offer
36
+ newer models or omit one implemented here. Availability and unsupported-input errors retain their
37
+ service explanation; they do not imply expired credentials or authorize substituting another model.
38
+
26
39
  For moving portraits, [Volcengine Matting](../volcengine-matting/README.md) maps
27
40
  `@hypit/volcengine-matting@1#matte-portrait-video` to `POST /v1/videos` with
28
41
  `model: "matte-portrait-video"`, `ref_video_url` and `format` (`WEBM` by default, or `MOV`).
@@ -31,8 +44,8 @@ references; the returned job uses the same polling and asset collection lifecycl
31
44
  account's `/v1/models` establishes availability. The processed video enters ordinary Normalize,
32
45
  then either semantic alignment for a Script performance or Media Track for B-roll.
33
46
 
34
- The existing [Background Removal](../background-removal/README.md) package handles single images
35
- through KIE Recraft. This Provider does not bind that separate image capability either.
47
+ [Background Removal](../background-removal/README.md) declares a separate single-image capability.
48
+ This Provider does not currently implement it; select a project Provider for that operation.
36
49
 
37
50
  Runtime Profile example:
38
51
 
@@ -64,8 +77,16 @@ Resources are uploaded through a session from `POST /v1/files/uploads`, followed
64
77
  regional multipart instructions returned by HypiHub. The Provider follows the server-selected part
65
78
  size and part concurrency, retries a failed part with a fresh signed URL, completes or cancels that
66
79
  one upload, and then passes the returned HTTPS URL to generation or transcription. One
67
- Resource identity is uploaded once within one Runtime operation. Hypit keeps no upload catalog or
68
- cross-Build cache. Embedded callers may replace this transport with `publicAssetUrl`.
80
+ Resource identity with the same declared person-reference classification is uploaded once within one Runtime operation. Hypit keeps no upload catalog or
81
+ cross-Build cache. Seedance visual references can carry `personReference` in their media fields;
82
+ the mapping declares it as a resource-transport field and the upload session receives
83
+ `is_person_reference`, preserving true, false and omission. It stays out of the generation body.
84
+ HypiHub stores the authored classification and prepares the applicable upstream person reference;
85
+ this Provider does not detect faces or select an upstream private-avatar group.
86
+
87
+ Embedded callers may replace transport with `publicAssetUrl(artifact, resources, fields)`. That
88
+ callback receives the declared resource fields and must preserve any required service preparation,
89
+ such as uploading a marked person reference through HypiHub before returning its URL.
69
90
 
70
91
  OAuth login stores the access token, refresh token and expiry as one opaque credential value. The
71
92
  browser callback only confirms that authorization returned to the CLI; the CLI reports success after
@@ -87,13 +108,23 @@ catalog to verify configured capabilities; ordinary preflight never makes that r
87
108
  declares HypiHub's public pricing page, `https://hypit.ai/commercial/pricing/`, as its price source.
88
109
  For each selected Need, `readPricing` resolves the corresponding HypiHub model and returns the service's
89
110
  authenticated `GET /v1/pricing?model=<model>` response unchanged together with that URL. It covers
90
- generation, alignment, Voice Design, and Voice Clone through the same mechanism;
111
+ generation, alignment, Voice Design and Voice Clone through the same mechanism;
91
112
  the Provider does not maintain a second list of billing formulas or calculate a request total.
92
113
 
93
- HypiHub declares MiMo Voice Design and Voice Clone together with every other capability it serves; it
94
- never hides one. Voice Design produces an accepted voice-reference Resource, and Voice Clone uses
95
- that reference to produce independent speech. Hypit does not expose MiMo preset voices. When another
96
- selected Endpoint offers the same capability (a local WhisperX or the official MiMo
114
+ The Provider declares its implemented speech capabilities alongside image, video and alignment.
115
+ Voice Design produces an accepted voice-reference Resource, and Voice Clone uses that
116
+ reference to produce independent speech. All of them use `POST /v1/audio/speech`:
117
+
118
+ | Package | Capability | HypiHub model | Request fields |
119
+ | --- | --- | --- | --- |
120
+ | `@hypit/mimo-speech` | `mimo-v2.5-tts-voicedesign` | `mimo-v2.5-tts-voicedesign` | `input`, `voice_description` |
121
+ | `@hypit/mimo-speech` | `mimo-v2.5-tts-voiceclone` | `mimo-v2.5-tts-voiceclone` | `input`, `reference_audio`, optional `prompt` |
122
+ | `@hypit/fishaudio-speech` | `voice-design-1` | `fishaudio/voice-design-1` | `input`, `voice_description` |
123
+ | `@hypit/fishaudio-speech` | `voice-clone` | `fishaudio/voice-clone` | `input`, `reference_audio`, constant `voice_description` title |
124
+ | `@hypit/elevenlabs-speech` | `eleven_ttv_v3` | `eleven_ttv_v3` | `input`, `voice_description` |
125
+
126
+ Each returned preview becomes one member of the audio set. These Model packages do not expose preset
127
+ voices. When another selected Endpoint offers the same capability (such as local WhisperX or a project-owned speech
97
128
  Provider), the Runtime Profile's `bindings` say which Endpoint serves it.
98
129
 
99
130
  Execution policy remains local to this Provider:
@@ -18,6 +18,8 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@hypit/driver-node": "workspace:*",
21
+ "@hypit/elevenlabs-speech": "workspace:*",
22
+ "@hypit/fishaudio-speech": "workspace:*",
21
23
  "@hypit/mimo-speech": "workspace:*",
22
24
  "@hypit/seedance": "workspace:*",
23
25
  "@hypit/speech": "workspace:*",
@@ -9,16 +9,18 @@ const SEEDREAM: ModuleRef = { name: "@hypit/seedream", version: "1" };
9
9
  const MINIMAX: ModuleRef = { name: "@hypit/minimax-h3", version: "1" };
10
10
  const GROK: ModuleRef = { name: "@hypit/grok-imagine", version: "1" };
11
11
  const MIMO_SPEECH: ModuleRef = { name: "@hypit/mimo-speech", version: "1" };
12
+ const FISHAUDIO_SPEECH: ModuleRef = { name: "@hypit/fishaudio-speech", version: "1" };
13
+ const ELEVENLABS_SPEECH: ModuleRef = { name: "@hypit/elevenlabs-speech", version: "1" };
12
14
 
13
15
  const seedance = (name: string, model: string): GenerationWireMapping => ({
14
16
  capability: { module: SEEDANCE, name }, result: "video", routes: [{ model }],
15
17
  fields: {
16
18
  prompt: { as: "value", field: "prompt" },
17
- referenceImage: { as: "urlArray", field: "reference_image_urls" },
18
- referenceVideo: { as: "urlArray", field: "reference_videos" },
19
+ referenceImage: { as: "urlArray", field: "reference_image_urls", resourceFields: ["personReference"] },
20
+ referenceVideo: { as: "urlArray", field: "reference_videos", resourceFields: ["personReference"] },
19
21
  referenceAudio: { as: "urlArray", field: "reference_audios" },
20
- firstFrame: { as: "url", field: "first_frame" },
21
- lastFrame: { as: "url", field: "last_frame" },
22
+ firstFrame: { as: "url", field: "first_frame", resourceFields: ["personReference"] },
23
+ lastFrame: { as: "url", field: "last_frame", resourceFields: ["personReference"] },
22
24
  resolution: { as: "value", field: "resolution" },
23
25
  aspectRatio: { as: "value", field: "aspect_ratio" },
24
26
  duration: { as: "value", field: "seconds" },
@@ -65,7 +67,7 @@ export const hypiHubMappings: readonly GenerationWireMapping[] = [
65
67
  })),
66
68
  {
67
69
  capability: { module: SEEDREAM, name: "seedream-5-lite" }, result: "image", routes: [
68
- { model: "seedream/5-pro-image-to-image", whenPresent: ["images"] },
70
+ { model: "seedream/5-lite-image-to-image", whenPresent: ["images"] },
69
71
  { model: "seedream/5-lite-text-to-image" },
70
72
  ],
71
73
  fields: {
@@ -108,8 +110,7 @@ export const hypiHubMappings: readonly GenerationWireMapping[] = [
108
110
  },
109
111
  {
110
112
  capability: { module: GROK, name: "grok-imagine-video-1.5-preview" }, result: "video", routes: [
111
- { model: "grok-imagine/image-to-video", whenPresent: ["images"] },
112
- { model: "grok-imagine/text-to-video" },
113
+ { model: "grok-imagine-video-1.5-preview" },
113
114
  ],
114
115
  fields: {
115
116
  prompt: { as: "value", field: "prompt" }, duration: { as: "value", field: "seconds" },
@@ -132,6 +133,29 @@ export const hypiHubMappings: readonly GenerationWireMapping[] = [
132
133
  voiceReference: { as: "urlArray", field: "reference_audio" },
133
134
  },
134
135
  },
136
+ {
137
+ capability: { module: FISHAUDIO_SPEECH, name: "voice-design-1" }, result: "audio", routes: [{ model: "fishaudio/voice-design-1" }],
138
+ fields: {
139
+ text: { as: "value", field: "input" },
140
+ voiceDescription: { as: "value", field: "voice_description" },
141
+ },
142
+ },
143
+ {
144
+ capability: { module: FISHAUDIO_SPEECH, name: "voice-clone" }, result: "audio", routes: [{ model: "fishaudio/voice-clone" }],
145
+ // Fish Audio titles its transient cloned voice; the title has no authored meaning.
146
+ constants: { voice_description: "reference" },
147
+ fields: {
148
+ text: { as: "value", field: "input" },
149
+ voiceReference: { as: "urlArray", field: "reference_audio" },
150
+ },
151
+ },
152
+ {
153
+ capability: { module: ELEVENLABS_SPEECH, name: "eleven_ttv_v3" }, result: "audio", routes: [{ model: "eleven_ttv_v3" }],
154
+ fields: {
155
+ text: { as: "value", field: "input" },
156
+ voiceDescription: { as: "value", field: "voice_description" },
157
+ },
158
+ },
135
159
  ];
136
160
 
137
161
  function capabilityKey(ref: CapabilityRef): string {
@@ -5,6 +5,12 @@ import { requestDeadline } from "@hypit/runtime-kit";
5
5
  const OAUTH_CLIENT_ID = "hyc_d5d5e8e7131b0c877756e66c";
6
6
  const REFRESH_SKEW_MS = 60_000;
7
7
 
8
+ /** Read-only diagnostics can identify expiry without attempting credential rotation. */
9
+ export function hypiHubCredentialNeedsRefresh(secret: string, now = Date.now()): boolean {
10
+ const expiresAt = decodeOAuth2Credential(secret)?.expiresAt;
11
+ return expiresAt !== undefined && expiresAt <= now + REFRESH_SKEW_MS;
12
+ }
13
+
8
14
  type OAuthTokenResponse = {
9
15
  readonly access_token?: unknown;
10
16
  readonly refresh_token?: unknown;
@@ -18,7 +18,7 @@ import type { WhisperXTranscriptResponse } from "@hypit/whisperx";
18
18
  import { hypiHubRouteForCapability, hypiHubRoutes } from "./routes.js";
19
19
  import { HypiHubUploader } from "./upload.js";
20
20
  import type { RuntimeDoctorDiagnostic } from "@hypit/runtime-kit";
21
- import { createHypiHubAuth } from "./oauth.js";
21
+ import { createHypiHubAuth, hypiHubCredentialNeedsRefresh } from "./oauth.js";
22
22
  import type { HypiHubAuth } from "./oauth.js";
23
23
 
24
24
  export const hypiHubProviderModuleRef = { name: "@hypit/provider-hypihub", version: "1" } as const;
@@ -45,7 +45,7 @@ export type CreateHypiHubProviderOptions = {
45
45
  readonly transcriptionModel?: string;
46
46
  readonly fetch?: typeof globalThis.fetch;
47
47
  /** Overrides HypiHub's negotiated upload transport for referenced Resources. */
48
- readonly publicAssetUrl?: (artifact: BlobRef, artifacts: ResourceStore) => Promise<string>;
48
+ readonly publicAssetUrl?: (artifact: BlobRef, artifacts: ResourceStore, fields?: Readonly<Record<string, string | number | boolean>>) => Promise<string>;
49
49
  };
50
50
 
51
51
  type Handle = { readonly contract: "hypit.hypihub-operation@1"; readonly jobId: string; readonly route: string; readonly startedAt: number };
@@ -69,7 +69,7 @@ function credential(credentials: Readonly<Record<string, EndpointCredential>>) {
69
69
  }
70
70
  function guidedMessage(error: unknown): string {
71
71
  const message = error instanceof Error ? error.message : String(error);
72
- return /API key is unavailable|HypiHub login is unavailable|HTTP (?:401|403|404)\b|not enabled for|model_not_found|no_capable_provider/iu.test(message)
72
+ return /API key is unavailable|HypiHub login is unavailable|HTTP 401\b/iu.test(message)
73
73
  ? `${message}. Sign in to HypiHub at https://hypit.ai with hypit auth login`
74
74
  : message;
75
75
  }
@@ -155,11 +155,14 @@ class HypiHubClient {
155
155
  }
156
156
  throw lastError instanceof Error ? lastError : new Error(String(lastError));
157
157
  }
158
- async upload(artifact: BlobRef, resources: ResourceStore, auth: HypiHubAuth): Promise<string> {
158
+ async upload(artifact: BlobRef, resources: ResourceStore, auth: HypiHubAuth, fields?: Readonly<Record<string, string | number | boolean>>): Promise<string> {
159
159
  const bytes = await resources.get(artifact.resource);
160
160
  assert(bytes !== undefined, `HypiHub reference artifact ${artifact.resource} is unavailable`);
161
161
  assert(bytes.byteLength === artifact.size, `HypiHub reference artifact ${artifact.resource} size differs`);
162
- return await this.uploader.upload({ bytes, mediaType: artifact.mediaType }, auth);
162
+ const personReference = fields?.personReference;
163
+ assert(personReference === undefined || typeof personReference === "boolean", "HypiHub personReference must be a boolean");
164
+ return await this.uploader.upload({ bytes, mediaType: artifact.mediaType,
165
+ ...(personReference === undefined ? {} : { isPersonReference: personReference }) }, auth);
163
166
  }
164
167
 
165
168
  async transcribe(body: Record<string, unknown>, auth: HypiHubAuth): Promise<Record<string, unknown>> {
@@ -300,6 +303,11 @@ export async function diagnoseHypiHubProvider(
300
303
  ): Promise<readonly RuntimeDoctorDiagnostic[]> {
301
304
  const apiKey = context.credentials.apiKey?.secret;
302
305
  assert(typeof apiKey === "string" && apiKey.length > 0, "HypiHub login is unavailable");
306
+ if (hypiHubCredentialNeedsRefresh(apiKey)) return [{
307
+ severity: "warning",
308
+ code: "HYPIHUB_OAUTH_REFRESH_UNCHECKED",
309
+ message: "The stored HypiHub access token needs refresh. Read-only doctor has not checked account access or refresh validity. Authorized execution can refresh through a writable Credential Store; reconnect if that refresh is rejected.",
310
+ }];
303
311
  const client = new HypiHubClient({
304
312
  baseUrl: apiBaseUrl(options.baseUrl ?? "https://hypit.ai/v1"),
305
313
  timeout: options.requestTimeoutMs ?? 30_000,
@@ -373,9 +381,9 @@ async function synthesizeAudio(client: HypiHubClient, context: EndpointInvocatio
373
381
  const route = hypiHubRouteForCapability(context.need.capability);
374
382
  assert(route !== undefined && route.media === "audio", "HypiHub does not implement this exact capability");
375
383
  const auth = authFor(context, client);
376
- const compiled = await route.compile(context.need.constraints, async (artifact) => publicAssetUrl === undefined
377
- ? await client.upload(artifact, context.resources, auth)
378
- : await publicAssetUrl(artifact, context.resources));
384
+ const compiled = await route.compile(context.need.constraints, async (artifact, fields) => publicAssetUrl === undefined
385
+ ? await client.upload(artifact, context.resources, auth, fields)
386
+ : await publicAssetUrl(artifact, context.resources, fields));
379
387
  await verifyModelRoute(client, auth, compiled.model, "audio_speech");
380
388
  const audio = await client.speech(auth, { model: compiled.model, ...(compiled.input as Record<string, unknown>) });
381
389
  const artifacts = await Promise.all(audio.map(async (item) => await context.resources.put(item.bytes, item.mediaType)));
@@ -390,13 +398,14 @@ function endpoint(client: HypiHubClient, pollIntervalMs: number, maxOperationMs:
390
398
  assert(route !== undefined, "HypiHub does not implement this exact capability");
391
399
  const auth = authFor(context, client);
392
400
  const uploaded = new Map<string, Promise<string>>();
393
- const resolve = (artifact: BlobRef): Promise<string> => {
394
- const existing = uploaded.get(artifact.resource);
401
+ const resolve = (artifact: BlobRef, fields?: Readonly<Record<string, string | number | boolean>>): Promise<string> => {
402
+ const key = JSON.stringify([artifact.resource, canonicalize(fields ?? {})]);
403
+ const existing = uploaded.get(key);
395
404
  if (existing !== undefined) return existing;
396
405
  const promise = publicAssetUrl === undefined
397
- ? client.upload(artifact, context.resources, auth)
398
- : publicAssetUrl(artifact, context.resources);
399
- uploaded.set(artifact.resource, promise);
406
+ ? client.upload(artifact, context.resources, auth, fields)
407
+ : publicAssetUrl(artifact, context.resources, fields);
408
+ uploaded.set(key, promise);
400
409
  return promise;
401
410
  };
402
411
  const compiled = await route.compile(context.need.constraints, resolve);
@@ -511,9 +520,11 @@ export function createHypiHubProvider(options: CreateHypiHubProviderOptions = {}
511
520
  assertWhisperXEvidenceWav(bytes, request.sampleFrames);
512
521
  const auth = authFor(context, client);
513
522
  await verifyModelRoute(client, auth, transcriptionModel, "transcriptions");
523
+ await context.reportProgress?.({ phase: "Preparing audio for hosted transcription" });
514
524
  const url = options.publicAssetUrl === undefined
515
525
  ? await client.upload(request.audio, context.resources, auth)
516
526
  : await options.publicAssetUrl(request.audio, context.resources);
527
+ await context.reportProgress?.({ phase: "Transcribing and aligning words" });
517
528
  const response = await client.transcribe({
518
529
  model: transcriptionModel,
519
530
  url,
@@ -524,6 +535,7 @@ export function createHypiHubProvider(options: CreateHypiHubProviderOptions = {}
524
535
  const evidence = sealAlignedTranscriptEvidence({
525
536
  passages: interpretWhisperXTranscript(response as WhisperXTranscriptResponse, request.sampleFrames),
526
537
  });
538
+ await context.reportProgress?.({ phase: "Word timing ready" });
527
539
  return { value: { kind: "inline", value: canonicalize(evidence) } };
528
540
  } catch (error) {
529
541
  throw new Error(guidedMessage(error), { cause: error });
@@ -117,8 +117,7 @@ function normalizeHypiHubRequest(
117
117
  ? (item as Record<string, unknown>).url : item).filter((item): item is string => typeof item === "string" && item.length > 0);
118
118
  if (urls.length > 0) input.reference_image_urls = urls;
119
119
  }
120
- if (Array.isArray(videoRefs) && videoRefs.length === 1) input.ref_video_url = videoRefs[0];
121
- else if (Array.isArray(videoRefs) && videoRefs.length > 1) input.reference_videos = videoRefs;
120
+ if (Array.isArray(videoRefs) && videoRefs.length > 0) input.reference_videos = videoRefs;
122
121
  if (Array.isArray(audioRefs) && audioRefs.length > 0) input.reference_audios = audioRefs;
123
122
  return { model: request.model, input: canonicalize(input) };
124
123
  }
@@ -70,6 +70,7 @@ export type HypiHubUploadInput = {
70
70
  readonly mediaType: string;
71
71
  readonly filename?: string;
72
72
  readonly purpose?: string;
73
+ readonly isPersonReference?: boolean;
73
74
  };
74
75
 
75
76
  type PartDeclaration = {
@@ -385,6 +386,7 @@ export class HypiHubUploader {
385
386
  bytes: input.bytes.byteLength,
386
387
  mime_type: input.mediaType,
387
388
  purpose: input.purpose ?? "reference",
389
+ ...(input.isPersonReference === undefined ? {} : { is_person_reference: input.isPersonReference }),
388
390
  sha256: digest,
389
391
  head_base64: Buffer.from(input.bytes.subarray(0, 512)).toString("base64"),
390
392
  }),
@@ -37,7 +37,7 @@ These are this FFmpeg implementation's intermediate encodings; Source and Track
37
37
  to use ordinary SynchronizedMedia. Transform currently emits opaque MP4, so perform trim/retime
38
38
  before matting when the resulting clip needs transparency.
39
39
 
40
- The result is ordinary SynchronizedMedia. Speech Track and Media Track consume its transparent
40
+ The result is ordinary SynchronizedMedia. Timeline assembly and Media Track consume its transparent
41
41
  picture through their existing visual outputs; choosing the A-roll or B-roll role belongs to the
42
42
  Source. Local HyperFrames extracts alpha-preserving PNGs and composites them against the authored
43
43
  Canvas and lower visual layers before encoding the final MP4.
@@ -53,6 +53,5 @@ programme-audio rendering and final muxing remain Build-only. This is declared p
53
53
  Runtime and Studio contain no media capability allowlist.
54
54
 
55
55
  Video-backed normalization is video-authoritative so an AAC packet tail cannot extend the program
56
- past its final picture. Audio-only normalization is audio-authoritative. The AWS Lambda media Provider
57
- must return the same public contracts and timing laws; Lambda is an execution topology, not another
58
- author meaning.
56
+ past its final picture. Audio-only normalization is audio-authoritative. Other implementations of these capabilities must preserve the same public values and timing laws;
57
+ a different execution topology leaves author meaning unchanged.
@@ -30,6 +30,41 @@ Provider; it is a different deployment package but must return the same
30
30
  The configured model, device, compute mode and batch size are checked through `/health` before use.
31
31
  This prevents a warm process with an incompatible inference configuration from accepting work.
32
32
 
33
+ ## Choose model and hardware
34
+
35
+ The default `small` / `cpu` / `int8` is a modest-machine execution default, not a quality ranking.
36
+ For multilingual transcription with quality as the priority and suitable hardware, consider
37
+ `large-v3`. For example, an NVIDIA CUDA installation with sufficient memory can explicitly select:
38
+
39
+ ```json
40
+ "whisperx.local": {
41
+ "use": "@hypit/provider-whisperx-local",
42
+ "config": {
43
+ "expectedModel": "large-v3",
44
+ "expectedDevice": "cuda",
45
+ "expectedCompute": "float16",
46
+ "expectedBatchSize": 4
47
+ }
48
+ }
49
+ ```
50
+
51
+ This is an example deployment, not a promise that every GPU has enough memory. Adjust batch size
52
+ and compute mode for the actual device. On CPU, `int8` is the practical starting point; a larger
53
+ model still takes more preparation and inference work. The packaged faster-whisper backend uses
54
+ CTranslate2: Apple Silicon does not imply CUDA or support for a PyTorch `mps` setting here.
55
+ An already ready smaller model can be useful for a short clear reference. Choose the local model
56
+ or hosted service for the actual language, material and time available rather than installing
57
+ successively larger models as a routine sequence.
58
+
59
+ `expectedModel` selects speech recognition. WhisperX separately loads the language-specific
60
+ alignment model when that language is first requested. A larger ASR model can improve the words
61
+ fed into alignment, but does not select a larger aligner or guarantee better timing by itself.
62
+ The health response identifies the loaded ASR configuration; it does not establish that every
63
+ language's alignment weights are cached. See [WhisperX usage](https://github.com/m-bain/whisperX#usage-)
64
+ and [faster-whisper deployment](https://github.com/SYSTRAN/faster-whisper#usage).
65
+
66
+ ## Preparation and downloads
67
+
33
68
  The Runtime installs and starts the packaged service in the machine Program Home when this Endpoint
34
69
  is selected. The environment is reused across projects and sessions. The current local package and
35
70
  service are trusted code; this is not a community-plugin sandbox.
@@ -42,3 +77,25 @@ its configuration through `/health`. Inspect an existing Profile's address and e
42
77
  when locating that service. A custom `serviceCommand` supplies its own installation and start command.
43
78
  `hypit programs status` checks the Programs selected by the supplied Profile; `programs up` prepares
44
79
  and starts them. The managed installation does not require a global `whisperx` shell command.
80
+
81
+ Preparation and service processes inherit the environment of the command starting them. Set
82
+ network and cache variables there before `programs up` or `runtime up`. A service already running
83
+ retains its earlier environment. Inspect its reported log before deciding whether a selected
84
+ Program needs restarting, and account for active work using it.
85
+
86
+ Preparation commands write `install.log`; the running service writes `program.log`, with stderr in
87
+ `program.err.log` on Windows. Inspect the stderr file for Python model-loading and download messages.
88
+ The service health endpoint becomes available after ASR loading. A startup readiness wait expiring
89
+ can leave that process still loading; check its reported PID and logs before starting another process.
90
+
91
+ Python installation, Python packages, NLTK sentence data, ASR weights and language-alignment weights
92
+ are separate downloads. `UV_PYTHON_INSTALL_MIRROR` configures a Python distribution mirror;
93
+ `HF_ENDPOINT` and `HF_HOME` configure Hugging Face access/cache. Alignment models can also come
94
+ from torchaudio's download hosts. These settings do not redirect NLTK's own downloader.
95
+
96
+ Managed installation uses `uv sync --frozen` with the distributed lockfile, including its artifact
97
+ URLs. `PIP_INDEX_URL` does not configure uv, and `UV_DEFAULT_INDEX` is an index-resolution setting,
98
+ not a general rewrite of those frozen URLs. Inspect the actual transfer destination. For blocked
99
+ locked downloads, use an appropriate network/proxy route or an already populated compatible cache;
100
+ an operator-managed installation can instead provide `serviceCommand` with the expected service
101
+ identity. Ordinary production keeps the distributed dependency selection intact.
@@ -124,6 +124,7 @@ export function localWhisperXProgram(options: LocalWhisperXProgramOptions): Mana
124
124
  stateRoot,
125
125
  installation: {
126
126
  probe: installationProbe,
127
+ prepareBeforeStart: true,
127
128
  commands: [{
128
129
  command: "uv",
129
130
  args: ["sync", "--project", localWhisperXManagedProject, "--frozen", "--no-editable"],
@@ -141,6 +141,7 @@ export function createLocalWhisperXProvider(config: CreateLocalWhisperXProviderO
141
141
  const audioPath = join(work, "alignment-evidence.wav");
142
142
  await writeFile(audioPath, audio);
143
143
  const signal = AbortSignal.timeout(requestTimeoutMs);
144
+ await context.reportProgress?.({ phase: "Checking local transcription service" });
144
145
  const healthResponse = await fetch(`${normalizedBaseUrl}/health`, { signal });
145
146
  const health = await limitedJson(healthResponse, Math.min(maxResponseBytes, 64 * 1024), "WhisperX health");
146
147
  assert(health.value !== null && typeof health.value === "object" && !Array.isArray(health.value),
@@ -164,6 +165,7 @@ export function createLocalWhisperXProvider(config: CreateLocalWhisperXProviderO
164
165
  && healthValue.compute === expectedCompute
165
166
  && healthValue.batchSize === expectedBatchSize,
166
167
  "WhisperX service runtime identity differs from the configured Provider");
168
+ await context.reportProgress?.({ phase: "Transcribing and aligning words" });
167
169
  const transcriptionResponse = await fetch(`${normalizedBaseUrl}/transcribe`, {
168
170
  method: "POST",
169
171
  headers: { "content-type": "application/json" },
@@ -181,6 +183,7 @@ export function createLocalWhisperXProvider(config: CreateLocalWhisperXProviderO
181
183
  const evidence: AlignedTranscriptEvidence = sealAlignedTranscriptEvidence({
182
184
  passages,
183
185
  });
186
+ await context.reportProgress?.({ phase: "Word timing ready" });
184
187
  return result(canonicalize(evidence));
185
188
  } finally {
186
189
  await rm(work, { recursive: true, force: true }).catch(() => {});