@sixb/core 0.1.15 → 0.1.17
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 +25 -25
- package/dist/actions/types/context.d.ts +2 -2
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/actions/worker.js +1 -1
- package/dist/agents/index.js +41 -40
- package/dist/agents/index.js.map +1 -1
- package/dist/auth/index.js +5 -5
- package/dist/authorization/index.js +2 -2
- package/dist/blob-storage/download-urls.d.ts +41 -0
- package/dist/blob-storage/download-urls.d.ts.map +1 -0
- package/dist/blob-storage/execution.d.ts +9 -1
- package/dist/blob-storage/execution.d.ts.map +1 -1
- package/dist/blob-storage/index.js +5 -3
- package/dist/blob-storage/index.js.map +1 -1
- package/dist/blob-storage/internal.d.ts +2 -0
- package/dist/blob-storage/internal.d.ts.map +1 -0
- package/dist/blob-storage/internal.js +11 -0
- package/dist/blob-storage/internal.js.map +9 -0
- package/dist/bootstrap/index.js +45 -44
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/{chunk-wem5vqjw.js → chunk-10styjgk.js} +18 -13
- package/dist/{chunk-wem5vqjw.js.map → chunk-10styjgk.js.map} +3 -3
- package/dist/{chunk-hgqpcmyr.js → chunk-1hqwggsn.js} +47 -19
- package/dist/chunk-1hqwggsn.js.map +12 -0
- package/dist/{chunk-q3grgzp1.js → chunk-23xs4qp9.js} +2 -2
- package/dist/{chunk-vef6qa14.js → chunk-2am3db31.js} +2 -2
- package/dist/{chunk-fj1dvp37.js → chunk-2vhg6ysa.js} +1 -1
- package/dist/{chunk-p0nbkys4.js → chunk-33saed7g.js} +1 -1
- package/dist/{chunk-mdnw7nj8.js → chunk-3rrezgyc.js} +33 -8
- package/dist/chunk-3rrezgyc.js.map +15 -0
- package/dist/{chunk-jgwb25gc.js → chunk-4as3wt1c.js} +13 -5
- package/dist/chunk-4as3wt1c.js.map +12 -0
- package/dist/chunk-4ra628t7.js +88 -0
- package/dist/chunk-4ra628t7.js.map +10 -0
- package/dist/{chunk-mmac1mp6.js → chunk-52c5zb0z.js} +2 -2
- package/dist/{chunk-8fjmqjyx.js → chunk-5be2ath4.js} +1 -1
- package/dist/{chunk-2fv8sajb.js → chunk-5thzcb8g.js} +2 -2
- package/dist/{chunk-fjw417jf.js → chunk-5yd8cchh.js} +1143 -784
- package/dist/chunk-5yd8cchh.js.map +66 -0
- package/dist/{chunk-2tz5vnvz.js → chunk-6wbm6ymz.js} +235 -41
- package/dist/{chunk-2tz5vnvz.js.map → chunk-6wbm6ymz.js.map} +8 -6
- package/dist/{chunk-py2dw8cw.js → chunk-7ecp4v7a.js} +26 -19
- package/dist/chunk-7ecp4v7a.js.map +17 -0
- package/dist/{chunk-f85hpqnm.js → chunk-99nd4rc1.js} +3 -3
- package/dist/{chunk-f85hpqnm.js.map → chunk-99nd4rc1.js.map} +3 -3
- package/dist/{chunk-1jvq82rp.js → chunk-9g6jz9kk.js} +5 -5
- package/dist/{chunk-39tqv9hz.js → chunk-9se093qz.js} +5 -6
- package/dist/{chunk-39tqv9hz.js.map → chunk-9se093qz.js.map} +3 -4
- package/dist/{chunk-8w27xf9e.js → chunk-a7er86jd.js} +1 -1
- package/dist/{chunk-zdkcdshk.js → chunk-aq39q04r.js} +41 -3
- package/dist/{chunk-zdkcdshk.js.map → chunk-aq39q04r.js.map} +4 -3
- package/dist/chunk-b9affek3.js +261 -0
- package/dist/chunk-b9affek3.js.map +12 -0
- package/dist/{chunk-bxx3ms5t.js → chunk-c2rga5cx.js} +2 -2
- package/dist/{chunk-dsfw1bdr.js → chunk-cnb5kv05.js} +2 -2
- package/dist/chunk-d62kjtbg.js.map +2 -2
- package/dist/{chunk-dqkd3kdj.js → chunk-dam456ve.js} +234 -35
- package/dist/{chunk-dqkd3kdj.js.map → chunk-dam456ve.js.map} +7 -5
- package/dist/{chunk-n5t4mq6z.js → chunk-e67ynxcr.js} +3 -3
- package/dist/{chunk-xnx96gfy.js → chunk-ere85b8y.js} +17 -8
- package/dist/chunk-ere85b8y.js.map +15 -0
- package/dist/{chunk-k4kkp58d.js → chunk-ewqa58h9.js} +12 -2
- package/dist/chunk-ewqa58h9.js.map +11 -0
- package/dist/{chunk-6q7c68yx.js → chunk-f1xh7a32.js} +3 -3
- package/dist/{chunk-z708gemf.js → chunk-fggq3d9k.js} +450 -799
- package/dist/chunk-fggq3d9k.js.map +49 -0
- package/dist/{chunk-7jc21943.js → chunk-gf7yht60.js} +4 -4
- package/dist/chunk-h8teetr0.js +9 -0
- package/dist/chunk-h8teetr0.js.map +10 -0
- package/dist/chunk-hn2r7z41.js.map +1 -1
- package/dist/{chunk-ffwvdgk1.js → chunk-jjrn5v0p.js} +1 -1
- package/dist/{chunk-r5sc1d2b.js → chunk-jnfxmr3f.js} +1 -1
- package/dist/{chunk-y0zmae99.js → chunk-k4g51s47.js} +3 -3
- package/dist/{chunk-a0073121.js → chunk-kpx7jrmn.js} +3 -1
- package/dist/chunk-kpx7jrmn.js.map +12 -0
- package/dist/{chunk-p1683c0v.js → chunk-kyjcwqz6.js} +5 -2
- package/dist/{chunk-p1683c0v.js.map → chunk-kyjcwqz6.js.map} +3 -3
- package/dist/{chunk-3c90jvfj.js → chunk-pja9jfz6.js} +742 -583
- package/dist/chunk-pja9jfz6.js.map +19 -0
- package/dist/chunk-pqajwytd.js.map +1 -1
- package/dist/{chunk-mr60an99.js → chunk-qczk96d9.js} +22 -2
- package/dist/{chunk-mr60an99.js.map → chunk-qczk96d9.js.map} +3 -3
- package/dist/{chunk-s3csryxe.js → chunk-rj69qcrd.js} +8 -2
- package/dist/chunk-rj69qcrd.js.map +11 -0
- package/dist/{chunk-d8yes9yx.js → chunk-rpxz486p.js} +32 -5
- package/dist/{chunk-d8yes9yx.js.map → chunk-rpxz486p.js.map} +4 -4
- package/dist/{chunk-drz59ve0.js → chunk-rx7h5fdx.js} +1 -1
- package/dist/{chunk-ky7zpbtt.js → chunk-s7ftxrdr.js} +106 -8
- package/dist/chunk-s7ftxrdr.js.map +22 -0
- package/dist/{chunk-yfppyaty.js → chunk-sk0hcjsz.js} +1 -1
- package/dist/{chunk-qne45xqq.js → chunk-svabwqdq.js} +2 -2
- package/dist/{chunk-xr7y35yj.js → chunk-t9shqx3w.js} +2 -2
- package/dist/{chunk-4jph1t3v.js → chunk-tjjgy3z4.js} +27 -24
- package/dist/{chunk-4jph1t3v.js.map → chunk-tjjgy3z4.js.map} +4 -4
- package/dist/{chunk-ex8s8wsk.js → chunk-vp3z1ckh.js} +42 -10
- package/dist/{chunk-ex8s8wsk.js.map → chunk-vp3z1ckh.js.map} +7 -6
- package/dist/{chunk-adbve9zt.js → chunk-vre348sb.js} +2 -2
- package/dist/{chunk-a4g5yjm0.js → chunk-w9yycd3t.js} +1 -1
- package/dist/{chunk-g4rbm4a6.js → chunk-wt4szfec.js} +379 -331
- package/dist/chunk-wt4szfec.js.map +14 -0
- package/dist/{chunk-wd34wnsy.js → chunk-xcy5ddha.js} +6 -6
- package/dist/{chunk-3nx8vj5a.js → chunk-xyvy73tj.js} +5 -3
- package/dist/chunk-xyvy73tj.js.map +12 -0
- package/dist/datasets/write.js +1 -1
- package/dist/execution/agent.js +38 -37
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorized-object-reader.d.ts +3 -1
- package/dist/execution/authorized-object-reader.d.ts.map +1 -1
- package/dist/execution/primitive.js +36 -35
- package/dist/execution/primitive.js.map +2 -2
- package/dist/execution/request.js +37 -36
- package/dist/execution/request.js.map +2 -2
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -59
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/in-memory.d.ts +5 -1
- package/dist/lake-storage/in-memory.d.ts.map +1 -1
- package/dist/lake-storage/index.d.ts +1 -1
- package/dist/lake-storage/index.d.ts.map +1 -1
- package/dist/lake-storage/index.js +2 -2
- package/dist/lake-storage/types.d.ts +26 -0
- package/dist/lake-storage/types.d.ts.map +1 -1
- package/dist/maintenance/ontology-maintenance.d.ts +5 -1
- package/dist/maintenance/ontology-maintenance.d.ts.map +1 -1
- package/dist/maintenance/types.d.ts +1 -4
- package/dist/maintenance/types.d.ts.map +1 -1
- package/dist/materialization/event-envelopes.d.ts +20 -0
- package/dist/materialization/event-envelopes.d.ts.map +1 -0
- package/dist/materialization/events.d.ts +29 -3
- package/dist/materialization/events.d.ts.map +1 -1
- package/dist/materialization/index.d.ts +4 -1
- package/dist/materialization/index.d.ts.map +1 -1
- package/dist/materialization/index.js +9 -3
- package/dist/materialization/index.js.map +1 -1
- package/dist/materializer/edits/plan.d.ts +2 -10
- package/dist/materializer/edits/plan.d.ts.map +1 -1
- package/dist/materializer/effective/build-events.d.ts +5 -21
- package/dist/materializer/effective/build-events.d.ts.map +1 -1
- package/dist/materializer/effective/vector-indexing.d.ts +2 -3
- package/dist/materializer/effective/vector-indexing.d.ts.map +1 -1
- package/dist/materializer/effective/vectors.d.ts +2 -3
- package/dist/materializer/effective/vectors.d.ts.map +1 -1
- package/dist/materializer/execution/scope.d.ts +1 -11
- package/dist/materializer/execution/scope.d.ts.map +1 -1
- package/dist/materializer/execution/work-executor.d.ts +5 -7
- package/dist/materializer/execution/work-executor.d.ts.map +1 -1
- package/dist/materializer/execution/work-records.d.ts +1 -3
- package/dist/materializer/execution/work-records.d.ts.map +1 -1
- package/dist/materializer/index.js +31 -32
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/projections/replace.d.ts.map +1 -1
- package/dist/materializer/projections/replacement-plan.d.ts +8 -11
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -1
- package/dist/materializer/shared/batching.d.ts +5 -0
- package/dist/materializer/shared/batching.d.ts.map +1 -1
- package/dist/materializer/telemetry/plan.d.ts +2 -8
- package/dist/materializer/telemetry/plan.d.ts.map +1 -1
- package/dist/models/audio/catalog.d.ts +20 -0
- package/dist/models/audio/catalog.d.ts.map +1 -0
- package/dist/models/audio/errors.d.ts +8 -0
- package/dist/models/audio/errors.d.ts.map +1 -0
- package/dist/models/audio/file.d.ts +9 -0
- package/dist/models/audio/file.d.ts.map +1 -0
- package/dist/models/audio/runtime.d.ts +8 -0
- package/dist/models/audio/runtime.d.ts.map +1 -0
- package/dist/models/audio/types.d.ts +60 -0
- package/dist/models/audio/types.d.ts.map +1 -0
- package/dist/models/catalog.d.ts +23 -1
- package/dist/models/catalog.d.ts.map +1 -1
- package/dist/models/definitions.d.ts +1 -1
- package/dist/models/definitions.d.ts.map +1 -1
- package/dist/models/embedding-model.d.ts +4 -0
- package/dist/models/embedding-model.d.ts.map +1 -1
- package/dist/models/events.d.ts +3 -0
- package/dist/models/events.d.ts.map +1 -1
- package/dist/models/execution/index.js +22 -22
- package/dist/models/execution/model-call-admission.d.ts +6 -1
- package/dist/models/execution/model-call-admission.d.ts.map +1 -1
- package/dist/models/execution/model-call-limits.d.ts.map +1 -1
- package/dist/models/execution/model-call-recorder.d.ts.map +1 -1
- package/dist/models/execution/reranking.d.ts +4 -0
- package/dist/models/execution/reranking.d.ts.map +1 -0
- package/dist/models/execution/usage.d.ts.map +1 -1
- package/dist/models/execution.d.ts +2 -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 +7 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +7 -3
- package/dist/models/index.js.map +1 -1
- package/dist/models/pricing.d.ts +2 -2
- package/dist/models/pricing.d.ts.map +1 -1
- package/dist/models/reranking-model.d.ts +49 -0
- package/dist/models/reranking-model.d.ts.map +1 -0
- package/dist/objects/index.js +25 -25
- package/dist/objects/query/executor.d.ts +2 -1
- package/dist/objects/query/executor.d.ts.map +1 -1
- package/dist/objects/query/index.d.ts +1 -1
- package/dist/objects/query/index.d.ts.map +1 -1
- package/dist/objects/query/index.js +24 -24
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/ir.d.ts +8 -1
- package/dist/objects/query/ir.d.ts.map +1 -1
- package/dist/objects/query/normalize.d.ts.map +1 -1
- package/dist/objects/query/planner.d.ts +1 -1
- package/dist/objects/query/planner.d.ts.map +1 -1
- package/dist/objects/query/primary-id.d.ts +7 -0
- package/dist/objects/query/primary-id.d.ts.map +1 -0
- package/dist/objects/query/reranking-executor.d.ts +13 -0
- package/dist/objects/query/reranking-executor.d.ts.map +1 -0
- package/dist/objects/query/reranking-limits.d.ts +3 -0
- package/dist/objects/query/reranking-limits.d.ts.map +1 -0
- package/dist/objects/query/reranking-query.d.ts +4 -0
- package/dist/objects/query/reranking-query.d.ts.map +1 -0
- package/dist/objects/query/validate.d.ts.map +1 -1
- package/dist/objects/sdk/query-builder.d.ts +8 -0
- package/dist/objects/sdk/query-builder.d.ts.map +1 -1
- package/dist/objects/sdk/query-executor.d.ts +2 -2
- package/dist/objects/sdk/query-executor.d.ts.map +1 -1
- package/dist/objects/sdk/runtime-query-executor.d.ts.map +1 -1
- package/dist/objects/vectors/indexing-dispatch.d.ts +21 -0
- package/dist/objects/vectors/indexing-dispatch.d.ts.map +1 -0
- package/dist/objects/vectors/indexing-generate.d.ts.map +1 -1
- package/dist/objects/vectors/profile.d.ts.map +1 -1
- package/dist/objects/vectors/query.d.ts +1 -1
- package/dist/objects/vectors/query.d.ts.map +1 -1
- package/dist/objects/vectors/resolve-query.d.ts.map +1 -1
- package/dist/objects/vectors/types.d.ts +1 -1
- package/dist/objects/vectors/types.d.ts.map +1 -1
- package/dist/ontology/builders.d.ts +13 -4
- package/dist/ontology/builders.d.ts.map +1 -1
- package/dist/ontology/index.d.ts +1 -1
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/index.js +3 -3
- package/dist/ontology/internal.js +2 -2
- package/dist/ontology/query-capabilities.d.ts +1 -0
- package/dist/ontology/query-capabilities.d.ts.map +1 -1
- package/dist/ontology/types.d.ts +20 -0
- package/dist/ontology/types.d.ts.map +1 -1
- package/dist/ontology/validation/query.d.ts.map +1 -1
- package/dist/ontology/vector-profiles.d.ts.map +1 -1
- package/dist/pipelines/index.js +23 -23
- package/dist/projections/internal.js +22 -22
- package/dist/query.d.ts +4 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +2 -2
- package/dist/queues/in-memory.d.ts +3 -0
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/queues/index.js +1 -1
- package/dist/queues/types.d.ts +4 -0
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +1 -0
- 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 +1 -0
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +28 -26
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/public-origin.d.ts +10 -0
- package/dist/runtime/public-origin.d.ts.map +1 -0
- package/dist/runtime/sixb.d.ts +1 -0
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/runtime/types.d.ts +12 -2
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/sandboxes/index.js +5 -5
- package/dist/shares/internal.js +19 -19
- package/dist/storage/agents/provider.js +2 -2
- 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/provider.js +3 -3
- package/dist/storage/ai-cost/types.d.ts +1 -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 +2 -2
- package/dist/storage/ai-limits/in-memory.d.ts.map +1 -1
- package/dist/storage/ai-limits/provider.d.ts +7 -2
- package/dist/storage/ai-limits/provider.d.ts.map +1 -1
- package/dist/storage/ai-limits/provider.js +4 -2
- package/dist/storage/ai-limits/provider.js.map +1 -1
- package/dist/storage/ai-limits/types.d.ts +3 -0
- package/dist/storage/ai-limits/types.d.ts.map +1 -1
- package/dist/storage/ai-usage/record.d.ts.map +1 -1
- package/dist/storage/ai-usage/types.d.ts +8 -4
- package/dist/storage/ai-usage/types.d.ts.map +1 -1
- package/dist/storage/ai-usage/usage.d.ts.map +1 -1
- package/dist/storage/file-download-grants/in-memory.d.ts +11 -0
- package/dist/storage/file-download-grants/in-memory.d.ts.map +1 -0
- package/dist/storage/file-download-grants/index.d.ts +3 -0
- package/dist/storage/file-download-grants/index.d.ts.map +1 -0
- package/dist/storage/file-download-grants/record.d.ts +11 -0
- package/dist/storage/file-download-grants/record.d.ts.map +1 -0
- package/dist/storage/file-download-grants/types.d.ts +44 -0
- package/dist/storage/file-download-grants/types.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/provider.js +6 -6
- package/dist/storage/in-memory/index.d.ts +4 -0
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +5 -3
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +30 -30
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +1 -0
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +8 -4
- package/dist/storage/internal.js.map +1 -1
- package/dist/storage/migrations/index.d.ts +1 -1
- package/dist/storage/migrations/index.d.ts.map +1 -1
- package/dist/storage/migrations/migrate-storage.d.ts +3 -3
- package/dist/storage/migrations/migrate-storage.d.ts.map +1 -1
- package/dist/storage/migrations/types.d.ts +7 -0
- package/dist/storage/migrations/types.d.ts.map +1 -1
- package/dist/storage/objects/in-memory/query.d.ts.map +1 -1
- package/dist/storage/objects/in-memory/selected-reader.d.ts.map +1 -1
- package/dist/storage/objects/in-memory/storage.d.ts.map +1 -1
- package/dist/storage/objects/query-preparation.d.ts +39 -0
- package/dist/storage/objects/query-preparation.d.ts.map +1 -0
- package/dist/storage/objects/types.d.ts +2 -0
- package/dist/storage/objects/types.d.ts.map +1 -1
- package/dist/storage/ontology/commits.d.ts +1 -6
- package/dist/storage/ontology/commits.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/index.d.ts +4 -2
- package/dist/storage/ontology/in-memory/index.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations-state.d.ts +0 -2
- package/dist/storage/ontology/in-memory/materializations-state.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations-work.d.ts +1 -3
- package/dist/storage/ontology/in-memory/materializations-work.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts +23 -57
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/outbox.d.ts +3 -2
- package/dist/storage/ontology/in-memory/outbox.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts +104 -0
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/shared-state.d.ts +17 -2
- package/dist/storage/ontology/in-memory/shared-state.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/source-roots.d.ts +3 -1
- package/dist/storage/ontology/in-memory/source-roots.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/sources.d.ts +1 -2
- package/dist/storage/ontology/in-memory/sources.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/state-reader.d.ts +25 -0
- package/dist/storage/ontology/in-memory/state-reader.d.ts.map +1 -0
- package/dist/storage/ontology/index.d.ts +6 -3
- package/dist/storage/ontology/index.d.ts.map +1 -1
- package/dist/storage/ontology/materializations.d.ts +40 -59
- package/dist/storage/ontology/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/outbox.d.ts +4 -6
- package/dist/storage/ontology/outbox.d.ts.map +1 -1
- package/dist/storage/ontology/provider-work.d.ts +114 -3
- package/dist/storage/ontology/provider-work.d.ts.map +1 -1
- package/dist/storage/ontology/provider.d.ts +14 -39
- package/dist/storage/ontology/provider.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +26 -12
- package/dist/storage/ontology/provider.js.map +1 -1
- package/dist/storage/ontology/replacement-plans.d.ts +103 -0
- package/dist/storage/ontology/replacement-plans.d.ts.map +1 -0
- package/dist/storage/ontology/sources.d.ts +0 -8
- package/dist/storage/ontology/sources.d.ts.map +1 -1
- package/dist/storage/operation-scope.d.ts.map +1 -1
- package/dist/storage/operation-scope.js +1 -1
- package/dist/storage/projection-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/projection-runs/types.d.ts +2 -0
- package/dist/storage/projection-runs/types.d.ts.map +1 -1
- package/dist/storage/types.d.ts +2 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +6 -6
- package/dist/syncs/index.js +24 -24
- package/dist/testing/ai-cost-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-limit-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-usage-storage-contract.d.ts.map +1 -1
- package/dist/testing/file-download-grant-storage-contract.d.ts +9 -0
- package/dist/testing/file-download-grant-storage-contract.d.ts.map +1 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +2548 -1489
- package/dist/testing/index.js.map +14 -13
- package/dist/testing/lake-storage-contract.d.ts.map +1 -1
- package/dist/testing/materializer-storage-contract.d.ts +14 -0
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/object-read-scope-contract.d.ts.map +1 -1
- package/dist/testing/ontology-contract-fixture.d.ts +5 -1
- package/dist/testing/ontology-contract-fixture.d.ts.map +1 -1
- package/dist/testing/ontology-storage-contract.d.ts.map +1 -1
- package/dist/testing/projection-run-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/webhooks/internal.js +20 -20
- package/dist/workers/index.js +15 -17
- package/dist/workers/index.js.map +3 -3
- package/dist/workers/queue-worker.d.ts +3 -2
- package/dist/workers/queue-worker.d.ts.map +1 -1
- package/dist/workflows/index.js +42 -41
- package/dist/workflows/index.js.map +1 -1
- package/package.json +7 -1
- package/src/actions/types/context.ts +5 -2
- package/src/blob-storage/download-urls.ts +138 -0
- package/src/blob-storage/execution.ts +32 -1
- package/src/blob-storage/internal.ts +1 -0
- package/src/execution/authorized-object-reader.ts +8 -1
- package/src/index.ts +25 -0
- package/src/lake-storage/in-memory.ts +38 -9
- package/src/lake-storage/index.ts +2 -0
- package/src/lake-storage/types.ts +30 -0
- package/src/maintenance/ontology-maintenance.ts +50 -23
- package/src/maintenance/types.ts +1 -4
- package/src/materialization/event-envelopes.ts +168 -0
- package/src/materialization/events.ts +40 -4
- package/src/materialization/index.ts +9 -1
- package/src/materializer/README.md +55 -10
- package/src/materializer/edits/commit.ts +3 -19
- package/src/materializer/edits/plan.ts +20 -71
- package/src/materializer/effective/build-events.ts +42 -136
- package/src/materializer/effective/vector-indexing.ts +2 -3
- package/src/materializer/effective/vectors.ts +2 -3
- package/src/materializer/execution/scope.ts +1 -38
- package/src/materializer/execution/work-executor.ts +21 -115
- package/src/materializer/execution/work-records.ts +0 -15
- package/src/materializer/projections/replace.ts +106 -63
- package/src/materializer/projections/replacement-plan.ts +73 -218
- package/src/materializer/shared/batching.ts +7 -0
- package/src/materializer/telemetry/append.ts +2 -14
- package/src/materializer/telemetry/plan.ts +6 -43
- package/src/models/audio/catalog.ts +90 -0
- package/src/models/audio/errors.ts +19 -0
- package/src/models/audio/file.ts +78 -0
- package/src/models/audio/runtime.ts +182 -0
- package/src/models/audio/types.ts +69 -0
- package/src/models/catalog.ts +52 -5
- package/src/models/definitions.ts +8 -1
- package/src/models/embedding-model.ts +12 -0
- package/src/models/events.ts +3 -0
- package/src/models/execution/README.md +20 -1
- package/src/models/execution/embedding.ts +5 -1
- package/src/models/execution/model-call-admission.ts +6 -1
- package/src/models/execution/model-call-limits.ts +21 -11
- package/src/models/execution/model-call-recorder.ts +1 -0
- package/src/models/execution/model-call-recovery.ts +1 -0
- package/src/models/execution/reranking.ts +137 -0
- package/src/models/execution/usage.ts +1 -0
- package/src/models/execution.ts +5 -1
- package/src/models/generation-types.ts +2 -0
- package/src/models/index.ts +32 -0
- package/src/models/pricing.ts +2 -1
- package/src/models/reranking-model.ts +114 -0
- package/src/objects/query/executor.ts +42 -2
- package/src/objects/query/explain.ts +8 -0
- package/src/objects/query/index.ts +1 -0
- package/src/objects/query/ir.ts +10 -0
- package/src/objects/query/normalize.ts +2 -0
- package/src/objects/query/planner.ts +12 -1
- package/src/objects/query/primary-id.ts +56 -0
- package/src/objects/query/reranking-executor.ts +91 -0
- package/src/objects/query/reranking-limits.ts +3 -0
- package/src/objects/query/reranking-query.ts +8 -0
- package/src/objects/query/validate.ts +33 -10
- package/src/objects/sdk/query-builder.ts +15 -2
- package/src/objects/sdk/query-executor.ts +2 -2
- package/src/objects/sdk/runtime-query-executor.ts +7 -4
- package/src/objects/vectors/README.md +14 -2
- package/src/objects/vectors/handle.ts +1 -1
- package/src/objects/vectors/indexing-dispatch.ts +83 -0
- package/src/objects/vectors/indexing-generate.ts +5 -1
- package/src/objects/vectors/profile.ts +2 -0
- package/src/objects/vectors/query.ts +21 -4
- package/src/objects/vectors/resolve-query.ts +9 -5
- package/src/objects/vectors/types.ts +3 -1
- package/src/ontology/builders.ts +22 -7
- package/src/ontology/index.ts +2 -0
- package/src/ontology/query-capabilities.ts +1 -1
- package/src/ontology/types.ts +21 -0
- package/src/ontology/validation/query.ts +57 -0
- package/src/ontology/vector-profiles.ts +1 -0
- package/src/query.ts +4 -0
- package/src/queues/in-memory.ts +54 -19
- package/src/queues/types.ts +4 -0
- package/src/runtime/host.ts +28 -1
- package/src/runtime/index.ts +1 -0
- package/src/runtime/internal.ts +1 -0
- package/src/runtime/public-origin.ts +33 -0
- package/src/runtime/sixb.ts +13 -2
- package/src/runtime/types.ts +12 -2
- package/src/storage/ai-cost/analytics.ts +2 -0
- package/src/storage/ai-cost/codec.ts +2 -1
- package/src/storage/ai-cost/types.ts +1 -0
- package/src/storage/ai-cost/validation.ts +21 -8
- package/src/storage/ai-limits/in-memory.ts +10 -2
- package/src/storage/ai-limits/provider.ts +29 -2
- package/src/storage/ai-limits/types.ts +3 -0
- package/src/storage/ai-usage/record.ts +9 -0
- package/src/storage/ai-usage/types.ts +8 -4
- package/src/storage/ai-usage/usage.ts +2 -0
- package/src/storage/file-download-grants/in-memory.ts +73 -0
- package/src/storage/file-download-grants/index.ts +8 -0
- package/src/storage/file-download-grants/record.ts +47 -0
- package/src/storage/file-download-grants/types.ts +48 -0
- package/src/storage/in-memory/index.ts +13 -2
- package/src/storage/index.ts +31 -13
- package/src/storage/internal.ts +1 -0
- package/src/storage/migrations/index.ts +1 -0
- package/src/storage/migrations/migrate-storage.ts +36 -12
- package/src/storage/migrations/types.ts +8 -0
- package/src/storage/objects/in-memory/query.ts +2 -0
- package/src/storage/objects/in-memory/selected-reader.ts +1 -0
- package/src/storage/objects/in-memory/storage.ts +1 -0
- package/src/storage/objects/query-preparation.ts +77 -0
- package/src/storage/objects/types.ts +2 -0
- package/src/storage/ontology/commits.ts +1 -6
- package/src/storage/ontology/in-memory/index.ts +28 -9
- package/src/storage/ontology/in-memory/materializations-finalization.ts +35 -68
- package/src/storage/ontology/in-memory/materializations-state.ts +0 -22
- package/src/storage/ontology/in-memory/materializations-work.ts +0 -45
- package/src/storage/ontology/in-memory/materializations.ts +172 -653
- package/src/storage/ontology/in-memory/outbox.ts +37 -29
- package/src/storage/ontology/in-memory/replacement-plans.ts +697 -0
- package/src/storage/ontology/in-memory/shared-state.ts +24 -2
- package/src/storage/ontology/in-memory/source-roots.ts +7 -2
- package/src/storage/ontology/in-memory/sources.ts +7 -33
- package/src/storage/ontology/in-memory/state-reader.ts +245 -0
- package/src/storage/ontology/index.ts +19 -13
- package/src/storage/ontology/materializations.ts +45 -74
- package/src/storage/ontology/outbox.ts +4 -7
- package/src/storage/ontology/provider-header-validation.ts +0 -57
- package/src/storage/ontology/provider-work.ts +381 -90
- package/src/storage/ontology/provider.ts +74 -171
- package/src/storage/ontology/replacement-plans.ts +117 -0
- package/src/storage/ontology/sources.ts +0 -12
- package/src/storage/operation-scope.ts +33 -1
- package/src/storage/projection-runs/in-memory.ts +7 -1
- package/src/storage/projection-runs/types.ts +2 -0
- package/src/storage/types.ts +2 -0
- package/src/testing/ai-cost-storage-contract.ts +1 -0
- package/src/testing/ai-limit-storage-contract.ts +62 -0
- package/src/testing/ai-usage-storage-contract.ts +31 -0
- package/src/testing/file-download-grant-storage-contract.ts +139 -0
- package/src/testing/index.ts +4 -0
- package/src/testing/lake-storage-contract.ts +87 -1
- package/src/testing/materializer-storage-contract.ts +1008 -1
- package/src/testing/object-read-scope-contract.ts +1 -0
- package/src/testing/ontology-contract-fixture.ts +11 -87
- package/src/testing/ontology-storage-contract.ts +70 -39
- package/src/testing/projection-run-storage-contract.ts +14 -0
- package/src/testing/queues-contract.ts +59 -0
- package/src/workers/queue-worker.ts +19 -16
- package/dist/chunk-3c90jvfj.js.map +0 -15
- package/dist/chunk-3nx8vj5a.js.map +0 -12
- package/dist/chunk-7ytf06d3.js +0 -113
- package/dist/chunk-7ytf06d3.js.map +0 -10
- package/dist/chunk-a0073121.js.map +0 -12
- package/dist/chunk-fjw417jf.js.map +0 -62
- package/dist/chunk-g4rbm4a6.js.map +0 -15
- package/dist/chunk-hgqpcmyr.js.map +0 -12
- package/dist/chunk-jgwb25gc.js.map +0 -12
- package/dist/chunk-k4kkp58d.js.map +0 -11
- package/dist/chunk-ky7zpbtt.js.map +0 -19
- package/dist/chunk-mdnw7nj8.js.map +0 -15
- package/dist/chunk-py2dw8cw.js.map +0 -17
- package/dist/chunk-s3csryxe.js.map +0 -11
- package/dist/chunk-xnx96gfy.js.map +0 -15
- package/dist/chunk-z708gemf.js.map +0 -50
- package/dist/materializer/execution/plan-stream.d.ts +0 -8
- package/dist/materializer/execution/plan-stream.d.ts.map +0 -1
- package/src/materializer/execution/plan-stream.ts +0 -121
- /package/dist/{chunk-q3grgzp1.js.map → chunk-23xs4qp9.js.map} +0 -0
- /package/dist/{chunk-vef6qa14.js.map → chunk-2am3db31.js.map} +0 -0
- /package/dist/{chunk-fj1dvp37.js.map → chunk-2vhg6ysa.js.map} +0 -0
- /package/dist/{chunk-p0nbkys4.js.map → chunk-33saed7g.js.map} +0 -0
- /package/dist/{chunk-mmac1mp6.js.map → chunk-52c5zb0z.js.map} +0 -0
- /package/dist/{chunk-8fjmqjyx.js.map → chunk-5be2ath4.js.map} +0 -0
- /package/dist/{chunk-2fv8sajb.js.map → chunk-5thzcb8g.js.map} +0 -0
- /package/dist/{chunk-1jvq82rp.js.map → chunk-9g6jz9kk.js.map} +0 -0
- /package/dist/{chunk-8w27xf9e.js.map → chunk-a7er86jd.js.map} +0 -0
- /package/dist/{chunk-bxx3ms5t.js.map → chunk-c2rga5cx.js.map} +0 -0
- /package/dist/{chunk-dsfw1bdr.js.map → chunk-cnb5kv05.js.map} +0 -0
- /package/dist/{chunk-n5t4mq6z.js.map → chunk-e67ynxcr.js.map} +0 -0
- /package/dist/{chunk-6q7c68yx.js.map → chunk-f1xh7a32.js.map} +0 -0
- /package/dist/{chunk-7jc21943.js.map → chunk-gf7yht60.js.map} +0 -0
- /package/dist/{chunk-ffwvdgk1.js.map → chunk-jjrn5v0p.js.map} +0 -0
- /package/dist/{chunk-r5sc1d2b.js.map → chunk-jnfxmr3f.js.map} +0 -0
- /package/dist/{chunk-y0zmae99.js.map → chunk-k4g51s47.js.map} +0 -0
- /package/dist/{chunk-drz59ve0.js.map → chunk-rx7h5fdx.js.map} +0 -0
- /package/dist/{chunk-yfppyaty.js.map → chunk-sk0hcjsz.js.map} +0 -0
- /package/dist/{chunk-qne45xqq.js.map → chunk-svabwqdq.js.map} +0 -0
- /package/dist/{chunk-xr7y35yj.js.map → chunk-t9shqx3w.js.map} +0 -0
- /package/dist/{chunk-adbve9zt.js.map → chunk-vre348sb.js.map} +0 -0
- /package/dist/{chunk-a4g5yjm0.js.map → chunk-w9yycd3t.js.map} +0 -0
- /package/dist/{chunk-wd34wnsy.js.map → chunk-xcy5ddha.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
OntologyRegistry2
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-xyvy73tj.js";
|
|
5
5
|
import {
|
|
6
6
|
ProjectionRegistry2,
|
|
7
7
|
createOntologyMaterializer2
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-fggq3d9k.js";
|
|
9
9
|
import {
|
|
10
10
|
captureSixbFailure2,
|
|
11
11
|
isSixbError2
|
|
@@ -13,37 +13,42 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
SecurityRegistry,
|
|
15
15
|
AuthRuntime2
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-svabwqdq.js";
|
|
17
17
|
import {
|
|
18
18
|
captureExecutionScope,
|
|
19
19
|
resolveExecutionScopeAuthorization,
|
|
20
20
|
AuthorizationError2
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5be2ath4.js";
|
|
22
22
|
import {
|
|
23
23
|
AuthRuntimeError2,
|
|
24
24
|
isMagicLinkAuthStrategy2,
|
|
25
25
|
isOidcAuthStrategy2
|
|
26
26
|
} from "./chunk-2jntasmh.js";
|
|
27
27
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
indexModelBindings,
|
|
29
|
+
assertRerankingModel,
|
|
30
|
+
validateRerankingResults,
|
|
31
|
+
RerankingModelResponseError2,
|
|
32
|
+
createModelCatalog2,
|
|
33
|
+
estimateModelCall
|
|
34
|
+
} from "./chunk-s7ftxrdr.js";
|
|
30
35
|
import {
|
|
31
36
|
FileUploadSessionError2
|
|
32
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-33saed7g.js";
|
|
33
38
|
import {
|
|
34
39
|
isMigrationCapableStorage2,
|
|
35
40
|
checkStorageSchema2
|
|
36
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-5yd8cchh.js";
|
|
37
42
|
import {
|
|
38
43
|
createAuthorizedObjectReader
|
|
39
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-10styjgk.js";
|
|
40
45
|
import {
|
|
41
46
|
attachSixbErrorReporter2,
|
|
42
47
|
shareSixbErrorReporter2
|
|
43
48
|
} from "./chunk-vjcd8d27.js";
|
|
44
49
|
import {
|
|
45
50
|
ActionRegistry2
|
|
46
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-9g6jz9kk.js";
|
|
47
52
|
import {
|
|
48
53
|
assertDatasetDefinition2
|
|
49
54
|
} from "./chunk-cd234ba4.js";
|
|
@@ -56,7 +61,7 @@ import {
|
|
|
56
61
|
} from "./chunk-e1c18xjx.js";
|
|
57
62
|
import {
|
|
58
63
|
createSandboxDefinition
|
|
59
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-2am3db31.js";
|
|
60
65
|
import {
|
|
61
66
|
ConnectorError2,
|
|
62
67
|
ConnectorNotFoundError2,
|
|
@@ -68,16 +73,16 @@ import {
|
|
|
68
73
|
isConnectorStorageError,
|
|
69
74
|
storageBoundaryError,
|
|
70
75
|
recoverConnectorFailure
|
|
71
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-jnfxmr3f.js";
|
|
72
77
|
import {
|
|
73
78
|
toolsFromProjectConfig
|
|
74
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-cnb5kv05.js";
|
|
75
80
|
import {
|
|
76
81
|
assertNoAgentDefinitions,
|
|
77
82
|
validateWorkflowsAtStartup2,
|
|
78
83
|
validateWorkflowAgentStepGroupReferences2,
|
|
79
84
|
createBoundSixb
|
|
80
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-6wbm6ymz.js";
|
|
81
86
|
import {
|
|
82
87
|
registerConnectorConnectionCallbackProcess
|
|
83
88
|
} from "./chunk-5a4a52tq.js";
|
|
@@ -93,30 +98,31 @@ import {
|
|
|
93
98
|
validateSharesAtStartup,
|
|
94
99
|
discoverOntologySources2,
|
|
95
100
|
discoverProjectDefinitions2
|
|
96
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-xcy5ddha.js";
|
|
97
102
|
import {
|
|
98
103
|
LoggingService2
|
|
99
104
|
} from "./chunk-3qms4nax.js";
|
|
100
105
|
import {
|
|
101
106
|
bindEmbeddingModels,
|
|
102
107
|
createVectorIndexingRuntime,
|
|
103
|
-
registerVectorIndexingRuntime
|
|
104
|
-
|
|
108
|
+
registerVectorIndexingRuntime,
|
|
109
|
+
getApiPublicOrigin
|
|
110
|
+
} from "./chunk-vp3z1ckh.js";
|
|
105
111
|
import {
|
|
106
112
|
registerProjectionRegistry2
|
|
107
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-f1xh7a32.js";
|
|
108
114
|
import {
|
|
109
115
|
SyncValidationError2
|
|
110
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-k4g51s47.js";
|
|
111
117
|
import {
|
|
112
118
|
ModelExecutionSession
|
|
113
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-52c5zb0z.js";
|
|
114
120
|
import {
|
|
115
121
|
isOAuthConnectorDefinition2
|
|
116
122
|
} from "./chunk-9x8dybsb.js";
|
|
117
123
|
import {
|
|
118
124
|
ensureExecutionRecord2
|
|
119
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-a7er86jd.js";
|
|
120
126
|
import {
|
|
121
127
|
ConnectorConnectionStorageError2,
|
|
122
128
|
CONNECTOR_CONNECTION_RUN_FAILURE_CODES2
|
|
@@ -129,7 +135,7 @@ import {
|
|
|
129
135
|
} from "./chunk-kkqwzy6h.js";
|
|
130
136
|
import {
|
|
131
137
|
sameEmbeddingModel
|
|
132
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-kyjcwqz6.js";
|
|
133
139
|
import {
|
|
134
140
|
supportsDirectUpload2
|
|
135
141
|
} from "./chunk-h3v76ams.js";
|
|
@@ -2701,11 +2707,13 @@ var DEGRADED_FAILURE_THRESHOLD = 2;
|
|
|
2701
2707
|
var ABANDONED_UPLOAD_SWEEP_DELAY_MS = 5 * 60000;
|
|
2702
2708
|
var ABANDONED_UPLOAD_ABORT_GRACE_MS = 15 * 60000;
|
|
2703
2709
|
var ABANDONED_SOURCE_PURGE_BATCH = 50000;
|
|
2710
|
+
var EXPIRED_FILE_DOWNLOAD_RETENTION_MS = 7 * 24 * 60 * 60000;
|
|
2704
2711
|
|
|
2705
2712
|
class OntologyMaintenance {
|
|
2706
2713
|
projectId;
|
|
2707
2714
|
storage;
|
|
2708
2715
|
dispatcher;
|
|
2716
|
+
vectorIndexing;
|
|
2709
2717
|
blobStorage;
|
|
2710
2718
|
intervalMs;
|
|
2711
2719
|
publishedOutboxRetentionMs;
|
|
@@ -2725,6 +2733,7 @@ class OntologyMaintenance {
|
|
|
2725
2733
|
this.projectId = dependencies.projectId;
|
|
2726
2734
|
this.storage = dependencies.storage;
|
|
2727
2735
|
this.dispatcher = dependencies.dispatcher;
|
|
2736
|
+
this.vectorIndexing = dependencies.vectorIndexing;
|
|
2728
2737
|
this.blobStorage = dependencies.blobStorage;
|
|
2729
2738
|
this.intervalMs = positiveInteger(options.intervalMs ?? DEFAULT_INTERVAL_MS, "intervalMs");
|
|
2730
2739
|
this.publishedOutboxRetentionMs = nonnegativeInteger(options.publishedOutboxRetentionMs ?? DEFAULT_RETENTION_MS, "publishedOutboxRetentionMs");
|
|
@@ -2788,9 +2797,12 @@ class OntologyMaintenance {
|
|
|
2788
2797
|
this.snapshot = { ...this.snapshot, running: true, lastStartedAt: started.toISOString() };
|
|
2789
2798
|
const failures = [];
|
|
2790
2799
|
await captureFailure(() => this.dispatcher.drain(), failures);
|
|
2800
|
+
const vectorIndexing = this.vectorIndexing;
|
|
2801
|
+
if (vectorIndexing)
|
|
2802
|
+
await captureFailure(() => vectorIndexing.drain(), failures);
|
|
2791
2803
|
const cleanup = await this.cleanupExpiredRows(started, failures);
|
|
2792
|
-
const
|
|
2793
|
-
this.completePass({ started, failures, cleanup, outbox
|
|
2804
|
+
const outbox = await captureFailure(() => this.storage.ontology.outbox.summarize({ projectId: this.projectId }), failures, this.snapshot.outbox);
|
|
2805
|
+
this.completePass({ started, failures, cleanup, outbox });
|
|
2794
2806
|
}
|
|
2795
2807
|
async cleanupExpiredRows(started, failures) {
|
|
2796
2808
|
const publishedOutboxRowsDeleted = await captureFailure(() => this.storage.ontology.outbox.purgePublished({
|
|
@@ -2798,6 +2810,7 @@ class OntologyMaintenance {
|
|
|
2798
2810
|
publishedBefore: new Date(started.getTime() - this.publishedOutboxRetentionMs).toISOString(),
|
|
2799
2811
|
limit: this.cleanupLimit
|
|
2800
2812
|
}), failures, 0);
|
|
2813
|
+
const spentPlanRows = await captureFailure(() => this.purgeSpentPlans(started), failures, 0);
|
|
2801
2814
|
const terminalSources = await captureFailure(() => this.storage.ontology.sources.cleanupTerminal({
|
|
2802
2815
|
projectId: this.projectId,
|
|
2803
2816
|
terminalBefore: new Date(started.getTime() - this.terminalSourceRetentionMs).toISOString(),
|
|
@@ -2809,9 +2822,17 @@ class OntologyMaintenance {
|
|
|
2809
2822
|
await captureFailure(() => this.retireAbandonedUploads(uploads, started, failures), failures);
|
|
2810
2823
|
await captureFailure(() => uploads.cleanupExpired(started), failures, 0);
|
|
2811
2824
|
}
|
|
2825
|
+
const downloads = this.storage.fileDownloadGrants;
|
|
2826
|
+
if (downloads) {
|
|
2827
|
+
await captureFailure(() => downloads.deleteExpired({
|
|
2828
|
+
projectId: this.projectId,
|
|
2829
|
+
expiredBefore: new Date(started.getTime() - EXPIRED_FILE_DOWNLOAD_RETENTION_MS),
|
|
2830
|
+
limit: this.cleanupLimit
|
|
2831
|
+
}), failures, 0);
|
|
2832
|
+
}
|
|
2812
2833
|
return {
|
|
2813
2834
|
publishedOutboxRowsDeleted,
|
|
2814
|
-
terminalSourceRowsDeleted: terminalSources.rowsDeleted + abandonedSources.rowsDeleted,
|
|
2835
|
+
terminalSourceRowsDeleted: terminalSources.rowsDeleted + abandonedSources.rowsDeleted + spentPlanRows,
|
|
2815
2836
|
terminalSourceMaterializationsDeleted: terminalSources.materializationsDeleted + abandonedSources.materializationsDeleted
|
|
2816
2837
|
};
|
|
2817
2838
|
}
|
|
@@ -2831,6 +2852,19 @@ class OntologyMaintenance {
|
|
|
2831
2852
|
}
|
|
2832
2853
|
}
|
|
2833
2854
|
}
|
|
2855
|
+
async purgeSpentPlans(started) {
|
|
2856
|
+
let rowsDeleted = 0;
|
|
2857
|
+
while (true) {
|
|
2858
|
+
const purged = await this.storage.ontology.replacementPlans.purge({
|
|
2859
|
+
projectId: this.projectId,
|
|
2860
|
+
limit: ABANDONED_SOURCE_PURGE_BATCH
|
|
2861
|
+
});
|
|
2862
|
+
rowsDeleted += purged;
|
|
2863
|
+
if (purged < ABANDONED_SOURCE_PURGE_BATCH || this.now().getTime() - started.getTime() >= this.intervalMs) {
|
|
2864
|
+
return rowsDeleted;
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2834
2868
|
async retireAbandonedUploads(uploads, now, failures) {
|
|
2835
2869
|
const abandoned = await uploads.listAbandoned({
|
|
2836
2870
|
projectId: this.projectId,
|
|
@@ -2868,11 +2902,6 @@ class OntologyMaintenance {
|
|
|
2868
2902
|
if (abortFailure !== undefined)
|
|
2869
2903
|
throw abortFailure;
|
|
2870
2904
|
}
|
|
2871
|
-
async readOperationalSummaries(failures) {
|
|
2872
|
-
const outbox = await captureFailure(() => this.storage.ontology.outbox.summarize({ projectId: this.projectId }), failures, this.snapshot.outbox);
|
|
2873
|
-
const terminalSummary = await captureFailure(() => this.storage.ontology.sources.summarizeTerminal({ projectId: this.projectId }), failures, this.snapshot.terminalSources);
|
|
2874
|
-
return { outbox, terminalSources: terminalSummary };
|
|
2875
|
-
}
|
|
2876
2905
|
completePass(input) {
|
|
2877
2906
|
const completed = this.now();
|
|
2878
2907
|
const failure = input.failures.length > 0 ? new AggregateError(input.failures, "Maintenance pass failed.") : null;
|
|
@@ -2885,7 +2914,6 @@ class OntologyMaintenance {
|
|
|
2885
2914
|
consecutiveFailures: failure ? this.snapshot.consecutiveFailures + 1 : 0,
|
|
2886
2915
|
lastError: failure ? errorMessage(failure) : null,
|
|
2887
2916
|
outbox: input.outbox,
|
|
2888
|
-
terminalSources: input.terminalSources,
|
|
2889
2917
|
cleanup: input.cleanup
|
|
2890
2918
|
};
|
|
2891
2919
|
if (failure)
|
|
@@ -2937,7 +2965,6 @@ function emptySnapshot(intervalMs) {
|
|
|
2937
2965
|
consecutiveFailures: 0,
|
|
2938
2966
|
lastError: null,
|
|
2939
2967
|
outbox: null,
|
|
2940
|
-
terminalSources: null,
|
|
2941
2968
|
cleanup: null
|
|
2942
2969
|
};
|
|
2943
2970
|
}
|
|
@@ -2993,6 +3020,163 @@ async function captureFailure(run, failures, fallback) {
|
|
|
2993
3020
|
return fallback;
|
|
2994
3021
|
}
|
|
2995
3022
|
}
|
|
3023
|
+
// src/models/execution/reranking.ts
|
|
3024
|
+
import { randomUUID as randomUUID6 } from "crypto";
|
|
3025
|
+
function bindRerankingModels(catalog, session) {
|
|
3026
|
+
if (!catalog)
|
|
3027
|
+
return;
|
|
3028
|
+
return indexModelBindings(catalog.list().map(({ model }) => Object.freeze({
|
|
3029
|
+
providerId: model.providerId,
|
|
3030
|
+
modelId: model.modelId,
|
|
3031
|
+
definition: model.definition,
|
|
3032
|
+
rerank: (input) => executeReranking(session, model, input)
|
|
3033
|
+
})), "reranking", assertRerankingModel);
|
|
3034
|
+
}
|
|
3035
|
+
async function executeReranking(session, binding, input) {
|
|
3036
|
+
const query = input.query;
|
|
3037
|
+
if (typeof query !== "string" || !query.trim() || !Array.isArray(input.documents) || input.documents.some((text) => typeof text !== "string" || !text.trim())) {
|
|
3038
|
+
throw new TypeError("[SixbModels] Reranking requires a query and nonempty document strings.");
|
|
3039
|
+
}
|
|
3040
|
+
const documents = [...input.documents];
|
|
3041
|
+
const signal = AbortSignal.any([session.signal(input.signal), AbortSignal.timeout(30000)]);
|
|
3042
|
+
signal.throwIfAborted();
|
|
3043
|
+
if (documents.length === 0)
|
|
3044
|
+
return { results: [] };
|
|
3045
|
+
const accounting = await session.accounting();
|
|
3046
|
+
accounting.assertHealthy();
|
|
3047
|
+
const model = await binding.resolve?.() ?? binding;
|
|
3048
|
+
assertRerankingModel(model);
|
|
3049
|
+
if (model.providerId !== binding.providerId || model.modelId !== binding.modelId) {
|
|
3050
|
+
throw new TypeError("[SixbModels] Resolved reranking model identity does not match its binding.");
|
|
3051
|
+
}
|
|
3052
|
+
signal.throwIfAborted();
|
|
3053
|
+
const encoder = new TextEncoder;
|
|
3054
|
+
const queryBytes = encoder.encode(query).byteLength;
|
|
3055
|
+
const tokens = documents.reduce((sum, text) => sum + Math.ceil((queryBytes + encoder.encode(text).byteLength) / 4), 0);
|
|
3056
|
+
const callId = `call_${randomUUID6()}`;
|
|
3057
|
+
await accounting.admitCall({
|
|
3058
|
+
callId,
|
|
3059
|
+
providerId: model.providerId,
|
|
3060
|
+
modelId: model.modelId,
|
|
3061
|
+
modelKind: "reranking",
|
|
3062
|
+
costEstimator: model.costEstimator,
|
|
3063
|
+
inputTokens: { status: "estimated", tokens, method: "utf8BytesDividedByFour" },
|
|
3064
|
+
outputTokenAllowance: 0,
|
|
3065
|
+
estimatedTotalTokens: tokens
|
|
3066
|
+
});
|
|
3067
|
+
let result;
|
|
3068
|
+
try {
|
|
3069
|
+
signal.throwIfAborted();
|
|
3070
|
+
result = await model.rerank({ query, documents, signal });
|
|
3071
|
+
} catch (error) {
|
|
3072
|
+
const metadata = error instanceof RerankingModelResponseError2 ? error.metadata : {};
|
|
3073
|
+
await recordReranking(accounting, model, callId, metadata);
|
|
3074
|
+
throw error;
|
|
3075
|
+
}
|
|
3076
|
+
await recordReranking(accounting, model, callId, result ?? {});
|
|
3077
|
+
signal.throwIfAborted();
|
|
3078
|
+
try {
|
|
3079
|
+
return { ...result, results: validateRerankingResults(result?.results, documents.length) };
|
|
3080
|
+
} catch (cause) {
|
|
3081
|
+
throw new RerankingModelResponseError2("[SixbModels] Invalid reranking response.", model.providerId, model.modelId, result ?? {}, { cause });
|
|
3082
|
+
}
|
|
3083
|
+
}
|
|
3084
|
+
async function recordReranking(accounting, model, callId, metadata) {
|
|
3085
|
+
const usage = { ...metadata.usage, outputTokens: metadata.usage?.outputTokens ?? 0 };
|
|
3086
|
+
const estimate = estimateModelCall(model, {
|
|
3087
|
+
usage,
|
|
3088
|
+
route: metadata.route,
|
|
3089
|
+
responseModelId: metadata.responseModelId
|
|
3090
|
+
});
|
|
3091
|
+
await accounting.onModelCallEnd({
|
|
3092
|
+
callId,
|
|
3093
|
+
modelKind: "reranking",
|
|
3094
|
+
providerId: model.providerId,
|
|
3095
|
+
modelId: model.modelId,
|
|
3096
|
+
responseId: metadata.providerIds?.responseId ?? callId,
|
|
3097
|
+
responseModelId: metadata.responseModelId,
|
|
3098
|
+
providerIds: metadata.providerIds,
|
|
3099
|
+
usage,
|
|
3100
|
+
cost: metadata.reportedCost ? { status: "reported", ...metadata.reportedCost } : estimate,
|
|
3101
|
+
...metadata.reportedCost ? { estimate } : {},
|
|
3102
|
+
route: metadata.route
|
|
3103
|
+
});
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
// src/objects/vectors/indexing-dispatch.ts
|
|
3107
|
+
var PAGE_SIZE = 100;
|
|
3108
|
+
var REDISPATCH_DELAY_MS = 30000;
|
|
3109
|
+
|
|
3110
|
+
class VectorIndexingDispatcher {
|
|
3111
|
+
projectId;
|
|
3112
|
+
indexing;
|
|
3113
|
+
queue;
|
|
3114
|
+
running = null;
|
|
3115
|
+
next = null;
|
|
3116
|
+
stopped = false;
|
|
3117
|
+
constructor(projectId, indexing, queue) {
|
|
3118
|
+
this.projectId = projectId;
|
|
3119
|
+
this.indexing = indexing;
|
|
3120
|
+
this.queue = queue;
|
|
3121
|
+
}
|
|
3122
|
+
notify() {
|
|
3123
|
+
this.drain().catch((error) => console.error("[Sixb] Could not dispatch vector indexing; maintenance will retry:", error));
|
|
3124
|
+
}
|
|
3125
|
+
drain() {
|
|
3126
|
+
this.next ??= settled(this.running).then(() => {
|
|
3127
|
+
this.next = null;
|
|
3128
|
+
if (this.stopped)
|
|
3129
|
+
return;
|
|
3130
|
+
this.running = this.pass().finally(() => {
|
|
3131
|
+
this.running = null;
|
|
3132
|
+
});
|
|
3133
|
+
return this.running;
|
|
3134
|
+
});
|
|
3135
|
+
return this.next;
|
|
3136
|
+
}
|
|
3137
|
+
async stop() {
|
|
3138
|
+
this.stopped = true;
|
|
3139
|
+
await settled(this.next);
|
|
3140
|
+
await settled(this.running);
|
|
3141
|
+
}
|
|
3142
|
+
async pass() {
|
|
3143
|
+
for (;; ) {
|
|
3144
|
+
const now = new Date;
|
|
3145
|
+
const work = await this.indexing.listDue({
|
|
3146
|
+
projectId: this.projectId,
|
|
3147
|
+
now: now.toISOString(),
|
|
3148
|
+
limit: PAGE_SIZE
|
|
3149
|
+
});
|
|
3150
|
+
if (work.length) {
|
|
3151
|
+
const jobs = [...new Map(work.map((item) => [item.batchId ?? item.id, item])).entries()];
|
|
3152
|
+
await this.queue.enqueue({
|
|
3153
|
+
projectId: this.projectId,
|
|
3154
|
+
jobs: jobs.map(([id, item]) => ({
|
|
3155
|
+
id,
|
|
3156
|
+
type: "vector.index.requested",
|
|
3157
|
+
payload: { indexingId: id },
|
|
3158
|
+
availableAt: item.availableAt
|
|
3159
|
+
}))
|
|
3160
|
+
});
|
|
3161
|
+
await this.indexing.dispatched({
|
|
3162
|
+
projectId: this.projectId,
|
|
3163
|
+
ids: work.map((item) => item.id),
|
|
3164
|
+
nextDispatchAt: new Date(now.getTime() + REDISPATCH_DELAY_MS).toISOString()
|
|
3165
|
+
});
|
|
3166
|
+
}
|
|
3167
|
+
if (work.length < PAGE_SIZE || this.stopped)
|
|
3168
|
+
return;
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3172
|
+
function settled(promise) {
|
|
3173
|
+
return (promise ?? Promise.resolve()).then(() => {
|
|
3174
|
+
return;
|
|
3175
|
+
}, () => {
|
|
3176
|
+
return;
|
|
3177
|
+
});
|
|
3178
|
+
}
|
|
3179
|
+
|
|
2996
3180
|
// src/agents/tool-catalog.ts
|
|
2997
3181
|
function createAgentToolCatalog(definitions) {
|
|
2998
3182
|
const tools = toolsFromProjectConfig(definitions);
|
|
@@ -3280,6 +3464,7 @@ class SixbHost2 {
|
|
|
3280
3464
|
webhookRegistry;
|
|
3281
3465
|
hostContext;
|
|
3282
3466
|
committedFacts;
|
|
3467
|
+
vectorIndexing;
|
|
3283
3468
|
eventService;
|
|
3284
3469
|
ontologyMaintenance;
|
|
3285
3470
|
storageReadiness;
|
|
@@ -3359,15 +3544,21 @@ class SixbHost2 {
|
|
|
3359
3544
|
...failure
|
|
3360
3545
|
})
|
|
3361
3546
|
});
|
|
3547
|
+
const vectorIndexing = this.storage.ontology.vectorIndexing;
|
|
3548
|
+
if (vectorIndexing && definitions.ontology.listObjectTypes().some((type) => Object.keys(type.search?.vectors ?? {}).length > 0)) {
|
|
3549
|
+
this.vectorIndexing = new VectorIndexingDispatcher(this.projectId, vectorIndexing, this.queues.vectorIndexing);
|
|
3550
|
+
}
|
|
3362
3551
|
this.ontologyMaintenance = new OntologyMaintenance({
|
|
3363
3552
|
projectId: this.projectId,
|
|
3364
3553
|
storage: this.storage,
|
|
3365
3554
|
dispatcher: this.committedFacts,
|
|
3555
|
+
vectorIndexing: this.vectorIndexing,
|
|
3366
3556
|
blobStorage: this.blobStorage,
|
|
3367
3557
|
options: options.ontologyMaintenance
|
|
3368
3558
|
});
|
|
3369
3559
|
this.hostContext = {
|
|
3370
3560
|
embeddingModels: definitions.models?.embedding,
|
|
3561
|
+
rerankingModels: definitions.models?.reranking,
|
|
3371
3562
|
projectId: this.projectId,
|
|
3372
3563
|
broker: this.broker,
|
|
3373
3564
|
ontology: definitions.ontology,
|
|
@@ -3392,15 +3583,18 @@ class SixbHost2 {
|
|
|
3392
3583
|
}
|
|
3393
3584
|
const modelExecution = new ModelExecutionSession({ ...this.hostContext, runtimeAuthorization: capturedScope.authorization }, capturedScope.execution);
|
|
3394
3585
|
const embeddingModels = bindEmbeddingModels(this.hostContext.embeddingModels, modelExecution);
|
|
3586
|
+
const rerankingModels = bindRerankingModels(this.hostContext.rerankingModels, modelExecution);
|
|
3395
3587
|
const objectReader = createAuthorizedObjectReader({
|
|
3396
3588
|
scope: capturedScope,
|
|
3397
3589
|
ontology: this.hostContext.ontology,
|
|
3398
3590
|
objectStorage: this.storage.objects,
|
|
3399
|
-
embeddingModels
|
|
3591
|
+
embeddingModels,
|
|
3592
|
+
rerankingModels
|
|
3400
3593
|
});
|
|
3401
3594
|
const runtime = {
|
|
3402
3595
|
...this.hostContext,
|
|
3403
3596
|
embeddingModels,
|
|
3597
|
+
rerankingModels,
|
|
3404
3598
|
modelExecution,
|
|
3405
3599
|
runtimeAuthorization: capturedScope.authorization,
|
|
3406
3600
|
objectReader,
|
|
@@ -3408,7 +3602,10 @@ class SixbHost2 {
|
|
|
3408
3602
|
};
|
|
3409
3603
|
registerOntologyMutationRuntime2(runtime, createOntologyMutationRuntime2({
|
|
3410
3604
|
materializer: this.materializer.withScope(capturedScope),
|
|
3411
|
-
notifyCommittedFacts: () =>
|
|
3605
|
+
notifyCommittedFacts: () => {
|
|
3606
|
+
this.committedFacts.notify();
|
|
3607
|
+
this.vectorIndexing?.notify();
|
|
3608
|
+
}
|
|
3412
3609
|
}));
|
|
3413
3610
|
return createBoundSixb(runtime, this.sixbDependencies(), capturedScope.execution);
|
|
3414
3611
|
}
|
|
@@ -3442,6 +3639,7 @@ class SixbHost2 {
|
|
|
3442
3639
|
}
|
|
3443
3640
|
async closeBroker() {
|
|
3444
3641
|
await this.committedFacts.stop();
|
|
3642
|
+
await this.vectorIndexing?.stop();
|
|
3445
3643
|
await this.ontologyMaintenance.stop();
|
|
3446
3644
|
await this.broker.close?.();
|
|
3447
3645
|
}
|
|
@@ -3456,6 +3654,7 @@ class SixbHost2 {
|
|
|
3456
3654
|
connectorService: this.connectorService,
|
|
3457
3655
|
...this.connectorService.connectionProcess === undefined ? {} : { connectorConnections: this.connectorService.connectionProcess },
|
|
3458
3656
|
blobStorage: this.blobStorage,
|
|
3657
|
+
apiPublicOrigin: () => getApiPublicOrigin(this),
|
|
3459
3658
|
lakeStorage: this.lakeStorage
|
|
3460
3659
|
};
|
|
3461
3660
|
}
|
|
@@ -3527,4 +3726,4 @@ async function createSixb2(options) {
|
|
|
3527
3726
|
}
|
|
3528
3727
|
export { WebhookValidationError2, defineWebhook2, webhookConnector2, UnverifiedWebhookError2, resolveWebhookVerification2, warnUnverifiedWebhook2, SixbHost2, createSixb2 };
|
|
3529
3728
|
|
|
3530
|
-
//# debugId=
|
|
3729
|
+
//# debugId=CC8274E37BA99FA964756E2164756E21
|