@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test"
|
|
2
2
|
import type { FileRef } from "../blob-storage/types"
|
|
3
3
|
import {
|
|
4
|
+
type AiModelCallOperationRecord,
|
|
4
5
|
type AiUsageStorage,
|
|
5
6
|
AiUsageStorageError,
|
|
6
7
|
type RecordAiModelCallInput,
|
|
@@ -119,7 +120,7 @@ export function runAiUsageStorageContractSuite<TStorage extends AiUsageStorage>(
|
|
|
119
120
|
})
|
|
120
121
|
// Removal proof: omit a media count from a row codec, or 'speech' from a storage migration's
|
|
121
122
|
// model_kind check; the round trip or the write fails.
|
|
122
|
-
test("persists generated-media usage and the speech
|
|
123
|
+
test("persists generated-media usage and the speech and video kinds", async () => {
|
|
123
124
|
await withStorage(async (storage) => {
|
|
124
125
|
const latest = () =>
|
|
125
126
|
storage.getLatestForExecution({ projectId, executionId: agentExecutionId })
|
|
@@ -160,6 +161,22 @@ export function runAiUsageStorageContractSuite<TStorage extends AiUsageStorage>(
|
|
|
160
161
|
outputImages: 1,
|
|
161
162
|
reportingStatus: "complete",
|
|
162
163
|
})
|
|
164
|
+
|
|
165
|
+
await storage.recordModelCall(
|
|
166
|
+
modelCallInput({
|
|
167
|
+
id: "usage_video",
|
|
168
|
+
callId: "call_video",
|
|
169
|
+
responseId: "response_video",
|
|
170
|
+
modelKind: "video",
|
|
171
|
+
usage: { outputVideoMs: 4000 },
|
|
172
|
+
occurredAt: at("2026-06-23T10:02:00.000Z"),
|
|
173
|
+
})
|
|
174
|
+
)
|
|
175
|
+
expect((await latest())?.modelKind).toBe("video")
|
|
176
|
+
expect((await latest())?.usage).toEqual({
|
|
177
|
+
outputVideoMs: 4000,
|
|
178
|
+
reportingStatus: "partial",
|
|
179
|
+
})
|
|
163
180
|
})
|
|
164
181
|
})
|
|
165
182
|
test("retains native provider IDs across reads and replay", async () => {
|
|
@@ -705,6 +722,133 @@ export function runAiUsageStorageContractSuite<TStorage extends AiUsageStorage>(
|
|
|
705
722
|
expect(await storage.getModelCallFiles({ projectId, callId: "call_image" })).toBeNull()
|
|
706
723
|
})
|
|
707
724
|
})
|
|
725
|
+
|
|
726
|
+
// Removal proof: drop `operation IS NULL` from a provider's start update, or `result IS NULL`
|
|
727
|
+
// from its result update; the second call replaces the first value.
|
|
728
|
+
test("keeps a running call's operation until its first settlement", async () => {
|
|
729
|
+
await withStorage(async (storage) => {
|
|
730
|
+
const input = {
|
|
731
|
+
projectId,
|
|
732
|
+
callId: "call_video",
|
|
733
|
+
executionId: agentExecutionId,
|
|
734
|
+
attempt: 1,
|
|
735
|
+
modelKind: "video" as const,
|
|
736
|
+
providerId: "vercel-ai-gateway",
|
|
737
|
+
modelId: "google/veo-3.1-fast-generate-001",
|
|
738
|
+
request: { durationSeconds: 4 },
|
|
739
|
+
reserved: true,
|
|
740
|
+
createdAt: at("2026-06-23T10:00:00.000Z"),
|
|
741
|
+
}
|
|
742
|
+
const created: AiModelCallOperationRecord = { ...input, status: "pending" }
|
|
743
|
+
expect(await storage.createModelCallOperation(input)).toEqual(created)
|
|
744
|
+
|
|
745
|
+
const duplicate = await storage.createModelCallOperation(input).catch((error) => error)
|
|
746
|
+
expect(duplicate).toMatchObject({ code: "duplicate_id" })
|
|
747
|
+
|
|
748
|
+
// The provider accepted the call: its handle and what it said of the request.
|
|
749
|
+
const start = {
|
|
750
|
+
projectId,
|
|
751
|
+
callId: "call_video",
|
|
752
|
+
operation: { gatewayJobId: "job_1", nested: [1, "two", null] },
|
|
753
|
+
request: { durationSeconds: 4, dimensions: { resolution: "720p" } },
|
|
754
|
+
}
|
|
755
|
+
const pending: AiModelCallOperationRecord = {
|
|
756
|
+
...created,
|
|
757
|
+
operation: start.operation,
|
|
758
|
+
request: start.request,
|
|
759
|
+
}
|
|
760
|
+
expect(await storage.startModelCallOperation(start)).toEqual(pending)
|
|
761
|
+
expect(
|
|
762
|
+
await storage.startModelCallOperation({ ...start, operation: "job_2", request: {} })
|
|
763
|
+
).toEqual(pending)
|
|
764
|
+
expect(await storage.getModelCallOperation({ projectId, callId: "call_video" })).toEqual(
|
|
765
|
+
pending
|
|
766
|
+
)
|
|
767
|
+
expect(await storage.startModelCallOperation({ ...start, callId: "call_other" })).toBeNull()
|
|
768
|
+
|
|
769
|
+
// Its result, kept once it is in the ledger, before its files are stored.
|
|
770
|
+
const result = { usage: { outputVideoMs: 0 }, cost: { status: "reported" } }
|
|
771
|
+
const recorded: AiModelCallOperationRecord = { ...pending, result }
|
|
772
|
+
const keep = { projectId, callId: "call_video", result }
|
|
773
|
+
expect(await storage.recordModelCallOperationResult(keep)).toEqual(recorded)
|
|
774
|
+
expect(
|
|
775
|
+
await storage.recordModelCallOperationResult({ ...keep, result: { other: true } })
|
|
776
|
+
).toEqual(recorded)
|
|
777
|
+
expect(
|
|
778
|
+
await storage.recordModelCallOperationResult({ ...keep, callId: "call_other" })
|
|
779
|
+
).toBeNull()
|
|
780
|
+
|
|
781
|
+
const failed: AiModelCallOperationRecord = {
|
|
782
|
+
...pending,
|
|
783
|
+
status: "failed",
|
|
784
|
+
error: "The provider refused the prompt.",
|
|
785
|
+
result,
|
|
786
|
+
settledAt: at("2026-06-23T10:01:00.000Z"),
|
|
787
|
+
}
|
|
788
|
+
expect(
|
|
789
|
+
await storage.settleModelCallOperation({
|
|
790
|
+
projectId,
|
|
791
|
+
callId: "call_video",
|
|
792
|
+
status: "failed",
|
|
793
|
+
error: "The provider refused the prompt.",
|
|
794
|
+
result,
|
|
795
|
+
settledAt: at("2026-06-23T10:01:00.000Z"),
|
|
796
|
+
})
|
|
797
|
+
).toEqual(failed)
|
|
798
|
+
|
|
799
|
+
// A second poller that saw it complete keeps the first outcome.
|
|
800
|
+
expect(
|
|
801
|
+
await storage.settleModelCallOperation({
|
|
802
|
+
projectId,
|
|
803
|
+
callId: "call_video",
|
|
804
|
+
status: "completed",
|
|
805
|
+
result: {},
|
|
806
|
+
settledAt: at("2026-06-23T10:02:00.000Z"),
|
|
807
|
+
})
|
|
808
|
+
).toEqual(failed)
|
|
809
|
+
expect(await storage.getModelCallOperation({ projectId, callId: "call_video" })).toEqual(
|
|
810
|
+
failed
|
|
811
|
+
)
|
|
812
|
+
|
|
813
|
+
expect(
|
|
814
|
+
await storage.settleModelCallOperation({
|
|
815
|
+
projectId,
|
|
816
|
+
callId: "call_other",
|
|
817
|
+
status: "failed",
|
|
818
|
+
result: {},
|
|
819
|
+
})
|
|
820
|
+
).toBeNull()
|
|
821
|
+
expect(
|
|
822
|
+
await storage.getModelCallOperation({ projectId: "other-project", callId: "call_video" })
|
|
823
|
+
).toBeNull()
|
|
824
|
+
})
|
|
825
|
+
})
|
|
826
|
+
|
|
827
|
+
test("refuses an operation without a known execution or a JSON request", async () => {
|
|
828
|
+
await withStorage(async (storage) => {
|
|
829
|
+
const input = {
|
|
830
|
+
projectId,
|
|
831
|
+
callId: "call_video",
|
|
832
|
+
executionId: agentExecutionId,
|
|
833
|
+
attempt: 1,
|
|
834
|
+
modelKind: "video" as const,
|
|
835
|
+
providerId: "vercel-ai-gateway",
|
|
836
|
+
modelId: "google/veo-3.1-fast-generate-001",
|
|
837
|
+
request: {},
|
|
838
|
+
reserved: false,
|
|
839
|
+
}
|
|
840
|
+
const missing = await storage
|
|
841
|
+
.createModelCallOperation({ ...input, executionId: "exec_missing" })
|
|
842
|
+
.catch((error) => error)
|
|
843
|
+
expect(missing).toMatchObject({ code: "missing_execution" })
|
|
844
|
+
|
|
845
|
+
const invalid = await storage
|
|
846
|
+
.createModelCallOperation({ ...input, request: [] as never })
|
|
847
|
+
.catch((error) => error)
|
|
848
|
+
expect(invalid).toBeInstanceOf(TypeError)
|
|
849
|
+
expect(await storage.getModelCallOperation({ projectId, callId: "call_video" })).toBeNull()
|
|
850
|
+
})
|
|
851
|
+
})
|
|
708
852
|
})
|
|
709
853
|
}
|
|
710
854
|
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from "../artifacts/limits"
|
|
7
7
|
import type { Principal } from "../auth"
|
|
8
8
|
import type { FileRef } from "../blob-storage"
|
|
9
|
+
import type { AgentStorage } from "../storage/agents"
|
|
9
10
|
import {
|
|
10
11
|
type ArtifactCommentAuthor,
|
|
11
12
|
type ArtifactFrameGrantRecord,
|
|
@@ -21,6 +22,8 @@ import type { Storage } from "../storage/types"
|
|
|
21
22
|
|
|
22
23
|
export interface ArtifactStorageContractStorage extends Pick<Storage, "transaction"> {
|
|
23
24
|
readonly artifacts: ArtifactStorage
|
|
25
|
+
/** Who owns a thread and takes part in it, for the threads listed to one reader. */
|
|
26
|
+
readonly agents: AgentStorage
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
export interface ArtifactStorageContractSuiteOptions<
|
|
@@ -336,6 +339,65 @@ export function runArtifactStorageContractSuite<TStorage extends ArtifactStorage
|
|
|
336
339
|
})
|
|
337
340
|
})
|
|
338
341
|
|
|
342
|
+
// Removal proof: drop 'video' from a provider's kind CHECK and the video is refused; drop
|
|
343
|
+
// `scene` or `offset` from storedCommentAnchor and the comment comes back without its instant.
|
|
344
|
+
test("keeps a video, lists it as its kind, and the instant and scene its comments are about", async () => {
|
|
345
|
+
await withStorage(async (artifacts) => {
|
|
346
|
+
const outline = {
|
|
347
|
+
kind: "video",
|
|
348
|
+
width: 1920,
|
|
349
|
+
height: 1080,
|
|
350
|
+
fps: 30,
|
|
351
|
+
durationMs: 7000,
|
|
352
|
+
scenes: [
|
|
353
|
+
{
|
|
354
|
+
id: "intro",
|
|
355
|
+
label: "Opening",
|
|
356
|
+
startMs: 0,
|
|
357
|
+
durationMs: 2000,
|
|
358
|
+
renderKey: "a".repeat(64),
|
|
359
|
+
},
|
|
360
|
+
{ id: "demo", startMs: 2000, durationMs: 5000, renderKey: "b".repeat(64) },
|
|
361
|
+
],
|
|
362
|
+
} as const
|
|
363
|
+
const version = versionInput({
|
|
364
|
+
entry: "index.html",
|
|
365
|
+
files: [
|
|
366
|
+
{ path: "index.html", file: fileRef("a", "text/html") },
|
|
367
|
+
{ path: "media/clip.mp4", file: fileRef("b", "video/mp4") },
|
|
368
|
+
],
|
|
369
|
+
outline,
|
|
370
|
+
})
|
|
371
|
+
await artifacts.create(createInput({ id: "art_film", kind: "video", version }))
|
|
372
|
+
|
|
373
|
+
expect(
|
|
374
|
+
await artifacts.getVersion({ projectId, artifactId: "art_film", version: 1 })
|
|
375
|
+
).toMatchObject({ outline })
|
|
376
|
+
const videos = await artifacts.list({ projectId, kind: "video", limit: 10 })
|
|
377
|
+
expect(videos.artifacts.map((artifact) => artifact.id)).toEqual(["art_film"])
|
|
378
|
+
|
|
379
|
+
const anchor = {
|
|
380
|
+
scene: "demo",
|
|
381
|
+
offset: 500,
|
|
382
|
+
point: { x: 0.5, y: 0.25 },
|
|
383
|
+
revision: 1,
|
|
384
|
+
}
|
|
385
|
+
const comment = await artifacts.createComment({
|
|
386
|
+
projectId,
|
|
387
|
+
artifactId: "art_film",
|
|
388
|
+
id: "cmt_film",
|
|
389
|
+
anchor,
|
|
390
|
+
body: "Hold this shot",
|
|
391
|
+
author: otherOwner,
|
|
392
|
+
createdAt: at(1),
|
|
393
|
+
})
|
|
394
|
+
expect(comment.anchor).toEqual(anchor)
|
|
395
|
+
expect(
|
|
396
|
+
(await artifacts.listComments({ projectId, id: "art_film" })).map((each) => each.anchor)
|
|
397
|
+
).toEqual([anchor])
|
|
398
|
+
})
|
|
399
|
+
})
|
|
400
|
+
|
|
339
401
|
test("lists the latest versions that refer to an artifact, at any version, file, or part", async () => {
|
|
340
402
|
await withStorage(async (artifacts) => {
|
|
341
403
|
const refer = (address: string) => ({
|
|
@@ -988,6 +1050,43 @@ export function runArtifactStorageContractSuite<TStorage extends ArtifactStorage
|
|
|
988
1050
|
})
|
|
989
1051
|
})
|
|
990
1052
|
|
|
1053
|
+
// Regression proof: drop the reader's condition from a provider's listThreadIds; the other
|
|
1054
|
+
// owner's conversation is then listed to the owner too.
|
|
1055
|
+
test("lists to a reader only the conversations they own or take part in", async () => {
|
|
1056
|
+
await withStorage(async (artifacts, storage) => {
|
|
1057
|
+
// Shared in thr_1 by its creation, then in thr_2 and thr_3.
|
|
1058
|
+
await artifacts.create(createInput({ id: "art_mine" }))
|
|
1059
|
+
for (const threadId of ["thr_2", "thr_3"]) {
|
|
1060
|
+
await artifacts.publish(
|
|
1061
|
+
publishInput({ origin: { threadId, runId: `run_${threadId}` } }, "art_mine")
|
|
1062
|
+
)
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
// thr_1 is the owner's; thr_2 and thr_3 the other's, who added the owner to thr_2.
|
|
1066
|
+
for (const [id, ownerPrincipal] of [
|
|
1067
|
+
["thr_1", owner],
|
|
1068
|
+
["thr_2", otherOwner],
|
|
1069
|
+
["thr_3", otherOwner],
|
|
1070
|
+
] as const) {
|
|
1071
|
+
await storage.agents.threads.create({ projectId, id, ownerPrincipal })
|
|
1072
|
+
}
|
|
1073
|
+
await storage.agents.threads.addParticipants({
|
|
1074
|
+
projectId,
|
|
1075
|
+
threadId: "thr_2",
|
|
1076
|
+
principals: [{ type: "user", id: owner.id }],
|
|
1077
|
+
addedBy: otherOwner,
|
|
1078
|
+
maxParticipants: 10,
|
|
1079
|
+
})
|
|
1080
|
+
|
|
1081
|
+
const listed = (reader?: Principal) =>
|
|
1082
|
+
artifacts.listThreadIds({ projectId, id: "art_mine", ...(reader ? { reader } : {}) })
|
|
1083
|
+
expect(await listed()).toEqual(["thr_1", "thr_2", "thr_3"])
|
|
1084
|
+
expect(await listed(owner)).toEqual(["thr_1", "thr_2"])
|
|
1085
|
+
expect(await listed(otherOwner)).toEqual(["thr_2", "thr_3"])
|
|
1086
|
+
expect(await listed({ type: "user", id: "usr_nobody" })).toEqual([])
|
|
1087
|
+
})
|
|
1088
|
+
})
|
|
1089
|
+
|
|
991
1090
|
test("gives a copied version the outline the copy asks for, and the source keeps its own", async () => {
|
|
992
1091
|
await withStorage(async (artifacts) => {
|
|
993
1092
|
await artifacts.create(createInput())
|
|
@@ -1859,6 +1958,16 @@ export function runArtifactStorageContractSuite<TStorage extends ArtifactStorage
|
|
|
1859
1958
|
})
|
|
1860
1959
|
})
|
|
1861
1960
|
|
|
1961
|
+
// A process's first query may ask for one board: Postgres refused one key sent through
|
|
1962
|
+
// postgres.js's `sql.array` before the client had read the server's array types.
|
|
1963
|
+
test("reads one board's pictures first", async () => {
|
|
1964
|
+
await withStorage(async (artifacts) => {
|
|
1965
|
+
expect(
|
|
1966
|
+
await artifacts.listBoardPreviews({ projectId, renderKeys: ["a".repeat(64)] })
|
|
1967
|
+
).toEqual([])
|
|
1968
|
+
})
|
|
1969
|
+
})
|
|
1970
|
+
|
|
1862
1971
|
test("keeps a PDF by render key, the first one kept staying", async () => {
|
|
1863
1972
|
await withStorage(async (artifacts) => {
|
|
1864
1973
|
const renderKey = "c".repeat(64)
|
|
@@ -1918,6 +2027,208 @@ export function runArtifactStorageContractSuite<TStorage extends ArtifactStorage
|
|
|
1918
2027
|
})
|
|
1919
2028
|
})
|
|
1920
2029
|
|
|
2030
|
+
test("keeps what a video renders to by key, the first file kept staying", async () => {
|
|
2031
|
+
await withStorage(async (artifacts) => {
|
|
2032
|
+
const [segment, sound, other] = ["f", "a", "b"].map((each) => each.repeat(64)) as [
|
|
2033
|
+
string,
|
|
2034
|
+
string,
|
|
2035
|
+
string,
|
|
2036
|
+
]
|
|
2037
|
+
const render = (key: string, seed: string, createdAt = t0) => ({
|
|
2038
|
+
projectId,
|
|
2039
|
+
key,
|
|
2040
|
+
file: fileRef(seed, "video/mp4"),
|
|
2041
|
+
createdAt,
|
|
2042
|
+
})
|
|
2043
|
+
expect(await artifacts.listVideoRenders({ projectId, keys: [segment] })).toEqual([])
|
|
2044
|
+
|
|
2045
|
+
await artifacts.putVideoRender(render(segment, "1"))
|
|
2046
|
+
// A key names what it is made of: a second render of it is the same.
|
|
2047
|
+
await artifacts.putVideoRender(render(segment, "2", at(1)))
|
|
2048
|
+
await artifacts.putVideoRender(render(sound, "3"))
|
|
2049
|
+
|
|
2050
|
+
// By key, each once, whatever the order asked for.
|
|
2051
|
+
expect(
|
|
2052
|
+
await artifacts.listVideoRenders({ projectId, keys: [segment, other, sound, segment] })
|
|
2053
|
+
).toEqual([render(sound, "3"), render(segment, "1")])
|
|
2054
|
+
expect(await artifacts.listVideoRenders({ projectId, keys: [] })).toEqual([])
|
|
2055
|
+
expect(
|
|
2056
|
+
await artifacts.listVideoRenders({ projectId: otherProjectId, keys: [segment] })
|
|
2057
|
+
).toEqual([])
|
|
2058
|
+
|
|
2059
|
+
// A file kept stays: neither a failure nor clearing one replaces it.
|
|
2060
|
+
await artifacts.putVideoRender({
|
|
2061
|
+
projectId,
|
|
2062
|
+
key: segment,
|
|
2063
|
+
failure: "No browser.",
|
|
2064
|
+
createdAt: at(2),
|
|
2065
|
+
})
|
|
2066
|
+
await artifacts.clearVideoRenderFailures({ projectId, keys: [segment] })
|
|
2067
|
+
expect(await artifacts.listVideoRenders({ projectId, keys: [segment] })).toEqual([
|
|
2068
|
+
render(segment, "1"),
|
|
2069
|
+
])
|
|
2070
|
+
})
|
|
2071
|
+
})
|
|
2072
|
+
|
|
2073
|
+
test("keeps why a video could not render, until it renders or the failure is cleared", async () => {
|
|
2074
|
+
await withStorage(async (artifacts) => {
|
|
2075
|
+
const [key, kept] = ["c", "d"].map((each) => each.repeat(64)) as [string, string]
|
|
2076
|
+
const failure = (reason: string, createdAt = t0) => ({
|
|
2077
|
+
projectId,
|
|
2078
|
+
key,
|
|
2079
|
+
failure: reason,
|
|
2080
|
+
createdAt,
|
|
2081
|
+
})
|
|
2082
|
+
await artifacts.putVideoRender(failure("No browser."))
|
|
2083
|
+
await artifacts.putVideoRender(failure("Timed out.", at(1)))
|
|
2084
|
+
expect(await artifacts.listVideoRenders({ projectId, keys: [key] })).toEqual([
|
|
2085
|
+
failure("No browser."),
|
|
2086
|
+
])
|
|
2087
|
+
await artifacts.clearVideoRenderFailures({ projectId: otherProjectId, keys: [key] })
|
|
2088
|
+
expect(await artifacts.listVideoRenders({ projectId, keys: [key] })).toHaveLength(1)
|
|
2089
|
+
|
|
2090
|
+
// Clearing forgets failures alone, of every key asked for.
|
|
2091
|
+
const ready = { projectId, key: kept, file: fileRef("1", "video/mp4"), createdAt: t0 }
|
|
2092
|
+
await artifacts.putVideoRender(ready)
|
|
2093
|
+
await artifacts.clearVideoRenderFailures({ projectId, keys: [key, kept] })
|
|
2094
|
+
expect(await artifacts.listVideoRenders({ projectId, keys: [key, kept] })).toEqual([ready])
|
|
2095
|
+
|
|
2096
|
+
// What the project lacks is kept with why.
|
|
2097
|
+
const lacking = { ...failure("No HyperFrames."), lacks: "sandbox_tools" as const }
|
|
2098
|
+
await artifacts.putVideoRender(lacking)
|
|
2099
|
+
expect(await artifacts.listVideoRenders({ projectId, keys: [key] })).toEqual([lacking])
|
|
2100
|
+
|
|
2101
|
+
// A render made after all replaces the failure, and what was lacking with it.
|
|
2102
|
+
const rendered = { projectId, key, file: fileRef("2", "video/mp4"), createdAt: at(2) }
|
|
2103
|
+
await artifacts.putVideoRender(rendered)
|
|
2104
|
+
expect(await artifacts.listVideoRenders({ projectId, keys: [key] })).toEqual([rendered])
|
|
2105
|
+
})
|
|
2106
|
+
})
|
|
2107
|
+
|
|
2108
|
+
test("keeps that a video's export was asked for, the first ask staying", async () => {
|
|
2109
|
+
await withStorage(async (artifacts) => {
|
|
2110
|
+
const [key, other] = ["e", "9"].map((each) => each.repeat(64)) as [string, string]
|
|
2111
|
+
expect(await artifacts.getVideoExportAsk({ projectId, key })).toBeNull()
|
|
2112
|
+
|
|
2113
|
+
await artifacts.putVideoExportAsk({ projectId, key, askedAt: t0 })
|
|
2114
|
+
await artifacts.putVideoExportAsk({ projectId, key, askedAt: at(1) })
|
|
2115
|
+
expect(await artifacts.getVideoExportAsk({ projectId, key })).toEqual({
|
|
2116
|
+
projectId,
|
|
2117
|
+
key,
|
|
2118
|
+
askedAt: t0,
|
|
2119
|
+
})
|
|
2120
|
+
expect(await artifacts.getVideoExportAsk({ projectId, key: other })).toBeNull()
|
|
2121
|
+
expect(await artifacts.getVideoExportAsk({ projectId: otherProjectId, key })).toBeNull()
|
|
2122
|
+
})
|
|
2123
|
+
})
|
|
2124
|
+
|
|
2125
|
+
test("keeps what is derived of a media by digest, each part as it was put", async () => {
|
|
2126
|
+
await withStorage(async (artifacts) => {
|
|
2127
|
+
const clip = fileRef("a", "video/mp4").digest
|
|
2128
|
+
const song = fileRef("b", "audio/mpeg").digest
|
|
2129
|
+
const derived = {
|
|
2130
|
+
projectId,
|
|
2131
|
+
digest: clip,
|
|
2132
|
+
parts: {
|
|
2133
|
+
probe: {
|
|
2134
|
+
status: "ready" as const,
|
|
2135
|
+
durationMs: 12_480,
|
|
2136
|
+
container: "mov,mp4,m4a,3gp,3g2,mj2",
|
|
2137
|
+
bitRate: 2_400_000,
|
|
2138
|
+
faststart: false,
|
|
2139
|
+
video: { codec: "hevc", width: 1080, height: 1920, rotation: 90, fps: 29.97 },
|
|
2140
|
+
audio: { codec: "aac", sampleRate: 48_000, channels: 2 },
|
|
2141
|
+
},
|
|
2142
|
+
proxy: { status: "ready" as const, file: fileRef("1", "video/mp4") },
|
|
2143
|
+
poster: { status: "ready" as const, file: fileRef("2", "image/jpeg"), atMs: 1_000 },
|
|
2144
|
+
filmstrip: {
|
|
2145
|
+
status: "ready" as const,
|
|
2146
|
+
file: fileRef("3", "image/jpeg"),
|
|
2147
|
+
intervalMs: 1_000,
|
|
2148
|
+
count: 13,
|
|
2149
|
+
columns: 10,
|
|
2150
|
+
width: 50,
|
|
2151
|
+
height: 90,
|
|
2152
|
+
},
|
|
2153
|
+
waveform: { status: "failed" as const, reason: "FFmpeg stopped." },
|
|
2154
|
+
cuts: { status: "ready" as const, atMs: [4_200, 9_960] },
|
|
2155
|
+
transcript: { status: "pending" as const },
|
|
2156
|
+
},
|
|
2157
|
+
attempts: 1,
|
|
2158
|
+
updatedAt: t0,
|
|
2159
|
+
}
|
|
2160
|
+
const sound = {
|
|
2161
|
+
...derived,
|
|
2162
|
+
digest: song,
|
|
2163
|
+
parts: {
|
|
2164
|
+
...derived.parts,
|
|
2165
|
+
poster: { status: "unavailable" as const, reason: "It has no picture." },
|
|
2166
|
+
transcript: {
|
|
2167
|
+
status: "ready" as const,
|
|
2168
|
+
file: fileRef("4", "application/json"),
|
|
2169
|
+
language: "en",
|
|
2170
|
+
},
|
|
2171
|
+
},
|
|
2172
|
+
}
|
|
2173
|
+
expect(await artifacts.listMedia({ projectId, digests: [clip] })).toEqual([])
|
|
2174
|
+
|
|
2175
|
+
await artifacts.putMedia(derived)
|
|
2176
|
+
await artifacts.putMedia(sound)
|
|
2177
|
+
expect(await artifacts.listMedia({ projectId, digests: [song, clip, clip] })).toEqual([
|
|
2178
|
+
derived,
|
|
2179
|
+
sound,
|
|
2180
|
+
])
|
|
2181
|
+
expect(await artifacts.listMedia({ projectId: otherProjectId, digests: [clip] })).toEqual(
|
|
2182
|
+
[]
|
|
2183
|
+
)
|
|
2184
|
+
expect(await artifacts.listMedia({ projectId, digests: [] })).toEqual([])
|
|
2185
|
+
|
|
2186
|
+
// The worker's next attempt replaces what the last kept; a retry counts from 0 again, and
|
|
2187
|
+
// a part the project lacked a tool for says so.
|
|
2188
|
+
const transcribed = {
|
|
2189
|
+
...derived,
|
|
2190
|
+
parts: {
|
|
2191
|
+
...derived.parts,
|
|
2192
|
+
filmstrip: {
|
|
2193
|
+
status: "unavailable" as const,
|
|
2194
|
+
reason: "No FFmpeg.",
|
|
2195
|
+
lacks: "sandbox_tools" as const,
|
|
2196
|
+
},
|
|
2197
|
+
transcript: sound.parts.transcript,
|
|
2198
|
+
},
|
|
2199
|
+
attempts: 0,
|
|
2200
|
+
updatedAt: at(1),
|
|
2201
|
+
}
|
|
2202
|
+
await artifacts.putMedia(transcribed)
|
|
2203
|
+
expect(await artifacts.listMedia({ projectId, digests: [clip] })).toEqual([transcribed])
|
|
2204
|
+
})
|
|
2205
|
+
})
|
|
2206
|
+
|
|
2207
|
+
test("keeps what is derived of a media when an artifact that held it is deleted", async () => {
|
|
2208
|
+
await withStorage(async (artifacts) => {
|
|
2209
|
+
await artifacts.create(createInput())
|
|
2210
|
+
const digest = fileRef("a", "video/mp4").digest
|
|
2211
|
+
await artifacts.putMedia({
|
|
2212
|
+
projectId,
|
|
2213
|
+
digest,
|
|
2214
|
+
parts: {
|
|
2215
|
+
probe: { status: "failed", reason: "It is not a media file." },
|
|
2216
|
+
proxy: { status: "pending" },
|
|
2217
|
+
poster: { status: "pending" },
|
|
2218
|
+
filmstrip: { status: "pending" },
|
|
2219
|
+
waveform: { status: "pending" },
|
|
2220
|
+
cuts: { status: "pending" },
|
|
2221
|
+
transcript: { status: "unavailable", reason: "No transcription model." },
|
|
2222
|
+
},
|
|
2223
|
+
attempts: 3,
|
|
2224
|
+
updatedAt: t0,
|
|
2225
|
+
})
|
|
2226
|
+
|
|
2227
|
+
expect(await artifacts.delete({ projectId, id: "art_report" })).toBe(true)
|
|
2228
|
+
expect(await artifacts.listMedia({ projectId, digests: [digest] })).toHaveLength(1)
|
|
2229
|
+
})
|
|
2230
|
+
})
|
|
2231
|
+
|
|
1921
2232
|
test("keeps a board's pictures when an artifact that showed it is deleted", async () => {
|
|
1922
2233
|
await withStorage(async (artifacts) => {
|
|
1923
2234
|
// Another version, of this artifact or a copy, may show the same board.
|
|
@@ -1983,6 +2294,21 @@ export function runArtifactStorageContractSuite<TStorage extends ArtifactStorage
|
|
|
1983
2294
|
value: "450",
|
|
1984
2295
|
updatedAt: at(1),
|
|
1985
2296
|
})
|
|
2297
|
+
await tx.artifacts.putMedia({
|
|
2298
|
+
projectId,
|
|
2299
|
+
digest: fileRef("a", "video/mp4").digest,
|
|
2300
|
+
parts: {
|
|
2301
|
+
probe: { status: "pending" },
|
|
2302
|
+
proxy: { status: "pending" },
|
|
2303
|
+
poster: { status: "pending" },
|
|
2304
|
+
filmstrip: { status: "pending" },
|
|
2305
|
+
waveform: { status: "pending" },
|
|
2306
|
+
cuts: { status: "pending" },
|
|
2307
|
+
transcript: { status: "pending" },
|
|
2308
|
+
},
|
|
2309
|
+
attempts: 1,
|
|
2310
|
+
updatedAt: at(1),
|
|
2311
|
+
})
|
|
1986
2312
|
expect((await tx.artifacts.get({ projectId, id: "art_report" }))?.revision).toBe(3)
|
|
1987
2313
|
throw rollback
|
|
1988
2314
|
})
|
|
@@ -1998,6 +2324,10 @@ export function runArtifactStorageContractSuite<TStorage extends ArtifactStorage
|
|
|
1998
2324
|
expect(
|
|
1999
2325
|
await artifacts.listBoardPreviews({ projectId, renderKeys: ["a".repeat(64)] })
|
|
2000
2326
|
).toEqual([])
|
|
2327
|
+
// To see this fail, leave media out of `InMemoryArtifactStorage.restore`.
|
|
2328
|
+
expect(
|
|
2329
|
+
await artifacts.listMedia({ projectId, digests: [fileRef("a", "video/mp4").digest] })
|
|
2330
|
+
).toEqual([])
|
|
2001
2331
|
// To see this fail, leave state out of `InMemoryArtifactStorage.restore`.
|
|
2002
2332
|
expect(
|
|
2003
2333
|
await artifacts.listState({ projectId, artifactId: "art_report", principal: owner })
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, expect, setSystemTime, test } from "bun:test"
|
|
2
|
+
import type { KernelOperation } from "../execution/types"
|
|
2
3
|
import type { AuthStorage } from "../storage/auth"
|
|
3
4
|
import type {
|
|
4
5
|
CreateExecutionInput,
|
|
@@ -114,6 +115,11 @@ export function runExecutionStorageContractSuite<TStorage extends ExecutionStora
|
|
|
114
115
|
...trustedPrimitiveKinds.map((kind) => trustedPrimitive(`${kind}-execution`, {}, kind)),
|
|
115
116
|
agentExecution("agent-execution"),
|
|
116
117
|
kernelExecution("kernel-execution"),
|
|
118
|
+
// Reproduce by leaving `artifacts.transcribeMedia` out of a provider's migration.
|
|
119
|
+
kernelExecution("media-execution", {
|
|
120
|
+
type: "artifacts.transcribeMedia",
|
|
121
|
+
digest: `sha256:${"a".repeat(64)}`,
|
|
122
|
+
}),
|
|
117
123
|
scriptExecution("script-execution"),
|
|
118
124
|
] as const
|
|
119
125
|
|
|
@@ -785,8 +791,10 @@ function scriptExecution(id: string): CreateExecutionInput {
|
|
|
785
791
|
}
|
|
786
792
|
}
|
|
787
793
|
|
|
788
|
-
function kernelExecution(
|
|
789
|
-
|
|
794
|
+
function kernelExecution(
|
|
795
|
+
id: string,
|
|
796
|
+
operation: KernelOperation = { type: "ontology.recover", recoveryId: `recovery-${id}` }
|
|
797
|
+
): CreateExecutionInput {
|
|
790
798
|
return {
|
|
791
799
|
id,
|
|
792
800
|
projectId,
|
|
@@ -183,6 +183,33 @@ export function runLakeStorageContractSuite<TStorage extends LakeStorage>(
|
|
|
183
183
|
})
|
|
184
184
|
})
|
|
185
185
|
|
|
186
|
+
test("persists compatible metadata updates", async () => {
|
|
187
|
+
await withStorage(async (storage) => {
|
|
188
|
+
const initialDataset = defineDataset("contract.definitions.metadata_update", {
|
|
189
|
+
schema: [col("orderId", "string"), col("orderDate", "date")],
|
|
190
|
+
description: "Initial description",
|
|
191
|
+
})
|
|
192
|
+
const updatedDataset = defineDataset("contract.definitions.metadata_update", {
|
|
193
|
+
schema: [col("orderId", "string"), col("orderDate", "date")],
|
|
194
|
+
description: "Updated description",
|
|
195
|
+
})
|
|
196
|
+
const omittedDataset = defineDataset("contract.definitions.metadata_update", {
|
|
197
|
+
schema: [col("orderId", "string"), col("orderDate", "date")],
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
await storage.createDataset(initialDataset)
|
|
201
|
+
await storage.assertDatasetDefinitionsCompatible([updatedDataset])
|
|
202
|
+
|
|
203
|
+
expect(await storage.getDataset(initialDataset.id)).toEqual(initialDataset)
|
|
204
|
+
await expect(storage.createDataset(updatedDataset)).resolves.toEqual(updatedDataset)
|
|
205
|
+
expect(await storage.getDataset(initialDataset.id)).toEqual(updatedDataset)
|
|
206
|
+
|
|
207
|
+
await storage.assertDatasetDefinitionsCompatible([omittedDataset])
|
|
208
|
+
await expect(storage.createDataset(omittedDataset)).resolves.toEqual(updatedDataset)
|
|
209
|
+
expect(await storage.getDataset(initialDataset.id)).toEqual(updatedDataset)
|
|
210
|
+
})
|
|
211
|
+
})
|
|
212
|
+
|
|
186
213
|
test("rejects incompatible definition changes without mutating the stored definition", async () => {
|
|
187
214
|
await withStorage(async (storage) => {
|
|
188
215
|
const changedDataset = defineDataset(definitionDataset.id, {
|