@noy-db/hub 0.1.0-pre.9 → 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.
Files changed (288) hide show
  1. package/dist/aggregate/index.cjs +91 -36
  2. package/dist/aggregate/index.cjs.map +1 -1
  3. package/dist/aggregate/index.d.cts +2 -2
  4. package/dist/aggregate/index.d.ts +2 -2
  5. package/dist/aggregate/index.js +16 -9
  6. package/dist/aggregate/index.js.map +1 -1
  7. package/dist/attestation/index.cjs +305 -0
  8. package/dist/attestation/index.cjs.map +1 -0
  9. package/dist/attestation/index.d.cts +52 -0
  10. package/dist/attestation/index.d.ts +52 -0
  11. package/dist/attestation/index.js +36 -0
  12. package/dist/attestation/index.js.map +1 -0
  13. package/dist/blobs/index.cjs.map +1 -1
  14. package/dist/blobs/index.d.cts +7 -6
  15. package/dist/blobs/index.d.ts +7 -6
  16. package/dist/blobs/index.js +10 -8
  17. package/dist/blobs/index.js.map +1 -1
  18. package/dist/bundle/index.cjs +16923 -60
  19. package/dist/bundle/index.cjs.map +1 -1
  20. package/dist/bundle/index.d.cts +175 -6
  21. package/dist/bundle/index.d.ts +175 -6
  22. package/dist/bundle/index.js +543 -4
  23. package/dist/bundle/index.js.map +1 -1
  24. package/dist/{chunk-PTVMYYON.js → chunk-243PNUA6.js} +3 -3
  25. package/dist/{chunk-MR4424N3.js → chunk-2PAQNPE3.js} +2 -2
  26. package/dist/chunk-3QAKZ37R.js +83 -0
  27. package/dist/chunk-3QAKZ37R.js.map +1 -0
  28. package/dist/chunk-3S4BJX25.js +36 -0
  29. package/dist/chunk-3S4BJX25.js.map +1 -0
  30. package/dist/chunk-3XHOCQK4.js +118 -0
  31. package/dist/chunk-3XHOCQK4.js.map +1 -0
  32. package/dist/{chunk-AVVPZ4BC.js → chunk-3Y53S2SA.js} +4 -4
  33. package/dist/chunk-3Z2TPHC4.js +291 -0
  34. package/dist/chunk-3Z2TPHC4.js.map +1 -0
  35. package/dist/chunk-4HIL6AHQ.js +57 -0
  36. package/dist/chunk-4HIL6AHQ.js.map +1 -0
  37. package/dist/chunk-5ZGZ6HIZ.js +100 -0
  38. package/dist/chunk-5ZGZ6HIZ.js.map +1 -0
  39. package/dist/{chunk-ZFKD4QMV.js → chunk-7BRE6EUA.js} +3 -3
  40. package/dist/chunk-7BUTTVMR.js +34 -0
  41. package/dist/chunk-7BUTTVMR.js.map +1 -0
  42. package/dist/{chunk-VQBTTTUN.js → chunk-7Q5PLD5C.js} +4 -4
  43. package/dist/{chunk-VQBTTTUN.js.map → chunk-7Q5PLD5C.js.map} +1 -1
  44. package/dist/{chunk-QAVUREFT.js → chunk-7Z23ZFLV.js} +12 -6
  45. package/dist/chunk-7Z23ZFLV.js.map +1 -0
  46. package/dist/chunk-AHPFONIL.js +59 -0
  47. package/dist/chunk-AHPFONIL.js.map +1 -0
  48. package/dist/chunk-CXSCDO5T.js +51 -0
  49. package/dist/chunk-CXSCDO5T.js.map +1 -0
  50. package/dist/chunk-E535SAN4.js +8834 -0
  51. package/dist/chunk-E535SAN4.js.map +1 -0
  52. package/dist/chunk-EUYOGYGV.js +830 -0
  53. package/dist/chunk-EUYOGYGV.js.map +1 -0
  54. package/dist/chunk-FAQVNJD4.js +61 -0
  55. package/dist/chunk-FAQVNJD4.js.map +1 -0
  56. package/dist/{chunk-SCZXXXU4.js → chunk-G6FRSBKK.js} +7 -32
  57. package/dist/chunk-G6FRSBKK.js.map +1 -0
  58. package/dist/chunk-GIV6DWBG.js +79 -0
  59. package/dist/chunk-GIV6DWBG.js.map +1 -0
  60. package/dist/chunk-HXJXPZRE.js +73 -0
  61. package/dist/chunk-HXJXPZRE.js.map +1 -0
  62. package/dist/{chunk-GOUT6DND.js → chunk-J4KLMEUL.js} +173 -91
  63. package/dist/chunk-J4KLMEUL.js.map +1 -0
  64. package/dist/{chunk-2CSJGFCB.js → chunk-JYQTXEIO.js} +6 -229
  65. package/dist/chunk-JYQTXEIO.js.map +1 -0
  66. package/dist/{chunk-MDDTIZUO.js → chunk-LRAZDV5X.js} +7 -119
  67. package/dist/chunk-LRAZDV5X.js.map +1 -0
  68. package/dist/{chunk-M5INGEFC.js → chunk-MRIBLZL3.js} +3 -1
  69. package/dist/chunk-MRIBLZL3.js.map +1 -0
  70. package/dist/{chunk-USKYUS74.js → chunk-MUWOSVEP.js} +2 -2
  71. package/dist/{chunk-4PWAI7Q4.js → chunk-NWZ3I6R6.js} +5 -5
  72. package/dist/chunk-OVZDFEOR.js +124 -0
  73. package/dist/chunk-OVZDFEOR.js.map +1 -0
  74. package/dist/chunk-PEULZC6M.js +118 -0
  75. package/dist/chunk-PEULZC6M.js.map +1 -0
  76. package/dist/chunk-PFSNOPBQ.js +233 -0
  77. package/dist/chunk-PFSNOPBQ.js.map +1 -0
  78. package/dist/chunk-PLI5TV7N.js +53 -0
  79. package/dist/chunk-PLI5TV7N.js.map +1 -0
  80. package/dist/{chunk-WDM5XGGS.js → chunk-Q6W2CMEJ.js} +181 -11
  81. package/dist/chunk-Q6W2CMEJ.js.map +1 -0
  82. package/dist/{chunk-QGZRWRSL.js → chunk-QPEXPHJR.js} +4 -4
  83. package/dist/{chunk-R36SIKES.js → chunk-QXQRKXCU.js} +2 -2
  84. package/dist/chunk-RTZVQAJ7.js +82 -0
  85. package/dist/chunk-RTZVQAJ7.js.map +1 -0
  86. package/dist/chunk-TBKOGSYR.js +296 -0
  87. package/dist/chunk-TBKOGSYR.js.map +1 -0
  88. package/dist/chunk-UMLVJTYV.js +20 -0
  89. package/dist/chunk-UMLVJTYV.js.map +1 -0
  90. package/dist/chunk-UND4XIB6.js +251 -0
  91. package/dist/chunk-UND4XIB6.js.map +1 -0
  92. package/dist/chunk-VCGTOS2A.js +795 -0
  93. package/dist/chunk-VCGTOS2A.js.map +1 -0
  94. package/dist/chunk-VE6YVP32.js +19 -0
  95. package/dist/chunk-VE6YVP32.js.map +1 -0
  96. package/dist/{chunk-M62XNWRA.js → chunk-VK5EER6C.js} +2 -2
  97. package/dist/{chunk-NXFEYLVG.js → chunk-VPSUZLOJ.js} +4 -3
  98. package/dist/{chunk-NXFEYLVG.js.map → chunk-VPSUZLOJ.js.map} +1 -1
  99. package/dist/{chunk-TDR6T5CJ.js → chunk-VRBCTEKQ.js} +91 -132
  100. package/dist/chunk-VRBCTEKQ.js.map +1 -0
  101. package/dist/{chunk-ACLDOTNQ.js → chunk-W3XXT26A.js} +303 -3
  102. package/dist/chunk-W3XXT26A.js.map +1 -0
  103. package/dist/{chunk-CIMZBAZB.js → chunk-XG3PTSCD.js} +1 -1
  104. package/dist/chunk-XG3PTSCD.js.map +1 -0
  105. package/dist/chunk-Y2RKOPNC.js +145 -0
  106. package/dist/chunk-Y2RKOPNC.js.map +1 -0
  107. package/dist/{chunk-NPC4LFV5.js → chunk-YMYK7US4.js} +2 -2
  108. package/dist/{chunk-RKJ6OL7K.js → chunk-YS3POABP.js} +1 -1
  109. package/dist/chunk-YS3POABP.js.map +1 -0
  110. package/dist/chunk-YTXSFG3C.js +179 -0
  111. package/dist/chunk-YTXSFG3C.js.map +1 -0
  112. package/dist/consent/index.cjs.map +1 -1
  113. package/dist/consent/index.d.cts +7 -6
  114. package/dist/consent/index.d.ts +7 -6
  115. package/dist/consent/index.js +3 -3
  116. package/dist/{crypto-IVKU7YTT.js → crypto-5ZDIY3NG.js} +3 -3
  117. package/dist/{delegation-2DBS2EOH.js → delegation-QYXZW25W.js} +5 -4
  118. package/dist/derivations/index.cjs +351 -0
  119. package/dist/derivations/index.cjs.map +1 -0
  120. package/dist/derivations/index.d.cts +72 -0
  121. package/dist/derivations/index.d.ts +72 -0
  122. package/dist/derivations/index.js +27 -0
  123. package/dist/{dev-unlock-Da1B0TIK.d.cts → dev-unlock-DQCNDfFp.d.cts} +1 -1
  124. package/dist/{dev-unlock-BdPp68qn.d.ts → dev-unlock-utkybTKb.d.ts} +1 -1
  125. package/dist/executor-AS2IDHKZ.js +11 -0
  126. package/dist/executor-HLXFXNFM.js +8 -0
  127. package/dist/executor-HLXFXNFM.js.map +1 -0
  128. package/dist/executor-HN6YBHZ5.js +8 -0
  129. package/dist/executor-HN6YBHZ5.js.map +1 -0
  130. package/dist/fanout-sidecar-VJ52RIEY.js +51 -0
  131. package/dist/fanout-sidecar-VJ52RIEY.js.map +1 -0
  132. package/dist/guards/index.cjs +315 -0
  133. package/dist/guards/index.cjs.map +1 -0
  134. package/dist/guards/index.d.cts +31 -0
  135. package/dist/guards/index.d.ts +31 -0
  136. package/dist/guards/index.js +29 -0
  137. package/dist/guards/index.js.map +1 -0
  138. package/dist/{hash-lsoL3eEW.d.ts → hash-DcoYWfJ_.d.ts} +1 -1
  139. package/dist/{hash-BEfzPKwo.d.cts → hash-jDowCrK2.d.cts} +1 -1
  140. package/dist/history/index.cjs +8 -1
  141. package/dist/history/index.cjs.map +1 -1
  142. package/dist/history/index.d.cts +8 -7
  143. package/dist/history/index.d.ts +8 -7
  144. package/dist/history/index.js +6 -6
  145. package/dist/i18n/index.cjs +81 -0
  146. package/dist/i18n/index.cjs.map +1 -1
  147. package/dist/i18n/index.d.cts +7 -6
  148. package/dist/i18n/index.d.ts +7 -6
  149. package/dist/i18n/index.js +27 -12
  150. package/dist/i18n/index.js.map +1 -1
  151. package/dist/{index-6xNpPsxR.d.cts → index-BCKdioeh.d.ts} +331 -5
  152. package/dist/{index-DJTf9yxn.d.ts → index-BMjrzNZr.d.cts} +331 -5
  153. package/dist/index.cjs +6065 -959
  154. package/dist/index.cjs.map +1 -1
  155. package/dist/index.d.cts +208 -16
  156. package/dist/index.d.ts +208 -16
  157. package/dist/index.js +242 -7392
  158. package/dist/index.js.map +1 -1
  159. package/dist/indexing/index.cjs +2 -0
  160. package/dist/indexing/index.cjs.map +1 -1
  161. package/dist/indexing/index.d.cts +3 -3
  162. package/dist/indexing/index.d.ts +3 -3
  163. package/dist/indexing/index.js +4 -4
  164. package/dist/issue-ORP37MVW.js +12 -0
  165. package/dist/issue-ORP37MVW.js.map +1 -0
  166. package/dist/{lazy-builder-CZVLKh0Z.d.cts → lazy-builder-C-rPfWG0.d.cts} +1 -1
  167. package/dist/{lazy-builder-BwEoBQZ9.d.ts → lazy-builder-Rpd-V3jP.d.ts} +1 -1
  168. package/dist/{ledger-QZTTHQAQ.js → ledger-3IU5GMXA.js} +6 -6
  169. package/dist/ledger-3IU5GMXA.js.map +1 -0
  170. package/dist/materialized-views/index.cjs +837 -0
  171. package/dist/materialized-views/index.cjs.map +1 -0
  172. package/dist/materialized-views/index.d.cts +184 -0
  173. package/dist/materialized-views/index.d.ts +184 -0
  174. package/dist/materialized-views/index.js +45 -0
  175. package/dist/materialized-views/index.js.map +1 -0
  176. package/dist/noydb-5H3C24GG.js +34 -0
  177. package/dist/noydb-5H3C24GG.js.map +1 -0
  178. package/dist/overlay-views/index.cjs +359 -0
  179. package/dist/overlay-views/index.cjs.map +1 -0
  180. package/dist/overlay-views/index.d.cts +82 -0
  181. package/dist/overlay-views/index.d.ts +82 -0
  182. package/dist/overlay-views/index.js +25 -0
  183. package/dist/overlay-views/index.js.map +1 -0
  184. package/dist/periods/index.cjs +7 -1
  185. package/dist/periods/index.cjs.map +1 -1
  186. package/dist/periods/index.d.cts +7 -6
  187. package/dist/periods/index.d.ts +7 -6
  188. package/dist/periods/index.js +6 -6
  189. package/dist/{predicate-SBHmi6D0.d.cts → predicate-Dnu81tsS.d.cts} +25 -1
  190. package/dist/{predicate-SBHmi6D0.d.ts → predicate-Dnu81tsS.d.ts} +25 -1
  191. package/dist/{public-envelope-6JTACYJV.js → public-envelope-U3CMEOMV.js} +4 -4
  192. package/dist/public-envelope-U3CMEOMV.js.map +1 -0
  193. package/dist/query/index.cjs +302 -124
  194. package/dist/query/index.cjs.map +1 -1
  195. package/dist/query/index.d.cts +3 -3
  196. package/dist/query/index.d.ts +3 -3
  197. package/dist/query/index.js +26 -11
  198. package/dist/read-only-facade-ITU6L7BL.js +7 -0
  199. package/dist/read-only-facade-ITU6L7BL.js.map +1 -0
  200. package/dist/registry-3ALP62P6.js +10 -0
  201. package/dist/registry-3ALP62P6.js.map +1 -0
  202. package/dist/registry-7HE6VJGC.js +8 -0
  203. package/dist/registry-7HE6VJGC.js.map +1 -0
  204. package/dist/registry-PSIPG2QR.js +8 -0
  205. package/dist/registry-PSIPG2QR.js.map +1 -0
  206. package/dist/registry-RFGGMVNJ.js +7 -0
  207. package/dist/registry-RFGGMVNJ.js.map +1 -0
  208. package/dist/revoke-KY2GB4KP.js +17 -0
  209. package/dist/revoke-KY2GB4KP.js.map +1 -0
  210. package/dist/session/index.cjs +7 -1
  211. package/dist/session/index.cjs.map +1 -1
  212. package/dist/session/index.d.cts +8 -7
  213. package/dist/session/index.d.ts +8 -7
  214. package/dist/session/index.js +10 -3
  215. package/dist/session/index.js.map +1 -1
  216. package/dist/shadow/index.cjs.map +1 -1
  217. package/dist/shadow/index.d.cts +7 -6
  218. package/dist/shadow/index.d.ts +7 -6
  219. package/dist/shadow/index.js +2 -2
  220. package/dist/signer-GRI5TZKH.js +18 -0
  221. package/dist/signer-GRI5TZKH.js.map +1 -0
  222. package/dist/stale-OTOF3FH7.js +13 -0
  223. package/dist/stale-OTOF3FH7.js.map +1 -0
  224. package/dist/store/index.cjs +14 -0
  225. package/dist/store/index.cjs.map +1 -1
  226. package/dist/store/index.d.cts +7 -6
  227. package/dist/store/index.d.ts +7 -6
  228. package/dist/store/index.js +5 -2
  229. package/dist/{strategy-D-SrOLCl.d.cts → strategy-DSTrsZ8t.d.cts} +72 -19
  230. package/dist/{strategy-D-SrOLCl.d.ts → strategy-DSTrsZ8t.d.ts} +72 -19
  231. package/dist/sync/index.cjs.map +1 -1
  232. package/dist/sync/index.d.cts +6 -5
  233. package/dist/sync/index.d.ts +6 -5
  234. package/dist/sync/index.js +4 -4
  235. package/dist/team/index.cjs +1554 -2
  236. package/dist/team/index.cjs.map +1 -1
  237. package/dist/team/index.d.cts +7 -6
  238. package/dist/team/index.d.ts +7 -6
  239. package/dist/team/index.js +77 -8
  240. package/dist/tx/index.cjs +296 -44
  241. package/dist/tx/index.cjs.map +1 -1
  242. package/dist/tx/index.d.cts +7 -6
  243. package/dist/tx/index.d.ts +7 -6
  244. package/dist/tx/index.js +2 -2
  245. package/dist/{types-Bo7NSXJr.d.ts → types-BoFFiskX.d.ts} +2714 -321
  246. package/dist/{types-Bnb82f5R.d.cts → types-DJG8HG6F.d.cts} +2714 -321
  247. package/dist/{index-CywCC1qZ.d.cts → ulid-BmBgooGm.d.ts} +215 -26
  248. package/dist/{index-8QDuznDr.d.ts → ulid-C7ms9oli.d.cts} +215 -26
  249. package/dist/util/index.cjs.map +1 -1
  250. package/dist/util/index.js +1 -1
  251. package/dist/with-derivation-BKXXa8Vt.d.ts +13 -0
  252. package/dist/with-derivation-BjQ7q4NE.d.cts +13 -0
  253. package/dist/with-guard-C25yNjzd.d.ts +18 -0
  254. package/dist/with-guard-DQme5DKE.d.cts +18 -0
  255. package/dist/with-materialized-view-BbEPFIIJ.d.cts +27 -0
  256. package/dist/with-materialized-view-CqnRwI2S.d.ts +27 -0
  257. package/dist/with-overlayed-view-Ct1fSJt-.d.ts +13 -0
  258. package/dist/with-overlayed-view-bwlmmFjx.d.cts +13 -0
  259. package/package.json +65 -2
  260. package/dist/chunk-2CSJGFCB.js.map +0 -1
  261. package/dist/chunk-ACLDOTNQ.js.map +0 -1
  262. package/dist/chunk-BTDCBVJW.js +0 -160
  263. package/dist/chunk-BTDCBVJW.js.map +0 -1
  264. package/dist/chunk-CIMZBAZB.js.map +0 -1
  265. package/dist/chunk-EXHNQEV4.js +0 -392
  266. package/dist/chunk-EXHNQEV4.js.map +0 -1
  267. package/dist/chunk-GOUT6DND.js.map +0 -1
  268. package/dist/chunk-M5INGEFC.js.map +0 -1
  269. package/dist/chunk-MDDTIZUO.js.map +0 -1
  270. package/dist/chunk-QAVUREFT.js.map +0 -1
  271. package/dist/chunk-RKJ6OL7K.js.map +0 -1
  272. package/dist/chunk-SCZXXXU4.js.map +0 -1
  273. package/dist/chunk-TDR6T5CJ.js.map +0 -1
  274. package/dist/chunk-WDM5XGGS.js.map +0 -1
  275. /package/dist/{chunk-PTVMYYON.js.map → chunk-243PNUA6.js.map} +0 -0
  276. /package/dist/{chunk-MR4424N3.js.map → chunk-2PAQNPE3.js.map} +0 -0
  277. /package/dist/{chunk-AVVPZ4BC.js.map → chunk-3Y53S2SA.js.map} +0 -0
  278. /package/dist/{chunk-ZFKD4QMV.js.map → chunk-7BRE6EUA.js.map} +0 -0
  279. /package/dist/{chunk-USKYUS74.js.map → chunk-MUWOSVEP.js.map} +0 -0
  280. /package/dist/{chunk-4PWAI7Q4.js.map → chunk-NWZ3I6R6.js.map} +0 -0
  281. /package/dist/{chunk-QGZRWRSL.js.map → chunk-QPEXPHJR.js.map} +0 -0
  282. /package/dist/{chunk-R36SIKES.js.map → chunk-QXQRKXCU.js.map} +0 -0
  283. /package/dist/{chunk-M62XNWRA.js.map → chunk-VK5EER6C.js.map} +0 -0
  284. /package/dist/{chunk-NPC4LFV5.js.map → chunk-YMYK7US4.js.map} +0 -0
  285. /package/dist/{crypto-IVKU7YTT.js.map → crypto-5ZDIY3NG.js.map} +0 -0
  286. /package/dist/{delegation-2DBS2EOH.js.map → delegation-QYXZW25W.js.map} +0 -0
  287. /package/dist/{ledger-QZTTHQAQ.js.map → derivations/index.js.map} +0 -0
  288. /package/dist/{public-envelope-6JTACYJV.js.map → executor-AS2IDHKZ.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -1,17 +1,22 @@
1
- import { at as NoydbStore, aR as UserEnvelope, aS as PublicEnvelope, aT as GateName, aU as GatePolicy, aV as VaultPolicy, aW as ActiveTier, aX as FactorProof, ar as UnlockedKeyring, aY as Vault, aA as DiffEntry } from './types-Bnb82f5R.cjs';
2
- export { aZ as AccessibleVault, ax as AppendInput, p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, a_ as BUNDLE_STORE_POLICY, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, a$ as BuiltInGateName, b0 as BundleRecipient, _ as CONSENT_AUDIT_COLLECTION, b1 as CacheOptions, b2 as CacheStats, b3 as ChangeEvent, ay as ChangeType, a7 as ClosePeriodOptions, b4 as Collection, b5 as CollectionChangeEvent, b6 as CollectionConflictResolver, ai as CollectionFrame, az as CollectionInstant, b7 as Conflict, b8 as ConflictPolicy, b9 as ConflictStrategy, $ as ConsentAuditEntry, a0 as ConsentAuditFilter, a1 as ConsentContext, a2 as ConsentOp, ba as CrossTierAccessEvent, L as DEFAULT_CHUNK_SIZE, bb as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, bc as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, bd as DeepPartial, be as DeepPartialOrNull, bf as DelegationToken, bg as DeleteManyResult, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, bh as DirtyEntry, bi as ELEVATION_AUDIT_COLLECTION, bj as ElevatedHandle, av as EncryptedEnvelope, bk as EnrollAuthenticatorOptions, bl as ExportCapability, bm as ExportChunk, bn as ExportFormat, bo as ExportStreamOptions, bp as FactorKind, bq as FactorRequirement, br as GhostRecord, bs as GrantOptions, bt as HistoryConfig, bu as HistoryEntry, au as HistoryOptions, e as I18nTextDescriptor, f as I18nTextOptions, bv as INDEXED_STORE_POLICY, bw as ImportCapability, bx as InferOutput, by as IssueDelegationOptions, bz as IssueMagicLinkGrantOptions, aB as JsonPatch, aC as JsonPatchOp, bA as KeyringAuthenticator, bB as KeyringFile, aD as LedgerEntry, aE as LedgerStore, bC as ListAccessibleVaultsOptions, bD as ListPageResult, bE as LiveUserEnvelope, bF as LocaleReadOptions, bG as Lru, bH as LruOptions, bI as LruStats, bJ as MAGIC_LINK_CONTENT_INFO_PREFIX, bK as MAGIC_LINK_GRANTS_COLLECTION, bL as MAGIC_LINK_KEK_INFO_PREFIX, bM as MagicLinkGrantPayload, bN as MagicLinkGrantRecord, bO as NOYDB_BACKUP_VERSION, bP as NOYDB_FORMAT_VERSION, bQ as NOYDB_KEYRING_VERSION, bR as NOYDB_SYNC_VERSION, bS as Noydb, bT as NoydbBundleStore, bU as NoydbEventMap, bV as NoydbOptions, a8 as OpenPeriodOptions, a9 as PERIODS_COLLECTION, bW as PUBLIC_ENVELOPE_FIELDS, bX as PaperRecoveryDoc, bY as PaperRecoveryEntry, bZ as PassphrasePolicy, b_ as PassphraseValidationResult, aa as PeriodRecord, b$ as Permission, c0 as Permissions, c1 as PlaintextTranslatorContext, c2 as PlaintextTranslatorFn, P as PolicyEnforcer, c3 as PresenceHandle, c4 as PresencePeer, aw as PruneOptions, c5 as PublicEnvelopeField, c6 as PublicEnvelopeSchema, c7 as PublicEnvelopeText, c8 as PullMode, c9 as PullOptions, ca as PullPolicy, cb as PullResult, cc as PushMode, cd as PushOptions, ce as PushPolicy, cf as PushResult, cg as PutManyItemOptions, ch as PutManyOptions, ci as PutManyResult, cj as QueryAcrossOptions, ck as QueryAcrossResult, cl as QuickUnlockState, cm as QuickUnlockStore, cn as ReAuthOperation, co as RecoverPassphraseInput, cp as RecoverPassphraseResult, cq as RecoverUserOptions, cr as RecoveryProof, cs as ResolvedPublicEnvelopeSchema, ct as RevokeOptions, aq as Role, cu as RotatePassphraseInput, cv as SessionPolicy, cw as SetPublicEnvelopeInput, U as SlotInfo, V as SlotRecord, cx as SlotRewrapCeremony, cy as SlotRewrapContext, cz as StandardSchemaV1, cA as StandardSchemaV1Issue, cB as StandardSchemaV1SyncResult, cC as StoreAuth, cD as StoreAuthKind, cE as StoreCapabilities, cF as SyncEngine, cG as SyncMetadata, cH as SyncPolicy, cI as SyncScheduler, cJ as SyncSchedulerStatus, cK as SyncStatus, cL as SyncTarget, cM as SyncTargetRole, cN as SyncTransaction, cO as SyncTransactionResult, cP as TierMode, cQ as TranslatorAuditEntry, al as TxCollection, am as TxContext, cR as TxOp, an as TxVault, cS as USER_ENVELOPE_COLLECTION, cT as USER_ENVELOPE_MAX_BYTES, cU as Unsubscribe, cV as UpdateAuthenticatorOptions, cW as UpdateUserOptions, cX as UserApi, cY as UserEnvelopeCheckGate, cZ as UserEnvelopeOversizedError, c_ as UserEnvelopePresented, c$ as UserInfo, d0 as VaultBackup, aF as VaultEngine, aj as VaultFrame, aG as VaultInstant, d1 as VaultPolicyOnDisk, d2 as VaultSnapshot, aH as VerifyResult, W as VersionRecord, d3 as WarningRules, d4 as WeakPassphraseError, d5 as WeakPassphraseReason, d6 as WrappedDeksBlob, g as applyI18nLocale, aI as applyPatch, d7 as assertStrongPassphrase, d8 as buildRecipientKeyringFile, d9 as burnPaperRecoveryEntry, aJ as canonicalJson, aK as computePatch, n as createEnforcer, da as createNoydb, db as createStore, dc as deriveMagicLinkContentKey, h as dictCollectionName, i as dictKey, aL as diff, dd as enrollAuthenticator, de as estimateEntropy, df as evaluateExportCapability, dg as evaluateImportCapability, dh as findAuthenticator, aM as formatDiff, di as hasExportCapability, dj as hasImportCapability, dk as hasRecoveryEnrolled, aN as hashEntry, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, dl as isMagicLinkGrantExpired, dm as isPublicEnvelope, dn as issueDelegation, dp as keyringRecoverPassphrase, dq as keyringRotatePassphrase, dr as listMagicLinkGrants, ds as listUsers, dt as listUsersWithEnvelopes, du as loadActiveDelegations, dv as loadPaperRecoveryEntries, dw as magicLinkGrantRecordId, dx as mintPaperRecoveryEntry, dy as mintWrappedDeksBlob, aO as paddedIndex, aP as parseIndex, dz as readMagicLinkGrantRecord, dA as recoverUser, dB as removeAuthenticator, r as resolveI18nText, dC as resolvePublicEnvelopeSchema, dD as revokeDelegation, dE as revokeMagicLinkGrant, ao as runTransaction, dF as savePaperRecoveryEntries, aQ as sha256Hex, dG as unwrapDeksFromBlob, dH as unwrapDeksFromPaperEntry, dI as unwrapMagicLinkGrant, v as validateI18nTextValue, dJ as validatePassphrase, dK as validatePublicEnvelopeInput, dL as validateSchemaInput, dM as validateSchemaOutput, o as validateSessionPolicy, dN as writeMagicLinkGrant } from './types-Bnb82f5R.cjs';
1
+ import { aO as NoydbStore, bo as UserEnvelope, ba as PublicEnvelope, bp as GateName, bq as GatePolicy, br as VaultPolicy, bs as ActiveTier, bt as FactorProof, bu as PersistedSchemaEnvelope, bv as DirectoryConfig, bw as UserVisibility, aM as UnlockedKeyring, bf as Vault, aV as DiffEntry } from './types-DJG8HG6F.cjs';
2
+ export { bx as AccessibleVault, aS as AppendInput, ay as ArrayOutputSpec, p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, by as BUNDLE_STORE_POLICY, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, bz as BuiltInGateName, bc as BundleRecipient, _ as CONSENT_AUDIT_COLLECTION, bA as CacheOptions, bB as CacheStats, bC as ChangeEvent, aT as ChangeType, a7 as ClosePeriodOptions, aH as Collection, bD as CollectionChangeEvent, bE as CollectionConflictResolver, bF as CollectionDescriptor, ao as CollectionFrame, aU as CollectionInstant, bG as CollectionStats, bH as Conflict, bI as ConflictPolicy, bJ as ConflictStrategy, $ as ConsentAuditEntry, a0 as ConsentAuditFilter, a1 as ConsentContext, a2 as ConsentOp, bK as CrossTierAccessEvent, L as DEFAULT_CHUNK_SIZE, bL as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, bM as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, bN as DeepPartial, bO as DeepPartialOrNull, bP as DelegationToken, bQ as DeleteManyResult, bR as DerivationDescriptor, aw as DerivationStrategy, aA as DerivationStrategyHandle, aB as DerivedFromMeta, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, bS as DirtyEntry, bT as DumpSchemaOptions, bU as ELEVATION_AUDIT_COLLECTION, bV as ElevatedHandle, aQ as EncryptedEnvelope, bW as EnrollAuthenticatorOptions, bX as EnrollAuthenticatorWrappingDEKsOptions, bY as EnrollAuthenticatorWrappingKEKOptions, bZ as EnrollRecoveryResult, b_ as ExportCapability, b$ as ExportChunk, c0 as ExportFormat, c1 as ExportStreamOptions, c2 as FactorKind, c3 as FactorProofBundle, c4 as FactorRequirement, c5 as FieldDescriptor, c6 as FieldSource, c7 as GhostRecord, c8 as GrantOptions, ai as GuardChange, aj as GuardContext, ah as GuardStrategy, al as GuardStrategyHandle, c9 as HistoryConfig, ca as HistoryEntry, aP as HistoryOptions, e as I18nTextDescriptor, f as I18nTextOptions, cb as INDEXED_STORE_POLICY, cc as ImportCapability, cd as InferOutput, ce as InternalCollectionStats, cf as IssueDelegationOptions, cg as IssueMagicLinkGrantOptions, aW as JsonPatch, aX as JsonPatchOp, ch as KeyringAuthenticator, ci as KeyringAuthenticatorWrappingDEKs, cj as KeyringAuthenticatorWrappingKEK, ck as KeyringFile, aY as LedgerEntry, aZ as LedgerStore, cl as ListAccessibleVaultsOptions, cm as ListPageResult, cn as ListUsersOptions, co as LiveUserEnvelope, cp as LocaleReadOptions, cq as Lru, cr as LruOptions, cs as LruStats, ct as MAGIC_LINK_CONTENT_INFO_PREFIX, cu as MAGIC_LINK_GRANTS_COLLECTION, cv as MAGIC_LINK_KEK_INFO_PREFIX, cw as MagicLinkGrantPayload, cx as MagicLinkGrantRecord, bl as MaterializedFromMeta, cy as MaterializedViewDescriptor, bm as MaterializedViewOutput, aE as MaterializedViewStrategy, aF as MaterializedViewStrategyHandle, cz as MemoryRecipientSealer, cA as MemorySealingKeyProvider, cB as NOYDB_BACKUP_VERSION, cC as NOYDB_FORMAT_VERSION, cD as NOYDB_KEYRING_VERSION, cE as NOYDB_SYNC_VERSION, cF as Noydb, cG as NoydbBundleStore, cH as NoydbEventMap, cI as NoydbOptions, a8 as OpenPeriodOptions, aC as OutputSpec, cJ as OverlayViewDescriptor, aG as OverlayedViewStrategy, aJ as OverlayedViewStrategyHandle, a9 as PERIODS_COLLECTION, cK as PUBLIC_ENVELOPE_FIELDS, cL as PaperRecoveryDoc, cM as PaperRecoveryEntry, cN as PassphrasePolicy, cO as PassphraseValidationResult, aa as PeriodRecord, cP as Permission, cQ as Permissions, cR as PersistedSchemaKind, cS as PlaintextTranslatorContext, cT as PlaintextTranslatorFn, P as PolicyEnforcer, cU as PresenceHandle, cV as PresencePeer, aR as PruneOptions, cW as PublicEnvelopeField, cX as PublicEnvelopeSchema, cY as PublicEnvelopeText, cZ as PullMode, c_ as PullOptions, c$ as PullPolicy, d0 as PullResult, d1 as PushMode, d2 as PushOptions, d3 as PushPolicy, d4 as PushResult, d5 as PutManyItemOptions, d6 as PutManyOptions, d7 as PutManyResult, d8 as QueryAcrossOptions, d9 as QueryAcrossResult, da as QuickUnlockState, db as QuickUnlockStore, dc as ReAuthOperation, be as RecipientHint, bd as RecipientSealer, aD as RecordOutputSpec, dd as RecoverPassphraseInput, de as RecoverPassphraseResult, df as RecoverUserOptions, dg as RecoveryProof, dh as ResolvedPublicEnvelopeSchema, di as RevokeOptions, aL as Role, dj as RotatePassphraseInput, dk as RotateRecoveryOptions, dl as RotateRecoveryResult, dm as SEALED_PASSPHRASE_RECORD_ID, dn as SealedEnvelope, dp as SealedPassphrase, bb as SealingKeyProvider, dq as SessionPolicy, dr as SetPublicEnvelopeInput, ds as ShamirRecoveryDoc, dt as ShamirRecoveryEntry, bh as ShamirRecoveryProvider, U as SlotInfo, V as SlotRecord, du as SlotRewrapCeremony, dv as SlotRewrapContext, dw as StandardSchemaV1, dx as StandardSchemaV1Issue, dy as StandardSchemaV1SyncResult, dz as StoreAuth, dA as StoreAuthKind, dB as StoreCapabilities, dC as SyncEngine, dD as SyncMetadata, dE as SyncPolicy, dF as SyncScheduler, dG as SyncSchedulerStatus, dH as SyncStatus, dI as SyncTarget, dJ as SyncTargetRole, dK as SyncTransaction, dL as SyncTransactionResult, dM as TierMode, dN as TranslatorAuditEntry, as as TxCollection, at as TxContext, dO as TxOp, au as TxVault, dP as USER_ENVELOPE_COLLECTION, dQ as USER_ENVELOPE_MAX_BYTES, bn as UnionSource, dR as Unsubscribe, dS as UpdateAuthenticatorOptions, dT as UpdateUserOptions, dU as UserApi, dV as UserEnvelopeCheckGate, dW as UserEnvelopeOversizedError, dX as UserEnvelopePresented, dY as UserInfo, dZ as VaultBackup, a_ as VaultEngine, ap as VaultFrame, a$ as VaultInstant, d_ as VaultPolicyOnDisk, d$ as VaultSchemaSnapshot, e0 as VaultSnapshot, b0 as VerifyResult, W as VersionRecord, e1 as WarningRules, e2 as WeakPassphraseError, e3 as WeakPassphraseReason, e4 as WrappedDeksBlob, g as applyI18nLocale, b1 as applyPatch, e5 as assertStrongPassphrase, e6 as buildRecipientKeyringFile, e7 as burnPaperRecoveryEntry, b2 as canonicalJson, b3 as computePatch, n as createEnforcer, e8 as createNoydb, e9 as createStore, ea as deriveMagicLinkContentKey, h as dictCollectionName, i as dictKey, b4 as diff, eb as enrollAuthenticator, ec as estimateEntropy, ed as evaluateExportCapability, ee as evaluateImportCapability, ef as findAuthenticator, b5 as formatDiff, eg as hasExportCapability, eh as hasImportCapability, ei as hasRecoveryEnrolled, b6 as hashEntry, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, ej as isMagicLinkGrantExpired, ek as isPublicEnvelope, el as issueDelegation, em as keyringRecoverPassphrase, en as keyringRotatePassphrase, eo as listMagicLinkGrants, ep as listUsers, eq as listUsersWithEnvelopes, er as loadActiveDelegations, es as loadPaperRecoveryEntries, et as loadSealedPassphrase, eu as loadShamirRecoveryEntries, ev as magicLinkGrantRecordId, ew as mintPaperRecoveryEntry, ex as mintShamirRecoveryEntry, ey as mintWrappedDeksBlob, b7 as paddedIndex, b8 as parseIndex, ez as parseSealedEnvelope, eA as readMagicLinkGrantRecord, eB as recoverUser, eC as removeAuthenticator, r as resolveI18nText, eD as resolvePublicEnvelopeSchema, eE as revokeDelegation, eF as revokeMagicLinkGrant, av as runTransaction, eG as savePaperRecoveryEntries, eH as saveSealedPassphrase, eI as saveShamirRecoveryEntries, b9 as sha256Hex, eJ as unwrapDeksFromBlob, eK as unwrapDeksFromPaperEntry, eL as unwrapDeksFromShamirEntry, eM as unwrapMagicLinkGrant, v as validateI18nTextValue, eN as validatePassphrase, eO as validatePublicEnvelopeInput, eP as validateSchemaInput, eQ as validateSchemaOutput, o as validateSessionPolicy, eR as writeMagicLinkGrant } from './types-DJG8HG6F.cjs';
3
3
  export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from './mime-magic-CBBSOkjm.cjs';
4
4
  export { AgeRoute, BlobLifecyclePolicy, BlobStoreRoute, CircuitBreakerOptions, HealthCheckOptions, LogLevel, LoggingOptions, MetricsOptions, OverrideOptions, OverrideTarget, RetryOptions, RouteStatus, RouteStoreOptions, RoutedNoydbStore, StoreCacheOptions, StoreMiddleware, StoreOperation, SuspendOptions, WrapBundleStoreOptions, WrappedBundleNoydbStore, createBundleStore, routeStore, withCache, withCircuitBreaker, withHealthCheck, withLogging, withMetrics, withRetry, wrapBundleStore, wrapStore } from './store/index.cjs';
5
- import { N as NoydbError } from './index-6xNpPsxR.cjs';
6
- export { A as AlreadyElevatedError, B as BackupCorruptedError, a as BackupLedgerError, b as BundleIntegrityError, c as BundleVersionConflictError, C as ConflictError, D as DEFAULT_JOIN_MAX_ROWS, d as DanglingReferenceError, e as DecryptionError, f as DelegationTargetMissingError, g as DictKeyInUseError, h as DictKeyMissingError, E as ElevationExpiredError, i as ExportCapabilityError, F as FilenameSanitizationError, G as GroupCardinalityError, I as ImportCapabilityError, j as IndexRequiredError, k as IndexWriteFailureError, l as InvalidKeyError, J as JoinContext, m as JoinLeg, n as JoinStrategy, o as JoinTooLargeError, p as JoinableSource, K as KeyringExpiredError, L as LedgerContentionError, q as LiveQuery, r as LiveUpstream, s as LocaleNotSpecifiedError, M as MissingTranslationError, t as NetworkError, u as NoAccessError, v as NotFoundError, O as OrderBy, P as PathEscapeError, w as PeriodClosedError, x as PermissionDeniedError, y as PrivilegeEscalationError, Q as Query, z as QueryPlan, H as QuerySource, R as ReadOnlyAtInstantError, S as ReadOnlyError, T as ReadOnlyFrameError, U as RefDescriptor, V as RefIntegrityError, W as RefMode, X as RefRegistry, Y as RefScopeError, Z as RefViolation, _ as ReservedCollectionNameError, $ as ScanBuilder, a0 as ScanPageProvider, a1 as SchemaValidationError, a2 as SessionExpiredError, a3 as SessionNotFoundError, a4 as SessionPolicyError, a5 as StoreCapabilityError, a6 as TamperedError, a7 as TierDemoteDeniedError, a8 as TierNotGrantedError, a9 as TranslatorNotConfiguredError, aa as ValidationError, ab as applyJoins, ac as buildLiveQuery, ad as executePlan, ae as ref, af as resetJoinWarnings } from './index-6xNpPsxR.cjs';
7
- export { C as CompressionAlgo, N as NOYDB_BUNDLE_FORMAT_VERSION, a as NOYDB_BUNDLE_MAGIC, b as NOYDB_BUNDLE_PREFIX_BYTES, c as NoydbBundleHeader, d as NoydbBundleReadResult, W as WriteNoydbBundleOptions, g as generateULID, h as hasNoydbBundleMagic, i as isULID, r as readNoydbBundle, e as readNoydbBundleHeader, f as readNoydbBundlePublicEnvelope, j as resetBrotliSupportCache, w as writeNoydbBundle } from './index-CywCC1qZ.cjs';
5
+ import { N as NoydbError } from './index-BMjrzNZr.cjs';
6
+ export { x as AlreadyElevatedError, A as AmendmentForbiddenError, m as AttestationError, B as BackupCorruptedError, o as BackupLedgerError, p as BundleIntegrityError, q as BundleSealMismatchError, r as BundleVersionConflictError, C as ConflictError, y as DEFAULT_JOIN_MAX_ROWS, z as DanglingReferenceError, E as DecryptionError, G as DelegationTargetMissingError, e as DerivationCapExceededError, f as DerivationCycleError, g as DerivationDepthError, h as DerivationOutputShapeError, i as DerivationOutputUnknownError, D as DictKeyInUseError, a as DictKeyMissingError, H as DirectoryDisabledError, J as ElevationExpiredError, K as ExportCapabilityError, F as FieldFrozenError, U as FilenameSanitizationError, V as GroupCardinalityError, W as ImportCapabilityError, X as IndexRequiredError, Y as IndexWriteFailureError, Z as InvalidKeyError, I as InvariantError, _ as JoinContext, $ as JoinLeg, a0 as JoinStrategy, a1 as JoinTooLargeError, a2 as JoinableSource, a3 as KeyringCorruptError, a4 as KeyringExpiredError, a5 as LedgerContentionError, a6 as LiveQuery, a7 as LiveUpstream, L as LocaleNotSpecifiedError, t as MaterializedViewConfigError, u as MaterializedViewCycleError, v as MaterializedViewSourceUnknownError, w as MaterializedViewTooLargeError, M as MissingTranslationError, a8 as NetworkError, a9 as NoAccessError, aa as NotFoundError, ab as OrderBy, O as OverlayBaseIsVirtualError, j as OverlayCollectionUnavailableError, k as OverlayIdMismatchError, l as OverlayNameCollisionError, ac as PathEscapeError, ad as PeriodClosedError, ae as PermissionDeniedError, af as PrivilegeEscalationError, Q as Query, ag as QueryPlan, ah as QuerySource, ai as ReadOnlyAtInstantError, aj as ReadOnlyError, ak as ReadOnlyFrameError, d as RecordLockedError, al as RefDescriptor, am as RefIntegrityError, an as RefMode, ao as RefRegistry, ap as RefScopeError, aq as RefViolation, R as ReservedCollectionNameError, ar as ScanBuilder, as as ScanPageProvider, at as SchemaValidationError, S as SessionExpiredError, b as SessionNotFoundError, c as SessionPolicyError, au as StoreCapabilityError, av as TamperedError, aw as TierDemoteDeniedError, ax as TierNotGrantedError, T as TranslatorNotConfiguredError, ay as ValidationError, az as applyJoins, aA as buildLiveQuery, aB as executePlan, aC as ref, aD as resetJoinWarnings } from './index-BMjrzNZr.cjs';
7
+ export { A as AutoCredential, n as AutoCredentialKind, c as CompressionAlgo, N as NOYDB_BUNDLE_FORMAT_VERSION, e as NOYDB_BUNDLE_MAGIC, f as NOYDB_BUNDLE_PREFIX_BYTES, g as NoydbBundleHeader, h as NoydbBundleReadResult, R as ReadNoydbBundleOptions, W as WriteNoydbBundleOptions, j as generateULID, o as hasNoydbBundleMagic, k as isULID, r as readNoydbBundle, l as readNoydbBundleHeader, p as readNoydbBundlePublicEnvelope, m as resetBrotliSupportCache, w as writeNoydbBundle } from './ulid-C7ms9oli.cjs';
8
8
  export { a as CrdtMode, b as CrdtState, L as LwwMapState, R as RgaState, Y as YjsState, m as mergeCrdtStates, r as resolveCrdtSnapshot } from './strategy-BSxFXGzb.cjs';
9
+ export { w as withGuard } from './with-guard-DQme5DKE.cjs';
10
+ export { w as withDerivation } from './with-derivation-BjQ7q4NE.cjs';
11
+ export { w as withMaterializedView } from './with-materialized-view-BbEPFIIJ.cjs';
12
+ export { a as Clause, C as CollectionIndexes, F as FieldClause, b as FilterClause, G as GroupClause, H as HashIndex, I as IndexDef, O as Operator, e as evaluateClause, c as evaluateFieldClause, r as readPath } from './predicate-Dnu81tsS.cjs';
13
+ export { w as withOverlayedView } from './with-overlayed-view-bwlmmFjx.cjs';
9
14
  export { SYNC_CREDENTIALS_COLLECTION, SyncCredential, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential } from './team/index.cjs';
10
- export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-Da1B0TIK.cjs';
11
- export { a as Clause, C as CollectionIndexes, F as FieldClause, b as FilterClause, G as GroupClause, H as HashIndex, I as IndexDef, O as Operator, e as evaluateClause, c as evaluateFieldClause, r as readPath } from './predicate-SBHmi6D0.cjs';
12
- export { a as AggregateResult, b as AggregateSpec, c as Aggregation, d as AggregationUpstream, G as GROUPBY_MAX_CARDINALITY, e as GROUPBY_WARN_CARDINALITY, f as GroupedAggregation, g as GroupedQuery, h as GroupedRow, L as LiveAggregation, R as Reducer, i as ReducerOptions, j as avg, l as count, m as groupAndReduce, n as max, o as min, r as reduceRecords, s as sum } from './strategy-D-SrOLCl.cjs';
13
- export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-BEfzPKwo.cjs';
14
- import './lazy-builder-CZVLKh0Z.cjs';
15
+ export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-DQCNDfFp.cjs';
16
+ export { a as AggregateResult, b as AggregateSpec, c as Aggregation, d as AggregationUpstream, G as GROUPBY_MAX_CARDINALITY, e as GROUPBY_WARN_CARDINALITY, f as GroupedAggregation, g as GroupedQuery, h as GroupedQueryN, i as GroupedRow, j as GroupedRowN, L as LiveAggregation, R as Reducer, k as ReducerOptions, l as avg, n as count, o as groupAndReduce, p as max, q as min, r as reduceRecords, t as sum } from './strategy-DSTrsZ8t.cjs';
17
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-jDowCrK2.cjs';
18
+ import './lazy-builder-C-rPfWG0.cjs';
19
+ import '@noy-db/attestation';
15
20
 
16
21
  /**
17
22
  * Persistence helpers for per-principal user envelopes stored at
@@ -164,13 +169,39 @@ declare class RecoveryNotEnrolledError extends NoydbError {
164
169
  constructor(message?: string);
165
170
  }
166
171
  /**
167
- * Raised by `db.recoverPassphrase` when the developer requests a
168
- * recovery profile other than `'paper'` in v0.1.0-pre.5. The other
169
- * three profiles (Shamir, multi-channel, admin-mediated) ship the API
170
- * shape now; their per-profile dispatch lands in follow-up issues.
172
+ * Raised by `openVault` when a managed-passphrase-mode vault has no
173
+ * STRONG recovery profile enrolled (#195).
174
+ *
175
+ * Managed mode means the user never types a passphrase — the unlock
176
+ * material lives in a `SealingKeyProvider` (`at-*` package). If that
177
+ * provider's key is lost AND no strong recovery is enrolled, the
178
+ * vault is irrecoverable. To prevent that footgun, managed-mode vaults
179
+ * require at least one strong recovery profile (Shamir today;
180
+ * multi-channel / admin-mediated when those ship).
181
+ *
182
+ * Paper recovery alone is NOT strong under managed mode: the user has
183
+ * no memorized passphrase to fall back on, so losing the paper sheet =
184
+ * losing every record permanently.
185
+ *
186
+ * Bootstrap with `db.openVaultAndEnrollRecovery(vault, { recovery: [{ profile: "shamir", k, n }] })`
187
+ * to atomically create-and-enroll, or call `db.enrollRecovery(vault, { profile: "shamir", ... })`
188
+ * separately before re-attempting `openVault`.
189
+ */
190
+ declare class ManagedRecoveryNotEnrolledError extends NoydbError {
191
+ readonly vault: string;
192
+ constructor(vault: string);
193
+ }
194
+ /**
195
+ * Raised by `db.recoverPassphrase` / `db.enrollRecovery` /
196
+ * `db.rotateRecovery` when the developer requests a recovery profile
197
+ * not yet wired in this hub release.
198
+ *
199
+ * Implemented: `paper` (#10, pre.5) and `shamir` (#196 slice 1, pre.16).
200
+ * Pending: `multi-channel` and `admin-mediated` (tracked under #196
201
+ * follow-up slices).
171
202
  *
172
203
  * The carried `profile` and `tracking` fields let consumers steer the
173
- * UI ("Shamir recovery is not yet wired up — open issue #N to follow").
204
+ * UI ("multi-channel recovery is not yet wired up — open issue #N to follow").
174
205
  */
175
206
  declare class RecoveryProfileNotImplementedError extends NoydbError {
176
207
  readonly profile: string;
@@ -308,6 +339,89 @@ declare function loadVaultPolicy(store: NoydbStore, vault: string): Promise<Vaul
308
339
  */
309
340
  declare function saveVaultPolicy(store: NoydbStore, vault: string, policy: VaultPolicy): Promise<void>;
310
341
 
342
+ /**
343
+ * Derive a {@link PersistedSchemaEnvelope} from a Standard Schema v1
344
+ * validator. v0 supports Zod via `zod-to-json-schema` (optional peer-dep);
345
+ * other families write a stub envelope flagging the kind.
346
+ *
347
+ * @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
348
+ *
349
+ * @module
350
+ */
351
+
352
+ /**
353
+ * Heuristic Zod detection — Zod schemas carry a `_def.typeName` property
354
+ * starting with `Zod` (e.g. `ZodObject`, `ZodString`). This survives Zod's
355
+ * minor-version bumps because the typeName naming is stable across v3.
356
+ */
357
+ declare function isZodSchema(value: unknown): boolean;
358
+ declare function derivePersistedSchema(validator: unknown): Promise<PersistedSchemaEnvelope>;
359
+
360
+ /**
361
+ * Read / write the per-collection persisted-schema envelope. Mirrors the
362
+ * standard noy-db record envelope shape and is **AES-GCM encrypted with
363
+ * the collection's DEK** — the schema body (field names, enum values,
364
+ * constraints) is sensitive metadata, so it gets the same encryption
365
+ * envelope as the records it describes.
366
+ *
367
+ * Storage layout:
368
+ *
369
+ * <vault>/_schemas/<collection> → EncryptedEnvelope
370
+ *
371
+ * The DEK passed to {@link savePersistedSchema} / {@link loadPersistedSchema}
372
+ * is the same key the collection uses for its records.
373
+ *
374
+ * @module
375
+ */
376
+
377
+ /** Reserved collection name where persisted schemas live. */
378
+ declare const SCHEMAS_COLLECTION: "_schemas";
379
+ /**
380
+ * Read and decrypt the persisted-schema envelope for one collection.
381
+ * Returns `undefined` when no envelope has been written or when decryption
382
+ * fails (e.g. wrong DEK passed). Tolerates corrupted records — JSON parse
383
+ * failures surface as `undefined`, mirroring `_meta/handle`'s contract.
384
+ */
385
+ declare function loadPersistedSchema(store: NoydbStore, vault: string, collection: string, dek: CryptoKey): Promise<PersistedSchemaEnvelope | undefined>;
386
+ /**
387
+ * Encrypt and persist a schema envelope for one collection. Always
388
+ * overwrites any prior write (callers gate on hash equality before calling
389
+ * to avoid no-op writes).
390
+ */
391
+ declare function savePersistedSchema(store: NoydbStore, vault: string, collection: string, dek: CryptoKey, payload: PersistedSchemaEnvelope): Promise<void>;
392
+
393
+ /**
394
+ * Orchestrate the derive → hash → skip-or-write cycle for a collection's
395
+ * persisted JSON Schema. Called by the Vault at collection-registration
396
+ * time when the developer opts in via `collection({ persistJsonSchema:
397
+ * true })`.
398
+ *
399
+ * Skip semantics:
400
+ *
401
+ * - Zod validators: skip when the new hash equals the stored hash.
402
+ * - Non-Zod (stub envelopes have hash=null): skip when the stored
403
+ * envelope's `kind` matches the freshly-detected kind (since there's
404
+ * no body to compare yet — a kind change is the only signal).
405
+ *
406
+ * @module
407
+ */
408
+
409
+ interface PersistSchemaResult {
410
+ /** True when a fresh envelope was written to storage. */
411
+ readonly written: boolean;
412
+ /** True when an existing envelope matched and the write was skipped. */
413
+ readonly skipped: boolean;
414
+ /** The envelope that was either written or matched. */
415
+ readonly envelope: PersistedSchemaEnvelope;
416
+ }
417
+ declare function persistSchemaIfNeeded(opts: {
418
+ readonly store: NoydbStore;
419
+ readonly vault: string;
420
+ readonly collectionName: string;
421
+ readonly validator: unknown;
422
+ readonly dek: CryptoKey;
423
+ }): Promise<PersistSchemaResult>;
424
+
311
425
  /**
312
426
  * Authentication introspection — issue #13.
313
427
  *
@@ -353,6 +467,84 @@ declare function describeAllUsersAuth(store: NoydbStore, vault: string): Promise
353
467
  description: string;
354
468
  }>>;
355
469
 
470
+ /**
471
+ * Persistence helpers for the vault-level user-directory toggle
472
+ * (`_meta/directory`). Mirrors the bypass-AES pattern used by
473
+ * `_meta/policy` — the directory document is plain JSON, the
474
+ * envelope's `_iv` field is left empty.
475
+ *
476
+ * @see docs/subsystems/user-envelope.md → Directory visibility
477
+ * @see docs/subsystems/plaintext-bypass.md — every `_iv: ''` write site
478
+ *
479
+ * @module
480
+ */
481
+
482
+ /** Reserved id for the vault-level directory document. */
483
+ declare const DIRECTORY_RECORD_ID = "directory";
484
+ /**
485
+ * Read the directory toggle from `_meta/directory`. Returns `undefined`
486
+ * when no document has been persisted — callers treat that as the
487
+ * default-on case (`{ enabled: true }`).
488
+ *
489
+ * Tolerates corrupted documents the same way `_meta/policy` does: a
490
+ * JSON parse failure surfaces as `undefined`, not a thrown error, so a
491
+ * bad write never permanently breaks team enumeration.
492
+ */
493
+ declare function readDirectoryConfig(store: NoydbStore, vault: string): Promise<DirectoryConfig | undefined>;
494
+ /**
495
+ * Persist the directory toggle at `_meta/directory`. Idempotent — call
496
+ * on every `db.setDirectoryEnabled()` invocation. Owner-only at the
497
+ * caller site; this primitive does not check roles.
498
+ */
499
+ declare function persistDirectoryConfig(store: NoydbStore, vault: string, config: DirectoryConfig): Promise<void>;
500
+
501
+ /**
502
+ * Persistence helpers for the per-user visibility flag
503
+ * (`_meta/visibility/<keyringId>`). Mirrors the bypass-AES pattern used
504
+ * by `_meta/policy` — the visibility document is plain JSON, the
505
+ * envelope's `_iv` field is left empty.
506
+ *
507
+ * Stored alongside the keyring file rather than inside the encrypted
508
+ * user envelope (`_users/<keyringId>`) because:
509
+ *
510
+ * - `UserEnvelope<T>.data` is opaque-to-hub by contract — hub does not
511
+ * introspect or reserve any keys inside it. Adding `hidden` there
512
+ * would violate that contract.
513
+ * - `listUsersWithEnvelopes` filters by the flag, and the filter must
514
+ * work even when decryption fails (legacy keyrings predating the
515
+ * envelope feature, or a corrupted envelope).
516
+ *
517
+ * @see docs/subsystems/user-envelope.md → Directory visibility
518
+ * @see docs/subsystems/plaintext-bypass.md — every `_iv: ''` write site
519
+ *
520
+ * @module
521
+ */
522
+
523
+ /** Prefix for per-user visibility records inside `_meta`. */
524
+ declare const VISIBILITY_RECORD_PREFIX = "visibility/";
525
+ /** Compose the `_meta` record id for a keyring's visibility doc. */
526
+ declare function visibilityRecordId(keyringId: string): string;
527
+ /**
528
+ * Read the visibility flag for `keyringId`. Returns `undefined` when no
529
+ * document has been persisted — callers treat that as the default-visible
530
+ * case (`{ hidden: false }`).
531
+ */
532
+ declare function readUserVisibility(store: NoydbStore, vault: string, keyringId: string): Promise<UserVisibility | undefined>;
533
+ /**
534
+ * Persist the visibility flag for `keyringId` at
535
+ * `_meta/visibility/<keyringId>`. Idempotent — call on every
536
+ * `vault.user.setMyVisibility()` invocation. Own-only at the caller
537
+ * site; this primitive does not enforce keyring ownership.
538
+ */
539
+ declare function persistUserVisibility(store: NoydbStore, vault: string, keyringId: string, visibility: UserVisibility): Promise<void>;
540
+ /**
541
+ * Delete the visibility flag for `keyringId`. Called from `revoke()`
542
+ * alongside `deleteUserEnvelope` so the sidecar does not leak to a
543
+ * re-granted principal with the same `userId`. Idempotent — the store's
544
+ * `delete()` is already a no-op when the record is absent.
545
+ */
546
+ declare function deleteUserVisibility(store: NoydbStore, vault: string, keyringId: string): Promise<void>;
547
+
356
548
  interface EncryptResult {
357
549
  iv: string;
358
550
  data: string;
@@ -562,4 +754,4 @@ type DiffCandidate<T = unknown> = Vault | Record<string, readonly T[]> | string;
562
754
  */
563
755
  declare function diffVault<T = unknown>(vault: Vault, candidate: DiffCandidate<T>, options?: DiffOptions): Promise<VaultDiff<T>>;
564
756
 
565
- export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, type DiffCandidate, DiffEntry, type DiffOptions, FactorProof, GateName, GatePolicy, META_COLLECTION, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, STRICT_POLICY, UnlockedKeyring, UserEnvelope, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, assertTierAccess, base64ToBuffer, bufferToBase64, checkGate, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, listUserEnvelopeIds, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, mergePolicy, parseBytes, readPublicEnvelope, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy };
757
+ export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, DIRECTORY_RECORD_ID, type DiffCandidate, DiffEntry, type DiffOptions, DirectoryConfig, FactorProof, GateName, GatePolicy, META_COLLECTION, ManagedRecoveryNotEnrolledError, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, type PersistSchemaResult, PersistedSchemaEnvelope, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, SCHEMAS_COLLECTION, STRICT_POLICY, UnlockedKeyring, UserEnvelope, UserVisibility, VISIBILITY_RECORD_PREFIX, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, assertTierAccess, base64ToBuffer, bufferToBase64, checkGate, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, deleteUserVisibility, derivePersistedSchema, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, isZodSchema, listUserEnvelopeIds, loadPersistedSchema, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, mergePolicy, parseBytes, persistDirectoryConfig, persistSchemaIfNeeded, persistUserVisibility, readDirectoryConfig, readPublicEnvelope, readUserVisibility, savePersistedSchema, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy, visibilityRecordId };
package/dist/index.d.ts CHANGED
@@ -1,17 +1,22 @@
1
- import { at as NoydbStore, aR as UserEnvelope, aS as PublicEnvelope, aT as GateName, aU as GatePolicy, aV as VaultPolicy, aW as ActiveTier, aX as FactorProof, ar as UnlockedKeyring, aY as Vault, aA as DiffEntry } from './types-Bo7NSXJr.js';
2
- export { aZ as AccessibleVault, ax as AppendInput, p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, a_ as BUNDLE_STORE_POLICY, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, a$ as BuiltInGateName, b0 as BundleRecipient, _ as CONSENT_AUDIT_COLLECTION, b1 as CacheOptions, b2 as CacheStats, b3 as ChangeEvent, ay as ChangeType, a7 as ClosePeriodOptions, b4 as Collection, b5 as CollectionChangeEvent, b6 as CollectionConflictResolver, ai as CollectionFrame, az as CollectionInstant, b7 as Conflict, b8 as ConflictPolicy, b9 as ConflictStrategy, $ as ConsentAuditEntry, a0 as ConsentAuditFilter, a1 as ConsentContext, a2 as ConsentOp, ba as CrossTierAccessEvent, L as DEFAULT_CHUNK_SIZE, bb as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, bc as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, bd as DeepPartial, be as DeepPartialOrNull, bf as DelegationToken, bg as DeleteManyResult, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, bh as DirtyEntry, bi as ELEVATION_AUDIT_COLLECTION, bj as ElevatedHandle, av as EncryptedEnvelope, bk as EnrollAuthenticatorOptions, bl as ExportCapability, bm as ExportChunk, bn as ExportFormat, bo as ExportStreamOptions, bp as FactorKind, bq as FactorRequirement, br as GhostRecord, bs as GrantOptions, bt as HistoryConfig, bu as HistoryEntry, au as HistoryOptions, e as I18nTextDescriptor, f as I18nTextOptions, bv as INDEXED_STORE_POLICY, bw as ImportCapability, bx as InferOutput, by as IssueDelegationOptions, bz as IssueMagicLinkGrantOptions, aB as JsonPatch, aC as JsonPatchOp, bA as KeyringAuthenticator, bB as KeyringFile, aD as LedgerEntry, aE as LedgerStore, bC as ListAccessibleVaultsOptions, bD as ListPageResult, bE as LiveUserEnvelope, bF as LocaleReadOptions, bG as Lru, bH as LruOptions, bI as LruStats, bJ as MAGIC_LINK_CONTENT_INFO_PREFIX, bK as MAGIC_LINK_GRANTS_COLLECTION, bL as MAGIC_LINK_KEK_INFO_PREFIX, bM as MagicLinkGrantPayload, bN as MagicLinkGrantRecord, bO as NOYDB_BACKUP_VERSION, bP as NOYDB_FORMAT_VERSION, bQ as NOYDB_KEYRING_VERSION, bR as NOYDB_SYNC_VERSION, bS as Noydb, bT as NoydbBundleStore, bU as NoydbEventMap, bV as NoydbOptions, a8 as OpenPeriodOptions, a9 as PERIODS_COLLECTION, bW as PUBLIC_ENVELOPE_FIELDS, bX as PaperRecoveryDoc, bY as PaperRecoveryEntry, bZ as PassphrasePolicy, b_ as PassphraseValidationResult, aa as PeriodRecord, b$ as Permission, c0 as Permissions, c1 as PlaintextTranslatorContext, c2 as PlaintextTranslatorFn, P as PolicyEnforcer, c3 as PresenceHandle, c4 as PresencePeer, aw as PruneOptions, c5 as PublicEnvelopeField, c6 as PublicEnvelopeSchema, c7 as PublicEnvelopeText, c8 as PullMode, c9 as PullOptions, ca as PullPolicy, cb as PullResult, cc as PushMode, cd as PushOptions, ce as PushPolicy, cf as PushResult, cg as PutManyItemOptions, ch as PutManyOptions, ci as PutManyResult, cj as QueryAcrossOptions, ck as QueryAcrossResult, cl as QuickUnlockState, cm as QuickUnlockStore, cn as ReAuthOperation, co as RecoverPassphraseInput, cp as RecoverPassphraseResult, cq as RecoverUserOptions, cr as RecoveryProof, cs as ResolvedPublicEnvelopeSchema, ct as RevokeOptions, aq as Role, cu as RotatePassphraseInput, cv as SessionPolicy, cw as SetPublicEnvelopeInput, U as SlotInfo, V as SlotRecord, cx as SlotRewrapCeremony, cy as SlotRewrapContext, cz as StandardSchemaV1, cA as StandardSchemaV1Issue, cB as StandardSchemaV1SyncResult, cC as StoreAuth, cD as StoreAuthKind, cE as StoreCapabilities, cF as SyncEngine, cG as SyncMetadata, cH as SyncPolicy, cI as SyncScheduler, cJ as SyncSchedulerStatus, cK as SyncStatus, cL as SyncTarget, cM as SyncTargetRole, cN as SyncTransaction, cO as SyncTransactionResult, cP as TierMode, cQ as TranslatorAuditEntry, al as TxCollection, am as TxContext, cR as TxOp, an as TxVault, cS as USER_ENVELOPE_COLLECTION, cT as USER_ENVELOPE_MAX_BYTES, cU as Unsubscribe, cV as UpdateAuthenticatorOptions, cW as UpdateUserOptions, cX as UserApi, cY as UserEnvelopeCheckGate, cZ as UserEnvelopeOversizedError, c_ as UserEnvelopePresented, c$ as UserInfo, d0 as VaultBackup, aF as VaultEngine, aj as VaultFrame, aG as VaultInstant, d1 as VaultPolicyOnDisk, d2 as VaultSnapshot, aH as VerifyResult, W as VersionRecord, d3 as WarningRules, d4 as WeakPassphraseError, d5 as WeakPassphraseReason, d6 as WrappedDeksBlob, g as applyI18nLocale, aI as applyPatch, d7 as assertStrongPassphrase, d8 as buildRecipientKeyringFile, d9 as burnPaperRecoveryEntry, aJ as canonicalJson, aK as computePatch, n as createEnforcer, da as createNoydb, db as createStore, dc as deriveMagicLinkContentKey, h as dictCollectionName, i as dictKey, aL as diff, dd as enrollAuthenticator, de as estimateEntropy, df as evaluateExportCapability, dg as evaluateImportCapability, dh as findAuthenticator, aM as formatDiff, di as hasExportCapability, dj as hasImportCapability, dk as hasRecoveryEnrolled, aN as hashEntry, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, dl as isMagicLinkGrantExpired, dm as isPublicEnvelope, dn as issueDelegation, dp as keyringRecoverPassphrase, dq as keyringRotatePassphrase, dr as listMagicLinkGrants, ds as listUsers, dt as listUsersWithEnvelopes, du as loadActiveDelegations, dv as loadPaperRecoveryEntries, dw as magicLinkGrantRecordId, dx as mintPaperRecoveryEntry, dy as mintWrappedDeksBlob, aO as paddedIndex, aP as parseIndex, dz as readMagicLinkGrantRecord, dA as recoverUser, dB as removeAuthenticator, r as resolveI18nText, dC as resolvePublicEnvelopeSchema, dD as revokeDelegation, dE as revokeMagicLinkGrant, ao as runTransaction, dF as savePaperRecoveryEntries, aQ as sha256Hex, dG as unwrapDeksFromBlob, dH as unwrapDeksFromPaperEntry, dI as unwrapMagicLinkGrant, v as validateI18nTextValue, dJ as validatePassphrase, dK as validatePublicEnvelopeInput, dL as validateSchemaInput, dM as validateSchemaOutput, o as validateSessionPolicy, dN as writeMagicLinkGrant } from './types-Bo7NSXJr.js';
1
+ import { aO as NoydbStore, bo as UserEnvelope, ba as PublicEnvelope, bp as GateName, bq as GatePolicy, br as VaultPolicy, bs as ActiveTier, bt as FactorProof, bu as PersistedSchemaEnvelope, bv as DirectoryConfig, bw as UserVisibility, aM as UnlockedKeyring, bf as Vault, aV as DiffEntry } from './types-BoFFiskX.js';
2
+ export { bx as AccessibleVault, aS as AppendInput, ay as ArrayOutputSpec, p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, by as BUNDLE_STORE_POLICY, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, bz as BuiltInGateName, bc as BundleRecipient, _ as CONSENT_AUDIT_COLLECTION, bA as CacheOptions, bB as CacheStats, bC as ChangeEvent, aT as ChangeType, a7 as ClosePeriodOptions, aH as Collection, bD as CollectionChangeEvent, bE as CollectionConflictResolver, bF as CollectionDescriptor, ao as CollectionFrame, aU as CollectionInstant, bG as CollectionStats, bH as Conflict, bI as ConflictPolicy, bJ as ConflictStrategy, $ as ConsentAuditEntry, a0 as ConsentAuditFilter, a1 as ConsentContext, a2 as ConsentOp, bK as CrossTierAccessEvent, L as DEFAULT_CHUNK_SIZE, bL as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, bM as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, bN as DeepPartial, bO as DeepPartialOrNull, bP as DelegationToken, bQ as DeleteManyResult, bR as DerivationDescriptor, aw as DerivationStrategy, aA as DerivationStrategyHandle, aB as DerivedFromMeta, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, bS as DirtyEntry, bT as DumpSchemaOptions, bU as ELEVATION_AUDIT_COLLECTION, bV as ElevatedHandle, aQ as EncryptedEnvelope, bW as EnrollAuthenticatorOptions, bX as EnrollAuthenticatorWrappingDEKsOptions, bY as EnrollAuthenticatorWrappingKEKOptions, bZ as EnrollRecoveryResult, b_ as ExportCapability, b$ as ExportChunk, c0 as ExportFormat, c1 as ExportStreamOptions, c2 as FactorKind, c3 as FactorProofBundle, c4 as FactorRequirement, c5 as FieldDescriptor, c6 as FieldSource, c7 as GhostRecord, c8 as GrantOptions, ai as GuardChange, aj as GuardContext, ah as GuardStrategy, al as GuardStrategyHandle, c9 as HistoryConfig, ca as HistoryEntry, aP as HistoryOptions, e as I18nTextDescriptor, f as I18nTextOptions, cb as INDEXED_STORE_POLICY, cc as ImportCapability, cd as InferOutput, ce as InternalCollectionStats, cf as IssueDelegationOptions, cg as IssueMagicLinkGrantOptions, aW as JsonPatch, aX as JsonPatchOp, ch as KeyringAuthenticator, ci as KeyringAuthenticatorWrappingDEKs, cj as KeyringAuthenticatorWrappingKEK, ck as KeyringFile, aY as LedgerEntry, aZ as LedgerStore, cl as ListAccessibleVaultsOptions, cm as ListPageResult, cn as ListUsersOptions, co as LiveUserEnvelope, cp as LocaleReadOptions, cq as Lru, cr as LruOptions, cs as LruStats, ct as MAGIC_LINK_CONTENT_INFO_PREFIX, cu as MAGIC_LINK_GRANTS_COLLECTION, cv as MAGIC_LINK_KEK_INFO_PREFIX, cw as MagicLinkGrantPayload, cx as MagicLinkGrantRecord, bl as MaterializedFromMeta, cy as MaterializedViewDescriptor, bm as MaterializedViewOutput, aE as MaterializedViewStrategy, aF as MaterializedViewStrategyHandle, cz as MemoryRecipientSealer, cA as MemorySealingKeyProvider, cB as NOYDB_BACKUP_VERSION, cC as NOYDB_FORMAT_VERSION, cD as NOYDB_KEYRING_VERSION, cE as NOYDB_SYNC_VERSION, cF as Noydb, cG as NoydbBundleStore, cH as NoydbEventMap, cI as NoydbOptions, a8 as OpenPeriodOptions, aC as OutputSpec, cJ as OverlayViewDescriptor, aG as OverlayedViewStrategy, aJ as OverlayedViewStrategyHandle, a9 as PERIODS_COLLECTION, cK as PUBLIC_ENVELOPE_FIELDS, cL as PaperRecoveryDoc, cM as PaperRecoveryEntry, cN as PassphrasePolicy, cO as PassphraseValidationResult, aa as PeriodRecord, cP as Permission, cQ as Permissions, cR as PersistedSchemaKind, cS as PlaintextTranslatorContext, cT as PlaintextTranslatorFn, P as PolicyEnforcer, cU as PresenceHandle, cV as PresencePeer, aR as PruneOptions, cW as PublicEnvelopeField, cX as PublicEnvelopeSchema, cY as PublicEnvelopeText, cZ as PullMode, c_ as PullOptions, c$ as PullPolicy, d0 as PullResult, d1 as PushMode, d2 as PushOptions, d3 as PushPolicy, d4 as PushResult, d5 as PutManyItemOptions, d6 as PutManyOptions, d7 as PutManyResult, d8 as QueryAcrossOptions, d9 as QueryAcrossResult, da as QuickUnlockState, db as QuickUnlockStore, dc as ReAuthOperation, be as RecipientHint, bd as RecipientSealer, aD as RecordOutputSpec, dd as RecoverPassphraseInput, de as RecoverPassphraseResult, df as RecoverUserOptions, dg as RecoveryProof, dh as ResolvedPublicEnvelopeSchema, di as RevokeOptions, aL as Role, dj as RotatePassphraseInput, dk as RotateRecoveryOptions, dl as RotateRecoveryResult, dm as SEALED_PASSPHRASE_RECORD_ID, dn as SealedEnvelope, dp as SealedPassphrase, bb as SealingKeyProvider, dq as SessionPolicy, dr as SetPublicEnvelopeInput, ds as ShamirRecoveryDoc, dt as ShamirRecoveryEntry, bh as ShamirRecoveryProvider, U as SlotInfo, V as SlotRecord, du as SlotRewrapCeremony, dv as SlotRewrapContext, dw as StandardSchemaV1, dx as StandardSchemaV1Issue, dy as StandardSchemaV1SyncResult, dz as StoreAuth, dA as StoreAuthKind, dB as StoreCapabilities, dC as SyncEngine, dD as SyncMetadata, dE as SyncPolicy, dF as SyncScheduler, dG as SyncSchedulerStatus, dH as SyncStatus, dI as SyncTarget, dJ as SyncTargetRole, dK as SyncTransaction, dL as SyncTransactionResult, dM as TierMode, dN as TranslatorAuditEntry, as as TxCollection, at as TxContext, dO as TxOp, au as TxVault, dP as USER_ENVELOPE_COLLECTION, dQ as USER_ENVELOPE_MAX_BYTES, bn as UnionSource, dR as Unsubscribe, dS as UpdateAuthenticatorOptions, dT as UpdateUserOptions, dU as UserApi, dV as UserEnvelopeCheckGate, dW as UserEnvelopeOversizedError, dX as UserEnvelopePresented, dY as UserInfo, dZ as VaultBackup, a_ as VaultEngine, ap as VaultFrame, a$ as VaultInstant, d_ as VaultPolicyOnDisk, d$ as VaultSchemaSnapshot, e0 as VaultSnapshot, b0 as VerifyResult, W as VersionRecord, e1 as WarningRules, e2 as WeakPassphraseError, e3 as WeakPassphraseReason, e4 as WrappedDeksBlob, g as applyI18nLocale, b1 as applyPatch, e5 as assertStrongPassphrase, e6 as buildRecipientKeyringFile, e7 as burnPaperRecoveryEntry, b2 as canonicalJson, b3 as computePatch, n as createEnforcer, e8 as createNoydb, e9 as createStore, ea as deriveMagicLinkContentKey, h as dictCollectionName, i as dictKey, b4 as diff, eb as enrollAuthenticator, ec as estimateEntropy, ed as evaluateExportCapability, ee as evaluateImportCapability, ef as findAuthenticator, b5 as formatDiff, eg as hasExportCapability, eh as hasImportCapability, ei as hasRecoveryEnrolled, b6 as hashEntry, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, ej as isMagicLinkGrantExpired, ek as isPublicEnvelope, el as issueDelegation, em as keyringRecoverPassphrase, en as keyringRotatePassphrase, eo as listMagicLinkGrants, ep as listUsers, eq as listUsersWithEnvelopes, er as loadActiveDelegations, es as loadPaperRecoveryEntries, et as loadSealedPassphrase, eu as loadShamirRecoveryEntries, ev as magicLinkGrantRecordId, ew as mintPaperRecoveryEntry, ex as mintShamirRecoveryEntry, ey as mintWrappedDeksBlob, b7 as paddedIndex, b8 as parseIndex, ez as parseSealedEnvelope, eA as readMagicLinkGrantRecord, eB as recoverUser, eC as removeAuthenticator, r as resolveI18nText, eD as resolvePublicEnvelopeSchema, eE as revokeDelegation, eF as revokeMagicLinkGrant, av as runTransaction, eG as savePaperRecoveryEntries, eH as saveSealedPassphrase, eI as saveShamirRecoveryEntries, b9 as sha256Hex, eJ as unwrapDeksFromBlob, eK as unwrapDeksFromPaperEntry, eL as unwrapDeksFromShamirEntry, eM as unwrapMagicLinkGrant, v as validateI18nTextValue, eN as validatePassphrase, eO as validatePublicEnvelopeInput, eP as validateSchemaInput, eQ as validateSchemaOutput, o as validateSessionPolicy, eR as writeMagicLinkGrant } from './types-BoFFiskX.js';
3
3
  export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from './mime-magic-CBBSOkjm.js';
4
4
  export { AgeRoute, BlobLifecyclePolicy, BlobStoreRoute, CircuitBreakerOptions, HealthCheckOptions, LogLevel, LoggingOptions, MetricsOptions, OverrideOptions, OverrideTarget, RetryOptions, RouteStatus, RouteStoreOptions, RoutedNoydbStore, StoreCacheOptions, StoreMiddleware, StoreOperation, SuspendOptions, WrapBundleStoreOptions, WrappedBundleNoydbStore, createBundleStore, routeStore, withCache, withCircuitBreaker, withHealthCheck, withLogging, withMetrics, withRetry, wrapBundleStore, wrapStore } from './store/index.js';
5
- import { N as NoydbError } from './index-DJTf9yxn.js';
6
- export { A as AlreadyElevatedError, B as BackupCorruptedError, a as BackupLedgerError, b as BundleIntegrityError, c as BundleVersionConflictError, C as ConflictError, D as DEFAULT_JOIN_MAX_ROWS, d as DanglingReferenceError, e as DecryptionError, f as DelegationTargetMissingError, g as DictKeyInUseError, h as DictKeyMissingError, E as ElevationExpiredError, i as ExportCapabilityError, F as FilenameSanitizationError, G as GroupCardinalityError, I as ImportCapabilityError, j as IndexRequiredError, k as IndexWriteFailureError, l as InvalidKeyError, J as JoinContext, m as JoinLeg, n as JoinStrategy, o as JoinTooLargeError, p as JoinableSource, K as KeyringExpiredError, L as LedgerContentionError, q as LiveQuery, r as LiveUpstream, s as LocaleNotSpecifiedError, M as MissingTranslationError, t as NetworkError, u as NoAccessError, v as NotFoundError, O as OrderBy, P as PathEscapeError, w as PeriodClosedError, x as PermissionDeniedError, y as PrivilegeEscalationError, Q as Query, z as QueryPlan, H as QuerySource, R as ReadOnlyAtInstantError, S as ReadOnlyError, T as ReadOnlyFrameError, U as RefDescriptor, V as RefIntegrityError, W as RefMode, X as RefRegistry, Y as RefScopeError, Z as RefViolation, _ as ReservedCollectionNameError, $ as ScanBuilder, a0 as ScanPageProvider, a1 as SchemaValidationError, a2 as SessionExpiredError, a3 as SessionNotFoundError, a4 as SessionPolicyError, a5 as StoreCapabilityError, a6 as TamperedError, a7 as TierDemoteDeniedError, a8 as TierNotGrantedError, a9 as TranslatorNotConfiguredError, aa as ValidationError, ab as applyJoins, ac as buildLiveQuery, ad as executePlan, ae as ref, af as resetJoinWarnings } from './index-DJTf9yxn.js';
7
- export { C as CompressionAlgo, N as NOYDB_BUNDLE_FORMAT_VERSION, a as NOYDB_BUNDLE_MAGIC, b as NOYDB_BUNDLE_PREFIX_BYTES, c as NoydbBundleHeader, d as NoydbBundleReadResult, W as WriteNoydbBundleOptions, g as generateULID, h as hasNoydbBundleMagic, i as isULID, r as readNoydbBundle, e as readNoydbBundleHeader, f as readNoydbBundlePublicEnvelope, j as resetBrotliSupportCache, w as writeNoydbBundle } from './index-8QDuznDr.js';
5
+ import { N as NoydbError } from './index-BCKdioeh.js';
6
+ export { x as AlreadyElevatedError, A as AmendmentForbiddenError, m as AttestationError, B as BackupCorruptedError, o as BackupLedgerError, p as BundleIntegrityError, q as BundleSealMismatchError, r as BundleVersionConflictError, C as ConflictError, y as DEFAULT_JOIN_MAX_ROWS, z as DanglingReferenceError, E as DecryptionError, G as DelegationTargetMissingError, e as DerivationCapExceededError, f as DerivationCycleError, g as DerivationDepthError, h as DerivationOutputShapeError, i as DerivationOutputUnknownError, D as DictKeyInUseError, a as DictKeyMissingError, H as DirectoryDisabledError, J as ElevationExpiredError, K as ExportCapabilityError, F as FieldFrozenError, U as FilenameSanitizationError, V as GroupCardinalityError, W as ImportCapabilityError, X as IndexRequiredError, Y as IndexWriteFailureError, Z as InvalidKeyError, I as InvariantError, _ as JoinContext, $ as JoinLeg, a0 as JoinStrategy, a1 as JoinTooLargeError, a2 as JoinableSource, a3 as KeyringCorruptError, a4 as KeyringExpiredError, a5 as LedgerContentionError, a6 as LiveQuery, a7 as LiveUpstream, L as LocaleNotSpecifiedError, t as MaterializedViewConfigError, u as MaterializedViewCycleError, v as MaterializedViewSourceUnknownError, w as MaterializedViewTooLargeError, M as MissingTranslationError, a8 as NetworkError, a9 as NoAccessError, aa as NotFoundError, ab as OrderBy, O as OverlayBaseIsVirtualError, j as OverlayCollectionUnavailableError, k as OverlayIdMismatchError, l as OverlayNameCollisionError, ac as PathEscapeError, ad as PeriodClosedError, ae as PermissionDeniedError, af as PrivilegeEscalationError, Q as Query, ag as QueryPlan, ah as QuerySource, ai as ReadOnlyAtInstantError, aj as ReadOnlyError, ak as ReadOnlyFrameError, d as RecordLockedError, al as RefDescriptor, am as RefIntegrityError, an as RefMode, ao as RefRegistry, ap as RefScopeError, aq as RefViolation, R as ReservedCollectionNameError, ar as ScanBuilder, as as ScanPageProvider, at as SchemaValidationError, S as SessionExpiredError, b as SessionNotFoundError, c as SessionPolicyError, au as StoreCapabilityError, av as TamperedError, aw as TierDemoteDeniedError, ax as TierNotGrantedError, T as TranslatorNotConfiguredError, ay as ValidationError, az as applyJoins, aA as buildLiveQuery, aB as executePlan, aC as ref, aD as resetJoinWarnings } from './index-BCKdioeh.js';
7
+ export { A as AutoCredential, n as AutoCredentialKind, c as CompressionAlgo, N as NOYDB_BUNDLE_FORMAT_VERSION, e as NOYDB_BUNDLE_MAGIC, f as NOYDB_BUNDLE_PREFIX_BYTES, g as NoydbBundleHeader, h as NoydbBundleReadResult, R as ReadNoydbBundleOptions, W as WriteNoydbBundleOptions, j as generateULID, o as hasNoydbBundleMagic, k as isULID, r as readNoydbBundle, l as readNoydbBundleHeader, p as readNoydbBundlePublicEnvelope, m as resetBrotliSupportCache, w as writeNoydbBundle } from './ulid-BmBgooGm.js';
8
8
  export { a as CrdtMode, b as CrdtState, L as LwwMapState, R as RgaState, Y as YjsState, m as mergeCrdtStates, r as resolveCrdtSnapshot } from './strategy-BSxFXGzb.js';
9
+ export { w as withGuard } from './with-guard-C25yNjzd.js';
10
+ export { w as withDerivation } from './with-derivation-BKXXa8Vt.js';
11
+ export { w as withMaterializedView } from './with-materialized-view-CqnRwI2S.js';
12
+ export { a as Clause, C as CollectionIndexes, F as FieldClause, b as FilterClause, G as GroupClause, H as HashIndex, I as IndexDef, O as Operator, e as evaluateClause, c as evaluateFieldClause, r as readPath } from './predicate-Dnu81tsS.js';
13
+ export { w as withOverlayedView } from './with-overlayed-view-Ct1fSJt-.js';
9
14
  export { SYNC_CREDENTIALS_COLLECTION, SyncCredential, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential } from './team/index.js';
10
- export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-BdPp68qn.js';
11
- export { a as Clause, C as CollectionIndexes, F as FieldClause, b as FilterClause, G as GroupClause, H as HashIndex, I as IndexDef, O as Operator, e as evaluateClause, c as evaluateFieldClause, r as readPath } from './predicate-SBHmi6D0.js';
12
- export { a as AggregateResult, b as AggregateSpec, c as Aggregation, d as AggregationUpstream, G as GROUPBY_MAX_CARDINALITY, e as GROUPBY_WARN_CARDINALITY, f as GroupedAggregation, g as GroupedQuery, h as GroupedRow, L as LiveAggregation, R as Reducer, i as ReducerOptions, j as avg, l as count, m as groupAndReduce, n as max, o as min, r as reduceRecords, s as sum } from './strategy-D-SrOLCl.js';
13
- export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-lsoL3eEW.js';
14
- import './lazy-builder-BwEoBQZ9.js';
15
+ export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-utkybTKb.js';
16
+ export { a as AggregateResult, b as AggregateSpec, c as Aggregation, d as AggregationUpstream, G as GROUPBY_MAX_CARDINALITY, e as GROUPBY_WARN_CARDINALITY, f as GroupedAggregation, g as GroupedQuery, h as GroupedQueryN, i as GroupedRow, j as GroupedRowN, L as LiveAggregation, R as Reducer, k as ReducerOptions, l as avg, n as count, o as groupAndReduce, p as max, q as min, r as reduceRecords, t as sum } from './strategy-DSTrsZ8t.js';
17
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-DcoYWfJ_.js';
18
+ import './lazy-builder-Rpd-V3jP.js';
19
+ import '@noy-db/attestation';
15
20
 
16
21
  /**
17
22
  * Persistence helpers for per-principal user envelopes stored at
@@ -164,13 +169,39 @@ declare class RecoveryNotEnrolledError extends NoydbError {
164
169
  constructor(message?: string);
165
170
  }
166
171
  /**
167
- * Raised by `db.recoverPassphrase` when the developer requests a
168
- * recovery profile other than `'paper'` in v0.1.0-pre.5. The other
169
- * three profiles (Shamir, multi-channel, admin-mediated) ship the API
170
- * shape now; their per-profile dispatch lands in follow-up issues.
172
+ * Raised by `openVault` when a managed-passphrase-mode vault has no
173
+ * STRONG recovery profile enrolled (#195).
174
+ *
175
+ * Managed mode means the user never types a passphrase — the unlock
176
+ * material lives in a `SealingKeyProvider` (`at-*` package). If that
177
+ * provider's key is lost AND no strong recovery is enrolled, the
178
+ * vault is irrecoverable. To prevent that footgun, managed-mode vaults
179
+ * require at least one strong recovery profile (Shamir today;
180
+ * multi-channel / admin-mediated when those ship).
181
+ *
182
+ * Paper recovery alone is NOT strong under managed mode: the user has
183
+ * no memorized passphrase to fall back on, so losing the paper sheet =
184
+ * losing every record permanently.
185
+ *
186
+ * Bootstrap with `db.openVaultAndEnrollRecovery(vault, { recovery: [{ profile: "shamir", k, n }] })`
187
+ * to atomically create-and-enroll, or call `db.enrollRecovery(vault, { profile: "shamir", ... })`
188
+ * separately before re-attempting `openVault`.
189
+ */
190
+ declare class ManagedRecoveryNotEnrolledError extends NoydbError {
191
+ readonly vault: string;
192
+ constructor(vault: string);
193
+ }
194
+ /**
195
+ * Raised by `db.recoverPassphrase` / `db.enrollRecovery` /
196
+ * `db.rotateRecovery` when the developer requests a recovery profile
197
+ * not yet wired in this hub release.
198
+ *
199
+ * Implemented: `paper` (#10, pre.5) and `shamir` (#196 slice 1, pre.16).
200
+ * Pending: `multi-channel` and `admin-mediated` (tracked under #196
201
+ * follow-up slices).
171
202
  *
172
203
  * The carried `profile` and `tracking` fields let consumers steer the
173
- * UI ("Shamir recovery is not yet wired up — open issue #N to follow").
204
+ * UI ("multi-channel recovery is not yet wired up — open issue #N to follow").
174
205
  */
175
206
  declare class RecoveryProfileNotImplementedError extends NoydbError {
176
207
  readonly profile: string;
@@ -308,6 +339,89 @@ declare function loadVaultPolicy(store: NoydbStore, vault: string): Promise<Vaul
308
339
  */
309
340
  declare function saveVaultPolicy(store: NoydbStore, vault: string, policy: VaultPolicy): Promise<void>;
310
341
 
342
+ /**
343
+ * Derive a {@link PersistedSchemaEnvelope} from a Standard Schema v1
344
+ * validator. v0 supports Zod via `zod-to-json-schema` (optional peer-dep);
345
+ * other families write a stub envelope flagging the kind.
346
+ *
347
+ * @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
348
+ *
349
+ * @module
350
+ */
351
+
352
+ /**
353
+ * Heuristic Zod detection — Zod schemas carry a `_def.typeName` property
354
+ * starting with `Zod` (e.g. `ZodObject`, `ZodString`). This survives Zod's
355
+ * minor-version bumps because the typeName naming is stable across v3.
356
+ */
357
+ declare function isZodSchema(value: unknown): boolean;
358
+ declare function derivePersistedSchema(validator: unknown): Promise<PersistedSchemaEnvelope>;
359
+
360
+ /**
361
+ * Read / write the per-collection persisted-schema envelope. Mirrors the
362
+ * standard noy-db record envelope shape and is **AES-GCM encrypted with
363
+ * the collection's DEK** — the schema body (field names, enum values,
364
+ * constraints) is sensitive metadata, so it gets the same encryption
365
+ * envelope as the records it describes.
366
+ *
367
+ * Storage layout:
368
+ *
369
+ * <vault>/_schemas/<collection> → EncryptedEnvelope
370
+ *
371
+ * The DEK passed to {@link savePersistedSchema} / {@link loadPersistedSchema}
372
+ * is the same key the collection uses for its records.
373
+ *
374
+ * @module
375
+ */
376
+
377
+ /** Reserved collection name where persisted schemas live. */
378
+ declare const SCHEMAS_COLLECTION: "_schemas";
379
+ /**
380
+ * Read and decrypt the persisted-schema envelope for one collection.
381
+ * Returns `undefined` when no envelope has been written or when decryption
382
+ * fails (e.g. wrong DEK passed). Tolerates corrupted records — JSON parse
383
+ * failures surface as `undefined`, mirroring `_meta/handle`'s contract.
384
+ */
385
+ declare function loadPersistedSchema(store: NoydbStore, vault: string, collection: string, dek: CryptoKey): Promise<PersistedSchemaEnvelope | undefined>;
386
+ /**
387
+ * Encrypt and persist a schema envelope for one collection. Always
388
+ * overwrites any prior write (callers gate on hash equality before calling
389
+ * to avoid no-op writes).
390
+ */
391
+ declare function savePersistedSchema(store: NoydbStore, vault: string, collection: string, dek: CryptoKey, payload: PersistedSchemaEnvelope): Promise<void>;
392
+
393
+ /**
394
+ * Orchestrate the derive → hash → skip-or-write cycle for a collection's
395
+ * persisted JSON Schema. Called by the Vault at collection-registration
396
+ * time when the developer opts in via `collection({ persistJsonSchema:
397
+ * true })`.
398
+ *
399
+ * Skip semantics:
400
+ *
401
+ * - Zod validators: skip when the new hash equals the stored hash.
402
+ * - Non-Zod (stub envelopes have hash=null): skip when the stored
403
+ * envelope's `kind` matches the freshly-detected kind (since there's
404
+ * no body to compare yet — a kind change is the only signal).
405
+ *
406
+ * @module
407
+ */
408
+
409
+ interface PersistSchemaResult {
410
+ /** True when a fresh envelope was written to storage. */
411
+ readonly written: boolean;
412
+ /** True when an existing envelope matched and the write was skipped. */
413
+ readonly skipped: boolean;
414
+ /** The envelope that was either written or matched. */
415
+ readonly envelope: PersistedSchemaEnvelope;
416
+ }
417
+ declare function persistSchemaIfNeeded(opts: {
418
+ readonly store: NoydbStore;
419
+ readonly vault: string;
420
+ readonly collectionName: string;
421
+ readonly validator: unknown;
422
+ readonly dek: CryptoKey;
423
+ }): Promise<PersistSchemaResult>;
424
+
311
425
  /**
312
426
  * Authentication introspection — issue #13.
313
427
  *
@@ -353,6 +467,84 @@ declare function describeAllUsersAuth(store: NoydbStore, vault: string): Promise
353
467
  description: string;
354
468
  }>>;
355
469
 
470
+ /**
471
+ * Persistence helpers for the vault-level user-directory toggle
472
+ * (`_meta/directory`). Mirrors the bypass-AES pattern used by
473
+ * `_meta/policy` — the directory document is plain JSON, the
474
+ * envelope's `_iv` field is left empty.
475
+ *
476
+ * @see docs/subsystems/user-envelope.md → Directory visibility
477
+ * @see docs/subsystems/plaintext-bypass.md — every `_iv: ''` write site
478
+ *
479
+ * @module
480
+ */
481
+
482
+ /** Reserved id for the vault-level directory document. */
483
+ declare const DIRECTORY_RECORD_ID = "directory";
484
+ /**
485
+ * Read the directory toggle from `_meta/directory`. Returns `undefined`
486
+ * when no document has been persisted — callers treat that as the
487
+ * default-on case (`{ enabled: true }`).
488
+ *
489
+ * Tolerates corrupted documents the same way `_meta/policy` does: a
490
+ * JSON parse failure surfaces as `undefined`, not a thrown error, so a
491
+ * bad write never permanently breaks team enumeration.
492
+ */
493
+ declare function readDirectoryConfig(store: NoydbStore, vault: string): Promise<DirectoryConfig | undefined>;
494
+ /**
495
+ * Persist the directory toggle at `_meta/directory`. Idempotent — call
496
+ * on every `db.setDirectoryEnabled()` invocation. Owner-only at the
497
+ * caller site; this primitive does not check roles.
498
+ */
499
+ declare function persistDirectoryConfig(store: NoydbStore, vault: string, config: DirectoryConfig): Promise<void>;
500
+
501
+ /**
502
+ * Persistence helpers for the per-user visibility flag
503
+ * (`_meta/visibility/<keyringId>`). Mirrors the bypass-AES pattern used
504
+ * by `_meta/policy` — the visibility document is plain JSON, the
505
+ * envelope's `_iv` field is left empty.
506
+ *
507
+ * Stored alongside the keyring file rather than inside the encrypted
508
+ * user envelope (`_users/<keyringId>`) because:
509
+ *
510
+ * - `UserEnvelope<T>.data` is opaque-to-hub by contract — hub does not
511
+ * introspect or reserve any keys inside it. Adding `hidden` there
512
+ * would violate that contract.
513
+ * - `listUsersWithEnvelopes` filters by the flag, and the filter must
514
+ * work even when decryption fails (legacy keyrings predating the
515
+ * envelope feature, or a corrupted envelope).
516
+ *
517
+ * @see docs/subsystems/user-envelope.md → Directory visibility
518
+ * @see docs/subsystems/plaintext-bypass.md — every `_iv: ''` write site
519
+ *
520
+ * @module
521
+ */
522
+
523
+ /** Prefix for per-user visibility records inside `_meta`. */
524
+ declare const VISIBILITY_RECORD_PREFIX = "visibility/";
525
+ /** Compose the `_meta` record id for a keyring's visibility doc. */
526
+ declare function visibilityRecordId(keyringId: string): string;
527
+ /**
528
+ * Read the visibility flag for `keyringId`. Returns `undefined` when no
529
+ * document has been persisted — callers treat that as the default-visible
530
+ * case (`{ hidden: false }`).
531
+ */
532
+ declare function readUserVisibility(store: NoydbStore, vault: string, keyringId: string): Promise<UserVisibility | undefined>;
533
+ /**
534
+ * Persist the visibility flag for `keyringId` at
535
+ * `_meta/visibility/<keyringId>`. Idempotent — call on every
536
+ * `vault.user.setMyVisibility()` invocation. Own-only at the caller
537
+ * site; this primitive does not enforce keyring ownership.
538
+ */
539
+ declare function persistUserVisibility(store: NoydbStore, vault: string, keyringId: string, visibility: UserVisibility): Promise<void>;
540
+ /**
541
+ * Delete the visibility flag for `keyringId`. Called from `revoke()`
542
+ * alongside `deleteUserEnvelope` so the sidecar does not leak to a
543
+ * re-granted principal with the same `userId`. Idempotent — the store's
544
+ * `delete()` is already a no-op when the record is absent.
545
+ */
546
+ declare function deleteUserVisibility(store: NoydbStore, vault: string, keyringId: string): Promise<void>;
547
+
356
548
  interface EncryptResult {
357
549
  iv: string;
358
550
  data: string;
@@ -562,4 +754,4 @@ type DiffCandidate<T = unknown> = Vault | Record<string, readonly T[]> | string;
562
754
  */
563
755
  declare function diffVault<T = unknown>(vault: Vault, candidate: DiffCandidate<T>, options?: DiffOptions): Promise<VaultDiff<T>>;
564
756
 
565
- export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, type DiffCandidate, DiffEntry, type DiffOptions, FactorProof, GateName, GatePolicy, META_COLLECTION, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, STRICT_POLICY, UnlockedKeyring, UserEnvelope, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, assertTierAccess, base64ToBuffer, bufferToBase64, checkGate, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, listUserEnvelopeIds, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, mergePolicy, parseBytes, readPublicEnvelope, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy };
757
+ export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, DIRECTORY_RECORD_ID, type DiffCandidate, DiffEntry, type DiffOptions, DirectoryConfig, FactorProof, GateName, GatePolicy, META_COLLECTION, ManagedRecoveryNotEnrolledError, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, type PersistSchemaResult, PersistedSchemaEnvelope, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, SCHEMAS_COLLECTION, STRICT_POLICY, UnlockedKeyring, UserEnvelope, UserVisibility, VISIBILITY_RECORD_PREFIX, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, assertTierAccess, base64ToBuffer, bufferToBase64, checkGate, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, deleteUserVisibility, derivePersistedSchema, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, isZodSchema, listUserEnvelopeIds, loadPersistedSchema, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, mergePolicy, parseBytes, persistDirectoryConfig, persistSchemaIfNeeded, persistUserVisibility, readDirectoryConfig, readPublicEnvelope, readUserVisibility, savePersistedSchema, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy, visibilityRecordId };