@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,5 @@
1
+ // What `hyperframes.ts` imports as text. Bun's loader reads it; the type checker needs telling.
2
+ declare module "*/generated/hyperframes.txt" {
3
+ const text: string
4
+ export default text
5
+ }
@@ -0,0 +1,14 @@
1
+ import runtime from "./generated/hyperframes.txt" with { type: "text" }
2
+
3
+ /**
4
+ * The HyperFrames release a video plays with in its frame. The agent image's `hyperframes` CLI,
5
+ * which checks and renders videos, is the same release, so what the app plays is what an export
6
+ * renders; a test holds the two together.
7
+ */
8
+ export const HYPERFRAMES_VERSION = "0.9.68"
9
+
10
+ /**
11
+ * HyperFrames' runtime, `hyperframe.runtime.iife.js`, as `bun run generate:hyperframes-runtime`
12
+ * copies it from `@hyperframes/core`: a video's frame serves it as `__sixb/hyperframes.js`.
13
+ */
14
+ export const HYPERFRAMES_RUNTIME: string = runtime
@@ -5,6 +5,8 @@
5
5
 
6
6
  // A frozen designed document as its frame shows it: the values written in, none read again.
7
7
  export { frozenDocumentHtml } from "../document-fill"
8
+ // A video's frame plays each recording's proxy once it is ready, under a name of its own.
9
+ export { MEDIA_PROXY_PARAM, requestedMediaProxy } from "../media/media"
8
10
  export { HTML_ENTRY } from "../publish/validate/html"
9
11
  // What a frame's `sixb.query` reads: the route serves it, and the layout check serves it too.
10
12
  export {
@@ -14,13 +16,16 @@ export {
14
16
  export {
15
17
  FRAME_ASSETS,
16
18
  FRAME_CDN_ALLOWLIST,
19
+ FRAME_CDN_TARGETS,
17
20
  FRAME_REFERENCE_PATH,
18
21
  FRAME_REFERENCE_PREFIX,
19
22
  injectFrameAssets,
20
23
  markDocumentSections,
21
24
  rewriteFrameReferences,
25
+ rewriteVideoProxies,
22
26
  } from "./assets"
23
27
  export { type FrameLayout, frameEntries, frameLayout } from "./entries"
24
28
  export { ARTIFACT_FRAME_ROUTE_PREFIX, createArtifactFrame, resolveArtifactFrame } from "./grants"
29
+ export { HYPERFRAMES_VERSION } from "./hyperframes"
25
30
  export { FRAME_DEFAULT_THEMES } from "./kit"
26
31
  export { type LayoutProblem, layoutProbe } from "./probe"
@@ -354,8 +354,10 @@ export const FRAME_DECK_CSS = kit(` :root {
354
354
  }
355
355
  section.slide.chart > sixb-embed,
356
356
  section.slide.chart figure > sixb-embed { flex: 1; min-height: 0; aspect-ratio: auto; }
357
- /* An image from another artifact its reader cannot see. */
358
- section.slide img[data-sixb-ref="unavailable"] {
357
+ /* An image, or a video, from another artifact its reader cannot see. */
358
+ section.slide img[data-sixb-ref="unavailable"],
359
+ section.slide video[data-sixb-ref="unavailable"],
360
+ section.slide video:has(> source[data-sixb-ref="unavailable"]) {
359
361
  display: block;
360
362
  min-width: 160px;
361
363
  min-height: 90px;
@@ -568,7 +570,9 @@ export const FRAME_PAGE_CSS = kit(` html { color-scheme: light; }
568
570
  font-size: 13px;
569
571
  color: var(--muted-foreground);
570
572
  }
571
- img[data-sixb-ref="unavailable"] { display: block; min-width: 120px; min-height: 68px; border-radius: var(--radius); background: var(--muted); }
573
+ img[data-sixb-ref="unavailable"],
574
+ video[data-sixb-ref="unavailable"],
575
+ video:has(> source[data-sixb-ref="unavailable"]) { display: block; min-width: 120px; min-height: 68px; border-radius: var(--radius); background: var(--muted); }
572
576
  `)
573
577
 
574
578
  /**
@@ -83,6 +83,11 @@ export type FrameRequest =
83
83
  * script, which takes the `MessagePort` the request transfers and edits the body in place.
84
84
  */
85
85
  | FrameRequestOf<"editor", { readonly code: string }>
86
+ /**
87
+ * A video's frame finds the words shown at a point of its picture, `x` and `y` as fractions of
88
+ * its width and height, and says which with `video.picked`: the editor types over them in place.
89
+ */
90
+ | FrameRequestOf<"video.pick", { readonly x: number; readonly y: number }>
86
91
 
87
92
  interface FrameRequestOf<Method extends string, Params> {
88
93
  readonly protocol: typeof FRAME_PROTOCOL
@@ -102,6 +107,11 @@ export interface FrameResponse {
102
107
  export type FrameEvent =
103
108
  /** The frame has laid out its entry: a deck says how many slides it has. */
104
109
  | FrameEventOf<"ready", { readonly slides?: number }>
110
+ /**
111
+ * A video cannot start: HyperFrames' runtime did not load beside the frame's, or stopped at its
112
+ * startup. Retrying may help; waiting for its timeline will not.
113
+ */
114
+ | FrameEventOf<"failed", Record<string, never>>
105
115
  /** The reader picked a slide in the overview. */
106
116
  | FrameEventOf<"select", { readonly slide: number }>
107
117
  /** A key the app handles, pressed while the frame had focus. */
@@ -150,6 +160,12 @@ export type FrameEvent =
150
160
  "edit.text",
151
161
  { readonly address: string; readonly base: string; readonly text: string }
152
162
  >
163
+ /**
164
+ * The words a video's frame found where `video.pick` asked, or none: an element holding words
165
+ * alone, in the composition `scene` names, the `occurrence`th of its tag that says the same in
166
+ * it, where it shows, in fractions of the picture.
167
+ */
168
+ | FrameEventOf<"video.picked", { readonly target: FrameVideoText | null }>
153
169
  /**
154
170
  * The reader zoomed over a canvas's board, opened or running on the canvas, which the app zooms
155
171
  * instead of the browser: a pinch or the wheel with ⌘ or Ctrl, `factor` times around `at`, in
@@ -214,6 +230,19 @@ export interface FramePoint {
214
230
  readonly y: number
215
231
  }
216
232
 
233
+ /** Words a video shows, as its frame found them under the reader's pointer. */
234
+ export interface FrameVideoText {
235
+ /** The `data-composition-id` of the composition they are in: a scene's, or the root's. */
236
+ readonly scene: string
237
+ readonly tag: string
238
+ /** Its words, spaces collapsed, a line break a space. */
239
+ readonly text: string
240
+ /** How many elements of its tag saying the same come before it in its composition. */
241
+ readonly occurrence: number
242
+ /** Where it shows, in fractions of the picture's width and height. */
243
+ readonly rect: FrameRect
244
+ }
245
+
217
246
  export interface FrameRect {
218
247
  readonly x: number
219
248
  readonly y: number
@@ -375,6 +404,8 @@ export function parseFrameEvent(data: unknown): FrameEvent | null {
375
404
  case "ready":
376
405
  if (params.slides === undefined) return event("ready", {})
377
406
  return isCount(params.slides) ? event("ready", { slides: params.slides }) : null
407
+ case "failed":
408
+ return event("failed", {})
378
409
  case "select":
379
410
  return isCount(params.slide) && params.slide > 0
380
411
  ? event("select", { slide: params.slide })
@@ -424,6 +455,11 @@ export function parseFrameEvent(data: unknown): FrameEvent | null {
424
455
  const target = parseEditTarget(params.target)
425
456
  return target ? event(data.event, { target, ...point }) : null
426
457
  }
458
+ case "video.picked": {
459
+ if (params.target === null) return event("video.picked", { target: null })
460
+ const target = parseVideoText(params.target)
461
+ return target ? event("video.picked", { target }) : null
462
+ }
427
463
  case "edit.text":
428
464
  return isEditAddress(params.address) &&
429
465
  typeof params.text === "string" &&
@@ -500,6 +536,26 @@ function parsePoint(value: unknown): FramePoint | null | undefined {
500
536
  return { x: Number(value.x), y: Number(value.y) }
501
537
  }
502
538
 
539
+ function parseVideoText(value: unknown): FrameVideoText | null {
540
+ if (!isRecord(value) || !isRecord(value.rect)) return null
541
+ const { scene, tag, text, occurrence } = value
542
+ if (typeof scene !== "string" || !/^[A-Za-z][A-Za-z0-9_-]{0,63}$/.test(scene)) return null
543
+ if (typeof tag !== "string" || !/^[a-z][a-z0-9]{0,15}$/.test(tag)) return null
544
+ if (typeof text !== "string" || text.length > MAX_EDIT_TEXT_LENGTH || !isCount(occurrence)) {
545
+ return null
546
+ }
547
+
548
+ const { x, y, width, height } = value.rect
549
+ if (![x, y, width, height].every(Number.isFinite)) return null
550
+ return {
551
+ scene,
552
+ tag,
553
+ text,
554
+ occurrence,
555
+ rect: { x: Number(x), y: Number(y), width: Number(width), height: Number(height) },
556
+ }
557
+ }
558
+
503
559
  function parseEditTarget(value: unknown): FrameEditTarget | null {
504
560
  if (!isRecord(value) || !isRecord(value.rect)) return null
505
561
  const { x, y, width, height } = value.rect
@@ -0,0 +1,165 @@
1
+ /**
2
+ * The runtime a video's frame injects in place of `frameRuntime`, before HyperFrames' own, which
3
+ * plays the video and answers the app's controls to it (`hf-parent`). It is served as this
4
+ * function's own source, `(${videoFrameRuntime})()`, so it names nothing outside itself: the
5
+ * protocol string repeats what `protocol.ts` declares, and a test holds the two together.
6
+ *
7
+ * A video's frame shares none of a page's: no kit, no theme, no links or embeds, as a video looks
8
+ * as it renders, in its own colors. This one only speaks the frame protocol's little a video needs:
9
+ *
10
+ * - It says the frame is ready, or that the video cannot start: HyperFrames' runtime did not load,
11
+ * or stopped at its startup. Waiting for a timeline either would never build helps no one.
12
+ * - It answers the app's requests: `theme` it takes and leaves the video as it is, `reload` loads
13
+ * the page again, `video.pick` finds the words under a point of the picture for the editor to
14
+ * type over, and any other it refuses.
15
+ * - On a phone, the reader's tap on play reaches the frame as the app's message, and WebKit lets
16
+ * only what that moment starts make a sound: the first play starts and stops every recording
17
+ * the page holds then, so that each may play later, when its scene comes, as HyperFrames' own
18
+ * player does.
19
+ */
20
+ export function videoFrameRuntime(): void {
21
+ const PROTOCOL = "sixb-frame/1"
22
+ const post = (message: Record<string, unknown>) =>
23
+ window.parent.postMessage({ protocol: PROTOCOL, ...message }, "*")
24
+
25
+ window.addEventListener("message", (event) => {
26
+ if (event.source !== window.parent) return
27
+ const data = event.data as Record<string, unknown> | null
28
+ if (!data || data.protocol !== PROTOCOL || typeof data.id !== "number") return
29
+ if (typeof data.method !== "string") return
30
+
31
+ switch (data.method) {
32
+ case "theme":
33
+ post({ id: data.id })
34
+ return
35
+ case "reload":
36
+ post({ id: data.id })
37
+ // After the answer is posted, so the app hears it before the page goes.
38
+ setTimeout(() => window.location.reload())
39
+ return
40
+ case "video.pick": {
41
+ const params = (data.params ?? {}) as Record<string, unknown>
42
+ post({ id: data.id })
43
+ post({
44
+ event: "video.picked",
45
+ params: { target: wordsAt(Number(params.x), Number(params.y)) },
46
+ })
47
+ return
48
+ }
49
+ default:
50
+ post({ id: data.id, error: `A video's frame does not answer '${data.method}'.` })
51
+ }
52
+ })
53
+
54
+ // The tags whose words the editor types over, when they hold words alone: as the editor reads
55
+ // a scene's file (`video/timeline.ts`).
56
+ const TEXT_TAGS = [
57
+ "h1",
58
+ "h2",
59
+ "h3",
60
+ "h4",
61
+ "h5",
62
+ "h6",
63
+ "p",
64
+ "span",
65
+ "div",
66
+ "li",
67
+ "strong",
68
+ "em",
69
+ "small",
70
+ "blockquote",
71
+ "figcaption",
72
+ "label",
73
+ "a",
74
+ "button",
75
+ ]
76
+
77
+ /** An element's words when it holds words alone, line breaks aside; null for any other. */
78
+ const wordsOf = (element: Element): string | null => {
79
+ if (!TEXT_TAGS.includes(element.tagName.toLowerCase())) return null
80
+ let words = ""
81
+ for (const node of Array.from(element.childNodes)) {
82
+ if (node.nodeType === 1) {
83
+ if (!["BR", "WBR"].includes((node as Element).tagName)) return null
84
+ words += " "
85
+ } else if (node.nodeType === 3) {
86
+ words += node.textContent ?? ""
87
+ }
88
+ }
89
+ const text = words.replace(/\s+/g, " ").trim()
90
+ return text === "" ? null : text
91
+ }
92
+
93
+ /** The words shown at a point of the picture, in fractions of it, with where they are. */
94
+ const wordsAt = (x: number, y: number) => {
95
+ if (!Number.isFinite(x) || !Number.isFinite(y)) return null
96
+ const width = window.innerWidth
97
+ const height = window.innerHeight
98
+ let element = document.elementFromPoint(x * width, y * height)
99
+ while (element && element !== document.body) {
100
+ const text = wordsOf(element)
101
+ const composition = element.closest("[data-composition-id]")
102
+ if (text !== null && composition) {
103
+ const tag = element.tagName.toLowerCase()
104
+ const same = Array.from(composition.querySelectorAll(tag)).filter(
105
+ (each) => each.closest("[data-composition-id]") === composition && wordsOf(each) === text
106
+ )
107
+ const box = element.getBoundingClientRect()
108
+ return {
109
+ scene: composition.getAttribute("data-composition-id"),
110
+ tag,
111
+ text,
112
+ occurrence: Math.max(0, same.indexOf(element)),
113
+ rect: {
114
+ x: box.left / width,
115
+ y: box.top / height,
116
+ width: box.width / width,
117
+ height: box.height / height,
118
+ },
119
+ }
120
+ }
121
+ element = element.parentElement
122
+ }
123
+ return null
124
+ }
125
+
126
+ // A phone's WebKit plays a recording with sound only once the reader's gesture started it: the
127
+ // app's first `play`, sent as they tap, carries that gesture here.
128
+ const touchWebKit =
129
+ /iP(hone|ad|od)/.test(navigator.userAgent) ||
130
+ (/Macintosh/.test(navigator.userAgent) && navigator.maxTouchPoints > 1)
131
+ if (touchWebKit) {
132
+ const prime = (event: MessageEvent) => {
133
+ const data = event.data as Record<string, unknown> | null
134
+ if (event.source !== window.parent || data?.source !== "hf-parent") return
135
+ if (data.type !== "control" || data.action !== "play") return
136
+
137
+ window.removeEventListener("message", prime, true)
138
+ for (const media of Array.from(document.querySelectorAll("video, audio"))) {
139
+ const recording = media as HTMLMediaElement
140
+ if (!recording.paused) continue
141
+ recording.play().catch(() => {})
142
+ recording.pause()
143
+ }
144
+ }
145
+ window.addEventListener("message", prime, true)
146
+ }
147
+
148
+ // HyperFrames' runtime runs in the page's head, after this one: once the page is parsed, it is
149
+ // there, or it never loaded. Its startup runs next, and an error it stops at is saved before it
150
+ // is thrown.
151
+ const ready = () => {
152
+ const player = window as Window & { __hyperframes?: unknown; __hfStartupError?: unknown }
153
+ if (!player.__hyperframes) {
154
+ post({ event: "failed", params: {} })
155
+ return
156
+ }
157
+ window.addEventListener("error", () => {
158
+ if (typeof player.__hfStartupError === "string") post({ event: "failed", params: {} })
159
+ })
160
+
161
+ post({ event: "ready", params: {} })
162
+ }
163
+ if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", ready)
164
+ else ready()
165
+ }
@@ -23,3 +23,16 @@ export function decodeHtmlEntities(value: string): string {
23
23
  : match
24
24
  })
25
25
  }
26
+
27
+ /**
28
+ * Where HTML shows or plays a file: each element and the attribute that names the file. A file of
29
+ * another artifact is an `artifact:` address in one of them, which a frame serves as its own.
30
+ */
31
+ export const HTML_FILE_ATTRIBUTES = [
32
+ { element: "img", attribute: "src" },
33
+ { element: "video", attribute: "src" },
34
+ { element: "video", attribute: "poster" },
35
+ { element: "audio", attribute: "src" },
36
+ { element: "source", attribute: "src" },
37
+ { element: "track", attribute: "src" },
38
+ ] as const
@@ -42,6 +42,7 @@ export {
42
42
  canvasShapeFontSize,
43
43
  SMALL_BOARD_PREVIEW_WIDTH,
44
44
  } from "./canvas-display"
45
+ export { placeVideoComment, type VideoCommentPlace, videoSceneAt } from "./comment-place"
45
46
  export { quoteArtifactComment } from "./comment-text"
46
47
  export { CsvParseError, type CsvTable, formatCsv, parseCsv } from "./csv"
47
48
  export {
@@ -75,6 +76,7 @@ export {
75
76
  type FrameRequest,
76
77
  type FrameResponse,
77
78
  type FrameStart,
79
+ type FrameVideoText,
78
80
  type FrameZoom,
79
81
  type FrameZoomStep,
80
82
  frameStartHash,
@@ -87,6 +89,8 @@ export {
87
89
  ARTIFACT_HOLDERS_LIMIT,
88
90
  ARTIFACT_LIMITS,
89
91
  ARTIFACT_STATE_LIMITS,
92
+ type ArtifactSizeLimits,
93
+ artifactSizeLimits,
90
94
  } from "./limits"
91
95
  export {
92
96
  type LiveSheetColumn,
@@ -108,6 +112,8 @@ export {
108
112
  type SheetOutline,
109
113
  type SheetSummary,
110
114
  type SlidesOutline,
115
+ type VideoOutline,
116
+ type VideoOutlineScene,
111
117
  } from "./outline"
112
118
  export type { DocumentPaper } from "./paper"
113
119
  export { DOCUMENT_PDF_WAIT_MS } from "./pdf-job"
@@ -133,6 +139,7 @@ export {
133
139
  parseArtifactTheme,
134
140
  } from "./theme"
135
141
  export { ARTIFACT_TONES, type ArtifactTone } from "./tones"
142
+ export { videoPosterMs } from "./video/project"
136
143
  export {
137
144
  type LiveSheetColumnSource,
138
145
  type LiveSheetSource,
@@ -1,5 +1,13 @@
1
1
  /** The kinds of artifact Sixb renders. An artifact's kind is fixed when it is created. */
2
- export const ARTIFACT_KINDS = ["document", "sheet", "slides", "page", "canvas", "file"] as const
2
+ export const ARTIFACT_KINDS = [
3
+ "document",
4
+ "sheet",
5
+ "slides",
6
+ "page",
7
+ "canvas",
8
+ "video",
9
+ "file",
10
+ ] as const
3
11
 
4
12
  export type ArtifactKind = (typeof ARTIFACT_KINDS)[number]
5
13
 
@@ -1,8 +1,31 @@
1
+ import { MAX_FILE_UPLOAD_BYTES } from "../blob-storage/constants"
2
+ import type { ArtifactKind } from "./kinds"
3
+
4
+ /** How many bytes one file, and all of a version's files together, may hold. */
5
+ export interface ArtifactSizeLimits {
6
+ readonly maxFileBytes: number
7
+ /** Every file the version lists, counted at full size, even one an earlier version holds. */
8
+ readonly maxVersionBytes: number
9
+ }
10
+
1
11
  /** What one version may hold. Publishing refuses a version over any of these. */
2
12
  export const ARTIFACT_LIMITS = {
3
13
  maxFiles: 500,
14
+ /** Any kind's sizes, unless `sizesByKind` gives its own: read them with `artifactSizeLimits`. */
4
15
  maxFileBytes: 25 * 1024 * 1024,
5
16
  maxVersionBytes: 250 * 1024 * 1024,
17
+ /**
18
+ * The kinds whose files may be larger. A file artifact's one file may be a long recording, as
19
+ * large as one upload may be: it is uploaded staged and served by range, never read whole.
20
+ */
21
+ sizesByKind: {
22
+ file: { maxFileBytes: MAX_FILE_UPLOAD_BYTES, maxVersionBytes: MAX_FILE_UPLOAD_BYTES },
23
+ /**
24
+ * A video's footage is as large as one upload, and its version holds every original it plays:
25
+ * an export downloads them all to its sandbox's disk, beside the frames it renders.
26
+ */
27
+ video: { maxFileBytes: MAX_FILE_UPLOAD_BYTES, maxVersionBytes: 8 * 1024 * 1024 * 1024 },
28
+ } satisfies Partial<Record<ArtifactKind, ArtifactSizeLimits>>,
6
29
  maxPathLength: 512,
7
30
  maxTitleLength: 200,
8
31
  /** A document's Markdown is parsed whole when it is published. */
@@ -37,6 +60,15 @@ export const ARTIFACT_LIMITS = {
37
60
  maxCanvasLabelLength: 120,
38
61
  /** A board's HTML is parsed whole when it is published, as a page's is. */
39
62
  maxBoardBytes: 2 * 1024 * 1024,
63
+ /** A video's scenes, and how long it plays, in all. */
64
+ maxVideoScenes: 200,
65
+ maxVideoSeconds: 600,
66
+ /** A video frame's width or height, in pixels: 4K. */
67
+ maxVideoSize: 3840,
68
+ /** The video and sound files a video plays, each probed and proxied once it is published. */
69
+ maxVideoMediaFiles: 50,
70
+ /** A video's `index.html` and each scene's HTML are parsed whole when it is published. */
71
+ maxSceneBytes: 1024 * 1024,
40
72
  /** `artifact:` addresses one version may use. */
41
73
  maxReferences: 200,
42
74
  /** `queries/<name>.json` files, each run for every reader who opens the version. */
@@ -46,6 +78,17 @@ export const ARTIFACT_LIMITS = {
46
78
  maxQueryRows: 10_000,
47
79
  } as const
48
80
 
81
+ /** What one file, and one version, of an artifact of `kind` may hold. */
82
+ export function artifactSizeLimits(kind: ArtifactKind): ArtifactSizeLimits {
83
+ const sizes: Partial<Record<ArtifactKind, ArtifactSizeLimits>> = ARTIFACT_LIMITS.sizesByKind
84
+ return (
85
+ sizes[kind] ?? {
86
+ maxFileBytes: ARTIFACT_LIMITS.maxFileBytes,
87
+ maxVersionBytes: ARTIFACT_LIMITS.maxVersionBytes,
88
+ }
89
+ )
90
+ }
91
+
49
92
  /**
50
93
  * What a page may keep for each reader with `sixb.state`, across its versions: values are JSON,
51
94
  * counted by their UTF-8 bytes as written.
@@ -2,6 +2,7 @@ import * as Y from "yjs"
2
2
  import type { FileRef } from "../../blob-storage/types"
3
3
  import { CANVAS_FILE, type CanvasItem, formatCanvas, parseCanvas } from "../canvas"
4
4
  import type { ArtifactKind } from "../kinds"
5
+ import { VIDEO_ENTRY, videoFilesPlayed } from "../video/composition"
5
6
  import {
6
7
  blocksFromY,
7
8
  blocksToMarkdown,
@@ -38,7 +39,9 @@ import {
38
39
  // Markdown document holds `document.md` as the blocks its editor edits, a `Y.XmlFragment`
39
40
  // (`./blocks`), so typing in one paragraph and moving another merge as block edits do. A designed
40
41
  // document holds `document.html` as a page, its body's blocks a `Y.XmlFragment` too (`./page`),
41
- // unless its source is not one an editor can hold whole: then it is text.
42
+ // unless its source is not one an editor can hold whole: then it is text. A video holds none: its
43
+ // `index.html` and scenes are texts, which its editor changes attribute by attribute
44
+ // (`../video/edit.ts`), and its recordings are references.
42
45
 
43
46
  /** One file of an artifact as the live layer reads it: its text, or its stored bytes. */
44
47
  export type LiveFile = { readonly text: string } | { readonly file: FileRef }
@@ -296,12 +299,33 @@ export function mergeIntoDocument(
296
299
  files.set(path, entryOf(kind, path, file))
297
300
  }
298
301
 
299
- for (const path of base.keys()) {
300
- if (!next.has(path)) files.delete(path)
302
+ // A video's recording goes only once nothing plays it: `next` may stop playing one that
303
+ // someone else's edit, merged above, has just started playing.
304
+ const gone = [...base.keys()].filter((path) => !next.has(path))
305
+ const recording = (path: string) => kind === "video" && "file" in (base.get(path) ?? {})
306
+ for (const path of gone) {
307
+ if (!recording(path)) files.delete(path)
308
+ }
309
+
310
+ const played = kind === "video" ? videoRecordingsPlayed(files) : new Set<string>()
311
+ for (const path of gone) {
312
+ if (recording(path) && !played.has(path)) files.delete(path)
301
313
  }
302
314
  }, origin)
303
315
  }
304
316
 
317
+ /** The files a video's HTML, as the document holds it now, plays. */
318
+ function videoRecordingsPlayed(files: Y.Map<unknown>): ReadonlySet<string> {
319
+ const index = textOf(files.get(VIDEO_ENTRY))
320
+ if (index === undefined) return new Set()
321
+
322
+ return videoFilesPlayed(
323
+ index,
324
+ (path) => textOf(files.get(path)),
325
+ (path) => files.has(path)
326
+ )
327
+ }
328
+
305
329
  /**
306
330
  * Holds as a page a designed document's `document.html` that a document kept as text, from before
307
331
  * documents held pages, once it reads as one. Made as `clientID`, named by what the document is
@@ -1,9 +1,65 @@
1
1
  /**
2
2
  * An artifact edited live, as a viewer holds it: its open version as a Yjs document that everyone
3
- * editing it changes at once, read as files or, for a canvas, as its items; and the messages of
4
- * the `/ws/artifacts` socket that keeps it in step. Browser-safe.
3
+ * editing it changes at once, read as files or, for a canvas, as its items, and a video's edits
4
+ * as changes to its files' text; and the messages of the `/ws/artifacts` socket that keeps it in
5
+ * step. Browser-safe.
5
6
  */
6
7
 
8
+ export {
9
+ readVideoComposition,
10
+ VIDEO_ENTRY,
11
+ type VideoComposition,
12
+ type VideoScene,
13
+ } from "../video/composition"
14
+ export {
15
+ cutRange,
16
+ duplicateScene,
17
+ findVideoTarget,
18
+ insertClip,
19
+ MAX_VOLUME,
20
+ moveClip,
21
+ moveClips,
22
+ moveScene,
23
+ readVideoFileTimeline,
24
+ removeClip,
25
+ removeClips,
26
+ removeMediaRanges,
27
+ removeScene,
28
+ replaceClipMedia,
29
+ setClipSound,
30
+ setClipTiming,
31
+ setSceneLabel,
32
+ setSceneLength,
33
+ setVideoText,
34
+ splitClip,
35
+ splitClips,
36
+ trimClip,
37
+ type VideoAnimationJoined,
38
+ type VideoAnimationLeft,
39
+ type VideoClipTarget,
40
+ type VideoCut,
41
+ type VideoEdit,
42
+ type VideoEditResult,
43
+ type VideoImportKind,
44
+ type VideoPlaceResult,
45
+ type VideoRange,
46
+ type VideoSources,
47
+ type VideoTarget,
48
+ videoSceneLength,
49
+ videoTarget,
50
+ } from "../video/edit"
51
+ export {
52
+ type VideoChain,
53
+ type VideoChainPart,
54
+ type VideoClip,
55
+ type VideoClipKind,
56
+ type VideoFileTimeline,
57
+ type VideoSceneSpan,
58
+ type VideoText,
59
+ type VideoTrack,
60
+ videoChains,
61
+ videoChapters,
62
+ } from "../video/timeline"
7
63
  export {
8
64
  type BlockMark,
9
65
  type BlockNode,
@@ -42,7 +42,7 @@ export type ArtifactLiveRecord =
42
42
  readonly name: "awareness"
43
43
  readonly payload: { readonly instance: string; readonly update: string }
44
44
  }
45
- /** An Agent turn wrote these boards, and is still at work. */
45
+ /** An Agent turn wrote these boards, or these scenes of a video, and is still at work. */
46
46
  | {
47
47
  readonly name: "agent"
48
48
  readonly payload: {
@@ -105,15 +105,27 @@ export async function appendArtifactLive(
105
105
  }
106
106
 
107
107
  /**
108
- * The boards of a canvas a write changed: added, or showing something else, as their render keys
109
- * say. A board only moved shows what it showed. Both versions are keyed as the write's author's:
110
- * a render key names its author too, and a board left as it was is no news because someone else
111
- * wrote the version before.
108
+ * The boards of a canvas, or the scenes of a video, a write changed: added, or showing something
109
+ * else, as their render keys say. A board only moved shows what it showed. Both versions of a
110
+ * canvas are keyed as the write's author's: a board's render key names its author too, and a
111
+ * board left as it was is no news because someone else wrote the version before. A scene's key
112
+ * names no one, and covers the scenes on screen with it, so a crossfade's two scenes change
113
+ * together.
112
114
  */
113
115
  export function changedBoards(
114
116
  before: Pick<ArtifactVersionRecord, "outline" | "files"> | null,
115
117
  after: Pick<ArtifactVersionRecord, "artifactId" | "outline" | "files" | "author">
116
118
  ): string[] {
119
+ if (after.outline.kind === "video") {
120
+ const kept = new Map(
121
+ before?.outline.kind === "video"
122
+ ? before.outline.scenes.map((scene) => [scene.id, scene.renderKey])
123
+ : []
124
+ )
125
+ return after.outline.scenes.flatMap((scene) =>
126
+ kept.get(scene.id) === scene.renderKey ? [] : [scene.id]
127
+ )
128
+ }
117
129
  if (after.outline.kind !== "canvas") return []
118
130
 
119
131
  const kept = boardKeys(before, after)
@@ -89,13 +89,15 @@ export interface ArtifactLiveUser {
89
89
  export const USER_AWARENESS_FIELD = "user"
90
90
 
91
91
  /**
92
- * The awareness field the server sets for the Agent while a turn changes boards of the canvas:
93
- * each turn at work, with the boards it changed. A client's own state never holds it.
92
+ * The awareness field the server sets for the Agent while a turn changes boards of a canvas, or
93
+ * scenes of a video: each turn at work, with the boards or scenes it changed. A client's own state
94
+ * never holds it.
94
95
  */
95
96
  export const AGENT_AWARENESS_FIELD = "sixbAgent"
96
97
 
97
98
  export interface ArtifactAgentPresence {
98
99
  readonly runId: string
100
+ /** The boards it changed, by id; for a video, its scenes. */
99
101
  readonly boards: readonly string[]
100
102
  }
101
103
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  export { type LiveArtifactWrite, writeLiveArtifact } from "../execution"
7
- export { mergeIntoDocument, readChange } from "./document"
7
+ export { isLiveTextPath, mergeIntoDocument, readChange } from "./document"
8
8
  export { readLiveFiles, sameArtifactFiles, storeLiveFiles } from "./files"
9
9
  export {
10
10
  AGENT_PRESENCE_MS,