@noy-db/hub 0.2.0-pre.1 → 0.2.0-pre.2
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 +305 -0
- package/dist/attestation/index.cjs.map +1 -0
- package/dist/attestation/index.d.cts +52 -0
- package/dist/attestation/index.d.ts +52 -0
- package/dist/attestation/index.js +36 -0
- package/dist/attestation/index.js.map +1 -0
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +4 -3
- package/dist/blobs/index.d.ts +4 -3
- package/dist/blobs/index.js +9 -7
- package/dist/blobs/index.js.map +1 -1
- package/dist/bundle/index.cjs +16701 -129
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +172 -3
- package/dist/bundle/index.d.ts +172 -3
- package/dist/bundle/index.js +533 -5
- package/dist/bundle/index.js.map +1 -1
- package/dist/{chunk-5SCJ5UEF.js → chunk-243PNUA6.js} +2 -2
- package/dist/{chunk-WCA2NROQ.js → chunk-2PAQNPE3.js} +2 -2
- package/dist/chunk-3QAKZ37R.js +83 -0
- package/dist/chunk-3QAKZ37R.js.map +1 -0
- package/dist/chunk-3S4BJX25.js +36 -0
- package/dist/chunk-3S4BJX25.js.map +1 -0
- package/dist/chunk-3XHOCQK4.js +118 -0
- package/dist/chunk-3XHOCQK4.js.map +1 -0
- package/dist/{chunk-4TFSM22V.js → chunk-3Y53S2SA.js} +3 -3
- package/dist/{chunk-6HPZY4ON.js → chunk-3Z2TPHC4.js} +3 -3
- package/dist/chunk-4HIL6AHQ.js +57 -0
- package/dist/chunk-4HIL6AHQ.js.map +1 -0
- package/dist/{chunk-DYECX3IX.js → chunk-7BRE6EUA.js} +2 -2
- package/dist/{chunk-DYBQG5PQ.js → chunk-7BUTTVMR.js} +2 -2
- package/dist/{chunk-KESP7GOK.js → chunk-7Q5PLD5C.js} +3 -3
- package/dist/{chunk-UA4RI7OT.js → chunk-7Z23ZFLV.js} +4 -4
- package/dist/chunk-AHPFONIL.js +59 -0
- package/dist/chunk-AHPFONIL.js.map +1 -0
- package/dist/{chunk-EGQYGYIU.js → chunk-CXSCDO5T.js} +2 -2
- package/dist/chunk-E535SAN4.js +8834 -0
- package/dist/chunk-E535SAN4.js.map +1 -0
- package/dist/{chunk-CBAHB2BF.js → chunk-EUYOGYGV.js} +6 -69
- package/dist/chunk-EUYOGYGV.js.map +1 -0
- package/dist/{chunk-OMLIZL2P.js → chunk-FAQVNJD4.js} +2 -2
- package/dist/{chunk-I6MX32UC.js → chunk-G6FRSBKK.js} +4 -4
- package/dist/{chunk-FCXOFQAJ.js → chunk-GIV6DWBG.js} +2 -2
- package/dist/{chunk-34YSDCDP.js → chunk-HXJXPZRE.js} +2 -2
- package/dist/{chunk-23TTQXVO.js → chunk-J4KLMEUL.js} +2 -2
- package/dist/{chunk-VMIO4IXG.js → chunk-JYQTXEIO.js} +5 -228
- package/dist/chunk-JYQTXEIO.js.map +1 -0
- package/dist/{chunk-NIOHFJPJ.js → chunk-LRAZDV5X.js} +6 -118
- package/dist/chunk-LRAZDV5X.js.map +1 -0
- package/dist/{chunk-P7EQ2S5O.js → chunk-MUWOSVEP.js} +2 -2
- package/dist/chunk-NWZ3I6R6.js +79 -0
- package/dist/chunk-NWZ3I6R6.js.map +1 -0
- package/dist/{chunk-HB3Z2GCR.js → chunk-OVZDFEOR.js} +2 -2
- package/dist/chunk-PFSNOPBQ.js +233 -0
- package/dist/chunk-PFSNOPBQ.js.map +1 -0
- package/dist/{chunk-UZXLQCHP.js → chunk-PLI5TV7N.js} +2 -2
- package/dist/{chunk-PA6R5ZCI.js → chunk-Q6W2CMEJ.js} +3 -3
- package/dist/{chunk-537VFZTR.js → chunk-QPEXPHJR.js} +4 -4
- package/dist/{chunk-ZNOEIM6Y.js → chunk-QXQRKXCU.js} +2 -2
- package/dist/{chunk-RD5LYKD6.js → chunk-RTZVQAJ7.js} +2 -2
- package/dist/{chunk-DPMFBCV6.js → chunk-TBKOGSYR.js} +2 -2
- package/dist/{chunk-DPMFBCV6.js.map → chunk-TBKOGSYR.js.map} +1 -1
- package/dist/chunk-UND4XIB6.js +251 -0
- package/dist/chunk-UND4XIB6.js.map +1 -0
- package/dist/{chunk-7H6DOO3E.js → chunk-VCGTOS2A.js} +211 -36
- package/dist/chunk-VCGTOS2A.js.map +1 -0
- package/dist/{chunk-MKSA2V7A.js → chunk-VE6YVP32.js} +2 -2
- package/dist/{chunk-5DWL3JBF.js → chunk-VK5EER6C.js} +2 -2
- package/dist/{chunk-MIQHZESA.js → chunk-VPSUZLOJ.js} +4 -4
- package/dist/{chunk-MIQHZESA.js.map → chunk-VPSUZLOJ.js.map} +1 -1
- package/dist/{chunk-XGSOTWYX.js → chunk-VRBCTEKQ.js} +2 -2
- package/dist/{chunk-ADQ5MQ54.js → chunk-W3XXT26A.js} +29 -1
- package/dist/{chunk-ADQ5MQ54.js.map → chunk-W3XXT26A.js.map} +1 -1
- package/dist/{chunk-2AXFIYHT.js → chunk-XG3PTSCD.js} +1 -1
- package/dist/chunk-XG3PTSCD.js.map +1 -0
- package/dist/{chunk-SIZWEV2Y.js → chunk-Y2RKOPNC.js} +4 -4
- package/dist/{chunk-SIZWEV2Y.js.map → chunk-Y2RKOPNC.js.map} +1 -1
- package/dist/{chunk-Z72JH4KG.js → chunk-YTXSFG3C.js} +4 -34
- package/dist/chunk-YTXSFG3C.js.map +1 -0
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +4 -3
- package/dist/consent/index.d.ts +4 -3
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-A7FRXYHC.js → crypto-5ZDIY3NG.js} +3 -3
- package/dist/{delegation-YBA4X4JN.js → delegation-QYXZW25W.js} +5 -5
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +5 -4
- package/dist/derivations/index.d.ts +5 -4
- package/dist/derivations/index.js +4 -4
- package/dist/{dev-unlock-DRwVSy2S.d.cts → dev-unlock-DQCNDfFp.d.cts} +1 -1
- package/dist/{dev-unlock-D9s-loPr.d.ts → dev-unlock-utkybTKb.d.ts} +1 -1
- package/dist/executor-AS2IDHKZ.js +11 -0
- package/dist/executor-HLXFXNFM.js +8 -0
- package/dist/executor-HN6YBHZ5.js +8 -0
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +5 -4
- package/dist/guards/index.d.ts +5 -4
- package/dist/guards/index.js +3 -3
- package/dist/{hash-DXXXusyk.d.ts → hash-DcoYWfJ_.d.ts} +1 -1
- package/dist/{hash-DtRih9MQ.d.cts → hash-jDowCrK2.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 +5 -4
- package/dist/history/index.d.ts +5 -4
- package/dist/history/index.js +5 -5
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +4 -3
- package/dist/i18n/index.d.ts +4 -3
- package/dist/i18n/index.js +13 -11
- package/dist/i18n/index.js.map +1 -1
- package/dist/{index-CNwA-B6-.d.ts → index-BCKdioeh.d.ts} +29 -1
- package/dist/{index-CmVgTkqk.d.cts → index-BMjrzNZr.d.cts} +29 -1
- package/dist/index.cjs +507 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -11
- package/dist/index.d.ts +12 -11
- package/dist/index.js +106 -8817
- 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-ORP37MVW.js +12 -0
- package/dist/{ledger-3TXNP47J.js → ledger-3IU5GMXA.js} +5 -5
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +6 -5
- package/dist/materialized-views/index.d.ts +6 -5
- package/dist/materialized-views/index.js +6 -6
- package/dist/noydb-5H3C24GG.js +34 -0
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +5 -4
- package/dist/overlay-views/index.d.ts +5 -4
- package/dist/overlay-views/index.js +6 -4
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +4 -3
- package/dist/periods/index.d.ts +4 -3
- package/dist/periods/index.js +5 -5
- package/dist/{public-envelope-PY6NKFLI.js → public-envelope-U3CMEOMV.js} +3 -3
- 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-3L3N3PTG.js → registry-3ALP62P6.js} +3 -3
- package/dist/registry-7HE6VJGC.js +8 -0
- package/dist/registry-PSIPG2QR.js +8 -0
- package/dist/registry-PSIPG2QR.js.map +1 -0
- package/dist/revoke-KY2GB4KP.js +17 -0
- package/dist/revoke-KY2GB4KP.js.map +1 -0
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +5 -4
- package/dist/session/index.d.ts +5 -4
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +4 -3
- package/dist/shadow/index.d.ts +4 -3
- package/dist/shadow/index.js +2 -2
- package/dist/signer-GRI5TZKH.js +18 -0
- package/dist/signer-GRI5TZKH.js.map +1 -0
- package/dist/{stale-HSC5YO2O.js → stale-OTOF3FH7.js} +2 -2
- package/dist/stale-OTOF3FH7.js.map +1 -0
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +4 -3
- package/dist/store/index.d.ts +4 -3
- package/dist/store/index.js +2 -2
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +3 -2
- package/dist/sync/index.d.ts +3 -2
- package/dist/sync/index.js +3 -3
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +4 -3
- package/dist/team/index.d.ts +4 -3
- package/dist/team/index.js +12 -10
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +4 -3
- package/dist/tx/index.d.ts +4 -3
- package/dist/tx/index.js +2 -2
- package/dist/{types-DW9RGSSs.d.ts → types-BoFFiskX.d.ts} +119 -3
- package/dist/{types-C4lwMKKF.d.cts → types-DJG8HG6F.d.cts} +119 -3
- package/dist/{index-hdFvZkBP.d.cts → ulid-BmBgooGm.d.ts} +51 -33
- package/dist/{index-4agOpzqd.d.ts → ulid-C7ms9oli.d.cts} +51 -33
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/{with-derivation-g-pGoMzL.d.ts → with-derivation-BKXXa8Vt.d.ts} +1 -1
- package/dist/{with-derivation-C8LDlV7t.d.cts → with-derivation-BjQ7q4NE.d.cts} +1 -1
- package/dist/{with-guard-DWOCK4Ca.d.ts → with-guard-C25yNjzd.d.ts} +1 -1
- package/dist/{with-guard-jI1x9Z3k.d.cts → with-guard-DQme5DKE.d.cts} +1 -1
- package/dist/{with-materialized-view-DcTx4H3j.d.cts → with-materialized-view-BbEPFIIJ.d.cts} +1 -1
- package/dist/{with-materialized-view-DaKR-N6J.d.ts → with-materialized-view-CqnRwI2S.d.ts} +1 -1
- package/dist/{with-overlayed-view-N7jYuNOS.d.ts → with-overlayed-view-Ct1fSJt-.d.ts} +1 -1
- package/dist/{with-overlayed-view-D-6oWAgM.d.cts → with-overlayed-view-bwlmmFjx.d.cts} +1 -1
- package/package.json +15 -3
- package/dist/chunk-2AXFIYHT.js.map +0 -1
- package/dist/chunk-7H6DOO3E.js.map +0 -1
- package/dist/chunk-CBAHB2BF.js.map +0 -1
- package/dist/chunk-NIOHFJPJ.js.map +0 -1
- package/dist/chunk-VMIO4IXG.js.map +0 -1
- package/dist/chunk-Z72JH4KG.js.map +0 -1
- package/dist/executor-7E3VFGW7.js +0 -11
- package/dist/executor-CEWX2FQI.js +0 -8
- package/dist/executor-X4SQ3ZLC.js +0 -8
- package/dist/registry-O47PUPSY.js +0 -8
- package/dist/registry-WLLMODKN.js +0 -8
- /package/dist/{chunk-5SCJ5UEF.js.map → chunk-243PNUA6.js.map} +0 -0
- /package/dist/{chunk-WCA2NROQ.js.map → chunk-2PAQNPE3.js.map} +0 -0
- /package/dist/{chunk-4TFSM22V.js.map → chunk-3Y53S2SA.js.map} +0 -0
- /package/dist/{chunk-6HPZY4ON.js.map → chunk-3Z2TPHC4.js.map} +0 -0
- /package/dist/{chunk-DYECX3IX.js.map → chunk-7BRE6EUA.js.map} +0 -0
- /package/dist/{chunk-DYBQG5PQ.js.map → chunk-7BUTTVMR.js.map} +0 -0
- /package/dist/{chunk-KESP7GOK.js.map → chunk-7Q5PLD5C.js.map} +0 -0
- /package/dist/{chunk-UA4RI7OT.js.map → chunk-7Z23ZFLV.js.map} +0 -0
- /package/dist/{chunk-EGQYGYIU.js.map → chunk-CXSCDO5T.js.map} +0 -0
- /package/dist/{chunk-OMLIZL2P.js.map → chunk-FAQVNJD4.js.map} +0 -0
- /package/dist/{chunk-I6MX32UC.js.map → chunk-G6FRSBKK.js.map} +0 -0
- /package/dist/{chunk-FCXOFQAJ.js.map → chunk-GIV6DWBG.js.map} +0 -0
- /package/dist/{chunk-34YSDCDP.js.map → chunk-HXJXPZRE.js.map} +0 -0
- /package/dist/{chunk-23TTQXVO.js.map → chunk-J4KLMEUL.js.map} +0 -0
- /package/dist/{chunk-P7EQ2S5O.js.map → chunk-MUWOSVEP.js.map} +0 -0
- /package/dist/{chunk-HB3Z2GCR.js.map → chunk-OVZDFEOR.js.map} +0 -0
- /package/dist/{chunk-UZXLQCHP.js.map → chunk-PLI5TV7N.js.map} +0 -0
- /package/dist/{chunk-PA6R5ZCI.js.map → chunk-Q6W2CMEJ.js.map} +0 -0
- /package/dist/{chunk-537VFZTR.js.map → chunk-QPEXPHJR.js.map} +0 -0
- /package/dist/{chunk-ZNOEIM6Y.js.map → chunk-QXQRKXCU.js.map} +0 -0
- /package/dist/{chunk-RD5LYKD6.js.map → chunk-RTZVQAJ7.js.map} +0 -0
- /package/dist/{chunk-MKSA2V7A.js.map → chunk-VE6YVP32.js.map} +0 -0
- /package/dist/{chunk-5DWL3JBF.js.map → chunk-VK5EER6C.js.map} +0 -0
- /package/dist/{chunk-XGSOTWYX.js.map → chunk-VRBCTEKQ.js.map} +0 -0
- /package/dist/{crypto-A7FRXYHC.js.map → crypto-5ZDIY3NG.js.map} +0 -0
- /package/dist/{delegation-YBA4X4JN.js.map → delegation-QYXZW25W.js.map} +0 -0
- /package/dist/{executor-7E3VFGW7.js.map → executor-AS2IDHKZ.js.map} +0 -0
- /package/dist/{executor-CEWX2FQI.js.map → executor-HLXFXNFM.js.map} +0 -0
- /package/dist/{executor-X4SQ3ZLC.js.map → executor-HN6YBHZ5.js.map} +0 -0
- /package/dist/{ledger-3TXNP47J.js.map → issue-ORP37MVW.js.map} +0 -0
- /package/dist/{public-envelope-PY6NKFLI.js.map → ledger-3IU5GMXA.js.map} +0 -0
- /package/dist/{registry-3L3N3PTG.js.map → noydb-5H3C24GG.js.map} +0 -0
- /package/dist/{registry-O47PUPSY.js.map → public-envelope-U3CMEOMV.js.map} +0 -0
- /package/dist/{registry-WLLMODKN.js.map → registry-3ALP62P6.js.map} +0 -0
- /package/dist/{stale-HSC5YO2O.js.map → registry-7HE6VJGC.js.map} +0 -0
package/dist/tx/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { aq as TxStrategy } from '../types-
|
|
2
|
-
export { ar as AmendmentTxOptions, as as TxCollection, at as TxContext, au as TxVault, av as runTransaction } from '../types-
|
|
1
|
+
import { aq as TxStrategy } from '../types-DJG8HG6F.cjs';
|
|
2
|
+
export { ar as AmendmentTxOptions, as as TxCollection, at as TxContext, au as TxVault, av as runTransaction } from '../types-DJG8HG6F.cjs';
|
|
3
3
|
import '../lazy-builder-C-rPfWG0.cjs';
|
|
4
4
|
import '../predicate-Dnu81tsS.cjs';
|
|
5
5
|
import '../strategy-DSTrsZ8t.cjs';
|
|
6
6
|
import '../strategy-BSxFXGzb.cjs';
|
|
7
|
-
import '../index-
|
|
7
|
+
import '../index-BMjrzNZr.cjs';
|
|
8
|
+
import '@noy-db/attestation';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Active transactions strategy. Only reachable via `@noy-db/hub/tx`.
|
package/dist/tx/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { aq as TxStrategy } from '../types-
|
|
2
|
-
export { ar as AmendmentTxOptions, as as TxCollection, at as TxContext, au as TxVault, av as runTransaction } from '../types-
|
|
1
|
+
import { aq as TxStrategy } from '../types-BoFFiskX.js';
|
|
2
|
+
export { ar as AmendmentTxOptions, as as TxCollection, at as TxContext, au as TxVault, av as runTransaction } from '../types-BoFFiskX.js';
|
|
3
3
|
import '../lazy-builder-Rpd-V3jP.js';
|
|
4
4
|
import '../predicate-Dnu81tsS.js';
|
|
5
5
|
import '../strategy-DSTrsZ8t.js';
|
|
6
6
|
import '../strategy-BSxFXGzb.js';
|
|
7
|
-
import '../index-
|
|
7
|
+
import '../index-BCKdioeh.js';
|
|
8
|
+
import '@noy-db/attestation';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Active transactions strategy. Only reachable via `@noy-db/hub/tx`.
|
package/dist/tx/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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, ao as RefRegistry, al as RefDescriptor, a2 as JoinableSource, aq as RefViolation, ar as ScanBuilder } from './index-BCKdioeh.js';
|
|
5
5
|
import { F as FieldClause, I as IndexDef, C as CollectionIndexes } from './predicate-Dnu81tsS.js';
|
|
6
|
+
import { AttestationFieldSchema, RevocationList } from '@noy-db/attestation';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Standard Schema v1 integration.
|
|
@@ -794,8 +795,15 @@ interface LedgerEntry {
|
|
|
794
795
|
* guards subsystem when an admin/owner uses `withTransactions(...)`
|
|
795
796
|
* to repair a constraint-violating state. See `amendment` field
|
|
796
797
|
* below for the structured payload.
|
|
798
|
+
*
|
|
799
|
+
* `'lifecycle'` records a non-data audit event (e.g. partition
|
|
800
|
+
* handover, #226) — `collection`/`id` are empty and the event detail
|
|
801
|
+
* lives in `reason` (e.g. `'partition-handed-over:<sealId>'`). Like
|
|
802
|
+
* `amendment`, it carries no data envelope, so `verifyBackupIntegrity`
|
|
803
|
+
* skips it in the data cross-check (it still participates in the
|
|
804
|
+
* tamper-evident chain).
|
|
797
805
|
*/
|
|
798
|
-
readonly op: 'put' | 'delete' | 'amendment';
|
|
806
|
+
readonly op: 'put' | 'delete' | 'amendment' | 'lifecycle';
|
|
799
807
|
/** The collection the mutation targeted. */
|
|
800
808
|
readonly collection: string;
|
|
801
809
|
/** The record id the mutation targeted. */
|
|
@@ -7029,6 +7037,12 @@ declare class Vault {
|
|
|
7029
7037
|
* `vault.compact()`. Indexed by collection name.
|
|
7030
7038
|
*/
|
|
7031
7039
|
private readonly blobFieldsRegistry;
|
|
7040
|
+
/**
|
|
7041
|
+
* Per-collection attestation field-schema (issue side). Populated on
|
|
7042
|
+
* `collection({ attestation })` and read by `issueAttestation()`.
|
|
7043
|
+
* Indexed by collection name.
|
|
7044
|
+
*/
|
|
7045
|
+
private readonly attestationRegistry;
|
|
7032
7046
|
/**
|
|
7033
7047
|
* Per-vault ledger store. Lazy-initialized on first
|
|
7034
7048
|
* `collection()` call (which passes it through to the Collection)
|
|
@@ -7249,6 +7263,8 @@ declare class Vault {
|
|
|
7249
7263
|
* @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
|
|
7250
7264
|
*/
|
|
7251
7265
|
persistJsonSchema?: boolean;
|
|
7266
|
+
/** — declare the per-field schema for document attestation (issue side). */
|
|
7267
|
+
attestation?: AttestationFieldSchema;
|
|
7252
7268
|
}): Collection<T>;
|
|
7253
7269
|
/**
|
|
7254
7270
|
* Await all background persisted-schema writes triggered by
|
|
@@ -7431,6 +7447,22 @@ declare class Vault {
|
|
|
7431
7447
|
*/
|
|
7432
7448
|
compact(options?: CompactRunOptions): Promise<CompactionResult>;
|
|
7433
7449
|
exportBlobs(options?: ExportBlobsOptions): ExportBlobsHandle;
|
|
7450
|
+
issueAttestation(collectionName: string, id: string): Promise<{
|
|
7451
|
+
docId: string;
|
|
7452
|
+
qr: string;
|
|
7453
|
+
keyId: string;
|
|
7454
|
+
publicKeyB64: string;
|
|
7455
|
+
}>;
|
|
7456
|
+
getDocumentSigningPublicKey(): Promise<{
|
|
7457
|
+
keyId: string;
|
|
7458
|
+
publicKeyB64: string;
|
|
7459
|
+
}>;
|
|
7460
|
+
private makeIssueContext;
|
|
7461
|
+
revokeAttestation(docId: string): Promise<void>;
|
|
7462
|
+
unrevokeAttestation(docId: string): Promise<void>;
|
|
7463
|
+
getRevokedDocIds(): Promise<string[]>;
|
|
7464
|
+
publishRevocationList(): Promise<RevocationList>;
|
|
7465
|
+
private makeRevokeContext;
|
|
7434
7466
|
private writeExportAudit;
|
|
7435
7467
|
/**
|
|
7436
7468
|
* Read-only accessor for the invoking keyring's export capability,
|
|
@@ -9897,6 +9929,18 @@ interface SessionStrategy {
|
|
|
9897
9929
|
* - {@link MemorySealingKeyProvider} — in-memory test provider; uses
|
|
9898
9930
|
* a deterministic per-instance "key" so two providers with
|
|
9899
9931
|
* different ids cannot unseal each other's outputs.
|
|
9932
|
+
* - {@link RecipientHint} — public material a sender uses to seal
|
|
9933
|
+
* plaintext for a specific recipient; published by
|
|
9934
|
+
* {@link RecipientSealer.publishRecipientHint} and transported
|
|
9935
|
+
* out-of-band to the sender before bundle writes.
|
|
9936
|
+
* - {@link RecipientSealer} — interface for asymmetric/granted
|
|
9937
|
+
* providers that support recipient-target sealing (RSA-OAEP,
|
|
9938
|
+
* cloud-KMS asymmetric, etc.); distinct from self-only
|
|
9939
|
+
* {@link SealingKeyProvider} (macOS Keychain, WebAuthn-PRF).
|
|
9940
|
+
* - {@link MemoryRecipientSealer} — in-process reference
|
|
9941
|
+
* implementation of both `RecipientSealer` and
|
|
9942
|
+
* `SealingKeyProvider` using real WebCrypto RSA-OAEP + AES-GCM;
|
|
9943
|
+
* safe for tests and same-process sender/recipient scenarios.
|
|
9900
9944
|
* - {@link loadSealedPassphrase} / {@link saveSealedPassphrase} —
|
|
9901
9945
|
* plaintext envelope storage at `_meta/sealed-passphrase`.
|
|
9902
9946
|
* Mirrors the `_meta/handle` and `_meta/public-envelope` AES-
|
|
@@ -9977,6 +10021,78 @@ declare class MemorySealingKeyProvider implements SealingKeyProvider {
|
|
|
9977
10021
|
seal(passphrase: Uint8Array): Promise<Uint8Array>;
|
|
9978
10022
|
unseal(sealed: Uint8Array): Promise<Uint8Array>;
|
|
9979
10023
|
}
|
|
10024
|
+
/**
|
|
10025
|
+
* Public material a sender uses to seal-for-this-recipient. Published by
|
|
10026
|
+
* a recipient's RecipientSealer; transported to the sender out-of-band
|
|
10027
|
+
* (email, S3, in-app message). The sender obtains the hint, supplies it
|
|
10028
|
+
* to writeNoydbBundle's sealedCredentials.perUser[userId].hint, and the
|
|
10029
|
+
* hub seals each user's credential against it. Per foundation §11.4.
|
|
10030
|
+
*/
|
|
10031
|
+
type RecipientHint = {
|
|
10032
|
+
readonly v: 1;
|
|
10033
|
+
/** Recipient's provider id; matches the SealedAutoUnlockEntry.pid they'll unseal under. */
|
|
10034
|
+
readonly pid: string;
|
|
10035
|
+
/** Algorithm the sender uses to produce the seal. Slice 1 ships RSA-OAEP-SHA256 only. */
|
|
10036
|
+
readonly alg: 'rsa-oaep-sha256';
|
|
10037
|
+
/** Public material — alg-specific. For 'rsa-oaep-sha256': { publicKeyPem: string }. */
|
|
10038
|
+
readonly material: Readonly<Record<string, unknown>>;
|
|
10039
|
+
};
|
|
10040
|
+
/**
|
|
10041
|
+
* Handover-capable provider. Implemented additionally by asymmetric/granted
|
|
10042
|
+
* providers (cloud-KMS asymmetric, Azure RSA Key Vault, AWS KMS with grant).
|
|
10043
|
+
* Self-only providers (macOS Keychain, env-var, WebAuthn-PRF) do NOT
|
|
10044
|
+
* implement this — the §11.2 capability matrix lives in the type system.
|
|
10045
|
+
*
|
|
10046
|
+
* Per foundation §11.4. A function that requires recipient-target sealing
|
|
10047
|
+
* takes `RecipientSealer`, not `SealingKeyProvider` — the compiler rejects
|
|
10048
|
+
* passing a self-only provider at the spec site.
|
|
10049
|
+
*/
|
|
10050
|
+
interface RecipientSealer {
|
|
10051
|
+
readonly id: string;
|
|
10052
|
+
/** Produce hint material a sender uses to seal-for-this-recipient. */
|
|
10053
|
+
publishRecipientHint(): Promise<RecipientHint>;
|
|
10054
|
+
/**
|
|
10055
|
+
* Seal plaintext for the recipient described by `hint`. Returns opaque
|
|
10056
|
+
* bytes — same contract as `SealingKeyProvider.seal()`. The bundle
|
|
10057
|
+
* layer base64-encodes the bytes into `SealedAutoUnlockEntry.sealed`
|
|
10058
|
+
* without inspecting them.
|
|
10059
|
+
*/
|
|
10060
|
+
sealForRecipient(plaintext: Uint8Array, hint: RecipientHint): Promise<Uint8Array>;
|
|
10061
|
+
}
|
|
10062
|
+
/**
|
|
10063
|
+
* Reference implementation of `RecipientSealer` + `SealingKeyProvider`.
|
|
10064
|
+
* Uses WebCrypto RSA-OAEP-SHA256 (2048-bit) to wrap a fresh 32-byte
|
|
10065
|
+
* AES-GCM CEK, AES-GCM-encrypts plaintext under it, and packs the
|
|
10066
|
+
* result into a self-describing TLV:
|
|
10067
|
+
*
|
|
10068
|
+
* byte 0 : version (0x01)
|
|
10069
|
+
* bytes 1..256 : RSA-OAEP-wrapped CEK (fixed 256 bytes at RSA-2048)
|
|
10070
|
+
* bytes 257..268: AES-GCM IV (12 bytes)
|
|
10071
|
+
* bytes 269.. : AES-GCM ciphertext ‖ 16-byte tag
|
|
10072
|
+
*
|
|
10073
|
+
* Implements BOTH interfaces. `seal(plaintext)` (self-target) is just
|
|
10074
|
+
* `sealForRecipient(plaintext, this own hint)` — same TLV. Convenient
|
|
10075
|
+
* for tests where one provider plays both ends. Real cloud providers
|
|
10076
|
+
* (`at-aws-kms`, etc.) will pick their own internal layouts; the only
|
|
10077
|
+
* contract is round-trip identity.
|
|
10078
|
+
*
|
|
10079
|
+
* SAFE for production within its scope — the cryptography is real
|
|
10080
|
+
* (RSA-OAEP + AES-GCM via WebCrypto), but the keypair lives in-process
|
|
10081
|
+
* and is regenerated on every construction. Not suitable as a managed
|
|
10082
|
+
* keychain; use it for tests and for shipping bundles where the
|
|
10083
|
+
* recipient instance lives in the same process as the sender (rare).
|
|
10084
|
+
*/
|
|
10085
|
+
declare class MemoryRecipientSealer implements SealingKeyProvider, RecipientSealer {
|
|
10086
|
+
readonly id: string;
|
|
10087
|
+
private readonly keypair;
|
|
10088
|
+
constructor(opts: {
|
|
10089
|
+
id: string;
|
|
10090
|
+
});
|
|
10091
|
+
publishRecipientHint(): Promise<RecipientHint>;
|
|
10092
|
+
sealForRecipient(plaintext: Uint8Array, hint: RecipientHint): Promise<Uint8Array>;
|
|
10093
|
+
seal(plaintext: Uint8Array): Promise<Uint8Array>;
|
|
10094
|
+
unseal(bytes: Uint8Array): Promise<Uint8Array>;
|
|
10095
|
+
}
|
|
9980
10096
|
/** Reserved id for the managed-passphrase envelope under `_meta`. */
|
|
9981
10097
|
declare const SEALED_PASSPHRASE_RECORD_ID: "sealed-passphrase";
|
|
9982
10098
|
/** Plaintext payload stored inside the `_meta/sealed-passphrase` envelope. */
|
|
@@ -11851,4 +11967,4 @@ interface DeleteManyResult {
|
|
|
11851
11967
|
}>;
|
|
11852
11968
|
}
|
|
11853
11969
|
|
|
11854
|
-
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 FactorRequirement 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 CollectionDescriptor as bA, type CollectionStats as bB, type Conflict as bC, type ConflictPolicy as bD, type ConflictStrategy as bE, type CrossTierAccessEvent as bF, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as bG, DELEGATIONS_COLLECTION as bH, type DeepPartial as bI, type DeepPartialOrNull as bJ, type DelegationToken as bK, type DeleteManyResult as bL, type DerivationDescriptor as bM, type DirtyEntry as bN, type DumpSchemaOptions as bO, ELEVATION_AUDIT_COLLECTION as bP, ElevatedHandle as bQ, type EnrollAuthenticatorOptions as bR, type EnrollAuthenticatorWrappingDEKsOptions as bS, type EnrollAuthenticatorWrappingKEKOptions as bT, type EnrollRecoveryResult as bU, type ExportCapability as bV, type ExportChunk as bW, type ExportFormat as bX, type ExportStreamOptions as bY, type FactorKind as bZ, type FactorProofBundle as b_, type MVQueryContext as ba, type RegisteredMV as bb, MaterializedViewRegistry as bc, type MaterializedFromMeta as bd, type MaterializedViewOutput as be, type UnionSource as bf, type UserEnvelope as bg, type PublicEnvelope as bh, type GateName as bi, type GatePolicy as bj, type VaultPolicy as bk, type ActiveTier as bl, type FactorProof as bm, type PersistedSchemaEnvelope as bn, type DirectoryConfig as bo, type UserVisibility as bp, Vault as bq, type AccessibleVault as br, BUNDLE_STORE_POLICY as bs, type BuiltInGateName as bt, type BundleRecipient as bu, type CacheOptions as bv, type CacheStats as bw, type ChangeEvent as bx, type CollectionChangeEvent as by, type CollectionConflictResolver as bz, DictionaryHandle as c, type PutManyItemOptions as c$, type FieldDescriptor as c0, type FieldSource as c1, type GhostRecord as c2, type GrantOptions as c3, type HistoryConfig as c4, type HistoryEntry as c5, INDEXED_STORE_POLICY as c6, type ImportCapability as c7, type InferOutput as c8, type InternalCollectionStats as c9, type NoydbBundleStore as cA, type NoydbEventMap as cB, type NoydbOptions as cC, type OverlayViewDescriptor as cD, PUBLIC_ENVELOPE_FIELDS as cE, type PaperRecoveryDoc as cF, type PaperRecoveryEntry as cG, type PassphrasePolicy as cH, type PassphraseValidationResult as cI, type Permission as cJ, type Permissions as cK, type PersistedSchemaKind as cL, type PlaintextTranslatorContext as cM, type PlaintextTranslatorFn as cN, PresenceHandle as cO, type PresencePeer as cP, type PublicEnvelopeField as cQ, type PublicEnvelopeSchema as cR, type PublicEnvelopeText as cS, type PullMode as cT, type PullOptions as cU, type PullPolicy as cV, type PullResult as cW, type PushMode as cX, type PushOptions as cY, type PushPolicy as cZ, type PushResult as c_, type IssueDelegationOptions as ca, type IssueMagicLinkGrantOptions as cb, type KeyringAuthenticator as cc, type KeyringAuthenticatorWrappingDEKs as cd, type KeyringAuthenticatorWrappingKEK as ce, type KeyringFile as cf, type ListAccessibleVaultsOptions as cg, type ListPageResult as ch, type ListUsersOptions as ci, type LiveUserEnvelope as cj, type LocaleReadOptions as ck, Lru as cl, type LruOptions as cm, type LruStats as cn, MAGIC_LINK_CONTENT_INFO_PREFIX as co, MAGIC_LINK_GRANTS_COLLECTION as cp, MAGIC_LINK_KEK_INFO_PREFIX as cq, type MagicLinkGrantPayload as cr, type MagicLinkGrantRecord as cs, type MaterializedViewDescriptor as ct, MemorySealingKeyProvider as cu, NOYDB_BACKUP_VERSION as cv, NOYDB_FORMAT_VERSION as cw, NOYDB_KEYRING_VERSION as cx, NOYDB_SYNC_VERSION as cy, Noydb as cz, type DictionaryOptions as d, type WeakPassphraseReason as d$, type PutManyOptions as d0, type PutManyResult as d1, type QueryAcrossOptions as d2, type QueryAcrossResult as d3, type QuickUnlockState as d4, QuickUnlockStore as d5, type ReAuthOperation as d6, type RecoverPassphraseInput as d7, type RecoverPassphraseResult as d8, type RecoverUserOptions as d9, type SyncPolicy as dA, SyncScheduler as dB, type SyncSchedulerStatus as dC, type SyncStatus as dD, type SyncTarget as dE, type SyncTargetRole as dF, SyncTransaction as dG, type SyncTransactionResult as dH, type TierMode as dI, type TranslatorAuditEntry as dJ, type TxOp as dK, USER_ENVELOPE_COLLECTION as dL, USER_ENVELOPE_MAX_BYTES as dM, type Unsubscribe as dN, type UpdateAuthenticatorOptions as dO, type UpdateUserOptions as dP, UserApi as dQ, type UserEnvelopeCheckGate as dR, UserEnvelopeOversizedError as dS, type UserEnvelopePresented as dT, type UserInfo as dU, type VaultBackup as dV, type VaultPolicyOnDisk as dW, type VaultSchemaSnapshot as dX, type VaultSnapshot as dY, type WarningRules as dZ, WeakPassphraseError as d_, type RecoveryProof as da, type ResolvedPublicEnvelopeSchema as db, type RevokeOptions as dc, type RotatePassphraseInput as dd, type RotateRecoveryOptions as de, type RotateRecoveryResult as df, SEALED_PASSPHRASE_RECORD_ID as dg, type SealedEnvelope as dh, type SealedPassphrase as di, type SealingKeyProvider as dj, type SessionPolicy as dk, type SetPublicEnvelopeInput as dl, type ShamirRecoveryDoc as dm, type ShamirRecoveryEntry as dn, type ShamirRecoveryProvider as dp, type SlotRewrapCeremony as dq, type SlotRewrapContext as dr, type StandardSchemaV1 as ds, type StandardSchemaV1Issue as dt, type StandardSchemaV1SyncResult as du, type StoreAuth as dv, type StoreAuthKind as dw, type StoreCapabilities as dx, SyncEngine as dy, type SyncMetadata as dz, type I18nTextDescriptor as e, type WrappedDeksBlob as e0, assertStrongPassphrase as e1, buildRecipientKeyringFile as e2, burnPaperRecoveryEntry as e3, createNoydb as e4, createStore as e5, deriveMagicLinkContentKey as e6, enrollAuthenticator as e7, estimateEntropy as e8, evaluateExportCapability as e9, revokeDelegation as eA, revokeMagicLinkGrant as eB, savePaperRecoveryEntries as eC, saveSealedPassphrase as eD, saveShamirRecoveryEntries as eE, unwrapDeksFromBlob as eF, unwrapDeksFromPaperEntry as eG, unwrapDeksFromShamirEntry as eH, unwrapMagicLinkGrant as eI, validatePassphrase as eJ, validatePublicEnvelopeInput as eK, validateSchemaInput as eL, validateSchemaOutput as eM, writeMagicLinkGrant as eN, changeSecret as eO, createOwnerKeyring as eP, ensureCollectionDEK as eQ, grant as eR, loadKeyring as eS, persistKeyring as eT, revoke as eU, updateAuthenticator as eV, updateKeyringIdentity as eW, evaluateImportCapability as ea, findAuthenticator as eb, hasExportCapability as ec, hasImportCapability as ed, hasRecoveryEnrolled as ee, isMagicLinkGrantExpired as ef, isPublicEnvelope as eg, issueDelegation as eh, recoverPassphrase as ei, rotatePassphrase as ej, listMagicLinkGrants as ek, listUsers as el, listUsersWithEnvelopes as em, loadActiveDelegations as en, loadPaperRecoveryEntries as eo, loadSealedPassphrase as ep, loadShamirRecoveryEntries as eq, magicLinkGrantRecordId as er, mintPaperRecoveryEntry as es, mintShamirRecoveryEntry as et, mintWrappedDeksBlob as eu, parseSealedEnvelope as ev, readMagicLinkGrantRecord as ew, recoverUser as ex, removeAuthenticator as ey, resolveSchema 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 };
|
|
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 };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { I as IndexStrategy, d as LazyQuery } from './lazy-builder-C-rPfWG0.cjs';
|
|
2
2
|
import { b as AggregateSpec, A as AggregateStrategy } from './strategy-DSTrsZ8t.cjs';
|
|
3
3
|
import { C as CrdtStrategy, a as CrdtMode, b as CrdtState } from './strategy-BSxFXGzb.cjs';
|
|
4
|
-
import { N as NoydbError, Q as Query,
|
|
4
|
+
import { N as NoydbError, Q as Query, ao as RefRegistry, al as RefDescriptor, a2 as JoinableSource, aq as RefViolation, ar as ScanBuilder } from './index-BMjrzNZr.cjs';
|
|
5
5
|
import { F as FieldClause, I as IndexDef, C as CollectionIndexes } from './predicate-Dnu81tsS.cjs';
|
|
6
|
+
import { AttestationFieldSchema, RevocationList } from '@noy-db/attestation';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Standard Schema v1 integration.
|
|
@@ -794,8 +795,15 @@ interface LedgerEntry {
|
|
|
794
795
|
* guards subsystem when an admin/owner uses `withTransactions(...)`
|
|
795
796
|
* to repair a constraint-violating state. See `amendment` field
|
|
796
797
|
* below for the structured payload.
|
|
798
|
+
*
|
|
799
|
+
* `'lifecycle'` records a non-data audit event (e.g. partition
|
|
800
|
+
* handover, #226) — `collection`/`id` are empty and the event detail
|
|
801
|
+
* lives in `reason` (e.g. `'partition-handed-over:<sealId>'`). Like
|
|
802
|
+
* `amendment`, it carries no data envelope, so `verifyBackupIntegrity`
|
|
803
|
+
* skips it in the data cross-check (it still participates in the
|
|
804
|
+
* tamper-evident chain).
|
|
797
805
|
*/
|
|
798
|
-
readonly op: 'put' | 'delete' | 'amendment';
|
|
806
|
+
readonly op: 'put' | 'delete' | 'amendment' | 'lifecycle';
|
|
799
807
|
/** The collection the mutation targeted. */
|
|
800
808
|
readonly collection: string;
|
|
801
809
|
/** The record id the mutation targeted. */
|
|
@@ -7029,6 +7037,12 @@ declare class Vault {
|
|
|
7029
7037
|
* `vault.compact()`. Indexed by collection name.
|
|
7030
7038
|
*/
|
|
7031
7039
|
private readonly blobFieldsRegistry;
|
|
7040
|
+
/**
|
|
7041
|
+
* Per-collection attestation field-schema (issue side). Populated on
|
|
7042
|
+
* `collection({ attestation })` and read by `issueAttestation()`.
|
|
7043
|
+
* Indexed by collection name.
|
|
7044
|
+
*/
|
|
7045
|
+
private readonly attestationRegistry;
|
|
7032
7046
|
/**
|
|
7033
7047
|
* Per-vault ledger store. Lazy-initialized on first
|
|
7034
7048
|
* `collection()` call (which passes it through to the Collection)
|
|
@@ -7249,6 +7263,8 @@ declare class Vault {
|
|
|
7249
7263
|
* @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
|
|
7250
7264
|
*/
|
|
7251
7265
|
persistJsonSchema?: boolean;
|
|
7266
|
+
/** — declare the per-field schema for document attestation (issue side). */
|
|
7267
|
+
attestation?: AttestationFieldSchema;
|
|
7252
7268
|
}): Collection<T>;
|
|
7253
7269
|
/**
|
|
7254
7270
|
* Await all background persisted-schema writes triggered by
|
|
@@ -7431,6 +7447,22 @@ declare class Vault {
|
|
|
7431
7447
|
*/
|
|
7432
7448
|
compact(options?: CompactRunOptions): Promise<CompactionResult>;
|
|
7433
7449
|
exportBlobs(options?: ExportBlobsOptions): ExportBlobsHandle;
|
|
7450
|
+
issueAttestation(collectionName: string, id: string): Promise<{
|
|
7451
|
+
docId: string;
|
|
7452
|
+
qr: string;
|
|
7453
|
+
keyId: string;
|
|
7454
|
+
publicKeyB64: string;
|
|
7455
|
+
}>;
|
|
7456
|
+
getDocumentSigningPublicKey(): Promise<{
|
|
7457
|
+
keyId: string;
|
|
7458
|
+
publicKeyB64: string;
|
|
7459
|
+
}>;
|
|
7460
|
+
private makeIssueContext;
|
|
7461
|
+
revokeAttestation(docId: string): Promise<void>;
|
|
7462
|
+
unrevokeAttestation(docId: string): Promise<void>;
|
|
7463
|
+
getRevokedDocIds(): Promise<string[]>;
|
|
7464
|
+
publishRevocationList(): Promise<RevocationList>;
|
|
7465
|
+
private makeRevokeContext;
|
|
7434
7466
|
private writeExportAudit;
|
|
7435
7467
|
/**
|
|
7436
7468
|
* Read-only accessor for the invoking keyring's export capability,
|
|
@@ -9897,6 +9929,18 @@ interface SessionStrategy {
|
|
|
9897
9929
|
* - {@link MemorySealingKeyProvider} — in-memory test provider; uses
|
|
9898
9930
|
* a deterministic per-instance "key" so two providers with
|
|
9899
9931
|
* different ids cannot unseal each other's outputs.
|
|
9932
|
+
* - {@link RecipientHint} — public material a sender uses to seal
|
|
9933
|
+
* plaintext for a specific recipient; published by
|
|
9934
|
+
* {@link RecipientSealer.publishRecipientHint} and transported
|
|
9935
|
+
* out-of-band to the sender before bundle writes.
|
|
9936
|
+
* - {@link RecipientSealer} — interface for asymmetric/granted
|
|
9937
|
+
* providers that support recipient-target sealing (RSA-OAEP,
|
|
9938
|
+
* cloud-KMS asymmetric, etc.); distinct from self-only
|
|
9939
|
+
* {@link SealingKeyProvider} (macOS Keychain, WebAuthn-PRF).
|
|
9940
|
+
* - {@link MemoryRecipientSealer} — in-process reference
|
|
9941
|
+
* implementation of both `RecipientSealer` and
|
|
9942
|
+
* `SealingKeyProvider` using real WebCrypto RSA-OAEP + AES-GCM;
|
|
9943
|
+
* safe for tests and same-process sender/recipient scenarios.
|
|
9900
9944
|
* - {@link loadSealedPassphrase} / {@link saveSealedPassphrase} —
|
|
9901
9945
|
* plaintext envelope storage at `_meta/sealed-passphrase`.
|
|
9902
9946
|
* Mirrors the `_meta/handle` and `_meta/public-envelope` AES-
|
|
@@ -9977,6 +10021,78 @@ declare class MemorySealingKeyProvider implements SealingKeyProvider {
|
|
|
9977
10021
|
seal(passphrase: Uint8Array): Promise<Uint8Array>;
|
|
9978
10022
|
unseal(sealed: Uint8Array): Promise<Uint8Array>;
|
|
9979
10023
|
}
|
|
10024
|
+
/**
|
|
10025
|
+
* Public material a sender uses to seal-for-this-recipient. Published by
|
|
10026
|
+
* a recipient's RecipientSealer; transported to the sender out-of-band
|
|
10027
|
+
* (email, S3, in-app message). The sender obtains the hint, supplies it
|
|
10028
|
+
* to writeNoydbBundle's sealedCredentials.perUser[userId].hint, and the
|
|
10029
|
+
* hub seals each user's credential against it. Per foundation §11.4.
|
|
10030
|
+
*/
|
|
10031
|
+
type RecipientHint = {
|
|
10032
|
+
readonly v: 1;
|
|
10033
|
+
/** Recipient's provider id; matches the SealedAutoUnlockEntry.pid they'll unseal under. */
|
|
10034
|
+
readonly pid: string;
|
|
10035
|
+
/** Algorithm the sender uses to produce the seal. Slice 1 ships RSA-OAEP-SHA256 only. */
|
|
10036
|
+
readonly alg: 'rsa-oaep-sha256';
|
|
10037
|
+
/** Public material — alg-specific. For 'rsa-oaep-sha256': { publicKeyPem: string }. */
|
|
10038
|
+
readonly material: Readonly<Record<string, unknown>>;
|
|
10039
|
+
};
|
|
10040
|
+
/**
|
|
10041
|
+
* Handover-capable provider. Implemented additionally by asymmetric/granted
|
|
10042
|
+
* providers (cloud-KMS asymmetric, Azure RSA Key Vault, AWS KMS with grant).
|
|
10043
|
+
* Self-only providers (macOS Keychain, env-var, WebAuthn-PRF) do NOT
|
|
10044
|
+
* implement this — the §11.2 capability matrix lives in the type system.
|
|
10045
|
+
*
|
|
10046
|
+
* Per foundation §11.4. A function that requires recipient-target sealing
|
|
10047
|
+
* takes `RecipientSealer`, not `SealingKeyProvider` — the compiler rejects
|
|
10048
|
+
* passing a self-only provider at the spec site.
|
|
10049
|
+
*/
|
|
10050
|
+
interface RecipientSealer {
|
|
10051
|
+
readonly id: string;
|
|
10052
|
+
/** Produce hint material a sender uses to seal-for-this-recipient. */
|
|
10053
|
+
publishRecipientHint(): Promise<RecipientHint>;
|
|
10054
|
+
/**
|
|
10055
|
+
* Seal plaintext for the recipient described by `hint`. Returns opaque
|
|
10056
|
+
* bytes — same contract as `SealingKeyProvider.seal()`. The bundle
|
|
10057
|
+
* layer base64-encodes the bytes into `SealedAutoUnlockEntry.sealed`
|
|
10058
|
+
* without inspecting them.
|
|
10059
|
+
*/
|
|
10060
|
+
sealForRecipient(plaintext: Uint8Array, hint: RecipientHint): Promise<Uint8Array>;
|
|
10061
|
+
}
|
|
10062
|
+
/**
|
|
10063
|
+
* Reference implementation of `RecipientSealer` + `SealingKeyProvider`.
|
|
10064
|
+
* Uses WebCrypto RSA-OAEP-SHA256 (2048-bit) to wrap a fresh 32-byte
|
|
10065
|
+
* AES-GCM CEK, AES-GCM-encrypts plaintext under it, and packs the
|
|
10066
|
+
* result into a self-describing TLV:
|
|
10067
|
+
*
|
|
10068
|
+
* byte 0 : version (0x01)
|
|
10069
|
+
* bytes 1..256 : RSA-OAEP-wrapped CEK (fixed 256 bytes at RSA-2048)
|
|
10070
|
+
* bytes 257..268: AES-GCM IV (12 bytes)
|
|
10071
|
+
* bytes 269.. : AES-GCM ciphertext ‖ 16-byte tag
|
|
10072
|
+
*
|
|
10073
|
+
* Implements BOTH interfaces. `seal(plaintext)` (self-target) is just
|
|
10074
|
+
* `sealForRecipient(plaintext, this own hint)` — same TLV. Convenient
|
|
10075
|
+
* for tests where one provider plays both ends. Real cloud providers
|
|
10076
|
+
* (`at-aws-kms`, etc.) will pick their own internal layouts; the only
|
|
10077
|
+
* contract is round-trip identity.
|
|
10078
|
+
*
|
|
10079
|
+
* SAFE for production within its scope — the cryptography is real
|
|
10080
|
+
* (RSA-OAEP + AES-GCM via WebCrypto), but the keypair lives in-process
|
|
10081
|
+
* and is regenerated on every construction. Not suitable as a managed
|
|
10082
|
+
* keychain; use it for tests and for shipping bundles where the
|
|
10083
|
+
* recipient instance lives in the same process as the sender (rare).
|
|
10084
|
+
*/
|
|
10085
|
+
declare class MemoryRecipientSealer implements SealingKeyProvider, RecipientSealer {
|
|
10086
|
+
readonly id: string;
|
|
10087
|
+
private readonly keypair;
|
|
10088
|
+
constructor(opts: {
|
|
10089
|
+
id: string;
|
|
10090
|
+
});
|
|
10091
|
+
publishRecipientHint(): Promise<RecipientHint>;
|
|
10092
|
+
sealForRecipient(plaintext: Uint8Array, hint: RecipientHint): Promise<Uint8Array>;
|
|
10093
|
+
seal(plaintext: Uint8Array): Promise<Uint8Array>;
|
|
10094
|
+
unseal(bytes: Uint8Array): Promise<Uint8Array>;
|
|
10095
|
+
}
|
|
9980
10096
|
/** Reserved id for the managed-passphrase envelope under `_meta`. */
|
|
9981
10097
|
declare const SEALED_PASSPHRASE_RECORD_ID: "sealed-passphrase";
|
|
9982
10098
|
/** Plaintext payload stored inside the `_meta/sealed-passphrase` envelope. */
|
|
@@ -11851,4 +11967,4 @@ interface DeleteManyResult {
|
|
|
11851
11967
|
}>;
|
|
11852
11968
|
}
|
|
11853
11969
|
|
|
11854
|
-
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 FactorRequirement 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 CollectionDescriptor as bA, type CollectionStats as bB, type Conflict as bC, type ConflictPolicy as bD, type ConflictStrategy as bE, type CrossTierAccessEvent as bF, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as bG, DELEGATIONS_COLLECTION as bH, type DeepPartial as bI, type DeepPartialOrNull as bJ, type DelegationToken as bK, type DeleteManyResult as bL, type DerivationDescriptor as bM, type DirtyEntry as bN, type DumpSchemaOptions as bO, ELEVATION_AUDIT_COLLECTION as bP, ElevatedHandle as bQ, type EnrollAuthenticatorOptions as bR, type EnrollAuthenticatorWrappingDEKsOptions as bS, type EnrollAuthenticatorWrappingKEKOptions as bT, type EnrollRecoveryResult as bU, type ExportCapability as bV, type ExportChunk as bW, type ExportFormat as bX, type ExportStreamOptions as bY, type FactorKind as bZ, type FactorProofBundle as b_, type MVQueryContext as ba, type RegisteredMV as bb, MaterializedViewRegistry as bc, type MaterializedFromMeta as bd, type MaterializedViewOutput as be, type UnionSource as bf, type UserEnvelope as bg, type PublicEnvelope as bh, type GateName as bi, type GatePolicy as bj, type VaultPolicy as bk, type ActiveTier as bl, type FactorProof as bm, type PersistedSchemaEnvelope as bn, type DirectoryConfig as bo, type UserVisibility as bp, Vault as bq, type AccessibleVault as br, BUNDLE_STORE_POLICY as bs, type BuiltInGateName as bt, type BundleRecipient as bu, type CacheOptions as bv, type CacheStats as bw, type ChangeEvent as bx, type CollectionChangeEvent as by, type CollectionConflictResolver as bz, DictionaryHandle as c, type PutManyItemOptions as c$, type FieldDescriptor as c0, type FieldSource as c1, type GhostRecord as c2, type GrantOptions as c3, type HistoryConfig as c4, type HistoryEntry as c5, INDEXED_STORE_POLICY as c6, type ImportCapability as c7, type InferOutput as c8, type InternalCollectionStats as c9, type NoydbBundleStore as cA, type NoydbEventMap as cB, type NoydbOptions as cC, type OverlayViewDescriptor as cD, PUBLIC_ENVELOPE_FIELDS as cE, type PaperRecoveryDoc as cF, type PaperRecoveryEntry as cG, type PassphrasePolicy as cH, type PassphraseValidationResult as cI, type Permission as cJ, type Permissions as cK, type PersistedSchemaKind as cL, type PlaintextTranslatorContext as cM, type PlaintextTranslatorFn as cN, PresenceHandle as cO, type PresencePeer as cP, type PublicEnvelopeField as cQ, type PublicEnvelopeSchema as cR, type PublicEnvelopeText as cS, type PullMode as cT, type PullOptions as cU, type PullPolicy as cV, type PullResult as cW, type PushMode as cX, type PushOptions as cY, type PushPolicy as cZ, type PushResult as c_, type IssueDelegationOptions as ca, type IssueMagicLinkGrantOptions as cb, type KeyringAuthenticator as cc, type KeyringAuthenticatorWrappingDEKs as cd, type KeyringAuthenticatorWrappingKEK as ce, type KeyringFile as cf, type ListAccessibleVaultsOptions as cg, type ListPageResult as ch, type ListUsersOptions as ci, type LiveUserEnvelope as cj, type LocaleReadOptions as ck, Lru as cl, type LruOptions as cm, type LruStats as cn, MAGIC_LINK_CONTENT_INFO_PREFIX as co, MAGIC_LINK_GRANTS_COLLECTION as cp, MAGIC_LINK_KEK_INFO_PREFIX as cq, type MagicLinkGrantPayload as cr, type MagicLinkGrantRecord as cs, type MaterializedViewDescriptor as ct, MemorySealingKeyProvider as cu, NOYDB_BACKUP_VERSION as cv, NOYDB_FORMAT_VERSION as cw, NOYDB_KEYRING_VERSION as cx, NOYDB_SYNC_VERSION as cy, Noydb as cz, type DictionaryOptions as d, type WeakPassphraseReason as d$, type PutManyOptions as d0, type PutManyResult as d1, type QueryAcrossOptions as d2, type QueryAcrossResult as d3, type QuickUnlockState as d4, QuickUnlockStore as d5, type ReAuthOperation as d6, type RecoverPassphraseInput as d7, type RecoverPassphraseResult as d8, type RecoverUserOptions as d9, type SyncPolicy as dA, SyncScheduler as dB, type SyncSchedulerStatus as dC, type SyncStatus as dD, type SyncTarget as dE, type SyncTargetRole as dF, SyncTransaction as dG, type SyncTransactionResult as dH, type TierMode as dI, type TranslatorAuditEntry as dJ, type TxOp as dK, USER_ENVELOPE_COLLECTION as dL, USER_ENVELOPE_MAX_BYTES as dM, type Unsubscribe as dN, type UpdateAuthenticatorOptions as dO, type UpdateUserOptions as dP, UserApi as dQ, type UserEnvelopeCheckGate as dR, UserEnvelopeOversizedError as dS, type UserEnvelopePresented as dT, type UserInfo as dU, type VaultBackup as dV, type VaultPolicyOnDisk as dW, type VaultSchemaSnapshot as dX, type VaultSnapshot as dY, type WarningRules as dZ, WeakPassphraseError as d_, type RecoveryProof as da, type ResolvedPublicEnvelopeSchema as db, type RevokeOptions as dc, type RotatePassphraseInput as dd, type RotateRecoveryOptions as de, type RotateRecoveryResult as df, SEALED_PASSPHRASE_RECORD_ID as dg, type SealedEnvelope as dh, type SealedPassphrase as di, type SealingKeyProvider as dj, type SessionPolicy as dk, type SetPublicEnvelopeInput as dl, type ShamirRecoveryDoc as dm, type ShamirRecoveryEntry as dn, type ShamirRecoveryProvider as dp, type SlotRewrapCeremony as dq, type SlotRewrapContext as dr, type StandardSchemaV1 as ds, type StandardSchemaV1Issue as dt, type StandardSchemaV1SyncResult as du, type StoreAuth as dv, type StoreAuthKind as dw, type StoreCapabilities as dx, SyncEngine as dy, type SyncMetadata as dz, type I18nTextDescriptor as e, type WrappedDeksBlob as e0, assertStrongPassphrase as e1, buildRecipientKeyringFile as e2, burnPaperRecoveryEntry as e3, createNoydb as e4, createStore as e5, deriveMagicLinkContentKey as e6, enrollAuthenticator as e7, estimateEntropy as e8, evaluateExportCapability as e9, revokeDelegation as eA, revokeMagicLinkGrant as eB, savePaperRecoveryEntries as eC, saveSealedPassphrase as eD, saveShamirRecoveryEntries as eE, unwrapDeksFromBlob as eF, unwrapDeksFromPaperEntry as eG, unwrapDeksFromShamirEntry as eH, unwrapMagicLinkGrant as eI, validatePassphrase as eJ, validatePublicEnvelopeInput as eK, validateSchemaInput as eL, validateSchemaOutput as eM, writeMagicLinkGrant as eN, changeSecret as eO, createOwnerKeyring as eP, ensureCollectionDEK as eQ, grant as eR, loadKeyring as eS, persistKeyring as eT, revoke as eU, updateAuthenticator as eV, updateKeyringIdentity as eW, evaluateImportCapability as ea, findAuthenticator as eb, hasExportCapability as ec, hasImportCapability as ed, hasRecoveryEnrolled as ee, isMagicLinkGrantExpired as ef, isPublicEnvelope as eg, issueDelegation as eh, recoverPassphrase as ei, rotatePassphrase as ej, listMagicLinkGrants as ek, listUsers as el, listUsersWithEnvelopes as em, loadActiveDelegations as en, loadPaperRecoveryEntries as eo, loadSealedPassphrase as ep, loadShamirRecoveryEntries as eq, magicLinkGrantRecordId as er, mintPaperRecoveryEntry as es, mintShamirRecoveryEntry as et, mintWrappedDeksBlob as eu, parseSealedEnvelope as ev, readMagicLinkGrantRecord as ew, recoverUser as ex, removeAuthenticator as ey, resolveSchema 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 };
|
|
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 };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './index-CmVgTkqk.cjs';
|
|
1
|
+
import { ba as PublicEnvelope, bb as SealingKeyProvider, bc as BundleRecipient, bd as RecipientSealer, be as RecipientHint, bf as Vault } from './types-BoFFiskX.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* `.noydb` container format — byte layout, header schema, validators.
|
|
@@ -140,6 +139,22 @@ interface NoydbBundleHeader {
|
|
|
140
139
|
* pre-#197 shape; back-compatible).
|
|
141
140
|
*/
|
|
142
141
|
readonly autoUnlock?: 'unsealed' | 'sealed';
|
|
142
|
+
/**
|
|
143
|
+
* Bundle's role in the source → destination lifecycle (#203).
|
|
144
|
+
* - omitted / 'snapshot' (default): backup/copy of an existing vault.
|
|
145
|
+
* - 'extracted-partition': re-keyed projection awaiting adoption.
|
|
146
|
+
*/
|
|
147
|
+
readonly bundleKind?: 'snapshot' | 'extracted-partition';
|
|
148
|
+
/**
|
|
149
|
+
* Transfer-seal INDICATOR (#206) — metadata only, no payload (the
|
|
150
|
+
* sealed DEKs live in the body). Present iff
|
|
151
|
+
* bundleKind === 'extracted-partition'.
|
|
152
|
+
*/
|
|
153
|
+
readonly transferSeal?: {
|
|
154
|
+
readonly v: 1;
|
|
155
|
+
readonly alg: 'aes-256-gcm-pre-shared';
|
|
156
|
+
readonly sealId: string;
|
|
157
|
+
};
|
|
143
158
|
}
|
|
144
159
|
/**
|
|
145
160
|
* Validate a parsed bundle header. Throws on any deviation from
|
|
@@ -328,9 +343,15 @@ interface WriteNoydbBundleOptions {
|
|
|
328
343
|
* recipient must hold a provider with a matching `pid` (i.e.,
|
|
329
344
|
* `provider.id`) to auto-unseal on import.
|
|
330
345
|
*
|
|
331
|
-
* `mode: 'self-target'`
|
|
332
|
-
*
|
|
333
|
-
*
|
|
346
|
+
* `mode: 'self-target'` — sender and recipient share the same
|
|
347
|
+
* provider identity (same iCloud Keychain entry, same
|
|
348
|
+
* MDM-provisioned bundle id, same KMS account, etc.).
|
|
349
|
+
*
|
|
350
|
+
* `mode: 'recipient-target'` — asymmetric sealing via a
|
|
351
|
+
* {@link RecipientSealer}. Each user entry carries a
|
|
352
|
+
* `credential` and a `hint` (the recipient's public material).
|
|
353
|
+
* The bundle can only be unsealed by the holder of the matching
|
|
354
|
+
* private key.
|
|
334
355
|
*
|
|
335
356
|
* Mutually exclusive with `autoCredentials`, `autoPassphrases`,
|
|
336
357
|
* and `sealedPassphrases`.
|
|
@@ -339,6 +360,13 @@ interface WriteNoydbBundleOptions {
|
|
|
339
360
|
readonly mode: 'self-target';
|
|
340
361
|
readonly provider: SealingKeyProvider;
|
|
341
362
|
readonly perUser: Record<string, AutoCredential>;
|
|
363
|
+
} | {
|
|
364
|
+
readonly mode: 'recipient-target';
|
|
365
|
+
readonly provider: RecipientSealer;
|
|
366
|
+
readonly perUser: Record<string, {
|
|
367
|
+
readonly credential: AutoCredential;
|
|
368
|
+
readonly hint: RecipientHint;
|
|
369
|
+
}>;
|
|
342
370
|
};
|
|
343
371
|
/**
|
|
344
372
|
* @deprecated Use `autoCredentials` instead (#215).
|
|
@@ -371,11 +399,11 @@ interface WriteNoydbBundleOptions {
|
|
|
371
399
|
* recipient must hold a provider with a matching `pid` (i.e.,
|
|
372
400
|
* `provider.id`) to auto-unseal on import.
|
|
373
401
|
*
|
|
374
|
-
* `mode: 'self-target'` is the only mode
|
|
375
|
-
* recipient share the same provider identity (same iCloud Keychain
|
|
402
|
+
* `mode: 'self-target'` is the only mode for `sealedPassphrases` — sender
|
|
403
|
+
* and recipient share the same provider identity (same iCloud Keychain
|
|
376
404
|
* entry, same MDM-provisioned bundle id, same KMS account, etc.).
|
|
377
|
-
*
|
|
378
|
-
*
|
|
405
|
+
* For recipient-target sealing via the `RecipientSealer` interface,
|
|
406
|
+
* use `sealedCredentials` with `mode: 'recipient-target'` (§11.4).
|
|
379
407
|
*
|
|
380
408
|
* Mutually exclusive with `autoCredentials`, `sealedCredentials`,
|
|
381
409
|
* and `autoPassphrases`.
|
|
@@ -440,31 +468,21 @@ interface ReadNoydbBundleOptions {
|
|
|
440
468
|
*/
|
|
441
469
|
readonly attemptUnsealAcrossProviders?: boolean;
|
|
442
470
|
}
|
|
443
|
-
/** Test-only: reset the brotli detection cache between tests. */
|
|
444
|
-
declare function resetBrotliSupportCache(): void;
|
|
445
471
|
/**
|
|
446
|
-
*
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
* via `vault.getBundleHandle()` — same handle on
|
|
451
|
-
* every export from the same vault instance, so cloud
|
|
452
|
-
* adapters can use it as a primary key.
|
|
453
|
-
* 2. `vault.dump()` → JSON string with encrypted records
|
|
454
|
-
* inside.
|
|
455
|
-
* 3. UTF-8 encode the dump string.
|
|
456
|
-
* 4. Compress (brotli if available, gzip fallback by default).
|
|
457
|
-
* 5. Compute SHA-256 of the compressed body for integrity.
|
|
458
|
-
* 6. Build the minimum-disclosure header from format version,
|
|
459
|
-
* handle, body length, body sha.
|
|
460
|
-
* 7. Serialize: magic (4) + flags (1) + algo (1) + headerLen (4)
|
|
461
|
-
* + header JSON (N) + compressed body (M).
|
|
462
|
-
*
|
|
463
|
-
* The output is a single `Uint8Array`. Consumers writing to disk
|
|
464
|
-
* pass it to `fs.writeFile`; consumers uploading to cloud storage
|
|
465
|
-
* pass it as the request body. The `@noy-db/file` adapter wraps
|
|
466
|
-
* this with a `saveBundle(path, vault)` helper.
|
|
472
|
+
* Transfer-seal payload (#206). The destination DEKs, exported to raw
|
|
473
|
+
* bytes and AES-256-GCM-sealed *as a set* under the one-time transfer
|
|
474
|
+
* key. `adoptPartition` (#207) unseals this; `createOwnerOnAdoptedPartition`
|
|
475
|
+
* (#208) re-wraps the raw DEKs under the recipient's KEK.
|
|
467
476
|
*/
|
|
477
|
+
interface TransferSealPayload {
|
|
478
|
+
readonly v: 1;
|
|
479
|
+
readonly alg: 'aes-256-gcm-pre-shared';
|
|
480
|
+
readonly sealId: string;
|
|
481
|
+
/** base64(AES-256-GCM(transferKey, JSON of { collection: base64(rawDEK) })) — iv ‖ ct ‖ tag. */
|
|
482
|
+
readonly payload: string;
|
|
483
|
+
}
|
|
484
|
+
/** Test-only: reset the brotli detection cache between tests. */
|
|
485
|
+
declare function resetBrotliSupportCache(): void;
|
|
468
486
|
declare function writeNoydbBundle(vault: Vault, opts?: WriteNoydbBundleOptions): Promise<Uint8Array>;
|
|
469
487
|
/**
|
|
470
488
|
* Read just the bundle header — no body decompression, no
|
|
@@ -582,4 +600,4 @@ declare function generateULID(): string;
|
|
|
582
600
|
*/
|
|
583
601
|
declare function isULID(value: string): boolean;
|
|
584
602
|
|
|
585
|
-
export { type AutoCredential as A,
|
|
603
|
+
export { type AutoCredential as A, COMPRESSION_BROTLI as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type ReadNoydbBundleOptions as R, type TransferSealPayload as T, type WriteNoydbBundleOptions as W, COMPRESSION_GZIP as a, COMPRESSION_NONE as b, type CompressionAlgo as c, FLAG_HAS_INTEGRITY_HASH as d, NOYDB_BUNDLE_MAGIC as e, NOYDB_BUNDLE_PREFIX_BYTES as f, type NoydbBundleHeader as g, type NoydbBundleReadResult as h, encodeBundleHeader as i, generateULID as j, isULID as k, readNoydbBundleHeader as l, resetBrotliSupportCache as m, type AutoCredentialKind as n, hasNoydbBundleMagic as o, readNoydbBundlePublicEnvelope as p, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
|