@noy-db/hub 0.2.0-pre.2 → 0.2.0-pre.3
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.cjs.map +1 -1
- package/dist/aggregate/index.js +2 -2
- package/dist/attestation/index.cjs.map +1 -1
- package/dist/attestation/index.d.cts +2 -2
- package/dist/attestation/index.d.ts +2 -2
- package/dist/attestation/index.js +6 -6
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +3 -3
- package/dist/blobs/index.d.ts +3 -3
- package/dist/blobs/index.js +5 -5
- package/dist/bundle/index.cjs +1245 -6
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +4 -4
- package/dist/bundle/index.d.ts +4 -4
- package/dist/bundle/index.js +10 -10
- package/dist/{chunk-EUYOGYGV.js → chunk-2EYC3WDT.js} +6 -6
- package/dist/{chunk-MUWOSVEP.js → chunk-2XLVPKXG.js} +2 -2
- package/dist/{chunk-NWZ3I6R6.js → chunk-4OQWR46B.js} +5 -5
- package/dist/{chunk-J4KLMEUL.js → chunk-4UBOTYP5.js} +2 -2
- package/dist/{chunk-UND4XIB6.js → chunk-4X2S7PBF.js} +3 -3
- package/dist/{chunk-VE6YVP32.js → chunk-5YHWBPOT.js} +2 -2
- package/dist/{chunk-7BUTTVMR.js → chunk-6S3LLAQ5.js} +2 -2
- package/dist/{chunk-7Z23ZFLV.js → chunk-74JEQFMT.js} +5 -5
- package/dist/{chunk-AHPFONIL.js → chunk-75QDHSE4.js} +5 -5
- package/dist/{chunk-3XHOCQK4.js → chunk-A6SWRXUQ.js} +2 -2
- package/dist/{chunk-PLI5TV7N.js → chunk-BFI3RS42.js} +2 -2
- package/dist/{chunk-CXSCDO5T.js → chunk-EMEX37ZN.js} +2 -2
- package/dist/{chunk-PEULZC6M.js → chunk-EPK6A3WJ.js} +8 -1
- package/dist/chunk-EPK6A3WJ.js.map +1 -0
- package/dist/{chunk-JYQTXEIO.js → chunk-FBMXWVGP.js} +5 -5
- package/dist/{chunk-QXQRKXCU.js → chunk-FCDO7UAO.js} +2 -2
- package/dist/{chunk-243PNUA6.js → chunk-FS7A4XNF.js} +3 -3
- package/dist/{chunk-YS3POABP.js → chunk-FXQYZNOW.js} +1 -1
- package/dist/chunk-FXQYZNOW.js.map +1 -0
- package/dist/{chunk-Y2RKOPNC.js → chunk-G7PAZ3TD.js} +4 -4
- package/dist/{chunk-QPEXPHJR.js → chunk-GAUBWHAF.js} +4 -4
- package/dist/{chunk-GIV6DWBG.js → chunk-GD3BGKAR.js} +2 -2
- package/dist/{chunk-TBKOGSYR.js → chunk-GDTCGIPX.js} +2 -2
- package/dist/{chunk-3Z2TPHC4.js → chunk-GVXBHCZ2.js} +8 -3
- package/dist/chunk-GVXBHCZ2.js.map +1 -0
- package/dist/{chunk-OVZDFEOR.js → chunk-HGZ7DC5H.js} +2 -2
- package/dist/{chunk-VPSUZLOJ.js → chunk-IS5HWQO7.js} +4 -4
- package/dist/{chunk-VPSUZLOJ.js.map → chunk-IS5HWQO7.js.map} +1 -1
- package/dist/{chunk-VK5EER6C.js → chunk-K5PVGKE4.js} +2 -2
- package/dist/{chunk-LRAZDV5X.js → chunk-KMI2NBBF.js} +6 -6
- package/dist/{chunk-VRBCTEKQ.js → chunk-KYKMKLJ6.js} +2 -2
- package/dist/{chunk-PFSNOPBQ.js → chunk-LOL725S4.js} +3 -3
- package/dist/{chunk-3Y53S2SA.js → chunk-LS3JLEIB.js} +4 -4
- package/dist/{chunk-XG3PTSCD.js → chunk-NCO2JGKK.js} +1 -1
- package/dist/chunk-NCO2JGKK.js.map +1 -0
- package/dist/{chunk-YTXSFG3C.js → chunk-NGSPBLLE.js} +2 -2
- package/dist/{chunk-FAQVNJD4.js → chunk-NSLTPGEN.js} +2 -2
- package/dist/{chunk-VCGTOS2A.js → chunk-P6256WTJ.js} +3 -3
- package/dist/{chunk-7Q5PLD5C.js → chunk-QAU5HM6Q.js} +3 -3
- package/dist/{chunk-HXJXPZRE.js → chunk-SAVQ6E2O.js} +2 -2
- package/dist/{chunk-E535SAN4.js → chunk-T6HQMVML.js} +1177 -51
- package/dist/chunk-T6HQMVML.js.map +1 -0
- package/dist/{chunk-Q6W2CMEJ.js → chunk-TLFUDXVV.js} +4 -4
- package/dist/{chunk-2PAQNPE3.js → chunk-UOF74WQY.js} +2 -2
- package/dist/{chunk-3QAKZ37R.js → chunk-UVPGJXVO.js} +5 -5
- package/dist/{chunk-7BRE6EUA.js → chunk-WRLHNG6H.js} +2 -2
- package/dist/{chunk-W3XXT26A.js → chunk-YDLAFP36.js} +43 -1
- package/dist/chunk-YDLAFP36.js.map +1 -0
- package/dist/{chunk-G6FRSBKK.js → chunk-YK72A4IT.js} +4 -4
- package/dist/{chunk-3S4BJX25.js → chunk-YL2DR3HY.js} +2 -2
- package/dist/{chunk-RTZVQAJ7.js → chunk-ZC2AAE6J.js} +2 -2
- package/dist/{chunk-4HIL6AHQ.js → chunk-ZUMGGHRB.js} +4 -4
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +3 -3
- package/dist/consent/index.d.ts +3 -3
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-5ZDIY3NG.js → crypto-H2Y3DDFW.js} +3 -3
- package/dist/{delegation-QYXZW25W.js → delegation-QSC7G5QC.js} +5 -5
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +4 -4
- package/dist/derivations/index.d.ts +4 -4
- package/dist/derivations/index.js +4 -4
- package/dist/{dev-unlock-utkybTKb.d.ts → dev-unlock-Cf2B7Kih.d.ts} +1 -1
- package/dist/{dev-unlock-DQCNDfFp.d.cts → dev-unlock-De3mjQWv.d.cts} +1 -1
- package/dist/executor-BZKFZVRC.js +8 -0
- package/dist/executor-GFZFDQXV.js +8 -0
- package/dist/executor-KT2IOZVP.js +11 -0
- package/dist/{fanout-sidecar-VJ52RIEY.js → fanout-sidecar-NRBWSLRK.js} +2 -2
- package/dist/guards/index.cjs +7 -0
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +4 -4
- package/dist/guards/index.d.ts +4 -4
- package/dist/guards/index.js +4 -4
- package/dist/{hash-DcoYWfJ_.d.ts → hash-gVn_uKhp.d.ts} +1 -1
- package/dist/{hash-jDowCrK2.d.cts → hash-vBCB0-Ps.d.cts} +1 -1
- package/dist/history/index.cjs +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +4 -4
- package/dist/history/index.d.ts +4 -4
- package/dist/history/index.js +6 -6
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.js +7 -7
- package/dist/{index-BCKdioeh.d.ts → index-BF1B2HB9.d.ts} +25 -1
- package/dist/{index-BMjrzNZr.d.cts → index-DVkvrgpm.d.cts} +25 -1
- package/dist/index.cjs +1273 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -12
- package/dist/index.d.ts +33 -12
- package/dist/index.js +109 -42
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/issue-BAJ7ZB4S.js +12 -0
- package/dist/{ledger-3IU5GMXA.js → ledger-WOEJUYTP.js} +6 -6
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +5 -5
- package/dist/materialized-views/index.d.ts +5 -5
- package/dist/materialized-views/index.js +6 -6
- package/dist/noydb-XNQSKXGO.js +34 -0
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +4 -4
- package/dist/overlay-views/index.d.ts +4 -4
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +3 -3
- package/dist/periods/index.d.ts +3 -3
- package/dist/periods/index.js +6 -6
- package/dist/{public-envelope-U3CMEOMV.js → public-envelope-OHQ5UZFM.js} +4 -4
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +3 -3
- package/dist/registry-2IEARCGT.js +7 -0
- package/dist/{registry-3ALP62P6.js → registry-CDHASH73.js} +3 -3
- package/dist/registry-EMGLZGR6.js +8 -0
- package/dist/registry-NQALYR77.js +8 -0
- package/dist/{revoke-KY2GB4KP.js → revoke-7JOVLZFD.js} +6 -6
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +4 -4
- package/dist/session/index.d.ts +4 -4
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +3 -3
- package/dist/shadow/index.d.ts +3 -3
- package/dist/shadow/index.js +2 -2
- package/dist/{signer-GRI5TZKH.js → signer-M4K5HBLD.js} +5 -5
- package/dist/{stale-OTOF3FH7.js → stale-PAGCS4K5.js} +2 -2
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +3 -3
- package/dist/store/index.d.ts +3 -3
- package/dist/store/index.js +2 -2
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +2 -2
- package/dist/sync/index.d.ts +2 -2
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +3 -3
- package/dist/team/index.d.ts +3 -3
- package/dist/team/index.js +8 -8
- package/dist/tx/index.cjs +81 -1
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +4 -4
- package/dist/tx/index.d.ts +4 -4
- package/dist/tx/index.js +56 -3
- package/dist/tx/index.js.map +1 -1
- package/dist/{types-DJG8HG6F.d.cts → types-CSLcfytP.d.cts} +528 -5
- package/dist/{types-BoFFiskX.d.ts → types-D9eB0Rvh.d.ts} +528 -5
- package/dist/{ulid-C7ms9oli.d.cts → ulid-CG2YvAbg.d.cts} +1 -1
- package/dist/{ulid-BmBgooGm.d.ts → ulid-CiM2OAeM.d.ts} +1 -1
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/{with-derivation-BKXXa8Vt.d.ts → with-derivation-Bzpj6UTv.d.ts} +1 -1
- package/dist/{with-derivation-BjQ7q4NE.d.cts → with-derivation-DWajFh4K.d.cts} +1 -1
- package/dist/{with-guard-DQme5DKE.d.cts → with-guard-DF_Ul3DT.d.cts} +1 -1
- package/dist/{with-guard-C25yNjzd.d.ts → with-guard-DR7U-l4v.d.ts} +1 -1
- package/dist/{with-materialized-view-BbEPFIIJ.d.cts → with-materialized-view-_piodoIz.d.cts} +1 -1
- package/dist/{with-materialized-view-CqnRwI2S.d.ts → with-materialized-view-qtoJ3xKJ.d.ts} +1 -1
- package/dist/{with-overlayed-view-Ct1fSJt-.d.ts → with-overlayed-view-DFaRfgMr.d.ts} +1 -1
- package/dist/{with-overlayed-view-bwlmmFjx.d.cts → with-overlayed-view-DwzCKxn2.d.cts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-3Z2TPHC4.js.map +0 -1
- package/dist/chunk-E535SAN4.js.map +0 -1
- package/dist/chunk-PEULZC6M.js.map +0 -1
- package/dist/chunk-W3XXT26A.js.map +0 -1
- package/dist/chunk-XG3PTSCD.js.map +0 -1
- package/dist/chunk-YS3POABP.js.map +0 -1
- package/dist/executor-AS2IDHKZ.js +0 -11
- package/dist/executor-HLXFXNFM.js +0 -8
- package/dist/executor-HN6YBHZ5.js +0 -8
- package/dist/issue-ORP37MVW.js +0 -12
- package/dist/noydb-5H3C24GG.js +0 -34
- package/dist/registry-7HE6VJGC.js +0 -8
- package/dist/registry-PSIPG2QR.js +0 -8
- package/dist/registry-RFGGMVNJ.js +0 -7
- /package/dist/{chunk-EUYOGYGV.js.map → chunk-2EYC3WDT.js.map} +0 -0
- /package/dist/{chunk-MUWOSVEP.js.map → chunk-2XLVPKXG.js.map} +0 -0
- /package/dist/{chunk-NWZ3I6R6.js.map → chunk-4OQWR46B.js.map} +0 -0
- /package/dist/{chunk-J4KLMEUL.js.map → chunk-4UBOTYP5.js.map} +0 -0
- /package/dist/{chunk-UND4XIB6.js.map → chunk-4X2S7PBF.js.map} +0 -0
- /package/dist/{chunk-VE6YVP32.js.map → chunk-5YHWBPOT.js.map} +0 -0
- /package/dist/{chunk-7BUTTVMR.js.map → chunk-6S3LLAQ5.js.map} +0 -0
- /package/dist/{chunk-7Z23ZFLV.js.map → chunk-74JEQFMT.js.map} +0 -0
- /package/dist/{chunk-AHPFONIL.js.map → chunk-75QDHSE4.js.map} +0 -0
- /package/dist/{chunk-3XHOCQK4.js.map → chunk-A6SWRXUQ.js.map} +0 -0
- /package/dist/{chunk-PLI5TV7N.js.map → chunk-BFI3RS42.js.map} +0 -0
- /package/dist/{chunk-CXSCDO5T.js.map → chunk-EMEX37ZN.js.map} +0 -0
- /package/dist/{chunk-JYQTXEIO.js.map → chunk-FBMXWVGP.js.map} +0 -0
- /package/dist/{chunk-QXQRKXCU.js.map → chunk-FCDO7UAO.js.map} +0 -0
- /package/dist/{chunk-243PNUA6.js.map → chunk-FS7A4XNF.js.map} +0 -0
- /package/dist/{chunk-Y2RKOPNC.js.map → chunk-G7PAZ3TD.js.map} +0 -0
- /package/dist/{chunk-QPEXPHJR.js.map → chunk-GAUBWHAF.js.map} +0 -0
- /package/dist/{chunk-GIV6DWBG.js.map → chunk-GD3BGKAR.js.map} +0 -0
- /package/dist/{chunk-TBKOGSYR.js.map → chunk-GDTCGIPX.js.map} +0 -0
- /package/dist/{chunk-OVZDFEOR.js.map → chunk-HGZ7DC5H.js.map} +0 -0
- /package/dist/{chunk-VK5EER6C.js.map → chunk-K5PVGKE4.js.map} +0 -0
- /package/dist/{chunk-LRAZDV5X.js.map → chunk-KMI2NBBF.js.map} +0 -0
- /package/dist/{chunk-VRBCTEKQ.js.map → chunk-KYKMKLJ6.js.map} +0 -0
- /package/dist/{chunk-PFSNOPBQ.js.map → chunk-LOL725S4.js.map} +0 -0
- /package/dist/{chunk-3Y53S2SA.js.map → chunk-LS3JLEIB.js.map} +0 -0
- /package/dist/{chunk-YTXSFG3C.js.map → chunk-NGSPBLLE.js.map} +0 -0
- /package/dist/{chunk-FAQVNJD4.js.map → chunk-NSLTPGEN.js.map} +0 -0
- /package/dist/{chunk-VCGTOS2A.js.map → chunk-P6256WTJ.js.map} +0 -0
- /package/dist/{chunk-7Q5PLD5C.js.map → chunk-QAU5HM6Q.js.map} +0 -0
- /package/dist/{chunk-HXJXPZRE.js.map → chunk-SAVQ6E2O.js.map} +0 -0
- /package/dist/{chunk-Q6W2CMEJ.js.map → chunk-TLFUDXVV.js.map} +0 -0
- /package/dist/{chunk-2PAQNPE3.js.map → chunk-UOF74WQY.js.map} +0 -0
- /package/dist/{chunk-3QAKZ37R.js.map → chunk-UVPGJXVO.js.map} +0 -0
- /package/dist/{chunk-7BRE6EUA.js.map → chunk-WRLHNG6H.js.map} +0 -0
- /package/dist/{chunk-G6FRSBKK.js.map → chunk-YK72A4IT.js.map} +0 -0
- /package/dist/{chunk-3S4BJX25.js.map → chunk-YL2DR3HY.js.map} +0 -0
- /package/dist/{chunk-RTZVQAJ7.js.map → chunk-ZC2AAE6J.js.map} +0 -0
- /package/dist/{chunk-4HIL6AHQ.js.map → chunk-ZUMGGHRB.js.map} +0 -0
- /package/dist/{crypto-5ZDIY3NG.js.map → crypto-H2Y3DDFW.js.map} +0 -0
- /package/dist/{delegation-QYXZW25W.js.map → delegation-QSC7G5QC.js.map} +0 -0
- /package/dist/{executor-AS2IDHKZ.js.map → executor-BZKFZVRC.js.map} +0 -0
- /package/dist/{executor-HLXFXNFM.js.map → executor-GFZFDQXV.js.map} +0 -0
- /package/dist/{executor-HN6YBHZ5.js.map → executor-KT2IOZVP.js.map} +0 -0
- /package/dist/{fanout-sidecar-VJ52RIEY.js.map → fanout-sidecar-NRBWSLRK.js.map} +0 -0
- /package/dist/{issue-ORP37MVW.js.map → issue-BAJ7ZB4S.js.map} +0 -0
- /package/dist/{ledger-3IU5GMXA.js.map → ledger-WOEJUYTP.js.map} +0 -0
- /package/dist/{noydb-5H3C24GG.js.map → noydb-XNQSKXGO.js.map} +0 -0
- /package/dist/{public-envelope-U3CMEOMV.js.map → public-envelope-OHQ5UZFM.js.map} +0 -0
- /package/dist/{registry-3ALP62P6.js.map → registry-2IEARCGT.js.map} +0 -0
- /package/dist/{registry-7HE6VJGC.js.map → registry-CDHASH73.js.map} +0 -0
- /package/dist/{registry-PSIPG2QR.js.map → registry-EMGLZGR6.js.map} +0 -0
- /package/dist/{registry-RFGGMVNJ.js.map → registry-NQALYR77.js.map} +0 -0
- /package/dist/{revoke-KY2GB4KP.js.map → revoke-7JOVLZFD.js.map} +0 -0
- /package/dist/{signer-GRI5TZKH.js.map → signer-M4K5HBLD.js.map} +0 -0
- /package/dist/{stale-OTOF3FH7.js.map → stale-PAGCS4K5.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I as IndexStrategy, d as LazyQuery } from './lazy-builder-Rpd-V3jP.js';
|
|
2
2
|
import { b as AggregateSpec, A as AggregateStrategy } from './strategy-DSTrsZ8t.js';
|
|
3
3
|
import { C as CrdtStrategy, a as CrdtMode, b as CrdtState } from './strategy-BSxFXGzb.js';
|
|
4
|
-
import { N as NoydbError, Q as Query,
|
|
4
|
+
import { N as NoydbError, Q as Query, ar as RefRegistry, ao as RefDescriptor, a2 as JoinableSource, at as RefViolation, au as ScanBuilder } from './index-BF1B2HB9.js';
|
|
5
5
|
import { F as FieldClause, I as IndexDef, C as CollectionIndexes } from './predicate-Dnu81tsS.js';
|
|
6
6
|
import { AttestationFieldSchema, RevocationList } from '@noy-db/attestation';
|
|
7
7
|
|
|
@@ -803,7 +803,7 @@ interface LedgerEntry {
|
|
|
803
803
|
* skips it in the data cross-check (it still participates in the
|
|
804
804
|
* tamper-evident chain).
|
|
805
805
|
*/
|
|
806
|
-
readonly op: 'put' | 'delete' | 'amendment' | 'lifecycle';
|
|
806
|
+
readonly op: 'put' | 'delete' | 'amendment' | 'lifecycle' | 'migration';
|
|
807
807
|
/** The collection the mutation targeted. */
|
|
808
808
|
readonly collection: string;
|
|
809
809
|
/** The record id the mutation targeted. */
|
|
@@ -2549,6 +2549,220 @@ interface I18nStrategy {
|
|
|
2549
2549
|
buildDictionaryHandle<Keys extends string = string>(opts: BuildDictionaryHandleOptions<Keys>): DictionaryHandle<Keys>;
|
|
2550
2550
|
}
|
|
2551
2551
|
|
|
2552
|
+
/**
|
|
2553
|
+
* Observable write-queue (#227, M12 Slice 1).
|
|
2554
|
+
*
|
|
2555
|
+
* Tracks outstanding in-flight *logical* writes (a full Collection.put /
|
|
2556
|
+
* delete, including ledger + cache + derivation + MV dispatch — not just
|
|
2557
|
+
* the adapter call). The hub holds one tracker per instance; it is
|
|
2558
|
+
* framework-agnostic (no Vue/React dependency). UI layers subscribe via
|
|
2559
|
+
* onChange(); the migration drain (Slice 2) quiesces via onFlush().
|
|
2560
|
+
*/
|
|
2561
|
+
/** Public, read-only view of the hub's write-queue. */
|
|
2562
|
+
interface WriteQueue {
|
|
2563
|
+
/** True while one or more writes are in flight (`depth > 0`). */
|
|
2564
|
+
readonly pending: boolean;
|
|
2565
|
+
/** Count of outstanding write operations. */
|
|
2566
|
+
readonly depth: number;
|
|
2567
|
+
/**
|
|
2568
|
+
* Subscribe to depth changes (fires on every begin and settle).
|
|
2569
|
+
* Returns an unsubscribe function. Intended for reactive wrappers
|
|
2570
|
+
* (e.g. `@noy-db/in-vue` turns this into a `ref`).
|
|
2571
|
+
*/
|
|
2572
|
+
onChange(handler: () => void): () => void;
|
|
2573
|
+
/**
|
|
2574
|
+
* Resolves once `depth` reaches 0. If a write settled with an error
|
|
2575
|
+
* while this flush was waiting, the returned promise REJECTS with that
|
|
2576
|
+
* error instead — so a drain caller surfaces the failure rather than
|
|
2577
|
+
* hanging. Resolves immediately when already idle and error-free.
|
|
2578
|
+
*/
|
|
2579
|
+
onFlush(): Promise<void>;
|
|
2580
|
+
}
|
|
2581
|
+
declare class WriteQueueTracker implements WriteQueue {
|
|
2582
|
+
#private;
|
|
2583
|
+
get pending(): boolean;
|
|
2584
|
+
get depth(): number;
|
|
2585
|
+
/** Mark one write as started. */
|
|
2586
|
+
begin(): void;
|
|
2587
|
+
/** Mark one write as finished. Pass the error if it failed. */
|
|
2588
|
+
settle(error?: Error): void;
|
|
2589
|
+
onChange(handler: () => void): () => void;
|
|
2590
|
+
onFlush(): Promise<void>;
|
|
2591
|
+
/**
|
|
2592
|
+
* Run `fn` as a tracked write: depth++ on entry, depth-- on settle
|
|
2593
|
+
* (success or failure). The fn's resolved value is returned; a thrown
|
|
2594
|
+
* error is re-thrown after the queue is decremented.
|
|
2595
|
+
*/
|
|
2596
|
+
track<R>(fn: () => Promise<R>): Promise<R>;
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
/**
|
|
2600
|
+
* Hub-level write lifecycle hooks (#230). `onBeforeWrite` may abort (throw);
|
|
2601
|
+
* `onAfterWrite` is awaited and its errors are warned, not thrown. A
|
|
2602
|
+
* re-entrancy flag suppresses nested firing so a handler that writes can't
|
|
2603
|
+
* loop. Held on the Noydb instance, threaded into every Collection.
|
|
2604
|
+
*/
|
|
2605
|
+
interface WriteEvent {
|
|
2606
|
+
readonly op: 'create' | 'update' | 'delete';
|
|
2607
|
+
readonly vault: string;
|
|
2608
|
+
readonly collection: string;
|
|
2609
|
+
readonly docId: string;
|
|
2610
|
+
readonly before: unknown;
|
|
2611
|
+
readonly after: unknown;
|
|
2612
|
+
readonly baseVersion: number;
|
|
2613
|
+
readonly version: number;
|
|
2614
|
+
readonly userId: string;
|
|
2615
|
+
readonly timestamp: number;
|
|
2616
|
+
readonly txId: string;
|
|
2617
|
+
}
|
|
2618
|
+
type WriteHook = (event: WriteEvent) => void | Promise<void>;
|
|
2619
|
+
type Unsubscribe$2 = () => void;
|
|
2620
|
+
declare class WriteHookRegistry {
|
|
2621
|
+
#private;
|
|
2622
|
+
/** True while handlers are running — used by the write path to skip nested firing. */
|
|
2623
|
+
get suppressed(): boolean;
|
|
2624
|
+
/** True when any hook is registered (cheap gate for the write path). */
|
|
2625
|
+
get hasHandlers(): boolean;
|
|
2626
|
+
onBeforeWrite(handler: WriteHook): Unsubscribe$2;
|
|
2627
|
+
onAfterWrite(handler: WriteHook): Unsubscribe$2;
|
|
2628
|
+
/** Run before-hooks (awaited, in order). A throw propagates and aborts the write. */
|
|
2629
|
+
runBefore(event: WriteEvent): Promise<void>;
|
|
2630
|
+
/** Run after-hooks (awaited, in order). Per-handler errors are warned, not thrown. */
|
|
2631
|
+
runAfter(event: WriteEvent): Promise<void>;
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
/**
|
|
2635
|
+
* Schema-update strategy framework types (#245, M12 §3a).
|
|
2636
|
+
*
|
|
2637
|
+
* The hub core detects a schema change (SchemaDelta) and dispatches it
|
|
2638
|
+
* through a collection's ordered strategy list. Strategies decide what
|
|
2639
|
+
* happens; the core only knows this interface.
|
|
2640
|
+
*/
|
|
2641
|
+
/** A single changed top-level property in a schema delta. */
|
|
2642
|
+
interface FieldChange {
|
|
2643
|
+
readonly field: string;
|
|
2644
|
+
/** True when the field's required-ness flipped. */
|
|
2645
|
+
readonly requiredChanged: boolean;
|
|
2646
|
+
/** True when the field's subschema shape changed. */
|
|
2647
|
+
readonly shapeChanged: boolean;
|
|
2648
|
+
}
|
|
2649
|
+
/** The classified difference between a stored and a freshly-derived schema. */
|
|
2650
|
+
interface SchemaDelta {
|
|
2651
|
+
readonly collection: string;
|
|
2652
|
+
readonly kind: 'none' | 'additive' | 'non-additive';
|
|
2653
|
+
/** Top-level properties present in the new schema but not the old. */
|
|
2654
|
+
readonly added: readonly string[];
|
|
2655
|
+
/** Top-level properties present in the old schema but not the new. */
|
|
2656
|
+
readonly removed: readonly string[];
|
|
2657
|
+
/** Top-level properties present in both but altered. */
|
|
2658
|
+
readonly changed: readonly FieldChange[];
|
|
2659
|
+
}
|
|
2660
|
+
/** Context handed to a strategy alongside the delta. */
|
|
2661
|
+
interface UpdateContext {
|
|
2662
|
+
readonly collection: string;
|
|
2663
|
+
}
|
|
2664
|
+
/** Bulk transform run by the coordinatedCutover strategy (#232). */
|
|
2665
|
+
type TransformFn = (doc: Record<string, unknown>) => Record<string, unknown>;
|
|
2666
|
+
/**
|
|
2667
|
+
* A strategy's verdict on a detected schema change.
|
|
2668
|
+
* - `allow` — no objection; the dispatcher falls through to the next strategy.
|
|
2669
|
+
* - `reject` — terminal: refuse the change; `error` is thrown at the write path.
|
|
2670
|
+
* - `cutover` — terminal: run a coordinated drain-barrier (handled by #232).
|
|
2671
|
+
* New terminal actions may be added without breaking existing strategies.
|
|
2672
|
+
*/
|
|
2673
|
+
type UpdateDecision = {
|
|
2674
|
+
readonly action: 'allow';
|
|
2675
|
+
} | {
|
|
2676
|
+
readonly action: 'reject';
|
|
2677
|
+
readonly error: Error;
|
|
2678
|
+
} | {
|
|
2679
|
+
readonly action: 'cutover';
|
|
2680
|
+
readonly transform: TransformFn;
|
|
2681
|
+
};
|
|
2682
|
+
/** A pluggable schema-evolution policy. */
|
|
2683
|
+
interface SchemaUpdateStrategy {
|
|
2684
|
+
readonly name: string;
|
|
2685
|
+
onSchemaDelta(delta: SchemaDelta, ctx: UpdateContext): UpdateDecision | Promise<UpdateDecision>;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
/**
|
|
2689
|
+
* Per-collection write gate (#245). Holds the (async) update decision
|
|
2690
|
+
* computed at registration; `Collection.put`/`delete` await it before
|
|
2691
|
+
* writing and throw the strategy's rejection error.
|
|
2692
|
+
*
|
|
2693
|
+
* Detection FAILURE (the promise rejecting) is deliberately NOT a write
|
|
2694
|
+
* block — schema detection is a fingerprint safety net, not a correctness
|
|
2695
|
+
* invariant (matches how persisted-schema write failures are swallowed).
|
|
2696
|
+
* Only an explicit `reject` decision blocks writes.
|
|
2697
|
+
*/
|
|
2698
|
+
|
|
2699
|
+
declare class SchemaUpdateGate {
|
|
2700
|
+
#private;
|
|
2701
|
+
constructor(decision: Promise<UpdateDecision>);
|
|
2702
|
+
assertWritable(): Promise<void>;
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
/**
|
|
2706
|
+
* Schema-fence document (#232). Vault-level generation counter + drain
|
|
2707
|
+
* state, stored at `_meta/schema-fence` using the plaintext-envelope
|
|
2708
|
+
* pattern of `_meta/policy` (no PII — a counter + a state enum).
|
|
2709
|
+
*/
|
|
2710
|
+
|
|
2711
|
+
type FenceState = 'normal' | 'draining' | 'migrating' | 'complete';
|
|
2712
|
+
interface FenceDoc {
|
|
2713
|
+
readonly currentSchemaVersion: number;
|
|
2714
|
+
readonly fenceState: FenceState;
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
/**
|
|
2718
|
+
* Vault-level schema-fence controller (#232).
|
|
2719
|
+
*
|
|
2720
|
+
* Owns the open-time generation snapshot, the pending-cutover registry,
|
|
2721
|
+
* and the cutover orchestration. 3a: single-client (the caller is the
|
|
2722
|
+
* migrator). 3b: a cooperative ack-barrier — after `draining`, the
|
|
2723
|
+
* migrator waits for the active client set (registry heartbeats) to ack
|
|
2724
|
+
* the draining generation before transforming. No leader election.
|
|
2725
|
+
*/
|
|
2726
|
+
|
|
2727
|
+
/** Runs one collection's transform; supplied by the Vault (binds to a Collection). */
|
|
2728
|
+
type RunTransform = (collection: string, transform: TransformFn) => Promise<void>;
|
|
2729
|
+
declare class SchemaFenceController {
|
|
2730
|
+
#private;
|
|
2731
|
+
constructor(opts: {
|
|
2732
|
+
store: NoydbStore;
|
|
2733
|
+
vault: string;
|
|
2734
|
+
onFlush: () => Promise<void>;
|
|
2735
|
+
clientId?: string;
|
|
2736
|
+
now?: () => number;
|
|
2737
|
+
staleMs?: number;
|
|
2738
|
+
quiesceTimeoutMs?: number;
|
|
2739
|
+
emit?: (e: {
|
|
2740
|
+
currentSchemaVersion: number;
|
|
2741
|
+
fenceState: FenceState;
|
|
2742
|
+
}) => void;
|
|
2743
|
+
});
|
|
2744
|
+
/** Capture the generation snapshot at vault-open. */
|
|
2745
|
+
init(): Promise<void>;
|
|
2746
|
+
/** Record a per-collection pending cutover (from a registration `cutover` decision). */
|
|
2747
|
+
registerPendingCutover(collection: string, transform: TransformFn): void;
|
|
2748
|
+
/** Write-path gate. Throws when behind, fenced, or this collection is cutover-pending. */
|
|
2749
|
+
assertWritable(collection: string): Promise<void>;
|
|
2750
|
+
/**
|
|
2751
|
+
* Admin trigger. Drain → wait for the active set to quiesce (or time out)
|
|
2752
|
+
* → migrate each pending transform → bump → complete → normal. The
|
|
2753
|
+
* migrator excludes itself from the barrier (it drained synchronously
|
|
2754
|
+
* here). `onPoll` (tests) advances other clients between barrier checks;
|
|
2755
|
+
* production falls back to a short real delay.
|
|
2756
|
+
*/
|
|
2757
|
+
runCutover(run: RunTransform, opts?: {
|
|
2758
|
+
onPoll?: () => Promise<void>;
|
|
2759
|
+
}): Promise<{
|
|
2760
|
+
migrated: number;
|
|
2761
|
+
}>;
|
|
2762
|
+
/** Recover a stuck drain: reset fenceState to normal at the current version (no bump). */
|
|
2763
|
+
abort(): Promise<void>;
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2552
2766
|
/**
|
|
2553
2767
|
* Zero-dependency JSON diff.
|
|
2554
2768
|
* Produces a flat list of changes between two plain objects.
|
|
@@ -3927,6 +4141,63 @@ declare function validatePublicEnvelopeInput(input: SetPublicEnvelopeInput, sche
|
|
|
3927
4141
|
*/
|
|
3928
4142
|
declare function isPublicEnvelope(x: unknown): x is PublicEnvelope;
|
|
3929
4143
|
|
|
4144
|
+
/**
|
|
4145
|
+
* Multi-tab coordination (#228a): primary/secondary election (Web Locks)
|
|
4146
|
+
* + presence heartbeat (BroadcastChannel). Browser-only; opt-in; no-op
|
|
4147
|
+
* when the APIs are absent. The lock/channel interfaces are hub-local
|
|
4148
|
+
* (structurally compatible with @noy-db/by-peer + @noy-db/by-tabs, but
|
|
4149
|
+
* not imported — those packages depend on hub).
|
|
4150
|
+
*/
|
|
4151
|
+
type TabRole = 'primary' | 'secondary' | 'unknown';
|
|
4152
|
+
interface TabPresence {
|
|
4153
|
+
readonly tabId: string;
|
|
4154
|
+
readonly lastSeen: number;
|
|
4155
|
+
readonly role: TabRole;
|
|
4156
|
+
}
|
|
4157
|
+
type Unsubscribe$1 = () => void;
|
|
4158
|
+
/** Structural subset of the Web Locks API / by-peer's MinimalLockManager. */
|
|
4159
|
+
interface TabLockManager {
|
|
4160
|
+
request<T>(name: string, options: {
|
|
4161
|
+
mode?: 'exclusive' | 'shared';
|
|
4162
|
+
signal?: AbortSignal;
|
|
4163
|
+
}, callback: (lock: unknown) => Promise<T>): Promise<T>;
|
|
4164
|
+
}
|
|
4165
|
+
/** Structural subset of by-peer's PeerChannel / a BroadcastChannel wrapper. */
|
|
4166
|
+
interface TabChannel {
|
|
4167
|
+
send(payload: string): void;
|
|
4168
|
+
on(event: 'message', listener: (payload: string) => void): Unsubscribe$1;
|
|
4169
|
+
on(event: 'close', listener: () => void): Unsubscribe$1;
|
|
4170
|
+
close(): void;
|
|
4171
|
+
readonly isOpen: boolean;
|
|
4172
|
+
}
|
|
4173
|
+
interface TabCoordinationOptions {
|
|
4174
|
+
readonly lockManager?: TabLockManager;
|
|
4175
|
+
readonly channel?: TabChannel;
|
|
4176
|
+
readonly tabId?: string;
|
|
4177
|
+
readonly lockName?: string;
|
|
4178
|
+
readonly heartbeatMs?: number;
|
|
4179
|
+
readonly staleMs?: number;
|
|
4180
|
+
readonly now?: () => number;
|
|
4181
|
+
/**
|
|
4182
|
+
* Close the channel on `dispose()`. Set this only for a channel the
|
|
4183
|
+
* coordinator owns (e.g. the one `defaultChannel()` created); leave it
|
|
4184
|
+
* false for a caller-injected channel so the coordinator never closes a
|
|
4185
|
+
* channel it didn't create. Default: false.
|
|
4186
|
+
*/
|
|
4187
|
+
readonly closeChannelOnDispose?: boolean;
|
|
4188
|
+
/**
|
|
4189
|
+
* Also propagate committed writes to other tabs (#228b). Default true:
|
|
4190
|
+
* when tab coordination is enabled and a channel is available, a write in
|
|
4191
|
+
* one tab refreshes that document in every other tab. Set false to opt out.
|
|
4192
|
+
*/
|
|
4193
|
+
readonly propagateWrites?: boolean;
|
|
4194
|
+
/**
|
|
4195
|
+
* Channel for write propagation (#228b) — distinct from the presence
|
|
4196
|
+
* channel. Default: an inline BroadcastChannel on `noydb:tab-writes`.
|
|
4197
|
+
*/
|
|
4198
|
+
readonly writeChannel?: TabChannel;
|
|
4199
|
+
}
|
|
4200
|
+
|
|
3930
4201
|
/**
|
|
3931
4202
|
* Per-vault tier-3 (PIN / quick-resume) state — issue #11.
|
|
3932
4203
|
*
|
|
@@ -4076,6 +4347,8 @@ interface AmendmentTxOptions {
|
|
|
4076
4347
|
* facade; its `put`/`delete`/`get` calls stage ops against the tx.
|
|
4077
4348
|
*/
|
|
4078
4349
|
declare class TxContext {
|
|
4350
|
+
/** Stable id for this transaction; shared by all writes it performs (#230). */
|
|
4351
|
+
readonly txId: string;
|
|
4079
4352
|
/** @internal */
|
|
4080
4353
|
readonly _ops: StagedOp[];
|
|
4081
4354
|
/**
|
|
@@ -4160,6 +4433,34 @@ declare class TxCollection<T> {
|
|
|
4160
4433
|
*/
|
|
4161
4434
|
declare function runTransaction<T>(db: Noydb, fn: (tx: TxContext) => Promise<T> | T, options?: AmendmentTxOptions): Promise<T>;
|
|
4162
4435
|
|
|
4436
|
+
/**
|
|
4437
|
+
* Dry-run transactions (#231). Runs the tx body to STAGE ops, then builds
|
|
4438
|
+
* the directly-affected diff (before = current committed via collection.get,
|
|
4439
|
+
* after = staged record) and collects guard violations — without executing
|
|
4440
|
+
* phase 2. No adapter writes, no write-hooks, no commit. MV/derivation
|
|
4441
|
+
* cascade is NOT simulated (v2). Mirrors the guard loop in
|
|
4442
|
+
* `Collection.putInternal` — keep the two in sync.
|
|
4443
|
+
*/
|
|
4444
|
+
|
|
4445
|
+
interface AffectedDocument {
|
|
4446
|
+
readonly vault: string;
|
|
4447
|
+
readonly op: 'create' | 'update' | 'delete';
|
|
4448
|
+
readonly collection: string;
|
|
4449
|
+
readonly docId: string;
|
|
4450
|
+
readonly before: unknown;
|
|
4451
|
+
readonly after: unknown;
|
|
4452
|
+
}
|
|
4453
|
+
interface GuardViolation {
|
|
4454
|
+
readonly vault: string;
|
|
4455
|
+
readonly collection: string;
|
|
4456
|
+
readonly docId: string;
|
|
4457
|
+
readonly message: string;
|
|
4458
|
+
}
|
|
4459
|
+
interface DryRunResult {
|
|
4460
|
+
readonly affected: ReadonlyArray<AffectedDocument>;
|
|
4461
|
+
readonly guardViolations: ReadonlyArray<GuardViolation>;
|
|
4462
|
+
}
|
|
4463
|
+
|
|
4163
4464
|
/**
|
|
4164
4465
|
* Policy gate DSL types — issue #9.
|
|
4165
4466
|
*
|
|
@@ -4328,8 +4629,12 @@ type ActiveTier = 1 | 2 | 3;
|
|
|
4328
4629
|
|
|
4329
4630
|
/** The top-level NOYDB instance. */
|
|
4330
4631
|
declare class Noydb {
|
|
4632
|
+
#private;
|
|
4331
4633
|
private readonly options;
|
|
4332
4634
|
private readonly emitter;
|
|
4635
|
+
private readonly writeQueueTracker;
|
|
4636
|
+
private readonly writeHooks;
|
|
4637
|
+
private readonly clientId;
|
|
4333
4638
|
private readonly vaultCache;
|
|
4334
4639
|
private readonly keyringCache;
|
|
4335
4640
|
private readonly syncEngines;
|
|
@@ -4362,6 +4667,10 @@ declare class Noydb {
|
|
|
4362
4667
|
private readonly publicEnvelopeSchema;
|
|
4363
4668
|
private closed;
|
|
4364
4669
|
private sessionTimer;
|
|
4670
|
+
/** Same-device multi-tab coordinator (#228); created on `enableTabCoordination()`. */
|
|
4671
|
+
private tabCoordinator;
|
|
4672
|
+
/** Cross-tab write relay (#228b); created on `enableTabCoordination()`. */
|
|
4673
|
+
private writeRelay;
|
|
4365
4674
|
/** Per-vault policy enforcers. */
|
|
4366
4675
|
private readonly policyEnforcers;
|
|
4367
4676
|
private readonly txStrategy;
|
|
@@ -4665,6 +4974,15 @@ declare class Noydb {
|
|
|
4665
4974
|
* to the vault's ledger as `op: 'amendment'`.
|
|
4666
4975
|
*/
|
|
4667
4976
|
transaction<T>(options: AmendmentTxOptions, fn: (tx: TxContext) => Promise<T> | T): Promise<T>;
|
|
4977
|
+
/**
|
|
4978
|
+
* Dry-run a transaction (#231): run the body to stage ops, then return
|
|
4979
|
+
* the directly-affected diff + collected guard violations WITHOUT
|
|
4980
|
+
* committing (no adapter writes, no write hooks). MV/derivation cascade
|
|
4981
|
+
* is not simulated. Requires `withTransactions()`.
|
|
4982
|
+
*/
|
|
4983
|
+
transaction(options: {
|
|
4984
|
+
readonly dryRun: true;
|
|
4985
|
+
}, fn: (tx: TxContext) => unknown): Promise<DryRunResult>;
|
|
4668
4986
|
/**
|
|
4669
4987
|
* Create a sync transaction for the given vault.
|
|
4670
4988
|
* The vault must already be open via `openVault()`.
|
|
@@ -4729,6 +5047,52 @@ declare class Noydb {
|
|
|
4729
5047
|
private getSyncEngine;
|
|
4730
5048
|
on<K extends keyof NoydbEventMap>(event: K, handler: (data: NoydbEventMap[K]) => void): void;
|
|
4731
5049
|
off<K extends keyof NoydbEventMap>(event: K, handler: (data: NoydbEventMap[K]) => void): void;
|
|
5050
|
+
/**
|
|
5051
|
+
* Observable write-queue for this hub instance. Reflects outstanding
|
|
5052
|
+
* in-flight writes across all collections. See {@link WriteQueue}.
|
|
5053
|
+
*
|
|
5054
|
+
* @example
|
|
5055
|
+
* window.addEventListener('beforeunload', (e) => {
|
|
5056
|
+
* if (db.writeQueue.pending) { e.preventDefault(); e.returnValue = '' }
|
|
5057
|
+
* })
|
|
5058
|
+
*/
|
|
5059
|
+
get writeQueue(): WriteQueue;
|
|
5060
|
+
/**
|
|
5061
|
+
* @internal Mutable tracker behind {@link writeQueue}. Threaded into
|
|
5062
|
+
* each Collection (via Vault) so `put`/`delete` can `track()` writes.
|
|
5063
|
+
* Not part of the public surface — consumers use `writeQueue`.
|
|
5064
|
+
*/
|
|
5065
|
+
get _writeQueueTracker(): WriteQueueTracker;
|
|
5066
|
+
/**
|
|
5067
|
+
* Register a hook that runs before each write (#230). Awaited; a throw
|
|
5068
|
+
* aborts the write. Returns an unsubscribe function.
|
|
5069
|
+
*/
|
|
5070
|
+
onBeforeWrite(handler: WriteHook): Unsubscribe$2;
|
|
5071
|
+
/**
|
|
5072
|
+
* Register a hook that runs after each committed write (#230). Awaited;
|
|
5073
|
+
* a handler error is warned, never rolled back. Returns an unsubscribe fn.
|
|
5074
|
+
*/
|
|
5075
|
+
onAfterWrite(handler: WriteHook): Unsubscribe$2;
|
|
5076
|
+
/** Subscribe to cross-tab write conflicts (#228c). Returns an unsubscribe. */
|
|
5077
|
+
onWriteConflict(fn: (c: WriteConflict) => void): Unsubscribe$2;
|
|
5078
|
+
/**
|
|
5079
|
+
* Enable same-device multi-tab coordination (#228): primary/secondary
|
|
5080
|
+
* election + presence. Browser-only — a graceful no-op (role 'unknown')
|
|
5081
|
+
* when Web Locks / BroadcastChannel are unavailable and nothing is
|
|
5082
|
+
* injected. Idempotent; returns a disposer.
|
|
5083
|
+
*/
|
|
5084
|
+
enableTabCoordination(opts?: TabCoordinationOptions): {
|
|
5085
|
+
dispose: () => void;
|
|
5086
|
+
};
|
|
5087
|
+
private disableTabCoordination;
|
|
5088
|
+
get tabRole(): TabRole;
|
|
5089
|
+
activeTabs(): TabPresence[];
|
|
5090
|
+
onTabRoleChange(fn: (r: TabRole) => void): Unsubscribe$2;
|
|
5091
|
+
onActiveTabsChange(fn: (t: TabPresence[]) => void): Unsubscribe$2;
|
|
5092
|
+
/** @internal The write-hook registry, threaded into each Collection. */
|
|
5093
|
+
get _writeHooks(): WriteHookRegistry;
|
|
5094
|
+
/** @internal Stable per-instance id for schema-cutover coordination (#232). */
|
|
5095
|
+
get _clientId(): string;
|
|
4732
5096
|
/**
|
|
4733
5097
|
* Soft-lock a single vault: clear its in-memory keyring, DEKs, vault
|
|
4734
5098
|
* instance, sync engine, policy enforcer, and active-tier entry —
|
|
@@ -6078,6 +6442,11 @@ declare class GuardRegistry {
|
|
|
6078
6442
|
register<T extends Record<string, unknown>>(spec: GuardStrategy<T>): void;
|
|
6079
6443
|
/** All guards registered against `collection` in registration order. */
|
|
6080
6444
|
guardsFor(collection: string): ReadonlyArray<AnyGuard>;
|
|
6445
|
+
/** Per-collection guard counts, for introspection (#229). */
|
|
6446
|
+
summary(): {
|
|
6447
|
+
collection: string;
|
|
6448
|
+
count: number;
|
|
6449
|
+
}[];
|
|
6081
6450
|
/**
|
|
6082
6451
|
* Run every guard's `check` for this collection. First throw wins —
|
|
6083
6452
|
* remaining guards are not invoked. Guards without a `check` skip.
|
|
@@ -6821,6 +7190,29 @@ interface PersistedSchemaEnvelope {
|
|
|
6821
7190
|
* @module
|
|
6822
7191
|
*/
|
|
6823
7192
|
|
|
7193
|
+
/** Flat snapshot of a vault's registered schema (#229). */
|
|
7194
|
+
interface SchemaIntrospection {
|
|
7195
|
+
readonly collections: ReadonlyArray<{
|
|
7196
|
+
name: string;
|
|
7197
|
+
docCount: number;
|
|
7198
|
+
}>;
|
|
7199
|
+
readonly guards: ReadonlyArray<{
|
|
7200
|
+
collection: string;
|
|
7201
|
+
count: number;
|
|
7202
|
+
}>;
|
|
7203
|
+
readonly materializedViews: ReadonlyArray<{
|
|
7204
|
+
name: string;
|
|
7205
|
+
sourceCollections: string[];
|
|
7206
|
+
}>;
|
|
7207
|
+
readonly schemaUpdate: ReadonlyArray<{
|
|
7208
|
+
collection: string;
|
|
7209
|
+
strategies: string[];
|
|
7210
|
+
}>;
|
|
7211
|
+
readonly grants: ReadonlyArray<{
|
|
7212
|
+
collection: string;
|
|
7213
|
+
permission: Permission;
|
|
7214
|
+
}>;
|
|
7215
|
+
}
|
|
6824
7216
|
/** Where the field-level info in the snapshot came from. */
|
|
6825
7217
|
type FieldSource = 'persisted' | 'live-validator' | 'sampled' | 'unknown';
|
|
6826
7218
|
interface FieldDescriptor {
|
|
@@ -6929,6 +7321,7 @@ interface VaultIntrospectState {
|
|
|
6929
7321
|
|
|
6930
7322
|
/** A vault (tenant namespace) containing collections. */
|
|
6931
7323
|
declare class Vault {
|
|
7324
|
+
#private;
|
|
6932
7325
|
private readonly adapter;
|
|
6933
7326
|
/** The vault's name as passed to `openVault()`. Stable for the instance lifetime. */
|
|
6934
7327
|
readonly name: string;
|
|
@@ -7031,6 +7424,8 @@ declare class Vault {
|
|
|
7031
7424
|
*/
|
|
7032
7425
|
private readonly reloadKeyring;
|
|
7033
7426
|
private readonly collectionCache;
|
|
7427
|
+
/** #232 — vault-level schema cutover fence/controller. */
|
|
7428
|
+
readonly schemaFence: SchemaFenceController;
|
|
7034
7429
|
/**
|
|
7035
7430
|
* per-collection `blobFields` retention/TTL config.
|
|
7036
7431
|
* Populated on `collection({ blobFields })` and read by
|
|
@@ -7263,6 +7658,13 @@ declare class Vault {
|
|
|
7263
7658
|
* @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
|
|
7264
7659
|
*/
|
|
7265
7660
|
persistJsonSchema?: boolean;
|
|
7661
|
+
/**
|
|
7662
|
+
* Ordered schema-update strategies (#245). On a detected schema
|
|
7663
|
+
* change, evaluated in order; the first non-`allow` decision wins.
|
|
7664
|
+
* A `reject` is enforced at the write path (`put`/`delete` throw).
|
|
7665
|
+
* Requires `persistJsonSchema: true` (detection needs the baseline).
|
|
7666
|
+
*/
|
|
7667
|
+
schemaUpdate?: readonly SchemaUpdateStrategy[];
|
|
7266
7668
|
/** — declare the per-field schema for document attestation (issue side). */
|
|
7267
7669
|
attestation?: AttestationFieldSchema;
|
|
7268
7670
|
}): Collection<T>;
|
|
@@ -7272,6 +7674,45 @@ declare class Vault {
|
|
|
7272
7674
|
* Used in tests; production code does not need to call this.
|
|
7273
7675
|
*/
|
|
7274
7676
|
_drainPendingSchemaWrites(): Promise<void>;
|
|
7677
|
+
/**
|
|
7678
|
+
* Run a coordinated schema cutover (#232). Drains pending writes, waits
|
|
7679
|
+
* for the active client set to quiesce (the ack-barrier), applies every
|
|
7680
|
+
* pending collection transform in bulk, bumps the vault schema generation,
|
|
7681
|
+
* and clears the fence. Returns the count of collections migrated.
|
|
7682
|
+
* `opts.onPoll` (tests) advances other clients between barrier checks.
|
|
7683
|
+
*/
|
|
7684
|
+
runSchemaCutover(opts?: {
|
|
7685
|
+
onPoll?: () => Promise<void>;
|
|
7686
|
+
}): Promise<{
|
|
7687
|
+
migrated: number;
|
|
7688
|
+
}>;
|
|
7689
|
+
/**
|
|
7690
|
+
* #228b — refresh a loaded collection's view of one document from a peer
|
|
7691
|
+
* tab's broadcast. No-op when the collection isn't loaded in this tab
|
|
7692
|
+
* (it will read fresh on next open). Mirrors #runCutoverTransform's guard.
|
|
7693
|
+
*/
|
|
7694
|
+
_applyRemoteWrite(collectionName: string, docId: string, action: 'put' | 'delete'): Promise<void>;
|
|
7695
|
+
/**
|
|
7696
|
+
* #228c — for a detected conflict: capture this tab's clobbered record,
|
|
7697
|
+
* read the common ancestor from history, converge the cache to the store's
|
|
7698
|
+
* authoritative value (the (b) re-read), and return all three for the
|
|
7699
|
+
* WriteConflict payload. Returns null when the collection isn't loaded.
|
|
7700
|
+
*/
|
|
7701
|
+
_captureAndConverge(collectionName: string, docId: string, action: 'put' | 'delete', baseV: number): Promise<{
|
|
7702
|
+
local: unknown;
|
|
7703
|
+
remote: unknown;
|
|
7704
|
+
base: unknown;
|
|
7705
|
+
} | null>;
|
|
7706
|
+
/** Recover a stuck cutover fence (#232) — reset to normal without bumping. */
|
|
7707
|
+
abortSchemaCutover(): Promise<void>;
|
|
7708
|
+
/** Current schema-cutover fence state for this vault (#232/#233). Thin live read. */
|
|
7709
|
+
schemaFenceState(): Promise<FenceDoc>;
|
|
7710
|
+
/** @internal Start the per-client heartbeat + fence watcher once a cutover is registered (#232). */
|
|
7711
|
+
_ensureFenceCoordination(): void;
|
|
7712
|
+
/** @internal Stop the heartbeat/watcher (vault lock/close). */
|
|
7713
|
+
_stopFenceCoordination(): void;
|
|
7714
|
+
/** @internal Drive one heartbeat + watch cycle deterministically (tests). */
|
|
7715
|
+
_fenceTick(): Promise<void>;
|
|
7275
7716
|
/**
|
|
7276
7717
|
* Validate i18nText fields on a `put()`. Called by Collection just
|
|
7277
7718
|
* before the adapter write, after schema validation. Throws
|
|
@@ -7918,6 +8359,14 @@ declare class Vault {
|
|
|
7918
8359
|
* @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
|
|
7919
8360
|
*/
|
|
7920
8361
|
dumpSchema(opts?: DumpSchemaOptions): Promise<VaultSchemaSnapshot>;
|
|
8362
|
+
/**
|
|
8363
|
+
* Lightweight read of the vault's registered schema (#229): collections
|
|
8364
|
+
* (+ doc counts), guards, materialized views, schema-update strategies,
|
|
8365
|
+
* and the unlocked user's grants. Cheap — one `adapter.list` per
|
|
8366
|
+
* collection, no decryption. For a full snapshot + stats use dumpSchema().
|
|
8367
|
+
* Post-unlock by construction (a Vault only exists with an unlocked keyring).
|
|
8368
|
+
*/
|
|
8369
|
+
introspect(): Promise<SchemaIntrospection>;
|
|
7921
8370
|
/**
|
|
7922
8371
|
* Internal accessor for {@link dumpVaultSchema}. Exposes the structural
|
|
7923
8372
|
* state the walker needs (collection cache, registries, ref registry,
|
|
@@ -8394,12 +8843,18 @@ interface CacheStats extends LruStats {
|
|
|
8394
8843
|
}
|
|
8395
8844
|
/** A typed collection of records within a vault. */
|
|
8396
8845
|
declare class Collection<T> {
|
|
8846
|
+
#private;
|
|
8397
8847
|
private readonly adapter;
|
|
8398
8848
|
private readonly vault;
|
|
8399
8849
|
private readonly name;
|
|
8400
8850
|
private readonly keyring;
|
|
8401
8851
|
private readonly encrypted;
|
|
8402
8852
|
private readonly emitter;
|
|
8853
|
+
private readonly writeQueue;
|
|
8854
|
+
private readonly schemaUpdateGate;
|
|
8855
|
+
private readonly schemaFence;
|
|
8856
|
+
private readonly writeHooks;
|
|
8857
|
+
private readonly activeTxId;
|
|
8403
8858
|
private readonly getDEK;
|
|
8404
8859
|
private readonly onDirty;
|
|
8405
8860
|
private readonly historyConfig;
|
|
@@ -8667,6 +9122,21 @@ declare class Collection<T> {
|
|
|
8667
9122
|
keyring: UnlockedKeyring;
|
|
8668
9123
|
encrypted: boolean;
|
|
8669
9124
|
emitter: NoydbEventEmitter;
|
|
9125
|
+
/**
|
|
9126
|
+
* Vault-level in-flight write tracker (#227). When present,
|
|
9127
|
+
* `put`/`delete` run inside `writeQueue.track()` so `hub.writeQueue`
|
|
9128
|
+
* reflects outstanding writes. Optional so direct Collection
|
|
9129
|
+
* construction in tests still works untracked.
|
|
9130
|
+
*/
|
|
9131
|
+
writeQueue?: WriteQueueTracker | undefined;
|
|
9132
|
+
/** #245 — per-collection schema-update gate; `put`/`delete` await it. */
|
|
9133
|
+
schemaUpdateGate?: SchemaUpdateGate | undefined;
|
|
9134
|
+
/** #232 — vault-level fence controller; `put`/`delete` consult it. */
|
|
9135
|
+
schemaFence?: SchemaFenceController | undefined;
|
|
9136
|
+
/** #230 — hub-level write-hook registry; fired around put/delete. */
|
|
9137
|
+
writeHooks?: WriteHookRegistry | undefined;
|
|
9138
|
+
/** #230 — active transaction id supplier (null outside a transaction). */
|
|
9139
|
+
activeTxId?: (() => string | null) | undefined;
|
|
8670
9140
|
getDEK: (collectionName: string) => Promise<CryptoKey>;
|
|
8671
9141
|
historyConfig?: HistoryConfig | undefined;
|
|
8672
9142
|
onDirty?: OnDirtyCallback | undefined;
|
|
@@ -8982,7 +9452,8 @@ declare class Collection<T> {
|
|
|
8982
9452
|
pollIntervalMs?: number;
|
|
8983
9453
|
}): PresenceHandle<P>;
|
|
8984
9454
|
/**
|
|
8985
|
-
* Create or update a record.
|
|
9455
|
+
* Create or update a record. Runs inside the hub's write-queue tracker
|
|
9456
|
+
* (#227) so `hub.writeQueue.pending` reflects this write.
|
|
8986
9457
|
*
|
|
8987
9458
|
* @param id Record identifier.
|
|
8988
9459
|
* @param record The record body (validated by the collection's schema
|
|
@@ -8995,6 +9466,8 @@ declare class Collection<T> {
|
|
|
8995
9466
|
put(id: string, record: T, options?: {
|
|
8996
9467
|
readonly reason?: string;
|
|
8997
9468
|
}): Promise<void>;
|
|
9469
|
+
/** @internal Untracked put body — call {@link put}, not this. */
|
|
9470
|
+
private putInternal;
|
|
8998
9471
|
/**
|
|
8999
9472
|
* Fire registered MV strategies whose dependency set includes this
|
|
9000
9473
|
* collection. Eager-mode MVs re-materialize inline via
|
|
@@ -9020,8 +9493,20 @@ declare class Collection<T> {
|
|
|
9020
9493
|
* cycle detection.
|
|
9021
9494
|
*/
|
|
9022
9495
|
private dispatchDerivations;
|
|
9023
|
-
/**
|
|
9496
|
+
/**
|
|
9497
|
+
* Delete a record by ID. Runs inside the hub's write-queue tracker
|
|
9498
|
+
* (#227) so `hub.writeQueue.pending` reflects this write.
|
|
9499
|
+
*/
|
|
9024
9500
|
delete(id: string): Promise<void>;
|
|
9501
|
+
/**
|
|
9502
|
+
* @internal #232 — bulk-rewrite every record through a cutover transform.
|
|
9503
|
+
* Raw adapter path (bypasses the write gate + guards — the transform is
|
|
9504
|
+
* trusted and runs only during the `migrating` phase). Bumps each
|
|
9505
|
+
* record's `_v` and appends a ledger `op:'migration'` entry.
|
|
9506
|
+
*/
|
|
9507
|
+
_applyCutoverTransform(transform: (doc: Record<string, unknown>) => Record<string, unknown>): Promise<number>;
|
|
9508
|
+
/** @internal Untracked delete body — call {@link delete}, not this. */
|
|
9509
|
+
private deleteInternal;
|
|
9025
9510
|
/**
|
|
9026
9511
|
* @internal — system-internal delete that bypasses user-facing
|
|
9027
9512
|
* delete hooks (`onDelete`, accounting-period guard, FK ref
|
|
@@ -9358,6 +9843,15 @@ declare class Collection<T> {
|
|
|
9358
9843
|
* gone before the tx and the revert deleted it again).
|
|
9359
9844
|
*/
|
|
9360
9845
|
_invalidateCacheEntry(id: string): Promise<void>;
|
|
9846
|
+
/**
|
|
9847
|
+
* #228b — apply a peer tab's committed write to THIS tab's in-memory view:
|
|
9848
|
+
* re-read the (already-persisted) envelope from the shared store + refresh
|
|
9849
|
+
* cache/indexes, then emit a `change` event so reactive consumers re-render.
|
|
9850
|
+
* Never writes to the store and never fires write hooks, so it cannot loop.
|
|
9851
|
+
*/
|
|
9852
|
+
_applyRemoteChange(id: string, action: 'put' | 'delete'): Promise<void>;
|
|
9853
|
+
/** @internal #228c — the current in-memory record without a store read (for conflict capture). */
|
|
9854
|
+
_peekCached(id: string): T | null;
|
|
9361
9855
|
private ensureHydrated;
|
|
9362
9856
|
/** Hydrate from a pre-loaded snapshot (used by Vault). */
|
|
9363
9857
|
hydrateFromSnapshot(records: Record<string, EncryptedEnvelope>): Promise<void>;
|
|
@@ -9783,6 +10277,7 @@ interface ShadowStrategy {
|
|
|
9783
10277
|
*/
|
|
9784
10278
|
interface TxStrategy {
|
|
9785
10279
|
runTransaction<T>(db: Noydb, fn: (tx: TxContext) => Promise<T> | T, options?: AmendmentTxOptions): Promise<T>;
|
|
10280
|
+
runDryRun(db: Noydb, fn: (tx: TxContext) => unknown): Promise<DryRunResult>;
|
|
9786
10281
|
}
|
|
9787
10282
|
|
|
9788
10283
|
/**
|
|
@@ -10874,6 +11369,23 @@ interface Conflict {
|
|
|
10874
11369
|
*/
|
|
10875
11370
|
readonly resolve?: (winner: EncryptedEnvelope | null) => void;
|
|
10876
11371
|
}
|
|
11372
|
+
/**
|
|
11373
|
+
* #228c — a same-device cross-tab write conflict: another tab overwrote a
|
|
11374
|
+
* document this tab had written, having diverged from an older base. Records
|
|
11375
|
+
* are decrypted (cross-tab handlers reconcile in plaintext). `base` is the
|
|
11376
|
+
* common ancestor from history, or null when history is unavailable.
|
|
11377
|
+
*/
|
|
11378
|
+
interface WriteConflict {
|
|
11379
|
+
readonly vault: string;
|
|
11380
|
+
readonly collection: string;
|
|
11381
|
+
readonly docId: string;
|
|
11382
|
+
readonly local: unknown;
|
|
11383
|
+
readonly remote: unknown;
|
|
11384
|
+
readonly base: unknown;
|
|
11385
|
+
readonly localVersion: number;
|
|
11386
|
+
readonly remoteVersion: number;
|
|
11387
|
+
readonly baseVersion: number;
|
|
11388
|
+
}
|
|
10877
11389
|
type ConflictStrategy = 'local-wins' | 'remote-wins' | 'version' | ((conflict: Conflict) => 'local' | 'remote');
|
|
10878
11390
|
/**
|
|
10879
11391
|
* Collection-level conflict policy.
|
|
@@ -10960,9 +11472,20 @@ interface ChangeEvent {
|
|
|
10960
11472
|
interface NoydbEventMap {
|
|
10961
11473
|
'change': ChangeEvent;
|
|
10962
11474
|
'error': Error;
|
|
11475
|
+
/**
|
|
11476
|
+
* Same-instance signal that this vault's schema-fence state changed
|
|
11477
|
+
* (#232). For UI integration (#233). Cross-client coordination goes
|
|
11478
|
+
* through the store, not this event.
|
|
11479
|
+
*/
|
|
11480
|
+
'schema:fence-changed': {
|
|
11481
|
+
vault: string;
|
|
11482
|
+
currentSchemaVersion: number;
|
|
11483
|
+
fenceState: 'normal' | 'draining' | 'migrating' | 'complete';
|
|
11484
|
+
};
|
|
10963
11485
|
'sync:push': PushResult;
|
|
10964
11486
|
'sync:pull': PullResult;
|
|
10965
11487
|
'sync:conflict': Conflict;
|
|
11488
|
+
'write:conflict': WriteConflict;
|
|
10966
11489
|
'sync:online': void;
|
|
10967
11490
|
'sync:offline': void;
|
|
10968
11491
|
'sync:backup-error': {
|
|
@@ -11967,4 +12490,4 @@ interface DeleteManyResult {
|
|
|
11967
12490
|
}>;
|
|
11968
12491
|
}
|
|
11969
12492
|
|
|
11970
|
-
export { type ConsentAuditEntry as $, type BlobObject as A, type BlobStrategy as B, type BlobPutOptions as C, DICT_COLLECTION_PREFIX as D, type BlobResponseOptions as E, BlobSet as F, type BlobStrategyOpenArgs as G, type CompactRunOptions as H, type I18nStrategy as I, type CompactionContext as J, type CompactionResult as K, DEFAULT_CHUNK_SIZE as L, EXPORT_AUDIT_COLLECTION as M, ExportBlobsAbortedError as N, type ExportBlobsAuditEntry as O, PolicyEnforcer as P, type ExportBlobsHandle as Q, type ExportBlobsOptions as R, type SessionStrategy as S, type ExportedBlob as T, type SlotInfo as U, type SlotRecord as V, type VersionRecord as W, createExportBlobsHandle as X, runCompaction as Y, type ConsentStrategy as Z, CONSENT_AUDIT_COLLECTION as _, type DictEntry as a, VaultInstant as a$, type ConsentAuditFilter as a0, type ConsentContext as a1, type ConsentOp as a2, loadConsentEntries as a3, writeConsentEntry as a4, type PeriodsStrategy as a5, type CarryForwardContext as a6, type ClosePeriodOptions as a7, type OpenPeriodOptions as a8, PERIODS_COLLECTION as a9, type DerivationStrategyHandle as aA, type DerivedFromMeta as aB, type OutputSpec as aC, type RecordOutputSpec as aD, type MaterializedViewStrategy as aE, type MaterializedViewStrategyHandle as aF, type OverlayedViewStrategy as aG, Collection as aH, OverlayedViewRegistry as aI, type OverlayedViewStrategyHandle as aJ, type SyncStrategy as aK, type Role as aL, type UnlockedKeyring as aM, type HistoryStrategy as aN, type NoydbStore as aO, type HistoryOptions as aP, type EncryptedEnvelope as aQ, type PruneOptions as aR, type AppendInput as aS, type ChangeType as aT, CollectionInstant as aU, type DiffEntry as aV, type JsonPatch as aW, type JsonPatchOp as aX, type LedgerEntry as aY, LedgerStore as aZ, type VaultEngine as a_, type PeriodRecord as aa, type ReadOnlyCollection as ab, appendPeriodLedgerEntry as ac, assertTsWritable as ad, chainAnchor as ae, loadPeriods as af, validatePeriodName as ag, type GuardStrategy as ah, type GuardChange as ai, type GuardContext as aj, GuardRegistry as ak, type GuardStrategyHandle as al, ReadOnlyVaultFacade as am, type ShadowStrategy as an, CollectionFrame as ao, VaultFrame as ap, type TxStrategy as aq, type AmendmentTxOptions as ar, TxCollection as as, TxContext as at, TxVault as au, runTransaction as av, type DerivationStrategy as aw, type DerivationContext as ax, type ArrayOutputSpec as ay, DerivationRegistry as az, type DictKeyDescriptor as b, type ExportChunk as b$, type VerifyResult as b0, applyPatch as b1, canonicalJson as b2, computePatch as b3, diff as b4, formatDiff as b5, hashEntry as b6, paddedIndex as b7, parseIndex as b8, sha256Hex as b9, type CacheOptions as bA, type CacheStats as bB, type ChangeEvent as bC, type CollectionChangeEvent as bD, type CollectionConflictResolver as bE, type CollectionDescriptor as bF, type CollectionStats as bG, type Conflict as bH, type ConflictPolicy as bI, type ConflictStrategy as bJ, type CrossTierAccessEvent as bK, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as bL, DELEGATIONS_COLLECTION as bM, type DeepPartial as bN, type DeepPartialOrNull as bO, type DelegationToken as bP, type DeleteManyResult as bQ, type DerivationDescriptor as bR, type DirtyEntry as bS, type DumpSchemaOptions as bT, ELEVATION_AUDIT_COLLECTION as bU, ElevatedHandle as bV, type EnrollAuthenticatorOptions as bW, type EnrollAuthenticatorWrappingDEKsOptions as bX, type EnrollAuthenticatorWrappingKEKOptions as bY, type EnrollRecoveryResult as bZ, type ExportCapability as b_, type PublicEnvelope as ba, type SealingKeyProvider as bb, type BundleRecipient as bc, type RecipientSealer as bd, type RecipientHint as be, Vault as bf, type RecoveryEnrollmentInput as bg, type ShamirRecoveryProvider as bh, type MVQueryContext as bi, type RegisteredMV as bj, MaterializedViewRegistry as bk, type MaterializedFromMeta as bl, type MaterializedViewOutput as bm, type UnionSource as bn, type UserEnvelope as bo, type GateName as bp, type GatePolicy as bq, type VaultPolicy as br, type ActiveTier as bs, type FactorProof as bt, type PersistedSchemaEnvelope as bu, type DirectoryConfig as bv, type UserVisibility as bw, type AccessibleVault as bx, BUNDLE_STORE_POLICY as by, type BuiltInGateName as bz, DictionaryHandle as c, type PullPolicy as c$, type ExportFormat as c0, type ExportStreamOptions as c1, type FactorKind as c2, type FactorProofBundle as c3, type FactorRequirement as c4, type FieldDescriptor as c5, type FieldSource as c6, type GhostRecord as c7, type GrantOptions as c8, type HistoryConfig as c9, MemorySealingKeyProvider as cA, NOYDB_BACKUP_VERSION as cB, NOYDB_FORMAT_VERSION as cC, NOYDB_KEYRING_VERSION as cD, NOYDB_SYNC_VERSION as cE, Noydb as cF, type NoydbBundleStore as cG, type NoydbEventMap as cH, type NoydbOptions as cI, type OverlayViewDescriptor as cJ, PUBLIC_ENVELOPE_FIELDS as cK, type PaperRecoveryDoc as cL, type PaperRecoveryEntry as cM, type PassphrasePolicy as cN, type PassphraseValidationResult as cO, type Permission as cP, type Permissions as cQ, type PersistedSchemaKind as cR, type PlaintextTranslatorContext as cS, type PlaintextTranslatorFn as cT, PresenceHandle as cU, type PresencePeer as cV, type PublicEnvelopeField as cW, type PublicEnvelopeSchema as cX, type PublicEnvelopeText as cY, type PullMode as cZ, type PullOptions as c_, type HistoryEntry as ca, INDEXED_STORE_POLICY as cb, type ImportCapability as cc, type InferOutput as cd, type InternalCollectionStats as ce, type IssueDelegationOptions as cf, type IssueMagicLinkGrantOptions as cg, type KeyringAuthenticator as ch, type KeyringAuthenticatorWrappingDEKs as ci, type KeyringAuthenticatorWrappingKEK as cj, type KeyringFile as ck, type ListAccessibleVaultsOptions as cl, type ListPageResult as cm, type ListUsersOptions as cn, type LiveUserEnvelope as co, type LocaleReadOptions as cp, Lru as cq, type LruOptions as cr, type LruStats as cs, MAGIC_LINK_CONTENT_INFO_PREFIX as ct, MAGIC_LINK_GRANTS_COLLECTION as cu, MAGIC_LINK_KEK_INFO_PREFIX as cv, type MagicLinkGrantPayload as cw, type MagicLinkGrantRecord as cx, type MaterializedViewDescriptor as cy, MemoryRecipientSealer as cz, type DictionaryOptions as d, type VaultSchemaSnapshot as d$, type PullResult as d0, type PushMode as d1, type PushOptions as d2, type PushPolicy as d3, type PushResult as d4, type PutManyItemOptions as d5, type PutManyOptions as d6, type PutManyResult as d7, type QueryAcrossOptions as d8, type QueryAcrossResult as d9, type StoreAuthKind as dA, type StoreCapabilities as dB, SyncEngine as dC, type SyncMetadata as dD, type SyncPolicy as dE, SyncScheduler as dF, type SyncSchedulerStatus as dG, type SyncStatus as dH, type SyncTarget as dI, type SyncTargetRole as dJ, SyncTransaction as dK, type SyncTransactionResult as dL, type TierMode as dM, type TranslatorAuditEntry as dN, type TxOp as dO, USER_ENVELOPE_COLLECTION as dP, USER_ENVELOPE_MAX_BYTES as dQ, type Unsubscribe as dR, type UpdateAuthenticatorOptions as dS, type UpdateUserOptions as dT, UserApi as dU, type UserEnvelopeCheckGate as dV, UserEnvelopeOversizedError as dW, type UserEnvelopePresented as dX, type UserInfo as dY, type VaultBackup as dZ, type VaultPolicyOnDisk as d_, type QuickUnlockState as da, QuickUnlockStore as db, type ReAuthOperation as dc, type RecoverPassphraseInput as dd, type RecoverPassphraseResult as de, type RecoverUserOptions as df, type RecoveryProof as dg, type ResolvedPublicEnvelopeSchema as dh, type RevokeOptions as di, type RotatePassphraseInput as dj, type RotateRecoveryOptions as dk, type RotateRecoveryResult as dl, SEALED_PASSPHRASE_RECORD_ID as dm, type SealedEnvelope as dn, type SealedPassphrase as dp, type SessionPolicy as dq, type SetPublicEnvelopeInput as dr, type ShamirRecoveryDoc as ds, type ShamirRecoveryEntry as dt, type SlotRewrapCeremony as du, type SlotRewrapContext as dv, type StandardSchemaV1 as dw, type StandardSchemaV1Issue as dx, type StandardSchemaV1SyncResult as dy, type StoreAuth as dz, type I18nTextDescriptor as e, type VaultSnapshot as e0, type WarningRules as e1, WeakPassphraseError as e2, type WeakPassphraseReason as e3, type WrappedDeksBlob as e4, assertStrongPassphrase as e5, buildRecipientKeyringFile as e6, burnPaperRecoveryEntry as e7, createNoydb as e8, createStore as e9, readMagicLinkGrantRecord as eA, recoverUser as eB, removeAuthenticator as eC, resolveSchema as eD, revokeDelegation as eE, revokeMagicLinkGrant as eF, savePaperRecoveryEntries as eG, saveSealedPassphrase as eH, saveShamirRecoveryEntries as eI, unwrapDeksFromBlob as eJ, unwrapDeksFromPaperEntry as eK, unwrapDeksFromShamirEntry as eL, unwrapMagicLinkGrant as eM, validatePassphrase as eN, validatePublicEnvelopeInput as eO, validateSchemaInput as eP, validateSchemaOutput as eQ, writeMagicLinkGrant as eR, changeSecret as eS, createOwnerKeyring as eT, ensureCollectionDEK as eU, grant as eV, loadKeyring as eW, persistKeyring as eX, revoke as eY, updateAuthenticator as eZ, updateKeyringIdentity as e_, deriveMagicLinkContentKey as ea, enrollAuthenticator as eb, estimateEntropy as ec, evaluateExportCapability as ed, evaluateImportCapability as ee, findAuthenticator as ef, hasExportCapability as eg, hasImportCapability as eh, hasRecoveryEnrolled as ei, isMagicLinkGrantExpired as ej, isPublicEnvelope as ek, issueDelegation as el, recoverPassphrase as em, rotatePassphrase as en, listMagicLinkGrants as eo, listUsers as ep, listUsersWithEnvelopes as eq, loadActiveDelegations as er, loadPaperRecoveryEntries as es, loadSealedPassphrase as et, loadShamirRecoveryEntries as eu, magicLinkGrantRecordId as ev, mintPaperRecoveryEntry as ew, mintShamirRecoveryEntry as ex, mintWrappedDeksBlob as ey, parseSealedEnvelope as ez, type I18nTextOptions as f, applyI18nLocale as g, dictCollectionName as h, dictKey as i, i18nText as j, isDictCollectionName as k, isDictKeyDescriptor as l, isI18nTextDescriptor as m, createEnforcer as n, validateSessionPolicy as o, BLOB_CHUNKS_COLLECTION as p, BLOB_COLLECTION as q, resolveI18nText as r, BLOB_EVICTION_AUDIT_COLLECTION as s, BLOB_INDEX_COLLECTION as t, BLOB_SLOTS_PREFIX as u, validateI18nTextValue as v, BLOB_VERSIONS_PREFIX as w, type BlobEvictionEntry as x, type BlobFieldPolicy as y, type BlobFieldsConfig as z };
|
|
12493
|
+
export { type ConsentAuditEntry as $, type BlobObject as A, type BlobStrategy as B, type BlobPutOptions as C, DICT_COLLECTION_PREFIX as D, type BlobResponseOptions as E, BlobSet as F, type BlobStrategyOpenArgs as G, type CompactRunOptions as H, type I18nStrategy as I, type CompactionContext as J, type CompactionResult as K, DEFAULT_CHUNK_SIZE as L, EXPORT_AUDIT_COLLECTION as M, ExportBlobsAbortedError as N, type ExportBlobsAuditEntry as O, PolicyEnforcer as P, type ExportBlobsHandle as Q, type ExportBlobsOptions as R, type SessionStrategy as S, type ExportedBlob as T, type SlotInfo as U, type SlotRecord as V, type VersionRecord as W, createExportBlobsHandle as X, runCompaction as Y, type ConsentStrategy as Z, CONSENT_AUDIT_COLLECTION as _, type DictEntry as a, VaultInstant as a$, type ConsentAuditFilter as a0, type ConsentContext as a1, type ConsentOp as a2, loadConsentEntries as a3, writeConsentEntry as a4, type PeriodsStrategy as a5, type CarryForwardContext as a6, type ClosePeriodOptions as a7, type OpenPeriodOptions as a8, PERIODS_COLLECTION as a9, type DerivationStrategyHandle as aA, type DerivedFromMeta as aB, type OutputSpec as aC, type RecordOutputSpec as aD, type MaterializedViewStrategy as aE, type MaterializedViewStrategyHandle as aF, type OverlayedViewStrategy as aG, Collection as aH, OverlayedViewRegistry as aI, type OverlayedViewStrategyHandle as aJ, type SyncStrategy as aK, type Role as aL, type UnlockedKeyring as aM, type HistoryStrategy as aN, type NoydbStore as aO, type HistoryOptions as aP, type EncryptedEnvelope as aQ, type PruneOptions as aR, type AppendInput as aS, type ChangeType as aT, CollectionInstant as aU, type DiffEntry as aV, type JsonPatch as aW, type JsonPatchOp as aX, type LedgerEntry as aY, LedgerStore as aZ, type VaultEngine as a_, type PeriodRecord as aa, type ReadOnlyCollection as ab, appendPeriodLedgerEntry as ac, assertTsWritable as ad, chainAnchor as ae, loadPeriods as af, validatePeriodName as ag, type GuardStrategy as ah, type GuardChange as ai, type GuardContext as aj, GuardRegistry as ak, type GuardStrategyHandle as al, ReadOnlyVaultFacade as am, type ShadowStrategy as an, CollectionFrame as ao, VaultFrame as ap, type TxStrategy as aq, type AmendmentTxOptions as ar, TxCollection as as, TxContext as at, TxVault as au, runTransaction as av, type DerivationStrategy as aw, type DerivationContext as ax, type ArrayOutputSpec as ay, DerivationRegistry as az, type DictKeyDescriptor as b, type EnrollAuthenticatorOptions as b$, type VerifyResult as b0, applyPatch as b1, canonicalJson as b2, computePatch as b3, diff as b4, formatDiff as b5, hashEntry as b6, paddedIndex as b7, parseIndex as b8, sha256Hex as b9, type AccessibleVault as bA, type AffectedDocument as bB, BUNDLE_STORE_POLICY as bC, type BuiltInGateName as bD, type CacheOptions as bE, type CacheStats as bF, type ChangeEvent as bG, type CollectionChangeEvent as bH, type CollectionConflictResolver as bI, type CollectionDescriptor as bJ, type CollectionStats as bK, type Conflict as bL, type ConflictPolicy as bM, type ConflictStrategy as bN, type CrossTierAccessEvent as bO, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as bP, DELEGATIONS_COLLECTION as bQ, type DeepPartial as bR, type DeepPartialOrNull as bS, type DelegationToken as bT, type DeleteManyResult as bU, type DerivationDescriptor as bV, type DirtyEntry as bW, type DryRunResult as bX, type DumpSchemaOptions as bY, ELEVATION_AUDIT_COLLECTION as bZ, ElevatedHandle as b_, type PublicEnvelope as ba, type SealingKeyProvider as bb, type BundleRecipient as bc, type RecipientSealer as bd, type RecipientHint as be, Vault as bf, type RecoveryEnrollmentInput as bg, type ShamirRecoveryProvider as bh, type MVQueryContext as bi, type RegisteredMV as bj, MaterializedViewRegistry as bk, type MaterializedFromMeta as bl, type MaterializedViewOutput as bm, type UnionSource as bn, type UserEnvelope as bo, type GateName as bp, type GatePolicy as bq, type VaultPolicy as br, type ActiveTier as bs, type FactorProof as bt, type SchemaUpdateStrategy as bu, type TransformFn as bv, type PersistedSchemaEnvelope as bw, type UpdateDecision as bx, type DirectoryConfig as by, type UserVisibility as bz, DictionaryHandle as c, type PlaintextTranslatorContext as c$, type EnrollAuthenticatorWrappingDEKsOptions as c0, type EnrollAuthenticatorWrappingKEKOptions as c1, type EnrollRecoveryResult as c2, type ExportCapability as c3, type ExportChunk as c4, type ExportFormat as c5, type ExportStreamOptions as c6, type FactorKind as c7, type FactorProofBundle as c8, type FactorRequirement as c9, type LruOptions as cA, type LruStats as cB, MAGIC_LINK_CONTENT_INFO_PREFIX as cC, MAGIC_LINK_GRANTS_COLLECTION as cD, MAGIC_LINK_KEK_INFO_PREFIX as cE, type MagicLinkGrantPayload as cF, type MagicLinkGrantRecord as cG, type MaterializedViewDescriptor as cH, MemoryRecipientSealer as cI, MemorySealingKeyProvider as cJ, NOYDB_BACKUP_VERSION as cK, NOYDB_FORMAT_VERSION as cL, NOYDB_KEYRING_VERSION as cM, NOYDB_SYNC_VERSION as cN, Noydb as cO, type NoydbBundleStore as cP, type NoydbEventMap as cQ, type NoydbOptions as cR, type OverlayViewDescriptor as cS, PUBLIC_ENVELOPE_FIELDS as cT, type PaperRecoveryDoc as cU, type PaperRecoveryEntry as cV, type PassphrasePolicy as cW, type PassphraseValidationResult as cX, type Permission as cY, type Permissions as cZ, type PersistedSchemaKind as c_, type FenceDoc as ca, type FenceState as cb, type FieldChange as cc, type FieldDescriptor as cd, type FieldSource as ce, type GhostRecord as cf, type GrantOptions as cg, type GuardViolation as ch, type HistoryConfig as ci, type HistoryEntry as cj, INDEXED_STORE_POLICY as ck, type ImportCapability as cl, type InferOutput as cm, type InternalCollectionStats as cn, type IssueDelegationOptions as co, type IssueMagicLinkGrantOptions as cp, type KeyringAuthenticator as cq, type KeyringAuthenticatorWrappingDEKs as cr, type KeyringAuthenticatorWrappingKEK as cs, type KeyringFile as ct, type ListAccessibleVaultsOptions as cu, type ListPageResult as cv, type ListUsersOptions as cw, type LiveUserEnvelope as cx, type LocaleReadOptions as cy, Lru as cz, type DictionaryOptions as d, type TabRole as d$, type PlaintextTranslatorFn as d0, PresenceHandle as d1, type PresencePeer as d2, type PublicEnvelopeField as d3, type PublicEnvelopeSchema as d4, type PublicEnvelopeText as d5, type PullMode as d6, type PullOptions as d7, type PullPolicy as d8, type PullResult as d9, type SealedPassphrase as dA, type SessionPolicy as dB, type SetPublicEnvelopeInput as dC, type ShamirRecoveryDoc as dD, type ShamirRecoveryEntry as dE, type SlotRewrapCeremony as dF, type SlotRewrapContext as dG, type StandardSchemaV1 as dH, type StandardSchemaV1Issue as dI, type StandardSchemaV1SyncResult as dJ, type StoreAuth as dK, type StoreAuthKind as dL, type StoreCapabilities as dM, SyncEngine as dN, type SyncMetadata as dO, type SyncPolicy as dP, SyncScheduler as dQ, type SyncSchedulerStatus as dR, type SyncStatus as dS, type SyncTarget as dT, type SyncTargetRole as dU, SyncTransaction as dV, type SyncTransactionResult as dW, type TabChannel as dX, type TabCoordinationOptions as dY, type TabLockManager as dZ, type TabPresence as d_, type PushMode as da, type PushOptions as db, type PushPolicy as dc, type PushResult as dd, type PutManyItemOptions as de, type PutManyOptions as df, type PutManyResult as dg, type QueryAcrossOptions as dh, type QueryAcrossResult as di, type QuickUnlockState as dj, QuickUnlockStore as dk, type ReAuthOperation as dl, type RecoverPassphraseInput as dm, type RecoverPassphraseResult as dn, type RecoverUserOptions as dp, type RecoveryProof as dq, type ResolvedPublicEnvelopeSchema as dr, type RevokeOptions as ds, type RotatePassphraseInput as dt, type RotateRecoveryOptions as du, type RotateRecoveryResult as dv, SEALED_PASSPHRASE_RECORD_ID as dw, type SchemaDelta as dx, type SchemaIntrospection as dy, type SealedEnvelope as dz, type I18nTextDescriptor as e, savePaperRecoveryEntries as e$, type TierMode as e0, type TranslatorAuditEntry as e1, type TxOp as e2, USER_ENVELOPE_COLLECTION as e3, USER_ENVELOPE_MAX_BYTES as e4, type Unsubscribe as e5, type UpdateAuthenticatorOptions as e6, type UpdateContext as e7, type UpdateUserOptions as e8, UserApi as e9, findAuthenticator as eA, hasExportCapability as eB, hasImportCapability as eC, hasRecoveryEnrolled as eD, isMagicLinkGrantExpired as eE, isPublicEnvelope as eF, issueDelegation as eG, recoverPassphrase as eH, rotatePassphrase as eI, listMagicLinkGrants as eJ, listUsers as eK, listUsersWithEnvelopes as eL, loadActiveDelegations as eM, loadPaperRecoveryEntries as eN, loadSealedPassphrase as eO, loadShamirRecoveryEntries as eP, magicLinkGrantRecordId as eQ, mintPaperRecoveryEntry as eR, mintShamirRecoveryEntry as eS, mintWrappedDeksBlob as eT, parseSealedEnvelope as eU, readMagicLinkGrantRecord as eV, recoverUser as eW, removeAuthenticator as eX, resolveSchema as eY, revokeDelegation as eZ, revokeMagicLinkGrant as e_, type UserEnvelopeCheckGate as ea, UserEnvelopeOversizedError as eb, type UserEnvelopePresented as ec, type UserInfo as ed, type VaultBackup as ee, type VaultPolicyOnDisk as ef, type VaultSchemaSnapshot as eg, type VaultSnapshot as eh, type WarningRules as ei, WeakPassphraseError as ej, type WeakPassphraseReason as ek, type WrappedDeksBlob as el, type WriteConflict as em, type WriteEvent as en, type WriteHook as eo, type WriteQueue as ep, assertStrongPassphrase as eq, buildRecipientKeyringFile as er, burnPaperRecoveryEntry as es, createNoydb as et, createStore as eu, deriveMagicLinkContentKey as ev, enrollAuthenticator as ew, estimateEntropy as ex, evaluateExportCapability as ey, evaluateImportCapability as ez, type I18nTextOptions as f, saveSealedPassphrase as f0, saveShamirRecoveryEntries as f1, unwrapDeksFromBlob as f2, unwrapDeksFromPaperEntry as f3, unwrapDeksFromShamirEntry as f4, unwrapMagicLinkGrant as f5, validatePassphrase as f6, validatePublicEnvelopeInput as f7, validateSchemaInput as f8, validateSchemaOutput as f9, writeMagicLinkGrant as fa, changeSecret as fb, createOwnerKeyring as fc, ensureCollectionDEK as fd, grant as fe, loadKeyring as ff, persistKeyring as fg, revoke as fh, updateAuthenticator as fi, updateKeyringIdentity as fj, applyI18nLocale as g, dictCollectionName as h, dictKey as i, i18nText as j, isDictCollectionName as k, isDictKeyDescriptor as l, isI18nTextDescriptor as m, createEnforcer as n, validateSessionPolicy as o, BLOB_CHUNKS_COLLECTION as p, BLOB_COLLECTION as q, resolveI18nText as r, BLOB_EVICTION_AUDIT_COLLECTION as s, BLOB_INDEX_COLLECTION as t, BLOB_SLOTS_PREFIX as u, validateI18nTextValue as v, BLOB_VERSIONS_PREFIX as w, type BlobEvictionEntry as x, type BlobFieldPolicy as y, type BlobFieldsConfig as z };
|