@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
@@ -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
 
@@ -0,0 +1,117 @@
1
+ # Companion-owned Inspector fields
2
+
3
+ The Inspector asks three questions. **Where** describes spatial placement and organization;
4
+ **When** describes scheduling, playback and changes over time; **How** describes appearance,
5
+ content and sound. These are navigation domains, not restrictions on component behavior.
6
+
7
+ | Domain | Useful pages and sections |
8
+ | --- | --- |
9
+ | Where | Position, size, anchor, fitting/cropping, padding, clipping, stacking, layout |
10
+ | When | Placement in time, playback/cycling, source trim, entrance, sustained motion, exit, transitions, fades |
11
+ | How | Text/content, typography, fill/stroke, image adjustments, shadows, effect character, audio levels |
12
+
13
+ Each Companion supplies page and section IDs and labels in declaration order. These examples are
14
+ a shared vocabulary, not a registry of permitted pages. A new component can name a useful grouping
15
+ without a Studio change. Put a field where its authoring decision belongs: motion duration is When,
16
+ its color is How, and the object's frame is Where. One field has one owner and one location.
17
+
18
+ ## Controls describe the editing task
19
+
20
+ `bindings` exposes actual author endpoints; `inspector` chooses which to show. A resolved field is
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:
35
+
36
+ | Control | Use |
37
+ | --- | --- |
38
+ | `text` | Text, identifiers, or a meaningful expression. `multiline: true` provides a textarea. |
39
+ | `number` | A scalar with optional limits, stepping, display scaling, or an authored suffix. |
40
+ | `boolean` | A two-state switch. |
41
+ | `select` | A finite choice, including presets, font families or numeric weights. |
42
+ | `color` | Hex text and a native color picker; optional `swatches` offers package-chosen colors. |
43
+ | `list` | An ordered value described by an array schema, such as a palette or repeated settings. |
44
+ | `record` | Named values described by an object schema, such as one shadow's parameters. |
45
+
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
47
+ palette database, font control protocol, generic CSS editor, or component-supplied DOM renderer.
48
+ Use text for an expression whose parts cannot meaningfully be edited as one number.
49
+
50
+ ## Separate author values from display values
51
+
52
+ The DTO retains the authored `value`. A numeric presentation describes the small, reversible
53
+ conversion into the editor. The server applies the inverse, validates the **authored** value against
54
+ its public schema, and uses the author language's serializer. Source ranges and existing transactions
55
+ still own the write. Failed validation or recompilation does not publish a partial edit.
56
+
57
+ ```ts
58
+ // Authored as "78%" or "240px": edit only the magnitude, keep the existing unit.
59
+ { binding: "frame.width", label: "Width", domain: "where",
60
+ section: { id: "size", label: "Size" }, control: "number",
61
+ number: { suffixes: ["%", "px"], step: 1 } }
62
+
63
+ // Authored as 0.78: display 78 %, write 0.42 when the author enters 42.
64
+ { binding: "appearance.opacity", label: "Opacity", domain: "how",
65
+ section: { id: "image", label: "Image" }, control: "number", unit: "%",
66
+ number: { scale: 100, minimum: 0, maximum: 100, step: 1 } }
67
+ ```
68
+
69
+ `unit` is a label, not an instruction to append text. `suffixes` explicitly declares a string-valued
70
+ number and retains whichever admitted suffix the current source uses. It does not convert `%` into
71
+ pixels or seconds into frames. `scale` is positive; displayed value = authored magnitude × scale.
72
+ Limits and step in `number` refer to displayed values. A number schema's limits and integer setting
73
+ also inform the input when no presentation override is provided. Empty input is not silently zero.
74
+
75
+ SVML strings escape attribute delimiters and entity characters. SVS values use `formatSvsValue`.
76
+ Neither the UI nor a Companion writes source text through an arbitrary callback. Timeline temporal
77
+ gestures are separate from Inspector field conversion; see the temporal author forms for their
78
+ semantic-anchor and local-offset editing behavior.
79
+
80
+ ## Choices retain their actual value
81
+
82
+ Existing string options are shorthand for identical value and label. Rich options can supply a
83
+ different label, description and one small visual hint:
84
+
85
+ ```ts
86
+ options: [
87
+ { value: "brand-serif", label: "Brand Serif", description: "Project headline face",
88
+ preview: { kind: "font", family: "Project Serif", sample: "Aa 字幕" } },
89
+ { value: "brand-sans", label: "Brand Sans" },
90
+ ]
91
+ ```
92
+
93
+ A color hint uses `{ kind: "color", color: "#FF584A" }`. Values may be strings, numbers or booleans;
94
+ the selected value, not its display label, is validated and written. Preview hints contain data only.
95
+ Options remain named keyboard-operable choices. Font hints use a family available to the Studio
96
+ document; declaring a hint does not install or load a font or change the composition's font bytes.
97
+
98
+ The optional `@hypit/fonts-open/studio` helper owns its catalog labels and descriptions. Caption,
99
+ Typography and Ranking Companions use it to reach a Style's referenced font and edit its `family`
100
+ attribute. It appears for an actual writable family attribute; a `media:Font` file has no such
101
+ attribute. The family still has to supply the authored weight and style. A local font keeps its exact
102
+ file binding. Changing a shared font changes every consumer; this is visible Source reuse.
103
+
104
+ Nested `referenced` declarations follow explicit author references, such as Style → Font → family.
105
+ They neither scan for candidates nor replace whole-value references with strings. Project components
106
+ can declare their own option values and binding paths through the same ABI.
107
+
108
+ ## Implementation owners
109
+
110
+ - `studio-adapter` owns the data-only declarations and snapshot types.
111
+ - Component Companions own grouping, choices, units and references to writable author facts.
112
+ - Studio resolves endpoints, renders controls, converts display values and commits source edits.
113
+ - SVML/SVS and the component's ordinary compilation remain the authority for valid authored work.
114
+
115
+ The UI follows native numeric input behavior and named listbox options; reference material:
116
+ [MDN numeric inputs](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/number),
117
+ [WAI listbox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/).
@@ -14,11 +14,55 @@ When `--runtime` is omitted, Studio reads the resolved project's `.hypit/runtime
14
14
  selection made by `hypit runtime use`. It does not search parent projects for a
15
15
  Profile. `--workspace` explicitly selects the project boundary; `--package-root`
16
16
  overrides the author package resolution root when those locations intentionally differ.
17
+ Startup prints the project, Run, Profile and whether the Profile came from the command argument or
18
+ the project's selection file. Relative command-line paths start at the invoking directory;
19
+ `--workspace` selects the project without rebasing `--run` or `--runtime`.
17
20
  The upper-left library is intentionally not a filesystem browser:
18
21
 
19
22
  - Source is the exact Run + Author closure and writes back only the selected file;
20
- - Tasks combine finished project Results with read-only active `BuildView` and Operation information;
21
- - Artifacts are public files exposed by project Build Results.
23
+ - Tasks show one card per Build, with All, In progress and Finished filters. Active progress comes from
24
+ the selected Runtime's read-only control interface; completed, failed and cancelled Builds come
25
+ from the project's Result Repository. Saving a Result and an issue requiring attention remain
26
+ visible, with the source Run and available progress or failure reason.
27
+ - Artifacts show top-level file Outputs whose declared MIME type is image, video or audio,
28
+ including files already published by ongoing Builds. Composite Outputs retain their structure:
29
+ the library does not extract their embedded resources. Forwarded file Outputs resolve to their
30
+ owner; references to the same owner file share one card and retain their origins. Highlighted
31
+ Outputs sort first, without excluding other media.
32
+
33
+ Source, Tasks and Artifacts use the shared `ui/sidebar-panel.ts` layout and navigation buttons. Each view
34
+ owns its toolbar content, data and actions; the shared shell owns geometry and navigation styling.
35
+
36
+ Views load on entry; returning to Tasks preserves its loaded list and selection. Explicit Refresh reads the latest state. There is no library polling.
37
+ Refresh replaces the current snapshot; scrolling to the end loads more finished Results. Failed
38
+ refreshes preserve the last view and show the error. Artifacts show project media through an icon sidebar: All media, Videos, Images and Audio.
39
+ The header names the category and offers Refresh. Selecting a Task adds its name beside the category in the existing header, establishing a session-local task context without shifting the list; its arrow opens that Build's media. The context remains across tab changes. Click its name to return to the selected Task, or clear it to browse project media. Task selection does not write Source, Result or Runtime state. Selected tasks expand the complete error text with a copy action. Source details are available on each media card. A media category is sent to the server, which
40
+ walks Result metadata pages until it collects a useful batch of matching files or reaches the end.
41
+ This keeps Build storage unchanged while avoiding empty category pages. The browser appends
42
+ older matches on scroll; Refresh reads the latest results for the current category.
43
+
44
+ Media cards use fixed-size square cells, contain the file at its own aspect ratio, and show up to two
45
+ wrapped name lines below. Selection colors the thumbnail area and name separately, without an
46
+ outer card border. Resizing the
47
+ sidebar distributes spare width between columns, then adds a column when another fixed-size
48
+ card fits. Card size stays unchanged. Video thumbnails decode a frame in the browser; audio waveforms are also
49
+ browser presentation, not additional Result files. Thumbnails load as their cells enter view.
50
+ The CLI carries the author's component name from compilation provenance into the Result's
51
+ optional Output `displayName`. The public Output identifier stays intact for references;
52
+ Outputs without a display name show that identifier unchanged. Double-click a name or press F2
53
+ to edit it in full; Enter or blur saves, Escape cancels. Failed saves retain the text and show the
54
+ reason. A completed, failed or cancelled Build's name is written through Result Repository
55
+ `updatePresentation` to that exact Output's `displayName`. Ongoing Builds become editable when
56
+ they finish, following the existing Result presentation-edit boundary. Renaming never changes
57
+ Output identity, referenced media files or other Builds' names for the same file.
58
+
59
+ The composition has a frame-snapped progress slider and current/total time.
60
+ Clicking a card opens the file in the central preview and pauses the composition. Images need
61
+ no transport; video and audio share the play/mute controls and a seconds-based scrubber above
62
+ the playback bar. The previous/next buttons skip five seconds for media, and step one frame
63
+ for the composition. Back to composition restores the existing composition playhead. Selecting
64
+ or seeking in the composition timeline also returns to it. Opening media changes no Source,
65
+ Run, or Candidate selection.
22
66
 
23
67
  No project manifest, Studio database, output-directory scan or inferred campaign
24
68
  folder structure is involved. With no selected Runtime, finished Result tasks and
@@ -28,11 +72,78 @@ transient processing require the selected Runtime.
28
72
 
29
73
  ## Opening and editing a session
30
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
+
31
135
  The selected targets must reach one Film and its resolved time source. Studio rejects several
32
- distinct Films in one view; use separate Runs/sessions for those. A SemanticTrack supplies the
33
- Script lane and performance timing, including wordless Segments with media spans. A declared
34
- ProgramSpace supplies authored animation time without a Script lane. Both show their component
35
- tracks and use the same rendering and parameter-editing machinery.
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.
36
147
 
37
148
  Open the URL printed by Vite. Studio requests port 5179 by default, accepts `--port`,
38
149
  and Vite can choose another available port when it is occupied. Reuse that process
@@ -43,20 +154,37 @@ package code or imports that introduce new packages. Browser refresh does not re
43
154
  server-side package modules.
44
155
 
45
156
  The Source pane can edit the selected `.svml`, `.svs` or `.svrun` file. The Inspector
46
- 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
47
158
  the selected entity. A reference can resolve to a shared Frame or Recipe, so one edit
48
- 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.
49
160
  Check save status; source conflicts reject stale edits rather than overwrite newer files.
50
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
+
51
165
  Timeline gestures use explicit temporal authority. Moving a shared Selection or
52
166
  Moment edits Script and moves its consumers after recompilation. A parameter-based
53
167
  handle edits its exact authored parameter. Fixed or derived values with no supported
54
168
  inverse remain read-only. Seeing an entity does not promise every drag gesture.
169
+
170
+ A direct `during={selection}` move advances both endpoints by the same number of semantic
171
+ stops (distinct frame positions), so its duration may change. `at/for` moves its event and
172
+ offers a trailing duration trim; `until/for` offers the corresponding leading trim.
173
+ An Instant reference expression edits only its offset; a bare reference has an implicit zero offset.
174
+ `start/end` trims edit the corresponding expression; moving the window shifts both by the same
175
+ frame delta. Edited clock values and offsets are written in frames at the current ProgramSpace rate.
176
+ The semantic marker Inspector exposes exact anchor identities and, where a
177
+ declared handle supports it, offers choices among coincident anchors.
178
+ See [temporal author forms](../temporal-markup/EDITING.md) for the complete behavior.
179
+
55
180
  Tasks and Artifacts are inspection surfaces; selecting an Artifact does not write a
56
181
  Run Candidate. Use `build-record`/`satisfy` in the Run for explicit Output reuse.
57
182
 
58
183
  ## Component presentation
59
184
 
185
+ [Inspector fields](INSPECTOR.md) describes Where/When/How grouping, numeric unit conversion,
186
+ rich choices, fonts, color suggestions and exact Source writeback.
187
+
60
188
  Studio is an application boundary. Core and domain computation do not import it or
61
189
  register UI metadata. The installed Distribution explicitly selects one independent
62
190
  Studio Companion per supported official domain. Packages actually selected by the
@@ -76,13 +204,12 @@ at runtime. Ship the Companion's compiled JavaScript with its component package.
76
204
  The companion owns what its Track means: matching, required same-Surface values,
77
205
  entities, lane range, finite chrome, title and ordered text/material layers,
78
206
  source bindings, Inspector fields and executed temporal lineage. Inspector fields
79
- select real writable bindings and organize them under the Studio-owned
80
- `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
81
209
  source binding is never shown merely because Studio can reach it. Material layers carry a
82
- Resource id or Surface identity, never a Studio HTTP URL. Studio always owns
83
- time formatting and transport resolution, so chrome and material cannot hide a
84
- title or its time.
85
- Studio owns session-wide behavior and chrome: Companion assembly, collision rules,
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.
212
+ Studio owns session-wide behavior and chrome: Companion assembly, single-row overlap display,
86
213
  fallback defaults, selection treatment, playback, zoom,
87
214
  scrolling, the finite Inspector control set and source mutation transport. A
88
215
  companion cannot ship arbitrary DOM or CSS into the application.
@@ -123,3 +250,11 @@ semantics.
123
250
 
124
251
  Read [`@hypit/studio-adapter`](../studio-adapter/README.md) for the Companion ABI,
125
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.