@noy-db/hub 0.8.0 → 0.9.0-pre.1
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 +49 -0
- package/README.md +8 -8
- package/codemods/0.4.0-pre.json +1 -1
- package/codemods/0.8.0-pre.json +1 -1
- package/dist/api-6EFD43KN.js +18 -0
- package/dist/as/index.js +33 -23
- package/dist/as/index.js.map +1 -1
- package/dist/at/index.js +8 -8
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-YE2VQ26S.js → backup-RJBFQSHE.js} +92 -31
- package/dist/backup-RJBFQSHE.js.map +1 -0
- package/dist/blobs/index.js +12 -12
- package/dist/broker/index.js +19 -11
- package/dist/broker/index.js.map +1 -1
- package/dist/by/index.js +2 -2
- package/dist/capsule/contract.d.ts +1 -1
- package/dist/capsule/contract.js +6 -6
- package/dist/capsule/enclave-aes/broker/proof.d.ts +12 -3
- package/dist/capsule/enclave-aes/crypto.d.ts +18 -0
- package/dist/capsule/enclave-aes/index.d.ts +3 -3
- package/dist/capsule/enclave-aes/index.js +46 -14
- package/dist/capsule/enclave-aes/index.js.map +1 -1
- package/dist/capsule/index.d.ts +2 -2
- package/dist/capsule/plumbing/record-codec.d.ts +7 -0
- package/dist/{capsule-VOLX3QRQ.js → capsule-6LJAVQNM.js} +14 -8
- package/dist/cargo/index.js +35 -35
- package/dist/{chunk-GZT3NQRA.js → chunk-25FXU6WS.js} +8 -2
- package/dist/chunk-25FXU6WS.js.map +1 -0
- package/dist/{chunk-OYW3I5M4.js → chunk-2DOCDOPL.js} +6 -6
- package/dist/chunk-2DX4JCRI.js +1 -0
- package/dist/{chunk-FLPCETP6.js → chunk-2LBS62AC.js} +2 -2
- package/dist/{chunk-WXE4W2U6.js → chunk-2ST3WA3C.js} +4 -4
- package/dist/{chunk-DQESF6RP.js → chunk-3G3GOGZZ.js} +50 -40
- package/dist/chunk-3G3GOGZZ.js.map +1 -0
- package/dist/{chunk-O2IMQSNA.js → chunk-3YBIVLTC.js} +2 -2
- package/dist/{chunk-LGNDFRYC.js → chunk-4CFHL5RY.js} +1 -1
- package/dist/chunk-4CFHL5RY.js.map +1 -0
- package/dist/{chunk-DIZLQVAA.js → chunk-4CHM2TRS.js} +2 -2
- package/dist/{chunk-V7ADQF5O.js → chunk-4CUJLEOA.js} +4 -4
- package/dist/{chunk-3EWS67C7.js → chunk-4TG2ITRW.js} +2 -2
- package/dist/{chunk-HS554XAF.js → chunk-5HQFROZS.js} +2 -2
- package/dist/{chunk-IUBMZPHM.js → chunk-5ZVE3N5C.js} +5 -6
- package/dist/chunk-5ZVE3N5C.js.map +1 -0
- package/dist/{chunk-PP3K67AJ.js → chunk-654RE5YC.js} +3 -3
- package/dist/{chunk-FOEDQATO.js → chunk-66GD7XXU.js} +2 -2
- package/dist/{chunk-BNWA3WG5.js → chunk-72FQ46VW.js} +3 -3
- package/dist/{chunk-EYG2CY2X.js → chunk-7JPA3LIH.js} +11 -11
- package/dist/chunk-7JPA3LIH.js.map +1 -0
- package/dist/{chunk-JQYKPKG6.js → chunk-7K42TSCY.js} +4 -4
- package/dist/{chunk-BPWYQ25R.js → chunk-7Q6IU3R7.js} +4 -4
- package/dist/{chunk-BPWYQ25R.js.map → chunk-7Q6IU3R7.js.map} +1 -1
- package/dist/{chunk-T7IR4N2S.js → chunk-7UHLO4ZN.js} +37 -2
- package/dist/chunk-7UHLO4ZN.js.map +1 -0
- package/dist/{chunk-UEFOQH74.js → chunk-ADCXTW7L.js} +2 -2
- package/dist/{chunk-MBMTND6D.js → chunk-AGGPT4UE.js} +2 -2
- package/dist/{chunk-RB4DOPGZ.js → chunk-AKIEBFIJ.js} +10 -10
- package/dist/{chunk-VHBKYN2J.js → chunk-B3B6HV5S.js} +2 -2
- package/dist/{chunk-JWWYRR4Q.js → chunk-B6EWMGFX.js} +2 -2
- package/dist/{chunk-H7JBY4P7.js → chunk-B7Y2BRQA.js} +14 -14
- package/dist/chunk-B7Y2BRQA.js.map +1 -0
- package/dist/{chunk-4CIQDWRB.js → chunk-BFJE2GPP.js} +14 -8
- package/dist/{chunk-4CIQDWRB.js.map → chunk-BFJE2GPP.js.map} +1 -1
- package/dist/{chunk-WPOYWFSE.js → chunk-BJRKXNFP.js} +7 -7
- package/dist/{chunk-H427H63K.js → chunk-BPQ5CRJF.js} +2 -2
- package/dist/{chunk-VFHCKG5M.js → chunk-BVRJYMFZ.js} +3 -3
- package/dist/{chunk-244QBK7Z.js → chunk-C4XV3PSJ.js} +4 -4
- package/dist/{chunk-244QBK7Z.js.map → chunk-C4XV3PSJ.js.map} +1 -1
- package/dist/{chunk-SMV2HRDU.js → chunk-DFC4WTJW.js} +2 -2
- package/dist/{chunk-5A4345TG.js → chunk-DMIEKD24.js} +3 -3
- package/dist/{chunk-TKVUE4JF.js → chunk-DQAXA2GK.js} +9 -9
- package/dist/{chunk-AL6ML4LA.js → chunk-DWCFGF2K.js} +5 -5
- package/dist/{chunk-Y3LPTBG7.js → chunk-E2C6FFSI.js} +6 -9
- package/dist/chunk-E2C6FFSI.js.map +1 -0
- package/dist/{chunk-LNSVGRHO.js → chunk-EQ6C2ZPT.js} +17 -51
- package/dist/chunk-EQ6C2ZPT.js.map +1 -0
- package/dist/chunk-EZOFTI4K.js +60 -0
- package/dist/chunk-EZOFTI4K.js.map +1 -0
- package/dist/{chunk-PD64727P.js → chunk-FMINS2B6.js} +2 -2
- package/dist/chunk-FMINS2B6.js.map +1 -0
- package/dist/{chunk-QBLT6POL.js → chunk-FPF5HRBE.js} +2 -2
- package/dist/{chunk-UA372JHH.js → chunk-FZVCZEVI.js} +3 -3
- package/dist/chunk-FZVCZEVI.js.map +1 -0
- package/dist/{chunk-FFWI7UH7.js → chunk-GAGT3YZN.js} +1 -1
- package/dist/chunk-GAGT3YZN.js.map +1 -0
- package/dist/{chunk-5WWDGFOS.js → chunk-GIQJGXV7.js} +2 -2
- package/dist/{chunk-V3RWOOSO.js → chunk-GYZICGRU.js} +4 -4
- package/dist/chunk-GYZICGRU.js.map +1 -0
- package/dist/{chunk-BVCUTXE3.js → chunk-H334G6KU.js} +2 -2
- package/dist/{chunk-AEQGFRU4.js → chunk-HE7EAHGS.js} +3 -3
- package/dist/chunk-HKB4HZDU.js +74 -0
- package/dist/chunk-HKB4HZDU.js.map +1 -0
- package/dist/{chunk-4V3Q35WG.js → chunk-ICF3TIGY.js} +3 -3
- package/dist/{chunk-3L2NBKDR.js → chunk-IF2M43G4.js} +2 -2
- package/dist/{chunk-37EPTBBR.js → chunk-IKPQ2GGB.js} +46 -4
- package/dist/chunk-IKPQ2GGB.js.map +1 -0
- package/dist/{chunk-DHHGL42E.js → chunk-IKS2CPAG.js} +27 -11
- package/dist/chunk-IKS2CPAG.js.map +1 -0
- package/dist/{chunk-3A5DUZ56.js → chunk-IMIQAGR7.js} +6 -6
- package/dist/{chunk-3A5DUZ56.js.map → chunk-IMIQAGR7.js.map} +1 -1
- package/dist/{chunk-A4XMIZT3.js → chunk-IQAJ4OR6.js} +41 -6
- package/dist/chunk-IQAJ4OR6.js.map +1 -0
- package/dist/{chunk-IUT3GWP3.js → chunk-IUD7WU67.js} +17 -93
- package/dist/chunk-IUD7WU67.js.map +1 -0
- package/dist/{chunk-AUKKUPVB.js → chunk-IVLRPRXM.js} +2 -2
- package/dist/{chunk-GUZET4SG.js → chunk-JAQHWHUN.js} +4 -4
- package/dist/chunk-JAQHWHUN.js.map +1 -0
- package/dist/{chunk-Y2RKVFKR.js → chunk-K4JSTGXT.js} +2 -2
- package/dist/{chunk-EJLV62NI.js → chunk-KN4LUMH6.js} +2 -2
- package/dist/{chunk-23D6M6VM.js → chunk-KZA3DITX.js} +4 -4
- package/dist/{chunk-E2N2T5ZO.js → chunk-L2VM64HK.js} +2 -2
- package/dist/chunk-L4UL4IAR.js +55 -0
- package/dist/chunk-L4UL4IAR.js.map +1 -0
- package/dist/{chunk-UIYESRD6.js → chunk-LUCQY3OM.js} +10 -10
- package/dist/{chunk-UIYESRD6.js.map → chunk-LUCQY3OM.js.map} +1 -1
- package/dist/{chunk-O46CHQT7.js → chunk-MAQBYBUX.js} +4 -4
- package/dist/{chunk-EZOAKKTB.js → chunk-MBPZMZVB.js} +2 -2
- package/dist/{chunk-XQRFSKYM.js → chunk-MCNNZBG7.js} +2 -2
- package/dist/{chunk-YRXFFWG4.js → chunk-MLVPMDOZ.js} +2 -2
- package/dist/{chunk-5FE75J4S.js → chunk-MMCN7TLK.js} +5 -5
- package/dist/{chunk-MXOQ5JCG.js → chunk-MRCR7ZMC.js} +686 -202
- package/dist/chunk-MRCR7ZMC.js.map +1 -0
- package/dist/{chunk-SYNY3VB5.js → chunk-NCTN2FW4.js} +2 -2
- package/dist/{chunk-4T3SE27M.js → chunk-ND6S2DKC.js} +2 -2
- package/dist/{chunk-3XJQBBZD.js → chunk-NTVKHQ3L.js} +2 -2
- package/dist/{chunk-RHVMZSUU.js → chunk-NV4OESHC.js} +1 -1
- package/dist/chunk-NV4OESHC.js.map +1 -0
- package/dist/chunk-NXQEOC3X.js +40 -0
- package/dist/chunk-NXQEOC3X.js.map +1 -0
- package/dist/{chunk-Q4UHJ5SN.js → chunk-O2VQ3K36.js} +2 -2
- package/dist/{chunk-HW7CMKUG.js → chunk-OFD2HD6F.js} +1 -1
- package/dist/{chunk-HW7CMKUG.js.map → chunk-OFD2HD6F.js.map} +1 -1
- package/dist/{chunk-2GHDLTPE.js → chunk-OGKMRIIJ.js} +2 -2
- package/dist/{chunk-N7EVQD5S.js → chunk-ONZ3B5EW.js} +4 -4
- package/dist/{chunk-VKI2EB3N.js → chunk-OOPSMQX5.js} +3 -3
- package/dist/{chunk-VMV5SBE4.js → chunk-OYEBSWLE.js} +5 -5
- package/dist/{chunk-JDEYF3PJ.js → chunk-P6FATPXQ.js} +2 -2
- package/dist/chunk-P6FATPXQ.js.map +1 -0
- package/dist/{chunk-VVOLDVIR.js → chunk-PLTIJDQN.js} +2 -2
- package/dist/{chunk-OKSTSITU.js → chunk-PR7ILCIH.js} +3 -3
- package/dist/{chunk-7R2Q7CPL.js → chunk-QE3TLZ6Z.js} +7 -7
- package/dist/{chunk-G2MVBDFP.js → chunk-QFW4MYGN.js} +39 -9
- package/dist/chunk-QFW4MYGN.js.map +1 -0
- package/dist/{chunk-6QVKPHBF.js → chunk-QHG7GQKM.js} +2 -2
- package/dist/chunk-QJNAHPVT.js +91 -0
- package/dist/chunk-QJNAHPVT.js.map +1 -0
- package/dist/{chunk-LIOVX5TJ.js → chunk-QT5ITL25.js} +3 -3
- package/dist/{chunk-IMQKWR46.js → chunk-R2ZULFXU.js} +4 -5
- package/dist/chunk-R2ZULFXU.js.map +1 -0
- package/dist/{chunk-Q2XRFWOI.js → chunk-RRTQAQ3N.js} +2 -2
- package/dist/{chunk-H23XHRTT.js → chunk-RUE6TCES.js} +809 -101
- package/dist/chunk-RUE6TCES.js.map +1 -0
- package/dist/chunk-RWFQVNXR.js +24 -0
- package/dist/chunk-RWFQVNXR.js.map +1 -0
- package/dist/{chunk-2PVXF5CS.js → chunk-SALY3LIJ.js} +3 -3
- package/dist/{chunk-JOSPH3E5.js → chunk-SBAR5JQ6.js} +2 -2
- package/dist/{chunk-N7UDP5VU.js → chunk-SCH2F7R2.js} +7 -7
- package/dist/{chunk-MXKI4ABF.js → chunk-SOOAW6HK.js} +3 -3
- package/dist/{chunk-VQDZYB2B.js → chunk-T4VTRKCY.js} +3 -3
- package/dist/{chunk-VQDZYB2B.js.map → chunk-T4VTRKCY.js.map} +1 -1
- package/dist/{chunk-TEHHROZL.js → chunk-T5EXREMW.js} +5 -5
- package/dist/{chunk-M5B2W6YY.js → chunk-TDJVQTXD.js} +3 -3
- package/dist/{chunk-QMWY2FDS.js → chunk-THQ3BHLM.js} +2 -2
- package/dist/{chunk-VAORSCSU.js → chunk-TLIFNRU5.js} +2 -2
- package/dist/chunk-TLIFNRU5.js.map +1 -0
- package/dist/{chunk-FVH5QYY2.js → chunk-TRHUNPXP.js} +2 -2
- package/dist/{chunk-EGVJ7TM4.js → chunk-UL6MTRMJ.js} +8 -9
- package/dist/chunk-UL6MTRMJ.js.map +1 -0
- package/dist/chunk-UNL6YGL5.js +169 -0
- package/dist/chunk-UNL6YGL5.js.map +1 -0
- package/dist/{chunk-747G6CT3.js → chunk-UORWAG7K.js} +2 -2
- package/dist/{chunk-XSPFDUDG.js → chunk-V7AKGAXY.js} +314 -77
- package/dist/chunk-V7AKGAXY.js.map +1 -0
- package/dist/{chunk-TZZBXPZK.js → chunk-VLQ6KT7F.js} +2 -2
- package/dist/{chunk-NCO25JZO.js → chunk-VP37VUKQ.js} +4 -4
- package/dist/{chunk-52MGURXO.js → chunk-WBUHHMLN.js} +2 -2
- package/dist/{chunk-EZGV6F47.js → chunk-WRLWEYHY.js} +7 -1
- package/dist/chunk-WRLWEYHY.js.map +1 -0
- package/dist/{chunk-2MG3SW7Q.js → chunk-X6Z2SIRF.js} +2 -2
- package/dist/{chunk-U2FZNEWJ.js → chunk-XLKWF3L4.js} +8 -6
- package/dist/{chunk-U2FZNEWJ.js.map → chunk-XLKWF3L4.js.map} +1 -1
- package/dist/{chunk-5UMK7GRI.js → chunk-XPNJH7GN.js} +5 -5
- package/dist/{chunk-KZXDLBY6.js → chunk-XPW7T2GN.js} +5 -5
- package/dist/{chunk-SV2PM2OY.js → chunk-XX4R7TUB.js} +1 -1
- package/dist/chunk-XX4R7TUB.js.map +1 -0
- package/dist/{chunk-NBQ3KK6X.js → chunk-Y55XHMQB.js} +4 -4
- package/dist/chunk-Y55XHMQB.js.map +1 -0
- package/dist/{chunk-5KC7QYEC.js → chunk-YH4OUOSI.js} +33 -7
- package/dist/chunk-YH4OUOSI.js.map +1 -0
- package/dist/{chunk-FFJFE4T7.js → chunk-YJGKOSQD.js} +2 -2
- package/dist/{chunk-2AFX33YA.js → chunk-Z3STG43F.js} +3 -3
- package/dist/chunk-Z3STG43F.js.map +1 -0
- package/dist/{chunk-OIEO4WDL.js → chunk-ZD7WFMV2.js} +2 -2
- package/dist/chunk-ZD7WFMV2.js.map +1 -0
- package/dist/{chunk-42ALPZ2B.js → chunk-ZF6JECDT.js} +4 -4
- package/dist/{chunk-42ALPZ2B.js.map → chunk-ZF6JECDT.js.map} +1 -1
- package/dist/{chunk-4JPMZTJY.js → chunk-ZF7KNSLU.js} +2 -2
- package/dist/{chunk-2ODVB6LZ.js → chunk-ZGKODRGB.js} +2 -2
- package/dist/{chunk-JIBUPZHA.js → chunk-ZNEKQFGF.js} +4 -4
- package/dist/{chunk-DLD5LGDS.js → chunk-ZUTUNVFD.js} +3 -3
- package/dist/{chunk-JSMTXZR3.js → chunk-ZWMOHANW.js} +8 -6
- package/dist/chunk-ZWMOHANW.js.map +1 -0
- package/dist/{chunk-MILI22XQ.js → chunk-ZZZ4VCY2.js} +10 -10
- package/dist/chunk-ZZZ4VCY2.js.map +1 -0
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-SIYKUU5L.js → classified-marker-WKP33U2R.js} +3 -3
- package/dist/collection-facade-COSGZKLC.js +41 -0
- package/dist/{computed-FAD7SED4.js → computed-WN6V53ZV.js} +3 -3
- package/dist/consent/index.js +8 -8
- package/dist/cover/index.js +8 -8
- package/dist/coverage/index.js +1 -1
- package/dist/custody/index.js +12 -11
- package/dist/{dead-filter-4F3LWYKH.js → dead-filter-43WL3Y5H.js} +10 -10
- package/dist/debug/index.js +7 -7
- package/dist/delegation-5UWT4JGT.js +26 -0
- package/dist/derivations/index.js +24 -23
- package/dist/derive-IL5JNLEE.js +20 -0
- package/dist/directory/index.js +9 -9
- package/dist/{dispatch-JDZNGEB3.js → dispatch-LOQQD5JK.js} +20 -20
- package/dist/{dispatch-H4HV32AM.js → dispatch-SHKTG57L.js} +5 -5
- package/dist/executor-6PQ7WAGV.js +35 -0
- package/dist/executor-6ZPQA6HS.js +8 -0
- package/dist/executor-OXRA64TY.js +8 -0
- package/dist/export-accessible-XG3FKJWW.js +22 -0
- package/dist/extract-partition-33747NY5.js +35 -0
- package/dist/{fanout-sidecar-L7NHPIOC.js → fanout-sidecar-NEB6IYV7.js} +8 -8
- package/dist/find-VW543G3J.js +10 -0
- package/dist/forget/index.js +25 -8
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +15 -13
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +13 -13
- package/dist/index.d.ts +9 -6
- package/dist/index.js +126 -110
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +6 -6
- package/dist/introspection/index.js +15 -11
- package/dist/issue-4ZPSY44M.js +19 -0
- package/dist/kernel/cache/index.d.ts +1 -1
- package/dist/kernel/collection.d.ts +86 -6
- package/dist/kernel/constants.d.ts +7 -0
- package/dist/kernel/errors.d.ts +42 -4
- package/dist/kernel/export-scope.d.ts +40 -0
- package/dist/kernel/merge-authority.d.ts +5 -1
- package/dist/kernel/noydb.d.ts +118 -21
- package/dist/kernel/put-many-atomic.d.ts +1 -1
- package/dist/kernel/query/live/live.d.ts +2 -1
- package/dist/kernel/query/sort-key.d.ts +0 -2
- package/dist/kernel/rejection-seal.d.ts +13 -0
- package/dist/kernel/sync-wiring.d.ts +55 -0
- package/dist/kernel/tx-write-gate.d.ts +2 -4
- package/dist/kernel/types.d.ts +463 -14
- package/dist/kernel/validation.d.ts +0 -10
- package/dist/kernel/vault.d.ts +42 -4
- package/dist/kernel/via/reconcile.d.ts +1 -42
- package/dist/{ledger-5ZMGE44K.js → ledger-MZ25UFT2.js} +10 -10
- package/dist/liberate-OJIP2ZFX.js +25 -0
- package/dist/{link-set-MFXC24VK.js → link-set-4FRRAVTH.js} +10 -10
- package/dist/{managed-secret-MFTFT22X.js → managed-secret-SQWO2EUR.js} +9 -9
- package/dist/materialized-views/index.js +26 -26
- package/dist/{migrate-cek-DZRFFOHW.js → migrate-cek-JWEM4RP6.js} +2 -2
- package/dist/money/index.js +5 -5
- package/dist/noydb-U62OVKXB.js +100 -0
- package/dist/on/index.js +25 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +11 -11
- package/dist/pod/index.js +71 -67
- package/dist/{pod-handle-A3LET7NO.js → pod-handle-R6Y4MILX.js} +8 -8
- package/dist/policy/index.js +9 -9
- package/dist/port/as/active.d.ts +4 -0
- package/dist/port/as/index.d.ts +1 -0
- package/dist/port/by/index.d.ts +14 -5
- package/dist/port/on/index.d.ts +26 -0
- package/dist/port/to/index.d.ts +1 -1
- package/dist/port/with/admission-authority.d.ts +34 -0
- package/dist/port/with/broker-strategy.d.ts +24 -0
- package/dist/port/with/coverage-strategy.d.ts +17 -1
- package/dist/port/with/formats-strategy.d.ts +34 -1
- package/dist/port/with/lookup-strategy.d.ts +85 -4
- package/dist/port/with/rejection-courier.d.ts +37 -0
- package/dist/port/with/restore-host.d.ts +33 -0
- package/dist/port/with/service-bus.d.ts +20 -1
- package/dist/port/with/team-strategy.d.ts +2 -2
- package/dist/port/with/write-hooks.d.ts +2 -0
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-7ND27CF2.js → post-register-GRVQHBOH.js} +6 -6
- package/dist/query/all/index.js +16 -16
- package/dist/query/index.js +8 -8
- package/dist/query/live/index.js +7 -7
- package/dist/query/reduce/index.js +10 -10
- package/dist/query/relate/index.js +10 -10
- package/dist/reduce/index.js +8 -8
- package/dist/register-YJ5YLQ36.js +30 -0
- package/dist/registry-ICOHBQFD.js +8 -0
- package/dist/registry-MJ7MWCSW.js +35 -0
- package/dist/registry-MVEKKGWL.js +23 -0
- package/dist/registry-XP744FAP.js +8 -0
- package/dist/request-withdrawal-LSU4G6W3.js +28 -0
- package/dist/restore-to-DVBHAQAA.js +66 -0
- package/dist/restore-to-DVBHAQAA.js.map +1 -0
- package/dist/{reveal-B2TLP4JQ.js → reveal-AIHOIK2N.js} +7 -7
- package/dist/revoke-QUT7WWG3.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +11 -11
- package/dist/search/index.js +4 -4
- package/dist/{seed-XNSE4U3S.js → seed-GFLA4FCK.js} +136 -27
- package/dist/seed-GFLA4FCK.js.map +1 -0
- package/dist/sequence/index.js +8 -8
- package/dist/session/index.js +8 -8
- package/dist/shadow/index.js +2 -2
- package/dist/signer-NYR4I3FO.js +23 -0
- package/dist/snapshots/index.js +9 -9
- package/dist/{stale-6GCFMOOR.js → stale-PIJPAL5T.js} +9 -9
- package/dist/storage-VH6SPXHC.js +21 -0
- package/dist/{store-coordination-provider-C4BPT5XF.js → store-coordination-provider-2KSHCOPU.js} +9 -9
- package/dist/sync/index.js +19 -13
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +17 -15
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +2 -2
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/vault-head/index.js +8 -8
- package/dist/{verify-UKALW7C2.js → verify-PCFS4PNS.js} +7 -7
- package/dist/via/classified/presets.d.ts +29 -0
- package/dist/via/classified/resolve.d.ts +7 -0
- package/dist/via/geo/binding.d.ts +0 -4
- package/dist/via/lookup/index.d.ts +32 -0
- package/dist/via/money/binding.d.ts +0 -9
- package/dist/walk-OZCN6LJS.js +20 -0
- package/dist/with-audit/attestation/strategy.d.ts +2 -1
- package/dist/with-audit/attestation/vault-facade.d.ts +7 -0
- package/dist/with-audit/forget/completeness.d.ts +66 -0
- package/dist/with-audit/forget/index.d.ts +2 -0
- package/dist/with-audit/forget/strategy.d.ts +65 -0
- package/dist/with-audit/guards/types.d.ts +2 -0
- package/dist/with-audit/periods/periods.d.ts +0 -9
- package/dist/with-audit/periods/reserved-collections.d.ts +7 -0
- package/dist/with-audit/portability/request-withdrawal.d.ts +0 -1
- package/dist/with-audit/portability/withdraw-accessible.d.ts +0 -1
- package/dist/with-audit/tiers/index.d.ts +6 -6
- package/dist/with-audit/tiers/strategy.d.ts +19 -0
- package/dist/with-cargo/extract-partition.d.ts +0 -46
- package/dist/with-commit/history/history.d.ts +16 -0
- package/dist/with-commit/history/restore-to.d.ts +40 -0
- package/dist/with-commit/numbering/index.d.ts +0 -2
- package/dist/with-commit/tx/transaction.d.ts +2 -24
- package/dist/with-commit/vault-head/strategy.d.ts +7 -0
- package/dist/with-fork/snapshots/noydb-facade.d.ts +7 -0
- package/dist/with-formula/derivations/trigger-match.d.ts +8 -5
- package/dist/with-formula/materialized-views/emit-memo.d.ts +0 -2
- package/dist/with-lookup/embeddings/index.d.ts +1 -2
- package/dist/with-lookup/indexing/collection-facade.d.ts +1 -15
- package/dist/with-lookup/indexing/eager-indexes.d.ts +2 -1
- package/dist/with-lookup/search/collection-facade.d.ts +0 -12
- package/dist/with-party/broker/index.d.ts +2 -2
- package/dist/with-party/broker/seed.d.ts +29 -10
- package/dist/with-party/custody/strategy.d.ts +2 -2
- package/dist/with-party/policy/noydb-facade.d.ts +1 -31
- package/dist/with-party/team/delegation.d.ts +93 -7
- package/dist/with-party/team/echo-secret.d.ts +0 -2
- package/dist/with-party/team/index.d.ts +2 -0
- package/dist/with-party/team/keyring.d.ts +133 -24
- package/dist/with-party/team/magic-link-grant.d.ts +11 -1
- package/dist/with-party/team/noydb-facade.d.ts +19 -2
- package/dist/with-party/team/reserved-secret-collections.d.ts +10 -8
- package/dist/with-party/team/roster-tag.d.ts +42 -1
- package/dist/with-party/team/tiers.d.ts +36 -5
- package/dist/with-pod/backup.d.ts +9 -17
- package/dist/with-shape/blobs/blob-set.d.ts +23 -0
- package/dist/with-shape/blobs/legacy-sweep.d.ts +16 -0
- package/dist/with-shape/introspection/describe.d.ts +1 -2
- package/dist/with-shape/introspection/index.d.ts +1 -0
- package/dist/with-shape/introspection/types.d.ts +2 -1
- package/dist/with-shape/schema-update/fence.d.ts +7 -0
- package/dist/with-sync/active.d.ts +28 -1
- package/dist/with-sync/engine.d.ts +88 -2
- package/dist/with-sync/index.d.ts +1 -0
- package/dist/with-sync/reserved-mirror.d.ts +112 -0
- package/dist/with-sync/strategy.d.ts +9 -0
- package/dist/with-sync/tab-write-relay.d.ts +0 -10
- package/dist/withdraw-accessible-MTFP7OIB.js +25 -0
- package/dist/withdraw-accessible-MTFP7OIB.js.map +1 -0
- package/package.json +3 -3
- package/dist/api-OS747DS4.js +0 -18
- package/dist/backup-YE2VQ26S.js.map +0 -1
- package/dist/chunk-2AFX33YA.js.map +0 -1
- package/dist/chunk-2RH777HH.js +0 -126
- package/dist/chunk-2RH777HH.js.map +0 -1
- package/dist/chunk-37EPTBBR.js.map +0 -1
- package/dist/chunk-5KC7QYEC.js.map +0 -1
- package/dist/chunk-7XMHMVTS.js +0 -20
- package/dist/chunk-7XMHMVTS.js.map +0 -1
- package/dist/chunk-A4XMIZT3.js.map +0 -1
- package/dist/chunk-DHHGL42E.js.map +0 -1
- package/dist/chunk-DQESF6RP.js.map +0 -1
- package/dist/chunk-EGVJ7TM4.js.map +0 -1
- package/dist/chunk-EYG2CY2X.js.map +0 -1
- package/dist/chunk-EZGV6F47.js.map +0 -1
- package/dist/chunk-FFWI7UH7.js.map +0 -1
- package/dist/chunk-G2MVBDFP.js.map +0 -1
- package/dist/chunk-GUZET4SG.js.map +0 -1
- package/dist/chunk-GZT3NQRA.js.map +0 -1
- package/dist/chunk-H23XHRTT.js.map +0 -1
- package/dist/chunk-H7JBY4P7.js.map +0 -1
- package/dist/chunk-IMQKWR46.js.map +0 -1
- package/dist/chunk-IUBMZPHM.js.map +0 -1
- package/dist/chunk-IUT3GWP3.js.map +0 -1
- package/dist/chunk-JDEYF3PJ.js.map +0 -1
- package/dist/chunk-JSMTXZR3.js.map +0 -1
- package/dist/chunk-LGNDFRYC.js.map +0 -1
- package/dist/chunk-LNSVGRHO.js.map +0 -1
- package/dist/chunk-MILI22XQ.js.map +0 -1
- package/dist/chunk-MXOQ5JCG.js.map +0 -1
- package/dist/chunk-NBQ3KK6X.js.map +0 -1
- package/dist/chunk-OIEO4WDL.js.map +0 -1
- package/dist/chunk-PD64727P.js.map +0 -1
- package/dist/chunk-RHVMZSUU.js.map +0 -1
- package/dist/chunk-SV2PM2OY.js.map +0 -1
- package/dist/chunk-T7IR4N2S.js.map +0 -1
- package/dist/chunk-UA372JHH.js.map +0 -1
- package/dist/chunk-UBSFPGVJ.js +0 -1
- package/dist/chunk-V3RWOOSO.js.map +0 -1
- package/dist/chunk-VAORSCSU.js.map +0 -1
- package/dist/chunk-XSPFDUDG.js.map +0 -1
- package/dist/chunk-Y3LPTBG7.js.map +0 -1
- package/dist/collection-facade-CS7CA2XO.js +0 -47
- package/dist/delegation-NANZDG4N.js +0 -102
- package/dist/delegation-NANZDG4N.js.map +0 -1
- package/dist/derive-XLOJVXPU.js +0 -20
- package/dist/executor-FMPVN6DT.js +0 -35
- package/dist/executor-LBBBRTN5.js +0 -8
- package/dist/executor-OSRZST2U.js +0 -8
- package/dist/export-accessible-RAOJAAU5.js +0 -22
- package/dist/extract-partition-JD5CUSTG.js +0 -37
- package/dist/find-JRN4RNQ5.js +0 -10
- package/dist/issue-YIVBZUTH.js +0 -19
- package/dist/liberate-WZSZM2W6.js +0 -24
- package/dist/noydb-ITIGNKUF.js +0 -96
- package/dist/register-DT5HZ2LZ.js +0 -30
- package/dist/registry-BHRZGZHF.js +0 -8
- package/dist/registry-ET6ZFFWA.js +0 -34
- package/dist/registry-HXFGLGTG.js +0 -8
- package/dist/registry-THCPDEOD.js +0 -23
- package/dist/request-withdrawal-AV2MJJKY.js +0 -30
- package/dist/revoke-6DWIEOCV.js +0 -24
- package/dist/seed-XNSE4U3S.js.map +0 -1
- package/dist/signer-MHGW3OIL.js +0 -23
- package/dist/storage-BYN5LO6Z.js +0 -21
- package/dist/walk-4VPK7AS4.js +0 -20
- package/dist/withdraw-accessible-HL7GACUE.js +0 -27
- /package/dist/{api-OS747DS4.js.map → api-6EFD43KN.js.map} +0 -0
- /package/dist/{capsule-VOLX3QRQ.js.map → capsule-6LJAVQNM.js.map} +0 -0
- /package/dist/{chunk-OYW3I5M4.js.map → chunk-2DOCDOPL.js.map} +0 -0
- /package/dist/{chunk-UBSFPGVJ.js.map → chunk-2DX4JCRI.js.map} +0 -0
- /package/dist/{chunk-FLPCETP6.js.map → chunk-2LBS62AC.js.map} +0 -0
- /package/dist/{chunk-WXE4W2U6.js.map → chunk-2ST3WA3C.js.map} +0 -0
- /package/dist/{chunk-O2IMQSNA.js.map → chunk-3YBIVLTC.js.map} +0 -0
- /package/dist/{chunk-DIZLQVAA.js.map → chunk-4CHM2TRS.js.map} +0 -0
- /package/dist/{chunk-V7ADQF5O.js.map → chunk-4CUJLEOA.js.map} +0 -0
- /package/dist/{chunk-3EWS67C7.js.map → chunk-4TG2ITRW.js.map} +0 -0
- /package/dist/{chunk-HS554XAF.js.map → chunk-5HQFROZS.js.map} +0 -0
- /package/dist/{chunk-PP3K67AJ.js.map → chunk-654RE5YC.js.map} +0 -0
- /package/dist/{chunk-FOEDQATO.js.map → chunk-66GD7XXU.js.map} +0 -0
- /package/dist/{chunk-BNWA3WG5.js.map → chunk-72FQ46VW.js.map} +0 -0
- /package/dist/{chunk-JQYKPKG6.js.map → chunk-7K42TSCY.js.map} +0 -0
- /package/dist/{chunk-UEFOQH74.js.map → chunk-ADCXTW7L.js.map} +0 -0
- /package/dist/{chunk-MBMTND6D.js.map → chunk-AGGPT4UE.js.map} +0 -0
- /package/dist/{chunk-RB4DOPGZ.js.map → chunk-AKIEBFIJ.js.map} +0 -0
- /package/dist/{chunk-VHBKYN2J.js.map → chunk-B3B6HV5S.js.map} +0 -0
- /package/dist/{chunk-JWWYRR4Q.js.map → chunk-B6EWMGFX.js.map} +0 -0
- /package/dist/{chunk-WPOYWFSE.js.map → chunk-BJRKXNFP.js.map} +0 -0
- /package/dist/{chunk-H427H63K.js.map → chunk-BPQ5CRJF.js.map} +0 -0
- /package/dist/{chunk-VFHCKG5M.js.map → chunk-BVRJYMFZ.js.map} +0 -0
- /package/dist/{chunk-SMV2HRDU.js.map → chunk-DFC4WTJW.js.map} +0 -0
- /package/dist/{chunk-5A4345TG.js.map → chunk-DMIEKD24.js.map} +0 -0
- /package/dist/{chunk-TKVUE4JF.js.map → chunk-DQAXA2GK.js.map} +0 -0
- /package/dist/{chunk-AL6ML4LA.js.map → chunk-DWCFGF2K.js.map} +0 -0
- /package/dist/{chunk-QBLT6POL.js.map → chunk-FPF5HRBE.js.map} +0 -0
- /package/dist/{chunk-5WWDGFOS.js.map → chunk-GIQJGXV7.js.map} +0 -0
- /package/dist/{chunk-BVCUTXE3.js.map → chunk-H334G6KU.js.map} +0 -0
- /package/dist/{chunk-AEQGFRU4.js.map → chunk-HE7EAHGS.js.map} +0 -0
- /package/dist/{chunk-4V3Q35WG.js.map → chunk-ICF3TIGY.js.map} +0 -0
- /package/dist/{chunk-3L2NBKDR.js.map → chunk-IF2M43G4.js.map} +0 -0
- /package/dist/{chunk-AUKKUPVB.js.map → chunk-IVLRPRXM.js.map} +0 -0
- /package/dist/{chunk-Y2RKVFKR.js.map → chunk-K4JSTGXT.js.map} +0 -0
- /package/dist/{chunk-EJLV62NI.js.map → chunk-KN4LUMH6.js.map} +0 -0
- /package/dist/{chunk-23D6M6VM.js.map → chunk-KZA3DITX.js.map} +0 -0
- /package/dist/{chunk-E2N2T5ZO.js.map → chunk-L2VM64HK.js.map} +0 -0
- /package/dist/{chunk-O46CHQT7.js.map → chunk-MAQBYBUX.js.map} +0 -0
- /package/dist/{chunk-EZOAKKTB.js.map → chunk-MBPZMZVB.js.map} +0 -0
- /package/dist/{chunk-XQRFSKYM.js.map → chunk-MCNNZBG7.js.map} +0 -0
- /package/dist/{chunk-YRXFFWG4.js.map → chunk-MLVPMDOZ.js.map} +0 -0
- /package/dist/{chunk-5FE75J4S.js.map → chunk-MMCN7TLK.js.map} +0 -0
- /package/dist/{chunk-SYNY3VB5.js.map → chunk-NCTN2FW4.js.map} +0 -0
- /package/dist/{chunk-4T3SE27M.js.map → chunk-ND6S2DKC.js.map} +0 -0
- /package/dist/{chunk-3XJQBBZD.js.map → chunk-NTVKHQ3L.js.map} +0 -0
- /package/dist/{chunk-Q4UHJ5SN.js.map → chunk-O2VQ3K36.js.map} +0 -0
- /package/dist/{chunk-2GHDLTPE.js.map → chunk-OGKMRIIJ.js.map} +0 -0
- /package/dist/{chunk-N7EVQD5S.js.map → chunk-ONZ3B5EW.js.map} +0 -0
- /package/dist/{chunk-VKI2EB3N.js.map → chunk-OOPSMQX5.js.map} +0 -0
- /package/dist/{chunk-VMV5SBE4.js.map → chunk-OYEBSWLE.js.map} +0 -0
- /package/dist/{chunk-VVOLDVIR.js.map → chunk-PLTIJDQN.js.map} +0 -0
- /package/dist/{chunk-OKSTSITU.js.map → chunk-PR7ILCIH.js.map} +0 -0
- /package/dist/{chunk-7R2Q7CPL.js.map → chunk-QE3TLZ6Z.js.map} +0 -0
- /package/dist/{chunk-6QVKPHBF.js.map → chunk-QHG7GQKM.js.map} +0 -0
- /package/dist/{chunk-LIOVX5TJ.js.map → chunk-QT5ITL25.js.map} +0 -0
- /package/dist/{chunk-Q2XRFWOI.js.map → chunk-RRTQAQ3N.js.map} +0 -0
- /package/dist/{chunk-2PVXF5CS.js.map → chunk-SALY3LIJ.js.map} +0 -0
- /package/dist/{chunk-JOSPH3E5.js.map → chunk-SBAR5JQ6.js.map} +0 -0
- /package/dist/{chunk-N7UDP5VU.js.map → chunk-SCH2F7R2.js.map} +0 -0
- /package/dist/{chunk-MXKI4ABF.js.map → chunk-SOOAW6HK.js.map} +0 -0
- /package/dist/{chunk-TEHHROZL.js.map → chunk-T5EXREMW.js.map} +0 -0
- /package/dist/{chunk-M5B2W6YY.js.map → chunk-TDJVQTXD.js.map} +0 -0
- /package/dist/{chunk-QMWY2FDS.js.map → chunk-THQ3BHLM.js.map} +0 -0
- /package/dist/{chunk-FVH5QYY2.js.map → chunk-TRHUNPXP.js.map} +0 -0
- /package/dist/{chunk-747G6CT3.js.map → chunk-UORWAG7K.js.map} +0 -0
- /package/dist/{chunk-TZZBXPZK.js.map → chunk-VLQ6KT7F.js.map} +0 -0
- /package/dist/{chunk-NCO25JZO.js.map → chunk-VP37VUKQ.js.map} +0 -0
- /package/dist/{chunk-52MGURXO.js.map → chunk-WBUHHMLN.js.map} +0 -0
- /package/dist/{chunk-2MG3SW7Q.js.map → chunk-X6Z2SIRF.js.map} +0 -0
- /package/dist/{chunk-5UMK7GRI.js.map → chunk-XPNJH7GN.js.map} +0 -0
- /package/dist/{chunk-KZXDLBY6.js.map → chunk-XPW7T2GN.js.map} +0 -0
- /package/dist/{chunk-FFJFE4T7.js.map → chunk-YJGKOSQD.js.map} +0 -0
- /package/dist/{chunk-4JPMZTJY.js.map → chunk-ZF7KNSLU.js.map} +0 -0
- /package/dist/{chunk-2ODVB6LZ.js.map → chunk-ZGKODRGB.js.map} +0 -0
- /package/dist/{chunk-JIBUPZHA.js.map → chunk-ZNEKQFGF.js.map} +0 -0
- /package/dist/{chunk-DLD5LGDS.js.map → chunk-ZUTUNVFD.js.map} +0 -0
- /package/dist/{classified-marker-SIYKUU5L.js.map → classified-marker-WKP33U2R.js.map} +0 -0
- /package/dist/{collection-facade-CS7CA2XO.js.map → collection-facade-COSGZKLC.js.map} +0 -0
- /package/dist/{computed-FAD7SED4.js.map → computed-WN6V53ZV.js.map} +0 -0
- /package/dist/{dead-filter-4F3LWYKH.js.map → dead-filter-43WL3Y5H.js.map} +0 -0
- /package/dist/{derive-XLOJVXPU.js.map → delegation-5UWT4JGT.js.map} +0 -0
- /package/dist/{executor-FMPVN6DT.js.map → derive-IL5JNLEE.js.map} +0 -0
- /package/dist/{dispatch-JDZNGEB3.js.map → dispatch-LOQQD5JK.js.map} +0 -0
- /package/dist/{dispatch-H4HV32AM.js.map → dispatch-SHKTG57L.js.map} +0 -0
- /package/dist/{executor-LBBBRTN5.js.map → executor-6PQ7WAGV.js.map} +0 -0
- /package/dist/{executor-OSRZST2U.js.map → executor-6ZPQA6HS.js.map} +0 -0
- /package/dist/{export-accessible-RAOJAAU5.js.map → executor-OXRA64TY.js.map} +0 -0
- /package/dist/{extract-partition-JD5CUSTG.js.map → export-accessible-XG3FKJWW.js.map} +0 -0
- /package/dist/{find-JRN4RNQ5.js.map → extract-partition-33747NY5.js.map} +0 -0
- /package/dist/{fanout-sidecar-L7NHPIOC.js.map → fanout-sidecar-NEB6IYV7.js.map} +0 -0
- /package/dist/{issue-YIVBZUTH.js.map → find-VW543G3J.js.map} +0 -0
- /package/dist/{ledger-5ZMGE44K.js.map → issue-4ZPSY44M.js.map} +0 -0
- /package/dist/{liberate-WZSZM2W6.js.map → ledger-MZ25UFT2.js.map} +0 -0
- /package/dist/{link-set-MFXC24VK.js.map → liberate-OJIP2ZFX.js.map} +0 -0
- /package/dist/{managed-secret-MFTFT22X.js.map → link-set-4FRRAVTH.js.map} +0 -0
- /package/dist/{noydb-ITIGNKUF.js.map → managed-secret-SQWO2EUR.js.map} +0 -0
- /package/dist/{migrate-cek-DZRFFOHW.js.map → migrate-cek-JWEM4RP6.js.map} +0 -0
- /package/dist/{register-DT5HZ2LZ.js.map → noydb-U62OVKXB.js.map} +0 -0
- /package/dist/{pod-handle-A3LET7NO.js.map → pod-handle-R6Y4MILX.js.map} +0 -0
- /package/dist/{post-register-7ND27CF2.js.map → post-register-GRVQHBOH.js.map} +0 -0
- /package/dist/{registry-BHRZGZHF.js.map → register-YJ5YLQ36.js.map} +0 -0
- /package/dist/{registry-ET6ZFFWA.js.map → registry-ICOHBQFD.js.map} +0 -0
- /package/dist/{registry-HXFGLGTG.js.map → registry-MJ7MWCSW.js.map} +0 -0
- /package/dist/{registry-THCPDEOD.js.map → registry-MVEKKGWL.js.map} +0 -0
- /package/dist/{request-withdrawal-AV2MJJKY.js.map → registry-XP744FAP.js.map} +0 -0
- /package/dist/{revoke-6DWIEOCV.js.map → request-withdrawal-LSU4G6W3.js.map} +0 -0
- /package/dist/{reveal-B2TLP4JQ.js.map → reveal-AIHOIK2N.js.map} +0 -0
- /package/dist/{signer-MHGW3OIL.js.map → revoke-QUT7WWG3.js.map} +0 -0
- /package/dist/{stale-6GCFMOOR.js.map → signer-NYR4I3FO.js.map} +0 -0
- /package/dist/{storage-BYN5LO6Z.js.map → stale-PIJPAL5T.js.map} +0 -0
- /package/dist/{walk-4VPK7AS4.js.map → storage-VH6SPXHC.js.map} +0 -0
- /package/dist/{store-coordination-provider-C4BPT5XF.js.map → store-coordination-provider-2KSHCOPU.js.map} +0 -0
- /package/dist/{verify-UKALW7C2.js.map → verify-PCFS4PNS.js.map} +0 -0
- /package/dist/{withdraw-accessible-HL7GACUE.js.map → walk-OZCN6LJS.js.map} +0 -0
package/dist/kernel/types.d.ts
CHANGED
|
@@ -182,6 +182,29 @@ export type Permissions = Record<string, Permission>;
|
|
|
182
182
|
* does not move. What changed is that every READER must now cope with absence
|
|
183
183
|
* — which is the whole point, since the store contract at `@noy-db/hub/to` is
|
|
184
184
|
* what an exclave's rows travel through.
|
|
185
|
+
*
|
|
186
|
+
* ⛔⛔ THERE ARE TWO KINDS OF BODY, AND CONFLATING THEM IS A REAL BUG. This
|
|
187
|
+
* cost a downstream package real time in 0.8.0, so it is written here rather
|
|
188
|
+
* than left to be rediscovered:
|
|
189
|
+
*
|
|
190
|
+
* - **A SEALED body** — `_iv` is a real IV and `_data` is ciphertext. Ask
|
|
191
|
+
* {@link hasSealedBody}, which tests `_iv`.
|
|
192
|
+
* - **A PLAINTEXT body** — `_data` holds readable JSON and `_iv` is `''`.
|
|
193
|
+
* Reserved collections (`_keyring`, `_meta`) and any collection opened
|
|
194
|
+
* with `encrypt: false` are this shape, by a convention that predates the
|
|
195
|
+
* widening.
|
|
196
|
+
*
|
|
197
|
+
* ⛔ So a record can HAVE a body while having NO SEALED body, and
|
|
198
|
+
* `hasSealedBody` returns **false** for it. Guarding a `_data` read with
|
|
199
|
+
* `hasSealedBody` therefore rejects every valid record on those collections —
|
|
200
|
+
* measured: it would reject every enrolled user of a password unlock. To ask
|
|
201
|
+
* "is there a body to read as text", test `_data` itself (`if (!env._data)`),
|
|
202
|
+
* which is exactly what the optional type is for.
|
|
203
|
+
*
|
|
204
|
+
* ⚠️ And `_iv === ''` is NOT a safe hand-rolled substitute for
|
|
205
|
+
* `hasSealedBody`. The comparison stays well-typed when `_iv` is absent and
|
|
206
|
+
* silently answers `false` — four sites inside hub were wrong that way before
|
|
207
|
+
* the widening landed.
|
|
185
208
|
*/
|
|
186
209
|
export interface Envelope {
|
|
187
210
|
readonly _noydb: typeof NOYDB_FORMAT_VERSION;
|
|
@@ -229,7 +252,7 @@ export interface Envelope {
|
|
|
229
252
|
* value)`) without decrypting every record. Leaks equality as a known
|
|
230
253
|
* side channel.
|
|
231
254
|
*/
|
|
232
|
-
readonly _det?: Record<string,
|
|
255
|
+
readonly _det?: Record<string, DeterministicCipher>;
|
|
233
256
|
/**
|
|
234
257
|
* Structural group-encryption. Map of sensitive field name →
|
|
235
258
|
* per-field sealed ciphertext in `iv:data` form (same shape as a `_det`
|
|
@@ -598,7 +621,7 @@ export interface CrossTierAccessEvent {
|
|
|
598
621
|
* as `iv:data` (both base64, colon-separated) so a single string per
|
|
599
622
|
* field keeps the envelope compact.
|
|
600
623
|
*/
|
|
601
|
-
|
|
624
|
+
type DeterministicCipher = string;
|
|
602
625
|
/** All records across all collections for a compartment. */
|
|
603
626
|
export type VaultSnapshot = Record<string, Record<string, EncryptedEnvelope>>;
|
|
604
627
|
/**
|
|
@@ -633,7 +656,33 @@ export interface NoydbStore {
|
|
|
633
656
|
capabilities?: StoreCapabilities;
|
|
634
657
|
/** Get a single record. Returns null if not found. */
|
|
635
658
|
get(vault: string, collection: string, id: string): Promise<EncryptedEnvelope | null>;
|
|
636
|
-
/**
|
|
659
|
+
/**
|
|
660
|
+
* Put a record. Throws ConflictError if `expectedVersion` doesn't match.
|
|
661
|
+
*
|
|
662
|
+
* ⚠️ **In this tree the comparison happens only when the record EXISTS**
|
|
663
|
+
* (`memory-store.ts`, `to-file`, `to-browser-idb` all read-then-compare),
|
|
664
|
+
* so against a missing id the `expectedVersion` is not a failed comparison
|
|
665
|
+
* — it is no comparison at all, and the write lands.
|
|
666
|
+
*
|
|
667
|
+
* That makes `expectedVersion: 0` an exact "must not exist": hub never stores
|
|
668
|
+
* a version below 1, so the first create is let through and every later one
|
|
669
|
+
* mismatches.
|
|
670
|
+
*
|
|
671
|
+
* ⭐ **Every record store in the family already agrees**, censused by reading
|
|
672
|
+
* source on 2026-09-24 — the twelve read-then-compare adapters, plus
|
|
673
|
+
* `to-aws-dynamo`, whose native condition is explicitly
|
|
674
|
+
* `#v = :expected OR attribute_not_exists(pk)`, plus `to-aws-s3`, which
|
|
675
|
+
* special-cases `expectedVersion === 0` BY NAME into a real precondition and
|
|
676
|
+
* throws `ConflictError('Concurrent create: …')`. `to-cloudflare-r2` and
|
|
677
|
+
* `to-supabase` inherit it by delegation.
|
|
678
|
+
*
|
|
679
|
+
* ⛔ **It is still not a contract, and that is the open question.**
|
|
680
|
+
* `@noy-db/ports/to` asserts none of it — its three CAS cases all operate on
|
|
681
|
+
* a record that already exists — so this convergence is held by nothing, and
|
|
682
|
+
* a third-party adapter owes it nothing. Tracked as core#134. hub's keyring
|
|
683
|
+
* create path passes no `expectedVersion` at all, and moving it is gated on
|
|
684
|
+
* that assertion landing, not on the adapters.
|
|
685
|
+
*/
|
|
637
686
|
put(vault: string, collection: string, id: string, envelope: EncryptedEnvelope, expectedVersion?: number): Promise<void>;
|
|
638
687
|
/** Delete a record. */
|
|
639
688
|
delete(vault: string, collection: string, id: string): Promise<void>;
|
|
@@ -762,9 +811,9 @@ export interface NoydbStore {
|
|
|
762
811
|
* hub also falls back when the staged batch isn't statically safe
|
|
763
812
|
* to submit as one write set — see `canCommitAtomically`.
|
|
764
813
|
*
|
|
765
|
-
* Native implementations today: `
|
|
766
|
-
* Map mutations) and the SQL-backed stores in the
|
|
767
|
-
* repo. `to-dynamo` (`TransactWriteItems`) and `to-browser-idb` (one
|
|
814
|
+
* Native implementations today: hub's own `memoryStore({ full: true })` (one
|
|
815
|
+
* synchronous burst of Map mutations) and the SQL-backed stores in the
|
|
816
|
+
* sibling `noy-db-to` repo — `to-memory` among them, since it moved there. `to-dynamo` (`TransactWriteItems`) and `to-browser-idb` (one
|
|
768
817
|
* `readwrite` transaction) CAN implement it but do not yet. File / S3
|
|
769
818
|
* cannot implement it atomically and should omit the method.
|
|
770
819
|
*/
|
|
@@ -864,7 +913,7 @@ export type VaultPolicyOnDisk = Record<string, unknown>;
|
|
|
864
913
|
* `db.recoverSecret` against these throws
|
|
865
914
|
* {@link RecoveryProfileNotImplementedError}.
|
|
866
915
|
*/
|
|
867
|
-
|
|
916
|
+
type RecoveryEnrollment = {
|
|
868
917
|
readonly profile: 'paper';
|
|
869
918
|
/** Number of single-use codes to print at enrollment. */
|
|
870
919
|
readonly codes: number;
|
|
@@ -1136,6 +1185,125 @@ export interface KeyringFile {
|
|
|
1136
1185
|
* using standard/managed mode, or written before this extension.
|
|
1137
1186
|
*/
|
|
1138
1187
|
readonly echo?: KeyringEchoBlock;
|
|
1188
|
+
/**
|
|
1189
|
+
* core#96 — the member's INBOX KEY PAIR, minted by the grantor at grant /
|
|
1190
|
+
* recovery time. `pub` is the SPKI public half, plaintext and bound into the
|
|
1191
|
+
* roster tag (a store must not be able to swap it for its own); `priv` is the
|
|
1192
|
+
* PKCS#8 private half sealed under the AES key in `deks[INBOX_KEY_ID]`, which
|
|
1193
|
+
* only this member's KEK unwraps. It lets an owner/admin hand this member a
|
|
1194
|
+
* DEK LATER, without the member's secret — see `inbox`.
|
|
1195
|
+
*
|
|
1196
|
+
* Absent on every keyring written before this existed: such a member can be
|
|
1197
|
+
* re-granted (re-keyed) but not amended in place (`MemberInboxMissingError`).
|
|
1198
|
+
*/
|
|
1199
|
+
readonly inbox_key?: {
|
|
1200
|
+
readonly pub: string;
|
|
1201
|
+
readonly priv: {
|
|
1202
|
+
readonly iv: string;
|
|
1203
|
+
readonly data: string;
|
|
1204
|
+
};
|
|
1205
|
+
};
|
|
1206
|
+
/**
|
|
1207
|
+
* core#96 — DEKs delivered to this member by `updateUser` and not yet
|
|
1208
|
+
* drained: a random CEK RSA-OAEP-wrapped to `inbox_key.pub` (`cek`), and the
|
|
1209
|
+
* exported DEK set AES-GCM-sealed under that CEK (`iv`/`data`). `slots` names
|
|
1210
|
+
* the collections inside, plaintext, and is bound into the roster tag so the
|
|
1211
|
+
* rotation scope of a later `revoke` cannot be hidden from it.
|
|
1212
|
+
*
|
|
1213
|
+
* Drained by the member's next tier-1 unlock (`loadKeyring`): the DEKs move
|
|
1214
|
+
* into `deks` under the member's own KEK and the field is dropped. A member
|
|
1215
|
+
* who unlocks only through a tier-2 slot sees them at their next tier-1
|
|
1216
|
+
* open. A revoked admin who cached nothing but the file cannot open a box —
|
|
1217
|
+
* the private half never left this member's keyring.
|
|
1218
|
+
*/
|
|
1219
|
+
readonly inbox?: ReadonlyArray<KeyringInboxBox>;
|
|
1220
|
+
}
|
|
1221
|
+
/**
|
|
1222
|
+
* core#96 / core#100 — one sealed delivery to a member: `slots` names the
|
|
1223
|
+
* collections inside (plaintext, tag-bound as the union over all boxes), `cek`
|
|
1224
|
+
* is a random key RSA-OAEP-wrapped to the member's inbox public half, and the
|
|
1225
|
+
* exported DEK set is AES-GCM under it. Deliveries APPEND a box (`updateUser`,
|
|
1226
|
+
* a rotation, a revoke); a caller can never open an earlier box (only the
|
|
1227
|
+
* member's private half can), so nothing is re-sealed or merged. The drain
|
|
1228
|
+
* opens the boxes in order — a later box wins a slot, so a rotation's new key
|
|
1229
|
+
* overrides an earlier pending one.
|
|
1230
|
+
*/
|
|
1231
|
+
export interface KeyringInboxBox {
|
|
1232
|
+
readonly slots: readonly string[];
|
|
1233
|
+
readonly cek: string;
|
|
1234
|
+
readonly iv: string;
|
|
1235
|
+
readonly data: string;
|
|
1236
|
+
}
|
|
1237
|
+
/** core#76 — scope and mode for `vault.restoreTo(T)`. */
|
|
1238
|
+
export interface RestoreToOptions {
|
|
1239
|
+
/**
|
|
1240
|
+
* Restrict the restore to these collections. Omitted, every collection that
|
|
1241
|
+
* is live now OR appears in history is considered — the union matters,
|
|
1242
|
+
* because a collection dropped since T is absent from the live store and a
|
|
1243
|
+
* restore that skipped it would decline to bring back exactly what was lost.
|
|
1244
|
+
*/
|
|
1245
|
+
readonly collections?: readonly string[];
|
|
1246
|
+
/**
|
|
1247
|
+
* Compute the diff and write NOTHING. The result names every id that would
|
|
1248
|
+
* be written or deleted, per collection, so an admin sees the blast radius
|
|
1249
|
+
* before committing to it.
|
|
1250
|
+
*/
|
|
1251
|
+
readonly dryRun?: boolean;
|
|
1252
|
+
}
|
|
1253
|
+
/** core#76 — what `restoreTo(T)` did, or (with `dryRun`) would do. */
|
|
1254
|
+
export interface RestoreToResult {
|
|
1255
|
+
/** The target instant, as given. */
|
|
1256
|
+
readonly restoredTo: string;
|
|
1257
|
+
/** True when nothing was written. */
|
|
1258
|
+
readonly dryRun: boolean;
|
|
1259
|
+
/** Records put back to their state at T. */
|
|
1260
|
+
readonly written: number;
|
|
1261
|
+
/** Records that exist now and did not exist at T. */
|
|
1262
|
+
readonly deleted: number;
|
|
1263
|
+
/** Records already identical to their state at T. */
|
|
1264
|
+
readonly unchanged: number;
|
|
1265
|
+
/** Per collection, only where something happened. */
|
|
1266
|
+
readonly collections: Readonly<Record<string, {
|
|
1267
|
+
written: string[];
|
|
1268
|
+
deleted: string[];
|
|
1269
|
+
unchanged: number;
|
|
1270
|
+
}>>;
|
|
1271
|
+
}
|
|
1272
|
+
/** core#77 — how `vault.load()` reconciles a pod against the current store. */
|
|
1273
|
+
export interface LoadPodOptions {
|
|
1274
|
+
/**
|
|
1275
|
+
* `'replace'` (default) is the historical behaviour: `saveAll` the data
|
|
1276
|
+
* collections and rewrite the internal ones. Whole-vault replace,
|
|
1277
|
+
* destructive on SQL adapters, and every envelope is written whether or not
|
|
1278
|
+
* the store already holds it byte-identical.
|
|
1279
|
+
*
|
|
1280
|
+
* `'incremental'` writes only what DIFFERS — envelopes whose `(id, _v)` the
|
|
1281
|
+
* store does not already have — and deletes ids the pod does not carry. ⭐
|
|
1282
|
+
* The END STATE IS THE SAME; only the cost differs. In particular a restore
|
|
1283
|
+
* still rewinds (core#111): ids absent from the pod are deleted, never left
|
|
1284
|
+
* behind, so this is not a merge.
|
|
1285
|
+
*
|
|
1286
|
+
* ⛔ Valid only when the pod and the store are the same vault. A pod from
|
|
1287
|
+
* another vault is refused, because "write only the differences" between
|
|
1288
|
+
* unrelated vaults is not a restore, it is a silent union.
|
|
1289
|
+
*/
|
|
1290
|
+
readonly mode?: 'replace' | 'incremental';
|
|
1291
|
+
}
|
|
1292
|
+
/** core#77 — what an incremental load did, per collection and in total. */
|
|
1293
|
+
export interface LoadPodResult {
|
|
1294
|
+
readonly mode: 'replace' | 'incremental';
|
|
1295
|
+
/** Envelopes written because the store lacked them at that version. */
|
|
1296
|
+
readonly written: number;
|
|
1297
|
+
/** Envelopes already present byte-for-version — the saving. */
|
|
1298
|
+
readonly skipped: number;
|
|
1299
|
+
/** Ids the store held and the pod does not carry. */
|
|
1300
|
+
readonly deleted: number;
|
|
1301
|
+
/** Per collection, only where something happened. */
|
|
1302
|
+
readonly collections: Readonly<Record<string, {
|
|
1303
|
+
written: number;
|
|
1304
|
+
skipped: number;
|
|
1305
|
+
deleted: number;
|
|
1306
|
+
}>>;
|
|
1139
1307
|
}
|
|
1140
1308
|
export interface VaultBackup {
|
|
1141
1309
|
readonly _noydb_backup: typeof NOYDB_BACKUP_VERSION;
|
|
@@ -1207,6 +1375,28 @@ export interface ExportStreamOptions {
|
|
|
1207
1375
|
* (a full, all-locale backup; format packages apply their own locale strategy).
|
|
1208
1376
|
*/
|
|
1209
1377
|
readonly resolveLabels?: string;
|
|
1378
|
+
/**
|
|
1379
|
+
* Export only these collections. Omitted (the default) exports every
|
|
1380
|
+
* collection the caller can read.
|
|
1381
|
+
*
|
|
1382
|
+
* ⭐ This NARROWS THE READ — the excluded collections are neither fetched
|
|
1383
|
+
* nor decrypted (core#45b). That is the whole point of the option living
|
|
1384
|
+
* here rather than in a caller's filter: until 0.8 `vault.export`'s
|
|
1385
|
+
* `collections` filtered the chunks AFTER `exportStream` had decrypted the
|
|
1386
|
+
* entire vault, so a caller scoping an export to limit what a compromised
|
|
1387
|
+
* process could observe got no such limit. The published JSDoc said so
|
|
1388
|
+
* honestly; this makes the caveat false instead of merely known.
|
|
1389
|
+
*
|
|
1390
|
+
* ⚠️ A name that does not exist yields nothing rather than throwing — a
|
|
1391
|
+
* caller exporting "these, if present" is an ordinary call, and refusing it
|
|
1392
|
+
* would push a pre-check onto every caller.
|
|
1393
|
+
*
|
|
1394
|
+
* ⛔ Internal, underscore-prefixed collections stay unexportable even when
|
|
1395
|
+
* named explicitly. The unscoped path gets that filter free from `loadAll`;
|
|
1396
|
+
* the scoped path applies it itself, because a filter that depends on which
|
|
1397
|
+
* route reached the data is a filter waiting to be lost.
|
|
1398
|
+
*/
|
|
1399
|
+
readonly collections?: readonly string[];
|
|
1210
1400
|
}
|
|
1211
1401
|
/**
|
|
1212
1402
|
* One chunk yielded by `Vault.exportStream()`.
|
|
@@ -1277,7 +1467,13 @@ export interface DirtyEntry {
|
|
|
1277
1467
|
readonly vault: string;
|
|
1278
1468
|
readonly collection: string;
|
|
1279
1469
|
readonly id: string;
|
|
1280
|
-
|
|
1470
|
+
/**
|
|
1471
|
+
* `rekey` (core#100): a DEK rotation re-encrypted this record IN PLACE — same
|
|
1472
|
+
* `_v`, new bytes. Pushed with a CAS at the CURRENT version (a `put` expects
|
|
1473
|
+
* `version - 1`), so a target still at that version takes the new ciphertext
|
|
1474
|
+
* and one that moved on reports a conflict as usual.
|
|
1475
|
+
*/
|
|
1476
|
+
readonly action: 'put' | 'delete' | 'rekey';
|
|
1281
1477
|
readonly version: number;
|
|
1282
1478
|
readonly timestamp: string;
|
|
1283
1479
|
}
|
|
@@ -1286,6 +1482,32 @@ export interface SyncMetadata {
|
|
|
1286
1482
|
readonly last_push: string | null;
|
|
1287
1483
|
readonly last_pull: string | null;
|
|
1288
1484
|
readonly dirty: DirtyEntry[];
|
|
1485
|
+
/** core#72 — the target's restore epoch this device last adopted (`_sync/epoch` on the target). Absent before any restore. */
|
|
1486
|
+
readonly epoch?: number;
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* core#72 — the record a restorer writes on the target at `_sync/epoch`:
|
|
1490
|
+
* "the vault was REPLACED; merge nothing across this line, resync." Peers read
|
|
1491
|
+
* it at the start of every pull; a newer epoch than the one they adopted parks
|
|
1492
|
+
* their pre-epoch local edits and adopts the target wholesale.
|
|
1493
|
+
*/
|
|
1494
|
+
export interface SyncEpochRecord {
|
|
1495
|
+
readonly epoch: number;
|
|
1496
|
+
readonly at: string;
|
|
1497
|
+
readonly by: string;
|
|
1498
|
+
readonly replaced: number;
|
|
1499
|
+
readonly tombstoned: number;
|
|
1500
|
+
}
|
|
1501
|
+
/** core#72 — what `db.replaceRemote(vault)` did. */
|
|
1502
|
+
export interface ReplaceRemoteResult {
|
|
1503
|
+
/** The epoch now on the target. */
|
|
1504
|
+
readonly epoch: number;
|
|
1505
|
+
/** Local records written to the target unconditionally (re-versioned above the target's copy where needed). */
|
|
1506
|
+
readonly replaced: number;
|
|
1507
|
+
/** Ids the target held that the local vault does not: delete markers written, so every peer removes them. */
|
|
1508
|
+
readonly tombstoned: number;
|
|
1509
|
+
/** Reserved-collection records mirrored (keyrings, users, broker seeds). */
|
|
1510
|
+
readonly reserved: number;
|
|
1289
1511
|
}
|
|
1290
1512
|
export interface Conflict {
|
|
1291
1513
|
readonly vault: string;
|
|
@@ -1303,6 +1525,66 @@ export interface Conflict {
|
|
|
1303
1525
|
*/
|
|
1304
1526
|
readonly resolve?: (winner: EncryptedEnvelope | null) => void;
|
|
1305
1527
|
}
|
|
1528
|
+
/** core#74 — one record a pull applied. */
|
|
1529
|
+
export interface SyncApplied {
|
|
1530
|
+
readonly collection: string;
|
|
1531
|
+
readonly id: string;
|
|
1532
|
+
readonly action: 'put' | 'delete';
|
|
1533
|
+
/** The local copy this replaced, when there was one at a lower version: its version and its author (`_by`). */
|
|
1534
|
+
readonly replaced?: {
|
|
1535
|
+
readonly version: number;
|
|
1536
|
+
readonly by?: string;
|
|
1537
|
+
};
|
|
1538
|
+
}
|
|
1539
|
+
/** core#74 — one record a pull refused at admission. Emitted as `sync:rejected` and listed by `db.rejected(vault)`. */
|
|
1540
|
+
export interface SyncRejection {
|
|
1541
|
+
readonly vault: string;
|
|
1542
|
+
readonly collection: string;
|
|
1543
|
+
readonly id: string;
|
|
1544
|
+
/** The gate's or hook's message. */
|
|
1545
|
+
readonly reason: string;
|
|
1546
|
+
/** The refused envelope's version. */
|
|
1547
|
+
readonly version: number;
|
|
1548
|
+
/** The refused envelope's author, when it carries one. */
|
|
1549
|
+
readonly by?: string;
|
|
1550
|
+
/** ISO time of the refusal — when it was JUDGED, on the judging device. */
|
|
1551
|
+
readonly at: string;
|
|
1552
|
+
/**
|
|
1553
|
+
* core#107 (pilot-1, witnessed) — ISO time the refused RECORD was written,
|
|
1554
|
+
* from its envelope. Present when the envelope carries one.
|
|
1555
|
+
*
|
|
1556
|
+
* ⭐ Why both: an arbiter judges at PULL time, not at write time, so a
|
|
1557
|
+
* record legitimately written and pushed while a period was open can be
|
|
1558
|
+
* refused later when it re-closes. Under report-only that is harmless, but
|
|
1559
|
+
* a notice saying only `at` reads as "your push was wrong". With `recordAt`
|
|
1560
|
+
* a UI can say what actually happened — written then, refused now.
|
|
1561
|
+
*/
|
|
1562
|
+
readonly recordAt?: string;
|
|
1563
|
+
/**
|
|
1564
|
+
* core#108 — which judgement refused it. Set on every path since core#107;
|
|
1565
|
+
* ⚠️ absent only on a rejection parked by an older hub. `'sync-apply'` is a
|
|
1566
|
+
* record that ARRIVED here and was turned away. `'push-recheck'`
|
|
1567
|
+
* is this device's OWN record, refused on the way out: it is still in the
|
|
1568
|
+
* local store and still dirty, so it pushes by itself as soon as it passes
|
|
1569
|
+
* again. ⛔ `readmit()` is a sync-apply affordance — for a push-recheck
|
|
1570
|
+
* parking there is nothing to re-apply, the record never left.
|
|
1571
|
+
*
|
|
1572
|
+
* core#107 — `'arbiter'` is a refusal made on ANOTHER device (the vault's
|
|
1573
|
+
* configured arbiter) and replicated here, which is how the writer finds
|
|
1574
|
+
* out at all. It is REPORT ONLY: the local record is untouched, never
|
|
1575
|
+
* deleted or hidden, and `readmit()` is meaningless for it too — this
|
|
1576
|
+
* device never refused anything.
|
|
1577
|
+
*/
|
|
1578
|
+
readonly origin?: 'sync-apply' | 'push-recheck' | 'arbiter';
|
|
1579
|
+
}
|
|
1580
|
+
/** core#74 — what `db.rejected(vault)` returns: the parked envelopes and their two fates. */
|
|
1581
|
+
export interface SyncRejectedApi {
|
|
1582
|
+
list(): Promise<readonly SyncRejection[]>;
|
|
1583
|
+
/** Apply the parked envelope after all — bypassing the gate that refused it — and drop the parking record. */
|
|
1584
|
+
readmit(collection: string, id: string): Promise<void>;
|
|
1585
|
+
/** Drop the parking record; the local copy stays as it was. */
|
|
1586
|
+
discard(collection: string, id: string): Promise<void>;
|
|
1587
|
+
}
|
|
1306
1588
|
/**
|
|
1307
1589
|
* #590: sync suppressed a live envelope because a crypto-shred tombstone is
|
|
1308
1590
|
* terminal for its record id. Reported on push/pull results (`erasures`) and
|
|
@@ -1370,11 +1652,55 @@ export type CollectionConflictResolver = (id: string, local: EncryptedEnvelope,
|
|
|
1370
1652
|
export interface PushOptions {
|
|
1371
1653
|
/** Only push records belonging to these collections. Omit to push all dirty. */
|
|
1372
1654
|
collections?: string[];
|
|
1655
|
+
/**
|
|
1656
|
+
* core#92 — "everything local is authoritative, send it": mark EVERY record
|
|
1657
|
+
* in the local store dirty before pushing, so records that reached the store
|
|
1658
|
+
* with no target present (written before `attachSyncTarget()`, or loaded
|
|
1659
|
+
* from a pod — core#71's shape) are pushed. CAS still applies per record:
|
|
1660
|
+
* a remote that already advanced a record resolves through the ordinary
|
|
1661
|
+
* conflict path. Default `false`.
|
|
1662
|
+
*/
|
|
1663
|
+
full?: boolean;
|
|
1664
|
+
/**
|
|
1665
|
+
* core#93 — bounded parallelism over the dirty entries: this many in-flight
|
|
1666
|
+
* puts at once. Each record keeps its own CAS and conflict path; only the
|
|
1667
|
+
* interleaving changes. Default `1` (serial, byte-for-byte the previous
|
|
1668
|
+
* behaviour). A cloud store with ~45 ms per put goes from N×45 ms to
|
|
1669
|
+
* roughly N×45/concurrency ms.
|
|
1670
|
+
*
|
|
1671
|
+
* ⚠️ **There is a ceiling, and it is the STORE's partition, not this pool.**
|
|
1672
|
+
* Measured on `to-aws-dynamo` (noy-db/to#10, 300 records against a latency
|
|
1673
|
+
* fake): 1-wide 14.1 s, 8-wide 1.79 s, 32-wide 0.48 s — linear, because
|
|
1674
|
+
* nothing in the adapter serializes. That is not permission to go there
|
|
1675
|
+
* against a real table. The single-table layout puts every record of a vault
|
|
1676
|
+
* under ONE partition key — the vault name IS the whole partition key, which
|
|
1677
|
+
* is the same decision that makes `loadAll()` a single Query — and a
|
|
1678
|
+
* DynamoDB partition tops out at ~1000 write units per second, with an
|
|
1679
|
+
* envelope over 1 KB costing more than one unit. 8-wide at ~45 ms is ~178
|
|
1680
|
+
* writes/sec, comfortably under; raising the knob far past that meets
|
|
1681
|
+
* per-partition throttling, not a connection-pool limit, so a bigger pool is
|
|
1682
|
+
* not the fix. `8` is the number pilot-1 runs and the one to start from.
|
|
1683
|
+
*/
|
|
1684
|
+
concurrency?: number;
|
|
1373
1685
|
}
|
|
1374
1686
|
/** Options for targeted pull operations. */
|
|
1375
1687
|
export interface PullOptions {
|
|
1376
1688
|
/** Only pull these collections. Omit to pull all. */
|
|
1377
1689
|
collections?: string[];
|
|
1690
|
+
/**
|
|
1691
|
+
* core#81 — walk the remote page by page instead of `loadAll()`: memory is
|
|
1692
|
+
* bounded by one page, and the total is known BEFORE the first record is
|
|
1693
|
+
* applied (one `list()` per collection), so `sync:progress` is real from
|
|
1694
|
+
* the start. Uses the store's `listPage` when it offers one, else
|
|
1695
|
+
* `list` + `get` in batches.
|
|
1696
|
+
*
|
|
1697
|
+
* ⚠️ Scope, stated: the store contract cannot enumerate collections, so a
|
|
1698
|
+
* paged pull walks the collections THIS keyring names (its DEK map) plus
|
|
1699
|
+
* any `collections` filter — the ones the caller can open. A full pull
|
|
1700
|
+
* also carries ciphertext for collections the caller holds no key for;
|
|
1701
|
+
* paged mode cannot. Default `false`.
|
|
1702
|
+
*/
|
|
1703
|
+
paged?: boolean;
|
|
1378
1704
|
/**
|
|
1379
1705
|
* Only pull records with `_ts` strictly after this ISO timestamp.
|
|
1380
1706
|
* Stores that implement `listSince` use it directly; others fall back
|
|
@@ -1406,6 +1732,58 @@ export interface PushResult {
|
|
|
1406
1732
|
readonly errors: Error[];
|
|
1407
1733
|
/** #590: tombstone enforcements applied during this run (never resolver-visible). */
|
|
1408
1734
|
readonly erasures?: ErasureEnforcement[];
|
|
1735
|
+
/**
|
|
1736
|
+
* core#96 — reserved-collection records mirrored by this run (`_keyring`,
|
|
1737
|
+
* `_users`, `_broker*`, …): they travel outside the dirty log, so `pushed`
|
|
1738
|
+
* / `pulled` never count them. Present when non-zero, so "did my new key
|
|
1739
|
+
* get out" is observable. A local `_keyring` the target already supersedes
|
|
1740
|
+
* is reported in `conflicts` (collection `_keyring`), never silently dropped.
|
|
1741
|
+
*/
|
|
1742
|
+
readonly reserved?: number;
|
|
1743
|
+
/**
|
|
1744
|
+
* core#108 — this device's own dirty records, refused by its OWN gates when
|
|
1745
|
+
* re-judged against current local state just before the push. They were
|
|
1746
|
+
* WITHHELD: nothing left for them, the local copy is untouched, and they
|
|
1747
|
+
* stay dirty so a later push carries them once the rule passes. Present
|
|
1748
|
+
* when non-zero.
|
|
1749
|
+
*
|
|
1750
|
+
* ⛔ NOT AN ERROR, and a sync indicator must not render it as one (pilot-1,
|
|
1751
|
+
* on the shipped behaviour). `pushed: 0` with `rejected` present means
|
|
1752
|
+
* "N records waiting on a rule", not "N records failed": nothing was lost,
|
|
1753
|
+
* nothing needs resubmitting, and the next push carries them by itself once
|
|
1754
|
+
* the rule passes. The failure fates are `errors` and `conflicts`; this is
|
|
1755
|
+
* a third thing and reads as a queue, not a fault.
|
|
1756
|
+
*/
|
|
1757
|
+
readonly rejected?: SyncRejection[];
|
|
1758
|
+
}
|
|
1759
|
+
/**
|
|
1760
|
+
* core#81 — a progress sample during a pull or push. Emitted as
|
|
1761
|
+
* `sync:progress`, throttled (every 25 records or ~250 ms, whichever first),
|
|
1762
|
+
* and mirrored on `SyncTargetStatus.inFlight` for a UI that polls. `total`
|
|
1763
|
+
* is present once the engine knows it: for a pull, after the remote snapshot
|
|
1764
|
+
* has been downloaded (progress then measures the APPLY phase, which is the
|
|
1765
|
+
* long one on an indexed store); for a push, from the first sample (the
|
|
1766
|
+
* dirty log is local). `bytes` approximates ciphertext payload size.
|
|
1767
|
+
*/
|
|
1768
|
+
export interface SyncProgress {
|
|
1769
|
+
readonly direction: 'pull' | 'push';
|
|
1770
|
+
readonly phase: 'reserved' | 'summaries' | 'records';
|
|
1771
|
+
readonly records: number;
|
|
1772
|
+
readonly bytes: number;
|
|
1773
|
+
readonly total?: {
|
|
1774
|
+
readonly records: number;
|
|
1775
|
+
readonly bytes?: number;
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
/** core#82 — result of `db.realign(vault)`. */
|
|
1779
|
+
export interface RealignResult {
|
|
1780
|
+
/** Local user-collection envelopes examined. */
|
|
1781
|
+
readonly checked: number;
|
|
1782
|
+
/** Envelopes that failed to authenticate locally and were replaced from the target. */
|
|
1783
|
+
readonly replaced: number;
|
|
1784
|
+
/** Envelopes that failed locally AND the target's copy failed or was absent — left as they were, listed in `errors`. */
|
|
1785
|
+
readonly unrecoverable: number;
|
|
1786
|
+
readonly errors: Error[];
|
|
1409
1787
|
}
|
|
1410
1788
|
export interface PullResult {
|
|
1411
1789
|
readonly pulled: number;
|
|
@@ -1413,6 +1791,38 @@ export interface PullResult {
|
|
|
1413
1791
|
readonly errors: Error[];
|
|
1414
1792
|
/** #590: tombstone enforcements applied during this run (never resolver-visible). */
|
|
1415
1793
|
readonly erasures?: ErasureEnforcement[];
|
|
1794
|
+
/** core#96 — reserved-collection records mirrored (copied + deleted) by this run; see `PushResult.reserved`. */
|
|
1795
|
+
readonly reserved?: number;
|
|
1796
|
+
/**
|
|
1797
|
+
* core#74 — every record this pull APPLIED, in order, with what it replaced
|
|
1798
|
+
* when the local copy was superseded. This is the per-record visibility a
|
|
1799
|
+
* count cannot give: an app can list what arrived, and a writer whose record
|
|
1800
|
+
* was overwritten by a newer version from another device sees `replaced`
|
|
1801
|
+
* — the "you lost" the conflict path never told it (same-id concurrent edits
|
|
1802
|
+
* resolve to the LAST pusher, reported to that pusher only). Present when
|
|
1803
|
+
* non-empty.
|
|
1804
|
+
*/
|
|
1805
|
+
readonly applied?: readonly SyncApplied[];
|
|
1806
|
+
/**
|
|
1807
|
+
* core#74 — records this pull REFUSED at admission: a `beforePut` gate or a
|
|
1808
|
+
* `db.onBeforeWrite` hook on this device threw for the incoming record (a
|
|
1809
|
+
* write into a period closed here, say). Each is parked under
|
|
1810
|
+
* `_sync_rejected` with the envelope intact; the local copy is untouched.
|
|
1811
|
+
* `db.rejected(vault)` lists, readmits or discards them. Present when
|
|
1812
|
+
* non-empty.
|
|
1813
|
+
*/
|
|
1814
|
+
readonly rejected?: readonly SyncRejection[];
|
|
1815
|
+
/** core#72 — the target's restore epoch, when the target carries one. */
|
|
1816
|
+
readonly epoch?: number;
|
|
1817
|
+
/**
|
|
1818
|
+
* core#72 — this pull crossed a restore epoch: the target was REPLACED since
|
|
1819
|
+
* this device last synced (`db.replaceRemote` on another device). Every
|
|
1820
|
+
* local edit not yet pushed was parked under `_sync_rejected` (reason
|
|
1821
|
+
* `restore-epoch`, listed by `db.rejected(vault)`), the dirty log was
|
|
1822
|
+
* dropped, and the target's state was adopted wholesale — records the
|
|
1823
|
+
* restore removed arrive as delete markers.
|
|
1824
|
+
*/
|
|
1825
|
+
readonly resynced?: true;
|
|
1416
1826
|
/**
|
|
1417
1827
|
* #807: present on period-scoped pulls only — per-phase KPI counters
|
|
1418
1828
|
* (`summaries` = the `_periods` navigation index + companions; `records`
|
|
@@ -1450,6 +1860,10 @@ export interface SyncStatus {
|
|
|
1450
1860
|
readonly lastPush: string | null;
|
|
1451
1861
|
/** As {@link SyncStatus.lastPush}, for pulls: last pull that had no errors. */
|
|
1452
1862
|
readonly lastPull: string | null;
|
|
1863
|
+
/** core#72 — the target's restore epoch this device has adopted, when any. */
|
|
1864
|
+
readonly epoch?: number;
|
|
1865
|
+
/** core#81 — the running sync's latest progress sample, or absent when idle. */
|
|
1866
|
+
readonly inFlight?: SyncProgress;
|
|
1453
1867
|
/**
|
|
1454
1868
|
* Whether the **browser** reports network connectivity — driven solely by the
|
|
1455
1869
|
* global `online`/`offline` events (#1034). It is NOT target reachability: an
|
|
@@ -1539,6 +1953,8 @@ export interface SyncTargetStatus {
|
|
|
1539
1953
|
readonly lastPush: string | null;
|
|
1540
1954
|
/** Last pull that completed with no errors, or `null`. */
|
|
1541
1955
|
readonly lastPull: string | null;
|
|
1956
|
+
/** core#72 — the target's restore epoch this device has adopted, when any. */
|
|
1957
|
+
readonly epoch?: number;
|
|
1542
1958
|
/**
|
|
1543
1959
|
* Nothing queued for this target — `dirty === 0`.
|
|
1544
1960
|
*
|
|
@@ -1549,6 +1965,8 @@ export interface SyncTargetStatus {
|
|
|
1549
1965
|
* not pulled.
|
|
1550
1966
|
*/
|
|
1551
1967
|
readonly caughtUp: boolean;
|
|
1968
|
+
/** core#81 — the running sync's latest progress sample, or absent when nothing is in flight. */
|
|
1969
|
+
readonly inFlight?: SyncProgress;
|
|
1552
1970
|
}
|
|
1553
1971
|
export interface SyncTargetInfo {
|
|
1554
1972
|
readonly label: string | undefined;
|
|
@@ -1591,8 +2009,23 @@ export interface NoydbEventMap {
|
|
|
1591
2009
|
};
|
|
1592
2010
|
'sync:push': PushResult;
|
|
1593
2011
|
'sync:pull': PullResult;
|
|
2012
|
+
/** core#81 — emitted while a pull/push runs (throttled); `sync:push`/`sync:pull` stay the terminal events. */
|
|
2013
|
+
'sync:progress': SyncProgress;
|
|
1594
2014
|
'sync:erasure': ErasureEnforcement;
|
|
1595
2015
|
'sync:conflict': Conflict;
|
|
2016
|
+
/** core#74 — a pulled record refused by this device's admission gate; parked under `_sync_rejected`. */
|
|
2017
|
+
'sync:rejected': SyncRejection;
|
|
2018
|
+
/** core#72 — this device replaced a target: the epoch it wrote and the counts. */
|
|
2019
|
+
'sync:replace': ReplaceRemoteResult & {
|
|
2020
|
+
readonly vault: string;
|
|
2021
|
+
};
|
|
2022
|
+
/** core#72 — a pull crossed a restore epoch on the target; the local dirty log was parked and the target adopted. */
|
|
2023
|
+
'sync:epoch': {
|
|
2024
|
+
readonly vault: string;
|
|
2025
|
+
readonly from: number | null;
|
|
2026
|
+
readonly to: number;
|
|
2027
|
+
readonly parked: number;
|
|
2028
|
+
};
|
|
1596
2029
|
'write:conflict': WriteConflict;
|
|
1597
2030
|
'sync:online': void;
|
|
1598
2031
|
'sync:offline': void;
|
|
@@ -1777,15 +2210,24 @@ export interface GrantOptions {
|
|
|
1777
2210
|
readonly initialProfile?: unknown;
|
|
1778
2211
|
}
|
|
1779
2212
|
/**
|
|
1780
|
-
* Caller payload for `db.updateUser
|
|
1781
|
-
*
|
|
2213
|
+
* Caller payload for `db.updateUser`: change what an EXISTING member may
|
|
2214
|
+
* do, without holding their secret.
|
|
1782
2215
|
*
|
|
1783
2216
|
* `role`, `displayName`, and `permissions` live in the plaintext header
|
|
1784
2217
|
* of `_keyring/<userId>` (the sync engine reads them without keys).
|
|
1785
|
-
*
|
|
1786
|
-
*
|
|
1787
|
-
*
|
|
1788
|
-
*
|
|
2218
|
+
* The member's KEK, salt, authenticator slots and recovery enrollments
|
|
2219
|
+
* are untouched. Last-write-wins through the existing keyring put (same
|
|
2220
|
+
* concurrency story as `db.grant` / `db.revoke`).
|
|
2221
|
+
*
|
|
2222
|
+
* core#96 — a change that WIDENS access (a new collection, a wrap-all
|
|
2223
|
+
* role) delivers the DEKs the member lacks through their keyring inbox
|
|
2224
|
+
* (`KeyringFile.inbox`): sealed to the member's inbox key pair, drained at
|
|
2225
|
+
* their next tier-1 unlock. A change that NARROWS access drops the DEKs
|
|
2226
|
+
* and rotates those collections, exactly as a narrowing `grant` does
|
|
2227
|
+
* (#1097). Before this existed, `updateUser` could name a collection the
|
|
2228
|
+
* member had no key for — a permanently blind slot — and `grant` was the
|
|
2229
|
+
* only widening path, which re-keys the member and needs their CURRENT
|
|
2230
|
+
* secret. Use `grant` to create or re-key; use this to change access.
|
|
1789
2231
|
*
|
|
1790
2232
|
* Top-level fields are partial-merge: absent fields are not modified.
|
|
1791
2233
|
* `null` on `displayName` clears the field (stored as the empty string;
|
|
@@ -3664,6 +4106,13 @@ export type ActiveTier = 1 | 2 | 3;
|
|
|
3664
4106
|
* duplicated here (rather than imported) because the kernel spine may not
|
|
3665
4107
|
* statically import a with-* service; see {@link PolicyCheckGateFn}.
|
|
3666
4108
|
*/
|
|
4109
|
+
/**
|
|
4110
|
+
* `PolicyCheckGateContext` — PUBLISHED API, reachable from @noy-db/hub, @noy-db/hub/policy. Flagged as unused because
|
|
4111
|
+
* nothing inside hub imports it from this module; a consumer does. Do not narrow
|
|
4112
|
+
* or delete without a seam change (#55).
|
|
4113
|
+
*
|
|
4114
|
+
* @public
|
|
4115
|
+
*/
|
|
3667
4116
|
export interface PolicyCheckGateContext {
|
|
3668
4117
|
/** Tier the active session currently holds. */
|
|
3669
4118
|
readonly activeTier: ActiveTier;
|
|
@@ -135,16 +135,6 @@ export declare function assertStrongSecret(s: string, opts?: SecretPolicy & {
|
|
|
135
135
|
* weak inputs visible in any UI that displays an entropy meter.
|
|
136
136
|
*/
|
|
137
137
|
export declare function estimateEntropy(secret: string): number;
|
|
138
|
-
/**
|
|
139
|
-
* Internal compatibility shim. Older code paths used the throwing
|
|
140
|
-
* `validateSecret(s)` directly; some still do via re-exports. Routes
|
|
141
|
-
* to the new `assertStrongSecret` so the contract holds for both
|
|
142
|
-
* shapes during the transition. New code should call
|
|
143
|
-
* {@link assertStrongSecret} directly.
|
|
144
|
-
*
|
|
145
|
-
* @internal
|
|
146
|
-
*/
|
|
147
|
-
export declare function legacyAssertSecret(s: string): void;
|
|
148
138
|
/** Dedicated floors for the echo mode's three parts (spec resolved Q1/Q5). */
|
|
149
139
|
export interface EchoSecretPolicy {
|
|
150
140
|
/** Floor for the typed prompt — the brute-forceable-in-isolation part. */
|