@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
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ATTESTATIONS_COLLECTION,
|
|
3
3
|
loadOrCreateSigner
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EXK7QRWF.js";
|
|
5
5
|
import {
|
|
6
6
|
generateULID
|
|
7
7
|
} from "./chunk-ZJADGNYF.js";
|
|
8
8
|
import {
|
|
9
9
|
encrypt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CIE2BASH.js";
|
|
11
11
|
import {
|
|
12
12
|
NOYDB_FORMAT_VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JNAI2HN2.js";
|
|
14
14
|
import {
|
|
15
15
|
AttestationError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BIOUI4HL.js";
|
|
17
17
|
|
|
18
18
|
// src/with-audit/attestation/issue.ts
|
|
19
19
|
import {
|
|
@@ -56,4 +56,4 @@ async function issueAttestationCore(ctx, args) {
|
|
|
56
56
|
export {
|
|
57
57
|
issueAttestationCore
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
59
|
+
//# sourceMappingURL=chunk-GTGPO5KW.js.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
base64ToBuffer,
|
|
3
3
|
decryptBytesWithAAD,
|
|
4
4
|
encryptBytesWithAAD
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CIE2BASH.js";
|
|
6
6
|
import {
|
|
7
7
|
TamperedError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BIOUI4HL.js";
|
|
9
9
|
|
|
10
10
|
// src/kernel/enclave/classify/compare.ts
|
|
11
11
|
var subtle = globalThis.crypto.subtle;
|
|
@@ -92,4 +92,4 @@ export {
|
|
|
92
92
|
openVdigPayload,
|
|
93
93
|
evaluateKofN
|
|
94
94
|
};
|
|
95
|
-
//# sourceMappingURL=chunk-
|
|
95
|
+
//# sourceMappingURL=chunk-HB3RFQSC.js.map
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
isDeleteMarker,
|
|
6
6
|
isTombstoneShape
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7DSTRQIJ.js";
|
|
8
8
|
import {
|
|
9
9
|
bufferToBase64,
|
|
10
10
|
decrypt,
|
|
11
11
|
derivePresenceKey,
|
|
12
12
|
encrypt,
|
|
13
13
|
generateIV
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CIE2BASH.js";
|
|
15
15
|
import {
|
|
16
16
|
NOYDB_SYNC_VERSION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JNAI2HN2.js";
|
|
18
18
|
import {
|
|
19
19
|
ConflictError
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BIOUI4HL.js";
|
|
21
21
|
|
|
22
22
|
// src/with-party/team/presence.ts
|
|
23
23
|
var PresenceHandle = class {
|
|
@@ -954,4 +954,4 @@ export {
|
|
|
954
954
|
SyncEngine,
|
|
955
955
|
SyncTransaction
|
|
956
956
|
};
|
|
957
|
-
//# sourceMappingURL=chunk-
|
|
957
|
+
//# sourceMappingURL=chunk-HDMEGAQE.js.map
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RecordCodec
|
|
3
|
+
} from "./chunk-XDYREZWE.js";
|
|
4
|
+
|
|
5
|
+
// src/with-formula/materialized-views/stale.ts
|
|
6
|
+
var _staleByRegistry = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
function markMVStale(registry, mvName) {
|
|
8
|
+
let set = _staleByRegistry.get(registry);
|
|
9
|
+
if (!set) {
|
|
10
|
+
set = /* @__PURE__ */ new Set();
|
|
11
|
+
_staleByRegistry.set(registry, set);
|
|
12
|
+
}
|
|
13
|
+
set.add(mvName);
|
|
14
|
+
}
|
|
15
|
+
function isMVStale(registry, mvName) {
|
|
16
|
+
return _staleByRegistry.get(registry)?.has(mvName) ?? false;
|
|
17
|
+
}
|
|
18
|
+
var MV_STALE_COLLECTION = "_mv_stale";
|
|
19
|
+
var _hydratedByRegistry = /* @__PURE__ */ new WeakMap();
|
|
20
|
+
function storeOf(accessor, collectionName) {
|
|
21
|
+
const c = accessor.getCollection(collectionName);
|
|
22
|
+
return { adapter: c.adapter, vault: c.vault };
|
|
23
|
+
}
|
|
24
|
+
async function writeMVStaleMarker(adapter, vault, mvName) {
|
|
25
|
+
const env = RecordCodec.buildPlaintextEnvelope({ version: 1, data: "{}" });
|
|
26
|
+
await adapter.put(vault, MV_STALE_COLLECTION, mvName, env);
|
|
27
|
+
}
|
|
28
|
+
async function deleteMVStaleMarker(adapter, vault, mvName) {
|
|
29
|
+
await adapter.delete(vault, MV_STALE_COLLECTION, mvName);
|
|
30
|
+
}
|
|
31
|
+
async function hydratePersistedStaleMarkers(accessor, registry) {
|
|
32
|
+
const mvs = registry.all();
|
|
33
|
+
if (mvs.length === 0) return;
|
|
34
|
+
const { adapter, vault } = storeOf(accessor, mvs[0].outputCollection);
|
|
35
|
+
for (const name of await adapter.list(vault, MV_STALE_COLLECTION)) markMVStale(registry, name);
|
|
36
|
+
}
|
|
37
|
+
async function invalidateMVAtRest(accessor, reg, mode) {
|
|
38
|
+
const outputColl = accessor.getCollection(reg.outputCollection);
|
|
39
|
+
const txCtx = accessor.getActiveTxContext();
|
|
40
|
+
const { adapter, vault } = storeOf(accessor, reg.outputCollection);
|
|
41
|
+
let deleted = 0;
|
|
42
|
+
const residueUndecodable = [];
|
|
43
|
+
const residueDeclined = [];
|
|
44
|
+
for (const id of await adapter.list(vault, reg.outputCollection)) {
|
|
45
|
+
const envelope = await adapter.get(vault, reg.outputCollection, id);
|
|
46
|
+
if (envelope === null) continue;
|
|
47
|
+
const decoded = await outputColl._decodeEnvelope(envelope, id);
|
|
48
|
+
if (decoded === null) {
|
|
49
|
+
residueUndecodable.push(id);
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const stampedBy = decoded._materializedFrom;
|
|
53
|
+
if (stampedBy?.mvName !== reg.spec.name) continue;
|
|
54
|
+
if (await outputColl._internalDelete(id, txCtx)) {
|
|
55
|
+
deleted++;
|
|
56
|
+
} else {
|
|
57
|
+
residueDeclined.push(id);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (mode === "lazy") {
|
|
61
|
+
const registry = accessor.registry();
|
|
62
|
+
markMVStale(registry, reg.spec.name);
|
|
63
|
+
await writeMVStaleMarker(adapter, vault, reg.spec.name);
|
|
64
|
+
}
|
|
65
|
+
return { deleted, residueUndecodable, residueDeclined };
|
|
66
|
+
}
|
|
67
|
+
async function resolveStaleMVOnRead(accessor, outputCollection, dispatchCtx) {
|
|
68
|
+
const registry = accessor.registry();
|
|
69
|
+
let hydrate = _hydratedByRegistry.get(registry);
|
|
70
|
+
if (!hydrate) {
|
|
71
|
+
hydrate = hydratePersistedStaleMarkers(accessor, registry).catch((err) => {
|
|
72
|
+
_hydratedByRegistry.delete(registry);
|
|
73
|
+
throw err;
|
|
74
|
+
});
|
|
75
|
+
_hydratedByRegistry.set(registry, hydrate);
|
|
76
|
+
}
|
|
77
|
+
await hydrate;
|
|
78
|
+
const pending = _staleByRegistry.get(registry);
|
|
79
|
+
if (!pending || pending.size === 0) return;
|
|
80
|
+
const { adapter, vault } = storeOf(accessor, outputCollection);
|
|
81
|
+
for (const name of pending) {
|
|
82
|
+
if (registry.byName(name)) continue;
|
|
83
|
+
pending.delete(name);
|
|
84
|
+
await deleteMVStaleMarker(adapter, vault, name);
|
|
85
|
+
}
|
|
86
|
+
if (pending.size === 0) return;
|
|
87
|
+
const candidates = [];
|
|
88
|
+
for (const mv of registry.all()) {
|
|
89
|
+
if (mv.outputCollection !== outputCollection) continue;
|
|
90
|
+
if (!pending.has(mv.spec.name)) continue;
|
|
91
|
+
candidates.push(mv.spec.name);
|
|
92
|
+
}
|
|
93
|
+
if (candidates.length === 0) return;
|
|
94
|
+
let executor = null;
|
|
95
|
+
for (const name of candidates) {
|
|
96
|
+
const reg = registry.byName(name);
|
|
97
|
+
if (!reg) {
|
|
98
|
+
pending.delete(name);
|
|
99
|
+
await deleteMVStaleMarker(adapter, vault, name);
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (executor === null) {
|
|
103
|
+
({ MaterializedViewExecutor: executor } = await import("./executor-UNEH5ZYH.js"));
|
|
104
|
+
}
|
|
105
|
+
for (const dep of reg.dependencies) {
|
|
106
|
+
await accessor.getCollection(dep).ensureHydrated();
|
|
107
|
+
}
|
|
108
|
+
await executor.refresh(reg, {
|
|
109
|
+
getCollection: (n) => accessor.getCollection(n),
|
|
110
|
+
getActiveTxContext: () => accessor.getActiveTxContext(),
|
|
111
|
+
getQueryContext: () => accessor.getQueryContext(),
|
|
112
|
+
...dispatchCtx !== void 0 ? { dispatchCtx } : {}
|
|
113
|
+
});
|
|
114
|
+
pending.delete(name);
|
|
115
|
+
await deleteMVStaleMarker(adapter, vault, name);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function clearMVStale(registry, mvName) {
|
|
119
|
+
_staleByRegistry.get(registry)?.delete(mvName);
|
|
120
|
+
}
|
|
121
|
+
async function clearMVStaleFully(adapter, vault, registry, mvName) {
|
|
122
|
+
clearMVStale(registry, mvName);
|
|
123
|
+
await deleteMVStaleMarker(adapter, vault, mvName);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export {
|
|
127
|
+
markMVStale,
|
|
128
|
+
isMVStale,
|
|
129
|
+
MV_STALE_COLLECTION,
|
|
130
|
+
invalidateMVAtRest,
|
|
131
|
+
resolveStaleMVOnRead,
|
|
132
|
+
clearMVStale,
|
|
133
|
+
clearMVStaleFully
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=chunk-HDQIIUPH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-formula/materialized-views/stale.ts"],"sourcesContent":["import type { Collection } from '../../kernel/collection.js'\nimport type { TxContext } from '../../with-commit/tx/transaction.js'\nimport type { PutDerivedOutputCtx } from '../../kernel/via/dispatch.js'\nimport type { MaterializedViewRegistry, RegisteredMV } from './registry.js'\n// Type-only — runtime class loaded via dynamic import in\n// `resolveStaleMVOnRead` only when a stale flag actually fires.\n// Keeps the executor chunk out of the floor bundle (mirrors v1 floor-bundle isolation).\nimport type { MaterializedViewExecutor as MVExecutorType } from './executor.js'\nimport type { MVQueryContext } from './types.js'\nimport type { NoydbStore } from '../../kernel/types.js'\nimport { RecordCodec } from '../../kernel/enclave/index.js'\n\n/**\n * Accessor shape passed in from the owning Vault. Provides the\n * registry (used as a stable WeakMap key + to look up MVs by output\n * collection) and the runtime context the lazy refresh needs.\n * Mirrors v1's `DerivationStaleAccessor`.\n */\nexport interface MVStaleAccessor {\n registry(): MaterializedViewRegistry\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getCollection(name: string): Collection<any>\n getActiveTxContext(): TxContext | null\n getQueryContext(): MVQueryContext\n}\n\n/**\n * In-memory stale map keyed by `MaterializedViewRegistry` instance\n * (stable per vault). Each registry maps to a set of MV names that\n * have at least one pending source-change requiring a re-materialize.\n *\n * Persistence across vault close is NOT implemented in this iteration\n * (concern flagged in the v2 spec, mirrors v1 derivation behavior).\n * On vault re-open, the unset stale flag is interpreted as \"fresh\" —\n * `vault.refreshView(name)` is the explicit recompute escape hatch.\n *\n * @internal\n */\nconst _staleByRegistry = new WeakMap<MaterializedViewRegistry, Set<string>>()\n\n/**\n * Mark an MV as stale. Called from `Collection.dispatchMaterializedViews`\n * when a source-write fires for a `refresh: 'lazy'` MV.\n *\n * @internal\n */\nexport function markMVStale(registry: MaterializedViewRegistry, mvName: string): void {\n let set = _staleByRegistry.get(registry)\n if (!set) {\n set = new Set()\n _staleByRegistry.set(registry, set)\n }\n set.add(mvName)\n}\n\n/**\n * Test-only: check whether a given MV name is currently flagged stale\n * against a registry. Exported so the regression suite can pin the\n * stale-bit lifecycle without touching the internal `WeakMap`.\n *\n * @internal\n */\nexport function isMVStale(registry: MaterializedViewRegistry, mvName: string): boolean {\n return _staleByRegistry.get(registry)?.has(mvName) ?? false\n}\n\n/**\n * Reserved collection holding CONTENT-FREE lazy-stale markers (record id =\n * MV name, plaintext `_iv: ''` envelope, no payload) — mirrors the\n * `_meta`/schema-fence marker envelope shape. Written only from the\n * delete/forget/elevate dispatcher (#736); ordinary source writes stay\n * in-memory-only (the cheap path). Read via the adapter directly, never\n * through `vault.collection()` — same reserved-collection convention as\n * `_subject_index`/`_meta`.\n */\nexport const MV_STALE_COLLECTION = '_mv_stale'\n\n/**\n * Once-per-registry hydrate guard for `resolveStaleMVOnRead`'s persisted-marker fold-in.\n * Stores the in-flight/settled PROMISE (not a boolean) — a concurrent cold first read that\n * arrives while the hydrate is still awaiting `adapter.list` must await the SAME promise\n * rather than observing \"already hydrating\" and reading an empty pending set (#736\n * whole-branch review).\n */\nconst _hydratedByRegistry = new WeakMap<MaterializedViewRegistry, Promise<void>>()\n\n/** The adapter + vault name backing any collection in this vault (all collections share both). */\nfunction storeOf(accessor: MVStaleAccessor, collectionName: string): { adapter: NoydbStore; vault: string } {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const c = accessor.getCollection(collectionName) as any\n return { adapter: c.adapter as NoydbStore, vault: c.vault as string }\n}\n\nasync function writeMVStaleMarker(adapter: NoydbStore, vault: string, mvName: string): Promise<void> {\n // Content-free — the marker's only payload is its key (the MV name).\n const env = RecordCodec.buildPlaintextEnvelope({ version: 1, data: '{}' })\n await adapter.put(vault, MV_STALE_COLLECTION, mvName, env)\n}\n\nasync function deleteMVStaleMarker(adapter: NoydbStore, vault: string, mvName: string): Promise<void> {\n await adapter.delete(vault, MV_STALE_COLLECTION, mvName)\n}\n\n/**\n * On first `resolveStaleMVOnRead` call for a (cold-reopened) registry, fold every\n * persisted `_mv_stale` marker into the in-memory pending set — otherwise a cold\n * session's empty `WeakMap` entry reads as \"fresh\" and serves the emptied output\n * collection forever.\n */\nasync function hydratePersistedStaleMarkers(accessor: MVStaleAccessor, registry: MaterializedViewRegistry): Promise<void> {\n const mvs = registry.all()\n if (mvs.length === 0) return\n const { adapter, vault } = storeOf(accessor, mvs[0]!.outputCollection)\n // No try/catch: a genuine store failure here must surface, not be read as\n // \"nothing pending\" — silently treating it as fresh is the exact leak class\n // this module closes (mirrors `subject-index.ts`'s bare `adapter.list` reads).\n for (const name of await adapter.list(vault, MV_STALE_COLLECTION)) markMVStale(registry, name)\n}\n\n/**\n * Invalidate an MV from the delete/forget/elevate dispatcher (#736) — the ordinary\n * source-write path (`dispatchMaterializedViews`) never calls this. Deletes EVERY\n * persisted row in `reg.outputCollection` via `_internalDelete` (the at-rest law: a\n * stale mark alone leaves the elevated/forgotten source's plaintext sitting in the\n * output row) using the adapter directly so the read-path's `resolveStaleMVOnRead`\n * isn't triggered mid-invalidation. `mode: 'lazy'` also persists the stale mark so a\n * cold session recomputes on next read; `'manual'` gets the purge only — the MV\n * serves empty until an explicit `vault.refreshView()` (erasure wins). Deletion is\n * stamp-scoped (`_materializedFrom.mvName === reg.spec.name` — see the loop below),\n * so another registered MV sharing this output collection keeps its own rows intact:\n * no cross-MV re-marking is needed here, only `reg` itself is marked stale.\n *\n * Returns the count of rows actually `_internalDelete`d (#761 item 1) — folded by the\n * caller into `dispatchMaterializedViewsOnDelete`'s `deleted` so `ForgetResult.derivedRecordsErased`\n * counts lazy/manual purges too, not just the eager executor's tombstone leg — plus\n * `residueUndecodable`, the bare ids whose ownership stamp could NOT be decoded (#776): a\n * candidate row that fails to decode under the collection's default DEK (e.g. elevated above\n * tier 0 on a tiered output collection) has UNKNOWN ownership — it might be this MV's own\n * output, or (same-collection shape) a plain user record — so it is never erased, but it must\n * be SURFACED rather than silently skipped (the #724 posture), since it may still hold the\n * forgotten/pre-elevation contribution, decryptable by tier-holders — and `residueDeclined`\n * (#785), the bare ids that DID decode and stamp-match but whose `_internalDelete` declined\n * (ownership CONFIRMED, erasure declined).\n *\n * @internal\n */\nexport async function invalidateMVAtRest(\n accessor: MVStaleAccessor,\n reg: RegisteredMV,\n mode: 'lazy' | 'manual',\n): Promise<{ deleted: number; residueUndecodable: string[]; residueDeclined: string[] }> {\n const outputColl = accessor.getCollection(reg.outputCollection)\n const txCtx = accessor.getActiveTxContext()\n const { adapter, vault } = storeOf(accessor, reg.outputCollection)\n let deleted = 0\n const residueUndecodable: string[] = []\n const residueDeclined: string[] = []\n for (const id of await adapter.list(vault, reg.outputCollection)) {\n // A same-collection partition MV (`output: { collection: <source>, partition }`,\n // the DERIV-PP30-001 shape) writes INTO its own source collection — `adapter.list`\n // over `reg.outputCollection` then also returns untouched user source records.\n // Decode each candidate row (the invalidation path is rare; this cost is fine\n // here) and only erase rows THIS MV stamped via `_materializedFrom.mvName` —\n // an unstamped row, or one stamped by a different MV, is never this MV's to\n // delete (#736 whole-branch review, Critical).\n const envelope = await adapter.get(vault, reg.outputCollection, id)\n if (envelope === null) continue\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const decoded = await (outputColl as any)._decodeEnvelope(envelope, id)\n if (decoded === null) { residueUndecodable.push(id); continue } // #776 — ownership unknown, surfaced not skipped\n const stampedBy = (decoded as Record<string, unknown>)._materializedFrom as { mvName?: string } | undefined\n if (stampedBy?.mvName !== reg.spec.name) continue\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (await (outputColl as any)._internalDelete(id, txCtx)) {\n deleted++\n } else {\n // #782 part b — decoded AND stamp-owned, but erasure declined (#718 tier-elevation\n // gate). Ownership IS confirmed — a real silent survival, not a legit stamp-mismatch\n // skip. Surface it too, in its own channel (#785 — distinct from the decode-null case).\n residueDeclined.push(id)\n }\n }\n\n // `mode: 'manual'` gets the purge only (erasure wins, no auto-recompute promise);\n // `'lazy'` also marks + persists ITS OWN stale bit for cold-session recompute. No\n // sibling MV on the same output collection is touched here — the stamp-scoped\n // deletion above never erased sibling rows in the first place (#736 re-review).\n if (mode === 'lazy') {\n const registry = accessor.registry()\n markMVStale(registry, reg.spec.name)\n await writeMVStaleMarker(adapter, vault, reg.spec.name)\n }\n return { deleted, residueUndecodable, residueDeclined }\n}\n\n/**\n * Called from `Collection.get` (and any reader that materializes the\n * MV's output collection). If any MV producing `outputCollection` is\n * flagged stale, runs the executor against the live source state\n * before returning. No-op when there is no pending work — keeps the\n * read fast path negligible.\n *\n * `dispatchCtx` (#641): threaded from the calling `Collection`'s\n * `#dispatchCtx({ collection: outputCollection, id: 'resolve-on-read' })` — a read has no\n * real \"reacting write\" record, so `'resolve-on-read'` is the sentinel id, mirroring\n * `Vault.refreshView()`'s `'refreshView'` sentinel for the same reason. Passed straight\n * through to the executor so a stale row whose output lands in a closed period follows the\n * frozen-output rule (skip + `derivation:skipped-frozen`, #637) instead of throwing\n * `PeriodClosedError` out of a read.\n *\n * Dynamic-imports the executor only when a stale flag actually fires\n * (the floor-bundle isolation pattern v1 derivations established in\n * floor-bundle isolation pattern).\n */\nexport async function resolveStaleMVOnRead(\n accessor: MVStaleAccessor,\n outputCollection: string,\n dispatchCtx?: PutDerivedOutputCtx,\n): Promise<void> {\n const registry = accessor.registry()\n // Cold session: the in-memory WeakMap has no entry for this (freshly\n // constructed) registry yet — fold any persisted `_mv_stale` markers in\n // before reading the pending set, once per registry (#736). Memoize the\n // PROMISE, not a boolean: a concurrent first read arriving while the\n // hydrate is still awaiting `adapter.list` must await the SAME promise —\n // otherwise it observes \"already hydrating\", skips straight to an empty\n // pending set, and serves the purged/stale view as fresh (#736\n // whole-branch review, hydrate-once race). On rejection, evict the entry\n // BEFORE rethrowing — a cached rejected promise would otherwise poison the\n // MV read surface for the rest of the session (every later read re-awaits\n // the same rejection instead of retrying the store call) (#736 re-review).\n let hydrate = _hydratedByRegistry.get(registry)\n if (!hydrate) {\n hydrate = hydratePersistedStaleMarkers(accessor, registry).catch((err: unknown) => {\n _hydratedByRegistry.delete(registry)\n throw err\n })\n _hydratedByRegistry.set(registry, hydrate)\n }\n await hydrate\n const pending = _staleByRegistry.get(registry)\n if (!pending || pending.size === 0) return\n\n const { adapter, vault } = storeOf(accessor, outputCollection)\n\n // Clean up persisted markers for MV names no longer registered (renamed or\n // removed since the marker was written). Without this sweep an orphaned name\n // can never become a `candidate` below — `candidates` is built from\n // `registry.all()`, which no longer lists it — so both the in-memory pending\n // entry and the persisted `_mv_stale` row would linger forever, re-hydrating\n // on every cold session (#736 whole-branch review).\n for (const name of pending) {\n if (registry.byName(name)) continue\n pending.delete(name)\n await deleteMVStaleMarker(adapter, vault, name)\n }\n if (pending.size === 0) return\n\n // Find every MV that writes to this output collection AND is\n // currently flagged stale. Multiple MVs CAN share an output\n // collection in theory; in practice the registration validation +\n // cycle detection make this unusual.\n const candidates: string[] = []\n for (const mv of registry.all()) {\n if (mv.outputCollection !== outputCollection) continue\n if (!pending.has(mv.spec.name)) continue\n candidates.push(mv.spec.name)\n }\n if (candidates.length === 0) return\n\n let executor: typeof MVExecutorType | null = null\n for (const name of candidates) {\n const reg = registry.byName(name)\n if (!reg) {\n // Unreachable in practice — `candidates` is drawn from `registry.all()`,\n // and the orphan sweep above already cleared any name absent from it.\n // Kept as a defensive fallback; also clears the persisted marker so it\n // can't linger if this ever does fire.\n pending.delete(name)\n await deleteMVStaleMarker(adapter, vault, name)\n continue\n }\n if (executor === null) {\n ({ MaterializedViewExecutor: executor } = (await import('./executor.js')) as {\n MaterializedViewExecutor: typeof MVExecutorType\n })\n }\n // A cold-hydrated stale flag (unlike an in-session one) can fire with\n // NONE of the MV's dependency collections touched yet this session —\n // the sync `Query.toArray()` `spec.query()` runs reads straight off\n // `Collection`'s in-memory cache, populated only by a prior async\n // touch (`ensureHydrated()`, called from `get`/`list`/`put`, never\n // from `query()` itself). Warm every dependency first so the recompute\n // sees the live persisted state instead of an empty cache (#736).\n for (const dep of reg.dependencies) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n await (accessor.getCollection(dep) as any).ensureHydrated()\n }\n await executor.refresh(reg, {\n getCollection: (n) => accessor.getCollection(n),\n getActiveTxContext: () => accessor.getActiveTxContext(),\n getQueryContext: () => accessor.getQueryContext(),\n ...(dispatchCtx !== undefined ? { dispatchCtx } : {}),\n })\n pending.delete(name)\n // Runs even when no marker was ever persisted for this name (an in-session-only\n // stale bit — e.g. the cheap ordinary-write path never writes one, see the\n // \"cheap-path guarantee\" test). `adapter.delete` on an absent key is a harmless\n // void — keeping this unconditional avoids branching on marker origin here.\n await deleteMVStaleMarker(adapter, vault, name)\n }\n}\n\n/**\n * Drop every stale flag for a registry. Used after a manual\n * `vault.refreshView(name)` runs the executor explicitly — the\n * post-refresh state matches the registered strategies, so\n * lingering stale bits would force a redundant refresh on the next\n * read.\n *\n * @internal\n */\nexport function clearMVStale(registry: MaterializedViewRegistry, mvName: string): void {\n _staleByRegistry.get(registry)?.delete(mvName)\n}\n\n/**\n * `clearMVStale` plus the persisted marker (#736) — `Vault.refreshView()`'s\n * completion path. A lingering persisted marker after a manual refresh would\n * make the NEXT cold session recompute redundantly.\n *\n * @internal\n */\nexport async function clearMVStaleFully(\n adapter: NoydbStore,\n vault: string,\n registry: MaterializedViewRegistry,\n mvName: string,\n): Promise<void> {\n clearMVStale(registry, mvName)\n await deleteMVStaleMarker(adapter, vault, mvName)\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DerivationCycleError,
|
|
3
3
|
MaterializedViewCycleError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BIOUI4HL.js";
|
|
5
5
|
|
|
6
6
|
// src/kernel/via/graph.ts
|
|
7
7
|
var DEFAULT_POSTURE = { encryptedAtRest: "envelope", queryable: "full", exportable: true, forgettable: false };
|
|
@@ -341,4 +341,4 @@ export {
|
|
|
341
341
|
DEFAULT_POSTURE,
|
|
342
342
|
ViaGraph
|
|
343
343
|
};
|
|
344
|
-
//# sourceMappingURL=chunk-
|
|
344
|
+
//# sourceMappingURL=chunk-HTJQYHZP.js.map
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
grant,
|
|
5
5
|
revoke,
|
|
6
6
|
rotateKeys
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-J2ZX2XUV.js";
|
|
8
8
|
import {
|
|
9
9
|
openEnvelopeJson
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XDYREZWE.js";
|
|
11
11
|
import {
|
|
12
12
|
encrypt
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CIE2BASH.js";
|
|
14
14
|
import {
|
|
15
15
|
NOYDB_FORMAT_VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JNAI2HN2.js";
|
|
17
17
|
import {
|
|
18
18
|
PermissionDeniedError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BIOUI4HL.js";
|
|
20
20
|
|
|
21
21
|
// src/with-party/team/active.ts
|
|
22
22
|
function withTeam() {
|
|
@@ -96,4 +96,4 @@ export {
|
|
|
96
96
|
listCredentials,
|
|
97
97
|
credentialStatus
|
|
98
98
|
};
|
|
99
|
-
//# sourceMappingURL=chunk-
|
|
99
|
+
//# sourceMappingURL=chunk-I6GALP6E.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
linkCollectionName,
|
|
3
3
|
linkRowKey
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JZUV47FZ.js";
|
|
5
5
|
import {
|
|
6
6
|
openEnvelopeJson
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XDYREZWE.js";
|
|
8
8
|
import {
|
|
9
9
|
encrypt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CIE2BASH.js";
|
|
11
11
|
import {
|
|
12
12
|
NOYDB_FORMAT_VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JNAI2HN2.js";
|
|
14
14
|
import {
|
|
15
15
|
NoydbError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BIOUI4HL.js";
|
|
17
17
|
|
|
18
18
|
// src/with-shape/links/link-set.ts
|
|
19
19
|
var LinkSet = class {
|
|
@@ -127,4 +127,4 @@ export {
|
|
|
127
127
|
LinkSet,
|
|
128
128
|
LinkEndpointError
|
|
129
129
|
};
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-IL6POWCW.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildAccessibleBundle,
|
|
3
3
|
resolveAccessibleCollections
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-F64IRYG3.js";
|
|
5
5
|
import {
|
|
6
6
|
sha256Hex
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CIE2BASH.js";
|
|
8
8
|
import {
|
|
9
9
|
NOYDB_FORMAT_VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JNAI2HN2.js";
|
|
11
11
|
import {
|
|
12
12
|
ReadOnlyError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BIOUI4HL.js";
|
|
14
14
|
|
|
15
15
|
// src/with-audit/portability/withdraw-accessible.ts
|
|
16
16
|
var FROZEN_SNAPSHOTS_COLLECTION = "_frozen_snapshots";
|
|
@@ -114,4 +114,4 @@ export {
|
|
|
114
114
|
freezeAndDeleteClosure,
|
|
115
115
|
withdrawAccessibleData
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=chunk-
|
|
117
|
+
//# sourceMappingURL=chunk-IU6SNYX6.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
readDirectoryConfig,
|
|
6
6
|
readUserVisibility,
|
|
7
7
|
saveUserEnvelope
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4JBYV75E.js";
|
|
9
9
|
import {
|
|
10
10
|
base64ToBuffer,
|
|
11
11
|
bufferToBase64,
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
generateSalt,
|
|
17
17
|
unwrapKey,
|
|
18
18
|
wrapKey
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CIE2BASH.js";
|
|
20
20
|
import {
|
|
21
21
|
NOYDB_FORMAT_VERSION,
|
|
22
22
|
NOYDB_KEYRING_VERSION
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JNAI2HN2.js";
|
|
24
24
|
import {
|
|
25
25
|
DirectoryDisabledError,
|
|
26
26
|
InvalidKeyError,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
PrivilegeEscalationError,
|
|
33
33
|
USER_ENVELOPE_COLLECTION,
|
|
34
34
|
ValidationError
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-BIOUI4HL.js";
|
|
36
36
|
|
|
37
37
|
// src/kernel/validation.ts
|
|
38
38
|
var WeakPassphraseError = class extends NoydbError {
|
|
@@ -775,4 +775,4 @@ export {
|
|
|
775
775
|
hasImportCapability,
|
|
776
776
|
evaluateImportCapability
|
|
777
777
|
};
|
|
778
|
-
//# sourceMappingURL=chunk-
|
|
778
|
+
//# sourceMappingURL=chunk-J2ZX2XUV.js.map
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SCHEMAS_COLLECTION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VZRODIM3.js";
|
|
4
4
|
import {
|
|
5
5
|
BLOB_CHUNKS_COLLECTION,
|
|
6
6
|
BLOB_COLLECTION,
|
|
7
7
|
BLOB_INDEX_COLLECTION,
|
|
8
|
+
BLOB_INTENT_COLLECTION,
|
|
8
9
|
BLOB_SLOTS_PREFIX,
|
|
9
10
|
BLOB_VERSIONS_PREFIX
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SNZ6URZZ.js";
|
|
11
12
|
import {
|
|
12
13
|
assembleBundleContainer,
|
|
13
14
|
buildExtractedPartitionWrapper
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FHS2HQSH.js";
|
|
15
16
|
import {
|
|
16
17
|
generateULID
|
|
17
18
|
} from "./chunk-ZJADGNYF.js";
|
|
@@ -22,10 +23,11 @@ import {
|
|
|
22
23
|
canonicalJson,
|
|
23
24
|
envelopePayloadHash,
|
|
24
25
|
hashEntry
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-Q5VNKNE5.js";
|
|
26
27
|
import {
|
|
27
|
-
openEnvelopeJson
|
|
28
|
-
|
|
28
|
+
openEnvelopeJson,
|
|
29
|
+
writeEnvelopeBody
|
|
30
|
+
} from "./chunk-XDYREZWE.js";
|
|
29
31
|
import {
|
|
30
32
|
bufferToBase64,
|
|
31
33
|
decrypt,
|
|
@@ -35,14 +37,14 @@ import {
|
|
|
35
37
|
generateDEK,
|
|
36
38
|
unwrapCek,
|
|
37
39
|
wrapCek
|
|
38
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-CIE2BASH.js";
|
|
39
41
|
import {
|
|
40
42
|
NOYDB_BACKUP_VERSION,
|
|
41
43
|
NOYDB_FORMAT_VERSION
|
|
42
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-JNAI2HN2.js";
|
|
43
45
|
import {
|
|
44
46
|
PartitionExtractionError
|
|
45
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-BIOUI4HL.js";
|
|
46
48
|
|
|
47
49
|
// src/with-cargo/walk-closure.ts
|
|
48
50
|
async function walkClosure(vault, opts) {
|
|
@@ -75,7 +77,7 @@ async function walkClosure(vault, opts) {
|
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
|
-
const { refRegistry } = vault._introspectState();
|
|
80
|
+
const { refRegistry, adapter, name: vaultName } = vault._introspectState();
|
|
79
81
|
const maxDepth = opts.maxDepth ?? 16;
|
|
80
82
|
let cyclesDetected = false;
|
|
81
83
|
let inboundDepth = 0;
|
|
@@ -110,6 +112,7 @@ async function walkClosure(vault, opts) {
|
|
|
110
112
|
}
|
|
111
113
|
let outboundFrontier = [];
|
|
112
114
|
for (const [c, ids] of closure) for (const id of ids) outboundFrontier.push([c, id]);
|
|
115
|
+
const danglingRefs = [];
|
|
113
116
|
while (outboundFrontier.length > 0) {
|
|
114
117
|
const next = [];
|
|
115
118
|
for (const [collectionName, id] of outboundFrontier) {
|
|
@@ -122,6 +125,21 @@ async function walkClosure(vault, opts) {
|
|
|
122
125
|
const rawId = record[field];
|
|
123
126
|
if (typeof rawId !== "string" && typeof rawId !== "number") continue;
|
|
124
127
|
const parentId = String(rawId);
|
|
128
|
+
const parentColl = vault.collection(descriptor.target);
|
|
129
|
+
const parentRecord = await parentColl.get(parentId);
|
|
130
|
+
if (!parentRecord) {
|
|
131
|
+
const rawParentEnv = await adapter.get(vaultName, descriptor.target, parentId);
|
|
132
|
+
const reason = rawParentEnv && (rawParentEnv._tier ?? 0) > 0 ? "elevated" : "missing";
|
|
133
|
+
danglingRefs.push({
|
|
134
|
+
collection: collectionName,
|
|
135
|
+
id,
|
|
136
|
+
field,
|
|
137
|
+
target: descriptor.target,
|
|
138
|
+
targetId: parentId,
|
|
139
|
+
reason
|
|
140
|
+
});
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
125
143
|
if (add(descriptor.target, parentId)) {
|
|
126
144
|
next.push([descriptor.target, parentId]);
|
|
127
145
|
}
|
|
@@ -135,7 +153,7 @@ async function walkClosure(vault, opts) {
|
|
|
135
153
|
outboundFrontier = next;
|
|
136
154
|
}
|
|
137
155
|
const depth = Math.max(inboundDepth, outboundDepth);
|
|
138
|
-
return { closure, graph: { depth, cyclesDetected } };
|
|
156
|
+
return { closure, graph: { depth, cyclesDetected }, danglingRefs };
|
|
139
157
|
}
|
|
140
158
|
|
|
141
159
|
// src/with-cargo/extract-partition.ts
|
|
@@ -161,6 +179,11 @@ async function reKeyClosure(vault, closure, fieldProjection) {
|
|
|
161
179
|
for (const id of ids) {
|
|
162
180
|
const env = await adapter.get(vaultName, collectionName, id);
|
|
163
181
|
if (!env) continue;
|
|
182
|
+
if ((env._tier ?? 0) > 0) {
|
|
183
|
+
throw new PartitionExtractionError(
|
|
184
|
+
`#748: reKeyClosure fetched an elevated envelope (collection="${collectionName}" id="${id}" _tier=${env._tier}) \u2014 this is unreachable by construction (walkClosure only ever adds ids reachable through tier-gated Collection reads). Refusing to carry it into a partition.`
|
|
185
|
+
);
|
|
186
|
+
}
|
|
164
187
|
if (env._cek !== void 0) {
|
|
165
188
|
const cek = await unwrapCek(env._cek, srcDek);
|
|
166
189
|
const plaintext2 = await decrypt(env._iv, env._data, cek);
|
|
@@ -279,13 +302,27 @@ async function reKeyBlobs(vault, closure, destDeks, fieldProjection) {
|
|
|
279
302
|
const proj = projList ? new Set(projList) : void 0;
|
|
280
303
|
const slotsCollection = `${BLOB_SLOTS_PREFIX}${collectionName}`;
|
|
281
304
|
for (const id of ids) {
|
|
305
|
+
const intentId = `${collectionName}::${id}`;
|
|
306
|
+
const intentEnv = await adapter.get(vaultName, BLOB_INTENT_COLLECTION, intentId);
|
|
307
|
+
if (intentEnv) {
|
|
308
|
+
const intentPlain = await openEnvelopeJson(intentEnv, srcDek);
|
|
309
|
+
const intentBody = await writeEnvelopeBody(intentPlain, destDek);
|
|
310
|
+
place(BLOB_INTENT_COLLECTION, intentId, { ...intentEnv, ...intentBody });
|
|
311
|
+
}
|
|
282
312
|
const env = await adapter.get(vaultName, slotsCollection, id);
|
|
283
313
|
if (!env) continue;
|
|
314
|
+
if ((env._tier ?? 0) > 0) {
|
|
315
|
+
throw new PartitionExtractionError(
|
|
316
|
+
`#748: reKeyBlobs fetched an elevated slot-map envelope (collection="${slotsCollection}" id="${id}" _tier=${env._tier}) \u2014 this is unreachable by construction. Refusing to carry it into a partition.`
|
|
317
|
+
);
|
|
318
|
+
}
|
|
284
319
|
const slots = JSON.parse(await openEnvelopeJson(env, srcDek));
|
|
285
320
|
const kept = {};
|
|
286
321
|
for (const [slotName, slot] of Object.entries(slots)) {
|
|
287
322
|
if (proj && !proj.has(slotName)) continue;
|
|
288
|
-
|
|
323
|
+
const { pendingRelease, ...strippedSlot } = slot;
|
|
324
|
+
void pendingRelease;
|
|
325
|
+
kept[slotName] = strippedSlot;
|
|
289
326
|
addRef(slot.eTag);
|
|
290
327
|
}
|
|
291
328
|
if (Object.keys(kept).length === 0) continue;
|
|
@@ -300,6 +337,11 @@ async function reKeyBlobs(vault, closure, destDeks, fieldProjection) {
|
|
|
300
337
|
if (proj && slotName !== void 0 && !proj.has(slotName)) continue;
|
|
301
338
|
const env = await adapter.get(vaultName, versionsCollection, key);
|
|
302
339
|
if (!env) continue;
|
|
340
|
+
if ((env._tier ?? 0) > 0) {
|
|
341
|
+
throw new PartitionExtractionError(
|
|
342
|
+
`#748: reKeyBlobs fetched an elevated version-record envelope (collection="${versionsCollection}" key="${key}" _tier=${env._tier}) \u2014 this is unreachable by construction. Refusing to carry it into a partition.`
|
|
343
|
+
);
|
|
344
|
+
}
|
|
303
345
|
const record = JSON.parse(await openEnvelopeJson(env, srcDek));
|
|
304
346
|
addRef(record.eTag);
|
|
305
347
|
const { iv, data } = await encrypt(JSON.stringify(record), destDek);
|
|
@@ -382,7 +424,7 @@ async function extractPartitionCore(vault, opts) {
|
|
|
382
424
|
);
|
|
383
425
|
}
|
|
384
426
|
if (opts.carrySchemas) await vault._drainPendingSchemaWrites();
|
|
385
|
-
const { closure } = await walkClosure(vault, opts);
|
|
427
|
+
const { closure, danglingRefs } = await walkClosure(vault, opts);
|
|
386
428
|
const { collections, deks } = await reKeyClosure(vault, closure, opts.fieldProjection);
|
|
387
429
|
let ledgerHead;
|
|
388
430
|
let ledgerEntries;
|
|
@@ -437,7 +479,7 @@ async function extractPartitionCore(vault, opts) {
|
|
|
437
479
|
// indicator only
|
|
438
480
|
}
|
|
439
481
|
});
|
|
440
|
-
return { bundleBytes, transferKey, sealId: seal.sealId };
|
|
482
|
+
return { bundleBytes, transferKey, sealId: seal.sealId, danglingRefs };
|
|
441
483
|
}
|
|
442
484
|
|
|
443
485
|
export {
|
|
@@ -450,4 +492,4 @@ export {
|
|
|
450
492
|
extractPartition,
|
|
451
493
|
extractPartitionCore
|
|
452
494
|
};
|
|
453
|
-
//# sourceMappingURL=chunk-
|
|
495
|
+
//# sourceMappingURL=chunk-JIF24JPM.js.map
|