@noy-db/hub 0.7.0-pre.9 → 0.7.1-pre.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 +1327 -0
- package/README.md +29 -11
- package/dist/api-WYW4YEQG.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-XKCXVKV3.js} +23 -18
- package/dist/backup-XKCXVKV3.js.map +1 -0
- 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-SWFIXQF5.js → chunk-2ENE6445.js} +6 -6
- package/dist/{chunk-HLFLJCDX.js → chunk-2N5ML6HT.js} +7 -7
- package/dist/{chunk-X6YRP5EC.js → chunk-334WSVOW.js} +5 -5
- package/dist/{chunk-5EC7X5QA.js → chunk-3BVH633C.js} +5 -5
- package/dist/chunk-3BZZJJMQ.js +176 -0
- package/dist/chunk-3BZZJJMQ.js.map +1 -0
- package/dist/{chunk-7XT7KZTN.js → chunk-3PGS7TYR.js} +10 -10
- package/dist/{chunk-OHGCRKWA.js → chunk-3V4KWFX7.js} +18 -8
- package/dist/chunk-3V4KWFX7.js.map +1 -0
- package/dist/{chunk-AHIIBDNH.js → chunk-3VF3WQ4F.js} +7 -7
- package/dist/{chunk-GM4IM7TC.js → chunk-453F654R.js} +2 -2
- package/dist/{chunk-5W5CEHLA.js → chunk-4GFX6MPA.js} +6 -6
- package/dist/{chunk-JUBWUJY5.js → chunk-4GVM6QZA.js} +2 -2
- package/dist/{chunk-2DGBRE4K.js → chunk-4OZNXTO4.js} +2 -2
- package/dist/{chunk-DOPZWTMJ.js → chunk-4ZS56W5S.js} +8 -8
- package/dist/{chunk-P2RJAVMR.js → chunk-5VCRVKOZ.js} +4 -4
- package/dist/chunk-66TQOPFM.js +37 -0
- package/dist/chunk-66TQOPFM.js.map +1 -0
- package/dist/{chunk-FN26SFGH.js → chunk-6LKOJBV6.js} +2 -2
- package/dist/{chunk-P7KJME6C.js → chunk-6YXCPL4T.js} +2 -2
- package/dist/{chunk-IS5LFHV2.js → chunk-7APJ6CO6.js} +7 -7
- 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-MU74BYOD.js → chunk-A2HKRLPV.js} +3 -3
- package/dist/{chunk-357ECVLE.js → chunk-A66I4JOA.js} +3 -3
- package/dist/{chunk-VT4DTCK5.js → chunk-ACAQ2DSG.js} +3 -3
- package/dist/chunk-ACAQ2DSG.js.map +1 -0
- package/dist/{chunk-TAJZ7GXO.js → chunk-AYX7AINO.js} +3 -3
- package/dist/{chunk-RPX2H2OL.js → chunk-BLN54W3L.js} +3 -3
- package/dist/{chunk-XGXVPCYW.js → chunk-BRLKZUBT.js} +3 -3
- package/dist/{chunk-CWFH36SI.js → chunk-BTDR2PXY.js} +2 -2
- package/dist/{chunk-65ZYRK7O.js → chunk-BUE2D7PX.js} +26 -3
- package/dist/chunk-BUE2D7PX.js.map +1 -0
- package/dist/{chunk-RCONOOVF.js → chunk-BVN6KXL2.js} +5 -5
- package/dist/chunk-BVN6KXL2.js.map +1 -0
- package/dist/{chunk-UTFY6W6X.js → chunk-BZ3534YM.js} +2 -2
- package/dist/{chunk-KZTPL7NL.js → chunk-CHQCZZWC.js} +2 -2
- package/dist/chunk-CUQPWYRX.js +1652 -0
- package/dist/chunk-CUQPWYRX.js.map +1 -0
- package/dist/{chunk-MQPHKJ74.js → chunk-DFMWUOU5.js} +12 -12
- package/dist/{chunk-3GIA3HJ2.js → chunk-DGOZ4UZD.js} +2 -2
- package/dist/{chunk-NMDMSHBF.js → chunk-EQEYOJBM.js} +3 -3
- package/dist/{chunk-OQDHIAR2.js → chunk-F3W6YMDC.js} +80 -8
- package/dist/chunk-F3W6YMDC.js.map +1 -0
- package/dist/{chunk-Q2ZN5DWZ.js → chunk-FAHMLERK.js} +2 -2
- package/dist/{chunk-PCIBCL26.js → chunk-FET5XCAT.js} +7 -5
- package/dist/{chunk-PCIBCL26.js.map → chunk-FET5XCAT.js.map} +1 -1
- package/dist/chunk-FFWI7UH7.js +53 -0
- package/dist/chunk-FFWI7UH7.js.map +1 -0
- package/dist/{chunk-GKOJR53Y.js → chunk-G73UVHCA.js} +5 -5
- package/dist/{chunk-H5GVPOB4.js → chunk-GPNTB4Y7.js} +5 -5
- package/dist/{chunk-DNMTN46H.js → chunk-GY4WYNNG.js} +2 -2
- package/dist/{chunk-HS3LEVT4.js → chunk-HIWCKBEY.js} +7 -7
- package/dist/{chunk-UL7TLJ54.js → chunk-HJUWN7JN.js} +6 -4
- package/dist/{chunk-UL7TLJ54.js.map → chunk-HJUWN7JN.js.map} +1 -1
- package/dist/{chunk-USKHHOIV.js → chunk-HPVZCW43.js} +30 -2
- package/dist/chunk-HPVZCW43.js.map +1 -0
- package/dist/{chunk-PV7XXAXK.js → chunk-JBDFMYKQ.js} +2 -2
- package/dist/{chunk-IZTU6RKH.js → chunk-JMGDHKQF.js} +2 -2
- package/dist/{chunk-P22XPNFW.js → chunk-JVIBCBC7.js} +2 -2
- package/dist/{chunk-OLUTCM23.js → chunk-K23VKTN4.js} +7 -7
- package/dist/{chunk-3SWP2FYA.js → chunk-KKEESNPE.js} +8 -8
- package/dist/{chunk-ZB2K3FV7.js → chunk-KTFRCC5C.js} +2 -2
- package/dist/{chunk-IAHDSFFA.js → chunk-LH5A3ZPG.js} +10 -10
- package/dist/{chunk-QOHGWFAW.js → chunk-LWBCUYZW.js} +2 -2
- package/dist/{chunk-5NKHCJU5.js → chunk-M4YPHYEH.js} +8 -8
- package/dist/{chunk-JFSUYGNE.js → chunk-MVMXZYXT.js} +2 -2
- package/dist/{chunk-FKQCC4C5.js → chunk-NQKIUNW5.js} +2 -2
- package/dist/{chunk-Q2OAAREU.js → chunk-OTQZ7ZWU.js} +6 -6
- package/dist/{chunk-MOQ6OGKS.js → chunk-P3MG6QCN.js} +4 -4
- package/dist/{chunk-75WNTBZL.js → chunk-PPTHY5QO.js} +3 -3
- package/dist/{chunk-TQGT5BZE.js → chunk-Q2MPFCQ7.js} +4 -4
- package/dist/{chunk-MTTPHBIE.js → chunk-Q2PU57HC.js} +2 -2
- package/dist/{chunk-FLRLZ4XZ.js → chunk-Q7HZX3IF.js} +2 -2
- package/dist/{chunk-KQIDBIZL.js → chunk-QIZPZMUI.js} +2 -2
- package/dist/{chunk-JRWLUWDM.js → chunk-QPQUVOZ2.js} +3 -3
- package/dist/{chunk-7YVSWPZB.js → chunk-QTQUH4DS.js} +7 -7
- package/dist/{chunk-2MQ2D5OZ.js → chunk-R42NSZI6.js} +5 -5
- package/dist/{chunk-FRIVOR5N.js → chunk-R7BX2NB3.js} +5 -172
- package/dist/chunk-R7BX2NB3.js.map +1 -0
- package/dist/{chunk-HOIWW2LV.js → chunk-RF6D3Y5E.js} +4 -4
- package/dist/{chunk-OEJ4R52I.js → chunk-RMS3NEA3.js} +2 -2
- package/dist/{chunk-FPN5D4JX.js → chunk-RSGLUIO6.js} +6 -6
- 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-I5LSKXT6.js → chunk-SGZAIJCV.js} +4 -4
- package/dist/{chunk-FYT3DXPN.js → chunk-SKGMN35F.js} +2 -2
- package/dist/chunk-SMH6SRX7.js +87 -0
- package/dist/chunk-SMH6SRX7.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-LUVGSKXE.js → chunk-UDHWDSRL.js} +6 -6
- package/dist/{chunk-DZPMKY3J.js → chunk-UGTBXF5U.js} +3 -3
- package/dist/{chunk-K432FT7T.js → chunk-UHHPLO3I.js} +4 -4
- package/dist/{chunk-THNJ3IKU.js → chunk-ULUMAZ5S.js} +2 -2
- package/dist/{chunk-QJLOWGOU.js → chunk-UP4BECPY.js} +12 -82
- package/dist/chunk-UP4BECPY.js.map +1 -0
- package/dist/{chunk-YHIAWECL.js → chunk-UXVWEX5L.js} +2 -2
- package/dist/{chunk-NO272T7Q.js → chunk-V4PXLYWM.js} +2 -31
- package/dist/chunk-V4PXLYWM.js.map +1 -0
- package/dist/{chunk-OKCQNMO6.js → chunk-V7ZRRCRJ.js} +6 -6
- package/dist/{chunk-GHADG5QZ.js → chunk-VTFVLCUH.js} +2 -2
- package/dist/{chunk-U3RMWOXY.js → chunk-VXANTWBJ.js} +3 -3
- package/dist/{chunk-KHKKD62N.js → chunk-VYYM3MEN.js} +2 -16
- package/dist/chunk-VYYM3MEN.js.map +1 -0
- package/dist/{chunk-VTTDPGEK.js → chunk-WQBG4SZS.js} +26 -57
- package/dist/chunk-WQBG4SZS.js.map +1 -0
- package/dist/{chunk-MV2OEK3K.js → chunk-XKWGNJ26.js} +5 -5
- package/dist/{chunk-2E2LT37H.js → chunk-XLMEZIAJ.js} +2 -2
- package/dist/{chunk-RHTPGS56.js → chunk-YJRT5UQM.js} +3 -3
- package/dist/{chunk-FZWAGG5T.js → chunk-YJX7EOJD.js} +6 -6
- package/dist/{chunk-ZQGRZN5L.js → chunk-YYP7WSEB.js} +2 -2
- package/dist/{chunk-MENI33ZV.js → chunk-ZHKOPKE3.js} +3 -3
- package/dist/{chunk-4U52PMEL.js → chunk-ZN4FD4PE.js} +4 -4
- package/dist/{chunk-AW4KTQA4.js → chunk-ZORTV6NH.js} +2 -2
- package/dist/{chunk-6L5IMNJX.js → chunk-ZYIYHJ5R.js} +236 -1333
- package/dist/chunk-ZYIYHJ5R.js.map +1 -0
- package/dist/classified/index.js +5 -6
- package/dist/{classified-marker-R37XW5PC.js → classified-marker-BWOFVYAC.js} +3 -5
- package/dist/{classified-marker-R37XW5PC.js.map → classified-marker-BWOFVYAC.js.map} +1 -1
- package/dist/collection-facade-JSJYIKS4.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-PKQDLOT4.js} +2 -3
- package/dist/{dead-filter-GRT6RAML.js.map → dead-filter-PKQDLOT4.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-DS5NRILW.js} +11 -12
- package/dist/{delegation-6QRAYSK6.js.map → delegation-DS5NRILW.js.map} +1 -1
- package/dist/derivations/index.js +30 -16
- package/dist/derive-E642AOUB.js +21 -0
- package/dist/directory/index.js +10 -11
- package/dist/{dispatch-QCF7KPIP.js → dispatch-IEPAVQUM.js} +5 -7
- package/dist/{dispatch-QCF7KPIP.js.map → dispatch-IEPAVQUM.js.map} +1 -1
- package/dist/dispatch-Q6MWLOJY.js +302 -0
- package/dist/dispatch-Q6MWLOJY.js.map +1 -0
- package/dist/{enclave-OXZY3NOP.js → enclave-55PAM4YO.js} +15 -10
- package/dist/executor-5NIMLSKZ.js +8 -0
- package/dist/executor-7UQ3BZ4F.js +29 -0
- package/dist/executor-AQVXV5GZ.js +8 -0
- package/dist/export-accessible-ORMKLA3E.js +22 -0
- package/dist/extract-partition-NKYO3WNG.js +37 -0
- package/dist/{fanout-sidecar-KGQCUJ7P.js → fanout-sidecar-S3QL53YX.js} +9 -10
- package/dist/{fanout-sidecar-KGQCUJ7P.js.map → fanout-sidecar-S3QL53YX.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-NOGJ25VX.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 +21 -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-3DTQ7VJJ.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/enclave/crypto.d.ts +16 -0
- package/dist/kernel/enclave/index.d.ts +1 -1
- package/dist/kernel/errors.d.ts +28 -0
- package/dist/kernel/match-pairs.d.ts +30 -0
- package/dist/kernel/memory-store.d.ts +35 -7
- package/dist/kernel/types.d.ts +39 -0
- package/dist/lazy/index.js +3 -3
- package/dist/{ledger-ZAFULLAF.js → ledger-EDXFFZQL.js} +11 -12
- package/dist/liberate-V35QUHJP.js +24 -0
- package/dist/link-set-2TTM3IZC.js +30 -0
- package/dist/{managed-secret-7OH7HKXV.js → managed-secret-NCWEMPUQ.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-62MX4QUG.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-ECVCDIXW.js} +10 -11
- package/dist/{pod-handle-BLOI4IFY.js.map → pod-handle-ECVCDIXW.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-3IPCSG6Q.js} +6 -7
- package/dist/{post-register-R33EKJQR.js.map → post-register-3IPCSG6Q.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-HHLXEQDN.js +31 -0
- package/dist/registry-23WF3TGH.js +8 -0
- package/dist/registry-4AYVUNXK.js +8 -0
- package/dist/registry-JS3YFQQM.js +18 -0
- package/dist/registry-XX2Z7B46.js +32 -0
- package/dist/request-withdrawal-CHPATE4G.js +30 -0
- package/dist/{reveal-PI6ADRQU.js → reveal-QZDHSGD4.js} +6 -7
- package/dist/{reveal-PI6ADRQU.js.map → reveal-QZDHSGD4.js.map} +1 -1
- package/dist/revoke-7M2VW4ON.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-X5CC22CQ.js} +12 -13
- package/dist/{seed-CG7JMJNY.js.map → seed-X5CC22CQ.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-SJQJVSM6.js +24 -0
- package/dist/snapshots/index.js +10 -11
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-HZR7745Y.js → stale-BZS6H2RY.js} +10 -11
- package/dist/storage-RW4QBS23.js +22 -0
- package/dist/store/index.js +0 -1
- package/dist/{store-coordination-provider-MYIHSZXT.js → store-coordination-provider-4WZAIRHC.js} +10 -11
- package/dist/{store-coordination-provider-MYIHSZXT.js.map → store-coordination-provider-4WZAIRHC.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-6MDTIUEV.js} +5 -6
- package/dist/{verify-R6CCBUA3.js.map → verify-6MDTIUEV.js.map} +1 -1
- package/dist/walk-ZURCH6RZ.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-party/team/keyring.d.ts +12 -5
- package/dist/with-party/team/wrapped-deks.d.ts +4 -4
- package/dist/with-pod/pod.d.ts +4 -4
- 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-PXR4IXDX.js +27 -0
- package/package.json +8 -3
- package/dist/api-GJQF7OAJ.js +0 -20
- package/dist/backup-QZQEP5RO.js.map +0 -1
- 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-OHGCRKWA.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-RCONOOVF.js.map +0 -1
- package/dist/chunk-SW4TOSJL.js.map +0 -1
- package/dist/chunk-USKHHOIV.js.map +0 -1
- package/dist/chunk-VT4DTCK5.js.map +0 -1
- package/dist/chunk-VTTDPGEK.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-WYW4YEQG.js.map} +0 -0
- /package/dist/{chunk-5UKIZIO3.js.map → chunk-2577DKXB.js.map} +0 -0
- /package/dist/{chunk-SWFIXQF5.js.map → chunk-2ENE6445.js.map} +0 -0
- /package/dist/{chunk-HLFLJCDX.js.map → chunk-2N5ML6HT.js.map} +0 -0
- /package/dist/{chunk-X6YRP5EC.js.map → chunk-334WSVOW.js.map} +0 -0
- /package/dist/{chunk-5EC7X5QA.js.map → chunk-3BVH633C.js.map} +0 -0
- /package/dist/{chunk-7XT7KZTN.js.map → chunk-3PGS7TYR.js.map} +0 -0
- /package/dist/{chunk-AHIIBDNH.js.map → chunk-3VF3WQ4F.js.map} +0 -0
- /package/dist/{chunk-GM4IM7TC.js.map → chunk-453F654R.js.map} +0 -0
- /package/dist/{chunk-5W5CEHLA.js.map → chunk-4GFX6MPA.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-DOPZWTMJ.js.map → chunk-4ZS56W5S.js.map} +0 -0
- /package/dist/{chunk-P2RJAVMR.js.map → chunk-5VCRVKOZ.js.map} +0 -0
- /package/dist/{chunk-FN26SFGH.js.map → chunk-6LKOJBV6.js.map} +0 -0
- /package/dist/{chunk-P7KJME6C.js.map → chunk-6YXCPL4T.js.map} +0 -0
- /package/dist/{chunk-IS5LFHV2.js.map → chunk-7APJ6CO6.js.map} +0 -0
- /package/dist/{chunk-LAI7ENPW.js.map → chunk-7MG2LHO5.js.map} +0 -0
- /package/dist/{chunk-MU74BYOD.js.map → chunk-A2HKRLPV.js.map} +0 -0
- /package/dist/{chunk-357ECVLE.js.map → chunk-A66I4JOA.js.map} +0 -0
- /package/dist/{chunk-TAJZ7GXO.js.map → chunk-AYX7AINO.js.map} +0 -0
- /package/dist/{chunk-RPX2H2OL.js.map → chunk-BLN54W3L.js.map} +0 -0
- /package/dist/{chunk-XGXVPCYW.js.map → chunk-BRLKZUBT.js.map} +0 -0
- /package/dist/{chunk-CWFH36SI.js.map → chunk-BTDR2PXY.js.map} +0 -0
- /package/dist/{chunk-UTFY6W6X.js.map → chunk-BZ3534YM.js.map} +0 -0
- /package/dist/{chunk-KZTPL7NL.js.map → chunk-CHQCZZWC.js.map} +0 -0
- /package/dist/{chunk-MQPHKJ74.js.map → chunk-DFMWUOU5.js.map} +0 -0
- /package/dist/{chunk-3GIA3HJ2.js.map → chunk-DGOZ4UZD.js.map} +0 -0
- /package/dist/{chunk-NMDMSHBF.js.map → chunk-EQEYOJBM.js.map} +0 -0
- /package/dist/{chunk-Q2ZN5DWZ.js.map → chunk-FAHMLERK.js.map} +0 -0
- /package/dist/{chunk-GKOJR53Y.js.map → chunk-G73UVHCA.js.map} +0 -0
- /package/dist/{chunk-H5GVPOB4.js.map → chunk-GPNTB4Y7.js.map} +0 -0
- /package/dist/{chunk-DNMTN46H.js.map → chunk-GY4WYNNG.js.map} +0 -0
- /package/dist/{chunk-HS3LEVT4.js.map → chunk-HIWCKBEY.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-P22XPNFW.js.map → chunk-JVIBCBC7.js.map} +0 -0
- /package/dist/{chunk-OLUTCM23.js.map → chunk-K23VKTN4.js.map} +0 -0
- /package/dist/{chunk-3SWP2FYA.js.map → chunk-KKEESNPE.js.map} +0 -0
- /package/dist/{chunk-ZB2K3FV7.js.map → chunk-KTFRCC5C.js.map} +0 -0
- /package/dist/{chunk-IAHDSFFA.js.map → chunk-LH5A3ZPG.js.map} +0 -0
- /package/dist/{chunk-QOHGWFAW.js.map → chunk-LWBCUYZW.js.map} +0 -0
- /package/dist/{chunk-5NKHCJU5.js.map → chunk-M4YPHYEH.js.map} +0 -0
- /package/dist/{chunk-JFSUYGNE.js.map → chunk-MVMXZYXT.js.map} +0 -0
- /package/dist/{chunk-FKQCC4C5.js.map → chunk-NQKIUNW5.js.map} +0 -0
- /package/dist/{chunk-Q2OAAREU.js.map → chunk-OTQZ7ZWU.js.map} +0 -0
- /package/dist/{chunk-MOQ6OGKS.js.map → chunk-P3MG6QCN.js.map} +0 -0
- /package/dist/{chunk-75WNTBZL.js.map → chunk-PPTHY5QO.js.map} +0 -0
- /package/dist/{chunk-TQGT5BZE.js.map → chunk-Q2MPFCQ7.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-KQIDBIZL.js.map → chunk-QIZPZMUI.js.map} +0 -0
- /package/dist/{chunk-JRWLUWDM.js.map → chunk-QPQUVOZ2.js.map} +0 -0
- /package/dist/{chunk-7YVSWPZB.js.map → chunk-QTQUH4DS.js.map} +0 -0
- /package/dist/{chunk-2MQ2D5OZ.js.map → chunk-R42NSZI6.js.map} +0 -0
- /package/dist/{chunk-HOIWW2LV.js.map → chunk-RF6D3Y5E.js.map} +0 -0
- /package/dist/{chunk-OEJ4R52I.js.map → chunk-RMS3NEA3.js.map} +0 -0
- /package/dist/{chunk-FPN5D4JX.js.map → chunk-RSGLUIO6.js.map} +0 -0
- /package/dist/{chunk-XKA6UH5V.js.map → chunk-SFAWCTEM.js.map} +0 -0
- /package/dist/{chunk-I5LSKXT6.js.map → chunk-SGZAIJCV.js.map} +0 -0
- /package/dist/{chunk-FYT3DXPN.js.map → chunk-SKGMN35F.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-LUVGSKXE.js.map → chunk-UDHWDSRL.js.map} +0 -0
- /package/dist/{chunk-DZPMKY3J.js.map → chunk-UGTBXF5U.js.map} +0 -0
- /package/dist/{chunk-K432FT7T.js.map → chunk-UHHPLO3I.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-OKCQNMO6.js.map → chunk-V7ZRRCRJ.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-MV2OEK3K.js.map → chunk-XKWGNJ26.js.map} +0 -0
- /package/dist/{chunk-2E2LT37H.js.map → chunk-XLMEZIAJ.js.map} +0 -0
- /package/dist/{chunk-RHTPGS56.js.map → chunk-YJRT5UQM.js.map} +0 -0
- /package/dist/{chunk-FZWAGG5T.js.map → chunk-YJX7EOJD.js.map} +0 -0
- /package/dist/{chunk-ZQGRZN5L.js.map → chunk-YYP7WSEB.js.map} +0 -0
- /package/dist/{chunk-MENI33ZV.js.map → chunk-ZHKOPKE3.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-PZ5AY32C.js.map → collection-facade-JSJYIKS4.js.map} +0 -0
- /package/dist/{collection-facade-OPJ3EC4L.js.map → computed-VPOKQK4N.js.map} +0 -0
- /package/dist/{computed-HW6IG5UH.js.map → derive-E642AOUB.js.map} +0 -0
- /package/dist/{derive-AAIXSQIE.js.map → enclave-55PAM4YO.js.map} +0 -0
- /package/dist/{enclave-OXZY3NOP.js.map → executor-5NIMLSKZ.js.map} +0 -0
- /package/dist/{executor-67NA4KPO.js.map → executor-7UQ3BZ4F.js.map} +0 -0
- /package/dist/{executor-7JDP7UBK.js.map → executor-AQVXV5GZ.js.map} +0 -0
- /package/dist/{executor-CRH5OB4V.js.map → export-accessible-ORMKLA3E.js.map} +0 -0
- /package/dist/{export-accessible-K4GJAU7U.js.map → extract-partition-NKYO3WNG.js.map} +0 -0
- /package/dist/{extract-partition-YJFL5OKK.js.map → find-NOGJ25VX.js.map} +0 -0
- /package/dist/{find-SVZHMEQI.js.map → issue-3DTQ7VJJ.js.map} +0 -0
- /package/dist/{issue-64N6OG7U.js.map → ledger-EDXFFZQL.js.map} +0 -0
- /package/dist/{ledger-ZAFULLAF.js.map → liberate-V35QUHJP.js.map} +0 -0
- /package/dist/{liberate-XL6NSGOL.js.map → link-set-2TTM3IZC.js.map} +0 -0
- /package/dist/{link-set-LQI2IJX6.js.map → managed-secret-NCWEMPUQ.js.map} +0 -0
- /package/dist/{managed-secret-7OH7HKXV.js.map → noydb-62MX4QUG.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-HHLXEQDN.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-JS3YFQQM.js.map} +0 -0
- /package/dist/{registry-JFFENZ44.js.map → registry-XX2Z7B46.js.map} +0 -0
- /package/dist/{registry-ZA4HACYR.js.map → request-withdrawal-CHPATE4G.js.map} +0 -0
- /package/dist/{request-withdrawal-7IKUIAEB.js.map → revoke-7M2VW4ON.js.map} +0 -0
- /package/dist/{revoke-PUJKRYJF.js.map → signer-SJQJVSM6.js.map} +0 -0
- /package/dist/{signer-5TA7FUC3.js.map → stale-BZS6H2RY.js.map} +0 -0
- /package/dist/{stale-HZR7745Y.js.map → storage-RW4QBS23.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-ZURCH6RZ.js.map} +0 -0
- /package/dist/{walk-3PA4ZOKS.js.map → withdraw-accessible-PXR4IXDX.js.map} +0 -0
|
@@ -66,10 +66,10 @@ export interface WrappedDeksBlob {
|
|
|
66
66
|
* PIN). Caller normalization rules apply (e.g. paper
|
|
67
67
|
* recovery uppercase-strips the code before reaching this function).
|
|
68
68
|
*
|
|
69
|
-
* @param deks - DEK set to wrap.
|
|
70
|
-
* `
|
|
71
|
-
*
|
|
72
|
-
*
|
|
69
|
+
* @param deks - DEK set to wrap. Serialized through the enclave's
|
|
70
|
+
* `exportDekSet` door (the hub mints DEKs extractable;
|
|
71
|
+
* consumers feeding non-extractable keys will get
|
|
72
|
+
* `InvalidAccessError` from WebCrypto).
|
|
73
73
|
* @param credential - String input the consumer minted (paper code,
|
|
74
74
|
* password, PIN). Treated as opaque bytes by PBKDF2.
|
|
75
75
|
*/
|
package/dist/with-pod/pod.d.ts
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* *unwrapped JSON string*, not a Vault object. The caller
|
|
28
28
|
* is responsible for piping that JSON into
|
|
29
29
|
* `vault.load(json, secret)`. Splitting the layers
|
|
30
|
-
* keeps
|
|
30
|
+
* keeps `format.ts` free of any crypto/secret
|
|
31
31
|
* concerns — it's purely a format layer. The same `readPod`
|
|
32
32
|
* call can also feed verification tools, format inspectors, or
|
|
33
33
|
* archive utilities that don't care about decryption.
|
|
@@ -51,7 +51,7 @@ export type AutoCredentialKind = 'secret' | 'password' | 'pin';
|
|
|
51
51
|
* correct login/prefill path rather than treating all credentials
|
|
52
52
|
* as secrets.
|
|
53
53
|
*
|
|
54
|
-
* `
|
|
54
|
+
* `format.ts` is a pure format layer — it carries the credential
|
|
55
55
|
* without interpreting it. The consumer is responsible for
|
|
56
56
|
* dispatching on `kind`.
|
|
57
57
|
*/
|
|
@@ -274,7 +274,7 @@ export interface WritePodOptions {
|
|
|
274
274
|
* bundle that is missing something, and the defect surfaces later — in
|
|
275
275
|
* whoever imports it — with nothing left to trace it back to.
|
|
276
276
|
*
|
|
277
|
-
* `
|
|
277
|
+
* `pod-option-keys.test.ts` parses `WritePodOptions` out of this file and
|
|
278
278
|
* fails if the two ever drift, so adding an option is enough; you do not have
|
|
279
279
|
* to remember to update this list, only to keep the interface shape parseable.
|
|
280
280
|
*
|
|
@@ -285,7 +285,7 @@ export declare const WRITE_POD_OPTION_KEYS: readonly ["compression", "collection
|
|
|
285
285
|
* Result returned by `readPod`. The caller is expected to
|
|
286
286
|
* pass `dumpJson` into `vault.load(json, secret)` to
|
|
287
287
|
* actually restore a vault. Splitting the layers keeps the
|
|
288
|
-
*
|
|
288
|
+
* `format.ts` free of crypto concerns — see file-level docs.
|
|
289
289
|
*/
|
|
290
290
|
export interface PodReadResult {
|
|
291
291
|
readonly header: NoydbPodHeader;
|
|
@@ -46,6 +46,13 @@ export interface DerivationBehaviorEntry {
|
|
|
46
46
|
readonly collection: string;
|
|
47
47
|
readonly on: string;
|
|
48
48
|
readonly maxFanout?: number;
|
|
49
|
+
} | {
|
|
50
|
+
readonly collection: string;
|
|
51
|
+
readonly match: ReadonlyArray<{
|
|
52
|
+
readonly from: string;
|
|
53
|
+
readonly to: string;
|
|
54
|
+
}>;
|
|
55
|
+
readonly maxFanout?: number;
|
|
49
56
|
}>;
|
|
50
57
|
readonly rollup?: {
|
|
51
58
|
readonly from: string;
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
13
|
import type { FieldMeta } from './field-meta.js';
|
|
14
|
-
import { FieldMetaUnknownFieldError } from './field-meta.js';
|
|
14
|
+
import { FieldMetaUnknownFieldError, schemaFieldKeys } from './field-meta.js';
|
|
15
|
+
export { schemaFieldKeys };
|
|
15
16
|
import type { CollectionMeta } from './meta.js';
|
|
16
17
|
import type { ViaDescriptor, ViaPosture } from '../../kernel/via/index.js';
|
|
17
18
|
import type { DictKeyDescriptor, StaticDictDescriptor } from '../../via/i18n/dictionary.js';
|
|
@@ -223,6 +224,14 @@ export interface BuildDescriptionInput {
|
|
|
223
224
|
readonly refs: Record<string, RefDescriptor>;
|
|
224
225
|
/** Async path fills this; sync path passes `undefined`. */
|
|
225
226
|
readonly zodFields: Record<string, ZodFieldSlot> | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* The collection's configured validator, if any. The sync path passes it so
|
|
229
|
+
* `fieldMeta` keys can still be validated (#1253): field KEYS are readable
|
|
230
|
+
* synchronously via {@link schemaFieldKeys} even though field TYPES are not.
|
|
231
|
+
* `undefined` means no validator is configured, which is itself informative
|
|
232
|
+
* — the config keys are then the complete field set.
|
|
233
|
+
*/
|
|
234
|
+
readonly schema?: unknown;
|
|
226
235
|
/**
|
|
227
236
|
* Async path: when `resolveDictLabels` was true, this map holds
|
|
228
237
|
* `{ dictName -> { value -> label } }` for dynamic dictKey fields.
|
|
@@ -59,3 +59,89 @@ export interface ResolvedMeta extends Partial<FieldMeta> {
|
|
|
59
59
|
export declare function humanizeFieldKey(key: string): string;
|
|
60
60
|
/** Merge one field's metadata: channel > zodMeta > inferred; label always present. */
|
|
61
61
|
export declare function resolveFieldMeta(key: string, inputs: MergeInputs): ResolvedMeta;
|
|
62
|
+
/**
|
|
63
|
+
* Field KEYS from a configured validator, synchronously — the complement to
|
|
64
|
+
* {@link deriveZodFields}, which derives field TYPES and must be async.
|
|
65
|
+
*
|
|
66
|
+
* The distinction is the whole point (#1253). `describe()`'s sync path passed
|
|
67
|
+
* `zodFields: undefined`, so `fieldMeta` key-validation could never run there
|
|
68
|
+
* and a typo'd key became a PHANTOM FIELD carrying its declared `sensitivity`
|
|
69
|
+
* while the real field went undescribed — an inventory wrong in both
|
|
70
|
+
* directions, silently, on the surface `sensitivity` exists to serve.
|
|
71
|
+
*
|
|
72
|
+
* That was read as unavoidable ("the sync path cannot know the schema's
|
|
73
|
+
* fields"), which is true of types and false of keys: a Zod object exposes
|
|
74
|
+
* `.shape` directly, on both v3 and v4, with no JSON-Schema derivation and no
|
|
75
|
+
* `zod-to-json-schema` peer. The latter matters — on Zod 3 that peer is
|
|
76
|
+
* required for the async path, so the sync path is the only one some
|
|
77
|
+
* consumers can reach.
|
|
78
|
+
*
|
|
79
|
+
* A duck-typed probe, not a Zod dependency: an unrecognised validator returns
|
|
80
|
+
* `undefined` and the caller stays silent rather than guessing, so a validator
|
|
81
|
+
* hub cannot read never produces a false "unknown field" error.
|
|
82
|
+
*
|
|
83
|
+
* Wrappers (reported by the pilot on #1249's guard, and it equally affected
|
|
84
|
+
* #1253's): a wrapped object's `.shape` is undefined, so "has a schema" and
|
|
85
|
+
* "hub can enumerate its fields" silently diverged for exactly the schemas
|
|
86
|
+
* most worth guarding — validated ones.
|
|
87
|
+
*
|
|
88
|
+
* ONE RULE UNWRAPS ALL OF THEM: FOLLOW THE OUTPUT SIDE. These keys describe
|
|
89
|
+
* the PARSED record, so the only question a wrapper raises is whether it
|
|
90
|
+
* changes the parsed shape.
|
|
91
|
+
*
|
|
92
|
+
* Zod 3 `ZodEffects` — `.refine()`/`.superRefine()` (`effect.type` is
|
|
93
|
+
* `'refinement'`) and `z.preprocess()` (`'preprocess'`) both parse WITH
|
|
94
|
+
* the inner schema, so the output is the inner object: follow
|
|
95
|
+
* `_def.schema`. `.transform()` REPLACES the output, so the inner keys
|
|
96
|
+
* would be a lie: stay `undefined`, deliberately.
|
|
97
|
+
* Zod 4 `ZodPipe` — `z.preprocess()` is `pipe(transform -> object)` and
|
|
98
|
+
* `.transform()` is `pipe(object -> transform)`. Following `_def.out`
|
|
99
|
+
* resolves both correctly with no effect-kind test: preprocess reaches the
|
|
100
|
+
* object, transform reaches a `ZodTransform` that has no shape and no
|
|
101
|
+
* inner schema, so the loop returns `undefined` on its own.
|
|
102
|
+
*
|
|
103
|
+
* `preprocess` was the pilot's second finding (#1262): the first fix followed
|
|
104
|
+
* refinements only, which left four of their registered collections unguarded
|
|
105
|
+
* — including the one carrying their only `fieldMeta` PII declaration, i.e.
|
|
106
|
+
* precisely the collection #1253 was written for. It is one string away from
|
|
107
|
+
* `transform` and means the opposite thing, so a test pins the two apart.
|
|
108
|
+
*
|
|
109
|
+
* A duck-typed probe throughout: an unrecognised validator returns `undefined`
|
|
110
|
+
* and the caller stays silent rather than guessing. Bounded depth, so a cyclic
|
|
111
|
+
* duck cannot hang us.
|
|
112
|
+
*/
|
|
113
|
+
export declare function schemaFieldKeys(schema: unknown): readonly string[] | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Registration-time `fieldMeta` key check (#1253 follow-up, the "refuse as early
|
|
116
|
+
* as the information allows" pass).
|
|
117
|
+
*
|
|
118
|
+
* The same validation `buildDescription` runs, hoisted to collection
|
|
119
|
+
* construction so a typo is refused when it is DECLARED rather than when
|
|
120
|
+
* someone happens to call `describe()`. A collection nobody describes was
|
|
121
|
+
* previously never checked at all — and `fieldMeta` is what carries
|
|
122
|
+
* `sensitivity`, so the un-checked case was the one with a data-classification
|
|
123
|
+
* inventory hanging off it.
|
|
124
|
+
*
|
|
125
|
+
* Deliberately NOT a replacement for the check inside `buildDescription`. There
|
|
126
|
+
* are three tiers of knowability, not two:
|
|
127
|
+
*
|
|
128
|
+
* always — a name declared in the config itself (see the virtual-field
|
|
129
|
+
* refusal in the derivation registry: "declared and never
|
|
130
|
+
* stored" needs no schema at all)
|
|
131
|
+
* at reg. — a validator whose `.shape` is readable synchronously: THIS
|
|
132
|
+
* at describe — a validator whose fields only exist after async JSON-Schema
|
|
133
|
+
* derivation (Zod 3 + `zod-to-json-schema`)
|
|
134
|
+
*
|
|
135
|
+
* The third tier is why `buildDescription` keeps its own call. Hoisting alone
|
|
136
|
+
* would move the check earlier for some collections and REMOVE it for others.
|
|
137
|
+
*
|
|
138
|
+
* Silent when the field set cannot be enumerated, exactly as the describe-time
|
|
139
|
+
* check is: a TS-generic collection names real fields that appear in no runtime
|
|
140
|
+
* config, and rejecting those teaches people to stop declaring `fieldMeta`.
|
|
141
|
+
*/
|
|
142
|
+
export declare function validateFieldMetaAtRegistration(input: {
|
|
143
|
+
readonly collection: string;
|
|
144
|
+
readonly schema?: unknown;
|
|
145
|
+
readonly fieldMeta?: Record<string, unknown> | undefined;
|
|
146
|
+
readonly configKeys: readonly string[];
|
|
147
|
+
}): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FROZEN_SNAPSHOTS_COLLECTION,
|
|
3
|
+
freezeAndDeleteClosure,
|
|
4
|
+
freezeSnapshotOnly,
|
|
5
|
+
randomId,
|
|
6
|
+
withdrawAccessibleData
|
|
7
|
+
} from "./chunk-3BVH633C.js";
|
|
8
|
+
import "./chunk-JVIBCBC7.js";
|
|
9
|
+
import "./chunk-BVN6KXL2.js";
|
|
10
|
+
import "./chunk-EQEYOJBM.js";
|
|
11
|
+
import "./chunk-4ZS56W5S.js";
|
|
12
|
+
import "./chunk-SZJ3DLZA.js";
|
|
13
|
+
import "./chunk-BRLKZUBT.js";
|
|
14
|
+
import "./chunk-BTDR2PXY.js";
|
|
15
|
+
import "./chunk-CHQCZZWC.js";
|
|
16
|
+
import "./chunk-LP7BEXCT.js";
|
|
17
|
+
import "./chunk-HPVZCW43.js";
|
|
18
|
+
import "./chunk-7MG7SJT7.js";
|
|
19
|
+
import "./chunk-7O3Y4PPD.js";
|
|
20
|
+
export {
|
|
21
|
+
FROZEN_SNAPSHOTS_COLLECTION,
|
|
22
|
+
freezeAndDeleteClosure,
|
|
23
|
+
freezeSnapshotOnly,
|
|
24
|
+
randomId,
|
|
25
|
+
withdrawAccessibleData
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=withdraw-accessible-PXR4IXDX.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noy-db/hub",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-pre.0",
|
|
4
4
|
"description": "Zero-knowledge, offline-first, encrypted document store — core library with AES-256-GCM, PBKDF2, multi-user keyring, and sync engine",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "vLannaAi <vicio@lanna.ai>",
|
|
@@ -233,19 +233,24 @@
|
|
|
233
233
|
"node": ">=22.0.0"
|
|
234
234
|
},
|
|
235
235
|
"dependencies": {
|
|
236
|
-
"@noy-db/attestation": "0.7.
|
|
236
|
+
"@noy-db/attestation": "0.7.1-pre.0"
|
|
237
237
|
},
|
|
238
238
|
"devDependencies": {
|
|
239
239
|
"@types/node": "^22.0.0",
|
|
240
240
|
"esbuild": "^0.25.0",
|
|
241
|
+
"happy-dom": "^18.0.0",
|
|
241
242
|
"zod": "^4.0.0",
|
|
242
243
|
"zod-to-json-schema": "^3.25.2",
|
|
243
|
-
"@noy-db/
|
|
244
|
+
"@noy-db/shamir": "0.7.1-pre.0"
|
|
244
245
|
},
|
|
245
246
|
"peerDependencies": {
|
|
247
|
+
"zod": "^3.0.0 || ^4.0.0",
|
|
246
248
|
"zod-to-json-schema": "^3.25.0"
|
|
247
249
|
},
|
|
248
250
|
"peerDependenciesMeta": {
|
|
251
|
+
"zod": {
|
|
252
|
+
"optional": true
|
|
253
|
+
},
|
|
249
254
|
"zod-to-json-schema": {
|
|
250
255
|
"optional": true
|
|
251
256
|
}
|
package/dist/api-GJQF7OAJ.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
UserApi,
|
|
3
|
-
createUserApi
|
|
4
|
-
} from "./chunk-357ECVLE.js";
|
|
5
|
-
import "./chunk-MV2OEK3K.js";
|
|
6
|
-
import "./chunk-DOPZWTMJ.js";
|
|
7
|
-
import "./chunk-4RUFYGWG.js";
|
|
8
|
-
import "./chunk-XGXVPCYW.js";
|
|
9
|
-
import "./chunk-CWFH36SI.js";
|
|
10
|
-
import "./chunk-KZTPL7NL.js";
|
|
11
|
-
import "./chunk-LP7BEXCT.js";
|
|
12
|
-
import "./chunk-USKHHOIV.js";
|
|
13
|
-
import "./chunk-N4CHCXDL.js";
|
|
14
|
-
import "./chunk-SW4TOSJL.js";
|
|
15
|
-
import "./chunk-PZ5AY32C.js";
|
|
16
|
-
export {
|
|
17
|
-
UserApi,
|
|
18
|
-
createUserApi
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=api-GJQF7OAJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-pod/backup.ts"],"sourcesContent":["/**\n * Vault backup / restore / integrity.\n *\n * Holds `dump()` (verifiable encrypted JSON backup, including the blob\n * collections so blob \"covers\" travel in the bundle), `load()` (restore +\n * post-load integrity gate), `verifyBackupIntegrity()` (chain + data-envelope\n * cross-check), and `exportJSON()` (plaintext per-collection export, built on\n * the vault's `exportStream`). Behaviour is byte-identical to the inline\n * `Vault` methods these functions replaced — every dependency the moving code\n * touched on `this.*` arrives via {@link BackupContext}. `Vault` keeps the\n * public methods as thin delegators.\n *\n * Internal — reached through `vault.dump()` / `vault.load()` / etc.\n */\nimport { NOYDB_BACKUP_VERSION } from '../kernel/types.js'\nimport { BackupLedgerError, BackupCorruptedError } from '../kernel/errors.js'\nimport { LEDGER_COLLECTION, LEDGER_DELTAS_COLLECTION } from '../with-commit/history/ledger/constants.js'\nimport { SCHEMAS_COLLECTION } from '../with-shape/persisted-schemas/storage.js'\nimport { SEQUENCE_COLLECTION } from '../with-commit/sequence/index.js'\nimport { MANIFEST_COLLECTION } from '../with-shape/manifest/reserved-collections.js'\n// #1025 — imported from the dependency-light `window.ts`, not `periods.ts`: that\n// module exists precisely so a consumer can name the period collections without\n// dragging the ledger hash-chain machinery (`sha256Hex`/`canonicalJson`) into a\n// bundle that opted out of the periods service. Same reason the sync engine's\n// period-scoped pull imports it.\nimport {\n PERIODS_COLLECTION,\n PERIOD_FREEZES_COLLECTION,\n PERIOD_ARCHIVES_COLLECTION,\n PERIOD_TARGET_PURGES_COLLECTION,\n PERIOD_REOPENS_COLLECTION,\n} from '../with-audit/periods/window.js'\nimport type {\n NoydbStore,\n EncryptedEnvelope,\n VaultBackup,\n VaultSnapshot,\n ExportStreamOptions,\n ExportChunk,\n} from '../kernel/types.js'\nimport type { LedgerStore } from '../with-commit/history/ledger/store.js'\nimport { buildRecordEnvelope } from '../kernel/enclave/index.js'\n\n/** Everything the moving backup methods touched on the vault's `this.*`. */\nexport interface BackupContext {\n /** The ciphertext store. */\n readonly adapter: NoydbStore\n /** Vault namespace name. */\n readonly vault: string\n /** The invoking keyring's user id (read fresh per call). */\n userId(): string\n /** The vault's ledger store, or null when history is off. */\n getLedgerOrNull(): LedgerStore | null\n /** Recompute an envelope's `payloadHash` (bound `historyStrategy.envelopePayloadHash`). */\n envelopePayloadHash(envelope: EncryptedEnvelope): Promise<string>\n /**\n * Refresh the in-memory keyring from the freshly-loaded keyring file and\n * rebuild the DEK resolver. No-op when the vault has no `reloadKeyring`\n * callback (plaintext vaults / test constructions).\n */\n reloadKeyringAndRebuildDEK(): Promise<void>\n /** Clear the vault's collection cache (post-load). */\n clearCollectionCache(): void\n /** Reset the ledger store so the next `ledger()` rebuilds its head cache. */\n resetLedgerStore(): void\n /** The vault's decrypt+ACL export stream (used by `exportJSON`). */\n exportStream(opts: ExportStreamOptions): AsyncIterableIterator<ExportChunk>\n}\n\n/** Result of {@link verifyBackupIntegrity}. */\nexport type VerifyBackupResult =\n | { readonly ok: true; readonly head: string; readonly length: number }\n | {\n readonly ok: false\n readonly kind: 'chain'\n readonly divergedAt: number\n readonly message: string\n }\n | {\n readonly ok: false\n readonly kind: 'data'\n readonly collection: string\n readonly id: string\n readonly message: string\n }\n\n/**\n * Dump vault as a verifiable encrypted JSON backup string.\n *\n * backups embed the current ledger head and the full `_ledger` +\n * `_ledger_deltas` internal collections so the receiver can run\n * `verifyBackupIntegrity()` after `load()` and detect any tampering between\n * dump and restore. Backups produced without a ledger skip the integrity check\n * with a warning — both modes round-trip cleanly.\n */\nexport async function dumpVault(ctx: BackupContext): Promise<string> {\n const snapshot = await ctx.adapter.loadAll(ctx.vault)\n\n // Load keyrings (separate path because loadAll filters them out\n // along with all other underscore-prefixed internal collections).\n const keyringIds = await ctx.adapter.list(ctx.vault, '_keyring')\n const keyrings: Record<string, unknown> = {}\n for (const keyringId of keyringIds) {\n const envelope = await ctx.adapter.get(ctx.vault, '_keyring', keyringId)\n if (envelope) {\n keyrings[keyringId] = JSON.parse(envelope._data)\n }\n }\n\n // Load the ledger entries + deltas so the receiver can replay\n // the chain after restore. Without this, `load()` would have an\n // empty ledger and `verifyBackupIntegrity()` would have nothing\n // to compare against.\n //\n // Also enumerate the blob collections so blob content (\"covers\")\n // travels in the bundle (the blob DEK already travels in `_keyring`).\n // Literals are inlined (not imported from blobs/blob-set.ts) to keep\n // the blob runtime out of this kernel hot path — they mirror\n // BLOB_INDEX/CHUNKS/EVICTION_AUDIT_COLLECTION and SLOTS/VERSIONS_PREFIX.\n // The collect-loop skips empty ids, so this no-ops without blobs.\n const internalSnapshot: VaultSnapshot = {}\n const internalNames = [\n LEDGER_COLLECTION, LEDGER_DELTAS_COLLECTION, SCHEMAS_COLLECTION, SEQUENCE_COLLECTION,\n MANIFEST_COLLECTION, // #941: the pod's manifest-set record(s) travel in the bundle too\n // #1025: the accounting-period close state + its companions. The bundle is\n // the backup/restore path, so without these a restore discarded the\n // hash-chained evidence that a month was ever closed — the artifact\n // `closePeriod` exists to produce — and dropped the write gate with it, so\n // the restored vault silently accepted back-dated writes into a sealed\n // month. The companions matter as much as the close: a bounded reopen\n // window (`reopenPeriod({ until })`) is state a restore must not lose.\n PERIODS_COLLECTION,\n PERIOD_REOPENS_COLLECTION,\n PERIOD_FREEZES_COLLECTION,\n PERIOD_ARCHIVES_COLLECTION,\n PERIOD_TARGET_PURGES_COLLECTION,\n '_history', // full-snapshot version history — so history()/getVersion()/diff() survive the bundle\n '_blob_index', '_blob_chunks', '_blob_eviction_audit',\n // #753 spec §7 Q3: `_blob_intent` markers travel too — restoring mid-op\n // state (a blob row without its marker) would reproduce the ambiguity\n // the journal exists to prevent. Note: `_mv_stale` does NOT travel\n // today (a pre-existing, separate gap) — observed here, tracked on\n // #761, not fixed in this pass.\n '_blob_intent',\n // #769: `_blob_slots_<c>` envelopes travel verbatim (raw ciphertext,\n // same DEK, same vault) — including any `SlotRecord.pendingRelease`\n // resume breadcrumb they carry. This is INTENTIONALLY the opposite of\n // `extract-partition`'s `reKeyBlobs`, which STRIPS `pendingRelease`:\n // a full-vault backup restores into the SAME vault it was taken from,\n // so a breadcrumb taken mid-rehome (together with its `_blob_intent`\n // marker, carried above) is resumable on restore — carry-and-resume is\n // correct here. A partition extraction crosses vaults: the breadcrumb's\n // old eTag may not exist in the destination, so it must be stripped\n // there instead. Asymmetry: backup = same-vault-resumable = carry;\n // partition = cross-vault = strip-breadcrumb-carry-marker.\n ...Object.keys(snapshot).flatMap((c) => [`_blob_slots_${c}`, `_blob_versions_${c}`]),\n ]\n for (const internalName of internalNames) {\n const ids = await ctx.adapter.list(ctx.vault, internalName)\n if (ids.length === 0) continue\n const records: Record<string, EncryptedEnvelope> = {}\n for (const id of ids) {\n const envelope = await ctx.adapter.get(ctx.vault, internalName, id)\n if (envelope) records[id] = envelope\n }\n internalSnapshot[internalName] = records\n }\n\n // Embed the ledger head if there's a chain. An empty ledger\n // (fresh vault) leaves `ledgerHead` undefined, which\n // load() treats the same as a legacy backup (no integrity\n // check, console warning). If history is not opted in,\n // `getLedgerOrNull` returns null and we skip embedding entirely\n // — the backup is still valid, just without the integrity head.\n const ledgerForHead = ctx.getLedgerOrNull()\n const head = ledgerForHead ? await ledgerForHead.head() : null\n const backup: VaultBackup = {\n _noydb_backup: NOYDB_BACKUP_VERSION,\n _compartment: ctx.vault,\n _exported_at: new Date().toISOString(),\n _exported_by: ctx.userId(),\n keyrings: keyrings as VaultBackup['keyrings'],\n collections: snapshot,\n ...(Object.keys(internalSnapshot).length > 0\n ? { _internal: internalSnapshot }\n : {}),\n ...(head\n ? {\n ledgerHead: {\n hash: head.hash,\n index: head.entry.index,\n ts: head.entry.ts,\n },\n }\n : {}),\n }\n\n return JSON.stringify(backup)\n}\n\n/**\n * Restore a vault from a verifiable backup. After loading, runs\n * `verifyBackupIntegrity()` to confirm the hash chain, the embedded head, and\n * every data envelope's payload hash. Legacy backups (no `ledgerHead`) load\n * with a console warning and skip the integrity check.\n */\nexport async function loadVault(ctx: BackupContext, backupJson: string): Promise<void> {\n const backup = JSON.parse(backupJson) as VaultBackup\n\n // 1. Restore data collections.\n await ctx.adapter.saveAll(ctx.vault, backup.collections)\n\n // 2. Restore keyrings.\n for (const [userId, keyringFile] of Object.entries(backup.keyrings)) {\n const envelope = buildRecordEnvelope({ collection: '_keyring', id: userId, version: 1 },\n { iv: '', data: JSON.stringify(keyringFile) })\n await ctx.adapter.put(ctx.vault, '_keyring', userId, envelope)\n }\n\n // 3. Restore internal collections (`_ledger`, `_ledger_deltas`).\n // Required so verifyBackupIntegrity has the chain to walk.\n if (backup._internal) {\n for (const [internalName, records] of Object.entries(backup._internal)) {\n for (const [id, envelope] of Object.entries(records)) {\n await ctx.adapter.put(ctx.vault, internalName, id, envelope)\n }\n }\n }\n\n // 4. Refresh the in-memory keyring from the freshly-loaded\n // keyring file. Without this, the Vault's getDEK\n // closure still holds the OLD session's DEKs, and every\n // decrypt of a loaded ledger entry / data envelope fails\n // with TamperedError because the DEK doesn't match the\n // ciphertext that was encrypted with the SOURCE user's DEK.\n // Skipped for plaintext vaults and for tests that\n // construct Vault without a reloadKeyring callback.\n await ctx.reloadKeyringAndRebuildDEK()\n\n // 5. Clear collection cache + reset the ledger store so the\n // next ledger() call rebuilds its head cache from the\n // freshly-loaded entries.\n ctx.clearCollectionCache()\n ctx.resetLedgerStore()\n\n // 5. Run the verification gate. Legacy backups (no ledgerHead)\n // skip this with a one-line warning so existing consumers can\n // still read them while migrating.\n if (!backup.ledgerHead) {\n console.warn(\n `[noy-db] Loaded a legacy backup with no ledgerHead — ` +\n `verifiable-backup integrity check skipped. ` +\n `Re-export with a ledger-aware build to get tamper detection.`,\n )\n return\n }\n\n const result = await verifyBackupIntegrity(ctx)\n if (!result.ok) {\n // Surface the most specific error class we can. The result\n // shape carries enough info for callers to inspect.\n if (result.kind === 'data') {\n throw new BackupCorruptedError(\n result.collection,\n result.id,\n result.message,\n )\n }\n throw new BackupLedgerError(result.message, result.divergedAt)\n }\n\n // 6. Cross-check: the freshly-verified head must match the\n // value embedded at dump time. A mismatch means someone\n // truncated or extended the chain after dump.\n if (result.head !== backup.ledgerHead.hash) {\n throw new BackupLedgerError(\n `Backup ledger head mismatch: embedded \"${backup.ledgerHead.hash}\" ` +\n `but reconstructed \"${result.head}\".`,\n )\n }\n}\n\n/**\n * End-to-end backup integrity check: `ledger.verify()` (hash chain) plus a data\n * envelope cross-check (every current record's `_data` hash must match the\n * latest `put` entry's `payloadHash`). Returns a discriminated union so callers\n * can distinguish chain vs data failures.\n */\nexport async function verifyBackupIntegrity(ctx: BackupContext): Promise<VerifyBackupResult> {\n // Step 1: chain verification. Without the history strategy there\n // is no ledger; an unaudited backup verifies trivially as `ok`\n // because there's nothing to diverge from.\n const ledgerForVerify = ctx.getLedgerOrNull()\n if (!ledgerForVerify) {\n return { ok: true, head: '', length: 0 }\n }\n const chainResult = await ledgerForVerify.verify()\n if (!chainResult.ok) {\n return {\n ok: false,\n kind: 'chain',\n divergedAt: chainResult.divergedAt,\n message:\n `Ledger chain diverged at index ${chainResult.divergedAt}: ` +\n `expected prevHash \"${chainResult.expected}\" but found \"${chainResult.actual}\".`,\n }\n }\n\n // Step 2: data envelope cross-check. Walk every entry in the\n // ledger and, for the LATEST `put` per (collection, id), recompute\n // the data envelope's payloadHash and compare. Earlier puts of the\n // same id are skipped because the data collection only holds the\n // current version — historical envelopes live in the deltas\n // collection (which is itself protected by the chain).\n // Reuse the ledger we already resolved in step 1.\n const allEntries = await ledgerForVerify.loadAllEntries()\n\n // Find the latest non-delete entry per (collection, id). Walk\n // the entries in reverse so we hit the latest first; mark each\n // (collection, id) as seen and skip subsequent entries.\n const seen = new Set<string>()\n const latest = new Map<\n string,\n { collection: string; id: string; expectedHash: string }\n >()\n for (let i = allEntries.length - 1; i >= 0; i--) {\n const entry = allEntries[i]\n if (!entry) continue\n // Amendment entries are multi-record audit entries whose\n // `collection` and `id` are empty strings — building a `\"/\"`\n // key here would mark that synthetic slot as seen and falsely\n // trip the data check on a record that never existed. Skip\n // them BEFORE the key/seen bookkeeping so they neither\n // tombstone real entries nor enter the latest map.\n if (entry.op === 'amendment' || entry.op === 'lifecycle') continue\n const key = `${entry.collection}/${entry.id}`\n if (seen.has(key)) continue\n seen.add(key)\n // For deletes the data collection should NOT have the record,\n // so we skip — there's nothing to cross-check. Marking the key\n // as seen above ensures any earlier `put` of the same id is\n // also skipped (the record was subsequently deleted).\n if (entry.op === 'delete') continue\n latest.set(key, {\n collection: entry.collection,\n id: entry.id,\n expectedHash: entry.payloadHash,\n })\n }\n\n for (const { collection, id, expectedHash } of latest.values()) {\n const envelope = await ctx.adapter.get(ctx.vault, collection, id)\n if (!envelope) {\n return {\n ok: false,\n kind: 'data',\n collection,\n id,\n message:\n `Ledger expects data record \"${collection}/${id}\" to exist, ` +\n `but the adapter has no envelope for it.`,\n }\n }\n const actualHash = await ctx.envelopePayloadHash(envelope)\n if (actualHash !== expectedHash) {\n return {\n ok: false,\n kind: 'data',\n collection,\n id,\n message:\n `Data envelope \"${collection}/${id}\" has been tampered with: ` +\n `expected payloadHash \"${expectedHash}\", got \"${actualHash}\".`,\n }\n }\n }\n\n return {\n ok: true,\n head: chainResult.head,\n length: chainResult.length,\n }\n}\n\n/**\n * Plaintext per-collection export, built on the vault's `exportStream`. Forces\n * collection granularity (record-by-record output makes no sense in a single\n * string) and merges dictionary snapshots across collections.\n */\nexport async function exportVaultJSON(ctx: BackupContext, opts: ExportStreamOptions = {}): Promise<string> {\n // Force per-collection granularity regardless of caller setting:\n // record-by-record output doesn't make sense in a single string.\n const collections: Record<\n string,\n {\n schema: null\n refs: Record<string, { target: string; mode: 'strict' | 'warn' | 'cascade' }>\n records: unknown[]\n }\n > = {}\n let ledgerHead: ExportChunk['ledgerHead'] | undefined\n // Merged dictionary snapshot across all collections.\n // Only populated when `resolveLabels` is not set.\n const allDictionaries: Record<\n string, // collection name\n Record<string, Record<string, Record<string, string>>>\n > = {}\n\n for await (const chunk of ctx.exportStream({\n granularity: 'collection',\n withLedgerHead: opts.withLedgerHead === true,\n // Thread the export locale so records are read at the\n // `export` layer (i18nText collapsed + dictKey/staticDict labels resolved).\n ...(opts.resolveLabels !== undefined ? { resolveLabels: opts.resolveLabels } : {}),\n })) {\n collections[chunk.collection] = {\n schema: null, // Standard Schema validators are not JSON-serializable\n refs: chunk.refs,\n records: chunk.records,\n }\n if (chunk.ledgerHead) ledgerHead = chunk.ledgerHead\n // Collect dictionary snapshots unless resolveLabels is set\n if (!opts.resolveLabels && chunk.dictionaries) {\n allDictionaries[chunk.collection] = chunk.dictionaries\n }\n }\n\n const hasDictionaries = Object.keys(allDictionaries).length > 0\n return JSON.stringify({\n _noydb_export: 1,\n _compartment: ctx.vault,\n _exported_at: new Date().toISOString(),\n _exported_by: ctx.userId(),\n collections,\n ...(hasDictionaries ? { _dictionaries: allDictionaries } : {}),\n ...(ledgerHead ? { ledgerHead } : {}),\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+FA,eAAsB,UAAU,KAAqC;AACnE,QAAM,WAAW,MAAM,IAAI,QAAQ,QAAQ,IAAI,KAAK;AAIpD,QAAM,aAAa,MAAM,IAAI,QAAQ,KAAK,IAAI,OAAO,UAAU;AAC/D,QAAM,WAAoC,CAAC;AAC3C,aAAW,aAAa,YAAY;AAClC,UAAM,WAAW,MAAM,IAAI,QAAQ,IAAI,IAAI,OAAO,YAAY,SAAS;AACvE,QAAI,UAAU;AACZ,eAAS,SAAS,IAAI,KAAK,MAAM,SAAS,KAAK;AAAA,IACjD;AAAA,EACF;AAaA,QAAM,mBAAkC,CAAC;AACzC,QAAM,gBAAgB;AAAA,IACpB;AAAA,IAAmB;AAAA,IAA0B;AAAA,IAAoB;AAAA,IACjE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAC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rollup.ts"],"sourcesContent":["import { ValidationError } from '../../kernel/errors.js'\nimport type { DerivationSpec, DerivationStrategy } from './types.js'\n\n/**\n * Register a deterministic derivation: one source collection → one or\n * more typed outputs, computed by the user's `derive` function on\n * plaintext after DEK unwrap. Outputs are encrypted with the same DEK\n * as the source and written via the standard `Collection.put` path.\n *\n * See design-history/2026-05-01-dim14-derivation-v1-design.md.\n */\nexport function withDerivation<\n TSource extends Record<string, unknown>,\n TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>,\n>(spec: DerivationSpec<TSource, TOutputs>): DerivationStrategy {\n if (!spec.source || spec.source.length === 0) {\n throw new ValidationError('withDerivation: source collection name is required')\n }\n if (!spec.outputs || Object.keys(spec.outputs).length === 0) {\n throw new ValidationError('withDerivation: outputs map must declare at least one output')\n }\n if (spec.deterministic !== true) {\n throw new ValidationError('withDerivation: v1 only supports deterministic derivations')\n }\n if (typeof spec.derive !== 'function') {\n throw new ValidationError('withDerivation: derive must be a function')\n }\n\n // Validate declared sibling sources. Each must be a non-empty\n // string and must differ from the primary source — a self-reference\n // would double-register the strategy under the same `_bySource` key.\n if (spec.sources !== undefined) {\n for (const extra of spec.sources) {\n if (typeof extra !== 'string' || extra.length === 0) {\n throw new ValidationError('withDerivation: each entry in sources[] must be a non-empty string')\n }\n if (extra === spec.source) {\n throw new ValidationError(\n `withDerivation: sources[] must not contain the primary source \"${spec.source}\"`,\n )\n }\n }\n }\n\n // Validate FK triggers. Each `collection` must be a non-empty\n // string differing from the primary source, and `on` a non-empty field.\n if (spec.triggerBy !== undefined) {\n for (const t of spec.triggerBy) {\n if (typeof t?.collection !== 'string' || t.collection.length === 0) {\n throw new ValidationError('withDerivation: each triggerBy entry needs a non-empty `collection`')\n }\n if (t.collection === spec.source) {\n throw new ValidationError(\n `withDerivation: triggerBy.collection must not equal the source \"${spec.source}\" (use sources[] for same-id triggers)`,\n )\n }\n if (typeof t.on !== 'string' || t.on.length === 0) {\n throw new ValidationError(\n `withDerivation: triggerBy on \"${t.collection}\" needs a non-empty \\`on\\` (the FK field on the source)`,\n )\n }\n if (t.maxFanout !== undefined && (!Number.isInteger(t.maxFanout) || t.maxFanout < 1)) {\n throw new ValidationError(\n `withDerivation: triggerBy maxFanout on \"${t.collection}\" must be a positive integer (got ${String(t.maxFanout)}).`,\n )\n }\n }\n }\n\n // Validate array-shape outputs.\n const lifecycleMode = typeof spec.lifecycle === 'string' ? spec.lifecycle : spec.lifecycle.mode\n for (const [outputKey, outputSpec] of Object.entries(spec.outputs)) {\n // Self-write output (collection === source): reverse-denorm must declare\n // `denorm` (the fields it owns) — field-level provenance.\n if (outputSpec.shape === 'record' && outputSpec.collection === spec.source) {\n if (!outputSpec.denorm || outputSpec.denorm.length === 0) {\n throw new ValidationError(\n `withDerivation: self-write output \"${outputKey}\" (collection === source \"${spec.source}\") `\n + 'must declare `denorm: [...]` naming the fields it maintains.',\n )\n }\n }\n if (outputSpec.shape === 'array') {\n if (lifecycleMode !== 'eager') {\n throw new ValidationError(\n `withDerivation: shape 'array' supports lifecycle 'eager' only in this release `\n + `Output \"${outputKey}\" declared lifecycle '${lifecycleMode}'. `\n + 'Switch to `lifecycle: \"eager\"` or use shape: \"record\".',\n )\n }\n if (typeof outputSpec.key !== 'function') {\n throw new ValidationError(\n `withDerivation: shape 'array' output \"${outputKey}\" requires \\`key: (out) => string\\`.`,\n )\n }\n if (outputSpec.maxFanout !== undefined) {\n if (!Number.isInteger(outputSpec.maxFanout) || outputSpec.maxFanout < 1) {\n throw new ValidationError(\n `withDerivation: maxFanout for output \"${outputKey}\" must be a positive integer `\n + `(got ${String(outputSpec.maxFanout)}).`,\n )\n }\n }\n }\n }\n\n return {\n __noydb_strategy: 'derivation',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n spec: spec as DerivationSpec<any, any>,\n }\n}\n","import { ValidationError } from '../../kernel/errors.js'\nimport type { DerivationSpec, DerivationStrategy } from './types.js'\n\n/** Options for {@link withRollup} (#844b — was an inline literal, so unnameable). */\nexport interface WithRollupOptions<\n TChild extends Record<string, unknown> = Record<string, unknown>,\n TParent extends Record<string, unknown> = Record<string, unknown>,\n> {\n /** Child collection — the trigger. */\n readonly from: string\n /** FK field on the child pointing at the parent id. */\n readonly key: keyof TChild & string\n /** Parent collection carrying the maintained summary. */\n readonly into: string\n /** Field on the parent to maintain. */\n readonly field: keyof TParent & string\n /** Reduces the matching children to the value written at `field`. */\n readonly compute: (children: TChild[]) => unknown\n}\n\n/**\n * `withRollup` — aggregate many child records onto a single field of their\n * parent. The reverse of a join: instead of reading children\n * on demand, the parent carries a maintained summary.\n *\n * ```ts\n * withRollup<Sale, Buyer>({\n * from: 'sales', // child collection (the trigger)\n * key: 'buyerId', // FK on the child → parent id\n * into: 'buyers', // parent collection\n * field: 'revenueByYear', // field on the parent to maintain\n * compute: (sales) => groupSumByYear(sales, 'total'),\n * })\n * ```\n *\n * On every write OR delete of a `from` record, the parent at id `child[key]`\n * is recomputed: `compute(allChildren where child[key] === parentId)` is\n * patched onto `parent[field]`. A parent write also recomputes its own\n * aggregate (so a parent created after its children still fills in). Only the\n * `field` is touched — the rest of the parent record is never clobbered — and\n * a value-equality guard suppresses no-op writes. The aggregate is gap-free\n * with respect to child inserts, updates, and deletes.\n *\n * Desugars to a `withDerivation` strategy carrying a `rollup` marker; dispatch\n * handles it without invoking the executor. Eager-only in this slice.\n */\nexport function withRollup<\n TChild extends Record<string, unknown> = Record<string, unknown>,\n TParent extends Record<string, unknown> = Record<string, unknown>,\n>(opts: WithRollupOptions<TChild, TParent>): DerivationStrategy {\n const { from, key, into, field, compute } = opts\n if (!from || from.length === 0) {\n throw new ValidationError('withRollup: `from` (child collection) is required')\n }\n if (!into || into.length === 0) {\n throw new ValidationError('withRollup: `into` (parent collection) is required')\n }\n if (from === into) {\n throw new ValidationError('withRollup: `from` and `into` must be different collections')\n }\n if (!key || key.length === 0) {\n throw new ValidationError('withRollup: `key` (FK field on the child) is required')\n }\n if (!field || field.length === 0) {\n throw new ValidationError('withRollup: `field` (target field on the parent) is required')\n }\n if (typeof compute !== 'function') {\n throw new ValidationError('withRollup: `compute` must be a function')\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const spec: DerivationSpec<any, any> = {\n source: into, // the parent record is what carries the rolled-up field\n deterministic: true,\n rollup: { from, key, field, compute: compute as (children: unknown[]) => unknown },\n // Synthetic self-write output for registry / cycle bookkeeping. Dispatch\n // patches `field` directly (value-equality guarded); the executor is not run.\n outputs: { value: { shape: 'record', collection: into, denorm: [field] } },\n derive: () => ({ value: {} }), // never invoked for a rollup strategy\n lifecycle: 'eager',\n }\n\n return { __noydb_strategy: 'derivation', spec }\n}\n"],"mappings":";;;;;AAWO,SAAS,eAGd,MAA6D;AAC7D,MAAI,CAAC,KAAK,UAAU,KAAK,OAAO,WAAW,GAAG;AAC5C,UAAM,IAAI,gBAAgB,oDAAoD;AAAA,EAChF;AACA,MAAI,CAAC,KAAK,WAAW,OAAO,KAAK,KAAK,OAAO,EAAE,WAAW,GAAG;AAC3D,UAAM,IAAI,gBAAgB,8DAA8D;AAAA,EAC1F;AACA,MAAI,KAAK,kBAAkB,MAAM;AAC/B,UAAM,IAAI,gBAAgB,4DAA4D;AAAA,EACxF;AACA,MAAI,OAAO,KAAK,WAAW,YAAY;AACrC,UAAM,IAAI,gBAAgB,2CAA2C;AAAA,EACvE;AAKA,MAAI,KAAK,YAAY,QAAW;AAC9B,eAAW,SAAS,KAAK,SAAS;AAChC,UAAI,OAAO,UAAU,YAAY,MAAM,WAAW,GAAG;AACnD,cAAM,IAAI,gBAAgB,oEAAoE;AAAA,MAChG;AACA,UAAI,UAAU,KAAK,QAAQ;AACzB,cAAM,IAAI;AAAA,UACR,kEAAkE,KAAK,MAAM;AAAA,QAC/E;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAIA,MAAI,KAAK,cAAc,QAAW;AAChC,eAAW,KAAK,KAAK,WAAW;AAC9B,UAAI,OAAO,GAAG,eAAe,YAAY,EAA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