@noy-db/hub 0.3.0-pre.12 → 0.3.0-pre.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.js +4 -4
- package/dist/api-ZGS6LCOF.js +20 -0
- package/dist/as/index.js +11 -11
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-2WVBIVXW.js → backup-BJ57IKAO.js} +28 -11
- package/dist/backup-BJ57IKAO.js.map +1 -0
- package/dist/blobs/index.js +12 -10
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/bundle/index.js +25 -22
- package/dist/bundle/index.js.map +1 -1
- package/dist/by/index.js +2 -2
- package/dist/cargo/index.js +22 -22
- package/dist/{chunk-ZL6PRULX.js → chunk-2NVOWNI3.js} +4 -4
- package/dist/{chunk-WEHIQYQH.js → chunk-3B5VVCNY.js} +2 -2
- package/dist/{chunk-FF7S3XDW.js → chunk-3LQ2YKO4.js} +2 -2
- package/dist/{chunk-NAR6IDKH.js → chunk-3QCRBHCY.js} +2 -2
- package/dist/{chunk-SXPCZ6LL.js → chunk-454JXE57.js} +3 -3
- package/dist/{chunk-R3NHNVS5.js → chunk-4CTHCN4J.js} +12 -10
- package/dist/{chunk-R3NHNVS5.js.map → chunk-4CTHCN4J.js.map} +1 -1
- package/dist/{chunk-JGUZMC3I.js → chunk-4JBYV75E.js} +5 -5
- package/dist/{chunk-RXTMLYJS.js → chunk-4NXKCLLQ.js} +2 -2
- package/dist/{chunk-GXLZXD2W.js → chunk-4VNQOLML.js} +2 -2
- package/dist/{chunk-45QPICLE.js → chunk-5M5DVGV7.js} +2 -2
- package/dist/{chunk-EHW5KTTA.js → chunk-5O3XF4DV.js} +4 -4
- package/dist/chunk-5O3XF4DV.js.map +1 -0
- package/dist/{chunk-S2OWPVSO.js → chunk-5YOLBEQ6.js} +2 -2
- package/dist/{chunk-BDEMZD4F.js → chunk-6CRIV7DE.js} +2 -2
- package/dist/{chunk-VCUQR6ZL.js → chunk-6JTIAGHD.js} +3 -3
- package/dist/{chunk-K2DLLK34.js → chunk-6QTNZJBS.js} +3 -3
- package/dist/{chunk-UMC5QZTX.js → chunk-6T2SCQRU.js} +4 -4
- package/dist/{chunk-J3JIYFYL.js → chunk-7DSTRQIJ.js} +2 -2
- package/dist/{chunk-3QSOFZQB.js → chunk-AUSTCW2X.js} +10 -10
- package/dist/{chunk-PN5332SU.js → chunk-B3HJYUOF.js} +2 -2
- package/dist/{chunk-DIB2BOIH.js → chunk-BDVFPG6Y.js} +5 -5
- package/dist/{chunk-FZCGIJEJ.js → chunk-BIOUI4HL.js} +50 -1
- package/dist/chunk-BIOUI4HL.js.map +1 -0
- package/dist/{chunk-FYNE4WLC.js → chunk-CAF6WOK7.js} +2 -2
- package/dist/{chunk-AKEOHKMT.js → chunk-CDUQTA3Z.js} +110 -11
- package/dist/chunk-CDUQTA3Z.js.map +1 -0
- package/dist/{chunk-37WOJQWY.js → chunk-CIE2BASH.js} +2 -2
- package/dist/{chunk-BLUT46UP.js → chunk-CRI4OUV4.js} +2 -2
- package/dist/{chunk-Y5TWPBNW.js → chunk-DLG74CNB.js} +4 -4
- package/dist/{chunk-HIOLCOK3.js → chunk-E5ZQT5KX.js} +2 -2
- package/dist/{chunk-IQIVD7TP.js → chunk-EQO2UVP4.js} +6 -6
- package/dist/{chunk-US34HTOI.js → chunk-ERJ7FU55.js} +3 -3
- package/dist/{chunk-S7TAPIRS.js → chunk-EVVGJDRQ.js} +3 -3
- package/dist/{chunk-EXGDL2UQ.js → chunk-EVX47VBM.js} +2 -2
- package/dist/{chunk-NT2ZO4KI.js → chunk-EXK7QRWF.js} +5 -5
- package/dist/{chunk-7QLY64AD.js → chunk-EYZ6IQ6X.js} +5 -5
- package/dist/{chunk-QF5LGMSV.js → chunk-F64IRYG3.js} +2 -2
- package/dist/{chunk-PH7G7ZI7.js → chunk-FHS2HQSH.js} +5 -5
- package/dist/{chunk-HG76BZ6G.js → chunk-FM3G3NOY.js} +27 -9
- package/dist/chunk-FM3G3NOY.js.map +1 -0
- package/dist/{chunk-ZHOJOT6S.js → chunk-FUG4SFN3.js} +2 -2
- package/dist/{chunk-JRKE5MAZ.js → chunk-GKEWXIV5.js} +2 -2
- package/dist/{chunk-6MA575R5.js → chunk-GTGPO5KW.js} +5 -5
- package/dist/{chunk-XS6DLN67.js → chunk-HB3RFQSC.js} +3 -3
- package/dist/{chunk-VXZNSPJM.js → chunk-HDMEGAQE.js} +5 -5
- package/dist/chunk-HDQIIUPH.js +135 -0
- package/dist/chunk-HDQIIUPH.js.map +1 -0
- package/dist/{chunk-DJ7MRXNA.js → chunk-HTJQYHZP.js} +2 -2
- package/dist/{chunk-NRYNRSGV.js → chunk-I6GALP6E.js} +6 -6
- package/dist/{chunk-GL3JV5EV.js → chunk-IL6POWCW.js} +6 -6
- package/dist/{chunk-NEYKOESM.js → chunk-IU6SNYX6.js} +5 -5
- package/dist/{chunk-CCIR2OJH.js → chunk-J2ZX2XUV.js} +5 -5
- package/dist/{chunk-F3LGBRSV.js → chunk-JIF24JPM.js} +57 -15
- package/dist/chunk-JIF24JPM.js.map +1 -0
- package/dist/{chunk-NM3IFKBL.js → chunk-JKJOGPZN.js} +2 -2
- package/dist/{chunk-JC75UBMT.js → chunk-JNAI2HN2.js} +1 -1
- package/dist/{chunk-JC75UBMT.js.map → chunk-JNAI2HN2.js.map} +1 -1
- package/dist/{chunk-TVS6BUUR.js → chunk-JZUV47FZ.js} +2 -2
- package/dist/{chunk-5HNX4OD4.js → chunk-K5IMOGHB.js} +2 -2
- package/dist/{chunk-XJ47GS53.js → chunk-KSKBRKGJ.js} +3 -3
- package/dist/{chunk-INBQ43DI.js → chunk-LASZKVMO.js} +3 -3
- package/dist/{chunk-EVHBK7BN.js → chunk-LXEXBTKL.js} +4 -4
- package/dist/{chunk-6S7ENMRE.js → chunk-M4CV6BRT.js} +2 -2
- package/dist/{chunk-AAIIDAUC.js → chunk-MEFJPTZ4.js} +3 -3
- package/dist/{chunk-WHQHTNT7.js → chunk-MV43JSJF.js} +4 -4
- package/dist/{chunk-F44XWXOA.js → chunk-NJ4EOKMB.js} +4 -4
- package/dist/{chunk-ILF5GARW.js → chunk-NR5LT5RY.js} +7 -7
- package/dist/{chunk-TBNF5DV5.js → chunk-NWSGI5C7.js} +3 -3
- package/dist/{chunk-BDPAVYGJ.js → chunk-OSDB5WW3.js} +92 -15
- package/dist/chunk-OSDB5WW3.js.map +1 -0
- package/dist/chunk-PN2XMATY.js +37 -0
- package/dist/chunk-PN2XMATY.js.map +1 -0
- package/dist/{chunk-EIZ4YOG2.js → chunk-Q5VNKNE5.js} +3 -3
- package/dist/{chunk-TVOHSPVK.js → chunk-QLWMEXCT.js} +2 -2
- package/dist/{chunk-7GAXFU2O.js → chunk-QRB7NAOJ.js} +2 -2
- package/dist/{chunk-X6Y5MXTH.js → chunk-R4ROFEYC.js} +2 -2
- package/dist/{chunk-4BQXMCE5.js → chunk-RCVJZMFE.js} +4 -4
- package/dist/{chunk-QG5RQQBO.js → chunk-RIX4V2TB.js} +3 -3
- package/dist/{chunk-SAL5X5OK.js → chunk-RYCTDFUX.js} +2 -2
- package/dist/{chunk-CXC3JLAQ.js → chunk-RZ5SVOYR.js} +2 -2
- package/dist/{chunk-44IL5G3W.js → chunk-SLFHQTTW.js} +5 -5
- package/dist/chunk-SNZ6URZZ.js +2782 -0
- package/dist/chunk-SNZ6URZZ.js.map +1 -0
- package/dist/{chunk-2MTRJCBI.js → chunk-T2FFWNPK.js} +3 -3
- package/dist/{chunk-QYPDYN23.js → chunk-UNFPPVNI.js} +2 -2
- package/dist/{chunk-RNXJ2VO6.js → chunk-VFUPHI2Z.js} +63 -10
- package/dist/chunk-VFUPHI2Z.js.map +1 -0
- package/dist/{chunk-7ZOSHEVS.js → chunk-VLFCJYTL.js} +9 -9
- package/dist/{chunk-APHLCXVC.js → chunk-VN3DBQAU.js} +2 -2
- package/dist/{chunk-HK4XTXO4.js → chunk-VZRODIM3.js} +4 -4
- package/dist/{chunk-P2LJI6JE.js → chunk-W22IKJE2.js} +2 -2
- package/dist/{chunk-FJTWLQV3.js → chunk-X3YYQWOQ.js} +3 -3
- package/dist/{chunk-YCXKFB7J.js → chunk-X7QBD67R.js} +498 -274
- package/dist/chunk-X7QBD67R.js.map +1 -0
- package/dist/{chunk-HA6ZQWA2.js → chunk-XDYREZWE.js} +82 -10
- package/dist/chunk-XDYREZWE.js.map +1 -0
- package/dist/{chunk-HBBZWEC5.js → chunk-XWZVFISC.js} +40 -6
- package/dist/{chunk-HBBZWEC5.js.map → chunk-XWZVFISC.js.map} +1 -1
- package/dist/{chunk-SGJGWBSC.js → chunk-YFXZEAYK.js} +6 -6
- package/dist/{chunk-SIAIYP6G.js → chunk-ZAJAVEXY.js} +2 -2
- package/dist/{chunk-KKYEZCQG.js → chunk-ZICD77GM.js} +2 -2
- package/dist/{chunk-HGAB325C.js → chunk-ZJ2AK4V7.js} +2 -2
- package/dist/{chunk-HYG32HCM.js → chunk-ZUODRVHY.js} +2 -2
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-M7K3OJPM.js → classified-marker-CZKA6ITE.js} +3 -3
- package/dist/collection-facade-TLWIPI76.js +44 -0
- package/dist/{computed-ORCGM5JE.js → computed-ZIQTYTDI.js} +3 -3
- package/dist/consent/index.js +9 -9
- package/dist/{dead-filter-OV5FGKOG.js → dead-filter-ESOBZZP5.js} +2 -2
- package/dist/delegation-W7ZV2322.js +25 -0
- package/dist/derivations/index.js +12 -12
- package/dist/derive-H2BJTLUI.js +21 -0
- package/dist/{enclave-XXFUKJC6.js → enclave-AP3I5W7O.js} +15 -9
- package/dist/executor-KGWTNEQD.js +9 -0
- package/dist/executor-OVEXR6RT.js +9 -0
- package/dist/executor-UNEH5ZYH.js +25 -0
- package/dist/export-accessible-PCMXSUZS.js +23 -0
- package/dist/extract-partition-SWHFSYJO.js +38 -0
- package/dist/{fanout-sidecar-IO2KDUWV.js → fanout-sidecar-A765THMX.js} +9 -9
- package/dist/find-N6345CNT.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +3 -3
- package/dist/history/index.js +14 -11
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +5 -1
- package/dist/index.js +108 -89
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/issue-5OKB6I2R.js +19 -0
- package/dist/kernel/collection-config.d.ts +20 -0
- package/dist/kernel/collection.d.ts +31 -28
- package/dist/kernel/enclave/classify/verify.d.ts +3 -0
- package/dist/kernel/enclave/index.d.ts +2 -1
- package/dist/kernel/enclave/record-keys/deterministic.d.ts +1 -0
- package/dist/kernel/enclave/record-keys/lifecycle.d.ts +50 -0
- package/dist/kernel/enclave/record-keys/record-codec.d.ts +27 -0
- package/dist/kernel/errors.d.ts +74 -0
- package/dist/kernel/lazy-count.d.ts +13 -0
- package/dist/kernel/tier-visibility.d.ts +54 -0
- package/dist/kernel/types.d.ts +73 -0
- package/dist/kernel/vault.d.ts +8 -5
- package/dist/kernel/via/dispatch.d.ts +10 -0
- package/dist/{ledger-UAQKPWNM.js → ledger-GFBKVPV4.js} +11 -11
- package/dist/legacy/bundle.d.ts +1 -1
- package/dist/liberate-3VDOT4KO.js +24 -0
- package/dist/{link-set-DGYUOFVD.js → link-set-Z7Q2ASFX.js} +11 -11
- package/dist/materialized-views/index.js +18 -18
- package/dist/noydb-ZCJOYBDI.js +68 -0
- package/dist/on/index.js +9 -9
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -12
- package/dist/pod/index.js +11 -11
- package/dist/{policy-5POYLI26.js → policy-Z3RUAIY2.js} +5 -5
- package/dist/port/with/blob-strategy.d.ts +17 -0
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-LB3P4XQU.js → post-register-JTH76BLY.js} +6 -6
- package/dist/{public-envelope-GOG4LUM7.js → public-envelope-B4KNWVUA.js} +4 -4
- package/dist/query/index.js +5 -5
- package/dist/register-VAHONCID.js +23 -0
- package/dist/registry-7MLVD3VO.js +19 -0
- package/dist/registry-EPKPD5SM.js +18 -0
- package/dist/registry-P5T7PS2U.js +9 -0
- package/dist/request-withdrawal-TI3A5WPS.js +31 -0
- package/dist/{reveal-NPVROV4D.js → reveal-DIBHLUZX.js} +7 -7
- package/dist/reveal-DIBHLUZX.js.map +1 -0
- package/dist/revoke-FDRD6GRW.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/sealed-record/index.js +12 -12
- package/dist/{seed-VI4FU7UH.js → seed-Q6M2IZFL.js} +11 -11
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-MUWEIUI6.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/stale-OSQ7J3AA.js +29 -0
- package/dist/storage-MVFCGEQE.js +23 -0
- package/dist/{store-coordination-provider-5KDS2RRP.js → store-coordination-provider-64OEZFGS.js} +3 -3
- package/dist/sync/index.js +9 -9
- package/dist/team/index.js +15 -15
- package/dist/tiers/index.js +14 -10
- package/dist/to/index.js +1 -1
- package/dist/tx/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/{verify-QK76NJ4G.js → verify-ZASTRNPR.js} +9 -8
- package/dist/verify-ZASTRNPR.js.map +1 -0
- package/dist/{walk-XQCBKSBW.js → walk-SVNDIZ62.js} +11 -11
- package/dist/with/index.js +11 -11
- package/dist/with-audit/forget/strategy.d.ts +22 -0
- package/dist/with-audit/tiers/index.d.ts +275 -3
- package/dist/with-audit/tiers/strategy.d.ts +5 -4
- package/dist/with-cargo/describe-extraction.d.ts +9 -1
- package/dist/with-cargo/extract-partition.d.ts +9 -1
- package/dist/with-cargo/walk-closure.d.ts +32 -3
- package/dist/with-commit/history/history.d.ts +46 -0
- package/dist/with-commit/history/ledger/store.d.ts +21 -0
- package/dist/with-commit/history/strategy.d.ts +10 -0
- package/dist/with-commit/history/time-machine.d.ts +23 -0
- package/dist/with-commit/tx/elevated-handle.d.ts +2 -1
- package/dist/with-formula/materialized-views/executor.d.ts +9 -0
- package/dist/with-formula/materialized-views/stale.d.ts +52 -1
- package/dist/with-lookup/embeddings/index.d.ts +1 -0
- package/dist/with-lookup/embeddings/vec-id.d.ts +47 -0
- package/dist/with-lookup/indexing/collection-facade.d.ts +38 -1
- package/dist/with-lookup/search/collection-facade.d.ts +40 -0
- package/dist/with-lookup/search/persisted-index-store.d.ts +82 -2
- package/dist/with-lookup/search/strategy.d.ts +4 -0
- package/dist/with-shape/blobs/blob-intent.d.ts +153 -0
- package/dist/with-shape/blobs/blob-set.d.ts +949 -5
- package/dist/withdraw-accessible-WZIEVWSR.js +28 -0
- package/package.json +3 -3
- package/dist/api-3TH2GOFQ.js +0 -20
- package/dist/backup-2WVBIVXW.js.map +0 -1
- package/dist/chunk-65VLRG3I.js +0 -54
- package/dist/chunk-65VLRG3I.js.map +0 -1
- package/dist/chunk-AKEOHKMT.js.map +0 -1
- package/dist/chunk-BDPAVYGJ.js.map +0 -1
- package/dist/chunk-CZMCOFEA.js +0 -1221
- package/dist/chunk-CZMCOFEA.js.map +0 -1
- package/dist/chunk-EHW5KTTA.js.map +0 -1
- package/dist/chunk-F3LGBRSV.js.map +0 -1
- package/dist/chunk-FZCGIJEJ.js.map +0 -1
- package/dist/chunk-HA6ZQWA2.js.map +0 -1
- package/dist/chunk-HG76BZ6G.js.map +0 -1
- package/dist/chunk-RNXJ2VO6.js.map +0 -1
- package/dist/chunk-YCXKFB7J.js.map +0 -1
- package/dist/collection-facade-DWA735G2.js +0 -39
- package/dist/delegation-YVSHMIZZ.js +0 -25
- package/dist/derive-BUO555L5.js +0 -21
- package/dist/executor-6OCCE5VM.js +0 -25
- package/dist/executor-JFVAJY42.js +0 -9
- package/dist/executor-UPSH5O3F.js +0 -9
- package/dist/export-accessible-L4A2QZA5.js +0 -23
- package/dist/extract-partition-ZHQ4RGGM.js +0 -36
- package/dist/find-ZFZDZQ2U.js +0 -11
- package/dist/issue-OG4V23SQ.js +0 -19
- package/dist/liberate-GFUQJRK5.js +0 -24
- package/dist/noydb-AKH4AMCR.js +0 -67
- package/dist/register-ZI7YI7US.js +0 -23
- package/dist/registry-DZ2T4LL7.js +0 -9
- package/dist/registry-NVWEQ2GU.js +0 -18
- package/dist/registry-SEKL74ET.js +0 -19
- package/dist/request-withdrawal-ZP3JIRVS.js +0 -31
- package/dist/reveal-NPVROV4D.js.map +0 -1
- package/dist/revoke-VF6TAJK2.js +0 -24
- package/dist/signer-DRDDCCHW.js +0 -25
- package/dist/stale-TJXFQKOJ.js +0 -14
- package/dist/storage-GR7KZRH4.js +0 -23
- package/dist/verify-QK76NJ4G.js.map +0 -1
- package/dist/withdraw-accessible-FMN4LPJZ.js +0 -28
- /package/dist/{api-3TH2GOFQ.js.map → api-ZGS6LCOF.js.map} +0 -0
- /package/dist/{chunk-ZL6PRULX.js.map → chunk-2NVOWNI3.js.map} +0 -0
- /package/dist/{chunk-WEHIQYQH.js.map → chunk-3B5VVCNY.js.map} +0 -0
- /package/dist/{chunk-FF7S3XDW.js.map → chunk-3LQ2YKO4.js.map} +0 -0
- /package/dist/{chunk-NAR6IDKH.js.map → chunk-3QCRBHCY.js.map} +0 -0
- /package/dist/{chunk-SXPCZ6LL.js.map → chunk-454JXE57.js.map} +0 -0
- /package/dist/{chunk-JGUZMC3I.js.map → chunk-4JBYV75E.js.map} +0 -0
- /package/dist/{chunk-RXTMLYJS.js.map → chunk-4NXKCLLQ.js.map} +0 -0
- /package/dist/{chunk-GXLZXD2W.js.map → chunk-4VNQOLML.js.map} +0 -0
- /package/dist/{chunk-45QPICLE.js.map → chunk-5M5DVGV7.js.map} +0 -0
- /package/dist/{chunk-S2OWPVSO.js.map → chunk-5YOLBEQ6.js.map} +0 -0
- /package/dist/{chunk-BDEMZD4F.js.map → chunk-6CRIV7DE.js.map} +0 -0
- /package/dist/{chunk-VCUQR6ZL.js.map → chunk-6JTIAGHD.js.map} +0 -0
- /package/dist/{chunk-K2DLLK34.js.map → chunk-6QTNZJBS.js.map} +0 -0
- /package/dist/{chunk-UMC5QZTX.js.map → chunk-6T2SCQRU.js.map} +0 -0
- /package/dist/{chunk-J3JIYFYL.js.map → chunk-7DSTRQIJ.js.map} +0 -0
- /package/dist/{chunk-3QSOFZQB.js.map → chunk-AUSTCW2X.js.map} +0 -0
- /package/dist/{chunk-PN5332SU.js.map → chunk-B3HJYUOF.js.map} +0 -0
- /package/dist/{chunk-DIB2BOIH.js.map → chunk-BDVFPG6Y.js.map} +0 -0
- /package/dist/{chunk-FYNE4WLC.js.map → chunk-CAF6WOK7.js.map} +0 -0
- /package/dist/{chunk-37WOJQWY.js.map → chunk-CIE2BASH.js.map} +0 -0
- /package/dist/{chunk-BLUT46UP.js.map → chunk-CRI4OUV4.js.map} +0 -0
- /package/dist/{chunk-Y5TWPBNW.js.map → chunk-DLG74CNB.js.map} +0 -0
- /package/dist/{chunk-HIOLCOK3.js.map → chunk-E5ZQT5KX.js.map} +0 -0
- /package/dist/{chunk-IQIVD7TP.js.map → chunk-EQO2UVP4.js.map} +0 -0
- /package/dist/{chunk-US34HTOI.js.map → chunk-ERJ7FU55.js.map} +0 -0
- /package/dist/{chunk-S7TAPIRS.js.map → chunk-EVVGJDRQ.js.map} +0 -0
- /package/dist/{chunk-EXGDL2UQ.js.map → chunk-EVX47VBM.js.map} +0 -0
- /package/dist/{chunk-NT2ZO4KI.js.map → chunk-EXK7QRWF.js.map} +0 -0
- /package/dist/{chunk-7QLY64AD.js.map → chunk-EYZ6IQ6X.js.map} +0 -0
- /package/dist/{chunk-QF5LGMSV.js.map → chunk-F64IRYG3.js.map} +0 -0
- /package/dist/{chunk-PH7G7ZI7.js.map → chunk-FHS2HQSH.js.map} +0 -0
- /package/dist/{chunk-ZHOJOT6S.js.map → chunk-FUG4SFN3.js.map} +0 -0
- /package/dist/{chunk-JRKE5MAZ.js.map → chunk-GKEWXIV5.js.map} +0 -0
- /package/dist/{chunk-6MA575R5.js.map → chunk-GTGPO5KW.js.map} +0 -0
- /package/dist/{chunk-XS6DLN67.js.map → chunk-HB3RFQSC.js.map} +0 -0
- /package/dist/{chunk-VXZNSPJM.js.map → chunk-HDMEGAQE.js.map} +0 -0
- /package/dist/{chunk-DJ7MRXNA.js.map → chunk-HTJQYHZP.js.map} +0 -0
- /package/dist/{chunk-NRYNRSGV.js.map → chunk-I6GALP6E.js.map} +0 -0
- /package/dist/{chunk-GL3JV5EV.js.map → chunk-IL6POWCW.js.map} +0 -0
- /package/dist/{chunk-NEYKOESM.js.map → chunk-IU6SNYX6.js.map} +0 -0
- /package/dist/{chunk-CCIR2OJH.js.map → chunk-J2ZX2XUV.js.map} +0 -0
- /package/dist/{chunk-NM3IFKBL.js.map → chunk-JKJOGPZN.js.map} +0 -0
- /package/dist/{chunk-TVS6BUUR.js.map → chunk-JZUV47FZ.js.map} +0 -0
- /package/dist/{chunk-5HNX4OD4.js.map → chunk-K5IMOGHB.js.map} +0 -0
- /package/dist/{chunk-XJ47GS53.js.map → chunk-KSKBRKGJ.js.map} +0 -0
- /package/dist/{chunk-INBQ43DI.js.map → chunk-LASZKVMO.js.map} +0 -0
- /package/dist/{chunk-EVHBK7BN.js.map → chunk-LXEXBTKL.js.map} +0 -0
- /package/dist/{chunk-6S7ENMRE.js.map → chunk-M4CV6BRT.js.map} +0 -0
- /package/dist/{chunk-AAIIDAUC.js.map → chunk-MEFJPTZ4.js.map} +0 -0
- /package/dist/{chunk-WHQHTNT7.js.map → chunk-MV43JSJF.js.map} +0 -0
- /package/dist/{chunk-F44XWXOA.js.map → chunk-NJ4EOKMB.js.map} +0 -0
- /package/dist/{chunk-ILF5GARW.js.map → chunk-NR5LT5RY.js.map} +0 -0
- /package/dist/{chunk-TBNF5DV5.js.map → chunk-NWSGI5C7.js.map} +0 -0
- /package/dist/{chunk-EIZ4YOG2.js.map → chunk-Q5VNKNE5.js.map} +0 -0
- /package/dist/{chunk-TVOHSPVK.js.map → chunk-QLWMEXCT.js.map} +0 -0
- /package/dist/{chunk-7GAXFU2O.js.map → chunk-QRB7NAOJ.js.map} +0 -0
- /package/dist/{chunk-X6Y5MXTH.js.map → chunk-R4ROFEYC.js.map} +0 -0
- /package/dist/{chunk-4BQXMCE5.js.map → chunk-RCVJZMFE.js.map} +0 -0
- /package/dist/{chunk-QG5RQQBO.js.map → chunk-RIX4V2TB.js.map} +0 -0
- /package/dist/{chunk-SAL5X5OK.js.map → chunk-RYCTDFUX.js.map} +0 -0
- /package/dist/{chunk-CXC3JLAQ.js.map → chunk-RZ5SVOYR.js.map} +0 -0
- /package/dist/{chunk-44IL5G3W.js.map → chunk-SLFHQTTW.js.map} +0 -0
- /package/dist/{chunk-2MTRJCBI.js.map → chunk-T2FFWNPK.js.map} +0 -0
- /package/dist/{chunk-QYPDYN23.js.map → chunk-UNFPPVNI.js.map} +0 -0
- /package/dist/{chunk-7ZOSHEVS.js.map → chunk-VLFCJYTL.js.map} +0 -0
- /package/dist/{chunk-APHLCXVC.js.map → chunk-VN3DBQAU.js.map} +0 -0
- /package/dist/{chunk-HK4XTXO4.js.map → chunk-VZRODIM3.js.map} +0 -0
- /package/dist/{chunk-P2LJI6JE.js.map → chunk-W22IKJE2.js.map} +0 -0
- /package/dist/{chunk-FJTWLQV3.js.map → chunk-X3YYQWOQ.js.map} +0 -0
- /package/dist/{chunk-SGJGWBSC.js.map → chunk-YFXZEAYK.js.map} +0 -0
- /package/dist/{chunk-SIAIYP6G.js.map → chunk-ZAJAVEXY.js.map} +0 -0
- /package/dist/{chunk-KKYEZCQG.js.map → chunk-ZICD77GM.js.map} +0 -0
- /package/dist/{chunk-HGAB325C.js.map → chunk-ZJ2AK4V7.js.map} +0 -0
- /package/dist/{chunk-HYG32HCM.js.map → chunk-ZUODRVHY.js.map} +0 -0
- /package/dist/{classified-marker-M7K3OJPM.js.map → classified-marker-CZKA6ITE.js.map} +0 -0
- /package/dist/{collection-facade-DWA735G2.js.map → collection-facade-TLWIPI76.js.map} +0 -0
- /package/dist/{computed-ORCGM5JE.js.map → computed-ZIQTYTDI.js.map} +0 -0
- /package/dist/{dead-filter-OV5FGKOG.js.map → dead-filter-ESOBZZP5.js.map} +0 -0
- /package/dist/{delegation-YVSHMIZZ.js.map → delegation-W7ZV2322.js.map} +0 -0
- /package/dist/{derive-BUO555L5.js.map → derive-H2BJTLUI.js.map} +0 -0
- /package/dist/{enclave-XXFUKJC6.js.map → enclave-AP3I5W7O.js.map} +0 -0
- /package/dist/{executor-6OCCE5VM.js.map → executor-KGWTNEQD.js.map} +0 -0
- /package/dist/{executor-JFVAJY42.js.map → executor-OVEXR6RT.js.map} +0 -0
- /package/dist/{executor-UPSH5O3F.js.map → executor-UNEH5ZYH.js.map} +0 -0
- /package/dist/{export-accessible-L4A2QZA5.js.map → export-accessible-PCMXSUZS.js.map} +0 -0
- /package/dist/{extract-partition-ZHQ4RGGM.js.map → extract-partition-SWHFSYJO.js.map} +0 -0
- /package/dist/{fanout-sidecar-IO2KDUWV.js.map → fanout-sidecar-A765THMX.js.map} +0 -0
- /package/dist/{find-ZFZDZQ2U.js.map → find-N6345CNT.js.map} +0 -0
- /package/dist/{issue-OG4V23SQ.js.map → issue-5OKB6I2R.js.map} +0 -0
- /package/dist/{ledger-UAQKPWNM.js.map → ledger-GFBKVPV4.js.map} +0 -0
- /package/dist/{liberate-GFUQJRK5.js.map → liberate-3VDOT4KO.js.map} +0 -0
- /package/dist/{link-set-DGYUOFVD.js.map → link-set-Z7Q2ASFX.js.map} +0 -0
- /package/dist/{noydb-AKH4AMCR.js.map → noydb-ZCJOYBDI.js.map} +0 -0
- /package/dist/{policy-5POYLI26.js.map → policy-Z3RUAIY2.js.map} +0 -0
- /package/dist/{post-register-LB3P4XQU.js.map → post-register-JTH76BLY.js.map} +0 -0
- /package/dist/{public-envelope-GOG4LUM7.js.map → public-envelope-B4KNWVUA.js.map} +0 -0
- /package/dist/{register-ZI7YI7US.js.map → register-VAHONCID.js.map} +0 -0
- /package/dist/{registry-DZ2T4LL7.js.map → registry-7MLVD3VO.js.map} +0 -0
- /package/dist/{registry-NVWEQ2GU.js.map → registry-EPKPD5SM.js.map} +0 -0
- /package/dist/{registry-SEKL74ET.js.map → registry-P5T7PS2U.js.map} +0 -0
- /package/dist/{request-withdrawal-ZP3JIRVS.js.map → request-withdrawal-TI3A5WPS.js.map} +0 -0
- /package/dist/{revoke-VF6TAJK2.js.map → revoke-FDRD6GRW.js.map} +0 -0
- /package/dist/{seed-VI4FU7UH.js.map → seed-Q6M2IZFL.js.map} +0 -0
- /package/dist/{signer-DRDDCCHW.js.map → signer-MUWEIUI6.js.map} +0 -0
- /package/dist/{stale-TJXFQKOJ.js.map → stale-OSQ7J3AA.js.map} +0 -0
- /package/dist/{storage-GR7KZRH4.js.map → storage-MVFCGEQE.js.map} +0 -0
- /package/dist/{store-coordination-provider-5KDS2RRP.js.map → store-coordination-provider-64OEZFGS.js.map} +0 -0
- /package/dist/{walk-XQCBKSBW.js.map → walk-SVNDIZ62.js.map} +0 -0
- /package/dist/{withdraw-accessible-FMN4LPJZ.js.map → withdraw-accessible-WZIEVWSR.js.map} +0 -0
package/dist/indexing/index.js
CHANGED
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
decodeIdxId,
|
|
8
8
|
encodeIdxId,
|
|
9
9
|
isIdxId
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-M4CV6BRT.js";
|
|
11
11
|
import {
|
|
12
12
|
CollectionIndexes
|
|
13
13
|
} from "../chunk-KPZS5QAQ.js";
|
|
14
14
|
import "../chunk-IGJCYUT5.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-BIOUI4HL.js";
|
|
16
16
|
import "../chunk-PZ5AY32C.js";
|
|
17
17
|
|
|
18
18
|
// src/with-lookup/indexing/active.ts
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
issueAttestationCore
|
|
3
|
+
} from "./chunk-GTGPO5KW.js";
|
|
4
|
+
import "./chunk-EXK7QRWF.js";
|
|
5
|
+
import "./chunk-ZJADGNYF.js";
|
|
6
|
+
import "./chunk-XDYREZWE.js";
|
|
7
|
+
import "./chunk-7DSTRQIJ.js";
|
|
8
|
+
import "./chunk-HB3RFQSC.js";
|
|
9
|
+
import "./chunk-JKJOGPZN.js";
|
|
10
|
+
import "./chunk-5M5DVGV7.js";
|
|
11
|
+
import "./chunk-LP7BEXCT.js";
|
|
12
|
+
import "./chunk-CIE2BASH.js";
|
|
13
|
+
import "./chunk-JNAI2HN2.js";
|
|
14
|
+
import "./chunk-BIOUI4HL.js";
|
|
15
|
+
import "./chunk-PZ5AY32C.js";
|
|
16
|
+
export {
|
|
17
|
+
issueAttestationCore
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=issue-5OKB6I2R.js.map
|
|
@@ -122,6 +122,16 @@ export interface CollectionOpts<T> {
|
|
|
122
122
|
blobStrategy?: BlobStrategy | undefined;
|
|
123
123
|
objectStore?: ObjectProjection | undefined;
|
|
124
124
|
blobFields?: BlobFieldsConfig | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* #724 Arc 10 Task 3: how `elevate()`/`demote()`/`putAtTier()` rehome a
|
|
127
|
+
* SHARED blob (`refCount > 1`) it can't rewrap in place. `'isolate'`
|
|
128
|
+
* (default) forks a private tier-scoped copy for the moving record and
|
|
129
|
+
* releases its hold on the shared object — co-owners stay byte-for-byte
|
|
130
|
+
* untouched. `'dedup'` (#741, opt-in) leaves the shared object in place;
|
|
131
|
+
* the Task-1 runtime read gate still hides it, but the chunks stay
|
|
132
|
+
* decryptable at rest under the flat `_blob` DEK (documented residue).
|
|
133
|
+
*/
|
|
134
|
+
blobTierPolicy?: 'isolate' | 'dedup' | undefined;
|
|
125
135
|
aggregateStrategy?: AggregateStrategy | undefined;
|
|
126
136
|
crdtStrategy?: CrdtStrategy | undefined;
|
|
127
137
|
/**
|
|
@@ -256,6 +266,14 @@ export interface CollectionOpts<T> {
|
|
|
256
266
|
* classified refusal matrix (R4: a digest-only field cannot be the subject key).
|
|
257
267
|
*/
|
|
258
268
|
subjectKeyField?: string | undefined;
|
|
269
|
+
/**
|
|
270
|
+
* Register a record's forget-subject ref directly (bypassing the write-hook
|
|
271
|
+
* pipeline), wired by the Vault when this collection declares a forget-
|
|
272
|
+
* subject field. Consumed by `putAtTier` (#766, via `TiersContext.addSubjectRef`)
|
|
273
|
+
* so a record whose first write is a tier write still enters `_subject_index`.
|
|
274
|
+
* `undefined` when no forget strategy declares this collection (no-op).
|
|
275
|
+
*/
|
|
276
|
+
addSubjectRef?: ((id: string, record: unknown) => Promise<void>) | undefined;
|
|
259
277
|
/** — tree-shake seam for `collection.reveal()`. Defaults to `NO_CLASSIFIED`. */
|
|
260
278
|
classifiedStrategy?: ClassifiedStrategy | undefined;
|
|
261
279
|
/**
|
|
@@ -779,7 +797,9 @@ export declare function resolveCollectionConfig<T>(opts: CollectionOpts<T>): {
|
|
|
779
797
|
tiersStrategy: TiersStrategy;
|
|
780
798
|
searchStrategy: SearchStrategy;
|
|
781
799
|
tierMode: TierMode;
|
|
800
|
+
blobTierPolicy: "isolate" | "dedup";
|
|
782
801
|
onCrossTierAccess: ((event: CrossTierAccessEvent) => void) | undefined;
|
|
802
|
+
addSubjectRef: ((id: string, record: unknown) => Promise<void>) | undefined;
|
|
783
803
|
deterministicFields: ReadonlySet<string> | null;
|
|
784
804
|
sensitiveFields: ReadonlySet<string>;
|
|
785
805
|
vdigFields: ReadonlyMap<string, VdigFieldPolicy> | null;
|
|
@@ -11,6 +11,7 @@ import type { MutationOrigin } from './mutation.js';
|
|
|
11
11
|
import { type WaveContext, type RollupOutcome, type RollupDeleteIntent } from './via/dispatch.js';
|
|
12
12
|
import type { ComputedFields } from '../with-formula/computed/index.js';
|
|
13
13
|
import { type SealedShredSlot } from './enclave/index.js';
|
|
14
|
+
import { type TierMoveResult } from '../with-audit/tiers/index.js';
|
|
14
15
|
import type { GhostRecord } from './types.js';
|
|
15
16
|
import type { StandardSchemaV1 } from './schema.js';
|
|
16
17
|
import type { DiffEntry } from '../with-commit/history/diff.js';
|
|
@@ -106,6 +107,7 @@ export declare class Collection<T, S extends keyof T = never, Q extends keyof T
|
|
|
106
107
|
private readonly blobStrategy;
|
|
107
108
|
private readonly objectStore;
|
|
108
109
|
private readonly blobFields;
|
|
110
|
+
private readonly blobTierPolicy;
|
|
109
111
|
private readonly aggregateStrategy;
|
|
110
112
|
private readonly crdtStrategy;
|
|
111
113
|
private readonly tiersStrategy;
|
|
@@ -335,11 +337,9 @@ export declare class Collection<T, S extends keyof T = never, Q extends keyof T
|
|
|
335
337
|
private readonly tiers;
|
|
336
338
|
private readonly tierMode;
|
|
337
339
|
private readonly onCrossTierAccess;
|
|
340
|
+
private readonly addSubjectRef;
|
|
338
341
|
/**
|
|
339
|
-
* Optional reference to the vault-level hash-chained audit
|
|
340
|
-
* log. When present, every successful `put()` and `delete()` appends
|
|
341
|
-
* an entry to the ledger AFTER the adapter write succeeds (so a
|
|
342
|
-
* failed adapter write never produces an orphan ledger entry).
|
|
342
|
+
* Optional reference to the vault-level hash-chained audit log. When present, every successful `put()` and `delete()` appends an entry to the ledger AFTER the adapter write succeeds (so a failed adapter write never produces an orphan ledger entry).
|
|
343
343
|
*
|
|
344
344
|
* The ledger is always a vault-wide singleton — all
|
|
345
345
|
* collections in the same vault share the same LedgerStore.
|
|
@@ -750,10 +750,7 @@ export declare class Collection<T, S extends keyof T = never, Q extends keyof T
|
|
|
750
750
|
*/
|
|
751
751
|
delete(id: string): Promise<void>;
|
|
752
752
|
/**
|
|
753
|
-
* @internal — bulk-rewrite every record through a cutover transform.
|
|
754
|
-
* Raw adapter path (bypasses the write gate + guards — the transform is
|
|
755
|
-
* trusted and runs only during the `migrating` phase). Bumps each
|
|
756
|
-
* record's `_v` and appends a ledger `op:'migration'` entry.
|
|
753
|
+
* @internal — bulk-rewrite every record through a cutover transform. Raw adapter path (bypasses the write gate + guards — the transform is trusted and runs only during the `migrating` phase). Bumps each record's `_v` and appends a ledger `op:'migration'` entry. #708: refuses BEFORE any rewrite if a live record is elevated (assertCutoverTierSafe) — demote it first.
|
|
757
754
|
*/
|
|
758
755
|
_applyCutoverTransform(transform: (doc: Record<string, unknown>) => Record<string, unknown>): Promise<number>;
|
|
759
756
|
/** @internal Untracked delete body — call {@link delete}, not this. */
|
|
@@ -841,11 +838,17 @@ export declare class Collection<T, S extends keyof T = never, Q extends keyof T
|
|
|
841
838
|
/**
|
|
842
839
|
* Mirror of {@link dispatchMaterializedViews} for the delete/forget path — no `_materializedFrom`
|
|
843
840
|
* skip (record's gone); the `internal` gate at `_doDelete` is the recursion guard. Returns the
|
|
844
|
-
* row count TOMBSTONED across
|
|
845
|
-
* `derivedRecordsErased`)
|
|
841
|
+
* row count TOMBSTONED across EVERY MV sourced here (#638 T6 — `forgetDerivedFanout`'s
|
|
842
|
+
* `derivedRecordsErased`) — eager AND lazy/manual `invalidateMVAtRest` purges both contribute now
|
|
843
|
+
* (#761 item 1, previously eager-only); lazy persists a stale mark for cold-session recompute;
|
|
844
|
+
* manual serves empty until `refreshView()`. `residueUndecodable`/`residueDeclined` (#776/#785) carry `outputCollection:id` entries whose ownership stamp `invalidateMVAtRest` could not decode, resp. decoded+stamp-matched but declined erasure — surfaced, not erased.
|
|
846
845
|
* @internal
|
|
847
846
|
*/
|
|
848
|
-
dispatchMaterializedViewsOnDelete(id: string): Promise<
|
|
847
|
+
dispatchMaterializedViewsOnDelete(id: string): Promise<{
|
|
848
|
+
deleted: number;
|
|
849
|
+
residueUndecodable: string[];
|
|
850
|
+
residueDeclined: string[];
|
|
851
|
+
}>;
|
|
849
852
|
/**
|
|
850
853
|
* List all records in the collection.
|
|
851
854
|
*
|
|
@@ -882,6 +885,11 @@ export declare class Collection<T, S extends keyof T = never, Q extends keyof T
|
|
|
882
885
|
minScore?: number;
|
|
883
886
|
includeRecord?: boolean;
|
|
884
887
|
}): Promise<RetrieveHit<T>[]>;
|
|
888
|
+
/** Opt-in bulk `_vec` re-derive (#788) — a plain collection has nothing to rebuild; gated behind `searchStrategy: withSearch()` otherwise. */
|
|
889
|
+
rebuildEmbeddings(): Promise<{
|
|
890
|
+
rebuilt: number;
|
|
891
|
+
skipped: number;
|
|
892
|
+
}>;
|
|
885
893
|
/**
|
|
886
894
|
* Bind the {@link SearchContext} the search/retrieval surface needs. The
|
|
887
895
|
* `cache` is the SAME `Map` reference the eager read/write path owns (passed
|
|
@@ -1064,9 +1072,9 @@ export declare class Collection<T, S extends keyof T = never, Q extends keyof T
|
|
|
1064
1072
|
/**
|
|
1065
1073
|
* Count records in the collection.
|
|
1066
1074
|
*
|
|
1067
|
-
* In eager mode this returns the in-memory cache size (instant). In
|
|
1068
|
-
*
|
|
1069
|
-
*
|
|
1075
|
+
* In eager mode this returns the in-memory cache size (instant). In lazy
|
|
1076
|
+
* mode it counts only LIVE tier-0 envelopes via envelope inspection — no
|
|
1077
|
+
* record bodies loaded — matching eager's tombstone/tier exclusion (#706).
|
|
1070
1078
|
*/
|
|
1071
1079
|
count(): Promise<number>;
|
|
1072
1080
|
/**
|
|
@@ -1453,7 +1461,7 @@ export declare class Collection<T, S extends keyof T = never, Q extends keyof T
|
|
|
1453
1461
|
queryByDet(field: string, value: unknown): Promise<T[]>;
|
|
1454
1462
|
/** Bind the {@link DeterministicContext} this collection's det lookups need. */
|
|
1455
1463
|
private detContext;
|
|
1456
|
-
/** tier-aware put — gated behind `tiersStrategy: withTiers()`. */
|
|
1464
|
+
/** tier-aware put — gated behind `tiersStrategy: withTiers()`. `searchResidue: true` = stuck search compensation (#774, mirroring #764's elevate/demote posture); the write itself always completes. */
|
|
1457
1465
|
putAtTier(id: string, record: T, tier: number, opts?: {
|
|
1458
1466
|
elevation?: {
|
|
1459
1467
|
reason: string;
|
|
@@ -1461,7 +1469,7 @@ export declare class Collection<T, S extends keyof T = never, Q extends keyof T
|
|
|
1461
1469
|
};
|
|
1462
1470
|
source?: string;
|
|
1463
1471
|
sourceTs?: string;
|
|
1464
|
-
}): Promise<
|
|
1472
|
+
}): Promise<TierMoveResult>;
|
|
1465
1473
|
/** tier-aware get — gated behind `tiersStrategy: withTiers()`. */
|
|
1466
1474
|
getAtTier(id: string): Promise<T | GhostRecord | null>;
|
|
1467
1475
|
/** list ids grouped by the caller's readability — gated behind `withTiers()`. */
|
|
@@ -1470,14 +1478,12 @@ export declare class Collection<T, S extends keyof T = never, Q extends keyof T
|
|
|
1470
1478
|
tier: number;
|
|
1471
1479
|
readable: boolean;
|
|
1472
1480
|
}>>;
|
|
1473
|
-
/** elevate a record to a higher tier — gated behind `withTiers()`. */
|
|
1474
|
-
elevate(id: string, toTier: number): Promise<
|
|
1475
|
-
/** demote a record to a lower tier — gated behind `withTiers()`. */
|
|
1476
|
-
demote(id: string, toTier: number): Promise<
|
|
1481
|
+
/** elevate a record to a higher tier — gated behind `withTiers()`. `searchResidue: true` = stuck search compensation (#764); the move itself always completes. */
|
|
1482
|
+
elevate(id: string, toTier: number): Promise<TierMoveResult>;
|
|
1483
|
+
/** demote a record to a lower tier — gated behind `withTiers()`. Same `searchResidue` posture as {@link elevate} (#764). */
|
|
1484
|
+
demote(id: string, toTier: number): Promise<TierMoveResult>;
|
|
1477
1485
|
/**
|
|
1478
|
-
* Emit a cross-tier access event. The subscriber sink stays collection-
|
|
1479
|
-
* resident (it captures `onCrossTierAccess`); the tiers module reaches it
|
|
1480
|
-
* via the {@link TiersContext.emitCrossTierEvent} callback.
|
|
1486
|
+
* Emit a cross-tier access event. The subscriber sink stays collection-resident (it captures `onCrossTierAccess`); the tiers module reaches it via the {@link TiersContext.emitCrossTierEvent} callback.
|
|
1481
1487
|
*/
|
|
1482
1488
|
private emitCrossTierEvent;
|
|
1483
1489
|
/**
|
|
@@ -1503,17 +1509,14 @@ export declare class Collection<T, S extends keyof T = never, Q extends keyof T
|
|
|
1503
1509
|
presentForJoin?: (record: unknown, locale: string) => unknown;
|
|
1504
1510
|
}): void;
|
|
1505
1511
|
/**
|
|
1506
|
-
* Bind the {@link TiersContext} the tier ops need
|
|
1507
|
-
* by reference (the SAME `Lru` the kernel's read/write path owns) so an
|
|
1508
|
-
* elevate/demote CEK re-wrap stays synchronous with cache eviction.
|
|
1512
|
+
* Bind the {@link TiersContext} the tier ops need — `cekCache` by reference (same `Lru` the read/write path owns) for a synchronous re-wrap; `syncDerived` closes over `this` for {@link syncDerivedOutputs} (#722).
|
|
1509
1513
|
*/
|
|
1510
1514
|
private tiersContext;
|
|
1511
1515
|
/**
|
|
1512
1516
|
* Bind the {@link IndexingContext} the index-maintenance surface needs. The
|
|
1513
1517
|
* eager `cache` Map and the index / unique-constraint / persisted mirrors are
|
|
1514
1518
|
* passed by reference (the SAME instances the query path reads, never
|
|
1515
|
-
* copied); the `persistedIndexesLoaded` flag and `ensure*` hydration stay
|
|
1516
|
-
* collection-resident, reached via callbacks.
|
|
1519
|
+
* copied); the `persistedIndexesLoaded` flag and `ensure*` hydration stay collection-resident, reached via callbacks.
|
|
1517
1520
|
*/
|
|
1518
1521
|
private indexingContext;
|
|
1519
1522
|
}
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
* text door (verifyTextField) has no real PBKDF2 of its own, so it pays the
|
|
8
8
|
* pad UNCONDITIONALLY — every outcome, including a real compare, costs the
|
|
9
9
|
* same one PBKDF2 unit (no inverted exists-vs-absent oracle).
|
|
10
|
+
* Elevated records (_tier > 0, with-audit tier moves) are non-comparable
|
|
11
|
+
* through every door and pad-false exactly like missing records (#691) —
|
|
12
|
+
* the tier-aware read surface is getAtTier, never verify.
|
|
10
13
|
* Throws are reserved for caller/config bugs (ClassifiedVerifyError /
|
|
11
14
|
* ClassifiedConfigError) and are exempt from the pad by design (R6 note).
|
|
12
15
|
* @module
|
|
@@ -58,7 +58,8 @@ export type { EnclaveKey } from './crypto.js';
|
|
|
58
58
|
export { encrypt, decrypt, encryptBytes, decryptBytes, encryptBytesWithAAD, decryptBytesWithAAD, encryptDeterministic, decryptDeterministic, sha256Hex, hmacSha256Hex, } from './crypto.js';
|
|
59
59
|
export { deriveKey, derivePassphraseKey, generateDEK, generateSalt, generateIV, wrapKey, unwrapKey, bufferToBase64, base64ToBuffer, derivePresenceKey, deriveDeterministicKey, deriveSealedFieldKey, deriveSealedFieldKeyFromCek, wrapCek, unwrapCek, importCek, } from './crypto.js';
|
|
60
60
|
export type { PassphraseKeyUsage } from './crypto.js';
|
|
61
|
-
export { resolveStableCek, rewrapBodyToDek } from './record-keys/lifecycle.js';
|
|
61
|
+
export { resolveStableCek, rewrapBodyToDek, rewrapEnvelope, applyRewrappedBody, isRewrappedUnder } from './record-keys/lifecycle.js';
|
|
62
|
+
export type { RewrappedBody } from './record-keys/lifecycle.js';
|
|
62
63
|
export { RecordCodec } from './record-keys/record-codec.js';
|
|
63
64
|
export type { SealedShredSlot } from './record-keys/record-codec.js';
|
|
64
65
|
export { SEALED_CEK_NS, sealRecordToHost, revokeSealedRecord, rotateRecordCek } from './record-keys/sealing.js';
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Both functions take a small {@link DeterministicContext} (the exact `this.*`
|
|
13
13
|
* the moving methods touched) instead of `this`, mirroring the `record-keys/`
|
|
14
14
|
* siblings. Behaviour is byte-identical to the inline code they replaced.
|
|
15
|
+
* Elevated records (_tier > 0) are skipped: invisible to tier-0 scans (#691).
|
|
15
16
|
*
|
|
16
17
|
* Internal service — not exported as a `@noy-db/hub/*` subpath.
|
|
17
18
|
*/
|
|
@@ -55,3 +55,53 @@ export interface RewrappedBody {
|
|
|
55
55
|
* directly — byte-for-byte the pre-CEK behaviour.
|
|
56
56
|
*/
|
|
57
57
|
export declare function rewrapBodyToDek(envelope: Pick<EncryptedEnvelope, '_iv' | '_data' | '_cek'>, fromDek: EnclaveKey, toDek: EnclaveKey): Promise<RewrappedBody>;
|
|
58
|
+
/**
|
|
59
|
+
* Merge an ALREADY-rewrapped {@link RewrappedBody} into `envelope`, keeping
|
|
60
|
+
* every field but the re-keyed body (`_iv`/`_data`/`_cek`) unchanged.
|
|
61
|
+
*
|
|
62
|
+
* Body-field access (`_iv`/`_data`/`_cek`) is sanctioned inside the enclave;
|
|
63
|
+
* this lets callers outside it get back a ready-to-store envelope without
|
|
64
|
+
* reading those fields themselves. Takes a body the caller has ALREADY
|
|
65
|
+
* computed (vs. {@link rewrapEnvelope}, which also runs `rewrapBodyToDek`)
|
|
66
|
+
* so a caller building a SECOND envelope from the same rewrap — a tier
|
|
67
|
+
* move's live write AND its pre-move `_history` snapshot, #728 — pays the
|
|
68
|
+
* unwrap/decrypt/encrypt/wrap crypto once, not twice.
|
|
69
|
+
*/
|
|
70
|
+
export declare function applyRewrappedBody(envelope: EncryptedEnvelope, body: RewrappedBody): EncryptedEnvelope;
|
|
71
|
+
/**
|
|
72
|
+
* Move a FULL stored envelope from `fromDek` to `toDek`, preserving every
|
|
73
|
+
* field other than the re-keyed body (`_iv`/`_data`/`_cek`) unchanged.
|
|
74
|
+
* Mirrors the spread-merge idiom `with-audit/tiers/index.ts`'s
|
|
75
|
+
* `elevate()`/`demote()` use to apply `rewrapBodyToDek`'s result to the live
|
|
76
|
+
* envelope, generalized to any envelope shape (history callers don't bump
|
|
77
|
+
* `_v`/`_ts`/`_tier` the way a tier move does).
|
|
78
|
+
*/
|
|
79
|
+
export declare function rewrapEnvelope(envelope: EncryptedEnvelope, fromDek: EnclaveKey, toDek: EnclaveKey): Promise<EncryptedEnvelope>;
|
|
80
|
+
/**
|
|
81
|
+
* Is `envelope` ALREADY wrapped under `dek` (a per-record CEK wrapped under
|
|
82
|
+
* `dek`, or — legacy, no `_cek` — the body itself decryptable under `dek`)?
|
|
83
|
+
*
|
|
84
|
+
* A toDek-first idempotency check for retry-safe rewrap loops (#712 crash
|
|
85
|
+
* atomicity, `with-commit/history/history.ts`'s `rewrapHistory`): a crash
|
|
86
|
+
* mid-rewrap can strand some entries already moved to `toDek` while others
|
|
87
|
+
* remain under `fromDek`. Calling this with `toDek` before attempting the
|
|
88
|
+
* `fromDek` rewrap lets the caller skip an already-migrated entry instead of
|
|
89
|
+
* re-wrapping it (a re-wrap would be a correctness no-op but doubles as an
|
|
90
|
+
* unnecessary write) — and, more importantly, tells a retry loop that this
|
|
91
|
+
* entry needs no `fromDek` unwrap attempt at all, so a crash that landed some
|
|
92
|
+
* entries under `toDek` doesn't wedge on those already-moved entries.
|
|
93
|
+
*
|
|
94
|
+
* AES-KW (CEK unwrap) and AES-GCM (direct decrypt) are both authenticated —
|
|
95
|
+
* unwrap/decrypt under the wrong key throws, never silently returns garbage
|
|
96
|
+
* — so a caught error here reliably means "not wrapped under `dek`", not a
|
|
97
|
+
* corrupt envelope (a genuinely corrupt envelope also throws under the
|
|
98
|
+
* correct key, but callers that reach this helper only do so as a
|
|
99
|
+
* best-effort probe before their own decisive fromDek attempt, which still
|
|
100
|
+
* surfaces real corruption).
|
|
101
|
+
*
|
|
102
|
+
* Body-field access (`_iv`/`_data`/`_cek`) is sanctioned inside the enclave —
|
|
103
|
+
* this is the sanctioned door so callers outside it (history.ts) never read
|
|
104
|
+
* those fields themselves, preserving the check-architecture body-access
|
|
105
|
+
* ratchet.
|
|
106
|
+
*/
|
|
107
|
+
export declare function isRewrappedUnder(envelope: Pick<EncryptedEnvelope, '_iv' | '_data' | '_cek'>, dek: EnclaveKey): Promise<boolean>;
|
|
@@ -278,6 +278,33 @@ export declare class RecordCodec<T> {
|
|
|
278
278
|
id?: string;
|
|
279
279
|
sealedAsHandles?: boolean;
|
|
280
280
|
}): Promise<T>;
|
|
281
|
+
/**
|
|
282
|
+
* Decrypt an envelope under an EXPLICIT `dek` instead of this codec's own
|
|
283
|
+
* `ctx.getDEK()` / cekCache resolution — for a from-tier>0 pre-move decode
|
|
284
|
+
* (`with-audit/tiers/index.ts`'s `putAtTier`/`elevate`/`demote` sites,
|
|
285
|
+
* #722 whole-branch review). Mirrors the manual unwrap-then-decrypt
|
|
286
|
+
* `getAtTier`'s own tier>0 leg performs there (same primitives, same
|
|
287
|
+
* `applySealedSlots` extraction point #635 built for exactly this caller).
|
|
288
|
+
*
|
|
289
|
+
* `decryptRecord` is tier-UNAWARE: `resolveEnvelopeCek` reads the cekCache
|
|
290
|
+
* or falls back to `ctx.getDEK()` — this codec's DEFAULT (tier-0/
|
|
291
|
+
* collection) DEK — never the envelope's OWN tier. That only happens to
|
|
292
|
+
* decrypt a from-tier>0 envelope correctly when some other call in the
|
|
293
|
+
* SAME op already primed the cekCache with this record's CEK (true for an
|
|
294
|
+
* ordinary put()-then-elevate(0→1); NOT true for a `putAtTier`-origin
|
|
295
|
+
* envelope, whose body is encrypted directly under its tier DEK with no
|
|
296
|
+
* `_cek` ever minted, or a non-`perRecordKeys` collection, which has no
|
|
297
|
+
* `_cek` at all) — those throw `TamperedError`. Decrypting under the
|
|
298
|
+
* caller-resolved `dek` is correct regardless of cache state or
|
|
299
|
+
* `perRecordKeys`.
|
|
300
|
+
*
|
|
301
|
+
* No CRDT resolution, no schema validation — same scope as `getAtTier`'s
|
|
302
|
+
* tier>0 branch (the established precedent for a tier-aware read), which
|
|
303
|
+
* skips both for the same reason: a tier>0 read is an internal/derived-
|
|
304
|
+
* output-recompute path, not the public per-record read surface schema
|
|
305
|
+
* validation guards.
|
|
306
|
+
*/
|
|
307
|
+
decryptRecordAtDek(envelope: EncryptedEnvelope, dek: EnclaveKey, id?: string): Promise<T | null>;
|
|
281
308
|
/**
|
|
282
309
|
* Decrypt an envelope into a record of type `T`.
|
|
283
310
|
*
|
package/dist/kernel/errors.d.ts
CHANGED
|
@@ -490,6 +490,62 @@ export declare class TierNotGrantedError extends NoydbError {
|
|
|
490
490
|
readonly collection: string;
|
|
491
491
|
constructor(collection: string, tier: number);
|
|
492
492
|
}
|
|
493
|
+
/**
|
|
494
|
+
* Thrown when a tier-0 `put()` or `delete()` targets a record whose LIVE
|
|
495
|
+
* envelope is elevated (`_tier > 0`) — regardless of whether the caller
|
|
496
|
+
* holds the tier's DEK. `put()`/`delete()` are the tier-0 write APIs;
|
|
497
|
+
* the sanctioned way to write an elevated record is `putAtTier()`,
|
|
498
|
+
* `elevate()`, or `demote()`.
|
|
499
|
+
*
|
|
500
|
+
* Distinct from `TierNotGrantedError`, which means "no DEK for tier N"
|
|
501
|
+
* and refuses only non-holders. This error refuses HOLDERS too — the
|
|
502
|
+
* problem isn't clearance, it's that `put()`/`delete()` are the wrong
|
|
503
|
+
* API for an already-elevated record (a tier-0 `put()` over one would
|
|
504
|
+
* otherwise silently demote it; a tier-0 `delete()` would write a
|
|
505
|
+
* marker with no `_tier`, erasing the elevation signal). It is also
|
|
506
|
+
* distinct from the read-path invisibility gate (`liveRecordIsElevated`
|
|
507
|
+
* in `tier-visibility.ts`), which throws nothing — elevated records
|
|
508
|
+
* simply read as absent there. This is a write-path refusal, not a
|
|
509
|
+
* read-path ghost.
|
|
510
|
+
*
|
|
511
|
+
* #708: also raised by the coordinated-cutover pre-check
|
|
512
|
+
* (`assertCutoverTierSafe`) — a bulk-rewrite is a third tier-0 write path,
|
|
513
|
+
* so it gets the same refusal with a `detail` override naming the record.
|
|
514
|
+
*/
|
|
515
|
+
export declare class TierWriteRefusedError extends NoydbError {
|
|
516
|
+
readonly tier: number;
|
|
517
|
+
readonly collection: string;
|
|
518
|
+
constructor(collection: string, tier: number, detail?: string);
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Thrown at `vault.collection()` registration when `tiers` is declared
|
|
522
|
+
* together with a derived-artifact feature whose crypto has not yet been
|
|
523
|
+
* made tier-aware (elevate()/demote() do not re-key it), so an elevated
|
|
524
|
+
* record's data would stay readable at tier 0. Mirrors
|
|
525
|
+
* `UnsupportedIndexOptionError` — the refusal happens loudly at
|
|
526
|
+
* registration instead of leaking silently at rest.
|
|
527
|
+
*
|
|
528
|
+
* `feature` names the incompatible feature (e.g. `'blobs'`) so catch
|
|
529
|
+
* blocks can pattern-match without inspecting the error message.
|
|
530
|
+
*/
|
|
531
|
+
export declare class UnsupportedTierCompositionError extends NoydbError {
|
|
532
|
+
readonly feature: string;
|
|
533
|
+
constructor(feature: string, message: string);
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Thrown by `createIntent` (blob durability journal, #753 spec §7 C8) when a
|
|
537
|
+
* `_blob_intent` marker already exists for `{collection}::{recordId}` — the
|
|
538
|
+
* CAS create-if-absent (`expectedVersion: 0`) lost to a present row. A
|
|
539
|
+
* present marker means a shred or rehome is already in flight for this
|
|
540
|
+
* record and MUST be resumed before any new intent is minted (overwriting it
|
|
541
|
+
* would orphan the prior op's op-stamps — spec C8). Callers catch this and
|
|
542
|
+
* resume the pending marker first, then retry.
|
|
543
|
+
*/
|
|
544
|
+
export declare class BlobIntentPendingError extends NoydbError {
|
|
545
|
+
readonly collection: string;
|
|
546
|
+
readonly recordId: string;
|
|
547
|
+
constructor(collection: string, recordId: string);
|
|
548
|
+
}
|
|
493
549
|
/**
|
|
494
550
|
* Thrown when an elevated-handle operation runs after the elevation's
|
|
495
551
|
* TTL expired. Reads continue at the original tier; only writes
|
|
@@ -816,6 +872,24 @@ export declare class IndexWriteFailureError extends NoydbError {
|
|
|
816
872
|
cause: unknown;
|
|
817
873
|
});
|
|
818
874
|
}
|
|
875
|
+
/**
|
|
876
|
+
* Thrown when `PersistedIndexStore`'s compensating `remove()` — the undo of a
|
|
877
|
+
* stale debounced `_ftindex` save that raced a purge (#725) — itself fails.
|
|
878
|
+
* That failure is sticky (`pendingCompensation`) and retried-first by every
|
|
879
|
+
* subsequent store entrypoint (`ensureBuilt`/`rebuildAndPersist`/
|
|
880
|
+
* `removePersisted`) rather than silently dropped, but was previously
|
|
881
|
+
* rethrown as the RAW adapter error indefinitely — indistinguishable from
|
|
882
|
+
* any other adapter failure, so a caller could not catch it deliberately the
|
|
883
|
+
* way `forget()` catches `_purgeSearchIndex` into `indexResidue` (#764).
|
|
884
|
+
*
|
|
885
|
+
* `cause` is the underlying adapter error. Callers that want stuck-
|
|
886
|
+
* compensation resilience instead of an abort (e.g. `elevate()`/`demote()`,
|
|
887
|
+
* #764) catch this type specifically and surface it as residue.
|
|
888
|
+
*/
|
|
889
|
+
export declare class PersistedIndexCompensationError extends NoydbError {
|
|
890
|
+
readonly cause: unknown;
|
|
891
|
+
constructor(cause: unknown);
|
|
892
|
+
}
|
|
819
893
|
/**
|
|
820
894
|
* Thrown by `.where()` / `.orderBy()` / `.aggregate()` (via the Via
|
|
821
895
|
* pipeline's `postureFor`/`wrapReducers`) when the field is covered by a Via
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lazy-mode `count()` support (#706): count ids whose envelope is LIVE at
|
|
3
|
+
* tier 0 — parity with eager count (the hydrated cache excludes tombstones,
|
|
4
|
+
* delete markers, and elevated records, #701). Envelope inspection only —
|
|
5
|
+
* no record body is ever decrypted here.
|
|
6
|
+
*
|
|
7
|
+
* #713: when the adapter implements the optional `listPage`, page through
|
|
8
|
+
* it and apply the same predicate to each page's envelopes — one
|
|
9
|
+
* round-trip per page instead of one `list()` + one `get()` per id. Stores
|
|
10
|
+
* without `listPage` keep the original N+1 loop.
|
|
11
|
+
*/
|
|
12
|
+
import type { NoydbStore } from './types.js';
|
|
13
|
+
export declare function countLiveEnvelopes(adapter: NoydbStore, vault: string, name: string, storeCiphertext: boolean): Promise<number>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tier visibility helper (#712/#707): a tier-0 code path treats an elevated
|
|
3
|
+
* (_tier > 0) record as invisible. History reads gate on the LIVE record's
|
|
4
|
+
* tier — history snapshots keep their tier-0-wrapped CEKs and carry no _tier
|
|
5
|
+
* of their own, so an elevated record's prior versions would otherwise stay
|
|
6
|
+
* tier-0-decryptable (the read-gate closes the API surface; #712's at-rest
|
|
7
|
+
* arc rewraps the snapshot keys). Envelope inspection only — no decryption.
|
|
8
|
+
*
|
|
9
|
+
* #715/#716: the write ring. Invisibility on the read side is exactly what
|
|
10
|
+
* makes a tier-0 write path treat an elevated record as absent — a put()
|
|
11
|
+
* believes it's a create (demotion) and a delete() writes a marker with no
|
|
12
|
+
* _tier (erasing the elevation signal). `assertTierWritable` closes that by
|
|
13
|
+
* refusing the write outright. Both helpers share a single envelope peek
|
|
14
|
+
* (`peekLiveTier`) — no duplicated `adapter.get` per write.
|
|
15
|
+
*/
|
|
16
|
+
import type { NoydbStore } from './types.js';
|
|
17
|
+
export declare function liveRecordIsElevated(adapter: NoydbStore, vault: string, name: string, id: string): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* The tier a record's LIVE envelope currently carries (0 if untiered or
|
|
20
|
+
* never moved). #724 Task 4: `BlobSet.loadSlots`/`saveSlots` use this to
|
|
21
|
+
* resolve the per-record slot map's collection DEK at the record's current
|
|
22
|
+
* tier by default, so the slot map's physical location follows the record
|
|
23
|
+
* after `rehomeForTier` re-keys it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function liveRecordTier(adapter: NoydbStore, vault: string, name: string, id: string): Promise<number>;
|
|
26
|
+
/**
|
|
27
|
+
* Refuses a tier-0 `put()`/`delete()` targeting an elevated record.
|
|
28
|
+
* No-op when `tiersEnabled` is false (the cost gate — collections that
|
|
29
|
+
* never declare tiers pay nothing). Throws `TierWriteRefusedError` with
|
|
30
|
+
* the record's ACTUAL live tier when elevated — holders included, since
|
|
31
|
+
* `put()`/`delete()` are the tier-0 APIs and `putAtTier`/`elevate`/`demote`
|
|
32
|
+
* are the sanctioned tier-aware paths.
|
|
33
|
+
*/
|
|
34
|
+
export declare function assertTierWritable(adapter: NoydbStore, vault: string, name: string, id: string, tiersEnabled: boolean): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* #708: ALL-OR-NOTHING pre-check for a coordinated-cutover bulk-rewrite —
|
|
37
|
+
* scans every id's live tier BEFORE any record is transformed and refuses
|
|
38
|
+
* on the first elevated one found. `_applyCutoverTransform` re-encrypts at
|
|
39
|
+
* tier 0 with no gate of its own; without this, it would silently demote
|
|
40
|
+
* an elevated record. Same cost gate as `assertTierWritable` (no-op, no
|
|
41
|
+
* adapter call, when `tiersEnabled` is false).
|
|
42
|
+
*
|
|
43
|
+
* This pre-check guards against an ordinary `put()`/`delete()` racing the
|
|
44
|
+
* cutover, because those go through the schema fence (`SchemaFenceController`
|
|
45
|
+
* blocks concurrent writes during a coordinated cutover). It does NOT guard
|
|
46
|
+
* against `elevate()`/`demote()`/`putAtTier()` — those tier-move paths bypass
|
|
47
|
+
* the fence, so a tier move landing between this scan and the rewrite it
|
|
48
|
+
* gates is not excluded. Cutover callers are expected to hold the vault
|
|
49
|
+
* quiescent for tier moves on this collection for the duration of the call,
|
|
50
|
+
* the same tier-quiescence assumption the documented CAS-less caller
|
|
51
|
+
* (`with-shape/satellites/migrate-cek.ts`'s "No-quiesce precondition") makes
|
|
52
|
+
* explicit for concurrent writes generally.
|
|
53
|
+
*/
|
|
54
|
+
export declare function assertCutoverTierSafe(adapter: NoydbStore, vault: string, name: string, tiersEnabled: boolean): Promise<void>;
|
package/dist/kernel/types.d.ts
CHANGED
|
@@ -1854,6 +1854,65 @@ export interface BlobObject {
|
|
|
1854
1854
|
* store (e.g. S3). Absent when no routing is configured.
|
|
1855
1855
|
*/
|
|
1856
1856
|
readonly storeHint?: 'default' | 'blobs';
|
|
1857
|
+
/**
|
|
1858
|
+
* Bounded ring (K=8 — an AUDIT-VISIBLE concurrency bound, not an
|
|
1859
|
+
* implementation detail) of the most recent op-stamp identities applied to
|
|
1860
|
+
* this object's `refCount`. Appended in the SAME CAS write as the
|
|
1861
|
+
* `refCount` change it stamps (`BlobSet`'s `casUpdateRefCountStamped`),
|
|
1862
|
+
* never a separate write — no crash window between the two. Oldest entry
|
|
1863
|
+
* is evicted once the ring exceeds K entries.
|
|
1864
|
+
*
|
|
1865
|
+
* The blob durability journal (#753, spec §7 C2/C4) uses membership here
|
|
1866
|
+
* as its test-and-set: a stamped mutator re-reads this ring on every CAS
|
|
1867
|
+
* attempt (including retries) BEFORE computing its delta — stamp already
|
|
1868
|
+
* present → that mutation already landed → skip re-applying it. This is
|
|
1869
|
+
* what makes a crash-resumed refCount decrement/increment exactly-once
|
|
1870
|
+
* rather than at-least-once.
|
|
1871
|
+
*
|
|
1872
|
+
* Two acceptances, by design — SHRED only (see the #746 whole-branch
|
|
1873
|
+
* review correction below for rehome):
|
|
1874
|
+
* - **Eviction beyond K, for SHRED.** More than 8 distinct in-flight
|
|
1875
|
+
* stamped operations racing the SAME object between reads is far
|
|
1876
|
+
* outside any expected co-ownership fan-out; a 9th racer whose stamp
|
|
1877
|
+
* gets evicted before it re-reads can only double-apply an idempotent
|
|
1878
|
+
* CAS delta — never silently lose one (the DECREMENT delta is bounded
|
|
1879
|
+
* by the marker's authoritative captured `hold.n`, applied as ONE CAS
|
|
1880
|
+
* per eTag — never per-row — so eviction has nothing row-scoped to
|
|
1881
|
+
* re-apply against). Not a data-loss risk for shred, just a documented
|
|
1882
|
+
* concurrency bound.
|
|
1883
|
+
* - **Stale stamps on a retained object.** A `retainedShared` object (one
|
|
1884
|
+
* reference released, others still live) keeps whatever stamp its last
|
|
1885
|
+
* CAS write appended even after that operation's marker is gone —
|
|
1886
|
+
* harmless bookkeeping, not crypto material (unlike `_cek`), that sits
|
|
1887
|
+
* inert until the object's next CAS write evicts or overwrites it.
|
|
1888
|
+
*
|
|
1889
|
+
* **#746 whole-branch review correction — this ring is NOT the sole
|
|
1890
|
+
* idempotency source for REHOME.** Rehome's destination `+1`s are
|
|
1891
|
+
* ROW-SCOPED (`${opId}:${slotName}` / `${opId}:${versionKey}`, one stamp
|
|
1892
|
+
* PER CONTRIBUTING ROW, not one per eTag). Within a SINGLE op this ring is
|
|
1893
|
+
* sufficient — rows are processed sequentially and each row's referencing
|
|
1894
|
+
* update lands before the next row's `+1`, so a row whose stamp is later
|
|
1895
|
+
* evicted is already seen as "moved" (skipped) on resume, never
|
|
1896
|
+
* re-incremented. The genuine over-count is **concurrent independent ops**
|
|
1897
|
+
* (distinct `opId`s) converging on one shared destination: ≥8 of them can
|
|
1898
|
+
* evict a crashed op's row-stamp before it resumes, and a naive ring-only
|
|
1899
|
+
* resume would then double-apply that row's `+1` — a real, silent,
|
|
1900
|
+
* permanent-leak over-count, not merely eviction-tolerant like shred's.
|
|
1901
|
+
* `BlobIntent.appliedStamps` (`blob-intent.ts`) is rehome's ring-INDEPENDENT
|
|
1902
|
+
* backstop: an unbounded, per-op, per-record log of confirmed row-stamps,
|
|
1903
|
+
* consulted BEFORE this ring on every resume (see
|
|
1904
|
+
* `BlobSet.applyStampedIncrement`). This ring stays the fast first-line
|
|
1905
|
+
* check; `appliedStamps` makes correctness independent of ring eviction
|
|
1906
|
+
* **except** in one intrinsic non-atomic window: the destination `+1`/ring
|
|
1907
|
+
* write (A) and the `appliedStamps` append (B) are separate object writes,
|
|
1908
|
+
* A before B (deliberately — B-first could under-count and crypto-shred a
|
|
1909
|
+
* still-referenced object, i.e. data loss, strictly worse than a
|
|
1910
|
+
* retained-too-long leak). A crash BETWEEN A and B followed by ≥8 concurrent
|
|
1911
|
+
* evictions before resume can still over-count. This window is intrinsic
|
|
1912
|
+
* (rehome, unlike shred, cannot pre-capture destinations at mint time) and
|
|
1913
|
+
* fail-safe-directed; it is a documented residual (see the arc changeset).
|
|
1914
|
+
*/
|
|
1915
|
+
readonly lastOps?: readonly string[];
|
|
1857
1916
|
}
|
|
1858
1917
|
/**
|
|
1859
1918
|
* Slot record — mutable metadata linking a named slot on a record
|
|
@@ -1899,6 +1958,20 @@ export interface SlotRecord {
|
|
|
1899
1958
|
readonly uploadedAt: string;
|
|
1900
1959
|
/** User ID of the uploader, if available. */
|
|
1901
1960
|
readonly uploadedBy?: string;
|
|
1961
|
+
/**
|
|
1962
|
+
* Internal rehome-journal bookkeeping (#746 spec §7 review, carried
|
|
1963
|
+
* finding (b)) — NEVER part of the public `list()`/`SlotInfo` contract
|
|
1964
|
+
* (`BlobSet.list()` filters it out explicitly). Set, in the SAME CAS
|
|
1965
|
+
* write that points this slot at its new (rehomed) eTag, to the OLD eTag
|
|
1966
|
+
* still awaiting its refCount release: `putUnderDEK`'s slot-CAS and its
|
|
1967
|
+
* old-eTag release are two separate writes, and a crash between them
|
|
1968
|
+
* would otherwise lose the only record of which object still needs
|
|
1969
|
+
* releasing (the slot map itself has already moved past it) — a
|
|
1970
|
+
* permanent stranded-refcount leak. Cleared once the release lands.
|
|
1971
|
+
* Only ever set under a marker-governed (stamped) rehome; absent on
|
|
1972
|
+
* every ordinary `put()`.
|
|
1973
|
+
*/
|
|
1974
|
+
readonly pendingRelease?: string;
|
|
1902
1975
|
}
|
|
1903
1976
|
/** Result of `BlobSet.list()` — slot record plus its named slot key. */
|
|
1904
1977
|
export interface SlotInfo extends SlotRecord {
|
package/dist/kernel/vault.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ import type { IndexStrategy } from '../with-lookup/indexing/strategy.js';
|
|
|
28
28
|
import type { LazyStrategy } from '../port/with/lazy-strategy.js';
|
|
29
29
|
import type { AggregateStrategy } from '../with-lookup/aggregate/strategy.js';
|
|
30
30
|
import type { CrdtStrategy } from './types.js';
|
|
31
|
-
import type { TiersStrategy } from '../with-audit/tiers/strategy.js';
|
|
31
|
+
import type { TiersStrategy, TierMoveResult } from '../with-audit/tiers/strategy.js';
|
|
32
32
|
import type { SearchStrategy } from '../with-lookup/search/strategy.js';
|
|
33
33
|
import { type CargoStrategy } from '../with-cargo/strategy.js';
|
|
34
34
|
import { type BrokerStrategy, type CredentialBrokerHandle } from '../port/with/broker-strategy.js';
|
|
@@ -465,6 +465,7 @@ export declare class Vault {
|
|
|
465
465
|
* when `vault.compact()` runs.
|
|
466
466
|
*/
|
|
467
467
|
blobFields?: BlobFieldsConfig<T>;
|
|
468
|
+
blobTierPolicy?: 'isolate' | 'dedup';
|
|
468
469
|
/** — declarative record archival policy: `{ archiveWhen, legalHold? }`. Evaluated when `vault.archive()` runs. */
|
|
469
470
|
archive?: ArchivePolicy<T>;
|
|
470
471
|
/** — declared tiers for this collection. */
|
|
@@ -1155,13 +1156,15 @@ export declare class Vault {
|
|
|
1155
1156
|
/**
|
|
1156
1157
|
* Manual re-materialize for a single registered MV (`refresh: 'manual'` consumers,
|
|
1157
1158
|
* stale-bit recovery on vault reopen, bulk-recompute escape hatch after a strategy
|
|
1158
|
-
* change). Returns `{ written, deleted, failed }` (`deleted`
|
|
1159
|
-
* tombstoning). Throws if
|
|
1159
|
+
* change). Returns `{ written, deleted, failed, residueUndecodable, residueDeclined }` (`deleted`
|
|
1160
|
+
* always 0 without tombstoning; #785 splits the #782 leftovers — undecodable vs #718-declined). Throws if not registered.
|
|
1160
1161
|
*/
|
|
1161
1162
|
refreshView(name: string): Promise<{
|
|
1162
1163
|
written: number;
|
|
1163
1164
|
deleted: number;
|
|
1164
1165
|
failed: number;
|
|
1166
|
+
residueUndecodable: string[];
|
|
1167
|
+
residueDeclined: string[];
|
|
1165
1168
|
}>;
|
|
1166
1169
|
/**
|
|
1167
1170
|
* Re-derive every record in the named source collection (useful after a strategy
|
|
@@ -1340,9 +1343,9 @@ export declare class Vault {
|
|
|
1340
1343
|
* Internal — invoked by an `ElevatedHandle.collection().put()` call.
|
|
1341
1344
|
* Routes through the existing `Collection.putAtTier` code path with
|
|
1342
1345
|
* the elevation context attached so the cross-tier event reflects
|
|
1343
|
-
* the right authorization class.
|
|
1346
|
+
* the right authorization class. Returns `putAtTier`'s `TierMoveResult` (#779).
|
|
1344
1347
|
*/
|
|
1345
|
-
_elevatedPut<T>(collectionName: string, id: string, record: T, tier: number, reason: string): Promise<
|
|
1348
|
+
_elevatedPut<T>(collectionName: string, id: string, record: T, tier: number, reason: string): Promise<TierMoveResult>;
|
|
1346
1349
|
private writeElevationAudit;
|
|
1347
1350
|
/**
|
|
1348
1351
|
* low-level escape hatch used by `@noy-db/on-magic-link`
|