@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
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
isActionDefinition2,
|
|
12
12
|
isGroupDefinition
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-svabwqdq.js";
|
|
14
14
|
import {
|
|
15
15
|
isModelReasoning2
|
|
16
16
|
} from "./chunk-pqajwytd.js";
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
} from "./chunk-69266efg.js";
|
|
20
20
|
import {
|
|
21
21
|
isAgentToolDefinition2
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-cnb5kv05.js";
|
|
23
23
|
import {
|
|
24
24
|
WorkflowDefinitionError2,
|
|
25
25
|
assertNonEmpty,
|
|
26
26
|
isStepDefinition2,
|
|
27
27
|
isAgentStepDefinition2,
|
|
28
28
|
isInterventionDefinition2
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6wbm6ymz.js";
|
|
30
30
|
import {
|
|
31
31
|
isScheduleDefinition2
|
|
32
32
|
} from "./chunk-e1c18xjx.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
ModelProviderError2,
|
|
35
35
|
UnsupportedModelFeatureError2,
|
|
36
36
|
StructuredOutputError2
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-kyjcwqz6.js";
|
|
38
38
|
|
|
39
39
|
// src/workflows/agent-step-identity.ts
|
|
40
40
|
function workflowAgentStepActorId2(workflowId, stepId) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/blob-storage/errors.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Error for blob storage invariants and provider-level failures.\n */\nexport class BlobStorageError extends Error {\n readonly name = \"BlobStorageError\"\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;AAGO,MAAM,0BAAyB,MAAM;AAAA,EACjC,OAAO;AAClB;",
|
|
8
|
+
"debugId": "A71607D07E6D8E0364756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sources": ["../src/projections/types.ts", "../src/storage/projection-runs/types.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { SixbErrorCode } from \"../errors/types\"\n\n/** Error codes a projection run can persist and expose through its public contract. */\nexport const PROJECTION_RUN_FAILURE_CODES = [\n \"internal.unexpected\",\n \"runtime.cancelled\",\n \"queue.enqueue_failed\",\n \"projection.execution_failed\",\n \"storage.unavailable\",\n] as const satisfies readonly [SixbErrorCode, ...SixbErrorCode[]]\n\nexport type ProjectionRunFailureCode = (typeof PROJECTION_RUN_FAILURE_CODES)[number]\n\n/**\n * Lowered, serializable definition interfaces for projection DSL.\n *\n * These are the runtime-inspectable data structures that projection builders\n * lower into. They use plain string ids (no tokens, no methods) so they can\n * be stored, serialized, and introspected by tooling.\n */\n\n/**\n * Describes how a foreign key column in a dataset resolves to a link target.\n *\n * The source can be either a projected source property or a raw dataset field.\n * Its value equals the target object's primary property value, creating an\n * implicit link between source and target.\n *\n * `targetObjectTypeId` declares the concrete target type for this projection.\n * It must be the same type or a subtype (via `extends`) of the link's declared\n * target at the ontology level. Validation of the subtype relationship happens\n * at Sixb startup (Increment 7), not at DSL build time.\n */\nexport interface ForeignKeyDescriptor {\n readonly linkId: string\n /** Object property holding the target id. Mutually exclusive with sourceField. */\n readonly sourcePropertyId?: string\n /** Dataset column holding the target id. Mutually exclusive with sourcePropertyId. */\n readonly sourceField?: string\n readonly targetObjectTypeId: string\n}\n\n/** Resolves competing source-projection and managed-edit values for projected properties. */\nexport type SourceEditConflictResolution =\n | { readonly strategy: \"editsWin\" }\n | { readonly strategy: \"mostRecent\"; readonly sourceTimestamp: string }\n\n/**\n * Lowered, serializable definition for projecting a dataset into object instances.\n *\n * Each row contributes one complete object root to an authoritative replacement snapshot, with\n * properties mapped from dataset columns to object type properties. Duplicate roots are rejected.\n * FK links are resolved from source property or dataset field values to target object primary\n * values.\n */\nexport interface ObjectProjectionDefinition {\n readonly _tag: \"ObjectProjectionDefinition\"\n readonly id: string\n readonly objectTypeId: string\n readonly datasetId: string\n /** Maps object type property id -> dataset column name. */\n readonly properties: Readonly<Record<string, string>>\n /** Maps link id -> FK descriptor. Empty `{}` when no FK links are projected. */\n readonly links: Readonly<Record<string, ForeignKeyDescriptor>>\n /** Defaults to `editsWin` when omitted by a legacy lowered definition. */\n readonly conflictResolution?: SourceEditConflictResolution\n}\n\n/**\n * Lowered, serializable definition for projecting a join dataset into link instances.\n *\n * Each row in the join dataset contributes one complete link root to an authoritative replacement\n * snapshot, identified by its source, link id, and target. Duplicate roots are rejected.\n */\nexport interface LinkProjectionDefinition {\n readonly _tag: \"LinkProjectionDefinition\"\n readonly id: string\n readonly linkId: string\n readonly sourceObjectTypeId: string\n readonly targetObjectTypeId: string\n readonly datasetId: string\n /** Dataset column holding the source object's primary property value. */\n readonly sourceField: string\n /** Dataset column holding the target object's primary property value. */\n readonly targetField: string\n}\n\n/** Dataset columns that produce one telemetry property value. */\nexport interface TelemetryProjectionPropertyMapping {\n /** Dataset column holding the telemetry value. */\n readonly valueField: string\n /** Dataset column holding the telemetry unit, when the property requires one. */\n readonly unitField?: string\n}\n\n/**\n * Lowered, serializable definition for projecting dataset rows into telemetry history.\n *\n * Each row shares one target object id and observation timestamp, then contributes up to one\n * telemetry point for every mapped property. A property-token projection is lowered to the same\n * shape with one entry, so execution and ownership have one canonical contract.\n */\nexport interface TelemetryProjectionDefinition {\n readonly _tag: \"TelemetryProjectionDefinition\"\n readonly id: string\n readonly objectTypeId: string\n readonly datasetId: string\n /** Dataset column holding the target object's primary id. */\n readonly objectIdField: string\n /** Dataset column holding the telemetry observation timestamp. */\n readonly atField: string\n /** Maps telemetry property id -> value and optional unit dataset columns. */\n readonly properties: Readonly<Record<string, TelemetryProjectionPropertyMapping>>\n}\n\n/** Union of all projection definition types. */\nexport type ProjectionDefinition =\n | ObjectProjectionDefinition\n | LinkProjectionDefinition\n | TelemetryProjectionDefinition\n\nexport interface ProjectionOwnership {\n readonly objects: readonly {\n readonly objectTypeId: string\n readonly existence: boolean\n readonly propertyIds: readonly string[]\n }[]\n readonly links: readonly {\n readonly sourceObjectTypeId: string\n readonly linkId: string\n }[]\n readonly telemetry: readonly {\n readonly objectTypeId: string\n readonly propertyId: string\n }[]\n}\n\n/** Canonical correlation between a projection kind and its materialization protocol. */\nexport type ProjectionProtocolIdentity =\n | { readonly projectionKind: \"object\"; readonly protocol: \"replacement\" }\n | { readonly projectionKind: \"link\"; readonly protocol: \"replacement\" }\n | { readonly projectionKind: \"telemetry\"; readonly protocol: \"telemetry\" }\n\nexport type ProjectionKind = ProjectionProtocolIdentity[\"projectionKind\"]\n\nexport interface ObjectProjectionTarget {\n readonly objectTypeId: string\n}\n\nexport interface LinkProjectionTarget {\n readonly sourceObjectTypeId: string\n readonly targetObjectTypeId: string\n}\n\nexport interface ProjectionTargetByKind {\n readonly object: ObjectProjectionTarget\n readonly link: LinkProjectionTarget\n readonly telemetry: ObjectProjectionTarget\n}\n\n/** Object types affected by one projection, correlated with its projection kind. */\nexport type ProjectionTarget<TKind extends ProjectionKind = ProjectionKind> =\n ProjectionTargetByKind[TKind]\n\n/**\n * Frozen semantic identity used to dispatch one registered projection.\n *\n * Dataset version metadata is attached only when a committed dataset event is routed. Keeping the\n * registry-owned fields together prevents the orchestrator from recomputing ontology semantics.\n */\nexport type ProjectionDispatchDescriptor = ProjectionDispatchDescriptorBase &\n ProjectionProtocolIdentity\n\ninterface ProjectionDispatchDescriptorBase {\n readonly projectionId: string\n readonly datasetId: string\n readonly ontologyRevision: string\n readonly projectionRevision: string\n readonly ownershipHash: string\n}\n\nexport interface ResolvedProjection<TDefinition extends ProjectionDefinition> {\n readonly projectionId: string\n readonly datasetId: string\n readonly projectionRevision: string\n readonly ownershipHash: string\n readonly ownership: ProjectionOwnership\n readonly definition: TDefinition\n}\n",
|
|
6
|
-
"import type { SixbFailure } from \"../../errors/types\"\nimport type {\n PinnedDatasetVersion,\n ProjectionExecution,\n ProjectionMaterializationIdentity,\n ProjectionRunTerminalDecision,\n} from \"../../materialization/model\"\nimport type {\n LinkProjectionTarget,\n ObjectProjectionTarget,\n ProjectionKind,\n ProjectionRunFailureCode,\n ProjectionTarget,\n} from \"../../projections/types\"\n\nexport type { ProjectionRunFailureCode } from \"../../projections/types\"\nexport { PROJECTION_RUN_FAILURE_CODES } from \"../../projections/types\"\n\n/**\n * `superseded` ends a replacement run whose output would be stale on arrival: a run of the same\n * projection pinned to a later dataset version exists and has not failed. Telemetry runs append\n * readings rather than replace a source, so none is ever superseded.\n */\nexport type ProjectionRunStatus =\n | \"queued\"\n | \"running\"\n | \"succeeded\"\n | \"failed\"\n | \"cancelled\"\n | \"superseded\"\n\nexport interface ProjectionRunProgress {\n /** Physical immutable-version rows consumed, before normalization or semantic materialization. */\n readonly sourceRowsRead: number\n /** Physical rows intentionally skipped because a required mapped value was blank. */\n readonly sourceRowsSkipped: number\n /** Maximum complete change records consumed by one incremental attempt; not a recovery cursor. */\n readonly sourceChangesRead?: number\n}\n\nconst progressKeyFlags: Record<keyof ProjectionRunProgress, true> = {\n sourceRowsRead: true,\n sourceRowsSkipped: true,\n sourceChangesRead: true,\n}\n\nexport const PROJECTION_RUN_PROGRESS_KEYS = Object.keys(\n progressKeyFlags\n) as readonly (keyof ProjectionRunProgress)[]\n\nexport function zeroProjectionRunProgress(): ProjectionRunProgress {\n return { sourceRowsRead: 0, sourceRowsSkipped: 0 }\n}\n\nexport interface ProjectionTelemetryCheckpoint {\n readonly fixedBatchSize: number\n readonly nextBatchOrdinal: number\n readonly nextRowOffset: number\n readonly inputExhausted: boolean\n}\n\n/**\n * The object a telemetry batch is waiting for, and when this run first found it missing.\n *\n * A projection's dataset can legitimately be materialized before the objects it references, so\n * the run waits instead of failing. The wait needs a start, and the run has no other durable one:\n * `startedAt` is when the run began, which on a batched projection is long before the batch that\n * cannot commit, and `attempt` counts every reclaim including the ones an unreachable queue caused.\n *\n * Cleared by any committed batch, so a run that is making progress never carries a stale wait.\n */\nexport interface ProjectionMissingTarget {\n readonly objectTypeId: string\n readonly objectId: string\n /** The batch that could not commit because of it. */\n readonly batchOrdinal: number\n readonly firstSeenAt: Date\n}\n\ninterface ProjectionRunRecordBase {\n readonly id: string\n readonly projectId: string\n readonly executionId: string\n readonly status: ProjectionRunStatus\n readonly attempt: number\n readonly progress: ProjectionRunProgress\n readonly queuedAt: Date\n readonly startedAt?: Date\n readonly finishedAt?: Date\n /**\n * The run's most recent failure, read with its status: on a `running` run, why its last attempt\n * failed while the queue retries it; on a `failed` or `cancelled` run, why it ended. Cleared when\n * the run succeeds or is superseded, so a present error always describes something current.\n */\n readonly error?: SixbFailure<ProjectionRunFailureCode>\n}\n\ntype ProjectionIdentity<TKind extends ProjectionKind> = Extract<\n ProjectionMaterializationIdentity,\n { readonly projectionKind: TKind }\n>\n\nexport type ObjectProjectionRunRecord = ProjectionRunRecordBase & {\n readonly identity: ProjectionIdentity<\"object\">\n readonly target: ObjectProjectionTarget\n readonly telemetryCheckpoint?: never\n readonly missingTarget?: never\n}\n\nexport type LinkProjectionRunRecord = ProjectionRunRecordBase & {\n readonly identity: ProjectionIdentity<\"link\">\n readonly target: LinkProjectionTarget\n readonly telemetryCheckpoint?: never\n readonly missingTarget?: never\n}\n\nexport type TelemetryProjectionRunRecord = ProjectionRunRecordBase & {\n readonly identity: ProjectionIdentity<\"telemetry\">\n readonly target: ObjectProjectionTarget\n readonly telemetryCheckpoint: ProjectionTelemetryCheckpoint\n /**\n * Only telemetry carries this: `MaterializationObjectNotFoundError` is raised by telemetry\n * validation alone, and only a batched protocol has a checkpoint to anchor the wait to.\n */\n readonly missingTarget?: ProjectionMissingTarget\n}\n\n/** Durable projection lifecycle state. The execution token is deliberately returned separately. */\nexport type ProjectionRunRecord =\n | ObjectProjectionRunRecord\n | LinkProjectionRunRecord\n | TelemetryProjectionRunRecord\n\nexport function projectionRunObjectTypesVisible(\n run: ProjectionRunRecord,\n canView: (objectTypeId: string) => boolean\n): boolean {\n const target: ProjectionTarget = run.target\n if (\"sourceObjectTypeId\" in target) {\n return canView(target.sourceObjectTypeId) && canView(target.targetObjectTypeId)\n }\n return canView(target.objectTypeId)\n}\n\ninterface ProjectionRunAdmissionBase {\n readonly id: string\n readonly projectId: string\n readonly executionId: string\n readonly queuedAt?: Date\n}\n\nexport type QueueProjectionRunInput =\n | (ProjectionRunAdmissionBase & {\n readonly identity: ProjectionIdentity<\"object\">\n readonly target: ObjectProjectionRunRecord[\"target\"]\n readonly fixedBatchSize?: never\n })\n | (ProjectionRunAdmissionBase & {\n readonly identity: ProjectionIdentity<\"link\">\n readonly target: LinkProjectionRunRecord[\"target\"]\n readonly fixedBatchSize?: never\n })\n | (ProjectionRunAdmissionBase & {\n readonly identity: ProjectionIdentity<\"telemetry\">\n readonly target: TelemetryProjectionRunRecord[\"target\"]\n readonly fixedBatchSize: number\n })\n\nexport type StartOrReclaimProjectionRunInput = QueueProjectionRunInput extends infer TInput\n ? TInput extends QueueProjectionRunInput\n ? Omit<TInput, \"executionId\" | \"queuedAt\"> & { readonly startedAt?: Date }\n : never\n : never\n\nexport interface FailProjectionRunEnqueueInput {\n readonly id: string\n readonly projectId: string\n readonly finishedAt?: Date\n readonly error: SixbFailure<ProjectionRunFailureCode>\n}\n\nexport interface ProjectionRunClaim {\n readonly run: ProjectionRunRecord\n readonly execution: ProjectionExecution\n}\n\nexport interface LockProjectionRunForMaterializationInput {\n readonly id: string\n readonly projectId: string\n readonly executionToken: string\n readonly identity: ProjectionMaterializationIdentity\n}\n\nexport interface UpdateProjectionRunInput extends LockProjectionRunForMaterializationInput {\n readonly progress: Partial<ProjectionRunProgress>\n}\n\nexport type FinishProjectionRunInput = ProjectionRunTerminalDecision &\n LockProjectionRunForMaterializationInput & {\n readonly finishedAt?: Date\n readonly progress?: Partial<ProjectionRunProgress>\n }\n\nexport interface AdvanceProjectionTelemetryCheckpointInput\n extends LockProjectionRunForMaterializationInput {\n /** Must equal the run's current nextBatchOrdinal. */\n readonly batchOrdinal: number\n /** Physical dataset rows consumed by this batch, including skipped rows. */\n readonly batchRowCount: number\n /** Physical rows intentionally skipped inside this batch. */\n readonly batchRowsSkipped: number\n /** True when this batch consumed the final row of the immutable dataset version. */\n readonly inputExhausted: boolean\n}\n\nexport interface RecordProjectionMissingTargetInput\n extends LockProjectionRunForMaterializationInput {\n readonly missingTarget: ProjectionMissingTarget\n}\n\nexport interface RecordProjectionAttemptFailureInput\n extends LockProjectionRunForMaterializationInput {\n readonly error: SixbFailure<ProjectionRunFailureCode>\n}\n\nexport interface FindSupersedingProjectionRunInput {\n readonly projectId: string\n /** The run that may be superseded. */\n readonly id: string\n}\n\nexport interface ListProjectionRunsInput {\n readonly projectId: string\n readonly projectionId?: string\n readonly projectionKind?: ProjectionKind\n readonly datasetId?: string\n readonly datasetVersionId?: string\n /**\n * Viewable object type ids. A run is included only if every target type is present. Omit for an\n * unrestricted internal execution; an empty set matches no runs.\n */\n readonly objectTypeIds?: readonly string[]\n readonly statuses?: readonly ProjectionRunStatus[]\n readonly startedAfter?: Date\n readonly startedBefore?: Date\n readonly limit?: number\n readonly offset?: number\n readonly order?: \"asc\" | \"desc\"\n}\n\nexport interface ListProjectionRunsResult {\n readonly runs: readonly ProjectionRunRecord[]\n readonly hasMore: boolean\n readonly total: number\n}\n\nexport interface ListLatestProjectionRunsInput {\n readonly projectId: string\n readonly projectionIds: readonly string[]\n}\n\nexport interface ListLatestProjectionRunsResult {\n readonly runs: readonly ProjectionRunRecord[]\n}\n\nexport interface ProjectionRunStorage {\n queue(input: QueueProjectionRunInput): Promise<ProjectionRunRecord>\n startOrReclaim(input: StartOrReclaimProjectionRunInput): Promise<ProjectionRunClaim>\n failEnqueue(input: FailProjectionRunEnqueueInput): Promise<ProjectionRunRecord>\n /** Transactionally fences the current execution before ontology materialization writes. */\n lockForMaterialization(\n input: LockProjectionRunForMaterializationInput\n ): Promise<ProjectionRunRecord>\n /** Updates physical source progress only. */\n update(input: UpdateProjectionRunInput): Promise<ProjectionRunRecord>\n /**\n * Advances telemetry progress atomically with the corresponding ontology commit.\n *\n * Clears any recorded missing target: a batch that commits is a batch that was not waiting.\n */\n advanceTelemetryCheckpoint(\n input: AdvanceProjectionTelemetryCheckpointInput\n ): Promise<TelemetryProjectionRunRecord>\n /** Records the object a telemetry batch is waiting for, so the wait has a durable start. */\n recordMissingTarget(\n input: RecordProjectionMissingTargetInput\n ): Promise<TelemetryProjectionRunRecord>\n /**\n * Records the failure of the current attempt as the `error` of a run that stays `running` to be\n * retried. Fenced like every other write: a delivery that lost the run cannot overwrite the\n * failure of the one that holds it now. A reclaim keeps it until the run ends.\n */\n recordAttemptFailure(input: RecordProjectionAttemptFailureInput): Promise<ProjectionRunRecord>\n /** Telemetry success also records the worker's EOF observation atomically. */\n finish(input: FinishProjectionRunInput): Promise<ProjectionRunRecord>\n /**\n * The newest replacement run of the same projection that makes this one stale: pinned to a\n * later dataset version, and queued, running, or succeeded. A failed or cancelled run replaces\n * nothing, so it supersedes nothing either. Null for a telemetry run.\n */\n findSupersedingRun(input: FindSupersedingProjectionRunInput): Promise<ProjectionRunRecord | null>\n getById(params: { projectId: string; id: string }): Promise<ProjectionRunRecord | null>\n list(input: ListProjectionRunsInput): Promise<ListProjectionRunsResult>\n /** Superseded runs are skipped: the run that superseded them is the one that matters. */\n listLatestByProjectionIds(\n input: ListLatestProjectionRunsInput\n ): Promise<ListLatestProjectionRunsResult>\n}\n\nexport type {\n LinkProjectionTarget,\n ObjectProjectionTarget,\n PinnedDatasetVersion,\n ProjectionExecution,\n ProjectionKind,\n ProjectionMaterializationIdentity,\n ProjectionTarget,\n}\n"
|
|
6
|
+
"import type { SixbFailure } from \"../../errors/types\"\nimport type {\n PinnedDatasetVersion,\n ProjectionExecution,\n ProjectionMaterializationIdentity,\n ProjectionRunTerminalDecision,\n} from \"../../materialization/model\"\nimport type {\n LinkProjectionTarget,\n ObjectProjectionTarget,\n ProjectionKind,\n ProjectionRunFailureCode,\n ProjectionTarget,\n} from \"../../projections/types\"\n\nexport type { ProjectionRunFailureCode } from \"../../projections/types\"\nexport { PROJECTION_RUN_FAILURE_CODES } from \"../../projections/types\"\n\n/**\n * `superseded` ends a replacement run whose output would be stale on arrival: a run of the same\n * projection pinned to a later dataset version exists and has not failed. Telemetry runs append\n * readings rather than replace a source, so none is ever superseded.\n */\nexport type ProjectionRunStatus =\n | \"queued\"\n | \"running\"\n | \"succeeded\"\n | \"failed\"\n | \"cancelled\"\n | \"superseded\"\n\nexport interface ProjectionRunProgress {\n /** Physical immutable-version rows consumed, before normalization or semantic materialization. */\n readonly sourceRowsRead: number\n /** Physical rows intentionally skipped because a required mapped value was blank. */\n readonly sourceRowsSkipped: number\n /** Maximum complete change records consumed by one incremental attempt; not a recovery cursor. */\n readonly sourceChangesRead?: number\n}\n\nconst progressKeyFlags: Record<keyof ProjectionRunProgress, true> = {\n sourceRowsRead: true,\n sourceRowsSkipped: true,\n sourceChangesRead: true,\n}\n\nexport const PROJECTION_RUN_PROGRESS_KEYS = Object.keys(\n progressKeyFlags\n) as readonly (keyof ProjectionRunProgress)[]\n\nexport function zeroProjectionRunProgress(): ProjectionRunProgress {\n return { sourceRowsRead: 0, sourceRowsSkipped: 0 }\n}\n\nexport interface ProjectionTelemetryCheckpoint {\n readonly fixedBatchSize: number\n readonly nextBatchOrdinal: number\n readonly nextRowOffset: number\n readonly inputExhausted: boolean\n}\n\n/**\n * The object a telemetry batch is waiting for, and when this run first found it missing.\n *\n * A projection's dataset can legitimately be materialized before the objects it references, so\n * the run waits instead of failing. The wait needs a start, and the run has no other durable one:\n * `startedAt` is when the run began, which on a batched projection is long before the batch that\n * cannot commit, and `attempt` counts every reclaim including the ones an unreachable queue caused.\n *\n * Cleared by any committed batch, so a run that is making progress never carries a stale wait.\n */\nexport interface ProjectionMissingTarget {\n readonly objectTypeId: string\n readonly objectId: string\n /** The batch that could not commit because of it. */\n readonly batchOrdinal: number\n readonly firstSeenAt: Date\n}\n\ninterface ProjectionRunRecordBase {\n readonly id: string\n readonly projectId: string\n readonly executionId: string\n readonly status: ProjectionRunStatus\n readonly attempt: number\n readonly progress: ProjectionRunProgress\n readonly queuedAt: Date\n readonly startedAt?: Date\n readonly finishedAt?: Date\n /**\n * The run's most recent failure, read with its status: on a `running` run, why its last attempt\n * failed while the queue retries it; on a `failed` or `cancelled` run, why it ended. Cleared when\n * the run succeeds or is superseded, so a present error always describes something current.\n */\n readonly error?: SixbFailure<ProjectionRunFailureCode>\n}\n\ntype ProjectionIdentity<TKind extends ProjectionKind> = Extract<\n ProjectionMaterializationIdentity,\n { readonly projectionKind: TKind }\n>\n\nexport type ObjectProjectionRunRecord = ProjectionRunRecordBase & {\n readonly identity: ProjectionIdentity<\"object\">\n readonly target: ObjectProjectionTarget\n readonly telemetryCheckpoint?: never\n readonly missingTarget?: never\n}\n\nexport type LinkProjectionRunRecord = ProjectionRunRecordBase & {\n readonly identity: ProjectionIdentity<\"link\">\n readonly target: LinkProjectionTarget\n readonly telemetryCheckpoint?: never\n readonly missingTarget?: never\n}\n\nexport type TelemetryProjectionRunRecord = ProjectionRunRecordBase & {\n readonly identity: ProjectionIdentity<\"telemetry\">\n readonly target: ObjectProjectionTarget\n readonly telemetryCheckpoint: ProjectionTelemetryCheckpoint\n /**\n * Only telemetry carries this: `MaterializationObjectNotFoundError` is raised by telemetry\n * validation alone, and only a batched protocol has a checkpoint to anchor the wait to.\n */\n readonly missingTarget?: ProjectionMissingTarget\n}\n\n/** Durable projection lifecycle state. The execution token is deliberately returned separately. */\nexport type ProjectionRunRecord =\n | ObjectProjectionRunRecord\n | LinkProjectionRunRecord\n | TelemetryProjectionRunRecord\n\nexport function projectionRunObjectTypesVisible(\n run: ProjectionRunRecord,\n canView: (objectTypeId: string) => boolean\n): boolean {\n const target: ProjectionTarget = run.target\n if (\"sourceObjectTypeId\" in target) {\n return canView(target.sourceObjectTypeId) && canView(target.targetObjectTypeId)\n }\n return canView(target.objectTypeId)\n}\n\ninterface ProjectionRunAdmissionBase {\n readonly id: string\n readonly projectId: string\n readonly executionId: string\n readonly queuedAt?: Date\n}\n\nexport type QueueProjectionRunInput =\n | (ProjectionRunAdmissionBase & {\n readonly identity: ProjectionIdentity<\"object\">\n readonly target: ObjectProjectionRunRecord[\"target\"]\n readonly fixedBatchSize?: never\n })\n | (ProjectionRunAdmissionBase & {\n readonly identity: ProjectionIdentity<\"link\">\n readonly target: LinkProjectionRunRecord[\"target\"]\n readonly fixedBatchSize?: never\n })\n | (ProjectionRunAdmissionBase & {\n readonly identity: ProjectionIdentity<\"telemetry\">\n readonly target: TelemetryProjectionRunRecord[\"target\"]\n readonly fixedBatchSize: number\n })\n\nexport type StartOrReclaimProjectionRunInput = QueueProjectionRunInput extends infer TInput\n ? TInput extends QueueProjectionRunInput\n ? Omit<TInput, \"executionId\" | \"queuedAt\"> & { readonly startedAt?: Date }\n : never\n : never\n\nexport interface FailProjectionRunEnqueueInput {\n readonly id: string\n readonly projectId: string\n readonly finishedAt?: Date\n readonly error: SixbFailure<ProjectionRunFailureCode>\n}\n\nexport interface ProjectionRunClaim {\n readonly run: ProjectionRunRecord\n readonly execution: ProjectionExecution\n}\n\nexport interface LockProjectionRunForMaterializationInput {\n readonly id: string\n readonly projectId: string\n readonly executionToken: string\n readonly identity: ProjectionMaterializationIdentity\n}\n\nexport interface UpdateProjectionRunInput extends LockProjectionRunForMaterializationInput {\n readonly progress: Partial<ProjectionRunProgress>\n}\n\nexport type FinishProjectionRunInput = ProjectionRunTerminalDecision &\n LockProjectionRunForMaterializationInput & {\n readonly finishedAt?: Date\n readonly progress?: Partial<ProjectionRunProgress>\n }\n\nexport interface AdvanceProjectionTelemetryCheckpointInput\n extends LockProjectionRunForMaterializationInput {\n /** Must equal the run's current nextBatchOrdinal. */\n readonly batchOrdinal: number\n /** Physical dataset rows consumed by this batch, including skipped rows. */\n readonly batchRowCount: number\n /** Physical rows intentionally skipped inside this batch. */\n readonly batchRowsSkipped: number\n /** True when this batch consumed the final row of the immutable dataset version. */\n readonly inputExhausted: boolean\n}\n\nexport interface RecordProjectionMissingTargetInput\n extends LockProjectionRunForMaterializationInput {\n readonly missingTarget: ProjectionMissingTarget\n}\n\nexport interface RecordProjectionAttemptFailureInput\n extends LockProjectionRunForMaterializationInput {\n readonly error: SixbFailure<ProjectionRunFailureCode>\n}\n\nexport interface FindSupersedingProjectionRunInput {\n readonly projectId: string\n /** The run that may be superseded. */\n readonly id: string\n}\n\nexport interface ListProjectionRunsInput {\n readonly projectId: string\n readonly projectionId?: string\n readonly projectionKind?: ProjectionKind\n readonly datasetId?: string\n readonly datasetVersionId?: string\n /**\n * Viewable object type ids. A run is included only if every target type is present. Omit for an\n * unrestricted internal execution; an empty set matches no runs.\n */\n readonly objectTypeIds?: readonly string[]\n readonly statuses?: readonly ProjectionRunStatus[]\n /** Runs whose recorded `error` has one of these codes; an empty set matches no runs. */\n readonly errorCodes?: readonly ProjectionRunFailureCode[]\n readonly startedAfter?: Date\n readonly startedBefore?: Date\n readonly limit?: number\n readonly offset?: number\n readonly order?: \"asc\" | \"desc\"\n}\n\nexport interface ListProjectionRunsResult {\n readonly runs: readonly ProjectionRunRecord[]\n readonly hasMore: boolean\n readonly total: number\n}\n\nexport interface ListLatestProjectionRunsInput {\n readonly projectId: string\n readonly projectionIds: readonly string[]\n}\n\nexport interface ListLatestProjectionRunsResult {\n readonly runs: readonly ProjectionRunRecord[]\n}\n\nexport interface ProjectionRunStorage {\n queue(input: QueueProjectionRunInput): Promise<ProjectionRunRecord>\n startOrReclaim(input: StartOrReclaimProjectionRunInput): Promise<ProjectionRunClaim>\n failEnqueue(input: FailProjectionRunEnqueueInput): Promise<ProjectionRunRecord>\n /** Transactionally fences the current execution before ontology materialization writes. */\n lockForMaterialization(\n input: LockProjectionRunForMaterializationInput\n ): Promise<ProjectionRunRecord>\n /** Updates physical source progress only. */\n update(input: UpdateProjectionRunInput): Promise<ProjectionRunRecord>\n /**\n * Advances telemetry progress atomically with the corresponding ontology commit.\n *\n * Clears any recorded missing target: a batch that commits is a batch that was not waiting.\n */\n advanceTelemetryCheckpoint(\n input: AdvanceProjectionTelemetryCheckpointInput\n ): Promise<TelemetryProjectionRunRecord>\n /** Records the object a telemetry batch is waiting for, so the wait has a durable start. */\n recordMissingTarget(\n input: RecordProjectionMissingTargetInput\n ): Promise<TelemetryProjectionRunRecord>\n /**\n * Records the failure of the current attempt as the `error` of a run that stays `running` to be\n * retried. Fenced like every other write: a delivery that lost the run cannot overwrite the\n * failure of the one that holds it now. A reclaim keeps it until the run ends.\n */\n recordAttemptFailure(input: RecordProjectionAttemptFailureInput): Promise<ProjectionRunRecord>\n /** Telemetry success also records the worker's EOF observation atomically. */\n finish(input: FinishProjectionRunInput): Promise<ProjectionRunRecord>\n /**\n * The newest replacement run of the same projection that makes this one stale: pinned to a\n * later dataset version, and queued, running, or succeeded. A failed or cancelled run replaces\n * nothing, so it supersedes nothing either. Null for a telemetry run.\n */\n findSupersedingRun(input: FindSupersedingProjectionRunInput): Promise<ProjectionRunRecord | null>\n getById(params: { projectId: string; id: string }): Promise<ProjectionRunRecord | null>\n list(input: ListProjectionRunsInput): Promise<ListProjectionRunsResult>\n /** Superseded runs are skipped: the run that superseded them is the one that matters. */\n listLatestByProjectionIds(\n input: ListLatestProjectionRunsInput\n ): Promise<ListLatestProjectionRunsResult>\n}\n\nexport type {\n LinkProjectionTarget,\n ObjectProjectionTarget,\n PinnedDatasetVersion,\n ProjectionExecution,\n ProjectionKind,\n ProjectionMaterializationIdentity,\n ProjectionTarget,\n}\n"
|
|
7
7
|
],
|
|
8
8
|
"mappings": ";;AAGO,IAAM,gCAA+B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;;AC+BA,IAAM,mBAA8D;AAAA,EAClE,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,mBAAmB;AACrB;AAEO,IAAM,gCAA+B,OAAO,KACjD,gBACF;AAEO,SAAS,0BAAyB,GAA0B;AAAA,EACjE,OAAO,EAAE,gBAAgB,GAAG,mBAAmB,EAAE;AAAA;AAkF5C,SAAS,gCAA+B,CAC7C,KACA,SACS;AAAA,EACT,MAAM,SAA2B,IAAI;AAAA,EACrC,IAAI,wBAAwB,QAAQ;AAAA,IAClC,OAAO,QAAQ,OAAO,kBAAkB,KAAK,QAAQ,OAAO,kBAAkB;AAAA,EAChF;AAAA,EACA,OAAO,QAAQ,OAAO,YAAY;AAAA;",
|
|
9
9
|
"debugId": "6E88BA6849E66AE464756E2164756E21",
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
resolveExecutionScopeAuthorization,
|
|
11
11
|
assertAuthorized2
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5be2ath4.js";
|
|
13
13
|
import {
|
|
14
14
|
SYNC_RUN_FAILURE_CODES2
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5yd8cchh.js";
|
|
16
16
|
import {
|
|
17
17
|
SyncRunError2
|
|
18
18
|
} from "./chunk-jmfet9r4.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
executionRecordInputFromRuntime,
|
|
21
21
|
ensureExecutionRecord2,
|
|
22
22
|
createPrimitiveExecutionRecord
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-a7er86jd.js";
|
|
24
24
|
|
|
25
25
|
// src/syncs/errors.ts
|
|
26
26
|
class SyncValidationError2 extends Error {
|
|
@@ -52,6 +52,8 @@ function normalizeNode(query) {
|
|
|
52
52
|
};
|
|
53
53
|
case "traverse":
|
|
54
54
|
return { ...query, input: normalizeObjectQuery2(query.input) };
|
|
55
|
+
case "rerank":
|
|
56
|
+
return { ...query, model: { ...query.model }, input: normalizeObjectQuery2(query.input) };
|
|
55
57
|
case "set":
|
|
56
58
|
return normalizeSet(query);
|
|
57
59
|
case "sort":
|
|
@@ -282,4 +284,4 @@ function formatQueryPlanningMessage(issues) {
|
|
|
282
284
|
|
|
283
285
|
export { formatObjectQueryExplanation2, normalizeObjectQuery2, normalizeObjectQueryPredicate2, ObjectQueryValidationError2, ObjectQueryPlanningError2, ObjectQueryExecutionError2 };
|
|
284
286
|
|
|
285
|
-
//# debugId=
|
|
287
|
+
//# debugId=F89B013FA810BE5464756E2164756E21
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/objects/query/explain-format.ts", "../src/objects/query/normalize.ts", "../src/objects/query/errors.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Formatting for object query explanations.\n *\n * Lives apart from `explain.ts` so the fluent builder (and browser bundles\n * built on it) can import the formatter without pulling in the explanation\n * builder and its validation machinery.\n */\nimport type { ObjectQueryExplainNode, ObjectQueryExplanation } from \"./explain\"\n\nexport function formatObjectQueryExplanation(explanation: ObjectQueryExplanation): string {\n const lines: string[] = []\n const status =\n explanation.valid === undefined ? \"not validated\" : explanation.valid ? \"valid\" : \"invalid\"\n const result = explanation.result ? ` result=${explanation.result.objectTypeIds.join(\" | \")}` : \"\"\n\n lines.push(`ObjectQuery ${status}${result}`)\n appendNodeLines(explanation.tree, lines, 0)\n\n if (explanation.issues.length > 0) {\n lines.push(\"Issues:\")\n for (const issue of explanation.issues) {\n lines.push(`- ${issue.path} [${issue.code}] ${issue.message}`)\n }\n }\n\n return lines.join(\"\\n\")\n}\n\nfunction appendNodeLines(node: ObjectQueryExplainNode, lines: string[], depth: number): void {\n lines.push(`${\" \".repeat(depth)}- ${node.path} ${node.summary}`)\n for (const child of node.children) {\n appendNodeLines(child, lines, depth + 1)\n }\n}\n",
|
|
6
|
+
"import type {\n ObjectExpansion,\n ObjectQuery,\n ObjectQueryPredicate,\n ObjectQuerySet,\n ObjectQuerySortField,\n} from \"./ir\"\n\n/**\n * Canonicalizes query trees before validation/planning so providers see a\n * stable shape regardless of how the typed builder assembled the query.\n *\n * `expand` is output-shaping, so it is hoisted to the outermost layer here: two\n * queries that differ only in where `.expand(...)` was chained normalize to the\n * same tree (and therefore the same cache key).\n */\nexport function normalizeObjectQuery(query: ObjectQuery): ObjectQuery {\n return hoistExpand(normalizeNode(query))\n}\n\nfunction normalizeNode(query: ObjectQuery): ObjectQuery {\n switch (query.kind) {\n case \"start\":\n return { ...query }\n case \"refs\":\n return {\n kind: \"refs\",\n refs: uniqueRefs(query.refs),\n }\n case \"filter\":\n return normalizeFilter(query.input, query.predicate)\n case \"text\":\n return {\n ...query,\n input: normalizeObjectQuery(query.input),\n fields: query.fields ? uniqueStrings(query.fields) : undefined,\n fieldsByObjectType: query.fieldsByObjectType\n ? uniqueStringRecord(query.fieldsByObjectType)\n : undefined,\n }\n case \"vector\":\n return {\n ...query,\n input: normalizeObjectQuery(query.input),\n vector: typeof query.vector === \"string\" ? query.vector : [...query.vector],\n }\n case \"traverse\":\n return { ...query, input: normalizeObjectQuery(query.input) }\n case \"rerank\":\n return { ...query, model: { ...query.model }, input: normalizeObjectQuery(query.input) }\n case \"set\":\n return normalizeSet(query)\n case \"sort\":\n return normalizeSort(query.input, query.fields)\n case \"limit\":\n return normalizeLimit(query.input, query.limit)\n case \"page\":\n return { ...query, input: normalizeObjectQuery(query.input) }\n case \"project\":\n return {\n ...query,\n input: normalizeObjectQuery(query.input),\n properties: query.properties ? uniqueStrings(query.properties) : undefined,\n }\n case \"expand\":\n return normalizeExpand(query.input, query.expansions)\n }\n}\n\n/**\n * Keeps `expand` at the outermost layer. A single-input wrapper sitting above an\n * `expand` is swapped so the `expand` wraps the (re-normalized) wrapper subtree;\n * re-normalizing collapses any nodes that became adjacent, and a wrapper that\n * lands above another `expand` is merged into one.\n */\nfunction hoistExpand(query: ObjectQuery): ObjectQuery {\n if (\n query.kind === \"start\" ||\n query.kind === \"refs\" ||\n query.kind === \"set\" ||\n query.kind === \"expand\"\n ) {\n return query\n }\n if (query.input.kind !== \"expand\") return query\n\n const inner = query.input\n const rebuilt = normalizeObjectQuery({ ...query, input: inner.input })\n if (rebuilt.kind === \"expand\") {\n return {\n kind: \"expand\",\n input: rebuilt.input,\n expansions: normalizeExpansions([...inner.expansions, ...rebuilt.expansions]),\n }\n }\n return { kind: \"expand\", input: rebuilt, expansions: inner.expansions }\n}\n\nfunction normalizeExpand(input: ObjectQuery, expansions: readonly ObjectExpansion[]): ObjectQuery {\n const normalizedInput = normalizeObjectQuery(input)\n const normalizedExpansions = normalizeExpansions(expansions)\n\n // A directly-nested expand (`a.expand(X).expand(Y)` builds\n // `expand(expand(start, [X]), [Y])`) collapses into one outermost expand.\n if (normalizedInput.kind === \"expand\") {\n return {\n kind: \"expand\",\n input: normalizedInput.input,\n expansions: normalizeExpansions([...normalizedInput.expansions, ...normalizedExpansions]),\n }\n }\n\n return { kind: \"expand\", input: normalizedInput, expansions: normalizedExpansions }\n}\n\nfunction normalizeExpansions(expansions: readonly ObjectExpansion[]): ObjectExpansion[] {\n const byKey = new Map<string, ObjectExpansion>()\n for (const expansion of expansions) {\n const normalized = normalizeExpansion(expansion)\n const key = expansionKey(normalized)\n const existing = byKey.get(key)\n byKey.set(key, existing ? mergeExpansion(existing, normalized) : normalized)\n }\n\n return [...byKey.values()].sort((a, b) => {\n const left = expansionKey(a)\n const right = expansionKey(b)\n return left < right ? -1 : left > right ? 1 : 0\n })\n}\n\nfunction normalizeExpansion(expansion: ObjectExpansion): ObjectExpansion {\n const nested = expansion.expand ? normalizeExpansions(expansion.expand) : []\n return {\n linkId: expansion.linkId,\n direction: expansion.direction,\n ...(expansion.sourceObjectTypeId !== undefined\n ? { sourceObjectTypeId: expansion.sourceObjectTypeId }\n : {}),\n ...(expansion.limit !== undefined ? { limit: expansion.limit } : {}),\n ...(expansion.orderBy ? { orderBy: expansion.orderBy.map((field) => ({ ...field })) } : {}),\n ...(nested.length > 0 ? { expand: nested } : {}),\n }\n}\n\n// Two expansions of the same link in the same direction are one hydration; their\n// nested expansions merge so the normalized tree never double-hydrates a link.\nfunction mergeExpansion(a: ObjectExpansion, b: ObjectExpansion): ObjectExpansion {\n const nested = normalizeExpansions([...(a.expand ?? []), ...(b.expand ?? [])])\n const { expand: _existing, ...base } = a\n return nested.length > 0 ? { ...base, expand: nested } : base\n}\n\nfunction expansionKey(expansion: ObjectExpansion): string {\n return `${expansion.direction}\\0${expansion.linkId}\\0${expansion.sourceObjectTypeId ?? \"\"}`\n}\n\nexport function normalizeObjectQueryPredicate(\n predicate: ObjectQueryPredicate\n): ObjectQueryPredicate {\n switch (predicate.op) {\n case \"and\":\n case \"or\": {\n const items = predicate.items.flatMap((item) => {\n const normalized = normalizeObjectQueryPredicate(item)\n if (normalized.op === predicate.op) return normalized.items\n return [normalized]\n })\n return items.length === 1 ? items[0] : { op: predicate.op, items }\n }\n case \"not\":\n return { op: \"not\", item: normalizeObjectQueryPredicate(predicate.item) }\n case \"in\":\n return { ...predicate, values: [...predicate.values] }\n default:\n return { ...predicate }\n }\n}\n\nfunction normalizeFilter(input: ObjectQuery, predicate: ObjectQueryPredicate): ObjectQuery {\n const normalizedInput = normalizeObjectQuery(input)\n const normalizedPredicate = normalizeObjectQueryPredicate(predicate)\n\n // Adjacent filters are equivalent to a single conjunction and are easier for\n // capability checks and providers to inspect.\n if (normalizedInput.kind === \"filter\") {\n return normalizeObjectQuery({\n kind: \"filter\",\n input: normalizedInput.input,\n predicate: {\n op: \"and\",\n items: [normalizedInput.predicate, normalizedPredicate],\n },\n })\n }\n\n return {\n kind: \"filter\",\n input: normalizedInput,\n predicate: normalizedPredicate,\n }\n}\n\nfunction normalizeSet(query: ObjectQuerySet): ObjectQuery {\n const inputs = query.inputs.flatMap((input) => {\n const normalized = normalizeObjectQuery(input)\n if (normalized.kind === \"set\" && normalized.op === query.op) return normalized.inputs\n return [normalized]\n })\n\n return { ...query, inputs }\n}\n\nfunction normalizeSort(input: ObjectQuery, fields: readonly ObjectQuerySortField[]): ObjectQuery {\n const normalizedInput = normalizeObjectQuery(input)\n const normalizedFields = fields.map((field) => ({ ...field }))\n\n // A later sort fully determines result order, so it replaces an adjacent sort.\n if (normalizedInput.kind === \"sort\") {\n return {\n kind: \"sort\",\n input: normalizedInput.input,\n fields: normalizedFields,\n }\n }\n\n return {\n kind: \"sort\",\n input: normalizedInput,\n fields: normalizedFields,\n }\n}\n\nfunction normalizeLimit(input: ObjectQuery, limit: number): ObjectQuery {\n const normalizedInput = normalizeObjectQuery(input)\n\n // Adjacent limits collapse to the stricter bound.\n if (normalizedInput.kind === \"limit\") {\n return {\n kind: \"limit\",\n input: normalizedInput.input,\n limit: Math.min(normalizedInput.limit, limit),\n }\n }\n\n return {\n kind: \"limit\",\n input: normalizedInput,\n limit,\n }\n}\n\nfunction uniqueStrings(values: readonly string[]): string[] {\n return [...new Set(values)]\n}\n\nfunction uniqueRefs(\n refs: readonly { objectTypeId: string; primaryId: string }[]\n): { objectTypeId: string; primaryId: string }[] {\n const seen = new Set<string>()\n const unique = refs.flatMap((ref) => {\n const key = JSON.stringify([ref.objectTypeId, ref.primaryId])\n if (seen.has(key)) return []\n seen.add(key)\n return [{ ...ref }]\n })\n\n // `refs` is an object-set source, not a positional batch response. Canonical\n // identity order makes equivalent sets normalize identically and matches the\n // default ordering used by provider query sources.\n return unique.sort(\n (left, right) =>\n compareStrings(left.objectTypeId, right.objectTypeId) ||\n compareStrings(left.primaryId, right.primaryId)\n )\n}\n\nfunction compareStrings(left: string, right: string): number {\n if (left < right) return -1\n if (left > right) return 1\n return 0\n}\n\nfunction uniqueStringRecord(\n record: Readonly<Record<string, readonly string[]>>\n): Record<string, string[]> {\n return Object.fromEntries(\n Object.entries(record).map(([objectTypeId, fields]) => [objectTypeId, uniqueStrings(fields)])\n )\n}\n",
|
|
7
|
+
"import type { ObjectQueryValidationIssue } from \"./validate\"\n\nexport interface ObjectQueryPlanningIssue {\n path: string\n code: string\n message: string\n}\n\nexport class ObjectQueryValidationError extends Error {\n readonly name = \"ObjectQueryValidationError\"\n readonly issues: readonly ObjectQueryValidationIssue[]\n\n constructor(issues: readonly ObjectQueryValidationIssue[]) {\n super(formatQueryValidationMessage(issues))\n this.issues = issues\n }\n}\n\nexport class ObjectQueryPlanningError extends Error {\n readonly name = \"ObjectQueryPlanningError\"\n readonly issues: readonly ObjectQueryPlanningIssue[]\n\n constructor(issues: readonly ObjectQueryPlanningIssue[]) {\n super(formatQueryPlanningMessage(issues))\n this.issues = issues\n }\n}\n\nexport class ObjectQueryExecutionError extends Error {\n readonly name = \"ObjectQueryExecutionError\"\n readonly code: string\n readonly path?: string\n\n constructor(code: string, message: string, path?: string) {\n super(`[Sixb] Object query execution failed: ${message}`)\n this.code = code\n this.path = path\n }\n}\n\nfunction formatQueryValidationMessage(issues: readonly ObjectQueryValidationIssue[]): string {\n if (issues.length === 0) return \"[Sixb] Object query validation failed\"\n if (issues.length === 1) return `[Sixb] Object query validation failed: ${issues[0].message}`\n return `[Sixb] Object query validation failed with ${issues.length} issues: ${issues\n .map((issue) => issue.message)\n .join(\"; \")}`\n}\n\nfunction formatQueryPlanningMessage(issues: readonly ObjectQueryPlanningIssue[]): string {\n if (issues.length === 0) return \"[Sixb] Object query planning failed\"\n if (issues.length === 1) return `[Sixb] Object query planning failed: ${issues[0].message}`\n return `[Sixb] Object query planning failed with ${issues.length} issues: ${issues\n .map((issue) => issue.message)\n .join(\"; \")}`\n}\n"
|
|
8
|
+
],
|
|
9
|
+
"mappings": ";;AASO,SAAS,6BAA4B,CAAC,aAA6C;AAAA,EACxF,MAAM,QAAkB,CAAC;AAAA,EACzB,MAAM,SACJ,YAAY,UAAU,YAAY,kBAAkB,YAAY,QAAQ,UAAU;AAAA,EACpF,MAAM,SAAS,YAAY,SAAS,WAAW,YAAY,OAAO,cAAc,KAAK,KAAK,MAAM;AAAA,EAEhG,MAAM,KAAK,eAAe,SAAS,QAAQ;AAAA,EAC3C,gBAAgB,YAAY,MAAM,OAAO,CAAC;AAAA,EAE1C,IAAI,YAAY,OAAO,SAAS,GAAG;AAAA,IACjC,MAAM,KAAK,SAAS;AAAA,IACpB,WAAW,SAAS,YAAY,QAAQ;A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AAAA,IACxD,KAAK,OAAO;AAAA,IACZ,KAAK,OAAO;AAAA;AAEhB;AAEA,SAAS,4BAA4B,CAAC,QAAuD;AAAA,EAC3F,IAAI,OAAO,WAAW;AAAA,IAAG,OAAO;AAAA,EAChC,IAAI,OAAO,WAAW;AAAA,IAAG,OAAO,0CAA0C,OAAO,GAAG;AAAA,EACpF,OAAO,8CAA8C,OAAO,kBAAkB,OAC3E,IAAI,CAAC,UAAU,MAAM,OAAO,EAC5B,KAAK,IAAI;AAAA;AAGd,SAAS,0BAA0B,CAAC,QAAqD;AAAA,EACvF,IAAI,OAAO,WAAW;AAAA,IAAG,OAAO;AAAA,EAChC,IAAI,OAAO,WAAW;AAAA,IAAG,OAAO,wCAAwC,OAAO,GAAG;AAAA,EAClF,OAAO,4CAA4C,OAAO,kBAAkB,OACzE,IAAI,CAAC,UAAU,MAAM,OAAO,EAC5B,KAAK,IAAI;AAAA;",
|
|
10
|
+
"debugId": "F89B013FA810BE5464756E2164756E21",
|
|
11
|
+
"names": []
|
|
12
|
+
}
|
|
@@ -78,6 +78,9 @@ function assertEmbeddingModel(model) {
|
|
|
78
78
|
function assertEmbeddingModelRef(model) {
|
|
79
79
|
const definition = model?.definition;
|
|
80
80
|
const representation = definition?.representation;
|
|
81
|
+
if (definition?.inputMode !== undefined && definition.inputMode !== "symmetric" && definition.inputMode !== "asymmetric") {
|
|
82
|
+
throw new TypeError("[Sixb] Invalid embedding input mode.");
|
|
83
|
+
}
|
|
81
84
|
if (representation !== undefined && (!representation || typeof representation !== "object" || !validIdentityPart(representation.name) || representation.version !== undefined && !validIdentityPart(representation.version)))
|
|
82
85
|
throw new TypeError("[Sixb] Invalid embedding model representation.");
|
|
83
86
|
if (!definition || definition.kind !== "embedding" || definition.providerId !== model.providerId || definition.modelId !== model.modelId || typeof model.providerId !== "string" || !model.providerId || model.providerId.trim() !== model.providerId || typeof model.modelId !== "string" || !model.modelId || model.modelId.trim() !== model.modelId || !Number.isSafeInteger(definition.dimensions) || definition.dimensions < 1 || definition.dimensions > 16000) {
|
|
@@ -85,7 +88,7 @@ function assertEmbeddingModelRef(model) {
|
|
|
85
88
|
}
|
|
86
89
|
}
|
|
87
90
|
function sameEmbeddingModel(left, right) {
|
|
88
|
-
return left.providerId === right.providerId && left.modelId === right.modelId && left.definition.dimensions === right.definition.dimensions && (left.definition.representation?.name ?? left.modelId) === (right.definition.representation?.name ?? right.modelId) && left.definition.representation?.version === right.definition.representation?.version;
|
|
91
|
+
return left.providerId === right.providerId && left.modelId === right.modelId && left.definition.dimensions === right.definition.dimensions && (left.definition.inputMode ?? "symmetric") === (right.definition.inputMode ?? "symmetric") && (left.definition.representation?.name ?? left.modelId) === (right.definition.representation?.name ?? right.modelId) && left.definition.representation?.version === right.definition.representation?.version;
|
|
89
92
|
}
|
|
90
93
|
function validIdentityPart(value) {
|
|
91
94
|
return typeof value === "string" && value.length > 0 && value.trim() === value;
|
|
@@ -101,4 +104,4 @@ class EmbeddingModelResponseError2 extends ModelProviderError2 {
|
|
|
101
104
|
|
|
102
105
|
export { ModelCatalogUnavailableError2, ModelProviderError2, ModelStreamError2, UnsupportedModelFeatureError2, StructuredOutputError2, assertEmbeddingModel, assertEmbeddingModelRef, sameEmbeddingModel, EmbeddingModelResponseError2 };
|
|
103
106
|
|
|
104
|
-
//# debugId=
|
|
107
|
+
//# debugId=5948F3F6BD60B08464756E2164756E21
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"sources": ["../src/models/errors.ts", "../src/models/embedding-model.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { ModelFinishReason, ModelUsage } from \"./events\"\nimport type { ModelCallCost } from \"./pricing\"\n\n/** Catalog transport/access failed; callers may use local metadata without masking invalid definitions. */\nexport class ModelCatalogUnavailableError extends Error {\n readonly name = \"ModelCatalogUnavailableError\"\n}\n\n/** A provider or provider protocol rejected a model request. */\nexport class ModelProviderError extends Error {\n readonly name = \"ModelProviderError\"\n\n constructor(\n message: string,\n readonly providerId: string,\n readonly modelId: string,\n options?: ErrorOptions & {\n readonly status?: number\n readonly code?: string\n readonly requestId?: string\n readonly retryAfterMs?: number\n readonly retryable?: boolean\n }\n ) {\n super(message, options)\n this.status = options?.status\n this.code = options?.code\n this.requestId = options?.requestId\n this.retryAfterMs = options?.retryAfterMs\n this.retryable = options?.retryable ?? false\n }\n\n readonly status?: number\n readonly code?: string\n readonly requestId?: string\n readonly retryAfterMs?: number\n readonly retryable: boolean\n}\n\nexport class ModelStreamError extends Error {\n readonly name = \"ModelStreamError\"\n}\n\nexport class UnsupportedModelFeatureError extends Error {\n readonly name = \"UnsupportedModelFeatureError\"\n\n constructor(\n message?: string,\n options?: ErrorOptions & {\n readonly reason?: \"unsupported-model\" | \"unsupported-schema\"\n }\n ) {\n super(message, options)\n this.reason = options?.reason\n }\n\n readonly reason?: \"unsupported-model\" | \"unsupported-schema\"\n}\n\nexport class StructuredOutputError extends Error {\n readonly name = \"StructuredOutputError\"\n\n constructor(\n message: string,\n options?: ErrorOptions & {\n readonly text?: string\n readonly providerId?: string\n readonly modelId?: string\n readonly responseId?: string\n readonly responseModelId?: string\n readonly finishReason?: ModelFinishReason\n readonly usage?: ModelUsage\n readonly cost?: ModelCallCost\n }\n ) {\n super(message, options)\n this.text = options?.text\n this.providerId = options?.providerId\n this.modelId = options?.modelId\n this.responseId = options?.responseId\n this.responseModelId = options?.responseModelId\n this.finishReason = options?.finishReason\n this.usage = options?.usage\n this.cost = options?.cost\n }\n\n readonly text?: string\n readonly providerId?: string\n readonly modelId?: string\n readonly responseId?: string\n readonly responseModelId?: string\n readonly finishReason?: ModelFinishReason\n readonly usage?: ModelUsage\n readonly cost?: ModelCallCost\n}\n",
|
|
6
|
-
"import type { ModelDefinition } from \"./definitions\"\nimport { ModelProviderError } from \"./errors\"\nimport type { ModelProviderIds, ModelRoute, ModelUsage } from \"./events\"\nimport type { ModelCostEstimator, ModelReportedCost } from \"./pricing\"\n\n/** The identity includes the configured output dimension, not only the vendor's model id. */\nexport interface EmbeddingModelDefinition extends ModelDefinition {\n readonly kind: \"embedding\"\n readonly dimensions: number\n /** Actual representation behind a routing alias. Omit only when modelId identifies it directly. */\n readonly representation?: { readonly name: string; readonly version?: string }\n}\n\nexport interface EmbeddingModelRequest {\n readonly texts: readonly string[]\n /** Providers must honor cancellation and propagate this signal to their transport. */\n readonly signal?: AbortSignal\n}\n\n/** Provider accounting facts; absent meters or prices remain unknown. */\nexport interface EmbeddingModelResponseMetadata {\n readonly usage?: ModelUsage\n readonly providerIds?: ModelProviderIds\n readonly responseModelId?: string\n readonly reportedCost?: ModelReportedCost\n readonly route?: ModelRoute\n}\n\nexport interface EmbeddingModelResult extends EmbeddingModelResponseMetadata {\n readonly vectors: readonly (readonly number[])[]\n}\n\n/** Serializable profile reference; executable providers stay on the server. */\nexport interface EmbeddingModelRef {\n readonly providerId: string\n readonly modelId: string\n readonly definition: EmbeddingModelDefinition\n}\n\n/** Conservative transport bounds for automatic projection batching, not token estimates. */\nexport interface EmbeddingBatchLimits {\n readonly maxInputs: number\n readonly maxInputBytes: number\n readonly maxTotalInputBytes: number\n}\n\nexport interface EmbeddingModel extends EmbeddingModelRef {\n /** Omit when safe multi-input bounds are unknown; automatic indexing then calls one at a time. */\n readonly batching?: EmbeddingBatchLimits\n readonly costEstimator?: ModelCostEstimator\n /** Resolve and pin optional pricing before admission, without an inference call. */\n resolve?(): Promise<EmbeddingModel>\n embed(request: EmbeddingModelRequest): Promise<EmbeddingModelResult>\n}\n\nexport function assertEmbeddingModel(model: EmbeddingModel): void {\n if (!model || typeof model !== \"object\" || typeof model.embed !== \"function\") {\n throw new TypeError(\"[Sixb] Expected an EmbeddingModel with an embed method.\")\n }\n assertEmbeddingModelRef(model)\n if (\n model.batching &&\n [\n model.batching.maxInputs,\n model.batching.maxInputBytes,\n model.batching.maxTotalInputBytes,\n ].some((value) => !Number.isSafeInteger(value) || value < 1)\n ) {\n throw new TypeError(\"[Sixb] Embedding batch limits must be positive safe integers.\")\n }\n}\n\nexport function assertEmbeddingModelRef(model: EmbeddingModelRef): void {\n const definition = model?.definition\n const representation = definition?.representation\n if (\n representation !== undefined &&\n (!representation ||\n typeof representation !== \"object\" ||\n !validIdentityPart(representation.name) ||\n (representation.version !== undefined && !validIdentityPart(representation.version)))\n )\n throw new TypeError(\"[Sixb] Invalid embedding model representation.\")\n if (\n !definition ||\n definition.kind !== \"embedding\" ||\n definition.providerId !== model.providerId ||\n definition.modelId !== model.modelId ||\n typeof model.providerId !== \"string\" ||\n !model.providerId ||\n model.providerId.trim() !== model.providerId ||\n typeof model.modelId !== \"string\" ||\n !model.modelId ||\n model.modelId.trim() !== model.modelId ||\n !Number.isSafeInteger(definition.dimensions) ||\n definition.dimensions < 1 ||\n definition.dimensions > 16000\n ) {\n throw new TypeError(\"[Sixb] Invalid embedding model identity or dimensions (expected 1–16000).\")\n }\n}\n\n/** Routing identity, representation and dimensions must agree before any inference. */\nexport function sameEmbeddingModel(left: EmbeddingModelRef, right: EmbeddingModelRef): boolean {\n return (\n left.providerId === right.providerId &&\n left.modelId === right.modelId &&\n left.definition.dimensions === right.definition.dimensions &&\n (left.definition.representation?.name ?? left.modelId) ===\n (right.definition.representation?.name ?? right.modelId) &&\n left.definition.representation?.version === right.definition.representation?.version\n )\n}\n\nfunction validIdentityPart(value: unknown): value is string {\n return typeof value === \"string\" && value.length > 0 && value.trim() === value\n}\n\n/** A completed provider response whose vectors are unusable, but may still be billable. */\nexport class EmbeddingModelResponseError extends ModelProviderError {\n constructor(\n message: string,\n providerId: string,\n modelId: string,\n readonly metadata: EmbeddingModelResponseMetadata\n ) {\n super(message, providerId, modelId, { code: \"invalid_embedding_response\", retryable: false })\n }\n}\n"
|
|
6
|
+
"import type { ModelDefinition } from \"./definitions\"\nimport { ModelProviderError } from \"./errors\"\nimport type { ModelProviderIds, ModelRoute, ModelUsage } from \"./events\"\nimport type { ModelCostEstimator, ModelReportedCost } from \"./pricing\"\n\n/** The identity includes the configured output dimension, not only the vendor's model id. */\nexport interface EmbeddingModelDefinition extends ModelDefinition {\n readonly kind: \"embedding\"\n readonly dimensions: number\n /** Asymmetric models use distinct document/query modes. Omission means symmetric. */\n readonly inputMode?: \"symmetric\" | \"asymmetric\"\n /** Actual representation behind a routing alias. Omit only when modelId identifies it directly. */\n readonly representation?: { readonly name: string; readonly version?: string }\n}\n\nexport interface EmbeddingModelRequest {\n readonly texts: readonly string[]\n /** Retrieval role. Sixb sets this for indexing and search; symmetric models may ignore it. */\n readonly purpose?: \"document\" | \"query\"\n /** Providers must honor cancellation and propagate this signal to their transport. */\n readonly signal?: AbortSignal\n}\n\n/** Provider accounting facts; absent meters or prices remain unknown. */\nexport interface EmbeddingModelResponseMetadata {\n readonly usage?: ModelUsage\n readonly providerIds?: ModelProviderIds\n readonly responseModelId?: string\n readonly reportedCost?: ModelReportedCost\n readonly route?: ModelRoute\n}\n\nexport interface EmbeddingModelResult extends EmbeddingModelResponseMetadata {\n readonly vectors: readonly (readonly number[])[]\n}\n\n/** Serializable profile reference; executable providers stay on the server. */\nexport interface EmbeddingModelRef {\n readonly providerId: string\n readonly modelId: string\n readonly definition: EmbeddingModelDefinition\n}\n\n/** Conservative transport bounds for automatic projection batching, not token estimates. */\nexport interface EmbeddingBatchLimits {\n readonly maxInputs: number\n readonly maxInputBytes: number\n readonly maxTotalInputBytes: number\n}\n\nexport interface EmbeddingModel extends EmbeddingModelRef {\n /** Omit when safe multi-input bounds are unknown; automatic indexing then calls one at a time. */\n readonly batching?: EmbeddingBatchLimits\n readonly costEstimator?: ModelCostEstimator\n /** Resolve and pin optional pricing before admission, without an inference call. */\n resolve?(): Promise<EmbeddingModel>\n embed(request: EmbeddingModelRequest): Promise<EmbeddingModelResult>\n}\n\nexport function assertEmbeddingModel(model: EmbeddingModel): void {\n if (!model || typeof model !== \"object\" || typeof model.embed !== \"function\") {\n throw new TypeError(\"[Sixb] Expected an EmbeddingModel with an embed method.\")\n }\n assertEmbeddingModelRef(model)\n if (\n model.batching &&\n [\n model.batching.maxInputs,\n model.batching.maxInputBytes,\n model.batching.maxTotalInputBytes,\n ].some((value) => !Number.isSafeInteger(value) || value < 1)\n ) {\n throw new TypeError(\"[Sixb] Embedding batch limits must be positive safe integers.\")\n }\n}\n\nexport function assertEmbeddingModelRef(model: EmbeddingModelRef): void {\n const definition = model?.definition\n const representation = definition?.representation\n if (\n definition?.inputMode !== undefined &&\n definition.inputMode !== \"symmetric\" &&\n definition.inputMode !== \"asymmetric\"\n ) {\n throw new TypeError(\"[Sixb] Invalid embedding input mode.\")\n }\n if (\n representation !== undefined &&\n (!representation ||\n typeof representation !== \"object\" ||\n !validIdentityPart(representation.name) ||\n (representation.version !== undefined && !validIdentityPart(representation.version)))\n )\n throw new TypeError(\"[Sixb] Invalid embedding model representation.\")\n if (\n !definition ||\n definition.kind !== \"embedding\" ||\n definition.providerId !== model.providerId ||\n definition.modelId !== model.modelId ||\n typeof model.providerId !== \"string\" ||\n !model.providerId ||\n model.providerId.trim() !== model.providerId ||\n typeof model.modelId !== \"string\" ||\n !model.modelId ||\n model.modelId.trim() !== model.modelId ||\n !Number.isSafeInteger(definition.dimensions) ||\n definition.dimensions < 1 ||\n definition.dimensions > 16000\n ) {\n throw new TypeError(\"[Sixb] Invalid embedding model identity or dimensions (expected 1–16000).\")\n }\n}\n\n/** Routing identity, representation and dimensions must agree before any inference. */\nexport function sameEmbeddingModel(left: EmbeddingModelRef, right: EmbeddingModelRef): boolean {\n return (\n left.providerId === right.providerId &&\n left.modelId === right.modelId &&\n left.definition.dimensions === right.definition.dimensions &&\n (left.definition.inputMode ?? \"symmetric\") === (right.definition.inputMode ?? \"symmetric\") &&\n (left.definition.representation?.name ?? left.modelId) ===\n (right.definition.representation?.name ?? right.modelId) &&\n left.definition.representation?.version === right.definition.representation?.version\n )\n}\n\nfunction validIdentityPart(value: unknown): value is string {\n return typeof value === \"string\" && value.length > 0 && value.trim() === value\n}\n\n/** A completed provider response whose vectors are unusable, but may still be billable. */\nexport class EmbeddingModelResponseError extends ModelProviderError {\n constructor(\n message: string,\n providerId: string,\n modelId: string,\n readonly metadata: EmbeddingModelResponseMetadata\n ) {\n super(message, providerId, modelId, { code: \"invalid_embedding_response\", retryable: false })\n }\n}\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": ";;AAIO,MAAM,sCAAqC,MAAM;AAAA,EAC7C,OAAO;AAClB;AAAA;AAGO,MAAM,4BAA2B,MAAM;AAAA,EAKjC;AAAA,EACA;AAAA,EALF,OAAO;AAAA,EAEhB,WAAW,CACT,SACS,YACA,SACT,SAOA;AAAA,IACA,MAAM,SAAS,OAAO;AAAA,IAVb;AAAA,IACA;AAAA,IAUT,KAAK,SAAS,SAAS;AAAA,IACvB,KAAK,OAAO,SAAS;AAAA,IACrB,KAAK,YAAY,SAAS;AAAA,IAC1B,KAAK,eAAe,SAAS;AAAA,IAC7B,KAAK,YAAY,SAAS,aAAa;AAAA;AAAA,EAGhC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACX;AAAA;AAEO,MAAM,0BAAyB,MAAM;AAAA,EACjC,OAAO;AAClB;AAAA;AAEO,MAAM,sCAAqC,MAAM;AAAA,EAC7C,OAAO;AAAA,EAEhB,WAAW,CACT,SACA,SAGA;AAAA,IACA,MAAM,SAAS,OAAO;AAAA,IACtB,KAAK,SAAS,SAAS;AAAA;AAAA,EAGhB;AACX;AAAA;AAEO,MAAM,+BAA8B,MAAM;AAAA,EACtC,OAAO;AAAA,EAEhB,WAAW,CACT,SACA,SAUA;AAAA,IACA,MAAM,SAAS,OAAO;AAAA,IACtB,KAAK,OAAO,SAAS;AAAA,IACrB,KAAK,aAAa,SAAS;AAAA,IAC3B,KAAK,UAAU,SAAS;AAAA,IACxB,KAAK,aAAa,SAAS;AAAA,IAC3B,KAAK,kBAAkB,SAAS;AAAA,IAChC,KAAK,eAAe,SAAS;AAAA,IAC7B,KAAK,QAAQ,SAAS;AAAA,IACtB,KAAK,OAAO,SAAS;AAAA;AAAA,EAGd;AAAA,E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