@sixb/core 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.js +52 -49
- 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.js +57 -54
- 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/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/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/index.js +61 -58
- 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-m1cwncee.js → chunk-2mxq1yd9.js} +45 -40
- package/dist/{chunk-m1cwncee.js.map → chunk-2mxq1yd9.js.map} +3 -3
- package/dist/{chunk-dmnd9ea6.js → chunk-30a0ftnm.js} +2 -2
- package/dist/chunk-389ybvw9.js.map +2 -2
- package/dist/{chunk-qbd282aa.js → chunk-39q9ybav.js} +2 -2
- package/dist/{chunk-06kpaqg4.js → chunk-3d9w8t4n.js} +110 -22
- package/dist/{chunk-06kpaqg4.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-fdk0ks9p.js → chunk-3x902cja.js} +3 -3
- package/dist/{chunk-c4nrycdy.js → chunk-4q4a5a96.js} +1 -1
- package/dist/{chunk-9cyq87qa.js → chunk-4tdm3fsj.js} +95 -32
- package/dist/{chunk-9cyq87qa.js.map → chunk-4tdm3fsj.js.map} +9 -9
- package/dist/{chunk-cpy282b8.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-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-pfdq1ga6.js → chunk-8eqqqc1h.js} +3 -3
- package/dist/{chunk-yyj009tv.js → chunk-8tefbhdx.js} +14 -14
- package/dist/{chunk-yyj009tv.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-phs5fbff.js → chunk-990a5bkc.js} +424 -76
- package/dist/chunk-990a5bkc.js.map +21 -0
- package/dist/{chunk-6md802cc.js → chunk-9az7kjv4.js} +6 -6
- package/dist/{chunk-95ps0k5q.js → chunk-9e5t53z0.js} +1 -1
- package/dist/{chunk-js9e6487.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-8qmp9fpa.js → chunk-as94vcty.js} +619 -482
- package/dist/{chunk-8qmp9fpa.js.map → chunk-as94vcty.js.map} +19 -19
- 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-hvq8xs66.js → chunk-jwjwvzj1.js} +797 -51
- package/dist/chunk-jwjwvzj1.js.map +38 -0
- package/dist/{chunk-k29rdc3h.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-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-fycac8e9.js → chunk-wpba6hhd.js} +10 -10
- package/dist/{chunk-fycac8e9.js.map → chunk-wpba6hhd.js.map} +1 -1
- package/dist/{chunk-t58sktr5.js → chunk-wrb1x1ss.js} +2 -2
- package/dist/{chunk-5sswe5ej.js → chunk-wsv23wvr.js} +2 -2
- package/dist/{chunk-04r2fdsd.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-5pz3htbe.js → chunk-y57eawng.js} +3 -3
- package/dist/{chunk-8ncg20rd.js → chunk-yah25st6.js} +5 -5
- package/dist/chunk-yah25st6.js.map +10 -0
- package/dist/{chunk-mrs7jy17.js → chunk-ywvxcmqj.js} +106 -13
- package/dist/{chunk-mrs7jy17.js.map → chunk-ywvxcmqj.js.map} +8 -7
- package/dist/{chunk-44hrfmbk.js → chunk-zmq9xc9s.js} +70 -31
- package/dist/{chunk-44hrfmbk.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/errors/catalog.d.ts.map +1 -1
- package/dist/execution/agent.js +52 -49
- 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 +52 -49
- package/dist/execution/primitive.js.map +1 -1
- package/dist/execution/request.js +53 -50
- 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 +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +69 -65
- 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 +52 -49
- 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/host.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/sixb.d.ts.map +1 -1
- package/dist/sandboxes/index.js +6 -6
- 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.js +4 -4
- package/dist/storage/agents/types.d.ts +13 -0
- 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 +24 -22
- 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 +619 -72
- package/dist/testing/index.js.map +9 -9
- package/dist/testing/lake-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-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 +58 -55
- 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/model-call-retry.ts +69 -0
- package/src/agents/model-loop.ts +86 -12
- 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/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/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 +18 -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/host.ts +3 -0
- package/src/runtime/internal.ts +3 -1
- package/src/runtime/sixb.ts +12 -4
- package/src/sandboxes/README.md +3 -2
- 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/types.ts +14 -0
- 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 +108 -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 +320 -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/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-gfdh9kqa.js.map +0 -11
- package/dist/chunk-hvq8xs66.js.map +0 -34
- package/dist/chunk-k29rdc3h.js.map +0 -10
- package/dist/chunk-mbwsgjn7.js.map +0 -11
- package/dist/chunk-phs5fbff.js.map +0 -19
- 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-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-fdk0ks9p.js.map → chunk-3x902cja.js.map} +0 -0
- /package/dist/{chunk-c4nrycdy.js.map → chunk-4q4a5a96.js.map} +0 -0
- /package/dist/{chunk-cpy282b8.js.map → chunk-4w8qzy9w.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-pfdq1ga6.js.map → chunk-8eqqqc1h.js.map} +0 -0
- /package/dist/{chunk-jka26v8c.js.map → chunk-8x1bsp68.js.map} +0 -0
- /package/dist/{chunk-6md802cc.js.map → chunk-9az7kjv4.js.map} +0 -0
- /package/dist/{chunk-95ps0k5q.js.map → chunk-9e5t53z0.js.map} +0 -0
- /package/dist/{chunk-js9e6487.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-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-t58sktr5.js.map → chunk-wrb1x1ss.js.map} +0 -0
- /package/dist/{chunk-5sswe5ej.js.map → chunk-wsv23wvr.js.map} +0 -0
- /package/dist/{chunk-04r2fdsd.js.map → chunk-x0hqc54n.js.map} +0 -0
- /package/dist/{chunk-3neam1y5.js.map → chunk-y3qb965a.js.map} +0 -0
- /package/dist/{chunk-5pz3htbe.js.map → chunk-y57eawng.js.map} +0 -0
|
@@ -5,29 +5,31 @@ import {
|
|
|
5
5
|
isAllowed2,
|
|
6
6
|
assertAuthorized2,
|
|
7
7
|
isRuntimeAllowed2,
|
|
8
|
+
assertModelAccess2,
|
|
8
9
|
canViewActionRun2,
|
|
9
10
|
canViewWorkflowRun2
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-e3b1r4d2.js";
|
|
12
|
+
import {
|
|
13
|
+
unaliasMediaType,
|
|
14
|
+
isFileRef2
|
|
15
|
+
} from "./chunk-2138b0ng.js";
|
|
16
|
+
import {
|
|
17
|
+
TranscriptionModelResponseError2,
|
|
18
|
+
SpeechModelResponseError2,
|
|
19
|
+
assertTranscriptionModel,
|
|
20
|
+
assertSpeechModel,
|
|
21
|
+
estimateModelCall
|
|
22
|
+
} from "./chunk-jbg905hn.js";
|
|
11
23
|
import {
|
|
12
24
|
ACTIVITY_MIN_IDLE_TIMEOUT_MS,
|
|
13
25
|
ACTIVITY_MAX_VISIT_MS2
|
|
14
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-1g4me5f2.js";
|
|
15
27
|
import {
|
|
16
28
|
objectBatchKey2
|
|
17
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3d9w8t4n.js";
|
|
18
30
|
import {
|
|
19
31
|
readerClearance
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import {
|
|
22
|
-
requireAccountingCapabilities,
|
|
23
|
-
createAiModelCallLimitController2,
|
|
24
|
-
AiModelCallRecorder2,
|
|
25
|
-
enqueueAiModelCallRecovery2
|
|
26
|
-
} from "./chunk-mrs7jy17.js";
|
|
27
|
-
import {
|
|
28
|
-
executionRecordInputFromRuntime,
|
|
29
|
-
ensureExecutionRecord2
|
|
30
|
-
} from "./chunk-xavet0qs.js";
|
|
32
|
+
} from "./chunk-9az7kjv4.js";
|
|
31
33
|
import {
|
|
32
34
|
findPrimitiveParentRequestExecution
|
|
33
35
|
} from "./chunk-ey1nk510.js";
|
|
@@ -622,72 +624,418 @@ async function mapInChunks(items, size, map) {
|
|
|
622
624
|
return results;
|
|
623
625
|
}
|
|
624
626
|
|
|
625
|
-
// src/models/
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
627
|
+
// src/models/audio/runtime.ts
|
|
628
|
+
import { randomUUID as randomUUID2 } from "crypto";
|
|
629
|
+
|
|
630
|
+
// src/models/input-file.ts
|
|
631
|
+
import { createHash } from "crypto";
|
|
632
|
+
function prepareModelInputFile(input, type) {
|
|
633
|
+
if (!isFileRef2(input) || !Number.isSafeInteger(input.sizeBytes) || input.sizeBytes <= 0) {
|
|
634
|
+
throw new TypeError(`[SixbModels] ${capitalize(type)} input must be a nonempty FileRef.`);
|
|
635
|
+
}
|
|
636
|
+
const file = { ...input };
|
|
637
|
+
const mediaType = modelInputMediaType(file.mediaType, type);
|
|
638
|
+
if (!mediaType) {
|
|
639
|
+
throw new TypeError(`[SixbModels] ${capitalize(type)} FileRef must declare an ${type} mediaType.`);
|
|
640
|
+
}
|
|
641
|
+
return { file, mediaType };
|
|
642
|
+
}
|
|
643
|
+
function prepareModelInputBytes(input, type) {
|
|
644
|
+
if (!(input.data instanceof Uint8Array) || input.data.byteLength === 0) {
|
|
645
|
+
throw new TypeError(`[SixbModels] ${capitalize(type)} data must be a nonempty Uint8Array.`);
|
|
646
|
+
}
|
|
647
|
+
const mediaType = modelInputMediaType(input.mediaType, type);
|
|
648
|
+
if (!mediaType) {
|
|
649
|
+
throw new TypeError(`[SixbModels] ${capitalize(type)} data must declare an ${type} mediaType.`);
|
|
650
|
+
}
|
|
651
|
+
return { bytes: input.data.slice(), mediaType };
|
|
652
|
+
}
|
|
653
|
+
function modelInputMediaType(value, type) {
|
|
654
|
+
if (typeof value !== "string")
|
|
655
|
+
return;
|
|
656
|
+
const essence = value.split(";", 1)[0]?.trim().toLowerCase();
|
|
657
|
+
const mediaType = essence && unaliasMediaType(essence);
|
|
658
|
+
return mediaType && new RegExp(`^${type}/[a-z0-9.+-]+$`).test(mediaType) ? mediaType : undefined;
|
|
659
|
+
}
|
|
660
|
+
function capitalize(type) {
|
|
661
|
+
return type === "audio" ? "Audio" : "Image";
|
|
662
|
+
}
|
|
663
|
+
async function readModelInputFile(storage, file, signal) {
|
|
664
|
+
const info = await storage.stat(file.blobId);
|
|
665
|
+
signal.throwIfAborted();
|
|
666
|
+
if (!info || info.blobId !== file.blobId || info.digest !== file.digest || info.sizeBytes !== file.sizeBytes) {
|
|
667
|
+
throw new Error("[SixbModels] File reference does not match the stored file.");
|
|
668
|
+
}
|
|
669
|
+
const stream = await storage.open(file.blobId);
|
|
670
|
+
const reader = stream.getReader();
|
|
671
|
+
const cancel = () => {
|
|
672
|
+
reader.cancel(signal.reason).catch(() => {
|
|
673
|
+
return;
|
|
674
|
+
});
|
|
675
|
+
};
|
|
676
|
+
signal.addEventListener("abort", cancel, { once: true });
|
|
677
|
+
let complete = false;
|
|
678
|
+
try {
|
|
679
|
+
signal.throwIfAborted();
|
|
680
|
+
const bytes = new Uint8Array(file.sizeBytes);
|
|
681
|
+
const hash = createHash("sha256");
|
|
682
|
+
let offset = 0;
|
|
683
|
+
while (true) {
|
|
684
|
+
const { value, done } = await reader.read();
|
|
685
|
+
signal.throwIfAborted();
|
|
686
|
+
if (done)
|
|
687
|
+
break;
|
|
688
|
+
if (!(value instanceof Uint8Array) || value.byteLength > bytes.byteLength - offset) {
|
|
689
|
+
throw new Error("[SixbModels] File stream exceeds its declared size.");
|
|
690
|
+
}
|
|
691
|
+
bytes.set(value, offset);
|
|
692
|
+
hash.update(value);
|
|
693
|
+
offset += value.byteLength;
|
|
694
|
+
}
|
|
695
|
+
if (offset !== file.sizeBytes || `sha256:${hash.digest("hex")}` !== file.digest) {
|
|
696
|
+
throw new Error("[SixbModels] File stream does not match its content-addressed reference.");
|
|
697
|
+
}
|
|
698
|
+
complete = true;
|
|
699
|
+
return bytes;
|
|
700
|
+
} finally {
|
|
701
|
+
signal.removeEventListener("abort", cancel);
|
|
702
|
+
if (!complete) {
|
|
703
|
+
reader.cancel().catch(() => {
|
|
704
|
+
return;
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
reader.releaseLock();
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
// src/models/audio/speech.ts
|
|
712
|
+
import { randomUUID } from "crypto";
|
|
713
|
+
function createSpeak(runtime, execution, catalog, session, blobs) {
|
|
714
|
+
return async (input) => {
|
|
715
|
+
assertModelAccess2(runtime, execution, "models.audio.speak");
|
|
716
|
+
const prepared = prepareRequest(input);
|
|
717
|
+
if (!blobs) {
|
|
718
|
+
throw new Error("[SixbModels] Speech generation requires blob storage.");
|
|
719
|
+
}
|
|
720
|
+
const signal = session.signal(input.signal);
|
|
721
|
+
signal.throwIfAborted();
|
|
722
|
+
const binding = selectModel(catalog, input.model);
|
|
723
|
+
assertSpeechModel(binding);
|
|
724
|
+
assertRequestSupport(binding, withVoice(binding, prepared));
|
|
725
|
+
const accounting = await session.accounting();
|
|
726
|
+
accounting.assertHealthy();
|
|
727
|
+
const model = binding.resolve ? await binding.resolve() : binding;
|
|
728
|
+
assertSpeechModel(model);
|
|
729
|
+
if (model.providerId !== binding.providerId || model.modelId !== binding.modelId) {
|
|
730
|
+
throw new TypeError("[SixbModels] Resolved speech model identity does not match the selected model.");
|
|
731
|
+
}
|
|
732
|
+
const request = withVoice(model, prepared);
|
|
733
|
+
assertRequestSupport(model, request);
|
|
734
|
+
signal.throwIfAborted();
|
|
735
|
+
const callId = `call_${randomUUID()}`;
|
|
736
|
+
await accounting.admitCall({
|
|
737
|
+
callId,
|
|
738
|
+
providerId: model.providerId,
|
|
739
|
+
modelId: model.modelId,
|
|
740
|
+
modelKind: "speech",
|
|
741
|
+
inputTokens: {
|
|
742
|
+
status: "estimated",
|
|
743
|
+
tokens: Math.ceil(new TextEncoder().encode(request.text).byteLength / 4),
|
|
744
|
+
method: "utf8BytesDividedByFour"
|
|
745
|
+
},
|
|
746
|
+
outputTokenAllowance: 0,
|
|
747
|
+
reservationCost: estimateReservationCost(model, {
|
|
748
|
+
text: request.text,
|
|
749
|
+
...request.voice === undefined ? {} : { voice: request.voice },
|
|
750
|
+
...request.instructions === undefined ? {} : { instructions: request.instructions }
|
|
751
|
+
})
|
|
752
|
+
});
|
|
753
|
+
let result;
|
|
754
|
+
try {
|
|
755
|
+
signal.throwIfAborted();
|
|
756
|
+
result = await model.speak({ ...request, signal });
|
|
757
|
+
} catch (error) {
|
|
758
|
+
await recordSpeech(accounting, model, callId, error instanceof SpeechModelResponseError2 ? error.metadata : {});
|
|
759
|
+
throw error;
|
|
760
|
+
}
|
|
761
|
+
const event = await recordSpeech(accounting, model, callId, result ?? {});
|
|
762
|
+
signal.throwIfAborted();
|
|
763
|
+
const audio = result?.output?.audio;
|
|
764
|
+
if (!(audio?.data instanceof Uint8Array) || audio.data.byteLength === 0 || typeof audio.mediaType !== "string" || !/^audio\/[a-z0-9.+-]+$/.test(audio.mediaType) || request.mediaType !== undefined && audio.mediaType !== request.mediaType || !isWarnings(result.warnings)) {
|
|
765
|
+
throw new SpeechModelResponseError2("[SixbModels] Invalid speech response.", model.providerId, model.modelId, result ?? {});
|
|
659
766
|
}
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
767
|
+
const file = await blobs.put({
|
|
768
|
+
body: audio.data,
|
|
769
|
+
expectedSizeBytes: audio.data.byteLength,
|
|
770
|
+
mediaType: audio.mediaType,
|
|
771
|
+
signal
|
|
772
|
+
});
|
|
773
|
+
await accounting.recordFiles(callId, [file]);
|
|
774
|
+
return {
|
|
775
|
+
file,
|
|
776
|
+
warnings: [...result.warnings ?? []],
|
|
777
|
+
usage: event.usage,
|
|
778
|
+
cost: event.cost,
|
|
779
|
+
callId
|
|
669
780
|
};
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
function prepareRequest(input) {
|
|
784
|
+
if (typeof input?.text !== "string" || !input.text.trim()) {
|
|
785
|
+
throw new TypeError("[SixbModels] Speech generation requires nonblank text.");
|
|
786
|
+
}
|
|
787
|
+
for (const field of ["voice", "instructions", "language"]) {
|
|
788
|
+
const value = input[field];
|
|
789
|
+
if (value !== undefined && (typeof value !== "string" || !value.trim())) {
|
|
790
|
+
throw new TypeError(`[SixbModels] Speech ${field} must be a nonblank string.`);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
const mediaType = input.mediaType?.split(";", 1)[0]?.trim().toLowerCase();
|
|
794
|
+
if (input.mediaType !== undefined && !/^audio\/[a-z0-9.+-]+$/.test(mediaType ?? "")) {
|
|
795
|
+
throw new TypeError("[SixbModels] Speech mediaType must be an audio media type.");
|
|
796
|
+
}
|
|
797
|
+
if (input.speed !== undefined && (typeof input.speed !== "number" || !Number.isFinite(input.speed) || input.speed <= 0)) {
|
|
798
|
+
throw new TypeError("[SixbModels] Speech speed must be a positive number.");
|
|
799
|
+
}
|
|
800
|
+
return {
|
|
801
|
+
text: input.text,
|
|
802
|
+
...input.voice === undefined ? {} : { voice: input.voice },
|
|
803
|
+
...input.instructions === undefined ? {} : { instructions: input.instructions },
|
|
804
|
+
...mediaType === undefined ? {} : { mediaType },
|
|
805
|
+
...input.speed === undefined ? {} : { speed: input.speed },
|
|
806
|
+
...input.language === undefined ? {} : { language: input.language }
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
function withVoice(model, request) {
|
|
810
|
+
const voice = request.voice ?? model.defaultVoice;
|
|
811
|
+
return voice === undefined ? request : { ...request, voice };
|
|
812
|
+
}
|
|
813
|
+
function selectModel(catalog, requested) {
|
|
814
|
+
const selected = requested ?? catalog?.audio?.speech?.default.model;
|
|
815
|
+
if (!selected) {
|
|
816
|
+
throw new Error("[SixbModels] Configure models.audio.speech in createSixb() or supply a model to speak().");
|
|
817
|
+
}
|
|
818
|
+
return selected;
|
|
819
|
+
}
|
|
820
|
+
function assertRequestSupport(model, request) {
|
|
821
|
+
const definition = model.definition;
|
|
822
|
+
if (definition.maxInputCharacters !== undefined && request.text.length > definition.maxInputCharacters) {
|
|
823
|
+
throw new RangeError(`[SixbModels] Text exceeds the model's ${definition.maxInputCharacters}-character input limit.`);
|
|
824
|
+
}
|
|
825
|
+
if (request.voice !== undefined && definition.voices && !definition.voices.includes(request.voice)) {
|
|
826
|
+
throw new TypeError(`[SixbModels] Voice '${request.voice}' is not supported by the selected model. Use one of: ${definition.voices.join(", ")}.`);
|
|
827
|
+
}
|
|
828
|
+
if (request.mediaType !== undefined && definition.outputMediaTypes && !definition.outputMediaTypes.includes(request.mediaType)) {
|
|
829
|
+
throw new TypeError(`[SixbModels] Speech media type '${request.mediaType}' is not supported by the selected model. Use one of: ${definition.outputMediaTypes.join(", ")}.`);
|
|
830
|
+
}
|
|
831
|
+
if (request.instructions !== undefined && definition.instructions === false) {
|
|
832
|
+
throw new TypeError("[SixbModels] The selected model does not take speech instructions.");
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
function estimateReservationCost(model, input) {
|
|
836
|
+
try {
|
|
837
|
+
return model.costEstimator?.estimateReservation?.(input);
|
|
838
|
+
} catch {
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
async function recordSpeech(accounting, model, callId, metadata) {
|
|
843
|
+
const usage = metadata.usage ?? {};
|
|
844
|
+
const estimate = estimateModelCall(model, {
|
|
845
|
+
usage,
|
|
846
|
+
route: metadata.route,
|
|
847
|
+
responseModelId: metadata.responseModelId,
|
|
848
|
+
...metadata.pricingDimensions === undefined ? {} : { dimensions: metadata.pricingDimensions }
|
|
849
|
+
});
|
|
850
|
+
const event = {
|
|
851
|
+
callId,
|
|
852
|
+
modelKind: "speech",
|
|
853
|
+
providerId: model.providerId,
|
|
854
|
+
modelId: model.modelId,
|
|
855
|
+
responseId: metadata.providerIds?.responseId ?? callId,
|
|
856
|
+
providerIds: metadata.providerIds,
|
|
857
|
+
responseModelId: metadata.responseModelId,
|
|
858
|
+
usage,
|
|
859
|
+
cost: metadata.reportedCost ? { status: "reported", ...metadata.reportedCost } : estimate,
|
|
860
|
+
...metadata.reportedCost ? { estimate } : {},
|
|
861
|
+
route: metadata.route
|
|
862
|
+
};
|
|
863
|
+
await accounting.onModelCallEnd(event);
|
|
864
|
+
return event;
|
|
865
|
+
}
|
|
866
|
+
function isWarnings(value) {
|
|
867
|
+
return value === undefined || Array.isArray(value) && value.every((w) => typeof w === "string");
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
// src/models/audio/runtime.ts
|
|
871
|
+
function createAudioRuntime(runtime, execution, catalog, session, blobs) {
|
|
872
|
+
return {
|
|
873
|
+
speak: createSpeak(runtime, execution, catalog, session, blobs),
|
|
874
|
+
async transcribe(input) {
|
|
875
|
+
assertModelAccess2(runtime, execution, "models.audio.transcribe");
|
|
876
|
+
const { mediaType, sizeBytes, read } = prepareAudio(input.audio, blobs);
|
|
877
|
+
const signal = session.signal(input.signal);
|
|
878
|
+
signal.throwIfAborted();
|
|
879
|
+
const binding = selectModel2(catalog, input.model);
|
|
880
|
+
assertTranscriptionModel(binding);
|
|
881
|
+
assertFileSupport(binding, sizeBytes, mediaType);
|
|
882
|
+
const accounting = await session.accounting();
|
|
883
|
+
accounting.assertHealthy();
|
|
884
|
+
const model = binding.resolve ? await binding.resolve() : binding;
|
|
885
|
+
assertTranscriptionModel(model);
|
|
886
|
+
if (model.providerId !== binding.providerId || model.modelId !== binding.modelId) {
|
|
887
|
+
throw new TypeError("[SixbModels] Resolved transcription model identity does not match the selected model.");
|
|
888
|
+
}
|
|
889
|
+
assertFileSupport(model, sizeBytes, mediaType);
|
|
890
|
+
signal.throwIfAborted();
|
|
891
|
+
const bytes = await read(signal);
|
|
892
|
+
accounting.assertHealthy();
|
|
893
|
+
const reservationCost = estimateReservationCost2(model, bytes.byteLength, mediaType);
|
|
894
|
+
const callId = `call_${randomUUID2()}`;
|
|
895
|
+
await accounting.admitCall({
|
|
896
|
+
callId,
|
|
897
|
+
providerId: model.providerId,
|
|
898
|
+
modelId: model.modelId,
|
|
899
|
+
modelKind: "transcription",
|
|
900
|
+
inputTokens: { status: "unavailable", reason: "nonTextInput" },
|
|
901
|
+
outputTokenAllowance: 0,
|
|
902
|
+
reservationCost
|
|
903
|
+
});
|
|
904
|
+
let result;
|
|
905
|
+
try {
|
|
906
|
+
signal.throwIfAborted();
|
|
907
|
+
result = await model.transcribe({ audio: bytes, mediaType, signal });
|
|
908
|
+
} catch (error) {
|
|
909
|
+
await recordTranscription(accounting, model, callId, error instanceof TranscriptionModelResponseError2 ? error.metadata : {});
|
|
910
|
+
throw error;
|
|
911
|
+
}
|
|
912
|
+
const event = await recordTranscription(accounting, model, callId, result ?? {});
|
|
913
|
+
signal.throwIfAborted();
|
|
914
|
+
const output = transcriptOutput(result, model);
|
|
915
|
+
return { output, usage: event.usage, cost: event.cost, callId };
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
function transcriptOutput(result, model) {
|
|
920
|
+
const refuse = () => new TranscriptionModelResponseError2("[SixbModels] Invalid transcription response.", model.providerId, model.modelId, result ?? {});
|
|
921
|
+
const output = result?.output;
|
|
922
|
+
if (typeof output?.text !== "string")
|
|
923
|
+
throw refuse();
|
|
924
|
+
if (output.language !== undefined && (typeof output.language !== "string" || !output.language)) {
|
|
925
|
+
throw refuse();
|
|
926
|
+
}
|
|
927
|
+
const segments = transcriptSegments(output.segments);
|
|
928
|
+
if (segments === null)
|
|
929
|
+
throw refuse();
|
|
930
|
+
const described = {
|
|
931
|
+
text: output.text,
|
|
932
|
+
...segments.length ? { segments } : {},
|
|
933
|
+
...output.language ? { language: output.language } : {}
|
|
934
|
+
};
|
|
935
|
+
const words = output.words;
|
|
936
|
+
if (words === undefined)
|
|
937
|
+
return described;
|
|
938
|
+
if (!Array.isArray(words))
|
|
939
|
+
throw refuse();
|
|
940
|
+
const timed = [];
|
|
941
|
+
for (const word of words) {
|
|
942
|
+
const entry = word;
|
|
943
|
+
if (typeof entry?.text !== "string" || !entry.text || !isMillisecond(entry.startMs) || !isMillisecond(entry.endMs) || entry.endMs < entry.startMs || entry.speaker !== undefined && (typeof entry.speaker !== "string" || !entry.speaker)) {
|
|
944
|
+
throw refuse();
|
|
945
|
+
}
|
|
946
|
+
timed.push({
|
|
947
|
+
text: entry.text,
|
|
948
|
+
startMs: entry.startMs,
|
|
949
|
+
endMs: entry.endMs,
|
|
950
|
+
...entry.speaker === undefined ? {} : { speaker: entry.speaker }
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
return timed.length ? { ...described, words: timed } : described;
|
|
954
|
+
}
|
|
955
|
+
function transcriptSegments(segments) {
|
|
956
|
+
if (segments === undefined)
|
|
957
|
+
return [];
|
|
958
|
+
if (!Array.isArray(segments))
|
|
959
|
+
return null;
|
|
960
|
+
const timed = [];
|
|
961
|
+
for (const segment of segments) {
|
|
962
|
+
const entry = segment;
|
|
963
|
+
if (typeof entry?.text !== "string" || !isMillisecond(entry.startMs) || !isMillisecond(entry.endMs) || entry.endMs < entry.startMs || entry.speaker !== undefined && (typeof entry.speaker !== "string" || !entry.speaker)) {
|
|
964
|
+
return null;
|
|
965
|
+
}
|
|
966
|
+
timed.push({
|
|
967
|
+
text: entry.text,
|
|
968
|
+
startMs: entry.startMs,
|
|
969
|
+
endMs: entry.endMs,
|
|
970
|
+
...entry.speaker === undefined ? {} : { speaker: entry.speaker }
|
|
687
971
|
});
|
|
688
972
|
}
|
|
973
|
+
return timed;
|
|
974
|
+
}
|
|
975
|
+
function isMillisecond(value) {
|
|
976
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
977
|
+
}
|
|
978
|
+
function prepareAudio(input, blobs) {
|
|
979
|
+
if (typeof input === "object" && input !== null && "data" in input) {
|
|
980
|
+
const { bytes, mediaType } = prepareModelInputBytes(input, "audio");
|
|
981
|
+
return { mediaType, sizeBytes: bytes.byteLength, read: async () => bytes };
|
|
982
|
+
}
|
|
983
|
+
const { file, mediaType } = prepareModelInputFile(input, "audio");
|
|
984
|
+
if (!blobs) {
|
|
985
|
+
throw new Error("[SixbModels] Transcribing a stored file requires blob storage.");
|
|
986
|
+
}
|
|
987
|
+
return {
|
|
988
|
+
mediaType,
|
|
989
|
+
sizeBytes: file.sizeBytes,
|
|
990
|
+
read: (signal) => readModelInputFile(blobs, file, signal)
|
|
991
|
+
};
|
|
992
|
+
}
|
|
993
|
+
function selectModel2(catalog, requested) {
|
|
994
|
+
const selected = requested ?? catalog?.audio?.transcription?.default.model;
|
|
995
|
+
if (!selected) {
|
|
996
|
+
throw new Error("[SixbModels] Configure models.audio.transcription in createSixb() or supply a model to transcribe().");
|
|
997
|
+
}
|
|
998
|
+
return selected;
|
|
999
|
+
}
|
|
1000
|
+
function assertFileSupport(model, sizeBytes, mediaType) {
|
|
1001
|
+
if (sizeBytes > model.definition.maxInputBytes) {
|
|
1002
|
+
throw new RangeError(`[SixbModels] Audio exceeds the model's ${model.definition.maxInputBytes}-byte input limit.`);
|
|
1003
|
+
}
|
|
1004
|
+
if (model.definition.mediaTypes && !model.definition.mediaTypes.includes(mediaType)) {
|
|
1005
|
+
throw new TypeError(`[SixbModels] Audio media type '${mediaType}' is not supported by the selected model.`);
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
function estimateReservationCost2(model, sizeBytes, mediaType) {
|
|
1009
|
+
try {
|
|
1010
|
+
return model.costEstimator?.estimateReservation?.({ sizeBytes, mediaType });
|
|
1011
|
+
} catch {
|
|
1012
|
+
return;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
async function recordTranscription(accounting, model, callId, metadata) {
|
|
1016
|
+
const usage = metadata.usage ?? {};
|
|
1017
|
+
const estimate = estimateModelCall(model, {
|
|
1018
|
+
usage,
|
|
1019
|
+
route: metadata.route,
|
|
1020
|
+
responseModelId: metadata.responseModelId
|
|
1021
|
+
});
|
|
1022
|
+
const event = {
|
|
1023
|
+
callId,
|
|
1024
|
+
modelKind: "transcription",
|
|
1025
|
+
providerId: model.providerId,
|
|
1026
|
+
modelId: model.modelId,
|
|
1027
|
+
responseId: metadata.providerIds?.responseId ?? callId,
|
|
1028
|
+
providerIds: metadata.providerIds,
|
|
1029
|
+
responseModelId: metadata.responseModelId,
|
|
1030
|
+
usage,
|
|
1031
|
+
cost: metadata.reportedCost ? { status: "reported", ...metadata.reportedCost } : estimate,
|
|
1032
|
+
...metadata.reportedCost ? { estimate } : {},
|
|
1033
|
+
route: metadata.route
|
|
1034
|
+
};
|
|
1035
|
+
await accounting.onModelCallEnd(event);
|
|
1036
|
+
return event;
|
|
689
1037
|
}
|
|
690
1038
|
|
|
691
|
-
export { registerOntologyMutationRuntime2, getOntologyMutationRuntime2, shareOntologyMutationRuntime2, createOntologyMutationRuntime2, viewableActionRuns, readableSubjects, canReadActionRunSubject, unreadableActionRunTypes, canDelegationAccessActionRun, actionRunBelongsToShareGrant, decodeActivityConnectionsCursor, nearestOwner, resolveExecutionCosts, addCostSummaries, createActivityRuntime, createActivityCaptureRuntime, registerActivityCaptureRuntime, getActivityCaptureRuntime2,
|
|
1039
|
+
export { registerOntologyMutationRuntime2, getOntologyMutationRuntime2, shareOntologyMutationRuntime2, createOntologyMutationRuntime2, viewableActionRuns, readableSubjects, canReadActionRunSubject, unreadableActionRunTypes, canDelegationAccessActionRun, actionRunBelongsToShareGrant, decodeActivityConnectionsCursor, nearestOwner, resolveExecutionCosts, addCostSummaries, createActivityRuntime, createActivityCaptureRuntime, registerActivityCaptureRuntime, getActivityCaptureRuntime2, prepareModelInputFile, readModelInputFile, createAudioRuntime };
|
|
692
1040
|
|
|
693
|
-
//# debugId=
|
|
1041
|
+
//# debugId=753B3F5C996565E064756E2164756E21
|