@hypit/hypit 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (462) hide show
  1. package/README.md +4 -2
  2. package/dist/public/caption.d.ts +206 -183
  3. package/dist/public/composition.d.ts +25 -3
  4. package/dist/public/endpoint-kit.d.ts +24 -2
  5. package/dist/public/generation.d.ts +5 -1
  6. package/dist/public/hyperframes.d.ts +19 -1
  7. package/dist/public/narrative.d.ts +17 -3
  8. package/dist/public/performance.d.ts +1590 -0
  9. package/dist/public/program-space.d.ts +179 -32
  10. package/dist/public/runtime-kit.d.ts +21 -8
  11. package/dist/public/sound.d.ts +822 -0
  12. package/dist/public/speech.d.ts +41 -0
  13. package/dist/public/studio-adapter.d.ts +77 -15
  14. package/dist/public/temporal-markup.d.ts +9 -44
  15. package/dist/public/temporal.d.ts +37 -28
  16. package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
  17. package/examples/README.md +18 -10
  18. package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
  19. package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
  20. package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
  21. package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
  22. package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
  23. package/examples/provider-package/README.md +78 -0
  24. package/examples/provider-package/hypit.runtime.json +12 -0
  25. package/examples/provider-package/packages/provider-images/package.json +11 -0
  26. package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
  27. package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
  28. package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
  29. package/examples/semantic-composition/README.md +8 -1
  30. package/examples/semantic-composition/chat.svml +6 -5
  31. package/examples/semantic-composition/hypit.runtime.json +1 -1
  32. package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
  33. package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
  34. package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
  35. package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
  36. package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
  37. package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
  38. package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
  39. package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
  40. package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
  41. package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
  42. package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
  43. package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
  44. package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
  45. package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
  46. package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
  47. package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
  48. package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
  49. package/package.json +35 -15
  50. package/packages/audio-track/README.md +20 -13
  51. package/packages/audio-track/package.json +1 -1
  52. package/packages/audio-track/src/component.ts +4 -4
  53. package/packages/audio-track/src/fragment.ts +6 -5
  54. package/packages/audio-track/src/index.ts +1 -1
  55. package/packages/audio-track/src/manifest.ts +17 -16
  56. package/packages/audio-track/src/program.ts +21 -25
  57. package/packages/audio-track/src/surface.ts +19 -18
  58. package/packages/audio-track-studio/README.md +23 -0
  59. package/packages/audio-track-studio/src/index.ts +28 -17
  60. package/packages/author-kit/README.md +1 -1
  61. package/packages/background-removal/README.md +4 -7
  62. package/packages/browser-capture/package.json +1 -1
  63. package/packages/build-result/README.md +11 -0
  64. package/packages/build-result/src/decode.ts +2 -0
  65. package/packages/build-result/src/execution-log.ts +17 -0
  66. package/packages/build-result/src/index.ts +1 -0
  67. package/packages/build-result/src/store.ts +14 -1
  68. package/packages/build-result/src/types.ts +3 -0
  69. package/packages/build-result-s3/src/repository.ts +4 -0
  70. package/packages/caption/README.md +61 -73
  71. package/packages/caption/package.json +3 -2
  72. package/packages/caption/src/activation.ts +2 -2
  73. package/packages/caption/src/component.ts +20 -5
  74. package/packages/caption/src/display.ts +3 -18
  75. package/packages/caption/src/fragment.ts +3 -7
  76. package/packages/caption/src/index.ts +6 -5
  77. package/packages/caption/src/manifest.ts +29 -46
  78. package/packages/caption/src/style.ts +24 -135
  79. package/packages/caption/src/surface.ts +12 -92
  80. package/packages/caption/src/temporalize.ts +18 -53
  81. package/packages/caption/src/types.ts +8 -35
  82. package/packages/caption/src/visibility.ts +23 -0
  83. package/packages/caption-fine/README.md +21 -9
  84. package/packages/caption-fine/package.json +4 -2
  85. package/packages/caption-fine/src/component.ts +3 -3
  86. package/packages/caption-fine/src/fragment.ts +7 -19
  87. package/packages/caption-fine/src/index.ts +2 -0
  88. package/packages/caption-fine/src/manifest.ts +26 -17
  89. package/packages/caption-fine/src/recipe.ts +7 -0
  90. package/packages/caption-fine/src/render.ts +14 -13
  91. package/packages/caption-fine/src/schedule.ts +39 -35
  92. package/packages/caption-fine/src/style.ts +10 -9
  93. package/packages/caption-fine/src/surface.ts +62 -35
  94. package/packages/caption-fine/src/types.ts +2 -0
  95. package/packages/caption-fine-studio/README.md +24 -2
  96. package/packages/caption-fine-studio/package.json +3 -1
  97. package/packages/caption-fine-studio/src/activation.ts +3 -3
  98. package/packages/caption-fine-studio/src/index.ts +54 -42
  99. package/packages/cli/README.md +57 -4
  100. package/packages/cli/package.json +1 -0
  101. package/packages/cli/src/arguments.ts +25 -6
  102. package/packages/cli/src/build-planning.ts +3 -2
  103. package/packages/cli/src/command.ts +6 -0
  104. package/packages/cli/src/commands/environment.ts +28 -18
  105. package/packages/cli/src/commands/execution.ts +81 -26
  106. package/packages/cli/src/commands/results.ts +7 -11
  107. package/packages/cli/src/index.ts +2 -2
  108. package/packages/cli/src/machine-view.ts +3 -2
  109. package/packages/cli/src/main.ts +34 -42
  110. package/packages/cli/src/observation.ts +7 -1
  111. package/packages/cli/src/output.ts +65 -23
  112. package/packages/cli/src/view.ts +66 -19
  113. package/packages/comment-sticker/README.md +3 -3
  114. package/packages/comment-sticker/package.json +1 -1
  115. package/packages/comment-sticker/src/component.ts +4 -4
  116. package/packages/comment-sticker/src/fragment.ts +5 -4
  117. package/packages/comment-sticker/src/manifest.ts +7 -6
  118. package/packages/comment-sticker/src/program.ts +9 -9
  119. package/packages/comment-sticker/src/surface.ts +6 -7
  120. package/packages/composition/README.md +21 -0
  121. package/packages/composition/src/audio-presentation.ts +44 -0
  122. package/packages/composition/src/index.ts +3 -0
  123. package/packages/composition/src/schema.ts +8 -3
  124. package/packages/composition/src/track.ts +15 -1
  125. package/packages/credential-store-env/README.md +1 -1
  126. package/packages/deck-track/README.md +3 -3
  127. package/packages/deck-track/package.json +1 -1
  128. package/packages/deck-track/src/component.ts +5 -5
  129. package/packages/deck-track/src/fragment.ts +6 -5
  130. package/packages/deck-track/src/lower.ts +12 -12
  131. package/packages/deck-track/src/manifest.ts +8 -7
  132. package/packages/deck-track/src/program.ts +13 -16
  133. package/packages/deck-track/src/surface.ts +9 -10
  134. package/packages/driver-node/src/driver.ts +41 -3
  135. package/packages/elevenlabs-speech/README.md +27 -0
  136. package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
  137. package/packages/elevenlabs-speech/src/activation.ts +26 -0
  138. package/packages/elevenlabs-speech/src/fragment.ts +11 -0
  139. package/packages/elevenlabs-speech/src/index.ts +111 -0
  140. package/packages/elevenlabs-speech/src/surface.ts +167 -0
  141. package/packages/endpoint-kit/README.md +24 -0
  142. package/packages/endpoint-kit/src/index.ts +7 -1
  143. package/packages/film/README.md +12 -7
  144. package/packages/film/package.json +1 -1
  145. package/packages/film/src/component.ts +4 -4
  146. package/packages/film/src/fragment.ts +6 -5
  147. package/packages/film/src/manifest.ts +11 -10
  148. package/packages/film/src/program.ts +5 -5
  149. package/packages/film/src/recipe.ts +2 -1
  150. package/packages/film/src/surface.ts +10 -7
  151. package/packages/film-studio/package.json +1 -1
  152. package/packages/film-studio/src/index.ts +2 -2
  153. package/packages/fishaudio-speech/README.md +33 -0
  154. package/packages/fishaudio-speech/package.json +21 -0
  155. package/packages/fishaudio-speech/src/activation.ts +32 -0
  156. package/packages/fishaudio-speech/src/fragment.ts +11 -0
  157. package/packages/fishaudio-speech/src/index.ts +156 -0
  158. package/packages/fishaudio-speech/src/surface.ts +192 -0
  159. package/packages/generation/README.md +11 -1
  160. package/packages/generation/src/mapping.ts +28 -30
  161. package/packages/gpt-image/README.md +1 -2
  162. package/packages/grok-imagine/README.md +1 -2
  163. package/packages/hyperframes/README.md +7 -3
  164. package/packages/hyperframes/src/browser-program.ts +11 -2
  165. package/packages/hyperframes/src/document.ts +15 -2
  166. package/packages/interview-emoji-reveal/README.md +4 -4
  167. package/packages/interview-emoji-reveal/package.json +1 -1
  168. package/packages/interview-emoji-reveal/src/component.ts +4 -4
  169. package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
  170. package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
  171. package/packages/interview-emoji-reveal/src/program.ts +14 -14
  172. package/packages/interview-emoji-reveal/src/surface.ts +8 -9
  173. package/packages/media-execution/README.md +7 -3
  174. package/packages/media-execution/src/audio-presentation.ts +23 -0
  175. package/packages/media-execution/src/execute.ts +2 -0
  176. package/packages/media-pipeline/README.md +7 -3
  177. package/packages/media-pipeline/src/audio-plan.ts +4 -1
  178. package/packages/media-pipeline/src/component.ts +16 -2
  179. package/packages/media-pipeline/src/manifest.ts +3 -1
  180. package/packages/media-pipeline/src/types.ts +2 -1
  181. package/packages/media-track/README.md +14 -47
  182. package/packages/media-track/package.json +1 -1
  183. package/packages/media-track/preview/preview.svml +5 -5
  184. package/packages/media-track/src/author.ts +12 -6
  185. package/packages/media-track/src/component.ts +10 -16
  186. package/packages/media-track/src/fragment.ts +8 -7
  187. package/packages/media-track/src/index.ts +3 -1
  188. package/packages/media-track/src/lower.ts +7 -7
  189. package/packages/media-track/src/manifest.ts +16 -38
  190. package/packages/media-track/src/program.ts +62 -67
  191. package/packages/media-track/src/sampling.ts +6 -6
  192. package/packages/media-track/src/sequence.ts +8 -8
  193. package/packages/media-track/src/surface.ts +25 -43
  194. package/packages/media-track-studio/README.md +9 -0
  195. package/packages/media-track-studio/src/index.ts +16 -11
  196. package/packages/mimo-speech/README.md +1 -1
  197. package/packages/minimax-h3/README.md +1 -1
  198. package/packages/nano-banana/README.md +1 -1
  199. package/packages/narrative/README.md +23 -1
  200. package/packages/narrative/src/identity.ts +11 -0
  201. package/packages/narrative/src/index.ts +3 -0
  202. package/packages/narrative/src/schema.ts +28 -27
  203. package/packages/narrative/src/selection.ts +52 -0
  204. package/packages/narrative/src/types.ts +2 -0
  205. package/packages/package-loader-node/README.md +30 -0
  206. package/packages/package-loader-node/package.json +5 -2
  207. package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
  208. package/packages/package-loader-node/src/index.ts +1 -0
  209. package/packages/package-loader-node/src/loader.ts +12 -15
  210. package/packages/package-loader-node/src/location.ts +27 -1
  211. package/packages/package-loader-node/src/module-scope.ts +183 -0
  212. package/packages/package-loader-node/src/types.ts +4 -0
  213. package/packages/performance/README.md +83 -0
  214. package/packages/performance/package.json +30 -0
  215. package/packages/performance/src/activation.ts +11 -0
  216. package/packages/performance/src/component.ts +46 -0
  217. package/packages/performance/src/index.ts +6 -0
  218. package/packages/performance/src/manifest.ts +53 -0
  219. package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
  220. package/packages/performance/src/program.ts +51 -0
  221. package/packages/performance/src/style.ts +35 -0
  222. package/packages/performance/src/surface.ts +99 -0
  223. package/packages/performance-studio/README.md +25 -0
  224. package/packages/performance-studio/package.json +21 -0
  225. package/packages/performance-studio/src/activation.ts +6 -0
  226. package/packages/performance-studio/src/index.ts +84 -0
  227. package/packages/program-space/README.md +9 -18
  228. package/packages/program-space/src/activation.ts +1 -5
  229. package/packages/program-space/src/index.ts +2 -11
  230. package/packages/program-space/src/surface.ts +1 -20
  231. package/packages/project-context-node/README.md +20 -0
  232. package/packages/project-context-node/package.json +10 -0
  233. package/packages/project-context-node/src/index.ts +3 -0
  234. package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
  235. package/packages/provider-hyperframes-local/README.md +43 -15
  236. package/packages/provider-hyperframes-local/src/activation.ts +4 -3
  237. package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
  238. package/packages/provider-hyperframes-local/src/capture.ts +96 -26
  239. package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
  240. package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
  241. package/packages/provider-hyperframes-local/src/options.ts +2 -0
  242. package/packages/provider-hyperframes-local/src/program.ts +6 -3
  243. package/packages/provider-hyperframes-local/src/progress.ts +53 -0
  244. package/packages/provider-hyperframes-local/src/provider.ts +18 -5
  245. package/packages/provider-hyperframes-local/src/render.ts +48 -7
  246. package/packages/provider-hypihub/README.md +48 -17
  247. package/packages/provider-hypihub/package.json +2 -0
  248. package/packages/provider-hypihub/src/mapping.ts +31 -7
  249. package/packages/provider-hypihub/src/oauth.ts +6 -0
  250. package/packages/provider-hypihub/src/provider.ts +25 -13
  251. package/packages/provider-hypihub/src/routes.ts +1 -2
  252. package/packages/provider-hypihub/src/upload.ts +2 -0
  253. package/packages/provider-media-local/README.md +3 -4
  254. package/packages/provider-whisperx-local/src/program.ts +1 -0
  255. package/packages/provider-whisperx-local/src/provider.ts +3 -0
  256. package/packages/ranking/README.md +8 -6
  257. package/packages/ranking/package.json +1 -1
  258. package/packages/ranking/src/component.ts +6 -6
  259. package/packages/ranking/src/fragment.ts +11 -7
  260. package/packages/ranking/src/manifest.ts +21 -14
  261. package/packages/ranking/src/render.ts +22 -26
  262. package/packages/ranking/src/schedule.ts +16 -19
  263. package/packages/ranking/src/surface.ts +12 -13
  264. package/packages/ranking-studio/README.md +18 -0
  265. package/packages/ranking-studio/src/index.ts +61 -9
  266. package/packages/render-hyperframes/README.md +7 -7
  267. package/packages/render-hyperframes/package.json +1 -1
  268. package/packages/render-hyperframes/src/component.ts +11 -1
  269. package/packages/render-hyperframes/src/fragment.ts +7 -4
  270. package/packages/render-hyperframes/src/manifest.ts +4 -4
  271. package/packages/render-hyperframes/src/surface.ts +6 -6
  272. package/packages/runtime/README.md +8 -1
  273. package/packages/runtime/src/execution.ts +15 -4
  274. package/packages/runtime/src/index.ts +2 -1
  275. package/packages/runtime/src/log.ts +51 -0
  276. package/packages/runtime/src/types.ts +5 -8
  277. package/packages/runtime-host-node/README.md +30 -0
  278. package/packages/runtime-host-node/package.json +1 -0
  279. package/packages/runtime-host-node/src/index.ts +24 -9
  280. package/packages/runtime-host-node/src/packages.ts +47 -50
  281. package/packages/runtime-kit/README.md +5 -0
  282. package/packages/runtime-kit/src/index.ts +3 -1
  283. package/packages/runtime-local/README.md +109 -4
  284. package/packages/runtime-local/src/config.ts +202 -56
  285. package/packages/runtime-local/src/control.ts +9 -1
  286. package/packages/runtime-local/src/executor.ts +66 -0
  287. package/packages/runtime-local/src/host.ts +37 -17
  288. package/packages/runtime-local/src/log.ts +48 -0
  289. package/packages/runtime-local/src/programs.ts +2 -1
  290. package/packages/runtime-local/src/result-writer.ts +2 -0
  291. package/packages/runtime-local/src/runtime.ts +8 -6
  292. package/packages/runtime-local/src/supervisor.ts +142 -0
  293. package/packages/runtime-local/src/types.ts +9 -2
  294. package/packages/runtime-local/src/worker-process.ts +7 -24
  295. package/packages/runtime-local/src/worker.ts +55 -83
  296. package/packages/screen-overlay/README.md +3 -3
  297. package/packages/screen-overlay/package.json +1 -1
  298. package/packages/screen-overlay/src/component.ts +3 -3
  299. package/packages/screen-overlay/src/fragment.ts +5 -4
  300. package/packages/screen-overlay/src/manifest.ts +7 -6
  301. package/packages/screen-overlay/src/program.ts +9 -9
  302. package/packages/screen-overlay/src/surface.ts +6 -7
  303. package/packages/script/README.md +30 -5
  304. package/packages/script/src/manifest.ts +4 -3
  305. package/packages/script/src/narrative.ts +1 -0
  306. package/packages/script/src/parser.ts +45 -6
  307. package/packages/script/src/surface.ts +4 -3
  308. package/packages/script/src/types.ts +1 -1
  309. package/packages/script-studio/package.json +9 -3
  310. package/packages/script-studio/src/index.ts +2 -0
  311. package/packages/script-studio/src/projection.ts +105 -0
  312. package/packages/seedance/README.md +30 -1
  313. package/packages/seedance/src/index.ts +18 -7
  314. package/packages/seedance/src/surface.ts +17 -4
  315. package/packages/seedance-kits/README.md +7 -1
  316. package/packages/seedream/README.md +1 -1
  317. package/packages/sound/README.md +81 -0
  318. package/packages/sound/package.json +25 -0
  319. package/packages/sound/src/activation.ts +11 -0
  320. package/packages/sound/src/component.ts +28 -0
  321. package/packages/sound/src/index.ts +5 -0
  322. package/packages/sound/src/manifest.ts +47 -0
  323. package/packages/sound/src/program.ts +84 -0
  324. package/packages/sound/src/style.ts +34 -0
  325. package/packages/sound/src/surface.ts +90 -0
  326. package/packages/sound-studio/README.md +22 -0
  327. package/packages/sound-studio/package.json +20 -0
  328. package/packages/sound-studio/src/activation.ts +6 -0
  329. package/packages/sound-studio/src/index.ts +74 -0
  330. package/packages/speech/README.md +2 -2
  331. package/packages/speech-alignment/src/local.ts +8 -0
  332. package/packages/speech-alignment/src/locate.ts +1 -1
  333. package/packages/store-sqlite/README.md +7 -0
  334. package/packages/store-sqlite/src/store.ts +84 -83
  335. package/packages/studio/INSPECTOR.md +15 -2
  336. package/packages/studio/LOCALIZATION.md +98 -0
  337. package/packages/studio/README.md +101 -14
  338. package/packages/studio/locales/en.json +197 -0
  339. package/packages/studio/locales/zh-CN.json +191 -0
  340. package/packages/studio/package.json +8 -7
  341. package/packages/studio/src/companion-assembly.ts +1 -0
  342. package/packages/studio/src/domain.ts +1 -1
  343. package/packages/studio/src/fallback-companions.ts +3 -3
  344. package/packages/studio/src/feedback-server.ts +51 -0
  345. package/packages/studio/src/feedback-store.ts +66 -0
  346. package/packages/studio/src/feedback.ts +60 -0
  347. package/packages/studio/src/localization-node.ts +46 -0
  348. package/packages/studio/src/localization.ts +85 -0
  349. package/packages/studio/src/parameter-values.ts +43 -1
  350. package/packages/studio/src/parameters.ts +114 -24
  351. package/packages/studio/src/preview/render.ts +5 -1
  352. package/packages/studio/src/preview/runtime-shim.ts +49 -3
  353. package/packages/studio/src/programme.ts +14 -30
  354. package/packages/studio/src/server.ts +10 -6
  355. package/packages/studio/src/shared.ts +4 -2
  356. package/packages/studio/src/snapshot.ts +21 -132
  357. package/packages/studio/src/studio-preflight.ts +3 -3
  358. package/packages/studio/src/studio-registry.ts +50 -6
  359. package/packages/studio/src/style.css +223 -50
  360. package/packages/studio/src/ui/artifact-name.ts +8 -6
  361. package/packages/studio/src/ui/artifact-preview.ts +5 -4
  362. package/packages/studio/src/ui/code.ts +17 -16
  363. package/packages/studio/src/ui/comments.ts +234 -0
  364. package/packages/studio/src/ui/dropdown.ts +68 -0
  365. package/packages/studio/src/ui/i18n.ts +109 -0
  366. package/packages/studio/src/ui/icons.ts +6 -0
  367. package/packages/studio/src/ui/library.ts +76 -65
  368. package/packages/studio/src/ui/main.ts +223 -211
  369. package/packages/studio/src/ui/overlay.ts +12 -8
  370. package/packages/studio/src/ui/scrub-preview.ts +110 -0
  371. package/packages/studio/src/ui/stage.ts +93 -29
  372. package/packages/studio/src/ui/timeline.ts +190 -118
  373. package/packages/studio/start.ts +41 -22
  374. package/packages/studio-adapter/README.md +130 -11
  375. package/packages/studio-adapter/src/index.ts +100 -13
  376. package/packages/temporal/README.md +6 -6
  377. package/packages/temporal/package.json +1 -1
  378. package/packages/temporal/src/component.ts +5 -6
  379. package/packages/temporal/src/index.ts +8 -6
  380. package/packages/temporal/src/location.ts +11 -11
  381. package/packages/temporal/src/projection.ts +19 -19
  382. package/packages/temporal/src/rational.ts +4 -4
  383. package/packages/temporal-markup/EDITING.md +2 -2
  384. package/packages/temporal-markup/README.md +27 -11
  385. package/packages/temporal-markup/package.json +1 -1
  386. package/packages/temporal-markup/src/index.ts +20 -25
  387. package/packages/temporal-markup/src/space.ts +10 -41
  388. package/packages/timeline/README.md +31 -0
  389. package/packages/{semantic-track → timeline}/package.json +1 -1
  390. package/packages/timeline/src/activation.ts +8 -0
  391. package/packages/timeline/src/component.ts +24 -0
  392. package/packages/timeline/src/identity.ts +60 -0
  393. package/packages/timeline/src/index.ts +6 -0
  394. package/packages/{semantic-track → timeline}/src/location.ts +20 -20
  395. package/packages/timeline/src/manifest.ts +39 -0
  396. package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
  397. package/packages/timeline/src/types.ts +24 -0
  398. package/packages/timeline-author/README.md +68 -0
  399. package/packages/{speech-track → timeline-author}/package.json +6 -4
  400. package/packages/timeline-author/src/activation.ts +22 -0
  401. package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
  402. package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
  403. package/packages/timeline-author/src/index.ts +7 -0
  404. package/packages/timeline-author/src/manifest.ts +78 -0
  405. package/packages/timeline-author/src/program.ts +107 -0
  406. package/packages/timeline-author/src/surface.ts +46 -0
  407. package/packages/timeline-author/src/types.ts +6 -0
  408. package/packages/typography-track/README.md +4 -4
  409. package/packages/typography-track/package.json +1 -1
  410. package/packages/typography-track/src/component.ts +4 -4
  411. package/packages/typography-track/src/fragment.ts +4 -3
  412. package/packages/typography-track/src/manifest.ts +11 -9
  413. package/packages/typography-track/src/program.ts +15 -15
  414. package/packages/typography-track/src/surface.ts +17 -18
  415. package/packages/video-cli/README.md +4 -1
  416. package/packages/video-cli/package.json +2 -1
  417. package/packages/video-cli/src/creation.ts +14 -4
  418. package/packages/video-cli/src/index.ts +1 -1
  419. package/packages/video-cli/src/studio-distribution.ts +2 -1
  420. package/packages/volcengine-matting/README.md +3 -3
  421. package/packages/whisperx/README.md +1 -1
  422. package/services/whisperx/README.md +14 -0
  423. package/services/whisperx/pyproject.toml +2 -0
  424. package/services/whisperx/uv.lock +20 -20
  425. package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
  426. package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
  427. package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
  428. package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
  429. package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
  430. package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
  431. package/packages/provider-kie/README.md +0 -134
  432. package/packages/provider-kie/package.json +0 -43
  433. package/packages/provider-kie/src/activation.ts +0 -71
  434. package/packages/provider-kie/src/index.ts +0 -10
  435. package/packages/provider-kie/src/mapping.ts +0 -182
  436. package/packages/provider-kie/src/provider.ts +0 -657
  437. package/packages/provider-kie/src/routes.ts +0 -150
  438. package/packages/provider-xiaomi-mimo/README.md +0 -32
  439. package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
  440. package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
  441. package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
  442. package/packages/runtime/src/environment.ts +0 -6
  443. package/packages/semantic-track/README.md +0 -21
  444. package/packages/semantic-track/src/activation.ts +0 -8
  445. package/packages/semantic-track/src/component.ts +0 -24
  446. package/packages/semantic-track/src/identity.ts +0 -58
  447. package/packages/semantic-track/src/index.ts +0 -6
  448. package/packages/semantic-track/src/manifest.ts +0 -38
  449. package/packages/semantic-track/src/types.ts +0 -26
  450. package/packages/speech-track/README.md +0 -51
  451. package/packages/speech-track/src/activation.ts +0 -19
  452. package/packages/speech-track/src/index.ts +0 -7
  453. package/packages/speech-track/src/manifest.ts +0 -73
  454. package/packages/speech-track/src/program.ts +0 -64
  455. package/packages/speech-track/src/surface.ts +0 -35
  456. package/packages/speech-track/src/types.ts +0 -6
  457. package/packages/speech-track-studio/README.md +0 -3
  458. package/packages/speech-track-studio/package.json +0 -14
  459. package/packages/speech-track-studio/src/activation.ts +0 -7
  460. package/packages/speech-track-studio/src/index.ts +0 -40
  461. /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
  462. /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
@@ -35,7 +35,6 @@ import type {
35
35
  OperationSnapshot,
36
36
  OperationStore,
37
37
  OperationUpdate,
38
- RuntimeEnvironmentStore,
39
38
  } from "@hypit/runtime";
40
39
 
41
40
  export type SqliteRuntimeStateOptions = {
@@ -224,6 +223,7 @@ function parseExecutionRequest(row: Row, subject: string): BuildExecutionRequest
224
223
  `SQLite ${subject} Result location is invalid`);
225
224
  return {
226
225
  build: row.build_id,
226
+ ...(typeof row.context_json === "string" ? { context: JSON.parse(row.context_json) as NonNullable<BuildExecutionRequest["context"]> } : {}),
227
227
  componentPackages,
228
228
  result: result as BuildExecutionRequest["result"],
229
229
  };
@@ -263,12 +263,13 @@ class SqlitePendingBuildStore implements PendingBuildStore {
263
263
  assert(occupied === undefined, `Build ${request.build} already has Runtime state`);
264
264
  this.#database.prepare(`
265
265
  INSERT INTO hypit_submissions (
266
- build_id, component_packages_json, result_location_json, created_at
267
- ) VALUES (?, ?, ?, ?)
266
+ build_id, component_packages_json, result_location_json, context_json, created_at
267
+ ) VALUES (?, ?, ?, ?, ?)
268
268
  `).run(
269
269
  request.build,
270
270
  JSON.stringify(request.componentPackages),
271
271
  JSON.stringify(request.result),
272
+ request.context === undefined ? null : JSON.stringify(request.context),
272
273
  now,
273
274
  );
274
275
  return parsePendingBuildSubmission(
@@ -295,7 +296,8 @@ class SqlitePendingBuildStore implements PendingBuildStore {
295
296
  if (row === undefined) throw new Error(`Build submission ${request.build} was not prepared`);
296
297
  const submission = parsePendingBuildSubmission(row);
297
298
  assert(JSON.stringify(submission.componentPackages) === JSON.stringify(request.componentPackages)
298
- && JSON.stringify(submission.result) === JSON.stringify(request.result),
299
+ && JSON.stringify(submission.result) === JSON.stringify(request.result)
300
+ && JSON.stringify(submission.context) === JSON.stringify(request.context),
299
301
  `Build submission ${request.build} does not match its prepared state`);
300
302
  this.#database.prepare(`
301
303
  INSERT INTO hypit_builds (build_id, definition_json) VALUES (?, ?)
@@ -305,15 +307,16 @@ class SqlitePendingBuildStore implements PendingBuildStore {
305
307
  `).run(request.build, Date.now(), JSON.stringify(request.catalog));
306
308
  this.#database.prepare(`
307
309
  INSERT INTO hypit_executions (
308
- build_id, component_packages_json, result_location_json, created_at, wake_at,
310
+ build_id, component_packages_json, result_location_json, context_json, created_at, wake_at,
309
311
  turn_owner, turn_acquired_at, result_writer_owner, result_writer_acquired_at,
310
312
  stop_cause, stop_reason,
311
313
  decision_outcome, decision_reason, attention_step, attention_error
312
- ) VALUES (?, ?, ?, ?, ?, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
314
+ ) VALUES (?, ?, ?, ?, ?, ?, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
313
315
  `).run(
314
316
  request.build,
315
317
  JSON.stringify(request.componentPackages),
316
318
  JSON.stringify(request.result),
319
+ request.context === undefined ? null : JSON.stringify(request.context),
317
320
  submission.createdAt,
318
321
  Date.now(),
319
322
  );
@@ -424,6 +427,9 @@ function parseCommandExecution(row: Row): CommandExecutionReceipt {
424
427
  command: row.command_id,
425
428
  status: row.status,
426
429
  ...(event === undefined ? {} : { event }),
430
+ ...(row.status !== "started" || typeof row.activity_json !== "string" ? {} : {
431
+ activity: JSON.parse(row.activity_json) as NonNullable<CommandExecutionReceipt["activity"]>,
432
+ }),
427
433
  };
428
434
  }
429
435
 
@@ -456,7 +462,7 @@ class SqliteCommandExecutionStore implements CommandExecutionStore {
456
462
  const current = parseCommandExecution(row);
457
463
  if (current.status === "completed") return current;
458
464
  this.#database.prepare(`
459
- UPDATE hypit_command_executions SET status = 'completed', event_json = ?
465
+ UPDATE hypit_command_executions SET status = 'completed', event_json = ?, activity_json = NULL
460
466
  WHERE build_id = ? AND command_id = ? AND status = 'started'
461
467
  `).run(JSON.stringify(event), build, command);
462
468
  return parseCommandExecution(this.#database.prepare(`
@@ -471,54 +477,18 @@ class SqliteCommandExecutionStore implements CommandExecutionStore {
471
477
  `).all(build) as Row[]).map(parseCommandExecution);
472
478
  }
473
479
 
474
- async removeBuild(build: string): Promise<void> {
475
- this.#database.prepare("DELETE FROM hypit_command_executions WHERE build_id = ?").run(build);
476
- }
477
- }
478
-
479
- class SqliteRuntimeEnvironmentStore implements RuntimeEnvironmentStore {
480
- readonly #database: DatabaseSync;
481
-
482
- constructor(database: DatabaseSync) {
483
- this.#database = database;
484
- }
485
-
486
- async use(config: string): Promise<void> {
487
- assert(config.length > 0, "Runtime environment configuration is empty");
488
- transaction(this.#database, () => {
489
- const active = this.#database.prepare(
490
- `SELECT
491
- (SELECT COUNT(*) FROM hypit_submissions)
492
- + (SELECT COUNT(*) FROM hypit_executions) AS count`,
493
- ).get() as Row;
494
- assert(typeof active.count === "number", "SQLite active Runtime work count is invalid");
495
- const row = this.#database.prepare(
496
- "SELECT config_json FROM hypit_runtime_environment WHERE singleton = 1",
497
- ).get() as Row | undefined;
498
- if (active.count > 0) {
499
- assert(typeof row?.config_json === "string",
500
- "Active Runtime work has no recorded environment; use its original Profile or resolve it explicitly");
501
- assert(row.config_json === config,
502
- "Runtime Profile differs from the environment pinned by active Builds");
503
- return;
504
- }
505
- this.#database.prepare(`
506
- INSERT INTO hypit_runtime_environment (singleton, config_json) VALUES (1, ?)
507
- ON CONFLICT(singleton) DO UPDATE SET config_json = excluded.config_json
508
- `).run(config);
509
- });
480
+ async reportProgress(build: string, command: string, activity: NonNullable<CommandExecutionReceipt["activity"]>): Promise<void> {
481
+ this.#database.prepare(`
482
+ UPDATE hypit_command_executions SET activity_json = ?
483
+ WHERE build_id = ? AND command_id = ? AND status = 'started'
484
+ `).run(JSON.stringify(activity), build, command);
510
485
  }
511
486
 
512
- async assert(config: string): Promise<void> {
513
- const row = this.#database.prepare(
514
- "SELECT config_json FROM hypit_runtime_environment WHERE singleton = 1",
515
- ).get() as Row | undefined;
516
- assert(typeof row?.config_json === "string" && row.config_json === config,
517
- "Runtime Profile no longer matches this Worker's active environment");
487
+ async removeBuild(build: string): Promise<void> {
488
+ this.#database.prepare("DELETE FROM hypit_command_executions WHERE build_id = ?").run(build);
518
489
  }
519
490
  }
520
491
 
521
-
522
492
  function parseExecutionSnapshot(row: Row): BuildExecutionSnapshot {
523
493
  assert(typeof row.created_at === "number", "SQLite Execution creation time is invalid");
524
494
  assert(row.wake_at === null || typeof row.wake_at === "number", "SQLite Execution wake time is invalid");
@@ -538,6 +508,7 @@ function parseExecutionSnapshot(row: Row): BuildExecutionSnapshot {
538
508
  return {
539
509
  ...parseExecutionRequest(row, "Execution"),
540
510
  createdAt: row.created_at,
511
+ ...(typeof row.started_at === "number" ? { startedAt: row.started_at } : {}),
541
512
  ...(typeof row.wake_at === "number" ? { wakeAt: row.wake_at } : {}),
542
513
  ...(typeof row.operation_wait_json === "string" ? { operationWait: JSON.parse(row.operation_wait_json) as string[] } : {}),
543
514
  ...(typeof row.turn_owner === "string" ? {
@@ -582,12 +553,12 @@ class SqliteBuildExecutionStore implements BuildExecutionStore {
582
553
  nonNegativeInteger(now, "Execution creation time");
583
554
  this.#database.prepare(`
584
555
  INSERT INTO hypit_executions (
585
- build_id, component_packages_json, result_location_json, created_at, wake_at,
556
+ build_id, component_packages_json, result_location_json, context_json, created_at, wake_at,
586
557
  turn_owner, turn_acquired_at, result_writer_owner, result_writer_acquired_at,
587
558
  stop_cause, stop_reason,
588
559
  decision_outcome, decision_reason, attention_step, attention_error
589
- ) VALUES (?, ?, ?, ?, ?, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
590
- `).run(request.build, JSON.stringify(request.componentPackages), JSON.stringify(request.result), now, now);
560
+ ) VALUES (?, ?, ?, ?, ?, ?, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
561
+ `).run(request.build, JSON.stringify(request.componentPackages), JSON.stringify(request.result), request.context === undefined ? null : JSON.stringify(request.context), now, now);
591
562
  return {
592
563
  ...copy(request),
593
564
  createdAt: now,
@@ -608,19 +579,20 @@ class SqliteBuildExecutionStore implements BuildExecutionStore {
608
579
  return rows.map(parseExecutionSnapshot);
609
580
  }
610
581
 
611
- async claim(owner: string, now = Date.now()): Promise<BuildExecutionSnapshot | undefined> {
582
+ async claim(owner: string, now = Date.now(), build?: string): Promise<BuildExecutionSnapshot | undefined> {
612
583
  assert(owner.trim().length > 0, "Execution turn owner is empty");
613
584
  nonNegativeInteger(now, "Execution claim time");
614
585
  return transaction(this.#database, () => {
615
586
  const row = this.#database.prepare(`
616
587
  SELECT execution.build_id FROM hypit_executions AS execution
617
588
  WHERE decision_outcome IS NULL AND turn_owner IS NULL AND wake_at <= ?
589
+ AND (? IS NULL OR execution.build_id = ?)
618
590
  ORDER BY EXISTS (
619
591
  SELECT 1 FROM hypit_capacity AS capacity
620
592
  WHERE capacity.build_id = execution.build_id
621
593
  ) DESC, wake_at ASC, created_at ASC, execution.build_id ASC
622
594
  LIMIT 1
623
- `).get(now) as Row | undefined;
595
+ `).get(now, build ?? null, build ?? null) as Row | undefined;
624
596
  if (row === undefined) return undefined;
625
597
  assert(typeof row.build_id === "string", "SQLite ready Execution has no Build id");
626
598
  const updated = this.#database.prepare(`
@@ -635,6 +607,45 @@ class SqliteBuildExecutionStore implements BuildExecutionStore {
635
607
  });
636
608
  }
637
609
 
610
+ async listUnstarted(): Promise<readonly string[]> {
611
+ return (this.#database.prepare(`SELECT build_id FROM hypit_executions
612
+ WHERE decision_outcome IS NULL AND started_at IS NULL ORDER BY created_at, build_id`).all() as Row[])
613
+ .map((row) => row.build_id as string);
614
+ }
615
+
616
+ async listReady(now = Date.now()): Promise<readonly string[]> {
617
+ return (this.#database.prepare(`SELECT build_id FROM hypit_executions
618
+ WHERE decision_outcome IS NULL AND turn_owner IS NULL AND wake_at <= ?
619
+ ORDER BY wake_at, created_at, build_id`).all(now) as Row[]).map((row) => row.build_id as string);
620
+ }
621
+
622
+ async start(build: string, now = Date.now()): Promise<BuildExecutionSnapshot> {
623
+ nonNegativeInteger(now, "Execution start time");
624
+ const updated = this.#database.prepare(`
625
+ UPDATE hypit_executions SET started_at = ?
626
+ WHERE build_id = ? AND started_at IS NULL AND decision_outcome IS NULL
627
+ `).run(now, build);
628
+ assert(updated.changes === 1, `Execution ${build} has already started or ended`);
629
+ return (await this.read(build))!;
630
+ }
631
+
632
+ async interrupt(build: string, reason: string): Promise<BuildExecutionSnapshot> {
633
+ return transaction(this.#database, () => {
634
+ const row = this.#database.prepare("SELECT * FROM hypit_executions WHERE build_id = ?").get(build) as Row | undefined;
635
+ assert(row !== undefined, `Execution ${build} does not exist`);
636
+ const current = parseExecutionSnapshot(row);
637
+ if (current.decision !== undefined) return current;
638
+ this.#release(build);
639
+ this.#database.prepare(`
640
+ UPDATE hypit_executions SET decision_outcome = ?, decision_reason = ?,
641
+ turn_owner = NULL, turn_acquired_at = NULL,
642
+ result_writer_owner = NULL, result_writer_acquired_at = NULL
643
+ WHERE build_id = ?
644
+ `).run(current.stop?.cause === "user-cancelled" ? "cancelled" : "failed", current.stop?.reason ?? reason, build);
645
+ return parseExecutionSnapshot(this.#database.prepare("SELECT * FROM hypit_executions WHERE build_id = ?").get(build) as Row);
646
+ });
647
+ }
648
+
638
649
  async releaseTurn(build: string, owner: string, wakeAt: number | undefined, operationWait?: readonly string[]): Promise<BuildExecutionSnapshot> {
639
650
  if (wakeAt !== undefined) nonNegativeInteger(wakeAt, "Execution wakeAt");
640
651
  return transaction(this.#database, () => {
@@ -902,28 +913,6 @@ class SqliteBuildExecutionStore implements BuildExecutionStore {
902
913
  transaction(this.#database, () => this.#release(build));
903
914
  }
904
915
 
905
- async reclaimTurns(now = Date.now()): Promise<readonly string[]> {
906
- nonNegativeInteger(now, "Execution turn reclaim time");
907
- return transaction(this.#database, () => {
908
- const rows = this.#database.prepare(
909
- "SELECT build_id FROM hypit_executions WHERE turn_owner IS NOT NULL AND decision_outcome IS NULL",
910
- ).all() as Row[];
911
- const builds = rows.map((row) => {
912
- assert(typeof row.build_id === "string", "SQLite owned Execution has no Build id");
913
- return row.build_id;
914
- });
915
- for (const row of rows) {
916
- assert(typeof row.build_id === "string", "SQLite active Execution is invalid");
917
- this.#database.prepare(`
918
- UPDATE hypit_executions
919
- SET turn_owner = NULL, turn_acquired_at = NULL, wake_at = ?
920
- WHERE build_id = ? AND decision_outcome IS NULL
921
- `).run(now, row.build_id);
922
- }
923
- return builds;
924
- });
925
- }
926
-
927
916
  async listCapacity(): Promise<readonly CapacityReservation[]> {
928
917
  return (this.#database.prepare(
929
918
  "SELECT * FROM hypit_capacity ORDER BY created_at ASC, build_id ASC, command_id ASC",
@@ -961,7 +950,6 @@ export class SqliteRuntimeState {
961
950
  readonly commandExecutions: CommandExecutionStore;
962
951
  readonly execution: BuildExecutionStore;
963
952
  readonly catalog: BuildCatalog;
964
- readonly environment: RuntimeEnvironmentStore;
965
953
  readonly submissions: PendingBuildStore;
966
954
  readonly #database: DatabaseSync;
967
955
 
@@ -1007,6 +995,7 @@ export class SqliteRuntimeState {
1007
995
  command_id TEXT NOT NULL,
1008
996
  status TEXT NOT NULL CHECK (status IN ('started', 'completed')),
1009
997
  event_json TEXT,
998
+ activity_json TEXT,
1010
999
  PRIMARY KEY (build_id, command_id)
1011
1000
  ) STRICT;
1012
1001
  CREATE TABLE IF NOT EXISTS hypit_build_catalog (
@@ -1018,13 +1007,16 @@ export class SqliteRuntimeState {
1018
1007
  build_id TEXT PRIMARY KEY,
1019
1008
  component_packages_json TEXT NOT NULL,
1020
1009
  result_location_json TEXT NOT NULL,
1010
+ context_json TEXT,
1021
1011
  created_at INTEGER NOT NULL
1022
1012
  ) STRICT;
1023
1013
  CREATE TABLE IF NOT EXISTS hypit_executions (
1024
1014
  build_id TEXT PRIMARY KEY,
1025
1015
  component_packages_json TEXT NOT NULL,
1026
1016
  result_location_json TEXT NOT NULL,
1017
+ context_json TEXT,
1027
1018
  created_at INTEGER NOT NULL,
1019
+ started_at INTEGER,
1028
1020
  wake_at INTEGER,
1029
1021
  operation_wait_json TEXT,
1030
1022
  turn_owner TEXT,
@@ -1062,17 +1054,26 @@ export class SqliteRuntimeState {
1062
1054
  resource_id TEXT PRIMARY KEY, limit_units INTEGER NOT NULL, period_ms INTEGER NOT NULL,
1063
1055
  tokens REAL NOT NULL, updated_at INTEGER NOT NULL
1064
1056
  ) STRICT;
1065
- CREATE TABLE IF NOT EXISTS hypit_runtime_environment (
1066
- singleton INTEGER PRIMARY KEY CHECK (singleton = 1),
1067
- config_json TEXT NOT NULL
1068
- ) STRICT;
1069
1057
  `);
1058
+ if (!options.readOnly) transaction(database, () => {
1059
+ for (const table of ["hypit_submissions", "hypit_executions"]) {
1060
+ const columns = database.prepare(`PRAGMA table_info(${table})`).all() as Row[];
1061
+ if (!columns.some((column) => column.name === "context_json")) database.exec(`ALTER TABLE ${table} ADD COLUMN context_json TEXT`);
1062
+ if (table === "hypit_executions" && !columns.some((column) => column.name === "started_at")) database.exec("ALTER TABLE hypit_executions ADD COLUMN started_at INTEGER");
1063
+ }
1064
+ });
1065
+ // Add the nullable live-activity column without touching any accepted facts or Results.
1066
+ if (!options.readOnly) transaction(database, () => {
1067
+ if (!(database.prepare("PRAGMA table_info(hypit_command_executions)").all() as Row[])
1068
+ .some((column) => column.name === "activity_json")) {
1069
+ database.exec("ALTER TABLE hypit_command_executions ADD COLUMN activity_json TEXT");
1070
+ }
1071
+ });
1070
1072
  this.builds = new SqliteBuildStore(database);
1071
1073
  this.operations = new SqliteOperationStore(database);
1072
1074
  this.commandExecutions = new SqliteCommandExecutionStore(database);
1073
1075
  this.execution = new SqliteBuildExecutionStore(database);
1074
1076
  this.catalog = new SqliteBuildCatalog(database);
1075
- this.environment = new SqliteRuntimeEnvironmentStore(database);
1076
1077
  this.submissions = new SqlitePendingBuildStore(database);
1077
1078
  }
1078
1079
 
@@ -18,7 +18,20 @@ its color is How, and the object's frame is Where. One field has one owner and o
18
18
  ## Controls describe the editing task
19
19
 
20
20
  `bindings` exposes actual author endpoints; `inspector` chooses which to show. A resolved field is
21
- shown only when its binding is writable. The finite controls are independent of the three domains:
21
+ shown when selected by the Companion, including read-only bindings. The interface orders available
22
+ domains as Where, When, How. Read-only values and editable controls share the same sections.
23
+
24
+ A projected entity may supply a few computed `inspector` facts without binding them to Source:
25
+
26
+ ```ts
27
+ inspector: [{ id: "range", label: "Range", domain: "when",
28
+ section: { id: "placement", label: "Placement" }, value: "15–105", unit: "f" }]
29
+ ```
30
+
31
+ The resolved DTO carries an `edit: { language, source }` only for writable author fields.
32
+ The UI uses plain selectable text otherwise; the server requires that endpoint for writes.
33
+ Choose facts that explain the selected object or its controls. Component headers organize lanes;
34
+ the selected entities own their details. The finite controls are independent of the three domains:
22
35
 
23
36
  | Control | Use |
24
37
  | --- | --- |
@@ -30,7 +43,7 @@ shown only when its binding is writable. The finite controls are independent of
30
43
  | `list` | An ordered value described by an array schema, such as a palette or repeated settings. |
31
44
  | `record` | Named values described by an object schema, such as one shadow's parameters. |
32
45
 
33
- Lists and records retain Apply/Reset drafts. Their schema owns value shape. There is no separate
46
+ Lists and records save complete, valid values when editing ends. Incomplete edits show a completion hint; their schema owns value shape. There is no separate
34
47
  palette database, font control protocol, generic CSS editor, or component-supplied DOM renderer.
35
48
  Use text for an expression whose parts cannot meaningfully be edited as one number.
36
49
 
@@ -0,0 +1,98 @@
1
+ # Localizing Studio
2
+
3
+ Studio owns its interface messages; a language pack supplies their wording. The
4
+ English catalog in [locales/en.json](locales/en.json) is the complete list of
5
+ message IDs. [Simplified Chinese](locales/zh-CN.json) uses exactly the same format
6
+ as any additional language. A pack is JSON data, not executable code.
7
+
8
+ ## Add a language
9
+
10
+ Copy `locales/en.json`, change `locale` (a BCP 47 tag such as `ja` or `pt-BR`),
11
+ `name` (the language's native name), and translate the message values. Keep the
12
+ message IDs. `direction` is `ltr` or `rtl` and controls translated text; it does
13
+ not reverse the physical video timeline or canvas coordinates.
14
+
15
+ A small, valid starting point is:
16
+
17
+ ```json
18
+ {
19
+ "locale": "ja",
20
+ "name": "日本語",
21
+ "direction": "ltr",
22
+ "messages": {
23
+ "app.studio": "スタジオ",
24
+ "app.comments": "コメント",
25
+ "app.language": "言語"
26
+ }
27
+ }
28
+ ```
29
+
30
+ Missing messages use English, so a partial translation is useful immediately.
31
+ Text is displayed as text, never interpreted as HTML. Preserve named variables
32
+ such as `{name}` and `{count}`; their order may change to suit the language.
33
+ Messages with `{count}` can be strings or plural forms:
34
+
35
+ ```json
36
+ { "one": "{count} item", "other": "{count} items" }
37
+ ```
38
+
39
+ Use the language's `Intl.PluralRules` categories (`zero`, `one`, `two`, `few`,
40
+ `many`, `other`); `other` is required. Numbers and interface dates use the chosen
41
+ locale. Choose natural full sentences instead of assembling translated fragments.
42
+
43
+ Check and load your file:
44
+
45
+ ```sh
46
+ hypit studio --check-locale ./ja.json
47
+ hypit studio --run ./render.svrun --locale-pack ./ja.json
48
+ ```
49
+
50
+ The check lists missing translations and unknown IDs and reports malformed
51
+ messages or renamed variables. It does not open a Run or require a Runtime.
52
+ Relative file paths start at the command's working directory; prefix them with
53
+ `./` or `../`. Repeat `--locale-pack` to load multiple languages. Packs are read
54
+ at server startup; restart Studio after editing a pack. An explicitly loaded
55
+ pack with an existing locale replaces that locale's pack, with English fallback
56
+ for any omitted messages.
57
+
58
+ ## Share a language pack
59
+
60
+ A local file is sufficient. For reuse, publish it through an ordinary package
61
+ under your own scope; there is no Hypit language registry or separate approval
62
+ step. Export the JSON file in the package's `package.json`, for example:
63
+
64
+ ```json
65
+ {
66
+ "name": "@your-scope/studio-ja",
67
+ "version": "1.0.0",
68
+ "files": ["ja.json"],
69
+ "exports": { "./locale.json": "./ja.json" }
70
+ }
71
+ ```
72
+
73
+ Install it using the project's package manager, then load it explicitly:
74
+
75
+ ```sh
76
+ hypit studio --run ./render.svrun --locale-pack @your-scope/studio-ja/locale.json
77
+ ```
78
+
79
+ Package exports resolve from the project, or `--package-root` when specified.
80
+ Studio reads the resolved JSON without importing package code. It neither scans
81
+ for language packs nor installs missing packages.
82
+
83
+ ## Interface behavior and ownership
84
+
85
+ The globe menu to the left of **Studio / Comments** lists loaded languages by
86
+ their native names. The first visit follows the browser's language preferences;
87
+ subsequent visits retain the choice saved in that browser. Switching updates
88
+ marked labels in place, preserving the playhead, selection and comment draft.
89
+
90
+ Only Studio-owned interface text belongs in this catalog. Component names,
91
+ Companion-supplied labels, Source code, user comments and raw service diagnostics
92
+ retain their original text. Language packs do not change the Companion ABI,
93
+ Core, compilation, or rendering. A component remains the owner of its labels.
94
+
95
+ When adding Studio UI, give each message a stable ID in the English catalog and
96
+ use the helpers in `src/ui/i18n.ts` for text and attributes. Do not use English
97
+ wording as IDs, inspect DOM text to guess what needs translation, or put language
98
+ branches into components. Keep interpolation values separate from message text.
@@ -72,14 +72,78 @@ transient processing require the selected Runtime.
72
72
 
73
73
  ## Opening and editing a session
74
74
 
75
+ The CLI prints the actual session URL and its direct `#comments` URL after the server chooses a port.
76
+ Open the latter to review the current composition before export. Browser playback creates no export
77
+ Build or encoded video; an export remains a separate Run execution when the user wants the file.
78
+
79
+ The top-right **Studio / Comments** tabs change the layout around the same composition player.
80
+ Comments gives the picture the available height with a notes column on the right. Click the picture
81
+ to play or pause; the wider progress control seeks, with a hovered-frame preview that leaves the
82
+ main playhead alone. The hover picture uses one lazy, muted instance of the current preview document,
83
+ released when leaving Comments. It needs no Build or thumbnail files.
84
+
85
+ Studio retains picture selection and its right-click menu for overlapping Companion entities.
86
+ Comments uses viewing controls without selecting objects. Switching views preserves the composition
87
+ time and Studio's selection; comments themselves only refer to a time and the user's words.
88
+
89
+ ### Comments are project files
90
+
91
+ Studio saves comments in `<workspace>/FEEDBACK.json`, creating it on the first saved comment.
92
+ This path is Studio's project-file convention, rooted in the resolved workspace; it is independent
93
+ of the Runtime, Result repository and Agent implementation.
94
+ Each comment records its reviewed Run relative to that workspace, so the file can hold notes for
95
+ several Runs while the UI shows the current Run. Times are seconds, including fractional seconds:
96
+
97
+ ```json
98
+ {
99
+ "comments": [
100
+ {
101
+ "id": "caption-size",
102
+ "run": "runs/main.svrun",
103
+ "at": 12.5,
104
+ "text": "Make this caption larger.",
105
+ "resolved": false
106
+ }
107
+ ]
108
+ }
109
+ ```
110
+
111
+ `id`, `run`, `at` and `text` are required. `resolved` defaults to false; setting it to true marks
112
+ the comment complete, and false reopens it. Deleting removes the entry. Following a note seeks to
113
+ its saved time; a changed composition can show something different at that time.
114
+
115
+ Focusing the comment composer pauses the picture and captures the current frame. The time chip
116
+ captures a new time. The draft keeps its time while the user writes. Click a saved timestamp to
117
+ revisit it. Comments can be edited, completed, reopened and deleted from the UI or by editing the file.
118
+ The list is ordered by timestamp. Its `#1`, `#2` labels follow submission order within the current
119
+ Run (the file's array order) and appear beside the completion control. Changing a timestamp or
120
+ filtering Open/Done preserves those numbers; deleting a note closes its gap in the numbering.
121
+ The stored `id` remains the stable identity. Clicking a note's text or time seeks
122
+ to its frame. The composer has an icon-only send control; emoji and drawing buttons are inactive placeholders.
123
+ Clicking outside the selected note clears its highlight without discarding an edit. Enter sends a
124
+ new note or saves an edited one; Shift+Enter or Alt+Enter inserts a line break. IME confirmation stays
125
+ with the text input rather than submitting the comment.
126
+
127
+ File changes refresh comments through filesystem events, without polling or recompiling the video.
128
+ Studio reads the file afresh for each edit, preserves unrelated notes and project-added fields, and
129
+ rejects an edit to a comment that has changed since it was displayed. An invalid manually edited
130
+ file remains intact and its error is shown. Unsent text stays in the browser. Agent notification is
131
+ a separate, planned connection; **Send comment** currently saves the note only.
132
+
133
+ ### Composition editing
134
+
75
135
  The selected targets must reach one Film and its resolved time source. Studio rejects several
76
- distinct Films in one view; use separate Runs/sessions for those. A SemanticTrack supplies the
77
- Script lane and performance timing, including wordless Segments with media spans. A declared
78
- ProgramSpace supplies authored animation time without a Script lane. Both show their component
79
- tracks and use the same rendering and parameter-editing machinery. When the snapshot contains
80
- a semantic timeline, its lane and label stay pinned directly below the time ruler while
81
- component tracks scroll. Its presence follows the resolved semantic timeline, including
82
- wordless content, rather than a component name or the presence of spoken words.
136
+ distinct Films in one view; use separate Runs/sessions for those. A Timeline supplies the
137
+ placed material and semantic timing, including wordless Segments. The ruler always shows program
138
+ time. When placed Segments are present, its left Timeline header spans the time ticks and the
139
+ Segment, Word and Selection/Moment bands. Empty Word or marker bands are omitted based on the
140
+ whole work, not the visible window or playhead. With no Segments, only the ordinary time ruler remains.
141
+ The complete ruler area stays pinned while component tracks scroll.
142
+
143
+ Semantic objects retain declaration-order drawing within each band. Their fine borders distinguish
144
+ adjacent and overlapping intervals without inventing time gaps. Selection raises an object above
145
+ its peers; playback highlighting changes color without changing that order. Right-click an overlap
146
+ to choose a covered object. These are editor presentation rules, independent of Film paint order.
83
147
 
84
148
  Open the URL printed by Vite. Studio requests port 5179 by default, accepts `--port`,
85
149
  and Vite can choose another available port when it is occupied. Reuse that process
@@ -90,11 +154,14 @@ package code or imports that introduce new packages. Browser refresh does not re
90
154
  server-side package modules.
91
155
 
92
156
  The Source pane can edit the selected `.svml`, `.svs` or `.svrun` file. The Inspector
93
- shows project facts when no entity is selected and only declared writable fields for
157
+ shows project facts when no entity is selected and declared facts and author fields for
94
158
  the selected entity. A reference can resolve to a shared Frame or Recipe, so one edit
95
- may affect several consumers. Structured fields use Apply/Reset for their local draft.
159
+ may affect several consumers. Structured fields save together when editing ends and the value is complete; missing required values stay in the editor with a completion hint.
96
160
  Check save status; source conflicts reject stale edits rather than overwrite newer files.
97
161
 
162
+ The Timeline owns the editor's complete range; displayed objects do not extend it. Take placement
163
+ and complete extent are reference information in Studio.
164
+
98
165
  Timeline gestures use explicit temporal authority. Moving a shared Selection or
99
166
  Moment edits Script and moves its consumers after recompilation. A parameter-based
100
167
  handle edits its exact authored parameter. Fixed or derived values with no supported
@@ -137,12 +204,11 @@ at runtime. Ship the Companion's compiled JavaScript with its component package.
137
204
  The companion owns what its Track means: matching, required same-Surface values,
138
205
  entities, lane range, finite chrome, title and ordered text/material layers,
139
206
  source bindings, Inspector fields and executed temporal lineage. Inspector fields
140
- select real writable bindings and organize them under the Studio-owned
141
- `Where / How / When` domains, optional companion-owned pages and sections. A
207
+ select real bindings or package-owned facts and organize them under the Studio-owned
208
+ `Where / When / How` domains, optional companion-owned pages and sections. A
142
209
  source binding is never shown merely because Studio can reach it. Material layers carry a
143
- Resource id or Surface identity, never a Studio HTTP URL. Studio always owns
144
- time formatting and transport resolution, so chrome and material cannot hide a
145
- title or its time.
210
+ Resource id or Surface identity, never a Studio HTTP URL. Studio owns time formatting and transport resolution. Compact chrome shows one primary label;
211
+ computed time remains available in its tooltip rather than competing with that label.
146
212
  Studio owns session-wide behavior and chrome: Companion assembly, single-row overlap display,
147
213
  fallback defaults, selection treatment, playback, zoom,
148
214
  scrolling, the finite Inspector control set and source mutation transport. A
@@ -184,3 +250,24 @@ semantics.
184
250
 
185
251
  Read [`@hypit/studio-adapter`](../studio-adapter/README.md) for the Companion ABI,
186
252
  project activation example, value projection and Inspector declarations.
253
+
254
+ ## Composition audio preview
255
+
256
+ The preview consumes generic AudioClips: source sampling, fixed gain, program-sample gain envelopes,
257
+ audibility regions and target-relative fades. Web Audio gain nodes schedule the independent factors
258
+ on the same clock, including silence and amplification above unity. Visual video elements stay muted;
259
+ the Film's selected AudioTracks own composition sound. Seeking is silent. This path is independent of
260
+ which component emitted a clip.
261
+
262
+ ### Interface language
263
+
264
+ The globe menu to the left of **Studio / Comments** selects a language. English
265
+ and Simplified Chinese are included; additional JSON language packs can be loaded
266
+ with `--locale-pack`, from local files or installed package exports. The first
267
+ visit follows browser preferences, and later visits remember the user's choice.
268
+ Switching preserves the playhead, selection and comment draft.
269
+
270
+ [Localizing Studio](LOCALIZATION.md) explains the message catalog, plural forms,
271
+ translation checks and language-pack distribution. Only Studio-owned interface
272
+ text is translated; Companion labels, project content and raw diagnostics retain
273
+ their original text. The Companion ABI is unchanged.