@sixb/core 0.2.6 → 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.
- package/dist/actions/index.js +53 -50
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run/context.d.ts.map +1 -1
- package/dist/actions/run/execute.d.ts +3 -0
- package/dist/actions/run/execute.d.ts.map +1 -1
- package/dist/actions/run/executor.d.ts +3 -0
- package/dist/actions/run/executor.d.ts.map +1 -1
- package/dist/actions/run/normalize.d.ts.map +1 -1
- package/dist/actions/run/types.d.ts +6 -0
- package/dist/actions/run/types.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +7 -0
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/agents/context/entries.d.ts +17 -0
- package/dist/agents/context/entries.d.ts.map +1 -1
- package/dist/agents/context/index.js +3 -2
- package/dist/agents/context/index.js.map +1 -1
- package/dist/agents/context-model.d.ts.map +1 -1
- package/dist/agents/context-resolution.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +7 -0
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/index.d.ts +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +62 -57
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/model-call-retry.d.ts +28 -0
- package/dist/agents/model-call-retry.d.ts.map +1 -0
- package/dist/agents/model-loop.d.ts +4 -2
- package/dist/agents/model-loop.d.ts.map +1 -1
- package/dist/agents/model-routing.d.ts +15 -4
- package/dist/agents/model-routing.d.ts.map +1 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/run-artifacts.d.ts +2 -0
- package/dist/agents/run-artifacts.d.ts.map +1 -1
- package/dist/agents/run-plan.d.ts +1 -1
- package/dist/agents/run-plan.d.ts.map +1 -1
- package/dist/agents/run-session-http.d.ts.map +1 -1
- package/dist/agents/run-session-serve.d.ts.map +1 -1
- package/dist/agents/run-session-wire.d.ts +6 -0
- package/dist/agents/run-session-wire.d.ts.map +1 -1
- package/dist/agents/run-token.d.ts +6 -0
- package/dist/agents/run-token.d.ts.map +1 -1
- package/dist/agents/streams/index.js +1 -1
- package/dist/agents/streams/internal.js +2 -2
- package/dist/agents/thread-access.d.ts +13 -0
- package/dist/agents/thread-access.d.ts.map +1 -1
- package/dist/agents/tool-files.d.ts.map +1 -1
- package/dist/artifacts/caller.d.ts +10 -0
- package/dist/artifacts/caller.d.ts.map +1 -0
- package/dist/artifacts/comment-place.d.ts +26 -0
- package/dist/artifacts/comment-place.d.ts.map +1 -0
- package/dist/artifacts/comment-text.d.ts +12 -4
- package/dist/artifacts/comment-text.d.ts.map +1 -1
- package/dist/artifacts/comments.d.ts +8 -2
- package/dist/artifacts/comments.d.ts.map +1 -1
- package/dist/artifacts/errors.d.ts +1 -1
- package/dist/artifacts/errors.d.ts.map +1 -1
- package/dist/artifacts/execution.d.ts +73 -5
- package/dist/artifacts/execution.d.ts.map +1 -1
- package/dist/artifacts/frames/assets.d.ts +27 -7
- package/dist/artifacts/frames/assets.d.ts.map +1 -1
- package/dist/artifacts/frames/entries.d.ts +5 -4
- package/dist/artifacts/frames/entries.d.ts.map +1 -1
- package/dist/artifacts/frames/hyperframes.d.ts +12 -0
- package/dist/artifacts/frames/hyperframes.d.ts.map +1 -0
- package/dist/artifacts/frames/index.d.ts +3 -1
- package/dist/artifacts/frames/index.d.ts.map +1 -1
- package/dist/artifacts/frames/index.js +20 -6
- package/dist/artifacts/frames/index.js.map +3 -3
- package/dist/artifacts/frames/kit.d.ts.map +1 -1
- package/dist/artifacts/frames/protocol.d.ts +33 -0
- package/dist/artifacts/frames/protocol.d.ts.map +1 -1
- package/dist/artifacts/frames/video-runtime.d.ts +21 -0
- package/dist/artifacts/frames/video-runtime.d.ts.map +1 -0
- package/dist/artifacts/html.d.ts +23 -0
- package/dist/artifacts/html.d.ts.map +1 -1
- package/dist/artifacts/index.d.ts +5 -3
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +71 -10
- package/dist/artifacts/index.js.map +4 -4
- package/dist/artifacts/kinds.d.ts +1 -1
- package/dist/artifacts/kinds.d.ts.map +1 -1
- package/dist/artifacts/limits.d.ts +37 -0
- package/dist/artifacts/limits.d.ts.map +1 -1
- package/dist/artifacts/live/document.d.ts.map +1 -1
- package/dist/artifacts/live/index.d.ts +6 -2
- package/dist/artifacts/live/index.d.ts.map +1 -1
- package/dist/artifacts/live/index.js +3432 -13
- package/dist/artifacts/live/index.js.map +6 -3
- package/dist/artifacts/live/presence.d.ts +7 -5
- package/dist/artifacts/live/presence.d.ts.map +1 -1
- package/dist/artifacts/live/protocol.d.ts +4 -2
- package/dist/artifacts/live/protocol.d.ts.map +1 -1
- package/dist/artifacts/live/server.d.ts +1 -1
- package/dist/artifacts/live/server.d.ts.map +1 -1
- package/dist/artifacts/live/server.js +36 -31
- package/dist/artifacts/live/server.js.map +1 -1
- package/dist/artifacts/live/state.d.ts +2 -2
- package/dist/artifacts/media/media.d.ts +96 -0
- package/dist/artifacts/media/media.d.ts.map +1 -0
- package/dist/artifacts/media/transcriber.d.ts +29 -0
- package/dist/artifacts/media/transcriber.d.ts.map +1 -0
- package/dist/artifacts/outline.d.ts +26 -1
- package/dist/artifacts/outline.d.ts.map +1 -1
- package/dist/artifacts/publish/files.d.ts +5 -2
- package/dist/artifacts/publish/files.d.ts.map +1 -1
- package/dist/artifacts/publish/index.d.ts +11 -2
- package/dist/artifacts/publish/index.d.ts.map +1 -1
- package/dist/artifacts/publish/index.js +110 -33
- package/dist/artifacts/publish/index.js.map +1 -1
- package/dist/artifacts/publish/pdf.d.ts.map +1 -1
- package/dist/artifacts/publish/previews.d.ts +7 -2
- package/dist/artifacts/publish/previews.d.ts.map +1 -1
- package/dist/artifacts/publish/publish.d.ts.map +1 -1
- package/dist/artifacts/publish/validate/html.d.ts +5 -4
- package/dist/artifacts/publish/validate/html.d.ts.map +1 -1
- package/dist/artifacts/publish/validate/video.d.ts +36 -0
- package/dist/artifacts/publish/validate/video.d.ts.map +1 -0
- package/dist/artifacts/publish/video.d.ts +79 -0
- package/dist/artifacts/publish/video.d.ts.map +1 -0
- package/dist/artifacts/resolve.d.ts +9 -0
- package/dist/artifacts/resolve.d.ts.map +1 -1
- package/dist/artifacts/video/composition.d.ts +183 -0
- package/dist/artifacts/video/composition.d.ts.map +1 -0
- package/dist/artifacts/video/edit.d.ts +298 -0
- package/dist/artifacts/video/edit.d.ts.map +1 -0
- package/dist/artifacts/video/export.d.ts +142 -0
- package/dist/artifacts/video/export.d.ts.map +1 -0
- package/dist/artifacts/video/looks.d.ts +133 -0
- package/dist/artifacts/video/looks.d.ts.map +1 -0
- package/dist/artifacts/video/project.d.ts +74 -0
- package/dist/artifacts/video/project.d.ts.map +1 -0
- package/dist/artifacts/video/stills.d.ts +65 -0
- package/dist/artifacts/video/stills.d.ts.map +1 -0
- package/dist/artifacts/video/timeline.d.ts +153 -0
- package/dist/artifacts/video/timeline.d.ts.map +1 -0
- package/dist/auth/index.js +9 -8
- package/dist/auth/index.js.map +1 -1
- package/dist/authorization/index.js +5 -4
- package/dist/authorization/index.js.map +1 -1
- package/dist/blob-storage/browser.d.ts +1 -1
- package/dist/blob-storage/browser.d.ts.map +1 -1
- package/dist/blob-storage/browser.js +8 -4
- package/dist/blob-storage/browser.js.map +1 -1
- package/dist/blob-storage/constants.d.ts +8 -3
- package/dist/blob-storage/constants.d.ts.map +1 -1
- package/dist/blob-storage/download-urls.d.ts +2 -2
- package/dist/blob-storage/download-urls.d.ts.map +1 -1
- package/dist/blob-storage/index.d.ts +1 -1
- package/dist/blob-storage/index.d.ts.map +1 -1
- package/dist/blob-storage/index.js +9 -5
- package/dist/blob-storage/index.js.map +1 -1
- package/dist/blob-storage/internal.d.ts +2 -2
- package/dist/blob-storage/internal.d.ts.map +1 -1
- package/dist/blob-storage/internal.js +10 -4
- package/dist/blob-storage/internal.js.map +1 -1
- package/dist/blob-storage/media-type.d.ts +12 -3
- package/dist/blob-storage/media-type.d.ts.map +1 -1
- package/dist/bootstrap/discovery.d.ts +6 -0
- package/dist/bootstrap/discovery.d.ts.map +1 -1
- package/dist/bootstrap/index.js +63 -60
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/{chunk-az95tsh3.js → chunk-0fjryajn.js} +3 -2
- package/dist/chunk-0fjryajn.js.map +11 -0
- package/dist/{chunk-9tpmfh3n.js → chunk-0mk8qqp9.js} +3 -3
- package/dist/{chunk-9tpmfh3n.js.map → chunk-0mk8qqp9.js.map} +3 -3
- package/dist/{chunk-88xeh6zx.js → chunk-1g4me5f2.js} +182 -7
- package/dist/{chunk-88xeh6zx.js.map → chunk-1g4me5f2.js.map} +3 -3
- package/dist/{chunk-7mhbs9yy.js → chunk-1z8ccj53.js} +1 -1
- package/dist/{chunk-wkv3h3q7.js → chunk-2138b0ng.js} +115 -8
- package/dist/chunk-2138b0ng.js.map +12 -0
- package/dist/chunk-23eaayw4.js +3757 -0
- package/dist/chunk-23eaayw4.js.map +22 -0
- package/dist/{chunk-s8xxef60.js → chunk-2mxq1yd9.js} +48 -41
- package/dist/{chunk-s8xxef60.js.map → chunk-2mxq1yd9.js.map} +6 -6
- package/dist/{chunk-dmnd9ea6.js → chunk-30a0ftnm.js} +2 -2
- package/dist/{chunk-nxysqbt0.js → chunk-389ybvw9.js} +6 -2
- package/dist/chunk-389ybvw9.js.map +10 -0
- package/dist/{chunk-qbd282aa.js → chunk-39q9ybav.js} +2 -2
- package/dist/{chunk-9c9yknwt.js → chunk-3d9w8t4n.js} +111 -23
- package/dist/{chunk-9c9yknwt.js.map → chunk-3d9w8t4n.js.map} +5 -5
- package/dist/chunk-3dvcdn9w.js +8 -0
- package/dist/chunk-3dvcdn9w.js.map +10 -0
- package/dist/{chunk-bcz9dxtf.js → chunk-3x902cja.js} +3 -3
- package/dist/{chunk-c4nrycdy.js → chunk-4q4a5a96.js} +1 -1
- package/dist/{chunk-7r9mqpva.js → chunk-4tdm3fsj.js} +100 -36
- package/dist/{chunk-7r9mqpva.js.map → chunk-4tdm3fsj.js.map} +10 -10
- package/dist/{chunk-ykchk644.js → chunk-4w8qzy9w.js} +6 -6
- package/dist/{chunk-c29729me.js → chunk-4z9xtxke.js} +8 -7
- package/dist/chunk-4z9xtxke.js.map +12 -0
- package/dist/chunk-5278qwax.js +270 -0
- package/dist/chunk-5278qwax.js.map +11 -0
- package/dist/{chunk-kft7mp7z.js → chunk-5xkqasvn.js} +1 -1
- package/dist/{chunk-k1g14kk3.js → chunk-6a4hp405.js} +4 -5
- package/dist/{chunk-k1g14kk3.js.map → chunk-6a4hp405.js.map} +3 -3
- package/dist/{chunk-xavet0qs.js → chunk-6whr25gw.js} +2 -2
- package/dist/{chunk-mbwsgjn7.js → chunk-7zygtcqq.js} +14 -2
- package/dist/chunk-7zygtcqq.js.map +11 -0
- package/dist/chunk-88s9z5pf.js +3 -0
- package/dist/{chunk-de5sfbc3.js.map → chunk-88s9z5pf.js.map} +1 -1
- package/dist/{chunk-ygvay56w.js → chunk-896te58g.js} +2 -2
- package/dist/{chunk-pqj8vff9.js → chunk-8eqqqc1h.js} +3 -3
- package/dist/{chunk-425ydk65.js → chunk-8tefbhdx.js} +14 -14
- package/dist/{chunk-425ydk65.js.map → chunk-8tefbhdx.js.map} +1 -1
- package/dist/{chunk-jka26v8c.js → chunk-8x1bsp68.js} +1 -1
- package/dist/{chunk-wzcjhv54.js → chunk-93e4w7te.js} +113 -1
- package/dist/chunk-93e4w7te.js.map +11 -0
- package/dist/{chunk-ym1bqd98.js → chunk-990a5bkc.js} +424 -76
- package/dist/chunk-990a5bkc.js.map +21 -0
- package/dist/{chunk-fmgf9h5e.js → chunk-9az7kjv4.js} +6 -6
- package/dist/{chunk-eg6xqef7.js → chunk-9e5t53z0.js} +3 -3
- package/dist/{chunk-eg6xqef7.js.map → chunk-9e5t53z0.js.map} +3 -3
- package/dist/{chunk-bs1sd0e0.js → chunk-9p7kyeqz.js} +4 -4
- package/dist/chunk-a68zz4r0.js +537 -0
- package/dist/chunk-a68zz4r0.js.map +11 -0
- package/dist/{chunk-d7vyc7k6.js → chunk-a700gjc8.js} +10 -2
- package/dist/chunk-a700gjc8.js.map +10 -0
- package/dist/{chunk-gfdh9kqa.js → chunk-a9qzjaz2.js} +2 -5
- package/dist/chunk-a9qzjaz2.js.map +10 -0
- package/dist/{chunk-ats8y3d9.js → chunk-as94vcty.js} +688 -504
- package/dist/{chunk-ats8y3d9.js.map → chunk-as94vcty.js.map} +21 -21
- package/dist/{chunk-brybqw5k.js → chunk-bkxm2dzx.js} +1 -1
- package/dist/{chunk-ppxf7gw2.js → chunk-d7t9jnym.js} +3 -3
- package/dist/{chunk-tapdssb5.js → chunk-e3b1r4d2.js} +8 -7
- package/dist/{chunk-tapdssb5.js.map → chunk-e3b1r4d2.js.map} +4 -4
- package/dist/{chunk-cg7cygfj.js → chunk-fdmvaz7x.js} +1 -1
- package/dist/{chunk-191jz8a6.js → chunk-ff0qdk7z.js} +1 -1
- package/dist/{chunk-9vsc919v.js → chunk-fgxvrxx4.js} +22 -2
- package/dist/chunk-fgxvrxx4.js.map +10 -0
- package/dist/{chunk-wx7smkn2.js → chunk-fq8drkp0.js} +1 -1
- package/dist/{chunk-60662fyv.js → chunk-fqms1a8c.js} +132 -4
- package/dist/{chunk-60662fyv.js.map → chunk-fqms1a8c.js.map} +8 -6
- package/dist/{chunk-v8a1qjzp.js → chunk-hpswfrjj.js} +1 -1
- package/dist/{chunk-qttqe1ah.js → chunk-jbg905hn.js} +80 -13
- package/dist/chunk-jbg905hn.js.map +25 -0
- package/dist/{chunk-bz5bnjjt.js → chunk-jjte0h4p.js} +1 -1
- package/dist/{chunk-jt012fxq.js → chunk-jwjwvzj1.js} +797 -51
- package/dist/chunk-jwjwvzj1.js.map +38 -0
- package/dist/{chunk-f05994as.js → chunk-k3vd2vyz.js} +6 -2
- package/dist/chunk-k3vd2vyz.js.map +10 -0
- package/dist/chunk-kcqpk9w1.js.map +2 -2
- package/dist/chunk-mvz89age.js.map +2 -2
- package/dist/{chunk-xrmbhap8.js → chunk-mwg0nwkb.js} +1 -1
- package/dist/{chunk-a3faa34j.js → chunk-nfjt8k8j.js} +1 -1
- package/dist/{chunk-394zjzjs.js → chunk-nhgqz3g3.js} +3 -3
- package/dist/{chunk-bqr703h4.js → chunk-p0c5kkhn.js} +23 -6
- package/dist/{chunk-bqr703h4.js.map → chunk-p0c5kkhn.js.map} +3 -3
- package/dist/{chunk-92wrka15.js → chunk-q150fnj9.js} +1 -1
- package/dist/{chunk-w3t94hm6.js → chunk-qk3zq25v.js} +1 -1
- package/dist/{chunk-6hfbz4d0.js → chunk-r588h4ev.js} +1 -1
- package/dist/chunk-rtkqczbr.js.map +2 -2
- package/dist/{chunk-3qtk0070.js → chunk-ssqbrts1.js} +86 -9
- package/dist/chunk-ssqbrts1.js.map +14 -0
- package/dist/{chunk-5qqmndhm.js → chunk-szzhrn3e.js} +1 -1
- package/dist/{chunk-n1hbwc6y.js → chunk-t6pfch4e.js} +1 -1
- package/dist/{chunk-xtztwpkh.js → chunk-v6h4tc2v.js} +86 -5
- package/dist/chunk-v6h4tc2v.js.map +12 -0
- package/dist/{chunk-brhp9d97.js → chunk-vmqjndb3.js} +2 -2
- package/dist/chunk-vtjzwymr.js.map +2 -2
- package/dist/{chunk-t19wjmnc.js → chunk-wpba6hhd.js} +54 -20
- package/dist/{chunk-t19wjmnc.js.map → chunk-wpba6hhd.js.map} +3 -3
- package/dist/{chunk-htdzx40w.js → chunk-wrb1x1ss.js} +12 -4
- package/dist/{chunk-htdzx40w.js.map → chunk-wrb1x1ss.js.map} +3 -3
- package/dist/{chunk-5sswe5ej.js → chunk-wsv23wvr.js} +2 -2
- package/dist/{chunk-90nqenq8.js → chunk-x0hqc54n.js} +4 -4
- package/dist/{chunk-sgx82nnt.js → chunk-xg31er4p.js} +43 -4
- package/dist/chunk-xg31er4p.js.map +10 -0
- package/dist/{chunk-3neam1y5.js → chunk-y3qb965a.js} +2 -2
- package/dist/{chunk-gaj8djsw.js → chunk-y57eawng.js} +10 -5
- package/dist/{chunk-gaj8djsw.js.map → chunk-y57eawng.js.map} +3 -3
- package/dist/{chunk-8ncg20rd.js → chunk-yah25st6.js} +5 -5
- package/dist/chunk-yah25st6.js.map +10 -0
- package/dist/{chunk-grt2j5vp.js → chunk-ywvxcmqj.js} +106 -13
- package/dist/{chunk-grt2j5vp.js.map → chunk-ywvxcmqj.js.map} +8 -7
- package/dist/{chunk-xf76csps.js → chunk-zmq9xc9s.js} +70 -31
- package/dist/{chunk-xf76csps.js.map → chunk-zmq9xc9s.js.map} +4 -3
- package/dist/datasets/write.js +8 -7
- package/dist/datasets/write.js.map +1 -1
- package/dist/deploy/index.d.ts +1 -1
- package/dist/deploy/index.d.ts.map +1 -1
- package/dist/deploy/internal.js +2 -2
- package/dist/deploy/internal.js.map +2 -2
- package/dist/deploy/types.d.ts +8 -58
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/env/index.d.ts +10 -3
- package/dist/env/index.d.ts.map +1 -1
- package/dist/env/index.js.map +2 -2
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/execution/agent.js +53 -50
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/kernel-operation.d.ts +1 -0
- package/dist/execution/kernel-operation.d.ts.map +1 -1
- package/dist/execution/primitive.js +53 -50
- package/dist/execution/primitive.js.map +1 -1
- package/dist/execution/request.js +54 -51
- package/dist/execution/request.js.map +2 -2
- package/dist/execution/types.d.ts +5 -0
- package/dist/execution/types.d.ts.map +1 -1
- package/dist/http/api-routes.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -67
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/index.js +9 -8
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/maintenance/index.js +9 -8
- package/dist/maintenance/index.js.map +2 -2
- package/dist/materializer/index.js +26 -24
- package/dist/materializer/index.js.map +1 -1
- package/dist/models/audio/runtime.d.ts +3 -1
- package/dist/models/audio/runtime.d.ts.map +1 -1
- package/dist/models/audio/speech.d.ts +2 -2
- package/dist/models/audio/speech.d.ts.map +1 -1
- package/dist/models/audio/types.d.ts +23 -3
- package/dist/models/audio/types.d.ts.map +1 -1
- package/dist/models/calls.d.ts +7 -0
- package/dist/models/calls.d.ts.map +1 -1
- package/dist/models/catalog.d.ts +5 -0
- package/dist/models/catalog.d.ts.map +1 -1
- package/dist/models/definitions.d.ts +3 -2
- package/dist/models/definitions.d.ts.map +1 -1
- package/dist/models/errors.d.ts +5 -3
- package/dist/models/errors.d.ts.map +1 -1
- package/dist/models/events.d.ts +2 -0
- package/dist/models/events.d.ts.map +1 -1
- package/dist/models/execution/index.d.ts +1 -0
- package/dist/models/execution/index.d.ts.map +1 -1
- package/dist/models/execution/index.js +33 -28
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/execution/model-call-limits.d.ts.map +1 -1
- package/dist/models/execution/model-call-recorder.d.ts +8 -0
- package/dist/models/execution/model-call-recorder.d.ts.map +1 -1
- package/dist/models/execution/session.d.ts +12 -0
- package/dist/models/execution/session.d.ts.map +1 -1
- package/dist/models/execution/usage.d.ts.map +1 -1
- package/dist/models/execution.d.ts +1 -1
- package/dist/models/execution.d.ts.map +1 -1
- package/dist/models/generation-types.d.ts +2 -0
- package/dist/models/generation-types.d.ts.map +1 -1
- package/dist/models/index.d.ts +4 -2
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +2 -2
- package/dist/models/input-file.d.ts.map +1 -1
- package/dist/models/pricing.d.ts +2 -1
- package/dist/models/pricing.d.ts.map +1 -1
- package/dist/models/rate-card.d.ts +6 -0
- package/dist/models/rate-card.d.ts.map +1 -1
- package/dist/models/tools.d.ts +5 -0
- package/dist/models/tools.d.ts.map +1 -1
- package/dist/models/video/catalog.d.ts +13 -0
- package/dist/models/video/catalog.d.ts.map +1 -0
- package/dist/models/video/check.d.ts +76 -0
- package/dist/models/video/check.d.ts.map +1 -0
- package/dist/models/video/runtime.d.ts +21 -0
- package/dist/models/video/runtime.d.ts.map +1 -0
- package/dist/models/video/types.d.ts +188 -0
- package/dist/models/video/types.d.ts.map +1 -0
- package/dist/objects/execution.d.ts.map +1 -1
- package/dist/objects/index.js +53 -50
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/query/index.js +25 -23
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/sdk/object-set.d.ts.map +1 -1
- package/dist/ontology/index.js +4 -4
- package/dist/ontology/internal.js +4 -4
- package/dist/pipelines/index.js +28 -26
- package/dist/pipelines/index.js.map +1 -1
- package/dist/projections/internal.js +26 -24
- package/dist/projections/internal.js.map +1 -1
- package/dist/queues/index.d.ts +1 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/types.d.ts +103 -6
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/definitions.d.ts +14 -0
- package/dist/runtime/definitions.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +3 -1
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +3 -1
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +49 -43
- package/dist/runtime/internal.js.map +2 -2
- package/dist/runtime/resolve-definitions.d.ts +2 -1
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/sandboxes/errors.d.ts +19 -0
- package/dist/sandboxes/errors.d.ts.map +1 -1
- package/dist/sandboxes/exec.d.ts +2 -0
- package/dist/sandboxes/exec.d.ts.map +1 -1
- package/dist/sandboxes/index.d.ts +1 -1
- package/dist/sandboxes/index.d.ts.map +1 -1
- package/dist/sandboxes/index.js +14 -8
- package/dist/sandboxes/index.js.map +1 -1
- package/dist/sandboxes/sandbox.d.ts +15 -1
- package/dist/sandboxes/sandbox.d.ts.map +1 -1
- package/dist/security/public.d.ts +6 -4
- package/dist/security/public.d.ts.map +1 -1
- package/dist/security/public.js +5 -3
- package/dist/security/public.js.map +1 -1
- package/dist/shares/internal.js +25 -23
- package/dist/shares/internal.js.map +2 -2
- package/dist/storage/agents/in-memory.d.ts +2 -1
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/index.d.ts +1 -1
- package/dist/storage/agents/index.d.ts.map +1 -1
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +5 -5
- package/dist/storage/agents/types.d.ts +27 -1
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/analytics.d.ts +1 -0
- package/dist/storage/ai-cost/analytics.d.ts.map +1 -1
- package/dist/storage/ai-cost/groups.d.ts +2 -0
- package/dist/storage/ai-cost/groups.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +5 -5
- package/dist/storage/ai-cost/types.d.ts +2 -1
- package/dist/storage/ai-cost/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/validation.d.ts.map +1 -1
- package/dist/storage/ai-limits/enforcement.js +3 -3
- package/dist/storage/ai-limits/provider.js +2 -2
- package/dist/storage/ai-usage/in-memory.d.ts +8 -1
- package/dist/storage/ai-usage/in-memory.d.ts.map +1 -1
- package/dist/storage/ai-usage/index.d.ts +2 -2
- package/dist/storage/ai-usage/index.d.ts.map +1 -1
- package/dist/storage/ai-usage/record.d.ts +11 -1
- package/dist/storage/ai-usage/record.d.ts.map +1 -1
- package/dist/storage/ai-usage/types.d.ts +80 -1
- package/dist/storage/ai-usage/types.d.ts.map +1 -1
- package/dist/storage/ai-usage/usage.d.ts +1 -1
- package/dist/storage/ai-usage/usage.d.ts.map +1 -1
- package/dist/storage/artifacts/in-memory.d.ts +25 -2
- package/dist/storage/artifacts/in-memory.d.ts.map +1 -1
- package/dist/storage/artifacts/index.d.ts +1 -1
- package/dist/storage/artifacts/index.d.ts.map +1 -1
- package/dist/storage/artifacts/record.d.ts +12 -1
- package/dist/storage/artifacts/record.d.ts.map +1 -1
- package/dist/storage/artifacts/types.d.ts +198 -6
- package/dist/storage/artifacts/types.d.ts.map +1 -1
- package/dist/storage/executions/provider.js +3 -2
- package/dist/storage/executions/provider.js.map +1 -1
- package/dist/storage/file-upload-sessions/provider.js +10 -9
- package/dist/storage/file-upload-sessions/provider.js.map +1 -1
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +4 -4
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +25 -23
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +2 -2
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +34 -14
- package/dist/storage/internal.js.map +2 -2
- package/dist/storage/workflow-runs/provider.js +10 -9
- package/dist/storage/workflow-runs/provider.js.map +1 -1
- package/dist/syncs/index.js +29 -27
- package/dist/syncs/index.js.map +1 -1
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-cost-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-usage-storage-contract.d.ts.map +1 -1
- package/dist/testing/artifact-storage-contract.d.ts +3 -0
- package/dist/testing/artifact-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution-storage-contract.d.ts.map +1 -1
- package/dist/testing/index.js +686 -75
- package/dist/testing/index.js.map +10 -10
- package/dist/testing/lake-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/testing/sandboxes-contract.d.ts.map +1 -1
- package/dist/webhooks/internal.js +26 -24
- package/dist/webhooks/internal.js.map +2 -2
- package/dist/workers/index.js +5 -5
- package/dist/workers/index.js.map +1 -1
- package/dist/workflows/index.js +60 -57
- package/dist/workflows/index.js.map +1 -1
- package/package.json +3 -1
- package/src/actions/request.ts +2 -0
- package/src/actions/run/context.ts +1 -0
- package/src/actions/run/execute.ts +5 -1
- package/src/actions/run/executor.ts +4 -0
- package/src/actions/run/normalize.ts +4 -0
- package/src/actions/run/types.ts +6 -0
- package/src/actions/types/context.ts +7 -0
- package/src/agents/README.md +3 -1
- package/src/agents/context/entries.ts +63 -9
- package/src/agents/context-model.ts +9 -0
- package/src/agents/context-resolution.ts +7 -0
- package/src/agents/execution.ts +39 -0
- package/src/agents/index.ts +1 -0
- package/src/agents/model-call-retry.ts +69 -0
- package/src/agents/model-loop.ts +86 -12
- package/src/agents/model-routing.ts +104 -38
- package/src/agents/request.ts +27 -1
- package/src/agents/run-artifacts.ts +10 -5
- package/src/agents/run-plan.ts +2 -1
- package/src/agents/run-session-http.ts +1 -0
- package/src/agents/run-session-serve.ts +23 -2
- package/src/agents/run-session-wire.ts +45 -0
- package/src/agents/run-token.ts +7 -0
- package/src/agents/thread-access.ts +34 -1
- package/src/agents/tool-files.ts +23 -7
- package/src/artifacts/caller.ts +42 -0
- package/src/artifacts/comment-place.ts +51 -0
- package/src/artifacts/comment-text.ts +50 -7
- package/src/artifacts/comments.ts +132 -34
- package/src/artifacts/errors.ts +1 -0
- package/src/artifacts/execution.ts +249 -5
- package/src/artifacts/frames/assets.ts +93 -15
- package/src/artifacts/frames/entries.ts +7 -4
- package/src/artifacts/frames/generated/hyperframes-notices.txt +290 -0
- package/src/artifacts/frames/generated/hyperframes.txt +1145 -0
- package/src/artifacts/frames/generated.d.ts +5 -0
- package/src/artifacts/frames/hyperframes.ts +14 -0
- package/src/artifacts/frames/index.ts +5 -0
- package/src/artifacts/frames/kit.ts +7 -3
- package/src/artifacts/frames/protocol.ts +56 -0
- package/src/artifacts/frames/video-runtime.ts +165 -0
- package/src/artifacts/html.ts +13 -0
- package/src/artifacts/index.ts +7 -0
- package/src/artifacts/kinds.ts +9 -1
- package/src/artifacts/limits.ts +43 -0
- package/src/artifacts/live/document.ts +27 -3
- package/src/artifacts/live/index.ts +58 -2
- package/src/artifacts/live/presence.ts +17 -5
- package/src/artifacts/live/protocol.ts +4 -2
- package/src/artifacts/live/server.ts +1 -1
- package/src/artifacts/live/state.ts +3 -3
- package/src/artifacts/media/README.md +75 -0
- package/src/artifacts/media/media.ts +316 -0
- package/src/artifacts/media/transcriber.ts +84 -0
- package/src/artifacts/outline.ts +28 -0
- package/src/artifacts/publish/files.ts +19 -6
- package/src/artifacts/publish/index.ts +49 -2
- package/src/artifacts/publish/pdf.ts +3 -1
- package/src/artifacts/publish/previews.ts +22 -8
- package/src/artifacts/publish/publish.ts +4 -1
- package/src/artifacts/publish/validate/html.ts +23 -18
- package/src/artifacts/publish/validate/video.ts +309 -0
- package/src/artifacts/publish/video.ts +235 -0
- package/src/artifacts/resolve.ts +45 -0
- package/src/artifacts/video/README.md +402 -0
- package/src/artifacts/video/composition.ts +898 -0
- package/src/artifacts/video/edit.ts +3967 -0
- package/src/artifacts/video/export.ts +352 -0
- package/src/artifacts/video/looks.ts +694 -0
- package/src/artifacts/video/project.ts +198 -0
- package/src/artifacts/video/stills.ts +168 -0
- package/src/artifacts/video/timeline.ts +658 -0
- package/src/blob-storage/browser.ts +1 -1
- package/src/blob-storage/constants.ts +9 -3
- package/src/blob-storage/download-urls.ts +5 -3
- package/src/blob-storage/index.ts +1 -0
- package/src/blob-storage/internal.ts +13 -2
- package/src/blob-storage/media-type.ts +149 -8
- package/src/bootstrap/discovery.ts +61 -11
- package/src/deploy/index.ts +0 -5
- package/src/deploy/types.ts +8 -63
- package/src/deploy/validation.ts +1 -1
- package/src/env/index.ts +10 -4
- package/src/errors/catalog.ts +2 -1
- package/src/execution/authorization.ts +2 -2
- package/src/execution/kernel-operation.ts +14 -0
- package/src/execution/types.ts +2 -0
- package/src/http/api-routes.ts +117 -0
- package/src/index.ts +21 -1
- package/src/lake-storage/definition-updates.ts +3 -9
- package/src/models/audio/runtime.ts +48 -3
- package/src/models/audio/speech.ts +2 -2
- package/src/models/audio/types.ts +24 -3
- package/src/models/calls.ts +35 -18
- package/src/models/catalog.ts +9 -2
- package/src/models/definitions.ts +4 -2
- package/src/models/errors.ts +5 -3
- package/src/models/events.ts +2 -0
- package/src/models/execution/README.md +68 -2
- package/src/models/execution/index.ts +1 -0
- package/src/models/execution/model-call-limits.ts +11 -5
- package/src/models/execution/model-call-recorder.ts +14 -0
- package/src/models/execution/session.ts +52 -23
- package/src/models/execution/usage.ts +1 -0
- package/src/models/execution.ts +13 -2
- package/src/models/generation-types.ts +2 -0
- package/src/models/index.ts +20 -1
- package/src/models/input-file.ts +7 -2
- package/src/models/pricing.ts +19 -1
- package/src/models/rate-card.ts +15 -3
- package/src/models/tools.ts +5 -0
- package/src/models/video/catalog.ts +101 -0
- package/src/models/video/check.ts +441 -0
- package/src/models/video/runtime.ts +550 -0
- package/src/models/video/types.ts +194 -0
- package/src/objects/execution.ts +2 -0
- package/src/objects/sdk/object-set.ts +2 -0
- package/src/queues/index.ts +5 -0
- package/src/queues/types.ts +126 -5
- package/src/runtime/create.ts +1 -0
- package/src/runtime/definitions.ts +25 -0
- package/src/runtime/host.ts +6 -1
- package/src/runtime/index.ts +6 -1
- package/src/runtime/internal.ts +3 -1
- package/src/runtime/resolve-definitions.ts +7 -1
- package/src/runtime/sixb.ts +12 -4
- package/src/sandboxes/README.md +12 -2
- package/src/sandboxes/errors.ts +27 -0
- package/src/sandboxes/exec.ts +3 -1
- package/src/sandboxes/index.ts +3 -0
- package/src/sandboxes/sandbox.ts +15 -1
- package/src/security/public.ts +6 -4
- package/src/storage/agents/in-memory.ts +39 -0
- package/src/storage/agents/index.ts +1 -0
- package/src/storage/agents/provider.ts +8 -0
- package/src/storage/agents/types.ts +32 -1
- package/src/storage/ai-cost/analytics.ts +2 -0
- package/src/storage/ai-cost/codec.ts +1 -0
- package/src/storage/ai-cost/groups.ts +7 -0
- package/src/storage/ai-cost/types.ts +2 -0
- package/src/storage/ai-cost/validation.ts +2 -0
- package/src/storage/ai-usage/in-memory.ts +93 -0
- package/src/storage/ai-usage/index.ts +10 -0
- package/src/storage/ai-usage/record.ts +106 -0
- package/src/storage/ai-usage/types.ts +102 -1
- package/src/storage/ai-usage/usage.ts +2 -0
- package/src/storage/artifacts/in-memory.ts +108 -11
- package/src/storage/artifacts/index.ts +14 -0
- package/src/storage/artifacts/record.ts +203 -1
- package/src/storage/artifacts/types.ts +199 -6
- package/src/storage/executions/validation.ts +2 -2
- package/src/storage/in-memory/index.ts +1 -1
- package/src/storage/index.ts +22 -1
- package/src/storage/internal.ts +9 -0
- package/src/testing/agent-storage-contract.ts +135 -0
- package/src/testing/ai-cost-storage-contract.ts +1 -0
- package/src/testing/ai-usage-storage-contract.ts +145 -1
- package/src/testing/artifact-storage-contract.ts +330 -0
- package/src/testing/execution-storage-contract.ts +10 -2
- package/src/testing/lake-storage-contract.ts +27 -0
- package/src/testing/queues-contract.ts +71 -0
- package/src/testing/sandboxes-contract.ts +50 -0
- package/dist/chunk-3723kgba.js +0 -29
- package/dist/chunk-3723kgba.js.map +0 -10
- package/dist/chunk-3qtk0070.js.map +0 -14
- package/dist/chunk-8ncg20rd.js.map +0 -10
- package/dist/chunk-9vsc919v.js.map +0 -10
- package/dist/chunk-az95tsh3.js.map +0 -11
- package/dist/chunk-c29729me.js.map +0 -12
- package/dist/chunk-d7vyc7k6.js.map +0 -10
- package/dist/chunk-de5sfbc3.js +0 -3
- package/dist/chunk-f05994as.js.map +0 -10
- package/dist/chunk-gfdh9kqa.js.map +0 -11
- package/dist/chunk-jt012fxq.js.map +0 -34
- package/dist/chunk-mbwsgjn7.js.map +0 -11
- package/dist/chunk-nxysqbt0.js.map +0 -10
- package/dist/chunk-qttqe1ah.js.map +0 -24
- package/dist/chunk-sgx82nnt.js.map +0 -10
- package/dist/chunk-vs2s3p8n.js +0 -2274
- package/dist/chunk-vs2s3p8n.js.map +0 -20
- package/dist/chunk-wkv3h3q7.js.map +0 -12
- package/dist/chunk-wzcjhv54.js.map +0 -11
- package/dist/chunk-xtztwpkh.js.map +0 -12
- package/dist/chunk-ym1bqd98.js.map +0 -19
- /package/dist/{chunk-7mhbs9yy.js.map → chunk-1z8ccj53.js.map} +0 -0
- /package/dist/{chunk-dmnd9ea6.js.map → chunk-30a0ftnm.js.map} +0 -0
- /package/dist/{chunk-qbd282aa.js.map → chunk-39q9ybav.js.map} +0 -0
- /package/dist/{chunk-bcz9dxtf.js.map → chunk-3x902cja.js.map} +0 -0
- /package/dist/{chunk-c4nrycdy.js.map → chunk-4q4a5a96.js.map} +0 -0
- /package/dist/{chunk-ykchk644.js.map → chunk-4w8qzy9w.js.map} +0 -0
- /package/dist/{chunk-kft7mp7z.js.map → chunk-5xkqasvn.js.map} +0 -0
- /package/dist/{chunk-xavet0qs.js.map → chunk-6whr25gw.js.map} +0 -0
- /package/dist/{chunk-ygvay56w.js.map → chunk-896te58g.js.map} +0 -0
- /package/dist/{chunk-pqj8vff9.js.map → chunk-8eqqqc1h.js.map} +0 -0
- /package/dist/{chunk-jka26v8c.js.map → chunk-8x1bsp68.js.map} +0 -0
- /package/dist/{chunk-fmgf9h5e.js.map → chunk-9az7kjv4.js.map} +0 -0
- /package/dist/{chunk-bs1sd0e0.js.map → chunk-9p7kyeqz.js.map} +0 -0
- /package/dist/{chunk-brybqw5k.js.map → chunk-bkxm2dzx.js.map} +0 -0
- /package/dist/{chunk-ppxf7gw2.js.map → chunk-d7t9jnym.js.map} +0 -0
- /package/dist/{chunk-cg7cygfj.js.map → chunk-fdmvaz7x.js.map} +0 -0
- /package/dist/{chunk-191jz8a6.js.map → chunk-ff0qdk7z.js.map} +0 -0
- /package/dist/{chunk-wx7smkn2.js.map → chunk-fq8drkp0.js.map} +0 -0
- /package/dist/{chunk-v8a1qjzp.js.map → chunk-hpswfrjj.js.map} +0 -0
- /package/dist/{chunk-bz5bnjjt.js.map → chunk-jjte0h4p.js.map} +0 -0
- /package/dist/{chunk-xrmbhap8.js.map → chunk-mwg0nwkb.js.map} +0 -0
- /package/dist/{chunk-a3faa34j.js.map → chunk-nfjt8k8j.js.map} +0 -0
- /package/dist/{chunk-394zjzjs.js.map → chunk-nhgqz3g3.js.map} +0 -0
- /package/dist/{chunk-92wrka15.js.map → chunk-q150fnj9.js.map} +0 -0
- /package/dist/{chunk-w3t94hm6.js.map → chunk-qk3zq25v.js.map} +0 -0
- /package/dist/{chunk-6hfbz4d0.js.map → chunk-r588h4ev.js.map} +0 -0
- /package/dist/{chunk-5qqmndhm.js.map → chunk-szzhrn3e.js.map} +0 -0
- /package/dist/{chunk-n1hbwc6y.js.map → chunk-t6pfch4e.js.map} +0 -0
- /package/dist/{chunk-brhp9d97.js.map → chunk-vmqjndb3.js.map} +0 -0
- /package/dist/{chunk-5sswe5ej.js.map → chunk-wsv23wvr.js.map} +0 -0
- /package/dist/{chunk-90nqenq8.js.map → chunk-x0hqc54n.js.map} +0 -0
- /package/dist/{chunk-3neam1y5.js.map → chunk-y3qb965a.js.map} +0 -0
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
import { CANVAS_FILE } from "../canvas"
|
|
14
14
|
import { BOARD_PREVIEW_JOB, BOARD_PREVIEW_WAIT_MS } from "../canvas-display"
|
|
15
15
|
import { FRAME_ASSETS } from "../frames/assets"
|
|
16
|
+
import type { FrameLayout } from "../frames/entries"
|
|
16
17
|
import { FRAME_DEFAULT_THEMES } from "../frames/kit"
|
|
17
18
|
import type { ArtifactOutline, CanvasOutline, CanvasOutlineItem } from "../outline"
|
|
18
19
|
import { type ArtifactQueryResult, artifactQueryName } from "../queries"
|
|
@@ -117,7 +118,7 @@ export function boardRenderKey(input: {
|
|
|
117
118
|
.update(
|
|
118
119
|
JSON.stringify([
|
|
119
120
|
RENDER_KEY_FORMAT,
|
|
120
|
-
frameKitDigest(),
|
|
121
|
+
frameKitDigest("page"),
|
|
121
122
|
board.file,
|
|
122
123
|
board.w,
|
|
123
124
|
board.h,
|
|
@@ -464,12 +465,25 @@ async function storeQueryAnswers(
|
|
|
464
465
|
})
|
|
465
466
|
}
|
|
466
467
|
|
|
467
|
-
|
|
468
|
+
const kitDigests = new Map<FrameLayout, string>()
|
|
468
469
|
|
|
469
|
-
/**
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
470
|
+
/**
|
|
471
|
+
* What a frame of `layout` runs with besides its own files: a new kit renders it anew. The files
|
|
472
|
+
* every layout shares, and those of its own layout alone: a video's runtimes are in a video's keys,
|
|
473
|
+
* and in no deck's, page's or document's.
|
|
474
|
+
*/
|
|
475
|
+
export function frameKitDigest(layout: FrameLayout): string {
|
|
476
|
+
let digest = kitDigests.get(layout)
|
|
477
|
+
if (digest === undefined) {
|
|
478
|
+
const assets = Object.fromEntries(
|
|
479
|
+
Object.entries(FRAME_ASSETS).filter(
|
|
480
|
+
([, asset]) => asset.layout === undefined || asset.layout === layout
|
|
481
|
+
)
|
|
482
|
+
)
|
|
483
|
+
digest = createHash("sha256")
|
|
484
|
+
.update(JSON.stringify([assets, FRAME_DEFAULT_THEMES]))
|
|
485
|
+
.digest("hex")
|
|
486
|
+
kitDigests.set(layout, digest)
|
|
487
|
+
}
|
|
488
|
+
return digest
|
|
475
489
|
}
|
|
@@ -45,6 +45,7 @@ import { validateFileArtifact } from "./validate/file"
|
|
|
45
45
|
import { validatePage } from "./validate/page"
|
|
46
46
|
import { validateSheet } from "./validate/sheet"
|
|
47
47
|
import { validateSlides } from "./validate/slides"
|
|
48
|
+
import { validateVideo } from "./validate/video"
|
|
48
49
|
|
|
49
50
|
export interface PublishArtifactContext {
|
|
50
51
|
readonly projectId: string
|
|
@@ -151,7 +152,7 @@ export async function prepareArtifactVersion(
|
|
|
151
152
|
input: PublishArtifactInput
|
|
152
153
|
): Promise<PreparedArtifactVersion> {
|
|
153
154
|
const title = checkTitle(input.title)
|
|
154
|
-
await checkArtifactFiles(context.blobStorage, input.files)
|
|
155
|
+
await checkArtifactFiles(context.blobStorage, input.kind, input.files)
|
|
155
156
|
const theme =
|
|
156
157
|
input.kind === "file" ? undefined : await readTheme(context.blobStorage, input.files)
|
|
157
158
|
|
|
@@ -311,6 +312,8 @@ async function validateKind(
|
|
|
311
312
|
return validatePage(blobStorage, files)
|
|
312
313
|
case "canvas":
|
|
313
314
|
return validateCanvas(blobStorage, files)
|
|
315
|
+
case "video":
|
|
316
|
+
return validateVideo(blobStorage, files)
|
|
314
317
|
default:
|
|
315
318
|
// A caller past the API's schema, such as a script on the SDK, can name any kind.
|
|
316
319
|
throw invalidArtifact(`'${kind satisfies never}' is not a kind of artifact.`)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ArtifactFile } from "../../../storage/artifacts/types"
|
|
2
2
|
import { isArtifactAddress, parseArtifactAddress } from "../../address"
|
|
3
|
-
import { decodeHtmlEntities } from "../../html"
|
|
3
|
+
import { decodeHtmlEntities, HTML_FILE_ATTRIBUTES } from "../../html"
|
|
4
4
|
import { invalidArtifact } from "../files"
|
|
5
5
|
import type { FoundReference } from "../references"
|
|
6
6
|
|
|
@@ -22,10 +22,11 @@ export function refuseFrameAssetPaths(files: readonly ArtifactFile[], what: stri
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Reads the `artifact:` addresses a web artifact's HTML uses, to resolve: links (`<a href>`),
|
|
25
|
-
* files it shows from other artifacts (`<img src>`
|
|
26
|
-
* src
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* files it shows or plays from other artifacts (`<img src>`, `<video src>` and its `poster`,
|
|
26
|
+
* `<audio src>`, `<source src>`, `<track src>` for captions), and anything else it shows
|
|
27
|
+
* (`<sixb-embed src>`), a chart, a range, a section, or a slide, which the app draws over the
|
|
28
|
+
* frame. `at` names where each sits, such as a deck's slide, and `file` the HTML file it reads. The
|
|
29
|
+
* first thing that would not render is the refusal.
|
|
29
30
|
*/
|
|
30
31
|
export function readHtmlReferences(
|
|
31
32
|
rewriter: HTMLRewriter,
|
|
@@ -34,26 +35,30 @@ export function readHtmlReferences(
|
|
|
34
35
|
): { readonly references: FoundReference[]; readonly refusal: () => string | undefined } {
|
|
35
36
|
const references: FoundReference[] = []
|
|
36
37
|
let refused: string | undefined
|
|
37
|
-
rewriter
|
|
38
|
-
|
|
39
|
-
element(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
rewriter.on("a[href]", {
|
|
39
|
+
element(element) {
|
|
40
|
+
const href = decodeHtmlEntities(element.getAttribute("href") ?? "")
|
|
41
|
+
if (isArtifactAddress(href)) {
|
|
42
|
+
references.push({ address: href.trim(), as: "link", at: at() })
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
for (const { element: tag, attribute } of HTML_FILE_ATTRIBUTES) {
|
|
48
|
+
rewriter.on(`${tag}[${attribute}]`, {
|
|
47
49
|
element(element) {
|
|
48
|
-
const source = decodeHtmlEntities(element.getAttribute(
|
|
50
|
+
const source = decodeHtmlEntities(element.getAttribute(attribute) ?? "").trim()
|
|
49
51
|
if (!isArtifactAddress(source)) return
|
|
50
52
|
if (!parseArtifactAddress(source)?.path) {
|
|
51
|
-
refused ??=
|
|
53
|
+
refused ??= `<${tag} ${attribute}> takes a file from another artifact, and '${source}' names none: show a chart, a range, a section, or a slide with <sixb-embed src="${source}"></sixb-embed>.`
|
|
52
54
|
return
|
|
53
55
|
}
|
|
54
56
|
references.push({ address: source, as: "embed", at: at() })
|
|
55
57
|
},
|
|
56
58
|
})
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
rewriter
|
|
57
62
|
.on("sixb-embed", {
|
|
58
63
|
element(element) {
|
|
59
64
|
const source = decodeHtmlEntities(element.getAttribute("src") ?? "").trim()
|
|
@@ -70,7 +75,7 @@ export function readHtmlReferences(
|
|
|
70
75
|
element.getAttribute("src") ?? element.getAttribute("data") ?? ""
|
|
71
76
|
).trim()
|
|
72
77
|
if (isArtifactAddress(source)) {
|
|
73
|
-
refused ??= `${file} frames '${source}': show another artifact with <sixb-embed src="${source}"></sixb-embed>, or a file of one with <img>.`
|
|
78
|
+
refused ??= `${file} frames '${source}': show another artifact with <sixb-embed src="${source}"></sixb-embed>, or a file of one with <img>, <video>, or <audio>.`
|
|
74
79
|
}
|
|
75
80
|
},
|
|
76
81
|
})
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import type { ArtifactFile } from "../../../storage/artifacts/types"
|
|
2
|
+
import { isArtifactAddress, parseArtifactAddress } from "../../address"
|
|
3
|
+
import type { FRAME_CDN_ALLOWLIST } from "../../frames/assets"
|
|
4
|
+
import { ARTIFACT_LIMITS } from "../../limits"
|
|
5
|
+
import type { VideoOutline } from "../../outline"
|
|
6
|
+
import {
|
|
7
|
+
composeVideo,
|
|
8
|
+
cssMoves,
|
|
9
|
+
missingScene,
|
|
10
|
+
parseVideoRoot,
|
|
11
|
+
parseVideoScene,
|
|
12
|
+
VIDEO_ENTRY,
|
|
13
|
+
type VideoComposition,
|
|
14
|
+
type VideoMediaReference,
|
|
15
|
+
type VideoSceneFile,
|
|
16
|
+
videoFilePath,
|
|
17
|
+
} from "../../video/composition"
|
|
18
|
+
import { type ArtifactBlobStorage, invalidArtifact, readArtifactText } from "../files"
|
|
19
|
+
import type { FoundReference } from "../references"
|
|
20
|
+
import { sceneRenderKeys } from "../video"
|
|
21
|
+
import { refuseFrameAssetPaths } from "./html"
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Reads a video: `index.html`, its root composition, then each scene's `<template>` file, and
|
|
25
|
+
* resolves when each scene starts. Every file a composition plays must be one of the version's,
|
|
26
|
+
* or a file of another artifact by its `artifact:` address, returned to resolve at the scene that
|
|
27
|
+
* plays it. Each scene is named by its render key.
|
|
28
|
+
*/
|
|
29
|
+
export async function validateVideo(
|
|
30
|
+
blobStorage: ArtifactBlobStorage,
|
|
31
|
+
files: readonly ArtifactFile[]
|
|
32
|
+
): Promise<{
|
|
33
|
+
readonly entry: string
|
|
34
|
+
readonly outline: VideoOutline
|
|
35
|
+
readonly references: readonly FoundReference[]
|
|
36
|
+
}> {
|
|
37
|
+
const { outline, references } = await readVideoVersion(blobStorage, files)
|
|
38
|
+
return { entry: VIDEO_ENTRY, outline, references }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** A video's files, read as publishing reads them: what renders each of its scenes. */
|
|
42
|
+
export interface VideoVersionRead {
|
|
43
|
+
readonly outline: VideoOutline
|
|
44
|
+
readonly references: readonly FoundReference[]
|
|
45
|
+
/** `index.html`'s text, which the composition's spans point into. */
|
|
46
|
+
readonly index: string
|
|
47
|
+
readonly composition: VideoComposition
|
|
48
|
+
/** What the root plays itself. */
|
|
49
|
+
readonly rootLoads: ReadonlySet<string>
|
|
50
|
+
/** What each scene plays, by its id: its file, what it nests, and what they play. */
|
|
51
|
+
readonly loads: ReadonlyMap<string, ReadonlySet<string>>
|
|
52
|
+
/** Whether the root shows something that moves of its own, what it links read. */
|
|
53
|
+
readonly rootTimeline: boolean
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Reads a video as {@link validateVideo} checks it, with what renders it: its composition and what
|
|
58
|
+
* each scene plays. Throws `invalid_artifact` for a version publishing would refuse.
|
|
59
|
+
*/
|
|
60
|
+
export async function readVideoVersion(
|
|
61
|
+
blobStorage: ArtifactBlobStorage,
|
|
62
|
+
files: readonly ArtifactFile[]
|
|
63
|
+
): Promise<VideoVersionRead> {
|
|
64
|
+
const byPath = new Map(files.map((file) => [file.path, file]))
|
|
65
|
+
const index = byPath.get(VIDEO_ENTRY)
|
|
66
|
+
if (!index) {
|
|
67
|
+
throw invalidArtifact(
|
|
68
|
+
`A video needs '${VIDEO_ENTRY}', its root composition, with a <template> file for each scene and the media they play beside it.`
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
refuseFrameAssetPaths(files, "the video")
|
|
72
|
+
refuseTooManyRecordings(files)
|
|
73
|
+
refuseLargePages(files)
|
|
74
|
+
|
|
75
|
+
const read = (file: ArtifactFile) =>
|
|
76
|
+
readArtifactText(blobStorage, file, ARTIFACT_LIMITS.maxSceneBytes)
|
|
77
|
+
|
|
78
|
+
const indexText = await read(index)
|
|
79
|
+
const root = parseVideoRoot(indexText)
|
|
80
|
+
if ("error" in root) throw invalidArtifact(root.error)
|
|
81
|
+
|
|
82
|
+
// One at a time, so the same version is always refused for the same scene.
|
|
83
|
+
const scenes = new Map<string, VideoSceneFile>()
|
|
84
|
+
for (const { id, src } of root.root.scenes) {
|
|
85
|
+
const file = byPath.get(src)
|
|
86
|
+
if (!file) throw invalidArtifact(missingScene(id, src))
|
|
87
|
+
|
|
88
|
+
const scene = parseVideoScene(await read(file), src)
|
|
89
|
+
if ("error" in scene) throw invalidArtifact(scene.error)
|
|
90
|
+
scenes.set(src, scene.scene)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const composed = composeVideo(root.root, scenes)
|
|
94
|
+
if ("error" in composed) throw invalidArtifact(composed.error)
|
|
95
|
+
const { composition } = composed
|
|
96
|
+
|
|
97
|
+
const references: FoundReference[] = []
|
|
98
|
+
const exists = (path: string) => byPath.has(path)
|
|
99
|
+
|
|
100
|
+
// A nested composition's file is read as a scene file is: a <template> holding one. Each is read
|
|
101
|
+
// once, however many scenes nest it.
|
|
102
|
+
const nestedFiles = new Map<string, VideoSceneFile>()
|
|
103
|
+
const parsed = async (file: ArtifactFile): Promise<VideoSceneFile> => {
|
|
104
|
+
const known = scenes.get(file.path) ?? nestedFiles.get(file.path)
|
|
105
|
+
if (known) return known
|
|
106
|
+
|
|
107
|
+
const scene = parseVideoScene(await read(file), file.path)
|
|
108
|
+
if ("error" in scene) throw invalidArtifact(scene.error)
|
|
109
|
+
nestedFiles.set(file.path, scene.scene)
|
|
110
|
+
return scene.scene
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// What each composition file loads: itself, what it plays, and what it nests, all the way down.
|
|
114
|
+
// Each is walked once per scene, `loaded` being that scene's: a composition two scenes nest
|
|
115
|
+
// plays its `artifact:` addresses at both.
|
|
116
|
+
const load = async (
|
|
117
|
+
path: string,
|
|
118
|
+
file: VideoSceneFile,
|
|
119
|
+
at: string,
|
|
120
|
+
nesting: readonly string[],
|
|
121
|
+
loaded: Map<string, ReadonlySet<string>>
|
|
122
|
+
): Promise<ReadonlySet<string>> => {
|
|
123
|
+
const known = loaded.get(path)
|
|
124
|
+
if (known) return known
|
|
125
|
+
|
|
126
|
+
const paths = new Set([
|
|
127
|
+
path,
|
|
128
|
+
...played({ file: path, at, media: file.media, exists, references }),
|
|
129
|
+
])
|
|
130
|
+
for (const { element, value } of file.compositions) {
|
|
131
|
+
const nested = videoFilePath(VIDEO_ENTRY, value, exists)
|
|
132
|
+
const nestedEntry = nested === undefined ? undefined : byPath.get(nested)
|
|
133
|
+
const tag = `<${element} data-composition-src="${value.trim()}">`
|
|
134
|
+
if (nested === undefined || !nestedEntry) {
|
|
135
|
+
throw invalidArtifact(
|
|
136
|
+
`${path}: ${tag} nests a composition that is not one of the video's files: name it by its path from the video's root, such as compositions/lower-third.html.`
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
if (nested === path || nesting.includes(nested)) {
|
|
140
|
+
throw invalidArtifact(
|
|
141
|
+
`${path}: ${tag} nests '${nested}', which nests ${path} in turn: a composition never holds itself.`
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const nestedFile = await parsed(nestedEntry)
|
|
146
|
+
for (const each of await load(nested, nestedFile, at, [...nesting, path], loaded)) {
|
|
147
|
+
paths.add(each)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
loaded.set(path, paths)
|
|
152
|
+
return paths
|
|
153
|
+
}
|
|
154
|
+
const rootLoads = played({
|
|
155
|
+
file: VIDEO_ENTRY,
|
|
156
|
+
at: "",
|
|
157
|
+
media: composition.media,
|
|
158
|
+
exists,
|
|
159
|
+
references,
|
|
160
|
+
})
|
|
161
|
+
const loads = new Map<string, ReadonlySet<string>>()
|
|
162
|
+
for (const scene of composition.scenes) {
|
|
163
|
+
const file = scenes.get(scene.src)
|
|
164
|
+
if (file) loads.set(scene.id, await load(scene.src, file, scene.id, [], new Map()))
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const rootTimeline =
|
|
168
|
+
composition.rootTimeline || (await linksMove(composition, byPath, read, exists))
|
|
169
|
+
const keys = sceneRenderKeys({
|
|
170
|
+
index: indexText,
|
|
171
|
+
composition,
|
|
172
|
+
files,
|
|
173
|
+
rootLoads,
|
|
174
|
+
rootTimeline,
|
|
175
|
+
loads,
|
|
176
|
+
})
|
|
177
|
+
return {
|
|
178
|
+
index: indexText,
|
|
179
|
+
composition,
|
|
180
|
+
rootLoads,
|
|
181
|
+
loads,
|
|
182
|
+
rootTimeline,
|
|
183
|
+
outline: {
|
|
184
|
+
kind: "video",
|
|
185
|
+
width: composition.width,
|
|
186
|
+
height: composition.height,
|
|
187
|
+
fps: composition.fps,
|
|
188
|
+
durationMs: composition.durationMs,
|
|
189
|
+
...(composition.posterMs === undefined ? {} : { posterMs: composition.posterMs }),
|
|
190
|
+
scenes: composition.scenes.map((scene) => ({
|
|
191
|
+
id: scene.id,
|
|
192
|
+
...(scene.label ? { label: scene.label } : {}),
|
|
193
|
+
startMs: scene.startMs,
|
|
194
|
+
durationMs: scene.durationMs,
|
|
195
|
+
renderKey: keys.get(scene.id) ?? "",
|
|
196
|
+
})),
|
|
197
|
+
},
|
|
198
|
+
references,
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** The stylesheet hosts of `FRAME_CDN_ALLOWLIST` that serve fonts, whose CSS never moves. */
|
|
203
|
+
const FONT_HOSTS: readonly (typeof FRAME_CDN_ALLOWLIST)[number][] = [
|
|
204
|
+
"https://fonts.googleapis.com",
|
|
205
|
+
"https://fonts.gstatic.com",
|
|
206
|
+
]
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Whether what `index.html` links makes its root move as time passes: a stylesheet of the version
|
|
210
|
+
* whose CSS animates, one from elsewhere than a font host, which cannot be read, or a script of the
|
|
211
|
+
* version that registers a timeline. A library, a script that registers none, only loads. A file
|
|
212
|
+
* too large to read counts.
|
|
213
|
+
*/
|
|
214
|
+
async function linksMove(
|
|
215
|
+
composition: VideoComposition,
|
|
216
|
+
byPath: ReadonlyMap<string, ArtifactFile>,
|
|
217
|
+
read: (file: ArtifactFile) => Promise<string>,
|
|
218
|
+
exists: (path: string) => boolean
|
|
219
|
+
): Promise<boolean> {
|
|
220
|
+
const fileOf = (value: string) => {
|
|
221
|
+
const path = videoFilePath(VIDEO_ENTRY, value, exists)
|
|
222
|
+
return path === undefined ? undefined : byPath.get(path)
|
|
223
|
+
}
|
|
224
|
+
const readable = (file: ArtifactFile) => file.file.sizeBytes <= ARTIFACT_LIMITS.maxSceneBytes
|
|
225
|
+
|
|
226
|
+
for (const { value } of composition.links.stylesheets) {
|
|
227
|
+
const file = fileOf(value)
|
|
228
|
+
if (!file) {
|
|
229
|
+
if (!FONT_HOSTS.some((origin) => value.trim().startsWith(`${origin}/`))) return true
|
|
230
|
+
continue
|
|
231
|
+
}
|
|
232
|
+
if (!readable(file) || cssMoves(await read(file))) return true
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
for (const { value } of composition.links.scripts) {
|
|
236
|
+
const file = fileOf(value)
|
|
237
|
+
if (file && (!readable(file) || /__timelines/.test(await read(file)))) return true
|
|
238
|
+
}
|
|
239
|
+
return false
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* The version's files a composition's HTML plays and shows. An `artifact:` address is found for
|
|
244
|
+
* resolving, at the scene that plays it; `data:` and `blob:` URLs hold their own bytes. Anything
|
|
245
|
+
* else must be one of the version's files: a frame plays nothing from elsewhere, and an export
|
|
246
|
+
* renders from the version alone.
|
|
247
|
+
*/
|
|
248
|
+
function played(input: {
|
|
249
|
+
readonly file: string
|
|
250
|
+
readonly at: string
|
|
251
|
+
readonly media: readonly VideoMediaReference[]
|
|
252
|
+
readonly exists: (path: string) => boolean
|
|
253
|
+
readonly references: FoundReference[]
|
|
254
|
+
}): ReadonlySet<string> {
|
|
255
|
+
const { file, at, media, exists, references } = input
|
|
256
|
+
const paths = new Set<string>()
|
|
257
|
+
|
|
258
|
+
for (const { element, attribute, value } of media) {
|
|
259
|
+
const written = value.trim()
|
|
260
|
+
const tag = `<${element} ${attribute}="${written}">`
|
|
261
|
+
|
|
262
|
+
if (isArtifactAddress(written)) {
|
|
263
|
+
if (!parseArtifactAddress(written)?.path) {
|
|
264
|
+
throw invalidArtifact(
|
|
265
|
+
`${file}: ${tag} names no file of that artifact: name one, such as artifact:art_k3m9q2x7tp/media/intro.mp4.`
|
|
266
|
+
)
|
|
267
|
+
}
|
|
268
|
+
references.push({ address: written, as: "embed", at })
|
|
269
|
+
continue
|
|
270
|
+
}
|
|
271
|
+
if (/^(data|blob):/i.test(written)) continue
|
|
272
|
+
|
|
273
|
+
const path = videoFilePath(file, written, exists)
|
|
274
|
+
if (path === undefined) {
|
|
275
|
+
throw invalidArtifact(
|
|
276
|
+
`${file}: ${tag} plays a file from outside the video, which neither the player nor an export can load: add it to the video, such as media/<name>, and name it by that path.`
|
|
277
|
+
)
|
|
278
|
+
}
|
|
279
|
+
if (!exists(path)) {
|
|
280
|
+
throw invalidArtifact(
|
|
281
|
+
`${file}: ${tag} plays '${path}', which is not one of the video's files.`
|
|
282
|
+
)
|
|
283
|
+
}
|
|
284
|
+
paths.add(path)
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return paths
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/** Every HTML file is read whole, the ones no scene names too: by the frame, and by an export. */
|
|
291
|
+
function refuseLargePages(files: readonly ArtifactFile[]): void {
|
|
292
|
+
const limit = ARTIFACT_LIMITS.maxSceneBytes
|
|
293
|
+
const large = files.find(({ path, file }) => /\.html?$/i.test(path) && file.sizeBytes > limit)
|
|
294
|
+
if (large) {
|
|
295
|
+
throw invalidArtifact(
|
|
296
|
+
`'${large.path}' is ${large.file.sizeBytes} bytes: each of a video's HTML files holds at most ${limit}.`
|
|
297
|
+
)
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/** Each recording a version holds is probed and proxied for the player: a video has a few dozen. */
|
|
302
|
+
function refuseTooManyRecordings(files: readonly ArtifactFile[]): void {
|
|
303
|
+
const recordings = files.filter(({ file }) => /^(video|audio)\//.test(file.mediaType ?? ""))
|
|
304
|
+
if (recordings.length > ARTIFACT_LIMITS.maxVideoMediaFiles) {
|
|
305
|
+
throw invalidArtifact(
|
|
306
|
+
`A video holds at most ${ARTIFACT_LIMITS.maxVideoMediaFiles} video and sound files; this one has ${recordings.length}. Leave out the ones it no longer plays.`
|
|
307
|
+
)
|
|
308
|
+
}
|
|
309
|
+
}
|