@noy-db/hub 0.7.0-pre.9 → 0.7.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/CHANGELOG.md +1319 -0
- package/README.md +7 -6
- package/dist/api-TXFOVOXX.js +19 -0
- package/dist/as/index.js +14 -14
- package/dist/at/index.js +9 -10
- package/dist/attestation/index.js +18 -19
- package/dist/attestation/index.js.map +1 -1
- package/dist/{backup-QZQEP5RO.js → backup-IJTB4S4M.js} +14 -15
- package/dist/{backup-QZQEP5RO.js.map → backup-IJTB4S4M.js.map} +1 -1
- package/dist/blobs/index.js +13 -14
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -13
- package/dist/broker/index.js.map +1 -1
- package/dist/by/index.js +2 -3
- package/dist/cargo/index.js +33 -34
- package/dist/{chunk-5UKIZIO3.js → chunk-2577DKXB.js} +2 -2
- package/dist/chunk-2C3AQB46.js +1652 -0
- package/dist/chunk-2C3AQB46.js.map +1 -0
- package/dist/{chunk-LUVGSKXE.js → chunk-2N4GY74U.js} +6 -6
- package/dist/{chunk-I5LSKXT6.js → chunk-2Y4IMKA6.js} +4 -4
- package/dist/{chunk-7XT7KZTN.js → chunk-3RCJJBNR.js} +10 -10
- package/dist/{chunk-GM4IM7TC.js → chunk-453F654R.js} +2 -2
- package/dist/{chunk-JUBWUJY5.js → chunk-4GVM6QZA.js} +2 -2
- package/dist/{chunk-2DGBRE4K.js → chunk-4OZNXTO4.js} +2 -2
- package/dist/{chunk-P2RJAVMR.js → chunk-5VCRVKOZ.js} +4 -4
- package/dist/{chunk-RCONOOVF.js → chunk-5WDXHNSW.js} +5 -5
- package/dist/chunk-66TQOPFM.js +37 -0
- package/dist/chunk-66TQOPFM.js.map +1 -0
- package/dist/{chunk-Q2OAAREU.js → chunk-6GMZ7HEE.js} +6 -6
- package/dist/{chunk-6L5IMNJX.js → chunk-6GOE5PGN.js} +168 -1328
- package/dist/chunk-6GOE5PGN.js.map +1 -0
- package/dist/{chunk-TQGT5BZE.js → chunk-6I2RQCET.js} +4 -4
- package/dist/{chunk-UL7TLJ54.js → chunk-6X6SEMEE.js} +6 -4
- package/dist/{chunk-UL7TLJ54.js.map → chunk-6X6SEMEE.js.map} +1 -1
- package/dist/{chunk-P7KJME6C.js → chunk-6YXCPL4T.js} +2 -2
- package/dist/{chunk-DOPZWTMJ.js → chunk-77K4PG6P.js} +8 -8
- package/dist/{chunk-LAI7ENPW.js → chunk-7MG2LHO5.js} +3 -3
- package/dist/{chunk-N4CHCXDL.js → chunk-7MG7SJT7.js} +1 -1
- package/dist/{chunk-N4CHCXDL.js.map → chunk-7MG7SJT7.js.map} +1 -1
- package/dist/{chunk-SW4TOSJL.js → chunk-7O3Y4PPD.js} +1 -1
- package/dist/chunk-7O3Y4PPD.js.map +1 -0
- package/dist/{chunk-HOIWW2LV.js → chunk-7V4TP3AF.js} +4 -4
- package/dist/{chunk-GKOJR53Y.js → chunk-ANATMFIO.js} +5 -5
- package/dist/{chunk-MU74BYOD.js → chunk-ANSIZYEG.js} +3 -3
- package/dist/{chunk-IS5LFHV2.js → chunk-AO42KJO6.js} +7 -7
- package/dist/{chunk-RPX2H2OL.js → chunk-BLN54W3L.js} +3 -3
- package/dist/{chunk-HS3LEVT4.js → chunk-BM5TWITZ.js} +7 -7
- package/dist/{chunk-JRWLUWDM.js → chunk-BOET4NA4.js} +3 -3
- package/dist/{chunk-XGXVPCYW.js → chunk-BOWNCWZT.js} +3 -3
- package/dist/{chunk-5EC7X5QA.js → chunk-BSFNRLK2.js} +5 -5
- package/dist/{chunk-65ZYRK7O.js → chunk-BUE2D7PX.js} +26 -3
- package/dist/chunk-BUE2D7PX.js.map +1 -0
- package/dist/{chunk-UTFY6W6X.js → chunk-BZ3534YM.js} +2 -2
- package/dist/chunk-CARABLSQ.js +176 -0
- package/dist/chunk-CARABLSQ.js.map +1 -0
- package/dist/{chunk-HLFLJCDX.js → chunk-CHJBLCOG.js} +7 -7
- package/dist/{chunk-OLUTCM23.js → chunk-CPWQB3N5.js} +7 -7
- package/dist/{chunk-3GIA3HJ2.js → chunk-DGOZ4UZD.js} +2 -2
- package/dist/{chunk-FPN5D4JX.js → chunk-ELNXJMGB.js} +6 -6
- package/dist/{chunk-NMDMSHBF.js → chunk-EQEYOJBM.js} +3 -3
- package/dist/{chunk-RHTPGS56.js → chunk-EYBQEIUY.js} +3 -3
- package/dist/{chunk-Q2ZN5DWZ.js → chunk-FAHMLERK.js} +2 -2
- package/dist/chunk-FFWI7UH7.js +53 -0
- package/dist/chunk-FFWI7UH7.js.map +1 -0
- package/dist/{chunk-MENI33ZV.js → chunk-FMZY5Q6L.js} +3 -3
- package/dist/{chunk-FZWAGG5T.js → chunk-FXBIP2WD.js} +6 -6
- package/dist/{chunk-OHGCRKWA.js → chunk-G56KBWFY.js} +18 -8
- package/dist/{chunk-OHGCRKWA.js.map → chunk-G56KBWFY.js.map} +1 -1
- package/dist/{chunk-K432FT7T.js → chunk-GPEQUXHL.js} +4 -4
- package/dist/{chunk-DNMTN46H.js → chunk-GY4WYNNG.js} +2 -2
- package/dist/{chunk-OQDHIAR2.js → chunk-HDOU6I2Y.js} +80 -8
- package/dist/chunk-HDOU6I2Y.js.map +1 -0
- package/dist/{chunk-MQPHKJ74.js → chunk-J6FXAEUG.js} +12 -12
- package/dist/{chunk-PV7XXAXK.js → chunk-JBDFMYKQ.js} +2 -2
- package/dist/{chunk-IZTU6RKH.js → chunk-JMGDHKQF.js} +2 -2
- package/dist/{chunk-AHIIBDNH.js → chunk-K6LHRFBL.js} +7 -7
- package/dist/{chunk-FN26SFGH.js → chunk-K7NTTA6P.js} +2 -2
- package/dist/{chunk-MV2OEK3K.js → chunk-KG7TZKZG.js} +5 -5
- package/dist/{chunk-5NKHCJU5.js → chunk-KJIMGIWO.js} +8 -8
- package/dist/{chunk-ZB2K3FV7.js → chunk-KTFRCC5C.js} +2 -2
- package/dist/{chunk-X6YRP5EC.js → chunk-KUJDV5QH.js} +5 -5
- package/dist/{chunk-PCIBCL26.js → chunk-KUX3OB6D.js} +7 -5
- package/dist/{chunk-PCIBCL26.js.map → chunk-KUX3OB6D.js.map} +1 -1
- package/dist/{chunk-OKCQNMO6.js → chunk-L742JPKZ.js} +6 -6
- package/dist/{chunk-P22XPNFW.js → chunk-L7CIOOBW.js} +2 -2
- package/dist/{chunk-QOHGWFAW.js → chunk-LWBCUYZW.js} +2 -2
- package/dist/{chunk-357ECVLE.js → chunk-MUM7IANK.js} +3 -3
- package/dist/{chunk-JFSUYGNE.js → chunk-MVMXZYXT.js} +2 -2
- package/dist/{chunk-3SWP2FYA.js → chunk-NA2NIJZI.js} +8 -8
- package/dist/{chunk-MOQ6OGKS.js → chunk-NKHRDYOR.js} +4 -4
- package/dist/{chunk-FKQCC4C5.js → chunk-NQKIUNW5.js} +2 -2
- package/dist/{chunk-SWFIXQF5.js → chunk-PT43Y56J.js} +6 -6
- package/dist/{chunk-MTTPHBIE.js → chunk-Q2PU57HC.js} +2 -2
- package/dist/{chunk-FLRLZ4XZ.js → chunk-Q7HZX3IF.js} +2 -2
- package/dist/{chunk-75WNTBZL.js → chunk-QIBVIOXO.js} +3 -3
- package/dist/{chunk-KQIDBIZL.js → chunk-QIZPZMUI.js} +2 -2
- package/dist/{chunk-VT4DTCK5.js → chunk-REDOOY2Q.js} +3 -3
- package/dist/chunk-REDOOY2Q.js.map +1 -0
- package/dist/{chunk-KZTPL7NL.js → chunk-RMF67KCG.js} +2 -2
- package/dist/{chunk-OEJ4R52I.js → chunk-RMS3NEA3.js} +2 -2
- package/dist/{chunk-VTTDPGEK.js → chunk-RRNRNANG.js} +9 -9
- package/dist/chunk-RTBJ5IOO.js +87 -0
- package/dist/chunk-RTBJ5IOO.js.map +1 -0
- package/dist/chunk-RXLYKVTF.js +17 -0
- package/dist/chunk-RXLYKVTF.js.map +1 -0
- package/dist/{chunk-XKA6UH5V.js → chunk-SFAWCTEM.js} +2 -2
- package/dist/{chunk-FYT3DXPN.js → chunk-SKGMN35F.js} +2 -2
- package/dist/{chunk-USKHHOIV.js → chunk-SL3JAAKN.js} +2 -2
- package/dist/chunk-SMH6SRX7.js +87 -0
- package/dist/chunk-SMH6SRX7.js.map +1 -0
- package/dist/{chunk-QJLOWGOU.js → chunk-SPXXX5E4.js} +12 -82
- package/dist/chunk-SPXXX5E4.js.map +1 -0
- package/dist/{chunk-JILOSL4O.js → chunk-SPYWXKJN.js} +3 -3
- package/dist/{chunk-4RUFYGWG.js → chunk-SZJ3DLZA.js} +2 -2
- package/dist/chunk-TFMM5DBB.js +20 -0
- package/dist/chunk-TFMM5DBB.js.map +1 -0
- package/dist/{chunk-O3SNM66K.js → chunk-TFR7DSOV.js} +2 -2
- package/dist/{chunk-DIVY2CJZ.js → chunk-TRGTKX5E.js} +3 -3
- package/dist/{chunk-JY4U6CYV.js → chunk-TUFM4UZP.js} +2 -2
- package/dist/{chunk-FRIVOR5N.js → chunk-U4FOQDY4.js} +5 -172
- package/dist/chunk-U4FOQDY4.js.map +1 -0
- package/dist/{chunk-DZPMKY3J.js → chunk-UGTBXF5U.js} +3 -3
- package/dist/{chunk-THNJ3IKU.js → chunk-ULUMAZ5S.js} +2 -2
- package/dist/{chunk-YHIAWECL.js → chunk-UXVWEX5L.js} +2 -2
- package/dist/{chunk-IAHDSFFA.js → chunk-UXWB3FPF.js} +10 -10
- package/dist/{chunk-NO272T7Q.js → chunk-V4PXLYWM.js} +2 -31
- package/dist/chunk-V4PXLYWM.js.map +1 -0
- package/dist/{chunk-GHADG5QZ.js → chunk-VTFVLCUH.js} +2 -2
- package/dist/{chunk-U3RMWOXY.js → chunk-VXANTWBJ.js} +3 -3
- package/dist/{chunk-5W5CEHLA.js → chunk-VXGSWL6L.js} +6 -6
- package/dist/{chunk-KHKKD62N.js → chunk-VYYM3MEN.js} +2 -16
- package/dist/chunk-VYYM3MEN.js.map +1 -0
- package/dist/{chunk-7YVSWPZB.js → chunk-WEQEYLCS.js} +7 -7
- package/dist/{chunk-TAJZ7GXO.js → chunk-X2DLENDQ.js} +3 -3
- package/dist/{chunk-2E2LT37H.js → chunk-XLMEZIAJ.js} +2 -2
- package/dist/{chunk-2MQ2D5OZ.js → chunk-XTXOCYOJ.js} +5 -5
- package/dist/{chunk-CWFH36SI.js → chunk-YSRUYAVU.js} +2 -2
- package/dist/{chunk-ZQGRZN5L.js → chunk-YYP7WSEB.js} +2 -2
- package/dist/{chunk-4U52PMEL.js → chunk-ZN4FD4PE.js} +4 -4
- package/dist/{chunk-AW4KTQA4.js → chunk-ZORTV6NH.js} +2 -2
- package/dist/{chunk-H5GVPOB4.js → chunk-ZVO4QVPD.js} +5 -5
- package/dist/classified/index.js +5 -6
- package/dist/{classified-marker-R37XW5PC.js → classified-marker-LI2SF2E4.js} +3 -5
- package/dist/{classified-marker-R37XW5PC.js.map → classified-marker-LI2SF2E4.js.map} +1 -1
- package/dist/collection-facade-4GRREZ6C.js +45 -0
- package/dist/computed-VPOKQK4N.js +10 -0
- package/dist/consent/index.js +9 -10
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +9 -10
- package/dist/crdt/index.js +0 -1
- package/dist/crdt/index.js.map +1 -1
- package/dist/custody/index.js +12 -13
- package/dist/{dead-filter-GRT6RAML.js → dead-filter-TSWZQRR5.js} +2 -3
- package/dist/{dead-filter-GRT6RAML.js.map → dead-filter-TSWZQRR5.js.map} +1 -1
- package/dist/debug/index.js +1 -2
- package/dist/debug/index.js.map +1 -1
- package/dist/{delegation-6QRAYSK6.js → delegation-OVIFFPG4.js} +11 -12
- package/dist/{delegation-6QRAYSK6.js.map → delegation-OVIFFPG4.js.map} +1 -1
- package/dist/derivations/index.js +30 -16
- package/dist/derive-6O5SWQKN.js +21 -0
- package/dist/directory/index.js +10 -11
- package/dist/dispatch-S73TK3IY.js +302 -0
- package/dist/dispatch-S73TK3IY.js.map +1 -0
- package/dist/{dispatch-QCF7KPIP.js → dispatch-WC6X2M6C.js} +5 -7
- package/dist/{dispatch-QCF7KPIP.js.map → dispatch-WC6X2M6C.js.map} +1 -1
- package/dist/{enclave-OXZY3NOP.js → enclave-KJOTOH7X.js} +9 -10
- package/dist/executor-5NIMLSKZ.js +8 -0
- package/dist/executor-AQVXV5GZ.js +8 -0
- package/dist/executor-PUAO6AKJ.js +29 -0
- package/dist/export-accessible-72EQNBMR.js +22 -0
- package/dist/extract-partition-PUYNU3UF.js +37 -0
- package/dist/{fanout-sidecar-KGQCUJ7P.js → fanout-sidecar-WUFXNYP4.js} +9 -10
- package/dist/{fanout-sidecar-KGQCUJ7P.js.map → fanout-sidecar-WUFXNYP4.js.map} +1 -1
- package/dist/{fence-watcher-ZVSMLKQD.js → fence-watcher-U2PW6JU5.js} +1 -3
- package/dist/{fence-watcher-ZVSMLKQD.js.map → fence-watcher-U2PW6JU5.js.map} +1 -1
- package/dist/find-2ABFCZX4.js +10 -0
- package/dist/forget/index.js +9 -10
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -5
- package/dist/history/index.js +13 -14
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +14 -15
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +20 -4
- package/dist/index.js +122 -115
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -3
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +13 -13
- package/dist/issue-SIDORTSZ.js +18 -0
- package/dist/{json-schema-I22JCYCG.js → json-schema-V3M5MUCM.js} +1 -3
- package/dist/{json-schema-I22JCYCG.js.map → json-schema-V3M5MUCM.js.map} +1 -1
- package/dist/kernel/collection-config.d.ts +34 -0
- package/dist/kernel/collection.d.ts +11 -6
- package/dist/kernel/errors.d.ts +28 -0
- package/dist/kernel/match-pairs.d.ts +30 -0
- package/dist/kernel/types.d.ts +39 -0
- package/dist/lazy/index.js +3 -3
- package/dist/{ledger-ZAFULLAF.js → ledger-F33ZVMTK.js} +11 -12
- package/dist/liberate-LCDPNAG2.js +24 -0
- package/dist/link-set-FKNWAYKS.js +30 -0
- package/dist/{managed-secret-7OH7HKXV.js → managed-secret-PQYKSR6T.js} +10 -11
- package/dist/materialized-views/index.js +21 -21
- package/dist/{migrate-cek-QHZ75E6E.js → migrate-cek-5ENH64AA.js} +2 -3
- package/dist/{migrate-cek-QHZ75E6E.js.map → migrate-cek-5ENH64AA.js.map} +1 -1
- package/dist/money/index.js +4 -5
- package/dist/noydb-DUXZPKSN.js +90 -0
- package/dist/overlay-views/index.js +4 -5
- package/dist/periods/index.js +12 -13
- package/dist/pod/index.js +64 -60
- package/dist/{pod-handle-BLOI4IFY.js → pod-handle-Q736KYON.js} +10 -11
- package/dist/{pod-handle-BLOI4IFY.js.map → pod-handle-Q736KYON.js.map} +1 -1
- package/dist/policy/index.js +10 -11
- package/dist/port/to/index.d.ts +40 -0
- package/dist/portability/index.js +8 -9
- package/dist/portability/index.js.map +1 -1
- package/dist/{post-register-R33EKJQR.js → post-register-LNE2FE2A.js} +6 -7
- package/dist/{post-register-R33EKJQR.js.map → post-register-LNE2FE2A.js.map} +1 -1
- package/dist/{purge-scope-FGNNLWHD.js → purge-scope-4HEFPDOW.js} +1 -3
- package/dist/{purge-scope-FGNNLWHD.js.map → purge-scope-4HEFPDOW.js.map} +1 -1
- package/dist/query/index.js +3 -4
- package/dist/{read-only-facade-CHCKSEPD.js → read-only-facade-BIGO37U3.js} +1 -2
- package/dist/reduce/index.js +4 -5
- package/dist/reduce/index.js.map +1 -1
- package/dist/register-I2DZXGAR.js +31 -0
- package/dist/registry-23WF3TGH.js +8 -0
- package/dist/registry-4AYVUNXK.js +8 -0
- package/dist/registry-VSSQPIGF.js +18 -0
- package/dist/registry-YLEWMGAC.js +32 -0
- package/dist/request-withdrawal-KFQHEZ25.js +30 -0
- package/dist/{reveal-PI6ADRQU.js → reveal-67RDQRIN.js} +6 -7
- package/dist/{reveal-PI6ADRQU.js.map → reveal-67RDQRIN.js.map} +1 -1
- package/dist/revoke-DQDZAZZM.js +23 -0
- package/dist/satellites/index.js +1 -2
- package/dist/schema-update/index.js +2 -3
- package/dist/sealed-record/index.js +12 -13
- package/dist/sealed-record/index.js.map +1 -1
- package/dist/search/index.js +4 -5
- package/dist/{seed-CG7JMJNY.js → seed-G42JYN56.js} +12 -13
- package/dist/{seed-CG7JMJNY.js.map → seed-G42JYN56.js.map} +1 -1
- package/dist/sequence/index.js +9 -10
- package/dist/session/index.js +9 -10
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +2 -3
- package/dist/shadow/index.js.map +1 -1
- package/dist/share-link/index.js +0 -1
- package/dist/share-link/index.js.map +1 -1
- package/dist/signer-WAMDZHEN.js +24 -0
- package/dist/snapshots/index.js +10 -11
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-HZR7745Y.js → stale-DDL7WQEZ.js} +10 -11
- package/dist/storage-FLR73HHF.js +22 -0
- package/dist/store/index.js +0 -1
- package/dist/{store-coordination-provider-MYIHSZXT.js → store-coordination-provider-MEQ2MJQG.js} +10 -11
- package/dist/{store-coordination-provider-MYIHSZXT.js.map → store-coordination-provider-MEQ2MJQG.js.map} +1 -1
- package/dist/sync/index.js +10 -11
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +15 -16
- package/dist/tiers/index.js +11 -12
- package/dist/to/index.js +2 -3
- package/dist/to/index.js.map +1 -1
- package/dist/transactions/index.js +3 -4
- package/dist/transactions/index.js.map +1 -1
- package/dist/{ulid-VQW6ERQN.js → ulid-4MKXG325.js} +1 -2
- package/dist/util/index.js +1 -2
- package/dist/util/index.js.map +1 -1
- package/dist/{vault-diff-FE5J35NJ.js → vault-diff-C6WUJFNP.js} +1 -2
- package/dist/vault-head/index.js +8 -9
- package/dist/vault-head/index.js.map +1 -1
- package/dist/{verify-R6CCBUA3.js → verify-KOV2G5D6.js} +5 -6
- package/dist/{verify-R6CCBUA3.js.map → verify-KOV2G5D6.js.map} +1 -1
- package/dist/walk-3UQBRMDV.js +21 -0
- package/dist/with-formula/derivations/dispatch.d.ts +16 -1
- package/dist/with-formula/derivations/registry.d.ts +20 -0
- package/dist/with-formula/derivations/trigger-match.d.ts +104 -0
- package/dist/with-formula/derivations/types.d.ts +61 -0
- package/dist/with-shape/introspection/behaviors.d.ts +7 -0
- package/dist/with-shape/introspection/describe.d.ts +10 -1
- package/dist/with-shape/introspection/field-meta.d.ts +86 -0
- package/dist/withdraw-accessible-EL5GXZBS.js +27 -0
- package/package.json +8 -3
- package/dist/api-GJQF7OAJ.js +0 -20
- package/dist/chunk-65ZYRK7O.js.map +0 -1
- package/dist/chunk-6L5IMNJX.js.map +0 -1
- package/dist/chunk-FRIVOR5N.js.map +0 -1
- package/dist/chunk-J6FXVDKC.js +0 -81
- package/dist/chunk-J6FXVDKC.js.map +0 -1
- package/dist/chunk-KHKKD62N.js.map +0 -1
- package/dist/chunk-NO272T7Q.js.map +0 -1
- package/dist/chunk-OQDHIAR2.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-QJLOWGOU.js.map +0 -1
- package/dist/chunk-SW4TOSJL.js.map +0 -1
- package/dist/chunk-VT4DTCK5.js.map +0 -1
- package/dist/chunk-XJP66QEN.js +0 -344
- package/dist/chunk-XJP66QEN.js.map +0 -1
- package/dist/collection-facade-OPJ3EC4L.js +0 -45
- package/dist/computed-HW6IG5UH.js +0 -11
- package/dist/derive-AAIXSQIE.js +0 -22
- package/dist/dispatch-DR3XITEC.js +0 -194
- package/dist/dispatch-DR3XITEC.js.map +0 -1
- package/dist/executor-67NA4KPO.js +0 -29
- package/dist/executor-7JDP7UBK.js +0 -9
- package/dist/executor-CRH5OB4V.js +0 -9
- package/dist/export-accessible-K4GJAU7U.js +0 -23
- package/dist/extract-partition-YJFL5OKK.js +0 -38
- package/dist/find-SVZHMEQI.js +0 -11
- package/dist/issue-64N6OG7U.js +0 -19
- package/dist/liberate-XL6NSGOL.js +0 -25
- package/dist/link-set-LQI2IJX6.js +0 -31
- package/dist/noydb-SWUGPFBK.js +0 -86
- package/dist/register-AYBQNTM3.js +0 -32
- package/dist/registry-CQWWOBO4.js +0 -9
- package/dist/registry-JCZ4BNLV.js +0 -18
- package/dist/registry-JFFENZ44.js +0 -9
- package/dist/registry-ZA4HACYR.js +0 -19
- package/dist/request-withdrawal-7IKUIAEB.js +0 -31
- package/dist/revoke-PUJKRYJF.js +0 -24
- package/dist/signer-5TA7FUC3.js +0 -25
- package/dist/storage-J2QHNJCB.js +0 -23
- package/dist/walk-3PA4ZOKS.js +0 -21
- package/dist/withdraw-accessible-62VI4W7D.js +0 -28
- package/dist/withdraw-accessible-62VI4W7D.js.map +0 -1
- package/dist/zod-HAJM7LMS.js +0 -14763
- package/dist/zod-HAJM7LMS.js.map +0 -1
- /package/dist/{api-GJQF7OAJ.js.map → api-TXFOVOXX.js.map} +0 -0
- /package/dist/{chunk-5UKIZIO3.js.map → chunk-2577DKXB.js.map} +0 -0
- /package/dist/{chunk-LUVGSKXE.js.map → chunk-2N4GY74U.js.map} +0 -0
- /package/dist/{chunk-I5LSKXT6.js.map → chunk-2Y4IMKA6.js.map} +0 -0
- /package/dist/{chunk-7XT7KZTN.js.map → chunk-3RCJJBNR.js.map} +0 -0
- /package/dist/{chunk-GM4IM7TC.js.map → chunk-453F654R.js.map} +0 -0
- /package/dist/{chunk-JUBWUJY5.js.map → chunk-4GVM6QZA.js.map} +0 -0
- /package/dist/{chunk-2DGBRE4K.js.map → chunk-4OZNXTO4.js.map} +0 -0
- /package/dist/{chunk-P2RJAVMR.js.map → chunk-5VCRVKOZ.js.map} +0 -0
- /package/dist/{chunk-RCONOOVF.js.map → chunk-5WDXHNSW.js.map} +0 -0
- /package/dist/{chunk-Q2OAAREU.js.map → chunk-6GMZ7HEE.js.map} +0 -0
- /package/dist/{chunk-TQGT5BZE.js.map → chunk-6I2RQCET.js.map} +0 -0
- /package/dist/{chunk-P7KJME6C.js.map → chunk-6YXCPL4T.js.map} +0 -0
- /package/dist/{chunk-DOPZWTMJ.js.map → chunk-77K4PG6P.js.map} +0 -0
- /package/dist/{chunk-LAI7ENPW.js.map → chunk-7MG2LHO5.js.map} +0 -0
- /package/dist/{chunk-HOIWW2LV.js.map → chunk-7V4TP3AF.js.map} +0 -0
- /package/dist/{chunk-GKOJR53Y.js.map → chunk-ANATMFIO.js.map} +0 -0
- /package/dist/{chunk-MU74BYOD.js.map → chunk-ANSIZYEG.js.map} +0 -0
- /package/dist/{chunk-IS5LFHV2.js.map → chunk-AO42KJO6.js.map} +0 -0
- /package/dist/{chunk-RPX2H2OL.js.map → chunk-BLN54W3L.js.map} +0 -0
- /package/dist/{chunk-HS3LEVT4.js.map → chunk-BM5TWITZ.js.map} +0 -0
- /package/dist/{chunk-JRWLUWDM.js.map → chunk-BOET4NA4.js.map} +0 -0
- /package/dist/{chunk-XGXVPCYW.js.map → chunk-BOWNCWZT.js.map} +0 -0
- /package/dist/{chunk-5EC7X5QA.js.map → chunk-BSFNRLK2.js.map} +0 -0
- /package/dist/{chunk-UTFY6W6X.js.map → chunk-BZ3534YM.js.map} +0 -0
- /package/dist/{chunk-HLFLJCDX.js.map → chunk-CHJBLCOG.js.map} +0 -0
- /package/dist/{chunk-OLUTCM23.js.map → chunk-CPWQB3N5.js.map} +0 -0
- /package/dist/{chunk-3GIA3HJ2.js.map → chunk-DGOZ4UZD.js.map} +0 -0
- /package/dist/{chunk-FPN5D4JX.js.map → chunk-ELNXJMGB.js.map} +0 -0
- /package/dist/{chunk-NMDMSHBF.js.map → chunk-EQEYOJBM.js.map} +0 -0
- /package/dist/{chunk-RHTPGS56.js.map → chunk-EYBQEIUY.js.map} +0 -0
- /package/dist/{chunk-Q2ZN5DWZ.js.map → chunk-FAHMLERK.js.map} +0 -0
- /package/dist/{chunk-MENI33ZV.js.map → chunk-FMZY5Q6L.js.map} +0 -0
- /package/dist/{chunk-FZWAGG5T.js.map → chunk-FXBIP2WD.js.map} +0 -0
- /package/dist/{chunk-K432FT7T.js.map → chunk-GPEQUXHL.js.map} +0 -0
- /package/dist/{chunk-DNMTN46H.js.map → chunk-GY4WYNNG.js.map} +0 -0
- /package/dist/{chunk-MQPHKJ74.js.map → chunk-J6FXAEUG.js.map} +0 -0
- /package/dist/{chunk-PV7XXAXK.js.map → chunk-JBDFMYKQ.js.map} +0 -0
- /package/dist/{chunk-IZTU6RKH.js.map → chunk-JMGDHKQF.js.map} +0 -0
- /package/dist/{chunk-AHIIBDNH.js.map → chunk-K6LHRFBL.js.map} +0 -0
- /package/dist/{chunk-FN26SFGH.js.map → chunk-K7NTTA6P.js.map} +0 -0
- /package/dist/{chunk-MV2OEK3K.js.map → chunk-KG7TZKZG.js.map} +0 -0
- /package/dist/{chunk-5NKHCJU5.js.map → chunk-KJIMGIWO.js.map} +0 -0
- /package/dist/{chunk-ZB2K3FV7.js.map → chunk-KTFRCC5C.js.map} +0 -0
- /package/dist/{chunk-X6YRP5EC.js.map → chunk-KUJDV5QH.js.map} +0 -0
- /package/dist/{chunk-OKCQNMO6.js.map → chunk-L742JPKZ.js.map} +0 -0
- /package/dist/{chunk-P22XPNFW.js.map → chunk-L7CIOOBW.js.map} +0 -0
- /package/dist/{chunk-QOHGWFAW.js.map → chunk-LWBCUYZW.js.map} +0 -0
- /package/dist/{chunk-357ECVLE.js.map → chunk-MUM7IANK.js.map} +0 -0
- /package/dist/{chunk-JFSUYGNE.js.map → chunk-MVMXZYXT.js.map} +0 -0
- /package/dist/{chunk-3SWP2FYA.js.map → chunk-NA2NIJZI.js.map} +0 -0
- /package/dist/{chunk-MOQ6OGKS.js.map → chunk-NKHRDYOR.js.map} +0 -0
- /package/dist/{chunk-FKQCC4C5.js.map → chunk-NQKIUNW5.js.map} +0 -0
- /package/dist/{chunk-SWFIXQF5.js.map → chunk-PT43Y56J.js.map} +0 -0
- /package/dist/{chunk-MTTPHBIE.js.map → chunk-Q2PU57HC.js.map} +0 -0
- /package/dist/{chunk-FLRLZ4XZ.js.map → chunk-Q7HZX3IF.js.map} +0 -0
- /package/dist/{chunk-75WNTBZL.js.map → chunk-QIBVIOXO.js.map} +0 -0
- /package/dist/{chunk-KQIDBIZL.js.map → chunk-QIZPZMUI.js.map} +0 -0
- /package/dist/{chunk-KZTPL7NL.js.map → chunk-RMF67KCG.js.map} +0 -0
- /package/dist/{chunk-OEJ4R52I.js.map → chunk-RMS3NEA3.js.map} +0 -0
- /package/dist/{chunk-VTTDPGEK.js.map → chunk-RRNRNANG.js.map} +0 -0
- /package/dist/{chunk-XKA6UH5V.js.map → chunk-SFAWCTEM.js.map} +0 -0
- /package/dist/{chunk-FYT3DXPN.js.map → chunk-SKGMN35F.js.map} +0 -0
- /package/dist/{chunk-USKHHOIV.js.map → chunk-SL3JAAKN.js.map} +0 -0
- /package/dist/{chunk-JILOSL4O.js.map → chunk-SPYWXKJN.js.map} +0 -0
- /package/dist/{chunk-4RUFYGWG.js.map → chunk-SZJ3DLZA.js.map} +0 -0
- /package/dist/{chunk-O3SNM66K.js.map → chunk-TFR7DSOV.js.map} +0 -0
- /package/dist/{chunk-DIVY2CJZ.js.map → chunk-TRGTKX5E.js.map} +0 -0
- /package/dist/{chunk-JY4U6CYV.js.map → chunk-TUFM4UZP.js.map} +0 -0
- /package/dist/{chunk-DZPMKY3J.js.map → chunk-UGTBXF5U.js.map} +0 -0
- /package/dist/{chunk-THNJ3IKU.js.map → chunk-ULUMAZ5S.js.map} +0 -0
- /package/dist/{chunk-YHIAWECL.js.map → chunk-UXVWEX5L.js.map} +0 -0
- /package/dist/{chunk-IAHDSFFA.js.map → chunk-UXWB3FPF.js.map} +0 -0
- /package/dist/{chunk-GHADG5QZ.js.map → chunk-VTFVLCUH.js.map} +0 -0
- /package/dist/{chunk-U3RMWOXY.js.map → chunk-VXANTWBJ.js.map} +0 -0
- /package/dist/{chunk-5W5CEHLA.js.map → chunk-VXGSWL6L.js.map} +0 -0
- /package/dist/{chunk-7YVSWPZB.js.map → chunk-WEQEYLCS.js.map} +0 -0
- /package/dist/{chunk-TAJZ7GXO.js.map → chunk-X2DLENDQ.js.map} +0 -0
- /package/dist/{chunk-2E2LT37H.js.map → chunk-XLMEZIAJ.js.map} +0 -0
- /package/dist/{chunk-2MQ2D5OZ.js.map → chunk-XTXOCYOJ.js.map} +0 -0
- /package/dist/{chunk-CWFH36SI.js.map → chunk-YSRUYAVU.js.map} +0 -0
- /package/dist/{chunk-ZQGRZN5L.js.map → chunk-YYP7WSEB.js.map} +0 -0
- /package/dist/{chunk-4U52PMEL.js.map → chunk-ZN4FD4PE.js.map} +0 -0
- /package/dist/{chunk-AW4KTQA4.js.map → chunk-ZORTV6NH.js.map} +0 -0
- /package/dist/{chunk-H5GVPOB4.js.map → chunk-ZVO4QVPD.js.map} +0 -0
- /package/dist/{chunk-PZ5AY32C.js.map → collection-facade-4GRREZ6C.js.map} +0 -0
- /package/dist/{collection-facade-OPJ3EC4L.js.map → computed-VPOKQK4N.js.map} +0 -0
- /package/dist/{computed-HW6IG5UH.js.map → derive-6O5SWQKN.js.map} +0 -0
- /package/dist/{derive-AAIXSQIE.js.map → enclave-KJOTOH7X.js.map} +0 -0
- /package/dist/{enclave-OXZY3NOP.js.map → executor-5NIMLSKZ.js.map} +0 -0
- /package/dist/{executor-67NA4KPO.js.map → executor-AQVXV5GZ.js.map} +0 -0
- /package/dist/{executor-7JDP7UBK.js.map → executor-PUAO6AKJ.js.map} +0 -0
- /package/dist/{executor-CRH5OB4V.js.map → export-accessible-72EQNBMR.js.map} +0 -0
- /package/dist/{export-accessible-K4GJAU7U.js.map → extract-partition-PUYNU3UF.js.map} +0 -0
- /package/dist/{extract-partition-YJFL5OKK.js.map → find-2ABFCZX4.js.map} +0 -0
- /package/dist/{find-SVZHMEQI.js.map → issue-SIDORTSZ.js.map} +0 -0
- /package/dist/{issue-64N6OG7U.js.map → ledger-F33ZVMTK.js.map} +0 -0
- /package/dist/{ledger-ZAFULLAF.js.map → liberate-LCDPNAG2.js.map} +0 -0
- /package/dist/{liberate-XL6NSGOL.js.map → link-set-FKNWAYKS.js.map} +0 -0
- /package/dist/{link-set-LQI2IJX6.js.map → managed-secret-PQYKSR6T.js.map} +0 -0
- /package/dist/{managed-secret-7OH7HKXV.js.map → noydb-DUXZPKSN.js.map} +0 -0
- /package/dist/{noydb-SWUGPFBK.js.map → read-only-facade-BIGO37U3.js.map} +0 -0
- /package/dist/{read-only-facade-CHCKSEPD.js.map → register-I2DZXGAR.js.map} +0 -0
- /package/dist/{register-AYBQNTM3.js.map → registry-23WF3TGH.js.map} +0 -0
- /package/dist/{registry-CQWWOBO4.js.map → registry-4AYVUNXK.js.map} +0 -0
- /package/dist/{registry-JCZ4BNLV.js.map → registry-VSSQPIGF.js.map} +0 -0
- /package/dist/{registry-JFFENZ44.js.map → registry-YLEWMGAC.js.map} +0 -0
- /package/dist/{registry-ZA4HACYR.js.map → request-withdrawal-KFQHEZ25.js.map} +0 -0
- /package/dist/{request-withdrawal-7IKUIAEB.js.map → revoke-DQDZAZZM.js.map} +0 -0
- /package/dist/{revoke-PUJKRYJF.js.map → signer-WAMDZHEN.js.map} +0 -0
- /package/dist/{signer-5TA7FUC3.js.map → stale-DDL7WQEZ.js.map} +0 -0
- /package/dist/{stale-HZR7745Y.js.map → storage-FLR73HHF.js.map} +0 -0
- /package/dist/{storage-J2QHNJCB.js.map → ulid-4MKXG325.js.map} +0 -0
- /package/dist/{ulid-VQW6ERQN.js.map → vault-diff-C6WUJFNP.js.map} +0 -0
- /package/dist/{vault-diff-FE5J35NJ.js.map → walk-3UQBRMDV.js.map} +0 -0
- /package/dist/{walk-3PA4ZOKS.js.map → withdraw-accessible-EL5GXZBS.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/via/lookup/registry.ts","../src/via/lookup/snapshot.ts","../src/port/with/lookup-strategy.ts"],"sourcesContent":["/**\n * Pure dict-registry helpers — extracted from `kernel/vault.ts`'s dict\n * bodies (#650 Task 1 — via-lookup extraction, phase D).\n *\n * These take the vault-resident registry Maps (and a couple of vault-bound\n * callbacks) as ARGUMENTS instead of closing over `this` — no `Vault`\n * import here, so this module stays a plain, testable function library.\n * `kernel/vault.ts` keeps the registry Maps themselves (they're populated\n * by `vault.collection()` and read by the backup path) and calls these\n * helpers through the `port/with/lookup-strategy.ts` seam.\n */\n\nimport { getAtPath } from '../../kernel/paths.js'\nimport { UnknownDictCodeError, ValidationError } from '../../kernel/errors.js'\nimport type { JoinableSource } from '../../kernel/query/index.js'\nimport type { FieldRef, ViaGraph } from '../../kernel/via/graph.js'\nimport type { StaticDictDescriptor } from '../../port/with/i18n-strategy.js'\nimport { dictCollectionName, type LookupHandle } from './handle.js'\nimport type { LookupDescriptor, OnDelete } from './descriptor.js'\n\n/**\n * Validate staticDict codes on a `put()`. For each `staticDict()` field,\n * every stored code must be a declared key of the descriptor's table, else\n * `UnknownDictCodeError`. Opt out per descriptor with `{ validateCodes:\n * false }`. Supports scalar, dotted, and `[].`-wildcard field paths via\n * `getAtPath` (same path support as i18n validation).\n *\n * `staticFields` is the collection's `field → StaticDictDescriptor` map\n * (`Vault#staticDescriptorByField.get(collectionName)`) — `undefined`/empty\n * is a no-op.\n */\nexport function enforceStaticDictOnPut(\n staticFields: Record<string, StaticDictDescriptor> | undefined,\n record: unknown,\n): void {\n if (!staticFields || Object.keys(staticFields).length === 0) return\n if (!record || typeof record !== 'object') return\n\n const obj = record as Record<string, unknown>\n for (const [field, desc] of Object.entries(staticFields)) {\n if (desc.validateCodes === false) continue\n const known = new Set<string>(desc.keys)\n const values = getAtPath(obj, field)\n for (const value of values) {\n if (value === undefined || value === null) continue\n const codes = Array.isArray(value) ? value : [value]\n for (const code of codes) {\n if (typeof code !== 'string') continue\n if (!known.has(code)) {\n throw new UnknownDictCodeError(desc.name, field, code)\n }\n }\n }\n }\n}\n\n/**\n * Build a `JoinableSource` for a dictKey field, for use in dict joins.\n * Returns a source whose snapshot contains `{ key, labels, ...labels }`\n * records — one per dictionary entry — keyed by the stable key.\n *\n * staticDict: a code-table-backed source — snapshot() materialises the\n * in-memory table into rows, mirroring `LookupHandle.snapshotEntries()`.\n * Carries `displayLocale` so a locale-less `{ by: 'label' }` query has a\n * default locale to resolve at.\n *\n * Plain dictKey: the snapshot is built synchronously from the\n * `LookupHandle`'s write-through cache, which is populated on every\n * `put()`, `rename()`, `delete()`, and `list()` call. For pre-existing\n * data not yet touched this session, call `await vault.dictionary(name).list()`\n * first to warm the cache.\n *\n * Returns `null` when `field` is not a dictKey in `leftCollection`.\n */\nexport function resolveDictSource(\n leftCollection: string,\n field: string,\n staticDescriptorByField: ReadonlyMap<string, Record<string, StaticDictDescriptor>>,\n dictKeyFieldRegistry: ReadonlyMap<string, Record<string, string>>,\n getDictionaryHandle: (name: string) => LookupHandle,\n): JoinableSource | null {\n const staticFields = staticDescriptorByField.get(leftCollection)\n if (staticFields && field in staticFields) {\n const desc = staticFields[field]!\n const rows: readonly Record<string, unknown>[] = Object.entries(desc.table).map(\n ([key, labels]) => ({ key, labels, ...(labels as Record<string, string>) }),\n )\n const source: JoinableSource = {\n snapshot(): readonly unknown[] {\n return rows\n },\n lookupById(id: string): unknown {\n return rows.find((e) => e['key'] === id)\n },\n }\n if (desc.displayLocale !== undefined) {\n ;(source as { displayLocale?: string }).displayLocale = desc.displayLocale\n }\n return source\n }\n\n const dictFields = dictKeyFieldRegistry.get(leftCollection)\n if (!dictFields || !(field in dictFields)) return null\n const dictName = dictFields[field]\n if (!dictName) return null\n const handle = getDictionaryHandle(dictName)\n return {\n snapshot(): readonly unknown[] {\n return handle.snapshotEntries()\n },\n lookupById(id: string): unknown {\n const entries = handle.snapshotEntries()\n return entries.find((e) => e['key'] === id)\n },\n }\n}\n\n/** The minimal collection surface `updateReferencingRecords` needs. */\nexport interface DictReferencingCollection {\n list(): Promise<Record<string, unknown>[]>\n put(id: string, record: Record<string, unknown>): Promise<unknown>\n}\n\n/**\n * Find and rewrite records in every registered collection whose\n * dictKeyField points at `name`, replacing `oldKey` with `newKey`. Used by\n * `LookupHandle.rename()` (the only sanctioned mass-mutation path for\n * dictKey fields) via the vault's `findAndUpdateReferences` callback.\n *\n * `registry` is `Vault#dictKeyFieldRegistry` (collection name → field name\n * → dictionary name); `getCollection` is the vault's collection accessor —\n * rewrites go through the public `coll.put()` choke point, same as before.\n */\nexport async function updateReferencingRecords(\n registry: ReadonlyMap<string, Record<string, string>>,\n getCollection: (collectionName: string) => DictReferencingCollection,\n name: string,\n oldKey: string,\n newKey: string,\n): Promise<void> {\n for (const [collectionName, dictFields] of registry) {\n // Find fields that point at this dictionary\n const fields = Object.entries(dictFields)\n .filter(([, dn]) => dn === name)\n .map(([field]) => field)\n if (fields.length === 0) continue\n\n const coll = getCollection(collectionName)\n const records = await coll.list()\n for (const record of records) {\n let changed = false\n const updated = { ...record }\n for (const field of fields) {\n if (updated[field] === oldKey) {\n updated[field] = newKey\n changed = true\n }\n }\n if (changed) {\n const id = record['id'] as string | undefined\n if (id !== undefined) {\n await coll.put(id, updated)\n }\n }\n }\n }\n}\n\n/**\n * Resolve a label from an in-memory `{ locale -> label }` map, walking the\n * same fallback chain semantics as `LookupHandle.resolveLabel` (#650 Task 2\n * — moved here from `kernel/vault.ts` so the SAME chain serves both the\n * i18n binding's `dictLabelResolver` and the lookup binding's\n * `lookupLabelResolver`, which #650 Task 2 wires to the identical closure).\n */\nexport function resolveLabelFromMap(\n labels: Readonly<Record<string, string>>,\n locale: string,\n fallback?: string | readonly string[],\n): string | undefined {\n if (labels[locale] !== undefined) return labels[locale]\n const chain = Array.isArray(fallback)\n ? (fallback as readonly string[])\n : fallback\n ? [fallback as string]\n : []\n for (const fb of chain) {\n if (fb === 'any') {\n const any = Object.values(labels)[0]\n if (any !== undefined) return any\n } else if (labels[fb] !== undefined) {\n return labels[fb]\n }\n }\n return undefined\n}\n\n/**\n * Project a native `lookup(dimension, { backing:'static', table, … })`\n * descriptor into the legacy `StaticDictDescriptor` shape — the\n * alias-equivalence compat seam (#650 Task 2) that lets a native\n * static-tier lookup field reuse the SAME vault registries\n * (`staticByName`/`staticDescriptorByField`) — and therefore the same\n * `dictLabelResolver`/`resolveDictSource` machinery — as its `staticDict()`\n * alias. `vocabulary:'closed'` maps to `validateCodes:true` (closed = only\n * declared codes are legal); `'open'` maps to `validateCodes:false`.\n * Returns `undefined` for non-static or table-less (bare `enumOf`)\n * descriptors — those have nothing to register.\n */\nexport function lookupToStaticDictCompat(desc: LookupDescriptor): StaticDictDescriptor | undefined {\n if (desc.backing !== 'static' || desc.table === undefined) return undefined\n return {\n _noydbStaticDict: true,\n _viaBrand: 'i18n',\n name: desc.dimension,\n table: desc.table,\n keys: desc.keys ?? Object.keys(desc.table),\n ...(desc.displayLocale !== undefined ? { displayLocale: desc.displayLocale } : {}),\n ...(desc.onMissing !== undefined ? { onMissing: desc.onMissing } : {}),\n ...(desc.substitute !== undefined ? { substitute: desc.substitute } : {}),\n validateCodes: desc.vocabulary === 'closed',\n }\n}\n\n/** The vault-registry entries a collection's `lookupFields` contribute — the alias-equivalence bridge (#650 Task 2). */\nexport interface LookupDictCompat {\n /** Reserved-tier fields: field name -> dimension (dictionary) name — merges into `dictKeyFieldRegistry`. */\n readonly dictFieldMap: Record<string, string>\n /** Static-tier (table-bearing) fields, projected — merges into `staticDescriptorByField`/`staticByName`. */\n readonly staticEntries: ReadonlyArray<readonly [string, StaticDictDescriptor]>\n}\n\n/**\n * Bridge a collection's `lookupFields` into the SAME shape the legacy dict\n * registries expect, so `resolveDictSource`/`dictLabelResolver` (and\n * therefore `.join()`/`orderBy({by:'label'})`) serve a native `dict()`/\n * `lookup(static)` field identically to its `dictKey()`/`staticDict()`\n * alias — the reserved-vs-first-class-backing \"matrix\" tier is NOT bridged\n * here (no vault registry backs it; Task 5/6 build its own graph edge /\n * snapshot seam).\n */\nexport function collectLookupDictCompat(\n lookupFields: Record<string, LookupDescriptor> | undefined,\n): LookupDictCompat {\n const dictFieldMap: Record<string, string> = {}\n const staticEntries: Array<readonly [string, StaticDictDescriptor]> = []\n for (const [field, desc] of Object.entries(lookupFields ?? {})) {\n if (desc.backing === 'reserved') {\n dictFieldMap[field] = desc.dimension\n } else {\n const compat = lookupToStaticDictCompat(desc)\n if (compat) staticEntries.push([field, compat])\n }\n }\n return { dictFieldMap, staticEntries }\n}\n\n/**\n * Reserved-dict deps of a set of named collections (#653) — the `_dict_*`\n * collections partial sync must auto-include alongside a `collections`\n * filter, mirroring `SyncEngine`'s existing satellite-pair expansion.\n * One hop is provably complete: `vault.collection()` refuses `_dict_*`\n * names, so a dict can never itself declare lookup fields — no\n * dict-of-dict chain to recurse through.\n */\nexport function reservedDictDepsOf(\n names: readonly string[],\n dictKeyFieldRegistry: ReadonlyMap<string, Record<string, string>>,\n): readonly string[] {\n const out = new Set<string>()\n for (const name of names) {\n const fieldMap = dictKeyFieldRegistry.get(name)\n if (!fieldMap) continue\n for (const dictName of Object.values(fieldMap)) out.add(dictCollectionName(dictName))\n }\n return [...out]\n}\n\n/**\n * A lookup dimension's sync membership/altKey table, materialized from its\n * backing rows (#650 Task 3). `keys` is every canonical key present;\n * `altIndex` maps an altKey candidate VALUE to its owning canonical key.\n */\nexport interface MaterializedBacking {\n /** Canonical key values present in the materialized rows. */\n readonly keys: ReadonlySet<string>\n /** altKey candidate value -> canonical key. */\n readonly altIndex: ReadonlyMap<string, string>\n}\n\n/**\n * Build a lookup dimension's altKey index from its backing rows, enforcing\n * declare/warm-time uniqueness across `key ∪ altKeys` values (#650 Task 3 —\n * the CHE/SWZ drift class: two different rows must never claim the same\n * candidate key). `rows` is keyed by canonical key (`row[descriptor.key]`\n * for the matrix tier; the dimension's own key for static/reserved).\n * An altKey candidate VALUE may be a string or number — both normalize via\n * `coerceLookupKey` (#651 Task 3); non-scalar/absent values are skipped.\n * Pure — no I/O. Throws `ValidationError` on collision.\n */\nexport function materializeBackingTable(\n descriptor: LookupDescriptor,\n rows: ReadonlyMap<string, Record<string, unknown>>,\n): MaterializedBacking {\n const keys = new Set<string>(rows.keys())\n // Every value that has claimed ownership so far (canonical keys seed it) —\n // the union `key ∪ altKeys` uniqueness set the spec requires.\n const owner = new Map<string, string>()\n for (const key of keys) owner.set(key, key)\n\n const altIndex = new Map<string, string>()\n const altFields = descriptor.altKeys ?? []\n for (const [canonicalKey, row] of rows) {\n for (const altField of altFields) {\n const value = coerceLookupKey(row[altField])\n if (value === undefined || value === '') continue\n const existingOwner = owner.get(value)\n if (existingOwner !== undefined && existingOwner !== canonicalKey) {\n throw new ValidationError(\n `lookup \"${descriptor.dimension}\": altKey field \"${altField}\" value \"${value}\" is claimed by ` +\n `both \"${existingOwner}\" and \"${canonicalKey}\" — key/altKey values must be unique across the dimension.`,\n )\n }\n owner.set(value, canonicalKey)\n altIndex.set(value, canonicalKey)\n }\n }\n return { keys, altIndex }\n}\n\n/**\n * Closed-vocabulary membership test for one candidate key (#650 Task 3).\n * Static tier: sync, against the in-config key set (declared `keys`, or the\n * table's own keys when table-bearing). Reserved tier: sync — the declared\n * `keys` union the reserved handle's live write-through snapshot (closes\n * #649 for the native `dict()` spelling: the declared-keys promise the old\n * `dictKey()` doc comment made falsely). Matrix (collection) tier: sync —\n * delegates to `buildLookupAltIndex` so membership is checked against the\n * SAME `row[descriptor.key]` keying the altKey index uses (review fix,\n * Important 1: an earlier PUT-id `.get(key)` scan disagreed with the\n * altIndex whenever `descriptor.key !== 'id'`, wrongly rejecting valid\n * non-id candidates and wrongly accepting an unrelated row's PUT-id).\n */\nexport function checkLookupMembership(\n descriptor: LookupDescriptor,\n key: string,\n getDictionary: (dimension: string) => LookupHandle,\n getCollection: (dimension: string) => { querySourceForJoin(): JoinableSource },\n): boolean {\n if (descriptor.backing === 'static') {\n const known = descriptor.keys ?? (descriptor.table ? Object.keys(descriptor.table) : [])\n return known.includes(key)\n }\n if (descriptor.backing === 'reserved') {\n if ((descriptor.keys ?? []).includes(key)) return true\n return getDictionary(descriptor.dimension).snapshotEntries().some((e) => e['key'] === key)\n }\n return buildLookupAltIndex(descriptor, getDictionary, getCollection).keys.has(key)\n}\n\n/**\n * The ONE guarded key coercion (#651 Task 3, dm12) — string/number values\n * coerce to their canonical `String()` form; everything else (`null`,\n * `undefined`, objects, …) coerces to `undefined`. Every consumer that turns\n * a raw record field into a lookup key routes through this, closing the\n * bare-`String()` `\"undefined\"`/`\"null\"`-key poisoning class (seam map\n * finding 6): a row whose key field is genuinely absent must never mint the\n * literal candidate string `\"undefined\"`.\n */\nexport function coerceLookupKey(raw: unknown): string | undefined {\n return typeof raw === 'string' || typeof raw === 'number' ? String(raw) : undefined\n}\n\n/**\n * Resolve a backing row's canonical key VALUE — `coerceLookupKey(row[descriptor.key])`\n * (#651 Task 3). The matrix tier's `row[descriptor.key]`, never the row's own PUT-id\n * when the two differ (`descriptor.key !== 'id'`).\n */\nexport function resolveBackingRowKey(\n descriptor: LookupDescriptor,\n row: Record<string, unknown>,\n): string | undefined {\n return coerceLookupKey(row[descriptor.key])\n}\n\n/**\n * The referencing-side match predicate — does `rec[field]` (coerced) equal an\n * already-coerced `compareKey` (#651 Task 3)? Shared by every site that scans a\n * referencing collection for rows pointing at a given backing key\n * (`with-shape/links/vault-facade.ts`'s ref-delete propagation, `kernel/via/dispatch.ts`'s\n * forget-fanout twin).\n */\nexport function matchesReferencingValue(\n rec: Record<string, unknown>,\n field: string,\n compareKey: string,\n): boolean {\n return coerceLookupKey(rec[field]) === compareKey\n}\n\n/**\n * Materialize a lookup dimension's altKey index from whatever backing data\n * is synchronously available (#650 Task 3 — the `ingest` source). Static:\n * the in-config table. Reserved: the reserved handle's live write-through\n * cache (the same warm-via-put()/list() cache `resolveDictSource` already\n * relies on). Matrix (collection): the backing collection's own in-memory\n * eager cache via `querySourceForJoin()` — already public, already the\n * mechanism `.join()` uses (`with-shape/links/vault-facade.ts`'s\n * `resolveSource`); no new I/O, no fire-and-forget warm step. Like that\n * existing join precedent, a dimension collection this vault session has\n * not yet opened/populated sees an empty snapshot (no altKey normalization\n * until it has rows) — open/populate it first for normalization to apply.\n * A matrix row whose `descriptor.key` field coerces to `undefined` (missing/\n * non-scalar) is SKIPPED — never enters the index under a poisoned\n * `\"undefined\"` key (#651 Task 3, dm12).\n */\nexport function buildLookupAltIndex(\n descriptor: LookupDescriptor,\n getDictionary: (dimension: string) => LookupHandle,\n getCollection: (dimension: string) => { querySourceForJoin(): JoinableSource },\n): MaterializedBacking {\n if (descriptor.backing === 'static') {\n return materializeBackingTable(descriptor, new Map(Object.entries(descriptor.table ?? {})))\n }\n if (descriptor.backing === 'reserved') {\n const entries = getDictionary(descriptor.dimension).snapshotEntries()\n return materializeBackingTable(descriptor, new Map(entries.map((e) => [String(e['key']), e])))\n }\n const rows = getCollection(descriptor.dimension).querySourceForJoin().snapshot()\n const keyed = new Map<string, Record<string, unknown>>()\n for (const r of rows) {\n const row = r as Record<string, unknown>\n const key = resolveBackingRowKey(descriptor, row)\n if (key !== undefined) keyed.set(key, row)\n }\n return materializeBackingTable(descriptor, keyed)\n}\n\n/** One cross-collection `'ref'` graph edge a lookup field declares (#650 Task 5). Module-private —\n * only `registerLookupRefEdges` below (the exported entry point) consumes it. */\ninterface LookupRefEdge {\n readonly referencing: FieldRef\n readonly sources: readonly FieldRef[]\n readonly onDelete: OnDelete\n /** The backing dimension's canonical-key FIELD NAME on its own row (`desc.key` — matrix tier\n * only varies this; reserved/static tiers are always `'id'`). A referencing field always\n * stores THIS field's value, never the backing row's PUT-id when the two differ. */\n readonly keyField: string\n}\n\n/**\n * Compute the cross-collection `'ref'` edges a collection's `lookupFields` declare (#650 Task 5,\n * spec §4) — one edge per non-static-backing field: target = the referencing field; sources =\n * the backing dimension's whole-collection node (`field:'*'`, the wildcard key\n * `ViaGraph.referencingEdgesOf` does its O(1) reverse lookup against) PLUS, when the descriptor\n * names a presentation field (`present.label`), that SPECIFIC field too. `foldPosture`'s\n * `DEFAULT_POSTURE` is the fold's identity element, so adding the wildcard alongside a real field\n * source changes nothing when that field is plain — but folds in a classified/money posture when\n * it isn't (taint composition, spec §4: \"a lookup edge whose source names a classified field\n * contributes that field's posture\"). Static tier (`backing:'static'`) has no backing collection/\n * dimension rows to reference-check — excluded. Pure; consumed only by `registerLookupRefEdges` below.\n */\nfunction collectLookupRefEdges(\n collectionName: string,\n lookupFields: Record<string, LookupDescriptor> | undefined,\n): readonly LookupRefEdge[] {\n const edges: LookupRefEdge[] = []\n for (const [field, desc] of Object.entries(lookupFields ?? {})) {\n if (desc.backing === 'static') continue\n const backing = desc.backing === 'reserved' ? dictCollectionName(desc.dimension) : desc.dimension\n edges.push({\n referencing: { collection: collectionName, field },\n sources: [\n { collection: backing, field: '*' },\n ...(desc.present?.label !== undefined ? [{ collection: backing, field: desc.present.label }] : []),\n ],\n onDelete: desc.onDelete,\n keyField: desc.key,\n })\n }\n return edges\n}\n\n/** Thin wrapper — `collectLookupRefEdges` + one `graph.registerDerived` call per edge. Lets\n * `vault.collection()` (kernel-surface-budgeted, #650 Task 5) register a collection's lookup-ref\n * edges with a single line, keeping the ceiling-guarded call site a thin call (route logic here). */\nexport function registerLookupRefEdges(\n graph: ViaGraph,\n collectionName: string,\n lookupFields: Record<string, LookupDescriptor> | undefined,\n): void {\n for (const e of collectLookupRefEdges(collectionName, lookupFields)) {\n graph.registerDerived(e.referencing, e.sources, 'ref', 'record', e.onDelete, e.keyField)\n }\n}\n\n/**\n * `LookupViaConfig.snapshotFor`'s vault-built row source (#650 Task 6, spec\n * §5; matrix-tier coverage added #650 Task 7, spec §6 — Task 6 deferred it,\n * see `task-6-report.md`'s Concerns #1; the reviewer's Task-7 dispatch\n * refuted the \"needs a new vault-resident registry\" premise: the descriptor\n * is already in hand at both call sites, so `snapshotFor` just needs to\n * ACCEPT it). Takes the full `descriptor` (not a bare dimension name) so it\n * can route the matrix tier's `key` field, which — unlike reserved tier's\n * hardcoded `'id'` — varies per collection. Routes on `descriptor.backing`:\n *\n * - **reserved**: rows come straight from the SAME `LookupHandle.\n * snapshotEntries()` write-through cache `dictLabelResolver`/\n * `resolveDictSource` already read (no second copy), keyed by each\n * entry's own canonical `key` (always `'id'` by construction for this\n * tier — `dict()`'s factory hardcodes it).\n * - **collection** (matrix): rows come from `getCollection(dimension).\n * querySourceForJoin().snapshot()` — the SAME sync, already-live cache\n * `buildLookupAltIndex`'s matrix branch (above, this file) and `.join()`\n * itself already read — re-keyed via `resolveBackingRowKey(descriptor, row)`,\n * NOT the row's own PUT-id (which may differ when `key !== 'id'`; the exact\n * distinction the #650 Task 3 review fix already applies to\n * `checkLookupMembership`'s matrix branch). A row whose `descriptor.key`\n * field coerces to `undefined` is skipped (#651 Task 3, dm12).\n * - **static**: never routed here — `descriptor.table` is read directly by\n * the caller (`binding.ts`'s `compareLookupOrder`/`resolveLookupOrderLabel`,\n * `snapshot.ts`'s `presentLookupForJoin`); no vault call needed.\n *\n * `isReservedDimension` is the vault's `reservedLookupCollections`\n * membership test.\n */\nexport function buildLookupSnapshotRows(\n descriptor: LookupDescriptor,\n isReservedDimension: (dimension: string) => boolean,\n getDictionary: (dimension: string) => LookupHandle,\n getCollection: (dimension: string) => { querySourceForJoin(): JoinableSource },\n): ReadonlyMap<string, Record<string, unknown>> | undefined {\n const dimension = descriptor.dimension\n if (isReservedDimension(dimension)) {\n const rows = new Map<string, Record<string, unknown>>()\n for (const entry of getDictionary(dimension).snapshotEntries()) {\n const key = entry['key']\n if (typeof key === 'string') rows.set(key, entry)\n }\n return rows\n }\n if (descriptor.backing === 'collection') {\n const rawRows = getCollection(dimension).querySourceForJoin().snapshot()\n const rows = new Map<string, Record<string, unknown>>()\n for (const r of rawRows) {\n const row = r as Record<string, unknown>\n const key = resolveBackingRowKey(descriptor, row)\n if (key !== undefined) rows.set(key, row)\n }\n return rows\n }\n return undefined\n}\n","/**\n * The sync lookup snapshot + join/locale seam (#650 Task 6, spec §5 — \"the\n * snapshot+locale seam\"). Retires the #626 kernel→via grandfather:\n * `kernel/query/join.ts` no longer imports `via/i18n/core.js` directly\n * — it calls the `presentForJoin` hook this file's `buildPresentForJoin`\n * builds instead (seam map Part 2 item 4, the #626 reviewer-spec'd shape:\n * a sync `presentI18nForJoin`-class hook on `JoinableSource`).\n *\n * `LookupSnapshot` is the sync materialized `key -> row` view over ONE\n * lookup dimension's ALREADY-LIVE backing data (the `active.ts`\n * `_syncCache`/`snapshotEntries` write-through-cache pattern — never a\n * second copy of the data: `LookupViaConfig.snapshotFor`'s vault-built\n * closure reads the SAME `LookupHandle._syncCache` /\n * first-class-collection cache every other lookup consumer\n * (`dictLabelResolver`, `resolveDictSource`, `getAltIndex`) already reads).\n * Serves (reserved AND matrix tier since #650 Task 7 — `registry.ts`'s\n * `buildLookupSnapshotRows` routes both; static tier is read straight off\n * `descriptor.table` by every consumer below, never through this cache):\n * - join dressing (`presentForJoin`, consumed by `kernel/query/join.ts`\n * via `JoinableSource.presentForJoin`)\n * - dimension sort (`compareForOrder`, consumed by\n * `via/lookup/binding.ts`'s `NoydbVia.compareForOrder` closure)\n * - per-call-locale order-label resolution (`resolveOrderLabel`, #650\n * Task 7 — the `orderBy(..., {by:'label'})` channel `compareForOrder`\n * structurally can't serve, no locale param; consumed by\n * `kernel/query/builder.ts`'s `buildOrderLabelMaps`)\n * - membership: reserved/static-tier membership (#650 Task 3,\n * `checkLookupMembership`) already reads the identical sync caches\n * directly — not re-plumbed through this file; see\n * `.superpowers/sdd/task-6-report.md`'s \"bridge disposition\" section.\n *\n * Sync end-to-end (#553) — every function here is a pure, synchronous\n * transform over already-materialized rows; no store read, no Promise.\n */\nimport type { LookupDescriptor } from './descriptor.js'\nimport { presentI18nForJoin, type I18nTextDescriptor } from '../i18n/core.js'\n\n/** A lookup dimension's sync materialized view — see file header. */\nexport interface LookupSnapshot {\n /** The full backing row for `key`, or `undefined` when `key` isn't (yet) present in the snapshot. */\n row(key: string): Record<string, unknown> | undefined\n /** The dimension's declared presentation label for `key` at `locale` — mirrors `binding.ts`'s `fetchLookupLabel` (matrix-row branch), generalized to any tier's already-materialized rows. */\n label(key: string, locale: string, fallback?: unknown): string | undefined\n /**\n * Exact ordering for two canonical keys against `descriptor.sortBy`\n * (falls back to `present.label`, then to the raw keys) at `locale`.\n * Never throws — degrades to comparing the raw keys when no sortable\n * value resolves for either side.\n */\n compareKeys(a: string, b: string, locale: string): number\n}\n\n/** Read one row field, resolving a `by`-keyed (locale-map) value when `by` is declared. */\nfunction readRowField(\n row: Record<string, unknown> | undefined,\n field: string | undefined,\n by: string | undefined,\n locale: string,\n fallback?: unknown,\n): string | undefined {\n if (!row || field === undefined) return undefined\n const raw = row[field]\n if (by === undefined) return typeof raw === 'string' ? raw : undefined\n if (!raw || typeof raw !== 'object') return undefined\n const map = raw as Record<string, unknown>\n const val = map[locale]\n if (typeof val === 'string') return val\n if (typeof fallback === 'string' && typeof map[fallback] === 'string') return map[fallback]\n return undefined\n}\n\n/**\n * Build a sync `LookupSnapshot` over one dimension's already-materialized\n * rows (canonical-key -> row, the SAME keying `materializeBackingTable`\n * (`registry.ts`, #650 Task 3) uses). Pure — never reads a store.\n */\nexport function buildLookupSnapshot(\n dimension: string,\n rows: ReadonlyMap<string, Record<string, unknown>>,\n descriptor: LookupDescriptor,\n): LookupSnapshot {\n void dimension // identity only — kept for parity with materializeBackingTable/buildLookupAltIndex's signature and future diagnostics\n return {\n row: (key) => rows.get(key),\n label: (key, locale, fallback) =>\n readRowField(rows.get(key), descriptor.present?.label, descriptor.present?.by, locale, fallback),\n compareKeys: (a, b, locale) => {\n const sortField = descriptor.sortBy ?? descriptor.present?.label\n const av = readRowField(rows.get(a), sortField, descriptor.present?.by, locale) ?? a\n const bv = readRowField(rows.get(b), sortField, descriptor.present?.by, locale) ?? b\n return av < bv ? -1 : av > bv ? 1 : 0\n },\n }\n}\n\n/**\n * The lookup-label HALF of `presentForJoin` (#626 retirement, spec §5;\n * matrix-tier coverage added #650 Task 7) — resolves `<field>Label` for\n * every declared lookup field with a `present` dressing dimension, sync,\n * from `getSnapshotRows` (the vault-built `LookupViaConfig.snapshotFor`\n * closure — now descriptor-routed, see `registry.ts`'s\n * `buildLookupSnapshotRows`; static tier reads its own in-config `table`\n * directly, no vault call — never `undefined` for a declared static table).\n * Mirrors `binding.ts`'s `runLookupPresent` (the async `present()` hook)\n * minus the array/`[].`-wildcard handling that hook needs for full-record\n * reads — join dressing only ever sees the joined RIGHT-side record's\n * scalar fields, so that complexity doesn't apply here.\n */\nfunction presentLookupForJoin(\n record: Record<string, unknown>,\n locale: string,\n lookupFields: Record<string, LookupDescriptor>,\n getSnapshotRows: (descriptor: LookupDescriptor) => ReadonlyMap<string, Record<string, unknown>> | undefined,\n): Record<string, unknown> {\n let result = record\n for (const [field, desc] of Object.entries(lookupFields)) {\n if (desc.present === undefined) continue\n const raw = record[field]\n if (typeof raw !== 'string') continue\n const rows = desc.backing === 'static'\n ? (desc.table ? new Map(Object.entries(desc.table)) : undefined)\n : getSnapshotRows(desc)\n if (!rows) continue\n const label = buildLookupSnapshot(desc.dimension, rows, desc).label(raw, locale)\n if (label === undefined) continue\n if (result === record) result = { ...record }\n result[`${field}Label`] = label\n }\n return result\n}\n\n/**\n * Build the combined sync `presentForJoin(record, locale)` hook a\n * `Collection` attaches to the `JoinableSource` it exposes\n * (`querySourceForJoin()`) — the i18n-text half (`presentI18nForJoin`, the\n * exact `applyI18nLocale(..., 'join')` partial application\n * `kernel/query/join.ts` used to call directly, #626) composed with the\n * lookup-label half above. `undefined` when the collection declares\n * neither — `JoinableSource.presentForJoin` then stays unset, matching\n * today's `i18nFields`-absent behavior exactly (#626 parity lock).\n */\nexport function buildPresentForJoin(\n i18nFields: Record<string, I18nTextDescriptor> | undefined,\n lookupFields: Record<string, LookupDescriptor> | undefined,\n getSnapshotRows: ((descriptor: LookupDescriptor) => ReadonlyMap<string, Record<string, unknown>> | undefined) | undefined,\n): ((record: unknown, locale: string) => unknown) | undefined {\n const hasI18n = i18nFields !== undefined && Object.keys(i18nFields).length > 0\n const hasLookup = lookupFields !== undefined && Object.keys(lookupFields).length > 0\n if (!hasI18n && !hasLookup) return undefined\n const resolveRows = getSnapshotRows ?? (() => undefined)\n return (record, locale) => {\n if (record === null || typeof record !== 'object') return record\n let result = record as Record<string, unknown>\n if (hasI18n) result = presentI18nForJoin(result, i18nFields, locale)\n if (hasLookup) result = presentLookupForJoin(result, locale, lookupFields, resolveRows)\n return result\n }\n}\n","/**\n * Lookup strategy seam (#650 Task 1 — via-lookup extraction, phase D of the\n * Via port; precedent: `port/with/i18n-strategy.ts`). Lives on the `/with`\n * port (the one seam the kernel spine may import statically) so `Vault` can\n * reach the dict-registry pure helpers and the `LookupHandle`/`NO_LOOKUP`\n * types without a spine→`via/` static import (Check 14 via-layering bans\n * that; `port/with/` is always allowed, Check 9's sanctioned exception).\n *\n * `kernel/vault.ts` imports ONLY this module for lookup — never\n * `via/lookup/*` directly.\n *\n * This task (#650 Task 1) is a pure move: `Vault.dictionary()` still\n * constructs its handle through `i18nStrategy.buildDictionaryHandle`\n * (`port/with/i18n-strategy.ts`), which now internally delegates to\n * `withLookup().buildLookupHandle` (same handle, new home). `LookupStrategy`\n * / `NO_LOOKUP` / `isLookupCollectionName` here are the seam later phase-D\n * tasks bind `vault.collection()`'s lookup fields onto — unused by Task 1's\n * wiring, but their exact shapes are frozen now so later tasks don't\n * re-litigate them.\n */\n\nimport type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\nimport type { LedgerStore } from '../../with-commit/history/ledger/store.js'\nimport type { UnlockedKeyring } from '../../with-party/team/keyring.js'\nimport type { NoydbEventEmitter } from '../../kernel/events.js'\nimport type { ViaCryptoCtx } from '../../kernel/via/index.js'\nimport type { LookupHandle, DictionaryOptions } from '../../via/lookup/handle.js'\nimport {\n enforceStaticDictOnPut,\n resolveDictSource,\n updateReferencingRecords,\n resolveLabelFromMap,\n collectLookupDictCompat,\n lookupToStaticDictCompat,\n reservedDictDepsOf,\n materializeBackingTable,\n checkLookupMembership,\n buildLookupAltIndex,\n registerLookupRefEdges,\n buildLookupSnapshotRows,\n coerceLookupKey,\n resolveBackingRowKey,\n matchesReferencingValue,\n type DictReferencingCollection,\n type LookupDictCompat,\n type MaterializedBacking,\n} from '../../via/lookup/registry.js'\nimport { buildPresentForJoin } from '../../via/lookup/snapshot.js'\nimport type { LookupDescriptor } from '../../via/lookup/descriptor.js'\n\n/**\n * Backing options for `LookupStrategy.buildLookupHandle` — same shape as\n * `DictionaryOptions` (kept as a distinct alias since the \"lookup\" name is\n * the forward-looking one; `DictionaryOptions` stays the dict-tier name).\n */\nexport type LookupBackingOptions = DictionaryOptions\n\n/**\n * Options accepted by `LookupStrategy.buildLookupHandle`. Mirrors the\n * `LookupHandle` constructor verbatim, plus the two choke-point\n * participation hooks (`onDirty`/`onRecordMutated`) #647 (Task 4) wires —\n * both `undefined` in this task (pure move, no new call sites).\n */\nexport interface BuildLookupHandleOptions<Keys extends string = string> {\n readonly adapter: NoydbStore\n readonly compartmentName: string\n readonly dimensionName: string\n readonly keyring: UnlockedKeyring\n /**\n * The `reservedEnvelopes('_dict_')` capability (#629 Task 4) — the\n * handle's sanctioned crypto door onto its `_dict_<name>` collection.\n * Bound by the Vault to its own `getDEK`, the same per-collection-name\n * DEK resolver every other collection uses.\n */\n readonly reservedEnvelopes: ReturnType<ViaCryptoCtx['reservedEnvelopes']>\n readonly encrypted: boolean\n readonly ledger: LedgerStore | undefined\n readonly options: LookupBackingOptions\n readonly findAndUpdateReferences:\n | ((dimension: string, oldKey: string, newKey: string) => Promise<void>)\n | undefined\n readonly emitter: NoydbEventEmitter\n /**\n * #647 fix wave 1 — mints a version-ordered delete-marker envelope. Bound by the Vault to the\n * real `kernel/enclave` `buildDeleteMarker` function — `LookupHandle` (`via/lookup/**`)\n * may not import `kernel/enclave/` itself (Check 11/15), so this capability is injected the\n * same way `reservedEnvelopes` above is.\n */\n readonly buildDeleteMarker: (identity: { collection: string; id: string }, version: number, actor: string) => EncryptedEnvelope\n /** #650 Task 4 (#647) — choke-point participation hooks. */\n readonly onDirty?: ((collection: string, id: string, action: 'put' | 'delete', version: number) => Promise<void>) | undefined\n readonly onRecordMutated?: ((collection: string, id: string, action: 'put' | 'delete', version: number) => Promise<void>) | undefined\n /**\n * #650 Task 5 (#648) — the real reference check `LookupHandle.delete()`'s strict branch calls:\n * restrict throws `DictKeyInUseError` naming the referencing collection, cascade/nullify apply\n * their propagation. Bound by the Vault (never a `Collection`/keyring/DEK reach-around); a\n * no-op when the dimension has no declared lookup-referencing edges (today's dangling behavior\n * for undeclared refs is unaffected). Return value is discarded by the handle — callers who\n * need cascade/nullify counts (forget) go through `VaultLinks` directly.\n */\n readonly checkReferencesOnDelete?: ((key: string) => Promise<unknown>) | undefined\n /**\n * Used by the active strategy to satisfy the generic-key parameter on the\n * returned handle. The NO_LOOKUP stub never reads it. Mirrors\n * `BuildDictionaryHandleOptions._keyMarker` (`port/with/i18n-strategy.ts`).\n */\n // marker generic — runtime sees no value\n _keyMarker?: Keys\n}\n\nexport interface LookupStrategy {\n /**\n * Construct a typed `LookupHandle` for the named dimension. Throws under\n * `NO_LOOKUP`.\n */\n buildLookupHandle<Keys extends string = string>(\n opts: BuildLookupHandleOptions<Keys>,\n ): LookupHandle<Keys>\n}\n\nfunction notEnabled(op: string): Error {\n return new Error(\n `${op}: the NO_LOOKUP stub was reached, which should be unreachable today — there is no ` +\n '`lookupStrategy` `createNoydb({ ... })` option yet to select this stub over the real one; ' +\n '`vault.dictionary()` always resolves through `withLookup()` (see `via/i18n/active.ts`\\'s ' +\n 'delegation). This is forward scaffolding for a later task (mirrors `NO_I18N`\\'s shape) — if you ' +\n 'hit this, it indicates a bug, not a missing opt-in.',\n )\n}\n\n/**\n * No-lookup stub. Mirrors `NO_I18N.buildDictionaryHandle`'s shape, but unlike `NO_I18N` (wired as\n * `vault.ts`'s `opts.i18nStrategy ?? NO_I18N` default), nothing selects this stub today — there is\n * no `lookupStrategy` option on `createNoydb()`; `vault.dictionary()`'s only construction path\n * (`Vault.i18nStrategy.buildDictionaryHandle` → `withLookup().buildLookupHandle`) never reaches\n * here. Kept as forward scaffolding for a later task that wires an independent lookup opt-in.\n */\nexport const NO_LOOKUP: LookupStrategy = {\n buildLookupHandle() {\n throw notEnabled('vault.dictionary()')\n },\n}\n\n/** `_dict_*` (legacy dict tier) and `_lookup_*` (the phase-D reserved backing). */\nexport const LOOKUP_COLLECTION_PREFIXES = ['_dict_', '_lookup_'] as const\n\n/** Return true when a collection name is a reserved lookup-backing collection. */\nexport function isLookupCollectionName(name: string): boolean {\n return LOOKUP_COLLECTION_PREFIXES.some((prefix) => name.startsWith(prefix))\n}\n\n// Re-exported pure registry helpers (#650 Task 1) — `kernel/vault.ts`'s\n// thin delegators call these directly; small always-on functions, not\n// behind the tree-shake seam (same bundling class as `isLookupCollectionName`\n// above, just too large to duplicate inline like that one is).\nexport { enforceStaticDictOnPut, resolveDictSource, updateReferencingRecords }\nexport type { DictReferencingCollection }\n\n// #650 Task 4 (#647) — the reserved-collection naming helper `vault.ts`'s sync-registry\n// bookkeeping needs (mapping a declared dimension name to its `_dict_<name>` collection name).\nexport { dictCollectionName } from '../../via/lookup/handle.js'\n\n// #650 Task 2 — the alias-equivalence bridge (`resolveLabelFromMap` +\n// `collectLookupDictCompat`/`lookupToStaticDictCompat`) + the runtime\n// brand/shape predicates `via/compose.ts` needs to route `'lookup'`-branded\n// descriptors, mirroring `isI18nTextDescriptor`/`isDictKeyDescriptor` below.\nexport { resolveLabelFromMap, collectLookupDictCompat, lookupToStaticDictCompat }\nexport type { LookupDictCompat }\n\n// #653 — partial-sync reserved-dict expansion: maps a set of named collections to the\n// one-hop `_dict_*` deps their lookup fields reference, off `dictKeyFieldRegistry`.\nexport { reservedDictDepsOf }\n\n// #650 Task 3 — altKeys ingest normalization + open/closed vocabulary\n// governance: the declare/warm-time altIndex builder + the membership test\n// vault.ts's `membership`/`getAltIndex` closures delegate to.\nexport { materializeBackingTable, checkLookupMembership, buildLookupAltIndex }\nexport type { MaterializedBacking }\n\n// #650 Task 5 — registers a collection's lookup-fields' cross-collection 'ref' graph edges.\nexport { registerLookupRefEdges }\n\n// #650 Task 6 — the sync snapshot+locale seam (#626 retirement, spec §5):\n// `snapshotFor`'s vault-built row source + the combined presentForJoin\n// builder `kernel/collection-config.ts` calls to build the\n// `JoinableSource.presentForJoin` hook `kernel/query/join.ts` consumes.\nexport { buildLookupSnapshotRows, buildPresentForJoin }\nexport type { LookupSnapshot } from '../../via/lookup/snapshot.js'\n\n// #651 Task 3 — the ONE descriptor-keyed key-resolution core (guarded coercion +\n// backing-row-key resolve + referencing-value match) — every consumer (vault.ts,\n// with-shape/links/vault-facade.ts, kernel/via/dispatch.ts) routes through here,\n// never a bare `String()`, ending the dm12 dialect drift.\nexport { coerceLookupKey, resolveBackingRowKey, matchesReferencingValue }\n\n/** Runtime predicate for detecting a `LookupDescriptor` (any of the three tiers). */\nexport function isLookupDescriptor(x: unknown): x is LookupDescriptor {\n return (\n typeof x === 'object' &&\n x !== null &&\n (x as { _viaBrand?: unknown })._viaBrand === 'lookup'\n )\n}\n\n/** Runtime predicate for the bare enum tier (`backing:'static'`, no in-code `table` — no label source). */\nexport function isEnumDescriptor(x: unknown): x is LookupDescriptor {\n return isLookupDescriptor(x) && x.backing === 'static' && x.table === undefined\n}\n\n/**\n * Type-only re-exports — the kernel spine imports these descriptor/handle\n * types through the port instead of reaching into `via/lookup/*` or\n * `via/i18n/*` directly. `isolatedModules: true` erases these at\n * build time — no runtime coupling.\n */\nexport type { LookupHandle, DictEntry, DictionaryOptions } from '../../via/lookup/handle.js'\nexport type { LookupDescriptor, Vocabulary, LookupBacking, OnDelete } from '../../via/lookup/descriptor.js'\nexport type { LookupViaConfig } from '../../via/lookup/binding.js'\nexport type { DictKeyDescriptor, StaticDictDescriptor } from '../../via/i18n/dictionary.js'\n"],"mappings":";;;;;;;;;;;;;AA+BO,SAAS,uBACd,cACA,QACM;AACN,MAAI,CAAC,gBAAgB,OAAO,KAAK,YAAY,EAAE,WAAW,EAAG;AAC7D,MAAI,CAAC,UAAU,OAAO,WAAW,SAAU;AAE3C,QAAM,MAAM;AACZ,aAAW,CAAC,OAAO,IAAI,KAAK,OAAO,QAAQ,YAAY,GAAG;AACxD,QAAI,KAAK,kBAAkB,MAAO;AAClC,UAAM,QAAQ,IAAI,IAAY,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,OAAO,KAAK,UAAU,EAAE,SAAS;AAC7E,QAAM,YAAY,iBAAiB,UAAa,OAAO,KAAK,YAAY,EAAE,SAAS;AACnF,MAAI,CAAC,WAAW,CAAC,UAAW,QAAO;AACnC,QAAM,cAAc,oBAAoB,MAAM;AAC9C,SAAO,CAAC,QAAQ,WAAW;AACzB,QAAI,WAAW,QAAQ,OAAO,WAAW,SAAU,QAAO;AAC1D,QAAI,SAAS;AACb,QAAI,QAAS,UAAS,mBAAmB,QAAQ,YAAY,MAAM;AACnE,QAAI,UAAW,UAAS,qBAAqB,QAAQ,QAAQ,cAAc,WAAW;AACtF,WAAO;AAAA,EACT;AACF;;;ACuCO,SAAS,mBAAmB,GAAmC;AACpE,SACE,OAAO,MAAM,YACb,MAAM,QACL,EAA8B,cAAc;AAEjD;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dekKey
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JMGDHKQF.js";
|
|
4
4
|
import {
|
|
5
5
|
TierNotGrantedError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
7
7
|
|
|
8
8
|
// src/with-party/team/tiers.ts
|
|
9
9
|
function assertTierAccess(keyring, collection, tier) {
|
|
@@ -17,4 +17,4 @@ function assertTierAccess(keyring, collection, tier) {
|
|
|
17
17
|
export {
|
|
18
18
|
assertTierAccess
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-UGTBXF5U.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildLazyCache
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-66TQOPFM.js";
|
|
4
4
|
|
|
5
5
|
// src/with-store/lazy/active.ts
|
|
6
6
|
function withLazy() {
|
|
@@ -14,4 +14,4 @@ function withLazy() {
|
|
|
14
14
|
export {
|
|
15
15
|
withLazy
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-ULUMAZ5S.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NoydbError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
4
4
|
|
|
5
5
|
// src/kernel/via/index.ts
|
|
6
6
|
var binders = /* @__PURE__ */ new Map();
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
isViaInstalled,
|
|
27
27
|
viaBinder
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-UXVWEX5L.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAtPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TRGTKX5E.js";
|
|
4
4
|
import {
|
|
5
5
|
SearchNotEnabledError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
7
7
|
|
|
8
8
|
// src/with-lookup/search/tokenize.ts
|
|
9
9
|
var WORD = /[\p{L}\p{N}]+/gu;
|
|
@@ -294,31 +294,31 @@ function buildBlobFieldEntries(filenamesByField) {
|
|
|
294
294
|
function withSearch() {
|
|
295
295
|
return {
|
|
296
296
|
async search(ctx, field, query, opts) {
|
|
297
|
-
const { search } = await import("./collection-facade-
|
|
297
|
+
const { search } = await import("./collection-facade-4GRREZ6C.js");
|
|
298
298
|
return search(ctx, field, query, opts);
|
|
299
299
|
},
|
|
300
300
|
async retrieve(ctx, query, opts) {
|
|
301
|
-
const { retrieve } = await import("./collection-facade-
|
|
301
|
+
const { retrieve } = await import("./collection-facade-4GRREZ6C.js");
|
|
302
302
|
return retrieve(ctx, query, opts);
|
|
303
303
|
},
|
|
304
304
|
async similarTo(ctx, vector, opts) {
|
|
305
|
-
const { similarTo } = await import("./collection-facade-
|
|
305
|
+
const { similarTo } = await import("./collection-facade-4GRREZ6C.js");
|
|
306
306
|
return similarTo(ctx, vector, opts);
|
|
307
307
|
},
|
|
308
308
|
async warmIndex(ctx) {
|
|
309
|
-
const { warmIndex } = await import("./collection-facade-
|
|
309
|
+
const { warmIndex } = await import("./collection-facade-4GRREZ6C.js");
|
|
310
310
|
return warmIndex(ctx);
|
|
311
311
|
},
|
|
312
312
|
async flushIndex(ctx) {
|
|
313
|
-
const { flushIndex } = await import("./collection-facade-
|
|
313
|
+
const { flushIndex } = await import("./collection-facade-4GRREZ6C.js");
|
|
314
314
|
return flushIndex(ctx);
|
|
315
315
|
},
|
|
316
316
|
async embedOnWrite(ctx, id, record, version) {
|
|
317
|
-
const { embedOnWrite } = await import("./collection-facade-
|
|
317
|
+
const { embedOnWrite } = await import("./collection-facade-4GRREZ6C.js");
|
|
318
318
|
return embedOnWrite(ctx, id, record, version);
|
|
319
319
|
},
|
|
320
320
|
async rebuildEmbeddings(ctx) {
|
|
321
|
-
const { rebuildEmbeddings } = await import("./collection-facade-
|
|
321
|
+
const { rebuildEmbeddings } = await import("./collection-facade-4GRREZ6C.js");
|
|
322
322
|
return rebuildEmbeddings(ctx);
|
|
323
323
|
}
|
|
324
324
|
};
|
|
@@ -364,4 +364,4 @@ export {
|
|
|
364
364
|
buildBlobFieldEntries,
|
|
365
365
|
withSearch
|
|
366
366
|
};
|
|
367
|
-
//# sourceMappingURL=chunk-
|
|
367
|
+
//# sourceMappingURL=chunk-UXWB3FPF.js.map
|
|
@@ -157,38 +157,9 @@ function estimateRecordBytes(record) {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
// src/port/with/lazy-strategy.ts
|
|
161
|
-
function buildLazyCache(collection, cache) {
|
|
162
|
-
if (!cache || cache.maxRecords === void 0 && cache.maxBytes === void 0) {
|
|
163
|
-
throw new Error(
|
|
164
|
-
`Collection "${collection}": lazy mode (prefetch: false) requires a cache option with maxRecords and/or maxBytes. An unbounded lazy cache defeats the purpose.`
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
const lruOptions = {};
|
|
168
|
-
if (cache.maxRecords !== void 0) lruOptions.maxRecords = cache.maxRecords;
|
|
169
|
-
if (cache.maxBytes !== void 0) lruOptions.maxBytes = parseBytes(cache.maxBytes);
|
|
170
|
-
return new Lru(lruOptions);
|
|
171
|
-
}
|
|
172
|
-
var implicitLazyWarned = false;
|
|
173
|
-
var IMPLICIT_LAZY = {
|
|
174
|
-
createCache(collection, cache) {
|
|
175
|
-
if (!implicitLazyWarned) {
|
|
176
|
-
implicitLazyWarned = true;
|
|
177
|
-
if (!(typeof process !== "undefined" && process.env["NODE_ENV"] === "test")) {
|
|
178
|
-
console.warn(
|
|
179
|
-
`[noy-db] Collection "${collection}": lazy mode (prefetch: false) without the lazy service is deprecated \u2014 pass \`lazyStrategy: withLazy()\` (from "@noy-db/hub/lazy") to createNoydb(). The implicit path will be removed at 1.0.`
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
return buildLazyCache(collection, cache);
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
|
|
187
160
|
export {
|
|
188
161
|
Lru,
|
|
189
162
|
parseBytes,
|
|
190
|
-
estimateRecordBytes
|
|
191
|
-
buildLazyCache,
|
|
192
|
-
IMPLICIT_LAZY
|
|
163
|
+
estimateRecordBytes
|
|
193
164
|
};
|
|
194
|
-
//# sourceMappingURL=chunk-
|
|
165
|
+
//# sourceMappingURL=chunk-V4PXLYWM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/kernel/cache/lru.ts","../src/kernel/cache/policy.ts"],"sourcesContent":["/**\n * Generic LRU cache for `Collection`'s lazy hydration mode.\n *\n * Backed by a JavaScript `Map`, which preserves insertion order. Promotion\n * is implemented as `delete()` + `set()` — O(1) on `Map` since both\n * operations are constant-time. Eviction walks the iterator from the front\n * (least recently used) until both budgets are satisfied.\n *\n * ships in-memory only. The cache is never persisted; on collection\n * close every entry is dropped. Persisting cache state is a follow-up\n * once the access patterns from real consumers tell us whether it would\n * pay back the complexity.\n */\n\nexport interface LruEntry<V> {\n /** The cached value. */\n readonly value: V\n /**\n * Approximate decrypted byte size of the entry. Used by the byte-budget\n * eviction path. Callers compute this once at insert time and pass it\n * in — recomputing on every access would dominate the per-record cost.\n */\n readonly size: number\n}\n\nexport interface LruOptions {\n /** Maximum number of entries before eviction. Required if `maxBytes` is unset. */\n maxRecords?: number\n /** Maximum total bytes before eviction. Computed from per-entry `size`. */\n maxBytes?: number\n}\n\nexport interface LruStats {\n /** Total cache hits since construction (or `resetStats()`). */\n hits: number\n /** Total cache misses since construction (or `resetStats()`). */\n misses: number\n /** Total entries evicted since construction (or `resetStats()`). */\n evictions: number\n /** Current number of cached entries. */\n size: number\n /** Current sum of cached entry sizes (in bytes, approximate). */\n bytes: number\n}\n\n/**\n * O(1) LRU cache. Both `get()` and `set()` promote the touched entry to\n * the most-recently-used end. Eviction happens after every insert and\n * walks the front of the Map iterator dropping entries until both\n * budgets are satisfied.\n */\nexport class Lru<K, V> {\n private readonly entries = new Map<K, LruEntry<V>>()\n private readonly maxRecords: number | undefined\n private readonly maxBytes: number | undefined\n private currentBytes = 0\n private hits = 0\n private misses = 0\n private evictions = 0\n\n constructor(options: LruOptions) {\n if (options.maxRecords === undefined && options.maxBytes === undefined) {\n throw new Error('Lru: must specify maxRecords, maxBytes, or both')\n }\n this.maxRecords = options.maxRecords\n this.maxBytes = options.maxBytes\n }\n\n /**\n * Look up a key. Hits promote the entry to most-recently-used; misses\n * return undefined. Both update the running stats counters.\n */\n get(key: K): V | undefined {\n const entry = this.entries.get(key)\n if (!entry) {\n this.misses++\n return undefined\n }\n // Promote: re-insert moves the entry to the end of the iteration order.\n this.entries.delete(key)\n this.entries.set(key, entry)\n this.hits++\n return entry.value\n }\n\n /**\n * Insert or update a key. If the key already exists, its size is\n * accounted for and the entry is promoted to MRU. After insertion,\n * eviction runs to maintain both budgets.\n */\n set(key: K, value: V, size: number): void {\n const existing = this.entries.get(key)\n if (existing) {\n // Update path: subtract the old size before adding the new one.\n this.currentBytes -= existing.size\n this.entries.delete(key)\n }\n this.entries.set(key, { value, size })\n this.currentBytes += size\n this.evictUntilUnderBudget()\n }\n\n /**\n * Remove a key without affecting hit/miss stats. Used by `Collection.delete()`.\n * Returns true if the key was present.\n */\n remove(key: K): boolean {\n const existing = this.entries.get(key)\n if (!existing) return false\n this.currentBytes -= existing.size\n this.entries.delete(key)\n return true\n }\n\n /** True if the cache currently holds an entry for the given key. */\n has(key: K): boolean {\n return this.entries.has(key)\n }\n\n /**\n * Drop every entry. Stats counters survive — call `resetStats()` if you\n * want a clean slate. Used by `Collection.invalidate()` on key rotation.\n */\n clear(): void {\n this.entries.clear()\n this.currentBytes = 0\n }\n\n /** Reset hit/miss/eviction counters to zero. Does NOT touch entries. */\n resetStats(): void {\n this.hits = 0\n this.misses = 0\n this.evictions = 0\n }\n\n /** Snapshot of current cache statistics. Cheap — no copying. */\n stats(): LruStats {\n return {\n hits: this.hits,\n misses: this.misses,\n evictions: this.evictions,\n size: this.entries.size,\n bytes: this.currentBytes,\n }\n }\n\n /**\n * Iterate over all currently-cached values. Order is least-recently-used\n * first. Used by tests and devtools — production callers should use\n * `Collection.scan()` instead.\n */\n *values(): IterableIterator<V> {\n for (const entry of this.entries.values()) yield entry.value\n }\n\n /**\n * Walk the cache from the LRU end and drop entries until both budgets\n * are satisfied. Called after every `set()`. Single pass — entries are\n * never re-promoted during eviction.\n */\n private evictUntilUnderBudget(): void {\n while (this.overBudget()) {\n const oldest = this.entries.keys().next()\n if (oldest.done) return // empty cache; nothing more to evict\n const key = oldest.value\n const entry = this.entries.get(key)\n if (entry) this.currentBytes -= entry.size\n this.entries.delete(key)\n this.evictions++\n }\n }\n\n private overBudget(): boolean {\n if (this.maxRecords !== undefined && this.entries.size > this.maxRecords) return true\n if (this.maxBytes !== undefined && this.currentBytes > this.maxBytes) return true\n return false\n }\n}\n","/**\n * Cache policy helpers — parse human-friendly byte budgets into raw numbers.\n *\n * Accepted shapes (case-insensitive on suffix):\n * number — interpreted as raw bytes\n * '1024' — string of digits, raw bytes\n * '50KB' — kilobytes (×1024)\n * '50MB' — megabytes (×1024²)\n * '1GB' — gigabytes (×1024³)\n *\n * Decimals are accepted (`'1.5GB'` → 1610612736 bytes).\n *\n * Anything else throws — better to fail loud at construction time than\n * to silently treat a typo as 0 bytes (which would evict everything).\n */\n\nconst UNITS: Record<string, number> = {\n '': 1,\n 'B': 1,\n 'KB': 1024,\n 'MB': 1024 * 1024,\n 'GB': 1024 * 1024 * 1024,\n // 'TB' deliberately not supported — if you need it, you're not using NOYDB.\n}\n\n/** Parse a byte budget into a positive integer number of bytes. */\nexport function parseBytes(input: number | string): number {\n if (typeof input === 'number') {\n if (!Number.isFinite(input) || input <= 0) {\n throw new Error(`parseBytes: numeric input must be a positive finite number, got ${String(input)}`)\n }\n return Math.floor(input)\n }\n\n const trimmed = input.trim()\n if (trimmed === '') {\n throw new Error('parseBytes: empty string is not a valid byte budget')\n }\n\n // Accept either a bare number or a number followed by a unit suffix.\n // Regex: optional sign, digits with optional decimal, optional unit.\n const match = /^([0-9]+(?:\\.[0-9]+)?)\\s*([A-Za-z]*)$/.exec(trimmed)\n if (!match) {\n throw new Error(`parseBytes: invalid byte budget \"${input}\". Expected format: \"1024\", \"50KB\", \"50MB\", \"1GB\"`)\n }\n\n const value = parseFloat(match[1]!)\n const unit = (match[2] ?? '').toUpperCase()\n\n if (!(unit in UNITS)) {\n throw new Error(`parseBytes: unknown unit \"${match[2]}\" in \"${input}\". Supported: B, KB, MB, GB`)\n }\n\n const bytes = Math.floor(value * UNITS[unit]!)\n if (bytes <= 0) {\n throw new Error(`parseBytes: byte budget must be > 0, got ${bytes} from \"${input}\"`)\n }\n return bytes\n}\n\n/**\n * Estimate the in-memory byte size of a decrypted record.\n *\n * Uses `JSON.stringify().length` as a stand-in for actual heap usage.\n * It's a deliberate approximation: real V8 heap size includes pointer\n * overhead, hidden classes, and string interning that we can't measure\n * from JavaScript. The JSON length is a stable, monotonic proxy that\n * costs O(record size) per insert — fine when records are typically\n * < 1 KB and the cache eviction is the slow path anyway.\n *\n * Returns `0` (and the caller must treat it as 1 for accounting) if\n * stringification throws on circular references; this is documented\n * but in practice records always come from JSON-decoded envelopes.\n */\nexport function estimateRecordBytes(record: unknown): number {\n try {\n return JSON.stringify(record).length\n } catch {\n return 0\n }\n}\n"],"mappings":";AAmDO,IAAM,MAAN,MAAgB;AAAA,EACJ,UAAU,oBAAI,IAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACT,eAAe;AAAA,EACf,OAAO;AAAA,EACP,SAAS;AAAA,EACT,YAAY;AAAA,EAEpB,YAAY,SAAqB;AAC/B,QAAI,QAAQ,eAAe,UAAa,QAAQ,aAAa,QAAW;AACtE,YAAM,IAAI,MAAM,iDAAiD;AAAA,IACnE;AACA,SAAK,aAAa,QAAQ;AAC1B,SAAK,WAAW,QAAQ;AAAA,EAC1B;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,KAAuB;AACzB,UAAM,QAAQ,KAAK,QAAQ,IAAI,GAAG;AAClC,QAAI,CAAC,OAAO;AACV,WAAK;AACL,aAAO;AAAA,IACT;AAEA,SAAK,QAAQ,OAAO,GAAG;AACvB,SAAK,QAAQ,IAAI,KAAK,KAAK;AAC3B,SAAK;AACL,WAAO,MAAM;AAAA,EACf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,IAAI,KAAQ,OAAU,MAAoB;AACxC,UAAM,WAAW,KAAK,QAAQ,IAAI,GAAG;AACrC,QAAI,UAAU;AAEZ,WAAK,gBAAgB,SAAS;AAC9B,WAAK,QAAQ,OAAO,GAAG;AAAA,IACzB;AACA,SAAK,QAAQ,IAAI,KAAK,EAAE,OAAO,KAAK,CAAC;AACrC,SAAK,gBAAgB;AACrB,SAAK,sBAAsB;AAAA,EAC7B;AAA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|
|
3
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
4
4
|
|
|
5
5
|
// src/port/by/types.ts
|
|
6
6
|
function isQuorum(writers, generation, excludeWriterId) {
|
|
@@ -51,4 +51,4 @@ export {
|
|
|
51
51
|
isQuorum,
|
|
52
52
|
runDrainBarrier
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-VTFVLCUH.js.map
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-NSITFOCJ.js";
|
|
4
4
|
import {
|
|
5
5
|
installViaBinder
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UXVWEX5L.js";
|
|
7
7
|
import {
|
|
8
8
|
NoydbError,
|
|
9
9
|
ValidationError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
11
11
|
|
|
12
12
|
// src/via/money/iso4217.ts
|
|
13
13
|
var MINOR_UNITS = {
|
|
@@ -1044,4 +1044,4 @@ export {
|
|
|
1044
1044
|
decodeMoneyFields,
|
|
1045
1045
|
exactMath
|
|
1046
1046
|
};
|
|
1047
|
-
//# sourceMappingURL=chunk-
|
|
1047
|
+
//# sourceMappingURL=chunk-VXANTWBJ.js.map
|
|
@@ -3,22 +3,22 @@ import {
|
|
|
3
3
|
} from "./chunk-EPFF7LOX.js";
|
|
4
4
|
import {
|
|
5
5
|
loadFence
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-453F654R.js";
|
|
7
7
|
import {
|
|
8
8
|
SCHEMAS_COLLECTION,
|
|
9
9
|
loadPersistedSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2Y4IMKA6.js";
|
|
11
11
|
import {
|
|
12
12
|
canonicalJson,
|
|
13
13
|
sha256Hex
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BOET4NA4.js";
|
|
15
15
|
import {
|
|
16
16
|
openEnvelopeJson,
|
|
17
17
|
writeEnvelopeBody
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-77K4PG6P.js";
|
|
19
19
|
import {
|
|
20
20
|
buildSealedRecordEnvelope
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SZJ3DLZA.js";
|
|
22
22
|
|
|
23
23
|
// src/with-shape/manifest/types.ts
|
|
24
24
|
var MANIFEST_SCHEMA_RECORD_ID = "schema";
|
|
@@ -86,4 +86,4 @@ export {
|
|
|
86
86
|
saveSchemaManifest,
|
|
87
87
|
deriveSchemaManifest
|
|
88
88
|
};
|
|
89
|
-
//# sourceMappingURL=chunk-
|
|
89
|
+
//# sourceMappingURL=chunk-VXGSWL6L.js.map
|
|
@@ -92,21 +92,7 @@ function jsonSchemaToFields(jsonSchema, source, refs) {
|
|
|
92
92
|
return fields;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
// src/with-shape/introspection/derivation-key.ts
|
|
96
|
-
function fallbackDerivationName(outputCollections, source, used) {
|
|
97
|
-
const base = outputCollections.length > 0 ? [...outputCollections].sort().join("+") : source;
|
|
98
|
-
if (!used.has(base)) return base;
|
|
99
|
-
let occurrence = 1;
|
|
100
|
-
let candidate = `${base}#${occurrence}`;
|
|
101
|
-
while (used.has(candidate)) {
|
|
102
|
-
occurrence++;
|
|
103
|
-
candidate = `${base}#${occurrence}`;
|
|
104
|
-
}
|
|
105
|
-
return candidate;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
95
|
export {
|
|
109
|
-
jsonSchemaToFields
|
|
110
|
-
fallbackDerivationName
|
|
96
|
+
jsonSchemaToFields
|
|
111
97
|
};
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
98
|
+
//# sourceMappingURL=chunk-VYYM3MEN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-shape/introspection/fields.ts"],"sourcesContent":["/**\n * Map a JSON Schema (Draft 2020-12 produced by `zod-to-json-schema`) into\n * the {@link FieldDescriptor} map consumed by {@link VaultSchemaSnapshot}.\n *\n * Used by both the persisted-schema path (decrypted envelope body) and the\n * live-validator path (in-process derivation).\n *\n * @module\n */\n\nimport type { FieldDescriptor, FieldSource } from './types.js'\n\ninterface JsonSchemaShape {\n type?: string | string[]\n properties?: Record<string, JsonSchemaShape>\n required?: string[]\n enum?: unknown[]\n const?: unknown\n minLength?: number\n maxLength?: number\n pattern?: string\n minimum?: number\n maximum?: number\n exclusiveMinimum?: number\n exclusiveMaximum?: number\n format?: string\n items?: JsonSchemaShape\n oneOf?: JsonSchemaShape[]\n anyOf?: JsonSchemaShape[]\n}\n\nfunction jsonSchemaType(node: JsonSchemaShape): string {\n if (Array.isArray(node.type)) {\n const non = node.type.filter((t) => t !== 'null')\n return non[0] ?? 'opaque'\n }\n if (node.enum && Array.isArray(node.enum)) return 'enum'\n // JSON Schema `const` is used by zod-to-json-schema for z.literal(...)\n if (node.const !== undefined) return 'enum'\n if (typeof node.type === 'string') return node.type\n return 'opaque'\n}\n\n// #657 — zod v4's native `toJSONSchema()` injects a ±Number.MAX_SAFE_INTEGER\n// bound on every `.int()` field (a JS-safe-integer representability fact,\n// not authored validation intent — `type: 'integer'` already carries it).\n// Empirically verified: `z.number().int()` → `{type:'integer', minimum:\n// -9007199254740991, maximum:9007199254740991}`, and — critically — zod\n// emits NO metadata distinguishing that derived bound from an authored one\n// at the exact same value (`z.number().min(-9007199254740991)\n// .max(9007199254740991)` on a plain, non-int number produces a\n// byte-identical minimum/maximum). Without that distinguishing signal, a\n// value-based filter gated on `type === 'integer'` is the pragmatic call:\n// it never touches a non-int field's authored bound (whatever its value),\n// and an authored `.int().min(Number.MAX_SAFE_INTEGER)` is pathological\n// either way, so folding it into the same omission is an acceptable trade.\nfunction isIntSentinel(node: JsonSchemaShape, value: number): boolean {\n return node.type === 'integer' && Math.abs(value) === Number.MAX_SAFE_INTEGER\n}\n\nfunction constraintsFor(node: JsonSchemaShape): Record<string, unknown> | undefined {\n const out: Record<string, unknown> = {}\n if (node.enum) out.values = node.enum\n // JSON Schema `const` (used by zod-to-json-schema for z.literal) — treat like a single-value enum\n if (node.const !== undefined) out.values = [node.const]\n if (node.minLength !== undefined) out.minLength = node.minLength\n if (node.maxLength !== undefined) out.maxLength = node.maxLength\n if (node.pattern !== undefined) out.pattern = node.pattern\n if (node.format !== undefined) out.format = node.format\n if (node.minimum !== undefined && !isIntSentinel(node, node.minimum)) out.minimum = node.minimum\n if (node.maximum !== undefined && !isIntSentinel(node, node.maximum)) out.maximum = node.maximum\n if (node.exclusiveMinimum !== undefined) out.gt = node.exclusiveMinimum\n if (node.exclusiveMaximum !== undefined) out.lt = node.exclusiveMaximum\n return Object.keys(out).length === 0 ? undefined : out\n}\n\n/**\n * Extract fields from a single JSON Schema object node (must have `properties`).\n * Used by both the plain-object path and the per-member extraction in the union path.\n */\nfunction extractObjectFields(\n obj: JsonSchemaShape,\n source: FieldSource,\n refs?: Record<string, { target: string; mode: string }>,\n): { fields: Record<string, FieldDescriptor>; required: Set<string> } {\n const required = new Set(Array.isArray(obj.required) ? obj.required : [])\n const fields: Record<string, FieldDescriptor> = {}\n if (!obj.properties || typeof obj.properties !== 'object') return { fields, required }\n\n for (const [name, node] of Object.entries(obj.properties)) {\n const descriptor: FieldDescriptor = {\n type: jsonSchemaType(node),\n source,\n ...(required.has(name) ? {} : { optional: true }),\n ...(refs?.[name] ? { references: `${refs[name].target}.id` } : {}),\n }\n const constraints = constraintsFor(node)\n if (constraints) (descriptor as { constraints?: Record<string, unknown> }).constraints = constraints\n fields[name] = descriptor\n }\n\n return { fields, required }\n}\n\n/**\n * Merge field descriptors from multiple union members.\n *\n * Merge rules:\n * - Emit the UNION of all field names so no member's fields are hidden.\n * - A field is required (optional=false/absent) only when it is required in\n * EVERY member; otherwise it is marked optional=true.\n * - For the discriminator field (appears in every member with a `const` value),\n * collect the const values from all members and surface them as constraints.values\n * so the caller can see the full literal set.\n * - For conflicting types across members, first-seen wins.\n */\nfunction mergeUnionMembers(\n members: JsonSchemaShape[],\n source: FieldSource,\n refs?: Record<string, { target: string; mode: string }>,\n): Record<string, FieldDescriptor> {\n if (members.length === 0) return {}\n\n // Extract per-member fields + required sets\n const extracted = members\n .filter((m) => m.properties && typeof m.properties === 'object')\n .map((m) => extractObjectFields(m, source, refs))\n\n if (extracted.length === 0) return {}\n\n // Collect all field names across all members\n const allNames = new Set<string>()\n for (const { fields } of extracted) {\n for (const name of Object.keys(fields)) allNames.add(name)\n }\n\n const memberCount = extracted.length\n const out: Record<string, FieldDescriptor> = {}\n\n for (const name of allNames) {\n // Which members contain this field?\n const presentIn = extracted.filter(({ fields }) => name in fields)\n const requiredInAll = presentIn.length === memberCount\n && presentIn.every(({ required }) => required.has(name))\n\n // Use first-seen descriptor as the base (presentIn is always non-empty here since\n // we iterate names that appeared in at least one member's fields)\n const base = presentIn[0]!.fields[name]!\n\n // For discriminator-like fields: collect const/enum values across all members\n // to surface the full literal set in constraints.values\n const allValues: unknown[] = []\n for (const { fields } of presentIn) {\n const fd = fields[name]\n if (fd?.constraints?.values && Array.isArray(fd.constraints.values)) {\n for (const v of fd.constraints.values) {\n if (!allValues.includes(v)) allValues.push(v)\n }\n }\n }\n\n const mergedConstraints: Record<string, unknown> | undefined =\n allValues.length > 0\n ? { ...(base.constraints ?? {}), values: allValues }\n : base.constraints\n\n const descriptor: FieldDescriptor = {\n type: base.type,\n source,\n ...(requiredInAll ? {} : { optional: true }),\n ...(base.references ? { references: base.references } : {}),\n }\n if (mergedConstraints) {\n (descriptor as { constraints?: Record<string, unknown> }).constraints = mergedConstraints\n }\n out[name] = descriptor\n }\n\n return out\n}\n\nexport function jsonSchemaToFields(\n jsonSchema: unknown,\n source: FieldSource,\n refs?: Record<string, { target: string; mode: string }>,\n): Record<string, FieldDescriptor> {\n if (!jsonSchema || typeof jsonSchema !== 'object') return {}\n const root = jsonSchema as JsonSchemaShape\n\n // Handle discriminated unions: zod-to-json-schema emits anyOf/oneOf for z.discriminatedUnion\n const unionMembers = root.anyOf ?? root.oneOf\n if (Array.isArray(unionMembers) && unionMembers.length > 0) {\n return mergeUnionMembers(unionMembers, source, refs)\n }\n\n if (!root.properties || typeof root.properties !== 'object') return {}\n\n const { fields } = extractObjectFields(root, source, refs)\n return fields\n}\n"],"mappings":";AA+BA,SAAS,eAAe,MAA+B;AACrD,MAAI,MAAM,QAAQ,KAAK,IAAI,GAAG;AAC5B,UAAM,MAAM,KAAK,KAAK,OAAO,CAAC,MAAM,MAAM,MAAM;AAChD,WAAO,IAAI,CAAC,KAAK;AAAA,EACnB;AACA,MAAI,KAAK,QAAQ,MAAM,QAAQ,KAAK,IAAI,EAAG,QAAO;AAElD,MAAI,KAAK,UAAU,OAAW,QAAO;AACrC,MAAI,OAAO,KAAK,SAAS,SAAU,QAAO,KAAK;AAC/C,SAAO;AACT;AAeA,SAAS,cAAc,MAAuB,OAAwB;AACpE,SAAO,KAAK,SAAS,aAAa,KAAK,IAAI,KAAK,MAAM,OAAO;AAC/D;AAEA,SAAS,eAAe,MAA4D;AAClF,QAAM,MAA+B,CAAC;AACtC,MAAI,KAAK,KAAM,KAAI,SAAS,KAAK;AAEjC,MAAI,KAAK,UAAU,OAAW,KAAI,SAAS,CAAC,KAAK,KAAK;AACtD,MAAI,KAAK,cAAc,OAAW,KAAI,YAAY,KAAK;AACvD,MAAI,KAAK,cAAc,OAAW,KAAI,YAAY,KAAK;AACvD,MAAI,KAAK,YAAY,OAAW,KAAI,UAAU,KAAK;AACnD,MAAI,KAAK,WAAW,OAAW,KAAI,SAAS,KAAK;AACjD,MAAI,KAAK,YAAY,UAAa,CAAC,cAAc,MAAM,KAAK,OAAO,EAAG,KAAI,UAAU,KAAK;AACzF,MAAI,KAAK,YAAY,UAAa,CAAC,cAAc,MAAM,KAAK,OAAO,EAAG,KAAI,UAAU,KAAK;AACzF,MAAI,KAAK,qBAAqB,OAAW,KAAI,KAAK,KAAK;AACvD,MAAI,KAAK,qBAAqB,OAAW,KAAI,K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,OAAO,IAAI,oBAAoB,MAAM,QAAQ,IAAI;AACzD,SAAO;AACT;","names":[]}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createNoydb
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6GOE5PGN.js";
|
|
4
4
|
import {
|
|
5
5
|
deriveSchemaManifest
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VXGSWL6L.js";
|
|
7
7
|
import {
|
|
8
8
|
loadFence
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-453F654R.js";
|
|
10
10
|
import {
|
|
11
11
|
readPod,
|
|
12
12
|
readPodRedirect,
|
|
13
13
|
signRecord,
|
|
14
14
|
verifyPodHeader,
|
|
15
15
|
verifyRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5WDXHNSW.js";
|
|
17
17
|
import {
|
|
18
18
|
loadKeyring
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-G56KBWFY.js";
|
|
20
20
|
import {
|
|
21
21
|
ConflictError,
|
|
22
22
|
MigrationRequiredError,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
RedirectDepthExceededError,
|
|
27
27
|
RedirectLoopError,
|
|
28
28
|
RedirectUnreachableError
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
30
30
|
|
|
31
31
|
// src/with-pod/pod-store.ts
|
|
32
32
|
var BUNDLE_STORE_VERSION = 1;
|
|
@@ -286,4 +286,4 @@ export {
|
|
|
286
286
|
followRedirects,
|
|
287
287
|
open
|
|
288
288
|
};
|
|
289
|
-
//# sourceMappingURL=chunk-
|
|
289
|
+
//# sourceMappingURL=chunk-WEQEYLCS.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isRewrappedUnder,
|
|
3
3
|
rewrapEnvelope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-77K4PG6P.js";
|
|
5
5
|
import {
|
|
6
6
|
buildRecordEnvelope,
|
|
7
7
|
isTombstone,
|
|
8
8
|
isTombstoneShape
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SZJ3DLZA.js";
|
|
10
10
|
|
|
11
11
|
// src/with-commit/history/history.ts
|
|
12
12
|
var HISTORY_COLLECTION = "_history";
|
|
@@ -187,4 +187,4 @@ export {
|
|
|
187
187
|
rewrapHistory,
|
|
188
188
|
NO_HISTORY
|
|
189
189
|
};
|
|
190
|
-
//# sourceMappingURL=chunk-
|
|
190
|
+
//# sourceMappingURL=chunk-X2DLENDQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ReadOnlyFrameError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
4
4
|
|
|
5
5
|
// src/with-fork/shadow/vault-frame.ts
|
|
6
6
|
var VaultFrame = class {
|
|
@@ -71,4 +71,4 @@ export {
|
|
|
71
71
|
VaultFrame,
|
|
72
72
|
CollectionFrame
|
|
73
73
|
};
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
74
|
+
//# sourceMappingURL=chunk-XLMEZIAJ.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
freezeAndDeleteClosure,
|
|
3
3
|
randomId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BSFNRLK2.js";
|
|
5
5
|
import {
|
|
6
6
|
buildAccessibleBundle,
|
|
7
7
|
resolveAccessibleCollections
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-L7CIOOBW.js";
|
|
9
9
|
import {
|
|
10
10
|
buildRecordEnvelope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SZJ3DLZA.js";
|
|
12
12
|
import {
|
|
13
13
|
NoydbError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
15
15
|
|
|
16
16
|
// src/with-audit/portability/request-withdrawal.ts
|
|
17
17
|
var WITHDRAWAL_REQUESTS_COLLECTION = "_user_withdrawal_requests";
|
|
@@ -158,4 +158,4 @@ export {
|
|
|
158
158
|
approveWithdrawal,
|
|
159
159
|
rejectWithdrawal
|
|
160
160
|
};
|
|
161
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-XTXOCYOJ.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
decrypt,
|
|
3
3
|
deriveSealedFieldKey,
|
|
4
4
|
deriveSealedFieldKeyFromCek
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SL3JAAKN.js";
|
|
6
6
|
|
|
7
7
|
// src/kernel/enclave/record-keys/sealed-slot.ts
|
|
8
8
|
function parseSealedSlot(blob) {
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
parseSealedSlot,
|
|
27
27
|
dualReadSealedSlot
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-YSRUYAVU.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IllegalTransitionError,
|
|
3
3
|
RecordLockedError,
|
|
4
4
|
ValidationError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
6
6
|
|
|
7
7
|
// src/with-audit/guards/with-guard.ts
|
|
8
8
|
function withGuard(strategy) {
|
|
@@ -124,4 +124,4 @@ export {
|
|
|
124
124
|
immutableGuard,
|
|
125
125
|
transitionGuard
|
|
126
126
|
};
|
|
127
|
-
//# sourceMappingURL=chunk-
|
|
127
|
+
//# sourceMappingURL=chunk-YYP7WSEB.js.map
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-NSITFOCJ.js";
|
|
10
10
|
import {
|
|
11
11
|
applyI18nLocale
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TRGTKX5E.js";
|
|
13
13
|
import {
|
|
14
14
|
viaBinder
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UXVWEX5L.js";
|
|
16
16
|
import {
|
|
17
17
|
GroupCardinalityError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
19
19
|
|
|
20
20
|
// src/with-lookup/reduce/reduction.ts
|
|
21
21
|
function reduceRecords(records, spec) {
|
|
@@ -361,4 +361,4 @@ export {
|
|
|
361
361
|
groupAndReduce,
|
|
362
362
|
GroupedReduction
|
|
363
363
|
};
|
|
364
|
-
//# sourceMappingURL=chunk-
|
|
364
|
+
//# sourceMappingURL=chunk-ZN4FD4PE.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
DanglingReferenceError,
|
|
6
6
|
JoinTooLargeError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
8
8
|
|
|
9
9
|
// src/kernel/query/join.ts
|
|
10
10
|
var DEFAULT_JOIN_MAX_ROWS = 5e4;
|
|
@@ -186,4 +186,4 @@ export {
|
|
|
186
186
|
applyJoins,
|
|
187
187
|
resetJoinWarnings
|
|
188
188
|
};
|
|
189
|
-
//# sourceMappingURL=chunk-
|
|
189
|
+
//# sourceMappingURL=chunk-ZORTV6NH.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildRecordAad,
|
|
3
3
|
openEnvelopeJson
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-77K4PG6P.js";
|
|
5
5
|
import {
|
|
6
6
|
buildRecordEnvelope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SZJ3DLZA.js";
|
|
8
8
|
import {
|
|
9
9
|
encrypt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SL3JAAKN.js";
|
|
11
11
|
import {
|
|
12
12
|
SequenceContentionError,
|
|
13
13
|
SequenceNotEnabledError,
|
|
14
14
|
SequenceOfflineError,
|
|
15
15
|
ValidationError,
|
|
16
16
|
isConflictError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
18
18
|
|
|
19
19
|
// src/with-commit/sequence/active.ts
|
|
20
20
|
function withSequence() {
|
|
@@ -201,4 +201,4 @@ export {
|
|
|
201
201
|
resolveSequenceKey,
|
|
202
202
|
SequenceStore
|
|
203
203
|
};
|
|
204
|
-
//# sourceMappingURL=chunk-
|
|
204
|
+
//# sourceMappingURL=chunk-ZVO4QVPD.js.map
|