@sixb/core 0.2.7 → 0.2.8

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 (627) hide show
  1. package/dist/actions/index.js +52 -49
  2. package/dist/actions/index.js.map +1 -1
  3. package/dist/actions/request.d.ts.map +1 -1
  4. package/dist/actions/run/context.d.ts.map +1 -1
  5. package/dist/actions/run/execute.d.ts +3 -0
  6. package/dist/actions/run/execute.d.ts.map +1 -1
  7. package/dist/actions/run/executor.d.ts +3 -0
  8. package/dist/actions/run/executor.d.ts.map +1 -1
  9. package/dist/actions/run/normalize.d.ts.map +1 -1
  10. package/dist/actions/run/types.d.ts +6 -0
  11. package/dist/actions/run/types.d.ts.map +1 -1
  12. package/dist/actions/types/context.d.ts +7 -0
  13. package/dist/actions/types/context.d.ts.map +1 -1
  14. package/dist/agents/context/entries.d.ts +17 -0
  15. package/dist/agents/context/entries.d.ts.map +1 -1
  16. package/dist/agents/context/index.js +3 -2
  17. package/dist/agents/context/index.js.map +1 -1
  18. package/dist/agents/context-model.d.ts.map +1 -1
  19. package/dist/agents/context-resolution.d.ts.map +1 -1
  20. package/dist/agents/execution.d.ts +7 -0
  21. package/dist/agents/execution.d.ts.map +1 -1
  22. package/dist/agents/index.js +57 -54
  23. package/dist/agents/index.js.map +1 -1
  24. package/dist/agents/model-call-retry.d.ts +28 -0
  25. package/dist/agents/model-call-retry.d.ts.map +1 -0
  26. package/dist/agents/model-loop.d.ts +4 -2
  27. package/dist/agents/model-loop.d.ts.map +1 -1
  28. package/dist/agents/run-artifacts.d.ts +2 -0
  29. package/dist/agents/run-artifacts.d.ts.map +1 -1
  30. package/dist/agents/run-plan.d.ts +1 -1
  31. package/dist/agents/run-plan.d.ts.map +1 -1
  32. package/dist/agents/run-session-http.d.ts.map +1 -1
  33. package/dist/agents/run-session-serve.d.ts.map +1 -1
  34. package/dist/agents/run-session-wire.d.ts +6 -0
  35. package/dist/agents/run-session-wire.d.ts.map +1 -1
  36. package/dist/agents/thread-access.d.ts +13 -0
  37. package/dist/agents/thread-access.d.ts.map +1 -1
  38. package/dist/agents/tool-files.d.ts.map +1 -1
  39. package/dist/artifacts/caller.d.ts +10 -0
  40. package/dist/artifacts/caller.d.ts.map +1 -0
  41. package/dist/artifacts/comment-place.d.ts +26 -0
  42. package/dist/artifacts/comment-place.d.ts.map +1 -0
  43. package/dist/artifacts/comment-text.d.ts +12 -4
  44. package/dist/artifacts/comment-text.d.ts.map +1 -1
  45. package/dist/artifacts/comments.d.ts +8 -2
  46. package/dist/artifacts/comments.d.ts.map +1 -1
  47. package/dist/artifacts/errors.d.ts +1 -1
  48. package/dist/artifacts/errors.d.ts.map +1 -1
  49. package/dist/artifacts/execution.d.ts +73 -5
  50. package/dist/artifacts/execution.d.ts.map +1 -1
  51. package/dist/artifacts/frames/assets.d.ts +27 -7
  52. package/dist/artifacts/frames/assets.d.ts.map +1 -1
  53. package/dist/artifacts/frames/entries.d.ts +5 -4
  54. package/dist/artifacts/frames/entries.d.ts.map +1 -1
  55. package/dist/artifacts/frames/hyperframes.d.ts +12 -0
  56. package/dist/artifacts/frames/hyperframes.d.ts.map +1 -0
  57. package/dist/artifacts/frames/index.d.ts +3 -1
  58. package/dist/artifacts/frames/index.d.ts.map +1 -1
  59. package/dist/artifacts/frames/index.js +20 -6
  60. package/dist/artifacts/frames/index.js.map +3 -3
  61. package/dist/artifacts/frames/kit.d.ts.map +1 -1
  62. package/dist/artifacts/frames/protocol.d.ts +33 -0
  63. package/dist/artifacts/frames/protocol.d.ts.map +1 -1
  64. package/dist/artifacts/frames/video-runtime.d.ts +21 -0
  65. package/dist/artifacts/frames/video-runtime.d.ts.map +1 -0
  66. package/dist/artifacts/html.d.ts +23 -0
  67. package/dist/artifacts/html.d.ts.map +1 -1
  68. package/dist/artifacts/index.d.ts +5 -3
  69. package/dist/artifacts/index.d.ts.map +1 -1
  70. package/dist/artifacts/index.js +71 -10
  71. package/dist/artifacts/index.js.map +4 -4
  72. package/dist/artifacts/kinds.d.ts +1 -1
  73. package/dist/artifacts/kinds.d.ts.map +1 -1
  74. package/dist/artifacts/limits.d.ts +37 -0
  75. package/dist/artifacts/limits.d.ts.map +1 -1
  76. package/dist/artifacts/live/document.d.ts.map +1 -1
  77. package/dist/artifacts/live/index.d.ts +6 -2
  78. package/dist/artifacts/live/index.d.ts.map +1 -1
  79. package/dist/artifacts/live/index.js +3432 -13
  80. package/dist/artifacts/live/index.js.map +6 -3
  81. package/dist/artifacts/live/presence.d.ts +7 -5
  82. package/dist/artifacts/live/presence.d.ts.map +1 -1
  83. package/dist/artifacts/live/protocol.d.ts +4 -2
  84. package/dist/artifacts/live/protocol.d.ts.map +1 -1
  85. package/dist/artifacts/live/server.d.ts +1 -1
  86. package/dist/artifacts/live/server.d.ts.map +1 -1
  87. package/dist/artifacts/live/server.js +36 -31
  88. package/dist/artifacts/live/server.js.map +1 -1
  89. package/dist/artifacts/live/state.d.ts +2 -2
  90. package/dist/artifacts/media/media.d.ts +96 -0
  91. package/dist/artifacts/media/media.d.ts.map +1 -0
  92. package/dist/artifacts/media/transcriber.d.ts +29 -0
  93. package/dist/artifacts/media/transcriber.d.ts.map +1 -0
  94. package/dist/artifacts/outline.d.ts +26 -1
  95. package/dist/artifacts/outline.d.ts.map +1 -1
  96. package/dist/artifacts/publish/files.d.ts +5 -2
  97. package/dist/artifacts/publish/files.d.ts.map +1 -1
  98. package/dist/artifacts/publish/index.d.ts +11 -2
  99. package/dist/artifacts/publish/index.d.ts.map +1 -1
  100. package/dist/artifacts/publish/index.js +110 -33
  101. package/dist/artifacts/publish/index.js.map +1 -1
  102. package/dist/artifacts/publish/pdf.d.ts.map +1 -1
  103. package/dist/artifacts/publish/previews.d.ts +7 -2
  104. package/dist/artifacts/publish/previews.d.ts.map +1 -1
  105. package/dist/artifacts/publish/publish.d.ts.map +1 -1
  106. package/dist/artifacts/publish/validate/html.d.ts +5 -4
  107. package/dist/artifacts/publish/validate/html.d.ts.map +1 -1
  108. package/dist/artifacts/publish/validate/video.d.ts +36 -0
  109. package/dist/artifacts/publish/validate/video.d.ts.map +1 -0
  110. package/dist/artifacts/publish/video.d.ts +79 -0
  111. package/dist/artifacts/publish/video.d.ts.map +1 -0
  112. package/dist/artifacts/resolve.d.ts +9 -0
  113. package/dist/artifacts/resolve.d.ts.map +1 -1
  114. package/dist/artifacts/video/composition.d.ts +183 -0
  115. package/dist/artifacts/video/composition.d.ts.map +1 -0
  116. package/dist/artifacts/video/edit.d.ts +298 -0
  117. package/dist/artifacts/video/edit.d.ts.map +1 -0
  118. package/dist/artifacts/video/export.d.ts +142 -0
  119. package/dist/artifacts/video/export.d.ts.map +1 -0
  120. package/dist/artifacts/video/looks.d.ts +133 -0
  121. package/dist/artifacts/video/looks.d.ts.map +1 -0
  122. package/dist/artifacts/video/project.d.ts +74 -0
  123. package/dist/artifacts/video/project.d.ts.map +1 -0
  124. package/dist/artifacts/video/stills.d.ts +65 -0
  125. package/dist/artifacts/video/stills.d.ts.map +1 -0
  126. package/dist/artifacts/video/timeline.d.ts +153 -0
  127. package/dist/artifacts/video/timeline.d.ts.map +1 -0
  128. package/dist/auth/index.js +9 -8
  129. package/dist/auth/index.js.map +1 -1
  130. package/dist/authorization/index.js +5 -4
  131. package/dist/authorization/index.js.map +1 -1
  132. package/dist/blob-storage/browser.d.ts +1 -1
  133. package/dist/blob-storage/browser.d.ts.map +1 -1
  134. package/dist/blob-storage/browser.js +8 -4
  135. package/dist/blob-storage/browser.js.map +1 -1
  136. package/dist/blob-storage/constants.d.ts +8 -3
  137. package/dist/blob-storage/constants.d.ts.map +1 -1
  138. package/dist/blob-storage/download-urls.d.ts +2 -2
  139. package/dist/blob-storage/download-urls.d.ts.map +1 -1
  140. package/dist/blob-storage/index.d.ts +1 -1
  141. package/dist/blob-storage/index.d.ts.map +1 -1
  142. package/dist/blob-storage/index.js +9 -5
  143. package/dist/blob-storage/index.js.map +1 -1
  144. package/dist/blob-storage/internal.d.ts +2 -2
  145. package/dist/blob-storage/internal.d.ts.map +1 -1
  146. package/dist/blob-storage/internal.js +10 -4
  147. package/dist/blob-storage/internal.js.map +1 -1
  148. package/dist/blob-storage/media-type.d.ts +12 -3
  149. package/dist/blob-storage/media-type.d.ts.map +1 -1
  150. package/dist/bootstrap/index.js +61 -58
  151. package/dist/bootstrap/index.js.map +2 -2
  152. package/dist/{chunk-az95tsh3.js → chunk-0fjryajn.js} +3 -2
  153. package/dist/chunk-0fjryajn.js.map +11 -0
  154. package/dist/{chunk-9tpmfh3n.js → chunk-0mk8qqp9.js} +3 -3
  155. package/dist/{chunk-9tpmfh3n.js.map → chunk-0mk8qqp9.js.map} +3 -3
  156. package/dist/{chunk-88xeh6zx.js → chunk-1g4me5f2.js} +182 -7
  157. package/dist/{chunk-88xeh6zx.js.map → chunk-1g4me5f2.js.map} +3 -3
  158. package/dist/{chunk-7mhbs9yy.js → chunk-1z8ccj53.js} +1 -1
  159. package/dist/{chunk-wkv3h3q7.js → chunk-2138b0ng.js} +115 -8
  160. package/dist/chunk-2138b0ng.js.map +12 -0
  161. package/dist/chunk-23eaayw4.js +3757 -0
  162. package/dist/chunk-23eaayw4.js.map +22 -0
  163. package/dist/{chunk-m1cwncee.js → chunk-2mxq1yd9.js} +45 -40
  164. package/dist/{chunk-m1cwncee.js.map → chunk-2mxq1yd9.js.map} +3 -3
  165. package/dist/{chunk-dmnd9ea6.js → chunk-30a0ftnm.js} +2 -2
  166. package/dist/chunk-389ybvw9.js.map +2 -2
  167. package/dist/{chunk-qbd282aa.js → chunk-39q9ybav.js} +2 -2
  168. package/dist/{chunk-06kpaqg4.js → chunk-3d9w8t4n.js} +110 -22
  169. package/dist/{chunk-06kpaqg4.js.map → chunk-3d9w8t4n.js.map} +5 -5
  170. package/dist/chunk-3dvcdn9w.js +8 -0
  171. package/dist/chunk-3dvcdn9w.js.map +10 -0
  172. package/dist/{chunk-fdk0ks9p.js → chunk-3x902cja.js} +3 -3
  173. package/dist/{chunk-c4nrycdy.js → chunk-4q4a5a96.js} +1 -1
  174. package/dist/{chunk-9cyq87qa.js → chunk-4tdm3fsj.js} +95 -32
  175. package/dist/{chunk-9cyq87qa.js.map → chunk-4tdm3fsj.js.map} +9 -9
  176. package/dist/{chunk-cpy282b8.js → chunk-4w8qzy9w.js} +6 -6
  177. package/dist/{chunk-c29729me.js → chunk-4z9xtxke.js} +8 -7
  178. package/dist/chunk-4z9xtxke.js.map +12 -0
  179. package/dist/chunk-5278qwax.js +270 -0
  180. package/dist/chunk-5278qwax.js.map +11 -0
  181. package/dist/{chunk-k1g14kk3.js → chunk-6a4hp405.js} +4 -5
  182. package/dist/{chunk-k1g14kk3.js.map → chunk-6a4hp405.js.map} +3 -3
  183. package/dist/{chunk-xavet0qs.js → chunk-6whr25gw.js} +2 -2
  184. package/dist/{chunk-mbwsgjn7.js → chunk-7zygtcqq.js} +14 -2
  185. package/dist/chunk-7zygtcqq.js.map +11 -0
  186. package/dist/chunk-88s9z5pf.js +3 -0
  187. package/dist/{chunk-de5sfbc3.js.map → chunk-88s9z5pf.js.map} +1 -1
  188. package/dist/{chunk-ygvay56w.js → chunk-896te58g.js} +2 -2
  189. package/dist/{chunk-pfdq1ga6.js → chunk-8eqqqc1h.js} +3 -3
  190. package/dist/{chunk-yyj009tv.js → chunk-8tefbhdx.js} +14 -14
  191. package/dist/{chunk-yyj009tv.js.map → chunk-8tefbhdx.js.map} +1 -1
  192. package/dist/{chunk-jka26v8c.js → chunk-8x1bsp68.js} +1 -1
  193. package/dist/{chunk-wzcjhv54.js → chunk-93e4w7te.js} +113 -1
  194. package/dist/chunk-93e4w7te.js.map +11 -0
  195. package/dist/{chunk-phs5fbff.js → chunk-990a5bkc.js} +424 -76
  196. package/dist/chunk-990a5bkc.js.map +21 -0
  197. package/dist/{chunk-6md802cc.js → chunk-9az7kjv4.js} +6 -6
  198. package/dist/{chunk-95ps0k5q.js → chunk-9e5t53z0.js} +1 -1
  199. package/dist/{chunk-js9e6487.js → chunk-9p7kyeqz.js} +4 -4
  200. package/dist/chunk-a68zz4r0.js +537 -0
  201. package/dist/chunk-a68zz4r0.js.map +11 -0
  202. package/dist/{chunk-d7vyc7k6.js → chunk-a700gjc8.js} +10 -2
  203. package/dist/chunk-a700gjc8.js.map +10 -0
  204. package/dist/{chunk-gfdh9kqa.js → chunk-a9qzjaz2.js} +2 -5
  205. package/dist/chunk-a9qzjaz2.js.map +10 -0
  206. package/dist/{chunk-8qmp9fpa.js → chunk-as94vcty.js} +619 -482
  207. package/dist/{chunk-8qmp9fpa.js.map → chunk-as94vcty.js.map} +19 -19
  208. package/dist/{chunk-brybqw5k.js → chunk-bkxm2dzx.js} +1 -1
  209. package/dist/{chunk-ppxf7gw2.js → chunk-d7t9jnym.js} +3 -3
  210. package/dist/{chunk-tapdssb5.js → chunk-e3b1r4d2.js} +8 -7
  211. package/dist/{chunk-tapdssb5.js.map → chunk-e3b1r4d2.js.map} +4 -4
  212. package/dist/{chunk-cg7cygfj.js → chunk-fdmvaz7x.js} +1 -1
  213. package/dist/{chunk-191jz8a6.js → chunk-ff0qdk7z.js} +1 -1
  214. package/dist/{chunk-9vsc919v.js → chunk-fgxvrxx4.js} +22 -2
  215. package/dist/chunk-fgxvrxx4.js.map +10 -0
  216. package/dist/{chunk-wx7smkn2.js → chunk-fq8drkp0.js} +1 -1
  217. package/dist/{chunk-60662fyv.js → chunk-fqms1a8c.js} +132 -4
  218. package/dist/{chunk-60662fyv.js.map → chunk-fqms1a8c.js.map} +8 -6
  219. package/dist/{chunk-v8a1qjzp.js → chunk-hpswfrjj.js} +1 -1
  220. package/dist/{chunk-qttqe1ah.js → chunk-jbg905hn.js} +80 -13
  221. package/dist/chunk-jbg905hn.js.map +25 -0
  222. package/dist/{chunk-bz5bnjjt.js → chunk-jjte0h4p.js} +1 -1
  223. package/dist/{chunk-hvq8xs66.js → chunk-jwjwvzj1.js} +797 -51
  224. package/dist/chunk-jwjwvzj1.js.map +38 -0
  225. package/dist/{chunk-k29rdc3h.js → chunk-k3vd2vyz.js} +6 -2
  226. package/dist/chunk-k3vd2vyz.js.map +10 -0
  227. package/dist/chunk-kcqpk9w1.js.map +2 -2
  228. package/dist/chunk-mvz89age.js.map +2 -2
  229. package/dist/{chunk-xrmbhap8.js → chunk-mwg0nwkb.js} +1 -1
  230. package/dist/{chunk-a3faa34j.js → chunk-nfjt8k8j.js} +1 -1
  231. package/dist/{chunk-394zjzjs.js → chunk-nhgqz3g3.js} +3 -3
  232. package/dist/{chunk-bqr703h4.js → chunk-p0c5kkhn.js} +23 -6
  233. package/dist/{chunk-bqr703h4.js.map → chunk-p0c5kkhn.js.map} +3 -3
  234. package/dist/{chunk-92wrka15.js → chunk-q150fnj9.js} +1 -1
  235. package/dist/{chunk-w3t94hm6.js → chunk-qk3zq25v.js} +1 -1
  236. package/dist/chunk-rtkqczbr.js.map +2 -2
  237. package/dist/{chunk-3qtk0070.js → chunk-ssqbrts1.js} +86 -9
  238. package/dist/chunk-ssqbrts1.js.map +14 -0
  239. package/dist/{chunk-5qqmndhm.js → chunk-szzhrn3e.js} +1 -1
  240. package/dist/{chunk-n1hbwc6y.js → chunk-t6pfch4e.js} +1 -1
  241. package/dist/{chunk-xtztwpkh.js → chunk-v6h4tc2v.js} +86 -5
  242. package/dist/chunk-v6h4tc2v.js.map +12 -0
  243. package/dist/{chunk-brhp9d97.js → chunk-vmqjndb3.js} +2 -2
  244. package/dist/chunk-vtjzwymr.js.map +2 -2
  245. package/dist/{chunk-fycac8e9.js → chunk-wpba6hhd.js} +10 -10
  246. package/dist/{chunk-fycac8e9.js.map → chunk-wpba6hhd.js.map} +1 -1
  247. package/dist/{chunk-t58sktr5.js → chunk-wrb1x1ss.js} +2 -2
  248. package/dist/{chunk-5sswe5ej.js → chunk-wsv23wvr.js} +2 -2
  249. package/dist/{chunk-04r2fdsd.js → chunk-x0hqc54n.js} +4 -4
  250. package/dist/{chunk-sgx82nnt.js → chunk-xg31er4p.js} +43 -4
  251. package/dist/chunk-xg31er4p.js.map +10 -0
  252. package/dist/{chunk-3neam1y5.js → chunk-y3qb965a.js} +2 -2
  253. package/dist/{chunk-5pz3htbe.js → chunk-y57eawng.js} +3 -3
  254. package/dist/{chunk-8ncg20rd.js → chunk-yah25st6.js} +5 -5
  255. package/dist/chunk-yah25st6.js.map +10 -0
  256. package/dist/{chunk-mrs7jy17.js → chunk-ywvxcmqj.js} +106 -13
  257. package/dist/{chunk-mrs7jy17.js.map → chunk-ywvxcmqj.js.map} +8 -7
  258. package/dist/{chunk-44hrfmbk.js → chunk-zmq9xc9s.js} +70 -31
  259. package/dist/{chunk-44hrfmbk.js.map → chunk-zmq9xc9s.js.map} +4 -3
  260. package/dist/datasets/write.js +8 -7
  261. package/dist/datasets/write.js.map +1 -1
  262. package/dist/errors/catalog.d.ts.map +1 -1
  263. package/dist/execution/agent.js +52 -49
  264. package/dist/execution/agent.js.map +1 -1
  265. package/dist/execution/kernel-operation.d.ts +1 -0
  266. package/dist/execution/kernel-operation.d.ts.map +1 -1
  267. package/dist/execution/primitive.js +52 -49
  268. package/dist/execution/primitive.js.map +1 -1
  269. package/dist/execution/request.js +53 -50
  270. package/dist/execution/request.js.map +2 -2
  271. package/dist/execution/types.d.ts +5 -0
  272. package/dist/execution/types.d.ts.map +1 -1
  273. package/dist/http/api-routes.d.ts.map +1 -1
  274. package/dist/http/index.js +1 -1
  275. package/dist/index.d.ts +5 -3
  276. package/dist/index.d.ts.map +1 -1
  277. package/dist/index.js +69 -65
  278. package/dist/index.js.map +1 -1
  279. package/dist/lake-storage/index.js +9 -8
  280. package/dist/lake-storage/index.js.map +1 -1
  281. package/dist/maintenance/index.js +9 -8
  282. package/dist/maintenance/index.js.map +2 -2
  283. package/dist/materializer/index.js +26 -24
  284. package/dist/materializer/index.js.map +1 -1
  285. package/dist/models/audio/runtime.d.ts +3 -1
  286. package/dist/models/audio/runtime.d.ts.map +1 -1
  287. package/dist/models/audio/speech.d.ts +2 -2
  288. package/dist/models/audio/speech.d.ts.map +1 -1
  289. package/dist/models/audio/types.d.ts +23 -3
  290. package/dist/models/audio/types.d.ts.map +1 -1
  291. package/dist/models/calls.d.ts +7 -0
  292. package/dist/models/calls.d.ts.map +1 -1
  293. package/dist/models/catalog.d.ts +5 -0
  294. package/dist/models/catalog.d.ts.map +1 -1
  295. package/dist/models/definitions.d.ts +3 -2
  296. package/dist/models/definitions.d.ts.map +1 -1
  297. package/dist/models/errors.d.ts +5 -3
  298. package/dist/models/errors.d.ts.map +1 -1
  299. package/dist/models/events.d.ts +2 -0
  300. package/dist/models/events.d.ts.map +1 -1
  301. package/dist/models/execution/index.d.ts +1 -0
  302. package/dist/models/execution/index.d.ts.map +1 -1
  303. package/dist/models/execution/index.js +33 -28
  304. package/dist/models/execution/index.js.map +1 -1
  305. package/dist/models/execution/model-call-limits.d.ts.map +1 -1
  306. package/dist/models/execution/model-call-recorder.d.ts +8 -0
  307. package/dist/models/execution/model-call-recorder.d.ts.map +1 -1
  308. package/dist/models/execution/session.d.ts +12 -0
  309. package/dist/models/execution/session.d.ts.map +1 -1
  310. package/dist/models/execution/usage.d.ts.map +1 -1
  311. package/dist/models/execution.d.ts +1 -1
  312. package/dist/models/execution.d.ts.map +1 -1
  313. package/dist/models/generation-types.d.ts +2 -0
  314. package/dist/models/generation-types.d.ts.map +1 -1
  315. package/dist/models/index.d.ts +4 -2
  316. package/dist/models/index.d.ts.map +1 -1
  317. package/dist/models/index.js +2 -2
  318. package/dist/models/input-file.d.ts.map +1 -1
  319. package/dist/models/pricing.d.ts +2 -1
  320. package/dist/models/pricing.d.ts.map +1 -1
  321. package/dist/models/rate-card.d.ts +6 -0
  322. package/dist/models/rate-card.d.ts.map +1 -1
  323. package/dist/models/tools.d.ts +5 -0
  324. package/dist/models/tools.d.ts.map +1 -1
  325. package/dist/models/video/catalog.d.ts +13 -0
  326. package/dist/models/video/catalog.d.ts.map +1 -0
  327. package/dist/models/video/check.d.ts +76 -0
  328. package/dist/models/video/check.d.ts.map +1 -0
  329. package/dist/models/video/runtime.d.ts +21 -0
  330. package/dist/models/video/runtime.d.ts.map +1 -0
  331. package/dist/models/video/types.d.ts +188 -0
  332. package/dist/models/video/types.d.ts.map +1 -0
  333. package/dist/objects/execution.d.ts.map +1 -1
  334. package/dist/objects/index.js +52 -49
  335. package/dist/objects/index.js.map +1 -1
  336. package/dist/objects/query/index.js +25 -23
  337. package/dist/objects/query/index.js.map +1 -1
  338. package/dist/objects/sdk/object-set.d.ts.map +1 -1
  339. package/dist/ontology/index.js +4 -4
  340. package/dist/ontology/internal.js +4 -4
  341. package/dist/pipelines/index.js +28 -26
  342. package/dist/pipelines/index.js.map +1 -1
  343. package/dist/projections/internal.js +26 -24
  344. package/dist/projections/internal.js.map +1 -1
  345. package/dist/queues/index.d.ts +1 -1
  346. package/dist/queues/index.d.ts.map +1 -1
  347. package/dist/queues/types.d.ts +103 -6
  348. package/dist/queues/types.d.ts.map +1 -1
  349. package/dist/runtime/host.d.ts.map +1 -1
  350. package/dist/runtime/internal.d.ts +3 -1
  351. package/dist/runtime/internal.d.ts.map +1 -1
  352. package/dist/runtime/internal.js +49 -43
  353. package/dist/runtime/internal.js.map +2 -2
  354. package/dist/runtime/sixb.d.ts.map +1 -1
  355. package/dist/sandboxes/index.js +6 -6
  356. package/dist/security/public.d.ts +6 -4
  357. package/dist/security/public.d.ts.map +1 -1
  358. package/dist/security/public.js +5 -3
  359. package/dist/security/public.js.map +1 -1
  360. package/dist/shares/internal.js +25 -23
  361. package/dist/shares/internal.js.map +2 -2
  362. package/dist/storage/agents/in-memory.d.ts +2 -1
  363. package/dist/storage/agents/in-memory.d.ts.map +1 -1
  364. package/dist/storage/agents/index.d.ts +1 -1
  365. package/dist/storage/agents/index.d.ts.map +1 -1
  366. package/dist/storage/agents/provider.js +4 -4
  367. package/dist/storage/agents/types.d.ts +13 -0
  368. package/dist/storage/agents/types.d.ts.map +1 -1
  369. package/dist/storage/ai-cost/analytics.d.ts +1 -0
  370. package/dist/storage/ai-cost/analytics.d.ts.map +1 -1
  371. package/dist/storage/ai-cost/groups.d.ts +2 -0
  372. package/dist/storage/ai-cost/groups.d.ts.map +1 -1
  373. package/dist/storage/ai-cost/provider.js +5 -5
  374. package/dist/storage/ai-cost/types.d.ts +2 -1
  375. package/dist/storage/ai-cost/types.d.ts.map +1 -1
  376. package/dist/storage/ai-cost/validation.d.ts.map +1 -1
  377. package/dist/storage/ai-limits/enforcement.js +3 -3
  378. package/dist/storage/ai-limits/provider.js +2 -2
  379. package/dist/storage/ai-usage/in-memory.d.ts +8 -1
  380. package/dist/storage/ai-usage/in-memory.d.ts.map +1 -1
  381. package/dist/storage/ai-usage/index.d.ts +2 -2
  382. package/dist/storage/ai-usage/index.d.ts.map +1 -1
  383. package/dist/storage/ai-usage/record.d.ts +11 -1
  384. package/dist/storage/ai-usage/record.d.ts.map +1 -1
  385. package/dist/storage/ai-usage/types.d.ts +80 -1
  386. package/dist/storage/ai-usage/types.d.ts.map +1 -1
  387. package/dist/storage/ai-usage/usage.d.ts +1 -1
  388. package/dist/storage/ai-usage/usage.d.ts.map +1 -1
  389. package/dist/storage/artifacts/in-memory.d.ts +25 -2
  390. package/dist/storage/artifacts/in-memory.d.ts.map +1 -1
  391. package/dist/storage/artifacts/index.d.ts +1 -1
  392. package/dist/storage/artifacts/index.d.ts.map +1 -1
  393. package/dist/storage/artifacts/record.d.ts +12 -1
  394. package/dist/storage/artifacts/record.d.ts.map +1 -1
  395. package/dist/storage/artifacts/types.d.ts +198 -6
  396. package/dist/storage/artifacts/types.d.ts.map +1 -1
  397. package/dist/storage/executions/provider.js +3 -2
  398. package/dist/storage/executions/provider.js.map +1 -1
  399. package/dist/storage/file-upload-sessions/provider.js +10 -9
  400. package/dist/storage/file-upload-sessions/provider.js.map +1 -1
  401. package/dist/storage/in-memory/index.d.ts.map +1 -1
  402. package/dist/storage/index.d.ts +4 -4
  403. package/dist/storage/index.d.ts.map +1 -1
  404. package/dist/storage/index.js +24 -22
  405. package/dist/storage/index.js.map +1 -1
  406. package/dist/storage/internal.d.ts +2 -2
  407. package/dist/storage/internal.d.ts.map +1 -1
  408. package/dist/storage/internal.js +34 -14
  409. package/dist/storage/internal.js.map +2 -2
  410. package/dist/storage/workflow-runs/provider.js +10 -9
  411. package/dist/storage/workflow-runs/provider.js.map +1 -1
  412. package/dist/syncs/index.js +29 -27
  413. package/dist/syncs/index.js.map +1 -1
  414. package/dist/testing/agent-storage-contract.d.ts.map +1 -1
  415. package/dist/testing/ai-cost-storage-contract.d.ts.map +1 -1
  416. package/dist/testing/ai-usage-storage-contract.d.ts.map +1 -1
  417. package/dist/testing/artifact-storage-contract.d.ts +3 -0
  418. package/dist/testing/artifact-storage-contract.d.ts.map +1 -1
  419. package/dist/testing/execution-storage-contract.d.ts.map +1 -1
  420. package/dist/testing/index.js +619 -72
  421. package/dist/testing/index.js.map +9 -9
  422. package/dist/testing/lake-storage-contract.d.ts.map +1 -1
  423. package/dist/testing/queues-contract.d.ts.map +1 -1
  424. package/dist/webhooks/internal.js +26 -24
  425. package/dist/webhooks/internal.js.map +2 -2
  426. package/dist/workers/index.js +5 -5
  427. package/dist/workers/index.js.map +1 -1
  428. package/dist/workflows/index.js +58 -55
  429. package/dist/workflows/index.js.map +1 -1
  430. package/package.json +3 -1
  431. package/src/actions/request.ts +2 -0
  432. package/src/actions/run/context.ts +1 -0
  433. package/src/actions/run/execute.ts +5 -1
  434. package/src/actions/run/executor.ts +4 -0
  435. package/src/actions/run/normalize.ts +4 -0
  436. package/src/actions/run/types.ts +6 -0
  437. package/src/actions/types/context.ts +7 -0
  438. package/src/agents/README.md +3 -1
  439. package/src/agents/context/entries.ts +63 -9
  440. package/src/agents/context-model.ts +9 -0
  441. package/src/agents/context-resolution.ts +7 -0
  442. package/src/agents/execution.ts +39 -0
  443. package/src/agents/model-call-retry.ts +69 -0
  444. package/src/agents/model-loop.ts +86 -12
  445. package/src/agents/run-artifacts.ts +10 -5
  446. package/src/agents/run-plan.ts +2 -1
  447. package/src/agents/run-session-http.ts +1 -0
  448. package/src/agents/run-session-serve.ts +23 -2
  449. package/src/agents/run-session-wire.ts +45 -0
  450. package/src/agents/thread-access.ts +34 -1
  451. package/src/agents/tool-files.ts +23 -7
  452. package/src/artifacts/caller.ts +42 -0
  453. package/src/artifacts/comment-place.ts +51 -0
  454. package/src/artifacts/comment-text.ts +50 -7
  455. package/src/artifacts/comments.ts +132 -34
  456. package/src/artifacts/errors.ts +1 -0
  457. package/src/artifacts/execution.ts +249 -5
  458. package/src/artifacts/frames/assets.ts +93 -15
  459. package/src/artifacts/frames/entries.ts +7 -4
  460. package/src/artifacts/frames/generated/hyperframes-notices.txt +290 -0
  461. package/src/artifacts/frames/generated/hyperframes.txt +1145 -0
  462. package/src/artifacts/frames/generated.d.ts +5 -0
  463. package/src/artifacts/frames/hyperframes.ts +14 -0
  464. package/src/artifacts/frames/index.ts +5 -0
  465. package/src/artifacts/frames/kit.ts +7 -3
  466. package/src/artifacts/frames/protocol.ts +56 -0
  467. package/src/artifacts/frames/video-runtime.ts +165 -0
  468. package/src/artifacts/html.ts +13 -0
  469. package/src/artifacts/index.ts +7 -0
  470. package/src/artifacts/kinds.ts +9 -1
  471. package/src/artifacts/limits.ts +43 -0
  472. package/src/artifacts/live/document.ts +27 -3
  473. package/src/artifacts/live/index.ts +58 -2
  474. package/src/artifacts/live/presence.ts +17 -5
  475. package/src/artifacts/live/protocol.ts +4 -2
  476. package/src/artifacts/live/server.ts +1 -1
  477. package/src/artifacts/live/state.ts +3 -3
  478. package/src/artifacts/media/README.md +75 -0
  479. package/src/artifacts/media/media.ts +316 -0
  480. package/src/artifacts/media/transcriber.ts +84 -0
  481. package/src/artifacts/outline.ts +28 -0
  482. package/src/artifacts/publish/files.ts +19 -6
  483. package/src/artifacts/publish/index.ts +49 -2
  484. package/src/artifacts/publish/pdf.ts +3 -1
  485. package/src/artifacts/publish/previews.ts +22 -8
  486. package/src/artifacts/publish/publish.ts +4 -1
  487. package/src/artifacts/publish/validate/html.ts +23 -18
  488. package/src/artifacts/publish/validate/video.ts +309 -0
  489. package/src/artifacts/publish/video.ts +235 -0
  490. package/src/artifacts/resolve.ts +45 -0
  491. package/src/artifacts/video/README.md +402 -0
  492. package/src/artifacts/video/composition.ts +898 -0
  493. package/src/artifacts/video/edit.ts +3967 -0
  494. package/src/artifacts/video/export.ts +352 -0
  495. package/src/artifacts/video/looks.ts +694 -0
  496. package/src/artifacts/video/project.ts +198 -0
  497. package/src/artifacts/video/stills.ts +168 -0
  498. package/src/artifacts/video/timeline.ts +658 -0
  499. package/src/blob-storage/browser.ts +1 -1
  500. package/src/blob-storage/constants.ts +9 -3
  501. package/src/blob-storage/download-urls.ts +5 -3
  502. package/src/blob-storage/index.ts +1 -0
  503. package/src/blob-storage/internal.ts +13 -2
  504. package/src/blob-storage/media-type.ts +149 -8
  505. package/src/errors/catalog.ts +2 -1
  506. package/src/execution/authorization.ts +2 -2
  507. package/src/execution/kernel-operation.ts +14 -0
  508. package/src/execution/types.ts +2 -0
  509. package/src/http/api-routes.ts +117 -0
  510. package/src/index.ts +18 -1
  511. package/src/lake-storage/definition-updates.ts +3 -9
  512. package/src/models/audio/runtime.ts +48 -3
  513. package/src/models/audio/speech.ts +2 -2
  514. package/src/models/audio/types.ts +24 -3
  515. package/src/models/calls.ts +35 -18
  516. package/src/models/catalog.ts +9 -2
  517. package/src/models/definitions.ts +4 -2
  518. package/src/models/errors.ts +5 -3
  519. package/src/models/events.ts +2 -0
  520. package/src/models/execution/README.md +68 -2
  521. package/src/models/execution/index.ts +1 -0
  522. package/src/models/execution/model-call-limits.ts +11 -5
  523. package/src/models/execution/model-call-recorder.ts +14 -0
  524. package/src/models/execution/session.ts +52 -23
  525. package/src/models/execution/usage.ts +1 -0
  526. package/src/models/execution.ts +13 -2
  527. package/src/models/generation-types.ts +2 -0
  528. package/src/models/index.ts +20 -1
  529. package/src/models/input-file.ts +7 -2
  530. package/src/models/pricing.ts +19 -1
  531. package/src/models/rate-card.ts +15 -3
  532. package/src/models/tools.ts +5 -0
  533. package/src/models/video/catalog.ts +101 -0
  534. package/src/models/video/check.ts +441 -0
  535. package/src/models/video/runtime.ts +550 -0
  536. package/src/models/video/types.ts +194 -0
  537. package/src/objects/execution.ts +2 -0
  538. package/src/objects/sdk/object-set.ts +2 -0
  539. package/src/queues/index.ts +5 -0
  540. package/src/queues/types.ts +126 -5
  541. package/src/runtime/host.ts +3 -0
  542. package/src/runtime/internal.ts +3 -1
  543. package/src/runtime/sixb.ts +12 -4
  544. package/src/sandboxes/README.md +3 -2
  545. package/src/security/public.ts +6 -4
  546. package/src/storage/agents/in-memory.ts +39 -0
  547. package/src/storage/agents/index.ts +1 -0
  548. package/src/storage/agents/types.ts +14 -0
  549. package/src/storage/ai-cost/analytics.ts +2 -0
  550. package/src/storage/ai-cost/codec.ts +1 -0
  551. package/src/storage/ai-cost/groups.ts +7 -0
  552. package/src/storage/ai-cost/types.ts +2 -0
  553. package/src/storage/ai-cost/validation.ts +2 -0
  554. package/src/storage/ai-usage/in-memory.ts +93 -0
  555. package/src/storage/ai-usage/index.ts +10 -0
  556. package/src/storage/ai-usage/record.ts +106 -0
  557. package/src/storage/ai-usage/types.ts +102 -1
  558. package/src/storage/ai-usage/usage.ts +2 -0
  559. package/src/storage/artifacts/in-memory.ts +108 -11
  560. package/src/storage/artifacts/index.ts +14 -0
  561. package/src/storage/artifacts/record.ts +203 -1
  562. package/src/storage/artifacts/types.ts +199 -6
  563. package/src/storage/executions/validation.ts +2 -2
  564. package/src/storage/in-memory/index.ts +1 -1
  565. package/src/storage/index.ts +22 -1
  566. package/src/storage/internal.ts +9 -0
  567. package/src/testing/agent-storage-contract.ts +108 -0
  568. package/src/testing/ai-cost-storage-contract.ts +1 -0
  569. package/src/testing/ai-usage-storage-contract.ts +145 -1
  570. package/src/testing/artifact-storage-contract.ts +320 -0
  571. package/src/testing/execution-storage-contract.ts +10 -2
  572. package/src/testing/lake-storage-contract.ts +27 -0
  573. package/src/testing/queues-contract.ts +71 -0
  574. package/dist/chunk-3723kgba.js +0 -29
  575. package/dist/chunk-3723kgba.js.map +0 -10
  576. package/dist/chunk-3qtk0070.js.map +0 -14
  577. package/dist/chunk-8ncg20rd.js.map +0 -10
  578. package/dist/chunk-9vsc919v.js.map +0 -10
  579. package/dist/chunk-az95tsh3.js.map +0 -11
  580. package/dist/chunk-c29729me.js.map +0 -12
  581. package/dist/chunk-d7vyc7k6.js.map +0 -10
  582. package/dist/chunk-de5sfbc3.js +0 -3
  583. package/dist/chunk-gfdh9kqa.js.map +0 -11
  584. package/dist/chunk-hvq8xs66.js.map +0 -34
  585. package/dist/chunk-k29rdc3h.js.map +0 -10
  586. package/dist/chunk-mbwsgjn7.js.map +0 -11
  587. package/dist/chunk-phs5fbff.js.map +0 -19
  588. package/dist/chunk-qttqe1ah.js.map +0 -24
  589. package/dist/chunk-sgx82nnt.js.map +0 -10
  590. package/dist/chunk-vs2s3p8n.js +0 -2274
  591. package/dist/chunk-vs2s3p8n.js.map +0 -20
  592. package/dist/chunk-wkv3h3q7.js.map +0 -12
  593. package/dist/chunk-wzcjhv54.js.map +0 -11
  594. package/dist/chunk-xtztwpkh.js.map +0 -12
  595. /package/dist/{chunk-7mhbs9yy.js.map → chunk-1z8ccj53.js.map} +0 -0
  596. /package/dist/{chunk-dmnd9ea6.js.map → chunk-30a0ftnm.js.map} +0 -0
  597. /package/dist/{chunk-qbd282aa.js.map → chunk-39q9ybav.js.map} +0 -0
  598. /package/dist/{chunk-fdk0ks9p.js.map → chunk-3x902cja.js.map} +0 -0
  599. /package/dist/{chunk-c4nrycdy.js.map → chunk-4q4a5a96.js.map} +0 -0
  600. /package/dist/{chunk-cpy282b8.js.map → chunk-4w8qzy9w.js.map} +0 -0
  601. /package/dist/{chunk-xavet0qs.js.map → chunk-6whr25gw.js.map} +0 -0
  602. /package/dist/{chunk-ygvay56w.js.map → chunk-896te58g.js.map} +0 -0
  603. /package/dist/{chunk-pfdq1ga6.js.map → chunk-8eqqqc1h.js.map} +0 -0
  604. /package/dist/{chunk-jka26v8c.js.map → chunk-8x1bsp68.js.map} +0 -0
  605. /package/dist/{chunk-6md802cc.js.map → chunk-9az7kjv4.js.map} +0 -0
  606. /package/dist/{chunk-95ps0k5q.js.map → chunk-9e5t53z0.js.map} +0 -0
  607. /package/dist/{chunk-js9e6487.js.map → chunk-9p7kyeqz.js.map} +0 -0
  608. /package/dist/{chunk-brybqw5k.js.map → chunk-bkxm2dzx.js.map} +0 -0
  609. /package/dist/{chunk-ppxf7gw2.js.map → chunk-d7t9jnym.js.map} +0 -0
  610. /package/dist/{chunk-cg7cygfj.js.map → chunk-fdmvaz7x.js.map} +0 -0
  611. /package/dist/{chunk-191jz8a6.js.map → chunk-ff0qdk7z.js.map} +0 -0
  612. /package/dist/{chunk-wx7smkn2.js.map → chunk-fq8drkp0.js.map} +0 -0
  613. /package/dist/{chunk-v8a1qjzp.js.map → chunk-hpswfrjj.js.map} +0 -0
  614. /package/dist/{chunk-bz5bnjjt.js.map → chunk-jjte0h4p.js.map} +0 -0
  615. /package/dist/{chunk-xrmbhap8.js.map → chunk-mwg0nwkb.js.map} +0 -0
  616. /package/dist/{chunk-a3faa34j.js.map → chunk-nfjt8k8j.js.map} +0 -0
  617. /package/dist/{chunk-394zjzjs.js.map → chunk-nhgqz3g3.js.map} +0 -0
  618. /package/dist/{chunk-92wrka15.js.map → chunk-q150fnj9.js.map} +0 -0
  619. /package/dist/{chunk-w3t94hm6.js.map → chunk-qk3zq25v.js.map} +0 -0
  620. /package/dist/{chunk-5qqmndhm.js.map → chunk-szzhrn3e.js.map} +0 -0
  621. /package/dist/{chunk-n1hbwc6y.js.map → chunk-t6pfch4e.js.map} +0 -0
  622. /package/dist/{chunk-brhp9d97.js.map → chunk-vmqjndb3.js.map} +0 -0
  623. /package/dist/{chunk-t58sktr5.js.map → chunk-wrb1x1ss.js.map} +0 -0
  624. /package/dist/{chunk-5sswe5ej.js.map → chunk-wsv23wvr.js.map} +0 -0
  625. /package/dist/{chunk-04r2fdsd.js.map → chunk-x0hqc54n.js.map} +0 -0
  626. /package/dist/{chunk-3neam1y5.js.map → chunk-y3qb965a.js.map} +0 -0
  627. /package/dist/{chunk-5pz3htbe.js.map → chunk-y57eawng.js.map} +0 -0
@@ -0,0 +1,183 @@
1
+ /** The file a video plays from: its root composition, which hosts the scenes. */
2
+ export declare const VIDEO_ENTRY = "index.html";
3
+ /**
4
+ * The frame rates a video plays at; a root composition without `data-fps` plays at 30. They are
5
+ * the ones HyperFrames renders a range of a film at, as an export renders a scene that overlaps
6
+ * another: it refuses 50.
7
+ */
8
+ export declare const VIDEO_FRAME_RATES: readonly [24, 25, 30, 60];
9
+ /**
10
+ * Where a scene starts, as its host's `data-start` writes it: at a number of seconds, or when
11
+ * another scene ends, `offset` seconds later (`demo + 0.5`) or earlier (`demo - 1`). `scene` is
12
+ * the name as written: the other scene's id, or its host's own `id`.
13
+ */
14
+ export type VideoStart = {
15
+ readonly type: "at";
16
+ readonly seconds: number;
17
+ } | {
18
+ readonly type: "after";
19
+ readonly scene: string;
20
+ readonly offset: number;
21
+ };
22
+ /** Where something is written in its file: its first character, and the one past its last. */
23
+ export interface VideoSourceSpan {
24
+ readonly start: number;
25
+ readonly end: number;
26
+ }
27
+ /** A file a composition plays or shows: `<video src>`, `<audio src>`, `<img src>`, and others. */
28
+ export interface VideoMediaReference {
29
+ readonly element: string;
30
+ readonly attribute: string;
31
+ /** As written, its entities decoded: a path, an `artifact:` address, or a URL. */
32
+ readonly value: string;
33
+ /** The attribute, name and value, where its file writes it. */
34
+ readonly at: VideoSourceSpan;
35
+ /**
36
+ * The file of a video that is never heard, its `src` or one of its `<source>`s': it writes
37
+ * `muted`, or a `data-has-audio` other than "true", as HyperFrames reads them.
38
+ */
39
+ readonly muted?: true;
40
+ }
41
+ /**
42
+ * An element of `index.html`, a scene's host or the root, where an editor changes its attributes in
43
+ * place.
44
+ */
45
+ export interface VideoSceneHost {
46
+ /** The whole element, its end tag included. */
47
+ readonly element: VideoSourceSpan;
48
+ /** Its start tag. */
49
+ readonly tag: VideoSourceSpan;
50
+ /** Each attribute it writes, by name, as the span of its name and value. */
51
+ readonly attributes: Readonly<Record<string, VideoSourceSpan>>;
52
+ }
53
+ export interface VideoScene {
54
+ /**
55
+ * Its host's `data-composition-id`, which its file's composition, `#<id>` addresses, comments and
56
+ * the outline name it by.
57
+ */
58
+ readonly id: string;
59
+ /** Its host's own `id`, when it writes another: `data-start` may name the scene by either. */
60
+ readonly hostId?: string;
61
+ /** Its host's `data-label`, HyperFrames' name for a scene. */
62
+ readonly label?: string;
63
+ /** Its file in the version, from its host's `data-composition-src`. */
64
+ readonly src: string;
65
+ readonly start: VideoStart;
66
+ readonly startMs: number;
67
+ readonly durationMs: number;
68
+ /** What its file plays and shows. */
69
+ readonly media: readonly VideoMediaReference[];
70
+ /** The compositions its file nests, each by its `data-composition-src`. */
71
+ readonly compositions: readonly VideoMediaReference[];
72
+ readonly host: VideoSceneHost;
73
+ }
74
+ /** A video's composition: its frame, its length, and its scenes, resolved to times. */
75
+ export interface VideoComposition {
76
+ readonly width: number;
77
+ readonly height: number;
78
+ readonly fps: number;
79
+ readonly durationMs: number;
80
+ /**
81
+ * The instant that shows the video before it plays, from the root's `data-poster`, in
82
+ * milliseconds within its length; none when the root writes none.
83
+ */
84
+ readonly posterMs?: number;
85
+ /** In the order they start; scenes that start together, in the order `index.html` lists them. */
86
+ readonly scenes: readonly VideoScene[];
87
+ /** What `index.html` plays and shows itself, under or over every scene: a soundtrack, a logo. */
88
+ readonly media: readonly VideoMediaReference[];
89
+ /** The root composition's element. */
90
+ readonly root: VideoSceneHost;
91
+ /**
92
+ * Each `<audio>` `index.html` plays beside its scenes, as the span of its whole element: heard,
93
+ * never seen, since a page shows no `<audio>` without `controls`.
94
+ */
95
+ readonly sounds: readonly VideoSourceSpan[];
96
+ /**
97
+ * Whether `index.html` shows anything that moves beside its scenes, as its own text says: a
98
+ * timed element, a video, an inline script, which may build a timeline, or a CSS animation or
99
+ * transition. What a scene shows then depends on when it plays. A sound shows nothing, so a
100
+ * soundtrack does not count. A script loaded by its `src` only loads a library; it and the
101
+ * stylesheets the root links are in `links`, for whoever reads the version's files.
102
+ */
103
+ readonly rootTimeline: boolean;
104
+ /** The scripts and stylesheets `index.html` loads beside its scenes, by `src` and `href`. */
105
+ readonly links: {
106
+ readonly scripts: readonly VideoMediaReference[];
107
+ readonly stylesheets: readonly VideoMediaReference[];
108
+ };
109
+ }
110
+ /**
111
+ * What `index.html` says on its own: the whole timeline, since each host writes its scene's start
112
+ * and length, but not what the scene files play.
113
+ */
114
+ export interface VideoRoot extends Omit<VideoComposition, "scenes"> {
115
+ readonly scenes: readonly Omit<VideoScene, "media" | "compositions">[];
116
+ }
117
+ /** A scene file, read on its own, or a composition a scene nests. */
118
+ export interface VideoSceneFile {
119
+ /** The `data-composition-id` of the composition its `<template>` holds. */
120
+ readonly id: string;
121
+ readonly media: readonly VideoMediaReference[];
122
+ /**
123
+ * The compositions it nests, each an element with `data-composition-src` in its composition,
124
+ * whose file loads from the project's root, as `index.html`'s scenes do.
125
+ */
126
+ readonly compositions: readonly VideoMediaReference[];
127
+ }
128
+ type Read<T> = T | {
129
+ readonly error: string;
130
+ };
131
+ /**
132
+ * Reads a whole project: `index.html`, then each scene file its hosts name, which `sceneFile`
133
+ * hands over as text, or undefined when the version has no such file.
134
+ */
135
+ export declare function readVideoComposition(index: string, sceneFile: (path: string) => string | undefined): Read<{
136
+ readonly composition: VideoComposition;
137
+ }>;
138
+ /**
139
+ * Every file of the version a project plays and shows, as its HTML names them: `index.html`, each
140
+ * scene, and each composition a scene nests, all the way down. `file` hands a file's text over, or
141
+ * undefined when it has none to read; `exists` says whether the version holds a path. Lenient
142
+ * where publishing refuses: a file that cannot be read names nothing, and publishing then says
143
+ * what is wrong with it.
144
+ */
145
+ export declare function videoFilesPlayed(index: string, file: (path: string) => string | undefined, exists: (path: string) => boolean): ReadonlySet<string>;
146
+ /** Why a host's scene file is missing, for whoever reads the version's files themselves. */
147
+ export declare function missingScene(id: string, src: string): string;
148
+ /**
149
+ * Reads `index.html`: the root composition, the first element with `data-composition-id`, or the
150
+ * one marked `data-root="true"`, as HyperFrames picks it, and the scene hosts in it, each an
151
+ * element with `data-composition-src`, with every start resolved to a time.
152
+ */
153
+ export declare function parseVideoRoot(html: string): Read<{
154
+ readonly root: VideoRoot;
155
+ }>;
156
+ /**
157
+ * Reads a scene file: a `<template>` holding one composition, whose `data-composition-id` its
158
+ * host names. `file` is its path, which its errors name.
159
+ */
160
+ export declare function parseVideoScene(html: string, file: string): Read<{
161
+ readonly scene: VideoSceneFile;
162
+ }>;
163
+ /** Puts a root and its scene files, by path, together: each file holds its host's composition. */
164
+ export declare function composeVideo(root: VideoRoot, files: ReadonlyMap<string, VideoSceneFile>): Read<{
165
+ readonly composition: VideoComposition;
166
+ }>;
167
+ /**
168
+ * The version's file a reference in `file` names, as HyperFrames finds it: a path that climbs out
169
+ * with `../`, or one beside `file` that the version holds, is read from `file`'s folder; any other
170
+ * from the project's root, where scenes are played from. Its `?query` and `#fragment` are not part
171
+ * of the path. Undefined for a reference that names no file of the version: an `artifact:`
172
+ * address, a URL, a path from a site's root, or one that climbs out of the project.
173
+ */
174
+ export declare function videoFilePath(file: string, value: string, exists: (path: string) => boolean): string | undefined;
175
+ /** Whether CSS moves on its own as time passes: an animation or a transition. */
176
+ export declare function cssMoves(css: string): boolean;
177
+ /**
178
+ * Every file a page of a video plays and shows, inside its templates too, in source order:
179
+ * `index.html`, a scene file, or a composition one nests, whether it reads as one or not.
180
+ */
181
+ export declare function videoPageMedia(path: string, html: string): VideoMediaReference[];
182
+ export {};
183
+ //# sourceMappingURL=composition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../src/artifacts/video/composition.ts"],"names":[],"mappings":"AAYA,iFAAiF;AACjF,eAAO,MAAM,WAAW,eAAe,CAAA;AAEvC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,2BAA4B,CAAA;AAI1D;;;;GAIG;AACH,MAA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Ac,CAAA;CAAE,CAAC,CAO1C;AAED,kGAAkG;AAClG,wBAAgB,YAAY,CAC1B,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,GACzC,IAAI,CAAC;IAAE,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAA;CAAE,CAAC,CAclD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAChC,MAAM,GAAG,SAAS,CAapB;AA4HD,iFAAiF;AACjF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE7C;AAmVD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,mBAAmB,EAAE,CAIhF"}
@@ -0,0 +1,298 @@
1
+ import { type VideoClip, type VideoFileTimeline, type VideoText } from "./timeline";
2
+ /**
3
+ * A change to a file's text: `remove` characters at `index`, then `insert` there, as the live
4
+ * layer's `BoardChange`. A file's changes are sorted and apart, each at its place in the text
5
+ * before the edit, so `applyBoardEditToText` applies them.
6
+ */
7
+ export interface VideoTextChange {
8
+ readonly index: number;
9
+ readonly remove: number;
10
+ readonly insert: string;
11
+ }
12
+ /** What an edit does to one file: changes its text, creates it, or removes it. */
13
+ export type VideoFileEdit = {
14
+ readonly path: string;
15
+ readonly changes: readonly VideoTextChange[];
16
+ } | {
17
+ readonly path: string;
18
+ readonly create: string;
19
+ } | {
20
+ readonly path: string;
21
+ readonly remove: true;
22
+ };
23
+ export type VideoEdit = readonly VideoFileEdit[];
24
+ /** A video's files as an editor holds them: each HTML file's text, null for a media file. */
25
+ export type VideoSources = ReadonlyMap<string, string | null>;
26
+ /** An edit, or why it is refused: the video it would leave is not one. */
27
+ export type VideoEditResult = {
28
+ readonly edit: VideoEdit;
29
+ } | {
30
+ readonly error: string;
31
+ /** Why, for an editor to say in its reader's words: a file grown past what publishing reads. */
32
+ readonly refusal?: "too_large";
33
+ };
34
+ /** A stretch of time, in milliseconds, its end not included. */
35
+ export interface VideoRange {
36
+ readonly startMs: number;
37
+ readonly endMs: number;
38
+ }
39
+ /**
40
+ * A stretch to cut, and the `room` around it the cut may take as it grows to whole frames without
41
+ * touching anything kept: for a transcript's words, the pauses up to the words either side.
42
+ * Without one, the cut grows as much on each side.
43
+ */
44
+ export interface VideoCut extends VideoRange {
45
+ readonly room?: VideoRange;
46
+ }
47
+ /** The loudest a clip's sound is made, `data-volume`, as many times as loud as recorded. */
48
+ export declare const MAX_VOLUME = 4;
49
+ /** The shortest a scene or a clip may become: a few frames. */
50
+ export declare const MIN_CLIP_MS = 100;
51
+ /**
52
+ * How an edit names an element of a file: its ref, or its ref with what the editor read there.
53
+ * An element without an id is named by its place, which someone else's edit may shift between
54
+ * the reader's choice and the edit: with what it held, the edit still finds it, or refuses.
55
+ * {@link videoTarget} makes one.
56
+ */
57
+ export type VideoTarget = string | {
58
+ readonly ref: string;
59
+ readonly tag: string;
60
+ /** Its words, as a text or a caption holds them. */
61
+ readonly words?: string;
62
+ /** The file it plays or shows. */
63
+ readonly src?: string;
64
+ };
65
+ /** The target that names a clip or a text as the editor reads it now. */
66
+ export declare function videoTarget(element: VideoClip | VideoText): VideoTarget;
67
+ /** The clips an editor can import. */
68
+ export type VideoImportKind = "video" | "audio" | "image";
69
+ /**
70
+ * Makes a scene about `ms` long, as long as {@link videoSceneLength} says. The scenes after it
71
+ * move with its end: those chained to it as HyperFrames moves them, and those at a number of
72
+ * seconds by as much. The video's own length, and a soundtrack that ran to its end, follow.
73
+ */
74
+ export declare function setSceneLength(sources: VideoSources, scene: string, ms: number): VideoEditResult;
75
+ /**
76
+ * The length {@link setSceneLength} gives a scene asked to last `ms` in a video at `fps`: the
77
+ * nearest whole number of frame steps, 100 ms at 30 fps, so the scenes after move by whole frames.
78
+ * A field shows it as soon as it is typed.
79
+ */
80
+ export declare function videoSceneLength(ms: number, fps: number): number;
81
+ /** Names a scene, as its chapter shows it; an empty label removes it. */
82
+ export declare function setSceneLabel(sources: VideoSources, scene: string, label: string): VideoEditResult;
83
+ /**
84
+ * Moves a scene to `to` in play order: each scene that follows another than before starts when
85
+ * that one ends, keeping its own overlap or gap. Hosts keep their lines in `index.html`, so a move
86
+ * is attribute values written again, which merge with someone else's edit of the same host. Scenes
87
+ * on screen together then stack in play order, the later on top (`restack`).
88
+ */
89
+ export declare function moveScene(sources: VideoSources, scene: string, to: number): VideoEditResult;
90
+ /**
91
+ * Copies a scene: its file under a new id, its host after its own, and the scenes that followed it
92
+ * now following the copy. Every element of the copy gets an id of its own, as HyperFrames plays
93
+ * each recording by its id and a clip is one clip by its id, and none of it goes on from a clip of
94
+ * the original's. Returns the copy's id with the edit.
95
+ */
96
+ export declare function duplicateScene(sources: VideoSources, scene: string): VideoEditResult & {
97
+ readonly scene?: string;
98
+ };
99
+ /**
100
+ * Removes a scene: its host, and its file unless another scene plays it. The scenes that followed
101
+ * it start where it started, keeping their own overlap or gap, and the video is shorter by as
102
+ * much.
103
+ */
104
+ export declare function removeScene(sources: VideoSources, scene: string): VideoEditResult;
105
+ /**
106
+ * Sets a clip's timing, in milliseconds from its composition's start and into its file, as an
107
+ * inspector's fields do: nothing around it moves.
108
+ */
109
+ export declare function setClipTiming(sources: VideoSources, file: string, clip: VideoTarget, timing: {
110
+ readonly startMs?: number;
111
+ readonly durationMs?: number;
112
+ readonly mediaStartMs?: number;
113
+ }): VideoEditResult;
114
+ /**
115
+ * Moves a clip's edge to `toMs`, from its composition's start. Its end makes it shorter or longer;
116
+ * its start, into its file as much, as dragging a clip's edge does. An end pulled past its scene's
117
+ * end goes on in the next scene, as {@link moveClips} places a clip, or the last scene grows to
118
+ * hold it. A start never goes before its scene's. With `ripple`, what comes after the edge moves
119
+ * with it, the scene's end included, so the clip stays whole in its scene, and a start keeps its
120
+ * place: the clip pulls the rest of the scene in.
121
+ */
122
+ export declare function trimClip(sources: VideoSources, file: string, clip: VideoTarget, edge: "start" | "end", toMs: number, options?: {
123
+ readonly ripple?: boolean;
124
+ readonly endMs?: number;
125
+ }): VideoPlaceResult;
126
+ /**
127
+ * Moves a clip to start at `startMs` from its composition's start, its length kept, never before
128
+ * the video's: before its scene's start, it goes into the scene it then plays in, as
129
+ * {@link moveClips} places several.
130
+ */
131
+ export declare function moveClip(sources: VideoSources, file: string, clip: VideoTarget, startMs: number): VideoPlaceResult;
132
+ /** Sets how loud a clip plays, from 0 to 1, and how long it fades in and out, in milliseconds. */
133
+ export declare function setClipSound(sources: VideoSources, file: string, clip: VideoTarget, sound: {
134
+ readonly volume?: number;
135
+ readonly fadeInMs?: number;
136
+ readonly fadeOutMs?: number;
137
+ /** Footage whose sound is not played, or played again. */
138
+ readonly muted?: boolean;
139
+ }): VideoEditResult;
140
+ /**
141
+ * Types over the words of an element that holds text alone, by its ref among the file's texts.
142
+ * A line break in `text` is a `<br>`.
143
+ */
144
+ export declare function setVideoText(sources: VideoSources, file: string, ref: VideoTarget, text: string): VideoEditResult;
145
+ /**
146
+ * Splits a clip at `atMs` from its composition's start into two, the second a copy that starts
147
+ * there and plays on from where the first stops. `endMs` is where a clip that writes no length
148
+ * ends, as its file or its scene ends it.
149
+ */
150
+ export declare function splitClip(sources: VideoSources, file: string, clip: VideoTarget, atMs: number, options?: {
151
+ readonly endMs?: number;
152
+ }): VideoEditResult & {
153
+ readonly clip?: string;
154
+ };
155
+ /**
156
+ * Removes a clip. With `ripple`, what comes after it moves back by its length, the scene's end
157
+ * included, as a magnetic timeline closes the gap.
158
+ */
159
+ export declare function removeClip(sources: VideoSources, file: string, clip: VideoTarget, options?: {
160
+ readonly ripple?: boolean;
161
+ readonly endMs?: number;
162
+ }): VideoEditResult;
163
+ /** A clip of one of the video's files, as an operation on several clips names it. */
164
+ export interface VideoClipTarget {
165
+ /** Its file: a scene's, or `index.html` for the video's own. */
166
+ readonly file: string;
167
+ readonly clip: VideoTarget;
168
+ }
169
+ /**
170
+ * A clip that left a scene whose script animates it: its look came with it, the motion the
171
+ * script writes could not.
172
+ */
173
+ export interface VideoAnimationLeft {
174
+ /** Where the clip is now. */
175
+ readonly clip: VideoClipTarget;
176
+ /** The scene it left, whose script still names it. */
177
+ readonly scene: string;
178
+ }
179
+ /**
180
+ * A clip that landed in a scene whose script animates what it is, a class of it or its tag: that
181
+ * motion now plays on it too.
182
+ */
183
+ export interface VideoAnimationJoined {
184
+ /** Where the clip is now. */
185
+ readonly clip: VideoClipTarget;
186
+ /** The scene it landed in, whose script reaches it. */
187
+ readonly scene: string;
188
+ }
189
+ /**
190
+ * An edit that places clips in the video, as a move, an end trim or an import does: a clip of a
191
+ * scene lives in the scene that plays where it starts, its own while that holds it, else the one
192
+ * on top there, and goes on past that scene's end as a copy in the next, playing on from where it
193
+ * stopped; the last scene grows to hold it. `clips` names each clip placed where it now starts, in
194
+ * the order given, `animationsLeft` each that left a scene whose script animates it, and
195
+ * `animationsJoined` each that landed in one whose script animates what it is, and
196
+ * `looksMayDiffer` each whose look could not all be taken along.
197
+ */
198
+ export type VideoPlaceResult = VideoEditResult & {
199
+ readonly clips?: readonly VideoClipTarget[];
200
+ readonly animationsLeft?: readonly VideoAnimationLeft[];
201
+ readonly animationsJoined?: readonly VideoAnimationJoined[];
202
+ /**
203
+ * Each clip that landed in another scene where a rule may style it that its look could not take
204
+ * along, one through a wrapper or by its place among its siblings: it may look a little different.
205
+ */
206
+ readonly looksMayDiffer?: readonly VideoClipTarget[];
207
+ };
208
+ /**
209
+ * Moves clips together by `deltaMs`, as one edit: they keep their places one to another, none
210
+ * before the video's start, so the whole group moves less. Each clip of a scene lands in the scene
211
+ * that plays where it now starts, and goes on in the next scene past that one's end; the last
212
+ * scene grows to hold it (see {@link VideoPlaceResult}). The video's own clips stay its own.
213
+ */
214
+ export declare function moveClips(sources: VideoSources, clips: readonly VideoClipTarget[], deltaMs: number): VideoPlaceResult;
215
+ /**
216
+ * Removes clips at once, each from its own file, as {@link removeClip} removes one. With `ripple`,
217
+ * each file closes the gaps its clips leave, as one cut of all their stretches. `endMs` is where
218
+ * a clip that writes no length ends.
219
+ */
220
+ export declare function removeClips(sources: VideoSources, clips: readonly (VideoClipTarget & {
221
+ readonly endMs?: number;
222
+ })[], options?: {
223
+ readonly ripple?: boolean;
224
+ }): VideoEditResult;
225
+ /**
226
+ * Splits clips at once, each at its own `atMs` from its composition's start, as {@link splitClip}
227
+ * splits one. Returns the second part of each, in the order they are named.
228
+ */
229
+ export declare function splitClips(sources: VideoSources, splits: readonly (VideoClipTarget & {
230
+ readonly atMs: number;
231
+ readonly endMs?: number;
232
+ })[]): VideoEditResult & {
233
+ readonly clips?: readonly VideoClipTarget[];
234
+ };
235
+ /**
236
+ * Keeps only these stretches of a clip's file, in milliseconds into it: the clip becomes one clip
237
+ * per stretch, each starting where the one before ends, and what played after the clip moves
238
+ * back by what was cut, the scene's end included. What is cut out of the timeline goes with it,
239
+ * such as the captions of words no longer said. A clip that goes on keeps them in every part,
240
+ * each part cutting what it plays of the rest.
241
+ */
242
+ export declare function keepClipRanges(sources: VideoSources, file: string, clip: VideoTarget, ranges: readonly VideoRange[], options?: {
243
+ readonly endMs?: number;
244
+ }): VideoEditResult;
245
+ /**
246
+ * Cuts stretches of a recording, in milliseconds into its file, wherever the composition plays
247
+ * them: each clip of `src` loses what it played of them, as {@link keepClipRanges} cuts one
248
+ * clip, and what followed moves back. A transcript's words cut out are such stretches. A clip
249
+ * that goes on loses them in every part, so words across a scene's edge go whole.
250
+ */
251
+ export declare function removeMediaRanges(sources: VideoSources, file: string, src: string, ranges: readonly VideoCut[], options?: {
252
+ readonly endMs?: number;
253
+ }): VideoEditResult;
254
+ /**
255
+ * Takes a stretch out of the video, in milliseconds from its start, as a magnetic timeline deletes
256
+ * a range: each scene loses what it shows of it, from its start up to where the next scene starts,
257
+ * so a crossfade is cut once. Every clip of a scene loses what played then, a recording cut
258
+ * through is split around it, and what followed moves back; a scene the range covers whole goes.
259
+ */
260
+ export declare function cutRange(sources: VideoSources, range: VideoRange): VideoEditResult;
261
+ /**
262
+ * Adds a clip that plays or shows a file of the video, at `startMs` in its composition, for
263
+ * `durationMs`: footage fills the frame under what the scene shows, a sound plays under it. It is
264
+ * placed as {@link moveClips} places a clip: past its scene's end, it goes on in the next scene,
265
+ * or the last scene grows to hold it. Footage added where a scene's clip is heard is added muted,
266
+ * as B-roll over a voice is, which `muted` says; the video's own music is no reason. Returns the clip's id with the edit.
267
+ */
268
+ export declare function insertClip(sources: VideoSources, file: string, clip: {
269
+ readonly kind: VideoImportKind;
270
+ readonly src: string;
271
+ readonly startMs: number;
272
+ readonly durationMs: number;
273
+ readonly mediaStartMs?: number;
274
+ }): VideoEditResult & {
275
+ readonly clip?: string;
276
+ readonly muted?: true;
277
+ };
278
+ /**
279
+ * Plays another file of the video in a clip's place, one of the same kind: every part of the clip,
280
+ * from the new file's start on, its timing, sound and look as they were. One edit: the file it
281
+ * played, once no clip plays it, leaves the version with it.
282
+ */
283
+ export declare function replaceClipMedia(sources: VideoSources, file: string, clip: VideoTarget, src: string): VideoEditResult;
284
+ /** The files an edit leaves: `sources` with the edit applied. */
285
+ export declare function applyVideoEdit(sources: VideoSources, edit: VideoEdit): Map<string, string | null>;
286
+ /** A file's clips and texts, as an editor lays them out: `index.html`'s own, or a scene's. */
287
+ export declare function readVideoFileTimeline(file: string, html: string): VideoFileTimeline | null;
288
+ /**
289
+ * The element a target names among a file's clips or texts, as the file is now: the one at its
290
+ * place when it is still what the editor saw there, else the one element that is, wherever it
291
+ * moved. Otherwise the elements alike, none or several: an edit refuses rather than land on
292
+ * another element than the one the reader chose, and a selection lets go.
293
+ */
294
+ export declare function findVideoTarget<T extends {
295
+ readonly ref: string;
296
+ readonly tag: string;
297
+ }>(items: readonly T[], target: VideoTarget): T | readonly T[];
298
+ //# sourceMappingURL=edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.d.ts","sourceR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AAI,CAE1F;AAk8BD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EACtF,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,MAAM,EAAE,WAAW,GAClB,CAAC,GAAG,SAAS,CAAC,EAAE,CASlB"}
@@ -0,0 +1,142 @@
1
+ import type { FileRef } from "../../blob-storage/types";
2
+ import type { Queue, RenderQueueJob } from "../../queues";
3
+ import type { ArtifactStorage, ArtifactVersionRecord, ArtifactVideoRenderLack, ArtifactVideoRenderRecord } from "../../storage/artifacts/types";
4
+ import type { VideoOutline } from "../outline";
5
+ /**
6
+ * What renders a video: the agent image's HyperFrames, the release the app plays. Every key names
7
+ * it, so a sandbox that runs another refuses to render, rather than keep what it rendered under a
8
+ * key it does not match.
9
+ */
10
+ export declare const VIDEO_ENGINE = "hyperframes@0.9.68";
11
+ /**
12
+ * How every segment is encoded, so segments join without being encoded again: H.264 at one
13
+ * quality, a keyframe on its first frame and every two seconds after, captured by two browsers at
14
+ * once, which keeps a segment rendered again the same. Changing them renders every segment anew.
15
+ * CRF 20 makes a 1080×1920 video about 11 Mb/s, what social networks take in; CRF 18 made it 19,
16
+ * twice the file for no difference a viewer sees (SSIM 0.986 against 0.989).
17
+ */
18
+ export declare const VIDEO_SEGMENT_SETTINGS: {
19
+ readonly crf: 20;
20
+ readonly keyframeSeconds: 2;
21
+ readonly workers: 2;
22
+ };
23
+ /**
24
+ * How the render worker assembles an export: each attempt within `timeoutMs`, which holds fetching
25
+ * its segments, joining them, and keeping the MP4, up to `attempts`, `backoffMs` apart. While
26
+ * segments render, it looks again every `recheckMs`, and gives up `waitMs` after it was asked.
27
+ */
28
+ export declare const VIDEO_EXPORT_JOB: {
29
+ readonly timeoutMs: number;
30
+ readonly attempts: 3;
31
+ readonly backoffMs: 15000;
32
+ readonly recheckMs: 5000;
33
+ readonly waitMs: number;
34
+ };
35
+ /** How many times the render worker tries a segment, and how long it waits between. */
36
+ export declare const VIDEO_SEGMENT_JOB: {
37
+ readonly attempts: 2;
38
+ readonly backoffMs: 30000;
39
+ };
40
+ /**
41
+ * How long one segment may take. Rendering a heavy 1080p scene takes up to twelve times its length
42
+ * in a small sandbox (2 vCPU): its frames get twenty seconds each second, in proportion to their
43
+ * pixels, and five minutes to start. The sound is mixed in a few seconds of each minute.
44
+ */
45
+ export declare function videoSegmentTimeoutMs(segment: VideoSegment, video: Pick<VideoOutline, "fps" | "width" | "height" | "durationMs">): number;
46
+ /** What an `artifact:` address a video plays resolved to, as whoever asked reads it: none when not. */
47
+ export interface VideoMediaFile {
48
+ readonly address: string;
49
+ readonly file?: FileRef;
50
+ }
51
+ /**
52
+ * A segment of a video's export: the frames of a scene, from the frame it starts on up to the one
53
+ * the next scene starts on, rendered alone and silent; or the whole video's sound.
54
+ */
55
+ export type VideoSegment = {
56
+ readonly kind: "scene";
57
+ readonly scene: string;
58
+ /** The scene's name, as the player shows it, which is in no key. */
59
+ readonly label?: string;
60
+ readonly startFrame: number;
61
+ readonly endFrame: number;
62
+ } | {
63
+ readonly kind: "sound";
64
+ };
65
+ /** What a video's export is made of: its segments, in the order they play, the sound last. */
66
+ export interface VideoExportPlan {
67
+ readonly key: string;
68
+ /** How many frames the MP4 has. */
69
+ readonly frames: number;
70
+ readonly segments: readonly (VideoSegment & {
71
+ readonly key: string;
72
+ })[];
73
+ }
74
+ /** A video version, as an export reads it. */
75
+ export type VideoExportSource = Pick<ArtifactVersionRecord, "files" | "references"> & {
76
+ readonly outline: VideoOutline;
77
+ readonly media: readonly VideoMediaFile[];
78
+ };
79
+ /**
80
+ * What a video's export is made of, from its outline alone, so whoever asks finds what is kept
81
+ * without reading a file. The first segment starts at frame 0, each next one on the frame its
82
+ * scene starts on; a scene that starts with another renders within the other's segment.
83
+ *
84
+ * A segment's key holds its scene's render key, where it starts and how many frames it has from
85
+ * there, the engine and the settings, and what the `artifact:` addresses played by the root and
86
+ * the scenes on screen during it resolve to. The sound's holds every file and what every address resolves to. The
87
+ * export's holds its segments' keys.
88
+ */
89
+ export declare function videoExportPlan(source: VideoExportSource): VideoExportPlan;
90
+ /** Where the render worker assembles an export: one job per export, by its key. */
91
+ export declare function videoExportJobId(key: string): string;
92
+ /** Where it renders a segment: one job per segment, by its key. */
93
+ export declare function videoSegmentJobId(key: string): string;
94
+ /** How far an export that is not kept yet has come. */
95
+ export interface VideoExportProgress {
96
+ /** Its segments rendered, of all of them. */
97
+ readonly ready: number;
98
+ readonly total: number;
99
+ /** Every segment is rendered, and the MP4 is being joined from them. */
100
+ readonly assembling: boolean;
101
+ }
102
+ /**
103
+ * Where an export stands, from what is kept under its keys: the MP4, why it could not be made, or
104
+ * how far it has come. A segment that failed fails the export: why is the segment's.
105
+ */
106
+ export declare function videoExportStatus(plan: VideoExportPlan, kept: readonly ArtifactVideoRenderRecord[]): {
107
+ readonly status: "ready";
108
+ readonly file: FileRef;
109
+ } | {
110
+ readonly status: "failed";
111
+ readonly reason: string;
112
+ /** What the project lacks, when the video is not why. */
113
+ readonly lacks?: ArtifactVideoRenderLack;
114
+ } | {
115
+ readonly status: "rendering";
116
+ readonly progress: VideoExportProgress;
117
+ };
118
+ /** How many of an export's segments are rendered: those that failed are not. */
119
+ export declare function videoExportProgress(plan: VideoExportPlan, kept: readonly ArtifactVideoRenderRecord[]): VideoExportProgress;
120
+ /** Every key an export reads: its own, then its segments'. */
121
+ export declare function videoExportKeys(plan: VideoExportPlan): string[];
122
+ /**
123
+ * Asks the render worker to assemble a video version's export, carrying what the version holds
124
+ * now, and keeps that it was asked for, which reading it without asking then says. Asking again
125
+ * while it is asked for asks nothing more; `retry` forgets why the export or its
126
+ * segments could not be made, and asks again for each, in a job of its own: one in the export's
127
+ * place could be taken by a segment that finishes meanwhile, which asks for nothing.
128
+ */
129
+ export declare function requestVideoExport(context: {
130
+ readonly storage: Pick<ArtifactStorage, "clearVideoRenderFailures" | "putVideoExportAsk">;
131
+ readonly queue: Pick<Queue<RenderQueueJob>, "enqueue">;
132
+ }, version: Pick<ArtifactVersionRecord, "projectId" | "artifactId" | "version">, source: VideoExportSource, options: {
133
+ readonly plan: VideoExportPlan;
134
+ readonly retry?: boolean;
135
+ }): Promise<void>;
136
+ /**
137
+ * What each `artifact:` file a version plays resolves to, as `read` reads it: the version its
138
+ * address pins, or the latest. One `read` cannot find, or that holds no such file, resolves to
139
+ * none.
140
+ */
141
+ export declare function resolveVideoMedia(version: Pick<ArtifactVersionRecord, "references">, read: (artifactId: string, version: number | "latest") => Promise<Pick<ArtifactVersionRecord, "files"> | null>): Promise<VideoMediaFile[]>;
142
+ //# sourceMappingURL=export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../src/artifacts/video/export.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,+BAA+B,CAAA;AAGtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAS9C;;;;GAIG;AACH,eAAO,MAAM,YAAY,uBAAuC,CAAA;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;CAAuD,CAAA;AAE1F;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAA;AAEV,uFAAuF;AACvF,eAAO,MAAM,iBAAiB;;;CAA8C,CAAA;AAE5E;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,CAAC,GACnE,MAAM,CAKR;AA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