@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
|
@@ -20,7 +20,7 @@ import type {
|
|
|
20
20
|
TelemetrySeriesRef,
|
|
21
21
|
} from "../../materialization/model"
|
|
22
22
|
import type { OntologyCommitRecord, OntologyCommitWrite } from "./commits"
|
|
23
|
-
import type { OntologyMaterializationEventDraft
|
|
23
|
+
import type { OntologyMaterializationEventDraft } from "./outbox"
|
|
24
24
|
import type { StoredSourceLinkAssertion, StoredSourceObjectAssertion } from "./sources"
|
|
25
25
|
|
|
26
26
|
export interface StoredObjectOverride {
|
|
@@ -112,11 +112,6 @@ export interface SourceReplacementLinkState extends Omit<MaterializationLinkStat
|
|
|
112
112
|
readonly diffRequired: boolean
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
export interface SourceReplacementStatePage {
|
|
116
|
-
readonly objects: readonly SourceReplacementObjectState[]
|
|
117
|
-
readonly links: readonly SourceReplacementLinkState[]
|
|
118
|
-
}
|
|
119
|
-
|
|
120
115
|
export interface MaterializationStateRequestChunk {
|
|
121
116
|
readonly objects: readonly OntologyObjectRef[]
|
|
122
117
|
readonly links: readonly OntologyLinkRef[]
|
|
@@ -162,6 +157,14 @@ export interface MaterializationPlanHeader {
|
|
|
162
157
|
*/
|
|
163
158
|
readonly commit: OntologyCommitWrite
|
|
164
159
|
readonly expected: MaterializationCasState
|
|
160
|
+
/**
|
|
161
|
+
* A projection commit applies the durable plan of this candidate, refreshed in the same
|
|
162
|
+
* transaction, instead of work staged on the session.
|
|
163
|
+
*/
|
|
164
|
+
readonly plan?: {
|
|
165
|
+
readonly source: ProjectionSourceRef
|
|
166
|
+
readonly materializationId: string
|
|
167
|
+
}
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
export interface ExactObjectOverrideWrite {
|
|
@@ -204,23 +207,6 @@ export interface ExactLinkSlotOverrideDelete {
|
|
|
204
207
|
readonly expectedLastCommitId: string
|
|
205
208
|
}
|
|
206
209
|
|
|
207
|
-
export interface ExactOverrideWrites {
|
|
208
|
-
readonly objects: {
|
|
209
|
-
readonly upserts: readonly ExactObjectOverrideWrite[]
|
|
210
|
-
readonly deletes: readonly ExactObjectOverrideDelete[]
|
|
211
|
-
}
|
|
212
|
-
readonly links: {
|
|
213
|
-
readonly edges: {
|
|
214
|
-
readonly upserts: readonly ExactLinkOverrideWrite[]
|
|
215
|
-
readonly deletes: readonly ExactLinkOverrideDelete[]
|
|
216
|
-
}
|
|
217
|
-
readonly slots: {
|
|
218
|
-
readonly upserts: readonly ExactLinkSlotOverrideWrite[]
|
|
219
|
-
readonly deletes: readonly ExactLinkSlotOverrideDelete[]
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
210
|
export interface ExactEffectiveObjectWrite {
|
|
225
211
|
readonly row: EffectiveObjectSnapshot
|
|
226
212
|
readonly expected: ExpectedObjectRevision
|
|
@@ -241,29 +227,11 @@ export interface ExactEffectiveLinkDelete {
|
|
|
241
227
|
readonly expected: Extract<ExpectedLinkRevision, { readonly exists: true }>
|
|
242
228
|
}
|
|
243
229
|
|
|
244
|
-
export interface ExactEffectiveWrites {
|
|
245
|
-
readonly objectUpserts: readonly ExactEffectiveObjectWrite[]
|
|
246
|
-
readonly objectDeletes: readonly ExactEffectiveObjectDelete[]
|
|
247
|
-
readonly linkUpserts: readonly ExactEffectiveLinkWrite[]
|
|
248
|
-
readonly linkDeletes: readonly ExactEffectiveLinkDelete[]
|
|
249
|
-
}
|
|
250
|
-
|
|
251
230
|
export interface ExactTimeseriesPointWrite {
|
|
252
231
|
readonly point: StoredTelemetryPoint
|
|
253
232
|
readonly expected: ExpectedTimeseriesPointRevision
|
|
254
233
|
}
|
|
255
234
|
|
|
256
|
-
export interface ExactTimeseriesWrites {
|
|
257
|
-
readonly pointUpserts: readonly ExactTimeseriesPointWrite[]
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export interface MaterializationPlanChunk {
|
|
261
|
-
readonly overrides: ExactOverrideWrites
|
|
262
|
-
readonly effective: ExactEffectiveWrites
|
|
263
|
-
readonly timeseries: ExactTimeseriesWrites
|
|
264
|
-
readonly outbox: readonly OntologyOutboxWrite[]
|
|
265
|
-
}
|
|
266
|
-
|
|
267
235
|
export interface SourceActivationWrite {
|
|
268
236
|
readonly source: ProjectionSourceRef
|
|
269
237
|
readonly materializationId: string
|
|
@@ -284,11 +252,6 @@ export interface MaterializationPlanFinalization {
|
|
|
284
252
|
readonly result: EditCommitResult | ProjectionCommitResult | TelemetryCommitResult
|
|
285
253
|
}
|
|
286
254
|
|
|
287
|
-
export interface ApplyMaterializationChunkInput {
|
|
288
|
-
readonly session: MaterializationSession
|
|
289
|
-
readonly chunk: MaterializationPlanChunk
|
|
290
|
-
}
|
|
291
|
-
|
|
292
255
|
export interface FinalizeMaterializationInput {
|
|
293
256
|
readonly session: MaterializationSession
|
|
294
257
|
readonly finalization: MaterializationPlanFinalization
|
|
@@ -304,14 +267,6 @@ export interface StreamMaterializationStateInput {
|
|
|
304
267
|
readonly pageRows: number
|
|
305
268
|
}
|
|
306
269
|
|
|
307
|
-
export interface StreamSourceReplacementStateInput {
|
|
308
|
-
readonly session: MaterializationSession
|
|
309
|
-
readonly source: ProjectionSourceRef
|
|
310
|
-
readonly candidateMaterializationId: string
|
|
311
|
-
readonly entityKind: "object" | "link"
|
|
312
|
-
readonly pageRows: number
|
|
313
|
-
}
|
|
314
|
-
|
|
315
270
|
export type MaterializationWorkEntityKind = "object" | "link" | "point"
|
|
316
271
|
|
|
317
272
|
export interface MaterializationClassificationWorkRecord {
|
|
@@ -321,6 +276,7 @@ export interface MaterializationClassificationWorkRecord {
|
|
|
321
276
|
readonly identityKey: string
|
|
322
277
|
}
|
|
323
278
|
|
|
279
|
+
/** Replacement plans only: the existence an object is planned to have, read by its links. */
|
|
324
280
|
export interface MaterializationObjectExistenceWorkRecord {
|
|
325
281
|
readonly kind: "object-existence"
|
|
326
282
|
readonly recordKey: string
|
|
@@ -328,6 +284,7 @@ export interface MaterializationObjectExistenceWorkRecord {
|
|
|
328
284
|
readonly exists: boolean
|
|
329
285
|
}
|
|
330
286
|
|
|
287
|
+
/** Replacement plans only: an object whose existence flips, so its links join the plan. */
|
|
331
288
|
export interface MaterializationIncidentObjectWorkRecord {
|
|
332
289
|
readonly kind: "incident-object"
|
|
333
290
|
readonly recordKey: string
|
|
@@ -419,28 +376,36 @@ export type MaterializationWorkRecord =
|
|
|
419
376
|
|
|
420
377
|
export interface StageMaterializationWorkInput {
|
|
421
378
|
readonly session: MaterializationSession
|
|
422
|
-
/**
|
|
379
|
+
/**
|
|
380
|
+
* Insert-only and batch-atomic. Staging closes once vector changes stream or the plan applies.
|
|
381
|
+
* Object existence and incident objects belong to replacement plans and are rejected here.
|
|
382
|
+
*/
|
|
423
383
|
readonly records: readonly MaterializationWorkRecord[]
|
|
424
384
|
}
|
|
425
385
|
|
|
426
|
-
export interface
|
|
386
|
+
export interface StreamMaterializationVectorChangesInput {
|
|
427
387
|
readonly session: MaterializationSession
|
|
428
|
-
/**
|
|
429
|
-
readonly
|
|
388
|
+
/** Object types that declare vector profiles. */
|
|
389
|
+
readonly objectTypeIds: readonly string[]
|
|
430
390
|
readonly pageRows: number
|
|
431
391
|
}
|
|
432
392
|
|
|
433
|
-
export
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
393
|
+
export type MaterializationVectorChange = Extract<
|
|
394
|
+
MaterializationPlanWorkItem,
|
|
395
|
+
{ readonly kind: "object-upsert" | "object-delete" }
|
|
396
|
+
>
|
|
397
|
+
|
|
398
|
+
export interface MaterializationVectorChangePage {
|
|
399
|
+
readonly items: readonly MaterializationVectorChange[]
|
|
439
400
|
}
|
|
440
401
|
|
|
441
|
-
export interface
|
|
402
|
+
export interface ApplyMaterializationInput {
|
|
442
403
|
readonly session: MaterializationSession
|
|
443
|
-
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export interface AppliedMaterialization {
|
|
407
|
+
/** Outbox events written, with commit ordinals contiguous from zero. */
|
|
408
|
+
readonly eventCount: number
|
|
444
409
|
}
|
|
445
410
|
|
|
446
411
|
export interface MaterializationObjectExistence {
|
|
@@ -451,15 +416,21 @@ export interface MaterializationObjectExistence {
|
|
|
451
416
|
export interface OntologyMaterializationStorage {
|
|
452
417
|
begin(input: MaterializationPlanHeader): Promise<MaterializationSession>
|
|
453
418
|
streamState(input: StreamMaterializationStateInput): AsyncIterable<MaterializationStatePage>
|
|
454
|
-
|
|
455
|
-
input: StreamSourceReplacementStateInput
|
|
456
|
-
): AsyncIterable<SourceReplacementStatePage>
|
|
419
|
+
/** Not on a plan-bound session: its work is the durable plan. */
|
|
457
420
|
stageWork(input: StageMaterializationWorkInput): Promise<void>
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
421
|
+
/**
|
|
422
|
+
* Staged object upserts and deletes that vector profiles must see before they apply: those of
|
|
423
|
+
* `objectTypeIds`, and any other object that still holds a stored vector. Streams once, before
|
|
424
|
+
* `apply`.
|
|
425
|
+
*/
|
|
426
|
+
streamVectorChanges(
|
|
427
|
+
input: StreamMaterializationVectorChangesInput
|
|
428
|
+
): AsyncIterable<MaterializationVectorChangePage>
|
|
429
|
+
/**
|
|
430
|
+
* Validates the staged cardinality, applies the staged plan in phase order and writes the staged
|
|
431
|
+
* events to the outbox in canonical order. Once per session, before `finalize`.
|
|
432
|
+
*/
|
|
433
|
+
apply(input: ApplyMaterializationInput): Promise<AppliedMaterialization>
|
|
463
434
|
/**
|
|
464
435
|
* Finalizes ontology-owned state only. Execution checkpoints remain owned by their run stores
|
|
465
436
|
* and are coordinated by the Materializer through the enclosing Storage transaction.
|
|
@@ -6,13 +6,6 @@ export type {
|
|
|
6
6
|
OntologyMaterializationEventDraft,
|
|
7
7
|
} from "../../materialization/events"
|
|
8
8
|
|
|
9
|
-
export interface OntologyOutboxWrite {
|
|
10
|
-
/** Providers may index envelope identity fields, but the envelope remains authoritative. */
|
|
11
|
-
readonly envelope: OntologyMaterializationEvent
|
|
12
|
-
readonly availableAt: string
|
|
13
|
-
readonly createdAt: string
|
|
14
|
-
}
|
|
15
|
-
|
|
16
9
|
/** Error codes a durable ontology outbox delivery can persist. */
|
|
17
10
|
export const ONTOLOGY_OUTBOX_FAILURE_CODES = ["event.delivery_failed"] as const satisfies readonly [
|
|
18
11
|
SixbErrorCode,
|
|
@@ -23,6 +16,10 @@ export type OntologyOutboxFailureCode = (typeof ONTOLOGY_OUTBOX_FAILURE_CODES)[n
|
|
|
23
16
|
export type OntologyOutboxFailure = SixbFailure<OntologyOutboxFailureCode>
|
|
24
17
|
|
|
25
18
|
export interface OntologyOutboxRecord {
|
|
19
|
+
/**
|
|
20
|
+
* The event as consumers receive it. Providers store only its draft and rebuild the rest from
|
|
21
|
+
* its commit.
|
|
22
|
+
*/
|
|
26
23
|
readonly envelope: OntologyMaterializationEvent
|
|
27
24
|
readonly availableAt: string
|
|
28
25
|
readonly attempts: number
|
|
@@ -38,55 +38,6 @@ function assertCommitEnvelope(commit: OntologyCommitWrite): void {
|
|
|
38
38
|
assertNonblank(commit.executionId, "Materialization execution id")
|
|
39
39
|
assertNonblank(commit.ontologyRevision, "Materialization ontology revision")
|
|
40
40
|
assertTimestamp(commit.committedAt, "Materialization commit time")
|
|
41
|
-
assertCommitAttribution(commit)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** Shape only: the Materializer copies both values from the execution it has already verified. */
|
|
45
|
-
function assertCommitAttribution(commit: OntologyCommitWrite): void {
|
|
46
|
-
const { requestedBy, executor } = commit
|
|
47
|
-
if (requestedBy !== undefined) {
|
|
48
|
-
if (requestedBy.type !== "user" && requestedBy.type !== "serviceAccount") {
|
|
49
|
-
invalidCorrelation("Materialization requester must be a user or service account.")
|
|
50
|
-
}
|
|
51
|
-
assertNonblank(requestedBy.id, "Materialization requester id")
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
switch (executor?.type) {
|
|
55
|
-
case "request":
|
|
56
|
-
assertNonblank(executor.requestId, "Materialization executor request id")
|
|
57
|
-
return
|
|
58
|
-
case "primitive":
|
|
59
|
-
assertNonblank(executor.kind, "Materialization executor primitive kind")
|
|
60
|
-
assertNonblank(executor.id, "Materialization executor primitive id")
|
|
61
|
-
assertNonblank(executor.runId, "Materialization executor run id")
|
|
62
|
-
return
|
|
63
|
-
case "agent":
|
|
64
|
-
assertNonblank(executor.runId, "Materialization executor Agent run id")
|
|
65
|
-
return
|
|
66
|
-
case "kernel":
|
|
67
|
-
assertNonblank(executor.operation?.type, "Materialization executor kernel operation")
|
|
68
|
-
return
|
|
69
|
-
default:
|
|
70
|
-
invalidCorrelation("Materialization executor is invalid.")
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/** A governed or projected write is attributed to exactly the primitive run that owns it. */
|
|
75
|
-
function assertPrimitiveExecutor(
|
|
76
|
-
commit: OntologyCommitWrite,
|
|
77
|
-
kind: "action" | "projection",
|
|
78
|
-
id: string,
|
|
79
|
-
runId: string
|
|
80
|
-
): void {
|
|
81
|
-
const { executor } = commit
|
|
82
|
-
if (
|
|
83
|
-
executor.type !== "primitive" ||
|
|
84
|
-
executor.kind !== kind ||
|
|
85
|
-
executor.id !== id ||
|
|
86
|
-
executor.runId !== runId
|
|
87
|
-
) {
|
|
88
|
-
invalidCorrelation(`Commit ${kind} origin does not match its executor.`)
|
|
89
|
-
}
|
|
90
41
|
}
|
|
91
42
|
|
|
92
43
|
function assertEditCommit(commit: OntologyCommitWrite, intent: EditOntologyCommitIntent): void {
|
|
@@ -96,7 +47,6 @@ function assertEditCommit(commit: OntologyCommitWrite, intent: EditOntologyCommi
|
|
|
96
47
|
case "action":
|
|
97
48
|
assertNonblank(commit.origin.actionId, "Action origin action id")
|
|
98
49
|
assertNonblank(commit.origin.runId, "Action origin run id")
|
|
99
|
-
assertPrimitiveExecutor(commit, "action", commit.origin.actionId, commit.origin.runId)
|
|
100
50
|
return
|
|
101
51
|
case "runtime":
|
|
102
52
|
assertNonblank(commit.origin.requestId, "Runtime origin request id")
|
|
@@ -127,12 +77,6 @@ function assertProjectionCommit(
|
|
|
127
77
|
) {
|
|
128
78
|
invalidCorrelation("Projection commit origin does not match its dataset version.")
|
|
129
79
|
}
|
|
130
|
-
assertPrimitiveExecutor(
|
|
131
|
-
commit,
|
|
132
|
-
"projection",
|
|
133
|
-
commit.origin.projectionId,
|
|
134
|
-
commit.origin.projectionRunId
|
|
135
|
-
)
|
|
136
80
|
}
|
|
137
81
|
|
|
138
82
|
function assertTelemetryCommit(
|
|
@@ -198,7 +142,6 @@ function assertProjectionTelemetryCommit(
|
|
|
198
142
|
if (origin.batchOrdinal !== source.batchOrdinal) {
|
|
199
143
|
invalidCorrelation("Projection telemetry origin does not match its batch ordinal.")
|
|
200
144
|
}
|
|
201
|
-
assertPrimitiveExecutor(commit, "projection", origin.projectionId, origin.projectionRunId)
|
|
202
145
|
}
|
|
203
146
|
|
|
204
147
|
function assertProjectionTelemetryBatch(
|