@noy-db/hub 0.3.0-pre.8 → 0.3.0
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/aggregate/index.js +9 -8
- package/dist/aggregate/index.js.map +1 -1
- package/dist/api-ZGS6LCOF.js +20 -0
- package/dist/as/index.js +11 -11
- package/dist/attestation/index.js +18 -18
- package/dist/backup-BJ57IKAO.js +242 -0
- package/dist/backup-BJ57IKAO.js.map +1 -0
- package/dist/blobs/index.js +13 -11
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +92 -0
- package/dist/broker/index.js.map +1 -0
- package/dist/bundle/index.js +25 -22
- package/dist/bundle/index.js.map +1 -1
- package/dist/by/index.js +2 -2
- package/dist/cargo/index.js +31 -31
- package/dist/chunk-2NVOWNI3.js +167 -0
- package/dist/chunk-2NVOWNI3.js.map +1 -0
- package/dist/chunk-3B5VVCNY.js +71 -0
- package/dist/chunk-3LQ2YKO4.js +230 -0
- package/dist/chunk-3QCRBHCY.js +54 -0
- package/dist/chunk-454JXE57.js +1697 -0
- package/dist/chunk-454JXE57.js.map +1 -0
- package/dist/chunk-4CTHCN4J.js +480 -0
- package/dist/chunk-4CTHCN4J.js.map +1 -0
- package/dist/chunk-4GPE63GU.js +111 -0
- package/dist/chunk-4GPE63GU.js.map +1 -0
- package/dist/chunk-4JBYV75E.js +150 -0
- package/dist/chunk-4NXKCLLQ.js +97 -0
- package/dist/chunk-4VNQOLML.js +29 -0
- package/dist/chunk-4VNQOLML.js.map +1 -0
- package/dist/chunk-5M5DVGV7.js +69 -0
- package/dist/chunk-5O3XF4DV.js +150 -0
- package/dist/chunk-5O3XF4DV.js.map +1 -0
- package/dist/chunk-5YOLBEQ6.js +30 -0
- package/dist/chunk-6CRIV7DE.js +129 -0
- package/dist/chunk-6JTIAGHD.js +621 -0
- package/dist/chunk-6JTIAGHD.js.map +1 -0
- package/dist/chunk-6QTNZJBS.js +255 -0
- package/dist/chunk-6T2SCQRU.js +86 -0
- package/dist/chunk-7DSTRQIJ.js +45 -0
- package/dist/chunk-AUSTCW2X.js +589 -0
- package/dist/chunk-B3HJYUOF.js +209 -0
- package/dist/chunk-BDVFPG6Y.js +164 -0
- package/dist/chunk-BIOUI4HL.js +1554 -0
- package/dist/chunk-BIOUI4HL.js.map +1 -0
- package/dist/chunk-CAF6WOK7.js +36 -0
- package/dist/chunk-CDUQTA3Z.js +381 -0
- package/dist/chunk-CDUQTA3Z.js.map +1 -0
- package/dist/chunk-CIE2BASH.js +404 -0
- package/dist/chunk-CRI4OUV4.js +42 -0
- package/dist/chunk-DLG74CNB.js +91 -0
- package/dist/chunk-E5ZQT5KX.js +30 -0
- package/dist/chunk-E5ZQT5KX.js.map +1 -0
- package/dist/chunk-EQO2UVP4.js +247 -0
- package/dist/chunk-EQO2UVP4.js.map +1 -0
- package/dist/chunk-ERJ7FU55.js +367 -0
- package/dist/chunk-EVVGJDRQ.js +205 -0
- package/dist/chunk-EVX47VBM.js +74 -0
- package/dist/chunk-EVX47VBM.js.map +1 -0
- package/dist/chunk-EXK7QRWF.js +59 -0
- package/dist/chunk-EYZ6IQ6X.js +202 -0
- package/dist/chunk-F64IRYG3.js +45 -0
- package/dist/chunk-FHS2HQSH.js +823 -0
- package/dist/chunk-FM3G3NOY.js +206 -0
- package/dist/chunk-FM3G3NOY.js.map +1 -0
- package/dist/chunk-FUG4SFN3.js +36 -0
- package/dist/chunk-FUG4SFN3.js.map +1 -0
- package/dist/chunk-GKEWXIV5.js +80 -0
- package/dist/chunk-GTGPO5KW.js +59 -0
- package/dist/chunk-HB3RFQSC.js +95 -0
- package/dist/chunk-HDMEGAQE.js +957 -0
- package/dist/chunk-HDMEGAQE.js.map +1 -0
- package/dist/chunk-HDQIIUPH.js +135 -0
- package/dist/chunk-HDQIIUPH.js.map +1 -0
- package/dist/chunk-HTJQYHZP.js +344 -0
- package/dist/chunk-HTJQYHZP.js.map +1 -0
- package/dist/chunk-I6GALP6E.js +99 -0
- package/dist/chunk-IGJCYUT5.js +99 -0
- package/dist/chunk-IGJCYUT5.js.map +1 -0
- package/dist/chunk-IL6POWCW.js +130 -0
- package/dist/chunk-IU6SNYX6.js +117 -0
- package/dist/chunk-J2ZX2XUV.js +778 -0
- package/dist/chunk-JIF24JPM.js +495 -0
- package/dist/chunk-JIF24JPM.js.map +1 -0
- package/dist/chunk-JK733I5V.js +23 -0
- package/dist/chunk-JK733I5V.js.map +1 -0
- package/dist/chunk-JKJOGPZN.js +29 -0
- package/dist/chunk-JNAI2HN2.js +32 -0
- package/dist/chunk-JNAI2HN2.js.map +1 -0
- package/dist/chunk-JZUV47FZ.js +41 -0
- package/dist/chunk-K5IMOGHB.js +30 -0
- package/dist/chunk-KPZS5QAQ.js +151 -0
- package/dist/chunk-KPZS5QAQ.js.map +1 -0
- package/dist/chunk-KSKBRKGJ.js +291 -0
- package/dist/chunk-KSKBRKGJ.js.map +1 -0
- package/dist/chunk-LASZKVMO.js +382 -0
- package/dist/chunk-LXEXBTKL.js +515 -0
- package/dist/chunk-LXEXBTKL.js.map +1 -0
- package/dist/chunk-M4CV6BRT.js +524 -0
- package/dist/chunk-M4CV6BRT.js.map +1 -0
- package/dist/chunk-MEFJPTZ4.js +371 -0
- package/dist/chunk-MEFJPTZ4.js.map +1 -0
- package/dist/chunk-MV43JSJF.js +265 -0
- package/dist/chunk-MV43JSJF.js.map +1 -0
- package/dist/chunk-NJ4EOKMB.js +392 -0
- package/dist/chunk-NJ4EOKMB.js.map +1 -0
- package/dist/chunk-NR5LT5RY.js +135 -0
- package/dist/chunk-NWSGI5C7.js +261 -0
- package/dist/chunk-NWSGI5C7.js.map +1 -0
- package/dist/chunk-OSDB5WW3.js +739 -0
- package/dist/chunk-OSDB5WW3.js.map +1 -0
- package/dist/chunk-PN2XMATY.js +37 -0
- package/dist/chunk-PN2XMATY.js.map +1 -0
- package/dist/chunk-Q5VNKNE5.js +70 -0
- package/dist/chunk-QLWMEXCT.js +21 -0
- package/dist/chunk-QRB7NAOJ.js +123 -0
- package/dist/chunk-R4ROFEYC.js +74 -0
- package/dist/chunk-RCVJZMFE.js +164 -0
- package/dist/chunk-RCVJZMFE.js.map +1 -0
- package/dist/chunk-RIX4V2TB.js +367 -0
- package/dist/chunk-RYCTDFUX.js +40 -0
- package/dist/chunk-RZ5SVOYR.js +155 -0
- package/dist/chunk-SLFHQTTW.js +99 -0
- package/dist/chunk-SNZ6URZZ.js +2782 -0
- package/dist/chunk-SNZ6URZZ.js.map +1 -0
- package/dist/chunk-T2FFWNPK.js +75 -0
- package/dist/chunk-T2FFWNPK.js.map +1 -0
- package/dist/chunk-UNFPPVNI.js +23 -0
- package/dist/chunk-VFUPHI2Z.js +333 -0
- package/dist/chunk-VFUPHI2Z.js.map +1 -0
- package/dist/chunk-VLFCJYTL.js +235 -0
- package/dist/chunk-VN3DBQAU.js +124 -0
- package/dist/chunk-VYYM3MEN.js +98 -0
- package/dist/chunk-VYYM3MEN.js.map +1 -0
- package/dist/chunk-VZRODIM3.js +49 -0
- package/dist/chunk-W22IKJE2.js +94 -0
- package/dist/chunk-X3YYQWOQ.js +155 -0
- package/dist/chunk-X7QBD67R.js +14405 -0
- package/dist/chunk-X7QBD67R.js.map +1 -0
- package/dist/chunk-XDYREZWE.js +1128 -0
- package/dist/chunk-XDYREZWE.js.map +1 -0
- package/dist/chunk-XWZVFISC.js +720 -0
- package/dist/chunk-XWZVFISC.js.map +1 -0
- package/dist/chunk-YFXZEAYK.js +85 -0
- package/dist/chunk-ZAJAVEXY.js +50 -0
- package/dist/chunk-ZICD77GM.js +34 -0
- package/dist/chunk-ZJ2AK4V7.js +38 -0
- package/dist/chunk-ZJ2AK4V7.js.map +1 -0
- package/dist/chunk-ZUODRVHY.js +14 -0
- package/dist/classified/index.js +5 -3
- package/dist/classified-marker-CZKA6ITE.js +28 -0
- package/dist/classified-marker-CZKA6ITE.js.map +1 -0
- package/dist/collection-facade-TLWIPI76.js +44 -0
- package/dist/computed-ZIQTYTDI.js +11 -0
- package/dist/consent/index.js +9 -9
- package/dist/crdt/index.js +1 -1
- package/dist/dead-filter-ESOBZZP5.js +28 -0
- package/dist/delegation-W7ZV2322.js +25 -0
- package/dist/derivations/index.js +12 -11
- package/dist/derive-H2BJTLUI.js +21 -0
- package/dist/enclave-AP3I5W7O.js +141 -0
- package/dist/executor-KGWTNEQD.js +9 -0
- package/dist/executor-OVEXR6RT.js +9 -0
- package/dist/executor-UNEH5ZYH.js +25 -0
- package/dist/export-accessible-PCMXSUZS.js +23 -0
- package/dist/extract-partition-SWHFSYJO.js +38 -0
- package/dist/fanout-sidecar-A765THMX.js +74 -0
- package/dist/find-N6345CNT.js +11 -0
- package/dist/forget/index.js +10 -10
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +6 -6
- package/dist/history/index.js +14 -11
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +50 -37
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +307 -1459
- package/dist/index.js +595 -198
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +7 -7
- package/dist/indexing/index.js.map +1 -1
- package/dist/issue-5OKB6I2R.js +19 -0
- package/dist/kernel/best-effort-revert.d.ts +52 -0
- package/dist/kernel/cache/index.d.ts +10 -0
- package/dist/kernel/cache/lru.d.ts +97 -0
- package/dist/kernel/cache/policy.d.ts +32 -0
- package/dist/kernel/collection-config.d.ts +809 -0
- package/dist/kernel/collection.d.ts +1522 -0
- package/dist/kernel/constants.d.ts +18 -0
- package/dist/kernel/debug.d.ts +25 -0
- package/dist/kernel/enclave/broker/proof.d.ts +154 -0
- package/dist/kernel/enclave/classify/bidx.d.ts +77 -0
- package/dist/kernel/enclave/classify/compare.d.ts +10 -0
- package/dist/kernel/enclave/classify/digest.d.ts +8 -0
- package/dist/kernel/enclave/classify/find.d.ts +36 -0
- package/dist/kernel/enclave/classify/kofn.d.ts +7 -0
- package/dist/kernel/enclave/classify/normalize.d.ts +7 -0
- package/dist/kernel/enclave/classify/reveal.d.ts +10 -0
- package/dist/kernel/enclave/classify/vdig.d.ts +39 -0
- package/dist/kernel/enclave/classify/verify.d.ts +36 -0
- package/dist/kernel/enclave/classify/write.d.ts +8 -0
- package/dist/kernel/enclave/crypto.d.ts +263 -0
- package/dist/kernel/enclave/index.d.ts +79 -0
- package/dist/kernel/enclave/record-keys/deterministic.d.ts +55 -0
- package/dist/kernel/enclave/record-keys/envelope-body.d.ts +79 -0
- package/dist/kernel/enclave/record-keys/lifecycle.d.ts +107 -0
- package/dist/kernel/enclave/record-keys/record-codec.d.ts +328 -0
- package/dist/kernel/enclave/record-keys/sealed-slot.d.ts +14 -0
- package/dist/kernel/enclave/record-keys/sealed-slots.d.ts +123 -0
- package/dist/kernel/enclave/record-keys/sealing.d.ts +70 -0
- package/dist/kernel/enclave/record-keys/tombstone.d.ts +57 -0
- package/dist/kernel/env-check.d.ts +1 -0
- package/dist/kernel/errors.d.ts +1922 -0
- package/dist/kernel/events.d.ts +11 -0
- package/dist/kernel/lazy-count.d.ts +13 -0
- package/dist/kernel/memory-store.d.ts +17 -0
- package/dist/kernel/mutation.d.ts +14 -0
- package/dist/kernel/noydb.d.ts +826 -0
- package/dist/kernel/paths.d.ts +25 -0
- package/dist/kernel/query/builder.d.ts +520 -0
- package/dist/kernel/query/index.d.ts +31 -0
- package/dist/kernel/query/join.d.ts +205 -0
- package/dist/kernel/query/live.d.ts +111 -0
- package/dist/kernel/query/predicate.d.ts +139 -0
- package/dist/kernel/query/scan-builder.d.ts +334 -0
- package/dist/kernel/refs.d.ts +205 -0
- package/dist/kernel/schema.d.ts +134 -0
- package/dist/kernel/sync-policy.d.ts +188 -0
- package/dist/kernel/tier-visibility.d.ts +54 -0
- package/dist/kernel/types.d.ts +3239 -0
- package/dist/kernel/util/discriminant.d.ts +58 -0
- package/dist/kernel/util/index.d.ts +14 -0
- package/dist/kernel/util/sanitize-filename.d.ts +75 -0
- package/dist/kernel/validation.d.ts +130 -0
- package/dist/kernel/vault.d.ts +1740 -0
- package/dist/kernel/via/compose.d.ts +144 -0
- package/dist/kernel/via/dispatch.d.ts +195 -0
- package/dist/kernel/via/graph-wiring.d.ts +145 -0
- package/dist/kernel/via/graph.d.ts +166 -0
- package/dist/kernel/via/index.d.ts +200 -0
- package/dist/kernel/via/pipeline.d.ts +266 -0
- package/dist/kernel/via/reconcile.d.ts +153 -0
- package/dist/kernel/via/taint-binding.d.ts +66 -0
- package/dist/kernel/write-queue.d.ts +46 -0
- package/dist/ledger-GFBKVPV4.js +42 -0
- package/dist/legacy/bundle.d.ts +30 -0
- package/dist/legacy/kernel.d.ts +33 -0
- package/dist/liberate-3VDOT4KO.js +24 -0
- package/dist/link-set-Z7Q2ASFX.js +31 -0
- package/dist/materialized-views/index.js +19 -15
- package/dist/noydb-ZCJOYBDI.js +68 -0
- package/dist/on/index.js +9 -9
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -12
- package/dist/pod/index.js +11 -11
- package/dist/policy-Z3RUAIY2.js +41 -0
- package/dist/port/as/index.d.ts +26 -0
- package/dist/port/at/index.d.ts +18 -0
- package/dist/port/by/default-provider.d.ts +9 -0
- package/dist/port/by/index.d.ts +17 -0
- package/dist/port/by/types.d.ts +86 -0
- package/dist/port/in/index.d.ts +21 -0
- package/dist/port/on/index.d.ts +27 -0
- package/dist/port/to/index.d.ts +19 -0
- package/dist/port/ui/index.d.ts +21 -0
- package/dist/port/with/blob-strategy.d.ts +98 -0
- package/dist/port/with/broker-strategy.d.ts +84 -0
- package/dist/port/with/capabilities.d.ts +31 -0
- package/dist/port/with/classified-marker.d.ts +9 -0
- package/dist/port/with/classified-strategy.d.ts +62 -0
- package/dist/port/with/computed-strategy.d.ts +19 -0
- package/dist/port/with/i18n-strategy.d.ts +175 -0
- package/dist/port/with/index.d.ts +18 -0
- package/dist/port/with/lazy-strategy.d.ts +48 -0
- package/dist/port/with/lookup-strategy.d.ts +129 -0
- package/dist/port/with/service-bus.d.ts +156 -0
- package/dist/port/with/team-strategy.d.ts +36 -0
- package/dist/port/with/write-hooks.d.ts +34 -0
- package/dist/portability/index.js +8 -8
- package/dist/post-register-JTH76BLY.js +60 -0
- package/dist/post-register-JTH76BLY.js.map +1 -0
- package/dist/public-envelope-B4KNWVUA.js +32 -0
- package/dist/purge-scope-FGNNLWHD.js +24 -0
- package/dist/purge-scope-FGNNLWHD.js.map +1 -0
- package/dist/query/index.js +9 -6
- package/dist/read-only-facade-CHCKSEPD.js +8 -0
- package/dist/register-VAHONCID.js +23 -0
- package/dist/registry-7MLVD3VO.js +19 -0
- package/dist/registry-EPKPD5SM.js +18 -0
- package/dist/registry-P5T7PS2U.js +9 -0
- package/dist/request-withdrawal-TI3A5WPS.js +31 -0
- package/dist/reveal-DIBHLUZX.js +38 -0
- package/dist/reveal-DIBHLUZX.js.map +1 -0
- package/dist/revoke-FDRD6GRW.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/sealed-record/index.js +12 -12
- package/dist/seed-Q6M2IZFL.js +231 -0
- package/dist/seed-Q6M2IZFL.js.map +1 -0
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-MUWEIUI6.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/stale-OSQ7J3AA.js +29 -0
- package/dist/storage-MVFCGEQE.js +23 -0
- package/dist/store-coordination-provider-64OEZFGS.js +142 -0
- package/dist/sync/index.js +9 -9
- package/dist/team/index.js +15 -15
- package/dist/tiers/index.js +14 -10
- package/dist/to/index.js +1 -2
- package/dist/tx/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/verify-ZASTRNPR.js +140 -0
- package/dist/verify-ZASTRNPR.js.map +1 -0
- package/dist/via/blob/active.d.ts +34 -0
- package/dist/via/blob/binding.d.ts +86 -0
- package/dist/via/blob/index.d.ts +34 -0
- package/dist/via/classified/active.d.ts +3 -0
- package/dist/via/classified/binding.d.ts +83 -0
- package/dist/via/classified/config-drift.d.ts +34 -0
- package/dist/via/classified/descriptor.d.ts +66 -0
- package/dist/via/classified/errors.d.ts +19 -0
- package/dist/via/classified/guards.d.ts +23 -0
- package/dist/via/classified/index.d.ts +11 -0
- package/dist/via/classified/presets.d.ts +65 -0
- package/dist/via/classified/resolve.d.ts +9 -0
- package/dist/via/classified/strategy.d.ts +11 -0
- package/dist/via/classified/validators.d.ts +3 -0
- package/dist/via/classified/write.d.ts +4 -0
- package/dist/via/computed/binding.d.ts +34 -0
- package/dist/via/computed/descriptor.d.ts +35 -0
- package/dist/via/i18n/active.d.ts +28 -0
- package/dist/via/i18n/binding.d.ts +36 -0
- package/dist/via/i18n/core.d.ts +267 -0
- package/dist/via/i18n/densify.d.ts +24 -0
- package/dist/via/i18n/dictionary.d.ts +200 -0
- package/dist/via/i18n/index.d.ts +21 -0
- package/dist/via/i18n/policy.d.ts +44 -0
- package/dist/via/i18n/script.d.ts +26 -0
- package/dist/via/i18n/strategy.d.ts +13 -0
- package/dist/via/lookup/active.d.ts +19 -0
- package/dist/via/lookup/binding.d.ts +99 -0
- package/dist/via/lookup/descriptor.d.ts +123 -0
- package/dist/via/lookup/handle.d.ts +220 -0
- package/dist/via/lookup/index.d.ts +17 -0
- package/dist/via/lookup/registry.d.ts +228 -0
- package/dist/via/lookup/snapshot.d.ts +67 -0
- package/dist/via/money/arith.d.ts +68 -0
- package/dist/via/money/binding.d.ts +21 -0
- package/dist/via/money/branded.d.ts +61 -0
- package/dist/via/money/descriptor.d.ts +73 -0
- package/dist/via/money/fixed-point.d.ts +51 -0
- package/dist/via/money/index.d.ts +15 -0
- package/dist/via/money/iso4217.d.ts +6 -0
- package/dist/via/money/money-reducer.d.ts +33 -0
- package/dist/via/money/normalize.d.ts +105 -0
- package/dist/via/money/paths.d.ts +61 -0
- package/dist/via/money/where.d.ts +127 -0
- package/dist/walk-SVNDIZ62.js +241 -0
- package/dist/with/index.js +11 -11
- package/dist/with-audit/attestation/active.d.ts +10 -0
- package/dist/with-audit/attestation/index.d.ts +16 -0
- package/dist/with-audit/attestation/issue.d.ts +29 -0
- package/dist/with-audit/attestation/revoke.d.ts +15 -0
- package/dist/with-audit/attestation/signer.d.ts +33 -0
- package/dist/with-audit/attestation/strategy.d.ts +44 -0
- package/dist/with-audit/attestation/vault-facade.d.ts +62 -0
- package/dist/with-audit/consent/active.d.ts +14 -0
- package/dist/with-audit/consent/consent.d.ts +114 -0
- package/dist/with-audit/consent/index.d.ts +14 -0
- package/dist/with-audit/consent/strategy.d.ts +36 -0
- package/dist/with-audit/forget/active.d.ts +31 -0
- package/dist/with-audit/forget/index.d.ts +28 -0
- package/dist/with-audit/forget/purge-scope.d.ts +54 -0
- package/dist/with-audit/forget/strategy.d.ts +199 -0
- package/dist/with-audit/forget/subject-index.d.ts +83 -0
- package/dist/with-audit/guards/executor.d.ts +26 -0
- package/dist/with-audit/guards/immutable-guard.d.ts +63 -0
- package/dist/with-audit/guards/index.d.ts +10 -0
- package/dist/with-audit/guards/read-only-facade.d.ts +31 -0
- package/dist/with-audit/guards/registry.d.ts +83 -0
- package/dist/with-audit/guards/transition-guard.d.ts +82 -0
- package/dist/with-audit/guards/types.d.ts +134 -0
- package/dist/with-audit/guards/with-guard.d.ts +15 -0
- package/dist/with-audit/periods/active.d.ts +11 -0
- package/dist/with-audit/periods/index.d.ts +18 -0
- package/dist/with-audit/periods/periods.d.ts +417 -0
- package/dist/with-audit/periods/strategy.d.ts +32 -0
- package/dist/with-audit/periods/vault-facade.d.ts +95 -0
- package/dist/with-audit/portability/active.d.ts +11 -0
- package/dist/with-audit/portability/export-accessible.d.ts +46 -0
- package/dist/with-audit/portability/index.d.ts +18 -0
- package/dist/with-audit/portability/request-withdrawal.d.ts +85 -0
- package/dist/with-audit/portability/strategy.d.ts +31 -0
- package/dist/with-audit/portability/withdraw-accessible.d.ts +82 -0
- package/dist/with-audit/sealed-record/active.d.ts +9 -0
- package/dist/with-audit/sealed-record/index.d.ts +55 -0
- package/dist/with-audit/sealed-record/strategy.d.ts +34 -0
- package/dist/with-audit/sealed-record/types.d.ts +27 -0
- package/dist/with-audit/tiers/active.d.ts +9 -0
- package/dist/with-audit/tiers/index.d.ts +394 -0
- package/dist/with-audit/tiers/strategy.d.ts +36 -0
- package/dist/with-cargo/active.d.ts +11 -0
- package/dist/with-cargo/adopt-partition.d.ts +81 -0
- package/dist/with-cargo/decrypt-partition.d.ts +19 -0
- package/dist/with-cargo/describe-extraction.d.ts +41 -0
- package/dist/with-cargo/extract-partition.d.ts +155 -0
- package/dist/with-cargo/index.d.ts +33 -0
- package/dist/with-cargo/strategy.d.ts +30 -0
- package/dist/with-cargo/vault-diff.d.ts +144 -0
- package/dist/with-cargo/walk-closure.d.ts +67 -0
- package/dist/with-commit/crdt/active.d.ts +25 -0
- package/dist/with-commit/crdt/crdt.d.ts +42 -0
- package/dist/with-commit/crdt/index.d.ts +16 -0
- package/dist/with-commit/crdt/strategy.d.ts +25 -0
- package/dist/with-commit/history/active.d.ts +40 -0
- package/dist/with-commit/history/diff.d.ts +23 -0
- package/dist/with-commit/history/history.d.ts +73 -0
- package/dist/with-commit/history/index.d.ts +30 -0
- package/dist/with-commit/history/ledger/constants.d.ts +37 -0
- package/dist/with-commit/history/ledger/entry.d.ts +195 -0
- package/dist/with-commit/history/ledger/hash.d.ts +30 -0
- package/dist/with-commit/history/ledger/index.d.ts +19 -0
- package/dist/with-commit/history/ledger/patch.d.ts +99 -0
- package/dist/with-commit/history/ledger/store.d.ts +356 -0
- package/dist/with-commit/history/strategy.d.ts +136 -0
- package/dist/with-commit/history/time-machine.d.ts +202 -0
- package/dist/with-commit/numbering/descriptor.d.ts +27 -0
- package/dist/with-commit/numbering/index.d.ts +69 -0
- package/dist/with-commit/sequence/active.d.ts +10 -0
- package/dist/with-commit/sequence/index.d.ts +150 -0
- package/dist/with-commit/sequence/strategy.d.ts +26 -0
- package/dist/with-commit/tx/active.d.ts +27 -0
- package/dist/with-commit/tx/dry-run.d.ts +29 -0
- package/dist/with-commit/tx/elevated-handle.d.ts +59 -0
- package/dist/with-commit/tx/index.d.ts +13 -0
- package/dist/with-commit/tx/invariants.d.ts +68 -0
- package/dist/with-commit/tx/strategy.d.ts +23 -0
- package/dist/with-commit/tx/transaction.d.ts +212 -0
- package/dist/with-fork/archive/engine.d.ts +71 -0
- package/dist/with-fork/archive/index.d.ts +23 -0
- package/dist/with-fork/shadow/active.d.ts +6 -0
- package/dist/with-fork/shadow/index.d.ts +14 -0
- package/dist/with-fork/shadow/strategy.d.ts +28 -0
- package/dist/with-fork/shadow/vault-frame.d.ts +93 -0
- package/dist/with-fork/snapshots/active.d.ts +20 -0
- package/dist/with-fork/snapshots/engine.d.ts +36 -0
- package/dist/with-fork/snapshots/index.d.ts +5 -0
- package/dist/with-fork/snapshots/noydb-facade.d.ts +64 -0
- package/dist/with-fork/snapshots/policy.d.ts +23 -0
- package/dist/with-fork/snapshots/scheduler.d.ts +34 -0
- package/dist/with-fork/snapshots/strategy.d.ts +48 -0
- package/dist/with-formula/computed/index.d.ts +48 -0
- package/dist/with-formula/computed/lazy.d.ts +13 -0
- package/dist/with-formula/derivations/executor.d.ts +61 -0
- package/dist/with-formula/derivations/fanout-sidecar.d.ts +75 -0
- package/dist/with-formula/derivations/index.d.ts +6 -0
- package/dist/with-formula/derivations/registry.d.ts +67 -0
- package/dist/with-formula/derivations/stale.d.ts +39 -0
- package/dist/with-formula/derivations/strategy-hash.d.ts +1 -0
- package/dist/with-formula/derivations/types.d.ts +248 -0
- package/dist/with-formula/derivations/with-derivation.d.ts +10 -0
- package/dist/with-formula/derivations/with-rollup.d.ts +34 -0
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +58 -0
- package/dist/with-formula/materialized-views/executor.d.ts +80 -0
- package/dist/with-formula/materialized-views/index.d.ts +11 -0
- package/dist/with-formula/materialized-views/query-hash.d.ts +23 -0
- package/dist/with-formula/materialized-views/registry.d.ts +99 -0
- package/dist/with-formula/materialized-views/stale.d.ts +113 -0
- package/dist/with-formula/materialized-views/types.d.ts +318 -0
- package/dist/with-formula/materialized-views/with-materialized-view.d.ts +24 -0
- package/dist/with-formula/overlay-views/index.d.ts +5 -0
- package/dist/with-formula/overlay-views/registry.d.ts +42 -0
- package/dist/with-formula/overlay-views/types.d.ts +97 -0
- package/dist/with-formula/overlay-views/virtual-collection.d.ts +90 -0
- package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +9 -0
- package/dist/with-lookup/aggregate/active.d.ts +33 -0
- package/dist/with-lookup/aggregate/aggregation.d.ts +166 -0
- package/dist/with-lookup/aggregate/canonical-key.d.ts +16 -0
- package/dist/with-lookup/aggregate/groupby.d.ts +280 -0
- package/dist/with-lookup/aggregate/index.d.ts +23 -0
- package/dist/with-lookup/aggregate/reducers.d.ts +257 -0
- package/dist/with-lookup/aggregate/strategy.d.ts +59 -0
- package/dist/with-lookup/embeddings/cosine.d.ts +2 -0
- package/dist/with-lookup/embeddings/descriptor.d.ts +8 -0
- package/dist/with-lookup/embeddings/index.d.ts +4 -0
- package/dist/with-lookup/embeddings/vec-id.d.ts +47 -0
- package/dist/with-lookup/embeddings/vector-set.d.ts +19 -0
- package/dist/with-lookup/indexing/active.d.ts +30 -0
- package/dist/with-lookup/indexing/collection-facade.d.ts +157 -0
- package/dist/with-lookup/indexing/eager-indexes.d.ts +122 -0
- package/dist/with-lookup/indexing/index.d.ts +27 -0
- package/dist/with-lookup/indexing/lazy-builder.d.ts +102 -0
- package/dist/with-lookup/indexing/persisted-indexes.d.ts +229 -0
- package/dist/with-lookup/indexing/strategy.d.ts +56 -0
- package/dist/with-lookup/indexing/unique-constraints.d.ts +74 -0
- package/dist/with-lookup/search/active.d.ts +10 -0
- package/dist/with-lookup/search/build-docs.d.ts +15 -0
- package/dist/with-lookup/search/collection-facade.d.ts +163 -0
- package/dist/with-lookup/search/fuse.d.ts +22 -0
- package/dist/with-lookup/search/index-store.d.ts +19 -0
- package/dist/with-lookup/search/index.d.ts +19 -0
- package/dist/with-lookup/search/inverted-index.d.ts +47 -0
- package/dist/with-lookup/search/persisted-index-store.d.ts +121 -0
- package/dist/with-lookup/search/retrieve-types.d.ts +29 -0
- package/dist/with-lookup/search/scan.d.ts +28 -0
- package/dist/with-lookup/search/segment.d.ts +15 -0
- package/dist/with-lookup/search/serialize.d.ts +4 -0
- package/dist/with-lookup/search/snippet.d.ts +5 -0
- package/dist/with-lookup/search/strategy.d.ts +41 -0
- package/dist/with-lookup/search/tokenize.d.ts +12 -0
- package/dist/with-party/auth-introspection/index.d.ts +44 -0
- package/dist/with-party/broker/active.d.ts +23 -0
- package/dist/with-party/broker/index.d.ts +28 -0
- package/dist/with-party/broker/seed.d.ts +77 -0
- package/dist/with-party/custody/active.d.ts +10 -0
- package/dist/with-party/custody/index.d.ts +69 -0
- package/dist/with-party/custody/liberate.d.ts +64 -0
- package/dist/with-party/custody/strategy.d.ts +48 -0
- package/dist/with-party/directory/index.d.ts +11 -0
- package/dist/with-party/directory/public-envelope/index.d.ts +12 -0
- package/dist/with-party/directory/public-envelope/schema.d.ts +24 -0
- package/dist/with-party/directory/public-envelope/storage.d.ts +59 -0
- package/dist/with-party/directory/public-envelope/types.d.ts +80 -0
- package/dist/with-party/directory/storage.d.ts +33 -0
- package/dist/with-party/directory/types.d.ts +43 -0
- package/dist/with-party/directory/user-envelope/api.d.ts +201 -0
- package/dist/with-party/directory/user-envelope/index.d.ts +12 -0
- package/dist/with-party/directory/user-envelope/storage.d.ts +54 -0
- package/dist/with-party/directory/visibility.d.ts +47 -0
- package/dist/with-party/policy/engine.d.ts +60 -0
- package/dist/with-party/policy/index.d.ts +15 -0
- package/dist/with-party/policy/noydb-facade.d.ts +39 -0
- package/dist/with-party/policy/presets.d.ts +38 -0
- package/dist/with-party/policy/storage.d.ts +31 -0
- package/dist/with-party/session/active.d.ts +34 -0
- package/dist/with-party/session/dev-unlock.d.ts +128 -0
- package/dist/with-party/session/index.d.ts +23 -0
- package/dist/with-party/session/session-policy.d.ts +92 -0
- package/dist/with-party/session/session.d.ts +131 -0
- package/dist/with-party/session/strategy.d.ts +42 -0
- package/dist/with-party/session/unlock-state.d.ts +47 -0
- package/dist/with-party/sync/index.d.ts +31 -0
- package/dist/with-party/tab-coordination.d.ts +73 -0
- package/dist/with-party/tab-write-relay.d.ts +39 -0
- package/dist/with-party/team/active.d.ts +13 -0
- package/dist/with-party/team/authenticators.d.ts +95 -0
- package/dist/with-party/team/deed.d.ts +97 -0
- package/dist/with-party/team/delegation.d.ts +88 -0
- package/dist/with-party/team/index.d.ts +38 -0
- package/dist/with-party/team/keyring.d.ts +318 -0
- package/dist/with-party/team/magic-link-grant.d.ts +152 -0
- package/dist/with-party/team/managed-passphrase.d.ts +280 -0
- package/dist/with-party/team/noydb-facade.d.ts +484 -0
- package/dist/with-party/team/peer-recover.d.ts +81 -0
- package/dist/with-party/team/presence.d.ts +81 -0
- package/dist/with-party/team/recovery.d.ts +191 -0
- package/dist/with-party/team/reserved-secret-collections.d.ts +41 -0
- package/dist/with-party/team/rotate-recover.d.ts +275 -0
- package/dist/with-party/team/shamir-recovery-provider.d.ts +15 -0
- package/dist/with-party/team/strategy.d.ts +9 -0
- package/dist/with-party/team/sync-active.d.ts +33 -0
- package/dist/with-party/team/sync-credentials.d.ts +113 -0
- package/dist/with-party/team/sync-strategy.d.ts +67 -0
- package/dist/with-party/team/sync-transaction.d.ts +39 -0
- package/dist/with-party/team/sync.d.ts +174 -0
- package/dist/with-party/team/tiers.d.ts +39 -0
- package/dist/with-party/team/wrapped-deks.d.ts +86 -0
- package/dist/with-pod/backup.d.ts +74 -0
- package/dist/with-pod/bundle.d.ts +414 -0
- package/dist/with-pod/format.d.ts +203 -0
- package/dist/with-pod/index.d.ts +20 -0
- package/dist/with-pod/pod-store.d.ts +54 -0
- package/dist/with-pod/ulid.d.ts +64 -0
- package/dist/with-shape/blobs/blob-compaction.d.ts +170 -0
- package/dist/with-shape/blobs/blob-intent.d.ts +153 -0
- package/dist/with-shape/blobs/blob-set.d.ts +1286 -0
- package/dist/with-shape/blobs/export-blobs.d.ts +110 -0
- package/dist/with-shape/blobs/import-external.d.ts +50 -0
- package/dist/with-shape/blobs/mime-magic.d.ts +48 -0
- package/dist/with-shape/blobs/object-projection.d.ts +70 -0
- package/dist/with-shape/introspection/describe.d.ts +237 -0
- package/dist/with-shape/introspection/field-meta.d.ts +61 -0
- package/dist/with-shape/introspection/fields.d.ts +14 -0
- package/dist/with-shape/introspection/index.d.ts +12 -0
- package/dist/with-shape/introspection/json-schema.d.ts +13 -0
- package/dist/with-shape/introspection/meta.d.ts +22 -0
- package/dist/with-shape/introspection/projection.d.ts +13 -0
- package/dist/with-shape/introspection/types.d.ts +154 -0
- package/dist/with-shape/introspection/walk.d.ts +50 -0
- package/dist/with-shape/links/lazy-handle.d.ts +36 -0
- package/dist/with-shape/links/link-set.d.ts +67 -0
- package/dist/with-shape/links/names.d.ts +65 -0
- package/dist/with-shape/links/vault-facade.d.ts +211 -0
- package/dist/with-shape/persisted-schemas/canonicalize.d.ts +11 -0
- package/dist/with-shape/persisted-schemas/derive.d.ts +29 -0
- package/dist/with-shape/persisted-schemas/index.d.ts +21 -0
- package/dist/with-shape/persisted-schemas/register.d.ts +66 -0
- package/dist/with-shape/persisted-schemas/storage.d.ts +61 -0
- package/dist/with-shape/persisted-schemas/types.d.ts +54 -0
- package/dist/with-shape/satellites/dead-filter.d.ts +21 -0
- package/dist/with-shape/satellites/declare.d.ts +60 -0
- package/dist/with-shape/satellites/existence.d.ts +5 -0
- package/dist/with-shape/satellites/fanout.d.ts +38 -0
- package/dist/with-shape/satellites/forget.d.ts +47 -0
- package/dist/with-shape/satellites/index.d.ts +3 -0
- package/dist/with-shape/satellites/joined.d.ts +19 -0
- package/dist/with-shape/satellites/marker.d.ts +10 -0
- package/dist/with-shape/satellites/migrate-cek.d.ts +26 -0
- package/dist/with-shape/satellites/post-register.d.ts +6 -0
- package/dist/with-shape/satellites/proxy.d.ts +37 -0
- package/dist/with-shape/satellites/raw-target.d.ts +14 -0
- package/dist/with-shape/satellites/registry.d.ts +19 -0
- package/dist/with-shape/satellites/types.d.ts +37 -0
- package/dist/with-shape/satellites/validate.d.ts +17 -0
- package/dist/with-shape/schema-update/client-registry.d.ts +35 -0
- package/dist/with-shape/schema-update/cutover.d.ts +5 -0
- package/dist/with-shape/schema-update/delta.d.ts +2 -0
- package/dist/with-shape/schema-update/dispatch.d.ts +3 -0
- package/dist/with-shape/schema-update/fence-controller.d.ts +62 -0
- package/dist/with-shape/schema-update/fence-watcher.d.ts +37 -0
- package/dist/with-shape/schema-update/fence.d.ts +15 -0
- package/dist/with-shape/schema-update/gate.d.ts +16 -0
- package/dist/with-shape/schema-update/index.d.ts +6 -0
- package/dist/with-shape/schema-update/store-coordination-provider.d.ts +29 -0
- package/dist/with-shape/schema-update/strategies.d.ts +12 -0
- package/dist/with-shape/schema-update/types.d.ts +53 -0
- package/dist/with-store/index.d.ts +15 -0
- package/dist/with-store/lazy/active.d.ts +12 -0
- package/dist/with-store/lazy/index.d.ts +14 -0
- package/dist/with-store/lazy/strategy.d.ts +9 -0
- package/dist/with-store/route-store.d.ts +259 -0
- package/dist/with-store/store-middleware.d.ts +189 -0
- package/dist/withdraw-accessible-WZIEVWSR.js +28 -0
- package/package.json +47 -55
- package/dist/adapter/index.d.ts +0 -5
- package/dist/adapter/index.js +0 -15
- package/dist/aggregate/index.d.ts +0 -42
- package/dist/api-JDWL67WL.js +0 -20
- package/dist/as/index.d.ts +0 -7
- package/dist/at/index.d.ts +0 -5
- package/dist/attestation/index.d.ts +0 -20
- package/dist/backup-WRGNTGJF.js +0 -225
- package/dist/backup-WRGNTGJF.js.map +0 -1
- package/dist/blobs/index.d.ts +0 -44
- package/dist/bundle/index.d.ts +0 -122
- package/dist/bundle-DzWtVw7w.d.ts +0 -548
- package/dist/by/index.d.ts +0 -1
- package/dist/cargo/index.d.ts +0 -9
- package/dist/chunk-25G7PUTA.js +0 -235
- package/dist/chunk-26FSVNBL.js +0 -34
- package/dist/chunk-2PJB6H3H.js +0 -167
- package/dist/chunk-2PJB6H3H.js.map +0 -1
- package/dist/chunk-37JZR7CY.js +0 -91
- package/dist/chunk-3KBK5LU4.js +0 -117
- package/dist/chunk-3YKBGS3I.js +0 -686
- package/dist/chunk-3YKBGS3I.js.map +0 -1
- package/dist/chunk-44DV37ZV.js +0 -75
- package/dist/chunk-44DV37ZV.js.map +0 -1
- package/dist/chunk-47C4CI7R.js +0 -108
- package/dist/chunk-47C4CI7R.js.map +0 -1
- package/dist/chunk-4VDFUBTS.js +0 -275
- package/dist/chunk-4VDFUBTS.js.map +0 -1
- package/dist/chunk-55LSDABW.js +0 -94
- package/dist/chunk-56JB2BGI.js +0 -13003
- package/dist/chunk-56JB2BGI.js.map +0 -1
- package/dist/chunk-5GQE5IDB.js +0 -513
- package/dist/chunk-5GQE5IDB.js.map +0 -1
- package/dist/chunk-5HRJQSKN.js +0 -202
- package/dist/chunk-5HZULLHE.js +0 -404
- package/dist/chunk-5JQMX2EH.js +0 -50
- package/dist/chunk-5UOPIPZC.js +0 -95
- package/dist/chunk-5YBUFCFF.js +0 -135
- package/dist/chunk-62APEMF3.js +0 -280
- package/dist/chunk-62APEMF3.js.map +0 -1
- package/dist/chunk-6P5AJ2ZS.js +0 -120
- package/dist/chunk-6P5AJ2ZS.js.map +0 -1
- package/dist/chunk-6PALJTC2.js +0 -430
- package/dist/chunk-6PALJTC2.js.map +0 -1
- package/dist/chunk-6S7T6WC4.js +0 -111
- package/dist/chunk-6S7T6WC4.js.map +0 -1
- package/dist/chunk-6Z435B6N.js +0 -1656
- package/dist/chunk-6Z435B6N.js.map +0 -1
- package/dist/chunk-723XB5NX.js +0 -86
- package/dist/chunk-7CZ6YXMO.js +0 -124
- package/dist/chunk-7KTL4RHZ.js +0 -120
- package/dist/chunk-7KTL4RHZ.js.map +0 -1
- package/dist/chunk-7TAV3BFQ.js +0 -766
- package/dist/chunk-7TAV3BFQ.js.map +0 -1
- package/dist/chunk-BASCPHNM.js +0 -380
- package/dist/chunk-BASCPHNM.js.map +0 -1
- package/dist/chunk-BGIZAFY7.js +0 -1
- package/dist/chunk-BJ2XF2RC.js +0 -823
- package/dist/chunk-BM6E4MUT.js +0 -881
- package/dist/chunk-BM6E4MUT.js.map +0 -1
- package/dist/chunk-BTFTHF6Q.js +0 -42
- package/dist/chunk-C4NOLA5X.js +0 -132
- package/dist/chunk-C4NOLA5X.js.map +0 -1
- package/dist/chunk-CHK5VVMI.js +0 -155
- package/dist/chunk-DCVVCJVB.js +0 -45
- package/dist/chunk-EU7HDMT3.js +0 -54
- package/dist/chunk-F3EKFGUS.js +0 -99
- package/dist/chunk-FCOZ7DEC.js +0 -355
- package/dist/chunk-FCOZ7DEC.js.map +0 -1
- package/dist/chunk-FWART3VA.js +0 -205
- package/dist/chunk-FZK3JJJK.js +0 -150
- package/dist/chunk-GDOOG5YQ.js +0 -382
- package/dist/chunk-GLVXQU3E.js +0 -155
- package/dist/chunk-HU55NPHZ.js +0 -80
- package/dist/chunk-I6JJ6VJS.js +0 -97
- package/dist/chunk-I6URUNTD.js +0 -59
- package/dist/chunk-IARAK3PK.js +0 -14
- package/dist/chunk-II6DLDZM.js +0 -30
- package/dist/chunk-J5YUA6JB.js +0 -23
- package/dist/chunk-J7OH6R4K.js +0 -49
- package/dist/chunk-K2WCO3NX.js +0 -1
- package/dist/chunk-L6Q5NA22.js +0 -40
- package/dist/chunk-LFGJG4XZ.js +0 -30
- package/dist/chunk-M3OYTM5Z.js +0 -85
- package/dist/chunk-MOQ5M46U.js +0 -209
- package/dist/chunk-NTPWQH4S.js +0 -589
- package/dist/chunk-OJ64XMPJ.js +0 -1434
- package/dist/chunk-OJ64XMPJ.js.map +0 -1
- package/dist/chunk-OWGAXPRE.js +0 -129
- package/dist/chunk-P2PEPSPK.js +0 -230
- package/dist/chunk-P6TZ3IVN.js +0 -453
- package/dist/chunk-P6TZ3IVN.js.map +0 -1
- package/dist/chunk-PAJCRV7O.js +0 -123
- package/dist/chunk-PMMV5SQC.js +0 -416
- package/dist/chunk-PMMV5SQC.js.map +0 -1
- package/dist/chunk-PPPZIBKY.js +0 -261
- package/dist/chunk-PPPZIBKY.js.map +0 -1
- package/dist/chunk-PVC2FBCQ.js +0 -45
- package/dist/chunk-PYIUDUGS.js +0 -36
- package/dist/chunk-QABECTNN.js +0 -255
- package/dist/chunk-QYMMMKOO.js +0 -164
- package/dist/chunk-R4IVPJHN.js +0 -130
- package/dist/chunk-REWTMYSF.js +0 -32
- package/dist/chunk-REWTMYSF.js.map +0 -1
- package/dist/chunk-RNYDHIQL.js +0 -367
- package/dist/chunk-RUIMKQTA.js +0 -23
- package/dist/chunk-RUIMKQTA.js.map +0 -1
- package/dist/chunk-TCGVRKOS.js +0 -367
- package/dist/chunk-TIAYXOEI.js +0 -99
- package/dist/chunk-TQ3REHVF.js +0 -95
- package/dist/chunk-TQ3REHVF.js.map +0 -1
- package/dist/chunk-TUL5YQWF.js +0 -777
- package/dist/chunk-U7LV2DUN.js +0 -74
- package/dist/chunk-UB3XHGFG.js +0 -181
- package/dist/chunk-UB3XHGFG.js.map +0 -1
- package/dist/chunk-UMH35AQV.js +0 -70
- package/dist/chunk-UWZ7O4NR.js +0 -29
- package/dist/chunk-V76PHWLE.js +0 -41
- package/dist/chunk-VFQOE76I.js +0 -69
- package/dist/chunk-VIWOGJ2O.js +0 -71
- package/dist/chunk-VK6OC22R.js +0 -37
- package/dist/chunk-VK6OC22R.js.map +0 -1
- package/dist/chunk-VVLOWY74.js +0 -150
- package/dist/chunk-VVLOWY74.js.map +0 -1
- package/dist/chunk-W3JABOVB.js +0 -53
- package/dist/chunk-W3JABOVB.js.map +0 -1
- package/dist/chunk-WPNP3NF5.js +0 -1221
- package/dist/chunk-WPNP3NF5.js.map +0 -1
- package/dist/chunk-X5QZAJDB.js +0 -59
- package/dist/chunk-X6VNIRHS.js +0 -239
- package/dist/chunk-X6VNIRHS.js.map +0 -1
- package/dist/chunk-XBPUVQDO.js +0 -664
- package/dist/chunk-XBPUVQDO.js.map +0 -1
- package/dist/chunk-XW5LZYV4.js +0 -21
- package/dist/chunk-YTCCC6NG.js +0 -320
- package/dist/chunk-YTCCC6NG.js.map +0 -1
- package/dist/classified/index.d.ts +0 -17
- package/dist/collection-facade-EJVIN2BY.js +0 -39
- package/dist/computed-6FOFXQPE.js +0 -11
- package/dist/config-drift-RFEVGBKR.js +0 -24
- package/dist/config-drift-RFEVGBKR.js.map +0 -1
- package/dist/consent/index.d.ts +0 -23
- package/dist/crdt/index.d.ts +0 -34
- package/dist/dead-filter-RHMNYOXP.js +0 -28
- package/dist/decrypt-partition-IHtxEnTi.d.ts +0 -21
- package/dist/delegation-IHXOASHV.js +0 -25
- package/dist/derivations/index.d.ts +0 -70
- package/dist/derive-CD3ZVIXK.js +0 -21
- package/dist/describe/index.d.ts +0 -1
- package/dist/describe/index.js +0 -1
- package/dist/describe-C6iHNlqJ.d.ts +0 -162
- package/dist/dev-unlock-wgQ7Ci5I.d.ts +0 -263
- package/dist/discriminant-BN9REW3o.d.ts +0 -60
- package/dist/enclave-KGEUW2GL.js +0 -123
- package/dist/executor-EUPYHCLU.js +0 -9
- package/dist/executor-KZ4B3PRT.js +0 -9
- package/dist/executor-MHUM2VZK.js +0 -21
- package/dist/export-accessible-Z3NSZZHN.js +0 -23
- package/dist/extract-partition-VSKT35JG.js +0 -36
- package/dist/fanout-sidecar-NBDKKCHT.js +0 -74
- package/dist/find-OH4BEULF.js +0 -11
- package/dist/forget/index.d.ts +0 -36
- package/dist/guards/index.d.ts +0 -35
- package/dist/hash-CwHnoKyW.d.ts +0 -72
- package/dist/history/index.d.ts +0 -61
- package/dist/i18n/index.d.ts +0 -37
- package/dist/in/index.d.ts +0 -5
- package/dist/index-B9QdHytu.d.ts +0 -123
- package/dist/index-CTvUp94-.d.ts +0 -123
- package/dist/index-Dn5GzPg_.d.ts +0 -22138
- package/dist/indexing/index.d.ts +0 -39
- package/dist/issue-AEOL6RXA.js +0 -19
- package/dist/kernel/index.d.ts +0 -32
- package/dist/kernel/index.js +0 -59
- package/dist/lazy/index.d.ts +0 -21
- package/dist/ledger-3LR3YO2W.js +0 -42
- package/dist/liberate-XSEPRWEA.js +0 -24
- package/dist/link-set-NSUIX6BR.js +0 -31
- package/dist/materialized-views/index.d.ts +0 -173
- package/dist/mime-magic-CYbFNQ4h.d.ts +0 -103
- package/dist/noydb-POVTIVQ6.js +0 -62
- package/dist/on/index.d.ts +0 -5
- package/dist/overlay-views/index.d.ts +0 -98
- package/dist/periods/index.d.ts +0 -20
- package/dist/pod/index.d.ts +0 -63
- package/dist/policy-Y7HL2KGA.js +0 -41
- package/dist/portability/index.d.ts +0 -20
- package/dist/post-register-KOFRTCDD.js +0 -55
- package/dist/post-register-KOFRTCDD.js.map +0 -1
- package/dist/public-envelope-NC7SPNMV.js +0 -32
- package/dist/query/index.d.ts +0 -5
- package/dist/read-only-facade-5ADRJVTM.js +0 -8
- package/dist/register-3D6R2MKN.js +0 -23
- package/dist/registry-AI4E46PD.js +0 -19
- package/dist/registry-HSNQ4NBP.js +0 -9
- package/dist/registry-WIX6QCV5.js +0 -17
- package/dist/request-withdrawal-GU4XS2R5.js +0 -31
- package/dist/reveal-5Y777N5Q.js +0 -38
- package/dist/reveal-5Y777N5Q.js.map +0 -1
- package/dist/revoke-ZFETCLYV.js +0 -24
- package/dist/revoke-ZFETCLYV.js.map +0 -1
- package/dist/satellites/index.d.ts +0 -5
- package/dist/sealed-record/index.d.ts +0 -69
- package/dist/session/index.d.ts +0 -44
- package/dist/shadow/index.d.ts +0 -15
- package/dist/signer-GAIMQQ2J.js +0 -25
- package/dist/signer-GAIMQQ2J.js.map +0 -1
- package/dist/snapshots/index.d.ts +0 -26
- package/dist/stale-77LP2EEF.js +0 -14
- package/dist/stale-77LP2EEF.js.map +0 -1
- package/dist/storage-KEXIXLGM.js +0 -23
- package/dist/storage-KEXIXLGM.js.map +0 -1
- package/dist/store-coordination-provider-NJDDZ264.js +0 -142
- package/dist/subject-index-O75wKshW.d.ts +0 -362
- package/dist/sync/index.d.ts +0 -41
- package/dist/team/index.d.ts +0 -155
- package/dist/tiers/index.d.ts +0 -5
- package/dist/to/index.d.ts +0 -5
- package/dist/transition-guard-D5RLJv8S.d.ts +0 -165
- package/dist/tx/index.d.ts +0 -35
- package/dist/ui/index.d.ts +0 -1
- package/dist/ulid-DRH25k3y.d.ts +0 -66
- package/dist/util/index.d.ts +0 -79
- package/dist/validators-C3lrVF-c.d.ts +0 -101
- package/dist/vault-diff-_LSIcOMv.d.ts +0 -147
- package/dist/verify-CAYGXYNO.js +0 -139
- package/dist/verify-CAYGXYNO.js.map +0 -1
- package/dist/walk-SMAE4IEI.js +0 -241
- package/dist/with/index.d.ts +0 -38
- package/dist/with-materialized-view-Xv1-9Bh0.d.ts +0 -27
- package/dist/with-overlayed-view-CuWhq_-C.d.ts +0 -12
- package/dist/with-rollup-K_iwal4b.d.ts +0 -47
- package/dist/withdraw-accessible-Q7BULAN5.js +0 -28
- package/dist/withdraw-accessible-Q7BULAN5.js.map +0 -1
- /package/dist/{adapter/index.js.map → api-ZGS6LCOF.js.map} +0 -0
- /package/dist/{chunk-VIWOGJ2O.js.map → chunk-3B5VVCNY.js.map} +0 -0
- /package/dist/{chunk-P2PEPSPK.js.map → chunk-3LQ2YKO4.js.map} +0 -0
- /package/dist/{chunk-EU7HDMT3.js.map → chunk-3QCRBHCY.js.map} +0 -0
- /package/dist/{chunk-FZK3JJJK.js.map → chunk-4JBYV75E.js.map} +0 -0
- /package/dist/{chunk-I6JJ6VJS.js.map → chunk-4NXKCLLQ.js.map} +0 -0
- /package/dist/{chunk-VFQOE76I.js.map → chunk-5M5DVGV7.js.map} +0 -0
- /package/dist/{chunk-LFGJG4XZ.js.map → chunk-5YOLBEQ6.js.map} +0 -0
- /package/dist/{chunk-OWGAXPRE.js.map → chunk-6CRIV7DE.js.map} +0 -0
- /package/dist/{chunk-QABECTNN.js.map → chunk-6QTNZJBS.js.map} +0 -0
- /package/dist/{chunk-723XB5NX.js.map → chunk-6T2SCQRU.js.map} +0 -0
- /package/dist/{chunk-PVC2FBCQ.js.map → chunk-7DSTRQIJ.js.map} +0 -0
- /package/dist/{chunk-NTPWQH4S.js.map → chunk-AUSTCW2X.js.map} +0 -0
- /package/dist/{chunk-MOQ5M46U.js.map → chunk-B3HJYUOF.js.map} +0 -0
- /package/dist/{chunk-QYMMMKOO.js.map → chunk-BDVFPG6Y.js.map} +0 -0
- /package/dist/{chunk-PYIUDUGS.js.map → chunk-CAF6WOK7.js.map} +0 -0
- /package/dist/{chunk-5HZULLHE.js.map → chunk-CIE2BASH.js.map} +0 -0
- /package/dist/{chunk-BTFTHF6Q.js.map → chunk-CRI4OUV4.js.map} +0 -0
- /package/dist/{chunk-37JZR7CY.js.map → chunk-DLG74CNB.js.map} +0 -0
- /package/dist/{chunk-TCGVRKOS.js.map → chunk-ERJ7FU55.js.map} +0 -0
- /package/dist/{chunk-FWART3VA.js.map → chunk-EVVGJDRQ.js.map} +0 -0
- /package/dist/{chunk-X5QZAJDB.js.map → chunk-EXK7QRWF.js.map} +0 -0
- /package/dist/{chunk-5HRJQSKN.js.map → chunk-EYZ6IQ6X.js.map} +0 -0
- /package/dist/{chunk-DCVVCJVB.js.map → chunk-F64IRYG3.js.map} +0 -0
- /package/dist/{chunk-BJ2XF2RC.js.map → chunk-FHS2HQSH.js.map} +0 -0
- /package/dist/{chunk-HU55NPHZ.js.map → chunk-GKEWXIV5.js.map} +0 -0
- /package/dist/{chunk-I6URUNTD.js.map → chunk-GTGPO5KW.js.map} +0 -0
- /package/dist/{chunk-5UOPIPZC.js.map → chunk-HB3RFQSC.js.map} +0 -0
- /package/dist/{chunk-F3EKFGUS.js.map → chunk-I6GALP6E.js.map} +0 -0
- /package/dist/{chunk-R4IVPJHN.js.map → chunk-IL6POWCW.js.map} +0 -0
- /package/dist/{chunk-3KBK5LU4.js.map → chunk-IU6SNYX6.js.map} +0 -0
- /package/dist/{chunk-TUL5YQWF.js.map → chunk-J2ZX2XUV.js.map} +0 -0
- /package/dist/{chunk-UWZ7O4NR.js.map → chunk-JKJOGPZN.js.map} +0 -0
- /package/dist/{chunk-V76PHWLE.js.map → chunk-JZUV47FZ.js.map} +0 -0
- /package/dist/{chunk-II6DLDZM.js.map → chunk-K5IMOGHB.js.map} +0 -0
- /package/dist/{chunk-GDOOG5YQ.js.map → chunk-LASZKVMO.js.map} +0 -0
- /package/dist/{chunk-5YBUFCFF.js.map → chunk-NR5LT5RY.js.map} +0 -0
- /package/dist/{chunk-UMH35AQV.js.map → chunk-Q5VNKNE5.js.map} +0 -0
- /package/dist/{chunk-XW5LZYV4.js.map → chunk-QLWMEXCT.js.map} +0 -0
- /package/dist/{chunk-PAJCRV7O.js.map → chunk-QRB7NAOJ.js.map} +0 -0
- /package/dist/{chunk-U7LV2DUN.js.map → chunk-R4ROFEYC.js.map} +0 -0
- /package/dist/{chunk-RNYDHIQL.js.map → chunk-RIX4V2TB.js.map} +0 -0
- /package/dist/{chunk-L6Q5NA22.js.map → chunk-RYCTDFUX.js.map} +0 -0
- /package/dist/{chunk-CHK5VVMI.js.map → chunk-RZ5SVOYR.js.map} +0 -0
- /package/dist/{chunk-TIAYXOEI.js.map → chunk-SLFHQTTW.js.map} +0 -0
- /package/dist/{chunk-J5YUA6JB.js.map → chunk-UNFPPVNI.js.map} +0 -0
- /package/dist/{chunk-25G7PUTA.js.map → chunk-VLFCJYTL.js.map} +0 -0
- /package/dist/{chunk-7CZ6YXMO.js.map → chunk-VN3DBQAU.js.map} +0 -0
- /package/dist/{chunk-J7OH6R4K.js.map → chunk-VZRODIM3.js.map} +0 -0
- /package/dist/{chunk-55LSDABW.js.map → chunk-W22IKJE2.js.map} +0 -0
- /package/dist/{chunk-GLVXQU3E.js.map → chunk-X3YYQWOQ.js.map} +0 -0
- /package/dist/{chunk-M3OYTM5Z.js.map → chunk-YFXZEAYK.js.map} +0 -0
- /package/dist/{chunk-5JQMX2EH.js.map → chunk-ZAJAVEXY.js.map} +0 -0
- /package/dist/{chunk-26FSVNBL.js.map → chunk-ZICD77GM.js.map} +0 -0
- /package/dist/{chunk-IARAK3PK.js.map → chunk-ZUODRVHY.js.map} +0 -0
- /package/dist/{api-JDWL67WL.js.map → collection-facade-TLWIPI76.js.map} +0 -0
- /package/dist/{chunk-BGIZAFY7.js.map → computed-ZIQTYTDI.js.map} +0 -0
- /package/dist/{dead-filter-RHMNYOXP.js.map → dead-filter-ESOBZZP5.js.map} +0 -0
- /package/dist/{chunk-K2WCO3NX.js.map → delegation-W7ZV2322.js.map} +0 -0
- /package/dist/{collection-facade-EJVIN2BY.js.map → derive-H2BJTLUI.js.map} +0 -0
- /package/dist/{computed-6FOFXQPE.js.map → enclave-AP3I5W7O.js.map} +0 -0
- /package/dist/{delegation-IHXOASHV.js.map → executor-KGWTNEQD.js.map} +0 -0
- /package/dist/{derive-CD3ZVIXK.js.map → executor-OVEXR6RT.js.map} +0 -0
- /package/dist/{describe/index.js.map → executor-UNEH5ZYH.js.map} +0 -0
- /package/dist/{enclave-KGEUW2GL.js.map → export-accessible-PCMXSUZS.js.map} +0 -0
- /package/dist/{executor-EUPYHCLU.js.map → extract-partition-SWHFSYJO.js.map} +0 -0
- /package/dist/{fanout-sidecar-NBDKKCHT.js.map → fanout-sidecar-A765THMX.js.map} +0 -0
- /package/dist/{executor-KZ4B3PRT.js.map → find-N6345CNT.js.map} +0 -0
- /package/dist/{executor-MHUM2VZK.js.map → issue-5OKB6I2R.js.map} +0 -0
- /package/dist/{export-accessible-Z3NSZZHN.js.map → ledger-GFBKVPV4.js.map} +0 -0
- /package/dist/{extract-partition-VSKT35JG.js.map → liberate-3VDOT4KO.js.map} +0 -0
- /package/dist/{find-OH4BEULF.js.map → link-set-Z7Q2ASFX.js.map} +0 -0
- /package/dist/{issue-AEOL6RXA.js.map → noydb-ZCJOYBDI.js.map} +0 -0
- /package/dist/{kernel/index.js.map → policy-Z3RUAIY2.js.map} +0 -0
- /package/dist/{ledger-3LR3YO2W.js.map → public-envelope-B4KNWVUA.js.map} +0 -0
- /package/dist/{liberate-XSEPRWEA.js.map → read-only-facade-CHCKSEPD.js.map} +0 -0
- /package/dist/{link-set-NSUIX6BR.js.map → register-VAHONCID.js.map} +0 -0
- /package/dist/{noydb-POVTIVQ6.js.map → registry-7MLVD3VO.js.map} +0 -0
- /package/dist/{policy-Y7HL2KGA.js.map → registry-EPKPD5SM.js.map} +0 -0
- /package/dist/{public-envelope-NC7SPNMV.js.map → registry-P5T7PS2U.js.map} +0 -0
- /package/dist/{read-only-facade-5ADRJVTM.js.map → request-withdrawal-TI3A5WPS.js.map} +0 -0
- /package/dist/{register-3D6R2MKN.js.map → revoke-FDRD6GRW.js.map} +0 -0
- /package/dist/{registry-AI4E46PD.js.map → signer-MUWEIUI6.js.map} +0 -0
- /package/dist/{registry-HSNQ4NBP.js.map → stale-OSQ7J3AA.js.map} +0 -0
- /package/dist/{registry-WIX6QCV5.js.map → storage-MVFCGEQE.js.map} +0 -0
- /package/dist/{store-coordination-provider-NJDDZ264.js.map → store-coordination-provider-64OEZFGS.js.map} +0 -0
- /package/dist/{walk-SMAE4IEI.js.map → walk-SVNDIZ62.js.map} +0 -0
- /package/dist/{request-withdrawal-GU4XS2R5.js.map → withdraw-accessible-WZIEVWSR.js.map} +0 -0
|
@@ -0,0 +1,739 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fuseRetrieval
|
|
3
|
+
} from "./chunk-AURFOK3D.js";
|
|
4
|
+
import {
|
|
5
|
+
getAtPath,
|
|
6
|
+
isStaticDictDescriptor,
|
|
7
|
+
stripI18nFilled
|
|
8
|
+
} from "./chunk-6JTIAGHD.js";
|
|
9
|
+
import {
|
|
10
|
+
liveRecordIsElevated
|
|
11
|
+
} from "./chunk-PN2XMATY.js";
|
|
12
|
+
import {
|
|
13
|
+
EmbeddingDimMismatchError,
|
|
14
|
+
EmbeddingModelMismatchError,
|
|
15
|
+
SearchNotEnabledError
|
|
16
|
+
} from "./chunk-BIOUI4HL.js";
|
|
17
|
+
|
|
18
|
+
// src/with-lookup/embeddings/cosine.ts
|
|
19
|
+
function cosine(a, b) {
|
|
20
|
+
if (a.length !== b.length) return 0;
|
|
21
|
+
let dot = 0, na = 0, nb = 0;
|
|
22
|
+
for (let i = 0; i < a.length; i++) {
|
|
23
|
+
const x = a[i], y = b[i];
|
|
24
|
+
dot += x * y;
|
|
25
|
+
na += x * x;
|
|
26
|
+
nb += y * y;
|
|
27
|
+
}
|
|
28
|
+
if (na === 0 || nb === 0) return 0;
|
|
29
|
+
return dot / (Math.sqrt(na) * Math.sqrt(nb));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// src/with-lookup/embeddings/descriptor.ts
|
|
33
|
+
function embeddingSourceText(record, source) {
|
|
34
|
+
const fields = typeof source === "string" ? [source] : source;
|
|
35
|
+
const parts = [];
|
|
36
|
+
for (const f of fields) {
|
|
37
|
+
for (const leaf of getAtPath(record, f)) {
|
|
38
|
+
if (typeof leaf === "string" && leaf !== "") parts.push(leaf);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return parts.join(" ");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// src/with-lookup/embeddings/vector-set.ts
|
|
45
|
+
var VectorSet = class {
|
|
46
|
+
vectors;
|
|
47
|
+
get loaded() {
|
|
48
|
+
return this.vectors !== void 0;
|
|
49
|
+
}
|
|
50
|
+
async ensureLoaded(load) {
|
|
51
|
+
if (this.vectors === void 0) this.vectors = await load();
|
|
52
|
+
}
|
|
53
|
+
markDirty() {
|
|
54
|
+
this.vectors = void 0;
|
|
55
|
+
}
|
|
56
|
+
cosineTopK(query, k, opts = {}) {
|
|
57
|
+
const all = this.vectors ?? [];
|
|
58
|
+
const minScore = opts.minScore ?? -Infinity;
|
|
59
|
+
const hits = [];
|
|
60
|
+
for (const v of all) {
|
|
61
|
+
if (opts.expectModel !== void 0 && v.model !== opts.expectModel) {
|
|
62
|
+
throw new EmbeddingModelMismatchError(opts.expectModel, v.model);
|
|
63
|
+
}
|
|
64
|
+
const score = cosine(query, v.vec);
|
|
65
|
+
if (score >= minScore) hits.push({ id: v.id, score });
|
|
66
|
+
}
|
|
67
|
+
hits.sort((a, b) => b.score - a.score);
|
|
68
|
+
return hits.slice(0, k);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// src/with-lookup/embeddings/vec-id.ts
|
|
73
|
+
function encodeVecId(collection, recordId) {
|
|
74
|
+
if (collection.includes("/")) {
|
|
75
|
+
throw new Error(
|
|
76
|
+
`encodeVecId: collection name "${collection}" must not contain "/" \u2014 it would make the "${collection}/${recordId}" _vec id ambiguous against another collection's rows.`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return `${collection}/${recordId}`;
|
|
80
|
+
}
|
|
81
|
+
function decodeVecId(collection, vecId) {
|
|
82
|
+
const prefix = `${collection}/`;
|
|
83
|
+
if (!vecId.startsWith(prefix)) return null;
|
|
84
|
+
return vecId.slice(prefix.length);
|
|
85
|
+
}
|
|
86
|
+
function isVecIdFor(collection, vecId) {
|
|
87
|
+
return vecId.startsWith(`${collection}/`);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// src/with-lookup/search/tokenize.ts
|
|
91
|
+
var WORD = /[\p{L}\p{N}]+/gu;
|
|
92
|
+
var tokenize = (text) => {
|
|
93
|
+
if (!text) return [];
|
|
94
|
+
return text.normalize("NFKC").toLowerCase().match(WORD) ?? [];
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// src/with-lookup/search/scan.ts
|
|
98
|
+
var K1 = 1.2;
|
|
99
|
+
var B = 0.75;
|
|
100
|
+
function fieldText(record, field) {
|
|
101
|
+
const v = record[field];
|
|
102
|
+
if (typeof v === "string") return v;
|
|
103
|
+
if (v === null || v === void 0) return "";
|
|
104
|
+
if (typeof v === "number" || typeof v === "boolean") return String(v);
|
|
105
|
+
return "";
|
|
106
|
+
}
|
|
107
|
+
function searchScan(entries, field, query, opts = {}, tokenizer = tokenize) {
|
|
108
|
+
const queryTerms = tokenizer(query);
|
|
109
|
+
if (queryTerms.length === 0) return [];
|
|
110
|
+
const match = opts.match ?? "any";
|
|
111
|
+
const usePrefix = opts.prefix ?? false;
|
|
112
|
+
const exactTerms = usePrefix ? queryTerms.slice(0, -1) : queryTerms;
|
|
113
|
+
const prefixTerm = usePrefix ? queryTerms[queryTerms.length - 1] : void 0;
|
|
114
|
+
const docs = entries.map((e) => ({ id: e.id, record: e.record, terms: tokenizer(fieldText(e.record, field)) }));
|
|
115
|
+
const N = docs.length || 1;
|
|
116
|
+
const df = /* @__PURE__ */ new Map();
|
|
117
|
+
let totalLen = 0;
|
|
118
|
+
for (const d of docs) {
|
|
119
|
+
totalLen += d.terms.length;
|
|
120
|
+
for (const t of new Set(d.terms)) df.set(t, (df.get(t) ?? 0) + 1);
|
|
121
|
+
}
|
|
122
|
+
const avgdl = totalLen / N || 1;
|
|
123
|
+
let prefixDf = 0;
|
|
124
|
+
if (prefixTerm !== void 0) {
|
|
125
|
+
for (const d of docs) {
|
|
126
|
+
if (d.terms.some((t) => t.startsWith(prefixTerm))) prefixDf++;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const requiredCount = exactTerms.length + (prefixTerm !== void 0 ? 1 : 0);
|
|
130
|
+
const results = [];
|
|
131
|
+
for (const d of docs) {
|
|
132
|
+
const tf = /* @__PURE__ */ new Map();
|
|
133
|
+
for (const t of d.terms) tf.set(t, (tf.get(t) ?? 0) + 1);
|
|
134
|
+
const matched = [];
|
|
135
|
+
for (const qt of exactTerms) {
|
|
136
|
+
const c = tf.get(qt) ?? 0;
|
|
137
|
+
if (c > 0) matched.push({ tf: c, df: df.get(qt) ?? 0 });
|
|
138
|
+
}
|
|
139
|
+
if (prefixTerm !== void 0) {
|
|
140
|
+
let ptf = 0;
|
|
141
|
+
for (const [t, c] of tf) if (t.startsWith(prefixTerm)) ptf += c;
|
|
142
|
+
if (ptf > 0) matched.push({ tf: ptf, df: prefixDf });
|
|
143
|
+
}
|
|
144
|
+
if (matched.length === 0) continue;
|
|
145
|
+
if (match === "all" && matched.length < requiredCount) continue;
|
|
146
|
+
let score = 0;
|
|
147
|
+
for (const m of matched) {
|
|
148
|
+
const idf = Math.log(1 + (N - m.df + 0.5) / (m.df + 0.5));
|
|
149
|
+
const denom = m.tf + K1 * (1 - B + B * (d.terms.length / avgdl));
|
|
150
|
+
score += idf * (m.tf * (K1 + 1) / (denom || 1));
|
|
151
|
+
}
|
|
152
|
+
results.push({ id: d.id, score, record: d.record });
|
|
153
|
+
}
|
|
154
|
+
results.sort((a, b) => b.score - a.score);
|
|
155
|
+
return opts.limit !== void 0 ? results.slice(0, opts.limit) : results;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// src/with-lookup/search/segment.ts
|
|
159
|
+
var SEGMENTER = new Intl.Segmenter(void 0, { granularity: "word" });
|
|
160
|
+
var segmentTokens = (text) => {
|
|
161
|
+
const out = [];
|
|
162
|
+
if (!text) return out;
|
|
163
|
+
for (const s of SEGMENTER.segment(text)) {
|
|
164
|
+
if (s.isWordLike) out.push({ term: s.segment.normalize("NFKC").toLowerCase(), offset: s.index });
|
|
165
|
+
}
|
|
166
|
+
return out;
|
|
167
|
+
};
|
|
168
|
+
var segmentTokenizer = (text) => segmentTokens(text).map((t) => t.term);
|
|
169
|
+
|
|
170
|
+
// src/with-lookup/search/inverted-index.ts
|
|
171
|
+
var K12 = 1.2;
|
|
172
|
+
var B2 = 0.75;
|
|
173
|
+
var InvertedIndex = class _InvertedIndex {
|
|
174
|
+
// per field: df (term -> #docs), N (#docs), totalLen
|
|
175
|
+
fieldStats = /* @__PURE__ */ new Map();
|
|
176
|
+
docs = [];
|
|
177
|
+
static build(docs) {
|
|
178
|
+
const idx = new _InvertedIndex();
|
|
179
|
+
for (const d of docs) {
|
|
180
|
+
for (const f of d.fields) {
|
|
181
|
+
const tokens = segmentTokens(f.text);
|
|
182
|
+
const tf = /* @__PURE__ */ new Map();
|
|
183
|
+
const firstOffset = /* @__PURE__ */ new Map();
|
|
184
|
+
for (const t of tokens) {
|
|
185
|
+
tf.set(t.term, (tf.get(t.term) ?? 0) + 1);
|
|
186
|
+
if (!firstOffset.has(t.term)) firstOffset.set(t.term, t.offset);
|
|
187
|
+
}
|
|
188
|
+
const doc = { id: d.id, field: f.field, ...f.locale !== void 0 ? { locale: f.locale } : {}, text: f.text, len: tokens.length, tf, firstOffset };
|
|
189
|
+
idx.docs.push(doc);
|
|
190
|
+
let s = idx.fieldStats.get(f.field);
|
|
191
|
+
if (!s) {
|
|
192
|
+
s = { df: /* @__PURE__ */ new Map(), n: 0, totalLen: 0 };
|
|
193
|
+
idx.fieldStats.set(f.field, s);
|
|
194
|
+
}
|
|
195
|
+
s.n += 1;
|
|
196
|
+
s.totalLen += doc.len;
|
|
197
|
+
for (const term of tf.keys()) s.df.set(term, (s.df.get(term) ?? 0) + 1);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return idx;
|
|
201
|
+
}
|
|
202
|
+
query(query, opts = {}) {
|
|
203
|
+
const terms = segmentTokenizer(query);
|
|
204
|
+
if (terms.length === 0) return [];
|
|
205
|
+
const usePrefix = opts.prefix ?? false;
|
|
206
|
+
const exact = usePrefix ? terms.slice(0, -1) : terms;
|
|
207
|
+
const prefix = usePrefix ? terms[terms.length - 1] : void 0;
|
|
208
|
+
const match = opts.match ?? "any";
|
|
209
|
+
const required = exact.length + (prefix !== void 0 ? 1 : 0);
|
|
210
|
+
const best = /* @__PURE__ */ new Map();
|
|
211
|
+
for (const doc of this.docs) {
|
|
212
|
+
if (opts.fields !== void 0 && !opts.fields.includes(doc.field)) continue;
|
|
213
|
+
const stats = this.fieldStats.get(doc.field);
|
|
214
|
+
const avgdl = stats.totalLen / stats.n || 1;
|
|
215
|
+
let score = 0;
|
|
216
|
+
let matchedCount = 0;
|
|
217
|
+
let snippetOffset = -1;
|
|
218
|
+
const scoreTerm = (tf, df, offset) => {
|
|
219
|
+
if (tf <= 0) return;
|
|
220
|
+
matchedCount += 1;
|
|
221
|
+
if (snippetOffset < 0 && offset >= 0) snippetOffset = offset;
|
|
222
|
+
const idf = Math.log(1 + (stats.n - df + 0.5) / (df + 0.5));
|
|
223
|
+
const denom = tf + K12 * (1 - B2 + B2 * (doc.len / avgdl));
|
|
224
|
+
score += idf * (tf * (K12 + 1) / (denom || 1));
|
|
225
|
+
};
|
|
226
|
+
for (const qt of exact) scoreTerm(doc.tf.get(qt) ?? 0, stats.df.get(qt) ?? 0, doc.firstOffset.get(qt) ?? -1);
|
|
227
|
+
if (prefix !== void 0) {
|
|
228
|
+
const exactSet = new Set(exact);
|
|
229
|
+
let ptf = 0;
|
|
230
|
+
let poff = -1;
|
|
231
|
+
for (const [term, c] of doc.tf) {
|
|
232
|
+
if (term.startsWith(prefix) && !exactSet.has(term)) {
|
|
233
|
+
ptf += c;
|
|
234
|
+
if (poff < 0) poff = doc.firstOffset.get(term) ?? -1;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
if (ptf > 0) {
|
|
238
|
+
let pdf = 0;
|
|
239
|
+
for (const d of this.docs) {
|
|
240
|
+
if (d.field === doc.field && [...d.tf.keys()].some((t) => t.startsWith(prefix))) pdf++;
|
|
241
|
+
}
|
|
242
|
+
scoreTerm(ptf, pdf || 1, poff);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (matchedCount === 0) continue;
|
|
246
|
+
if (match === "all" && matchedCount < required) continue;
|
|
247
|
+
const hit = {
|
|
248
|
+
id: doc.id,
|
|
249
|
+
score,
|
|
250
|
+
field: doc.field,
|
|
251
|
+
text: doc.text,
|
|
252
|
+
offset: snippetOffset < 0 ? 0 : snippetOffset,
|
|
253
|
+
...doc.locale !== void 0 ? { locale: doc.locale } : {}
|
|
254
|
+
};
|
|
255
|
+
const prev = best.get(doc.id);
|
|
256
|
+
if (!prev || hit.score > prev.score) best.set(doc.id, hit);
|
|
257
|
+
}
|
|
258
|
+
const results = [...best.values()].sort((a, b) => b.score - a.score);
|
|
259
|
+
return opts.limit !== void 0 ? results.slice(0, opts.limit) : results;
|
|
260
|
+
}
|
|
261
|
+
toSnapshot() {
|
|
262
|
+
return {
|
|
263
|
+
v: 1,
|
|
264
|
+
fieldStats: [...this.fieldStats].map(([f, s]) => [f, { df: [...s.df], n: s.n, totalLen: s.totalLen }]),
|
|
265
|
+
docs: this.docs.map((d) => ({
|
|
266
|
+
id: d.id,
|
|
267
|
+
field: d.field,
|
|
268
|
+
text: d.text,
|
|
269
|
+
len: d.len,
|
|
270
|
+
tf: [...d.tf],
|
|
271
|
+
firstOffset: [...d.firstOffset],
|
|
272
|
+
...d.locale !== void 0 ? { locale: d.locale } : {}
|
|
273
|
+
}))
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
static fromSnapshot(s) {
|
|
277
|
+
const idx = new _InvertedIndex();
|
|
278
|
+
for (const [f, st] of s.fieldStats) idx.fieldStats.set(f, { df: new Map(st.df), n: st.n, totalLen: st.totalLen });
|
|
279
|
+
for (const d of s.docs) {
|
|
280
|
+
idx.docs.push({
|
|
281
|
+
id: d.id,
|
|
282
|
+
field: d.field,
|
|
283
|
+
text: d.text,
|
|
284
|
+
len: d.len,
|
|
285
|
+
tf: new Map(d.tf),
|
|
286
|
+
firstOffset: new Map(d.firstOffset),
|
|
287
|
+
...d.locale !== void 0 ? { locale: d.locale } : {}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
return idx;
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
// src/with-lookup/search/snippet.ts
|
|
295
|
+
function extractSnippet(text, offset, window = 80) {
|
|
296
|
+
const chars = Array.from(text);
|
|
297
|
+
if (chars.length <= window) return text;
|
|
298
|
+
const cpOffset = Array.from(text.slice(0, Math.max(0, offset))).length;
|
|
299
|
+
const half = Math.floor(window / 2);
|
|
300
|
+
let start = Math.max(0, cpOffset - half);
|
|
301
|
+
const end = Math.min(chars.length, start + window);
|
|
302
|
+
start = Math.max(0, end - window);
|
|
303
|
+
const body = chars.slice(start, end).join("");
|
|
304
|
+
return `${start > 0 ? "\u2026" : ""}${body}${end < chars.length ? "\u2026" : ""}`;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// src/with-lookup/search/index-store.ts
|
|
308
|
+
var MemoryIndexStore = class {
|
|
309
|
+
index;
|
|
310
|
+
get built() {
|
|
311
|
+
return this.index !== void 0;
|
|
312
|
+
}
|
|
313
|
+
async ensureBuilt(build) {
|
|
314
|
+
if (this.index === void 0) this.index = InvertedIndex.build(build());
|
|
315
|
+
return this.index;
|
|
316
|
+
}
|
|
317
|
+
markDirty() {
|
|
318
|
+
this.index = void 0;
|
|
319
|
+
}
|
|
320
|
+
async flush() {
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
// src/with-lookup/search/build-docs.ts
|
|
325
|
+
function buildStringFieldEntries(record, textIndexes, only) {
|
|
326
|
+
const fields = only ? textIndexes.filter((f) => only.includes(f)) : textIndexes;
|
|
327
|
+
const out = [];
|
|
328
|
+
for (const field of fields) {
|
|
329
|
+
for (const leaf of getAtPath(record, field)) {
|
|
330
|
+
if (typeof leaf === "string" && leaf !== "") out.push({ field, text: leaf });
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return out;
|
|
334
|
+
}
|
|
335
|
+
function buildI18nFieldEntries(record, i18nFields, textIndexes, only) {
|
|
336
|
+
const fields = (only ? textIndexes.filter((f) => only.includes(f)) : textIndexes).filter((f) => f in i18nFields);
|
|
337
|
+
const out = [];
|
|
338
|
+
for (const field of fields) {
|
|
339
|
+
for (const leaf of getAtPath(record, field)) {
|
|
340
|
+
if (!leaf || typeof leaf !== "object" || Array.isArray(leaf)) continue;
|
|
341
|
+
for (const [locale, val] of Object.entries(leaf)) {
|
|
342
|
+
if (typeof val === "string" && val !== "") out.push({ field, locale, text: val });
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return out;
|
|
347
|
+
}
|
|
348
|
+
function buildDictKeyFieldEntries(record, dictKeyFields, labelMaps, textIndexes, only) {
|
|
349
|
+
const fields = (only ? textIndexes.filter((f) => only.includes(f)) : textIndexes).filter((f) => f in dictKeyFields);
|
|
350
|
+
const out = [];
|
|
351
|
+
for (const field of fields) {
|
|
352
|
+
const map = labelMaps.get(field);
|
|
353
|
+
if (!map) continue;
|
|
354
|
+
for (const leaf of getAtPath(record, field)) {
|
|
355
|
+
const keys = typeof leaf === "string" ? [leaf] : Array.isArray(leaf) ? leaf.filter((k) => typeof k === "string") : [];
|
|
356
|
+
for (const key of keys) {
|
|
357
|
+
const labels = map.get(key);
|
|
358
|
+
if (!labels) continue;
|
|
359
|
+
for (const [locale, label] of Object.entries(labels)) {
|
|
360
|
+
if (label !== "") out.push({ field, locale, text: label });
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return out;
|
|
366
|
+
}
|
|
367
|
+
function buildBlobFieldEntries(filenamesByField) {
|
|
368
|
+
const out = [];
|
|
369
|
+
for (const [field, names] of filenamesByField) {
|
|
370
|
+
for (const name of names) if (name !== "") out.push({ field, text: name });
|
|
371
|
+
}
|
|
372
|
+
return out;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// src/with-lookup/search/active.ts
|
|
376
|
+
function withSearch() {
|
|
377
|
+
return {
|
|
378
|
+
async search(ctx, field, query, opts) {
|
|
379
|
+
const { search: search2 } = await import("./collection-facade-TLWIPI76.js");
|
|
380
|
+
return search2(ctx, field, query, opts);
|
|
381
|
+
},
|
|
382
|
+
async retrieve(ctx, query, opts) {
|
|
383
|
+
const { retrieve: retrieve2 } = await import("./collection-facade-TLWIPI76.js");
|
|
384
|
+
return retrieve2(ctx, query, opts);
|
|
385
|
+
},
|
|
386
|
+
async similarTo(ctx, vector, opts) {
|
|
387
|
+
const { similarTo: similarTo2 } = await import("./collection-facade-TLWIPI76.js");
|
|
388
|
+
return similarTo2(ctx, vector, opts);
|
|
389
|
+
},
|
|
390
|
+
async warmIndex(ctx) {
|
|
391
|
+
const { warmIndex: warmIndex2 } = await import("./collection-facade-TLWIPI76.js");
|
|
392
|
+
return warmIndex2(ctx);
|
|
393
|
+
},
|
|
394
|
+
async flushIndex(ctx) {
|
|
395
|
+
const { flushIndex: flushIndex2 } = await import("./collection-facade-TLWIPI76.js");
|
|
396
|
+
return flushIndex2(ctx);
|
|
397
|
+
},
|
|
398
|
+
async embedOnWrite(ctx, id, record, version) {
|
|
399
|
+
const { embedOnWrite: embedOnWrite2 } = await import("./collection-facade-TLWIPI76.js");
|
|
400
|
+
return embedOnWrite2(ctx, id, record, version);
|
|
401
|
+
},
|
|
402
|
+
async rebuildEmbeddings(ctx) {
|
|
403
|
+
const { rebuildEmbeddings: rebuildEmbeddings2 } = await import("./collection-facade-TLWIPI76.js");
|
|
404
|
+
return rebuildEmbeddings2(ctx);
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// src/with-lookup/search/strategy.ts
|
|
410
|
+
var NO_SEARCH = {
|
|
411
|
+
async search() {
|
|
412
|
+
throw new SearchNotEnabledError();
|
|
413
|
+
},
|
|
414
|
+
async retrieve() {
|
|
415
|
+
throw new SearchNotEnabledError();
|
|
416
|
+
},
|
|
417
|
+
async similarTo() {
|
|
418
|
+
throw new SearchNotEnabledError();
|
|
419
|
+
},
|
|
420
|
+
async warmIndex() {
|
|
421
|
+
throw new SearchNotEnabledError();
|
|
422
|
+
},
|
|
423
|
+
async flushIndex() {
|
|
424
|
+
throw new SearchNotEnabledError();
|
|
425
|
+
},
|
|
426
|
+
async embedOnWrite() {
|
|
427
|
+
throw new SearchNotEnabledError();
|
|
428
|
+
},
|
|
429
|
+
async rebuildEmbeddings() {
|
|
430
|
+
throw new SearchNotEnabledError();
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
// src/with-lookup/search/collection-facade.ts
|
|
435
|
+
async function search(ctx, field, query, opts = {}) {
|
|
436
|
+
if (ctx.lazy) {
|
|
437
|
+
throw new Error(
|
|
438
|
+
`Collection "${ctx.name}": search() (scan mode) requires eager mode (prefetch: true). A store-usable blind index for lazy / at-scale search is a separate gated opt-in (#308).`
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
await ctx.ensureHydrated();
|
|
442
|
+
const entries = [];
|
|
443
|
+
for (const [id, e] of ctx.cache) entries.push({ id, record: stripI18nFilled(e.record) });
|
|
444
|
+
return searchScan(entries, field, query, opts);
|
|
445
|
+
}
|
|
446
|
+
function buildRetrievalDocs(ctx, labelMaps, blobFilenames, only) {
|
|
447
|
+
const docs = [];
|
|
448
|
+
for (const [id, e] of ctx.cache) {
|
|
449
|
+
const rec = stripI18nFilled(e.record);
|
|
450
|
+
const fields = buildStringFieldEntries(rec, ctx.textIndexes ?? [], only);
|
|
451
|
+
if (ctx.i18nFields) fields.push(...buildI18nFieldEntries(rec, ctx.i18nFields, ctx.textIndexes ?? [], only));
|
|
452
|
+
if (ctx.dictKeyFields) fields.push(...buildDictKeyFieldEntries(rec, ctx.dictKeyFields, labelMaps, ctx.textIndexes ?? [], only));
|
|
453
|
+
const blobNames = blobFilenames.get(id);
|
|
454
|
+
if (blobNames) fields.push(...buildBlobFieldEntries(blobNames));
|
|
455
|
+
if (fields.length > 0) docs.push({ id, fields });
|
|
456
|
+
}
|
|
457
|
+
return docs;
|
|
458
|
+
}
|
|
459
|
+
function hasIndexedBlobFields(ctx, only) {
|
|
460
|
+
if (!ctx.blobFields || !ctx.textIndexes) return false;
|
|
461
|
+
const fields = only ? ctx.textIndexes.filter((f) => only.includes(f)) : ctx.textIndexes;
|
|
462
|
+
return fields.some((f) => f in ctx.blobFields);
|
|
463
|
+
}
|
|
464
|
+
async function resolveBlobFilenames(ctx, only) {
|
|
465
|
+
const out = /* @__PURE__ */ new Map();
|
|
466
|
+
if (!hasIndexedBlobFields(ctx, only)) return out;
|
|
467
|
+
const indexed = (only ? ctx.textIndexes.filter((f) => only.includes(f)) : ctx.textIndexes).filter((f) => f in ctx.blobFields);
|
|
468
|
+
const indexedSet = new Set(indexed);
|
|
469
|
+
for (const id of ctx.cache.keys()) {
|
|
470
|
+
let slots;
|
|
471
|
+
try {
|
|
472
|
+
slots = await ctx.blob(id).list();
|
|
473
|
+
} catch {
|
|
474
|
+
continue;
|
|
475
|
+
}
|
|
476
|
+
let byField;
|
|
477
|
+
for (const slot of slots) {
|
|
478
|
+
if (!indexedSet.has(slot.name) || !slot.filename) continue;
|
|
479
|
+
if (!byField) {
|
|
480
|
+
byField = /* @__PURE__ */ new Map();
|
|
481
|
+
out.set(id, byField);
|
|
482
|
+
}
|
|
483
|
+
const names = byField.get(slot.name);
|
|
484
|
+
if (names) names.push(slot.filename);
|
|
485
|
+
else byField.set(slot.name, [slot.filename]);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
return out;
|
|
489
|
+
}
|
|
490
|
+
async function resolveDictLabelMaps(ctx) {
|
|
491
|
+
const maps = /* @__PURE__ */ new Map();
|
|
492
|
+
if (!ctx.dictKeyFields || !ctx.textIndexes) return maps;
|
|
493
|
+
for (const field of ctx.textIndexes) {
|
|
494
|
+
const desc = ctx.dictKeyFields[field];
|
|
495
|
+
if (!desc) continue;
|
|
496
|
+
const m = /* @__PURE__ */ new Map();
|
|
497
|
+
if (isStaticDictDescriptor(desc)) {
|
|
498
|
+
for (const [key, labels] of Object.entries(desc.table)) m.set(key, labels);
|
|
499
|
+
} else {
|
|
500
|
+
if (ctx.getDictionary) {
|
|
501
|
+
const handle = await ctx.getDictionary(desc.name);
|
|
502
|
+
for (const e of await handle.list()) m.set(e.key, e.labels);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
maps.set(field, m);
|
|
506
|
+
}
|
|
507
|
+
return maps;
|
|
508
|
+
}
|
|
509
|
+
async function flushIndex(ctx) {
|
|
510
|
+
if (!ctx.searchIndexStore) return;
|
|
511
|
+
await ctx.ensureHydrated();
|
|
512
|
+
const labelMaps = await resolveDictLabelMaps(ctx);
|
|
513
|
+
const blobFilenames = await resolveBlobFilenames(ctx);
|
|
514
|
+
await ctx.searchIndexStore.ensureBuilt(() => buildRetrievalDocs(ctx, labelMaps, blobFilenames));
|
|
515
|
+
await ctx.searchIndexStore.flush?.();
|
|
516
|
+
}
|
|
517
|
+
function buildVectorLoad(ctx) {
|
|
518
|
+
return async () => {
|
|
519
|
+
const ids = await ctx.adapter.list(ctx.vault, "_vec");
|
|
520
|
+
const out = [];
|
|
521
|
+
for (const vecId of ids) {
|
|
522
|
+
if (!isVecIdFor(ctx.name, vecId)) continue;
|
|
523
|
+
const id = decodeVecId(ctx.name, vecId);
|
|
524
|
+
if (await liveRecordIsElevated(ctx.adapter, ctx.vault, ctx.name, id)) continue;
|
|
525
|
+
const env = await ctx.adapter.get(ctx.vault, "_vec", vecId);
|
|
526
|
+
if (!env) continue;
|
|
527
|
+
let body;
|
|
528
|
+
try {
|
|
529
|
+
body = await ctx.codec.decryptJsonString(env);
|
|
530
|
+
} catch {
|
|
531
|
+
continue;
|
|
532
|
+
}
|
|
533
|
+
if (body === null) continue;
|
|
534
|
+
const parsed = JSON.parse(body);
|
|
535
|
+
out.push({ id, vec: new Float32Array(parsed.vec), model: parsed.model });
|
|
536
|
+
}
|
|
537
|
+
return out;
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
function buildPersistedIndexCallbacks(provideCtx) {
|
|
541
|
+
const FT = "_ftindex";
|
|
542
|
+
return {
|
|
543
|
+
load: async () => {
|
|
544
|
+
const ctx = provideCtx();
|
|
545
|
+
const env = await ctx.adapter.get(ctx.vault, FT, ctx.name);
|
|
546
|
+
if (!env) return null;
|
|
547
|
+
const body = await ctx.codec.decryptJsonString(env);
|
|
548
|
+
if (body === null) return null;
|
|
549
|
+
try {
|
|
550
|
+
const wrapped = JSON.parse(body);
|
|
551
|
+
return { json: wrapped.idx, fingerprint: wrapped.fp };
|
|
552
|
+
} catch {
|
|
553
|
+
return null;
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
save: async (json, fp, isStale) => {
|
|
557
|
+
const ctx = provideCtx();
|
|
558
|
+
const body = JSON.stringify({ fp, idx: json });
|
|
559
|
+
const env = await ctx.codec.encryptJsonString(body, fp.count);
|
|
560
|
+
if (isStale()) return;
|
|
561
|
+
await ctx.adapter.put(ctx.vault, FT, ctx.name, env);
|
|
562
|
+
},
|
|
563
|
+
remove: async () => {
|
|
564
|
+
const ctx = provideCtx();
|
|
565
|
+
await ctx.adapter.delete(ctx.vault, FT, ctx.name);
|
|
566
|
+
},
|
|
567
|
+
currentFingerprint: () => {
|
|
568
|
+
const ctx = provideCtx();
|
|
569
|
+
let maxVersion = 0;
|
|
570
|
+
for (const e of ctx.cache.values()) if (e.version > maxVersion) maxVersion = e.version;
|
|
571
|
+
return { count: ctx.cache.size, maxVersion };
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
async function warmIndex(ctx) {
|
|
576
|
+
if (!ctx.searchIndexStore) return;
|
|
577
|
+
if (ctx.lazy) {
|
|
578
|
+
throw new Error(
|
|
579
|
+
`Collection "${ctx.name}": warmIndex() requires eager mode (prefetch: true).`
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
await ctx.ensureHydrated();
|
|
583
|
+
const built = ctx.searchIndexStore.built;
|
|
584
|
+
const labelMaps = built ? /* @__PURE__ */ new Map() : await resolveDictLabelMaps(ctx);
|
|
585
|
+
const blobFilenames = built ? /* @__PURE__ */ new Map() : await resolveBlobFilenames(ctx);
|
|
586
|
+
await ctx.searchIndexStore.ensureBuilt(() => buildRetrievalDocs(ctx, labelMaps, blobFilenames));
|
|
587
|
+
}
|
|
588
|
+
async function retrieve(ctx, query, opts = {}) {
|
|
589
|
+
const hits = opts.mode === "semantic" ? await retrieveSemantic(ctx, query, opts) : opts.mode === "hybrid" ? await retrieveHybrid(ctx, query, opts) : await retrieveLexical(ctx, query, opts);
|
|
590
|
+
return opts.within ? applyWithin(hits, opts.within) : hits;
|
|
591
|
+
}
|
|
592
|
+
function applyWithin(hits, within) {
|
|
593
|
+
const ids = new Set(within._idArray());
|
|
594
|
+
return hits.filter((h) => ids.has(h.id)).map((h, i) => ({ ...h, rank: i + 1 }));
|
|
595
|
+
}
|
|
596
|
+
async function retrieveLexical(ctx, query, opts) {
|
|
597
|
+
if (!ctx.searchIndexStore) {
|
|
598
|
+
throw new Error(`Collection "${ctx.name}": retrieve() requires a textIndexes config.`);
|
|
599
|
+
}
|
|
600
|
+
if (ctx.lazy) {
|
|
601
|
+
throw new Error(
|
|
602
|
+
`Collection "${ctx.name}": retrieve() requires eager mode (prefetch: true).`
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
await ctx.ensureHydrated();
|
|
606
|
+
const built = ctx.searchIndexStore.built;
|
|
607
|
+
const labelMaps = built ? /* @__PURE__ */ new Map() : await resolveDictLabelMaps(ctx);
|
|
608
|
+
const blobFilenames = built ? /* @__PURE__ */ new Map() : await resolveBlobFilenames(ctx);
|
|
609
|
+
const index = await ctx.searchIndexStore.ensureBuilt(() => buildRetrievalDocs(ctx, labelMaps, blobFilenames));
|
|
610
|
+
const hits = index.query(query, {
|
|
611
|
+
...opts.limit !== void 0 ? { limit: opts.limit } : {},
|
|
612
|
+
...opts.match ? { match: opts.match } : {},
|
|
613
|
+
...opts.prefix ? { prefix: opts.prefix } : {},
|
|
614
|
+
...opts.fields ? { fields: opts.fields } : {}
|
|
615
|
+
});
|
|
616
|
+
const window = opts.snippetWindow ?? 80;
|
|
617
|
+
return hits.map((h, i) => {
|
|
618
|
+
const base = {
|
|
619
|
+
id: h.id,
|
|
620
|
+
score: h.score,
|
|
621
|
+
rank: i + 1,
|
|
622
|
+
field: h.field,
|
|
623
|
+
snippet: extractSnippet(h.text, h.offset, window),
|
|
624
|
+
...h.locale !== void 0 ? { locale: h.locale } : {},
|
|
625
|
+
...opts.includeRecord ? (() => {
|
|
626
|
+
const e = ctx.cache.get(h.id);
|
|
627
|
+
return e ? { record: stripI18nFilled(e.record) } : {};
|
|
628
|
+
})() : {}
|
|
629
|
+
};
|
|
630
|
+
return base;
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
async function retrieveHybrid(ctx, query, opts) {
|
|
634
|
+
if (!ctx.embeddings) {
|
|
635
|
+
throw new Error(`Collection "${ctx.name}": retrieve({mode:'hybrid'}) requires an embeddings config.`);
|
|
636
|
+
}
|
|
637
|
+
const [lex, sem] = await Promise.all([
|
|
638
|
+
retrieveLexical(ctx, query, opts),
|
|
639
|
+
retrieveSemantic(ctx, query, opts)
|
|
640
|
+
]);
|
|
641
|
+
return fuseRetrieval([lex, sem], opts.limit !== void 0 ? { limit: opts.limit } : {});
|
|
642
|
+
}
|
|
643
|
+
async function retrieveSemantic(ctx, query, opts) {
|
|
644
|
+
if (!ctx.embeddings) throw new Error(`Collection "${ctx.name}": retrieve({mode:'semantic'}) requires an embeddings config.`);
|
|
645
|
+
if (ctx.lazy) throw new Error(`Collection "${ctx.name}": retrieve() requires eager mode (prefetch: true).`);
|
|
646
|
+
const qVec = await ctx.embeddings.encode(query);
|
|
647
|
+
return similarTo(ctx, qVec, {
|
|
648
|
+
...opts.limit !== void 0 ? { k: opts.limit } : {},
|
|
649
|
+
...opts.minScore !== void 0 ? { minScore: opts.minScore } : {},
|
|
650
|
+
...opts.includeRecord ? { includeRecord: true } : {}
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
async function similarTo(ctx, vector, opts = {}) {
|
|
654
|
+
if (!ctx.embeddings || !ctx.vectorSet) throw new Error(`Collection "${ctx.name}": similarTo() requires an embeddings config.`);
|
|
655
|
+
if (ctx.lazy) throw new Error(`Collection "${ctx.name}": similarTo() requires eager mode (prefetch: true).`);
|
|
656
|
+
await ctx.ensureHydrated();
|
|
657
|
+
await ctx.vectorSet.ensureLoaded(buildVectorLoad(ctx));
|
|
658
|
+
const hits = ctx.vectorSet.cosineTopK(vector, opts.k ?? 10, {
|
|
659
|
+
...opts.minScore !== void 0 ? { minScore: opts.minScore } : {},
|
|
660
|
+
expectModel: ctx.embeddings.model
|
|
661
|
+
});
|
|
662
|
+
return hits.map((h, i) => {
|
|
663
|
+
const base = { id: h.id, score: h.score, rank: i + 1, field: "(vector)", snippet: "" };
|
|
664
|
+
if (opts.includeRecord) {
|
|
665
|
+
const e = ctx.cache.get(h.id);
|
|
666
|
+
if (e) base.record = stripI18nFilled(e.record);
|
|
667
|
+
}
|
|
668
|
+
return base;
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
async function embedOnWrite(ctx, id, record, version) {
|
|
672
|
+
if (!ctx.embeddings) return;
|
|
673
|
+
const text = embeddingSourceText(record, ctx.embeddings.source);
|
|
674
|
+
const vec = await ctx.embeddings.encode(text);
|
|
675
|
+
if (vec.length !== ctx.embeddings.dim) throw new EmbeddingDimMismatchError("embeddings", ctx.embeddings.dim, vec.length);
|
|
676
|
+
const body = JSON.stringify({ vec: Array.from(vec), model: ctx.embeddings.model, dim: ctx.embeddings.dim });
|
|
677
|
+
const vecEnv = await ctx.codec.encryptJsonString(body, version);
|
|
678
|
+
await ctx.adapter.put(ctx.vault, "_vec", encodeVecId(ctx.name, id), vecEnv);
|
|
679
|
+
ctx.vectorSet?.markDirty();
|
|
680
|
+
}
|
|
681
|
+
async function rebuildEmbeddings(ctx) {
|
|
682
|
+
if (!ctx.embeddings) return { rebuilt: 0, skipped: 0 };
|
|
683
|
+
const ids = await ctx.adapter.list(ctx.vault, ctx.name);
|
|
684
|
+
let rebuilt = 0;
|
|
685
|
+
let skipped = 0;
|
|
686
|
+
for (const id of ids) {
|
|
687
|
+
if (await liveRecordIsElevated(ctx.adapter, ctx.vault, ctx.name, id)) {
|
|
688
|
+
skipped++;
|
|
689
|
+
continue;
|
|
690
|
+
}
|
|
691
|
+
const env = await ctx.adapter.get(ctx.vault, ctx.name, id);
|
|
692
|
+
if (!env) {
|
|
693
|
+
skipped++;
|
|
694
|
+
continue;
|
|
695
|
+
}
|
|
696
|
+
const decoded = await ctx.codec.decryptRecord(env, { id });
|
|
697
|
+
if (decoded === null) {
|
|
698
|
+
skipped++;
|
|
699
|
+
continue;
|
|
700
|
+
}
|
|
701
|
+
await embedOnWrite(ctx, id, decoded, env._v ?? 1);
|
|
702
|
+
rebuilt++;
|
|
703
|
+
}
|
|
704
|
+
return { rebuilt, skipped };
|
|
705
|
+
}
|
|
706
|
+
async function syncTierSearch(ctx, id, record, version) {
|
|
707
|
+
if (!ctx.searchIndexStore && !ctx.vectorSet) return;
|
|
708
|
+
if (record === null) {
|
|
709
|
+
await ctx.adapter.delete(ctx.vault, "_vec", encodeVecId(ctx.name, id));
|
|
710
|
+
ctx.vectorSet?.markDirty();
|
|
711
|
+
} else {
|
|
712
|
+
await embedOnWrite(ctx, id, record, version ?? 1);
|
|
713
|
+
}
|
|
714
|
+
const store = ctx.searchIndexStore;
|
|
715
|
+
if (store && "removePersisted" in store) await store.removePersisted();
|
|
716
|
+
else store?.markDirty();
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export {
|
|
720
|
+
VectorSet,
|
|
721
|
+
encodeVecId,
|
|
722
|
+
tokenize,
|
|
723
|
+
InvertedIndex,
|
|
724
|
+
MemoryIndexStore,
|
|
725
|
+
withSearch,
|
|
726
|
+
NO_SEARCH,
|
|
727
|
+
search,
|
|
728
|
+
buildRetrievalDocs,
|
|
729
|
+
hasIndexedBlobFields,
|
|
730
|
+
flushIndex,
|
|
731
|
+
buildPersistedIndexCallbacks,
|
|
732
|
+
warmIndex,
|
|
733
|
+
retrieve,
|
|
734
|
+
similarTo,
|
|
735
|
+
embedOnWrite,
|
|
736
|
+
rebuildEmbeddings,
|
|
737
|
+
syncTierSearch
|
|
738
|
+
};
|
|
739
|
+
//# sourceMappingURL=chunk-OSDB5WW3.js.map
|