@noy-db/hub 0.6.0-pre.9 → 0.7.0-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 +7127 -0
- package/README.md +1 -1
- package/codemods/0.4.0-pre.json +24 -0
- package/codemods/0.6.0-pre.json +229 -0
- package/codemods/0.7.0-pre.json +258 -0
- package/dist/api-EQYRTZO2.js +20 -0
- package/dist/as/index.js +146 -0
- package/dist/as/index.js.map +1 -0
- package/dist/at/index.js +23 -0
- package/dist/attestation/index.js +19 -19
- package/dist/{backup-KULFZ2T4.js → backup-Z7ZBTAQ6.js} +36 -18
- package/dist/backup-Z7ZBTAQ6.js.map +1 -0
- package/dist/blobs/index.js +22 -20
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/by/index.js +11 -0
- package/dist/cargo/index.js +40 -36
- package/dist/{chunk-YAWK6AWF.js → chunk-225O5CXQ.js} +2 -2
- package/dist/{chunk-MSWYQLMQ.js → chunk-2GXEQUEX.js} +2 -2
- package/dist/chunk-2GXEQUEX.js.map +1 -0
- package/dist/{chunk-3URQC7EH.js → chunk-2LPVI4PX.js} +355 -132
- package/dist/chunk-2LPVI4PX.js.map +1 -0
- package/dist/{chunk-JJNOLSG5.js → chunk-3L2MVE36.js} +15 -16
- package/dist/chunk-3L2MVE36.js.map +1 -0
- package/dist/{chunk-OF3L2SD6.js → chunk-3QARDAYW.js} +2 -2
- package/dist/{chunk-WLZ47GSL.js → chunk-467SKJ65.js} +12 -10
- package/dist/{chunk-WLZ47GSL.js.map → chunk-467SKJ65.js.map} +1 -1
- package/dist/{chunk-W3TVWF6N.js → chunk-4A4TYISP.js} +2 -2
- package/dist/{chunk-ZJADGNYF.js → chunk-4AOERLTV.js} +1 -1
- package/dist/chunk-4AOERLTV.js.map +1 -0
- package/dist/{chunk-CCZJJ4I2.js → chunk-4G25SDQL.js} +6 -6
- package/dist/{chunk-4I72F5DF.js → chunk-4LPF226H.js} +11 -14
- package/dist/chunk-4LPF226H.js.map +1 -0
- package/dist/{chunk-7F4DBNSP.js → chunk-4ZPE6SKS.js} +135 -18
- package/dist/chunk-4ZPE6SKS.js.map +1 -0
- package/dist/{chunk-7TSYBD3E.js → chunk-5263OEM3.js} +2 -2
- package/dist/{chunk-WFUIE565.js → chunk-57JTHWLQ.js} +17 -14
- package/dist/chunk-57JTHWLQ.js.map +1 -0
- package/dist/{chunk-FNSMZQS4.js → chunk-5ACAVJUI.js} +2 -2
- package/dist/{chunk-PDLLCOGD.js → chunk-5AFMP532.js} +20 -17
- package/dist/chunk-5AFMP532.js.map +1 -0
- package/dist/{chunk-JRKZTEZZ.js → chunk-5W7YXFV5.js} +444 -73
- package/dist/chunk-5W7YXFV5.js.map +1 -0
- package/dist/chunk-6EW2UCVF.js +190 -0
- package/dist/chunk-6EW2UCVF.js.map +1 -0
- package/dist/{chunk-4VUPLMZ6.js → chunk-6FOGTKBY.js} +68 -73
- package/dist/chunk-6FOGTKBY.js.map +1 -0
- package/dist/{chunk-VMCCGUQB.js → chunk-7LYUJNU3.js} +2 -2
- package/dist/{chunk-52JPHN5N.js → chunk-A2YW5EMU.js} +27 -149
- package/dist/chunk-A2YW5EMU.js.map +1 -0
- package/dist/{chunk-WLYIROCJ.js → chunk-AB5P32RE.js} +2 -2
- package/dist/{chunk-PL2GHSCM.js → chunk-ALB64CZM.js} +157 -90
- package/dist/chunk-ALB64CZM.js.map +1 -0
- package/dist/{chunk-SUFG5E73.js → chunk-ALUNQEBY.js} +2 -2
- package/dist/{chunk-CADUYBQD.js → chunk-ATL3ZVXT.js} +2 -2
- package/dist/{chunk-BWVKEOPE.js → chunk-ATV637J7.js} +7 -11
- package/dist/chunk-ATV637J7.js.map +1 -0
- package/dist/{chunk-DG27IUVI.js → chunk-CBRS2NEK.js} +2 -11
- package/dist/chunk-CBRS2NEK.js.map +1 -0
- package/dist/{chunk-7MNBICB5.js → chunk-CN6B5PEN.js} +16 -14
- package/dist/chunk-CN6B5PEN.js.map +1 -0
- package/dist/{chunk-6FJWSWFT.js → chunk-DBNYPLWY.js} +3 -3
- package/dist/{chunk-5JY5TSVY.js → chunk-DFAUMLD7.js} +25 -31
- package/dist/chunk-DFAUMLD7.js.map +1 -0
- package/dist/{chunk-FFDNKRCY.js → chunk-DKWPJOYH.js} +2 -2
- package/dist/chunk-DKWPJOYH.js.map +1 -0
- package/dist/{chunk-VJFMXYKP.js → chunk-E6YA6UAP.js} +2 -2
- package/dist/{chunk-WASHZV34.js → chunk-F23WQK3G.js} +65 -27
- package/dist/chunk-F23WQK3G.js.map +1 -0
- package/dist/{chunk-JIUVJ4M7.js → chunk-F7ZFRPGQ.js} +3 -3
- package/dist/{chunk-HXGUIPQB.js → chunk-FOG7YEJP.js} +3 -3
- package/dist/{chunk-QULVCV3M.js → chunk-GK4DRVUD.js} +6 -6
- package/dist/chunk-GK4DRVUD.js.map +1 -0
- package/dist/{chunk-BRVW2GS5.js → chunk-H36KSN6X.js} +87 -34
- package/dist/chunk-H36KSN6X.js.map +1 -0
- package/dist/{chunk-O2ERS4UJ.js → chunk-H4M7ADXY.js} +81 -52
- package/dist/chunk-H4M7ADXY.js.map +1 -0
- package/dist/{chunk-FZ6NYJ7L.js → chunk-H7HP56F6.js} +11 -8
- package/dist/chunk-H7HP56F6.js.map +1 -0
- package/dist/chunk-HK67PX4J.js +27 -0
- package/dist/chunk-HK67PX4J.js.map +1 -0
- package/dist/{chunk-X56RTUK3.js → chunk-HM4JSXX2.js} +3 -3
- package/dist/{chunk-AHLJSVRL.js → chunk-HTGRQZFB.js} +5 -7
- package/dist/chunk-HTGRQZFB.js.map +1 -0
- package/dist/{chunk-GQ3BX5EA.js → chunk-I3ISCYT7.js} +2 -2
- package/dist/{chunk-Q6TEJXBX.js → chunk-IESNYJXZ.js} +31 -49
- package/dist/chunk-IESNYJXZ.js.map +1 -0
- package/dist/{chunk-FUHKW252.js → chunk-J4MN6XIU.js} +2 -2
- package/dist/{chunk-ADW22QSB.js → chunk-J4UJ5FRV.js} +4 -4
- package/dist/{chunk-HNGSV2YC.js → chunk-JBIV4FLR.js} +67 -10
- package/dist/chunk-JBIV4FLR.js.map +1 -0
- package/dist/{chunk-HVQGCKY4.js → chunk-JVLSU7S2.js} +2 -2
- package/dist/{chunk-AR2JDFAE.js → chunk-KDJGJR7F.js} +2 -2
- package/dist/{chunk-NPP5R7FF.js → chunk-KN4W2OQ4.js} +22 -18
- package/dist/chunk-KN4W2OQ4.js.map +1 -0
- package/dist/{chunk-G6S5VVHP.js → chunk-L6GTLZRK.js} +10 -10
- package/dist/chunk-L6GTLZRK.js.map +1 -0
- package/dist/{chunk-2BMRJ6LQ.js → chunk-LF6DMX4C.js} +8 -11
- package/dist/{chunk-2BMRJ6LQ.js.map → chunk-LF6DMX4C.js.map} +1 -1
- package/dist/chunk-LFUID7OW.js +163 -0
- package/dist/chunk-LFUID7OW.js.map +1 -0
- package/dist/{chunk-747LRSOO.js → chunk-LKFKXS5K.js} +2 -2
- package/dist/{chunk-U5O6GIWZ.js → chunk-LR4Z47QD.js} +3 -3
- package/dist/{chunk-VZ3XFUQ7.js → chunk-MTBXJAS4.js} +16 -22
- package/dist/chunk-MTBXJAS4.js.map +1 -0
- package/dist/chunk-N4CNVSUF.js +66 -0
- package/dist/chunk-N4CNVSUF.js.map +1 -0
- package/dist/{chunk-RTAMLDWP.js → chunk-NLKLXXTO.js} +2 -2
- package/dist/{chunk-IGJCYUT5.js → chunk-NSITFOCJ.js} +1 -1
- package/dist/chunk-NSITFOCJ.js.map +1 -0
- package/dist/{chunk-FDX7OWWI.js → chunk-OPXR4PB2.js} +2 -2
- package/dist/{chunk-4GZ6XOVW.js → chunk-OWLVBOWO.js} +44 -42
- package/dist/chunk-OWLVBOWO.js.map +1 -0
- package/dist/{chunk-Z45YRGFO.js → chunk-P6ASQOZR.js} +2 -2
- package/dist/{chunk-5O5HRRTV.js → chunk-PCQDY6QN.js} +7 -7
- package/dist/{chunk-5O5HRRTV.js.map → chunk-PCQDY6QN.js.map} +1 -1
- package/dist/{chunk-BEFVYAR5.js → chunk-PGFKIOR3.js} +4 -4
- package/dist/chunk-PGFKIOR3.js.map +1 -0
- package/dist/{chunk-3FSX6LDG.js → chunk-POS53FG6.js} +18 -3
- package/dist/{chunk-3FSX6LDG.js.map → chunk-POS53FG6.js.map} +1 -1
- package/dist/{chunk-3IXIU6FP.js → chunk-PQ6Z2TAP.js} +7 -10
- package/dist/chunk-PQ6Z2TAP.js.map +1 -0
- package/dist/{chunk-CEJWMBXO.js → chunk-PUJTKLPL.js} +6 -2
- package/dist/chunk-PUJTKLPL.js.map +1 -0
- package/dist/{chunk-GAG7QOVO.js → chunk-QGJ4XIA7.js} +53 -18
- package/dist/chunk-QGJ4XIA7.js.map +1 -0
- package/dist/{chunk-2DHSSLOD.js → chunk-QHJKK77B.js} +13 -15
- package/dist/chunk-QHJKK77B.js.map +1 -0
- package/dist/{chunk-2Z3NCLNX.js → chunk-QI5NWLVW.js} +7 -7
- package/dist/{chunk-6SAFL5YE.js → chunk-RC4BROYR.js} +3 -3
- package/dist/{chunk-NJDQ4YSV.js → chunk-RDHUZ674.js} +4 -4
- package/dist/{chunk-YPYHVOXP.js → chunk-RK7N4OQ5.js} +2 -2
- package/dist/chunk-RK7N4OQ5.js.map +1 -0
- package/dist/{chunk-3737A6EA.js → chunk-S2VG3ABP.js} +127 -31
- package/dist/chunk-S2VG3ABP.js.map +1 -0
- package/dist/{chunk-3JVXVJ7L.js → chunk-S35S77YU.js} +10 -10
- package/dist/{chunk-KUDZVJKQ.js → chunk-SHILAQH5.js} +2 -2
- package/dist/{chunk-4UVDI4XE.js → chunk-T3PHCEN4.js} +4 -4
- package/dist/{chunk-55LKVALY.js → chunk-T7IR4N2S.js} +1 -3
- package/dist/chunk-T7IR4N2S.js.map +1 -0
- package/dist/{chunk-RXYYFSBB.js → chunk-TOV6VMHF.js} +6 -6
- package/dist/chunk-TOV6VMHF.js.map +1 -0
- package/dist/{chunk-W77KZHCW.js → chunk-TVIFAHZR.js} +16 -17
- package/dist/chunk-TVIFAHZR.js.map +1 -0
- package/dist/chunk-UBSFPGVJ.js +1 -0
- package/dist/{chunk-FAXZQ5UF.js → chunk-UCUALOSM.js} +2 -2
- package/dist/{chunk-4HDYQL3J.js → chunk-VAG47QHV.js} +2 -2
- package/dist/{chunk-35EBKWQU.js → chunk-VFIWDPXZ.js} +4 -4
- package/dist/{chunk-5ZKS6ZE2.js → chunk-VTG7327U.js} +4 -4
- package/dist/chunk-VTG7327U.js.map +1 -0
- package/dist/{chunk-VCETL77O.js → chunk-W5LHQXZU.js} +36 -7
- package/dist/chunk-W5LHQXZU.js.map +1 -0
- package/dist/{chunk-6NVPFKN3.js → chunk-WK5FSW7T.js} +92 -35
- package/dist/chunk-WK5FSW7T.js.map +1 -0
- package/dist/{chunk-HNHCQ556.js → chunk-WLLUM35R.js} +2 -2
- package/dist/{chunk-YJ6IONGA.js → chunk-X62MEF2O.js} +13 -5
- package/dist/chunk-X62MEF2O.js.map +1 -0
- package/dist/{chunk-7G6VDWXB.js → chunk-X67FCULK.js} +5 -5
- package/dist/chunk-X67FCULK.js.map +1 -0
- package/dist/{chunk-UHXCLPGC.js → chunk-XDVVBETV.js} +2 -2
- package/dist/chunk-XDVVBETV.js.map +1 -0
- package/dist/chunk-XJ3FEKEY.js +15 -0
- package/dist/chunk-XJ3FEKEY.js.map +1 -0
- package/dist/{chunk-E6427JU2.js → chunk-XSN63FUS.js} +19 -3
- package/dist/chunk-XSN63FUS.js.map +1 -0
- package/dist/{chunk-JRCYZEHU.js → chunk-XVU7J43V.js} +2 -2
- package/dist/{chunk-2GAJGUNM.js → chunk-Y3YLJORD.js} +408 -260
- package/dist/chunk-Y3YLJORD.js.map +1 -0
- package/dist/{chunk-6BU3L4UE.js → chunk-Y6GZ2P4M.js} +7 -10
- package/dist/chunk-Y6GZ2P4M.js.map +1 -0
- package/dist/{chunk-DMQCLZ4Z.js → chunk-YCSM3GZU.js} +2 -2
- package/dist/{chunk-RV3ARMPN.js → chunk-YKPGQJFU.js} +30 -180
- package/dist/chunk-YKPGQJFU.js.map +1 -0
- package/dist/{chunk-FMQJZH4R.js → chunk-YMLQBZFJ.js} +6 -6
- package/dist/{chunk-6HFM7EIT.js → chunk-YPSOHDNC.js} +2 -2
- package/dist/{chunk-CDB2HVQW.js → chunk-YXA2TCTZ.js} +14 -15
- package/dist/chunk-YXA2TCTZ.js.map +1 -0
- package/dist/{chunk-N35NC4JH.js → chunk-Z2PWOSCJ.js} +2 -2
- package/dist/{chunk-XWX7GL56.js → chunk-Z2WK53N6.js} +47 -23
- package/dist/chunk-Z2WK53N6.js.map +1 -0
- package/dist/{chunk-HPLWFNG4.js → chunk-Z7ZXZL6Y.js} +2 -2
- package/dist/{chunk-PNKHAKQ7.js → chunk-ZO252Q5S.js} +17 -10
- package/dist/chunk-ZO252Q5S.js.map +1 -0
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-2KJAXRRO.js → classified-marker-BSQHU4JT.js} +3 -3
- package/dist/collection-facade-LG3NYZVB.js +45 -0
- package/dist/{computed-6G5M3UPH.js → computed-ASBNTLOK.js} +3 -3
- package/dist/consent/index.js +10 -10
- package/dist/cover/index.js +10 -3
- package/dist/custody/index.js +12 -11
- package/dist/{dead-filter-DCB62VWW.js → dead-filter-QKU56XTQ.js} +2 -2
- package/dist/debug/index.js +1 -1
- package/dist/{delegation-MO7YZYJS.js → delegation-XWRPYODW.js} +24 -23
- package/dist/delegation-XWRPYODW.js.map +1 -0
- package/dist/derivations/index.js +12 -12
- package/dist/derive-CXHCY46K.js +22 -0
- package/dist/directory/index.js +10 -10
- package/dist/{dispatch-MJ6SHB3Y.js → dispatch-4AP4PUZU.js} +18 -18
- package/dist/{dispatch-FZEAWKVM.js → dispatch-VR4LRXZ7.js} +9 -6
- package/dist/dispatch-VR4LRXZ7.js.map +1 -0
- package/dist/{enclave-JU4YIEPB.js → enclave-NYPT7WA7.js} +31 -9
- package/dist/executor-3KFRQETS.js +29 -0
- package/dist/executor-AFHQYRAU.js +9 -0
- package/dist/executor-YYDW6XQI.js +9 -0
- package/dist/export-accessible-BX2ILB4C.js +23 -0
- package/dist/extract-partition-UPOVITFI.js +38 -0
- package/dist/{fanout-sidecar-NNAJQXMX.js → fanout-sidecar-IWP3R4RC.js} +18 -27
- package/dist/fanout-sidecar-IWP3R4RC.js.map +1 -0
- package/dist/{fence-watcher-DHQ775JB.js → fence-watcher-ZVSMLKQD.js} +1 -1
- package/dist/fence-watcher-ZVSMLKQD.js.map +1 -0
- package/dist/find-SZBL2HPB.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +23 -20
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +35 -18
- package/dist/index.js +199 -204
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +4 -4
- package/dist/introspection/index.js +12 -11
- package/dist/issue-G53NB6EW.js +19 -0
- package/dist/kernel/collection-config.d.ts +9 -9
- package/dist/kernel/collection.d.ts +9 -3
- package/dist/kernel/constants.d.ts +36 -0
- package/dist/kernel/enclave/crypto.d.ts +52 -4
- package/dist/kernel/enclave/index.d.ts +10 -3
- package/dist/kernel/enclave/record-aad.d.ts +131 -0
- package/dist/kernel/enclave/record-envelope.d.ts +76 -0
- package/dist/kernel/enclave/record-keys/envelope-body.d.ts +34 -2
- package/dist/kernel/enclave/record-keys/lifecycle.d.ts +22 -5
- package/dist/kernel/enclave/record-keys/record-codec.d.ts +47 -14
- package/dist/kernel/enclave/record-keys/rekey-blob.d.ts +88 -0
- package/dist/kernel/enclave/record-keys/rekey.d.ts +91 -0
- package/dist/kernel/enclave/record-keys/tombstone.d.ts +3 -2
- package/dist/kernel/errors.d.ts +134 -14
- package/dist/kernel/merge-authority.d.ts +25 -0
- package/dist/kernel/noydb.d.ts +33 -10
- package/dist/kernel/query/builder.d.ts +51 -4
- package/dist/kernel/query/join.d.ts +27 -0
- package/dist/kernel/query/live.d.ts +31 -9
- package/dist/kernel/query/predicate.d.ts +9 -0
- package/dist/kernel/refs.d.ts +3 -1
- package/dist/kernel/secret-mode.d.ts +1 -1
- package/dist/kernel/sync-policy.d.ts +0 -2
- package/dist/kernel/tier-visibility.d.ts +34 -0
- package/dist/kernel/types.d.ts +145 -28
- package/dist/kernel/vault.d.ts +16 -7
- package/dist/kernel/via/compose.d.ts +3 -3
- package/dist/kernel/via/index.d.ts +15 -6
- package/dist/kernel/via/pipeline.d.ts +6 -6
- package/dist/kernel/via/reconcile.d.ts +14 -2
- package/dist/kernel/via/taint-binding.d.ts +3 -3
- package/dist/{ledger-AETNF4OM.js → ledger-T5K4P2D7.js} +11 -11
- package/dist/liberate-VEOZRESE.js +25 -0
- package/dist/{link-set-E5HNY67I.js → link-set-76JZ6YB4.js} +11 -11
- package/dist/{managed-secret-CWQ6PND5.js → managed-secret-6YC32VXG.js} +13 -5
- package/dist/materialized-views/index.js +27 -27
- package/dist/migrate-cek-LBRKYUZZ.js +19 -0
- package/dist/migrate-cek-LBRKYUZZ.js.map +1 -0
- package/dist/money/index.js +5 -5
- package/dist/noydb-EDJA4JNJ.js +86 -0
- package/dist/on/index.js +1 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -12
- package/dist/pod/index.js +79 -88
- package/dist/pod-handle-P6DPBM5U.js +41 -0
- package/dist/pod-handle-P6DPBM5U.js.map +1 -0
- package/dist/policy/index.js +11 -4
- package/dist/port/as/active.d.ts +10 -0
- package/dist/port/as/index.d.ts +32 -0
- package/dist/port/as/types.d.ts +113 -0
- package/dist/port/at/index.d.ts +37 -0
- package/dist/port/by/default-provider.d.ts +3 -3
- package/dist/port/by/index.d.ts +32 -10
- package/dist/port/by/types.d.ts +29 -11
- package/dist/port/on/index.d.ts +50 -0
- package/dist/port/to/index.d.ts +4 -4
- package/dist/port/to/locator.d.ts +54 -8
- package/dist/port/with/computed-strategy.d.ts +1 -1
- package/dist/port/with/device-seal-strategy.d.ts +2 -2
- package/dist/port/with/formats-strategy.d.ts +76 -0
- package/dist/port/with/i18n-strategy.d.ts +4 -1
- package/dist/port/with/lookup-strategy.d.ts +4 -1
- package/dist/port/with/merge-authority.d.ts +52 -0
- package/dist/port/with/service-bus.d.ts +0 -4
- package/dist/port/with/strategies.d.ts +13 -5
- package/dist/port/with/team-strategy.d.ts +5 -1
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-2XSSMGEQ.js → post-register-53O7AJRZ.js} +6 -6
- package/dist/query/index.js +6 -6
- package/dist/reduce/index.js +6 -6
- package/dist/register-6TCBR6XD.js +32 -0
- package/dist/registry-DH2L4O2V.js +18 -0
- package/dist/registry-IWFMXCHX.js +9 -0
- package/dist/registry-Q3FG3OAX.js +9 -0
- package/dist/registry-YC3IFG3A.js +19 -0
- package/dist/request-withdrawal-NM5VYR6F.js +31 -0
- package/dist/{reveal-BW36KCOQ.js → reveal-XBIMHAXR.js} +6 -6
- package/dist/revoke-MJNYWO72.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +20 -13
- package/dist/sealed-record/index.js.map +1 -1
- package/dist/search/index.js +4 -4
- package/dist/{seed-GDV5PT4R.js → seed-NSNIGYXE.js} +20 -22
- package/dist/seed-NSNIGYXE.js.map +1 -0
- package/dist/sequence/index.js +9 -9
- package/dist/session/index.js +10 -10
- package/dist/shadow/index.js +2 -2
- package/dist/share-link/index.js +1 -1
- package/dist/signer-6XVS2AU3.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-ARHFVL5U.js → stale-MCS46TFO.js} +10 -10
- package/dist/storage-ZXUT476I.js +23 -0
- package/dist/storage-ZXUT476I.js.map +1 -0
- package/dist/{store-coordination-provider-GFCUOBR6.js → store-coordination-provider-6FM26VQM.js} +22 -15
- package/dist/store-coordination-provider-6FM26VQM.js.map +1 -0
- package/dist/sync/index.js +11 -11
- package/dist/team/index.js +17 -16
- package/dist/tiers/index.js +11 -10
- package/dist/to/index.js +17 -9
- package/dist/to/index.js.map +1 -1
- package/dist/transactions/index.js +4 -4
- package/dist/{ulid-PTAIMDG4.js → ulid-VQW6ERQN.js} +2 -2
- package/dist/ulid-VQW6ERQN.js.map +1 -0
- package/dist/util/index.js +1 -1
- package/dist/vault-diff-FE5J35NJ.js +9 -0
- package/dist/vault-diff-FE5J35NJ.js.map +1 -0
- package/dist/vault-head/index.js +115 -0
- package/dist/vault-head/index.js.map +1 -0
- package/dist/{verify-RO5RTZOJ.js → verify-WYOFLSNA.js} +5 -5
- package/dist/via/blob/binding.d.ts +6 -6
- package/dist/via/blob/index.d.ts +3 -0
- package/dist/via/classified/binding.d.ts +9 -9
- package/dist/via/computed/binding.d.ts +2 -2
- package/dist/via/i18n/binding.d.ts +4 -4
- package/dist/via/lookup/binding.d.ts +5 -5
- package/dist/via/lookup/handle.d.ts +4 -1
- package/dist/via/lookup/index.d.ts +1 -1
- package/dist/via/lookup/snapshot.d.ts +1 -1
- package/dist/via/money/binding.d.ts +3 -3
- package/dist/via/money/normalize.d.ts +1 -1
- package/dist/via/money/where.d.ts +3 -3
- package/dist/walk-JNEOYCAU.js +21 -0
- package/dist/walk-JNEOYCAU.js.map +1 -0
- package/dist/with-audit/periods/periods.d.ts +1 -1
- package/dist/with-audit/periods/strategy.d.ts +1 -1
- package/dist/with-audit/sealed-record/index.d.ts +13 -0
- package/dist/with-audit/tiers/index.d.ts +17 -2
- package/dist/with-cargo/adopt-partition.d.ts +7 -7
- package/dist/with-cargo/extract-partition.d.ts +1 -1
- package/dist/with-cargo/floor.d.ts +1 -1
- package/dist/with-cargo/index.d.ts +2 -2
- package/dist/with-commit/history/history.d.ts +26 -0
- package/dist/with-commit/history/index.d.ts +2 -1
- package/dist/with-commit/history/ledger/store.d.ts +7 -1
- package/dist/with-commit/history/strategy.d.ts +11 -1
- package/dist/with-commit/numbering/index.d.ts +0 -5
- package/dist/with-commit/vault-head/active.d.ts +2 -0
- package/dist/with-commit/vault-head/head.d.ts +28 -0
- package/dist/with-commit/vault-head/index.d.ts +10 -0
- package/dist/with-commit/vault-head/strategy.d.ts +127 -0
- package/dist/with-commit/vault-head/verify.d.ts +90 -0
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +4 -0
- package/dist/with-formula/materialized-views/projection-legs.d.ts +59 -0
- package/dist/with-formula/materialized-views/registry.d.ts +50 -0
- package/dist/with-formula/materialized-views/types.d.ts +68 -10
- package/dist/with-party/directory/cover/storage.d.ts +0 -8
- package/dist/with-party/directory/storage.d.ts +0 -11
- package/dist/with-party/directory/visibility.d.ts +0 -21
- package/dist/with-party/policy/storage.d.ts +0 -10
- package/dist/with-party/team/deed.d.ts +4 -4
- package/dist/with-party/team/device-seal.d.ts +5 -5
- package/dist/with-party/team/echo-ceremony.d.ts +2 -2
- package/dist/with-party/team/echo-secret.d.ts +4 -4
- package/dist/with-party/team/index.d.ts +3 -3
- package/dist/with-party/team/keyring.d.ts +141 -4
- package/dist/with-party/team/managed-secret.d.ts +21 -11
- package/dist/with-party/team/noydb-facade.d.ts +7 -3
- package/dist/with-party/team/{shamir-recovery-provider.d.ts → noydb-shamir.d.ts} +1 -1
- package/dist/with-party/team/recovery.d.ts +3 -3
- package/dist/with-party/team/roster-tag.d.ts +101 -0
- package/dist/with-party/team/rotate-recover.d.ts +5 -5
- package/dist/with-party/team/tiers.d.ts +2 -1
- package/dist/with-pod/format.d.ts +11 -13
- package/dist/with-pod/index.d.ts +10 -10
- package/dist/with-pod/open.d.ts +2 -2
- package/dist/with-pod/pod-handle.d.ts +19 -0
- package/dist/with-pod/pod-store.d.ts +0 -8
- package/dist/with-pod/{bundle.d.ts → pod.d.ts} +17 -25
- package/dist/with-pod/ulid.d.ts +1 -1
- package/dist/with-shape/blobs/blob-compaction.d.ts +13 -0
- package/dist/with-shape/blobs/blob-set.d.ts +83 -11
- package/dist/with-shape/blobs/orphan-report.d.ts +62 -0
- package/dist/with-shape/introspection/describe.d.ts +2 -2
- package/dist/with-shape/schema-update/fence-controller.d.ts +4 -4
- package/dist/with-shape/schema-update/fence-watcher.d.ts +4 -4
- package/dist/with-shape/schema-update/store-coordination-provider.d.ts +7 -6
- package/dist/with-sync/engine.d.ts +54 -5
- package/dist/with-sync/strategy.d.ts +3 -0
- package/dist/withdraw-accessible-ILTSXTIE.js +28 -0
- package/dist/withdraw-accessible-ILTSXTIE.js.map +1 -0
- package/package.json +29 -5
- package/dist/api-RXUMEKT3.js +0 -20
- package/dist/backup-KULFZ2T4.js.map +0 -1
- package/dist/bundle-handle-GFNHT52M.js +0 -36
- package/dist/bundle-handle-GFNHT52M.js.map +0 -1
- package/dist/chunk-2DHSSLOD.js.map +0 -1
- package/dist/chunk-2GAJGUNM.js.map +0 -1
- package/dist/chunk-3737A6EA.js.map +0 -1
- package/dist/chunk-3IXIU6FP.js.map +0 -1
- package/dist/chunk-3URQC7EH.js.map +0 -1
- package/dist/chunk-4GZ6XOVW.js.map +0 -1
- package/dist/chunk-4I72F5DF.js.map +0 -1
- package/dist/chunk-4VUPLMZ6.js.map +0 -1
- package/dist/chunk-52JPHN5N.js.map +0 -1
- package/dist/chunk-55LKVALY.js.map +0 -1
- package/dist/chunk-5JY5TSVY.js.map +0 -1
- package/dist/chunk-5ZKS6ZE2.js.map +0 -1
- package/dist/chunk-6BU3L4UE.js.map +0 -1
- package/dist/chunk-6NVPFKN3.js.map +0 -1
- package/dist/chunk-7F4DBNSP.js.map +0 -1
- package/dist/chunk-7G6VDWXB.js.map +0 -1
- package/dist/chunk-7H73RIE3.js +0 -45
- package/dist/chunk-7H73RIE3.js.map +0 -1
- package/dist/chunk-7MNBICB5.js.map +0 -1
- package/dist/chunk-AFHQATY4.js +0 -47
- package/dist/chunk-AFHQATY4.js.map +0 -1
- package/dist/chunk-AHLJSVRL.js.map +0 -1
- package/dist/chunk-BEFVYAR5.js.map +0 -1
- package/dist/chunk-BRVW2GS5.js.map +0 -1
- package/dist/chunk-BWVKEOPE.js.map +0 -1
- package/dist/chunk-CDB2HVQW.js.map +0 -1
- package/dist/chunk-CEJWMBXO.js.map +0 -1
- package/dist/chunk-DG27IUVI.js.map +0 -1
- package/dist/chunk-E6427JU2.js.map +0 -1
- package/dist/chunk-FFDNKRCY.js.map +0 -1
- package/dist/chunk-FZ6NYJ7L.js.map +0 -1
- package/dist/chunk-G6S5VVHP.js.map +0 -1
- package/dist/chunk-GAG7QOVO.js.map +0 -1
- package/dist/chunk-HNGSV2YC.js.map +0 -1
- package/dist/chunk-IGJCYUT5.js.map +0 -1
- package/dist/chunk-JJNOLSG5.js.map +0 -1
- package/dist/chunk-JRKZTEZZ.js.map +0 -1
- package/dist/chunk-MSWYQLMQ.js.map +0 -1
- package/dist/chunk-NPP5R7FF.js.map +0 -1
- package/dist/chunk-O2ERS4UJ.js.map +0 -1
- package/dist/chunk-PDLLCOGD.js.map +0 -1
- package/dist/chunk-PL2GHSCM.js.map +0 -1
- package/dist/chunk-PNKHAKQ7.js.map +0 -1
- package/dist/chunk-Q6TEJXBX.js.map +0 -1
- package/dist/chunk-QULVCV3M.js.map +0 -1
- package/dist/chunk-RV3ARMPN.js.map +0 -1
- package/dist/chunk-RXYYFSBB.js.map +0 -1
- package/dist/chunk-UHXCLPGC.js.map +0 -1
- package/dist/chunk-VCETL77O.js.map +0 -1
- package/dist/chunk-VZ3XFUQ7.js.map +0 -1
- package/dist/chunk-W77KZHCW.js.map +0 -1
- package/dist/chunk-WASHZV34.js.map +0 -1
- package/dist/chunk-WFUIE565.js.map +0 -1
- package/dist/chunk-XWX7GL56.js.map +0 -1
- package/dist/chunk-YJ6IONGA.js.map +0 -1
- package/dist/chunk-YPYHVOXP.js.map +0 -1
- package/dist/chunk-ZJADGNYF.js.map +0 -1
- package/dist/collection-facade-QEJIM6BC.js +0 -45
- package/dist/delegation-MO7YZYJS.js.map +0 -1
- package/dist/derive-IUA6JFLB.js +0 -22
- package/dist/dispatch-FZEAWKVM.js.map +0 -1
- package/dist/executor-CYJQLKKI.js +0 -9
- package/dist/executor-S4QIKEHW.js +0 -9
- package/dist/executor-YIQB2S6N.js +0 -29
- package/dist/export-accessible-4S36PQNR.js +0 -23
- package/dist/extract-partition-IO7FDZ2P.js +0 -38
- package/dist/fanout-sidecar-NNAJQXMX.js.map +0 -1
- package/dist/fence-watcher-DHQ775JB.js.map +0 -1
- package/dist/find-RBBYKXI7.js +0 -11
- package/dist/issue-RIVHSY2S.js +0 -19
- package/dist/liberate-GFN4C7RR.js +0 -24
- package/dist/noydb-ASEXNJS6.js +0 -83
- package/dist/register-4EFJCVYD.js +0 -32
- package/dist/registry-4SDHHOJ7.js +0 -18
- package/dist/registry-CZVINVQH.js +0 -9
- package/dist/registry-IKUR2MXD.js +0 -9
- package/dist/registry-OYTFGWVK.js +0 -19
- package/dist/request-withdrawal-KGXGDPVQ.js +0 -31
- package/dist/revoke-JFN773KF.js +0 -24
- package/dist/seed-GDV5PT4R.js.map +0 -1
- package/dist/signer-TA55QB6R.js +0 -25
- package/dist/storage-V7MTFAQJ.js +0 -23
- package/dist/store-coordination-provider-GFCUOBR6.js.map +0 -1
- package/dist/walk-3ZECBFDA.js +0 -21
- package/dist/with-pod/bundle-handle.d.ts +0 -9
- package/dist/withdraw-accessible-7PG4DYQK.js +0 -28
- /package/dist/{api-RXUMEKT3.js.map → api-EQYRTZO2.js.map} +0 -0
- /package/dist/{collection-facade-QEJIM6BC.js.map → at/index.js.map} +0 -0
- /package/dist/{computed-6G5M3UPH.js.map → by/index.js.map} +0 -0
- /package/dist/{chunk-YAWK6AWF.js.map → chunk-225O5CXQ.js.map} +0 -0
- /package/dist/{chunk-OF3L2SD6.js.map → chunk-3QARDAYW.js.map} +0 -0
- /package/dist/{chunk-W3TVWF6N.js.map → chunk-4A4TYISP.js.map} +0 -0
- /package/dist/{chunk-CCZJJ4I2.js.map → chunk-4G25SDQL.js.map} +0 -0
- /package/dist/{chunk-7TSYBD3E.js.map → chunk-5263OEM3.js.map} +0 -0
- /package/dist/{chunk-FNSMZQS4.js.map → chunk-5ACAVJUI.js.map} +0 -0
- /package/dist/{chunk-VMCCGUQB.js.map → chunk-7LYUJNU3.js.map} +0 -0
- /package/dist/{chunk-WLYIROCJ.js.map → chunk-AB5P32RE.js.map} +0 -0
- /package/dist/{chunk-SUFG5E73.js.map → chunk-ALUNQEBY.js.map} +0 -0
- /package/dist/{chunk-CADUYBQD.js.map → chunk-ATL3ZVXT.js.map} +0 -0
- /package/dist/{chunk-6FJWSWFT.js.map → chunk-DBNYPLWY.js.map} +0 -0
- /package/dist/{chunk-VJFMXYKP.js.map → chunk-E6YA6UAP.js.map} +0 -0
- /package/dist/{chunk-JIUVJ4M7.js.map → chunk-F7ZFRPGQ.js.map} +0 -0
- /package/dist/{chunk-HXGUIPQB.js.map → chunk-FOG7YEJP.js.map} +0 -0
- /package/dist/{chunk-X56RTUK3.js.map → chunk-HM4JSXX2.js.map} +0 -0
- /package/dist/{chunk-GQ3BX5EA.js.map → chunk-I3ISCYT7.js.map} +0 -0
- /package/dist/{chunk-FUHKW252.js.map → chunk-J4MN6XIU.js.map} +0 -0
- /package/dist/{chunk-ADW22QSB.js.map → chunk-J4UJ5FRV.js.map} +0 -0
- /package/dist/{chunk-HVQGCKY4.js.map → chunk-JVLSU7S2.js.map} +0 -0
- /package/dist/{chunk-AR2JDFAE.js.map → chunk-KDJGJR7F.js.map} +0 -0
- /package/dist/{chunk-747LRSOO.js.map → chunk-LKFKXS5K.js.map} +0 -0
- /package/dist/{chunk-U5O6GIWZ.js.map → chunk-LR4Z47QD.js.map} +0 -0
- /package/dist/{chunk-RTAMLDWP.js.map → chunk-NLKLXXTO.js.map} +0 -0
- /package/dist/{chunk-FDX7OWWI.js.map → chunk-OPXR4PB2.js.map} +0 -0
- /package/dist/{chunk-Z45YRGFO.js.map → chunk-P6ASQOZR.js.map} +0 -0
- /package/dist/{chunk-2Z3NCLNX.js.map → chunk-QI5NWLVW.js.map} +0 -0
- /package/dist/{chunk-6SAFL5YE.js.map → chunk-RC4BROYR.js.map} +0 -0
- /package/dist/{chunk-NJDQ4YSV.js.map → chunk-RDHUZ674.js.map} +0 -0
- /package/dist/{chunk-3JVXVJ7L.js.map → chunk-S35S77YU.js.map} +0 -0
- /package/dist/{chunk-KUDZVJKQ.js.map → chunk-SHILAQH5.js.map} +0 -0
- /package/dist/{chunk-4UVDI4XE.js.map → chunk-T3PHCEN4.js.map} +0 -0
- /package/dist/{derive-IUA6JFLB.js.map → chunk-UBSFPGVJ.js.map} +0 -0
- /package/dist/{chunk-FAXZQ5UF.js.map → chunk-UCUALOSM.js.map} +0 -0
- /package/dist/{chunk-4HDYQL3J.js.map → chunk-VAG47QHV.js.map} +0 -0
- /package/dist/{chunk-35EBKWQU.js.map → chunk-VFIWDPXZ.js.map} +0 -0
- /package/dist/{chunk-HNHCQ556.js.map → chunk-WLLUM35R.js.map} +0 -0
- /package/dist/{chunk-JRCYZEHU.js.map → chunk-XVU7J43V.js.map} +0 -0
- /package/dist/{chunk-DMQCLZ4Z.js.map → chunk-YCSM3GZU.js.map} +0 -0
- /package/dist/{chunk-FMQJZH4R.js.map → chunk-YMLQBZFJ.js.map} +0 -0
- /package/dist/{chunk-6HFM7EIT.js.map → chunk-YPSOHDNC.js.map} +0 -0
- /package/dist/{chunk-N35NC4JH.js.map → chunk-Z2PWOSCJ.js.map} +0 -0
- /package/dist/{chunk-HPLWFNG4.js.map → chunk-Z7ZXZL6Y.js.map} +0 -0
- /package/dist/{classified-marker-2KJAXRRO.js.map → classified-marker-BSQHU4JT.js.map} +0 -0
- /package/dist/{enclave-JU4YIEPB.js.map → collection-facade-LG3NYZVB.js.map} +0 -0
- /package/dist/{executor-CYJQLKKI.js.map → computed-ASBNTLOK.js.map} +0 -0
- /package/dist/{dead-filter-DCB62VWW.js.map → dead-filter-QKU56XTQ.js.map} +0 -0
- /package/dist/{executor-S4QIKEHW.js.map → derive-CXHCY46K.js.map} +0 -0
- /package/dist/{dispatch-MJ6SHB3Y.js.map → dispatch-4AP4PUZU.js.map} +0 -0
- /package/dist/{executor-YIQB2S6N.js.map → enclave-NYPT7WA7.js.map} +0 -0
- /package/dist/{export-accessible-4S36PQNR.js.map → executor-3KFRQETS.js.map} +0 -0
- /package/dist/{extract-partition-IO7FDZ2P.js.map → executor-AFHQYRAU.js.map} +0 -0
- /package/dist/{find-RBBYKXI7.js.map → executor-YYDW6XQI.js.map} +0 -0
- /package/dist/{issue-RIVHSY2S.js.map → export-accessible-BX2ILB4C.js.map} +0 -0
- /package/dist/{ledger-AETNF4OM.js.map → extract-partition-UPOVITFI.js.map} +0 -0
- /package/dist/{liberate-GFN4C7RR.js.map → find-SZBL2HPB.js.map} +0 -0
- /package/dist/{link-set-E5HNY67I.js.map → issue-G53NB6EW.js.map} +0 -0
- /package/dist/{managed-secret-CWQ6PND5.js.map → ledger-T5K4P2D7.js.map} +0 -0
- /package/dist/{noydb-ASEXNJS6.js.map → liberate-VEOZRESE.js.map} +0 -0
- /package/dist/{register-4EFJCVYD.js.map → link-set-76JZ6YB4.js.map} +0 -0
- /package/dist/{registry-4SDHHOJ7.js.map → managed-secret-6YC32VXG.js.map} +0 -0
- /package/dist/{registry-CZVINVQH.js.map → noydb-EDJA4JNJ.js.map} +0 -0
- /package/dist/{registry-IKUR2MXD.js.map → on/index.js.map} +0 -0
- /package/dist/{post-register-2XSSMGEQ.js.map → post-register-53O7AJRZ.js.map} +0 -0
- /package/dist/{registry-OYTFGWVK.js.map → register-6TCBR6XD.js.map} +0 -0
- /package/dist/{request-withdrawal-KGXGDPVQ.js.map → registry-DH2L4O2V.js.map} +0 -0
- /package/dist/{revoke-JFN773KF.js.map → registry-IWFMXCHX.js.map} +0 -0
- /package/dist/{signer-TA55QB6R.js.map → registry-Q3FG3OAX.js.map} +0 -0
- /package/dist/{stale-ARHFVL5U.js.map → registry-YC3IFG3A.js.map} +0 -0
- /package/dist/{storage-V7MTFAQJ.js.map → request-withdrawal-NM5VYR6F.js.map} +0 -0
- /package/dist/{reveal-BW36KCOQ.js.map → reveal-XBIMHAXR.js.map} +0 -0
- /package/dist/{ulid-PTAIMDG4.js.map → revoke-MJNYWO72.js.map} +0 -0
- /package/dist/{walk-3ZECBFDA.js.map → signer-6XVS2AU3.js.map} +0 -0
- /package/dist/{withdraw-accessible-7PG4DYQK.js.map → stale-MCS46TFO.js.map} +0 -0
- /package/dist/{verify-RO5RTZOJ.js.map → verify-WYOFLSNA.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/with-commit/vault-head/head.ts","../../src/with-commit/vault-head/active.ts","../../src/with-commit/vault-head/verify.ts"],"sourcesContent":["/**\n * The vault head's storage layer (#1044).\n *\n * A bucket is an ordinary encrypted record at `_head/<collection>::<n>`, so it\n * inherits #1041's identity binding for free: the store cannot relocate a\n * bucket, re-author it, or serve one bucket's bytes as another's. What it can\n * still do is serve an OLD bucket, which is why {@link readBucket} enforces\n * monotonicity against the caller's own record of what it last wrote.\n *\n * @packageDocumentation\n */\nimport { encrypt, buildRecordAad, openEnvelopeJson, buildRecordEnvelope, type EnclaveKey } from '../../kernel/enclave/index.js'\nimport type { NoydbStore } from '../../kernel/types.js'\nimport { VAULT_HEAD_COLLECTION } from './strategy.js'\n\n/** `{ recordId → version }` for one bucket. */\nexport type BucketBody = Record<string, number>\n\n/**\n * FNV-1a over `collection/id`. A hash, not a cipher: the bucket a record lands\n * in is not secret — the store already sees which bucket was written, and it\n * already saw the record's own address. Choosing something stronger would buy\n * nothing and cost every write.\n */\nexport function bucketIndex(collection: string, id: string, buckets: number): number {\n let h = 0x811c9dc5\n const s = `${collection}/${id}`\n for (let i = 0; i < s.length; i++) {\n h ^= s.charCodeAt(i)\n h = Math.imul(h, 0x01000193) >>> 0\n }\n return h % buckets\n}\n\nexport function bucketId(collection: string, id: string, buckets: number): string {\n return `${collection}::${String(bucketIndex(collection, id, buckets))}`\n}\n\nexport async function readBucket(\n store: NoydbStore,\n vault: string,\n dek: EnclaveKey,\n bucket: string,\n): Promise<{ body: BucketBody; version: number }> {\n const env = await store.get(vault, VAULT_HEAD_COLLECTION, bucket)\n if (!env) return { body: {}, version: 0 }\n const json = await openEnvelopeJson({ collection: VAULT_HEAD_COLLECTION, id: bucket }, env, dek)\n return { body: JSON.parse(json) as BucketBody, version: env._v }\n}\n\nexport async function writeBucket(\n store: NoydbStore,\n vault: string,\n dek: EnclaveKey,\n bucket: string,\n body: BucketBody,\n expectedVersion: number,\n): Promise<void> {\n const identity = { collection: VAULT_HEAD_COLLECTION, id: bucket, version: expectedVersion + 1 }\n const json = JSON.stringify(body)\n const { iv, data } = await encrypt(json, dek, buildRecordAad(identity))\n const env = buildRecordEnvelope(identity, { iv, data })\n // CAS: two writers racing on one bucket must not silently lose an entry.\n // A lost head entry is a record the sweep stops expecting — a false clean.\n await store.put(vault, VAULT_HEAD_COLLECTION, bucket, env, expectedVersion || undefined)\n}\n","/**\n * The real {@link VaultHeadStrategy} (#1044).\n *\n * @packageDocumentation\n */\nimport type { NoydbStore } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport {\n DEFAULT_HEAD_BUCKETS,\n VAULT_HEAD_COLLECTION,\n type HeadEntry,\n type VaultHeadStrategy,\n type WithVaultHeadOptions,\n} from './strategy.js'\nimport { bucketId, readBucket, writeBucket } from './head.js'\n\nexport function withVaultHead(opts: WithVaultHeadOptions = {}): VaultHeadStrategy {\n const buckets = opts.buckets ?? DEFAULT_HEAD_BUCKETS\n\n const dekFor = (getDEK: (c: string) => Promise<EnclaveKey>) => getDEK(VAULT_HEAD_COLLECTION)\n\n return {\n enabled: true,\n bucketFor: (collection, id) => bucketId(collection, id, buckets),\n\n async note(store: NoydbStore, vault, getDEK, entry: HeadEntry) {\n const dek = await dekFor(getDEK)\n const bucket = bucketId(entry.collection, entry.id, buckets)\n const { body, version } = await readBucket(store, vault, dek, bucket)\n const key = `${entry.collection}/${entry.id}`\n // Monotonic: a head entry never moves BACKWARD. A write that would lower\n // it is either a stale retry or a rollback being laundered through the\n // client's own head, and neither should be recorded.\n if ((body[key] ?? -1) >= entry.version) return\n body[key] = entry.version\n await writeBucket(store, vault, dek, bucket, body, version)\n },\n\n async expected(store, vault, getDEK, collection, id) {\n const dek = await dekFor(getDEK)\n const { body } = await readBucket(store, vault, dek, bucketId(collection, id, buckets))\n return body[`${collection}/${id}`] ?? null\n },\n\n async knownIn(store, vault, getDEK, collection) {\n const dek = await dekFor(getDEK)\n const out = new Map<string, number>()\n const prefix = `${collection}/`\n // Sweep every bucket: a record's bucket is a function of its id, so the\n // set for one collection is spread across all of them.\n for (const bucket of await store.list(vault, VAULT_HEAD_COLLECTION)) {\n if (!bucket.startsWith(`${collection}::`)) continue\n const { body } = await readBucket(store, vault, dek, bucket)\n for (const [k, v] of Object.entries(body)) {\n if (k.startsWith(prefix)) out.set(k.slice(prefix.length), v)\n }\n }\n return out\n },\n }\n}\n","/**\n * The sweep — comparing what the head expects against what the store serves (#1044).\n *\n * This is the only place absence becomes visible. #1041 and #1042 can reject a\n * record that lies about itself; neither can notice one that never arrived, or\n * one served at an older version than the client wrote. Both are indistinguishable\n * from the truth without an independent record of what should be there.\n *\n * @packageDocumentation\n */\nimport type { NoydbStore } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport type { VaultHeadStrategy } from './strategy.js'\n\n/** One record the store is not serving faithfully. */\nexport interface HeadDiscrepancy {\n readonly collection: string\n readonly id: string\n /** What the client last committed. */\n readonly expected: number\n /**\n * What the store serves now — or `null` when it serves nothing.\n *\n * The two are different attacks wearing the same result. `null` is\n * **suppression**: the record is gone. A lower number is **rollback**: an\n * authentic older version served in place of the current one, which is the\n * case no amount of per-envelope authentication can see.\n */\n readonly actual: number | null\n readonly kind: 'withheld' | 'rolled-back'\n}\n\n/**\n * Why a sweep could not reach a conclusion.\n *\n * - `'no-expectations'` — the head holds nothing for this collection. A fresh\n * vault, a head switched on after the fact, or a **restore from a snapshot**:\n * `_head` is `_`-prefixed, so `loadAll` excludes it and a restored vault has\n * no head to compare against.\n * - `'store-cannot-cas'` — the store does not advertise `capabilities.casAtomic`,\n * so two writers racing on one bucket can silently lose an entry. A lost entry\n * is a record the sweep stops expecting, which is a false clean.\n */\nexport type HeadUnverifiableReason = 'no-expectations' | 'store-cannot-cas'\n\n/**\n * ## Three-way, deliberately (#1101)\n *\n * - `'verified'` — the head held expectations, every one was met, and the store\n * can serialize head writes.\n * - `'unverifiable'` — the sweep could not conclude. See `because`.\n * - `'tampered'` — at least one discrepancy. Positive evidence, so it wins over\n * any `unverifiable` reason present at the same time.\n *\n * **The middle value is the point, and collapsing it is wrong in a different\n * direction each way:** folded into \"clean\" it hides withholding, which is the\n * one thing this service exists to catch; folded into \"tampered\" it cries wolf\n * on a vault that is merely unexamined.\n *\n * That is not hypothetical. #1044's own first bug was a head that recorded\n * nothing and swept **perfectly clean** — the degraded state rendered\n * identically to a healthy one, which is why its test asserts `checked` before\n * anything else. A two-way verdict makes that state a supported outcome.\n */\nexport type HeadVerdict = 'verified' | 'unverifiable' | 'tampered'\n\nexport interface HeadVerifyResult {\n readonly verdict: HeadVerdict\n readonly checked: number\n readonly discrepancies: readonly HeadDiscrepancy[]\n /**\n * Non-empty only when `verdict === 'unverifiable'`.\n *\n * There is deliberately no `clean: boolean`. It could not distinguish \"no\n * expectations\" from \"all expectations met\" — both rendered `true` — and that\n * indistinguishability *was* the defect. Replacing it rather than keeping it\n * alongside forces every caller to face the three-way.\n */\n readonly because: readonly HeadUnverifiableReason[]\n}\n\n/**\n * Sweep one collection.\n *\n * **A record the store serves that the head does NOT know is not reported.**\n * That is not an oversight: the head can be enabled on an existing vault, and\n * every pre-existing record would otherwise read as an anomaly. The head's\n * claim is one-directional — *what I wrote must still be there* — and an\n * unknown record simply falls outside it.\n *\n * **A HIGHER version than expected is also not reported**, for the same reason:\n * another device legitimately advanced it. The head detects going backwards, not\n * moving forwards.\n */\nexport async function verifyVaultHead(\n head: VaultHeadStrategy,\n store: NoydbStore,\n vault: string,\n getDEK: (collection: string) => Promise<EnclaveKey>,\n collection: string,\n): Promise<HeadVerifyResult> {\n const known = await head.knownIn(store, vault, getDEK, collection)\n const discrepancies: HeadDiscrepancy[] = []\n\n const because: HeadUnverifiableReason[] = []\n if (known.size === 0) because.push('no-expectations')\n // Read the store's OWN declared capability rather than probing: a store that\n // cannot serialize head writes may have silently dropped an entry, and a\n // dropped entry is invisible by construction — there is nothing left to find.\n if (store.capabilities?.casAtomic !== true) because.push('store-cannot-cas')\n\n for (const [id, expected] of known) {\n const env = await store.get(vault, collection, id)\n if (env === null) {\n discrepancies.push({ collection, id, expected, actual: null, kind: 'withheld' })\n continue\n }\n if (env._v < expected) {\n discrepancies.push({ collection, id, expected, actual: env._v, kind: 'rolled-back' })\n }\n }\n\n // A discrepancy is positive evidence, so it outranks any reason the sweep was\n // also incomplete: a rolled-back record found by a head that may be missing\n // OTHER entries is still a rolled-back record.\n const verdict: HeadVerdict = discrepancies.length > 0\n ? 'tampered'\n : because.length > 0 ? 'unverifiable' : 'verified'\n\n return { verdict, checked: known.size, discrepancies, because }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBO,SAAS,YAAY,YAAoB,IAAY,SAAyB;AACnF,MAAI,IAAI;AACR,QAAM,IAAI,GAAG,UAAU,IAAI,EAAE;AAC7B,WAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK;AACjC,SAAK,EAAE,WAAW,CAAC;AACnB,QAAI,KAAK,KAAK,GAAG,QAAU,MAAM;AAAA,EACnC;AACA,SAAO,IAAI;AACb;AAEO,SAAS,SAAS,YAAoB,IAAY,SAAyB;AAChF,SAAO,GAAG,UAAU,KAAK,OAAO,YAAY,YAAY,IAAI,OAAO,CAAC,CAAC;AACvE;AAEA,eAAsB,WACpB,OACA,OACA,KACA,QACgD;AAChD,QAAM,MAAM,MAAM,MAAM,IAAI,OAAO,uBAAuB,MAAM;AAChE,MAAI,CAAC,IAAK,QAAO,EAAE,MAAM,CAAC,GAAG,SAAS,EAAE;AACxC,QAAM,OAAO,MAAM,iBAAiB,EAAE,YAAY,uBAAuB,IAAI,OAAO,GAAG,KAAK,GAAG;AAC/F,SAAO,EAAE,MAAM,KAAK,MAAM,IAAI,GAAiB,SAAS,IAAI,GAAG;AACjE;AAEA,eAAsB,YACpB,OACA,OACA,KACA,QACA,MACA,iBACe;AACf,QAAM,WAAW,EAAE,YAAY,uBAAuB,IAAI,QAAQ,SAAS,kBAAkB,EAAE;AAC/F,QAAM,OAAO,KAAK,UAAU,IAAI;AAChC,QAAM,EAAE,IAAI,KAAK,IAAI,MAAM,QAAQ,MAAM,KAAK,eAAe,QAAQ,CAAC;AACtE,QAAM,MAAM,oBAAoB,UAAU,EAAE,IAAI,KAAK,CAAC;AAGtD,QAAM,MAAM,IAAI,OAAO,uBAAuB,QAAQ,KAAK,mBAAmB,MAAS;AACzF;;;ACjDO,SAAS,cAAc,OAA6B,CAAC,GAAsB;AAChF,QAAM,UAAU,KAAK,WAAW;AAEhC,QAAM,SAAS,CAAC,WAA+C,OAAO,qBAAqB;AAE3F,SAAO;AAAA,IACL,SAAS;AAAA,IACT,WAAW,CAAC,YAAY,OAAO,SAAS,YAAY,IAAI,OAAO;AAAA,IAE/D,MAAM,KAAK,OAAmB,OAAO,QAAQ,OAAkB;AAC7D,YAAM,MAAM,MAAM,OAAO,MAAM;AAC/B,YAAM,SAAS,SAAS,MAAM,YAAY,MAAM,IAAI,OAAO;AAC3D,YAAM,EAAE,MAAM,QAAQ,IAAI,MAAM,WAAW,OAAO,OAAO,KAAK,MAAM;AACpE,YAAM,MAAM,GAAG,MAAM,UAAU,IAAI,MAAM,EAAE;AAI3C,WAAK,KAAK,GAAG,KAAK,OAAO,MAAM,QAAS;AACxC,WAAK,GAAG,IAAI,MAAM;AAClB,YAAM,YAAY,OAAO,OAAO,KAAK,QAAQ,MAAM,OAAO;AAAA,IAC5D;AAAA,IAEA,MAAM,SAAS,OAAO,OAAO,QAAQ,YAAY,IAAI;AACnD,YAAM,MAAM,MAAM,OAAO,MAAM;AAC/B,YAAM,EAAE,KAAK,IAAI,MAAM,WAAW,OAAO,OAAO,KAAK,SAAS,YAAY,IAAI,OAAO,CAAC;AACtF,aAAO,KAAK,GAAG,UAAU,IAAI,EAAE,EAAE,KAAK;AAAA,IACxC;AAAA,IAEA,MAAM,QAAQ,OAAO,OAAO,QAAQ,YAAY;AAC9C,YAAM,MAAM,MAAM,OAAO,MAAM;AAC/B,YAAM,MAAM,oBAAI,IAAoB;AACpC,YAAM,SAAS,GAAG,UAAU;AAG5B,iBAAW,UAAU,MAAM,MAAM,KAAK,OAAO,qBAAqB,GAAG;AACnE,YAAI,CAAC,OAAO,WAAW,GAAG,UAAU,IAAI,EAAG;AAC3C,cAAM,EAAE,KAAK,IAAI,MAAM,WAAW,OAAO,OAAO,KAAK,MAAM;AAC3D,mBAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,IAAI,GAAG;AACzC,cAAI,EAAE,WAAW,MAAM,EAAG,KAAI,IAAI,EAAE,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,QAC7D;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAAA,EACF;AACF;;;ACkCA,eAAsB,gBACpB,MACA,OACA,OACA,QACA,YAC2B;AAC3B,QAAM,QAAQ,MAAM,KAAK,QAAQ,OAAO,OAAO,QAAQ,UAAU;AACjE,QAAM,gBAAmC,CAAC;AAE1C,QAAM,UAAoC,CAAC;AAC3C,MAAI,MAAM,SAAS,EAAG,SAAQ,KAAK,iBAAiB;AAIpD,MAAI,MAAM,cAAc,cAAc,KAAM,SAAQ,KAAK,kBAAkB;AAE3E,aAAW,CAAC,IAAI,QAAQ,KAAK,OAAO;AAClC,UAAM,MAAM,MAAM,MAAM,IAAI,OAAO,YAAY,EAAE;AACjD,QAAI,QAAQ,MAAM;AAChB,oBAAc,KAAK,EAAE,YAAY,IAAI,UAAU,QAAQ,MAAM,MAAM,WAAW,CAAC;AAC/E;AAAA,IACF;AACA,QAAI,IAAI,KAAK,UAAU;AACrB,oBAAc,KAAK,EAAE,YAAY,IAAI,UAAU,QAAQ,IAAI,IAAI,MAAM,cAAc,CAAC;AAAA,IACtF;AAAA,EACF;AAKA,QAAM,UAAuB,cAAc,SAAS,IAChD,aACA,QAAQ,SAAS,IAAI,iBAAiB;AAE1C,SAAO,EAAE,SAAS,SAAS,MAAM,MAAM,eAAe,QAAQ;AAChE;","names":[]}
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
blindedEqual,
|
|
3
3
|
evaluateKofN,
|
|
4
4
|
openVdigPayload
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FOG7YEJP.js";
|
|
6
6
|
import {
|
|
7
7
|
dualReadSealedSlot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KDJGJR7F.js";
|
|
9
9
|
import {
|
|
10
10
|
VDIG_ITERATIONS,
|
|
11
11
|
normalizeForVerify,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
base64ToBuffer,
|
|
16
16
|
generateSalt
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-W5LHQXZU.js";
|
|
18
18
|
import {
|
|
19
19
|
ClassifiedConfigError,
|
|
20
20
|
ClassifiedVerifyError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-JBIV4FLR.js";
|
|
22
22
|
import "./chunk-PZ5AY32C.js";
|
|
23
23
|
|
|
24
24
|
// src/kernel/enclave/classify/verify.ts
|
|
@@ -137,4 +137,4 @@ export {
|
|
|
137
137
|
verifyDigestField,
|
|
138
138
|
verifyTextField
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=verify-
|
|
140
|
+
//# sourceMappingURL=verify-WYOFLSNA.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The blob `
|
|
2
|
+
* The blob `NoydbVia` (#629 Task 7) — wires the `blobFields` declaration
|
|
3
3
|
* into the kernel's generic Via port as a deliberately THIN binding:
|
|
4
4
|
* declaration + posture + `describeFragment` + `erase` glue, and nothing
|
|
5
5
|
* else. Blob content is fully out-of-band (`collection.blob(id)` →
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* EAGER — `port/with/blob-strategy.ts` calls {@link linkBlobVia} at module
|
|
19
19
|
* load. `blobFields` policies are plain object literals (there is no
|
|
20
20
|
* `blob.*()` declaration factory to hang a lazy link on), so the binder
|
|
21
|
-
* must be installed before `
|
|
21
|
+
* must be installed before `compileVias` ever sees one.
|
|
22
22
|
*
|
|
23
23
|
* There is no `declare`-time validation: `blobFields` has never had a
|
|
24
24
|
* construction-time refusal matrix (policies are consulted lazily by
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* `queryable: 'none'`); it does not participate in clause building or
|
|
32
32
|
* evaluation.
|
|
33
33
|
*/
|
|
34
|
-
import type {
|
|
34
|
+
import type { NoydbVia, ViaEraseReport } from '../../kernel/via/index.js';
|
|
35
35
|
import type { BlobFieldsConfig } from '../../with-shape/blobs/blob-compaction.js';
|
|
36
36
|
/**
|
|
37
37
|
* Config a blob collection's `blobFields` declaration resolves to — the
|
|
@@ -42,7 +42,7 @@ import type { BlobFieldsConfig } from '../../with-shape/blobs/blob-compaction.js
|
|
|
42
42
|
* `retainedShared` become counts, each residue eTag becomes a tagged
|
|
43
43
|
* `{kind: 'blob-residue', eTag}` entry.
|
|
44
44
|
*
|
|
45
|
-
* DELIBERATELY left unwired by `
|
|
45
|
+
* DELIBERATELY left unwired by `compileVias` (#629 Task 10, resolved
|
|
46
46
|
* within parity-first — see task-10-report.md "blob purge" section):
|
|
47
47
|
* `per-blob-cek.test.ts`/`forget.test.ts` prove blob-shred-on-forget is
|
|
48
48
|
* gated SOLELY on the vault's `blobsStrategy` being configured, never on a
|
|
@@ -62,7 +62,7 @@ export interface BlobViaConfig {
|
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* One field's blob knobs as they appear on `describeFragment()`'s payload
|
|
65
|
-
* (#657 — the second real `
|
|
65
|
+
* (#657 — the second real `NoydbVia.describeFragment` consumer after
|
|
66
66
|
* `lookup`'s; see `with-shape/introspection/describe.ts`'s `buildDescription`).
|
|
67
67
|
* Declarative scalars (`retainDays`/`external`/`public`/`backlink`) verbatim;
|
|
68
68
|
* predicate knobs (`evictWhen`/`legalHold`/`retainUntil` — functions over the
|
|
@@ -82,5 +82,5 @@ export interface BlobDescribeFragmentEntry {
|
|
|
82
82
|
export interface BlobDescribeFragment {
|
|
83
83
|
readonly blobFields: Record<string, BlobDescribeFragmentEntry>;
|
|
84
84
|
}
|
|
85
|
-
export declare function
|
|
85
|
+
export declare function blobVia(cfg: BlobViaConfig): NoydbVia;
|
|
86
86
|
export declare function linkBlobVia(): void;
|
package/dist/via/blob/index.d.ts
CHANGED
|
@@ -33,6 +33,9 @@ export { BLOB_COLLECTION, BLOB_INDEX_COLLECTION, BLOB_CHUNKS_COLLECTION, BLOB_SL
|
|
|
33
33
|
export type { BlobObject, SlotRecord, SlotInfo, VersionRecord, BlobPutOptions, BlobResponseOptions, } from '../../kernel/types.js';
|
|
34
34
|
export { detectMimeType, detectMagic, isPreCompressed } from '../../with-shape/blobs/mime-magic.js';
|
|
35
35
|
export { runCompaction, BLOB_EVICTION_AUDIT_COLLECTION } from '../../with-shape/blobs/blob-compaction.js';
|
|
36
|
+
export { reportOrphanBlobChunks } from '../../with-shape/blobs/orphan-report.js';
|
|
37
|
+
export type { OrphanChunkReport } from '../../with-shape/blobs/orphan-report.js';
|
|
38
|
+
export type { NoydbStore } from '../../kernel/types.js';
|
|
36
39
|
export type { BlobFieldsConfig, BlobFieldPolicy, BlobEvictionEntry, CompactRunOptions, CompactionResult, CompactionContext, } from '../../with-shape/blobs/blob-compaction.js';
|
|
37
40
|
export { createExportBlobsHandle, ExportBlobsAbortedError, EXPORT_AUDIT_COLLECTION, } from '../../with-shape/blobs/export-blobs.js';
|
|
38
41
|
export type { ExportBlobsOptions, ExportedBlob, ExportBlobsHandle, ExportBlobsAuditEntry, } from '../../with-shape/blobs/export-blobs.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The classified `
|
|
2
|
+
* The classified `NoydbVia` (#629 Task 5, LIVE since Task 6) — wires
|
|
3
3
|
* classified-fields declaration/write-enforcement/at-rest sealing/erasure
|
|
4
4
|
* into the kernel's generic Via port. Mirrors `via/money/binding.ts`'s
|
|
5
5
|
* inline declaration-time validation and `via/i18n/binding.ts`'s
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* (`port/with/classified-strategy.ts` calls `linkClassifiedVia()` at module
|
|
8
8
|
* load, not lazily from a `classified.*()` preset call): several fixtures
|
|
9
9
|
* build a raw `ClassifiedFieldSpec` literal without ever calling a preset,
|
|
10
|
-
* and the binder must be installed before `
|
|
10
|
+
* and the binder must be installed before `compileVias` needs it
|
|
11
11
|
* regardless.
|
|
12
12
|
*
|
|
13
|
-
* `
|
|
13
|
+
* `compileVias` (`kernel/collection-config.ts`) compiles this binding
|
|
14
14
|
* in whenever a collection declares `classifiedFields` — money then i18n
|
|
15
15
|
* then classified, order pinned. `kernel/collection.ts`'s `_putInternal`
|
|
16
16
|
* runs `enforceClassifiedWrite`'s effect via the pipeline's `enforceWrite`
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
* replace the inline `sensitiveFields` seal path for any collection this
|
|
19
19
|
* binding is compiled into.
|
|
20
20
|
*
|
|
21
|
-
* `declare` — `
|
|
21
|
+
* `declare` — `classifiedVia(cfg)` runs `resolveClassifiedFields` +
|
|
22
22
|
* `guardClassifiedCompat` at CONSTRUCTION time (the same #553 pattern
|
|
23
|
-
* `
|
|
23
|
+
* `moneyVia`'s `validateMoneyFieldPaths(moneyFields)` call uses) —
|
|
24
24
|
* mirrors today's "door 1" (`collection-config.ts`'s
|
|
25
25
|
* `resolveCollectionConfig`). Both may throw `ClassifiedConfigError`.
|
|
26
26
|
*/
|
|
27
|
-
import type {
|
|
27
|
+
import type { NoydbVia } from '../../kernel/via/index.js';
|
|
28
28
|
import { type ClassifiedEntry } from './resolve.js';
|
|
29
29
|
import { type ClassifiedGuardCtx } from './guards.js';
|
|
30
30
|
/**
|
|
@@ -58,7 +58,7 @@ export interface ClassifiedViaConfig {
|
|
|
58
58
|
* completeness (see that method's doc comment for the shreddable/
|
|
59
59
|
* dekResidue/both-class semantics). `live` is `ViaEraseCtx.live`'s opaque
|
|
60
60
|
* envelope, passed straight through. NOT `readonly` (#629 Task 10):
|
|
61
|
-
* `
|
|
61
|
+
* `compileVias` builds this cfg before the owning `Collection`'s
|
|
62
62
|
* `RecordCodec` exists, so `Collection`'s constructor mutates this field
|
|
63
63
|
* in place once `this.codec` is available — the closure `eraseClassified`
|
|
64
64
|
* reads is looked up at CALL time, not at binding-construction time, so
|
|
@@ -71,7 +71,7 @@ export interface ClassifiedViaConfig {
|
|
|
71
71
|
* Vault-provided closure that purges every `_sealed_cek/<collection>/<id>/*`
|
|
72
72
|
* host-delivery envelope for one record (mirrors `rotateRecordCek`'s own
|
|
73
73
|
* prefix-delete) and returns the count purged. Deliberately left UNWIRED
|
|
74
|
-
* by `
|
|
74
|
+
* by `compileVias` (#629 Task 10) — `forget-sealed-erasure.test.ts`
|
|
75
75
|
* proves this purge is UNCONDITIONAL on `sealRecordToHost` usage alone,
|
|
76
76
|
* independent of whether `classifiedFields` is declared (a bare
|
|
77
77
|
* `sensitive: [...]` collection exercises it with no classified binding
|
|
@@ -79,5 +79,5 @@ export interface ClassifiedViaConfig {
|
|
|
79
79
|
*/
|
|
80
80
|
readonly purgeSealedCekEnvelopes?: (id: string) => Promise<number>;
|
|
81
81
|
}
|
|
82
|
-
export declare function
|
|
82
|
+
export declare function classifiedVia(cfg: ClassifiedViaConfig): NoydbVia;
|
|
83
83
|
export declare function linkClassifiedVia(): void;
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
* `EXPORT_REDACTION_MARKER` on every present() — the one enforcement seam
|
|
25
25
|
* every via feature's taint already routes through.
|
|
26
26
|
*/
|
|
27
|
-
import type {
|
|
27
|
+
import type { NoydbVia } from '../../kernel/via/index.js';
|
|
28
28
|
import type { ComputedDescriptor } from './descriptor.js';
|
|
29
29
|
export interface ComputedViaConfig {
|
|
30
30
|
/** field name -> its virtual-mode descriptor. Materialized entries are never present here. */
|
|
31
31
|
readonly virtualFields: ReadonlyMap<string, ComputedDescriptor>;
|
|
32
32
|
}
|
|
33
|
-
export declare function
|
|
33
|
+
export declare function computedVia(cfg: ComputedViaConfig): NoydbVia;
|
|
34
34
|
export declare function linkComputedVia(): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The i18n `
|
|
2
|
+
* The i18n `NoydbVia` — wires the i18n engine (auto-translate/script
|
|
3
3
|
* enforcement/validation/densify on write; locale + dict-label presentation
|
|
4
4
|
* on read) into the kernel's generic Via port. Mirrors
|
|
5
5
|
* `via/money/binding.ts`'s #553 static-link pattern.
|
|
6
6
|
*
|
|
7
|
-
* LIVE (#623 Task 8 wired the cutover): `
|
|
7
|
+
* LIVE (#623 Task 8 wired the cutover): `i18nVia()`/`linkI18nVia()` are
|
|
8
8
|
* the real put/read path for every i18n-declaring collection —
|
|
9
9
|
* `collection.ts`'s `_putInternal`/`applyLocaleToRecord` (the call sites
|
|
10
10
|
* this file's bodies were moved/adapted from) now delegate their i18n
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* `i18nText()`, `dictKey()`, `staticDict()` each call {@link linkI18nVia}
|
|
15
15
|
* first — the same #553 pattern `money()` uses.
|
|
16
16
|
*/
|
|
17
|
-
import type {
|
|
17
|
+
import type { NoydbVia } from '../../kernel/via/index.js';
|
|
18
18
|
/**
|
|
19
19
|
* Config a collection's i18n declarations resolve to — the binding's
|
|
20
20
|
* construction input. Fields are loosely typed (`unknown`) at this seam
|
|
@@ -32,5 +32,5 @@ export interface I18nViaConfig {
|
|
|
32
32
|
i18nPutValidator?: (record: unknown) => void;
|
|
33
33
|
collectionName: string;
|
|
34
34
|
}
|
|
35
|
-
export declare function
|
|
35
|
+
export declare function i18nVia(cfg: I18nViaConfig): NoydbVia;
|
|
36
36
|
export declare function linkI18nVia(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `'lookup'` `
|
|
2
|
+
* The `'lookup'` `NoydbVia` — wires the lookup engine (present-time label
|
|
3
3
|
* dressing across all three backing tiers) into the kernel's generic Via
|
|
4
4
|
* port. Mirrors `via/i18n/binding.ts`'s #553 static-link pattern; the
|
|
5
5
|
* present-time label-dressing algorithm below is adapted from
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
* `hasStaticDisplay` branch already uses). `resolveOrderLabel` (#650 Task
|
|
25
25
|
* 7) is the PER-CALL-locale sibling `orderBy(..., {by:'label'})` needs —
|
|
26
26
|
* see its own doc comment below. `describeFragment` (#650 Task 7) is the
|
|
27
|
-
* first-ever consumed `
|
|
27
|
+
* first-ever consumed `NoydbVia.describeFragment` implementation — see
|
|
28
28
|
* `with-shape/introspection/describe.ts`'s `buildDescription`.
|
|
29
29
|
*/
|
|
30
|
-
import type {
|
|
30
|
+
import type { NoydbVia } from '../../kernel/via/index.js';
|
|
31
31
|
import type { LookupDescriptor, LookupBacking, Vocabulary, OnDelete } from './descriptor.js';
|
|
32
32
|
import type { MaterializedBacking } from './registry.js';
|
|
33
33
|
/**
|
|
@@ -66,7 +66,7 @@ export interface LookupViaConfig {
|
|
|
66
66
|
readonly collectionName: string;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* One field's `lookup` descriptor as it appears on a `
|
|
69
|
+
* One field's `lookup` descriptor as it appears on a `NoydbVia.
|
|
70
70
|
* describeFragment()` payload (#650 Task 7 — the first real consumer,
|
|
71
71
|
* `with-shape/introspection/describe.ts`'s `buildDescription`, imports this
|
|
72
72
|
* type directly; `describe.ts` is NOT under `kernel/**`, so it's free to
|
|
@@ -95,5 +95,5 @@ export interface LookupDescribeFragmentEntry {
|
|
|
95
95
|
export interface LookupDescribeFragment {
|
|
96
96
|
readonly lookupFields: Record<string, LookupDescribeFragmentEntry>;
|
|
97
97
|
}
|
|
98
|
-
export declare function
|
|
98
|
+
export declare function lookupVia(cfg: LookupViaConfig): NoydbVia;
|
|
99
99
|
export declare function linkLookupVia(): void;
|
|
@@ -132,7 +132,10 @@ export declare class LookupHandle<Keys extends string = string> {
|
|
|
132
132
|
* `enclave-body-only` / Check 15 `via-enclave-isolation`) — the Vault binds the real
|
|
133
133
|
* `kernel/enclave` function at construction time, same pattern as `reservedEnvelopes` above.
|
|
134
134
|
*/
|
|
135
|
-
buildDeleteMarker: (
|
|
135
|
+
buildDeleteMarker: (identity: {
|
|
136
|
+
collection: string;
|
|
137
|
+
id: string;
|
|
138
|
+
}, version: number, actor: string) => EncryptedEnvelope,
|
|
136
139
|
/** #650 Task 4 (#647) — dirty-log participation hook (origin `local-write`), threaded from `BuildLookupHandleOptions`. */
|
|
137
140
|
onDirty?: ((collection: string, id: string, action: "put" | "delete", version: number) => Promise<void>) | undefined,
|
|
138
141
|
/** #650 Task 4 — thin `graphDispatch.collect`-equivalent; opens/collects/flushes a one-shot wave for this touch. */
|
|
@@ -13,5 +13,5 @@ export { LookupHandle, DictionaryHandle, DICT_COLLECTION_PREFIX, dictCollectionN
|
|
|
13
13
|
export { enforceStaticDictOnPut, resolveDictSource, updateReferencingRecords, type DictReferencingCollection } from './registry.js';
|
|
14
14
|
export { withLookup } from './active.js';
|
|
15
15
|
export { lookup, enumOf, enumOf as enum, dict, type LookupDescriptor, type Vocabulary, type LookupBacking, type OnDelete } from './descriptor.js';
|
|
16
|
-
export {
|
|
16
|
+
export { lookupVia, linkLookupVia, type LookupViaConfig } from './binding.js';
|
|
17
17
|
export type { LookupDescribeFragment, LookupDescribeFragmentEntry } from './binding.js';
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* - join dressing (`presentForJoin`, consumed by `kernel/query/join.ts`
|
|
20
20
|
* via `JoinableSource.presentForJoin`)
|
|
21
21
|
* - dimension sort (`compareForOrder`, consumed by
|
|
22
|
-
* `via/lookup/binding.ts`'s `
|
|
22
|
+
* `via/lookup/binding.ts`'s `NoydbVia.compareForOrder` closure)
|
|
23
23
|
* - per-call-locale order-label resolution (`resolveOrderLabel`, #650
|
|
24
24
|
* Task 7 — the `orderBy(..., {by:'label'})` channel `compareForOrder`
|
|
25
25
|
* structurally can't serve, no locale param; consumed by
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The money `
|
|
2
|
+
* The money `NoydbVia` — wires the money engine (normalize/paths/where/
|
|
3
3
|
* money-reducer) into the kernel's generic Via port. `money()`
|
|
4
4
|
* (descriptor.ts) calls {@link linkMoneyVia} at declaration time — the
|
|
5
5
|
* same #553 static-link pattern the retired `linkMoneyEngine()` /
|
|
6
6
|
* `kernel/money-runtime.ts` seam used, now the only one (Task 6 cut the
|
|
7
7
|
* query DSL over to this binding and deleted the legacy seam).
|
|
8
8
|
*/
|
|
9
|
-
import type {
|
|
9
|
+
import type { NoydbVia } from '../../kernel/via/index.js';
|
|
10
10
|
import type { MoneyDescriptor } from './descriptor.js';
|
|
11
11
|
/** #669 — the money binder's config bag. `virtualMoneyFields` is the money∩virtual-mode-
|
|
12
12
|
* computed field-name intersection (`kernel/collection-config.ts#resolveVirtualMoneyFields`);
|
|
@@ -17,5 +17,5 @@ export interface MoneyBindingConfig {
|
|
|
17
17
|
readonly moneyFields: Record<string, MoneyDescriptor>;
|
|
18
18
|
readonly virtualMoneyFields?: ReadonlySet<string>;
|
|
19
19
|
}
|
|
20
|
-
export declare function
|
|
20
|
+
export declare function moneyVia(moneyFields: Record<string, MoneyDescriptor>, virtualMoneyFields?: ReadonlySet<string>): NoydbVia;
|
|
21
21
|
export declare function linkMoneyVia(): void;
|
|
@@ -78,7 +78,7 @@ export declare function quantizeMoneyFields<T extends Record<string, unknown>>(r
|
|
|
78
78
|
*/
|
|
79
79
|
export declare function moneyScaledValue(stored: unknown, desc: MoneyDescriptor): bigint | null;
|
|
80
80
|
/**
|
|
81
|
-
* The `
|
|
81
|
+
* The `NoydbVia.canonicalizeIndexKey` implementation for money (#672) —
|
|
82
82
|
* bucket an eager index's money field entries by the BigInt-normalized
|
|
83
83
|
* scaled-int string, not the raw stored bytes, so a pre-declaration /
|
|
84
84
|
* non-canonical value (e.g. `'0100'`) lands under the SAME key a canonical
|
|
@@ -32,7 +32,7 @@ interface MoneyOperandEntry {
|
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* The opaque `via` clause payload for a `where()` over a declared money
|
|
35
|
-
* field (see `
|
|
35
|
+
* field (see `NoydbVia.buildClause` in kernel/via/index.ts). `entries` holds
|
|
36
36
|
* one element for comparison ops, two for `between` (lo, hi — same
|
|
37
37
|
* currency), N for `in`.
|
|
38
38
|
*/
|
|
@@ -42,14 +42,14 @@ export interface MoneyWhereOperand {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Build the `via` clause payload ({@link MoneyWhereOperand}) for a
|
|
45
|
-
* `where()` over a declared money field — the `
|
|
45
|
+
* `where()` over a declared money field — the `NoydbVia.buildClause`
|
|
46
46
|
* implementation for money. The operand is quantized into stored
|
|
47
47
|
* scaled-int space NOW — build time — so typos throw at the call site.
|
|
48
48
|
*/
|
|
49
49
|
export declare function moneyFieldClause(field: string, op: Operator, value: unknown, desc: MoneyDescriptor): MoneyWhereOperand;
|
|
50
50
|
/**
|
|
51
51
|
* The `via` index-probe operand for a `where()` over a declared money
|
|
52
|
-
* field (see `
|
|
52
|
+
* field (see `NoydbVia.indexProbe` in kernel/via/index.ts) — the STORED-form
|
|
53
53
|
* value `CollectionIndexes.lookupEqual`/`lookupIn` (`with-lookup/indexing/
|
|
54
54
|
* eager-indexes.ts`) can bucket directly.
|
|
55
55
|
*
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dumpVaultSchema
|
|
3
|
+
} from "./chunk-HM4JSXX2.js";
|
|
4
|
+
import "./chunk-KHKKD62N.js";
|
|
5
|
+
import "./chunk-P6ASQOZR.js";
|
|
6
|
+
import "./chunk-Y2NBBT6K.js";
|
|
7
|
+
import "./chunk-YXA2TCTZ.js";
|
|
8
|
+
import "./chunk-2LPVI4PX.js";
|
|
9
|
+
import "./chunk-N4CNVSUF.js";
|
|
10
|
+
import "./chunk-FOG7YEJP.js";
|
|
11
|
+
import "./chunk-KDJGJR7F.js";
|
|
12
|
+
import "./chunk-LKFKXS5K.js";
|
|
13
|
+
import "./chunk-LP7BEXCT.js";
|
|
14
|
+
import "./chunk-W5LHQXZU.js";
|
|
15
|
+
import "./chunk-RK7N4OQ5.js";
|
|
16
|
+
import "./chunk-JBIV4FLR.js";
|
|
17
|
+
import "./chunk-PZ5AY32C.js";
|
|
18
|
+
export {
|
|
19
|
+
dumpVaultSchema
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=walk-JNEOYCAU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -501,7 +501,7 @@ export interface ReadOnlyCollection<T> {
|
|
|
501
501
|
* @internal — called by Vault methods that need the closed-period
|
|
502
502
|
* cache. Not part of the public API surface.
|
|
503
503
|
*/
|
|
504
|
-
export declare function loadPeriods(adapter: NoydbStore, vault: string, decrypt: (envelope: EncryptedEnvelope) => Promise<PeriodRecord>): Promise<PeriodRecord[]>;
|
|
504
|
+
export declare function loadPeriods(adapter: NoydbStore, vault: string, decrypt: (id: string, envelope: EncryptedEnvelope) => Promise<PeriodRecord>): Promise<PeriodRecord[]>;
|
|
505
505
|
/**
|
|
506
506
|
* Given the current ordered period list, pick the last entry that
|
|
507
507
|
* belongs to the hash chain — used as the `priorPeriodHash` anchor
|
|
@@ -17,7 +17,7 @@ import type { PeriodRecord, PeriodPartition, PartitionResolver } from './periods
|
|
|
17
17
|
* @internal
|
|
18
18
|
*/
|
|
19
19
|
export interface PeriodsStrategy {
|
|
20
|
-
loadPeriods(adapter: NoydbStore, vault: string, decrypt: (envelope: EncryptedEnvelope) => Promise<PeriodRecord>): Promise<PeriodRecord[]>;
|
|
20
|
+
loadPeriods(adapter: NoydbStore, vault: string, decrypt: (id: string, envelope: EncryptedEnvelope) => Promise<PeriodRecord>): Promise<PeriodRecord[]>;
|
|
21
21
|
chainAnchor(records: readonly PeriodRecord[], partition?: PeriodPartition): Promise<{
|
|
22
22
|
priorPeriodName?: string;
|
|
23
23
|
priorPeriodHash: string;
|
|
@@ -46,10 +46,23 @@ export { SealedRecordNotEnabledError } from '../../kernel/errors.js';
|
|
|
46
46
|
* @param expectedCollection Collection the caller believes `recordEnvelope` is in.
|
|
47
47
|
* @param expectedId Record id the caller believes `recordEnvelope` is.
|
|
48
48
|
* @returns The decrypted record body as a JSON string.
|
|
49
|
+
*
|
|
50
|
+
* ⚠️ **`recordEnvelope` must carry `_tier` and `_by`, not just the body**
|
|
51
|
+
* (#1041). They are plaintext metadata rather than secrets, but they are bound
|
|
52
|
+
* into the record's AAD, so a host handed only `{_iv, _data}` cannot
|
|
53
|
+
* reconstruct the identity the body was sealed against.
|
|
54
|
+
*
|
|
55
|
+
* That is a feature, not a tax: it means a host cannot be fed a body with its
|
|
56
|
+
* tags stripped or rewritten — a re-tiered or re-authored envelope no longer
|
|
57
|
+
* opens, even with a valid sealed CEK.
|
|
49
58
|
*/
|
|
50
59
|
export declare function openSealedRecord(sealedCekEnvelope: SealedCekDeliveryEnvelope, recordEnvelope: {
|
|
51
60
|
readonly _iv: string;
|
|
52
61
|
readonly _data: string;
|
|
62
|
+
/** Bound into the AAD since #1093 — a rewound body no longer opens. */
|
|
63
|
+
readonly _v: number;
|
|
64
|
+
readonly _tier?: number | undefined;
|
|
65
|
+
readonly _by?: string | undefined;
|
|
53
66
|
}, recipientSealer: {
|
|
54
67
|
unseal(bytes: Uint8Array): Promise<Uint8Array>;
|
|
55
68
|
}, expectedCollection: string, expectedId: string): Promise<string>;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
export { withTiers } from './active.js';
|
|
24
24
|
export { NO_TIERS, type TiersStrategy } from './strategy.js';
|
|
25
25
|
export { TiersNotEnabledError } from '../../kernel/errors.js';
|
|
26
|
-
import { type RecordCodec, type EnclaveKey, type SealedShredSlot } from '../../kernel/enclave/index.js';
|
|
26
|
+
import { type RecordIdentity, type RecordCodec, type EnclaveKey, type SealedShredSlot } from '../../kernel/enclave/index.js';
|
|
27
27
|
import type { UnlockedKeyring } from '../../with-party/team/keyring.js';
|
|
28
28
|
import type { Lru } from '../../kernel/cache/index.js';
|
|
29
29
|
import type { BlobFieldsConfig } from '../../with-shape/blobs/blob-compaction.js';
|
|
@@ -123,7 +123,22 @@ export interface TiersContext<T> {
|
|
|
123
123
|
* pre-move body whenever `fromTier > 0`. No-op when history is disabled
|
|
124
124
|
* (folds the `historyConfig.enabled` gate so `tiers/index.ts` stays simple).
|
|
125
125
|
*/
|
|
126
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Persist a `_history` snapshot of `version`, sealed against the address it
|
|
128
|
+
* will be STORED at (#1041).
|
|
129
|
+
*
|
|
130
|
+
* Takes a **sealer**, not a finished envelope, because the destination
|
|
131
|
+
* identity is not knowable here: only the history strategy owns the
|
|
132
|
+
* `_history` layout. It hands the address in; the caller seals to it.
|
|
133
|
+
*
|
|
134
|
+
* ⚠️ The identity passed to `rewrapBodyToDek` must be what a READER will
|
|
135
|
+
* recompute — `recordAadFor(address, finalEnvelope)`. A tier-move snapshot
|
|
136
|
+
* strips `_tier`/`_elevatedBy` but KEEPS `_by`, so the destination is
|
|
137
|
+
* `{...address, by: envelope._by}` with no tier. Sealing against the bare
|
|
138
|
+
* address would produce history nothing can open, and the failure would
|
|
139
|
+
* surface only when someone reads it.
|
|
140
|
+
*/
|
|
141
|
+
saveHistorySnapshot(id: string, version: number, seal: (address: RecordIdentity) => Promise<EncryptedEnvelope>): Promise<void>;
|
|
127
142
|
/**
|
|
128
143
|
* `true` iff a real history strategy is wired (not `NO_HISTORY`) AND not
|
|
129
144
|
* explicitly disabled via `historyConfig.enabled`. `putAtTier` checks this
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { type EnclaveKey } from '../kernel/enclave/index.js';
|
|
11
11
|
import type { NoydbStore } from '../kernel/types.js';
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
12
|
+
import type { NoydbSealer } from '../with-party/team/managed-secret.js';
|
|
13
|
+
import type { NoydbShamir } from '../with-party/team/noydb-shamir.js';
|
|
14
14
|
import type { RecoveryEnrollmentInput } from '../with-party/team/rotate-recover.js';
|
|
15
|
-
import type { TransferSealPayload } from '../with-pod/
|
|
15
|
+
import type { TransferSealPayload } from '../with-pod/pod.js';
|
|
16
16
|
/**
|
|
17
17
|
* Reverse of `sealDeks`. Imports the transfer key, decrypts the
|
|
18
18
|
* sealed `{ collection: base64(rawDEK) }` map (layout iv(12)‖ct‖tag), and
|
|
@@ -43,7 +43,7 @@ export interface CreateOwnerStandardOptions {
|
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Managed-mode owner: the secret is minted + sealed under
|
|
46
|
-
* a `
|
|
46
|
+
* a `NoydbSealer` (e.g. an `at-*` OS keychain) so the partition
|
|
47
47
|
* auto-unlocks on the recipient's device. Managed mode mandates a strong
|
|
48
48
|
* (Shamir) recovery profile at creation, which needs the
|
|
49
49
|
* `shamirRecovery` provider injected.
|
|
@@ -51,9 +51,9 @@ export interface CreateOwnerStandardOptions {
|
|
|
51
51
|
export interface CreateOwnerManagedOptions {
|
|
52
52
|
readonly userId: string;
|
|
53
53
|
readonly secretMode: 'managed';
|
|
54
|
-
readonly sealingKey:
|
|
54
|
+
readonly sealingKey: NoydbSealer;
|
|
55
55
|
readonly recovery: ReadonlyArray<RecoveryEnrollmentInput>;
|
|
56
|
-
readonly shamirRecovery:
|
|
56
|
+
readonly shamirRecovery: NoydbShamir;
|
|
57
57
|
readonly transferKey: Uint8Array;
|
|
58
58
|
}
|
|
59
59
|
export type CreateOwnerOptions = CreateOwnerStandardOptions | CreateOwnerManagedOptions;
|
|
@@ -62,7 +62,7 @@ export type CreateOwnerOptions = CreateOwnerStandardOptions | CreateOwnerManaged
|
|
|
62
62
|
* then destroy the transfer seal.
|
|
63
63
|
*
|
|
64
64
|
* Standard mode: the recipient supplies a secret. Managed mode: the
|
|
65
|
-
* secret is minted + sealed under a `
|
|
65
|
+
* secret is minted + sealed under a `NoydbSealer` and a strong
|
|
66
66
|
* (Shamir) recovery profile is enrolled — orchestrated via the existing
|
|
67
67
|
* `openVaultAndEnrollRecovery` ceremony.
|
|
68
68
|
*
|
|
@@ -10,7 +10,7 @@ import type { Vault } from '../kernel/vault.js';
|
|
|
10
10
|
import type { EncryptedEnvelope } from '../kernel/types.js';
|
|
11
11
|
import { type EnclaveKey } from '../kernel/enclave/index.js';
|
|
12
12
|
import { type WalkClosureOptions, type DanglingRefNotice } from './walk-closure.js';
|
|
13
|
-
import { type TransferSealPayload } from '../with-pod/
|
|
13
|
+
import { type TransferSealPayload } from '../with-pod/pod.js';
|
|
14
14
|
/** Re-keyed collections snapshot + the fresh DEKs used. */
|
|
15
15
|
export interface ReKeyResult {
|
|
16
16
|
readonly collections: Record<string, Record<string, EncryptedEnvelope>>;
|
|
@@ -30,4 +30,4 @@ export type { ReduceResult, ReduceSpec, LiveReduction, } from '../with-lookup/re
|
|
|
30
30
|
export type { IndexDef } from '../with-lookup/indexing/eager-indexes.js';
|
|
31
31
|
export type { FuseOptions } from '../with-lookup/search/fuse.js';
|
|
32
32
|
export type { RetrieveHit, RetrieveOptions } from '../with-lookup/search/retrieve-types.js';
|
|
33
|
-
export type {
|
|
33
|
+
export type { NoydbMesh, WriterPresence, FenceDoc, DrainBarrierOptions, } from '../port/by/index.js';
|
|
@@ -19,7 +19,7 @@ export { liberateVault } from '../with-party/custody/liberate.js';
|
|
|
19
19
|
export type { LiberateOptions, LiberateResult } from '../with-party/custody/liberate.js';
|
|
20
20
|
export { createDeedOwner, loadDeedMarker, isDeedVault } from '../with-party/team/deed.js';
|
|
21
21
|
export type { DeedMarker } from '../with-party/team/deed.js';
|
|
22
|
-
export type {
|
|
22
|
+
export type { NoydbSealer } from '../with-party/team/managed-secret.js';
|
|
23
23
|
export { diffVault } from './vault-diff.js';
|
|
24
24
|
export { STATE_VAULT_NAME } from '../kernel/constants.js';
|
|
25
25
|
export { withCargo } from './active.js';
|
|
@@ -43,4 +43,4 @@ export type { WriteConflict } from '../kernel/types.js';
|
|
|
43
43
|
export type { AccessibleVault } from '../kernel/types.js';
|
|
44
44
|
export type { Unsubscribe } from '../kernel/types.js';
|
|
45
45
|
export type { ExtractPartitionOptions } from './extract-partition.js';
|
|
46
|
-
export type { TransferSealPayload } from '../with-pod/
|
|
46
|
+
export type { TransferSealPayload } from '../with-pod/pod.js';
|
|
@@ -1,5 +1,31 @@
|
|
|
1
|
+
import type { RecordIdentity } from '../../kernel/enclave/index.js';
|
|
1
2
|
import type { NoydbStore, EncryptedEnvelope, HistoryOptions, PruneOptions } from '../../kernel/types.js';
|
|
2
3
|
import { type EnclaveKey } from '../../kernel/enclave/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* The identity a history snapshot is **sealed against** — its STORAGE location,
|
|
6
|
+
* not the live record it is a copy of (#1041).
|
|
7
|
+
*
|
|
8
|
+
* ## Why storage, and why this is a decision rather than a detail
|
|
9
|
+
*
|
|
10
|
+
* A snapshot is a copy, so two identities are available: the live record
|
|
11
|
+
* (`collection`/`recordId`) or where the bytes actually land
|
|
12
|
+
* (`_history`/`historyId(...)`). They are not equivalent under attack.
|
|
13
|
+
*
|
|
14
|
+
* Binding the LIVE identity makes a snapshot's AAD **indistinguishable from the
|
|
15
|
+
* live record's at the same version** — so an untrusted store could serve a
|
|
16
|
+
* history entry *as the current record* and the client would accept it. It also
|
|
17
|
+
* leaves entries relocatable within `_history`.
|
|
18
|
+
*
|
|
19
|
+
* Binding STORAGE identity closes both. The cost is that the id must be known
|
|
20
|
+
* *before* the envelope is sealed, where `saveHistory` previously derived it
|
|
21
|
+
* *after* (from `envelope._v`) — which is precisely the restructure this
|
|
22
|
+
* function exists to make possible.
|
|
23
|
+
*
|
|
24
|
+
* `saveHistory` uses this too, so the sealed identity and the put location have
|
|
25
|
+
* **one definition** and cannot drift apart. Changing the layout here changes
|
|
26
|
+
* both at once, by construction.
|
|
27
|
+
*/
|
|
28
|
+
export declare function historyIdentity(collection: string, recordId: string, version: number): RecordIdentity;
|
|
3
29
|
/** Save a history entry (a complete encrypted envelope snapshot). */
|
|
4
30
|
export declare function saveHistory(adapter: NoydbStore, vault: string, collection: string, recordId: string, envelope: EncryptedEnvelope): Promise<void>;
|
|
5
31
|
/** Get history entries for a record, sorted newest-first. */
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export { withHistory } from './active.js';
|
|
19
19
|
export type { HistoryStrategy } from './strategy.js';
|
|
20
|
-
export { saveHistory, getHistory, getVersionEnvelope, pruneHistory, clearHistory, } from './history.js';
|
|
20
|
+
export { saveHistory, historyIdentity, getHistory, getVersionEnvelope, pruneHistory, clearHistory, } from './history.js';
|
|
21
21
|
export { diff, formatDiff } from './diff.js';
|
|
22
22
|
export type { ChangeType, DiffEntry } from './diff.js';
|
|
23
23
|
export { LedgerStore, LEDGER_COLLECTION, LEDGER_DELTAS_COLLECTION, envelopePayloadHash, } from './ledger/store.js';
|
|
@@ -30,3 +30,4 @@ export { VaultInstant, CollectionInstant } from './time-machine.js';
|
|
|
30
30
|
export type { VaultEngine } from './time-machine.js';
|
|
31
31
|
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
32
32
|
export { NO_HISTORY } from './strategy.js';
|
|
33
|
+
export type { RecordIdentity } from '../../kernel/enclave/index.js';
|
|
@@ -237,7 +237,13 @@ export declare class LedgerStore {
|
|
|
237
237
|
* version/timestamp/actor) fully intact for audit purposes.
|
|
238
238
|
*/
|
|
239
239
|
purgeRecordDeltas(collection: string, id: string): Promise<number>;
|
|
240
|
-
/**
|
|
240
|
+
/**
|
|
241
|
+
* Encrypt a JSON Patch into an envelope for storage. Mirrors encryptEntry.
|
|
242
|
+
*
|
|
243
|
+
* `index` is the ledger index this delta will be stored under — the caller
|
|
244
|
+
* knows it before the entry exists, and it is what makes the envelope's
|
|
245
|
+
* identity bindable (#1051).
|
|
246
|
+
*/
|
|
241
247
|
private encryptDelta;
|
|
242
248
|
/**
|
|
243
249
|
* Read all entries in ascending-index order. Used internally by
|