@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
@@ -43,6 +43,8 @@ export type DoctorOutput = {
43
43
  readonly ok: boolean;
44
44
  readonly project: string;
45
45
  readonly profile?: string;
46
+ readonly profileSource?: "argument" | "project" | "none";
47
+ readonly selectionFile?: string;
46
48
  readonly diagnosticCount: number;
47
49
  readonly diagnostics: readonly CliDiagnostic[];
48
50
  readonly omittedDiagnostics?: number;
@@ -58,7 +60,7 @@ export type AuthorCheckOutput = {
58
60
  readonly assets: number;
59
61
  readonly modules: number;
60
62
  readonly outputCount: number;
61
- readonly outputs: readonly {
63
+ readonly outputs?: readonly {
62
64
  readonly name: string;
63
65
  readonly type: string;
64
66
  }[];
@@ -80,6 +82,7 @@ export type RunCheckOutput = {
80
82
  readonly targets: readonly string[];
81
83
  readonly candidates: number;
82
84
  readonly satisfactions: number;
85
+ readonly historicalOutputCount?: number;
83
86
  readonly steps?: number;
84
87
  readonly unresolvedHistoricalOutputs?: readonly {
85
88
  readonly candidate: string;
@@ -92,7 +95,7 @@ export type RunCheckOutput = {
92
95
  export type PlanPreflight = {
93
96
  readonly ok: boolean;
94
97
  readonly capabilityCount: number;
95
- readonly capabilities: readonly string[];
98
+ readonly capabilities?: readonly string[];
96
99
  readonly omittedCapabilities?: number;
97
100
  readonly diagnosticCount: number;
98
101
  readonly diagnostics: readonly CliDiagnostic[];
@@ -117,7 +120,7 @@ export type PlanOutput = {
117
120
  readonly run: string;
118
121
  readonly targetCount: number;
119
122
  readonly targets: readonly string[];
120
- readonly steps: number;
123
+ readonly steps?: number;
121
124
  readonly requestCount: number;
122
125
  readonly requestIssueCount: number;
123
126
  /** Present when a Runtime Profile was selected. */
@@ -126,19 +129,45 @@ export type PlanOutput = {
126
129
  readonly unresolvedRequestCount?: number;
127
130
  readonly unsupportedRequestCount?: number;
128
131
  readonly choiceCount: number;
129
- readonly choices: readonly { readonly output: string; readonly candidate: string }[];
132
+ readonly choices?: readonly { readonly output: string; readonly candidate: string }[];
130
133
  readonly omittedChoices?: number;
131
134
  readonly unreached?: readonly { readonly output: string; readonly operation: string }[];
132
135
  readonly omittedUnreached?: number;
133
136
  /** Present only when a Runtime Profile was selected; the Endpoint and price page behind each capability. */
134
137
  readonly providers?: readonly PlanProvider[];
135
- readonly omittedProviders?: number;
136
138
  /** Every external request the Build will make, in step order, with its parameters when known. */
137
139
  readonly needs?: readonly PlanNeed[];
138
- readonly omittedNeeds?: number;
139
140
  readonly preflight?: PlanPreflight;
140
141
  };
141
142
 
143
+ /** Output scope is independent of encoding. Limits apply to expanded detail, not demanded work. */
144
+ export function createPlanOutput(plan: PlanOutput, options: { readonly verbose: boolean; readonly limit: number }): PlanOutput {
145
+ const { steps, choices = [], unreached = [], preflight, ...summary } = plan;
146
+ const limit = options.limit;
147
+ return {
148
+ ...summary,
149
+ ...(options.verbose ? {
150
+ steps,
151
+ choices: choices.slice(0, limit),
152
+ ...(choices.length <= limit ? {} : { omittedChoices: choices.length - limit }),
153
+ unreached: unreached.slice(0, limit),
154
+ ...(unreached.length <= limit ? {} : { omittedUnreached: unreached.length - limit }),
155
+ } : {}),
156
+ ...(preflight === undefined ? {} : { preflight: {
157
+ ok: preflight.ok,
158
+ capabilityCount: preflight.capabilityCount,
159
+ diagnosticCount: preflight.diagnosticCount,
160
+ diagnostics: preflight.diagnostics,
161
+ ...(options.verbose ? {
162
+ capabilities: preflight.capabilities?.slice(0, limit) ?? [],
163
+ ...((preflight.capabilities?.length ?? 0) <= limit ? {} : {
164
+ omittedCapabilities: preflight.capabilities!.length - limit,
165
+ }),
166
+ } : {}),
167
+ } }),
168
+ };
169
+ }
170
+
142
171
  export type PricingEntry = PlanProvider & {
143
172
  readonly pricingDocuments?: readonly PricingDocument[];
144
173
  readonly pricingError?: string;
@@ -272,9 +301,16 @@ function renderDoctor(view: Extract<CliPresentation, { kind: "doctor" }>, io: Cl
272
301
  const lines = [colors.accent(colors.strong("Hypit Doctor")), ""];
273
302
  lines.push(...facts([
274
303
  ["Project", shortPath(view.machine.project)],
275
- ...(view.machine.profile === undefined ? [] : [["Profile", shortPath(view.machine.profile)] as const]),
304
+ ["Runtime Profile", view.machine.profile === undefined ? "not selected" : shortPath(view.machine.profile)],
305
+ ...(view.machine.profileSource === "argument"
306
+ ? [["Runtime selection", "command argument (this invocation only)"] as const]
307
+ : view.machine.selectionFile === undefined ? [] : [["Runtime selection", shortPath(view.machine.selectionFile)] as const]),
308
+ ["Scope", view.machine.profile === undefined ? "project Results only" : "selected Runtime and project Results"],
276
309
  ], colors));
277
310
  lines.push("");
311
+ if (view.machine.profile === undefined) {
312
+ lines.push("Select an existing Profile with hypit runtime use <profile>, or pass --runtime <profile> to check it.", "");
313
+ }
278
314
  if (view.machine.diagnostics.length === 0) {
279
315
  lines.push(heading("success", "No problems found", io, colors));
280
316
  } else {
@@ -301,7 +337,7 @@ function renderAuthorCheck(
301
337
  verbose: boolean,
302
338
  ): string {
303
339
  const lines = [heading("success", "Source is valid", io, colors), ""];
304
- const readable = view.machine.outputs;
340
+ const readable = view.machine.outputs ?? [];
305
341
  lines.push(...facts([
306
342
  ["Source", shortPath(view.machine.source)],
307
343
  ["Outputs", String(view.machine.outputCount)],
@@ -341,8 +377,7 @@ function renderRunCheck(
341
377
  verbose: boolean,
342
378
  ): string {
343
379
  const lines = [heading("success", "Run source is valid", io, colors), ""];
344
- const reuse = (view.machine.unresolvedHistoricalOutputs?.length ?? 0)
345
- + (view.machine.omittedHistoricalOutputs ?? 0);
380
+ const reuse = view.machine.historicalOutputCount ?? 0;
346
381
  const targetSummary = view.machine.targets.length === 0
347
382
  ? String(view.machine.targetCount)
348
383
  : view.machine.targets.join(", ")
@@ -424,7 +459,7 @@ function needSummaryText(needs: readonly PlanNeed[]): string {
424
459
  const pendingCount = first.pending.length;
425
460
  if (pendingCount > 0) parts.push(`${pendingCount === 1 ? "input" : `${pendingCount} inputs`} produced during Build`);
426
461
  if (first.issue !== undefined) parts.push(`could not inspect: ${first.issue}`);
427
- return parts.length === 0 ? "no parameters" : parts.join(" · ");
462
+ return parts.length === 0 ? "request summary unavailable" : parts.join(" · ");
428
463
  }
429
464
 
430
465
  /** One line per distinct request shape, counted; the step names when only one request has that shape. */
@@ -480,6 +515,7 @@ function renderPlan(
480
515
  ["Run", shortPath(view.machine.run)],
481
516
  ["Targets", targetSummary],
482
517
  ["Requests", String(view.machine.requestCount)],
518
+ ...(view.machine.choiceCount === 0 ? [] : [["Run choices", String(view.machine.choiceCount)] as const]),
483
519
  ...(view.machine.requestIssueCount === 0 ? [] : [["Request issues", String(view.machine.requestIssueCount)] as const]),
484
520
  ...((view.machine.providerRequestCount ?? 0) === 0 ? [] : [["Provider requests", String(view.machine.providerRequestCount)] as const]),
485
521
  ...((view.machine.localRequestCount ?? 0) === 0 ? [] : [["Local requests", String(view.machine.localRequestCount)] as const]),
@@ -488,7 +524,7 @@ function renderPlan(
488
524
  ...(view.machine.preflight === undefined ? [] : [[
489
525
  "Preflight", view.machine.preflight.ok ? "ready" : "needs attention",
490
526
  ] as const]),
491
- ...(verbose ? [["Steps", String(view.machine.steps)] as const] : []),
527
+ ...(!verbose || view.machine.steps === undefined ? [] : [["Steps", String(view.machine.steps)] as const]),
492
528
  ], colors));
493
529
  if (view.machine.providers !== undefined) {
494
530
  if (view.machine.providers.length > 0) lines.push("", colors.strong("Providers and price pages"));
@@ -522,9 +558,6 @@ function renderPlan(
522
558
  const requests = new Set(group.map((provider) => provider.request));
523
559
  lines.push(...groupedNeedLines((view.machine.needs ?? []).filter((need) => requests.has(need.request)), colors, verbose));
524
560
  }
525
- if ((view.machine.omittedProviders ?? 0) > 0) {
526
- lines.push(` ${colors.dim(`${view.machine.omittedProviders} more requests · use --limit <count>`)}`);
527
- }
528
561
  } else if (view.machine.requestCount > 0) {
529
562
  const byCapability = new Map<string, PlanNeed[]>();
530
563
  for (const need of view.machine.needs ?? []) {
@@ -550,9 +583,9 @@ function renderPlan(
550
583
  }
551
584
  if (view.machine.preflight !== undefined
552
585
  && (view.machine.preflight.diagnostics.length > 0
553
- || (verbose && view.machine.preflight.capabilities.length > 0))) {
586
+ || (verbose && (view.machine.preflight.capabilities?.length ?? 0) > 0))) {
554
587
  lines.push("", colors.strong("Runtime preflight"));
555
- if (verbose) for (const capability of view.machine.preflight.capabilities) lines.push(` ${colors.accent(capability)}`);
588
+ if (verbose) for (const capability of view.machine.preflight.capabilities ?? []) lines.push(` ${colors.accent(capability)}`);
556
589
  if (verbose && (view.machine.preflight.omittedCapabilities ?? 0) > 0) {
557
590
  lines.push(` ${colors.dim(`${view.machine.preflight.omittedCapabilities} more capabilities · use --limit <count>`)}`);
558
591
  }
@@ -569,9 +602,9 @@ function renderPlan(
569
602
  lines.push(` ${colors.dim(`${capabilityCount} demanded Endpoint ${capabilityCount === 1 ? "capability" : "capabilities"} checked.`)}`);
570
603
  }
571
604
  }
572
- if (view.machine.choices.length > 0) {
605
+ if (verbose && (view.machine.choices?.length ?? 0) > 0) {
573
606
  lines.push("", colors.strong("Run choices"));
574
- for (const selection of view.machine.choices) {
607
+ for (const selection of view.machine.choices ?? []) {
575
608
  const status = colors.success(glyph(io, "✓", "+"));
576
609
  lines.push(` ${status} ${colors.accent(selection.output)} ← ${selection.candidate}`);
577
610
  }
@@ -765,22 +798,27 @@ function commandHelp(topic: string, colors: Palette): readonly string[] | undefi
765
798
  colors.dim("Validate one self-described Author Source or Run Source without executing it."),
766
799
  "",
767
800
  " hypit check <source> [--workspace <workspace>] [--asset-root <directory>]",
801
+ " --verbose lists exported names/types and historical references.",
768
802
  ],
769
803
  doctor: [
770
804
  colors.accent(colors.strong("hypit doctor")),
771
805
  colors.dim("Diagnose project Results and, when selected or supplied, one Runtime Profile."),
772
806
  "",
773
- " hypit doctor [<runtime-profile>] [--workspace <project>]",
807
+ " hypit doctor [--runtime <profile>] [--workspace <project>] [--endpoint <instance>]",
808
+ " A positional Profile is also accepted in place of --runtime.",
809
+ " Repeat --endpoint <instance> to limit the operation to chosen services; omission covers the Profile.",
774
810
  " Without a Runtime Profile, checks only the project's selected Result Store.",
775
811
  ],
776
812
  plan: [
777
813
  colors.accent(colors.strong("hypit plan")),
778
- colors.dim("Freeze the demanded subgraph and expose explicit Run choices and every external Need."),
814
+ colors.dim("Show targets, demanded requests and their readiness without executing them."),
779
815
  "",
780
816
  " hypit plan <run-source> [--runtime <profile>] [--workspace <workspace>] [--asset-root <directory>]",
781
817
  "",
782
818
  "With --runtime, plan also preflights only the demanded deployment slice and names the Provider",
783
819
  "and price page behind each external request.",
820
+ "--verbose expands Run choices and unreached declarations. --limit bounds that detail,",
821
+ "while all demanded requests and diagnostics remain visible in both text and JSON.",
784
822
  "Planning never starts external work.",
785
823
  ],
786
824
  pricing: [
@@ -813,12 +851,14 @@ function commandHelp(topic: string, colors: Palette): readonly string[] | undefi
813
851
  " hypit runtime init [<profile>] [--workspace <project>] create and select a starter Profile",
814
852
  " hypit runtime use <profile> [--workspace <project>] select the project Profile",
815
853
  " hypit runtime unset [--workspace <project>] remove only that selection",
816
- " hypit runtime up [<profile>] prepare local packages and programs, then start the Worker",
854
+ " hypit runtime up [<profile>] [--endpoint <instance>] prepare helpers, then start the Worker",
817
855
  " hypit runtime status [<profile>] inspect the local Worker, active Builds and programs",
818
856
  " hypit runtime logs [<profile>] [--lines <count>]",
819
857
  " hypit runtime down [<profile>] stop the Worker; external programs keep running",
820
858
  "",
821
859
  "The project is resolved first. Selection is read only from that project's .hypit/runtime.",
860
+ "All runtime actions accept --workspace <project>; operational actions also accept --runtime <profile>.",
861
+ "For up, repeat --endpoint <instance> to prepare only chosen services; omission prepares the Profile.",
822
862
  "No Profile filename discovery or parent-project inheritance is performed.",
823
863
  "Remote Endpoints such as HypiHub are not started by this command; use doctor to test them.",
824
864
  ],
@@ -830,28 +870,34 @@ function commandHelp(topic: string, colors: Palette): readonly string[] | undefi
830
870
  " hypit packages install <package@exact-version>",
831
871
  "",
832
872
  "The package is reused by every project and later session on this machine.",
833
- "npm owns the ordinary package.json; Hypit creates no package lock or receipt.",
873
+ "Each exact version has its own installation; npm owns package.json and package-lock.json.",
874
+ "Preparation reports its install.log for live output and later diagnosis.",
834
875
  ],
835
876
  programs: [
836
877
  colors.accent(colors.strong("hypit programs")),
837
878
  colors.dim("Prepare and operate external programs declared by Endpoints in one Runtime Profile."),
838
879
  "",
839
- " hypit programs up [<profile>] [--max-wait-ms <ms>]",
840
- " hypit programs status [<profile>]",
841
- " hypit programs down [<profile>]",
880
+ " hypit programs up [--runtime <profile>] [--workspace <project>] [--max-wait-ms <ms>]",
881
+ " hypit programs status [--runtime <profile>] [--workspace <project>]",
882
+ " hypit programs down [--runtime <profile>] [--workspace <project>]",
883
+ " A positional Profile is also accepted in place of --runtime.",
884
+ " Repeat --endpoint <instance> to limit the operation to chosen services; omission covers the Profile.",
842
885
  ],
843
886
  activity: [
844
887
  colors.accent(colors.strong("hypit activity")),
845
888
  colors.dim("Inspect active Builds and Provider pool capacity."),
846
889
  "",
847
- " hypit activity [--runtime <profile>] [--watch]",
848
- " hypit activity [--runtime <profile>] --watch --jsonl",
890
+ " hypit activity [--workspace <project>] [--runtime <profile>] [--watch]",
891
+ " hypit activity [--workspace <project>] [--runtime <profile>] --watch --jsonl",
849
892
  ],
850
893
  paths: [
851
894
  colors.accent(colors.strong("hypit paths")),
852
895
  colors.dim("Show project, Runtime and host state locations without creating them."),
853
896
  "",
854
- " hypit paths [--runtime <profile>]",
897
+ " hypit paths [--workspace <project>] [--runtime <profile>]",
898
+ " Shows whether Runtime selection comes from a command argument or the project's .hypit/runtime.",
899
+ " Without --workspace, the nearest package.json above cwd defines the project (otherwise cwd).",
900
+ " Relative command-line paths start at cwd, including when --workspace is supplied.",
855
901
  ],
856
902
  builds: [
857
903
  colors.accent(colors.strong("hypit builds")),
@@ -859,11 +905,19 @@ function commandHelp(topic: string, colors: Palette): readonly string[] | undefi
859
905
  "",
860
906
  " hypit builds [--workspace <project>] [--limit <count>] [--before <build-id>]",
861
907
  ],
908
+ logs: [
909
+ colors.accent(colors.strong("hypit logs")),
910
+ colors.dim("Read Build execution evidence; finished logs need only the project Result Repository."),
911
+ "",
912
+ " hypit logs <build-id> [--workspace <project>] [--runtime <profile>] [--lines <count>]",
913
+ " --lines <count> show the last N records (default 50)",
914
+ " runtime logs reads the Worker process log instead",
915
+ ],
862
916
  status: [
863
917
  colors.accent(colors.strong("hypit status")),
864
918
  colors.dim("Show one Build now, or keep watching it without owning execution."),
865
919
  "",
866
- " hypit status <build-id> [--runtime <profile>] [--watch]",
920
+ " hypit status <build-id> [--workspace <project>] [--runtime <profile>] [--watch]",
867
921
  " --watch observe until a Result outcome or operator attention",
868
922
  " --max-wait-ms <ms> stop watching after a bounded wait",
869
923
  ],
@@ -872,6 +926,8 @@ function commandHelp(topic: string, colors: Palette): readonly string[] | undefi
872
926
  colors.dim("Inspect one project-owned Build Result and its public Outputs."),
873
927
  "",
874
928
  " hypit inspect <build-id> [--output <name>] [--limit <count>] [--workspace <project>]",
929
+ " Defaults to targets and highlighted Outputs. --verbose expands other available Outputs.",
930
+ " --output selects one exact name; --limit bounds expanded lists.",
875
931
  ],
876
932
  get: [
877
933
  colors.accent(colors.strong("hypit get")),
@@ -892,14 +948,14 @@ function commandHelp(topic: string, colors: Palette): readonly string[] | undefi
892
948
  colors.accent(colors.strong("hypit cancel")),
893
949
  colors.dim("Stop one Build and request cancellation of submitted work when supported."),
894
950
  "",
895
- " hypit cancel <build-id> [--runtime <profile>] [--reason <text>]",
951
+ " hypit cancel <build-id> [--workspace <project>] [--runtime <profile>] [--reason <text>]",
896
952
  ],
897
953
  result: [
898
954
  colors.accent(colors.strong("hypit result")),
899
955
  colors.dim("Edit one Result, finish an interrupted Result write, or discard an incomplete submission."),
900
956
  "",
901
- " hypit result finish <build-id> [--runtime <profile>]",
902
- " hypit result discard <build-id> [--runtime <profile>]",
957
+ " hypit result finish <build-id> [--workspace <project>] [--runtime <profile>]",
958
+ " hypit result discard <build-id> [--workspace <project>] [--runtime <profile>]",
903
959
  " hypit result edit <build-id> [--workspace <project>] [--title <text>] [--note <text>]",
904
960
  " [--highlight <output> ...]",
905
961
  " --clear-title remove the Result's human title",
@@ -913,6 +969,7 @@ function commandHelp(topic: string, colors: Palette): readonly string[] | undefi
913
969
  " hypit auth status <endpoint-instance> [--runtime <profile>] [--slot <name>]",
914
970
  " hypit auth login <endpoint-instance> [--runtime <profile>] [--slot <name>] [--from <secret-file>]",
915
971
  " hypit auth logout <endpoint-instance> [--runtime <profile>] [--slot <name>]",
972
+ " All auth actions accept --workspace <project> to use that project's selection.",
916
973
  ],
917
974
  };
918
975
  const selected = topics[topic];
@@ -942,6 +999,7 @@ export function writeCliHelp(io: CliIo, topic?: string): void {
942
999
  colors.strong("Results"),
943
1000
  row("builds", "list Results newest first"),
944
1001
  row("history <output>", "find one named Output across Builds"),
1002
+ row("logs <build-id> [--lines <count>]", "read saved Build execution phases and diagnostics"),
945
1003
  row("status <build-id> [--watch]", "show current work and Result facts"),
946
1004
  row("inspect <build-id>", "inspect one Result"),
947
1005
  row("get <build-id> --output <name> --to <path>", "export one Build Output"),
@@ -953,7 +1011,7 @@ export function writeCliHelp(io: CliIo, topic?: string): void {
953
1011
  row("runtime up|status|logs|down", "prepare and manage the local Build Runtime"),
954
1012
  row("programs up|status|down", "manage declared external programs only"),
955
1013
  row("packages install|status", "manage pinned upstream packages in the machine home"),
956
- row("activity [--watch]", "inspect active Builds and shared capacity"),
1014
+ row("activity [--watch]", "show active Builds and their current phases"),
957
1015
  row("cancel <build-id>", "withdraw one active Build"),
958
1016
  row("paths", "show physical state locations"),
959
1017
  row("auth status|login|logout", "manage Endpoint credentials"),
@@ -1,3 +1,4 @@
1
+ import { fileReferenceIdentity } from "@hypit/build-result";
1
2
  import { randomUUID } from "node:crypto";
2
3
  import { lstat, mkdir, rename, rm, writeFile } from "node:fs/promises";
3
4
  import { basename, dirname, join, relative, resolve, sep } from "node:path";
@@ -53,7 +54,7 @@ async function openResultFile(
53
54
  file: BuildResultFileRef,
54
55
  ): Promise<AsyncIterable<Uint8Array>> {
55
56
  const input = await repository.openFile(build, file);
56
- if (input === undefined) throw new Error(`Build ${build} file ${file.path} is unavailable`);
57
+ if (input === undefined) throw new Error(`File ${fileReferenceIdentity(build, file)} is unavailable`);
57
58
  return input;
58
59
  }
59
60
 
@@ -83,20 +84,28 @@ async function exportComposite(
83
84
  const temporary = join(dirname(target), `.${basename(target)}.part-${randomUUID()}`);
84
85
  try {
85
86
  await mkdir(temporary);
86
- const copied = new Set<string>();
87
+ const copied = new Map<string, BuildResultFileRef>();
88
+ const paths = new Set<string>();
89
+ const bindings = [];
87
90
  for (const binding of resolvedOutput.value.document.resources) {
88
- const file = binding.file;
89
- if (copied.has(file.path)) continue;
90
- copied.add(file.path);
91
- assert(file.path !== "value.json", "Composite Result file value.json conflicts with its exported value document");
92
- await writeStream(
93
- containedPath(temporary, file.path),
94
- await openResultFile(repository, resolvedOutput.build, file),
95
- );
91
+ const file = await repository.describeFile(resolvedOutput.build, binding.file);
92
+ const identity = fileReferenceIdentity(resolvedOutput.build, file);
93
+ let local = copied.get(identity);
94
+ if (local === undefined) {
95
+ let path = file.kind === "build-file" ? file.path : `files/file-${copied.size + 1}`;
96
+ const name = basename(path);
97
+ let index = copied.size + 1;
98
+ while (paths.has(path) || path === "value.json") path = `files/import-${index++}/${name}`;
99
+ paths.add(path);
100
+ local = { kind: "build-file", path, size: file.size, mediaType: file.mediaType };
101
+ copied.set(identity, local);
102
+ await writeStream(containedPath(temporary, path), await openResultFile(repository, resolvedOutput.build, file));
103
+ }
104
+ bindings.push({ at: binding.at, file: local });
96
105
  }
97
106
  await writeFile(
98
107
  join(temporary, "value.json"),
99
- `${JSON.stringify(resolvedOutput.value.document, null, 2)}\n`,
108
+ `${JSON.stringify({ ...resolvedOutput.value.document, resources: bindings }, null, 2)}\n`,
100
109
  { flag: "wx" },
101
110
  );
102
111
  await rename(temporary, target);
@@ -122,7 +131,7 @@ export async function exportBuildResultOutput(
122
131
  const target = resolve(destination);
123
132
  if (resolvedOutput.value.kind === "value") {
124
133
  await exportComposite(repository, { ...resolvedOutput, value: resolvedOutput.value }, target);
125
- } else if (resolvedOutput.value.kind === "build-file") {
134
+ } else if ((resolvedOutput.value.kind === "build-file" || resolvedOutput.value.kind === "external-file")) {
126
135
  const resource = resolvedOutput.value;
127
136
  await exportFile(target, async (temporary) => {
128
137
  await writeStream(
@@ -142,7 +151,7 @@ export async function exportBuildResultOutput(
142
151
  type: publishedOutput.type,
143
152
  kind: resolvedOutput.value.kind === "inline"
144
153
  ? "scalar"
145
- : resolvedOutput.value.kind === "build-file" ? "resource" : "composite",
154
+ : (resolvedOutput.value.kind === "build-file" || resolvedOutput.value.kind === "external-file") ? "resource" : "composite",
146
155
  path: target,
147
156
  };
148
157
  }
@@ -1,3 +1,4 @@
1
+ import { fileReferenceIdentity, ownedFileReference } from "@hypit/build-result";
1
2
  import { randomUUID } from "node:crypto";
2
3
  import type {
3
4
  BuildResultRepository,
@@ -24,15 +25,17 @@ import type { RunFrontend } from "@hypit/run";
24
25
  export type LoadedRunFile = NodeCompiledRun & {
25
26
  readonly path: string;
26
27
  readonly compiler: NodeRunCompiler;
28
+ readonly resultResourceReferences: Readonly<Record<string, BuildResultFileRef>>;
27
29
  };
28
30
 
29
31
  type BuildResultResolutionSession = {
30
32
  readonly files: Map<string, ArtifactAttachment>;
33
+ readonly references: Map<string, BuildResultFileRef>;
31
34
  readonly outputs: Map<string, Promise<RepositoryBuildResultOutput | undefined>>;
32
35
  };
33
36
 
34
37
  function createBuildResultResolutionSession(): BuildResultResolutionSession {
35
- return { files: new Map(), outputs: new Map() };
38
+ return { files: new Map(), outputs: new Map(), references: new Map() };
36
39
  }
37
40
 
38
41
  export async function checkRunFile(options: {
@@ -88,9 +91,10 @@ export async function resolveBuildResultValue(
88
91
  const manifest = await repository.read(build);
89
92
  if (manifest?.outcome === undefined) return undefined;
90
93
  const resultAttachment = async (owner: string, file: BuildResultFileRef): Promise<ArtifactAttachment> => {
91
- const address = `${owner}\u0000${file.path}`;
94
+ const address = fileReferenceIdentity(owner, file);
92
95
  const existing = session.files.get(address);
93
96
  if (existing !== undefined) return existing;
97
+ file = await repository.describeFile(owner, file);
94
98
  const artifact: BlobRef = {
95
99
  kind: "blob",
96
100
  resource: `res_${randomUUID()}`,
@@ -101,11 +105,12 @@ export async function resolveBuildResultValue(
101
105
  artifact,
102
106
  async open() {
103
107
  const stream = await repository.openFile(owner, file);
104
- if (stream === undefined) throw new Error(`Build ${owner} file ${file.path} is unavailable`);
108
+ if (stream === undefined) throw new Error(`File ${address} is unavailable`);
105
109
  return stream;
106
110
  },
107
111
  };
108
112
  session.files.set(address, attachment);
113
+ session.references.set(artifact.resource, ownedFileReference(owner, file));
109
114
  return attachment;
110
115
  };
111
116
  const attachments = new Map<string, ArtifactAttachment>();
@@ -120,7 +125,7 @@ export async function resolveBuildResultValue(
120
125
  const owner = resolved.build === build ? manifest : await repository.read(resolved.build);
121
126
  if (owner?.outcome === undefined) return undefined;
122
127
  let value: StoredValue;
123
- if (resolved.value.kind === "build-file") {
128
+ if (resolved.value.kind === "build-file" || resolved.value.kind === "external-file") {
124
129
  const attachment = await resultAttachment(resolved.build, resolved.value);
125
130
  attachments.set(attachment.artifact.resource, attachment);
126
131
  value = attachment.artifact;
@@ -147,8 +152,7 @@ function createRunCompiler(options: {
147
152
  readonly frontends: readonly RunFrontend[];
148
153
  readonly packageContributions: readonly NodePackageContribution[];
149
154
  readonly results?: BuildResultRepository;
150
- }): NodeRunCompiler {
151
- const resultSession = createBuildResultResolutionSession();
155
+ }, resultSession = createBuildResultResolutionSession()): NodeRunCompiler {
152
156
  const fragments = new RunFragmentRegistry();
153
157
  for (const item of options.packageContributions) {
154
158
  installRunFragmentHostFacets(item.hostFacets ?? [], fragments);
@@ -180,7 +184,14 @@ export async function loadRunFile(options: {
180
184
  readonly packageContributions: readonly NodePackageContribution[];
181
185
  readonly results?: BuildResultRepository;
182
186
  }): Promise<LoadedRunFile> {
183
- const compiler = createRunCompiler(options);
187
+ const resultSession = createBuildResultResolutionSession();
188
+ const compiler = createRunCompiler(options, resultSession);
184
189
  const compiled = await compiler.compileSource(options.workspace.entry, options.workspace);
185
- return { path: options.workspace.entry.id, compiler, ...compiled };
190
+ const references = new Map<string, BuildResultFileRef>(compiled.attachments.flatMap((attachment) =>
191
+ attachment.location === undefined ? [] : [[attachment.artifact.resource, {
192
+ kind: "external-file" as const, uri: attachment.location,
193
+ size: attachment.artifact.size, mediaType: attachment.artifact.mediaType,
194
+ }]]));
195
+ for (const [resource, file] of resultSession.references) references.set(resource, file);
196
+ return { path: options.workspace.entry.id, compiler, ...compiled, resultResourceReferences: Object.fromEntries(references) };
186
197
  }